cc-viewer 1.3.7 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,605 @@
1
+ var W3=Object.defineProperty;var V3=(e,t,r)=>t in e?W3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var $t=(e,t,r)=>V3(e,typeof t!="symbol"?t+"":t,r);function n2(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function Ou(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wp={exports:{}},Ic={},Vp={exports:{}},rr={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var jS;function U3(){if(jS)return rr;jS=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;function g(A){return A===null||typeof A!="object"?null:(A=p&&A[p]||A["@@iterator"],typeof A=="function"?A:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,S={};function _(A,U,Y){this.props=A,this.context=U,this.refs=S,this.updater=Y||v}_.prototype.isReactComponent={},_.prototype.setState=function(A,U){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,U,"setState")},_.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function C(){}C.prototype=_.prototype;function x(A,U,Y){this.props=A,this.context=U,this.refs=S,this.updater=Y||v}var E=x.prototype=new C;E.constructor=x,b(E,_.prototype),E.isPureReactComponent=!0;var k=Array.isArray,P=Object.prototype.hasOwnProperty,T={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function N(A,U,Y){var Z,te={},ne=null,he=null;if(U!=null)for(Z in U.ref!==void 0&&(he=U.ref),U.key!==void 0&&(ne=""+U.key),U)P.call(U,Z)&&!O.hasOwnProperty(Z)&&(te[Z]=U[Z]);var me=arguments.length-2;if(me===1)te.children=Y;else if(1<me){for(var ue=Array(me),Se=0;Se<me;Se++)ue[Se]=arguments[Se+2];te.children=ue}if(A&&A.defaultProps)for(Z in me=A.defaultProps,me)te[Z]===void 0&&(te[Z]=me[Z]);return{$$typeof:e,type:A,key:ne,ref:he,props:te,_owner:T.current}}function I(A,U){return{$$typeof:e,type:A.type,key:U,ref:A.ref,props:A.props,_owner:A._owner}}function z(A){return typeof A=="object"&&A!==null&&A.$$typeof===e}function D(A){var U={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(Y){return U[Y]})}var M=/\/+/g;function j(A,U){return typeof A=="object"&&A!==null&&A.key!=null?D(""+A.key):U.toString(36)}function B(A,U,Y,Z,te){var ne=typeof A;(ne==="undefined"||ne==="boolean")&&(A=null);var he=!1;if(A===null)he=!0;else switch(ne){case"string":case"number":he=!0;break;case"object":switch(A.$$typeof){case e:case t:he=!0}}if(he)return he=A,te=te(he),A=Z===""?"."+j(he,0):Z,k(te)?(Y="",A!=null&&(Y=A.replace(M,"$&/")+"/"),B(te,U,Y,"",function(Se){return Se})):te!=null&&(z(te)&&(te=I(te,Y+(!te.key||he&&he.key===te.key?"":(""+te.key).replace(M,"$&/")+"/")+A)),U.push(te)),1;if(he=0,Z=Z===""?".":Z+":",k(A))for(var me=0;me<A.length;me++){ne=A[me];var ue=Z+j(ne,me);he+=B(ne,U,Y,ue,te)}else if(ue=g(A),typeof ue=="function")for(A=ue.call(A),me=0;!(ne=A.next()).done;)ne=ne.value,ue=Z+j(ne,me++),he+=B(ne,U,Y,ue,te);else if(ne==="object")throw U=String(A),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return he}function F(A,U,Y){if(A==null)return A;var Z=[],te=0;return B(A,Z,"","",function(ne){return U.call(Y,ne,te++)}),Z}function W(A){if(A._status===-1){var U=A._result;U=U(),U.then(function(Y){(A._status===0||A._status===-1)&&(A._status=1,A._result=Y)},function(Y){(A._status===0||A._status===-1)&&(A._status=2,A._result=Y)}),A._status===-1&&(A._status=0,A._result=U)}if(A._status===1)return A._result.default;throw A._result}var V={current:null},L={transition:null},G={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:L,ReactCurrentOwner:T};function q(){throw Error("act(...) is not supported in production builds of React.")}return rr.Children={map:F,forEach:function(A,U,Y){F(A,function(){U.apply(this,arguments)},Y)},count:function(A){var U=0;return F(A,function(){U++}),U},toArray:function(A){return F(A,function(U){return U})||[]},only:function(A){if(!z(A))throw Error("React.Children.only expected to receive a single React element child.");return A}},rr.Component=_,rr.Fragment=r,rr.Profiler=i,rr.PureComponent=x,rr.StrictMode=n,rr.Suspense=u,rr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,rr.act=q,rr.cloneElement=function(A,U,Y){if(A==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+A+".");var Z=b({},A.props),te=A.key,ne=A.ref,he=A._owner;if(U!=null){if(U.ref!==void 0&&(ne=U.ref,he=T.current),U.key!==void 0&&(te=""+U.key),A.type&&A.type.defaultProps)var me=A.type.defaultProps;for(ue in U)P.call(U,ue)&&!O.hasOwnProperty(ue)&&(Z[ue]=U[ue]===void 0&&me!==void 0?me[ue]:U[ue])}var ue=arguments.length-2;if(ue===1)Z.children=Y;else if(1<ue){me=Array(ue);for(var Se=0;Se<ue;Se++)me[Se]=arguments[Se+2];Z.children=me}return{$$typeof:e,type:A.type,key:te,ref:ne,props:Z,_owner:he}},rr.createContext=function(A){return A={$$typeof:a,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},A.Provider={$$typeof:o,_context:A},A.Consumer=A},rr.createElement=N,rr.createFactory=function(A){var U=N.bind(null,A);return U.type=A,U},rr.createRef=function(){return{current:null}},rr.forwardRef=function(A){return{$$typeof:c,render:A}},rr.isValidElement=z,rr.lazy=function(A){return{$$typeof:f,_payload:{_status:-1,_result:A},_init:W}},rr.memo=function(A,U){return{$$typeof:d,type:A,compare:U===void 0?null:U}},rr.startTransition=function(A){var U=L.transition;L.transition={};try{A()}finally{L.transition=U}},rr.unstable_act=q,rr.useCallback=function(A,U){return V.current.useCallback(A,U)},rr.useContext=function(A){return V.current.useContext(A)},rr.useDebugValue=function(){},rr.useDeferredValue=function(A){return V.current.useDeferredValue(A)},rr.useEffect=function(A,U){return V.current.useEffect(A,U)},rr.useId=function(){return V.current.useId()},rr.useImperativeHandle=function(A,U,Y){return V.current.useImperativeHandle(A,U,Y)},rr.useInsertionEffect=function(A,U){return V.current.useInsertionEffect(A,U)},rr.useLayoutEffect=function(A,U){return V.current.useLayoutEffect(A,U)},rr.useMemo=function(A,U){return V.current.useMemo(A,U)},rr.useReducer=function(A,U,Y){return V.current.useReducer(A,U,Y)},rr.useRef=function(A){return V.current.useRef(A)},rr.useState=function(A){return V.current.useState(A)},rr.useSyncExternalStore=function(A,U,Y){return V.current.useSyncExternalStore(A,U,Y)},rr.useTransition=function(){return V.current.useTransition()},rr.version="18.3.1",rr}var BS;function J0(){return BS||(BS=1,Vp.exports=U3()),Vp.exports}/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var LS;function q3(){if(LS)return Ic;LS=1;var e=J0(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(c,u,d){var f,p={},g=null,v=null;d!==void 0&&(g=""+d),u.key!==void 0&&(g=""+u.key),u.ref!==void 0&&(v=u.ref);for(f in u)n.call(u,f)&&!o.hasOwnProperty(f)&&(p[f]=u[f]);if(c&&c.defaultProps)for(f in u=c.defaultProps,u)p[f]===void 0&&(p[f]=u[f]);return{$$typeof:t,type:c,key:g,ref:v,props:p,_owner:i.current}}return Ic.Fragment=r,Ic.jsx=a,Ic.jsxs=a,Ic}var DS;function K3(){return DS||(DS=1,Wp.exports=q3()),Wp.exports}var $=K3(),h=J0();const Q=Ou(h),xf=n2({__proto__:null,default:Q},[h]);var Jd={},Up={exports:{}},wi={},qp={exports:{}},Kp={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var AS;function G3(){return AS||(AS=1,(function(e){function t(L,G){var q=L.length;L.push(G);e:for(;0<q;){var A=q-1>>>1,U=L[A];if(0<i(U,G))L[A]=G,L[q]=U,q=A;else break e}}function r(L){return L.length===0?null:L[0]}function n(L){if(L.length===0)return null;var G=L[0],q=L.pop();if(q!==G){L[0]=q;e:for(var A=0,U=L.length,Y=U>>>1;A<Y;){var Z=2*(A+1)-1,te=L[Z],ne=Z+1,he=L[ne];if(0>i(te,q))ne<U&&0>i(he,te)?(L[A]=he,L[ne]=q,A=ne):(L[A]=te,L[Z]=q,A=Z);else if(ne<U&&0>i(he,q))L[A]=he,L[ne]=q,A=ne;else break e}}return G}function i(L,G){var q=L.sortIndex-G.sortIndex;return q!==0?q:L.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var u=[],d=[],f=1,p=null,g=3,v=!1,b=!1,S=!1,_=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(L){for(var G=r(d);G!==null;){if(G.callback===null)n(d);else if(G.startTime<=L)n(d),G.sortIndex=G.expirationTime,t(u,G);else break;G=r(d)}}function k(L){if(S=!1,E(L),!b)if(r(u)!==null)b=!0,W(P);else{var G=r(d);G!==null&&V(k,G.startTime-L)}}function P(L,G){b=!1,S&&(S=!1,C(N),N=-1),v=!0;var q=g;try{for(E(G),p=r(u);p!==null&&(!(p.expirationTime>G)||L&&!D());){var A=p.callback;if(typeof A=="function"){p.callback=null,g=p.priorityLevel;var U=A(p.expirationTime<=G);G=e.unstable_now(),typeof U=="function"?p.callback=U:p===r(u)&&n(u),E(G)}else n(u);p=r(u)}if(p!==null)var Y=!0;else{var Z=r(d);Z!==null&&V(k,Z.startTime-G),Y=!1}return Y}finally{p=null,g=q,v=!1}}var T=!1,O=null,N=-1,I=5,z=-1;function D(){return!(e.unstable_now()-z<I)}function M(){if(O!==null){var L=e.unstable_now();z=L;var G=!0;try{G=O(!0,L)}finally{G?j():(T=!1,O=null)}}else T=!1}var j;if(typeof x=="function")j=function(){x(M)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,F=B.port2;B.port1.onmessage=M,j=function(){F.postMessage(null)}}else j=function(){_(M,0)};function W(L){O=L,T||(T=!0,j())}function V(L,G){N=_(function(){L(e.unstable_now())},G)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_continueExecution=function(){b||v||(b=!0,W(P))},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return r(u)},e.unstable_next=function(L){switch(g){case 1:case 2:case 3:var G=3;break;default:G=g}var q=g;g=G;try{return L()}finally{g=q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(L,G){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var q=g;g=L;try{return G()}finally{g=q}},e.unstable_scheduleCallback=function(L,G,q){var A=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?A+q:A):q=A,L){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=q+U,L={id:f++,callback:G,priorityLevel:L,startTime:q,expirationTime:U,sortIndex:-1},q>A?(L.sortIndex=q,t(d,L),r(u)===null&&L===r(d)&&(S?(C(N),N=-1):S=!0,V(k,q-A))):(L.sortIndex=U,t(u,L),b||v||(b=!0,W(P))),L},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(L){var G=g;return function(){var q=g;g=G;try{return L.apply(this,arguments)}finally{g=q}}}})(Kp)),Kp}var HS;function X3(){return HS||(HS=1,qp.exports=G3()),qp.exports}/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var FS;function Y3(){if(FS)return wi;FS=1;var e=J0(),t=X3();function r(s){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+s,m=1;m<arguments.length;m++)l+="&args[]="+encodeURIComponent(arguments[m]);return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,i={};function o(s,l){a(s,l),a(s+"Capture",l)}function a(s,l){for(i[s]=l,s=0;s<l.length;s++)n.add(l[s])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,d=/^[: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]*$/,f={},p={};function g(s){return u.call(p,s)?!0:u.call(f,s)?!1:d.test(s)?p[s]=!0:(f[s]=!0,!1)}function v(s,l,m,y){if(m!==null&&m.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return y?!1:m!==null?!m.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function b(s,l,m,y){if(l===null||typeof l>"u"||v(s,l,m,y))return!0;if(y)return!1;if(m!==null)switch(m.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function S(s,l,m,y,w,R,H){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=y,this.attributeNamespace=w,this.mustUseProperty=m,this.propertyName=s,this.type=l,this.sanitizeURL=R,this.removeEmptyString=H}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){_[s]=new S(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var l=s[0];_[l]=new S(l,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){_[s]=new S(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){_[s]=new S(s,2,!1,s,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(s){_[s]=new S(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){_[s]=new S(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){_[s]=new S(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){_[s]=new S(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){_[s]=new S(s,5,!1,s.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function x(s){return s[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(s){var l=s.replace(C,x);_[l]=new S(l,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var l=s.replace(C,x);_[l]=new S(l,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var l=s.replace(C,x);_[l]=new S(l,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){_[s]=new S(s,1,!1,s.toLowerCase(),null,!1,!1)}),_.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){_[s]=new S(s,1,!1,s.toLowerCase(),null,!0,!0)});function E(s,l,m,y){var w=_.hasOwnProperty(l)?_[l]:null;(w!==null?w.type!==0:y||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(b(l,m,w,y)&&(m=null),y||w===null?g(l)&&(m===null?s.removeAttribute(l):s.setAttribute(l,""+m)):w.mustUseProperty?s[w.propertyName]=m===null?w.type===3?!1:"":m:(l=w.attributeName,y=w.attributeNamespace,m===null?s.removeAttribute(l):(w=w.type,m=w===3||w===4&&m===!0?"":""+m,y?s.setAttributeNS(y,l,m):s.setAttribute(l,m))))}var k=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,P=Symbol.for("react.element"),T=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),z=Symbol.for("react.provider"),D=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),V=Symbol.for("react.offscreen"),L=Symbol.iterator;function G(s){return s===null||typeof s!="object"?null:(s=L&&s[L]||s["@@iterator"],typeof s=="function"?s:null)}var q=Object.assign,A;function U(s){if(A===void 0)try{throw Error()}catch(m){var l=m.stack.trim().match(/\n( *(at )?)/);A=l&&l[1]||""}return`
34
+ `+A+s}var Y=!1;function Z(s,l){if(!s||Y)return"";Y=!0;var m=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(_e){var y=_e}Reflect.construct(s,[],l)}else{try{l.call()}catch(_e){y=_e}s.call(l.prototype)}else{try{throw Error()}catch(_e){y=_e}s()}}catch(_e){if(_e&&y&&typeof _e.stack=="string"){for(var w=_e.stack.split(`
35
+ `),R=y.stack.split(`
36
+ `),H=w.length-1,J=R.length-1;1<=H&&0<=J&&w[H]!==R[J];)J--;for(;1<=H&&0<=J;H--,J--)if(w[H]!==R[J]){if(H!==1||J!==1)do if(H--,J--,0>J||w[H]!==R[J]){var ie=`
37
+ `+w[H].replace(" at new "," at ");return s.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",s.displayName)),ie}while(1<=H&&0<=J);break}}}finally{Y=!1,Error.prepareStackTrace=m}return(s=s?s.displayName||s.name:"")?U(s):""}function te(s){switch(s.tag){case 5:return U(s.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return s=Z(s.type,!1),s;case 11:return s=Z(s.type.render,!1),s;case 1:return s=Z(s.type,!0),s;default:return""}}function ne(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case O:return"Fragment";case T:return"Portal";case I:return"Profiler";case N:return"StrictMode";case j:return"Suspense";case B:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case D:return(s.displayName||"Context")+".Consumer";case z:return(s._context.displayName||"Context")+".Provider";case M:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case F:return l=s.displayName||null,l!==null?l:ne(s.type)||"Memo";case W:l=s._payload,s=s._init;try{return ne(s(l))}catch{}}return null}function he(s){var l=s.type;switch(s.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=l.render,s=s.displayName||s.name||"",l.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ne(l);case 8:return l===N?"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 l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function me(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function ue(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Se(s){var l=ue(s)?"checked":"value",m=Object.getOwnPropertyDescriptor(s.constructor.prototype,l),y=""+s[l];if(!s.hasOwnProperty(l)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var w=m.get,R=m.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return w.call(this)},set:function(H){y=""+H,R.call(this,H)}}),Object.defineProperty(s,l,{enumerable:m.enumerable}),{getValue:function(){return y},setValue:function(H){y=""+H},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function ae(s){s._valueTracker||(s._valueTracker=Se(s))}function le(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var m=l.getValue(),y="";return s&&(y=ue(s)?s.checked?"true":"false":s.value),s=y,s!==m?(l.setValue(s),!0):!1}function ce(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function ye(s,l){var m=l.checked;return q({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:m??s._wrapperState.initialChecked})}function fe(s,l){var m=l.defaultValue==null?"":l.defaultValue,y=l.checked!=null?l.checked:l.defaultChecked;m=me(l.value!=null?l.value:m),s._wrapperState={initialChecked:y,initialValue:m,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function de(s,l){l=l.checked,l!=null&&E(s,"checked",l,!1)}function be(s,l){de(s,l);var m=me(l.value),y=l.type;if(m!=null)y==="number"?(m===0&&s.value===""||s.value!=m)&&(s.value=""+m):s.value!==""+m&&(s.value=""+m);else if(y==="submit"||y==="reset"){s.removeAttribute("value");return}l.hasOwnProperty("value")?Te(s,l.type,m):l.hasOwnProperty("defaultValue")&&Te(s,l.type,me(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(s.defaultChecked=!!l.defaultChecked)}function Ce(s,l,m){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var y=l.type;if(!(y!=="submit"&&y!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+s._wrapperState.initialValue,m||l===s.value||(s.value=l),s.defaultValue=l}m=s.name,m!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,m!==""&&(s.name=m)}function Te(s,l,m){(l!=="number"||ce(s.ownerDocument)!==s)&&(m==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+m&&(s.defaultValue=""+m))}var ze=Array.isArray;function Ee(s,l,m,y){if(s=s.options,l){l={};for(var w=0;w<m.length;w++)l["$"+m[w]]=!0;for(m=0;m<s.length;m++)w=l.hasOwnProperty("$"+s[m].value),s[m].selected!==w&&(s[m].selected=w),w&&y&&(s[m].defaultSelected=!0)}else{for(m=""+me(m),l=null,w=0;w<s.length;w++){if(s[w].value===m){s[w].selected=!0,y&&(s[w].defaultSelected=!0);return}l!==null||s[w].disabled||(l=s[w])}l!==null&&(l.selected=!0)}}function $e(s,l){if(l.dangerouslySetInnerHTML!=null)throw Error(r(91));return q({},l,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function je(s,l){var m=l.value;if(m==null){if(m=l.children,l=l.defaultValue,m!=null){if(l!=null)throw Error(r(92));if(ze(m)){if(1<m.length)throw Error(r(93));m=m[0]}l=m}l==null&&(l=""),m=l}s._wrapperState={initialValue:me(m)}}function Oe(s,l){var m=me(l.value),y=me(l.defaultValue);m!=null&&(m=""+m,m!==s.value&&(s.value=m),l.defaultValue==null&&s.defaultValue!==m&&(s.defaultValue=m)),y!=null&&(s.defaultValue=""+y)}function Qe(s){var l=s.textContent;l===s._wrapperState.initialValue&&l!==""&&l!==null&&(s.value=l)}function st(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Et(s,l){return s==null||s==="http://www.w3.org/1999/xhtml"?st(l):s==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var mt,Je=(function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,m,y,w){MSApp.execUnsafeLocalFunction(function(){return s(l,m,y,w)})}:s})(function(s,l){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=l;else{for(mt=mt||document.createElement("div"),mt.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=mt.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;l.firstChild;)s.appendChild(l.firstChild)}});function ht(s,l){if(l){var m=s.firstChild;if(m&&m===s.lastChild&&m.nodeType===3){m.nodeValue=l;return}}s.textContent=l}var Xe={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},vt=["Webkit","ms","Moz","O"];Object.keys(Xe).forEach(function(s){vt.forEach(function(l){l=l+s.charAt(0).toUpperCase()+s.substring(1),Xe[l]=Xe[s]})});function tt(s,l,m){return l==null||typeof l=="boolean"||l===""?"":m||typeof l!="number"||l===0||Xe.hasOwnProperty(s)&&Xe[s]?(""+l).trim():l+"px"}function Le(s,l){s=s.style;for(var m in l)if(l.hasOwnProperty(m)){var y=m.indexOf("--")===0,w=tt(m,l[m],y);m==="float"&&(m="cssFloat"),y?s.setProperty(m,w):s[m]=w}}var nt=q({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 Me(s,l){if(l){if(nt[s]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,s));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function qe(s,l){if(s.indexOf("-")===-1)return typeof l.is=="string";switch(s){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 Ot=null;function _t(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var tr=null,Yt=null,vr=null;function Tr(s){if(s=vc(s)){if(typeof tr!="function")throw Error(r(280));var l=s.stateNode;l&&(l=hd(l),tr(s.stateNode,s.type,l))}}function nr(s){Yt?vr?vr.push(s):vr=[s]:Yt=s}function At(){if(Yt){var s=Yt,l=vr;if(vr=Yt=null,Tr(s),l)for(s=0;s<l.length;s++)Tr(l[s])}}function kt(s,l){return s(l)}function ir(){}var Gt=!1;function it(s,l,m){if(Gt)return s(l,m);Gt=!0;try{return kt(s,l,m)}finally{Gt=!1,(Yt!==null||vr!==null)&&(ir(),At())}}function xt(s,l){var m=s.stateNode;if(m===null)return null;var y=hd(m);if(y===null)return null;m=y[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(s=s.type,y=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!y;break e;default:s=!1}if(s)return null;if(m&&typeof m!="function")throw Error(r(231,l,typeof m));return m}var ft=!1;if(c)try{var Ie={};Object.defineProperty(Ie,"passive",{get:function(){ft=!0}}),window.addEventListener("test",Ie,Ie),window.removeEventListener("test",Ie,Ie)}catch{ft=!1}function ke(s,l,m,y,w,R,H,J,ie){var _e=Array.prototype.slice.call(arguments,3);try{l.apply(m,_e)}catch(Be){this.onError(Be)}}var xe=!1,De=null,et=!1,rt=null,Ht={onError:function(s){xe=!0,De=s}};function qt(s,l,m,y,w,R,H,J,ie){xe=!1,De=null,ke.apply(Ht,arguments)}function jt(s,l,m,y,w,R,H,J,ie){if(qt.apply(this,arguments),xe){if(xe){var _e=De;xe=!1,De=null}else throw Error(r(198));et||(et=!0,rt=_e)}}function Lt(s){var l=s,m=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(m=l.return),s=l.return;while(s)}return l.tag===3?m:null}function kr(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function wr(s){if(Lt(s)!==s)throw Error(r(188))}function Pr(s){var l=s.alternate;if(!l){if(l=Lt(s),l===null)throw Error(r(188));return l!==s?null:s}for(var m=s,y=l;;){var w=m.return;if(w===null)break;var R=w.alternate;if(R===null){if(y=w.return,y!==null){m=y;continue}break}if(w.child===R.child){for(R=w.child;R;){if(R===m)return wr(w),s;if(R===y)return wr(w),l;R=R.sibling}throw Error(r(188))}if(m.return!==y.return)m=w,y=R;else{for(var H=!1,J=w.child;J;){if(J===m){H=!0,m=w,y=R;break}if(J===y){H=!0,y=w,m=R;break}J=J.sibling}if(!H){for(J=R.child;J;){if(J===m){H=!0,m=R,y=w;break}if(J===y){H=!0,y=R,m=w;break}J=J.sibling}if(!H)throw Error(r(189))}}if(m.alternate!==y)throw Error(r(190))}if(m.tag!==3)throw Error(r(188));return m.stateNode.current===m?s:l}function Lr(s){return s=Pr(s),s!==null?sr(s):null}function sr(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var l=sr(s);if(l!==null)return l;s=s.sibling}return null}var dr=t.unstable_scheduleCallback,He=t.unstable_cancelCallback,Ye=t.unstable_shouldYield,Tt=t.unstable_requestPaint,pt=t.unstable_now,at=t.unstable_getCurrentPriorityLevel,Ze=t.unstable_ImmediatePriority,Rt=t.unstable_UserBlockingPriority,Kt=t.unstable_NormalPriority,Ke=t.unstable_LowPriority,gt=t.unstable_IdlePriority,It=null,fr=null;function rn(s){if(fr&&typeof fr.onCommitFiberRoot=="function")try{fr.onCommitFiberRoot(It,s,void 0,(s.current.flags&128)===128)}catch{}}var zr=Math.clz32?Math.clz32:Kn,qn=Math.log,vn=Math.LN2;function Kn(s){return s>>>=0,s===0?32:31-(qn(s)/vn|0)|0}var yn=64,Ln=4194304;function Gn(s){switch(s&-s){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 s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function lr(s,l){var m=s.pendingLanes;if(m===0)return 0;var y=0,w=s.suspendedLanes,R=s.pingedLanes,H=m&268435455;if(H!==0){var J=H&~w;J!==0?y=Gn(J):(R&=H,R!==0&&(y=Gn(R)))}else H=m&~w,H!==0?y=Gn(H):R!==0&&(y=Gn(R));if(y===0)return 0;if(l!==0&&l!==y&&(l&w)===0&&(w=y&-y,R=l&-l,w>=R||w===16&&(R&4194240)!==0))return l;if((y&4)!==0&&(y|=m&16),l=s.entangledLanes,l!==0)for(s=s.entanglements,l&=y;0<l;)m=31-zr(l),w=1<<m,y|=s[m],l&=~w;return y}function ct(s,l){switch(s){case 1:case 2:case 4:return l+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ot(s,l){for(var m=s.suspendedLanes,y=s.pingedLanes,w=s.expirationTimes,R=s.pendingLanes;0<R;){var H=31-zr(R),J=1<<H,ie=w[H];ie===-1?((J&m)===0||(J&y)!==0)&&(w[H]=ct(J,l)):ie<=l&&(s.expiredLanes|=J),R&=~J}}function or(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function cr(){var s=yn;return yn<<=1,(yn&4194240)===0&&(yn=64),s}function yr(s){for(var l=[],m=0;31>m;m++)l.push(s);return l}function Sr(s,l,m){s.pendingLanes|=l,l!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,l=31-zr(l),s[l]=m}function Dn(s,l){var m=s.pendingLanes&~l;s.pendingLanes=l,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=l,s.mutableReadLanes&=l,s.entangledLanes&=l,l=s.entanglements;var y=s.eventTimes;for(s=s.expirationTimes;0<m;){var w=31-zr(m),R=1<<w;l[w]=0,y[w]=-1,s[w]=-1,m&=~R}}function nn(s,l){var m=s.entangledLanes|=l;for(s=s.entanglements;m;){var y=31-zr(m),w=1<<y;w&l|s[y]&l&&(s[y]|=l),m&=~w}}var Vt=0;function bn(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var $n,gi,kn,gs,Aa,Ha=!1,Yo=[],Ur=null,Xn=null,oi=null,vi=new Map,Wi=new Map,Ri=[],Fa="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Wa(s,l){switch(s){case"focusin":case"focusout":Ur=null;break;case"dragenter":case"dragleave":Xn=null;break;case"mouseover":case"mouseout":oi=null;break;case"pointerover":case"pointerout":vi.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Wi.delete(l.pointerId)}}function ut(s,l,m,y,w,R){return s===null||s.nativeEvent!==R?(s={blockedOn:l,domEventName:m,eventSystemFlags:y,nativeEvent:R,targetContainers:[w]},l!==null&&(l=vc(l),l!==null&&gi(l)),s):(s.eventSystemFlags|=y,l=s.targetContainers,w!==null&&l.indexOf(w)===-1&&l.push(w),s)}function Dt(s,l,m,y,w){switch(l){case"focusin":return Ur=ut(Ur,s,l,m,y,w),!0;case"dragenter":return Xn=ut(Xn,s,l,m,y,w),!0;case"mouseover":return oi=ut(oi,s,l,m,y,w),!0;case"pointerover":var R=w.pointerId;return vi.set(R,ut(vi.get(R)||null,s,l,m,y,w)),!0;case"gotpointercapture":return R=w.pointerId,Wi.set(R,ut(Wi.get(R)||null,s,l,m,y,w)),!0}return!1}function Nr(s){var l=Zs(s.target);if(l!==null){var m=Lt(l);if(m!==null){if(l=m.tag,l===13){if(l=kr(m),l!==null){s.blockedOn=l,Aa(s.priority,function(){kn(m)});return}}else if(l===3&&m.stateNode.current.memoizedState.isDehydrated){s.blockedOn=m.tag===3?m.stateNode.containerInfo:null;return}}}s.blockedOn=null}function jr(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var m=gm(s.domEventName,s.eventSystemFlags,l[0],s.nativeEvent);if(m===null){m=s.nativeEvent;var y=new m.constructor(m.type,m);Ot=y,m.target.dispatchEvent(y),Ot=null}else return l=vc(m),l!==null&&gi(l),s.blockedOn=m,!1;l.shift()}return!0}function Mr(s,l,m){jr(s)&&m.delete(l)}function Va(){Ha=!1,Ur!==null&&jr(Ur)&&(Ur=null),Xn!==null&&jr(Xn)&&(Xn=null),oi!==null&&jr(oi)&&(oi=null),vi.forEach(Mr),Wi.forEach(Mr)}function Jo(s,l){s.blockedOn===l&&(s.blockedOn=null,Ha||(Ha=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Va)))}function vs(s){function l(w){return Jo(w,s)}if(0<Yo.length){Jo(Yo[0],s);for(var m=1;m<Yo.length;m++){var y=Yo[m];y.blockedOn===s&&(y.blockedOn=null)}}for(Ur!==null&&Jo(Ur,s),Xn!==null&&Jo(Xn,s),oi!==null&&Jo(oi,s),vi.forEach(l),Wi.forEach(l),m=0;m<Ri.length;m++)y=Ri[m],y.blockedOn===s&&(y.blockedOn=null);for(;0<Ri.length&&(m=Ri[0],m.blockedOn===null);)Nr(m),m.blockedOn===null&&Ri.shift()}var uo=k.ReactCurrentBatchConfig,Zu=!0;function mR(s,l,m,y){var w=Vt,R=uo.transition;uo.transition=null;try{Vt=1,pm(s,l,m,y)}finally{Vt=w,uo.transition=R}}function pR(s,l,m,y){var w=Vt,R=uo.transition;uo.transition=null;try{Vt=4,pm(s,l,m,y)}finally{Vt=w,uo.transition=R}}function pm(s,l,m,y){if(Zu){var w=gm(s,l,m,y);if(w===null)Nm(s,l,y,ed,m),Wa(s,y);else if(Dt(w,s,l,m,y))y.stopPropagation();else if(Wa(s,y),l&4&&-1<Fa.indexOf(s)){for(;w!==null;){var R=vc(w);if(R!==null&&$n(R),R=gm(s,l,m,y),R===null&&Nm(s,l,y,ed,m),R===w)break;w=R}w!==null&&y.stopPropagation()}else Nm(s,l,y,null,m)}}var ed=null;function gm(s,l,m,y){if(ed=null,s=_t(y),s=Zs(s),s!==null)if(l=Lt(s),l===null)s=null;else if(m=l.tag,m===13){if(s=kr(l),s!==null)return s;s=null}else if(m===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null);return ed=s,null}function Cb(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(at()){case Ze:return 1;case Rt:return 4;case Kt:case Ke:return 16;case gt:return 536870912;default:return 16}default:return 16}}var ys=null,vm=null,td=null;function wb(){if(td)return td;var s,l=vm,m=l.length,y,w="value"in ys?ys.value:ys.textContent,R=w.length;for(s=0;s<m&&l[s]===w[s];s++);var H=m-s;for(y=1;y<=H&&l[m-y]===w[R-y];y++);return td=w.slice(s,1<y?1-y:void 0)}function rd(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function nd(){return!0}function xb(){return!1}function Ti(s){function l(m,y,w,R,H){this._reactName=m,this._targetInst=w,this.type=y,this.nativeEvent=R,this.target=H,this.currentTarget=null;for(var J in s)s.hasOwnProperty(J)&&(m=s[J],this[J]=m?m(R):R[J]);return this.isDefaultPrevented=(R.defaultPrevented!=null?R.defaultPrevented:R.returnValue===!1)?nd:xb,this.isPropagationStopped=xb,this}return q(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var m=this.nativeEvent;m&&(m.preventDefault?m.preventDefault():typeof m.returnValue!="unknown"&&(m.returnValue=!1),this.isDefaultPrevented=nd)},stopPropagation:function(){var m=this.nativeEvent;m&&(m.stopPropagation?m.stopPropagation():typeof m.cancelBubble!="unknown"&&(m.cancelBubble=!0),this.isPropagationStopped=nd)},persist:function(){},isPersistent:nd}),l}var Ua={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ym=Ti(Ua),sc=q({},Ua,{view:0,detail:0}),gR=Ti(sc),bm,_m,ac,id=q({},sc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cm,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==ac&&(ac&&s.type==="mousemove"?(bm=s.screenX-ac.screenX,_m=s.screenY-ac.screenY):_m=bm=0,ac=s),bm)},movementY:function(s){return"movementY"in s?s.movementY:_m}}),Eb=Ti(id),vR=q({},id,{dataTransfer:0}),yR=Ti(vR),bR=q({},sc,{relatedTarget:0}),Sm=Ti(bR),_R=q({},Ua,{animationName:0,elapsedTime:0,pseudoElement:0}),SR=Ti(_R),CR=q({},Ua,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),wR=Ti(CR),xR=q({},Ua,{data:0}),$b=Ti(xR),ER={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$R={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},kR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function RR(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=kR[s])?!!l[s]:!1}function Cm(){return RR}var TR=q({},sc,{key:function(s){if(s.key){var l=ER[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=rd(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?$R[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cm,charCode:function(s){return s.type==="keypress"?rd(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?rd(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),PR=Ti(TR),OR=q({},id,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kb=Ti(OR),IR=q({},sc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cm}),NR=Ti(IR),MR=q({},Ua,{propertyName:0,elapsedTime:0,pseudoElement:0}),zR=Ti(MR),jR=q({},id,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),BR=Ti(jR),LR=[9,13,27,32],wm=c&&"CompositionEvent"in window,lc=null;c&&"documentMode"in document&&(lc=document.documentMode);var DR=c&&"TextEvent"in window&&!lc,Rb=c&&(!wm||lc&&8<lc&&11>=lc),Tb=" ",Pb=!1;function Ob(s,l){switch(s){case"keyup":return LR.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ib(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var qa=!1;function AR(s,l){switch(s){case"compositionend":return Ib(l);case"keypress":return l.which!==32?null:(Pb=!0,Tb);case"textInput":return s=l.data,s===Tb&&Pb?null:s;default:return null}}function HR(s,l){if(qa)return s==="compositionend"||!wm&&Ob(s,l)?(s=wb(),td=vm=ys=null,qa=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return Rb&&l.locale!=="ko"?null:l.data;default:return null}}var FR={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Nb(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!FR[s.type]:l==="textarea"}function Mb(s,l,m,y){nr(y),l=cd(l,"onChange"),0<l.length&&(m=new ym("onChange","change",null,m,y),s.push({event:m,listeners:l}))}var cc=null,uc=null;function WR(s){Qb(s,0)}function od(s){var l=Ja(s);if(le(l))return s}function VR(s,l){if(s==="change")return l}var zb=!1;if(c){var xm;if(c){var Em="oninput"in document;if(!Em){var jb=document.createElement("div");jb.setAttribute("oninput","return;"),Em=typeof jb.oninput=="function"}xm=Em}else xm=!1;zb=xm&&(!document.documentMode||9<document.documentMode)}function Bb(){cc&&(cc.detachEvent("onpropertychange",Lb),uc=cc=null)}function Lb(s){if(s.propertyName==="value"&&od(uc)){var l=[];Mb(l,uc,s,_t(s)),it(WR,l)}}function UR(s,l,m){s==="focusin"?(Bb(),cc=l,uc=m,cc.attachEvent("onpropertychange",Lb)):s==="focusout"&&Bb()}function qR(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return od(uc)}function KR(s,l){if(s==="click")return od(l)}function GR(s,l){if(s==="input"||s==="change")return od(l)}function XR(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var ho=typeof Object.is=="function"?Object.is:XR;function dc(s,l){if(ho(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var m=Object.keys(s),y=Object.keys(l);if(m.length!==y.length)return!1;for(y=0;y<m.length;y++){var w=m[y];if(!u.call(l,w)||!ho(s[w],l[w]))return!1}return!0}function Db(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Ab(s,l){var m=Db(s);s=0;for(var y;m;){if(m.nodeType===3){if(y=s+m.textContent.length,s<=l&&y>=l)return{node:m,offset:l-s};s=y}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=Db(m)}}function Hb(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?Hb(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function Fb(){for(var s=window,l=ce();l instanceof s.HTMLIFrameElement;){try{var m=typeof l.contentWindow.location.href=="string"}catch{m=!1}if(m)s=l.contentWindow;else break;l=ce(s.document)}return l}function $m(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}function YR(s){var l=Fb(),m=s.focusedElem,y=s.selectionRange;if(l!==m&&m&&m.ownerDocument&&Hb(m.ownerDocument.documentElement,m)){if(y!==null&&$m(m)){if(l=y.start,s=y.end,s===void 0&&(s=l),"selectionStart"in m)m.selectionStart=l,m.selectionEnd=Math.min(s,m.value.length);else if(s=(l=m.ownerDocument||document)&&l.defaultView||window,s.getSelection){s=s.getSelection();var w=m.textContent.length,R=Math.min(y.start,w);y=y.end===void 0?R:Math.min(y.end,w),!s.extend&&R>y&&(w=y,y=R,R=w),w=Ab(m,R);var H=Ab(m,y);w&&H&&(s.rangeCount!==1||s.anchorNode!==w.node||s.anchorOffset!==w.offset||s.focusNode!==H.node||s.focusOffset!==H.offset)&&(l=l.createRange(),l.setStart(w.node,w.offset),s.removeAllRanges(),R>y?(s.addRange(l),s.extend(H.node,H.offset)):(l.setEnd(H.node,H.offset),s.addRange(l)))}}for(l=[],s=m;s=s.parentNode;)s.nodeType===1&&l.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<l.length;m++)s=l[m],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var JR=c&&"documentMode"in document&&11>=document.documentMode,Ka=null,km=null,hc=null,Rm=!1;function Wb(s,l,m){var y=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;Rm||Ka==null||Ka!==ce(y)||(y=Ka,"selectionStart"in y&&$m(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),hc&&dc(hc,y)||(hc=y,y=cd(km,"onSelect"),0<y.length&&(l=new ym("onSelect","select",null,l,m),s.push({event:l,listeners:y}),l.target=Ka)))}function sd(s,l){var m={};return m[s.toLowerCase()]=l.toLowerCase(),m["Webkit"+s]="webkit"+l,m["Moz"+s]="moz"+l,m}var Ga={animationend:sd("Animation","AnimationEnd"),animationiteration:sd("Animation","AnimationIteration"),animationstart:sd("Animation","AnimationStart"),transitionend:sd("Transition","TransitionEnd")},Tm={},Vb={};c&&(Vb=document.createElement("div").style,"AnimationEvent"in window||(delete Ga.animationend.animation,delete Ga.animationiteration.animation,delete Ga.animationstart.animation),"TransitionEvent"in window||delete Ga.transitionend.transition);function ad(s){if(Tm[s])return Tm[s];if(!Ga[s])return s;var l=Ga[s],m;for(m in l)if(l.hasOwnProperty(m)&&m in Vb)return Tm[s]=l[m];return s}var Ub=ad("animationend"),qb=ad("animationiteration"),Kb=ad("animationstart"),Gb=ad("transitionend"),Xb=new Map,Yb="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function bs(s,l){Xb.set(s,l),o(l,[s])}for(var Pm=0;Pm<Yb.length;Pm++){var Om=Yb[Pm],QR=Om.toLowerCase(),ZR=Om[0].toUpperCase()+Om.slice(1);bs(QR,"on"+ZR)}bs(Ub,"onAnimationEnd"),bs(qb,"onAnimationIteration"),bs(Kb,"onAnimationStart"),bs("dblclick","onDoubleClick"),bs("focusin","onFocus"),bs("focusout","onBlur"),bs(Gb,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),e3=new Set("cancel close invalid load scroll toggle".split(" ").concat(fc));function Jb(s,l,m){var y=s.type||"unknown-event";s.currentTarget=m,jt(y,l,void 0,s),s.currentTarget=null}function Qb(s,l){l=(l&4)!==0;for(var m=0;m<s.length;m++){var y=s[m],w=y.event;y=y.listeners;e:{var R=void 0;if(l)for(var H=y.length-1;0<=H;H--){var J=y[H],ie=J.instance,_e=J.currentTarget;if(J=J.listener,ie!==R&&w.isPropagationStopped())break e;Jb(w,J,_e),R=ie}else for(H=0;H<y.length;H++){if(J=y[H],ie=J.instance,_e=J.currentTarget,J=J.listener,ie!==R&&w.isPropagationStopped())break e;Jb(w,J,_e),R=ie}}}if(et)throw s=rt,et=!1,rt=null,s}function Dr(s,l){var m=l[Dm];m===void 0&&(m=l[Dm]=new Set);var y=s+"__bubble";m.has(y)||(Zb(l,s,2,!1),m.add(y))}function Im(s,l,m){var y=0;l&&(y|=4),Zb(m,s,y,l)}var ld="_reactListening"+Math.random().toString(36).slice(2);function mc(s){if(!s[ld]){s[ld]=!0,n.forEach(function(m){m!=="selectionchange"&&(e3.has(m)||Im(m,!1,s),Im(m,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[ld]||(l[ld]=!0,Im("selectionchange",!1,l))}}function Zb(s,l,m,y){switch(Cb(l)){case 1:var w=mR;break;case 4:w=pR;break;default:w=pm}m=w.bind(null,l,m,s),w=void 0,!ft||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(w=!0),y?w!==void 0?s.addEventListener(l,m,{capture:!0,passive:w}):s.addEventListener(l,m,!0):w!==void 0?s.addEventListener(l,m,{passive:w}):s.addEventListener(l,m,!1)}function Nm(s,l,m,y,w){var R=y;if((l&1)===0&&(l&2)===0&&y!==null)e:for(;;){if(y===null)return;var H=y.tag;if(H===3||H===4){var J=y.stateNode.containerInfo;if(J===w||J.nodeType===8&&J.parentNode===w)break;if(H===4)for(H=y.return;H!==null;){var ie=H.tag;if((ie===3||ie===4)&&(ie=H.stateNode.containerInfo,ie===w||ie.nodeType===8&&ie.parentNode===w))return;H=H.return}for(;J!==null;){if(H=Zs(J),H===null)return;if(ie=H.tag,ie===5||ie===6){y=R=H;continue e}J=J.parentNode}}y=y.return}it(function(){var _e=R,Be=_t(m),Fe=[];e:{var Ne=Xb.get(s);if(Ne!==void 0){var dt=ym,St=s;switch(s){case"keypress":if(rd(m)===0)break e;case"keydown":case"keyup":dt=PR;break;case"focusin":St="focus",dt=Sm;break;case"focusout":St="blur",dt=Sm;break;case"beforeblur":case"afterblur":dt=Sm;break;case"click":if(m.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":dt=Eb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":dt=yR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":dt=NR;break;case Ub:case qb:case Kb:dt=SR;break;case Gb:dt=zR;break;case"scroll":dt=gR;break;case"wheel":dt=BR;break;case"copy":case"cut":case"paste":dt=wR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":dt=kb}var Ct=(l&4)!==0,on=!Ct&&s==="scroll",pe=Ct?Ne!==null?Ne+"Capture":null:Ne;Ct=[];for(var oe=_e,ve;oe!==null;){ve=oe;var Ve=ve.stateNode;if(ve.tag===5&&Ve!==null&&(ve=Ve,pe!==null&&(Ve=xt(oe,pe),Ve!=null&&Ct.push(pc(oe,Ve,ve)))),on)break;oe=oe.return}0<Ct.length&&(Ne=new dt(Ne,St,null,m,Be),Fe.push({event:Ne,listeners:Ct}))}}if((l&7)===0){e:{if(Ne=s==="mouseover"||s==="pointerover",dt=s==="mouseout"||s==="pointerout",Ne&&m!==Ot&&(St=m.relatedTarget||m.fromElement)&&(Zs(St)||St[Qo]))break e;if((dt||Ne)&&(Ne=Be.window===Be?Be:(Ne=Be.ownerDocument)?Ne.defaultView||Ne.parentWindow:window,dt?(St=m.relatedTarget||m.toElement,dt=_e,St=St?Zs(St):null,St!==null&&(on=Lt(St),St!==on||St.tag!==5&&St.tag!==6)&&(St=null)):(dt=null,St=_e),dt!==St)){if(Ct=Eb,Ve="onMouseLeave",pe="onMouseEnter",oe="mouse",(s==="pointerout"||s==="pointerover")&&(Ct=kb,Ve="onPointerLeave",pe="onPointerEnter",oe="pointer"),on=dt==null?Ne:Ja(dt),ve=St==null?Ne:Ja(St),Ne=new Ct(Ve,oe+"leave",dt,m,Be),Ne.target=on,Ne.relatedTarget=ve,Ve=null,Zs(Be)===_e&&(Ct=new Ct(pe,oe+"enter",St,m,Be),Ct.target=ve,Ct.relatedTarget=on,Ve=Ct),on=Ve,dt&&St)t:{for(Ct=dt,pe=St,oe=0,ve=Ct;ve;ve=Xa(ve))oe++;for(ve=0,Ve=pe;Ve;Ve=Xa(Ve))ve++;for(;0<oe-ve;)Ct=Xa(Ct),oe--;for(;0<ve-oe;)pe=Xa(pe),ve--;for(;oe--;){if(Ct===pe||pe!==null&&Ct===pe.alternate)break t;Ct=Xa(Ct),pe=Xa(pe)}Ct=null}else Ct=null;dt!==null&&e_(Fe,Ne,dt,Ct,!1),St!==null&&on!==null&&e_(Fe,on,St,Ct,!0)}}e:{if(Ne=_e?Ja(_e):window,dt=Ne.nodeName&&Ne.nodeName.toLowerCase(),dt==="select"||dt==="input"&&Ne.type==="file")var wt=VR;else if(Nb(Ne))if(zb)wt=GR;else{wt=qR;var Nt=UR}else(dt=Ne.nodeName)&&dt.toLowerCase()==="input"&&(Ne.type==="checkbox"||Ne.type==="radio")&&(wt=KR);if(wt&&(wt=wt(s,_e))){Mb(Fe,wt,m,Be);break e}Nt&&Nt(s,Ne,_e),s==="focusout"&&(Nt=Ne._wrapperState)&&Nt.controlled&&Ne.type==="number"&&Te(Ne,"number",Ne.value)}switch(Nt=_e?Ja(_e):window,s){case"focusin":(Nb(Nt)||Nt.contentEditable==="true")&&(Ka=Nt,km=_e,hc=null);break;case"focusout":hc=km=Ka=null;break;case"mousedown":Rm=!0;break;case"contextmenu":case"mouseup":case"dragend":Rm=!1,Wb(Fe,m,Be);break;case"selectionchange":if(JR)break;case"keydown":case"keyup":Wb(Fe,m,Be)}var Mt;if(wm)e:{switch(s){case"compositionstart":var Ft="onCompositionStart";break e;case"compositionend":Ft="onCompositionEnd";break e;case"compositionupdate":Ft="onCompositionUpdate";break e}Ft=void 0}else qa?Ob(s,m)&&(Ft="onCompositionEnd"):s==="keydown"&&m.keyCode===229&&(Ft="onCompositionStart");Ft&&(Rb&&m.locale!=="ko"&&(qa||Ft!=="onCompositionStart"?Ft==="onCompositionEnd"&&qa&&(Mt=wb()):(ys=Be,vm="value"in ys?ys.value:ys.textContent,qa=!0)),Nt=cd(_e,Ft),0<Nt.length&&(Ft=new $b(Ft,s,null,m,Be),Fe.push({event:Ft,listeners:Nt}),Mt?Ft.data=Mt:(Mt=Ib(m),Mt!==null&&(Ft.data=Mt)))),(Mt=DR?AR(s,m):HR(s,m))&&(_e=cd(_e,"onBeforeInput"),0<_e.length&&(Be=new $b("onBeforeInput","beforeinput",null,m,Be),Fe.push({event:Be,listeners:_e}),Be.data=Mt))}Qb(Fe,l)})}function pc(s,l,m){return{instance:s,listener:l,currentTarget:m}}function cd(s,l){for(var m=l+"Capture",y=[];s!==null;){var w=s,R=w.stateNode;w.tag===5&&R!==null&&(w=R,R=xt(s,m),R!=null&&y.unshift(pc(s,R,w)),R=xt(s,l),R!=null&&y.push(pc(s,R,w))),s=s.return}return y}function Xa(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function e_(s,l,m,y,w){for(var R=l._reactName,H=[];m!==null&&m!==y;){var J=m,ie=J.alternate,_e=J.stateNode;if(ie!==null&&ie===y)break;J.tag===5&&_e!==null&&(J=_e,w?(ie=xt(m,R),ie!=null&&H.unshift(pc(m,ie,J))):w||(ie=xt(m,R),ie!=null&&H.push(pc(m,ie,J)))),m=m.return}H.length!==0&&s.push({event:l,listeners:H})}var t3=/\r\n?/g,r3=/\u0000|\uFFFD/g;function t_(s){return(typeof s=="string"?s:""+s).replace(t3,`
38
+ `).replace(r3,"")}function ud(s,l,m){if(l=t_(l),t_(s)!==l&&m)throw Error(r(425))}function dd(){}var Mm=null,zm=null;function jm(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Bm=typeof setTimeout=="function"?setTimeout:void 0,n3=typeof clearTimeout=="function"?clearTimeout:void 0,r_=typeof Promise=="function"?Promise:void 0,i3=typeof queueMicrotask=="function"?queueMicrotask:typeof r_<"u"?function(s){return r_.resolve(null).then(s).catch(o3)}:Bm;function o3(s){setTimeout(function(){throw s})}function Lm(s,l){var m=l,y=0;do{var w=m.nextSibling;if(s.removeChild(m),w&&w.nodeType===8)if(m=w.data,m==="/$"){if(y===0){s.removeChild(w),vs(l);return}y--}else m!=="$"&&m!=="$?"&&m!=="$!"||y++;m=w}while(m);vs(l)}function _s(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return s}function n_(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var m=s.data;if(m==="$"||m==="$!"||m==="$?"){if(l===0)return s;l--}else m==="/$"&&l++}s=s.previousSibling}return null}var Ya=Math.random().toString(36).slice(2),Ro="__reactFiber$"+Ya,gc="__reactProps$"+Ya,Qo="__reactContainer$"+Ya,Dm="__reactEvents$"+Ya,s3="__reactListeners$"+Ya,a3="__reactHandles$"+Ya;function Zs(s){var l=s[Ro];if(l)return l;for(var m=s.parentNode;m;){if(l=m[Qo]||m[Ro]){if(m=l.alternate,l.child!==null||m!==null&&m.child!==null)for(s=n_(s);s!==null;){if(m=s[Ro])return m;s=n_(s)}return l}s=m,m=s.parentNode}return null}function vc(s){return s=s[Ro]||s[Qo],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function Ja(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(r(33))}function hd(s){return s[gc]||null}var Am=[],Qa=-1;function Ss(s){return{current:s}}function Ar(s){0>Qa||(s.current=Am[Qa],Am[Qa]=null,Qa--)}function Br(s,l){Qa++,Am[Qa]=s.current,s.current=l}var Cs={},Yn=Ss(Cs),yi=Ss(!1),ea=Cs;function Za(s,l){var m=s.type.contextTypes;if(!m)return Cs;var y=s.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===l)return y.__reactInternalMemoizedMaskedChildContext;var w={},R;for(R in m)w[R]=l[R];return y&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=l,s.__reactInternalMemoizedMaskedChildContext=w),w}function bi(s){return s=s.childContextTypes,s!=null}function fd(){Ar(yi),Ar(Yn)}function i_(s,l,m){if(Yn.current!==Cs)throw Error(r(168));Br(Yn,l),Br(yi,m)}function o_(s,l,m){var y=s.stateNode;if(l=l.childContextTypes,typeof y.getChildContext!="function")return m;y=y.getChildContext();for(var w in y)if(!(w in l))throw Error(r(108,he(s)||"Unknown",w));return q({},m,y)}function md(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Cs,ea=Yn.current,Br(Yn,s),Br(yi,yi.current),!0}function s_(s,l,m){var y=s.stateNode;if(!y)throw Error(r(169));m?(s=o_(s,l,ea),y.__reactInternalMemoizedMergedChildContext=s,Ar(yi),Ar(Yn),Br(Yn,s)):Ar(yi),Br(yi,m)}var Zo=null,pd=!1,Hm=!1;function a_(s){Zo===null?Zo=[s]:Zo.push(s)}function l3(s){pd=!0,a_(s)}function ws(){if(!Hm&&Zo!==null){Hm=!0;var s=0,l=Vt;try{var m=Zo;for(Vt=1;s<m.length;s++){var y=m[s];do y=y(!0);while(y!==null)}Zo=null,pd=!1}catch(w){throw Zo!==null&&(Zo=Zo.slice(s+1)),dr(Ze,ws),w}finally{Vt=l,Hm=!1}}return null}var el=[],tl=0,gd=null,vd=0,Vi=[],Ui=0,ta=null,es=1,ts="";function ra(s,l){el[tl++]=vd,el[tl++]=gd,gd=s,vd=l}function l_(s,l,m){Vi[Ui++]=es,Vi[Ui++]=ts,Vi[Ui++]=ta,ta=s;var y=es;s=ts;var w=32-zr(y)-1;y&=~(1<<w),m+=1;var R=32-zr(l)+w;if(30<R){var H=w-w%5;R=(y&(1<<H)-1).toString(32),y>>=H,w-=H,es=1<<32-zr(l)+w|m<<w|y,ts=R+s}else es=1<<R|m<<w|y,ts=s}function Fm(s){s.return!==null&&(ra(s,1),l_(s,1,0))}function Wm(s){for(;s===gd;)gd=el[--tl],el[tl]=null,vd=el[--tl],el[tl]=null;for(;s===ta;)ta=Vi[--Ui],Vi[Ui]=null,ts=Vi[--Ui],Vi[Ui]=null,es=Vi[--Ui],Vi[Ui]=null}var Pi=null,Oi=null,Wr=!1,fo=null;function c_(s,l){var m=Xi(5,null,null,0);m.elementType="DELETED",m.stateNode=l,m.return=s,l=s.deletions,l===null?(s.deletions=[m],s.flags|=16):l.push(m)}function u_(s,l){switch(s.tag){case 5:var m=s.type;return l=l.nodeType!==1||m.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(s.stateNode=l,Pi=s,Oi=_s(l.firstChild),!0):!1;case 6:return l=s.pendingProps===""||l.nodeType!==3?null:l,l!==null?(s.stateNode=l,Pi=s,Oi=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(m=ta!==null?{id:es,overflow:ts}:null,s.memoizedState={dehydrated:l,treeContext:m,retryLane:1073741824},m=Xi(18,null,null,0),m.stateNode=l,m.return=s,s.child=m,Pi=s,Oi=null,!0):!1;default:return!1}}function Vm(s){return(s.mode&1)!==0&&(s.flags&128)===0}function Um(s){if(Wr){var l=Oi;if(l){var m=l;if(!u_(s,l)){if(Vm(s))throw Error(r(418));l=_s(m.nextSibling);var y=Pi;l&&u_(s,l)?c_(y,m):(s.flags=s.flags&-4097|2,Wr=!1,Pi=s)}}else{if(Vm(s))throw Error(r(418));s.flags=s.flags&-4097|2,Wr=!1,Pi=s}}}function d_(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Pi=s}function yd(s){if(s!==Pi)return!1;if(!Wr)return d_(s),Wr=!0,!1;var l;if((l=s.tag!==3)&&!(l=s.tag!==5)&&(l=s.type,l=l!=="head"&&l!=="body"&&!jm(s.type,s.memoizedProps)),l&&(l=Oi)){if(Vm(s))throw h_(),Error(r(418));for(;l;)c_(s,l),l=_s(l.nextSibling)}if(d_(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));e:{for(s=s.nextSibling,l=0;s;){if(s.nodeType===8){var m=s.data;if(m==="/$"){if(l===0){Oi=_s(s.nextSibling);break e}l--}else m!=="$"&&m!=="$!"&&m!=="$?"||l++}s=s.nextSibling}Oi=null}}else Oi=Pi?_s(s.stateNode.nextSibling):null;return!0}function h_(){for(var s=Oi;s;)s=_s(s.nextSibling)}function rl(){Oi=Pi=null,Wr=!1}function qm(s){fo===null?fo=[s]:fo.push(s)}var c3=k.ReactCurrentBatchConfig;function yc(s,l,m){if(s=m.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(m._owner){if(m=m._owner,m){if(m.tag!==1)throw Error(r(309));var y=m.stateNode}if(!y)throw Error(r(147,s));var w=y,R=""+s;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===R?l.ref:(l=function(H){var J=w.refs;H===null?delete J[R]:J[R]=H},l._stringRef=R,l)}if(typeof s!="string")throw Error(r(284));if(!m._owner)throw Error(r(290,s))}return s}function bd(s,l){throw s=Object.prototype.toString.call(l),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s))}function f_(s){var l=s._init;return l(s._payload)}function m_(s){function l(pe,oe){if(s){var ve=pe.deletions;ve===null?(pe.deletions=[oe],pe.flags|=16):ve.push(oe)}}function m(pe,oe){if(!s)return null;for(;oe!==null;)l(pe,oe),oe=oe.sibling;return null}function y(pe,oe){for(pe=new Map;oe!==null;)oe.key!==null?pe.set(oe.key,oe):pe.set(oe.index,oe),oe=oe.sibling;return pe}function w(pe,oe){return pe=Os(pe,oe),pe.index=0,pe.sibling=null,pe}function R(pe,oe,ve){return pe.index=ve,s?(ve=pe.alternate,ve!==null?(ve=ve.index,ve<oe?(pe.flags|=2,oe):ve):(pe.flags|=2,oe)):(pe.flags|=1048576,oe)}function H(pe){return s&&pe.alternate===null&&(pe.flags|=2),pe}function J(pe,oe,ve,Ve){return oe===null||oe.tag!==6?(oe=Bp(ve,pe.mode,Ve),oe.return=pe,oe):(oe=w(oe,ve),oe.return=pe,oe)}function ie(pe,oe,ve,Ve){var wt=ve.type;return wt===O?Be(pe,oe,ve.props.children,Ve,ve.key):oe!==null&&(oe.elementType===wt||typeof wt=="object"&&wt!==null&&wt.$$typeof===W&&f_(wt)===oe.type)?(Ve=w(oe,ve.props),Ve.ref=yc(pe,oe,ve),Ve.return=pe,Ve):(Ve=Wd(ve.type,ve.key,ve.props,null,pe.mode,Ve),Ve.ref=yc(pe,oe,ve),Ve.return=pe,Ve)}function _e(pe,oe,ve,Ve){return oe===null||oe.tag!==4||oe.stateNode.containerInfo!==ve.containerInfo||oe.stateNode.implementation!==ve.implementation?(oe=Lp(ve,pe.mode,Ve),oe.return=pe,oe):(oe=w(oe,ve.children||[]),oe.return=pe,oe)}function Be(pe,oe,ve,Ve,wt){return oe===null||oe.tag!==7?(oe=ua(ve,pe.mode,Ve,wt),oe.return=pe,oe):(oe=w(oe,ve),oe.return=pe,oe)}function Fe(pe,oe,ve){if(typeof oe=="string"&&oe!==""||typeof oe=="number")return oe=Bp(""+oe,pe.mode,ve),oe.return=pe,oe;if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case P:return ve=Wd(oe.type,oe.key,oe.props,null,pe.mode,ve),ve.ref=yc(pe,null,oe),ve.return=pe,ve;case T:return oe=Lp(oe,pe.mode,ve),oe.return=pe,oe;case W:var Ve=oe._init;return Fe(pe,Ve(oe._payload),ve)}if(ze(oe)||G(oe))return oe=ua(oe,pe.mode,ve,null),oe.return=pe,oe;bd(pe,oe)}return null}function Ne(pe,oe,ve,Ve){var wt=oe!==null?oe.key:null;if(typeof ve=="string"&&ve!==""||typeof ve=="number")return wt!==null?null:J(pe,oe,""+ve,Ve);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case P:return ve.key===wt?ie(pe,oe,ve,Ve):null;case T:return ve.key===wt?_e(pe,oe,ve,Ve):null;case W:return wt=ve._init,Ne(pe,oe,wt(ve._payload),Ve)}if(ze(ve)||G(ve))return wt!==null?null:Be(pe,oe,ve,Ve,null);bd(pe,ve)}return null}function dt(pe,oe,ve,Ve,wt){if(typeof Ve=="string"&&Ve!==""||typeof Ve=="number")return pe=pe.get(ve)||null,J(oe,pe,""+Ve,wt);if(typeof Ve=="object"&&Ve!==null){switch(Ve.$$typeof){case P:return pe=pe.get(Ve.key===null?ve:Ve.key)||null,ie(oe,pe,Ve,wt);case T:return pe=pe.get(Ve.key===null?ve:Ve.key)||null,_e(oe,pe,Ve,wt);case W:var Nt=Ve._init;return dt(pe,oe,ve,Nt(Ve._payload),wt)}if(ze(Ve)||G(Ve))return pe=pe.get(ve)||null,Be(oe,pe,Ve,wt,null);bd(oe,Ve)}return null}function St(pe,oe,ve,Ve){for(var wt=null,Nt=null,Mt=oe,Ft=oe=0,Pn=null;Mt!==null&&Ft<ve.length;Ft++){Mt.index>Ft?(Pn=Mt,Mt=null):Pn=Mt.sibling;var br=Ne(pe,Mt,ve[Ft],Ve);if(br===null){Mt===null&&(Mt=Pn);break}s&&Mt&&br.alternate===null&&l(pe,Mt),oe=R(br,oe,Ft),Nt===null?wt=br:Nt.sibling=br,Nt=br,Mt=Pn}if(Ft===ve.length)return m(pe,Mt),Wr&&ra(pe,Ft),wt;if(Mt===null){for(;Ft<ve.length;Ft++)Mt=Fe(pe,ve[Ft],Ve),Mt!==null&&(oe=R(Mt,oe,Ft),Nt===null?wt=Mt:Nt.sibling=Mt,Nt=Mt);return Wr&&ra(pe,Ft),wt}for(Mt=y(pe,Mt);Ft<ve.length;Ft++)Pn=dt(Mt,pe,Ft,ve[Ft],Ve),Pn!==null&&(s&&Pn.alternate!==null&&Mt.delete(Pn.key===null?Ft:Pn.key),oe=R(Pn,oe,Ft),Nt===null?wt=Pn:Nt.sibling=Pn,Nt=Pn);return s&&Mt.forEach(function(Is){return l(pe,Is)}),Wr&&ra(pe,Ft),wt}function Ct(pe,oe,ve,Ve){var wt=G(ve);if(typeof wt!="function")throw Error(r(150));if(ve=wt.call(ve),ve==null)throw Error(r(151));for(var Nt=wt=null,Mt=oe,Ft=oe=0,Pn=null,br=ve.next();Mt!==null&&!br.done;Ft++,br=ve.next()){Mt.index>Ft?(Pn=Mt,Mt=null):Pn=Mt.sibling;var Is=Ne(pe,Mt,br.value,Ve);if(Is===null){Mt===null&&(Mt=Pn);break}s&&Mt&&Is.alternate===null&&l(pe,Mt),oe=R(Is,oe,Ft),Nt===null?wt=Is:Nt.sibling=Is,Nt=Is,Mt=Pn}if(br.done)return m(pe,Mt),Wr&&ra(pe,Ft),wt;if(Mt===null){for(;!br.done;Ft++,br=ve.next())br=Fe(pe,br.value,Ve),br!==null&&(oe=R(br,oe,Ft),Nt===null?wt=br:Nt.sibling=br,Nt=br);return Wr&&ra(pe,Ft),wt}for(Mt=y(pe,Mt);!br.done;Ft++,br=ve.next())br=dt(Mt,pe,Ft,br.value,Ve),br!==null&&(s&&br.alternate!==null&&Mt.delete(br.key===null?Ft:br.key),oe=R(br,oe,Ft),Nt===null?wt=br:Nt.sibling=br,Nt=br);return s&&Mt.forEach(function(F3){return l(pe,F3)}),Wr&&ra(pe,Ft),wt}function on(pe,oe,ve,Ve){if(typeof ve=="object"&&ve!==null&&ve.type===O&&ve.key===null&&(ve=ve.props.children),typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case P:e:{for(var wt=ve.key,Nt=oe;Nt!==null;){if(Nt.key===wt){if(wt=ve.type,wt===O){if(Nt.tag===7){m(pe,Nt.sibling),oe=w(Nt,ve.props.children),oe.return=pe,pe=oe;break e}}else if(Nt.elementType===wt||typeof wt=="object"&&wt!==null&&wt.$$typeof===W&&f_(wt)===Nt.type){m(pe,Nt.sibling),oe=w(Nt,ve.props),oe.ref=yc(pe,Nt,ve),oe.return=pe,pe=oe;break e}m(pe,Nt);break}else l(pe,Nt);Nt=Nt.sibling}ve.type===O?(oe=ua(ve.props.children,pe.mode,Ve,ve.key),oe.return=pe,pe=oe):(Ve=Wd(ve.type,ve.key,ve.props,null,pe.mode,Ve),Ve.ref=yc(pe,oe,ve),Ve.return=pe,pe=Ve)}return H(pe);case T:e:{for(Nt=ve.key;oe!==null;){if(oe.key===Nt)if(oe.tag===4&&oe.stateNode.containerInfo===ve.containerInfo&&oe.stateNode.implementation===ve.implementation){m(pe,oe.sibling),oe=w(oe,ve.children||[]),oe.return=pe,pe=oe;break e}else{m(pe,oe);break}else l(pe,oe);oe=oe.sibling}oe=Lp(ve,pe.mode,Ve),oe.return=pe,pe=oe}return H(pe);case W:return Nt=ve._init,on(pe,oe,Nt(ve._payload),Ve)}if(ze(ve))return St(pe,oe,ve,Ve);if(G(ve))return Ct(pe,oe,ve,Ve);bd(pe,ve)}return typeof ve=="string"&&ve!==""||typeof ve=="number"?(ve=""+ve,oe!==null&&oe.tag===6?(m(pe,oe.sibling),oe=w(oe,ve),oe.return=pe,pe=oe):(m(pe,oe),oe=Bp(ve,pe.mode,Ve),oe.return=pe,pe=oe),H(pe)):m(pe,oe)}return on}var nl=m_(!0),p_=m_(!1),_d=Ss(null),Sd=null,il=null,Km=null;function Gm(){Km=il=Sd=null}function Xm(s){var l=_d.current;Ar(_d),s._currentValue=l}function Ym(s,l,m){for(;s!==null;){var y=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,y!==null&&(y.childLanes|=l)):y!==null&&(y.childLanes&l)!==l&&(y.childLanes|=l),s===m)break;s=s.return}}function ol(s,l){Sd=s,Km=il=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&l)!==0&&(_i=!0),s.firstContext=null)}function qi(s){var l=s._currentValue;if(Km!==s)if(s={context:s,memoizedValue:l,next:null},il===null){if(Sd===null)throw Error(r(308));il=s,Sd.dependencies={lanes:0,firstContext:s}}else il=il.next=s;return l}var na=null;function Jm(s){na===null?na=[s]:na.push(s)}function g_(s,l,m,y){var w=l.interleaved;return w===null?(m.next=m,Jm(l)):(m.next=w.next,w.next=m),l.interleaved=m,rs(s,y)}function rs(s,l){s.lanes|=l;var m=s.alternate;for(m!==null&&(m.lanes|=l),m=s,s=s.return;s!==null;)s.childLanes|=l,m=s.alternate,m!==null&&(m.childLanes|=l),m=s,s=s.return;return m.tag===3?m.stateNode:null}var xs=!1;function Qm(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function v_(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function ns(s,l){return{eventTime:s,lane:l,tag:0,payload:null,callback:null,next:null}}function Es(s,l,m){var y=s.updateQueue;if(y===null)return null;if(y=y.shared,(mr&2)!==0){var w=y.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),y.pending=l,rs(s,m)}return w=y.interleaved,w===null?(l.next=l,Jm(y)):(l.next=w.next,w.next=l),y.interleaved=l,rs(s,m)}function Cd(s,l,m){if(l=l.updateQueue,l!==null&&(l=l.shared,(m&4194240)!==0)){var y=l.lanes;y&=s.pendingLanes,m|=y,l.lanes=m,nn(s,m)}}function y_(s,l){var m=s.updateQueue,y=s.alternate;if(y!==null&&(y=y.updateQueue,m===y)){var w=null,R=null;if(m=m.firstBaseUpdate,m!==null){do{var H={eventTime:m.eventTime,lane:m.lane,tag:m.tag,payload:m.payload,callback:m.callback,next:null};R===null?w=R=H:R=R.next=H,m=m.next}while(m!==null);R===null?w=R=l:R=R.next=l}else w=R=l;m={baseState:y.baseState,firstBaseUpdate:w,lastBaseUpdate:R,shared:y.shared,effects:y.effects},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=l:s.next=l,m.lastBaseUpdate=l}function wd(s,l,m,y){var w=s.updateQueue;xs=!1;var R=w.firstBaseUpdate,H=w.lastBaseUpdate,J=w.shared.pending;if(J!==null){w.shared.pending=null;var ie=J,_e=ie.next;ie.next=null,H===null?R=_e:H.next=_e,H=ie;var Be=s.alternate;Be!==null&&(Be=Be.updateQueue,J=Be.lastBaseUpdate,J!==H&&(J===null?Be.firstBaseUpdate=_e:J.next=_e,Be.lastBaseUpdate=ie))}if(R!==null){var Fe=w.baseState;H=0,Be=_e=ie=null,J=R;do{var Ne=J.lane,dt=J.eventTime;if((y&Ne)===Ne){Be!==null&&(Be=Be.next={eventTime:dt,lane:0,tag:J.tag,payload:J.payload,callback:J.callback,next:null});e:{var St=s,Ct=J;switch(Ne=l,dt=m,Ct.tag){case 1:if(St=Ct.payload,typeof St=="function"){Fe=St.call(dt,Fe,Ne);break e}Fe=St;break e;case 3:St.flags=St.flags&-65537|128;case 0:if(St=Ct.payload,Ne=typeof St=="function"?St.call(dt,Fe,Ne):St,Ne==null)break e;Fe=q({},Fe,Ne);break e;case 2:xs=!0}}J.callback!==null&&J.lane!==0&&(s.flags|=64,Ne=w.effects,Ne===null?w.effects=[J]:Ne.push(J))}else dt={eventTime:dt,lane:Ne,tag:J.tag,payload:J.payload,callback:J.callback,next:null},Be===null?(_e=Be=dt,ie=Fe):Be=Be.next=dt,H|=Ne;if(J=J.next,J===null){if(J=w.shared.pending,J===null)break;Ne=J,J=Ne.next,Ne.next=null,w.lastBaseUpdate=Ne,w.shared.pending=null}}while(!0);if(Be===null&&(ie=Fe),w.baseState=ie,w.firstBaseUpdate=_e,w.lastBaseUpdate=Be,l=w.shared.interleaved,l!==null){w=l;do H|=w.lane,w=w.next;while(w!==l)}else R===null&&(w.shared.lanes=0);sa|=H,s.lanes=H,s.memoizedState=Fe}}function b_(s,l,m){if(s=l.effects,l.effects=null,s!==null)for(l=0;l<s.length;l++){var y=s[l],w=y.callback;if(w!==null){if(y.callback=null,y=m,typeof w!="function")throw Error(r(191,w));w.call(y)}}}var bc={},To=Ss(bc),_c=Ss(bc),Sc=Ss(bc);function ia(s){if(s===bc)throw Error(r(174));return s}function Zm(s,l){switch(Br(Sc,l),Br(_c,s),Br(To,bc),s=l.nodeType,s){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:Et(null,"");break;default:s=s===8?l.parentNode:l,l=s.namespaceURI||null,s=s.tagName,l=Et(l,s)}Ar(To),Br(To,l)}function sl(){Ar(To),Ar(_c),Ar(Sc)}function __(s){ia(Sc.current);var l=ia(To.current),m=Et(l,s.type);l!==m&&(Br(_c,s),Br(To,m))}function ep(s){_c.current===s&&(Ar(To),Ar(_c))}var qr=Ss(0);function xd(s){for(var l=s;l!==null;){if(l.tag===13){var m=l.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||m.data==="$?"||m.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var tp=[];function rp(){for(var s=0;s<tp.length;s++)tp[s]._workInProgressVersionPrimary=null;tp.length=0}var Ed=k.ReactCurrentDispatcher,np=k.ReactCurrentBatchConfig,oa=0,Kr=null,_n=null,Rn=null,$d=!1,Cc=!1,wc=0,u3=0;function Jn(){throw Error(r(321))}function ip(s,l){if(l===null)return!1;for(var m=0;m<l.length&&m<s.length;m++)if(!ho(s[m],l[m]))return!1;return!0}function op(s,l,m,y,w,R){if(oa=R,Kr=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,Ed.current=s===null||s.memoizedState===null?m3:p3,s=m(y,w),Cc){R=0;do{if(Cc=!1,wc=0,25<=R)throw Error(r(301));R+=1,Rn=_n=null,l.updateQueue=null,Ed.current=g3,s=m(y,w)}while(Cc)}if(Ed.current=Td,l=_n!==null&&_n.next!==null,oa=0,Rn=_n=Kr=null,$d=!1,l)throw Error(r(300));return s}function sp(){var s=wc!==0;return wc=0,s}function Po(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rn===null?Kr.memoizedState=Rn=s:Rn=Rn.next=s,Rn}function Ki(){if(_n===null){var s=Kr.alternate;s=s!==null?s.memoizedState:null}else s=_n.next;var l=Rn===null?Kr.memoizedState:Rn.next;if(l!==null)Rn=l,_n=s;else{if(s===null)throw Error(r(310));_n=s,s={memoizedState:_n.memoizedState,baseState:_n.baseState,baseQueue:_n.baseQueue,queue:_n.queue,next:null},Rn===null?Kr.memoizedState=Rn=s:Rn=Rn.next=s}return Rn}function xc(s,l){return typeof l=="function"?l(s):l}function ap(s){var l=Ki(),m=l.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=s;var y=_n,w=y.baseQueue,R=m.pending;if(R!==null){if(w!==null){var H=w.next;w.next=R.next,R.next=H}y.baseQueue=w=R,m.pending=null}if(w!==null){R=w.next,y=y.baseState;var J=H=null,ie=null,_e=R;do{var Be=_e.lane;if((oa&Be)===Be)ie!==null&&(ie=ie.next={lane:0,action:_e.action,hasEagerState:_e.hasEagerState,eagerState:_e.eagerState,next:null}),y=_e.hasEagerState?_e.eagerState:s(y,_e.action);else{var Fe={lane:Be,action:_e.action,hasEagerState:_e.hasEagerState,eagerState:_e.eagerState,next:null};ie===null?(J=ie=Fe,H=y):ie=ie.next=Fe,Kr.lanes|=Be,sa|=Be}_e=_e.next}while(_e!==null&&_e!==R);ie===null?H=y:ie.next=J,ho(y,l.memoizedState)||(_i=!0),l.memoizedState=y,l.baseState=H,l.baseQueue=ie,m.lastRenderedState=y}if(s=m.interleaved,s!==null){w=s;do R=w.lane,Kr.lanes|=R,sa|=R,w=w.next;while(w!==s)}else w===null&&(m.lanes=0);return[l.memoizedState,m.dispatch]}function lp(s){var l=Ki(),m=l.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=s;var y=m.dispatch,w=m.pending,R=l.memoizedState;if(w!==null){m.pending=null;var H=w=w.next;do R=s(R,H.action),H=H.next;while(H!==w);ho(R,l.memoizedState)||(_i=!0),l.memoizedState=R,l.baseQueue===null&&(l.baseState=R),m.lastRenderedState=R}return[R,y]}function S_(){}function C_(s,l){var m=Kr,y=Ki(),w=l(),R=!ho(y.memoizedState,w);if(R&&(y.memoizedState=w,_i=!0),y=y.queue,cp(E_.bind(null,m,y,s),[s]),y.getSnapshot!==l||R||Rn!==null&&Rn.memoizedState.tag&1){if(m.flags|=2048,Ec(9,x_.bind(null,m,y,w,l),void 0,null),Tn===null)throw Error(r(349));(oa&30)!==0||w_(m,l,w)}return w}function w_(s,l,m){s.flags|=16384,s={getSnapshot:l,value:m},l=Kr.updateQueue,l===null?(l={lastEffect:null,stores:null},Kr.updateQueue=l,l.stores=[s]):(m=l.stores,m===null?l.stores=[s]:m.push(s))}function x_(s,l,m,y){l.value=m,l.getSnapshot=y,$_(l)&&k_(s)}function E_(s,l,m){return m(function(){$_(l)&&k_(s)})}function $_(s){var l=s.getSnapshot;s=s.value;try{var m=l();return!ho(s,m)}catch{return!0}}function k_(s){var l=rs(s,1);l!==null&&vo(l,s,1,-1)}function R_(s){var l=Po();return typeof s=="function"&&(s=s()),l.memoizedState=l.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:xc,lastRenderedState:s},l.queue=s,s=s.dispatch=f3.bind(null,Kr,s),[l.memoizedState,s]}function Ec(s,l,m,y){return s={tag:s,create:l,destroy:m,deps:y,next:null},l=Kr.updateQueue,l===null?(l={lastEffect:null,stores:null},Kr.updateQueue=l,l.lastEffect=s.next=s):(m=l.lastEffect,m===null?l.lastEffect=s.next=s:(y=m.next,m.next=s,s.next=y,l.lastEffect=s)),s}function T_(){return Ki().memoizedState}function kd(s,l,m,y){var w=Po();Kr.flags|=s,w.memoizedState=Ec(1|l,m,void 0,y===void 0?null:y)}function Rd(s,l,m,y){var w=Ki();y=y===void 0?null:y;var R=void 0;if(_n!==null){var H=_n.memoizedState;if(R=H.destroy,y!==null&&ip(y,H.deps)){w.memoizedState=Ec(l,m,R,y);return}}Kr.flags|=s,w.memoizedState=Ec(1|l,m,R,y)}function P_(s,l){return kd(8390656,8,s,l)}function cp(s,l){return Rd(2048,8,s,l)}function O_(s,l){return Rd(4,2,s,l)}function I_(s,l){return Rd(4,4,s,l)}function N_(s,l){if(typeof l=="function")return s=s(),l(s),function(){l(null)};if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function M_(s,l,m){return m=m!=null?m.concat([s]):null,Rd(4,4,N_.bind(null,l,s),m)}function up(){}function z_(s,l){var m=Ki();l=l===void 0?null:l;var y=m.memoizedState;return y!==null&&l!==null&&ip(l,y[1])?y[0]:(m.memoizedState=[s,l],s)}function j_(s,l){var m=Ki();l=l===void 0?null:l;var y=m.memoizedState;return y!==null&&l!==null&&ip(l,y[1])?y[0]:(s=s(),m.memoizedState=[s,l],s)}function B_(s,l,m){return(oa&21)===0?(s.baseState&&(s.baseState=!1,_i=!0),s.memoizedState=m):(ho(m,l)||(m=cr(),Kr.lanes|=m,sa|=m,s.baseState=!0),l)}function d3(s,l){var m=Vt;Vt=m!==0&&4>m?m:4,s(!0);var y=np.transition;np.transition={};try{s(!1),l()}finally{Vt=m,np.transition=y}}function L_(){return Ki().memoizedState}function h3(s,l,m){var y=Ts(s);if(m={lane:y,action:m,hasEagerState:!1,eagerState:null,next:null},D_(s))A_(l,m);else if(m=g_(s,l,m,y),m!==null){var w=ai();vo(m,s,y,w),H_(m,l,y)}}function f3(s,l,m){var y=Ts(s),w={lane:y,action:m,hasEagerState:!1,eagerState:null,next:null};if(D_(s))A_(l,w);else{var R=s.alternate;if(s.lanes===0&&(R===null||R.lanes===0)&&(R=l.lastRenderedReducer,R!==null))try{var H=l.lastRenderedState,J=R(H,m);if(w.hasEagerState=!0,w.eagerState=J,ho(J,H)){var ie=l.interleaved;ie===null?(w.next=w,Jm(l)):(w.next=ie.next,ie.next=w),l.interleaved=w;return}}catch{}finally{}m=g_(s,l,w,y),m!==null&&(w=ai(),vo(m,s,y,w),H_(m,l,y))}}function D_(s){var l=s.alternate;return s===Kr||l!==null&&l===Kr}function A_(s,l){Cc=$d=!0;var m=s.pending;m===null?l.next=l:(l.next=m.next,m.next=l),s.pending=l}function H_(s,l,m){if((m&4194240)!==0){var y=l.lanes;y&=s.pendingLanes,m|=y,l.lanes=m,nn(s,m)}}var Td={readContext:qi,useCallback:Jn,useContext:Jn,useEffect:Jn,useImperativeHandle:Jn,useInsertionEffect:Jn,useLayoutEffect:Jn,useMemo:Jn,useReducer:Jn,useRef:Jn,useState:Jn,useDebugValue:Jn,useDeferredValue:Jn,useTransition:Jn,useMutableSource:Jn,useSyncExternalStore:Jn,useId:Jn,unstable_isNewReconciler:!1},m3={readContext:qi,useCallback:function(s,l){return Po().memoizedState=[s,l===void 0?null:l],s},useContext:qi,useEffect:P_,useImperativeHandle:function(s,l,m){return m=m!=null?m.concat([s]):null,kd(4194308,4,N_.bind(null,l,s),m)},useLayoutEffect:function(s,l){return kd(4194308,4,s,l)},useInsertionEffect:function(s,l){return kd(4,2,s,l)},useMemo:function(s,l){var m=Po();return l=l===void 0?null:l,s=s(),m.memoizedState=[s,l],s},useReducer:function(s,l,m){var y=Po();return l=m!==void 0?m(l):l,y.memoizedState=y.baseState=l,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:l},y.queue=s,s=s.dispatch=h3.bind(null,Kr,s),[y.memoizedState,s]},useRef:function(s){var l=Po();return s={current:s},l.memoizedState=s},useState:R_,useDebugValue:up,useDeferredValue:function(s){return Po().memoizedState=s},useTransition:function(){var s=R_(!1),l=s[0];return s=d3.bind(null,s[1]),Po().memoizedState=s,[l,s]},useMutableSource:function(){},useSyncExternalStore:function(s,l,m){var y=Kr,w=Po();if(Wr){if(m===void 0)throw Error(r(407));m=m()}else{if(m=l(),Tn===null)throw Error(r(349));(oa&30)!==0||w_(y,l,m)}w.memoizedState=m;var R={value:m,getSnapshot:l};return w.queue=R,P_(E_.bind(null,y,R,s),[s]),y.flags|=2048,Ec(9,x_.bind(null,y,R,m,l),void 0,null),m},useId:function(){var s=Po(),l=Tn.identifierPrefix;if(Wr){var m=ts,y=es;m=(y&~(1<<32-zr(y)-1)).toString(32)+m,l=":"+l+"R"+m,m=wc++,0<m&&(l+="H"+m.toString(32)),l+=":"}else m=u3++,l=":"+l+"r"+m.toString(32)+":";return s.memoizedState=l},unstable_isNewReconciler:!1},p3={readContext:qi,useCallback:z_,useContext:qi,useEffect:cp,useImperativeHandle:M_,useInsertionEffect:O_,useLayoutEffect:I_,useMemo:j_,useReducer:ap,useRef:T_,useState:function(){return ap(xc)},useDebugValue:up,useDeferredValue:function(s){var l=Ki();return B_(l,_n.memoizedState,s)},useTransition:function(){var s=ap(xc)[0],l=Ki().memoizedState;return[s,l]},useMutableSource:S_,useSyncExternalStore:C_,useId:L_,unstable_isNewReconciler:!1},g3={readContext:qi,useCallback:z_,useContext:qi,useEffect:cp,useImperativeHandle:M_,useInsertionEffect:O_,useLayoutEffect:I_,useMemo:j_,useReducer:lp,useRef:T_,useState:function(){return lp(xc)},useDebugValue:up,useDeferredValue:function(s){var l=Ki();return _n===null?l.memoizedState=s:B_(l,_n.memoizedState,s)},useTransition:function(){var s=lp(xc)[0],l=Ki().memoizedState;return[s,l]},useMutableSource:S_,useSyncExternalStore:C_,useId:L_,unstable_isNewReconciler:!1};function mo(s,l){if(s&&s.defaultProps){l=q({},l),s=s.defaultProps;for(var m in s)l[m]===void 0&&(l[m]=s[m]);return l}return l}function dp(s,l,m,y){l=s.memoizedState,m=m(y,l),m=m==null?l:q({},l,m),s.memoizedState=m,s.lanes===0&&(s.updateQueue.baseState=m)}var Pd={isMounted:function(s){return(s=s._reactInternals)?Lt(s)===s:!1},enqueueSetState:function(s,l,m){s=s._reactInternals;var y=ai(),w=Ts(s),R=ns(y,w);R.payload=l,m!=null&&(R.callback=m),l=Es(s,R,w),l!==null&&(vo(l,s,w,y),Cd(l,s,w))},enqueueReplaceState:function(s,l,m){s=s._reactInternals;var y=ai(),w=Ts(s),R=ns(y,w);R.tag=1,R.payload=l,m!=null&&(R.callback=m),l=Es(s,R,w),l!==null&&(vo(l,s,w,y),Cd(l,s,w))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var m=ai(),y=Ts(s),w=ns(m,y);w.tag=2,l!=null&&(w.callback=l),l=Es(s,w,y),l!==null&&(vo(l,s,y,m),Cd(l,s,y))}};function F_(s,l,m,y,w,R,H){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(y,R,H):l.prototype&&l.prototype.isPureReactComponent?!dc(m,y)||!dc(w,R):!0}function W_(s,l,m){var y=!1,w=Cs,R=l.contextType;return typeof R=="object"&&R!==null?R=qi(R):(w=bi(l)?ea:Yn.current,y=l.contextTypes,R=(y=y!=null)?Za(s,w):Cs),l=new l(m,R),s.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=Pd,s.stateNode=l,l._reactInternals=s,y&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=w,s.__reactInternalMemoizedMaskedChildContext=R),l}function V_(s,l,m,y){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(m,y),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(m,y),l.state!==s&&Pd.enqueueReplaceState(l,l.state,null)}function hp(s,l,m,y){var w=s.stateNode;w.props=m,w.state=s.memoizedState,w.refs={},Qm(s);var R=l.contextType;typeof R=="object"&&R!==null?w.context=qi(R):(R=bi(l)?ea:Yn.current,w.context=Za(s,R)),w.state=s.memoizedState,R=l.getDerivedStateFromProps,typeof R=="function"&&(dp(s,l,R,m),w.state=s.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(l=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),l!==w.state&&Pd.enqueueReplaceState(w,w.state,null),wd(s,m,w,y),w.state=s.memoizedState),typeof w.componentDidMount=="function"&&(s.flags|=4194308)}function al(s,l){try{var m="",y=l;do m+=te(y),y=y.return;while(y);var w=m}catch(R){w=`
39
+ Error generating stack: `+R.message+`
40
+ `+R.stack}return{value:s,source:l,stack:w,digest:null}}function fp(s,l,m){return{value:s,source:null,stack:m??null,digest:l??null}}function mp(s,l){try{console.error(l.value)}catch(m){setTimeout(function(){throw m})}}var v3=typeof WeakMap=="function"?WeakMap:Map;function U_(s,l,m){m=ns(-1,m),m.tag=3,m.payload={element:null};var y=l.value;return m.callback=function(){Bd||(Bd=!0,Tp=y),mp(s,l)},m}function q_(s,l,m){m=ns(-1,m),m.tag=3;var y=s.type.getDerivedStateFromError;if(typeof y=="function"){var w=l.value;m.payload=function(){return y(w)},m.callback=function(){mp(s,l)}}var R=s.stateNode;return R!==null&&typeof R.componentDidCatch=="function"&&(m.callback=function(){mp(s,l),typeof y!="function"&&(ks===null?ks=new Set([this]):ks.add(this));var H=l.stack;this.componentDidCatch(l.value,{componentStack:H!==null?H:""})}),m}function K_(s,l,m){var y=s.pingCache;if(y===null){y=s.pingCache=new v3;var w=new Set;y.set(l,w)}else w=y.get(l),w===void 0&&(w=new Set,y.set(l,w));w.has(m)||(w.add(m),s=O3.bind(null,s,l,m),l.then(s,s))}function G_(s){do{var l;if((l=s.tag===13)&&(l=s.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return s;s=s.return}while(s!==null);return null}function X_(s,l,m,y,w){return(s.mode&1)===0?(s===l?s.flags|=65536:(s.flags|=128,m.flags|=131072,m.flags&=-52805,m.tag===1&&(m.alternate===null?m.tag=17:(l=ns(-1,1),l.tag=2,Es(m,l,1))),m.lanes|=1),s):(s.flags|=65536,s.lanes=w,s)}var y3=k.ReactCurrentOwner,_i=!1;function si(s,l,m,y){l.child=s===null?p_(l,null,m,y):nl(l,s.child,m,y)}function Y_(s,l,m,y,w){m=m.render;var R=l.ref;return ol(l,w),y=op(s,l,m,y,R,w),m=sp(),s!==null&&!_i?(l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~w,is(s,l,w)):(Wr&&m&&Fm(l),l.flags|=1,si(s,l,y,w),l.child)}function J_(s,l,m,y,w){if(s===null){var R=m.type;return typeof R=="function"&&!jp(R)&&R.defaultProps===void 0&&m.compare===null&&m.defaultProps===void 0?(l.tag=15,l.type=R,Q_(s,l,R,y,w)):(s=Wd(m.type,null,y,l,l.mode,w),s.ref=l.ref,s.return=l,l.child=s)}if(R=s.child,(s.lanes&w)===0){var H=R.memoizedProps;if(m=m.compare,m=m!==null?m:dc,m(H,y)&&s.ref===l.ref)return is(s,l,w)}return l.flags|=1,s=Os(R,y),s.ref=l.ref,s.return=l,l.child=s}function Q_(s,l,m,y,w){if(s!==null){var R=s.memoizedProps;if(dc(R,y)&&s.ref===l.ref)if(_i=!1,l.pendingProps=y=R,(s.lanes&w)!==0)(s.flags&131072)!==0&&(_i=!0);else return l.lanes=s.lanes,is(s,l,w)}return pp(s,l,m,y,w)}function Z_(s,l,m){var y=l.pendingProps,w=y.children,R=s!==null?s.memoizedState:null;if(y.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},Br(cl,Ii),Ii|=m;else{if((m&1073741824)===0)return s=R!==null?R.baseLanes|m:m,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:s,cachePool:null,transitions:null},l.updateQueue=null,Br(cl,Ii),Ii|=s,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},y=R!==null?R.baseLanes:m,Br(cl,Ii),Ii|=y}else R!==null?(y=R.baseLanes|m,l.memoizedState=null):y=m,Br(cl,Ii),Ii|=y;return si(s,l,w,m),l.child}function eS(s,l){var m=l.ref;(s===null&&m!==null||s!==null&&s.ref!==m)&&(l.flags|=512,l.flags|=2097152)}function pp(s,l,m,y,w){var R=bi(m)?ea:Yn.current;return R=Za(l,R),ol(l,w),m=op(s,l,m,y,R,w),y=sp(),s!==null&&!_i?(l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~w,is(s,l,w)):(Wr&&y&&Fm(l),l.flags|=1,si(s,l,m,w),l.child)}function tS(s,l,m,y,w){if(bi(m)){var R=!0;md(l)}else R=!1;if(ol(l,w),l.stateNode===null)Id(s,l),W_(l,m,y),hp(l,m,y,w),y=!0;else if(s===null){var H=l.stateNode,J=l.memoizedProps;H.props=J;var ie=H.context,_e=m.contextType;typeof _e=="object"&&_e!==null?_e=qi(_e):(_e=bi(m)?ea:Yn.current,_e=Za(l,_e));var Be=m.getDerivedStateFromProps,Fe=typeof Be=="function"||typeof H.getSnapshotBeforeUpdate=="function";Fe||typeof H.UNSAFE_componentWillReceiveProps!="function"&&typeof H.componentWillReceiveProps!="function"||(J!==y||ie!==_e)&&V_(l,H,y,_e),xs=!1;var Ne=l.memoizedState;H.state=Ne,wd(l,y,H,w),ie=l.memoizedState,J!==y||Ne!==ie||yi.current||xs?(typeof Be=="function"&&(dp(l,m,Be,y),ie=l.memoizedState),(J=xs||F_(l,m,J,y,Ne,ie,_e))?(Fe||typeof H.UNSAFE_componentWillMount!="function"&&typeof H.componentWillMount!="function"||(typeof H.componentWillMount=="function"&&H.componentWillMount(),typeof H.UNSAFE_componentWillMount=="function"&&H.UNSAFE_componentWillMount()),typeof H.componentDidMount=="function"&&(l.flags|=4194308)):(typeof H.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=y,l.memoizedState=ie),H.props=y,H.state=ie,H.context=_e,y=J):(typeof H.componentDidMount=="function"&&(l.flags|=4194308),y=!1)}else{H=l.stateNode,v_(s,l),J=l.memoizedProps,_e=l.type===l.elementType?J:mo(l.type,J),H.props=_e,Fe=l.pendingProps,Ne=H.context,ie=m.contextType,typeof ie=="object"&&ie!==null?ie=qi(ie):(ie=bi(m)?ea:Yn.current,ie=Za(l,ie));var dt=m.getDerivedStateFromProps;(Be=typeof dt=="function"||typeof H.getSnapshotBeforeUpdate=="function")||typeof H.UNSAFE_componentWillReceiveProps!="function"&&typeof H.componentWillReceiveProps!="function"||(J!==Fe||Ne!==ie)&&V_(l,H,y,ie),xs=!1,Ne=l.memoizedState,H.state=Ne,wd(l,y,H,w);var St=l.memoizedState;J!==Fe||Ne!==St||yi.current||xs?(typeof dt=="function"&&(dp(l,m,dt,y),St=l.memoizedState),(_e=xs||F_(l,m,_e,y,Ne,St,ie)||!1)?(Be||typeof H.UNSAFE_componentWillUpdate!="function"&&typeof H.componentWillUpdate!="function"||(typeof H.componentWillUpdate=="function"&&H.componentWillUpdate(y,St,ie),typeof H.UNSAFE_componentWillUpdate=="function"&&H.UNSAFE_componentWillUpdate(y,St,ie)),typeof H.componentDidUpdate=="function"&&(l.flags|=4),typeof H.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof H.componentDidUpdate!="function"||J===s.memoizedProps&&Ne===s.memoizedState||(l.flags|=4),typeof H.getSnapshotBeforeUpdate!="function"||J===s.memoizedProps&&Ne===s.memoizedState||(l.flags|=1024),l.memoizedProps=y,l.memoizedState=St),H.props=y,H.state=St,H.context=ie,y=_e):(typeof H.componentDidUpdate!="function"||J===s.memoizedProps&&Ne===s.memoizedState||(l.flags|=4),typeof H.getSnapshotBeforeUpdate!="function"||J===s.memoizedProps&&Ne===s.memoizedState||(l.flags|=1024),y=!1)}return gp(s,l,m,y,R,w)}function gp(s,l,m,y,w,R){eS(s,l);var H=(l.flags&128)!==0;if(!y&&!H)return w&&s_(l,m,!1),is(s,l,R);y=l.stateNode,y3.current=l;var J=H&&typeof m.getDerivedStateFromError!="function"?null:y.render();return l.flags|=1,s!==null&&H?(l.child=nl(l,s.child,null,R),l.child=nl(l,null,J,R)):si(s,l,J,R),l.memoizedState=y.state,w&&s_(l,m,!0),l.child}function rS(s){var l=s.stateNode;l.pendingContext?i_(s,l.pendingContext,l.pendingContext!==l.context):l.context&&i_(s,l.context,!1),Zm(s,l.containerInfo)}function nS(s,l,m,y,w){return rl(),qm(w),l.flags|=256,si(s,l,m,y),l.child}var vp={dehydrated:null,treeContext:null,retryLane:0};function yp(s){return{baseLanes:s,cachePool:null,transitions:null}}function iS(s,l,m){var y=l.pendingProps,w=qr.current,R=!1,H=(l.flags&128)!==0,J;if((J=H)||(J=s!==null&&s.memoizedState===null?!1:(w&2)!==0),J?(R=!0,l.flags&=-129):(s===null||s.memoizedState!==null)&&(w|=1),Br(qr,w&1),s===null)return Um(l),s=l.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((l.mode&1)===0?l.lanes=1:s.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(H=y.children,s=y.fallback,R?(y=l.mode,R=l.child,H={mode:"hidden",children:H},(y&1)===0&&R!==null?(R.childLanes=0,R.pendingProps=H):R=Vd(H,y,0,null),s=ua(s,y,m,null),R.return=l,s.return=l,R.sibling=s,l.child=R,l.child.memoizedState=yp(m),l.memoizedState=vp,s):bp(l,H));if(w=s.memoizedState,w!==null&&(J=w.dehydrated,J!==null))return b3(s,l,H,y,J,w,m);if(R){R=y.fallback,H=l.mode,w=s.child,J=w.sibling;var ie={mode:"hidden",children:y.children};return(H&1)===0&&l.child!==w?(y=l.child,y.childLanes=0,y.pendingProps=ie,l.deletions=null):(y=Os(w,ie),y.subtreeFlags=w.subtreeFlags&14680064),J!==null?R=Os(J,R):(R=ua(R,H,m,null),R.flags|=2),R.return=l,y.return=l,y.sibling=R,l.child=y,y=R,R=l.child,H=s.child.memoizedState,H=H===null?yp(m):{baseLanes:H.baseLanes|m,cachePool:null,transitions:H.transitions},R.memoizedState=H,R.childLanes=s.childLanes&~m,l.memoizedState=vp,y}return R=s.child,s=R.sibling,y=Os(R,{mode:"visible",children:y.children}),(l.mode&1)===0&&(y.lanes=m),y.return=l,y.sibling=null,s!==null&&(m=l.deletions,m===null?(l.deletions=[s],l.flags|=16):m.push(s)),l.child=y,l.memoizedState=null,y}function bp(s,l){return l=Vd({mode:"visible",children:l},s.mode,0,null),l.return=s,s.child=l}function Od(s,l,m,y){return y!==null&&qm(y),nl(l,s.child,null,m),s=bp(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function b3(s,l,m,y,w,R,H){if(m)return l.flags&256?(l.flags&=-257,y=fp(Error(r(422))),Od(s,l,H,y)):l.memoizedState!==null?(l.child=s.child,l.flags|=128,null):(R=y.fallback,w=l.mode,y=Vd({mode:"visible",children:y.children},w,0,null),R=ua(R,w,H,null),R.flags|=2,y.return=l,R.return=l,y.sibling=R,l.child=y,(l.mode&1)!==0&&nl(l,s.child,null,H),l.child.memoizedState=yp(H),l.memoizedState=vp,R);if((l.mode&1)===0)return Od(s,l,H,null);if(w.data==="$!"){if(y=w.nextSibling&&w.nextSibling.dataset,y)var J=y.dgst;return y=J,R=Error(r(419)),y=fp(R,y,void 0),Od(s,l,H,y)}if(J=(H&s.childLanes)!==0,_i||J){if(y=Tn,y!==null){switch(H&-H){case 4:w=2;break;case 16:w=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:w=32;break;case 536870912:w=268435456;break;default:w=0}w=(w&(y.suspendedLanes|H))!==0?0:w,w!==0&&w!==R.retryLane&&(R.retryLane=w,rs(s,w),vo(y,s,w,-1))}return zp(),y=fp(Error(r(421))),Od(s,l,H,y)}return w.data==="$?"?(l.flags|=128,l.child=s.child,l=I3.bind(null,s),w._reactRetry=l,null):(s=R.treeContext,Oi=_s(w.nextSibling),Pi=l,Wr=!0,fo=null,s!==null&&(Vi[Ui++]=es,Vi[Ui++]=ts,Vi[Ui++]=ta,es=s.id,ts=s.overflow,ta=l),l=bp(l,y.children),l.flags|=4096,l)}function oS(s,l,m){s.lanes|=l;var y=s.alternate;y!==null&&(y.lanes|=l),Ym(s.return,l,m)}function _p(s,l,m,y,w){var R=s.memoizedState;R===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:y,tail:m,tailMode:w}:(R.isBackwards=l,R.rendering=null,R.renderingStartTime=0,R.last=y,R.tail=m,R.tailMode=w)}function sS(s,l,m){var y=l.pendingProps,w=y.revealOrder,R=y.tail;if(si(s,l,y.children,m),y=qr.current,(y&2)!==0)y=y&1|2,l.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&oS(s,m,l);else if(s.tag===19)oS(s,m,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}y&=1}if(Br(qr,y),(l.mode&1)===0)l.memoizedState=null;else switch(w){case"forwards":for(m=l.child,w=null;m!==null;)s=m.alternate,s!==null&&xd(s)===null&&(w=m),m=m.sibling;m=w,m===null?(w=l.child,l.child=null):(w=m.sibling,m.sibling=null),_p(l,!1,w,m,R);break;case"backwards":for(m=null,w=l.child,l.child=null;w!==null;){if(s=w.alternate,s!==null&&xd(s)===null){l.child=w;break}s=w.sibling,w.sibling=m,m=w,w=s}_p(l,!0,m,null,R);break;case"together":_p(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function Id(s,l){(l.mode&1)===0&&s!==null&&(s.alternate=null,l.alternate=null,l.flags|=2)}function is(s,l,m){if(s!==null&&(l.dependencies=s.dependencies),sa|=l.lanes,(m&l.childLanes)===0)return null;if(s!==null&&l.child!==s.child)throw Error(r(153));if(l.child!==null){for(s=l.child,m=Os(s,s.pendingProps),l.child=m,m.return=l;s.sibling!==null;)s=s.sibling,m=m.sibling=Os(s,s.pendingProps),m.return=l;m.sibling=null}return l.child}function _3(s,l,m){switch(l.tag){case 3:rS(l),rl();break;case 5:__(l);break;case 1:bi(l.type)&&md(l);break;case 4:Zm(l,l.stateNode.containerInfo);break;case 10:var y=l.type._context,w=l.memoizedProps.value;Br(_d,y._currentValue),y._currentValue=w;break;case 13:if(y=l.memoizedState,y!==null)return y.dehydrated!==null?(Br(qr,qr.current&1),l.flags|=128,null):(m&l.child.childLanes)!==0?iS(s,l,m):(Br(qr,qr.current&1),s=is(s,l,m),s!==null?s.sibling:null);Br(qr,qr.current&1);break;case 19:if(y=(m&l.childLanes)!==0,(s.flags&128)!==0){if(y)return sS(s,l,m);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),Br(qr,qr.current),y)break;return null;case 22:case 23:return l.lanes=0,Z_(s,l,m)}return is(s,l,m)}var aS,Sp,lS,cS;aS=function(s,l){for(var m=l.child;m!==null;){if(m.tag===5||m.tag===6)s.appendChild(m.stateNode);else if(m.tag!==4&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===l)break;for(;m.sibling===null;){if(m.return===null||m.return===l)return;m=m.return}m.sibling.return=m.return,m=m.sibling}},Sp=function(){},lS=function(s,l,m,y){var w=s.memoizedProps;if(w!==y){s=l.stateNode,ia(To.current);var R=null;switch(m){case"input":w=ye(s,w),y=ye(s,y),R=[];break;case"select":w=q({},w,{value:void 0}),y=q({},y,{value:void 0}),R=[];break;case"textarea":w=$e(s,w),y=$e(s,y),R=[];break;default:typeof w.onClick!="function"&&typeof y.onClick=="function"&&(s.onclick=dd)}Me(m,y);var H;m=null;for(_e in w)if(!y.hasOwnProperty(_e)&&w.hasOwnProperty(_e)&&w[_e]!=null)if(_e==="style"){var J=w[_e];for(H in J)J.hasOwnProperty(H)&&(m||(m={}),m[H]="")}else _e!=="dangerouslySetInnerHTML"&&_e!=="children"&&_e!=="suppressContentEditableWarning"&&_e!=="suppressHydrationWarning"&&_e!=="autoFocus"&&(i.hasOwnProperty(_e)?R||(R=[]):(R=R||[]).push(_e,null));for(_e in y){var ie=y[_e];if(J=w!=null?w[_e]:void 0,y.hasOwnProperty(_e)&&ie!==J&&(ie!=null||J!=null))if(_e==="style")if(J){for(H in J)!J.hasOwnProperty(H)||ie&&ie.hasOwnProperty(H)||(m||(m={}),m[H]="");for(H in ie)ie.hasOwnProperty(H)&&J[H]!==ie[H]&&(m||(m={}),m[H]=ie[H])}else m||(R||(R=[]),R.push(_e,m)),m=ie;else _e==="dangerouslySetInnerHTML"?(ie=ie?ie.__html:void 0,J=J?J.__html:void 0,ie!=null&&J!==ie&&(R=R||[]).push(_e,ie)):_e==="children"?typeof ie!="string"&&typeof ie!="number"||(R=R||[]).push(_e,""+ie):_e!=="suppressContentEditableWarning"&&_e!=="suppressHydrationWarning"&&(i.hasOwnProperty(_e)?(ie!=null&&_e==="onScroll"&&Dr("scroll",s),R||J===ie||(R=[])):(R=R||[]).push(_e,ie))}m&&(R=R||[]).push("style",m);var _e=R;(l.updateQueue=_e)&&(l.flags|=4)}},cS=function(s,l,m,y){m!==y&&(l.flags|=4)};function $c(s,l){if(!Wr)switch(s.tailMode){case"hidden":l=s.tail;for(var m=null;l!==null;)l.alternate!==null&&(m=l),l=l.sibling;m===null?s.tail=null:m.sibling=null;break;case"collapsed":m=s.tail;for(var y=null;m!==null;)m.alternate!==null&&(y=m),m=m.sibling;y===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:y.sibling=null}}function Qn(s){var l=s.alternate!==null&&s.alternate.child===s.child,m=0,y=0;if(l)for(var w=s.child;w!==null;)m|=w.lanes|w.childLanes,y|=w.subtreeFlags&14680064,y|=w.flags&14680064,w.return=s,w=w.sibling;else for(w=s.child;w!==null;)m|=w.lanes|w.childLanes,y|=w.subtreeFlags,y|=w.flags,w.return=s,w=w.sibling;return s.subtreeFlags|=y,s.childLanes=m,l}function S3(s,l,m){var y=l.pendingProps;switch(Wm(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qn(l),null;case 1:return bi(l.type)&&fd(),Qn(l),null;case 3:return y=l.stateNode,sl(),Ar(yi),Ar(Yn),rp(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(s===null||s.child===null)&&(yd(l)?l.flags|=4:s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,fo!==null&&(Ip(fo),fo=null))),Sp(s,l),Qn(l),null;case 5:ep(l);var w=ia(Sc.current);if(m=l.type,s!==null&&l.stateNode!=null)lS(s,l,m,y,w),s.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!y){if(l.stateNode===null)throw Error(r(166));return Qn(l),null}if(s=ia(To.current),yd(l)){y=l.stateNode,m=l.type;var R=l.memoizedProps;switch(y[Ro]=l,y[gc]=R,s=(l.mode&1)!==0,m){case"dialog":Dr("cancel",y),Dr("close",y);break;case"iframe":case"object":case"embed":Dr("load",y);break;case"video":case"audio":for(w=0;w<fc.length;w++)Dr(fc[w],y);break;case"source":Dr("error",y);break;case"img":case"image":case"link":Dr("error",y),Dr("load",y);break;case"details":Dr("toggle",y);break;case"input":fe(y,R),Dr("invalid",y);break;case"select":y._wrapperState={wasMultiple:!!R.multiple},Dr("invalid",y);break;case"textarea":je(y,R),Dr("invalid",y)}Me(m,R),w=null;for(var H in R)if(R.hasOwnProperty(H)){var J=R[H];H==="children"?typeof J=="string"?y.textContent!==J&&(R.suppressHydrationWarning!==!0&&ud(y.textContent,J,s),w=["children",J]):typeof J=="number"&&y.textContent!==""+J&&(R.suppressHydrationWarning!==!0&&ud(y.textContent,J,s),w=["children",""+J]):i.hasOwnProperty(H)&&J!=null&&H==="onScroll"&&Dr("scroll",y)}switch(m){case"input":ae(y),Ce(y,R,!0);break;case"textarea":ae(y),Qe(y);break;case"select":case"option":break;default:typeof R.onClick=="function"&&(y.onclick=dd)}y=w,l.updateQueue=y,y!==null&&(l.flags|=4)}else{H=w.nodeType===9?w:w.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=st(m)),s==="http://www.w3.org/1999/xhtml"?m==="script"?(s=H.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof y.is=="string"?s=H.createElement(m,{is:y.is}):(s=H.createElement(m),m==="select"&&(H=s,y.multiple?H.multiple=!0:y.size&&(H.size=y.size))):s=H.createElementNS(s,m),s[Ro]=l,s[gc]=y,aS(s,l,!1,!1),l.stateNode=s;e:{switch(H=qe(m,y),m){case"dialog":Dr("cancel",s),Dr("close",s),w=y;break;case"iframe":case"object":case"embed":Dr("load",s),w=y;break;case"video":case"audio":for(w=0;w<fc.length;w++)Dr(fc[w],s);w=y;break;case"source":Dr("error",s),w=y;break;case"img":case"image":case"link":Dr("error",s),Dr("load",s),w=y;break;case"details":Dr("toggle",s),w=y;break;case"input":fe(s,y),w=ye(s,y),Dr("invalid",s);break;case"option":w=y;break;case"select":s._wrapperState={wasMultiple:!!y.multiple},w=q({},y,{value:void 0}),Dr("invalid",s);break;case"textarea":je(s,y),w=$e(s,y),Dr("invalid",s);break;default:w=y}Me(m,w),J=w;for(R in J)if(J.hasOwnProperty(R)){var ie=J[R];R==="style"?Le(s,ie):R==="dangerouslySetInnerHTML"?(ie=ie?ie.__html:void 0,ie!=null&&Je(s,ie)):R==="children"?typeof ie=="string"?(m!=="textarea"||ie!=="")&&ht(s,ie):typeof ie=="number"&&ht(s,""+ie):R!=="suppressContentEditableWarning"&&R!=="suppressHydrationWarning"&&R!=="autoFocus"&&(i.hasOwnProperty(R)?ie!=null&&R==="onScroll"&&Dr("scroll",s):ie!=null&&E(s,R,ie,H))}switch(m){case"input":ae(s),Ce(s,y,!1);break;case"textarea":ae(s),Qe(s);break;case"option":y.value!=null&&s.setAttribute("value",""+me(y.value));break;case"select":s.multiple=!!y.multiple,R=y.value,R!=null?Ee(s,!!y.multiple,R,!1):y.defaultValue!=null&&Ee(s,!!y.multiple,y.defaultValue,!0);break;default:typeof w.onClick=="function"&&(s.onclick=dd)}switch(m){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}}y&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return Qn(l),null;case 6:if(s&&l.stateNode!=null)cS(s,l,s.memoizedProps,y);else{if(typeof y!="string"&&l.stateNode===null)throw Error(r(166));if(m=ia(Sc.current),ia(To.current),yd(l)){if(y=l.stateNode,m=l.memoizedProps,y[Ro]=l,(R=y.nodeValue!==m)&&(s=Pi,s!==null))switch(s.tag){case 3:ud(y.nodeValue,m,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&ud(y.nodeValue,m,(s.mode&1)!==0)}R&&(l.flags|=4)}else y=(m.nodeType===9?m:m.ownerDocument).createTextNode(y),y[Ro]=l,l.stateNode=y}return Qn(l),null;case 13:if(Ar(qr),y=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(Wr&&Oi!==null&&(l.mode&1)!==0&&(l.flags&128)===0)h_(),rl(),l.flags|=98560,R=!1;else if(R=yd(l),y!==null&&y.dehydrated!==null){if(s===null){if(!R)throw Error(r(318));if(R=l.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));R[Ro]=l}else rl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Qn(l),R=!1}else fo!==null&&(Ip(fo),fo=null),R=!0;if(!R)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=m,l):(y=y!==null,y!==(s!==null&&s.memoizedState!==null)&&y&&(l.child.flags|=8192,(l.mode&1)!==0&&(s===null||(qr.current&1)!==0?Sn===0&&(Sn=3):zp())),l.updateQueue!==null&&(l.flags|=4),Qn(l),null);case 4:return sl(),Sp(s,l),s===null&&mc(l.stateNode.containerInfo),Qn(l),null;case 10:return Xm(l.type._context),Qn(l),null;case 17:return bi(l.type)&&fd(),Qn(l),null;case 19:if(Ar(qr),R=l.memoizedState,R===null)return Qn(l),null;if(y=(l.flags&128)!==0,H=R.rendering,H===null)if(y)$c(R,!1);else{if(Sn!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(H=xd(s),H!==null){for(l.flags|=128,$c(R,!1),y=H.updateQueue,y!==null&&(l.updateQueue=y,l.flags|=4),l.subtreeFlags=0,y=m,m=l.child;m!==null;)R=m,s=y,R.flags&=14680066,H=R.alternate,H===null?(R.childLanes=0,R.lanes=s,R.child=null,R.subtreeFlags=0,R.memoizedProps=null,R.memoizedState=null,R.updateQueue=null,R.dependencies=null,R.stateNode=null):(R.childLanes=H.childLanes,R.lanes=H.lanes,R.child=H.child,R.subtreeFlags=0,R.deletions=null,R.memoizedProps=H.memoizedProps,R.memoizedState=H.memoizedState,R.updateQueue=H.updateQueue,R.type=H.type,s=H.dependencies,R.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),m=m.sibling;return Br(qr,qr.current&1|2),l.child}s=s.sibling}R.tail!==null&&pt()>ul&&(l.flags|=128,y=!0,$c(R,!1),l.lanes=4194304)}else{if(!y)if(s=xd(H),s!==null){if(l.flags|=128,y=!0,m=s.updateQueue,m!==null&&(l.updateQueue=m,l.flags|=4),$c(R,!0),R.tail===null&&R.tailMode==="hidden"&&!H.alternate&&!Wr)return Qn(l),null}else 2*pt()-R.renderingStartTime>ul&&m!==1073741824&&(l.flags|=128,y=!0,$c(R,!1),l.lanes=4194304);R.isBackwards?(H.sibling=l.child,l.child=H):(m=R.last,m!==null?m.sibling=H:l.child=H,R.last=H)}return R.tail!==null?(l=R.tail,R.rendering=l,R.tail=l.sibling,R.renderingStartTime=pt(),l.sibling=null,m=qr.current,Br(qr,y?m&1|2:m&1),l):(Qn(l),null);case 22:case 23:return Mp(),y=l.memoizedState!==null,s!==null&&s.memoizedState!==null!==y&&(l.flags|=8192),y&&(l.mode&1)!==0?(Ii&1073741824)!==0&&(Qn(l),l.subtreeFlags&6&&(l.flags|=8192)):Qn(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function C3(s,l){switch(Wm(l),l.tag){case 1:return bi(l.type)&&fd(),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return sl(),Ar(yi),Ar(Yn),rp(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 5:return ep(l),null;case 13:if(Ar(qr),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(r(340));rl()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return Ar(qr),null;case 4:return sl(),null;case 10:return Xm(l.type._context),null;case 22:case 23:return Mp(),null;case 24:return null;default:return null}}var Nd=!1,Zn=!1,w3=typeof WeakSet=="function"?WeakSet:Set,yt=null;function ll(s,l){var m=s.ref;if(m!==null)if(typeof m=="function")try{m(null)}catch(y){Zr(s,l,y)}else m.current=null}function Cp(s,l,m){try{m()}catch(y){Zr(s,l,y)}}var uS=!1;function x3(s,l){if(Mm=Zu,s=Fb(),$m(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var y=m.getSelection&&m.getSelection();if(y&&y.rangeCount!==0){m=y.anchorNode;var w=y.anchorOffset,R=y.focusNode;y=y.focusOffset;try{m.nodeType,R.nodeType}catch{m=null;break e}var H=0,J=-1,ie=-1,_e=0,Be=0,Fe=s,Ne=null;t:for(;;){for(var dt;Fe!==m||w!==0&&Fe.nodeType!==3||(J=H+w),Fe!==R||y!==0&&Fe.nodeType!==3||(ie=H+y),Fe.nodeType===3&&(H+=Fe.nodeValue.length),(dt=Fe.firstChild)!==null;)Ne=Fe,Fe=dt;for(;;){if(Fe===s)break t;if(Ne===m&&++_e===w&&(J=H),Ne===R&&++Be===y&&(ie=H),(dt=Fe.nextSibling)!==null)break;Fe=Ne,Ne=Fe.parentNode}Fe=dt}m=J===-1||ie===-1?null:{start:J,end:ie}}else m=null}m=m||{start:0,end:0}}else m=null;for(zm={focusedElem:s,selectionRange:m},Zu=!1,yt=l;yt!==null;)if(l=yt,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,yt=s;else for(;yt!==null;){l=yt;try{var St=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(St!==null){var Ct=St.memoizedProps,on=St.memoizedState,pe=l.stateNode,oe=pe.getSnapshotBeforeUpdate(l.elementType===l.type?Ct:mo(l.type,Ct),on);pe.__reactInternalSnapshotBeforeUpdate=oe}break;case 3:var ve=l.stateNode.containerInfo;ve.nodeType===1?ve.textContent="":ve.nodeType===9&&ve.documentElement&&ve.removeChild(ve.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(Ve){Zr(l,l.return,Ve)}if(s=l.sibling,s!==null){s.return=l.return,yt=s;break}yt=l.return}return St=uS,uS=!1,St}function kc(s,l,m){var y=l.updateQueue;if(y=y!==null?y.lastEffect:null,y!==null){var w=y=y.next;do{if((w.tag&s)===s){var R=w.destroy;w.destroy=void 0,R!==void 0&&Cp(l,m,R)}w=w.next}while(w!==y)}}function Md(s,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var m=l=l.next;do{if((m.tag&s)===s){var y=m.create;m.destroy=y()}m=m.next}while(m!==l)}}function wp(s){var l=s.ref;if(l!==null){var m=s.stateNode;switch(s.tag){case 5:s=m;break;default:s=m}typeof l=="function"?l(s):l.current=s}}function dS(s){var l=s.alternate;l!==null&&(s.alternate=null,dS(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&(delete l[Ro],delete l[gc],delete l[Dm],delete l[s3],delete l[a3])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function hS(s){return s.tag===5||s.tag===3||s.tag===4}function fS(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||hS(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function xp(s,l,m){var y=s.tag;if(y===5||y===6)s=s.stateNode,l?m.nodeType===8?m.parentNode.insertBefore(s,l):m.insertBefore(s,l):(m.nodeType===8?(l=m.parentNode,l.insertBefore(s,m)):(l=m,l.appendChild(s)),m=m._reactRootContainer,m!=null||l.onclick!==null||(l.onclick=dd));else if(y!==4&&(s=s.child,s!==null))for(xp(s,l,m),s=s.sibling;s!==null;)xp(s,l,m),s=s.sibling}function Ep(s,l,m){var y=s.tag;if(y===5||y===6)s=s.stateNode,l?m.insertBefore(s,l):m.appendChild(s);else if(y!==4&&(s=s.child,s!==null))for(Ep(s,l,m),s=s.sibling;s!==null;)Ep(s,l,m),s=s.sibling}var An=null,po=!1;function $s(s,l,m){for(m=m.child;m!==null;)mS(s,l,m),m=m.sibling}function mS(s,l,m){if(fr&&typeof fr.onCommitFiberUnmount=="function")try{fr.onCommitFiberUnmount(It,m)}catch{}switch(m.tag){case 5:Zn||ll(m,l);case 6:var y=An,w=po;An=null,$s(s,l,m),An=y,po=w,An!==null&&(po?(s=An,m=m.stateNode,s.nodeType===8?s.parentNode.removeChild(m):s.removeChild(m)):An.removeChild(m.stateNode));break;case 18:An!==null&&(po?(s=An,m=m.stateNode,s.nodeType===8?Lm(s.parentNode,m):s.nodeType===1&&Lm(s,m),vs(s)):Lm(An,m.stateNode));break;case 4:y=An,w=po,An=m.stateNode.containerInfo,po=!0,$s(s,l,m),An=y,po=w;break;case 0:case 11:case 14:case 15:if(!Zn&&(y=m.updateQueue,y!==null&&(y=y.lastEffect,y!==null))){w=y=y.next;do{var R=w,H=R.destroy;R=R.tag,H!==void 0&&((R&2)!==0||(R&4)!==0)&&Cp(m,l,H),w=w.next}while(w!==y)}$s(s,l,m);break;case 1:if(!Zn&&(ll(m,l),y=m.stateNode,typeof y.componentWillUnmount=="function"))try{y.props=m.memoizedProps,y.state=m.memoizedState,y.componentWillUnmount()}catch(J){Zr(m,l,J)}$s(s,l,m);break;case 21:$s(s,l,m);break;case 22:m.mode&1?(Zn=(y=Zn)||m.memoizedState!==null,$s(s,l,m),Zn=y):$s(s,l,m);break;default:$s(s,l,m)}}function pS(s){var l=s.updateQueue;if(l!==null){s.updateQueue=null;var m=s.stateNode;m===null&&(m=s.stateNode=new w3),l.forEach(function(y){var w=N3.bind(null,s,y);m.has(y)||(m.add(y),y.then(w,w))})}}function go(s,l){var m=l.deletions;if(m!==null)for(var y=0;y<m.length;y++){var w=m[y];try{var R=s,H=l,J=H;e:for(;J!==null;){switch(J.tag){case 5:An=J.stateNode,po=!1;break e;case 3:An=J.stateNode.containerInfo,po=!0;break e;case 4:An=J.stateNode.containerInfo,po=!0;break e}J=J.return}if(An===null)throw Error(r(160));mS(R,H,w),An=null,po=!1;var ie=w.alternate;ie!==null&&(ie.return=null),w.return=null}catch(_e){Zr(w,l,_e)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)gS(l,s),l=l.sibling}function gS(s,l){var m=s.alternate,y=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(go(l,s),Oo(s),y&4){try{kc(3,s,s.return),Md(3,s)}catch(Ct){Zr(s,s.return,Ct)}try{kc(5,s,s.return)}catch(Ct){Zr(s,s.return,Ct)}}break;case 1:go(l,s),Oo(s),y&512&&m!==null&&ll(m,m.return);break;case 5:if(go(l,s),Oo(s),y&512&&m!==null&&ll(m,m.return),s.flags&32){var w=s.stateNode;try{ht(w,"")}catch(Ct){Zr(s,s.return,Ct)}}if(y&4&&(w=s.stateNode,w!=null)){var R=s.memoizedProps,H=m!==null?m.memoizedProps:R,J=s.type,ie=s.updateQueue;if(s.updateQueue=null,ie!==null)try{J==="input"&&R.type==="radio"&&R.name!=null&&de(w,R),qe(J,H);var _e=qe(J,R);for(H=0;H<ie.length;H+=2){var Be=ie[H],Fe=ie[H+1];Be==="style"?Le(w,Fe):Be==="dangerouslySetInnerHTML"?Je(w,Fe):Be==="children"?ht(w,Fe):E(w,Be,Fe,_e)}switch(J){case"input":be(w,R);break;case"textarea":Oe(w,R);break;case"select":var Ne=w._wrapperState.wasMultiple;w._wrapperState.wasMultiple=!!R.multiple;var dt=R.value;dt!=null?Ee(w,!!R.multiple,dt,!1):Ne!==!!R.multiple&&(R.defaultValue!=null?Ee(w,!!R.multiple,R.defaultValue,!0):Ee(w,!!R.multiple,R.multiple?[]:"",!1))}w[gc]=R}catch(Ct){Zr(s,s.return,Ct)}}break;case 6:if(go(l,s),Oo(s),y&4){if(s.stateNode===null)throw Error(r(162));w=s.stateNode,R=s.memoizedProps;try{w.nodeValue=R}catch(Ct){Zr(s,s.return,Ct)}}break;case 3:if(go(l,s),Oo(s),y&4&&m!==null&&m.memoizedState.isDehydrated)try{vs(l.containerInfo)}catch(Ct){Zr(s,s.return,Ct)}break;case 4:go(l,s),Oo(s);break;case 13:go(l,s),Oo(s),w=s.child,w.flags&8192&&(R=w.memoizedState!==null,w.stateNode.isHidden=R,!R||w.alternate!==null&&w.alternate.memoizedState!==null||(Rp=pt())),y&4&&pS(s);break;case 22:if(Be=m!==null&&m.memoizedState!==null,s.mode&1?(Zn=(_e=Zn)||Be,go(l,s),Zn=_e):go(l,s),Oo(s),y&8192){if(_e=s.memoizedState!==null,(s.stateNode.isHidden=_e)&&!Be&&(s.mode&1)!==0)for(yt=s,Be=s.child;Be!==null;){for(Fe=yt=Be;yt!==null;){switch(Ne=yt,dt=Ne.child,Ne.tag){case 0:case 11:case 14:case 15:kc(4,Ne,Ne.return);break;case 1:ll(Ne,Ne.return);var St=Ne.stateNode;if(typeof St.componentWillUnmount=="function"){y=Ne,m=Ne.return;try{l=y,St.props=l.memoizedProps,St.state=l.memoizedState,St.componentWillUnmount()}catch(Ct){Zr(y,m,Ct)}}break;case 5:ll(Ne,Ne.return);break;case 22:if(Ne.memoizedState!==null){bS(Fe);continue}}dt!==null?(dt.return=Ne,yt=dt):bS(Fe)}Be=Be.sibling}e:for(Be=null,Fe=s;;){if(Fe.tag===5){if(Be===null){Be=Fe;try{w=Fe.stateNode,_e?(R=w.style,typeof R.setProperty=="function"?R.setProperty("display","none","important"):R.display="none"):(J=Fe.stateNode,ie=Fe.memoizedProps.style,H=ie!=null&&ie.hasOwnProperty("display")?ie.display:null,J.style.display=tt("display",H))}catch(Ct){Zr(s,s.return,Ct)}}}else if(Fe.tag===6){if(Be===null)try{Fe.stateNode.nodeValue=_e?"":Fe.memoizedProps}catch(Ct){Zr(s,s.return,Ct)}}else if((Fe.tag!==22&&Fe.tag!==23||Fe.memoizedState===null||Fe===s)&&Fe.child!==null){Fe.child.return=Fe,Fe=Fe.child;continue}if(Fe===s)break e;for(;Fe.sibling===null;){if(Fe.return===null||Fe.return===s)break e;Be===Fe&&(Be=null),Fe=Fe.return}Be===Fe&&(Be=null),Fe.sibling.return=Fe.return,Fe=Fe.sibling}}break;case 19:go(l,s),Oo(s),y&4&&pS(s);break;case 21:break;default:go(l,s),Oo(s)}}function Oo(s){var l=s.flags;if(l&2){try{e:{for(var m=s.return;m!==null;){if(hS(m)){var y=m;break e}m=m.return}throw Error(r(160))}switch(y.tag){case 5:var w=y.stateNode;y.flags&32&&(ht(w,""),y.flags&=-33);var R=fS(s);Ep(s,R,w);break;case 3:case 4:var H=y.stateNode.containerInfo,J=fS(s);xp(s,J,H);break;default:throw Error(r(161))}}catch(ie){Zr(s,s.return,ie)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function E3(s,l,m){yt=s,vS(s)}function vS(s,l,m){for(var y=(s.mode&1)!==0;yt!==null;){var w=yt,R=w.child;if(w.tag===22&&y){var H=w.memoizedState!==null||Nd;if(!H){var J=w.alternate,ie=J!==null&&J.memoizedState!==null||Zn;J=Nd;var _e=Zn;if(Nd=H,(Zn=ie)&&!_e)for(yt=w;yt!==null;)H=yt,ie=H.child,H.tag===22&&H.memoizedState!==null?_S(w):ie!==null?(ie.return=H,yt=ie):_S(w);for(;R!==null;)yt=R,vS(R),R=R.sibling;yt=w,Nd=J,Zn=_e}yS(s)}else(w.subtreeFlags&8772)!==0&&R!==null?(R.return=w,yt=R):yS(s)}}function yS(s){for(;yt!==null;){var l=yt;if((l.flags&8772)!==0){var m=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:Zn||Md(5,l);break;case 1:var y=l.stateNode;if(l.flags&4&&!Zn)if(m===null)y.componentDidMount();else{var w=l.elementType===l.type?m.memoizedProps:mo(l.type,m.memoizedProps);y.componentDidUpdate(w,m.memoizedState,y.__reactInternalSnapshotBeforeUpdate)}var R=l.updateQueue;R!==null&&b_(l,R,y);break;case 3:var H=l.updateQueue;if(H!==null){if(m=null,l.child!==null)switch(l.child.tag){case 5:m=l.child.stateNode;break;case 1:m=l.child.stateNode}b_(l,H,m)}break;case 5:var J=l.stateNode;if(m===null&&l.flags&4){m=J;var ie=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":ie.autoFocus&&m.focus();break;case"img":ie.src&&(m.src=ie.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var _e=l.alternate;if(_e!==null){var Be=_e.memoizedState;if(Be!==null){var Fe=Be.dehydrated;Fe!==null&&vs(Fe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Zn||l.flags&512&&wp(l)}catch(Ne){Zr(l,l.return,Ne)}}if(l===s){yt=null;break}if(m=l.sibling,m!==null){m.return=l.return,yt=m;break}yt=l.return}}function bS(s){for(;yt!==null;){var l=yt;if(l===s){yt=null;break}var m=l.sibling;if(m!==null){m.return=l.return,yt=m;break}yt=l.return}}function _S(s){for(;yt!==null;){var l=yt;try{switch(l.tag){case 0:case 11:case 15:var m=l.return;try{Md(4,l)}catch(ie){Zr(l,m,ie)}break;case 1:var y=l.stateNode;if(typeof y.componentDidMount=="function"){var w=l.return;try{y.componentDidMount()}catch(ie){Zr(l,w,ie)}}var R=l.return;try{wp(l)}catch(ie){Zr(l,R,ie)}break;case 5:var H=l.return;try{wp(l)}catch(ie){Zr(l,H,ie)}}}catch(ie){Zr(l,l.return,ie)}if(l===s){yt=null;break}var J=l.sibling;if(J!==null){J.return=l.return,yt=J;break}yt=l.return}}var $3=Math.ceil,zd=k.ReactCurrentDispatcher,$p=k.ReactCurrentOwner,Gi=k.ReactCurrentBatchConfig,mr=0,Tn=null,dn=null,Hn=0,Ii=0,cl=Ss(0),Sn=0,Rc=null,sa=0,jd=0,kp=0,Tc=null,Si=null,Rp=0,ul=1/0,os=null,Bd=!1,Tp=null,ks=null,Ld=!1,Rs=null,Dd=0,Pc=0,Pp=null,Ad=-1,Hd=0;function ai(){return(mr&6)!==0?pt():Ad!==-1?Ad:Ad=pt()}function Ts(s){return(s.mode&1)===0?1:(mr&2)!==0&&Hn!==0?Hn&-Hn:c3.transition!==null?(Hd===0&&(Hd=cr()),Hd):(s=Vt,s!==0||(s=window.event,s=s===void 0?16:Cb(s.type)),s)}function vo(s,l,m,y){if(50<Pc)throw Pc=0,Pp=null,Error(r(185));Sr(s,m,y),((mr&2)===0||s!==Tn)&&(s===Tn&&((mr&2)===0&&(jd|=m),Sn===4&&Ps(s,Hn)),Ci(s,y),m===1&&mr===0&&(l.mode&1)===0&&(ul=pt()+500,pd&&ws()))}function Ci(s,l){var m=s.callbackNode;ot(s,l);var y=lr(s,s===Tn?Hn:0);if(y===0)m!==null&&He(m),s.callbackNode=null,s.callbackPriority=0;else if(l=y&-y,s.callbackPriority!==l){if(m!=null&&He(m),l===1)s.tag===0?l3(CS.bind(null,s)):a_(CS.bind(null,s)),i3(function(){(mr&6)===0&&ws()}),m=null;else{switch(bn(y)){case 1:m=Ze;break;case 4:m=Rt;break;case 16:m=Kt;break;case 536870912:m=gt;break;default:m=Kt}m=PS(m,SS.bind(null,s))}s.callbackPriority=l,s.callbackNode=m}}function SS(s,l){if(Ad=-1,Hd=0,(mr&6)!==0)throw Error(r(327));var m=s.callbackNode;if(dl()&&s.callbackNode!==m)return null;var y=lr(s,s===Tn?Hn:0);if(y===0)return null;if((y&30)!==0||(y&s.expiredLanes)!==0||l)l=Fd(s,y);else{l=y;var w=mr;mr|=2;var R=xS();(Tn!==s||Hn!==l)&&(os=null,ul=pt()+500,la(s,l));do try{T3();break}catch(J){wS(s,J)}while(!0);Gm(),zd.current=R,mr=w,dn!==null?l=0:(Tn=null,Hn=0,l=Sn)}if(l!==0){if(l===2&&(w=or(s),w!==0&&(y=w,l=Op(s,w))),l===1)throw m=Rc,la(s,0),Ps(s,y),Ci(s,pt()),m;if(l===6)Ps(s,y);else{if(w=s.current.alternate,(y&30)===0&&!k3(w)&&(l=Fd(s,y),l===2&&(R=or(s),R!==0&&(y=R,l=Op(s,R))),l===1))throw m=Rc,la(s,0),Ps(s,y),Ci(s,pt()),m;switch(s.finishedWork=w,s.finishedLanes=y,l){case 0:case 1:throw Error(r(345));case 2:ca(s,Si,os);break;case 3:if(Ps(s,y),(y&130023424)===y&&(l=Rp+500-pt(),10<l)){if(lr(s,0)!==0)break;if(w=s.suspendedLanes,(w&y)!==y){ai(),s.pingedLanes|=s.suspendedLanes&w;break}s.timeoutHandle=Bm(ca.bind(null,s,Si,os),l);break}ca(s,Si,os);break;case 4:if(Ps(s,y),(y&4194240)===y)break;for(l=s.eventTimes,w=-1;0<y;){var H=31-zr(y);R=1<<H,H=l[H],H>w&&(w=H),y&=~R}if(y=w,y=pt()-y,y=(120>y?120:480>y?480:1080>y?1080:1920>y?1920:3e3>y?3e3:4320>y?4320:1960*$3(y/1960))-y,10<y){s.timeoutHandle=Bm(ca.bind(null,s,Si,os),y);break}ca(s,Si,os);break;case 5:ca(s,Si,os);break;default:throw Error(r(329))}}}return Ci(s,pt()),s.callbackNode===m?SS.bind(null,s):null}function Op(s,l){var m=Tc;return s.current.memoizedState.isDehydrated&&(la(s,l).flags|=256),s=Fd(s,l),s!==2&&(l=Si,Si=m,l!==null&&Ip(l)),s}function Ip(s){Si===null?Si=s:Si.push.apply(Si,s)}function k3(s){for(var l=s;;){if(l.flags&16384){var m=l.updateQueue;if(m!==null&&(m=m.stores,m!==null))for(var y=0;y<m.length;y++){var w=m[y],R=w.getSnapshot;w=w.value;try{if(!ho(R(),w))return!1}catch{return!1}}}if(m=l.child,l.subtreeFlags&16384&&m!==null)m.return=l,l=m;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Ps(s,l){for(l&=~kp,l&=~jd,s.suspendedLanes|=l,s.pingedLanes&=~l,s=s.expirationTimes;0<l;){var m=31-zr(l),y=1<<m;s[m]=-1,l&=~y}}function CS(s){if((mr&6)!==0)throw Error(r(327));dl();var l=lr(s,0);if((l&1)===0)return Ci(s,pt()),null;var m=Fd(s,l);if(s.tag!==0&&m===2){var y=or(s);y!==0&&(l=y,m=Op(s,y))}if(m===1)throw m=Rc,la(s,0),Ps(s,l),Ci(s,pt()),m;if(m===6)throw Error(r(345));return s.finishedWork=s.current.alternate,s.finishedLanes=l,ca(s,Si,os),Ci(s,pt()),null}function Np(s,l){var m=mr;mr|=1;try{return s(l)}finally{mr=m,mr===0&&(ul=pt()+500,pd&&ws())}}function aa(s){Rs!==null&&Rs.tag===0&&(mr&6)===0&&dl();var l=mr;mr|=1;var m=Gi.transition,y=Vt;try{if(Gi.transition=null,Vt=1,s)return s()}finally{Vt=y,Gi.transition=m,mr=l,(mr&6)===0&&ws()}}function Mp(){Ii=cl.current,Ar(cl)}function la(s,l){s.finishedWork=null,s.finishedLanes=0;var m=s.timeoutHandle;if(m!==-1&&(s.timeoutHandle=-1,n3(m)),dn!==null)for(m=dn.return;m!==null;){var y=m;switch(Wm(y),y.tag){case 1:y=y.type.childContextTypes,y!=null&&fd();break;case 3:sl(),Ar(yi),Ar(Yn),rp();break;case 5:ep(y);break;case 4:sl();break;case 13:Ar(qr);break;case 19:Ar(qr);break;case 10:Xm(y.type._context);break;case 22:case 23:Mp()}m=m.return}if(Tn=s,dn=s=Os(s.current,null),Hn=Ii=l,Sn=0,Rc=null,kp=jd=sa=0,Si=Tc=null,na!==null){for(l=0;l<na.length;l++)if(m=na[l],y=m.interleaved,y!==null){m.interleaved=null;var w=y.next,R=m.pending;if(R!==null){var H=R.next;R.next=w,y.next=H}m.pending=y}na=null}return s}function wS(s,l){do{var m=dn;try{if(Gm(),Ed.current=Td,$d){for(var y=Kr.memoizedState;y!==null;){var w=y.queue;w!==null&&(w.pending=null),y=y.next}$d=!1}if(oa=0,Rn=_n=Kr=null,Cc=!1,wc=0,$p.current=null,m===null||m.return===null){Sn=1,Rc=l,dn=null;break}e:{var R=s,H=m.return,J=m,ie=l;if(l=Hn,J.flags|=32768,ie!==null&&typeof ie=="object"&&typeof ie.then=="function"){var _e=ie,Be=J,Fe=Be.tag;if((Be.mode&1)===0&&(Fe===0||Fe===11||Fe===15)){var Ne=Be.alternate;Ne?(Be.updateQueue=Ne.updateQueue,Be.memoizedState=Ne.memoizedState,Be.lanes=Ne.lanes):(Be.updateQueue=null,Be.memoizedState=null)}var dt=G_(H);if(dt!==null){dt.flags&=-257,X_(dt,H,J,R,l),dt.mode&1&&K_(R,_e,l),l=dt,ie=_e;var St=l.updateQueue;if(St===null){var Ct=new Set;Ct.add(ie),l.updateQueue=Ct}else St.add(ie);break e}else{if((l&1)===0){K_(R,_e,l),zp();break e}ie=Error(r(426))}}else if(Wr&&J.mode&1){var on=G_(H);if(on!==null){(on.flags&65536)===0&&(on.flags|=256),X_(on,H,J,R,l),qm(al(ie,J));break e}}R=ie=al(ie,J),Sn!==4&&(Sn=2),Tc===null?Tc=[R]:Tc.push(R),R=H;do{switch(R.tag){case 3:R.flags|=65536,l&=-l,R.lanes|=l;var pe=U_(R,ie,l);y_(R,pe);break e;case 1:J=ie;var oe=R.type,ve=R.stateNode;if((R.flags&128)===0&&(typeof oe.getDerivedStateFromError=="function"||ve!==null&&typeof ve.componentDidCatch=="function"&&(ks===null||!ks.has(ve)))){R.flags|=65536,l&=-l,R.lanes|=l;var Ve=q_(R,J,l);y_(R,Ve);break e}}R=R.return}while(R!==null)}$S(m)}catch(wt){l=wt,dn===m&&m!==null&&(dn=m=m.return);continue}break}while(!0)}function xS(){var s=zd.current;return zd.current=Td,s===null?Td:s}function zp(){(Sn===0||Sn===3||Sn===2)&&(Sn=4),Tn===null||(sa&268435455)===0&&(jd&268435455)===0||Ps(Tn,Hn)}function Fd(s,l){var m=mr;mr|=2;var y=xS();(Tn!==s||Hn!==l)&&(os=null,la(s,l));do try{R3();break}catch(w){wS(s,w)}while(!0);if(Gm(),mr=m,zd.current=y,dn!==null)throw Error(r(261));return Tn=null,Hn=0,Sn}function R3(){for(;dn!==null;)ES(dn)}function T3(){for(;dn!==null&&!Ye();)ES(dn)}function ES(s){var l=TS(s.alternate,s,Ii);s.memoizedProps=s.pendingProps,l===null?$S(s):dn=l,$p.current=null}function $S(s){var l=s;do{var m=l.alternate;if(s=l.return,(l.flags&32768)===0){if(m=S3(m,l,Ii),m!==null){dn=m;return}}else{if(m=C3(m,l),m!==null){m.flags&=32767,dn=m;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{Sn=6,dn=null;return}}if(l=l.sibling,l!==null){dn=l;return}dn=l=s}while(l!==null);Sn===0&&(Sn=5)}function ca(s,l,m){var y=Vt,w=Gi.transition;try{Gi.transition=null,Vt=1,P3(s,l,m,y)}finally{Gi.transition=w,Vt=y}return null}function P3(s,l,m,y){do dl();while(Rs!==null);if((mr&6)!==0)throw Error(r(327));m=s.finishedWork;var w=s.finishedLanes;if(m===null)return null;if(s.finishedWork=null,s.finishedLanes=0,m===s.current)throw Error(r(177));s.callbackNode=null,s.callbackPriority=0;var R=m.lanes|m.childLanes;if(Dn(s,R),s===Tn&&(dn=Tn=null,Hn=0),(m.subtreeFlags&2064)===0&&(m.flags&2064)===0||Ld||(Ld=!0,PS(Kt,function(){return dl(),null})),R=(m.flags&15990)!==0,(m.subtreeFlags&15990)!==0||R){R=Gi.transition,Gi.transition=null;var H=Vt;Vt=1;var J=mr;mr|=4,$p.current=null,x3(s,m),gS(m,s),YR(zm),Zu=!!Mm,zm=Mm=null,s.current=m,E3(m),Tt(),mr=J,Vt=H,Gi.transition=R}else s.current=m;if(Ld&&(Ld=!1,Rs=s,Dd=w),R=s.pendingLanes,R===0&&(ks=null),rn(m.stateNode),Ci(s,pt()),l!==null)for(y=s.onRecoverableError,m=0;m<l.length;m++)w=l[m],y(w.value,{componentStack:w.stack,digest:w.digest});if(Bd)throw Bd=!1,s=Tp,Tp=null,s;return(Dd&1)!==0&&s.tag!==0&&dl(),R=s.pendingLanes,(R&1)!==0?s===Pp?Pc++:(Pc=0,Pp=s):Pc=0,ws(),null}function dl(){if(Rs!==null){var s=bn(Dd),l=Gi.transition,m=Vt;try{if(Gi.transition=null,Vt=16>s?16:s,Rs===null)var y=!1;else{if(s=Rs,Rs=null,Dd=0,(mr&6)!==0)throw Error(r(331));var w=mr;for(mr|=4,yt=s.current;yt!==null;){var R=yt,H=R.child;if((yt.flags&16)!==0){var J=R.deletions;if(J!==null){for(var ie=0;ie<J.length;ie++){var _e=J[ie];for(yt=_e;yt!==null;){var Be=yt;switch(Be.tag){case 0:case 11:case 15:kc(8,Be,R)}var Fe=Be.child;if(Fe!==null)Fe.return=Be,yt=Fe;else for(;yt!==null;){Be=yt;var Ne=Be.sibling,dt=Be.return;if(dS(Be),Be===_e){yt=null;break}if(Ne!==null){Ne.return=dt,yt=Ne;break}yt=dt}}}var St=R.alternate;if(St!==null){var Ct=St.child;if(Ct!==null){St.child=null;do{var on=Ct.sibling;Ct.sibling=null,Ct=on}while(Ct!==null)}}yt=R}}if((R.subtreeFlags&2064)!==0&&H!==null)H.return=R,yt=H;else e:for(;yt!==null;){if(R=yt,(R.flags&2048)!==0)switch(R.tag){case 0:case 11:case 15:kc(9,R,R.return)}var pe=R.sibling;if(pe!==null){pe.return=R.return,yt=pe;break e}yt=R.return}}var oe=s.current;for(yt=oe;yt!==null;){H=yt;var ve=H.child;if((H.subtreeFlags&2064)!==0&&ve!==null)ve.return=H,yt=ve;else e:for(H=oe;yt!==null;){if(J=yt,(J.flags&2048)!==0)try{switch(J.tag){case 0:case 11:case 15:Md(9,J)}}catch(wt){Zr(J,J.return,wt)}if(J===H){yt=null;break e}var Ve=J.sibling;if(Ve!==null){Ve.return=J.return,yt=Ve;break e}yt=J.return}}if(mr=w,ws(),fr&&typeof fr.onPostCommitFiberRoot=="function")try{fr.onPostCommitFiberRoot(It,s)}catch{}y=!0}return y}finally{Vt=m,Gi.transition=l}}return!1}function kS(s,l,m){l=al(m,l),l=U_(s,l,1),s=Es(s,l,1),l=ai(),s!==null&&(Sr(s,1,l),Ci(s,l))}function Zr(s,l,m){if(s.tag===3)kS(s,s,m);else for(;l!==null;){if(l.tag===3){kS(l,s,m);break}else if(l.tag===1){var y=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(ks===null||!ks.has(y))){s=al(m,s),s=q_(l,s,1),l=Es(l,s,1),s=ai(),l!==null&&(Sr(l,1,s),Ci(l,s));break}}l=l.return}}function O3(s,l,m){var y=s.pingCache;y!==null&&y.delete(l),l=ai(),s.pingedLanes|=s.suspendedLanes&m,Tn===s&&(Hn&m)===m&&(Sn===4||Sn===3&&(Hn&130023424)===Hn&&500>pt()-Rp?la(s,0):kp|=m),Ci(s,l)}function RS(s,l){l===0&&((s.mode&1)===0?l=1:(l=Ln,Ln<<=1,(Ln&130023424)===0&&(Ln=4194304)));var m=ai();s=rs(s,l),s!==null&&(Sr(s,l,m),Ci(s,m))}function I3(s){var l=s.memoizedState,m=0;l!==null&&(m=l.retryLane),RS(s,m)}function N3(s,l){var m=0;switch(s.tag){case 13:var y=s.stateNode,w=s.memoizedState;w!==null&&(m=w.retryLane);break;case 19:y=s.stateNode;break;default:throw Error(r(314))}y!==null&&y.delete(l),RS(s,m)}var TS;TS=function(s,l,m){if(s!==null)if(s.memoizedProps!==l.pendingProps||yi.current)_i=!0;else{if((s.lanes&m)===0&&(l.flags&128)===0)return _i=!1,_3(s,l,m);_i=(s.flags&131072)!==0}else _i=!1,Wr&&(l.flags&1048576)!==0&&l_(l,vd,l.index);switch(l.lanes=0,l.tag){case 2:var y=l.type;Id(s,l),s=l.pendingProps;var w=Za(l,Yn.current);ol(l,m),w=op(null,l,y,s,w,m);var R=sp();return l.flags|=1,typeof w=="object"&&w!==null&&typeof w.render=="function"&&w.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,bi(y)?(R=!0,md(l)):R=!1,l.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,Qm(l),w.updater=Pd,l.stateNode=w,w._reactInternals=l,hp(l,y,s,m),l=gp(null,l,y,!0,R,m)):(l.tag=0,Wr&&R&&Fm(l),si(null,l,w,m),l=l.child),l;case 16:y=l.elementType;e:{switch(Id(s,l),s=l.pendingProps,w=y._init,y=w(y._payload),l.type=y,w=l.tag=z3(y),s=mo(y,s),w){case 0:l=pp(null,l,y,s,m);break e;case 1:l=tS(null,l,y,s,m);break e;case 11:l=Y_(null,l,y,s,m);break e;case 14:l=J_(null,l,y,mo(y.type,s),m);break e}throw Error(r(306,y,""))}return l;case 0:return y=l.type,w=l.pendingProps,w=l.elementType===y?w:mo(y,w),pp(s,l,y,w,m);case 1:return y=l.type,w=l.pendingProps,w=l.elementType===y?w:mo(y,w),tS(s,l,y,w,m);case 3:e:{if(rS(l),s===null)throw Error(r(387));y=l.pendingProps,R=l.memoizedState,w=R.element,v_(s,l),wd(l,y,null,m);var H=l.memoizedState;if(y=H.element,R.isDehydrated)if(R={element:y,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},l.updateQueue.baseState=R,l.memoizedState=R,l.flags&256){w=al(Error(r(423)),l),l=nS(s,l,y,m,w);break e}else if(y!==w){w=al(Error(r(424)),l),l=nS(s,l,y,m,w);break e}else for(Oi=_s(l.stateNode.containerInfo.firstChild),Pi=l,Wr=!0,fo=null,m=p_(l,null,y,m),l.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if(rl(),y===w){l=is(s,l,m);break e}si(s,l,y,m)}l=l.child}return l;case 5:return __(l),s===null&&Um(l),y=l.type,w=l.pendingProps,R=s!==null?s.memoizedProps:null,H=w.children,jm(y,w)?H=null:R!==null&&jm(y,R)&&(l.flags|=32),eS(s,l),si(s,l,H,m),l.child;case 6:return s===null&&Um(l),null;case 13:return iS(s,l,m);case 4:return Zm(l,l.stateNode.containerInfo),y=l.pendingProps,s===null?l.child=nl(l,null,y,m):si(s,l,y,m),l.child;case 11:return y=l.type,w=l.pendingProps,w=l.elementType===y?w:mo(y,w),Y_(s,l,y,w,m);case 7:return si(s,l,l.pendingProps,m),l.child;case 8:return si(s,l,l.pendingProps.children,m),l.child;case 12:return si(s,l,l.pendingProps.children,m),l.child;case 10:e:{if(y=l.type._context,w=l.pendingProps,R=l.memoizedProps,H=w.value,Br(_d,y._currentValue),y._currentValue=H,R!==null)if(ho(R.value,H)){if(R.children===w.children&&!yi.current){l=is(s,l,m);break e}}else for(R=l.child,R!==null&&(R.return=l);R!==null;){var J=R.dependencies;if(J!==null){H=R.child;for(var ie=J.firstContext;ie!==null;){if(ie.context===y){if(R.tag===1){ie=ns(-1,m&-m),ie.tag=2;var _e=R.updateQueue;if(_e!==null){_e=_e.shared;var Be=_e.pending;Be===null?ie.next=ie:(ie.next=Be.next,Be.next=ie),_e.pending=ie}}R.lanes|=m,ie=R.alternate,ie!==null&&(ie.lanes|=m),Ym(R.return,m,l),J.lanes|=m;break}ie=ie.next}}else if(R.tag===10)H=R.type===l.type?null:R.child;else if(R.tag===18){if(H=R.return,H===null)throw Error(r(341));H.lanes|=m,J=H.alternate,J!==null&&(J.lanes|=m),Ym(H,m,l),H=R.sibling}else H=R.child;if(H!==null)H.return=R;else for(H=R;H!==null;){if(H===l){H=null;break}if(R=H.sibling,R!==null){R.return=H.return,H=R;break}H=H.return}R=H}si(s,l,w.children,m),l=l.child}return l;case 9:return w=l.type,y=l.pendingProps.children,ol(l,m),w=qi(w),y=y(w),l.flags|=1,si(s,l,y,m),l.child;case 14:return y=l.type,w=mo(y,l.pendingProps),w=mo(y.type,w),J_(s,l,y,w,m);case 15:return Q_(s,l,l.type,l.pendingProps,m);case 17:return y=l.type,w=l.pendingProps,w=l.elementType===y?w:mo(y,w),Id(s,l),l.tag=1,bi(y)?(s=!0,md(l)):s=!1,ol(l,m),W_(l,y,w),hp(l,y,w,m),gp(null,l,y,!0,s,m);case 19:return sS(s,l,m);case 22:return Z_(s,l,m)}throw Error(r(156,l.tag))};function PS(s,l){return dr(s,l)}function M3(s,l,m,y){this.tag=s,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xi(s,l,m,y){return new M3(s,l,m,y)}function jp(s){return s=s.prototype,!(!s||!s.isReactComponent)}function z3(s){if(typeof s=="function")return jp(s)?1:0;if(s!=null){if(s=s.$$typeof,s===M)return 11;if(s===F)return 14}return 2}function Os(s,l){var m=s.alternate;return m===null?(m=Xi(s.tag,l,s.key,s.mode),m.elementType=s.elementType,m.type=s.type,m.stateNode=s.stateNode,m.alternate=s,s.alternate=m):(m.pendingProps=l,m.type=s.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=s.flags&14680064,m.childLanes=s.childLanes,m.lanes=s.lanes,m.child=s.child,m.memoizedProps=s.memoizedProps,m.memoizedState=s.memoizedState,m.updateQueue=s.updateQueue,l=s.dependencies,m.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},m.sibling=s.sibling,m.index=s.index,m.ref=s.ref,m}function Wd(s,l,m,y,w,R){var H=2;if(y=s,typeof s=="function")jp(s)&&(H=1);else if(typeof s=="string")H=5;else e:switch(s){case O:return ua(m.children,w,R,l);case N:H=8,w|=8;break;case I:return s=Xi(12,m,l,w|2),s.elementType=I,s.lanes=R,s;case j:return s=Xi(13,m,l,w),s.elementType=j,s.lanes=R,s;case B:return s=Xi(19,m,l,w),s.elementType=B,s.lanes=R,s;case V:return Vd(m,w,R,l);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case z:H=10;break e;case D:H=9;break e;case M:H=11;break e;case F:H=14;break e;case W:H=16,y=null;break e}throw Error(r(130,s==null?s:typeof s,""))}return l=Xi(H,m,l,w),l.elementType=s,l.type=y,l.lanes=R,l}function ua(s,l,m,y){return s=Xi(7,s,y,l),s.lanes=m,s}function Vd(s,l,m,y){return s=Xi(22,s,y,l),s.elementType=V,s.lanes=m,s.stateNode={isHidden:!1},s}function Bp(s,l,m){return s=Xi(6,s,null,l),s.lanes=m,s}function Lp(s,l,m){return l=Xi(4,s.children!==null?s.children:[],s.key,l),l.lanes=m,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}function j3(s,l,m,y,w){this.tag=l,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=yr(0),this.expirationTimes=yr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yr(0),this.identifierPrefix=y,this.onRecoverableError=w,this.mutableSourceEagerHydrationData=null}function Dp(s,l,m,y,w,R,H,J,ie){return s=new j3(s,l,m,J,ie),l===1?(l=1,R===!0&&(l|=8)):l=0,R=Xi(3,null,null,l),s.current=R,R.stateNode=s,R.memoizedState={element:y,isDehydrated:m,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qm(R),s}function B3(s,l,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:y==null?null:""+y,children:s,containerInfo:l,implementation:m}}function OS(s){if(!s)return Cs;s=s._reactInternals;e:{if(Lt(s)!==s||s.tag!==1)throw Error(r(170));var l=s;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(bi(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(r(171))}if(s.tag===1){var m=s.type;if(bi(m))return o_(s,m,l)}return l}function IS(s,l,m,y,w,R,H,J,ie){return s=Dp(m,y,!0,s,w,R,H,J,ie),s.context=OS(null),m=s.current,y=ai(),w=Ts(m),R=ns(y,w),R.callback=l??null,Es(m,R,w),s.current.lanes=w,Sr(s,w,y),Ci(s,y),s}function Ud(s,l,m,y){var w=l.current,R=ai(),H=Ts(w);return m=OS(m),l.context===null?l.context=m:l.pendingContext=m,l=ns(R,H),l.payload={element:s},y=y===void 0?null:y,y!==null&&(l.callback=y),s=Es(w,l,H),s!==null&&(vo(s,w,H,R),Cd(s,w,H)),H}function qd(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function NS(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var m=s.retryLane;s.retryLane=m!==0&&m<l?m:l}}function Ap(s,l){NS(s,l),(s=s.alternate)&&NS(s,l)}function L3(){return null}var MS=typeof reportError=="function"?reportError:function(s){console.error(s)};function Hp(s){this._internalRoot=s}Kd.prototype.render=Hp.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(r(409));Ud(s,l,null,null)},Kd.prototype.unmount=Hp.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;aa(function(){Ud(null,s,null,null)}),l[Qo]=null}};function Kd(s){this._internalRoot=s}Kd.prototype.unstable_scheduleHydration=function(s){if(s){var l=gs();s={blockedOn:null,target:s,priority:l};for(var m=0;m<Ri.length&&l!==0&&l<Ri[m].priority;m++);Ri.splice(m,0,s),m===0&&Nr(s)}};function Fp(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function Gd(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function zS(){}function D3(s,l,m,y,w){if(w){if(typeof y=="function"){var R=y;y=function(){var _e=qd(H);R.call(_e)}}var H=IS(l,y,s,0,null,!1,!1,"",zS);return s._reactRootContainer=H,s[Qo]=H.current,mc(s.nodeType===8?s.parentNode:s),aa(),H}for(;w=s.lastChild;)s.removeChild(w);if(typeof y=="function"){var J=y;y=function(){var _e=qd(ie);J.call(_e)}}var ie=Dp(s,0,!1,null,null,!1,!1,"",zS);return s._reactRootContainer=ie,s[Qo]=ie.current,mc(s.nodeType===8?s.parentNode:s),aa(function(){Ud(l,ie,m,y)}),ie}function Xd(s,l,m,y,w){var R=m._reactRootContainer;if(R){var H=R;if(typeof w=="function"){var J=w;w=function(){var ie=qd(H);J.call(ie)}}Ud(l,H,s,w)}else H=D3(m,l,s,w,y);return qd(H)}$n=function(s){switch(s.tag){case 3:var l=s.stateNode;if(l.current.memoizedState.isDehydrated){var m=Gn(l.pendingLanes);m!==0&&(nn(l,m|1),Ci(l,pt()),(mr&6)===0&&(ul=pt()+500,ws()))}break;case 13:aa(function(){var y=rs(s,1);if(y!==null){var w=ai();vo(y,s,1,w)}}),Ap(s,1)}},gi=function(s){if(s.tag===13){var l=rs(s,134217728);if(l!==null){var m=ai();vo(l,s,134217728,m)}Ap(s,134217728)}},kn=function(s){if(s.tag===13){var l=Ts(s),m=rs(s,l);if(m!==null){var y=ai();vo(m,s,l,y)}Ap(s,l)}},gs=function(){return Vt},Aa=function(s,l){var m=Vt;try{return Vt=s,l()}finally{Vt=m}},tr=function(s,l,m){switch(l){case"input":if(be(s,m),l=m.name,m.type==="radio"&&l!=null){for(m=s;m.parentNode;)m=m.parentNode;for(m=m.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<m.length;l++){var y=m[l];if(y!==s&&y.form===s.form){var w=hd(y);if(!w)throw Error(r(90));le(y),be(y,w)}}}break;case"textarea":Oe(s,m);break;case"select":l=m.value,l!=null&&Ee(s,!!m.multiple,l,!1)}},kt=Np,ir=aa;var A3={usingClientEntryPoint:!1,Events:[vc,Ja,hd,nr,At,Np]},Oc={findFiberByHostInstance:Zs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},H3={bundleType:Oc.bundleType,version:Oc.version,rendererPackageName:Oc.rendererPackageName,rendererConfig:Oc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Lr(s),s===null?null:s.stateNode},findFiberByHostInstance:Oc.findFiberByHostInstance||L3,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yd.isDisabled&&Yd.supportsFiber)try{It=Yd.inject(H3),fr=Yd}catch{}}return wi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=A3,wi.createPortal=function(s,l){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Fp(l))throw Error(r(200));return B3(s,l,null,m)},wi.createRoot=function(s,l){if(!Fp(s))throw Error(r(299));var m=!1,y="",w=MS;return l!=null&&(l.unstable_strictMode===!0&&(m=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(w=l.onRecoverableError)),l=Dp(s,1,!1,null,null,m,!1,y,w),s[Qo]=l.current,mc(s.nodeType===8?s.parentNode:s),new Hp(l)},wi.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=Lr(l),s=s===null?null:s.stateNode,s},wi.flushSync=function(s){return aa(s)},wi.hydrate=function(s,l,m){if(!Gd(l))throw Error(r(200));return Xd(null,s,l,!0,m)},wi.hydrateRoot=function(s,l,m){if(!Fp(s))throw Error(r(405));var y=m!=null&&m.hydratedSources||null,w=!1,R="",H=MS;if(m!=null&&(m.unstable_strictMode===!0&&(w=!0),m.identifierPrefix!==void 0&&(R=m.identifierPrefix),m.onRecoverableError!==void 0&&(H=m.onRecoverableError)),l=IS(l,null,s,1,m??null,w,!1,R,H),s[Qo]=l.current,mc(s),y)for(s=0;s<y.length;s++)m=y[s],w=m._getVersion,w=w(m._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[m,w]:l.mutableSourceEagerHydrationData.push(m,w);return new Kd(l)},wi.render=function(s,l,m){if(!Gd(l))throw Error(r(200));return Xd(null,s,l,!1,m)},wi.unmountComponentAtNode=function(s){if(!Gd(s))throw Error(r(40));return s._reactRootContainer?(aa(function(){Xd(null,null,s,!1,function(){s._reactRootContainer=null,s[Qo]=null})}),!0):!1},wi.unstable_batchedUpdates=Np,wi.unstable_renderSubtreeIntoContainer=function(s,l,m,y){if(!Gd(m))throw Error(r(200));if(s==null||s._reactInternals===void 0)throw Error(r(38));return Xd(s,l,m,!1,y)},wi.version="18.3.1-next-f1338f8080-20240426",wi}var WS;function i2(){if(WS)return Up.exports;WS=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Up.exports=Y3(),Up.exports}var VS;function J3(){if(VS)return Jd;VS=1;var e=i2();return Jd.createRoot=e.createRoot,Jd.hydrateRoot=e.hydrateRoot,Jd}var Q3=J3();const Z3=Ou(Q3);var Gp={exports:{}};/*!
41
+ Copyright (c) 2018 Jed Watson.
42
+ Licensed under the MIT License (MIT), see
43
+ http://jedwatson.github.io/classnames
44
+ */var US;function e5(){return US||(US=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",a=0;a<arguments.length;a++){var c=arguments[a];c&&(o=i(o,n(c)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var c in o)t.call(o,c)&&o[c]&&(a=i(a,c));return a}function i(o,a){return a?o?o+" "+a:o+a:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Gp)),Gp.exports}var t5=e5();const re=Ou(t5);function Re(){return Re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Re.apply(null,arguments)}function bt(e){"@babel/helpers - typeof";return bt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bt(e)}var r5=Symbol.for("react.element"),n5=Symbol.for("react.transitional.element"),i5=Symbol.for("react.fragment");function o2(e){return e&&bt(e)==="object"&&(e.$$typeof===r5||e.$$typeof===n5)&&e.type===i5}function di(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[];return Q.Children.forEach(e,function(n){n==null&&!t.keepEmpty||(Array.isArray(n)?r=r.concat(di(n)):o2(n)&&n.props?r=r.concat(di(n.props.children,t)):r.push(n))}),r}var tv={},o5=function(t){};function s5(e,t){}function a5(e,t){}function l5(){tv={}}function s2(e,t,r){!t&&!tv[r]&&(e(!1,r),tv[r]=!0)}function jn(e,t){s2(s5,e,t)}function c5(e,t){s2(a5,e,t)}jn.preMessage=o5;jn.resetWarned=l5;jn.noteOnce=c5;function u5(e,t){if(bt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a2(e){var t=u5(e,"string");return bt(t)=="symbol"?t:t+""}function K(e,t,r){return(t=a2(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function X(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qS(Object(r),!0).forEach(function(n){K(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var qs=i2();const rv=Ou(qs),d5=n2({__proto__:null,default:rv},[qs]);function uu(e){return e instanceof HTMLElement||e instanceof SVGElement}function h5(e){return e&&bt(e)==="object"&&uu(e.nativeElement)?e.nativeElement:uu(e)?e:null}function Sh(e){var t=h5(e);if(t)return t;if(e instanceof Q.Component){var r;return(r=rv.findDOMNode)===null||r===void 0?void 0:r.call(rv,e)}return null}var Xp={exports:{}},xr={};/**
45
+ * @license React
46
+ * react-is.production.min.js
47
+ *
48
+ * Copyright (c) Facebook, Inc. and its affiliates.
49
+ *
50
+ * This source code is licensed under the MIT license found in the
51
+ * LICENSE file in the root directory of this source tree.
52
+ */var KS;function f5(){if(KS)return xr;KS=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function S(_){if(typeof _=="object"&&_!==null){var C=_.$$typeof;switch(C){case e:switch(_=_.type,_){case r:case i:case n:case d:case f:return _;default:switch(_=_&&_.$$typeof,_){case c:case a:case u:case g:case p:case o:return _;default:return C}}case t:return C}}}return xr.ContextConsumer=a,xr.ContextProvider=o,xr.Element=e,xr.ForwardRef=u,xr.Fragment=r,xr.Lazy=g,xr.Memo=p,xr.Portal=t,xr.Profiler=i,xr.StrictMode=n,xr.Suspense=d,xr.SuspenseList=f,xr.isAsyncMode=function(){return!1},xr.isConcurrentMode=function(){return!1},xr.isContextConsumer=function(_){return S(_)===a},xr.isContextProvider=function(_){return S(_)===o},xr.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===e},xr.isForwardRef=function(_){return S(_)===u},xr.isFragment=function(_){return S(_)===r},xr.isLazy=function(_){return S(_)===g},xr.isMemo=function(_){return S(_)===p},xr.isPortal=function(_){return S(_)===t},xr.isProfiler=function(_){return S(_)===i},xr.isStrictMode=function(_){return S(_)===n},xr.isSuspense=function(_){return S(_)===d},xr.isSuspenseList=function(_){return S(_)===f},xr.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===r||_===i||_===n||_===d||_===f||_===v||typeof _=="object"&&_!==null&&(_.$$typeof===g||_.$$typeof===p||_.$$typeof===o||_.$$typeof===a||_.$$typeof===u||_.$$typeof===b||_.getModuleId!==void 0)},xr.typeOf=S,xr}var GS;function m5(){return GS||(GS=1,Xp.exports=f5()),Xp.exports}var Yp=m5();function Iu(e,t,r){var n=h.useRef({});return(!("value"in n.current)||r(n.current.condition,t))&&(n.current.value=e(),n.current.condition=t),n.current.value}var p5=Number(h.version.split(".")[0]),Q0=function(t,r){typeof t=="function"?t(r):bt(t)==="object"&&t&&"current"in t&&(t.current=r)},co=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);return i.length<=1?i[0]:function(o){r.forEach(function(a){Q0(a,o)})}},qo=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Iu(function(){return co.apply(void 0,r)},r,function(i,o){return i.length!==o.length||i.every(function(a,c){return a!==o[c]})})},Qs=function(t){var r,n;if(!t)return!1;if(Z0(t)&&p5>=19)return!0;var i=Yp.isMemo(t)?t.type.type:t.type;return!(typeof i=="function"&&!((r=i.prototype)!==null&&r!==void 0&&r.render)&&i.$$typeof!==Yp.ForwardRef||typeof t=="function"&&!((n=t.prototype)!==null&&n!==void 0&&n.render)&&t.$$typeof!==Yp.ForwardRef)};function Z0(e){return h.isValidElement(e)&&!o2(e)}var g5=function(t){return Z0(t)&&Qs(t)},Ma=function(t){if(t&&Z0(t)){var r=t;return r.props.propertyIsEnumerable("ref")?r.props.ref:r.ref}return null},nv=h.createContext(null);function v5(e){var t=e.children,r=e.onBatchResize,n=h.useRef(0),i=h.useRef([]),o=h.useContext(nv),a=h.useCallback(function(c,u,d){n.current+=1;var f=n.current;i.current.push({size:c,element:u,data:d}),Promise.resolve().then(function(){f===n.current&&(r==null||r(i.current),i.current=[])}),o==null||o(c,u,d)},[r,o]);return h.createElement(nv.Provider,{value:a},t)}var l2=(function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(i,o){return i[0]===r?(n=o,!0):!1}),n}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(r,n){var i=e(this.__entries__,r);~i?this.__entries__[i][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,i=e(n,r);~i&&n.splice(i,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var i=0,o=this.__entries__;i<o.length;i++){var a=o[i];r.call(n,a[1],a[0])}},t})()})(),iv=typeof window<"u"&&typeof document<"u"&&window.document===document,Wh=(function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()})(),y5=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Wh):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),b5=2;function _5(e,t){var r=!1,n=!1,i=0;function o(){r&&(r=!1,e()),n&&c()}function a(){y5(o)}function c(){var u=Date.now();if(r){if(u-i<b5)return;n=!0}else r=!0,n=!1,setTimeout(a,t);i=u}return c}var S5=20,C5=["top","right","bottom","left","width","height","size","weight"],w5=typeof MutationObserver<"u",x5=(function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=_5(this.refresh.bind(this),S5)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var r=this.observers_,n=r.indexOf(t);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return t.forEach(function(r){return r.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!iv||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),w5?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!iv||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,i=C5.some(function(o){return!!~n.indexOf(o)});i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e})(),c2=(function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var i=n[r];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e}),Hl=(function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||Wh}),u2=Ef(0,0,0,0);function Vh(e){return parseFloat(e)||0}function XS(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(n,i){var o=e["border-"+i+"-width"];return n+Vh(o)},0)}function E5(e){for(var t=["top","right","bottom","left"],r={},n=0,i=t;n<i.length;n++){var o=i[n],a=e["padding-"+o];r[o]=Vh(a)}return r}function $5(e){var t=e.getBBox();return Ef(0,0,t.width,t.height)}function k5(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return u2;var n=Hl(e).getComputedStyle(e),i=E5(n),o=i.left+i.right,a=i.top+i.bottom,c=Vh(n.width),u=Vh(n.height);if(n.boxSizing==="border-box"&&(Math.round(c+o)!==t&&(c-=XS(n,"left","right")+o),Math.round(u+a)!==r&&(u-=XS(n,"top","bottom")+a)),!T5(e)){var d=Math.round(c+o)-t,f=Math.round(u+a)-r;Math.abs(d)!==1&&(c-=d),Math.abs(f)!==1&&(u-=f)}return Ef(i.left,i.top,c,u)}var R5=(function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Hl(e).SVGGraphicsElement}:function(e){return e instanceof Hl(e).SVGElement&&typeof e.getBBox=="function"}})();function T5(e){return e===Hl(e).document.documentElement}function P5(e){return iv?R5(e)?$5(e):k5(e):u2}function O5(e){var t=e.x,r=e.y,n=e.width,i=e.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(o.prototype);return c2(a,{x:t,y:r,width:n,height:i,top:r,right:t+n,bottom:i+r,left:t}),a}function Ef(e,t,r,n){return{x:e,y:t,width:r,height:n}}var I5=(function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ef(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=P5(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e})(),N5=(function(){function e(t,r){var n=O5(r);c2(this,{target:t,contentRect:n})}return e})(),M5=(function(){function e(t,r,n){if(this.activeObservations_=[],this.observations_=new l2,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=r,this.callbackCtx_=n}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Hl(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new I5(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Hl(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new N5(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e})(),d2=typeof WeakMap<"u"?new WeakMap:new l2,h2=(function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=x5.getInstance(),n=new M5(t,r,this);d2.set(this,n)}return e})();["observe","unobserve","disconnect"].forEach(function(e){h2.prototype[e]=function(){var t;return(t=d2.get(this))[e].apply(t,arguments)}});var z5=(function(){return typeof Wh.ResizeObserver<"u"?Wh.ResizeObserver:h2})(),As=new Map;function j5(e){e.forEach(function(t){var r,n=t.target;(r=As.get(n))===null||r===void 0||r.forEach(function(i){return i(n)})})}var f2=new z5(j5);function B5(e,t){As.has(e)||(As.set(e,new Set),f2.observe(e)),As.get(e).add(t)}function L5(e,t){As.has(e)&&(As.get(e).delete(t),As.get(e).size||(f2.unobserve(e),As.delete(e)))}function pn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YS(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a2(n.key),n)}}function gn(e,t,r){return t&&YS(e.prototype,t),r&&YS(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function du(e,t){return du=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},du(e,t)}function ds(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&du(e,t)}function hu(e){return hu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hu(e)}function ey(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ey=function(){return!!e})()}function Qt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function D5(e,t){if(t&&(bt(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qt(e)}function hs(e){var t=ey();return function(){var r,n=hu(e);if(t){var i=hu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return D5(this,r)}}var A5=(function(e){ds(r,e);var t=hs(r);function r(){return pn(this,r),t.apply(this,arguments)}return gn(r,[{key:"render",value:function(){return this.props.children}}]),r})(h.Component);function H5(e,t){var r=e.children,n=e.disabled,i=h.useRef(null),o=h.useRef(null),a=h.useContext(nv),c=typeof r=="function",u=c?r(i):r,d=h.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),f=!c&&h.isValidElement(u)&&Qs(u),p=f?Ma(u):null,g=qo(p,i),v=function(){var C;return Sh(i.current)||(i.current&&bt(i.current)==="object"?Sh((C=i.current)===null||C===void 0?void 0:C.nativeElement):null)||Sh(o.current)};h.useImperativeHandle(t,function(){return v()});var b=h.useRef(e);b.current=e;var S=h.useCallback(function(_){var C=b.current,x=C.onResize,E=C.data,k=_.getBoundingClientRect(),P=k.width,T=k.height,O=_.offsetWidth,N=_.offsetHeight,I=Math.floor(P),z=Math.floor(T);if(d.current.width!==I||d.current.height!==z||d.current.offsetWidth!==O||d.current.offsetHeight!==N){var D={width:I,height:z,offsetWidth:O,offsetHeight:N};d.current=D;var M=O===Math.round(P)?P:O,j=N===Math.round(T)?T:N,B=X(X({},D),{},{offsetWidth:M,offsetHeight:j});a==null||a(B,_,E),x&&Promise.resolve().then(function(){x(B,_)})}},[]);return h.useEffect(function(){var _=v();return _&&!n&&B5(_,S),function(){return L5(_,S)}},[i.current,n]),h.createElement(A5,{ref:o},f?h.cloneElement(u,{ref:g}):u)}var F5=h.forwardRef(H5),W5="rc-observer-key";function V5(e,t){var r=e.children,n=typeof r=="function"?[r]:di(r);return n.map(function(i,o){var a=(i==null?void 0:i.key)||"".concat(W5,"-").concat(o);return h.createElement(F5,Re({},e,{key:a,ref:o===0?t:void 0}),i)})}var oo=h.forwardRef(V5);oo.Collection=v5;function ov(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function U5(e){if(Array.isArray(e))return ov(e)}function m2(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ty(e,t){if(e){if(typeof e=="string")return ov(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ov(e,t):void 0}}function q5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
53
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function We(e){return U5(e)||m2(e)||ty(e)||q5()}var p2=function(t){return+setTimeout(t,16)},g2=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(p2=function(t){return window.requestAnimationFrame(t)},g2=function(t){return window.cancelAnimationFrame(t)});var JS=0,ry=new Map;function v2(e){ry.delete(e)}var $r=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;JS+=1;var n=JS;function i(o){if(o===0)v2(n),t();else{var a=p2(function(){i(o-1)});ry.set(n,a)}}return i(r),n};$r.cancel=function(e){var t=ry.get(e);return v2(e),g2(t)};function y2(e){if(Array.isArray(e))return e}function K5(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,a,c=[],u=!0,d=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(c.push(n.value),c.length!==t);u=!0);}catch(f){d=!0,i=f}finally{try{if(!u&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(d)throw i}}return c}}function b2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
54
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function se(e,t){return y2(e)||K5(e,t)||ty(e,t)||b2()}function fu(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function ni(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function sv(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}var QS="data-rc-order",ZS="data-rc-priority",G5="rc-util-key",av=new Map;function _2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):G5}function $f(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function X5(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function ny(e){return Array.from((av.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function S2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ni())return null;var r=t.csp,n=t.prepend,i=t.priority,o=i===void 0?0:i,a=X5(n),c=a==="prependQueue",u=document.createElement("style");u.setAttribute(QS,a),c&&o&&u.setAttribute(ZS,"".concat(o)),r!=null&&r.nonce&&(u.nonce=r==null?void 0:r.nonce),u.innerHTML=e;var d=$f(t),f=d.firstChild;if(n){if(c){var p=(t.styles||ny(d)).filter(function(g){if(!["prepend","prependQueue"].includes(g.getAttribute(QS)))return!1;var v=Number(g.getAttribute(ZS)||0);return o>=v});if(p.length)return d.insertBefore(u,p[p.length-1].nextSibling),u}d.insertBefore(u,f)}else d.appendChild(u);return u}function C2(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=$f(t);return(t.styles||ny(r)).find(function(n){return n.getAttribute(_2(t))===e})}function mu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=C2(e,t);if(r){var n=$f(t);n.removeChild(r)}}function Y5(e,t){var r=av.get(e);if(!r||!sv(document,r)){var n=S2("",t),i=n.parentNode;av.set(e,i),e.removeChild(n)}}function us(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=$f(r),i=ny(n),o=X(X({},r),{},{styles:i});Y5(n,o);var a=C2(t,o);if(a){var c,u;if((c=o.csp)!==null&&c!==void 0&&c.nonce&&a.nonce!==((u=o.csp)===null||u===void 0?void 0:u.nonce)){var d;a.nonce=(d=o.csp)===null||d===void 0?void 0:d.nonce}return a.innerHTML!==e&&(a.innerHTML=e),a}var f=S2(e,o);return f.setAttribute(_2(o),t),f}function J5(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Bt(e,t){if(e==null)return{};var r,n,i=J5(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function pu(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=new Set;function i(o,a){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=n.has(o);if(jn(!u,"Warning: There may be circular references"),u)return!1;if(o===a)return!0;if(r&&c>1)return!1;n.add(o);var d=c+1;if(Array.isArray(o)){if(!Array.isArray(a)||o.length!==a.length)return!1;for(var f=0;f<o.length;f++)if(!i(o[f],a[f],d))return!1;return!0}if(o&&a&&bt(o)==="object"&&bt(a)==="object"){var p=Object.keys(o);return p.length!==Object.keys(a).length?!1:p.every(function(g){return i(o[g],a[g],d)})}return!1}return i(e,t)}var Q5="%";function lv(e){return e.join(Q5)}var Z5=(function(){function e(t){pn(this,e),K(this,"instanceId",void 0),K(this,"cache",new Map),K(this,"extracted",new Set),this.instanceId=t}return gn(e,[{key:"get",value:function(r){return this.opGet(lv(r))}},{key:"opGet",value:function(r){return this.cache.get(r)||null}},{key:"update",value:function(r,n){return this.opUpdate(lv(r),n)}},{key:"opUpdate",value:function(r,n){var i=this.cache.get(r),o=n(i);o===null?this.cache.delete(r):this.cache.set(r,o)}}]),e})(),Fl="data-token-hash",xo="data-css-hash",Hs="__cssinjs_instance__";function eT(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(xo,"]"))||[],r=document.head.firstChild;Array.from(t).forEach(function(i){i[Hs]=i[Hs]||e,i[Hs]===e&&document.head.insertBefore(i,r)});var n={};Array.from(document.querySelectorAll("style[".concat(xo,"]"))).forEach(function(i){var o=i.getAttribute(xo);if(n[o]){if(i[Hs]===e){var a;(a=i.parentNode)===null||a===void 0||a.removeChild(i)}}else n[o]=!0})}return new Z5(e)}var Nu=h.createContext({hashPriority:"low",cache:eT(),defaultCache:!0});function tT(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var iy=(function(){function e(){pn(this,e),K(this,"cache",void 0),K(this,"keys",void 0),K(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return gn(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(r){var n,i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return r.forEach(function(c){if(!a)a=void 0;else{var u;a=(u=a)===null||u===void 0||(u=u.map)===null||u===void 0?void 0:u.get(c)}}),(n=a)!==null&&n!==void 0&&n.value&&o&&(a.value[1]=this.cacheCallTimes++),(i=a)===null||i===void 0?void 0:i.value}},{key:"get",value:function(r){var n;return(n=this.internalGet(r,!0))===null||n===void 0?void 0:n[0]}},{key:"has",value:function(r){return!!this.internalGet(r)}},{key:"set",value:function(r,n){var i=this;if(!this.has(r)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(d,f){var p=se(d,2),g=p[1];return i.internalGet(f)[1]<g?[f,i.internalGet(f)[1]]:d},[this.keys[0],this.cacheCallTimes]),a=se(o,1),c=a[0];this.delete(c)}this.keys.push(r)}var u=this.cache;r.forEach(function(d,f){if(f===r.length-1)u.set(d,{value:[n,i.cacheCallTimes++]});else{var p=u.get(d);p?p.map||(p.map=new Map):u.set(d,{map:new Map}),u=u.get(d).map}})}},{key:"deleteByPath",value:function(r,n){var i=r.get(n[0]);if(n.length===1){var o;return i.map?r.set(n[0],{map:i.map}):r.delete(n[0]),(o=i.value)===null||o===void 0?void 0:o[0]}var a=this.deleteByPath(i.map,n.slice(1));return(!i.map||i.map.size===0)&&!i.value&&r.delete(n[0]),a}},{key:"delete",value:function(r){if(this.has(r))return this.keys=this.keys.filter(function(n){return!tT(n,r)}),this.deleteByPath(this.cache,r)}}]),e})();K(iy,"MAX_CACHE_SIZE",20);K(iy,"MAX_CACHE_OFFSET",5);var e1=0,w2=(function(){function e(t){pn(this,e),K(this,"derivatives",void 0),K(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=e1,t.length===0&&(t.length>0,void 0),e1+=1}return gn(e,[{key:"getDerivativeToken",value:function(r){return this.derivatives.reduce(function(n,i){return i(r,n)},void 0)}}]),e})(),Jp=new iy;function cv(e){var t=Array.isArray(e)?e:[e];return Jp.has(t)||Jp.set(t,new w2(t)),Jp.get(t)}var rT=new WeakMap,Qp={};function nT(e,t){for(var r=rT,n=0;n<t.length;n+=1){var i=t[n];r.has(i)||r.set(i,new WeakMap),r=r.get(i)}return r.has(Qp)||r.set(Qp,e()),r.get(Qp)}var t1=new WeakMap;function ou(e){var t=t1.get(e)||"";return t||(Object.keys(e).forEach(function(r){var n=e[r];t+=r,n instanceof w2?t+=n.id:n&&bt(n)==="object"?t+=ou(n):t+=n}),t=fu(t),t1.set(e,t)),t}function r1(e,t){return fu("".concat(t,"_").concat(ou(e)))}var uv=ni();function ee(e){return typeof e=="number"?"".concat(e,"px"):e}function Uh(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(i)return e;var o=X(X({},n),{},K(K({},Fl,t),xo,r)),a=Object.keys(o).map(function(c){var u=o[c];return u?"".concat(c,'="').concat(u,'"'):null}).filter(function(c){return c}).join(" ");return"<style ".concat(a,">").concat(e,"</style>")}var Ch=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(r?"".concat(r,"-"):"").concat(t).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},iT=function(t,r,n){return Object.keys(t).length?".".concat(r).concat(n!=null&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(t).map(function(i){var o=se(i,2),a=o[0],c=o[1];return"".concat(a,":").concat(c,";")}).join(""),"}"):""},x2=function(t,r,n){var i={},o={};return Object.entries(t).forEach(function(a){var c,u,d=se(a,2),f=d[0],p=d[1];if(n!=null&&(c=n.preserve)!==null&&c!==void 0&&c[f])o[f]=p;else if((typeof p=="string"||typeof p=="number")&&!(n!=null&&(u=n.ignore)!==null&&u!==void 0&&u[f])){var g,v=Ch(f,n==null?void 0:n.prefix);i[v]=typeof p=="number"&&!(n!=null&&(g=n.unitless)!==null&&g!==void 0&&g[f])?"".concat(p,"px"):String(p),o[f]="var(".concat(v,")")}}),[o,iT(i,r,{scope:n==null?void 0:n.scope})]},n1=ni()?h.useLayoutEffect:h.useEffect,ur=function(t,r){var n=h.useRef(!0);n1(function(){return t(n.current)},r),n1(function(){return n.current=!1,function(){n.current=!0}},[])},dv=function(t,r){ur(function(n){if(!n)return t()},r)},oT=X({},xf),i1=oT.useInsertionEffect,sT=function(t,r,n){h.useMemo(t,n),ur(function(){return r(!0)},n)},aT=i1?function(e,t,r){return i1(function(){return e(),t()},r)}:sT,lT=X({},xf),cT=lT.useInsertionEffect,uT=function(t){var r=[],n=!1;function i(o){n||r.push(o)}return h.useEffect(function(){return n=!1,function(){n=!0,r.length&&r.forEach(function(o){return o()})}},t),i},dT=function(){return function(t){t()}},hT=typeof cT<"u"?uT:dT;function oy(e,t,r,n,i){var o=h.useContext(Nu),a=o.cache,c=[e].concat(We(t)),u=lv(c),d=hT([u]),f=function(b){a.opUpdate(u,function(S){var _=S||[void 0,void 0],C=se(_,2),x=C[0],E=x===void 0?0:x,k=C[1],P=k,T=P||r(),O=[E,T];return b?b(O):O})};h.useMemo(function(){f()},[u]);var p=a.opGet(u),g=p[1];return aT(function(){i==null||i(g)},function(v){return f(function(b){var S=se(b,2),_=S[0],C=S[1];return v&&_===0&&(i==null||i(g)),[_+1,C]}),function(){a.opUpdate(u,function(b){var S=b||[],_=se(S,2),C=_[0],x=C===void 0?0:C,E=_[1],k=x-1;return k===0?(d(function(){(v||!a.opGet(u))&&(n==null||n(E,!1))}),null):[x-1,E]})}},[u]),g}var fT={},mT="css",ga=new Map;function pT(e){ga.set(e,(ga.get(e)||0)+1)}function gT(e,t){if(typeof document<"u"){var r=document.querySelectorAll("style[".concat(Fl,'="').concat(e,'"]'));r.forEach(function(n){if(n[Hs]===t){var i;(i=n.parentNode)===null||i===void 0||i.removeChild(n)}})}}var vT=0;function yT(e,t){ga.set(e,(ga.get(e)||0)-1);var r=new Set;ga.forEach(function(n,i){n<=0&&r.add(i)}),ga.size-r.size>vT&&r.forEach(function(n){gT(n,t),ga.delete(n)})}var bT=function(t,r,n,i){var o=n.getDerivativeToken(t),a=X(X({},o),r);return i&&(a=i(a)),a},E2="token";function _T(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=h.useContext(Nu),i=n.cache.instanceId,o=n.container,a=r.salt,c=a===void 0?"":a,u=r.override,d=u===void 0?fT:u,f=r.formatToken,p=r.getComputedToken,g=r.cssVar,v=nT(function(){return Object.assign.apply(Object,[{}].concat(We(t)))},t),b=ou(v),S=ou(d),_=g?ou(g):"",C=oy(E2,[c,e.id,b,S,_],function(){var x,E=p?p(v,d,e):bT(v,d,e,f),k=X({},E),P="";if(g){var T=x2(E,g.key,{prefix:g.prefix,ignore:g.ignore,unitless:g.unitless,preserve:g.preserve}),O=se(T,2);E=O[0],P=O[1]}var N=r1(E,c);E._tokenKey=N,k._tokenKey=r1(k,c);var I=(x=g==null?void 0:g.key)!==null&&x!==void 0?x:N;E._themeKey=I,pT(I);var z="".concat(mT,"-").concat(fu(N));return E._hashId=z,[E,z,k,P,(g==null?void 0:g.key)||""]},function(x){yT(x[0]._themeKey,i)},function(x){var E=se(x,4),k=E[0],P=E[3];if(g&&P){var T=us(P,fu("css-variables-".concat(k._themeKey)),{mark:xo,prepend:"queue",attachTo:o,priority:-999});T[Hs]=i,T.setAttribute(Fl,k._themeKey)}});return C}var ST=function(t,r,n){var i=se(t,5),o=i[2],a=i[3],c=i[4],u=n||{},d=u.plain;if(!a)return null;var f=o._tokenKey,p=-999,g={"data-rc-order":"prependQueue","data-rc-priority":"".concat(p)},v=Uh(a,c,f,g,d);return[p,f,v]},CT={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},$2="comm",k2="rule",R2="decl",wT="@import",xT="@namespace",ET="@keyframes",$T="@layer",T2=Math.abs,sy=String.fromCharCode;function P2(e){return e.trim()}function wh(e,t,r){return e.replace(t,r)}function kT(e,t,r){return e.indexOf(t,r)}function jl(e,t){return e.charCodeAt(t)|0}function Wl(e,t,r){return e.slice(t,r)}function jo(e){return e.length}function RT(e){return e.length}function Qd(e,t){return t.push(e),e}var kf=1,Vl=1,O2=0,ao=0,fn=0,Jl="";function ay(e,t,r,n,i,o,a,c){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:kf,column:Vl,length:a,return:"",siblings:c}}function TT(){return fn}function PT(){return fn=ao>0?jl(Jl,--ao):0,Vl--,fn===10&&(Vl=1,kf--),fn}function Eo(){return fn=ao<O2?jl(Jl,ao++):0,Vl++,fn===10&&(Vl=1,kf++),fn}function Fs(){return jl(Jl,ao)}function xh(){return ao}function Rf(e,t){return Wl(Jl,e,t)}function gu(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function OT(e){return kf=Vl=1,O2=jo(Jl=e),ao=0,[]}function IT(e){return Jl="",e}function Zp(e){return P2(Rf(ao-1,hv(e===91?e+2:e===40?e+1:e)))}function NT(e){for(;(fn=Fs())&&fn<33;)Eo();return gu(e)>2||gu(fn)>3?"":" "}function MT(e,t){for(;--t&&Eo()&&!(fn<48||fn>102||fn>57&&fn<65||fn>70&&fn<97););return Rf(e,xh()+(t<6&&Fs()==32&&Eo()==32))}function hv(e){for(;Eo();)switch(fn){case e:return ao;case 34:case 39:e!==34&&e!==39&&hv(fn);break;case 40:e===41&&hv(e);break;case 92:Eo();break}return ao}function zT(e,t){for(;Eo()&&e+fn!==57;)if(e+fn===84&&Fs()===47)break;return"/*"+Rf(t,ao-1)+"*"+sy(e===47?e:Eo())}function jT(e){for(;!gu(Fs());)Eo();return Rf(e,ao)}function BT(e){return IT(Eh("",null,null,null,[""],e=OT(e),0,[0],e))}function Eh(e,t,r,n,i,o,a,c,u){for(var d=0,f=0,p=a,g=0,v=0,b=0,S=1,_=1,C=1,x=0,E="",k=i,P=o,T=n,O=E;_;)switch(b=x,x=Eo()){case 40:if(b!=108&&jl(O,p-1)==58){kT(O+=wh(Zp(x),"&","&\f"),"&\f",T2(d?c[d-1]:0))!=-1&&(C=-1);break}case 34:case 39:case 91:O+=Zp(x);break;case 9:case 10:case 13:case 32:O+=NT(b);break;case 92:O+=MT(xh()-1,7);continue;case 47:switch(Fs()){case 42:case 47:Qd(LT(zT(Eo(),xh()),t,r,u),u),(gu(b||1)==5||gu(Fs()||1)==5)&&jo(O)&&Wl(O,-1,void 0)!==" "&&(O+=" ");break;default:O+="/"}break;case 123*S:c[d++]=jo(O)*C;case 125*S:case 59:case 0:switch(x){case 0:case 125:_=0;case 59+f:C==-1&&(O=wh(O,/\f/g,"")),v>0&&(jo(O)-p||S===0&&b===47)&&Qd(v>32?s1(O+";",n,r,p-1,u):s1(wh(O," ","")+";",n,r,p-2,u),u);break;case 59:O+=";";default:if(Qd(T=o1(O,t,r,d,f,i,c,E,k=[],P=[],p,o),o),x===123)if(f===0)Eh(O,t,T,T,k,o,p,c,P);else{switch(g){case 99:if(jl(O,3)===110)break;case 108:if(jl(O,2)===97)break;default:f=0;case 100:case 109:case 115:}f?Eh(e,T,T,n&&Qd(o1(e,T,T,0,0,i,c,E,i,k=[],p,P),P),i,P,p,c,n?k:P):Eh(O,T,T,T,[""],P,0,c,P)}}d=f=v=0,S=C=1,E=O="",p=a;break;case 58:p=1+jo(O),v=b;default:if(S<1){if(x==123)--S;else if(x==125&&S++==0&&PT()==125)continue}switch(O+=sy(x),x*S){case 38:C=f>0?1:(O+="\f",-1);break;case 44:c[d++]=(jo(O)-1)*C,C=1;break;case 64:Fs()===45&&(O+=Zp(Eo())),g=Fs(),f=p=jo(E=O+=jT(xh())),x++;break;case 45:b===45&&jo(O)==2&&(S=0)}}return o}function o1(e,t,r,n,i,o,a,c,u,d,f,p){for(var g=i-1,v=i===0?o:[""],b=RT(v),S=0,_=0,C=0;S<n;++S)for(var x=0,E=Wl(e,g+1,g=T2(_=a[S])),k=e;x<b;++x)(k=P2(_>0?v[x]+" "+E:wh(E,/&\f/g,v[x])))&&(u[C++]=k);return ay(e,t,r,i===0?k2:c,u,d,f,p)}function LT(e,t,r,n){return ay(e,t,r,$2,sy(TT()),Wl(e,2,-2),0,n)}function s1(e,t,r,n,i){return ay(e,t,r,R2,Wl(e,0,n),Wl(e,n+1,-1),n,i)}function fv(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function DT(e,t,r,n){switch(e.type){case $T:if(e.children.length)break;case wT:case xT:case R2:return e.return=e.return||e.value;case $2:return"";case ET:return e.return=e.value+"{"+fv(e.children,n)+"}";case k2:if(!jo(e.value=e.props.join(",")))return""}return jo(r=fv(e.children,n))?e.return=e.value+"{"+r+"}":""}var a1="data-ant-cssinjs-cache-path",I2="_FILE_STYLE__",wa,N2=!0;function AT(){if(!wa&&(wa={},ni())){var e=document.createElement("div");e.className=a1,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(i){var o=i.split(":"),a=se(o,2),c=a[0],u=a[1];wa[c]=u});var r=document.querySelector("style[".concat(a1,"]"));if(r){var n;N2=!1,(n=r.parentNode)===null||n===void 0||n.removeChild(r)}document.body.removeChild(e)}}function HT(e){return AT(),!!wa[e]}function FT(e){var t=wa[e],r=null;if(t&&ni())if(N2)r=I2;else{var n=document.querySelector("style[".concat(xo,'="').concat(wa[e],'"]'));n?r=n.innerHTML:delete wa[e]}return[r,t]}var WT="_skip_check_",M2="_multi_value_";function $h(e){var t=fv(BT(e),DT);return t.replace(/\{%%%\:[^;];}/g,";")}function VT(e){return bt(e)==="object"&&e&&(WT in e||M2 in e)}function l1(e,t,r){if(!t)return e;var n=".".concat(t),i=r==="low"?":where(".concat(n,")"):n,o=e.split(",").map(function(a){var c,u=a.trim().split(/\s+/),d=u[0]||"",f=((c=d.match(/^\w+/))===null||c===void 0?void 0:c[0])||"";return d="".concat(f).concat(i).concat(d.slice(f.length)),[d].concat(We(u.slice(1))).join(" ")});return o.join(",")}var UT=function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},i=n.root,o=n.injectHash,a=n.parentSelectors,c=r.hashId,u=r.layer;r.path;var d=r.hashPriority,f=r.transformers,p=f===void 0?[]:f;r.linters;var g="",v={};function b(C){var x=C.getName(c);if(!v[x]){var E=e(C.style,r,{root:!1,parentSelectors:a}),k=se(E,1),P=k[0];v[x]="@keyframes ".concat(C.getName(c)).concat(P)}}function S(C){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return C.forEach(function(E){Array.isArray(E)?S(E,x):E&&x.push(E)}),x}var _=S(Array.isArray(t)?t:[t]);return _.forEach(function(C){var x=typeof C=="string"&&!i?{}:C;if(typeof x=="string")g+="".concat(x,`
55
+ `);else if(x._keyframe)b(x);else{var E=p.reduce(function(k,P){var T;return(P==null||(T=P.visit)===null||T===void 0?void 0:T.call(P,k))||k},x);Object.keys(E).forEach(function(k){var P=E[k];if(bt(P)==="object"&&P&&(k!=="animationName"||!P._keyframe)&&!VT(P)){var T=!1,O=k.trim(),N=!1;(i||o)&&c?O.startsWith("@")?T=!0:O==="&"?O=l1("",c,d):O=l1(k,c,d):i&&!c&&(O==="&"||O==="")&&(O="",N=!0);var I=e(P,r,{root:N,injectHash:T,parentSelectors:[].concat(We(a),[O])}),z=se(I,2),D=z[0],M=z[1];v=X(X({},v),M),g+="".concat(O).concat(D)}else{let F=function(W,V){var L=W.replace(/[A-Z]/g,function(q){return"-".concat(q.toLowerCase())}),G=V;!CT[W]&&typeof G=="number"&&G!==0&&(G="".concat(G,"px")),W==="animationName"&&V!==null&&V!==void 0&&V._keyframe&&(b(V),G=V.getName(c)),g+="".concat(L,":").concat(G,";")};var j,B=(j=P==null?void 0:P.value)!==null&&j!==void 0?j:P;bt(P)==="object"&&P!==null&&P!==void 0&&P[M2]&&Array.isArray(B)?B.forEach(function(W){F(k,W)}):F(k,B)}})}}),i?u&&(g&&(g="@layer ".concat(u.name," {").concat(g,"}")),u.dependencies&&(v["@layer ".concat(u.name)]=u.dependencies.map(function(C){return"@layer ".concat(C,", ").concat(u.name,";")}).join(`
56
+ `))):g="{".concat(g,"}"),[g,v]};function z2(e,t){return fu("".concat(e.join("%")).concat(t))}function qT(){return null}var j2="style";function mv(e,t){var r=e.token,n=e.path,i=e.hashId,o=e.layer,a=e.nonce,c=e.clientOnly,u=e.order,d=u===void 0?0:u,f=h.useContext(Nu),p=f.autoClear;f.mock;var g=f.defaultCache,v=f.hashPriority,b=f.container,S=f.ssrInline,_=f.transformers,C=f.linters,x=f.cache,E=f.layer,k=r._tokenKey,P=[k];E&&P.push("layer"),P.push.apply(P,We(n));var T=uv,O=oy(j2,P,function(){var M=P.join("|");if(HT(M)){var j=FT(M),B=se(j,2),F=B[0],W=B[1];if(F)return[F,k,W,{},c,d]}var V=t(),L=UT(V,{hashId:i,hashPriority:v,layer:E?o:void 0,path:n.join("-"),transformers:_,linters:C}),G=se(L,2),q=G[0],A=G[1],U=$h(q),Y=z2(P,U);return[U,k,Y,A,c,d]},function(M,j){var B=se(M,3),F=B[2];(j||p)&&uv&&mu(F,{mark:xo,attachTo:b})},function(M){var j=se(M,4),B=j[0];j[1];var F=j[2],W=j[3];if(T&&B!==I2){var V={mark:xo,prepend:E?!1:"queue",attachTo:b,priority:d},L=typeof a=="function"?a():a;L&&(V.csp={nonce:L});var G=[],q=[];Object.keys(W).forEach(function(U){U.startsWith("@layer")?G.push(U):q.push(U)}),G.forEach(function(U){us($h(W[U]),"_layer-".concat(U),X(X({},V),{},{prepend:!0}))});var A=us(B,F,V);A[Hs]=x.instanceId,A.setAttribute(Fl,k),q.forEach(function(U){us($h(W[U]),"_effect-".concat(U),V)})}}),N=se(O,3),I=N[0],z=N[1],D=N[2];return function(M){var j;return!S||T||!g?j=h.createElement(qT,null):j=h.createElement("style",Re({},K(K({},Fl,z),xo,D),{dangerouslySetInnerHTML:{__html:I}})),h.createElement(h.Fragment,null,j,M)}}var KT=function(t,r,n){var i=se(t,6),o=i[0],a=i[1],c=i[2],u=i[3],d=i[4],f=i[5],p=n||{},g=p.plain;if(d)return null;var v=o,b={"data-rc-order":"prependQueue","data-rc-priority":"".concat(f)};return v=Uh(o,a,c,b,g),u&&Object.keys(u).forEach(function(S){if(!r[S]){r[S]=!0;var _=$h(u[S]),C=Uh(_,a,"_effect-".concat(S),b,g);S.startsWith("@layer")?v=C+v:v+=C}}),[f,c,v]},B2="cssVar",GT=function(t,r){var n=t.key,i=t.prefix,o=t.unitless,a=t.ignore,c=t.token,u=t.scope,d=u===void 0?"":u,f=h.useContext(Nu),p=f.cache.instanceId,g=f.container,v=c._tokenKey,b=[].concat(We(t.path),[n,d,v]),S=oy(B2,b,function(){var _=r(),C=x2(_,n,{prefix:i,unitless:o,ignore:a,scope:d}),x=se(C,2),E=x[0],k=x[1],P=z2(b,k);return[E,k,P,n]},function(_){var C=se(_,3),x=C[2];uv&&mu(x,{mark:xo,attachTo:g})},function(_){var C=se(_,3),x=C[1],E=C[2];if(x){var k=us(x,E,{mark:xo,prepend:"queue",attachTo:g,priority:-999});k[Hs]=p,k.setAttribute(Fl,n)}});return S},XT=function(t,r,n){var i=se(t,4),o=i[1],a=i[2],c=i[3],u=n||{},d=u.plain;if(!o)return null;var f=-999,p={"data-rc-order":"prependQueue","data-rc-priority":"".concat(f)},g=Uh(o,c,a,p,d);return[f,a,g]};K(K(K({},j2,KT),E2,ST),B2,XT);var Xt=(function(){function e(t,r){pn(this,e),K(this,"name",void 0),K(this,"style",void 0),K(this,"_keyframe",!0),this.name=t,this.style=r}return gn(e,[{key:"getName",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return r?"".concat(r,"-").concat(this.name):this.name}}]),e})();function hl(e){return e.notSplit=!0,e}hl(["borderTop","borderBottom"]),hl(["borderTop"]),hl(["borderBottom"]),hl(["borderLeft","borderRight"]),hl(["borderLeft"]),hl(["borderRight"]);var ly=h.createContext({});function L2(e){return y2(e)||m2(e)||ty(e)||b2()}function Bo(e,t){for(var r=e,n=0;n<t.length;n+=1){if(r==null)return;r=r[t[n]]}return r}function D2(e,t,r,n){if(!t.length)return r;var i=L2(t),o=i[0],a=i.slice(1),c;return!e&&typeof o=="number"?c=[]:Array.isArray(e)?c=We(e):c=X({},e),n&&r===void 0&&a.length===1?delete c[o][a[0]]:c[o]=D2(c[o],a,r,n),c}function _o(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&n&&r===void 0&&!Bo(e,t.slice(0,-1))?e:D2(e,t,r,n)}function YT(e){return bt(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function c1(e){return Array.isArray(e)?[]:{}}var JT=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Tl(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=c1(t[0]);return t.forEach(function(i){function o(a,c){var u=new Set(c),d=Bo(i,a),f=Array.isArray(d);if(f||YT(d)){if(!u.has(d)){u.add(d);var p=Bo(n,a);f?n=_o(n,a,[]):(!p||bt(p)!=="object")&&(n=_o(n,a,c1(d))),JT(d).forEach(function(g){o([].concat(We(a),[g]),u)})}}else n=_o(n,a,d)}o([])}),n}function QT(){}const ZT=h.createContext({}),Tf=()=>{const e=()=>{};return e.deprecated=QT,e},eP=h.createContext(void 0);var A2={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},tP={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},rP=X(X({},tP),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const H2={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},u1={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},rP),timePickerLocale:Object.assign({},H2)},Ni="${label} is not a valid ${type}",Ks={locale:"en",Pagination:A2,DatePicker:u1,TimePicker:H2,Calendar:u1,global:{placeholder:"Please select",close:"Close"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Ni,method:Ni,array:Ni,object:Ni,number:Ni,date:Ni,boolean:Ni,integer:Ni,float:Ni,regexp:Ni,email:Ni,url:Ni,hex:Ni},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};let kh=Object.assign({},Ks.Modal),Rh=[];const d1=()=>Rh.reduce((e,t)=>Object.assign(Object.assign({},e),t),Ks.Modal);function nP(e){if(e){const t=Object.assign({},e);return Rh.push(t),kh=d1(),()=>{Rh=Rh.filter(r=>r!==t),kh=d1()}}kh=Object.assign({},Ks.Modal)}function F2(){return kh}const cy=h.createContext(void 0),fs=(e,t)=>{const r=h.useContext(cy),n=h.useMemo(()=>{var o;const a=t||Ks[e],c=(o=r==null?void 0:r[e])!==null&&o!==void 0?o:{};return Object.assign(Object.assign({},typeof a=="function"?a():a),c||{})},[e,t,r]),i=h.useMemo(()=>{const o=r==null?void 0:r.locale;return r!=null&&r.exist&&!o?Ks.locale:o},[r]);return[n,i]},iP="internalMark",oP=e=>{const{locale:t={},children:r,_ANT_MARK__:n}=e;h.useEffect(()=>nP(t==null?void 0:t.Modal),[t]);const i=h.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return h.createElement(cy.Provider,{value:i},r)},uy={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},vu=Object.assign(Object.assign({},uy),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
57
+ 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
58
+ 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),On=Math.round;function eg(e,t){const r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)n[i]=t(n[i]||0,r[i]||"",i);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const h1=(e,t,r)=>r===0?e:e/100;function Nc(e,t){const r=t||255;return e>r?r:e<0?0:e}class pr{constructor(t){K(this,"isValid",!0),K(this,"r",0),K(this,"g",0),K(this,"b",0),K(this,"a",1),K(this,"_h",void 0),K(this,"_s",void 0),K(this,"_l",void 0),K(this,"_v",void 0),K(this,"_max",void 0),K(this,"_min",void 0),K(this,"_brightness",void 0);function r(i){return i[0]in t&&i[1]in t&&i[2]in t}if(t)if(typeof t=="string"){let o=function(a){return i.startsWith(a)};var n=o;const i=t.trim();/^#?[A-F\d]{3,8}$/i.test(i)?this.fromHexString(i):o("rgb")?this.fromRgbString(i):o("hsl")?this.fromHslString(i):(o("hsv")||o("hsb"))&&this.fromHsvString(i)}else if(t instanceof pr)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=Nc(t.r),this.g=Nc(t.g),this.b=Nc(t.b),this.a=typeof t.a=="number"?Nc(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(o){const a=o/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const r=t(this.r),n=t(this.g),i=t(this.b);return .2126*r+.7152*n+.0722*i}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=On(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()-t/100;return i<0&&(i=0),this._c({h:r,s:n,l:i,a:this.a})}lighten(t=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()+t/100;return i>1&&(i=1),this._c({h:r,s:n,l:i,a:this.a})}mix(t,r=50){const n=this._c(t),i=r/100,o=c=>(n[c]-this[c])*i+this[c],a={r:On(o("r")),g:On(o("g")),b:On(o("b")),a:On(o("a")*100)/100};return this._c(a)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const r=this._c(t),n=this.a+r.a*(1-this.a),i=o=>On((this[o]*this.a+r[o]*r.a*(1-this.a))/n);return this._c({r:i("r"),g:i("g"),b:i("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;const n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;const i=(this.b||0).toString(16);if(t+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=On(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),r=On(this.getSaturation()*100),n=On(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,r,n){const i=this.clone();return i[t]=Nc(r,n),i}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const r=t.replace("#","");function n(i,o){return parseInt(r[i]+r[o||i],16)}r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:t,s:r,l:n,a:i}){if(this._h=t%360,this._s=r,this._l=n,this.a=typeof i=="number"?i:1,r<=0){const g=On(n*255);this.r=g,this.g=g,this.b=g}let o=0,a=0,c=0;const u=t/60,d=(1-Math.abs(2*n-1))*r,f=d*(1-Math.abs(u%2-1));u>=0&&u<1?(o=d,a=f):u>=1&&u<2?(o=f,a=d):u>=2&&u<3?(a=d,c=f):u>=3&&u<4?(a=f,c=d):u>=4&&u<5?(o=f,c=d):u>=5&&u<6&&(o=d,c=f);const p=n-d/2;this.r=On((o+p)*255),this.g=On((a+p)*255),this.b=On((c+p)*255)}fromHsv({h:t,s:r,v:n,a:i}){this._h=t%360,this._s=r,this._v=n,this.a=typeof i=="number"?i:1;const o=On(n*255);if(this.r=o,this.g=o,this.b=o,r<=0)return;const a=t/60,c=Math.floor(a),u=a-c,d=On(n*(1-r)*255),f=On(n*(1-r*u)*255),p=On(n*(1-r*(1-u))*255);switch(c){case 0:this.g=p,this.b=d;break;case 1:this.r=f,this.b=d;break;case 2:this.r=d,this.b=p;break;case 3:this.r=d,this.g=f;break;case 4:this.r=p,this.g=d;break;case 5:default:this.g=d,this.b=f;break}}fromHsvString(t){const r=eg(t,h1);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){const r=eg(t,h1);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){const r=eg(t,(n,i)=>i.includes("%")?On(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}}var Zd=2,f1=.16,sP=.05,aP=.05,lP=.15,W2=5,V2=4,cP=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function m1(e,t,r){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-Zd*t:Math.round(e.h)+Zd*t:n=r?Math.round(e.h)+Zd*t:Math.round(e.h)-Zd*t,n<0?n+=360:n>=360&&(n-=360),n}function p1(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-f1*t:t===V2?n=e.s+f1:n=e.s+sP*t,n>1&&(n=1),r&&t===W2&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function g1(e,t,r){var n;return r?n=e.v+aP*t:n=e.v-lP*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function $a(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=new pr(e),i=n.toHsv(),o=W2;o>0;o-=1){var a=new pr({h:m1(i,o,!0),s:p1(i,o,!0),v:g1(i,o,!0)});r.push(a)}r.push(n);for(var c=1;c<=V2;c+=1){var u=new pr({h:m1(i,c),s:p1(i,c),v:g1(i,c)});r.push(u)}return t.theme==="dark"?cP.map(function(d){var f=d.index,p=d.amount;return new pr(t.backgroundColor||"#141414").mix(r[f],p).toHexString()}):r.map(function(d){return d.toHexString()})}var tg={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},pv=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];pv.primary=pv[5];var gv=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];gv.primary=gv[5];var vv=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];vv.primary=vv[5];var qh=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];qh.primary=qh[5];var yv=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];yv.primary=yv[5];var bv=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];bv.primary=bv[5];var _v=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];_v.primary=_v[5];var Sv=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Sv.primary=Sv[5];var Kh=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Kh.primary=Kh[5];var Cv=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Cv.primary=Cv[5];var wv=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];wv.primary=wv[5];var xv=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];xv.primary=xv[5];var Ev=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Ev.primary=Ev[5];var rg={red:pv,volcano:gv,orange:vv,gold:qh,yellow:yv,lime:bv,green:_v,cyan:Sv,blue:Kh,geekblue:Cv,purple:wv,magenta:xv,grey:Ev};function U2(e,{generateColorPalettes:t,generateNeutralColorPalettes:r}){const{colorSuccess:n,colorWarning:i,colorError:o,colorInfo:a,colorPrimary:c,colorBgBase:u,colorTextBase:d}=e,f=t(c),p=t(n),g=t(i),v=t(o),b=t(a),S=r(u,d),_=e.colorLink||e.colorInfo,C=t(_),x=new pr(v[1]).mix(new pr(v[3]),50).toHexString();return Object.assign(Object.assign({},S),{colorPrimaryBg:f[1],colorPrimaryBgHover:f[2],colorPrimaryBorder:f[3],colorPrimaryBorderHover:f[4],colorPrimaryHover:f[5],colorPrimary:f[6],colorPrimaryActive:f[7],colorPrimaryTextHover:f[8],colorPrimaryText:f[9],colorPrimaryTextActive:f[10],colorSuccessBg:p[1],colorSuccessBgHover:p[2],colorSuccessBorder:p[3],colorSuccessBorderHover:p[4],colorSuccessHover:p[4],colorSuccess:p[6],colorSuccessActive:p[7],colorSuccessTextHover:p[8],colorSuccessText:p[9],colorSuccessTextActive:p[10],colorErrorBg:v[1],colorErrorBgHover:v[2],colorErrorBgFilledHover:x,colorErrorBgActive:v[3],colorErrorBorder:v[3],colorErrorBorderHover:v[4],colorErrorHover:v[5],colorError:v[6],colorErrorActive:v[7],colorErrorTextHover:v[8],colorErrorText:v[9],colorErrorTextActive:v[10],colorWarningBg:g[1],colorWarningBgHover:g[2],colorWarningBorder:g[3],colorWarningBorderHover:g[4],colorWarningHover:g[4],colorWarning:g[6],colorWarningActive:g[7],colorWarningTextHover:g[8],colorWarningText:g[9],colorWarningTextActive:g[10],colorInfoBg:b[1],colorInfoBgHover:b[2],colorInfoBorder:b[3],colorInfoBorderHover:b[4],colorInfoHover:b[4],colorInfo:b[6],colorInfoActive:b[7],colorInfoTextHover:b[8],colorInfoText:b[9],colorInfoTextActive:b[10],colorLinkHover:C[4],colorLink:C[6],colorLinkActive:C[7],colorBgMask:new pr("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const uP=e=>{let t=e,r=e,n=e,i=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?r=4:e<8&&e>=7?r=5:e<14&&e>=8?r=6:e<16&&e>=14?r=7:e>=16&&(r=8),e<6&&e>=2?n=1:e>=6&&(n=2),e>4&&e<8?i=4:e>=8&&(i=6),{borderRadius:e,borderRadiusXS:n,borderRadiusSM:r,borderRadiusLG:t,borderRadiusOuter:i}};function dP(e){const{motionUnit:t,motionBase:r,borderRadius:n,lineWidth:i}=e;return Object.assign({motionDurationFast:`${(r+t).toFixed(1)}s`,motionDurationMid:`${(r+t*2).toFixed(1)}s`,motionDurationSlow:`${(r+t*3).toFixed(1)}s`,lineWidthBold:i+1},uP(n))}const hP=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function Th(e){return(e+8)/e}function fP(e){const t=Array.from({length:10}).map((r,n)=>{const i=n-1,o=e*Math.pow(Math.E,i/5),a=n>1?Math.floor(o):Math.ceil(o);return Math.floor(a/2)*2});return t[1]=e,t.map(r=>({size:r,lineHeight:Th(r)}))}const mP=e=>{const t=fP(e),r=t.map(f=>f.size),n=t.map(f=>f.lineHeight),i=r[1],o=r[0],a=r[2],c=n[1],u=n[0],d=n[2];return{fontSizeSM:o,fontSize:i,fontSizeLG:a,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:c,lineHeightLG:d,lineHeightSM:u,fontHeight:Math.round(c*i),fontHeightLG:Math.round(d*a),fontHeightSM:Math.round(u*o),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}};function pP(e){const{sizeUnit:t,sizeStep:r}=e;return{sizeXXL:t*(r+8),sizeXL:t*(r+4),sizeLG:t*(r+2),sizeMD:t*(r+1),sizeMS:t*r,size:t*r,sizeSM:t*(r-1),sizeXS:t*(r-2),sizeXXS:t*(r-3)}}const Yi=(e,t)=>new pr(e).setA(t).toRgbString(),Mc=(e,t)=>new pr(e).darken(t).toHexString(),gP=e=>{const t=$a(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},vP=(e,t)=>{const r=e||"#fff",n=t||"#000";return{colorBgBase:r,colorTextBase:n,colorText:Yi(n,.88),colorTextSecondary:Yi(n,.65),colorTextTertiary:Yi(n,.45),colorTextQuaternary:Yi(n,.25),colorFill:Yi(n,.15),colorFillSecondary:Yi(n,.06),colorFillTertiary:Yi(n,.04),colorFillQuaternary:Yi(n,.02),colorBgSolid:Yi(n,1),colorBgSolidHover:Yi(n,.75),colorBgSolidActive:Yi(n,.95),colorBgLayout:Mc(r,4),colorBgContainer:Mc(r,0),colorBgElevated:Mc(r,0),colorBgSpotlight:Yi(n,.85),colorBgBlur:"transparent",colorBorder:Mc(r,15),colorBorderSecondary:Mc(r,6)}};function q2(e){tg.pink=tg.magenta,rg.pink=rg.magenta;const t=Object.keys(uy).map(r=>{const n=e[r]===tg[r]?rg[r]:$a(e[r]);return Array.from({length:10},()=>1).reduce((i,o,a)=>(i[`${r}-${a+1}`]=n[a],i[`${r}${a+1}`]=n[a],i),{})}).reduce((r,n)=>(r=Object.assign(Object.assign({},r),n),r),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),U2(e,{generateColorPalettes:gP,generateNeutralColorPalettes:vP})),mP(e.fontSize)),pP(e)),hP(e)),dP(e))}const K2=cv(q2),Gh={token:vu,override:{override:vu},hashed:!0},G2=Q.createContext(Gh),yu="ant",Pf="anticon",yP=["outlined","borderless","filled","underlined"],bP=(e,t)=>t||(e?`${yu}-${e}`:yu),Pt=h.createContext({getPrefixCls:bP,iconPrefixCls:Pf}),{Consumer:iQ}=Pt,v1={};function Un(e){const t=h.useContext(Pt),{getPrefixCls:r,direction:n,getPopupContainer:i}=t,o=t[e];return Object.assign(Object.assign({classNames:v1,styles:v1},o),{getPrefixCls:r,direction:n,getPopupContainer:i})}const _P=`-ant-${Date.now()}-${Math.random()}`;function SP(e,t){const r={},n=(a,c)=>{let u=a.clone();return u=(c==null?void 0:c(u))||u,u.toRgbString()},i=(a,c)=>{const u=new pr(a),d=$a(u.toRgbString());r[`${c}-color`]=n(u),r[`${c}-color-disabled`]=d[1],r[`${c}-color-hover`]=d[4],r[`${c}-color-active`]=d[6],r[`${c}-color-outline`]=u.clone().setA(.2).toRgbString(),r[`${c}-color-deprecated-bg`]=d[0],r[`${c}-color-deprecated-border`]=d[2]};if(t.primaryColor){i(t.primaryColor,"primary");const a=new pr(t.primaryColor),c=$a(a.toRgbString());c.forEach((d,f)=>{r[`primary-${f+1}`]=d}),r["primary-color-deprecated-l-35"]=n(a,d=>d.lighten(35)),r["primary-color-deprecated-l-20"]=n(a,d=>d.lighten(20)),r["primary-color-deprecated-t-20"]=n(a,d=>d.tint(20)),r["primary-color-deprecated-t-50"]=n(a,d=>d.tint(50)),r["primary-color-deprecated-f-12"]=n(a,d=>d.setA(d.a*.12));const u=new pr(c[0]);r["primary-color-active-deprecated-f-30"]=n(u,d=>d.setA(d.a*.3)),r["primary-color-active-deprecated-d-02"]=n(u,d=>d.darken(2))}return t.successColor&&i(t.successColor,"success"),t.warningColor&&i(t.warningColor,"warning"),t.errorColor&&i(t.errorColor,"error"),t.infoColor&&i(t.infoColor,"info"),`
59
+ :root {
60
+ ${Object.keys(r).map(a=>`--${e}-${a}: ${r[a]};`).join(`
61
+ `)}
62
+ }
63
+ `.trim()}function CP(e,t){const r=SP(e,t);ni()&&us(r,`${_P}-dynamic-theme`)}const Gs=h.createContext(!1),X2=({children:e,disabled:t})=>{const r=h.useContext(Gs);return h.createElement(Gs.Provider,{value:t??r},e)},Ul=h.createContext(void 0),wP=({children:e,size:t})=>{const r=h.useContext(Ul);return h.createElement(Ul.Provider,{value:t||r},e)};function xP(){const e=h.useContext(Gs),t=h.useContext(Ul);return{componentDisabled:e,componentSize:t}}var Y2=gn(function e(){pn(this,e)}),J2="CALC_UNIT",EP=new RegExp(J2,"g");function ng(e){return typeof e=="number"?"".concat(e).concat(J2):e}var $P=(function(e){ds(r,e);var t=hs(r);function r(n,i){var o;pn(this,r),o=t.call(this),K(Qt(o),"result",""),K(Qt(o),"unitlessCssVar",void 0),K(Qt(o),"lowPriority",void 0);var a=bt(n);return o.unitlessCssVar=i,n instanceof r?o.result="(".concat(n.result,")"):a==="number"?o.result=ng(n):a==="string"&&(o.result=n),o}return gn(r,[{key:"add",value:function(i){return i instanceof r?this.result="".concat(this.result," + ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," + ").concat(ng(i))),this.lowPriority=!0,this}},{key:"sub",value:function(i){return i instanceof r?this.result="".concat(this.result," - ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," - ").concat(ng(i))),this.lowPriority=!0,this}},{key:"mul",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof r?this.result="".concat(this.result," * ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," * ").concat(i)),this.lowPriority=!1,this}},{key:"div",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof r?this.result="".concat(this.result," / ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," / ").concat(i)),this.lowPriority=!1,this}},{key:"getResult",value:function(i){return this.lowPriority||i?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(i){var o=this,a=i||{},c=a.unit,u=!0;return typeof c=="boolean"?u=c:Array.from(this.unitlessCssVar).some(function(d){return o.result.includes(d)})&&(u=!1),this.result=this.result.replace(EP,u?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),r})(Y2),kP=(function(e){ds(r,e);var t=hs(r);function r(n){var i;return pn(this,r),i=t.call(this),K(Qt(i),"result",0),n instanceof r?i.result=n.result:typeof n=="number"&&(i.result=n),i}return gn(r,[{key:"add",value:function(i){return i instanceof r?this.result+=i.result:typeof i=="number"&&(this.result+=i),this}},{key:"sub",value:function(i){return i instanceof r?this.result-=i.result:typeof i=="number"&&(this.result-=i),this}},{key:"mul",value:function(i){return i instanceof r?this.result*=i.result:typeof i=="number"&&(this.result*=i),this}},{key:"div",value:function(i){return i instanceof r?this.result/=i.result:typeof i=="number"&&(this.result/=i),this}},{key:"equal",value:function(){return this.result}}]),r})(Y2),RP=function(t,r){var n=t==="css"?$P:kP;return function(i){return new n(i,r)}},y1=function(t,r){return"".concat([r,t.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function Jr(e){var t=h.useRef();t.current=e;var r=h.useCallback(function(){for(var n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(n=t.current)===null||n===void 0?void 0:n.call.apply(n,[t].concat(o))},[]);return r}function ql(e){var t=h.useRef(!1),r=h.useState(e),n=se(r,2),i=n[0],o=n[1];h.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function a(c,u){u&&t.current||o(c)}return[i,a]}function ig(e){return e!==void 0}function Qr(e,t){var r=t||{},n=r.defaultValue,i=r.value,o=r.onChange,a=r.postState,c=ql(function(){return ig(i)?i:ig(n)?typeof n=="function"?n():n:typeof e=="function"?e():e}),u=se(c,2),d=u[0],f=u[1],p=i!==void 0?i:d,g=a?a(p):p,v=Jr(o),b=ql([p]),S=se(b,2),_=S[0],C=S[1];dv(function(){var E=_[0];d!==E&&v(d,E)},[_]),dv(function(){ig(i)||f(i)},[i]);var x=Jr(function(E,k){f(E,k),C([p],k)});return[g,x]}function b1(e,t,r,n){var i=X({},t[e]);if(n!=null&&n.deprecatedTokens){var o=n.deprecatedTokens;o.forEach(function(c){var u=se(c,2),d=u[0],f=u[1];if(i!=null&&i[d]||i!=null&&i[f]){var p;(p=i[f])!==null&&p!==void 0||(i[f]=i==null?void 0:i[d])}})}var a=X(X({},r),i);return Object.keys(a).forEach(function(c){a[c]===t[c]&&delete a[c]}),a}var Q2=typeof CSSINJS_STATISTIC<"u",$v=!0;function er(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!Q2)return Object.assign.apply(Object,[{}].concat(t));$v=!1;var n={};return t.forEach(function(i){if(bt(i)==="object"){var o=Object.keys(i);o.forEach(function(a){Object.defineProperty(n,a,{configurable:!0,enumerable:!0,get:function(){return i[a]}})})}}),$v=!0,n}var _1={};function TP(){}var PP=function(t){var r,n=t,i=TP;return Q2&&typeof Proxy<"u"&&(r=new Set,n=new Proxy(t,{get:function(a,c){if($v){var u;(u=r)===null||u===void 0||u.add(c)}return a[c]}}),i=function(a,c){var u;_1[a]={global:Array.from(r),component:X(X({},(u=_1[a])===null||u===void 0?void 0:u.component),c)}}),{token:n,keys:r,flush:i}};function S1(e,t,r){if(typeof r=="function"){var n;return r(er(t,(n=t[e])!==null&&n!==void 0?n:{}))}return r??{}}function OP(e){return e==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return"max(".concat(n.map(function(o){return ee(o)}).join(","),")")},min:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return"min(".concat(n.map(function(o){return ee(o)}).join(","),")")}}}var IP=1e3*60*10,NP=(function(){function e(){pn(this,e),K(this,"map",new Map),K(this,"objectIDMap",new WeakMap),K(this,"nextID",0),K(this,"lastAccessBeat",new Map),K(this,"accessBeat",0)}return gn(e,[{key:"set",value:function(r,n){this.clear();var i=this.getCompositeKey(r);this.map.set(i,n),this.lastAccessBeat.set(i,Date.now())}},{key:"get",value:function(r){var n=this.getCompositeKey(r),i=this.map.get(n);return this.lastAccessBeat.set(n,Date.now()),this.accessBeat+=1,i}},{key:"getCompositeKey",value:function(r){var n=this,i=r.map(function(o){return o&&bt(o)==="object"?"obj_".concat(n.getObjectID(o)):"".concat(bt(o),"_").concat(o)});return i.join("|")}},{key:"getObjectID",value:function(r){if(this.objectIDMap.has(r))return this.objectIDMap.get(r);var n=this.nextID;return this.objectIDMap.set(r,n),this.nextID+=1,n}},{key:"clear",value:function(){var r=this;if(this.accessBeat>1e4){var n=Date.now();this.lastAccessBeat.forEach(function(i,o){n-i>IP&&(r.map.delete(o),r.lastAccessBeat.delete(o))}),this.accessBeat=0}}}]),e})(),C1=new NP;function MP(e,t){return Q.useMemo(function(){var r=C1.get(t);if(r)return r;var n=e();return C1.set(t,n),n},t)}var zP=function(){return{}};function jP(e){var t=e.useCSP,r=t===void 0?zP:t,n=e.useToken,i=e.usePrefix,o=e.getResetStyles,a=e.getCommonStyle,c=e.getCompUnitless;function u(g,v,b,S){var _=Array.isArray(g)?g[0]:g;function C(N){return"".concat(String(_)).concat(N.slice(0,1).toUpperCase()).concat(N.slice(1))}var x=(S==null?void 0:S.unitless)||{},E=typeof c=="function"?c(g):{},k=X(X({},E),{},K({},C("zIndexPopup"),!0));Object.keys(x).forEach(function(N){k[C(N)]=x[N]});var P=X(X({},S),{},{unitless:k,prefixToken:C}),T=f(g,v,b,P),O=d(_,b,P);return function(N){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:N,z=T(N,I),D=se(z,2),M=D[1],j=O(I),B=se(j,2),F=B[0],W=B[1];return[F,M,W]}}function d(g,v,b){var S=b.unitless,_=b.injectStyle,C=_===void 0?!0:_,x=b.prefixToken,E=b.ignore,k=function(O){var N=O.rootCls,I=O.cssVar,z=I===void 0?{}:I,D=n(),M=D.realToken;return GT({path:[g],prefix:z.prefix,key:z.key,unitless:S,ignore:E,token:M,scope:N},function(){var j=S1(g,M,v),B=b1(g,M,j,{deprecatedTokens:b==null?void 0:b.deprecatedTokens});return Object.keys(j).forEach(function(F){B[x(F)]=B[F],delete B[F]}),B}),null},P=function(O){var N=n(),I=N.cssVar;return[function(z){return C&&I?Q.createElement(Q.Fragment,null,Q.createElement(k,{rootCls:O,cssVar:I,component:g}),z):z},I==null?void 0:I.key]};return P}function f(g,v,b){var S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},_=Array.isArray(g)?g:[g,g],C=se(_,1),x=C[0],E=_.join("-"),k=e.layer||{name:"antd"};return function(P){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:P,O=n(),N=O.theme,I=O.realToken,z=O.hashId,D=O.token,M=O.cssVar,j=i(),B=j.rootPrefixCls,F=j.iconPrefixCls,W=r(),V=M?"css":"js",L=MP(function(){var Z=new Set;return M&&Object.keys(S.unitless||{}).forEach(function(te){Z.add(Ch(te,M.prefix)),Z.add(Ch(te,y1(x,M.prefix)))}),RP(V,Z)},[V,x,M==null?void 0:M.prefix]),G=OP(V),q=G.max,A=G.min,U={theme:N,token:D,hashId:z,nonce:function(){return W.nonce},clientOnly:S.clientOnly,layer:k,order:S.order||-999};typeof o=="function"&&mv(X(X({},U),{},{clientOnly:!1,path:["Shared",B]}),function(){return o(D,{prefix:{rootPrefixCls:B,iconPrefixCls:F},csp:W})});var Y=mv(X(X({},U),{},{path:[E,P,F]}),function(){if(S.injectStyle===!1)return[];var Z=PP(D),te=Z.token,ne=Z.flush,he=S1(x,I,b),me=".".concat(P),ue=b1(x,I,he,{deprecatedTokens:S.deprecatedTokens});M&&he&&bt(he)==="object"&&Object.keys(he).forEach(function(ce){he[ce]="var(".concat(Ch(ce,y1(x,M.prefix)),")")});var Se=er(te,{componentCls:me,prefixCls:P,iconCls:".".concat(F),antCls:".".concat(B),calc:L,max:q,min:A},M?he:ue),ae=v(Se,{hashId:z,prefixCls:P,rootPrefixCls:B,iconPrefixCls:F});ne(x,ue);var le=typeof a=="function"?a(Se,P,T,S.resetFont):null;return[S.resetStyle===!1?null:le,ae]});return[Y,z]}}function p(g,v,b){var S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},_=f(g,v,b,X({resetStyle:!1,order:-998},S)),C=function(E){var k=E.prefixCls,P=E.rootCls,T=P===void 0?k:P;return _(k,T),null};return C}return{genStyleHooks:u,genSubStyleComponent:p,genComponentStyleHook:f}}const Xs=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],BP="5.29.3";function og(e){return e>=0&&e<=255}function Gc(e,t){const{r,g:n,b:i,a:o}=new pr(e).toRgb();if(o<1)return e;const{r:a,g:c,b:u}=new pr(t).toRgb();for(let d=.01;d<=1;d+=.01){const f=Math.round((r-a*(1-d))/d),p=Math.round((n-c*(1-d))/d),g=Math.round((i-u*(1-d))/d);if(og(f)&&og(p)&&og(g))return new pr({r:f,g:p,b:g,a:Math.round(d*100)/100}).toRgbString()}return new pr({r,g:n,b:i,a:1}).toRgbString()}var LP=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function Z2(e){const{override:t}=e,r=LP(e,["override"]),n=Object.assign({},t);Object.keys(vu).forEach(g=>{delete n[g]});const i=Object.assign(Object.assign({},r),n),o=480,a=576,c=768,u=992,d=1200,f=1600;return i.motion===!1&&(i.motionDurationFast="0s",i.motionDurationMid="0s",i.motionDurationSlow="0s"),Object.assign(Object.assign(Object.assign({},i),{colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:Gc(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:Gc(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:Gc(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:i.lineWidth*3,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:Gc(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:`
64
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
65
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
66
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
67
+ `,boxShadowSecondary:`
68
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
69
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
70
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
71
+ `,boxShadowTertiary:`
72
+ 0 1px 2px 0 rgba(0, 0, 0, 0.03),
73
+ 0 1px 6px -1px rgba(0, 0, 0, 0.02),
74
+ 0 2px 4px 0 rgba(0, 0, 0, 0.02)
75
+ `,screenXS:o,screenXSMin:o,screenXSMax:a-1,screenSM:a,screenSMMin:a,screenSMMax:c-1,screenMD:c,screenMDMin:c,screenMDMax:u-1,screenLG:u,screenLGMin:u,screenLGMax:d-1,screenXL:d,screenXLMin:d,screenXLMax:f-1,screenXXL:f,screenXXLMin:f,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
76
+ 0 1px 2px -2px ${new pr("rgba(0, 0, 0, 0.16)").toRgbString()},
77
+ 0 3px 6px 0 ${new pr("rgba(0, 0, 0, 0.12)").toRgbString()},
78
+ 0 5px 12px 4px ${new pr("rgba(0, 0, 0, 0.09)").toRgbString()}
79
+ `,boxShadowDrawerRight:`
80
+ -6px 0 16px 0 rgba(0, 0, 0, 0.08),
81
+ -3px 0 6px -4px rgba(0, 0, 0, 0.12),
82
+ -9px 0 28px 8px rgba(0, 0, 0, 0.05)
83
+ `,boxShadowDrawerLeft:`
84
+ 6px 0 16px 0 rgba(0, 0, 0, 0.08),
85
+ 3px 0 6px -4px rgba(0, 0, 0, 0.12),
86
+ 9px 0 28px 8px rgba(0, 0, 0, 0.05)
87
+ `,boxShadowDrawerUp:`
88
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
89
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
90
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
91
+ `,boxShadowDrawerDown:`
92
+ 0 -6px 16px 0 rgba(0, 0, 0, 0.08),
93
+ 0 -3px 6px -4px rgba(0, 0, 0, 0.12),
94
+ 0 -9px 28px 8px rgba(0, 0, 0, 0.05)
95
+ `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),n)}var w1=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const eE={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},DP={motionBase:!0,motionUnit:!0},AP={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},tE=(e,t,r)=>{const n=r.getDerivativeToken(e),{override:i}=t,o=w1(t,["override"]);let a=Object.assign(Object.assign({},n),{override:i});return a=Z2(a),o&&Object.entries(o).forEach(([c,u])=>{const{theme:d}=u,f=w1(u,["theme"]);let p=f;d&&(p=tE(Object.assign(Object.assign({},a),f),{override:f},d)),a[c]=p}),a};function fi(){const{token:e,hashed:t,theme:r,override:n,cssVar:i}=Q.useContext(G2),o=`${BP}-${t||""}`,a=r||K2,[c,u,d]=_T(a,[vu,e],{salt:o,override:n,getComputedToken:tE,formatToken:Z2,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:eE,ignore:DP,preserve:AP}});return[a,d,t?u:"",c,i]}const bu={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Fr=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),Ql=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),Xh=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),HP=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),FP=(e,t,r,n)=>{const i=`[class^="${t}"], [class*=" ${t}"]`,o=r?`.${r}`:i,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let c={};return n!==!1&&(c={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[o]:Object.assign(Object.assign(Object.assign({},c),a),{[i]:a})}},ka=(e,t)=>({outline:`${ee(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),lo=(e,t)=>({"&:focus-visible":ka(e,t)}),rE=e=>({[`.${e}`]:Object.assign(Object.assign({},Ql()),{[`.${e} .${e}-icon`]:{display:"block"}})}),nE=e=>Object.assign(Object.assign({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},lo(e)),{"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:gr,genComponentStyleHook:WP,genSubStyleComponent:Mu}=jP({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=h.useContext(Pt);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,r,n,i]=fi();return{theme:e,realToken:t,hashId:r,token:n,cssVar:i}},useCSP:()=>{const{csp:e}=h.useContext(Pt);return e??{}},getResetStyles:(e,t)=>{var r;const n=HP(e);return[n,{"&":n},rE((r=t==null?void 0:t.prefix.iconPrefixCls)!==null&&r!==void 0?r:Pf)]},getCommonStyle:FP,getCompUnitless:()=>eE});function Of(e,t){return Xs.reduce((r,n)=>{const i=e[`${n}1`],o=e[`${n}3`],a=e[`${n}6`],c=e[`${n}7`];return Object.assign(Object.assign({},r),t(n,{lightColor:i,lightBorderColor:o,darkColor:a,textColor:c}))},{})}const VP=(e,t)=>{const[r,n]=fi();return mv({token:n,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>rE(e))},UP=Object.assign({},xf),{useId:x1}=UP,qP=()=>"",KP=typeof x1>"u"?qP:x1;function GP(e,t,r){var n;Tf();const i=e||{},o=i.inherit===!1||!t?Object.assign(Object.assign({},Gh),{hashed:(n=t==null?void 0:t.hashed)!==null&&n!==void 0?n:Gh.hashed,cssVar:t==null?void 0:t.cssVar}):t,a=KP();return Iu(()=>{var c,u;if(!e)return t;const d=Object.assign({},o.components);Object.keys(e.components||{}).forEach(g=>{d[g]=Object.assign(Object.assign({},d[g]),e.components[g])});const f=`css-var-${a.replace(/:/g,"")}`,p=((c=i.cssVar)!==null&&c!==void 0?c:o.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:r==null?void 0:r.prefixCls},typeof o.cssVar=="object"?o.cssVar:{}),typeof i.cssVar=="object"?i.cssVar:{}),{key:typeof i.cssVar=="object"&&((u=i.cssVar)===null||u===void 0?void 0:u.key)||f});return Object.assign(Object.assign(Object.assign({},o),i),{token:Object.assign(Object.assign({},o.token),i.token),components:d,cssVar:p})},[i,o],(c,u)=>c.some((d,f)=>{const p=u[f];return!pu(d,p,!0)}))}var XP=["children"],iE=h.createContext({});function YP(e){var t=e.children,r=Bt(e,XP);return h.createElement(iE.Provider,{value:r},t)}var JP=(function(e){ds(r,e);var t=hs(r);function r(){return pn(this,r),t.apply(this,arguments)}return gn(r,[{key:"render",value:function(){return this.props.children}}]),r})(h.Component);function QP(e){var t=h.useReducer(function(c){return c+1},0),r=se(t,2),n=r[1],i=h.useRef(e),o=Jr(function(){return i.current}),a=Jr(function(c){i.current=typeof c=="function"?c(i.current):c,n()});return[o,a]}var Bs="none",eh="appear",th="enter",rh="leave",E1="none",So="prepare",Pl="start",Ol="active",dy="end",oE="prepared";function $1(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit".concat(e)]="webkit".concat(t),r["Moz".concat(e)]="moz".concat(t),r["ms".concat(e)]="MS".concat(t),r["O".concat(e)]="o".concat(t.toLowerCase()),r}function ZP(e,t){var r={animationend:$1("Animation","AnimationEnd"),transitionend:$1("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}var eO=ZP(ni(),typeof window<"u"?window:{}),sE={};if(ni()){var tO=document.createElement("div");sE=tO.style}var nh={};function aE(e){if(nh[e])return nh[e];var t=eO[e];if(t)for(var r=Object.keys(t),n=r.length,i=0;i<n;i+=1){var o=r[i];if(Object.prototype.hasOwnProperty.call(t,o)&&o in sE)return nh[e]=t[o],nh[e]}return""}var lE=aE("animationend"),cE=aE("transitionend"),uE=!!(lE&&cE),k1=lE||"animationend",R1=cE||"transitionend";function T1(e,t){if(!e)return null;if(bt(e)==="object"){var r=t.replace(/-\w/g,function(n){return n[1].toUpperCase()});return e[r]}return"".concat(e,"-").concat(t)}const rO=(function(e){var t=h.useRef();function r(i){i&&(i.removeEventListener(R1,e),i.removeEventListener(k1,e))}function n(i){t.current&&t.current!==i&&r(t.current),i&&i!==t.current&&(i.addEventListener(R1,e),i.addEventListener(k1,e),t.current=i)}return h.useEffect(function(){return function(){r(t.current)}},[]),[n,r]});var dE=ni()?h.useLayoutEffect:h.useEffect;const nO=(function(){var e=h.useRef(null);function t(){$r.cancel(e.current)}function r(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var o=$r(function(){i<=1?n({isCanceled:function(){return o!==e.current}}):r(n,i-1)});e.current=o}return h.useEffect(function(){return function(){t()}},[]),[r,t]});var iO=[So,Pl,Ol,dy],oO=[So,oE],hE=!1,sO=!0;function fE(e){return e===Ol||e===dy}const aO=(function(e,t,r){var n=ql(E1),i=se(n,2),o=i[0],a=i[1],c=nO(),u=se(c,2),d=u[0],f=u[1];function p(){a(So,!0)}var g=t?oO:iO;return dE(function(){if(o!==E1&&o!==dy){var v=g.indexOf(o),b=g[v+1],S=r(o);S===hE?a(b,!0):b&&d(function(_){function C(){_.isCanceled()||a(b,!0)}S===!0?C():Promise.resolve(S).then(C)})}},[e,o]),h.useEffect(function(){return function(){f()}},[]),[p,o]});function lO(e,t,r,n){var i=n.motionEnter,o=i===void 0?!0:i,a=n.motionAppear,c=a===void 0?!0:a,u=n.motionLeave,d=u===void 0?!0:u,f=n.motionDeadline,p=n.motionLeaveImmediately,g=n.onAppearPrepare,v=n.onEnterPrepare,b=n.onLeavePrepare,S=n.onAppearStart,_=n.onEnterStart,C=n.onLeaveStart,x=n.onAppearActive,E=n.onEnterActive,k=n.onLeaveActive,P=n.onAppearEnd,T=n.onEnterEnd,O=n.onLeaveEnd,N=n.onVisibleChanged,I=ql(),z=se(I,2),D=z[0],M=z[1],j=QP(Bs),B=se(j,2),F=B[0],W=B[1],V=ql(null),L=se(V,2),G=L[0],q=L[1],A=F(),U=h.useRef(!1),Y=h.useRef(null);function Z(){return r()}var te=h.useRef(!1);function ne(){W(Bs),q(null,!0)}var he=Jr(function(Ee){var $e=F();if($e!==Bs){var je=Z();if(!(Ee&&!Ee.deadline&&Ee.target!==je)){var Oe=te.current,Qe;$e===eh&&Oe?Qe=P==null?void 0:P(je,Ee):$e===th&&Oe?Qe=T==null?void 0:T(je,Ee):$e===rh&&Oe&&(Qe=O==null?void 0:O(je,Ee)),Oe&&Qe!==!1&&ne()}}}),me=rO(he),ue=se(me,1),Se=ue[0],ae=function($e){switch($e){case eh:return K(K(K({},So,g),Pl,S),Ol,x);case th:return K(K(K({},So,v),Pl,_),Ol,E);case rh:return K(K(K({},So,b),Pl,C),Ol,k);default:return{}}},le=h.useMemo(function(){return ae(A)},[A]),ce=aO(A,!e,function(Ee){if(Ee===So){var $e=le[So];return $e?$e(Z()):hE}if(de in le){var je;q(((je=le[de])===null||je===void 0?void 0:je.call(le,Z(),null))||null)}return de===Ol&&A!==Bs&&(Se(Z()),f>0&&(clearTimeout(Y.current),Y.current=setTimeout(function(){he({deadline:!0})},f))),de===oE&&ne(),sO}),ye=se(ce,2),fe=ye[0],de=ye[1],be=fE(de);te.current=be;var Ce=h.useRef(null);dE(function(){if(!(U.current&&Ce.current===t)){M(t);var Ee=U.current;U.current=!0;var $e;!Ee&&t&&c&&($e=eh),Ee&&t&&o&&($e=th),(Ee&&!t&&d||!Ee&&p&&!t&&d)&&($e=rh);var je=ae($e);$e&&(e||je[So])?(W($e),fe()):W(Bs),Ce.current=t}},[t]),h.useEffect(function(){(A===eh&&!c||A===th&&!o||A===rh&&!d)&&W(Bs)},[c,o,d]),h.useEffect(function(){return function(){U.current=!1,clearTimeout(Y.current)}},[]);var Te=h.useRef(!1);h.useEffect(function(){D&&(Te.current=!0),D!==void 0&&A===Bs&&((Te.current||D)&&(N==null||N(D)),Te.current=!0)},[D,A]);var ze=G;return le[So]&&de===Pl&&(ze=X({transition:"none"},ze)),[A,de,ze,D??t]}function cO(e){var t=e;bt(e)==="object"&&(t=e.transitionSupport);function r(i,o){return!!(i.motionName&&t&&o!==!1)}var n=h.forwardRef(function(i,o){var a=i.visible,c=a===void 0?!0:a,u=i.removeOnLeave,d=u===void 0?!0:u,f=i.forceRender,p=i.children,g=i.motionName,v=i.leavedClassName,b=i.eventProps,S=h.useContext(iE),_=S.motion,C=r(i,_),x=h.useRef(),E=h.useRef();function k(){try{return x.current instanceof HTMLElement?x.current:Sh(E.current)}catch{return null}}var P=lO(C,c,k,i),T=se(P,4),O=T[0],N=T[1],I=T[2],z=T[3],D=h.useRef(z);z&&(D.current=!0);var M=h.useCallback(function(L){x.current=L,Q0(o,L)},[o]),j,B=X(X({},b),{},{visible:c});if(!p)j=null;else if(O===Bs)z?j=p(X({},B),M):!d&&D.current&&v?j=p(X(X({},B),{},{className:v}),M):f||!d&&!v?j=p(X(X({},B),{},{style:{display:"none"}}),M):j=null;else{var F;N===So?F="prepare":fE(N)?F="active":N===Pl&&(F="start");var W=T1(g,"".concat(O,"-").concat(F));j=p(X(X({},B),{},{className:re(T1(g,O),K(K({},W,W&&F),g,typeof g=="string")),style:I}),M)}if(h.isValidElement(j)&&Qs(j)){var V=Ma(j);V||(j=h.cloneElement(j,{ref:M}))}return h.createElement(JP,{ref:E},j)});return n.displayName="CSSMotion",n}const Hi=cO(uE);var kv="add",Rv="keep",Tv="remove",sg="removed";function uO(e){var t;return e&&bt(e)==="object"&&"key"in e?t=e:t={key:e},X(X({},t),{},{key:String(t.key)})}function Pv(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(uO)}function dO(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=[],n=0,i=t.length,o=Pv(e),a=Pv(t);o.forEach(function(d){for(var f=!1,p=n;p<i;p+=1){var g=a[p];if(g.key===d.key){n<p&&(r=r.concat(a.slice(n,p).map(function(v){return X(X({},v),{},{status:kv})})),n=p),r.push(X(X({},g),{},{status:Rv})),n+=1,f=!0;break}}f||r.push(X(X({},d),{},{status:Tv}))}),n<i&&(r=r.concat(a.slice(n).map(function(d){return X(X({},d),{},{status:kv})})));var c={};r.forEach(function(d){var f=d.key;c[f]=(c[f]||0)+1});var u=Object.keys(c).filter(function(d){return c[d]>1});return u.forEach(function(d){r=r.filter(function(f){var p=f.key,g=f.status;return p!==d||g!==Tv}),r.forEach(function(f){f.key===d&&(f.status=Rv)})}),r}var hO=["component","children","onVisibleChanged","onAllRemoved"],fO=["status"],mO=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function pO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Hi,r=(function(n){ds(o,n);var i=hs(o);function o(){var a;pn(this,o);for(var c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];return a=i.call.apply(i,[this].concat(u)),K(Qt(a),"state",{keyEntities:[]}),K(Qt(a),"removeKey",function(f){a.setState(function(p){var g=p.keyEntities.map(function(v){return v.key!==f?v:X(X({},v),{},{status:sg})});return{keyEntities:g}},function(){var p=a.state.keyEntities,g=p.filter(function(v){var b=v.status;return b!==sg}).length;g===0&&a.props.onAllRemoved&&a.props.onAllRemoved()})}),a}return gn(o,[{key:"render",value:function(){var c=this,u=this.state.keyEntities,d=this.props,f=d.component,p=d.children,g=d.onVisibleChanged;d.onAllRemoved;var v=Bt(d,hO),b=f||h.Fragment,S={};return mO.forEach(function(_){S[_]=v[_],delete v[_]}),delete v.keys,h.createElement(b,v,u.map(function(_,C){var x=_.status,E=Bt(_,fO),k=x===kv||x===Rv;return h.createElement(t,Re({},S,{key:E.key,visible:k,eventProps:E,onVisibleChanged:function(T){g==null||g(T,{key:E.key}),T||c.removeKey(E.key)}}),function(P,T){return p(X(X({},P),{},{index:C}),T)})}))}}],[{key:"getDerivedStateFromProps",value:function(c,u){var d=c.keys,f=u.keyEntities,p=Pv(d),g=dO(f,p);return{keyEntities:g.filter(function(v){var b=f.find(function(S){var _=S.key;return v.key===_});return!(b&&b.status===sg&&v.status===Tv)})}}}]),o})(h.Component);return K(r,"defaultProps",{component:"div"}),r}const gO=pO(uE),P1=h.createContext(!0);function vO(e){const t=h.useContext(P1),{children:r}=e,[,n]=fi(),{motion:i}=n,o=h.useRef(!1);return o.current||(o.current=t!==i),o.current?h.createElement(P1.Provider,{value:i},h.createElement(YP,{motion:i},r)):r}const yO=()=>null;var bO=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const _O=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let Yh,mE,pE,gE;function Ph(){return Yh||yu}function SO(){return mE||Pf}function CO(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const wO=e=>{const{prefixCls:t,iconPrefixCls:r,theme:n,holderRender:i}=e;t!==void 0&&(Yh=t),r!==void 0&&(mE=r),"holderRender"in e&&(gE=i),n&&(CO(n)?CP(Ph(),n):pE=n)},vE=()=>({getPrefixCls:(e,t)=>t||(e?`${Ph()}-${e}`:Ph()),getIconPrefixCls:SO,getRootPrefixCls:()=>Yh||Ph(),getTheme:()=>pE,holderRender:gE}),xO=e=>{const{children:t,csp:r,autoInsertSpaceInButton:n,alert:i,anchor:o,form:a,locale:c,componentSize:u,direction:d,space:f,splitter:p,virtual:g,dropdownMatchSelectWidth:v,popupMatchSelectWidth:b,popupOverflow:S,legacyLocale:_,parentContext:C,iconPrefixCls:x,theme:E,componentDisabled:k,segmented:P,statistic:T,spin:O,calendar:N,carousel:I,cascader:z,collapse:D,typography:M,checkbox:j,descriptions:B,divider:F,drawer:W,skeleton:V,steps:L,image:G,layout:q,list:A,mentions:U,modal:Y,progress:Z,result:te,slider:ne,breadcrumb:he,menu:me,pagination:ue,input:Se,textArea:ae,empty:le,badge:ce,radio:ye,rate:fe,switch:de,transfer:be,avatar:Ce,message:Te,tag:ze,table:Ee,card:$e,tabs:je,timeline:Oe,timePicker:Qe,upload:st,notification:Et,tree:mt,colorPicker:Je,datePicker:ht,rangePicker:Xe,flex:vt,wave:tt,dropdown:Le,warning:nt,tour:Me,tooltip:qe,popover:Ot,popconfirm:_t,floatButton:tr,floatButtonGroup:Yt,variant:vr,inputNumber:Tr,treeSelect:nr}=e,At=h.useCallback((rt,Ht)=>{const{prefixCls:qt}=e;if(Ht)return Ht;const jt=qt||C.getPrefixCls("");return rt?`${jt}-${rt}`:jt},[C.getPrefixCls,e.prefixCls]),kt=x||C.iconPrefixCls||Pf,ir=r||C.csp;VP(kt,ir);const Gt=GP(E,C.theme,{prefixCls:At("")}),it={csp:ir,autoInsertSpaceInButton:n,alert:i,anchor:o,locale:c||_,direction:d,space:f,splitter:p,virtual:g,popupMatchSelectWidth:b??v,popupOverflow:S,getPrefixCls:At,iconPrefixCls:kt,theme:Gt,segmented:P,statistic:T,spin:O,calendar:N,carousel:I,cascader:z,collapse:D,typography:M,checkbox:j,descriptions:B,divider:F,drawer:W,skeleton:V,steps:L,image:G,input:Se,textArea:ae,layout:q,list:A,mentions:U,modal:Y,progress:Z,result:te,slider:ne,breadcrumb:he,menu:me,pagination:ue,empty:le,badge:ce,radio:ye,rate:fe,switch:de,transfer:be,avatar:Ce,message:Te,tag:ze,table:Ee,card:$e,tabs:je,timeline:Oe,timePicker:Qe,upload:st,notification:Et,tree:mt,colorPicker:Je,datePicker:ht,rangePicker:Xe,flex:vt,wave:tt,dropdown:Le,warning:nt,tour:Me,tooltip:qe,popover:Ot,popconfirm:_t,floatButton:tr,floatButtonGroup:Yt,variant:vr,inputNumber:Tr,treeSelect:nr},xt=Object.assign({},C);Object.keys(it).forEach(rt=>{it[rt]!==void 0&&(xt[rt]=it[rt])}),_O.forEach(rt=>{const Ht=e[rt];Ht&&(xt[rt]=Ht)}),typeof n<"u"&&(xt.button=Object.assign({autoInsertSpace:n},xt.button));const ft=Iu(()=>xt,xt,(rt,Ht)=>{const qt=Object.keys(rt),jt=Object.keys(Ht);return qt.length!==jt.length||qt.some(Lt=>rt[Lt]!==Ht[Lt])}),{layer:Ie}=h.useContext(Nu),ke=h.useMemo(()=>({prefixCls:kt,csp:ir,layer:Ie?"antd":void 0}),[kt,ir,Ie]);let xe=h.createElement(h.Fragment,null,h.createElement(yO,{dropdownMatchSelectWidth:v}),t);const De=h.useMemo(()=>{var rt,Ht,qt,jt;return Tl(((rt=Ks.Form)===null||rt===void 0?void 0:rt.defaultValidateMessages)||{},((qt=(Ht=ft.locale)===null||Ht===void 0?void 0:Ht.Form)===null||qt===void 0?void 0:qt.defaultValidateMessages)||{},((jt=ft.form)===null||jt===void 0?void 0:jt.validateMessages)||{},(a==null?void 0:a.validateMessages)||{})},[ft,a==null?void 0:a.validateMessages]);Object.keys(De).length>0&&(xe=h.createElement(eP.Provider,{value:De},xe)),c&&(xe=h.createElement(oP,{locale:c,_ANT_MARK__:iP},xe)),xe=h.createElement(ly.Provider,{value:ke},xe),u&&(xe=h.createElement(wP,{size:u},xe)),xe=h.createElement(vO,null,xe);const et=h.useMemo(()=>{const rt=Gt||{},{algorithm:Ht,token:qt,components:jt,cssVar:Lt}=rt,kr=bO(rt,["algorithm","token","components","cssVar"]),wr=Ht&&(!Array.isArray(Ht)||Ht.length>0)?cv(Ht):K2,Pr={};Object.entries(jt||{}).forEach(([sr,dr])=>{const He=Object.assign({},dr);"algorithm"in He&&(He.algorithm===!0?He.theme=wr:(Array.isArray(He.algorithm)||typeof He.algorithm=="function")&&(He.theme=cv(He.algorithm)),delete He.algorithm),Pr[sr]=He});const Lr=Object.assign(Object.assign({},vu),qt);return Object.assign(Object.assign({},kr),{theme:wr,token:Lr,components:Pr,override:Object.assign({override:Lr},Pr),cssVar:Lt})},[Gt]);return E&&(xe=h.createElement(G2.Provider,{value:et},xe)),ft.warning&&(xe=h.createElement(ZT.Provider,{value:ft.warning},xe)),k!==void 0&&(xe=h.createElement(X2,{disabled:k},xe)),h.createElement(Pt.Provider,{value:ft},xe)},Ko=e=>{const t=h.useContext(Pt),r=h.useContext(cy);return h.createElement(xO,Object.assign({parentContext:t,legacyLocale:r},e))};Ko.ConfigContext=Pt;Ko.SizeContext=Ul;Ko.config=wO;Ko.useConfig=xP;Object.defineProperty(Ko,"SizeContext",{get:()=>Ul});var EO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function yE(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function $O(e){return yE(e)instanceof ShadowRoot}function Jh(e){return $O(e)?yE(e):null}function kO(e){return e.replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function RO(e,t){jn(e,"[@ant-design/icons] ".concat(t))}function O1(e){return bt(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(bt(e.icon)==="object"||typeof e.icon=="function")}function I1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,r){var n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:delete t[r],t[kO(r)]=n}return t},{})}function Ov(e,t,r){return r?Q.createElement(e.tag,X(X({key:t},I1(e.attrs)),r),(e.children||[]).map(function(n,i){return Ov(n,"".concat(t,"-").concat(e.tag,"-").concat(i))})):Q.createElement(e.tag,X({key:t},I1(e.attrs)),(e.children||[]).map(function(n,i){return Ov(n,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function bE(e){return $a(e)[0]}function _E(e){return e?Array.isArray(e)?e:[e]:[]}var TO=`
96
+ .anticon {
97
+ display: inline-flex;
98
+ align-items: center;
99
+ color: inherit;
100
+ font-style: normal;
101
+ line-height: 0;
102
+ text-align: center;
103
+ text-transform: none;
104
+ vertical-align: -0.125em;
105
+ text-rendering: optimizeLegibility;
106
+ -webkit-font-smoothing: antialiased;
107
+ -moz-osx-font-smoothing: grayscale;
108
+ }
109
+
110
+ .anticon > * {
111
+ line-height: 1;
112
+ }
113
+
114
+ .anticon svg {
115
+ display: inline-block;
116
+ }
117
+
118
+ .anticon::before {
119
+ display: none;
120
+ }
121
+
122
+ .anticon .anticon-icon {
123
+ display: block;
124
+ }
125
+
126
+ .anticon[tabindex] {
127
+ cursor: pointer;
128
+ }
129
+
130
+ .anticon-spin::before,
131
+ .anticon-spin {
132
+ display: inline-block;
133
+ -webkit-animation: loadingCircle 1s infinite linear;
134
+ animation: loadingCircle 1s infinite linear;
135
+ }
136
+
137
+ @-webkit-keyframes loadingCircle {
138
+ 100% {
139
+ -webkit-transform: rotate(360deg);
140
+ transform: rotate(360deg);
141
+ }
142
+ }
143
+
144
+ @keyframes loadingCircle {
145
+ 100% {
146
+ -webkit-transform: rotate(360deg);
147
+ transform: rotate(360deg);
148
+ }
149
+ }
150
+ `,PO=function(t){var r=h.useContext(ly),n=r.csp,i=r.prefixCls,o=r.layer,a=TO;i&&(a=a.replace(/anticon/g,i)),o&&(a="@layer ".concat(o,` {
151
+ `).concat(a,`
152
+ }`)),h.useEffect(function(){var c=t.current,u=Jh(c);us(a,"@ant-design-icons",{prepend:!o,csp:n,attachTo:u})},[])},OO=["icon","className","onClick","style","primaryColor","secondaryColor"],su={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function IO(e){var t=e.primaryColor,r=e.secondaryColor;su.primaryColor=t,su.secondaryColor=r||bE(t),su.calculated=!!r}function NO(){return X({},su)}var Zl=function(t){var r=t.icon,n=t.className,i=t.onClick,o=t.style,a=t.primaryColor,c=t.secondaryColor,u=Bt(t,OO),d=h.useRef(),f=su;if(a&&(f={primaryColor:a,secondaryColor:c||bE(a)}),PO(d),RO(O1(r),"icon should be icon definiton, but got ".concat(r)),!O1(r))return null;var p=r;return p&&typeof p.icon=="function"&&(p=X(X({},p),{},{icon:p.icon(f.primaryColor,f.secondaryColor)})),Ov(p.icon,"svg-".concat(p.name),X(X({className:n,onClick:i,style:o,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},u),{},{ref:d}))};Zl.displayName="IconReact";Zl.getTwoToneColors=NO;Zl.setTwoToneColors=IO;function SE(e){var t=_E(e),r=se(t,2),n=r[0],i=r[1];return Zl.setTwoToneColors({primaryColor:n,secondaryColor:i})}function MO(){var e=Zl.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var zO=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];SE(Kh.primary);var _r=h.forwardRef(function(e,t){var r=e.className,n=e.icon,i=e.spin,o=e.rotate,a=e.tabIndex,c=e.onClick,u=e.twoToneColor,d=Bt(e,zO),f=h.useContext(ly),p=f.prefixCls,g=p===void 0?"anticon":p,v=f.rootClassName,b=re(v,g,K(K({},"".concat(g,"-").concat(n.name),!!n.name),"".concat(g,"-spin"),!!i||n.name==="loading"),r),S=a;S===void 0&&c&&(S=-1);var _=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,C=_E(u),x=se(C,2),E=x[0],k=x[1];return h.createElement("span",Re({role:"img","aria-label":n.name},d,{ref:t,tabIndex:S,onClick:c,className:b}),h.createElement(Zl,{icon:n,primaryColor:E,secondaryColor:k,style:_}))});_r.displayName="AntdIcon";_r.getTwoToneColor=MO;_r.setTwoToneColor=SE;var jO=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:EO}))},CE=h.forwardRef(jO),BO={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},LO=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:BO}))},If=h.forwardRef(LO),DO={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},AO=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:DO}))},Ys=h.forwardRef(AO),HO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},FO=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:HO}))},wE=h.forwardRef(FO),WO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},VO=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:WO}))},xE=h.forwardRef(VO),UO=`accept acceptCharset accessKey action allowFullScreen allowTransparency
153
+ alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
154
+ charSet checked classID className colSpan cols content contentEditable contextMenu
155
+ controls coords crossOrigin data dateTime default defer dir disabled download draggable
156
+ encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
157
+ headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
158
+ is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
159
+ mediaGroup method min minLength multiple muted name noValidate nonce open
160
+ optimum pattern placeholder poster preload radioGroup readOnly rel required
161
+ reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
162
+ shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
163
+ summary tabIndex target title type useMap value width wmode wrap`,qO=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
164
+ onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
165
+ onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
166
+ onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
167
+ onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
168
+ onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
169
+ onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,KO="".concat(UO," ").concat(qO).split(/[\s\n]+/),GO="aria-",XO="data-";function N1(e,t){return e.indexOf(t)===0}function Fi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r;t===!1?r={aria:!0,data:!0,attr:!0}:t===!0?r={aria:!0}:r=X({},t);var n={};return Object.keys(e).forEach(function(i){(r.aria&&(i==="role"||N1(i,GO))||r.data&&N1(i,XO)||r.attr&&KO.includes(i))&&(n[i]=e[i])}),n}function EE(e){return e&&Q.isValidElement(e)&&e.type===Q.Fragment}const $E=(e,t,r)=>Q.isValidElement(e)?Q.cloneElement(e,typeof r=="function"?r(e.props||{}):r):t;function hi(e,t){return $E(e,e,t)}const ko=e=>{const[,,,,t]=fi();return t?`${e}-css-var`:""};var Ge={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},kE=h.forwardRef(function(e,t){var r=e.prefixCls,n=e.style,i=e.className,o=e.duration,a=o===void 0?4.5:o,c=e.showProgress,u=e.pauseOnHover,d=u===void 0?!0:u,f=e.eventKey,p=e.content,g=e.closable,v=e.closeIcon,b=v===void 0?"x":v,S=e.props,_=e.onClick,C=e.onNoticeClose,x=e.times,E=e.hovering,k=h.useState(!1),P=se(k,2),T=P[0],O=P[1],N=h.useState(0),I=se(N,2),z=I[0],D=I[1],M=h.useState(0),j=se(M,2),B=j[0],F=j[1],W=E||T,V=a>0&&c,L=function(){C(f)},G=function(te){(te.key==="Enter"||te.code==="Enter"||te.keyCode===Ge.ENTER)&&L()};h.useEffect(function(){if(!W&&a>0){var Z=Date.now()-B,te=setTimeout(function(){L()},a*1e3-B);return function(){d&&clearTimeout(te),F(Date.now()-Z)}}},[a,W,x]),h.useEffect(function(){if(!W&&V&&(d||B===0)){var Z=performance.now(),te,ne=function he(){cancelAnimationFrame(te),te=requestAnimationFrame(function(me){var ue=me+B-Z,Se=Math.min(ue/(a*1e3),1);D(Se*100),Se<1&&he()})};return ne(),function(){d&&cancelAnimationFrame(te)}}},[a,B,W,V,x]);var q=h.useMemo(function(){return bt(g)==="object"&&g!==null?g:g?{closeIcon:b}:{}},[g,b]),A=Fi(q,!0),U=100-(!z||z<0?0:z>100?100:z),Y="".concat(r,"-notice");return h.createElement("div",Re({},S,{ref:t,className:re(Y,i,K({},"".concat(Y,"-closable"),g)),style:n,onMouseEnter:function(te){var ne;O(!0),S==null||(ne=S.onMouseEnter)===null||ne===void 0||ne.call(S,te)},onMouseLeave:function(te){var ne;O(!1),S==null||(ne=S.onMouseLeave)===null||ne===void 0||ne.call(S,te)},onClick:_}),h.createElement("div",{className:"".concat(Y,"-content")},p),g&&h.createElement("a",Re({tabIndex:0,className:"".concat(Y,"-close"),onKeyDown:G,"aria-label":"Close"},A,{onClick:function(te){te.preventDefault(),te.stopPropagation(),L()}}),q.closeIcon),V&&h.createElement("progress",{className:"".concat(Y,"-progress"),max:"100",value:U},U+"%"))}),RE=Q.createContext({}),YO=function(t){var r=t.children,n=t.classNames;return Q.createElement(RE.Provider,{value:{classNames:n}},r)},M1=8,z1=3,j1=16,JO=function(t){var r={offset:M1,threshold:z1,gap:j1};if(t&&bt(t)==="object"){var n,i,o;r.offset=(n=t.offset)!==null&&n!==void 0?n:M1,r.threshold=(i=t.threshold)!==null&&i!==void 0?i:z1,r.gap=(o=t.gap)!==null&&o!==void 0?o:j1}return[!!t,r]},QO=["className","style","classNames","styles"],ZO=function(t){var r=t.configList,n=t.placement,i=t.prefixCls,o=t.className,a=t.style,c=t.motion,u=t.onAllNoticeRemoved,d=t.onNoticeClose,f=t.stack,p=h.useContext(RE),g=p.classNames,v=h.useRef({}),b=h.useState(null),S=se(b,2),_=S[0],C=S[1],x=h.useState([]),E=se(x,2),k=E[0],P=E[1],T=r.map(function(W){return{config:W,key:String(W.key)}}),O=JO(f),N=se(O,2),I=N[0],z=N[1],D=z.offset,M=z.threshold,j=z.gap,B=I&&(k.length>0||T.length<=M),F=typeof c=="function"?c(n):c;return h.useEffect(function(){I&&k.length>1&&P(function(W){return W.filter(function(V){return T.some(function(L){var G=L.key;return V===G})})})},[k,T,I]),h.useEffect(function(){var W;if(I&&v.current[(W=T[T.length-1])===null||W===void 0?void 0:W.key]){var V;C(v.current[(V=T[T.length-1])===null||V===void 0?void 0:V.key])}},[T,I]),Q.createElement(gO,Re({key:n,className:re(i,"".concat(i,"-").concat(n),g==null?void 0:g.list,o,K(K({},"".concat(i,"-stack"),!!I),"".concat(i,"-stack-expanded"),B)),style:a,keys:T,motionAppear:!0},F,{onAllRemoved:function(){u(n)}}),function(W,V){var L=W.config,G=W.className,q=W.style,A=W.index,U=L,Y=U.key,Z=U.times,te=String(Y),ne=L,he=ne.className,me=ne.style,ue=ne.classNames,Se=ne.styles,ae=Bt(ne,QO),le=T.findIndex(function(Oe){return Oe.key===te}),ce={};if(I){var ye=T.length-1-(le>-1?le:A-1),fe=n==="top"||n==="bottom"?"-50%":"0";if(ye>0){var de,be,Ce;ce.height=B?(de=v.current[te])===null||de===void 0?void 0:de.offsetHeight:_==null?void 0:_.offsetHeight;for(var Te=0,ze=0;ze<ye;ze++){var Ee;Te+=((Ee=v.current[T[T.length-1-ze].key])===null||Ee===void 0?void 0:Ee.offsetHeight)+j}var $e=(B?Te:ye*D)*(n.startsWith("top")?1:-1),je=!B&&_!==null&&_!==void 0&&_.offsetWidth&&(be=v.current[te])!==null&&be!==void 0&&be.offsetWidth?((_==null?void 0:_.offsetWidth)-D*2*(ye<3?ye:3))/((Ce=v.current[te])===null||Ce===void 0?void 0:Ce.offsetWidth):1;ce.transform="translate3d(".concat(fe,", ").concat($e,"px, 0) scaleX(").concat(je,")")}else ce.transform="translate3d(".concat(fe,", 0, 0)")}return Q.createElement("div",{ref:V,className:re("".concat(i,"-notice-wrapper"),G,ue==null?void 0:ue.wrapper),style:X(X(X({},q),ce),Se==null?void 0:Se.wrapper),onMouseEnter:function(){return P(function(Qe){return Qe.includes(te)?Qe:[].concat(We(Qe),[te])})},onMouseLeave:function(){return P(function(Qe){return Qe.filter(function(st){return st!==te})})}},Q.createElement(kE,Re({},ae,{ref:function(Qe){le>-1?v.current[te]=Qe:delete v.current[te]},prefixCls:i,classNames:ue,styles:Se,className:re(he,g==null?void 0:g.notice),style:me,times:Z,key:Y,eventKey:Y,onNoticeClose:d,hovering:I&&k.length>0})))})},eI=h.forwardRef(function(e,t){var r=e.prefixCls,n=r===void 0?"rc-notification":r,i=e.container,o=e.motion,a=e.maxCount,c=e.className,u=e.style,d=e.onAllRemoved,f=e.stack,p=e.renderNotifications,g=h.useState([]),v=se(g,2),b=v[0],S=v[1],_=function(I){var z,D=b.find(function(M){return M.key===I});D==null||(z=D.onClose)===null||z===void 0||z.call(D),S(function(M){return M.filter(function(j){return j.key!==I})})};h.useImperativeHandle(t,function(){return{open:function(I){S(function(z){var D=We(z),M=D.findIndex(function(F){return F.key===I.key}),j=X({},I);if(M>=0){var B;j.times=(((B=z[M])===null||B===void 0?void 0:B.times)||0)+1,D[M]=j}else j.times=0,D.push(j);return a>0&&D.length>a&&(D=D.slice(-a)),D})},close:function(I){_(I)},destroy:function(){S([])}}});var C=h.useState({}),x=se(C,2),E=x[0],k=x[1];h.useEffect(function(){var N={};b.forEach(function(I){var z=I.placement,D=z===void 0?"topRight":z;D&&(N[D]=N[D]||[],N[D].push(I))}),Object.keys(E).forEach(function(I){N[I]=N[I]||[]}),k(N)},[b]);var P=function(I){k(function(z){var D=X({},z),M=D[I]||[];return M.length||delete D[I],D})},T=h.useRef(!1);if(h.useEffect(function(){Object.keys(E).length>0?T.current=!0:T.current&&(d==null||d(),T.current=!1)},[E]),!i)return null;var O=Object.keys(E);return qs.createPortal(h.createElement(h.Fragment,null,O.map(function(N){var I=E[N],z=h.createElement(ZO,{key:N,configList:I,placement:N,prefixCls:n,className:c==null?void 0:c(N),style:u==null?void 0:u(N),motion:o,onNoticeClose:_,onAllNoticeRemoved:P,stack:f});return p?p(z,{prefixCls:n,key:N}):z})),i)}),tI=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],rI=function(){return document.body},B1=0;function nI(){for(var e={},t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return r.forEach(function(i){i&&Object.keys(i).forEach(function(o){var a=i[o];a!==void 0&&(e[o]=a)})}),e}function iI(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.getContainer,r=t===void 0?rI:t,n=e.motion,i=e.prefixCls,o=e.maxCount,a=e.className,c=e.style,u=e.onAllRemoved,d=e.stack,f=e.renderNotifications,p=Bt(e,tI),g=h.useState(),v=se(g,2),b=v[0],S=v[1],_=h.useRef(),C=h.createElement(eI,{container:b,ref:_,prefixCls:i,motion:n,maxCount:o,className:a,style:c,onAllRemoved:u,stack:d,renderNotifications:f}),x=h.useState([]),E=se(x,2),k=E[0],P=E[1],T=Jr(function(N){var I=nI(p,N);(I.key===null||I.key===void 0)&&(I.key="rc-notification-".concat(B1),B1+=1),P(function(z){return[].concat(We(z),[{type:"open",config:I}])})}),O=h.useMemo(function(){return{open:T,close:function(I){P(function(z){return[].concat(We(z),[{type:"close",key:I}])})},destroy:function(){P(function(I){return[].concat(We(I),[{type:"destroy"}])})}}},[]);return h.useEffect(function(){S(r())}),h.useEffect(function(){if(_.current&&k.length){k.forEach(function(z){switch(z.type){case"open":_.current.open(z.config);break;case"close":_.current.close(z.key);break;case"destroy":_.current.destroy();break}});var N,I;P(function(z){return(N!==z||!I)&&(N=z,I=z.filter(function(D){return!k.includes(D)})),I})}},[k]),[O,C]}var oI={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},sI=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:oI}))},zu=h.forwardRef(sI);function Iv(...e){const t={};return e.forEach(r=>{r&&Object.keys(r).forEach(n=>{r[n]!==void 0&&(t[n]=r[n])})}),t}function Kl(e){if(!e)return;const{closable:t,closeIcon:r}=e;return{closable:t,closeIcon:r}}function L1(e){const{closable:t,closeIcon:r}=e||{};return Q.useMemo(()=>{if(!t&&(t===!1||r===!1||r===null))return!1;if(t===void 0&&r===void 0)return null;let n={closeIcon:typeof r!="boolean"&&r!==null?r:void 0};return t&&typeof t=="object"&&(n=Object.assign(Object.assign({},n),t)),n},[t,r])}const aI={},hy=(e,t,r=aI)=>{const n=L1(e),i=L1(t),[o]=fs("global",Ks.global),a=typeof n!="boolean"?!!(n!=null&&n.disabled):!1,c=Q.useMemo(()=>Object.assign({closeIcon:Q.createElement(Ys,null)},r),[r]),u=Q.useMemo(()=>n===!1?!1:n?Iv(c,i,n):i===!1?!1:i?Iv(c,i):c.closable?c:!1,[n,i,c]);return Q.useMemo(()=>{var d,f;if(u===!1)return[!1,null,a,{}];const{closeIconRender:p}=c,{closeIcon:g}=u;let v=g;const b=Fi(u,!0);return v!=null&&(p&&(v=p(g)),v=Q.isValidElement(v)?Q.cloneElement(v,Object.assign(Object.assign(Object.assign({},v.props),{"aria-label":(f=(d=v.props)===null||d===void 0?void 0:d["aria-label"])!==null&&f!==void 0?f:o.close}),b)):Q.createElement("span",Object.assign({"aria-label":o.close},b),v)),[!0,v,a,b]},[a,o.close,u,c])},lI=()=>Q.useReducer(e=>e+1,0),cI=()=>{const[e,t]=h.useState([]),r=h.useCallback(n=>(t(i=>[].concat(We(i),[n])),()=>{t(i=>i.filter(o=>o!==n))}),[]);return[e,r]},ju=Q.createContext(void 0),Ls=100,uI=10,TE=Ls*uI,PE={Modal:Ls,Drawer:Ls,Popover:Ls,Popconfirm:Ls,Tooltip:Ls,Tour:Ls,FloatButton:Ls},dI={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function hI(e){return e in PE}const ec=(e,t)=>{const[,r]=fi(),n=Q.useContext(ju),i=hI(e);let o;if(t!==void 0)o=[t,t];else{let a=n??0;i?a+=(n?0:r.zIndexPopupBase)+PE[e]:a+=dI[e],o=[n===void 0?t:a,a]}return o},fI=e=>{const{componentCls:t,iconCls:r,boxShadow:n,colorText:i,colorSuccess:o,colorError:a,colorWarning:c,colorInfo:u,fontSizeLG:d,motionEaseInOutCirc:f,motionDurationSlow:p,marginXS:g,paddingXS:v,borderRadiusLG:b,zIndexPopup:S,contentPadding:_,contentBg:C}=e,x=`${t}-notice`,E=new Xt("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:v,transform:"translateY(0)",opacity:1}}),k=new Xt("MessageMoveOut",{"0%":{maxHeight:e.height,padding:v,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),P={padding:v,textAlign:"center",[`${t}-custom-content`]:{display:"flex",alignItems:"center"},[`${t}-custom-content > ${r}`]:{marginInlineEnd:g,fontSize:d},[`${x}-content`]:{display:"inline-block",padding:_,background:C,borderRadius:b,boxShadow:n,pointerEvents:"all"},[`${t}-success > ${r}`]:{color:o},[`${t}-error > ${r}`]:{color:a},[`${t}-warning > ${r}`]:{color:c},[`${t}-info > ${r},
170
+ ${t}-loading > ${r}`]:{color:u}};return[{[t]:Object.assign(Object.assign({},Fr(e)),{color:i,position:"fixed",top:g,width:"100%",pointerEvents:"none",zIndex:S,[`${t}-move-up`]:{animationFillMode:"forwards"},[`
171
+ ${t}-move-up-appear,
172
+ ${t}-move-up-enter
173
+ `]:{animationName:E,animationDuration:p,animationPlayState:"paused",animationTimingFunction:f},[`
174
+ ${t}-move-up-appear${t}-move-up-appear-active,
175
+ ${t}-move-up-enter${t}-move-up-enter-active
176
+ `]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:k,animationDuration:p,animationPlayState:"paused",animationTimingFunction:f},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[t]:{[`${x}-wrapper`]:Object.assign({},P)}},{[`${t}-notice-pure-panel`]:Object.assign(Object.assign({},P),{padding:0,textAlign:"start"})}]},mI=e=>({zIndexPopup:e.zIndexPopupBase+TE+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`}),OE=gr("Message",e=>{const t=er(e,{height:150});return fI(t)},mI);var pI=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const gI={info:h.createElement(xE,null),success:h.createElement(CE,null),error:h.createElement(If,null),warning:h.createElement(wE,null),loading:h.createElement(zu,null)},IE=({prefixCls:e,type:t,icon:r,children:n})=>h.createElement("div",{className:re(`${e}-custom-content`,`${e}-${t}`)},r||gI[t],h.createElement("span",null,n)),vI=e=>{const{prefixCls:t,className:r,type:n,icon:i,content:o}=e,a=pI(e,["prefixCls","className","type","icon","content"]),{getPrefixCls:c}=h.useContext(Pt),u=t||c("message"),d=ko(u),[f,p,g]=OE(u,d);return f(h.createElement(kE,Object.assign({},a,{prefixCls:u,className:re(r,p,`${u}-notice-pure-panel`,g,d),eventKey:"pure",duration:null,content:h.createElement(IE,{prefixCls:u,type:n,icon:i},o)})))};function yI(e,t){return{motionName:t??`${e}-move-up`}}function fy(e){let t;const r=new Promise(i=>{t=e(()=>{i(!0)})}),n=()=>{t==null||t()};return n.then=(i,o)=>r.then(i,o),n.promise=r,n}var bI=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const _I=8,SI=3,CI=({children:e,prefixCls:t})=>{const r=ko(t),[n,i,o]=OE(t,r);return n(h.createElement(YO,{classNames:{list:re(i,o,r)}},e))},wI=(e,{prefixCls:t,key:r})=>h.createElement(CI,{prefixCls:t,key:r},e),xI=h.forwardRef((e,t)=>{const{top:r,prefixCls:n,getContainer:i,maxCount:o,duration:a=SI,rtl:c,transitionName:u,onAllRemoved:d}=e,{getPrefixCls:f,getPopupContainer:p,message:g,direction:v}=h.useContext(Pt),b=n||f("message"),S=()=>({left:"50%",transform:"translateX(-50%)",top:r??_I}),_=()=>re({[`${b}-rtl`]:c??v==="rtl"}),C=()=>yI(b,u),x=h.createElement("span",{className:`${b}-close-x`},h.createElement(Ys,{className:`${b}-close-icon`})),[E,k]=iI({prefixCls:b,style:S,className:_,motion:C,closable:!1,closeIcon:x,duration:a,getContainer:()=>(i==null?void 0:i())||(p==null?void 0:p())||document.body,maxCount:o,onAllRemoved:d,renderNotifications:wI});return h.useImperativeHandle(t,()=>Object.assign(Object.assign({},E),{prefixCls:b,message:g})),k});let D1=0;function NE(e){const t=h.useRef(null);return Tf(),[h.useMemo(()=>{const n=u=>{var d;(d=t.current)===null||d===void 0||d.close(u)},i=u=>{if(!t.current){const T=()=>{};return T.then=()=>{},T}const{open:d,prefixCls:f,message:p}=t.current,g=`${f}-notice`,{content:v,icon:b,type:S,key:_,className:C,style:x,onClose:E}=u,k=bI(u,["content","icon","type","key","className","style","onClose"]);let P=_;return P==null&&(D1+=1,P=`antd-message-${D1}`),fy(T=>(d(Object.assign(Object.assign({},k),{key:P,content:h.createElement(IE,{prefixCls:f,type:S,icon:b},v),placement:"top",className:re(S&&`${g}-${S}`,C,p==null?void 0:p.className),style:Object.assign(Object.assign({},p==null?void 0:p.style),x),onClose:()=>{E==null||E(),T()}})),()=>{n(P)}))},a={open:i,destroy:u=>{var d;u!==void 0?n(u):(d=t.current)===null||d===void 0||d.destroy()}};return["info","success","warning","error","loading"].forEach(u=>{const d=(f,p,g)=>{let v;f&&typeof f=="object"&&"content"in f?v=f:v={content:f};let b,S;typeof p=="function"?S=p:(b=p,S=g);const _=Object.assign(Object.assign({onClose:S,duration:b},v),{type:u});return i(_)};a[u]=d}),a},[]),h.createElement(xI,Object.assign({key:"message-holder"},e,{ref:t}))]}function EI(e){return NE(e)}function ME(e,t){this.v=e,this.k=t}function ti(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}ti=function(a,c,u,d){function f(p,g){ti(a,p,function(v){return this._invoke(p,g,v)})}c?i?i(a,c,{value:u,enumerable:!d,configurable:!d,writable:!d}):a[c]=u:(f("next",0),f("throw",1),f("return",2))},ti(e,t,r,n)}function my(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r=typeof Symbol=="function"?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(v,b,S,_){var C=b&&b.prototype instanceof c?b:c,x=Object.create(C.prototype);return ti(x,"_invoke",(function(E,k,P){var T,O,N,I=0,z=P||[],D=!1,M={p:0,n:0,v:e,a:j,f:j.bind(e,4),d:function(F,W){return T=F,O=0,N=e,M.n=W,a}};function j(B,F){for(O=B,N=F,t=0;!D&&I&&!W&&t<z.length;t++){var W,V=z[t],L=M.p,G=V[2];B>3?(W=G===F)&&(N=V[(O=V[4])?5:(O=3,3)],V[4]=V[5]=e):V[0]<=L&&((W=B<2&&L<V[1])?(O=0,M.v=F,M.n=V[1]):L<G&&(W=B<3||V[0]>F||F>G)&&(V[4]=B,V[5]=F,M.n=G,O=0))}if(W||B>1)return a;throw D=!0,F}return function(B,F,W){if(I>1)throw TypeError("Generator is already running");for(D&&F===1&&j(F,W),O=F,N=W;(t=O<2?e:N)||!D;){T||(O?O<3?(O>1&&(M.n=-1),j(O,N)):M.n=N:M.v=N);try{if(I=2,T){if(O||(B="next"),t=T[B]){if(!(t=t.call(T,N)))throw TypeError("iterator result is not an object");if(!t.done)return t;N=t.value,O<2&&(O=0)}else O===1&&(t=T.return)&&t.call(T),O<2&&(N=TypeError("The iterator does not provide a '"+B+"' method"),O=1);T=e}else if((t=(D=M.n<0)?N:E.call(k,M))!==a)break}catch(V){T=e,O=1,N=V}finally{I=1}}return{value:t,done:D}}})(v,S,_),!0),x}var a={};function c(){}function u(){}function d(){}t=Object.getPrototypeOf;var f=[][n]?t(t([][n]())):(ti(t={},n,function(){return this}),t),p=d.prototype=c.prototype=Object.create(f);function g(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,d):(v.__proto__=d,ti(v,i,"GeneratorFunction")),v.prototype=Object.create(p),v}return u.prototype=d,ti(p,"constructor",d),ti(d,"constructor",u),u.displayName="GeneratorFunction",ti(d,i,"GeneratorFunction"),ti(p),ti(p,i,"Generator"),ti(p,n,function(){return this}),ti(p,"toString",function(){return"[object Generator]"}),(my=function(){return{w:o,m:g}})()}function Qh(e,t){function r(i,o,a,c){try{var u=e[i](o),d=u.value;return d instanceof ME?t.resolve(d.v).then(function(f){r("next",f,a,c)},function(f){r("throw",f,a,c)}):t.resolve(d).then(function(f){u.value=f,a(u)},function(f){return r("throw",f,a,c)})}catch(f){c(f)}}var n;this.next||(ti(Qh.prototype),ti(Qh.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),ti(this,"_invoke",function(i,o,a){function c(){return new t(function(u,d){r(i,a,u,d)})}return n=n?n.then(c,c):c()},!0)}function zE(e,t,r,n,i){return new Qh(my().w(e,t,r,n),i||Promise)}function $I(e,t,r,n,i){var o=zE(e,t,r,n,i);return o.next().then(function(a){return a.done?a.value:o.next()})}function kI(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function i(){for(;r.length;)if((n=r.pop())in t)return i.value=n,i.done=!1,i;return i.done=!0,i}}function A1(e){if(e!=null){var t=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(bt(e)+" is not iterable")}function ii(){var e=my(),t=e.m(ii),r=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function n(a){var c=typeof a=="function"&&a.constructor;return!!c&&(c===r||(c.displayName||c.name)==="GeneratorFunction")}var i={throw:1,return:2,break:3,continue:3};function o(a){var c,u;return function(d){c||(c={stop:function(){return u(d.a,2)},catch:function(){return d.v},abrupt:function(p,g){return u(d.a,i[p],g)},delegateYield:function(p,g,v){return c.resultName=g,u(d.d,A1(p),v)},finish:function(p){return u(d.f,p)}},u=function(p,g,v){d.p=c.prev,d.n=c.next;try{return p(g,v)}finally{c.next=d.n}}),c.resultName&&(c[c.resultName]=d.v,c.resultName=void 0),c.sent=d.v,c.next=d.n;try{return a.call(this,c)}finally{d.p=c.prev,d.n=c.next}}}return(ii=function(){return{wrap:function(u,d,f,p){return e.w(o(u),d,f,p&&p.reverse())},isGeneratorFunction:n,mark:e.m,awrap:function(u,d){return new ME(u,d)},AsyncIterator:Qh,async:function(u,d,f,p,g){return(n(d)?zE:$I)(o(u),d,f,p,g)},keys:kI,values:A1}})()}function H1(e,t,r,n,i,o,a){try{var c=e[o](a),u=c.value}catch(d){return void r(d)}c.done?t(u):Promise.resolve(u).then(n,i)}function za(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(u){H1(o,n,i,a,c,"next",u)}function c(u){H1(o,n,i,a,c,"throw",u)}a(void 0)})}}var Bu=X({},d5),RI=Bu.version,ag=Bu.render,TI=Bu.unmountComponentAtNode,Nf;try{var PI=Number((RI||"").split(".")[0]);PI>=18&&(Nf=Bu.createRoot)}catch{}function F1(e){var t=Bu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&bt(t)==="object"&&(t.usingClientEntryPoint=e)}var Zh="__rc_react_root__";function OI(e,t){F1(!0);var r=t[Zh]||Nf(t);F1(!1),r.render(e),t[Zh]=r}function II(e,t){ag==null||ag(e,t)}function NI(e,t){if(Nf){OI(e,t);return}II(e,t)}function MI(e){return Nv.apply(this,arguments)}function Nv(){return Nv=za(ii().mark(function e(t){return ii().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.resolve().then(function(){var i;(i=t[Zh])===null||i===void 0||i.unmount(),delete t[Zh]}));case 1:case"end":return n.stop()}},e)})),Nv.apply(this,arguments)}function zI(e){TI(e)}function jI(e){return Mv.apply(this,arguments)}function Mv(){return Mv=za(ii().mark(function e(t){return ii().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(Nf===void 0){n.next=2;break}return n.abrupt("return",MI(t));case 2:zI(t);case 3:case"end":return n.stop()}},e)})),Mv.apply(this,arguments)}const BI=(e,t)=>(NI(e,t),()=>jI(t));let LI=BI;function py(e){return LI}const lg=()=>({height:0,opacity:0}),W1=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},DI=e=>({height:e?e.offsetHeight:0}),cg=(e,t)=>(t==null?void 0:t.deadline)===!0||t.propertyName==="height",jE=(e=yu)=>({motionName:`${e}-motion-collapse`,onAppearStart:lg,onEnterStart:lg,onAppearActive:W1,onEnterActive:W1,onLeaveStart:DI,onLeaveActive:lg,onAppearEnd:cg,onEnterEnd:cg,onLeaveEnd:cg,motionDeadline:500}),Fo=(e,t,r)=>r!==void 0?r:`${e}-${t}`;function un(e,t){var r=Object.assign({},e);return Array.isArray(t)&&t.forEach(function(n){delete r[n]}),r}const gy=(function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),r=t.width,n=t.height;if(r||n)return!0}if(e.getBoundingClientRect){var i=e.getBoundingClientRect(),o=i.width,a=i.height;if(o||a)return!0}}return!1}),AI=e=>{const{componentCls:t,colorPrimary:r}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${r})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`,`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(",")}}}}},HI=WP("Wave",AI),vy=`${yu}-wave-target`;function FI(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"&&e!=="canvastext"}function WI(e){var t;const{borderTopColor:r,borderColor:n,backgroundColor:i}=getComputedStyle(e);return(t=[r,n,i].find(FI))!==null&&t!==void 0?t:null}function ug(e){return Number.isNaN(e)?0:e}const VI=e=>{const{className:t,target:r,component:n,registerUnmount:i}=e,o=h.useRef(null),a=h.useRef(null);h.useEffect(()=>{a.current=i()},[]);const[c,u]=h.useState(null),[d,f]=h.useState([]),[p,g]=h.useState(0),[v,b]=h.useState(0),[S,_]=h.useState(0),[C,x]=h.useState(0),[E,k]=h.useState(!1),P={left:p,top:v,width:S,height:C,borderRadius:d.map(N=>`${N}px`).join(" ")};c&&(P["--wave-color"]=c);function T(){const N=getComputedStyle(r);u(WI(r));const I=N.position==="static",{borderLeftWidth:z,borderTopWidth:D}=N;g(I?r.offsetLeft:ug(-Number.parseFloat(z))),b(I?r.offsetTop:ug(-Number.parseFloat(D))),_(r.offsetWidth),x(r.offsetHeight);const{borderTopLeftRadius:M,borderTopRightRadius:j,borderBottomLeftRadius:B,borderBottomRightRadius:F}=N;f([M,j,F,B].map(W=>ug(Number.parseFloat(W))))}if(h.useEffect(()=>{if(r){const N=$r(()=>{T(),k(!0)});let I;return typeof ResizeObserver<"u"&&(I=new ResizeObserver(T),I.observe(r)),()=>{$r.cancel(N),I==null||I.disconnect()}}},[r]),!E)return null;const O=(n==="Checkbox"||n==="Radio")&&(r==null?void 0:r.classList.contains(vy));return h.createElement(Hi,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(N,I)=>{var z,D;if(I.deadline||I.propertyName==="opacity"){const M=(z=o.current)===null||z===void 0?void 0:z.parentElement;(D=a.current)===null||D===void 0||D.call(a).then(()=>{M==null||M.remove()})}return!1}},({className:N},I)=>h.createElement("div",{ref:co(o,I),className:re(t,N,{"wave-quick":O}),style:P}))},UI=(e,t)=>{var r;const{component:n}=t;if(n==="Checkbox"&&!(!((r=e.querySelector("input"))===null||r===void 0)&&r.checked))return;const i=document.createElement("div");i.style.position="absolute",i.style.left="0px",i.style.top="0px",e==null||e.insertBefore(i,e==null?void 0:e.firstChild);const o=py();let a=null;function c(){return a}a=o(h.createElement(VI,Object.assign({},t,{target:e,registerUnmount:c})),i)},qI=(e,t,r)=>{const{wave:n}=h.useContext(Pt),[,i,o]=fi(),a=Jr(d=>{const f=e.current;if(n!=null&&n.disabled||!f)return;const p=f.querySelector(`.${vy}`)||f,{showEffect:g}=n||{};(g||UI)(p,{className:t,token:i,component:r,event:d,hashId:o})}),c=h.useRef(null);return d=>{$r.cancel(c.current),c.current=$r(()=>{a(d)})}},Mf=e=>{const{children:t,disabled:r,component:n}=e,{getPrefixCls:i}=h.useContext(Pt),o=h.useRef(null),a=i("wave"),[,c]=HI(a),u=qI(o,re(a,c),n);if(Q.useEffect(()=>{const f=o.current;if(!f||f.nodeType!==window.Node.ELEMENT_NODE||r)return;const p=g=>{!gy(g.target)||!f.getAttribute||f.getAttribute("disabled")||f.disabled||f.className.includes("disabled")&&!f.className.includes("disabled:")||f.getAttribute("aria-disabled")==="true"||f.className.includes("-leave")||u(g)};return f.addEventListener("click",p,!0),()=>{f.removeEventListener("click",p,!0)}},[r]),!Q.isValidElement(t))return t??null;const d=Qs(t)?co(Ma(t),o):o;return hi(t,{ref:d})},Go=e=>{const t=Q.useContext(Ul);return Q.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},KI=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},GI=gr(["Space","Compact"],e=>[KI(e)],()=>({}),{resetStyle:!1});var BE=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const zf=h.createContext(null),Lu=(e,t)=>{const r=h.useContext(zf),n=h.useMemo(()=>{if(!r)return"";const{compactDirection:i,isFirstItem:o,isLastItem:a}=r,c=i==="vertical"?"-vertical-":"-";return re(`${e}-compact${c}item`,{[`${e}-compact${c}first-item`]:o,[`${e}-compact${c}last-item`]:a,[`${e}-compact${c}item-rtl`]:t==="rtl"})},[e,t,r]);return{compactSize:r==null?void 0:r.compactSize,compactDirection:r==null?void 0:r.compactDirection,compactItemClassnames:n}},XI=e=>{const{children:t}=e;return h.createElement(zf.Provider,{value:null},t)},YI=e=>{const{children:t}=e,r=BE(e,["children"]);return h.createElement(zf.Provider,{value:h.useMemo(()=>r,[r])},t)},JI=e=>{const{getPrefixCls:t,direction:r}=h.useContext(Pt),{size:n,direction:i,block:o,prefixCls:a,className:c,rootClassName:u,children:d}=e,f=BE(e,["size","direction","block","prefixCls","className","rootClassName","children"]),p=Go(E=>n??E),g=t("space-compact",a),[v,b]=GI(g),S=re(g,b,{[`${g}-rtl`]:r==="rtl",[`${g}-block`]:o,[`${g}-vertical`]:i==="vertical"},c,u),_=h.useContext(zf),C=di(d),x=h.useMemo(()=>C.map((E,k)=>{const P=(E==null?void 0:E.key)||`${g}-item-${k}`;return h.createElement(YI,{key:P,compactSize:p,compactDirection:i,isFirstItem:k===0&&(!_||(_==null?void 0:_.isFirstItem)),isLastItem:k===C.length-1&&(!_||(_==null?void 0:_.isLastItem))},E)}),[C,_,i,p,g]);return C.length===0?null:v(h.createElement("div",Object.assign({className:S},f),x))};var QI=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const LE=h.createContext(void 0),ZI=e=>{const{getPrefixCls:t,direction:r}=h.useContext(Pt),{prefixCls:n,size:i,className:o}=e,a=QI(e,["prefixCls","size","className"]),c=t("btn-group",n),[,,u]=fi(),d=h.useMemo(()=>{switch(i){case"large":return"lg";case"small":return"sm";default:return""}},[i]),f=re(c,{[`${c}-${d}`]:d,[`${c}-rtl`]:r==="rtl"},o,u);return h.createElement(LE.Provider,{value:i},h.createElement("div",Object.assign({},a,{className:f})))},V1=/^[\u4E00-\u9FA5]{2}$/,zv=V1.test.bind(V1);function DE(e){return e==="danger"?{danger:!0}:{type:e}}function U1(e){return typeof e=="string"}function dg(e){return e==="text"||e==="link"}function e6(e,t){if(e==null)return;const r=t?" ":"";return typeof e!="string"&&typeof e!="number"&&U1(e.type)&&zv(e.props.children)?hi(e,{children:e.props.children.split("").join(r)}):U1(e)?zv(e)?Q.createElement("span",null,e.split("").join(r)):Q.createElement("span",null,e):EE(e)?Q.createElement("span",null,e):e}function t6(e,t){let r=!1;const n=[];return Q.Children.forEach(e,i=>{const o=typeof i,a=o==="string"||o==="number";if(r&&a){const c=n.length-1,u=n[c];n[c]=`${u}${i}`}else n.push(i);r=a}),Q.Children.map(n,i=>e6(i,t))}["default","primary","danger"].concat(We(Xs));const AE=h.forwardRef((e,t)=>{const{className:r,style:n,children:i,prefixCls:o}=e,a=re(`${o}-icon`,r);return Q.createElement("span",{ref:t,className:a,style:n},i)}),q1=h.forwardRef((e,t)=>{const{prefixCls:r,className:n,style:i,iconClassName:o}=e,a=re(`${r}-loading-icon`,n);return Q.createElement(AE,{prefixCls:r,className:a,style:i,ref:t},Q.createElement(zu,{className:o}))}),hg=()=>({width:0,opacity:0,transform:"scale(0)"}),fg=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),r6=e=>{const{prefixCls:t,loading:r,existIcon:n,className:i,style:o,mount:a}=e,c=!!r;return n?Q.createElement(q1,{prefixCls:t,className:i,style:o}):Q.createElement(Hi,{visible:c,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:hg,onAppearActive:fg,onEnterStart:hg,onEnterActive:fg,onLeaveStart:fg,onLeaveActive:hg},({className:u,style:d},f)=>{const p=Object.assign(Object.assign({},o),d);return Q.createElement(q1,{prefixCls:t,className:re(i,u),style:p,ref:f})})},K1=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),n6=e=>{const{componentCls:t,fontSize:r,lineWidth:n,groupBorderColor:i,colorErrorHover:o}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(n).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:r}},K1(`${t}-primary`,i),K1(`${t}-danger`,o)]}};var i6=["b"],o6=["v"],mg=function(t){return Math.round(Number(t||0))},s6=function(t){if(t instanceof pr)return t;if(t&&bt(t)==="object"&&"h"in t&&"b"in t){var r=t,n=r.b,i=Bt(r,i6);return X(X({},i),{},{v:n})}return typeof t=="string"&&/hsb/.test(t)?t.replace(/hsb/,"hsv"):t},_u=(function(e){ds(r,e);var t=hs(r);function r(n){return pn(this,r),t.call(this,s6(n))}return gn(r,[{key:"toHsbString",value:function(){var i=this.toHsb(),o=mg(i.s*100),a=mg(i.b*100),c=mg(i.h),u=i.a,d="hsb(".concat(c,", ").concat(o,"%, ").concat(a,"%)"),f="hsba(".concat(c,", ").concat(o,"%, ").concat(a,"%, ").concat(u.toFixed(u===0?0:2),")");return u===1?d:f}},{key:"toHsb",value:function(){var i=this.toHsv(),o=i.v,a=Bt(i,o6);return X(X({},a),{},{b:o,a:this.a})}}]),r})(pr),a6=function(t){return t instanceof _u?t:new _u(t)};a6("#1677ff");const l6=(e,t)=>(e==null?void 0:e.replace(/[^\w/]/g,"").slice(0,t?8:6))||"",c6=(e,t)=>e?l6(e,t):"";let jv=(function(){function e(t){pn(this,e);var r;if(this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(r=t.colors)===null||r===void 0?void 0:r.map(i=>({color:new e(i.color),percent:i.percent})),this.cleared=t.cleared;return}const n=Array.isArray(t);n&&t.length?(this.colors=t.map(({color:i,percent:o})=>({color:new e(i),percent:o})),this.metaColor=new _u(this.colors[0].color.metaColor)):this.metaColor=new _u(n?"":t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return gn(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return c6(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:r}=this;return r?`linear-gradient(90deg, ${r.map(i=>`${i.color.toRgbString()} ${i.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(r){return!r||this.isGradient()!==r.isGradient()?!1:this.isGradient()?this.colors.length===r.colors.length&&this.colors.every((n,i)=>{const o=r.colors[i];return n.percent===o.percent&&n.color.equals(o.color)}):this.toHexString()===r.toHexString()}}])})();var u6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},d6=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:u6}))},Lo=h.forwardRef(d6),HE=Q.forwardRef(function(e,t){var r=e.prefixCls,n=e.forceRender,i=e.className,o=e.style,a=e.children,c=e.isActive,u=e.role,d=e.classNames,f=e.styles,p=Q.useState(c||n),g=se(p,2),v=g[0],b=g[1];return Q.useEffect(function(){(n||c)&&b(!0)},[n,c]),v?Q.createElement("div",{ref:t,className:re("".concat(r,"-content"),K(K({},"".concat(r,"-content-active"),c),"".concat(r,"-content-inactive"),!c),i),style:o,role:u},Q.createElement("div",{className:re("".concat(r,"-content-box"),d==null?void 0:d.body),style:f==null?void 0:f.body},a)):null});HE.displayName="PanelContent";var h6=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],FE=Q.forwardRef(function(e,t){var r=e.showArrow,n=r===void 0?!0:r,i=e.headerClass,o=e.isActive,a=e.onItemClick,c=e.forceRender,u=e.className,d=e.classNames,f=d===void 0?{}:d,p=e.styles,g=p===void 0?{}:p,v=e.prefixCls,b=e.collapsible,S=e.accordion,_=e.panelKey,C=e.extra,x=e.header,E=e.expandIcon,k=e.openMotion,P=e.destroyInactivePanel,T=e.children,O=Bt(e,h6),N=b==="disabled",I=C!=null&&typeof C!="boolean",z=K(K(K({onClick:function(){a==null||a(_)},onKeyDown:function(V){(V.key==="Enter"||V.keyCode===Ge.ENTER||V.which===Ge.ENTER)&&(a==null||a(_))},role:S?"tab":"button"},"aria-expanded",o),"aria-disabled",N),"tabIndex",N?-1:0),D=typeof E=="function"?E(e):Q.createElement("i",{className:"arrow"}),M=D&&Q.createElement("div",Re({className:"".concat(v,"-expand-icon")},["header","icon"].includes(b)?z:{}),D),j=re("".concat(v,"-item"),K(K({},"".concat(v,"-item-active"),o),"".concat(v,"-item-disabled"),N),u),B=re(i,"".concat(v,"-header"),K({},"".concat(v,"-collapsible-").concat(b),!!b),f.header),F=X({className:B,style:g.header},["header","icon"].includes(b)?{}:z);return Q.createElement("div",Re({},O,{ref:t,className:j}),Q.createElement("div",F,n&&M,Q.createElement("span",Re({className:"".concat(v,"-header-text")},b==="header"?z:{}),x),I&&Q.createElement("div",{className:"".concat(v,"-extra")},C)),Q.createElement(Hi,Re({visible:o,leavedClassName:"".concat(v,"-content-hidden")},k,{forceRender:c,removeOnLeave:P}),function(W,V){var L=W.className,G=W.style;return Q.createElement(HE,{ref:V,prefixCls:v,className:L,classNames:f,style:G,styles:g,isActive:o,forceRender:c,role:S?"tabpanel":void 0},T)}))}),f6=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],m6=function(t,r){var n=r.prefixCls,i=r.accordion,o=r.collapsible,a=r.destroyInactivePanel,c=r.onItemClick,u=r.activeKey,d=r.openMotion,f=r.expandIcon;return t.map(function(p,g){var v=p.children,b=p.label,S=p.key,_=p.collapsible,C=p.onItemClick,x=p.destroyInactivePanel,E=Bt(p,f6),k=String(S??g),P=_??o,T=x??a,O=function(z){P!=="disabled"&&(c(z),C==null||C(z))},N=!1;return i?N=u[0]===k:N=u.indexOf(k)>-1,Q.createElement(FE,Re({},E,{prefixCls:n,key:k,panelKey:k,isActive:N,accordion:i,openMotion:d,expandIcon:f,header:b,collapsible:P,onItemClick:O,destroyInactivePanel:T}),v)})},p6=function(t,r,n){if(!t)return null;var i=n.prefixCls,o=n.accordion,a=n.collapsible,c=n.destroyInactivePanel,u=n.onItemClick,d=n.activeKey,f=n.openMotion,p=n.expandIcon,g=t.key||String(r),v=t.props,b=v.header,S=v.headerClass,_=v.destroyInactivePanel,C=v.collapsible,x=v.onItemClick,E=!1;o?E=d[0]===g:E=d.indexOf(g)>-1;var k=C??a,P=function(N){k!=="disabled"&&(u(N),x==null||x(N))},T={key:g,panelKey:g,header:b,headerClass:S,isActive:E,prefixCls:i,destroyInactivePanel:_??c,openMotion:f,accordion:o,children:t.props.children,onItemClick:P,expandIcon:p,collapsible:k};return typeof t.type=="string"?t:(Object.keys(T).forEach(function(O){typeof T[O]>"u"&&delete T[O]}),Q.cloneElement(t,T))};function g6(e,t,r){return Array.isArray(e)?m6(e,r):di(t).map(function(n,i){return p6(n,i,r)})}function v6(e){var t=e;if(!Array.isArray(t)){var r=bt(t);t=r==="number"||r==="string"?[t]:[]}return t.map(function(n){return String(n)})}var y6=Q.forwardRef(function(e,t){var r=e.prefixCls,n=r===void 0?"rc-collapse":r,i=e.destroyInactivePanel,o=i===void 0?!1:i,a=e.style,c=e.accordion,u=e.className,d=e.children,f=e.collapsible,p=e.openMotion,g=e.expandIcon,v=e.activeKey,b=e.defaultActiveKey,S=e.onChange,_=e.items,C=re(n,u),x=Qr([],{value:v,onChange:function(I){return S==null?void 0:S(I)},defaultValue:b,postState:v6}),E=se(x,2),k=E[0],P=E[1],T=function(I){return P(function(){if(c)return k[0]===I?[]:[I];var z=k.indexOf(I),D=z>-1;return D?k.filter(function(M){return M!==I}):[].concat(We(k),[I])})};jn(!d,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var O=g6(_,d,{prefixCls:n,accordion:c,openMotion:p,expandIcon:g,collapsible:f,destroyInactivePanel:o,onItemClick:T,activeKey:k});return Q.createElement("div",Re({ref:t,className:C,style:a,role:c?"tablist":void 0},Fi(e,{aria:!0,data:!0})),O)});const yy=Object.assign(y6,{Panel:FE});yy.Panel;const b6=h.forwardRef((e,t)=>{const{getPrefixCls:r}=h.useContext(Pt),{prefixCls:n,className:i,showArrow:o=!0}=e,a=r("collapse",n),c=re({[`${a}-no-arrow`]:!o},i);return h.createElement(yy.Panel,Object.assign({ref:t},e,{prefixCls:a,className:c}))}),WE=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
177
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
178
+ opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),_6=e=>({animationDuration:e,animationFillMode:"both"}),S6=e=>({animationDuration:e,animationFillMode:"both"}),jf=(e,t,r,n,i=!1)=>{const o=i?"&":"";return{[`
179
+ ${o}${e}-enter,
180
+ ${o}${e}-appear
181
+ `]:Object.assign(Object.assign({},_6(n)),{animationPlayState:"paused"}),[`${o}${e}-leave`]:Object.assign(Object.assign({},S6(n)),{animationPlayState:"paused"}),[`
182
+ ${o}${e}-enter${e}-enter-active,
183
+ ${o}${e}-appear${e}-appear-active
184
+ `]:{animationName:t,animationPlayState:"running"},[`${o}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}},C6=new Xt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),w6=new Xt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),x6=(e,t=!1)=>{const{antCls:r}=e,n=`${r}-fade`,i=t?"&":"";return[jf(n,C6,w6,e.motionDurationMid,t),{[`
185
+ ${i}${n}-enter,
186
+ ${i}${n}-appear
187
+ `]:{opacity:0,animationTimingFunction:"linear"},[`${i}${n}-leave`]:{animationTimingFunction:"linear"}}]},E6=new Xt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),$6=new Xt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),k6=new Xt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),R6=new Xt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),T6=new Xt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),P6=new Xt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),O6=new Xt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),I6=new Xt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),N6={"move-up":{inKeyframes:O6,outKeyframes:I6},"move-down":{inKeyframes:E6,outKeyframes:$6},"move-left":{inKeyframes:k6,outKeyframes:R6},"move-right":{inKeyframes:T6,outKeyframes:P6}},ef=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:i,outKeyframes:o}=N6[t];return[jf(n,i,o,e.motionDurationMid),{[`
188
+ ${n}-enter,
189
+ ${n}-appear
190
+ `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},by=new Xt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),_y=new Xt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Sy=new Xt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Cy=new Xt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),M6=new Xt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),z6=new Xt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),j6=new Xt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),B6=new Xt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),L6={"slide-up":{inKeyframes:by,outKeyframes:_y},"slide-down":{inKeyframes:Sy,outKeyframes:Cy},"slide-left":{inKeyframes:M6,outKeyframes:z6},"slide-right":{inKeyframes:j6,outKeyframes:B6}},Js=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:i,outKeyframes:o}=L6[t];return[jf(n,i,o,e.motionDurationMid),{[`
191
+ ${n}-enter,
192
+ ${n}-appear
193
+ `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},D6=new Xt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),A6=new Xt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),G1=new Xt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),X1=new Xt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),H6=new Xt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),F6=new Xt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),W6=new Xt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),V6=new Xt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),U6=new Xt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),q6=new Xt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),K6=new Xt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),G6=new Xt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),X6={zoom:{inKeyframes:D6,outKeyframes:A6},"zoom-big":{inKeyframes:G1,outKeyframes:X1},"zoom-big-fast":{inKeyframes:G1,outKeyframes:X1},"zoom-left":{inKeyframes:W6,outKeyframes:V6},"zoom-right":{inKeyframes:U6,outKeyframes:q6},"zoom-up":{inKeyframes:H6,outKeyframes:F6},"zoom-down":{inKeyframes:K6,outKeyframes:G6}},Du=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:i,outKeyframes:o}=X6[t];return[jf(n,i,o,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
194
+ ${n}-enter,
195
+ ${n}-appear
196
+ `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Y6=e=>{const{componentCls:t,contentBg:r,padding:n,headerBg:i,headerPadding:o,collapseHeaderPaddingSM:a,collapseHeaderPaddingLG:c,collapsePanelBorderRadius:u,lineWidth:d,lineType:f,colorBorder:p,colorText:g,colorTextHeading:v,colorTextDisabled:b,fontSizeLG:S,lineHeight:_,lineHeightLG:C,marginSM:x,paddingSM:E,paddingLG:k,paddingXS:P,motionDurationSlow:T,fontSizeIcon:O,contentPadding:N,fontHeight:I,fontHeightLG:z}=e,D=`${ee(d)} ${f} ${p}`;return{[t]:Object.assign(Object.assign({},Fr(e)),{backgroundColor:i,border:D,borderRadius:u,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:D,"&:first-child":{[`
197
+ &,
198
+ & > ${t}-header`]:{borderRadius:`${ee(u)} ${ee(u)} 0 0`}},"&:last-child":{[`
199
+ &,
200
+ & > ${t}-header`]:{borderRadius:`0 0 ${ee(u)} ${ee(u)}`}},[`> ${t}-header`]:Object.assign(Object.assign({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:o,color:v,lineHeight:_,cursor:"pointer",transition:`all ${T}, visibility 0s`},lo(e)),{[`> ${t}-header-text`]:{flex:"auto"},[`${t}-expand-icon`]:{height:I,display:"flex",alignItems:"center",paddingInlineEnd:x},[`${t}-arrow`]:Object.assign(Object.assign({},Ql()),{fontSize:O,transition:`transform ${T}`,svg:{transition:`transform ${T}`}}),[`${t}-header-text`]:{marginInlineEnd:"auto"}}),[`${t}-collapsible-header`]:{cursor:"default",[`${t}-header-text`]:{flex:"none",cursor:"pointer"},[`${t}-expand-icon`]:{cursor:"pointer"}},[`${t}-collapsible-icon`]:{cursor:"unset",[`${t}-expand-icon`]:{cursor:"pointer"}}},[`${t}-content`]:{color:g,backgroundColor:r,borderTop:D,[`& > ${t}-content-box`]:{padding:N},"&-hidden":{display:"none"}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:a,paddingInlineStart:P,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(E).sub(P).equal()}},[`> ${t}-content > ${t}-content-box`]:{padding:E}}},"&-large":{[`> ${t}-item`]:{fontSize:S,lineHeight:C,[`> ${t}-header`]:{padding:c,paddingInlineStart:n,[`> ${t}-expand-icon`]:{height:z,marginInlineStart:e.calc(k).sub(n).equal()}},[`> ${t}-content > ${t}-content-box`]:{padding:k}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-content`]:{borderRadius:`0 0 ${ee(u)} ${ee(u)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:b,cursor:"not-allowed"}},[`&${t}-icon-position-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:x}}}}})}},J6=e=>{const{componentCls:t}=e,r=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[r]:{transform:"rotate(180deg)"}}}},Q6=e=>{const{componentCls:t,headerBg:r,borderlessContentPadding:n,borderlessContentBg:i,colorBorder:o}=e;return{[`${t}-borderless`]:{backgroundColor:r,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${o}`},[`
201
+ > ${t}-item:last-child,
202
+ > ${t}-item:last-child ${t}-header
203
+ `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:i,borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{padding:n}}}},Z6=e=>{const{componentCls:t,paddingSM:r}=e;return{[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:"transparent",border:0,[`> ${t}-content-box`]:{paddingBlock:r}}}}}},eN=e=>({headerPadding:`${e.paddingSM}px ${e.padding}px`,headerBg:e.colorFillAlter,contentPadding:`${e.padding}px 16px`,contentBg:e.colorBgContainer,borderlessContentPadding:`${e.paddingXXS}px 16px ${e.padding}px`,borderlessContentBg:"transparent"}),tN=gr("Collapse",e=>{const t=er(e,{collapseHeaderPaddingSM:`${ee(e.paddingXS)} ${ee(e.paddingSM)}`,collapseHeaderPaddingLG:`${ee(e.padding)} ${ee(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[Y6(t),Q6(t),Z6(t),J6(t),WE(t)]},eN),rN=h.forwardRef((e,t)=>{const{getPrefixCls:r,direction:n,expandIcon:i,className:o,style:a}=Un("collapse"),{prefixCls:c,className:u,rootClassName:d,style:f,bordered:p=!0,ghost:g,size:v,expandIconPosition:b="start",children:S,destroyInactivePanel:_,destroyOnHidden:C,expandIcon:x}=e,E=Go(F=>{var W;return(W=v??F)!==null&&W!==void 0?W:"middle"}),k=r("collapse",c),P=r(),[T,O,N]=tN(k),I=h.useMemo(()=>b==="left"?"start":b==="right"?"end":b,[b]),z=x??i,D=h.useCallback((F={})=>{const W=typeof z=="function"?z(F):h.createElement(Lo,{rotate:F.isActive?n==="rtl"?-90:90:void 0,"aria-label":F.isActive?"expanded":"collapsed"});return hi(W,()=>{var V;return{className:re((V=W.props)===null||V===void 0?void 0:V.className,`${k}-arrow`)}})},[z,k,n]),M=re(`${k}-icon-position-${I}`,{[`${k}-borderless`]:!p,[`${k}-rtl`]:n==="rtl",[`${k}-ghost`]:!!g,[`${k}-${E}`]:E!=="middle"},o,u,d,O,N),j=h.useMemo(()=>Object.assign(Object.assign({},jE(P)),{motionAppear:!1,leavedClassName:`${k}-content-hidden`}),[P,k]),B=h.useMemo(()=>S?di(S).map((F,W)=>{var V,L;const G=F.props;if(G!=null&&G.disabled){const q=(V=F.key)!==null&&V!==void 0?V:String(W),A=Object.assign(Object.assign({},un(F.props,["disabled"])),{key:q,collapsible:(L=G.collapsible)!==null&&L!==void 0?L:"disabled"});return hi(F,A)}return F}):null,[S]);return T(h.createElement(yy,Object.assign({ref:t,openMotion:j},un(e,["rootClassName"]),{expandIcon:D,prefixCls:k,className:M,style:Object.assign(Object.assign({},a),f),destroyInactivePanel:C??_}),B))}),Xc=Object.assign(rN,{Panel:b6}),nN=e=>e instanceof jv?e:new jv(e),iN=(e,t)=>{const{r,g:n,b:i,a:o}=e.toRgb(),a=new _u(e.toRgbString()).onBackground(t).toHsv();return o<=.5?a.v>.5:r*.299+n*.587+i*.114>192},VE=e=>{const{paddingInline:t,onlyIconSize:r}=e;return er(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:r})},UE=e=>{var t,r,n,i,o,a;const c=(t=e.contentFontSize)!==null&&t!==void 0?t:e.fontSize,u=(r=e.contentFontSizeSM)!==null&&r!==void 0?r:e.fontSize,d=(n=e.contentFontSizeLG)!==null&&n!==void 0?n:e.fontSizeLG,f=(i=e.contentLineHeight)!==null&&i!==void 0?i:Th(c),p=(o=e.contentLineHeightSM)!==null&&o!==void 0?o:Th(u),g=(a=e.contentLineHeightLG)!==null&&a!==void 0?a:Th(d),v=iN(new jv(e.colorBgSolid),"#fff")?"#000":"#fff",b=Xs.reduce((S,_)=>Object.assign(Object.assign({},S),{[`${_}ShadowColor`]:`0 ${ee(e.controlOutlineWidth)} 0 ${Gc(e[`${_}1`],e.colorBgContainer)}`}),{});return Object.assign(Object.assign({},b),{fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:v,contentFontSize:c,contentFontSizeSM:u,contentFontSizeLG:d,contentLineHeight:f,contentLineHeightSM:p,contentLineHeightLG:g,paddingBlock:Math.max((e.controlHeight-c*f)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-u*p)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-d*g)/2-e.lineWidth,0)})},oN=e=>{const{componentCls:t,iconCls:r,fontWeight:n,opacityLoading:i,motionDurationSlow:o,motionEaseInOut:a,iconGap:c,calc:u}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:c,alignItems:"center",justifyContent:"center",fontWeight:n,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${ee(e.lineWidth)} ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:e.colorText,"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:Ql(),"> a":{color:"currentColor"},"&:not(:disabled)":lo(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${r})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:i,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(d=>`${d} ${o} ${a}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:u(c).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:u(c).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:u(c).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:u(c).mul(-1).equal()}}}}}},qE=(e,t,r)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":r}}),sN=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),aN=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),Bf=(e,t,r,n,i,o,a,c)=>({[`&${e}-background-ghost`]:Object.assign(Object.assign({color:r||void 0,background:t,borderColor:n||void 0,boxShadow:"none"},qE(e,Object.assign({background:t},a),Object.assign({background:t},c))),{"&:disabled":{cursor:"not-allowed",color:i||void 0,borderColor:o||void 0}})}),lN=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},aN(e))}),cN=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),Lf=(e,t,r,n)=>{const o=n&&["link","text"].includes(n)?cN:lN;return Object.assign(Object.assign({},o(e)),qE(e.componentCls,t,r))},Df=(e,t,r,n,i)=>({[`&${e.componentCls}-variant-solid`]:Object.assign({color:t,background:r},Lf(e,n,i))}),Af=(e,t,r,n,i)=>({[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]:Object.assign({borderColor:t,background:r},Lf(e,n,i))}),Hf=e=>({[`&${e.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),Ff=(e,t,r,n)=>({[`&${e.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:t},Lf(e,r,n))}),Wo=(e,t,r,n,i)=>({[`&${e.componentCls}-variant-${r}`]:Object.assign({color:t,boxShadow:"none"},Lf(e,n,i,r))}),uN=e=>{const{componentCls:t}=e;return Xs.reduce((r,n)=>{const i=e[`${n}6`],o=e[`${n}1`],a=e[`${n}5`],c=e[`${n}2`],u=e[`${n}3`],d=e[`${n}7`];return Object.assign(Object.assign({},r),{[`&${t}-color-${n}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:i,boxShadow:e[`${n}ShadowColor`]},Df(e,e.colorTextLightSolid,i,{background:a},{background:d})),Af(e,i,e.colorBgContainer,{color:a,borderColor:a,background:e.colorBgContainer},{color:d,borderColor:d,background:e.colorBgContainer})),Hf(e)),Ff(e,o,{color:i,background:c},{color:i,background:u})),Wo(e,i,"link",{color:a},{color:d})),Wo(e,i,"text",{color:a,background:o},{color:d,background:u}))})},{})},dN=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.defaultColor,boxShadow:e.defaultShadow},Df(e,e.solidTextColor,e.colorBgSolid,{color:e.solidTextColor,background:e.colorBgSolidHover},{color:e.solidTextColor,background:e.colorBgSolidActive})),Hf(e)),Ff(e,e.colorFillTertiary,{color:e.defaultColor,background:e.colorFillSecondary},{color:e.defaultColor,background:e.colorFill})),Bf(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),Wo(e,e.textTextColor,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),hN=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorPrimary,boxShadow:e.primaryShadow},Af(e,e.colorPrimary,e.colorBgContainer,{color:e.colorPrimaryTextHover,borderColor:e.colorPrimaryHover,background:e.colorBgContainer},{color:e.colorPrimaryTextActive,borderColor:e.colorPrimaryActive,background:e.colorBgContainer})),Hf(e)),Ff(e,e.colorPrimaryBg,{color:e.colorPrimary,background:e.colorPrimaryBgHover},{color:e.colorPrimary,background:e.colorPrimaryBorder})),Wo(e,e.colorPrimaryText,"text",{color:e.colorPrimaryTextHover,background:e.colorPrimaryBg},{color:e.colorPrimaryTextActive,background:e.colorPrimaryBorder})),Wo(e,e.colorPrimaryText,"link",{color:e.colorPrimaryTextHover,background:e.linkHoverBg},{color:e.colorPrimaryTextActive})),Bf(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),fN=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorError,boxShadow:e.dangerShadow},Df(e,e.dangerColor,e.colorError,{background:e.colorErrorHover},{background:e.colorErrorActive})),Af(e,e.colorError,e.colorBgContainer,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),Hf(e)),Ff(e,e.colorErrorBg,{color:e.colorError,background:e.colorErrorBgFilledHover},{color:e.colorError,background:e.colorErrorBgActive})),Wo(e,e.colorError,"text",{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBgActive})),Wo(e,e.colorError,"link",{color:e.colorErrorHover},{color:e.colorErrorActive})),Bf(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),mN=e=>Object.assign(Object.assign({},Wo(e,e.colorLink,"link",{color:e.colorLinkHover},{color:e.colorLinkActive})),Bf(e.componentCls,e.ghostBg,e.colorInfo,e.colorInfo,e.colorTextDisabled,e.colorBorder,{color:e.colorInfoHover,borderColor:e.colorInfoHover},{color:e.colorInfoActive,borderColor:e.colorInfoActive})),pN=e=>{const{componentCls:t}=e;return Object.assign({[`${t}-color-default`]:dN(e),[`${t}-color-primary`]:hN(e),[`${t}-color-dangerous`]:fN(e),[`${t}-color-link`]:mN(e)},uN(e))},gN=e=>Object.assign(Object.assign(Object.assign(Object.assign({},Af(e,e.defaultBorderColor,e.defaultBg,{color:e.defaultHoverColor,borderColor:e.defaultHoverBorderColor,background:e.defaultHoverBg},{color:e.defaultActiveColor,borderColor:e.defaultActiveBorderColor,background:e.defaultActiveBg})),Wo(e,e.textTextColor,"text",{color:e.textTextHoverColor,background:e.textHoverBg},{color:e.textTextActiveColor,background:e.colorBgTextActive})),Df(e,e.primaryColor,e.colorPrimary,{background:e.colorPrimaryHover,color:e.primaryColor},{background:e.colorPrimaryActive,color:e.primaryColor})),Wo(e,e.colorLink,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),wy=(e,t="")=>{const{componentCls:r,controlHeight:n,fontSize:i,borderRadius:o,buttonPaddingHorizontal:a,iconCls:c,buttonPaddingVertical:u,buttonIconOnlyFontSize:d}=e;return[{[t]:{fontSize:i,height:n,padding:`${ee(u)} ${ee(a)}`,borderRadius:o,[`&${r}-icon-only`]:{width:n,[c]:{fontSize:d}}}},{[`${r}${r}-circle${t}`]:sN(e)},{[`${r}${r}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${r}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},vN=e=>{const t=er(e,{fontSize:e.contentFontSize});return wy(t,e.componentCls)},yN=e=>{const t=er(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return wy(t,`${e.componentCls}-sm`)},bN=e=>{const t=er(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return wy(t,`${e.componentCls}-lg`)},_N=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},SN=gr("Button",e=>{const t=VE(e);return[oN(t),vN(t),yN(t),bN(t),_N(t),pN(t),gN(t),n6(t)]},UE,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function CN(e,t,r,n){const{focusElCls:i,focus:o,borderElCls:a}=r,c=a?"> *":"",u=["hover",o?"focus":null,"active"].filter(Boolean).map(d=>`&:${d} ${c}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":Object.assign(Object.assign({[u]:{zIndex:3}},i?{[`&${i}`]:{zIndex:3}}:{}),{[`&[disabled] ${c}`]:{zIndex:0}})}}function wN(e,t,r){const{borderElCls:n}=r,i=n?`> ${n}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${i}, &${e}-sm ${i}, &${e}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Wf(e,t={focus:!0}){const{componentCls:r}=e,{componentCls:n}=t,i=n||r,o=`${i}-compact`;return{[o]:Object.assign(Object.assign({},CN(e,o,t,i)),wN(i,o,t))}}function xN(e,t,r){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function EN(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function $N(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},xN(e,t,e.componentCls)),EN(e.componentCls,t))}}const kN=e=>{const{componentCls:t,colorPrimaryHover:r,lineWidth:n,calc:i}=e,o=i(n).mul(-1).equal(),a=c=>{const u=`${t}-compact${c?"-vertical":""}-item${t}-primary:not([disabled])`;return{[`${u} + ${u}::before`]:{position:"absolute",top:c?o:0,insetInlineStart:c?0:o,backgroundColor:r,content:'""',width:c?"100%":n,height:c?n:"100%"}}};return Object.assign(Object.assign({},a()),a(!0))},RN=Mu(["Button","compact"],e=>{const t=VE(e);return[Wf(t),$N(t),kN(t)]},UE);var TN=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function PN(e){if(typeof e=="object"&&e){let t=e==null?void 0:e.delay;return t=!Number.isNaN(t)&&typeof t=="number"?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}const ON={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},IN=Q.forwardRef((e,t)=>{var r,n;const{loading:i=!1,prefixCls:o,color:a,variant:c,type:u,danger:d=!1,shape:f,size:p,styles:g,disabled:v,className:b,rootClassName:S,children:_,icon:C,iconPosition:x="start",ghost:E=!1,block:k=!1,htmlType:P="button",classNames:T,style:O={},autoInsertSpace:N,autoFocus:I}=e,z=TN(e,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),D=u||"default",{button:M}=Q.useContext(Pt),j=f||(M==null?void 0:M.shape)||"default",[B,F]=h.useMemo(()=>{if(a&&c)return[a,c];if(u||d){const _t=ON[D]||[];return d?["danger",_t[1]]:_t}return M!=null&&M.color&&(M!=null&&M.variant)?[M.color,M.variant]:["default","outlined"]},[a,c,u,d,M==null?void 0:M.color,M==null?void 0:M.variant,D]),V=B==="danger"?"dangerous":B,{getPrefixCls:L,direction:G,autoInsertSpace:q,className:A,style:U,classNames:Y,styles:Z}=Un("button"),te=(r=N??q)!==null&&r!==void 0?r:!0,ne=L("btn",o),[he,me,ue]=SN(ne),Se=h.useContext(Gs),ae=v??Se,le=h.useContext(LE),ce=h.useMemo(()=>PN(i),[i]),[ye,fe]=h.useState(ce.loading),[de,be]=h.useState(!1),Ce=h.useRef(null),Te=qo(t,Ce),ze=h.Children.count(_)===1&&!C&&!dg(F),Ee=h.useRef(!0);Q.useEffect(()=>(Ee.current=!1,()=>{Ee.current=!0}),[]),ur(()=>{let _t=null;ce.delay>0?_t=setTimeout(()=>{_t=null,fe(!0)},ce.delay):fe(ce.loading);function tr(){_t&&(clearTimeout(_t),_t=null)}return tr},[ce.delay,ce.loading]),h.useEffect(()=>{if(!Ce.current||!te)return;const _t=Ce.current.textContent||"";ze&&zv(_t)?de||be(!0):de&&be(!1)}),h.useEffect(()=>{I&&Ce.current&&Ce.current.focus()},[]);const $e=Q.useCallback(_t=>{var tr;if(ye||ae){_t.preventDefault();return}(tr=e.onClick)===null||tr===void 0||tr.call(e,("href"in e,_t))},[e.onClick,ye,ae]),{compactSize:je,compactItemClassnames:Oe}=Lu(ne,G),Qe={large:"lg",small:"sm",middle:void 0},st=Go(_t=>{var tr,Yt;return(Yt=(tr=p??je)!==null&&tr!==void 0?tr:le)!==null&&Yt!==void 0?Yt:_t}),Et=st&&(n=Qe[st])!==null&&n!==void 0?n:"",mt=ye?"loading":C,Je=un(z,["navigate"]),ht=re(ne,me,ue,{[`${ne}-${j}`]:j!=="default"&&j,[`${ne}-${D}`]:D,[`${ne}-dangerous`]:d,[`${ne}-color-${V}`]:V,[`${ne}-variant-${F}`]:F,[`${ne}-${Et}`]:Et,[`${ne}-icon-only`]:!_&&_!==0&&!!mt,[`${ne}-background-ghost`]:E&&!dg(F),[`${ne}-loading`]:ye,[`${ne}-two-chinese-chars`]:de&&te&&!ye,[`${ne}-block`]:k,[`${ne}-rtl`]:G==="rtl",[`${ne}-icon-end`]:x==="end"},Oe,b,S,A),Xe=Object.assign(Object.assign({},U),O),vt=re(T==null?void 0:T.icon,Y.icon),tt=Object.assign(Object.assign({},(g==null?void 0:g.icon)||{}),Z.icon||{}),Le=_t=>Q.createElement(AE,{prefixCls:ne,className:vt,style:tt},_t),nt=()=>Q.createElement(r6,{existIcon:!!C,prefixCls:ne,loading:ye,mount:Ee.current});let Me;C&&!ye?Me=Le(C):i&&typeof i=="object"&&i.icon?Me=Le(i.icon):Me=nt();const qe=_||_===0?t6(_,ze&&te):null;if(Je.href!==void 0)return he(Q.createElement("a",Object.assign({},Je,{className:re(ht,{[`${ne}-disabled`]:ae}),href:ae?void 0:Je.href,style:Xe,onClick:$e,ref:Te,tabIndex:ae?-1:0,"aria-disabled":ae}),Me,qe));let Ot=Q.createElement("button",Object.assign({},z,{type:P,className:ht,style:Xe,onClick:$e,disabled:ae,ref:Te}),Me,qe,Oe&&Q.createElement(RN,{prefixCls:ne}));return dg(F)||(Ot=Q.createElement(Mf,{component:"Button",disabled:ye},Ot)),he(Ot)}),cn=IN;cn.Group=ZI;cn.__ANT_BUTTON=!0;const pg=e=>typeof(e==null?void 0:e.then)=="function",KE=e=>{const{type:t,children:r,prefixCls:n,buttonProps:i,close:o,autoFocus:a,emitEvent:c,isSilent:u,quitOnNullishReturnValue:d,actionFn:f}=e,p=h.useRef(!1),g=h.useRef(null),[v,b]=ql(!1),S=(...x)=>{o==null||o.apply(void 0,x)};h.useEffect(()=>{let x=null;return a&&(x=setTimeout(()=>{var E;(E=g.current)===null||E===void 0||E.focus({preventScroll:!0})})),()=>{x&&clearTimeout(x)}},[a]);const _=x=>{pg(x)&&(b(!0),x.then((...E)=>{b(!1,!0),S.apply(void 0,E),p.current=!1},E=>{if(b(!1,!0),p.current=!1,!(u!=null&&u()))return Promise.reject(E)}))},C=x=>{if(p.current)return;if(p.current=!0,!f){S();return}let E;if(c){if(E=f(x),d&&!pg(E)){p.current=!1,S(x);return}}else if(f.length)E=f(o),p.current=!1;else if(E=f(),!pg(E)){S();return}_(E)};return h.createElement(cn,Object.assign({},DE(t),{onClick:C,loading:v,prefixCls:n},i,{ref:g}),r)},Au=Q.createContext({}),{Provider:GE}=Au,Y1=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:r,isSilent:n,mergedOkCancel:i,rootPrefixCls:o,close:a,onCancel:c,onConfirm:u}=h.useContext(Au);return i?Q.createElement(KE,{isSilent:n,actionFn:c,close:(...d)=>{a==null||a.apply(void 0,d),u==null||u(!1)},autoFocus:e==="cancel",buttonProps:t,prefixCls:`${o}-btn`},r):null},J1=()=>{const{autoFocusButton:e,close:t,isSilent:r,okButtonProps:n,rootPrefixCls:i,okTextLocale:o,okType:a,onConfirm:c,onOk:u}=h.useContext(Au);return Q.createElement(KE,{isSilent:r,type:a||"primary",actionFn:u,close:(...d)=>{t==null||t.apply(void 0,d),c==null||c(!0)},autoFocus:e==="ok",buttonProps:n,prefixCls:`${i}-btn`},o)};var XE=h.createContext(null),Q1=[];function NN(e,t){var r=h.useState(function(){if(!ni())return null;var b=document.createElement("div");return b}),n=se(r,1),i=n[0],o=h.useRef(!1),a=h.useContext(XE),c=h.useState(Q1),u=se(c,2),d=u[0],f=u[1],p=a||(o.current?void 0:function(b){f(function(S){var _=[b].concat(We(S));return _})});function g(){i.parentElement||document.body.appendChild(i),o.current=!0}function v(){var b;(b=i.parentElement)===null||b===void 0||b.removeChild(i),o.current=!1}return ur(function(){return e?a?a(g):g():v(),v},[e]),ur(function(){d.length&&(d.forEach(function(b){return b()}),f(Q1))},[d]),[i,p]}function MN(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),r=document.createElement("div");r.id=t;var n=r.style;n.position="absolute",n.left="0",n.top="0",n.width="100px",n.height="100px",n.overflow="scroll";var i,o;if(e){var a=getComputedStyle(e);n.scrollbarColor=a.scrollbarColor,n.scrollbarWidth=a.scrollbarWidth;var c=getComputedStyle(e,"::-webkit-scrollbar"),u=parseInt(c.width,10),d=parseInt(c.height,10);try{var f=u?"width: ".concat(c.width,";"):"",p=d?"height: ".concat(c.height,";"):"";us(`
204
+ #`.concat(t,`::-webkit-scrollbar {
205
+ `).concat(f,`
206
+ `).concat(p,`
207
+ }`),t)}catch(b){console.error(b),i=u,o=d}}document.body.appendChild(r);var g=e&&i&&!isNaN(i)?i:r.offsetWidth-r.clientWidth,v=e&&o&&!isNaN(o)?o:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),mu(t),{width:g,height:v}}function zN(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:MN(e)}function jN(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var BN="rc-util-locker-".concat(Date.now()),Z1=0;function LN(e){var t=!!e,r=h.useState(function(){return Z1+=1,"".concat(BN,"_").concat(Z1)}),n=se(r,1),i=n[0];ur(function(){if(t){var o=zN(document.body).width,a=jN();us(`
208
+ html body {
209
+ overflow-y: hidden;
210
+ `.concat(a?"width: calc(100% - ".concat(o,"px);"):"",`
211
+ }`),i)}else mu(i);return function(){mu(i)}},[t,i])}var DN=!1;function AN(e){return DN}var eC=function(t){return t===!1?!1:!ni()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},Vf=h.forwardRef(function(e,t){var r=e.open,n=e.autoLock,i=e.getContainer;e.debug;var o=e.autoDestroy,a=o===void 0?!0:o,c=e.children,u=h.useState(r),d=se(u,2),f=d[0],p=d[1],g=f||r;h.useEffect(function(){(a||r)&&p(r)},[r,a]);var v=h.useState(function(){return eC(i)}),b=se(v,2),S=b[0],_=b[1];h.useEffect(function(){var D=eC(i);_(D??null)});var C=NN(g&&!S),x=se(C,2),E=x[0],k=x[1],P=S??E;LN(n&&r&&ni()&&(P===E||P===document.body));var T=null;if(c&&Qs(c)&&t){var O=c;T=O.ref}var N=qo(T,t);if(!g||!ni()||S===void 0)return null;var I=P===!1||AN(),z=c;return t&&(z=h.cloneElement(c,{ref:N})),h.createElement(XE.Provider,{value:k},I?z:qs.createPortal(z,P))}),YE=h.createContext({});function HN(){var e=X({},xf);return e.useId}var tC=0,rC=HN();const Uf=rC?(function(t){var r=rC();return t||r}):(function(t){var r=h.useState("ssr-id"),n=se(r,2),i=n[0],o=n[1];return h.useEffect(function(){var a=tC;tC+=1,o("rc_unique_".concat(a))},[]),t||i});function nC(e,t,r){var n=t;return!n&&r&&(n="".concat(e,"-").concat(r)),n}function iC(e,t){var r=e["page".concat(t?"Y":"X","Offset")],n="scroll".concat(t?"Top":"Left");if(typeof r!="number"){var i=e.document;r=i.documentElement[n],typeof r!="number"&&(r=i.body[n])}return r}function FN(e){var t=e.getBoundingClientRect(),r={left:t.left,top:t.top},n=e.ownerDocument,i=n.defaultView||n.parentWindow;return r.left+=iC(i),r.top+=iC(i,!0),r}const WN=h.memo(function(e){var t=e.children;return t},function(e,t){var r=t.shouldUpdate;return!r});var VN={width:0,height:0,overflow:"hidden",outline:"none"},UN={outline:"none"},JE=Q.forwardRef(function(e,t){var r=e.prefixCls,n=e.className,i=e.style,o=e.title,a=e.ariaId,c=e.footer,u=e.closable,d=e.closeIcon,f=e.onClose,p=e.children,g=e.bodyStyle,v=e.bodyProps,b=e.modalRender,S=e.onMouseDown,_=e.onMouseUp,C=e.holderRef,x=e.visible,E=e.forceRender,k=e.width,P=e.height,T=e.classNames,O=e.styles,N=Q.useContext(YE),I=N.panel,z=qo(C,I),D=h.useRef(),M=h.useRef();Q.useImperativeHandle(t,function(){return{focus:function(){var U;(U=D.current)===null||U===void 0||U.focus({preventScroll:!0})},changeActive:function(U){var Y=document,Z=Y.activeElement;U&&Z===M.current?D.current.focus({preventScroll:!0}):!U&&Z===D.current&&M.current.focus({preventScroll:!0})}}});var j={};k!==void 0&&(j.width=k),P!==void 0&&(j.height=P);var B=c?Q.createElement("div",{className:re("".concat(r,"-footer"),T==null?void 0:T.footer),style:X({},O==null?void 0:O.footer)},c):null,F=o?Q.createElement("div",{className:re("".concat(r,"-header"),T==null?void 0:T.header),style:X({},O==null?void 0:O.header)},Q.createElement("div",{className:"".concat(r,"-title"),id:a},o)):null,W=h.useMemo(function(){return bt(u)==="object"&&u!==null?u:u?{closeIcon:d??Q.createElement("span",{className:"".concat(r,"-close-x")})}:{}},[u,d,r]),V=Fi(W,!0),L=bt(u)==="object"&&u.disabled,G=u?Q.createElement("button",Re({type:"button",onClick:f,"aria-label":"Close"},V,{className:"".concat(r,"-close"),disabled:L}),W.closeIcon):null,q=Q.createElement("div",{className:re("".concat(r,"-content"),T==null?void 0:T.content),style:O==null?void 0:O.content},G,F,Q.createElement("div",Re({className:re("".concat(r,"-body"),T==null?void 0:T.body),style:X(X({},g),O==null?void 0:O.body)},v),p),B);return Q.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":o?a:null,"aria-modal":"true",ref:z,style:X(X({},i),j),className:re(r,n),onMouseDown:S,onMouseUp:_},Q.createElement("div",{ref:D,tabIndex:0,style:UN},Q.createElement(WN,{shouldUpdate:x||E},b?b(q):q)),Q.createElement("div",{tabIndex:0,ref:M,style:VN}))}),QE=h.forwardRef(function(e,t){var r=e.prefixCls,n=e.title,i=e.style,o=e.className,a=e.visible,c=e.forceRender,u=e.destroyOnClose,d=e.motionName,f=e.ariaId,p=e.onVisibleChanged,g=e.mousePosition,v=h.useRef(),b=h.useState(),S=se(b,2),_=S[0],C=S[1],x={};_&&(x.transformOrigin=_);function E(){var k=FN(v.current);C(g&&(g.x||g.y)?"".concat(g.x-k.left,"px ").concat(g.y-k.top,"px"):"")}return h.createElement(Hi,{visible:a,onVisibleChanged:p,onAppearPrepare:E,onEnterPrepare:E,forceRender:c,motionName:d,removeOnLeave:u,ref:v},function(k,P){var T=k.className,O=k.style;return h.createElement(JE,Re({},e,{ref:t,title:n,ariaId:f,prefixCls:r,holderRef:P,style:X(X(X({},O),i),x),className:re(o,T)}))})});QE.displayName="Content";var qN=function(t){var r=t.prefixCls,n=t.style,i=t.visible,o=t.maskProps,a=t.motionName,c=t.className;return h.createElement(Hi,{key:"mask",visible:i,motionName:a,leavedClassName:"".concat(r,"-mask-hidden")},function(u,d){var f=u.className,p=u.style;return h.createElement("div",Re({ref:d,style:X(X({},p),n),className:re("".concat(r,"-mask"),f,c)},o))})},KN=function(t){var r=t.prefixCls,n=r===void 0?"rc-dialog":r,i=t.zIndex,o=t.visible,a=o===void 0?!1:o,c=t.keyboard,u=c===void 0?!0:c,d=t.focusTriggerAfterClose,f=d===void 0?!0:d,p=t.wrapStyle,g=t.wrapClassName,v=t.wrapProps,b=t.onClose,S=t.afterOpenChange,_=t.afterClose,C=t.transitionName,x=t.animation,E=t.closable,k=E===void 0?!0:E,P=t.mask,T=P===void 0?!0:P,O=t.maskTransitionName,N=t.maskAnimation,I=t.maskClosable,z=I===void 0?!0:I,D=t.maskStyle,M=t.maskProps,j=t.rootClassName,B=t.classNames,F=t.styles,W=h.useRef(),V=h.useRef(),L=h.useRef(),G=h.useState(a),q=se(G,2),A=q[0],U=q[1],Y=Uf();function Z(){sv(V.current,document.activeElement)||(W.current=document.activeElement)}function te(){if(!sv(V.current,document.activeElement)){var fe;(fe=L.current)===null||fe===void 0||fe.focus()}}function ne(fe){if(fe)te();else{if(U(!1),T&&W.current&&f){try{W.current.focus({preventScroll:!0})}catch{}W.current=null}A&&(_==null||_())}S==null||S(fe)}function he(fe){b==null||b(fe)}var me=h.useRef(!1),ue=h.useRef(),Se=function(){clearTimeout(ue.current),me.current=!0},ae=function(){ue.current=setTimeout(function(){me.current=!1})},le=null;z&&(le=function(de){me.current?me.current=!1:V.current===de.target&&he(de)});function ce(fe){if(u&&fe.keyCode===Ge.ESC){fe.stopPropagation(),he(fe);return}a&&fe.keyCode===Ge.TAB&&L.current.changeActive(!fe.shiftKey)}h.useEffect(function(){a&&(U(!0),Z())},[a]),h.useEffect(function(){return function(){clearTimeout(ue.current)}},[]);var ye=X(X(X({zIndex:i},p),F==null?void 0:F.wrapper),{},{display:A?null:"none"});return h.createElement("div",Re({className:re("".concat(n,"-root"),j)},Fi(t,{data:!0})),h.createElement(qN,{prefixCls:n,visible:T&&a,motionName:nC(n,O,N),style:X(X({zIndex:i},D),F==null?void 0:F.mask),maskProps:M,className:B==null?void 0:B.mask}),h.createElement("div",Re({tabIndex:-1,onKeyDown:ce,className:re("".concat(n,"-wrap"),g,B==null?void 0:B.wrapper),ref:V,onClick:le,style:ye},v),h.createElement(QE,Re({},t,{onMouseDown:Se,onMouseUp:ae,ref:L,closable:k,ariaId:Y,prefixCls:n,visible:a&&A,onClose:he,onVisibleChanged:ne,motionName:nC(n,C,x)}))))},ZE=function(t){var r=t.visible,n=t.getContainer,i=t.forceRender,o=t.destroyOnClose,a=o===void 0?!1:o,c=t.afterClose,u=t.panelRef,d=h.useState(r),f=se(d,2),p=f[0],g=f[1],v=h.useMemo(function(){return{panel:u}},[u]);return h.useEffect(function(){r&&g(!0)},[r]),!i&&a&&!p?null:h.createElement(YE.Provider,{value:v},h.createElement(Vf,{open:r||i||p,autoDestroy:!1,getContainer:n,autoLock:r||p},h.createElement(KN,Re({},t,{destroyOnClose:a,afterClose:function(){c==null||c(),g(!1)}}))))};ZE.displayName="Dialog";var ba="RC_FORM_INTERNAL_HOOKS",Or=function(){jn(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Gl=h.createContext({getFieldValue:Or,getFieldsValue:Or,getFieldError:Or,getFieldWarning:Or,getFieldsError:Or,isFieldsTouched:Or,isFieldTouched:Or,isFieldValidating:Or,isFieldsValidating:Or,resetFields:Or,setFields:Or,setFieldValue:Or,setFieldsValue:Or,validateFields:Or,submit:Or,getInternalHooks:function(){return Or(),{dispatch:Or,initEntityValue:Or,registerField:Or,useSubscribe:Or,setInitialValues:Or,destroyForm:Or,setCallbacks:Or,registerWatch:Or,getFields:Or,setValidateMessages:Or,setPreserve:Or,getInitialValue:Or}}}),tf=h.createContext(null);function Bv(e){return e==null?[]:Array.isArray(e)?e:[e]}function GN(e){return e&&!!e._init}function Lv(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",tel:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var Dv=Lv();function XN(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function YN(e,t,r){if(ey())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&du(i,r.prototype),i}function Av(e){var t=typeof Map=="function"?new Map:void 0;return Av=function(n){if(n===null||!XN(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,i)}function i(){return YN(n,arguments,hu(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),du(i,n)},Av(e)}var JN=/%[sdj%]/g,QN=function(){};function Hv(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function Di(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=0,o=r.length;if(typeof e=="function")return e.apply(null,r);if(typeof e=="string"){var a=e.replace(JN,function(c){if(c==="%%")return"%";if(i>=o)return c;switch(c){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch{return"[Circular]"}break;default:return c}});return a}return e}function ZN(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function xn(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||ZN(t)&&typeof e=="string"&&!e)}function eM(e,t,r){var n=[],i=0,o=e.length;function a(c){n.push.apply(n,We(c||[])),i++,i===o&&r(n)}e.forEach(function(c){t(c,a)})}function oC(e,t,r){var n=0,i=e.length;function o(a){if(a&&a.length){r(a);return}var c=n;n=n+1,c<i?t(e[c],o):r([])}o([])}function tM(e){var t=[];return Object.keys(e).forEach(function(r){t.push.apply(t,We(e[r]||[]))}),t}var sC=(function(e){ds(r,e);var t=hs(r);function r(n,i){var o;return pn(this,r),o=t.call(this,"Async Validation Error"),K(Qt(o),"errors",void 0),K(Qt(o),"fields",void 0),o.errors=n,o.fields=i,o}return gn(r)})(Av(Error));function rM(e,t,r,n,i){if(t.first){var o=new Promise(function(g,v){var b=function(C){return n(C),C.length?v(new sC(C,Hv(C))):g(i)},S=tM(e);oC(S,r,b)});return o.catch(function(g){return g}),o}var a=t.firstFields===!0?Object.keys(e):t.firstFields||[],c=Object.keys(e),u=c.length,d=0,f=[],p=new Promise(function(g,v){var b=function(_){if(f.push.apply(f,_),d++,d===u)return n(f),f.length?v(new sC(f,Hv(f))):g(i)};c.length||(n(f),g(i)),c.forEach(function(S){var _=e[S];a.indexOf(S)!==-1?oC(_,r,b):eM(_,r,b)})});return p.catch(function(g){return g}),p}function nM(e){return!!(e&&e.message!==void 0)}function iM(e,t){for(var r=e,n=0;n<t.length;n++){if(r==null)return r;r=r[t[n]]}return r}function aC(e,t){return function(r){var n;return e.fullFields?n=iM(t,e.fullFields):n=t[r.field||e.fullField],nM(r)?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||e.fullField}}}function lC(e,t){if(t){for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];bt(n)==="object"&&bt(e[r])==="object"?e[r]=X(X({},e[r]),n):e[r]=n}}return e}var fl="enum",oM=function(t,r,n,i,o){t[fl]=Array.isArray(t[fl])?t[fl]:[],t[fl].indexOf(r)===-1&&i.push(Di(o.messages[fl],t.fullField,t[fl].join(", ")))},sM=function(t,r,n,i,o){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(r)||i.push(Di(o.messages.pattern.mismatch,t.fullField,r,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(r)||i.push(Di(o.messages.pattern.mismatch,t.fullField,r,t.pattern))}}},aM=function(t,r,n,i,o){var a=typeof t.len=="number",c=typeof t.min=="number",u=typeof t.max=="number",d=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=r,p=null,g=typeof r=="number",v=typeof r=="string",b=Array.isArray(r);if(g?p="number":v?p="string":b&&(p="array"),!p)return!1;b&&(f=r.length),v&&(f=r.replace(d,"_").length),a?f!==t.len&&i.push(Di(o.messages[p].len,t.fullField,t.len)):c&&!u&&f<t.min?i.push(Di(o.messages[p].min,t.fullField,t.min)):u&&!c&&f>t.max?i.push(Di(o.messages[p].max,t.fullField,t.max)):c&&u&&(f<t.min||f>t.max)&&i.push(Di(o.messages[p].range,t.fullField,t.min,t.max))},e$=function(t,r,n,i,o,a){t.required&&(!n.hasOwnProperty(t.field)||xn(r,a||t.type))&&i.push(Di(o.messages.required,t.fullField))},ih;const lM=(function(){if(ih)return ih;var e="[a-fA-F\\d:]",t=function(T){return T&&T.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",i=["(?:".concat(n,":){7}(?:").concat(n,"|:)"),"(?:".concat(n,":){6}(?:").concat(r,"|:").concat(n,"|:)"),"(?:".concat(n,":){5}(?::").concat(r,"|(?::").concat(n,"){1,2}|:)"),"(?:".concat(n,":){4}(?:(?::").concat(n,"){0,1}:").concat(r,"|(?::").concat(n,"){1,3}|:)"),"(?:".concat(n,":){3}(?:(?::").concat(n,"){0,2}:").concat(r,"|(?::").concat(n,"){1,4}|:)"),"(?:".concat(n,":){2}(?:(?::").concat(n,"){0,3}:").concat(r,"|(?::").concat(n,"){1,5}|:)"),"(?:".concat(n,":){1}(?:(?::").concat(n,"){0,4}:").concat(r,"|(?::").concat(n,"){1,6}|:)"),"(?::(?:(?::".concat(n,"){0,5}:").concat(r,"|(?::").concat(n,"){1,7}|:))")],o="(?:%[0-9a-zA-Z]{1,})?",a="(?:".concat(i.join("|"),")").concat(o),c=new RegExp("(?:^".concat(r,"$)|(?:^").concat(a,"$)")),u=new RegExp("^".concat(r,"$")),d=new RegExp("^".concat(a,"$")),f=function(T){return T&&T.exact?c:new RegExp("(?:".concat(t(T)).concat(r).concat(t(T),")|(?:").concat(t(T)).concat(a).concat(t(T),")"),"g")};f.v4=function(P){return P&&P.exact?u:new RegExp("".concat(t(P)).concat(r).concat(t(P)),"g")},f.v6=function(P){return P&&P.exact?d:new RegExp("".concat(t(P)).concat(a).concat(t(P)),"g")};var p="(?:(?:[a-z]+:)?//)",g="(?:\\S+(?::\\S*)?@)?",v=f.v4().source,b=f.v6().source,S="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",_="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",C="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",x="(?::\\d{2,5})?",E='(?:[/?#][^\\s"]*)?',k="(?:".concat(p,"|www\\.)").concat(g,"(?:localhost|").concat(v,"|").concat(b,"|").concat(S).concat(_).concat(C,")").concat(x).concat(E);return ih=new RegExp("(?:^".concat(k,"$)"),"i"),ih});var gg={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Yc={integer:function(t){return Yc.number(t)&&parseInt(t,10)===t},float:function(t){return Yc.number(t)&&!Yc.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return bt(t)==="object"&&!Yc.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(gg.email)},tel:function(t){return typeof t=="string"&&t.length<=32&&!!t.match(gg.tel)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(lM())},hex:function(t){return typeof t=="string"&&!!t.match(gg.hex)}},cM=function(t,r,n,i,o){if(t.required&&r===void 0){e$(t,r,n,i,o);return}var a=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],c=t.type;a.indexOf(c)>-1?Yc[c](r)||i.push(Di(o.messages.types[c],t.fullField,t.type)):c&&bt(r)!==t.type&&i.push(Di(o.messages.types[c],t.fullField,t.type))},uM=function(t,r,n,i,o){(/^\s+$/.test(r)||r==="")&&i.push(Di(o.messages.whitespace,t.fullField))};const ar={required:e$,whitespace:uM,type:cM,range:aM,enum:oM,pattern:sM};var dM=function(t,r,n,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(xn(r)&&!t.required)return n();ar.required(t,r,i,a,o)}n(a)},hM=function(t,r,n,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(r==null&&!t.required)return n();ar.required(t,r,i,a,o,"array"),r!=null&&(ar.type(t,r,i,a,o),ar.range(t,r,i,a,o))}n(a)},fM=function(t,r,n,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(xn(r)&&!t.required)return n();ar.required(t,r,i,a,o),r!==void 0&&ar.type(t,r,i,a,o)}n(a)},mM=function(t,r,n,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(xn(r,"date")&&!t.required)return n();if(ar.required(t,r,i,a,o),!xn(r,"date")){var u;r instanceof Date?u=r:u=new Date(r),ar.type(t,u,i,a,o),u&&ar.range(t,u.getTime(),i,a,o)}}n(a)},pM="enum",gM=function(t,r,n,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(xn(r)&&!t.required)return n();ar.required(t,r,i,a,o),r!==void 0&&ar[pM](t,r,i,a,o)}n(a)},vM=function(t,r,n,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(xn(r)&&!t.required)return n();ar.required(t,r,i,a,o),r!==void 0&&(ar.type(t,r,i,a,o),ar.range(t,r,i,a,o))}n(a)},yM=function(t,r,n,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(xn(r)&&!t.required)return n();ar.required(t,r,i,a,o),r!==void 0&&(ar.type(t,r,i,a,o),ar.range(t,r,i,a,o))}n(a)},bM=function(t,r,n,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(xn(r)&&!t.required)return n();ar.required(t,r,i,a,o),r!==void 0&&ar.type(t,r,i,a,o)}n(a)},_M=function(t,r,n,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(r===""&&(r=void 0),xn(r)&&!t.required)return n();ar.required(t,r,i,a,o),r!==void 0&&(ar.type(t,r,i,a,o),ar.range(t,r,i,a,o))}n(a)},SM=function(t,r,n,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(xn(r)&&!t.required)return n();ar.required(t,r,i,a,o),r!==void 0&&ar.type(t,r,i,a,o)}n(a)},CM=function(t,r,n,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(xn(r,"string")&&!t.required)return n();ar.required(t,r,i,a,o),xn(r,"string")||ar.pattern(t,r,i,a,o)}n(a)},wM=function(t,r,n,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(xn(r)&&!t.required)return n();ar.required(t,r,i,a,o),xn(r)||ar.type(t,r,i,a,o)}n(a)},xM=function(t,r,n,i,o){var a=[],c=Array.isArray(r)?"array":bt(r);ar.required(t,r,i,a,o,c),n(a)},EM=function(t,r,n,i,o){var a=[],c=t.required||!t.required&&i.hasOwnProperty(t.field);if(c){if(xn(r,"string")&&!t.required)return n();ar.required(t,r,i,a,o,"string"),xn(r,"string")||(ar.type(t,r,i,a,o),ar.range(t,r,i,a,o),ar.pattern(t,r,i,a,o),t.whitespace===!0&&ar.whitespace(t,r,i,a,o))}n(a)},oh=function(t,r,n,i,o){var a=t.type,c=[],u=t.required||!t.required&&i.hasOwnProperty(t.field);if(u){if(xn(r,a)&&!t.required)return n();ar.required(t,r,i,c,o,a),xn(r,a)||ar.type(t,r,i,c,o)}n(c)};const au={string:EM,method:bM,number:_M,boolean:fM,regexp:wM,integer:yM,float:vM,array:hM,object:SM,enum:gM,pattern:CM,date:mM,url:oh,hex:oh,email:oh,tel:oh,required:xM,any:dM};var Hu=(function(){function e(t){pn(this,e),K(this,"rules",null),K(this,"_messages",Dv),this.define(t)}return gn(e,[{key:"define",value:function(r){var n=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(bt(r)!=="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(i){var o=r[i];n.rules[i]=Array.isArray(o)?o:[o]})}},{key:"messages",value:function(r){return r&&(this._messages=lC(Lv(),r)),this._messages}},{key:"validate",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=r,c=i,u=o;if(typeof c=="function"&&(u=c,c={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,a),Promise.resolve(a);function d(b){var S=[],_={};function C(E){if(Array.isArray(E)){var k;S=(k=S).concat.apply(k,We(E))}else S.push(E)}for(var x=0;x<b.length;x++)C(b[x]);S.length?(_=Hv(S),u(S,_)):u(null,a)}if(c.messages){var f=this.messages();f===Dv&&(f=Lv()),lC(f,c.messages),c.messages=f}else c.messages=this.messages();var p={},g=c.keys||Object.keys(this.rules);g.forEach(function(b){var S=n.rules[b],_=a[b];S.forEach(function(C){var x=C;typeof x.transform=="function"&&(a===r&&(a=X({},a)),_=a[b]=x.transform(_),_!=null&&(x.type=x.type||(Array.isArray(_)?"array":bt(_)))),typeof x=="function"?x={validator:x}:x=X({},x),x.validator=n.getValidationMethod(x),x.validator&&(x.field=b,x.fullField=x.fullField||b,x.type=n.getType(x),p[b]=p[b]||[],p[b].push({rule:x,value:_,source:a,field:b}))})});var v={};return rM(p,c,function(b,S){var _=b.rule,C=(_.type==="object"||_.type==="array")&&(bt(_.fields)==="object"||bt(_.defaultField)==="object");C=C&&(_.required||!_.required&&b.value),_.field=b.field;function x(O,N){return X(X({},N),{},{fullField:"".concat(_.fullField,".").concat(O),fullFields:_.fullFields?[].concat(We(_.fullFields),[O]):[O]})}function E(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],N=Array.isArray(O)?O:[O];!c.suppressWarning&&N.length&&e.warning("async-validator:",N),N.length&&_.message!==void 0&&_.message!==null&&(N=[].concat(_.message));var I=N.map(aC(_,a));if(c.first&&I.length)return v[_.field]=1,S(I);if(!C)S(I);else{if(_.required&&!b.value)return _.message!==void 0?I=[].concat(_.message).map(aC(_,a)):c.error&&(I=[c.error(_,Di(c.messages.required,_.field))]),S(I);var z={};_.defaultField&&Object.keys(b.value).map(function(j){z[j]=_.defaultField}),z=X(X({},z),b.rule.fields);var D={};Object.keys(z).forEach(function(j){var B=z[j],F=Array.isArray(B)?B:[B];D[j]=F.map(x.bind(null,j))});var M=new e(D);M.messages(c.messages),b.rule.options&&(b.rule.options.messages=c.messages,b.rule.options.error=c.error),M.validate(b.value,b.rule.options||c,function(j){var B=[];I&&I.length&&B.push.apply(B,We(I)),j&&j.length&&B.push.apply(B,We(j)),S(B.length?B:null)})}}var k;if(_.asyncValidator)k=_.asyncValidator(_,b.value,E,b.source,c);else if(_.validator){try{k=_.validator(_,b.value,E,b.source,c)}catch(O){var P,T;(P=(T=console).error)===null||P===void 0||P.call(T,O),c.suppressValidatorError||setTimeout(function(){throw O},0),E(O.message)}k===!0?E():k===!1?E(typeof _.message=="function"?_.message(_.fullField||_.field):_.message||"".concat(_.fullField||_.field," fails")):k instanceof Array?E(k):k instanceof Error&&E(k.message)}k&&k.then&&k.then(function(){return E()},function(O){return E(O)})},function(b){d(b)},a)}},{key:"getType",value:function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!au.hasOwnProperty(r.type))throw new Error(Di("Unknown rule type %s",r.type));return r.type||"string"}},{key:"getValidationMethod",value:function(r){if(typeof r.validator=="function")return r.validator;var n=Object.keys(r),i=n.indexOf("message");return i!==-1&&n.splice(i,1),n.length===1&&n[0]==="required"?au.required:au[this.getType(r)]||void 0}}]),e})();K(Hu,"register",function(t,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");au[t]=r});K(Hu,"warning",QN);K(Hu,"messages",Dv);K(Hu,"validators",au);var Mi="'${name}' is not a valid ${type}",t$={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Mi,method:Mi,array:Mi,object:Mi,number:Mi,date:Mi,boolean:Mi,integer:Mi,float:Mi,regexp:Mi,email:Mi,url:Mi,hex:Mi},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},cC=Hu;function $M(e,t){return e.replace(/\\?\$\{\w+\}/g,function(r){if(r.startsWith("\\"))return r.slice(1);var n=r.slice(2,-1);return t[n]})}var uC="CODE_LOGIC_ERROR";function Fv(e,t,r,n,i){return Wv.apply(this,arguments)}function Wv(){return Wv=za(ii().mark(function e(t,r,n,i,o){var a,c,u,d,f,p,g,v,b;return ii().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return a=X({},n),delete a.ruleIndex,cC.warning=function(){},a.validator&&(c=a.validator,a.validator=function(){try{return c.apply(void 0,arguments)}catch(C){return console.error(C),Promise.reject(uC)}}),u=null,a&&a.type==="array"&&a.defaultField&&(u=a.defaultField,delete a.defaultField),d=new cC(K({},t,[a])),f=Tl(t$,i.validateMessages),d.messages(f),p=[],_.prev=10,_.next=13,Promise.resolve(d.validate(K({},t,r),X({},i)));case 13:_.next=18;break;case 15:_.prev=15,_.t0=_.catch(10),_.t0.errors&&(p=_.t0.errors.map(function(C,x){var E=C.message,k=E===uC?f.default:E;return h.isValidElement(k)?h.cloneElement(k,{key:"error_".concat(x)}):k}));case 18:if(!(!p.length&&u&&Array.isArray(r)&&r.length>0)){_.next=23;break}return _.next=21,Promise.all(r.map(function(C,x){return Fv("".concat(t,".").concat(x),C,u,i,o)}));case 21:return g=_.sent,_.abrupt("return",g.reduce(function(C,x){return[].concat(We(C),We(x))},[]));case 23:return v=X(X({},n),{},{name:t,enum:(n.enum||[]).join(", ")},o),b=p.map(function(C){return typeof C=="string"?$M(C,v):C}),_.abrupt("return",b);case 26:case"end":return _.stop()}},e,null,[[10,15]])})),Wv.apply(this,arguments)}function kM(e,t,r,n,i,o){var a=e.join("."),c=r.map(function(f,p){var g=f.validator,v=X(X({},f),{},{ruleIndex:p});return g&&(v.validator=function(b,S,_){var C=!1,x=function(){for(var P=arguments.length,T=new Array(P),O=0;O<P;O++)T[O]=arguments[O];Promise.resolve().then(function(){jn(!C,"Your validator function has already return a promise. `callback` will be ignored."),C||_.apply(void 0,T)})},E=g(b,S,x);C=E&&typeof E.then=="function"&&typeof E.catch=="function",jn(C,"`callback` is deprecated. Please return a promise instead."),C&&E.then(function(){_()}).catch(function(k){_(k||" ")})}),v}).sort(function(f,p){var g=f.warningOnly,v=f.ruleIndex,b=p.warningOnly,S=p.ruleIndex;return!!g==!!b?v-S:g?1:-1}),u;if(i===!0)u=new Promise((function(){var f=za(ii().mark(function p(g,v){var b,S,_;return ii().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:b=0;case 1:if(!(b<c.length)){x.next=12;break}return S=c[b],x.next=5,Fv(a,t,S,n,o);case 5:if(_=x.sent,!_.length){x.next=9;break}return v([{errors:_,rule:S}]),x.abrupt("return");case 9:b+=1,x.next=1;break;case 12:g([]);case 13:case"end":return x.stop()}},p)}));return function(p,g){return f.apply(this,arguments)}})());else{var d=c.map(function(f){return Fv(a,t,f,n,o).then(function(p){return{errors:p,rule:f}})});u=(i?TM(d):RM(d)).then(function(f){return Promise.reject(f)})}return u.catch(function(f){return f}),u}function RM(e){return Vv.apply(this,arguments)}function Vv(){return Vv=za(ii().mark(function e(t){return ii().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.all(t).then(function(i){var o,a=(o=[]).concat.apply(o,We(i));return a}));case 1:case"end":return n.stop()}},e)})),Vv.apply(this,arguments)}function TM(e){return Uv.apply(this,arguments)}function Uv(){return Uv=za(ii().mark(function e(t){var r;return ii().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r=0,i.abrupt("return",new Promise(function(o){t.forEach(function(a){a.then(function(c){c.errors.length&&o([c]),r+=1,r===t.length&&o([])})})}));case 2:case"end":return i.stop()}},e)})),Uv.apply(this,arguments)}function an(e){return Bv(e)}function dC(e,t){var r={};return t.forEach(function(n){var i=Bo(e,n);r=_o(r,n,i)}),r}function Bl(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return e&&e.some(function(n){return r$(t,n,r)})}function r$(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e||!t||!r&&e.length!==t.length?!1:t.every(function(n,i){return e[i]===n})}function PM(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||bt(e)!=="object"||bt(t)!=="object")return!1;var r=Object.keys(e),n=Object.keys(t),i=new Set([].concat(r,n));return We(i).every(function(o){var a=e[o],c=t[o];return typeof a=="function"&&typeof c=="function"?!0:a===c})}function OM(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&bt(t.target)==="object"&&e in t.target?t.target[e]:t}function hC(e,t,r){var n=e.length;if(t<0||t>=n||r<0||r>=n)return e;var i=e[t],o=t-r;return o>0?[].concat(We(e.slice(0,r)),[i],We(e.slice(r,t)),We(e.slice(t+1,n))):o<0?[].concat(We(e.slice(0,t)),We(e.slice(t+1,r+1)),[i],We(e.slice(r+1,n))):e}var IM=["name"],Ji=[];function vg(e,t,r,n,i,o){return typeof e=="function"?e(t,r,"source"in o?{source:o.source}:{}):n!==i}var xy=(function(e){ds(r,e);var t=hs(r);function r(n){var i;if(pn(this,r),i=t.call(this,n),K(Qt(i),"state",{resetCount:0}),K(Qt(i),"cancelRegisterFunc",null),K(Qt(i),"mounted",!1),K(Qt(i),"touched",!1),K(Qt(i),"dirty",!1),K(Qt(i),"validatePromise",void 0),K(Qt(i),"prevValidating",void 0),K(Qt(i),"errors",Ji),K(Qt(i),"warnings",Ji),K(Qt(i),"cancelRegister",function(){var u=i.props,d=u.preserve,f=u.isListField,p=u.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(f,d,an(p)),i.cancelRegisterFunc=null}),K(Qt(i),"getNamePath",function(){var u=i.props,d=u.name,f=u.fieldContext,p=f.prefixName,g=p===void 0?[]:p;return d!==void 0?[].concat(We(g),We(d)):[]}),K(Qt(i),"getRules",function(){var u=i.props,d=u.rules,f=d===void 0?[]:d,p=u.fieldContext;return f.map(function(g){return typeof g=="function"?g(p):g})}),K(Qt(i),"refresh",function(){i.mounted&&i.setState(function(u){var d=u.resetCount;return{resetCount:d+1}})}),K(Qt(i),"metaCache",null),K(Qt(i),"triggerMetaEvent",function(u){var d=i.props.onMetaChange;if(d){var f=X(X({},i.getMeta()),{},{destroy:u});pu(i.metaCache,f)||d(f),i.metaCache=f}else i.metaCache=null}),K(Qt(i),"onStoreChange",function(u,d,f){var p=i.props,g=p.shouldUpdate,v=p.dependencies,b=v===void 0?[]:v,S=p.onReset,_=f.store,C=i.getNamePath(),x=i.getValue(u),E=i.getValue(_),k=d&&Bl(d,C);switch(f.type==="valueUpdate"&&f.source==="external"&&!pu(x,E)&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=Ji,i.warnings=Ji,i.triggerMetaEvent()),f.type){case"reset":if(!d||k){i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=Ji,i.warnings=Ji,i.triggerMetaEvent(),S==null||S(),i.refresh();return}break;case"remove":{if(g&&vg(g,u,_,x,E,f)){i.reRender();return}break}case"setField":{var P=f.data;if(k){"touched"in P&&(i.touched=P.touched),"validating"in P&&!("originRCField"in P)&&(i.validatePromise=P.validating?Promise.resolve([]):null),"errors"in P&&(i.errors=P.errors||Ji),"warnings"in P&&(i.warnings=P.warnings||Ji),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}else if("value"in P&&Bl(d,C,!0)){i.reRender();return}if(g&&!C.length&&vg(g,u,_,x,E,f)){i.reRender();return}break}case"dependenciesUpdate":{var T=b.map(an);if(T.some(function(O){return Bl(f.relatedFields,O)})){i.reRender();return}break}default:if(k||(!b.length||C.length||g)&&vg(g,u,_,x,E,f)){i.reRender();return}break}g===!0&&i.reRender()}),K(Qt(i),"validateRules",function(u){var d=i.getNamePath(),f=i.getValue(),p=u||{},g=p.triggerName,v=p.validateOnly,b=v===void 0?!1:v,S=Promise.resolve().then(za(ii().mark(function _(){var C,x,E,k,P,T,O;return ii().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:if(i.mounted){I.next=2;break}return I.abrupt("return",[]);case 2:if(C=i.props,x=C.validateFirst,E=x===void 0?!1:x,k=C.messageVariables,P=C.validateDebounce,T=i.getRules(),g&&(T=T.filter(function(z){return z}).filter(function(z){var D=z.validateTrigger;if(!D)return!0;var M=Bv(D);return M.includes(g)})),!(P&&g)){I.next=10;break}return I.next=8,new Promise(function(z){setTimeout(z,P)});case 8:if(i.validatePromise===S){I.next=10;break}return I.abrupt("return",[]);case 10:return O=kM(d,f,T,u,E,k),O.catch(function(z){return z}).then(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ji;if(i.validatePromise===S){var D;i.validatePromise=null;var M=[],j=[];(D=z.forEach)===null||D===void 0||D.call(z,function(B){var F=B.rule.warningOnly,W=B.errors,V=W===void 0?Ji:W;F?j.push.apply(j,We(V)):M.push.apply(M,We(V))}),i.errors=M,i.warnings=j,i.triggerMetaEvent(),i.reRender()}}),I.abrupt("return",O);case 13:case"end":return I.stop()}},_)})));return b||(i.validatePromise=S,i.dirty=!0,i.errors=Ji,i.warnings=Ji,i.triggerMetaEvent(),i.reRender()),S}),K(Qt(i),"isFieldValidating",function(){return!!i.validatePromise}),K(Qt(i),"isFieldTouched",function(){return i.touched}),K(Qt(i),"isFieldDirty",function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var u=i.props.fieldContext,d=u.getInternalHooks(ba),f=d.getInitialValue;return f(i.getNamePath())!==void 0}),K(Qt(i),"getErrors",function(){return i.errors}),K(Qt(i),"getWarnings",function(){return i.warnings}),K(Qt(i),"isListField",function(){return i.props.isListField}),K(Qt(i),"isList",function(){return i.props.isList}),K(Qt(i),"isPreserve",function(){return i.props.preserve}),K(Qt(i),"getMeta",function(){i.prevValidating=i.isFieldValidating();var u={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:i.validatePromise===null};return u}),K(Qt(i),"getOnlyChild",function(u){if(typeof u=="function"){var d=i.getMeta();return X(X({},i.getOnlyChild(u(i.getControlled(),d,i.props.fieldContext))),{},{isFunction:!0})}var f=di(u);return f.length!==1||!h.isValidElement(f[0])?{child:f,isFunction:!1}:{child:f[0],isFunction:!1}}),K(Qt(i),"getValue",function(u){var d=i.props.fieldContext.getFieldsValue,f=i.getNamePath();return Bo(u||d(!0),f)}),K(Qt(i),"getControlled",function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=i.props,f=d.name,p=d.trigger,g=d.validateTrigger,v=d.getValueFromEvent,b=d.normalize,S=d.valuePropName,_=d.getValueProps,C=d.fieldContext,x=g!==void 0?g:C.validateTrigger,E=i.getNamePath(),k=C.getInternalHooks,P=C.getFieldsValue,T=k(ba),O=T.dispatch,N=i.getValue(),I=_||function(B){return K({},S,B)},z=u[p],D=f!==void 0?I(N):{},M=X(X({},u),D);M[p]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var B,F=arguments.length,W=new Array(F),V=0;V<F;V++)W[V]=arguments[V];v?B=v.apply(void 0,W):B=OM.apply(void 0,[S].concat(W)),b&&(B=b(B,N,P(!0))),B!==N&&O({type:"updateValue",namePath:E,value:B}),z&&z.apply(void 0,W)};var j=Bv(x||[]);return j.forEach(function(B){var F=M[B];M[B]=function(){F&&F.apply(void 0,arguments);var W=i.props.rules;W&&W.length&&O({type:"validateField",namePath:E,triggerName:B})}}),M}),n.fieldContext){var o=n.fieldContext.getInternalHooks,a=o(ba),c=a.initEntityValue;c(Qt(i))}return i}return gn(r,[{key:"componentDidMount",value:function(){var i=this.props,o=i.shouldUpdate,a=i.fieldContext;if(this.mounted=!0,a){var c=a.getInternalHooks,u=c(ba),d=u.registerField;this.cancelRegisterFunc=d(this)}o===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var i=this.state.resetCount,o=this.props.children,a=this.getOnlyChild(o),c=a.child,u=a.isFunction,d;return u?d=c:h.isValidElement(c)?d=h.cloneElement(c,this.getControlled(c.props)):(jn(!c,"`children` of Field is not validate ReactElement."),d=c),h.createElement(h.Fragment,{key:i},d)}}]),r})(h.Component);K(xy,"contextType",Gl);K(xy,"defaultProps",{trigger:"onChange",valuePropName:"value"});function n$(e){var t,r=e.name,n=Bt(e,IM),i=h.useContext(Gl),o=h.useContext(tf),a=r!==void 0?an(r):void 0,c=(t=n.isListField)!==null&&t!==void 0?t:!!o,u="keep";return c||(u="_".concat((a||[]).join("_"))),h.createElement(xy,Re({key:u,name:a,isListField:c},n,{fieldContext:i}))}function NM(e){var t=e.name,r=e.initialValue,n=e.children,i=e.rules,o=e.validateTrigger,a=e.isListField,c=h.useContext(Gl),u=h.useContext(tf),d=h.useRef({keys:[],id:0}),f=d.current,p=h.useMemo(function(){var S=an(c.prefixName)||[];return[].concat(We(S),We(an(t)))},[c.prefixName,t]),g=h.useMemo(function(){return X(X({},c),{},{prefixName:p})},[c,p]),v=h.useMemo(function(){return{getKey:function(_){var C=p.length,x=_[C];return[f.keys[x],_.slice(C+1)]}}},[p]);if(typeof n!="function")return jn(!1,"Form.List only accepts function as children."),null;var b=function(_,C,x){var E=x.source;return E==="internal"?!1:_!==C};return h.createElement(tf.Provider,{value:v},h.createElement(Gl.Provider,{value:g},h.createElement(n$,{name:[],shouldUpdate:b,rules:i,validateTrigger:o,initialValue:r,isList:!0,isListField:a??!!u},function(S,_){var C=S.value,x=C===void 0?[]:C,E=S.onChange,k=c.getFieldValue,P=function(){var I=k(p||[]);return I||[]},T={add:function(I,z){var D=P();z>=0&&z<=D.length?(f.keys=[].concat(We(f.keys.slice(0,z)),[f.id],We(f.keys.slice(z))),E([].concat(We(D.slice(0,z)),[I],We(D.slice(z))))):(f.keys=[].concat(We(f.keys),[f.id]),E([].concat(We(D),[I]))),f.id+=1},remove:function(I){var z=P(),D=new Set(Array.isArray(I)?I:[I]);D.size<=0||(f.keys=f.keys.filter(function(M,j){return!D.has(j)}),E(z.filter(function(M,j){return!D.has(j)})))},move:function(I,z){if(I!==z){var D=P();I<0||I>=D.length||z<0||z>=D.length||(f.keys=hC(f.keys,I,z),E(hC(D,I,z)))}}},O=x||[];return Array.isArray(O)||(O=[]),n(O.map(function(N,I){var z=f.keys[I];return z===void 0&&(f.keys[I]=f.id,z=f.keys[I],f.id+=1),{name:I,key:z,isListField:!0}}),T,_)})))}function MM(e){var t=!1,r=e.length,n=[];return e.length?new Promise(function(i,o){e.forEach(function(a,c){a.catch(function(u){return t=!0,u}).then(function(u){r-=1,n[c]=u,!(r>0)&&(t&&o(n),i(n))})})}):Promise.resolve([])}var i$="__@field_split__";function yg(e){return e.map(function(t){return"".concat(bt(t),":").concat(t)}).join(i$)}var ml=(function(){function e(){pn(this,e),K(this,"kvs",new Map)}return gn(e,[{key:"set",value:function(r,n){this.kvs.set(yg(r),n)}},{key:"get",value:function(r){return this.kvs.get(yg(r))}},{key:"update",value:function(r,n){var i=this.get(r),o=n(i);o?this.set(r,o):this.delete(r)}},{key:"delete",value:function(r){this.kvs.delete(yg(r))}},{key:"map",value:function(r){return We(this.kvs.entries()).map(function(n){var i=se(n,2),o=i[0],a=i[1],c=o.split(i$);return r({key:c.map(function(u){var d=u.match(/^([^:]*):(.*)$/),f=se(d,3),p=f[1],g=f[2];return p==="number"?Number(g):g}),value:a})})}},{key:"toJSON",value:function(){var r={};return this.map(function(n){var i=n.key,o=n.value;return r[i.join(".")]=o,null}),r}}]),e})(),zM=["name"],jM=gn(function e(t){var r=this;pn(this,e),K(this,"formHooked",!1),K(this,"forceRootUpdate",void 0),K(this,"subscribable",!0),K(this,"store",{}),K(this,"fieldEntities",[]),K(this,"initialValues",{}),K(this,"callbacks",{}),K(this,"validateMessages",null),K(this,"preserve",null),K(this,"lastValidatePromise",null),K(this,"getForm",function(){return{getFieldValue:r.getFieldValue,getFieldsValue:r.getFieldsValue,getFieldError:r.getFieldError,getFieldWarning:r.getFieldWarning,getFieldsError:r.getFieldsError,isFieldsTouched:r.isFieldsTouched,isFieldTouched:r.isFieldTouched,isFieldValidating:r.isFieldValidating,isFieldsValidating:r.isFieldsValidating,resetFields:r.resetFields,setFields:r.setFields,setFieldValue:r.setFieldValue,setFieldsValue:r.setFieldsValue,validateFields:r.validateFields,submit:r.submit,_init:!0,getInternalHooks:r.getInternalHooks}}),K(this,"getInternalHooks",function(n){return n===ba?(r.formHooked=!0,{dispatch:r.dispatch,initEntityValue:r.initEntityValue,registerField:r.registerField,useSubscribe:r.useSubscribe,setInitialValues:r.setInitialValues,destroyForm:r.destroyForm,setCallbacks:r.setCallbacks,setValidateMessages:r.setValidateMessages,getFields:r.getFields,setPreserve:r.setPreserve,getInitialValue:r.getInitialValue,registerWatch:r.registerWatch}):(jn(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),K(this,"useSubscribe",function(n){r.subscribable=n}),K(this,"prevWithoutPreserves",null),K(this,"setInitialValues",function(n,i){if(r.initialValues=n||{},i){var o,a=Tl(n,r.store);(o=r.prevWithoutPreserves)===null||o===void 0||o.map(function(c){var u=c.key;a=_o(a,u,Bo(n,u))}),r.prevWithoutPreserves=null,r.updateStore(a)}}),K(this,"destroyForm",function(n){if(n)r.updateStore({});else{var i=new ml;r.getFieldEntities(!0).forEach(function(o){r.isMergedPreserve(o.isPreserve())||i.set(o.getNamePath(),!0)}),r.prevWithoutPreserves=i}}),K(this,"getInitialValue",function(n){var i=Bo(r.initialValues,n);return n.length?Tl(i):i}),K(this,"setCallbacks",function(n){r.callbacks=n}),K(this,"setValidateMessages",function(n){r.validateMessages=n}),K(this,"setPreserve",function(n){r.preserve=n}),K(this,"watchList",[]),K(this,"registerWatch",function(n){return r.watchList.push(n),function(){r.watchList=r.watchList.filter(function(i){return i!==n})}}),K(this,"notifyWatch",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(r.watchList.length){var i=r.getFieldsValue(),o=r.getFieldsValue(!0);r.watchList.forEach(function(a){a(i,o,n)})}}),K(this,"timeoutId",null),K(this,"warningUnhooked",function(){}),K(this,"updateStore",function(n){r.store=n}),K(this,"getFieldEntities",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return n?r.fieldEntities.filter(function(i){return i.getNamePath().length}):r.fieldEntities}),K(this,"getFieldsMap",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new ml;return r.getFieldEntities(n).forEach(function(o){var a=o.getNamePath();i.set(a,o)}),i}),K(this,"getFieldEntitiesForNamePathList",function(n){if(!n)return r.getFieldEntities(!0);var i=r.getFieldsMap(!0);return n.map(function(o){var a=an(o);return i.get(a)||{INVALIDATE_NAME_PATH:an(o)}})}),K(this,"getFieldsValue",function(n,i){r.warningUnhooked();var o,a,c;if(n===!0||Array.isArray(n)?(o=n,a=i):n&&bt(n)==="object"&&(c=n.strict,a=n.filter),o===!0&&!a)return r.store;var u=r.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),d=[];return u.forEach(function(f){var p,g,v="INVALIDATE_NAME_PATH"in f?f.INVALIDATE_NAME_PATH:f.getNamePath();if(c){var b,S;if((b=(S=f).isList)!==null&&b!==void 0&&b.call(S))return}else if(!o&&(p=(g=f).isListField)!==null&&p!==void 0&&p.call(g))return;if(!a)d.push(v);else{var _="getMeta"in f?f.getMeta():null;a(_)&&d.push(v)}}),dC(r.store,d.map(an))}),K(this,"getFieldValue",function(n){r.warningUnhooked();var i=an(n);return Bo(r.store,i)}),K(this,"getFieldsError",function(n){r.warningUnhooked();var i=r.getFieldEntitiesForNamePathList(n);return i.map(function(o,a){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:an(n[a]),errors:[],warnings:[]}})}),K(this,"getFieldError",function(n){r.warningUnhooked();var i=an(n),o=r.getFieldsError([i])[0];return o.errors}),K(this,"getFieldWarning",function(n){r.warningUnhooked();var i=an(n),o=r.getFieldsError([i])[0];return o.warnings}),K(this,"isFieldsTouched",function(){r.warningUnhooked();for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=i[0],c=i[1],u,d=!1;i.length===0?u=null:i.length===1?Array.isArray(a)?(u=a.map(an),d=!1):(u=null,d=a):(u=a.map(an),d=c);var f=r.getFieldEntities(!0),p=function(_){return _.isFieldTouched()};if(!u)return d?f.every(function(S){return p(S)||S.isList()}):f.some(p);var g=new ml;u.forEach(function(S){g.set(S,[])}),f.forEach(function(S){var _=S.getNamePath();u.forEach(function(C){C.every(function(x,E){return _[E]===x})&&g.update(C,function(x){return[].concat(We(x),[S])})})});var v=function(_){return _.some(p)},b=g.map(function(S){var _=S.value;return _});return d?b.every(v):b.some(v)}),K(this,"isFieldTouched",function(n){return r.warningUnhooked(),r.isFieldsTouched([n])}),K(this,"isFieldsValidating",function(n){r.warningUnhooked();var i=r.getFieldEntities();if(!n)return i.some(function(a){return a.isFieldValidating()});var o=n.map(an);return i.some(function(a){var c=a.getNamePath();return Bl(o,c)&&a.isFieldValidating()})}),K(this,"isFieldValidating",function(n){return r.warningUnhooked(),r.isFieldsValidating([n])}),K(this,"resetWithFieldInitialValue",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=new ml,o=r.getFieldEntities(!0);o.forEach(function(u){var d=u.props.initialValue,f=u.getNamePath();if(d!==void 0){var p=i.get(f)||new Set;p.add({entity:u,value:d}),i.set(f,p)}});var a=function(d){d.forEach(function(f){var p=f.props.initialValue;if(p!==void 0){var g=f.getNamePath(),v=r.getInitialValue(g);if(v!==void 0)jn(!1,"Form already set 'initialValues' with path '".concat(g.join("."),"'. Field can not overwrite it."));else{var b=i.get(g);if(b&&b.size>1)jn(!1,"Multiple Field with path '".concat(g.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(b){var S=r.getFieldValue(g),_=f.isListField();!_&&(!n.skipExist||S===void 0)&&r.updateStore(_o(r.store,g,We(b)[0].value))}}}})},c;n.entities?c=n.entities:n.namePathList?(c=[],n.namePathList.forEach(function(u){var d=i.get(u);if(d){var f;(f=c).push.apply(f,We(We(d).map(function(p){return p.entity})))}})):c=o,a(c)}),K(this,"resetFields",function(n){r.warningUnhooked();var i=r.store;if(!n){r.updateStore(Tl(r.initialValues)),r.resetWithFieldInitialValue(),r.notifyObservers(i,null,{type:"reset"}),r.notifyWatch();return}var o=n.map(an);o.forEach(function(a){var c=r.getInitialValue(a);r.updateStore(_o(r.store,a,c))}),r.resetWithFieldInitialValue({namePathList:o}),r.notifyObservers(i,o,{type:"reset"}),r.notifyWatch(o)}),K(this,"setFields",function(n){r.warningUnhooked();var i=r.store,o=[];n.forEach(function(a){var c=a.name,u=Bt(a,zM),d=an(c);o.push(d),"value"in u&&r.updateStore(_o(r.store,d,u.value)),r.notifyObservers(i,[d],{type:"setField",data:a})}),r.notifyWatch(o)}),K(this,"getFields",function(){var n=r.getFieldEntities(!0),i=n.map(function(o){var a=o.getNamePath(),c=o.getMeta(),u=X(X({},c),{},{name:a,value:r.getFieldValue(a)});return Object.defineProperty(u,"originRCField",{value:!0}),u});return i}),K(this,"initEntityValue",function(n){var i=n.props.initialValue;if(i!==void 0){var o=n.getNamePath(),a=Bo(r.store,o);a===void 0&&r.updateStore(_o(r.store,o,i))}}),K(this,"isMergedPreserve",function(n){var i=n!==void 0?n:r.preserve;return i??!0}),K(this,"registerField",function(n){r.fieldEntities.push(n);var i=n.getNamePath();if(r.notifyWatch([i]),n.props.initialValue!==void 0){var o=r.store;r.resetWithFieldInitialValue({entities:[n],skipExist:!0}),r.notifyObservers(o,[n.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(a,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r.fieldEntities=r.fieldEntities.filter(function(p){return p!==n}),!r.isMergedPreserve(c)&&(!a||u.length>1)){var d=a?void 0:r.getInitialValue(i);if(i.length&&r.getFieldValue(i)!==d&&r.fieldEntities.every(function(p){return!r$(p.getNamePath(),i)})){var f=r.store;r.updateStore(_o(f,i,d,!0)),r.notifyObservers(f,[i],{type:"remove"}),r.triggerDependenciesUpdate(f,i)}}r.notifyWatch([i])}}),K(this,"dispatch",function(n){switch(n.type){case"updateValue":{var i=n.namePath,o=n.value;r.updateValue(i,o);break}case"validateField":{var a=n.namePath,c=n.triggerName;r.validateFields([a],{triggerName:c});break}}}),K(this,"notifyObservers",function(n,i,o){if(r.subscribable){var a=X(X({},o),{},{store:r.getFieldsValue(!0)});r.getFieldEntities().forEach(function(c){var u=c.onStoreChange;u(n,i,a)})}else r.forceRootUpdate()}),K(this,"triggerDependenciesUpdate",function(n,i){var o=r.getDependencyChildrenFields(i);return o.length&&r.validateFields(o),r.notifyObservers(n,o,{type:"dependenciesUpdate",relatedFields:[i].concat(We(o))}),o}),K(this,"updateValue",function(n,i){var o=an(n),a=r.store;r.updateStore(_o(r.store,o,i)),r.notifyObservers(a,[o],{type:"valueUpdate",source:"internal"}),r.notifyWatch([o]);var c=r.triggerDependenciesUpdate(a,o),u=r.callbacks.onValuesChange;if(u){var d=dC(r.store,[o]);u(d,r.getFieldsValue())}r.triggerOnFieldsChange([o].concat(We(c)))}),K(this,"setFieldsValue",function(n){r.warningUnhooked();var i=r.store;if(n){var o=Tl(r.store,n);r.updateStore(o)}r.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),r.notifyWatch()}),K(this,"setFieldValue",function(n,i){r.setFields([{name:n,value:i,errors:[],warnings:[]}])}),K(this,"getDependencyChildrenFields",function(n){var i=new Set,o=[],a=new ml;r.getFieldEntities().forEach(function(u){var d=u.props.dependencies;(d||[]).forEach(function(f){var p=an(f);a.update(p,function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return g.add(u),g})})});var c=function u(d){var f=a.get(d)||new Set;f.forEach(function(p){if(!i.has(p)){i.add(p);var g=p.getNamePath();p.isFieldDirty()&&g.length&&(o.push(g),u(g))}})};return c(n),o}),K(this,"triggerOnFieldsChange",function(n,i){var o=r.callbacks.onFieldsChange;if(o){var a=r.getFields();if(i){var c=new ml;i.forEach(function(d){var f=d.name,p=d.errors;c.set(f,p)}),a.forEach(function(d){d.errors=c.get(d.name)||d.errors})}var u=a.filter(function(d){var f=d.name;return Bl(n,f)});u.length&&o(u,a)}}),K(this,"validateFields",function(n,i){r.warningUnhooked();var o,a;Array.isArray(n)||typeof n=="string"||typeof i=="string"?(o=n,a=i):a=n;var c=!!o,u=c?o.map(an):[],d=[],f=String(Date.now()),p=new Set,g=a||{},v=g.recursive,b=g.dirty;r.getFieldEntities(!0).forEach(function(x){if(c||u.push(x.getNamePath()),!(!x.props.rules||!x.props.rules.length)&&!(b&&!x.isFieldDirty())){var E=x.getNamePath();if(p.add(E.join(f)),!c||Bl(u,E,v)){var k=x.validateRules(X({validateMessages:X(X({},t$),r.validateMessages)},a));d.push(k.then(function(){return{name:E,errors:[],warnings:[]}}).catch(function(P){var T,O=[],N=[];return(T=P.forEach)===null||T===void 0||T.call(P,function(I){var z=I.rule.warningOnly,D=I.errors;z?N.push.apply(N,We(D)):O.push.apply(O,We(D))}),O.length?Promise.reject({name:E,errors:O,warnings:N}):{name:E,errors:O,warnings:N}}))}}});var S=MM(d);r.lastValidatePromise=S,S.catch(function(x){return x}).then(function(x){var E=x.map(function(k){var P=k.name;return P});r.notifyObservers(r.store,E,{type:"validateFinish"}),r.triggerOnFieldsChange(E,x)});var _=S.then(function(){return r.lastValidatePromise===S?Promise.resolve(r.getFieldsValue(u)):Promise.reject([])}).catch(function(x){var E=x.filter(function(k){return k&&k.errors.length});return Promise.reject({values:r.getFieldsValue(u),errorFields:E,outOfDate:r.lastValidatePromise!==S})});_.catch(function(x){return x});var C=u.filter(function(x){return p.has(x.join(f))});return r.triggerOnFieldsChange(C),_}),K(this,"submit",function(){r.warningUnhooked(),r.validateFields().then(function(n){var i=r.callbacks.onFinish;if(i)try{i(n)}catch(o){console.error(o)}}).catch(function(n){var i=r.callbacks.onFinishFailed;i&&i(n)})}),this.forceRootUpdate=t});function o$(e){var t=h.useRef(),r=h.useState({}),n=se(r,2),i=n[1];if(!t.current)if(e)t.current=e;else{var o=function(){i({})},a=new jM(o);t.current=a.getForm()}return[t.current]}var qv=h.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),BM=function(t){var r=t.validateMessages,n=t.onFormChange,i=t.onFormFinish,o=t.children,a=h.useContext(qv),c=h.useRef({});return h.createElement(qv.Provider,{value:X(X({},a),{},{validateMessages:X(X({},a.validateMessages),r),triggerFormChange:function(d,f){n&&n(d,{changedFields:f,forms:c.current}),a.triggerFormChange(d,f)},triggerFormFinish:function(d,f){i&&i(d,{values:f,forms:c.current}),a.triggerFormFinish(d,f)},registerForm:function(d,f){d&&(c.current=X(X({},c.current),{},K({},d,f))),a.registerForm(d,f)},unregisterForm:function(d){var f=X({},c.current);delete f[d],c.current=f,a.unregisterForm(d)}})},o)},LM=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],DM=function(t,r){var n=t.name,i=t.initialValues,o=t.fields,a=t.form,c=t.preserve,u=t.children,d=t.component,f=d===void 0?"form":d,p=t.validateMessages,g=t.validateTrigger,v=g===void 0?"onChange":g,b=t.onValuesChange,S=t.onFieldsChange,_=t.onFinish,C=t.onFinishFailed,x=t.clearOnDestroy,E=Bt(t,LM),k=h.useRef(null),P=h.useContext(qv),T=o$(a),O=se(T,1),N=O[0],I=N.getInternalHooks(ba),z=I.useSubscribe,D=I.setInitialValues,M=I.setCallbacks,j=I.setValidateMessages,B=I.setPreserve,F=I.destroyForm;h.useImperativeHandle(r,function(){return X(X({},N),{},{nativeElement:k.current})}),h.useEffect(function(){return P.registerForm(n,N),function(){P.unregisterForm(n)}},[P,N,n]),j(X(X({},P.validateMessages),p)),M({onValuesChange:b,onFieldsChange:function(Z){if(P.triggerFormChange(n,Z),S){for(var te=arguments.length,ne=new Array(te>1?te-1:0),he=1;he<te;he++)ne[he-1]=arguments[he];S.apply(void 0,[Z].concat(ne))}},onFinish:function(Z){P.triggerFormFinish(n,Z),_&&_(Z)},onFinishFailed:C}),B(c);var W=h.useRef(null);D(i,!W.current),W.current||(W.current=!0),h.useEffect(function(){return function(){return F(x)}},[]);var V,L=typeof u=="function";if(L){var G=N.getFieldsValue(!0);V=u(G,N)}else V=u;z(!L);var q=h.useRef();h.useEffect(function(){PM(q.current||[],o||[])||N.setFields(o||[]),q.current=o},[o,N]);var A=h.useMemo(function(){return X(X({},N),{},{validateTrigger:v})},[N,v]),U=h.createElement(tf.Provider,{value:null},h.createElement(Gl.Provider,{value:A},V));return f===!1?U:h.createElement(f,Re({},E,{ref:k,onSubmit:function(Z){Z.preventDefault(),Z.stopPropagation(),N.submit()},onReset:function(Z){var te;Z.preventDefault(),N.resetFields(),(te=E.onReset)===null||te===void 0||te.call(E,Z)}}),U)};function fC(e){try{return JSON.stringify(e)}catch{return Math.random()}}function AM(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],i=t[1],o=i===void 0?{}:i,a=GN(o)?{form:o}:o,c=a.form,u=h.useState(),d=se(u,2),f=d[0],p=d[1],g=h.useMemo(function(){return fC(f)},[f]),v=h.useRef(g);v.current=g;var b=h.useContext(Gl),S=c||b,_=S&&S._init,C=an(n),x=h.useRef(C);return x.current=C,h.useEffect(function(){if(_){var E=S.getFieldsValue,k=S.getInternalHooks,P=k(ba),T=P.registerWatch,O=function(D,M){var j=a.preserve?M:D;return typeof n=="function"?n(j):Bo(j,x.current)},N=T(function(z,D){var M=O(z,D),j=fC(M);v.current!==j&&(v.current=j,p(M))}),I=O(E(),E(!0));return f!==I&&p(I),N}},[_]),f}var HM=h.forwardRef(DM),Fu=HM;Fu.FormProvider=BM;Fu.Field=n$;Fu.List=NM;Fu.useForm=o$;Fu.useWatch=AM;const Su=h.createContext({}),FM=({children:e,status:t,override:r})=>{const n=h.useContext(Su),i=h.useMemo(()=>{const o=Object.assign({},n);return r&&delete o.isFormItemInput,t&&(delete o.status,delete o.hasFeedback,delete o.feedbackIcon),o},[t,r,n]);return h.createElement(Su.Provider,{value:i},e)},WM=h.createContext(void 0),Wu=e=>{const{space:t,form:r,children:n}=e;if(n==null)return null;let i=n;return r&&(i=Q.createElement(FM,{override:!0,status:!0},i)),t&&(i=Q.createElement(XI,null,i)),i};var VM=function(t){if(ni()&&window.document.documentElement){var r=Array.isArray(t)?t:[t],n=window.document.documentElement;return r.some(function(i){return i in n.style})}return!1};function mC(e,t){return VM(e)}const UM=()=>ni()&&window.document.documentElement,qf=e=>{const{prefixCls:t,className:r,style:n,size:i,shape:o}=e,a=re({[`${t}-lg`]:i==="large",[`${t}-sm`]:i==="small"}),c=re({[`${t}-circle`]:o==="circle",[`${t}-square`]:o==="square",[`${t}-round`]:o==="round"}),u=h.useMemo(()=>typeof i=="number"?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return h.createElement("span",{className:re(t,a,c,r),style:Object.assign(Object.assign({},u),n)})},qM=new Xt("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),Kf=e=>({height:e,lineHeight:ee(e)}),Ll=e=>Object.assign({width:e},Kf(e)),KM=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:qM,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),bg=(e,t)=>Object.assign({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal()},Kf(e)),GM=e=>{const{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:n,controlHeightLG:i,controlHeightSM:o}=e;return{[t]:Object.assign({display:"inline-block",verticalAlign:"top",background:r},Ll(n)),[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:Object.assign({},Ll(i)),[`${t}${t}-sm`]:Object.assign({},Ll(o))}},XM=e=>{const{controlHeight:t,borderRadiusSM:r,skeletonInputCls:n,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:c}=e;return{[n]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:r},bg(t,c)),[`${n}-lg`]:Object.assign({},bg(i,c)),[`${n}-sm`]:Object.assign({},bg(o,c))}},pC=e=>Object.assign({width:e},Kf(e)),YM=e=>{const{skeletonImageCls:t,imageSizeBase:r,gradientFromColor:n,borderRadiusSM:i,calc:o}=e;return{[t]:Object.assign(Object.assign({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:n,borderRadius:i},pC(o(r).mul(2).equal())),{[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:Object.assign(Object.assign({},pC(r)),{maxWidth:o(r).mul(4).equal(),maxHeight:o(r).mul(4).equal()}),[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}}),[`${t}${t}-circle`]:{borderRadius:"50%"}}},_g=(e,t,r)=>{const{skeletonButtonCls:n}=e;return{[`${r}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${n}-round`]:{borderRadius:t}}},Sg=(e,t)=>Object.assign({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal()},Kf(e)),JM=e=>{const{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:n,controlHeightLG:i,controlHeightSM:o,gradientFromColor:a,calc:c}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:a,borderRadius:t,width:c(n).mul(2).equal(),minWidth:c(n).mul(2).equal()},Sg(n,c))},_g(e,n,r)),{[`${r}-lg`]:Object.assign({},Sg(i,c))}),_g(e,i,`${r}-lg`)),{[`${r}-sm`]:Object.assign({},Sg(o,c))}),_g(e,o,`${r}-sm`))},QM=e=>{const{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:n,skeletonParagraphCls:i,skeletonButtonCls:o,skeletonInputCls:a,skeletonImageCls:c,controlHeight:u,controlHeightLG:d,controlHeightSM:f,gradientFromColor:p,padding:g,marginSM:v,borderRadius:b,titleHeight:S,blockRadius:_,paragraphLiHeight:C,controlHeightXS:x,paragraphMarginTop:E}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:g,verticalAlign:"top",[r]:Object.assign({display:"inline-block",verticalAlign:"top",background:p},Ll(u)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:Object.assign({},Ll(d)),[`${r}-sm`]:Object.assign({},Ll(f))},[`${t}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[n]:{width:"100%",height:S,background:p,borderRadius:_,[`+ ${i}`]:{marginBlockStart:f}},[i]:{padding:0,"> li":{width:"100%",height:C,listStyle:"none",background:p,borderRadius:_,"+ li":{marginBlockStart:x}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-content`]:{[`${n}, ${i} > li`]:{borderRadius:b}}},[`${t}-with-avatar ${t}-content`]:{[n]:{marginBlockStart:v,[`+ ${i}`]:{marginBlockStart:E}}},[`${t}${t}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},JM(e)),GM(e)),XM(e)),YM(e)),[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[a]:{width:"100%"}},[`${t}${t}-active`]:{[`
212
+ ${n},
213
+ ${i} > li,
214
+ ${r},
215
+ ${o},
216
+ ${a},
217
+ ${c}
218
+ `]:Object.assign({},KM(e))}}},ZM=e=>{const{colorFillContent:t,colorFill:r}=e,n=t,i=r;return{color:n,colorGradientEnd:i,gradientFromColor:n,gradientToColor:i,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},tc=gr("Skeleton",e=>{const{componentCls:t,calc:r}=e,n=er(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonImageCls:`${t}-image`,imageSizeBase:r(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return QM(n)},ZM,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),e8=e=>{const{prefixCls:t,className:r,rootClassName:n,active:i,shape:o="circle",size:a="default"}=e,{getPrefixCls:c}=h.useContext(Pt),u=c("skeleton",t),[d,f,p]=tc(u),g=un(e,["prefixCls","className"]),v=re(u,`${u}-element`,{[`${u}-active`]:i},r,n,f,p);return d(h.createElement("div",{className:v},h.createElement(qf,Object.assign({prefixCls:`${u}-avatar`,shape:o,size:a},g))))},t8=e=>{const{prefixCls:t,className:r,rootClassName:n,active:i,block:o=!1,size:a="default"}=e,{getPrefixCls:c}=h.useContext(Pt),u=c("skeleton",t),[d,f,p]=tc(u),g=un(e,["prefixCls"]),v=re(u,`${u}-element`,{[`${u}-active`]:i,[`${u}-block`]:o},r,n,f,p);return d(h.createElement("div",{className:v},h.createElement(qf,Object.assign({prefixCls:`${u}-button`,size:a},g))))},r8="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",n8=e=>{const{prefixCls:t,className:r,rootClassName:n,style:i,active:o}=e,{getPrefixCls:a}=h.useContext(Pt),c=a("skeleton",t),[u,d,f]=tc(c),p=re(c,`${c}-element`,{[`${c}-active`]:o},r,n,d,f);return u(h.createElement("div",{className:p},h.createElement("div",{className:re(`${c}-image`,r),style:i},h.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${c}-image-svg`},h.createElement("title",null,"Image placeholder"),h.createElement("path",{d:r8,className:`${c}-image-path`})))))},i8=e=>{const{prefixCls:t,className:r,rootClassName:n,active:i,block:o,size:a="default"}=e,{getPrefixCls:c}=h.useContext(Pt),u=c("skeleton",t),[d,f,p]=tc(u),g=un(e,["prefixCls"]),v=re(u,`${u}-element`,{[`${u}-active`]:i,[`${u}-block`]:o},r,n,f,p);return d(h.createElement("div",{className:v},h.createElement(qf,Object.assign({prefixCls:`${u}-input`,size:a},g))))},o8=e=>{const{prefixCls:t,className:r,rootClassName:n,style:i,active:o,children:a}=e,{getPrefixCls:c}=h.useContext(Pt),u=c("skeleton",t),[d,f,p]=tc(u),g=re(u,`${u}-element`,{[`${u}-active`]:o},f,r,n,p);return d(h.createElement("div",{className:g},h.createElement("div",{className:re(`${u}-image`,r),style:i},a)))},s8=(e,t)=>{const{width:r,rows:n=2}=t;if(Array.isArray(r))return r[e];if(n-1===e)return r},a8=e=>{const{prefixCls:t,className:r,style:n,rows:i=0}=e,o=Array.from({length:i}).map((a,c)=>h.createElement("li",{key:c,style:{width:s8(c,e)}}));return h.createElement("ul",{className:re(t,r),style:n},o)},l8=({prefixCls:e,className:t,width:r,style:n})=>h.createElement("h3",{className:re(e,t),style:Object.assign({width:r},n)});function Cg(e){return e&&typeof e=="object"?e:{}}function c8(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function u8(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function d8(e,t){const r={};return(!e||!t)&&(r.width="61%"),!e&&t?r.rows=3:r.rows=2,r}const ja=e=>{const{prefixCls:t,loading:r,className:n,rootClassName:i,style:o,children:a,avatar:c=!1,title:u=!0,paragraph:d=!0,active:f,round:p}=e,{getPrefixCls:g,direction:v,className:b,style:S}=Un("skeleton"),_=g("skeleton",t),[C,x,E]=tc(_);if(r||!("loading"in e)){const k=!!c,P=!!u,T=!!d;let O;if(k){const z=Object.assign(Object.assign({prefixCls:`${_}-avatar`},c8(P,T)),Cg(c));O=h.createElement("div",{className:`${_}-header`},h.createElement(qf,Object.assign({},z)))}let N;if(P||T){let z;if(P){const M=Object.assign(Object.assign({prefixCls:`${_}-title`},u8(k,T)),Cg(u));z=h.createElement(l8,Object.assign({},M))}let D;if(T){const M=Object.assign(Object.assign({prefixCls:`${_}-paragraph`},d8(k,P)),Cg(d));D=h.createElement(a8,Object.assign({},M))}N=h.createElement("div",{className:`${_}-content`},z,D)}const I=re(_,{[`${_}-with-avatar`]:k,[`${_}-active`]:f,[`${_}-rtl`]:v==="rtl",[`${_}-round`]:p},b,n,i,x,E);return C(h.createElement("div",{className:I,style:Object.assign(Object.assign({},S),o)},O,N))}return a??null};ja.Button=t8;ja.Avatar=e8;ja.Input=i8;ja.Image=n8;ja.Node=o8;function gC(){}const h8=h.createContext({add:gC,remove:gC});function s$(e){const t=h.useContext(h8),r=h.useRef(null);return Jr(i=>{if(i){const o=e?i.querySelector(e):i;o&&(t.add(o),r.current=o)}else t.remove(r.current)})}const vC=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:r}=h.useContext(Au);return Q.createElement(cn,Object.assign({onClick:r},e),t)},yC=()=>{const{confirmLoading:e,okButtonProps:t,okType:r,okTextLocale:n,onOk:i}=h.useContext(Au);return Q.createElement(cn,Object.assign({},DE(r),{loading:e,onClick:i},t),n)};function a$(e,t){return Q.createElement("span",{className:`${e}-close-x`},t||Q.createElement(Ys,{className:`${e}-close-icon`}))}const l$=e=>{const{okText:t,okType:r="primary",cancelText:n,confirmLoading:i,onOk:o,onCancel:a,okButtonProps:c,cancelButtonProps:u,footer:d}=e,[f]=fs("Modal",F2()),p=t||(f==null?void 0:f.okText),g=n||(f==null?void 0:f.cancelText),v=Q.useMemo(()=>({confirmLoading:i,okButtonProps:c,cancelButtonProps:u,okTextLocale:p,cancelTextLocale:g,okType:r,onOk:o,onCancel:a}),[i,c,u,p,g,r,o,a]);let b;return typeof d=="function"||typeof d>"u"?(b=Q.createElement(Q.Fragment,null,Q.createElement(vC,null),Q.createElement(yC,null)),typeof d=="function"&&(b=d(b,{OkBtn:yC,CancelBtn:vC})),b=Q.createElement(GE,{value:v},b)):b=d,Q.createElement(X2,{disabled:!1},b)},f8=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},m8=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},p8=(e,t)=>{const{prefixCls:r,componentCls:n,gridColumns:i}=e,o={};for(let a=i;a>=0;a--)a===0?(o[`${n}${t}-${a}`]={display:"none"},o[`${n}-push-${a}`]={insetInlineStart:"auto"},o[`${n}-pull-${a}`]={insetInlineEnd:"auto"},o[`${n}${t}-push-${a}`]={insetInlineStart:"auto"},o[`${n}${t}-pull-${a}`]={insetInlineEnd:"auto"},o[`${n}${t}-offset-${a}`]={marginInlineStart:0},o[`${n}${t}-order-${a}`]={order:0}):(o[`${n}${t}-${a}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${a/i*100}%`,maxWidth:`${a/i*100}%`}],o[`${n}${t}-push-${a}`]={insetInlineStart:`${a/i*100}%`},o[`${n}${t}-pull-${a}`]={insetInlineEnd:`${a/i*100}%`},o[`${n}${t}-offset-${a}`]={marginInlineStart:`${a/i*100}%`},o[`${n}${t}-order-${a}`]={order:a});return o[`${n}${t}-flex`]={flex:`var(--${r}${t}-flex)`},o},Kv=(e,t)=>p8(e,t),g8=(e,t,r)=>({[`@media (min-width: ${ee(t)})`]:Object.assign({},Kv(e,r))}),v8=()=>({}),y8=()=>({}),b8=gr("Grid",f8,v8),c$=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin}),_8=gr("Grid",e=>{const t=er(e,{gridColumns:24}),r=c$(t);return delete r.xs,[m8(t),Kv(t,""),Kv(t,"-xs"),Object.keys(r).map(n=>g8(t,r[n],`-${n}`)).reduce((n,i)=>Object.assign(Object.assign({},n),i),{})]},y8);function bC(e){return{position:e,inset:0}}const S8=e=>{const{componentCls:t,antCls:r}=e;return[{[`${t}-root`]:{[`${t}${r}-zoom-enter, ${t}${r}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${r}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:Object.assign(Object.assign({},bC("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:Object.assign(Object.assign({},bC("fixed")),{zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:x6(e)}]},C8=e=>{const{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${ee(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},Fr(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${ee(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:Object.assign({position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:ee(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive}},lo(e)),[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${ee(e.borderRadiusLG)} ${ee(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${ee(e.margin)} auto`}},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content,
219
+ ${t}-body,
220
+ ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},w8=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},x8=e=>{const{componentCls:t}=e,r=c$(e),n=Object.assign({},r);delete n.xs;const i=`--${t.replace(".","")}-`,o=Object.keys(n).map(a=>({[`@media (min-width: ${ee(n[a])})`]:{width:`var(${i}${a}-width)`}}));return{[`${t}-root`]:{[t]:[].concat(We(Object.keys(r).map((a,c)=>{const u=Object.keys(r)[c-1];return u?{[`${i}${a}-width`]:`var(${i}${u}-width)`}:null})),[{width:`var(${i}xs-width)`}],We(o))}}},u$=e=>{const t=e.padding,r=e.fontSizeHeading5,n=e.lineHeightHeading5;return er(e,{modalHeaderHeight:e.calc(e.calc(n).mul(r).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},d$=e=>({footerBg:"transparent",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${ee(e.paddingMD)} ${ee(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${ee(e.padding)} ${ee(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${ee(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${ee(e.paddingXS)} ${ee(e.padding)}`:0,footerBorderTop:e.wireframe?`${ee(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${ee(e.borderRadiusLG)} ${ee(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${ee(e.padding*2)} ${ee(e.padding*2)} ${ee(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),h$=gr("Modal",e=>{const t=u$(e);return[C8(t),w8(t),S8(t),Du(t,"zoom"),x8(t)]},d$,{unitless:{titleLineHeight:!0}});var E8=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let Gv;const $8=e=>{Gv={x:e.pageX,y:e.pageY},setTimeout(()=>{Gv=null},100)};UM()&&document.documentElement.addEventListener("click",$8,!0);const f$=e=>{const{prefixCls:t,className:r,rootClassName:n,open:i,wrapClassName:o,centered:a,getContainer:c,focusTriggerAfterClose:u=!0,style:d,visible:f,width:p=520,footer:g,classNames:v,styles:b,children:S,loading:_,confirmLoading:C,zIndex:x,mousePosition:E,onOk:k,onCancel:P,destroyOnHidden:T,destroyOnClose:O,panelRef:N=null,modalRender:I}=e,z=E8(e,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","focusTriggerAfterClose","style","visible","width","footer","classNames","styles","children","loading","confirmLoading","zIndex","mousePosition","onOk","onCancel","destroyOnHidden","destroyOnClose","panelRef","modalRender"]),{getPopupContainer:D,getPrefixCls:M,direction:j,modal:B}=h.useContext(Pt),F=Ce=>{C||P==null||P(Ce)},W=Ce=>{k==null||k(Ce)},V=M("modal",t),L=M(),G=ko(V),[q,A,U]=h$(V,G),Y=re(o,{[`${V}-centered`]:a??(B==null?void 0:B.centered),[`${V}-wrap-rtl`]:j==="rtl"}),Z=g!==null&&!_?h.createElement(l$,Object.assign({},e,{onOk:W,onCancel:F})):null,[te,ne,he,me]=hy(Kl(e),Kl(B),{closable:!0,closeIcon:h.createElement(Ys,{className:`${V}-close-icon`}),closeIconRender:Ce=>a$(V,Ce)}),ue=I?Ce=>h.createElement("div",{className:`${V}-render`},I(Ce)):void 0,Se=`.${V}-${I?"render":"content"}`,ae=s$(Se),le=co(N,ae),[ce,ye]=ec("Modal",x),[fe,de]=h.useMemo(()=>p&&typeof p=="object"?[void 0,p]:[p,void 0],[p]),be=h.useMemo(()=>{const Ce={};return de&&Object.keys(de).forEach(Te=>{const ze=de[Te];ze!==void 0&&(Ce[`--${V}-${Te}-width`]=typeof ze=="number"?`${ze}px`:ze)}),Ce},[V,de]);return q(h.createElement(Wu,{form:!0,space:!0},h.createElement(ju.Provider,{value:ye},h.createElement(ZE,Object.assign({width:fe},z,{zIndex:ce,getContainer:c===void 0?D:c,prefixCls:V,rootClassName:re(A,n,U,G),footer:Z,visible:i??f,mousePosition:E??Gv,onClose:F,closable:te&&Object.assign({disabled:he,closeIcon:ne},me),closeIcon:ne,focusTriggerAfterClose:u,transitionName:Fo(L,"zoom",e.transitionName),maskTransitionName:Fo(L,"fade",e.maskTransitionName),className:re(A,r,B==null?void 0:B.className),style:Object.assign(Object.assign(Object.assign({},B==null?void 0:B.style),d),be),classNames:Object.assign(Object.assign(Object.assign({},B==null?void 0:B.classNames),v),{wrapper:re(Y,v==null?void 0:v.wrapper)}),styles:Object.assign(Object.assign({},B==null?void 0:B.styles),b),panelRef:le,destroyOnClose:T??O,modalRender:ue}),_?h.createElement(ja,{active:!0,title:!1,paragraph:{rows:4},className:`${V}-body-skeleton`}):S))))},k8=e=>{const{componentCls:t,titleFontSize:r,titleLineHeight:n,modalConfirmIconSize:i,fontSize:o,lineHeight:a,modalTitleHeight:c,fontHeight:u,confirmBodyPadding:d}=e,f=`${t}-confirm`;return{[f]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${f}-body-wrapper`]:Object.assign({},Xh()),[`&${t} ${t}-body`]:{padding:d},[`${f}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:i,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(u).sub(i).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(c).sub(i).equal()).div(2).equal()}},[`${f}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${ee(e.marginSM)})`},[`${e.iconCls} + ${f}-paragraph`]:{maxWidth:`calc(100% - ${ee(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${f}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:r,lineHeight:n},[`${f}-content`]:{color:e.colorText,fontSize:o,lineHeight:a},[`${f}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${f}-error ${f}-body > ${e.iconCls}`]:{color:e.colorError},[`${f}-warning ${f}-body > ${e.iconCls},
221
+ ${f}-confirm ${f}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${f}-info ${f}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${f}-success ${f}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},R8=Mu(["Modal","confirm"],e=>{const t=u$(e);return k8(t)},d$,{order:-1e3});var T8=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const m$=e=>{const{prefixCls:t,icon:r,okText:n,cancelText:i,confirmPrefixCls:o,type:a,okCancel:c,footer:u,locale:d}=e,f=T8(e,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale"]);let p=r;if(!r&&r!==null)switch(a){case"info":p=h.createElement(xE,null);break;case"success":p=h.createElement(CE,null);break;case"error":p=h.createElement(If,null);break;default:p=h.createElement(wE,null)}const g=c??a==="confirm",v=e.autoFocusButton===null?!1:e.autoFocusButton||"ok",[b]=fs("Modal"),S=d||b,_=n||(g?S==null?void 0:S.okText:S==null?void 0:S.justOkText),C=i||(S==null?void 0:S.cancelText),x=h.useMemo(()=>Object.assign({autoFocusButton:v,cancelTextLocale:C,okTextLocale:_,mergedOkCancel:g},f),[v,C,_,g,f]),E=h.createElement(h.Fragment,null,h.createElement(Y1,null),h.createElement(J1,null)),k=e.title!==void 0&&e.title!==null,P=`${o}-body`;return h.createElement("div",{className:`${o}-body-wrapper`},h.createElement("div",{className:re(P,{[`${P}-has-title`]:k})},p,h.createElement("div",{className:`${o}-paragraph`},k&&h.createElement("span",{className:`${o}-title`},e.title),h.createElement("div",{className:`${o}-content`},e.content))),u===void 0||typeof u=="function"?h.createElement(GE,{value:x},h.createElement("div",{className:`${o}-btns`},typeof u=="function"?u(E,{OkBtn:J1,CancelBtn:Y1}):E)):u,h.createElement(R8,{prefixCls:t}))},P8=e=>{const{close:t,zIndex:r,maskStyle:n,direction:i,prefixCls:o,wrapClassName:a,rootPrefixCls:c,bodyStyle:u,closable:d=!1,onConfirm:f,styles:p,title:g}=e,v=`${o}-confirm`,b=e.width||416,S=e.style||{},_=e.mask===void 0?!0:e.mask,C=e.maskClosable===void 0?!1:e.maskClosable,x=re(v,`${v}-${e.type}`,{[`${v}-rtl`]:i==="rtl"},e.className),[,E]=fi(),k=h.useMemo(()=>r!==void 0?r:E.zIndexPopupBase+TE,[r,E]);return h.createElement(f$,Object.assign({},e,{className:x,wrapClassName:re({[`${v}-centered`]:!!e.centered},a),onCancel:()=>{t==null||t({triggerCancel:!0}),f==null||f(!1)},title:g,footer:null,transitionName:Fo(c||"","zoom",e.transitionName),maskTransitionName:Fo(c||"","fade",e.maskTransitionName),mask:_,maskClosable:C,style:S,styles:Object.assign({body:u,mask:n},p),width:b,zIndex:k,closable:d}),h.createElement(m$,Object.assign({},e,{confirmPrefixCls:v})))},p$=e=>{const{rootPrefixCls:t,iconPrefixCls:r,direction:n,theme:i}=e;return h.createElement(Ko,{prefixCls:t,iconPrefixCls:r,direction:n,theme:i},h.createElement(P8,Object.assign({},e)))},_a=[];let g$="";function v$(){return g$}const O8=e=>{var t,r;const{prefixCls:n,getContainer:i,direction:o}=e,a=F2(),c=h.useContext(Pt),u=v$()||c.getPrefixCls(),d=n||`${u}-modal`;let f=i;return f===!1&&(f=void 0),Q.createElement(p$,Object.assign({},e,{rootPrefixCls:u,prefixCls:d,iconPrefixCls:c.iconPrefixCls,theme:c.theme,direction:o??c.direction,locale:(r=(t=c.locale)===null||t===void 0?void 0:t.Modal)!==null&&r!==void 0?r:a,getContainer:f}))};function Vu(e){const t=vE(),r=document.createDocumentFragment();let n=Object.assign(Object.assign({},e),{close:u,open:!0}),i,o;function a(...f){var p;if(f.some(b=>b==null?void 0:b.triggerCancel)){var v;(p=e.onCancel)===null||p===void 0||(v=p).call.apply(v,[e,()=>{}].concat(We(f.slice(1))))}for(let b=0;b<_a.length;b++)if(_a[b]===u){_a.splice(b,1);break}o()}const c=f=>{clearTimeout(i),i=setTimeout(()=>{const p=t.getPrefixCls(void 0,v$()),g=t.getIconPrefixCls(),v=t.getTheme(),b=Q.createElement(O8,Object.assign({},f));o=py()(Q.createElement(Ko,{prefixCls:p,iconPrefixCls:g,theme:v},typeof t.holderRender=="function"?t.holderRender(b):b),r)})};function u(...f){n=Object.assign(Object.assign({},n),{open:!1,afterClose:()=>{typeof e.afterClose=="function"&&e.afterClose(),a.apply(this,f)}}),n.visible&&delete n.visible,c(n)}function d(f){typeof f=="function"?n=f(n):n=Object.assign(Object.assign({},n),f),c(n)}return c(n),_a.push(u),{destroy:u,update:d}}function y$(e){return Object.assign(Object.assign({},e),{type:"warning"})}function b$(e){return Object.assign(Object.assign({},e),{type:"info"})}function _$(e){return Object.assign(Object.assign({},e),{type:"success"})}function S$(e){return Object.assign(Object.assign({},e),{type:"error"})}function C$(e){return Object.assign(Object.assign({},e),{type:"confirm"})}function I8({rootPrefixCls:e}){g$=e}var N8=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const M8=(e,t)=>{var r,{afterClose:n,config:i}=e,o=N8(e,["afterClose","config"]);const[a,c]=h.useState(!0),[u,d]=h.useState(i),{direction:f,getPrefixCls:p}=h.useContext(Pt),g=p("modal"),v=p(),b=()=>{var x;n(),(x=u.afterClose)===null||x===void 0||x.call(u)},S=(...x)=>{var E;if(c(!1),x.some(T=>T==null?void 0:T.triggerCancel)){var P;(E=u.onCancel)===null||E===void 0||(P=E).call.apply(P,[u,()=>{}].concat(We(x.slice(1))))}};h.useImperativeHandle(t,()=>({destroy:S,update:x=>{d(E=>{const k=typeof x=="function"?x(E):x;return Object.assign(Object.assign({},E),k)})}}));const _=(r=u.okCancel)!==null&&r!==void 0?r:u.type==="confirm",[C]=fs("Modal",Ks.Modal);return h.createElement(p$,Object.assign({prefixCls:g,rootPrefixCls:v},u,{close:S,open:a,afterClose:b,okText:u.okText||(_?C==null?void 0:C.okText:C==null?void 0:C.justOkText),direction:u.direction||f,cancelText:u.cancelText||(C==null?void 0:C.cancelText)},o))},z8=h.forwardRef(M8);let _C=0;const j8=h.memo(h.forwardRef((e,t)=>{const[r,n]=cI();return h.useImperativeHandle(t,()=>({patchElement:n}),[n]),h.createElement(h.Fragment,null,r)}));function B8(){const e=h.useRef(null),[t,r]=h.useState([]);h.useEffect(()=>{t.length&&(We(t).forEach(a=>{a()}),r([]))},[t]);const n=h.useCallback(o=>function(c){var u;_C+=1;const d=h.createRef();let f;const p=new Promise(_=>{f=_});let g=!1,v;const b=h.createElement(z8,{key:`modal-${_C}`,config:o(c),ref:d,afterClose:()=>{v==null||v()},isSilent:()=>g,onConfirm:_=>{f(_)}});return v=(u=e.current)===null||u===void 0?void 0:u.patchElement(b),v&&_a.push(v),{destroy:()=>{function _(){var C;(C=d.current)===null||C===void 0||C.destroy()}d.current?_():r(C=>[].concat(We(C),[_]))},update:_=>{function C(){var x;(x=d.current)===null||x===void 0||x.update(_)}d.current?C():r(x=>[].concat(We(x),[C]))},then:_=>(g=!0,p.then(_))}},[]);return[h.useMemo(()=>({info:n(b$),success:n(_$),error:n(S$),warning:n(y$),confirm:n(C$)}),[n]),h.createElement(j8,{key:"modal-holder",ref:e})]}const L8=Q.createContext({});function w$(e){return t=>h.createElement(Ko,{theme:{token:{motion:!1,zIndexPopupBase:0}}},h.createElement(e,Object.assign({},t)))}const x$=(e,t,r,n,i)=>w$(a=>{const{prefixCls:c,style:u}=a,d=h.useRef(null),[f,p]=h.useState(0),[g,v]=h.useState(0),[b,S]=Qr(!1,{value:a.open}),{getPrefixCls:_}=h.useContext(Pt),C=_(n||"select",c);h.useEffect(()=>{if(S(!0),typeof ResizeObserver<"u"){const k=new ResizeObserver(T=>{const O=T[0].target;p(O.offsetHeight+8),v(O.offsetWidth)}),P=setInterval(()=>{var T;const O=i?`.${i(C)}`:`.${C}-dropdown`,N=(T=d.current)===null||T===void 0?void 0:T.querySelector(O);N&&(clearInterval(P),k.observe(N))},10);return()=>{clearInterval(P),k.disconnect()}}},[C]);let x=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},u),{margin:0}),open:b,visible:b,getPopupContainer:()=>d.current});t&&Object.assign(x,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});const E={paddingBottom:f,position:"relative",minWidth:g};return h.createElement("div",{ref:d,style:E},h.createElement(e,Object.assign({},x)))}),Ey=(function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e==null?void 0:e.substr(0,4))});var Gf=function(t){var r=t.className,n=t.customizeIcon,i=t.customizeIconProps,o=t.children,a=t.onMouseDown,c=t.onClick,u=typeof n=="function"?n(i):n;return h.createElement("span",{className:r,onMouseDown:function(f){f.preventDefault(),a==null||a(f)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:c,"aria-hidden":!0},u!==void 0?u:h.createElement("span",{className:re(r.split(/\s+/).map(function(d){return"".concat(d,"-icon")}))},o))},D8=function(t,r,n,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,c=arguments.length>6?arguments[6]:void 0,u=arguments.length>7?arguments[7]:void 0,d=Q.useMemo(function(){if(bt(i)==="object")return i.clearIcon;if(o)return o},[i,o]),f=Q.useMemo(function(){return!!(!a&&i&&(n.length||c)&&!(u==="combobox"&&c===""))},[i,a,n.length,c,u]);return{allowClear:f,clearIcon:Q.createElement(Gf,{className:"".concat(t,"-clear"),onMouseDown:r,customizeIcon:d},"×")}},E$=h.createContext(null);function A8(){return h.useContext(E$)}function H8(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=h.useState(!1),r=se(t,2),n=r[0],i=r[1],o=h.useRef(null),a=function(){window.clearTimeout(o.current)};h.useEffect(function(){return a},[]);var c=function(d,f){a(),o.current=window.setTimeout(function(){i(d),f&&f()},e)};return[n,c,a]}function $$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=h.useRef(null),r=h.useRef(null);h.useEffect(function(){return function(){window.clearTimeout(r.current)}},[]);function n(i){(i||t.current===null)&&(t.current=i),window.clearTimeout(r.current),r.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},n]}function F8(e,t,r,n){var i=h.useRef(null);i.current={open:t,triggerOpen:r,customizedTrigger:n},h.useEffect(function(){function o(a){var c;if(!((c=i.current)!==null&&c!==void 0&&c.customizedTrigger)){var u=a.target;u.shadowRoot&&a.composed&&(u=a.composedPath()[0]||u),i.current.open&&e().filter(function(d){return d}).every(function(d){return!d.contains(u)&&d!==u})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",o),function(){return window.removeEventListener("mousedown",o)}},[])}function W8(e){return e&&![Ge.ESC,Ge.SHIFT,Ge.BACKSPACE,Ge.TAB,Ge.WIN_KEY,Ge.ALT,Ge.META,Ge.WIN_KEY_RIGHT,Ge.CTRL,Ge.SEMICOLON,Ge.EQUALS,Ge.CAPS_LOCK,Ge.CONTEXT_MENU,Ge.F1,Ge.F2,Ge.F3,Ge.F4,Ge.F5,Ge.F6,Ge.F7,Ge.F8,Ge.F9,Ge.F10,Ge.F11,Ge.F12].includes(e)}var V8=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],pl=void 0;function U8(e,t){var r=e.prefixCls,n=e.invalidate,i=e.item,o=e.renderItem,a=e.responsive,c=e.responsiveDisabled,u=e.registerSize,d=e.itemKey,f=e.className,p=e.style,g=e.children,v=e.display,b=e.order,S=e.component,_=S===void 0?"div":S,C=Bt(e,V8),x=a&&!v;function E(N){u(d,N)}h.useEffect(function(){return function(){E(null)}},[]);var k=o&&i!==pl?o(i,{index:b}):g,P;n||(P={opacity:x?0:1,height:x?0:pl,overflowY:x?"hidden":pl,order:a?b:pl,pointerEvents:x?"none":pl,position:x?"absolute":pl});var T={};x&&(T["aria-hidden"]=!0);var O=h.createElement(_,Re({className:re(!n&&r,f),style:X(X({},P),p)},T,C,{ref:t}),k);return a&&(O=h.createElement(oo,{onResize:function(I){var z=I.offsetWidth;E(z)},disabled:c},O)),O}var Il=h.forwardRef(U8);Il.displayName="Item";function q8(e){if(typeof MessageChannel>"u")$r(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function K8(){var e=h.useRef(null),t=function(n){e.current||(e.current=[],q8(function(){qs.unstable_batchedUpdates(function(){e.current.forEach(function(i){i()}),e.current=null})})),e.current.push(n)};return t}function gl(e,t){var r=h.useState(t),n=se(r,2),i=n[0],o=n[1],a=Jr(function(c){e(function(){o(c)})});return[i,a]}var rf=Q.createContext(null),G8=["component"],X8=["className"],Y8=["className"],J8=function(t,r){var n=h.useContext(rf);if(!n){var i=t.component,o=i===void 0?"div":i,a=Bt(t,G8);return h.createElement(o,Re({},a,{ref:r}))}var c=n.className,u=Bt(n,X8),d=t.className,f=Bt(t,Y8);return h.createElement(rf.Provider,{value:null},h.createElement(Il,Re({ref:r,className:re(c,d)},u,f)))},k$=h.forwardRef(J8);k$.displayName="RawItem";var Q8=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"],R$="responsive",T$="invalidate";function Z8(e){return"+ ".concat(e.length," ...")}function ez(e,t){var r=e.prefixCls,n=r===void 0?"rc-overflow":r,i=e.data,o=i===void 0?[]:i,a=e.renderItem,c=e.renderRawItem,u=e.itemKey,d=e.itemWidth,f=d===void 0?10:d,p=e.ssr,g=e.style,v=e.className,b=e.maxCount,S=e.renderRest,_=e.renderRawRest,C=e.prefix,x=e.suffix,E=e.component,k=E===void 0?"div":E,P=e.itemComponent,T=e.onVisibleChange,O=Bt(e,Q8),N=p==="full",I=K8(),z=gl(I,null),D=se(z,2),M=D[0],j=D[1],B=M||0,F=gl(I,new Map),W=se(F,2),V=W[0],L=W[1],G=gl(I,0),q=se(G,2),A=q[0],U=q[1],Y=gl(I,0),Z=se(Y,2),te=Z[0],ne=Z[1],he=gl(I,0),me=se(he,2),ue=me[0],Se=me[1],ae=gl(I,0),le=se(ae,2),ce=le[0],ye=le[1],fe=h.useState(null),de=se(fe,2),be=de[0],Ce=de[1],Te=h.useState(null),ze=se(Te,2),Ee=ze[0],$e=ze[1],je=h.useMemo(function(){return Ee===null&&N?Number.MAX_SAFE_INTEGER:Ee||0},[Ee,M]),Oe=h.useState(!1),Qe=se(Oe,2),st=Qe[0],Et=Qe[1],mt="".concat(n,"-item"),Je=Math.max(A,te),ht=b===R$,Xe=o.length&&ht,vt=b===T$,tt=Xe||typeof b=="number"&&o.length>b,Le=h.useMemo(function(){var ke=o;return Xe?M===null&&N?ke=o:ke=o.slice(0,Math.min(o.length,B/f)):typeof b=="number"&&(ke=o.slice(0,b)),ke},[o,f,M,b,Xe]),nt=h.useMemo(function(){return Xe?o.slice(je+1):o.slice(Le.length)},[o,Le,Xe,je]),Me=h.useCallback(function(ke,xe){var De;return typeof u=="function"?u(ke):(De=u&&(ke==null?void 0:ke[u]))!==null&&De!==void 0?De:xe},[u]),qe=h.useCallback(a||function(ke){return ke},[a]);function Ot(ke,xe,De){Ee===ke&&(xe===void 0||xe===be)||($e(ke),De||(Et(ke<o.length-1),T==null||T(ke)),xe!==void 0&&Ce(xe))}function _t(ke,xe){j(xe.clientWidth)}function tr(ke,xe){L(function(De){var et=new Map(De);return xe===null?et.delete(ke):et.set(ke,xe),et})}function Yt(ke,xe){ne(xe),U(te)}function vr(ke,xe){Se(xe)}function Tr(ke,xe){ye(xe)}function nr(ke){return V.get(Me(Le[ke],ke))}ur(function(){if(B&&typeof Je=="number"&&Le){var ke=ue+ce,xe=Le.length,De=xe-1;if(!xe){Ot(0,null);return}for(var et=0;et<xe;et+=1){var rt=nr(et);if(N&&(rt=rt||0),rt===void 0){Ot(et-1,void 0,!0);break}if(ke+=rt,De===0&&ke<=B||et===De-1&&ke+nr(De)<=B){Ot(De,null);break}else if(ke+Je>B){Ot(et-1,ke-rt-ce+te);break}}x&&nr(0)+ce>B&&Ce(null)}},[B,V,te,ue,ce,Me,Le]);var At=st&&!!nt.length,kt={};be!==null&&Xe&&(kt={position:"absolute",left:be,top:0});var ir={prefixCls:mt,responsive:Xe,component:P,invalidate:vt},Gt=c?function(ke,xe){var De=Me(ke,xe);return h.createElement(rf.Provider,{key:De,value:X(X({},ir),{},{order:xe,item:ke,itemKey:De,registerSize:tr,display:xe<=je})},c(ke,xe))}:function(ke,xe){var De=Me(ke,xe);return h.createElement(Il,Re({},ir,{order:xe,key:De,item:ke,renderItem:qe,itemKey:De,registerSize:tr,display:xe<=je}))},it={order:At?je:Number.MAX_SAFE_INTEGER,className:"".concat(mt,"-rest"),registerSize:Yt,display:At},xt=S||Z8,ft=_?h.createElement(rf.Provider,{value:X(X({},ir),it)},_(nt)):h.createElement(Il,Re({},ir,it),typeof xt=="function"?xt(nt):xt),Ie=h.createElement(k,Re({className:re(!vt&&n,v),style:g,ref:t},O),C&&h.createElement(Il,Re({},ir,{responsive:ht,responsiveDisabled:!Xe,order:-1,className:"".concat(mt,"-prefix"),registerSize:vr,display:!0}),C),Le.map(Gt),tt?ft:null,x&&h.createElement(Il,Re({},ir,{responsive:ht,responsiveDisabled:!Xe,order:je,className:"".concat(mt,"-suffix"),registerSize:Tr,display:!0,style:kt}),x));return ht?h.createElement(oo,{onResize:_t,disabled:!Xe},Ie):Ie}var Ao=h.forwardRef(ez);Ao.displayName="Overflow";Ao.Item=k$;Ao.RESPONSIVE=R$;Ao.INVALIDATE=T$;function tz(e,t,r){var n=X(X({},e),t);return Object.keys(t).forEach(function(i){var o=t[i];typeof o=="function"&&(n[i]=function(){for(var a,c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];return o.apply(void 0,u),(a=e[i])===null||a===void 0?void 0:a.call.apply(a,[e].concat(u))})}),n}var rz=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],nz=function(t,r){var n=t.prefixCls,i=t.id,o=t.inputElement,a=t.autoFocus,c=t.autoComplete,u=t.editable,d=t.activeDescendantId,f=t.value,p=t.open,g=t.attrs,v=Bt(t,rz),b=o||h.createElement("input",null),S=b,_=S.ref,C=S.props;return"maxLength"in b.props,b=h.cloneElement(b,X(X(X({type:"search"},tz(v,C)),{},{id:i,ref:co(r,_),autoComplete:c||"off",autoFocus:a,className:re("".concat(n,"-selection-search-input"),C==null?void 0:C.className),role:"combobox","aria-expanded":p||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":p?d:void 0},g),{},{value:u?f:"",readOnly:!u,unselectable:u?null:"on",style:X(X({},C.style),{},{opacity:u?null:0})})),b},P$=h.forwardRef(nz);function O$(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var iz=typeof window<"u"&&window.document&&window.document.documentElement,oz=iz;function sz(e){return e!=null}function az(e){return!e&&e!==0}function SC(e){return["string","number"].includes(bt(e))}function I$(e){var t=void 0;return e&&(SC(e.title)?t=e.title.toString():SC(e.label)&&(t=e.label.toString())),t}function lz(e,t){oz?h.useLayoutEffect(e,t):h.useEffect(e,t)}function cz(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var CC=function(t){t.preventDefault(),t.stopPropagation()},uz=function(t){var r=t.id,n=t.prefixCls,i=t.values,o=t.open,a=t.searchValue,c=t.autoClearSearchValue,u=t.inputRef,d=t.placeholder,f=t.disabled,p=t.mode,g=t.showSearch,v=t.autoFocus,b=t.autoComplete,S=t.activeDescendantId,_=t.tabIndex,C=t.removeIcon,x=t.maxTagCount,E=t.maxTagTextLength,k=t.maxTagPlaceholder,P=k===void 0?function(ye){return"+ ".concat(ye.length," ...")}:k,T=t.tagRender,O=t.onToggleOpen,N=t.onRemove,I=t.onInputChange,z=t.onInputPaste,D=t.onInputKeyDown,M=t.onInputMouseDown,j=t.onInputCompositionStart,B=t.onInputCompositionEnd,F=t.onInputBlur,W=h.useRef(null),V=h.useState(0),L=se(V,2),G=L[0],q=L[1],A=h.useState(!1),U=se(A,2),Y=U[0],Z=U[1],te="".concat(n,"-selection"),ne=o||p==="multiple"&&c===!1||p==="tags"?a:"",he=p==="tags"||p==="multiple"&&c===!1||g&&(o||Y);lz(function(){q(W.current.scrollWidth)},[ne]);var me=function(fe,de,be,Ce,Te){return h.createElement("span",{title:I$(fe),className:re("".concat(te,"-item"),K({},"".concat(te,"-item-disabled"),be))},h.createElement("span",{className:"".concat(te,"-item-content")},de),Ce&&h.createElement(Gf,{className:"".concat(te,"-item-remove"),onMouseDown:CC,onClick:Te,customizeIcon:C},"×"))},ue=function(fe,de,be,Ce,Te,ze){var Ee=function(je){CC(je),O(!o)};return h.createElement("span",{onMouseDown:Ee},T({label:de,value:fe,disabled:be,closable:Ce,onClose:Te,isMaxTag:!!ze}))},Se=function(fe){var de=fe.disabled,be=fe.label,Ce=fe.value,Te=!f&&!de,ze=be;if(typeof E=="number"&&(typeof be=="string"||typeof be=="number")){var Ee=String(ze);Ee.length>E&&(ze="".concat(Ee.slice(0,E),"..."))}var $e=function(Oe){Oe&&Oe.stopPropagation(),N(fe)};return typeof T=="function"?ue(Ce,ze,de,Te,$e):me(fe,ze,de,Te,$e)},ae=function(fe){if(!i.length)return null;var de=typeof P=="function"?P(fe):P;return typeof T=="function"?ue(void 0,de,!1,!1,void 0,!0):me({title:de},de,!1)},le=h.createElement("div",{className:"".concat(te,"-search"),style:{width:G},onFocus:function(){Z(!0)},onBlur:function(){Z(!1)}},h.createElement(P$,{ref:u,open:o,prefixCls:n,id:r,inputElement:null,disabled:f,autoFocus:v,autoComplete:b,editable:he,activeDescendantId:S,value:ne,onKeyDown:D,onMouseDown:M,onChange:I,onPaste:z,onCompositionStart:j,onCompositionEnd:B,onBlur:F,tabIndex:_,attrs:Fi(t,!0)}),h.createElement("span",{ref:W,className:"".concat(te,"-search-mirror"),"aria-hidden":!0},ne," ")),ce=h.createElement(Ao,{prefixCls:"".concat(te,"-overflow"),data:i,renderItem:Se,renderRest:ae,suffix:le,itemKey:cz,maxCount:x});return h.createElement("span",{className:"".concat(te,"-wrap")},ce,!i.length&&!ne&&h.createElement("span",{className:"".concat(te,"-placeholder")},d))},dz=function(t){var r=t.inputElement,n=t.prefixCls,i=t.id,o=t.inputRef,a=t.disabled,c=t.autoFocus,u=t.autoComplete,d=t.activeDescendantId,f=t.mode,p=t.open,g=t.values,v=t.placeholder,b=t.tabIndex,S=t.showSearch,_=t.searchValue,C=t.activeValue,x=t.maxLength,E=t.onInputKeyDown,k=t.onInputMouseDown,P=t.onInputChange,T=t.onInputPaste,O=t.onInputCompositionStart,N=t.onInputCompositionEnd,I=t.onInputBlur,z=t.title,D=h.useState(!1),M=se(D,2),j=M[0],B=M[1],F=f==="combobox",W=F||S,V=g[0],L=_||"";F&&C&&!j&&(L=C),h.useEffect(function(){F&&B(!1)},[F,C]);var G=f!=="combobox"&&!p&&!S?!1:!!L,q=z===void 0?I$(V):z,A=h.useMemo(function(){return V?null:h.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:G?{visibility:"hidden"}:void 0},v)},[V,G,v,n]);return h.createElement("span",{className:"".concat(n,"-selection-wrap")},h.createElement("span",{className:"".concat(n,"-selection-search")},h.createElement(P$,{ref:o,prefixCls:n,id:i,open:p,inputElement:r,disabled:a,autoFocus:c,autoComplete:u,editable:W,activeDescendantId:d,value:L,onKeyDown:E,onMouseDown:k,onChange:function(Y){B(!0),P(Y)},onPaste:T,onCompositionStart:O,onCompositionEnd:N,onBlur:I,tabIndex:b,attrs:Fi(t,!0),maxLength:F?x:void 0})),!F&&V?h.createElement("span",{className:"".concat(n,"-selection-item"),title:q,style:G?{visibility:"hidden"}:void 0},V.label):null,A)},hz=function(t,r){var n=h.useRef(null),i=h.useRef(!1),o=t.prefixCls,a=t.open,c=t.mode,u=t.showSearch,d=t.tokenWithEnter,f=t.disabled,p=t.prefix,g=t.autoClearSearchValue,v=t.onSearch,b=t.onSearchSubmit,S=t.onToggleOpen,_=t.onInputKeyDown,C=t.onInputBlur,x=t.domRef;h.useImperativeHandle(r,function(){return{focus:function(q){n.current.focus(q)},blur:function(){n.current.blur()}}});var E=$$(0),k=se(E,2),P=k[0],T=k[1],O=function(q){var A=q.which,U=n.current instanceof HTMLTextAreaElement;!U&&a&&(A===Ge.UP||A===Ge.DOWN)&&q.preventDefault(),_&&_(q),A===Ge.ENTER&&c==="tags"&&!i.current&&!a&&(b==null||b(q.target.value)),!(U&&!a&&~[Ge.UP,Ge.DOWN,Ge.LEFT,Ge.RIGHT].indexOf(A))&&W8(A)&&S(!0)},N=function(){T(!0)},I=h.useRef(null),z=function(q){v(q,!0,i.current)!==!1&&S(!0)},D=function(){i.current=!0},M=function(q){i.current=!1,c!=="combobox"&&z(q.target.value)},j=function(q){var A=q.target.value;if(d&&I.current&&/[\r\n]/.test(I.current)){var U=I.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");A=A.replace(U,I.current)}I.current=null,z(A)},B=function(q){var A=q.clipboardData,U=A==null?void 0:A.getData("text");I.current=U||""},F=function(q){var A=q.target;if(A!==n.current){var U=document.body.style.msTouchAction!==void 0;U?setTimeout(function(){n.current.focus()}):n.current.focus()}},W=function(q){var A=P();q.target!==n.current&&!A&&!(c==="combobox"&&f)&&q.preventDefault(),(c!=="combobox"&&(!u||!A)||!a)&&(a&&g!==!1&&v("",!0,!1),S())},V={inputRef:n,onInputKeyDown:O,onInputMouseDown:N,onInputChange:j,onInputPaste:B,onInputCompositionStart:D,onInputCompositionEnd:M,onInputBlur:C},L=c==="multiple"||c==="tags"?h.createElement(uz,Re({},t,V)):h.createElement(dz,Re({},t,V));return h.createElement("div",{ref:x,className:"".concat(o,"-selector"),onClick:F,onMouseDown:W},p&&h.createElement("div",{className:"".concat(o,"-prefix")},p),L)},fz=h.forwardRef(hz);function mz(e){var t=e.prefixCls,r=e.align,n=e.arrow,i=e.arrowPos,o=n||{},a=o.className,c=o.content,u=i.x,d=u===void 0?0:u,f=i.y,p=f===void 0?0:f,g=h.useRef();if(!r||!r.points)return null;var v={position:"absolute"};if(r.autoArrow!==!1){var b=r.points[0],S=r.points[1],_=b[0],C=b[1],x=S[0],E=S[1];_===x||!["t","b"].includes(_)?v.top=p:_==="t"?v.top=0:v.bottom=0,C===E||!["l","r"].includes(C)?v.left=d:C==="l"?v.left=0:v.right=0}return h.createElement("div",{ref:g,className:re("".concat(t,"-arrow"),a),style:v},c)}function pz(e){var t=e.prefixCls,r=e.open,n=e.zIndex,i=e.mask,o=e.motion;return i?h.createElement(Hi,Re({},o,{motionAppear:!0,visible:r,removeOnLeave:!0}),function(a){var c=a.className;return h.createElement("div",{style:{zIndex:n},className:re("".concat(t,"-mask"),c)})}):null}var gz=h.memo(function(e){var t=e.children;return t},function(e,t){return t.cache}),vz=h.forwardRef(function(e,t){var r=e.popup,n=e.className,i=e.prefixCls,o=e.style,a=e.target,c=e.onVisibleChanged,u=e.open,d=e.keepDom,f=e.fresh,p=e.onClick,g=e.mask,v=e.arrow,b=e.arrowPos,S=e.align,_=e.motion,C=e.maskMotion,x=e.forceRender,E=e.getPopupContainer,k=e.autoDestroy,P=e.portal,T=e.zIndex,O=e.onMouseEnter,N=e.onMouseLeave,I=e.onPointerEnter,z=e.onPointerDownCapture,D=e.ready,M=e.offsetX,j=e.offsetY,B=e.offsetR,F=e.offsetB,W=e.onAlign,V=e.onPrepare,L=e.stretch,G=e.targetWidth,q=e.targetHeight,A=typeof r=="function"?r():r,U=u||d,Y=(E==null?void 0:E.length)>0,Z=h.useState(!E||!Y),te=se(Z,2),ne=te[0],he=te[1];if(ur(function(){!ne&&Y&&a&&he(!0)},[ne,Y,a]),!ne)return null;var me="auto",ue={left:"-1000vw",top:"-1000vh",right:me,bottom:me};if(D||!u){var Se,ae=S.points,le=S.dynamicInset||((Se=S._experimental)===null||Se===void 0?void 0:Se.dynamicInset),ce=le&&ae[0][1]==="r",ye=le&&ae[0][0]==="b";ce?(ue.right=B,ue.left=me):(ue.left=M,ue.right=me),ye?(ue.bottom=F,ue.top=me):(ue.top=j,ue.bottom=me)}var fe={};return L&&(L.includes("height")&&q?fe.height=q:L.includes("minHeight")&&q&&(fe.minHeight=q),L.includes("width")&&G?fe.width=G:L.includes("minWidth")&&G&&(fe.minWidth=G)),u||(fe.pointerEvents="none"),h.createElement(P,{open:x||U,getContainer:E&&function(){return E(a)},autoDestroy:k},h.createElement(pz,{prefixCls:i,open:u,zIndex:T,mask:g,motion:C}),h.createElement(oo,{onResize:W,disabled:!u},function(de){return h.createElement(Hi,Re({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:x,leavedClassName:"".concat(i,"-hidden")},_,{onAppearPrepare:V,onEnterPrepare:V,visible:u,onVisibleChanged:function(Ce){var Te;_==null||(Te=_.onVisibleChanged)===null||Te===void 0||Te.call(_,Ce),c(Ce)}}),function(be,Ce){var Te=be.className,ze=be.style,Ee=re(i,Te,n);return h.createElement("div",{ref:co(de,t,Ce),className:Ee,style:X(X(X(X({"--arrow-x":"".concat(b.x||0,"px"),"--arrow-y":"".concat(b.y||0,"px")},ue),fe),ze),{},{boxSizing:"border-box",zIndex:T},o),onMouseEnter:O,onMouseLeave:N,onPointerEnter:I,onClick:p,onPointerDownCapture:z},v&&h.createElement(mz,{prefixCls:i,arrow:v,arrowPos:b,align:S}),h.createElement(gz,{cache:!u&&!f},A))})}))}),yz=h.forwardRef(function(e,t){var r=e.children,n=e.getTriggerDOMNode,i=Qs(r),o=h.useCallback(function(c){Q0(t,n?n(c):c)},[n]),a=qo(o,Ma(r));return i?h.cloneElement(r,{ref:a}):r}),wC=h.createContext(null);function xC(e){return e?Array.isArray(e)?e:[e]:[]}function bz(e,t,r,n){return h.useMemo(function(){var i=xC(r??t),o=xC(n??t),a=new Set(i),c=new Set(o);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),c.has("hover")&&(c.delete("hover"),c.add("click"))),[a,c]},[e,t,r,n])}function _z(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return r?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function Sz(e,t,r,n){for(var i=r.points,o=Object.keys(e),a=0;a<o.length;a+=1){var c,u=o[a];if(_z((c=e[u])===null||c===void 0?void 0:c.points,i,n))return"".concat(t,"-placement-").concat(u)}return""}function EC(e,t,r,n){return t||(r?{motionName:"".concat(e,"-").concat(r)}:n?{motionName:n}:null)}function Uu(e){return e.ownerDocument.defaultView}function Xv(e){for(var t=[],r=e==null?void 0:e.parentElement,n=["hidden","scroll","clip","auto"];r;){var i=Uu(r).getComputedStyle(r),o=i.overflowX,a=i.overflowY,c=i.overflow;[o,a,c].some(function(u){return n.includes(u)})&&t.push(r),r=r.parentElement}return t}function Cu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function zc(e){return Cu(parseFloat(e),0)}function $C(e,t){var r=X({},e);return(t||[]).forEach(function(n){if(!(n instanceof HTMLBodyElement||n instanceof HTMLHtmlElement)){var i=Uu(n).getComputedStyle(n),o=i.overflow,a=i.overflowClipMargin,c=i.borderTopWidth,u=i.borderBottomWidth,d=i.borderLeftWidth,f=i.borderRightWidth,p=n.getBoundingClientRect(),g=n.offsetHeight,v=n.clientHeight,b=n.offsetWidth,S=n.clientWidth,_=zc(c),C=zc(u),x=zc(d),E=zc(f),k=Cu(Math.round(p.width/b*1e3)/1e3),P=Cu(Math.round(p.height/g*1e3)/1e3),T=(b-S-x-E)*k,O=(g-v-_-C)*P,N=_*P,I=C*P,z=x*k,D=E*k,M=0,j=0;if(o==="clip"){var B=zc(a);M=B*k,j=B*P}var F=p.x+z-M,W=p.y+N-j,V=F+p.width+2*M-z-D-T,L=W+p.height+2*j-N-I-O;r.left=Math.max(r.left,F),r.top=Math.max(r.top,W),r.right=Math.min(r.right,V),r.bottom=Math.min(r.bottom,L)}}),r}function kC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r="".concat(t),n=r.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(r)}function RC(e,t){var r=t||[],n=se(r,2),i=n[0],o=n[1];return[kC(e.width,i),kC(e.height,o)]}function TC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function vl(e,t){var r=t[0],n=t[1],i,o;return r==="t"?o=e.y:r==="b"?o=e.y+e.height:o=e.y+e.height/2,n==="l"?i=e.x:n==="r"?i=e.x+e.width:i=e.x+e.width/2,{x:i,y:o}}function Ns(e,t){var r={t:"b",b:"t",l:"r",r:"l"};return e.map(function(n,i){return i===t?r[n]||"c":n}).join("")}function Cz(e,t,r,n,i,o,a){var c=h.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[n]||{}}),u=se(c,2),d=u[0],f=u[1],p=h.useRef(0),g=h.useMemo(function(){return t?Xv(t):[]},[t]),v=h.useRef({}),b=function(){v.current={}};e||b();var S=Jr(function(){if(t&&r&&e){let Ur=function(oi,vi){var Wi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Qe,Ri=U.x+oi,Fa=U.y+vi,Wa=Ri+ye,ut=Fa+ce,Dt=Math.max(Ri,Wi.left),Nr=Math.max(Fa,Wi.top),jr=Math.min(Wa,Wi.right),Mr=Math.min(ut,Wi.bottom);return Math.max(0,(jr-Dt)*(Mr-Nr))},Xn=function(){wr=U.y+xt,Pr=wr+ce,Lr=U.x+it,sr=Lr+ye};var Ha=Ur,Yo=Xn,x,E,k,P,T=t,O=T.ownerDocument,N=Uu(T),I=N.getComputedStyle(T),z=I.position,D=T.style.left,M=T.style.top,j=T.style.right,B=T.style.bottom,F=T.style.overflow,W=X(X({},i[n]),o),V=O.createElement("div");(x=T.parentElement)===null||x===void 0||x.appendChild(V),V.style.left="".concat(T.offsetLeft,"px"),V.style.top="".concat(T.offsetTop,"px"),V.style.position=z,V.style.height="".concat(T.offsetHeight,"px"),V.style.width="".concat(T.offsetWidth,"px"),T.style.left="0",T.style.top="0",T.style.right="auto",T.style.bottom="auto",T.style.overflow="hidden";var L;if(Array.isArray(r))L={x:r[0],y:r[1],width:0,height:0};else{var G,q,A=r.getBoundingClientRect();A.x=(G=A.x)!==null&&G!==void 0?G:A.left,A.y=(q=A.y)!==null&&q!==void 0?q:A.top,L={x:A.x,y:A.y,width:A.width,height:A.height}}var U=T.getBoundingClientRect(),Y=N.getComputedStyle(T),Z=Y.height,te=Y.width;U.x=(E=U.x)!==null&&E!==void 0?E:U.left,U.y=(k=U.y)!==null&&k!==void 0?k:U.top;var ne=O.documentElement,he=ne.clientWidth,me=ne.clientHeight,ue=ne.scrollWidth,Se=ne.scrollHeight,ae=ne.scrollTop,le=ne.scrollLeft,ce=U.height,ye=U.width,fe=L.height,de=L.width,be={left:0,top:0,right:he,bottom:me},Ce={left:-le,top:-ae,right:ue-le,bottom:Se-ae},Te=W.htmlRegion,ze="visible",Ee="visibleFirst";Te!=="scroll"&&Te!==Ee&&(Te=ze);var $e=Te===Ee,je=$C(Ce,g),Oe=$C(be,g),Qe=Te===ze?Oe:je,st=$e?Oe:Qe;T.style.left="auto",T.style.top="auto",T.style.right="0",T.style.bottom="0";var Et=T.getBoundingClientRect();T.style.left=D,T.style.top=M,T.style.right=j,T.style.bottom=B,T.style.overflow=F,(P=T.parentElement)===null||P===void 0||P.removeChild(V);var mt=Cu(Math.round(ye/parseFloat(te)*1e3)/1e3),Je=Cu(Math.round(ce/parseFloat(Z)*1e3)/1e3);if(mt===0||Je===0||uu(r)&&!gy(r))return;var ht=W.offset,Xe=W.targetOffset,vt=RC(U,ht),tt=se(vt,2),Le=tt[0],nt=tt[1],Me=RC(L,Xe),qe=se(Me,2),Ot=qe[0],_t=qe[1];L.x-=Ot,L.y-=_t;var tr=W.points||[],Yt=se(tr,2),vr=Yt[0],Tr=Yt[1],nr=TC(Tr),At=TC(vr),kt=vl(L,nr),ir=vl(U,At),Gt=X({},W),it=kt.x-ir.x+Le,xt=kt.y-ir.y+nt,ft=Ur(it,xt),Ie=Ur(it,xt,Oe),ke=vl(L,["t","l"]),xe=vl(U,["t","l"]),De=vl(L,["b","r"]),et=vl(U,["b","r"]),rt=W.overflow||{},Ht=rt.adjustX,qt=rt.adjustY,jt=rt.shiftX,Lt=rt.shiftY,kr=function(vi){return typeof vi=="boolean"?vi:vi>=0},wr,Pr,Lr,sr;Xn();var dr=kr(qt),He=At[0]===nr[0];if(dr&&At[0]==="t"&&(Pr>st.bottom||v.current.bt)){var Ye=xt;He?Ye-=ce-fe:Ye=ke.y-et.y-nt;var Tt=Ur(it,Ye),pt=Ur(it,Ye,Oe);Tt>ft||Tt===ft&&(!$e||pt>=Ie)?(v.current.bt=!0,xt=Ye,nt=-nt,Gt.points=[Ns(At,0),Ns(nr,0)]):v.current.bt=!1}if(dr&&At[0]==="b"&&(wr<st.top||v.current.tb)){var at=xt;He?at+=ce-fe:at=De.y-xe.y-nt;var Ze=Ur(it,at),Rt=Ur(it,at,Oe);Ze>ft||Ze===ft&&(!$e||Rt>=Ie)?(v.current.tb=!0,xt=at,nt=-nt,Gt.points=[Ns(At,0),Ns(nr,0)]):v.current.tb=!1}var Kt=kr(Ht),Ke=At[1]===nr[1];if(Kt&&At[1]==="l"&&(sr>st.right||v.current.rl)){var gt=it;Ke?gt-=ye-de:gt=ke.x-et.x-Le;var It=Ur(gt,xt),fr=Ur(gt,xt,Oe);It>ft||It===ft&&(!$e||fr>=Ie)?(v.current.rl=!0,it=gt,Le=-Le,Gt.points=[Ns(At,1),Ns(nr,1)]):v.current.rl=!1}if(Kt&&At[1]==="r"&&(Lr<st.left||v.current.lr)){var rn=it;Ke?rn+=ye-de:rn=De.x-xe.x-Le;var zr=Ur(rn,xt),qn=Ur(rn,xt,Oe);zr>ft||zr===ft&&(!$e||qn>=Ie)?(v.current.lr=!0,it=rn,Le=-Le,Gt.points=[Ns(At,1),Ns(nr,1)]):v.current.lr=!1}Xn();var vn=jt===!0?0:jt;typeof vn=="number"&&(Lr<Oe.left&&(it-=Lr-Oe.left-Le,L.x+de<Oe.left+vn&&(it+=L.x-Oe.left+de-vn)),sr>Oe.right&&(it-=sr-Oe.right-Le,L.x>Oe.right-vn&&(it+=L.x-Oe.right+vn)));var Kn=Lt===!0?0:Lt;typeof Kn=="number"&&(wr<Oe.top&&(xt-=wr-Oe.top-nt,L.y+fe<Oe.top+Kn&&(xt+=L.y-Oe.top+fe-Kn)),Pr>Oe.bottom&&(xt-=Pr-Oe.bottom-nt,L.y>Oe.bottom-Kn&&(xt+=L.y-Oe.bottom+Kn)));var yn=U.x+it,Ln=yn+ye,Gn=U.y+xt,lr=Gn+ce,ct=L.x,ot=ct+de,or=L.y,cr=or+fe,yr=Math.max(yn,ct),Sr=Math.min(Ln,ot),Dn=(yr+Sr)/2,nn=Dn-yn,Vt=Math.max(Gn,or),bn=Math.min(lr,cr),$n=(Vt+bn)/2,gi=$n-Gn;a==null||a(t,Gt);var kn=Et.right-U.x-(it+U.width),gs=Et.bottom-U.y-(xt+U.height);mt===1&&(it=Math.floor(it),kn=Math.floor(kn)),Je===1&&(xt=Math.floor(xt),gs=Math.floor(gs));var Aa={ready:!0,offsetX:it/mt,offsetY:xt/Je,offsetR:kn/mt,offsetB:gs/Je,arrowX:nn/mt,arrowY:gi/Je,scaleX:mt,scaleY:Je,align:Gt};f(Aa)}}),_=function(){p.current+=1;var E=p.current;Promise.resolve().then(function(){p.current===E&&S()})},C=function(){f(function(E){return X(X({},E),{},{ready:!1})})};return ur(C,[n]),ur(function(){e||C()},[e]),[d.ready,d.offsetX,d.offsetY,d.offsetR,d.offsetB,d.arrowX,d.arrowY,d.scaleX,d.scaleY,d.align,_]}function wz(e,t,r,n,i){ur(function(){if(e&&t&&r){let g=function(){n(),i()};var p=g,o=t,a=r,c=Xv(o),u=Xv(a),d=Uu(a),f=new Set([d].concat(We(c),We(u)));return f.forEach(function(v){v.addEventListener("scroll",g,{passive:!0})}),d.addEventListener("resize",g,{passive:!0}),n(),function(){f.forEach(function(v){v.removeEventListener("scroll",g),d.removeEventListener("resize",g)})}}},[e,t,r])}function xz(e,t,r,n,i,o,a,c){var u=h.useRef(e);u.current=e;var d=h.useRef(!1);h.useEffect(function(){if(t&&n&&(!i||o)){var p=function(){d.current=!1},g=function(_){var C;u.current&&!a(((C=_.composedPath)===null||C===void 0||(C=C.call(_))===null||C===void 0?void 0:C[0])||_.target)&&!d.current&&c(!1)},v=Uu(n);v.addEventListener("pointerdown",p,!0),v.addEventListener("mousedown",g,!0),v.addEventListener("contextmenu",g,!0);var b=Jh(r);return b&&(b.addEventListener("mousedown",g,!0),b.addEventListener("contextmenu",g,!0)),function(){v.removeEventListener("pointerdown",p,!0),v.removeEventListener("mousedown",g,!0),v.removeEventListener("contextmenu",g,!0),b&&(b.removeEventListener("mousedown",g,!0),b.removeEventListener("contextmenu",g,!0))}}},[t,r,n,i,o]);function f(){d.current=!0}return f}var Ez=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function $z(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vf,t=h.forwardRef(function(r,n){var i=r.prefixCls,o=i===void 0?"rc-trigger-popup":i,a=r.children,c=r.action,u=c===void 0?"hover":c,d=r.showAction,f=r.hideAction,p=r.popupVisible,g=r.defaultPopupVisible,v=r.onPopupVisibleChange,b=r.afterPopupVisibleChange,S=r.mouseEnterDelay,_=r.mouseLeaveDelay,C=_===void 0?.1:_,x=r.focusDelay,E=r.blurDelay,k=r.mask,P=r.maskClosable,T=P===void 0?!0:P,O=r.getPopupContainer,N=r.forceRender,I=r.autoDestroy,z=r.destroyPopupOnHide,D=r.popup,M=r.popupClassName,j=r.popupStyle,B=r.popupPlacement,F=r.builtinPlacements,W=F===void 0?{}:F,V=r.popupAlign,L=r.zIndex,G=r.stretch,q=r.getPopupClassNameFromAlign,A=r.fresh,U=r.alignPoint,Y=r.onPopupClick,Z=r.onPopupAlign,te=r.arrow,ne=r.popupMotion,he=r.maskMotion,me=r.popupTransitionName,ue=r.popupAnimation,Se=r.maskTransitionName,ae=r.maskAnimation,le=r.className,ce=r.getTriggerDOMNode,ye=Bt(r,Ez),fe=I||z||!1,de=h.useState(!1),be=se(de,2),Ce=be[0],Te=be[1];ur(function(){Te(Ey())},[]);var ze=h.useRef({}),Ee=h.useContext(wC),$e=h.useMemo(function(){return{registerSubPopup:function(Dt,Nr){ze.current[Dt]=Nr,Ee==null||Ee.registerSubPopup(Dt,Nr)}}},[Ee]),je=Uf(),Oe=h.useState(null),Qe=se(Oe,2),st=Qe[0],Et=Qe[1],mt=h.useRef(null),Je=Jr(function(ut){mt.current=ut,uu(ut)&&st!==ut&&Et(ut),Ee==null||Ee.registerSubPopup(je,ut)}),ht=h.useState(null),Xe=se(ht,2),vt=Xe[0],tt=Xe[1],Le=h.useRef(null),nt=Jr(function(ut){uu(ut)&&vt!==ut&&(tt(ut),Le.current=ut)}),Me=h.Children.only(a),qe=(Me==null?void 0:Me.props)||{},Ot={},_t=Jr(function(ut){var Dt,Nr,jr=vt;return(jr==null?void 0:jr.contains(ut))||((Dt=Jh(jr))===null||Dt===void 0?void 0:Dt.host)===ut||ut===jr||(st==null?void 0:st.contains(ut))||((Nr=Jh(st))===null||Nr===void 0?void 0:Nr.host)===ut||ut===st||Object.values(ze.current).some(function(Mr){return(Mr==null?void 0:Mr.contains(ut))||ut===Mr})}),tr=EC(o,ne,ue,me),Yt=EC(o,he,ae,Se),vr=h.useState(g||!1),Tr=se(vr,2),nr=Tr[0],At=Tr[1],kt=p??nr,ir=Jr(function(ut){p===void 0&&At(ut)});ur(function(){At(p||!1)},[p]);var Gt=h.useRef(kt);Gt.current=kt;var it=h.useRef([]);it.current=[];var xt=Jr(function(ut){var Dt;ir(ut),((Dt=it.current[it.current.length-1])!==null&&Dt!==void 0?Dt:kt)!==ut&&(it.current.push(ut),v==null||v(ut))}),ft=h.useRef(),Ie=function(){clearTimeout(ft.current)},ke=function(Dt){var Nr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Ie(),Nr===0?xt(Dt):ft.current=setTimeout(function(){xt(Dt)},Nr*1e3)};h.useEffect(function(){return Ie},[]);var xe=h.useState(!1),De=se(xe,2),et=De[0],rt=De[1];ur(function(ut){(!ut||kt)&&rt(!0)},[kt]);var Ht=h.useState(null),qt=se(Ht,2),jt=qt[0],Lt=qt[1],kr=h.useState(null),wr=se(kr,2),Pr=wr[0],Lr=wr[1],sr=function(Dt){Lr([Dt.clientX,Dt.clientY])},dr=Cz(kt,st,U&&Pr!==null?Pr:vt,B,W,V,Z),He=se(dr,11),Ye=He[0],Tt=He[1],pt=He[2],at=He[3],Ze=He[4],Rt=He[5],Kt=He[6],Ke=He[7],gt=He[8],It=He[9],fr=He[10],rn=bz(Ce,u,d,f),zr=se(rn,2),qn=zr[0],vn=zr[1],Kn=qn.has("click"),yn=vn.has("click")||vn.has("contextMenu"),Ln=Jr(function(){et||fr()}),Gn=function(){Gt.current&&U&&yn&&ke(!1)};wz(kt,vt,st,Ln,Gn),ur(function(){Ln()},[Pr,B]),ur(function(){kt&&!(W!=null&&W[B])&&Ln()},[JSON.stringify(V)]);var lr=h.useMemo(function(){var ut=Sz(W,o,It,U);return re(ut,q==null?void 0:q(It))},[It,q,W,o,U]);h.useImperativeHandle(n,function(){return{nativeElement:Le.current,popupElement:mt.current,forceAlign:Ln}});var ct=h.useState(0),ot=se(ct,2),or=ot[0],cr=ot[1],yr=h.useState(0),Sr=se(yr,2),Dn=Sr[0],nn=Sr[1],Vt=function(){if(G&&vt){var Dt=vt.getBoundingClientRect();cr(Dt.width),nn(Dt.height)}},bn=function(){Vt(),Ln()},$n=function(Dt){rt(!1),fr(),b==null||b(Dt)},gi=function(){return new Promise(function(Dt){Vt(),Lt(function(){return Dt})})};ur(function(){jt&&(fr(),jt(),Lt(null))},[jt]);function kn(ut,Dt,Nr,jr){Ot[ut]=function(Mr){var Va;jr==null||jr(Mr),ke(Dt,Nr);for(var Jo=arguments.length,vs=new Array(Jo>1?Jo-1:0),uo=1;uo<Jo;uo++)vs[uo-1]=arguments[uo];(Va=qe[ut])===null||Va===void 0||Va.call.apply(Va,[qe,Mr].concat(vs))}}(Kn||yn)&&(Ot.onClick=function(ut){var Dt;Gt.current&&yn?ke(!1):!Gt.current&&Kn&&(sr(ut),ke(!0));for(var Nr=arguments.length,jr=new Array(Nr>1?Nr-1:0),Mr=1;Mr<Nr;Mr++)jr[Mr-1]=arguments[Mr];(Dt=qe.onClick)===null||Dt===void 0||Dt.call.apply(Dt,[qe,ut].concat(jr))});var gs=xz(kt,yn,vt,st,k,T,_t,ke),Aa=qn.has("hover"),Ha=vn.has("hover"),Yo,Ur;Aa&&(kn("onMouseEnter",!0,S,function(ut){sr(ut)}),kn("onPointerEnter",!0,S,function(ut){sr(ut)}),Yo=function(Dt){(kt||et)&&st!==null&&st!==void 0&&st.contains(Dt.target)&&ke(!0,S)},U&&(Ot.onMouseMove=function(ut){var Dt;(Dt=qe.onMouseMove)===null||Dt===void 0||Dt.call(qe,ut)})),Ha&&(kn("onMouseLeave",!1,C),kn("onPointerLeave",!1,C),Ur=function(){ke(!1,C)}),qn.has("focus")&&kn("onFocus",!0,x),vn.has("focus")&&kn("onBlur",!1,E),qn.has("contextMenu")&&(Ot.onContextMenu=function(ut){var Dt;Gt.current&&vn.has("contextMenu")?ke(!1):(sr(ut),ke(!0)),ut.preventDefault();for(var Nr=arguments.length,jr=new Array(Nr>1?Nr-1:0),Mr=1;Mr<Nr;Mr++)jr[Mr-1]=arguments[Mr];(Dt=qe.onContextMenu)===null||Dt===void 0||Dt.call.apply(Dt,[qe,ut].concat(jr))}),le&&(Ot.className=re(qe.className,le));var Xn=h.useRef(!1);Xn.current||(Xn.current=N||kt||et);var oi=X(X({},qe),Ot),vi={},Wi=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Wi.forEach(function(ut){ye[ut]&&(vi[ut]=function(){for(var Dt,Nr=arguments.length,jr=new Array(Nr),Mr=0;Mr<Nr;Mr++)jr[Mr]=arguments[Mr];(Dt=oi[ut])===null||Dt===void 0||Dt.call.apply(Dt,[oi].concat(jr)),ye[ut].apply(ye,jr)})});var Ri=h.cloneElement(Me,X(X({},oi),vi)),Fa={x:Rt,y:Kt},Wa=te?X({},te!==!0?te:{}):null;return h.createElement(h.Fragment,null,h.createElement(oo,{disabled:!kt,ref:nt,onResize:bn},h.createElement(yz,{getTriggerDOMNode:ce},Ri)),Xn.current&&h.createElement(wC.Provider,{value:$e},h.createElement(vz,{portal:e,ref:Je,prefixCls:o,popup:D,className:re(M,lr),style:j,target:vt,onMouseEnter:Yo,onMouseLeave:Ur,onPointerEnter:Yo,zIndex:L,open:kt,keepDom:et,fresh:A,onClick:Y,onPointerDownCapture:gs,mask:k,motion:tr,maskMotion:Yt,onVisibleChanged:$n,onPrepare:gi,forceRender:N,autoDestroy:fe,getPopupContainer:O,align:It,arrow:Wa,arrowPos:Fa,ready:Ye,offsetX:Tt,offsetY:pt,offsetR:at,offsetB:Ze,onAlign:Ln,stretch:G,targetWidth:or/Ke,targetHeight:Dn/gt})))});return t}const Xf=$z(Vf);var kz=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Rz=function(t){var r=t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:r,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:r,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:r,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:r,adjustY:1},htmlRegion:"scroll"}}},Tz=function(t,r){var n=t.prefixCls;t.disabled;var i=t.visible,o=t.children,a=t.popupElement,c=t.animation,u=t.transitionName,d=t.dropdownStyle,f=t.dropdownClassName,p=t.direction,g=p===void 0?"ltr":p,v=t.placement,b=t.builtinPlacements,S=t.dropdownMatchSelectWidth,_=t.dropdownRender,C=t.dropdownAlign,x=t.getPopupContainer,E=t.empty,k=t.getTriggerDOMNode,P=t.onPopupVisibleChange,T=t.onPopupMouseEnter,O=Bt(t,kz),N="".concat(n,"-dropdown"),I=a;_&&(I=_(a));var z=h.useMemo(function(){return b||Rz(S)},[b,S]),D=c?"".concat(N,"-").concat(c):u,M=typeof S=="number",j=h.useMemo(function(){return M?null:S===!1?"minWidth":"width"},[S,M]),B=d;M&&(B=X(X({},B),{},{width:S}));var F=h.useRef(null);return h.useImperativeHandle(r,function(){return{getPopupElement:function(){var V;return(V=F.current)===null||V===void 0?void 0:V.popupElement}}}),h.createElement(Xf,Re({},O,{showAction:P?["click"]:[],hideAction:P?["click"]:[],popupPlacement:v||(g==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:z,prefixCls:N,popupTransitionName:D,popup:h.createElement("div",{onMouseEnter:T},I),ref:F,stretch:j,popupAlign:C,popupVisible:i,getPopupContainer:x,popupClassName:re(f,K({},"".concat(N,"-empty"),E)),popupStyle:B,getTriggerDOMNode:k,onPopupVisibleChange:P}),o)},Pz=h.forwardRef(Tz);function PC(e,t){var r=e.key,n;return"value"in e&&(n=e.value),r??(n!==void 0?n:"rc-index-key-".concat(t))}function Yv(e){return typeof e<"u"&&!Number.isNaN(e)}function N$(e,t){var r=e||{},n=r.label,i=r.value,o=r.options,a=r.groupLabel,c=n||(t?"children":"label");return{label:c,value:i||"value",options:o||"options",groupLabel:a||c}}function Oz(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.fieldNames,n=t.childrenAsData,i=[],o=N$(r,!1),a=o.label,c=o.value,u=o.options,d=o.groupLabel;function f(p,g){Array.isArray(p)&&p.forEach(function(v){if(g||!(u in v)){var b=v[c];i.push({key:PC(v,i.length),groupOption:g,data:v,label:v[a],value:b})}else{var S=v[d];S===void 0&&n&&(S=v.label),i.push({key:PC(v,i.length),group:!0,data:v,label:S}),f(v[u],!0)}})}return f(e,!1),i}function Jv(e){var t=X({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return jn(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var Iz=function(t,r,n){if(!r||!r.length)return null;var i=!1,o=function c(u,d){var f=L2(d),p=f[0],g=f.slice(1);if(!p)return[u];var v=u.split(p);return i=i||v.length>1,v.reduce(function(b,S){return[].concat(We(b),We(c(S,g)))},[]).filter(Boolean)},a=o(t,r);return i?typeof n<"u"?a.slice(0,n):a:null},$y=h.createContext(null);function Nz(e){var t=e.visible,r=e.values;if(!t)return null;var n=50;return h.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(r.slice(0,n).map(function(i){var o=i.label,a=i.value;return["number","string"].includes(bt(o))?o:a}).join(", ")),r.length>n?", ...":null)}var Mz=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],zz=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Qv=function(t){return t==="tags"||t==="multiple"},jz=h.forwardRef(function(e,t){var r,n=e.id,i=e.prefixCls,o=e.className,a=e.showSearch,c=e.tagRender,u=e.direction,d=e.omitDomProps,f=e.displayValues,p=e.onDisplayValuesChange,g=e.emptyOptions,v=e.notFoundContent,b=v===void 0?"Not Found":v,S=e.onClear,_=e.mode,C=e.disabled,x=e.loading,E=e.getInputElement,k=e.getRawInputElement,P=e.open,T=e.defaultOpen,O=e.onDropdownVisibleChange,N=e.activeValue,I=e.onActiveValueChange,z=e.activeDescendantId,D=e.searchValue,M=e.autoClearSearchValue,j=e.onSearch,B=e.onSearchSplit,F=e.tokenSeparators,W=e.allowClear,V=e.prefix,L=e.suffixIcon,G=e.clearIcon,q=e.OptionList,A=e.animation,U=e.transitionName,Y=e.dropdownStyle,Z=e.dropdownClassName,te=e.dropdownMatchSelectWidth,ne=e.dropdownRender,he=e.dropdownAlign,me=e.placement,ue=e.builtinPlacements,Se=e.getPopupContainer,ae=e.showAction,le=ae===void 0?[]:ae,ce=e.onFocus,ye=e.onBlur,fe=e.onKeyUp,de=e.onKeyDown,be=e.onMouseDown,Ce=Bt(e,Mz),Te=Qv(_),ze=(a!==void 0?a:Te)||_==="combobox",Ee=X({},Ce);zz.forEach(function(ct){delete Ee[ct]}),d==null||d.forEach(function(ct){delete Ee[ct]});var $e=h.useState(!1),je=se($e,2),Oe=je[0],Qe=je[1];h.useEffect(function(){Qe(Ey())},[]);var st=h.useRef(null),Et=h.useRef(null),mt=h.useRef(null),Je=h.useRef(null),ht=h.useRef(null),Xe=h.useRef(!1),vt=H8(),tt=se(vt,3),Le=tt[0],nt=tt[1],Me=tt[2];h.useImperativeHandle(t,function(){var ct,ot;return{focus:(ct=Je.current)===null||ct===void 0?void 0:ct.focus,blur:(ot=Je.current)===null||ot===void 0?void 0:ot.blur,scrollTo:function(cr){var yr;return(yr=ht.current)===null||yr===void 0?void 0:yr.scrollTo(cr)},nativeElement:st.current||Et.current}});var qe=h.useMemo(function(){var ct;if(_!=="combobox")return D;var ot=(ct=f[0])===null||ct===void 0?void 0:ct.value;return typeof ot=="string"||typeof ot=="number"?String(ot):""},[D,_,f]),Ot=_==="combobox"&&typeof E=="function"&&E()||null,_t=typeof k=="function"&&k(),tr=qo(Et,_t==null||(r=_t.props)===null||r===void 0?void 0:r.ref),Yt=h.useState(!1),vr=se(Yt,2),Tr=vr[0],nr=vr[1];ur(function(){nr(!0)},[]);var At=Qr(!1,{defaultValue:T,value:P}),kt=se(At,2),ir=kt[0],Gt=kt[1],it=Tr?ir:!1,xt=!b&&g;(C||xt&&it&&_==="combobox")&&(it=!1);var ft=xt?!1:it,Ie=h.useCallback(function(ct){var ot=ct!==void 0?ct:!it;C||(Gt(ot),it!==ot&&(O==null||O(ot)))},[C,it,Gt,O]),ke=h.useMemo(function(){return(F||[]).some(function(ct){return[`
222
+ `,`\r
223
+ `].includes(ct)})},[F]),xe=h.useContext($y)||{},De=xe.maxCount,et=xe.rawValues,rt=function(ot,or,cr){if(!(Te&&Yv(De)&&(et==null?void 0:et.size)>=De)){var yr=!0,Sr=ot;I==null||I(null);var Dn=Iz(ot,F,Yv(De)?De-et.size:void 0),nn=cr?null:Dn;return _!=="combobox"&&nn&&(Sr="",B==null||B(nn),Ie(!1),yr=!1),j&&qe!==Sr&&j(Sr,{source:or?"typing":"effect"}),yr}},Ht=function(ot){!ot||!ot.trim()||j(ot,{source:"submit"})};h.useEffect(function(){!it&&!Te&&_!=="combobox"&&rt("",!1,!1)},[it]),h.useEffect(function(){ir&&C&&Gt(!1),C&&!Xe.current&&nt(!1)},[C]);var qt=$$(),jt=se(qt,2),Lt=jt[0],kr=jt[1],wr=h.useRef(!1),Pr=function(ot){var or=Lt(),cr=ot.key,yr=cr==="Enter";if(yr&&(_!=="combobox"&&ot.preventDefault(),it||Ie(!0)),kr(!!qe),cr==="Backspace"&&!or&&Te&&!qe&&f.length){for(var Sr=We(f),Dn=null,nn=Sr.length-1;nn>=0;nn-=1){var Vt=Sr[nn];if(!Vt.disabled){Sr.splice(nn,1),Dn=Vt;break}}Dn&&p(Sr,{type:"remove",values:[Dn]})}for(var bn=arguments.length,$n=new Array(bn>1?bn-1:0),gi=1;gi<bn;gi++)$n[gi-1]=arguments[gi];if(it&&(!yr||!wr.current)){var kn;yr&&(wr.current=!0),(kn=ht.current)===null||kn===void 0||kn.onKeyDown.apply(kn,[ot].concat($n))}de==null||de.apply(void 0,[ot].concat($n))},Lr=function(ot){for(var or=arguments.length,cr=new Array(or>1?or-1:0),yr=1;yr<or;yr++)cr[yr-1]=arguments[yr];if(it){var Sr;(Sr=ht.current)===null||Sr===void 0||Sr.onKeyUp.apply(Sr,[ot].concat(cr))}ot.key==="Enter"&&(wr.current=!1),fe==null||fe.apply(void 0,[ot].concat(cr))},sr=function(ot){var or=f.filter(function(cr){return cr!==ot});p(or,{type:"remove",values:[ot]})},dr=function(){wr.current=!1},He=h.useRef(!1),Ye=function(){nt(!0),C||(ce&&!He.current&&ce.apply(void 0,arguments),le.includes("focus")&&Ie(!0)),He.current=!0},Tt=function(){Xe.current=!0,nt(!1,function(){He.current=!1,Xe.current=!1,Ie(!1)}),!C&&(qe&&(_==="tags"?j(qe,{source:"submit"}):_==="multiple"&&j("",{source:"blur"})),ye&&ye.apply(void 0,arguments))},pt=[];h.useEffect(function(){return function(){pt.forEach(function(ct){return clearTimeout(ct)}),pt.splice(0,pt.length)}},[]);var at=function(ot){var or,cr=ot.target,yr=(or=mt.current)===null||or===void 0?void 0:or.getPopupElement();if(yr&&yr.contains(cr)){var Sr=setTimeout(function(){var bn=pt.indexOf(Sr);if(bn!==-1&&pt.splice(bn,1),Me(),!Oe&&!yr.contains(document.activeElement)){var $n;($n=Je.current)===null||$n===void 0||$n.focus()}});pt.push(Sr)}for(var Dn=arguments.length,nn=new Array(Dn>1?Dn-1:0),Vt=1;Vt<Dn;Vt++)nn[Vt-1]=arguments[Vt];be==null||be.apply(void 0,[ot].concat(nn))},Ze=h.useState({}),Rt=se(Ze,2),Kt=Rt[1];function Ke(){Kt({})}var gt;_t&&(gt=function(ot){Ie(ot)}),F8(function(){var ct;return[st.current,(ct=mt.current)===null||ct===void 0?void 0:ct.getPopupElement()]},ft,Ie,!!_t);var It=h.useMemo(function(){return X(X({},e),{},{notFoundContent:b,open:it,triggerOpen:ft,id:n,showSearch:ze,multiple:Te,toggleOpen:Ie})},[e,b,ft,it,n,ze,Te,Ie]),fr=!!L||x,rn;fr&&(rn=h.createElement(Gf,{className:re("".concat(i,"-arrow"),K({},"".concat(i,"-arrow-loading"),x)),customizeIcon:L,customizeIconProps:{loading:x,searchValue:qe,open:it,focused:Le,showSearch:ze}}));var zr=function(){var ot;S==null||S(),(ot=Je.current)===null||ot===void 0||ot.focus(),p([],{type:"clear",values:f}),rt("",!1,!1)},qn=D8(i,zr,f,W,G,C,qe,_),vn=qn.allowClear,Kn=qn.clearIcon,yn=h.createElement(q,{ref:ht}),Ln=re(i,o,K(K(K(K(K(K(K(K(K(K({},"".concat(i,"-focused"),Le),"".concat(i,"-multiple"),Te),"".concat(i,"-single"),!Te),"".concat(i,"-allow-clear"),W),"".concat(i,"-show-arrow"),fr),"".concat(i,"-disabled"),C),"".concat(i,"-loading"),x),"".concat(i,"-open"),it),"".concat(i,"-customize-input"),Ot),"".concat(i,"-show-search"),ze)),Gn=h.createElement(Pz,{ref:mt,disabled:C,prefixCls:i,visible:ft,popupElement:yn,animation:A,transitionName:U,dropdownStyle:Y,dropdownClassName:Z,direction:u,dropdownMatchSelectWidth:te,dropdownRender:ne,dropdownAlign:he,placement:me,builtinPlacements:ue,getPopupContainer:Se,empty:g,getTriggerDOMNode:function(ot){return Et.current||ot},onPopupVisibleChange:gt,onPopupMouseEnter:Ke},_t?h.cloneElement(_t,{ref:tr}):h.createElement(fz,Re({},e,{domRef:Et,prefixCls:i,inputElement:Ot,ref:Je,id:n,prefix:V,showSearch:ze,autoClearSearchValue:M,mode:_,activeDescendantId:z,tagRender:c,values:f,open:it,onToggleOpen:Ie,activeValue:N,searchValue:qe,onSearch:rt,onSearchSubmit:Ht,onRemove:sr,tokenWithEnter:ke,onInputBlur:dr}))),lr;return _t?lr=Gn:lr=h.createElement("div",Re({className:Ln},Ee,{ref:st,onMouseDown:at,onKeyDown:Pr,onKeyUp:Lr,onFocus:Ye,onBlur:Tt}),h.createElement(Nz,{visible:Le&&!it,values:f}),Gn,rn,vn&&Kn),h.createElement(E$.Provider,{value:It},lr)}),ky=function(){return null};ky.isSelectOptGroup=!0;var Ry=function(){return null};Ry.isSelectOption=!0;var M$=h.forwardRef(function(e,t){var r=e.height,n=e.offsetY,i=e.offsetX,o=e.children,a=e.prefixCls,c=e.onInnerResize,u=e.innerProps,d=e.rtl,f=e.extra,p={},g={display:"flex",flexDirection:"column"};return n!==void 0&&(p={height:r,position:"relative",overflow:"hidden"},g=X(X({},g),{},K(K(K(K(K({transform:"translateY(".concat(n,"px)")},d?"marginRight":"marginLeft",-i),"position","absolute"),"left",0),"right",0),"top",0))),h.createElement("div",{style:p},h.createElement(oo,{onResize:function(b){var S=b.offsetHeight;S&&c&&c()}},h.createElement("div",Re({style:g,className:re(K({},"".concat(a,"-holder-inner"),a)),ref:t},u),o,f)))});M$.displayName="Filler";function Bz(e){var t=e.children,r=e.setRef,n=h.useCallback(function(i){r(i)},[]);return h.cloneElement(t,{ref:n})}function Lz(e,t,r,n,i,o,a,c){var u=c.getKey;return e.slice(t,r+1).map(function(d,f){var p=t+f,g=a(d,p,{style:{width:n},offsetX:i}),v=u(d);return h.createElement(Bz,{key:v,setRef:function(S){return o(d,S)}},g)})}function Dz(e,t,r){var n=e.length,i=t.length,o,a;if(n===0&&i===0)return null;n<i?(o=e,a=t):(o=t,a=e);var c={__EMPTY_ITEM__:!0};function u(b){return b!==void 0?r(b):c}for(var d=null,f=Math.abs(n-i)!==1,p=0;p<a.length;p+=1){var g=u(o[p]),v=u(a[p]);if(g!==v){d=p,f=f||g!==u(a[p+1]);break}}return d===null?null:{index:d,multiple:f}}function Az(e,t,r){var n=h.useState(e),i=se(n,2),o=i[0],a=i[1],c=h.useState(null),u=se(c,2),d=u[0],f=u[1];return h.useEffect(function(){var p=Dz(o||[],e||[],t);(p==null?void 0:p.index)!==void 0&&f(e[p.index]),a(e)},[e]),[d]}var OC=(typeof navigator>"u"?"undefined":bt(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const z$=(function(e,t,r,n){var i=h.useRef(!1),o=h.useRef(null);function a(){clearTimeout(o.current),i.current=!0,o.current=setTimeout(function(){i.current=!1},50)}var c=h.useRef({top:e,bottom:t,left:r,right:n});return c.current.top=e,c.current.bottom=t,c.current.left=r,c.current.right=n,function(u,d){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,p=u?d<0&&c.current.left||d>0&&c.current.right:d<0&&c.current.top||d>0&&c.current.bottom;return f&&p?(clearTimeout(o.current),i.current=!1):(!p||i.current)&&a(),!i.current&&p}});function Hz(e,t,r,n,i,o,a){var c=h.useRef(0),u=h.useRef(null),d=h.useRef(null),f=h.useRef(!1),p=z$(t,r,n,i);function g(x,E){if($r.cancel(u.current),!p(!1,E)){var k=x;if(!k._virtualHandled)k._virtualHandled=!0;else return;c.current+=E,d.current=E,OC||k.preventDefault(),u.current=$r(function(){var P=f.current?10:1;a(c.current*P,!1),c.current=0})}}function v(x,E){a(E,!0),OC||x.preventDefault()}var b=h.useRef(null),S=h.useRef(null);function _(x){if(e){$r.cancel(S.current),S.current=$r(function(){b.current=null},2);var E=x.deltaX,k=x.deltaY,P=x.shiftKey,T=E,O=k;(b.current==="sx"||!b.current&&P&&k&&!E)&&(T=k,O=0,b.current="sx");var N=Math.abs(T),I=Math.abs(O);b.current===null&&(b.current=o&&N>I?"x":"y"),b.current==="y"?g(x,O):v(x,T)}}function C(x){e&&(f.current=x.detail===d.current)}return[_,C]}function Fz(e,t,r,n){var i=h.useMemo(function(){return[new Map,[]]},[e,r.id,n]),o=se(i,2),a=o[0],c=o[1],u=function(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f,g=a.get(f),v=a.get(p);if(g===void 0||v===void 0)for(var b=e.length,S=c.length;S<b;S+=1){var _,C=e[S],x=t(C);a.set(x,S);var E=(_=r.get(x))!==null&&_!==void 0?_:n;if(c[S]=(c[S-1]||0)+E,x===f&&(g=S),x===p&&(v=S),g!==void 0&&v!==void 0)break}return{top:c[g-1]||0,bottom:c[v]}};return u}var Wz=(function(){function e(){pn(this,e),K(this,"maps",void 0),K(this,"id",0),K(this,"diffRecords",new Map),this.maps=Object.create(null)}return gn(e,[{key:"set",value:function(r,n){this.diffRecords.set(r,this.maps[r]),this.maps[r]=n,this.id+=1}},{key:"get",value:function(r){return this.maps[r]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),e})();function IC(e){var t=parseFloat(e);return isNaN(t)?0:t}function Vz(e,t,r){var n=h.useState(0),i=se(n,2),o=i[0],a=i[1],c=h.useRef(new Map),u=h.useRef(new Wz),d=h.useRef(0);function f(){d.current+=1}function p(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;f();var b=function(){var C=!1;c.current.forEach(function(x,E){if(x&&x.offsetParent){var k=x.offsetHeight,P=getComputedStyle(x),T=P.marginTop,O=P.marginBottom,N=IC(T),I=IC(O),z=k+N+I;u.current.get(E)!==z&&(u.current.set(E,z),C=!0)}}),C&&a(function(x){return x+1})};if(v)b();else{d.current+=1;var S=d.current;Promise.resolve().then(function(){S===d.current&&b()})}}function g(v,b){var S=e(v);c.current.get(S),b?(c.current.set(S,b),p()):c.current.delete(S)}return h.useEffect(function(){return f},[]),[g,p,u.current,o]}var NC=14/15;function Uz(e,t,r){var n=h.useRef(!1),i=h.useRef(0),o=h.useRef(0),a=h.useRef(null),c=h.useRef(null),u,d=function(v){if(n.current){var b=Math.ceil(v.touches[0].pageX),S=Math.ceil(v.touches[0].pageY),_=i.current-b,C=o.current-S,x=Math.abs(_)>Math.abs(C);x?i.current=b:o.current=S;var E=r(x,x?_:C,!1,v);E&&v.preventDefault(),clearInterval(c.current),E&&(c.current=setInterval(function(){x?_*=NC:C*=NC;var k=Math.floor(x?_:C);(!r(x,k,!0)||Math.abs(k)<=.1)&&clearInterval(c.current)},16))}},f=function(){n.current=!1,u()},p=function(v){u(),v.touches.length===1&&!n.current&&(n.current=!0,i.current=Math.ceil(v.touches[0].pageX),o.current=Math.ceil(v.touches[0].pageY),a.current=v.target,a.current.addEventListener("touchmove",d,{passive:!1}),a.current.addEventListener("touchend",f,{passive:!0}))};u=function(){a.current&&(a.current.removeEventListener("touchmove",d),a.current.removeEventListener("touchend",f))},ur(function(){return e&&t.current.addEventListener("touchstart",p,{passive:!0}),function(){var g;(g=t.current)===null||g===void 0||g.removeEventListener("touchstart",p),u(),clearInterval(c.current)}},[e])}function MC(e){return Math.floor(Math.pow(e,.5))}function Zv(e,t){var r="touches"in e?e.touches[0]:e;return r[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function qz(e,t,r){h.useEffect(function(){var n=t.current;if(e&&n){var i=!1,o,a,c=function(){$r.cancel(o)},u=function g(){c(),o=$r(function(){r(a),g()})},d=function(){i=!1,c()},f=function(v){if(!(v.target.draggable||v.button!==0)){var b=v;b._virtualHandled||(b._virtualHandled=!0,i=!0)}},p=function(v){if(i){var b=Zv(v,!1),S=n.getBoundingClientRect(),_=S.top,C=S.bottom;if(b<=_){var x=_-b;a=-MC(x),u()}else if(b>=C){var E=b-C;a=MC(E),u()}else c()}};return n.addEventListener("mousedown",f),n.ownerDocument.addEventListener("mouseup",d),n.ownerDocument.addEventListener("mousemove",p),n.ownerDocument.addEventListener("dragend",d),function(){n.removeEventListener("mousedown",f),n.ownerDocument.removeEventListener("mouseup",d),n.ownerDocument.removeEventListener("mousemove",p),n.ownerDocument.removeEventListener("dragend",d),c()}}},[e])}var Kz=10;function Gz(e,t,r,n,i,o,a,c){var u=h.useRef(),d=h.useState(null),f=se(d,2),p=f[0],g=f[1];return ur(function(){if(p&&p.times<Kz){if(!e.current){g(function(G){return X({},G)});return}o();var v=p.targetAlign,b=p.originAlign,S=p.index,_=p.offset,C=e.current.clientHeight,x=!1,E=v,k=null;if(C){for(var P=v||b,T=0,O=0,N=0,I=Math.min(t.length-1,S),z=0;z<=I;z+=1){var D=i(t[z]);O=T;var M=r.get(D);N=O+(M===void 0?n:M),T=N}for(var j=P==="top"?_:C-_,B=I;B>=0;B-=1){var F=i(t[B]),W=r.get(F);if(W===void 0){x=!0;break}if(j-=W,j<=0)break}switch(P){case"top":k=O-_;break;case"bottom":k=N-C+_;break;default:{var V=e.current.scrollTop,L=V+C;O<V?E="top":N>L&&(E="bottom")}}k!==null&&a(k),k!==p.lastTop&&(x=!0)}x&&g(X(X({},p),{},{times:p.times+1,targetAlign:E,lastTop:k}))}},[p,e.current]),function(v){if(v==null){c();return}if($r.cancel(u.current),typeof v=="number")a(v);else if(v&&bt(v)==="object"){var b,S=v.align;"index"in v?b=v.index:b=t.findIndex(function(x){return i(x)===v.key});var _=v.offset,C=_===void 0?0:_;g({times:0,index:b,offset:C,originAlign:S})}}}var zC=h.forwardRef(function(e,t){var r=e.prefixCls,n=e.rtl,i=e.scrollOffset,o=e.scrollRange,a=e.onStartMove,c=e.onStopMove,u=e.onScroll,d=e.horizontal,f=e.spinSize,p=e.containerSize,g=e.style,v=e.thumbStyle,b=e.showScrollBar,S=h.useState(!1),_=se(S,2),C=_[0],x=_[1],E=h.useState(null),k=se(E,2),P=k[0],T=k[1],O=h.useState(null),N=se(O,2),I=N[0],z=N[1],D=!n,M=h.useRef(),j=h.useRef(),B=h.useState(b),F=se(B,2),W=F[0],V=F[1],L=h.useRef(),G=function(){b===!0||b===!1||(clearTimeout(L.current),V(!0),L.current=setTimeout(function(){V(!1)},3e3))},q=o-p||0,A=p-f||0,U=h.useMemo(function(){if(i===0||q===0)return 0;var ae=i/q;return ae*A},[i,q,A]),Y=function(le){le.stopPropagation(),le.preventDefault()},Z=h.useRef({top:U,dragging:C,pageY:P,startTop:I});Z.current={top:U,dragging:C,pageY:P,startTop:I};var te=function(le){x(!0),T(Zv(le,d)),z(Z.current.top),a(),le.stopPropagation(),le.preventDefault()};h.useEffect(function(){var ae=function(fe){fe.preventDefault()},le=M.current,ce=j.current;return le.addEventListener("touchstart",ae,{passive:!1}),ce.addEventListener("touchstart",te,{passive:!1}),function(){le.removeEventListener("touchstart",ae),ce.removeEventListener("touchstart",te)}},[]);var ne=h.useRef();ne.current=q;var he=h.useRef();he.current=A,h.useEffect(function(){if(C){var ae,le=function(fe){var de=Z.current,be=de.dragging,Ce=de.pageY,Te=de.startTop;$r.cancel(ae);var ze=M.current.getBoundingClientRect(),Ee=p/(d?ze.width:ze.height);if(be){var $e=(Zv(fe,d)-Ce)*Ee,je=Te;!D&&d?je-=$e:je+=$e;var Oe=ne.current,Qe=he.current,st=Qe?je/Qe:0,Et=Math.ceil(st*Oe);Et=Math.max(Et,0),Et=Math.min(Et,Oe),ae=$r(function(){u(Et,d)})}},ce=function(){x(!1),c()};return window.addEventListener("mousemove",le,{passive:!0}),window.addEventListener("touchmove",le,{passive:!0}),window.addEventListener("mouseup",ce,{passive:!0}),window.addEventListener("touchend",ce,{passive:!0}),function(){window.removeEventListener("mousemove",le),window.removeEventListener("touchmove",le),window.removeEventListener("mouseup",ce),window.removeEventListener("touchend",ce),$r.cancel(ae)}}},[C]),h.useEffect(function(){return G(),function(){clearTimeout(L.current)}},[i]),h.useImperativeHandle(t,function(){return{delayHidden:G}});var me="".concat(r,"-scrollbar"),ue={position:"absolute",visibility:W?null:"hidden"},Se={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return d?(Object.assign(ue,{height:8,left:0,right:0,bottom:0}),Object.assign(Se,K({height:"100%",width:f},D?"left":"right",U))):(Object.assign(ue,K({width:8,top:0,bottom:0},D?"right":"left",0)),Object.assign(Se,{width:"100%",height:f,top:U})),h.createElement("div",{ref:M,className:re(me,K(K(K({},"".concat(me,"-horizontal"),d),"".concat(me,"-vertical"),!d),"".concat(me,"-visible"),W)),style:X(X({},ue),g),onMouseDown:Y,onMouseMove:G},h.createElement("div",{ref:j,className:re("".concat(me,"-thumb"),K({},"".concat(me,"-thumb-moving"),C)),style:X(X({},Se),v),onMouseDown:te}))}),Xz=20;function jC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=e/t*e;return isNaN(r)&&(r=0),r=Math.max(r,Xz),Math.floor(r)}var Yz=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Jz=[],Qz={overflowY:"auto",overflowAnchor:"none"};function Zz(e,t){var r=e.prefixCls,n=r===void 0?"rc-virtual-list":r,i=e.className,o=e.height,a=e.itemHeight,c=e.fullHeight,u=c===void 0?!0:c,d=e.style,f=e.data,p=e.children,g=e.itemKey,v=e.virtual,b=e.direction,S=e.scrollWidth,_=e.component,C=_===void 0?"div":_,x=e.onScroll,E=e.onVirtualScroll,k=e.onVisibleChange,P=e.innerProps,T=e.extraRender,O=e.styles,N=e.showScrollBar,I=N===void 0?"optional":N,z=Bt(e,Yz),D=h.useCallback(function(He){return typeof g=="function"?g(He):He==null?void 0:He[g]},[g]),M=Vz(D),j=se(M,4),B=j[0],F=j[1],W=j[2],V=j[3],L=!!(v!==!1&&o&&a),G=h.useMemo(function(){return Object.values(W.maps).reduce(function(He,Ye){return He+Ye},0)},[W.id,W.maps]),q=L&&f&&(Math.max(a*f.length,G)>o||!!S),A=b==="rtl",U=re(n,K({},"".concat(n,"-rtl"),A),i),Y=f||Jz,Z=h.useRef(),te=h.useRef(),ne=h.useRef(),he=h.useState(0),me=se(he,2),ue=me[0],Se=me[1],ae=h.useState(0),le=se(ae,2),ce=le[0],ye=le[1],fe=h.useState(!1),de=se(fe,2),be=de[0],Ce=de[1],Te=function(){Ce(!0)},ze=function(){Ce(!1)},Ee={getKey:D};function $e(He){Se(function(Ye){var Tt;typeof He=="function"?Tt=He(Ye):Tt=He;var pt=nr(Tt);return Z.current.scrollTop=pt,pt})}var je=h.useRef({start:0,end:Y.length}),Oe=h.useRef(),Qe=Az(Y,D),st=se(Qe,1),Et=st[0];Oe.current=Et;var mt=h.useMemo(function(){if(!L)return{scrollHeight:void 0,start:0,end:Y.length-1,offset:void 0};if(!q){var He;return{scrollHeight:((He=te.current)===null||He===void 0?void 0:He.offsetHeight)||0,start:0,end:Y.length-1,offset:void 0}}for(var Ye=0,Tt,pt,at,Ze=Y.length,Rt=0;Rt<Ze;Rt+=1){var Kt=Y[Rt],Ke=D(Kt),gt=W.get(Ke),It=Ye+(gt===void 0?a:gt);It>=ue&&Tt===void 0&&(Tt=Rt,pt=Ye),It>ue+o&&at===void 0&&(at=Rt),Ye=It}return Tt===void 0&&(Tt=0,pt=0,at=Math.ceil(o/a)),at===void 0&&(at=Y.length-1),at=Math.min(at+1,Y.length-1),{scrollHeight:Ye,start:Tt,end:at,offset:pt}},[q,L,ue,Y,V,o]),Je=mt.scrollHeight,ht=mt.start,Xe=mt.end,vt=mt.offset;je.current.start=ht,je.current.end=Xe,h.useLayoutEffect(function(){var He=W.getRecord();if(He.size===1){var Ye=Array.from(He.keys())[0],Tt=He.get(Ye),pt=Y[ht];if(pt&&Tt===void 0){var at=D(pt);if(at===Ye){var Ze=W.get(Ye),Rt=Ze-a;$e(function(Kt){return Kt+Rt})}}}W.resetRecord()},[Je]);var tt=h.useState({width:0,height:o}),Le=se(tt,2),nt=Le[0],Me=Le[1],qe=function(Ye){Me({width:Ye.offsetWidth,height:Ye.offsetHeight})},Ot=h.useRef(),_t=h.useRef(),tr=h.useMemo(function(){return jC(nt.width,S)},[nt.width,S]),Yt=h.useMemo(function(){return jC(nt.height,Je)},[nt.height,Je]),vr=Je-o,Tr=h.useRef(vr);Tr.current=vr;function nr(He){var Ye=He;return Number.isNaN(Tr.current)||(Ye=Math.min(Ye,Tr.current)),Ye=Math.max(Ye,0),Ye}var At=ue<=0,kt=ue>=vr,ir=ce<=0,Gt=ce>=S,it=z$(At,kt,ir,Gt),xt=function(){return{x:A?-ce:ce,y:ue}},ft=h.useRef(xt()),Ie=Jr(function(He){if(E){var Ye=X(X({},xt()),He);(ft.current.x!==Ye.x||ft.current.y!==Ye.y)&&(E(Ye),ft.current=Ye)}});function ke(He,Ye){var Tt=He;Ye?(qs.flushSync(function(){ye(Tt)}),Ie()):$e(Tt)}function xe(He){var Ye=He.currentTarget.scrollTop;Ye!==ue&&$e(Ye),x==null||x(He),Ie()}var De=function(Ye){var Tt=Ye,pt=S?S-nt.width:0;return Tt=Math.max(Tt,0),Tt=Math.min(Tt,pt),Tt},et=Jr(function(He,Ye){Ye?(qs.flushSync(function(){ye(function(Tt){var pt=Tt+(A?-He:He);return De(pt)})}),Ie()):$e(function(Tt){var pt=Tt+He;return pt})}),rt=Hz(L,At,kt,ir,Gt,!!S,et),Ht=se(rt,2),qt=Ht[0],jt=Ht[1];Uz(L,Z,function(He,Ye,Tt,pt){var at=pt;return it(He,Ye,Tt)?!1:!at||!at._virtualHandled?(at&&(at._virtualHandled=!0),qt({preventDefault:function(){},deltaX:He?Ye:0,deltaY:He?0:Ye}),!0):!1}),qz(q,Z,function(He){$e(function(Ye){return Ye+He})}),ur(function(){function He(Tt){var pt=At&&Tt.detail<0,at=kt&&Tt.detail>0;L&&!pt&&!at&&Tt.preventDefault()}var Ye=Z.current;return Ye.addEventListener("wheel",qt,{passive:!1}),Ye.addEventListener("DOMMouseScroll",jt,{passive:!0}),Ye.addEventListener("MozMousePixelScroll",He,{passive:!1}),function(){Ye.removeEventListener("wheel",qt),Ye.removeEventListener("DOMMouseScroll",jt),Ye.removeEventListener("MozMousePixelScroll",He)}},[L,At,kt]),ur(function(){if(S){var He=De(ce);ye(He),Ie({x:He})}},[nt.width,S]);var Lt=function(){var Ye,Tt;(Ye=Ot.current)===null||Ye===void 0||Ye.delayHidden(),(Tt=_t.current)===null||Tt===void 0||Tt.delayHidden()},kr=Gz(Z,Y,W,a,D,function(){return F(!0)},$e,Lt);h.useImperativeHandle(t,function(){return{nativeElement:ne.current,getScrollInfo:xt,scrollTo:function(Ye){function Tt(pt){return pt&&bt(pt)==="object"&&("left"in pt||"top"in pt)}Tt(Ye)?(Ye.left!==void 0&&ye(De(Ye.left)),kr(Ye.top)):kr(Ye)}}}),ur(function(){if(k){var He=Y.slice(ht,Xe+1);k(He,Y)}},[ht,Xe,Y]);var wr=Fz(Y,D,W,a),Pr=T==null?void 0:T({start:ht,end:Xe,virtual:q,offsetX:ce,offsetY:vt,rtl:A,getSize:wr}),Lr=Lz(Y,ht,Xe,S,ce,B,p,Ee),sr=null;o&&(sr=X(K({},u?"height":"maxHeight",o),Qz),L&&(sr.overflowY="hidden",S&&(sr.overflowX="hidden"),be&&(sr.pointerEvents="none")));var dr={};return A&&(dr.dir="rtl"),h.createElement("div",Re({ref:ne,style:X(X({},d),{},{position:"relative"}),className:U},dr,z),h.createElement(oo,{onResize:qe},h.createElement(C,{className:"".concat(n,"-holder"),style:sr,ref:Z,onScroll:xe,onMouseEnter:Lt},h.createElement(M$,{prefixCls:n,height:Je,offsetX:ce,offsetY:vt,scrollWidth:S,onInnerResize:F,ref:te,innerProps:P,rtl:A,extra:Pr},Lr))),q&&Je>o&&h.createElement(zC,{ref:Ot,prefixCls:n,scrollOffset:ue,scrollRange:Je,rtl:A,onScroll:ke,onStartMove:Te,onStopMove:ze,spinSize:Yt,containerSize:nt.height,style:O==null?void 0:O.verticalScrollBar,thumbStyle:O==null?void 0:O.verticalScrollBarThumb,showScrollBar:I}),q&&S>nt.width&&h.createElement(zC,{ref:_t,prefixCls:n,scrollOffset:ce,scrollRange:S,rtl:A,onScroll:ke,onStartMove:Te,onStopMove:ze,spinSize:tr,containerSize:nt.width,horizontal:!0,style:O==null?void 0:O.horizontalScrollBar,thumbStyle:O==null?void 0:O.horizontalScrollBarThumb,showScrollBar:I}))}var j$=h.forwardRef(Zz);j$.displayName="List";function ej(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var tj=["disabled","title","children","style","className"];function BC(e){return typeof e=="string"||typeof e=="number"}var rj=function(t,r){var n=A8(),i=n.prefixCls,o=n.id,a=n.open,c=n.multiple,u=n.mode,d=n.searchValue,f=n.toggleOpen,p=n.notFoundContent,g=n.onPopupScroll,v=h.useContext($y),b=v.maxCount,S=v.flattenOptions,_=v.onActiveValue,C=v.defaultActiveFirstOption,x=v.onSelect,E=v.menuItemSelectedIcon,k=v.rawValues,P=v.fieldNames,T=v.virtual,O=v.direction,N=v.listHeight,I=v.listItemHeight,z=v.optionRender,D="".concat(i,"-item"),M=Iu(function(){return S},[a,S],function(ae,le){return le[0]&&ae[1]!==le[1]}),j=h.useRef(null),B=h.useMemo(function(){return c&&Yv(b)&&(k==null?void 0:k.size)>=b},[c,b,k==null?void 0:k.size]),F=function(le){le.preventDefault()},W=function(le){var ce;(ce=j.current)===null||ce===void 0||ce.scrollTo(typeof le=="number"?{index:le}:le)},V=h.useCallback(function(ae){return u==="combobox"?!1:k.has(ae)},[u,We(k).toString(),k.size]),L=function(le){for(var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ye=M.length,fe=0;fe<ye;fe+=1){var de=(le+fe*ce+ye)%ye,be=M[de]||{},Ce=be.group,Te=be.data;if(!Ce&&!(Te!=null&&Te.disabled)&&(V(Te.value)||!B))return de}return-1},G=h.useState(function(){return L(0)}),q=se(G,2),A=q[0],U=q[1],Y=function(le){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;U(le);var ye={source:ce?"keyboard":"mouse"},fe=M[le];if(!fe){_(null,-1,ye);return}_(fe.value,le,ye)};h.useEffect(function(){Y(C!==!1?L(0):-1)},[M.length,d]);var Z=h.useCallback(function(ae){return u==="combobox"?String(ae).toLowerCase()===d.toLowerCase():k.has(ae)},[u,d,We(k).toString(),k.size]);h.useEffect(function(){var ae=setTimeout(function(){if(!c&&a&&k.size===1){var ce=Array.from(k)[0],ye=M.findIndex(function(fe){var de=fe.data;return d?String(de.value).startsWith(d):de.value===ce});ye!==-1&&(Y(ye),W(ye))}});if(a){var le;(le=j.current)===null||le===void 0||le.scrollTo(void 0)}return function(){return clearTimeout(ae)}},[a,d]);var te=function(le){le!==void 0&&x(le,{selected:!k.has(le)}),c||f(!1)};if(h.useImperativeHandle(r,function(){return{onKeyDown:function(le){var ce=le.which,ye=le.ctrlKey;switch(ce){case Ge.N:case Ge.P:case Ge.UP:case Ge.DOWN:{var fe=0;if(ce===Ge.UP?fe=-1:ce===Ge.DOWN?fe=1:ej()&&ye&&(ce===Ge.N?fe=1:ce===Ge.P&&(fe=-1)),fe!==0){var de=L(A+fe,fe);W(de),Y(de,!0)}break}case Ge.TAB:case Ge.ENTER:{var be,Ce=M[A];Ce&&!(Ce!=null&&(be=Ce.data)!==null&&be!==void 0&&be.disabled)&&!B?te(Ce.value):te(void 0),a&&le.preventDefault();break}case Ge.ESC:f(!1),a&&le.stopPropagation()}},onKeyUp:function(){},scrollTo:function(le){W(le)}}}),M.length===0)return h.createElement("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(D,"-empty"),onMouseDown:F},p);var ne=Object.keys(P).map(function(ae){return P[ae]}),he=function(le){return le.label};function me(ae,le){var ce=ae.group;return{role:ce?"presentation":"option",id:"".concat(o,"_list_").concat(le)}}var ue=function(le){var ce=M[le];if(!ce)return null;var ye=ce.data||{},fe=ye.value,de=ce.group,be=Fi(ye,!0),Ce=he(ce);return ce?h.createElement("div",Re({"aria-label":typeof Ce=="string"&&!de?Ce:null},be,{key:le},me(ce,le),{"aria-selected":Z(fe)}),fe):null},Se={role:"listbox",id:"".concat(o,"_list")};return h.createElement(h.Fragment,null,T&&h.createElement("div",Re({},Se,{style:{height:0,width:0,overflow:"hidden"}}),ue(A-1),ue(A),ue(A+1)),h.createElement(j$,{itemKey:"key",ref:j,data:M,height:N,itemHeight:I,fullHeight:!1,onMouseDown:F,onScroll:g,virtual:T,direction:O,innerProps:T?null:Se},function(ae,le){var ce=ae.group,ye=ae.groupOption,fe=ae.data,de=ae.label,be=ae.value,Ce=fe.key;if(ce){var Te,ze=(Te=fe.title)!==null&&Te!==void 0?Te:BC(de)?de.toString():void 0;return h.createElement("div",{className:re(D,"".concat(D,"-group"),fe.className),title:ze},de!==void 0?de:Ce)}var Ee=fe.disabled,$e=fe.title;fe.children;var je=fe.style,Oe=fe.className,Qe=Bt(fe,tj),st=un(Qe,ne),Et=V(be),mt=Ee||!Et&&B,Je="".concat(D,"-option"),ht=re(D,Je,Oe,K(K(K(K({},"".concat(Je,"-grouped"),ye),"".concat(Je,"-active"),A===le&&!mt),"".concat(Je,"-disabled"),mt),"".concat(Je,"-selected"),Et)),Xe=he(ae),vt=!E||typeof E=="function"||Et,tt=typeof Xe=="number"?Xe:Xe||be,Le=BC(tt)?tt.toString():void 0;return $e!==void 0&&(Le=$e),h.createElement("div",Re({},Fi(st),T?{}:me(ae,le),{"aria-selected":Z(be),className:ht,title:Le,onMouseMove:function(){A===le||mt||Y(le)},onClick:function(){mt||te(be)},style:je}),h.createElement("div",{className:"".concat(Je,"-content")},typeof z=="function"?z(ae,{index:le}):tt),h.isValidElement(E)||Et,vt&&h.createElement(Gf,{className:"".concat(D,"-option-state"),customizeIcon:E,customizeIconProps:{value:be,disabled:mt,isSelected:Et}},Et?"✓":null))}))},nj=h.forwardRef(rj);const ij=(function(e,t){var r=h.useRef({values:new Map,options:new Map}),n=h.useMemo(function(){var o=r.current,a=o.values,c=o.options,u=e.map(function(p){if(p.label===void 0){var g;return X(X({},p),{},{label:(g=a.get(p.value))===null||g===void 0?void 0:g.label})}return p}),d=new Map,f=new Map;return u.forEach(function(p){d.set(p.value,p),f.set(p.value,t.get(p.value)||c.get(p.value))}),r.current.values=d,r.current.options=f,u},[e,t]),i=h.useCallback(function(o){return t.get(o)||r.current.options.get(o)},[t]);return[n,i]});function wg(e,t){return O$(e).join("").toUpperCase().includes(t)}const oj=(function(e,t,r,n,i){return h.useMemo(function(){if(!r||n===!1)return e;var o=t.options,a=t.label,c=t.value,u=[],d=typeof n=="function",f=r.toUpperCase(),p=d?n:function(v,b){return i?wg(b[i],f):b[o]?wg(b[a!=="children"?a:"label"],f):wg(b[c],f)},g=d?function(v){return Jv(v)}:function(v){return v};return e.forEach(function(v){if(v[o]){var b=p(r,g(v));if(b)u.push(v);else{var S=v[o].filter(function(_){return p(r,g(_))});S.length&&u.push(X(X({},v),{},K({},o,S)))}return}p(r,g(v))&&u.push(v)}),u},[e,n,i,r,t])});var LC=0,sj=ni();function aj(){var e;return sj?(e=LC,LC+=1):e="TEST_OR_SSR",e}function lj(e){var t=h.useState(),r=se(t,2),n=r[0],i=r[1];return h.useEffect(function(){i("rc_select_".concat(aj()))},[]),e||n}var cj=["children","value"],uj=["children"];function dj(e){var t=e,r=t.key,n=t.props,i=n.children,o=n.value,a=Bt(n,cj);return X({key:r,value:o!==void 0?o:r,children:i},a)}function B$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return di(e).map(function(r,n){if(!h.isValidElement(r)||!r.type)return null;var i=r,o=i.type.isSelectOptGroup,a=i.key,c=i.props,u=c.children,d=Bt(c,uj);return t||!o?dj(r):X(X({key:"__RC_SELECT_GRP__".concat(a===null?n:a,"__"),label:a},d),{},{options:B$(u)})}).filter(function(r){return r})}var hj=function(t,r,n,i,o){return h.useMemo(function(){var a=t,c=!t;c&&(a=B$(r));var u=new Map,d=new Map,f=function(v,b,S){S&&typeof S=="string"&&v.set(b[S],b)},p=function g(v){for(var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,S=0;S<v.length;S+=1){var _=v[S];!_[n.options]||b?(u.set(_[n.value],_),f(d,_,n.label),f(d,_,i),f(d,_,o)):g(_[n.options],!0)}};return p(a),{options:a,valueOptions:u,labelOptions:d}},[t,r,n,i,o])};function DC(e){var t=h.useRef();t.current=e;var r=h.useCallback(function(){return t.current.apply(t,arguments)},[]);return r}var fj=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],mj=["inputValue"];function pj(e){return!e||bt(e)!=="object"}var gj=h.forwardRef(function(e,t){var r=e.id,n=e.mode,i=e.prefixCls,o=i===void 0?"rc-select":i,a=e.backfill,c=e.fieldNames,u=e.inputValue,d=e.searchValue,f=e.onSearch,p=e.autoClearSearchValue,g=p===void 0?!0:p,v=e.onSelect,b=e.onDeselect,S=e.dropdownMatchSelectWidth,_=S===void 0?!0:S,C=e.filterOption,x=e.filterSort,E=e.optionFilterProp,k=e.optionLabelProp,P=e.options,T=e.optionRender,O=e.children,N=e.defaultActiveFirstOption,I=e.menuItemSelectedIcon,z=e.virtual,D=e.direction,M=e.listHeight,j=M===void 0?200:M,B=e.listItemHeight,F=B===void 0?20:B,W=e.labelRender,V=e.value,L=e.defaultValue,G=e.labelInValue,q=e.onChange,A=e.maxCount,U=Bt(e,fj),Y=lj(r),Z=Qv(n),te=!!(!P&&O),ne=h.useMemo(function(){return C===void 0&&n==="combobox"?!1:C},[C,n]),he=h.useMemo(function(){return N$(c,te)},[JSON.stringify(c),te]),me=Qr("",{value:d!==void 0?d:u,postState:function(ke){return ke||""}}),ue=se(me,2),Se=ue[0],ae=ue[1],le=hj(P,O,he,E,k),ce=le.valueOptions,ye=le.labelOptions,fe=le.options,de=h.useCallback(function(Ie){var ke=O$(Ie);return ke.map(function(xe){var De,et,rt,Ht,qt;if(pj(xe))De=xe;else{var jt;rt=xe.key,et=xe.label,De=(jt=xe.value)!==null&&jt!==void 0?jt:rt}var Lt=ce.get(De);if(Lt){var kr;et===void 0&&(et=Lt==null?void 0:Lt[k||he.label]),rt===void 0&&(rt=(kr=Lt==null?void 0:Lt.key)!==null&&kr!==void 0?kr:De),Ht=Lt==null?void 0:Lt.disabled,qt=Lt==null?void 0:Lt.title}return{label:et,value:De,key:rt,disabled:Ht,title:qt}})},[he,k,ce]),be=Qr(L,{value:V}),Ce=se(be,2),Te=Ce[0],ze=Ce[1],Ee=h.useMemo(function(){var Ie,ke=Z&&Te===null?[]:Te,xe=de(ke);return n==="combobox"&&az((Ie=xe[0])===null||Ie===void 0?void 0:Ie.value)?[]:xe},[Te,de,n,Z]),$e=ij(Ee,ce),je=se($e,2),Oe=je[0],Qe=je[1],st=h.useMemo(function(){if(!n&&Oe.length===1){var Ie=Oe[0];if(Ie.value===null&&(Ie.label===null||Ie.label===void 0))return[]}return Oe.map(function(ke){var xe;return X(X({},ke),{},{label:(xe=typeof W=="function"?W(ke):ke.label)!==null&&xe!==void 0?xe:ke.value})})},[n,Oe,W]),Et=h.useMemo(function(){return new Set(Oe.map(function(Ie){return Ie.value}))},[Oe]);h.useEffect(function(){if(n==="combobox"){var Ie,ke=(Ie=Oe[0])===null||Ie===void 0?void 0:Ie.value;ae(sz(ke)?String(ke):"")}},[Oe]);var mt=DC(function(Ie,ke){var xe=ke??Ie;return K(K({},he.value,Ie),he.label,xe)}),Je=h.useMemo(function(){if(n!=="tags")return fe;var Ie=We(fe),ke=function(De){return ce.has(De)};return We(Oe).sort(function(xe,De){return xe.value<De.value?-1:1}).forEach(function(xe){var De=xe.value;ke(De)||Ie.push(mt(De,xe.label))}),Ie},[mt,fe,ce,Oe,n]),ht=oj(Je,he,Se,ne,E),Xe=h.useMemo(function(){return n!=="tags"||!Se||ht.some(function(Ie){return Ie[E||"value"]===Se})||ht.some(function(Ie){return Ie[he.value]===Se})?ht:[mt(Se)].concat(We(ht))},[mt,E,n,ht,Se,he]),vt=function Ie(ke){var xe=We(ke).sort(function(De,et){return x(De,et,{searchValue:Se})});return xe.map(function(De){return Array.isArray(De.options)?X(X({},De),{},{options:De.options.length>0?Ie(De.options):De.options}):De})},tt=h.useMemo(function(){return x?vt(Xe):Xe},[Xe,x,Se]),Le=h.useMemo(function(){return Oz(tt,{fieldNames:he,childrenAsData:te})},[tt,he,te]),nt=function(ke){var xe=de(ke);if(ze(xe),q&&(xe.length!==Oe.length||xe.some(function(rt,Ht){var qt;return((qt=Oe[Ht])===null||qt===void 0?void 0:qt.value)!==(rt==null?void 0:rt.value)}))){var De=G?xe:xe.map(function(rt){return rt.value}),et=xe.map(function(rt){return Jv(Qe(rt.value))});q(Z?De:De[0],Z?et:et[0])}},Me=h.useState(null),qe=se(Me,2),Ot=qe[0],_t=qe[1],tr=h.useState(0),Yt=se(tr,2),vr=Yt[0],Tr=Yt[1],nr=N!==void 0?N:n!=="combobox",At=h.useCallback(function(Ie,ke){var xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},De=xe.source,et=De===void 0?"keyboard":De;Tr(ke),a&&n==="combobox"&&Ie!==null&&et==="keyboard"&&_t(String(Ie))},[a,n]),kt=function(ke,xe,De){var et=function(){var sr,dr=Qe(ke);return[G?{label:dr==null?void 0:dr[he.label],value:ke,key:(sr=dr==null?void 0:dr.key)!==null&&sr!==void 0?sr:ke}:ke,Jv(dr)]};if(xe&&v){var rt=et(),Ht=se(rt,2),qt=Ht[0],jt=Ht[1];v(qt,jt)}else if(!xe&&b&&De!=="clear"){var Lt=et(),kr=se(Lt,2),wr=kr[0],Pr=kr[1];b(wr,Pr)}},ir=DC(function(Ie,ke){var xe,De=Z?ke.selected:!0;De?xe=Z?[].concat(We(Oe),[Ie]):[Ie]:xe=Oe.filter(function(et){return et.value!==Ie}),nt(xe),kt(Ie,De),n==="combobox"?_t(""):(!Qv||g)&&(ae(""),_t(""))}),Gt=function(ke,xe){nt(ke);var De=xe.type,et=xe.values;(De==="remove"||De==="clear")&&et.forEach(function(rt){kt(rt.value,!1,De)})},it=function(ke,xe){if(ae(ke),_t(null),xe.source==="submit"){var De=(ke||"").trim();if(De){var et=Array.from(new Set([].concat(We(Et),[De])));nt(et),kt(De,!0),ae("")}return}xe.source!=="blur"&&(n==="combobox"&&nt(ke),f==null||f(ke))},xt=function(ke){var xe=ke;n!=="tags"&&(xe=ke.map(function(et){var rt=ye.get(et);return rt==null?void 0:rt.value}).filter(function(et){return et!==void 0}));var De=Array.from(new Set([].concat(We(Et),We(xe))));nt(De),De.forEach(function(et){kt(et,!0)})},ft=h.useMemo(function(){var Ie=z!==!1&&_!==!1;return X(X({},le),{},{flattenOptions:Le,onActiveValue:At,defaultActiveFirstOption:nr,onSelect:ir,menuItemSelectedIcon:I,rawValues:Et,fieldNames:he,virtual:Ie,direction:D,listHeight:j,listItemHeight:F,childrenAsData:te,maxCount:A,optionRender:T})},[A,le,Le,At,nr,ir,I,Et,he,z,_,D,j,F,te,T]);return h.createElement($y.Provider,{value:ft},h.createElement(jz,Re({},U,{id:Y,prefixCls:o,ref:t,omitDomProps:mj,mode:n,displayValues:st,onDisplayValuesChange:Gt,direction:D,searchValue:Se,onSearch:it,autoClearSearchValue:g,onSearchSplit:xt,dropdownMatchSelectWidth:_,OptionList:nj,emptyOptions:!Le.length,activeValue:Ot,activeDescendantId:"".concat(Y,"_list_").concat(vr)})))}),Ty=gj;Ty.Option=Ry;Ty.OptGroup=ky;function L$(e,t,r){return re({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:r})}const D$=(e,t)=>t||e,vj=()=>{const[,e]=fi(),[t]=fs("Empty"),n=new pr(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return h.createElement("svg",{style:n,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},h.createElement("title",null,(t==null?void 0:t.description)||"Empty"),h.createElement("g",{fill:"none",fillRule:"evenodd"},h.createElement("g",{transform:"translate(24 31.67)"},h.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),h.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),h.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),h.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),h.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),h.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),h.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},h.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),h.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},yj=()=>{const[,e]=fi(),[t]=fs("Empty"),{colorFill:r,colorFillTertiary:n,colorFillQuaternary:i,colorBgContainer:o}=e,{borderColor:a,shadowColor:c,contentColor:u}=h.useMemo(()=>({borderColor:new pr(r).onBackground(o).toHexString(),shadowColor:new pr(n).onBackground(o).toHexString(),contentColor:new pr(i).onBackground(o).toHexString()}),[r,n,i,o]);return h.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},h.createElement("title",null,(t==null?void 0:t.description)||"Empty"),h.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},h.createElement("ellipse",{fill:c,cx:"32",cy:"33",rx:"32",ry:"7"}),h.createElement("g",{fillRule:"nonzero",stroke:a},h.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),h.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:u}))))},bj=e=>{const{componentCls:t,margin:r,marginXS:n,marginXL:i,fontSize:o,lineHeight:a}=e;return{[t]:{marginInline:n,fontSize:o,lineHeight:a,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:n,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:r},"&-normal":{marginBlock:i,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:n,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},_j=gr("Empty",e=>{const{componentCls:t,controlHeightLG:r,calc:n}=e,i=er(e,{emptyImgCls:`${t}-img`,emptyImgHeight:n(r).mul(2.5).equal(),emptyImgHeightMD:r,emptyImgHeightSM:n(r).mul(.875).equal()});return bj(i)});var Sj=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const A$=h.createElement(vj,null),H$=h.createElement(yj,null),io=e=>{var t;const{className:r,rootClassName:n,prefixCls:i,image:o,description:a,children:c,imageStyle:u,style:d,classNames:f,styles:p}=e,g=Sj(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:v,direction:b,className:S,style:_,classNames:C,styles:x,image:E}=Un("empty"),k=v("empty",i),[P,T,O]=_j(k),[N]=fs("Empty"),I=typeof a<"u"?a:N==null?void 0:N.description,z=typeof I=="string"?I:"empty",D=(t=o??E)!==null&&t!==void 0?t:A$;let M=null;return typeof D=="string"?M=h.createElement("img",{draggable:!1,alt:z,src:D}):M=D,P(h.createElement("div",Object.assign({className:re(T,O,k,S,{[`${k}-normal`]:D===H$,[`${k}-rtl`]:b==="rtl"},r,n,C.root,f==null?void 0:f.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},x.root),_),p==null?void 0:p.root),d)},g),h.createElement("div",{className:re(`${k}-image`,C.image,f==null?void 0:f.image),style:Object.assign(Object.assign(Object.assign({},u),x.image),p==null?void 0:p.image)},M),I&&h.createElement("div",{className:re(`${k}-description`,C.description,f==null?void 0:f.description),style:Object.assign(Object.assign({},x.description),p==null?void 0:p.description)},I),c&&h.createElement("div",{className:re(`${k}-footer`,C.footer,f==null?void 0:f.footer),style:Object.assign(Object.assign({},x.footer),p==null?void 0:p.footer)},c)))};io.PRESENTED_IMAGE_DEFAULT=A$;io.PRESENTED_IMAGE_SIMPLE=H$;const F$=e=>{const{componentName:t}=e,{getPrefixCls:r}=h.useContext(Pt),n=r("empty");switch(t){case"Table":case"List":return Q.createElement(io,{image:io.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return Q.createElement(io,{image:io.PRESENTED_IMAGE_SIMPLE,className:`${n}-small`});case"Table.filter":return null;default:return Q.createElement(io,null)}},W$=(e,t,r)=>{var n,i;const{variant:o,[e]:a}=h.useContext(Pt),c=h.useContext(WM),u=a==null?void 0:a.variant;let d;typeof t<"u"?d=t:r===!1?d="borderless":d=(i=(n=c??u)!==null&&n!==void 0?n:o)!==null&&i!==void 0?i:"outlined";const f=yP.includes(d);return[d,f]},Cj=e=>{const r={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},r),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},r),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},r),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},r),{points:["br","tr"],offset:[0,-4]})}};function wj(e,t){return e||Cj(t)}const AC=e=>{const{optionHeight:t,optionFontSize:r,optionLineHeight:n,optionPadding:i}=e;return{position:"relative",display:"block",minHeight:t,padding:i,color:e.colorText,fontWeight:"normal",fontSize:r,lineHeight:n,boxSizing:"border-box"}},xj=e=>{const{antCls:t,componentCls:r}=e,n=`${r}-item`,i=`&${t}-slide-up-enter${t}-slide-up-enter-active`,o=`&${t}-slide-up-appear${t}-slide-up-appear-active`,a=`&${t}-slide-up-leave${t}-slide-up-leave-active`,c=`${r}-dropdown-placement-`,u=`${n}-option-selected`;return[{[`${r}-dropdown`]:Object.assign(Object.assign({},Fr(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
224
+ ${i}${c}bottomLeft,
225
+ ${o}${c}bottomLeft
226
+ `]:{animationName:by},[`
227
+ ${i}${c}topLeft,
228
+ ${o}${c}topLeft,
229
+ ${i}${c}topRight,
230
+ ${o}${c}topRight
231
+ `]:{animationName:Sy},[`${a}${c}bottomLeft`]:{animationName:_y},[`
232
+ ${a}${c}topLeft,
233
+ ${a}${c}topRight
234
+ `]:{animationName:Cy},"&-hidden":{display:"none"},[n]:Object.assign(Object.assign({},AC(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},bu),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${n}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${n}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${n}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${n}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},AC(e)),{color:e.colorTextDisabled})}),[`${u}:has(+ ${u})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${u}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},Js(e,"slide-up"),Js(e,"slide-down"),ef(e,"move-up"),ef(e,"move-down")]},Ej=e=>{const{multipleSelectItemHeight:t,paddingXXS:r,lineWidth:n,INTERNAL_FIXED_ITEM_MARGIN:i}=e,o=e.max(e.calc(r).sub(n).equal(),0),a=e.max(e.calc(o).sub(i).equal(),0);return{basePadding:o,containerPadding:a,itemHeight:ee(t),itemLineHeight:ee(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},$j=e=>{const{multipleSelectItemHeight:t,selectHeight:r,lineWidth:n}=e;return e.calc(r).sub(t).div(2).sub(n).equal()},kj=e=>{const{componentCls:t,iconCls:r,borderRadiusSM:n,motionDurationSlow:i,paddingXS:o,multipleItemColorDisabled:a,multipleItemBorderColorDisabled:c,colorIcon:u,colorIconHover:d,INTERNAL_FIXED_ITEM_MARGIN:f}=e;return{[`${t}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"calc(100% - 4px)",display:"inline-flex"},[`${t}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:f,borderRadius:n,cursor:"default",transition:`font-size ${i}, line-height ${i}, height ${i}`,marginInlineEnd:e.calc(f).mul(2).equal(),paddingInlineStart:o,paddingInlineEnd:e.calc(o).div(2).equal(),[`${t}-disabled&`]:{color:a,borderColor:c,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(o).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},Ql()),{display:"inline-flex",alignItems:"center",color:u,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${r}`]:{verticalAlign:"-0.2em"},"&:hover":{color:d}})}}}},Rj=(e,t)=>{const{componentCls:r,INTERNAL_FIXED_ITEM_MARGIN:n}=e,i=`${r}-selection-overflow`,o=e.multipleSelectItemHeight,a=$j(e),c=t?`${r}-${t}`:"",u=Ej(e);return{[`${r}-multiple${c}`]:Object.assign(Object.assign({},kj(e)),{[`${r}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:u.basePadding,paddingBlock:u.containerPadding,borderRadius:e.borderRadius,[`${r}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${ee(n)} 0`,lineHeight:ee(o),visibility:"hidden",content:'"\\a0"'}},[`${r}-selection-item`]:{height:u.itemHeight,lineHeight:ee(u.itemLineHeight)},[`${r}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:ee(o),marginBlock:n}},[`${r}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(u.basePadding).equal()},[`${i}-item + ${i}-item,
235
+ ${r}-prefix + ${r}-selection-wrap
236
+ `]:{[`${r}-selection-search`]:{marginInlineStart:0},[`${r}-selection-placeholder`]:{insetInlineStart:0}},[`${i}-item-suffix`]:{minHeight:u.itemHeight,marginBlock:n},[`${r}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:o,fontFamily:e.fontFamily,lineHeight:ee(o),transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${r}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(u.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}})}};function xg(e,t){const{componentCls:r}=e,n=t?`${r}-${t}`:"",i={[`${r}-multiple${n}`]:{fontSize:e.fontSize,[`${r}-selector`]:{[`${r}-show-search&`]:{cursor:"text"}},[`
237
+ &${r}-show-arrow ${r}-selector,
238
+ &${r}-allow-clear ${r}-selector
239
+ `]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[Rj(e,t),i]}const Tj=e=>{const{componentCls:t}=e,r=er(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),n=er(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[xg(e),xg(r,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},xg(n,"lg")]};function Eg(e,t){const{componentCls:r,inputPaddingHorizontalBase:n,borderRadius:i}=e,o=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),a=t?`${r}-${t}`:"";return{[`${r}-single${a}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${r}-selector`]:Object.assign(Object.assign({},Fr(e,!0)),{display:"flex",borderRadius:i,flex:"1 1 auto",[`${r}-selection-wrap:after`]:{lineHeight:ee(o)},[`${r}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
240
+ ${r}-selection-item,
241
+ ${r}-selection-placeholder
242
+ `]:{display:"block",padding:0,lineHeight:ee(o),transition:`all ${e.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${r}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${r}-selection-item:empty:after`,`${r}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
243
+ &${r}-show-arrow ${r}-selection-item,
244
+ &${r}-show-arrow ${r}-selection-search,
245
+ &${r}-show-arrow ${r}-selection-placeholder
246
+ `]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${r}-open ${r}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${r}-customize-input)`]:{[`${r}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${ee(n)}`,[`${r}-selection-search-input`]:{height:o,fontSize:e.fontSize},"&:after":{lineHeight:ee(o)}}},[`&${r}-customize-input`]:{[`${r}-selector`]:{"&:after":{display:"none"},[`${r}-selection-search`]:{position:"static",width:"100%"},[`${r}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${ee(n)}`,"&:after":{display:"none"}}}}}}}function Pj(e){const{componentCls:t}=e,r=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[Eg(e),Eg(er(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${ee(r)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(r).add(e.calc(e.fontSize).mul(1.5)).equal()},[`
247
+ &${t}-show-arrow ${t}-selection-item,
248
+ &${t}-show-arrow ${t}-selection-placeholder
249
+ `]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},Eg(er(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const Oj=e=>{const{fontSize:t,lineHeight:r,lineWidth:n,controlHeight:i,controlHeightSM:o,controlHeightLG:a,paddingXXS:c,controlPaddingHorizontal:u,zIndexPopupBase:d,colorText:f,fontWeightStrong:p,controlItemBgActive:g,controlItemBgHover:v,colorBgContainer:b,colorFillSecondary:S,colorBgContainerDisabled:_,colorTextDisabled:C,colorPrimaryHover:x,colorPrimary:E,controlOutline:k}=e,P=c*2,T=n*2,O=Math.min(i-P,i-T),N=Math.min(o-P,o-T),I=Math.min(a-P,a-T);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(c/2),zIndexPopup:d+50,optionSelectedColor:f,optionSelectedFontWeight:p,optionSelectedBg:g,optionActiveBg:v,optionPadding:`${(i-t*r)/2}px ${u}px`,optionFontSize:t,optionLineHeight:r,optionHeight:i,selectorBg:b,clearBg:b,singleItemHeightLG:a,multipleItemBg:S,multipleItemBorderColor:"transparent",multipleItemHeight:O,multipleItemHeightSM:N,multipleItemHeightLG:I,multipleSelectorBgDisabled:_,multipleItemColorDisabled:C,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:x,activeBorderColor:E,activeOutlineColor:k,selectAffixPadding:c}},V$=(e,t)=>{const{componentCls:r,antCls:n,controlOutlineWidth:i}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{border:`${ee(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${r}-disabled):not(${r}-customize-input):not(${n}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{borderColor:t.hoverBorderHover},[`${r}-focused& ${r}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${ee(i)} ${t.activeOutlineColor}`,outline:0},[`${r}-prefix`]:{color:t.color}}}},HC=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},V$(e,t))}),Ij=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},V$(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),HC(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),HC(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${ee(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),U$=(e,t)=>{const{componentCls:r,antCls:n}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{background:t.bg,border:`${ee(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${r}-disabled):not(${r}-customize-input):not(${n}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{background:t.hoverBg},[`${r}-focused& ${r}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},FC=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},U$(e,t))}),Nj=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},U$(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),FC(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),FC(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${ee(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),Mj=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",border:`${ee(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${ee(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),q$=(e,t)=>{const{componentCls:r,antCls:n}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{borderWidth:`${ee(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,background:e.selectorBg,borderRadius:0},[`&:not(${r}-disabled):not(${r}-customize-input):not(${n}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{borderColor:`transparent transparent ${t.hoverBorderHover} transparent`},[`${r}-focused& ${r}-selector`]:{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0},[`${r}-prefix`]:{color:t.color}}}},WC=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},q$(e,t))}),zj=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},q$(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),WC(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),WC(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${ee(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),jj=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},Ij(e)),Nj(e)),Mj(e)),zj(e))}),Bj=e=>{const{componentCls:t}=e;return{position:"relative",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${t}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},Lj=e=>{const{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},Dj=e=>{const{antCls:t,componentCls:r,inputPaddingHorizontalBase:n,iconCls:i}=e,o={[`${r}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[r]:Object.assign(Object.assign({},Fr(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${r}-customize-input) ${r}-selector`]:Object.assign(Object.assign({},Bj(e)),Lj(e)),[`${r}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},bu),{[`> ${t}-typography`]:{display:"inline"}}),[`${r}-selection-placeholder`]:Object.assign(Object.assign({},bu),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${r}-arrow`]:Object.assign(Object.assign({},Ql()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${e.motionDurationSlow} ease`,[i]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${r}-suffix)`]:{pointerEvents:"auto"}},[`${r}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${r}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${r}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${r}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":o,"&:hover":o}),[`${r}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${r}-has-feedback`]:{[`${r}-clear`]:{insetInlineEnd:e.calc(n).add(e.fontSize).add(e.paddingXS).equal()}}}}}},Aj=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},Dj(e),Pj(e),Tj(e),xj(e),{[`${t}-rtl`]:{direction:"rtl"}},Wf(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},Hj=gr("Select",(e,{rootPrefixCls:t})=>{const r=er(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[Aj(r),jj(r)]},Oj,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var Fj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},Wj=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:Fj}))},K$=h.forwardRef(Wj),Vj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},Uj=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:Vj}))},Nl=h.forwardRef(Uj),qj={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},Kj=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:qj}))},Gj=h.forwardRef(Kj);function Xj({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:r,removeIcon:n,loading:i,multiple:o,hasFeedback:a,prefixCls:c,showSuffixIcon:u,feedbackIcon:d,showArrow:f,componentName:p}){const g=t??h.createElement(If,null),v=C=>e===null&&!a&&!f?null:h.createElement(h.Fragment,null,u!==!1&&C,a&&d);let b=null;if(e!==void 0)b=v(e);else if(i)b=v(h.createElement(zu,{spin:!0}));else{const C=`${c}-suffix`;b=({open:x,showSearch:E})=>v(x&&E?h.createElement(Gj,{className:C}):h.createElement(Nl,{className:C}))}let S=null;r!==void 0?S=r:o?S=h.createElement(K$,null):S=null;let _=null;return n!==void 0?_=n:_=h.createElement(Ys,null),{clearIcon:g,suffixIcon:b,itemIcon:S,removeIcon:_}}function Yj(e){return Q.useMemo(()=>{if(e)return(...t)=>Q.createElement(Wu,{space:!0},e.apply(void 0,t))},[e])}function Jj(e,t){return t!==void 0?t:e!==null}var Qj=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const G$="SECRET_COMBOBOX_MODE_DO_NOT_USE",Zj=(e,t)=>{var r,n,i,o,a;const{prefixCls:c,bordered:u,className:d,rootClassName:f,getPopupContainer:p,popupClassName:g,dropdownClassName:v,listHeight:b=256,placement:S,listItemHeight:_,size:C,disabled:x,notFoundContent:E,status:k,builtinPlacements:P,dropdownMatchSelectWidth:T,popupMatchSelectWidth:O,direction:N,style:I,allowClear:z,variant:D,dropdownStyle:M,transitionName:j,tagRender:B,maxCount:F,prefix:W,dropdownRender:V,popupRender:L,onDropdownVisibleChange:G,onOpenChange:q,styles:A,classNames:U}=e,Y=Qj(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:Z,getPrefixCls:te,renderEmpty:ne,direction:he,virtual:me,popupMatchSelectWidth:ue,popupOverflow:Se}=h.useContext(Pt),{showSearch:ae,style:le,styles:ce,className:ye,classNames:fe}=Un("select"),[,de]=fi(),be=_??(de==null?void 0:de.controlHeight),Ce=te("select",c),Te=te(),ze=N??he,{compactSize:Ee,compactItemClassnames:$e}=Lu(Ce,ze),[je,Oe]=W$("select",D,u),Qe=ko(Ce),[st,Et,mt]=Hj(Ce,Qe),Je=h.useMemo(()=>{const{mode:De}=e;if(De!=="combobox")return De===G$?"combobox":De},[e.mode]),ht=Je==="multiple"||Je==="tags",Xe=Jj(e.suffixIcon,e.showArrow),vt=(r=O??T)!==null&&r!==void 0?r:ue,tt=((n=A==null?void 0:A.popup)===null||n===void 0?void 0:n.root)||((i=ce.popup)===null||i===void 0?void 0:i.root)||M,Le=Yj(L||V),nt=q||G,{status:Me,hasFeedback:qe,isFormItemInput:Ot,feedbackIcon:_t}=h.useContext(Su),tr=D$(Me,k);let Yt;E!==void 0?Yt=E:Je==="combobox"?Yt=null:Yt=(ne==null?void 0:ne("Select"))||h.createElement(F$,{componentName:"Select"});const{suffixIcon:vr,itemIcon:Tr,removeIcon:nr,clearIcon:At}=Xj(Object.assign(Object.assign({},Y),{multiple:ht,hasFeedback:qe,feedbackIcon:_t,showSuffixIcon:Xe,prefixCls:Ce,componentName:"Select"})),kt=z===!0?{clearIcon:At}:z,ir=un(Y,["suffixIcon","itemIcon"]),Gt=re(((o=U==null?void 0:U.popup)===null||o===void 0?void 0:o.root)||((a=fe==null?void 0:fe.popup)===null||a===void 0?void 0:a.root)||g||v,{[`${Ce}-dropdown-${ze}`]:ze==="rtl"},f,fe.root,U==null?void 0:U.root,mt,Qe,Et),it=Go(De=>{var et;return(et=C??Ee)!==null&&et!==void 0?et:De}),xt=h.useContext(Gs),ft=x??xt,Ie=re({[`${Ce}-lg`]:it==="large",[`${Ce}-sm`]:it==="small",[`${Ce}-rtl`]:ze==="rtl",[`${Ce}-${je}`]:Oe,[`${Ce}-in-form-item`]:Ot},L$(Ce,tr,qe),$e,ye,d,fe.root,U==null?void 0:U.root,f,mt,Qe,Et),ke=h.useMemo(()=>S!==void 0?S:ze==="rtl"?"bottomRight":"bottomLeft",[S,ze]),[xe]=ec("SelectLike",tt==null?void 0:tt.zIndex);return st(h.createElement(Ty,Object.assign({ref:t,virtual:me,showSearch:ae},ir,{style:Object.assign(Object.assign(Object.assign(Object.assign({},ce.root),A==null?void 0:A.root),le),I),dropdownMatchSelectWidth:vt,transitionName:Fo(Te,"slide-up",j),builtinPlacements:wj(P,Se),listHeight:b,listItemHeight:be,mode:Je,prefixCls:Ce,placement:ke,direction:ze,prefix:W,suffixIcon:vr,menuItemSelectedIcon:Tr,removeIcon:nr,allowClear:kt,notFoundContent:Yt,className:Ie,getPopupContainer:p||Z,dropdownClassName:Gt,disabled:ft,dropdownStyle:Object.assign(Object.assign({},tt),{zIndex:xe}),maxCount:ht?F:void 0,tagRender:ht?B:void 0,dropdownRender:Le,onDropdownVisibleChange:nt})))},Ba=h.forwardRef(Zj),eB=x$(Ba,"dropdownAlign");Ba.SECRET_COMBOBOX_MODE_DO_NOT_USE=G$;Ba.Option=Ry;Ba.OptGroup=ky;Ba._InternalPanelDoNotUseOrYouWillBeFired=eB;const X$=(e,t)=>{typeof(e==null?void 0:e.addEventListener)<"u"?e.addEventListener("change",t):typeof(e==null?void 0:e.addListener)<"u"&&e.addListener(t)},Y$=(e,t)=>{typeof(e==null?void 0:e.removeEventListener)<"u"?e.removeEventListener("change",t):typeof(e==null?void 0:e.removeListener)<"u"&&e.removeListener(t)},Ra=["xxl","xl","lg","md","sm","xs"],tB=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`}),rB=e=>{const t=e,r=[].concat(Ra).reverse();return r.forEach((n,i)=>{const o=n.toUpperCase(),a=`screen${o}Min`,c=`screen${o}`;if(!(t[a]<=t[c]))throw new Error(`${a}<=${c} fails : !(${t[a]}<=${t[c]})`);if(i<r.length-1){const u=`screen${o}Max`;if(!(t[c]<=t[u]))throw new Error(`${c}<=${u} fails : !(${t[c]}<=${t[u]})`);const f=`screen${r[i+1].toUpperCase()}Min`;if(!(t[u]<=t[f]))throw new Error(`${u}<=${f} fails : !(${t[u]}<=${t[f]})`)}}),e},nB=()=>{const[,e]=fi(),t=tB(rB(e));return Q.useMemo(()=>{const r=new Map;let n=-1,i={};return{responsiveMap:t,matchHandlers:{},dispatch(o){return i=o,r.forEach(a=>a(i)),r.size>=1},subscribe(o){return r.size||this.register(),n+=1,r.set(n,o),o(i),n},unsubscribe(o){r.delete(o),r.size||this.unregister()},register(){Object.entries(t).forEach(([o,a])=>{const c=({matches:d})=>{this.dispatch(Object.assign(Object.assign({},i),{[o]:d}))},u=window.matchMedia(a);X$(u,c),this.matchHandlers[a]={mql:u,listener:c},c(u)})},unregister(){Object.values(t).forEach(o=>{const a=this.matchHandlers[o];Y$(a==null?void 0:a.mql,a==null?void 0:a.listener)}),r.clear()}}},[t])};function Py(e=!0,t={}){const r=h.useRef(t),[,n]=lI(),i=nB();return ur(()=>{const o=i.subscribe(a=>{r.current=a,e&&n()});return()=>i.unsubscribe(o)},[]),r.current}const nf=e=>e?typeof e=="function"?e():e:null;function Oy(e){var t=e.children,r=e.prefixCls,n=e.id,i=e.overlayInnerStyle,o=e.bodyClassName,a=e.className,c=e.style;return h.createElement("div",{className:re("".concat(r,"-content"),a),style:c},h.createElement("div",{className:re("".concat(r,"-inner"),o),id:n,role:"tooltip",style:i},typeof t=="function"?t():t))}var yl={shiftX:64,adjustY:1},bl={adjustX:1,shiftY:!0},Qi=[0,0],iB={left:{points:["cr","cl"],overflow:bl,offset:[-4,0],targetOffset:Qi},right:{points:["cl","cr"],overflow:bl,offset:[4,0],targetOffset:Qi},top:{points:["bc","tc"],overflow:yl,offset:[0,-4],targetOffset:Qi},bottom:{points:["tc","bc"],overflow:yl,offset:[0,4],targetOffset:Qi},topLeft:{points:["bl","tl"],overflow:yl,offset:[0,-4],targetOffset:Qi},leftTop:{points:["tr","tl"],overflow:bl,offset:[-4,0],targetOffset:Qi},topRight:{points:["br","tr"],overflow:yl,offset:[0,-4],targetOffset:Qi},rightTop:{points:["tl","tr"],overflow:bl,offset:[4,0],targetOffset:Qi},bottomRight:{points:["tr","br"],overflow:yl,offset:[0,4],targetOffset:Qi},rightBottom:{points:["bl","br"],overflow:bl,offset:[4,0],targetOffset:Qi},bottomLeft:{points:["tl","bl"],overflow:yl,offset:[0,4],targetOffset:Qi},leftBottom:{points:["br","bl"],overflow:bl,offset:[-4,0],targetOffset:Qi}},oB=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],sB=function(t,r){var n=t.overlayClassName,i=t.trigger,o=i===void 0?["hover"]:i,a=t.mouseEnterDelay,c=a===void 0?0:a,u=t.mouseLeaveDelay,d=u===void 0?.1:u,f=t.overlayStyle,p=t.prefixCls,g=p===void 0?"rc-tooltip":p,v=t.children,b=t.onVisibleChange,S=t.afterVisibleChange,_=t.transitionName,C=t.animation,x=t.motion,E=t.placement,k=E===void 0?"right":E,P=t.align,T=P===void 0?{}:P,O=t.destroyTooltipOnHide,N=O===void 0?!1:O,I=t.defaultVisible,z=t.getTooltipContainer,D=t.overlayInnerStyle;t.arrowContent;var M=t.overlay,j=t.id,B=t.showArrow,F=B===void 0?!0:B,W=t.classNames,V=t.styles,L=Bt(t,oB),G=Uf(j),q=h.useRef(null);h.useImperativeHandle(r,function(){return q.current});var A=X({},L);"visible"in t&&(A.popupVisible=t.visible);var U=function(){return h.createElement(Oy,{key:"content",prefixCls:g,id:G,bodyClassName:W==null?void 0:W.body,overlayInnerStyle:X(X({},D),V==null?void 0:V.body)},M)},Y=function(){var te=h.Children.only(v),ne=(te==null?void 0:te.props)||{},he=X(X({},ne),{},{"aria-describedby":M?G:null});return h.cloneElement(v,he)};return h.createElement(Xf,Re({popupClassName:re(n,W==null?void 0:W.root),prefixCls:g,popup:U,action:o,builtinPlacements:iB,popupPlacement:k,ref:q,popupAlign:T,getPopupContainer:z,onPopupVisibleChange:b,afterPopupVisibleChange:S,popupTransitionName:_,popupAnimation:C,popupMotion:x,defaultPopupVisible:I,autoDestroy:N,mouseLeaveDelay:d,popupStyle:X(X({},f),V==null?void 0:V.root),mouseEnterDelay:c,arrow:F},A),Y())};const aB=h.forwardRef(sB);function Iy(e){const{sizePopupArrow:t,borderRadiusXS:r,borderRadiusOuter:n}=e,i=t/2,o=0,a=i,c=n*1/Math.sqrt(2),u=i-n*(1-1/Math.sqrt(2)),d=i-r*(1/Math.sqrt(2)),f=n*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),p=2*i-d,g=f,v=2*i-c,b=u,S=2*i-o,_=a,C=i*Math.sqrt(2)+n*(Math.sqrt(2)-2),x=n*(Math.sqrt(2)-1),E=`polygon(${x}px 100%, 50% ${x}px, ${2*i-x}px 100%, ${x}px 100%)`,k=`path('M ${o} ${a} A ${n} ${n} 0 0 0 ${c} ${u} L ${d} ${f} A ${r} ${r} 0 0 1 ${p} ${g} L ${v} ${b} A ${n} ${n} 0 0 0 ${S} ${_} Z')`;return{arrowShadowWidth:C,arrowPath:k,arrowPolygon:E}}const lB=(e,t,r)=>{const{sizePopupArrow:n,arrowPolygon:i,arrowPath:o,arrowShadowWidth:a,borderRadiusXS:c,calc:u}=e;return{pointerEvents:"none",width:n,height:n,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:n,height:u(n).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${ee(c)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:r,zIndex:0,background:"transparent"}}},J$=8;function Yf(e){const{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?J$:n}}function sh(e,t){return e?t:{}}function Ny(e,t,r){const{componentCls:n,boxShadowPopoverArrow:i,arrowOffsetVertical:o,arrowOffsetHorizontal:a}=e,{arrowDistance:c=0,arrowPlacement:u={left:!0,right:!0,top:!0,bottom:!0}}=r||{};return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({[`${n}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},lB(e,t,i)),{"&:before":{background:t}})]},sh(!!u.top,{[[`&-placement-top > ${n}-arrow`,`&-placement-topLeft > ${n}-arrow`,`&-placement-topRight > ${n}-arrow`].join(",")]:{bottom:c,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${ee(a)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),sh(!!u.bottom,{[[`&-placement-bottom > ${n}-arrow`,`&-placement-bottomLeft > ${n}-arrow`,`&-placement-bottomRight > ${n}-arrow`].join(",")]:{top:c,transform:"translateY(-100%)"},[`&-placement-bottom > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${ee(a)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),sh(!!u.left,{[[`&-placement-left > ${n}-arrow`,`&-placement-leftTop > ${n}-arrow`,`&-placement-leftBottom > ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:c},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${n}-arrow`]:{top:o},[`&-placement-leftBottom > ${n}-arrow`]:{bottom:o}})),sh(!!u.right,{[[`&-placement-right > ${n}-arrow`,`&-placement-rightTop > ${n}-arrow`,`&-placement-rightBottom > ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:c},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${n}-arrow`]:{top:o},[`&-placement-rightBottom > ${n}-arrow`]:{bottom:o}}))}}function cB(e,t,r,n){if(n===!1)return{adjustX:!1,adjustY:!1};const i=n&&typeof n=="object"?n:{},o={};switch(e){case"top":case"bottom":o.shiftX=t.arrowOffsetHorizontal*2+r,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=t.arrowOffsetVertical*2+r,o.shiftX=!0,o.adjustX=!0;break}const a=Object.assign(Object.assign({},o),i);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const VC={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},uB={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},dB=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function Q$(e){const{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:i,borderRadius:o,visibleFirst:a}=e,c=t/2,u={},d=Yf({contentRadius:o,limitVerticalRadius:!0});return Object.keys(VC).forEach(f=>{const p=n&&uB[f]||VC[f],g=Object.assign(Object.assign({},p),{offset:[0,0],dynamicInset:!0});switch(u[f]=g,dB.has(f)&&(g.autoArrow=!1),f){case"top":case"topLeft":case"topRight":g.offset[1]=-c-i;break;case"bottom":case"bottomLeft":case"bottomRight":g.offset[1]=c+i;break;case"left":case"leftTop":case"leftBottom":g.offset[0]=-c-i;break;case"right":case"rightTop":case"rightBottom":g.offset[0]=c+i;break}if(n)switch(f){case"topLeft":case"bottomLeft":g.offset[0]=-d.arrowOffsetHorizontal-c;break;case"topRight":case"bottomRight":g.offset[0]=d.arrowOffsetHorizontal+c;break;case"leftTop":case"rightTop":g.offset[1]=-d.arrowOffsetHorizontal*2+c;break;case"leftBottom":case"rightBottom":g.offset[1]=d.arrowOffsetHorizontal*2-c;break}g.overflow=cB(f,d,t,r),a&&(g.htmlRegion="visibleFirst")}),u}const hB=e=>{const{calc:t,componentCls:r,tooltipMaxWidth:n,tooltipColor:i,tooltipBg:o,tooltipBorderRadius:a,zIndexPopup:c,controlHeight:u,boxShadowSecondary:d,paddingSM:f,paddingXS:p,arrowOffsetHorizontal:g,sizePopupArrow:v}=e,b=t(a).add(v).add(g).equal(),S=t(a).mul(2).add(v).equal();return[{[r]:Object.assign(Object.assign(Object.assign(Object.assign({},Fr(e)),{position:"absolute",zIndex:c,display:"block",width:"max-content",maxWidth:n,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":o,[`${r}-inner`]:{minWidth:S,minHeight:u,padding:`${ee(e.calc(f).div(2).equal())} ${ee(p)}`,color:`var(--ant-tooltip-color, ${i})`,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:a,boxShadow:d,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:b},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${r}-inner`]:{borderRadius:e.min(a,J$)}},[`${r}-content`]:{position:"relative"}}),Of(e,(_,{darkColor:C})=>({[`&${r}-${_}`]:{[`${r}-inner`]:{backgroundColor:C},[`${r}-arrow`]:{"--antd-arrow-background-color":C}}}))),{"&-rtl":{direction:"rtl"}})},Ny(e,"var(--antd-arrow-background-color)"),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},fB=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},Yf({contentRadius:e.borderRadius,limitVerticalRadius:!0})),Iy(er(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),Z$=(e,t=!0)=>gr("Tooltip",n=>{const{borderRadius:i,colorTextLightSolid:o,colorBgSpotlight:a}=n,c=er(n,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:i,tooltipBg:a});return[hB(c),Du(n,"zoom-big-fast")]},fB,{resetStyle:!1,injectStyle:t})(e),mB=Xs.map(e=>`${e}-inverse`),pB=["success","processing","error","default","warning"];function Jf(e,t=!0){return t?[].concat(We(mB),We(Xs)).includes(e):Xs.includes(e)}function gB(e){return pB.includes(e)}function ek(e,t){const r=Jf(t),n=re({[`${e}-${t}`]:t&&r}),i={},o={},a=nN(t).toRgb(),u=(.299*a.r+.587*a.g+.114*a.b)/255<.5?"#FFF":"#000";return t&&!r&&(i.background=t,i["--ant-tooltip-color"]=u,o["--antd-arrow-background-color"]=t),{className:n,overlayStyle:i,arrowStyle:o}}const vB=e=>{const{prefixCls:t,className:r,placement:n="top",title:i,color:o,overlayInnerStyle:a}=e,{getPrefixCls:c}=h.useContext(Pt),u=c("tooltip",t),[d,f,p]=Z$(u),g=ek(u,o),v=g.arrowStyle,b=Object.assign(Object.assign({},a),g.overlayStyle),S=re(f,p,u,`${u}-pure`,`${u}-placement-${n}`,r,g.className);return d(h.createElement("div",{className:S,style:v},h.createElement("div",{className:`${u}-arrow`}),h.createElement(Oy,Object.assign({},e,{className:f,prefixCls:u,overlayInnerStyle:b}),i)))};var yB=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const bB=h.forwardRef((e,t)=>{var r,n;const{prefixCls:i,openClassName:o,getTooltipContainer:a,color:c,overlayInnerStyle:u,children:d,afterOpenChange:f,afterVisibleChange:p,destroyTooltipOnHide:g,destroyOnHidden:v,arrow:b=!0,title:S,overlay:_,builtinPlacements:C,arrowPointAtCenter:x=!1,autoAdjustOverflow:E=!0,motion:k,getPopupContainer:P,placement:T="top",mouseEnterDelay:O=.1,mouseLeaveDelay:N=.1,overlayStyle:I,rootClassName:z,overlayClassName:D,styles:M,classNames:j}=e,B=yB(e,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","destroyOnHidden","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),F=!!b,[,W]=fi(),{getPopupContainer:V,getPrefixCls:L,direction:G,className:q,style:A,classNames:U,styles:Y}=Un("tooltip"),Z=Tf(),te=h.useRef(null),ne=()=>{var Xe;(Xe=te.current)===null||Xe===void 0||Xe.forceAlign()};h.useImperativeHandle(t,()=>{var Xe,vt;return{forceAlign:ne,forcePopupAlign:()=>{Z.deprecated(!1,"forcePopupAlign","forceAlign"),ne()},nativeElement:(Xe=te.current)===null||Xe===void 0?void 0:Xe.nativeElement,popupElement:(vt=te.current)===null||vt===void 0?void 0:vt.popupElement}});const[he,me]=Qr(!1,{value:(r=e.open)!==null&&r!==void 0?r:e.visible,defaultValue:(n=e.defaultOpen)!==null&&n!==void 0?n:e.defaultVisible}),ue=!S&&!_&&S!==0,Se=Xe=>{var vt,tt;me(ue?!1:Xe),ue||((vt=e.onOpenChange)===null||vt===void 0||vt.call(e,Xe),(tt=e.onVisibleChange)===null||tt===void 0||tt.call(e,Xe))},ae=h.useMemo(()=>{var Xe,vt;let tt=x;return typeof b=="object"&&(tt=(vt=(Xe=b.pointAtCenter)!==null&&Xe!==void 0?Xe:b.arrowPointAtCenter)!==null&&vt!==void 0?vt:x),C||Q$({arrowPointAtCenter:tt,autoAdjustOverflow:E,arrowWidth:F?W.sizePopupArrow:0,borderRadius:W.borderRadius,offset:W.marginXXS,visibleFirst:!0})},[x,b,C,W]),le=h.useMemo(()=>S===0?S:_||S||"",[_,S]),ce=h.createElement(Wu,{space:!0},typeof le=="function"?le():le),ye=L("tooltip",i),fe=L(),de=e["data-popover-inject"];let be=he;!("open"in e)&&!("visible"in e)&&ue&&(be=!1);const Ce=h.isValidElement(d)&&!EE(d)?d:h.createElement("span",null,d),Te=Ce.props,ze=!Te.className||typeof Te.className=="string"?re(Te.className,o||`${ye}-open`):Te.className,[Ee,$e,je]=Z$(ye,!de),Oe=ek(ye,c),Qe=Oe.arrowStyle,st=re(D,{[`${ye}-rtl`]:G==="rtl"},Oe.className,z,$e,je,q,U.root,j==null?void 0:j.root),Et=re(U.body,j==null?void 0:j.body),[mt,Je]=ec("Tooltip",B.zIndex),ht=h.createElement(aB,Object.assign({},B,{zIndex:mt,showArrow:F,placement:T,mouseEnterDelay:O,mouseLeaveDelay:N,prefixCls:ye,classNames:{root:st,body:Et},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Qe),Y.root),A),I),M==null?void 0:M.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},Y.body),u),M==null?void 0:M.body),Oe.overlayStyle)},getTooltipContainer:P||a||V,ref:te,builtinPlacements:ae,overlay:ce,visible:be,onVisibleChange:Se,afterVisibleChange:f??p,arrowContent:h.createElement("span",{className:`${ye}-arrow-content`}),motion:{motionName:Fo(fe,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:v??!!g}),be?hi(Ce,{className:ze}):Ce);return Ee(h.createElement(ju.Provider,{value:Je},ht))}),Vo=bB;Vo._InternalPanelDoNotUseOrYouWillBeFired=vB;const _B=e=>{const{componentCls:t,popoverColor:r,titleMinWidth:n,fontWeightStrong:i,innerPadding:o,boxShadowSecondary:a,colorTextHeading:c,borderRadiusLG:u,zIndexPopup:d,titleMarginBottom:f,colorBgElevated:p,popoverBg:g,titleBorderBottom:v,innerContentPadding:b,titlePadding:S}=e;return[{[t]:Object.assign(Object.assign({},Fr(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:d,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":p,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:g,backgroundClip:"padding-box",borderRadius:u,boxShadow:a,padding:o},[`${t}-title`]:{minWidth:n,marginBottom:f,color:c,fontWeight:i,borderBottom:v,padding:S},[`${t}-inner-content`]:{color:r,padding:b}})},Ny(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]},SB=e=>{const{componentCls:t}=e;return{[t]:Xs.map(r=>{const n=e[`${r}6`];return{[`&${t}-${r}`]:{"--antd-arrow-background-color":n,[`${t}-inner`]:{backgroundColor:n},[`${t}-arrow`]:{background:"transparent"}}}})}},CB=e=>{const{lineWidth:t,controlHeight:r,fontHeight:n,padding:i,wireframe:o,zIndexPopupBase:a,borderRadiusLG:c,marginXS:u,lineType:d,colorSplit:f,paddingSM:p}=e,g=r-n,v=g/2,b=g/2-t,S=i;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:a+30},Iy(e)),Yf({contentRadius:c,limitVerticalRadius:!0})),{innerPadding:o?0:12,titleMarginBottom:o?0:u,titlePadding:o?`${v}px ${S}px ${b}px`:0,titleBorderBottom:o?`${t}px ${d} ${f}`:"none",innerContentPadding:o?`${p}px ${S}px`:0})},tk=gr("Popover",e=>{const{colorBgElevated:t,colorText:r}=e,n=er(e,{popoverBg:t,popoverColor:r});return[_B(n),SB(n),Du(n,"zoom-big")]},CB,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]});var wB=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const rk=({title:e,content:t,prefixCls:r})=>!e&&!t?null:h.createElement(h.Fragment,null,e&&h.createElement("div",{className:`${r}-title`},e),t&&h.createElement("div",{className:`${r}-inner-content`},t)),xB=e=>{const{hashId:t,prefixCls:r,className:n,style:i,placement:o="top",title:a,content:c,children:u}=e,d=nf(a),f=nf(c),p=re(t,r,`${r}-pure`,`${r}-placement-${o}`,n);return h.createElement("div",{className:p,style:i},h.createElement("div",{className:`${r}-arrow`}),h.createElement(Oy,Object.assign({},e,{className:t,prefixCls:r}),u||h.createElement(rk,{prefixCls:r,title:d,content:f})))},EB=e=>{const{prefixCls:t,className:r}=e,n=wB(e,["prefixCls","className"]),{getPrefixCls:i}=h.useContext(Pt),o=i("popover",t),[a,c,u]=tk(o);return a(h.createElement(xB,Object.assign({},n,{prefixCls:o,hashId:c,className:re(r,u)})))};var $B=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const kB=h.forwardRef((e,t)=>{var r,n;const{prefixCls:i,title:o,content:a,overlayClassName:c,placement:u="top",trigger:d="hover",children:f,mouseEnterDelay:p=.1,mouseLeaveDelay:g=.1,onOpenChange:v,overlayStyle:b={},styles:S,classNames:_}=e,C=$B(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:x,className:E,style:k,classNames:P,styles:T}=Un("popover"),O=x("popover",i),[N,I,z]=tk(O),D=x(),M=re(c,I,z,E,P.root,_==null?void 0:_.root),j=re(P.body,_==null?void 0:_.body),[B,F]=Qr(!1,{value:(r=e.open)!==null&&r!==void 0?r:e.visible,defaultValue:(n=e.defaultOpen)!==null&&n!==void 0?n:e.defaultVisible}),W=(A,U)=>{F(A,!0),v==null||v(A,U)},V=A=>{A.keyCode===Ge.ESC&&W(!1,A)},L=A=>{W(A)},G=nf(o),q=nf(a);return N(h.createElement(Vo,Object.assign({placement:u,trigger:d,mouseEnterDelay:p,mouseLeaveDelay:g},C,{prefixCls:O,classNames:{root:M,body:j},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},T.root),k),b),S==null?void 0:S.root),body:Object.assign(Object.assign({},T.body),S==null?void 0:S.body)},ref:t,open:B,onOpenChange:L,overlay:G||q?h.createElement(rk,{prefixCls:O,title:G,content:q}):null,transitionName:Fo(D,"zoom-big",C.transitionName),"data-popover-inject":!0}),hi(f,{onKeyDown:A=>{var U,Y;h.isValidElement(f)&&((Y=f==null?void 0:(U=f.props).onKeyDown)===null||Y===void 0||Y.call(U,A)),V(A)}})))}),e0=kB;e0._InternalPanelDoNotUseOrYouWillBeFired=EB;const RB=new Xt("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),TB=new Xt("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),PB=new Xt("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),OB=new Xt("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),IB=new Xt("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),NB=new Xt("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),MB=e=>{const{componentCls:t,iconCls:r,antCls:n,badgeShadowSize:i,textFontSize:o,textFontSizeSM:a,statusSize:c,dotSize:u,textFontWeight:d,indicatorHeight:f,indicatorHeightSM:p,marginXS:g,calc:v}=e,b=`${n}-scroll-number`,S=Of(e,(_,{darkColor:C})=>({[`&${t} ${t}-color-${_}`]:{background:C,[`&:not(${t}-count)`]:{color:C},"a:hover &":{background:C}}}));return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},Fr(e)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:f,height:f,color:e.badgeTextColor,fontWeight:d,fontSize:o,lineHeight:ee(f),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:v(f).div(2).equal(),boxShadow:`0 0 0 ${ee(i)} ${e.badgeShadowColor}`,transition:`background ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:p,height:p,fontSize:a,lineHeight:ee(p),borderRadius:v(p).div(2).equal()},[`${t}-multiple-words`]:{padding:`0 ${ee(e.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:u,minWidth:u,height:u,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${ee(i)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${b}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${r}-spin`]:{animationName:NB,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:c,height:c,verticalAlign:"middle",borderRadius:"50%"},[`${t}-status-success`]:{backgroundColor:e.colorSuccess},[`${t}-status-processing`]:{overflow:"visible",color:e.colorInfo,backgroundColor:e.colorInfo,borderColor:"currentcolor","&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:i,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:RB,animationDuration:e.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${t}-status-default`]:{backgroundColor:e.colorTextPlaceholder},[`${t}-status-error`]:{backgroundColor:e.colorError},[`${t}-status-warning`]:{backgroundColor:e.colorWarning},[`${t}-status-text`]:{marginInlineStart:g,color:e.colorText,fontSize:e.fontSize}}}),S),{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:TB,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:PB,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:OB,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:IB,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${b}-custom-component, ${t}-count`]:{transform:"none"},[`${b}-custom-component, ${b}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[b]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${b}-only`]:{position:"relative",display:"inline-block",height:f,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${b}-only-unit`]:{height:f,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${b}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${b}-custom-component`]:{transform:"translate(-50%, -50%)"}}})}},nk=e=>{const{fontHeight:t,lineWidth:r,marginXS:n,colorBorderBg:i}=e,o=t,a=r,c=e.colorTextLightSolid,u=e.colorError,d=e.colorErrorHover;return er(e,{badgeFontHeight:o,badgeShadowSize:a,badgeTextColor:c,badgeColor:u,badgeColorHover:d,badgeShadowColor:i,badgeProcessingDuration:"1.2s",badgeRibbonOffset:n,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},ik=e=>{const{fontSize:t,lineHeight:r,fontSizeSM:n,lineWidth:i}=e;return{indicatorZIndex:"auto",indicatorHeight:Math.round(t*r)-2*i,indicatorHeightSM:t,dotSize:n/2,textFontSize:n,textFontSizeSM:n,textFontWeight:"normal",statusSize:n/2}},zB=gr("Badge",e=>{const t=nk(e);return MB(t)},ik),jB=e=>{const{antCls:t,badgeFontHeight:r,marginXS:n,badgeRibbonOffset:i,calc:o}=e,a=`${t}-ribbon`,c=`${t}-ribbon-wrapper`,u=Of(e,(d,{darkColor:f})=>({[`&${a}-color-${d}`]:{background:f,color:f}}));return{[c]:{position:"relative"},[a]:Object.assign(Object.assign(Object.assign(Object.assign({},Fr(e)),{position:"absolute",top:n,padding:`0 ${ee(e.paddingXS)}`,color:e.colorPrimary,lineHeight:ee(r),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${a}-text`]:{color:e.badgeTextColor},[`${a}-corner`]:{position:"absolute",top:"100%",width:i,height:i,color:"currentcolor",border:`${ee(o(i).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter}}),u),{[`&${a}-placement-end`]:{insetInlineEnd:o(i).mul(-1).equal(),borderEndEndRadius:0,[`${a}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${a}-placement-start`]:{insetInlineStart:o(i).mul(-1).equal(),borderEndStartRadius:0,[`${a}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},BB=gr(["Badge","Ribbon"],e=>{const t=nk(e);return jB(t)},ik),LB=e=>{const{className:t,prefixCls:r,style:n,color:i,children:o,text:a,placement:c="end",rootClassName:u}=e,{getPrefixCls:d,direction:f}=h.useContext(Pt),p=d("ribbon",r),g=`${p}-wrapper`,[v,b,S]=BB(p,g),_=Jf(i,!1),C=re(p,`${p}-placement-${c}`,{[`${p}-rtl`]:f==="rtl",[`${p}-color-${i}`]:_},t),x={},E={};return i&&!_&&(x.background=i,E.color=i),v(h.createElement("div",{className:re(g,u,b,S)},o,h.createElement("div",{className:re(C,b),style:Object.assign(Object.assign({},x),n)},h.createElement("span",{className:`${p}-text`},a),h.createElement("div",{className:`${p}-corner`,style:E}))))},UC=e=>{const{prefixCls:t,value:r,current:n,offset:i=0}=e;let o;return i&&(o={position:"absolute",top:`${i}00%`,left:0}),h.createElement("span",{style:o,className:re(`${t}-only-unit`,{current:n})},r)};function DB(e,t,r){let n=e,i=0;for(;(n+10)%10!==t;)n+=r,i+=r;return i}const AB=e=>{const{prefixCls:t,count:r,value:n}=e,i=Number(n),o=Math.abs(r),[a,c]=h.useState(i),[u,d]=h.useState(o),f=()=>{c(i),d(o)};h.useEffect(()=>{const v=setTimeout(f,1e3);return()=>clearTimeout(v)},[i]);let p,g;if(a===i||Number.isNaN(i)||Number.isNaN(a))p=[h.createElement(UC,Object.assign({},e,{key:i,current:!0}))],g={transition:"none"};else{p=[];const v=i+10,b=[];for(let x=i;x<=v;x+=1)b.push(x);const S=u<o?1:-1,_=b.findIndex(x=>x%10===a);p=(S<0?b.slice(0,_+1):b.slice(_)).map((x,E)=>{const k=x%10;return h.createElement(UC,Object.assign({},e,{key:x,value:k,offset:S<0?E-_:E,current:E===_}))}),g={transform:`translateY(${-DB(a,i,S)}00%)`}}return h.createElement("span",{className:`${t}-only`,style:g,onTransitionEnd:f},p)};var HB=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const FB=h.forwardRef((e,t)=>{const{prefixCls:r,count:n,className:i,motionClassName:o,style:a,title:c,show:u,component:d="sup",children:f}=e,p=HB(e,["prefixCls","count","className","motionClassName","style","title","show","component","children"]),{getPrefixCls:g}=h.useContext(Pt),v=g("scroll-number",r),b=Object.assign(Object.assign({},p),{"data-show":u,style:a,className:re(v,i,o),title:c});let S=n;if(n&&Number(n)%1===0){const _=String(n).split("");S=h.createElement("bdi",null,_.map((C,x)=>h.createElement(AB,{prefixCls:v,count:Number(n),value:C,key:_.length-x})))}return a!=null&&a.borderColor&&(b.style=Object.assign(Object.assign({},a),{boxShadow:`0 0 0 1px ${a.borderColor} inset`})),f?hi(f,_=>({className:re(`${v}-custom-component`,_==null?void 0:_.className,o)})):h.createElement(d,Object.assign({},b,{ref:t}),S)});var WB=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const VB=h.forwardRef((e,t)=>{var r,n,i,o,a;const{prefixCls:c,scrollNumberPrefixCls:u,children:d,status:f,text:p,color:g,count:v=null,overflowCount:b=99,dot:S=!1,size:_="default",title:C,offset:x,style:E,className:k,rootClassName:P,classNames:T,styles:O,showZero:N=!1}=e,I=WB(e,["prefixCls","scrollNumberPrefixCls","children","status","text","color","count","overflowCount","dot","size","title","offset","style","className","rootClassName","classNames","styles","showZero"]),{getPrefixCls:z,direction:D,badge:M}=h.useContext(Pt),j=z("badge",c),[B,F,W]=zB(j),V=v>b?`${b}+`:v,L=V==="0"||V===0||p==="0"||p===0,G=v===null||L&&!N,q=(f!=null||g!=null)&&G,A=f!=null||!L,U=S&&!L,Y=U?"":V,Z=h.useMemo(()=>((Y==null||Y==="")&&(p==null||p==="")||L&&!N)&&!U,[Y,L,N,U,p]),te=h.useRef(v);Z||(te.current=v);const ne=te.current,he=h.useRef(Y);Z||(he.current=Y);const me=he.current,ue=h.useRef(U);Z||(ue.current=U);const Se=h.useMemo(()=>{if(!x)return Object.assign(Object.assign({},M==null?void 0:M.style),E);const Te={marginTop:x[1]};return D==="rtl"?Te.left=Number.parseInt(x[0],10):Te.right=-Number.parseInt(x[0],10),Object.assign(Object.assign(Object.assign({},Te),M==null?void 0:M.style),E)},[D,x,E,M==null?void 0:M.style]),ae=C??(typeof ne=="string"||typeof ne=="number"?ne:void 0),le=!Z&&(p===0?N:!!p&&p!==!0),ce=le?h.createElement("span",{className:`${j}-status-text`},p):null,ye=!ne||typeof ne!="object"?void 0:hi(ne,Te=>({style:Object.assign(Object.assign({},Se),Te.style)})),fe=Jf(g,!1),de=re(T==null?void 0:T.indicator,(r=M==null?void 0:M.classNames)===null||r===void 0?void 0:r.indicator,{[`${j}-status-dot`]:q,[`${j}-status-${f}`]:!!f,[`${j}-color-${g}`]:fe}),be={};g&&!fe&&(be.color=g,be.background=g);const Ce=re(j,{[`${j}-status`]:q,[`${j}-not-a-wrapper`]:!d,[`${j}-rtl`]:D==="rtl"},k,P,M==null?void 0:M.className,(n=M==null?void 0:M.classNames)===null||n===void 0?void 0:n.root,T==null?void 0:T.root,F,W);if(!d&&q&&(p||A||!G)){const Te=Se.color;return B(h.createElement("span",Object.assign({},I,{className:Ce,style:Object.assign(Object.assign(Object.assign({},O==null?void 0:O.root),(i=M==null?void 0:M.styles)===null||i===void 0?void 0:i.root),Se)}),h.createElement("span",{className:de,style:Object.assign(Object.assign(Object.assign({},O==null?void 0:O.indicator),(o=M==null?void 0:M.styles)===null||o===void 0?void 0:o.indicator),be)}),le&&h.createElement("span",{style:{color:Te},className:`${j}-status-text`},p)))}return B(h.createElement("span",Object.assign({ref:t},I,{className:Ce,style:Object.assign(Object.assign({},(a=M==null?void 0:M.styles)===null||a===void 0?void 0:a.root),O==null?void 0:O.root)}),d,h.createElement(Hi,{visible:!Z,motionName:`${j}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:Te})=>{var ze,Ee;const $e=z("scroll-number",u),je=ue.current,Oe=re(T==null?void 0:T.indicator,(ze=M==null?void 0:M.classNames)===null||ze===void 0?void 0:ze.indicator,{[`${j}-dot`]:je,[`${j}-count`]:!je,[`${j}-count-sm`]:_==="small",[`${j}-multiple-words`]:!je&&me&&me.toString().length>1,[`${j}-status-${f}`]:!!f,[`${j}-color-${g}`]:fe});let Qe=Object.assign(Object.assign(Object.assign({},O==null?void 0:O.indicator),(Ee=M==null?void 0:M.styles)===null||Ee===void 0?void 0:Ee.indicator),Se);return g&&!fe&&(Qe=Qe||{},Qe.background=g),h.createElement(FB,{prefixCls:$e,show:!Z,motionClassName:Te,className:Oe,count:me,title:ae,style:Qe,key:"scrollNumber"},ye)}),ce))}),ok=VB;ok.Ribbon=LB;var UB={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},qB=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:UB}))},wu=h.forwardRef(qB),KB=Ge.ESC,GB=Ge.TAB;function XB(e){var t=e.visible,r=e.triggerRef,n=e.onVisibleChange,i=e.autoFocus,o=e.overlayRef,a=h.useRef(!1),c=function(){if(t){var p,g;(p=r.current)===null||p===void 0||(g=p.focus)===null||g===void 0||g.call(p),n==null||n(!1)}},u=function(){var p;return(p=o.current)!==null&&p!==void 0&&p.focus?(o.current.focus(),a.current=!0,!0):!1},d=function(p){switch(p.keyCode){case KB:c();break;case GB:{var g=!1;a.current||(g=u()),g?p.preventDefault():c();break}}};h.useEffect(function(){return t?(window.addEventListener("keydown",d),i&&$r(u,3),function(){window.removeEventListener("keydown",d),a.current=!1}):function(){a.current=!1}},[t])}var YB=h.forwardRef(function(e,t){var r=e.overlay,n=e.arrow,i=e.prefixCls,o=h.useMemo(function(){var c;return typeof r=="function"?c=r():c=r,c},[r]),a=co(t,Ma(o));return Q.createElement(Q.Fragment,null,n&&Q.createElement("div",{className:"".concat(i,"-arrow")}),Q.cloneElement(o,{ref:Qs(o)?a:void 0}))}),_l={adjustX:1,adjustY:1},Sl=[0,0],JB={topLeft:{points:["bl","tl"],overflow:_l,offset:[0,-4],targetOffset:Sl},top:{points:["bc","tc"],overflow:_l,offset:[0,-4],targetOffset:Sl},topRight:{points:["br","tr"],overflow:_l,offset:[0,-4],targetOffset:Sl},bottomLeft:{points:["tl","bl"],overflow:_l,offset:[0,4],targetOffset:Sl},bottom:{points:["tc","bc"],overflow:_l,offset:[0,4],targetOffset:Sl},bottomRight:{points:["tr","br"],overflow:_l,offset:[0,4],targetOffset:Sl}},QB=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function ZB(e,t){var r,n=e.arrow,i=n===void 0?!1:n,o=e.prefixCls,a=o===void 0?"rc-dropdown":o,c=e.transitionName,u=e.animation,d=e.align,f=e.placement,p=f===void 0?"bottomLeft":f,g=e.placements,v=g===void 0?JB:g,b=e.getPopupContainer,S=e.showAction,_=e.hideAction,C=e.overlayClassName,x=e.overlayStyle,E=e.visible,k=e.trigger,P=k===void 0?["hover"]:k,T=e.autoFocus,O=e.overlay,N=e.children,I=e.onVisibleChange,z=Bt(e,QB),D=Q.useState(),M=se(D,2),j=M[0],B=M[1],F="visible"in e?E:j,W=Q.useRef(null),V=Q.useRef(null),L=Q.useRef(null);Q.useImperativeHandle(t,function(){return W.current});var G=function(me){B(me),I==null||I(me)};XB({visible:F,triggerRef:L,onVisibleChange:G,autoFocus:T,overlayRef:V});var q=function(me){var ue=e.onOverlayClick;B(!1),ue&&ue(me)},A=function(){return Q.createElement(YB,{ref:V,overlay:O,prefixCls:a,arrow:i})},U=function(){return typeof O=="function"?A:A()},Y=function(){var me=e.minOverlayWidthMatchTrigger,ue=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?me:!ue},Z=function(){var me=e.openClassName;return me!==void 0?me:"".concat(a,"-open")},te=Q.cloneElement(N,{className:re((r=N.props)===null||r===void 0?void 0:r.className,F&&Z()),ref:Qs(N)?co(L,Ma(N)):void 0}),ne=_;return!ne&&P.indexOf("contextMenu")!==-1&&(ne=["click"]),Q.createElement(Xf,Re({builtinPlacements:v},z,{prefixCls:a,ref:W,popupClassName:re(C,K({},"".concat(a,"-show-arrow"),i)),popupStyle:x,action:P,showAction:S,hideAction:ne,popupPlacement:p,popupAlign:d,popupTransitionName:c,popupAnimation:u,popupVisible:F,stretch:Y()?"minWidth":"",popup:U(),onPopupVisibleChange:G,onPopupClick:q,getPopupContainer:b}),te)}const sk=Q.forwardRef(ZB),eL=e=>typeof e!="object"&&typeof e!="function"||e===null;var ak=h.createContext(null);function lk(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function ck(e){var t=h.useContext(ak);return lk(t,e)}var tL=["children","locked"],$o=h.createContext(null);function rL(e,t){var r=X({},e);return Object.keys(t).forEach(function(n){var i=t[n];i!==void 0&&(r[n]=i)}),r}function xu(e){var t=e.children,r=e.locked,n=Bt(e,tL),i=h.useContext($o),o=Iu(function(){return rL(i,n)},[i,n],function(a,c){return!r&&(a[0]!==c[0]||!pu(a[1],c[1],!0))});return h.createElement($o.Provider,{value:o},t)}var nL=[],uk=h.createContext(null);function Qf(){return h.useContext(uk)}var dk=h.createContext(nL);function rc(e){var t=h.useContext(dk);return h.useMemo(function(){return e!==void 0?[].concat(We(t),[e]):t},[t,e])}var hk=h.createContext(null),My=h.createContext({});function qC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(gy(e)){var r=e.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(r)||e.isContentEditable||r==="a"&&!!e.getAttribute("href"),i=e.getAttribute("tabindex"),o=Number(i),a=null;return i&&!Number.isNaN(o)?a=o:n&&a===null&&(a=0),n&&e.disabled&&(a=null),a!==null&&(a>=0||t&&a<0)}return!1}function iL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=We(e.querySelectorAll("*")).filter(function(n){return qC(n,t)});return qC(e,t)&&r.unshift(e),r}var t0=Ge.LEFT,r0=Ge.RIGHT,n0=Ge.UP,Oh=Ge.DOWN,Ih=Ge.ENTER,fk=Ge.ESC,jc=Ge.HOME,Bc=Ge.END,KC=[n0,Oh,t0,r0];function oL(e,t,r,n){var i,o="prev",a="next",c="children",u="parent";if(e==="inline"&&n===Ih)return{inlineTrigger:!0};var d=K(K({},n0,o),Oh,a),f=K(K(K(K({},t0,r?a:o),r0,r?o:a),Oh,c),Ih,c),p=K(K(K(K(K(K({},n0,o),Oh,a),Ih,c),fk,u),t0,r?c:u),r0,r?u:c),g={inline:d,horizontal:f,vertical:p,inlineSub:d,horizontalSub:p,verticalSub:p},v=(i=g["".concat(e).concat(t?"":"Sub")])===null||i===void 0?void 0:i[n];switch(v){case o:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case u:return{offset:-1,sibling:!1};case c:return{offset:1,sibling:!1};default:return null}}function sL(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function aL(e,t){for(var r=e||document.activeElement;r;){if(t.has(r))return r;r=r.parentElement}return null}function zy(e,t){var r=iL(e,!0);return r.filter(function(n){return t.has(n)})}function GC(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var i=zy(e,t),o=i.length,a=i.findIndex(function(c){return r===c});return n<0?a===-1?a=o-1:a-=1:n>0&&(a+=1),a=(a+o)%o,i[a]}var i0=function(t,r){var n=new Set,i=new Map,o=new Map;return t.forEach(function(a){var c=document.querySelector("[data-menu-id='".concat(lk(r,a),"']"));c&&(n.add(c),o.set(c,a),i.set(a,c))}),{elements:n,key2element:i,element2key:o}};function lL(e,t,r,n,i,o,a,c,u,d){var f=h.useRef(),p=h.useRef();p.current=t;var g=function(){$r.cancel(f.current)};return h.useEffect(function(){return function(){g()}},[]),function(v){var b=v.which;if([].concat(KC,[Ih,fk,jc,Bc]).includes(b)){var S=o(),_=i0(S,n),C=_,x=C.elements,E=C.key2element,k=C.element2key,P=E.get(t),T=aL(P,x),O=k.get(T),N=oL(e,a(O,!0).length===1,r,b);if(!N&&b!==jc&&b!==Bc)return;(KC.includes(b)||[jc,Bc].includes(b))&&v.preventDefault();var I=function(V){if(V){var L=V,G=V.querySelector("a");G!=null&&G.getAttribute("href")&&(L=G);var q=k.get(V);c(q),g(),f.current=$r(function(){p.current===q&&L.focus()})}};if([jc,Bc].includes(b)||N.sibling||!T){var z;!T||e==="inline"?z=i.current:z=sL(T);var D,M=zy(z,x);b===jc?D=M[0]:b===Bc?D=M[M.length-1]:D=GC(z,x,T,N.offset),I(D)}else if(N.inlineTrigger)u(O);else if(N.offset>0)u(O,!0),g(),f.current=$r(function(){_=i0(S,n);var W=T.getAttribute("aria-controls"),V=document.getElementById(W),L=GC(V,_.elements);I(L)},5);else if(N.offset<0){var j=a(O,!0),B=j[j.length-2],F=E.get(B);u(B,!1),I(F)}}d==null||d(v)}}function cL(e){Promise.resolve().then(e)}var jy="__RC_UTIL_PATH_SPLIT__",XC=function(t){return t.join(jy)},uL=function(t){return t.split(jy)},o0="rc-menu-more";function dL(){var e=h.useState({}),t=se(e,2),r=t[1],n=h.useRef(new Map),i=h.useRef(new Map),o=h.useState([]),a=se(o,2),c=a[0],u=a[1],d=h.useRef(0),f=h.useRef(!1),p=function(){f.current||r({})},g=h.useCallback(function(E,k){var P=XC(k);i.current.set(P,E),n.current.set(E,P),d.current+=1;var T=d.current;cL(function(){T===d.current&&p()})},[]),v=h.useCallback(function(E,k){var P=XC(k);i.current.delete(P),n.current.delete(E)},[]),b=h.useCallback(function(E){u(E)},[]),S=h.useCallback(function(E,k){var P=n.current.get(E)||"",T=uL(P);return k&&c.includes(T[0])&&T.unshift(o0),T},[c]),_=h.useCallback(function(E,k){return E.filter(function(P){return P!==void 0}).some(function(P){var T=S(P,!0);return T.includes(k)})},[S]),C=function(){var k=We(n.current.keys());return c.length&&k.push(o0),k},x=h.useCallback(function(E){var k="".concat(n.current.get(E)).concat(jy),P=new Set;return We(i.current.keys()).forEach(function(T){T.startsWith(k)&&P.add(i.current.get(T))}),P},[]);return h.useEffect(function(){return function(){f.current=!0}},[]),{registerPath:g,unregisterPath:v,refreshOverflowKeys:b,isSubPathKey:_,getKeyPath:S,getKeys:C,getSubPathKeys:x}}function Jc(e){var t=h.useRef(e);t.current=e;var r=h.useCallback(function(){for(var n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(n=t.current)===null||n===void 0?void 0:n.call.apply(n,[t].concat(o))},[]);return e?r:void 0}var hL=Math.random().toFixed(5).toString().slice(2),YC=0;function fL(e){var t=Qr(e,{value:e}),r=se(t,2),n=r[0],i=r[1];return h.useEffect(function(){YC+=1;var o="".concat(hL,"-").concat(YC);i("rc-menu-uuid-".concat(o))},[]),n}function mk(e,t,r,n){var i=h.useContext($o),o=i.activeKey,a=i.onActive,c=i.onInactive,u={active:o===e};return t||(u.onMouseEnter=function(d){r==null||r({key:e,domEvent:d}),a(e)},u.onMouseLeave=function(d){n==null||n({key:e,domEvent:d}),c(e)}),u}function pk(e){var t=h.useContext($o),r=t.mode,n=t.rtl,i=t.inlineIndent;if(r!=="inline")return null;var o=e;return n?{paddingRight:o*i}:{paddingLeft:o*i}}function gk(e){var t=e.icon,r=e.props,n=e.children,i;return t===null||t===!1?null:(typeof t=="function"?i=h.createElement(t,X({},r)):typeof t!="boolean"&&(i=t),i||n||null)}var mL=["item"];function of(e){var t=e.item,r=Bt(e,mL);return Object.defineProperty(r,"item",{get:function(){return jn(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),r}var pL=["title","attribute","elementRef"],gL=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],vL=["active"],yL=(function(e){ds(r,e);var t=hs(r);function r(){return pn(this,r),t.apply(this,arguments)}return gn(r,[{key:"render",value:function(){var i=this.props,o=i.title,a=i.attribute,c=i.elementRef,u=Bt(i,pL),d=un(u,["eventKey","popupClassName","popupOffset","onTitleClick"]);return jn(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),h.createElement(Ao.Item,Re({},a,{title:typeof o=="string"?o:void 0},d,{ref:c}))}}]),r})(h.Component),bL=h.forwardRef(function(e,t){var r=e.style,n=e.className,i=e.eventKey;e.warnKey;var o=e.disabled,a=e.itemIcon,c=e.children,u=e.role,d=e.onMouseEnter,f=e.onMouseLeave,p=e.onClick,g=e.onKeyDown,v=e.onFocus,b=Bt(e,gL),S=ck(i),_=h.useContext($o),C=_.prefixCls,x=_.onItemClick,E=_.disabled,k=_.overflowDisabled,P=_.itemIcon,T=_.selectedKeys,O=_.onActive,N=h.useContext(My),I=N._internalRenderMenuItem,z="".concat(C,"-item"),D=h.useRef(),M=h.useRef(),j=E||o,B=qo(t,M),F=rc(i),W=function(ue){return{key:i,keyPath:We(F).reverse(),item:D.current,domEvent:ue}},V=a||P,L=mk(i,j,d,f),G=L.active,q=Bt(L,vL),A=T.includes(i),U=pk(F.length),Y=function(ue){if(!j){var Se=W(ue);p==null||p(of(Se)),x(Se)}},Z=function(ue){if(g==null||g(ue),ue.which===Ge.ENTER){var Se=W(ue);p==null||p(of(Se)),x(Se)}},te=function(ue){O(i),v==null||v(ue)},ne={};e.role==="option"&&(ne["aria-selected"]=A);var he=h.createElement(yL,Re({ref:D,elementRef:B,role:u===null?"none":u||"menuitem",tabIndex:o?null:-1,"data-menu-id":k&&S?null:S},un(b,["extra"]),q,ne,{component:"li","aria-disabled":o,style:X(X({},U),r),className:re(z,K(K(K({},"".concat(z,"-active"),G),"".concat(z,"-selected"),A),"".concat(z,"-disabled"),j),n),onClick:Y,onKeyDown:Z,onFocus:te}),c,h.createElement(gk,{props:X(X({},e),{},{isSelected:A}),icon:V}));return I&&(he=I(he,e,{selected:A})),he});function _L(e,t){var r=e.eventKey,n=Qf(),i=rc(r);return h.useEffect(function(){if(n)return n.registerPath(r,i),function(){n.unregisterPath(r,i)}},[i]),n?null:h.createElement(bL,Re({},e,{ref:t}))}const qu=h.forwardRef(_L);var SL=["className","children"],CL=function(t,r){var n=t.className,i=t.children,o=Bt(t,SL),a=h.useContext($o),c=a.prefixCls,u=a.mode,d=a.rtl;return h.createElement("ul",Re({className:re(c,d&&"".concat(c,"-rtl"),"".concat(c,"-sub"),"".concat(c,"-").concat(u==="inline"?"inline":"vertical"),n),role:"menu"},o,{"data-menu-list":!0,ref:r}),i)},By=h.forwardRef(CL);By.displayName="SubMenuList";function Ly(e,t){return di(e).map(function(r,n){if(h.isValidElement(r)){var i,o,a=r.key,c=(i=(o=r.props)===null||o===void 0?void 0:o.eventKey)!==null&&i!==void 0?i:a,u=c==null;u&&(c="tmp_key-".concat([].concat(We(t),[n]).join("-")));var d={key:c,eventKey:c};return h.cloneElement(r,d)}return r})}var ri={adjustX:1,adjustY:1},wL={topLeft:{points:["bl","tl"],overflow:ri},topRight:{points:["br","tr"],overflow:ri},bottomLeft:{points:["tl","bl"],overflow:ri},bottomRight:{points:["tr","br"],overflow:ri},leftTop:{points:["tr","tl"],overflow:ri},leftBottom:{points:["br","bl"],overflow:ri},rightTop:{points:["tl","tr"],overflow:ri},rightBottom:{points:["bl","br"],overflow:ri}},xL={topLeft:{points:["bl","tl"],overflow:ri},topRight:{points:["br","tr"],overflow:ri},bottomLeft:{points:["tl","bl"],overflow:ri},bottomRight:{points:["tr","br"],overflow:ri},rightTop:{points:["tr","tl"],overflow:ri},rightBottom:{points:["br","bl"],overflow:ri},leftTop:{points:["tl","tr"],overflow:ri},leftBottom:{points:["bl","br"],overflow:ri}};function vk(e,t,r){if(t)return t;if(r)return r[e]||r.other}var EL={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function $L(e){var t=e.prefixCls,r=e.visible,n=e.children,i=e.popup,o=e.popupStyle,a=e.popupClassName,c=e.popupOffset,u=e.disabled,d=e.mode,f=e.onVisibleChange,p=h.useContext($o),g=p.getPopupContainer,v=p.rtl,b=p.subMenuOpenDelay,S=p.subMenuCloseDelay,_=p.builtinPlacements,C=p.triggerSubMenuAction,x=p.forceSubMenuRender,E=p.rootClassName,k=p.motion,P=p.defaultMotions,T=h.useState(!1),O=se(T,2),N=O[0],I=O[1],z=X(v?X({},xL):X({},wL),_),D=EL[d],M=vk(d,k,P),j=h.useRef(M);d!=="inline"&&(j.current=M);var B=X(X({},j.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),F=h.useRef();return h.useEffect(function(){return F.current=$r(function(){I(r)}),function(){$r.cancel(F.current)}},[r]),h.createElement(Xf,{prefixCls:t,popupClassName:re("".concat(t,"-popup"),K({},"".concat(t,"-rtl"),v),a,E),stretch:d==="horizontal"?"minWidth":null,getPopupContainer:g,builtinPlacements:z,popupPlacement:D,popupVisible:N,popup:i,popupStyle:o,popupAlign:c&&{offset:c},action:u?[]:[C],mouseEnterDelay:b,mouseLeaveDelay:S,onPopupVisibleChange:f,forceRender:x,popupMotion:B,fresh:!0},n)}function kL(e){var t=e.id,r=e.open,n=e.keyPath,i=e.children,o="inline",a=h.useContext($o),c=a.prefixCls,u=a.forceSubMenuRender,d=a.motion,f=a.defaultMotions,p=a.mode,g=h.useRef(!1);g.current=p===o;var v=h.useState(!g.current),b=se(v,2),S=b[0],_=b[1],C=g.current?r:!1;h.useEffect(function(){g.current&&_(!1)},[p]);var x=X({},vk(o,d,f));n.length>1&&(x.motionAppear=!1);var E=x.onVisibleChanged;return x.onVisibleChanged=function(k){return!g.current&&!k&&_(!0),E==null?void 0:E(k)},S?null:h.createElement(xu,{mode:o,locked:!g.current},h.createElement(Hi,Re({visible:C},x,{forceRender:u,removeOnLeave:!1,leavedClassName:"".concat(c,"-hidden")}),function(k){var P=k.className,T=k.style;return h.createElement(By,{id:t,className:P,style:T},i)}))}var RL=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],TL=["active"],PL=h.forwardRef(function(e,t){var r=e.style,n=e.className,i=e.title,o=e.eventKey;e.warnKey;var a=e.disabled,c=e.internalPopupClose,u=e.children,d=e.itemIcon,f=e.expandIcon,p=e.popupClassName,g=e.popupOffset,v=e.popupStyle,b=e.onClick,S=e.onMouseEnter,_=e.onMouseLeave,C=e.onTitleClick,x=e.onTitleMouseEnter,E=e.onTitleMouseLeave,k=Bt(e,RL),P=ck(o),T=h.useContext($o),O=T.prefixCls,N=T.mode,I=T.openKeys,z=T.disabled,D=T.overflowDisabled,M=T.activeKey,j=T.selectedKeys,B=T.itemIcon,F=T.expandIcon,W=T.onItemClick,V=T.onOpenChange,L=T.onActive,G=h.useContext(My),q=G._internalRenderSubMenuItem,A=h.useContext(hk),U=A.isSubPathKey,Y=rc(),Z="".concat(O,"-submenu"),te=z||a,ne=h.useRef(),he=h.useRef(),me=d??B,ue=f??F,Se=I.includes(o),ae=!D&&Se,le=U(j,o),ce=mk(o,te,x,E),ye=ce.active,fe=Bt(ce,TL),de=h.useState(!1),be=se(de,2),Ce=be[0],Te=be[1],ze=function(Me){te||Te(Me)},Ee=function(Me){ze(!0),S==null||S({key:o,domEvent:Me})},$e=function(Me){ze(!1),_==null||_({key:o,domEvent:Me})},je=h.useMemo(function(){return ye||(N!=="inline"?Ce||U([M],o):!1)},[N,ye,M,Ce,o,U]),Oe=pk(Y.length),Qe=function(Me){te||(C==null||C({key:o,domEvent:Me}),N==="inline"&&V(o,!Se))},st=Jc(function(nt){b==null||b(of(nt)),W(nt)}),Et=function(Me){N!=="inline"&&V(o,Me)},mt=function(){L(o)},Je=P&&"".concat(P,"-popup"),ht=h.useMemo(function(){return h.createElement(gk,{icon:N!=="horizontal"?ue:void 0,props:X(X({},e),{},{isOpen:ae,isSubMenu:!0})},h.createElement("i",{className:"".concat(Z,"-arrow")}))},[N,ue,e,ae,Z]),Xe=h.createElement("div",Re({role:"menuitem",style:Oe,className:"".concat(Z,"-title"),tabIndex:te?null:-1,ref:ne,title:typeof i=="string"?i:null,"data-menu-id":D&&P?null:P,"aria-expanded":ae,"aria-haspopup":!0,"aria-controls":Je,"aria-disabled":te,onClick:Qe,onFocus:mt},fe),i,ht),vt=h.useRef(N);if(N!=="inline"&&Y.length>1?vt.current="vertical":vt.current=N,!D){var tt=vt.current;Xe=h.createElement($L,{mode:tt,prefixCls:Z,visible:!c&&ae&&N!=="inline",popupClassName:p,popupOffset:g,popupStyle:v,popup:h.createElement(xu,{mode:tt==="horizontal"?"vertical":tt},h.createElement(By,{id:Je,ref:he},u)),disabled:te,onVisibleChange:Et},Xe)}var Le=h.createElement(Ao.Item,Re({ref:t,role:"none"},k,{component:"li",style:r,className:re(Z,"".concat(Z,"-").concat(N),n,K(K(K(K({},"".concat(Z,"-open"),ae),"".concat(Z,"-active"),je),"".concat(Z,"-selected"),le),"".concat(Z,"-disabled"),te)),onMouseEnter:Ee,onMouseLeave:$e}),Xe,!D&&h.createElement(kL,{id:Je,open:ae,keyPath:Y},u));return q&&(Le=q(Le,e,{selected:le,active:je,open:ae,disabled:te})),h.createElement(xu,{onItemClick:st,mode:N==="horizontal"?"vertical":N,itemIcon:me,expandIcon:ue},Le)}),Zf=h.forwardRef(function(e,t){var r=e.eventKey,n=e.children,i=rc(r),o=Ly(n,i),a=Qf();h.useEffect(function(){if(a)return a.registerPath(r,i),function(){a.unregisterPath(r,i)}},[i]);var c;return a?c=o:c=h.createElement(PL,Re({ref:t},e),o),h.createElement(dk.Provider,{value:i},c)});function Dy(e){var t=e.className,r=e.style,n=h.useContext($o),i=n.prefixCls,o=Qf();return o?null:h.createElement("li",{role:"separator",className:re("".concat(i,"-item-divider"),t),style:r})}var OL=["className","title","eventKey","children"],IL=h.forwardRef(function(e,t){var r=e.className,n=e.title;e.eventKey;var i=e.children,o=Bt(e,OL),a=h.useContext($o),c=a.prefixCls,u="".concat(c,"-item-group");return h.createElement("li",Re({ref:t,role:"presentation"},o,{onClick:function(f){return f.stopPropagation()},className:re(u,r)}),h.createElement("div",{role:"presentation",className:"".concat(u,"-title"),title:typeof n=="string"?n:void 0},n),h.createElement("ul",{role:"group",className:"".concat(u,"-list")},i))}),Ay=h.forwardRef(function(e,t){var r=e.eventKey,n=e.children,i=rc(r),o=Ly(n,i),a=Qf();return a?o:h.createElement(IL,Re({ref:t},un(e,["warnKey"])),o)}),NL=["label","children","key","type","extra"];function s0(e,t,r){var n=t.item,i=t.group,o=t.submenu,a=t.divider;return(e||[]).map(function(c,u){if(c&&bt(c)==="object"){var d=c,f=d.label,p=d.children,g=d.key,v=d.type,b=d.extra,S=Bt(d,NL),_=g??"tmp-".concat(u);return p||v==="group"?v==="group"?h.createElement(i,Re({key:_},S,{title:f}),s0(p,t,r)):h.createElement(o,Re({key:_},S,{title:f}),s0(p,t,r)):v==="divider"?h.createElement(a,Re({key:_},S)):h.createElement(n,Re({key:_},S,{extra:b}),f,(!!b||b===0)&&h.createElement("span",{className:"".concat(r,"-item-extra")},b))}return null}).filter(function(c){return c})}function JC(e,t,r,n,i){var o=e,a=X({divider:Dy,item:qu,group:Ay,submenu:Zf},n);return t&&(o=s0(t,a,i)),Ly(o,r)}var ML=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],da=[],zL=h.forwardRef(function(e,t){var r,n=e,i=n.prefixCls,o=i===void 0?"rc-menu":i,a=n.rootClassName,c=n.style,u=n.className,d=n.tabIndex,f=d===void 0?0:d,p=n.items,g=n.children,v=n.direction,b=n.id,S=n.mode,_=S===void 0?"vertical":S,C=n.inlineCollapsed,x=n.disabled,E=n.disabledOverflow,k=n.subMenuOpenDelay,P=k===void 0?.1:k,T=n.subMenuCloseDelay,O=T===void 0?.1:T,N=n.forceSubMenuRender,I=n.defaultOpenKeys,z=n.openKeys,D=n.activeKey,M=n.defaultActiveFirst,j=n.selectable,B=j===void 0?!0:j,F=n.multiple,W=F===void 0?!1:F,V=n.defaultSelectedKeys,L=n.selectedKeys,G=n.onSelect,q=n.onDeselect,A=n.inlineIndent,U=A===void 0?24:A,Y=n.motion,Z=n.defaultMotions,te=n.triggerSubMenuAction,ne=te===void 0?"hover":te,he=n.builtinPlacements,me=n.itemIcon,ue=n.expandIcon,Se=n.overflowedIndicator,ae=Se===void 0?"...":Se,le=n.overflowedIndicatorPopupClassName,ce=n.getPopupContainer,ye=n.onClick,fe=n.onOpenChange,de=n.onKeyDown;n.openAnimation,n.openTransitionName;var be=n._internalRenderMenuItem,Ce=n._internalRenderSubMenuItem,Te=n._internalComponents,ze=Bt(n,ML),Ee=h.useMemo(function(){return[JC(g,p,da,Te,o),JC(g,p,da,{},o)]},[g,p,Te]),$e=se(Ee,2),je=$e[0],Oe=$e[1],Qe=h.useState(!1),st=se(Qe,2),Et=st[0],mt=st[1],Je=h.useRef(),ht=fL(b),Xe=v==="rtl",vt=Qr(I,{value:z,postState:function(ct){return ct||da}}),tt=se(vt,2),Le=tt[0],nt=tt[1],Me=function(ct){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function or(){nt(ct),fe==null||fe(ct)}ot?qs.flushSync(or):or()},qe=h.useState(Le),Ot=se(qe,2),_t=Ot[0],tr=Ot[1],Yt=h.useRef(!1),vr=h.useMemo(function(){return(_==="inline"||_==="vertical")&&C?["vertical",C]:[_,!1]},[_,C]),Tr=se(vr,2),nr=Tr[0],At=Tr[1],kt=nr==="inline",ir=h.useState(nr),Gt=se(ir,2),it=Gt[0],xt=Gt[1],ft=h.useState(At),Ie=se(ft,2),ke=Ie[0],xe=Ie[1];h.useEffect(function(){xt(nr),xe(At),Yt.current&&(kt?nt(_t):Me(da))},[nr,At]);var De=h.useState(0),et=se(De,2),rt=et[0],Ht=et[1],qt=rt>=je.length-1||it!=="horizontal"||E;h.useEffect(function(){kt&&tr(Le)},[Le]),h.useEffect(function(){return Yt.current=!0,function(){Yt.current=!1}},[]);var jt=dL(),Lt=jt.registerPath,kr=jt.unregisterPath,wr=jt.refreshOverflowKeys,Pr=jt.isSubPathKey,Lr=jt.getKeyPath,sr=jt.getKeys,dr=jt.getSubPathKeys,He=h.useMemo(function(){return{registerPath:Lt,unregisterPath:kr}},[Lt,kr]),Ye=h.useMemo(function(){return{isSubPathKey:Pr}},[Pr]);h.useEffect(function(){wr(qt?da:je.slice(rt+1).map(function(lr){return lr.key}))},[rt,qt]);var Tt=Qr(D||M&&((r=je[0])===null||r===void 0?void 0:r.key),{value:D}),pt=se(Tt,2),at=pt[0],Ze=pt[1],Rt=Jc(function(lr){Ze(lr)}),Kt=Jc(function(){Ze(void 0)});h.useImperativeHandle(t,function(){return{list:Je.current,focus:function(ct){var ot,or=sr(),cr=i0(or,ht),yr=cr.elements,Sr=cr.key2element,Dn=cr.element2key,nn=zy(Je.current,yr),Vt=at??(nn[0]?Dn.get(nn[0]):(ot=je.find(function(gi){return!gi.props.disabled}))===null||ot===void 0?void 0:ot.key),bn=Sr.get(Vt);if(Vt&&bn){var $n;bn==null||($n=bn.focus)===null||$n===void 0||$n.call(bn,ct)}}}});var Ke=Qr(V||[],{value:L,postState:function(ct){return Array.isArray(ct)?ct:ct==null?da:[ct]}}),gt=se(Ke,2),It=gt[0],fr=gt[1],rn=function(ct){if(B){var ot=ct.key,or=It.includes(ot),cr;W?or?cr=It.filter(function(Sr){return Sr!==ot}):cr=[].concat(We(It),[ot]):cr=[ot],fr(cr);var yr=X(X({},ct),{},{selectedKeys:cr});or?q==null||q(yr):G==null||G(yr)}!W&&Le.length&&it!=="inline"&&Me(da)},zr=Jc(function(lr){ye==null||ye(of(lr)),rn(lr)}),qn=Jc(function(lr,ct){var ot=Le.filter(function(cr){return cr!==lr});if(ct)ot.push(lr);else if(it!=="inline"){var or=dr(lr);ot=ot.filter(function(cr){return!or.has(cr)})}pu(Le,ot,!0)||Me(ot,!0)}),vn=function(ct,ot){var or=ot??!Le.includes(ct);qn(ct,or)},Kn=lL(it,at,Xe,ht,Je,sr,Lr,Ze,vn,de);h.useEffect(function(){mt(!0)},[]);var yn=h.useMemo(function(){return{_internalRenderMenuItem:be,_internalRenderSubMenuItem:Ce}},[be,Ce]),Ln=it!=="horizontal"||E?je:je.map(function(lr,ct){return h.createElement(xu,{key:lr.key,overflowDisabled:ct>rt},lr)}),Gn=h.createElement(Ao,Re({id:b,ref:Je,prefixCls:"".concat(o,"-overflow"),component:"ul",itemComponent:qu,className:re(o,"".concat(o,"-root"),"".concat(o,"-").concat(it),u,K(K({},"".concat(o,"-inline-collapsed"),ke),"".concat(o,"-rtl"),Xe),a),dir:v,style:c,role:"menu",tabIndex:f,data:Ln,renderRawItem:function(ct){return ct},renderRawRest:function(ct){var ot=ct.length,or=ot?je.slice(-ot):null;return h.createElement(Zf,{eventKey:o0,title:ae,disabled:qt,internalPopupClose:ot===0,popupClassName:le},or)},maxCount:it!=="horizontal"||E?Ao.INVALIDATE:Ao.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(ct){Ht(ct)},onKeyDown:Kn},ze));return h.createElement(My.Provider,{value:yn},h.createElement(ak.Provider,{value:ht},h.createElement(xu,{prefixCls:o,rootClassName:a,mode:it,openKeys:Le,rtl:Xe,disabled:x,motion:Et?Y:null,defaultMotions:Et?Z:null,activeKey:at,onActive:Rt,onInactive:Kt,selectedKeys:It,inlineIndent:U,subMenuOpenDelay:P,subMenuCloseDelay:O,forceSubMenuRender:N,builtinPlacements:he,triggerSubMenuAction:ne,getPopupContainer:ce,itemIcon:me,expandIcon:ue,onItemClick:zr,onOpenChange:qn},h.createElement(hk.Provider,{value:Ye},Gn),h.createElement("div",{style:{display:"none"},"aria-hidden":!0},h.createElement(uk.Provider,{value:He},Oe)))))}),nc=zL;nc.Item=qu;nc.SubMenu=Zf;nc.ItemGroup=Ay;nc.Divider=Dy;var jL={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},BL=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:jL}))},LL=h.forwardRef(BL);const yk=h.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}}),DL=e=>{const{antCls:t,componentCls:r,colorText:n,footerBg:i,headerHeight:o,headerPadding:a,headerColor:c,footerPadding:u,fontSize:d,bodyBg:f,headerBg:p}=e;return{[r]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:f,"&, *":{boxSizing:"border-box"},[`&${r}-has-sider`]:{flexDirection:"row",[`> ${r}, > ${r}-content`]:{width:0}},[`${r}-header, &${r}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${r}-header`]:{height:o,padding:a,color:c,lineHeight:ee(o),background:p,[`${t}-menu`]:{lineHeight:"inherit"}},[`${r}-footer`]:{padding:u,color:n,fontSize:d,background:i},[`${r}-content`]:{flex:"auto",color:n,minHeight:0}}},bk=e=>{const{colorBgLayout:t,controlHeight:r,controlHeightLG:n,colorText:i,controlHeightSM:o,marginXXS:a,colorTextLightSolid:c,colorBgContainer:u}=e,d=n*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:r*2,headerPadding:`0 ${d}px`,headerColor:i,footerPadding:`${o}px ${d}px`,footerBg:t,siderBg:"#001529",triggerHeight:n+a*2,triggerBg:"#002140",triggerColor:c,zeroTriggerWidth:n,zeroTriggerHeight:n,lightSiderBg:u,lightTriggerBg:u,lightTriggerColor:i}},_k=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]],Sk=gr("Layout",DL,bk,{deprecatedTokens:_k}),AL=e=>{const{componentCls:t,siderBg:r,motionDurationMid:n,motionDurationSlow:i,antCls:o,triggerHeight:a,triggerColor:c,triggerBg:u,headerHeight:d,zeroTriggerWidth:f,zeroTriggerHeight:p,borderRadiusLG:g,lightSiderBg:v,lightTriggerColor:b,lightTriggerBg:S,bodyBg:_}=e;return{[t]:{position:"relative",minWidth:0,background:r,transition:`all ${n}, background 0s`,"&-has-trigger":{paddingBottom:a},"&-right":{order:1},[`${t}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${o}-menu${o}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${t}-children`]:{overflow:"hidden"},[`${t}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:a,color:c,lineHeight:ee(a),textAlign:"center",background:u,cursor:"pointer",transition:`all ${n}`},[`${t}-zero-width-trigger`]:{position:"absolute",top:d,insetInlineEnd:e.calc(f).mul(-1).equal(),zIndex:1,width:f,height:p,color:c,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:r,borderRadius:`0 ${ee(g)} ${ee(g)} 0`,cursor:"pointer",transition:`background ${i} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${i}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(f).mul(-1).equal(),borderRadius:`${ee(g)} 0 0 ${ee(g)}`}},"&-light":{background:v,[`${t}-trigger`]:{color:b,background:S},[`${t}-zero-width-trigger`]:{color:b,background:S,border:`1px solid ${_}`,borderInlineStart:0}}}}},HL=gr(["Layout","Sider"],AL,bk,{deprecatedTokens:_k});var FL=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const QC={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},WL=e=>!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(Number(e)),em=h.createContext({}),VL=(()=>{let e=0;return(t="")=>(e+=1,`${t}${e}`)})(),Ck=h.forwardRef((e,t)=>{const{prefixCls:r,className:n,trigger:i,children:o,defaultCollapsed:a=!1,theme:c="dark",style:u={},collapsible:d=!1,reverseArrow:f=!1,width:p=200,collapsedWidth:g=80,zeroWidthTriggerStyle:v,breakpoint:b,onCollapse:S,onBreakpoint:_}=e,C=FL(e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:x}=h.useContext(yk),[E,k]=h.useState("collapsed"in e?e.collapsed:a),[P,T]=h.useState(!1);h.useEffect(()=>{"collapsed"in e&&k(e.collapsed)},[e.collapsed]);const O=(me,ue)=>{"collapsed"in e||k(me),S==null||S(me,ue)},{getPrefixCls:N,direction:I}=h.useContext(Pt),z=N("layout-sider",r),[D,M,j]=HL(z),B=h.useRef(null);B.current=me=>{T(me.matches),_==null||_(me.matches),E!==me.matches&&O(me.matches,"responsive")},h.useEffect(()=>{function me(Se){var ae;return(ae=B.current)===null||ae===void 0?void 0:ae.call(B,Se)}let ue;return typeof(window==null?void 0:window.matchMedia)<"u"&&b&&b in QC&&(ue=window.matchMedia(`screen and (max-width: ${QC[b]})`),X$(ue,me),me(ue)),()=>{Y$(ue,me)}},[b]),h.useEffect(()=>{const me=VL("ant-sider-");return x.addSider(me),()=>x.removeSider(me)},[]);const F=()=>{O(!E,"clickTrigger")},W=un(C,["collapsed"]),V=E?g:p,L=WL(V)?`${V}px`:String(V),G=Number.parseFloat(String(g||0))===0?h.createElement("span",{onClick:F,className:re(`${z}-zero-width-trigger`,`${z}-zero-width-trigger-${f?"right":"left"}`),style:v},i||h.createElement(LL,null)):null,q=I==="rtl"==!f,Y={expanded:q?h.createElement(Lo,null):h.createElement(wu,null),collapsed:q?h.createElement(wu,null):h.createElement(Lo,null)}[E?"collapsed":"expanded"],Z=i!==null?G||h.createElement("div",{className:`${z}-trigger`,onClick:F,style:{width:L}},i||Y):null,te=Object.assign(Object.assign({},u),{flex:`0 0 ${L}`,maxWidth:L,minWidth:L,width:L}),ne=re(z,`${z}-${c}`,{[`${z}-collapsed`]:!!E,[`${z}-has-trigger`]:d&&i!==null&&!G,[`${z}-below`]:!!P,[`${z}-zero-width`]:Number.parseFloat(L)===0},n,M,j),he=h.useMemo(()=>({siderCollapsed:E}),[E]);return D(h.createElement(em.Provider,{value:he},h.createElement("aside",Object.assign({className:ne},W,{style:te,ref:t}),h.createElement("div",{className:`${z}-children`},o),d||P&&G?Z:null)))});var UL={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},qL=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:UL}))},Hy=h.forwardRef(qL);const sf=h.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var KL=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const wk=e=>{const{prefixCls:t,className:r,dashed:n}=e,i=KL(e,["prefixCls","className","dashed"]),{getPrefixCls:o}=h.useContext(Pt),a=o("menu",t),c=re({[`${a}-item-divider-dashed`]:!!n},r);return h.createElement(Dy,Object.assign({className:c},i))},xk=e=>{var t;const{className:r,children:n,icon:i,title:o,danger:a,extra:c}=e,{prefixCls:u,firstLevel:d,direction:f,disableMenuItemTitleTooltip:p,inlineCollapsed:g}=h.useContext(sf),v=E=>{const k=n==null?void 0:n[0],P=h.createElement("span",{className:re(`${u}-title-content`,{[`${u}-title-content-with-extra`]:!!c||c===0})},n);return(!i||h.isValidElement(n)&&n.type==="span")&&n&&E&&d&&typeof k=="string"?h.createElement("div",{className:`${u}-inline-collapsed-noicon`},k.charAt(0)):P},{siderCollapsed:b}=h.useContext(em);let S=o;typeof o>"u"?S=d?n:"":o===!1&&(S="");const _={title:S};!b&&!g&&(_.title=null,_.open=!1);const C=di(n).length;let x=h.createElement(qu,Object.assign({},un(e,["title","icon","danger"]),{className:re({[`${u}-item-danger`]:a,[`${u}-item-only-child`]:(i?C+1:C)===1},r),title:typeof o=="string"?o:void 0}),hi(i,{className:re(h.isValidElement(i)?(t=i.props)===null||t===void 0?void 0:t.className:void 0,`${u}-item-icon`)}),v(g));return p||(x=h.createElement(Vo,Object.assign({},_,{placement:f==="rtl"?"left":"right",classNames:{root:`${u}-inline-collapsed-tooltip`}}),x)),x};var GL=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const af=h.createContext(null),XL=h.forwardRef((e,t)=>{const{children:r}=e,n=GL(e,["children"]),i=h.useContext(af),o=h.useMemo(()=>Object.assign(Object.assign({},i),n),[i,n.prefixCls,n.mode,n.selectable,n.rootClassName]),a=g5(r),c=qo(t,a?Ma(r):null);return h.createElement(af.Provider,{value:o},h.createElement(Wu,{space:!0},a?h.cloneElement(r,{ref:c}):r))}),YL=e=>{const{componentCls:t,motionDurationSlow:r,horizontalLineHeight:n,colorSplit:i,lineWidth:o,lineType:a,itemPaddingInline:c}=e;return{[`${t}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${ee(o)} ${a} ${i}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:c},[`> ${t}-item:hover,
250
+ > ${t}-item-active,
251
+ > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${r}`,`background ${r}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},JL=({componentCls:e,menuArrowOffset:t,calc:r})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
252
+ ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${ee(r(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${ee(t)})`}}}}),ZC=e=>ka(e),ew=(e,t)=>{const{componentCls:r,itemColor:n,itemSelectedColor:i,subMenuItemSelectedColor:o,groupTitleColor:a,itemBg:c,subMenuItemBg:u,itemSelectedBg:d,activeBarHeight:f,activeBarWidth:p,activeBarBorderWidth:g,motionDurationSlow:v,motionEaseInOut:b,motionEaseOut:S,itemPaddingInline:_,motionDurationMid:C,itemHoverColor:x,lineType:E,colorSplit:k,itemDisabledColor:P,dangerItemColor:T,dangerItemHoverColor:O,dangerItemSelectedColor:N,dangerItemActiveBg:I,dangerItemSelectedBg:z,popupBg:D,itemHoverBg:M,itemActiveBg:j,menuSubMenuBg:B,horizontalItemSelectedColor:F,horizontalItemSelectedBg:W,horizontalItemBorderRadius:V,horizontalItemHoverBg:L}=e;return{[`${r}-${t}, ${r}-${t} > ${r}`]:{color:n,background:c,[`&${r}-root:focus-visible`]:Object.assign({},ZC(e)),[`${r}-item`]:{"&-group-title, &-extra":{color:a}},[`${r}-submenu-selected > ${r}-submenu-title`]:{color:o},[`${r}-item, ${r}-submenu-title`]:{color:n,[`&:not(${r}-item-disabled):focus-visible`]:Object.assign({},ZC(e))},[`${r}-item-disabled, ${r}-submenu-disabled`]:{color:`${P} !important`},[`${r}-item:not(${r}-item-selected):not(${r}-submenu-selected)`]:{[`&:hover, > ${r}-submenu-title:hover`]:{color:x}},[`&:not(${r}-horizontal)`]:{[`${r}-item:not(${r}-item-selected)`]:{"&:hover":{backgroundColor:M},"&:active":{backgroundColor:j}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:M},"&:active":{backgroundColor:j}}},[`${r}-item-danger`]:{color:T,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:O}},[`&${r}-item:active`]:{background:I}},[`${r}-item a`]:{"&, &:hover":{color:"inherit"}},[`${r}-item-selected`]:{color:i,[`&${r}-item-danger`]:{color:N},"a, a:hover":{color:"inherit"}},[`& ${r}-item-selected`]:{backgroundColor:d,[`&${r}-item-danger`]:{backgroundColor:z}},[`&${r}-submenu > ${r}`]:{backgroundColor:B},[`&${r}-popup > ${r}`]:{backgroundColor:D},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:D},[`&${r}-horizontal`]:Object.assign(Object.assign({},t==="dark"?{borderBottom:0}:{}),{[`> ${r}-item, > ${r}-submenu`]:{top:g,marginTop:e.calc(g).mul(-1).equal(),marginBottom:0,borderRadius:V,"&::after":{position:"absolute",insetInline:_,bottom:0,borderBottom:`${ee(f)} solid transparent`,transition:`border-color ${v} ${b}`,content:'""'},"&:hover, &-active, &-open":{background:L,"&::after":{borderBottomWidth:f,borderBottomColor:F}},"&-selected":{color:F,backgroundColor:W,"&:hover":{backgroundColor:W},"&::after":{borderBottomWidth:f,borderBottomColor:F}}}}),[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${ee(g)} ${E} ${k}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:u},[`${r}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ee(p)} solid ${i}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${C} ${S}`,`opacity ${C} ${S}`].join(","),content:'""'},[`&${r}-item-danger`]:{"&::after":{borderInlineEndColor:N}}},[`${r}-selected, ${r}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${C} ${b}`,`opacity ${C} ${b}`].join(",")}}}}}},tw=e=>{const{componentCls:t,itemHeight:r,itemMarginInline:n,padding:i,menuArrowSize:o,marginXS:a,itemMarginBlock:c,itemWidth:u,itemPaddingInline:d}=e,f=e.calc(o).add(i).add(a).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:r,lineHeight:ee(r),paddingInline:d,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:c,width:u},[`> ${t}-item,
253
+ > ${t}-submenu > ${t}-submenu-title`]:{height:r,lineHeight:ee(r)},[`${t}-item-group-list ${t}-submenu-title,
254
+ ${t}-submenu-title`]:{paddingInlineEnd:f}}},QL=e=>{const{componentCls:t,iconCls:r,itemHeight:n,colorTextLightSolid:i,dropdownWidth:o,controlHeightLG:a,motionEaseOut:c,paddingXL:u,itemMarginInline:d,fontSizeLG:f,motionDurationFast:p,motionDurationSlow:g,paddingXS:v,boxShadowSecondary:b,collapsedWidth:S,collapsedIconSize:_}=e,C={height:n,lineHeight:ee(n),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},tw(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},tw(e)),{boxShadow:b})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:o,maxHeight:`calc(100vh - ${ee(e.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${g}`,`background ${g}`,`padding ${p} ${c}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:C,[`& ${t}-item-group-title`]:{paddingInlineStart:u}},[`${t}-item`]:C}},{[`${t}-inline-collapsed`]:{width:S,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:f,textAlign:"center"}}},[`> ${t}-item,
255
+ > ${t}-item-group > ${t}-item-group-list > ${t}-item,
256
+ > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
257
+ > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${ee(e.calc(_).div(2).equal())} - ${ee(d)})`,textOverflow:"clip",[`
258
+ ${t}-submenu-arrow,
259
+ ${t}-submenu-expand-icon
260
+ `]:{opacity:0},[`${t}-item-icon, ${r}`]:{margin:0,fontSize:_,lineHeight:ee(n),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${r}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${r}`]:{display:"none"},"a, a:hover":{color:i}},[`${t}-item-group-title`]:Object.assign(Object.assign({},bu),{paddingInline:v})}}]},rw=e=>{const{componentCls:t,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:i,motionEaseOut:o,iconCls:a,iconSize:c,iconMarginInlineEnd:u}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${r}`,`background ${r}`,`padding calc(${r} + 0.1s) ${i}`].join(","),[`${t}-item-icon, ${a}`]:{minWidth:c,fontSize:c,transition:[`font-size ${n} ${o}`,`margin ${r} ${i}`,`color ${r}`].join(","),"+ span":{marginInlineStart:u,opacity:1,transition:[`opacity ${r} ${i}`,`margin ${r}`,`color ${r}`].join(",")}},[`${t}-item-icon`]:Object.assign({},Ql()),[`&${t}-item-only-child`]:{[`> ${a}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},nw=e=>{const{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,borderRadius:i,menuArrowSize:o,menuArrowOffset:a}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:o,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${r} ${n}, opacity ${r}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(o).mul(.6).equal(),height:e.calc(o).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:i,transition:[`background ${r} ${n}`,`transform ${r} ${n}`,`top ${r} ${n}`,`color ${r} ${n}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${ee(e.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${ee(a)})`}}}}},ZL=e=>{const{antCls:t,componentCls:r,fontSize:n,motionDurationSlow:i,motionDurationMid:o,motionEaseInOut:a,paddingXS:c,padding:u,colorSplit:d,lineWidth:f,zIndexPopup:p,borderRadiusLG:g,subMenuItemBorderRadius:v,menuArrowSize:b,menuArrowOffset:S,lineType:_,groupTitleLineHeight:C,groupTitleFontSize:x}=e;return[{"":{[r]:Object.assign(Object.assign({},Xh()),{"&-hidden":{display:"none"}})},[`${r}-submenu-hidden`]:{display:"none"}},{[r]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Fr(e)),Xh()),{marginBottom:0,paddingInlineStart:0,fontSize:n,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${r}-item`]:{flex:"none"}},[`${r}-item, ${r}-submenu, ${r}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${r}-item-group-title`]:{padding:`${ee(c)} ${ee(u)}`,fontSize:x,lineHeight:C,transition:`all ${i}`},[`&-horizontal ${r}-submenu`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`].join(",")},[`${r}-submenu, ${r}-submenu-inline`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`,`padding ${o} ${a}`].join(",")},[`${r}-submenu ${r}-sub`]:{cursor:"initial",transition:[`background ${i} ${a}`,`padding ${i} ${a}`].join(",")},[`${r}-title-content`]:{transition:`color ${i}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${r}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${r}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${r}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:d,borderStyle:_,borderWidth:0,borderTopWidth:f,marginBlock:f,padding:0,"&-dashed":{borderStyle:"dashed"}}}),rw(e)),{[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${ee(e.calc(n).mul(2).equal())} ${ee(u)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:p,borderRadius:g,boxShadow:"none",transformOrigin:"0 0",[`&${r}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${r}`]:Object.assign(Object.assign(Object.assign({borderRadius:g},rw(e)),nw(e)),{[`${r}-item, ${r}-submenu > ${r}-submenu-title`]:{borderRadius:v},[`${r}-submenu-title::after`]:{transition:`transform ${i} ${a}`}})},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),nw(e)),{[`&-inline-collapsed ${r}-submenu-arrow,
261
+ &-inline ${r}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${ee(S)})`},"&::after":{transform:`rotate(45deg) translateX(${ee(e.calc(S).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${ee(e.calc(b).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${ee(e.calc(S).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${ee(S)})`}}})},{[`${t}-layout-header`]:{[r]:{lineHeight:"inherit"}}}]},e7=e=>{var t,r,n;const{colorPrimary:i,colorError:o,colorTextDisabled:a,colorErrorBg:c,colorText:u,colorTextDescription:d,colorBgContainer:f,colorFillAlter:p,colorFillContent:g,lineWidth:v,lineWidthBold:b,controlItemBgActive:S,colorBgTextHover:_,controlHeightLG:C,lineHeight:x,colorBgElevated:E,marginXXS:k,padding:P,fontSize:T,controlHeightSM:O,fontSizeLG:N,colorTextLightSolid:I,colorErrorHover:z}=e,D=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,M=(r=e.activeBarBorderWidth)!==null&&r!==void 0?r:v,j=(n=e.itemMarginInline)!==null&&n!==void 0?n:e.marginXXS,B=new pr(I).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:u,itemColor:u,colorItemTextHover:u,itemHoverColor:u,colorItemTextHoverHorizontal:i,horizontalItemHoverColor:i,colorGroupTitle:d,groupTitleColor:d,colorItemTextSelected:i,itemSelectedColor:i,subMenuItemSelectedColor:i,colorItemTextSelectedHorizontal:i,horizontalItemSelectedColor:i,colorItemBg:f,itemBg:f,colorItemBgHover:_,itemHoverBg:_,colorItemBgActive:g,itemActiveBg:S,colorSubItemBg:p,subMenuItemBg:p,colorItemBgSelected:S,itemSelectedBg:S,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:D,colorActiveBarHeight:b,activeBarHeight:b,colorActiveBarBorderSize:v,activeBarBorderWidth:M,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:c,dangerItemActiveBg:c,colorDangerItemBgSelected:c,dangerItemSelectedBg:c,itemMarginInline:j,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:C,groupTitleLineHeight:x,collapsedWidth:C*2,popupBg:E,itemMarginBlock:k,itemPaddingInline:P,horizontalLineHeight:`${C*1.15}px`,iconSize:T,iconMarginInlineEnd:O-T,collapsedIconSize:N,groupTitleFontSize:T,darkItemDisabledColor:new pr(I).setA(.25).toRgbString(),darkItemColor:B,darkDangerItemColor:o,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:I,darkItemSelectedBg:i,darkDangerItemSelectedBg:o,darkItemHoverBg:"transparent",darkGroupTitleColor:B,darkItemHoverColor:I,darkDangerItemHoverColor:z,darkDangerItemSelectedColor:I,darkDangerItemActiveBg:o,itemWidth:D?`calc(100% + ${M}px)`:`calc(100% - ${j*2}px)`}},t7=(e,t=e,r=!0)=>gr("Menu",i=>{const{colorBgElevated:o,controlHeightLG:a,fontSize:c,darkItemColor:u,darkDangerItemColor:d,darkItemBg:f,darkSubMenuItemBg:p,darkItemSelectedColor:g,darkItemSelectedBg:v,darkDangerItemSelectedBg:b,darkItemHoverBg:S,darkGroupTitleColor:_,darkItemHoverColor:C,darkItemDisabledColor:x,darkDangerItemHoverColor:E,darkDangerItemSelectedColor:k,darkDangerItemActiveBg:P,popupBg:T,darkPopupBg:O}=i,N=i.calc(c).div(7).mul(5).equal(),I=er(i,{menuArrowSize:N,menuHorizontalHeight:i.calc(a).mul(1.15).equal(),menuArrowOffset:i.calc(N).mul(.25).equal(),menuSubMenuBg:o,calc:i.calc,popupBg:T}),z=er(I,{itemColor:u,itemHoverColor:C,groupTitleColor:_,itemSelectedColor:g,subMenuItemSelectedColor:g,itemBg:f,popupBg:O,subMenuItemBg:p,itemActiveBg:"transparent",itemSelectedBg:v,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:S,itemDisabledColor:x,dangerItemColor:d,dangerItemHoverColor:E,dangerItemSelectedColor:k,dangerItemActiveBg:P,dangerItemSelectedBg:b,menuSubMenuBg:p,horizontalItemSelectedColor:g,horizontalItemSelectedBg:v});return[ZL(I),YL(I),QL(I),ew(I,"light"),ew(z,"dark"),JL(I),WE(I),Js(I,"slide-up"),Js(I,"slide-down"),Du(I,"zoom-big")]},e7,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:r,unitless:{groupTitleLineHeight:!0}})(e,t),Ek=e=>{var t;const{popupClassName:r,icon:n,title:i,theme:o}=e,a=h.useContext(sf),{prefixCls:c,inlineCollapsed:u,theme:d}=a,f=rc();let p;if(!n)p=u&&!f.length&&i&&typeof i=="string"?h.createElement("div",{className:`${c}-inline-collapsed-noicon`},i.charAt(0)):h.createElement("span",{className:`${c}-title-content`},i);else{const b=h.isValidElement(i)&&i.type==="span";p=h.createElement(h.Fragment,null,hi(n,{className:re(h.isValidElement(n)?(t=n.props)===null||t===void 0?void 0:t.className:void 0,`${c}-item-icon`)}),b?i:h.createElement("span",{className:`${c}-title-content`},i))}const g=h.useMemo(()=>Object.assign(Object.assign({},a),{firstLevel:!1}),[a]),[v]=ec("Menu");return h.createElement(sf.Provider,{value:g},h.createElement(Zf,Object.assign({},un(e,["icon"]),{title:p,popupClassName:re(c,r,`${c}-${o||d}`),popupStyle:Object.assign({zIndex:v},e.popupStyle)})))};var r7=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function $g(e){return e===null||e===!1}const n7={item:xk,submenu:Ek,divider:wk},i7=h.forwardRef((e,t)=>{var r;const n=h.useContext(af),i=n||{},{getPrefixCls:o,getPopupContainer:a,direction:c,menu:u}=h.useContext(Pt),d=o(),{prefixCls:f,className:p,style:g,theme:v="light",expandIcon:b,_internalDisableMenuItemTitleTooltip:S,inlineCollapsed:_,siderCollapsed:C,rootClassName:x,mode:E,selectable:k,onClick:P,overflowedIndicatorPopupClassName:T}=e,O=r7(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),N=un(O,["collapsedWidth"]);(r=i.validator)===null||r===void 0||r.call(i,{mode:E});const I=Jr((...U)=>{var Y;P==null||P.apply(void 0,U),(Y=i.onClick)===null||Y===void 0||Y.call(i)}),z=i.mode||E,D=k??i.selectable,M=_??C,j={horizontal:{motionName:`${d}-slide-up`},inline:jE(d),other:{motionName:`${d}-zoom-big`}},B=o("menu",f||i.prefixCls),F=ko(B),[W,V,L]=t7(B,F,!n),G=re(`${B}-${v}`,u==null?void 0:u.className,p),q=h.useMemo(()=>{var U,Y;if(typeof b=="function"||$g(b))return b||null;if(typeof i.expandIcon=="function"||$g(i.expandIcon))return i.expandIcon||null;if(typeof(u==null?void 0:u.expandIcon)=="function"||$g(u==null?void 0:u.expandIcon))return(u==null?void 0:u.expandIcon)||null;const Z=(U=b??(i==null?void 0:i.expandIcon))!==null&&U!==void 0?U:u==null?void 0:u.expandIcon;return hi(Z,{className:re(`${B}-submenu-expand-icon`,h.isValidElement(Z)?(Y=Z.props)===null||Y===void 0?void 0:Y.className:void 0)})},[b,i==null?void 0:i.expandIcon,u==null?void 0:u.expandIcon,B]),A=h.useMemo(()=>({prefixCls:B,inlineCollapsed:M||!1,direction:c,firstLevel:!0,theme:v,mode:z,disableMenuItemTitleTooltip:S}),[B,M,c,S,v]);return W(h.createElement(af.Provider,{value:null},h.createElement(sf.Provider,{value:A},h.createElement(nc,Object.assign({getPopupContainer:a,overflowedIndicator:h.createElement(Hy,null),overflowedIndicatorPopupClassName:re(B,`${B}-${v}`,T),mode:z,selectable:D,onClick:I},N,{inlineCollapsed:M,style:Object.assign(Object.assign({},u==null?void 0:u.style),g),className:G,prefixCls:B,direction:c,defaultMotions:j,expandIcon:q,ref:t,rootClassName:re(x,V,i.rootClassName,L,F),_internalComponents:n7})))))}),Ku=h.forwardRef((e,t)=>{const r=h.useRef(null),n=h.useContext(em);return h.useImperativeHandle(t,()=>({menu:r.current,focus:i=>{var o;(o=r.current)===null||o===void 0||o.focus(i)}})),h.createElement(i7,Object.assign({ref:r},e,n))});Ku.Item=xk;Ku.SubMenu=Ek;Ku.Divider=wk;Ku.ItemGroup=Ay;const o7=e=>{const{componentCls:t,menuCls:r,colorError:n,colorTextLightSolid:i}=e,o=`${r}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${r} ${o}`]:{[`&${o}-danger:not(${o}-disabled)`]:{color:n,"&:hover":{color:i,backgroundColor:n}}}}}},s7=e=>{const{componentCls:t,menuCls:r,zIndexPopup:n,dropdownArrowDistance:i,sizePopupArrow:o,antCls:a,iconCls:c,motionDurationMid:u,paddingBlock:d,fontSize:f,dropdownEdgeChildPadding:p,colorTextDisabled:g,fontSizeIcon:v,controlPaddingHorizontal:b,colorBgElevated:S}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:n,display:"block","&::before":{position:"absolute",insetBlock:e.calc(o).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${c}-down, & > ${a}-btn-icon > ${c}-down`]:{fontSize:v}},[`${t}-wrap`]:{position:"relative",[`${a}-btn > ${c}-down`]:{fontSize:v},[`${c}-down::before`]:{transition:`transform ${u}`}},[`${t}-wrap-open`]:{[`${c}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomLeft,
262
+ &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomLeft,
263
+ &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottom,
264
+ &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottom,
265
+ &${a}-slide-down-enter${a}-slide-down-enter-active${t}-placement-bottomRight,
266
+ &${a}-slide-down-appear${a}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:by},[`&${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topLeft,
267
+ &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topLeft,
268
+ &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-top,
269
+ &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-top,
270
+ &${a}-slide-up-enter${a}-slide-up-enter-active${t}-placement-topRight,
271
+ &${a}-slide-up-appear${a}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Sy},[`&${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomLeft,
272
+ &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottom,
273
+ &${a}-slide-down-leave${a}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:_y},[`&${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topLeft,
274
+ &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-top,
275
+ &${a}-slide-up-leave${a}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Cy}}},Ny(e,S,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${r}`]:{position:"relative",margin:0},[`${r}-submenu-popup`]:{position:"absolute",zIndex:n,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:Object.assign(Object.assign({},Fr(e)),{[r]:Object.assign(Object.assign({padding:p,listStyleType:"none",backgroundColor:S,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},lo(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${r}-item-group-title`]:{padding:`${ee(d)} ${ee(b)}`,color:e.colorTextDescription,transition:`all ${u}`},[`${r}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${r}-item-icon`]:{minWidth:f,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${r}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${u}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${r}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${r}-item, ${r}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${ee(d)} ${ee(b)}`,color:e.colorText,fontWeight:"normal",fontSize:f,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${u}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},lo(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:g,cursor:"not-allowed","&:hover":{color:g,backgroundColor:S,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${ee(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:v,fontStyle:"normal"}}}),[`${r}-item-group-list`]:{margin:`0 ${ee(e.marginXS)}`,padding:0,listStyle:"none"},[`${r}-submenu-title`]:{paddingInlineEnd:e.calc(b).add(e.fontSizeSM).equal()},[`${r}-submenu-vertical`]:{position:"relative"},[`${r}-submenu${r}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:g,backgroundColor:S,cursor:"not-allowed"}},[`${r}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[Js(e,"slide-up"),Js(e,"slide-down"),ef(e,"move-up"),ef(e,"move-down"),Du(e,"zoom-big")]]},a7=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},Yf({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),Iy(e)),l7=gr("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:r,paddingXXS:n,componentCls:i}=e,o=er(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[s7(o),o7(o)]},a7,{resetStyle:!1}),tm=e=>{var t;const{menu:r,arrow:n,prefixCls:i,children:o,trigger:a,disabled:c,dropdownRender:u,popupRender:d,getPopupContainer:f,overlayClassName:p,rootClassName:g,overlayStyle:v,open:b,onOpenChange:S,visible:_,onVisibleChange:C,mouseEnterDelay:x=.15,mouseLeaveDelay:E=.1,autoAdjustOverflow:k=!0,placement:P="",overlay:T,transitionName:O,destroyOnHidden:N,destroyPopupOnHide:I}=e,{getPopupContainer:z,getPrefixCls:D,direction:M,dropdown:j}=h.useContext(Pt),B=d||u;Tf();const F=h.useMemo(()=>{const be=D();return O!==void 0?O:P.includes("top")?`${be}-slide-down`:`${be}-slide-up`},[D,P,O]),W=h.useMemo(()=>P?P.includes("Center")?P.slice(0,P.indexOf("Center")):P:M==="rtl"?"bottomRight":"bottomLeft",[P,M]),V=D("dropdown",i),L=ko(V),[G,q,A]=l7(V,L),[,U]=fi(),Y=h.Children.only(eL(o)?h.createElement("span",null,o):o),Z=hi(Y,{className:re(`${V}-trigger`,{[`${V}-rtl`]:M==="rtl"},Y.props.className),disabled:(t=Y.props.disabled)!==null&&t!==void 0?t:c}),te=c?[]:a,ne=!!(te!=null&&te.includes("contextMenu")),[he,me]=Qr(!1,{value:b??_}),ue=Jr(be=>{S==null||S(be,{source:"trigger"}),C==null||C(be),me(be)}),Se=re(p,g,q,A,L,j==null?void 0:j.className,{[`${V}-rtl`]:M==="rtl"}),ae=Q$({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:k,offset:U.marginXXS,arrowWidth:n?U.sizePopupArrow:0,borderRadius:U.borderRadius}),le=Jr(()=>{r!=null&&r.selectable&&(r!=null&&r.multiple)||(S==null||S(!1,{source:"menu"}),me(!1))}),ce=()=>{let be;return r!=null&&r.items?be=h.createElement(Ku,Object.assign({},r)):typeof T=="function"?be=T():be=T,B&&(be=B(be)),be=h.Children.only(typeof be=="string"?h.createElement("span",null,be):be),h.createElement(XL,{prefixCls:`${V}-menu`,rootClassName:re(A,L),expandIcon:h.createElement("span",{className:`${V}-menu-submenu-arrow`},M==="rtl"?h.createElement(wu,{className:`${V}-menu-submenu-arrow-icon`}):h.createElement(Lo,{className:`${V}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:le,validator:({mode:Ce})=>{}},be)},[ye,fe]=ec("Dropdown",v==null?void 0:v.zIndex);let de=h.createElement(sk,Object.assign({alignPoint:ne},un(e,["rootClassName"]),{mouseEnterDelay:x,mouseLeaveDelay:E,visible:he,builtinPlacements:ae,arrow:!!n,overlayClassName:Se,prefixCls:V,getPopupContainer:f||z,transitionName:F,trigger:te,overlay:ce,placement:W,onVisibleChange:ue,overlayStyle:Object.assign(Object.assign(Object.assign({},j==null?void 0:j.style),v),{zIndex:ye}),autoDestroy:N??I}),Z);return ye&&(de=h.createElement(ju.Provider,{value:fe},de)),G(de)},c7=x$(tm,"align",void 0,"dropdown",e=>e),u7=e=>h.createElement(c7,Object.assign({},e),h.createElement("span",null));tm._InternalPanelDoNotUseOrYouWillBeFired=u7;var d7=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],h7=h.forwardRef(function(e,t){var r=e.prefixCls,n=r===void 0?"rc-checkbox":r,i=e.className,o=e.style,a=e.checked,c=e.disabled,u=e.defaultChecked,d=u===void 0?!1:u,f=e.type,p=f===void 0?"checkbox":f,g=e.title,v=e.onChange,b=Bt(e,d7),S=h.useRef(null),_=h.useRef(null),C=Qr(d,{value:a}),x=se(C,2),E=x[0],k=x[1];h.useImperativeHandle(t,function(){return{focus:function(N){var I;(I=S.current)===null||I===void 0||I.focus(N)},blur:function(){var N;(N=S.current)===null||N===void 0||N.blur()},input:S.current,nativeElement:_.current}});var P=re(n,i,K(K({},"".concat(n,"-checked"),E),"".concat(n,"-disabled"),c)),T=function(N){c||("checked"in e||k(N.target.checked),v==null||v({target:X(X({},e),{},{type:p,checked:N.target.checked}),stopPropagation:function(){N.stopPropagation()},preventDefault:function(){N.preventDefault()},nativeEvent:N.nativeEvent}))};return h.createElement("span",{className:P,title:g,style:o,ref:_},h.createElement("input",Re({},b,{className:"".concat(n,"-input"),ref:S,onChange:T,disabled:c,checked:!!E,type:p})),h.createElement("span",{className:"".concat(n,"-inner")}))});function f7(e){const t=Q.useRef(null),r=()=>{$r.cancel(t.current),t.current=null};return[()=>{r(),t.current=$r(()=>{t.current=null})},o=>{t.current&&(o.stopPropagation(),r()),e==null||e(o)}]}function rm(e){return er(e,{inputAffixPadding:e.paddingXXS})}const nm=e=>{const{controlHeight:t,fontSize:r,lineHeight:n,lineWidth:i,controlHeightSM:o,controlHeightLG:a,fontSizeLG:c,lineHeightLG:u,paddingSM:d,controlPaddingHorizontalSM:f,controlPaddingHorizontal:p,colorFillAlter:g,colorPrimaryHover:v,colorPrimary:b,controlOutlineWidth:S,controlOutline:_,colorErrorOutline:C,colorWarningOutline:x,colorBgContainer:E,inputFontSize:k,inputFontSizeLG:P,inputFontSizeSM:T}=e,O=k||r,N=T||O,I=P||c,z=Math.round((t-O*n)/2*10)/10-i,D=Math.round((o-N*n)/2*10)/10-i,M=Math.ceil((a-I*u)/2*10)/10-i;return{paddingBlock:Math.max(z,0),paddingBlockSM:Math.max(D,0),paddingBlockLG:Math.max(M,0),paddingInline:d-i,paddingInlineSM:f-i,paddingInlineLG:p-i,addonBg:g,activeBorderColor:b,hoverBorderColor:v,activeShadow:`0 0 0 ${S}px ${_}`,errorActiveShadow:`0 0 0 ${S}px ${C}`,warningActiveShadow:`0 0 0 ${S}px ${x}`,hoverBg:E,activeBg:E,inputFontSize:O,inputFontSizeLG:I,inputFontSizeSM:N}},m7=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),im=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},m7(er(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),Fy=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),iw=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Fy(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),p7=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Fy(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},im(e))}),iw(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),iw(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),ow=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),g7=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${ee(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},ow(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),ow(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},im(e))}})}),v7=(e,t)=>{const{componentCls:r}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${r}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${r}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${r}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},$k=(e,t)=>{var r;return{background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(r=t==null?void 0:t.inputColor)!==null&&r!==void 0?r:"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}},sw=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},$k(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),y7=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},$k(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},im(e))}),sw(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),sw(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),aw=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),b7=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}}},aw(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),aw(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${ee(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ee(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ee(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${ee(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ee(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ee(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),kk=(e,t)=>({background:e.colorBgContainer,borderWidth:`${ee(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.hoverBorderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),lw=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},kk(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),_7=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},kk(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),lw(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),lw(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),S7=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Rk=e=>{const{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:i}=e;return{padding:`${ee(t)} ${ee(i)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},Wy=e=>({padding:`${ee(e.paddingBlockSM)} ${ee(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),Vy=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${ee(e.paddingBlock)} ${ee(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},S7(e.colorTextPlaceholder)),{"&-lg":Object.assign({},Rk(e)),"&-sm":Object.assign({},Wy(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),C7=e=>{const{componentCls:t,antCls:r}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},Rk(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},Wy(e)),[`&-lg ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${ee(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${ee(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${ee(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{[`${r}-select-selector`]:{backgroundColor:"inherit",border:`${ee(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${r}-cascader-picker`]:{margin:`-9px ${ee(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${r}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},Xh()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
276
+ & > ${t}-affix-wrapper,
277
+ & > ${t}-number-affix-wrapper,
278
+ & > ${r}-picker-range
279
+ `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${r}-select > ${r}-select-selector,
280
+ & > ${r}-select-auto-complete ${t},
281
+ & > ${r}-cascader-picker ${t},
282
+ & > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${r}-select-focused`]:{zIndex:1},[`& > ${r}-select > ${r}-select-arrow`]:{zIndex:1},[`& > *:first-child,
283
+ & > ${r}-select:first-child > ${r}-select-selector,
284
+ & > ${r}-select-auto-complete:first-child ${t},
285
+ & > ${r}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
286
+ & > ${r}-select:last-child > ${r}-select-selector,
287
+ & > ${r}-cascader-picker:last-child ${t},
288
+ & > ${r}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${r}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},w7=e=>{const{componentCls:t,controlHeightSM:r,lineWidth:n,calc:i}=e,a=i(r).sub(i(n).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Fr(e)),Vy(e)),p7(e)),y7(e)),v7(e)),_7(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:r,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},x7=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${ee(e.inputAffixPadding)}`}}}},E7=e=>{const{componentCls:t,inputAffixPadding:r,colorTextDescription:n,motionDurationSlow:i,colorIcon:o,colorIconHover:a,iconCls:c}=e,u=`${t}-affix-wrapper`,d=`${t}-affix-wrapper-disabled`;return{[u]:Object.assign(Object.assign(Object.assign(Object.assign({},Vy(e)),{display:"inline-flex",[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:n,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:r},"&-suffix":{marginInlineStart:r}}}),x7(e)),{[`${c}${t}-password-icon`]:{color:o,cursor:"pointer",transition:`all ${i}`,"&:hover":{color:a}}}),[`${t}-underlined`]:{borderRadius:0},[d]:{[`${c}${t}-password-icon`]:{color:o,cursor:"not-allowed","&:hover":{color:o}}}}},$7=e=>{const{componentCls:t,borderRadiusLG:r,borderRadiusSM:n}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},Fr(e)),C7(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:r,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:n}}},g7(e)),b7(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},k7=e=>{const{componentCls:t,antCls:r}=e,n=`${t}-search`;return{[n]:{[t]:{"&:not([disabled]):hover, &:not([disabled]):focus":{[`+ ${t}-group-addon ${n}-button:not(${r}-btn-color-primary):not(${r}-btn-variant-text)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${n}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${n}-button:not(${r}-btn-color-primary)`]:{color:e.colorTextDescription,"&:not([disabled]):hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${r}-btn-loading::before`]:{inset:0}}}},[`${n}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${n}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${n}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button,
289
+ > ${t},
290
+ ${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},R7=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},T7=gr(["Input","Shared"],e=>{const t=er(e,rm(e));return[w7(t),E7(t)]},nm,{resetFont:!1});gr(["Input","Component"],e=>{const t=er(e,rm(e));return[$7(t),k7(t),R7(t),Wf(t)]},nm,{resetFont:!1});var P7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},O7=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:P7}))},I7=h.forwardRef(O7);const om=h.createContext(null);var N7=function(t){var r=t.activeTabOffset,n=t.horizontal,i=t.rtl,o=t.indicator,a=o===void 0?{}:o,c=a.size,u=a.align,d=u===void 0?"center":u,f=h.useState(),p=se(f,2),g=p[0],v=p[1],b=h.useRef(),S=Q.useCallback(function(C){return typeof c=="function"?c(C):typeof c=="number"?c:C},[c]);function _(){$r.cancel(b.current)}return h.useEffect(function(){var C={};if(r)if(n){C.width=S(r.width);var x=i?"right":"left";d==="start"&&(C[x]=r[x]),d==="center"&&(C[x]=r[x]+r.width/2,C.transform=i?"translateX(50%)":"translateX(-50%)"),d==="end"&&(C[x]=r[x]+r.width,C.transform="translateX(-100%)")}else C.height=S(r.height),d==="start"&&(C.top=r.top),d==="center"&&(C.top=r.top+r.height/2,C.transform="translateY(-50%)"),d==="end"&&(C.top=r.top+r.height,C.transform="translateY(-100%)");return _(),b.current=$r(function(){var E=g&&C&&Object.keys(C).every(function(k){var P=C[k],T=g[k];return typeof P=="number"&&typeof T=="number"?Math.round(P)===Math.round(T):P===T});E||v(C)}),_},[JSON.stringify(r),n,i,d,S]),{style:g}},cw={width:0,height:0,left:0,top:0};function M7(e,t,r){return h.useMemo(function(){for(var n,i=new Map,o=t.get((n=e[0])===null||n===void 0?void 0:n.key)||cw,a=o.left+o.width,c=0;c<e.length;c+=1){var u=e[c].key,d=t.get(u);if(!d){var f;d=t.get((f=e[c-1])===null||f===void 0?void 0:f.key)||cw}var p=i.get(u)||X({},d);p.right=a-p.left-p.width,i.set(u,p)}return i},[e.map(function(n){return n.key}).join("_"),t,r])}function uw(e,t){var r=h.useRef(e),n=h.useState({}),i=se(n,2),o=i[1];function a(c){var u=typeof c=="function"?c(r.current):c;u!==r.current&&t(u,r.current),r.current=u,o({})}return[r.current,a]}var z7=.1,dw=.01,Nh=20,hw=Math.pow(.995,Nh);function j7(e,t){var r=h.useState(),n=se(r,2),i=n[0],o=n[1],a=h.useState(0),c=se(a,2),u=c[0],d=c[1],f=h.useState(0),p=se(f,2),g=p[0],v=p[1],b=h.useState(),S=se(b,2),_=S[0],C=S[1],x=h.useRef();function E(I){var z=I.touches[0],D=z.screenX,M=z.screenY;o({x:D,y:M}),window.clearInterval(x.current)}function k(I){if(i){var z=I.touches[0],D=z.screenX,M=z.screenY;o({x:D,y:M});var j=D-i.x,B=M-i.y;t(j,B);var F=Date.now();d(F),v(F-u),C({x:j,y:B})}}function P(){if(i&&(o(null),C(null),_)){var I=_.x/g,z=_.y/g,D=Math.abs(I),M=Math.abs(z);if(Math.max(D,M)<z7)return;var j=I,B=z;x.current=window.setInterval(function(){if(Math.abs(j)<dw&&Math.abs(B)<dw){window.clearInterval(x.current);return}j*=hw,B*=hw,t(j*Nh,B*Nh)},Nh)}}var T=h.useRef();function O(I){var z=I.deltaX,D=I.deltaY,M=0,j=Math.abs(z),B=Math.abs(D);j===B?M=T.current==="x"?z:D:j>B?(M=z,T.current="x"):(M=D,T.current="y"),t(-M,-M)&&I.preventDefault()}var N=h.useRef(null);N.current={onTouchStart:E,onTouchMove:k,onTouchEnd:P,onWheel:O},h.useEffect(function(){function I(j){N.current.onTouchStart(j)}function z(j){N.current.onTouchMove(j)}function D(j){N.current.onTouchEnd(j)}function M(j){N.current.onWheel(j)}return document.addEventListener("touchmove",z,{passive:!1}),document.addEventListener("touchend",D,{passive:!0}),e.current.addEventListener("touchstart",I,{passive:!0}),e.current.addEventListener("wheel",M,{passive:!1}),function(){document.removeEventListener("touchmove",z),document.removeEventListener("touchend",D)}},[])}function Tk(e){var t=h.useState(0),r=se(t,2),n=r[0],i=r[1],o=h.useRef(0),a=h.useRef();return a.current=e,dv(function(){var c;(c=a.current)===null||c===void 0||c.call(a)},[n]),function(){o.current===n&&(o.current+=1,i(o.current))}}function B7(e){var t=h.useRef([]),r=h.useState({}),n=se(r,2),i=n[1],o=h.useRef(typeof e=="function"?e():e),a=Tk(function(){var u=o.current;t.current.forEach(function(d){u=d(u)}),t.current=[],o.current=u,i({})});function c(u){t.current.push(u),a()}return[o.current,c]}var fw={width:0,height:0,left:0,top:0,right:0};function L7(e,t,r,n,i,o,a){var c=a.tabs,u=a.tabPosition,d=a.rtl,f,p,g;return["top","bottom"].includes(u)?(f="width",p=d?"right":"left",g=Math.abs(r)):(f="height",p="top",g=-r),h.useMemo(function(){if(!c.length)return[0,0];for(var v=c.length,b=v,S=0;S<v;S+=1){var _=e.get(c[S].key)||fw;if(Math.floor(_[p]+_[f])>Math.floor(g+t)){b=S-1;break}}for(var C=0,x=v-1;x>=0;x-=1){var E=e.get(c[x].key)||fw;if(E[p]<g){C=x+1;break}}return C>b?[0,-1]:[C,b]},[e,t,n,i,o,g,u,c.map(function(v){return v.key}).join("_"),d])}function mw(e){var t;return e instanceof Map?(t={},e.forEach(function(r,n){t[n]=r})):t=e,JSON.stringify(t)}var D7="TABS_DQ";function Pk(e){return String(e).replace(/"/g,D7)}function Uy(e,t,r,n){return!(!r||n||e===!1||e===void 0&&(t===!1||t===null))}var Ok=h.forwardRef(function(e,t){var r=e.prefixCls,n=e.editable,i=e.locale,o=e.style;return!n||n.showAdd===!1?null:h.createElement("button",{ref:t,type:"button",className:"".concat(r,"-nav-add"),style:o,"aria-label":(i==null?void 0:i.addAriaLabel)||"Add tab",onClick:function(c){n.onEdit("add",{event:c})}},n.addIcon||"+")}),pw=h.forwardRef(function(e,t){var r=e.position,n=e.prefixCls,i=e.extra;if(!i)return null;var o,a={};return bt(i)==="object"&&!h.isValidElement(i)?a=i:a.right=i,r==="right"&&(o=a.right),r==="left"&&(o=a.left),o?h.createElement("div",{className:"".concat(n,"-extra-content"),ref:t},o):null}),A7=h.forwardRef(function(e,t){var r=e.prefixCls,n=e.id,i=e.tabs,o=e.locale,a=e.mobile,c=e.more,u=c===void 0?{}:c,d=e.style,f=e.className,p=e.editable,g=e.tabBarGutter,v=e.rtl,b=e.removeAriaLabel,S=e.onTabClick,_=e.getPopupContainer,C=e.popupClassName,x=h.useState(!1),E=se(x,2),k=E[0],P=E[1],T=h.useState(null),O=se(T,2),N=O[0],I=O[1],z=u.icon,D=z===void 0?"More":z,M="".concat(n,"-more-popup"),j="".concat(r,"-dropdown"),B=N!==null?"".concat(M,"-").concat(N):null,F=o==null?void 0:o.dropdownAriaLabel;function W(Y,Z){Y.preventDefault(),Y.stopPropagation(),p.onEdit("remove",{key:Z,event:Y})}var V=h.createElement(nc,{onClick:function(Z){var te=Z.key,ne=Z.domEvent;S(te,ne),P(!1)},prefixCls:"".concat(j,"-menu"),id:M,tabIndex:-1,role:"listbox","aria-activedescendant":B,selectedKeys:[N],"aria-label":F!==void 0?F:"expanded dropdown"},i.map(function(Y){var Z=Y.closable,te=Y.disabled,ne=Y.closeIcon,he=Y.key,me=Y.label,ue=Uy(Z,ne,p,te);return h.createElement(qu,{key:he,id:"".concat(M,"-").concat(he),role:"option","aria-controls":n&&"".concat(n,"-panel-").concat(he),disabled:te},h.createElement("span",null,me),ue&&h.createElement("button",{type:"button","aria-label":b||"remove",tabIndex:0,className:"".concat(j,"-menu-item-remove"),onClick:function(ae){ae.stopPropagation(),W(ae,he)}},ne||p.removeIcon||"×"))}));function L(Y){for(var Z=i.filter(function(ue){return!ue.disabled}),te=Z.findIndex(function(ue){return ue.key===N})||0,ne=Z.length,he=0;he<ne;he+=1){te=(te+Y+ne)%ne;var me=Z[te];if(!me.disabled){I(me.key);return}}}function G(Y){var Z=Y.which;if(!k){[Ge.DOWN,Ge.SPACE,Ge.ENTER].includes(Z)&&(P(!0),Y.preventDefault());return}switch(Z){case Ge.UP:L(-1),Y.preventDefault();break;case Ge.DOWN:L(1),Y.preventDefault();break;case Ge.ESC:P(!1);break;case Ge.SPACE:case Ge.ENTER:N!==null&&S(N,Y);break}}h.useEffect(function(){var Y=document.getElementById(B);Y&&Y.scrollIntoView&&Y.scrollIntoView(!1)},[N]),h.useEffect(function(){k||I(null)},[k]);var q=K({},v?"marginRight":"marginLeft",g);i.length||(q.visibility="hidden",q.order=1);var A=re(K({},"".concat(j,"-rtl"),v)),U=a?null:h.createElement(sk,Re({prefixCls:j,overlay:V,visible:i.length?k:!1,onVisibleChange:P,overlayClassName:re(A,C),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:_},u),h.createElement("button",{type:"button",className:"".concat(r,"-nav-more"),style:q,"aria-haspopup":"listbox","aria-controls":M,id:"".concat(n,"-more"),"aria-expanded":k,onKeyDown:G},D));return h.createElement("div",{className:re("".concat(r,"-nav-operations"),f),style:d,ref:t},U,h.createElement(Ok,{prefixCls:r,locale:o,editable:p}))});const H7=h.memo(A7,function(e,t){return t.tabMoving});var F7=function(t){var r=t.prefixCls,n=t.id,i=t.active,o=t.focus,a=t.tab,c=a.key,u=a.label,d=a.disabled,f=a.closeIcon,p=a.icon,g=t.closable,v=t.renderWrapper,b=t.removeAriaLabel,S=t.editable,_=t.onClick,C=t.onFocus,x=t.onBlur,E=t.onKeyDown,k=t.onMouseDown,P=t.onMouseUp,T=t.style,O=t.tabCount,N=t.currentPosition,I="".concat(r,"-tab"),z=Uy(g,f,S,d);function D(W){d||_(W)}function M(W){W.preventDefault(),W.stopPropagation(),S.onEdit("remove",{key:c,event:W})}var j=h.useMemo(function(){return p&&typeof u=="string"?h.createElement("span",null,u):u},[u,p]),B=h.useRef(null);h.useEffect(function(){o&&B.current&&B.current.focus()},[o]);var F=h.createElement("div",{key:c,"data-node-key":Pk(c),className:re(I,K(K(K(K({},"".concat(I,"-with-remove"),z),"".concat(I,"-active"),i),"".concat(I,"-disabled"),d),"".concat(I,"-focus"),o)),style:T,onClick:D},h.createElement("div",{ref:B,role:"tab","aria-selected":i,id:n&&"".concat(n,"-tab-").concat(c),className:"".concat(I,"-btn"),"aria-controls":n&&"".concat(n,"-panel-").concat(c),"aria-disabled":d,tabIndex:d?null:i?0:-1,onClick:function(V){V.stopPropagation(),D(V)},onKeyDown:E,onMouseDown:k,onMouseUp:P,onFocus:C,onBlur:x},o&&h.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"Tab ".concat(N," of ").concat(O)),p&&h.createElement("span",{className:"".concat(I,"-icon")},p),u&&j),z&&h.createElement("button",{type:"button",role:"tab","aria-label":b||"remove",tabIndex:i?0:-1,className:"".concat(I,"-remove"),onClick:function(V){V.stopPropagation(),M(V)}},f||S.removeIcon||"×"));return v?v(F):F},W7=function(t,r){var n=t.offsetWidth,i=t.offsetHeight,o=t.offsetTop,a=t.offsetLeft,c=t.getBoundingClientRect(),u=c.width,d=c.height,f=c.left,p=c.top;return Math.abs(u-n)<1?[u,d,f-r.left,p-r.top]:[n,i,a,o]},Cl=function(t){var r=t.current||{},n=r.offsetWidth,i=n===void 0?0:n,o=r.offsetHeight,a=o===void 0?0:o;if(t.current){var c=t.current.getBoundingClientRect(),u=c.width,d=c.height;if(Math.abs(u-i)<1)return[u,d]}return[i,a]},ah=function(t,r){return t[r?0:1]},gw=h.forwardRef(function(e,t){var r=e.className,n=e.style,i=e.id,o=e.animated,a=e.activeKey,c=e.rtl,u=e.extra,d=e.editable,f=e.locale,p=e.tabPosition,g=e.tabBarGutter,v=e.children,b=e.onTabClick,S=e.onTabScroll,_=e.indicator,C=h.useContext(om),x=C.prefixCls,E=C.tabs,k=h.useRef(null),P=h.useRef(null),T=h.useRef(null),O=h.useRef(null),N=h.useRef(null),I=h.useRef(null),z=h.useRef(null),D=p==="top"||p==="bottom",M=uw(0,function(at,Ze){D&&S&&S({direction:at>Ze?"left":"right"})}),j=se(M,2),B=j[0],F=j[1],W=uw(0,function(at,Ze){!D&&S&&S({direction:at>Ze?"top":"bottom"})}),V=se(W,2),L=V[0],G=V[1],q=h.useState([0,0]),A=se(q,2),U=A[0],Y=A[1],Z=h.useState([0,0]),te=se(Z,2),ne=te[0],he=te[1],me=h.useState([0,0]),ue=se(me,2),Se=ue[0],ae=ue[1],le=h.useState([0,0]),ce=se(le,2),ye=ce[0],fe=ce[1],de=B7(new Map),be=se(de,2),Ce=be[0],Te=be[1],ze=M7(E,Ce,ne[0]),Ee=ah(U,D),$e=ah(ne,D),je=ah(Se,D),Oe=ah(ye,D),Qe=Math.floor(Ee)<Math.floor($e+je),st=Qe?Ee-Oe:Ee-je,Et="".concat(x,"-nav-operations-hidden"),mt=0,Je=0;D&&c?(mt=0,Je=Math.max(0,$e-st)):(mt=Math.min(0,st-$e),Je=0);function ht(at){return at<mt?mt:at>Je?Je:at}var Xe=h.useRef(null),vt=h.useState(),tt=se(vt,2),Le=tt[0],nt=tt[1];function Me(){nt(Date.now())}function qe(){Xe.current&&clearTimeout(Xe.current)}j7(O,function(at,Ze){function Rt(Kt,Ke){Kt(function(gt){var It=ht(gt+Ke);return It})}return Qe?(D?Rt(F,at):Rt(G,Ze),qe(),Me(),!0):!1}),h.useEffect(function(){return qe(),Le&&(Xe.current=setTimeout(function(){nt(0)},100)),qe},[Le]);var Ot=L7(ze,st,D?B:L,$e,je,Oe,X(X({},e),{},{tabs:E})),_t=se(Ot,2),tr=_t[0],Yt=_t[1],vr=Jr(function(){var at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a,Ze=ze.get(at)||{width:0,height:0,left:0,right:0,top:0};if(D){var Rt=B;c?Ze.right<B?Rt=Ze.right:Ze.right+Ze.width>B+st&&(Rt=Ze.right+Ze.width-st):Ze.left<-B?Rt=-Ze.left:Ze.left+Ze.width>-B+st&&(Rt=-(Ze.left+Ze.width-st)),G(0),F(ht(Rt))}else{var Kt=L;Ze.top<-L?Kt=-Ze.top:Ze.top+Ze.height>-L+st&&(Kt=-(Ze.top+Ze.height-st)),F(0),G(ht(Kt))}}),Tr=h.useState(),nr=se(Tr,2),At=nr[0],kt=nr[1],ir=h.useState(!1),Gt=se(ir,2),it=Gt[0],xt=Gt[1],ft=E.filter(function(at){return!at.disabled}).map(function(at){return at.key}),Ie=function(Ze){var Rt=ft.indexOf(At||a),Kt=ft.length,Ke=(Rt+Ze+Kt)%Kt,gt=ft[Ke];kt(gt)},ke=function(Ze,Rt){var Kt=ft.indexOf(Ze),Ke=E.find(function(It){return It.key===Ze}),gt=Uy(Ke==null?void 0:Ke.closable,Ke==null?void 0:Ke.closeIcon,d,Ke==null?void 0:Ke.disabled);gt&&(Rt.preventDefault(),Rt.stopPropagation(),d.onEdit("remove",{key:Ze,event:Rt}),Kt===ft.length-1?Ie(-1):Ie(1))},xe=function(Ze,Rt){xt(!0),Rt.button===1&&ke(Ze,Rt)},De=function(Ze){var Rt=Ze.code,Kt=c&&D,Ke=ft[0],gt=ft[ft.length-1];switch(Rt){case"ArrowLeft":{D&&Ie(Kt?1:-1);break}case"ArrowRight":{D&&Ie(Kt?-1:1);break}case"ArrowUp":{Ze.preventDefault(),D||Ie(-1);break}case"ArrowDown":{Ze.preventDefault(),D||Ie(1);break}case"Home":{Ze.preventDefault(),kt(Ke);break}case"End":{Ze.preventDefault(),kt(gt);break}case"Enter":case"Space":{Ze.preventDefault(),b(At??a,Ze);break}case"Backspace":case"Delete":{ke(At,Ze);break}}},et={};D?et[c?"marginRight":"marginLeft"]=g:et.marginTop=g;var rt=E.map(function(at,Ze){var Rt=at.key;return h.createElement(F7,{id:i,prefixCls:x,key:Rt,tab:at,style:Ze===0?void 0:et,closable:at.closable,editable:d,active:Rt===a,focus:Rt===At,renderWrapper:v,removeAriaLabel:f==null?void 0:f.removeAriaLabel,tabCount:ft.length,currentPosition:Ze+1,onClick:function(Ke){b(Rt,Ke)},onKeyDown:De,onFocus:function(){it||kt(Rt),vr(Rt),Me(),O.current&&(c||(O.current.scrollLeft=0),O.current.scrollTop=0)},onBlur:function(){kt(void 0)},onMouseDown:function(Ke){return xe(Rt,Ke)},onMouseUp:function(){xt(!1)}})}),Ht=function(){return Te(function(){var Ze,Rt=new Map,Kt=(Ze=N.current)===null||Ze===void 0?void 0:Ze.getBoundingClientRect();return E.forEach(function(Ke){var gt,It=Ke.key,fr=(gt=N.current)===null||gt===void 0?void 0:gt.querySelector('[data-node-key="'.concat(Pk(It),'"]'));if(fr){var rn=W7(fr,Kt),zr=se(rn,4),qn=zr[0],vn=zr[1],Kn=zr[2],yn=zr[3];Rt.set(It,{width:qn,height:vn,left:Kn,top:yn})}}),Rt})};h.useEffect(function(){Ht()},[E.map(function(at){return at.key}).join("_")]);var qt=Tk(function(){var at=Cl(k),Ze=Cl(P),Rt=Cl(T);Y([at[0]-Ze[0]-Rt[0],at[1]-Ze[1]-Rt[1]]);var Kt=Cl(z);ae(Kt);var Ke=Cl(I);fe(Ke);var gt=Cl(N);he([gt[0]-Kt[0],gt[1]-Kt[1]]),Ht()}),jt=E.slice(0,tr),Lt=E.slice(Yt+1),kr=[].concat(We(jt),We(Lt)),wr=ze.get(a),Pr=N7({activeTabOffset:wr,horizontal:D,indicator:_,rtl:c}),Lr=Pr.style;h.useEffect(function(){vr()},[a,mt,Je,mw(wr),mw(ze),D]),h.useEffect(function(){qt()},[c]);var sr=!!kr.length,dr="".concat(x,"-nav-wrap"),He,Ye,Tt,pt;return D?c?(Ye=B>0,He=B!==Je):(He=B<0,Ye=B!==mt):(Tt=L<0,pt=L!==mt),h.createElement(oo,{onResize:qt},h.createElement("div",{ref:qo(t,k),role:"tablist","aria-orientation":D?"horizontal":"vertical",className:re("".concat(x,"-nav"),r),style:n,onKeyDown:function(){Me()}},h.createElement(pw,{ref:P,position:"left",extra:u,prefixCls:x}),h.createElement(oo,{onResize:qt},h.createElement("div",{className:re(dr,K(K(K(K({},"".concat(dr,"-ping-left"),He),"".concat(dr,"-ping-right"),Ye),"".concat(dr,"-ping-top"),Tt),"".concat(dr,"-ping-bottom"),pt)),ref:O},h.createElement(oo,{onResize:qt},h.createElement("div",{ref:N,className:"".concat(x,"-nav-list"),style:{transform:"translate(".concat(B,"px, ").concat(L,"px)"),transition:Le?"none":void 0}},rt,h.createElement(Ok,{ref:z,prefixCls:x,locale:f,editable:d,style:X(X({},rt.length===0?void 0:et),{},{visibility:sr?"hidden":null})}),h.createElement("div",{className:re("".concat(x,"-ink-bar"),K({},"".concat(x,"-ink-bar-animated"),o.inkBar)),style:Lr}))))),h.createElement(H7,Re({},e,{removeAriaLabel:f==null?void 0:f.removeAriaLabel,ref:I,prefixCls:x,tabs:kr,className:!sr&&Et,tabMoving:!!Le})),h.createElement(pw,{ref:T,position:"right",extra:u,prefixCls:x})))}),Ik=h.forwardRef(function(e,t){var r=e.prefixCls,n=e.className,i=e.style,o=e.id,a=e.active,c=e.tabKey,u=e.children;return h.createElement("div",{id:o&&"".concat(o,"-panel-").concat(c),role:"tabpanel",tabIndex:a?0:-1,"aria-labelledby":o&&"".concat(o,"-tab-").concat(c),"aria-hidden":!a,style:i,className:re(r,a&&"".concat(r,"-active"),n),ref:t},u)}),V7=["renderTabBar"],U7=["label","key"],q7=function(t){var r=t.renderTabBar,n=Bt(t,V7),i=h.useContext(om),o=i.tabs;if(r){var a=X(X({},n),{},{panes:o.map(function(c){var u=c.label,d=c.key,f=Bt(c,U7);return h.createElement(Ik,Re({tab:u,key:d,tabKey:d},f))})});return r(a,gw)}return h.createElement(gw,n)},K7=["key","forceRender","style","className","destroyInactiveTabPane"],G7=function(t){var r=t.id,n=t.activeKey,i=t.animated,o=t.tabPosition,a=t.destroyInactiveTabPane,c=h.useContext(om),u=c.prefixCls,d=c.tabs,f=i.tabPane,p="".concat(u,"-tabpane");return h.createElement("div",{className:re("".concat(u,"-content-holder"))},h.createElement("div",{className:re("".concat(u,"-content"),"".concat(u,"-content-").concat(o),K({},"".concat(u,"-content-animated"),f))},d.map(function(g){var v=g.key,b=g.forceRender,S=g.style,_=g.className,C=g.destroyInactiveTabPane,x=Bt(g,K7),E=v===n;return h.createElement(Hi,Re({key:v,visible:E,forceRender:b,removeOnLeave:!!(a||C),leavedClassName:"".concat(p,"-hidden")},i.tabPaneMotion),function(k,P){var T=k.style,O=k.className;return h.createElement(Ik,Re({},x,{prefixCls:p,id:r,tabKey:v,animated:f,active:E,style:X(X({},S),T),className:re(_,O),ref:P}))})})))};function X7(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},t;return e===!1?t={inkBar:!1,tabPane:!1}:e===!0?t={inkBar:!0,tabPane:!1}:t=X({inkBar:!0},bt(e)==="object"?e:{}),t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}var Y7=["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator"],vw=0,J7=h.forwardRef(function(e,t){var r=e.id,n=e.prefixCls,i=n===void 0?"rc-tabs":n,o=e.className,a=e.items,c=e.direction,u=e.activeKey,d=e.defaultActiveKey,f=e.editable,p=e.animated,g=e.tabPosition,v=g===void 0?"top":g,b=e.tabBarGutter,S=e.tabBarStyle,_=e.tabBarExtraContent,C=e.locale,x=e.more,E=e.destroyInactiveTabPane,k=e.renderTabBar,P=e.onChange,T=e.onTabClick,O=e.onTabScroll,N=e.getPopupContainer,I=e.popupClassName,z=e.indicator,D=Bt(e,Y7),M=h.useMemo(function(){return(a||[]).filter(function(ye){return ye&&bt(ye)==="object"&&"key"in ye})},[a]),j=c==="rtl",B=X7(p),F=h.useState(!1),W=se(F,2),V=W[0],L=W[1];h.useEffect(function(){L(Ey())},[]);var G=Qr(function(){var ye;return(ye=M[0])===null||ye===void 0?void 0:ye.key},{value:u,defaultValue:d}),q=se(G,2),A=q[0],U=q[1],Y=h.useState(function(){return M.findIndex(function(ye){return ye.key===A})}),Z=se(Y,2),te=Z[0],ne=Z[1];h.useEffect(function(){var ye=M.findIndex(function(de){return de.key===A});if(ye===-1){var fe;ye=Math.max(0,Math.min(te,M.length-1)),U((fe=M[ye])===null||fe===void 0?void 0:fe.key)}ne(ye)},[M.map(function(ye){return ye.key}).join("_"),A,te]);var he=Qr(null,{value:r}),me=se(he,2),ue=me[0],Se=me[1];h.useEffect(function(){r||(Se("rc-tabs-".concat(vw)),vw+=1)},[]);function ae(ye,fe){T==null||T(ye,fe);var de=ye!==A;U(ye),de&&(P==null||P(ye))}var le={id:ue,activeKey:A,animated:B,tabPosition:v,rtl:j,mobile:V},ce=X(X({},le),{},{editable:f,locale:C,more:x,tabBarGutter:b,onTabClick:ae,onTabScroll:O,extra:_,style:S,panes:null,getPopupContainer:N,popupClassName:I,indicator:z});return h.createElement(om.Provider,{value:{tabs:M,prefixCls:i}},h.createElement("div",Re({ref:t,id:r,className:re(i,"".concat(i,"-").concat(v),K(K(K({},"".concat(i,"-mobile"),V),"".concat(i,"-editable"),f),"".concat(i,"-rtl"),j),o)},D),h.createElement(q7,Re({},ce,{renderTabBar:k})),h.createElement(G7,Re({destroyInactiveTabPane:E},le,{animated:B}))))});const Q7={motionAppear:!1,motionEnter:!0,motionLeave:!0};function Z7(e,t={inkBar:!0,tabPane:!1}){let r;return t===!1?r={inkBar:!1,tabPane:!1}:t===!0?r={inkBar:!0,tabPane:!0}:r=Object.assign({inkBar:!0},typeof t=="object"?t:{}),r.tabPane&&(r.tabPaneMotion=Object.assign(Object.assign({},Q7),{motionName:Fo(e,"switch")})),r}var e9=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function t9(e){return e.filter(t=>t)}function r9(e,t){if(e)return e.map(n=>{var i;const o=(i=n.destroyOnHidden)!==null&&i!==void 0?i:n.destroyInactiveTabPane;return Object.assign(Object.assign({},n),{destroyInactiveTabPane:o})});const r=di(t).map(n=>{if(h.isValidElement(n)){const{key:i,props:o}=n,a=o||{},{tab:c}=a,u=e9(a,["tab"]);return Object.assign(Object.assign({key:String(i)},u),{label:c})}return null});return t9(r)}const n9=e=>{const{componentCls:t,motionDurationSlow:r}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${r}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${r}`}}}}},[Js(e,"slide-up"),Js(e,"slide-down")]]},i9=e=>{const{componentCls:t,tabsCardPadding:r,cardBg:n,cardGutter:i,colorBorderSecondary:o,itemSelectedColor:a}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:r,background:n,border:`${ee(e.lineWidth)} ${e.lineType} ${o}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:a,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:ka(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:"none"},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:ee(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${ee(e.borderRadiusLG)} ${ee(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${ee(e.borderRadiusLG)} ${ee(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:ee(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${ee(e.borderRadiusLG)} 0 0 ${ee(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${ee(e.borderRadiusLG)} ${ee(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},o9=e=>{const{componentCls:t,itemHoverColor:r,dropdownEdgeChildVerticalPadding:n}=e;return{[`${t}-dropdown`]:Object.assign(Object.assign({},Fr(e)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${ee(n)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},bu),{display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${ee(e.paddingXXS)} ${ee(e.paddingSM)}`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:r}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},s9=e=>{const{componentCls:t,margin:r,colorBorderSecondary:n,horizontalMargin:i,verticalItemPadding:o,verticalItemMargin:a,calc:c}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:i,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${ee(e.lineWidth)} ${e.lineType} ${n}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
291
+ right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,
292
+ > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:r,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:c(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:o,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:a},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:ee(c(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${ee(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:c(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${ee(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},a9=e=>{const{componentCls:t,cardPaddingSM:r,cardPaddingLG:n,cardHeightSM:i,cardHeightLG:o,horizontalItemPaddingSM:a,horizontalItemPaddingLG:c}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:a,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:c,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${ee(e.borderRadius)} ${ee(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${ee(e.borderRadius)} ${ee(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${ee(e.borderRadius)} ${ee(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${ee(e.borderRadius)} 0 0 ${ee(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:o,minHeight:o}}}}}},l9=e=>{const{componentCls:t,itemActiveColor:r,itemHoverColor:n,iconCls:i,tabsHorizontalItemMargin:o,horizontalItemPadding:a,itemSelectedColor:c,itemColor:u}=e,d=`${t}-tab`;return{[d]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:a,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:u,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:r}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${d}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":Object.assign({flex:"none",lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},lo(e)),"&:hover":{color:n},[`&${d}-active ${d}-btn`]:{color:c,textShadow:e.tabsActiveTextShadow},[`&${d}-focus ${d}-btn:focus-visible`]:ka(e),[`&${d}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${d}-disabled ${d}-btn, &${d}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${d}-remove ${i}`]:{margin:0,verticalAlign:"middle"},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${d} + ${d}`]:{margin:{_skip_check_:!0,value:o}}}},c9=e=>{const{componentCls:t,tabsHorizontalItemMarginRTL:r,iconCls:n,cardGutter:i,calc:o}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:r},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[n]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:ee(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:ee(e.marginXS)},marginLeft:{_skip_check_:!0,value:ee(o(e.marginXXS).mul(-1).equal())},[n]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},u9=e=>{const{componentCls:t,tabsCardPadding:r,cardHeight:n,cardGutter:i,itemHoverColor:o,itemActiveColor:a,colorBorderSecondary:c}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},Fr(e)),{display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:r,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:Object.assign({minWidth:n,minHeight:n,marginLeft:{_skip_check_:!0,value:i},background:"transparent",border:`${ee(e.lineWidth)} ${e.lineType} ${c}`,borderRadius:`${ee(e.borderRadiusLG)} ${ee(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:o},"&:active, &:focus:not(:focus-visible)":{color:a}},lo(e,-3))},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"}}),l9(e)),{[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:Object.assign(Object.assign({},lo(e)),{"&-hidden":{display:"none"}})}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:"auto"}}}}}},d9=e=>{const{cardHeight:t,cardHeightSM:r,cardHeightLG:n,controlHeight:i,controlHeightLG:o}=e,a=t||o,c=r||i,u=n||o+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:a,cardHeightSM:c,cardHeightLG:u,cardPadding:`${(a-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(c-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(u-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}},h9=gr("Tabs",e=>{const t=er(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${ee(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${ee(e.horizontalItemGutter)}`});return[a9(t),c9(t),s9(t),o9(t),i9(t),u9(t),n9(t)]},d9),f9=()=>null;var m9=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const p9=h.forwardRef((e,t)=>{var r,n,i,o,a,c,u,d,f,p,g;const{type:v,className:b,rootClassName:S,size:_,onEdit:C,hideAdd:x,centered:E,addIcon:k,removeIcon:P,moreIcon:T,more:O,popupClassName:N,children:I,items:z,animated:D,style:M,indicatorSize:j,indicator:B,destroyInactiveTabPane:F,destroyOnHidden:W}=e,V=m9(e,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator","destroyInactiveTabPane","destroyOnHidden"]),{prefixCls:L}=V,{direction:G,tabs:q,getPrefixCls:A,getPopupContainer:U}=h.useContext(Pt),Y=A("tabs",L),Z=ko(Y),[te,ne,he]=h9(Y,Z),me=h.useRef(null);h.useImperativeHandle(t,()=>({nativeElement:me.current}));let ue;v==="editable-card"&&(ue={onEdit:(de,{key:be,event:Ce})=>{C==null||C(de==="add"?Ce:be,de)},removeIcon:(r=P??(q==null?void 0:q.removeIcon))!==null&&r!==void 0?r:h.createElement(Ys,null),addIcon:(k??(q==null?void 0:q.addIcon))||h.createElement(I7,null),showAdd:x!==!0});const Se=A(),ae=Go(_),le=r9(z,I),ce=Z7(Y,D),ye=Object.assign(Object.assign({},q==null?void 0:q.style),M),fe={align:(n=B==null?void 0:B.align)!==null&&n!==void 0?n:(i=q==null?void 0:q.indicator)===null||i===void 0?void 0:i.align,size:(u=(a=(o=B==null?void 0:B.size)!==null&&o!==void 0?o:j)!==null&&a!==void 0?a:(c=q==null?void 0:q.indicator)===null||c===void 0?void 0:c.size)!==null&&u!==void 0?u:q==null?void 0:q.indicatorSize};return te(h.createElement(J7,Object.assign({ref:me,direction:G,getPopupContainer:U},V,{items:le,className:re({[`${Y}-${ae}`]:ae,[`${Y}-card`]:["card","editable-card"].includes(v),[`${Y}-editable-card`]:v==="editable-card",[`${Y}-centered`]:E},q==null?void 0:q.className,b,S,ne,he,Z),popupClassName:re(N,ne,he,Z),style:ye,editable:ue,more:Object.assign({icon:(g=(p=(f=(d=q==null?void 0:q.more)===null||d===void 0?void 0:d.icon)!==null&&f!==void 0?f:q==null?void 0:q.moreIcon)!==null&&p!==void 0?p:T)!==null&&g!==void 0?g:h.createElement(Hy,null),transitionName:`${Se}-slide-up`},O),prefixCls:Y,animated:ce,indicator:fe,destroyInactiveTabPane:W??F})))}),qy=p9;qy.TabPane=f9;function g9(e,t,r){var n=r||{},i=n.noTrailing,o=i===void 0?!1:i,a=n.noLeading,c=a===void 0?!1:a,u=n.debounceMode,d=u===void 0?void 0:u,f,p=!1,g=0;function v(){f&&clearTimeout(f)}function b(_){var C=_||{},x=C.upcomingOnly,E=x===void 0?!1:x;v(),p=!E}function S(){for(var _=arguments.length,C=new Array(_),x=0;x<_;x++)C[x]=arguments[x];var E=this,k=Date.now()-g;if(p)return;function P(){g=Date.now(),t.apply(E,C)}function T(){f=void 0}!c&&d&&!f&&P(),v(),d===void 0&&k>e?c?(g=Date.now(),o||(f=setTimeout(d?T:P,e))):P():o!==!0&&(f=setTimeout(d?T:P,d===void 0?e-k:e))}return S.cancel=b,S}function v9(e,t,r){var n={},i=n.atBegin,o=i===void 0?!1:i;return g9(e,t,{debounceMode:o!==!1})}const y9=e=>{const{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},Fr(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},Fr(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},Fr(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:ka(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${ee(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${ee(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`
293
+ ${r}:not(${r}-disabled),
294
+ ${t}:not(${t}-disabled)
295
+ `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
296
+ ${r}-checked:not(${r}-disabled),
297
+ ${t}-checked:not(${t}-disabled)
298
+ `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${r}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function b9(e,t){const r=er(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return y9(r)}const Nk=gr("Checkbox",(e,{prefixCls:t})=>[b9(t,e)]),Mk=Q.createContext(null);var _9=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const S9=(e,t)=>{var r;const{prefixCls:n,className:i,rootClassName:o,children:a,indeterminate:c=!1,style:u,onMouseEnter:d,onMouseLeave:f,skipGroup:p=!1,disabled:g}=e,v=_9(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:b,direction:S,checkbox:_}=h.useContext(Pt),C=h.useContext(Mk),{isFormItemInput:x}=h.useContext(Su),E=h.useContext(Gs),k=(r=(C==null?void 0:C.disabled)||g)!==null&&r!==void 0?r:E,P=h.useRef(v.value),T=h.useRef(null),O=co(t,T);h.useEffect(()=>{C==null||C.registerValue(v.value)},[]),h.useEffect(()=>{if(!p)return v.value!==P.current&&(C==null||C.cancelValue(P.current),C==null||C.registerValue(v.value),P.current=v.value),()=>C==null?void 0:C.cancelValue(v.value)},[v.value]),h.useEffect(()=>{var L;!((L=T.current)===null||L===void 0)&&L.input&&(T.current.input.indeterminate=c)},[c]);const N=b("checkbox",n),I=ko(N),[z,D,M]=Nk(N,I),j=Object.assign({},v);C&&!p&&(j.onChange=(...L)=>{v.onChange&&v.onChange.apply(v,L),C.toggleOption&&C.toggleOption({label:a,value:v.value})},j.name=C.name,j.checked=C.value.includes(v.value));const B=re(`${N}-wrapper`,{[`${N}-rtl`]:S==="rtl",[`${N}-wrapper-checked`]:j.checked,[`${N}-wrapper-disabled`]:k,[`${N}-wrapper-in-form-item`]:x},_==null?void 0:_.className,i,o,M,I,D),F=re({[`${N}-indeterminate`]:c},vy,D),[W,V]=f7(j.onClick);return z(h.createElement(Mf,{component:"Checkbox",disabled:k},h.createElement("label",{className:B,style:Object.assign(Object.assign({},_==null?void 0:_.style),u),onMouseEnter:d,onMouseLeave:f,onClick:W},h.createElement(h7,Object.assign({},j,{onClick:V,prefixCls:N,className:F,disabled:k,ref:O})),a!=null&&h.createElement("span",{className:`${N}-label`},a))))},zk=h.forwardRef(S9);var C9=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const w9=h.forwardRef((e,t)=>{const{defaultValue:r,children:n,options:i=[],prefixCls:o,className:a,rootClassName:c,style:u,onChange:d}=e,f=C9(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:p,direction:g}=h.useContext(Pt),[v,b]=h.useState(f.value||r||[]),[S,_]=h.useState([]);h.useEffect(()=>{"value"in f&&b(f.value||[])},[f.value]);const C=h.useMemo(()=>i.map(F=>typeof F=="string"||typeof F=="number"?{label:F,value:F}:F),[i]),x=F=>{_(W=>W.filter(V=>V!==F))},E=F=>{_(W=>[].concat(We(W),[F]))},k=F=>{const W=v.indexOf(F.value),V=We(v);W===-1?V.push(F.value):V.splice(W,1),"value"in f||b(V),d==null||d(V.filter(L=>S.includes(L)).sort((L,G)=>{const q=C.findIndex(U=>U.value===L),A=C.findIndex(U=>U.value===G);return q-A}))},P=p("checkbox",o),T=`${P}-group`,O=ko(P),[N,I,z]=Nk(P,O),D=un(f,["value","disabled"]),M=i.length?C.map(F=>h.createElement(zk,{prefixCls:P,key:F.value.toString(),disabled:"disabled"in F?F.disabled:f.disabled,value:F.value,checked:v.includes(F.value),onChange:F.onChange,className:re(`${T}-item`,F.className),style:F.style,title:F.title,id:F.id,required:F.required},F.label)):n,j=h.useMemo(()=>({toggleOption:k,value:v,disabled:f.disabled,name:f.name,registerValue:E,cancelValue:x}),[k,v,f.disabled,f.name,E,x]),B=re(T,{[`${T}-rtl`]:g==="rtl"},a,c,z,O,I);return N(h.createElement("div",Object.assign({className:B,style:u},D,{ref:t}),h.createElement(Mk.Provider,{value:j},M)))}),Ky=zk;Ky.Group=w9;Ky.__ANT_CHECKBOX=!0;const jk=h.createContext({});var x9=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function yw(e){return e==="auto"?"1 1 auto":typeof e=="number"?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}const E9=["xs","sm","md","lg","xl","xxl"],$9=h.forwardRef((e,t)=>{const{getPrefixCls:r,direction:n}=h.useContext(Pt),{gutter:i,wrap:o}=h.useContext(jk),{prefixCls:a,span:c,order:u,offset:d,push:f,pull:p,className:g,children:v,flex:b,style:S}=e,_=x9(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),C=r("col",a),[x,E,k]=_8(C),P={};let T={};E9.forEach(I=>{let z={};const D=e[I];typeof D=="number"?z.span=D:typeof D=="object"&&(z=D||{}),delete _[I],T=Object.assign(Object.assign({},T),{[`${C}-${I}-${z.span}`]:z.span!==void 0,[`${C}-${I}-order-${z.order}`]:z.order||z.order===0,[`${C}-${I}-offset-${z.offset}`]:z.offset||z.offset===0,[`${C}-${I}-push-${z.push}`]:z.push||z.push===0,[`${C}-${I}-pull-${z.pull}`]:z.pull||z.pull===0,[`${C}-rtl`]:n==="rtl"}),z.flex&&(T[`${C}-${I}-flex`]=!0,P[`--${C}-${I}-flex`]=yw(z.flex))});const O=re(C,{[`${C}-${c}`]:c!==void 0,[`${C}-order-${u}`]:u,[`${C}-offset-${d}`]:d,[`${C}-push-${f}`]:f,[`${C}-pull-${p}`]:p},g,T,E,k),N={};if(i!=null&&i[0]){const I=typeof i[0]=="number"?`${i[0]/2}px`:`calc(${i[0]} / 2)`;N.paddingLeft=I,N.paddingRight=I}return b&&(N.flex=yw(b),o===!1&&!N.minWidth&&(N.minWidth=0)),x(h.createElement("div",Object.assign({},_,{style:Object.assign(Object.assign(Object.assign({},N),S),P),className:O,ref:t}),v))});function k9(e,t){const r=[void 0,void 0],n=Array.isArray(e)?e:[e,void 0],i=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0};return n.forEach((o,a)=>{if(typeof o=="object"&&o!==null)for(let c=0;c<Ra.length;c++){const u=Ra[c];if(i[u]&&o[u]!==void 0){r[a]=o[u];break}}else r[a]=o}),r}var R9=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function bw(e,t){const[r,n]=h.useState(typeof e=="string"?e:""),i=()=>{if(typeof e=="string"&&n(e),typeof e=="object")for(let o=0;o<Ra.length;o++){const a=Ra[o];if(!t||!t[a])continue;const c=e[a];if(c!==void 0){n(c);return}}};return h.useEffect(()=>{i()},[JSON.stringify(e),t]),r}const T9=h.forwardRef((e,t)=>{const{prefixCls:r,justify:n,align:i,className:o,style:a,children:c,gutter:u=0,wrap:d}=e,f=R9(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),{getPrefixCls:p,direction:g}=h.useContext(Pt),v=Py(!0,null),b=bw(i,v),S=bw(n,v),_=p("row",r),[C,x,E]=b8(_),k=k9(u,v),P=re(_,{[`${_}-no-wrap`]:d===!1,[`${_}-${S}`]:S,[`${_}-${b}`]:b,[`${_}-rtl`]:g==="rtl"},o,x,E),T={};if(k!=null&&k[0]){const z=typeof k[0]=="number"?`${k[0]/-2}px`:`calc(${k[0]} / -2)`;T.marginLeft=z,T.marginRight=z}const[O,N]=k;T.rowGap=N;const I=h.useMemo(()=>({gutter:[O,N],wrap:d}),[O,N,d]);return C(h.createElement(jk.Provider,{value:I},h.createElement("div",Object.assign({},f,{className:P,style:Object.assign(Object.assign({},T),a),ref:t}),c)))}),P9=e=>{const{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},O9=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:r,colorSplit:n,lineWidth:i,textPaddingInline:o,orientationMargin:a,verticalMarginInline:c}=e;return{[t]:Object.assign(Object.assign({},Fr(e)),{borderBlockStart:`${ee(i)} solid ${n}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${ee(i)} solid ${n}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${ee(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${ee(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${n}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${ee(i)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-start`]:{"&::before":{width:`calc(${a} * 100%)`},"&::after":{width:`calc(100% - ${a} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{"&::before":{width:`calc(100% - ${a} * 100%)`},"&::after":{width:`calc(${a} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:n,borderStyle:"dashed",borderWidth:`${ee(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:n,borderStyle:"dotted",borderWidth:`${ee(i)} 0 0`},[`&-horizontal${t}-with-text${t}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${t}-dotted`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-start${t}-no-default-orientation-margin-start`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:r}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:r}}})}},I9=e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),N9=gr("Divider",e=>{const t=er(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[O9(t),P9(t)]},I9,{unitless:{orientationMargin:!0}});var M9=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const z9={small:"sm",middle:"md"},_w=e=>{const{getPrefixCls:t,direction:r,className:n,style:i}=Un("divider"),{prefixCls:o,type:a="horizontal",orientation:c="center",orientationMargin:u,className:d,rootClassName:f,children:p,dashed:g,variant:v="solid",plain:b,style:S,size:_}=e,C=M9(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size"]),x=t("divider",o),[E,k,P]=N9(x),T=Go(_),O=z9[T],N=!!p,I=h.useMemo(()=>c==="left"?r==="rtl"?"end":"start":c==="right"?r==="rtl"?"start":"end":c,[r,c]),z=I==="start"&&u!=null,D=I==="end"&&u!=null,M=re(x,n,k,P,`${x}-${a}`,{[`${x}-with-text`]:N,[`${x}-with-text-${I}`]:N,[`${x}-dashed`]:!!g,[`${x}-${v}`]:v!=="solid",[`${x}-plain`]:!!b,[`${x}-rtl`]:r==="rtl",[`${x}-no-default-orientation-margin-start`]:z,[`${x}-no-default-orientation-margin-end`]:D,[`${x}-${O}`]:!!O},d,f),j=h.useMemo(()=>typeof u=="number"?u:/^\d+$/.test(u)?Number(u):u,[u]),B={marginInlineStart:z?j:void 0,marginInlineEnd:D?j:void 0};return E(h.createElement("div",Object.assign({className:M,style:Object.assign(Object.assign({},i),S)},C,{role:"separator"}),p&&a!=="vertical"&&h.createElement("span",{className:`${x}-inner-text`,style:B},p)))};function j9(e){return!!(e.addonBefore||e.addonAfter)}function B9(e){return!!(e.prefix||e.suffix||e.allowClear)}function Sw(e,t,r){var n=t.cloneNode(!0),i=Object.create(e,{target:{value:n},currentTarget:{value:n}});return n.value=r,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(n.selectionStart=t.selectionStart,n.selectionEnd=t.selectionEnd),n.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},i}function Cw(e,t,r,n){if(r){var i=t;if(t.type==="click"){i=Sw(t,e,""),r(i);return}if(e.type!=="file"&&n!==void 0){i=Sw(t,e,n),r(i);return}r(i)}}function L9(e,t){if(e){e.focus(t);var r=t||{},n=r.cursor;if(n){var i=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(i,i);break;default:e.setSelectionRange(0,i)}}}}var D9=Q.forwardRef(function(e,t){var r,n,i,o=e.inputElement,a=e.children,c=e.prefixCls,u=e.prefix,d=e.suffix,f=e.addonBefore,p=e.addonAfter,g=e.className,v=e.style,b=e.disabled,S=e.readOnly,_=e.focused,C=e.triggerFocus,x=e.allowClear,E=e.value,k=e.handleReset,P=e.hidden,T=e.classes,O=e.classNames,N=e.dataAttrs,I=e.styles,z=e.components,D=e.onClear,M=a??o,j=(z==null?void 0:z.affixWrapper)||"span",B=(z==null?void 0:z.groupWrapper)||"span",F=(z==null?void 0:z.wrapper)||"span",W=(z==null?void 0:z.groupAddon)||"span",V=h.useRef(null),L=function(fe){var de;(de=V.current)!==null&&de!==void 0&&de.contains(fe.target)&&(C==null||C())},G=B9(e),q=h.cloneElement(M,{value:E,className:re((r=M.props)===null||r===void 0?void 0:r.className,!G&&(O==null?void 0:O.variant))||null}),A=h.useRef(null);if(Q.useImperativeHandle(t,function(){return{nativeElement:A.current||V.current}}),G){var U=null;if(x){var Y=!b&&!S&&E,Z="".concat(c,"-clear-icon"),te=bt(x)==="object"&&x!==null&&x!==void 0&&x.clearIcon?x.clearIcon:"✖";U=Q.createElement("button",{type:"button",tabIndex:-1,onClick:function(fe){k==null||k(fe),D==null||D()},onMouseDown:function(fe){return fe.preventDefault()},className:re(Z,K(K({},"".concat(Z,"-hidden"),!Y),"".concat(Z,"-has-suffix"),!!d))},te)}var ne="".concat(c,"-affix-wrapper"),he=re(ne,K(K(K(K(K({},"".concat(c,"-disabled"),b),"".concat(ne,"-disabled"),b),"".concat(ne,"-focused"),_),"".concat(ne,"-readonly"),S),"".concat(ne,"-input-with-clear-btn"),d&&x&&E),T==null?void 0:T.affixWrapper,O==null?void 0:O.affixWrapper,O==null?void 0:O.variant),me=(d||x)&&Q.createElement("span",{className:re("".concat(c,"-suffix"),O==null?void 0:O.suffix),style:I==null?void 0:I.suffix},U,d);q=Q.createElement(j,Re({className:he,style:I==null?void 0:I.affixWrapper,onClick:L},N==null?void 0:N.affixWrapper,{ref:V}),u&&Q.createElement("span",{className:re("".concat(c,"-prefix"),O==null?void 0:O.prefix),style:I==null?void 0:I.prefix},u),q,me)}if(j9(e)){var ue="".concat(c,"-group"),Se="".concat(ue,"-addon"),ae="".concat(ue,"-wrapper"),le=re("".concat(c,"-wrapper"),ue,T==null?void 0:T.wrapper,O==null?void 0:O.wrapper),ce=re(ae,K({},"".concat(ae,"-disabled"),b),T==null?void 0:T.group,O==null?void 0:O.groupWrapper);q=Q.createElement(B,{className:ce,ref:A},Q.createElement(F,{className:le},f&&Q.createElement(W,{className:Se},f),q,p&&Q.createElement(W,{className:Se},p)))}return Q.cloneElement(q,{className:re((n=q.props)===null||n===void 0?void 0:n.className,g)||null,style:X(X({},(i=q.props)===null||i===void 0?void 0:i.style),v),hidden:P})}),A9=["show"];function H9(e,t){return h.useMemo(function(){var r={};t&&(r.show=bt(t)==="object"&&t.formatter?t.formatter:!!t),r=X(X({},r),e);var n=r,i=n.show,o=Bt(n,A9);return X(X({},o),{},{show:!!i,showFormatter:typeof i=="function"?i:void 0,strategy:o.strategy||function(a){return a.length}})},[e,t])}const F9=e=>{let t;return typeof e=="object"&&(e!=null&&e.clearIcon)?t=e:e&&(t={clearIcon:Q.createElement(If,null)}),t};var ww=h.createContext(null),Bk=h.createContext({}),W9=["prefixCls","className","containerRef"],V9=function(t){var r=t.prefixCls,n=t.className,i=t.containerRef,o=Bt(t,W9),a=h.useContext(Bk),c=a.panel,u=qo(c,i);return h.createElement("div",Re({className:re("".concat(r,"-content"),n),role:"dialog",ref:u},Fi(t,{aria:!0}),{"aria-modal":"true"},o))};function xw(e){return typeof e=="string"&&String(Number(e))===e?(jn(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var Ew={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function U9(e,t){var r,n,i,o=e.prefixCls,a=e.open,c=e.placement,u=e.inline,d=e.push,f=e.forceRender,p=e.autoFocus,g=e.keyboard,v=e.classNames,b=e.rootClassName,S=e.rootStyle,_=e.zIndex,C=e.className,x=e.id,E=e.style,k=e.motion,P=e.width,T=e.height,O=e.children,N=e.mask,I=e.maskClosable,z=e.maskMotion,D=e.maskClassName,M=e.maskStyle,j=e.afterOpenChange,B=e.onClose,F=e.onMouseEnter,W=e.onMouseOver,V=e.onMouseLeave,L=e.onClick,G=e.onKeyDown,q=e.onKeyUp,A=e.styles,U=e.drawerRender,Y=h.useRef(),Z=h.useRef(),te=h.useRef();h.useImperativeHandle(t,function(){return Y.current});var ne=function($e){var je=$e.keyCode,Oe=$e.shiftKey;switch(je){case Ge.TAB:{if(je===Ge.TAB){if(!Oe&&document.activeElement===te.current){var Qe;(Qe=Z.current)===null||Qe===void 0||Qe.focus({preventScroll:!0})}else if(Oe&&document.activeElement===Z.current){var st;(st=te.current)===null||st===void 0||st.focus({preventScroll:!0})}}break}case Ge.ESC:{B&&g&&($e.stopPropagation(),B($e));break}}};h.useEffect(function(){if(a&&p){var Ee;(Ee=Y.current)===null||Ee===void 0||Ee.focus({preventScroll:!0})}},[a]);var he=h.useState(!1),me=se(he,2),ue=me[0],Se=me[1],ae=h.useContext(ww),le;typeof d=="boolean"?le=d?{}:{distance:0}:le=d||{};var ce=(r=(n=(i=le)===null||i===void 0?void 0:i.distance)!==null&&n!==void 0?n:ae==null?void 0:ae.pushDistance)!==null&&r!==void 0?r:180,ye=h.useMemo(function(){return{pushDistance:ce,push:function(){Se(!0)},pull:function(){Se(!1)}}},[ce]);h.useEffect(function(){if(a){var Ee;ae==null||(Ee=ae.push)===null||Ee===void 0||Ee.call(ae)}else{var $e;ae==null||($e=ae.pull)===null||$e===void 0||$e.call(ae)}},[a]),h.useEffect(function(){return function(){var Ee;ae==null||(Ee=ae.pull)===null||Ee===void 0||Ee.call(ae)}},[]);var fe=h.createElement(Hi,Re({key:"mask"},z,{visible:N&&a}),function(Ee,$e){var je=Ee.className,Oe=Ee.style;return h.createElement("div",{className:re("".concat(o,"-mask"),je,v==null?void 0:v.mask,D),style:X(X(X({},Oe),M),A==null?void 0:A.mask),onClick:I&&a?B:void 0,ref:$e})}),de=typeof k=="function"?k(c):k,be={};if(ue&&ce)switch(c){case"top":be.transform="translateY(".concat(ce,"px)");break;case"bottom":be.transform="translateY(".concat(-ce,"px)");break;case"left":be.transform="translateX(".concat(ce,"px)");break;default:be.transform="translateX(".concat(-ce,"px)");break}c==="left"||c==="right"?be.width=xw(P):be.height=xw(T);var Ce={onMouseEnter:F,onMouseOver:W,onMouseLeave:V,onClick:L,onKeyDown:G,onKeyUp:q},Te=h.createElement(Hi,Re({key:"panel"},de,{visible:a,forceRender:f,onVisibleChanged:function($e){j==null||j($e)},removeOnLeave:!1,leavedClassName:"".concat(o,"-content-wrapper-hidden")}),function(Ee,$e){var je=Ee.className,Oe=Ee.style,Qe=h.createElement(V9,Re({id:x,containerRef:$e,prefixCls:o,className:re(C,v==null?void 0:v.content),style:X(X({},E),A==null?void 0:A.content)},Fi(e,{aria:!0}),Ce),O);return h.createElement("div",Re({className:re("".concat(o,"-content-wrapper"),v==null?void 0:v.wrapper,je),style:X(X(X({},be),Oe),A==null?void 0:A.wrapper)},Fi(e,{data:!0})),U?U(Qe):Qe)}),ze=X({},S);return _&&(ze.zIndex=_),h.createElement(ww.Provider,{value:ye},h.createElement("div",{className:re(o,"".concat(o,"-").concat(c),b,K(K({},"".concat(o,"-open"),a),"".concat(o,"-inline"),u)),style:ze,tabIndex:-1,ref:Y,onKeyDown:ne},fe,h.createElement("div",{tabIndex:0,ref:Z,style:Ew,"aria-hidden":"true","data-sentinel":"start"}),Te,h.createElement("div",{tabIndex:0,ref:te,style:Ew,"aria-hidden":"true","data-sentinel":"end"})))}var q9=h.forwardRef(U9),K9=function(t){var r=t.open,n=r===void 0?!1:r,i=t.prefixCls,o=i===void 0?"rc-drawer":i,a=t.placement,c=a===void 0?"right":a,u=t.autoFocus,d=u===void 0?!0:u,f=t.keyboard,p=f===void 0?!0:f,g=t.width,v=g===void 0?378:g,b=t.mask,S=b===void 0?!0:b,_=t.maskClosable,C=_===void 0?!0:_,x=t.getContainer,E=t.forceRender,k=t.afterOpenChange,P=t.destroyOnClose,T=t.onMouseEnter,O=t.onMouseOver,N=t.onMouseLeave,I=t.onClick,z=t.onKeyDown,D=t.onKeyUp,M=t.panelRef,j=h.useState(!1),B=se(j,2),F=B[0],W=B[1],V=h.useState(!1),L=se(V,2),G=L[0],q=L[1];ur(function(){q(!0)},[]);var A=G?n:!1,U=h.useRef(),Y=h.useRef();ur(function(){A&&(Y.current=document.activeElement)},[A]);var Z=function(ue){var Se;if(W(ue),k==null||k(ue),!ue&&Y.current&&!((Se=U.current)!==null&&Se!==void 0&&Se.contains(Y.current))){var ae;(ae=Y.current)===null||ae===void 0||ae.focus({preventScroll:!0})}},te=h.useMemo(function(){return{panel:M}},[M]);if(!E&&!F&&!A&&P)return null;var ne={onMouseEnter:T,onMouseOver:O,onMouseLeave:N,onClick:I,onKeyDown:z,onKeyUp:D},he=X(X({},t),{},{open:A,prefixCls:o,placement:c,autoFocus:d,keyboard:p,width:v,mask:S,maskClosable:C,inline:x===!1,afterOpenChange:Z,ref:U},ne);return h.createElement(Bk.Provider,{value:te},h.createElement(Vf,{open:A||E||F,autoDestroy:!1,getContainer:x,autoLock:S&&(A||F)},h.createElement(q9,he)))};const Lk=e=>{var t,r;const{prefixCls:n,ariaId:i,title:o,footer:a,extra:c,closable:u,loading:d,onClose:f,headerStyle:p,bodyStyle:g,footerStyle:v,children:b,classNames:S,styles:_}=e,C=Un("drawer");let x;u===!1?x=void 0:u===void 0||u===!0?x="start":x=(u==null?void 0:u.placement)==="end"?"end":"start";const E=h.useCallback(N=>h.createElement("button",{type:"button",onClick:f,className:re(`${n}-close`,{[`${n}-close-${x}`]:x==="end"})},N),[f,n,x]),[k,P]=hy(Kl(e),Kl(C),{closable:!0,closeIconRender:E}),T=()=>{var N,I;return!o&&!k?null:h.createElement("div",{style:Object.assign(Object.assign(Object.assign({},(N=C.styles)===null||N===void 0?void 0:N.header),p),_==null?void 0:_.header),className:re(`${n}-header`,{[`${n}-header-close-only`]:k&&!o&&!c},(I=C.classNames)===null||I===void 0?void 0:I.header,S==null?void 0:S.header)},h.createElement("div",{className:`${n}-header-title`},x==="start"&&P,o&&h.createElement("div",{className:`${n}-title`,id:i},o)),c&&h.createElement("div",{className:`${n}-extra`},c),x==="end"&&P)},O=()=>{var N,I;if(!a)return null;const z=`${n}-footer`;return h.createElement("div",{className:re(z,(N=C.classNames)===null||N===void 0?void 0:N.footer,S==null?void 0:S.footer),style:Object.assign(Object.assign(Object.assign({},(I=C.styles)===null||I===void 0?void 0:I.footer),v),_==null?void 0:_.footer)},a)};return h.createElement(h.Fragment,null,T(),h.createElement("div",{className:re(`${n}-body`,S==null?void 0:S.body,(t=C.classNames)===null||t===void 0?void 0:t.body),style:Object.assign(Object.assign(Object.assign({},(r=C.styles)===null||r===void 0?void 0:r.body),g),_==null?void 0:_.body)},d?h.createElement(ja,{active:!0,title:!1,paragraph:{rows:5},className:`${n}-body-skeleton`}):b),O())},G9=e=>{const t="100%";return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},Dk=(e,t)=>({"&-enter, &-appear":Object.assign(Object.assign({},e),{"&-active":t}),"&-leave":Object.assign(Object.assign({},t),{"&-active":e})}),Ak=(e,t)=>Object.assign({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${t}`}}},Dk({opacity:e},{opacity:1})),X9=(e,t)=>[Ak(.7,t),Dk({transform:G9(e)},{transform:"none"})],Y9=e=>{const{componentCls:t,motionDurationSlow:r}=e;return{[t]:{[`${t}-mask-motion`]:Ak(0,r),[`${t}-panel-motion`]:["left","right","top","bottom"].reduce((n,i)=>Object.assign(Object.assign({},n),{[`&-${i}`]:X9(i,r)}),{})}}},J9=e=>{const{borderRadiusSM:t,componentCls:r,zIndexPopup:n,colorBgMask:i,colorBgElevated:o,motionDurationSlow:a,motionDurationMid:c,paddingXS:u,padding:d,paddingLG:f,fontSizeLG:p,lineHeightLG:g,lineWidth:v,lineType:b,colorSplit:S,marginXS:_,colorIcon:C,colorIconHover:x,colorBgTextHover:E,colorBgTextActive:k,colorText:P,fontWeightStrong:T,footerPaddingBlock:O,footerPaddingInline:N,calc:I}=e,z=`${r}-content-wrapper`;return{[r]:{position:"fixed",inset:0,zIndex:n,pointerEvents:"none",color:P,"&-pure":{position:"relative",background:o,display:"flex",flexDirection:"column",[`&${r}-left`]:{boxShadow:e.boxShadowDrawerLeft},[`&${r}-right`]:{boxShadow:e.boxShadowDrawerRight},[`&${r}-top`]:{boxShadow:e.boxShadowDrawerUp},[`&${r}-bottom`]:{boxShadow:e.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${r}-mask`]:{position:"absolute",inset:0,zIndex:n,background:i,pointerEvents:"auto"},[z]:{position:"absolute",zIndex:n,maxWidth:"100vw",transition:`all ${a}`,"&-hidden":{display:"none"}},[`&-left > ${z}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${z}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${z}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${z}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${r}-content`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:o,pointerEvents:"auto"},[`${r}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${ee(d)} ${ee(f)}`,fontSize:p,lineHeight:g,borderBottom:`${ee(v)} ${b} ${S}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${r}-extra`]:{flex:"none"},[`${r}-close`]:Object.assign({display:"inline-flex",width:I(p).add(u).equal(),height:I(p).add(u).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:C,fontWeight:T,fontSize:p,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${c}`,textRendering:"auto",[`&${r}-close-end`]:{marginInlineStart:_},[`&:not(${r}-close-end)`]:{marginInlineEnd:_},"&:hover":{color:x,backgroundColor:E,textDecoration:"none"},"&:active":{backgroundColor:k}},lo(e)),[`${r}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:p,lineHeight:g},[`${r}-body`]:{flex:1,minWidth:0,minHeight:0,padding:f,overflow:"auto",[`${r}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${r}-footer`]:{flexShrink:0,padding:`${ee(O)} ${ee(N)}`,borderTop:`${ee(v)} ${b} ${S}`},"&-rtl":{direction:"rtl"}}}},Q9=e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding}),Hk=gr("Drawer",e=>{const t=er(e,{});return[J9(t),Y9(t)]},Q9);var Fk=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const Z9={distance:180},Mh=e=>{const{rootClassName:t,width:r,height:n,size:i="default",mask:o=!0,push:a=Z9,open:c,afterOpenChange:u,onClose:d,prefixCls:f,getContainer:p,panelRef:g=null,style:v,className:b,"aria-labelledby":S,visible:_,afterVisibleChange:C,maskStyle:x,drawerStyle:E,contentWrapperStyle:k,destroyOnClose:P,destroyOnHidden:T}=e,O=Fk(e,["rootClassName","width","height","size","mask","push","open","afterOpenChange","onClose","prefixCls","getContainer","panelRef","style","className","aria-labelledby","visible","afterVisibleChange","maskStyle","drawerStyle","contentWrapperStyle","destroyOnClose","destroyOnHidden"]),N=Uf(),I=O.title?N:void 0,{getPopupContainer:z,getPrefixCls:D,direction:M,className:j,style:B,classNames:F,styles:W}=Un("drawer"),V=D("drawer",f),[L,G,q]=Hk(V),A=p===void 0&&z?()=>z(document.body):p,U=re({"no-mask":!o,[`${V}-rtl`]:M==="rtl"},t,G,q),Y=h.useMemo(()=>r??(i==="large"?736:378),[r,i]),Z=h.useMemo(()=>n??(i==="large"?736:378),[n,i]),te={motionName:Fo(V,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},ne=ce=>({motionName:Fo(V,`panel-motion-${ce}`),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}),he=s$(),me=co(g,he),[ue,Se]=ec("Drawer",O.zIndex),{classNames:ae={},styles:le={}}=O;return L(h.createElement(Wu,{form:!0,space:!0},h.createElement(ju.Provider,{value:Se},h.createElement(K9,Object.assign({prefixCls:V,onClose:d,maskMotion:te,motion:ne},O,{classNames:{mask:re(ae.mask,F.mask),content:re(ae.content,F.content),wrapper:re(ae.wrapper,F.wrapper)},styles:{mask:Object.assign(Object.assign(Object.assign({},le.mask),x),W.mask),content:Object.assign(Object.assign(Object.assign({},le.content),E),W.content),wrapper:Object.assign(Object.assign(Object.assign({},le.wrapper),k),W.wrapper)},open:c??_,mask:o,push:a,width:Y,height:Z,style:Object.assign(Object.assign({},B),v),className:re(j,b),rootClassName:U,getContainer:A,afterOpenChange:u??C,panelRef:me,zIndex:ue,"aria-labelledby":S??I,destroyOnClose:T??P}),h.createElement(Lk,Object.assign({prefixCls:V},O,{ariaId:I,onClose:d}))))))},eD=e=>{const{prefixCls:t,style:r,className:n,placement:i="right"}=e,o=Fk(e,["prefixCls","style","className","placement"]),{getPrefixCls:a}=h.useContext(Pt),c=a("drawer",t),[u,d,f]=Hk(c),p=re(c,`${c}-pure`,`${c}-${i}`,d,f,n);return u(h.createElement("div",{className:p,style:r},h.createElement(Lk,Object.assign({prefixCls:c},o))))};Mh._InternalPanelDoNotUseOrYouWillBeFired=eD;function $w(e){return["small","middle","large"].includes(e)}function kw(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const tD=e=>{const{componentCls:t,borderRadius:r,paddingSM:n,colorBorder:i,paddingXS:o,fontSizeLG:a,fontSizeSM:c,borderRadiusLG:u,borderRadiusSM:d,colorBgContainerDisabled:f,lineWidth:p}=e;return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:n,margin:0,background:f,borderWidth:p,borderStyle:"solid",borderColor:i,borderRadius:r,"&-large":{fontSize:a,borderRadius:u},"&-small":{paddingInline:o,borderRadius:d,fontSize:c},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0}},Wf(e,{focus:!1})]}},rD=gr(["Space","Addon"],e=>[tD(e)]);var nD=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const iD=Q.forwardRef((e,t)=>{const{className:r,children:n,style:i,prefixCls:o}=e,a=nD(e,["className","children","style","prefixCls"]),{getPrefixCls:c,direction:u}=Q.useContext(Pt),d=c("space-addon",o),[f,p,g]=rD(d),{compactItemClassnames:v,compactSize:b}=Lu(d,u),S=re(d,p,v,g,{[`${d}-${b}`]:b},r);return f(Q.createElement("div",Object.assign({ref:t,className:S,style:i},a),n))}),Wk=Q.createContext({latestIndex:0}),oD=Wk.Provider,sD=({className:e,index:t,children:r,split:n,style:i})=>{const{latestIndex:o}=h.useContext(Wk);return r==null?null:h.createElement(h.Fragment,null,h.createElement("div",{className:e,style:i},r),t<o&&n&&h.createElement("span",{className:`${e}-split`},n))},aD=e=>{const{componentCls:t,antCls:r}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},lD=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},cD=gr("Space",e=>{const t=er(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[aD(t),lD(t)]},()=>({}),{resetStyle:!1});var uD=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const dD=h.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:i,size:o,className:a,style:c,classNames:u,styles:d}=Un("space"),{size:f=o??"small",align:p,className:g,rootClassName:v,children:b,direction:S="horizontal",prefixCls:_,split:C,style:x,wrap:E=!1,classNames:k,styles:P}=e,T=uD(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[O,N]=Array.isArray(f)?f:[f,f],I=$w(N),z=$w(O),D=kw(N),M=kw(O),j=di(b,{keepEmpty:!0}),B=p===void 0&&S==="horizontal"?"center":p,F=n("space",_),[W,V,L]=cD(F),G=re(F,a,V,`${F}-${S}`,{[`${F}-rtl`]:i==="rtl",[`${F}-align-${B}`]:B,[`${F}-gap-row-${N}`]:I,[`${F}-gap-col-${O}`]:z},g,v,L),q=re(`${F}-item`,(r=k==null?void 0:k.item)!==null&&r!==void 0?r:u.item),A=Object.assign(Object.assign({},d.item),P==null?void 0:P.item),U=j.map((te,ne)=>{const he=(te==null?void 0:te.key)||`${q}-${ne}`;return h.createElement(sD,{className:q,key:he,index:ne,split:C,style:A},te)}),Y=h.useMemo(()=>({latestIndex:j.reduce((ne,he,me)=>he!=null?me:ne,0)}),[j]);if(j.length===0)return null;const Z={};return E&&(Z.flexWrap="wrap"),!z&&M&&(Z.columnGap=O),!I&&D&&(Z.rowGap=N),W(h.createElement("div",Object.assign({ref:t,className:G,style:Object.assign(Object.assign(Object.assign({},Z),c),x)},T),h.createElement(oD,{value:Y},U)))}),ls=dD;ls.Compact=JI;ls.Addon=iD;var hD=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const Vk=e=>{const{getPopupContainer:t,getPrefixCls:r,direction:n}=h.useContext(Pt),{prefixCls:i,type:o="default",danger:a,disabled:c,loading:u,onClick:d,htmlType:f,children:p,className:g,menu:v,arrow:b,autoFocus:S,overlay:_,trigger:C,align:x,open:E,onOpenChange:k,placement:P,getPopupContainer:T,href:O,icon:N=h.createElement(Hy,null),title:I,buttonsRender:z=ae=>ae,mouseEnterDelay:D,mouseLeaveDelay:M,overlayClassName:j,overlayStyle:B,destroyOnHidden:F,destroyPopupOnHide:W,dropdownRender:V,popupRender:L}=e,G=hD(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),q=r("dropdown",i),A=`${q}-button`,Y={menu:v,arrow:b,autoFocus:S,align:x,disabled:c,trigger:c?[]:C,onOpenChange:k,getPopupContainer:T||t,mouseEnterDelay:D,mouseLeaveDelay:M,overlayClassName:j,overlayStyle:B,destroyOnHidden:F,popupRender:L||V},{compactSize:Z,compactItemClassnames:te}=Lu(q,n),ne=re(A,te,g);"destroyPopupOnHide"in e&&(Y.destroyPopupOnHide=W),"overlay"in e&&(Y.overlay=_),"open"in e&&(Y.open=E),"placement"in e?Y.placement=P:Y.placement=n==="rtl"?"bottomLeft":"bottomRight";const he=h.createElement(cn,{type:o,danger:a,disabled:c,loading:u,onClick:d,htmlType:f,href:O,title:I},p),me=h.createElement(cn,{type:o,danger:a,icon:N}),[ue,Se]=z([he,me]);return h.createElement(ls.Compact,Object.assign({className:ne,size:Z,block:!0},G),ue,h.createElement(tm,Object.assign({},Y),Se))};Vk.__ANT_BUTTON=!0;const a0=tm;a0.Button=Vk;var fD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},mD=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:fD}))},lu=h.forwardRef(mD),pD=`
299
+ min-height:0 !important;
300
+ max-height:none !important;
301
+ height:0 !important;
302
+ visibility:hidden !important;
303
+ overflow:hidden !important;
304
+ position:absolute !important;
305
+ z-index:-1000 !important;
306
+ top:0 !important;
307
+ right:0 !important;
308
+ pointer-events: none !important;
309
+ `,gD=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],kg={},zi;function vD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&kg[r])return kg[r];var n=window.getComputedStyle(e),i=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),o=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),a=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),c=gD.map(function(d){return"".concat(d,":").concat(n.getPropertyValue(d))}).join(";"),u={sizingStyle:c,paddingSize:o,borderSize:a,boxSizing:i};return t&&r&&(kg[r]=u),u}function yD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;zi||(zi=document.createElement("textarea"),zi.setAttribute("tab-index","-1"),zi.setAttribute("aria-hidden","true"),zi.setAttribute("name","hiddenTextarea"),document.body.appendChild(zi)),e.getAttribute("wrap")?zi.setAttribute("wrap",e.getAttribute("wrap")):zi.removeAttribute("wrap");var i=vD(e,t),o=i.paddingSize,a=i.borderSize,c=i.boxSizing,u=i.sizingStyle;zi.setAttribute("style","".concat(u,";").concat(pD)),zi.value=e.value||e.placeholder||"";var d=void 0,f=void 0,p,g=zi.scrollHeight;if(c==="border-box"?g+=a:c==="content-box"&&(g-=o),r!==null||n!==null){zi.value=" ";var v=zi.scrollHeight-o;r!==null&&(d=v*r,c==="border-box"&&(d=d+o+a),g=Math.max(d,g)),n!==null&&(f=v*n,c==="border-box"&&(f=f+o+a),p=g>f?"":"hidden",g=Math.min(f,g))}var b={height:g,overflowY:p,resize:"none"};return d&&(b.minHeight=d),f&&(b.maxHeight=f),b}var bD=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Rg=0,Tg=1,Pg=2,_D=h.forwardRef(function(e,t){var r=e,n=r.prefixCls,i=r.defaultValue,o=r.value,a=r.autoSize,c=r.onResize,u=r.className,d=r.style,f=r.disabled,p=r.onChange;r.onInternalAutoSize;var g=Bt(r,bD),v=Qr(i,{value:o,postState:function(Y){return Y??""}}),b=se(v,2),S=b[0],_=b[1],C=function(Y){_(Y.target.value),p==null||p(Y)},x=h.useRef();h.useImperativeHandle(t,function(){return{textArea:x.current}});var E=h.useMemo(function(){return a&&bt(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),k=se(E,2),P=k[0],T=k[1],O=!!a,N=h.useState(Pg),I=se(N,2),z=I[0],D=I[1],M=h.useState(),j=se(M,2),B=j[0],F=j[1],W=function(){D(Rg)};ur(function(){O&&W()},[o,P,T,O]),ur(function(){if(z===Rg)D(Tg);else if(z===Tg){var U=yD(x.current,!1,P,T);D(Pg),F(U)}},[z]);var V=h.useRef(),L=function(){$r.cancel(V.current)},G=function(Y){z===Pg&&(c==null||c(Y),a&&(L(),V.current=$r(function(){W()})))};h.useEffect(function(){return L},[]);var q=O?B:null,A=X(X({},d),q);return(z===Rg||z===Tg)&&(A.overflowY="hidden",A.overflowX="hidden"),h.createElement(oo,{onResize:G,disabled:!(a||c)},h.createElement("textarea",Re({},g,{ref:x,style:A,className:re(n,u,K({},"".concat(n,"-disabled"),f)),disabled:f,value:S,onChange:C})))}),SD=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],CD=Q.forwardRef(function(e,t){var r,n=e.defaultValue,i=e.value,o=e.onFocus,a=e.onBlur,c=e.onChange,u=e.allowClear,d=e.maxLength,f=e.onCompositionStart,p=e.onCompositionEnd,g=e.suffix,v=e.prefixCls,b=v===void 0?"rc-textarea":v,S=e.showCount,_=e.count,C=e.className,x=e.style,E=e.disabled,k=e.hidden,P=e.classNames,T=e.styles,O=e.onResize,N=e.onClear,I=e.onPressEnter,z=e.readOnly,D=e.autoSize,M=e.onKeyDown,j=Bt(e,SD),B=Qr(n,{value:i,defaultValue:n}),F=se(B,2),W=F[0],V=F[1],L=W==null?"":String(W),G=Q.useState(!1),q=se(G,2),A=q[0],U=q[1],Y=Q.useRef(!1),Z=Q.useState(null),te=se(Z,2),ne=te[0],he=te[1],me=h.useRef(null),ue=h.useRef(null),Se=function(){var Le;return(Le=ue.current)===null||Le===void 0?void 0:Le.textArea},ae=function(){Se().focus()};h.useImperativeHandle(t,function(){var tt;return{resizableTextArea:ue.current,focus:ae,blur:function(){Se().blur()},nativeElement:((tt=me.current)===null||tt===void 0?void 0:tt.nativeElement)||Se()}}),h.useEffect(function(){U(function(tt){return!E&&tt})},[E]);var le=Q.useState(null),ce=se(le,2),ye=ce[0],fe=ce[1];Q.useEffect(function(){if(ye){var tt;(tt=Se()).setSelectionRange.apply(tt,We(ye))}},[ye]);var de=H9(_,S),be=(r=de.max)!==null&&r!==void 0?r:d,Ce=Number(be)>0,Te=de.strategy(L),ze=!!be&&Te>be,Ee=function(Le,nt){var Me=nt;!Y.current&&de.exceedFormatter&&de.max&&de.strategy(nt)>de.max&&(Me=de.exceedFormatter(nt,{max:de.max}),nt!==Me&&fe([Se().selectionStart||0,Se().selectionEnd||0])),V(Me),Cw(Le.currentTarget,Le,c,Me)},$e=function(Le){Y.current=!0,f==null||f(Le)},je=function(Le){Y.current=!1,Ee(Le,Le.currentTarget.value),p==null||p(Le)},Oe=function(Le){Ee(Le,Le.target.value)},Qe=function(Le){Le.key==="Enter"&&I&&I(Le),M==null||M(Le)},st=function(Le){U(!0),o==null||o(Le)},Et=function(Le){U(!1),a==null||a(Le)},mt=function(Le){V(""),ae(),Cw(Se(),Le,c)},Je=g,ht;de.show&&(de.showFormatter?ht=de.showFormatter({value:L,count:Te,maxLength:be}):ht="".concat(Te).concat(Ce?" / ".concat(be):""),Je=Q.createElement(Q.Fragment,null,Je,Q.createElement("span",{className:re("".concat(b,"-data-count"),P==null?void 0:P.count),style:T==null?void 0:T.count},ht)));var Xe=function(Le){var nt;O==null||O(Le),(nt=Se())!==null&&nt!==void 0&&nt.style.height&&he(!0)},vt=!D&&!S&&!u;return Q.createElement(D9,{ref:me,value:L,allowClear:u,handleReset:mt,suffix:Je,prefixCls:b,classNames:X(X({},P),{},{affixWrapper:re(P==null?void 0:P.affixWrapper,K(K({},"".concat(b,"-show-count"),S),"".concat(b,"-textarea-allow-clear"),u))}),disabled:E,focused:A,className:re(C,ze&&"".concat(b,"-out-of-range")),style:X(X({},x),ne&&!vt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof ht=="string"?ht:void 0}},hidden:k,readOnly:z,onClear:N},Q.createElement(_D,Re({},j,{autoSize:D,maxLength:d,onKeyDown:Qe,onChange:Oe,onFocus:st,onBlur:Et,onCompositionStart:$e,onCompositionEnd:je,className:re(P==null?void 0:P.textarea),style:X(X({},T==null?void 0:T.textarea),{},{resize:x==null?void 0:x.resize}),disabled:E,prefixCls:b,onResize:Xe,ref:ue,readOnly:z})))});const wD=e=>{const{componentCls:t,paddingLG:r}=e,n=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[n]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
310
+ &-allow-clear > ${t},
311
+ &-affix-wrapper${n}-has-feedback ${t}
312
+ `]:{paddingInlineEnd:r},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${n}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},xD=gr(["Input","TextArea"],e=>{const t=er(e,rm(e));return wD(t)},nm,{resetFont:!1});var ED=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const $D=h.forwardRef((e,t)=>{var r;const{prefixCls:n,bordered:i=!0,size:o,disabled:a,status:c,allowClear:u,classNames:d,rootClassName:f,className:p,style:g,styles:v,variant:b,showCount:S,onMouseDown:_,onResize:C}=e,x=ED(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:E,direction:k,allowClear:P,autoComplete:T,className:O,style:N,classNames:I,styles:z}=Un("textArea"),D=h.useContext(Gs),M=a??D,{status:j,hasFeedback:B,feedbackIcon:F}=h.useContext(Su),W=D$(j,c),V=h.useRef(null);h.useImperativeHandle(t,()=>{var de;return{resizableTextArea:(de=V.current)===null||de===void 0?void 0:de.resizableTextArea,focus:be=>{var Ce,Te;L9((Te=(Ce=V.current)===null||Ce===void 0?void 0:Ce.resizableTextArea)===null||Te===void 0?void 0:Te.textArea,be)},blur:()=>{var be;return(be=V.current)===null||be===void 0?void 0:be.blur()}}});const L=E("input",n),G=ko(L),[q,A,U]=T7(L,f),[Y]=xD(L,G),{compactSize:Z,compactItemClassnames:te}=Lu(L,k),ne=Go(de=>{var be;return(be=o??Z)!==null&&be!==void 0?be:de}),[he,me]=W$("textArea",b,i),ue=F9(u??P),[Se,ae]=h.useState(!1),[le,ce]=h.useState(!1),ye=de=>{ae(!0),_==null||_(de);const be=()=>{ae(!1),document.removeEventListener("mouseup",be)};document.addEventListener("mouseup",be)},fe=de=>{var be,Ce;if(C==null||C(de),Se&&typeof getComputedStyle=="function"){const Te=(Ce=(be=V.current)===null||be===void 0?void 0:be.nativeElement)===null||Ce===void 0?void 0:Ce.querySelector("textarea");Te&&getComputedStyle(Te).resize==="both"&&ce(!0)}};return q(Y(h.createElement(CD,Object.assign({autoComplete:T},x,{style:Object.assign(Object.assign({},N),g),styles:Object.assign(Object.assign({},z),v),disabled:M,allowClear:ue,className:re(U,G,p,f,te,O,le&&`${L}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},d),I),{textarea:re({[`${L}-sm`]:ne==="small",[`${L}-lg`]:ne==="large"},A,d==null?void 0:d.textarea,I.textarea,Se&&`${L}-mouse-active`),variant:re({[`${L}-${he}`]:me},L$(L,W)),affixWrapper:re(`${L}-textarea-affix-wrapper`,{[`${L}-affix-wrapper-rtl`]:k==="rtl",[`${L}-affix-wrapper-sm`]:ne==="small",[`${L}-affix-wrapper-lg`]:ne==="large",[`${L}-textarea-show-count`]:S||((r=e.count)===null||r===void 0?void 0:r.show)},A)}),prefixCls:L,suffix:B&&h.createElement("span",{className:`${L}-textarea-suffix`},F),showCount:S,ref:V,onResize:fe,onMouseDown:ye}))))});function kD(e,t,r){return typeof r=="boolean"?r:e.length?!0:di(t).some(i=>i.type===Ck)}var Uk=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function sm({suffixCls:e,tagName:t,displayName:r}){return n=>h.forwardRef((o,a)=>h.createElement(n,Object.assign({ref:a,suffixCls:e,tagName:t},o)))}const Gy=h.forwardRef((e,t)=>{const{prefixCls:r,suffixCls:n,className:i,tagName:o}=e,a=Uk(e,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:c}=h.useContext(Pt),u=c("layout",r),[d,f,p]=Sk(u),g=n?`${u}-${n}`:u;return d(h.createElement(o,Object.assign({className:re(r||g,i,f,p),ref:t},a)))}),RD=h.forwardRef((e,t)=>{const{direction:r}=h.useContext(Pt),[n,i]=h.useState([]),{prefixCls:o,className:a,rootClassName:c,children:u,hasSider:d,tagName:f,style:p}=e,g=Uk(e,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),v=un(g,["suffixCls"]),{getPrefixCls:b,className:S,style:_}=Un("layout"),C=b("layout",o),x=kD(n,u,d),[E,k,P]=Sk(C),T=re(C,{[`${C}-has-sider`]:x,[`${C}-rtl`]:r==="rtl"},S,a,c,k,P),O=h.useMemo(()=>({siderHook:{addSider:N=>{i(I=>[].concat(We(I),[N]))},removeSider:N=>{i(I=>I.filter(z=>z!==N))}}}),[]);return E(h.createElement(yk.Provider,{value:O},h.createElement(f,Object.assign({ref:t,className:T,style:Object.assign(Object.assign({},_),p)},v),u)))}),TD=sm({tagName:"div",displayName:"Layout"})(RD),PD=sm({suffixCls:"header",tagName:"header",displayName:"Header"})(Gy),OD=sm({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(Gy),ID=sm({suffixCls:"content",tagName:"main",displayName:"Content"})(Gy),Vs=TD;Vs.Header=PD;Vs.Footer=OD;Vs.Content=ID;Vs.Sider=Ck;Vs._InternalSiderContext=em;var ND={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},MD=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:ND}))},Rw=h.forwardRef(MD),zD={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},jD=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:zD}))},Tw=h.forwardRef(jD),BD={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},LD=[10,20,50,100],DD=function(t){var r=t.pageSizeOptions,n=r===void 0?LD:r,i=t.locale,o=t.changeSize,a=t.pageSize,c=t.goButton,u=t.quickGo,d=t.rootPrefixCls,f=t.disabled,p=t.buildOptionText,g=t.showSizeChanger,v=t.sizeChangerRender,b=Q.useState(""),S=se(b,2),_=S[0],C=S[1],x=function(){return!_||Number.isNaN(_)?void 0:Number(_)},E=typeof p=="function"?p:function(M){return"".concat(M," ").concat(i.items_per_page)},k=function(j){C(j.target.value)},P=function(j){c||_===""||(C(""),!(j.relatedTarget&&(j.relatedTarget.className.indexOf("".concat(d,"-item-link"))>=0||j.relatedTarget.className.indexOf("".concat(d,"-item"))>=0))&&(u==null||u(x())))},T=function(j){_!==""&&(j.keyCode===Ge.ENTER||j.type==="click")&&(C(""),u==null||u(x()))},O=function(){return n.some(function(j){return j.toString()===a.toString()})?n:n.concat([a]).sort(function(j,B){var F=Number.isNaN(Number(j))?0:Number(j),W=Number.isNaN(Number(B))?0:Number(B);return F-W})},N="".concat(d,"-options");if(!g&&!u)return null;var I=null,z=null,D=null;return g&&v&&(I=v({disabled:f,size:a,onSizeChange:function(j){o==null||o(Number(j))},"aria-label":i.page_size,className:"".concat(N,"-size-changer"),options:O().map(function(M){return{label:E(M),value:M}})})),u&&(c&&(D=typeof c=="boolean"?Q.createElement("button",{type:"button",onClick:T,onKeyUp:T,disabled:f,className:"".concat(N,"-quick-jumper-button")},i.jump_to_confirm):Q.createElement("span",{onClick:T,onKeyUp:T},c)),z=Q.createElement("div",{className:"".concat(N,"-quick-jumper")},i.jump_to,Q.createElement("input",{disabled:f,type:"text",value:_,onChange:k,onKeyUp:T,onBlur:P,"aria-label":i.page}),i.page,D)),Q.createElement("li",{className:N},I,z)},Lc=function(t){var r=t.rootPrefixCls,n=t.page,i=t.active,o=t.className,a=t.showTitle,c=t.onClick,u=t.onKeyPress,d=t.itemRender,f="".concat(r,"-item"),p=re(f,"".concat(f,"-").concat(n),K(K({},"".concat(f,"-active"),i),"".concat(f,"-disabled"),!n),o),g=function(){c(n)},v=function(_){u(_,c,n)},b=d(n,"page",Q.createElement("a",{rel:"nofollow"},n));return b?Q.createElement("li",{title:a?String(n):null,className:p,onClick:g,onKeyDown:v,tabIndex:0},b):null},AD=function(t,r,n){return n};function Pw(){}function Ow(e){var t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function ha(e,t,r){var n=typeof e>"u"?t:e;return Math.floor((r-1)/n)+1}var HD=function(t){var r=t.prefixCls,n=r===void 0?"rc-pagination":r,i=t.selectPrefixCls,o=i===void 0?"rc-select":i,a=t.className,c=t.current,u=t.defaultCurrent,d=u===void 0?1:u,f=t.total,p=f===void 0?0:f,g=t.pageSize,v=t.defaultPageSize,b=v===void 0?10:v,S=t.onChange,_=S===void 0?Pw:S,C=t.hideOnSinglePage,x=t.align,E=t.showPrevNextJumpers,k=E===void 0?!0:E,P=t.showQuickJumper,T=t.showLessItems,O=t.showTitle,N=O===void 0?!0:O,I=t.onShowSizeChange,z=I===void 0?Pw:I,D=t.locale,M=D===void 0?BD:D,j=t.style,B=t.totalBoundaryShowSizeChanger,F=B===void 0?50:B,W=t.disabled,V=t.simple,L=t.showTotal,G=t.showSizeChanger,q=G===void 0?p>F:G,A=t.sizeChangerRender,U=t.pageSizeOptions,Y=t.itemRender,Z=Y===void 0?AD:Y,te=t.jumpPrevIcon,ne=t.jumpNextIcon,he=t.prevIcon,me=t.nextIcon,ue=Q.useRef(null),Se=Qr(10,{value:g,defaultValue:b}),ae=se(Se,2),le=ae[0],ce=ae[1],ye=Qr(1,{value:c,defaultValue:d,postState:function(gt){return Math.max(1,Math.min(gt,ha(void 0,le,p)))}}),fe=se(ye,2),de=fe[0],be=fe[1],Ce=Q.useState(de),Te=se(Ce,2),ze=Te[0],Ee=Te[1];h.useEffect(function(){Ee(de)},[de]);var $e=Math.max(1,de-(T?3:5)),je=Math.min(ha(void 0,le,p),de+(T?3:5));function Oe(Ke,gt){var It=Ke||Q.createElement("button",{type:"button","aria-label":gt,className:"".concat(n,"-item-link")});return typeof Ke=="function"&&(It=Q.createElement(Ke,X({},t))),It}function Qe(Ke){var gt=Ke.target.value,It=ha(void 0,le,p),fr;return gt===""?fr=gt:Number.isNaN(Number(gt))?fr=ze:gt>=It?fr=It:fr=Number(gt),fr}function st(Ke){return Ow(Ke)&&Ke!==de&&Ow(p)&&p>0}var Et=p>le?P:!1;function mt(Ke){(Ke.keyCode===Ge.UP||Ke.keyCode===Ge.DOWN)&&Ke.preventDefault()}function Je(Ke){var gt=Qe(Ke);switch(gt!==ze&&Ee(gt),Ke.keyCode){case Ge.ENTER:vt(gt);break;case Ge.UP:vt(gt-1);break;case Ge.DOWN:vt(gt+1);break}}function ht(Ke){vt(Qe(Ke))}function Xe(Ke){var gt=ha(Ke,le,p),It=de>gt&&gt!==0?gt:de;ce(Ke),Ee(It),z==null||z(de,Ke),be(It),_==null||_(It,Ke)}function vt(Ke){if(st(Ke)&&!W){var gt=ha(void 0,le,p),It=Ke;return Ke>gt?It=gt:Ke<1&&(It=1),It!==ze&&Ee(It),be(It),_==null||_(It,le),It}return de}var tt=de>1,Le=de<ha(void 0,le,p);function nt(){tt&&vt(de-1)}function Me(){Le&&vt(de+1)}function qe(){vt($e)}function Ot(){vt(je)}function _t(Ke,gt){if(Ke.key==="Enter"||Ke.charCode===Ge.ENTER||Ke.keyCode===Ge.ENTER){for(var It=arguments.length,fr=new Array(It>2?It-2:0),rn=2;rn<It;rn++)fr[rn-2]=arguments[rn];gt.apply(void 0,fr)}}function tr(Ke){_t(Ke,nt)}function Yt(Ke){_t(Ke,Me)}function vr(Ke){_t(Ke,qe)}function Tr(Ke){_t(Ke,Ot)}function nr(Ke){var gt=Z(Ke,"prev",Oe(he,"prev page"));return Q.isValidElement(gt)?Q.cloneElement(gt,{disabled:!tt}):gt}function At(Ke){var gt=Z(Ke,"next",Oe(me,"next page"));return Q.isValidElement(gt)?Q.cloneElement(gt,{disabled:!Le}):gt}function kt(Ke){(Ke.type==="click"||Ke.keyCode===Ge.ENTER)&&vt(ze)}var ir=null,Gt=Fi(t,{aria:!0,data:!0}),it=L&&Q.createElement("li",{className:"".concat(n,"-total-text")},L(p,[p===0?0:(de-1)*le+1,de*le>p?p:de*le])),xt=null,ft=ha(void 0,le,p);if(C&&p<=le)return null;var Ie=[],ke={rootPrefixCls:n,onClick:vt,onKeyPress:_t,showTitle:N,itemRender:Z,page:-1},xe=de-1>0?de-1:0,De=de+1<ft?de+1:ft,et=P&&P.goButton,rt=bt(V)==="object"?V.readOnly:!V,Ht=et,qt=null;V&&(et&&(typeof et=="boolean"?Ht=Q.createElement("button",{type:"button",onClick:kt,onKeyUp:kt},M.jump_to_confirm):Ht=Q.createElement("span",{onClick:kt,onKeyUp:kt},et),Ht=Q.createElement("li",{title:N?"".concat(M.jump_to).concat(de,"/").concat(ft):null,className:"".concat(n,"-simple-pager")},Ht)),qt=Q.createElement("li",{title:N?"".concat(de,"/").concat(ft):null,className:"".concat(n,"-simple-pager")},rt?ze:Q.createElement("input",{type:"text","aria-label":M.jump_to,value:ze,disabled:W,onKeyDown:mt,onKeyUp:Je,onChange:Je,onBlur:ht,size:3}),Q.createElement("span",{className:"".concat(n,"-slash")},"/"),ft));var jt=T?1:2;if(ft<=3+jt*2){ft||Ie.push(Q.createElement(Lc,Re({},ke,{key:"noPager",page:1,className:"".concat(n,"-item-disabled")})));for(var Lt=1;Lt<=ft;Lt+=1)Ie.push(Q.createElement(Lc,Re({},ke,{key:Lt,page:Lt,active:de===Lt})))}else{var kr=T?M.prev_3:M.prev_5,wr=T?M.next_3:M.next_5,Pr=Z($e,"jump-prev",Oe(te,"prev page")),Lr=Z(je,"jump-next",Oe(ne,"next page"));k&&(ir=Pr?Q.createElement("li",{title:N?kr:null,key:"prev",onClick:qe,tabIndex:0,onKeyDown:vr,className:re("".concat(n,"-jump-prev"),K({},"".concat(n,"-jump-prev-custom-icon"),!!te))},Pr):null,xt=Lr?Q.createElement("li",{title:N?wr:null,key:"next",onClick:Ot,tabIndex:0,onKeyDown:Tr,className:re("".concat(n,"-jump-next"),K({},"".concat(n,"-jump-next-custom-icon"),!!ne))},Lr):null);var sr=Math.max(1,de-jt),dr=Math.min(de+jt,ft);de-1<=jt&&(dr=1+jt*2),ft-de<=jt&&(sr=ft-jt*2);for(var He=sr;He<=dr;He+=1)Ie.push(Q.createElement(Lc,Re({},ke,{key:He,page:He,active:de===He})));if(de-1>=jt*2&&de!==3&&(Ie[0]=Q.cloneElement(Ie[0],{className:re("".concat(n,"-item-after-jump-prev"),Ie[0].props.className)}),Ie.unshift(ir)),ft-de>=jt*2&&de!==ft-2){var Ye=Ie[Ie.length-1];Ie[Ie.length-1]=Q.cloneElement(Ye,{className:re("".concat(n,"-item-before-jump-next"),Ye.props.className)}),Ie.push(xt)}sr!==1&&Ie.unshift(Q.createElement(Lc,Re({},ke,{key:1,page:1}))),dr!==ft&&Ie.push(Q.createElement(Lc,Re({},ke,{key:ft,page:ft})))}var Tt=nr(xe);if(Tt){var pt=!tt||!ft;Tt=Q.createElement("li",{title:N?M.prev_page:null,onClick:nt,tabIndex:pt?null:0,onKeyDown:tr,className:re("".concat(n,"-prev"),K({},"".concat(n,"-disabled"),pt)),"aria-disabled":pt},Tt)}var at=At(De);if(at){var Ze,Rt;V?(Ze=!Le,Rt=tt?0:null):(Ze=!Le||!ft,Rt=Ze?null:0),at=Q.createElement("li",{title:N?M.next_page:null,onClick:Me,tabIndex:Rt,onKeyDown:Yt,className:re("".concat(n,"-next"),K({},"".concat(n,"-disabled"),Ze)),"aria-disabled":Ze},at)}var Kt=re(n,a,K(K(K(K(K({},"".concat(n,"-start"),x==="start"),"".concat(n,"-center"),x==="center"),"".concat(n,"-end"),x==="end"),"".concat(n,"-simple"),V),"".concat(n,"-disabled"),W));return Q.createElement("ul",Re({className:Kt,style:j,ref:ue},Gt),it,Tt,V?qt:Ie,at,Q.createElement(DD,{locale:M,rootPrefixCls:n,disabled:W,selectPrefixCls:o,changeSize:Xe,pageSize:le,pageSizeOptions:U,quickGo:Et?vt:null,goButton:Ht,showSizeChanger:q,sizeChangerRender:A}))};const FD=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},WD=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:ee(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:ee(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:ee(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[`
313
+ &${t}-mini ${t}-prev ${t}-item-link,
314
+ &${t}-mini ${t}-next ${t}-item-link
315
+ `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:ee(e.itemSizeSM)}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:ee(e.itemSizeSM)},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:ee(e.itemSizeSM),input:Object.assign(Object.assign({},Wy(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},VD=e=>{const{componentCls:t}=e;return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSize,lineHeight:ee(e.itemSize),verticalAlign:"top",[`${t}-item-link`]:{height:e.itemSize,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSize,lineHeight:ee(e.itemSize)}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:e.itemSize,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${ee(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${ee(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${ee(e.inputOutlineOffset)} 0 ${ee(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},[`&${t}-mini`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSizeSM,lineHeight:ee(e.itemSizeSM),[`${t}-item-link`]:{height:e.itemSizeSM,"&::after":{height:e.itemSizeSM,lineHeight:ee(e.itemSizeSM)}}},[`${t}-simple-pager`]:{height:e.itemSizeSM,input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},UD=e=>{const{componentCls:t}=e;return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[`
316
+ ${t}-prev,
317
+ ${t}-jump-prev,
318
+ ${t}-jump-next
319
+ `]:{marginInlineEnd:e.marginXS},[`
320
+ ${t}-prev,
321
+ ${t}-next,
322
+ ${t}-jump-prev,
323
+ ${t}-jump-next
324
+ `]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,color:e.colorText,fontFamily:e.fontFamily,lineHeight:ee(e.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${ee(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:ee(e.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},Vy(e)),Fy(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{"&[disabled]":Object.assign({},im(e)),width:e.quickJumperInputWidth,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},qD=e=>{const{componentCls:t}=e;return{[`${t}-item`]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,marginInlineEnd:e.marginXS,fontFamily:e.fontFamily,lineHeight:ee(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${ee(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${ee(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},KD=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Fr(e)),{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.itemSize,marginInlineEnd:e.marginXS,lineHeight:ee(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"}}),qD(e)),UD(e)),VD(e)),WD(e)),FD(e)),{[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}}),[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},GD=e=>{const{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:Object.assign({},lo(e)),[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":Object.assign({[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}},ka(e))},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:ka(e)}}}},qk=e=>Object.assign({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0},nm(e)),Kk=e=>er(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},rm(e)),XD=gr("Pagination",e=>{const t=Kk(e);return[KD(t),GD(t)]},qk),YD=e=>{const{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled:not(${t}-mini)`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered:not(${t}-mini)`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${ee(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},JD=Mu(["Pagination","bordered"],e=>{const t=Kk(e);return YD(t)},qk);function Iw(e){return h.useMemo(()=>typeof e=="boolean"?[e,{}]:e&&typeof e=="object"?[!0,e]:[void 0,void 0],[e])}var QD=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const ZD=e=>{const{align:t,prefixCls:r,selectPrefixCls:n,className:i,rootClassName:o,style:a,size:c,locale:u,responsive:d,showSizeChanger:f,selectComponentClass:p,pageSizeOptions:g}=e,v=QD(e,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:b}=Py(d),[,S]=fi(),{getPrefixCls:_,direction:C,showSizeChanger:x,className:E,style:k}=Un("pagination"),P=_("pagination",r),[T,O,N]=XD(P),I=Go(c),z=I==="small"||!!(b&&!I&&d),[D]=fs("Pagination",A2),M=Object.assign(Object.assign({},D),u),[j,B]=Iw(f),[F,W]=Iw(x),V=j??F,L=B??W,G=p||Ba,q=h.useMemo(()=>g?g.map(ne=>Number(ne)):void 0,[g]),A=ne=>{var he;const{disabled:me,size:ue,onSizeChange:Se,"aria-label":ae,className:le,options:ce}=ne,{className:ye,onChange:fe}=L||{},de=(he=ce.find(be=>String(be.value)===String(ue)))===null||he===void 0?void 0:he.value;return h.createElement(G,Object.assign({disabled:me,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:be=>be.parentNode,"aria-label":ae,options:ce},L,{value:de,onChange:(be,Ce)=>{Se==null||Se(be),fe==null||fe(be,Ce)},size:z?"small":"middle",className:re(le,ye)}))},U=h.useMemo(()=>{const ne=h.createElement("span",{className:`${P}-item-ellipsis`},"•••"),he=h.createElement("button",{className:`${P}-item-link`,type:"button",tabIndex:-1},C==="rtl"?h.createElement(Lo,null):h.createElement(wu,null)),me=h.createElement("button",{className:`${P}-item-link`,type:"button",tabIndex:-1},C==="rtl"?h.createElement(wu,null):h.createElement(Lo,null)),ue=h.createElement("a",{className:`${P}-item-link`},h.createElement("div",{className:`${P}-item-container`},C==="rtl"?h.createElement(Tw,{className:`${P}-item-link-icon`}):h.createElement(Rw,{className:`${P}-item-link-icon`}),ne)),Se=h.createElement("a",{className:`${P}-item-link`},h.createElement("div",{className:`${P}-item-container`},C==="rtl"?h.createElement(Rw,{className:`${P}-item-link-icon`}):h.createElement(Tw,{className:`${P}-item-link-icon`}),ne));return{prevIcon:he,nextIcon:me,jumpPrevIcon:ue,jumpNextIcon:Se}},[C,P]),Y=_("select",n),Z=re({[`${P}-${t}`]:!!t,[`${P}-mini`]:z,[`${P}-rtl`]:C==="rtl",[`${P}-bordered`]:S.wireframe},E,i,o,O,N),te=Object.assign(Object.assign({},k),a);return T(h.createElement(h.Fragment,null,S.wireframe&&h.createElement(JD,{prefixCls:P}),h.createElement(HD,Object.assign({},U,v,{style:te,prefixCls:P,selectPrefixCls:Y,className:Z,locale:M,pageSizeOptions:q,showSizeChanger:V,sizeChangerRender:A}))))},lf=100,Gk=lf/5,Xk=lf/2-Gk/2,Og=Xk*2*Math.PI,Nw=50,Mw=e=>{const{dotClassName:t,style:r,hasCircleCls:n}=e;return h.createElement("circle",{className:re(`${t}-circle`,{[`${t}-circle-bg`]:n}),r:Xk,cx:Nw,cy:Nw,strokeWidth:Gk,style:r})},eA=({percent:e,prefixCls:t})=>{const r=`${t}-dot`,n=`${r}-holder`,i=`${n}-hidden`,[o,a]=h.useState(!1);ur(()=>{e!==0&&a(!0)},[e!==0]);const c=Math.max(Math.min(e,100),0);if(!o)return null;const u={strokeDashoffset:`${Og/4}`,strokeDasharray:`${Og*c/100} ${Og*(100-c)/100}`};return h.createElement("span",{className:re(n,`${r}-progress`,c<=0&&i)},h.createElement("svg",{viewBox:`0 0 ${lf} ${lf}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":c},h.createElement(Mw,{dotClassName:r,hasCircleCls:!0}),h.createElement(Mw,{dotClassName:r,style:u})))};function tA(e){const{prefixCls:t,percent:r=0}=e,n=`${t}-dot`,i=`${n}-holder`,o=`${i}-hidden`;return h.createElement(h.Fragment,null,h.createElement("span",{className:re(i,r>0&&o)},h.createElement("span",{className:re(n,`${t}-dot-spin`)},[1,2,3,4].map(a=>h.createElement("i",{className:`${t}-dot-item`,key:a})))),h.createElement(eA,{prefixCls:t,percent:r}))}function rA(e){var t;const{prefixCls:r,indicator:n,percent:i}=e,o=`${r}-dot`;return n&&h.isValidElement(n)?hi(n,{className:re((t=n.props)===null||t===void 0?void 0:t.className,o),percent:i}):h.createElement(tA,{prefixCls:r,percent:i})}const nA=new Xt("antSpinMove",{to:{opacity:1}}),iA=new Xt("antRotate",{to:{transform:"rotate(405deg)"}}),oA=e=>{const{componentCls:t,calc:r}=e;return{[t]:Object.assign(Object.assign({},Fr(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:r(r(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:r(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:r(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:r(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),height:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:nA,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:iA,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(n=>`${n} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal(),height:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}},sA=e=>{const{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:r}},aA=gr("Spin",e=>{const t=er(e,{spinDotDefault:e.colorTextDescription});return oA(t)},sA),lA=200,zw=[[30,.05],[70,.03],[96,.01]];function cA(e,t){const[r,n]=h.useState(0),i=h.useRef(null),o=t==="auto";return h.useEffect(()=>(o&&e&&(n(0),i.current=setInterval(()=>{n(a=>{const c=100-a;for(let u=0;u<zw.length;u+=1){const[d,f]=zw[u];if(a<=d)return a+c*f}return a})},lA)),()=>{i.current&&(clearInterval(i.current),i.current=null)}),[o,e]),o?r:t}var uA=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};let Yk;function dA(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}const Ta=e=>{var t;const{prefixCls:r,spinning:n=!0,delay:i=0,className:o,rootClassName:a,size:c="default",tip:u,wrapperClassName:d,style:f,children:p,fullscreen:g=!1,indicator:v,percent:b}=e,S=uA(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:_,direction:C,className:x,style:E,indicator:k}=Un("spin"),P=_("spin",r),[T,O,N]=aA(P),[I,z]=h.useState(()=>n&&!dA(n,i)),D=cA(I,b);h.useEffect(()=>{if(n){const L=v9(i,()=>{z(!0)});return L(),()=>{var G;(G=L==null?void 0:L.cancel)===null||G===void 0||G.call(L)}}z(!1)},[i,n]);const M=h.useMemo(()=>typeof p<"u"&&!g,[p,g]),j=re(P,x,{[`${P}-sm`]:c==="small",[`${P}-lg`]:c==="large",[`${P}-spinning`]:I,[`${P}-show-text`]:!!u,[`${P}-rtl`]:C==="rtl"},o,!g&&a,O,N),B=re(`${P}-container`,{[`${P}-blur`]:I}),F=(t=v??k)!==null&&t!==void 0?t:Yk,W=Object.assign(Object.assign({},E),f),V=h.createElement("div",Object.assign({},S,{style:W,className:j,"aria-live":"polite","aria-busy":I}),h.createElement(rA,{prefixCls:P,indicator:F,percent:D}),u&&(M||g)?h.createElement("div",{className:`${P}-text`},u):null);return T(M?h.createElement("div",Object.assign({},S,{className:re(`${P}-nested-loading`,d,O,N)}),I&&h.createElement("div",{key:"loading"},V),h.createElement("div",{className:B,key:"container"},p)):g?h.createElement("div",{className:re(`${P}-fullscreen`,{[`${P}-fullscreen-show`]:I},a,O,N)},V):V)};Ta.setDefaultIndicator=e=>{Yk=e};const Xy=Q.createContext({});Xy.Consumer;var Jk=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const hA=e=>{var{prefixCls:t,className:r,avatar:n,title:i,description:o}=e,a=Jk(e,["prefixCls","className","avatar","title","description"]);const{getPrefixCls:c}=h.useContext(Pt),u=c("list",t),d=re(`${u}-item-meta`,r),f=Q.createElement("div",{className:`${u}-item-meta-content`},i&&Q.createElement("h4",{className:`${u}-item-meta-title`},i),o&&Q.createElement("div",{className:`${u}-item-meta-description`},o));return Q.createElement("div",Object.assign({},a,{className:d}),n&&Q.createElement("div",{className:`${u}-item-meta-avatar`},n),(i||o)&&f)},fA=Q.forwardRef((e,t)=>{const{prefixCls:r,children:n,actions:i,extra:o,styles:a,className:c,classNames:u,colStyle:d}=e,f=Jk(e,["prefixCls","children","actions","extra","styles","className","classNames","colStyle"]),{grid:p,itemLayout:g}=h.useContext(Xy),{getPrefixCls:v,list:b}=h.useContext(Pt),S=O=>{var N,I;return re((I=(N=b==null?void 0:b.item)===null||N===void 0?void 0:N.classNames)===null||I===void 0?void 0:I[O],u==null?void 0:u[O])},_=O=>{var N,I;return Object.assign(Object.assign({},(I=(N=b==null?void 0:b.item)===null||N===void 0?void 0:N.styles)===null||I===void 0?void 0:I[O]),a==null?void 0:a[O])},C=()=>{let O=!1;return h.Children.forEach(n,N=>{typeof N=="string"&&(O=!0)}),O&&h.Children.count(n)>1},x=()=>g==="vertical"?!!o:!C(),E=v("list",r),k=i&&i.length>0&&Q.createElement("ul",{className:re(`${E}-item-action`,S("actions")),key:"actions",style:_("actions")},i.map((O,N)=>Q.createElement("li",{key:`${E}-item-action-${N}`},O,N!==i.length-1&&Q.createElement("em",{className:`${E}-item-action-split`})))),P=p?"div":"li",T=Q.createElement(P,Object.assign({},f,p?{}:{ref:t},{className:re(`${E}-item`,{[`${E}-item-no-flex`]:!x()},c)}),g==="vertical"&&o?[Q.createElement("div",{className:`${E}-item-main`,key:"content"},n,k),Q.createElement("div",{className:re(`${E}-item-extra`,S("extra")),key:"extra",style:_("extra")},o)]:[n,k,hi(o,{key:"extra"})]);return p?Q.createElement($9,{ref:t,flex:1,style:d},T):T}),Qk=fA;Qk.Meta=hA;const mA=e=>{const{listBorderedCls:t,componentCls:r,paddingLG:n,margin:i,itemPaddingSM:o,itemPaddingLG:a,marginLG:c,borderRadiusLG:u}=e,d=ee(e.calc(u).sub(e.lineWidth).equal());return{[t]:{border:`${ee(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:u,[`${r}-header`]:{borderRadius:`${d} ${d} 0 0`},[`${r}-footer`]:{borderRadius:`0 0 ${d} ${d}`},[`${r}-header,${r}-footer,${r}-item`]:{paddingInline:n},[`${r}-pagination`]:{margin:`${ee(i)} ${ee(c)}`}},[`${t}${r}-sm`]:{[`${r}-item,${r}-header,${r}-footer`]:{padding:o}},[`${t}${r}-lg`]:{[`${r}-item,${r}-header,${r}-footer`]:{padding:a}}}},pA=e=>{const{componentCls:t,screenSM:r,screenMD:n,marginLG:i,marginSM:o,margin:a}=e;return{[`@media screen and (max-width:${n}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:i}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:i}}}},[`@media screen and (max-width: ${r}px)`]:{[t]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:o}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${ee(a)}`}}}}}},gA=e=>{const{componentCls:t,antCls:r,controlHeight:n,minHeight:i,paddingSM:o,marginLG:a,padding:c,itemPadding:u,colorPrimary:d,itemPaddingSM:f,itemPaddingLG:p,paddingXS:g,margin:v,colorText:b,colorTextDescription:S,motionDurationSlow:_,lineWidth:C,headerBg:x,footerBg:E,emptyTextPadding:k,metaMarginBottom:P,avatarMarginRight:T,titleMarginBottom:O,descriptionFontSize:N}=e;return{[t]:Object.assign(Object.assign({},Fr(e)),{position:"relative","--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:"none"},[`${t}-header`]:{background:x},[`${t}-footer`]:{background:E},[`${t}-header, ${t}-footer`]:{paddingBlock:o},[`${t}-pagination`]:{marginBlockStart:a,[`${r}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:i,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:u,color:b,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:T},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:b},[`${t}-item-meta-title`]:{margin:`0 0 ${ee(e.marginXXS)} 0`,color:b,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:b,transition:`all ${_}`,"&:hover":{color:d}}},[`${t}-item-meta-description`]:{color:S,fontSize:N,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${ee(g)}`,color:S,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:C,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${ee(c)} 0`,color:S,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:k,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}}),[`${t}-grid ${r}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:v,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:a},[`${t}-item-meta`]:{marginBlockEnd:P,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:O,color:b,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:c,marginInlineStart:"auto","> li":{padding:`0 ${ee(c)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${ee(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${ee(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${ee(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:n},[`${t}-split${t}-something-after-last-item ${r}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${ee(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:p},[`${t}-sm ${t}-item`]:{padding:f},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}},vA=e=>({contentWidth:220,itemPadding:`${ee(e.paddingContentVertical)} 0`,itemPaddingSM:`${ee(e.paddingContentVerticalSM)} ${ee(e.paddingContentHorizontal)}`,itemPaddingLG:`${ee(e.paddingContentVerticalLG)} ${ee(e.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}),yA=gr("List",e=>{const t=er(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[gA(t),mA(t),pA(t)]},vA);var bA=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function _A(e,t){const{pagination:r=!1,prefixCls:n,bordered:i=!1,split:o=!0,className:a,rootClassName:c,style:u,children:d,itemLayout:f,loadMore:p,grid:g,dataSource:v=[],size:b,header:S,footer:_,loading:C=!1,rowKey:x,renderItem:E,locale:k}=e,P=bA(e,["pagination","prefixCls","bordered","split","className","rootClassName","style","children","itemLayout","loadMore","grid","dataSource","size","header","footer","loading","rowKey","renderItem","locale"]),T=r&&typeof r=="object"?r:{},[O,N]=h.useState(T.defaultCurrent||1),[I,z]=h.useState(T.defaultPageSize||10),{getPrefixCls:D,direction:M,className:j,style:B}=Un("list"),{renderEmpty:F}=h.useContext(Pt),W={current:1,total:0,position:"bottom"},V=$e=>(je,Oe)=>{var Qe;N(je),z(Oe),r&&((Qe=r==null?void 0:r[$e])===null||Qe===void 0||Qe.call(r,je,Oe))},L=V("onChange"),G=V("onShowSizeChange"),q=($e,je)=>{if(!E)return null;let Oe;return typeof x=="function"?Oe=x($e):x?Oe=$e[x]:Oe=$e.key,Oe||(Oe=`list-item-${je}`),h.createElement(h.Fragment,{key:Oe},E($e,je))},A=!!(p||r||_),U=D("list",n),[Y,Z,te]=yA(U);let ne=C;typeof ne=="boolean"&&(ne={spinning:ne});const he=!!(ne!=null&&ne.spinning),me=Go(b);let ue="";switch(me){case"large":ue="lg";break;case"small":ue="sm";break}const Se=re(U,{[`${U}-vertical`]:f==="vertical",[`${U}-${ue}`]:ue,[`${U}-split`]:o,[`${U}-bordered`]:i,[`${U}-loading`]:he,[`${U}-grid`]:!!g,[`${U}-something-after-last-item`]:A,[`${U}-rtl`]:M==="rtl"},j,a,c,Z,te),ae=Iv(W,{total:v.length,current:O,pageSize:I},r||{}),le=Math.ceil(ae.total/ae.pageSize);ae.current=Math.min(ae.current,le);const ce=r&&h.createElement("div",{className:re(`${U}-pagination`)},h.createElement(ZD,Object.assign({align:"end"},ae,{onChange:L,onShowSizeChange:G})));let ye=We(v);r&&v.length>(ae.current-1)*ae.pageSize&&(ye=We(v).splice((ae.current-1)*ae.pageSize,ae.pageSize));const fe=Object.keys(g||{}).some($e=>["xs","sm","md","lg","xl","xxl"].includes($e)),de=Py(fe),be=h.useMemo(()=>{for(let $e=0;$e<Ra.length;$e+=1){const je=Ra[$e];if(de[je])return je}},[de]),Ce=h.useMemo(()=>{if(!g)return;const $e=be&&g[be]?g[be]:g.column;if($e)return{width:`${100/$e}%`,maxWidth:`${100/$e}%`}},[JSON.stringify(g),be]);let Te=he&&h.createElement("div",{style:{minHeight:53}});if(ye.length>0){const $e=ye.map(q);Te=g?h.createElement(T9,{gutter:g.gutter},h.Children.map($e,je=>h.createElement("div",{key:je==null?void 0:je.key,style:Ce},je))):h.createElement("ul",{className:`${U}-items`},$e)}else!d&&!he&&(Te=h.createElement("div",{className:`${U}-empty-text`},(k==null?void 0:k.emptyText)||(F==null?void 0:F("List"))||h.createElement(F$,{componentName:"List"})));const ze=ae.position,Ee=h.useMemo(()=>({grid:g,itemLayout:f}),[JSON.stringify(g),f]);return Y(h.createElement(Xy.Provider,{value:Ee},h.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},B),u),className:Se},P),(ze==="top"||ze==="both")&&ce,S&&h.createElement("div",{className:`${U}-header`},S),h.createElement(Ta,Object.assign({},ne),Te,d),_&&h.createElement("div",{className:`${U}-footer`},_),p||(ze==="bottom"||ze==="both")&&ce)))}const SA=h.forwardRef(_A),Eu=SA;Eu.Item=Qk;const CA=(e,t=!1)=>t&&e==null?[]:Array.isArray(e)?e:[e];let ro=null,Sa=e=>e(),$u=[],ku={};function jw(){const{getContainer:e,duration:t,rtl:r,maxCount:n,top:i}=ku,o=(e==null?void 0:e())||document.body;return{getContainer:()=>o,duration:t,rtl:r,maxCount:n,top:i}}const wA=Q.forwardRef((e,t)=>{const{messageConfig:r,sync:n}=e,{getPrefixCls:i}=h.useContext(Pt),o=ku.prefixCls||i("message"),a=h.useContext(L8),[c,u]=NE(Object.assign(Object.assign(Object.assign({},r),{prefixCls:o}),a.message));return Q.useImperativeHandle(t,()=>{const d=Object.assign({},c);return Object.keys(d).forEach(f=>{d[f]=(...p)=>(n(),c[f].apply(c,p))}),{instance:d,sync:n}}),u}),xA=Q.forwardRef((e,t)=>{const[r,n]=Q.useState(jw),i=()=>{n(jw)};Q.useEffect(i,[]);const o=vE(),a=o.getRootPrefixCls(),c=o.getIconPrefixCls(),u=o.getTheme(),d=Q.createElement(wA,{ref:t,sync:i,messageConfig:r});return Q.createElement(Ko,{prefixCls:a,iconPrefixCls:c,theme:u},o.holderRender?o.holderRender(d):d)}),am=()=>{if(!ro){const e=document.createDocumentFragment(),t={fragment:e};ro=t,Sa(()=>{py()(Q.createElement(xA,{ref:n=>{const{instance:i,sync:o}=n||{};Promise.resolve().then(()=>{!t.instance&&i&&(t.instance=i,t.sync=o,am())})}}),e)});return}ro.instance&&($u.forEach(e=>{const{type:t,skipped:r}=e;if(!r)switch(t){case"open":{Sa(()=>{const n=ro.instance.open(Object.assign(Object.assign({},ku),e.config));n==null||n.then(e.resolve),e.setCloseFn(n)});break}case"destroy":Sa(()=>{ro==null||ro.instance.destroy(e.key)});break;default:Sa(()=>{var n;const i=(n=ro.instance)[t].apply(n,We(e.args));i==null||i.then(e.resolve),e.setCloseFn(i)})}}),$u=[])};function EA(e){ku=Object.assign(Object.assign({},ku),e),Sa(()=>{var t;(t=ro==null?void 0:ro.sync)===null||t===void 0||t.call(ro)})}function $A(e){const t=fy(r=>{let n;const i={type:"open",config:e,resolve:r,setCloseFn:o=>{n=o}};return $u.push(i),()=>{n?Sa(()=>{n()}):i.skipped=!0}});return am(),t}function kA(e,t){const r=fy(n=>{let i;const o={type:e,args:t,resolve:n,setCloseFn:a=>{i=a}};return $u.push(o),()=>{i?Sa(()=>{i()}):o.skipped=!0}});return am(),r}const RA=e=>{$u.push({type:"destroy",key:e}),am()},TA=["success","info","warning","error","loading"],PA={open:$A,destroy:RA,config:EA,useMessage:EI,_InternalPanelDoNotUseOrYouWillBeFired:vI},Li=PA;TA.forEach(e=>{Li[e]=(...t)=>kA(e,t)});var OA=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const IA=e=>{const{prefixCls:t,className:r,closeIcon:n,closable:i,type:o,title:a,children:c,footer:u}=e,d=OA(e,["prefixCls","className","closeIcon","closable","type","title","children","footer"]),{getPrefixCls:f}=h.useContext(Pt),p=f(),g=t||f("modal"),v=ko(p),[b,S,_]=h$(g,v),C=`${g}-confirm`;let x={};return o?x={closable:i??!1,title:"",footer:"",children:h.createElement(m$,Object.assign({},e,{prefixCls:g,confirmPrefixCls:C,rootPrefixCls:p,content:c}))}:x={closable:i??!0,title:a,footer:u!==null&&h.createElement(l$,Object.assign({},e)),children:c},b(h.createElement(JE,Object.assign({prefixCls:g,className:re(S,`${g}-pure-panel`,o&&C,o&&`${C}-${o}`,r,_,v)},d,{closeIcon:a$(g,n),closable:i},x)))},NA=w$(IA);function Zk(e){return Vu(y$(e))}const ki=f$;ki.useModal=B8;ki.info=function(t){return Vu(b$(t))};ki.success=function(t){return Vu(_$(t))};ki.error=function(t){return Vu(S$(t))};ki.warning=Zk;ki.warn=Zk;ki.confirm=function(t){return Vu(C$(t))};ki.destroyAll=function(){for(;_a.length;){const t=_a.pop();t&&t()}};ki.config=I8;ki._InternalPanelDoNotUseOrYouWillBeFired=NA;var MA=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],e4=h.forwardRef(function(e,t){var r,n=e.prefixCls,i=n===void 0?"rc-switch":n,o=e.className,a=e.checked,c=e.defaultChecked,u=e.disabled,d=e.loadingIcon,f=e.checkedChildren,p=e.unCheckedChildren,g=e.onClick,v=e.onChange,b=e.onKeyDown,S=Bt(e,MA),_=Qr(!1,{value:a,defaultValue:c}),C=se(_,2),x=C[0],E=C[1];function k(N,I){var z=x;return u||(z=N,E(z),v==null||v(z,I)),z}function P(N){N.which===Ge.LEFT?k(!1,N):N.which===Ge.RIGHT&&k(!0,N),b==null||b(N)}function T(N){var I=k(!x,N);g==null||g(I,N)}var O=re(i,o,(r={},K(r,"".concat(i,"-checked"),x),K(r,"".concat(i,"-disabled"),u),r));return h.createElement("button",Re({},S,{type:"button",role:"switch","aria-checked":x,disabled:u,className:O,ref:t,onKeyDown:P,onClick:T}),d,h.createElement("span",{className:"".concat(i,"-inner")},h.createElement("span",{className:"".concat(i,"-inner-checked")},f),h.createElement("span",{className:"".concat(i,"-inner-unchecked")},p)))});e4.displayName="Switch";const zA=e=>{const{componentCls:t,trackHeightSM:r,trackPadding:n,trackMinWidthSM:i,innerMinMarginSM:o,innerMaxMarginSM:a,handleSizeSM:c,calc:u}=e,d=`${t}-inner`,f=ee(u(c).add(u(n).mul(2)).equal()),p=ee(u(a).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:r,lineHeight:ee(r),[`${t}-inner`]:{paddingInlineStart:a,paddingInlineEnd:o,[`${d}-checked, ${d}-unchecked`]:{minHeight:r},[`${d}-checked`]:{marginInlineStart:`calc(-100% + ${f} - ${p})`,marginInlineEnd:`calc(100% - ${f} + ${p})`},[`${d}-unchecked`]:{marginTop:u(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:c,height:c},[`${t}-loading-icon`]:{top:u(u(c).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:o,paddingInlineEnd:a,[`${d}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${d}-unchecked`]:{marginInlineStart:`calc(100% - ${f} + ${p})`,marginInlineEnd:`calc(-100% + ${f} - ${p})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${ee(u(c).add(n).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${d}`]:{[`${d}-unchecked`]:{marginInlineStart:u(e.marginXXS).div(2).equal(),marginInlineEnd:u(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${d}`]:{[`${d}-checked`]:{marginInlineStart:u(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:u(e.marginXXS).div(2).equal()}}}}}}},jA=e=>{const{componentCls:t,handleSize:r,calc:n}=e;return{[t]:{[`${t}-loading-icon${e.iconCls}`]:{position:"relative",top:n(n(r).sub(e.fontSize)).div(2).equal(),color:e.switchLoadingIconColor,verticalAlign:"top"},[`&${t}-checked ${t}-loading-icon`]:{color:e.switchColor}}}},BA=e=>{const{componentCls:t,trackPadding:r,handleBg:n,handleShadow:i,handleSize:o,calc:a}=e,c=`${t}-handle`;return{[t]:{[c]:{position:"absolute",top:r,insetInlineStart:r,width:o,height:o,transition:`all ${e.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:a(o).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:'""'}},[`&${t}-checked ${c}`]:{insetInlineStart:`calc(100% - ${ee(a(o).add(r).equal())})`},[`&:not(${t}-disabled):active`]:{[`${c}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${c}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},LA=e=>{const{componentCls:t,trackHeight:r,trackPadding:n,innerMinMargin:i,innerMaxMargin:o,handleSize:a,calc:c}=e,u=`${t}-inner`,d=ee(c(a).add(c(n).mul(2)).equal()),f=ee(c(o).mul(2).equal());return{[t]:{[u]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:i,transition:`padding-inline-start ${e.switchDuration} ease-in-out, padding-inline-end ${e.switchDuration} ease-in-out`,[`${u}-checked, ${u}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,transition:`margin-inline-start ${e.switchDuration} ease-in-out, margin-inline-end ${e.switchDuration} ease-in-out`,pointerEvents:"none",minHeight:r},[`${u}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${f})`,marginInlineEnd:`calc(100% - ${d} + ${f})`},[`${u}-unchecked`]:{marginTop:c(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${u}`]:{paddingInlineStart:i,paddingInlineEnd:o,[`${u}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${u}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${f})`,marginInlineEnd:`calc(-100% + ${d} - ${f})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${u}`]:{[`${u}-unchecked`]:{marginInlineStart:c(n).mul(2).equal(),marginInlineEnd:c(n).mul(-1).mul(2).equal()}},[`&${t}-checked ${u}`]:{[`${u}-checked`]:{marginInlineStart:c(n).mul(-1).mul(2).equal(),marginInlineEnd:c(n).mul(2).equal()}}}}}},DA=e=>{const{componentCls:t,trackHeight:r,trackMinWidth:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},Fr(e)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:r,lineHeight:ee(r),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary}}),lo(e)),{[`&${t}-checked`]:{background:e.switchColor,[`&:hover:not(${t}-disabled)`]:{background:e.colorPrimaryHover}},[`&${t}-loading, &${t}-disabled`]:{cursor:"not-allowed",opacity:e.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${t}-rtl`]:{direction:"rtl"}})}},AA=e=>{const{fontSize:t,lineHeight:r,controlHeight:n,colorWhite:i}=e,o=t*r,a=n/2,c=2,u=o-c*2,d=a-c*2;return{trackHeight:o,trackHeightSM:a,trackMinWidth:u*2+c*4,trackMinWidthSM:d*2+c*2,trackPadding:c,handleBg:i,handleSize:u,handleSizeSM:d,handleShadow:`0 2px 4px 0 ${new pr("#00230b").setA(.2).toRgbString()}`,innerMinMargin:u/2,innerMaxMargin:u+c+c*2,innerMinMarginSM:d/2,innerMaxMarginSM:d+c+c*2}},HA=gr("Switch",e=>{const t=er(e,{switchDuration:e.motionDurationMid,switchColor:e.colorPrimary,switchDisabledOpacity:e.opacityLoading,switchLoadingIconSize:e.calc(e.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${e.opacityLoading})`,switchHandleActiveInset:"-30%"});return[DA(t),LA(t),BA(t),jA(t),zA(t)]},AA);var FA=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const WA=h.forwardRef((e,t)=>{const{prefixCls:r,size:n,disabled:i,loading:o,className:a,rootClassName:c,style:u,checked:d,value:f,defaultChecked:p,defaultValue:g,onChange:v}=e,b=FA(e,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange"]),[S,_]=Qr(!1,{value:d??f,defaultValue:p??g}),{getPrefixCls:C,direction:x,switch:E}=h.useContext(Pt),k=h.useContext(Gs),P=(i??k)||o,T=C("switch",r),O=h.createElement("div",{className:`${T}-handle`},o&&h.createElement(zu,{className:`${T}-loading-icon`})),[N,I,z]=HA(T),D=Go(n),M=re(E==null?void 0:E.className,{[`${T}-small`]:D==="small",[`${T}-loading`]:o,[`${T}-rtl`]:x==="rtl"},a,c,I,z),j=Object.assign(Object.assign({},E==null?void 0:E.style),u),B=(...F)=>{_(F[0]),v==null||v.apply(void 0,F)};return N(h.createElement(Mf,{component:"Switch",disabled:P},h.createElement(e4,Object.assign({},b,{checked:S,onChange:B,prefixCls:T,className:M,style:j,disabled:P,ref:t,loadingIcon:O}))))}),Qc=WA;Qc.__ANT_SWITCH=!0;const VA=e=>{const{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:i,calc:o}=e,a=o(n).sub(r).equal(),c=o(t).sub(r).equal();return{[i]:Object.assign(Object.assign({},Fr(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${ee(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${i}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${i}-close-icon`]:{marginInlineStart:c,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${i}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${i}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:a}}),[`${i}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},Yy=e=>{const{lineWidth:t,fontSizeIcon:r,calc:n}=e,i=e.fontSizeSM;return er(e,{tagFontSize:i,tagLineHeight:ee(n(e.lineHeightSM).mul(i).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},Jy=e=>({defaultBg:new pr(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),t4=gr("Tag",e=>{const t=Yy(e);return VA(t)},Jy);var UA=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const qA=h.forwardRef((e,t)=>{const{prefixCls:r,style:n,className:i,checked:o,children:a,icon:c,onChange:u,onClick:d}=e,f=UA(e,["prefixCls","style","className","checked","children","icon","onChange","onClick"]),{getPrefixCls:p,tag:g}=h.useContext(Pt),v=E=>{u==null||u(!o),d==null||d(E)},b=p("tag",r),[S,_,C]=t4(b),x=re(b,`${b}-checkable`,{[`${b}-checkable-checked`]:o},g==null?void 0:g.className,i,_,C);return S(h.createElement("span",Object.assign({},f,{ref:t,style:Object.assign(Object.assign({},n),g==null?void 0:g.style),className:x,onClick:v}),c,h.createElement("span",null,a)))}),KA=e=>Of(e,(t,{textColor:r,lightBorderColor:n,lightColor:i,darkColor:o})=>({[`${e.componentCls}${e.componentCls}-${t}`]:{color:r,background:i,borderColor:n,"&-inverse":{color:e.colorTextLightSolid,background:o,borderColor:o},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}})),GA=Mu(["Tag","preset"],e=>{const t=Yy(e);return KA(t)},Jy);function XA(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const lh=(e,t,r)=>{const n=XA(r);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${r}`],background:e[`color${n}Bg`],borderColor:e[`color${n}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},YA=Mu(["Tag","status"],e=>{const t=Yy(e);return[lh(t,"success","Success"),lh(t,"processing","Info"),lh(t,"error","Error"),lh(t,"warning","Warning")]},Jy);var JA=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const QA=h.forwardRef((e,t)=>{const{prefixCls:r,className:n,rootClassName:i,style:o,children:a,icon:c,color:u,onClose:d,bordered:f=!0,visible:p}=e,g=JA(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:v,direction:b,tag:S}=h.useContext(Pt),[_,C]=h.useState(!0),x=un(g,["closeIcon","closable"]);h.useEffect(()=>{p!==void 0&&C(p)},[p]);const E=Jf(u),k=gB(u),P=E||k,T=Object.assign(Object.assign({backgroundColor:u&&!P?u:void 0},S==null?void 0:S.style),o),O=v("tag",r),[N,I,z]=t4(O),D=re(O,S==null?void 0:S.className,{[`${O}-${u}`]:P,[`${O}-has-color`]:u&&!P,[`${O}-hidden`]:!_,[`${O}-rtl`]:b==="rtl",[`${O}-borderless`]:!f},n,i,I,z),M=L=>{L.stopPropagation(),d==null||d(L),!L.defaultPrevented&&C(!1)},[,j]=hy(Kl(e),Kl(S),{closable:!1,closeIconRender:L=>{const G=h.createElement("span",{className:`${O}-close-icon`,onClick:M},L);return $E(L,G,q=>({onClick:A=>{var U;(U=q==null?void 0:q.onClick)===null||U===void 0||U.call(q,A),M(A)},className:re(q==null?void 0:q.className,`${O}-close-icon`)}))}}),B=typeof g.onClick=="function"||a&&a.type==="a",F=c||null,W=F?h.createElement(h.Fragment,null,F,a&&h.createElement("span",null,a)):a,V=h.createElement("span",Object.assign({},x,{ref:t,className:D,style:T}),W,j,E&&h.createElement(GA,{key:"preset",prefixCls:O}),k&&h.createElement(YA,{key:"status",prefixCls:O}));return N(B?h.createElement(Mf,{component:"Tag"},V):V)}),Ai=QA;Ai.CheckableTag=qA;const Zi=(e,t)=>new pr(e).setA(t).toRgbString(),wl=(e,t)=>new pr(e).lighten(t).toHexString(),ZA=e=>{const t=$a(e,{theme:"dark"});return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[6],6:t[5],7:t[4],8:t[6],9:t[5],10:t[4]}},eH=(e,t)=>{const r=e||"#000",n=t||"#fff";return{colorBgBase:r,colorTextBase:n,colorText:Zi(n,.85),colorTextSecondary:Zi(n,.65),colorTextTertiary:Zi(n,.45),colorTextQuaternary:Zi(n,.25),colorFill:Zi(n,.18),colorFillSecondary:Zi(n,.12),colorFillTertiary:Zi(n,.08),colorFillQuaternary:Zi(n,.04),colorBgSolid:Zi(n,.95),colorBgSolidHover:Zi(n,1),colorBgSolidActive:Zi(n,.9),colorBgElevated:wl(r,12),colorBgContainer:wl(r,8),colorBgLayout:wl(r,0),colorBgSpotlight:wl(r,26),colorBgBlur:Zi(n,.04),colorBorder:wl(r,26),colorBorderSecondary:wl(r,19)}},tH=(e,t)=>{const r=Object.keys(uy).map(o=>{const a=$a(e[o],{theme:"dark"});return Array.from({length:10},()=>1).reduce((c,u,d)=>(c[`${o}-${d+1}`]=a[d],c[`${o}${d+1}`]=a[d],c),{})}).reduce((o,a)=>(o=Object.assign(Object.assign({},o),a),o),{}),n=t??q2(e),i=U2(e,{generateColorPalettes:ZA,generateNeutralColorPalettes:eH});return Object.assign(Object.assign(Object.assign(Object.assign({},n),r),i),{colorPrimaryBg:i.colorPrimaryBorder,colorPrimaryBgHover:i.colorPrimaryBorderHover})},rH={defaultSeed:Gh.token,darkAlgorithm:tH};var nH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},iH=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:nH}))},oH=h.forwardRef(iH),sH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},aH=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:sH}))},lH=h.forwardRef(aH);const cH=(e,t,r,n)=>{const{titleMarginBottom:i,fontWeightStrong:o}=n;return{marginBottom:i,color:r,fontWeight:o,fontSize:e,lineHeight:t}},uH=e=>{const t=[1,2,3,4,5],r={};return t.forEach(n=>{r[`
325
+ h${n}&,
326
+ div&-h${n},
327
+ div&-h${n} > textarea,
328
+ h${n}
329
+ `]=cH(e[`fontSizeHeading${n}`],e[`lineHeightHeading${n}`],e.colorTextHeading,e)}),r},dH=e=>{const{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},nE(e)),{userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},hH=e=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:qh[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),fH=e=>{const{componentCls:t,paddingSM:r}=e,n=r;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(n).div(-2).add(1).equal(),marginBottom:e.calc(n).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},mH=e=>({[`${e.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),pH=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),gH=e=>{const{componentCls:t,titleMarginTop:r}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger`]:{color:e.colorErrorText,"a&:active, a&:focus":{color:e.colorErrorTextActive},"a&:hover":{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},uH(e)),{[`
330
+ & + h1${t},
331
+ & + h2${t},
332
+ & + h3${t},
333
+ & + h4${t},
334
+ & + h5${t}
335
+ `]:{marginTop:r},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:r}}}),hH(e)),dH(e)),{[`
336
+ ${t}-expand,
337
+ ${t}-collapse,
338
+ ${t}-edit,
339
+ ${t}-copy
340
+ `]:Object.assign(Object.assign({},nE(e)),{marginInlineStart:e.marginXXS})}),fH(e)),mH(e)),pH()),{"&-rtl":{direction:"rtl"}})}},vH=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),r4=gr("Typography",gH,vH),yH=e=>{const{prefixCls:t,"aria-label":r,className:n,style:i,direction:o,maxLength:a,autoSize:c=!0,value:u,onSave:d,onCancel:f,onEnd:p,component:g,enterIcon:v=h.createElement(lH,null)}=e,b=h.useRef(null),S=h.useRef(!1),_=h.useRef(null),[C,x]=h.useState(u);h.useEffect(()=>{x(u)},[u]),h.useEffect(()=>{var B;if(!((B=b.current)===null||B===void 0)&&B.resizableTextArea){const{textArea:F}=b.current.resizableTextArea;F.focus();const{length:W}=F.value;F.setSelectionRange(W,W)}},[]);const E=({target:B})=>{x(B.value.replace(/[\n\r]/g,""))},k=()=>{S.current=!0},P=()=>{S.current=!1},T=({keyCode:B})=>{S.current||(_.current=B)},O=()=>{d(C.trim())},N=({keyCode:B,ctrlKey:F,altKey:W,metaKey:V,shiftKey:L})=>{_.current!==B||S.current||F||W||V||L||(B===Ge.ENTER?(O(),p==null||p()):B===Ge.ESC&&f())},I=()=>{O()},[z,D,M]=r4(t),j=re(t,`${t}-edit-content`,{[`${t}-rtl`]:o==="rtl",[`${t}-${g}`]:!!g},n,D,M);return z(h.createElement("div",{className:j,style:i},h.createElement($D,{ref:b,maxLength:a,value:C,onChange:E,onKeyDown:T,onKeyUp:N,onCompositionStart:k,onCompositionEnd:P,onBlur:I,"aria-label":r,rows:1,autoSize:c}),v!==null?hi(v,{className:`${t}-edit-content-confirm`}):null))};var Ig,Bw;function bH(){return Bw||(Bw=1,Ig=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n<e.rangeCount;n++)r.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||r.forEach(function(i){e.addRange(i)}),t&&t.focus()}}),Ig}var Ng,Lw;function _H(){if(Lw)return Ng;Lw=1;var e=bH(),t={"text/plain":"Text","text/html":"Url",default:"Text"},r="Copy to clipboard: #{key}, Enter";function n(o){var a=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return o.replace(/#{\s*key\s*}/g,a)}function i(o,a){var c,u,d,f,p,g,v=!1;a||(a={}),c=a.debug||!1;try{d=e(),f=document.createRange(),p=document.getSelection(),g=document.createElement("span"),g.textContent=o,g.ariaHidden="true",g.style.all="unset",g.style.position="fixed",g.style.top=0,g.style.clip="rect(0, 0, 0, 0)",g.style.whiteSpace="pre",g.style.webkitUserSelect="text",g.style.MozUserSelect="text",g.style.msUserSelect="text",g.style.userSelect="text",g.addEventListener("copy",function(S){if(S.stopPropagation(),a.format)if(S.preventDefault(),typeof S.clipboardData>"u"){c&&console.warn("unable to use e.clipboardData"),c&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var _=t[a.format]||t.default;window.clipboardData.setData(_,o)}else S.clipboardData.clearData(),S.clipboardData.setData(a.format,o);a.onCopy&&(S.preventDefault(),a.onCopy(S.clipboardData))}),document.body.appendChild(g),f.selectNodeContents(g),p.addRange(f);var b=document.execCommand("copy");if(!b)throw new Error("copy command was unsuccessful");v=!0}catch(S){c&&console.error("unable to copy using execCommand: ",S),c&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(a.format||"text",o),a.onCopy&&a.onCopy(window.clipboardData),v=!0}catch(_){c&&console.error("unable to copy using clipboardData: ",_),c&&console.error("falling back to prompt"),u=n("message"in a?a.message:r),window.prompt(u,o)}}finally{p&&(typeof p.removeRange=="function"?p.removeRange(f):p.removeAllRanges()),g&&document.body.removeChild(g),d()}return v}return Ng=i,Ng}var SH=_H();const CH=Ou(SH);var wH=function(e,t,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function c(f){try{d(n.next(f))}catch(p){a(p)}}function u(f){try{d(n.throw(f))}catch(p){a(p)}}function d(f){f.done?o(f.value):i(f.value).then(c,u)}d((n=n.apply(e,t||[])).next())})};const xH=({copyConfig:e,children:t})=>{const[r,n]=h.useState(!1),[i,o]=h.useState(!1),a=h.useRef(null),c=()=>{a.current&&clearTimeout(a.current)},u={};e.format&&(u.format=e.format),h.useEffect(()=>c,[]);const d=Jr(f=>wH(void 0,void 0,void 0,function*(){var p;f==null||f.preventDefault(),f==null||f.stopPropagation(),o(!0);try{const g=typeof e.text=="function"?yield e.text():e.text;CH(g||CA(t,!0).join("")||"",u),o(!1),n(!0),c(),a.current=setTimeout(()=>{n(!1)},3e3),(p=e.onCopy)===null||p===void 0||p.call(e,f)}catch(g){throw o(!1),g}}));return{copied:r,copyLoading:i,onClick:d}};function Mg(e,t){return h.useMemo(()=>{const r=!!e;return[r,Object.assign(Object.assign({},t),r&&typeof e=="object"?e:null)]},[e])}const EH=e=>{const t=h.useRef(void 0);return h.useEffect(()=>{t.current=e}),t.current},$H=(e,t,r)=>h.useMemo(()=>e===!0?{title:t??r}:h.isValidElement(e)?{title:e}:typeof e=="object"?Object.assign({title:t??r},e):{title:e},[e,t,r]);var kH=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const n4=h.forwardRef((e,t)=>{const{prefixCls:r,component:n="article",className:i,rootClassName:o,setContentRef:a,children:c,direction:u,style:d}=e,f=kH(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:p,direction:g,className:v,style:b}=Un("typography"),S=u??g,_=a?co(t,a):t,C=p("typography",r),[x,E,k]=r4(C),P=re(C,v,{[`${C}-rtl`]:S==="rtl"},i,o,E,k),T=Object.assign(Object.assign({},b),d);return x(h.createElement(n,Object.assign({className:P,style:T,ref:_},f),c))});var RH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},TH=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:RH}))},zh=h.forwardRef(TH);function Dw(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function zg(e,t,r){return e===!0||e===void 0?t:e||r&&t}function PH(e){const t=document.createElement("em");e.appendChild(t);const r=e.getBoundingClientRect(),n=t.getBoundingClientRect();return e.removeChild(t),r.left>n.left||n.right>r.right||r.top>n.top||n.bottom>r.bottom}const Qy=e=>["string","number"].includes(typeof e),OH=({prefixCls:e,copied:t,locale:r,iconOnly:n,tooltips:i,icon:o,tabIndex:a,onCopy:c,loading:u})=>{const d=Dw(i),f=Dw(o),{copied:p,copy:g}=r??{},v=t?p:g,b=zg(d[t?1:0],v),S=typeof b=="string"?b:v;return h.createElement(Vo,{title:b},h.createElement("button",{type:"button",className:re(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:n}),onClick:c,"aria-label":S,tabIndex:a},t?zg(f[1],h.createElement(K$,null),!0):zg(f[0],u?h.createElement(zu,null):h.createElement(zh,null),!0)))},ch=h.forwardRef(({style:e,children:t},r)=>{const n=h.useRef(null);return h.useImperativeHandle(r,()=>({isExceed:()=>{const i=n.current;return i.scrollHeight>i.clientHeight},getHeight:()=>n.current.clientHeight})),h.createElement("span",{"aria-hidden":!0,ref:n,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},e)},t)}),IH=e=>e.reduce((t,r)=>t+(Qy(r)?String(r).length:1),0);function Aw(e,t){let r=0;const n=[];for(let i=0;i<e.length;i+=1){if(r===t)return n;const o=e[i],c=Qy(o)?String(o).length:1,u=r+c;if(u>t){const d=t-r;return n.push(String(o).slice(0,d)),n}n.push(o),r=u}return e}const jg=0,Bg=1,Lg=2,Dg=3,Hw=4,uh={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function NH(e){const{enableMeasure:t,width:r,text:n,children:i,rows:o,expanded:a,miscDeps:c,onEllipsis:u}=e,d=h.useMemo(()=>di(n),[n]),f=h.useMemo(()=>IH(d),[n]),p=h.useMemo(()=>i(d,!1),[n]),[g,v]=h.useState(null),b=h.useRef(null),S=h.useRef(null),_=h.useRef(null),C=h.useRef(null),x=h.useRef(null),[E,k]=h.useState(!1),[P,T]=h.useState(jg),[O,N]=h.useState(0),[I,z]=h.useState(null);ur(()=>{T(t&&r&&f?Bg:jg)},[r,n,o,t,d]),ur(()=>{var B,F,W,V;if(P===Bg){T(Lg);const L=S.current&&getComputedStyle(S.current).whiteSpace;z(L)}else if(P===Lg){const L=!!(!((B=_.current)===null||B===void 0)&&B.isExceed());T(L?Dg:Hw),v(L?[0,f]:null),k(L);const G=((F=_.current)===null||F===void 0?void 0:F.getHeight())||0,q=o===1?0:((W=C.current)===null||W===void 0?void 0:W.getHeight())||0,A=((V=x.current)===null||V===void 0?void 0:V.getHeight())||0,U=Math.max(G,q+A);N(U+1),u(L)}},[P]);const D=g?Math.ceil((g[0]+g[1])/2):0;ur(()=>{var B;const[F,W]=g||[0,0];if(F!==W){const L=(((B=b.current)===null||B===void 0?void 0:B.getHeight())||0)>O;let G=D;W-F===1&&(G=L?F:W),v(L?[F,G]:[G,W])}},[g,D]);const M=h.useMemo(()=>{if(!t)return i(d,!1);if(P!==Dg||!g||g[0]!==g[1]){const B=i(d,!1);return[Hw,jg].includes(P)?B:h.createElement("span",{style:Object.assign(Object.assign({},uh),{WebkitLineClamp:o})},B)}return i(a?d:Aw(d,g[0]),E)},[a,P,g,d].concat(We(c))),j={width:r,margin:0,padding:0,whiteSpace:I==="nowrap"?"normal":"inherit"};return h.createElement(h.Fragment,null,M,P===Lg&&h.createElement(h.Fragment,null,h.createElement(ch,{style:Object.assign(Object.assign(Object.assign({},j),uh),{WebkitLineClamp:o}),ref:_},p),h.createElement(ch,{style:Object.assign(Object.assign(Object.assign({},j),uh),{WebkitLineClamp:o-1}),ref:C},p),h.createElement(ch,{style:Object.assign(Object.assign(Object.assign({},j),uh),{WebkitLineClamp:1}),ref:x},i([],!0))),P===Dg&&g&&g[0]!==g[1]&&h.createElement(ch,{style:Object.assign(Object.assign({},j),{top:400}),ref:b},i(Aw(d,D),!0)),P===Bg&&h.createElement("span",{style:{whiteSpace:"inherit"},ref:S}))}const MH=({enableEllipsis:e,isEllipsis:t,children:r,tooltipProps:n})=>!(n!=null&&n.title)||!e?r:h.createElement(Vo,Object.assign({open:t?void 0:!1},n),r);var zH=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};function jH({mark:e,code:t,underline:r,delete:n,strong:i,keyboard:o,italic:a},c){let u=c;function d(f,p){p&&(u=h.createElement(f,{},u))}return d("strong",i),d("u",r),d("del",n),d("code",t),d("mark",e),d("kbd",o),d("i",a),u}const BH="...",Fw=["delete","mark","code","underline","strong","keyboard","italic"],lm=h.forwardRef((e,t)=>{var r;const{prefixCls:n,className:i,style:o,type:a,disabled:c,children:u,ellipsis:d,editable:f,copyable:p,component:g,title:v}=e,b=zH(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:S,direction:_}=h.useContext(Pt),[C]=fs("Text"),x=h.useRef(null),E=h.useRef(null),k=S("typography",n),P=un(b,Fw),[T,O]=Mg(f),[N,I]=Qr(!1,{value:O.editing}),{triggerType:z=["icon"]}=O,D=Me=>{var qe;Me&&((qe=O.onStart)===null||qe===void 0||qe.call(O)),I(Me)},M=EH(N);ur(()=>{var Me;!N&&M&&((Me=E.current)===null||Me===void 0||Me.focus())},[N]);const j=Me=>{Me==null||Me.preventDefault(),D(!0)},B=Me=>{var qe;(qe=O.onChange)===null||qe===void 0||qe.call(O,Me),D(!1)},F=()=>{var Me;(Me=O.onCancel)===null||Me===void 0||Me.call(O),D(!1)},[W,V]=Mg(p),{copied:L,copyLoading:G,onClick:q}=xH({copyConfig:V,children:u}),[A,U]=h.useState(!1),[Y,Z]=h.useState(!1),[te,ne]=h.useState(!1),[he,me]=h.useState(!1),[ue,Se]=h.useState(!0),[ae,le]=Mg(d,{expandable:!1,symbol:Me=>Me?C==null?void 0:C.collapse:C==null?void 0:C.expand}),[ce,ye]=Qr(le.defaultExpanded||!1,{value:le.expanded}),fe=ae&&(!ce||le.expandable==="collapsible"),{rows:de=1}=le,be=h.useMemo(()=>fe&&(le.suffix!==void 0||le.onEllipsis||le.expandable||T||W),[fe,le,T,W]);ur(()=>{ae&&!be&&(U(mC("webkitLineClamp")),Z(mC("textOverflow")))},[be,ae]);const[Ce,Te]=h.useState(fe),ze=h.useMemo(()=>be?!1:de===1?Y:A,[be,Y,A]);ur(()=>{Te(ze&&fe)},[ze,fe]);const Ee=fe&&(Ce?he:te),$e=fe&&de===1&&Ce,je=fe&&de>1&&Ce,Oe=(Me,qe)=>{var Ot;ye(qe.expanded),(Ot=le.onExpand)===null||Ot===void 0||Ot.call(le,Me,qe)},[Qe,st]=h.useState(0),Et=({offsetWidth:Me})=>{st(Me)},mt=Me=>{var qe;ne(Me),te!==Me&&((qe=le.onEllipsis)===null||qe===void 0||qe.call(le,Me))};h.useEffect(()=>{const Me=x.current;if(ae&&Ce&&Me){const qe=PH(Me);he!==qe&&me(qe)}},[ae,Ce,u,je,ue,Qe]),h.useEffect(()=>{const Me=x.current;if(typeof IntersectionObserver>"u"||!Me||!Ce||!fe)return;const qe=new IntersectionObserver(()=>{Se(!!Me.offsetParent)});return qe.observe(Me),()=>{qe.disconnect()}},[Ce,fe]);const Je=$H(le.tooltip,O.text,u),ht=h.useMemo(()=>{if(!(!ae||Ce))return[O.text,u,v,Je.title].find(Qy)},[ae,Ce,v,Je.title,Ee]);if(N)return h.createElement(yH,{value:(r=O.text)!==null&&r!==void 0?r:typeof u=="string"?u:"",onSave:B,onCancel:F,onEnd:O.onEnd,prefixCls:k,className:i,style:o,direction:_,component:g,maxLength:O.maxLength,autoSize:O.autoSize,enterIcon:O.enterIcon});const Xe=()=>{const{expandable:Me,symbol:qe}=le;return Me?h.createElement("button",{type:"button",key:"expand",className:`${k}-${ce?"collapse":"expand"}`,onClick:Ot=>Oe(Ot,{expanded:!ce}),"aria-label":ce?C.collapse:C==null?void 0:C.expand},typeof qe=="function"?qe(ce):qe):null},vt=()=>{if(!T)return;const{icon:Me,tooltip:qe,tabIndex:Ot}=O,_t=di(qe)[0]||(C==null?void 0:C.edit),tr=typeof _t=="string"?_t:"";return z.includes("icon")?h.createElement(Vo,{key:"edit",title:qe===!1?"":_t},h.createElement("button",{type:"button",ref:E,className:`${k}-edit`,onClick:j,"aria-label":tr,tabIndex:Ot},Me||h.createElement(oH,{role:"button"}))):null},tt=()=>W?h.createElement(OH,Object.assign({key:"copy"},V,{prefixCls:k,copied:L,locale:C,onCopy:q,loading:G,iconOnly:u==null})):null,Le=Me=>[Me&&Xe(),vt(),tt()],nt=Me=>[Me&&!ce&&h.createElement("span",{"aria-hidden":!0,key:"ellipsis"},BH),le.suffix,Le(Me)];return h.createElement(oo,{onResize:Et,disabled:!fe},Me=>h.createElement(MH,{tooltipProps:Je,enableEllipsis:fe,isEllipsis:Ee},h.createElement(n4,Object.assign({className:re({[`${k}-${a}`]:a,[`${k}-disabled`]:c,[`${k}-ellipsis`]:ae,[`${k}-ellipsis-single-line`]:$e,[`${k}-ellipsis-multiple-line`]:je},i),prefixCls:n,style:Object.assign(Object.assign({},o),{WebkitLineClamp:je?de:void 0}),component:g,ref:co(Me,x,t),direction:_,onClick:z.includes("text")?j:void 0,"aria-label":ht==null?void 0:ht.toString(),title:v},P),h.createElement(NH,{enableMeasure:fe&&!Ce,text:u,rows:de,width:Qe,onEllipsis:mt,expanded:ce,miscDeps:[L,ce,G,T,W,C].concat(We(Fw.map(qe=>e[qe])))},(qe,Ot)=>jH(e,h.createElement(h.Fragment,null,qe.length>0&&Ot&&!ce&&ht?h.createElement("span",{key:"show-content","aria-hidden":!0},qe):qe,nt(Ot)))))))});var LH=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const DH=h.forwardRef((e,t)=>{const{ellipsis:r,rel:n,children:i,navigate:o}=e,a=LH(e,["ellipsis","rel","children","navigate"]),c=Object.assign(Object.assign({},a),{rel:n===void 0&&a.target==="_blank"?"noopener noreferrer":n});return h.createElement(lm,Object.assign({},c,{ref:t,ellipsis:!!r,component:"a"}),i)});var AH=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const HH=h.forwardRef((e,t)=>{const{children:r}=e,n=AH(e,["children"]);return h.createElement(lm,Object.assign({ref:t},n,{component:"div"}),r)});var FH=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const WH=(e,t)=>{const{ellipsis:r,children:n}=e,i=FH(e,["ellipsis","children"]),o=h.useMemo(()=>r&&typeof r=="object"?un(r,["expandable","rows"]):r,[r]);return h.createElement(lm,Object.assign({ref:t},i,{ellipsis:o,component:"span"}),n)},VH=h.forwardRef(WH);var UH=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const qH=[1,2,3,4,5],KH=h.forwardRef((e,t)=>{const{level:r=1,children:n}=e,i=UH(e,["level","children"]),o=qH.includes(r)?`h${r}`:"h1";return h.createElement(lm,Object.assign({ref:t},i,{component:o}),n)}),Xo=n4;Xo.Text=VH;Xo.Link=DH;Xo.Title=KH;Xo.Paragraph=HH;var GH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},XH=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:GH}))},YH=h.forwardRef(XH),JH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm-600-80h56c4.4 0 8-3.6 8-8V560c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v144c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V384c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v320c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V462c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v242c0 4.4 3.6 8 8 8zm152 0h56c4.4 0 8-3.6 8-8V304c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v400c0 4.4 3.6 8 8 8z"}}]},name:"bar-chart",theme:"outlined"},QH=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:JH}))},Ww=h.forwardRef(QH),ZH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},eF=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:ZH}))},jh=h.forwardRef(eF),tF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 385.6a446.7 446.7 0 00-96-142.4 446.7 446.7 0 00-142.4-96C631.1 123.8 572.5 112 512 112s-119.1 11.8-174.4 35.2a446.7 446.7 0 00-142.4 96 446.7 446.7 0 00-96 142.4C75.8 440.9 64 499.5 64 560c0 132.7 58.3 257.7 159.9 343.1l1.7 1.4c5.8 4.8 13.1 7.5 20.6 7.5h531.7c7.5 0 14.8-2.7 20.6-7.5l1.7-1.4C901.7 817.7 960 692.7 960 560c0-60.5-11.9-119.1-35.2-174.4zM761.4 836H262.6A371.12 371.12 0 01140 560c0-99.4 38.7-192.8 109-263 70.3-70.3 163.7-109 263-109 99.4 0 192.8 38.7 263 109 70.3 70.3 109 163.7 109 263 0 105.6-44.5 205.5-122.6 276zM623.5 421.5a8.03 8.03 0 00-11.3 0L527.7 506c-18.7-5-39.4-.2-54.1 14.5a55.95 55.95 0 000 79.2 55.95 55.95 0 0079.2 0 55.87 55.87 0 0014.5-54.1l84.5-84.5c3.1-3.1 3.1-8.2 0-11.3l-28.3-28.3zM490 320h44c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8h-44c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8zm260 218v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8h-80c-4.4 0-8 3.6-8 8zm12.7-197.2l-31.1-31.1a8.03 8.03 0 00-11.3 0l-56.6 56.6a8.03 8.03 0 000 11.3l31.1 31.1c3.1 3.1 8.2 3.1 11.3 0l56.6-56.6c3.1-3.1 3.1-8.2 0-11.3zm-458.6-31.1a8.03 8.03 0 00-11.3 0l-31.1 31.1a8.03 8.03 0 000 11.3l56.6 56.6c3.1 3.1 8.2 3.1 11.3 0l31.1-31.1c3.1-3.1 3.1-8.2 0-11.3l-56.6-56.6zM262 530h-80c-4.4 0-8 3.6-8 8v44c0 4.4 3.6 8 8 8h80c4.4 0 8-3.6 8-8v-44c0-4.4-3.6-8-8-8z"}}]},name:"dashboard",theme:"outlined"},rF=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:tF}))},nF=h.forwardRef(rF),iF={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"},oF=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:iF}))},sF=h.forwardRef(oF),aF={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"},lF=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:aF}))},cF=h.forwardRef(lF),uF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 512a48 48 0 1096 0 48 48 0 10-96 0zm200 0a48 48 0 1096 0 48 48 0 10-96 0zm-400 0a48 48 0 1096 0 48 48 0 10-96 0zm661.2-173.6c-22.6-53.7-55-101.9-96.3-143.3a444.35 444.35 0 00-143.3-96.3C630.6 75.7 572.2 64 512 64h-2c-60.6.3-119.3 12.3-174.5 35.9a445.35 445.35 0 00-142 96.5c-40.9 41.3-73 89.3-95.2 142.8-23 55.4-34.6 114.3-34.3 174.9A449.4 449.4 0 00112 714v152a46 46 0 0046 46h152.1A449.4 449.4 0 00510 960h2.1c59.9 0 118-11.6 172.7-34.3a444.48 444.48 0 00142.8-95.2c41.3-40.9 73.8-88.7 96.5-142 23.6-55.2 35.6-113.9 35.9-174.5.3-60.9-11.5-120-34.8-175.6zm-151.1 438C704 845.8 611 884 512 884h-1.7c-60.3-.3-120.2-15.3-173.1-43.5l-8.4-4.5H188V695.2l-4.5-8.4C155.3 633.9 140.3 574 140 513.7c-.4-99.7 37.7-193.3 107.6-263.8 69.8-70.5 163.1-109.5 262.8-109.9h1.7c50 0 98.5 9.7 144.2 28.9 44.6 18.7 84.6 45.6 119 80 34.3 34.3 61.3 74.4 80 119 19.4 46.2 29.1 95.2 28.9 145.8-.6 99.6-39.7 192.9-110.1 262.7z"}}]},name:"message",theme:"outlined"},dF=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:uF}))},hF=h.forwardRef(dF),fF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},mF=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:fF}))},Vw=h.forwardRef(mF),pF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},gF=function(t,r){return h.createElement(_r,Re({},t,{ref:r,icon:pF}))},vF=h.forwardRef(gF);const Uw=/command execution specialist|file search specialist|planning specialist|general-purpose agent/i;function cf(e){const t=e==null?void 0:e.system;return typeof t=="string"?t:Array.isArray(t)?t.map(r=>r&&r.text||"").join(""):""}function Wn(e){if(!e)return!1;if(e.mainAgent){const n=cf(e.body||{});return!Uw.test(n)}const t=e.body||{},r=t.tools;if(t.system&&Array.isArray(r)&&r.length>10){const n=r.some(a=>a.name==="Edit"),i=r.some(a=>a.name==="Bash"),o=r.some(a=>a.name==="Task"||a.name==="Agent");if(n&&i&&o){const a=cf(t);if(a.includes("You are Claude Code")&&!Uw.test(a))return!0}}return!1}function l0(e){return e?/^Base directory for this skill:/i.test(e.trim()):!1}function Zy(e){if(!e)return!0;const t=e.trim();return!!(!t||/^<[a-zA-Z_][\w-]*[\s>]/i.test(t)||/^\[SUGGESTION MODE:/i.test(t)||/^Your response was cut off because it exceeded the output token limit/i.test(t)||/^Base directory for this skill:/i.test(t))}function i4(e){if(!Array.isArray(e))return{commands:[],textBlocks:[],skillBlocks:[]};const t=e.some(o=>o.type==="text"&&/<command-message>/i.test(o.text||"")),r=[];if(t)for(const o of e){if(o.type!=="text")continue;const a=(o.text||"").match(/<command-name>\s*([^<]*)<\/command-name>/i);if(a){const c=a[1].trim();r.push(c.startsWith("/")?c:`/${c}`)}}let n=e.filter(o=>o.type==="text"&&!Zy(o.text));t&&(n=n.filter(o=>!/<command-message>/i.test(o.text||"")));const i=n.filter(o=>l0(o.text));return i.length>0&&(n=n.filter(o=>!l0(o.text))),{commands:r,textBlocks:n,skillBlocks:i}}function o4(e,t){var v,b;const r=e[t];if(!Wn(r))return null;const n=(b=(v=r.response)==null?void 0:v.body)==null?void 0:b.usage;if(!n)return null;const i=n.cache_creation_input_tokens||0,o=n.cache_read_input_tokens||0;if(i===0||i<=o)return null;let a=null;for(let S=t-1;S>=0;S--)if(Wn(e[S])){a=e[S];break}if(!a)return null;if(r.timestamp-a.timestamp>300*1e3)return{reason:"ttl"};const u=xa(a.body),d=xa(r.body);if(!u||!d)return{reason:"key_change"};const f=[];u.model!==d.model&&f.push("model_change"),JSON.stringify(u.system)!==JSON.stringify(d.system)&&f.push("system_change"),JSON.stringify(u.tools)!==JSON.stringify(d.tools)&&f.push("tools_change");const p=u.messages||[],g=d.messages||[];if(g.length<p.length)f.push("msg_truncated");else{const S=Math.min(p.length,g.length);let _=!0;for(let C=0;C<S;C++)if(JSON.stringify(p[C])!==JSON.stringify(g[C])){_=!1;break}_||f.push("msg_modified")}return f.length===0?{reason:"key_change"}:{reason:f[0],reasons:f}}function uf(e){return e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):""}function s4(e){return e.content?typeof e.content=="string"?e.content:Array.isArray(e.content)?e.content.filter(t=>t.type==="text").map(t=>t.text).join(`
341
+ `):JSON.stringify(e.content):String(e.content??"")}const yF=[{match:/claude/i,name:"Claude",color:"#000000",svg:'<svg t="1771495509570" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1570" width="200" height="200"><path d="M198.4 678.4l198.4-115.2 6.4-12.8H243.2l-96-6.4-102.4-6.4-19.2-6.4-25.6-25.6v-12.8l19.2-12.8h32l64 6.4 96 6.4 70.4 6.4L384 512h19.2V492.8l-6.4-6.4-102.4-64-108.8-76.8-51.2-38.4-32-19.2-19.2-25.6-6.4-38.4 32-32h44.8l38.4 32 83.2 64L384 364.8l12.8 12.8 6.4-6.4-6.4-12.8L339.2 256l-64-108.8-25.6-38.4-6.4-25.6c0-12.8-6.4-19.2-6.4-32l32-44.8 19.2-6.4 44.8 6.4 19.2 12.8 25.6 57.6 44.8 96 64 128 19.2 38.4 6.4 38.4 6.4 12.8h6.4V384l6.4-70.4 12.8-89.6 12.8-115.2 6.4-32 19.2-38.4 32-19.2 25.6 12.8 19.2 32v19.2l-32 70.4-19.2 121.6-19.2 83.2h6.4l12.8-12.8 44.8-57.6 70.4-89.6 32-32 38.4-38.4 25.6-19.2h44.8l32 51.2-12.8 51.2-51.2 57.6-38.4 51.2-51.2 70.4-38.4 57.6v6.4h6.4l121.6-25.6 64-12.8 76.8-12.8 38.4 19.2 6.4 19.2-12.8 32-83.2 19.2-96 19.2-147.2 32 64 6.4h96l128 6.4 32 19.2 25.6 38.4-6.4 19.2-51.2 25.6-70.4-12.8-160-38.4-57.6-12.8h-6.4v6.4l44.8 44.8 83.2 76.8 108.8 102.4 6.4 25.6-12.8 19.2h-12.8l-96-70.4-38.4-32-83.2-70.4h-6.4v6.4l19.2 25.6 102.4 147.2 6.4 44.8-6.4 12.8-25.6 6.4-25.6-6.4-57.6-83.2-64-83.2-51.2-83.2-6.4 6.4-25.6 307.2-12.8 12.8-32 12.8-25.6-19.2-12.8-32 12.8-64 19.2-83.2 12.8-64 12.8-83.2 6.4-25.6h-6.4l-64 83.2-96 128-70.4 76.8-19.2 6.4-32-12.8v-25.6l19.2-25.6 102.4-128 64-83.2 38.4-51.2v-6.4l-268.8 172.8-51.2 12.8-19.2-19.2v-32l12.8-12.8 76.8-57.6z m0 0" fill="#D97757" p-id="1571"></path></svg>'},{match:/gpt|o1|o3|o4/i,name:"OpenAI",color:"#00000",svg:'<svg t="1771495569354" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2752" width="200" height="200"><path d="M565.265178 954.519092c-22.289934 0-48.400999-8.151747-67.952455-14.838727a103.425292 103.425292 0 0 1-26.875292-11.272338c-12.737105-7.769634-15.411897-8.342804-19.806198-24.773669 21.971506-5.158528 81.581157-41.905075 103.871091-55.342721 148.896757-89.159735 119.028246-10.444426 119.028246-364.981743 15.029784 3.566389 82.791182 32.415932 82.791182 57.316972 0 133.102747 20.570425 273.847757-52.604243 354.91943-22.799418 25.47421-91.834527 58.972796-138.388646 58.972796z m-433.061569-299.321966c258.626916 136.860193 184.369594 157.048504 357.721593 52.094759 44.579867-27.193719 90.433445-49.292596 132.593263-77.568969v101.896839c-95.528287 22.226248-272.319304 227.038896-419.050754 100.686815l-25.856323-25.155782c-37.319718-43.943012-45.344094-72.410442-45.344094-151.889977z m375.744596-19.105658c-19.933569-13.310275-79.479535-51.330533-101.896839-57.316972v-133.739602a1158.312326 1158.312326 0 0 0 101.896839-57.316973c43.943012 10.189684 70.690933 47.063603 114.633945 57.316973v127.371049c-17.831947 12.10025-95.846715 58.718054-114.633945 63.749211z m-426.693016-178.31947c0-63.685525-4.26693-90.306074 38.84817-145.776166 23.945757-30.88748 47.509402-39.612396 82.090641-57.953828v261.110652c44.134069 23.372588 83.873836 49.037854 129.345301 74.448379l131.765351 78.396881c-59.545966 15.921381-63.685525 61.32916-109.602788 33.753328-104.699003-62.730242-272.38299-129.345301-272.38299-243.91556z m866.123138 127.37105c0 79.543221-47.573087 161.188063-121.002497 178.31947v-165.582365c0-82.791182 9.743885-84.574377-48.910483-116.608196L565.265178 362.371082c15.79401-23.62733 22.608361-19.105657 48.146256-34.835982 41.714019-25.47421 39.039227-16.112438 117.053995 28.785857 94.190891 54.196382 216.849212 100.559444 216.849212 228.885777z m-541.326961-197.425127v-95.528287c43.751956-23.181531 90.688187-50.94842 133.357489-76.804743 82.154327-49.547338 95.528287-63.303412 185.006449-63.303412 48.464684 0 102.533695 36.746548 125.651541 65.405034 42.223503 52.22213 39.930824 92.662439 39.930824 151.125751-31.078536-16.494551-192.393971-121.002497-222.899337-121.002498s-229.650003 123.422547-261.110652 140.108155z m-50.94842 159.213812c-16.36718-10.95391-63.112355-39.99451-82.791183-44.579867 0-168.320842-33.880699-314.606493 67.952455-390.519639 56.043262-41.714019 113.169178-53.814269 181.376375-30.696423 25.47421 8.661231 35.536523 20.888852 56.36169 26.429493-11.781822 16.048752-80.68956 50.311565-102.278953 63.303412-154.564769 93.235608-120.620384 7.451206-120.620384 376.063024z m-292.953415 121.002498c0 169.148754 115.143429 280.853165 274.293556 273.847756 59.800708-2.674792 26.811606-7.705949 69.417222 25.47421 97.820966 76.741057 228.822091 73.747838 319.637649 1.018969a251.939936 251.939936 0 0 0 52.604244-55.661149c58.20857-85.274918-10.95391-45.598836 81.96327-83.619094 130.236898-53.241099 199.399378-217.358696 128.64476-355.428914-27.448461-53.559526-40.249252-28.849543-28.276373-104.699003 18.723544-118.582447-63.176041-230.032116-157.621674-269.771884-98.90362-41.586648-129.090559 12.737105-178.892639-37.574459A161.888604 161.888604 0 0 0 580.103905 28.913674C474.003821-27.766443 331.284559 1.528898 258.428319 93.681853c-81.326415 102.979494 9.489143 54.705866-92.407697 98.648878C15.149614 257.353652-33.251385 439.175825 41.579107 561.06992c56.807488 92.598753 20.570425 4.967471 20.570424 106.800625z" fill="#EFA474" p-id="2753"></path></svg>'},{match:/gemini/i,name:"Gemini",color:"#4285F4",svg:'<svg t="1771495622863" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4556" width="200" height="200"><path d="M960 512.896A477.248 477.248 0 0 0 512.896 960h-1.792A477.184 477.184 0 0 0 64 512.896v-1.792A477.184 477.184 0 0 0 511.104 64h1.792A477.248 477.248 0 0 0 960 511.104z" fill="#448AFF" p-id="4557"></path></svg>'},{match:/qwen/i,name:"Qwen",color:"#00000",svg:'<svg t="1771495640319" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5634" width="200" height="200"><path d="M537.782857 57.161143c16.749714 29.44 33.426286 58.953143 50.102857 88.502857a7.68 7.68 0 0 0 6.692572 3.913143h236.873143c7.424 0 13.750857 4.681143 19.017142 13.933714l62.061715 109.677714c8.082286 14.372571 10.24 20.370286 1.024 35.693715a2262.893714 2262.893714 0 0 0-32.438857 55.478857l-15.652572 28.086857c-4.534857 8.338286-9.508571 11.922286-1.718857 21.833143l113.152 197.851428c7.314286 12.8 4.754286 21.065143-1.828571 32.841143-18.651429 33.499429-37.632 66.742857-56.978286 99.84-6.765714 11.593143-14.994286 16.018286-29.001143 15.798857a1833.398857 1833.398857 0 0 0-99.291429 0.658286 4.242286 4.242286 0 0 0-3.437714 2.157714 24571.830857 24571.830857 0 0 1-115.419428 202.24c-7.204571 12.507429-16.201143 15.469714-30.939429 15.506286-42.532571 0.146286-85.430857 0.182857-128.731429 0.109714a22.930286 22.930286 0 0 1-19.821714-11.556571l-56.978286-99.108571a3.84 3.84 0 0 0-3.547428-2.121143h-218.331429a76.288 76.288 0 0 1-34.377143-3.913143l-68.388571-118.198857a23.149714 23.149714 0 0 1-0.073143-23.04l51.492572-90.441143a8.448 8.448 0 0 0 0-8.411429 23594.496 23594.496 0 0 1-80.018286-139.593143L47.542857 425.325714c-6.838857-13.202286-7.387429-21.138286 4.022857-41.179428 19.858286-34.669714 39.570286-69.302857 59.209143-103.936 5.632-9.984 12.946286-14.262857 24.905143-14.262857 36.827429-0.182857 73.654857-0.182857 110.445714-0.073143 1.901714 0 3.657143-1.024 4.571429-2.669715l119.734857-208.859428a20.845714 20.845714 0 0 1 17.993143-10.496c22.381714-0.036571 44.946286 0 67.547428-0.256l43.410286-0.987429c14.555429-0.109714 30.866286 1.389714 38.4 14.518857z m-146.432 17.188571a2.56 2.56 0 0 0-2.194286 1.28l-122.331428 213.942857a6.692571 6.692571 0 0 1-5.741714 3.364572H138.788571c-2.377143 0-2.962286 1.060571-1.755428 3.145143l247.917714 433.334857c1.060571 1.792 0.548571 2.633143-1.462857 2.669714l-119.222857 0.658286a9.289143 9.289143 0 0 0-8.557714 4.937143l-56.32 98.56c-1.865143 3.328-0.914286 5.046857 2.925714 5.046857l243.858286 0.365714c1.974857 0 3.401143 0.841143 4.425142 2.56l59.867429 104.704c1.974857 3.474286 3.913143 3.510857 5.924571 0l213.577143-373.76 33.426286-58.953143a2.340571 2.340571 0 0 1 4.096 0l60.745143 107.958857a5.193143 5.193143 0 0 0 4.571428 2.633143l117.906286-0.841143a1.718857 1.718857 0 0 0 1.462857-2.56l-123.721143-217.014857a4.608 4.608 0 0 1 0-4.827428l12.507429-21.613715 47.798857-84.370285c1.024-1.755429 0.512-2.633143-1.499428-2.633143H392.521143c-2.486857 0-3.108571-1.097143-1.828572-3.291429l61.184-106.861714a4.571429 4.571429 0 0 0 0-4.864l-58.258285-102.253714a2.56 2.56 0 0 0-2.267429-1.316572z m268.361143 342.198857c1.974857 0 2.486857 0.841143 1.462857 2.56l-35.474286 62.500572-111.542857 195.620571a2.377143 2.377143 0 0 1-2.121143 1.243429 2.486857 2.486857 0 0 1-2.121142-1.243429l-147.346286-257.353143c-0.841143-1.462857-0.402286-2.230857 1.206857-2.304l9.216-0.512 286.793143-0.512h-0.073143z" fill="#7D5DED" p-id="5635"></path></svg>'},{match:/kimi|moonshot/i,name:"Kimi",color:"#00000",svg:'<svg t="1771495664798" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6649" width="200" height="200"><path d="M731.062857 590.262857v318.317714h-148.589714V443.977143a146.285714 146.285714 0 0 1-146.285714 146.285714l-214.491429-0.036571v318.354285H73.142857V165.814857h148.553143v275.858286h180.882286l119.771428-275.858286h167.753143l-67.84 156.269714a255.524571 255.524571 0 0 1-106.678857 119.588572h66.925714a148.553143 148.553143 0 0 1 148.516572 148.589714z m120.758857-473.965714a99.035429 99.035429 0 0 1 0 198.070857h-99.035428V215.332571a99.035429 99.035429 0 0 1 99.035428-99.035428z" fill="#F4F4F4" p-id="6650"></path></svg>'},{match:/glm|chatglm/i,name:"GLM",color:"#00000",svg:'<svg data-name="glm" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 217.2 200"> <!-- Generator: Adobe Illustrator 29.8.2, SVG Export Plug-In . SVG Version: 2.1.1 Build 3) --> <defs> <style> .st0 { fill: #fff; } </style> </defs> <path class="st0" d="M86.8,190.4H0L131.3,4.8h85.8L86.8,190.4h0ZM212.8,190h-107.9l14.9-21.6c2.3-3.3,6-5.2,9.9-5.2h83.1v26.8h0ZM99.4,26.3c-2.3,3.3-6,5.2-9.9,5.2H6.4V4.8h107.9l-14.9,21.6Z"/> </svg>'},{match:/minimax|abab/i,name:"MiniMax",color:"#00000",svg:'<svg viewBox="0 0 24 24" fill="#fff"><path d="M4 8l4-4 4 4 4-4 4 4v8l-4 4-4-4-4 4-4-4z" fill="none" stroke="#fff" stroke-width="1.5" stroke-linejoin="round"/></svg>'},{match:/deepseek/i,name:"DeepSeek",color:"#00000",svg:'<svg t="1771495947541" class="icon" viewBox="0 0 1391 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11539" width="200" height="200"><path d="M1326.70201318 112.02090779c-12.94676356-6.47485468-18.53640721 5.86654827-26.0997327 12.13814316-2.57756953 2.02376031-4.77807747 4.65435413-6.9785854 7.08168819-18.91788751 20.63528526-41.02017805 34.19182812-69.92725218 32.57311444-42.23384508-2.42733405-78.29772513 11.12773591-110.16384908 44.10589703-6.77679853-40.66668282-29.28560862-64.94444203-63.55255448-80.52327231-17.95608583-8.09209545-36.06388005-16.1856638-48.63358202-33.78825438-8.74900746-12.5431898-11.12773591-26.50330641-15.52727888-40.26016327-2.7823022-8.29535522-5.56460442-16.79249731-14.92044538-18.20942411-10.19244639-1.61871367-14.16337637 7.08168818-18.15934561 14.36516325-15.93232553 29.74073376-22.12880269 62.51710799-21.49692994 95.69705596 1.36684831 74.65672404 32.27117059 134.13819156 93.62469006 176.42358804 6.9800583 4.8546681 8.77551959 9.71080912 6.57501165 16.79102439-4.17271686 14.56695011-9.18056624 28.7303265-13.55506995 43.29727663-2.78377509 9.30723537-6.95501906 11.32952278-16.74241882 7.28347507-33.66158524-14.36516325-62.745407-35.60875491-88.46513227-61.30196806-43.62425973-43.09548975-83.0772755-90.64060097-132.26613965-127.86659667a581.67054343 581.67054343 0 0 0-35.07703915-24.48101901c-50.20074429-49.77065841 6.57501167-90.63912807 19.72650789-95.49526908 13.73181759-5.05792788 4.77955037-22.4572587-39.65480265-22.25547181s-85.07599655 15.3770434-136.87041526 35.60875491c-7.58541892 3.03416756-15.55379103 5.25971475-23.69596499 7.08168819-47.03990759-9.10544849-95.84876434-11.12773591-146.8596019-5.26118765-96.02551195 10.92594905-172.73103555 57.25739323-229.12678412 136.36373875-67.72674425 95.09022244-83.68558192 203.13015422-64.13582165 315.82149435 20.48504978 118.76262107 79.88992666 217.09027084 171.13736114 293.97106918 94.6350973 79.71317902 203.61031862 118.76262107 327.93607117 111.27735913 75.51542292-4.45256725 159.57953934-14.77020989 254.41642354-96.71040901 23.92426399 12.13961607 49.03715574 16.99575708 90.66564019 20.63675815 32.09295007 3.03416756 62.97223311-1.61871367 86.87145788-6.67664152 37.45429471-8.09209545 34.84874013-43.49906349 21.31870939-49.97244528-109.7838417-52.19946535-85.68283009-30.95587367-107.58333373-48.15194474 55.78891504-67.37324899 139.85303146-137.3770918 172.73103555-364.17669887 2.60408167-18.00616433 0.40357375-29.33568711 0-43.90263724-0.20325977-8.90218873 1.76894914-12.34287584 11.75960867-13.35328309 27.49014733-3.23742733 54.19671351-10.92594905 78.70277179-24.68280588 71.11440706-39.65480265 99.81822142-104.80250446 106.59649284-182.89844271 1.01188015-11.9363563-0.20178686-24.27775924-12.56970195-30.54935413M706.87018452 814.87993343c-106.36966673-85.37941333-157.98733782-113.5014334-179.30604722-112.28776638-19.92829476 1.21366703-16.33737217 24.48101902-11.96286844 39.65480264 4.5777635 14.97199677 10.57098089 25.2896394 18.94145384 38.44113563 5.76786417 8.70040186 9.76383341 21.64863831-5.78995762 31.35944742-34.26841876 21.64863831-93.82647692-7.28347506-96.60730623-8.69892897-69.3454579-41.67856295-127.33635378-96.710409-168.1797842-171.97249368-39.45154288-72.43117687-62.33888747-150.1220685-66.13306983-233.07267483-1.01188015-20.02992464 4.77955037-27.11161282 24.27923214-30.75408682a235.19659216 235.19659216 0 0 1 77.91771774-2.02228741c108.59668681 16.18713669 201.05631542 65.75453531 278.54394728 144.25552022 44.23256614 44.71125762 77.69089163 98.12439001 112.1861365 150.32385536 36.64567431 55.43394691 76.0986901 108.24024576 126.29943438 151.53604947 17.72778682 15.17378365 31.86465106 26.7065662 45.41972102 35.20370829-40.84343042 4.65435413-108.99878765 5.66476139-155.60860936-31.96628094m51.00936468-334.83953883c0-8.90218873 6.9815312-15.98387693 15.75557791-15.98387693q2.98408908 0.05155138 5.36134463 1.01188017a15.85720779 15.85720779 0 0 1 10.16740714 14.97199676 15.78061715 15.78061715 0 0 1-15.73053865 15.98387691 15.60386953 15.60386953 0 0 1-15.55379103-15.98387691m158.39238446 82.95060635c-10.1423679 4.24930749-20.30830215 7.89178146-30.09570191 8.29535522-15.12370514 0.81009328-31.66286419-5.46150162-40.61513142-13.15002332-13.96011661-11.93782919-23.92573689-18.61447073-28.09845373-39.45301577-1.79546129-8.90218873-0.81009328-22.65904557 0.78505403-30.54935414 3.59092258-16.99575708-0.40504665-27.92023321-12.13961606-37.8343021-9.55910075-8.09356835-21.72522894-10.31911553-35.07703915-10.31911552-4.98281013 0-9.55910075-2.22407429-12.94823645-4.04604774a13.27669246 13.27669246 0 0 1-5.76639128-18.61299783c1.39041466-2.8323807 8.16868608-9.71228202 9.7623605-10.92594905 18.13136058-10.52090241 39.04649623-7.08021529 58.36795748 0.81009328 17.93104659 7.48526194 31.46107731 21.24359167 51.01083757 40.6666828 19.92829476 23.46913885 23.51921733 29.94399353 34.84874013 47.54511123 8.97877936 13.75685685 17.14746545 27.92023321 22.71206987 44.10442409 3.41270206 10.11732865-0.98684091 18.41121097-12.74644958 23.46913885" fill="#4D6BFE" p-id="11540"></path></svg>'}];function bF(e){if(!e)return null;for(const t of yF)if(t.match.test(e))return{name:e.replace(/^claude-/,"").replace(/-\d{8,}$/,""),provider:t.name,color:t.color,svg:t.svg};return{name:e,provider:e,color:"#065f46",svg:Rl("agent")}}function Rl(e){return e==="user"?'<svg viewBox="0 0 24 24"><path d="M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z"/></svg>':e==="agent"?'<svg viewBox="0 0 24 24"><path d="M12 2a2 2 0 012 2c0 .74-.4 1.39-1 1.73V7h1a7 7 0 017 7h1a1 1 0 011 1v3a1 1 0 01-1 1h-1.17A7 7 0 0113 22h-2a7 7 0 01-6.83-3H3a1 1 0 01-1-1v-3a1 1 0 011-1h1a7 7 0 017-7h1V5.73c-.6-.34-1-.99-1-1.73a2 2 0 012-2zM9.5 13a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm5 0a1.5 1.5 0 100 3 1.5 1.5 0 000-3z"/></svg>':'<svg viewBox="0 0 24 24"><path d="M12 15.5A3.5 3.5 0 018.5 12 3.5 3.5 0 0112 8.5a3.5 3.5 0 013.5 3.5 3.5 3.5 0 01-3.5 3.5m7.43-2.53c.04-.32.07-.64.07-.97s-.03-.66-.07-1l2.11-1.63c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.49.49 0 0014 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64L4.57 11c-.04.34-.07.67-.07 1s.03.65.07.97l-2.11 1.66c-.19.15-.25.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1.01c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.58 1.69-.98l2.49 1.01c.22.08.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.66z"/></svg>'}function ln(e){return e==null||e===0?"0":e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":String(e)}function xa(e){if(Array.isArray(e))return e.map(xa);if(e&&typeof e=="object"){const t={};for(const r of Object.keys(e))r.startsWith("_")||(t[r]=xa(e[r]));return t}return e}function _F(e){var r,n,i;const t={};for(const o of e){const a=(n=(r=o.response)==null?void 0:r.body)==null?void 0:n.usage;if(!a)continue;const c=((i=o.body)==null?void 0:i.model)||"unknown";t[c]||(t[c]={input:0,output:0,cacheCreation:0,cacheRead:0});const u=t[c];u.input+=a.input_tokens||0,u.output+=a.output_tokens||0,u.cacheCreation+=a.cache_creation_input_tokens||0,u.cacheRead+=a.cache_read_input_tokens||0}return t}function SF(e){var r,n,i;const t={ttl:{count:0,cacheCreate:0},system_change:{count:0,cacheCreate:0},tools_change:{count:0,cacheCreate:0},model_change:{count:0,cacheCreate:0},msg_truncated:{count:0,cacheCreate:0},msg_modified:{count:0,cacheCreate:0},key_change:{count:0,cacheCreate:0}};for(let o=0;o<e.length;o++){const a=o4(e,o);if(!a)continue;const c=((i=(n=(r=e[o].response)==null?void 0:r.body)==null?void 0:n.usage)==null?void 0:i.cache_creation_input_tokens)||0,u=a.reasons||[a.reason];for(const d of u)t[d]&&(t[d].count++,t[d].cacheCreate+=c)}return t}function CF(e){var r,n;const t={};for(const i of e){const o=(n=(r=i.response)==null?void 0:r.body)==null?void 0:n.content;if(Array.isArray(o))for(const a of o)a.type==="tool_use"&&a.name&&(t[a.name]=(t[a.name]||0)+1)}return Object.entries(t).sort((i,o)=>o[1]-i[1])}function wF(e){var r;const t={};for(const n of e){const i=(r=n.body)==null?void 0:r.messages;if(Array.isArray(i))for(const o of i){if(o.role!=="user")continue;const a=o.content;if(Array.isArray(a))for(const c of a){if(c.type!=="text"||!l0(c.text))continue;const u=c.text.match(/^#\s+(.+)$/m),d=u?u[1]:"Skill";t[d]=(t[d]||0)+1}}}return Object.entries(t).sort((n,i)=>i[1]-n[1])}function df(e){return typeof e!="string"?!1:e.includes("<system-reminder>")&&e.includes("# claudeMd")}function hf(e){return typeof e!="string"?!1:e.includes("<system-reminder>")&&e.includes("skills are available")}function xF(e){const t=e==null?void 0:e.messages;if(!Array.isArray(t))return!1;for(const r of t){const n=r==null?void 0:r.content;if(typeof n=="string"){if(df(n))return!0}else if(Array.isArray(n)){for(const i of n)if(i.type==="text"&&df(i.text))return!0}}return!1}function EF(e){const t=e==null?void 0:e.messages;if(!Array.isArray(t))return!1;for(const r of t){const n=r==null?void 0:r.content;if(typeof n=="string"){if(hf(n))return!0}else if(Array.isArray(n)){for(const i of n)if(i.type==="text"&&hf(i.text))return!0}}return!1}function $F(e){return e?e.replace(/^claude-/,"").replace(/-\d{8,}$/,""):null}function kF(e){const t=(e==null?void 0:e.url)||"";return!(e.isHeartbeat||e.isCountTokens||/\/api\/eval\/sdk-/.test(t)||/\/messages\/count_tokens/.test(t))}function ss(e){return e.filter(kF)}function qw(e,t){for(let r=t-1;r>=0;r--)if(Wn(e[r])&&e[r].timestamp)return e[r].timestamp;return null}function eb(e){const t=e==null?void 0:e.content;if(typeof t=="string")return t;if(Array.isArray(t)){for(const r of t)if((r==null?void 0:r.type)==="text"&&r.text)return r.text}return""}function RF(e){const t=e.body||{},r=cf(t);if(/Extract any file paths/i.test(r)||/process Bash commands/i.test(r)||/command execution specialist/i.test(r))return"Bash";if(/file search specialist/i.test(r))return"Search";if(/planning specialist/i.test(r))return"Plan";if(/general-purpose agent/i.test(r))return"General";const n=t.messages||[];for(let i=n.length-1;i>=0;i--){if(n[i].role!=="user")continue;const o=eb(n[i]);if(/^Command:/m.test(o))return"Bash";break}return null}function TF(e){var n;const t=(n=e.body)==null?void 0:n.messages;if(!Array.isArray(t)||t.length!==1)return!1;const r=t[0];return r.role==="user"&&r.content==="count"}function PF(e,t){var u;const r=e.body||{},n=r.tools,i=r.messages||[];if(Array.isArray(n)&&n.length>0||i.length!==1||i[0].role!=="user")return!1;const o=eb(i[0]);if(!o||o.trim()==="count")return!1;const a=o.trim();if(/^Command:/m.test(o)||/^<policy_spec>/i.test(a)||/^<task-notification>/i.test(a))return!1;const c=cf(r);if(!c.includes("Claude Code")||/process Bash commands/i.test(c)||/Extract any file paths/i.test(c))return!1;if(t){const d=((u=t.body)==null?void 0:u.messages)||[],f=o.slice(0,80);if(d.some(g=>{const v=g==null?void 0:g.content;return typeof v=="string"?v.includes(f):Array.isArray(v)?v.some(b=>(b==null?void 0:b.type)==="text"&&b.text&&b.text.includes(f)):!1}))return!0}return!1}function Pa(e,t){var n;if(Wn(e))return{type:"MainAgent",subType:null};if(e.isCountTokens||TF(e))return{type:"Count",subType:null};if(PF(e,t)){const i=eb((((n=e.body)==null?void 0:n.messages)||[])[0]);return/^Implement the following plan:/i.test(i.trim())?{type:"Plan",subType:"Prompt"}:{type:"Preflight",subType:null}}return{type:"SubAgent",subType:RF(e)}}function ff(e,t){return e==="Plan"&&t?`Plan:${t}`:e==="SubAgent"&&t?`SubAgent:${t}`:e}const OF={"ui.guide.title":{zh:"欢迎使用 CC Viewer",en:"Welcome to CC Viewer","zh-TW":"歡迎使用 CC Viewer",ko:"CC Viewer에 오신 것을 환영합니다",ja:"CC Viewer へようこそ",de:"Willkommen bei CC Viewer",es:"Bienvenido a CC Viewer",fr:"Bienvenue sur CC Viewer",it:"Benvenuto in CC Viewer",da:"Velkommen til CC Viewer",pl:"Witamy w CC Viewer",ru:"Добро пожаловать в CC Viewer",ar:"مرحبًا بك في CC Viewer",no:"Velkommen til CC Viewer","pt-BR":"Bem-vindo ao CC Viewer",th:"ยินดีต้อนรับสู่ CC Viewer",tr:"CC Viewer'a hoş geldiniz",uk:"Ласкаво просимо до CC Viewer"},"ui.guide.step1":{zh:"你可以先尝试在 Claude 中发起一轮对话。不知道说什么?可以问问:",en:"Try starting a conversation in Claude. Not sure what to say? Try asking:","zh-TW":"你可以先嘗試在 Claude 中發起一輪對話。不知道說什麼?可以問問:",ko:"Claude에서 대화를 시작해 보세요. 무슨 말을 해야 할지 모르겠다면:",ja:"まず Claude で会話を始めてみましょう。何を言えばいいかわからない場合:",de:"Starten Sie ein Gespräch in Claude. Nicht sicher, was Sie sagen sollen? Fragen Sie:",es:"Intenta iniciar una conversación en Claude. ¿No sabes qué decir? Prueba preguntar:",fr:"Essayez de lancer une conversation dans Claude. Vous ne savez pas quoi dire ? Demandez :",it:"Prova ad avviare una conversazione in Claude. Non sai cosa dire? Prova a chiedere:",da:"Prøv at starte en samtale i Claude. Ikke sikker på hvad du skal sige? Prøv at spørge:",pl:"Spróbuj rozpocząć rozmowę w Claude. Nie wiesz co powiedzieć? Zapytaj:",ru:"Попробуйте начать разговор в Claude. Не знаете, что сказать? Спросите:",ar:"جرّب بدء محادثة في Claude. لا تعرف ماذا تقول؟ جرّب أن تسأل:",no:"Prøv å starte en samtale i Claude. Usikker på hva du skal si? Prøv å spørre:","pt-BR":"Tente iniciar uma conversa no Claude. Não sabe o que dizer? Pergunte:",th:"ลองเริ่มบทสนทนาใน Claude ไม่รู้จะพูดอะไร? ลองถามว่า:",tr:"Claude'da bir sohbet başlatmayı deneyin. Ne söyleyeceğinizi bilmiyor musunuz? Şunu sorun:",uk:"Спробуйте розпочати розмову в Claude. Не знаєте, що сказати? Запитайте:"},"ui.guide.exampleQuestion":{zh:"看看我现在有多少 skill",en:"How many skills do I have right now?","zh-TW":"看看我現在有多少 skill",ko:"지금 내가 가진 skill이 몇 개인지 확인해줘",ja:"今いくつの skill があるか見てみて",de:"Wie viele Skills habe ich gerade?",es:"¿Cuántos skills tengo ahora mismo?",fr:"Combien de skills ai-je en ce moment ?",it:"Quanti skill ho in questo momento?",da:"Hvor mange skills har jeg lige nu?",pl:"Ile mam teraz skills?",ru:"Сколько у меня сейчас skills?",ar:"كم عدد الـ skills لديّ الآن؟",no:"Hvor mange skills har jeg nå?","pt-BR":"Quantos skills eu tenho agora?",th:"ตอนนี้ฉันมีกี่ skill?",tr:"Şu anda kaç tane skill'im var?",uk:"Скільки у мене зараз skills?"},"ui.guide.step2":{zh:"你能看到这段文字,说明服务已经启动。如果 Claude 有响应但这里没有变化,可以让 Claude 帮你排查:",en:"If you can see this, the service is running. If Claude responds but nothing shows here, ask Claude to help troubleshoot:","zh-TW":"你能看到這段文字,說明服務已經啟動。如果 Claude 有回應但這裡沒有變化,可以讓 Claude 幫你排查:",ko:"이 텍스트가 보이면 서비스가 실행 중입니다. Claude가 응답하지만 여기에 변화가 없다면 Claude에게 문제 해결을 요청하세요:",ja:"このテキストが見えていればサービスは起動しています。Claude が応答しているのにここに変化がない場合、Claude にトラブルシューティングを依頼してください:",de:"Wenn Sie diesen Text sehen, läuft der Dienst. Wenn Claude antwortet, aber hier nichts angezeigt wird, bitten Sie Claude um Hilfe:",es:"Si puedes ver este texto, el servicio está funcionando. Si Claude responde pero aquí no cambia nada, pide a Claude que te ayude:",fr:"Si vous voyez ce texte, le service fonctionne. Si Claude répond mais rien ne s'affiche ici, demandez à Claude de vous aider :",it:"Se puoi vedere questo testo, il servizio è in esecuzione. Se Claude risponde ma qui non cambia nulla, chiedi a Claude di aiutarti:",da:"Hvis du kan se denne tekst, kører tjenesten. Hvis Claude svarer, men intet vises her, bed Claude om hjælp:",pl:"Jeśli widzisz ten tekst, usługa działa. Jeśli Claude odpowiada, ale tutaj nic się nie zmienia, poproś Claude o pomoc:",ru:"Если вы видите этот текст, сервис запущен. Если Claude отвечает, но здесь ничего не меняется, попросите Claude помочь:",ar:"إذا كنت ترى هذا النص، فالخدمة تعمل. إذا كان Claude يستجيب ولكن لا شيء يظهر هنا، اطلب من Claude المساعدة:",no:"Hvis du kan se denne teksten, kjører tjenesten. Hvis Claude svarer men ingenting vises her, be Claude om hjelp:","pt-BR":"Se você pode ver este texto, o serviço está rodando. Se o Claude responde mas nada aparece aqui, peça ao Claude para ajudar:",th:"ถ้าคุณเห็นข้อความนี้ แสดงว่าบริการกำลังทำงาน หาก Claude ตอบกลับแต่ที่นี่ไม่มีการเปลี่ยนแปลง ให้ขอให้ Claude ช่วยแก้ไข:",tr:"Bu metni görebiliyorsanız, hizmet çalışıyor. Claude yanıt veriyor ama burada bir değişiklik olmuyorsa, Claude'dan yardım isteyin:",uk:"Якщо ви бачите цей текст, сервіс працює. Якщо Claude відповідає, але тут нічого не змінюється, попросіть Claude допомогти:"},"ui.guide.troubleshootCmd":{zh:"我已经启动了 cc-viewer,但是无法看到 cc-viewer 的请求,检查 npm 包中 cc-viewer 的实现,检查问题,并修复",en:"I've started cc-viewer but can't see any requests. Check the cc-viewer npm package implementation, find the issue, and fix it","zh-TW":"我已經啟動了 cc-viewer,但是無法看到 cc-viewer 的請求,檢查 npm 包中 cc-viewer 的實現,檢查問題,並修復",ko:"cc-viewer를 시작했지만 요청을 볼 수 없습니다. cc-viewer npm 패키지 구현을 확인하고 문제를 찾아 수정해 주세요",ja:"cc-viewer を起動しましたがリクエストが表示されません。cc-viewer npm パッケージの実装を確認し、問題を見つけて修正してください",de:"Ich habe cc-viewer gestartet, kann aber keine Anfragen sehen. Überprüfen Sie die cc-viewer npm-Paket-Implementierung, finden Sie das Problem und beheben Sie es",es:"He iniciado cc-viewer pero no puedo ver las solicitudes. Revisa la implementación del paquete npm cc-viewer, encuentra el problema y corrígelo",fr:"J'ai démarré cc-viewer mais je ne vois aucune requête. Vérifiez l'implémentation du package npm cc-viewer, trouvez le problème et corrigez-le",it:"Ho avviato cc-viewer ma non riesco a vedere le richieste. Controlla l'implementazione del pacchetto npm cc-viewer, trova il problema e risolvilo",da:"Jeg har startet cc-viewer, men kan ikke se nogen forespørgsler. Tjek cc-viewer npm-pakkens implementering, find problemet og ret det",pl:"Uruchomiłem cc-viewer, ale nie widzę żadnych żądań. Sprawdź implementację pakietu npm cc-viewer, znajdź problem i napraw go",ru:"Я запустил cc-viewer, но не вижу запросов. Проверьте реализацию npm-пакета cc-viewer, найдите проблему и исправьте её",ar:"لقد قمت بتشغيل cc-viewer ولكن لا أستطيع رؤية أي طلبات. تحقق من تنفيذ حزمة npm الخاصة بـ cc-viewer، وابحث عن المشكلة وأصلحها",no:"Jeg har startet cc-viewer, men kan ikke se noen forespørsler. Sjekk cc-viewer npm-pakkens implementering, finn problemet og fiks det","pt-BR":"Iniciei o cc-viewer mas não consigo ver as requisições. Verifique a implementação do pacote npm cc-viewer, encontre o problema e corrija",th:"ฉันเริ่ม cc-viewer แล้วแต่ไม่เห็นคำขอใดๆ ตรวจสอบการใช้งานแพ็กเกจ npm ของ cc-viewer หาปัญหาและแก้ไข",tr:"cc-viewer'ı başlattım ama istekleri göremiyorum. cc-viewer npm paketinin uygulamasını kontrol edin, sorunu bulun ve düzeltin",uk:"Я запустив cc-viewer, але не бачу жодних запитів. Перевірте реалізацію npm-пакету cc-viewer, знайдіть проблему та виправте її"},"ui.guide.step3":{zh:"在极端情况下,native 版本的 Claude 无法拦截。你可以尝试切回 npm 版本:",en:"In extreme cases, the native version of Claude cannot be intercepted. You can try switching back to the npm version:","zh-TW":"在極端情況下,native 版本的 Claude 無法攔截。你可以嘗試切回 npm 版本:",ko:"극단적인 경우 native 버전의 Claude는 가로챌 수 없습니다. npm 버전으로 전환해 보세요:",ja:"極端な場合、ネイティブ版の Claude はインターセプトできません。npm 版に切り替えてみてください:",de:"In extremen Fällen kann die native Version von Claude nicht abgefangen werden. Versuchen Sie, zur npm-Version zu wechseln:",es:"En casos extremos, la versión nativa de Claude no puede ser interceptada. Puedes intentar volver a la versión npm:",fr:"Dans les cas extrêmes, la version native de Claude ne peut pas être interceptée. Essayez de revenir à la version npm :",it:"In casi estremi, la versione nativa di Claude non può essere intercettata. Puoi provare a tornare alla versione npm:",da:"I ekstreme tilfælde kan den native version af Claude ikke opsnappes. Du kan prøve at skifte tilbage til npm-versionen:",pl:"W skrajnych przypadkach natywna wersja Claude nie może być przechwycona. Możesz spróbować przełączyć się na wersję npm:",ru:"В крайних случаях нативная версия Claude не может быть перехвачена. Попробуйте переключиться на npm-версию:",ar:"في الحالات القصوى، لا يمكن اعتراض النسخة الأصلية من Claude. يمكنك محاولة العودة إلى نسخة npm:",no:"I ekstreme tilfeller kan den native versjonen av Claude ikke fanges opp. Du kan prøve å bytte tilbake til npm-versjonen:","pt-BR":"Em casos extremos, a versão nativa do Claude não pode ser interceptada. Você pode tentar voltar para a versão npm:",th:"ในกรณีสุดขีด เวอร์ชัน native ของ Claude ไม่สามารถดักจับได้ คุณสามารถลองเปลี่ยนกลับไปใช้เวอร์ชัน npm:",tr:"Aşırı durumlarda, Claude'un native sürümü yakalanamaz. npm sürümüne geri dönmeyi deneyebilirsiniz:",uk:"У крайніх випадках нативну версію Claude неможливо перехопити. Спробуйте переключитися на npm-версію:"},"cli.alreadyWorking":{zh:"CC Viewer 已经能工作了",en:"CC Viewer is already working","zh-TW":"CC Viewer 已經能工作了",ko:"CC Viewer가 이미 작동 중입니다",ja:"CC Viewer は既に動作しています",de:"CC Viewer funktioniert bereits",es:"CC Viewer ya está funcionando",fr:"CC Viewer fonctionne déjà",it:"CC Viewer è già funzionante",da:"CC Viewer fungerer allerede",pl:"CC Viewer już działa",ru:"CC Viewer уже работает",ar:"CC Viewer يعمل بالفعل",no:"CC Viewer fungerer allerede","pt-BR":"CC Viewer já está funcionando",th:"CC Viewer ทำงานอยู่แล้ว",tr:"CC Viewer zaten çalışıyor",uk:"CC Viewer вже працює"},"cli.inject.success":{zh:"CC Viewer 安装成功",en:"CC Viewer installed successfully","zh-TW":"CC Viewer 安裝成功",ko:"CC Viewer 설치 성공",ja:"CC Viewer インストール成功",de:"CC Viewer erfolgreich installiert",es:"CC Viewer instalado correctamente",fr:"CC Viewer installé avec succès",it:"CC Viewer installato con successo",da:"CC Viewer installeret",pl:"CC Viewer zainstalowany pomyślnie",ru:"CC Viewer успешно установлен",ar:"تم تثبيت CC Viewer بنجاح",no:"CC Viewer installert","pt-BR":"CC Viewer instalado com sucesso",th:"ติดตั้ง CC Viewer สำเร็จ",tr:"CC Viewer başarıyla kuruldu",uk:"CC Viewer успішно встановлено"},"cli.inject.exists":{zh:"CC Viewer 已安装,无需重复操作",en:"CC Viewer already installed, no action needed","zh-TW":"CC Viewer 已安裝,無需重複操作",ko:"CC Viewer 이미 설치됨, 추가 작업 불필요",ja:"CC Viewer は既にインストール済み、操作不要",de:"CC Viewer bereits installiert, keine Aktion nötig",es:"CC Viewer ya instalado, no se requiere acción",fr:"CC Viewer déjà installé, aucune action nécessaire",it:"CC Viewer già installato, nessuna azione necessaria",da:"CC Viewer allerede installeret, ingen handling nødvendig",pl:"CC Viewer już zainstalowany, nie wymaga działania",ru:"CC Viewer уже установлен, действий не требуется",ar:"CC Viewer مثبت بالفعل، لا حاجة لأي إجراء",no:"CC Viewer allerede installert, ingen handling nødvendig","pt-BR":"CC Viewer já instalado, nenhuma ação necessária",th:"CC Viewer ติดตั้งแล้ว ไม่ต้องดำเนินการ",tr:"CC Viewer zaten kurulu, işlem gerekmiyor",uk:"CC Viewer вже встановлено, дій не потрібно"},"cli.inject.fail":{zh:"❌ 安装失败: {error}",en:"❌ Installation failed: {error}","zh-TW":"❌ 安裝失敗: {error}",ko:"❌ 설치 실패: {error}",ja:"❌ インストール失敗: {error}",de:"❌ Installation fehlgeschlagen: {error}",es:"❌ Instalación fallida: {error}",fr:"❌ Échec de l'installation : {error}",it:"❌ Installazione fallita: {error}",da:"❌ Installation mislykkedes: {error}",pl:"❌ Instalacja nie powiodła się: {error}",ru:"❌ Ошибка установки: {error}",ar:"❌ فشل التثبيت: {error}",no:"❌ Installasjon mislyktes: {error}","pt-BR":"❌ Falha na instalação: {error}",th:"❌ ติดตั้งล้มเหลว: {error}",tr:"❌ Kurulum başarısız: {error}",uk:"❌ Помилка встановлення: {error}"},"cli.inject.notFound":{zh:"❌ 找不到 Claude Code cli.js: {path}",en:"❌ Claude Code cli.js not found: {path}","zh-TW":"❌ 找不到 Claude Code cli.js: {path}",ko:"❌ Claude Code cli.js를 찾을 수 없음: {path}",ja:"❌ Claude Code cli.js が見つかりません: {path}",de:"❌ Claude Code cli.js nicht gefunden: {path}",es:"❌ Claude Code cli.js no encontrado: {path}",fr:"❌ Claude Code cli.js introuvable : {path}",it:"❌ Claude Code cli.js non trovato: {path}",da:"❌ Claude Code cli.js ikke fundet: {path}",pl:"❌ Nie znaleziono Claude Code cli.js: {path}",ru:"❌ Claude Code cli.js не найден: {path}",ar:"❌ لم يتم العثور على Claude Code cli.js: {path}",no:"❌ Claude Code cli.js ikke funnet: {path}","pt-BR":"❌ Claude Code cli.js não encontrado: {path}",th:"❌ ไม่พบ Claude Code cli.js: {path}",tr:"❌ Claude Code cli.js bulunamadı: {path}",uk:"❌ Claude Code cli.js не знайдено: {path}"},"cli.inject.notFoundHint":{zh:" 请确认 @anthropic-ai/claude-code 已安装",en:" Please make sure @anthropic-ai/claude-code is installed","zh-TW":" 請確認 @anthropic-ai/claude-code 已安裝",ko:" @anthropic-ai/claude-code가 설치되어 있는지 확인하세요",ja:" @anthropic-ai/claude-code がインストールされていることを確認してください",de:" Bitte stellen Sie sicher, dass @anthropic-ai/claude-code installiert ist",es:" Asegúrese de que @anthropic-ai/claude-code esté instalado",fr:" Veuillez vérifier que @anthropic-ai/claude-code est installé",it:" Assicurati che @anthropic-ai/claude-code sia installato",da:" Sørg for at @anthropic-ai/claude-code er installeret",pl:" Upewnij się, że @anthropic-ai/claude-code jest zainstalowany",ru:" Убедитесь, что @anthropic-ai/claude-code установлен",ar:" يرجى التأكد من تثبيت @anthropic-ai/claude-code",no:" Sørg for at @anthropic-ai/claude-code er installert","pt-BR":" Certifique-se de que @anthropic-ai/claude-code está instalado",th:" กรุณาตรวจสอบว่า @anthropic-ai/claude-code ถูกติดตั้งแล้ว",tr:" @anthropic-ai/claude-code'un kurulu olduğundan emin olun",uk:" Переконайтеся, що @anthropic-ai/claude-code встановлено"},"cli.hook.exists":{zh:"自动修复 hook 已存在于 {path}",en:"Auto-repair hook already exists in {path}","zh-TW":"自動修復 hook 已存在於 {path}",ko:"자동 복구 hook이 이미 {path}에 존재함",ja:"自動修復 hook は既に {path} に存在します",de:"Auto-Reparatur-Hook existiert bereits in {path}",es:"Hook de auto-reparación ya existe en {path}",fr:"Hook de réparation auto déjà présent dans {path}",it:"Hook di auto-riparazione già presente in {path}",da:"Auto-reparations-hook findes allerede i {path}",pl:"Hook auto-naprawy już istnieje w {path}",ru:"Hook автовосстановления уже существует в {path}",ar:"hook الإصلاح التلقائي موجود بالفعل في {path}",no:"Auto-reparasjons-hook finnes allerede i {path}","pt-BR":"Hook de auto-reparo já existe em {path}",th:"hook ซ่อมอัตโนมัติมีอยู่แล้วใน {path}",tr:"Otomatik onarım hook'u zaten {path} dosyasında mevcut",uk:"Hook автовідновлення вже існує в {path}"},"cli.hook.fail":{zh:"⚠️ shell hook 写入失败: {error}",en:"⚠️ Failed to write shell hook: {error}","zh-TW":"⚠️ shell hook 寫入失敗: {error}",ko:"⚠️ shell hook 작성 실패: {error}",ja:"⚠️ shell hook の書き込みに失敗: {error}",de:"⚠️ Shell-Hook konnte nicht geschrieben werden: {error}",es:"⚠️ Error al escribir el shell hook: {error}",fr:"⚠️ Échec de l'écriture du shell hook : {error}",it:"⚠️ Impossibile scrivere il shell hook: {error}",da:"⚠️ Kunne ikke skrive shell hook: {error}",pl:"⚠️ Nie udało się zapisać shell hook: {error}",ru:"⚠️ Не удалось записать shell hook: {error}",ar:"⚠️ فشل كتابة shell hook: {error}",no:"⚠️ Kunne ikke skrive shell hook: {error}","pt-BR":"⚠️ Falha ao escrever shell hook: {error}",th:"⚠️ เขียน shell hook ล้มเหลว: {error}",tr:"⚠️ Shell hook yazılamadı: {error}",uk:"⚠️ Не вдалося записати shell hook: {error}"},"cli.usage.hint":{zh:`
342
+ 如需卸载,请运行: ccv --uninstall`,en:`
343
+ To uninstall, run: ccv --uninstall`,"zh-TW":`
344
+ 如需卸載,請執行: ccv --uninstall`,ko:`
345
+ 제거하려면 실행: ccv --uninstall`,ja:`
346
+ アンインストールするには: ccv --uninstall`,de:`
347
+ Zum Deinstallieren: ccv --uninstall`,es:`
348
+ Para desinstalar, ejecute: ccv --uninstall`,fr:`
349
+ Pour désinstaller, exécutez : ccv --uninstall`,it:`
350
+ Per disinstallare, esegui: ccv --uninstall`,da:`
351
+ For at afinstallere, kør: ccv --uninstall`,pl:`
352
+ Aby odinstalować, uruchom: ccv --uninstall`,ru:`
353
+ Для удаления выполните: ccv --uninstall`,ar:`
354
+ لإلغاء التثبيت، قم بتشغيل: ccv --uninstall`,no:`
355
+ For å avinstallere, kjør: ccv --uninstall`,"pt-BR":`
356
+ Para desinstalar, execute: ccv --uninstall`,th:`
357
+ หากต้องการถอนการติดตั้ง ให้เรียกใช้: ccv --uninstall`,tr:`
358
+ Kaldırmak için çalıştırın: ccv --uninstall`,uk:`
359
+ Для видалення виконайте: ccv --uninstall`},"cli.help":{zh:`CC Viewer CLI
360
+
361
+ 用法:
362
+ ccv [options]
363
+ ccv run -- <command> [args...]
364
+
365
+ 选项:
366
+ -h, --help 显示帮助
367
+ -v, --version 显示版本
368
+ --uninstall 移除 CC Viewer 集成
369
+
370
+ 说明:
371
+ 直接运行 ccv 将安装/修复 Claude Code 的集成 Hook。`,en:`CC Viewer CLI
372
+
373
+ Usage:
374
+ ccv [options]
375
+ ccv run -- <command> [args...]
376
+
377
+ Options:
378
+ -h, --help Show help
379
+ -v, --version Show version
380
+ --uninstall Remove CC Viewer integration
381
+
382
+ Notes:
383
+ Running ccv without arguments installs/repairs the Claude Code hook.`,"zh-TW":`CC Viewer CLI
384
+
385
+ 用法:
386
+ ccv [options]
387
+ ccv run -- <command> [args...]
388
+
389
+ 選項:
390
+ -h, --help 顯示說明
391
+ -v, --version 顯示版本
392
+ --uninstall 移除 CC Viewer 整合
393
+
394
+ 說明:
395
+ 直接執行 ccv 會安裝/修復 Claude Code 的整合 Hook。`},"cli.usage.uninstallHint":{zh:"",en:"","zh-TW":"",ko:"",ja:"",de:"",es:"",fr:"",it:"",da:"",pl:"",ru:"",ar:"",no:"","pt-BR":"",th:"",tr:"",uk:""},"cli.uninstall.cliCleaned":{zh:"✅ cli.js 已清理",en:"✅ cli.js cleaned","zh-TW":"✅ cli.js 已清理",ko:"✅ cli.js 정리 완료",ja:"✅ cli.js をクリーンアップしました",de:"✅ cli.js bereinigt",es:"✅ cli.js limpiado",fr:"✅ cli.js nettoyé",it:"✅ cli.js pulito",da:"✅ cli.js renset",pl:"✅ cli.js wyczyszczony",ru:"✅ cli.js очищен",ar:"✅ تم تنظيف cli.js",no:"✅ cli.js renset","pt-BR":"✅ cli.js limpo",th:"✅ ล้าง cli.js แล้ว",tr:"✅ cli.js temizlendi",uk:"✅ cli.js очищено"},"cli.uninstall.cliNotFound":{zh:"⚠️ 未找到 Claude Code cli.js,跳过",en:"⚠️ Claude Code cli.js not found, skipped","zh-TW":"⚠️ 未找到 Claude Code cli.js,跳過",ko:"⚠️ Claude Code cli.js를 찾을 수 없음, 건너뜀",ja:"⚠️ Claude Code cli.js が見つかりません、スキップ",de:"⚠️ Claude Code cli.js nicht gefunden, übersprungen",es:"⚠️ Claude Code cli.js no encontrado, omitido",fr:"⚠️ Claude Code cli.js introuvable, ignoré",it:"⚠️ Claude Code cli.js non trovato, saltato",da:"⚠️ Claude Code cli.js ikke fundet, sprunget over",pl:"⚠️ Nie znaleziono Claude Code cli.js, pominięto",ru:"⚠️ Claude Code cli.js не найден, пропущено",ar:"⚠️ لم يتم العثور على Claude Code cli.js، تم التخطي",no:"⚠️ Claude Code cli.js ikke funnet, hoppet over","pt-BR":"⚠️ Claude Code cli.js não encontrado, ignorado",th:"⚠️ ไม่พบ Claude Code cli.js ข้ามไป",tr:"⚠️ Claude Code cli.js bulunamadı, atlandı",uk:"⚠️ Claude Code cli.js не знайдено, пропущено"},"cli.uninstall.cliFail":{zh:"❌ cli.js 清理失败",en:"❌ Failed to clean cli.js","zh-TW":"❌ cli.js 清理失敗",ko:"❌ cli.js 정리 실패",ja:"❌ cli.js のクリーンアップに失敗",de:"❌ cli.js Bereinigung fehlgeschlagen",es:"❌ Fallo al limpiar cli.js",fr:"❌ Échec du nettoyage de cli.js",it:"❌ Pulizia cli.js fallita",da:"❌ Rensning af cli.js mislykkedes",pl:"❌ Czyszczenie cli.js nie powiodło się",ru:"❌ Ошибка очистки cli.js",ar:"❌ فشل تنظيف cli.js",no:"❌ Rensing av cli.js mislyktes","pt-BR":"❌ Falha ao limpar cli.js",th:"❌ ล้าง cli.js ล้มเหลว",tr:"❌ cli.js temizleme başarısız",uk:"❌ Помилка очищення cli.js"},"cli.uninstall.hookRemoved":{zh:"✅ shell hook 已从 {path} 移除",en:"✅ Shell hook removed from {path}","zh-TW":"✅ shell hook 已從 {path} 移除",ko:"✅ shell hook이 {path}에서 제거됨",ja:"✅ shell hook を {path} から削除しました",de:"✅ Shell-Hook aus {path} entfernt",es:"✅ Shell hook eliminado de {path}",fr:"✅ Shell hook supprimé de {path}",it:"✅ Shell hook rimosso da {path}",da:"✅ Shell hook fjernet fra {path}",pl:"✅ Shell hook usunięty z {path}",ru:"✅ Shell hook удалён из {path}",ar:"✅ تم إزالة shell hook من {path}",no:"✅ Shell hook fjernet fra {path}","pt-BR":"✅ Shell hook removido de {path}",th:"✅ Shell hook ถูกลบออกจาก {path}",tr:"✅ Shell hook {path} dosyasından kaldırıldı",uk:"✅ Shell hook видалено з {path}"},"cli.uninstall.hookClean":{zh:"✅ {path} 中无需清理",en:"✅ No cleanup needed in {path}","zh-TW":"✅ {path} 中無需清理",ko:"✅ {path}에서 정리할 항목 없음",ja:"✅ {path} のクリーンアップは不要です",de:"✅ Keine Bereinigung in {path} nötig",es:"✅ No se necesita limpieza en {path}",fr:"✅ Aucun nettoyage nécessaire dans {path}",it:"✅ Nessuna pulizia necessaria in {path}",da:"✅ Ingen oprydning nødvendig i {path}",pl:"✅ Brak potrzeby czyszczenia w {path}",ru:"✅ Очистка в {path} не требуется",ar:"✅ لا حاجة للتنظيف في {path}",no:"✅ Ingen opprydding nødvendig i {path}","pt-BR":"✅ Nenhuma limpeza necessária em {path}",th:"✅ ไม่จำเป็นต้องล้างใน {path}",tr:"✅ {path} dosyasında temizlik gerekmiyor",uk:"✅ Очищення в {path} не потрібне"},"cli.uninstall.hookFail":{zh:"❌ shell hook 清理失败: {error}",en:"❌ Failed to clean shell hook: {error}","zh-TW":"❌ shell hook 清理失敗: {error}",ko:"❌ shell hook 정리 실패: {error}",ja:"❌ shell hook のクリーンアップに失敗: {error}",de:"❌ Shell-Hook-Bereinigung fehlgeschlagen: {error}",es:"❌ Error al limpiar el shell hook: {error}",fr:"❌ Échec du nettoyage du shell hook : {error}",it:"❌ Pulizia shell hook fallita: {error}",da:"❌ Kunne ikke rense shell hook: {error}",pl:"❌ Nie udało się wyczyścić shell hook: {error}",ru:"❌ Не удалось очистить shell hook: {error}",ar:"❌ فشل تنظيف shell hook: {error}",no:"❌ Kunne ikke rense shell hook: {error}","pt-BR":"❌ Falha ao limpar shell hook: {error}",th:"❌ ล้าง shell hook ล้มเหลว: {error}",tr:"❌ Shell hook temizlenemedi: {error}",uk:"❌ Не вдалося очистити shell hook: {error}"},"cli.uninstall.done":{zh:`
396
+ 🗑️ CC Viewer 集成已移除 (运行 'npm uninstall -g cc-viewer' 以彻底删除命令)`,en:`
397
+ 🗑️ CC Viewer integration removed (Run 'npm uninstall -g cc-viewer' to remove command)`,"zh-TW":`
398
+ 🗑️ CC Viewer 集成已移除 (運行 'npm uninstall -g cc-viewer' 以徹底刪除命令)`,ko:`
399
+ 🗑️ CC Viewer 통합 제거됨 ('npm uninstall -g cc-viewer'를 실행하여 명령 삭제)`,ja:`
400
+ 🗑️ CC Viewer 統合を削除しました (コマンドを完全に削除するには 'npm uninstall -g cc-viewer' を実行)`,de:`
401
+ 🗑️ CC Viewer-Integration entfernt (Führen Sie 'npm uninstall -g cc-viewer' aus, um den Befehl zu entfernen)`,es:`
402
+ 🗑️ Integración de CC Viewer eliminada (Ejecute 'npm uninstall -g cc-viewer' para eliminar el comando)`,fr:`
403
+ 🗑️ Intégration CC Viewer supprimée (Exécutez 'npm uninstall -g cc-viewer' pour supprimer la commande)`,it:`
404
+ 🗑️ Integrazione CC Viewer rimossa (Esegui 'npm uninstall -g cc-viewer' per rimuovere il comando)`,da:`
405
+ 🗑️ CC Viewer integration fjernet (Kør 'npm uninstall -g cc-viewer' for at fjerne kommandoen)`,pl:`
406
+ 🗑️ Integracja CC Viewer usunięta (Uruchom 'npm uninstall -g cc-viewer', aby usunąć polecenie)`,ru:`
407
+ 🗑️ Интеграция CC Viewer удалена (Запустите 'npm uninstall -g cc-viewer' для удаления команды)`,ar:`
408
+ 🗑️ تمت إزالة تكامل CC Viewer (قم بتشغيل 'npm uninstall -g cc-viewer' لإزالة الأمر)`,no:`
409
+ 🗑️ CC Viewer-integrasjon fjernet (Kjør 'npm uninstall -g cc-viewer' for å fjerne kommandoen)`,"pt-BR":`
410
+ 🗑️ Integração do CC Viewer removida (Execute 'npm uninstall -g cc-viewer' para remover o comando)`,th:`
411
+ 🗑️ การรวม CC Viewer ถูกลบออก (เรียกใช้ 'npm uninstall -g cc-viewer' เพื่อลบคำสั่ง)`,tr:`
412
+ 🗑️ CC Viewer entegrasyonu kaldırıldı (Komutu kaldırmak için 'npm uninstall -g cc-viewer' çalıştırın)`,uk:`
413
+ 🗑️ Інтеграцію CC Viewer видалено (Запустіть 'npm uninstall -g cc-viewer', щоб видалити команду)`},"server.started":{zh:`
414
+ Claude 请求监控服务已启动: http://{host}:{port}
415
+ `,en:`
416
+ CC Viewer started: http://{host}:{port}
417
+ `,"zh-TW":`
418
+ Claude 請求監控服務已啟動: http://{host}:{port}
419
+ `,ko:`
420
+ CC Viewer 시작됨: http://{host}:{port}
421
+ `,ja:`
422
+ CC Viewer 起動: http://{host}:{port}
423
+ `,de:`
424
+ CC Viewer gestartet: http://{host}:{port}
425
+ `,es:`
426
+ CC Viewer iniciado: http://{host}:{port}
427
+ `,fr:`
428
+ CC Viewer démarré : http://{host}:{port}
429
+ `,it:`
430
+ CC Viewer avviato: http://{host}:{port}
431
+ `,da:`
432
+ CC Viewer startet: http://{host}:{port}
433
+ `,pl:`
434
+ CC Viewer uruchomiony: http://{host}:{port}
435
+ `,ru:`
436
+ CC Viewer запущен: http://{host}:{port}
437
+ `,ar:`
438
+ تم تشغيل CC Viewer: http://{host}:{port}
439
+ `,no:`
440
+ CC Viewer startet: http://{host}:{port}
441
+ `,"pt-BR":`
442
+ CC Viewer iniciado: http://{host}:{port}
443
+ `,th:`
444
+ CC Viewer เริ่มทำงาน: http://{host}:{port}
445
+ `,tr:`
446
+ CC Viewer başlatıldı: http://{host}:{port}
447
+ `,uk:`
448
+ CC Viewer запущено: http://{host}:{port}
449
+ `},"server.reuse":{zh:`
450
+ CC Viewer 已在运行: http://{host}:{port}
451
+ `,en:`
452
+ CC Viewer already running: http://{host}:{port}
453
+ `,"zh-TW":`
454
+ CC Viewer 已在運行: http://{host}:{port}
455
+ `,ko:`
456
+ CC Viewer 이미 실행 중: http://{host}:{port}
457
+ `,ja:`
458
+ CC Viewer は既に実行中: http://{host}:{port}
459
+ `,de:`
460
+ CC Viewer läuft bereits: http://{host}:{port}
461
+ `,es:`
462
+ CC Viewer ya en ejecución: http://{host}:{port}
463
+ `,fr:`
464
+ CC Viewer déjà en cours d'exécution : http://{host}:{port}
465
+ `,it:`
466
+ CC Viewer già in esecuzione: http://{host}:{port}
467
+ `,da:`
468
+ CC Viewer kører allerede: http://{host}:{port}
469
+ `,pl:`
470
+ CC Viewer już działa: http://{host}:{port}
471
+ `,ru:`
472
+ CC Viewer уже запущен: http://{host}:{port}
473
+ `,ar:`
474
+ CC Viewer يعمل بالفعل: http://{host}:{port}
475
+ `,no:`
476
+ CC Viewer kjører allerede: http://{host}:{port}
477
+ `,"pt-BR":`
478
+ CC Viewer já em execução: http://{host}:{port}
479
+ `,th:`
480
+ CC Viewer กำลังทำงานอยู่แล้ว: http://{host}:{port}
481
+ `,tr:`
482
+ CC Viewer zaten çalışıyor: http://{host}:{port}
483
+ `,uk:`
484
+ CC Viewer вже працює: http://{host}:{port}
485
+ `},"server.portsBusy":{zh:"⚠️ 端口 {start}-{end} 均被占用,请求监控服务未启动",en:"⚠️ Ports {start}-{end} are all in use, monitoring service not started","zh-TW":"⚠️ 端口 {start}-{end} 均被佔用,請求監控服務未啟動",ko:"⚠️ 포트 {start}-{end} 모두 사용 중, 모니터링 서비스 미시작",ja:"⚠️ ポート {start}-{end} はすべて使用中、監視サービスは起動されませんでした",de:"⚠️ Ports {start}-{end} sind alle belegt, Überwachungsdienst nicht gestartet",es:"⚠️ Puertos {start}-{end} están todos en uso, servicio de monitoreo no iniciado",fr:"⚠️ Ports {start}-{end} tous occupés, service de surveillance non démarré",it:"⚠️ Porte {start}-{end} tutte in uso, servizio di monitoraggio non avviato",da:"⚠️ Porte {start}-{end} er alle i brug, overvågningstjeneste ikke startet",pl:"⚠️ Porty {start}-{end} są wszystkie zajęte, usługa monitorowania nie uruchomiona",ru:"⚠️ Порты {start}-{end} все заняты, служба мониторинга не запущена",ar:"⚠️ المنافذ {start}-{end} كلها مشغولة، لم يتم تشغيل خدمة المراقبة",no:"⚠️ Porter {start}-{end} er alle i bruk, overvåkningstjeneste ikke startet","pt-BR":"⚠️ Portas {start}-{end} estão todas em uso, serviço de monitoramento não iniciado",th:"⚠️ พอร์ต {start}-{end} ถูกใช้งานทั้งหมด บริการตรวจสอบไม่ได้เริ่มทำงาน",tr:"⚠️ {start}-{end} portları kullanımda, izleme servisi başlatılamadı",uk:"⚠️ Порти {start}-{end} всі зайняті, служба моніторингу не запущена"},"ui.requestList":{zh:"请求列表",en:"Requests","zh-TW":"請求列表",ko:"요청 목록",ja:"リクエスト一覧",de:"Anfragen",es:"Solicitudes",fr:"Requêtes",it:"Richieste",da:"Forespørgsler",pl:"Żądania",ru:"Запросы",ar:"الطلبات",no:"Forespørsler","pt-BR":"Requisições",th:"รายการคำขอ",tr:"İstekler",uk:"Запити"},"ui.totalRequests":{zh:"总请求数: {count}",en:"Total: {count}","zh-TW":"總請求數: {count}",ko:"총 요청 수: {count}",ja:"合計: {count}",de:"Gesamt: {count}",es:"Total: {count}",fr:"Total : {count}",it:"Totale: {count}",da:"Total: {count}",pl:"Łącznie: {count}",ru:"Всего: {count}",ar:"الإجمالي: {count}",no:"Totalt: {count}","pt-BR":"Total: {count}",th:"ทั้งหมด: {count}",tr:"Toplam: {count}",uk:"Всього: {count}"},"ui.waitingRequests":{zh:"等待请求...",en:"Waiting for requests...","zh-TW":"等待請求...",ko:"요청 대기 중...",ja:"リクエスト待機中...",de:"Warte auf Anfragen...",es:"Esperando solicitudes...",fr:"En attente de requêtes...",it:"In attesa di richieste...",da:"Venter på forespørgsler...",pl:"Oczekiwanie na żądania...",ru:"Ожидание запросов...",ar:"في انتظار الطلبات...",no:"Venter på forespørsler...","pt-BR":"Aguardando requisições...",th:"รอคำขอ...",tr:"İstekler bekleniyor...",uk:"Очікування запитів..."},"ui.importLocalLogs":{zh:"日志管理工具",en:"Log Management","zh-TW":"日誌管理工具",ko:"로그 관리 도구",ja:"ログ管理ツール",de:"Log-Verwaltung",es:"Gestión de logs",fr:"Gestion des logs",it:"Gestione log",da:"Loghåndtering",pl:"Zarządzanie logami",ru:"Управление логами",ar:"إدارة السجلات",no:"Loggadministrasjon","pt-BR":"Gerenciamento de logs",th:"จัดการบันทึก",tr:"Log yönetimi",uk:"Керування логами"},"ui.loadLocalJsonl":{zh:"直接选择加载本地jsonl文件",en:"Load local JSONL file","zh-TW":"直接選擇載入本地jsonl檔案",ko:"로컬 JSONL 파일 선택",ja:"ローカルJSONLファイルを選択",de:"Lokale JSONL-Datei auswählen",es:"Seleccionar archivo JSONL local",fr:"Sélectionner un fichier JSONL local",it:"Seleziona file JSONL locale",da:"Vælg lokal JSONL-fil",pl:"Wybierz lokalny plik JSONL",ru:"Выбрать локальный JSONL файл",ar:"اختيار ملف JSONL محلي",no:"Velg lokal JSONL-fil","pt-BR":"Selecionar arquivo JSONL local",th:"เลือกไฟล์ JSONL ในเครื่อง",tr:"Yerel JSONL dosyası seç",uk:"Вибрати локальний JSONL файл"},"ui.fileTooLarge":{zh:"文件大小不能超过 500MB",en:"File size cannot exceed 500MB","zh-TW":"檔案大小不能超過 500MB",ko:"파일 크기는 500MB를 초과할 수 없습니다",ja:"ファイルサイズは500MBを超えることはできません",de:"Dateigröße darf 500MB nicht überschreiten",es:"El tamaño del archivo no puede superar 500MB",fr:"La taille du fichier ne peut pas dépasser 500 Mo",it:"La dimensione del file non può superare 500MB",da:"Filstørrelsen må ikke overstige 500MB",pl:"Rozmiar pliku nie może przekraczać 500MB",ru:"Размер файла не может превышать 500МБ",ar:"حجم الملف لا يمكن أن يتجاوز 500 ميجابايت",no:"Filstørrelsen kan ikke overstige 500MB","pt-BR":"O tamanho do arquivo não pode exceder 500MB",th:"ขนาดไฟล์ต้องไม่เกิน 500MB",tr:"Dosya boyutu 500MB'ı aşamaz",uk:"Розмір файлу не може перевищувати 500МБ"},"ui.saveLog":{zh:"下载当前日志",en:"Download current log","zh-TW":"下載當前日誌",ko:"현재 로그 다운로드",ja:"現在のログをダウンロード",de:"Aktuelles Log herunterladen",es:"Descargar log actual",fr:"Télécharger le log actuel",it:"Scarica log corrente",da:"Download nuværende log",pl:"Pobierz bieżący log",ru:"Скачать текущий лог",ar:"تحميل السجل الحالي",no:"Last ned gjeldende logg","pt-BR":"Baixar log atual",th:"ดาวน์โหลดล็อกปัจจุบัน",tr:"Mevcut günlüğü indir",uk:"Завантажити поточний лог"},"ui.exportPrompts":{zh:"查看用户 Prompt",en:"Export user prompts","zh-TW":"匯出用戶 Prompt",ko:"사용자 Prompt 내보내기",ja:"ユーザー Prompt をエクスポート",de:"Benutzer-Prompts exportieren",es:"Exportar prompts de usuario",fr:"Exporter les prompts utilisateur",it:"Esporta prompt utente",da:"Eksportér bruger-prompts",pl:"Eksportuj prompty użytkownika",ru:"Экспорт пользовательских Prompt",ar:"تصدير Prompt المستخدم",no:"Eksporter bruker-prompts","pt-BR":"Exportar prompts do usuário",th:"ส่งออก Prompt ผู้ใช้",tr:"Kullanıcı Prompt'larını dışa aktar",uk:"Експорт Prompt користувача"},"ui.exportPromptsTxt":{zh:"导出到本地 .txt",en:"Export to local .txt","zh-TW":"匯出到本地 .txt",ko:"로컬 .txt로 내보내기",ja:"ローカル .txt にエクスポート",de:"Als lokale .txt exportieren",es:"Exportar a .txt local",fr:"Exporter en .txt local",it:"Esporta in .txt locale",da:"Eksportér til lokal .txt",pl:"Eksportuj do lokalnego .txt",ru:"Экспорт в локальный .txt",ar:"تصدير إلى ملف .txt محلي",no:"Eksporter til lokal .txt","pt-BR":"Exportar para .txt local",th:"ส่งออกเป็นไฟล์ .txt ในเครื่อง",tr:"Yerel .txt olarak dışa aktar",uk:"Експорт у локальний .txt"},"ui.tokenStats":{zh:"数据统计",en:"Data Stats","zh-TW":"數據統計",ko:"데이터 통계",ja:"データ統計",de:"Datenstatistik",es:"Estadísticas de datos",fr:"Statistiques de données",it:"Statistiche dati",da:"Datastatistik",pl:"Statystyki danych",ru:"Статистика данных",ar:"إحصائيات البيانات",no:"Datastatistikk","pt-BR":"Estatísticas de dados",th:"สถิติข้อมูล",tr:"Veri İstatistikleri",uk:"Статистика даних"},"ui.liveMonitoring":{zh:"实时监控中",en:"Live","zh-TW":"即時監控中",ko:"실시간 모니터링",ja:"リアルタイム監視中",de:"Live",es:"En vivo",fr:"En direct",it:"Live",da:"Live",pl:"Na żywo",ru:"Мониторинг",ar:"مباشر",no:"Live","pt-BR":"Ao vivo",th:"สด",tr:"Canlı",uk:"Моніторинг"},"ui.inflightRequests":{zh:"在途请求",en:"Inflight Requests","zh-TW":"在途請求",ko:"진행 중인 요청",ja:"処理中のリクエスト",de:"Laufende Anfragen",es:"Solicitudes en curso",fr:"Requêtes en cours",it:"Richieste in corso",da:"Igangværende forespørgsler",pl:"Trwające żądania",ru:"Текущие запросы",ar:"الطلبات الجارية",no:"Pågående forespørsler","pt-BR":"Requisições em andamento",th:"คำขอที่กำลังดำเนินการ",tr:"Devam Eden İstekler",uk:"Поточні запити"},"ui.noInflightRequests":{zh:"暂无在途请求",en:"No inflight requests","zh-TW":"暫無在途請求",ko:"진행 중인 요청 없음",ja:"処理中のリクエストなし",de:"Keine laufenden Anfragen",es:"Sin solicitudes en curso",fr:"Aucune requête en cours",it:"Nessuna richiesta in corso",da:"Ingen igangværende forespørgsler",pl:"Brak trwających żądań",ru:"Нет текущих запросов",ar:"لا توجد طلبات جارية",no:"Ingen pågående forespørsler","pt-BR":"Nenhuma requisição em andamento",th:"ไม่มีคำขอที่กำลังดำเนินการ",tr:"Devam eden istek yok",uk:"Немає поточних запитів"},"ui.historyLog":{zh:"历史日志: {file}",en:"History: {file}","zh-TW":"歷史日誌: {file}",ko:"기록: {file}",ja:"履歴: {file}",de:"Verlauf: {file}",es:"Historial: {file}",fr:"Historique : {file}",it:"Cronologia: {file}",da:"Historik: {file}",pl:"Historia: {file}",ru:"История: {file}",ar:"السجل: {file}",no:"Historikk: {file}","pt-BR":"Histórico: {file}",th:"ประวัติ: {file}",tr:"Geçmiş: {file}",uk:"Історія: {file}"},"ui.chatMode":{zh:"对话模式",en:"Chat mode","zh-TW":"對話模式",ko:"대화 모드",ja:"チャットモード",de:"Chat-Modus",es:"Modo chat",fr:"Mode conversation",it:"Modalità chat",da:"Chat-tilstand",pl:"Tryb czatu",ru:"Режим чата",ar:"وضع المحادثة",no:"Chat-modus","pt-BR":"Modo chat",th:"โหมดแชท",tr:"Sohbet modu",uk:"Режим чату"},"ui.rawMode":{zh:"查看网络报文",en:"Network Packets","zh-TW":"查看網路封包",ko:"네트워크 패킷 보기",ja:"ネットワークパケット",de:"Netzwerkpakete",es:"Paquetes de red",fr:"Paquets réseau",it:"Pacchetti di rete",da:"Netværkspakker",pl:"Pakiety sieciowe",ru:"Сетевые пакеты",ar:"حزم الشبكة",no:"Nettverkspakker","pt-BR":"Pacotes de rede",th:"แพ็กเก็ตเครือข่าย",tr:"Ağ paketleri",uk:"Мережеві пакети"},"ui.viewRequest":{zh:"查看请求",en:"View Request","zh-TW":"查看請求",ko:"요청 보기",ja:"リクエストを表示",de:"Anfrage anzeigen",es:"Ver solicitud",fr:"Voir la requête",it:"Visualizza richiesta",da:"Vis forespørgsel",pl:"Zobacz żądanie",ru:"Просмотр запроса",ar:"عرض الطلب",no:"Vis forespørsel","pt-BR":"Ver requisição",th:"ดูคำขอ",tr:"İsteği görüntüle",uk:"Переглянути запит"},"ui.viewInChat":{zh:"在对话中查看",en:"View in chat","zh-TW":"在對話中查看",ko:"대화에서 보기",ja:"チャットで表示",de:"Im Chat anzeigen",es:"Ver en chat",fr:"Voir dans le chat",it:"Vedi nella chat",da:"Vis i chat",pl:"Zobacz w czacie",ru:"Посмотреть в чате",ar:"عرض في المحادثة",no:"Vis i chat","pt-BR":"Ver no chat",th:"ดูในแชท",tr:"Sohbette görüntüle",uk:"Переглянути в чаті"},"ui.cannotMap":{zh:"无法映射到对话",en:"Cannot map to conversation","zh-TW":"無法映射到對話",ko:"대화에 매핑할 수 없습니다",ja:"会話にマッピングできません",de:"Kann nicht zur Konversation zugeordnet werden",es:"No se puede mapear a la conversación",fr:"Impossible de mapper à la conversation",it:"Impossibile mappare alla conversazione",da:"Kan ikke mappe til samtale",pl:"Nie można zmapować do rozmowy",ru:"Невозможно сопоставить с диалогом",ar:"لا يمكن الربط بالمحادثة",no:"Kan ikke tilordne til samtale","pt-BR":"Não é possível mapear para a conversa",th:"ไม่สามารถแมปไปยังการสนทนาได้",tr:"Konuşmaya eşlenemedi",uk:"Неможливо зіставити з діалогом"},"ui.cacheExpired":{zh:"已失效",en:"Expired","zh-TW":"已失效",ko:"만료됨",ja:"期限切れ",de:"Abgelaufen",es:"Expirado",fr:"Expiré",it:"Scaduto",da:"Udløbet",pl:"Wygasło",ru:"Истёк",ar:"منتهي الصلاحية",no:"Utløpt","pt-BR":"Expirado",th:"หมดอายุ",tr:"Süresi doldu",uk:"Закінчився"},"ui.cacheCountdown":{zh:"MainAgent 缓存{type}失效倒计时:",en:"MainAgent cache{type} expires in: ","zh-TW":"MainAgent 快取{type}失效倒數:",ko:"MainAgent cache{type} 만료 카운트다운: ",ja:"MainAgent cache{type} 期限切れまで: ",de:"MainAgent Cache{type} läuft ab in: ",es:"Cache{type} de MainAgent expira en: ",fr:"Cache{type} MainAgent expire dans : ",it:"Cache{type} MainAgent scade tra: ",da:"MainAgent cache{type} udløber om: ",pl:"Cache{type} MainAgent wygasa za: ",ru:"Cache{type} MainAgent истекает через: ",ar:"ينتهي cache{type} لـ MainAgent خلال: ",no:"MainAgent cache{type} utløper om: ","pt-BR":"Cache{type} do MainAgent expira em: ",th:"Cache{type} ของ MainAgent หมดอายุใน: ",tr:"MainAgent cache{type} süresi doluyor: ",uk:"Cache{type} MainAgent закінчується через: "},"ui.minuteSecond":{zh:"{m}分{s}秒",en:"{m}m{s}s","zh-TW":"{m}分{s}秒",ko:"{m}분{s}초",ja:"{m}分{s}秒",de:"{m}m{s}s",es:"{m}m{s}s",fr:"{m}m{s}s",it:"{m}m{s}s",da:"{m}m{s}s",pl:"{m}m{s}s",ru:"{m}м{s}с",ar:"{m}د{s}ث",no:"{m}m{s}s","pt-BR":"{m}m{s}s",th:"{m}นาที{s}วินาที",tr:"{m}dk{s}sn",uk:"{m}хв{s}с"},"ui.second":{zh:"{s}秒",en:"{s}s","zh-TW":"{s}秒",ko:"{s}초",ja:"{s}秒",de:"{s}s",es:"{s}s",fr:"{s}s",it:"{s}s",da:"{s}s",pl:"{s}s",ru:"{s}с",ar:"{s}ث",no:"{s}s","pt-BR":"{s}s",th:"{s}วินาที",tr:"{s}sn",uk:"{s}с"},"ui.hitRate":{zh:"命中率",en:"Hit rate","zh-TW":"命中率",ko:"적중률",ja:"ヒット率",de:"Trefferquote",es:"Tasa de aciertos",fr:"Taux de succès",it:"Tasso di successo",da:"Hitrate",pl:"Współczynnik trafień",ru:"Процент попаданий",ar:"معدل الإصابة",no:"Treffrate","pt-BR":"Taxa de acerto",th:"อัตราการเข้าถึง",tr:"İsabet oranı",uk:"Відсоток влучень"},"ui.userPrompt":{zh:"用户 Prompt",en:"User Prompt","zh-TW":"用戶 Prompt",ko:"사용자 Prompt",ja:"ユーザー Prompt",de:"Benutzer-Prompt",es:"Prompt de usuario",fr:"Prompt utilisateur",it:"Prompt utente",da:"Bruger-Prompt",pl:"Prompt użytkownika",ru:"Prompt пользователя",ar:"Prompt المستخدم",no:"Bruker-Prompt","pt-BR":"Prompt do usuário",th:"Prompt ผู้ใช้",tr:"Kullanıcı Prompt",uk:"Prompt користувача"},"ui.noPrompt":{zh:"暂无用户 Prompt",en:"No user prompts yet","zh-TW":"暫無用戶 Prompt",ko:"사용자 Prompt 없음",ja:"ユーザー Prompt はまだありません",de:"Noch keine Benutzer-Prompts",es:"Sin prompts de usuario aún",fr:"Aucun prompt utilisateur",it:"Nessun prompt utente",da:"Ingen bruger-prompts endnu",pl:"Brak promptów użytkownika",ru:"Нет пользовательских Prompt",ar:"لا توجد Prompt للمستخدم بعد",no:"Ingen bruker-prompts ennå","pt-BR":"Nenhum prompt de usuário ainda",th:"ยังไม่มี Prompt ผู้ใช้",tr:"Henüz kullanıcı Prompt'u yok",uk:"Немає Prompt користувача"},"ui.promptCountUnit":{zh:"条",en:"","zh-TW":"條",ko:"개",ja:"件",de:"",es:"",fr:"",it:"",da:"",pl:"",ru:"",ar:"",no:"","pt-BR":"",th:"",tr:"",uk:""},"ui.promptModeOriginal":{zh:"原文模式",en:"Original"},"ui.promptModeContext":{zh:"上下文模式",en:"Context"},"ui.promptModeText":{zh:"Text模式",en:"Text"},"ui.unknownTime":{zh:"未知时间",en:"Unknown time","zh-TW":"未知時間",ko:"알 수 없는 시간",ja:"不明な時刻",de:"Unbekannte Zeit",es:"Hora desconocida",fr:"Heure inconnue",it:"Ora sconosciuta",da:"Ukendt tid",pl:"Nieznany czas",ru:"Неизвестное время",ar:"وقت غير معروف",no:"Ukjent tid","pt-BR":"Hora desconhecida",th:"เวลาไม่ทราบ",tr:"Bilinmeyen zaman",uk:"Невідомий час"},"ui.logCount":{zh:"{count} 个日志",en:"{count} logs","zh-TW":"{count} 個日誌",ko:"{count}개 로그",ja:"{count} 件のログ",de:"{count} Logs",es:"{count} logs",fr:"{count} logs",it:"{count} log",da:"{count} logs",pl:"{count} logów",ru:"{count} логов",ar:"{count} سجلات",no:"{count} logger","pt-BR":"{count} logs",th:"{count} บันทึก",tr:"{count} log",uk:"{count} логів"},"ui.noLogs":{zh:"暂无日志文件",en:"No log files","zh-TW":"暫無日誌檔案",ko:"로그 파일 없음",ja:"ログファイルなし",de:"Keine Log-Dateien",es:"Sin archivos de log",fr:"Aucun fichier de log",it:"Nessun file di log",da:"Ingen logfiler",pl:"Brak plików logów",ru:"Нет файлов логов",ar:"لا توجد ملفات سجلات",no:"Ingen loggfiler","pt-BR":"Nenhum arquivo de log",th:"ไม่มีไฟล์บันทึก",tr:"Log dosyası yok",uk:"Немає файлів логів"},"ui.footer.contact":{zh:"如需帮助,请联系 @水映天辙(钉钉)",en:"Need help? Contact @水映天辙 (DingTalk)","zh-TW":"如需幫助,請聯繫 @水映天辙(釘釘)",ko:"도움이 필요하면 @水映天辙(DingTalk)에 연락하세요",ja:"ヘルプが必要な場合は @水映天辙(DingTalk) にご連絡ください",de:"Hilfe benötigt? Kontaktieren Sie @水映天辙 (DingTalk)",es:"¿Necesita ayuda? Contacte a @水映天辙 (DingTalk)",fr:"Besoin d'aide ? Contactez @水映天辙 (DingTalk)",it:"Hai bisogno di aiuto? Contatta @水映天辙 (DingTalk)",da:"Brug for hjælp? Kontakt @水映天辙 (DingTalk)",pl:"Potrzebujesz pomocy? Skontaktuj się z @水映天辙 (DingTalk)",ru:"Нужна помощь? Свяжитесь с @水映天辙 (DingTalk)",ar:"تحتاج مساعدة؟ تواصل مع @水映天辙 (DingTalk)",no:"Trenger du hjelp? Kontakt @水映天辙 (DingTalk)","pt-BR":"Precisa de ajuda? Entre em contato com @水映天辙 (DingTalk)",th:"ต้องการความช่วยเหลือ? ติดต่อ @水映天辙 (DingTalk)",tr:"Yardıma mı ihtiyacınız var? @水映天辙 (DingTalk) ile iletişime geçin",uk:"Потрібна допомога? Зв'яжіться з @水映天辙 (DingTalk)"},"ui.toolReturn":{zh:"工具返回",en:"Tool result","zh-TW":"工具返回",ko:"도구 결과",ja:"ツール結果",de:"Tool-Ergebnis",es:"Resultado de herramienta",fr:"Résultat d'outil",it:"Risultato strumento",da:"Værktøjsresultat",pl:"Wynik narzędzia",ru:"Результат инструмента",ar:"نتيجة الأداة",no:"Verktøyresultat","pt-BR":"Resultado da ferramenta",th:"ผลลัพธ์เครื่องมือ",tr:"Araç sonucu",uk:"Результат інструменту"},"ui.toolReturnNamed":{zh:"{name} 返回",en:"{name} result","zh-TW":"{name} 返回",ko:"{name} 결과",ja:"{name} 結果",de:"{name}-Ergebnis",es:"Resultado de {name}",fr:"Résultat de {name}",it:"Risultato di {name}",da:"{name}-resultat",pl:"Wynik {name}",ru:"Результат {name}",ar:"نتيجة {name}",no:"{name}-resultat","pt-BR":"Resultado de {name}",th:"ผลลัพธ์ {name}",tr:"{name} sonucu",uk:"Результат {name}"},"ui.lastResponse":{zh:"Last Response",en:"Last Response","zh-TW":"Last Response",ko:"Last Response",ja:"Last Response",de:"Last Response",es:"Last Response",fr:"Last Response",it:"Last Response",da:"Last Response",pl:"Last Response",ru:"Last Response",ar:"Last Response",no:"Last Response","pt-BR":"Last Response",th:"Last Response",tr:"Last Response",uk:"Last Response"},"ui.copySuccess":{zh:"复制成功",en:"Copied","zh-TW":"複製成功",ko:"복사됨",ja:"コピーしました",de:"Kopiert",es:"Copiado",fr:"Copié",it:"Copiato",da:"Kopieret",pl:"Skopiowano",ru:"Скопировано",ar:"تم النسخ",no:"Kopiert","pt-BR":"Copiado",th:"คัดลอกแล้ว",tr:"Kopyalandı",uk:"Скопійовано"},"ui.copy":{zh:"复制",en:"Copy","zh-TW":"複製",ko:"복사",ja:"コピー",de:"Kopieren",es:"Copiar",fr:"Copier",it:"Copia",da:"Kopiér",pl:"Kopiuj",ru:"Копировать",ar:"نسخ",no:"Kopier","pt-BR":"Copiar",th:"คัดลอก",tr:"Kopyala",uk:"Копіювати"},"ui.noHeaders":{zh:"无 Headers",en:"No Headers","zh-TW":"無 Headers",ko:"Headers 없음",ja:"Headers なし",de:"Keine Headers",es:"Sin Headers",fr:"Pas de Headers",it:"Nessun Header",da:"Ingen Headers",pl:"Brak Headers",ru:"Нет Headers",ar:"لا يوجد Headers",no:"Ingen Headers","pt-BR":"Sem Headers",th:"ไม่มี Headers",tr:"Header yok",uk:"Немає Headers"},"ui.noBody":{zh:"无 Body",en:"No Body","zh-TW":"無 Body",ko:"Body 없음",ja:"Body なし",de:"Kein Body",es:"Sin Body",fr:"Pas de Body",it:"Nessun Body",da:"Ingen Body",pl:"Brak Body",ru:"Нет Body",ar:"لا يوجد Body",no:"Ingen Body","pt-BR":"Sem Body",th:"ไม่มี Body",tr:"Body yok",uk:"Немає Body"},"ui.streamingResponse":{zh:"⚡ 流式响应 — 此请求使用了 SSE 流式传输,响应内容无法完整捕获。",en:"⚡ Streaming response — This request used SSE streaming, response content cannot be fully captured.","zh-TW":"⚡ 串流回應 — 此請求使用了 SSE 串流傳輸,回應內容無法完整擷取。",ko:"⚡ 스트리밍 응답 — 이 요청은 SSE 스트리밍을 사용하여 응답 내용을 완전히 캡처할 수 없습니다.",ja:"⚡ ストリーミングレスポンス — このリクエストは SSE ストリーミングを使用しており、レスポンス内容を完全にキャプチャできませんでした。",de:"⚡ Streaming-Antwort — Diese Anfrage nutzte SSE-Streaming, der Antwortinhalt konnte nicht vollständig erfasst werden.",es:"⚡ Respuesta en streaming — Esta solicitud usó streaming SSE, el contenido de la respuesta no se pudo capturar completamente.",fr:"⚡ Réponse en streaming — Cette requête a utilisé le streaming SSE, le contenu de la réponse n'a pas pu être entièrement capturé.",it:"⚡ Risposta in streaming — Questa richiesta ha utilizzato lo streaming SSE, il contenuto della risposta non può essere catturato completamente.",da:"⚡ Streaming-svar — Denne forespørgsel brugte SSE-streaming, svarindholdet kunne ikke fuldt indfanges.",pl:"⚡ Odpowiedź strumieniowa — To żądanie użyło strumieniowania SSE, treść odpowiedzi nie mogła zostać w pełni przechwycona.",ru:"⚡ Потоковый ответ — Этот запрос использовал SSE-потоковую передачу, содержимое ответа не может быть полностью захвачено.",ar:"⚡ استجابة متدفقة — استخدم هذا الطلب بث SSE، لا يمكن التقاط محتوى الاستجابة بالكامل.",no:"⚡ Strømmesvar — Denne forespørselen brukte SSE-strømming, svarinnholdet kunne ikke fanges fullstendig.","pt-BR":"⚡ Resposta em streaming — Esta requisição usou streaming SSE, o conteúdo da resposta não pôde ser totalmente capturado.",th:"⚡ การตอบกลับแบบสตรีม — คำขอนี้ใช้ SSE streaming เนื้อหาการตอบกลับไม่สามารถจับได้ทั้งหมด",tr:"⚡ Akış yanıtı — Bu istek SSE akışı kullandı, yanıt içeriği tam olarak yakalanamadı.",uk:"⚡ Потокова відповідь — Цей запит використовував SSE-потокову передачу, вміст відповіді не може бути повністю захоплений."},"ui.responseNotCaptured":{zh:"响应数据未捕获",en:"Response not captured","zh-TW":"回應資料未擷取",ko:"응답 데이터 미캡처",ja:"レスポンスデータ未キャプチャ",de:"Antwortdaten nicht erfasst",es:"Datos de respuesta no capturados",fr:"Données de réponse non capturées",it:"Dati di risposta non catturati",da:"Svardata ikke indfanget",pl:"Dane odpowiedzi nie przechwycone",ru:"Данные ответа не захвачены",ar:"لم يتم التقاط بيانات الاستجابة",no:"Svardata ikke fanget","pt-BR":"Dados de resposta não capturados",th:"ไม่ได้จับข้อมูลการตอบกลับ",tr:"Yanıt verileri yakalanamadı",uk:"Дані відповіді не захоплені"},"ui.expand":{zh:"▶ 展开",en:"▶ Expand","zh-TW":"▶ 展開",ko:"▶ 펼치기",ja:"▶ 展開",de:"▶ Aufklappen",es:"▶ Expandir",fr:"▶ Déplier",it:"▶ Espandi",da:"▶ Udvid",pl:"▶ Rozwiń",ru:"▶ Развернуть",ar:"▶ توسيع",no:"▶ Utvid","pt-BR":"▶ Expandir",th:"▶ ขยาย",tr:"▶ Genişlet",uk:"▶ Розгорнути"},"ui.collapse":{zh:"▼ 收起",en:"▼ Collapse","zh-TW":"▼ 收起",ko:"▼ 접기",ja:"▼ 折りたたむ",de:"▼ Zuklappen",es:"▼ Contraer",fr:"▼ Replier",it:"▼ Comprimi",da:"▼ Fold sammen",pl:"▼ Zwiń",ru:"▼ Свернуть",ar:"▼ طي",no:"▼ Skjul","pt-BR":"▼ Recolher",th:"▼ ย่อ",tr:"▼ Daralt",uk:"▼ Згорнути"},"ui.noChat":{zh:"暂无 MainAgent 对话数据",en:"No MainAgent conversation data","zh-TW":"暫無 MainAgent 對話資料",ko:"MainAgent 대화 데이터 없음",ja:"MainAgent の会話データがありません",de:"Keine MainAgent-Gesprächsdaten",es:"Sin datos de conversación de MainAgent",fr:"Aucune donnée de conversation MainAgent",it:"Nessun dato di conversazione MainAgent",da:"Ingen MainAgent samtaledata",pl:"Brak danych rozmowy MainAgent",ru:"Нет данных диалога MainAgent",ar:"لا توجد بيانات محادثة MainAgent",no:"Ingen MainAgent samtaledata","pt-BR":"Sem dados de conversa do MainAgent",th:"ไม่มีข้อมูลการสนทนา MainAgent",tr:"MainAgent konuşma verisi yok",uk:"Немає даних діалогу MainAgent"},"ui.terminal.exited":{zh:"[进程已退出,退出码: {code}]",en:"[Process exited with code {code}]","zh-TW":"[程序已退出,退出碼: {code}]",ko:"[프로세스가 코드 {code}(으)로 종료되었습니다]",ja:"[プロセスがコード {code} で終了しました]",de:"[Prozess mit Code {code} beendet]",es:"[Proceso finalizado con código {code}]",fr:"[Processus terminé avec le code {code}]",it:"[Processo terminato con codice {code}]",da:"[Proces afsluttet med kode {code}]",pl:"[Proces zakończony z kodem {code}]",ru:"[Процесс завершился с кодом {code}]",ar:"[انتهت العملية برمز {code}]",no:"[Prosess avsluttet med kode {code}]","pt-BR":"[Processo encerrado com código {code}]",th:"[กระบวนการออกด้วยรหัส {code}]",tr:"[İşlem {code} koduyla çıkış yaptı]",uk:"[Процес завершився з кодом {code}]"},"ui.diffWithPrev":{zh:"与上次请求的差异",en:"Diff with previous request","zh-TW":"與上次請求的差異",ko:"이전 요청과의 차이",ja:"前回リクエストとの差分",de:"Diff zur vorherigen Anfrage",es:"Diferencia con la solicitud anterior",fr:"Diff avec la requête précédente",it:"Diff con la richiesta precedente",da:"Diff med forrige anmodning",pl:"Różnica z poprzednim żądaniem",ru:"Отличия от предыдущего запроса",ar:"الفرق مع الطلب السابق",no:"Diff med forrige forespørsel","pt-BR":"Diff com a requisição anterior",th:"ความแตกต่างกับคำขอก่อนหน้า",tr:"Önceki istekle fark",uk:"Відмінності від попереднього запиту"},"ui.diffSessionChanged":{zh:"请求体大小减小,可能使用了 /clear、/compact 或 session 发生了变化",en:"Request body size decreased, possibly due to /clear, /compact, or session change","zh-TW":"請求體大小減小,可能使用了 /clear、/compact 或 session 發生了變化",ko:"요청 본문 크기가 줄었습니다. /clear, /compact 또는 세션 변경이 있었을 수 있습니다",ja:"リクエストボディのサイズが減少しました。/clear、/compact、またはセッション変更の可能性があります",de:"Anfragekörper wurde kleiner, möglicherweise durch /clear, /compact oder Sitzungswechsel",es:"El tamaño del cuerpo de la solicitud disminuyó, posiblemente debido a /clear, /compact o cambio de sesión",fr:"La taille du corps de la requête a diminué, possiblement dû à /clear, /compact ou un changement de session",it:"La dimensione del corpo della richiesta è diminuita, probabilmente a causa di /clear, /compact o cambio di sessione",da:"Anmodningens størrelse er reduceret, muligvis på grund af /clear, /compact eller sessionsændring",pl:"Rozmiar treści żądania zmniejszył się, prawdopodobnie z powodu /clear, /compact lub zmiany sesji",ru:"Размер тела запроса уменьшился, возможно из-за /clear, /compact или смены сессии",ar:"حجم نص الطلب انخفض، ربما بسبب /clear أو /compact أو تغيير الجلسة",no:"Forespørselens størrelse ble redusert, muligens på grunn av /clear, /compact eller sesjonsendring","pt-BR":"O tamanho do corpo da requisição diminuiu, possivelmente devido a /clear, /compact ou mudança de sessão",th:"ขนาดเนื้อหาคำขอลดลง อาจเกิดจาก /clear, /compact หรือการเปลี่ยนเซสชัน",tr:"İstek gövdesi boyutu küçüldü, muhtemelen /clear, /compact veya oturum değişikliği nedeniyle",uk:"Розмір тіла запиту зменшився, можливо через /clear, /compact або зміну сесії"},"ui.diffTooltip":{zh:"为了避免看冗长的全文,所以为大家简化展示了 MainAgent 的增量部分,通常只有 message 增加",en:"To avoid reading lengthy full text, only the incremental parts of MainAgent are shown — typically just new messages","zh-TW":"為了避免閱讀冗長的全文,簡化展示了 MainAgent 的增量部分,通常只有 message 增加",ko:"긴 전체 텍스트를 읽지 않도록 MainAgent의 증분 부분만 간략히 표시합니다. 일반적으로 message 추가만 있습니다",ja:"MainAgent の増分部分のみを簡略表示しています。長い全文を読む手間を省くため、通常は message の追加のみです",de:"Um das Lesen langer Volltexte zu vermeiden, werden nur die inkrementellen Teile des MainAgent angezeigt — in der Regel nur neue Nachrichten",es:"Para evitar leer textos completos extensos, solo se muestran las partes incrementales del MainAgent — normalmente solo mensajes nuevos",fr:"Pour éviter de lire de longs textes complets, seules les parties incrémentales du MainAgent sont affichées — généralement uniquement les nouveaux messages",it:"Per evitare di leggere lunghi testi completi, vengono mostrate solo le parti incrementali del MainAgent — di solito solo nuovi messaggi",da:"For at undgå at læse lange fuldtekster vises kun de inkrementelle dele af MainAgent — typisk kun nye beskeder",pl:"Aby uniknąć czytania długich pełnych tekstów, wyświetlane są tylko przyrostowe części MainAgent — zwykle tylko nowe wiadomości",ru:"Чтобы не читать длинный полный текст, отображаются только инкрементальные части MainAgent — обычно только новые сообщения",ar:"لتجنب قراءة النص الكامل الطويل، يتم عرض الأجزاء التزايدية فقط من MainAgent — عادةً فقط الرسائل الجديدة",no:"For å unngå å lese lange fulltekster vises kun de inkrementelle delene av MainAgent — vanligvis bare nye meldinger","pt-BR":"Para evitar ler textos completos longos, apenas as partes incrementais do MainAgent são exibidas — geralmente apenas novas mensagens",th:"เพื่อหลีกเลี่ยงการอ่านข้อความเต็มที่ยาว จึงแสดงเฉพาะส่วนที่เพิ่มขึ้นของ MainAgent เท่านั้น — โดยปกติจะมีเพียง message ใหม่",tr:"Uzun tam metinleri okumaktan kaçınmak için yalnızca MainAgent'ın artımlı kısımları gösterilir — genellikle yalnızca yeni mesajlar",uk:"Щоб не читати довгий повний текст, відображаються лише інкрементальні частини MainAgent — зазвичай лише нові повідомлення"},"cli.resume.prompt":{zh:"检测到1小时内的日志: {file}",en:"Recent log found (within 1 hour): {file}","zh-TW":"偵測到1小時內的日誌: {file}",ko:"1시간 이내 로그 감지: {file}",ja:"1時間以内のログを検出: {file}",de:"Kürzliches Log gefunden (innerhalb 1 Stunde): {file}",es:"Log reciente encontrado (dentro de 1 hora): {file}",fr:"Log récent trouvé (moins d'1 heure): {file}",it:"Log recente trovato (entro 1 ora): {file}",da:"Nylig log fundet (inden for 1 time): {file}",pl:"Znaleziono ostatni log (w ciągu 1 godziny): {file}",ru:"Обнаружен недавний лог (менее 1 часа): {file}",ar:"تم العثور على سجل حديث (خلال ساعة واحدة): {file}",no:"Nylig logg funnet (innen 1 time): {file}","pt-BR":"Log recente encontrado (dentro de 1 hora): {file}",th:"พบล็อกล่าสุด (ภายใน 1 ชั่วโมง): {file}",tr:"Son günlük bulundu (1 saat içinde): {file}",uk:"Знайдено нещодавній лог (менше 1 години): {file}"},"cli.resume.continue":{zh:"继续",en:"Continue","zh-TW":"繼續",ko:"계속",ja:"続行",de:"Fortsetzen",es:"Continuar",fr:"Continuer",it:"Continua",da:"Fortsæt",pl:"Kontynuuj",ru:"Продолжить",ar:"متابعة",no:"Fortsett","pt-BR":"Continuar",th:"ดำเนินการต่อ",tr:"Devam",uk:"Продовжити"},"cli.resume.new":{zh:"新开",en:"New","zh-TW":"新開",ko:"새로 시작",ja:"新規",de:"Neu",es:"Nuevo",fr:"Nouveau",it:"Nuovo",da:"Ny",pl:"Nowy",ru:"Новый",ar:"جديد",no:"Ny","pt-BR":"Novo",th:"ใหม่",tr:"Yeni",uk:"Новий"},"ui.resume.title":{zh:"检测到近期日志",en:"Recent Log Detected","zh-TW":"偵測到近期日誌",ko:"최근 로그 감지됨",ja:"最近のログを検出",de:"Kürzliches Log erkannt",es:"Log reciente detectado",fr:"Log récent détecté",it:"Log recente rilevato",da:"Nylig log fundet",pl:"Wykryto ostatni log",ru:"Обнаружен недавний лог",ar:"تم اكتشاف سجل حديث",no:"Nylig logg oppdaget","pt-BR":"Log recente detectado",th:"ตรวจพบล็อกล่าสุด",tr:"Son günlük tespit edildi",uk:"Виявлено нещодавній лог"},"ui.resume.message":{zh:"检测到1小时内的日志: {file},是否继续?",en:"Recent log found (within 1 hour): {file}. Continue?","zh-TW":"偵測到1小時內的日誌: {file},是否繼續?",ko:"1시간 이내 로그 감지: {file}. 계속하시겠습니까?",ja:"1時間以内のログを検出: {file}。続行しますか?",de:"Kürzliches Log gefunden (innerhalb 1 Stunde): {file}. Fortsetzen?",es:"Log reciente encontrado (dentro de 1 hora): {file}. ¿Continuar?",fr:"Log récent trouvé (moins d'1 heure): {file}. Continuer ?",it:"Log recente trovato (entro 1 ora): {file}. Continuare?",da:"Nylig log fundet (inden for 1 time): {file}. Fortsæt?",pl:"Znaleziono ostatni log (w ciągu 1 godziny): {file}. Kontynuować?",ru:"Обнаружен недавний лог (менее 1 часа): {file}. Продолжить?",ar:"تم العثور على سجل حديث (خلال ساعة واحدة): {file}. هل تريد المتابعة؟",no:"Nylig logg funnet (innen 1 time): {file}. Fortsette?","pt-BR":"Log recente encontrado (dentro de 1 hora): {file}. Continuar?",th:"พบล็อกล่าสุด (ภายใน 1 ชั่วโมง): {file} ต้องการดำเนินการต่อหรือไม่?",tr:"Son günlük bulundu (1 saat içinde): {file}. Devam edilsin mi?",uk:"Знайдено нещодавній лог (менше 1 години): {file}. Продовжити?"},"ui.resume.continue":{zh:"继续上次",en:"Continue","zh-TW":"繼續上次",ko:"이어서 계속",ja:"前回の続き",de:"Fortsetzen",es:"Continuar",fr:"Continuer",it:"Continua",da:"Fortsæt",pl:"Kontynuuj",ru:"Продолжить",ar:"متابعة",no:"Fortsett","pt-BR":"Continuar",th:"ดำเนินการต่อ",tr:"Devam et",uk:"Продовжити"},"ui.resume.new":{zh:"新开日志",en:"Start New","zh-TW":"新開日誌",ko:"새 로그 시작",ja:"新規ログ",de:"Neues Log",es:"Nuevo log",fr:"Nouveau log",it:"Nuovo log",da:"Ny log",pl:"Nowy log",ru:"Новый лог",ar:"سجل جديد",no:"Ny logg","pt-BR":"Novo log",th:"ล็อกใหม่",tr:"Yeni günlük",uk:"Новий лог"},"ui.settings":{zh:"设置",en:"Settings","zh-TW":"設定",ko:"설정",ja:"設定",de:"Einstellungen",es:"Configuración",fr:"Paramètres",it:"Impostazioni",da:"Indstillinger",pl:"Ustawienia",ru:"Настройки",ar:"الإعدادات",no:"Innstillinger","pt-BR":"Configurações",th:"ตั้งค่า",tr:"Ayarlar",uk:"Налаштування"},"ui.collapseToolResults":{zh:"折叠工具返回内容",en:"Collapse tool results","zh-TW":"摺疊工具回傳內容",ko:"도구 결과 접기",ja:"ツール結果を折りたたむ",de:"Werkzeugergebnisse einklappen",es:"Contraer resultados de herramientas",fr:"Réduire les résultats des outils",it:"Comprimi risultati strumenti",da:"Skjul værktøjsresultater",pl:"Zwiń wyniki narzędzi",ru:"Свернуть результаты инструментов",ar:"طي نتائج الأدوات",no:"Skjul verktøyresultater","pt-BR":"Recolher resultados de ferramentas",th:"ย่อผลลัพธ์เครื่องมือ",tr:"Araç sonuçlarını daralt",uk:"Згорнути результати інструментів"},"ui.expandThinking":{zh:'展开"思考过程"',en:'Expand "Thinking"',"zh-TW":'展開"思考過程"',ko:'"사고 과정" 펼치기',ja:'"思考プロセス"を展開',de:'"Denkprozess" aufklappen',es:'Expandir "Proceso de pensamiento"',fr:'Développer "Processus de réflexion"',it:'Espandi "Processo di pensiero"',da:'Udvid "Tænkeproces"',pl:'Rozwiń "Proces myślenia"',ru:'Развернуть "Процесс мышления"',ar:'توسيع "عملية التفكير"',no:'Utvid "Tenkeprosess"',"pt-BR":'Expandir "Processo de pensamento"',th:'ขยาย "กระบวนการคิด"',tr:'"Düşünce süreci"ni genişlet',uk:'Розгорнути "Процес мислення"'},"ui.expandDiff":{zh:"默认展开 Body Diff JSON",en:"Expand Body Diff JSON by default","zh-TW":"預設展開 Body Diff JSON",ko:"Body Diff JSON 기본 펼치기",ja:"Body Diff JSON をデフォルトで展開",de:"Body Diff JSON standardmäßig aufklappen",es:"Expandir Body Diff JSON por defecto",fr:"Développer Body Diff JSON par défaut",it:"Espandi Body Diff JSON per impostazione predefinita",da:"Udvid Body Diff JSON som standard",pl:"Domyślnie rozwiń Body Diff JSON",ru:"Разворачивать Body Diff JSON по умолчанию",ar:"توسيع Body Diff JSON افتراضيًا",no:"Utvid Body Diff JSON som standard","pt-BR":"Expandir Body Diff JSON por padrão",th:"ขยาย Body Diff JSON เป็นค่าเริ่มต้น",tr:"Body Diff JSON'u varsayılan olarak genişlet",uk:"Розгортати Body Diff JSON за замовчуванням"},"ui.globalSettings":{zh:"全局设置",en:"Global Settings","zh-TW":"全域設定",ko:"전역 설정",ja:"グローバル設定",de:"Globale Einstellungen",es:"Configuración global",fr:"Paramètres globaux",it:"Impostazioni globali",da:"Globale indstillinger",pl:"Ustawienia globalne",ru:"Глобальные настройки",ar:"الإعدادات العامة",no:"Globale innstillinger","pt-BR":"Configurações globais",th:"ตั้งค่าทั่วไป",tr:"Genel ayarlar",uk:"Глобальні налаштування"},"ui.filterIrrelevant":{zh:"过滤无关请求",en:"Filter irrelevant requests","zh-TW":"過濾無關請求",ko:"무관한 요청 필터링",ja:"無関係なリクエストをフィルタ",de:"Irrelevante Anfragen filtern",es:"Filtrar solicitudes irrelevantes",fr:"Filtrer les requêtes non pertinentes",it:"Filtra richieste irrilevanti",da:"Filtrer irrelevante forespørgsler",pl:"Filtruj nieistotne żądania",ru:"Фильтровать нерелевантные запросы",ar:"تصفية الطلبات غير ذات الصلة",no:"Filtrer irrelevante forespørsler","pt-BR":"Filtrar solicitações irrelevantes",th:"กรองคำขอที่ไม่เกี่ยวข้อง",tr:"İlgisiz istekleri filtrele",uk:"Фільтрувати нерелевантні запити"},"ui.thinking":{zh:"思考过程",en:"Thinking","zh-TW":"思考過程",ko:"사고 과정",ja:"思考プロセス",de:"Denkprozess",es:"Proceso de pensamiento",fr:"Processus de réflexion",it:"Processo di pensiero",da:"Tænkeproces",pl:"Proces myślenia",ru:"Процесс мышления",ar:"عملية التفكير",no:"Tenkeprosess","pt-BR":"Processo de pensamento",th:"กระบวนการคิด",tr:"Düşünce süreci",uk:"Процес мислення"},"ui.translate":{zh:"翻译",en:"Translate","zh-TW":"翻譯",ko:"번역",ja:"翻訳",de:"Übersetzen",es:"Traducir",fr:"Traduire",it:"Traduci",da:"Oversæt",pl:"Tłumacz",ru:"Перевести",ar:"ترجمة",no:"Oversett","pt-BR":"Traduzir",th:"แปล",tr:"Çevir",uk:"Перекласти"},"ui.translating":{zh:"翻译中…",en:"Translating…","zh-TW":"翻譯中…",ko:"번역 중…",ja:"翻訳中…",de:"Übersetze…",es:"Traduciendo…",fr:"Traduction…",it:"Traduzione…",da:"Oversætter…",pl:"Tłumaczenie…",ru:"Перевод…",ar:"جارٍ الترجمة…",no:"Oversetter…","pt-BR":"Traduzindo…",th:"กำลังแปล…",tr:"Çevriliyor…",uk:"Переклад…"},"ui.skillLoaded":{zh:"Skill 已加载",en:"Skill Loaded","zh-TW":"Skill 已載入",ko:"Skill 로드됨",ja:"Skill 読み込み済み",de:"Skill geladen",es:"Skill cargado",fr:"Skill chargé",it:"Skill caricato",da:"Skill indlæst",pl:"Skill załadowany",ru:"Skill загружен",ar:"تم تحميل Skill",no:"Skill lastet","pt-BR":"Skill carregado",th:"โหลด Skill แล้ว",tr:"Skill yüklendi",uk:"Skill завантажено"},"ui.cacheLoss.ttl":{zh:"缓存丢失:距上次 MainAgent 请求超过 5 分钟,缓存已过期",en:"Cache miss: over 5 minutes since last MainAgent request, cache expired","zh-TW":"快取遺失:距上次 MainAgent 請求超過 5 分鐘,快取已過期",ko:"캐시 손실: 마지막 MainAgent 요청 후 5분 초과, 캐시 만료",ja:"キャッシュミス:前回の MainAgent リクエストから5分以上経過、キャッシュ期限切れ",de:"Cache-Verlust: Über 5 Minuten seit letzter MainAgent-Anfrage, Cache abgelaufen",es:"Pérdida de caché: más de 5 minutos desde la última solicitud MainAgent, caché expirada",fr:"Perte de cache : plus de 5 minutes depuis la dernière requête MainAgent, cache expiré",it:"Cache persa: oltre 5 minuti dall'ultima richiesta MainAgent, cache scaduta",da:"Cache-tab: over 5 minutter siden sidste MainAgent-forespørgsel, cache udløbet",pl:"Utrata cache: ponad 5 minut od ostatniego żądania MainAgent, cache wygasł",ru:"Потеря кэша: прошло более 5 минут с последнего запроса MainAgent, кэш истёк",ar:"فقدان التخزين المؤقت: مرور أكثر من 5 دقائق منذ آخر طلب MainAgent، انتهت صلاحية التخزين المؤقت",no:"Cache-tap: over 5 minutter siden siste MainAgent-forespørsel, cache utløpt","pt-BR":"Perda de cache: mais de 5 minutos desde a última requisição MainAgent, cache expirado",th:"แคชหาย: เกิน 5 นาทีจากคำขอ MainAgent ล่าสุด แคชหมดอายุ",tr:"Önbellek kaybı: Son MainAgent isteğinden 5 dakikadan fazla geçti, önbellek süresi doldu",uk:"Втрата кешу: минуло понад 5 хвилин з останнього запиту MainAgent, кеш закінчився"},"ui.cacheLoss.systemChange":{zh:"缓存重建:system prompt 发生变更",en:"Cache rebuild: system prompt changed","zh-TW":"快取重建:system prompt 發生變更",ko:"캐시 재생성: 시스템 프롬프트 변경",ja:"キャッシュ再構築:システムプロンプトが変更されました",de:"Cache-Neuaufbau: System-Prompt geändert",es:"Reconstrucción de caché: el prompt del sistema cambió",fr:"Reconstruction du cache : le prompt système a changé",it:"Ricostruzione cache: il prompt di sistema è cambiato",da:"Cache-genopbygning: systemprompt ændret",pl:"Odbudowa cache: prompt systemowy zmieniony",ru:"Перестройка кэша: системный промпт изменён",ar:"إعادة بناء التخزين المؤقت: تم تغيير موجه النظام",no:"Cache-gjenoppbygging: systemprompt endret","pt-BR":"Reconstrução de cache: prompt do sistema alterado",th:"สร้างแคชใหม่: system prompt เปลี่ยนแปลง",tr:"Önbellek yeniden oluşturma: sistem istemi değişti",uk:"Перебудова кешу: системний промпт змінено"},"ui.cacheLoss.toolsChange":{zh:"缓存重建:工具定义发生变更",en:"Cache rebuild: tool definitions changed","zh-TW":"快取重建:工具定義發生變更",ko:"캐시 재생성: 도구 정의 변경",ja:"キャッシュ再構築:ツール定義が変更されました",de:"Cache-Neuaufbau: Tool-Definitionen geändert",es:"Reconstrucción de caché: las definiciones de herramientas cambiaron",fr:"Reconstruction du cache : les définitions d'outils ont changé",it:"Ricostruzione cache: le definizioni degli strumenti sono cambiate",da:"Cache-genopbygning: værktøjsdefinitioner ændret",pl:"Odbudowa cache: definicje narzędzi zmienione",ru:"Перестройка кэша: определения инструментов изменены",ar:"إعادة بناء التخزين المؤقت: تم تغيير تعريفات الأدوات",no:"Cache-gjenoppbygging: verktøydefinisjoner endret","pt-BR":"Reconstrução de cache: definições de ferramentas alteradas",th:"สร้างแคชใหม่: คำจำกัดความเครื่องมือเปลี่ยนแปลง",tr:"Önbellek yeniden oluşturma: araç tanımları değişti",uk:"Перебудова кешу: визначення інструментів змінено"},"ui.cacheLoss.modelChange":{zh:"缓存重建:模型切换",en:"Cache rebuild: model switched","zh-TW":"快取重建:模型切換",ko:"캐시 재생성: 모델 전환",ja:"キャッシュ再構築:モデルが切り替わりました",de:"Cache-Neuaufbau: Modell gewechselt",es:"Reconstrucción de caché: modelo cambiado",fr:"Reconstruction du cache : modèle changé",it:"Ricostruzione cache: modello cambiato",da:"Cache-genopbygning: model skiftet",pl:"Odbudowa cache: model zmieniony",ru:"Перестройка кэша: модель переключена",ar:"إعادة بناء التخزين المؤقت: تم تبديل النموذج",no:"Cache-gjenoppbygging: modell byttet","pt-BR":"Reconstrução de cache: modelo alterado",th:"สร้างแคชใหม่: เปลี่ยนโมเดล",tr:"Önbellek yeniden oluşturma: model değiştirildi",uk:"Перебудова кешу: модель переключено"},"ui.cacheLoss.msgTruncated":{zh:"缓存重建:消息栈被截断(上下文窗口溢出)",en:"Cache rebuild: message stack truncated (context window overflow)","zh-TW":"快取重建:訊息堆疊被截斷(上下文視窗溢出)",ko:"캐시 재생성: 메시지 스택 잘림 (컨텍스트 윈도우 오버플로)",ja:"キャッシュ再構築:メッセージスタックが切り詰められました(コンテキストウィンドウオーバーフロー)",de:"Cache-Neuaufbau: Nachrichtenstapel gekürzt (Kontextfenster-Überlauf)",es:"Reconstrucción de caché: pila de mensajes truncada (desbordamiento de ventana de contexto)",fr:"Reconstruction du cache : pile de messages tronquée (dépassement de la fenêtre de contexte)",it:"Ricostruzione cache: stack messaggi troncato (overflow finestra di contesto)",da:"Cache-genopbygning: beskedstakken afkortet (kontekstvindue-overløb)",pl:"Odbudowa cache: stos wiadomości obcięty (przepełnienie okna kontekstu)",ru:"Перестройка кэша: стек сообщений усечён (переполнение контекстного окна)",ar:"إعادة بناء التخزين المؤقت: تم اقتطاع مكدس الرسائل (تجاوز نافذة السياق)",no:"Cache-gjenoppbygging: meldingsstakken avkortet (kontekstvindu-overflyt)","pt-BR":"Reconstrução de cache: pilha de mensagens truncada (estouro da janela de contexto)",th:"สร้างแคชใหม่: สแต็กข้อความถูกตัด (context window ล้น)",tr:"Önbellek yeniden oluşturma: mesaj yığını kesildi (bağlam penceresi taşması)",uk:"Перебудова кешу: стек повідомлень обрізано (переповнення контекстного вікна)"},"ui.cacheLoss.msgModified":{zh:"缓存重建:历史消息内容被修改",en:"Cache rebuild: historical message content modified","zh-TW":"快取重建:歷史訊息內容被修改",ko:"캐시 재생성: 이전 메시지 내용 수정됨",ja:"キャッシュ再構築:過去のメッセージ内容が変更されました",de:"Cache-Neuaufbau: Historische Nachrichteninhalte geändert",es:"Reconstrucción de caché: contenido de mensajes históricos modificado",fr:"Reconstruction du cache : contenu des messages historiques modifié",it:"Ricostruzione cache: contenuto dei messaggi storici modificato",da:"Cache-genopbygning: historisk beskedindhold ændret",pl:"Odbudowa cache: treść historycznych wiadomości zmodyfikowana",ru:"Перестройка кэша: содержимое исторических сообщений изменено",ar:"إعادة بناء التخزين المؤقت: تم تعديل محتوى الرسائل السابقة",no:"Cache-gjenoppbygging: historisk meldingsinnhold endret","pt-BR":"Reconstrução de cache: conteúdo de mensagens históricas modificado",th:"สร้างแคชใหม่: เนื้อหาข้อความในประวัติถูกแก้ไข",tr:"Önbellek yeniden oluşturma: geçmiş mesaj içeriği değiştirildi",uk:"Перебудова кешу: вміст історичних повідомлень змінено"},"ui.cacheLoss.keyChange":{zh:"缓存重建:缓存键变更(原因未知)",en:"Cache rebuild: cache key changed (unknown reason)","zh-TW":"快取重建:快取鍵變更(原因未知)",ko:"캐시 재생성: 캐시 키 변경 (원인 불명)",ja:"キャッシュ再構築:キャッシュキーが変更されました(原因不明)",de:"Cache-Neuaufbau: Cache-Schlüssel geändert (Grund unbekannt)",es:"Reconstrucción de caché: clave de caché cambiada (razón desconocida)",fr:"Reconstruction du cache : clé de cache modifiée (raison inconnue)",it:"Ricostruzione cache: chiave cache cambiata (motivo sconosciuto)",da:"Cache-genopbygning: cache-nøgle ændret (ukendt årsag)",pl:"Odbudowa cache: klucz cache zmieniony (nieznana przyczyna)",ru:"Перестройка кэша: ключ кэша изменён (причина неизвестна)",ar:"إعادة بناء التخزين المؤقت: تم تغيير مفتاح التخزين المؤقت (سبب غير معروف)",no:"Cache-gjenoppbygging: cache-nøkkel endret (ukjent årsak)","pt-BR":"Reconstrução de cache: chave de cache alterada (motivo desconhecido)",th:"สร้างแคชใหม่: คีย์แคชเปลี่ยนแปลง (ไม่ทราบสาเหตุ)",tr:"Önbellek yeniden oluşturma: önbellek anahtarı değişti (bilinmeyen neden)",uk:"Перебудова кешу: ключ кешу змінено (причина невідома)"},"ui.cacheRebuildStats":{zh:"缓存重建统计",en:"Cache Rebuild Stats","zh-TW":"快取重建統計",ko:"캐시 재구축 통계",ja:"キャッシュ再構築統計",de:"Cache-Neuaufbau-Statistik",es:"Estadísticas de reconstrucción de caché",fr:"Statistiques de reconstruction du cache",it:"Statistiche ricostruzione cache",da:"Cache-genopbygningsstatistik",pl:"Statystyki przebudowy cache",ru:"Статистика перестройки кеша",ar:"إحصائيات إعادة بناء ذاكرة التخزين المؤقت",no:"Cache-gjenoppbyggingsstatistikk","pt-BR":"Estatísticas de reconstrução de cache",th:"สถิติการสร้างแคชใหม่",tr:"Önbellek Yeniden Oluşturma İstatistikleri",uk:"Статистика перебудови кешу"},"ui.cacheRebuild.reason":{zh:"原因",en:"Reason","zh-TW":"原因",ko:"원인",ja:"原因",de:"Ursache",es:"Razón",fr:"Raison",it:"Motivo",da:"Årsag",pl:"Przyczyna",ru:"Причина",ar:"السبب",no:"Årsak","pt-BR":"Razão",th:"สาเหตุ",tr:"Neden",uk:"Причина"},"ui.cacheRebuild.count":{zh:"次数",en:"Count","zh-TW":"次數",ko:"횟수",ja:"回数",de:"Anzahl",es:"Veces",fr:"Nombre",it:"Volte",da:"Antal",pl:"Liczba",ru:"Кол-во",ar:"العدد",no:"Antall","pt-BR":"Vezes",th:"จำนวน",tr:"Sayı",uk:"Кількість"},"ui.cacheRebuild.cacheCreate":{zh:"重建缓存量",en:"Cache Created","zh-TW":"重建快取量",ko:"재구축 캐시량",ja:"再構築キャッシュ量",de:"Cache erstellt",es:"Caché creado",fr:"Cache créé",it:"Cache creata",da:"Cache oprettet",pl:"Utworzony cache",ru:"Создано кеша",ar:"الذاكرة المؤقتة المُنشأة",no:"Cache opprettet","pt-BR":"Cache criado",th:"แคชที่สร้าง",tr:"Oluşturulan önbellek",uk:"Створено кешу"},"ui.cacheRebuild.ttl":{zh:"缓存过期",en:"Cache Expired","zh-TW":"快取過期",ko:"캐시 만료",ja:"キャッシュ期限切れ",de:"Cache abgelaufen",es:"Caché expirado",fr:"Cache expiré",it:"Cache scaduta",da:"Cache udløbet",pl:"Cache wygasł",ru:"Кеш истёк",ar:"انتهاء صلاحية الذاكرة المؤقتة",no:"Cache utløpt","pt-BR":"Cache expirado",th:"แคชหมดอายุ",tr:"Önbellek süresi doldu",uk:"Кеш закінчився"},"ui.cacheRebuild.systemChange":{zh:"System Prompt 变更",en:"System Prompt Changed","zh-TW":"System Prompt 變更",ko:"System Prompt 변경",ja:"System Prompt 変更",de:"System Prompt geändert",es:"System Prompt cambiado",fr:"System Prompt modifié",it:"System Prompt modificato",da:"System Prompt ændret",pl:"System Prompt zmieniony",ru:"System Prompt изменён",ar:"تغيير System Prompt",no:"System Prompt endret","pt-BR":"System Prompt alterado",th:"System Prompt เปลี่ยนแปลง",tr:"System Prompt değişti",uk:"System Prompt змінено"},"ui.cacheRebuild.toolsChange":{zh:"工具定义变更",en:"Tools Changed","zh-TW":"工具定義變更",ko:"도구 정의 변경",ja:"ツール定義変更",de:"Tools geändert",es:"Herramientas cambiadas",fr:"Outils modifiés",it:"Strumenti modificati",da:"Værktøjer ændret",pl:"Narzędzia zmienione",ru:"Инструменты изменены",ar:"تغيير الأدوات",no:"Verktøy endret","pt-BR":"Ferramentas alteradas",th:"เครื่องมือเปลี่ยนแปลง",tr:"Araçlar değişti",uk:"Інструменти змінено"},"ui.cacheRebuild.modelChange":{zh:"模型切换",en:"Model Switched","zh-TW":"模型切換",ko:"모델 전환",ja:"モデル切替",de:"Modell gewechselt",es:"Modelo cambiado",fr:"Modèle changé",it:"Modello cambiato",da:"Model skiftet",pl:"Model zmieniony",ru:"Модель переключена",ar:"تبديل النموذج",no:"Modell byttet","pt-BR":"Modelo alterado",th:"เปลี่ยนโมเดล",tr:"Model değiştirildi",uk:"Модель переключено"},"ui.cacheRebuild.msgTruncated":{zh:"消息栈被截断",en:"Messages Truncated","zh-TW":"訊息堆疊被截斷",ko:"메시지 스택 잘림",ja:"メッセージスタック切り詰め",de:"Nachrichten abgeschnitten",es:"Mensajes truncados",fr:"Messages tronqués",it:"Messaggi troncati",da:"Beskeder afkortet",pl:"Wiadomości obcięte",ru:"Сообщения обрезаны",ar:"اقتطاع الرسائل",no:"Meldinger avkortet","pt-BR":"Mensagens truncadas",th:"ข้อความถูกตัด",tr:"Mesajlar kesildi",uk:"Повідомлення обрізано"},"ui.cacheRebuild.msgModified":{zh:"历史消息修改",en:"Messages Modified","zh-TW":"歷史訊息修改",ko:"기록 메시지 수정",ja:"履歴メッセージ変更",de:"Nachrichten geändert",es:"Mensajes modificados",fr:"Messages modifiés",it:"Messaggi modificati",da:"Beskeder ændret",pl:"Wiadomości zmodyfikowane",ru:"Сообщения изменены",ar:"تعديل الرسائل",no:"Meldinger endret","pt-BR":"Mensagens modificadas",th:"ข้อความถูกแก้ไข",tr:"Mesajlar değiştirildi",uk:"Повідомлення змінено"},"ui.cacheRebuild.keyChange":{zh:"未知键变更",en:"Unknown Key Change","zh-TW":"未知鍵變更",ko:"알 수 없는 키 변경",ja:"不明なキー変更",de:"Unbekannte Schlüsseländerung",es:"Cambio de clave desconocido",fr:"Changement de clé inconnu",it:"Modifica chiave sconosciuta",da:"Ukendt nøgleændring",pl:"Nieznana zmiana klucza",ru:"Неизвестное изменение ключа",ar:"تغيير مفتاح غير معروف",no:"Ukjent nøkkelendring","pt-BR":"Alteração de chave desconhecida",th:"การเปลี่ยนแปลงคีย์ที่ไม่ทราบ",tr:"Bilinmeyen anahtar değişikliği",uk:"Невідома зміна ключа"},"ui.skillUsageStats":{zh:"Skill 使用统计",en:"Skill Usage Stats","zh-TW":"Skill 使用統計",ko:"Skill 사용 통계",ja:"Skill 使用統計",de:"Skill-Nutzungsstatistik",es:"Estadísticas de uso de Skills",fr:"Statistiques d'utilisation des Skills",it:"Statistiche utilizzo Skill",da:"Skill-brugsstatistik",pl:"Statystyki użycia Skill",ru:"Статистика использования Skill",ar:"إحصائيات استخدام Skill",no:"Skill-bruksstatistikk","pt-BR":"Estatísticas de uso de Skills",th:"สถิติการใช้ Skill",tr:"Skill Kullanım İstatistikleri",uk:"Статистика використання Skill"},"ui.toolUsageStats":{zh:"工具使用统计",en:"Tool Usage Stats","zh-TW":"工具使用統計",ko:"도구 사용 통계",ja:"ツール使用統計",de:"Tool-Nutzungsstatistik",es:"Estadísticas de uso de herramientas",fr:"Statistiques d'utilisation des outils",it:"Statistiche utilizzo strumenti",da:"Værktøjsbrugsstatistik",pl:"Statystyki użycia narzędzi",ru:"Статистика использования инструментов",ar:"إحصائيات استخدام الأدوات",no:"Verktøybruksstatistikk","pt-BR":"Estatísticas de uso de ferramentas",th:"สถิติการใช้เครื่องมือ",tr:"Araç Kullanım İstatistikleri",uk:"Статистика використання інструментів"},"ui.subAgentStats":{zh:"SubAgent 调用统计",en:"SubAgent Call Stats","zh-TW":"SubAgent 調用統計",ko:"SubAgent 호출 통계",ja:"SubAgent 呼び出し統計",de:"SubAgent-Aufrufstatistik",es:"Estadísticas de llamadas SubAgent",fr:"Statistiques d'appels SubAgent",it:"Statistiche chiamate SubAgent",da:"SubAgent-kaldsstatistik",pl:"Statystyki wywołań SubAgent",ru:"Статистика вызовов SubAgent",ar:"إحصائيات استدعاء SubAgent",no:"SubAgent-anropsstatistikk","pt-BR":"Estatísticas de chamadas SubAgent",th:"สถิติการเรียก SubAgent",tr:"SubAgent Çağrı İstatistikleri",uk:"Статистика викликів SubAgent"},"ui.mergeLogs":{zh:"合并日志",en:"Merge Logs","zh-TW":"合併日誌",ko:"로그 병합",ja:"ログを結合",de:"Logs zusammenführen",es:"Fusionar logs",fr:"Fusionner les logs",it:"Unisci log",da:"Flet logs",pl:"Scal logi",ru:"Объединить логи",ar:"دمج السجلات",no:"Slå sammen logger","pt-BR":"Mesclar logs",th:"รวมบันทึก",tr:"Logları birleştir",uk:"Об'єднати логи"},"ui.openLog":{zh:"打开",en:"Open","zh-TW":"開啟",ko:"열기",ja:"開く",de:"Öffnen",es:"Abrir",fr:"Ouvrir",it:"Apri",da:"Åbn",pl:"Otwórz",ru:"Открыть",ar:"فتح",no:"Åpne","pt-BR":"Abrir",th:"เปิด",tr:"Aç",uk:"Відкрити"},"ui.turns":{zh:"轮",en:"turns","zh-TW":"輪",ko:"턴",ja:"ターン",de:"Runden",es:"turnos",fr:"tours",it:"turni",da:"runder",pl:"tur",ru:"ходов",ar:"جولات",no:"runder","pt-BR":"turnos",th:"รอบ",tr:"tur",uk:"ходів"},"ui.mergeNotConsecutive":{zh:"请选择连续的日志文件",en:"Please select consecutive log files","zh-TW":"請選擇連續的日誌檔案",ko:"연속된 로그 파일을 선택하세요",ja:"連続したログファイルを選択してください",de:"Bitte wählen Sie aufeinanderfolgende Log-Dateien",es:"Seleccione archivos de log consecutivos",fr:"Veuillez sélectionner des fichiers de log consécutifs",it:"Seleziona file di log consecutivi",da:"Vælg venligst sammenhængende logfiler",pl:"Wybierz kolejne pliki logów",ru:"Выберите последовательные файлы логов",ar:"يرجى اختيار ملفات سجلات متتالية",no:"Velg sammenhengende loggfiler","pt-BR":"Selecione arquivos de log consecutivos",th:"กรุณาเลือกไฟล์บันทึกที่ต่อเนื่องกัน",tr:"Lütfen ardışık log dosyalarını seçin",uk:"Виберіть послідовні файли логів"},"ui.mergeTooLarge":{zh:"选中的日志文件总大小超过 500MB",en:"Selected log files exceed 500MB","zh-TW":"選中的日誌檔案總大小超過 500MB",ko:"선택한 로그 파일의 총 크기가 500MB를 초과합니다",ja:"選択したログファイルの合計サイズが 500MB を超えています",de:"Ausgewählte Log-Dateien überschreiten 500MB",es:"Los archivos de log seleccionados superan los 500MB",fr:"Les fichiers de log sélectionnés dépassent 500 Mo",it:"I file di log selezionati superano i 500MB",da:"Valgte logfiler overstiger 500MB",pl:"Wybrane pliki logów przekraczają 500MB",ru:"Выбранные файлы логов превышают 500МБ",ar:"ملفات السجلات المحددة تتجاوز 500 ميجابايت",no:"Valgte loggfiler overstiger 500MB","pt-BR":"Arquivos de log selecionados excedem 500MB",th:"ไฟล์บันทึกที่เลือกมีขนาดรวมเกิน 500MB",tr:"Seçilen log dosyaları 500MB'ı aşıyor",uk:"Вибрані файли логів перевищують 500МБ"},"ui.mergeSuccess":{zh:"日志合并成功",en:"Logs merged successfully","zh-TW":"日誌合併成功",ko:"로그 병합 성공",ja:"ログの結合に成功しました",de:"Logs erfolgreich zusammengeführt",es:"Logs fusionados correctamente",fr:"Logs fusionnés avec succès",it:"Log uniti con successo",da:"Logs flettet",pl:"Logi scalone pomyślnie",ru:"Логи успешно объединены",ar:"تم دمج السجلات بنجاح",no:"Logger slått sammen","pt-BR":"Logs mesclados com sucesso",th:"รวมบันทึกสำเร็จ",tr:"Loglar başarıyla birleştirildi",uk:"Логи успішно об'єднано"},"ui.mergeLatestNotAllowed":{zh:"最新的日志文件不允许被合并,以避免当前窗口日志丢失",en:"The latest log file cannot be merged to avoid losing the current session","zh-TW":"最新的日誌檔案不允許被合併,以避免當前視窗日誌遺失",ko:"현재 세션 손실을 방지하기 위해 최신 로그 파일은 병합할 수 없습니다",ja:"現在のセッションの損失を防ぐため、最新のログファイルは結合できません",de:"Die neueste Logdatei kann nicht zusammengeführt werden, um den Verlust der aktuellen Sitzung zu vermeiden",es:"El archivo de log más reciente no se puede fusionar para evitar perder la sesión actual",fr:"Le fichier de log le plus récent ne peut pas être fusionné pour éviter la perte de la session en cours",it:"Il file di log più recente non può essere unito per evitare la perdita della sessione corrente",da:"Den nyeste logfil kan ikke flettes for at undgå tab af den aktuelle session",pl:"Najnowszy plik logów nie może być scalony, aby uniknąć utraty bieżącej sesji",ru:"Последний файл логов не может быть объединён, чтобы избежать потери текущей сессии",ar:"لا يمكن دمج أحدث ملف سجل لتجنب فقدان الجلسة الحالية",no:"Den nyeste loggfilen kan ikke slås sammen for å unngå tap av gjeldende økt","pt-BR":"O arquivo de log mais recente não pode ser mesclado para evitar perda da sessão atual",th:"ไม่สามารถรวมไฟล์บันทึกล่าสุดเพื่อหลีกเลี่ยงการสูญเสียเซสชันปัจจุบัน",tr:"Mevcut oturumun kaybını önlemek için en son günlük dosyası birleştirilemez",uk:"Найновіший файл логів не може бути об'єднаний, щоб уникнути втрати поточної сесії"},"ui.projectStats":{zh:"项目统计",en:"Project Stats","zh-TW":"專案統計",ko:"프로젝트 통계",ja:"プロジェクト統計",de:"Projektstatistik",es:"Estadísticas del proyecto",fr:"Statistiques du projet",it:"Statistiche progetto",da:"Projektstatistik",pl:"Statystyki projektu",ru:"Статистика проекта",ar:"إحصائيات المشروع",no:"Prosjektstatistikk","pt-BR":"Estatísticas do projeto",th:"สถิติโปรเจกต์",tr:"Proje İstatistikleri",uk:"Статистика проєкту"},"ui.projectStats.totalRequests":{zh:"总请求数",en:"Total Requests","zh-TW":"總請求數",ko:"총 요청 수",ja:"リクエスト総数",de:"Gesamtanfragen",es:"Total de solicitudes",fr:"Total des requêtes",it:"Richieste totali",da:"Samlede forespørgsler",pl:"Łączna liczba żądań",ru:"Всего запросов",ar:"إجمالي الطلبات",no:"Totale forespørsler","pt-BR":"Total de requisições",th:"คำขอทั้งหมด",tr:"Toplam İstekler",uk:"Всього запитів"},"ui.projectStats.sessionCount":{zh:"会话轮次",en:"Sessions","zh-TW":"會話輪次",ko:"세션 수",ja:"セッション数",de:"Sitzungen",es:"Sesiones",fr:"Sessions",it:"Sessioni",da:"Sessioner",pl:"Sesje",ru:"Сессий",ar:"الجلسات",no:"Sesjoner","pt-BR":"Sessões",th:"เซสชัน",tr:"Oturumlar",uk:"Сесії"},"ui.projectStats.totalFiles":{zh:"会话文件数",en:"Session Files","zh-TW":"會話檔案數",ko:"세션 파일 수",ja:"セッションファイル数",de:"Sitzungsdateien",es:"Archivos de sesión",fr:"Fichiers de session",it:"File di sessione",da:"Sessionsfiler",pl:"Pliki sesji",ru:"Файлов сессий",ar:"ملفات الجلسات",no:"Sesjonsfiler","pt-BR":"Arquivos de sessão",th:"ไฟล์เซสชัน",tr:"Oturum Dosyaları",uk:"Файли сесій"},"ui.projectStats.modelUsage":{zh:"模型使用统计",en:"Model Usage","zh-TW":"模型使用統計",ko:"모델 사용 통계",ja:"モデル使用統計",de:"Modellnutzung",es:"Uso de modelos",fr:"Utilisation des modèles",it:"Utilizzo modelli",da:"Modelbrug",pl:"Użycie modeli",ru:"Использование моделей",ar:"استخدام النماذج",no:"Modellbruk","pt-BR":"Uso de modelos",th:"การใช้โมเดล",tr:"Model Kullanımı",uk:"Використання моделей"},"ui.projectStats.noData":{zh:"暂无统计数据",en:"No stats available","zh-TW":"暫無統計資料",ko:"통계 데이터 없음",ja:"統計データなし",de:"Keine Statistiken verfügbar",es:"Sin estadísticas disponibles",fr:"Aucune statistique disponible",it:"Nessuna statistica disponibile",da:"Ingen statistik tilgængelig",pl:"Brak dostępnych statystyk",ru:"Статистика недоступна",ar:"لا توجد إحصائيات متاحة",no:"Ingen statistikk tilgjengelig","pt-BR":"Sem estatísticas disponíveis",th:"ไม่มีข้อมูลสถิติ",tr:"İstatistik mevcut değil",uk:"Статистика недоступна"},"ui.projectStats.updatedAt":{zh:"更新于 {time}",en:"Updated at {time}","zh-TW":"更新於 {time}",ko:"{time}에 업데이트됨",ja:"{time} に更新",de:"Aktualisiert um {time}",es:"Actualizado a las {time}",fr:"Mis à jour à {time}",it:"Aggiornato alle {time}",da:"Opdateret {time}",pl:"Zaktualizowano {time}",ru:"Обновлено в {time}",ar:"تم التحديث في {time}",no:"Oppdatert {time}","pt-BR":"Atualizado em {time}",th:"อัปเดตเมื่อ {time}",tr:"{time} tarihinde güncellendi",uk:"Оновлено о {time}"},"ui.update.completed":{zh:"已更新到 v{version},下次启动生效",en:"Updated to v{version}, effective on next restart","zh-TW":"已更新到 v{version},下次啟動生效",ko:"v{version}으로 업데이트됨, 다음 시작 시 적용",ja:"v{version} に更新済み、次回起動時に有効",de:"Auf v{version} aktualisiert, wirksam beim nächsten Neustart",es:"Actualizado a v{version}, efectivo en el próximo reinicio",fr:"Mis à jour vers v{version}, effectif au prochain redémarrage",it:"Aggiornato a v{version}, effettivo al prossimo riavvio",da:"Opdateret til v{version}, træder i kraft ved næste genstart",pl:"Zaktualizowano do v{version}, obowiązuje po ponownym uruchomieniu",ru:"Обновлено до v{version}, вступит в силу при следующем запуске",ar:"تم التحديث إلى v{version}، سيسري عند إعادة التشغيل التالية",no:"Oppdatert til v{version}, trer i kraft ved neste omstart","pt-BR":"Atualizado para v{version}, efetivo na próxima reinicialização",th:"อัปเดตเป็น v{version} แล้ว มีผลเมื่อเริ่มใหม่",tr:"v{version} sürümüne güncellendi, bir sonraki başlatmada geçerli",uk:"Оновлено до v{version}, набуде чинності при наступному запуску"},"ui.update.majorAvailable":{zh:"新大版本 v{version} 可用,请手动更新: npm i -g cc-viewer@latest",en:"Major version v{version} available, update manually: npm i -g cc-viewer@latest","zh-TW":"新大版本 v{version} 可用,請手動更新: npm i -g cc-viewer@latest",ko:"새 메이저 버전 v{version} 사용 가능, 수동 업데이트: npm i -g cc-viewer@latest",ja:"メジャーバージョン v{version} が利用可能、手動更新: npm i -g cc-viewer@latest",de:"Hauptversion v{version} verfügbar, manuell aktualisieren: npm i -g cc-viewer@latest",es:"Versión principal v{version} disponible, actualice: npm i -g cc-viewer@latest",fr:"Version majeure v{version} disponible, mettez à jour : npm i -g cc-viewer@latest",it:"Versione principale v{version} disponibile, aggiornare: npm i -g cc-viewer@latest",da:"Hovedversion v{version} tilgængelig, opdater manuelt: npm i -g cc-viewer@latest",pl:"Główna wersja v{version} dostępna, zaktualizuj: npm i -g cc-viewer@latest",ru:"Доступна основная версия v{version}, обновите: npm i -g cc-viewer@latest",ar:"الإصدار الرئيسي v{version} متاح، حدّث يدويًا: npm i -g cc-viewer@latest",no:"Hovedversjon v{version} tilgjengelig, oppdater manuelt: npm i -g cc-viewer@latest","pt-BR":"Versão principal v{version} disponível, atualize: npm i -g cc-viewer@latest",th:"เวอร์ชันหลัก v{version} พร้อมใช้งาน อัปเดตด้วยตนเอง: npm i -g cc-viewer@latest",tr:"Ana sürüm v{version} mevcut, manuel güncelleyin: npm i -g cc-viewer@latest",uk:"Доступна основна версія v{version}, оновіть: npm i -g cc-viewer@latest"},"ui.chatInput.placeholder":{zh:"输入消息发送给 Claude...",en:"Type a message to Claude...","zh-TW":"輸入訊息傳送給 Claude...",ko:"Claude에게 메시지를 입력하세요...",ja:"Claudeにメッセージを入力...",de:"Nachricht an Claude eingeben...",es:"Escribe un mensaje para Claude...",fr:"Tapez un message pour Claude...",it:"Scrivi un messaggio per Claude...",da:"Skriv en besked til Claude...",pl:"Wpisz wiadomość do Claude...",ru:"Введите сообщение для Claude...",ar:"اكتب رسالة إلى Claude...",no:"Skriv en melding til Claude...","pt-BR":"Digite uma mensagem para o Claude...",th:"พิมพ์ข้อความถึง Claude...",tr:"Claude'a mesaj yazın...",uk:"Введіть повідомлення для Claude..."},"ui.chatInput.send":{zh:"发送",en:"Send","zh-TW":"傳送",ko:"보내기",ja:"送信",de:"Senden",es:"Enviar",fr:"Envoyer",it:"Invia",da:"Send",pl:"Wyślij",ru:"Отправить",ar:"إرسال",no:"Send","pt-BR":"Enviar",th:"ส่ง",tr:"Gönder",uk:"Надіслати"},"ui.chatInput.hintEnter":{zh:"Enter 发送,Shift+Enter 换行",en:"Enter to send, Shift+Enter for new line","zh-TW":"Enter 傳送,Shift+Enter 換行",ko:"Enter로 전송, Shift+Enter로 줄바꿈",ja:"Enterで送信、Shift+Enterで改行",de:"Enter zum Senden, Shift+Enter für neue Zeile",es:"Enter para enviar, Shift+Enter para nueva línea",fr:"Entrée pour envoyer, Shift+Entrée pour nouvelle ligne",it:"Invio per inviare, Shift+Invio per nuova riga",da:"Enter for at sende, Shift+Enter for ny linje",pl:"Enter aby wysłać, Shift+Enter nowa linia",ru:"Enter — отправить, Shift+Enter — новая строка",ar:"Enter للإرسال، Shift+Enter لسطر جديد",no:"Enter for å sende, Shift+Enter for ny linje","pt-BR":"Enter para enviar, Shift+Enter para nova linha",th:"Enter ส่ง, Shift+Enter ขึ้นบรรทัดใหม่",tr:"Enter gönder, Shift+Enter yeni satır",uk:"Enter — надіслати, Shift+Enter — новий рядок"},"ui.chatInput.hintTab":{zh:"Tab 接受建议",en:"Tab to accept suggestion","zh-TW":"Tab 接受建議",ko:"Tab으로 제안 수락",ja:"Tabで提案を受け入れ",de:"Tab zum Akzeptieren des Vorschlags",es:"Tab para aceptar sugerencia",fr:"Tab pour accepter la suggestion",it:"Tab per accettare il suggerimento",da:"Tab for at acceptere forslag",pl:"Tab aby zaakceptować sugestię",ru:"Tab — принять предложение",ar:"Tab لقبول الاقتراح",no:"Tab for å akseptere forslag","pt-BR":"Tab para aceitar sugestão",th:"Tab ยอมรับคำแนะนำ",tr:"Tab ile öneriyi kabul et",uk:"Tab — прийняти пропозицію"},"ui.terminal":{zh:"终端",en:"Terminal","zh-TW":"終端機",ko:"터미널",ja:"ターミナル",de:"Terminal",es:"Terminal",fr:"Terminal",it:"Terminale",da:"Terminal",pl:"Terminal",ru:"Терминал",ar:"طرفية",no:"Terminal","pt-BR":"Terminal",th:"เทอร์มินัล",tr:"Terminal",uk:"Термінал"},"ui.stickyBottom":{zh:"保持吸底",en:"Stick to bottom","zh-TW":"保持置底",ko:"하단 고정",ja:"下部に固定",de:"Unten fixieren",es:"Fijar al fondo",fr:"Fixer en bas",it:"Fissa in basso",da:"Fastgør i bunden",pl:"Przypnij na dole",ru:"Прикрепить внизу",ar:"تثبيت في الأسفل",no:"Fest til bunnen","pt-BR":"Fixar no fundo",th:"ตรึงด้านล่าง",tr:"Alta sabitle",uk:"Закріпити внизу"},"ui.askQuestion":{zh:"提问",en:"Question","zh-TW":"提問",ko:"질문",ja:"質問",de:"Frage",es:"Pregunta",fr:"Question",it:"Domanda",da:"Spørgsmål",pl:"Pytanie",ru:"Вопрос",ar:"سؤال",no:"Spørsmål","pt-BR":"Pergunta",th:"คำถาม",tr:"Soru",uk:"Питання"},"ui.enterPlanMode":{zh:"进入计划模式",en:"Entering Plan Mode","zh-TW":"進入計劃模式",ko:"계획 모드 진입",ja:"プランモードに入ります",de:"Planungsmodus wird gestartet",es:"Entrando en modo de planificación",fr:"Entrée en mode planification",it:"Accesso alla modalità pianificazione",da:"Går ind i planlægningstilstand",pl:"Wchodzenie w tryb planowania",ru:"Вход в режим планирования",ar:"الدخول في وضع التخطيط",no:"Går inn i planleggingsmodus","pt-BR":"Entrando no modo de planejamento",th:"เข้าสู่โหมดวางแผน",tr:"Plan moduna giriliyor",uk:"Вхід у режим планування"},"ui.exitPlanMode":{zh:"计划就绪,等待审批",en:"Plan Ready for Approval","zh-TW":"計劃就緒,等待審批",ko:"계획 준비 완료, 승인 대기",ja:"プラン準備完了、承認待ち",de:"Plan bereit zur Genehmigung",es:"Plan listo para aprobación",fr:"Plan prêt pour approbation",it:"Piano pronto per l'approvazione",da:"Plan klar til godkendelse",pl:"Plan gotowy do zatwierdzenia",ru:"План готов к утверждению",ar:"الخطة جاهزة للموافقة",no:"Plan klar for godkjenning","pt-BR":"Plano pronto para aprovação",th:"แผนพร้อมรอการอนุมัติ",tr:"Plan onaya hazır",uk:"План готовий до затвердження"},"ui.allowedPrompts":{zh:"请求的权限",en:"Requested Permissions","zh-TW":"請求的權限",ko:"요청된 권한",ja:"要求された権限",de:"Angeforderte Berechtigungen",es:"Permisos solicitados",fr:"Permissions demandées",it:"Permessi richiesti",da:"Anmodede tilladelser",pl:"Żądane uprawnienia",ru:"Запрошенные разрешения",ar:"الأذونات المطلوبة",no:"Forespurte tillatelser","pt-BR":"Permissões solicitadas",th:"สิทธิ์ที่ร้องขอ",tr:"İstenen izinler",uk:"Запитані дозволи"}},Dl={};for(const[e,t]of Object.entries(OF))for(const[r,n]of Object.entries(t))Dl[r]||(Dl[r]={}),Dl[r][e]=n;let tb="zh";const dh={zh:"zh","zh-cn":"zh","zh-hans":"zh","zh-tw":"zh-TW","zh-hk":"zh-TW","zh-hant":"zh-TW",en:"en",ko:"ko",de:"de",es:"es",fr:"fr",it:"it",da:"da",ja:"ja",pl:"pl",ru:"ru",ar:"ar",no:"no",nb:"no",nn:"no",pt:"pt-BR","pt-br":"pt-BR",th:"th",tr:"tr",uk:"uk"};function IF(e){if(!e)return"en";const t=e.toLowerCase().replace(/_/g,"-");if(dh[t])return dh[t];const r=t.split("-")[0];return dh[r]?dh[r]:"en"}function NF(){return typeof navigator<"u"&&navigator.language?IF(navigator.language):"en"}function rb(e){tb=Dl[e]?e:"en"}function Xl(){return tb}function we(e,t){var n;let r=((n=Dl[tb])==null?void 0:n[e])||Dl.en[e]||e;if(t)for(const[i,o]of Object.entries(t))r=r.replaceAll(`{${i}}`,o);return r}rb(NF());function nb(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var La=nb();function a4(e){La=e}var va={exec:()=>null};function hr(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:(i,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(ui.caret,"$1"),r=r.replace(i,a),n},getRegex:()=>new RegExp(r,t)};return n}var MF=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),ui={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},zF=/^(?:[ \t]*(?:\n|$))+/,jF=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,BF=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Gu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,LF=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ib=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,l4=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,c4=hr(l4).replace(/bull/g,ib).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),DF=hr(l4).replace(/bull/g,ib).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ob=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,AF=/^[^\n]+/,sb=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,HF=hr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",sb).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),FF=hr(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ib).getRegex(),cm="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ab=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,WF=hr("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ab).replace("tag",cm).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),u4=hr(ob).replace("hr",Gu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",cm).getRegex(),VF=hr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",u4).getRegex(),lb={blockquote:VF,code:jF,def:HF,fences:BF,heading:LF,hr:Gu,html:WF,lheading:c4,list:FF,newline:zF,paragraph:u4,table:va,text:AF},Kw=hr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Gu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",cm).getRegex(),UF={...lb,lheading:DF,table:Kw,paragraph:hr(ob).replace("hr",Gu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Kw).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",cm).getRegex()},qF={...lb,html:hr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ab).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:va,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:hr(ob).replace("hr",Gu).replace("heading",` *#{1,6} *[^
486
+ ]`).replace("lheading",c4).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},KF=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,GF=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,d4=/^( {2,}|\\)\n(?!\s*$)/,XF=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,um=/[\p{P}\p{S}]/u,cb=/[\s\p{P}\p{S}]/u,h4=/[^\s\p{P}\p{S}]/u,YF=hr(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,cb).getRegex(),f4=/(?!~)[\p{P}\p{S}]/u,JF=/(?!~)[\s\p{P}\p{S}]/u,QF=/(?:[^\s\p{P}\p{S}]|~)/u,m4=/(?![*_])[\p{P}\p{S}]/u,ZF=/(?![*_])[\s\p{P}\p{S}]/u,eW=/(?:[^\s\p{P}\p{S}]|[*_])/u,tW=hr(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",MF?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),p4=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,rW=hr(p4,"u").replace(/punct/g,um).getRegex(),nW=hr(p4,"u").replace(/punct/g,f4).getRegex(),g4="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",iW=hr(g4,"gu").replace(/notPunctSpace/g,h4).replace(/punctSpace/g,cb).replace(/punct/g,um).getRegex(),oW=hr(g4,"gu").replace(/notPunctSpace/g,QF).replace(/punctSpace/g,JF).replace(/punct/g,f4).getRegex(),sW=hr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,h4).replace(/punctSpace/g,cb).replace(/punct/g,um).getRegex(),aW=hr(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,m4).getRegex(),lW="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",cW=hr(lW,"gu").replace(/notPunctSpace/g,eW).replace(/punctSpace/g,ZF).replace(/punct/g,m4).getRegex(),uW=hr(/\\(punct)/,"gu").replace(/punct/g,um).getRegex(),dW=hr(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),hW=hr(ab).replace("(?:-->|$)","-->").getRegex(),fW=hr("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",hW).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),mf=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,mW=hr(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",mf).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),v4=hr(/^!?\[(label)\]\[(ref)\]/).replace("label",mf).replace("ref",sb).getRegex(),y4=hr(/^!?\[(ref)\](?:\[\])?/).replace("ref",sb).getRegex(),pW=hr("reflink|nolink(?!\\()","g").replace("reflink",v4).replace("nolink",y4).getRegex(),Gw=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ub={_backpedal:va,anyPunctuation:uW,autolink:dW,blockSkip:tW,br:d4,code:GF,del:va,delLDelim:va,delRDelim:va,emStrongLDelim:rW,emStrongRDelimAst:iW,emStrongRDelimUnd:sW,escape:KF,link:mW,nolink:y4,punctuation:YF,reflink:v4,reflinkSearch:pW,tag:fW,text:XF,url:va},gW={...ub,link:hr(/^!?\[(label)\]\((.*?)\)/).replace("label",mf).getRegex(),reflink:hr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",mf).getRegex()},c0={...ub,emStrongRDelimAst:oW,emStrongLDelim:nW,delLDelim:aW,delRDelim:cW,url:hr(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Gw).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:hr(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Gw).getRegex()},vW={...c0,br:hr(d4).replace("{2,}","*").getRegex(),text:hr(c0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},hh={normal:lb,gfm:UF,pedantic:qF},Dc={normal:ub,gfm:c0,breaks:vW,pedantic:gW},yW={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Xw=e=>yW[e];function Mo(e,t){if(t){if(ui.escapeTest.test(e))return e.replace(ui.escapeReplace,Xw)}else if(ui.escapeTestNoEncode.test(e))return e.replace(ui.escapeReplaceNoEncode,Xw);return e}function Yw(e){try{e=encodeURI(e).replace(ui.percentDecode,"%")}catch{return null}return e}function Jw(e,t){var o;let r=e.replace(ui.findPipe,(a,c,u)=>{let d=!1,f=c;for(;--f>=0&&u[f]==="\\";)d=!d;return d?"|":" |"}),n=r.split(ui.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!((o=n.at(-1))!=null&&o.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(ui.slashPipe,"|");return n}function Ac(e,t,r){let n=e.length;if(n===0)return"";let i=0;for(;i<n&&e.charAt(n-i-1)===t;)i++;return e.slice(0,n-i)}function bW(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function _W(e,t=0){let r=t,n="";for(let i of e)if(i===" "){let o=4-r%4;n+=" ".repeat(o),r+=o}else n+=i,r++;return n}function Qw(e,t,r,n,i){let o=t.href,a=t.title||null,c=e[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:a,text:c,tokens:n.inlineTokens(c)};return n.state.inLink=!1,u}function SW(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let i=n[1];return t.split(`
487
+ `).map(o=>{let a=o.match(r.other.beginningSpace);if(a===null)return o;let[c]=a;return c.length>=i.length?o.slice(i.length):o}).join(`
488
+ `)}var pf=class{constructor(e){$t(this,"options");$t(this,"rules");$t(this,"lexer");this.options=e||La}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Ac(r,`
489
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],n=SW(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let n=Ac(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Ac(t[0],`
490
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=Ac(t[0],`
491
+ `).split(`
492
+ `),n="",i="",o=[];for(;r.length>0;){let a=!1,c=[],u;for(u=0;u<r.length;u++)if(this.rules.other.blockquoteStart.test(r[u]))c.push(r[u]),a=!0;else if(!a)c.push(r[u]);else break;r=r.slice(u);let d=c.join(`
493
+ `),f=d.replace(this.rules.other.blockquoteSetextReplace,`
494
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
495
+ ${d}`:d,i=i?`${i}
496
+ ${f}`:f;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,o,!0),this.lexer.state.top=p,r.length===0)break;let g=o.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let v=g,b=v.raw+`
497
+ `+r.join(`
498
+ `),S=this.blockquote(b);o[o.length-1]=S,n=n.substring(0,n.length-v.raw.length)+S.raw,i=i.substring(0,i.length-v.text.length)+S.text;break}else if((g==null?void 0:g.type)==="list"){let v=g,b=v.raw+`
499
+ `+r.join(`
500
+ `),S=this.list(b);o[o.length-1]=S,n=n.substring(0,n.length-g.raw.length)+S.raw,i=i.substring(0,i.length-v.raw.length)+S.raw,r=b.substring(o.at(-1).raw.length).split(`
501
+ `);continue}}return{type:"blockquote",raw:n,tokens:o,text:i}}}list(e){var r,n;let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim(),o=i.length>1,a={type:"list",raw:"",ordered:o,start:o?+i.slice(0,-1):"",loose:!1,items:[]};i=o?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=o?i:"[*+-]");let c=this.rules.other.listItemRegex(i),u=!1;for(;e;){let f=!1,p="",g="";if(!(t=c.exec(e))||this.rules.block.hr.test(e))break;p=t[0],e=e.substring(p.length);let v=_W(t[2].split(`
502
+ `,1)[0],t[1].length),b=e.split(`
503
+ `,1)[0],S=!v.trim(),_=0;if(this.options.pedantic?(_=2,g=v.trimStart()):S?_=t[1].length+1:(_=v.search(this.rules.other.nonSpaceChar),_=_>4?1:_,g=v.slice(_),_+=t[1].length),S&&this.rules.other.blankLine.test(b)&&(p+=b+`
504
+ `,e=e.substring(b.length+1),f=!0),!f){let C=this.rules.other.nextBulletRegex(_),x=this.rules.other.hrRegex(_),E=this.rules.other.fencesBeginRegex(_),k=this.rules.other.headingBeginRegex(_),P=this.rules.other.htmlBeginRegex(_),T=this.rules.other.blockquoteBeginRegex(_);for(;e;){let O=e.split(`
505
+ `,1)[0],N;if(b=O,this.options.pedantic?(b=b.replace(this.rules.other.listReplaceNesting," "),N=b):N=b.replace(this.rules.other.tabCharGlobal," "),E.test(b)||k.test(b)||P.test(b)||T.test(b)||C.test(b)||x.test(b))break;if(N.search(this.rules.other.nonSpaceChar)>=_||!b.trim())g+=`
506
+ `+N.slice(_);else{if(S||v.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(v)||k.test(v)||x.test(v))break;g+=`
507
+ `+b}S=!b.trim(),p+=O+`
508
+ `,e=e.substring(O.length+1),v=N.slice(_)}}a.loose||(u?a.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(u=!0)),a.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(g),loose:!1,text:g,tokens:[]}),a.raw+=p}let d=a.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let f of a.items){if(this.lexer.state.top=!1,f.tokens=this.lexer.blockTokens(f.text,[]),f.task){if(f.text=f.text.replace(this.rules.other.listReplaceTask,""),((r=f.tokens[0])==null?void 0:r.type)==="text"||((n=f.tokens[0])==null?void 0:n.type)==="paragraph"){f.tokens[0].raw=f.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),f.tokens[0].text=f.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let g=this.lexer.inlineQueue.length-1;g>=0;g--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[g].src)){this.lexer.inlineQueue[g].src=this.lexer.inlineQueue[g].src.replace(this.rules.other.listReplaceTask,"");break}}let p=this.rules.other.listTaskCheckbox.exec(f.raw);if(p){let g={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};f.checked=g.checked,a.loose?f.tokens[0]&&["paragraph","text"].includes(f.tokens[0].type)&&"tokens"in f.tokens[0]&&f.tokens[0].tokens?(f.tokens[0].raw=g.raw+f.tokens[0].raw,f.tokens[0].text=g.raw+f.tokens[0].text,f.tokens[0].tokens.unshift(g)):f.tokens.unshift({type:"paragraph",raw:g.raw,text:g.raw,tokens:[g]}):f.tokens.unshift(g)}}if(!a.loose){let p=f.tokens.filter(v=>v.type==="space"),g=p.length>0&&p.some(v=>this.rules.other.anyLine.test(v.raw));a.loose=g}}if(a.loose)for(let f of a.items){f.loose=!0;for(let p of f.tokens)p.type==="text"&&(p.type="paragraph")}return a}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:n,title:i}}}table(e){var a;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=Jw(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(a=t[3])!=null&&a.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
509
+ `):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let c of n)this.rules.other.tableAlignRight.test(c)?o.align.push("right"):this.rules.other.tableAlignCenter.test(c)?o.align.push("center"):this.rules.other.tableAlignLeft.test(c)?o.align.push("left"):o.align.push(null);for(let c=0;c<r.length;c++)o.header.push({text:r[c],tokens:this.lexer.inline(r[c]),header:!0,align:o.align[c]});for(let c of i)o.rows.push(Jw(c,o.header.length).map((u,d)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:o.align[d]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===`
510
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let o=Ac(r.slice(0,-1),"\\");if((r.length-o.length)%2===0)return}else{let o=bW(t[2],"()");if(o===-2)return;if(o>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let n=t[2],i="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(n);o&&(n=o[1],i=o[3])}else i=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),Qw(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[n.toLowerCase()];if(!i){let o=r[0].charAt(0);return{type:"text",raw:o,text:o}}return Qw(r,i,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,o,a,c=i,u=0,d=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(n=d.exec(t))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(a=[...o].length,n[3]||n[4]){c+=a;continue}else if((n[5]||n[6])&&i%3&&!((i+a)%3)){u+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c+u);let f=[...n[0]][0].length,p=e.slice(0,i+n.index+f+a);if(Math.min(i,a)%2){let v=p.slice(1,-1);return{type:"em",raw:p,text:v,tokens:this.lexer.inlineTokens(v)}}let g=p.slice(2,-2);return{type:"strong",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let n=this.rules.inline.delLDelim.exec(e);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,o,a,c=i,u=this.rules.inline.delRDelim;for(u.lastIndex=0,t=t.slice(-1*e.length+i);(n=u.exec(t))!=null;){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o||(a=[...o].length,a!==i))continue;if(n[3]||n[4]){c+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c);let d=[...n[0]][0].length,f=e.slice(0,i+n.index+d+a),p=f.slice(i,-i);return{type:"del",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let t;if(t=this.rules.inline.url.exec(e)){let n,i;if(t[2]==="@")n=t[0],i="mailto:"+n;else{let o;do o=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(o!==t[0]);n=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},Co=class u0{constructor(t){$t(this,"tokens");$t(this,"options");$t(this,"state");$t(this,"inlineQueue");$t(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||La,this.options.tokenizer=this.options.tokenizer||new pf,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:ui,block:hh.normal,inline:Dc.normal};this.options.pedantic?(r.block=hh.pedantic,r.inline=Dc.pedantic):this.options.gfm&&(r.block=hh.gfm,this.options.breaks?r.inline=Dc.breaks:r.inline=Dc.gfm),this.tokenizer.rules=r}static get rules(){return{block:hh,inline:Dc}}static lex(t,r){return new u0(r).lex(t)}static lexInline(t,r){return new u0(r).inlineTokens(t)}lex(t){t=t.replace(ui.carriageReturn,`
511
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){var i,o,a;for(this.options.pedantic&&(t=t.replace(ui.tabCharGlobal," ").replace(ui.spaceLine,""));t;){let c;if((o=(i=this.options.extensions)==null?void 0:i.block)!=null&&o.some(d=>(c=d.call({lexer:this},t,r))?(t=t.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.space(t)){t=t.substring(c.raw.length);let d=r.at(-1);c.raw.length===1&&d!==void 0?d.raw+=`
512
+ `:r.push(c);continue}if(c=this.tokenizer.code(t)){t=t.substring(c.raw.length);let d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
513
+ `)?"":`
514
+ `)+c.raw,d.text+=`
515
+ `+c.text,this.inlineQueue.at(-1).src=d.text):r.push(c);continue}if(c=this.tokenizer.fences(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.heading(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.hr(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.blockquote(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.list(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.html(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.def(t)){t=t.substring(c.raw.length);let d=r.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
516
+ `)?"":`
517
+ `)+c.raw,d.text+=`
518
+ `+c.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},r.push(c));continue}if(c=this.tokenizer.table(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.lheading(t)){t=t.substring(c.raw.length),r.push(c);continue}let u=t;if((a=this.options.extensions)!=null&&a.startBlock){let d=1/0,f=t.slice(1),p;this.options.extensions.startBlock.forEach(g=>{p=g.call({lexer:this},f),typeof p=="number"&&p>=0&&(d=Math.min(d,p))}),d<1/0&&d>=0&&(u=t.substring(0,d+1))}if(this.state.top&&(c=this.tokenizer.paragraph(u))){let d=r.at(-1);n&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=(d.raw.endsWith(`
519
+ `)?"":`
520
+ `)+c.raw,d.text+=`
521
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(c),n=u.length!==t.length,t=t.substring(c.raw.length);continue}if(c=this.tokenizer.text(t)){t=t.substring(c.raw.length);let d=r.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=(d.raw.endsWith(`
522
+ `)?"":`
523
+ `)+c.raw,d.text+=`
524
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):r.push(c);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var u,d,f,p,g;let n=t,i=null;if(this.tokens.links){let v=Object.keys(this.tokens.links);if(v.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)v.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)o=i[2]?i[2].length:0,n=n.slice(0,i.index+o)+"["+"a".repeat(i[0].length-o-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=((d=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:d.call({lexer:this},n))??n;let a=!1,c="";for(;t;){a||(c=""),a=!1;let v;if((p=(f=this.options.extensions)==null?void 0:f.inline)!=null&&p.some(S=>(v=S.call({lexer:this},t,r))?(t=t.substring(v.raw.length),r.push(v),!0):!1))continue;if(v=this.tokenizer.escape(t)){t=t.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.tag(t)){t=t.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.link(t)){t=t.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(v.raw.length);let S=r.at(-1);v.type==="text"&&(S==null?void 0:S.type)==="text"?(S.raw+=v.raw,S.text+=v.text):r.push(v);continue}if(v=this.tokenizer.emStrong(t,n,c)){t=t.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.codespan(t)){t=t.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.br(t)){t=t.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.del(t,n,c)){t=t.substring(v.raw.length),r.push(v);continue}if(v=this.tokenizer.autolink(t)){t=t.substring(v.raw.length),r.push(v);continue}if(!this.state.inLink&&(v=this.tokenizer.url(t))){t=t.substring(v.raw.length),r.push(v);continue}let b=t;if((g=this.options.extensions)!=null&&g.startInline){let S=1/0,_=t.slice(1),C;this.options.extensions.startInline.forEach(x=>{C=x.call({lexer:this},_),typeof C=="number"&&C>=0&&(S=Math.min(S,C))}),S<1/0&&S>=0&&(b=t.substring(0,S+1))}if(v=this.tokenizer.inlineText(b)){t=t.substring(v.raw.length),v.raw.slice(-1)!=="_"&&(c=v.raw.slice(-1)),a=!0;let S=r.at(-1);(S==null?void 0:S.type)==="text"?(S.raw+=v.raw,S.text+=v.text):r.push(v);continue}if(t){let S="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(S);break}else throw new Error(S)}}return r}},gf=class{constructor(e){$t(this,"options");$t(this,"parser");this.options=e||La}space(e){return""}code({text:e,lang:t,escaped:r}){var o;let n=(o=(t||"").match(ui.notSpaceStart))==null?void 0:o[0],i=e.replace(ui.endingNewline,"")+`
525
+ `;return n?'<pre><code class="language-'+Mo(n)+'">'+(r?i:Mo(i,!0))+`</code></pre>
526
+ `:"<pre><code>"+(r?i:Mo(i,!0))+`</code></pre>
527
+ `}blockquote({tokens:e}){return`<blockquote>
528
+ ${this.parser.parse(e)}</blockquote>
529
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
530
+ `}hr(e){return`<hr>
531
+ `}list(e){let t=e.ordered,r=e.start,n="";for(let a=0;a<e.items.length;a++){let c=e.items[a];n+=this.listitem(c)}let i=t?"ol":"ul",o=t&&r!==1?' start="'+r+'"':"";return"<"+i+o+`>
532
+ `+n+"</"+i+`>
533
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
534
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
535
+ `}table(e){let t="",r="";for(let i=0;i<e.header.length;i++)r+=this.tablecell(e.header[i]);t+=this.tablerow({text:r});let n="";for(let i=0;i<e.rows.length;i++){let o=e.rows[i];r="";for(let a=0;a<o.length;a++)r+=this.tablecell(o[a]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
536
+ <thead>
537
+ `+t+`</thead>
538
+ `+n+`</table>
539
+ `}tablerow({text:e}){return`<tr>
540
+ ${e}</tr>
541
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
542
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Mo(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let n=this.parser.parseInline(r),i=Yw(e);if(i===null)return n;e=i;let o='<a href="'+e+'"';return t&&(o+=' title="'+Mo(t)+'"'),o+=">"+n+"</a>",o}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=Yw(e);if(i===null)return Mo(r);e=i;let o=`<img src="${e}" alt="${Mo(r)}"`;return t&&(o+=` title="${Mo(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Mo(e.text)}},db=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},wo=class d0{constructor(t){$t(this,"options");$t(this,"renderer");$t(this,"textRenderer");this.options=t||La,this.options.renderer=this.options.renderer||new gf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new db}static parse(t,r){return new d0(r).parse(t)}static parseInline(t,r){return new d0(r).parseInline(t)}parse(t){var n,i;let r="";for(let o=0;o<t.length;o++){let a=t[o];if((i=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&i[a.type]){let u=a,d=this.options.extensions.renderers[u.type].call({parser:this},u);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){r+=d||"";continue}}let c=a;switch(c.type){case"space":{r+=this.renderer.space(c);break}case"hr":{r+=this.renderer.hr(c);break}case"heading":{r+=this.renderer.heading(c);break}case"code":{r+=this.renderer.code(c);break}case"table":{r+=this.renderer.table(c);break}case"blockquote":{r+=this.renderer.blockquote(c);break}case"list":{r+=this.renderer.list(c);break}case"checkbox":{r+=this.renderer.checkbox(c);break}case"html":{r+=this.renderer.html(c);break}case"def":{r+=this.renderer.def(c);break}case"paragraph":{r+=this.renderer.paragraph(c);break}case"text":{r+=this.renderer.text(c);break}default:{let u='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}parseInline(t,r=this.renderer){var i,o;let n="";for(let a=0;a<t.length;a++){let c=t[a];if((o=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&o[c.type]){let d=this.options.extensions.renderers[c.type].call({parser:this},c);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){n+=d||"";continue}}let u=c;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"checkbox":{n+=r.checkbox(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{let d='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}},_h,Zc=(_h=class{constructor(e){$t(this,"options");$t(this,"block");this.options=e||La}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Co.lex:Co.lexInline}provideParser(){return this.block?wo.parse:wo.parseInline}},$t(_h,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),$t(_h,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),_h),CW=class{constructor(...t){$t(this,"defaults",nb());$t(this,"options",this.setOptions);$t(this,"parse",this.parseMarkdown(!0));$t(this,"parseInline",this.parseMarkdown(!1));$t(this,"Parser",wo);$t(this,"Renderer",gf);$t(this,"TextRenderer",db);$t(this,"Lexer",Co);$t(this,"Tokenizer",pf);$t(this,"Hooks",Zc);this.use(...t)}walkTokens(t,r){var i,o;let n=[];for(let a of t)switch(n=n.concat(r.call(this,a)),a.type){case"table":{let c=a;for(let u of c.header)n=n.concat(this.walkTokens(u.tokens,r));for(let u of c.rows)for(let d of u)n=n.concat(this.walkTokens(d.tokens,r));break}case"list":{let c=a;n=n.concat(this.walkTokens(c.items,r));break}default:{let c=a;(o=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&o[c.type]?this.defaults.extensions.childTokens[c.type].forEach(u=>{let d=c[u].flat(1/0);n=n.concat(this.walkTokens(d,r))}):c.tokens&&(n=n.concat(this.walkTokens(c.tokens,r)))}}return n}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=r.renderers[o.name];a?r.renderers[o.name]=function(...c){let u=o.renderer.apply(this,c);return u===!1&&(u=a.apply(this,c)),u}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[o.level];a?a.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),i.extensions=r),n.renderer){let o=this.defaults.renderer||new gf(this.defaults);for(let a in n.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let c=a,u=n.renderer[c],d=o[c];o[c]=(...f)=>{let p=u.apply(o,f);return p===!1&&(p=d.apply(o,f)),p||""}}i.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new pf(this.defaults);for(let a in n.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let c=a,u=n.tokenizer[c],d=o[c];o[c]=(...f)=>{let p=u.apply(o,f);return p===!1&&(p=d.apply(o,f)),p}}i.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new Zc;for(let a in n.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let c=a,u=n.hooks[c],d=o[c];Zc.passThroughHooks.has(a)?o[c]=f=>{if(this.defaults.async&&Zc.passThroughHooksRespectAsync.has(a))return(async()=>{let g=await u.call(o,f);return d.call(o,g)})();let p=u.call(o,f);return d.call(o,p)}:o[c]=(...f)=>{if(this.defaults.async)return(async()=>{let g=await u.apply(o,f);return g===!1&&(g=await d.apply(o,f)),g})();let p=u.apply(o,f);return p===!1&&(p=d.apply(o,f)),p}}i.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,a=n.walkTokens;i.walkTokens=function(c){let u=[];return u.push(a.call(this,c)),o&&(u=u.concat(o.call(this,c))),u}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Co.lex(t,r??this.defaults)}parser(t,r){return wo.parse(t,r??this.defaults)}parseMarkdown(t){return(r,n)=>{let i={...n},o={...this.defaults,...i},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(r):r,u=await(o.hooks?await o.hooks.provideLexer():t?Co.lex:Co.lexInline)(c,o),d=o.hooks?await o.hooks.processAllTokens(u):u;o.walkTokens&&await Promise.all(this.walkTokens(d,o.walkTokens));let f=await(o.hooks?await o.hooks.provideParser():t?wo.parse:wo.parseInline)(d,o);return o.hooks?await o.hooks.postprocess(f):f})().catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let c=(o.hooks?o.hooks.provideLexer():t?Co.lex:Co.lexInline)(r,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let u=(o.hooks?o.hooks.provideParser():t?wo.parse:wo.parseInline)(c,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(c){return a(c)}}}onError(t,r){return n=>{if(n.message+=`
543
+ Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+Mo(n.message+"",!0)+"</pre>";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},Oa=new CW;function Rr(e,t){return Oa.parse(e,t)}Rr.options=Rr.setOptions=function(e){return Oa.setOptions(e),Rr.defaults=Oa.defaults,a4(Rr.defaults),Rr};Rr.getDefaults=nb;Rr.defaults=La;Rr.use=function(...e){return Oa.use(...e),Rr.defaults=Oa.defaults,a4(Rr.defaults),Rr};Rr.walkTokens=function(e,t){return Oa.walkTokens(e,t)};Rr.parseInline=Oa.parseInline;Rr.Parser=wo;Rr.parser=wo.parse;Rr.Renderer=gf;Rr.TextRenderer=db;Rr.Lexer=Co;Rr.lexer=Co.lex;Rr.Tokenizer=pf;Rr.Hooks=Zc;Rr.parse=Rr;Rr.options;Rr.setOptions;Rr.use;Rr.walkTokens;Rr.parseInline;wo.parse;Co.lex;function ya(e){if(!e)return"";try{return Rr.parse(e,{breaks:!0})}catch{return uf(e)}}const wW="_helpBtn_cvsqb_1",xW="_modalBody_cvsqb_24",EW="_spinWrap_cvsqb_54",Ag={helpBtn:wW,modalBody:xW,spinWrap:EW},$W=new Set(["Tool-Bash","Tool-Read","Tool-Edit","Tool-Write","Tool-Glob","Tool-Grep","Tool-NotebookEdit","Tool-WebFetch","Tool-WebSearch","Tool-Task","Tool-Agent","Tool-TaskOutput","Tool-TaskStop","Tool-TaskCreate","Tool-TaskGet","Tool-TaskUpdate","Tool-TaskList","Tool-EnterPlanMode","Tool-ExitPlanMode","Tool-AskUserQuestion","Tool-Skill","Tool-getDiagnostics","Tool-executeCode","MainAgent","Tools","CacheRebuild","BodyDiffJSON","TranslateContextPollution"]);function Al({doc:e}){const[t,r]=h.useState(!1),[n,i]=h.useState(!1),[o,a]=h.useState(""),[c,u]=h.useState("");if(!e||!$W.has(e))return null;const d=h.useCallback(async()=>{r(!0),i(!0),a(""),u(e);const f=Xl();let p=null;try{const g=await fetch(`/api/concept?lang=${f}&doc=${encodeURIComponent(e)}`);g.ok&&(p=await g.text())}catch{}if(p){const g=p.match(/^#\s+(.+)/m);g&&u(g[1]),a(ya(p))}else a("<p>Document not found.</p>");i(!1)},[e]);return $.jsxs($.Fragment,{children:[$.jsx("span",{className:Ag.helpBtn,onClick:f=>{f.stopPropagation(),d()},children:"?"}),$.jsx(ki,{title:c,open:t,onCancel:()=>r(!1),footer:null,width:640,styles:{header:{background:"#1a1a1a"},body:{background:"#111",padding:"16px 24px 24px"},content:{background:"#1a1a1a",padding:"12px 20px"}},children:n?$.jsx("div",{className:Ag.spinWrap,children:$.jsx(Ta,{})}):$.jsx("div",{className:Ag.modalBody,dangerouslySetInnerHTML:{__html:o}})})]})}const kW="_headerBar_1ata5_2",RW="_titleText_1ata5_11",TW="_logoImage_1ata5_17",PW="_titleArrow_1ata5_25",OW="_tokenStatsTag_1ata5_31",IW="_tokenStatsIcon_1ata5_39",NW="_liveTag_1ata5_44",MW="_liveDotWrap_1ata5_48",zW="_liveSpinner_1ata5_70",jW="_liveSpinnerDiag_1ata5_75",BW="_inflightList_1ata5_90",LW="_inflightItem_1ata5_94",DW="_inflightTag_1ata5_106",AW="_inflightModel_1ata5_112",HW="_inflightTime_1ata5_117",FW="_liveTagHistory_1ata5_123",WW="_liveTagText_1ata5_129",VW="_countdownStrong_1ata5_134",UW="_langSelector_1ata5_139",qW="_settingsBtn_1ata5_150",KW="_settingsItem_1ata5_166",GW="_settingsLabel_1ata5_173",XW="_tokenStatsEmpty_1ata5_178",YW="_tokenStatsContainer_1ata5_185",JW="_tokenStatsColumn_1ata5_191",QW="_toolStatsColumn_1ata5_195",ZW="_modelCard_1ata5_200",eV="_modelCardSpaced_1ata5_207 _modelCard_1ata5_200",tV="_modelName_1ata5_213",rV="_statsTable_1ata5_223",nV="_th_1ata5_228",iV="_td_1ata5_238",oV="_label_1ata5_247",sV="_rowBorder_1ata5_257",aV="_rebuildTotalRow_1ata5_269",lV="_promptExportBar_1ata5_278",cV="_promptScrollArea_1ata5_282",uV="_promptEmpty_1ata5_287",dV="_promptTimestamp_1ata5_293",hV="_textPromptCard_1ata5_301",fV="_preText_1ata5_310",mV="_systemCollapse_1ata5_320",pV="_systemLabel_1ata5_327",gV="_preSys_1ata5_332",vV="_promptTextarea_1ata5_342",yV="_projectStatsCenter_1ata5_358",bV="_projectStatsEmpty_1ata5_364",_V="_projectStatsContent_1ata5_371",SV="_projectStatsUpdated_1ata5_377",CV="_projectStatsSummary_1ata5_383",wV="_projectStatCard_1ata5_389",xV="_projectStatValue_1ata5_397",EV="_projectStatLabel_1ata5_405",$V="_projectStatsSection_1ata5_411",kV="_projectStatsSectionTitle_1ata5_417",RV="_projectStatsModelCard_1ata5_425",TV="_projectStatsModelHeader_1ata5_432",PV="_projectStatsModelName_1ata5_441",OV="_projectStatsModelCount_1ata5_447",ge={headerBar:kW,titleText:RW,logoImage:TW,titleArrow:PW,tokenStatsTag:OW,tokenStatsIcon:IW,liveTag:NW,liveDotWrap:MW,liveSpinner:zW,liveSpinnerDiag:jW,inflightList:BW,inflightItem:LW,inflightTag:DW,inflightModel:AW,inflightTime:HW,liveTagHistory:FW,liveTagText:WW,countdownStrong:VW,langSelector:UW,settingsBtn:qW,settingsItem:KW,settingsLabel:GW,tokenStatsEmpty:XW,tokenStatsContainer:YW,tokenStatsColumn:JW,toolStatsColumn:QW,modelCard:ZW,modelCardSpaced:eV,modelName:tV,statsTable:rV,th:nV,td:iV,label:oV,rowBorder:sV,rebuildTotalRow:aV,promptExportBar:lV,promptScrollArea:cV,promptEmpty:uV,promptTimestamp:dV,textPromptCard:hV,preText:fV,systemCollapse:mV,systemLabel:pV,preSys:gV,promptTextarea:vV,projectStatsCenter:yV,projectStatsEmpty:bV,projectStatsContent:_V,projectStatsUpdated:SV,projectStatsSummary:CV,projectStatCard:wV,projectStatValue:xV,projectStatLabel:EV,projectStatsSection:$V,projectStatsSectionTitle:kV,projectStatsModelCard:RV,projectStatsModelHeader:TV,projectStatsModelName:PV,projectStatsModelCount:OV},Zw=[{value:"zh",short:"zh",label:"简体中文"},{value:"en",short:"en",label:"English"},{value:"zh-TW",short:"zh-TW",label:"繁體中文"},{value:"ko",short:"ko",label:"한국어"},{value:"ja",short:"ja",label:"日本語"},{value:"de",short:"de",label:"Deutsch"},{value:"es",short:"es",label:"Español"},{value:"fr",short:"fr",label:"Français"},{value:"it",short:"it",label:"Italiano"},{value:"da",short:"da",label:"Dansk"},{value:"pl",short:"pl",label:"Polski"},{value:"ru",short:"ru",label:"Русский"},{value:"ar",short:"ar",label:"العربية"},{value:"no",short:"no",label:"Norsk"},{value:"pt-BR",short:"pt-BR",label:"Português (Brasil)"},{value:"th",short:"th",label:"ไทย"},{value:"tr",short:"tr",label:"Türkçe"},{value:"uk",short:"uk",label:"Українська"}],{Text:IV}=Xo,zl=class zl extends Q.Component{constructor(r){super(r);$t(this,"handleShowPrompts",()=>{this.setState({promptModalVisible:!0,promptData:this.extractUserPrompts()})});$t(this,"handleExportPromptsTxt",()=>{const r=this.state.promptData;if(!r||r.length===0)return;const n=[];for(const c of r){const u=[],d=c.timestamp?new Date(c.timestamp).toLocaleString():"";d&&u.push(`${d}:
544
+ `);const f=(c.segments||[]).filter(p=>p.type==="text").map(p=>p.content);f.length>0&&u.push(f.join(`
545
+ `)),n.push(u.join(`
546
+ `))}if(n.length===0)return;const i=new Blob([n.join(`
547
+
548
+
549
+
550
+ `)],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(i),a=document.createElement("a");a.href=o,a.download=`user-prompts-${new Date().toISOString().slice(0,10)}.txt`,a.click(),URL.revokeObjectURL(o)});$t(this,"handleShowProjectStats",()=>{this.setState({projectStatsVisible:!0,projectStatsLoading:!0}),fetch("/api/project-stats").then(r=>{if(!r.ok)throw new Error("not found");return r.json()}).then(r=>this.setState({projectStats:r,projectStatsLoading:!1})).catch(()=>this.setState({projectStats:null,projectStatsLoading:!1}))});this.state={countdownText:"",promptModalVisible:!1,promptData:[],promptViewMode:"original",settingsDrawerVisible:!1,globalSettingsVisible:!1,projectStatsVisible:!1,projectStats:null,projectStatsLoading:!1},this._rafId=null,this._expiredTimer=null,this.updateCountdown=this.updateCountdown.bind(this)}componentDidMount(){this.startCountdown()}componentDidUpdate(r){r.cacheExpireAt!==this.props.cacheExpireAt&&this.startCountdown()}componentWillUnmount(){this._rafId&&cancelAnimationFrame(this._rafId),this._expiredTimer&&clearTimeout(this._expiredTimer)}startCountdown(){if(this._rafId&&cancelAnimationFrame(this._rafId),this._expiredTimer&&clearTimeout(this._expiredTimer),!this.props.cacheExpireAt){this.setState({countdownText:""});return}this._rafId=requestAnimationFrame(this.updateCountdown)}updateCountdown(){const{cacheExpireAt:r}=this.props;if(!r){this.setState({countdownText:""});return}const n=Math.max(0,r-Date.now());if(n<=0){this.setState({countdownText:we("ui.cacheExpired")}),this._expiredTimer=setTimeout(()=>{this.setState({countdownText:""})},5e3);return}const i=Math.ceil(n/1e3);let o;if(i>=60){const a=Math.floor(i/60),c=i%60;o=we("ui.minuteSecond",{m:a,s:String(c).padStart(2,"0")})}else o=we("ui.second",{s:i});this.setState({countdownText:o}),this._rafId=requestAnimationFrame(this.updateCountdown)}static parseSegments(r){const n=[],i=/<([a-zA-Z_][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>/g;let o=0,a;for(;(a=i.exec(r))!==null;){const u=r.slice(o,a.index).trim();u&&n.push({type:"text",content:u});const d=a[1];if(o=a.index+a[0].length,zl.COMMAND_TAGS.has(d))continue;const f=new RegExp(`^<${d}(?:\\s[^>]*)?>([\\s\\S]*)<\\/${d}>$`),p=a[0].match(f),g=p?p[1].trim():a[0].trim();n.push({type:"system",content:g,label:d})}const c=r.slice(o).trim();return c&&n.push({type:"text",content:c}),n}static extractUserTexts(r){const n=[],i=[];let o=null;for(const a of r)if(a.role==="user"){if(typeof a.content=="string"){const c=a.content.trim();if(!c)continue;if(!Zy(c)){if(/^Implement the following plan:/i.test(c))continue;n.push(c),i.push(c)}}else if(Array.isArray(a.content)){const{commands:c,textBlocks:u}=i4(a.content);c.length>0&&(o=c[c.length-1]);const d=[];for(const p of u)/^Implement the following plan:/i.test((p.text||"").trim())||d.push(p.text.trim());const f=a.content.filter(p=>{var g;return p.type==="text"&&((g=p.text)==null?void 0:g.trim())}).map(p=>p.text.trim());d.length>0&&(n.push(d.join(`
551
+ `)),i.push(f.join(`
552
+ `)))}}return{userMsgs:n,fullTexts:i,slashCmd:o}}extractUserPrompts(){var c;const{requests:r=[]}=this.props,n=[],i=new Set;let o=null;const a=r.filter(u=>Wn(u));for(let u=0;u<a.length;u++){const d=a[u],f=((c=d.body)==null?void 0:c.messages)||[],p=d.timestamp||"",{userMsgs:g,fullTexts:v,slashCmd:b}=zl.extractUserTexts(f);b&&b!=="/compact"&&b!==o&&n.push({type:"prompt",segments:[{type:"text",content:b}],timestamp:p}),o=b;for(let S=0;S<g.length;S++){const _=g[S];if(i.has(_))continue;i.add(_);const C=v[S]||_;n.push({type:"prompt",segments:zl.parseSegments(C),timestamp:p})}}return n}renderTokenStats(){const{requests:r=[]}=this.props,n=_F(r),i=Object.keys(n),o=CF(r),a=wF(r);if(i.length===0&&o.length===0)return $.jsx("div",{className:ge.tokenStatsEmpty,children:"暂无 token 数据"});const c=$.jsx("div",{className:ge.tokenStatsColumn,children:i.map(p=>{const g=n[p],v=g.input+g.cacheCreation+g.cacheRead,b=v>0?(g.cacheRead/v*100).toFixed(1):"0.0";return $.jsxs("div",{className:i.length>1?ge.modelCardSpaced:ge.modelCard,children:[$.jsx("div",{className:ge.modelName,children:p}),$.jsx("table",{className:ge.statsTable,children:$.jsxs("tbody",{children:[$.jsxs("tr",{children:[$.jsx("td",{className:ge.label,children:"Token"}),$.jsx("td",{className:ge.th,children:"input"}),$.jsx("td",{className:ge.th,children:"output"})]}),$.jsxs("tr",{className:ge.rowBorder,children:[$.jsx("td",{className:ge.label}),$.jsx("td",{className:ge.td,children:ln(v)}),$.jsx("td",{className:ge.td,children:ln(g.output)})]}),$.jsxs("tr",{children:[$.jsx("td",{className:ge.label,children:"Cache"}),$.jsx("td",{className:ge.th,children:"create"}),$.jsx("td",{className:ge.th,children:"read"})]}),$.jsxs("tr",{className:ge.rowBorder,children:[$.jsx("td",{className:ge.label}),$.jsx("td",{className:ge.td,children:ln(g.cacheCreation)}),$.jsx("td",{className:ge.td,children:ln(g.cacheRead)})]}),$.jsxs("tr",{children:[$.jsx("td",{className:ge.label,children:we("ui.hitRate")}),$.jsxs("td",{colSpan:2,className:ge.td,children:[b,"%"]})]})]})})]},p)})}),u=this.renderCacheRebuildStats(),d=o.length>0?$.jsx("div",{className:ge.toolStatsColumn,children:$.jsxs("div",{className:ge.modelCard,children:[$.jsx("div",{className:ge.modelName,children:we("ui.toolUsageStats")}),$.jsxs("table",{className:ge.statsTable,children:[$.jsx("thead",{children:$.jsxs("tr",{children:[$.jsx("td",{className:ge.th,style:{textAlign:"left"},children:"Tool"}),$.jsx("td",{className:ge.th,children:we("ui.cacheRebuild.count")})]})}),$.jsxs("tbody",{children:[o.map(([p,g])=>$.jsxs("tr",{className:ge.rowBorder,children:[$.jsxs("td",{className:ge.label,children:[p," ",$.jsx(Al,{doc:`Tool-${p}`})]}),$.jsx("td",{className:ge.td,children:g})]},p)),o.length>1&&$.jsxs("tr",{className:ge.rebuildTotalRow,children:[$.jsx("td",{className:ge.label,children:"Total"}),$.jsx("td",{className:ge.td,children:o.reduce((p,g)=>p+g[1],0)})]})]})]})]})}):null,f=a.length>0?$.jsx("div",{className:ge.toolStatsColumn,children:$.jsxs("div",{className:ge.modelCard,children:[$.jsx("div",{className:ge.modelName,children:we("ui.skillUsageStats")}),$.jsxs("table",{className:ge.statsTable,children:[$.jsx("thead",{children:$.jsxs("tr",{children:[$.jsx("td",{className:ge.th,style:{textAlign:"left"},children:"Skill"}),$.jsx("td",{className:ge.th,children:we("ui.cacheRebuild.count")})]})}),$.jsxs("tbody",{children:[a.map(([p,g])=>$.jsxs("tr",{className:ge.rowBorder,children:[$.jsx("td",{className:ge.label,children:p}),$.jsx("td",{className:ge.td,children:g})]},p)),a.length>1&&$.jsxs("tr",{className:ge.rebuildTotalRow,children:[$.jsx("td",{className:ge.label,children:"Total"}),$.jsx("td",{className:ge.td,children:a.reduce((p,g)=>p+g[1],0)})]})]})]})]})}):null;return $.jsxs("div",{className:ge.tokenStatsContainer,children:[c,u,d,f]})}renderCacheRebuildStats(){const{requests:r=[]}=this.props,n=SF(r),i=["ttl","system_change","tools_change","model_change","msg_truncated","msg_modified","key_change"],o={ttl:"ttl",system_change:"systemChange",tools_change:"toolsChange",model_change:"modelChange",msg_truncated:"msgTruncated",msg_modified:"msgModified",key_change:"keyChange"},a=i.filter(v=>n[v].count>0),c=a.reduce((v,b)=>v+n[b].count,0),u=a.reduce((v,b)=>v+n[b].cacheCreate,0),d={};for(let v=0;v<r.length;v++){const b=Pa(r[v],r[v+1]);if(b.type==="SubAgent"){const S=b.subType||"Other";d[S]=(d[S]||0)+1}}const f=Object.entries(d).sort((v,b)=>b[1]-v[1]),p=a.length>0,g=f.length>0;return!p&&!g?null:$.jsxs("div",{className:ge.toolStatsColumn,children:[p&&$.jsxs("div",{className:g?ge.modelCardSpaced:ge.modelCard,children:[$.jsxs("div",{className:ge.modelName,children:["MainAgent",$.jsx(Al,{doc:"MainAgent"})," ",we("ui.cacheRebuildStats"),$.jsx(Al,{doc:"CacheRebuild"})]}),$.jsxs("table",{className:ge.statsTable,children:[$.jsx("thead",{children:$.jsxs("tr",{children:[$.jsx("td",{className:ge.th,style:{textAlign:"left"},children:we("ui.cacheRebuild.reason")}),$.jsx("td",{className:ge.th,children:we("ui.cacheRebuild.count")}),$.jsx("td",{className:ge.th,children:we("ui.cacheRebuild.cacheCreate")})]})}),$.jsxs("tbody",{children:[a.map(v=>$.jsxs("tr",{className:ge.rowBorder,children:[$.jsx("td",{className:ge.label,children:we(`ui.cacheRebuild.${o[v]}`)}),$.jsx("td",{className:ge.td,children:n[v].count}),$.jsx("td",{className:ge.td,children:ln(n[v].cacheCreate)})]},v)),a.length>1&&$.jsxs("tr",{className:ge.rebuildTotalRow,children:[$.jsx("td",{className:ge.label,children:"Total"}),$.jsx("td",{className:ge.td,children:c}),$.jsx("td",{className:ge.td,children:ln(u)})]})]})]})]}),g&&$.jsxs("div",{className:ge.modelCard,children:[$.jsx("div",{className:ge.modelName,children:we("ui.subAgentStats")}),$.jsxs("table",{className:ge.statsTable,children:[$.jsx("thead",{children:$.jsxs("tr",{children:[$.jsx("td",{className:ge.th,style:{textAlign:"left"},children:"SubAgent"}),$.jsx("td",{className:ge.th,children:we("ui.cacheRebuild.count")})]})}),$.jsxs("tbody",{children:[f.map(([v,b])=>$.jsxs("tr",{className:ge.rowBorder,children:[$.jsx("td",{className:ge.label,children:v}),$.jsx("td",{className:ge.td,children:b})]},v)),f.length>1&&$.jsxs("tr",{className:ge.rebuildTotalRow,children:[$.jsx("td",{className:ge.label,children:"Total"}),$.jsx("td",{className:ge.td,children:f.reduce((v,b)=>v+b[1],0)})]})]})]})]})]})}renderTextPrompt(r){return $.jsx("div",{className:ge.textPromptCard,children:r.segments.map((n,i)=>n.type==="text"?$.jsx("pre",{className:ge.preText,children:n.content},i):$.jsx(Xc,{size:"small",className:ge.systemCollapse,items:[{key:`sys-${i}`,label:$.jsx("span",{className:ge.systemLabel,children:n.label}),children:$.jsx("pre",{className:ge.preSys,children:n.content})}]},i))})}renderOriginalPrompt(r){const n=r.segments.filter(i=>i.type==="text");return n.length===0?null:$.jsx("div",{className:ge.textPromptCard,children:n.map((i,o)=>$.jsx("pre",{className:ge.preText,children:i.content},o))})}buildTextModeContent(){const{promptData:r}=this.state,n=[];for(const i of r){const o=(i.segments||[]).filter(a=>a.type==="text").map(a=>a.content);o.length>0&&n.push(o.join(`
553
+ `))}return n.join(`
554
+
555
+
556
+ `)}renderProjectStatsContent(){const{projectStats:r,projectStatsLoading:n}=this.state;if(n)return $.jsx("div",{className:ge.projectStatsCenter,children:$.jsx(Ta,{})});if(!r)return $.jsx("div",{className:ge.projectStatsEmpty,children:we("ui.projectStats.noData")});const{summary:i,models:o,updatedAt:a}=r;o&&Object.entries(o).sort((d,f)=>f[1]-d[1]);const c={};if(r.files){for(const d of Object.values(r.files))if(d.models)for(const[f,p]of Object.entries(d.models))c[f]||(c[f]={input:0,output:0,cacheRead:0,cacheCreation:0,count:0}),c[f].input+=p.input_tokens||0,c[f].output+=p.output_tokens||0,c[f].cacheRead+=p.cache_read_input_tokens||0,c[f].cacheCreation+=p.cache_creation_input_tokens||0,c[f].count+=p.count||0}const u=Object.entries(c).sort((d,f)=>f[1].count-d[1].count);return $.jsxs("div",{className:ge.projectStatsContent,children:[a&&$.jsx("div",{className:ge.projectStatsUpdated,children:we("ui.projectStats.updatedAt",{time:new Date(a).toLocaleString()})}),$.jsxs("div",{className:ge.projectStatsSummary,children:[$.jsxs("div",{className:ge.projectStatCard,children:[$.jsx("div",{className:ge.projectStatValue,children:(i==null?void 0:i.requestCount)??0}),$.jsx("div",{className:ge.projectStatLabel,children:we("ui.projectStats.totalRequests")})]}),$.jsxs("div",{className:ge.projectStatCard,children:[$.jsx("div",{className:ge.projectStatValue,children:(i==null?void 0:i.sessionCount)??0}),$.jsx("div",{className:ge.projectStatLabel,children:we("ui.projectStats.sessionCount")})]}),$.jsxs("div",{className:ge.projectStatCard,children:[$.jsx("div",{className:ge.projectStatValue,children:(i==null?void 0:i.fileCount)??0}),$.jsx("div",{className:ge.projectStatLabel,children:we("ui.projectStats.totalFiles")})]}),$.jsxs("div",{className:ge.projectStatCard,children:[$.jsx("div",{className:ge.projectStatValue,children:ln(i==null?void 0:i.input_tokens)}),$.jsx("div",{className:ge.projectStatLabel,children:"Input Tokens"})]}),$.jsxs("div",{className:ge.projectStatCard,children:[$.jsx("div",{className:ge.projectStatValue,children:ln(i==null?void 0:i.output_tokens)}),$.jsx("div",{className:ge.projectStatLabel,children:"Output Tokens"})]})]}),u.length>0&&$.jsxs("div",{className:ge.projectStatsSection,children:[$.jsx("div",{className:ge.projectStatsSectionTitle,children:we("ui.projectStats.modelUsage")}),u.map(([d,f])=>{const p=f.input+f.cacheRead+f.cacheCreation,g=p>0?(f.cacheRead/p*100).toFixed(1):"0.0";return $.jsxs("div",{className:ge.projectStatsModelCard,children:[$.jsxs("div",{className:ge.projectStatsModelHeader,children:[$.jsx("span",{className:ge.projectStatsModelName,children:d}),$.jsxs("span",{className:ge.projectStatsModelCount,children:[f.count," reqs"]})]}),$.jsx("table",{className:ge.statsTable,children:$.jsxs("tbody",{children:[$.jsxs("tr",{children:[$.jsx("td",{className:ge.label,children:"Token"}),$.jsx("td",{className:ge.th,children:"input"}),$.jsx("td",{className:ge.th,children:"output"})]}),$.jsxs("tr",{className:ge.rowBorder,children:[$.jsx("td",{className:ge.label}),$.jsx("td",{className:ge.td,children:ln(p)}),$.jsx("td",{className:ge.td,children:ln(f.output)})]}),$.jsxs("tr",{children:[$.jsx("td",{className:ge.label,children:"Cache"}),$.jsx("td",{className:ge.th,children:"create"}),$.jsx("td",{className:ge.th,children:"read"})]}),$.jsxs("tr",{className:ge.rowBorder,children:[$.jsx("td",{className:ge.label}),$.jsx("td",{className:ge.td,children:ln(f.cacheCreation)}),$.jsx("td",{className:ge.td,children:ln(f.cacheRead)})]}),$.jsxs("tr",{children:[$.jsx("td",{className:ge.label,children:we("ui.hitRate")}),$.jsxs("td",{colSpan:2,className:ge.td,children:[g,"%"]})]})]})})]},d)})]})]})}render(){var D;const{requestCount:r,requests:n=[],viewMode:i,cacheType:o,onToggleViewMode:a,onImportLocalLogs:c,onLangChange:u,isLocalLog:d,localLogFile:f,projectName:p,collapseToolResults:g,onCollapseToolResultsChange:v,expandThinking:b,onExpandThinkingChange:S,expandDiff:_,onExpandDiffChange:C,filterIrrelevant:x,onFilterIrrelevantChange:E,updateInfo:k,onDismissUpdate:P,cliMode:T,terminalVisible:O,onToggleTerminal:N}=this.props,{countdownText:I}=this.state,z=[{key:"import-local",icon:$.jsx(cF,{}),label:we("ui.importLocalLogs"),onClick:c},{key:"export-prompts",icon:$.jsx(sF,{}),label:we("ui.exportPrompts"),onClick:this.handleShowPrompts},{type:"divider"},{key:"project-stats",icon:$.jsx(Ww,{}),label:we("ui.projectStats"),onClick:this.handleShowProjectStats},{key:"global-settings",icon:$.jsx(Vw,{}),label:we("ui.globalSettings"),onClick:()=>this.setState({globalSettingsVisible:!0})}];return $.jsxs("div",{className:ge.headerBar,children:[$.jsxs(ls,{size:"middle",children:[$.jsx(a0,{menu:{items:z},trigger:["hover"],children:$.jsxs(IV,{strong:!0,className:ge.titleText,children:[$.jsx("img",{src:"/favicon.ico",alt:"Logo",className:ge.logoImage}),"CC-Viewer ",$.jsx(Nl,{className:ge.titleArrow})]})}),$.jsx(e0,{content:this.renderTokenStats(),trigger:"hover",placement:"bottomLeft",overlayInnerStyle:{background:"#1e1e1e",border:"1px solid #3a3a3a",borderRadius:8,padding:"8px 8px"},children:$.jsxs(Ai,{className:ge.tokenStatsTag,children:[$.jsx(nF,{className:ge.tokenStatsIcon}),we("ui.tokenStats")]})}),(()=>{const M=d?[]:(n||[]).filter(L=>!L.response),j=M.length>0,B=d?null:j?$.jsxs("svg",{className:ge.liveSpinner,width:"10",height:"10",viewBox:"0 0 10 10",children:[$.jsx("line",{x1:"5",y1:"1",x2:"5",y2:"9",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round"}),$.jsx("line",{x1:"1",y1:"5",x2:"9",y2:"5",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round"}),$.jsx("line",{x1:"2.2",y1:"2.2",x2:"7.8",y2:"7.8",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round",className:ge.liveSpinnerDiag}),$.jsx("line",{x1:"7.8",y1:"2.2",x2:"2.2",y2:"7.8",stroke:"#52c41a",strokeWidth:"1.5",strokeLinecap:"round",className:ge.liveSpinnerDiag})]}):$.jsx(ok,{status:"processing",color:"green"}),F=!d&&!j,W=B&&$.jsx("span",{className:ge.liveDotWrap,children:F?$.jsx(Vo,{title:we("ui.noInflightRequests"),placement:"bottom",children:B}):B}),V=$.jsxs(Ai,{color:d?void 0:"green",className:`${ge.liveTag} ${d?ge.liveTagHistory:""}`,children:[W,$.jsx("span",{className:ge.liveTagText,children:d?we("ui.historyLog",{file:f}):we("ui.liveMonitoring")+(p?`:${p}`:"")})]});if(j){const L=$.jsx("div",{className:ge.inflightList,children:M.map((G,q)=>{var ne;const A=Pa(G),U=ff(A.type,A.subType),Y=((ne=G.body)==null?void 0:ne.model)||"",Z=Y.includes("-")?Y.split("-").slice(0,2).join("-"):Y,te=new Date(G.timestamp).toLocaleTimeString("zh-CN");return $.jsxs("div",{className:ge.inflightItem,children:[$.jsx("span",{className:ge.inflightTag,children:U}),$.jsx("span",{className:ge.inflightModel,children:Z}),$.jsx("span",{className:ge.inflightTime,children:te})]},q)})});return $.jsx(e0,{content:L,title:we("ui.inflightRequests"),placement:"bottom",children:V})}return V})(),k&&$.jsx(Ai,{color:k.type==="completed"?"green":"orange",closable:!0,onClose:()=>P&&P(),children:k.type==="completed"?we("ui.update.completed",{version:k.version}):we("ui.update.majorAvailable",{version:k.version})})]}),$.jsxs(ls,{size:"middle",children:[I&&$.jsxs(Ai,{color:I===we("ui.cacheExpired")?"red":"green",children:[we("ui.cacheCountdown",{type:o?`(${o})`:""}),$.jsx("strong",{className:ge.countdownStrong,children:I})]}),i==="chat"&&$.jsxs("span",{className:ge.settingsBtn,onClick:()=>this.setState({settingsDrawerVisible:!0}),children:[$.jsx(Vw,{})," ",we("ui.settings")]}),$.jsx(a0,{trigger:["hover"],placement:"bottom",menu:{items:Zw.map(M=>({key:M.value,label:M.label,style:M.value===Xl()?{color:"#3b82f6"}:{}})),onClick:({key:M})=>{rb(M),u&&u()}},children:$.jsx("span",{className:ge.langSelector,children:((D=Zw.find(M=>M.value===Xl()))==null?void 0:D.short)||"zh"})}),T&&i==="chat"&&$.jsx(cn,{type:O?"primary":"default",ghost:O,icon:$.jsx(jh,{}),onClick:N,children:we("ui.terminal")}),$.jsx(cn,{type:i==="raw"?"primary":"default",icon:i==="raw"?$.jsx(hF,{}):$.jsx(lu,{}),onClick:a,children:we(i==="raw"?"ui.chatMode":"ui.rawMode")})]}),$.jsxs(ki,{title:`${we("ui.userPrompt")} (${this.state.promptData.length}${we("ui.promptCountUnit")})`,open:this.state.promptModalVisible,onCancel:()=>this.setState({promptModalVisible:!1}),footer:null,width:700,children:[$.jsx("div",{className:ge.promptExportBar,children:$.jsx(cn,{icon:$.jsx(YH,{}),onClick:this.handleExportPromptsTxt,children:we("ui.exportPromptsTxt")})}),$.jsx(qy,{activeKey:this.state.promptViewMode,onChange:M=>this.setState({promptViewMode:M}),size:"small",items:[{key:"original",label:we("ui.promptModeOriginal")},{key:"context",label:we("ui.promptModeContext")},{key:"text",label:we("ui.promptModeText")}]}),this.state.promptViewMode==="text"?$.jsx("textarea",{readOnly:!0,className:ge.promptTextarea,value:this.buildTextModeContent()}):$.jsxs("div",{className:ge.promptScrollArea,children:[this.state.promptData.length===0&&$.jsx("div",{className:ge.promptEmpty,children:we("ui.noPrompt")}),this.state.promptData.map((M,j)=>{const B=M.timestamp?new Date(M.timestamp).toLocaleString():we("ui.unknownTime");return $.jsxs("div",{children:[$.jsxs("div",{className:ge.promptTimestamp,children:[B,":"]}),this.state.promptViewMode==="original"?this.renderOriginalPrompt(M):this.renderTextPrompt(M)]},j)})]})]}),$.jsxs(Mh,{title:we("ui.settings"),placement:"right",width:320,open:this.state.settingsDrawerVisible,onClose:()=>this.setState({settingsDrawerVisible:!1}),children:[$.jsxs("div",{className:ge.settingsItem,children:[$.jsx("span",{className:ge.settingsLabel,children:we("ui.collapseToolResults")}),$.jsx(Qc,{checked:!!g,onChange:M=>v&&v(M)})]}),$.jsxs("div",{className:ge.settingsItem,children:[$.jsx("span",{className:ge.settingsLabel,children:we("ui.expandThinking")}),$.jsx(Qc,{checked:!!b,onChange:M=>S&&S(M)})]})]}),$.jsxs(Mh,{title:we("ui.globalSettings"),placement:"left",width:400,open:this.state.globalSettingsVisible,onClose:()=>this.setState({globalSettingsVisible:!1}),children:[$.jsxs("div",{className:ge.settingsItem,children:[$.jsx("span",{className:ge.settingsLabel,children:we("ui.filterIrrelevant")}),$.jsx(Qc,{checked:!!x,onChange:M=>E&&E(M)})]}),$.jsxs("div",{className:ge.settingsItem,children:[$.jsx("span",{className:ge.settingsLabel,children:we("ui.expandDiff")}),$.jsx(Qc,{checked:!!_,onChange:M=>C&&C(M)})]})]}),$.jsx(Mh,{title:$.jsxs("span",{children:[$.jsx(Ww,{style:{marginRight:8}}),we("ui.projectStats")]}),placement:"left",width:400,open:this.state.projectStatsVisible,onClose:()=>this.setState({projectStatsVisible:!1}),children:this.renderProjectStatsContent()})]})}};$t(zl,"COMMAND_TAGS",new Set(["command-name","command-message","command-args","local-command-caveat","local-command-stdout"]));let h0=zl;const NV="_centerEmpty_ckz8l_1",MV="_scrollContainer_ckz8l_8",zV="_listItem_ckz8l_13",jV="_listItemActive_ckz8l_25",BV="_itemContent_ckz8l_34",LV="_itemHeader_ckz8l_39",DV="_tagNoMargin_ckz8l_47",AV="_modelName_ckz8l_52",HV="_time_ckz8l_56",FV="_detailRow_ckz8l_62",WV="_urlText_ckz8l_69",VV="_duration_ckz8l_78",UV="_statusOk_ckz8l_83",qV="_statusErr_ckz8l_89",KV="_statusDefault_ckz8l_94",GV="_usageBox_ckz8l_99",XV="_cacheDot_ckz8l_109",YV="_cacheDotLoss_ckz8l_118",JV="_cacheDotNormal_ckz8l_123",Gr={centerEmpty:NV,scrollContainer:MV,listItem:zV,listItemActive:jV,itemContent:BV,itemHeader:LV,tagNoMargin:DV,modelName:AV,time:HV,detailRow:FV,urlText:WV,duration:VV,statusOk:UV,statusErr:qV,statusDefault:KV,usageBox:GV,cacheDot:XV,cacheDotLoss:YV,cacheDotNormal:JV};class QV extends Q.Component{constructor(t){super(t),this.activeItemRef=Q.createRef()}componentDidMount(){this.scrollToSelected(!0)}componentDidUpdate(t){this.props.scrollCenter&&t.selectedIndex!==this.props.selectedIndex?this.scrollToSelected(!0):t.requests!==this.props.requests&&this.scrollToSelected(!1)}scrollToSelected(t){this.activeItemRef.current&&(this.activeItemRef.current.scrollIntoView({block:t?"center":"nearest",behavior:"instant"}),t&&this.props.onScrollDone&&this.props.onScrollDone())}render(){const{requests:t,selectedIndex:r,onSelect:n}=this.props;return t.length===0?$.jsx("div",{className:Gr.centerEmpty,children:$.jsx(io,{description:we("ui.waitingRequests")})}):$.jsx("div",{className:Gr.scrollContainer,children:$.jsx(Eu,{dataSource:t,size:"small",split:!1,renderItem:(i,o)=>{var k,P,T;const a=new Date(i.timestamp).toLocaleTimeString("zh-CN"),c=o===r,u=i.response&&i.response.status<400,d=i.response&&i.response.status>=400,f=$F((k=i.body)==null?void 0:k.model),p=o+1<t.length?t[o+1]:null,{type:g,subType:v}=Pa(i,p),b=(T=(P=i.response)==null?void 0:P.body)==null?void 0:T.usage,S=b?(b.input_tokens||0)+(b.cache_read_input_tokens||0)+(b.cache_creation_input_tokens||0):null,_=(b==null?void 0:b.output_tokens)||null,C=(b==null?void 0:b.cache_read_input_tokens)||0,x=(b==null?void 0:b.cache_creation_input_tokens)||0;let E=i.url;try{const O=new URL(i.url);E=O.host+O.pathname}catch{}return $.jsx(Eu.Item,{ref:c?this.activeItemRef:void 0,onClick:()=>n(o),className:`${Gr.listItem} ${c?Gr.listItemActive:""}`,children:$.jsxs("div",{className:Gr.itemContent,children:[$.jsxs("div",{className:Gr.itemHeader,children:[g==="MainAgent"?$.jsx(Ai,{color:"orange",className:Gr.tagNoMargin,children:"MainAgent"}):g==="Plan"?$.jsx(Ai,{className:Gr.tagNoMargin,style:{color:"#a33",borderColor:"#a33",backgroundColor:"#000"},children:ff(g,v)}):g==="Count"||g==="Preflight"?$.jsx(Ai,{className:Gr.tagNoMargin,style:{color:"#666",borderColor:"#444",backgroundColor:"#000"},children:g}):$.jsx(Ai,{className:Gr.tagNoMargin,children:ff(g,v)}),f&&$.jsx("span",{className:Gr.modelName,style:{color:g==="MainAgent"?"#d4822d":"#8c8c8c"},children:f}),$.jsx("span",{className:Gr.time,children:a})]}),$.jsxs("div",{className:Gr.detailRow,children:[$.jsx("span",{className:Gr.urlText,title:i.url,children:E}),i.duration&&$.jsxs("span",{className:Gr.duration,children:[i.duration,"ms"]}),i.response&&$.jsx("span",{className:u?Gr.statusOk:d?Gr.statusErr:Gr.statusDefault,children:i.response.status})]}),b&&$.jsxs("div",{className:Gr.usageBox,children:[$.jsxs("div",{children:["token: output:",ln(_)||0,", input: ",ln(S)||0]}),(C>0||x>0)&&$.jsx("div",{children:(()=>{const O=o4(t,o),N={ttl:"ui.cacheLoss.ttl",system_change:"ui.cacheLoss.systemChange",tools_change:"ui.cacheLoss.toolsChange",model_change:"ui.cacheLoss.modelChange",msg_truncated:"ui.cacheLoss.msgTruncated",msg_modified:"ui.cacheLoss.msgModified",key_change:"ui.cacheLoss.keyChange"};let I;if(O){const D=(O.reasons||[O.reason]).map(M=>we(N[M]||N.key_change)).join(`
557
+ `);I=$.jsx(Vo,{title:$.jsx("span",{style:{whiteSpace:"pre-line"},children:D}),children:$.jsx("span",{className:`${Gr.cacheDot} ${Gr.cacheDotLoss}`})})}else I=$.jsx("span",{className:`${Gr.cacheDot} ${Gr.cacheDotNormal}`});return $.jsxs($.Fragment,{children:["cache",I,": ",C>0?`read:${ln(C)}`:"",C>0&&x>0?", ":"",x>0?`create:${ln(x)}`:""]})})()})]})]})})}})})}}const ZV=e=>typeof e=="boolean"||e instanceof Boolean,eU=e=>typeof e=="number"||e instanceof Number,tU=e=>typeof e=="bigint"||e instanceof BigInt,b4=e=>!!e&&e instanceof Date,rU=e=>typeof e=="string"||e instanceof String,nU=e=>Array.isArray(e),_4=e=>typeof e=="object"&&e!==null,S4=e=>!!e&&e instanceof Object&&typeof e=="function";function vf(e,t){return t===void 0&&(t=!1),!e||t?`"${e}"`:e}function iU(e,t,r){return r?JSON.stringify(e):t?`"${e}"`:e}function C4(e){let{field:t,value:r,data:n,lastElement:i,openBracket:o,closeBracket:a,level:c,style:u,shouldExpandNode:d,clickToExpandNode:f,outerRef:p,beforeExpandChange:g}=e;const v=h.useRef(!1),[b,S]=h.useState(()=>d(c,r,t)),_=h.useRef(null);h.useEffect(()=>{v.current?S(d(c,r,t)):v.current=!0},[d]);const C=h.useId();if(n.length===0)return oU({field:t,openBracket:o,closeBracket:a,lastElement:i,style:u});const x=b?u.collapseIcon:u.expandIcon,E=b?u.ariaLables.collapseJson:u.ariaLables.expandJson,k=c+1,P=n.length-1,T=I=>{b!==I&&(!g||g({level:c,value:r,field:t,newExpandValue:I}))&&S(I)},O=I=>{if(I.key==="ArrowRight"||I.key==="ArrowLeft")I.preventDefault(),T(I.key==="ArrowRight");else if(I.key==="ArrowUp"||I.key==="ArrowDown"){I.preventDefault();const z=I.key==="ArrowUp"?-1:1;if(!p.current)return;const D=p.current.querySelectorAll("[role=button]");let M=-1;for(let B=0;B<D.length;B++)if(D[B].tabIndex===0){M=B;break}if(M<0)return;const j=(M+z+D.length)%D.length;D[M].tabIndex=-1,D[j].tabIndex=0,D[j].focus()}},N=()=>{var I;T(!b);const z=_.current;if(!z)return;const D=(I=p.current)===null||I===void 0?void 0:I.querySelector('[role=button][tabindex="0"]');D&&(D.tabIndex=-1),z.tabIndex=0,z.focus()};return h.createElement("div",{className:u.basicChildStyle,role:"treeitem","aria-expanded":b,"aria-selected":void 0},h.createElement("span",{className:x,onClick:N,onKeyDown:O,role:"button","aria-label":E,"aria-expanded":b,"aria-controls":b?C:void 0,ref:_,tabIndex:c===0?0:-1}),(t||t==="")&&(f?h.createElement("span",{className:u.clickableLabel,onClick:N,onKeyDown:O},vf(t,u.quotesForFieldNames),":"):h.createElement("span",{className:u.label},vf(t,u.quotesForFieldNames),":")),h.createElement("span",{className:u.punctuation},o),b?h.createElement("ul",{id:C,role:"group",className:u.childFieldsContainer},n.map((I,z)=>h.createElement(f0,{key:I[0]||z,field:I[0],value:I[1],style:u,lastElement:z===P,level:k,shouldExpandNode:d,clickToExpandNode:f,beforeExpandChange:g,outerRef:p}))):h.createElement("span",{className:u.collapsedContent,onClick:N,onKeyDown:O}),h.createElement("span",{className:u.punctuation},a),!i&&h.createElement("span",{className:u.punctuation},","))}function oU(e){let{field:t,openBracket:r,closeBracket:n,lastElement:i,style:o}=e;return h.createElement("div",{className:o.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&h.createElement("span",{className:o.label},vf(t,o.quotesForFieldNames),":"),h.createElement("span",{className:o.punctuation},r),h.createElement("span",{className:o.punctuation},n),!i&&h.createElement("span",{className:o.punctuation},","))}function sU(e){let{field:t,value:r,style:n,lastElement:i,shouldExpandNode:o,clickToExpandNode:a,level:c,outerRef:u,beforeExpandChange:d}=e;return C4({field:t,value:r,lastElement:i||!1,level:c,openBracket:"{",closeBracket:"}",style:n,shouldExpandNode:o,clickToExpandNode:a,data:Object.keys(r).map(f=>[f,r[f]]),outerRef:u,beforeExpandChange:d})}function aU(e){let{field:t,value:r,style:n,lastElement:i,level:o,shouldExpandNode:a,clickToExpandNode:c,outerRef:u,beforeExpandChange:d}=e;return C4({field:t,value:r,lastElement:i||!1,level:o,openBracket:"[",closeBracket:"]",style:n,shouldExpandNode:a,clickToExpandNode:c,data:r.map(f=>[void 0,f]),outerRef:u,beforeExpandChange:d})}function lU(e){let{field:t,value:r,style:n,lastElement:i}=e,o,a=n.otherValue;return r===null?(o="null",a=n.nullValue):r===void 0?(o="undefined",a=n.undefinedValue):rU(r)?(o=iU(r,!n.noQuotesForStringValues,n.stringifyStringValues),a=n.stringValue):ZV(r)?(o=r?"true":"false",a=n.booleanValue):eU(r)?(o=r.toString(),a=n.numberValue):tU(r)?(o=`${r.toString()}n`,a=n.numberValue):b4(r)?o=r.toISOString():S4(r)?o="function() { }":o=r.toString(),h.createElement("div",{className:n.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||t==="")&&h.createElement("span",{className:n.label},vf(t,n.quotesForFieldNames),":"),h.createElement("span",{className:a},o),!i&&h.createElement("span",{className:n.punctuation},","))}function f0(e){const t=e.value;return nU(t)?h.createElement(aU,Object.assign({},e)):_4(t)&&!b4(t)&&!S4(t)?h.createElement(sU,Object.assign({},e)):h.createElement(lU,Object.assign({},e))}var Er={"container-light":"_2IvMF _GzYRV","basic-element-style":"_2bkNM","child-fields-container":"_1BXBN","label-light":"_1MGIk","clickable-label-light":"_2YKJg _1MGIk _1MFti","punctuation-light":"_3uHL6 _3eOF8","value-null-light":"_2T6PJ","value-undefined-light":"_1Gho6","value-string-light":"_vGjyY","value-number-light":"_1bQdo","value-boolean-light":"_3zQKs","value-other-light":"_1xvuR","collapse-icon-light":"_oLqym _f10Tu _1MFti _1LId0","expand-icon-light":"_2AXVT _f10Tu _1MFti _1UmXx","collapsed-content-light":"_2KJWg _1pNG9 _1MFti","container-dark":"_11RoI _GzYRV","expand-icon-dark":"_17H2C _f10Tu _1MFti _1UmXx","collapse-icon-dark":"_3QHg2 _f10Tu _1MFti _1LId0","collapsed-content-dark":"_3fDAz _1pNG9 _1MFti","label-dark":"_2bSDX","clickable-label-dark":"_1RQEj _2bSDX _1MFti","punctuation-dark":"_gsbQL _3eOF8","value-null-dark":"_LaAZe","value-undefined-dark":"_GTKgm","value-string-dark":"_Chy1W","value-number-dark":"_2bveF","value-boolean-dark":"_2vRm-","value-other-dark":"_1prJR"};const w4={collapseJson:"collapse JSON",expandJson:"expand JSON"},Hg={container:Er["container-light"],basicChildStyle:Er["basic-element-style"],childFieldsContainer:Er["child-fields-container"],label:Er["label-light"],clickableLabel:Er["clickable-label-light"],nullValue:Er["value-null-light"],undefinedValue:Er["value-undefined-light"],stringValue:Er["value-string-light"],booleanValue:Er["value-boolean-light"],numberValue:Er["value-number-light"],otherValue:Er["value-other-light"],punctuation:Er["punctuation-light"],collapseIcon:Er["collapse-icon-light"],expandIcon:Er["expand-icon-light"],collapsedContent:Er["collapsed-content-light"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:w4,stringifyStringValues:!1},cU={container:Er["container-dark"],basicChildStyle:Er["basic-element-style"],childFieldsContainer:Er["child-fields-container"],label:Er["label-dark"],clickableLabel:Er["clickable-label-dark"],nullValue:Er["value-null-dark"],undefinedValue:Er["value-undefined-dark"],stringValue:Er["value-string-dark"],booleanValue:Er["value-boolean-dark"],numberValue:Er["value-number-dark"],otherValue:Er["value-other-dark"],punctuation:Er["punctuation-dark"],collapseIcon:Er["collapse-icon-dark"],expandIcon:Er["expand-icon-dark"],collapsedContent:Er["collapsed-content-dark"],noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:w4,stringifyStringValues:!1},uU=()=>!0,dU=e=>{let{data:t,style:r=Hg,shouldExpandNode:n=uU,clickToExpandNode:i=!1,beforeExpandChange:o,compactTopLevel:a,...c}=e;const u=h.useRef(null);return h.createElement("div",Object.assign({"aria-label":"JSON view"},c,{className:r.container,ref:u,role:"tree"}),a&&_4(t)?Object.entries(t).map(d=>{let[f,p]=d;return h.createElement(f0,{key:f,field:f,value:p,style:{...Hg,...r},lastElement:!0,level:1,shouldExpandNode:n,clickToExpandNode:i,beforeExpandChange:o,outerRef:u})}):h.createElement(f0,{value:t,style:{...Hg,...r},lastElement:!0,level:0,shouldExpandNode:n,clickToExpandNode:i,outerRef:u,beforeExpandChange:o}))},hU="_container_1h2lr_1",fU={container:hU},mU={...cU,container:"rjv-container"};class ex extends Q.Component{shouldComponentUpdate(t){return t.data!==this.props.data||t.defaultExpand!==this.props.defaultExpand||t.expandNode!==this.props.expandNode}render(){const{data:t,defaultExpand:r,expandNode:n}=this.props;if(t==null)return null;const i=typeof n=="function"?n:r==="all"?()=>!0:r==="root"?o=>o<2:o=>o<1;return $.jsx("div",{className:fU.container,children:$.jsx(dU,{data:t,shouldExpandNode:i,style:mU})})}}const pU="_container_y3z3z_1",gU="_emptyState_y3z3z_7",vU="_urlSection_y3z3z_14",yU="_urlLeft_y3z3z_21",bU="_tokenStatsBox_y3z3z_26",_U="_tokenGrid_y3z3z_33",SU="_tokenRows_y3z3z_43",CU="_tokenRow_y3z3z_43",wU="_tokenRowBorder_y3z3z_51",xU="_tokenLabel_y3z3z_55",EU="_tokenTd_y3z3z_62",$U="_tokenHitRate_y3z3z_71",kU="_tokenHitRateLabel_y3z3z_84",RU="_urlText_y3z3z_94",TU="_metaText_y3z3z_101",PU="_headersContainer_y3z3z_105",OU="_headerRow_y3z3z_109",IU="_headerKey_y3z3z_115",NU="_headerValue_y3z3z_120",MU="_streamingBox_y3z3z_125",zU="_rawTextPre_y3z3z_138",jU="_tabContent_y3z3z_151",BU="_bodyLabel_y3z3z_159",LU="_bodyHeader_y3z3z_163",DU="_diffSection_y3z3z_170",AU="_diffToggle_y3z3z_174",HU="_diffIcon_y3z3z_180",FU="_viewInChatBtn_y3z3z_185",WU="_reminderSelect_y3z3z_206",zt={container:pU,emptyState:gU,urlSection:vU,urlLeft:yU,tokenStatsBox:bU,tokenGrid:_U,tokenRows:SU,tokenRow:CU,tokenRowBorder:wU,tokenLabel:xU,tokenTd:EU,tokenHitRate:$U,tokenHitRateLabel:kU,urlText:RU,metaText:TU,headersContainer:PU,headerRow:OU,headerKey:IU,headerValue:NU,streamingBox:MU,rawTextPre:zU,tabContent:jU,bodyLabel:BU,bodyHeader:LU,diffSection:DU,diffToggle:AU,diffIcon:HU,viewInChatBtn:FU,reminderSelect:WU},{Text:xi,Paragraph:VU}=Xo;class UU extends Q.Component{constructor(t){super(t),this.state={bodyViewMode:{request:"json",response:"json",diff:"json"},diffExpanded:!1,requestHeadersExpanded:!1,responseHeadersExpanded:!1,diffTooltipDismissed:!1,reminderFilters:null}}componentDidMount(){fetch("/api/preferences").then(t=>t.json()).then(t=>{t.diffTooltipDismissed&&this.setState({diffTooltipDismissed:!0})}).catch(()=>{})}dismissDiffTooltip(){this.setState({diffTooltipDismissed:!0}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({diffTooltipDismissed:!0})}).catch(()=>{})}shouldComponentUpdate(t,r){if(t.request!==this.props.request){const n=Wn(t.request);this.setState({diffExpanded:n&&!!t.expandDiff,requestHeadersExpanded:!1,responseHeadersExpanded:!1,reminderFilters:null})}return t.request!==this.props.request||t.currentTab!==this.props.currentTab||t.onTabChange!==this.props.onTabChange||t.selectedIndex!==this.props.selectedIndex||t.expandDiff!==this.props.expandDiff||r.bodyViewMode!==this.state.bodyViewMode||r.diffExpanded!==this.state.diffExpanded||r.requestHeadersExpanded!==this.state.requestHeadersExpanded||r.responseHeadersExpanded!==this.state.responseHeadersExpanded||r.diffTooltipDismissed!==this.state.diffTooltipDismissed||r.reminderFilters!==this.state.reminderFilters}toggleBodyViewMode(t){this.setState(r=>({bodyViewMode:{...r.bodyViewMode,[t]:r.bodyViewMode[t]==="json"?"text":"json"}}))}copyBody(t){var a;const{request:r}=this.props;if(!r)return;let n;if(t==="diff"?n=this._lastDiffResult:n=t==="request"?r.body:(a=r.response)==null?void 0:a.body,n==null)return;const i=typeof n=="object"?xa(n):n,o=typeof i=="string"?i:JSON.stringify(i,null,2);navigator.clipboard.writeText(o).then(()=>Li.success(we("ui.copySuccess")))}renderHeaders(t){return!t||Object.keys(t).length===0?$.jsx(xi,{type:"secondary",children:we("ui.noHeaders")}):$.jsx("div",{className:zt.headersContainer,children:Object.entries(t).map(([r,n])=>$.jsxs("div",{className:zt.headerRow,children:[$.jsx(xi,{code:!0,className:zt.headerKey,children:r}),r==="authorization"&&$.jsx(Al,{doc:"TranslateContextPollution"}),$.jsx(xi,{type:"secondary",className:zt.headerValue,children:String(n)})]},r))})}getRequestExpandNode(t,r){if(r!=="request"||!t||typeof t!="object")return;const{request:n,requests:i,selectedIndex:o}=this.props;if(!n)return;const a=i&&o!=null?i[o+1]:null,{type:c}=Pa(n,a);let u=null;if(this.state.reminderFilters==="claudeMd"&&Array.isArray(t.messages)){u=new Set,u.add(t.messages);for(const p of t.messages){if(!p||typeof p!="object")continue;const g=p.content;if(typeof g=="string")df(g)&&u.add(p);else if(Array.isArray(g)){let v=!1;for(const b of g)b&&b.type==="text"&&df(b.text)&&(u.add(b),v=!0);v&&(u.add(p),u.add(g))}}}let d=null;if(this.state.reminderFilters==="skills"&&Array.isArray(t.messages)){d=new Set,d.add(t.messages);for(const p of t.messages){if(!p||typeof p!="object")continue;const g=p.content;if(typeof g=="string")hf(g)&&d.add(p);else if(Array.isArray(g)){let v=!1;for(const b of g)b&&b.type==="text"&&hf(b.text)&&(d.add(b),v=!0);v&&(d.add(p),d.add(g))}}}const f=u||d;if(c==="Preflight"){const p=new Set,g=v=>{v&&typeof v=="object"&&(p.add(v),Array.isArray(v)?v.forEach(g):Object.values(v).forEach(g))};return Array.isArray(t.messages)&&g(t.messages),Array.isArray(t.system)&&t.system.length>=3&&g(t.system[2]),(v,b,S)=>!!(v<2||p.has(b)||f&&f.has(b)||v===1&&S==="system")}if(c==="MainAgent"&&Array.isArray(t.messages)&&t.messages.length===1){const p=t.messages[0],g=p&&Array.isArray(p.content)?p.content:null,v=g&&g.length>0?g[g.length-1]:null,b=new Set,S=_=>{_&&typeof _=="object"&&(b.add(_),Array.isArray(_)?_.forEach(S):Object.values(_).forEach(S))};return v&&S(v),b.add(t.messages),p&&typeof p=="object"&&b.add(p),g&&b.add(g),(_,C,x)=>!!(_<2||b.has(C)||f&&f.has(C))}if(f)return(p,g,v)=>!!(p<2||f.has(g))}renderBody(t,r){const{bodyViewMode:n}=this.state;if(t==null)return $.jsx(xi,{type:"secondary",children:we("ui.noBody")});if(typeof t=="string"&&t.includes("Streaming Response"))return $.jsx("div",{className:zt.streamingBox,children:$.jsx(xi,{type:"secondary",children:we("ui.streamingResponse")})});const i=typeof t=="object"?xa(t):t,o=n[r]==="json",a=this.getRequestExpandNode(i,r);return $.jsx("div",{children:o?$.jsx(ex,{data:i,defaultExpand:r==="response"?"all":"root",expandNode:a}):$.jsx("pre",{className:zt.rawTextPre,children:typeof i=="string"?i:JSON.stringify(i,null,2)})})}getPrevMainAgentRequest(){const{requests:t,selectedIndex:r}=this.props;if(!t||r==null)return null;for(let n=r-1;n>=0;n--)if(Wn(t[n]))return t[n];return null}computeDiff(t,r){if(t==null||r==null||typeof t!="object"||typeof r!="object")return null;const n={},i=new Set([...Object.keys(t),...Object.keys(r)]);for(const o of i)if(!o.startsWith("_"))if(!(o in t))n[o]=r[o];else if(o in r){const a=JSON.stringify(t[o]),c=JSON.stringify(r[o]);a!==c&&(o==="messages"&&Array.isArray(t[o])&&Array.isArray(r[o])&&r[o].length>t[o].length?n[o]=r[o].slice(t[o].length):n[o]=r[o])}else continue;return Object.keys(n).length?n:null}render(){var g,v;const{request:t,currentTab:r,onTabChange:n}=this.props;if(!t)return $.jsx("div",{className:zt.emptyState,children:$.jsx(io,{description:"选择一个请求查看详情"})});const i=new Date(t.timestamp).toLocaleString("zh-CN"),o=t.response&&t.response.status<400;let a=null;if(Wn(t)){const b=this.getPrevMainAgentRequest();if(b){const S=JSON.stringify(t.body).length,_=JSON.stringify(b.body).length;if(S<_)a=$.jsxs("div",{className:zt.diffSection,children:[$.jsxs(Vo,{title:this.state.diffTooltipDismissed?null:$.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8},children:[$.jsx("span",{style:{flex:1},children:we("ui.diffTooltip")}),$.jsx(Ys,{style:{cursor:"pointer",fontSize:10,marginTop:2,flexShrink:0},onClick:x=>{x.stopPropagation(),this.dismissDiffTooltip()}})]}),placement:"top",color:"#000",overlayStyle:{maxWidth:340},overlayInnerStyle:{fontSize:12,color:"#999"},children:[" ",$.jsxs(xi,{strong:!0,className:zt.diffToggle,onClick:()=>this.setState(x=>({diffExpanded:!x.diffExpanded})),children:["Body Diff JSON ",$.jsx(Al,{doc:"BodyDiffJSON"})," ",this.state.diffExpanded?$.jsx(Nl,{className:zt.diffIcon}):$.jsx(Lo,{className:zt.diffIcon})]})]}),this.state.diffExpanded&&$.jsx(xi,{type:"secondary",children:we("ui.diffSessionChanged")})]});else{const x=xa(this.computeDiff(b.body,t.body));x&&(this._lastDiffResult=x,a=$.jsxs("div",{className:zt.diffSection,children:[$.jsxs(Vo,{title:this.state.diffTooltipDismissed?null:$.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:8},children:[$.jsx("span",{style:{flex:1},children:we("ui.diffTooltip")}),$.jsx(Ys,{style:{cursor:"pointer",fontSize:10,marginTop:2,flexShrink:0},onClick:E=>{E.stopPropagation(),this.dismissDiffTooltip()}})]}),placement:"top",color:"#000",overlayStyle:{maxWidth:340},overlayInnerStyle:{fontSize:12,color:"#999"},children:[" ",$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[$.jsxs(xi,{strong:!0,className:zt.diffToggle,onClick:()=>this.setState(E=>({diffExpanded:!E.diffExpanded})),children:["Body Diff JSON ",$.jsx(Al,{doc:"BodyDiffJSON"})," ",this.state.diffExpanded?$.jsx(Nl,{className:zt.diffIcon}):$.jsx(Lo,{className:zt.diffIcon})]}),this.state.diffExpanded&&$.jsxs(ls,{size:"small",style:{marginLeft:"auto"},children:[$.jsx(cn,{size:"small",icon:this.state.bodyViewMode.diff==="json"?$.jsx(lu,{}):$.jsx(jh,{}),onClick:()=>this.toggleBodyViewMode("diff"),children:this.state.bodyViewMode.diff==="json"?"Text":"JSON"}),$.jsx(cn,{size:"small",icon:$.jsx(zh,{}),onClick:()=>this.copyBody("diff"),children:we("ui.copy")})]})]})]}),this.state.diffExpanded&&$.jsx($.Fragment,{children:this.state.bodyViewMode.diff==="json"?$.jsx(ex,{data:x,defaultExpand:"all"}):$.jsx("pre",{className:zt.rawTextPre,children:JSON.stringify(x,null,2)})})]}))}}}const c=xF(t.body),u=EF(t.body),d=[{key:"request",label:"Request",children:$.jsxs("div",{className:zt.tabContent,children:[$.jsxs("div",{className:zt.diffSection,children:[$.jsxs(xi,{strong:!0,className:zt.diffToggle,onClick:()=>this.setState(b=>({requestHeadersExpanded:!b.requestHeadersExpanded})),children:["Headers ",this.state.requestHeadersExpanded?$.jsx(Nl,{className:zt.diffIcon}):$.jsx(Lo,{className:zt.diffIcon})]}),this.state.requestHeadersExpanded&&this.renderHeaders(t.headers)]}),a,$.jsxs("div",{children:[$.jsxs("div",{className:zt.bodyHeader,children:[$.jsx(xi,{strong:!0,className:zt.bodyLabel,children:"Body"}),$.jsxs(ls,{size:"small",children:[(c||u)&&$.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4},children:[$.jsx("span",{style:{color:"#888",fontSize:12,fontFamily:"monospace"},children:"system-reminder:"}),$.jsx(Ba,{size:"small",className:zt.reminderSelect,placeholder:"filter",value:this.state.reminderFilters||void 0,onChange:b=>this.setState({reminderFilters:b||null}),options:[{label:"CLAUDE.md",value:"claudeMd",disabled:!c},{label:"Skills",value:"skills",disabled:!u}],popupMatchSelectWidth:!1,allowClear:!0})]}),$.jsx(cn,{size:"small",icon:this.state.bodyViewMode.request==="json"?$.jsx(lu,{}):$.jsx(jh,{}),onClick:()=>this.toggleBodyViewMode("request"),children:this.state.bodyViewMode.request==="json"?"Text":"JSON"}),$.jsx(cn,{size:"small",icon:$.jsx(zh,{}),onClick:()=>this.copyBody("request"),children:we("ui.copy")})]})]}),this.renderBody(t.body,"request")]})]})},{key:"response",label:"Response",children:$.jsx("div",{className:zt.tabContent,children:t.response?$.jsxs($.Fragment,{children:[$.jsxs("div",{className:zt.diffSection,children:[$.jsxs(xi,{strong:!0,className:zt.diffToggle,onClick:()=>this.setState(b=>({responseHeadersExpanded:!b.responseHeadersExpanded})),children:["Headers ",this.state.responseHeadersExpanded?$.jsx(Nl,{className:zt.diffIcon}):$.jsx(Lo,{className:zt.diffIcon})]}),this.state.responseHeadersExpanded&&this.renderHeaders(t.response.headers)]}),$.jsxs("div",{children:[$.jsxs("div",{className:zt.bodyHeader,children:[$.jsx(xi,{strong:!0,className:zt.bodyLabel,children:"Body"}),$.jsxs(ls,{size:"small",children:[$.jsx(cn,{size:"small",icon:this.state.bodyViewMode.response==="json"?$.jsx(lu,{}):$.jsx(jh,{}),onClick:()=>this.toggleBodyViewMode("response"),children:this.state.bodyViewMode.response==="json"?"Text":"JSON"}),$.jsx(cn,{size:"small",icon:$.jsx(zh,{}),onClick:()=>this.copyBody("response"),children:we("ui.copy")})]})]}),this.renderBody(t.response.body,"response")]})]}):$.jsx(io,{description:we("ui.responseNotCaptured")})})}],f=(v=(g=t.response)==null?void 0:g.body)==null?void 0:v.usage,p=f?(()=>{const b=f.input_tokens||0,S=f.output_tokens||0,_=f.cache_creation_input_tokens||0,C=f.cache_read_input_tokens||0,x=b+_+C,E=x>0?(C/x*100).toFixed(1):"0.0";return{input:b,output:S,cacheCreate:_,cacheRead:C,hitRate:E}})():null;return $.jsxs("div",{className:zt.container,children:[$.jsxs("div",{className:zt.urlSection,children:[$.jsxs("div",{className:zt.urlLeft,children:[$.jsx(VU,{className:zt.urlText,ellipsis:{rows:2,expandable:!0},children:t.url}),$.jsxs(ls,{size:"small",wrap:!0,children:[$.jsx(Ai,{color:t.method==="POST"?"blue":"green",children:t.method}),$.jsxs(xi,{type:"secondary",className:zt.metaText,children:["🕐 ",i]}),t.duration&&$.jsxs(xi,{type:"secondary",className:zt.metaText,children:["⏱️ ",t.duration,"ms"]}),t.response&&$.jsxs(Ai,{color:o?"success":"error",children:["HTTP ",t.response.status]})]})]}),p&&$.jsx("div",{className:zt.tokenStatsBox,children:$.jsxs("div",{className:zt.tokenGrid,children:[$.jsxs("div",{className:zt.tokenRows,children:[$.jsxs("div",{className:zt.tokenRow,children:[$.jsx("span",{className:zt.tokenLabel,children:"Token"}),$.jsxs("span",{className:zt.tokenTd,children:["input: ",ln(p.input)]}),$.jsxs("span",{className:zt.tokenTd,children:["output: ",ln(p.output)]})]}),$.jsxs("div",{className:`${zt.tokenRow} ${zt.tokenRowBorder}`,children:[$.jsx("span",{className:zt.tokenLabel,children:"Cache"}),$.jsxs("span",{className:zt.tokenTd,children:["create: ",ln(p.cacheCreate)]}),$.jsxs("span",{className:zt.tokenTd,children:["read: ",ln(p.cacheRead)]})]})]}),$.jsxs("div",{className:zt.tokenHitRate,children:[$.jsxs("div",{children:[p.hitRate,"%"]}),$.jsx("div",{className:zt.tokenHitRateLabel,children:we("ui.hitRate")})]})]})})]}),$.jsx(qy,{activeKey:r,onChange:n,items:d,size:"small",tabBarExtraContent:this.props.onViewInChat&&$.jsxs("button",{className:zt.viewInChatBtn,onClick:this.props.onViewInChat,children:[we("ui.viewInChat"),$.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",style:{marginLeft:4},children:$.jsx("path",{d:"M4.5 2.5L8 6L4.5 9.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})})]})}}const qU=["system-reminder","local-command-caveat","project-reminder","important-instruction-reminders","file-modified-reminder","todo-reminder","user-prompt-submit-hook","local-command-stdout","command-name","task-notification","environment_details","context"];function KU(e){if(!e)return{segments:[]};const t=new RegExp("<("+qU.join("|")+")\\b[^>]*>([\\s\\S]*?)</\\1>","gi"),r=[];let n=0,i;for(;(i=t.exec(e))!==null;){if(i.index>n){const o=e.slice(n,i.index).trim();o&&r.push({type:"text",content:o})}r.push({type:"system-tag",tag:i[1],content:i[2].trim()}),n=i.index+i[0].length}if(n<e.length){const o=e.slice(n).trim();o&&r.push({type:"text",content:o})}return{segments:r}}function GU(e){const{segments:t}=KU(e);return t.length===0?{segments:[]}:{segments:t}}const XU="_wrapper_1o255_1",YU="_header_1o255_5",JU="_filePath_1o255_12",QU="_toggle_1o255_18",ZU="_code_1o255_25",Hc={wrapper:XU,header:YU,filePath:JU,toggle:QU,code:ZU},{Text:tx}=Xo;function eq({file_path:e,old_string:t,new_string:r}){const[n,i]=h.useState(!1),o=t.split(`
558
+ `),a=r.split(`
559
+ `),c=[];return o.forEach(u=>{c.push({type:"del",text:u})}),a.forEach(u=>{c.push({type:"add",text:u})}),$.jsxs("div",{className:`diff-view ${Hc.wrapper}`,children:[$.jsxs("div",{className:Hc.header,children:[$.jsxs(tx,{className:Hc.filePath,children:["Edit: ",e]}),$.jsx(tx,{className:Hc.toggle,onClick:()=>i(u=>!u),children:we(n?"ui.expand":"ui.collapse")})]}),!n&&$.jsx("pre",{className:Hc.code,children:c.map((u,d)=>$.jsxs("div",{className:u.type==="del"?"diff-line-del":"diff-line-add",children:[u.type==="del"?"- ":"+ ",u.text]},d))})]})}const tq="_plainResult_1uh60_1",rq="_plainTitle_1uh60_7",nq="_plainPre_1uh60_11",iq="_codeResult_1uh60_20",oq="_codeHeader_1uh60_27",sq="_codeTitle_1uh60_36",aq="_codeToggle_1uh60_41",lq="_codePre_1uh60_48",cq="_markdownBody_1uh60_57",li={plainResult:tq,plainTitle:rq,plainPre:nq,codeResult:iq,codeHeader:oq,codeTitle:sq,codeToggle:aq,codePre:lq,markdownBody:cq},{Text:xl}=Xo,El={js:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",c:"c",cpp:"cpp",h:"c",hpp:"cpp",css:"css",scss:"css",less:"css",html:"html",htm:"html",xml:"xml",svg:"xml",json:"json",yaml:"yaml",yml:"yaml",toml:"toml",sh:"shell",bash:"shell",zsh:"shell",md:"markdown",sql:"sql"},uq=["Read","Grep","Glob","Bash","Write","Edit"];function dq(e,t,r){if(!t)return null;const n=t.file_path||"";if(n){const i=n.split(".").pop().toLowerCase();if(El[i])return El[i]}if(e==="Bash")return"shell-output";if(e==="Glob")return"file-list";if(e==="Grep"){const i=t.glob||"";if(i){const o=i.replace(/[{}*]/g,",").split(",").filter(Boolean);for(const a of o){const c=a.replace(/^\./,"").toLowerCase();if(El[c])return El[c]}}if(t.output_mode==="files_with_matches"||!t.output_mode)return"file-list";if(t.output_mode==="content"&&r){const o=r.match(/^[\w/.~-]+\.([\w]+):\d+/m);if(o&&El[o[1].toLowerCase()])return El[o[1].toLowerCase()]}return"shell-output"}return r?hq(r):null}function hq(e){const t=e.substring(0,2e3);return/^\s*[\[{]/.test(t)&&/[}\]]\s*$/.test(t.trimEnd())?"json":/^\s*<!DOCTYPE|^\s*<html|^\s*<\?xml/i.test(t)?"html":/^#!.*python/m.test(t)||/\bdef\s+\w+\s*\(.*\)\s*:/m.test(t)||/\bclass\s+\w+.*:/m.test(t)||/^\s*(from\s+\w+\s+import|import\s+\w+)/m.test(t)&&/:$/.test(t)?"python":/\bfn\s+\w+\s*\(/.test(t)&&/\blet\s+(mut\s+)?\w+/.test(t)?"rust":/^package\s+\w+/m.test(t)&&/\bfunc\s+/.test(t)?"go":/\bpublic\s+(class|interface|static)\b/.test(t)?"java":/\bdef\s+\w+/.test(t)&&/\bend\b/.test(t)&&!/;/.test(t)?"ruby":/^#!.*\b(bash|sh|zsh)\b/m.test(t)?"shell":/\b(const|let|var)\s+\w+\s*=/.test(t)&&(/=>/.test(t)||/\brequire\s*\(/.test(t))||/^\s*import\s+.*\s+from\s+['"]/.test(t)||/^\s*export\s+(default\s+)?(function|class|const)\b/m.test(t)?"javascript":/[.#][\w-]+\s*\{[\s\S]*?:\s*[\w#]/.test(t)?"css":/^[\w-]+\s*:(\s+\S|$)/m.test(t)&&!/[{;]/.test(t)?"yaml":/\b(SELECT|INSERT|UPDATE|DELETE|CREATE\s+TABLE)\b/i.test(t)?"sql":null}const fq={javascript:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`)/g,cls:"hl-string"},{pattern:/\b(const|let|var|function|return|if|else|for|while|class|import|export|from|default|new|this|async|await|try|catch|throw|switch|case|break|continue|typeof|instanceof|in|of|null|undefined|true|false)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],typescript:null,python:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/('''[\s\S]*?'''|"""[\s\S]*?"""|'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(def|class|return|if|elif|else|for|while|import|from|as|try|except|finally|raise|with|yield|lambda|pass|break|continue|and|or|not|in|is|None|True|False|self|async|await)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],go:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`[^`]*`)/g,cls:"hl-string"},{pattern:/\b(func|return|if|else|for|range|switch|case|default|break|continue|go|defer|select|chan|map|struct|interface|package|import|var|const|type|nil|true|false|make|new|append|len|cap)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],rust:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(fn|let|mut|return|if|else|for|while|loop|match|struct|enum|impl|trait|pub|use|mod|crate|self|super|where|async|await|move|ref|true|false|Some|None|Ok|Err)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],java:[{pattern:/(\/\/.*$)/gm,cls:"hl-comment"},{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(public|private|protected|class|interface|extends|implements|return|if|else|for|while|switch|case|break|continue|new|this|super|static|final|void|int|long|double|float|boolean|char|String|import|package|try|catch|throw|throws|null|true|false)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*[fFdDlL]?)\b/g,cls:"hl-number"}],ruby:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(def|end|class|module|return|if|elsif|else|unless|for|while|do|begin|rescue|ensure|raise|yield|block_given\?|nil|true|false|self|require|include|attr_accessor|attr_reader)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],css:[{pattern:/(\/\*[\s\S]*?\*\/)/g,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/([.#][\w-]+)/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*(px|em|rem|%|vh|vw|s|ms)?)\b/g,cls:"hl-number"}],json:[{pattern:/("(?:[^"\\]|\\.)*")\s*:/g,cls:"hl-keyword"},{pattern:/:\s*("(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(true|false|null)\b/g,cls:"hl-keyword"},{pattern:/\b(-?\d+\.?\d*([eE][+-]?\d+)?)\b/g,cls:"hl-number"}],shell:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(if|then|else|elif|fi|for|while|do|done|case|esac|function|return|exit|export|source|alias|cd|ls|grep|find|echo|cat|mkdir|rm|cp|mv|chmod|sudo|apt|npm|pip|git)\b/g,cls:"hl-keyword"}],sql:[{pattern:/(--.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/\b(SELECT|FROM|WHERE|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER|TABLE|INDEX|JOIN|LEFT|RIGHT|INNER|OUTER|ON|AND|OR|NOT|IN|IS|NULL|AS|ORDER|BY|GROUP|HAVING|LIMIT|OFFSET|UNION|SET|VALUES|INTO|DISTINCT|COUNT|SUM|AVG|MAX|MIN|LIKE|BETWEEN|EXISTS|CASE|WHEN|THEN|ELSE|END)\b/gi,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],html:[{pattern:/(<!--[\s\S]*?-->)/g,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/(<\/?[\w-]+|\/?>)/g,cls:"hl-keyword"}],xml:null,yaml:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/^([\w.-]+)\s*:/gm,cls:"hl-keyword"},{pattern:/\b(true|false|null|yes|no)\b/gi,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],markdown:[{pattern:/^(#{1,6}\s.*$)/gm,cls:"hl-keyword"},{pattern:/(`[^`]+`)/g,cls:"hl-string"},{pattern:/(\*\*[^*]+\*\*|__[^_]+__)/g,cls:"hl-keyword"},{pattern:/(\[[^\]]+\]\([^)]+\))/g,cls:"hl-string"}],toml:[{pattern:/(#.*$)/gm,cls:"hl-comment"},{pattern:/("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/g,cls:"hl-string"},{pattern:/^([\w.-]+)\s*=/gm,cls:"hl-keyword"},{pattern:/(\[[\w.-]+\])/g,cls:"hl-keyword"},{pattern:/\b(true|false)\b/g,cls:"hl-keyword"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}]},mq=[{pattern:/(\/\/.*$|#.*$)/gm,cls:"hl-comment"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`)/g,cls:"hl-string"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],pq=[{pattern:/^([\w/.~-]+:\d+[:-])/gm,cls:"hl-keyword"},{pattern:/('(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*")/g,cls:"hl-string"},{pattern:/\b(\d+\.?\d*)\b/g,cls:"hl-number"}],gq=[{pattern:/^(.*\.(jsx?|tsx?|mjs|cjs))$/gm,cls:"hl-string"},{pattern:/^(.*\.(py|rb|go|rs|java|c|cpp|h))$/gm,cls:"hl-keyword"},{pattern:/^(.*\.(json|ya?ml|toml|xml|html?|css|scss|less|md))$/gm,cls:"hl-number"},{pattern:/^(.*\.(log|txt|csv|jsonl))$/gm,cls:"hl-comment"}];function vq(e,t){let r=t;r==="typescript"&&(r="javascript"),r==="xml"&&(r="html"),(r==="c"||r==="cpp")&&(r="javascript");let n;r==="shell-output"?n=pq:r==="file-list"?n=gq:n=fq[r]||mq;const i=/^(\s*\d+→)/gm,o=[];let a=e.replace(i,f=>{const p=o.length;return o.push(f),`L${p}`});const c=uf(a),u=[];let d=c;for(const f of n)f.pattern.lastIndex=0,d=d.replace(f.pattern,p=>{const g=u.length;return u.push(`<span class="${f.cls}">${p}</span>`),`P${g}`});return d=d.replace(/\x02P(\d+)\x02/g,(f,p)=>u[parseInt(p)]),d=d.replace(/\x01L(\d+)\x01/g,(f,p)=>`<span class="hl-linenum">${uf(o[parseInt(p)])}</span>`),d}function rx({toolName:e,toolInput:t,resultText:r,defaultCollapsed:n}){const[i,o]=h.useState(n??!1);h.useEffect(()=>{o(n??!1)},[n]);const a=uq.includes(e),c=a?dq(e,t,r):null,u=r.length>5e3?r.substring(0,5e3)+`
560
+ ... (truncated)`:r;let d=e?we("ui.toolReturnNamed",{name:e}):"Result";if(t){const p=t.file_path||t.path||"";if(p){const g=p.split("/");d=`${e}: ${g[g.length-1]}`}}if(!a)return e==="Task"?$.jsxs("div",{className:li.plainResult,children:[$.jsxs("div",{className:li.codeHeader,children:[$.jsx(xl,{type:"secondary",className:li.plainTitle,children:d}),$.jsx(xl,{className:li.codeToggle,onClick:()=>o(p=>!p),children:we(i?"ui.expand":"ui.collapse")})]}),!i&&$.jsx("div",{className:`chat-md ${li.markdownBody}`,dangerouslySetInnerHTML:{__html:ya(u)}})]}):$.jsxs("div",{className:li.plainResult,children:[$.jsxs("div",{className:li.codeHeader,children:[$.jsx(xl,{type:"secondary",className:li.plainTitle,children:d}),$.jsx(xl,{className:li.codeToggle,onClick:()=>o(p=>!p),children:we(i?"ui.expand":"ui.collapse")})]}),!i&&$.jsx("pre",{className:li.plainPre,children:u})]});const f=vq(u,c||"fallback");return $.jsxs("div",{className:`tool-result-code ${li.codeResult}`,children:[$.jsxs("div",{className:li.codeHeader,children:[$.jsxs(xl,{className:li.codeTitle,children:[d,c?` (${c})`:""]}),$.jsx(xl,{className:li.codeToggle,onClick:()=>o(p=>!p),children:we(i?"ui.expand":"ui.collapse")})]}),!i&&$.jsx("pre",{className:`code-highlight ${li.codePre}`,dangerouslySetInnerHTML:{__html:f}})]})}const yq="_tag_17wfp_1",bq="_tagActive_17wfp_22",_q="_tagLoading_17wfp_27",Sq="_spinner_17wfp_32",fh={tag:yq,tagActive:bq,tagLoading:_q,spinner:Sq};function Cq({text:e,onTranslated:t}){const[r,n]=h.useState("idle"),i=h.useRef(null),o=h.useCallback(c=>{if(c.stopPropagation(),r==="loading")return;if(r==="done"){n("idle"),t==null||t(null);return}if(i.current){n("done"),t==null||t(i.current);return}n("loading");const u=window.location.port||"7008",d=`${window.location.protocol}//${window.location.hostname}:${u}`;fetch(`${d}/api/translate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:e,to:Xl()})}).then(f=>{if(!f.ok)throw new Error(`HTTP ${f.status}`);return f.json()}).then(f=>{const p=f.text||"";i.current=p,n("done"),t==null||t(p)}).catch(()=>{n("idle")})},[r,e,t]),a=we(r==="loading"?"ui.translating":"ui.translate");return $.jsxs("span",{className:`${fh.tag} ${r==="done"?fh.tagActive:""} ${r==="loading"?fh.tagLoading:""}`,onClick:o,children:[r==="loading"&&$.jsx("span",{className:fh.spinner}),a]})}const wq="_avatar_w9l4s_3",xq="_avatarImg_w9l4s_13",Eq="_messageRow_w9l4s_32",$q="_messageRowEnd_w9l4s_38",kq="_contentCol_w9l4s_47",Rq="_contentColLimited_w9l4s_52",Tq="_labelRow_w9l4s_60",Pq="_labelRowEnd_w9l4s_67",Oq="_labelRight_w9l4s_74",Iq="_labelText_w9l4s_82",Nq="_timeText_w9l4s_86",Mq="_timeTextNoMargin_w9l4s_92",zq="_labelTextRight_w9l4s_98",jq="_bubbleUser_w9l4s_105 _bubble_w9l4s_21",Bq="_bubbleAssistant_w9l4s_111 _bubble_w9l4s_21",Lq="_bubbleHighlight_w9l4s_119",Dq="_bubbleHighlightFading_w9l4s_123",Aq="_borderSvg_w9l4s_128",Hq="_borderSvgFading_w9l4s_137",Fq="_borderRect_w9l4s_142",Wq="_bubblePlan_w9l4s_151 _bubble_w9l4s_21",Vq="_bubbleSubAgent_w9l4s_159 _bubble_w9l4s_21",Uq="_bubbleSelection_w9l4s_165 _bubble_w9l4s_21",qq="_systemTagLabel_w9l4s_173",Kq="_skillLabel_w9l4s_177",Gq="_systemTagPre_w9l4s_182",Xq="_collapseMargin_w9l4s_190",Yq="_collapseNoMargin_w9l4s_194",Jq="_thinkingLabel_w9l4s_200",Qq="_toolBox_w9l4s_206",Zq="_toolLabel_w9l4s_215",eK="_codePre_w9l4s_221",tK="_pathTag_w9l4s_233",rK="_descSpan_w9l4s_240",nK="_secondarySpan_w9l4s_245",iK="_patternSpan_w9l4s_249",oK="_kvContainer_w9l4s_255",sK="_kvItem_w9l4s_260",aK="_kvKey_w9l4s_264",lK="_kvValue_w9l4s_268",cK="_toolResult_w9l4s_274",uK="_toolResultLabel_w9l4s_283",dK="_compactLabel_w9l4s_289",hK="_compactPre_w9l4s_294",fK="_viewRequestBtn_w9l4s_304",mK="_optionList_w9l4s_318",pK="_optionDesc_w9l4s_322",gK="_questionText_w9l4s_330",vK="_questionSpacing_w9l4s_336",yK="_option_w9l4s_318",bK="_askQuestionBox_w9l4s_349",_K="_askQuestionHeader_w9l4s_358",SK="_askQuestionText_w9l4s_369",CK="_askOptionItem_w9l4s_375",wK="_planModeBox_w9l4s_383",xK="_planModeLabel_w9l4s_392",EK="_planModePermissions_w9l4s_397",$K="_planModePermLabel_w9l4s_403",Ae={avatar:wq,avatarImg:xq,messageRow:Eq,messageRowEnd:$q,contentCol:kq,contentColLimited:Rq,labelRow:Tq,labelRowEnd:Pq,labelRight:Oq,labelText:Iq,timeText:Nq,timeTextNoMargin:Mq,labelTextRight:zq,bubbleUser:jq,bubbleAssistant:Bq,bubbleHighlight:Lq,bubbleHighlightFading:Dq,borderSvg:Aq,borderSvgFading:Hq,borderRect:Fq,bubblePlan:Wq,bubbleSubAgent:Vq,bubbleSelection:Uq,systemTagLabel:qq,skillLabel:Kq,systemTagPre:Gq,collapseMargin:Xq,collapseNoMargin:Yq,thinkingLabel:Jq,toolBox:Qq,toolLabel:Zq,codePre:eK,pathTag:tK,descSpan:rK,secondarySpan:nK,patternSpan:iK,kvContainer:oK,kvItem:sK,kvKey:aK,kvValue:lK,toolResult:cK,toolResultLabel:uK,compactLabel:dK,compactPre:hK,viewRequestBtn:fK,optionList:mK,optionDesc:pK,questionText:gK,questionSpacing:vK,option:yK,askQuestionBox:bK,askQuestionHeader:_K,askQuestionText:SK,askOptionItem:CK,planModeBox:wK,planModeLabel:xK,planModePermissions:EK,planModePermLabel:$K},{Text:Ei}=Xo;class yo extends Q.Component{constructor(r){super(r);$t(this,"handleThinkingTranslated",(r,n)=>{this.setState(i=>({thinkingTranslated:{...i.thinkingTranslated,[r]:n?ya(n):null}}))});this.state={thinkingTranslated:{}}}formatTime(r){if(!r)return null;try{const n=new Date(r),i=o=>String(o).padStart(2,"0");return`${i(n.getMonth()+1)}-${i(n.getDate())} ${i(n.getHours())}:${i(n.getMinutes())}:${i(n.getSeconds())}`}catch{return null}}renderViewRequestBtn(){const{requestIndex:r,onViewRequest:n}=this.props;return r==null||!n?null:$.jsx("span",{className:Ae.viewRequestBtn,onClick:i=>{i.stopPropagation(),n(r)},children:we("ui.viewRequest")})}renderLabel(r,n){const{timestamp:i}=this.props,o=this.formatTime(i);return $.jsxs("div",{className:Ae.labelRow,children:[$.jsxs(Ei,{type:"secondary",className:Ae.labelText,children:[r,n||""]}),$.jsxs("span",{className:Ae.labelRight,children:[this.renderViewRequestBtn(),o&&$.jsx(Ei,{className:Ae.timeText,children:o})]})]})}renderUserAvatar(r){const{userProfile:n}=this.props;return n!=null&&n.avatar?$.jsx("img",{src:n.avatar,className:Ae.avatarImg,alt:n.name||"User"}):$.jsx("div",{className:Ae.avatar,style:{background:r},dangerouslySetInnerHTML:{__html:Rl("user")}})}getUserName(){const{userProfile:r}=this.props;return(r==null?void 0:r.name)||"User"}renderSegments(r){return r.map((n,i)=>n.type==="system-tag"?$.jsx(Xc,{ghost:!0,size:"small",items:[{key:"1",label:$.jsx(Ei,{type:"secondary",className:Ae.systemTagLabel,children:n.tag}),children:$.jsx("pre",{className:Ae.systemTagPre,children:n.content})}],className:Ae.collapseMargin},i):$.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:ya(n.content)}},i))}renderToolCall(r){if(typeof r.input=="string")try{const f=r.input.replace(/^\[object Object\]/,"");r={...r,input:JSON.parse(f)}}catch{}if(r.name==="Edit"&&r.input&&r.input.old_string!=null&&r.input.new_string!=null)return $.jsx(eq,{file_path:r.input.file_path||"",old_string:r.input.old_string,new_string:r.input.new_string},r.id);const n=r.input&&typeof r.input=="object"?r.input:{},i=(f,p)=>$.jsxs("div",{className:Ae.toolBox,children:[$.jsx(Ei,{strong:!0,className:Ae.toolLabel,children:f}),p]},r.id),o=(f,p)=>$.jsx("pre",{className:Ae.codePre,style:{color:p},children:f}),a=f=>$.jsx("span",{className:Ae.pathTag,children:f});if(r.name==="Bash"){const f=n.command||"",p=n.description||"";return i($.jsxs($.Fragment,{children:["Bash",p?$.jsxs("span",{className:Ae.descSpan,children:[" — ",p]}):""]}),o(f,"#c9d1d9"))}if(r.name==="Read"){const f=n.file_path||"",p=[];n.offset&&p.push(`offset: ${n.offset}`),n.limit&&p.push(`limit: ${n.limit}`);const g=p.length?` (${p.join(", ")})`:"";return i($.jsxs($.Fragment,{children:["Read: ",a(f),$.jsx("span",{className:Ae.secondarySpan,children:g})]}),null)}if(r.name==="Write"){const f=n.file_path||"",p=n.content||"",g=p.split(`
561
+ `),v=g.length>20?g.slice(0,20).join(`
562
+ `)+`
563
+ ... (${g.length} lines total)`:p;return i($.jsxs($.Fragment,{children:["Write: ",a(f)," ",$.jsxs("span",{className:Ae.secondarySpan,children:["(",g.length," lines)"]})]}),o(v,"#c9d1d9"))}if(r.name==="Glob"){const f=n.pattern||"",p=n.path||"";return i($.jsxs($.Fragment,{children:["Glob: ",$.jsx("span",{className:Ae.patternSpan,children:f}),p?$.jsxs("span",{className:Ae.secondarySpan,children:[" in ",p]}):""]}),null)}if(r.name==="Grep"){const f=n.pattern||"",p=n.path||"",g=[];n.glob&&g.push(`glob: ${n.glob}`),n.output_mode&&g.push(`mode: ${n.output_mode}`),n.head_limit&&g.push(`limit: ${n.head_limit}`);const v=g.length?` (${g.join(", ")})`:"";return i($.jsxs($.Fragment,{children:["Grep: ",$.jsxs("span",{className:Ae.patternSpan,children:["/",f,"/"]}),p?$.jsxs("span",{className:Ae.secondarySpan,children:[" in ",p]}):"",$.jsx("span",{className:Ae.secondarySpan,children:v})]}),null)}if(r.name==="Task"){const f=n.subagent_type||"",p=n.description||"";return i($.jsxs($.Fragment,{children:["Task(",f,p?": "+p:"",")"]}),null)}if(r.name==="AskUserQuestion"){const f=n.questions||[];return $.jsx("div",{className:Ae.askQuestionBox,children:f.map((p,g)=>$.jsxs("div",{className:g<f.length-1?Ae.questionSpacing:void 0,children:[p.header&&$.jsx("span",{className:Ae.askQuestionHeader,children:p.header}),$.jsx("div",{className:Ae.askQuestionText,children:p.question}),$.jsx("div",{className:Ae.optionList,children:p.options&&p.options.map((v,b)=>$.jsxs("div",{className:Ae.askOptionItem,children:["○ ",v.label,v.description&&$.jsxs("span",{className:Ae.optionDesc,children:["— ",v.description]})]},b))})]},g))},r.id)}if(r.name==="EnterPlanMode")return $.jsx("div",{className:Ae.planModeBox,children:$.jsx("span",{className:Ae.planModeLabel,children:we("ui.enterPlanMode")})},r.id);if(r.name==="ExitPlanMode"){const f=n.allowedPrompts||[];return $.jsxs("div",{className:Ae.planModeBox,children:[$.jsx("span",{className:Ae.planModeLabel,children:we("ui.exitPlanMode")}),f.length>0&&$.jsxs("div",{className:Ae.planModePermissions,children:[$.jsx("div",{className:Ae.planModePermLabel,children:we("ui.allowedPrompts")}),f.map((p,g)=>$.jsxs("div",{className:Ae.askOptionItem,children:["• ",p.prompt||p.tool]},g))]})]},r.id)}let c=r.name;const u=Object.keys(n);if(u.length===0)return i(c,null);const d=u.map(f=>{const p=n[f],g=typeof p=="string"?p:JSON.stringify(p),v=g.length>200?g.substring(0,200)+"...":g;return $.jsxs("div",{className:Ae.kvItem,children:[$.jsxs("span",{className:Ae.kvKey,children:[f,": "]}),$.jsx("span",{className:Ae.kvValue,children:v})]},f)});return i(c,$.jsx("div",{className:Ae.kvContainer,children:d}))}renderHighlightBubble(r,n){const{highlight:i}=this.props,o=`${r}${i==="active"?" "+Ae.bubbleHighlight:""}${i==="fading"?" "+Ae.bubbleHighlightFading:""}`,a=r===Ae.bubbleUser;return $.jsxs("div",{className:o,style:{position:"relative"},children:[(i==="active"||i==="fading")&&$.jsx("svg",{className:`${Ae.borderSvg}${i==="fading"?" "+Ae.borderSvgFading:""}`,preserveAspectRatio:"none",children:$.jsx("rect",{x:"0.5",y:"0.5",width:"calc(100% - 1px)",height:"calc(100% - 1px)",rx:"8",ry:"8",fill:"none",stroke:a?"#ffffff":"#1668dc",strokeWidth:"1",strokeDasharray:"6 4",className:Ae.borderRect})}),n]})}renderUserMessage(){const{text:r,timestamp:n}=this.props,i=this.formatTime(n),o=this.getUserName();return r&&r.includes("This session is being continued from a previous conversation that ran out of context")?$.jsxs("div",{className:Ae.messageRowEnd,children:[$.jsxs("div",{className:Ae.contentColLimited,children:[$.jsxs("div",{className:Ae.labelRow,children:[i&&$.jsx(Ei,{className:Ae.timeTextNoMargin,children:i}),this.renderViewRequestBtn(),$.jsxs(Ei,{type:"secondary",className:Ae.labelTextRight,children:[o," — /compact"]})]}),this.renderHighlightBubble(Ae.bubbleUser,$.jsx(Xc,{ghost:!0,size:"small",items:[{key:"1",label:$.jsx(Ei,{className:Ae.compactLabel,children:"Compact Summary"}),children:$.jsx("pre",{className:Ae.compactPre,children:r})}],className:Ae.collapseNoMargin}))]}),this.renderUserAvatar("#1e40af")]}):$.jsxs("div",{className:Ae.messageRowEnd,children:[$.jsxs("div",{className:Ae.contentColLimited,children:[$.jsxs("div",{className:Ae.labelRow,children:[i&&$.jsx(Ei,{className:Ae.timeTextNoMargin,children:i}),this.renderViewRequestBtn(),$.jsx(Ei,{type:"secondary",className:Ae.labelTextRight,children:o})]}),this.renderHighlightBubble(Ae.bubbleUser,uf(r))]}),this.renderUserAvatar("#1e40af")]})}renderToolResult(r){return r?$.jsxs("div",{className:Ae.toolResult,children:[$.jsx(Ei,{type:"secondary",className:Ae.toolResultLabel,children:r.label}),$.jsx(rx,{toolName:r.toolName,toolInput:r.toolInput,resultText:r.resultText,defaultCollapsed:this.props.collapseToolResults})]}):null}renderAssistantContent(r,n={}){const i=r.filter(u=>u.type==="thinking"),o=r.filter(u=>u.type==="text"),a=r.filter(u=>u.type==="tool_use");let c=[];return i.forEach((u,d)=>{const p=this.state.thinkingTranslated[d]||ya(u.thinking||"");c.push($.jsx(Xc,{ghost:!0,size:"small",defaultActiveKey:this.props.expandThinking?["1"]:[],items:[{key:"1",label:$.jsxs("span",{children:[$.jsx(Ei,{type:"secondary",className:Ae.thinkingLabel,children:we("ui.thinking")}),$.jsx(Cq,{text:u.thinking||"",onTranslated:g=>this.handleThinkingTranslated(d,g)})]}),children:$.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:p}})}],className:Ae.collapseMargin},`think-${d}-${this.props.expandThinking?"e":"c"}`))}),o.forEach((u,d)=>{if(u.text){const{segments:f}=GU(u.text);c.push($.jsx("div",{children:this.renderSegments(f)},`text-${d}`))}}),a.forEach(u=>{c.push(this.renderToolCall(u));const d=n[u.id];d&&c.push($.jsx(Q.Fragment,{children:this.renderToolResult(d)},`tr-${u.id}`))}),c}renderAssistantMessage(){const{content:r,toolResultMap:n={},modelInfo:i}=this.props,o=this.renderAssistantContent(r,n);return o.length===0?null:$.jsxs("div",{className:Ae.messageRow,children:[$.jsx("div",{className:Ae.avatar,style:{background:(i==null?void 0:i.color)||"#6b21a8"},dangerouslySetInnerHTML:{__html:(i==null?void 0:i.svg)||Rl("agent")}}),$.jsxs("div",{className:Ae.contentCol,children:[this.renderLabel((i==null?void 0:i.name)||"MainAgent"),this.renderHighlightBubble(Ae.bubbleAssistant,o)]})]})}renderSubAgentChatMessage(){const{content:r,toolResultMap:n={},label:i}=this.props,o=this.renderAssistantContent(r,n);return o.length===0?null:$.jsxs("div",{className:Ae.messageRowEnd,children:[$.jsxs("div",{className:Ae.contentColLimited,children:[$.jsxs("div",{className:Ae.labelRowEnd,children:[this.formatTime(this.props.timestamp)&&$.jsx(Ei,{className:Ae.timeText,children:this.formatTime(this.props.timestamp)}),this.renderViewRequestBtn(),$.jsx(Ei,{type:"secondary",className:Ae.labelTextRight,children:i||"SubAgent"})]}),this.renderHighlightBubble(Ae.bubbleAssistant,o)]}),$.jsx("div",{className:Ae.avatar,style:{background:"#4a1d96"},dangerouslySetInnerHTML:{__html:Rl("sub")}})]})}renderSubAgentMessage(){const{label:r,resultText:n,toolName:i,toolInput:o}=this.props;return $.jsxs("div",{className:Ae.messageRow,children:[$.jsx("div",{className:Ae.avatar,style:{background:"#4a1d96"},dangerouslySetInnerHTML:{__html:Rl("sub")}}),$.jsxs("div",{className:Ae.contentCol,children:[this.renderLabel(r),$.jsx("div",{className:Ae.bubbleSubAgent,children:$.jsx(rx,{toolName:i,toolInput:o,resultText:n})})]})]})}renderUserSelectionMessage(){const{questions:r,answers:n}=this.props,i=this.getUserName();return $.jsxs("div",{className:Ae.messageRowEnd,children:[$.jsxs("div",{className:Ae.contentColLimited,children:[this.renderLabel(i," — 选择"),$.jsx("div",{className:Ae.bubbleSelection,children:r&&r.map((o,a)=>{const c=(n==null?void 0:n[o.question])||"未选择";return $.jsxs("div",{className:a<r.length-1?Ae.questionSpacing:void 0,children:[$.jsx("div",{className:Ae.questionText,children:o.question}),$.jsx("div",{className:Ae.optionList,children:o.options&&o.options.map((u,d)=>{const f=c===u.label;return $.jsxs("div",{className:Ae.option,style:{color:f?"#e5e5e5":"#666",fontWeight:f?600:"normal"},children:[f?"● ":"○ ",u.label,u.description&&$.jsxs("span",{className:Ae.optionDesc,children:["— ",u.description]})]},d)})})]},a)})})]}),this.renderUserAvatar("#2ea043")]})}renderPlanPromptMessage(){const{text:r,timestamp:n,modelInfo:i}=this.props;this.formatTime(n);const o=(r||"").replace(/^Implement the following plan:\s*/i,"");return $.jsxs("div",{className:Ae.messageRow,children:[$.jsx("div",{className:Ae.avatar,style:{background:(i==null?void 0:i.color)||"#6b21a8"},dangerouslySetInnerHTML:{__html:(i==null?void 0:i.svg)||Rl("agent")}}),$.jsxs("div",{className:Ae.contentColLimited,children:[this.renderLabel((i==null?void 0:i.name)||"MainAgent"," (Plan)"),$.jsx("div",{className:Ae.bubblePlan,children:$.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:ya(o)}})})]})]})}renderSkillLoadedMessage(){const{text:r,skillName:n,timestamp:i}=this.props,o=this.formatTime(i);return $.jsxs("div",{className:Ae.messageRow,children:[$.jsx("div",{style:{width:32,flexShrink:0}}),$.jsx("div",{className:Ae.contentCol,children:$.jsx(Xc,{ghost:!0,size:"small",items:[{key:"1",label:$.jsxs("span",{className:Ae.skillLabel,children:["📦 ",we("ui.skillLoaded"),": ",n,o&&$.jsx(Ei,{className:Ae.timeTextNoMargin,style:{marginLeft:8},children:o})]}),children:$.jsx("div",{className:"chat-md",dangerouslySetInnerHTML:{__html:ya(r)}})}],className:Ae.collapseNoMargin})})]})}render(){const{role:r}=this.props;return r==="user"?this.renderUserMessage():r==="skill-loaded"?this.renderSkillLoadedMessage():r==="plan-prompt"?this.renderPlanPromptMessage():r==="user-selection"?this.renderUserSelectionMessage():r==="assistant"?this.renderAssistantMessage():r==="sub-agent-chat"?this.renderSubAgentChatMessage():r==="sub-agent"?this.renderSubAgentMessage():null}}/**
564
+ * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
565
+ * @license MIT
566
+ *
567
+ * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
568
+ * @license MIT
569
+ *
570
+ * Originally forked from (with the author's permission):
571
+ * Fabrice Bellard's javascript vt100 for jslinux:
572
+ * http://bellard.org/jslinux/
573
+ * Copyright (c) 2011 Fabrice Bellard
574
+ */var x4=Object.defineProperty,kK=Object.getOwnPropertyDescriptor,RK=(e,t)=>{for(var r in t)x4(e,r,{get:t[r],enumerable:!0})},tn=(e,t,r,n)=>{for(var i=n>1?void 0:n?kK(t,r):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(i=(n?a(t,r,i):a(i))||i);return n&&i&&x4(t,r,i),i},lt=(e,t)=>(r,n)=>t(r,n,e),nx="Terminal input",m0={get:()=>nx,set:e=>nx=e},ix="Too much output to announce, navigate to rows manually to read",p0={get:()=>ix,set:e=>ix=e};function TK(e){return e.replace(/\r?\n/g,"\r")}function PK(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function OK(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function IK(e,t,r,n){if(e.stopPropagation(),e.clipboardData){let i=e.clipboardData.getData("text/plain");E4(i,t,r,n)}}function E4(e,t,r,n){e=TK(e),e=PK(e,r.decPrivateModes.bracketedPasteMode&&n.rawOptions.ignoreBracketedPasteMode!==!0),r.triggerDataEvent(e,!0),t.value=""}function $4(e,t,r){let n=r.getBoundingClientRect(),i=e.clientX-n.left-10,o=e.clientY-n.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${i}px`,t.style.top=`${o}px`,t.style.zIndex="1000",t.focus()}function ox(e,t,r,n,i){$4(e,t,r),i&&n.rightClickSelect(e),t.value=n.selectionText,t.select()}function Ds(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function dm(e,t=0,r=e.length){let n="";for(let i=t;i<r;++i){let o=e[i];o>65535?(o-=65536,n+=String.fromCharCode((o>>10)+55296)+String.fromCharCode(o%1024+56320)):n+=String.fromCharCode(o)}return n}var NK=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let r=e.length;if(!r)return 0;let n=0,i=0;if(this._interim){let o=e.charCodeAt(i++);56320<=o&&o<=57343?t[n++]=(this._interim-55296)*1024+o-56320+65536:(t[n++]=this._interim,t[n++]=o),this._interim=0}for(let o=i;o<r;++o){let a=e.charCodeAt(o);if(55296<=a&&a<=56319){if(++o>=r)return this._interim=a,n;let c=e.charCodeAt(o);56320<=c&&c<=57343?t[n++]=(a-55296)*1024+c-56320+65536:(t[n++]=a,t[n++]=c);continue}a!==65279&&(t[n++]=a)}return n}},MK=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let r=e.length;if(!r)return 0;let n=0,i,o,a,c,u=0,d=0;if(this.interim[0]){let g=!1,v=this.interim[0];v&=(v&224)===192?31:(v&240)===224?15:7;let b=0,S;for(;(S=this.interim[++b]&63)&&b<4;)v<<=6,v|=S;let _=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,C=_-b;for(;d<C;){if(d>=r)return 0;if(S=e[d++],(S&192)!==128){d--,g=!0;break}else this.interim[b++]=S,v<<=6,v|=S&63}g||(_===2?v<128?d--:t[n++]=v:_===3?v<2048||v>=55296&&v<=57343||v===65279||(t[n++]=v):v<65536||v>1114111||(t[n++]=v)),this.interim.fill(0)}let f=r-4,p=d;for(;p<r;){for(;p<f&&!((i=e[p])&128)&&!((o=e[p+1])&128)&&!((a=e[p+2])&128)&&!((c=e[p+3])&128);)t[n++]=i,t[n++]=o,t[n++]=a,t[n++]=c,p+=4;if(i=e[p++],i<128)t[n++]=i;else if((i&224)===192){if(p>=r)return this.interim[0]=i,n;if(o=e[p++],(o&192)!==128){p--;continue}if(u=(i&31)<<6|o&63,u<128){p--;continue}t[n++]=u}else if((i&240)===224){if(p>=r)return this.interim[0]=i,n;if(o=e[p++],(o&192)!==128){p--;continue}if(p>=r)return this.interim[0]=i,this.interim[1]=o,n;if(a=e[p++],(a&192)!==128){p--;continue}if(u=(i&15)<<12|(o&63)<<6|a&63,u<2048||u>=55296&&u<=57343||u===65279)continue;t[n++]=u}else if((i&248)===240){if(p>=r)return this.interim[0]=i,n;if(o=e[p++],(o&192)!==128){p--;continue}if(p>=r)return this.interim[0]=i,this.interim[1]=o,n;if(a=e[p++],(a&192)!==128){p--;continue}if(p>=r)return this.interim[0]=i,this.interim[1]=o,this.interim[2]=a,n;if(c=e[p++],(c&192)!==128){p--;continue}if(u=(i&7)<<18|(o&63)<<12|(a&63)<<6|c&63,u<65536||u>1114111)continue;t[n++]=u}}return n}},k4="",Ws=" ",Xu=class R4{constructor(){this.fg=0,this.bg=0,this.extended=new yf}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new R4;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},yf=class T4{constructor(t=0,r=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=r}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new T4(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},so=class P4 extends Xu{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new yf,this.combinedData=""}static fromCharData(t){let r=new P4;return r.setFromCharData(t),r}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?Ds(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let r=!1;if(t[1].length>2)r=!0;else if(t[1].length===2){let n=t[1].charCodeAt(0);if(55296<=n&&n<=56319){let i=t[1].charCodeAt(1);56320<=i&&i<=57343?this.content=(n-55296)*1024+i-56320+65536|t[2]<<22:r=!0}else r=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;r&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},sx="di$target",g0="di$dependencies",Fg=new Map;function zK(e){return e[g0]||[]}function Bn(e){if(Fg.has(e))return Fg.get(e);let t=function(r,n,i){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");jK(t,r,i)};return t._id=e,Fg.set(e,t),t}function jK(e,t,r){t[sx]===t?t[g0].push({id:e,index:r}):(t[g0]=[{id:e,index:r}],t[sx]=t)}var mi=Bn("BufferService"),O4=Bn("CoreMouseService"),Da=Bn("CoreService"),BK=Bn("CharsetService"),hb=Bn("InstantiationService"),I4=Bn("LogService"),pi=Bn("OptionsService"),N4=Bn("OscLinkService"),LK=Bn("UnicodeService"),Yu=Bn("DecorationService"),v0=class{constructor(e,t,r){this._bufferService=e,this._optionsService=t,this._oscLinkService=r}provideLinks(e,t){var f;let r=this._bufferService.buffer.lines.get(e-1);if(!r){t(void 0);return}let n=[],i=this._optionsService.rawOptions.linkHandler,o=new so,a=r.getTrimmedLength(),c=-1,u=-1,d=!1;for(let p=0;p<a;p++)if(!(u===-1&&!r.hasContent(p))){if(r.loadCell(p,o),o.hasExtendedAttrs()&&o.extended.urlId)if(u===-1){u=p,c=o.extended.urlId;continue}else d=o.extended.urlId!==c;else u!==-1&&(d=!0);if(d||u!==-1&&p===a-1){let g=(f=this._oscLinkService.getLinkData(c))==null?void 0:f.uri;if(g){let v={start:{x:u+1,y:e},end:{x:p+(!d&&p===a-1?1:0),y:e}},b=!1;if(!(i!=null&&i.allowNonHttpProtocols))try{let S=new URL(g);["http:","https:"].includes(S.protocol)||(b=!0)}catch{b=!0}b||n.push({text:g,range:v,activate:(S,_)=>i?i.activate(S,_,v):DK(S,_),hover:(S,_)=>{var C;return(C=i==null?void 0:i.hover)==null?void 0:C.call(i,S,_,v)},leave:(S,_)=>{var C;return(C=i==null?void 0:i.leave)==null?void 0:C.call(i,S,_,v)}})}d=!1,o.hasExtendedAttrs()&&o.extended.urlId?(u=p,c=o.extended.urlId):(u=-1,c=-1)}}t(n)}};v0=tn([lt(0,mi),lt(1,pi),lt(2,N4)],v0);function DK(e,t){if(confirm(`Do you want to navigate to ${t}?
575
+
576
+ WARNING: This link could potentially be dangerous`)){let r=window.open();if(r){try{r.opener=null}catch{}r.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var hm=Bn("CharSizeService"),ms=Bn("CoreBrowserService"),fb=Bn("MouseService"),ps=Bn("RenderService"),AK=Bn("SelectionService"),M4=Bn("CharacterJoinerService"),ic=Bn("ThemeService"),z4=Bn("LinkProviderService"),HK=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?ax.isErrorNoTelemetry(e)?new ax(e.message+`
577
+
578
+ `+e.stack):new Error(e.message+`
579
+
580
+ `+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},FK=new HK;function Bh(e){WK(e)||FK.onUnexpectedError(e)}var y0="Canceled";function WK(e){return e instanceof VK?!0:e instanceof Error&&e.name===y0&&e.message===y0}var VK=class extends Error{constructor(){super(y0),this.name=this.message}};function UK(e){return new Error(`Illegal argument: ${e}`)}var ax=class b0 extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof b0)return t;let r=new b0;return r.message=t.message,r.stack=t.stack,r}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},_0=class j4 extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,j4.prototype)}};function ji(e,t=0){return e[e.length-(1+t)]}var qK;(e=>{function t(o){return o<0}e.isLessThan=t;function r(o){return o<=0}e.isLessThanOrEqual=r;function n(o){return o>0}e.isGreaterThan=n;function i(o){return o===0}e.isNeitherLessOrGreaterThan=i,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(qK||(qK={}));function KK(e,t){let r=this,n=!1,i;return function(){return n||(n=!0,t||(i=e.apply(r,arguments))),i}}var B4;(e=>{function t(k){return k&&typeof k=="object"&&typeof k[Symbol.iterator]=="function"}e.is=t;let r=Object.freeze([]);function n(){return r}e.empty=n;function*i(k){yield k}e.single=i;function o(k){return t(k)?k:i(k)}e.wrap=o;function a(k){return k||r}e.from=a;function*c(k){for(let P=k.length-1;P>=0;P--)yield k[P]}e.reverse=c;function u(k){return!k||k[Symbol.iterator]().next().done===!0}e.isEmpty=u;function d(k){return k[Symbol.iterator]().next().value}e.first=d;function f(k,P){let T=0;for(let O of k)if(P(O,T++))return!0;return!1}e.some=f;function p(k,P){for(let T of k)if(P(T))return T}e.find=p;function*g(k,P){for(let T of k)P(T)&&(yield T)}e.filter=g;function*v(k,P){let T=0;for(let O of k)yield P(O,T++)}e.map=v;function*b(k,P){let T=0;for(let O of k)yield*P(O,T++)}e.flatMap=b;function*S(...k){for(let P of k)yield*P}e.concat=S;function _(k,P,T){let O=T;for(let N of k)O=P(O,N);return O}e.reduce=_;function*C(k,P,T=k.length){for(P<0&&(P+=k.length),T<0?T+=k.length:T>k.length&&(T=k.length);P<T;P++)yield k[P]}e.slice=C;function x(k,P=Number.POSITIVE_INFINITY){let T=[];if(P===0)return[T,k];let O=k[Symbol.iterator]();for(let N=0;N<P;N++){let I=O.next();if(I.done)return[T,e.empty()];T.push(I.value)}return[T,{[Symbol.iterator](){return O}}]}e.consume=x;async function E(k){let P=[];for await(let T of k)P.push(T);return Promise.resolve(P)}e.asyncToArray=E})(B4||(B4={}));function Ia(e){if(B4.is(e)){let t=[];for(let r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function GK(...e){return Vr(()=>Ia(e))}function Vr(e){return{dispose:KK(()=>{e()})}}var L4=class D4{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Ia(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?D4.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),void 0)}};L4.DISABLE_DISPOSED_WARNING=!1;var Us=L4,Zt=class{constructor(){this._store=new Us,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Zt.None=Object.freeze({dispose(){}});var Yl=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)==null||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)==null||e.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e}},cs=typeof window=="object"?window:globalThis,S0=class C0{constructor(t){this.element=t,this.next=C0.Undefined,this.prev=C0.Undefined}};S0.Undefined=new S0(void 0);var Xr=S0,lx=class{constructor(){this._first=Xr.Undefined,this._last=Xr.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Xr.Undefined}clear(){let e=this._first;for(;e!==Xr.Undefined;){let t=e.next;e.prev=Xr.Undefined,e.next=Xr.Undefined,e=t}this._first=Xr.Undefined,this._last=Xr.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let r=new Xr(e);if(this._first===Xr.Undefined)this._first=r,this._last=r;else if(t){let i=this._last;this._last=r,r.prev=i,i.next=r}else{let i=this._first;this._first=r,r.next=i,i.prev=r}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(r))}}shift(){if(this._first!==Xr.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Xr.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Xr.Undefined&&e.next!==Xr.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Xr.Undefined&&e.next===Xr.Undefined?(this._first=Xr.Undefined,this._last=Xr.Undefined):e.next===Xr.Undefined?(this._last=this._last.prev,this._last.next=Xr.Undefined):e.prev===Xr.Undefined&&(this._first=this._first.next,this._first.prev=Xr.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Xr.Undefined;)yield e.element,e=e.next}},XK=globalThis.performance&&typeof globalThis.performance.now=="function",YK=class A4{static create(t){return new A4(t)}constructor(t){this._now=XK&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},Vn;(e=>{e.None=()=>Zt.None;function t(M,j){return p(M,()=>{},0,void 0,!0,void 0,j)}e.defer=t;function r(M){return(j,B=null,F)=>{let W=!1,V;return V=M(L=>{if(!W)return V?V.dispose():W=!0,j.call(B,L)},null,F),W&&V.dispose(),V}}e.once=r;function n(M,j,B){return d((F,W=null,V)=>M(L=>F.call(W,j(L)),null,V),B)}e.map=n;function i(M,j,B){return d((F,W=null,V)=>M(L=>{j(L),F.call(W,L)},null,V),B)}e.forEach=i;function o(M,j,B){return d((F,W=null,V)=>M(L=>j(L)&&F.call(W,L),null,V),B)}e.filter=o;function a(M){return M}e.signal=a;function c(...M){return(j,B=null,F)=>{let W=GK(...M.map(V=>V(L=>j.call(B,L))));return f(W,F)}}e.any=c;function u(M,j,B,F){let W=B;return n(M,V=>(W=j(W,V),W),F)}e.reduce=u;function d(M,j){let B,F={onWillAddFirstListener(){B=M(W.fire,W)},onDidRemoveLastListener(){B==null||B.dispose()}},W=new Ue(F);return j==null||j.add(W),W.event}function f(M,j){return j instanceof Array?j.push(M):j&&j.add(M),M}function p(M,j,B=100,F=!1,W=!1,V,L){let G,q,A,U=0,Y,Z={leakWarningThreshold:V,onWillAddFirstListener(){G=M(ne=>{U++,q=j(q,ne),F&&!A&&(te.fire(q),q=void 0),Y=()=>{let he=q;q=void 0,A=void 0,(!F||U>1)&&te.fire(he),U=0},typeof B=="number"?(clearTimeout(A),A=setTimeout(Y,B)):A===void 0&&(A=0,queueMicrotask(Y))})},onWillRemoveListener(){W&&U>0&&(Y==null||Y())},onDidRemoveLastListener(){Y=void 0,G.dispose()}},te=new Ue(Z);return L==null||L.add(te),te.event}e.debounce=p;function g(M,j=0,B){return e.debounce(M,(F,W)=>F?(F.push(W),F):[W],j,void 0,!0,void 0,B)}e.accumulate=g;function v(M,j=(F,W)=>F===W,B){let F=!0,W;return o(M,V=>{let L=F||!j(V,W);return F=!1,W=V,L},B)}e.latch=v;function b(M,j,B){return[e.filter(M,j,B),e.filter(M,F=>!j(F),B)]}e.split=b;function S(M,j=!1,B=[],F){let W=B.slice(),V=M(q=>{W?W.push(q):G.fire(q)});F&&F.add(V);let L=()=>{W==null||W.forEach(q=>G.fire(q)),W=null},G=new Ue({onWillAddFirstListener(){V||(V=M(q=>G.fire(q)),F&&F.add(V))},onDidAddFirstListener(){W&&(j?setTimeout(L):L())},onDidRemoveLastListener(){V&&V.dispose(),V=null}});return F&&F.add(G),G.event}e.buffer=S;function _(M,j){return(B,F,W)=>{let V=j(new x);return M(function(L){let G=V.evaluate(L);G!==C&&B.call(F,G)},void 0,W)}}e.chain=_;let C=Symbol("HaltChainable");class x{constructor(){this.steps=[]}map(j){return this.steps.push(j),this}forEach(j){return this.steps.push(B=>(j(B),B)),this}filter(j){return this.steps.push(B=>j(B)?B:C),this}reduce(j,B){let F=B;return this.steps.push(W=>(F=j(F,W),F)),this}latch(j=(B,F)=>B===F){let B=!0,F;return this.steps.push(W=>{let V=B||!j(W,F);return B=!1,F=W,V?W:C}),this}evaluate(j){for(let B of this.steps)if(j=B(j),j===C)break;return j}}function E(M,j,B=F=>F){let F=(...G)=>L.fire(B(...G)),W=()=>M.on(j,F),V=()=>M.removeListener(j,F),L=new Ue({onWillAddFirstListener:W,onDidRemoveLastListener:V});return L.event}e.fromNodeEventEmitter=E;function k(M,j,B=F=>F){let F=(...G)=>L.fire(B(...G)),W=()=>M.addEventListener(j,F),V=()=>M.removeEventListener(j,F),L=new Ue({onWillAddFirstListener:W,onDidRemoveLastListener:V});return L.event}e.fromDOMEventEmitter=k;function P(M){return new Promise(j=>r(M)(j))}e.toPromise=P;function T(M){let j=new Ue;return M.then(B=>{j.fire(B)},()=>{j.fire(void 0)}).finally(()=>{j.dispose()}),j.event}e.fromPromise=T;function O(M,j){return M(B=>j.fire(B))}e.forward=O;function N(M,j,B){return j(B),M(F=>j(F))}e.runAndSubscribe=N;class I{constructor(j,B){this._observable=j,this._counter=0,this._hasChanged=!1;let F={onWillAddFirstListener:()=>{j.addObserver(this)},onDidRemoveLastListener:()=>{j.removeObserver(this)}};this.emitter=new Ue(F),B&&B.add(this.emitter)}beginUpdate(j){this._counter++}handlePossibleChange(j){}handleChange(j,B){this._hasChanged=!0}endUpdate(j){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function z(M,j){return new I(M,j).emitter.event}e.fromObservable=z;function D(M){return(j,B,F)=>{let W=0,V=!1,L={beginUpdate(){W++},endUpdate(){W--,W===0&&(M.reportChanges(),V&&(V=!1,j.call(B)))},handlePossibleChange(){},handleChange(){V=!0}};M.addObserver(L),M.reportChanges();let G={dispose(){M.removeObserver(L)}};return F instanceof Us?F.add(G):Array.isArray(F)&&F.push(G),G}}e.fromObservableLight=D})(Vn||(Vn={}));var w0=class x0{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${x0._idPool++}`,x0.all.add(this)}start(t){this._stopWatch=new YK,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};w0.all=new Set,w0._idPool=0;var JK=w0,QK=-1,H4=class F4{constructor(t,r,n=(F4._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=r,this.name=n,this._warnCountdown=0}dispose(){var t;(t=this._stacks)==null||t.clear()}check(t,r){let n=this.threshold;if(n<=0||r<n)return;this._stacks||(this._stacks=new Map);let i=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,i+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=n*.5;let[o,a]=this.getMostFrequentStack(),c=`[${this.name}] potential listener LEAK detected, having ${r} listeners already. MOST frequent listener (${a}):`;console.warn(c),console.warn(o);let u=new tG(c,o);this._errorHandler(u)}return()=>{let o=this._stacks.get(t.value)||0;this._stacks.set(t.value,o-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,r=0;for(let[n,i]of this._stacks)(!t||r<i)&&(t=[n,i],r=i);return t}};H4._idPool=1;var ZK=H4,eG=class W4{constructor(t){this.value=t}static create(){let t=new Error;return new W4(t.stack??"")}print(){console.warn(this.value.split(`
581
+ `).slice(2).join(`
582
+ `))}},tG=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},rG=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},nG=0,Wg=class{constructor(e){this.value=e,this.id=nG++}},iG=2,oG,Ue=class{constructor(e){var t,r,n,i;this._size=0,this._options=e,this._leakageMon=(t=this._options)!=null&&t.leakWarningThreshold?new ZK((e==null?void 0:e.onListenerError)??Bh,((r=this._options)==null?void 0:r.leakWarningThreshold)??QK):void 0,this._perfMon=(n=this._options)!=null&&n._profName?new JK(this._options._profName):void 0,this._deliveryQueue=(i=this._options)==null?void 0:i.deliveryQueue}dispose(){var e,t,r,n;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)==null?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(r=(t=this._options)==null?void 0:t.onDidRemoveLastListener)==null||r.call(t),(n=this._leakageMon)==null||n.dispose())}get event(){return this._event??(this._event=(e,t,r)=>{var a,c,u,d,f;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let p=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(p);let g=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],v=new rG(`${p}. HINT: Stack shows most frequent listener (${g[1]}-times)`,g[0]);return(((a=this._options)==null?void 0:a.onListenerError)||Bh)(v),Zt.None}if(this._disposed)return Zt.None;t&&(e=e.bind(t));let n=new Wg(e),i;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(n.stack=eG.create(),i=this._leakageMon.check(n.stack,this._size+1)),this._listeners?this._listeners instanceof Wg?(this._deliveryQueue??(this._deliveryQueue=new sG),this._listeners=[this._listeners,n]):this._listeners.push(n):((u=(c=this._options)==null?void 0:c.onWillAddFirstListener)==null||u.call(c,this),this._listeners=n,(f=(d=this._options)==null?void 0:d.onDidAddFirstListener)==null||f.call(d,this)),this._size++;let o=Vr(()=>{i==null||i(),this._removeListener(n)});return r instanceof Us?r.add(o):Array.isArray(r)&&r.push(o),o}),this._event}_removeListener(e){var i,o,a,c;if((o=(i=this._options)==null?void 0:i.onWillRemoveListener)==null||o.call(i,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(c=(a=this._options)==null?void 0:a.onDidRemoveLastListener)==null||c.call(a,this),this._size=0;return}let t=this._listeners,r=t.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[r]=void 0;let n=this._deliveryQueue.current===this;if(this._size*iG<=t.length){let u=0;for(let d=0;d<t.length;d++)t[d]?t[u++]=t[d]:n&&(this._deliveryQueue.end--,u<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=u}}_deliver(e,t){var n;if(!e)return;let r=((n=this._options)==null?void 0:n.onListenerError)||Bh;if(!r){e.value(t);return}try{e.value(t)}catch(i){r(i)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){var t,r,n,i;if((t=this._deliveryQueue)!=null&&t.current&&(this._deliverQueue(this._deliveryQueue),(r=this._perfMon)==null||r.stop()),(n=this._perfMon)==null||n.start(this._size),this._listeners)if(this._listeners instanceof Wg)this._deliver(this._listeners,e);else{let o=this._deliveryQueue;o.enqueue(this,e,this._listeners.length),this._deliverQueue(o)}(i=this._perfMon)==null||i.stop()}hasListeners(){return this._size>0}},sG=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,r){this.i=0,this.end=r,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},E0=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new Ue,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new Ue,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,r){if(this.getZoomLevel(r)===t)return;let n=this.getWindowId(r);this.mapWindowIdToZoomLevel.set(n,t),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,r){this.mapWindowIdToZoomFactor.set(this.getWindowId(r),t)}setFullscreen(t,r){if(this.isFullscreen(r)===t)return;let n=this.getWindowId(r);this.mapWindowIdToFullScreen.set(n,t),this._onDidChangeFullscreen.fire(n)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};E0.INSTANCE=new E0;var mb=E0;function aG(e,t,r){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",r)}mb.INSTANCE.onDidChangeZoomLevel;function lG(e){return mb.INSTANCE.getZoomFactor(e)}mb.INSTANCE.onDidChangeFullscreen;var oc=typeof navigator=="object"?navigator.userAgent:"",$0=oc.indexOf("Firefox")>=0,cG=oc.indexOf("AppleWebKit")>=0,pb=oc.indexOf("Chrome")>=0,uG=!pb&&oc.indexOf("Safari")>=0;oc.indexOf("Electron/")>=0;oc.indexOf("Android")>=0;var Vg=!1;if(typeof cs.matchMedia=="function"){let e=cs.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=cs.matchMedia("(display-mode: fullscreen)");Vg=e.matches,aG(cs,e,({matches:r})=>{Vg&&t.matches||(Vg=r)})}var Ml="en",k0=!1,R0=!1,Lh=!1,V4=!1,mh,Dh=Ml,cx=Ml,dG,bo,Ea=globalThis,Fn,e2;typeof Ea.vscode<"u"&&typeof Ea.vscode.process<"u"?Fn=Ea.vscode.process:typeof process<"u"&&typeof((e2=process==null?void 0:process.versions)==null?void 0:e2.node)=="string"&&(Fn=process);var t2,hG=typeof((t2=Fn==null?void 0:Fn.versions)==null?void 0:t2.electron)=="string",fG=hG&&(Fn==null?void 0:Fn.type)==="renderer",r2;if(typeof Fn=="object"){k0=Fn.platform==="win32",R0=Fn.platform==="darwin",Lh=Fn.platform==="linux",Lh&&Fn.env.SNAP&&Fn.env.SNAP_REVISION,Fn.env.CI||Fn.env.BUILD_ARTIFACTSTAGINGDIRECTORY,mh=Ml,Dh=Ml;let e=Fn.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);mh=t.userLocale,cx=t.osLocale,Dh=t.resolvedLanguage||Ml,dG=(r2=t.languagePack)==null?void 0:r2.translationsConfigFile}catch{}V4=!0}else typeof navigator=="object"&&!fG?(bo=navigator.userAgent,k0=bo.indexOf("Windows")>=0,R0=bo.indexOf("Macintosh")>=0,(bo.indexOf("Macintosh")>=0||bo.indexOf("iPad")>=0||bo.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Lh=bo.indexOf("Linux")>=0,(bo==null?void 0:bo.indexOf("Mobi"))>=0,Dh=globalThis._VSCODE_NLS_LANGUAGE||Ml,mh=navigator.language.toLowerCase(),cx=mh):console.error("Unable to resolve platform.");var U4=k0,Ho=R0,mG=Lh,ux=V4,Uo=bo,Ms=Dh,pG;(e=>{function t(){return Ms}e.value=t;function r(){return Ms.length===2?Ms==="en":Ms.length>=3?Ms[0]==="e"&&Ms[1]==="n"&&Ms[2]==="-":!1}e.isDefaultVariant=r;function n(){return Ms==="en"}e.isDefault=n})(pG||(pG={}));var gG=typeof Ea.postMessage=="function"&&!Ea.importScripts;(()=>{if(gG){let e=[];Ea.addEventListener("message",r=>{if(r.data&&r.data.vscodeScheduleAsyncWork)for(let n=0,i=e.length;n<i;n++){let o=e[n];if(o.id===r.data.vscodeScheduleAsyncWork){e.splice(n,1),o.callback();return}}});let t=0;return r=>{let n=++t;e.push({id:n,callback:r}),Ea.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})();var vG=!!(Uo&&Uo.indexOf("Chrome")>=0);Uo&&Uo.indexOf("Firefox")>=0;!vG&&Uo&&Uo.indexOf("Safari")>=0;Uo&&Uo.indexOf("Edg/")>=0;Uo&&Uo.indexOf("Android")>=0;var $l=typeof navigator=="object"?navigator:{};ux||document.queryCommandSupported&&document.queryCommandSupported("copy")||$l&&$l.clipboard&&$l.clipboard.writeText,ux||$l&&$l.clipboard&&$l.clipboard.readText;var gb=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},Ug=new gb,dx=new gb,hx=new gb,yG=new Array(230),q4;(e=>{function t(c){return Ug.keyCodeToStr(c)}e.toString=t;function r(c){return Ug.strToKeyCode(c)}e.fromString=r;function n(c){return dx.keyCodeToStr(c)}e.toUserSettingsUS=n;function i(c){return hx.keyCodeToStr(c)}e.toUserSettingsGeneral=i;function o(c){return dx.strToKeyCode(c)||hx.strToKeyCode(c)}e.fromUserSettings=o;function a(c){if(c>=98&&c<=113)return null;switch(c){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return Ug.keyCodeToStr(c)}e.toElectronAccelerator=a})(q4||(q4={}));var bG=class K4{constructor(t,r,n,i,o){this.ctrlKey=t,this.shiftKey=r,this.altKey=n,this.metaKey=i,this.keyCode=o}equals(t){return t instanceof K4&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",r=this.shiftKey?"1":"0",n=this.altKey?"1":"0",i=this.metaKey?"1":"0";return`K${t}${r}${n}${i}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new _G([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},_G=class{constructor(e){if(e.length===0)throw UK("chords");this.chords=e}getHashCode(){let e="";for(let t=0,r=this.chords.length;t<r;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function SG(e){if(e.charCode){let r=String.fromCharCode(e.charCode).toUpperCase();return q4.fromString(r)}let t=e.keyCode;if(t===3)return 7;if($0)switch(t){case 59:return 85;case 60:if(mG)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(Ho)return 57;break}else if(cG&&(Ho&&t===93||!Ho&&t===92))return 57;return yG[t]||0}var CG=Ho?256:2048,wG=512,xG=1024,EG=Ho?2048:256,fx=class{constructor(e){var r;this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=(r=t.getModifierState)==null?void 0:r.call(t,"AltGraph"),this.keyCode=SG(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=CG),this.altKey&&(t|=wG),this.shiftKey&&(t|=xG),this.metaKey&&(t|=EG),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new bG(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},mx=new WeakMap;function $G(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,r=e.parent.location;if(t.origin!=="null"&&r.origin!=="null"&&t.origin!==r.origin)return null}catch{return null}return e.parent}var kG=class{static getSameOriginWindowChain(e){let t=mx.get(e);if(!t){t=[],mx.set(e,t);let r=e,n;do n=$G(r),n?t.push({window:new WeakRef(r),iframeElement:r.frameElement||null}):t.push({window:new WeakRef(r),iframeElement:null}),r=n;while(r)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let r=0,n=0,i=this.getSameOriginWindowChain(e);for(let o of i){let a=o.window.deref();if(r+=(a==null?void 0:a.scrollY)??0,n+=(a==null?void 0:a.scrollX)??0,a===t||!o.iframeElement)break;let c=o.iframeElement.getBoundingClientRect();r+=c.top,n+=c.left}return{top:r,left:n}}},ph=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let r=kG.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=r.left,this.posy-=r.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},px=class{constructor(e,t=0,r=0){var i;this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=r,this.deltaX=t;let n=!1;if(pb){let o=navigator.userAgent.match(/Chrome\/(\d+)/);n=(o?parseInt(o[1]):123)<=122}if(e){let o=e,a=e,c=((i=e.view)==null?void 0:i.devicePixelRatio)||1;if(typeof o.wheelDeltaY<"u")n?this.deltaY=o.wheelDeltaY/(120*c):this.deltaY=o.wheelDeltaY/120;else if(typeof a.VERTICAL_AXIS<"u"&&a.axis===a.VERTICAL_AXIS)this.deltaY=-a.detail/3;else if(e.type==="wheel"){let u=e;u.deltaMode===u.DOM_DELTA_LINE?$0&&!Ho?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof o.wheelDeltaX<"u")uG&&U4?this.deltaX=-(o.wheelDeltaX/120):n?this.deltaX=o.wheelDeltaX/(120*c):this.deltaX=o.wheelDeltaX/120;else if(typeof a.HORIZONTAL_AXIS<"u"&&a.axis===a.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let u=e;u.deltaMode===u.DOM_DELTA_LINE?$0&&!Ho?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(n?this.deltaY=e.wheelDelta/(120*c):this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)==null||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)==null||e.stopPropagation()}},G4=Object.freeze(function(e,t){let r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}}),RG;(e=>{function t(r){return r===e.None||r===e.Cancelled||r instanceof TG?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Vn.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:G4})})(RG||(RG={}));var TG=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?G4:(this._emitter||(this._emitter=new Ue),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},vb=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new _0("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new _0("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},PG=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){var e;(e=this.disposable)==null||e.dispose(),this.disposable=void 0}cancelAndSet(e,t,r=globalThis){if(this.isDisposed)throw new _0("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let n=r.setInterval(()=>{e()},t);this.disposable=Vr(()=>{r.clearInterval(n),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},OG;(e=>{async function t(n){let i,o=await Promise.all(n.map(a=>a.then(c=>c,c=>{i||(i=c)})));if(typeof i<"u")throw i;return o}e.settled=t;function r(n){return new Promise(async(i,o)=>{try{await n(i,o)}catch(a){o(a)}})}e.withAsyncBody=r})(OG||(OG={}));var gx=class to{static fromArray(t){return new to(r=>{r.emitMany(t)})}static fromPromise(t){return new to(async r=>{r.emitMany(await t)})}static fromPromises(t){return new to(async r=>{await Promise.all(t.map(async n=>r.emitOne(await n)))})}static merge(t){return new to(async r=>{await Promise.all(t.map(async n=>{for await(let i of n)r.emitOne(i)}))})}constructor(t,r){this._state=0,this._results=[],this._error=null,this._onReturn=r,this._onStateChanged=new Ue,queueMicrotask(async()=>{let n={emitOne:i=>this.emitOne(i),emitMany:i=>this.emitMany(i),reject:i=>this.reject(i)};try{await Promise.resolve(t(n)),this.resolve()}catch(i){this.reject(i)}finally{n.emitOne=void 0,n.emitMany=void 0,n.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await Vn.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>{var r;return(r=this._onReturn)==null||r.call(this),{done:!0,value:void 0}}}}static map(t,r){return new to(async n=>{for await(let i of t)n.emitOne(r(i))})}map(t){return to.map(this,t)}static filter(t,r){return new to(async n=>{for await(let i of t)r(i)&&n.emitOne(i)})}filter(t){return to.filter(this,t)}static coalesce(t){return to.filter(t,r=>!!r)}coalesce(){return to.coalesce(this)}static async toPromise(t){let r=[];for await(let n of t)r.push(n);return r}toPromise(){return to.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};gx.EMPTY=gx.fromArray([]);var{getWindow:Do,getWindowId:IG,onDidRegisterWindow:NG}=(function(){let e=new Map,t={window:cs,disposables:new Us};e.set(cs.vscodeWindowId,t);let r=new Ue,n=new Ue,i=new Ue;function o(a,c){return(typeof a=="number"?e.get(a):void 0)??(c?t:void 0)}return{onDidRegisterWindow:r.event,onWillUnregisterWindow:i.event,onDidUnregisterWindow:n.event,registerWindow(a){if(e.has(a.vscodeWindowId))return Zt.None;let c=new Us,u={window:a,disposables:c.add(new Us)};return e.set(a.vscodeWindowId,u),c.add(Vr(()=>{e.delete(a.vscodeWindowId),n.fire(a)})),c.add(Wt(a,In.BEFORE_UNLOAD,()=>{i.fire(a)})),r.fire(u),c},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(a){return a.vscodeWindowId},hasWindow(a){return e.has(a)},getWindowById:o,getWindow(a){var d;let c=a;if((d=c==null?void 0:c.ownerDocument)!=null&&d.defaultView)return c.ownerDocument.defaultView.window;let u=a;return u!=null&&u.view?u.view.window:cs},getDocument(a){return Do(a).document}}})(),MG=class{constructor(e,t,r,n){this._node=e,this._type=t,this._handler=r,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function Wt(e,t,r,n){return new MG(e,t,r,n)}var vx=function(e,t,r,n){return Wt(e,t,r,n)},yb,zG=class extends PG{constructor(e){super(),this.defaultTarget=e&&Do(e)}cancelAndSet(e,t,r){return super.cancelAndSet(e,t,r??this.defaultTarget)}},yx=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){Bh(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,r=new Map,n=new Map,i=o=>{r.set(o,!1);let a=e.get(o)??[];for(t.set(o,a),e.set(o,[]),n.set(o,!0);a.length>0;)a.sort(yx.sort),a.shift().execute();n.set(o,!1)};yb=(o,a,c=0)=>{let u=IG(o),d=new yx(a,c),f=e.get(u);return f||(f=[],e.set(u,f)),f.push(d),r.get(u)||(r.set(u,!0),o.requestAnimationFrame(()=>i(u))),d}})();function jG(e){let t=e.getBoundingClientRect(),r=Do(e);return{left:t.left+r.scrollX,top:t.top+r.scrollY,width:t.width,height:t.height}}var In={CLICK:"click",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",KEY_DOWN:"keydown",KEY_UP:"keyup",BEFORE_UNLOAD:"beforeunload",CHANGE:"change",FOCUS:"focus",BLUR:"blur",INPUT:"input"},BG=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=$i(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=$i(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=$i(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=$i(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=$i(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=$i(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=$i(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=$i(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=$i(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=$i(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=$i(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=$i(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=$i(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=$i(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function $i(e){return typeof e=="number"?`${e}px`:e}function cu(e){return new BG(e)}var X4=class{constructor(){this._hooks=new Us,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let r=this._onStopCallback;this._onStopCallback=null,e&&r&&r(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,r,n,i){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=n,this._onStopCallback=i;let o=e;try{e.setPointerCapture(t),this._hooks.add(Vr(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{o=Do(e)}this._hooks.add(Wt(o,In.POINTER_MOVE,a=>{if(a.buttons!==r){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(Wt(o,In.POINTER_UP,a=>this.stopMonitoring(!0)))}};function LG(e,t,r){let n=null,i=null;if(typeof r.value=="function"?(n="value",i=r.value,i.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof r.get=="function"&&(n="get",i=r.get),!i)throw new Error("not supported");let o=`$memoize$${t}`;r[n]=function(...a){return this.hasOwnProperty(o)||Object.defineProperty(this,o,{configurable:!1,enumerable:!1,writable:!1,value:i.apply(this,a)}),this[o]}}var zo;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(zo||(zo={}));var eu=class ei extends Zt{constructor(){super(),this.dispatched=!1,this.targets=new lx,this.ignoreTargets=new lx,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(Vn.runAndSubscribe(NG,({window:t,disposables:r})=>{r.add(Wt(t.document,"touchstart",n=>this.onTouchStart(n),{passive:!1})),r.add(Wt(t.document,"touchend",n=>this.onTouchEnd(t,n))),r.add(Wt(t.document,"touchmove",n=>this.onTouchMove(n),{passive:!1}))},{window:cs,disposables:this._store}))}static addTarget(t){if(!ei.isTouchDevice())return Zt.None;ei.INSTANCE||(ei.INSTANCE=new ei);let r=ei.INSTANCE.targets.push(t);return Vr(r)}static ignoreTarget(t){if(!ei.isTouchDevice())return Zt.None;ei.INSTANCE||(ei.INSTANCE=new ei);let r=ei.INSTANCE.ignoreTargets.push(t);return Vr(r)}static isTouchDevice(){return"ontouchstart"in cs||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let r=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let n=0,i=t.targetTouches.length;n<i;n++){let o=t.targetTouches.item(n);this.activeTouches[o.identifier]={id:o.identifier,initialTarget:o.target,initialTimeStamp:r,initialPageX:o.pageX,initialPageY:o.pageY,rollingTimestamps:[r],rollingPageX:[o.pageX],rollingPageY:[o.pageY]};let a=this.newGestureEvent(zo.Start,o.target);a.pageX=o.pageX,a.pageY=o.pageY,this.dispatchEvent(a)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,r){let n=Date.now(),i=Object.keys(this.activeTouches).length;for(let o=0,a=r.changedTouches.length;o<a;o++){let c=r.changedTouches.item(o);if(!this.activeTouches.hasOwnProperty(String(c.identifier))){console.warn("move of an UNKNOWN touch",c);continue}let u=this.activeTouches[c.identifier],d=Date.now()-u.initialTimeStamp;if(d<ei.HOLD_DELAY&&Math.abs(u.initialPageX-ji(u.rollingPageX))<30&&Math.abs(u.initialPageY-ji(u.rollingPageY))<30){let f=this.newGestureEvent(zo.Tap,u.initialTarget);f.pageX=ji(u.rollingPageX),f.pageY=ji(u.rollingPageY),this.dispatchEvent(f)}else if(d>=ei.HOLD_DELAY&&Math.abs(u.initialPageX-ji(u.rollingPageX))<30&&Math.abs(u.initialPageY-ji(u.rollingPageY))<30){let f=this.newGestureEvent(zo.Contextmenu,u.initialTarget);f.pageX=ji(u.rollingPageX),f.pageY=ji(u.rollingPageY),this.dispatchEvent(f)}else if(i===1){let f=ji(u.rollingPageX),p=ji(u.rollingPageY),g=ji(u.rollingTimestamps)-u.rollingTimestamps[0],v=f-u.rollingPageX[0],b=p-u.rollingPageY[0],S=[...this.targets].filter(_=>u.initialTarget instanceof Node&&_.contains(u.initialTarget));this.inertia(t,S,n,Math.abs(v)/g,v>0?1:-1,f,Math.abs(b)/g,b>0?1:-1,p)}this.dispatchEvent(this.newGestureEvent(zo.End,u.initialTarget)),delete this.activeTouches[c.identifier]}this.dispatched&&(r.preventDefault(),r.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,r){let n=document.createEvent("CustomEvent");return n.initEvent(t,!1,!0),n.initialTarget=r,n.tapCount=0,n}dispatchEvent(t){if(t.type===zo.Tap){let r=new Date().getTime(),n=0;r-this._lastSetTapCountTime>ei.CLEAR_TAP_COUNT_TIME?n=1:n=2,this._lastSetTapCountTime=r,t.tapCount=n}else(t.type===zo.Change||t.type===zo.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let n of this.ignoreTargets)if(n.contains(t.initialTarget))return;let r=[];for(let n of this.targets)if(n.contains(t.initialTarget)){let i=0,o=t.initialTarget;for(;o&&o!==n;)i++,o=o.parentElement;r.push([i,n])}r.sort((n,i)=>n[0]-i[0]);for(let[n,i]of r)i.dispatchEvent(t),this.dispatched=!0}}inertia(t,r,n,i,o,a,c,u,d){this.handle=yb(t,()=>{let f=Date.now(),p=f-n,g=0,v=0,b=!0;i+=ei.SCROLL_FRICTION*p,c+=ei.SCROLL_FRICTION*p,i>0&&(b=!1,g=o*i*p),c>0&&(b=!1,v=u*c*p);let S=this.newGestureEvent(zo.Change);S.translationX=g,S.translationY=v,r.forEach(_=>_.dispatchEvent(S)),b||this.inertia(t,r,f,i,o,a+g,c,u,d+v)})}onTouchMove(t){let r=Date.now();for(let n=0,i=t.changedTouches.length;n<i;n++){let o=t.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(o.identifier))){console.warn("end of an UNKNOWN touch",o);continue}let a=this.activeTouches[o.identifier],c=this.newGestureEvent(zo.Change,a.initialTarget);c.translationX=o.pageX-ji(a.rollingPageX),c.translationY=o.pageY-ji(a.rollingPageY),c.pageX=o.pageX,c.pageY=o.pageY,this.dispatchEvent(c),a.rollingPageX.length>3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(o.pageX),a.rollingPageY.push(o.pageY),a.rollingTimestamps.push(r)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};eu.SCROLL_FRICTION=-.005,eu.HOLD_DELAY=700,eu.CLEAR_TAP_COUNT_TIME=400,tn([LG],eu,"isTouchDevice",1);var DG=eu,bb=class extends Zt{onclick(e,t){this._register(Wt(e,In.CLICK,r=>t(new ph(Do(e),r))))}onmousedown(e,t){this._register(Wt(e,In.MOUSE_DOWN,r=>t(new ph(Do(e),r))))}onmouseover(e,t){this._register(Wt(e,In.MOUSE_OVER,r=>t(new ph(Do(e),r))))}onmouseleave(e,t){this._register(Wt(e,In.MOUSE_LEAVE,r=>t(new ph(Do(e),r))))}onkeydown(e,t){this._register(Wt(e,In.KEY_DOWN,r=>t(new fx(r))))}onkeyup(e,t){this._register(Wt(e,In.KEY_UP,r=>t(new fx(r))))}oninput(e,t){this._register(Wt(e,In.INPUT,t))}onblur(e,t){this._register(Wt(e,In.BLUR,t))}onfocus(e,t){this._register(Wt(e,In.FOCUS,t))}onchange(e,t){this._register(Wt(e,In.CHANGE,t))}ignoreGesture(e){return DG.ignoreTarget(e)}},bx=11,AG=class extends bb{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=bx+"px",this.domNode.style.height=bx+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new X4),this._register(vx(this.bgDomNode,In.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(vx(this.domNode,In.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new zG),this._pointerdownScheduleRepeatTimer=this._register(new vb)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,Do(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,r=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},HG=class T0{constructor(t,r,n,i,o,a,c){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(r=r|0,n=n|0,i=i|0,o=o|0,a=a|0,c=c|0),this.rawScrollLeft=i,this.rawScrollTop=c,r<0&&(r=0),i+r>n&&(i=n-r),i<0&&(i=0),o<0&&(o=0),c+o>a&&(c=a-o),c<0&&(c=0),this.width=r,this.scrollWidth=n,this.scrollLeft=i,this.height=o,this.scrollHeight=a,this.scrollTop=c}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,r){return new T0(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,r?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,r?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new T0(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,r){let n=this.width!==t.width,i=this.scrollWidth!==t.scrollWidth,o=this.scrollLeft!==t.scrollLeft,a=this.height!==t.height,c=this.scrollHeight!==t.scrollHeight,u=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:r,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:n,scrollWidthChanged:i,scrollLeftChanged:o,heightChanged:a,scrollHeightChanged:c,scrollTopChanged:u}}},FG=class extends Zt{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new Ue),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new HG(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var n;let r=this._state.withScrollDimensions(e,t);this._setState(r,!!this._smoothScrolling),(n=this._smoothScrolling)==null||n.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let r=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===r.scrollLeft&&this._smoothScrolling.to.scrollTop===r.scrollTop)return;let n;t?n=new Sx(this._smoothScrolling.from,r,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,r,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{let r=this._state.withScrollPosition(e);this._smoothScrolling=Sx.start(this._state,r,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let r=this._state;r.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(r,t)))}},_x=class{constructor(e,t,r){this.scrollLeft=e,this.scrollTop=t,this.isDone=r}};function qg(e,t){let r=t-e;return function(n){return e+r*UG(n)}}function WG(e,t,r){return function(n){return n<r?e(n/r):t((n-r)/(1-r))}}var Sx=class P0{constructor(t,r,n,i){this.from=t,this.to=r,this.duration=i,this.startTime=n,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,r,n){if(Math.abs(t-r)>2.5*n){let i,o;return t<r?(i=t+.75*n,o=r-.75*n):(i=t-.75*n,o=r+.75*n),WG(qg(t,i),qg(o,r),.33)}return qg(t,r)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let r=(t-this.startTime)/this.duration;if(r<1){let n=this.scrollLeft(r),i=this.scrollTop(r);return new _x(n,i,!1)}return new _x(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,r,n){return P0.start(t,r,n)}static start(t,r,n){n=n+10;let i=Date.now()-10;return new P0(t,r,i,n)}};function VG(e){return Math.pow(e,3)}function UG(e){return 1-VG(1-e)}var qG=class extends Zt{constructor(e,t,r){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=r,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new vb)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)==null||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)==null||t.setClassName(this._invisibleClassName+(e?" fade":"")))}},KG=140,Y4=class extends bb{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new qG(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new X4),this._shouldRender=!0,this.domNode=cu(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(Wt(this.domNode.domNode,In.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new AG(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,r,n){this.slider=cu(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof r=="number"&&this.slider.setWidth(r),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(Wt(this.slider.domNode,In.POINTER_DOWN,i=>{i.button===0&&(i.preventDefault(),this._sliderPointerDown(i))})),this.onclick(this.slider.domNode,i=>{i.leftButton&&i.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,r=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),i=this._sliderPointerPosition(e);r<=i&&i<=n?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,r;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,r=e.offsetY;else{let i=jG(this.domNode.domNode);t=e.pageX-i.left,r=e.pageY-i.top}let n=this._pointerDownRelativePosition(t,r);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),r=this._sliderOrthogonalPointerPosition(e),n=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{let o=this._sliderOrthogonalPointerPosition(i),a=Math.abs(o-r);if(U4&&a>KG){this._setDesiredScrollPositionNow(n.getScrollPosition());return}let c=this._sliderPointerPosition(i)-t;this._setDesiredScrollPositionNow(n.getDesiredScrollPositionFromDelta(c))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},J4=class O0{constructor(t,r,n,i,o,a){this._scrollbarSize=Math.round(r),this._oppositeScrollbarSize=Math.round(n),this._arrowSize=Math.round(t),this._visibleSize=i,this._scrollSize=o,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new O0(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let r=Math.round(t);return this._visibleSize!==r?(this._visibleSize=r,this._refreshComputedValues(),!0):!1}setScrollSize(t){let r=Math.round(t);return this._scrollSize!==r?(this._scrollSize=r,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let r=Math.round(t);return this._scrollPosition!==r?(this._scrollPosition=r,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,r,n,i,o){let a=Math.max(0,n-t),c=Math.max(0,a-2*r),u=i>0&&i>n;if(!u)return{computedAvailableSize:Math.round(a),computedIsNeeded:u,computedSliderSize:Math.round(c),computedSliderRatio:0,computedSliderPosition:0};let d=Math.round(Math.max(20,Math.floor(n*c/i))),f=(c-d)/(i-n),p=o*f;return{computedAvailableSize:Math.round(a),computedIsNeeded:u,computedSliderSize:Math.round(d),computedSliderRatio:f,computedSliderPosition:Math.round(p)}}_refreshComputedValues(){let t=O0._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let r=t-this._arrowSize-this._computedSliderSize/2;return Math.round(r/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let r=t-this._arrowSize,n=this._scrollPosition;return r<this._computedSliderPosition?n-=this._visibleSize:n+=this._visibleSize,n}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let r=this._computedSliderPosition+t;return Math.round(r/this._computedSliderRatio)}},GG=class extends Y4{constructor(e,t,r){let n=e.getScrollDimensions(),i=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:r,scrollbarState:new J4(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,n.width,n.scrollWidth,i.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},XG=class extends Y4{constructor(e,t,r){let n=e.getScrollDimensions(),i=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:r,scrollbarState:new J4(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,i.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},YG=500,Cx=50,JG=class{constructor(e,t,r){this.timestamp=e,this.deltaX=t,this.deltaY=r,this.score=0}},I0=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,r=0,n=1,i=this._rear;do{let o=i===this._front?t:Math.pow(2,-n);if(t-=o,r+=this._memory[i].score*o,i===this._front)break;i=(this._capacity+i-1)%this._capacity,n++}while(!0);return r<=.5}acceptStandardWheelEvent(t){if(pb){let r=Do(t.browserEvent),n=lG(r);this.accept(Date.now(),t.deltaX*n,t.deltaY*n)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,r,n){let i=null,o=new JG(t,r,n);this._front===-1&&this._rear===-1?(this._memory[0]=o,this._front=0,this._rear=0):(i=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=o),o.score=this._computeScore(o,i)}_computeScore(t,r){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let n=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(n+=.25),r){let i=Math.abs(t.deltaX),o=Math.abs(t.deltaY),a=Math.abs(r.deltaX),c=Math.abs(r.deltaY),u=Math.max(Math.min(i,a),1),d=Math.max(Math.min(o,c),1),f=Math.max(i,a),p=Math.max(o,c);f%u===0&&p%d===0&&(n-=.5)}return Math.min(Math.max(n,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};I0.INSTANCE=new I0;var QG=I0,ZG=class extends bb{constructor(e,t,r){super(),this._onScroll=this._register(new Ue),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new Ue),this.onWillScroll=this._onWillScroll.event,this._options=tX(t),this._scrollable=r,this._register(this._scrollable.onScroll(i=>{this._onWillScroll.fire(i),this._onDidScroll(i),this._onScroll.fire(i)}));let n={onMouseWheel:i=>this._onMouseWheel(i),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new XG(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new GG(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=cu(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=cu(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=cu(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,i=>this._onMouseOver(i)),this.onmouseleave(this._listenOnDomNode,i=>this._onMouseLeave(i)),this._hideTimeout=this._register(new vb),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=Ia(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Ho&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new px(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=Ia(this._mouseWheelToDispose),e)){let t=r=>{this._onMouseWheel(new px(r))};this._mouseWheelToDispose.push(Wt(this._listenOnDomNode,In.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){var i;if((i=e.browserEvent)!=null&&i.defaultPrevented)return;let t=QG.INSTANCE;t.acceptStandardWheelEvent(e);let r=!1;if(e.deltaY||e.deltaX){let o=e.deltaY*this._options.mouseWheelScrollSensitivity,a=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&a+o===0?a=o=0:Math.abs(o)>=Math.abs(a)?a=0:o=0),this._options.flipAxes&&([o,a]=[a,o]);let c=!Ho&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||c)&&!a&&(a=o,o=0),e.browserEvent&&e.browserEvent.altKey&&(a=a*this._options.fastScrollSensitivity,o=o*this._options.fastScrollSensitivity);let u=this._scrollable.getFutureScrollPosition(),d={};if(o){let f=Cx*o,p=u.scrollTop-(f<0?Math.floor(f):Math.ceil(f));this._verticalScrollbar.writeScrollPosition(d,p)}if(a){let f=Cx*a,p=u.scrollLeft-(f<0?Math.floor(f):Math.ceil(f));this._horizontalScrollbar.writeScrollPosition(d,p)}d=this._scrollable.validateScrollPosition(d),(u.scrollLeft!==d.scrollLeft||u.scrollTop!==d.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(d):this._scrollable.setScrollPositionNow(d),r=!0)}let n=r;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,r=e.scrollLeft>0,n=r?" left":"",i=t?" top":"",o=r||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${i}`),this._topLeftShadowDomNode.setClassName(`shadow${o}${i}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),YG)}},eX=class extends ZG{constructor(e,t,r){super(e,t,r)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function tX(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,Ho&&(t.className+=" mac"),t}var N0=class extends Zt{constructor(e,t,r,n,i,o,a,c){super(),this._bufferService=r,this._optionsService=a,this._renderService=c,this._onRequestScrollLines=this._register(new Ue),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let u=this._register(new FG({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:d=>yb(n.window,d)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{u.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new eX(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},u)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(i.onProtocolChange(d=>{this._scrollableElement.updateOptions({handleMouseWheel:!(d&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(Vn.runAndSubscribe(o.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=o.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(Vr(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=n.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(Vr(()=>this._styleElement.remove())),this._register(Vn.runAndSubscribe(o.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${o.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${o.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${o.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
583
+ `)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(d=>this._handleScroll(d)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){var e;return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:((e=this._optionsService.rawOptions.overviewRuler)==null?void 0:e.width)||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),r=t-this._bufferService.buffer.ydisp;r!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(r)),this._isHandlingScroll=!1}};N0=tn([lt(2,mi),lt(3,ms),lt(4,O4),lt(5,ic),lt(6,pi),lt(7,ps)],N0);var M0=class extends Zt{constructor(e,t,r,n,i){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=r,this._decorationService=n,this._renderService=i,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(o=>this._removeDecoration(o))),this._register(Vr(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){var n;let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",((n=e==null?void 0:e.options)==null?void 0:n.layer)==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let r=e.options.x??0;return r&&r>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let r=this._decorationElements.get(e);r||(r=this._createElement(e),e.element=r,this._decorationElements.set(e,r),this._container.appendChild(r),e.onDispose(()=>{this._decorationElements.delete(e),r.remove()})),r.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(r.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,r.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(r)}}_refreshXPosition(e,t=e.element){if(!t)return;let r=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=r?`${r*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=r?`${r*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){var t;(t=this._decorationElements.get(e))==null||t.remove(),this._decorationElements.delete(e),e.dispose()}};M0=tn([lt(1,mi),lt(2,ms),lt(3,Yu),lt(4,ps)],M0);var rX=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,r){return t>=e.startBufferLine-this._linePadding[r||"full"]&&t<=e.endBufferLine+this._linePadding[r||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},Io={full:0,left:0,center:0,right:0},zs={full:0,left:0,center:0,right:0},Fc={full:0,left:0,center:0,right:0},bf=class extends Zt{constructor(e,t,r,n,i,o,a,c){var d;super(),this._viewportElement=e,this._screenElement=t,this._bufferService=r,this._decorationService=n,this._renderService=i,this._optionsService=o,this._themeService=a,this._coreBrowserService=c,this._colorZoneStore=new rX,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(d=this._viewportElement.parentElement)==null||d.insertBefore(this._canvas,this._viewportElement),this._register(Vr(()=>{var f;return(f=this._canvas)==null?void 0:f.remove()}));let u=this._canvas.getContext("2d");if(u)this._ctx=u;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){var e;return((e=this._optionsService.options.overviewRuler)==null?void 0:e.width)||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);zs.full=this._canvas.width,zs.left=e,zs.center=t,zs.right=e,this._refreshDrawHeightConstants(),Fc.full=1,Fc.left=1,Fc.center=1+zs.left,Fc.right=1+zs.left+zs.center}_refreshDrawHeightConstants(){Io.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);Io.left=t,Io.center=t,Io.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Io.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Io.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Io.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*Io.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(Fc[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-Io[e.position||"full"]/2),zs[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+Io[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};bf=tn([lt(2,mi),lt(3,Yu),lt(4,ps),lt(5,pi),lt(6,ic),lt(7,ms)],bf);var Pe;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT=" ",e.LF=`
584
+ `,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL=""))(Pe||(Pe={}));var Ah;(e=>(e.PAD="€",e.HOP="",e.BPH="‚",e.NBH="ƒ",e.IND="„",e.NEL="…",e.SSA="†",e.ESA="‡",e.HTS="ˆ",e.HTJ="‰",e.VTS="Š",e.PLD="‹",e.PLU="Œ",e.RI="",e.SS2="Ž",e.SS3="",e.DCS="",e.PU1="‘",e.PU2="’",e.STS="“",e.CCH="”",e.MW="•",e.SPA="–",e.EPA="—",e.SOS="˜",e.SGCI="™",e.SCI="š",e.CSI="›",e.ST="œ",e.OSC="",e.PM="ž",e.APC="Ÿ"))(Ah||(Ah={}));var Q4;(e=>e.ST=`${Pe.ESC}\\`)(Q4||(Q4={}));var z0=class{constructor(e,t,r,n,i,o){this._textarea=e,this._compositionView=t,this._bufferService=r,this._optionsService=n,this._coreService=i,this._renderService=o,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let r;t.start+=this._dataAlreadySent.length,this._isComposing?r=this._textarea.value.substring(t.start,this._compositionPosition.start):r=this._textarea.value.substring(t.start),r.length>0&&this._coreService.triggerDataEvent(r,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,r=t.replace(e,"");this._dataAlreadySent=r,t.length>e.length?this._coreService.triggerDataEvent(r,!0):t.length<e.length?this._coreService.triggerDataEvent(`${Pe.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),r=this._renderService.dimensions.css.cell.height,n=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,i=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=i+"px",this._compositionView.style.top=n+"px",this._compositionView.style.height=r+"px",this._compositionView.style.lineHeight=r+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let o=this._compositionView.getBoundingClientRect();this._textarea.style.left=i+"px",this._textarea.style.top=n+"px",this._textarea.style.width=Math.max(o.width,1)+"px",this._textarea.style.height=Math.max(o.height,1)+"px",this._textarea.style.lineHeight=o.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};z0=tn([lt(2,mi),lt(3,pi),lt(4,Da),lt(5,ps)],z0);var Nn=0,Mn=0,zn=0,en=0,wx={css:"#00000000",rgba:0},mn;(e=>{function t(i,o,a,c){return c!==void 0?`#${fa(i)}${fa(o)}${fa(a)}${fa(c)}`:`#${fa(i)}${fa(o)}${fa(a)}`}e.toCss=t;function r(i,o,a,c=255){return(i<<24|o<<16|a<<8|c)>>>0}e.toRgba=r;function n(i,o,a,c){return{css:e.toCss(i,o,a,c),rgba:e.toRgba(i,o,a,c)}}e.toColor=n})(mn||(mn={}));var Hr;(e=>{function t(u,d){if(en=(d.rgba&255)/255,en===1)return{css:d.css,rgba:d.rgba};let f=d.rgba>>24&255,p=d.rgba>>16&255,g=d.rgba>>8&255,v=u.rgba>>24&255,b=u.rgba>>16&255,S=u.rgba>>8&255;Nn=v+Math.round((f-v)*en),Mn=b+Math.round((p-b)*en),zn=S+Math.round((g-S)*en);let _=mn.toCss(Nn,Mn,zn),C=mn.toRgba(Nn,Mn,zn);return{css:_,rgba:C}}e.blend=t;function r(u){return(u.rgba&255)===255}e.isOpaque=r;function n(u,d,f){let p=Hh.ensureContrastRatio(u.rgba,d.rgba,f);if(p)return mn.toColor(p>>24&255,p>>16&255,p>>8&255)}e.ensureContrastRatio=n;function i(u){let d=(u.rgba|255)>>>0;return[Nn,Mn,zn]=Hh.toChannels(d),{css:mn.toCss(Nn,Mn,zn),rgba:d}}e.opaque=i;function o(u,d){return en=Math.round(d*255),[Nn,Mn,zn]=Hh.toChannels(u.rgba),{css:mn.toCss(Nn,Mn,zn,en),rgba:mn.toRgba(Nn,Mn,zn,en)}}e.opacity=o;function a(u,d){return en=u.rgba&255,o(u,en*d/255)}e.multiplyOpacity=a;function c(u){return[u.rgba>>24&255,u.rgba>>16&255,u.rgba>>8&255]}e.toColorRGB=c})(Hr||(Hr={}));var Yr;(e=>{let t,r;try{let i=document.createElement("canvas");i.width=1,i.height=1;let o=i.getContext("2d",{willReadFrequently:!0});o&&(t=o,t.globalCompositeOperation="copy",r=t.createLinearGradient(0,0,1,1))}catch{}function n(i){if(i.match(/#[\da-f]{3,8}/i))switch(i.length){case 4:return Nn=parseInt(i.slice(1,2).repeat(2),16),Mn=parseInt(i.slice(2,3).repeat(2),16),zn=parseInt(i.slice(3,4).repeat(2),16),mn.toColor(Nn,Mn,zn);case 5:return Nn=parseInt(i.slice(1,2).repeat(2),16),Mn=parseInt(i.slice(2,3).repeat(2),16),zn=parseInt(i.slice(3,4).repeat(2),16),en=parseInt(i.slice(4,5).repeat(2),16),mn.toColor(Nn,Mn,zn,en);case 7:return{css:i,rgba:(parseInt(i.slice(1),16)<<8|255)>>>0};case 9:return{css:i,rgba:parseInt(i.slice(1),16)>>>0}}let o=i.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(o)return Nn=parseInt(o[1]),Mn=parseInt(o[2]),zn=parseInt(o[3]),en=Math.round((o[5]===void 0?1:parseFloat(o[5]))*255),mn.toColor(Nn,Mn,zn,en);if(!t||!r)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=r,t.fillStyle=i,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[Nn,Mn,zn,en]=t.getImageData(0,0,1,1).data,en!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:mn.toRgba(Nn,Mn,zn,en),css:i}}e.toColor=n})(Yr||(Yr={}));var ci;(e=>{function t(n){return r(n>>16&255,n>>8&255,n&255)}e.relativeLuminance=t;function r(n,i,o){let a=n/255,c=i/255,u=o/255,d=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),f=c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4),p=u<=.03928?u/12.92:Math.pow((u+.055)/1.055,2.4);return d*.2126+f*.7152+p*.0722}e.relativeLuminance2=r})(ci||(ci={}));var Hh;(e=>{function t(a,c){if(en=(c&255)/255,en===1)return c;let u=c>>24&255,d=c>>16&255,f=c>>8&255,p=a>>24&255,g=a>>16&255,v=a>>8&255;return Nn=p+Math.round((u-p)*en),Mn=g+Math.round((d-g)*en),zn=v+Math.round((f-v)*en),mn.toRgba(Nn,Mn,zn)}e.blend=t;function r(a,c,u){let d=ci.relativeLuminance(a>>8),f=ci.relativeLuminance(c>>8);if(as(d,f)<u){if(f<d){let v=n(a,c,u),b=as(d,ci.relativeLuminance(v>>8));if(b<u){let S=i(a,c,u),_=as(d,ci.relativeLuminance(S>>8));return b>_?v:S}return v}let p=i(a,c,u),g=as(d,ci.relativeLuminance(p>>8));if(g<u){let v=n(a,c,u),b=as(d,ci.relativeLuminance(v>>8));return g>b?p:v}return p}}e.ensureContrastRatio=r;function n(a,c,u){let d=a>>24&255,f=a>>16&255,p=a>>8&255,g=c>>24&255,v=c>>16&255,b=c>>8&255,S=as(ci.relativeLuminance2(g,v,b),ci.relativeLuminance2(d,f,p));for(;S<u&&(g>0||v>0||b>0);)g-=Math.max(0,Math.ceil(g*.1)),v-=Math.max(0,Math.ceil(v*.1)),b-=Math.max(0,Math.ceil(b*.1)),S=as(ci.relativeLuminance2(g,v,b),ci.relativeLuminance2(d,f,p));return(g<<24|v<<16|b<<8|255)>>>0}e.reduceLuminance=n;function i(a,c,u){let d=a>>24&255,f=a>>16&255,p=a>>8&255,g=c>>24&255,v=c>>16&255,b=c>>8&255,S=as(ci.relativeLuminance2(g,v,b),ci.relativeLuminance2(d,f,p));for(;S<u&&(g<255||v<255||b<255);)g=Math.min(255,g+Math.ceil((255-g)*.1)),v=Math.min(255,v+Math.ceil((255-v)*.1)),b=Math.min(255,b+Math.ceil((255-b)*.1)),S=as(ci.relativeLuminance2(g,v,b),ci.relativeLuminance2(d,f,p));return(g<<24|v<<16|b<<8|255)>>>0}e.increaseLuminance=i;function o(a){return[a>>24&255,a>>16&255,a>>8&255,a&255]}e.toChannels=o})(Hh||(Hh={}));function fa(e){let t=e.toString(16);return t.length<2?"0"+t:t}function as(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var nX=class extends Xu{constructor(e,t,r){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=r}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},_f=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new so}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let r=[],n=t.translateToString(!0),i=0,o=0,a=0,c=t.getFg(0),u=t.getBg(0);for(let d=0;d<t.getTrimmedLength();d++)if(t.loadCell(d,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==c||this._workCell.bg!==u){if(d-i>1){let f=this._getJoinedRanges(n,a,o,t,i);for(let p=0;p<f.length;p++)r.push(f[p])}i=d,a=o,c=this._workCell.fg,u=this._workCell.bg}o+=this._workCell.getChars().length||Ws.length}if(this._bufferService.cols-i>1){let d=this._getJoinedRanges(n,a,o,t,i);for(let f=0;f<d.length;f++)r.push(d[f])}return r}_getJoinedRanges(e,t,r,n,i){let o=e.substring(t,r),a=[];try{a=this._characterJoiners[0].handler(o)}catch(c){console.error(c)}for(let c=1;c<this._characterJoiners.length;c++)try{let u=this._characterJoiners[c].handler(o);for(let d=0;d<u.length;d++)_f._mergeRanges(a,u[d])}catch(u){console.error(u)}return this._stringRangesToCellRanges(a,n,i),a}_stringRangesToCellRanges(e,t,r){let n=0,i=!1,o=0,a=e[n];if(a){for(let c=r;c<this._bufferService.cols;c++){let u=t.getWidth(c),d=t.getString(c).length||Ws.length;if(u!==0){if(!i&&a[0]<=o&&(a[0]=c,i=!0),a[1]<=o){if(a[1]=c,a=e[++n],!a)break;a[0]<=o?(a[0]=c,i=!0):i=!1}o+=d}}a&&(a[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let r=!1;for(let n=0;n<e.length;n++){let i=e[n];if(r){if(t[1]<=i[0])return e[n-1][1]=t[1],e;if(t[1]<=i[1])return e[n-1][1]=Math.max(t[1],i[1]),e.splice(n,1),e;e.splice(n,1),n--}else{if(t[1]<=i[0])return e.splice(n,0,t),e;if(t[1]<=i[1])return i[0]=Math.min(t[0],i[0]),e;t[0]<i[1]&&(i[0]=Math.min(t[0],i[0]),r=!0);continue}}return r?e[e.length-1][1]=t[1]:e.push(t),e}};_f=tn([lt(0,mi)],_f);function iX(e){return 57508<=e&&e<=57558}function oX(e){return 9472<=e&&e<=9631}function sX(e){return iX(e)||oX(e)}function aX(){return{css:{canvas:gh(),cell:gh()},device:{canvas:gh(),cell:gh(),char:{width:0,height:0,left:0,top:0}}}}function gh(){return{width:0,height:0}}var j0=class{constructor(e,t,r,n,i,o,a){this._document=e,this._characterJoinerService=t,this._optionsService=r,this._coreBrowserService=n,this._coreService=i,this._decorationService=o,this._themeService=a,this._workCell=new so,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,r){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=r}createRow(e,t,r,n,i,o,a,c,u,d,f){let p=[],g=this._characterJoinerService.getJoinedCharacters(t),v=this._themeService.colors,b=e.getNoBgTrimmedLength();r&&b<o+1&&(b=o+1);let S,_=0,C="",x=0,E=0,k=0,P=0,T=!1,O=0,N=!1,I=0,z=0,D=[],M=d!==-1&&f!==-1;for(let j=0;j<b;j++){e.loadCell(j,this._workCell);let B=this._workCell.getWidth();if(B===0)continue;let F=!1,W=j>=z,V=j,L=this._workCell;if(g.length>0&&j===g[0][0]&&W){let ce=g.shift(),ye=this._isCellInSelection(ce[0],t);for(x=ce[0]+1;x<ce[1];x++)W&&(W=ye===this._isCellInSelection(x,t));W&&(W=!r||o<ce[0]||o>=ce[1]),W?(F=!0,L=new nX(this._workCell,e.translateToString(!0,ce[0],ce[1]),ce[1]-ce[0]),V=ce[1]-1,B=L.getWidth()):z=ce[1]}let G=this._isCellInSelection(j,t),q=r&&j===o,A=M&&j>=d&&j<=f,U=!1;this._decorationService.forEachDecorationAtCell(j,t,void 0,ce=>{U=!0});let Y=L.getChars()||Ws;if(Y===" "&&(L.isUnderline()||L.isOverline())&&(Y=" "),I=B*c-u.get(Y,L.isBold(),L.isItalic()),!S)S=this._document.createElement("span");else if(_&&(G&&N||!G&&!N&&L.bg===E)&&(G&&N&&v.selectionForeground||L.fg===k)&&L.extended.ext===P&&A===T&&I===O&&!q&&!F&&!U&&W){L.isInvisible()?C+=Ws:C+=Y,_++;continue}else _&&(S.textContent=C),S=this._document.createElement("span"),_=0,C="";if(E=L.bg,k=L.fg,P=L.extended.ext,T=A,O=I,N=G,F&&o>=j&&o<=V&&(o=j),!this._coreService.isCursorHidden&&q&&this._coreService.isCursorInitialized){if(D.push("xterm-cursor"),this._coreBrowserService.isFocused)a&&D.push("xterm-cursor-blink"),D.push(n==="bar"?"xterm-cursor-bar":n==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(i)switch(i){case"outline":D.push("xterm-cursor-outline");break;case"block":D.push("xterm-cursor-block");break;case"bar":D.push("xterm-cursor-bar");break;case"underline":D.push("xterm-cursor-underline");break}}if(L.isBold()&&D.push("xterm-bold"),L.isItalic()&&D.push("xterm-italic"),L.isDim()&&D.push("xterm-dim"),L.isInvisible()?C=Ws:C=L.getChars()||Ws,L.isUnderline()&&(D.push(`xterm-underline-${L.extended.underlineStyle}`),C===" "&&(C=" "),!L.isUnderlineColorDefault()))if(L.isUnderlineColorRGB())S.style.textDecorationColor=`rgb(${Xu.toColorRGB(L.getUnderlineColor()).join(",")})`;else{let ce=L.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&L.isBold()&&ce<8&&(ce+=8),S.style.textDecorationColor=v.ansi[ce].css}L.isOverline()&&(D.push("xterm-overline"),C===" "&&(C=" ")),L.isStrikethrough()&&D.push("xterm-strikethrough"),A&&(S.style.textDecoration="underline");let Z=L.getFgColor(),te=L.getFgColorMode(),ne=L.getBgColor(),he=L.getBgColorMode(),me=!!L.isInverse();if(me){let ce=Z;Z=ne,ne=ce;let ye=te;te=he,he=ye}let ue,Se,ae=!1;this._decorationService.forEachDecorationAtCell(j,t,void 0,ce=>{ce.options.layer!=="top"&&ae||(ce.backgroundColorRGB&&(he=50331648,ne=ce.backgroundColorRGB.rgba>>8&16777215,ue=ce.backgroundColorRGB),ce.foregroundColorRGB&&(te=50331648,Z=ce.foregroundColorRGB.rgba>>8&16777215,Se=ce.foregroundColorRGB),ae=ce.options.layer==="top")}),!ae&&G&&(ue=this._coreBrowserService.isFocused?v.selectionBackgroundOpaque:v.selectionInactiveBackgroundOpaque,ne=ue.rgba>>8&16777215,he=50331648,ae=!0,v.selectionForeground&&(te=50331648,Z=v.selectionForeground.rgba>>8&16777215,Se=v.selectionForeground)),ae&&D.push("xterm-decoration-top");let le;switch(he){case 16777216:case 33554432:le=v.ansi[ne],D.push(`xterm-bg-${ne}`);break;case 50331648:le=mn.toColor(ne>>16,ne>>8&255,ne&255),this._addStyle(S,`background-color:#${xx((ne>>>0).toString(16),"0",6)}`);break;case 0:default:me?(le=v.foreground,D.push("xterm-bg-257")):le=v.background}switch(ue||L.isDim()&&(ue=Hr.multiplyOpacity(le,.5)),te){case 16777216:case 33554432:L.isBold()&&Z<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Z+=8),this._applyMinimumContrast(S,le,v.ansi[Z],L,ue,void 0)||D.push(`xterm-fg-${Z}`);break;case 50331648:let ce=mn.toColor(Z>>16&255,Z>>8&255,Z&255);this._applyMinimumContrast(S,le,ce,L,ue,Se)||this._addStyle(S,`color:#${xx(Z.toString(16),"0",6)}`);break;case 0:default:this._applyMinimumContrast(S,le,v.foreground,L,ue,Se)||me&&D.push("xterm-fg-257")}D.length&&(S.className=D.join(" "),D.length=0),!q&&!F&&!U&&W?_++:S.textContent=C,I!==this.defaultSpacing&&(S.style.letterSpacing=`${I}px`),p.push(S),j=V}return S&&_&&(S.textContent=C),p}_applyMinimumContrast(e,t,r,n,i,o){if(this._optionsService.rawOptions.minimumContrastRatio===1||sX(n.getCode()))return!1;let a=this._getContrastCache(n),c;if(!i&&!o&&(c=a.getColor(t.rgba,r.rgba)),c===void 0){let u=this._optionsService.rawOptions.minimumContrastRatio/(n.isDim()?2:1);c=Hr.ensureContrastRatio(i||t,o||r,u),a.setColor((i||t).rgba,(o||r).rgba,c??null)}return c?(this._addStyle(e,`color:${c.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let r=this._selectionStart,n=this._selectionEnd;return!r||!n?!1:this._columnSelectMode?r[0]<=n[0]?e>=r[0]&&t>=r[1]&&e<n[0]&&t<=n[1]:e<r[0]&&t>=r[1]&&e>=n[0]&&t<=n[1]:t>r[1]&&t<n[1]||r[1]===n[1]&&t===r[1]&&e>=r[0]&&e<n[0]||r[1]<n[1]&&t===n[1]&&e<n[0]||r[1]<n[1]&&t===r[1]&&e>=r[0]}};j0=tn([lt(1,M4),lt(2,pi),lt(3,ms),lt(4,Da),lt(5,Yu),lt(6,ic)],j0);function xx(e,t,r){for(;e.length<r;)e=t+e;return e}var lX=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let r=e.createElement("span");r.classList.add("xterm-char-measure-element");let n=e.createElement("span");n.classList.add("xterm-char-measure-element"),n.style.fontWeight="bold";let i=e.createElement("span");i.classList.add("xterm-char-measure-element"),i.style.fontStyle="italic";let o=e.createElement("span");o.classList.add("xterm-char-measure-element"),o.style.fontWeight="bold",o.style.fontStyle="italic",this._measureElements=[r,n,i,o],this._container.appendChild(r),this._container.appendChild(n),this._container.appendChild(i),this._container.appendChild(o),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,r,n){e===this._font&&t===this._fontSize&&r===this._weight&&n===this._weightBold||(this._font=e,this._fontSize=t,this._weight=r,this._weightBold=n,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${r}`,this._measureElements[1].style.fontWeight=`${n}`,this._measureElements[2].style.fontWeight=`${r}`,this._measureElements[3].style.fontWeight=`${n}`,this.clear())}get(e,t,r){let n=0;if(!t&&!r&&e.length===1&&(n=e.charCodeAt(0))<256){if(this._flat[n]!==-9999)return this._flat[n];let a=this._measure(e,0);return a>0&&(this._flat[n]=a),a}let i=e;t&&(i+="B"),r&&(i+="I");let o=this._holey.get(i);if(o===void 0){let a=0;t&&(a|=1),r&&(a|=2),o=this._measure(e,a),o>0&&this._holey.set(i,o)}return o}_measure(e,t){let r=this._measureElements[t];return r.textContent=e.repeat(32),r.offsetWidth/32}},cX=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,r,n=!1){if(this.selectionStart=t,this.selectionEnd=r,!t||!r||t[0]===r[0]&&t[1]===r[1]){this.clear();return}let i=e.buffers.active.ydisp,o=t[1]-i,a=r[1]-i,c=Math.max(o,0),u=Math.min(a,e.rows-1);if(c>=e.rows||u<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=n,this.viewportStartRow=o,this.viewportEndRow=a,this.viewportCappedStartRow=c,this.viewportCappedEndRow=u,this.startCol=t[0],this.endCol=r[0]}isCellSelected(e,t,r){return this.hasSelection?(r-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&r>=this.viewportCappedStartRow&&t<this.endCol&&r<=this.viewportCappedEndRow:t<this.startCol&&r>=this.viewportCappedStartRow&&t>=this.endCol&&r<=this.viewportCappedEndRow:r>this.viewportStartRow&&r<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&r===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&r===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&r===this.viewportStartRow&&t>=this.startCol):!1}};function uX(){return new cX}var Kg="xterm-dom-renderer-owner-",eo="xterm-rows",vh="xterm-fg-",Ex="xterm-bg-",Wc="xterm-focus",yh="xterm-selection",dX=1,B0=class extends Zt{constructor(e,t,r,n,i,o,a,c,u,d,f,p,g,v){super(),this._terminal=e,this._document=t,this._element=r,this._screenElement=n,this._viewportElement=i,this._helperContainer=o,this._linkifier2=a,this._charSizeService=u,this._optionsService=d,this._bufferService=f,this._coreService=p,this._coreBrowserService=g,this._themeService=v,this._terminalClass=dX++,this._rowElements=[],this._selectionRenderModel=uX(),this.onRequestRedraw=this._register(new Ue).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(eo),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(yh),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=aX(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(b=>this._injectCss(b))),this._injectCss(this._themeService.colors),this._rowFactory=c.createInstance(j0,document),this._element.classList.add(Kg+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(b=>this._handleLinkHover(b))),this._register(this._linkifier2.onHideLinkUnderline(b=>this._handleLinkLeave(b))),this._register(Vr(()=>{this._element.classList.remove(Kg+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new lX(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let r of this._rowElements)r.style.width=`${this.dimensions.css.canvas.width}px`,r.style.height=`${this.dimensions.css.cell.height}px`,r.style.lineHeight=`${this.dimensions.css.cell.height}px`,r.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${eo} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${eo} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${eo} .xterm-dim { color: ${Hr.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let r=`blink_underline_${this._terminalClass}`,n=`blink_bar_${this._terminalClass}`,i=`blink_block_${this._terminalClass}`;t+=`@keyframes ${r} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${n} { 50% { box-shadow: none; }}`,t+=`@keyframes ${i} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${eo}.${Wc} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${eo}.${Wc} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${eo}.${Wc} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${eo} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${eo} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${eo} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${eo} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${eo} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${yh} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${yh} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${yh} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[o,a]of e.ansi.entries())t+=`${this._terminalSelector} .${vh}${o} { color: ${a.css}; }${this._terminalSelector} .${vh}${o}.xterm-dim { color: ${Hr.multiplyOpacity(a,.5).css}; }${this._terminalSelector} .${Ex}${o} { background-color: ${a.css}; }`;t+=`${this._terminalSelector} .${vh}257 { color: ${Hr.opaque(e.background).css}; }${this._terminalSelector} .${vh}257.xterm-dim { color: ${Hr.multiplyOpacity(Hr.opaque(e.background),.5).css}; }${this._terminalSelector} .${Ex}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let r=this._rowElements.length;r<=t;r++){let n=this._document.createElement("div");this._rowContainer.appendChild(n),this._rowElements.push(n)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(Wc),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(Wc),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,r){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,r),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,r),!this._selectionRenderModel.hasSelection))return;let n=this._selectionRenderModel.viewportStartRow,i=this._selectionRenderModel.viewportEndRow,o=this._selectionRenderModel.viewportCappedStartRow,a=this._selectionRenderModel.viewportCappedEndRow,c=this._document.createDocumentFragment();if(r){let u=e[0]>t[0];c.appendChild(this._createSelectionElement(o,u?t[0]:e[0],u?e[0]:t[0],a-o+1))}else{let u=n===o?e[0]:0,d=o===i?t[0]:this._bufferService.cols;c.appendChild(this._createSelectionElement(o,u,d));let f=a-o-1;if(c.appendChild(this._createSelectionElement(o+1,0,this._bufferService.cols,f)),o!==a){let p=i===a?t[0]:this._bufferService.cols;c.appendChild(this._createSelectionElement(a,0,p))}}this._selectionContainer.appendChild(c)}_createSelectionElement(e,t,r,n=1){let i=this._document.createElement("div"),o=t*this.dimensions.css.cell.width,a=this.dimensions.css.cell.width*(r-t);return o+a>this.dimensions.css.canvas.width&&(a=this.dimensions.css.canvas.width-o),i.style.height=`${n*this.dimensions.css.cell.height}px`,i.style.top=`${e*this.dimensions.css.cell.height}px`,i.style.left=`${o}px`,i.style.width=`${a}px`,i}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let r=this._bufferService.buffer,n=r.ybase+r.y,i=Math.min(r.x,this._bufferService.cols-1),o=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,a=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,c=this._optionsService.rawOptions.cursorInactiveStyle;for(let u=e;u<=t;u++){let d=u+r.ydisp,f=this._rowElements[u],p=r.lines.get(d);if(!f||!p)break;f.replaceChildren(...this._rowFactory.createRow(p,d,d===n,a,c,i,o,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${Kg}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,r,n,i,o){r<0&&(e=0),n<0&&(t=0);let a=this._bufferService.rows-1;r=Math.max(Math.min(r,a),0),n=Math.max(Math.min(n,a),0),i=Math.min(i,this._bufferService.cols);let c=this._bufferService.buffer,u=c.ybase+c.y,d=Math.min(c.x,i-1),f=this._optionsService.rawOptions.cursorBlink,p=this._optionsService.rawOptions.cursorStyle,g=this._optionsService.rawOptions.cursorInactiveStyle;for(let v=r;v<=n;++v){let b=v+c.ydisp,S=this._rowElements[v],_=c.lines.get(b);if(!S||!_)break;S.replaceChildren(...this._rowFactory.createRow(_,b,b===u,p,g,d,f,this.dimensions.css.cell.width,this._widthCache,o?v===r?e:0:-1,o?(v===n?t:i)-1:-1))}}};B0=tn([lt(7,hb),lt(8,hm),lt(9,pi),lt(10,mi),lt(11,Da),lt(12,ms),lt(13,ic)],B0);var L0=class extends Zt{constructor(e,t,r){super(),this._optionsService=r,this.width=0,this.height=0,this._onCharSizeChange=this._register(new Ue),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new fX(this._optionsService))}catch{this._measureStrategy=this._register(new hX(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};L0=tn([lt(2,pi)],L0);var Z4=class extends Zt{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},hX=class extends Z4{constructor(e,t,r){super(),this._document=e,this._parentElement=t,this._optionsService=r,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},fX=class extends Z4{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},mX=class extends Zt{constructor(e,t,r){super(),this._textarea=e,this._window=t,this.mainDocument=r,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new pX(this._window)),this._onDprChange=this._register(new Ue),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new Ue),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(n=>this._screenDprMonitor.setWindow(n))),this._register(Vn.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(Wt(this._textarea,"focus",()=>this._isFocused=!0)),this._register(Wt(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},pX=class extends Zt{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new Yl),this._onDprChange=this._register(new Ue),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(Vr(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=Wt(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var e;this._outerListener&&((e=this._resolutionMediaMatchList)==null||e.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},gX=class extends Zt{constructor(){super(),this.linkProviders=[],this._register(Vr(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function _b(e,t,r){let n=r.getBoundingClientRect(),i=e.getComputedStyle(r),o=parseInt(i.getPropertyValue("padding-left")),a=parseInt(i.getPropertyValue("padding-top"));return[t.clientX-n.left-o,t.clientY-n.top-a]}function vX(e,t,r,n,i,o,a,c,u){if(!o)return;let d=_b(e,t,r);if(d)return d[0]=Math.ceil((d[0]+(u?a/2:0))/a),d[1]=Math.ceil(d[1]/c),d[0]=Math.min(Math.max(d[0],1),n+(u?1:0)),d[1]=Math.min(Math.max(d[1],1),i),d}var D0=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,r,n,i){return vX(window,e,t,r,n,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,i)}getMouseReportCoords(e,t){let r=_b(window,e,t);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};D0=tn([lt(0,ps),lt(1,hm)],D0);var yX=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,r){this._rowCount=r,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},eR={};RK(eR,{getSafariVersion:()=>_X,isChromeOS:()=>iR,isFirefox:()=>tR,isIpad:()=>SX,isIphone:()=>CX,isLegacyEdge:()=>bX,isLinux:()=>Sb,isMac:()=>Sf,isNode:()=>fm,isSafari:()=>rR,isWindows:()=>nR});var fm=typeof process<"u"&&"title"in process,Ju=fm?"node":navigator.userAgent,Qu=fm?"node":navigator.platform,tR=Ju.includes("Firefox"),bX=Ju.includes("Edge"),rR=/^((?!chrome|android).)*safari/i.test(Ju);function _X(){if(!rR)return 0;let e=Ju.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var Sf=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(Qu),SX=Qu==="iPad",CX=Qu==="iPhone",nR=["Windows","Win16","Win32","WinCE"].includes(Qu),Sb=Qu.indexOf("Linux")>=0,iR=/\bCrOS\b/.test(Ju),oR=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,r=0,n=e.timeRemaining(),i=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),r=Math.max(t,r),i=e.timeRemaining(),r*1.5>i){n-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(n-t))}ms`),this._start();return}n=i}this.clear()}},wX=class extends oR{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},xX=class extends oR{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},Cf=!fm&&"requestIdleCallback"in window?xX:wX,EX=class{constructor(){this._queue=new Cf}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},A0=class extends Zt{constructor(e,t,r,n,i,o,a,c,u){super(),this._rowCount=e,this._optionsService=r,this._charSizeService=n,this._coreService=i,this._coreBrowserService=c,this._renderer=this._register(new Yl),this._pausedResizeTask=new EX,this._observerDisposable=this._register(new Yl),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new Ue),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new Ue),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new Ue),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new Ue),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new yX((d,f)=>this._renderRows(d,f),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new $X(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(Vr(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(a.onResize(()=>this._fullRefresh())),this._register(a.buffers.onBufferActivate(()=>{var d;return(d=this._renderer.value)==null?void 0:d.clear()})),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(o.onDecorationRegistered(()=>this._fullRefresh())),this._register(o.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(a.cols,a.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(a.buffer.y,a.buffer.y,!0))),this._register(u.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(d=>this._registerIntersectionObserver(d,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let r=new e.IntersectionObserver(n=>this._handleIntersectionChange(n[n.length-1]),{threshold:0});r.observe(t),this._observerDisposable.value=Vr(()=>r.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,r=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let n=this._syncOutputHandler.flush();n&&(e=Math.min(e,n.start),t=Math.max(t,n.end)),r||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var e,t;this._renderer.value&&((t=(e=this._renderer.value).clearTextureAtlas)==null||t.call(e),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var r;return(r=this._renderer.value)==null?void 0:r.handleResize(e,t)}):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){var e;(e=this._renderer.value)==null||e.handleCharSizeChanged()}handleBlur(){var e;(e=this._renderer.value)==null||e.handleBlur()}handleFocus(){var e;(e=this._renderer.value)==null||e.handleFocus()}handleSelectionChanged(e,t,r){var n;this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=r,(n=this._renderer.value)==null||n.handleSelectionChanged(e,t,r)}handleCursorMove(){var e;(e=this._renderer.value)==null||e.handleCursorMove()}clear(){var e;(e=this._renderer.value)==null||e.clear()}};A0=tn([lt(2,pi),lt(3,hm),lt(4,Da),lt(5,Yu),lt(6,mi),lt(7,ms),lt(8,ic)],A0);var $X=class{constructor(e,t,r){this._coreBrowserService=e,this._coreService=t,this._onTimeout=r,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function kX(e,t,r,n){let i=r.buffer.x,o=r.buffer.y;if(!r.buffer.hasScrollback)return PX(i,o,e,t,r,n)+mm(o,t,r,n)+OX(i,o,e,t,r,n);let a;if(o===t)return a=i>e?"D":"C",Tu(Math.abs(i-e),Ru(a,n));a=o>t?"D":"C";let c=Math.abs(o-t),u=TX(o>t?e:i,r)+(c-1)*r.cols+1+RX(o>t?i:e);return Tu(u,Ru(a,n))}function RX(e,t){return e-1}function TX(e,t){return t.cols-e}function PX(e,t,r,n,i,o){return mm(t,n,i,o).length===0?"":Tu(aR(e,t,e,t-Na(t,i),!1,i).length,Ru("D",o))}function mm(e,t,r,n){let i=e-Na(e,r),o=t-Na(t,r),a=Math.abs(i-o)-IX(e,t,r);return Tu(a,Ru(sR(e,t),n))}function OX(e,t,r,n,i,o){let a;mm(t,n,i,o).length>0?a=n-Na(n,i):a=t;let c=n,u=NX(e,t,r,n,i,o);return Tu(aR(e,a,r,c,u==="C",i).length,Ru(u,o))}function IX(e,t,r){var a;let n=0,i=e-Na(e,r),o=t-Na(t,r);for(let c=0;c<Math.abs(i-o);c++){let u=sR(e,t)==="A"?-1:1;(a=r.buffer.lines.get(i+u*c))!=null&&a.isWrapped&&n++}return n}function Na(e,t){let r=0,n=t.buffer.lines.get(e),i=n==null?void 0:n.isWrapped;for(;i&&e>=0&&e<t.rows;)r++,n=t.buffer.lines.get(--e),i=n==null?void 0:n.isWrapped;return r}function NX(e,t,r,n,i,o){let a;return mm(r,n,i,o).length>0?a=n-Na(n,i):a=t,e<r&&a<=n||e>=r&&a<n?"C":"D"}function sR(e,t){return e>t?"A":"B"}function aR(e,t,r,n,i,o){let a=e,c=t,u="";for(;(a!==r||c!==n)&&c>=0&&c<o.buffer.lines.length;)a+=i?1:-1,i&&a>o.cols-1?(u+=o.buffer.translateBufferLineToString(c,!1,e,a),a=0,e=0,c++):!i&&a<0&&(u+=o.buffer.translateBufferLineToString(c,!1,0,e+1),a=o.cols-1,e=a,c--);return u+o.buffer.translateBufferLineToString(c,!1,e,a)}function Ru(e,t){let r=t?"O":"[";return Pe.ESC+r+e}function Tu(e,t){e=Math.floor(e);let r="";for(let n=0;n<e;n++)r+=t;return r}var MX=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function $x(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var Gg=50,zX=15,jX=50,BX=500,LX=" ",DX=new RegExp(LX,"g"),H0=class extends Zt{constructor(e,t,r,n,i,o,a,c,u){super(),this._element=e,this._screenElement=t,this._linkifier=r,this._bufferService=n,this._coreService=i,this._mouseService=o,this._optionsService=a,this._renderService=c,this._coreBrowserService=u,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new so,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new Ue),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new Ue),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new Ue),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new Ue),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=d=>this._handleMouseMove(d),this._mouseUpListener=d=>this._handleMouseUp(d),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(d=>this._handleTrim(d)),this._register(this._bufferService.buffers.onBufferActivate(d=>this._handleBufferActivate(d))),this.enable(),this._model=new MX(this._bufferService),this._activeSelectionMode=0,this._register(Vr(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(d=>{d.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let r=this._bufferService.buffer,n=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let i=e[0]<t[0]?e[0]:t[0],o=e[0]<t[0]?t[0]:e[0];for(let a=e[1];a<=t[1];a++){let c=r.translateBufferLineToString(a,!0,i,o);n.push(c)}}else{let i=e[1]===t[1]?t[0]:void 0;n.push(r.translateBufferLineToString(e[1],!0,e[0],i));for(let o=e[1]+1;o<=t[1]-1;o++){let a=r.lines.get(o),c=r.translateBufferLineToString(o,!0);a!=null&&a.isWrapped?n[n.length-1]+=c:n.push(c)}if(e[1]!==t[1]){let o=r.lines.get(t[1]),a=r.translateBufferLineToString(t[1],!0,0,t[0]);o&&o.isWrapped?n[n.length-1]+=a:n.push(a)}}return n.map(i=>i.replace(DX," ")).join(nR?`\r
585
+ `:`
586
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),Sb&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),r=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!r||!n||!t?!1:this._areCoordsInSelection(t,r,n)}isCellInSelection(e,t){let r=this._model.finalSelectionStart,n=this._model.finalSelectionEnd;return!r||!n?!1:this._areCoordsInSelection([e,t],r,n)}_areCoordsInSelection(e,t,r){return e[1]>t[1]&&e[1]<r[1]||t[1]===r[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<r[0]||t[1]<r[1]&&e[1]===r[1]&&e[0]<r[0]||t[1]<r[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){var i,o;let r=(o=(i=this._linkifier.currentLink)==null?void 0:i.link)==null?void 0:o.range;if(r)return this._model.selectionStart=[r.start.x-1,r.start.y-1],this._model.selectionStartLength=$x(r,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let n=this._getMouseBufferCoords(e);return n?(this._selectWordAt(n,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=_b(this._coreBrowserService.window,e,this._screenElement)[1],r=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=r?0:(t>r&&(t-=r),t=Math.min(Math.max(t,-Gg),Gg),t/=Gg,t/Math.abs(t)+Math.round(t*(zX-1)))}shouldForceSelection(e){return Sf?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),jX)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(Sf&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let r=this._bufferService.buffer;if(this._model.selectionEnd[1]<r.lines.length){let n=r.lines.get(this._model.selectionEnd[1]);n&&n.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[1]!==this._model.selectionEnd[1])&&this.refresh(!0)}_dragScroll(){if(!(!this._model.selectionEnd||!this._model.selectionStart)&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<BX&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let r=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(r&&r[0]!==void 0&&r[1]!==void 0){let n=kX(r[0]-1,r[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(n,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,r=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!r){this._oldHasSelection&&this._fireOnSelectionChange(e,t,r);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,r)}_fireOnSelectionChange(e,t,r){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=r,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let r=t;for(let n=0;t>=n;n++){let i=e.loadCell(n,this._workCell).getChars().length;this._workCell.getWidth()===0?r--:i>1&&t!==n&&(r+=i-1)}return r}setSelection(e,t,r){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=r,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,r=!0,n=!0){if(e[0]>=this._bufferService.cols)return;let i=this._bufferService.buffer,o=i.lines.get(e[1]);if(!o)return;let a=i.translateBufferLineToString(e[1],!1),c=this._convertViewportColToCharacterIndex(o,e[0]),u=c,d=e[0]-c,f=0,p=0,g=0,v=0;if(a.charAt(c)===" "){for(;c>0&&a.charAt(c-1)===" ";)c--;for(;u<a.length&&a.charAt(u+1)===" ";)u++}else{let _=e[0],C=e[0];o.getWidth(_)===0&&(f++,_--),o.getWidth(C)===2&&(p++,C++);let x=o.getString(C).length;for(x>1&&(v+=x-1,u+=x-1);_>0&&c>0&&!this._isCharWordSeparator(o.loadCell(_-1,this._workCell));){o.loadCell(_-1,this._workCell);let E=this._workCell.getChars().length;this._workCell.getWidth()===0?(f++,_--):E>1&&(g+=E-1,c-=E-1),c--,_--}for(;C<o.length&&u+1<a.length&&!this._isCharWordSeparator(o.loadCell(C+1,this._workCell));){o.loadCell(C+1,this._workCell);let E=this._workCell.getChars().length;this._workCell.getWidth()===2?(p++,C++):E>1&&(v+=E-1,u+=E-1),u++,C++}}u++;let b=c+d-f+g,S=Math.min(this._bufferService.cols,u-c+f+p-g-v);if(!(!t&&a.slice(c,u).trim()==="")){if(r&&b===0&&o.getCodePoint(0)!==32){let _=i.lines.get(e[1]-1);if(_&&o.isWrapped&&_.getCodePoint(this._bufferService.cols-1)!==32){let C=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(C){let x=this._bufferService.cols-C.start;b-=x,S+=x}}}if(n&&b+S===this._bufferService.cols&&o.getCodePoint(this._bufferService.cols-1)!==32){let _=i.lines.get(e[1]+1);if(_!=null&&_.isWrapped&&_.getCodePoint(0)!==32){let C=this._getWordAt([0,e[1]+1],!1,!1,!0);C&&(S+=C.length)}}return{start:b,length:S}}}_selectWordAt(e,t){let r=this._getWordAt(e,t);if(r){for(;r.start<0;)r.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[r.start,e[1]],this._model.selectionStartLength=r.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let r=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,r--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,r++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,r]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),r={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=$x(r,this._bufferService.cols)}};H0=tn([lt(3,mi),lt(4,Da),lt(5,fb),lt(6,pi),lt(7,ps),lt(8,ms)],H0);var kx=class{constructor(){this._data={}}set(e,t,r){this._data[e]||(this._data[e]={}),this._data[e][t]=r}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},Rx=class{constructor(){this._color=new kx,this._css=new kx}setCss(e,t,r){this._css.set(e,t,r)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,r){this._color.set(e,t,r)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},Cn=Object.freeze((()=>{let e=[Yr.toColor("#2e3436"),Yr.toColor("#cc0000"),Yr.toColor("#4e9a06"),Yr.toColor("#c4a000"),Yr.toColor("#3465a4"),Yr.toColor("#75507b"),Yr.toColor("#06989a"),Yr.toColor("#d3d7cf"),Yr.toColor("#555753"),Yr.toColor("#ef2929"),Yr.toColor("#8ae234"),Yr.toColor("#fce94f"),Yr.toColor("#729fcf"),Yr.toColor("#ad7fa8"),Yr.toColor("#34e2e2"),Yr.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let r=0;r<216;r++){let n=t[r/36%6|0],i=t[r/6%6|0],o=t[r%6];e.push({css:mn.toCss(n,i,o),rgba:mn.toRgba(n,i,o)})}for(let r=0;r<24;r++){let n=8+r*10;e.push({css:mn.toCss(n,n,n),rgba:mn.toRgba(n,n,n)})}return e})()),ma=Yr.toColor("#ffffff"),tu=Yr.toColor("#000000"),Tx=Yr.toColor("#ffffff"),Px=tu,Vc={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},AX=ma,F0=class extends Zt{constructor(e){super(),this._optionsService=e,this._contrastCache=new Rx,this._halfContrastCache=new Rx,this._onChangeColors=this._register(new Ue),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:ma,background:tu,cursor:Tx,cursorAccent:Px,selectionForeground:void 0,selectionBackgroundTransparent:Vc,selectionBackgroundOpaque:Hr.blend(tu,Vc),selectionInactiveBackgroundTransparent:Vc,selectionInactiveBackgroundOpaque:Hr.blend(tu,Vc),scrollbarSliderBackground:Hr.opacity(ma,.2),scrollbarSliderHoverBackground:Hr.opacity(ma,.4),scrollbarSliderActiveBackground:Hr.opacity(ma,.5),overviewRulerBorder:ma,ansi:Cn.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=Ir(e.foreground,ma),t.background=Ir(e.background,tu),t.cursor=Hr.blend(t.background,Ir(e.cursor,Tx)),t.cursorAccent=Hr.blend(t.background,Ir(e.cursorAccent,Px)),t.selectionBackgroundTransparent=Ir(e.selectionBackground,Vc),t.selectionBackgroundOpaque=Hr.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=Ir(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=Hr.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?Ir(e.selectionForeground,wx):void 0,t.selectionForeground===wx&&(t.selectionForeground=void 0),Hr.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=Hr.opacity(t.selectionBackgroundTransparent,.3)),Hr.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=Hr.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=Ir(e.scrollbarSliderBackground,Hr.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=Ir(e.scrollbarSliderHoverBackground,Hr.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=Ir(e.scrollbarSliderActiveBackground,Hr.opacity(t.foreground,.5)),t.overviewRulerBorder=Ir(e.overviewRulerBorder,AX),t.ansi=Cn.slice(),t.ansi[0]=Ir(e.black,Cn[0]),t.ansi[1]=Ir(e.red,Cn[1]),t.ansi[2]=Ir(e.green,Cn[2]),t.ansi[3]=Ir(e.yellow,Cn[3]),t.ansi[4]=Ir(e.blue,Cn[4]),t.ansi[5]=Ir(e.magenta,Cn[5]),t.ansi[6]=Ir(e.cyan,Cn[6]),t.ansi[7]=Ir(e.white,Cn[7]),t.ansi[8]=Ir(e.brightBlack,Cn[8]),t.ansi[9]=Ir(e.brightRed,Cn[9]),t.ansi[10]=Ir(e.brightGreen,Cn[10]),t.ansi[11]=Ir(e.brightYellow,Cn[11]),t.ansi[12]=Ir(e.brightBlue,Cn[12]),t.ansi[13]=Ir(e.brightMagenta,Cn[13]),t.ansi[14]=Ir(e.brightCyan,Cn[14]),t.ansi[15]=Ir(e.brightWhite,Cn[15]),e.extendedAnsi){let r=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let n=0;n<r;n++)t.ansi[n+16]=Ir(e.extendedAnsi[n],Cn[n+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};F0=tn([lt(0,pi)],F0);function Ir(e,t){if(e!==void 0)try{return Yr.toColor(e)}catch{}return t}var HX=class{constructor(...e){this._entries=new Map;for(let[t,r]of e)this.set(t,r)}set(e,t){let r=this._entries.get(e);return this._entries.set(e,t),r}forEach(e){for(let[t,r]of this._entries.entries())e(t,r)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},FX=class{constructor(){this._services=new HX,this._services.set(hb,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let r=zK(e).sort((o,a)=>o.index-a.index),n=[];for(let o of r){let a=this._services.get(o.id);if(!a)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${o.id._id}.`);n.push(a)}let i=r.length>0?r[0].index:t.length;if(t.length!==i)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${i+1} conflicts with ${t.length} static arguments`);return new e(...t,...n)}},WX={trace:0,debug:1,info:2,warn:3,error:4,off:5},VX="xterm.js: ",W0=class extends Zt{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=WX[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,r){this._evalLazyOptionalParams(r),e.call(console,(this._optionsService.options.logger?"":VX)+t,...r)}trace(e,...t){var r;this._logLevel<=0&&this._log(((r=this._optionsService.options.logger)==null?void 0:r.trace.bind(this._optionsService.options.logger))??console.log,e,t)}debug(e,...t){var r;this._logLevel<=1&&this._log(((r=this._optionsService.options.logger)==null?void 0:r.debug.bind(this._optionsService.options.logger))??console.log,e,t)}info(e,...t){var r;this._logLevel<=2&&this._log(((r=this._optionsService.options.logger)==null?void 0:r.info.bind(this._optionsService.options.logger))??console.info,e,t)}warn(e,...t){var r;this._logLevel<=3&&this._log(((r=this._optionsService.options.logger)==null?void 0:r.warn.bind(this._optionsService.options.logger))??console.warn,e,t)}error(e,...t){var r;this._logLevel<=4&&this._log(((r=this._optionsService.options.logger)==null?void 0:r.error.bind(this._optionsService.options.logger))??console.error,e,t)}};W0=tn([lt(0,pi)],W0);var Ox=class extends Zt{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new Ue),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new Ue),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new Ue),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let r=0;r<Math.min(e,this.length);r++)t[r]=this._array[this._getCyclicIndex(r)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...r){if(t){for(let n=e;n<this._length-t;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let n=this._length-1;n>=e;n--)this._array[this._getCyclicIndex(n+r.length)]=this._array[this._getCyclicIndex(n)];for(let n=0;n<r.length;n++)this._array[this._getCyclicIndex(e+n)]=r[n];if(r.length&&this.onInsertEmitter.fire({index:e,amount:r.length}),this._length+r.length>this._maxLength){let n=this._length+r.length-this._maxLength;this._startIndex+=n,this._length=this._maxLength,this.onTrimEmitter.fire(n)}else this._length+=r.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,r){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+r<0)throw new Error("Cannot shift elements in list beyond index 0");if(r>0){for(let i=t-1;i>=0;i--)this.set(e+i+r,this.get(e+i));let n=e+t+r-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let n=0;n<t;n++)this.set(e+n+r,this.get(e+n))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},Jt=3,hn=Object.freeze(new Xu),bh=0,Xg=2,ru=class lR{constructor(t,r,n=!1){this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*Jt);let i=r||so.fromCharData([0,k4,1,0]);for(let o=0;o<t;++o)this.setCell(o,i);this.length=t}get(t){let r=this._data[t*Jt+0],n=r&2097151;return[this._data[t*Jt+1],r&2097152?this._combined[t]:n?Ds(n):"",r>>22,r&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):n]}set(t,r){this._data[t*Jt+1]=r[0],r[1].length>1?(this._combined[t]=r[1],this._data[t*Jt+0]=t|2097152|r[2]<<22):this._data[t*Jt+0]=r[1].charCodeAt(0)|r[2]<<22}getWidth(t){return this._data[t*Jt+0]>>22}hasWidth(t){return this._data[t*Jt+0]&12582912}getFg(t){return this._data[t*Jt+1]}getBg(t){return this._data[t*Jt+2]}hasContent(t){return this._data[t*Jt+0]&4194303}getCodePoint(t){let r=this._data[t*Jt+0];return r&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):r&2097151}isCombined(t){return this._data[t*Jt+0]&2097152}getString(t){let r=this._data[t*Jt+0];return r&2097152?this._combined[t]:r&2097151?Ds(r&2097151):""}isProtected(t){return this._data[t*Jt+2]&536870912}loadCell(t,r){return bh=t*Jt,r.content=this._data[bh+0],r.fg=this._data[bh+1],r.bg=this._data[bh+2],r.content&2097152&&(r.combinedData=this._combined[t]),r.bg&268435456&&(r.extended=this._extendedAttrs[t]),r}setCell(t,r){r.content&2097152&&(this._combined[t]=r.combinedData),r.bg&268435456&&(this._extendedAttrs[t]=r.extended),this._data[t*Jt+0]=r.content,this._data[t*Jt+1]=r.fg,this._data[t*Jt+2]=r.bg}setCellFromCodepoint(t,r,n,i){i.bg&268435456&&(this._extendedAttrs[t]=i.extended),this._data[t*Jt+0]=r|n<<22,this._data[t*Jt+1]=i.fg,this._data[t*Jt+2]=i.bg}addCodepointToCell(t,r,n){let i=this._data[t*Jt+0];i&2097152?this._combined[t]+=Ds(r):i&2097151?(this._combined[t]=Ds(i&2097151)+Ds(r),i&=-2097152,i|=2097152):i=r|1<<22,n&&(i&=-12582913,i|=n<<22),this._data[t*Jt+0]=i}insertCells(t,r,n){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length-t){let i=new so;for(let o=this.length-t-r-1;o>=0;--o)this.setCell(t+r+o,this.loadCell(t+o,i));for(let o=0;o<r;++o)this.setCell(t+o,n)}else for(let i=t;i<this.length;++i)this.setCell(i,n);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,n)}deleteCells(t,r,n){if(t%=this.length,r<this.length-t){let i=new so;for(let o=0;o<this.length-t-r;++o)this.setCell(t+o,this.loadCell(t+r+o,i));for(let o=this.length-r;o<this.length;++o)this.setCell(o,n)}else for(let i=t;i<this.length;++i)this.setCell(i,n);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,n)}replaceCells(t,r,n,i=!1){if(i){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length&&this.getWidth(r-1)===2&&!this.isProtected(r)&&this.setCellFromCodepoint(r,0,1,n);t<r&&t<this.length;)this.isProtected(t)||this.setCell(t,n),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,n),r<this.length&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r,0,1,n);t<r&&t<this.length;)this.setCell(t++,n)}resize(t,r){if(t===this.length)return this._data.length*4*Xg<this._data.buffer.byteLength;let n=t*Jt;if(t>this.length){if(this._data.buffer.byteLength>=n*4)this._data=new Uint32Array(this._data.buffer,0,n);else{let i=new Uint32Array(n);i.set(this._data),this._data=i}for(let i=this.length;i<t;++i)this.setCell(i,r)}else{this._data=this._data.subarray(0,n);let i=Object.keys(this._combined);for(let a=0;a<i.length;a++){let c=parseInt(i[a],10);c>=t&&delete this._combined[c]}let o=Object.keys(this._extendedAttrs);for(let a=0;a<o.length;a++){let c=parseInt(o[a],10);c>=t&&delete this._extendedAttrs[c]}}return this.length=t,n*4*Xg<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*Xg<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,r=!1){if(r){for(let n=0;n<this.length;++n)this.isProtected(n)||this.setCell(n,t);return}this._combined={},this._extendedAttrs={};for(let n=0;n<this.length;++n)this.setCell(n,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let r in t._combined)this._combined[r]=t._combined[r];this._extendedAttrs={};for(let r in t._extendedAttrs)this._extendedAttrs[r]=t._extendedAttrs[r];this.isWrapped=t.isWrapped}clone(){let t=new lR(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let r in this._combined)t._combined[r]=this._combined[r];for(let r in this._extendedAttrs)t._extendedAttrs[r]=this._extendedAttrs[r];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Jt+0]&4194303)return t+(this._data[t*Jt+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Jt+0]&4194303||this._data[t*Jt+2]&50331648)return t+(this._data[t*Jt+0]>>22);return 0}copyCellsFrom(t,r,n,i,o){let a=t._data;if(o)for(let u=i-1;u>=0;u--){for(let d=0;d<Jt;d++)this._data[(n+u)*Jt+d]=a[(r+u)*Jt+d];a[(r+u)*Jt+2]&268435456&&(this._extendedAttrs[n+u]=t._extendedAttrs[r+u])}else for(let u=0;u<i;u++){for(let d=0;d<Jt;d++)this._data[(n+u)*Jt+d]=a[(r+u)*Jt+d];a[(r+u)*Jt+2]&268435456&&(this._extendedAttrs[n+u]=t._extendedAttrs[r+u])}let c=Object.keys(t._combined);for(let u=0;u<c.length;u++){let d=parseInt(c[u],10);d>=r&&(this._combined[d-r+n]=t._combined[d])}}translateToString(t,r,n,i){r=r??0,n=n??this.length,t&&(n=Math.min(n,this.getTrimmedLength())),i&&(i.length=0);let o="";for(;r<n;){let a=this._data[r*Jt+0],c=a&2097151,u=a&2097152?this._combined[r]:c?Ds(c):Ws;if(o+=u,i)for(let d=0;d<u.length;++d)i.push(r);r+=a>>22||1}return i&&i.push(r),o}};function UX(e,t,r,n,i,o){let a=[];for(let c=0;c<e.length-1;c++){let u=c,d=e.get(++u);if(!d.isWrapped)continue;let f=[e.get(c)];for(;u<e.length&&d.isWrapped;)f.push(d),d=e.get(++u);if(!o&&n>=c&&n<u){c+=f.length-1;continue}let p=0,g=Pu(f,p,t),v=1,b=0;for(;v<f.length;){let _=Pu(f,v,t),C=_-b,x=r-g,E=Math.min(C,x);f[p].copyCellsFrom(f[v],b,g,E,!1),g+=E,g===r&&(p++,g=0),b+=E,b===_&&(v++,b=0),g===0&&p!==0&&f[p-1].getWidth(r-1)===2&&(f[p].copyCellsFrom(f[p-1],r-1,g++,1,!1),f[p-1].setCell(r-1,i))}f[p].replaceCells(g,r,i);let S=0;for(let _=f.length-1;_>0&&(_>p||f[_].getTrimmedLength()===0);_--)S++;S>0&&(a.push(c+f.length-S),a.push(S)),c+=f.length-1}return a}function qX(e,t){let r=[],n=0,i=t[n],o=0;for(let a=0;a<e.length;a++)if(i===a){let c=t[++n];e.onDeleteEmitter.fire({index:a-o,amount:c}),a+=c-1,o+=c,i=t[++n]}else r.push(a);return{layout:r,countRemoved:o}}function KX(e,t){let r=[];for(let n=0;n<t.length;n++)r.push(e.get(t[n]));for(let n=0;n<r.length;n++)e.set(n,r[n]);e.length=t.length}function GX(e,t,r){let n=[],i=e.map((u,d)=>Pu(e,d,t)).reduce((u,d)=>u+d),o=0,a=0,c=0;for(;c<i;){if(i-c<r){n.push(i-c);break}o+=r;let u=Pu(e,a,t);o>u&&(o-=u,a++);let d=e[a].getWidth(o-1)===2;d&&o--;let f=d?r-1:r;n.push(f),c+=f}return n}function Pu(e,t,r){if(t===e.length-1)return e[t].getTrimmedLength();let n=!e[t].hasContent(r-1)&&e[t].getWidth(r-1)===1,i=e[t+1].getWidth(0)===2;return n&&i?r-1:r}var cR=class uR{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=uR._nextId++,this._onDispose=this.register(new Ue),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),Ia(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};cR._nextId=1;var XX=cR,En={},pa=En.B;En[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"};En.A={"#":"£"};En.B=void 0;En[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"};En.C=En[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};En.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"};En.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"};En.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"};En.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"};En.E=En[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"};En.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"};En.H=En[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};En["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"};var Ix=4294967295,Nx=class{constructor(e,t,r){this._hasScrollback=e,this._optionsService=t,this._bufferService=r,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=hn.clone(),this.savedCharset=pa,this.markers=[],this._nullCell=so.fromCharData([0,k4,1,0]),this._whitespaceCell=so.fromCharData([0,Ws,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new Cf,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new Ox(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new yf),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new yf),this._whitespaceCell}getBlankLine(e,t){return new ru(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>Ix?Ix:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=hn);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new Ox(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let r=this.getNullCell(hn),n=0,i=this._getCorrectBufferLength(t);if(i>this.lines.maxLength&&(this.lines.maxLength=i),this.lines.length>0){if(this._cols<e)for(let a=0;a<this.lines.length;a++)n+=+this.lines.get(a).resize(e,r);let o=0;if(this._rows<t)for(let a=this._rows;a<t;a++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new ru(e,r)):this.ybase>0&&this.lines.length<=this.ybase+this.y+o+1?(this.ybase--,o++,this.ydisp>0&&this.ydisp--):this.lines.push(new ru(e,r)));else for(let a=this._rows;a>t;a--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(i<this.lines.maxLength){let a=this.lines.length-i;a>0&&(this.lines.trimStart(a),this.ybase=Math.max(this.ybase-a,0),this.ydisp=Math.max(this.ydisp-a,0),this.savedY=Math.max(this.savedY-a,0)),this.lines.maxLength=i}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),o&&(this.y+=o),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let o=0;o<this.lines.length;o++)n+=+this.lines.get(o).resize(e,r);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),n>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let r=this._optionsService.rawOptions.reflowCursorLine,n=UX(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(hn),r);if(n.length>0){let i=qX(this.lines,n);KX(this.lines,i.layout),this._reflowLargerAdjustViewport(e,t,i.countRemoved)}}_reflowLargerAdjustViewport(e,t,r){let n=this.getNullCell(hn),i=r;for(;i-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new ru(e,n))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-r,0)}_reflowSmaller(e,t){let r=this._optionsService.rawOptions.reflowCursorLine,n=this.getNullCell(hn),i=[],o=0;for(let a=this.lines.length-1;a>=0;a--){let c=this.lines.get(a);if(!c||!c.isWrapped&&c.getTrimmedLength()<=e)continue;let u=[c];for(;c.isWrapped&&a>0;)c=this.lines.get(--a),u.unshift(c);if(!r){let E=this.ybase+this.y;if(E>=a&&E<a+u.length)continue}let d=u[u.length-1].getTrimmedLength(),f=GX(u,this._cols,e),p=f.length-u.length,g;this.ybase===0&&this.y!==this.lines.length-1?g=Math.max(0,this.y-this.lines.maxLength+p):g=Math.max(0,this.lines.length-this.lines.maxLength+p);let v=[];for(let E=0;E<p;E++){let k=this.getBlankLine(hn,!0);v.push(k)}v.length>0&&(i.push({start:a+u.length+o,newLines:v}),o+=v.length),u.push(...v);let b=f.length-1,S=f[b];S===0&&(b--,S=f[b]);let _=u.length-p-1,C=d;for(;_>=0;){let E=Math.min(C,S);if(u[b]===void 0)break;if(u[b].copyCellsFrom(u[_],C-E,S-E,E,!0),S-=E,S===0&&(b--,S=f[b]),C-=E,C===0){_--;let k=Math.max(_,0);C=Pu(u,k,this._cols)}}for(let E=0;E<u.length;E++)f[E]<e&&u[E].setCell(f[E],n);let x=p-g;for(;x-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+o)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+p,this.ybase+t-1)}if(i.length>0){let a=[],c=[];for(let S=0;S<this.lines.length;S++)c.push(this.lines.get(S));let u=this.lines.length,d=u-1,f=0,p=i[f];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+o);let g=0;for(let S=Math.min(this.lines.maxLength-1,u+o-1);S>=0;S--)if(p&&p.start>d+g){for(let _=p.newLines.length-1;_>=0;_--)this.lines.set(S--,p.newLines[_]);S++,a.push({index:d+1,amount:p.newLines.length}),g+=p.newLines.length,p=i[++f]}else this.lines.set(S,c[d--]);let v=0;for(let S=a.length-1;S>=0;S--)a[S].index+=v,this.lines.onInsertEmitter.fire(a[S]),v+=a[S].amount;let b=Math.max(0,u+o-this.lines.maxLength);b>0&&this.lines.onTrimEmitter.fire(b)}}translateBufferLineToString(e,t,r=0,n){let i=this.lines.get(e);return i?i.translateToString(t,r,n):""}getWrappedRangeForLine(e){let t=e,r=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;r+1<this.lines.length&&this.lines.get(r+1).isWrapped;)r++;return{first:t,last:r}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new XX(e);return this.markers.push(t),t.register(this.lines.onTrim(r=>{t.line-=r,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(r=>{t.line>=r.index&&(t.line+=r.amount)})),t.register(this.lines.onDelete(r=>{t.line>=r.index&&t.line<r.index+r.amount&&t.dispose(),t.line>r.index&&(t.line-=r.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},YX=class extends Zt{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new Ue),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new Nx(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new Nx(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},dR=2,hR=1,V0=class extends Zt{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new Ue),this.onResize=this._onResize.event,this._onScroll=this._register(new Ue),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,dR),this.rows=Math.max(e.rawOptions.rows||0,hR),this.buffers=this._register(new YX(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let r=this.cols!==e,n=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:r,rowsChanged:n})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let r=this.buffer,n;n=this._cachedBlankLine,(!n||n.length!==this.cols||n.getFg(0)!==e.fg||n.getBg(0)!==e.bg)&&(n=r.getBlankLine(e,t),this._cachedBlankLine=n),n.isWrapped=t;let i=r.ybase+r.scrollTop,o=r.ybase+r.scrollBottom;if(r.scrollTop===0){let a=r.lines.isFull;o===r.lines.length-1?a?r.lines.recycle().copyFrom(n):r.lines.push(n.clone()):r.lines.splice(o+1,0,n.clone()),a?this.isUserScrolling&&(r.ydisp=Math.max(r.ydisp-1,0)):(r.ybase++,this.isUserScrolling||r.ydisp++)}else{let a=o-i+1;r.lines.shiftElements(i+1,a-1,-1),r.lines.set(o,n.clone())}this.isUserScrolling||(r.ydisp=r.ybase),this._onScroll.fire(r.ydisp)}scrollLines(e,t){let r=this.buffer;if(e<0){if(r.ydisp===0)return;this.isUserScrolling=!0}else e+r.ydisp>=r.ybase&&(this.isUserScrolling=!1);let n=r.ydisp;r.ydisp=Math.max(Math.min(r.ydisp+e,r.ybase),0),n!==r.ydisp&&(t||this._onScroll.fire(r.ydisp))}};V0=tn([lt(0,pi)],V0);var kl={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:Sf,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},JX=["normal","bold","100","200","300","400","500","600","700","800","900"],QX=class extends Zt{constructor(e){super(),this._onOptionChange=this._register(new Ue),this.onOptionChange=this._onOptionChange.event;let t={...kl};for(let r in e)if(r in t)try{let n=e[r];t[r]=this._sanitizeAndValidateOption(r,n)}catch(n){console.error(n)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(Vr(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(r=>{r===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(r=>{e.indexOf(r)!==-1&&t()})}_setupOptions(){let e=r=>{if(!(r in kl))throw new Error(`No option with key "${r}"`);return this.rawOptions[r]},t=(r,n)=>{if(!(r in kl))throw new Error(`No option with key "${r}"`);n=this._sanitizeAndValidateOption(r,n),this.rawOptions[r]!==n&&(this.rawOptions[r]=n,this._onOptionChange.fire(r))};for(let r in this.rawOptions){let n={get:e.bind(this,r),set:t.bind(this,r)};Object.defineProperty(this.options,r,n)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=kl[e]),!ZX(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=kl[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=JX.includes(t)?t:kl[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function ZX(e){return e==="block"||e==="underline"||e==="bar"}function nu(e,t=5){if(typeof e!="object")return e;let r=Array.isArray(e)?[]:{};for(let n in e)r[n]=t<=1?e[n]:e[n]&&nu(e[n],t-1);return r}var Mx=Object.freeze({insertMode:!1}),zx=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),U0=class extends Zt{constructor(e,t,r){super(),this._bufferService=e,this._logService=t,this._optionsService=r,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new Ue),this.onData=this._onData.event,this._onUserInput=this._register(new Ue),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new Ue),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new Ue),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=nu(Mx),this.decPrivateModes=nu(zx)}reset(){this.modes=nu(Mx),this.decPrivateModes=nu(zx)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let r=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&r.ybase!==r.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(n=>n.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};U0=tn([lt(0,mi),lt(1,I4),lt(2,pi)],U0);var jx={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function Yg(e,t){let r=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(r|=64,r|=e.action):(r|=e.button&3,e.button&4&&(r|=64),e.button&8&&(r|=128),e.action===32?r|=32:e.action===0&&!t&&(r|=3)),r}var Jg=String.fromCharCode,Bx={DEFAULT:e=>{let t=[Yg(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${Jg(t[0])}${Jg(t[1])}${Jg(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${Yg(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${Yg(e,!0)};${e.x};${e.y}${t}`}},q0=class extends Zt{constructor(e,t,r){super(),this._bufferService=e,this._coreService=t,this._optionsService=r,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new Ue),this.onProtocolChange=this._onProtocolChange.event;for(let n of Object.keys(jx))this.addProtocol(n,jx[n]);for(let n of Object.keys(Bx))this.addEncoding(n,Bx[n]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,r){if(e.deltaY===0||e.shiftKey||t===void 0||r===void 0)return 0;let n=t/r,i=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(i/=n+0,Math.abs(e.deltaY)<50&&(i*=.3),this._wheelPartialScroll+=i,i=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._bufferService.rows),i}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,r){if(r){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};q0=tn([lt(0,mi),lt(1,Da),lt(2,pi)],q0);var Qg=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],eY=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],wn;function tY(e,t){let r=0,n=t.length-1,i;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=r;)if(i=r+n>>1,e>t[i][1])r=i+1;else if(e<t[i][0])n=i-1;else return!0;return!1}var rY=class{constructor(){if(this.version="6",!wn){wn=new Uint8Array(65536),wn.fill(1),wn[0]=0,wn.fill(0,1,32),wn.fill(0,127,160),wn.fill(2,4352,4448),wn[9001]=2,wn[9002]=2,wn.fill(2,11904,42192),wn[12351]=1,wn.fill(2,44032,55204),wn.fill(2,63744,64256),wn.fill(2,65040,65050),wn.fill(2,65072,65136),wn.fill(2,65280,65377),wn.fill(2,65504,65511);for(let e=0;e<Qg.length;++e)wn.fill(0,Qg[e][0],Qg[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?wn[e]:tY(e,eY)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let r=this.wcwidth(e),n=r===0&&t!==0;if(n){let i=Ca.extractWidth(t);i===0?n=!1:i>r&&(r=i)}return Ca.createPropertyValue(0,r,n)}},Ca=class Fh{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new Ue,this.onChange=this._onChange.event;let t=new rY;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,r,n=!1){return(t&16777215)<<3|(r&3)<<1|(n?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let r=0,n=0,i=t.length;for(let o=0;o<i;++o){let a=t.charCodeAt(o);if(55296<=a&&a<=56319){if(++o>=i)return r+this.wcwidth(a);let d=t.charCodeAt(o);56320<=d&&d<=57343?a=(a-55296)*1024+d-56320+65536:r+=this.wcwidth(d)}let c=this.charProperties(a,n),u=Fh.extractWidth(c);Fh.extractShouldJoin(c)&&(u-=Fh.extractWidth(n)),r+=u,n=c}return r}charProperties(t,r){return this._activeProvider.charProperties(t,r)}},nY=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function Lx(e){var n;let t=(n=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1))==null?void 0:n.get(e.cols-1),r=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);r&&t&&(r.isWrapped=t[3]!==0&&t[3]!==32)}var Uc=2147483647,iY=256,fR=class K0{constructor(t=32,r=32){if(this.maxLength=t,this.maxSubParamsLength=r,r>iY)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(r),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let r=new K0;if(!t.length)return r;for(let n=Array.isArray(t[0])?1:0;n<t.length;++n){let i=t[n];if(Array.isArray(i))for(let o=0;o<i.length;++o)r.addSubParam(i[o]);else r.addParam(i)}return r}clone(){let t=new K0(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let r=0;r<this.length;++r){t.push(this.params[r]);let n=this._subParamsIdx[r]>>8,i=this._subParamsIdx[r]&255;i-n>0&&t.push(Array.prototype.slice.call(this._subParams,n,i))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>Uc?Uc:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>Uc?Uc:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let r=this._subParamsIdx[t]>>8,n=this._subParamsIdx[t]&255;return n-r>0?this._subParams.subarray(r,n):null}getSubParamsAll(){let t={};for(let r=0;r<this.length;++r){let n=this._subParamsIdx[r]>>8,i=this._subParamsIdx[r]&255;i-n>0&&(t[r]=this._subParams.slice(n,i))}return t}addDigit(t){let r;if(this._rejectDigits||!(r=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let n=this._digitIsSub?this._subParams:this.params,i=n[r-1];n[r-1]=~i?Math.min(i*10+t,Uc):t}},qc=[],oY=class{constructor(){this._state=0,this._active=qc,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let r=this._handlers[e];return r.push(t),{dispose:()=>{let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=qc}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=qc,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||qc,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,r){if(!this._active.length)this._handlerFb(this._id,"PUT",dm(e,t,r));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,r)}start(){this.reset(),this._state=1}put(e,t,r){if(this._state!==3){if(this._state===1)for(;t<r;){let n=e[t++];if(n===59){this._state=2,this._start();break}if(n<48||57<n){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+n-48}this._state===2&&r-t>0&&this._put(e,t,r)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let r=!1,n=this._active.length-1,i=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,r=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&r===!1){for(;n>=0&&(r=this._active[n].end(e),r!==!0);n--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,r;n--}for(;n>=0;n--)if(r=this._active[n].end(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,r}this._active=qc,this._id=-1,this._state=0}}},Bi=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,r){this._hitLimit||(this._data+=dm(e,t,r),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(r=>(this._data="",this._hitLimit=!1,r));return this._data="",this._hitLimit=!1,t}},Kc=[],sY=class{constructor(){this._handlers=Object.create(null),this._active=Kc,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Kc}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let r=this._handlers[e];return r.push(t),{dispose:()=>{let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=Kc,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||Kc,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(t)}put(e,t,r){if(!this._active.length)this._handlerFb(this._ident,"PUT",dm(e,t,r));else for(let n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,r)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let r=!1,n=this._active.length-1,i=!1;if(this._stack.paused&&(n=this._stack.loopPosition-1,r=t,i=this._stack.fallThrough,this._stack.paused=!1),!i&&r===!1){for(;n>=0&&(r=this._active[n].unhook(e),r!==!0);n--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!1,r;n--}for(;n>=0;n--)if(r=this._active[n].unhook(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=n,this._stack.fallThrough=!0,r}this._active=Kc,this._ident=0}},iu=new fR;iu.addParam(0);var Dx=class{constructor(e){this._handler=e,this._data="",this._params=iu,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():iu,this._data="",this._hitLimit=!1}put(e,t,r){this._hitLimit||(this._data+=dm(e,t,r),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(r=>(this._params=iu,this._data="",this._hitLimit=!1,r));return this._params=iu,this._data="",this._hitLimit=!1,t}},aY=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,r,n){this.table[t<<8|e]=r<<4|n}addMany(e,t,r,n){for(let i=0;i<e.length;i++)this.table[t<<8|e[i]]=r<<4|n}},no=160,lY=(function(){let e=new aY(4095),t=Array.apply(null,Array(256)).map((c,u)=>u),r=(c,u)=>t.slice(c,u),n=r(32,127),i=r(0,24);i.push(25),i.push.apply(i,r(28,32));let o=r(0,14),a;e.setDefault(1,0),e.addMany(n,0,2,0);for(a in o)e.addMany([24,26,153,154],a,3,0),e.addMany(r(128,144),a,3,0),e.addMany(r(144,152),a,3,0),e.add(156,a,0,0),e.add(27,a,11,1),e.add(157,a,4,8),e.addMany([152,158,159],a,0,7),e.add(155,a,11,3),e.add(144,a,11,9);return e.addMany(i,0,3,0),e.addMany(i,1,3,1),e.add(127,1,0,1),e.addMany(i,8,0,8),e.addMany(i,3,3,3),e.add(127,3,0,3),e.addMany(i,4,3,4),e.add(127,4,0,4),e.addMany(i,6,3,6),e.addMany(i,5,3,5),e.add(127,5,0,5),e.addMany(i,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(n,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(r(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(n,7,0,7),e.addMany(i,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(r(64,127),3,7,0),e.addMany(r(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(r(48,60),4,8,4),e.addMany(r(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(r(32,64),6,0,6),e.add(127,6,0,6),e.addMany(r(64,127),6,0,0),e.addMany(r(32,48),3,9,5),e.addMany(r(32,48),5,9,5),e.addMany(r(48,64),5,0,6),e.addMany(r(64,127),5,7,0),e.addMany(r(32,48),4,9,5),e.addMany(r(32,48),1,9,2),e.addMany(r(32,48),2,9,2),e.addMany(r(48,127),2,10,0),e.addMany(r(48,80),1,10,0),e.addMany(r(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(r(96,127),1,10,0),e.add(80,1,11,9),e.addMany(i,9,0,9),e.add(127,9,0,9),e.addMany(r(28,32),9,0,9),e.addMany(r(32,48),9,9,12),e.addMany(r(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(i,11,0,11),e.addMany(r(32,128),11,0,11),e.addMany(r(28,32),11,0,11),e.addMany(i,10,0,10),e.add(127,10,0,10),e.addMany(r(28,32),10,0,10),e.addMany(r(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(r(32,48),10,9,12),e.addMany(i,12,0,12),e.add(127,12,0,12),e.addMany(r(28,32),12,0,12),e.addMany(r(32,48),12,9,12),e.addMany(r(48,64),12,0,11),e.addMany(r(64,127),12,12,13),e.addMany(r(64,127),10,12,13),e.addMany(r(64,127),9,12,13),e.addMany(i,13,13,13),e.addMany(n,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(no,0,2,0),e.add(no,8,5,8),e.add(no,6,0,6),e.add(no,11,0,11),e.add(no,13,13,13),e})(),cY=class extends Zt{constructor(e=lY){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new fR,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,r,n)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,r)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(Vr(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new oY),this._dcsParser=this._register(new sY),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let r=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(r=e.prefix.charCodeAt(0),r&&60>r||r>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let i=0;i<e.intermediates.length;++i){let o=e.intermediates.charCodeAt(i);if(32>o||o>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");r<<=8,r|=o}}if(e.final.length!==1)throw new Error("final must be a single byte");let n=e.final.charCodeAt(0);if(t[0]>n||n>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return r<<=8,r|=n,r}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let r=this._identifier(e,[48,126]);this._escHandlers[r]===void 0&&(this._escHandlers[r]=[]);let n=this._escHandlers[r];return n.push(t),{dispose:()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let r=this._identifier(e);this._csiHandlers[r]===void 0&&(this._csiHandlers[r]=[]);let n=this._csiHandlers[r];return n.push(t),{dispose:()=>{let i=n.indexOf(t);i!==-1&&n.splice(i,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,r,n,i){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=r,this._parseStack.transition=n,this._parseStack.chunkPos=i}parse(e,t,r){let n=0,i=0,o=0,a;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,o=this._parseStack.chunkPos+1;else{if(r===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let c=this._parseStack.handlers,u=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(r===!1&&u>-1){for(;u>=0&&(a=c[u](this._params),a!==!0);u--)if(a instanceof Promise)return this._parseStack.handlerPos=u,a}this._parseStack.handlers=[];break;case 4:if(r===!1&&u>-1){for(;u>=0&&(a=c[u](),a!==!0);u--)if(a instanceof Promise)return this._parseStack.handlerPos=u,a}this._parseStack.handlers=[];break;case 6:if(n=e[this._parseStack.chunkPos],a=this._dcsParser.unhook(n!==24&&n!==26,r),a)return a;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(n=e[this._parseStack.chunkPos],a=this._oscParser.end(n!==24&&n!==26,r),a)return a;n===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,o=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let c=o;c<t;++c){switch(n=e[c],i=this._transitions.table[this.currentState<<8|(n<160?n:no)],i>>4){case 2:for(let g=c+1;;++g){if(g>=t||(n=e[g])<32||n>126&&n<no){this._printHandler(e,c,g),c=g-1;break}if(++g>=t||(n=e[g])<32||n>126&&n<no){this._printHandler(e,c,g),c=g-1;break}if(++g>=t||(n=e[g])<32||n>126&&n<no){this._printHandler(e,c,g),c=g-1;break}if(++g>=t||(n=e[g])<32||n>126&&n<no){this._printHandler(e,c,g),c=g-1;break}}break;case 3:this._executeHandlers[n]?this._executeHandlers[n]():this._executeHandlerFb(n),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:c,code:n,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let u=this._csiHandlers[this._collect<<8|n],d=u?u.length-1:-1;for(;d>=0&&(a=u[d](this._params),a!==!0);d--)if(a instanceof Promise)return this._preserveStack(3,u,d,i,c),a;d<0&&this._csiHandlerFb(this._collect<<8|n,this._params),this.precedingJoinState=0;break;case 8:do switch(n){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(n-48)}while(++c<t&&(n=e[c])>47&&n<60);c--;break;case 9:this._collect<<=8,this._collect|=n;break;case 10:let f=this._escHandlers[this._collect<<8|n],p=f?f.length-1:-1;for(;p>=0&&(a=f[p](),a!==!0);p--)if(a instanceof Promise)return this._preserveStack(4,f,p,i,c),a;p<0&&this._escHandlerFb(this._collect<<8|n),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|n,this._params);break;case 13:for(let g=c+1;;++g)if(g>=t||(n=e[g])===24||n===26||n===27||n>127&&n<no){this._dcsParser.put(e,c,g),c=g-1;break}break;case 14:if(a=this._dcsParser.unhook(n!==24&&n!==26),a)return this._preserveStack(6,[],0,i,c),a;n===27&&(i|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let g=c+1;;g++)if(g>=t||(n=e[g])<32||n>127&&n<no){this._oscParser.put(e,c,g),c=g-1;break}break;case 6:if(a=this._oscParser.end(n!==24&&n!==26),a)return this._preserveStack(5,[],0,i,c),a;n===27&&(i|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=i&15}}},uY=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,dY=/^[\da-f]+$/;function Ax(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let r=uY.exec(t);if(r){let n=r[1]?15:r[4]?255:r[7]?4095:65535;return[Math.round(parseInt(r[1]||r[4]||r[7]||r[10],16)/n*255),Math.round(parseInt(r[2]||r[5]||r[8]||r[11],16)/n*255),Math.round(parseInt(r[3]||r[6]||r[9]||r[12],16)/n*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),dY.exec(t)&&[3,6,9,12].includes(t.length))){let r=t.length/3,n=[0,0,0];for(let i=0;i<3;++i){let o=parseInt(t.slice(r*i,r*i+r),16);n[i]=r===1?o<<4:r===2?o:r===3?o>>4:o>>8}return n}}function Zg(e,t){let r=e.toString(16),n=r.length<2?"0"+r:r;switch(t){case 4:return r[0];case 8:return n;case 12:return(n+n).slice(0,3);default:return n+n}}function hY(e,t=16){let[r,n,i]=e;return`rgb:${Zg(r,t)}/${Zg(n,t)}/${Zg(i,t)}`}var fY={"(":0,")":1,"*":2,"+":3,"-":1,".":2},js=131072,Hx=10;function Fx(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var Wx=5e3,Vx=0,mY=class extends Zt{constructor(e,t,r,n,i,o,a,c,u=new cY){super(),this._bufferService=e,this._charsetService=t,this._coreService=r,this._logService=n,this._optionsService=i,this._oscLinkService=o,this._coreMouseService=a,this._unicodeService=c,this._parser=u,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new NK,this._utf8Decoder=new MK,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=hn.clone(),this._eraseAttrDataInternal=hn.clone(),this._onRequestBell=this._register(new Ue),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new Ue),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new Ue),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new Ue),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new Ue),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new Ue),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new Ue),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new Ue),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new Ue),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new Ue),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new Ue),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new Ue),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new Ue),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new G0(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(d=>this._activeBuffer=d.activeBuffer)),this._parser.setCsiHandlerFallback((d,f)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(d),params:f.toArray()})}),this._parser.setEscHandlerFallback(d=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(d)})}),this._parser.setExecuteHandlerFallback(d=>{this._logService.debug("Unknown EXECUTE code: ",{code:d})}),this._parser.setOscHandlerFallback((d,f,p)=>{this._logService.debug("Unknown OSC code: ",{identifier:d,action:f,data:p})}),this._parser.setDcsHandlerFallback((d,f,p)=>{f==="HOOK"&&(p=p.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(d),action:f,payload:p})}),this._parser.setPrintHandler((d,f,p)=>this.print(d,f,p)),this._parser.registerCsiHandler({final:"@"},d=>this.insertChars(d)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},d=>this.scrollLeft(d)),this._parser.registerCsiHandler({final:"A"},d=>this.cursorUp(d)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},d=>this.scrollRight(d)),this._parser.registerCsiHandler({final:"B"},d=>this.cursorDown(d)),this._parser.registerCsiHandler({final:"C"},d=>this.cursorForward(d)),this._parser.registerCsiHandler({final:"D"},d=>this.cursorBackward(d)),this._parser.registerCsiHandler({final:"E"},d=>this.cursorNextLine(d)),this._parser.registerCsiHandler({final:"F"},d=>this.cursorPrecedingLine(d)),this._parser.registerCsiHandler({final:"G"},d=>this.cursorCharAbsolute(d)),this._parser.registerCsiHandler({final:"H"},d=>this.cursorPosition(d)),this._parser.registerCsiHandler({final:"I"},d=>this.cursorForwardTab(d)),this._parser.registerCsiHandler({final:"J"},d=>this.eraseInDisplay(d,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},d=>this.eraseInDisplay(d,!0)),this._parser.registerCsiHandler({final:"K"},d=>this.eraseInLine(d,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},d=>this.eraseInLine(d,!0)),this._parser.registerCsiHandler({final:"L"},d=>this.insertLines(d)),this._parser.registerCsiHandler({final:"M"},d=>this.deleteLines(d)),this._parser.registerCsiHandler({final:"P"},d=>this.deleteChars(d)),this._parser.registerCsiHandler({final:"S"},d=>this.scrollUp(d)),this._parser.registerCsiHandler({final:"T"},d=>this.scrollDown(d)),this._parser.registerCsiHandler({final:"X"},d=>this.eraseChars(d)),this._parser.registerCsiHandler({final:"Z"},d=>this.cursorBackwardTab(d)),this._parser.registerCsiHandler({final:"`"},d=>this.charPosAbsolute(d)),this._parser.registerCsiHandler({final:"a"},d=>this.hPositionRelative(d)),this._parser.registerCsiHandler({final:"b"},d=>this.repeatPrecedingCharacter(d)),this._parser.registerCsiHandler({final:"c"},d=>this.sendDeviceAttributesPrimary(d)),this._parser.registerCsiHandler({prefix:">",final:"c"},d=>this.sendDeviceAttributesSecondary(d)),this._parser.registerCsiHandler({final:"d"},d=>this.linePosAbsolute(d)),this._parser.registerCsiHandler({final:"e"},d=>this.vPositionRelative(d)),this._parser.registerCsiHandler({final:"f"},d=>this.hVPosition(d)),this._parser.registerCsiHandler({final:"g"},d=>this.tabClear(d)),this._parser.registerCsiHandler({final:"h"},d=>this.setMode(d)),this._parser.registerCsiHandler({prefix:"?",final:"h"},d=>this.setModePrivate(d)),this._parser.registerCsiHandler({final:"l"},d=>this.resetMode(d)),this._parser.registerCsiHandler({prefix:"?",final:"l"},d=>this.resetModePrivate(d)),this._parser.registerCsiHandler({final:"m"},d=>this.charAttributes(d)),this._parser.registerCsiHandler({final:"n"},d=>this.deviceStatus(d)),this._parser.registerCsiHandler({prefix:"?",final:"n"},d=>this.deviceStatusPrivate(d)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},d=>this.softReset(d)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},d=>this.setCursorStyle(d)),this._parser.registerCsiHandler({final:"r"},d=>this.setScrollRegion(d)),this._parser.registerCsiHandler({final:"s"},d=>this.saveCursor(d)),this._parser.registerCsiHandler({final:"t"},d=>this.windowOptions(d)),this._parser.registerCsiHandler({final:"u"},d=>this.restoreCursor(d)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},d=>this.insertColumns(d)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},d=>this.deleteColumns(d)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},d=>this.selectProtected(d)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},d=>this.requestMode(d,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},d=>this.requestMode(d,!1)),this._parser.setExecuteHandler(Pe.BEL,()=>this.bell()),this._parser.setExecuteHandler(Pe.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(Pe.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(Pe.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(Pe.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(Pe.BS,()=>this.backspace()),this._parser.setExecuteHandler(Pe.HT,()=>this.tab()),this._parser.setExecuteHandler(Pe.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(Pe.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(Ah.IND,()=>this.index()),this._parser.setExecuteHandler(Ah.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(Ah.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new Bi(d=>(this.setTitle(d),this.setIconName(d),!0))),this._parser.registerOscHandler(1,new Bi(d=>this.setIconName(d))),this._parser.registerOscHandler(2,new Bi(d=>this.setTitle(d))),this._parser.registerOscHandler(4,new Bi(d=>this.setOrReportIndexedColor(d))),this._parser.registerOscHandler(8,new Bi(d=>this.setHyperlink(d))),this._parser.registerOscHandler(10,new Bi(d=>this.setOrReportFgColor(d))),this._parser.registerOscHandler(11,new Bi(d=>this.setOrReportBgColor(d))),this._parser.registerOscHandler(12,new Bi(d=>this.setOrReportCursorColor(d))),this._parser.registerOscHandler(104,new Bi(d=>this.restoreIndexedColor(d))),this._parser.registerOscHandler(110,new Bi(d=>this.restoreFgColor(d))),this._parser.registerOscHandler(111,new Bi(d=>this.restoreBgColor(d))),this._parser.registerOscHandler(112,new Bi(d=>this.restoreCursorColor(d))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let d in En)this._parser.registerEscHandler({intermediates:"(",final:d},()=>this.selectCharset("("+d)),this._parser.registerEscHandler({intermediates:")",final:d},()=>this.selectCharset(")"+d)),this._parser.registerEscHandler({intermediates:"*",final:d},()=>this.selectCharset("*"+d)),this._parser.registerEscHandler({intermediates:"+",final:d},()=>this.selectCharset("+"+d)),this._parser.registerEscHandler({intermediates:"-",final:d},()=>this.selectCharset("-"+d)),this._parser.registerEscHandler({intermediates:".",final:d},()=>this.selectCharset("."+d)),this._parser.registerEscHandler({intermediates:"/",final:d},()=>this.selectCharset("/"+d));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(d=>(this._logService.error("Parsing error: ",d),d)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new Dx((d,f)=>this.requestStatusString(d,f)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,r,n){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=r,this._parseStack.position=n}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,r)=>setTimeout(()=>r("#SLOW_TIMEOUT"),Wx))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${Wx} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let r,n=this._activeBuffer.x,i=this._activeBuffer.y,o=0,a=this._parseStack.paused;if(a){if(r=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(r),r;n=this._parseStack.cursorStartX,i=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>js&&(o=this._parseStack.position+js)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,d=>String.fromCharCode(d)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(d=>d.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<js&&(this._parseBuffer=new Uint32Array(Math.min(e.length,js))),a||this._dirtyRowTracker.clearRange(),e.length>js)for(let d=o;d<e.length;d+=js){let f=d+js<e.length?d+js:e.length,p=typeof e=="string"?this._stringDecoder.decode(e.substring(d,f),this._parseBuffer):this._utf8Decoder.decode(e.subarray(d,f),this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,p))return this._preserveStack(n,i,p,d),this._logSlowResolvingAsync(r),r}else if(!a){let d=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,d))return this._preserveStack(n,i,d,0),this._logSlowResolvingAsync(r),r}(this._activeBuffer.x!==n||this._activeBuffer.y!==i)&&this._onCursorMove.fire();let c=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),u=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);u<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(u,this._bufferService.rows-1),end:Math.min(c,this._bufferService.rows-1)})}print(e,t,r){let n,i,o=this._charsetService.charset,a=this._optionsService.rawOptions.screenReaderMode,c=this._bufferService.cols,u=this._coreService.decPrivateModes.wraparound,d=this._coreService.modes.insertMode,f=this._curAttrData,p=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&r-t>0&&p.getWidth(this._activeBuffer.x-1)===2&&p.setCellFromCodepoint(this._activeBuffer.x-1,0,1,f);let g=this._parser.precedingJoinState;for(let v=t;v<r;++v){if(n=e[v],n<127&&o){let C=o[String.fromCharCode(n)];C&&(n=C.charCodeAt(0))}let b=this._unicodeService.charProperties(n,g);i=Ca.extractWidth(b);let S=Ca.extractShouldJoin(b),_=S?Ca.extractWidth(g):0;if(g=b,a&&this._onA11yChar.fire(Ds(n)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+i-_>c){if(u){let C=p,x=this._activeBuffer.x-_;for(this._activeBuffer.x=_,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),p=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),_>0&&p instanceof ru&&p.copyCellsFrom(C,x,0,_,!1);x<c;)C.setCellFromCodepoint(x++,0,1,f)}else if(this._activeBuffer.x=c-1,i===2)continue}if(S&&this._activeBuffer.x){let C=p.getWidth(this._activeBuffer.x-1)?1:2;p.addCodepointToCell(this._activeBuffer.x-C,n,i);for(let x=i-_;--x>=0;)p.setCellFromCodepoint(this._activeBuffer.x++,0,0,f);continue}if(d&&(p.insertCells(this._activeBuffer.x,i-_,this._activeBuffer.getNullCell(f)),p.getWidth(c-1)===2&&p.setCellFromCodepoint(c-1,0,1,f)),p.setCellFromCodepoint(this._activeBuffer.x++,n,i,f),i>0)for(;--i;)p.setCellFromCodepoint(this._activeBuffer.x++,0,0,f)}this._parser.precedingJoinState=g,this._activeBuffer.x<c&&r-t>0&&p.getWidth(this._activeBuffer.x)===0&&!p.hasContent(this._activeBuffer.x)&&p.setCellFromCodepoint(this._activeBuffer.x,0,1,f),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,r=>Fx(r.params[0],this._optionsService.rawOptions.windowOptions)?t(r):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new Dx(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new Bi(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var e;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&e.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);t.hasWidth(this._activeBuffer.x)&&!t.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,r,n=!1,i=!1){let o=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);o.replaceCells(t,r,this._activeBuffer.getNullCell(this._eraseAttrData()),i),n&&(o.isWrapped=!1)}_resetBufferLine(e,t=!1){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);r&&(r.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),r.isWrapped=!1)}eraseInDisplay(e,t=!1){var n;this._restrictCursor(this._bufferService.cols);let r;switch(e.params[0]){case 0:for(r=this._activeBuffer.y,this._dirtyRowTracker.markDirty(r),this._eraseInBufferLine(r++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);r<this._bufferService.rows;r++)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(r);break;case 1:for(r=this._activeBuffer.y,this._dirtyRowTracker.markDirty(r),this._eraseInBufferLine(r,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(r+1).isWrapped=!1);r--;)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(r=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,r-1);r--&&!((n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r))!=null&&n.getTrimmedLength()););for(;r>=0;r--)this._bufferService.scroll(this._eraseAttrData())}else{for(r=this._bufferService.rows,this._dirtyRowTracker.markDirty(r-1);r--;)this._resetBufferLine(r,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let i=this._activeBuffer.lines.length-this._bufferService.rows;i>0&&(this._activeBuffer.lines.trimStart(i),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-i,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-i,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let r=this._activeBuffer.ybase+this._activeBuffer.y,n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,i=this._bufferService.rows-1+this._activeBuffer.ybase-n+1;for(;t--;)this._activeBuffer.lines.splice(i-1,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let r=this._activeBuffer.ybase+this._activeBuffer.y,n;for(n=this._bufferService.rows-1-this._activeBuffer.scrollBottom,n=this._bufferService.rows-1+this._activeBuffer.ybase-n;t--;)this._activeBuffer.lines.splice(r,1),this._activeBuffer.lines.splice(n,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(hn));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){let n=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);n.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),n.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let r=e.params[0]||1,n=Ca.extractWidth(t),i=this._activeBuffer.x-n,o=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(i),a=new Uint32Array(o.length*r),c=0;for(let d=0;d<o.length;){let f=o.codePointAt(d)||0;a[c++]=f,d+=f>65535?2:1}let u=c;for(let d=1;d<r;++d)a.copyWithin(u,0,c),u+=c;return this.print(a,0,u),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(Pe.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(Pe.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(Pe.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(Pe.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(Pe.ESC+"[>83;40003;0c")),!0}_is(e){return(this._optionsService.rawOptions.termName+"").indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,pa),this._charsetService.setgCharset(1,pa),this._charsetService.setgCharset(2,pa),this._charsetService.setgCharset(3,pa);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){(S=>(S[S.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",S[S.SET=1]="SET",S[S.RESET=2]="RESET",S[S.PERMANENTLY_SET=3]="PERMANENTLY_SET",S[S.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(void 0||(r={}));let n=this._coreService.decPrivateModes,{activeProtocol:i,activeEncoding:o}=this._coreMouseService,a=this._coreService,{buffers:c,cols:u}=this._bufferService,{active:d,alt:f}=c,p=this._optionsService.rawOptions,g=(S,_)=>(a.triggerDataEvent(`${Pe.ESC}[${t?"":"?"}${S};${_}$y`),!0),v=S=>S?1:2,b=e.params[0];return t?b===2?g(b,4):b===4?g(b,v(a.modes.insertMode)):b===12?g(b,3):b===20?g(b,v(p.convertEol)):g(b,0):b===1?g(b,v(n.applicationCursorKeys)):b===3?g(b,p.windowOptions.setWinLines?u===80?2:u===132?1:0:0):b===6?g(b,v(n.origin)):b===7?g(b,v(n.wraparound)):b===8?g(b,3):b===9?g(b,v(i==="X10")):b===12?g(b,v(p.cursorBlink)):b===25?g(b,v(!a.isCursorHidden)):b===45?g(b,v(n.reverseWraparound)):b===66?g(b,v(n.applicationKeypad)):b===67?g(b,4):b===1e3?g(b,v(i==="VT200")):b===1002?g(b,v(i==="DRAG")):b===1003?g(b,v(i==="ANY")):b===1004?g(b,v(n.sendFocus)):b===1005?g(b,4):b===1006?g(b,v(o==="SGR")):b===1015?g(b,4):b===1016?g(b,v(o==="SGR_PIXELS")):b===1048?g(b,1):b===47||b===1047||b===1049?g(b,v(d===f)):b===2004?g(b,v(n.bracketedPasteMode)):b===2026?g(b,v(n.synchronizedOutput)):g(b,0)}_updateAttrColor(e,t,r,n,i){return t===2?(e|=50331648,e&=-16777216,e|=Xu.fromColorRGB([r,n,i])):t===5&&(e&=-50331904,e|=33554432|r&255),e}_extractColor(e,t,r){let n=[0,0,-1,0,0,0],i=0,o=0;do{if(n[o+i]=e.params[t+o],e.hasSubParams(t+o)){let a=e.getSubParams(t+o),c=0;do n[1]===5&&(i=1),n[o+c+1+i]=a[c];while(++c<a.length&&c+o+1+i<n.length);break}if(n[1]===5&&o+i>=2||n[1]===2&&o+i>=5)break;n[1]&&(i=1)}while(++o+t<e.length&&o+i<n.length);for(let a=2;a<n.length;++a)n[a]===-1&&(n[a]=0);switch(n[0]){case 38:r.fg=this._updateAttrColor(r.fg,n[1],n[3],n[4],n[5]);break;case 48:r.bg=this._updateAttrColor(r.bg,n[1],n[3],n[4],n[5]);break;case 58:r.extended=r.extended.clone(),r.extended.underlineColor=this._updateAttrColor(r.extended.underlineColor,n[1],n[3],n[4],n[5])}return o}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=hn.fg,e.bg=hn.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,r,n=this._curAttrData;for(let i=0;i<t;i++)r=e.params[i],r>=30&&r<=37?(n.fg&=-50331904,n.fg|=16777216|r-30):r>=40&&r<=47?(n.bg&=-50331904,n.bg|=16777216|r-40):r>=90&&r<=97?(n.fg&=-50331904,n.fg|=16777216|r-90|8):r>=100&&r<=107?(n.bg&=-50331904,n.bg|=16777216|r-100|8):r===0?this._processSGR0(n):r===1?n.fg|=134217728:r===3?n.bg|=67108864:r===4?(n.fg|=268435456,this._processUnderline(e.hasSubParams(i)?e.getSubParams(i)[0]:1,n)):r===5?n.fg|=536870912:r===7?n.fg|=67108864:r===8?n.fg|=1073741824:r===9?n.fg|=2147483648:r===2?n.bg|=134217728:r===21?this._processUnderline(2,n):r===22?(n.fg&=-134217729,n.bg&=-134217729):r===23?n.bg&=-67108865:r===24?(n.fg&=-268435457,this._processUnderline(0,n)):r===25?n.fg&=-536870913:r===27?n.fg&=-67108865:r===28?n.fg&=-1073741825:r===29?n.fg&=2147483647:r===39?(n.fg&=-67108864,n.fg|=hn.fg&16777215):r===49?(n.bg&=-67108864,n.bg|=hn.bg&16777215):r===38||r===48||r===58?i+=this._extractColor(e,i,n):r===53?n.bg|=1073741824:r===55?n.bg&=-1073741825:r===59?(n.extended=n.extended.clone(),n.extended.underlineColor=-1,n.updateExtended()):r===100?(n.fg&=-67108864,n.fg|=hn.fg&16777215,n.bg&=-67108864,n.bg|=hn.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",r);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${Pe.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${Pe.ESC}[${t};${r}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${Pe.ESC}[?${t};${r}R`);break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=hn.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let r=t%2===1;this._coreService.decPrivateModes.cursorBlink=r}return!0}setScrollRegion(e){let t=e.params[0]||1,r;return(e.length<2||(r=e.params[1])>this._bufferService.rows||r===0)&&(r=this._bufferService.rows),r>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=r-1,this._setCursor(0,0)),!0}windowOptions(e){if(!Fx(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${Pe.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>Hx&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>Hx&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],r=e.split(";");for(;r.length>1;){let n=r.shift(),i=r.shift();if(/^\d+$/.exec(n)){let o=parseInt(n);if(Ux(o))if(i==="?")t.push({type:0,index:o});else{let a=Ax(i);a&&t.push({type:1,index:o,color:a})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let r=e.slice(0,t).trim(),n=e.slice(t+1);return n?this._createHyperlink(r,n):r.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let r=e.split(":"),n,i=r.findIndex(o=>o.startsWith("id="));return i!==-1&&(n=r[i].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:n,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let r=e.split(";");for(let n=0;n<r.length&&!(t>=this._specialColors.length);++n,++t)if(r[n]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let i=Ax(r[n]);i&&this._onColor.fire([{type:1,index:this._specialColors[t],color:i}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],r=e.split(";");for(let n=0;n<r.length;++n)if(/^\d+$/.exec(r[n])){let i=parseInt(r[n]);Ux(i)&&t.push({type:2,index:i})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,pa),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(fY[e[0]],En[e[1]]||pa),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=hn.clone(),this._eraseAttrDataInternal=hn.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new so;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let r=this._activeBuffer.ybase+this._activeBuffer.y+t,n=this._activeBuffer.lines.get(r);n&&(n.fill(e),n.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let r=a=>(this._coreService.triggerDataEvent(`${Pe.ESC}${a}${Pe.ESC}\\`),!0),n=this._bufferService.buffer,i=this._optionsService.rawOptions;return r(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${n.scrollTop+1};${n.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[i.cursorStyle]-(i.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},G0=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(Vx=e,e=t,t=Vx),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};G0=tn([lt(0,mi)],G0);function Ux(e){return 0<=e&&e<256}var pY=5e7,qx=12,gY=50,vY=class extends Zt{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new Ue),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let r;for(;r=this._writeBuffer.shift();){this._action(r);let n=this._callbacks.shift();n&&n()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>pY)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let r=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let n=this._writeBuffer[this._bufferOffset],i=this._action(n,t);if(i){let a=c=>performance.now()-r>=qx?setTimeout(()=>this._innerWrite(0,c)):this._innerWrite(r,c);i.catch(c=>(queueMicrotask(()=>{throw c}),Promise.resolve(!1))).then(a);return}let o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=n.length,performance.now()-r>=qx)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>gY&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},X0=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let c=t.addMarker(t.ybase+t.y),u={data:e,id:this._nextId++,lines:[c]};return c.onDispose(()=>this._removeMarkerFromLink(u,c)),this._dataByLinkId.set(u.id,u),u.id}let r=e,n=this._getEntryIdKey(r),i=this._entriesWithId.get(n);if(i)return this.addLineToLink(i.id,t.ybase+t.y),i.id;let o=t.addMarker(t.ybase+t.y),a={id:this._nextId++,key:this._getEntryIdKey(r),data:r,lines:[o]};return o.onDispose(()=>this._removeMarkerFromLink(a,o)),this._entriesWithId.set(a.key,a),this._dataByLinkId.set(a.id,a),a.id}addLineToLink(e,t){let r=this._dataByLinkId.get(e);if(r&&r.lines.every(n=>n.line!==t)){let n=this._bufferService.buffer.addMarker(t);r.lines.push(n),n.onDispose(()=>this._removeMarkerFromLink(r,n))}}getLinkData(e){var t;return(t=this._dataByLinkId.get(e))==null?void 0:t.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let r=e.lines.indexOf(t);r!==-1&&(e.lines.splice(r,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};X0=tn([lt(0,mi)],X0);var Kx=!1,yY=class extends Zt{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new Yl),this._onBinary=this._register(new Ue),this.onBinary=this._onBinary.event,this._onData=this._register(new Ue),this.onData=this._onData.event,this._onLineFeed=this._register(new Ue),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new Ue),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new Ue),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new Ue),this._instantiationService=new FX,this.optionsService=this._register(new QX(e)),this._instantiationService.setService(pi,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(V0)),this._instantiationService.setService(mi,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(W0)),this._instantiationService.setService(I4,this._logService),this.coreService=this._register(this._instantiationService.createInstance(U0)),this._instantiationService.setService(Da,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(q0)),this._instantiationService.setService(O4,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(Ca)),this._instantiationService.setService(LK,this.unicodeService),this._charsetService=this._instantiationService.createInstance(nY),this._instantiationService.setService(BK,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(X0),this._instantiationService.setService(N4,this._oscLinkService),this._inputHandler=this._register(new mY(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(Vn.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(Vn.forward(this._bufferService.onResize,this._onResize)),this._register(Vn.forward(this.coreService.onData,this._onData)),this._register(Vn.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new vY((t,r)=>this._inputHandler.parse(t,r))),this._register(Vn.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new Ue),this._onScroll.event(e=>{var t;(t=this._onScrollApi)==null||t.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!Kx&&(this._logService.warn("writeSync is unreliable and will be removed soon."),Kx=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,dR),t=Math.max(t,hR),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(Lx.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(Lx(this._bufferService),!1))),this._windowsWrappingHeuristics.value=Vr(()=>{for(let t of e)t.dispose()})}}},bY={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};function _Y(e,t,r,n){var a;let i={type:0,cancel:!1,key:void 0},o=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?i.key=Pe.ESC+"OA":i.key=Pe.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?i.key=Pe.ESC+"OD":i.key=Pe.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?i.key=Pe.ESC+"OC":i.key=Pe.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?i.key=Pe.ESC+"OB":i.key=Pe.ESC+"[B");break;case 8:i.key=e.ctrlKey?"\b":Pe.DEL,e.altKey&&(i.key=Pe.ESC+i.key);break;case 9:if(e.shiftKey){i.key=Pe.ESC+"[Z";break}i.key=Pe.HT,i.cancel=!0;break;case 13:i.key=e.altKey?Pe.ESC+Pe.CR:Pe.CR,i.cancel=!0;break;case 27:i.key=Pe.ESC,e.altKey&&(i.key=Pe.ESC+Pe.ESC),i.cancel=!0;break;case 37:if(e.metaKey)break;o?i.key=Pe.ESC+"[1;"+(o+1)+"D":t?i.key=Pe.ESC+"OD":i.key=Pe.ESC+"[D";break;case 39:if(e.metaKey)break;o?i.key=Pe.ESC+"[1;"+(o+1)+"C":t?i.key=Pe.ESC+"OC":i.key=Pe.ESC+"[C";break;case 38:if(e.metaKey)break;o?i.key=Pe.ESC+"[1;"+(o+1)+"A":t?i.key=Pe.ESC+"OA":i.key=Pe.ESC+"[A";break;case 40:if(e.metaKey)break;o?i.key=Pe.ESC+"[1;"+(o+1)+"B":t?i.key=Pe.ESC+"OB":i.key=Pe.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(i.key=Pe.ESC+"[2~");break;case 46:o?i.key=Pe.ESC+"[3;"+(o+1)+"~":i.key=Pe.ESC+"[3~";break;case 36:o?i.key=Pe.ESC+"[1;"+(o+1)+"H":t?i.key=Pe.ESC+"OH":i.key=Pe.ESC+"[H";break;case 35:o?i.key=Pe.ESC+"[1;"+(o+1)+"F":t?i.key=Pe.ESC+"OF":i.key=Pe.ESC+"[F";break;case 33:e.shiftKey?i.type=2:e.ctrlKey?i.key=Pe.ESC+"[5;"+(o+1)+"~":i.key=Pe.ESC+"[5~";break;case 34:e.shiftKey?i.type=3:e.ctrlKey?i.key=Pe.ESC+"[6;"+(o+1)+"~":i.key=Pe.ESC+"[6~";break;case 112:o?i.key=Pe.ESC+"[1;"+(o+1)+"P":i.key=Pe.ESC+"OP";break;case 113:o?i.key=Pe.ESC+"[1;"+(o+1)+"Q":i.key=Pe.ESC+"OQ";break;case 114:o?i.key=Pe.ESC+"[1;"+(o+1)+"R":i.key=Pe.ESC+"OR";break;case 115:o?i.key=Pe.ESC+"[1;"+(o+1)+"S":i.key=Pe.ESC+"OS";break;case 116:o?i.key=Pe.ESC+"[15;"+(o+1)+"~":i.key=Pe.ESC+"[15~";break;case 117:o?i.key=Pe.ESC+"[17;"+(o+1)+"~":i.key=Pe.ESC+"[17~";break;case 118:o?i.key=Pe.ESC+"[18;"+(o+1)+"~":i.key=Pe.ESC+"[18~";break;case 119:o?i.key=Pe.ESC+"[19;"+(o+1)+"~":i.key=Pe.ESC+"[19~";break;case 120:o?i.key=Pe.ESC+"[20;"+(o+1)+"~":i.key=Pe.ESC+"[20~";break;case 121:o?i.key=Pe.ESC+"[21;"+(o+1)+"~":i.key=Pe.ESC+"[21~";break;case 122:o?i.key=Pe.ESC+"[23;"+(o+1)+"~":i.key=Pe.ESC+"[23~";break;case 123:o?i.key=Pe.ESC+"[24;"+(o+1)+"~":i.key=Pe.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?i.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?i.key=Pe.NUL:e.keyCode>=51&&e.keyCode<=55?i.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?i.key=Pe.DEL:e.keyCode===219?i.key=Pe.ESC:e.keyCode===220?i.key=Pe.FS:e.keyCode===221&&(i.key=Pe.GS);else if((!r||n)&&e.altKey&&!e.metaKey){let c=(a=bY[e.keyCode])==null?void 0:a[e.shiftKey?1:0];if(c)i.key=Pe.ESC+c;else if(e.keyCode>=65&&e.keyCode<=90){let u=e.ctrlKey?e.keyCode-64:e.keyCode+32,d=String.fromCharCode(u);e.shiftKey&&(d=d.toUpperCase()),i.key=Pe.ESC+d}else if(e.keyCode===32)i.key=Pe.ESC+(e.ctrlKey?Pe.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let u=e.code.slice(3,4);e.shiftKey||(u=u.toLowerCase()),i.key=Pe.ESC+u,i.cancel=!0}}else r&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(i.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?i.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(i.key=Pe.US),e.key==="@"&&(i.key=Pe.NUL));break}return i}var sn=0,SY=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new Cf,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new Cf,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((i,o)=>this._getKey(i)-this._getKey(o)),t=0,r=0,n=new Array(this._array.length+this._insertedValues.length);for(let i=0;i<n.length;i++)r>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[r])?(n[i]=e[t],t++):n[i]=this._array[r++];this._array=n,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(sn=this._search(t),sn===-1)||this._getKey(this._array[sn])!==t)return!1;do if(this._array[sn]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(sn),!0;while(++sn<this._array.length&&this._getKey(this._array[sn])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((i,o)=>i-o),t=0,r=new Array(this._array.length-e.length),n=0;for(let i=0;i<this._array.length;i++)e[t]===i?t++:r[n++]=this._array[i];this._array=r,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(sn=this._search(e),!(sn<0||sn>=this._array.length)&&this._getKey(this._array[sn])===e))do yield this._array[sn];while(++sn<this._array.length&&this._getKey(this._array[sn])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(sn=this._search(e),!(sn<0||sn>=this._array.length)&&this._getKey(this._array[sn])===e))do t(this._array[sn]);while(++sn<this._array.length&&this._getKey(this._array[sn])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,r=this._array.length-1;for(;r>=t;){let n=t+r>>1,i=this._getKey(this._array[n]);if(i>e)r=n-1;else if(i<e)t=n+1;else{for(;n>0&&this._getKey(this._array[n-1])===e;)n--;return n}}return t}},ev=0,Gx=0,CY=class extends Zt{constructor(){super(),this._decorations=new SY(e=>e==null?void 0:e.marker.line),this._onDecorationRegistered=this._register(new Ue),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new Ue),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(Vr(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new wY(e);if(t){let r=t.marker.onDispose(()=>t.dispose()),n=t.onDispose(()=>{n.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),r.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,r){let n=0,i=0;for(let o of this._decorations.getKeyIterator(t))n=o.options.x??0,i=n+(o.options.width??1),e>=n&&e<i&&(!r||(o.options.layer??"bottom")===r)&&(yield o)}forEachDecorationAtCell(e,t,r,n){this._decorations.forEachByKey(t,i=>{ev=i.options.x??0,Gx=ev+(i.options.width??1),e>=ev&&e<Gx&&(!r||(i.options.layer??"bottom")===r)&&n(i)})}},wY=class extends Us{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new Ue),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new Ue),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=Yr.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=Yr.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},xY=1e3,EY=class{constructor(e,t=xY){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,r){this._rowCount=r,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let n=performance.now();if(n-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=n,this._innerRefresh();else if(!this._additionalRefreshRequested){let i=n-this._lastRefreshMs,o=this._debounceThresholdMS-i;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},o)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},Xx=20,wf=class extends Zt{constructor(e,t,r,n){super(),this._terminal=e,this._coreBrowserService=r,this._renderService=n,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let i=this._coreBrowserService.mainDocument;this._accessibilityContainer=i.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=i.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let o=0;o<this._terminal.rows;o++)this._rowElements[o]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[o]);if(this._topBoundaryFocusListener=o=>this._handleBoundaryFocus(o,0),this._bottomBoundaryFocusListener=o=>this._handleBoundaryFocus(o,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=i.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new EY(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(o=>this._handleResize(o.rows))),this._register(this._terminal.onRender(o=>this._refreshRows(o.start,o.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(o=>this._handleChar(o))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
587
+ `))),this._register(this._terminal.onA11yTab(o=>this._handleTab(o))),this._register(this._terminal.onKey(o=>this._handleKey(o.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(Wt(i,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(Vr(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<Xx+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
588
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===Xx+1&&(this._liveRegion.textContent+=p0.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let r=this._terminal.buffer,n=r.lines.length.toString();for(let i=e;i<=t;i++){let o=r.lines.get(r.ydisp+i),a=[],c=(o==null?void 0:o.translateToString(!0,void 0,void 0,a))||"",u=(r.ydisp+i+1).toString(),d=this._rowElements[i];d&&(c.length===0?(d.textContent=" ",this._rowColumns.set(d,[0,1])):(d.textContent=c,this._rowColumns.set(d,a)),d.setAttribute("aria-posinset",u),d.setAttribute("aria-setsize",n),this._alignRowWidth(d))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let r=e.target,n=this._rowElements[t===0?1:this._rowElements.length-2],i=r.getAttribute("aria-posinset"),o=t===0?"1":`${this._terminal.buffer.lines.length}`;if(i===o||e.relatedTarget!==n)return;let a,c;if(t===0?(a=r,c=this._rowElements.pop(),this._rowContainer.removeChild(c)):(a=this._rowElements.shift(),c=r,this._rowContainer.removeChild(a)),a.removeEventListener("focus",this._topBoundaryFocusListener),c.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let u=this._createAccessibilityTreeNode();this._rowElements.unshift(u),this._rowContainer.insertAdjacentElement("afterbegin",u)}else{let u=this._createAccessibilityTreeNode();this._rowElements.push(u),this._rowContainer.appendChild(u)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var c;if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},r={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(r.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===r.node&&t.offset>r.offset)&&([t,r]=[r,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let n=this._rowElements.slice(-1)[0];if(r.node.compareDocumentPosition(n)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(r={node:n,offset:((c=n.textContent)==null?void 0:c.length)??0}),!this._rowContainer.contains(r.node))return;let i=({node:u,offset:d})=>{let f=u instanceof Text?u.parentNode:u,p=parseInt(f==null?void 0:f.getAttribute("aria-posinset"),10)-1;if(isNaN(p))return console.warn("row is invalid. Race condition?"),null;let g=this._rowColumns.get(f);if(!g)return console.warn("columns is null. Race condition?"),null;let v=d<g.length?g[d]:g.slice(-1)[0]+1;return v>=this._terminal.cols&&(++p,v=0),{row:p,column:v}},o=i(t),a=i(r);if(!(!o||!a)){if(o.row>a.row||o.row===a.row&&o.column>=a.column)throw new Error("invalid range");this._terminal.select(o.column,o.row,(a.row-o.row)*this._terminal.cols-o.column+a.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){var i,o;e.style.transform="";let t=e.getBoundingClientRect().width,r=(o=(i=this._rowColumns.get(e))==null?void 0:i.slice(-1))==null?void 0:o[0];if(!r)return;let n=r*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${n/t})`}};wf=tn([lt(1,hb),lt(2,ms),lt(3,ps)],wf);var Y0=class extends Zt{constructor(e,t,r,n,i){super(),this._element=e,this._mouseService=t,this._renderService=r,this._bufferService=n,this._linkProviderService=i,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new Ue),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new Ue),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(Vr(()=>{var o;Ia(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,(o=this._activeProviderReplies)==null||o.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(Wt(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(Wt(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(Wt(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(Wt(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let r=e.composedPath();for(let n=0;n<r.length;n++){let i=r[n];if(i.classList.contains("xterm"))break;if(i.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){var n,i;(!this._activeProviderReplies||!t)&&((n=this._activeProviderReplies)==null||n.forEach(o=>{o==null||o.forEach(a=>{a.link.dispose&&a.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let r=!1;for(let[o,a]of this._linkProviderService.linkProviders.entries())t?(i=this._activeProviderReplies)!=null&&i.get(o)&&(r=this._checkLinkProviderResult(o,e,r)):a.provideLinks(e.y,c=>{var d,f;if(this._isMouseOut)return;let u=c==null?void 0:c.map(p=>({link:p}));(d=this._activeProviderReplies)==null||d.set(o,u),r=this._checkLinkProviderResult(o,e,r),((f=this._activeProviderReplies)==null?void 0:f.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let r=new Set;for(let n=0;n<t.size;n++){let i=t.get(n);if(i)for(let o=0;o<i.length;o++){let a=i[o],c=a.link.range.start.y<e?0:a.link.range.start.x,u=a.link.range.end.y>e?this._bufferService.cols:a.link.range.end.x;for(let d=c;d<=u;d++){if(r.has(d)){i.splice(o--,1);break}r.add(d)}}}}_checkLinkProviderResult(e,t,r){var o;if(!this._activeProviderReplies)return r;let n=this._activeProviderReplies.get(e),i=!1;for(let a=0;a<e;a++)(!this._activeProviderReplies.has(a)||this._activeProviderReplies.get(a))&&(i=!0);if(!i&&n){let a=n.find(c=>this._linkAtPosition(c.link,t));a&&(r=!0,this._handleNewLink(a))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!r)for(let a=0;a<this._activeProviderReplies.size;a++){let c=(o=this._activeProviderReplies.get(a))==null?void 0:o.find(u=>this._linkAtPosition(u.link,t));if(c){r=!0,this._handleNewLink(c);break}}return r}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&$Y(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,Ia(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var r,n;return(n=(r=this._currentLink)==null?void 0:r.state)==null?void 0:n.decorations.pointerCursor},set:r=>{var n;(n=this._currentLink)!=null&&n.state&&this._currentLink.state.decorations.pointerCursor!==r&&(this._currentLink.state.decorations.pointerCursor=r,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",r))}},underline:{get:()=>{var r,n;return(n=(r=this._currentLink)==null?void 0:r.state)==null?void 0:n.decorations.underline},set:r=>{var n,i,o;(n=this._currentLink)!=null&&n.state&&((o=(i=this._currentLink)==null?void 0:i.state)==null?void 0:o.decorations.underline)!==r&&(this._currentLink.state.decorations.underline=r,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,r))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(r=>{if(!this._currentLink)return;let n=r.start===0?0:r.start+1+this._bufferService.buffer.ydisp,i=this._bufferService.buffer.ydisp+1+r.end;if(this._currentLink.link.range.start.y>=n&&this._currentLink.link.range.end.y<=i&&(this._clearCurrentLink(n,i),this._lastMouseEvent)){let o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._askForLink(o,!1)}})))}_linkHover(e,t,r){var n;(n=this._currentLink)!=null&&n.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(r,t.text)}_fireUnderlineEvent(e,t){let r=e.range,n=this._bufferService.buffer.ydisp,i=this._createLinkUnderlineEvent(r.start.x-1,r.start.y-n-1,r.end.x,r.end.y-n-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(i)}_linkLeave(e,t,r){var n;(n=this._currentLink)!=null&&n.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(r,t.text)}_linkAtPosition(e,t){let r=e.range.start.y*this._bufferService.cols+e.range.start.x,n=e.range.end.y*this._bufferService.cols+e.range.end.x,i=t.y*this._bufferService.cols+t.x;return r<=i&&i<=n}_positionFromMouseEvent(e,t,r){let n=r.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(n)return{x:n[0],y:n[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,r,n,i){return{x1:e,y1:t,x2:r,y2:n,cols:this._bufferService.cols,fg:i}}};Y0=tn([lt(1,fb),lt(2,ps),lt(3,mi),lt(4,z4)],Y0);function $Y(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var kY=class extends yY{constructor(e={}){super(e),this._linkifier=this._register(new Yl),this.browser=eR,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new Yl),this._onCursorMove=this._register(new Ue),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new Ue),this.onKey=this._onKey.event,this._onRender=this._register(new Ue),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new Ue),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new Ue),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new Ue),this.onBell=this._onBell.event,this._onFocus=this._register(new Ue),this._onBlur=this._register(new Ue),this._onA11yCharEmitter=this._register(new Ue),this._onA11yTabEmitter=this._register(new Ue),this._onWillOpen=this._register(new Ue),this._setup(),this._decorationService=this._instantiationService.createInstance(CY),this._instantiationService.setService(Yu,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(gX),this._instantiationService.setService(z4,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(v0)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh((t==null?void 0:t.start)??0,(t==null?void 0:t.end)??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(Vn.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(Vn.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(Vn.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(Vn.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(Vr(()=>{var t,r;this._customKeyEventHandler=void 0,(r=(t=this.element)==null?void 0:t.parentNode)==null||r.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let r,n="";switch(t.index){case 256:r="foreground",n="10";break;case 257:r="background",n="11";break;case 258:r="cursor",n="12";break;default:r="ansi",n="4;"+t.index}switch(t.type){case 0:let i=Hr.toColorRGB(r==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[r]);this.coreService.triggerDataEvent(`${Pe.ESC}]${n};${hY(i)}${Q4.ST}`);break;case 1:if(r==="ansi")this._themeService.modifyColors(o=>o.ansi[t.index]=mn.toColor(...t.color));else{let o=r;this._themeService.modifyColors(a=>a[o]=mn.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(wf,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Pe.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var e;return(e=this.textarea)==null?void 0:e.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Pe.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let r=Math.min(this.buffer.x,this.cols-1),n=this._renderService.dimensions.css.cell.height,i=t.getWidth(r),o=this._renderService.dimensions.css.cell.width*i,a=this.buffer.y*this._renderService.dimensions.css.cell.height,c=r*this._renderService.dimensions.css.cell.width;this.textarea.style.left=c+"px",this.textarea.style.top=a+"px",this.textarea.style.width=o+"px",this.textarea.style.height=n+"px",this.textarea.style.lineHeight=n+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(Wt(this.element,"copy",t=>{this.hasSelection()&&OK(t,this._selectionService)}));let e=t=>IK(t,this.textarea,this.coreService,this.optionsService);this._register(Wt(this.textarea,"paste",e)),this._register(Wt(this.element,"paste",e)),tR?this._register(Wt(this.element,"mousedown",t=>{t.button===2&&ox(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(Wt(this.element,"contextmenu",t=>{ox(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),Sb&&this._register(Wt(this.element,"auxclick",t=>{t.button===1&&$4(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(Wt(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(Wt(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(Wt(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(Wt(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(Wt(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(Wt(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(Wt(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){var i;if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((i=this.element)==null?void 0:i.ownerDocument.defaultView)&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(Wt(this.screenElement,"mousemove",o=>this.updateCursorStyle(o))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let r=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m0.get()),iR||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>r.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(mX,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(ms,this._coreBrowserService),this._register(Wt(this.textarea,"focus",o=>this._handleTextAreaFocus(o))),this._register(Wt(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(L0,this._document,this._helperContainer),this._instantiationService.setService(hm,this._charSizeService),this._themeService=this._instantiationService.createInstance(F0),this._instantiationService.setService(ic,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_f),this._instantiationService.setService(M4,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(A0,this.rows,this.screenElement)),this._instantiationService.setService(ps,this._renderService),this._register(this._renderService.onRenderedViewportChange(o=>this._onRender.fire(o))),this.onResize(o=>this._renderService.resize(o.cols,o.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(z0,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(D0),this._instantiationService.setService(fb,this._mouseService);let n=this._linkifier.value=this._register(this._instantiationService.createInstance(Y0,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(N0,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(o=>{super.scrollLines(o,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(H0,this.element,this.screenElement,n)),this._instantiationService.setService(AK,this._selectionService),this._register(this._selectionService.onRequestScrollLines(o=>this.scrollLines(o.amount,o.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(o=>this._renderService.handleSelectionChanged(o.start,o.end,o.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(o=>{this.textarea.value=o,this.textarea.focus(),this.textarea.select()})),this._register(Vn.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{var o;this._selectionService.refresh(),(o=this._viewport)==null||o.queueSync()})),this._register(this._instantiationService.createInstance(M0,this.screenElement)),this._register(Wt(this.element,"mousedown",o=>this._selectionService.handleMouseDown(o))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(wf,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",o=>this._handleScreenReaderModeOptionChange(o))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(bf,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",o=>{!this._overviewRulerRenderer&&o&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(bf,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(B0,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function r(o){var d,f,p,g,v;let a=e._mouseService.getMouseReportCoords(o,e.screenElement);if(!a)return!1;let c,u;switch(o.overrideType||o.type){case"mousemove":u=32,o.buttons===void 0?(c=3,o.button!==void 0&&(c=o.button<3?o.button:3)):c=o.buttons&1?0:o.buttons&4?1:o.buttons&2?2:3;break;case"mouseup":u=0,c=o.button<3?o.button:3;break;case"mousedown":u=1,c=o.button<3?o.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(o)===!1)return!1;let b=o.deltaY;if(b===0||e.coreMouseService.consumeWheelEvent(o,(g=(p=(f=(d=e._renderService)==null?void 0:d.dimensions)==null?void 0:f.device)==null?void 0:p.cell)==null?void 0:g.height,(v=e._coreBrowserService)==null?void 0:v.dpr)===0)return!1;u=b<0?0:1,c=4;break;default:return!1}return u===void 0||c===void 0||c>4?!1:e.coreMouseService.triggerMouseEvent({col:a.col,row:a.row,x:a.x,y:a.y,button:c,action:u,ctrl:o.ctrlKey,alt:o.altKey,shift:o.shiftKey})}let n={mouseup:null,wheel:null,mousedrag:null,mousemove:null},i={mouseup:o=>(r(o),o.buttons||(this._document.removeEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.removeEventListener("mousemove",n.mousedrag)),this.cancel(o)),wheel:o=>(r(o),this.cancel(o,!0)),mousedrag:o=>{o.buttons&&r(o)},mousemove:o=>{o.buttons||r(o)}};this._register(this.coreMouseService.onProtocolChange(o=>{o?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(o)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),o&8?n.mousemove||(t.addEventListener("mousemove",i.mousemove),n.mousemove=i.mousemove):(t.removeEventListener("mousemove",n.mousemove),n.mousemove=null),o&16?n.wheel||(t.addEventListener("wheel",i.wheel,{passive:!1}),n.wheel=i.wheel):(t.removeEventListener("wheel",n.wheel),n.wheel=null),o&2?n.mouseup||(n.mouseup=i.mouseup):(this._document.removeEventListener("mouseup",n.mouseup),n.mouseup=null),o&4?n.mousedrag||(n.mousedrag=i.mousedrag):(this._document.removeEventListener("mousemove",n.mousedrag),n.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(Wt(t,"mousedown",o=>{if(o.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(o)))return r(o),n.mouseup&&this._document.addEventListener("mouseup",n.mouseup),n.mousedrag&&this._document.addEventListener("mousemove",n.mousedrag),this.cancel(o)})),this._register(Wt(t,"wheel",o=>{var a,c,u,d,f;if(!n.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(o)===!1)return!1;if(!this.buffer.hasScrollback){if(o.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(o,(d=(u=(c=(a=e._renderService)==null?void 0:a.dimensions)==null?void 0:c.device)==null?void 0:u.cell)==null?void 0:d.height,(f=e._coreBrowserService)==null?void 0:f.dpr)===0)return this.cancel(o,!0);let p=Pe.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(o.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(p,!0),this.cancel(o,!0)}}},{passive:!1}))}refresh(e,t){var r;(r=this._renderService)==null||r.refreshRows(e,t)}updateCursorStyle(e){var t;(t=this._selectionService)!=null&&t.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){E4(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,r){this._selectionService.setSelection(e,t,r)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var e;(e=this._selectionService)==null||e.clearSelection()}selectAll(){var e;(e=this._selectionService)==null||e.selectAll()}selectLines(e,t){var r;(r=this._selectionService)==null||r.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let r=_Y(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),r.type===3||r.type===2){let n=this.rows-1;return this.scrollLines(r.type===2?-n:n),this.cancel(e,!0)}if(r.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(r.cancel&&this.cancel(e,!0),!r.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((r.key===Pe.ETX||r.key===Pe.CR)&&(this.textarea.value=""),this._onKey.fire({key:r.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(r.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let r=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?r:r&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(RY(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){var r;(r=this._charSizeService)==null||r.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(hn));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){var t;this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),(t=this._selectionService)==null||t.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){var e;(e=this._renderService)==null||e.clearTextureAtlas()}_reportFocus(){var e;(e=this.element)!=null&&e.classList.contains("focus")?this.coreService.triggerDataEvent(Pe.ESC+"[I"):this.coreService.triggerDataEvent(Pe.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),r=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Pe.ESC}[4;${r};${t}t`);break;case 1:let n=this._renderService.dimensions.css.cell.width.toFixed(0),i=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Pe.ESC}[6;${i};${n}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function RY(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var TY=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let r={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(r),t.dispose=()=>this._wrappedAddonDispose(r),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let r=0;r<this._addons.length;r++)if(this._addons[r]===e){t=r;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},PY=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new so)}translateToString(e,t,r){return this._line.translateToString(e,t,r)}},Yx=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new PY(t)}getNullCell(){return new so}},OY=class extends Zt{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new Ue),this.onBufferChange=this._onBufferChange.event,this._normal=new Yx(this._core.buffers.normal,"normal"),this._alternate=new Yx(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},IY=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,r=>t(r.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(r,n)=>t(r,n.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},NY=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},MY=["cols","rows"],No=0,zY=class extends Zt{constructor(e){super(),this._core=this._register(new kY(e)),this._addonManager=this._register(new TY),this._publicOptions={...this._core.options};let t=n=>this._core.options[n],r=(n,i)=>{this._checkReadonlyOptions(n),this._core.options[n]=i};for(let n in this._core.options){let i={get:t.bind(this,n),set:r.bind(this,n)};Object.defineProperty(this._publicOptions,n,i)}}_checkReadonlyOptions(e){if(MY.includes(e))throw new Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new IY(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new NY(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this._register(new OY(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,r){this._verifyIntegers(e,t,r),this._core.select(e,t,r)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
589
+ `,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return m0.get()},set promptLabel(e){m0.set(e)},get tooMuchOutput(){return p0.get()},set tooMuchOutput(e){p0.set(e)}}}_verifyIntegers(...e){for(No of e)if(No===1/0||isNaN(No)||No%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(No of e)if(No&&(No===1/0||isNaN(No)||No%1!==0||No<0))throw new Error("This API only accepts positive integers")}};/**
590
+ * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
591
+ * @license MIT
592
+ *
593
+ * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
594
+ * @license MIT
595
+ *
596
+ * Originally forked from (with the author's permission):
597
+ * Fabrice Bellard's javascript vt100 for jslinux:
598
+ * http://bellard.org/jslinux/
599
+ * Copyright (c) 2011 Fabrice Bellard
600
+ */var jY=2,BY=1,LY=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){var p;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:((p=this._terminal.options.overviewRuler)==null?void 0:p.width)||14,r=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(r.getPropertyValue("height")),i=Math.max(0,parseInt(r.getPropertyValue("width"))),o=window.getComputedStyle(this._terminal.element),a={top:parseInt(o.getPropertyValue("padding-top")),bottom:parseInt(o.getPropertyValue("padding-bottom")),right:parseInt(o.getPropertyValue("padding-right")),left:parseInt(o.getPropertyValue("padding-left"))},c=a.top+a.bottom,u=a.right+a.left,d=n-c,f=i-u-t;return{cols:Math.max(jY,Math.floor(f/e.css.cell.width)),rows:Math.max(BY,Math.floor(d/e.css.cell.height))}}};const DY="_terminalPanel_1at8e_1",AY="_terminalContainer_1at8e_8",Jx={terminalPanel:DY,terminalContainer:AY};class HY extends Q.Component{constructor(t){super(t),this.containerRef=Q.createRef(),this.terminal=null,this.fitAddon=null,this.ws=null,this.resizeObserver=null}componentDidMount(){this.initTerminal(),this.connectWebSocket(),this.setupResizeObserver()}componentWillUnmount(){this.ws&&(this.ws.close(),this.ws=null),this.resizeObserver&&this.resizeObserver.disconnect(),this.terminal&&this.terminal.dispose()}initTerminal(){this.terminal=new zY({cursorBlink:!0,fontSize:13,fontFamily:'Menlo, Monaco, "Courier New", monospace',theme:{background:"#0a0a0a",foreground:"#d4d4d4",cursor:"#d4d4d4",selectionBackground:"#264f78"},allowProposedApi:!0}),this.fitAddon=new LY,this.terminal.loadAddon(this.fitAddon),this.terminal.open(this.containerRef.current),requestAnimationFrame(()=>{this.fitAddon.fit()}),this.terminal.onData(t=>{this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({type:"input",data:t}))})}connectWebSocket(){const r=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/terminal`;this.ws=new WebSocket(r),this.ws.onmessage=n=>{try{const i=JSON.parse(n.data);i.type==="data"?this.terminal.write(i.data):i.type==="exit"?this.terminal.write(`\r
601
+ \x1B[33m${we("ui.terminal.exited",{code:i.exitCode??"?"})}\x1B[0m\r
602
+ `):i.type==="state"&&!i.running&&i.exitCode!==null&&this.terminal.write(`\x1B[33m${we("ui.terminal.exited",{code:i.exitCode})}\x1B[0m\r
603
+ `)}catch{}},this.ws.onclose=()=>{setTimeout(()=>{this.containerRef.current&&this.connectWebSocket()},2e3)},this.ws.onopen=()=>{this.sendResize()}}sendResize(){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.terminal&&this.ws.send(JSON.stringify({type:"resize",cols:this.terminal.cols,rows:this.terminal.rows}))}setupResizeObserver(){this.resizeObserver=new ResizeObserver(()=>{if(this.fitAddon&&this.containerRef.current)try{this.fitAddon.fit(),this.sendResize()}catch{}}),this.containerRef.current&&this.resizeObserver.observe(this.containerRef.current)}render(){return $.jsx("div",{className:Jx.terminalPanel,children:$.jsx("div",{ref:this.containerRef,className:Jx.terminalContainer})})}}const FY="_centerEmpty_s1mzc_1",WY="_container_s1mzc_8",VY="_sessionDividerText_s1mzc_16",UY="_lastResponseLabel_s1mzc_21",qY="_splitContainer_s1mzc_25",KY="_chatSection_s1mzc_32",GY="_vResizer_s1mzc_39",XY="_chatInputBar_s1mzc_53",YY="_chatInputWrapper_s1mzc_63",JY="_chatTextareaWrap_s1mzc_78",QY="_chatTextarea_s1mzc_78",ZY="_chatInputHint_s1mzc_102",eJ="_chatSendBtn_s1mzc_109",tJ="_messageListWrap_s1mzc_138",rJ="_stickyBottomBtn_s1mzc_146",nJ="_ptyPromptBubble_s1mzc_172",iJ="_ptyPromptResolved_s1mzc_181",oJ="_ptyPromptQuestion_s1mzc_190",sJ="_ptyPromptOptions_s1mzc_197",aJ="_ptyPromptOption_s1mzc_197",lJ="_ptyPromptOptionPrimary_s1mzc_221",cJ="_ptyPromptOptionChosen_s1mzc_239",uJ="_ptyPromptOptionDimmed_s1mzc_250",dJ="_ghostText_s1mzc_261",hJ="_suggestionChip_s1mzc_277",fJ="_suggestionChipText_s1mzc_293",mJ="_suggestionChipAction_s1mzc_302",Cr={centerEmpty:FY,container:WY,sessionDividerText:VY,lastResponseLabel:UY,splitContainer:qY,chatSection:KY,vResizer:GY,chatInputBar:XY,chatInputWrapper:YY,chatTextareaWrap:JY,chatTextarea:QY,chatInputHint:ZY,chatSendBtn:eJ,messageListWrap:tJ,stickyBottomBtn:rJ,ptyPromptBubble:nJ,ptyPromptResolved:iJ,ptyPromptQuestion:oJ,ptyPromptOptions:sJ,ptyPromptOption:aJ,ptyPromptOptionPrimary:lJ,ptyPromptOptionChosen:cJ,ptyPromptOptionDimmed:uJ,ghostText:dJ,suggestionChip:hJ,suggestionChipText:fJ,suggestionChipAction:mJ},{Text:Qx}=Xo,pJ=20;function gJ(){return 100+Math.random()*50}function Zx(e){const t={};for(const n of e)if(n.role==="assistant"&&Array.isArray(n.content))for(const i of n.content)i.type==="tool_use"&&(t[i.id]=i);const r={};for(const n of e)if(n.role==="user"&&Array.isArray(n.content)){for(const i of n.content)if(i.type==="tool_result"){const o=t[i.tool_use_id];let a=we("ui.toolReturn"),c=null,u=null;if(o)if(c=o.name,u=o.input,o.name==="Task"&&o.input){const d=o.input.subagent_type||"",f=o.input.description||"";a=`SubAgent: ${d}${f?" — "+f:""}`}else a=we("ui.toolReturnNamed",{name:o.name});r[i.tool_use_id]={label:a,toolName:c,toolInput:u,resultText:s4(i)}}}return{toolUseMap:t,toolResultMap:r}}class vJ extends Q.Component{constructor(r){super(r);$t(this,"handleStickToBottom",()=>{this.setState({stickyBottom:!0},()=>{const r=this.containerRef.current;r&&(r.scrollTop=r.scrollHeight)})});$t(this,"handlePromptOptionClick",r=>{const n=this._inputWs;if(!n||n.readyState!==WebSocket.OPEN)return;const i=this.state.ptyPrompt;if(!i)return;const o=i.options,a=o.findIndex(g=>g.number===r);let c=o.findIndex(g=>g.selected);c<0&&(c=0);const u=a-c,d=u>0?"\x1B[B":"\x1B[A",f=Math.abs(u),p=g=>{g<f?(n.send(JSON.stringify({type:"input",data:d})),setTimeout(()=>p(g+1),30)):setTimeout(()=>{n.readyState===WebSocket.OPEN&&n.send(JSON.stringify({type:"input",data:"\r"}))},50)};p(0),this.setState(g=>{const v=g.ptyPromptHistory.slice(),b=v[v.length-1];return b&&b.status==="active"&&(v[v.length-1]={...b,status:"answered",selectedNumber:r}),{ptyPrompt:null,ptyPromptHistory:v}}),this._ptyBuffer="",this._ptyDebounceTimer&&clearTimeout(this._ptyDebounceTimer)});$t(this,"handleInputSend",()=>{const r=this._inputRef.current;if(!r)return;const n=r.value.trim();n&&this._inputWs&&this._inputWs.readyState===WebSocket.OPEN&&(this._inputWs.send(JSON.stringify({type:"input",data:n})),setTimeout(()=>{this._inputWs&&this._inputWs.readyState===WebSocket.OPEN&&this._inputWs.send(JSON.stringify({type:"input",data:"\r"}))},50),r.value="",r.style.height="auto",this.setState({inputEmpty:!0,pendingInput:n,inputSuggestion:null},()=>this.scrollToBottom()))});$t(this,"handleInputKeyDown",r=>{if(r.key==="Tab"&&this.state.inputSuggestion){r.preventDefault();const n=this._inputRef.current;n&&(n.value=this.state.inputSuggestion,n.style.height="auto",n.style.height=Math.min(n.scrollHeight,120)+"px"),this.setState({inputSuggestion:null,inputEmpty:!1});return}r.key==="Enter"&&!r.shiftKey&&(r.preventDefault(),this.handleInputSend())});$t(this,"handleInputChange",r=>{const n=r.target;n.style.height="auto",n.style.height=Math.min(n.scrollHeight,120)+"px";const i=!n.value.trim();this.setState({inputEmpty:i}),this.state.inputSuggestion&&!i&&this.setState({inputSuggestion:null})});$t(this,"handleSuggestionToTerminal",()=>{const r=this.state.inputSuggestion;!r||!this._inputWs||this._inputWs.readyState!==WebSocket.OPEN||(this._inputWs.send(JSON.stringify({type:"input",data:r})),setTimeout(()=>{this._inputWs&&this._inputWs.readyState===WebSocket.OPEN&&this._inputWs.send(JSON.stringify({type:"input",data:"\r"}))},50),this.setState({inputSuggestion:null,pendingInput:r},()=>this.scrollToBottom()))});$t(this,"handleSplitMouseDown",r=>{r.preventDefault(),this._resizing=!0;const n=o=>{if(!this._resizing)return;const a=this.splitContainerRef.current;if(!a)return;const c=a.getBoundingClientRect(),u=(o.clientX-c.left)/c.width,d=Math.min(.85,Math.max(.25,u));this.setState({splitRatio:d})},i=()=>{this._resizing=!1,document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",i),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",n),document.addEventListener("mouseup",i),document.body.style.cursor="col-resize",document.body.style.userSelect="none"});this.containerRef=Q.createRef(),this.splitContainerRef=Q.createRef(),this.state={visibleCount:0,loading:!1,allItems:[],highlightTs:null,highlightFading:!1,splitRatio:.6,inputEmpty:!0,pendingInput:null,stickyBottom:!0,ptyPrompt:null,ptyPromptHistory:[],inputSuggestion:null},this._queueTimer=null,this._prevItemsLen=0,this._scrollTargetIdx=null,this._scrollTargetRef=Q.createRef(),this._scrollFadeTimer=null,this._resizing=!1,this._inputWs=null,this._inputRef=Q.createRef(),this._ptyBuffer="",this._ptyDebounceTimer=null}componentDidMount(){this.startRender(),this.props.cliMode&&this.connectInputWs(),this._bindStickyScroll()}componentDidUpdate(r){if(r.mainAgentSessions!==this.props.mainAgentSessions)this.startRender(),this.state.pendingInput&&this.setState({pendingInput:null}),this._updateSuggestion();else if(r.collapseToolResults!==this.props.collapseToolResults||r.expandThinking!==this.props.expandThinking){const n=this.buildAllItems();this.setState({allItems:n,visibleCount:n.length})}if(!r.scrollToTimestamp&&this.props.scrollToTimestamp){const n=this.buildAllItems();this.setState({allItems:n,visibleCount:n.length},()=>this.scrollToBottom())}!r.cliMode&&this.props.cliMode&&this.connectInputWs(),this._rebindStickyEl()}componentWillUnmount(){this._queueTimer&&clearTimeout(this._queueTimer),this._fadeClearTimer&&clearTimeout(this._fadeClearTimer),this._ptyDebounceTimer&&clearTimeout(this._ptyDebounceTimer),this._unbindScrollFade(),this._unbindStickyScroll(),this._inputWs&&(this._inputWs.close(),this._inputWs=null)}startRender(){this._queueTimer&&clearTimeout(this._queueTimer);const r=this.buildAllItems(),n=this._prevItemsLen;this._prevItemsLen=r.length;const i=r.length-n;if(i<=0||n>0&&i<=3){this.setState({allItems:r,visibleCount:r.length,loading:!1},()=>this.scrollToBottom());return}if(r.length>pJ)this.setState({allItems:r,visibleCount:0,loading:!0}),this._queueTimer=setTimeout(()=>{this.setState({visibleCount:r.length,loading:!1},()=>this.scrollToBottom())},300);else{const o=Math.max(0,n);this.setState({allItems:r,visibleCount:o,loading:!1}),this.queueNext(o,r.length)}}queueNext(r,n){r>=n||(this._queueTimer=setTimeout(()=>{this.setState({visibleCount:r+1},()=>{this.scrollToBottom(),this.queueNext(r+1,n)})},gJ()))}_isNearBottom(){const r=this.containerRef.current;return r?r.scrollHeight-r.scrollTop-r.clientHeight<=30:!0}scrollToBottom(){if(this._scrollTargetRef.current){const r=this._scrollTargetRef.current,n=this.containerRef.current;n&&r.offsetHeight>n.clientHeight?r.scrollIntoView({block:"start",behavior:"instant"}):r.scrollIntoView({block:"center",behavior:"instant"});const i=this.props.scrollToTimestamp;this._scrollTargetRef=Q.createRef(),i&&(this.setState({highlightTs:i,highlightFading:!1}),this._bindScrollFade()),this.props.onScrollTsDone&&this.props.onScrollTsDone();return}if(this.state.stickyBottom){const r=this.containerRef.current;r&&(r.scrollTop=r.scrollHeight)}}_bindStickyScroll(){this._onStickyScroll=()=>{if(this._stickyScrollLock)return;const r=this.containerRef.current;if(!r)return;const n=r.scrollHeight-r.scrollTop-r.clientHeight;this.state.stickyBottom&&n>30?this.setState({stickyBottom:!1}):!this.state.stickyBottom&&n<=5&&this.setState({stickyBottom:!0})},this._rebindStickyEl()}_rebindStickyEl(){const r=this.containerRef.current;r!==this._stickyBoundEl&&(this._stickyBoundEl&&this._stickyBoundEl.removeEventListener("scroll",this._onStickyScroll),this._stickyBoundEl=r,r&&r.addEventListener("scroll",this._onStickyScroll))}_unbindStickyScroll(){this._stickyBoundEl&&this._onStickyScroll&&(this._stickyBoundEl.removeEventListener("scroll",this._onStickyScroll),this._stickyBoundEl=null)}_bindScrollFade(){this._unbindScrollFade();const r=this.containerRef.current;r&&(this._scrollFadeIgnoreFirst=!0,this._onScrollFade=()=>{if(this._scrollFadeIgnoreFirst){this._scrollFadeIgnoreFirst=!1;return}this.setState({highlightFading:!0}),this._fadeClearTimer=setTimeout(()=>{this.setState({highlightTs:null,highlightFading:!1})},2e3),this._unbindScrollFade()},r.addEventListener("scroll",this._onScrollFade))}_unbindScrollFade(){this._onScrollFade&&this.containerRef.current&&(this.containerRef.current.removeEventListener("scroll",this._onScrollFade),this._onScrollFade=null)}renderSessionMessages(r,n,i,o){var v;const{userProfile:a,collapseToolResults:c,expandThinking:u,onViewRequest:d}=this.props,{toolUseMap:f,toolResultMap:p}=Zx(r),g=[];for(let b=0;b<r.length;b++){const S=r[b],_=S.content,C=S._timestamp||null,x=C?o[C]:void 0,E=x!=null&&d?{requestIndex:x,onViewRequest:d}:{};if(S.role==="user"){if(Array.isArray(_)){const k=_.find(T=>T.type==="text"&&/^\[SUGGESTION MODE:/i.test((T.text||"").trim())),P=_.filter(T=>T.type==="tool_result");if(k&&P.length>0){let T=null,O={};for(const N of P){const I=f[N.tool_use_id];if(I&&I.name==="AskUserQuestion"&&((v=I.input)!=null&&v.questions)){T=I.input.questions;const z=s4(N);try{O=JSON.parse(z).answers||{}}catch{}break}}T&&g.push($.jsx(yo,{role:"user-selection",questions:T,answers:O,timestamp:C,userProfile:a,...E},`${n}-selection-${b}`))}else{const{commands:T,textBlocks:O,skillBlocks:N}=i4(_);for(let I=0;I<T.length;I++)g.push($.jsx(yo,{role:"user",text:T[I],timestamp:C,userProfile:a,modelInfo:i,...E},`${n}-cmd-${b}-${I}`));for(const I of N){const z=I.text.match(/^#\s+(.+)$/m),D=z?z[1]:"Skill";g.push($.jsx(yo,{role:"skill-loaded",text:I.text,skillName:D,timestamp:C,...E},`${n}-skill-${b}`))}for(let I=0;I<O.length;I++){const z=/^Implement the following plan:/i.test((O[I].text||"").trim());g.push($.jsx(yo,{role:z?"plan-prompt":"user",text:O[I].text,timestamp:C,userProfile:a,modelInfo:i,...E},`${n}-user-${b}-${I}`))}}}else if(typeof _=="string"&&!Zy(_)){const k=/^Implement the following plan:/i.test(_.trim());g.push($.jsx(yo,{role:k?"plan-prompt":"user",text:_,timestamp:C,userProfile:a,modelInfo:i,...E},`${n}-user-${b}`))}}else S.role==="assistant"&&(Array.isArray(_)?g.push($.jsx(yo,{role:"assistant",content:_,toolResultMap:p,timestamp:C,modelInfo:i,collapseToolResults:c,expandThinking:u,...E},`${n}-asst-${b}`)):typeof _=="string"&&g.push($.jsx(yo,{role:"assistant",content:[{type:"text",text:_}],toolResultMap:p,timestamp:C,modelInfo:i,collapseToolResults:c,expandThinking:u,...E},`${n}-asst-${b}`)))}return g}buildAllItems(){var S,_,C,x;const{mainAgentSessions:r,requests:n,collapseToolResults:i,expandThinking:o,onViewRequest:a}=this.props;if(!r||r.length===0)return[];const c={};if(n)for(let E=0;E<n.length;E++)Wn(n[E])&&n[E].timestamp&&(c[n[E].timestamp]=E);let u=null;if(n){for(let E=n.length-1;E>=0;E--)if(Wn(n[E])&&((S=n[E].body)!=null&&S.model)){u=n[E].body.model;break}}const d=bF(u),f=[],p={},g=[];if(n)for(let E=0;E<n.length;E++){const k=n[E];if(!k.timestamp)continue;const P=Pa(k,n[E+1]);if(P.type==="SubAgent"){const T=(C=(_=k.response)==null?void 0:_.body)==null?void 0:C.content;if(Array.isArray(T)&&T.length>0){const O=Zx(((x=k.body)==null?void 0:x.messages)||[]).toolResultMap;g.push({timestamp:k.timestamp,content:T,toolResultMap:O,label:ff(P.type,P.subType),requestIndex:E})}}}let v=0;r.forEach((E,k)=>{var T,O,N,I;k>0&&f.push($.jsx(_w,{style:{borderColor:"#333",margin:"16px 0"},children:$.jsx(Qx,{className:Cr.sessionDividerText,children:"Session"})},`session-div-${k}`));const P=this.renderSessionMessages(E.messages,`s${k}`,d,c);for(const z of P){const D=z.props.timestamp;for(;v<g.length&&D&&g[v].timestamp<=D;){const M=g[v];M.timestamp&&(p[M.timestamp]=f.length),f.push($.jsx(yo,{role:"sub-agent-chat",content:M.content,toolResultMap:M.toolResultMap,label:M.label,timestamp:M.timestamp,collapseToolResults:i,expandThinking:o,requestIndex:M.requestIndex,onViewRequest:a},`sub-chat-${v}`)),v++}D&&(p[D]=f.length),f.push(z)}for(;v<g.length;){const z=g[v],D=k<r.length-1&&((O=(T=r[k+1].messages)==null?void 0:T[0])==null?void 0:O._timestamp);if(D&&z.timestamp>D)break;z.timestamp&&(p[z.timestamp]=f.length),f.push($.jsx(yo,{role:"sub-agent-chat",content:z.content,toolResultMap:z.toolResultMap,label:z.label,timestamp:z.timestamp,collapseToolResults:i,expandThinking:o,requestIndex:z.requestIndex,onViewRequest:a},`sub-chat-${v}`)),v++}if(k===r.length-1&&((I=(N=E.response)==null?void 0:N.body)!=null&&I.content)){const z=E.response.body.content;Array.isArray(z)&&(f.push($.jsx(Q.Fragment,{children:$.jsx(_w,{style:{borderColor:"#2a2a2a",margin:"8px 0"},children:$.jsx(Qx,{type:"secondary",className:Cr.lastResponseLabel,children:we("ui.lastResponse")})})},"resp-divider")),E.entryTimestamp&&(p[E.entryTimestamp]=f.length),f.push($.jsx(yo,{role:"assistant",content:z,timestamp:E.entryTimestamp,modelInfo:d,collapseToolResults:i,expandThinking:o,toolResultMap:{}},"resp-asst")))}});const{scrollToTimestamp:b}=this.props;return this._scrollTargetIdx=b&&p[b]!=null?p[b]:null,this._tsItemMap=p,f}_extractSuggestion(){var u;const{mainAgentSessions:r}=this.props;if(!(r!=null&&r.length))return null;const n=r[r.length-1],i=n==null?void 0:n.response;if(!i)return null;const o=i.body;if(!o)return null;const a=o.stop_reason;if(a!=="end_turn"&&a!=="max_tokens")return null;const c=o.content;if(!Array.isArray(c))return null;for(let d=c.length-1;d>=0;d--)if(c[d].type==="text"&&((u=c[d].text)!=null&&u.trim()))return c[d].text.trim();return null}_updateSuggestion(){const r=this._extractSuggestion();this.setState({inputSuggestion:r||null})}connectInputWs(){const n=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/terminal`;this._inputWs=new WebSocket(n),this._inputWs.onmessage=i=>{try{const o=JSON.parse(i.data);o.type==="data"?this._appendPtyData(o.data):o.type==="exit"&&this._clearPtyPrompt()}catch{}},this._inputWs.onclose=()=>{setTimeout(()=>{this.splitContainerRef.current&&this.props.cliMode&&this.connectInputWs()},2e3)}}_stripAnsi(r){return r.replace(/\x1b\[[0-9;]*[A-Za-z]/g,"").replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)/g,"").replace(/\x1b[^[\]](.|$)/g,"").replace(/[\x00-\x08\x0b\x0c\x0e-\x1f]/g,"")}_appendPtyData(r){const n=this._stripAnsi(r);this._ptyBuffer+=n,this._ptyBuffer.length>4096&&(this._ptyBuffer=this._ptyBuffer.slice(-4096)),this._ptyDebounceTimer&&clearTimeout(this._ptyDebounceTimer),this._ptyDebounceTimer=setTimeout(()=>this._detectPrompt(),200)}_detectPrompt(){const n=this._ptyBuffer.match(/([^\n]*\?)\s*\n((?:\s*[❯>]?\s*\d+\.\s+[^\n]+\n?){2,})$/);if(n){const i=n[1].trim(),a=n[2].match(/\s*([❯>])?\s*(\d+)\.\s+([^\n]+)/g);if(a){const c=a.map(f=>{const p=f.match(/\s*([❯>])?\s*(\d+)\.\s+(.+)/);return{number:parseInt(p[2],10),text:p[3].trim(),selected:!!p[1]}}),u=this.state.ptyPrompt,d={question:i,options:c};u&&u.question===i?this.setState({ptyPrompt:d}):(this.setState(f=>{const p=f.ptyPromptHistory.slice();if(f.ptyPrompt){const g=p[p.length-1];g&&g.status==="active"&&(p[p.length-1]={...g,status:"dismissed"})}return p.push({...d,status:"active",selectedNumber:null,timestamp:new Date().toISOString()}),{ptyPrompt:d,ptyPromptHistory:p}}),this.scrollToBottom());return}}this.state.ptyPrompt&&this.setState(i=>{const o=i.ptyPromptHistory.slice(),a=o[o.length-1];return a&&a.status==="active"&&(o[o.length-1]={...a,status:"dismissed"}),{ptyPrompt:null,ptyPromptHistory:o}})}_clearPtyPrompt(){this._ptyBuffer="",this._ptyDebounceTimer&&clearTimeout(this._ptyDebounceTimer),this.state.ptyPrompt&&this.setState({ptyPrompt:null})}render(){const{mainAgentSessions:r,cliMode:n,terminalVisible:i}=this.props,{allItems:o,visibleCount:a,loading:c,splitRatio:u}=this.state,d=!r||r.length===0;if(d&&!n)return $.jsx("div",{className:Cr.centerEmpty,children:$.jsx(io,{description:we("ui.noChat")})});if(c&&!n)return $.jsx("div",{className:Cr.centerEmpty,children:$.jsx(Ta,{size:"large"})});const f=this._scrollTargetIdx,{highlightTs:p,highlightFading:g}=this.state,v=p&&this._tsItemMap&&this._tsItemMap[p]!=null?this._tsItemMap[p]:null,b=o.slice(0,a),{pendingInput:S,stickyBottom:_,ptyPromptHistory:C}=this.state,x=n&&S?$.jsx(yo,{role:"user",text:S,timestamp:new Date().toISOString(),userProfile:this.props.userProfile},"pending-input"):null,E=_?null:$.jsxs("button",{className:Cr.stickyBottomBtn,onClick:this.handleStickToBottom,children:[$.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:$.jsx("polyline",{points:"6 9 12 15 18 9"})}),we("ui.stickyBottom")]}),k=n&&C.length>0?C.map((T,O)=>{const N=T.status==="active",I=T.status==="answered";return $.jsxs("div",{className:`${Cr.ptyPromptBubble}${N?"":" "+Cr.ptyPromptResolved}`,children:[$.jsx("div",{className:Cr.ptyPromptQuestion,children:T.question}),$.jsx("div",{className:Cr.ptyPromptOptions,children:T.options.map(z=>{const D=I&&T.selectedNumber===z.number;let M=Cr.ptyPromptOption;return N&&z.selected&&(M=Cr.ptyPromptOptionPrimary),D&&(M=Cr.ptyPromptOptionChosen),!N&&!D&&(M=Cr.ptyPromptOptionDimmed),$.jsxs("button",{className:M,disabled:!N,onClick:N?()=>this.handlePromptOptionClick(z.number):void 0,children:[z.number,". ",z.text]},z.number)})})]},`pty-prompt-${O}`)}):null,P=d||c?$.jsxs("div",{className:Cr.messageListWrap,children:[$.jsxs("div",{ref:this.containerRef,className:Cr.container,children:[!n||c?$.jsx("div",{className:Cr.centerEmpty,children:c?$.jsx(Ta,{size:"large"}):$.jsx(io,{description:we("ui.noChat")})}):null,x,k]}),E]}):$.jsxs("div",{className:Cr.messageListWrap,children:[$.jsxs("div",{ref:this.containerRef,className:Cr.container,children:[b.map((T,O)=>{const N=O===f,I=O===v;let z=T;return I&&(z=Q.cloneElement(z,{highlight:g?"fading":"active"})),N?$.jsx("div",{ref:this._scrollTargetRef,children:z},T.key+"-anchor"):z}),x,k]}),E]});return n?$.jsxs("div",{ref:this.splitContainerRef,className:Cr.splitContainer,children:[$.jsxs("div",{className:Cr.chatSection,style:i?{flex:u,minWidth:0}:{flex:1,minWidth:0},children:[P,!i&&$.jsxs("div",{className:Cr.chatInputBar,children:[$.jsxs("div",{className:Cr.chatInputWrapper,children:[$.jsxs("div",{className:Cr.chatTextareaWrap,children:[$.jsx("textarea",{ref:this._inputRef,className:Cr.chatTextarea,placeholder:this.state.inputSuggestion?"":we("ui.chatInput.placeholder"),rows:1,onKeyDown:this.handleInputKeyDown,onInput:this.handleInputChange}),this.state.inputSuggestion&&this.state.inputEmpty&&$.jsx("div",{className:Cr.ghostText,children:this.state.inputSuggestion})]}),$.jsx("div",{className:Cr.chatInputHint,children:this.state.inputSuggestion&&this.state.inputEmpty?we("ui.chatInput.hintTab"):we("ui.chatInput.hintEnter")})]}),$.jsx("button",{className:Cr.chatSendBtn,onClick:this.handleInputSend,disabled:this.state.inputEmpty,title:we("ui.chatInput.send"),children:$.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[$.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),$.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),i&&this.state.inputSuggestion&&$.jsxs("div",{className:Cr.suggestionChip,onClick:this.handleSuggestionToTerminal,children:[$.jsx("span",{className:Cr.suggestionChipText,children:this.state.inputSuggestion}),$.jsx("span",{className:Cr.suggestionChipAction,children:"↵"})]})]}),i&&$.jsxs($.Fragment,{children:[$.jsx("div",{className:Cr.vResizer,onMouseDown:this.handleSplitMouseDown}),$.jsx("div",{style:{flex:1-u,minWidth:200,display:"flex",flexDirection:"column"},children:$.jsx(HY,{})})]})]}):P}}const yJ="_resizer_yamj2_1",bJ={resizer:yJ};class _J extends Q.Component{constructor(t){super(t),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this)}handleMouseDown(t){t.preventDefault(),document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}handleMouseMove(t){this.props.onResize&&this.props.onResize(t.clientX)}handleMouseUp(){document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)}componentWillUnmount(){document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)}render(){return $.jsx("div",{onMouseDown:this.handleMouseDown,className:bJ.resizer})}}const SJ="_layout_16uf8_1",CJ="_header_16uf8_6",wJ="_content_16uf8_14",xJ="_mainContainer_16uf8_19",EJ="_leftPanel_16uf8_24",$J="_leftPanelHeader_16uf8_32",kJ="_leftPanelCount_16uf8_43",RJ="_leftPanelBody_16uf8_49",TJ="_rightPanel_16uf8_54",PJ="_modalActions_16uf8_60",OJ="_spinCenter_16uf8_64",IJ="_emptyCenter_16uf8_69",NJ="_logCheckbox_16uf8_75",MJ="_logListContainer_16uf8_79",zJ="_logListItem_16uf8_85",jJ="_logItemRow_16uf8_91",BJ="_logFileName_16uf8_108",LJ="_logFileIcon_16uf8_121",DJ="_loadingOverlay_16uf8_127",AJ="_loadingText_16uf8_140",HJ="_footer_16uf8_146",FJ="_footerRight_16uf8_156",WJ="_footerLink_16uf8_164",VJ="_footerIcon_16uf8_176",UJ="_footerDivider_16uf8_181",qJ="_guideContainer_16uf8_189",KJ="_guideContent_16uf8_197",GJ="_guideIcon_16uf8_202",XJ="_guideTitle_16uf8_207",YJ="_guideStep_16uf8_214",JJ="_guideStepNum_16uf8_220",QJ="_guideStepBody_16uf8_235",ZJ="_guideText_16uf8_240",eQ="_guideCode_16uf8_247",Ut={layout:SJ,header:CJ,content:wJ,mainContainer:xJ,leftPanel:EJ,leftPanelHeader:$J,leftPanelCount:kJ,leftPanelBody:RJ,rightPanel:TJ,modalActions:PJ,spinCenter:OJ,emptyCenter:IJ,logCheckbox:NJ,logListContainer:MJ,logListItem:zJ,logItemRow:jJ,logFileName:BJ,logFileIcon:LJ,loadingOverlay:DJ,loadingText:AJ,footer:HJ,footerRight:FJ,footerLink:WJ,footerIcon:VJ,footerDivider:UJ,guideContainer:qJ,guideContent:KJ,guideIcon:GJ,guideTitle:XJ,guideStep:YJ,guideStepNum:JJ,guideStepBody:QJ,guideText:ZJ,guideCode:eQ};class tQ extends Q.Component{constructor(r){super(r);$t(this,"handleSelectRequest",r=>{this.setState({selectedIndex:r,scrollCenter:!1})});$t(this,"handleViewRequest",r=>{this.setState({viewMode:"raw",selectedIndex:r,scrollCenter:!0})});$t(this,"handleViewInChat",()=>{this.setState(r=>{const i=(r.showAll?r.requests:ss(r.requests))[r.selectedIndex];if(!i)return null;let o=null;if(Wn(i)&&i.timestamp)o=i.timestamp;else{if(Pa(i).type==="SubAgent"&&i.timestamp)o=i.timestamp;else{const c=r.requests.indexOf(i);c>=0&&(o=qw(r.requests,c))}o||Li.info(we("ui.cannotMap"))}return{viewMode:"chat",chatScrollToTs:o}})});$t(this,"handleToggleViewMode",()=>{this.setState(r=>{const n=r.viewMode==="raw"?"chat":"raw";if(n==="raw"){if(r.selectedIndex===null){const a=r.showAll?r.requests:ss(r.requests);return{viewMode:n,selectedIndex:a.length>0?a.length-1:null,scrollCenter:!0}}return{viewMode:n,scrollCenter:!0}}const i=r.showAll?r.requests:ss(r.requests),o=r.selectedIndex!=null?i[r.selectedIndex]:null;if(o){let a=null;if(Wn(o)&&o.timestamp)a=o.timestamp;else if(Pa(o).type==="SubAgent"&&o.timestamp)a=o.timestamp;else{const u=r.requests.indexOf(o);u>=0&&(a=qw(r.requests,u)),a||Li.info(we("ui.cannotMap"))}return{viewMode:n,chatScrollToTs:a}}return{viewMode:n,chatScrollToTs:null}})});$t(this,"handleLangChange",()=>{const r=Xl();this.setState({lang:r}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({lang:r})}).catch(()=>{})});$t(this,"handleCollapseToolResultsChange",r=>{this.setState({collapseToolResults:r}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({collapseToolResults:r})}).catch(()=>{})});$t(this,"handleExpandThinkingChange",r=>{this.setState({expandThinking:r}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expandThinking:r})}).catch(()=>{})});$t(this,"handleExpandDiffChange",r=>{this.setState({expandDiff:r}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expandDiff:r})}).catch(()=>{})});$t(this,"handleFilterIrrelevantChange",r=>{this.setState(n=>{const i=!r,o=i?n.requests:ss(n.requests);return{showAll:i,selectedIndex:o.length>0?o.length-1:null}}),fetch("/api/preferences",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filterIrrelevant:r})}).catch(()=>{})});$t(this,"handleTabChange",r=>{this.setState({currentTab:r})});$t(this,"handleResize",r=>{const n=this.mainContainerRef.current;if(!n)return;const i=n.getBoundingClientRect(),o=r-i.left;o>=250&&o<=800&&this.setState({leftPanelWidth:o})});$t(this,"handleImportLocalLogs",()=>{this.setState({importModalVisible:!0,localLogsLoading:!0}),fetch("/api/local-logs").then(r=>r.json()).then(r=>{const{_currentProject:n,...i}=r;this.setState({localLogs:i,currentProject:n||"",localLogsLoading:!1})}).catch(()=>{this.setState({localLogs:{},localLogsLoading:!1})})});$t(this,"handleCloseImportModal",()=>{this.setState({importModalVisible:!1,selectedLogs:new Set})});$t(this,"handleToggleLogSelect",(r,n)=>{this.setState(i=>{const o=new Set(i.selectedLogs);return n?o.add(r):o.delete(r),{selectedLogs:o}})});$t(this,"handleMergeLogs",()=>{const{selectedLogs:r,localLogs:n,currentProject:i}=this.state;if(r.size<2)return;const o=n[i];if(!o)return;const a=[];if(o.forEach((d,f)=>{r.has(d.file)&&a.push(f)}),a.sort((d,f)=>d-f),r.has(o[0].file)){Li.warning(we("ui.mergeLatestNotAllowed"));return}for(let d=1;d<a.length;d++)if(a[d]-a[d-1]!==1){Li.warning(we("ui.mergeNotConsecutive"));return}if(a.reduce((d,f)=>d+o[f].size,0)>500*1024*1024){Li.warning(we("ui.mergeTooLarge"));return}const u=a.map(d=>o[d].file).reverse();fetch("/api/merge-logs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:u})}).then(d=>d.json()).then(d=>{d.ok?(Li.success(we("ui.mergeSuccess")),this.setState({selectedLogs:new Set}),this.handleImportLocalLogs()):Li.error(d.error||"Merge failed")}).catch(()=>Li.error("Merge failed"))});$t(this,"handleOpenLogFile",r=>{const n=window.location.port||window.location.host.split(":")[1]||"7008";window.open(`${window.location.protocol}//${window.location.hostname}:${n}?logfile=${encodeURIComponent(r)}`,"_blank"),this.setState({importModalVisible:!1})});$t(this,"handleResumeChoice",r=>{fetch("/api/resume-choice",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({choice:r})}).catch(n=>console.error("resume-choice failed:",n))});$t(this,"handleLoadLocalJsonlFile",()=>{const r=document.createElement("input");r.type="file",r.accept=".jsonl",r.onchange=n=>{const i=n.target.files[0];if(!i)return;if(i.size>500*1024*1024){Li.error(we("ui.fileTooLarge"));return}this.setState({fileLoading:!0,fileLoadingCount:0});const o=new FileReader;o.onload=a=>{try{const u=a.target.result.split(`
604
+ ---
605
+ `).filter(d=>d.trim()).map(d=>{try{return JSON.parse(d)}catch{return null}}).filter(Boolean);if(u.length===0){Li.error(we("ui.noLogs")),this.setState({fileLoading:!1,fileLoadingCount:0});return}this.animateLoadingCount(u.length,()=>{let d=[];for(const p of u)Wn(p)&&p.body&&Array.isArray(p.body.messages)&&(d=this.mergeMainAgentSessions(d,p));const f=ss(u);this._isLocalLog=!0,this._localLogFile=i.name,this.eventSource&&(this.eventSource.close(),this.eventSource=null),this.setState({requests:u,selectedIndex:f.length>0?f.length-1:null,mainAgentSessions:d,importModalVisible:!1,fileLoading:!1,fileLoadingCount:0})})}catch{Li.error(we("ui.noLogs")),this.setState({fileLoading:!1,fileLoadingCount:0})}},o.readAsText(i)},r.click()});const n=parseInt(localStorage.getItem("ccv_cacheExpireAt"),10)||null,i=localStorage.getItem("ccv_cacheType")||null,o=Date.now(),a=n&&n>o?n:null,c=a?i:null;this.state={requests:[],selectedIndex:null,viewMode:"raw",currentTab:"request",cacheExpireAt:a,cacheType:c,leftPanelWidth:380,mainAgentSessions:[],importModalVisible:!1,localLogs:{},localLogsLoading:!1,showAll:!1,lang:Xl(),userProfile:null,projectName:"",resumeModalVisible:!1,resumeFileName:"",collapseToolResults:!0,expandThinking:!0,expandDiff:!1,fileLoading:!1,fileLoadingCount:0,selectedLogs:new Set,githubStars:null,cliMode:!1,terminalVisible:!0},this.eventSource=null,this._autoSelectTimer=null,this.mainContainerRef=Q.createRef()}componentDidMount(){fetch("/api/preferences").then(i=>i.json()).then(i=>{i.lang&&(rb(i.lang),this.setState({lang:i.lang})),i.collapseToolResults!==void 0&&this.setState({collapseToolResults:!!i.collapseToolResults}),i.expandThinking!==void 0&&this.setState({expandThinking:!!i.expandThinking}),i.expandDiff!==void 0&&this.setState({expandDiff:!!i.expandDiff});const o=i.filterIrrelevant!==void 0?!!i.filterIrrelevant:!0;this.setState({showAll:!o})}).catch(()=>{}),fetch("/api/user-profile").then(i=>i.json()).then(i=>this.setState({userProfile:i})).catch(()=>{}),fetch("/api/project-name").then(i=>i.json()).then(i=>this.setState({projectName:i.projectName||""})).catch(()=>{}),fetch("https://api.github.com/repos/weiesky/cc-viewer").then(i=>i.json()).then(i=>{i.stargazers_count!=null&&this.setState({githubStars:i.stargazers_count})}).catch(()=>{}),fetch("/api/cli-mode").then(i=>i.json()).then(i=>{i.cliMode&&this.setState({cliMode:!0,viewMode:"chat"})}).catch(()=>{});const n=new URLSearchParams(window.location.search).get("logfile");n?this.loadLocalLogFile(n):this.initSSE()}componentWillUnmount(){this.eventSource&&this.eventSource.close(),this._autoSelectTimer&&clearTimeout(this._autoSelectTimer),this._loadingCountTimer&&cancelAnimationFrame(this._loadingCountTimer)}animateLoadingCount(r,n){const i=Math.min(800,Math.max(300,r*.5)),o=performance.now(),a=c=>{const u=Math.min((c-o)/i,1),d=Math.round(u*r);this.setState({fileLoadingCount:d}),u<1?this._loadingCountTimer=requestAnimationFrame(a):(this._loadingCountTimer=null,n())};this._loadingCountTimer=requestAnimationFrame(a)}initSSE(){this.setState({fileLoading:!0,fileLoadingCount:0});try{this.eventSource=new EventSource("/events"),this.eventSource.onmessage=r=>this.handleEventMessage(r),this.eventSource.addEventListener("resume_prompt",r=>{try{const n=JSON.parse(r.data);this.setState({resumeModalVisible:!0,resumeFileName:n.recentFileName||""})}catch{}}),this.eventSource.addEventListener("resume_resolved",()=>{this.setState({resumeModalVisible:!1,resumeFileName:""})}),this.eventSource.addEventListener("update_completed",r=>{try{const n=JSON.parse(r.data);this.setState({updateInfo:{type:"completed",version:n.version}})}catch{}}),this.eventSource.addEventListener("update_major_available",r=>{try{const n=JSON.parse(r.data);this.setState({updateInfo:{type:"major",version:n.version}})}catch{}}),this.eventSource.addEventListener("full_reload",r=>{try{const n=JSON.parse(r.data);if(Array.isArray(n)){this.assignMessageTimestamps(n);const i=this.buildSessionsFromEntries(n),o=ss(n);n.length>0?this.animateLoadingCount(n.length,()=>{this.setState({requests:n,selectedIndex:o.length>0?o.length-1:null,mainAgentSessions:i,fileLoading:!1,fileLoadingCount:0})}):this.setState({requests:n,selectedIndex:null,mainAgentSessions:i,fileLoading:!1,fileLoadingCount:0})}else this.setState({fileLoading:!1,fileLoadingCount:0})}catch{this.setState({fileLoading:!1,fileLoadingCount:0})}}),this.eventSource.onerror=()=>console.error("SSE连接错误")}catch(r){console.error("EventSource初始化失败:",r),this.setState({fileLoading:!1,fileLoadingCount:0})}}loadLocalLogFile(r){this._isLocalLog=!0,this._localLogFile=r,this.setState({fileLoading:!0,fileLoadingCount:0}),fetch(`/api/local-log?file=${encodeURIComponent(r)}`).then(n=>n.json()).then(n=>{Array.isArray(n)?this.animateLoadingCount(n.length,()=>{this.assignMessageTimestamps(n);const i=this.buildSessionsFromEntries(n),o=ss(n);this.setState({requests:n,selectedIndex:o.length>0?o.length-1:null,mainAgentSessions:i,fileLoading:!1,fileLoadingCount:0})}):this.setState({fileLoading:!1,fileLoadingCount:0})}).catch(n=>{console.error("加载日志文件失败:",n),this.setState({fileLoading:!1,fileLoadingCount:0})})}handleEventMessage(r){try{const n=JSON.parse(r.data);this.setState(i=>{var p,g;const o=[...i.requests],a=o.findIndex(v=>v.timestamp===n.timestamp&&v.url===n.url);a>=0?o[a]=n:o.push(n);let c=i.cacheExpireAt,u=i.cacheType;if(Wn(n)){const v=(g=(p=n.response)==null?void 0:p.body)==null?void 0:g.usage;if(v!=null&&v.cache_creation){const b=v.cache_creation,S=n.timestamp?new Date(n.timestamp).getTime():Date.now();let _=null,C=null;if(b.ephemeral_1h_input_tokens>0?(_=S+3600*1e3,C="1h"):b.ephemeral_5m_input_tokens>0&&(_=S+300*1e3,C="5m"),_&&_>Date.now()){c=_;const x=(v.cache_read_input_tokens||0)+(v.cache_creation_input_tokens||0);u=x>0?ln(x):C,localStorage.setItem("ccv_cacheExpireAt",String(c)),localStorage.setItem("ccv_cacheType",u)}}}let d=i.mainAgentSessions;if(Wn(n)&&n.body&&Array.isArray(n.body.messages)){const v=n.timestamp||new Date().toISOString(),b=d.length>0?d[d.length-1]:null,S=(b==null?void 0:b.messages)||[],_=n.body.messages,C=S.length,x=C>0&&_.length<C*.5&&C-_.length>4;for(let E=0;E<_.length;E++)!x&&E<C&&S[E]._timestamp?_[E]._timestamp=S[E]._timestamp:_[E]._timestamp||(_[E]._timestamp=v);d=this.mergeMainAgentSessions(i.mainAgentSessions,n)}return i.selectedIndex===null&&o.length>0&&(this._autoSelectTimer&&clearTimeout(this._autoSelectTimer),this._autoSelectTimer=setTimeout(()=>{this.setState(v=>{if(v.selectedIndex===null&&v.requests.length>0){const b=v.showAll?v.requests:ss(v.requests);return b.length>0?{selectedIndex:b.length-1}:null}return null})},200)),{requests:o,cacheExpireAt:c,cacheType:u,mainAgentSessions:d}})}catch(n){console.error("处理事件消息失败:",n)}}assignMessageTimestamps(r){var o;let n=[],i=null;for(const a of r){if(!Wn(a)||!a.body||!Array.isArray(a.body.messages))continue;const c=a.body.messages,u=c.length,d=((o=a.body.metadata)==null?void 0:o.user_id)||null,f=a.timestamp||new Date().toISOString(),p=n.length;p>0&&(u<p*.5&&p-u>4||i&&d&&d!==i)&&(n=[]);for(let v=n.length;v<u;v++)n.push(f);for(let v=0;v<u;v++)c[v]._timestamp=n[v];i=d}}buildSessionsFromEntries(r){let n=[];for(const i of r)Wn(i)&&i.body&&Array.isArray(i.body.messages)&&(n=this.mergeMainAgentSessions(n,i));return n}mergeMainAgentSessions(r,n){var p;const i=n.body.messages,o=n.response,a=((p=n.body.metadata)==null?void 0:p.user_id)||null,c=n.timestamp||null;if(r.length===0)return[{userId:a,messages:i,response:o,entryTimestamp:c}];const u=r[r.length-1],d=u.messages?u.messages.length:0,f=d>0&&i.length<d*.5&&d-i.length>4;if(a&&a===u.userId&&!f){const g=[...r];return g[g.length-1]={userId:a,messages:i,response:o,entryTimestamp:c},g}else return[...r,{userId:a,messages:i,response:o,entryTimestamp:c}]}formatTimestamp(r){return!r||r.length<15?r:`${r.slice(0,4)}-${r.slice(4,6)}-${r.slice(6,8)} ${r.slice(9,11)}:${r.slice(11,13)}:${r.slice(13,15)}`}formatSize(r){return r<1024?r+" B":r<1024*1024?(r/1024).toFixed(1)+" KB":(r/(1024*1024)).toFixed(1)+" MB"}render(){const{requests:r,selectedIndex:n,viewMode:i,currentTab:o,cacheExpireAt:a,cacheType:c,leftPanelWidth:u,mainAgentSessions:d,showAll:f,fileLoading:p,fileLoadingCount:g}=this.state,v=f?r:ss(r),b=n!==null?v[n]:null;return $.jsxs(Ko,{theme:{algorithm:rH.darkAlgorithm,token:{colorBgContainer:"#111",colorBgLayout:"#0a0a0a",colorBgElevated:"#1a1a1a",colorBorder:"#2a2a2a"}},children:[p&&$.jsx("div",{className:Ut.loadingOverlay,children:$.jsxs("div",{className:Ut.loadingText,children:["Loading...(",g,")"]})}),$.jsxs(Vs,{className:Ut.layout,children:[$.jsx(Vs.Header,{className:Ut.header,children:$.jsx(h0,{requestCount:v.length,requests:v,viewMode:i,cacheExpireAt:a,cacheType:c,onToggleViewMode:this.handleToggleViewMode,onLangChange:this.handleLangChange,onImportLocalLogs:this.handleImportLocalLogs,isLocalLog:!!this._isLocalLog,localLogFile:this._localLogFile,projectName:this.state.projectName,collapseToolResults:this.state.collapseToolResults,onCollapseToolResultsChange:this.handleCollapseToolResultsChange,expandThinking:this.state.expandThinking,onExpandThinkingChange:this.handleExpandThinkingChange,expandDiff:this.state.expandDiff,onExpandDiffChange:this.handleExpandDiffChange,filterIrrelevant:!this.state.showAll,onFilterIrrelevantChange:this.handleFilterIrrelevantChange,updateInfo:this.state.updateInfo,onDismissUpdate:()=>this.setState({updateInfo:null}),cliMode:this.state.cliMode,terminalVisible:this.state.terminalVisible,onToggleTerminal:()=>this.setState(S=>({terminalVisible:!S.terminalVisible}))})}),$.jsxs(Vs.Content,{className:Ut.content,children:[i==="raw"&&(v.length===0?$.jsx("div",{className:Ut.guideContainer,children:$.jsxs("div",{className:Ut.guideContent,children:[$.jsx("div",{className:Ut.guideIcon,children:$.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",children:[$.jsx("circle",{cx:"24",cy:"24",r:"23",stroke:"#333",strokeWidth:"2",strokeDasharray:"4 4"}),$.jsx("path",{d:"M16 24h16M24 16v16",stroke:"#555",strokeWidth:"2",strokeLinecap:"round"})]})}),$.jsx("h2",{className:Ut.guideTitle,children:we("ui.guide.title")}),$.jsxs("div",{className:Ut.guideStep,children:[$.jsx("div",{className:Ut.guideStepNum,children:"1"}),$.jsxs("div",{className:Ut.guideStepBody,children:[$.jsx("p",{className:Ut.guideText,children:we("ui.guide.step1")}),$.jsx("code",{className:Ut.guideCode,children:we("ui.guide.exampleQuestion")})]})]}),$.jsxs("div",{className:Ut.guideStep,children:[$.jsx("div",{className:Ut.guideStepNum,children:"2"}),$.jsxs("div",{className:Ut.guideStepBody,children:[$.jsx("p",{className:Ut.guideText,children:we("ui.guide.step2")}),$.jsx("code",{className:Ut.guideCode,children:we("ui.guide.troubleshootCmd")})]})]}),$.jsxs("div",{className:Ut.guideStep,children:[$.jsx("div",{className:Ut.guideStepNum,children:"3"}),$.jsxs("div",{className:Ut.guideStepBody,children:[$.jsx("p",{className:Ut.guideText,children:we("ui.guide.step3")}),$.jsx("code",{className:Ut.guideCode,children:"npm install -g @anthropic-ai/claude-code"})]})]})]})}):$.jsxs("div",{ref:this.mainContainerRef,className:Ut.mainContainer,children:[$.jsxs("div",{className:Ut.leftPanel,style:{width:u},children:[$.jsxs("div",{className:Ut.leftPanelHeader,children:[$.jsx("span",{children:we("ui.requestList")}),$.jsx("span",{className:Ut.leftPanelCount,children:we("ui.totalRequests",{count:v.length})})]}),$.jsx("div",{className:Ut.leftPanelBody,children:$.jsx(QV,{requests:v,selectedIndex:n,scrollCenter:this.state.scrollCenter,onSelect:this.handleSelectRequest,onScrollDone:()=>this.setState({scrollCenter:!1})})})]}),$.jsx(_J,{onResize:this.handleResize}),$.jsx("div",{className:Ut.rightPanel,children:$.jsx(UU,{request:b,requests:v,selectedIndex:n,currentTab:o,onTabChange:this.handleTabChange,onViewInChat:this.handleViewInChat,expandDiff:this.state.expandDiff})})]})),$.jsx("div",{style:{display:i==="chat"?"flex":"none",height:"100%",flexDirection:"column"},children:$.jsx(vJ,{requests:v,mainAgentSessions:d,userProfile:this.state.userProfile,collapseToolResults:this.state.collapseToolResults,expandThinking:this.state.expandThinking,onViewRequest:this.handleViewRequest,scrollToTimestamp:this.state.chatScrollToTs,onScrollTsDone:()=>this.setState({chatScrollToTs:null}),cliMode:this.state.cliMode,terminalVisible:this.state.terminalVisible})})]}),$.jsx("div",{className:Ut.footer,children:$.jsxs("div",{className:Ut.footerRight,children:[$.jsxs("a",{href:"https://github.com/weiesky/cc-viewer",target:"_blank",rel:"noopener noreferrer",className:Ut.footerLink,children:[$.jsx("svg",{className:Ut.footerIcon,viewBox:"0 0 16 16",fill:"currentColor",children:$.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})}),"GitHub",this.state.githubStars!=null?` ★ ${this.state.githubStars}`:""]}),$.jsx("span",{className:Ut.footerDivider,children:"|"}),$.jsx("a",{href:"dingtalk://dingtalkclient/action/sendmsg?dingtalk_id=sthk5es",className:Ut.footerLink,children:we("ui.footer.contact")})]})})]}),$.jsx(ki,{title:we("ui.resume.title"),open:this.state.resumeModalVisible,closable:!1,maskClosable:!1,keyboard:!1,footer:[$.jsx(cn,{type:"primary",onClick:()=>this.handleResumeChoice("continue"),children:we("ui.resume.continue")},"continue"),$.jsx(cn,{onClick:()=>this.handleResumeChoice("new"),children:we("ui.resume.new")},"new")],children:$.jsx("p",{children:we("ui.resume.message",{file:this.state.resumeFileName})})}),$.jsxs(ki,{title:we("ui.importLocalLogs"),open:this.state.importModalVisible,onCancel:this.handleCloseImportModal,footer:null,width:1e3,styles:{body:{maxHeight:"60vh",overflow:"auto"}},children:[$.jsxs("div",{className:Ut.modalActions,children:[$.jsx(cn,{icon:$.jsx(vF,{}),onClick:this.handleLoadLocalJsonlFile,children:we("ui.loadLocalJsonl")}),$.jsx(cn,{size:"small",type:this.state.selectedLogs.size>1?"primary":"default",disabled:this.state.selectedLogs.size<2,onClick:this.handleMergeLogs,style:{marginLeft:8},children:we("ui.mergeLogs")})]}),this.state.localLogsLoading?$.jsx("div",{className:Ut.spinCenter,children:$.jsx(Ta,{})}):(()=>{const S=this.state.localLogs[this.state.currentProject];return!S||S.length===0?$.jsx("div",{className:Ut.emptyCenter,children:we("ui.noLogs")}):$.jsx("div",{className:Ut.logListContainer,children:$.jsx(Eu,{size:"small",dataSource:S,renderItem:_=>$.jsx(Eu.Item,{className:Ut.logListItem,onClick:()=>{const C=!this.state.selectedLogs.has(_.file);this.handleToggleLogSelect(_.file,C)},children:$.jsxs("div",{className:Ut.logItemRow,children:[$.jsxs("span",{children:[$.jsx(Ky,{className:Ut.logCheckbox,checked:this.state.selectedLogs.has(_.file)||!1,onClick:C=>C.stopPropagation(),onChange:C=>{C.stopPropagation(),this.handleToggleLogSelect(_.file,C.target.checked)}}),$.jsx(lu,{className:Ut.logFileIcon}),$.jsx("span",{className:Ut.logFileName,children:this.formatTimestamp(_.timestamp)})]}),$.jsxs("span",{children:[$.jsxs(Ai,{style:{background:"#0a0a0a",border:"1px solid #444",color:"#999"},children:[_.turns||0," ",we("ui.turns")]}),$.jsx(Ai,{style:{background:"#0a0a0a",border:"1px solid #444",color:"#999"},children:this.formatSize(_.size)}),$.jsx(cn,{size:"small",type:"primary",onClick:C=>{C.stopPropagation(),this.handleOpenLogFile(_.file)},children:we("ui.openLog")})]})]})})})})})()]})]})}}const rQ=Z3.createRoot(document.getElementById("root"));rQ.render($.jsx(tQ,{}));