var ETe=Object.defineProperty;var RTe=(e,t,r)=>t in e?ETe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ae=(e,t,r)=>RTe(e,typeof t!="symbol"?t+"":t,r);function noe(e,t){for(var r=0;rn[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function ux(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var qL={exports:{}},zb={},YL={exports:{}},tn={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var G7;function PTe(){if(G7)return tn;G7=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"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),d=Symbol.iterator;function h(V){return V===null||typeof V!="object"?null:(V=d&&V[d]||V["@@iterator"],typeof V=="function"?V:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,g={};function m(V,G,K){this.props=V,this.context=G,this.refs=g,this.updater=K||p}m.prototype.isReactComponent={},m.prototype.setState=function(V,G){if(typeof V!="object"&&typeof V!="function"&&V!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,V,G,"setState")},m.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function v(){}v.prototype=m.prototype;function b(V,G,K){this.props=V,this.context=G,this.refs=g,this.updater=K||p}var S=b.prototype=new v;S.constructor=b,f(S,m.prototype),S.isPureReactComponent=!0;var x=Array.isArray,T=Object.prototype.hasOwnProperty,R={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function M(V,G,K){var q,Y={},X=null,le=null;if(G!=null)for(q in G.ref!==void 0&&(le=G.ref),G.key!==void 0&&(X=""+G.key),G)T.call(G,q)&&!E.hasOwnProperty(q)&&(Y[q]=G[q]);var re=arguments.length-2;if(re===1)Y.children=K;else if(1>>1,G=N[V];if(0>>1;Vi(Y,U))Xi(le,Y)?(N[V]=le,N[X]=U,V=X):(N[V]=Y,N[q]=U,V=q);else if(Xi(le,U))N[V]=le,N[X]=U,V=X;else break e}}return z}function i(N,z){var U=N.sortIndex-z.sortIndex;return U!==0?U:N.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],u=1,d=null,h=3,p=!1,f=!1,g=!1,m=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(N){for(var z=r(c);z!==null;){if(z.callback===null)n(c);else if(z.startTime<=N)n(c),z.sortIndex=z.expirationTime,t(l,z);else break;z=r(c)}}function x(N){if(g=!1,S(N),!f)if(r(l)!==null)f=!0,B(T);else{var z=r(c);z!==null&&H(x,z.startTime-N)}}function T(N,z){f=!1,g&&(g=!1,v(M),M=-1),p=!0;var U=h;try{for(S(z),d=r(l);d!==null&&(!(d.expirationTime>z)||N&&!I());){var V=d.callback;if(typeof V=="function"){d.callback=null,h=d.priorityLevel;var G=V(d.expirationTime<=z);z=e.unstable_now(),typeof G=="function"?d.callback=G:d===r(l)&&n(l),S(z)}else n(l);d=r(l)}if(d!==null)var K=!0;else{var q=r(c);q!==null&&H(x,q.startTime-z),K=!1}return K}finally{d=null,h=U,p=!1}}var R=!1,E=null,M=-1,D=5,A=-1;function I(){return!(e.unstable_now()-AN||125V?(N.sortIndex=U,t(c,N),r(l)===null&&N===r(c)&&(g?(v(M),M=-1):g=!0,H(x,U-V))):(N.sortIndex=G,t(l,N),f||p||(f=!0,B(T))),N},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(N){var z=h;return function(){var U=h;h=z;try{return N.apply(this,arguments)}finally{h=U}}}})(JL)),JL}var U7;function ATe(){return U7||(U7=1,ZL.exports=DTe()),ZL.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var j7;function FTe(){if(j7)return $s;j7=1;var e=xH(),t=ATe();function r(C){for(var w="https://reactjs.org/docs/error-decoder.html?invariant="+C,P=1;P"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,c=/^[: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]*$/,u={},d={};function h(C){return l.call(d,C)?!0:l.call(u,C)?!1:c.test(C)?d[C]=!0:(u[C]=!0,!1)}function p(C,w,P,L){if(P!==null&&P.type===0)return!1;switch(typeof w){case"function":case"symbol":return!0;case"boolean":return L?!1:P!==null?!P.acceptsBooleans:(C=C.toLowerCase().slice(0,5),C!=="data-"&&C!=="aria-");default:return!1}}function f(C,w,P,L){if(w===null||typeof w>"u"||p(C,w,P,L))return!0;if(L)return!1;if(P!==null)switch(P.type){case 3:return!w;case 4:return w===!1;case 5:return isNaN(w);case 6:return isNaN(w)||1>w}return!1}function g(C,w,P,L,$,W,J){this.acceptsBooleans=w===2||w===3||w===4,this.attributeName=L,this.attributeNamespace=$,this.mustUseProperty=P,this.propertyName=C,this.type=w,this.sanitizeURL=W,this.removeEmptyString=J}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(C){m[C]=new g(C,0,!1,C,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(C){var w=C[0];m[w]=new g(w,1,!1,C[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(C){m[C]=new g(C,2,!1,C.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(C){m[C]=new g(C,2,!1,C,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(C){m[C]=new g(C,3,!1,C.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(C){m[C]=new g(C,3,!0,C,null,!1,!1)}),["capture","download"].forEach(function(C){m[C]=new g(C,4,!1,C,null,!1,!1)}),["cols","rows","size","span"].forEach(function(C){m[C]=new g(C,6,!1,C,null,!1,!1)}),["rowSpan","start"].forEach(function(C){m[C]=new g(C,5,!1,C.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function b(C){return C[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(C){var w=C.replace(v,b);m[w]=new g(w,1,!1,C,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(C){var w=C.replace(v,b);m[w]=new g(w,1,!1,C,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(C){var w=C.replace(v,b);m[w]=new g(w,1,!1,C,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(C){m[C]=new g(C,1,!1,C.toLowerCase(),null,!1,!1)}),m.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(C){m[C]=new g(C,1,!1,C.toLowerCase(),null,!0,!0)});function S(C,w,P,L){var $=m.hasOwnProperty(w)?m[w]:null;($!==null?$.type!==0:L||!(2ye||$[J]!==W[ye]){var Se=` `+$[J].replace(" at new "," at ");return C.displayName&&Se.includes("")&&(Se=Se.replace("",C.displayName)),Se}while(1<=J&&0<=ye);break}}}finally{K=!1,Error.prepareStackTrace=P}return(C=C?C.displayName||C.name:"")?G(C):""}function Y(C){switch(C.tag){case 5:return G(C.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return C=q(C.type,!1),C;case 11:return C=q(C.type.render,!1),C;case 1:return C=q(C.type,!0),C;default:return""}}function X(C){if(C==null)return null;if(typeof C=="function")return C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case E:return"Fragment";case R:return"Portal";case D:return"Profiler";case M:return"StrictMode";case F:return"Suspense";case O:return"SuspenseList"}if(typeof C=="object")switch(C.$$typeof){case I:return(C.displayName||"Context")+".Consumer";case A:return(C._context.displayName||"Context")+".Provider";case _:var w=C.render;return C=C.displayName,C||(C=w.displayName||w.name||"",C=C!==""?"ForwardRef("+C+")":"ForwardRef"),C;case k:return w=C.displayName||null,w!==null?w:X(C.type)||"Memo";case B:w=C._payload,C=C._init;try{return X(C(w))}catch{}}return null}function le(C){var w=C.type;switch(C.tag){case 24:return"Cache";case 9:return(w.displayName||"Context")+".Consumer";case 10:return(w._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return C=w.render,C=C.displayName||C.name||"",w.displayName||(C!==""?"ForwardRef("+C+")":"ForwardRef");case 7:return"Fragment";case 5:return w;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X(w);case 8:return w===M?"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 w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w}return null}function re(C){switch(typeof C){case"boolean":case"number":case"string":case"undefined":return C;case"object":return C;default:return""}}function ne(C){var w=C.type;return(C=C.nodeName)&&C.toLowerCase()==="input"&&(w==="checkbox"||w==="radio")}function se(C){var w=ne(C)?"checked":"value",P=Object.getOwnPropertyDescriptor(C.constructor.prototype,w),L=""+C[w];if(!C.hasOwnProperty(w)&&typeof P<"u"&&typeof P.get=="function"&&typeof P.set=="function"){var $=P.get,W=P.set;return Object.defineProperty(C,w,{configurable:!0,get:function(){return $.call(this)},set:function(J){L=""+J,W.call(this,J)}}),Object.defineProperty(C,w,{enumerable:P.enumerable}),{getValue:function(){return L},setValue:function(J){L=""+J},stopTracking:function(){C._valueTracker=null,delete C[w]}}}}function de(C){C._valueTracker||(C._valueTracker=se(C))}function te(C){if(!C)return!1;var w=C._valueTracker;if(!w)return!0;var P=w.getValue(),L="";return C&&(L=ne(C)?C.checked?"true":"false":C.value),C=L,C!==P?(w.setValue(C),!0):!1}function ie(C){if(C=C||(typeof document<"u"?document:void 0),typeof C>"u")return null;try{return C.activeElement||C.body}catch{return C.body}}function pe(C,w){var P=w.checked;return U({},w,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:P??C._wrapperState.initialChecked})}function Z(C,w){var P=w.defaultValue==null?"":w.defaultValue,L=w.checked!=null?w.checked:w.defaultChecked;P=re(w.value!=null?w.value:P),C._wrapperState={initialChecked:L,initialValue:P,controlled:w.type==="checkbox"||w.type==="radio"?w.checked!=null:w.value!=null}}function ue(C,w){w=w.checked,w!=null&&S(C,"checked",w,!1)}function ve(C,w){ue(C,w);var P=re(w.value),L=w.type;if(P!=null)L==="number"?(P===0&&C.value===""||C.value!=P)&&(C.value=""+P):C.value!==""+P&&(C.value=""+P);else if(L==="submit"||L==="reset"){C.removeAttribute("value");return}w.hasOwnProperty("value")?me(C,w.type,P):w.hasOwnProperty("defaultValue")&&me(C,w.type,re(w.defaultValue)),w.checked==null&&w.defaultChecked!=null&&(C.defaultChecked=!!w.defaultChecked)}function he(C,w,P){if(w.hasOwnProperty("value")||w.hasOwnProperty("defaultValue")){var L=w.type;if(!(L!=="submit"&&L!=="reset"||w.value!==void 0&&w.value!==null))return;w=""+C._wrapperState.initialValue,P||w===C.value||(C.value=w),C.defaultValue=w}P=C.name,P!==""&&(C.name=""),C.defaultChecked=!!C._wrapperState.initialChecked,P!==""&&(C.name=P)}function me(C,w,P){(w!=="number"||ie(C.ownerDocument)!==C)&&(P==null?C.defaultValue=""+C._wrapperState.initialValue:C.defaultValue!==""+P&&(C.defaultValue=""+P))}var Oe=Array.isArray;function Pe(C,w,P,L){if(C=C.options,w){w={};for(var $=0;$"+w.valueOf().toString()+"",w=Ye.firstChild;C.firstChild;)C.removeChild(C.firstChild);for(;w.firstChild;)C.appendChild(w.firstChild)}});function et(C,w){if(w){var P=C.firstChild;if(P&&P===C.lastChild&&P.nodeType===3){P.nodeValue=w;return}}C.textContent=w}var Ne={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},tt=["Webkit","ms","Moz","O"];Object.keys(Ne).forEach(function(C){tt.forEach(function(w){w=w+C.charAt(0).toUpperCase()+C.substring(1),Ne[w]=Ne[C]})});function nt(C,w,P){return w==null||typeof w=="boolean"||w===""?"":P||typeof w!="number"||w===0||Ne.hasOwnProperty(C)&&Ne[C]?(""+w).trim():w+"px"}function Ke(C,w){C=C.style;for(var P in w)if(w.hasOwnProperty(P)){var L=P.indexOf("--")===0,$=nt(P,w[P],L);P==="float"&&(P="cssFloat"),L?C.setProperty(P,$):C[P]=$}}var Ie=U({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 rt(C,w){if(w){if(Ie[C]&&(w.children!=null||w.dangerouslySetInnerHTML!=null))throw Error(r(137,C));if(w.dangerouslySetInnerHTML!=null){if(w.children!=null)throw Error(r(60));if(typeof w.dangerouslySetInnerHTML!="object"||!("__html"in w.dangerouslySetInnerHTML))throw Error(r(61))}if(w.style!=null&&typeof w.style!="object")throw Error(r(62))}}function Tt(C,w){if(C.indexOf("-")===-1)return typeof w.is=="string";switch(C){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 Rt=null;function Bt(C){return C=C.target||C.srcElement||window,C.correspondingUseElement&&(C=C.correspondingUseElement),C.nodeType===3?C.parentNode:C}var Qt=null,ft=null,ut=null;function Yt(C){if(C=Pb(C)){if(typeof Qt!="function")throw Error(r(280));var w=C.stateNode;w&&(w=K1(w),Qt(C.stateNode,C.type,w))}}function hr(C){ft?ut?ut.push(C):ut=[C]:ft=C}function Je(){if(ft){var C=ft,w=ut;if(ut=ft=null,Yt(C),w)for(C=0;C>>=0,C===0?32:31-(vr(C)/bn|0)|0}var _i=64,$a=4194304;function Ho(C){switch(C&-C){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 C&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return C&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return C}}function Ls(C,w){var P=C.pendingLanes;if(P===0)return 0;var L=0,$=C.suspendedLanes,W=C.pingedLanes,J=P&268435455;if(J!==0){var ye=J&~$;ye!==0?L=Ho(ye):(W&=J,W!==0&&(L=Ho(W)))}else J=P&~$,J!==0?L=Ho(J):W!==0&&(L=Ho(W));if(L===0)return 0;if(w!==0&&w!==L&&(w&$)===0&&($=L&-L,W=w&-w,$>=W||$===16&&(W&4194240)!==0))return w;if((L&4)!==0&&(L|=P&16),w=C.entangledLanes,w!==0)for(C=C.entanglements,w&=L;0P;P++)w.push(C);return w}function da(C,w,P){C.pendingLanes|=w,w!==536870912&&(C.suspendedLanes=0,C.pingedLanes=0),C=C.eventTimes,w=31-vt(w),C[w]=P}function A1(C,w){var P=C.pendingLanes&~w;C.pendingLanes=w,C.suspendedLanes=0,C.pingedLanes=0,C.expiredLanes&=w,C.mutableReadLanes&=w,C.entangledLanes&=w,w=C.entanglements;var L=C.eventTimes;for(C=C.expirationTimes;0=yb),LU=" ",_U=!1;function OU(C,w){switch(C){case"keyup":return b1e.indexOf(w.keyCode)!==-1;case"keydown":return w.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kU(C){return C=C.detail,typeof C=="object"&&"data"in C?C.data:null}var Nm=!1;function w1e(C,w){switch(C){case"compositionend":return kU(w);case"keypress":return w.which!==32?null:(_U=!0,LU);case"textInput":return C=w.data,C===LU&&_U?null:C;default:return null}}function x1e(C,w){if(Nm)return C==="compositionend"||!MF&&OU(C,w)?(C=PU(),k1=wF=eh=null,Nm=!1,C):null;switch(C){case"paste":return null;case"keypress":if(!(w.ctrlKey||w.altKey||w.metaKey)||w.ctrlKey&&w.altKey){if(w.char&&1=w)return{node:P,offset:w-C};C=L}e:{for(;P;){if(P.nextSibling){P=P.nextSibling;break e}P=P.parentNode}P=void 0}P=HU(P)}}function UU(C,w){return C&&w?C===w?!0:C&&C.nodeType===3?!1:w&&w.nodeType===3?UU(C,w.parentNode):"contains"in C?C.contains(w):C.compareDocumentPosition?!!(C.compareDocumentPosition(w)&16):!1:!1}function jU(){for(var C=window,w=ie();w instanceof C.HTMLIFrameElement;){try{var P=typeof w.contentWindow.location.href=="string"}catch{P=!1}if(P)C=w.contentWindow;else break;w=ie(C.document)}return w}function AF(C){var w=C&&C.nodeName&&C.nodeName.toLowerCase();return w&&(w==="input"&&(C.type==="text"||C.type==="search"||C.type==="tel"||C.type==="url"||C.type==="password")||w==="textarea"||C.contentEditable==="true")}function F1e(C){var w=jU(),P=C.focusedElem,L=C.selectionRange;if(w!==P&&P&&P.ownerDocument&&UU(P.ownerDocument.documentElement,P)){if(L!==null&&AF(P)){if(w=L.start,C=L.end,C===void 0&&(C=w),"selectionStart"in P)P.selectionStart=w,P.selectionEnd=Math.min(C,P.value.length);else if(C=(w=P.ownerDocument||document)&&w.defaultView||window,C.getSelection){C=C.getSelection();var $=P.textContent.length,W=Math.min(L.start,$);L=L.end===void 0?W:Math.min(L.end,$),!C.extend&&W>L&&($=L,L=W,W=$),$=WU(P,W);var J=WU(P,L);$&&J&&(C.rangeCount!==1||C.anchorNode!==$.node||C.anchorOffset!==$.offset||C.focusNode!==J.node||C.focusOffset!==J.offset)&&(w=w.createRange(),w.setStart($.node,$.offset),C.removeAllRanges(),W>L?(C.addRange(w),C.extend(J.node,J.offset)):(w.setEnd(J.node,J.offset),C.addRange(w)))}}for(w=[],C=P;C=C.parentNode;)C.nodeType===1&&w.push({element:C,left:C.scrollLeft,top:C.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P=document.documentMode,Bm=null,FF=null,wb=null,LF=!1;function KU(C,w,P){var L=P.window===P?P.document:P.nodeType===9?P:P.ownerDocument;LF||Bm==null||Bm!==ie(L)||(L=Bm,"selectionStart"in L&&AF(L)?L={start:L.selectionStart,end:L.selectionEnd}:(L=(L.ownerDocument&&L.ownerDocument.defaultView||window).getSelection(),L={anchorNode:L.anchorNode,anchorOffset:L.anchorOffset,focusNode:L.focusNode,focusOffset:L.focusOffset}),wb&&Sb(wb,L)||(wb=L,L=W1(FF,"onSelect"),0Hm||(C.current=UF[Hm],UF[Hm]=null,Hm--)}function Vn(C,w){Hm++,UF[Hm]=C.current,C.current=w}var ih={},Wo=nh(ih),_s=nh(!1),rf=ih;function Wm(C,w){var P=C.type.contextTypes;if(!P)return ih;var L=C.stateNode;if(L&&L.__reactInternalMemoizedUnmaskedChildContext===w)return L.__reactInternalMemoizedMaskedChildContext;var $={},W;for(W in P)$[W]=w[W];return L&&(C=C.stateNode,C.__reactInternalMemoizedUnmaskedChildContext=w,C.__reactInternalMemoizedMaskedChildContext=$),$}function Os(C){return C=C.childContextTypes,C!=null}function q1(){qn(_s),qn(Wo)}function l8(C,w,P){if(Wo.current!==ih)throw Error(r(168));Vn(Wo,w),Vn(_s,P)}function c8(C,w,P){var L=C.stateNode;if(w=w.childContextTypes,typeof L.getChildContext!="function")return P;L=L.getChildContext();for(var $ in L)if(!($ in w))throw Error(r(108,le(C)||"Unknown",$));return U({},P,L)}function Y1(C){return C=(C=C.stateNode)&&C.__reactInternalMemoizedMergedChildContext||ih,rf=Wo.current,Vn(Wo,C),Vn(_s,_s.current),!0}function u8(C,w,P){var L=C.stateNode;if(!L)throw Error(r(169));P?(C=c8(C,w,rf),L.__reactInternalMemoizedMergedChildContext=C,qn(_s),qn(Wo),Vn(Wo,C)):qn(_s),Vn(_s,P)}var _u=null,X1=!1,jF=!1;function d8(C){_u===null?_u=[C]:_u.push(C)}function W1e(C){X1=!0,d8(C)}function oh(){if(!jF&&_u!==null){jF=!0;var C=0,w=vn;try{var P=_u;for(vn=1;C>=J,$-=J,Ou=1<<32-vt(w)+$|P<<$|L,ku=W+C}else Ou=1<Dr?(go=wr,wr=null):go=wr.sibling;var yn=at(Le,wr,Be[Dr],xt);if(yn===null){wr===null&&(wr=go);break}C&&wr&&yn.alternate===null&&w(Le,wr),Re=W(yn,Re,Dr),Sr===null?ur=yn:Sr.sibling=yn,Sr=yn,wr=go}if(Dr===Be.length)return P(Le,wr),ri&&of(Le,Dr),ur;if(wr===null){for(;DrDr?(go=wr,wr=null):go=wr.sibling;var fh=at(Le,wr,yn.value,xt);if(fh===null){wr===null&&(wr=go);break}C&&wr&&fh.alternate===null&&w(Le,wr),Re=W(fh,Re,Dr),Sr===null?ur=fh:Sr.sibling=fh,Sr=fh,wr=go}if(yn.done)return P(Le,wr),ri&&of(Le,Dr),ur;if(wr===null){for(;!yn.done;Dr++,yn=Be.next())yn=yt(Le,yn.value,xt),yn!==null&&(Re=W(yn,Re,Dr),Sr===null?ur=yn:Sr.sibling=yn,Sr=yn);return ri&&of(Le,Dr),ur}for(wr=L(Le,wr);!yn.done;Dr++,yn=Be.next())yn=Jt(wr,Le,Dr,yn.value,xt),yn!==null&&(C&&yn.alternate!==null&&wr.delete(yn.key===null?Dr:yn.key),Re=W(yn,Re,Dr),Sr===null?ur=yn:Sr.sibling=yn,Sr=yn);return C&&wr.forEach(function(TTe){return w(Le,TTe)}),ri&&of(Le,Dr),ur}function xi(Le,Re,Be,xt){if(typeof Be=="object"&&Be!==null&&Be.type===E&&Be.key===null&&(Be=Be.props.children),typeof Be=="object"&&Be!==null){switch(Be.$$typeof){case T:e:{for(var ur=Be.key,Sr=Re;Sr!==null;){if(Sr.key===ur){if(ur=Be.type,ur===E){if(Sr.tag===7){P(Le,Sr.sibling),Re=$(Sr,Be.props.children),Re.return=Le,Le=Re;break e}}else if(Sr.elementType===ur||typeof ur=="object"&&ur!==null&&ur.$$typeof===B&&v8(ur)===Sr.type){P(Le,Sr.sibling),Re=$(Sr,Be.props),Re.ref=Mb(Le,Sr,Be),Re.return=Le,Le=Re;break e}P(Le,Sr);break}else w(Le,Sr);Sr=Sr.sibling}Be.type===E?(Re=pf(Be.props.children,Le.mode,xt,Be.key),Re.return=Le,Le=Re):(xt=TT(Be.type,Be.key,Be.props,null,Le.mode,xt),xt.ref=Mb(Le,Re,Be),xt.return=Le,Le=xt)}return J(Le);case R:e:{for(Sr=Be.key;Re!==null;){if(Re.key===Sr)if(Re.tag===4&&Re.stateNode.containerInfo===Be.containerInfo&&Re.stateNode.implementation===Be.implementation){P(Le,Re.sibling),Re=$(Re,Be.children||[]),Re.return=Le,Le=Re;break e}else{P(Le,Re);break}else w(Le,Re);Re=Re.sibling}Re=HL(Be,Le.mode,xt),Re.return=Le,Le=Re}return J(Le);case B:return Sr=Be._init,xi(Le,Re,Sr(Be._payload),xt)}if(Oe(Be))return ir(Le,Re,Be,xt);if(z(Be))return sr(Le,Re,Be,xt);eT(Le,Be)}return typeof Be=="string"&&Be!==""||typeof Be=="number"?(Be=""+Be,Re!==null&&Re.tag===6?(P(Le,Re.sibling),Re=$(Re,Be),Re.return=Le,Le=Re):(P(Le,Re),Re=zL(Be,Le.mode,xt),Re.return=Le,Le=Re),J(Le)):P(Le,Re)}return xi}var qm=y8(!0),C8=y8(!1),tT=nh(null),rT=null,Ym=null,JF=null;function QF(){JF=Ym=rT=null}function eL(C){var w=tT.current;qn(tT),C._currentValue=w}function tL(C,w,P){for(;C!==null;){var L=C.alternate;if((C.childLanes&w)!==w?(C.childLanes|=w,L!==null&&(L.childLanes|=w)):L!==null&&(L.childLanes&w)!==w&&(L.childLanes|=w),C===P)break;C=C.return}}function Xm(C,w){rT=C,JF=Ym=null,C=C.dependencies,C!==null&&C.firstContext!==null&&((C.lanes&w)!==0&&(ks=!0),C.firstContext=null)}function za(C){var w=C._currentValue;if(JF!==C)if(C={context:C,memoizedValue:w,next:null},Ym===null){if(rT===null)throw Error(r(308));Ym=C,rT.dependencies={lanes:0,firstContext:C}}else Ym=Ym.next=C;return w}var sf=null;function rL(C){sf===null?sf=[C]:sf.push(C)}function b8(C,w,P,L){var $=w.interleaved;return $===null?(P.next=P,rL(w)):(P.next=$.next,$.next=P),w.interleaved=P,Nu(C,L)}function Nu(C,w){C.lanes|=w;var P=C.alternate;for(P!==null&&(P.lanes|=w),P=C,C=C.return;C!==null;)C.childLanes|=w,P=C.alternate,P!==null&&(P.childLanes|=w),P=C,C=C.return;return P.tag===3?P.stateNode:null}var sh=!1;function nL(C){C.updateQueue={baseState:C.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function S8(C,w){C=C.updateQueue,w.updateQueue===C&&(w.updateQueue={baseState:C.baseState,firstBaseUpdate:C.firstBaseUpdate,lastBaseUpdate:C.lastBaseUpdate,shared:C.shared,effects:C.effects})}function Bu(C,w){return{eventTime:C,lane:w,tag:0,payload:null,callback:null,next:null}}function ah(C,w,P){var L=C.updateQueue;if(L===null)return null;if(L=L.shared,(fn&2)!==0){var $=L.pending;return $===null?w.next=w:(w.next=$.next,$.next=w),L.pending=w,Nu(C,P)}return $=L.interleaved,$===null?(w.next=w,rL(L)):(w.next=$.next,$.next=w),L.interleaved=w,Nu(C,P)}function nT(C,w,P){if(w=w.updateQueue,w!==null&&(w=w.shared,(P&4194240)!==0)){var L=w.lanes;L&=C.pendingLanes,P|=L,w.lanes=P,ub(C,P)}}function w8(C,w){var P=C.updateQueue,L=C.alternate;if(L!==null&&(L=L.updateQueue,P===L)){var $=null,W=null;if(P=P.firstBaseUpdate,P!==null){do{var J={eventTime:P.eventTime,lane:P.lane,tag:P.tag,payload:P.payload,callback:P.callback,next:null};W===null?$=W=J:W=W.next=J,P=P.next}while(P!==null);W===null?$=W=w:W=W.next=w}else $=W=w;P={baseState:L.baseState,firstBaseUpdate:$,lastBaseUpdate:W,shared:L.shared,effects:L.effects},C.updateQueue=P;return}C=P.lastBaseUpdate,C===null?P.firstBaseUpdate=w:C.next=w,P.lastBaseUpdate=w}function iT(C,w,P,L){var $=C.updateQueue;sh=!1;var W=$.firstBaseUpdate,J=$.lastBaseUpdate,ye=$.shared.pending;if(ye!==null){$.shared.pending=null;var Se=ye,Ve=Se.next;Se.next=null,J===null?W=Ve:J.next=Ve,J=Se;var ht=C.alternate;ht!==null&&(ht=ht.updateQueue,ye=ht.lastBaseUpdate,ye!==J&&(ye===null?ht.firstBaseUpdate=Ve:ye.next=Ve,ht.lastBaseUpdate=Se))}if(W!==null){var yt=$.baseState;J=0,ht=Ve=Se=null,ye=W;do{var at=ye.lane,Jt=ye.eventTime;if((L&at)===at){ht!==null&&(ht=ht.next={eventTime:Jt,lane:0,tag:ye.tag,payload:ye.payload,callback:ye.callback,next:null});e:{var ir=C,sr=ye;switch(at=w,Jt=P,sr.tag){case 1:if(ir=sr.payload,typeof ir=="function"){yt=ir.call(Jt,yt,at);break e}yt=ir;break e;case 3:ir.flags=ir.flags&-65537|128;case 0:if(ir=sr.payload,at=typeof ir=="function"?ir.call(Jt,yt,at):ir,at==null)break e;yt=U({},yt,at);break e;case 2:sh=!0}}ye.callback!==null&&ye.lane!==0&&(C.flags|=64,at=$.effects,at===null?$.effects=[ye]:at.push(ye))}else Jt={eventTime:Jt,lane:at,tag:ye.tag,payload:ye.payload,callback:ye.callback,next:null},ht===null?(Ve=ht=Jt,Se=yt):ht=ht.next=Jt,J|=at;if(ye=ye.next,ye===null){if(ye=$.shared.pending,ye===null)break;at=ye,ye=at.next,at.next=null,$.lastBaseUpdate=at,$.shared.pending=null}}while(!0);if(ht===null&&(Se=yt),$.baseState=Se,$.firstBaseUpdate=Ve,$.lastBaseUpdate=ht,w=$.shared.interleaved,w!==null){$=w;do J|=$.lane,$=$.next;while($!==w)}else W===null&&($.shared.lanes=0);cf|=J,C.lanes=J,C.memoizedState=yt}}function x8(C,w,P){if(C=w.effects,w.effects=null,C!==null)for(w=0;wP?P:4,C(!0);var L=lL.transition;lL.transition={};try{C(!1),w()}finally{vn=P,lL.transition=L}}function z8(){return Ha().memoizedState}function q1e(C,w,P){var L=dh(C);if(P={lane:L,action:P,hasEagerState:!1,eagerState:null,next:null},H8(C))W8(w,P);else if(P=b8(C,w,P,L),P!==null){var $=fs();kl(P,C,L,$),U8(P,w,L)}}function Y1e(C,w,P){var L=dh(C),$={lane:L,action:P,hasEagerState:!1,eagerState:null,next:null};if(H8(C))W8(w,$);else{var W=C.alternate;if(C.lanes===0&&(W===null||W.lanes===0)&&(W=w.lastRenderedReducer,W!==null))try{var J=w.lastRenderedState,ye=W(J,P);if($.hasEagerState=!0,$.eagerState=ye,Al(ye,J)){var Se=w.interleaved;Se===null?($.next=$,rL(w)):($.next=Se.next,Se.next=$),w.interleaved=$;return}}catch{}finally{}P=b8(C,w,$,L),P!==null&&($=fs(),kl(P,C,L,$),U8(P,w,L))}}function H8(C){var w=C.alternate;return C===ai||w!==null&&w===ai}function W8(C,w){Fb=aT=!0;var P=C.pending;P===null?w.next=w:(w.next=P.next,P.next=w),C.pending=w}function U8(C,w,P){if((P&4194240)!==0){var L=w.lanes;L&=C.pendingLanes,P|=L,w.lanes=P,ub(C,P)}}var uT={readContext:za,useCallback:Uo,useContext:Uo,useEffect:Uo,useImperativeHandle:Uo,useInsertionEffect:Uo,useLayoutEffect:Uo,useMemo:Uo,useReducer:Uo,useRef:Uo,useState:Uo,useDebugValue:Uo,useDeferredValue:Uo,useTransition:Uo,useMutableSource:Uo,useSyncExternalStore:Uo,useId:Uo,unstable_isNewReconciler:!1},X1e={readContext:za,useCallback:function(C,w){return Ic().memoizedState=[C,w===void 0?null:w],C},useContext:za,useEffect:_8,useImperativeHandle:function(C,w,P){return P=P!=null?P.concat([C]):null,lT(4194308,4,N8.bind(null,w,C),P)},useLayoutEffect:function(C,w){return lT(4194308,4,C,w)},useInsertionEffect:function(C,w){return lT(4,2,C,w)},useMemo:function(C,w){var P=Ic();return w=w===void 0?null:w,C=C(),P.memoizedState=[C,w],C},useReducer:function(C,w,P){var L=Ic();return w=P!==void 0?P(w):w,L.memoizedState=L.baseState=w,C={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:C,lastRenderedState:w},L.queue=C,C=C.dispatch=q1e.bind(null,ai,C),[L.memoizedState,C]},useRef:function(C){var w=Ic();return C={current:C},w.memoizedState=C},useState:F8,useDebugValue:gL,useDeferredValue:function(C){return Ic().memoizedState=C},useTransition:function(){var C=F8(!1),w=C[0];return C=K1e.bind(null,C[1]),Ic().memoizedState=C,[w,C]},useMutableSource:function(){},useSyncExternalStore:function(C,w,P){var L=ai,$=Ic();if(ri){if(P===void 0)throw Error(r(407));P=P()}else{if(P=w(),fo===null)throw Error(r(349));(lf&30)!==0||P8(L,w,P)}$.memoizedState=P;var W={value:P,getSnapshot:w};return $.queue=W,_8(I8.bind(null,L,W,C),[C]),L.flags|=2048,Ob(9,M8.bind(null,L,W,P,w),void 0,null),P},useId:function(){var C=Ic(),w=fo.identifierPrefix;if(ri){var P=ku,L=Ou;P=(L&~(1<<32-vt(L)-1)).toString(32)+P,w=":"+w+"R"+P,P=Lb++,0<\/script>",C=C.removeChild(C.firstChild)):typeof L.is=="string"?C=J.createElement(P,{is:L.is}):(C=J.createElement(P),P==="select"&&(J=C,L.multiple?J.multiple=!0:L.size&&(J.size=L.size))):C=J.createElementNS(C,P),C[Pc]=w,C[Rb]=L,d7(C,w,!1,!1),w.stateNode=C;e:{switch(J=Tt(P,L),P){case"dialog":Kn("cancel",C),Kn("close",C),$=L;break;case"iframe":case"object":case"embed":Kn("load",C),$=L;break;case"video":case"audio":for($=0;$tv&&(w.flags|=128,L=!0,kb(W,!1),w.lanes=4194304)}else{if(!L)if(C=oT(J),C!==null){if(w.flags|=128,L=!0,P=C.updateQueue,P!==null&&(w.updateQueue=P,w.flags|=4),kb(W,!0),W.tail===null&&W.tailMode==="hidden"&&!J.alternate&&!ri)return jo(w),null}else 2*rr()-W.renderingStartTime>tv&&P!==1073741824&&(w.flags|=128,L=!0,kb(W,!1),w.lanes=4194304);W.isBackwards?(J.sibling=w.child,w.child=J):(P=W.last,P!==null?P.sibling=J:w.child=J,W.last=J)}return W.tail!==null?(w=W.tail,W.rendering=w,W.tail=w.sibling,W.renderingStartTime=rr(),w.sibling=null,P=si.current,Vn(si,L?P&1|2:P&1),w):(jo(w),null);case 22:case 23:return $L(),L=w.memoizedState!==null,C!==null&&C.memoizedState!==null!==L&&(w.flags|=8192),L&&(w.mode&1)!==0?(ga&1073741824)!==0&&(jo(w),w.subtreeFlags&6&&(w.flags|=8192)):jo(w),null;case 24:return null;case 25:return null}throw Error(r(156,w.tag))}function iTe(C,w){switch(qF(w),w.tag){case 1:return Os(w.type)&&q1(),C=w.flags,C&65536?(w.flags=C&-65537|128,w):null;case 3:return Zm(),qn(_s),qn(Wo),aL(),C=w.flags,(C&65536)!==0&&(C&128)===0?(w.flags=C&-65537|128,w):null;case 5:return oL(w),null;case 13:if(qn(si),C=w.memoizedState,C!==null&&C.dehydrated!==null){if(w.alternate===null)throw Error(r(340));Km()}return C=w.flags,C&65536?(w.flags=C&-65537|128,w):null;case 19:return qn(si),null;case 4:return Zm(),null;case 10:return eL(w.type._context),null;case 22:case 23:return $L(),null;case 24:return null;default:return null}}var fT=!1,Ko=!1,oTe=typeof WeakSet=="function"?WeakSet:Set,nr=null;function Qm(C,w){var P=C.ref;if(P!==null)if(typeof P=="function")try{P(null)}catch(L){fi(C,w,L)}else P.current=null}function PL(C,w,P){try{P()}catch(L){fi(C,w,L)}}var f7=!1;function sTe(C,w){if($F=_1,C=jU(),AF(C)){if("selectionStart"in C)var P={start:C.selectionStart,end:C.selectionEnd};else e:{P=(P=C.ownerDocument)&&P.defaultView||window;var L=P.getSelection&&P.getSelection();if(L&&L.rangeCount!==0){P=L.anchorNode;var $=L.anchorOffset,W=L.focusNode;L=L.focusOffset;try{P.nodeType,W.nodeType}catch{P=null;break e}var J=0,ye=-1,Se=-1,Ve=0,ht=0,yt=C,at=null;t:for(;;){for(var Jt;yt!==P||$!==0&&yt.nodeType!==3||(ye=J+$),yt!==W||L!==0&&yt.nodeType!==3||(Se=J+L),yt.nodeType===3&&(J+=yt.nodeValue.length),(Jt=yt.firstChild)!==null;)at=yt,yt=Jt;for(;;){if(yt===C)break t;if(at===P&&++Ve===$&&(ye=J),at===W&&++ht===L&&(Se=J),(Jt=yt.nextSibling)!==null)break;yt=at,at=yt.parentNode}yt=Jt}P=ye===-1||Se===-1?null:{start:ye,end:Se}}else P=null}P=P||{start:0,end:0}}else P=null;for(GF={focusedElem:C,selectionRange:P},_1=!1,nr=w;nr!==null;)if(w=nr,C=w.child,(w.subtreeFlags&1028)!==0&&C!==null)C.return=w,nr=C;else for(;nr!==null;){w=nr;try{var ir=w.alternate;if((w.flags&1024)!==0)switch(w.tag){case 0:case 11:case 15:break;case 1:if(ir!==null){var sr=ir.memoizedProps,xi=ir.memoizedState,Le=w.stateNode,Re=Le.getSnapshotBeforeUpdate(w.elementType===w.type?sr:Ll(w.type,sr),xi);Le.__reactInternalSnapshotBeforeUpdate=Re}break;case 3:var Be=w.stateNode.containerInfo;Be.nodeType===1?Be.textContent="":Be.nodeType===9&&Be.documentElement&&Be.removeChild(Be.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(xt){fi(w,w.return,xt)}if(C=w.sibling,C!==null){C.return=w.return,nr=C;break}nr=w.return}return ir=f7,f7=!1,ir}function Nb(C,w,P){var L=w.updateQueue;if(L=L!==null?L.lastEffect:null,L!==null){var $=L=L.next;do{if(($.tag&C)===C){var W=$.destroy;$.destroy=void 0,W!==void 0&&PL(w,P,W)}$=$.next}while($!==L)}}function gT(C,w){if(w=w.updateQueue,w=w!==null?w.lastEffect:null,w!==null){var P=w=w.next;do{if((P.tag&C)===C){var L=P.create;P.destroy=L()}P=P.next}while(P!==w)}}function ML(C){var w=C.ref;if(w!==null){var P=C.stateNode;switch(C.tag){case 5:C=P;break;default:C=P}typeof w=="function"?w(C):w.current=C}}function g7(C){var w=C.alternate;w!==null&&(C.alternate=null,g7(w)),C.child=null,C.deletions=null,C.sibling=null,C.tag===5&&(w=C.stateNode,w!==null&&(delete w[Pc],delete w[Rb],delete w[WF],delete w[z1e],delete w[H1e])),C.stateNode=null,C.return=null,C.dependencies=null,C.memoizedProps=null,C.memoizedState=null,C.pendingProps=null,C.stateNode=null,C.updateQueue=null}function m7(C){return C.tag===5||C.tag===3||C.tag===4}function v7(C){e:for(;;){for(;C.sibling===null;){if(C.return===null||m7(C.return))return null;C=C.return}for(C.sibling.return=C.return,C=C.sibling;C.tag!==5&&C.tag!==6&&C.tag!==18;){if(C.flags&2||C.child===null||C.tag===4)continue e;C.child.return=C,C=C.child}if(!(C.flags&2))return C.stateNode}}function IL(C,w,P){var L=C.tag;if(L===5||L===6)C=C.stateNode,w?P.nodeType===8?P.parentNode.insertBefore(C,w):P.insertBefore(C,w):(P.nodeType===8?(w=P.parentNode,w.insertBefore(C,P)):(w=P,w.appendChild(C)),P=P._reactRootContainer,P!=null||w.onclick!==null||(w.onclick=j1));else if(L!==4&&(C=C.child,C!==null))for(IL(C,w,P),C=C.sibling;C!==null;)IL(C,w,P),C=C.sibling}function DL(C,w,P){var L=C.tag;if(L===5||L===6)C=C.stateNode,w?P.insertBefore(C,w):P.appendChild(C);else if(L!==4&&(C=C.child,C!==null))for(DL(C,w,P),C=C.sibling;C!==null;)DL(C,w,P),C=C.sibling}var Mo=null,_l=!1;function lh(C,w,P){for(P=P.child;P!==null;)y7(C,w,P),P=P.sibling}function y7(C,w,P){if(ei&&typeof ei.onCommitFiberUnmount=="function")try{ei.onCommitFiberUnmount(on,P)}catch{}switch(P.tag){case 5:Ko||Qm(P,w);case 6:var L=Mo,$=_l;Mo=null,lh(C,w,P),Mo=L,_l=$,Mo!==null&&(_l?(C=Mo,P=P.stateNode,C.nodeType===8?C.parentNode.removeChild(P):C.removeChild(P)):Mo.removeChild(P.stateNode));break;case 18:Mo!==null&&(_l?(C=Mo,P=P.stateNode,C.nodeType===8?HF(C.parentNode,P):C.nodeType===1&&HF(C,P),gb(C)):HF(Mo,P.stateNode));break;case 4:L=Mo,$=_l,Mo=P.stateNode.containerInfo,_l=!0,lh(C,w,P),Mo=L,_l=$;break;case 0:case 11:case 14:case 15:if(!Ko&&(L=P.updateQueue,L!==null&&(L=L.lastEffect,L!==null))){$=L=L.next;do{var W=$,J=W.destroy;W=W.tag,J!==void 0&&((W&2)!==0||(W&4)!==0)&&PL(P,w,J),$=$.next}while($!==L)}lh(C,w,P);break;case 1:if(!Ko&&(Qm(P,w),L=P.stateNode,typeof L.componentWillUnmount=="function"))try{L.props=P.memoizedProps,L.state=P.memoizedState,L.componentWillUnmount()}catch(ye){fi(P,w,ye)}lh(C,w,P);break;case 21:lh(C,w,P);break;case 22:P.mode&1?(Ko=(L=Ko)||P.memoizedState!==null,lh(C,w,P),Ko=L):lh(C,w,P);break;default:lh(C,w,P)}}function C7(C){var w=C.updateQueue;if(w!==null){C.updateQueue=null;var P=C.stateNode;P===null&&(P=C.stateNode=new oTe),w.forEach(function(L){var $=gTe.bind(null,C,L);P.has(L)||(P.add(L),L.then($,$))})}}function Ol(C,w){var P=w.deletions;if(P!==null)for(var L=0;L$&&($=J),L&=~W}if(L=$,L=rr()-L,L=(120>L?120:480>L?480:1080>L?1080:1920>L?1920:3e3>L?3e3:4320>L?4320:1960*lTe(L/1960))-L,10C?16:C,uh===null)var L=!1;else{if(C=uh,uh=null,bT=0,(fn&6)!==0)throw Error(r(331));var $=fn;for(fn|=4,nr=C.current;nr!==null;){var W=nr,J=W.child;if((nr.flags&16)!==0){var ye=W.deletions;if(ye!==null){for(var Se=0;Serr()-LL?df(C,0):FL|=P),Bs(C,w)}function F7(C,w){w===0&&((C.mode&1)===0?w=1:(w=$a,$a<<=1,($a&130023424)===0&&($a=4194304)));var P=fs();C=Nu(C,w),C!==null&&(da(C,w,P),Bs(C,P))}function fTe(C){var w=C.memoizedState,P=0;w!==null&&(P=w.retryLane),F7(C,P)}function gTe(C,w){var P=0;switch(C.tag){case 13:var L=C.stateNode,$=C.memoizedState;$!==null&&(P=$.retryLane);break;case 19:L=C.stateNode;break;default:throw Error(r(314))}L!==null&&L.delete(w),F7(C,P)}var L7;L7=function(C,w,P){if(C!==null)if(C.memoizedProps!==w.pendingProps||_s.current)ks=!0;else{if((C.lanes&P)===0&&(w.flags&128)===0)return ks=!1,rTe(C,w,P);ks=(C.flags&131072)!==0}else ks=!1,ri&&(w.flags&1048576)!==0&&h8(w,J1,w.index);switch(w.lanes=0,w.tag){case 2:var L=w.type;pT(C,w),C=w.pendingProps;var $=Wm(w,Wo.current);Xm(w,P),$=uL(null,w,L,C,$,P);var W=dL();return w.flags|=1,typeof $=="object"&&$!==null&&typeof $.render=="function"&&$.$$typeof===void 0?(w.tag=1,w.memoizedState=null,w.updateQueue=null,Os(L)?(W=!0,Y1(w)):W=!1,w.memoizedState=$.state!==null&&$.state!==void 0?$.state:null,nL(w),$.updater=dT,w.stateNode=$,$._reactInternals=w,vL(w,L,C,P),w=SL(null,w,L,!0,W,P)):(w.tag=0,ri&&W&&KF(w),ps(null,w,$,P),w=w.child),w;case 16:L=w.elementType;e:{switch(pT(C,w),C=w.pendingProps,$=L._init,L=$(L._payload),w.type=L,$=w.tag=vTe(L),C=Ll(L,C),$){case 0:w=bL(null,w,L,C,P);break e;case 1:w=o7(null,w,L,C,P);break e;case 11:w=e7(null,w,L,C,P);break e;case 14:w=t7(null,w,L,Ll(L.type,C),P);break e}throw Error(r(306,L,""))}return w;case 0:return L=w.type,$=w.pendingProps,$=w.elementType===L?$:Ll(L,$),bL(C,w,L,$,P);case 1:return L=w.type,$=w.pendingProps,$=w.elementType===L?$:Ll(L,$),o7(C,w,L,$,P);case 3:e:{if(s7(w),C===null)throw Error(r(387));L=w.pendingProps,W=w.memoizedState,$=W.element,S8(C,w),iT(w,L,null,P);var J=w.memoizedState;if(L=J.element,W.isDehydrated)if(W={element:L,isDehydrated:!1,cache:J.cache,pendingSuspenseBoundaries:J.pendingSuspenseBoundaries,transitions:J.transitions},w.updateQueue.baseState=W,w.memoizedState=W,w.flags&256){$=Jm(Error(r(423)),w),w=a7(C,w,L,P,$);break e}else if(L!==$){$=Jm(Error(r(424)),w),w=a7(C,w,L,P,$);break e}else for(fa=rh(w.stateNode.containerInfo.firstChild),pa=w,ri=!0,Fl=null,P=C8(w,null,L,P),w.child=P;P;)P.flags=P.flags&-3|4096,P=P.sibling;else{if(Km(),L===$){w=$u(C,w,P);break e}ps(C,w,L,P)}w=w.child}return w;case 5:return T8(w),C===null&&XF(w),L=w.type,$=w.pendingProps,W=C!==null?C.memoizedProps:null,J=$.children,VF(L,$)?J=null:W!==null&&VF(L,W)&&(w.flags|=32),i7(C,w),ps(C,w,J,P),w.child;case 6:return C===null&&XF(w),null;case 13:return l7(C,w,P);case 4:return iL(w,w.stateNode.containerInfo),L=w.pendingProps,C===null?w.child=qm(w,null,L,P):ps(C,w,L,P),w.child;case 11:return L=w.type,$=w.pendingProps,$=w.elementType===L?$:Ll(L,$),e7(C,w,L,$,P);case 7:return ps(C,w,w.pendingProps,P),w.child;case 8:return ps(C,w,w.pendingProps.children,P),w.child;case 12:return ps(C,w,w.pendingProps.children,P),w.child;case 10:e:{if(L=w.type._context,$=w.pendingProps,W=w.memoizedProps,J=$.value,Vn(tT,L._currentValue),L._currentValue=J,W!==null)if(Al(W.value,J)){if(W.children===$.children&&!_s.current){w=$u(C,w,P);break e}}else for(W=w.child,W!==null&&(W.return=w);W!==null;){var ye=W.dependencies;if(ye!==null){J=W.child;for(var Se=ye.firstContext;Se!==null;){if(Se.context===L){if(W.tag===1){Se=Bu(-1,P&-P),Se.tag=2;var Ve=W.updateQueue;if(Ve!==null){Ve=Ve.shared;var ht=Ve.pending;ht===null?Se.next=Se:(Se.next=ht.next,ht.next=Se),Ve.pending=Se}}W.lanes|=P,Se=W.alternate,Se!==null&&(Se.lanes|=P),tL(W.return,P,w),ye.lanes|=P;break}Se=Se.next}}else if(W.tag===10)J=W.type===w.type?null:W.child;else if(W.tag===18){if(J=W.return,J===null)throw Error(r(341));J.lanes|=P,ye=J.alternate,ye!==null&&(ye.lanes|=P),tL(J,P,w),J=W.sibling}else J=W.child;if(J!==null)J.return=W;else for(J=W;J!==null;){if(J===w){J=null;break}if(W=J.sibling,W!==null){W.return=J.return,J=W;break}J=J.return}W=J}ps(C,w,$.children,P),w=w.child}return w;case 9:return $=w.type,L=w.pendingProps.children,Xm(w,P),$=za($),L=L($),w.flags|=1,ps(C,w,L,P),w.child;case 14:return L=w.type,$=Ll(L,w.pendingProps),$=Ll(L.type,$),t7(C,w,L,$,P);case 15:return r7(C,w,w.type,w.pendingProps,P);case 17:return L=w.type,$=w.pendingProps,$=w.elementType===L?$:Ll(L,$),pT(C,w),w.tag=1,Os(L)?(C=!0,Y1(w)):C=!1,Xm(w,P),K8(w,L,$),vL(w,L,$,P),SL(null,w,L,!0,C,P);case 19:return u7(C,w,P);case 22:return n7(C,w,P)}throw Error(r(156,w.tag))};function _7(C,w){return Zt(C,w)}function mTe(C,w,P,L){this.tag=C,this.key=P,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=w,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=L,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ua(C,w,P,L){return new mTe(C,w,P,L)}function VL(C){return C=C.prototype,!(!C||!C.isReactComponent)}function vTe(C){if(typeof C=="function")return VL(C)?1:0;if(C!=null){if(C=C.$$typeof,C===_)return 11;if(C===k)return 14}return 2}function ph(C,w){var P=C.alternate;return P===null?(P=Ua(C.tag,w,C.key,C.mode),P.elementType=C.elementType,P.type=C.type,P.stateNode=C.stateNode,P.alternate=C,C.alternate=P):(P.pendingProps=w,P.type=C.type,P.flags=0,P.subtreeFlags=0,P.deletions=null),P.flags=C.flags&14680064,P.childLanes=C.childLanes,P.lanes=C.lanes,P.child=C.child,P.memoizedProps=C.memoizedProps,P.memoizedState=C.memoizedState,P.updateQueue=C.updateQueue,w=C.dependencies,P.dependencies=w===null?null:{lanes:w.lanes,firstContext:w.firstContext},P.sibling=C.sibling,P.index=C.index,P.ref=C.ref,P}function TT(C,w,P,L,$,W){var J=2;if(L=C,typeof C=="function")VL(C)&&(J=1);else if(typeof C=="string")J=5;else e:switch(C){case E:return pf(P.children,$,W,w);case M:J=8,$|=8;break;case D:return C=Ua(12,P,w,$|2),C.elementType=D,C.lanes=W,C;case F:return C=Ua(13,P,w,$),C.elementType=F,C.lanes=W,C;case O:return C=Ua(19,P,w,$),C.elementType=O,C.lanes=W,C;case H:return ET(P,$,W,w);default:if(typeof C=="object"&&C!==null)switch(C.$$typeof){case A:J=10;break e;case I:J=9;break e;case _:J=11;break e;case k:J=14;break e;case B:J=16,L=null;break e}throw Error(r(130,C==null?C:typeof C,""))}return w=Ua(J,P,w,$),w.elementType=C,w.type=L,w.lanes=W,w}function pf(C,w,P,L){return C=Ua(7,C,L,w),C.lanes=P,C}function ET(C,w,P,L){return C=Ua(22,C,L,w),C.elementType=H,C.lanes=P,C.stateNode={isHidden:!1},C}function zL(C,w,P){return C=Ua(6,C,null,w),C.lanes=P,C}function HL(C,w,P){return w=Ua(4,C.children!==null?C.children:[],C.key,w),w.lanes=P,w.stateNode={containerInfo:C.containerInfo,pendingChildren:null,implementation:C.implementation},w}function yTe(C,w,P,L,$){this.tag=w,this.containerInfo=C,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rc(0),this.expirationTimes=Rc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rc(0),this.identifierPrefix=L,this.onRecoverableError=$,this.mutableSourceEagerHydrationData=null}function WL(C,w,P,L,$,W,J,ye,Se){return C=new yTe(C,w,P,ye,Se),w===1?(w=1,W===!0&&(w|=8)):w=0,W=Ua(3,null,null,w),C.current=W,W.stateNode=C,W.memoizedState={element:L,isDehydrated:P,cache:null,transitions:null,pendingSuspenseBoundaries:null},nL(W),C}function CTe(C,w,P){var L=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),XL.exports=FTe(),XL.exports}var q7;function LTe(){if(q7)return FT;q7=1;var e=ooe();return FT.createRoot=e.createRoot,FT.hydrateRoot=e.hydrateRoot,FT}var soe=LTe();const Tkt=ux(soe);var ac=ooe();const aoe=ux(ac),_Te=noe({__proto__:null,default:aoe},[ac]);/** * @remix-run/router v1.23.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function ni(){return ni=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function My(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function kTe(){return Math.random().toString(36).substr(2,8)}function X7(e,t){return{usr:e.state,key:e.key,idx:t}}function n0(e,t,r,n){return r===void 0&&(r=null),ni({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?kp(t):t,{state:r,key:t&&t.key||n||kTe()})}function Kg(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function kp(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function NTe(e,t,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,s=i.history,a=Bi.Pop,l=null,c=u();c==null&&(c=0,s.replaceState(ni({},s.state,{idx:c}),""));function u(){return(s.state||{idx:null}).idx}function d(){a=Bi.Pop;let m=u(),v=m==null?null:m-c;c=m,l&&l({action:a,location:g.location,delta:v})}function h(m,v){a=Bi.Push;let b=n0(g.location,m,v);c=u()+1;let S=X7(b,c),x=g.createHref(b);try{s.pushState(S,"",x)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;i.location.assign(x)}o&&l&&l({action:a,location:g.location,delta:1})}function p(m,v){a=Bi.Replace;let b=n0(g.location,m,v);c=u();let S=X7(b,c),x=g.createHref(b);s.replaceState(S,"",x),o&&l&&l({action:a,location:g.location,delta:0})}function f(m){let v=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof m=="string"?m:Kg(m);return b=b.replace(/ $/,"%20"),sn(v,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,v)}let g={get action(){return a},get location(){return e(i,s)},listen(m){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Y7,d),l=m,()=>{i.removeEventListener(Y7,d),l=null}},createHref(m){return t(i,m)},createURL:f,encodeLocation(m){let v=f(m);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:h,replace:p,go(m){return s.go(m)}};return g}var Dn;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Dn||(Dn={}));const BTe=new Set(["lazy","caseSensitive","path","id","index","children"]);function $Te(e){return e.index===!0}function zP(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((i,o)=>{let s=[...r,String(o)],a=typeof i.id=="string"?i.id:s.join("-");if(sn(i.index!==!0||!i.children,"Cannot specify children on an index route"),sn(!n[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),$Te(i)){let l=ni({},i,t(i),{id:a});return n[a]=l,l}else{let l=ni({},i,t(i),{id:a,children:void 0});return n[a]=l,i.children&&(l.children=zP(i.children,t,s,n)),l}})}function Qf(e,t,r){return r===void 0&&(r="/"),VR(e,t,r,!1)}function VR(e,t,r,n){let i=typeof t=="string"?kp(t):t,o=gC(i.pathname||"/",r);if(o==null)return null;let s=loe(e);VTe(s);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(sn(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=fd([n,l.relativePath]),u=r.concat(l);o.children&&o.children.length>0&&(sn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),loe(o.children,t,u,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:qTe(c,o.index),routesMeta:u})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of coe(o.path))i(o,s,l)}),t}function coe(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let s=coe(n.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function VTe(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:YTe(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const zTe=/^:[\w-]+$/,HTe=3,WTe=2,UTe=1,jTe=10,KTe=-2,Z7=e=>e==="*";function qTe(e,t){let r=e.split("/"),n=r.length;return r.some(Z7)&&(n+=KTe),t&&(n+=WTe),r.filter(i=>!Z7(i)).reduce((i,o)=>i+(zTe.test(o)?HTe:o===""?UTe:jTe),n)}function YTe(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}function XTe(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,i={},o="/",s=[];for(let a=0;a{let{paramName:h,isOptional:p}=u;if(h==="*"){let g=a[d]||"";s=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const f=a[d];return p&&!f?c[h]=void 0:c[h]=(f||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:e}}function ZTe(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),My(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}function JTe(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return My(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function gC(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function QTe(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?kp(e):e;return{pathname:r?r.startsWith("/")?r:eEe(r,t):t,search:rEe(n),hash:nEe(i)}}function eEe(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function QL(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function uoe(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function uD(e,t){let r=uoe(e);return t?r.map((n,i)=>i===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function dD(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=kp(e):(i=ni({},e),sn(!i.pathname||!i.pathname.includes("?"),QL("?","pathname","search",i)),sn(!i.pathname||!i.pathname.includes("#"),QL("#","pathname","hash",i)),sn(!i.search||!i.search.includes("#"),QL("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=r;else{let d=t.length-1;if(!n&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),d-=1;i.pathname=h.join("/")}a=d>=0?t[d]:"/"}let l=QTe(i,a),c=s&&s!=="/"&&s.endsWith("/"),u=(o||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const fd=e=>e.join("/").replace(/\/\/+/g,"/"),tEe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),rEe=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,nEe=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class HP{constructor(t,r,n,i){i===void 0&&(i=!1),this.status=t,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function i0(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const doe=["post","put","patch","delete"],iEe=new Set(doe),oEe=["get",...doe],sEe=new Set(oEe),aEe=new Set([301,302,303,307,308]),lEe=new Set([307,308]),e_={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},cEe={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Hb={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},TH=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,uEe=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),hoe="remix-router-transitions";function dEe(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;sn(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let oe=e.detectErrorBoundary;i=ce=>({hasErrorBoundary:oe(ce)})}else i=uEe;let o={},s=zP(e.routes,i,void 0,o),a,l=e.basename||"/",c=e.dataStrategy||gEe,u=e.patchRoutesOnNavigation,d=ni({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,p=new Set,f=null,g=null,m=null,v=e.hydrationData!=null,b=Qf(s,e.history.location,l),S=!1,x=null;if(b==null&&!u){let oe=Us(404,{pathname:e.history.location.pathname}),{matches:ce,route:ge}=cj(s);b=ce,x={[ge.id]:oe}}b&&!e.hydrationData&&De(b,s,e.history.location.pathname).active&&(b=null);let T;if(b)if(b.some(oe=>oe.route.lazy))T=!1;else if(!b.some(oe=>oe.route.loader))T=!0;else if(d.v7_partialHydration){let oe=e.hydrationData?e.hydrationData.loaderData:null,ce=e.hydrationData?e.hydrationData.errors:null;if(ce){let ge=b.findIndex(Te=>ce[Te.route.id]!==void 0);T=b.slice(0,ge+1).every(Te=>!M2(Te.route,oe,ce))}else T=b.every(ge=>!M2(ge.route,oe,ce))}else T=e.hydrationData!=null;else if(T=!1,b=[],d.v7_partialHydration){let oe=De(null,s,e.history.location.pathname);oe.active&&oe.matches&&(S=!0,b=oe.matches)}let R,E={historyAction:e.history.action,location:e.history.location,matches:b,initialized:T,navigation:e_,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||x,fetchers:new Map,blockers:new Map},M=Bi.Pop,D=!1,A,I=!1,_=new Map,F=null,O=!1,k=!1,B=[],H=new Set,N=new Map,z=0,U=-1,V=new Map,G=new Set,K=new Map,q=new Map,Y=new Set,X=new Map,le=new Map,re;function ne(){if(h=e.history.listen(oe=>{let{action:ce,location:ge,delta:Te}=oe;if(re){re(),re=void 0;return}My(le.size===0||Te!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ke=Qt({currentLocation:E.location,nextLocation:ge,historyAction:ce});if(ke&&Te!=null){let Ze=new Promise(Dt=>{re=Dt});e.history.go(Te*-1),Bt(ke,{state:"blocked",location:ge,proceed(){Bt(ke,{state:"proceeding",proceed:void 0,reset:void 0,location:ge}),Ze.then(()=>e.history.go(Te))},reset(){let Dt=new Map(E.blockers);Dt.set(ke,Hb),te({blockers:Dt})}});return}return ue(ce,ge)}),r){IEe(t,_);let oe=()=>DEe(t,_);t.addEventListener("pagehide",oe),F=()=>t.removeEventListener("pagehide",oe)}return E.initialized||ue(Bi.Pop,E.location,{initialHydration:!0}),R}function se(){h&&h(),F&&F(),p.clear(),A&&A.abort(),E.fetchers.forEach((oe,ce)=>Ne(ce)),E.blockers.forEach((oe,ce)=>Rt(ce))}function de(oe){return p.add(oe),()=>p.delete(oe)}function te(oe,ce){ce===void 0&&(ce={}),E=ni({},E,oe);let ge=[],Te=[];d.v7_fetcherPersist&&E.fetchers.forEach((ke,Ze)=>{ke.state==="idle"&&(Y.has(Ze)?Te.push(Ze):ge.push(Ze))}),Y.forEach(ke=>{!E.fetchers.has(ke)&&!N.has(ke)&&Te.push(ke)}),[...p].forEach(ke=>ke(E,{deletedFetchers:Te,viewTransitionOpts:ce.viewTransitionOpts,flushSync:ce.flushSync===!0})),d.v7_fetcherPersist?(ge.forEach(ke=>E.fetchers.delete(ke)),Te.forEach(ke=>Ne(ke))):Te.forEach(ke=>Y.delete(ke))}function ie(oe,ce,ge){var Te,ke;let{flushSync:Ze}=ge===void 0?{}:ge,Dt=E.actionData!=null&&E.navigation.formMethod!=null&&Wl(E.navigation.formMethod)&&E.navigation.state==="loading"&&((Te=oe.state)==null?void 0:Te._isRedirect)!==!0,st;ce.actionData?Object.keys(ce.actionData).length>0?st=ce.actionData:st=null:Dt?st=E.actionData:st=null;let it=ce.loaderData?aj(E.loaderData,ce.loaderData,ce.matches||[],ce.errors):E.loaderData,bt=E.blockers;bt.size>0&&(bt=new Map(bt),bt.forEach((At,dt)=>bt.set(dt,Hb)));let Mt=D===!0||E.navigation.formMethod!=null&&Wl(E.navigation.formMethod)&&((ke=oe.state)==null?void 0:ke._isRedirect)!==!0;a&&(s=a,a=void 0),O||M===Bi.Pop||(M===Bi.Push?e.history.push(oe,oe.state):M===Bi.Replace&&e.history.replace(oe,oe.state));let _t;if(M===Bi.Pop){let At=_.get(E.location.pathname);At&&At.has(oe.pathname)?_t={currentLocation:E.location,nextLocation:oe}:_.has(oe.pathname)&&(_t={currentLocation:oe,nextLocation:E.location})}else if(I){let At=_.get(E.location.pathname);At?At.add(oe.pathname):(At=new Set([oe.pathname]),_.set(E.location.pathname,At)),_t={currentLocation:E.location,nextLocation:oe}}te(ni({},ce,{actionData:st,loaderData:it,historyAction:M,location:oe,initialized:!0,navigation:e_,revalidation:"idle",restoreScrollPosition:ot(oe,ce.matches||E.matches),preventScrollReset:Mt,blockers:bt}),{viewTransitionOpts:_t,flushSync:Ze===!0}),M=Bi.Pop,D=!1,I=!1,O=!1,k=!1,B=[]}async function pe(oe,ce){if(typeof oe=="number"){e.history.go(oe);return}let ge=P2(E.location,E.matches,l,d.v7_prependBasename,oe,d.v7_relativeSplatPath,ce==null?void 0:ce.fromRouteId,ce==null?void 0:ce.relative),{path:Te,submission:ke,error:Ze}=Q7(d.v7_normalizeFormMethod,!1,ge,ce),Dt=E.location,st=n0(E.location,Te,ce&&ce.state);st=ni({},st,e.history.encodeLocation(st));let it=ce&&ce.replace!=null?ce.replace:void 0,bt=Bi.Push;it===!0?bt=Bi.Replace:it===!1||ke!=null&&Wl(ke.formMethod)&&ke.formAction===E.location.pathname+E.location.search&&(bt=Bi.Replace);let Mt=ce&&"preventScrollReset"in ce?ce.preventScrollReset===!0:void 0,_t=(ce&&ce.flushSync)===!0,At=Qt({currentLocation:Dt,nextLocation:st,historyAction:bt});if(At){Bt(At,{state:"blocked",location:st,proceed(){Bt(At,{state:"proceeding",proceed:void 0,reset:void 0,location:st}),pe(oe,ce)},reset(){let dt=new Map(E.blockers);dt.set(At,Hb),te({blockers:dt})}});return}return await ue(bt,st,{submission:ke,pendingError:Ze,preventScrollReset:Mt,replace:ce&&ce.replace,enableViewTransition:ce&&ce.viewTransition,flushSync:_t})}function Z(){if(St(),te({revalidation:"loading"}),E.navigation.state!=="submitting"){if(E.navigation.state==="idle"){ue(E.historyAction,E.location,{startUninterruptedRevalidation:!0});return}ue(M||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation,enableViewTransition:I===!0})}}async function ue(oe,ce,ge){A&&A.abort(),A=null,M=oe,O=(ge&&ge.startUninterruptedRevalidation)===!0,Je(E.location,E.matches),D=(ge&&ge.preventScrollReset)===!0,I=(ge&&ge.enableViewTransition)===!0;let Te=a||s,ke=ge&&ge.overrideNavigation,Ze=ge!=null&&ge.initialHydration&&E.matches&&E.matches.length>0&&!S?E.matches:Qf(Te,ce,l),Dt=(ge&&ge.flushSync)===!0;if(Ze&&E.initialized&&!k&&SEe(E.location,ce)&&!(ge&&ge.submission&&Wl(ge.submission.formMethod))){ie(ce,{matches:Ze},{flushSync:Dt});return}let st=De(Ze,Te,ce.pathname);if(st.active&&st.matches&&(Ze=st.matches),!Ze){let{error:mt,notFoundMatches:It,route:Zt}=ft(ce.pathname);ie(ce,{matches:It,loaderData:{},errors:{[Zt.id]:mt}},{flushSync:Dt});return}A=new AbortController;let it=nv(e.history,ce,A.signal,ge&&ge.submission),bt;if(ge&&ge.pendingError)bt=[eg(Ze).route.id,{type:Dn.error,error:ge.pendingError}];else if(ge&&ge.submission&&Wl(ge.submission.formMethod)){let mt=await ve(it,ce,ge.submission,Ze,st.active,{replace:ge.replace,flushSync:Dt});if(mt.shortCircuited)return;if(mt.pendingActionResult){let[It,Zt]=mt.pendingActionResult;if(xa(Zt)&&i0(Zt.error)&&Zt.error.status===404){A=null,ie(ce,{matches:mt.matches,loaderData:{},errors:{[It]:Zt.error}});return}}Ze=mt.matches||Ze,bt=mt.pendingActionResult,ke=t_(ce,ge.submission),Dt=!1,st.active=!1,it=nv(e.history,it.url,it.signal)}let{shortCircuited:Mt,matches:_t,loaderData:At,errors:dt}=await he(it,ce,Ze,st.active,ke,ge&&ge.submission,ge&&ge.fetcherSubmission,ge&&ge.replace,ge&&ge.initialHydration===!0,Dt,bt);Mt||(A=null,ie(ce,ni({matches:_t||Ze},lj(bt),{loaderData:At,errors:dt})))}async function ve(oe,ce,ge,Te,ke,Ze){Ze===void 0&&(Ze={}),St();let Dt=PEe(ce,ge);if(te({navigation:Dt},{flushSync:Ze.flushSync===!0}),ke){let bt=await Pt(Te,ce.pathname,oe.signal);if(bt.type==="aborted")return{shortCircuited:!0};if(bt.type==="error"){let Mt=eg(bt.partialMatches).route.id;return{matches:bt.partialMatches,pendingActionResult:[Mt,{type:Dn.error,error:bt.error}]}}else if(bt.matches)Te=bt.matches;else{let{notFoundMatches:Mt,error:_t,route:At}=ft(ce.pathname);return{matches:Mt,pendingActionResult:[At.id,{type:Dn.error,error:_t}]}}}let st,it=WS(Te,ce);if(!it.route.action&&!it.route.lazy)st={type:Dn.error,error:Us(405,{method:oe.method,pathname:ce.pathname,routeId:it.route.id})};else if(st=(await Ct("action",E,oe,[it],Te,null))[it.route.id],oe.signal.aborted)return{shortCircuited:!0};if(dg(st)){let bt;return Ze&&Ze.replace!=null?bt=Ze.replace:bt=ij(st.response.headers.get("Location"),new URL(oe.url),l)===E.location.pathname+E.location.search,await Ge(oe,st,!0,{submission:ge,replace:bt}),{shortCircuited:!0}}if(Kh(st))throw Us(400,{type:"defer-action"});if(xa(st)){let bt=eg(Te,it.route.id);return(Ze&&Ze.replace)!==!0&&(M=Bi.Push),{matches:Te,pendingActionResult:[bt.route.id,st]}}return{matches:Te,pendingActionResult:[it.route.id,st]}}async function he(oe,ce,ge,Te,ke,Ze,Dt,st,it,bt,Mt){let _t=ke||t_(ce,Ze),At=Ze||Dt||dj(_t),dt=!O&&(!d.v7_partialHydration||!it);if(Te){if(dt){let on=me(Mt);te(ni({navigation:_t},on!==void 0?{actionData:on}:{}),{flushSync:bt})}let Mr=await Pt(ge,ce.pathname,oe.signal);if(Mr.type==="aborted")return{shortCircuited:!0};if(Mr.type==="error"){let on=eg(Mr.partialMatches).route.id;return{matches:Mr.partialMatches,loaderData:{},errors:{[on]:Mr.error}}}else if(Mr.matches)ge=Mr.matches;else{let{error:on,notFoundMatches:ei,route:mr}=ft(ce.pathname);return{matches:ei,loaderData:{},errors:{[mr.id]:on}}}}let mt=a||s,[It,Zt]=tj(e.history,E,ge,At,ce,d.v7_partialHydration&&it===!0,d.v7_skipActionErrorRevalidation,k,B,H,Y,K,G,mt,l,Mt);if(ut(Mr=>!(ge&&ge.some(on=>on.route.id===Mr))||It&&It.some(on=>on.route.id===Mr)),U=++z,It.length===0&&Zt.length===0){let Mr=Ie();return ie(ce,ni({matches:ge,loaderData:{},errors:Mt&&xa(Mt[1])?{[Mt[0]]:Mt[1].error}:null},lj(Mt),Mr?{fetchers:new Map(E.fetchers)}:{}),{flushSync:bt}),{shortCircuited:!0}}if(dt){let Mr={};if(!Te){Mr.navigation=_t;let on=me(Mt);on!==void 0&&(Mr.actionData=on)}Zt.length>0&&(Mr.fetchers=Oe(Zt)),te(Mr,{flushSync:bt})}Zt.forEach(Mr=>{nt(Mr.key),Mr.controller&&N.set(Mr.key,Mr.controller)});let Ft=()=>Zt.forEach(Mr=>nt(Mr.key));A&&A.signal.addEventListener("abort",Ft);let{loaderResults:cr,fetcherResults:fr}=await Ht(E,ge,It,Zt,oe);if(oe.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",Ft),Zt.forEach(Mr=>N.delete(Mr.key));let rr=LT(cr);if(rr)return await Ge(oe,rr.result,!0,{replace:st}),{shortCircuited:!0};if(rr=LT(fr),rr)return G.add(rr.key),await Ge(oe,rr.result,!0,{replace:st}),{shortCircuited:!0};let{loaderData:mn,errors:un}=sj(E,ge,cr,Mt,Zt,fr,X);X.forEach((Mr,on)=>{Mr.subscribe(ei=>{(ei||Mr.done)&&X.delete(on)})}),d.v7_partialHydration&&it&&E.errors&&(un=ni({},E.errors,un));let dn=Ie(),en=rt(U),ho=dn||en||Zt.length>0;return ni({matches:ge,loaderData:mn,errors:un},ho?{fetchers:new Map(E.fetchers)}:{})}function me(oe){if(oe&&!xa(oe[1]))return{[oe[0]]:oe[1].data};if(E.actionData)return Object.keys(E.actionData).length===0?null:E.actionData}function Oe(oe){return oe.forEach(ce=>{let ge=E.fetchers.get(ce.key),Te=Wb(void 0,ge?ge.data:void 0);E.fetchers.set(ce.key,Te)}),new Map(E.fetchers)}function Pe(oe,ce,ge,Te){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");nt(oe);let ke=(Te&&Te.flushSync)===!0,Ze=a||s,Dt=P2(E.location,E.matches,l,d.v7_prependBasename,ge,d.v7_relativeSplatPath,ce,Te==null?void 0:Te.relative),st=Qf(Ze,Dt,l),it=De(st,Ze,Dt);if(it.active&&it.matches&&(st=it.matches),!st){Fe(oe,ce,Us(404,{pathname:Dt}),{flushSync:ke});return}let{path:bt,submission:Mt,error:_t}=Q7(d.v7_normalizeFormMethod,!0,Dt,Te);if(_t){Fe(oe,ce,_t,{flushSync:ke});return}let At=WS(st,bt),dt=(Te&&Te.preventScrollReset)===!0;if(Mt&&Wl(Mt.formMethod)){Me(oe,ce,bt,At,st,it.active,ke,dt,Mt);return}K.set(oe,{routeId:ce,path:bt}),He(oe,ce,bt,At,st,it.active,ke,dt,Mt)}async function Me(oe,ce,ge,Te,ke,Ze,Dt,st,it){St(),K.delete(oe);function bt(vt){if(!vt.route.action&&!vt.route.lazy){let vr=Us(405,{method:it.formMethod,pathname:ge,routeId:ce});return Fe(oe,ce,vr,{flushSync:Dt}),!0}return!1}if(!Ze&&bt(Te))return;let Mt=E.fetchers.get(oe);Ye(oe,MEe(it,Mt),{flushSync:Dt});let _t=new AbortController,At=nv(e.history,ge,_t.signal,it);if(Ze){let vt=await Pt(ke,new URL(At.url).pathname,At.signal,oe);if(vt.type==="aborted")return;if(vt.type==="error"){Fe(oe,ce,vt.error,{flushSync:Dt});return}else if(vt.matches){if(ke=vt.matches,Te=WS(ke,ge),bt(Te))return}else{Fe(oe,ce,Us(404,{pathname:ge}),{flushSync:Dt});return}}N.set(oe,_t);let dt=z,It=(await Ct("action",E,At,[Te],ke,oe))[Te.route.id];if(At.signal.aborted){N.get(oe)===_t&&N.delete(oe);return}if(d.v7_fetcherPersist&&Y.has(oe)){if(dg(It)||xa(It)){Ye(oe,Ph(void 0));return}}else{if(dg(It))if(N.delete(oe),U>dt){Ye(oe,Ph(void 0));return}else return G.add(oe),Ye(oe,Wb(it)),Ge(At,It,!1,{fetcherSubmission:it,preventScrollReset:st});if(xa(It)){Fe(oe,ce,It.error);return}}if(Kh(It))throw Us(400,{type:"defer-action"});let Zt=E.navigation.location||E.location,Ft=nv(e.history,Zt,_t.signal),cr=a||s,fr=E.navigation.state!=="idle"?Qf(cr,E.navigation.location,l):E.matches;sn(fr,"Didn't find any matches after fetcher action");let rr=++z;V.set(oe,rr);let mn=Wb(it,It.data);E.fetchers.set(oe,mn);let[un,dn]=tj(e.history,E,fr,it,Zt,!1,d.v7_skipActionErrorRevalidation,k,B,H,Y,K,G,cr,l,[Te.route.id,It]);dn.filter(vt=>vt.key!==oe).forEach(vt=>{let vr=vt.key,bn=E.fetchers.get(vr),ti=Wb(void 0,bn?bn.data:void 0);E.fetchers.set(vr,ti),nt(vr),vt.controller&&N.set(vr,vt.controller)}),te({fetchers:new Map(E.fetchers)});let en=()=>dn.forEach(vt=>nt(vt.key));_t.signal.addEventListener("abort",en);let{loaderResults:ho,fetcherResults:Mr}=await Ht(E,fr,un,dn,Ft);if(_t.signal.aborted)return;_t.signal.removeEventListener("abort",en),V.delete(oe),N.delete(oe),dn.forEach(vt=>N.delete(vt.key));let on=LT(ho);if(on)return Ge(Ft,on.result,!1,{preventScrollReset:st});if(on=LT(Mr),on)return G.add(on.key),Ge(Ft,on.result,!1,{preventScrollReset:st});let{loaderData:ei,errors:mr}=sj(E,fr,ho,void 0,dn,Mr,X);if(E.fetchers.has(oe)){let vt=Ph(It.data);E.fetchers.set(oe,vt)}rt(rr),E.navigation.state==="loading"&&rr>U?(sn(M,"Expected pending action"),A&&A.abort(),ie(E.navigation.location,{matches:fr,loaderData:ei,errors:mr,fetchers:new Map(E.fetchers)})):(te({errors:mr,loaderData:aj(E.loaderData,ei,fr,mr),fetchers:new Map(E.fetchers)}),k=!1)}async function He(oe,ce,ge,Te,ke,Ze,Dt,st,it){let bt=E.fetchers.get(oe);Ye(oe,Wb(it,bt?bt.data:void 0),{flushSync:Dt});let Mt=new AbortController,_t=nv(e.history,ge,Mt.signal);if(Ze){let It=await Pt(ke,new URL(_t.url).pathname,_t.signal,oe);if(It.type==="aborted")return;if(It.type==="error"){Fe(oe,ce,It.error,{flushSync:Dt});return}else if(It.matches)ke=It.matches,Te=WS(ke,ge);else{Fe(oe,ce,Us(404,{pathname:ge}),{flushSync:Dt});return}}N.set(oe,Mt);let At=z,mt=(await Ct("loader",E,_t,[Te],ke,oe))[Te.route.id];if(Kh(mt)&&(mt=await EH(mt,_t.signal,!0)||mt),N.get(oe)===Mt&&N.delete(oe),!_t.signal.aborted){if(Y.has(oe)){Ye(oe,Ph(void 0));return}if(dg(mt))if(U>At){Ye(oe,Ph(void 0));return}else{G.add(oe),await Ge(_t,mt,!1,{preventScrollReset:st});return}if(xa(mt)){Fe(oe,ce,mt.error);return}sn(!Kh(mt),"Unhandled fetcher deferred data"),Ye(oe,Ph(mt.data))}}async function Ge(oe,ce,ge,Te){let{submission:ke,fetcherSubmission:Ze,preventScrollReset:Dt,replace:st}=Te===void 0?{}:Te;ce.response.headers.has("X-Remix-Revalidate")&&(k=!0);let it=ce.response.headers.get("Location");sn(it,"Expected a Location header on the redirect Response"),it=ij(it,new URL(oe.url),l);let bt=n0(E.location,it,{_isRedirect:!0});if(r){let It=!1;if(ce.response.headers.has("X-Remix-Reload-Document"))It=!0;else if(TH.test(it)){const Zt=e.history.createURL(it);It=Zt.origin!==t.location.origin||gC(Zt.pathname,l)==null}if(It){st?t.location.replace(it):t.location.assign(it);return}}A=null;let Mt=st===!0||ce.response.headers.has("X-Remix-Replace")?Bi.Replace:Bi.Push,{formMethod:_t,formAction:At,formEncType:dt}=E.navigation;!ke&&!Ze&&_t&&At&&dt&&(ke=dj(E.navigation));let mt=ke||Ze;if(lEe.has(ce.response.status)&&mt&&Wl(mt.formMethod))await ue(Mt,bt,{submission:ni({},mt,{formAction:it}),preventScrollReset:Dt||D,enableViewTransition:ge?I:void 0});else{let It=t_(bt,ke);await ue(Mt,bt,{overrideNavigation:It,fetcherSubmission:Ze,preventScrollReset:Dt||D,enableViewTransition:ge?I:void 0})}}async function Ct(oe,ce,ge,Te,ke,Ze){let Dt,st={};try{Dt=await mEe(c,oe,ce,ge,Te,ke,Ze,o,i)}catch(it){return Te.forEach(bt=>{st[bt.route.id]={type:Dn.error,error:it}}),st}for(let[it,bt]of Object.entries(Dt))if(wEe(bt)){let Mt=bt.result;st[it]={type:Dn.redirect,response:CEe(Mt,ge,it,ke,l,d.v7_relativeSplatPath)}}else st[it]=await yEe(bt);return st}async function Ht(oe,ce,ge,Te,ke){let Ze=oe.matches,Dt=Ct("loader",oe,ke,ge,ce,null),st=Promise.all(Te.map(async Mt=>{if(Mt.matches&&Mt.match&&Mt.controller){let At=(await Ct("loader",oe,nv(e.history,Mt.path,Mt.controller.signal),[Mt.match],Mt.matches,Mt.key))[Mt.match.route.id];return{[Mt.key]:At}}else return Promise.resolve({[Mt.key]:{type:Dn.error,error:Us(404,{pathname:Mt.path})}})})),it=await Dt,bt=(await st).reduce((Mt,_t)=>Object.assign(Mt,_t),{});return await Promise.all([EEe(ce,it,ke.signal,Ze,oe.loaderData),REe(ce,bt,Te)]),{loaderResults:it,fetcherResults:bt}}function St(){k=!0,B.push(...ut()),K.forEach((oe,ce)=>{N.has(ce)&&H.add(ce),nt(ce)})}function Ye(oe,ce,ge){ge===void 0&&(ge={}),E.fetchers.set(oe,ce),te({fetchers:new Map(E.fetchers)},{flushSync:(ge&&ge.flushSync)===!0})}function Fe(oe,ce,ge,Te){Te===void 0&&(Te={});let ke=eg(E.matches,ce);Ne(oe),te({errors:{[ke.route.id]:ge},fetchers:new Map(E.fetchers)},{flushSync:(Te&&Te.flushSync)===!0})}function et(oe){return q.set(oe,(q.get(oe)||0)+1),Y.has(oe)&&Y.delete(oe),E.fetchers.get(oe)||cEe}function Ne(oe){let ce=E.fetchers.get(oe);N.has(oe)&&!(ce&&ce.state==="loading"&&V.has(oe))&&nt(oe),K.delete(oe),V.delete(oe),G.delete(oe),d.v7_fetcherPersist&&Y.delete(oe),H.delete(oe),E.fetchers.delete(oe)}function tt(oe){let ce=(q.get(oe)||0)-1;ce<=0?(q.delete(oe),Y.add(oe),d.v7_fetcherPersist||Ne(oe)):q.set(oe,ce),te({fetchers:new Map(E.fetchers)})}function nt(oe){let ce=N.get(oe);ce&&(ce.abort(),N.delete(oe))}function Ke(oe){for(let ce of oe){let ge=et(ce),Te=Ph(ge.data);E.fetchers.set(ce,Te)}}function Ie(){let oe=[],ce=!1;for(let ge of G){let Te=E.fetchers.get(ge);sn(Te,"Expected fetcher: "+ge),Te.state==="loading"&&(G.delete(ge),oe.push(ge),ce=!0)}return Ke(oe),ce}function rt(oe){let ce=[];for(let[ge,Te]of V)if(Te0}function Tt(oe,ce){let ge=E.blockers.get(oe)||Hb;return le.get(oe)!==ce&&le.set(oe,ce),ge}function Rt(oe){E.blockers.delete(oe),le.delete(oe)}function Bt(oe,ce){let ge=E.blockers.get(oe)||Hb;sn(ge.state==="unblocked"&&ce.state==="blocked"||ge.state==="blocked"&&ce.state==="blocked"||ge.state==="blocked"&&ce.state==="proceeding"||ge.state==="blocked"&&ce.state==="unblocked"||ge.state==="proceeding"&&ce.state==="unblocked","Invalid blocker state transition: "+ge.state+" -> "+ce.state);let Te=new Map(E.blockers);Te.set(oe,ce),te({blockers:Te})}function Qt(oe){let{currentLocation:ce,nextLocation:ge,historyAction:Te}=oe;if(le.size===0)return;le.size>1&&My(!1,"A router only supports one blocker at a time");let ke=Array.from(le.entries()),[Ze,Dt]=ke[ke.length-1],st=E.blockers.get(Ze);if(!(st&&st.state==="proceeding")&&Dt({currentLocation:ce,nextLocation:ge,historyAction:Te}))return Ze}function ft(oe){let ce=Us(404,{pathname:oe}),ge=a||s,{matches:Te,route:ke}=cj(ge);return ut(),{notFoundMatches:Te,route:ke,error:ce}}function ut(oe){let ce=[];return X.forEach((ge,Te)=>{(!oe||oe(Te))&&(ge.cancel(),ce.push(Te),X.delete(Te))}),ce}function Yt(oe,ce,ge){if(f=oe,m=ce,g=ge||null,!v&&E.navigation===e_){v=!0;let Te=ot(E.location,E.matches);Te!=null&&te({restoreScrollPosition:Te})}return()=>{f=null,m=null,g=null}}function hr(oe,ce){return g&&g(oe,ce.map(Te=>GTe(Te,E.loaderData)))||oe.key}function Je(oe,ce){if(f&&m){let ge=hr(oe,ce);f[ge]=m()}}function ot(oe,ce){if(f){let ge=hr(oe,ce),Te=f[ge];if(typeof Te=="number")return Te}return null}function De(oe,ce,ge){if(u)if(oe){if(Object.keys(oe[0].params).length>0)return{active:!0,matches:VR(ce,ge,l,!0)}}else return{active:!0,matches:VR(ce,ge,l,!0)||[]};return{active:!1,matches:null}}async function Pt(oe,ce,ge,Te){if(!u)return{type:"success",matches:oe};let ke=oe;for(;;){let Ze=a==null,Dt=a||s,st=o;try{await u({signal:ge,path:ce,matches:ke,fetcherKey:Te,patch:(Mt,_t)=>{ge.aborted||nj(Mt,_t,Dt,st,i)}})}catch(Mt){return{type:"error",error:Mt,partialMatches:ke}}finally{Ze&&!ge.aborted&&(s=[...s])}if(ge.aborted)return{type:"aborted"};let it=Qf(Dt,ce,l);if(it)return{type:"success",matches:it};let bt=VR(Dt,ce,l,!0);if(!bt||ke.length===bt.length&&ke.every((Mt,_t)=>Mt.route.id===bt[_t].route.id))return{type:"success",matches:null};ke=bt}}function Qe(oe){o={},a=zP(oe,i,void 0,o)}function $e(oe,ce){let ge=a==null;nj(oe,ce,a||s,o,i),ge&&(s=[...s],te({}))}return R={get basename(){return l},get future(){return d},get state(){return E},get routes(){return s},get window(){return t},initialize:ne,subscribe:de,enableScrollRestoration:Yt,navigate:pe,fetch:Pe,revalidate:Z,createHref:oe=>e.history.createHref(oe),encodeLocation:oe=>e.history.encodeLocation(oe),getFetcher:et,deleteFetcher:tt,dispose:se,getBlocker:Tt,deleteBlocker:Rt,patchRoutes:$e,_internalFetchControllers:N,_internalActiveDeferreds:X,_internalSetRoutes:Qe},R}function hEe(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function P2(e,t,r,n,i,o,s,a){let l,c;if(s){l=[];for(let d of t)if(l.push(d),d.route.id===s){c=d;break}}else l=t,c=t[t.length-1];let u=dD(i||".",uD(l,o),gC(e.pathname,r)||e.pathname,a==="path");if(i==null&&(u.search=e.search,u.hash=e.hash),(i==null||i===""||i===".")&&c){let d=RH(u.search);if(c.route.index&&!d)u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&d){let h=new URLSearchParams(u.search),p=h.getAll("index");h.delete("index"),p.filter(g=>g).forEach(g=>h.append("index",g));let f=h.toString();u.search=f?"?"+f:""}}return n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:fd([r,u.pathname])),Kg(u)}function Q7(e,t,r,n){if(!n||!hEe(n))return{path:r};if(n.formMethod&&!TEe(n.formMethod))return{path:r,error:Us(405,{method:n.formMethod})};let i=()=>({path:r,error:Us(400,{type:"invalid-body"})}),o=n.formMethod||"get",s=e?o.toUpperCase():o.toLowerCase(),a=goe(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Wl(s))return i();let h=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((p,f)=>{let[g,m]=f;return""+p+g+"="+m+` `},""):String(n.body);return{path:r,submission:{formMethod:s,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:h}}}else if(n.formEncType==="application/json"){if(!Wl(s))return i();try{let h=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:s,formAction:a,formEncType:n.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}sn(typeof FormData=="function","FormData is not available in this environment");let l,c;if(n.formData)l=I2(n.formData),c=n.formData;else if(n.body instanceof FormData)l=I2(n.body),c=n.body;else if(n.body instanceof URLSearchParams)l=n.body,c=oj(l);else if(n.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(n.body),c=oj(l)}catch{return i()}let u={formMethod:s,formAction:a,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Wl(u.formMethod))return{path:r,submission:u};let d=kp(r);return t&&d.search&&RH(d.search)&&l.append("index",""),d.search="?"+l,{path:Kg(d),submission:u}}function ej(e,t,r){r===void 0&&(r=!1);let n=e.findIndex(i=>i.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function tj(e,t,r,n,i,o,s,a,l,c,u,d,h,p,f,g){let m=g?xa(g[1])?g[1].error:g[1].data:void 0,v=e.createURL(t.location),b=e.createURL(i),S=r;o&&t.errors?S=ej(r,Object.keys(t.errors)[0],!0):g&&xa(g[1])&&(S=ej(r,g[0]));let x=g?g[1].statusCode:void 0,T=s&&x&&x>=400,R=S.filter((M,D)=>{let{route:A}=M;if(A.lazy)return!0;if(A.loader==null)return!1;if(o)return M2(A,t.loaderData,t.errors);if(pEe(t.loaderData,t.matches[D],M)||l.some(F=>F===M.route.id))return!0;let I=t.matches[D],_=M;return rj(M,ni({currentUrl:v,currentParams:I.params,nextUrl:b,nextParams:_.params},n,{actionResult:m,actionStatus:x,defaultShouldRevalidate:T?!1:a||v.pathname+v.search===b.pathname+b.search||v.search!==b.search||poe(I,_)}))}),E=[];return d.forEach((M,D)=>{if(o||!r.some(O=>O.route.id===M.routeId)||u.has(D))return;let A=Qf(p,M.path,f);if(!A){E.push({key:D,routeId:M.routeId,path:M.path,matches:null,match:null,controller:null});return}let I=t.fetchers.get(D),_=WS(A,M.path),F=!1;h.has(D)?F=!1:c.has(D)?(c.delete(D),F=!0):I&&I.state!=="idle"&&I.data===void 0?F=a:F=rj(_,ni({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},n,{actionResult:m,actionStatus:x,defaultShouldRevalidate:T?!1:a})),F&&E.push({key:D,routeId:M.routeId,path:M.path,matches:A,match:_,controller:new AbortController})}),[R,E]}function M2(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&t[e.id]!==void 0,i=r!=null&&r[e.id]!==void 0;return!n&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!i}function pEe(e,t,r){let n=!t||r.route.id!==t.route.id,i=e[r.route.id]===void 0;return n||i}function poe(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function rj(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function nj(e,t,r,n,i){var o;let s;if(e){let c=n[e];sn(c,"No route found to patch children into: routeId = "+e),c.children||(c.children=[]),s=c.children}else s=r;let a=t.filter(c=>!s.some(u=>foe(c,u))),l=zP(a,i,[e||"_","patch",String(((o=s)==null?void 0:o.length)||"0")],n);s.push(...l)}function foe(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>{var i;return(i=t.children)==null?void 0:i.some(o=>foe(r,o))}):!1}async function fEe(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let i=r[e.id];sn(i,"No route found in manifest");let o={};for(let s in n){let l=i[s]!==void 0&&s!=="hasErrorBoundary";My(!l,'Route "'+i.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!BTe.has(s)&&(o[s]=n[s])}Object.assign(i,o),Object.assign(i,ni({},t(i),{lazy:void 0}))}async function gEe(e){let{matches:t}=e,r=t.filter(i=>i.shouldLoad);return(await Promise.all(r.map(i=>i.resolve()))).reduce((i,o,s)=>Object.assign(i,{[r[s].route.id]:o}),{})}async function mEe(e,t,r,n,i,o,s,a,l,c){let u=o.map(p=>p.route.lazy?fEe(p.route,l,a):void 0),d=o.map((p,f)=>{let g=u[f],m=i.some(b=>b.route.id===p.route.id);return ni({},p,{shouldLoad:m,resolve:async b=>(b&&n.method==="GET"&&(p.route.lazy||p.route.loader)&&(m=!0),m?vEe(t,n,p,g,b,c):Promise.resolve({type:Dn.data,result:void 0}))})}),h=await e({matches:d,request:n,params:o[0].params,fetcherKey:s,context:c});try{await Promise.all(u)}catch{}return h}async function vEe(e,t,r,n,i,o){let s,a,l=c=>{let u,d=new Promise((f,g)=>u=g);a=()=>u(),t.signal.addEventListener("abort",a);let h=f=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):c({request:t,params:r.params,context:o},...f!==void 0?[f]:[]),p=(async()=>{try{return{type:"data",result:await(i?i(g=>h(g)):h())}}catch(f){return{type:"error",result:f}}})();return Promise.race([p,d])};try{let c=r.route[e];if(n)if(c){let u,[d]=await Promise.all([l(c).catch(h=>{u=h}),n]);if(u!==void 0)throw u;s=d}else if(await n,c=r.route[e],c)s=await l(c);else if(e==="action"){let u=new URL(t.url),d=u.pathname+u.search;throw Us(405,{method:t.method,pathname:d,routeId:r.route.id})}else return{type:Dn.data,result:void 0};else if(c)s=await l(c);else{let u=new URL(t.url),d=u.pathname+u.search;throw Us(404,{pathname:d})}sn(s.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:Dn.error,result:c}}finally{a&&t.signal.removeEventListener("abort",a)}return s}async function yEe(e){let{result:t,type:r}=e;if(moe(t)){let d;try{let h=t.headers.get("Content-Type");h&&/\bapplication\/json\b/.test(h)?t.body==null?d=null:d=await t.json():d=await t.text()}catch(h){return{type:Dn.error,error:h}}return r===Dn.error?{type:Dn.error,error:new HP(t.status,t.statusText,d),statusCode:t.status,headers:t.headers}:{type:Dn.data,data:d,statusCode:t.status,headers:t.headers}}if(r===Dn.error){if(uj(t)){var n,i;if(t.data instanceof Error){var o,s;return{type:Dn.error,error:t.data,statusCode:(o=t.init)==null?void 0:o.status,headers:(s=t.init)!=null&&s.headers?new Headers(t.init.headers):void 0}}return{type:Dn.error,error:new HP(((n=t.init)==null?void 0:n.status)||500,void 0,t.data),statusCode:i0(t)?t.status:void 0,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}}return{type:Dn.error,error:t,statusCode:i0(t)?t.status:void 0}}if(xEe(t)){var a,l;return{type:Dn.deferred,deferredData:t,statusCode:(a=t.init)==null?void 0:a.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}if(uj(t)){var c,u;return{type:Dn.data,data:t.data,statusCode:(c=t.init)==null?void 0:c.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:Dn.data,data:t}}function CEe(e,t,r,n,i,o){let s=e.headers.get("Location");if(sn(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!TH.test(s)){let a=n.slice(0,n.findIndex(l=>l.route.id===r)+1);s=P2(new URL(t.url),a,i,!0,s,o),e.headers.set("Location",s)}return e}function ij(e,t,r){if(TH.test(e)){let n=e,i=n.startsWith("//")?new URL(t.protocol+n):new URL(n),o=gC(i.pathname,r)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function nv(e,t,r,n){let i=e.createURL(goe(t)).toString(),o={signal:r};if(n&&Wl(n.formMethod)){let{formMethod:s,formEncType:a}=n;o.method=s.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(n.json)):a==="text/plain"?o.body=n.text:a==="application/x-www-form-urlencoded"&&n.formData?o.body=I2(n.formData):o.body=n.formData}return new Request(i,o)}function I2(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function oj(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function bEe(e,t,r,n,i){let o={},s=null,a,l=!1,c={},u=r&&xa(r[1])?r[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let h=d.route.id,p=t[h];if(sn(!dg(p),"Cannot handle redirect results in processLoaderData"),xa(p)){let f=p.error;u!==void 0&&(f=u,u=void 0),s=s||{};{let g=eg(e,h);s[g.route.id]==null&&(s[g.route.id]=f)}o[h]=void 0,l||(l=!0,a=i0(p.error)?p.error.status:500),p.headers&&(c[h]=p.headers)}else Kh(p)?(n.set(h,p.deferredData),o[h]=p.deferredData.data,p.statusCode!=null&&p.statusCode!==200&&!l&&(a=p.statusCode),p.headers&&(c[h]=p.headers)):(o[h]=p.data,p.statusCode&&p.statusCode!==200&&!l&&(a=p.statusCode),p.headers&&(c[h]=p.headers))}),u!==void 0&&r&&(s={[r[0]]:u},o[r[0]]=void 0),{loaderData:o,errors:s,statusCode:a||200,loaderHeaders:c}}function sj(e,t,r,n,i,o,s){let{loaderData:a,errors:l}=bEe(t,r,n,s);return i.forEach(c=>{let{key:u,match:d,controller:h}=c,p=o[u];if(sn(p,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(xa(p)){let f=eg(e.matches,d==null?void 0:d.route.id);l&&l[f.route.id]||(l=ni({},l,{[f.route.id]:p.error})),e.fetchers.delete(u)}else if(dg(p))sn(!1,"Unhandled fetcher revalidation redirect");else if(Kh(p))sn(!1,"Unhandled fetcher deferred data");else{let f=Ph(p.data);e.fetchers.set(u,f)}}),{loaderData:a,errors:l}}function aj(e,t,r,n){let i=ni({},t);for(let o of r){let s=o.route.id;if(t.hasOwnProperty(s)?t[s]!==void 0&&(i[s]=t[s]):e[s]!==void 0&&o.route.loader&&(i[s]=e[s]),n&&n.hasOwnProperty(s))break}return i}function lj(e){return e?xa(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function eg(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function cj(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Us(e,t){let{pathname:r,routeId:n,method:i,type:o,message:s}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",i&&r&&n?l="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?l="defer() is not supported in actions":o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(a="Not Found",l='No route matches URL "'+r+'"'):e===405&&(a="Method Not Allowed",i&&r&&n?l="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(l='Invalid request method "'+i.toUpperCase()+'"')),new HP(e||500,a,new Error(l),!0)}function LT(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,i]=t[r];if(dg(i))return{key:n,result:i}}}function goe(e){let t=typeof e=="string"?kp(e):e;return Kg(ni({},t,{hash:""}))}function SEe(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function wEe(e){return moe(e.result)&&aEe.has(e.result.status)}function Kh(e){return e.type===Dn.deferred}function xa(e){return e.type===Dn.error}function dg(e){return(e&&e.type)===Dn.redirect}function uj(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function xEe(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function moe(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function TEe(e){return sEe.has(e.toLowerCase())}function Wl(e){return iEe.has(e.toLowerCase())}async function EEe(e,t,r,n,i){let o=Object.entries(t);for(let s=0;s(h==null?void 0:h.route.id)===a);if(!c)continue;let u=n.find(h=>h.route.id===c.route.id),d=u!=null&&!poe(u,c)&&(i&&i[c.route.id])!==void 0;Kh(l)&&d&&await EH(l,r,!1).then(h=>{h&&(t[a]=h)})}}async function REe(e,t,r){for(let n=0;n(c==null?void 0:c.route.id)===o)&&Kh(a)&&(sn(s,"Expected an AbortController for revalidating fetcher deferred result"),await EH(a,s.signal,!0).then(c=>{c&&(t[i]=c)}))}}async function EH(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:Dn.data,data:e.deferredData.unwrappedData}}catch(i){return{type:Dn.error,error:i}}return{type:Dn.data,data:e.deferredData.data}}}function RH(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function WS(e,t){let r=typeof t=="string"?kp(t).search:t.search;if(e[e.length-1].route.index&&RH(r||""))return e[e.length-1];let n=uoe(e);return n[n.length-1]}function dj(e){let{formMethod:t,formAction:r,formEncType:n,text:i,formData:o,json:s}=e;if(!(!t||!r||!n)){if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:s,text:void 0}}}function t_(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function PEe(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Wb(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function MEe(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Ph(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function IEe(e,t){try{let r=e.sessionStorage.getItem(hoe);if(r){let n=JSON.parse(r);for(let[i,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function DEe(e,t){if(t.size>0){let r={};for(let[n,i]of t)r[n]=[...i];try{e.sessionStorage.setItem(hoe,JSON.stringify(r))}catch(n){My(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** * React Router v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function WP(){return WP=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),y.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let d=dD(c,JSON.parse(s),o,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:fd([t,d.pathname])),(u.replace?n.replace:n.push)(d,u.state,u)},[t,n,s,o,e])}const LEe=y.createContext(null);function _Ee(e){let t=y.useContext(wu).outlet;return t&&y.createElement(LEe.Provider,{value:e},t)}function Ekt(){let{matches:e}=y.useContext(wu),t=e[e.length-1];return t?t.params:{}}function boe(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=y.useContext(Np),{matches:i}=y.useContext(wu),{pathname:o}=vC(),s=JSON.stringify(uD(i,n.v7_relativeSplatPath));return y.useMemo(()=>dD(e,JSON.parse(s),o,r==="path"),[e,s,o,r])}function OEe(e,t,r,n){mC()||sn(!1);let{navigator:i}=y.useContext(Np),{matches:o}=y.useContext(wu),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let c=vC(),u;u=c;let d=u.pathname||"/",h=d;if(l!=="/"){let g=l.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(g.length).join("/")}let p=Qf(e,{pathname:h});return GEe(p&&p.map(g=>Object.assign({},g,{params:Object.assign({},a,g.params),pathname:fd([l,i.encodeLocation?i.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:fd([l,i.encodeLocation?i.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),o,r,n)}function kEe(){let e=WEe(),t=i0(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),r?y.createElement("pre",{style:i},r):null,null)}const NEe=y.createElement(kEe,null);class BEe extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?y.createElement(wu.Provider,{value:this.props.routeContext},y.createElement(yoe.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function $Ee(e){let{routeContext:t,match:r,children:n}=e,i=y.useContext(hD);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),y.createElement(wu.Provider,{value:t},n)}function GEe(e,t,r,n){var i;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let s=e,a=(i=r)==null?void 0:i.errors;if(a!=null){let u=s.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||sn(!1),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((u,d,h)=>{let p,f=!1,g=null,m=null;r&&(p=a&&d.route.id?a[d.route.id]:void 0,g=d.route.errorElement||NEe,l&&(c<0&&h===0?(jEe("route-fallback"),f=!0,m=null):c===h&&(f=!0,m=d.route.hydrateFallbackElement||null)));let v=t.concat(s.slice(0,h+1)),b=()=>{let S;return p?S=g:f?S=m:d.route.Component?S=y.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=u,y.createElement($Ee,{match:d,routeContext:{outlet:u,matches:v,isDataRoute:r!=null},children:S})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?y.createElement(BEe,{location:r.location,revalidation:r.revalidation,component:g,error:p,children:b(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):b()},null)}var Soe=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(Soe||{}),woe=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(woe||{});function VEe(e){let t=y.useContext(hD);return t||sn(!1),t}function zEe(e){let t=y.useContext(voe);return t||sn(!1),t}function HEe(e){let t=y.useContext(wu);return t||sn(!1),t}function xoe(e){let t=HEe(),r=t.matches[t.matches.length-1];return r.route.id||sn(!1),r.route.id}function WEe(){var e;let t=y.useContext(yoe),r=zEe(woe.UseRouteError),n=xoe();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function UEe(){let{router:e}=VEe(Soe.UseNavigateStable),t=xoe(),r=y.useRef(!1);return Coe(()=>{r.current=!0}),y.useCallback(function(i,o){o===void 0&&(o={}),r.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,WP({fromRouteId:t},o)))},[e,t])}const hj={};function jEe(e,t,r){hj[e]||(hj[e]=!0)}function KEe(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function Rkt(e){let{to:t,replace:r,state:n,relative:i}=e;mC()||sn(!1);let{future:o,static:s}=y.useContext(Np),{matches:a}=y.useContext(wu),{pathname:l}=vC(),c=MH(),u=dD(t,uD(a,o.v7_relativeSplatPath),l,i==="path"),d=JSON.stringify(u);return y.useEffect(()=>c(JSON.parse(d),{replace:r,state:n,relative:i}),[c,d,i,r,n]),null}function Pkt(e){return _Ee(e.context)}function qEe(e){let{basename:t="/",children:r=null,location:n,navigationType:i=Bi.Pop,navigator:o,static:s=!1,future:a}=e;mC()&&sn(!1);let l=t.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:l,navigator:o,static:s,future:WP({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof n=="string"&&(n=kp(n));let{pathname:u="/",search:d="",hash:h="",state:p=null,key:f="default"}=n,g=y.useMemo(()=>{let m=gC(u,l);return m==null?null:{location:{pathname:m,search:d,hash:h,state:p,key:f},navigationType:i}},[l,u,d,h,p,f,i]);return g==null?null:y.createElement(Np.Provider,{value:c},y.createElement(PH.Provider,{children:r,value:g}))}new Promise(()=>{});function YEe(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function o0(){return o0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}function ZEe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function JEe(e,t){return e.button===0&&(!t||t==="_self")&&!ZEe(e)}function D2(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}function QEe(e,t){let r=D2(e);return t&&t.forEach((n,i)=>{r.has(i)||t.getAll(i).forEach(o=>{r.append(i,o)})}),r}const eRe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],tRe="6";try{window.__reactRouterVersion=tRe}catch{}function Mkt(e,t){return dEe({basename:void 0,future:o0({},void 0,{v7_prependBasename:!0}),history:OTe({window:void 0}),hydrationData:rRe(),routes:e,mapRouteProperties:YEe,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function rRe(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=o0({},t,{errors:nRe(t.errors)})),t}function nRe(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,i]of t)if(i&&i.__type==="RouteErrorResponse")r[n]=new HP(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let s=new o(i.message);s.stack="",r[n]=s}catch{}}if(r[n]==null){let o=new Error(i.message);o.stack="",r[n]=o}}else r[n]=i;return r}const iRe=y.createContext({isTransitioning:!1}),oRe=y.createContext(new Map),sRe="startTransition",pj=ioe[sRe],aRe="flushSync",fj=_Te[aRe];function lRe(e){pj?pj(e):e()}function Ub(e){fj?fj(e):e()}class cRe{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function Ikt(e){let{fallbackElement:t,router:r,future:n}=e,[i,o]=y.useState(r.state),[s,a]=y.useState(),[l,c]=y.useState({isTransitioning:!1}),[u,d]=y.useState(),[h,p]=y.useState(),[f,g]=y.useState(),m=y.useRef(new Map),{v7_startTransition:v}=n||{},b=y.useCallback(M=>{v?lRe(M):M()},[v]),S=y.useCallback((M,D)=>{let{deletedFetchers:A,flushSync:I,viewTransitionOpts:_}=D;M.fetchers.forEach((O,k)=>{O.data!==void 0&&m.current.set(k,O.data)}),A.forEach(O=>m.current.delete(O));let F=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!_||F){I?Ub(()=>o(M)):b(()=>o(M));return}if(I){Ub(()=>{h&&(u&&u.resolve(),h.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let O=r.window.document.startViewTransition(()=>{Ub(()=>o(M))});O.finished.finally(()=>{Ub(()=>{d(void 0),p(void 0),a(void 0),c({isTransitioning:!1})})}),Ub(()=>p(O));return}h?(u&&u.resolve(),h.skipTransition(),g({state:M,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(a(M),c({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[r.window,h,u,m,b]);y.useLayoutEffect(()=>r.subscribe(S),[r,S]),y.useEffect(()=>{l.isTransitioning&&!l.flushSync&&d(new cRe)},[l]),y.useEffect(()=>{if(u&&s&&r.window){let M=s,D=u.promise,A=r.window.document.startViewTransition(async()=>{b(()=>o(M)),await D});A.finished.finally(()=>{d(void 0),p(void 0),a(void 0),c({isTransitioning:!1})}),p(A)}},[b,s,u,r.window]),y.useEffect(()=>{u&&s&&i.location.key===s.location.key&&u.resolve()},[u,h,i.location,s]),y.useEffect(()=>{!l.isTransitioning&&f&&(a(f.state),c({isTransitioning:!0,flushSync:!1,currentLocation:f.currentLocation,nextLocation:f.nextLocation}),g(void 0))},[l.isTransitioning,f]),y.useEffect(()=>{},[]);let x=y.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:M=>r.navigate(M),push:(M,D,A)=>r.navigate(M,{state:D,preventScrollReset:A==null?void 0:A.preventScrollReset}),replace:(M,D,A)=>r.navigate(M,{replace:!0,state:D,preventScrollReset:A==null?void 0:A.preventScrollReset})}),[r]),T=r.basename||"/",R=y.useMemo(()=>({router:r,navigator:x,static:!1,basename:T}),[r,x,T]),E=y.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return y.useEffect(()=>KEe(n,r.future),[n,r.future]),y.createElement(y.Fragment,null,y.createElement(hD.Provider,{value:R},y.createElement(voe.Provider,{value:i},y.createElement(oRe.Provider,{value:m.current},y.createElement(iRe.Provider,{value:l},y.createElement(qEe,{basename:T,location:i.location,navigationType:i.historyAction,navigator:x,future:E},i.initialized||r.future.v7_partialHydration?y.createElement(uRe,{routes:r.routes,future:r.future,state:i}):t))))),null)}const uRe=y.memo(dRe);function dRe(e){let{routes:t,future:r,state:n}=e;return OEe(t,void 0,n,r)}const hRe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",pRe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dkt=y.forwardRef(function(t,r){let{onClick:n,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,h=XEe(t,eRe),{basename:p}=y.useContext(Np),f,g=!1;if(typeof c=="string"&&pRe.test(c)&&(f=c,hRe))try{let S=new URL(window.location.href),x=c.startsWith("//")?new URL(S.protocol+c):new URL(c),T=gC(x.pathname,p);x.origin===S.origin&&T!=null?c=T+x.search+x.hash:g=!0}catch{}let m=AEe(c,{relative:i}),v=fRe(c,{replace:s,state:a,target:l,preventScrollReset:u,relative:i,viewTransition:d});function b(S){n&&n(S),S.defaultPrevented||v(S)}return y.createElement("a",o0({},h,{href:f||m,onClick:g||o?n:b,ref:r,target:l}))});var gj;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(gj||(gj={}));var mj;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(mj||(mj={}));function fRe(e,t){let{target:r,replace:n,state:i,preventScrollReset:o,relative:s,viewTransition:a}=t===void 0?{}:t,l=MH(),c=vC(),u=boe(e,{relative:s});return y.useCallback(d=>{if(JEe(d,r)){d.preventDefault();let h=n!==void 0?n:Kg(c)===Kg(u);l(e,{replace:h,state:i,preventScrollReset:o,relative:s,viewTransition:a})}},[c,l,u,n,i,r,e,o,s,a])}function Akt(e){let t=y.useRef(D2(e)),r=y.useRef(!1),n=vC(),i=y.useMemo(()=>QEe(n.search,r.current?null:t.current),[n.search]),o=MH(),s=y.useCallback((a,l)=>{const c=D2(typeof a=="function"?a(i):a);r.current=!0,o("?"+c,l)},[o,i]);return[i,s]}function Toe(e,t){return function(){return e.apply(t,arguments)}}const{toString:gRe}=Object.prototype,{getPrototypeOf:IH}=Object,{iterator:pD,toStringTag:Eoe}=Symbol,fD=(e=>t=>{const r=gRe.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),yc=e=>(e=e.toLowerCase(),t=>fD(t)===e),gD=e=>t=>typeof t===e,{isArray:yC}=Array,Iy=gD("undefined");function dx(e){return e!==null&&!Iy(e)&&e.constructor!==null&&!Iy(e.constructor)&&Xs(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Roe=yc("ArrayBuffer");function mRe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Roe(e.buffer),t}const vRe=gD("string"),Xs=gD("function"),Poe=gD("number"),hx=e=>e!==null&&typeof e=="object",yRe=e=>e===!0||e===!1,zR=e=>{if(fD(e)!=="object")return!1;const t=IH(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Eoe in e)&&!(pD in e)},CRe=e=>{if(!hx(e)||dx(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},bRe=yc("Date"),SRe=yc("File"),wRe=e=>!!(e&&typeof e.uri<"u"),xRe=e=>e&&typeof e.getParts<"u",TRe=yc("Blob"),ERe=yc("FileList"),RRe=e=>hx(e)&&Xs(e.pipe);function PRe(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const vj=PRe(),yj=typeof vj.FormData<"u"?vj.FormData:void 0,MRe=e=>{let t;return e&&(yj&&e instanceof yj||Xs(e.append)&&((t=fD(e))==="formdata"||t==="object"&&Xs(e.toString)&&e.toString()==="[object FormData]"))},IRe=yc("URLSearchParams"),[DRe,ARe,FRe,LRe]=["ReadableStream","Request","Response","Headers"].map(yc),_Re=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function px(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),yC(e))for(n=0,i=e.length;n0;)if(i=r[n],t===i.toLowerCase())return i;return null}const hg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ioe=e=>!Iy(e)&&e!==hg;function A2(){const{caseless:e,skipUndefined:t}=Ioe(this)&&this||{},r={},n=(i,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const s=e&&Moe(r,o)||o;zR(r[s])&&zR(i)?r[s]=A2(r[s],i):zR(i)?r[s]=A2({},i):yC(i)?r[s]=i.slice():(!t||!Iy(i))&&(r[s]=i)};for(let i=0,o=arguments.length;i(px(t,(i,o)=>{r&&Xs(i)?Object.defineProperty(e,o,{value:Toe(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),kRe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),NRe=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},BRe=(e,t,r,n)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=r!==!1&&IH(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},$Re=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},GRe=e=>{if(!e)return null;if(yC(e))return e;let t=e.length;if(!Poe(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},VRe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&IH(Uint8Array)),zRe=(e,t)=>{const n=(e&&e[pD]).call(e);let i;for(;(i=n.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},HRe=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},WRe=yc("HTMLFormElement"),URe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),Cj=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),jRe=yc("RegExp"),Doe=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};px(r,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(n[o]=s||i)}),Object.defineProperties(e,n)},KRe=e=>{Doe(e,(t,r)=>{if(Xs(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Xs(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},qRe=(e,t)=>{const r={},n=i=>{i.forEach(o=>{r[o]=!0})};return yC(e)?n(e):n(String(e).split(t)),r},YRe=()=>{},XRe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ZRe(e){return!!(e&&Xs(e.append)&&e[Eoe]==="FormData"&&e[pD])}const JRe=e=>{const t=new Array(10),r=(n,i)=>{if(hx(n)){if(t.indexOf(n)>=0)return;if(dx(n))return n;if(!("toJSON"in n)){t[i]=n;const o=yC(n)?[]:{};return px(n,(s,a)=>{const l=r(s,i+1);!Iy(l)&&(o[a]=l)}),t[i]=void 0,o}}return n};return r(e,0)},QRe=yc("AsyncFunction"),ePe=e=>e&&(hx(e)||Xs(e))&&Xs(e.then)&&Xs(e.catch),Aoe=((e,t)=>e?setImmediate:t?((r,n)=>(hg.addEventListener("message",({source:i,data:o})=>{i===hg&&o===r&&n.length&&n.shift()()},!1),i=>{n.push(i),hg.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Xs(hg.postMessage)),tPe=typeof queueMicrotask<"u"?queueMicrotask.bind(hg):typeof process<"u"&&process.nextTick||Aoe,rPe=e=>e!=null&&Xs(e[pD]),We={isArray:yC,isArrayBuffer:Roe,isBuffer:dx,isFormData:MRe,isArrayBufferView:mRe,isString:vRe,isNumber:Poe,isBoolean:yRe,isObject:hx,isPlainObject:zR,isEmptyObject:CRe,isReadableStream:DRe,isRequest:ARe,isResponse:FRe,isHeaders:LRe,isUndefined:Iy,isDate:bRe,isFile:SRe,isReactNativeBlob:wRe,isReactNative:xRe,isBlob:TRe,isRegExp:jRe,isFunction:Xs,isStream:RRe,isURLSearchParams:IRe,isTypedArray:VRe,isFileList:ERe,forEach:px,merge:A2,extend:ORe,trim:_Re,stripBOM:kRe,inherits:NRe,toFlatObject:BRe,kindOf:fD,kindOfTest:yc,endsWith:$Re,toArray:GRe,forEachEntry:zRe,matchAll:HRe,isHTMLForm:WRe,hasOwnProperty:Cj,hasOwnProp:Cj,reduceDescriptors:Doe,freezeMethods:KRe,toObjectSet:qRe,toCamelCase:URe,noop:YRe,toFiniteNumber:XRe,findKey:Moe,global:hg,isContextDefined:Ioe,isSpecCompliantForm:ZRe,toJSONObject:JRe,isAsyncFn:QRe,isThenable:ePe,setImmediate:Aoe,asap:tPe,isIterable:rPe};let Ir=class Foe extends Error{static from(t,r,n,i,o,s){const a=new Foe(t.message,r||t.code,n,i,o);return a.cause=t,a.name=t.name,t.status!=null&&a.status==null&&(a.status=t.status),s&&Object.assign(a,s),a}constructor(t,r,n,i,o){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:We.toJSONObject(this.config),code:this.code,status:this.status}}};Ir.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Ir.ERR_BAD_OPTION="ERR_BAD_OPTION";Ir.ECONNABORTED="ECONNABORTED";Ir.ETIMEDOUT="ETIMEDOUT";Ir.ERR_NETWORK="ERR_NETWORK";Ir.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Ir.ERR_DEPRECATED="ERR_DEPRECATED";Ir.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Ir.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Ir.ERR_CANCELED="ERR_CANCELED";Ir.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Ir.ERR_INVALID_URL="ERR_INVALID_URL";const nPe=null;function F2(e){return We.isPlainObject(e)||We.isArray(e)}function Loe(e){return We.endsWith(e,"[]")?e.slice(0,-2):e}function r_(e,t,r){return e?e.concat(t).map(function(i,o){return i=Loe(i),!r&&o?"["+i+"]":i}).join(r?".":""):t}function iPe(e){return We.isArray(e)&&!e.some(F2)}const oPe=We.toFlatObject(We,{},null,function(t){return/^is[A-Z]/.test(t)});function mD(e,t,r){if(!We.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=We.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!We.isUndefined(m[g])});const n=r.metaTokens,i=r.visitor||u,o=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&We.isSpecCompliantForm(t);if(!We.isFunction(i))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(We.isDate(f))return f.toISOString();if(We.isBoolean(f))return f.toString();if(!l&&We.isBlob(f))throw new Ir("Blob is not supported. Use a Buffer instead.");return We.isArrayBuffer(f)||We.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,g,m){let v=f;if(We.isReactNative(t)&&We.isReactNativeBlob(f))return t.append(r_(m,g,o),c(f)),!1;if(f&&!m&&typeof f=="object"){if(We.endsWith(g,"{}"))g=n?g:g.slice(0,-2),f=JSON.stringify(f);else if(We.isArray(f)&&iPe(f)||(We.isFileList(f)||We.endsWith(g,"[]"))&&(v=We.toArray(f)))return g=Loe(g),v.forEach(function(S,x){!(We.isUndefined(S)||S===null)&&t.append(s===!0?r_([g],x,o):s===null?g:g+"[]",c(S))}),!1}return F2(f)?!0:(t.append(r_(m,g,o),c(f)),!1)}const d=[],h=Object.assign(oPe,{defaultVisitor:u,convertValue:c,isVisitable:F2});function p(f,g){if(!We.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(f),We.forEach(f,function(v,b){(!(We.isUndefined(v)||v===null)&&i.call(t,v,We.isString(b)?b.trim():b,g,h))===!0&&p(v,g?g.concat(b):[b])}),d.pop()}}if(!We.isObject(e))throw new TypeError("data must be an object");return p(e),t}function bj(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function DH(e,t){this._pairs=[],e&&mD(e,this,t)}const _oe=DH.prototype;_oe.append=function(t,r){this._pairs.push([t,r])};_oe.toString=function(t){const r=t?function(n){return t.call(this,n,bj)}:bj;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function sPe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ooe(e,t,r){if(!t)return e;const n=r&&r.encode||sPe,i=We.isFunction(r)?{serialize:r}:r,o=i&&i.serialize;let s;if(o?s=o(t,i):s=We.isURLSearchParams(t)?t.toString():new DH(t,i).toString(n),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}let Sj=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){We.forEach(this.handlers,function(n){n!==null&&t(n)})}};const AH={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},aPe=typeof URLSearchParams<"u"?URLSearchParams:DH,lPe=typeof FormData<"u"?FormData:null,cPe=typeof Blob<"u"?Blob:null,uPe={isBrowser:!0,classes:{URLSearchParams:aPe,FormData:lPe,Blob:cPe},protocols:["http","https","file","blob","url","data"]},FH=typeof window<"u"&&typeof document<"u",L2=typeof navigator=="object"&&navigator||void 0,dPe=FH&&(!L2||["ReactNative","NativeScript","NS"].indexOf(L2.product)<0),hPe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",pPe=FH&&window.location.href||"http://localhost",fPe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:FH,hasStandardBrowserEnv:dPe,hasStandardBrowserWebWorkerEnv:hPe,navigator:L2,origin:pPe},Symbol.toStringTag,{value:"Module"})),is={...fPe,...uPe};function gPe(e,t){return mD(e,new is.classes.URLSearchParams,{visitor:function(r,n,i,o){return is.isNode&&We.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function mPe(e){return We.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function vPe(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n=r.length;return s=!s&&We.isArray(i)?i.length:s,l?(We.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!a):((!i[s]||!We.isObject(i[s]))&&(i[s]=[]),t(r,n,i[s],o)&&We.isArray(i[s])&&(i[s]=vPe(i[s])),!a)}if(We.isFormData(e)&&We.isFunction(e.entries)){const r={};return We.forEachEntry(e,(n,i)=>{t(mPe(n),i,r,0)}),r}return null}function yPe(e,t,r){if(We.isString(e))try{return(t||JSON.parse)(e),We.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const fx={transitional:AH,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=We.isObject(t);if(o&&We.isHTMLForm(t)&&(t=new FormData(t)),We.isFormData(t))return i?JSON.stringify(koe(t)):t;if(We.isArrayBuffer(t)||We.isBuffer(t)||We.isStream(t)||We.isFile(t)||We.isBlob(t)||We.isReadableStream(t))return t;if(We.isArrayBufferView(t))return t.buffer;if(We.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return gPe(t,this.formSerializer).toString();if((a=We.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return mD(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(r.setContentType("application/json",!1),yPe(t)):t}],transformResponse:[function(t){const r=this.transitional||fx.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(We.isResponse(t)||We.isReadableStream(t))return t;if(t&&We.isString(t)&&(n&&!this.responseType||i)){const s=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(a){if(s)throw a.name==="SyntaxError"?Ir.from(a,Ir.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:is.classes.FormData,Blob:is.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};We.forEach(["delete","get","head","post","put","patch"],e=>{fx.headers[e]={}});const CPe=We.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),bPe=e=>{const t={};let r,n,i;return e&&e.split(` `).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!r||t[r]&&CPe[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},wj=Symbol("internals");function jb(e){return e&&String(e).trim().toLowerCase()}function HR(e){return e===!1||e==null?e:We.isArray(e)?e.map(HR):String(e)}function SPe(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const wPe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function n_(e,t,r,n,i){if(We.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!We.isString(t)){if(We.isString(n))return t.indexOf(n)!==-1;if(We.isRegExp(n))return n.test(t)}}function xPe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function TPe(e,t){const r=We.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,o,s){return this[n].call(this,t,i,o,s)},configurable:!0})})}let Zs=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function o(a,l,c){const u=jb(l);if(!u)throw new Error("header name must be a non-empty string");const d=We.findKey(i,u);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=HR(a))}const s=(a,l)=>We.forEach(a,(c,u)=>o(c,u,l));if(We.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(We.isString(t)&&(t=t.trim())&&!wPe(t))s(bPe(t),r);else if(We.isObject(t)&&We.isIterable(t)){let a={},l,c;for(const u of t){if(!We.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[c=u[0]]=(l=a[c])?We.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}s(a,r)}else t!=null&&o(r,t,n);return this}get(t,r){if(t=jb(t),t){const n=We.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return SPe(i);if(We.isFunction(r))return r.call(this,i,n);if(We.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=jb(t),t){const n=We.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||n_(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function o(s){if(s=jb(s),s){const a=We.findKey(n,s);a&&(!r||n_(n,n[a],a,r))&&(delete n[a],i=!0)}}return We.isArray(t)?t.forEach(o):o(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const o=r[n];(!t||n_(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const r=this,n={};return We.forEach(this,(i,o)=>{const s=We.findKey(n,o);if(s){r[s]=HR(i),delete r[o];return}const a=t?xPe(o):String(o).trim();a!==o&&delete r[o],r[a]=HR(i),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return We.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&We.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[wj]=this[wj]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=jb(s);n[a]||(TPe(i,s),n[a]=!0)}return We.isArray(t)?t.forEach(o):o(t),this}};Zs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);We.reduceDescriptors(Zs.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});We.freezeMethods(Zs);function i_(e,t){const r=this||fx,n=t||r,i=Zs.from(n.headers);let o=n.data;return We.forEach(e,function(a){o=a.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Noe(e){return!!(e&&e.__CANCEL__)}let gx=class extends Ir{constructor(t,r,n){super(t??"canceled",Ir.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function Boe(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Ir("Request failed with status code "+r.status,[Ir.ERR_BAD_REQUEST,Ir.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function EPe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function RPe(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[o];s||(s=c),r[i]=l,n[i]=c;let d=o,h=0;for(;d!==i;)h+=r[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-s{r=u,i=null,o&&(clearTimeout(o),o=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-r;d>=n?s(c,u):(i=c,o||(o=setTimeout(()=>{o=null,s(i)},n-d)))},()=>i&&s(i)]}const UP=(e,t,r=3)=>{let n=0;const i=RPe(50,250);return PPe(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,l=s-n,c=i(l),u=s<=a;n=s;const d={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-s)/c:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},r)},xj=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Tj=e=>(...t)=>We.asap(()=>e(...t)),MPe=is.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,is.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(is.origin),is.navigator&&/(msie|trident)/i.test(is.navigator.userAgent)):()=>!0,IPe=is.hasStandardBrowserEnv?{write(e,t,r,n,i,o,s){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];We.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),We.isString(n)&&a.push(`path=${n}`),We.isString(i)&&a.push(`domain=${i}`),o===!0&&a.push("secure"),We.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function DPe(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function APe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function $oe(e,t,r){let n=!DPe(t);return e&&(n||r==!1)?APe(e,t):t}const Ej=e=>e instanceof Zs?{...e}:e;function qg(e,t){t=t||{};const r={};function n(c,u,d,h){return We.isPlainObject(c)&&We.isPlainObject(u)?We.merge.call({caseless:h},c,u):We.isPlainObject(u)?We.merge({},u):We.isArray(u)?u.slice():u}function i(c,u,d,h){if(We.isUndefined(u)){if(!We.isUndefined(c))return n(void 0,c,d,h)}else return n(c,u,d,h)}function o(c,u){if(!We.isUndefined(u))return n(void 0,u)}function s(c,u){if(We.isUndefined(u)){if(!We.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function a(c,u,d){if(d in t)return n(c,u);if(d in e)return n(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,u,d)=>i(Ej(c),Ej(u),d,!0)};return We.forEach(Object.keys({...e,...t}),function(u){if(u==="__proto__"||u==="constructor"||u==="prototype")return;const d=We.hasOwnProp(l,u)?l[u]:i,h=d(e[u],t[u],u);We.isUndefined(h)&&d!==a||(r[u]=h)}),r}const Goe=e=>{const t=qg({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=Zs.from(s),t.url=Ooe($oe(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),We.isFormData(r)){if(is.hasStandardBrowserEnv||is.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(We.isFunction(r.getHeaders)){const l=r.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&s.set(u,d)})}}if(is.hasStandardBrowserEnv&&(n&&We.isFunction(n)&&(n=n(t)),n||n!==!1&&MPe(t.url))){const l=i&&o&&IPe.read(o);l&&s.set(i,l)}return t},FPe=typeof XMLHttpRequest<"u",LPe=FPe&&function(e){return new Promise(function(r,n){const i=Goe(e);let o=i.data;const s=Zs.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,d,h,p,f;function g(){p&&p(),f&&f(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function v(){if(!m)return;const S=Zs.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:S,config:e,request:m};Boe(function(E){r(E),g()},function(E){n(E),g()},T),m=null}"onloadend"in m?m.onloadend=v:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(v)},m.onabort=function(){m&&(n(new Ir("Request aborted",Ir.ECONNABORTED,e,m)),m=null)},m.onerror=function(x){const T=x&&x.message?x.message:"Network Error",R=new Ir(T,Ir.ERR_NETWORK,e,m);R.event=x||null,n(R),m=null},m.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const T=i.transitional||AH;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),n(new Ir(x,T.clarifyTimeoutError?Ir.ETIMEDOUT:Ir.ECONNABORTED,e,m)),m=null},o===void 0&&s.setContentType(null),"setRequestHeader"in m&&We.forEach(s.toJSON(),function(x,T){m.setRequestHeader(T,x)}),We.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),a&&a!=="json"&&(m.responseType=i.responseType),c&&([h,f]=UP(c,!0),m.addEventListener("progress",h)),l&&m.upload&&([d,p]=UP(l),m.upload.addEventListener("progress",d),m.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(u=S=>{m&&(n(!S||S.type?new gx(null,e,m):S),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const b=EPe(i.url);if(b&&is.protocols.indexOf(b)===-1){n(new Ir("Unsupported protocol "+b+":",Ir.ERR_BAD_REQUEST,e));return}m.send(o||null)})},_Pe=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const o=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;n.abort(u instanceof Ir?u:new gx(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,o(new Ir(`timeout of ${t}ms exceeded`,Ir.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:l}=n;return l.unsubscribe=()=>We.asap(a),l}},OPe=function*(e,t){let r=e.byteLength;if(r{const i=kPe(e,t);let o=0,s,a=l=>{s||(s=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let d=u.byteLength;if(r){let h=o+=d;r(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},Pj=64*1024,{isFunction:_T}=We,BPe=(({Request:e,Response:t})=>({Request:e,Response:t}))(We.global),{ReadableStream:Mj,TextEncoder:Ij}=We.global,Dj=(e,...t)=>{try{return!!e(...t)}catch{return!1}},$Pe=e=>{e=We.merge.call({skipUndefined:!0},BPe,e);const{fetch:t,Request:r,Response:n}=e,i=t?_T(t):typeof fetch=="function",o=_T(r),s=_T(n);if(!i)return!1;const a=i&&_T(Mj),l=i&&(typeof Ij=="function"?(f=>g=>f.encode(g))(new Ij):async f=>new Uint8Array(await new r(f).arrayBuffer())),c=o&&a&&Dj(()=>{let f=!1;const g=new r(is.origin,{body:new Mj,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!g}),u=s&&a&&Dj(()=>We.isReadableStream(new n("").body)),d={stream:u&&(f=>f.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!d[f]&&(d[f]=(g,m)=>{let v=g&&g[f];if(v)return v.call(g);throw new Ir(`Response type '${f}' is not supported`,Ir.ERR_NOT_SUPPORT,m)})});const h=async f=>{if(f==null)return 0;if(We.isBlob(f))return f.size;if(We.isSpecCompliantForm(f))return(await new r(is.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(We.isArrayBufferView(f)||We.isArrayBuffer(f))return f.byteLength;if(We.isURLSearchParams(f)&&(f=f+""),We.isString(f))return(await l(f)).byteLength},p=async(f,g)=>{const m=We.toFiniteNumber(f.getContentLength());return m??h(g)};return async f=>{let{url:g,method:m,data:v,signal:b,cancelToken:S,timeout:x,onDownloadProgress:T,onUploadProgress:R,responseType:E,headers:M,withCredentials:D="same-origin",fetchOptions:A}=Goe(f),I=t||fetch;E=E?(E+"").toLowerCase():"text";let _=_Pe([b,S&&S.toAbortSignal()],x),F=null;const O=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let k;try{if(R&&c&&m!=="get"&&m!=="head"&&(k=await p(M,v))!==0){let V=new r(g,{method:"POST",body:v,duplex:"half"}),G;if(We.isFormData(v)&&(G=V.headers.get("content-type"))&&M.setContentType(G),V.body){const[K,q]=xj(k,UP(Tj(R)));v=Rj(V.body,Pj,K,q)}}We.isString(D)||(D=D?"include":"omit");const B=o&&"credentials"in r.prototype,H={...A,signal:_,method:m.toUpperCase(),headers:M.normalize().toJSON(),body:v,duplex:"half",credentials:B?D:void 0};F=o&&new r(g,H);let N=await(o?I(F,A):I(g,H));const z=u&&(E==="stream"||E==="response");if(u&&(T||z&&O)){const V={};["status","statusText","headers"].forEach(Y=>{V[Y]=N[Y]});const G=We.toFiniteNumber(N.headers.get("content-length")),[K,q]=T&&xj(G,UP(Tj(T),!0))||[];N=new n(Rj(N.body,Pj,K,()=>{q&&q(),O&&O()}),V)}E=E||"text";let U=await d[We.findKey(d,E)||"text"](N,f);return!z&&O&&O(),await new Promise((V,G)=>{Boe(V,G,{data:U,headers:Zs.from(N.headers),status:N.status,statusText:N.statusText,config:f,request:F})})}catch(B){throw O&&O(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new Ir("Network Error",Ir.ERR_NETWORK,f,F,B&&B.response),{cause:B.cause||B}):Ir.from(B,B&&B.code,f,F,B&&B.response)}}},GPe=new Map,Voe=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t,o=[n,i,r];let s=o.length,a=s,l,c,u=GPe;for(;a--;)l=o[a],c=u.get(l),c===void 0&&u.set(l,c=a?new Map:$Pe(t)),u=c;return c};Voe();const LH={http:nPe,xhr:LPe,fetch:{get:Voe}};We.forEach(LH,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Aj=e=>`- ${e}`,VPe=e=>We.isFunction(e)||e===null||e===!1;function zPe(e,t){e=We.isArray(e)?e:[e];const{length:r}=e;let n,i;const o={};for(let s=0;s`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=r?s.length>1?`since : `+s.map(Aj).join(` `):" "+Aj(s[0]):"as no adapter specified";throw new Ir("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i}const zoe={getAdapter:zPe,adapters:LH};function o_(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gx(null,e)}function Fj(e){return o_(e),e.headers=Zs.from(e.headers),e.data=i_.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),zoe.getAdapter(e.adapter||fx.adapter,e)(e).then(function(n){return o_(e),n.data=i_.call(e,e.transformResponse,n),n.headers=Zs.from(n.headers),n},function(n){return Noe(n)||(o_(e),n&&n.response&&(n.response.data=i_.call(e,e.transformResponse,n.response),n.response.headers=Zs.from(n.response.headers))),Promise.reject(n)})}const Hoe="1.13.6",vD={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{vD[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Lj={};vD.transitional=function(t,r,n){function i(o,s){return"[Axios v"+Hoe+"] Transitional option '"+o+"'"+s+(n?". "+n:"")}return(o,s,a)=>{if(t===!1)throw new Ir(i(s," has been removed"+(r?" in "+r:"")),Ir.ERR_DEPRECATED);return r&&!Lj[s]&&(Lj[s]=!0,console.warn(i(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,s,a):!0}};vD.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function HPe(e,t,r){if(typeof e!="object")throw new Ir("options must be an object",Ir.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],s=t[o];if(s){const a=e[o],l=a===void 0||s(a,o,e);if(l!==!0)throw new Ir("option "+o+" must be "+l,Ir.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ir("Unknown option "+o,Ir.ERR_BAD_OPTION)}}const WR={assertOptions:HPe,validators:vD},ja=WR.validators;let Ig=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Sj,response:new Sj}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=` `+o):n.stack=o}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=qg(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&WR.assertOptions(n,{silentJSONParsing:ja.transitional(ja.boolean),forcedJSONParsing:ja.transitional(ja.boolean),clarifyTimeoutError:ja.transitional(ja.boolean),legacyInterceptorReqResOrdering:ja.transitional(ja.boolean)},!1),i!=null&&(We.isFunction(i)?r.paramsSerializer={serialize:i}:WR.assertOptions(i,{encode:ja.function,serialize:ja.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),WR.assertOptions(r,{baseUrl:ja.spelling("baseURL"),withXsrfToken:ja.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=o&&We.merge(o.common,o[r.method]);o&&We.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),r.headers=Zs.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(r)===!1)return;l=l&&g.synchronous;const m=r.transitional||AH;m&&m.legacyInterceptorReqResOrdering?a.unshift(g.fulfilled,g.rejected):a.push(g.fulfilled,g.rejected)});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let u,d=0,h;if(!l){const f=[Fj.bind(this),void 0];for(f.unshift(...a),f.push(...c),h=f.length,u=Promise.resolve(r);d{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{n.subscribe(a),o=a}).then(i);return s.cancel=function(){n.unsubscribe(o)},s},t(function(o,s,a){n.reason||(n.reason=new gx(o,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Woe(function(i){t=i}),cancel:t}}};function UPe(e){return function(r){return e.apply(null,r)}}function jPe(e){return We.isObject(e)&&e.isAxiosError===!0}const _2={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(_2).forEach(([e,t])=>{_2[t]=e});function Uoe(e){const t=new Ig(e),r=Toe(Ig.prototype.request,t);return We.extend(r,Ig.prototype,t,{allOwnKeys:!0}),We.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return Uoe(qg(e,i))},r}const Wi=Uoe(fx);Wi.Axios=Ig;Wi.CanceledError=gx;Wi.CancelToken=WPe;Wi.isCancel=Noe;Wi.VERSION=Hoe;Wi.toFormData=mD;Wi.AxiosError=Ir;Wi.Cancel=Wi.CanceledError;Wi.all=function(t){return Promise.all(t)};Wi.spread=UPe;Wi.isAxiosError=jPe;Wi.mergeConfig=qg;Wi.AxiosHeaders=Zs;Wi.formToJSON=e=>koe(We.isHTMLForm(e)?new FormData(e):e);Wi.getAdapter=zoe.getAdapter;Wi.HttpStatusCode=_2;Wi.default=Wi;const{Axios:kkt,AxiosError:Nkt,CanceledError:Bkt,isCancel:$kt,CancelToken:Gkt,VERSION:Vkt,all:zkt,Cancel:Hkt,isAxiosError:Wkt,spread:Ukt,toFormData:jkt,AxiosHeaders:Kkt,HttpStatusCode:qkt,formToJSON:Ykt,getAdapter:Xkt,mergeConfig:Zkt}=Wi;function br(e){const t=y.useRef(e);return t.current=e,y.useCallback((...n)=>{var i;return(i=t.current)==null?void 0:i.call(t,...n)},[])}function xo(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}const _j=xo()?y.useLayoutEffect:y.useEffect,zr=(e,t)=>{const r=y.useRef(!0);_j(()=>e(r.current),t),_j(()=>(r.current=!1,()=>{r.current=!0}),[])},UR=(e,t)=>{zr(r=>{if(!r)return e()},t)},s0=e=>{const t=y.useRef(!1),[r,n]=y.useState(e);y.useEffect(()=>(t.current=!1,()=>{t.current=!0}),[]);function i(o,s){s&&t.current||n(o)}return[r,i]};function Fn(e,t){const[r,n]=y.useState(e),i=t!==void 0?t:r;return zr(o=>{o||n(t)},[t]),[i,n]}var s_={exports:{}},Mn={};/** * @license React * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Oj;function KPe(){if(Oj)return Mn;Oj=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"),s=Symbol.for("react.context"),a=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),f;f=Symbol.for("react.module.reference");function g(m){if(typeof m=="object"&&m!==null){var v=m.$$typeof;switch(v){case e:switch(m=m.type,m){case r:case i:case n:case c:case u:return m;default:switch(m=m&&m.$$typeof,m){case a:case s:case l:case h:case d:case o:return m;default:return v}}case t:return v}}}return Mn.ContextConsumer=s,Mn.ContextProvider=o,Mn.Element=e,Mn.ForwardRef=l,Mn.Fragment=r,Mn.Lazy=h,Mn.Memo=d,Mn.Portal=t,Mn.Profiler=i,Mn.StrictMode=n,Mn.Suspense=c,Mn.SuspenseList=u,Mn.isAsyncMode=function(){return!1},Mn.isConcurrentMode=function(){return!1},Mn.isContextConsumer=function(m){return g(m)===s},Mn.isContextProvider=function(m){return g(m)===o},Mn.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Mn.isForwardRef=function(m){return g(m)===l},Mn.isFragment=function(m){return g(m)===r},Mn.isLazy=function(m){return g(m)===h},Mn.isMemo=function(m){return g(m)===d},Mn.isPortal=function(m){return g(m)===t},Mn.isProfiler=function(m){return g(m)===i},Mn.isStrictMode=function(m){return g(m)===n},Mn.isSuspense=function(m){return g(m)===c},Mn.isSuspenseList=function(m){return g(m)===u},Mn.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===i||m===n||m===c||m===u||m===p||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===d||m.$$typeof===o||m.$$typeof===s||m.$$typeof===l||m.$$typeof===f||m.getModuleId!==void 0)},Mn.typeOf=g,Mn}var kj;function qPe(){return kj||(kj=1,s_.exports=KPe()),s_.exports}var a_=qPe();function bm(e,t,r){const n=y.useRef({});return(!("value"in n.current)||r(n.current.condition,t))&&(n.current.value=e(),n.current.condition=t),n.current.value}const YPe=Symbol.for("react.element"),XPe=Symbol.for("react.transitional.element"),ZPe=Symbol.for("react.fragment");function joe(e){return e&&typeof e=="object"&&(e.$$typeof===YPe||e.$$typeof===XPe)&&e.type===ZPe}const JPe=Number(y.version.split(".")[0]),O2=(e,t)=>{typeof e=="function"?e(t):typeof e=="object"&&e&&"current"in e&&(e.current=t)},zo=(...e)=>{const t=e.filter(Boolean);return t.length<=1?t[0]:r=>{e.forEach(n=>{O2(n,r)})}},xu=(...e)=>bm(()=>zo(...e),e,(t,r)=>t.length!==r.length||t.every((n,i)=>n!==r[i])),cu=e=>{var r,n;if(!e)return!1;if(_H(e)&&JPe>=19)return!0;const t=a_.isMemo(e)?e.type.type:e.type;return!(typeof t=="function"&&!((r=t.prototype)!=null&&r.render)&&t.$$typeof!==a_.ForwardRef||typeof e=="function"&&!((n=e.prototype)!=null&&n.render)&&e.$$typeof!==a_.ForwardRef)};function _H(e){return y.isValidElement(e)&&!joe(e)}const QPe=e=>_H(e)&&cu(e),zd=e=>{if(e&&_H(e)){const t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function qs(e,t){let r=e;for(let n=0;n"u"?Object.keys:Reflect.ownKeys;function qoe(e,t={}){const{prepareArray:r}=t,n=r||(()=>[]);let i=Nj(e[0]);return e.forEach(o=>{function s(a,l){const c=new Set(l),u=qs(o,a),d=Array.isArray(u);if(d||eMe(u)){if(!c.has(u)){c.add(u);const h=qs(i,a);d?i=rl(i,a,n(h,u)):(!h||typeof h!="object")&&(i=rl(i,a,Nj(u))),tMe(u).forEach(p=>{Object.getOwnPropertyDescriptor(u,p).enumerable&&s([...a,p],c)})}}else i=rl(i,a,u)}s([])}),i}function Xv(...e){return qoe(e)}let k2={};const rMe=e=>{};function nMe(e,t){}function iMe(e,t){}function oMe(){k2={}}function Yoe(e,t,r){!t&&!k2[r]&&(e(!1,r),k2[r]=!0)}function Hn(e,t){Yoe(nMe,e,t)}function sMe(e,t){Yoe(iMe,e,t)}Hn.preMessage=rMe;Hn.resetWarned=oMe;Hn.noteOnce=sMe;function En(e,t){const r=Object.assign({},e);return Array.isArray(t)&&t.forEach(n=>{delete r[n]}),r}function Di(e,t={}){let r=[];return Q.Children.forEach(e,n=>{n==null&&!t.keepEmpty||(Array.isArray(n)?r=r.concat(Di(n)):joe(n)&&n.props?r=r.concat(Di(n.props.children,t)):r.push(n))}),r}function aMe(){}const lMe=y.createContext({}),CC=()=>{const e=()=>{};return e.deprecated=aMe,e};function Dy(e){return e instanceof HTMLElement||e instanceof SVGElement}function lc(e){return e&&typeof e=="object"&&Dy(e.nativeElement)?e.nativeElement:Dy(e)?e:null}const N2=y.createContext(null);function cMe({children:e,onBatchResize:t}){const r=y.useRef(0),n=y.useRef([]),i=y.useContext(N2),o=y.useCallback((s,a,l)=>{r.current+=1;const c=r.current;n.current.push({size:s,element:a,data:l}),Promise.resolve().then(()=>{c===r.current&&(t==null||t(n.current),n.current=[])}),i==null||i(s,a,l)},[t,i]);return y.createElement(N2.Provider,{value:o},e)}const qh=new Map;function uMe(e){e.forEach(t=>{var n;const{target:r}=t;(n=qh.get(r))==null||n.forEach(i=>i(r))})}let l_;function Xoe(){return l_||(l_=new ResizeObserver(uMe)),l_}function dMe(e,t){qh.has(e)||(qh.set(e,new Set),Xoe().observe(e)),qh.get(e).add(t)}function hMe(e,t){qh.has(e)&&(qh.get(e).delete(t),qh.get(e).size||(Xoe().unobserve(e),qh.delete(e)))}function Zoe(e,t,r,n){const i=y.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),o=br(a=>{const{width:l,height:c}=a.getBoundingClientRect(),{offsetWidth:u,offsetHeight:d}=a,h=Math.floor(l),p=Math.floor(c);if(i.current.width!==h||i.current.height!==p||i.current.offsetWidth!==u||i.current.offsetHeight!==d){const f={width:h,height:p,offsetWidth:u,offsetHeight:d};i.current=f;const g=u===Math.round(l)?l:u,m=d===Math.round(c)?c:d,v={...f,offsetWidth:g,offsetHeight:m};n==null||n(v,a),Promise.resolve().then(()=>{r==null||r(v,a)})}}),s=typeof t=="function";y.useEffect(()=>{const a=s?t():t;return a&&e&&dMe(a,o),()=>{a&&hMe(a,o)}},[e,s?0:t])}function pMe(e,t){const{children:r,disabled:n,onResize:i,data:o}=e,s=y.useRef(null),a=y.useContext(N2),l=typeof r=="function",c=l?r(s):r,u=!l&&y.isValidElement(c)&&cu(c),d=u?zd(c):null,h=xu(d,s),p=()=>lc(s.current);return y.useImperativeHandle(t,()=>p()),Zoe(!n,p,i,(f,g)=>{a==null||a(f,g,o)}),u?y.cloneElement(c,{ref:h}):c}const fMe=y.forwardRef(pMe);function B2(){return B2=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const s=(i==null?void 0:i.key)||`${gMe}-${o}`;return y.createElement(fMe,B2({},e,{key:s,ref:o===0?t:void 0}),i)})}const Js=y.forwardRef(mMe);Js.Collection=cMe;function Joe(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;te.length)&&(t=e.length);for(var r=0,n=Array(t);r+setTimeout(e,16),tse=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(ese=e=>window.requestAnimationFrame(e),tse=e=>window.cancelAnimationFrame(e));let Bj=0;const OH=new Map;function rse(e){OH.delete(e)}const Lr=(e,t=1)=>{Bj+=1;const r=Bj;function n(i){if(i===0)rse(r),e();else{const o=ese(()=>{n(i-1)});OH.set(r,o)}}return n(t),r};Lr.cancel=e=>{const t=OH.get(e);return rse(e),tse(t)};function bMe(e){let t=null;const r=i=>()=>{t=null,e.apply(void 0,Nr(i))},n=(...i)=>{t===null&&(t=Lr(r(i)))};return n.cancel=()=>{Lr.cancel(t),t=null},n}const a0="ant",yD="anticon",SMe=["outlined","borderless","filled","underlined"],wMe=(e,t)=>t||(e?`${a0}-${e}`:a0),or=y.createContext({getPrefixCls:wMe,iconPrefixCls:yD}),{Consumer:Jkt}=or,$j={};function Ur(e){const t=y.useContext(or),{getPrefixCls:r,direction:n,getPopupContainer:i,renderEmpty:o}=t,s=t[e];return{classNames:$j,styles:$j,...s,getPrefixCls:r,direction:n,getPopupContainer:i,renderEmpty:o}}function l0(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 G2(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let r=t;for(;r;){if(r===e)return!0;r=r.parentNode}return!1}const Gj="data-rc-order",Vj="data-rc-priority",xMe="rc-util-key",V2=new Map;function nse({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:xMe}function CD(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function TMe(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function kH(e){return Array.from((V2.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function ise(e,t={}){if(!xo())return null;const{csp:r,prepend:n,priority:i=0}=t,o=TMe(n),s=o==="prependQueue",a=document.createElement("style");a.setAttribute(Gj,o),s&&i&&a.setAttribute(Vj,`${i}`),r!=null&&r.nonce&&(a.nonce=r==null?void 0:r.nonce),a.innerHTML=e;const l=CD(t),{firstChild:c}=l;if(n){if(s){const u=(t.styles||kH(l)).filter(d=>{if(!["prepend","prependQueue"].includes(d.getAttribute(Gj)))return!1;const h=Number(d.getAttribute(Vj)||0);return i>=h});if(u.length)return l.insertBefore(a,u[u.length-1].nextSibling),a}l.insertBefore(a,c)}else l.appendChild(a);return a}function ose(e,t={}){let{styles:r}=t;return r||(r=kH(CD(t))),r.find(n=>n.getAttribute(nse(t))===e)}function c0(e,t={}){const r=ose(e,t);r&&CD(t).removeChild(r)}function EMe(e,t){const r=V2.get(e);if(!r||!G2(document,r)){const n=ise("",t),{parentNode:i}=n;V2.set(e,i),e.removeChild(n)}}function sp(e,t,r={}){var l,c,u;const n=CD(r),i=kH(n),o={...r,styles:i};EMe(n,o);const s=ose(t,o);if(s)return(l=o.csp)!=null&&l.nonce&&s.nonce!==((c=o.csp)==null?void 0:c.nonce)&&(s.nonce=(u=o.csp)==null?void 0:u.nonce),s.innerHTML!==e&&(s.innerHTML=e),s;const a=ise(e,o);return a.setAttribute(nse(o),t),a}function cc(e,t,r=!1){const n=new Set;function i(o,s,a=1){const l=n.has(o);if(Hn(!l,"Warning: There may be circular references"),l)return!1;if(o===s)return!0;if(r&&a>1)return!1;n.add(o);const c=a+1;if(Array.isArray(o)){if(!Array.isArray(s)||o.length!==s.length)return!1;for(let u=0;ui(o[d],s[d],c))}return!1}return i(e,t)}const RMe="%";function z2(e){return e.join(RMe)}let zj=0;class PMe{constructor(t){Ae(this,"instanceId");Ae(this,"cache",new Map);Ae(this,"updateTimes",new Map);Ae(this,"extracted",new Set);this.instanceId=t}get(t){return this.opGet(z2(t))}opGet(t){return this.cache.get(t)||null}update(t,r){return this.opUpdate(z2(t),r)}opUpdate(t,r){const n=this.cache.get(t),i=r(n);i===null?(this.cache.delete(t),this.updateTimes.delete(t)):(this.cache.set(t,i),this.updateTimes.set(t,zj),zj+=1)}}const NH="data-token-hash",gd="data-css-hash",rd="__cssinjs_instance__";function MMe(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${gd}]`)||[],{firstChild:r}=document.head;Array.from(t).forEach(i=>{i[rd]||(i[rd]=e),i[rd]===e&&document.head.insertBefore(i,r)});const n={};Array.from(document.querySelectorAll(`style[${gd}]`)).forEach(i=>{var s;const o=i.getAttribute(gd);n[o]?i[rd]===e&&((s=i.parentNode)==null||s.removeChild(i)):n[o]=!0})}return new PMe(e)}const mx=y.createContext({hashPriority:"low",cache:MMe(),defaultCache:!0,autoPrefix:!1});function IMe(e,t){if(e.length!==t.length)return!1;for(let r=0;r{var o;n?n=(o=n==null?void 0:n.map)==null?void 0:o.get(i):n=void 0}),n!=null&&n.value&&r&&(n.value[1]=this.cacheCallTimes++),n==null?void 0:n.value}get(t){var r;return(r=this.internalGet(t,!0))==null?void 0:r[0]}has(t){return!!this.internalGet(t)}set(t,r){if(!this.has(t)){if(this.size()+1>uy.MAX_CACHE_SIZE+uy.MAX_CACHE_OFFSET){const[i]=this.keys.reduce((o,s)=>{const[,a]=o;return this.internalGet(s)[1]{if(o===t.length-1)n.set(i,{value:[r,this.cacheCallTimes++]});else{const s=n.get(i);s?s.map||(s.map=new Map):n.set(i,{map:new Map}),n=n.get(i).map}})}deleteByPath(t,r){var o;const n=t.get(r[0]);if(r.length===1)return n.map?t.set(r[0],{map:n.map}):t.delete(r[0]),(o=n.value)==null?void 0:o[0];const i=this.deleteByPath(n.map,r.slice(1));return(!n.map||n.map.size===0)&&!n.value&&t.delete(r[0]),i}delete(t){if(this.has(t))return this.keys=this.keys.filter(r=>!IMe(r,t)),this.deleteByPath(this.cache,t)}};Ae(uy,"MAX_CACHE_SIZE",20),Ae(uy,"MAX_CACHE_OFFSET",5);let H2=uy,Hj=0;class sse{constructor(t){Ae(this,"derivatives");Ae(this,"id");this.derivatives=Array.isArray(t)?t:[t],this.id=Hj,t.length===0&&(t.length>0,void 0),Hj+=1}getDerivativeToken(t){return this.derivatives.reduce((r,n)=>n(t,r),void 0)}}const c_=new H2;function W2(e){const t=Array.isArray(e)?e:[e];return c_.has(t)||c_.set(t,new sse(t)),c_.get(t)}const DMe=new WeakMap,u_={};function AMe(e,t){let r=DMe;for(let n=0;n{const n=e[r];t+=r,n instanceof sse?t+=n.id:n&&typeof n=="object"?t+=gw(n):t+=n}),t=l0(t),Wj.set(e,t)),t}function FMe(e,t){return l0(`${t}_${gw(e)}`)}const U2=xo();function ae(e){return typeof e=="number"?`${e}px`:e}function ase(e){const{hashCls:t,hashPriority:r="low"}=e||{};if(!t)return"";const n=`.${t}`;return r==="low"?`:where(${n})`:n}const LMe=e=>e!=null;function BH(e,t){const r=typeof t=="function"?t():t;return r?{...e,csp:{...e.csp,nonce:r}}:e}const jR=(e,t="")=>`--${t?`${t}-`:""}${e}`.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(),_Me=(e,t,r)=>{const{hashCls:n,hashPriority:i="low",scope:o}=r||{};if(!Object.keys(e).length)return"";const s=`${ase({hashCls:n,hashPriority:i})}.${t}`,a=[o].flat().filter(Boolean);return`${a.length?a.map(c=>`${s}.${c}`).join(", "):s}{${Object.entries(e).map(([c,u])=>`${c}:${u};`).join("")}}`},lse=(e,t,r)=>{const{hashCls:n,hashPriority:i="low",prefix:o,unitless:s,ignore:a,preserve:l}=r||{},c={},u={};return Object.entries(e).forEach(([d,h])=>{if(l!=null&&l[d])u[d]=h;else if((typeof h=="string"||typeof h=="number")&&!(a!=null&&a[d])){const p=jR(d,o);c[p]=typeof h=="number"&&!(s!=null&&s[d])?`${h}px`:String(h),u[d]=`var(${p})`}}),[u,_Me(c,t,{scope:r==null?void 0:r.scope,hashCls:n,hashPriority:i})]},OT=new Map;function $H(e,t,r,n,i){const{cache:o}=y.useContext(mx),s=[e,...t],a=z2(s),l=d=>{o.opUpdate(a,h=>{const[p=0,f]=h||[void 0,void 0],m=f||r(),v=[p,m];return d?d(v):v})};y.useMemo(()=>{l()},[a]);const u=o.opGet(a)[1];return y.useInsertionEffect(()=>(l(([d,h])=>[d+1,h]),OT.has(a)||(i==null||i(u),OT.set(a,!0),Promise.resolve().then(()=>{OT.delete(a)})),()=>{o.opUpdate(a,d=>{const[h=0,p]=d||[];return h-1===0?(n==null||n(p,!1),OT.delete(a),null):[h-1,p]})}),[a]),u}const OMe={},kMe="css",tg=new Map;function NMe(e){tg.set(e,(tg.get(e)||0)+1)}function BMe(e,t){typeof document<"u"&&document.querySelectorAll(`style[${NH}="${e}"]`).forEach(n=>{var i;n[rd]===t&&((i=n.parentNode)==null||i.removeChild(n))})}const $Me=-1;function GMe(e,t){tg.set(e,(tg.get(e)||0)-1);const r=new Set;tg.forEach((n,i)=>{n<=0&&r.add(i)}),tg.size-r.size>$Me&&r.forEach(n=>{BMe(n,t),tg.delete(n)})}const VMe=(e,t,r,n)=>{let o={...r.getDerivativeToken(e),...t};return n&&(o=n(o)),o},zMe="token";function HMe(e,t,r){const{cache:{instanceId:n},container:i,hashPriority:o}=y.useContext(mx),{salt:s="",override:a=OMe,formatToken:l,getComputedToken:c,cssVar:u,nonce:d}=r,h=AMe(()=>Object.assign({},...t),t),p=gw(h),f=gw(a),g=gw(u);return $H(zMe,[s,e.id,p,f,g],()=>{const v=c?c(h,a,e):VMe(h,a,e,l),b={...v},S=`${s}_${u.prefix}`,x=l0(S),T=`${kMe}-${x}`;b._tokenKey=FMe(b,S);const[R,E]=lse(v,u.key,{prefix:u.prefix,ignore:u.ignore,unitless:u.unitless,preserve:u.preserve,hashPriority:o,hashCls:u.hashed?T:void 0});return R._hashId=x,NMe(u.key),[R,T,b,E,u.key]},([,,,,v])=>{GMe(v,n)},([,,,v,b])=>{if(!v)return;let S={mark:gd,prepend:"queue",attachTo:i,priority:-999};S=BH(S,d);const x=sp(v,l0(`css-var-${b}`),S);x[rd]=n,x.setAttribute(NH,b)})}var WMe={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},Yn="-ms-",mw="-moz-",Sn="-webkit-",cse="comm",GH="rule",VH="decl",UMe="@import",jMe="@namespace",use="@keyframes",KMe="@layer",dse=Math.abs,zH=String.fromCharCode,j2=Object.assign;function qMe(e,t){return Qi(e,0)^45?(((t<<2^Qi(e,0))<<2^Qi(e,1))<<2^Qi(e,2))<<2^Qi(e,3):0}function hse(e){return e.trim()}function Zu(e,t){return(e=t.exec(e))?e[0]:e}function Xr(e,t,r){return e.replace(t,r)}function KR(e,t,r){return e.indexOf(t,r)}function Qi(e,t){return e.charCodeAt(t)|0}function Yg(e,t,r){return e.slice(t,r)}function Ul(e){return e.length}function pse(e){return e.length}function US(e,t){return t.push(e),e}function YMe(e,t){return e.map(t).join("")}function Uj(e,t){return e.filter(function(r){return!Zu(r,t)})}var bD=1,Ay=1,fse=0,vl=0,Vi=0,bC="";function SD(e,t,r,n,i,o,s,a){return{value:e,root:t,parent:r,type:n,props:i,children:o,line:bD,column:Ay,length:s,return:"",siblings:a}}function Mh(e,t){return j2(SD("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function iv(e){for(;e.root;)e=Mh(e.root,{children:[e]});US(e,e.siblings)}function XMe(){return Vi}function ZMe(){return Vi=vl>0?Qi(bC,--vl):0,Ay--,Vi===10&&(Ay=1,bD--),Vi}function Ql(){return Vi=vl2||u0(Vi)>3?"":" "}function tIe(e,t){for(;--t&&Ql()&&!(Vi<48||Vi>102||Vi>57&&Vi<65||Vi>70&&Vi<97););return wD(e,qR()+(t<6&&Yh()==32&&Ql()==32))}function K2(e){for(;Ql();)switch(Vi){case e:return vl;case 34:case 39:e!==34&&e!==39&&K2(Vi);break;case 40:e===41&&K2(e);break;case 92:Ql();break}return vl}function rIe(e,t){for(;Ql()&&e+Vi!==57;)if(e+Vi===84&&Yh()===47)break;return"/*"+wD(t,vl-1)+"*"+zH(e===47?e:Ql())}function nIe(e){for(;!u0(Yh());)Ql();return wD(e,vl)}function jj(e){return QMe(YR("",null,null,null,[""],e=JMe(e),0,[0],e))}function YR(e,t,r,n,i,o,s,a,l){for(var c=0,u=0,d=s,h=0,p=0,f=0,g=1,m=1,v=1,b=0,S="",x=i,T=o,R=n,E=S;m;)switch(f=b,b=Ql()){case 40:if(f!=108&&Qi(E,d-1)==58){KR(E+=Xr(d_(b),"&","&\f"),"&\f",dse(c?a[c-1]:0))!=-1&&(v=-1);break}case 34:case 39:case 91:E+=d_(b);break;case 9:case 10:case 13:case 32:E+=eIe(f);break;case 92:E+=tIe(qR()-1,7);continue;case 47:switch(Yh()){case 42:case 47:US(iIe(rIe(Ql(),qR()),t,r,l),l),(u0(f||1)==5||u0(Yh()||1)==5)&&Ul(E)&&Yg(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*g:a[c++]=Ul(E)*v;case 125*g:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+u:v==-1&&(E=Xr(E,/\f/g,"")),p>0&&(Ul(E)-d||g===0&&f===47)&&US(p>32?qj(E+";",n,r,d-1,l):qj(Xr(E," ","")+";",n,r,d-2,l),l);break;case 59:E+=";";default:if(US(R=Kj(E,t,r,c,u,i,a,S,x=[],T=[],d,o),o),b===123)if(u===0)YR(E,t,R,R,x,o,d,a,T);else{switch(h){case 99:if(Qi(E,3)===110)break;case 108:if(Qi(E,2)===97)break;default:u=0;case 100:case 109:case 115:}u?YR(e,R,R,n&&US(Kj(e,R,R,0,0,i,a,S,i,x=[],d,T),T),i,T,d,a,n?x:T):YR(E,R,R,R,[""],T,0,a,T)}}c=u=p=0,g=v=1,S=E="",d=s;break;case 58:d=1+Ul(E),p=f;default:if(g<1){if(b==123)--g;else if(b==125&&g++==0&&ZMe()==125)continue}switch(E+=zH(b),b*g){case 38:v=u>0?1:(E+="\f",-1);break;case 44:a[c++]=(Ul(E)-1)*v,v=1;break;case 64:Yh()===45&&(E+=d_(Ql())),h=Yh(),u=d=Ul(S=E+=nIe(qR())),b++;break;case 45:f===45&&Ul(E)==2&&(g=0)}}return o}function Kj(e,t,r,n,i,o,s,a,l,c,u,d){for(var h=i-1,p=i===0?o:[""],f=pse(p),g=0,m=0,v=0;g0?p[b]+" "+S:Xr(S,/&\f/g,p[b])))&&(l[v++]=x);return SD(e,t,r,i===0?GH:a,l,c,u,d)}function iIe(e,t,r,n){return SD(e,t,r,cse,zH(XMe()),Yg(e,2,-2),0,n)}function qj(e,t,r,n,i){return SD(e,t,r,VH,Yg(e,0,n),Yg(e,n+1,-1),n,i)}function gse(e,t,r){switch(qMe(e,t)){case 5103:return Sn+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Sn+e+e;case 4855:return Sn+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return mw+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Sn+e+mw+e+Yn+e+e;case 5936:switch(Qi(e,t+11)){case 114:return Sn+e+Yn+Xr(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Sn+e+Yn+Xr(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Sn+e+Yn+Xr(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Sn+e+Yn+e+e;case 6165:return Sn+e+Yn+"flex-"+e+e;case 5187:return Sn+e+Xr(e,/(\w+).+(:[^]+)/,Sn+"box-$1$2"+Yn+"flex-$1$2")+e;case 5443:return Sn+e+Yn+"flex-item-"+Xr(e,/flex-|-self/g,"")+(Zu(e,/flex-|baseline/)?"":Yn+"grid-row-"+Xr(e,/flex-|-self/g,""))+e;case 4675:return Sn+e+Yn+"flex-line-pack"+Xr(e,/align-content|flex-|-self/g,"")+e;case 5548:return Sn+e+Yn+Xr(e,"shrink","negative")+e;case 5292:return Sn+e+Yn+Xr(e,"basis","preferred-size")+e;case 6060:return Sn+"box-"+Xr(e,"-grow","")+Sn+e+Yn+Xr(e,"grow","positive")+e;case 4554:return Sn+Xr(e,/([^-])(transform)/g,"$1"+Sn+"$2")+e;case 6187:return Xr(Xr(Xr(e,/(zoom-|grab)/,Sn+"$1"),/(image-set)/,Sn+"$1"),e,"")+e;case 5495:case 3959:return Xr(e,/(image-set\([^]*)/,Sn+"$1$`$1");case 4968:return Xr(Xr(e,/(.+:)(flex-)?(.*)/,Sn+"box-pack:$3"+Yn+"flex-pack:$3"),/space-between/,"justify")+Sn+e+e;case 4200:if(!Zu(e,/flex-|baseline/))return Yn+"grid-column-align"+Yg(e,t)+e;break;case 2592:case 3360:return Yn+Xr(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,i){return t=i,Zu(n.props,/grid-\w+-end/)})?~KR(e+(r=r[t].value),"span",0)?e:Yn+Xr(e,"-start","")+e+Yn+"grid-row-span:"+(~KR(r,"span",0)?Zu(r,/\d+/):+Zu(r,/\d+/)-+Zu(e,/\d+/))+";":Yn+Xr(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return Zu(n.props,/grid-\w+-start/)})?e:Yn+Xr(Xr(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Xr(e,/(.+)-inline(.+)/,Sn+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ul(e)-1-t>6)switch(Qi(e,t+1)){case 109:if(Qi(e,t+4)!==45)break;case 102:return Xr(e,/(.+:)(.+)-([^]+)/,"$1"+Sn+"$2-$3$1"+mw+(Qi(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~KR(e,"stretch",0)?gse(Xr(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Xr(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,i,o,s,a,l,c){return Yn+i+":"+o+c+(s?Yn+i+"-span:"+(a?l:+l-+o)+c:"")+e});case 4949:if(Qi(e,t+6)===121)return Xr(e,":",":"+Sn)+e;break;case 6444:switch(Qi(e,Qi(e,14)===45?18:11)){case 120:return Xr(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Sn+(Qi(e,14)===45?"inline-":"")+"box$3$1"+Sn+"$2$3$1"+Yn+"$2box$3")+e;case 100:return Xr(e,":",":"+Yn)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Xr(e,"scroll-","scroll-snap-")+e}return e}function d0(e,t){for(var r="",n=0;n-1&&!e.return)switch(e.type){case VH:e.return=gse(e.value,e.length,r);return;case use:return d0([Mh(e,{value:Xr(e.value,"@","@"+Sn)})],n);case GH:if(e.length)return YMe(r=e.props,function(i){switch(Zu(i,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":iv(Mh(e,{props:[Xr(i,/:(read-\w+)/,":"+mw+"$1")]})),iv(Mh(e,{props:[i]})),j2(e,{props:Uj(r,n)});break;case"::placeholder":iv(Mh(e,{props:[Xr(i,/:(plac\w+)/,":"+Sn+"input-$1")]})),iv(Mh(e,{props:[Xr(i,/:(plac\w+)/,":"+mw+"$1")]})),iv(Mh(e,{props:[Xr(i,/:(plac\w+)/,Yn+"input-$1")]})),iv(Mh(e,{props:[i]})),j2(e,{props:Uj(r,n)});break}return""})}}const Xj="data-ant-cssinjs-cache-path",mse="_FILE_STYLE__";let Dg,vse=!0;function aIe(){var e;if(!Dg&&(Dg={},xo())){const t=document.createElement("div");t.className=Xj,t.style.position="fixed",t.style.visibility="hidden",t.style.top="-9999px",document.body.appendChild(t);let r=getComputedStyle(t).content||"";r=r.replace(/^"/,"").replace(/"$/,""),r.split(";").forEach(i=>{const[o,s]=i.split(":");Dg[o]=s});const n=document.querySelector(`style[${Xj}]`);n&&(vse=!1,(e=n.parentNode)==null||e.removeChild(n)),document.body.removeChild(t)}}function lIe(e){return aIe(),!!Dg[e]}function cIe(e){const t=Dg[e];let r=null;if(t&&xo())if(vse)r=mse;else{const n=document.querySelector(`style[${gd}="${Dg[e]}"]`);n?r=n.innerHTML:delete Dg[e]}return[r,t]}const uIe="_skip_check_",yse="_multi_value_";function h_(e,t){return(t?d0(jj(e),oIe([sIe,Yj])):d0(jj(e),Yj)).replace(/\{%%%\:[^;];}/g,";")}function dIe(e){return typeof e=="object"&&e&&(uIe in e||yse in e)}function Zj(e,t,r="high"){if(!t)return e;const n=ase({hashCls:t,hashPriority:r});return e.split(",").map(o=>{var c;const s=o.trim().split(/\s+/);let a=s[0]||"";const l=((c=a.match(/^\w+/))==null?void 0:c[0])||"";return a=`${l}${n}${a.slice(l.length)}`,[a,...s.slice(1)].join(" ")}).join(",")}const q2=(e,t={},{root:r,injectHash:n,parentSelectors:i}={root:!0,parentSelectors:[]})=>{const{hashId:o,layer:s,path:a,hashPriority:l,transformers:c=[],linters:u=[]}=t;let d="",h={};function p(m){const v=m.getName(o);if(!h[v]){const[b]=q2(m.style,t,{root:!1,parentSelectors:i});h[v]=`@keyframes ${m.getName(o)}${b}`}}function f(m,v=[]){return m.forEach(b=>{Array.isArray(b)?f(b,v):b&&v.push(b)}),v}return f(Array.isArray(e)?e:[e]).forEach(m=>{const v=typeof m=="string"&&!r?{}:m;if(typeof v=="string")d+=`${v} `;else if(v._keyframe)p(v);else{const b=c.reduce((S,x)=>{var T;return((T=x==null?void 0:x.visit)==null?void 0:T.call(x,S))||S},v);Object.keys(b).forEach(S=>{const x=b[S];if(typeof x=="object"&&x&&(S!=="animationName"||!x._keyframe)&&!dIe(x)){let T=!1,R=S.trim(),E=!1;(r||n)&&o?R.startsWith("@")?T=!0:R==="&"?R=Zj("",o,l):R=Zj(S,o,l):r&&!o&&(R==="&"||R==="")&&(R="",E=!0);const[M,D]=q2(x,t,{root:E,injectHash:T,parentSelectors:[...i,R]});h={...h,...D},d+=`${R}${M}`}else{let T=function(E,M){const D=E.replace(/[A-Z]/g,I=>`-${I.toLowerCase()}`);let A=M;!WMe[E]&&typeof A=="number"&&A!==0&&(A=`${A}px`),E==="animationName"&&(M!=null&&M._keyframe)&&(p(M),A=M.getName(o)),d+=`${D}:${A};`};const R=(x==null?void 0:x.value)??x;typeof x=="object"&&(x!=null&&x[yse])&&Array.isArray(R)?R.forEach(E=>{T(S,E)}):LMe(R)&&T(S,R)}})}}),r?s&&(d&&(d=`@layer ${s.name} {${d}}`),s.dependencies&&(h[`@layer ${s.name}`]=s.dependencies.map(m=>`@layer ${m}, ${s.name};`).join(` `))):d=`{${d}}`,[d,h]};function Cse(e,t){return l0(`${e.join("%")}${t}`)}const hIe="style";function Y2(e,t){const{path:r,hashId:n,layer:i,nonce:o,clientOnly:s,order:a=0}=e,{mock:l,hashPriority:c,container:u,transformers:d,linters:h,cache:p,layer:f,autoPrefix:g}=y.useContext(mx),m=[n||""];f&&m.push("layer"),m.push(...r);let v=U2;$H(hIe,m,()=>{const b=m.join("|");if(lIe(b)){const[M,D]=cIe(b);if(M)return[M,D,{},s,a]}const S=t(),[x,T]=q2(S,{hashId:n,hashPriority:c,layer:f?i:void 0,path:r.join("-"),transformers:d,linters:h}),R=h_(x,g||!1),E=Cse(m,R);return[R,E,T,s,a]},(b,S)=>{const[,x]=b;S&&U2&&c0(x,{mark:gd,attachTo:u})},b=>{const[S,x,T,,R]=b;if(v&&S!==mse){let E={mark:gd,prepend:f?!1:"queue",attachTo:u,priority:R};E=BH(E,o);const M=[],D=[];Object.keys(T).forEach(I=>{I.startsWith("@layer")?M.push(I):D.push(I)}),M.forEach(I=>{sp(h_(T[I],g||!1),`_layer-${I}`,{...E,prepend:!0})});const A=sp(S,x,E);A[rd]=p.instanceId,D.forEach(I=>{sp(h_(T[I],g||!1),`_effect-${I}`,E)})}})}const pIe="cssVar",fIe=(e,t)=>{const{key:r,prefix:n,unitless:i,ignore:o,token:s,hashId:a,scope:l,nonce:c}=e,{cache:{instanceId:u},container:d,hashPriority:h}=y.useContext(mx),{_tokenKey:p}=s,f=Array.isArray(l)?l.join("@@"):l,g=[...e.path,r,f,p];return $H(pIe,g,()=>{const v=t(),[b,S]=lse(v,r,{prefix:n,unitless:i,ignore:o,scope:l,hashPriority:h,hashCls:a}),x=Cse(g,S);return[b,S,x,r]},([,,v])=>{U2&&c0(v,{mark:gd,attachTo:d})},([,v,b])=>{if(!v)return;let S={mark:gd,prepend:"queue",attachTo:d,priority:-999};S=BH(S,c);const x=sp(v,b,S);x[rd]=u,x.setAttribute(NH,r)})};class Zr{constructor(t,r){Ae(this,"name");Ae(this,"style");Ae(this,"_keyframe",!0);this.name=t,this.style=r}getName(t=""){return t?`${t}-${this.name}`:this.name}}function ov(e){return e.notSplit=!0,e}ov(["borderTop","borderBottom"]),ov(["borderTop"]),ov(["borderBottom"]),ov(["borderLeft","borderRight"]),ov(["borderLeft"]),ov(["borderRight"]);function zi(e){"@babel/helpers - typeof";return zi=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},zi(e)}function gIe(e){if(Array.isArray(e))return e}function mIe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,s,a=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function vIe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bse(e,t){return gIe(e)||mIe(e,t)||Qoe(e,t)||vIe()}function yIe(e,t){if(zi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(zi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sse(e){var t=yIe(e,"string");return zi(t)=="symbol"?t:t+""}function Nn(e,t,r){return(t=Sse(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jj(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 vi(e){for(var t=1;t1e4){var n=Date.now();this.lastAccessBeat.forEach(function(i,o){n-i>PIe&&(r.map.delete(o),r.lastAccessBeat.delete(o))}),this.accessBeat=0}}}]),e})(),n9=new MIe;function IIe(e,t){return Q.useMemo(function(){var r=n9.get(t);if(r)return r;var n=e();return n9.set(t,n),n},t)}var DIe=function(){return{}};function AIe(e){var t=e.useCSP,r=t===void 0?DIe:t,n=e.useToken,i=e.usePrefix,o=e.getResetStyles,s=e.getCommonStyle,a=e.getCompUnitless;function l(h,p,f,g){var m=Array.isArray(h)?h[0]:h;function v(M){return"".concat(String(m)).concat(M.slice(0,1).toUpperCase()).concat(M.slice(1))}var b=(g==null?void 0:g.unitless)||{},S=typeof a=="function"?a(h):{},x=vi(vi({},S),{},Nn({},v("zIndexPopup"),!0));Object.keys(b).forEach(function(M){x[v(M)]=b[M]});var T=vi(vi({},g),{},{unitless:x,prefixToken:v}),R=u(h,p,f,T),E=c(m,f,T);return function(M){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:M,A=R(M,D),I=g==null?void 0:g.extraCssVarPrefixCls,_=typeof I=="function"?I({prefixCls:M,rootCls:D}):I,F=E(_!=null&&_.length?[D].concat(Nr(_)):D);return[A,F]}}function c(h,p,f){var g=f.unitless,m=f.prefixToken,v=f.ignore;return function(b){var S=n(),x=S.cssVar,T=S.realToken,R=r();return fIe({path:[h],prefix:x.prefix,key:x.key,unitless:g,ignore:v,token:T,scope:b,nonce:function(){return R.nonce}},function(){var E=r9(h,T,p),M=e9(h,T,E,{deprecatedTokens:f==null?void 0:f.deprecatedTokens});return E&&Object.keys(E).forEach(function(D){M[m(D)]=M[D],delete M[D]}),M}),x==null?void 0:x.key}}function u(h,p,f){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},m=Array.isArray(h)?h:[h,h],v=bse(m,1),b=v[0],S=m.join("-"),x=e.layer||{name:"antd"};return function(T){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:T,E=n(),M=E.theme,D=E.realToken,A=E.hashId,I=E.token,_=E.cssVar,F=E.zeroRuntime,O=y.useMemo(function(){return F},[]);if(O)return A;var k=i(),B=k.rootPrefixCls,H=k.iconPrefixCls,N=r(),z="css",U=IIe(function(){var Y=new Set;return Object.keys(g.unitless||{}).forEach(function(X){Y.add(jR(X,_.prefix)),Y.add(jR(X,Qj(b,_.prefix)))}),xIe(z,Y)},[z,b,_==null?void 0:_.prefix]),V=RIe(),G=V.max,K=V.min,q={theme:M,token:I,hashId:A,nonce:function(){return N.nonce},clientOnly:g.clientOnly,layer:x,order:g.order||-999};return typeof o=="function"&&Y2(vi(vi({},q),{},{clientOnly:!1,path:["Shared",B]}),function(){return o(I,{prefix:{rootPrefixCls:B,iconPrefixCls:H},csp:N})}),Y2(vi(vi({},q),{},{path:[S,T,H]}),function(){if(g.injectStyle===!1)return[];var Y=EIe(I),X=Y.token,le=Y.flush,re=r9(b,D,f),ne=".".concat(T),se=e9(b,D,re,{deprecatedTokens:g.deprecatedTokens});re&&zi(re)==="object"&&Object.keys(re).forEach(function(pe){re[pe]="var(".concat(jR(pe,Qj(b,_.prefix)),")")});var de=Wr(X,{componentCls:ne,prefixCls:T,iconCls:".".concat(H),antCls:".".concat(B),calc:U,max:G,min:K},re),te=p(de,{hashId:A,prefixCls:T,rootPrefixCls:B,iconPrefixCls:H});le(b,se);var ie=typeof s=="function"?s(de,T,R,g.resetFont):null;return[g.resetStyle===!1?null:ie,te]}),A}}function d(h,p,f){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},m=u(h,p,f,vi({resetStyle:!1,order:-998},g)),v=function(S){var x=S.prefixCls,T=S.rootCls,R=T===void 0?x:T;return m(x,R),null};return v}return{genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}const Pd=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function XR(e){return(e+8)/e}function FIe(e){const t=Array.from({length:10}).map((r,n)=>{const i=n-1,o=e*Math.E**(i/5),s=n>1?Math.floor(o):Math.ceil(o);return Math.floor(s/2)*2});return t[1]=e,t.map(r=>({size:r,lineHeight:XR(r)}))}const LIe="6.3.2",Rse={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"},p0={...Rse,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', '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},_Ie={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},mo=Math.round;function f_(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 i9=(e,t,r)=>r===0?e:e/100;function Kb(e,t){const r=t||255;return e>r?r:e<0?0:e}class an{constructor(t){Ae(this,"isValid",!0);Ae(this,"r",0);Ae(this,"g",0);Ae(this,"b",0);Ae(this,"a",1);Ae(this,"_h");Ae(this,"_hsl_s");Ae(this,"_hsv_s");Ae(this,"_l");Ae(this,"_v");Ae(this,"_max");Ae(this,"_min");Ae(this,"_brightness");function r(n){return n[0]in t&&n[1]in t&&n[2]in t}if(t)if(typeof t=="string"){let i=function(o){return n.startsWith(o)};const n=t.trim();if(/^#?[A-F\d]{3,8}$/i.test(n))this.fromHexString(n);else if(i("rgb"))this.fromRgbString(n);else if(i("hsl"))this.fromHslString(n);else if(i("hsv")||i("hsb"))this.fromHsvString(n);else{const o=_Ie[n.toLowerCase()];o&&this.fromHexString(parseInt(o,36).toString(16).padStart(6,"0"))}}else if(t instanceof an)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._hsl_s=t._hsl_s,this._hsv_s=t._hsv_s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=Kb(t.r),this.g=Kb(t.g),this.b=Kb(t.b),this.a=typeof t.a=="number"?Kb(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 s=o/255;return s<=.03928?s/12.92:Math.pow((s+.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=mo(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g"u"){const t=this.getMax()-this.getMin();t===0?this._hsv_s=0:this._hsv_s=t/this.getMax()}return this._hsv_s}getHSLSaturation(){if(typeof this._hsl_s>"u"){const t=this.getMax()-this.getMin();if(t===0)this._hsl_s=0;else{const r=this.getLightness();this._hsl_s=t/255/(1-Math.abs(2*r-1))}}return this._hsl_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=a=>(n[a]-this[a])*i+this[a],s={r:mo(o("r")),g:mo(o("g")),b:mo(o("b")),a:mo(o("a")*100)/100};return this._c(s)}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=>mo((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=mo(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getHSLSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),r=mo(this.getHSLSaturation()*100),n=mo(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getHSVSaturation(),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]=Kb(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}){const o=(t%360+360)%360;if(this._h=o,this._hsl_s=r,this._l=n,this.a=typeof i=="number"?i:1,r<=0){const p=mo(n*255);this.r=p,this.g=p,this.b=p;return}let s=0,a=0,l=0;const c=o/60,u=(1-Math.abs(2*n-1))*r,d=u*(1-Math.abs(c%2-1));c>=0&&c<1?(s=u,a=d):c>=1&&c<2?(s=d,a=u):c>=2&&c<3?(a=u,l=d):c>=3&&c<4?(a=d,l=u):c>=4&&c<5?(s=d,l=u):c>=5&&c<6&&(s=u,l=d);const h=n-u/2;this.r=mo((s+h)*255),this.g=mo((a+h)*255),this.b=mo((l+h)*255)}fromHsv({h:t,s:r,v:n,a:i}){const o=(t%360+360)%360;this._h=o,this._hsv_s=r,this._v=n,this.a=typeof i=="number"?i:1;const s=mo(n*255);if(this.r=s,this.g=s,this.b=s,r<=0)return;const a=o/60,l=Math.floor(a),c=a-l,u=mo(n*(1-r)*255),d=mo(n*(1-r*c)*255),h=mo(n*(1-r*(1-c))*255);switch(l){case 0:this.g=h,this.b=u;break;case 1:this.r=d,this.b=u;break;case 2:this.r=u,this.b=h;break;case 3:this.r=u,this.g=d;break;case 4:this.r=h,this.g=u;break;case 5:default:this.g=u,this.b=d;break}}fromHsvString(t){const r=f_(t,i9);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){const r=f_(t,i9);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){const r=f_(t,(n,i)=>i.includes("%")?mo(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}}const kT=2,o9=.16,OIe=.05,kIe=.05,NIe=.15,Pse=5,Mse=4,BIe=[{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 s9(e,t,r){let n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-kT*t:Math.round(e.h)+kT*t:n=r?Math.round(e.h)+kT*t:Math.round(e.h)-kT*t,n<0?n+=360:n>=360&&(n-=360),n}function a9(e,t,r){if(e.h===0&&e.s===0)return e.s;let n;return r?n=e.s-o9*t:t===Mse?n=e.s+o9:n=e.s+OIe*t,n>1&&(n=1),r&&t===Pse&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function l9(e,t,r){let n;return r?n=e.v+kIe*t:n=e.v-NIe*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function WH(e,t={}){const r=[],n=new an(e),i=n.toHsv();for(let o=Pse;o>0;o-=1){const s=new an({h:s9(i,o,!0),s:a9(i,o,!0),v:l9(i,o,!0)});r.push(s)}r.push(n);for(let o=1;o<=Mse;o+=1){const s=new an({h:s9(i,o),s:a9(i,o),v:l9(i,o)});r.push(s)}return t.theme==="dark"?BIe.map(({index:o,amount:s})=>new an(t.backgroundColor||"#141414").mix(r[o],s).toHexString()):r.map(o=>o.toHexString())}const g_={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"},Z2=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];Z2.primary=Z2[5];const J2=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];J2.primary=J2[5];const Q2=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Q2.primary=Q2[5];const jP=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];jP.primary=jP[5];const eB=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];eB.primary=eB[5];const tB=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];tB.primary=tB[5];const rB=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];rB.primary=rB[5];const nB=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];nB.primary=nB[5];const KP=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];KP.primary=KP[5];const iB=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];iB.primary=iB[5];const oB=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];oB.primary=oB[5];const sB=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];sB.primary=sB[5];const aB=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];aB.primary=aB[5];const m_={red:Z2,volcano:J2,orange:Q2,gold:jP,yellow:eB,lime:tB,green:rB,cyan:nB,blue:KP,geekblue:iB,purple:oB,magenta:sB,grey:aB};function $Ie(e,{generateColorPalettes:t,generateNeutralColorPalettes:r}){const{colorSuccess:n,colorWarning:i,colorError:o,colorInfo:s,colorPrimary:a,colorBgBase:l,colorTextBase:c}=e,u=t(a),d=t(n),h=t(i),p=t(o),f=t(s),g=r(l,c),m=e.colorLink||e.colorInfo,v=t(m),b=new an(p[1]).mix(new an(p[3]),50).toHexString(),S={};return Pd.forEach(x=>{const T=e[x];if(T){const R=t(T);S[`${x}Hover`]=R[5],S[`${x}Active`]=R[7]}}),{...g,colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:d[1],colorSuccessBgHover:d[2],colorSuccessBorder:d[3],colorSuccessBorderHover:d[4],colorSuccessHover:d[4],colorSuccess:d[6],colorSuccessActive:d[7],colorSuccessTextHover:d[8],colorSuccessText:d[9],colorSuccessTextActive:d[10],colorErrorBg:p[1],colorErrorBgHover:p[2],colorErrorBgFilledHover:b,colorErrorBgActive:p[3],colorErrorBorder:p[3],colorErrorBorderHover:p[4],colorErrorHover:p[5],colorError:p[6],colorErrorActive:p[7],colorErrorTextHover:p[8],colorErrorText:p[9],colorErrorTextActive:p[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:f[1],colorInfoBgHover:f[2],colorInfoBorder:f[3],colorInfoBorderHover:f[4],colorInfoHover:f[4],colorInfo:f[6],colorInfoActive:f[7],colorInfoTextHover:f[8],colorInfoText:f[9],colorInfoTextActive:f[10],colorLinkHover:v[4],colorLink:v[6],colorLinkActive:v[7],...S,colorBgMask:new an("#000").setA(.45).toRgbString(),colorWhite:"#fff"}}const GIe=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 VIe(e){const{motionUnit:t,motionBase:r,borderRadius:n,lineWidth:i}=e;return{motionDurationFast:`${(r+t).toFixed(1)}s`,motionDurationMid:`${(r+t*2).toFixed(1)}s`,motionDurationSlow:`${(r+t*3).toFixed(1)}s`,lineWidthBold:i+1,...GIe(n)}}const zIe=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},HIe=e=>{const t=FIe(e),r=t.map(u=>u.size),n=t.map(u=>u.lineHeight),i=r[1],o=r[0],s=r[2],a=n[1],l=n[0],c=n[2];return{fontSizeSM:o,fontSize:i,fontSizeLG:s,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:a,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(a*i),fontHeightLG:Math.round(c*s),fontHeightSM:Math.round(l*o),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}};function WIe(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 Ka=(e,t)=>new an(e).setA(t).toRgbString(),sv=(e,t)=>new an(e).darken(t).toHexString(),UIe=e=>{const t=WH(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]}},jIe=(e,t)=>{const r=e||"#fff",n=t||"#000";return{colorBgBase:r,colorTextBase:n,colorText:Ka(n,.88),colorTextSecondary:Ka(n,.65),colorTextTertiary:Ka(n,.45),colorTextQuaternary:Ka(n,.25),colorFill:Ka(n,.15),colorFillSecondary:Ka(n,.06),colorFillTertiary:Ka(n,.04),colorFillQuaternary:Ka(n,.02),colorBgSolid:Ka(n,1),colorBgSolidHover:Ka(n,.75),colorBgSolidActive:Ka(n,.95),colorBgLayout:sv(r,4),colorBgContainer:sv(r,0),colorBgElevated:sv(r,0),colorBgSpotlight:Ka(n,.85),colorBgBlur:"transparent",colorBorder:sv(r,15),colorBorderDisabled:sv(r,15),colorBorderSecondary:sv(r,6)}};function KIe(e){g_.pink=g_.magenta,m_.pink=m_.magenta;const t=Object.keys(Rse).map(r=>{const n=e[r]===g_[r]?m_[r]:WH(e[r]);return Array.from({length:10},()=>1).reduce((i,o,s)=>(i[`${r}-${s+1}`]=n[s],i[`${r}${s+1}`]=n[s],i),{})}).reduce((r,n)=>(r={...r,...n},r),{});return{...e,...t,...$Ie(e,{generateColorPalettes:UIe,generateNeutralColorPalettes:jIe}),...HIe(e.fontSize),...WIe(e),...zIe(e),...VIe(e)}}const Ise=W2(KIe),lB={token:p0,override:{override:p0},hashed:!0},Dse=Q.createContext(lB);function v_(e){return e>=0&&e<=255}function jS(e,t){const{r,g:n,b:i,a:o}=new an(e).toRgb();if(o<1)return e;const{r:s,g:a,b:l}=new an(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((r-s*(1-c))/c),d=Math.round((n-a*(1-c))/c),h=Math.round((i-l*(1-c))/c);if(v_(u)&&v_(d)&&v_(h))return new an({r:u,g:d,b:h,a:Math.round(c*100)/100}).toRgbString()}return new an({r,g:n,b:i,a:1}).toRgbString()}function qIe(e){const{override:t,...r}=e,n={...t};Object.keys(p0).forEach(p=>{delete n[p]});const i={...r,...n},o=480,s=576,a=768,l=992,c=1200,u=1600,d=1920;return i.motion===!1&&(i.motionDurationFast="0s",i.motionDurationMid="0s",i.motionDurationSlow="0s"),{...i,colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:jS(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:jS(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:jS(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:jS(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:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowSecondary:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowTertiary:` 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02) `,screenXS:o,screenXSMin:o,screenXSMax:s-1,screenSM:s,screenSMMin:s,screenSMMax:a-1,screenMD:a,screenMDMin:a,screenMDMax:l-1,screenLG:l,screenLGMin:l,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,screenXXLMax:d-1,screenXXXL:d,screenXXXLMin:d,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:` 0 1px 2px -2px ${new an("rgba(0, 0, 0, 0.16)").toRgbString()}, 0 3px 6px 0 ${new an("rgba(0, 0, 0, 0.12)").toRgbString()}, 0 5px 12px 4px ${new an("rgba(0, 0, 0, 0.09)").toRgbString()} `,boxShadowDrawerRight:` -6px 0 16px 0 rgba(0, 0, 0, 0.08), -3px 0 6px -4px rgba(0, 0, 0, 0.12), -9px 0 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowDrawerLeft:` 6px 0 16px 0 rgba(0, 0, 0, 0.08), 3px 0 6px -4px rgba(0, 0, 0, 0.12), 9px 0 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowDrawerUp:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowDrawerDown:` 0 -6px 16px 0 rgba(0, 0, 0, 0.08), 0 -3px 6px -4px rgba(0, 0, 0, 0.12), 0 -9px 28px 8px rgba(0, 0, 0, 0.05) `,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}}const Ase={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},YIe={motionBase:!0,motionUnit:!0},XIe={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},Fse=(e,t,r)=>{const n=r.getDerivativeToken(e),{override:i,...o}=t;let s={...n,override:i};return s=qIe(s),o&&Object.entries(o).forEach(([a,l])=>{const{theme:c,...u}=l;let d=u;c&&(d=Fse({...s,...u},{override:u},c)),s[a]=d}),s};function ds(){const{token:e,hashed:t,theme:r,override:n,cssVar:i,zeroRuntime:o}=Q.useContext(Dse),{csp:s}=Q.useContext(or),a={prefix:(i==null?void 0:i.prefix)??"ant",key:(i==null?void 0:i.key)??"css-var-root"},l=`${LIe}-${t||""}`,c=r||Ise,[u,d,h]=HMe(c,[p0,e],{salt:l,override:n,getComputedToken:Fse,cssVar:{...a,unitless:Ase,ignore:YIe,preserve:XIe},nonce:s==null?void 0:s.nonce});return[c,h,t?d:"",u,a,!!o]}const La={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},cn=(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}),vx=()=>({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"}}),Cp=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),ZIe=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"}}}),JIe=(e,t,r,n)=>{const i=`[class^="${t}"], [class*=" ${t}"]`,o=r?`.${r}`:i,s={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let a={};return n!==!1&&(a={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[o]:{...a,...s,[i]:s}}},uc=(e,t)=>({outline:`${ae(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:["outline-offset","outline"].map(r=>`${r} 0s`).join(", ")}),yl=(e,t)=>({"&:focus-visible":uc(e,t)}),Lse=e=>({[`.${e}`]:{...vx(),[`.${e} .${e}-icon`]:{display:"block"}}}),UH=e=>({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none",...yl(e),"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:Yr,genComponentStyleHook:QIe,genSubStyleComponent:yx}=AIe({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=y.useContext(or);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,r,n,i,o]=ds();return{theme:e,realToken:t,hashId:r,token:n,cssVar:i,zeroRuntime:o}},useCSP:()=>{const{csp:e}=y.useContext(or);return e??{}},getResetStyles:(e,t)=>{const r=ZIe(e);return[r,{"&":r},Lse((t==null?void 0:t.prefix.iconPrefixCls)??yD)]},getCommonStyle:JIe,getCompUnitless:()=>Ase}),Jn=(e,t)=>{const r=`--${e.replace(/\./g,"")}-${t}-`;return[o=>`${r}${o}`,(o,s)=>s?`var(${r}${o}, ${s})`:`var(${r}${o})`]};function TD(e,t){return Pd.reduce((r,n)=>{const i=e[`${n}1`],o=e[`${n}3`],s=e[`${n}6`],a=e[`${n}7`];return{...r,...t(n,{lightColor:i,lightBorderColor:o,darkColor:s,textColor:a})}},{})}const eDe=(e,t)=>(ds(),Y2({hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>Lse(e)));var tDe={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"};const jH=y.createContext({});function _se(e){var t;return(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e)}function rDe(e){return _se(e)instanceof ShadowRoot}function qP(e){return rDe(e)?_se(e):null}function nDe(e){return e.replace(/-(.)/g,(t,r)=>r.toUpperCase())}function iDe(e,t){Hn(e,`[@ant-design/icons] ${t}`)}function c9(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function u9(e={}){return Object.keys(e).reduce((t,r)=>{const n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:delete t[r],t[nDe(r)]=n}return t},{})}function cB(e,t,r){return r?Q.createElement(e.tag,{key:t,...u9(e.attrs),...r},(e.children||[]).map((n,i)=>cB(n,`${t}-${e.tag}-${i}`))):Q.createElement(e.tag,{key:t,...u9(e.attrs)},(e.children||[]).map((n,i)=>cB(n,`${t}-${e.tag}-${i}`)))}function Ose(e){return WH(e)[0]}function kse(e){return e?Array.isArray(e)?e:[e]:[]}const oDe=` .anticon { display: inline-flex; align-items: center; color: inherit; font-style: normal; line-height: 0; text-align: center; text-transform: none; vertical-align: -0.125em; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .anticon > * { line-height: 1; } .anticon svg { display: inline-block; vertical-align: inherit; } .anticon::before { display: none; } .anticon .anticon-icon { display: block; } .anticon[tabindex] { cursor: pointer; } .anticon-spin::before, .anticon-spin { display: inline-block; -webkit-animation: loadingCircle 1s infinite linear; animation: loadingCircle 1s infinite linear; } @-webkit-keyframes loadingCircle { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes loadingCircle { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } `,sDe=e=>{const{csp:t,prefixCls:r,layer:n}=y.useContext(jH);let i=oDe;r&&(i=i.replace(/anticon/g,r)),n&&(i=`@layer ${n} { ${i} }`),y.useEffect(()=>{const o=e.current,s=qP(o);sp(i,"@ant-design-icons",{prepend:!n,csp:t,attachTo:s})},[])},vw={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function aDe({primaryColor:e,secondaryColor:t}){vw.primaryColor=e,vw.secondaryColor=t||Ose(e),vw.calculated=!!t}function lDe(){return{...vw}}const SC=e=>{const{icon:t,className:r,onClick:n,style:i,primaryColor:o,secondaryColor:s,...a}=e,l=y.useRef(null);let c=vw;if(o&&(c={primaryColor:o,secondaryColor:s||Ose(o)}),sDe(l),iDe(c9(t),`icon should be icon definiton, but got ${t}`),!c9(t))return null;let u=t;return u&&typeof u.icon=="function"&&(u={...u,icon:u.icon(c.primaryColor,c.secondaryColor)}),cB(u.icon,`svg-${u.name}`,{className:r,onClick:n,style:i,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...a,ref:l})};SC.displayName="IconReact";SC.getTwoToneColors=lDe;SC.setTwoToneColors=aDe;function Nse(e){const[t,r]=kse(e);return SC.setTwoToneColors({primaryColor:t,secondaryColor:r})}function cDe(){const e=SC.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}function uB(){return uB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:r,icon:n,spin:i,rotate:o,tabIndex:s,onClick:a,twoToneColor:l,...c}=e,{prefixCls:u="anticon",rootClassName:d}=y.useContext(jH),h=ee(d,u,{[`${u}-${n.name}`]:!!n.name,[`${u}-spin`]:!!i||n.name==="loading"},r);let p=s;p===void 0&&a&&(p=-1);const f=o?{msTransform:`rotate(${o}deg)`,transform:`rotate(${o}deg)`}:void 0,[g,m]=kse(l);return y.createElement("span",uB({role:"img","aria-label":n.name},c,{ref:t,tabIndex:p,onClick:a,className:h}),y.createElement(SC,{icon:n,primaryColor:g,secondaryColor:m,style:f}))});kr.getTwoToneColor=cDe;kr.setTwoToneColor=Nse;function dB(){return dB=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,dB({},e,{ref:t,icon:tDe})),Bse=y.forwardRef(uDe);var dDe={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"};function hB(){return hB=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,hB({},e,{ref:t,icon:dDe})),ED=y.forwardRef(hDe);var pDe={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"};function pB(){return pB=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,pB({},e,{ref:t,icon:pDe})),Bp=y.forwardRef(fDe);var gDe={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"};function fB(){return fB=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,fB({},e,{ref:t,icon:gDe})),RD=y.forwardRef(mDe);var vDe={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"};function gB(){return gB=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,gB({},e,{ref:t,icon:vDe})),$se=y.forwardRef(yDe),Gse=y.createContext({}),CDe=e=>{const{children:t,...r}=e,n=y.useMemo(()=>({motion:r.motion}),[r.motion]);return y.createElement(Gse.Provider,{value:n},t)};function Vse(e){const[,t]=y.useReducer(o=>o+1,0),r=y.useRef(e),n=br(()=>r.current),i=br(o=>{r.current=typeof o=="function"?o(r.current):o,t()});return[n,i]}const Hc="none",NT="appear",BT="enter",$T="leave",d9="none",jl="prepare",rg="start",ng="active",KH="end",zse="prepared";function h9(e,t){const r={};return r[e.toLowerCase()]=t.toLowerCase(),r[`Webkit${e}`]=`webkit${t}`,r[`Moz${e}`]=`moz${t}`,r[`ms${e}`]=`MS${t}`,r[`O${e}`]=`o${t.toLowerCase()}`,r}function bDe(e,t){const r={animationend:h9("Animation","AnimationEnd"),transitionend:h9("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}const SDe=bDe(xo(),typeof window<"u"?window:{});let Hse={};xo()&&({style:Hse}=document.createElement("div"));const GT={};function Wse(e){if(GT[e])return GT[e];const t=SDe[e];if(t){const r=Object.keys(t),n=r.length;for(let i=0;in[1].toUpperCase());return e[r]}return`${e}-${t}`}const xDe=(e=>{const t=y.useRef();function r(i){i&&(i.removeEventListener(f9,e),i.removeEventListener(p9,e))}function n(i){t.current&&t.current!==i&&r(t.current),i&&i!==t.current&&(i.addEventListener(f9,e),i.addEventListener(p9,e),t.current=i)}return y.useEffect(()=>()=>{r(t.current),t.current=null},[]),[n,r]}),Kse=xo()?y.useLayoutEffect:y.useEffect,TDe=(()=>{const e=y.useRef(null);function t(){Lr.cancel(e.current)}function r(n,i=2){t();const o=Lr(()=>{i<=1?n({isCanceled:()=>o!==e.current}):r(n,i-1)});e.current=o}return y.useEffect(()=>()=>{t()},[]),[r,t]}),EDe=[jl,rg,ng,KH],RDe=[jl,zse],qse=!1,PDe=!0;function Yse(e){return e===ng||e===KH}const MDe=((e,t,r)=>{const[n,i]=s0(d9),[o,s]=TDe();function a(){i(jl,!0)}const l=t?RDe:EDe;return Kse(()=>{if(n!==d9&&n!==KH){const c=l.indexOf(n),u=l[c+1],d=r(n);d===qse?i(u,!0):u&&o(h=>{function p(){h.isCanceled()||i(u,!0)}d===!0?p():Promise.resolve(d).then(p)})}},[e,n]),y.useEffect(()=>()=>{s()},[]),[a,n]});function IDe(e,t,r,{motionEnter:n=!0,motionAppear:i=!0,motionLeave:o=!0,motionDeadline:s,motionLeaveImmediately:a,onAppearPrepare:l,onEnterPrepare:c,onLeavePrepare:u,onAppearStart:d,onEnterStart:h,onLeaveStart:p,onAppearActive:f,onEnterActive:g,onLeaveActive:m,onAppearEnd:v,onEnterEnd:b,onLeaveEnd:S,onVisibleChanged:x}){const[T,R]=y.useState(),[E,M]=Vse(Hc),[D,A]=y.useState([null,null]),I=E(),_=y.useRef(!1),F=y.useRef(null);function O(){return r()}const k=y.useRef(!1);function B(){M(Hc),A([null,null])}const H=br(re=>{const ne=E();if(ne===Hc)return;const se=O();if(re&&!re.deadline&&re.target!==se)return;const de=k.current;let te;ne===NT&&de?te=v==null?void 0:v(se,re):ne===BT&&de?te=b==null?void 0:b(se,re):ne===$T&&de&&(te=S==null?void 0:S(se,re)),de&&te!==!1&&B()}),[N]=xDe(H),z=re=>{switch(re){case NT:return{[jl]:l,[rg]:d,[ng]:f};case BT:return{[jl]:c,[rg]:h,[ng]:g};case $T:return{[jl]:u,[rg]:p,[ng]:m};default:return{}}},U=y.useMemo(()=>z(I),[I]),[V,G]=MDe(I,!e,re=>{var ne;if(re===jl){const se=U[jl];return se?se(O()):qse}return re in U&&A([((ne=U[re])==null?void 0:ne.call(U,O(),null))||null,re]),re===ng&&I!==Hc&&(N(O()),s>0&&(clearTimeout(F.current),F.current=setTimeout(()=>{H({deadline:!0})},s))),re===zse&&B(),PDe}),K=Yse(G);k.current=K;const q=y.useRef(null);Kse(()=>{if(_.current&&q.current===t)return;R(t);const re=_.current;_.current=!0;let ne;!re&&t&&i&&(ne=NT),re&&t&&n&&(ne=BT),(re&&!t&&o||!re&&a&&!t&&o)&&(ne=$T);const se=z(ne);ne&&(e||se[jl])?(M(ne),V()):M(Hc),q.current=t},[t]),y.useEffect(()=>{(I===NT&&!i||I===BT&&!n||I===$T&&!o)&&M(Hc)},[i,n,o]),y.useEffect(()=>()=>{_.current=!1,clearTimeout(F.current)},[]);const Y=y.useRef(!1);y.useEffect(()=>{T&&(Y.current=!0),T!==void 0&&I===Hc&&((Y.current||T)&&(x==null||x(T)),Y.current=!0)},[T,I]);let X=D[0];U[jl]&&G===rg&&(X={transition:"none",...X});const le=D[1];return[E,G,X,T??t,!_.current&&I===Hc&&e&&i?"NONE":G===rg||G===ng?le===G:!0]}function DDe(e){let t=e;typeof e=="object"&&({transitionSupport:t}=e);function r(i,o){return!!(i.motionName&&t&&o!==!1)}const n=y.forwardRef((i,o)=>{const{visible:s=!0,removeOnLeave:a=!0,forceRender:l,children:c,motionName:u,leavedClassName:d,eventProps:h}=i,{motion:p}=y.useContext(Gse),f=r(i,p),g=y.useRef();function m(){return lc(g.current)}const[v,b,S,x,T]=IDe(f,s,m,i),R=v(),E=y.useRef(x);x&&(E.current=!0);const M=y.useMemo(()=>{const A={};return Object.defineProperties(A,{nativeElement:{enumerable:!0,get:m},inMotion:{enumerable:!0,get:()=>()=>v()!==Hc},enableMotion:{enumerable:!0,get:()=>()=>f}}),A},[]);y.useImperativeHandle(o,()=>M,[]);const D=y.useRef(0);return T&&(D.current+=1),y.useMemo(()=>{if(T==="NONE")return null;let A;const I={...h,visible:s};if(!c)A=null;else if(R===Hc)x?A=c({...I},g):!a&&E.current&&d?A=c({...I,className:d},g):l||!a&&!d?A=c({...I,style:{display:"none"}},g):A=null;else{let _;b===jl?_="prepare":Yse(b)?_="active":b===rg&&(_="start");const F=g9(u,`${R}-${_}`);A=c({...I,className:ee(g9(u,R),{[F]:F&&_,[u]:typeof u=="string"}),style:S},g)}return y.isValidElement(A)&&cu(A)&&(zd(A)||(A=y.cloneElement(A,{ref:g}))),A},[D.current])});return n.displayName="CSSMotion",n}const Sm=DDe(wDe),ADe=`accept acceptCharset accessKey action allowFullScreen allowTransparency alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge charSet checked classID className colSpan cols content contentEditable contextMenu controls coords crossOrigin data dateTime default defer dir disabled download draggable encType form formAction formEncType formMethod formNoValidate formTarget frameBorder headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media mediaGroup method min minLength multiple muted name noValidate nonce open optimum pattern placeholder poster preload radioGroup readOnly rel required reversed role rowSpan rows sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step style summary tabIndex target title type useMap value width wmode wrap`,FDe=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,LDe=`${ADe} ${FDe}`.split(/[\s\n]+/),_De="aria-",ODe="data-";function m9(e,t){return e.indexOf(t)===0}function hi(e,t=!1){let r;t===!1?r={aria:!0,data:!0,attr:!0}:t===!0?r={aria:!0}:r={...t};const n={};return Object.keys(e).forEach(i=>{(r.aria&&(i==="role"||m9(i,_De))||r.data&&m9(i,ODe)||r.attr&&LDe.includes(i))&&(n[i]=e[i])}),n}const Xse={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"};var kDe={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0};function f0(e){"@babel/helpers - typeof";return f0=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},f0(e)}function v9(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 y9(e){for(var t=1;tJR.reduce((e,t)=>({...e,...t}),dc.Modal);function VDe(e){if(e){const t={...e};return JR.push(t),ZR=b9(),()=>{JR=JR.filter(r=>r!==t),ZR=b9()}}ZR={...dc.Modal}}function Jse(){return ZR}const qH=y.createContext(void 0),Cc=(e,t)=>{const r=y.useContext(qH),n=y.useMemo(()=>{const o=t||dc[e],s=(r==null?void 0:r[e])??{};return{...typeof o=="function"?o():o,...s||{}}},[e,t,r]),i=y.useMemo(()=>{const o=r==null?void 0:r.locale;return r!=null&&r.exist&&!o?dc.locale:o},[r]);return[n,i]},zDe="internalMark",HDe=e=>{const{locale:t={},children:r,_ANT_MARK__:n}=e;y.useEffect(()=>VDe(t==null?void 0:t.Modal),[t]);const i=y.useMemo(()=>({...t,exist:!0}),[t]);return y.createElement(qH.Provider,{value:i},r)};function g0(...e){const t={};return e.forEach(r=>{r&&Object.keys(r).forEach(n=>{r[n]!==void 0&&(t[n]=r[n])})}),t}const xn=e=>e!=null,Fy=e=>{if(!e)return;const{closable:t,closeIcon:r}=e;return{closable:t,closeIcon:r}},Qse={},S9=(e,t)=>{if(!e&&(e===!1||t===!1||t===null))return!1;if(e===void 0&&t===void 0)return null;let r={closeIcon:typeof t!="boolean"&&t!==null?t:void 0};return e&&typeof e=="object"&&(r={...r,...e}),r},WDe=(e,t,r)=>e===!1?!1:e?g0(r,t,e):t===!1?!1:t?g0(r,t):r.closable?r:!1,UDe=(e,t,r)=>{const{closeIconRender:n}=t,{closeIcon:i,...o}=e;let s=i;const a=hi(o,!0);return xn(s)&&(n&&(s=n(s)),s=Q.isValidElement(s)?Q.cloneElement(s,{"aria-label":r,...s.props,...a}):Q.createElement("span",{"aria-label":r,...a},s)),[s,a]},jDe=(e,t,r=Qse,n="Close")=>{const i=S9(e==null?void 0:e.closable,e==null?void 0:e.closeIcon),o=S9(t==null?void 0:t.closable,t==null?void 0:t.closeIcon),s={closeIcon:Q.createElement(Bp,null),...r},a=WDe(i,o,s),l=typeof a!="boolean"?!!(a!=null&&a.disabled):!1;if(a===!1)return[!1,null,l,{}];const[c,u]=UDe(a,s,n);return[!0,c,l,u]},YH=(e,t,r=Qse)=>{const[n]=Cc("global",dc.global);return Q.useMemo(()=>jDe(e,t,{closeIcon:Q.createElement(Bp,null),...r},n.close),[e,t,r,n.close])},eae=()=>Q.useReducer(e=>e+1,0),mB=(e,t)=>{let r={};return e&&typeof e=="object"&&(r=e),typeof e=="boolean"&&(r={enabled:e}),r.closable===void 0&&t!==void 0&&(r.closable=t),r},tae=(e,t,r,n)=>y.useMemo(()=>{const i=mB(e,n),o=mB(t),s={blur:!1,...o,...i,closable:i.closable??n??o.closable??!0},a=s.blur?`${r}-mask-blur`:void 0;return[s.enabled!==!1,{mask:a},!!s.closable]},[e,t,r,n]),rae=(e,...t)=>{const r=e||{};return t.filter(Boolean).reduce((n,i)=>(Object.keys(i||{}).forEach(o=>{const s=r[o],a=i[o];if(s&&typeof s=="object")if(a&&typeof a=="object")n[o]=rae(s,n[o],a);else{const{_default:l}=s;l&&(n[o]=n[o]||{},n[o][l]=ee(n[o][l],a))}else n[o]=ee(n[o],a)}),n),{})},KDe=(e,...t)=>y.useMemo(()=>rae.apply(void 0,[e].concat(t)),[e].concat(t)),qDe=(...e)=>e.filter(Boolean).reduce((t,r={})=>(Object.keys(r).forEach(n=>{t[n]={...t[n],...r[n]}}),t),{}),YDe=(...e)=>y.useMemo(()=>qDe.apply(void 0,e),[].concat(e)),vB=(e,t)=>{const r={...e};return Object.keys(t).forEach(n=>{if(n!=="_default"){const i=t[n],o=r[n]||{};r[n]=i?vB(o,i):o}}),r},w9=(e,t)=>typeof e=="function"?e(t):e,jr=(e,t,r,n)=>{const i=e.map(l=>l?w9(l,r):void 0),o=t.map(l=>l?w9(l,r):void 0),s=KDe.apply(void 0,[n].concat(Nr(i))),a=YDe.apply(void 0,Nr(o));return y.useMemo(()=>n?[vB(s,n),vB(a,n)]:[s,a],[s,a,n])},XDe=e=>{const[t,r]=y.useState(null);return[y.useCallback((i,o,s)=>{const a=t??i,l=Math.min(a||0,i),c=Math.max(a||0,i),u=o.slice(l,c+1).map(e),d=u.some(p=>!s.has(p)),h=[];return u.forEach(p=>{d?(s.has(p)||h.push(p),s.add(p)):(s.delete(p),h.push(p))}),r(d?c:null),h},[t]),r]},x9=e=>e==="horizontal"||e==="vertical",Cx=(e,t,r)=>y.useMemo(()=>{const n=x9(e);let i;return n?i=e:typeof t=="boolean"?i=t?"vertical":"horizontal":i=x9(r)?r:"horizontal",[i,i==="vertical"]},[r,e,t]),ZDe=()=>{const[e,t]=y.useState([]),r=y.useCallback(n=>(t(i=>[].concat(Nr(i),[n])),()=>{t(i=>i.filter(o=>o!==n))}),[]);return[e,r]},JDe=(e,t)=>(e._antProxy=e._antProxy||{},Object.keys(t).forEach(r=>{if(!(r in e._antProxy)){const n=e[r];e._antProxy[r]=n,e[r]=t[r]}}),e),QDe=(e,t)=>y.useImperativeHandle(e,()=>{const r=t(),{nativeElement:n}=r;return typeof Proxy<"u"?new Proxy(n,{get(i,o){return r[o]?r[o]:Reflect.get(i,o)}}):JDe(n,r)}),eAe=e=>{const t=y.useRef(e),[,r]=eae();return[()=>t.current,n=>{t.current=n,r()}]},bx=Q.createContext(void 0),Ih=100,tAe=10,rAe=Ih*tAe,nae={Modal:Ih,Drawer:Ih,Popover:Ih,Popconfirm:Ih,Tooltip:Ih,Tour:Ih,FloatButton:Ih},nAe={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},iAe=e=>e in nae,$p=(e,t)=>{const[,r]=ds(),n=Q.useContext(bx),i=iAe(e);let o;if(t!==void 0)o=[t,t];else{let s=n??0;i?s+=(n?0:r.zIndexPopupBase)+nae[e]:s+=nAe[e],o=[n===void 0?t:s,s]}return o},VT=(e,t,r,n,i)=>({background:e,border:`${ae(n.lineWidth)} ${n.lineType} ${t}`,[`${i}-icon`]:{color:r}}),oAe=e=>{const{componentCls:t,motionDurationSlow:r,marginXS:n,marginSM:i,fontSize:o,fontSizeLG:s,lineHeight:a,borderRadiusLG:l,motionEaseInOutCirc:c,withDescriptionIconSize:u,colorText:d,colorTextHeading:h,withDescriptionPadding:p,defaultPadding:f}=e;return{[t]:{...cn(e),position:"relative",display:"flex",alignItems:"center",padding:f,wordWrap:"break-word",borderRadius:l,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-section`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:n,lineHeight:0},"&-description":{display:"none",fontSize:o,lineHeight:a},"&-title":{color:h},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:["max-height","opacity","padding-top","padding-bottom","margin-bottom"].map(g=>`${g} ${r} ${c}`).join(", ")},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}},[`${t}-with-description`]:{alignItems:"flex-start",padding:p,[`${t}-icon`]:{marginInlineEnd:i,fontSize:u,lineHeight:0},[`${t}-title`]:{display:"block",marginBottom:n,color:h,fontSize:s},[`${t}-description`]:{display:"block",color:d}},[`${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},sAe=e=>{const{componentCls:t,colorSuccess:r,colorSuccessBorder:n,colorSuccessBg:i,colorWarning:o,colorWarningBorder:s,colorWarningBg:a,colorError:l,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:h,colorInfoBg:p}=e;return{[t]:{"&-success":VT(i,n,r,e,t),"&-info":VT(p,h,d,e,t),"&-warning":VT(a,s,o,e,t),"&-error":{...VT(u,c,l,e,t),[`${t}-description > pre`]:{margin:0,padding:0}}}}},aAe=e=>{const{componentCls:t,iconCls:r,motionDurationMid:n,marginXS:i,fontSizeIcon:o,colorIcon:s,colorIconHover:a}=e;return{[t]:{"&-actions":{marginInlineStart:i},[`${t}-close-icon`]:{marginInlineStart:i,padding:0,overflow:"hidden",fontSize:o,lineHeight:ae(o),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${r}-close`]:{color:s,transition:`color ${n}`,"&:hover":{color:a}}},"&-close-text":{color:s,transition:`color ${n}`,"&:hover":{color:a}}}}},lAe=e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`}),cAe=Yr("Alert",e=>[oAe(e),sAe(e),aAe(e)],lAe),uAe=e=>{const{icon:t,type:r,className:n,style:i,successIcon:o,infoIcon:s,warningIcon:a,errorIcon:l}=e,c={success:o??y.createElement(Bse,null),info:s??y.createElement($se,null),error:l??y.createElement(ED,null),warning:a??y.createElement(RD,null)};return y.createElement("span",{className:n,style:i},t??c[r])},dAe=e=>{const{isClosable:t,prefixCls:r,closeIcon:n,handleClose:i,ariaProps:o,className:s,style:a}=e,l=n===!0||n===void 0?y.createElement(Bp,null):n;return t?y.createElement("button",{type:"button",onClick:i,className:ee(`${r}-close-icon`,s),tabIndex:0,style:a,...o},l):null},iae=y.forwardRef((e,t)=>{const{description:r,prefixCls:n,message:i,title:o,banner:s,className:a,rootClassName:l,style:c,onMouseEnter:u,onMouseLeave:d,onClick:h,afterClose:p,showIcon:f,closable:g,closeText:m,closeIcon:v,action:b,id:S,styles:x,classNames:T,...R}=e,E=o??i,[M,D]=y.useState(!1),A=y.useRef(null);y.useImperativeHandle(t,()=>({nativeElement:A.current}));const{getPrefixCls:I,direction:_,closable:F,closeIcon:O,className:k,style:B,classNames:H,styles:N,successIcon:z,infoIcon:U,warningIcon:V,errorIcon:G}=Ur("alert"),K=I("alert",n),[q,Y]=cAe(K),{onClose:X,afterClose:le}=g&&typeof g=="object"?g:{},re=me=>{var Oe;D(!0),(Oe=X??e.onClose)==null||Oe(me)},ne=y.useMemo(()=>e.type!==void 0?e.type:s?"warning":"info",[e.type,s]),se=y.useMemo(()=>typeof g=="object"&&g.closeIcon||m?!0:typeof g=="boolean"?g:v!==!1&&xn(v)?!0:!!F,[m,v,g,F]),de=s&&f===void 0?!0:f,te={...e,prefixCls:K,type:ne,showIcon:de,closable:se},[ie,pe]=jr([H,T],[N,x],{props:te}),Z=ee(K,`${K}-${ne}`,{[`${K}-with-description`]:!!r,[`${K}-no-icon`]:!de,[`${K}-banner`]:!!s,[`${K}-rtl`]:_==="rtl"},k,a,l,ie.root,Y,q),ue=hi(R,{aria:!0,data:!0}),ve=y.useMemo(()=>typeof g=="object"&&g.closeIcon?g.closeIcon:m||(v!==void 0?v:typeof F=="object"&&F.closeIcon?F.closeIcon:O),[v,g,F,m,O]),he=y.useMemo(()=>{const me=g??F;return typeof me=="object"?hi(me,{data:!0,aria:!0}):{}},[g,F]);return y.createElement(Sm,{visible:!M,motionName:`${K}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:me=>({maxHeight:me.offsetHeight}),onLeaveEnd:le??p},({className:me,style:Oe},Pe)=>y.createElement("div",{id:S,ref:zo(A,Pe),"data-show":!M,className:ee(Z,me),style:{...pe.root,...B,...c,...Oe},onMouseEnter:u,onMouseLeave:d,onClick:h,role:"alert",...ue},de?y.createElement(uAe,{className:ee(`${K}-icon`,ie.icon),style:pe.icon,description:r,icon:e.icon,prefixCls:K,type:ne,successIcon:z,infoIcon:U,warningIcon:V,errorIcon:G}):null,y.createElement("div",{className:ee(`${K}-section`,ie.section),style:pe.section},E?y.createElement("div",{className:ee(`${K}-title`,ie.title),style:pe.title},E):null,r?y.createElement("div",{className:ee(`${K}-description`,ie.description),style:pe.description},r):null),b?y.createElement("div",{className:ee(`${K}-actions`,ie.actions),style:pe.actions},b):null,y.createElement(dAe,{className:ie.close,style:pe.close,isClosable:se,prefixCls:K,closeIcon:ve,handleClose:re,ariaProps:he})))});function hAe(e,t,r){return t=Xg(t),wse(e,xD()?Reflect.construct(t,r||[],Xg(e).constructor):t.apply(e,r))}let pAe=(function(e){function t(){var r;return Hd(this,t),r=hAe(this,t,arguments),r.state={error:void 0,info:{}},r}return HH(t,e),Wd(t,[{key:"componentDidCatch",value:function(n,i){this.setState({error:n,info:i})}},{key:"render",value:function(){const{message:n,title:i,description:o,id:s,children:a}=this.props,{error:l,info:c}=this.state,u=i??n,d=(c==null?void 0:c.componentStack)||null,h=xn(u)?u:l==null?void 0:l.toString(),p=xn(o)?o:d;return l?y.createElement(iae,{id:s,type:"error",title:h,description:y.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},p)}):a}}])})(y.PureComponent);const fAe=iae;fAe.ErrorBoundary=pAe;function yB(e){return xn(e)&&e===e.window}const oae=e=>{var r;if(typeof window>"u")return 0;let t=0;return yB(e)?t=e.pageYOffset:e instanceof Document?t=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(t=e.scrollTop),e&&!yB(e)&&typeof t!="number"&&(t=(r=(e.ownerDocument??e).documentElement)==null?void 0:r.scrollTop),t};function gAe(e,t,r,n){const i=r-t;return e/=n/2,e<1?i/2*e*e*e+t:i/2*((e-=2)*e*e+2)+t}function sae(e,t={}){const{getContainer:r=()=>window,callback:n,duration:i=450}=t,o=r(),s=oae(o),a=Date.now();let l;const c=()=>{const d=Date.now()-a,h=gAe(d>i?i:d,s,e,i);yB(o)?o.scrollTo(window.pageXOffset,h):o instanceof Document||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=h:o.scrollTop=h,d{Lr.cancel(l)}}const co=e=>`${e}-css-var`,mAe=y.createContext(void 0),aae=y.createContext(null);let vAe=!1;function yAe(e){return vAe}const T9=[];function CAe(e,t){const[r]=y.useState(()=>xo()?document.createElement("div"):null),n=y.useRef(!1),i=y.useContext(aae),[o,s]=y.useState(T9),a=i||(n.current?void 0:u=>{s(d=>[u,...d])});function l(){r.parentElement||document.body.appendChild(r),n.current=!0}function c(){var u;(u=r.parentElement)==null||u.removeChild(r),n.current=!1}return zr(()=>(e?i?i(l):l():c(),c),[e]),zr(()=>{o.length&&(o.forEach(u=>u()),s(T9))},[o]),[r,a]}let y_;function lae(e){const t=`rc-scrollbar-measure-${Math.random().toString(36).substring(7)}`,r=document.createElement("div");r.id=t;const n=r.style;n.position="absolute",n.left="0",n.top="0",n.width="100px",n.height="100px",n.overflow="scroll";let i,o;if(e){const l=getComputedStyle(e);n.scrollbarColor=l.scrollbarColor,n.scrollbarWidth=l.scrollbarWidth;const c=getComputedStyle(e,"::-webkit-scrollbar"),u=parseInt(c.width,10),d=parseInt(c.height,10);try{const h=u?`width: ${c.width};`:"",p=d?`height: ${c.height};`:"";sp(` #${t}::-webkit-scrollbar { ${h} ${p} }`,t)}catch(h){console.error(h),i=u,o=d}}document.body.appendChild(r);const s=e&&i&&!isNaN(i)?i:r.offsetWidth-r.clientWidth,a=e&&o&&!isNaN(o)?o:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),c0(t),{width:s,height:a}}function E9(e){return typeof document>"u"?0:(y_===void 0&&(y_=lae()),y_.width)}function CB(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:lae(e)}function bAe(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}const SAe=`rc-util-locker-${Date.now()}`;let R9=0;function wAe(e){const t=!!e,[r]=y.useState(()=>(R9+=1,`${SAe}_${R9}`));zr(()=>{if(t){const n=CB(document.body).width,i=bAe();sp(` html body { overflow-y: hidden; ${i?`width: calc(100% - ${n}px);`:""} }`,r)}else c0(r);return()=>{c0(r)}},[t,r])}function xAe(){return{...ioe}.useId}let P9=0;function cae(e,t){const n=String(t).replace(/[^a-zA-Z0-9_.:-]/g,"-");return`${e}-${n}`}const M9=xAe(),Tu=M9?(function(t){const r=M9();return t||r}):(function(t){const[r,n]=y.useState("ssr-id");return y.useEffect(()=>{const i=P9;P9+=1,n(`rc_unique_${i}`)},[]),t||r});let pg=[];const TAe=200;let uae=0;const dae=e=>{if(e.key==="Escape"&&!e.isComposing){if(Date.now()-uae=0;n-=1)pg[n].onEsc({top:n===r-1,event:e})}},hae=()=>{uae=Date.now()};function EAe(){window.addEventListener("keydown",dae),window.addEventListener("compositionend",hae)}function RAe(){pg.length===0&&(window.removeEventListener("keydown",dae),window.removeEventListener("compositionend",hae))}function PAe(e,t){const r=Tu(),n=br(t),i=()=>{pg.find(s=>s.id===r)||pg.push({id:r,onEsc:n})},o=()=>{pg=pg.filter(s=>s.id!==r)};y.useMemo(()=>{e?i():e||o()},[e]),y.useEffect(()=>{if(e)return i(),EAe(),()=>{o(),RAe()}},[e])}const I9=e=>e===!1?!1:!xo()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,Sx=y.forwardRef((e,t)=>{const{open:r,autoLock:n,getContainer:i,debug:o,autoDestroy:s=!0,children:a,onEsc:l}=e,[c,u]=y.useState(r),d=c||r;y.useEffect(()=>{(s||r)&&u(r)},[r,s]);const[h,p]=y.useState(()=>I9(i));y.useEffect(()=>{const T=I9(i);p(()=>T??null)});const[f,g]=CAe(d&&!h),m=h??f;wAe(n&&r&&xo()&&(m===f||m===document.body)),PAe(r,l);let v=null;a&&cu(a)&&t&&(v=zd(a));const b=xu(v,t);if(!d||!xo()||h===void 0)return null;const S=m===!1||yAe();let x=a;return t&&(x=y.cloneElement(a,{ref:b})),y.createElement(aae.Provider,{value:g},S?x:ac.createPortal(x,m))}),MAe=y.createContext({}),Ju="none",zT="appear",HT="enter",WT="leave",D9="none",Kl="prepare",Zv="start",Jv="active",XH="end",pae="prepared";function A9(e,t){const r={};return r[e.toLowerCase()]=t.toLowerCase(),r[`Webkit${e}`]=`webkit${t}`,r[`Moz${e}`]=`moz${t}`,r[`ms${e}`]=`MS${t}`,r[`O${e}`]=`o${t.toLowerCase()}`,r}function IAe(e,t){const r={animationend:A9("Animation","AnimationEnd"),transitionend:A9("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}const DAe=IAe(xo(),typeof window<"u"?window:{});let fae={};xo()&&({style:fae}=document.createElement("div"));const UT={};function gae(e){if(UT[e])return UT[e];const t=DAe[e];if(t){const r=Object.keys(t),n=r.length;for(let i=0;in[1].toUpperCase());return e[r]}return`${e}-${t}`}const FAe=(e=>{const t=y.useRef();function r(i){i&&(i.removeEventListener(L9,e),i.removeEventListener(F9,e))}function n(i){t.current&&t.current!==i&&r(t.current),i&&i!==t.current&&(i.addEventListener(L9,e),i.addEventListener(F9,e),t.current=i)}return y.useEffect(()=>()=>{r(t.current),t.current=null},[]),[n,r]}),yae=xo()?y.useLayoutEffect:y.useEffect,LAe=(()=>{const e=y.useRef(null);function t(){Lr.cancel(e.current)}function r(n,i=2){t();const o=Lr(()=>{i<=1?n({isCanceled:()=>o!==e.current}):r(n,i-1)});e.current=o}return y.useEffect(()=>()=>{t()},[]),[r,t]}),_Ae=[Kl,Zv,Jv,XH],OAe=[Kl,pae],Cae=!1,kAe=!0;function bae(e){return e===Jv||e===XH}const NAe=((e,t,r)=>{const[n,i]=s0(D9),[o,s]=LAe();function a(){i(Kl,!0)}const l=t?OAe:_Ae;return yae(()=>{if(n!==D9&&n!==XH){const c=l.indexOf(n),u=l[c+1],d=r(n);d===Cae?i(u,!0):u&&o(h=>{function p(){h.isCanceled()||i(u,!0)}d===!0?p():Promise.resolve(d).then(p)})}},[e,n]),y.useEffect(()=>()=>{s()},[]),[a,n]});function BAe(e,t,r,{motionEnter:n=!0,motionAppear:i=!0,motionLeave:o=!0,motionDeadline:s,motionLeaveImmediately:a,onAppearPrepare:l,onEnterPrepare:c,onLeavePrepare:u,onAppearStart:d,onEnterStart:h,onLeaveStart:p,onAppearActive:f,onEnterActive:g,onLeaveActive:m,onAppearEnd:v,onEnterEnd:b,onLeaveEnd:S,onVisibleChanged:x}){const[T,R]=s0(),[E,M]=Vse(Ju),[D,A]=s0(null),I=E(),_=y.useRef(!1),F=y.useRef(null);function O(){return r()}const k=y.useRef(!1);function B(){M(Ju),A(null,!0)}const H=br(le=>{const re=E();if(re===Ju)return;const ne=O();if(le&&!le.deadline&&le.target!==ne)return;const se=k.current;let de;re===zT&&se?de=v==null?void 0:v(ne,le):re===HT&&se?de=b==null?void 0:b(ne,le):re===WT&&se&&(de=S==null?void 0:S(ne,le)),se&&de!==!1&&B()}),[N]=FAe(H),z=le=>{switch(le){case zT:return{[Kl]:l,[Zv]:d,[Jv]:f};case HT:return{[Kl]:c,[Zv]:h,[Jv]:g};case WT:return{[Kl]:u,[Zv]:p,[Jv]:m};default:return{}}},U=y.useMemo(()=>z(I),[I]),[V,G]=NAe(I,!e,le=>{var re;if(le===Kl){const ne=U[Kl];return ne?ne(O()):Cae}return G in U&&A(((re=U[G])==null?void 0:re.call(U,O(),null))||null),G===Jv&&I!==Ju&&(N(O()),s>0&&(clearTimeout(F.current),F.current=setTimeout(()=>{H({deadline:!0})},s))),G===pae&&B(),kAe}),K=bae(G);k.current=K;const q=y.useRef(null);yae(()=>{if(_.current&&q.current===t)return;R(t);const le=_.current;_.current=!0;let re;!le&&t&&i&&(re=zT),le&&t&&n&&(re=HT),(le&&!t&&o||!le&&a&&!t&&o)&&(re=WT);const ne=z(re);re&&(e||ne[Kl])?(M(re),V()):M(Ju),q.current=t},[t]),y.useEffect(()=>{(I===zT&&!i||I===HT&&!n||I===WT&&!o)&&M(Ju)},[i,n,o]),y.useEffect(()=>()=>{_.current=!1,clearTimeout(F.current)},[]);const Y=y.useRef(!1);y.useEffect(()=>{T&&(Y.current=!0),T!==void 0&&I===Ju&&((Y.current||T)&&(x==null||x(T)),Y.current=!0)},[T,I]);let X=D;return U[Kl]&&G===Zv&&(X={transition:"none",...X}),[E,G,X,T??t]}function $Ae(e){let t=e;typeof e=="object"&&({transitionSupport:t}=e);function r(i,o){return!!(i.motionName&&t&&o!==!1)}const n=y.forwardRef((i,o)=>{const{visible:s=!0,removeOnLeave:a=!0,forceRender:l,children:c,motionName:u,leavedClassName:d,eventProps:h}=i,{motion:p}=y.useContext(MAe),f=r(i,p),g=y.useRef();function m(){return lc(g.current)}const[v,b,S,x]=BAe(f,s,m,i),T=v(),R=y.useRef(x);x&&(R.current=!0);const E=y.useMemo(()=>{const A={};return Object.defineProperties(A,{nativeElement:{enumerable:!0,get:m},inMotion:{enumerable:!0,get:()=>()=>v()!==Ju},enableMotion:{enumerable:!0,get:()=>()=>f}}),A},[]);y.useImperativeHandle(o,()=>E,[]);let M;const D={...h,visible:s};if(!c)M=null;else if(T===Ju)x?M=c({...D},g):!a&&R.current&&d?M=c({...D,className:d},g):l||!a&&!d?M=c({...D,style:{display:"none"}},g):M=null;else{let A;b===Kl?A="prepare":bae(b)?A="active":b===Zv&&(A="start");const I=_9(u,`${T}-${A}`);M=c({...D,className:ee(_9(u,T),{[I]:I&&A,[u]:typeof u=="string"}),style:S},g)}return y.isValidElement(M)&&cu(M)&&(zd(M)||(M=y.cloneElement(M,{ref:g}))),M});return n.displayName="CSSMotion",n}const uu=$Ae(AAe);function GAe(e){const{prefixCls:t,align:r,arrow:n,arrowPos:i}=e,{className:o,content:s,style:a}=n||{},{x:l=0,y:c=0}=i,u=y.useRef(null);if(!r||!r.points)return null;const d={position:"absolute"};if(r.autoArrow!==!1){const h=r.points[0],p=r.points[1],f=h[0],g=h[1],m=p[0],v=p[1];f===m||!["t","b"].includes(f)?d.top=c:f==="t"?d.top=0:d.bottom=0,g===v||!["l","r"].includes(g)?d.left=l:g==="l"?d.left=0:d.right=0}return y.createElement("div",{ref:u,className:ee(`${t}-arrow`,o),style:{...d,...a}},s)}function bB(){return bB=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement("div",{style:{zIndex:n},className:ee(`${t}-mask`,s&&`${t}-mobile-mask`,a)})):null}const zAe=y.memo(({children:e})=>e,(e,t)=>t.cache);function Sae(e,t,r,n,i,o,s,a){var u;const l="auto",c=e?{}:{left:"-1000vw",top:"-1000vh",right:l,bottom:l};if(!e&&(t||!r)){const{points:d}=n,h=n.dynamicInset||((u=n._experimental)==null?void 0:u.dynamicInset),p=h&&d[0][1]==="r",f=h&&d[0][0]==="b";p?(c.right=i,c.left=l):(c.left=s,c.right=l),f?(c.bottom=o,c.top=l):(c.top=a,c.bottom=l)}return c}function SB(){return SB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{onEsc:r,popup:n,className:i,prefixCls:o,style:s,target:a,onVisibleChanged:l,open:c,keepDom:u,fresh:d,onClick:h,mask:p,arrow:f,arrowPos:g,align:m,motion:v,maskMotion:b,mobile:S,forceRender:x,getPopupContainer:T,autoDestroy:R,portal:E,children:M,zIndex:D,onMouseEnter:A,onMouseLeave:I,onPointerEnter:_,onPointerDownCapture:F,ready:O,offsetX:k,offsetY:B,offsetR:H,offsetB:N,onAlign:z,onPrepare:U,onResize:V,stretch:G,targetWidth:K,targetHeight:q}=e,Y=typeof n=="function"?n():n,X=c||u,le=!!S,[re,ne,se]=y.useMemo(()=>S?[S.mask,S.maskMotion,S.motion]:[p,b,v],[S,p,b,v]),de=(T==null?void 0:T.length)>0,[te,ie]=y.useState(!T||!de);zr(()=>{!te&&de&&a&&ie(!0)},[te,de,a]);const pe=br((ve,he)=>{V==null||V(ve,he),z()}),Z=Sae(le,O,c,m,H,N,k,B);if(!te)return null;const ue={};return G&&(G.includes("height")&&q?ue.height=q:G.includes("minHeight")&&q&&(ue.minHeight=q),G.includes("width")&&K?ue.width=K:G.includes("minWidth")&&K&&(ue.minWidth=K)),c||(ue.pointerEvents="none"),y.createElement(E,{open:x||X,getContainer:T&&(()=>T(a)),autoDestroy:R,onEsc:r},y.createElement(VAe,{prefixCls:o,open:c,zIndex:D,mask:re,motion:ne,mobile:le}),y.createElement(Js,{onResize:pe,disabled:!c},ve=>y.createElement(uu,SB({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:x,leavedClassName:`${o}-hidden`},se,{onAppearPrepare:U,onEnterPrepare:U,visible:c,onVisibleChanged:he=>{var me;(me=v==null?void 0:v.onVisibleChanged)==null||me.call(v,he),l(he)}}),({className:he,style:me},Oe)=>{const Pe=ee(o,he,i,{[`${o}-mobile`]:le});return y.createElement("div",{ref:zo(ve,t,Oe),className:Pe,style:{"--arrow-x":`${g.x||0}px`,"--arrow-y":`${g.y||0}px`,...Z,...ue,...me,boxSizing:"border-box",zIndex:D,...s},onMouseEnter:A,onMouseLeave:I,onPointerEnter:_,onClick:h,onPointerDownCapture:F},f&&y.createElement(GAe,{prefixCls:o,arrow:f,arrowPos:g,align:m}),y.createElement(zAe,{cache:!c&&!d},Y))})),M)}),YP=y.createContext(null),xae=y.createContext(null);function O9(e){return e?Array.isArray(e)?e:[e]:[]}function HAe(e,t,r){return y.useMemo(()=>{const n=O9(t??e),i=O9(r??e),o=new Set(n),s=new Set(i);return o.has("hover")&&!o.has("click")&&o.add("touch"),s.has("hover")&&!s.has("click")&&s.add("touch"),[o,s]},[e,t,r])}const PD=(e=>{if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){const{width:t,height:r}=e.getBBox();if(t||r)return!0}if(e.getBoundingClientRect){const{width:t,height:r}=e.getBoundingClientRect();if(t||r)return!0}}return!1});function WAe(e=[],t=[],r){const n=(i,o)=>i[o]||"";return r?n(e,0)===n(t,0):n(e,0)===n(t,0)&&n(e,1)===n(t,1)}function Tae(e,t,r,n){var s;const{points:i}=r,o=Object.keys(e);for(let a=0;an.includes(a))&&t.push(r),r=r.parentElement}return t}function m0(e,t=1){return Number.isNaN(e)?t:e}function qb(e){return m0(parseFloat(e),0)}function k9(e,t){const r={...e};return(t||[]).forEach(n=>{if(n instanceof HTMLBodyElement||n instanceof HTMLHtmlElement)return;const{overflow:i,overflowClipMargin:o,borderTopWidth:s,borderBottomWidth:a,borderLeftWidth:l,borderRightWidth:c}=xx(n).getComputedStyle(n),u=n.getBoundingClientRect(),{offsetHeight:d,clientHeight:h,offsetWidth:p,clientWidth:f}=n,g=qb(s),m=qb(a),v=qb(l),b=qb(c),S=m0(Math.round(u.width/p*1e3)/1e3),x=m0(Math.round(u.height/d*1e3)/1e3),T=(p-f-v-b)*S,R=(d-h-g-m)*x,E=g*x,M=m*x,D=v*S,A=b*S;let I=0,_=0;if(i==="clip"){const H=qb(o);I=H*S,_=H*x}const F=u.x+D-I,O=u.y+E-_,k=F+u.width+2*I-D-A-T,B=O+u.height+2*_-E-M-R;r.left=Math.max(r.left,F),r.top=Math.max(r.top,O),r.right=Math.min(r.right,k),r.bottom=Math.min(r.bottom,B)}),r}function N9(e,t=0){const r=`${t}`,n=r.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(r)}function B9(e,t){const[r,n]=t||[];return[N9(e.width,r),N9(e.height,n)]}function $9(e=""){return[e[0],e[1]]}function av(e,t){const r=t[0],n=t[1];let 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 gh(e,t){const r={t:"b",b:"t",l:"r",r:"l"},n=[...e];return n[t]=r[e[t]]||"c",n}function G9(e){return e.join("")}function Eae(e,t,r,n,i,o,s,a){const[l,c]=y.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[n]||{}}),u=y.useRef(0),d=y.useMemo(()=>!t||a?[]:wB(t),[t]),h=y.useRef({});e||(()=>{h.current={}})();const f=br(()=>{var v,b;if(t&&r&&e&&!a){let Tt=function(mr,vt,vr=ue){const bn=k.x+mr,ti=k.y+vt,_i=bn+Y,$a=ti+q,Ho=Math.max(bn,vr.left),Ls=Math.max(ti,vr.top),ua=Math.min(_i,vr.right),kt=Math.min($a,vr.bottom);return Math.max(0,(ua-Ho)*(kt-Ls))},Te=function(){$e=k.y+rt,oe=$e+q,ce=k.x+Ie,ge=ce+Y};const S=t,x=S.ownerDocument,T=xx(S),{position:R}=T.getComputedStyle(S),E=S.style.left,M=S.style.top,D=S.style.right,A=S.style.bottom,I=S.style.overflow,_={...i[n],...o},F=x.createElement("div");(v=S.parentElement)==null||v.appendChild(F),F.style.left=`${S.offsetLeft}px`,F.style.top=`${S.offsetTop}px`,F.style.position=R,F.style.height=`${S.offsetHeight}px`,F.style.width=`${S.offsetWidth}px`,S.style.left="0",S.style.top="0",S.style.right="auto",S.style.bottom="auto",S.style.overflow="hidden";let O;if(Array.isArray(r))O={x:r[0],y:r[1],width:0,height:0};else{const mr=r.getBoundingClientRect();mr.x=mr.x??mr.left,mr.y=mr.y??mr.top,O={x:mr.x,y:mr.y,width:mr.width,height:mr.height}}const k=S.getBoundingClientRect(),{height:B,width:H}=T.getComputedStyle(S);k.x=k.x??k.left,k.y=k.y??k.top;const{clientWidth:N,clientHeight:z,scrollWidth:U,scrollHeight:V,scrollTop:G,scrollLeft:K}=x.documentElement,q=k.height,Y=k.width,X=O.height,le=O.width,re={left:0,top:0,right:N,bottom:z},ne={left:-K,top:-G,right:U-K,bottom:V-G};let{htmlRegion:se}=_;const de="visible",te="visibleFirst";se!=="scroll"&&se!==te&&(se=de);const ie=se===te,pe=k9(ne,d),Z=k9(re,d),ue=se===de?Z:pe,ve=ie?Z:ue;S.style.left="auto",S.style.top="auto",S.style.right="0",S.style.bottom="0";const he=S.getBoundingClientRect();S.style.left=E,S.style.top=M,S.style.right=D,S.style.bottom=A,S.style.overflow=I,(b=S.parentElement)==null||b.removeChild(F);const me=m0(Math.round(Y/parseFloat(H)*1e3)/1e3),Oe=m0(Math.round(q/parseFloat(B)*1e3)/1e3);if(me===0||Oe===0||Dy(r)&&!PD(r))return;const{offset:Pe,targetOffset:Me}=_;let[He,Ge]=B9(k,Pe);const[Ct,Ht]=B9(O,Me);O.x-=Ct,O.y-=Ht;const[St,Ye]=_.points||[],Fe=$9(Ye),et=$9(St),Ne=av(O,Fe),tt=av(k,et),nt={..._};let Ke=[et,Fe],Ie=Ne.x-tt.x+He,rt=Ne.y-tt.y+Ge;const Rt=Tt(Ie,rt),Bt=Tt(Ie,rt,Z),Qt=av(O,["t","l"]),ft=av(k,["t","l"]),ut=av(O,["b","r"]),Yt=av(k,["b","r"]),hr=_.overflow||{},{adjustX:Je,adjustY:ot,shiftX:De,shiftY:Pt}=hr,Qe=mr=>typeof mr=="boolean"?mr:mr>=0;let $e,oe,ce,ge;Te();const ke=Qe(ot),Ze=et[0]===Fe[0];if(ke&&et[0]==="t"&&(oe>ve.bottom||h.current.bt)){let mr=rt;Ze?mr-=q-X:mr=Qt.y-Yt.y-Ge;const vt=Tt(Ie,mr),vr=Tt(Ie,mr,Z);vt>Rt||vt===Rt&&(!ie||vr>=Bt)?(h.current.bt=!0,rt=mr,Ge=-Ge,Ke=[gh(Ke[0],0),gh(Ke[1],0)]):h.current.bt=!1}if(ke&&et[0]==="b"&&($eRt||vt===Rt&&(!ie||vr>=Bt)?(h.current.tb=!0,rt=mr,Ge=-Ge,Ke=[gh(Ke[0],0),gh(Ke[1],0)]):h.current.tb=!1}const Dt=Qe(Je),st=et[1]===Fe[1];if(Dt&&et[1]==="l"&&(ge>ve.right||h.current.rl)){let mr=Ie;st?mr-=Y-le:mr=Qt.x-Yt.x-He;const vt=Tt(mr,rt),vr=Tt(mr,rt,Z);vt>Rt||vt===Rt&&(!ie||vr>=Bt)?(h.current.rl=!0,Ie=mr,He=-He,Ke=[gh(Ke[0],1),gh(Ke[1],1)]):h.current.rl=!1}if(Dt&&et[1]==="r"&&(ceRt||vt===Rt&&(!ie||vr>=Bt)?(h.current.lr=!0,Ie=mr,He=-He,Ke=[gh(Ke[0],1),gh(Ke[1],1)]):h.current.lr=!1}nt.points=[G9(Ke[0]),G9(Ke[1])],Te();const it=De===!0?0:De;typeof it=="number"&&(ceZ.right&&(Ie-=ge-Z.right-He,O.x>Z.right-it&&(Ie+=O.x-Z.right+it)));const bt=Pt===!0?0:Pt;typeof bt=="number"&&($eZ.bottom&&(rt-=oe-Z.bottom-Ge,O.y>Z.bottom-bt&&(rt+=O.y-Z.bottom+bt)));const Mt=k.x+Ie,_t=Mt+Y,At=k.y+rt,dt=At+q,mt=O.x,It=mt+le,Zt=O.y,Ft=Zt+X,cr=Math.max(Mt,mt),fr=Math.min(_t,It),mn=(cr+fr)/2-Mt,un=Math.max(At,Zt),dn=Math.min(dt,Ft),ho=(un+dn)/2-At;s==null||s(t,nt);let Mr=he.right-k.x-(Ie+k.width),on=he.bottom-k.y-(rt+k.height);me===1&&(Ie=Math.floor(Ie),Mr=Math.floor(Mr)),Oe===1&&(rt=Math.floor(rt),on=Math.floor(on));const ei={ready:!0,offsetX:Ie/me,offsetY:rt/Oe,offsetR:Mr/me,offsetB:on/Oe,arrowX:mn/me,arrowY:ho/Oe,scaleX:me,scaleY:Oe,align:nt};c(ei)}}),g=()=>{u.current+=1;const v=u.current;Promise.resolve().then(()=>{u.current===v&&f()})},m=()=>{c(v=>({...v,ready:!1}))};return zr(m,[n]),zr(()=>{e||m()},[e]),[l.ready,l.offsetX,l.offsetY,l.offsetR,l.offsetB,l.arrowX,l.arrowY,l.scaleX,l.scaleY,l.align,g]}function Rae(){const e=y.useRef(null),t=()=>{e.current&&(clearTimeout(e.current),e.current=null)},r=(n,i)=>{t(),i===0?n():e.current=setTimeout(()=>{n()},i*1e3)};return y.useEffect(()=>()=>{t()},[]),r}function UAe(e,t,r,n,i){zr(()=>{if(e&&t&&r){let d=function(){n(),i()};const o=t,s=r,a=wB(o),l=wB(s),c=xx(s),u=new Set([c,...a,...l]);return u.forEach(h=>{h.addEventListener("scroll",d,{passive:!0})}),c.addEventListener("resize",d,{passive:!0}),n(),()=>{u.forEach(h=>{h.removeEventListener("scroll",d),c.removeEventListener("resize",d)})}}},[e,t,r])}function jAe(e,t,r,n,i,o,s,a){const l=y.useRef(e);l.current=e;const c=y.useRef(!1);y.useEffect(()=>{if(t&&n&&(!i||o)){const d=()=>{c.current=!1},h=g=>{var m,v;l.current&&!s(((v=(m=g.composedPath)==null?void 0:m.call(g))==null?void 0:v[0])||g.target)&&!c.current&&a(!1)},p=xx(n);p.addEventListener("pointerdown",d,!0),p.addEventListener("mousedown",h,!0),p.addEventListener("contextmenu",h,!0);const f=qP(r);return f&&(f.addEventListener("mousedown",h,!0),f.addEventListener("contextmenu",h,!0)),()=>{p.removeEventListener("pointerdown",d,!0),p.removeEventListener("mousedown",h,!0),p.removeEventListener("contextmenu",h,!0),f&&(f.removeEventListener("mousedown",h,!0),f.removeEventListener("contextmenu",h,!0))}}},[t,r,n,i,o]);function u(){c.current=!0}return u}function KAe(){const[e,t]=Q.useState(null),[r,n]=Q.useState(!1),[i,o]=Q.useState(!1),s=Q.useRef(null),a=br(c=>{c===!1?(s.current=null,n(!1)):i&&r?s.current=c:(n(!0),t(c),s.current=null,r||o(!0))}),l=br(c=>{c?(o(!1),s.current&&(t(s.current),s.current=null)):(o(!1),s.current=null)});return[a,r,e,l]}function xB(){return xB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:t,isMobile:r,ready:n,open:i,align:o,offsetR:s,offsetB:a,offsetX:l,offsetY:c,arrowPos:u,popupSize:d,motion:h,uniqueContainerClassName:p,uniqueContainerStyle:f}=e,g=`${t}-unique-container`,[m,v]=Q.useState(!1),b=Sae(r,n,i,o,s,a,l,c),S=Q.useRef(b);n&&(S.current=b);const x={};return d&&(x.width=d.width,x.height=d.height),Q.createElement(uu,xB({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,leavedClassName:`${g}-hidden`},h,{visible:i,onVisibleChanged:T=>{v(T)}}),({className:T,style:R})=>{const E=ee(g,T,p,{[`${g}-visible`]:m});return Q.createElement("div",{className:E,style:{"--arrow-x":`${(u==null?void 0:u.x)||0}px`,"--arrow-y":`${(u==null?void 0:u.y)||0}px`,...S.current,...x,...R,...f}})})},YAe=({children:e,postTriggerProps:t})=>{const[r,n,i,o]=KAe(),s=y.useMemo(()=>!i||!t?i:t(i),[i,t]),[a,l]=y.useState(null),[c,u]=y.useState(null),d=y.useRef(null),h=br(N=>{d.current=N,Dy(N)&&a!==N&&l(N)}),p=y.useRef(null),f=Rae(),g=br((N,z)=>{p.current=z,f(()=>{r(N)},N.delay)}),m=N=>{f(()=>{var z;(z=p.current)!=null&&z.call(p)||r(!1)},N)},v=br(N=>{o(N)}),[b,S,x,T,R,E,M,,,D,A]=Eae(n,a,s==null?void 0:s.target,s==null?void 0:s.popupPlacement,(s==null?void 0:s.builtinPlacements)||{},s==null?void 0:s.popupAlign,void 0,!1),I=y.useMemo(()=>{var z;if(!s)return"";const N=Tae(s.builtinPlacements||{},s.prefixCls||"",D,!1);return ee(N,(z=s.getPopupClassNameFromAlign)==null?void 0:z.call(s,D))},[D,s==null?void 0:s.getPopupClassNameFromAlign,s==null?void 0:s.builtinPlacements,s==null?void 0:s.prefixCls]),_=y.useMemo(()=>({show:g,hide:m}),[]);y.useEffect(()=>{A()},[s==null?void 0:s.target]);const F=br(()=>(A(),Promise.resolve())),O=y.useRef({}),k=y.useContext(YP),B=y.useMemo(()=>({registerSubPopup:(N,z)=>{O.current[N]=z,k==null||k.registerSubPopup(N,z)}}),[k]),H=s==null?void 0:s.prefixCls;return y.createElement(xae.Provider,{value:_},e,s&&y.createElement(YP.Provider,{value:B},y.createElement(wae,{ref:h,portal:Sx,onEsc:s.onEsc,prefixCls:H,popup:s.popup,className:ee(s.popupClassName,I,`${H}-unique-controlled`),style:s.popupStyle,target:s.target,open:n,keepDom:!0,fresh:!0,autoDestroy:!1,onVisibleChanged:v,ready:b,offsetX:S,offsetY:x,offsetR:T,offsetB:R,onAlign:A,onPrepare:F,onResize:N=>u({width:N.offsetWidth,height:N.offsetHeight}),arrowPos:{x:E,y:M},align:D,zIndex:s.zIndex,mask:s.mask,arrow:s.arrow,motion:s.popupMotion,maskMotion:s.maskMotion,getPopupContainer:s.getPopupContainer},y.createElement(qAe,{prefixCls:H,isMobile:!1,ready:b,open:n,align:D,offsetR:T,offsetB:R,offsetX:S,offsetY:x,arrowPos:{x:E,y:M},popupSize:c,motion:s.popupMotion,uniqueContainerClassName:ee(s.uniqueContainerClassName,I),uniqueContainerStyle:s.uniqueContainerStyle}))))};function XAe(e=Sx){return y.forwardRef((r,n)=>{const{prefixCls:i="rc-trigger-popup",children:o,action:s="hover",showAction:a,hideAction:l,popupVisible:c,defaultPopupVisible:u,onOpenChange:d,afterOpenChange:h,onPopupVisibleChange:p,afterPopupVisibleChange:f,mouseEnterDelay:g,mouseLeaveDelay:m=.1,focusDelay:v,blurDelay:b,mask:S,maskClosable:x=!0,getPopupContainer:T,forceRender:R,autoDestroy:E,popup:M,popupClassName:D,uniqueContainerClassName:A,uniqueContainerStyle:I,popupStyle:_,popupPlacement:F,builtinPlacements:O={},popupAlign:k,zIndex:B,stretch:H,getPopupClassNameFromAlign:N,fresh:z,unique:U,alignPoint:V,onPopupClick:G,onPopupAlign:K,arrow:q,popupMotion:Y,maskMotion:X,mobile:le,...re}=r,ne=E||!1,se=c===void 0,de=!!le,te=y.useRef({}),ie=y.useContext(YP),pe=y.useMemo(()=>({registerSubPopup:(kt,Vr)=>{te.current[kt]=Vr,ie==null||ie.registerSubPopup(kt,Vr)}}),[ie]),Z=y.useContext(xae),ue=Tu(),[ve,he]=y.useState(null),me=y.useRef(null),Oe=br(kt=>{me.current=kt,Dy(kt)&&ve!==kt&&he(kt),ie==null||ie.registerSubPopup(ue,kt)}),[Pe,Me]=y.useState(null),He=y.useRef(null),Ge=br(kt=>{const Vr=lc(kt);Dy(Vr)&&Pe!==Vr&&(Me(Vr),He.current=Vr)}),Ct={},Ht=br(kt=>{var Yi,Rc;const Vr=Pe;return(Vr==null?void 0:Vr.contains(kt))||((Yi=qP(Vr))==null?void 0:Yi.host)===kt||kt===Vr||(ve==null?void 0:ve.contains(kt))||((Rc=qP(ve))==null?void 0:Rc.host)===kt||kt===ve||Object.values(te.current).some(da=>(da==null?void 0:da.contains(kt))||kt===da)}),St=q?{...q!==!0?q:{}}:null,[Ye,Fe]=Fn(u||!1,c),et=Ye||!1,Ne=y.useMemo(()=>{const kt=typeof o=="function"?o({open:et}):o;return y.Children.only(kt)},[o,et]),tt=(Ne==null?void 0:Ne.props)||{},nt=br(()=>et),Ke=br((kt=0)=>({popup:M,target:Pe,delay:kt,prefixCls:i,popupClassName:D,uniqueContainerClassName:A,uniqueContainerStyle:I,popupStyle:_,popupPlacement:F,builtinPlacements:O,popupAlign:k,zIndex:B,mask:S,maskClosable:x,popupMotion:Y,maskMotion:X,arrow:St,getPopupContainer:T,getPopupClassNameFromAlign:N,id:ue,onEsc:Bt}));zr(()=>{Z&&U&&Pe&&!se&&!ie&&(et?Z.show(Ke(g),nt):Z.hide(m))},[et,Pe]);const Ie=y.useRef(et);Ie.current=et;const rt=br(kt=>{ac.flushSync(()=>{et!==kt&&(Fe(kt),d==null||d(kt),p==null||p(kt))})}),Tt=Rae(),Rt=(kt,Vr=0)=>{if(c!==void 0){Tt(()=>{rt(kt)},Vr);return}if(Z&&U&&se&&!ie){kt?Z.show(Ke(Vr),nt):Z.hide(Vr);return}Tt(()=>{rt(kt)},Vr)};function Bt({top:kt}){kt&&Rt(!1)}const[Qt,ft]=y.useState(!1);zr(kt=>{(!kt||et)&&ft(!0)},[et]);const[ut,Yt]=y.useState(null),[hr,Je]=y.useState(null),ot=kt=>{Je([kt.clientX,kt.clientY])},[De,Pt,Qe,$e,oe,ce,ge,Te,ke,Ze,Dt]=Eae(et,ve,V&&hr!==null?hr:Pe,F,O,k,K,de),[st,it]=HAe(s,a,l),bt=st.has("click"),Mt=it.has("click")||it.has("contextMenu"),_t=br(()=>{Qt||Dt()});UAe(et,Pe,ve,_t,()=>{Ie.current&&V&&Mt&&Rt(!1)}),zr(()=>{_t()},[hr,F]),zr(()=>{et&&!(O!=null&&O[F])&&_t()},[JSON.stringify(k)]);const dt=y.useMemo(()=>{const kt=Tae(O,i,Ze,V);return ee(kt,N==null?void 0:N(Ze))},[Ze,N,O,i,V]);y.useImperativeHandle(n,()=>({nativeElement:He.current,popupElement:me.current,forceAlign:_t}));const[mt,It]=y.useState(0),[Zt,Ft]=y.useState(0),cr=()=>{if(H&&Pe){const kt=Pe.getBoundingClientRect();It(kt.width),Ft(kt.height)}},fr=()=>{cr(),_t()},rr=kt=>{ft(!1),Dt(),h==null||h(kt),f==null||f(kt)},mn=()=>new Promise(kt=>{cr(),Yt(()=>kt)});zr(()=>{ut&&(Dt(),ut(),Yt(null))},[ut]);function un(kt,Vr,Yi,Rc,da){Ct[kt]=(A1,...ub)=>{var vn;(!da||!da())&&(Rc==null||Rc(A1),Rt(Vr,Yi)),(vn=tt[kt])==null||vn.call(tt,A1,...ub)}}const dn=st.has("touch"),en=it.has("touch"),ho=y.useRef(!1);(dn||en)&&(Ct.onTouchStart=(...kt)=>{var Vr;ho.current=!0,Ie.current&&en?Rt(!1):!Ie.current&&dn&&Rt(!0),(Vr=tt.onTouchStart)==null||Vr.call(tt,...kt)}),(bt||Mt)&&(Ct.onClick=(kt,...Vr)=>{var Yi;Ie.current&&Mt?Rt(!1):!Ie.current&&bt&&(ot(kt),Rt(!0)),(Yi=tt.onClick)==null||Yi.call(tt,kt,...Vr),ho.current=!1});const Mr=jAe(et,Mt||en,Pe,ve,S,x,Ht,Rt),on=st.has("hover"),ei=it.has("hover");let mr,vt;const vr=()=>ho.current;if(on){const kt=Vr=>{ot(Vr)};un("onMouseEnter",!0,g,kt,vr),un("onPointerEnter",!0,g,kt,vr),mr=Vr=>{(et||Qt)&&(ve!=null&&ve.contains(Vr.target))&&Rt(!0,g)},V&&(Ct.onMouseMove=Vr=>{var Yi;(Yi=tt.onMouseMove)==null||Yi.call(tt,Vr)})}ei&&(un("onMouseLeave",!1,m,void 0,vr),un("onPointerLeave",!1,m,void 0,vr),vt=()=>{Rt(!1,m)}),st.has("focus")&&un("onFocus",!0,v),it.has("focus")&&un("onBlur",!1,b),st.has("contextMenu")&&(Ct.onContextMenu=(kt,...Vr)=>{var Yi;Ie.current&&it.has("contextMenu")?Rt(!1):(ot(kt),Rt(!0)),kt.preventDefault(),(Yi=tt.onContextMenu)==null||Yi.call(tt,kt,...Vr)});const bn=y.useRef(!1);bn.current||(bn.current=R||et||Qt);const ti={...tt,...Ct},_i={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(kt=>{re[kt]&&(_i[kt]=(...Vr)=>{var Yi;(Yi=ti[kt])==null||Yi.call(ti,...Vr),re[kt](...Vr)})});const Ho={x:ce,y:ge};Zoe(et,Pe,fr);const Ls=xu(Ge,zd(Ne)),ua=y.cloneElement(Ne,{...ti,..._i,ref:Ls});return y.createElement(y.Fragment,null,ua,bn.current&&(!Z||!U)&&y.createElement(YP.Provider,{value:pe},y.createElement(wae,{portal:e,ref:Oe,prefixCls:i,popup:M,className:ee(D,!de&&dt),style:_,target:Pe,onMouseEnter:mr,onMouseLeave:vt,onPointerEnter:mr,zIndex:B,open:et,keepDom:Qt,fresh:z,onClick:G,onPointerDownCapture:Mr,mask:S,motion:Y,maskMotion:X,onVisibleChanged:rr,onPrepare:mn,forceRender:R,autoDestroy:ne,getPopupContainer:T,onEsc:Bt,align:Ze,arrow:St,arrowPos:Ho,ready:De,offsetX:Pt,offsetY:Qe,offsetR:$e,offsetB:oe,onAlign:_t,stretch:H,targetWidth:mt/Te,targetHeight:Zt/ke,mobile:le})))})}const MD=XAe(Sx);function Pae(e){return e&&Q.isValidElement(e)&&e.type===Q.Fragment}const Mae=(e,t,r)=>Q.isValidElement(e)?Q.cloneElement(e,typeof r=="function"?r(e.props||{}):r):t;function Ui(e,t){return Mae(e,e,t)}const ZAe=({children:e})=>{const{getPrefixCls:t}=Q.useContext(or),r=t();return Q.isValidElement(e)?Q.createElement(Sm,{visible:!0,motionName:`${r}-fade`,motionAppear:!0,motionEnter:!0,motionLeave:!1,removeOnLeave:!1},({style:n,className:i})=>Ui(e,o=>({className:ee(o.className,i),style:{...o.style,...n}}))):e},jT=[null,null];function JAe(e){if(jT[0]!==e){const t={};Object.keys(e).forEach(r=>{t[r]={...e[r],dynamicInset:!1}}),jT[0]=e,jT[1]=t}return jT[1]}const Iae=({children:e})=>{const t=r=>{const{id:n,builtinPlacements:i,popup:o}=r,s=typeof o=="function"?o():o,a=JAe(i);return{...r,getPopupContainer:null,arrow:!1,popup:Q.createElement(ZAe,{key:n},s),builtinPlacements:a}};return Q.createElement(YAe,{postTriggerProps:t},e)},Rs=y.createContext(!1),Dae=({children:e,disabled:t})=>{const r=y.useContext(Rs);return y.createElement(Rs.Provider,{value:t??r},e)},Ly=y.createContext(void 0),QAe=({children:e,size:t})=>{const r=y.useContext(Ly);return y.createElement(Ly.Provider,{value:t||r},e)};function eFe(){const e=y.useContext(Rs),t=y.useContext(Ly);return{componentDisabled:e,componentSize:t}}function tFe(e,t,r){CC();const n=e||{},i=n.inherit===!1||!t?{...lB,hashed:(t==null?void 0:t.hashed)??lB.hashed,cssVar:t==null?void 0:t.cssVar}:t,o=y.useId();return bm(()=>{var c;if(!e)return t;const s={...i.components};Object.keys(e.components||{}).forEach(u=>{s[u]={...s[u],...e.components[u]}});const a=`css-var-${o.replace(/:/g,"")}`,l={prefix:r==null?void 0:r.prefixCls,...i.cssVar,...n.cssVar,key:((c=n.cssVar)==null?void 0:c.key)||a};return{...i,...n,token:{...i.token,...n.token},components:s,cssVar:l}},[n,i],(s,a)=>s.some((l,c)=>{const u=a[c];return!cc(l,u,!0)}))}const V9=y.createContext(!0);function rFe(e){const t=y.useContext(V9),{children:r}=e,[,n]=ds(),{motion:i}=n,o=y.useRef(!1);return o.current||(o.current=t!==i),o.current?y.createElement(V9.Provider,{value:i},y.createElement(CDe,{motion:i},r)):r}const nFe=()=>null,iFe=({iconPrefixCls:e,csp:t})=>(eDe(e,t),null),oFe=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let XP,Aae,Fae,Lae;function C_(){return XP||a0}function sFe(){return Aae||yD}const aFe=e=>{const{prefixCls:t,iconPrefixCls:r,theme:n,holderRender:i}=e;t!==void 0&&(XP=t),r!==void 0&&(Aae=r),"holderRender"in e&&(Lae=i),n&&(Fae=n)},lFe=()=>({getPrefixCls:(e,t)=>t||(e?`${C_()}-${e}`:C_()),getIconPrefixCls:sFe,getRootPrefixCls:()=>XP||C_(),getTheme:()=>Fae,holderRender:Lae}),cFe=e=>{const{children:t,csp:r,autoInsertSpaceInButton:n,alert:i,affix:o,anchor:s,app:a,form:l,locale:c,componentSize:u,direction:d,space:h,splitter:p,virtual:f,dropdownMatchSelectWidth:g,popupMatchSelectWidth:m,popupOverflow:v,legacyLocale:b,parentContext:S,iconPrefixCls:x,theme:T,componentDisabled:R,segmented:E,statistic:M,spin:D,calendar:A,carousel:I,cascader:_,collapse:F,typography:O,checkbox:k,descriptions:B,divider:H,drawer:N,skeleton:z,steps:U,image:V,layout:G,list:K,mentions:q,modal:Y,progress:X,result:le,slider:re,breadcrumb:ne,masonry:se,menu:de,pagination:te,input:ie,textArea:pe,otp:Z,empty:ue,badge:ve,radio:he,rate:me,ribbon:Oe,switch:Pe,transfer:Me,avatar:He,message:Ge,tag:Ct,table:Ht,card:St,cardMeta:Ye,tabs:Fe,timeline:et,timePicker:Ne,upload:tt,notification:nt,tree:Ke,colorPicker:Ie,datePicker:rt,rangePicker:Tt,flex:Rt,wave:Bt,dropdown:Qt,warning:ft,tour:ut,tooltip:Yt,popover:hr,popconfirm:Je,qrcode:ot,floatButton:De,floatButtonGroup:Pt,variant:Qe,inputNumber:$e,treeSelect:oe,watermark:ce}=e,ge=y.useCallback((mt,It)=>{const{prefixCls:Zt}=e;if(It)return It;const Ft=Zt||S.getPrefixCls("");return mt?`${Ft}-${mt}`:Ft},[S.getPrefixCls,e.prefixCls]),Te=x||S.iconPrefixCls||yD,ke=r||S.csp,Ze=tFe(T,S.theme,{prefixCls:ge("")}),Dt={csp:ke,autoInsertSpaceInButton:n,alert:i,affix:o,anchor:s,app:a,locale:c||b,direction:d,space:h,splitter:p,virtual:f,popupMatchSelectWidth:m??g,popupOverflow:v,getPrefixCls:ge,iconPrefixCls:Te,theme:Ze,segmented:E,statistic:M,spin:D,calendar:A,carousel:I,cascader:_,collapse:F,typography:O,checkbox:k,descriptions:B,divider:H,drawer:N,skeleton:z,steps:U,image:V,input:ie,textArea:pe,otp:Z,layout:G,list:K,mentions:q,modal:Y,progress:X,result:le,slider:re,breadcrumb:ne,masonry:se,menu:de,pagination:te,empty:ue,badge:ve,radio:he,rate:me,ribbon:Oe,switch:Pe,transfer:Me,avatar:He,message:Ge,tag:Ct,table:Ht,card:St,cardMeta:Ye,tabs:Fe,timeline:et,timePicker:Ne,upload:tt,notification:nt,tree:Ke,colorPicker:Ie,datePicker:rt,rangePicker:Tt,flex:Rt,wave:Bt,dropdown:Qt,warning:ft,tour:ut,tooltip:Yt,popover:hr,popconfirm:Je,qrcode:ot,floatButton:De,floatButtonGroup:Pt,variant:Qe,inputNumber:$e,treeSelect:oe,watermark:ce},st={...S};Object.keys(Dt).forEach(mt=>{Dt[mt]!==void 0&&(st[mt]=Dt[mt])}),oFe.forEach(mt=>{const It=e[mt];It&&(st[mt]=It)}),typeof n<"u"&&(st.button={autoInsertSpace:n,...st.button});const it=bm(()=>st,st,(mt,It)=>{const Zt=Object.keys(mt),Ft=Object.keys(It);return Zt.length!==Ft.length||Zt.some(cr=>mt[cr]!==It[cr])}),{layer:bt}=y.useContext(mx),Mt=y.useMemo(()=>({prefixCls:Te,csp:ke,layer:bt?"antd":void 0}),[Te,ke,bt]);let _t=y.createElement(y.Fragment,null,y.createElement(iFe,{iconPrefixCls:Te,csp:ke}),y.createElement(nFe,{dropdownMatchSelectWidth:g}),t);const At=y.useMemo(()=>{var mt,It,Zt,Ft;return Xv(((mt=dc.Form)==null?void 0:mt.defaultValidateMessages)||{},((Zt=(It=it.locale)==null?void 0:It.Form)==null?void 0:Zt.defaultValidateMessages)||{},((Ft=it.form)==null?void 0:Ft.validateMessages)||{},(l==null?void 0:l.validateMessages)||{})},[it,l==null?void 0:l.validateMessages]);Object.keys(At).length>0&&(_t=y.createElement(mAe.Provider,{value:At},_t)),c&&(_t=y.createElement(HDe,{locale:c,_ANT_MARK__:zDe},_t)),_t=y.createElement(jH.Provider,{value:Mt},_t),u&&(_t=y.createElement(QAe,{size:u},_t)),_t=y.createElement(rFe,null,_t),Yt!=null&&Yt.unique&&(_t=y.createElement(Iae,null,_t));const dt=y.useMemo(()=>{const{algorithm:mt,token:It,components:Zt,cssVar:Ft,...cr}=Ze||{},fr=mt&&(!Array.isArray(mt)||mt.length>0)?W2(mt):Ise,rr={};Object.entries(Zt||{}).forEach(([un,dn])=>{const en={...dn};"algorithm"in en&&(en.algorithm===!0?en.theme=fr:(Array.isArray(en.algorithm)||typeof en.algorithm=="function")&&(en.theme=W2(en.algorithm)),delete en.algorithm),rr[un]=en});const mn={...p0,...It};return{...cr,theme:fr,token:mn,components:rr,override:{override:mn,...rr},cssVar:Ft}},[Ze]);return T&&(_t=y.createElement(Dse.Provider,{value:dt},_t)),it.warning&&(_t=y.createElement(lMe.Provider,{value:it.warning},_t)),R!==void 0&&(_t=y.createElement(Dae,{disabled:R},_t)),y.createElement(or.Provider,{value:it},_t)},Eu=e=>{const t=y.useContext(or),r=y.useContext(qH);return y.createElement(cFe,{parentContext:t,legacyLocale:r,...e})};Eu.ConfigContext=or;Eu.SizeContext=Ly;Eu.config=aFe;Eu.useConfig=eFe;Object.defineProperty(Eu,"SizeContext",{get:()=>Ly});const Xt={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};var uFe={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"};function TB(){return TB=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,TB({},e,{ref:t,icon:uFe})),Tx=y.forwardRef(dFe),ZP="__rc_react_root__";function _ae(e,t){const r=t[ZP]||soe.createRoot(t);r.render(e),t[ZP]=r}async function Oae(e){return Promise.resolve().then(()=>{var t;(t=e[ZP])==null||t.unmount(),delete e[ZP]})}const b_=()=>({height:0,opacity:0}),z9=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},hFe=e=>({height:e?e.offsetHeight:0}),S_=(e,t)=>(t==null?void 0:t.deadline)===!0||t.propertyName==="height",kae=(e=a0)=>({motionName:`${e}-motion-collapse`,onAppearStart:b_,onEnterStart:b_,onAppearActive:z9,onEnterActive:z9,onLeaveStart:hFe,onLeaveActive:b_,onAppearEnd:S_,onEnterEnd:S_,onLeaveEnd:S_,motionDeadline:500}),du=(e,t,r)=>r!==void 0?r:`${e}-${t}`,pFe=e=>{const{componentCls:t,colorPrimary:r,motionDurationSlow:n,motionEaseInOut:i,motionEaseOutCirc:o,antCls:s}=e,[,a]=Jn(s,"wave");return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:a("color",r),boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:["box-shadow 0.4s","opacity 2s"].map(l=>`${l} ${o}`).join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:["box-shadow","opacity"].map(l=>`${l} ${n} ${i}`).join(",")}}}}},fFe=QIe("Wave",pFe),ID=`${a0}-wave-target`;function H9(e){return e&&typeof e=="string"&&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 gFe(e,t=null){const r=getComputedStyle(e),{borderTopColor:n,borderColor:i,backgroundColor:o}=r;return t&&H9(r[t])?r[t]:[n,i,o].find(H9)??null}function w_(e){return Number.isNaN(e)?0:e}const mFe=e=>{const{className:t,target:r,component:n,colorSource:i}=e,o=y.useRef(null),{getPrefixCls:s}=y.useContext(or),a=s(),[l]=Jn(a,"wave"),[c,u]=y.useState(null),[d,h]=y.useState([]),[p,f]=y.useState(0),[g,m]=y.useState(0),[v,b]=y.useState(0),[S,x]=y.useState(0),[T,R]=y.useState(!1),E={left:p,top:g,width:v,height:S,borderRadius:d.map(A=>`${A}px`).join(" ")};c&&(E[l("color")]=c);function M(){const A=getComputedStyle(r);u(gFe(r,i));const I=A.position==="static",{borderLeftWidth:_,borderTopWidth:F}=A;f(I?r.offsetLeft:w_(-Number.parseFloat(_))),m(I?r.offsetTop:w_(-Number.parseFloat(F))),b(r.offsetWidth),x(r.offsetHeight);const{borderTopLeftRadius:O,borderTopRightRadius:k,borderBottomLeftRadius:B,borderBottomRightRadius:H}=A;h([O,k,H,B].map(N=>w_(Number.parseFloat(N))))}if(y.useEffect(()=>{if(r){const A=Lr(()=>{M(),R(!0)});let I;return typeof ResizeObserver<"u"&&(I=new ResizeObserver(M),I.observe(r)),()=>{Lr.cancel(A),I==null||I.disconnect()}}},[r]),!T)return null;const D=(n==="Checkbox"||n==="Radio")&&(r==null?void 0:r.classList.contains(ID));return y.createElement(Sm,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(A,I)=>{var _;if(I.deadline||I.propertyName==="opacity"){const F=(_=o.current)==null?void 0:_.parentElement;Oae(F).then(()=>{F==null||F.remove()})}return!1}},({className:A},I)=>y.createElement("div",{ref:zo(o,I),className:ee(t,A,{"wave-quick":D}),style:E}))},vFe=(e,t)=>{var i;const{component:r}=t;if(r==="Checkbox"&&!((i=e.querySelector("input"))!=null&&i.checked))return;const n=document.createElement("div");n.style.position="absolute",n.style.left="0px",n.style.top="0px",e==null||e.insertBefore(n,e==null?void 0:e.firstChild),_ae(y.createElement(mFe,{...t,target:e}),n)},yFe=(e,t,r,n)=>{const{wave:i}=y.useContext(or),[,o,s]=ds(),a=br(u=>{const d=e.current;if(i!=null&&i.disabled||!d)return;const h=d.querySelector(`.${ID}`)||d,{showEffect:p}=i||{};(p||vFe)(h,{className:t,token:o,component:r,event:u,hashId:s,colorSource:n})}),l=y.useRef(null);return y.useEffect(()=>()=>{Lr.cancel(l.current)},[]),u=>{Lr.cancel(l.current),l.current=Lr(()=>{a(u)})}},Ex=e=>{const{children:t,disabled:r,component:n,colorSource:i}=e,{getPrefixCls:o}=y.useContext(or),s=y.useRef(null),a=o("wave"),l=fFe(a),c=yFe(s,ee(a,l),n,i);if(Q.useEffect(()=>{const d=s.current;if(!d||d.nodeType!==window.Node.ELEMENT_NODE||r)return;const h=p=>{!PD(p.target)||!d.getAttribute||d.getAttribute("disabled")||d.disabled||d.className.includes("disabled")&&!d.className.includes("disabled:")||d.getAttribute("aria-disabled")==="true"||d.className.includes("-leave")||c(p)};return d.addEventListener("click",h,!0),()=>{d.removeEventListener("click",h,!0)}},[r]),!Q.isValidElement(t))return t??null;const u=cu(t)?zo(zd(t),s):s;return Ui(t,{ref:u})},Li=e=>{const t=Q.useContext(Ly);return Q.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},CFe=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},bFe=Yr(["Space","Compact"],CFe,()=>({}),{resetStyle:!1}),DD=y.createContext(null),Gp=(e,t)=>{const r=y.useContext(DD),n=y.useMemo(()=>{if(!r)return"";const{compactDirection:i,isFirstItem:o,isLastItem:s}=r,a=i==="vertical"?"-vertical-":"-";return ee(`${e}-compact${a}item`,{[`${e}-compact${a}first-item`]:o,[`${e}-compact${a}last-item`]:s,[`${e}-compact${a}item-rtl`]:t==="rtl"})},[e,t,r]);return{compactSize:r==null?void 0:r.compactSize,compactDirection:r==null?void 0:r.compactDirection,compactItemClassnames:n}},SFe=e=>{const{children:t}=e;return y.createElement(DD.Provider,{value:null},t)},wFe=e=>{const{children:t,...r}=e;return y.createElement(DD.Provider,{value:y.useMemo(()=>r,[r])},t)},ZH=e=>{const{getPrefixCls:t,direction:r}=y.useContext(or),{size:n,direction:i,orientation:o,block:s,prefixCls:a,className:l,rootClassName:c,children:u,vertical:d,...h}=e,[p,f]=Cx(o,d,i),g=Li(R=>n??R),m=t("space-compact",a),[v]=bFe(m),b=ee(m,v,{[`${m}-rtl`]:r==="rtl",[`${m}-block`]:s,[`${m}-vertical`]:f},l,c),S=y.useContext(DD),x=Di(u),T=y.useMemo(()=>x.map((R,E)=>{const M=(R==null?void 0:R.key)||`${m}-item-${E}`;return y.createElement(wFe,{key:M,compactSize:g,compactDirection:p,isFirstItem:E===0&&(!S||(S==null?void 0:S.isFirstItem)),isLastItem:E===x.length-1&&(!S||(S==null?void 0:S.isLastItem))},R)}),[x,S,p,g,m]);return x.length===0?null:y.createElement("div",{className:b,...h},T)},Nae=y.createContext(void 0),xFe=e=>{const{getPrefixCls:t,direction:r}=y.useContext(or),{prefixCls:n,size:i,className:o,...s}=e,a=t("btn-group",n),[,,l]=ds(),c=y.useMemo(()=>{switch(i){case"large":return"lg";case"small":return"sm";default:return""}},[i]),u=ee(a,{[`${a}-${c}`]:c,[`${a}-rtl`]:r==="rtl"},o,l);return y.createElement(Nae.Provider,{value:i},y.createElement("div",{...s,className:u}))},W9=/^[\u4E00-\u9FA5]{2}$/,EB=W9.test.bind(W9);function JH(e){return e==="danger"?{danger:!0}:{type:e}}function U9(e){return typeof e=="string"}function x_(e){return e==="text"||e==="link"}function TFe(e,t,r,n){if(!xn(e)||e==="")return;const i=t?" ":"";return typeof e!="string"&&typeof e!="number"&&U9(e.type)&&EB(e.props.children)?Ui(e,o=>{const s=ee(o.className,n)||void 0,a={...r,...o.style};return{...o,children:o.children.split("").join(i),className:s,style:a}}):U9(e)?Q.createElement("span",{className:n,style:r},EB(e)?e.split("").join(i):e):Pae(e)?Q.createElement("span",{className:n,style:r},e):Ui(e,o=>({...o,className:ee(o.className,n)||void 0,style:{...o.style,...r}}))}function EFe(e,t,r,n){let i=!1;const o=[];return Q.Children.forEach(e,s=>{const a=typeof s,l=a==="string"||a==="number";if(i&&l){const c=o.length-1,u=o[c];o[c]=`${u}${s}`}else o.push(s);i=l}),Q.Children.map(o,s=>TFe(s,t,r,n))}["default","primary","danger"].concat(Nr(Pd));const Bae=y.forwardRef((e,t)=>{const{className:r,style:n,children:i,prefixCls:o}=e,s=ee(`${o}-icon`,r);return Q.createElement("span",{ref:t,className:s,style:n},i)}),j9=y.forwardRef((e,t)=>{const{prefixCls:r,className:n,style:i,iconClassName:o}=e,s=ee(`${r}-loading-icon`,n);return Q.createElement(Bae,{prefixCls:r,className:s,style:i,ref:t},Q.createElement(Tx,{className:o}))}),T_=()=>({width:0,opacity:0,transform:"scale(0)"}),E_=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),RFe=e=>{const{prefixCls:t,loading:r,existIcon:n,className:i,style:o,mount:s}=e,a=!!r;return n?Q.createElement(j9,{prefixCls:t,className:i,style:o}):Q.createElement(Sm,{visible:a,motionName:`${t}-loading-icon-motion`,motionAppear:!s,motionEnter:!s,motionLeave:!s,removeOnLeave:!0,onAppearStart:T_,onAppearActive:E_,onEnterStart:T_,onEnterActive:E_,onLeaveStart:E_,onLeaveActive:T_},({className:l,style:c},u)=>{const d={...o,...c};return Q.createElement(j9,{prefixCls:t,className:ee(i,l),style:d,ref:u})})},$ae=e=>{const{componentCls:t,antCls:r,motionDurationMid:n,motionEaseInOut:i}=e;return{[t]:{[`${r}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`${["height","opacity"].map(o=>`${o} ${n} ${i}`).join(", ")} !important`}},[`${r}-motion-collapse`]:{overflow:"hidden",transition:`${["height","opacity"].map(o=>`${o} ${n} ${i}`).join(", ")} !important`}}}},K9=e=>({animationDuration:e,animationFillMode:"both"}),AD=(e,t,r,n,i=!1)=>{const o=i?"&":"";return{[` ${o}${e}-enter, ${o}${e}-appear `]:{...K9(n),animationPlayState:"paused"},[`${o}${e}-leave`]:{...K9(n),animationPlayState:"paused"},[` ${o}${e}-enter${e}-enter-active, ${o}${e}-appear${e}-appear-active `]:{animationName:t,animationPlayState:"running"},[`${o}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}},PFe=new Zr("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),MFe=new Zr("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),QH=(e,t=!1)=>{const{antCls:r}=e,n=`${r}-fade`,i=t?"&":"";return[AD(n,PFe,MFe,e.motionDurationMid,t),{[` ${i}${n}-enter, ${i}${n}-appear `]:{opacity:0,animationTimingFunction:"linear"},[`${i}${n}-leave`]:{animationTimingFunction:"linear"}}]},IFe=new Zr("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),DFe=new Zr("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),AFe=new Zr("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),FFe=new Zr("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),LFe=new Zr("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),_Fe=new Zr("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),OFe=new Zr("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),kFe=new Zr("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),NFe={"move-up":{inKeyframes:OFe,outKeyframes:kFe},"move-down":{inKeyframes:IFe,outKeyframes:DFe},"move-left":{inKeyframes:AFe,outKeyframes:FFe},"move-right":{inKeyframes:LFe,outKeyframes:_Fe}},JP=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:i,outKeyframes:o}=NFe[t];return[AD(n,i,o,e.motionDurationMid),{[` ${n}-enter, ${n}-appear `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},e3=new Zr("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),t3=new Zr("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),r3=new Zr("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),n3=new Zr("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),BFe=new Zr("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),$Fe=new Zr("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),GFe=new Zr("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),VFe=new Zr("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),zFe={"slide-up":{inKeyframes:e3,outKeyframes:t3},"slide-down":{inKeyframes:r3,outKeyframes:n3},"slide-left":{inKeyframes:BFe,outKeyframes:$Fe},"slide-right":{inKeyframes:GFe,outKeyframes:VFe}},bp=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:i,outKeyframes:o}=zFe[t];return[AD(n,i,o,e.motionDurationMid),{[` ${n}-enter, ${n}-appear `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},md=()=>({"@media (prefers-reduced-motion: reduce)":{transition:"none",animation:"none"}}),HFe=new Zr("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),WFe=new Zr("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),q9=new Zr("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Y9=new Zr("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),UFe=new Zr("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),jFe=new Zr("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),KFe=new Zr("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),qFe=new Zr("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),YFe=new Zr("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),XFe=new Zr("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),ZFe=new Zr("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),JFe=new Zr("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),QFe={zoom:{inKeyframes:HFe,outKeyframes:WFe},"zoom-big":{inKeyframes:q9,outKeyframes:Y9},"zoom-big-fast":{inKeyframes:q9,outKeyframes:Y9},"zoom-left":{inKeyframes:KFe,outKeyframes:qFe},"zoom-right":{inKeyframes:YFe,outKeyframes:XFe},"zoom-up":{inKeyframes:UFe,outKeyframes:jFe},"zoom-down":{inKeyframes:ZFe,outKeyframes:JFe}},Rx=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:i,outKeyframes:o}=QFe[t];return[AD(n,i,o,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[` ${n}-enter, ${n}-appear `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},X9=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),eLe=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}},X9(`${t}-primary`,i),X9(`${t}-danger`,o)]}},R_=e=>Math.round(Number(e||0)),tLe=e=>{if(e instanceof an)return e;if(e&&typeof e=="object"&&"h"in e&&"b"in e){const{b:t,...r}=e;return{...r,v:t}}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e};class v0 extends an{constructor(t){super(tLe(t))}toHsbString(){const t=this.toHsb(),r=R_(t.s*100),n=R_(t.b*100),i=R_(t.h),o=t.a,s=`hsb(${i}, ${r}%, ${n}%)`,a=`hsba(${i}, ${r}%, ${n}%, ${o.toFixed(o===0?0:2)})`;return o===1?s:a}toHsb(){const{v:t,...r}=this.toHsv();return{...r,b:t,a:this.a}}}const rLe=e=>e instanceof v0?e:new v0(e);rLe("#1677ff");const nLe=(e,t)=>(e==null?void 0:e.replace(/[^0-9a-f]/gi,"").slice(0,t?8:6))||"",iLe=(e,t)=>e?nLe(e,t):"";let QP=(function(){function e(t){var n;if(Hd(this,e),this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(n=t.colors)==null?void 0:n.map(i=>({color:new e(i.color),percent:i.percent})),this.cleared=t.cleared;return}const r=Array.isArray(t);r&&t.length?(this.colors=t.map(({color:i,percent:o})=>({color:new e(i),percent:o})),this.metaColor=new v0(this.colors[0].color.metaColor)):this.metaColor=new v0(r?"":t),(!t||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return Wd(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return iLe(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 oLe={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"};function RB(){return RB=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,RB({},e,{ref:t,icon:oLe})),PB=y.forwardRef(sLe);function ll(){return ll=Object.assign?Object.assign.bind():function(e){for(var t=1;te instanceof QP?e:new QP(e),Gae=(e,t)=>{const{r,g:n,b:i,a:o}=e.toRgb(),s=new v0(e.toRgbString()).onBackground(t).toHsv();return o<=.5?s.v>.5:r*.299+n*.587+i*.114>192},Vae=e=>{const{paddingInline:t,onlyIconSize:r,borderColorDisabled:n}=e;return Wr(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:r,colorBorderDisabled:n})},zae=e=>{const t=e.contentFontSize??e.fontSize,r=e.contentFontSizeSM??e.fontSize,n=e.contentFontSizeLG??e.fontSizeLG,i=e.contentLineHeight??XR(t),o=e.contentLineHeightSM??XR(r),s=e.contentLineHeightLG??XR(n),a=Gae(new QP(e.colorBgSolid),"#fff")?"#000":"#fff",l=Pd.reduce((d,h)=>({...d,[`${h}ShadowColor`]:`0 ${ae(e.controlOutlineWidth)} 0 ${jS(e[`${h}1`],e.colorBgContainer)}`}),{}),c=e.colorBgContainerDisabled,u=e.colorBgContainerDisabled;return{...l,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.colorBorderDisabled,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:a,contentFontSize:t,contentFontSizeSM:r,contentFontSizeLG:n,contentLineHeight:i,contentLineHeightSM:o,contentLineHeightLG:s,paddingBlock:Math.max((e.controlHeight-t*i)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-r*o)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-n*s)/2-e.lineWidth,0),defaultBgDisabled:c,dashedBgDisabled:u}},lLe=e=>{const{componentCls:t,antCls:r,lineWidth:n}=e,[i,o]=Jn(r,"btn");return{[t]:[{[i("border-width")]:n,[i("border-color")]:"#000",[i("border-color-hover")]:o("border-color"),[i("border-color-active")]:o("border-color"),[i("border-color-disabled")]:o("border-color"),[i("border-style")]:"solid",[i("text-color")]:"#000",[i("text-color-hover")]:o("text-color"),[i("text-color-active")]:o("text-color"),[i("text-color-disabled")]:o("text-color"),[i("bg-color")]:"#ddd",[i("bg-color-hover")]:o("bg-color"),[i("bg-color-active")]:o("bg-color"),[i("bg-color-disabled")]:e.colorBgContainerDisabled,[i("bg-color-container")]:e.colorBgContainer,[i("shadow")]:"none"},{border:[o("border-width"),o("border-style"),o("border-color")].join(" "),color:o("text-color"),backgroundColor:o("bg-color"),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[o("border-width"),o("border-style"),o("border-color-hover")].join(" "),color:o("text-color-hover"),backgroundColor:o("bg-color-hover")},"&:active":{border:[o("border-width"),o("border-style"),o("border-color-active")].join(" "),color:o("text-color-active"),backgroundColor:o("bg-color-active")}}},{[`&${t}-variant-solid`]:{[i("solid-bg-color")]:o("color-base"),[i("solid-bg-color-hover")]:o("color-hover"),[i("solid-bg-color-active")]:o("color-active"),[i("border-color")]:"transparent",[i("text-color")]:e.colorTextLightSolid,[i("bg-color")]:o("solid-bg-color"),[i("bg-color-hover")]:o("solid-bg-color-hover"),[i("bg-color-active")]:o("solid-bg-color-active"),boxShadow:o("shadow")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i("border-color")]:o("color-base"),[i("border-color-hover")]:o("color-hover"),[i("border-color-active")]:o("color-active"),[i("bg-color")]:o("bg-color-container"),[i("text-color")]:o("color-base"),[i("text-color-hover")]:o("color-hover"),[i("text-color-active")]:o("color-active"),boxShadow:o("shadow")},[`&${t}-variant-dashed`]:{[i("border-style")]:"dashed",[i("bg-color-disabled")]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[i("border-color")]:"transparent",[i("text-color")]:o("color-base"),[i("bg-color")]:o("color-light"),[i("bg-color-hover")]:o("color-light-hover"),[i("bg-color-active")]:o("color-light-active")},[`&${t}-variant-text, &${t}-variant-link`]:{[i("border-color")]:"transparent",[i("text-color")]:o("color-base"),[i("text-color-hover")]:o("color-hover"),[i("text-color-active")]:o("color-active"),[i("bg-color")]:"transparent",[i("bg-color-hover")]:"transparent",[i("bg-color-active")]:"transparent",[`&:disabled, &${e.componentCls}-disabled`]:{background:"transparent",borderColor:"transparent"}},[`&${t}-variant-text`]:{[i("bg-color-hover")]:o("color-light"),[i("bg-color-active")]:o("color-light-active")}},{[`&${t}-variant-link`]:{[i("color-base")]:e.colorLink,[i("color-hover")]:e.colorLinkHover,[i("color-active")]:e.colorLinkActive,[i("bg-color-hover")]:e.linkHoverBg},[`&${t}-color-primary`]:{[i("color-base")]:e.colorPrimary,[i("color-hover")]:e.colorPrimaryHover,[i("color-active")]:e.colorPrimaryActive,[i("color-light")]:e.colorPrimaryBg,[i("color-light-hover")]:e.colorPrimaryBgHover,[i("color-light-active")]:e.colorPrimaryBorder,[i("shadow")]:e.primaryShadow,[`&${t}-variant-solid`]:{[i("text-color")]:e.primaryColor,[i("text-color-hover")]:o("text-color"),[i("text-color-active")]:o("text-color")}},[`&${t}-color-dangerous`]:{[i("color-base")]:e.colorError,[i("color-hover")]:e.colorErrorHover,[i("color-active")]:e.colorErrorActive,[i("color-light")]:e.colorErrorBg,[i("color-light-hover")]:e.colorErrorBgFilledHover,[i("color-light-active")]:e.colorErrorBgActive,[i("shadow")]:e.dangerShadow,[`&${t}-variant-solid`]:{[i("text-color")]:e.dangerColor,[i("text-color-hover")]:o("text-color"),[i("text-color-active")]:o("text-color")}},[`&${t}-color-default`]:{[i("solid-bg-color")]:e.colorBgSolid,[i("solid-bg-color-hover")]:e.colorBgSolidHover,[i("solid-bg-color-active")]:e.colorBgSolidActive,[i("color-base")]:e.defaultBorderColor,[i("color-hover")]:e.defaultHoverBorderColor,[i("color-active")]:e.defaultActiveBorderColor,[i("color-light")]:e.colorFillTertiary,[i("color-light-hover")]:e.colorFillSecondary,[i("color-light-active")]:e.colorFill,[i("text-color")]:e.defaultColor,[i("text-color-hover")]:e.defaultHoverColor,[i("text-color-active")]:e.defaultActiveColor,[i("shadow")]:e.defaultShadow,[`&${t}-variant-outlined`]:{[i("bg-color-disabled")]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[i("text-color")]:e.solidTextColor,[i("text-color-hover")]:o("text-color"),[i("text-color-active")]:o("text-color")},[`&${t}-variant-filled, &${t}-variant-text`]:{[i("text-color-hover")]:o("text-color"),[i("text-color-active")]:o("text-color")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i("text-color")]:e.defaultColor,[i("text-color-hover")]:e.defaultHoverColor,[i("text-color-active")]:e.defaultActiveColor,[i("bg-color-container")]:e.defaultBg,[i("bg-color-hover")]:e.defaultHoverBg,[i("bg-color-active")]:e.defaultActiveBg},[`&${t}-variant-text`]:{[i("text-color")]:e.textTextColor,[i("text-color-hover")]:e.textTextHoverColor,[i("text-color-active")]:e.textTextActiveColor,[i("bg-color-hover")]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i("text-color")]:e.defaultGhostColor,[i("border-color")]:e.defaultGhostBorderColor}}}},Pd.map(s=>{const a=e[`${s}6`],l=e[`${s}1`],c=e[`${s}Hover`],u=e[`${s}2`],d=e[`${s}3`],h=e[`${s}Active`],p=e[`${s}ShadowColor`];return{[`&${t}-color-${s}`]:{[i("color-base")]:a,[i("color-hover")]:c,[i("color-active")]:h,[i("color-light")]:l,[i("color-light-hover")]:u,[i("color-light-active")]:d,[i("shadow")]:p}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:o("bg-color-disabled"),color:e.colorTextDisabled,boxShadow:"none"}},{[`&${t}-background-ghost`]:{[i("bg-color")]:e.ghostBg,[i("bg-color-hover")]:e.ghostBg,[i("bg-color-active")]:e.ghostBg,[i("shadow")]:"none",[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[i("bg-color-hover")]:e.ghostBg,[i("bg-color-active")]:e.ghostBg}}}]}},cLe=e=>{const{componentCls:t,iconCls:r,fontWeight:n,opacityLoading:i,motionDurationSlow:o,motionEaseInOut:s,iconGap:a,calc:l}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:a,alignItems:"center",justifyContent:"center",fontWeight:n,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",...md(),"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:vx(),"> a":{color:"currentColor"},"&:not(:disabled)":yl(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(c=>`${c} ${o} ${s}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:l(a).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(a).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:l(a).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(a).mul(-1).equal()}}}}}},uLe=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),i3=(e,t="")=>{const{componentCls:r,controlHeight:n,fontSize:i,borderRadius:o,buttonPaddingHorizontal:s,iconCls:a,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=e;return[{[t]:{fontSize:i,height:n,padding:`${ae(l)} ${ae(s)}`,borderRadius:o,[`&${r}-icon-only`]:{width:n,[a]:{fontSize:c}}}},{[`${r}${r}-circle${t}`]:uLe(e)},{[`${r}${r}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${r}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},dLe=e=>{const t=Wr(e,{fontSize:e.contentFontSize});return i3(t,e.componentCls)},hLe=e=>{const t=Wr(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return i3(t,`${e.componentCls}-sm`)},pLe=e=>{const t=Wr(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return i3(t,`${e.componentCls}-lg`)},fLe=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},gLe=Yr("Button",e=>{const t=Vae(e);return[cLe(t),dLe(t),hLe(t),pLe(t),fLe(t),lLe(t),eLe(t)]},zae,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function mLe(e,t,r,n){const{focusElCls:i,focus:o,borderElCls:s}=r,a=s?"> *":"",l=["hover",o?"focus":null,"active"].filter(Boolean).map(c=>`&:${c} ${a}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{[l]:{zIndex:3},...i?{[`&${i}`]:{zIndex:3}}:{},[`&[disabled] ${a}`]:{zIndex:0}}}}function vLe(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 Px(e,t={focus:!0}){const{componentCls:r}=e,{componentCls:n}=t,i=n||r,o=`${i}-compact`;return{[o]:{...mLe(e,o,t,i),...vLe(i,o,t)}}}function yLe(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 CLe(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 bLe(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:{...yLe(e,t,e.componentCls),...CLe(e.componentCls,t)}}}const SLe=e=>{const{antCls:t,componentCls:r,lineWidth:n,calc:i,colorBgContainer:o}=e,s=`${r}-variant-solid:not([disabled])`,a=i(n).mul(-1).equal(),[l,c]=Jn(t,"btn"),u=d=>({[`${r}-compact${d?"-vertical":""}-item`]:{[l("compact-connect-border-color")]:c("bg-color-hover"),[`&${s}`]:{transition:"none",[`& + ${s}:before`]:[{position:"absolute",backgroundColor:c("compact-connect-border-color"),content:'""'},d?{top:a,insetInline:a,height:n}:{insetBlock:a,insetInlineStart:a,width:n}],"&:hover:before":{display:"none"}}}});return[u(),u(!0),{[`${s}${r}-color-default`]:{[l("compact-connect-border-color")]:`color-mix(in srgb, ${c("bg-color-hover")} 75%, ${o})`}}]},wLe=yx(["Button","compact"],e=>{const t=Vae(e);return[Px(t),bLe(t),SLe(t)]},zae);function xLe(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 TLe={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},ELe=Q.forwardRef((e,t)=>{const{_skipSemantic:r,loading:n=!1,prefixCls:i,color:o,variant:s,type:a,danger:l=!1,shape:c,size:u,disabled:d,className:h,rootClassName:p,children:f,icon:g,iconPosition:m,iconPlacement:v,ghost:b=!1,block:S=!1,htmlType:x="button",classNames:T,styles:R,style:E,autoInsertSpace:M,autoFocus:D,...A}=e,I=Di(f),_=a||"default",{getPrefixCls:F,direction:O,autoInsertSpace:k,className:B,style:H,classNames:N,styles:z,loadingIcon:U,shape:V,color:G,variant:K}=Ur("button"),q=c||V||"default",[Y,X]=y.useMemo(()=>{if(o&&s)return[o,s];if(a||l){const ot=TLe[_]||[];return l?["danger",ot[1]]:ot}return G&&K?[G,K]:["default","outlined"]},[o,s,a,l,G,K,_]),[le,re]=y.useMemo(()=>b&&X==="solid"?[Y,"outlined"]:[Y,X],[Y,X,b]),ne=le==="danger",se=ne?"dangerous":le,de=M??k??!0,te=F("btn",i),[ie,pe]=gLe(te),Z=y.useContext(Rs),ue=d??Z,ve=y.useContext(Nae),he=y.useMemo(()=>xLe(n),[n]),[me,Oe]=y.useState(he.loading),[Pe,Me]=y.useState(!1),He=y.useRef(null),Ge=xu(t,He),Ct=I.length===1&&!g&&!x_(re),Ht=y.useRef(!0);Q.useEffect(()=>(Ht.current=!1,()=>{Ht.current=!0}),[]),zr(()=>{let ot=null;he.delay>0?ot=setTimeout(()=>{ot=null,Oe(!0)},he.delay):Oe(he.loading);function De(){ot&&(clearTimeout(ot),ot=null)}return De},[he.delay,he.loading]),y.useEffect(()=>{if(!He.current||!de)return;const ot=He.current.textContent||"";Ct&&EB(ot)?Pe||Me(!0):Pe&&Me(!1)}),y.useEffect(()=>{D&&He.current&&He.current.focus()},[]);const St=Q.useCallback(ot=>{var De;if(me||ue){ot.preventDefault();return}(De=e.onClick)==null||De.call(e,("href"in e,ot))},[e.onClick,me,ue]),{compactSize:Ye,compactItemClassnames:Fe}=Gp(te,O),et=Li(ot=>u??Ye??ve??ot),Ne=me?"loading":g,tt=v??m??"start",nt=En(A,["navigate"]),Ke={...e,type:_,color:le,variant:re,danger:ne,shape:q,size:et,disabled:ue,loading:me,iconPlacement:tt},[Ie,rt]=jr([r?void 0:N,T],[r?void 0:z,R],{props:Ke}),Tt=ee(te,ie,pe,{[`${te}-${q}`]:q!=="default"&&q!=="square"&&q,[`${te}-${_}`]:_,[`${te}-dangerous`]:l,[`${te}-color-${se}`]:se,[`${te}-variant-${re}`]:re,[`${te}-lg`]:et==="large",[`${te}-sm`]:et==="small",[`${te}-icon-only`]:!f&&f!==0&&!!Ne,[`${te}-background-ghost`]:b&&!x_(re),[`${te}-loading`]:me,[`${te}-two-chinese-chars`]:Pe&&de&&!me,[`${te}-block`]:S,[`${te}-rtl`]:O==="rtl",[`${te}-icon-end`]:tt==="end"},Fe,h,p,B,Ie.root),Rt={...rt.root,...H,...E},Bt={className:Ie.icon,style:rt.icon},Qt=ot=>Q.createElement(Bae,{prefixCls:te,...Bt},ot),ft=Q.createElement(RFe,{existIcon:!!g,prefixCls:te,loading:me,mount:Ht.current,...Bt}),ut=n&&typeof n=="object"&&n.icon||U;let Yt;g&&!me?Yt=Qt(g):n&&ut?Yt=Qt(ut):Yt=ft;const hr=xn(f)?EFe(f,Ct&&de,rt.content,Ie.content):null;if(nt.href!==void 0)return Q.createElement("a",{...nt,className:ee(Tt,{[`${te}-disabled`]:ue}),href:ue?void 0:nt.href,style:Rt,onClick:St,ref:Ge,tabIndex:ue?-1:0,"aria-disabled":ue},Yt,hr);let Je=Q.createElement("button",{...A,type:x,className:Tt,style:Rt,onClick:St,disabled:ue,ref:Ge},Yt,hr,Fe&&Q.createElement(wLe,{prefixCls:te}));return x_(re)||(Je=Q.createElement(Ex,{component:"Button",disabled:me},Je)),Je}),Cl=ELe;Cl.Group=xFe;Cl.__ANT_BUTTON=!0;const P_=e=>typeof(e==null?void 0:e.then)=="function",o3=e=>{const{type:t,children:r,prefixCls:n,buttonProps:i,close:o,autoFocus:s,emitEvent:a,isSilent:l,quitOnNullishReturnValue:c,actionFn:u}=e,d=y.useRef(!1),h=y.useRef(null),[p,f]=s0(!1),g=(...b)=>{o==null||o(...b)};y.useEffect(()=>{let b=null;return s&&(b=setTimeout(()=>{var S;(S=h.current)==null||S.focus({preventScroll:!0})})),()=>{b&&clearTimeout(b)}},[s]);const m=b=>{P_(b)&&(f(!0),b.then((...S)=>{f(!1,!0),g.apply(void 0,S),d.current=!1},S=>{if(f(!1,!0),d.current=!1,!(l!=null&&l()))return Promise.reject(S)}))},v=b=>{if(d.current)return;if(d.current=!0,!u){g();return}let S;if(a){if(S=u(b),c&&!P_(S)){d.current=!1,g(b);return}}else if(u.length)S=u(o),d.current=!1;else if(S=u(),!P_(S)){g();return}m(S)};return y.createElement(Cl,{...JH(t),onClick:v,loading:p,prefixCls:n,...i,ref:h},r)},Mx=Q.createContext({}),{Provider:Hae}=Mx,Z9=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:r,isSilent:n,mergedOkCancel:i,rootPrefixCls:o,close:s,onCancel:a,onConfirm:l,onClose:c}=y.useContext(Mx);return i?Q.createElement(o3,{isSilent:n,actionFn:a,close:(...u)=>{s==null||s(...u),l==null||l(!1),c==null||c()},autoFocus:e==="cancel",buttonProps:t,prefixCls:`${o}-btn`},r):null},J9=()=>{const{autoFocusButton:e,close:t,isSilent:r,okButtonProps:n,rootPrefixCls:i,okTextLocale:o,okType:s,onConfirm:a,onOk:l,onClose:c}=y.useContext(Mx);return Q.createElement(o3,{isSilent:r,type:s||"primary",actionFn:l,close:(...u)=>{t==null||t(...u),a==null||a(!0),c==null||c()},autoFocus:e==="ok",buttonProps:n,prefixCls:`${i}-btn`},o)},Wae=y.createContext({});function Q9(e,t,r){let n=t;return!n&&r&&(n=`${e}-${r}`),n}function eK(e,t){let r=e[`page${t?"Y":"X"}Offset`];const n=`scroll${t?"Top":"Left"}`;if(typeof r!="number"){const i=e.document;r=i.documentElement[n],typeof r!="number"&&(r=i.body[n])}return r}function RLe(e){const t=e.getBoundingClientRect(),r={left:t.left,top:t.top},n=e.ownerDocument,i=n.defaultView||n.parentWindow;return r.left+=eK(i),r.top+=eK(i,!0),r}function tK(e,t=!1){if(PD(e)){const 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);let s=null;return i&&!Number.isNaN(o)?s=o:n&&s===null&&(s=0),n&&e.disabled&&(s=null),s!==null&&(s>=0||t&&s<0)}return!1}function s3(e,t=!1){const r=[...e.querySelectorAll("*")].filter(n=>tK(n,t));return tK(e,t)&&r.unshift(e),r}function a3(e,t){if(!e)return;e.focus(t);const{cursor:r}=t||{};if(r&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){const n=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(n,n);break;default:e.setSelectionRange(0,n)}}}let hy=null,Lh=[];const MB=new Map,l3=new Map;function c3(){return Lh[Lh.length-1]}function PLe(e){const t=c3();if(e&&t){let r;for(const[i,o]of MB.entries())if(o===t){r=i;break}const n=l3.get(r);return!!n&&(n===e||n.contains(e))}return!1}function MLe(e){const{activeElement:t}=document;return e===t||e.contains(t)}function M_(){const e=c3(),{activeElement:t}=document;if(!PLe(t))if(e&&!MLe(e)){const r=s3(e),n=r.includes(hy)?hy:r[0];n==null||n.focus({preventScroll:!0})}else hy=t}function rK(e){if(e.key==="Tab"){const{activeElement:t}=document,r=c3(),n=s3(r),i=n[n.length-1];e.shiftKey&&t===n[0]?hy=i:!e.shiftKey&&t===i&&(hy=n[0])}}function ILe(e,t){return e&&(MB.set(t,e),Lh=Lh.filter(r=>r!==e),Lh.push(e),window.addEventListener("focusin",M_),window.addEventListener("keydown",rK,!0),M_()),()=>{hy=null,Lh=Lh.filter(r=>r!==e),MB.delete(t),l3.delete(t),Lh.length===0&&(window.removeEventListener("focusin",M_),window.removeEventListener("keydown",rK,!0))}}function Uae(e,t){const r=Tu();return y.useEffect(()=>{if(e){const i=t();if(i)return ILe(i,r)}},[e,r]),[i=>{i&&l3.set(r,i)}]}const DLe=y.memo(({children:e})=>e,(e,{shouldUpdate:t})=>!t);function eM(){return eM=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:r,className:n,style:i,title:o,ariaId:s,footer:a,closable:l,closeIcon:c,onClose:u,children:d,bodyStyle:h,bodyProps:p,modalRender:f,onMouseDown:g,onMouseUp:m,holderRef:v,visible:b,forceRender:S,width:x,height:T,classNames:R,styles:E,isFixedPos:M,focusTrap:D}=e,{panel:A}=Q.useContext(Wae),I=y.useRef(null),_=xu(v,A,I),[F]=Uae(b&&M&&D!==!1,()=>I.current);Q.useImperativeHandle(t,()=>({focus:()=>{var G;(G=I.current)==null||G.focus({preventScroll:!0})}}));const O={};x!==void 0&&(O.width=x),T!==void 0&&(O.height=T);const k=a?Q.createElement("div",{className:ee(`${r}-footer`,R==null?void 0:R.footer),style:{...E==null?void 0:E.footer}},a):null,B=o?Q.createElement("div",{className:ee(`${r}-header`,R==null?void 0:R.header),style:{...E==null?void 0:E.header}},Q.createElement("div",{className:ee(`${r}-title`,R==null?void 0:R.title),id:s,style:{...E==null?void 0:E.title}},o)):null,H=y.useMemo(()=>typeof l=="object"&&l!==null?l:l?{closeIcon:c??Q.createElement("span",{className:`${r}-close-x`})}:{},[l,c,r]),N=hi(H,!0),z=typeof l=="object"&&l.disabled,U=l?Q.createElement("button",eM({type:"button",onClick:u,"aria-label":"Close"},N,{className:`${r}-close`,disabled:z}),H.closeIcon):null,V=Q.createElement("div",{className:ee(`${r}-container`,R==null?void 0:R.container),style:E==null?void 0:E.container},U,B,Q.createElement("div",eM({className:ee(`${r}-body`,R==null?void 0:R.body),style:{...h,...E==null?void 0:E.body}},p),d),k);return Q.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":o?s:null,"aria-modal":"true",ref:_,style:{...i,...O},className:ee(r,n),onMouseDown:g,onMouseUp:m,tabIndex:-1,onFocus:G=>{F(G.target)}},Q.createElement(DLe,{shouldUpdate:b||S},f?f(V):V))});function IB(){return IB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:r,title:n,style:i,className:o,visible:s,forceRender:a,destroyOnHidden:l,motionName:c,ariaId:u,onVisibleChanged:d,mousePosition:h}=e,p=y.useRef(null),f=y.useRef(null);y.useImperativeHandle(t,()=>({...f.current,inMotion:p.current.inMotion,enableMotion:p.current.enableMotion}));const[g,m]=y.useState(),v={};g&&(v.transformOrigin=g);function b(){var x;if(!((x=p.current)!=null&&x.nativeElement))return;const S=RLe(p.current.nativeElement);m(h&&(h.x||h.y)?`${h.x-S.left}px ${h.y-S.top}px`:"")}return y.createElement(uu,{visible:s,onVisibleChanged:d,onAppearPrepare:b,onEnterPrepare:b,forceRender:a,motionName:c,removeOnLeave:l,ref:p},({className:S,style:x},T)=>y.createElement(jae,IB({},e,{ref:f,title:n,ariaId:u,prefixCls:r,holderRef:T,style:{...x,...i,...v},className:ee(o,S)})))});function DB(){return DB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:t,style:r,visible:n,maskProps:i,motionName:o,className:s}=e;return y.createElement(uu,{key:"mask",visible:n,motionName:o,leavedClassName:`${t}-mask-hidden`},({className:a,style:l},c)=>y.createElement("div",DB({ref:c,style:{...l,...r},className:ee(`${t}-mask`,a,s)},i)))};function yw(){return yw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:t="rc-dialog",zIndex:r,visible:n=!1,focusTriggerAfterClose:i=!0,wrapStyle:o,wrapClassName:s,wrapProps:a,onClose:l,afterOpenChange:c,afterClose:u,transitionName:d,animation:h,closable:p=!0,mask:f=!0,maskTransitionName:g,maskAnimation:m,maskClosable:v=!0,maskStyle:b,maskProps:S,rootClassName:x,rootStyle:T,classNames:R,styles:E}=e,M=y.useRef(null),D=y.useRef(null),A=y.useRef(null),[I,_]=y.useState(n),[F,O]=y.useState(!1),k=Tu();function B(){G2(D.current,document.activeElement)||(M.current=document.activeElement)}function H(){var Y;G2(D.current,document.activeElement)||(Y=A.current)==null||Y.focus()}function N(){if(_(!1),f&&M.current&&i){try{M.current.focus({preventScroll:!0})}catch{}M.current=null}I&&(u==null||u())}function z(Y){Y?H():N(),c==null||c(Y)}function U(Y){l==null||l(Y)}const V=y.useRef(!1);let G=null;v&&(G=Y=>{D.current===Y.target&&V.current&&U(Y)});function K(Y){V.current=Y.target===D.current}y.useEffect(()=>{if(n){if(V.current=!1,_(!0),B(),D.current){const Y=getComputedStyle(D.current);O(Y.position==="fixed")}}else I&&A.current.enableMotion()&&!A.current.inMotion()&&N()},[n]);const q={zIndex:r,...o,...E==null?void 0:E.wrapper,display:I?null:"none"};return y.createElement("div",yw({className:ee(`${t}-root`,x),style:T},hi(e,{data:!0})),y.createElement(FLe,{prefixCls:t,visible:f&&n,motionName:Q9(t,g,m),style:{zIndex:r,...b,...E==null?void 0:E.mask},maskProps:S,className:R==null?void 0:R.mask}),y.createElement("div",yw({className:ee(`${t}-wrap`,s,R==null?void 0:R.wrapper),ref:D,onClick:G,onMouseDown:K,style:q},a),y.createElement(ALe,yw({},e,{isFixedPos:F,ref:A,closable:p,ariaId:k,prefixCls:t,visible:n&&I,onClose:U,onVisibleChanged:z,motionName:Q9(t,d,h)}))))};function AB(){return AB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{visible:t,getContainer:r,forceRender:n,destroyOnHidden:i=!1,afterClose:o,closable:s,panelRef:a,keyboard:l=!0,onClose:c}=e,[u,d]=y.useState(t),h=y.useMemo(()=>({panel:a}),[a]),p=({top:f,event:g})=>{if(f&&l){g.stopPropagation(),c==null||c(g);return}};return y.useEffect(()=>{t&&d(!0)},[t]),!n&&i&&!u?null:y.createElement(Wae.Provider,{value:h},y.createElement(Sx,{open:t||n||u,onEsc:p,autoDestroy:!1,getContainer:r,autoLock:t||u},y.createElement(LLe,AB({},e,{destroyOnHidden:i,afterClose:()=>{const f=s&&typeof s=="object"?s:{},{afterClose:g}=f||{};g==null||g(),o==null||o(),d(!1)}}))))},fg="RC_FORM_INTERNAL_HOOKS",On=()=>{Hn(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},_y=y.createContext({getFieldValue:On,getFieldsValue:On,getFieldError:On,getFieldWarning:On,getFieldsError:On,isFieldsTouched:On,isFieldTouched:On,isFieldValidating:On,isFieldsValidating:On,resetFields:On,setFields:On,setFieldValue:On,setFieldsValue:On,validateFields:On,submit:On,getInternalHooks:()=>(On(),{dispatch:On,initEntityValue:On,registerField:On,useSubscribe:On,setInitialValues:On,destroyForm:On,setCallbacks:On,registerWatch:On,getFields:On,setValidateMessages:On,setPreserve:On,getInitialValue:On})}),tM=y.createContext(null);function FB(e){return e==null?[]:Array.isArray(e)?e:[e]}function OLe(e){return e&&!!e._init}function LB(){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 _B=LB();function kLe(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function NLe(e,t,r){if(xD())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&h0(i,r.prototype),i}function OB(e){var t=typeof Map=="function"?new Map:void 0;return OB=function(n){if(n===null||!kLe(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 NLe(n,arguments,Xg(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),h0(i,n)},OB(e)}var BLe=/%[sdj%]/g,$Le=function(){};function kB(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 Pa(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=o)return a;switch(a){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 a}});return s}return e}function GLe(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function oo(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||GLe(t)&&typeof e=="string"&&!e)}function VLe(e,t,r){var n=[],i=0,o=e.length;function s(a){n.push.apply(n,Nr(a||[])),i++,i===o&&r(n)}e.forEach(function(a){t(a,s)})}function nK(e,t,r){var n=0,i=e.length;function o(s){if(s&&s.length){r(s);return}var a=n;n=n+1,at.max?i.push(Pa(o.messages[d].max,t.fullField,t.max)):a&&l&&(ut.max)&&i.push(Pa(o.messages[d].range,t.fullField,t.min,t.max))},Kae=function(t,r,n,i,o,s){t.required&&(!n.hasOwnProperty(t.field)||oo(r,s||t.type))&&i.push(Pa(o.messages.required,t.fullField))},KT;const YLe=(function(){if(KT)return KT;var e="[a-fA-F\\d:]",t=function(R){return R&&R.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,})?",s="(?:".concat(i.join("|"),")").concat(o),a=new RegExp("(?:^".concat(r,"$)|(?:^").concat(s,"$)")),l=new RegExp("^".concat(r,"$")),c=new RegExp("^".concat(s,"$")),u=function(R){return R&&R.exact?a:new RegExp("(?:".concat(t(R)).concat(r).concat(t(R),")|(?:").concat(t(R)).concat(s).concat(t(R),")"),"g")};u.v4=function(T){return T&&T.exact?l:new RegExp("".concat(t(T)).concat(r).concat(t(T)),"g")},u.v6=function(T){return T&&T.exact?c:new RegExp("".concat(t(T)).concat(s).concat(t(T)),"g")};var d="(?:(?:[a-z]+:)?//)",h="(?:\\S+(?::\\S*)?@)?",p=u.v4().source,f=u.v6().source,g="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",m="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",v="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",b="(?::\\d{2,5})?",S='(?:[/?#][^\\s"]*)?',x="(?:".concat(d,"|www\\.)").concat(h,"(?:localhost|").concat(p,"|").concat(f,"|").concat(g).concat(m).concat(v,")").concat(b).concat(S);return KT=new RegExp("(?:^".concat(x,"$)"),"i"),KT});var I_={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},KS={integer:function(t){return KS.number(t)&&parseInt(t,10)===t},float:function(t){return KS.number(t)&&!KS.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 zi(t)==="object"&&!KS.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(I_.email)},tel:function(t){return typeof t=="string"&&t.length<=32&&!!t.match(I_.tel)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(YLe())},hex:function(t){return typeof t=="string"&&!!t.match(I_.hex)}},XLe=function(t,r,n,i,o){if(t.required&&r===void 0){Kae(t,r,n,i,o);return}var s=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],a=t.type;s.indexOf(a)>-1?KS[a](r)||i.push(Pa(o.messages.types[a],t.fullField,t.type)):a&&zi(r)!==t.type&&i.push(Pa(o.messages.types[a],t.fullField,t.type))},ZLe=function(t,r,n,i,o){(/^\s+$/.test(r)||r==="")&&i.push(Pa(o.messages.whitespace,t.fullField))};const ln={required:Kae,whitespace:ZLe,type:XLe,range:qLe,enum:jLe,pattern:KLe};var JLe=function(t,r,n,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(oo(r)&&!t.required)return n();ln.required(t,r,i,s,o)}n(s)},QLe=function(t,r,n,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(r==null&&!t.required)return n();ln.required(t,r,i,s,o,"array"),r!=null&&(ln.type(t,r,i,s,o),ln.range(t,r,i,s,o))}n(s)},e_e=function(t,r,n,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(oo(r)&&!t.required)return n();ln.required(t,r,i,s,o),r!==void 0&&ln.type(t,r,i,s,o)}n(s)},t_e=function(t,r,n,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(oo(r,"date")&&!t.required)return n();if(ln.required(t,r,i,s,o),!oo(r,"date")){var l;r instanceof Date?l=r:l=new Date(r),ln.type(t,l,i,s,o),l&&ln.range(t,l.getTime(),i,s,o)}}n(s)},r_e="enum",n_e=function(t,r,n,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(oo(r)&&!t.required)return n();ln.required(t,r,i,s,o),r!==void 0&&ln[r_e](t,r,i,s,o)}n(s)},i_e=function(t,r,n,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(oo(r)&&!t.required)return n();ln.required(t,r,i,s,o),r!==void 0&&(ln.type(t,r,i,s,o),ln.range(t,r,i,s,o))}n(s)},o_e=function(t,r,n,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(oo(r)&&!t.required)return n();ln.required(t,r,i,s,o),r!==void 0&&(ln.type(t,r,i,s,o),ln.range(t,r,i,s,o))}n(s)},s_e=function(t,r,n,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(oo(r)&&!t.required)return n();ln.required(t,r,i,s,o),r!==void 0&&ln.type(t,r,i,s,o)}n(s)},a_e=function(t,r,n,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(r===""&&(r=void 0),oo(r)&&!t.required)return n();ln.required(t,r,i,s,o),r!==void 0&&(ln.type(t,r,i,s,o),ln.range(t,r,i,s,o))}n(s)},l_e=function(t,r,n,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(oo(r)&&!t.required)return n();ln.required(t,r,i,s,o),r!==void 0&&ln.type(t,r,i,s,o)}n(s)},c_e=function(t,r,n,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(oo(r,"string")&&!t.required)return n();ln.required(t,r,i,s,o),oo(r,"string")||ln.pattern(t,r,i,s,o)}n(s)},u_e=function(t,r,n,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(oo(r)&&!t.required)return n();ln.required(t,r,i,s,o),oo(r)||ln.type(t,r,i,s,o)}n(s)},d_e=function(t,r,n,i,o){var s=[],a=Array.isArray(r)?"array":zi(r);ln.required(t,r,i,s,o,a),n(s)},h_e=function(t,r,n,i,o){var s=[],a=t.required||!t.required&&i.hasOwnProperty(t.field);if(a){if(oo(r,"string")&&!t.required)return n();ln.required(t,r,i,s,o,"string"),oo(r,"string")||(ln.type(t,r,i,s,o),ln.range(t,r,i,s,o),ln.pattern(t,r,i,s,o),t.whitespace===!0&&ln.whitespace(t,r,i,s,o))}n(s)},qT=function(t,r,n,i,o){var s=t.type,a=[],l=t.required||!t.required&&i.hasOwnProperty(t.field);if(l){if(oo(r,s)&&!t.required)return n();ln.required(t,r,i,a,o,s),oo(r,s)||ln.type(t,r,i,a,o)}n(a)};const Cw={string:h_e,method:s_e,number:a_e,boolean:e_e,regexp:u_e,integer:o_e,float:i_e,array:QLe,object:l_e,enum:n_e,pattern:c_e,date:t_e,url:qT,hex:qT,email:qT,tel:qT,required:d_e,any:JLe};var Ix=(function(){function e(t){Hd(this,e),Nn(this,"rules",null),Nn(this,"_messages",_B),this.define(t)}return Wd(e,[{key:"define",value:function(r){var n=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(zi(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=sK(LB(),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(){},s=r,a=i,l=o;if(typeof a=="function"&&(l=a,a={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,s),Promise.resolve(s);function c(f){var g=[],m={};function v(S){if(Array.isArray(S)){var x;g=(x=g).concat.apply(x,Nr(S))}else g.push(S)}for(var b=0;b0&&arguments[0]!==void 0?arguments[0]:[],M=Array.isArray(E)?E:[E];!a.suppressWarning&&M.length&&e.warning("async-validator:",M),M.length&&m.message!==void 0&&m.message!==null&&(M=[].concat(m.message));var D=M.map(oK(m,s));if(a.first&&D.length)return p[m.field]=1,g(D);if(!v)g(D);else{if(m.required&&!f.value)return m.message!==void 0?D=[].concat(m.message).map(oK(m,s)):a.error&&(D=[a.error(m,Pa(a.messages.required,m.field))]),g(D);var A={};m.defaultField&&Object.keys(f.value).map(function(F){A[F]=m.defaultField}),A=vi(vi({},A),f.rule.fields);var I={};Object.keys(A).forEach(function(F){var O=A[F],k=Array.isArray(O)?O:[O];I[F]=k.map(b.bind(null,F))});var _=new e(I);_.messages(a.messages),f.rule.options&&(f.rule.options.messages=a.messages,f.rule.options.error=a.error),_.validate(f.value,f.rule.options||a,function(F){var O=[];D&&D.length&&O.push.apply(O,Nr(D)),F&&F.length&&O.push.apply(O,Nr(F)),g(O.length?O:null)})}}var x;if(m.asyncValidator)x=m.asyncValidator(m,f.value,S,f.source,a);else if(m.validator){try{x=m.validator(m,f.value,S,f.source,a)}catch(E){var T,R;(T=(R=console).error)===null||T===void 0||T.call(R,E),a.suppressValidatorError||setTimeout(function(){throw E},0),S(E.message)}x===!0?S():x===!1?S(typeof m.message=="function"?m.message(m.fullField||m.field):m.message||"".concat(m.fullField||m.field," fails")):x instanceof Array?S(x):x instanceof Error&&S(x.message)}x&&x.then&&x.then(function(){return S()},function(E){return S(E)})},function(f){c(f)},s)}},{key:"getType",value:function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!Cw.hasOwnProperty(r.type))throw new Error(Pa("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"?Cw.required:Cw[this.getType(r)]||void 0}}]),e})();Nn(Ix,"register",function(t,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");Cw[t]=r});Nn(Ix,"warning",$Le);Nn(Ix,"messages",_B);Nn(Ix,"validators",Cw);const Gs="'${name}' is not a valid ${type}",qae={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:Gs,method:Gs,array:Gs,object:Gs,number:Gs,date:Gs,boolean:Gs,integer:Gs,float:Gs,regexp:Gs,email:Gs,tel:Gs,url:Gs,hex:Gs},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}"}},aK=Ix;function p_e(e,t){return e.replace(/\\?\$\{\w+\}/g,r=>{if(r.startsWith("\\"))return r.slice(1);const n=r.slice(2,-1);return t[n]})}const lK="CODE_LOGIC_ERROR";async function NB(e,t,r,n,i){const o={...r};if(delete o.ruleIndex,aK.warning=()=>{},o.validator){const h=o.validator;o.validator=(...p)=>{try{return h(...p)}catch(f){return console.error(f),Promise.reject(lK)}}}let s=null;o&&o.type==="array"&&o.defaultField&&(s=o.defaultField,delete o.defaultField);const a=new aK({[e]:[o]}),l=Xv(qae,n.validateMessages);a.messages(l);let c=[];try{await Promise.resolve(a.validate({[e]:t},{...n}))}catch(h){h.errors&&(c=h.errors.map(({message:p},f)=>{const g=p===lK?l.default:p;return y.isValidElement(g)?y.cloneElement(g,{key:`error_${f}`}):g}))}if(!c.length&&s&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((p,f)=>NB(`${e}.${f}`,p,s,n,i)))).reduce((p,f)=>[...p,...f],[]);const u={...r,name:e,enum:(r.enum||[]).join(", "),...i};return c.map(h=>typeof h=="string"?p_e(h,u):h)}function f_e(e,t,r,n,i,o){const s=e.join("."),a=r.map((c,u)=>{const d=c.validator,h={...c,ruleIndex:u};return d&&(h.validator=(p,f,g)=>{let m=!1;const b=d(p,f,(...S)=>{Promise.resolve().then(()=>{Hn(!m,"Your validator function has already return a promise. `callback` will be ignored."),m||g(...S)})});m=b&&typeof b.then=="function"&&typeof b.catch=="function",Hn(m,"`callback` is deprecated. Please return a promise instead."),m&&b.then(()=>{g()}).catch(S=>{g(S||" ")})}),h}).sort(({warningOnly:c,ruleIndex:u},{warningOnly:d,ruleIndex:h})=>!!c==!!d?u-h:c?1:-1);let l;if(i===!0)l=new Promise(async(c,u)=>{for(let d=0;dNB(s,t,u,n,o).then(d=>({errors:d,rule:u})));l=(i?m_e(c):g_e(c)).then(u=>Promise.reject(u))}return l.catch(c=>c),l}async function g_e(e){return Promise.all(e).then(t=>[].concat(...t))}async function m_e(e){let t=0;return new Promise(r=>{e.forEach(n=>{n.then(i=>{i.errors.length&&r([i]),t+=1,t===e.length&&r([])})})})}function mi(e){return FB(e)}function cK(e,t){let r={};return t.forEach(n=>{const i=qs(e,n);r=rl(r,n,i)}),r}function py(e,t,r=!1){return e&&e.some(n=>rM(t,n,r))}function rM(e,t,r=!1){return!e||!t||!r&&e.length!==t.length?!1:t.every((n,i)=>e[i]===n)}function v_e(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(e),n=Object.keys(t);return[...new Set([...r,...n])].every(o=>{const s=e[o],a=t[o];return typeof s=="function"&&typeof a=="function"?!0:s===a})}function y_e(e,...t){const r=t[0];return r&&r.target&&typeof r.target=="object"&&e in r.target?r.target[e]:r}function uK(e,t,r){const{length:n}=e;if(t<0||t>=n||r<0||r>=n)return e;const i=e[t],o=t-r;return o>0?[...e.slice(0,r),i,...e.slice(r,t),...e.slice(t+1,n)]:o<0?[...e.slice(0,t),...e.slice(t+1,r+1),i,...e.slice(r+1,n)]:e}async function C_e(){return new Promise(e=>{Lr(()=>{e()})})}function BB(){return BB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{preserve:r,isListField:n,name:i}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(n,r,mi(i)),this.cancelRegisterFunc=null});Ae(this,"getNamePath",()=>{const{name:r,fieldContext:n}=this.props,{prefixName:i=[]}=n;return r!==void 0?[...i,...r]:[]});Ae(this,"getRules",()=>{const{rules:r=[],fieldContext:n}=this.props;return r.map(i=>typeof i=="function"?i(n):i)});Ae(this,"refresh",()=>{this.mounted&&this.setState(({resetCount:r})=>({resetCount:r+1}))});Ae(this,"metaCache",null);Ae(this,"triggerMetaEvent",r=>{const{onMetaChange:n}=this.props;if(n){const i={...this.getMeta(),destroy:r};cc(this.metaCache,i)||n(i),this.metaCache=i}else this.metaCache=null});Ae(this,"onStoreChange",(r,n,i)=>{const{shouldUpdate:o,dependencies:s=[],onReset:a}=this.props,{store:l}=i,c=this.getNamePath(),u=this.getValue(r),d=this.getValue(l),h=n&&py(n,c);switch(i.type==="valueUpdate"&&i.source==="external"&&!cc(u,d)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=ff,this.warnings=Yb,this.triggerMetaEvent()),i.type){case"reset":if(!n||h){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=ff,this.warnings=Yb,this.triggerMetaEvent(),a==null||a(),this.refresh();return}break;case"remove":{if(o&&D_(o,r,l,u,d,i)){this.reRender();return}break}case"setField":{const{data:p}=i;if(h){"touched"in p&&(this.touched=p.touched),"validating"in p&&!("originRCField"in p)&&(this.validatePromise=p.validating?Promise.resolve([]):null),"errors"in p&&(this.errors=p.errors||ff),"warnings"in p&&(this.warnings=p.warnings||Yb),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if("value"in p&&py(n,c,!0)){this.reRender();return}if(o&&!c.length&&D_(o,r,l,u,d,i)){this.reRender();return}break}case"dependenciesUpdate":{if(s.map(mi).some(f=>py(i.relatedFields,f))){this.reRender();return}break}default:if(h||(!s.length||c.length||o)&&D_(o,r,l,u,d,i)){this.reRender();return}break}o===!0&&this.reRender()});Ae(this,"validateRules",r=>{const n=this.getNamePath(),i=this.getValue(),{triggerName:o,validateOnly:s=!1,delayFrame:a}=r||{},l=Promise.resolve().then(async()=>{if(!this.mounted)return[];const{validateFirst:c=!1,messageVariables:u,validateDebounce:d}=this.props;a&&await C_e();let h=this.getRules();if(o&&(h=h.filter(f=>f).filter(f=>{const{validateTrigger:g}=f;return g?FB(g).includes(o):!0})),d&&o&&(await new Promise(f=>{setTimeout(f,d)}),this.validatePromise!==l))return[];const p=f_e(n,i,h,r,c,u);return p.catch(f=>f).then((f=ff)=>{var g;if(this.validatePromise===l){this.validatePromise=null;const m=[],v=[];(g=f.forEach)==null||g.call(f,({rule:{warningOnly:b},errors:S=ff})=>{b?v.push(...S):m.push(...S)}),this.errors=m,this.warnings=v,this.triggerMetaEvent(),this.reRender()}}),p});return s||(this.validatePromise=l,this.dirty=!0,this.errors=ff,this.warnings=Yb,this.triggerMetaEvent(),this.reRender()),l});Ae(this,"isFieldValidating",()=>!!this.validatePromise);Ae(this,"isFieldTouched",()=>this.touched);Ae(this,"isFieldDirty",()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;const{fieldContext:r}=this.props,{getInitialValue:n}=r.getInternalHooks(fg);return n(this.getNamePath())!==void 0});Ae(this,"getErrors",()=>this.errors);Ae(this,"getWarnings",()=>this.warnings);Ae(this,"isListField",()=>this.props.isListField);Ae(this,"isList",()=>this.props.isList);Ae(this,"isPreserve",()=>this.props.preserve);Ae(this,"getMeta",()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null}));Ae(this,"getOnlyChild",r=>{if(typeof r=="function"){const i=this.getMeta();return{...this.getOnlyChild(r(this.getControlled(),i,this.props.fieldContext)),isFunction:!0}}const n=Di(r);return n.length!==1||!y.isValidElement(n[0])?{child:n,isFunction:!1}:{child:n[0],isFunction:!1}});Ae(this,"getValue",r=>{const{getFieldsValue:n}=this.props.fieldContext,i=this.getNamePath();return qs(r||n(!0),i)});Ae(this,"getControlled",(r={})=>{const{name:n,trigger:i="onChange",validateTrigger:o,getValueFromEvent:s,normalize:a,valuePropName:l="value",getValueProps:c,fieldContext:u}=this.props,d=o!==void 0?o:u.validateTrigger,h=this.getNamePath(),{getInternalHooks:p,getFieldsValue:f}=u,{dispatch:g}=p(fg),m=this.getValue(),v=c||(R=>({[l]:R})),b=r[i],S=n!==void 0?v(m):{},x={...r,...S};return x[i]=(...R)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();let E;s?E=s(...R):E=y_e(l,...R),a&&(E=a(E,m,f(!0))),E!==m&&g({type:"updateValue",namePath:h,value:E}),b&&b(...R)},FB(d||[]).forEach(R=>{const E=x[R];x[R]=(...M)=>{E&&E(...M);const{rules:D}=this.props;D&&D.length&&g({type:"validateField",namePath:h,triggerName:R})}}),x});if(r.fieldContext){const{getInternalHooks:n}=r.fieldContext,{initEntityValue:i}=n(fg);i(this)}}componentDidMount(){const{shouldUpdate:r,fieldContext:n}=this.props;if(this.mounted=!0,n){const{getInternalHooks:i}=n,{registerField:o}=i(fg);this.cancelRegisterFunc=o(this)}r===!0&&this.reRender()}componentWillUnmount(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}reRender(){this.mounted&&this.forceUpdate()}render(){const{resetCount:r}=this.state,{children:n}=this.props,{child:i,isFunction:o}=this.getOnlyChild(n);let s;return o?s=i:y.isValidElement(i)?s=y.cloneElement(i,this.getControlled(i.props)):(Hn(!i,"`children` of Field is not validate ReactElement."),s=i),y.createElement(y.Fragment,{key:r},s)}}Ae(Yae,"contextType",_y);function Xae({name:e,...t}){const r=y.useContext(_y),n=y.useContext(tM),i=e!==void 0?mi(e):void 0,o=t.isListField??!!n;let s="keep";return o||(s=`_${(i||[]).join("_")}`),y.createElement(Yae,BB({key:s,name:i,isListField:o},t,{fieldContext:r}))}function b_e({name:e,initialValue:t,children:r,rules:n,validateTrigger:i,isListField:o}){const s=y.useContext(_y),a=y.useContext(tM),c=y.useRef({keys:[],id:0}).current,u=y.useMemo(()=>[...mi(s.prefixName)||[],...mi(e)],[s.prefixName,e]),d=y.useMemo(()=>({...s,prefixName:u}),[s,u]),h=y.useMemo(()=>({getKey:f=>{const g=u.length,m=f[g];return[c.keys[m],f.slice(g+1)]}}),[c,u]);if(typeof r!="function")return Hn(!1,"Form.List only accepts function as children."),null;const p=(f,g,{source:m})=>m==="internal"?!1:f!==g;return y.createElement(tM.Provider,{value:h},y.createElement(_y.Provider,{value:d},y.createElement(Xae,{name:[],shouldUpdate:p,rules:n,validateTrigger:i,initialValue:t,isList:!0,isListField:o??!!a},({value:f=[],onChange:g},m)=>{const{getFieldValue:v}=s,b=()=>v(u||[])||[],S={add:(T,R)=>{const E=b();R>=0&&R<=E.length?(c.keys=[...c.keys.slice(0,R),c.id,...c.keys.slice(R)],g([...E.slice(0,R),T,...E.slice(R)])):(c.keys=[...c.keys,c.id],g([...E,T])),c.id+=1},remove:T=>{const R=b(),E=new Set(Array.isArray(T)?T:[T]);E.size<=0||(c.keys=c.keys.filter((M,D)=>!E.has(D)),g(R.filter((M,D)=>!E.has(D))))},move(T,R){if(T===R)return;const E=b();T<0||T>=E.length||R<0||R>=E.length||(c.keys=uK(c.keys,T,R),g(uK(E,T,R)))}};let x=f||[];return Array.isArray(x)||(x=[]),r(x.map((T,R)=>{let E=c.keys[R];return E===void 0&&(c.keys[R]=c.id,E=c.keys[R],c.id+=1),{name:R,key:E,isListField:!0}}),S,m)})))}function S_e(e){let t=!1,r=e.length;const n=[];return e.length?new Promise((i,o)=>{e.forEach((s,a)=>{s.catch(l=>(t=!0,l)).then(l=>{r-=1,n[a]=l,!(r>0)&&(t&&o(n),i(n))})})}):Promise.resolve([])}const $B="__@field_split__";function YT(e){return e.map(t=>`${typeof t}:${t}`).join($B)}class cv{constructor(){Ae(this,"kvs",new Map)}set(t,r){this.kvs.set(YT(t),r)}get(t){return this.kvs.get(YT(t))}getAsPrefix(t){const r=YT(t),n=r+$B,i=[],o=this.kvs.get(r);return o!==void 0&&i.push(o),this.kvs.forEach((s,a)=>{a.startsWith(n)&&i.push(s)}),i}update(t,r){const n=this.get(t),i=r(n);i?this.set(t,i):this.delete(t)}delete(t){this.kvs.delete(YT(t))}map(t){return[...this.kvs.entries()].map(([r,n])=>{const i=r.split($B);return t({key:i.map(o=>{const[,s,a]=o.match(/^([^:]*):(.*)$/);return s==="number"?Number(a):a}),value:n})})}toJSON(){const t={};return this.map(({key:r,value:n})=>(t[r.join(".")]=n,null)),t}}const w_e=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)};class x_e{constructor(t){Ae(this,"namePathList",[]);Ae(this,"taskId",0);Ae(this,"watcherList",new Set);Ae(this,"form");this.form=t}register(t){return this.watcherList.add(t),()=>{this.watcherList.delete(t)}}notify(t){t.forEach(r=>{this.namePathList.every(n=>!rM(n,r))&&this.namePathList.push(r)}),this.doBatch()}doBatch(){this.taskId+=1;const t=this.taskId;w_e(()=>{if(t===this.taskId&&this.watcherList.size){const r=this.form.getForm(),n=r.getFieldsValue(),i=r.getFieldsValue(!0);this.watcherList.forEach(o=>{o(n,i,this.namePathList)}),this.namePathList=[]}})}}class T_e{constructor(t){Ae(this,"formHooked",!1);Ae(this,"forceRootUpdate");Ae(this,"subscribable",!0);Ae(this,"store",{});Ae(this,"fieldEntities",[]);Ae(this,"initialValues",{});Ae(this,"callbacks",{});Ae(this,"validateMessages",null);Ae(this,"preserve",null);Ae(this,"lastValidatePromise",null);Ae(this,"watcherCenter",new x_e(this));Ae(this,"getForm",()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks}));Ae(this,"getInternalHooks",t=>t===fg?(this.formHooked=!0,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch}):(Hn(!1,"`getInternalHooks` is internal usage. Should not call directly."),null));Ae(this,"useSubscribe",t=>{this.subscribable=t});Ae(this,"prevWithoutPreserves",null);Ae(this,"setInitialValues",(t,r)=>{var n;if(this.initialValues=t||{},r){let i=Xv(t,this.store);(n=this.prevWithoutPreserves)==null||n.map(({key:o})=>{i=rl(i,o,qs(t,o))}),this.prevWithoutPreserves=null,this.updateStore(i)}});Ae(this,"destroyForm",t=>{if(t)this.updateStore({});else{const r=new cv;this.getFieldEntities(!0).forEach(n=>{this.isMergedPreserve(n.isPreserve())||r.set(n.getNamePath(),!0)}),this.prevWithoutPreserves=r}});Ae(this,"getInitialValue",t=>{const r=qs(this.initialValues,t);return t.length?Xv(r):r});Ae(this,"setCallbacks",t=>{this.callbacks=t});Ae(this,"setValidateMessages",t=>{this.validateMessages=t});Ae(this,"setPreserve",t=>{this.preserve=t});Ae(this,"registerWatch",t=>this.watcherCenter.register(t));Ae(this,"notifyWatch",(t=[])=>{this.watcherCenter.notify(t)});Ae(this,"timeoutId",null);Ae(this,"warningUnhooked",()=>{});Ae(this,"updateStore",t=>{this.store=t});Ae(this,"getFieldEntities",(t=!1)=>t?this.fieldEntities.filter(r=>r.getNamePath().length):this.fieldEntities);Ae(this,"getFieldsMap",(t=!1)=>{const r=new cv;return this.getFieldEntities(t).forEach(n=>{const i=n.getNamePath();r.set(i,n)}),r});Ae(this,"getFieldEntitiesForNamePathList",(t,r=!1)=>{if(!t)return this.getFieldEntities(!0);const n=this.getFieldsMap(!0);return r?t.flatMap(i=>{const o=mi(i),s=n.getAsPrefix(o);return s.length?s:[{INVALIDATE_NAME_PATH:o}]}):t.map(i=>{const o=mi(i);return n.get(o)||{INVALIDATE_NAME_PATH:mi(i)}})});Ae(this,"getFieldsValue",(t,r)=>{this.warningUnhooked();let n,i;if(t===!0||Array.isArray(t)?(n=t,i=r):t&&typeof t=="object"&&(i=t.filter),n===!0&&!i)return this.store;const o=this.getFieldEntitiesForNamePathList(Array.isArray(n)?n:null,!0),s=[],a=[];o.forEach(c=>{var d;const u=c.INVALIDATE_NAME_PATH||c.getNamePath();if((d=c.isList)!=null&&d.call(c)){a.push(u);return}if(!i)s.push(u);else{const h="getMeta"in c?c.getMeta():null;i(h)&&s.push(u)}});let l=cK(this.store,s.map(mi));return a.forEach(c=>{qs(l,c)||(l=rl(l,c,[]))}),l});Ae(this,"getFieldValue",t=>{this.warningUnhooked();const r=mi(t);return qs(this.store,r)});Ae(this,"getFieldsError",t=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(t).map((n,i)=>n&&!n.INVALIDATE_NAME_PATH?{name:n.getNamePath(),errors:n.getErrors(),warnings:n.getWarnings()}:{name:mi(t[i]),errors:[],warnings:[]})));Ae(this,"getFieldError",t=>{this.warningUnhooked();const r=mi(t);return this.getFieldsError([r])[0].errors});Ae(this,"getFieldWarning",t=>{this.warningUnhooked();const r=mi(t);return this.getFieldsError([r])[0].warnings});Ae(this,"isFieldsTouched",(...t)=>{this.warningUnhooked();const[r,n]=t;let i,o=!1;t.length===0?i=null:t.length===1?Array.isArray(r)?(i=r.map(mi),o=!1):(i=null,o=r):(i=r.map(mi),o=n);const s=this.getFieldEntities(!0),a=d=>d.isFieldTouched();if(!i)return o?s.every(d=>a(d)||d.isList()):s.some(a);const l=new cv;i.forEach(d=>{l.set(d,[])}),s.forEach(d=>{const h=d.getNamePath();i.forEach(p=>{p.every((f,g)=>h[g]===f)&&l.update(p,f=>[...f,d])})});const c=d=>d.some(a),u=l.map(({value:d})=>d);return o?u.every(c):u.some(c)});Ae(this,"isFieldTouched",t=>(this.warningUnhooked(),this.isFieldsTouched([t])));Ae(this,"isFieldsValidating",t=>{this.warningUnhooked();const r=this.getFieldEntities();if(!t)return r.some(i=>i.isFieldValidating());const n=t.map(mi);return r.some(i=>{const o=i.getNamePath();return py(n,o)&&i.isFieldValidating()})});Ae(this,"isFieldValidating",t=>(this.warningUnhooked(),this.isFieldsValidating([t])));Ae(this,"resetWithFieldInitialValue",(t={})=>{const r=new cv,n=this.getFieldEntities(!0);n.forEach(s=>{const{initialValue:a}=s.props,l=s.getNamePath();if(a!==void 0){const c=r.get(l)||new Set;c.add({entity:s,value:a}),r.set(l,c)}});const i=s=>{s.forEach(a=>{const{initialValue:l}=a.props;if(l!==void 0){const c=a.getNamePath();if(this.getInitialValue(c)!==void 0)Hn(!1,`Form already set 'initialValues' with path '${c.join(".")}'. Field can not overwrite it.`);else{const d=r.get(c);if(d&&d.size>1)Hn(!1,`Multiple Field with path '${c.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(d){const h=this.getFieldValue(c);!a.isListField()&&(!t.skipExist||h===void 0)&&this.updateStore(rl(this.store,c,[...d][0].value))}}}})};let o;t.entities?o=t.entities:t.namePathList?(o=[],t.namePathList.forEach(s=>{const a=r.get(s);a&&o.push(...[...a].map(l=>l.entity))})):o=n,i(o)});Ae(this,"resetFields",t=>{this.warningUnhooked();const r=this.store;if(!t){this.updateStore(Xv(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(r,null,{type:"reset"}),this.notifyWatch();return}const n=t.map(mi);n.forEach(i=>{const o=this.getInitialValue(i);this.updateStore(rl(this.store,i,o))}),this.resetWithFieldInitialValue({namePathList:n}),this.notifyObservers(r,n,{type:"reset"}),this.notifyWatch(n)});Ae(this,"setFields",t=>{this.warningUnhooked();const r=this.store,n=[];t.forEach(i=>{const{name:o,...s}=i,a=mi(o);n.push(a),"value"in s&&this.updateStore(rl(this.store,a,s.value)),this.notifyObservers(r,[a],{type:"setField",data:i})}),this.notifyWatch(n)});Ae(this,"getFields",()=>this.getFieldEntities(!0).map(n=>{const i=n.getNamePath(),s={...n.getMeta(),name:i,value:this.getFieldValue(i)};return Object.defineProperty(s,"originRCField",{value:!0}),s}));Ae(this,"initEntityValue",t=>{const{initialValue:r}=t.props;if(r!==void 0){const n=t.getNamePath();qs(this.store,n)===void 0&&this.updateStore(rl(this.store,n,r))}});Ae(this,"isMergedPreserve",t=>(t!==void 0?t:this.preserve)??!0);Ae(this,"registerField",t=>{this.fieldEntities.push(t);const r=t.getNamePath();if(this.notifyWatch([r]),t.props.initialValue!==void 0){const n=this.store;this.resetWithFieldInitialValue({entities:[t],skipExist:!0}),this.notifyObservers(n,[t.getNamePath()],{type:"valueUpdate",source:"internal"})}return(n,i,o=[])=>{if(this.fieldEntities=this.fieldEntities.filter(s=>s!==t),!this.isMergedPreserve(i)&&(!n||o.length>1)){const s=n?void 0:this.getInitialValue(r);if(r.length&&this.getFieldValue(r)!==s&&this.fieldEntities.every(a=>!rM(a.getNamePath(),r))){const a=this.store;this.updateStore(rl(a,r,s,!0)),this.notifyObservers(a,[r],{type:"remove"}),this.triggerDependenciesUpdate(a,r)}}this.notifyWatch([r])}});Ae(this,"dispatch",t=>{switch(t.type){case"updateValue":{const{namePath:r,value:n}=t;this.updateValue(r,n);break}case"validateField":{const{namePath:r,triggerName:n}=t;this.validateFields([r],{triggerName:n});break}}});Ae(this,"notifyObservers",(t,r,n)=>{if(this.subscribable){const i={...n,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:o})=>{o(t,r,i)})}else this.forceRootUpdate()});Ae(this,"triggerDependenciesUpdate",(t,r)=>{const n=this.getDependencyChildrenFields(r);return n.length&&this.validateFields(n,{delayFrame:!0}),this.notifyObservers(t,n,{type:"dependenciesUpdate",relatedFields:[r,...n]}),n});Ae(this,"updateValue",(t,r)=>{const n=mi(t),i=this.store;this.updateStore(rl(this.store,n,r)),this.notifyObservers(i,[n],{type:"valueUpdate",source:"internal"}),this.notifyWatch([n]);const o=this.triggerDependenciesUpdate(i,n),{onValuesChange:s}=this.callbacks;if(s){const a=this.getFieldsMap(!0).get(n),l=cK(this.store,[n]),c=this.getFieldsValue(),u=qoe([c,l],{prepareArray:d=>a!=null&&a.isList()?[]:[...d||[]]});s(l,u)}this.triggerOnFieldsChange([n,...o])});Ae(this,"setFieldsValue",t=>{this.warningUnhooked();const r=this.store;if(t){const n=Xv(this.store,t);this.updateStore(n)}this.notifyObservers(r,null,{type:"valueUpdate",source:"external"}),this.notifyWatch()});Ae(this,"setFieldValue",(t,r)=>{this.setFields([{name:t,value:r,errors:[],warnings:[],touched:!0}])});Ae(this,"getDependencyChildrenFields",t=>{const r=new Set,n=[],i=new cv;this.getFieldEntities().forEach(s=>{const{dependencies:a}=s.props;(a||[]).forEach(l=>{const c=mi(l);i.update(c,(u=new Set)=>(u.add(s),u))})});const o=s=>{(i.get(s)||new Set).forEach(l=>{if(!r.has(l)){r.add(l);const c=l.getNamePath();l.isFieldDirty()&&c.length&&(n.push(c),o(c))}})};return o(t),n});Ae(this,"triggerOnFieldsChange",(t,r)=>{const{onFieldsChange:n}=this.callbacks;if(n){const i=this.getFields();if(r){const s=new cv;r.forEach(({name:a,errors:l})=>{s.set(a,l)}),i.forEach(a=>{a.errors=s.get(a.name)||a.errors})}const o=i.filter(({name:s})=>py(t,s));o.length&&n(o,i)}});Ae(this,"validateFields",(t,r)=>{this.warningUnhooked();let n,i;Array.isArray(t)||typeof t=="string"||typeof r=="string"?(n=t,i=r):i=t;const o=!!n,s=o?n.map(mi):[],a=[...s],l=[],c=String(Date.now()),u=new Set,{recursive:d,dirty:h}=i||{};this.getFieldEntities(!0).forEach(m=>{const v=m.getNamePath();if(o||((!m.isList()||!s.some(b=>rM(b,v,!0)))&&a.push(v),s.push(v)),!(!m.props.rules||!m.props.rules.length)&&!(h&&!m.isFieldDirty())&&(u.add(v.join(c)),!o||py(s,v,d))){const b=m.validateRules({validateMessages:{...qae,...this.validateMessages},...i});l.push(b.then(()=>({name:v,errors:[],warnings:[]})).catch(S=>{var R;const x=[],T=[];return(R=S.forEach)==null||R.call(S,({rule:{warningOnly:E},errors:M})=>{E?T.push(...M):x.push(...M)}),x.length?Promise.reject({name:v,errors:x,warnings:T}):{name:v,errors:x,warnings:T}}))}});const p=S_e(l);this.lastValidatePromise=p,p.catch(m=>m).then(m=>{const v=m.map(({name:b})=>b);this.notifyObservers(this.store,v,{type:"validateFinish"}),this.triggerOnFieldsChange(v,m)});const f=p.then(()=>this.lastValidatePromise===p?Promise.resolve(this.getFieldsValue(a)):Promise.reject([])).catch(m=>{var S,x;const v=m.filter(T=>T&&T.errors.length),b=(x=(S=v[0])==null?void 0:S.errors)==null?void 0:x[0];return Promise.reject({message:b,values:this.getFieldsValue(s),errorFields:v,outOfDate:this.lastValidatePromise!==p})});f.catch(m=>m);const g=s.filter(m=>u.has(m.join(c)));return this.triggerOnFieldsChange(g),f});Ae(this,"submit",()=>{this.warningUnhooked(),this.validateFields().then(t=>{const{onFinish:r}=this.callbacks;if(r)try{r(t)}catch(n){console.error(n)}}).catch(t=>{const{onFinishFailed:r}=this.callbacks;r&&r(t)})});this.forceRootUpdate=t}}function Zae(e){const t=y.useRef(null),[,r]=y.useState({});if(!t.current)if(e)t.current=e;else{const n=()=>{r({})},i=new T_e(n);t.current=i.getForm()}return[t.current]}const GB=y.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),E_e=({validateMessages:e,onFormChange:t,onFormFinish:r,children:n})=>{const i=y.useContext(GB),o=y.useRef({});return y.createElement(GB.Provider,{value:{...i,validateMessages:{...i.validateMessages,...e},triggerFormChange:(s,a)=>{t&&t(s,{changedFields:a,forms:o.current}),i.triggerFormChange(s,a)},triggerFormFinish:(s,a)=>{r&&r(s,{values:a,forms:o.current}),i.triggerFormFinish(s,a)},registerForm:(s,a)=>{s&&(o.current={...o.current,[s]:a}),i.registerForm(s,a)},unregisterForm:s=>{const a={...o.current};delete a[s],o.current=a,i.unregisterForm(s)}}},n)};function VB(){return VB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const m=y.useRef(null),v=y.useContext(GB),[b]=Zae(n),{useSubscribe:S,setInitialValues:x,setCallbacks:T,setValidateMessages:R,setPreserve:E,destroyForm:M}=b.getInternalHooks(fg);y.useImperativeHandle(g,()=>({...b,nativeElement:m.current})),y.useEffect(()=>(v.registerForm(e,b),()=>{v.unregisterForm(e)}),[v,b,e]),R({...v.validateMessages,...a}),T({onValuesChange:c,onFieldsChange:(k,...B)=>{v.triggerFormChange(e,k),u&&u(k,...B)},onFinish:k=>{v.triggerFormFinish(e,k),d&&d(k)},onFinishFailed:h}),E(i);const D=y.useRef(null);x(t,!D.current),D.current||(D.current=!0),y.useEffect(()=>()=>M(p),[]);let A;const I=typeof o=="function";if(I){const k=b.getFieldsValue(!0);A=o(k,b)}else A=o;S(!I);const _=y.useRef(null);y.useEffect(()=>{v_e(_.current||[],r||[])||b.setFields(r||[]),_.current=r},[r,b]);const F=y.useMemo(()=>({...b,validateTrigger:l}),[b,l]),O=y.createElement(tM.Provider,{value:null},y.createElement(_y.Provider,{value:F},A));return s===!1?O:y.createElement(s,VB({},f,{ref:m,onSubmit:k=>{k.preventDefault(),k.stopPropagation(),b.submit()},onReset:k=>{var B;k.preventDefault(),b.resetFields(),(B=f.onReset)==null||B.call(f,k)}}),O)};function A_(e){try{return JSON.stringify(e)}catch{return Math.random()}}function P_e(...e){const[t,r={}]=e,n=OLe(r)?{form:r}:r,i=n.form,[o,s]=y.useState(()=>typeof t=="function"?t({}):void 0),a=y.useMemo(()=>A_(o),[o]),l=y.useRef(a);l.current=a;const c=y.useContext(_y),u=i||c,d=u&&u._init,{getFieldsValue:h,getInternalHooks:p}=u,{registerWatch:f}=p(fg),g=br((v,b)=>{const S=n.preserve?b??h(!0):v??h(),x=typeof t=="function"?t(S):qs(S,mi(t));A_(o)!==A_(x)&&s(x)}),m=typeof t=="function"?t:JSON.stringify(t);return y.useEffect(()=>{d&&g()},[d,m]),y.useEffect(()=>d?f((b,S)=>{g(b,S)}):void 0,[d]),o}const M_e=y.forwardRef(R_e),Dx=M_e;Dx.FormProvider=E_e;Dx.Field=Xae;Dx.List=b_e;Dx.useForm=Zae;Dx.useWatch=P_e;const sa=y.createContext({}),I_e=({children:e,status:t,override:r})=>{const n=y.useContext(sa),i=y.useMemo(()=>{const o={...n};return r&&delete o.isFormItemInput,t&&(delete o.status,delete o.hasFeedback,delete o.feedbackIcon),o},[t,r,n]);return y.createElement(sa.Provider,{value:i},e)},D_e=y.createContext(void 0),Sp=e=>{const{space:t,form:r,children:n}=e;if(!xn(n))return null;let i=n;return r&&(i=Q.createElement(I_e,{override:!0,status:!0},i)),t&&(i=Q.createElement(SFe,null,i)),i},A_e=e=>{if(xo()&&window.document.documentElement){const t=Array.isArray(e)?e:[e],{documentElement:r}=window.document;return t.some(n=>n in r.style)}return!1};function dK(e,t){return A_e(e)}const F_e=()=>xo()&&window.document.documentElement;function Jae(e,t,r){return y.useMemo(()=>({...{trap:t??!0,focusTriggerAfterClose:r??!0},...e}),[e,t,r])}const FD=e=>{const{prefixCls:t,className:r,style:n,size:i,shape:o}=e,s=ee({[`${t}-lg`]:i==="large",[`${t}-sm`]:i==="small"}),a=ee({[`${t}-circle`]:o==="circle",[`${t}-square`]:o==="square",[`${t}-round`]:o==="round"}),l=y.useMemo(()=>typeof i=="number"?{width:i,height:i,lineHeight:`${i}px`}:{},[i]);return y.createElement("span",{className:ee(t,s,a,r),style:{...l,...n}})},L_e=new Zr("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),u3=e=>({height:e,lineHeight:ae(e)}),ap=e=>({width:e,...u3(e)}),__e=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:L_e,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),F_=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...u3(e)}),O_e=e=>{const{skeletonAvatarCls:t,gradientFromColor:r,controlHeight:n,controlHeightLG:i,controlHeightSM:o}=e;return{[t]:{display:"inline-block",verticalAlign:"top",background:r,...ap(n)},[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:{...ap(i)},[`${t}${t}-sm`]:{...ap(o)}}},k_e=e=>{const{controlHeight:t,borderRadiusSM:r,skeletonInputCls:n,controlHeightLG:i,controlHeightSM:o,gradientFromColor:s,calc:a}=e;return{[n]:{display:"inline-block",verticalAlign:"top",background:s,borderRadius:r,...F_(t,a)},[`${n}-lg`]:{...F_(i,a)},[`${n}-sm`]:{...F_(o,a)}}},Qae=e=>{const{gradientFromColor:t,borderRadiusSM:r,imageSizeBase:n,calc:i}=e;return{display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:t,borderRadius:r,...ap(i(n).mul(2).equal())}},N_e=e=>({[e.skeletonNodeCls]:{...Qae(e)}}),B_e=e=>{const{skeletonImageCls:t,imageSizeBase:r,calc:n}=e;return{[t]:{...Qae(e),[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:{...ap(r),maxWidth:n(r).mul(4).equal(),maxHeight:n(r).mul(4).equal()},[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}},[`${t}${t}-circle`]:{borderRadius:"50%"}}},L_=(e,t,r)=>{const{skeletonButtonCls:n}=e;return{[`${r}${n}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${r}${n}-round`]:{borderRadius:t}}},__=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...u3(e)}),$_e=e=>{const{borderRadiusSM:t,skeletonButtonCls:r,controlHeight:n,controlHeightLG:i,controlHeightSM:o,gradientFromColor:s,calc:a}=e;return{[r]:{display:"inline-block",verticalAlign:"top",background:s,borderRadius:t,width:a(n).mul(2).equal(),minWidth:a(n).mul(2).equal(),...__(n,a)},...L_(e,n,r),[`${r}-lg`]:{...__(i,a)},...L_(e,i,`${r}-lg`),[`${r}-sm`]:{...__(o,a)},...L_(e,o,`${r}-sm`)}},G_e=e=>{const{componentCls:t,skeletonAvatarCls:r,skeletonTitleCls:n,skeletonParagraphCls:i,skeletonButtonCls:o,skeletonInputCls:s,skeletonNodeCls:a,skeletonImageCls:l,controlHeight:c,controlHeightLG:u,controlHeightSM:d,gradientFromColor:h,padding:p,marginSM:f,borderRadius:g,titleHeight:m,blockRadius:v,paragraphLiHeight:b,controlHeightXS:S,paragraphMarginTop:x}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:p,verticalAlign:"top",[r]:{display:"inline-block",verticalAlign:"top",background:h,...ap(c)},[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:{...ap(u)},[`${r}-sm`]:{...ap(d)}},[`${t}-section`]:{display:"table-cell",width:"100%",verticalAlign:"top",[n]:{width:"100%",height:m,background:h,borderRadius:v,[`+ ${i}`]:{marginBlockStart:d}},[i]:{padding:0,"> li":{width:"100%",height:b,listStyle:"none",background:h,borderRadius:v,"+ li":{marginBlockStart:S}}},[`${i}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-section`]:{[`${n}, ${i} > li`]:{borderRadius:g}}},[`${t}-with-avatar ${t}-section`]:{[n]:{marginBlockStart:f,[`+ ${i}`]:{marginBlockStart:x}}},[`${t}${t}-element`]:{display:"inline-block",width:"auto",...$_e(e),...O_e(e),...k_e(e),...N_e(e),...B_e(e)},[`${t}${t}-block`]:{width:"100%",[o]:{width:"100%"},[s]:{width:"100%"}},[`${t}${t}-active`]:{[` ${n}, ${i} > li, ${r}, ${o}, ${s}, ${a}, ${l} `]:{...__e(e)}}}},V_e=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}},Ax=Yr("Skeleton",e=>{const{componentCls:t,calc:r}=e,n=Wr(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonNodeCls:`${t}-node`,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 G_e(n)},V_e,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),z_e=e=>{const{prefixCls:t,className:r,classNames:n,rootClassName:i,active:o,style:s,styles:a,shape:l="circle",size:c,...u}=e,{getPrefixCls:d}=y.useContext(or),h=d("skeleton",t),[p,f]=Ax(h),g=Li(v=>c??v),m=ee(h,`${h}-element`,{[`${h}-active`]:o},n==null?void 0:n.root,r,i,p,f);return y.createElement("div",{className:m,style:a==null?void 0:a.root},y.createElement(FD,{prefixCls:`${h}-avatar`,className:n==null?void 0:n.content,style:{...a==null?void 0:a.content,...s},shape:l,size:g,...u}))},H_e=e=>{const{prefixCls:t,className:r,rootClassName:n,classNames:i,active:o,style:s,styles:a,block:l=!1,size:c,...u}=e,{getPrefixCls:d}=y.useContext(or),h=d("skeleton",t),[p,f]=Ax(h),g=Li(v=>c??v),m=ee(h,`${h}-element`,{[`${h}-active`]:o,[`${h}-block`]:l},i==null?void 0:i.root,r,n,p,f);return y.createElement("div",{className:m,style:a==null?void 0:a.root},y.createElement(FD,{prefixCls:`${h}-button`,className:i==null?void 0:i.content,style:{...a==null?void 0:a.content,...s},size:g,...u}))},ele=e=>{const{prefixCls:t,className:r,classNames:n,rootClassName:i,internalClassName:o,style:s,styles:a,active:l,children:c}=e,{getPrefixCls:u}=y.useContext(or),d=u("skeleton",t),[h,p]=Ax(d),f=ee(d,`${d}-element`,{[`${d}-active`]:l},h,n==null?void 0:n.root,r,i,p);return y.createElement("div",{className:f,style:a==null?void 0:a.root},y.createElement("div",{className:ee(n==null?void 0:n.content,o||`${d}-node`),style:{...a==null?void 0:a.content,...s}},c))},W_e=e=>{const{getPrefixCls:t}=y.useContext(or),r=t("skeleton",e.prefixCls);return y.createElement(ele,{...e,internalClassName:`${r}-image`},y.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${r}-image-svg`},y.createElement("title",null,"Image placeholder"),y.createElement("path",{d:"M365.7 329.1q0 45.8-32 77.7t-77.7 32-77.7-32-32-77.7 32-77.6 77.7-32 77.7 32 32 77.6M951 548.6v256H146.3V694.9L329 512l91.5 91.4L713 311zm54.8-402.3H91.4q-7.4 0-12.8 5.4T73 164.6v694.8q0 7.5 5.5 12.9t12.8 5.4h914.3q7.5 0 12.9-5.4t5.4-12.9V164.6q0-7.5-5.4-12.9t-12.9-5.4m91.4 18.3v694.8q0 37.8-26.8 64.6t-64.6 26.9H91.4q-37.7 0-64.6-26.9T0 859.4V164.6q0-37.8 26.8-64.6T91.4 73h914.3q37.8 0 64.6 26.9t26.8 64.6",className:`${r}-image-path`})))},U_e=e=>{const{prefixCls:t,className:r,classNames:n,rootClassName:i,active:o,block:s,style:a,styles:l,size:c,...u}=e,{getPrefixCls:d}=y.useContext(or),h=d("skeleton",t),[p,f]=Ax(h),g=Li(v=>c??v),m=ee(h,`${h}-element`,{[`${h}-active`]:o,[`${h}-block`]:s},n==null?void 0:n.root,r,i,p,f);return y.createElement("div",{className:m,style:l==null?void 0:l.root},y.createElement(FD,{prefixCls:`${h}-input`,className:n==null?void 0:n.content,style:{...l==null?void 0:l.content,...a},size:g,...u}))},j_e=(e,t)=>{const{width:r,rows:n=2}=t;if(Array.isArray(r))return r[e];if(n-1===e)return r},K_e=e=>{const{prefixCls:t,className:r,style:n,rows:i=0}=e,o=Array.from({length:i}).map((s,a)=>y.createElement("li",{key:a,style:{width:j_e(a,e)}}));return y.createElement("ul",{className:ee(t,r),style:n},o)},q_e=({prefixCls:e,className:t,width:r,style:n})=>y.createElement("h3",{className:ee(e,t),style:{width:r,...n}});function O_(e){return e&&typeof e=="object"?e:{}}function Y_e(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function X_e(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function Z_e(e,t){const r={};return(!e||!t)&&(r.width="61%"),!e&&t?r.rows=3:r.rows=2,r}const Vp=e=>{const{prefixCls:t,loading:r,className:n,rootClassName:i,classNames:o,style:s,styles:a,children:l,avatar:c=!1,title:u=!0,paragraph:d=!0,active:h,round:p}=e,{getPrefixCls:f,direction:g,className:m,style:v,classNames:b,styles:S}=Ur("skeleton"),x=f("skeleton",t),[T,R]=Ax(x),E={...e,avatar:c,title:u,paragraph:d},[M,D]=jr([b,o],[S,a],{props:E});if(r||!("loading"in e)){const A=!!c,I=!!u,_=!!d;let F;if(A){const B={className:M.avatar,prefixCls:`${x}-avatar`,...Y_e(I,_),...O_(c),style:D.avatar};F=y.createElement("div",{className:ee(M.header,`${x}-header`),style:D.header},y.createElement(FD,{...B}))}let O;if(I||_){let B;if(I){const N={className:M.title,prefixCls:`${x}-title`,...X_e(A,_),...O_(u),style:D.title};B=y.createElement(q_e,{...N})}let H;if(_){const N={className:M.paragraph,prefixCls:`${x}-paragraph`,...Z_e(A,I),...O_(d),style:D.paragraph};H=y.createElement(K_e,{...N})}O=y.createElement("div",{className:ee(M.section,`${x}-section`),style:D.section},B,H)}const k=ee(x,{[`${x}-with-avatar`]:A,[`${x}-active`]:h,[`${x}-rtl`]:g==="rtl",[`${x}-round`]:p},M.root,m,n,i,T,R);return y.createElement("div",{className:k,style:{...D.root,...v,...s}},F,O)}return l??null};Vp.Button=H_e;Vp.Avatar=z_e;Vp.Input=U_e;Vp.Image=W_e;Vp.Node=ele;function hK(){}const J_e=y.createContext({add:hK,remove:hK});function tle(e){const t=y.useContext(J_e),r=y.useRef(null);return br(i=>{if(i){const o=e?i.querySelector(e):i;o&&(t.add(o),r.current=o)}else t.remove(r.current)})}const pK=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:r}=y.useContext(Mx);return Q.createElement(Cl,{onClick:r,...e},t)},fK=()=>{const{confirmLoading:e,okButtonProps:t,okType:r,okTextLocale:n,onOk:i}=y.useContext(Mx);return Q.createElement(Cl,{...JH(r),loading:e,onClick:i,...t},n)};function rle(e,t){return Q.createElement("span",{className:`${e}-close-x`},t||Q.createElement(Bp,{className:`${e}-close-icon`}))}const nle=e=>{const{okText:t,okType:r="primary",cancelText:n,confirmLoading:i,onOk:o,onCancel:s,okButtonProps:a,cancelButtonProps:l,footer:c}=e,[u]=Cc("Modal",Jse()),d=t||(u==null?void 0:u.okText),h=n||(u==null?void 0:u.cancelText),p=Q.useMemo(()=>({confirmLoading:i,okButtonProps:a,cancelButtonProps:l,okTextLocale:d,cancelTextLocale:h,okType:r,onOk:o,onCancel:s}),[i,a,l,d,h,r,o,s]);let f;return typeof c=="function"||typeof c>"u"?(f=Q.createElement(Q.Fragment,null,Q.createElement(pK,null),Q.createElement(fK,null)),typeof c=="function"&&(f=c(f,{OkBtn:fK,CancelBtn:pK})),f=Q.createElement(Hae,{value:p},f)):f=c,Q.createElement(Dae,{disabled:!1},f)},Q_e=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"}}}},eOe=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},tOe=(e,t)=>{const{componentCls:r,gridColumns:n,antCls:i}=e,[o,s]=Jn(i,"grid"),[,a]=Jn(i,"col"),l={};for(let c=n;c>=0;c--)c===0?(l[`${r}${t}-${c}`]={display:"none"},l[`${r}-push-${c}`]={insetInlineStart:"auto"},l[`${r}-pull-${c}`]={insetInlineEnd:"auto"},l[`${r}${t}-push-${c}`]={insetInlineStart:"auto"},l[`${r}${t}-pull-${c}`]={insetInlineEnd:"auto"},l[`${r}${t}-offset-${c}`]={marginInlineStart:0},l[`${r}${t}-order-${c}`]={order:0}):(l[`${r}${t}-${c}`]=[{[o("display")]:"block",display:"block"},{display:s("display"),flex:`0 0 ${c/n*100}%`,maxWidth:`${c/n*100}%`}],l[`${r}${t}-push-${c}`]={insetInlineStart:`${c/n*100}%`},l[`${r}${t}-pull-${c}`]={insetInlineEnd:`${c/n*100}%`},l[`${r}${t}-offset-${c}`]={marginInlineStart:`${c/n*100}%`},l[`${r}${t}-order-${c}`]={order:c});return l[`${r}${t}-flex`]={flex:a(`${t.replace(/-/,"")}-flex`)},l},zB=(e,t)=>tOe(e,t),rOe=(e,t,r)=>({[`@media (min-width: ${ae(t)})`]:{...zB(e,r)}}),nOe=()=>({}),iOe=()=>({}),oOe=Yr("Grid",Q_e,nOe),ile=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin}),sOe=Yr("Grid",e=>{const t=Wr(e,{gridColumns:24}),r=ile(t);return delete r.xs,[eOe(t),zB(t,""),zB(t,"-xs"),Object.keys(r).map(n=>rOe(t,r[n],`-${n}`)).reduce((n,i)=>({...n,...i}),{})]},iOe);function gK(e){return{position:e,inset:0}}const aOe=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}-container`]:{pointerEvents:"none"},[`${t}-mask`]:{...gK("fixed"),zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`&${t}-mask-blur`]:{backdropFilter:"blur(4px)"},[`${t}-hidden`]:{display:"none"}},[`${t}-wrap`]:{...gK("fixed"),zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"}}},{[`${t}-root`]:QH(e)}]},lOe=e=>{const{componentCls:t,motionDurationMid:r}=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:`${ae(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:{...cn(e),pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${ae(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto","&:focus-visible":{borderRadius:e.borderRadiusLG,...uc(e)},[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-container`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:{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","background-color"].map(n=>`${n} ${r}`).join(", "),"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:ae(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive},...yl(e)},[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${ae(e.borderRadiusLG)} ${ae(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:`${ae(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}-container, ${t}-body, ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},cOe=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},uOe=e=>{const{componentCls:t}=e,r=ile(e),n={...r};delete n.xs;const i=`--${t.replace(".","")}-`,o=Object.keys(n).map(s=>({[`@media (min-width: ${ae(n[s])})`]:{width:`var(${i}${s}-width)`}}));return{[`${t}-root`]:{[t]:[].concat(Nr(Object.keys(r).map((s,a)=>{const l=Object.keys(r)[a-1];return l?{[`${i}${s}-width`]:`var(${i}${l}-width)`}:null})),[{width:`var(${i}xs-width)`}],Nr(o))}}},ole=e=>{const t=e.padding,r=e.fontSizeHeading5,n=e.lineHeightHeading5;return Wr(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()})},sle=e=>({footerBg:"transparent",headerBg:"transparent",titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${ae(e.paddingMD)} ${ae(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${ae(e.padding)} ${ae(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${ae(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${ae(e.paddingXS)} ${ae(e.padding)}`:0,footerBorderTop:e.wireframe?`${ae(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${ae(e.borderRadiusLG)} ${ae(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${ae(e.padding*2)} ${ae(e.padding*2)} ${ae(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM,mask:!0}),ale=Yr("Modal",e=>{const t=ole(e);return[lOe(t),cOe(t),aOe(t),Rx(t,"zoom"),uOe(t)]},sle,{unitless:{titleLineHeight:!0}});let HB;const dOe=e=>{HB={x:e.pageX,y:e.pageY},setTimeout(()=>{HB=null},100)};F_e()&&document.documentElement.addEventListener("click",dOe,!0);const lle=e=>{const{prefixCls:t,className:r,rootClassName:n,open:i,wrapClassName:o,centered:s,getContainer:a,style:l,width:c=520,footer:u,classNames:d,styles:h,children:p,loading:f,confirmLoading:g,zIndex:m,mousePosition:v,onOk:b,onCancel:S,okButtonProps:x,cancelButtonProps:T,destroyOnHidden:R,destroyOnClose:E,panelRef:M=null,closable:D,mask:A,modalRender:I,maskClosable:_,focusTriggerAfterClose:F,focusable:O,...k}=e,{getPopupContainer:B,getPrefixCls:H,direction:N,className:z,style:U,classNames:V,styles:G,centered:K,cancelButtonProps:q,okButtonProps:Y,mask:X}=Ur("modal"),{modal:le}=y.useContext(or),[re,ne]=y.useMemo(()=>typeof D=="boolean"?[void 0,void 0]:[D==null?void 0:D.afterClose,D==null?void 0:D.onClose],[D]),se=H("modal",t),de=H(),[te,ie,pe]=tae(A,X,se,_),Z=Jae(O,te,F),ue=Qt=>{g||(S==null||S(Qt),ne==null||ne())},ve=Qt=>{b==null||b(Qt),ne==null||ne()},he=co(se),[me,Oe]=ale(se,he),Pe=ee(o,{[`${se}-centered`]:s??K,[`${se}-wrap-rtl`]:N==="rtl"}),Me=u!==null&&!f?y.createElement(nle,{...e,okButtonProps:{...Y,...x},onOk:ve,cancelButtonProps:{...q,...T},onCancel:ue}):null,[He,Ge,Ct,Ht]=YH(Fy(e),Fy(le),{closable:!0,closeIcon:y.createElement(Bp,{className:`${se}-close-icon`}),closeIconRender:Qt=>rle(se,Qt)}),St=He?{disabled:Ct,closeIcon:Ge,afterClose:re,...Ht}:!1,Ye=I?Qt=>y.createElement("div",{className:`${se}-render`},I(Qt)):void 0,Fe=`.${se}-${I?"render":"container"}`,et=tle(Fe),Ne=zo(M,et),[tt,nt]=$p("Modal",m),Ke={...e,width:c,panelRef:M,focusTriggerAfterClose:Z.focusTriggerAfterClose,focusable:Z,mask:te,maskClosable:pe,zIndex:tt},[Ie,rt]=jr([V,d,ie],[G,h],{props:Ke}),[Tt,Rt]=y.useMemo(()=>c&&typeof c=="object"?[void 0,c]:[c,void 0],[c]),Bt=y.useMemo(()=>{const Qt={};return Rt&&Object.keys(Rt).forEach(ft=>{const ut=Rt[ft];ut!==void 0&&(Qt[`--${se}-${ft}-width`]=typeof ut=="number"?`${ut}px`:ut)}),Qt},[se,Rt]);return y.createElement(Sp,{form:!0,space:!0},y.createElement(bx.Provider,{value:nt},y.createElement(_Le,{width:Tt,...k,zIndex:tt,getContainer:a===void 0?B:a,prefixCls:se,rootClassName:ee(me,n,Oe,he,Ie.root),rootStyle:rt.root,footer:Me,visible:i,mousePosition:v??HB,onClose:ue,closable:St,closeIcon:Ge,transitionName:du(de,"zoom",e.transitionName),maskTransitionName:du(de,"fade",e.maskTransitionName),mask:te,maskClosable:pe,className:ee(me,r,z),style:{...U,...l,...Bt},classNames:{...Ie,wrapper:ee(Ie.wrapper,Pe)},styles:rt,panelRef:Ne,destroyOnHidden:R??E,modalRender:Ye,focusTriggerAfterClose:Z.focusTriggerAfterClose,focusTrap:Z.trap},f?y.createElement(Vp,{active:!0,title:!1,paragraph:{rows:4},className:`${se}-body-skeleton`}):p)))},hOe=e=>{const{componentCls:t,titleFontSize:r,titleLineHeight:n,modalConfirmIconSize:i,fontSize:o,lineHeight:s,modalTitleHeight:a,fontHeight:l,confirmBodyPadding:c}=e,u=`${t}-confirm`;return{[u]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${u}-body-wrapper`]:{...Cp()},[`&${t} ${t}-body`]:{padding:c},[`${u}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:i,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(l).sub(i).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(a).sub(i).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${ae(e.marginSM)})`},[`${u}-body-no-icon ${u}-paragraph`]:{maxWidth:"100%"},[`${e.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${ae(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${u}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:r,lineHeight:n},[`${u}-container`]:{color:e.colorText,fontSize:o,lineHeight:s},[`${u}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${u}-error ${u}-body > ${e.iconCls}`]:{color:e.colorError},[`${u}-warning ${u}-body > ${e.iconCls}, ${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},pOe=yx(["Modal","confirm"],e=>{const t=ole(e);return hOe(t)},sle,{order:-1e3}),cle=e=>{const{prefixCls:t,icon:r,okText:n,cancelText:i,confirmPrefixCls:o,type:s,okCancel:a,footer:l,locale:c,autoFocusButton:u,focusable:d,...h}=e;let p=r;if(!r&&r!==null)switch(s){case"info":p=y.createElement($se,null);break;case"success":p=y.createElement(Bse,null);break;case"error":p=y.createElement(ED,null);break;default:p=y.createElement(RD,null)}const f=a??s==="confirm",g=y.useMemo(()=>{const I=(d==null?void 0:d.autoFocusButton)||u;return I||I===null?I:"ok"},[u,d==null?void 0:d.autoFocusButton]),[m]=Cc("Modal"),v=c||m,b=n||(f?v==null?void 0:v.okText:v==null?void 0:v.justOkText),S=i||(v==null?void 0:v.cancelText),{closable:x}=h,{onClose:T}=x&&typeof x=="object"?x:{},R=y.useMemo(()=>({autoFocusButton:g,cancelTextLocale:S,okTextLocale:b,mergedOkCancel:f,onClose:T,...h}),[g,S,b,f,T,h]),E=y.createElement(y.Fragment,null,y.createElement(Z9,null),y.createElement(J9,null)),M=xn(e.title)&&e.title!=="",D=xn(p),A=`${o}-body`;return y.createElement("div",{className:`${o}-body-wrapper`},y.createElement("div",{className:ee(A,{[`${A}-has-title`]:M,[`${A}-no-icon`]:!D})},p,y.createElement("div",{className:`${o}-paragraph`},M&&y.createElement("span",{className:`${o}-title`},e.title),y.createElement("div",{className:`${o}-content`},e.content))),l===void 0||typeof l=="function"?y.createElement(Hae,{value:R},y.createElement("div",{className:`${o}-btns`},typeof l=="function"?l(E,{OkBtn:J9,CancelBtn:Z9}):E)):l,y.createElement(pOe,{prefixCls:t}))},fOe=e=>{const{close:t,zIndex:r,maskStyle:n,direction:i,prefixCls:o,wrapClassName:s,rootPrefixCls:a,bodyStyle:l,closable:c=!1,onConfirm:u,styles:d,title:h,mask:p,maskClosable:f,okButtonProps:g,cancelButtonProps:m}=e,{cancelButtonProps:v,okButtonProps:b}=Ur("modal"),S=`${o}-confirm`,x=e.width||416,T=e.style||{},R=ee(S,`${S}-${e.type}`,{[`${S}-rtl`]:i==="rtl"},e.className),E=y.useMemo(()=>{const A=mB(p,f);return A.closable??(A.closable=!1),A},[p,f]),[,M]=ds(),D=y.useMemo(()=>r!==void 0?r:M.zIndexPopupBase+rAe,[r,M]);return y.createElement(lle,{...e,className:R,wrapClassName:ee({[`${S}-centered`]:!!e.centered},s),onCancel:()=>{t==null||t({triggerCancel:!0}),u==null||u(!1)},title:h,footer:null,transitionName:du(a||"","zoom",e.transitionName),maskTransitionName:du(a||"","fade",e.maskTransitionName),mask:E,style:T,styles:{body:l,mask:n,...d},width:x,zIndex:D,closable:c},y.createElement(cle,{...e,confirmPrefixCls:S,okButtonProps:{...b,...g},cancelButtonProps:{...v,...m}}))},ule=e=>{const{rootPrefixCls:t,iconPrefixCls:r,direction:n,theme:i}=e;return y.createElement(Eu,{prefixCls:t,iconPrefixCls:r,direction:n,theme:i},y.createElement(fOe,{...e}))},gg=[];let dle="";function hle(){return dle}const gOe=e=>{var c;const{prefixCls:t,getContainer:r,direction:n}=e,i=Jse(),o=y.useContext(or),s=hle()||o.getPrefixCls(),a=t||`${s}-modal`;let l=r;return l===!1&&(l=void 0),Q.createElement(ule,{...e,rootPrefixCls:s,prefixCls:a,iconPrefixCls:o.iconPrefixCls,theme:o.theme,direction:n??o.direction,locale:((c=o.locale)==null?void 0:c.Modal)??i,getContainer:l})};function Fx(e){const t=lFe(),r=document.createDocumentFragment();let n={...e,close:a,open:!0},i;function o(...c){var d;c.some(h=>h==null?void 0:h.triggerCancel)&&((d=e.onCancel)==null||d.call(e,()=>{},...c.slice(1)));for(let h=0;h{})}const s=c=>{clearTimeout(i),i=setTimeout(()=>{const u=t.getPrefixCls(void 0,hle()),d=t.getIconPrefixCls(),h=t.getTheme(),p=Q.createElement(gOe,{...c});_ae(Q.createElement(Eu,{prefixCls:u,iconPrefixCls:d,theme:h},typeof t.holderRender=="function"?t.holderRender(p):p),r)})};function a(...c){n={...n,open:!1,afterClose:()=>{typeof e.afterClose=="function"&&e.afterClose(),o.apply(this,c)}},s(n)}function l(c){typeof c=="function"?n=c(n):n={...n,...c},s(n)}return s(n),gg.push(a),{destroy:a,update:l}}function ple(e){return{...e,type:"warning"}}function fle(e){return{...e,type:"info"}}function gle(e){return{...e,type:"success"}}function mle(e){return{...e,type:"error"}}function vle(e){return{...e,type:"confirm"}}function mOe({rootPrefixCls:e}){dle=e}const vOe=y.forwardRef((e,t)=>{const{afterClose:r,config:n,...i}=e,[o,s]=y.useState(!0),[a,l]=y.useState(n),{direction:c,getPrefixCls:u}=y.useContext(or),d=u("modal"),h=u(),p=()=>{var v;r(),(v=a.afterClose)==null||v.call(a)},f=(...v)=>{var S;s(!1),v.some(x=>x==null?void 0:x.triggerCancel)&&((S=a.onCancel)==null||S.call(a,()=>{},...v.slice(1)))};y.useImperativeHandle(t,()=>({destroy:f,update:v=>{l(b=>{const S=typeof v=="function"?v(b):v;return{...b,...S}})}}));const g=a.okCancel??a.type==="confirm",[m]=Cc("Modal",dc.Modal);return y.createElement(ule,{prefixCls:d,rootPrefixCls:h,...a,close:f,open:o,afterClose:p,okText:a.okText||(g?m==null?void 0:m.okText:m==null?void 0:m.justOkText),direction:a.direction||c,cancelText:a.cancelText||(m==null?void 0:m.cancelText),...i})});let mK=0;const yOe=y.memo(y.forwardRef((e,t)=>{const[r,n]=ZDe();return y.useImperativeHandle(t,()=>({patchElement:n}),[n]),y.createElement(y.Fragment,null,r)}));function COe(){const e=y.useRef(null),[t,r]=y.useState([]);y.useEffect(()=>{t.length&&(Nr(t).forEach(s=>{s()}),r([]))},[t]);const n=y.useCallback(o=>function(a){var g;mK+=1;const l=y.createRef();let c;const u=new Promise(m=>{c=m});let d=!1,h;const p=y.createElement(vOe,{key:`modal-${mK}`,config:o(a),ref:l,afterClose:()=>{h==null||h()},isSilent:()=>d,onConfirm:m=>{c(m)}});return h=(g=e.current)==null?void 0:g.patchElement(p),h&&gg.push(h),{destroy:()=>{function m(){var v;(v=l.current)==null||v.destroy()}l.current?m():r(v=>[].concat(Nr(v),[m]))},update:m=>{function v(){var b;(b=l.current)==null||b.update(m)}l.current?v():r(b=>[].concat(Nr(b),[v]))},then:m=>(d=!0,u.then(m))}},[]);return[y.useMemo(()=>({info:n(fle),success:n(gle),error:n(mle),warning:n(ple),confirm:n(vle)}),[n]),y.createElement(yOe,{key:"modal-holder",ref:e})]}function yle(e){return t=>y.createElement(Eu,{theme:{token:{motion:!1,zIndexPopupBase:0}}},y.createElement(e,{...t}))}const d3=(e,t,r,n,i)=>yle(s=>{const{prefixCls:a,style:l}=s,c=y.useRef(null),[u,d]=y.useState(0),[h,p]=y.useState(0),[f,g]=Fn(!1,s.open),{getPrefixCls:m}=y.useContext(or),v=m(n||"select",a);y.useEffect(()=>{if(g(!0),typeof ResizeObserver<"u"){const x=new ResizeObserver(R=>{const E=R[0].target;d(E.offsetHeight+8),p(E.offsetWidth)}),T=setInterval(()=>{var M;const R=i?`.${i(v)}`:`.${v}-dropdown`,E=(M=c.current)==null?void 0:M.querySelector(R);E&&(clearInterval(T),x.observe(E))},10);return()=>{clearInterval(T),x.disconnect()}}},[v]);let b={...s,style:{...l,margin:0},open:f,getPopupContainer:()=>c.current};r&&(b=r(b)),t&&Object.assign(b,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});const S={paddingBottom:u,position:"relative",minWidth:h};return y.createElement("div",{ref:c,style:S},y.createElement(e,{...b}))}),bOe=(e,t,r,n,i=!1,o,s)=>{const a=y.useMemo(()=>typeof r=="boolean"?{allowClear:r}:r&&typeof r=="object"?r:{allowClear:!1},[r]);return y.useMemo(()=>{const l=!i&&a.allowClear!==!1&&(t.length||o)&&!(s==="combobox"&&o==="");return{allowClear:l,clearIcon:l?a.clearIcon||n||"×":null}},[a,n,i,t.length,o,s])},Cle=y.createContext(null);function wm(){return y.useContext(Cle)}function SOe(e=250){const t=y.useRef(null),r=y.useRef(null);y.useEffect(()=>()=>{window.clearTimeout(r.current)},[]);function n(i){(i||t.current===null)&&(t.current=i),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{t.current=null},e)}return[()=>t.current,n]}function ble(e,t){return e.filter(r=>r).some(r=>r.contains(t)||r===t)}function wOe(e,t,r,n){const i=br(o=>{if(n)return;let s=o.target;s.shadowRoot&&o.composed&&(s=o.composedPath()[0]||s),o._ori_target&&(s=o._ori_target),t&&!ble(e(),s)&&r(!1)});y.useEffect(()=>(window.addEventListener("mousedown",i),()=>window.removeEventListener("mousedown",i)),[i])}function WB(){return WB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}},TOe=(e,t)=>{const{prefixCls:r,disabled:n,visible:i,children:o,popupElement:s,animation:a,transitionName:l,popupStyle:c,popupClassName:u,direction:d="ltr",placement:h,builtinPlacements:p,popupMatchSelectWidth:f,popupRender:g,popupAlign:m,getPopupContainer:v,empty:b,onPopupVisibleChange:S,onPopupMouseEnter:x,onPopupMouseDown:T,onPopupBlur:R,...E}=e,M=`${r}-dropdown`;let D=s;g&&(D=g(s));const A=y.useMemo(()=>p||xOe(f),[p,f]),I=a?`${M}-${a}`:l,_=typeof f=="number",F=y.useMemo(()=>_?null:f===!1?"minWidth":"width",[f,_]);let O=c;_&&(O={...c,width:f});const k=y.useRef(null);return y.useImperativeHandle(t,()=>({getPopupElement:()=>{var B;return(B=k.current)==null?void 0:B.popupElement}})),y.createElement(MD,WB({},E,{showAction:S?["click"]:[],hideAction:S?["click"]:[],popupPlacement:h||(d==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:A,prefixCls:M,popupMotion:{motionName:I},popup:y.createElement("div",{onMouseEnter:x,onMouseDown:T,onBlur:R},D),ref:k,stretch:F,popupAlign:m,popupVisible:i,getPopupContainer:v,popupClassName:ee(u,{[`${M}-empty`]:b}),popupStyle:O,onPopupVisibleChange:S}),o)},EOe=y.forwardRef(TOe);function vK(e,t){const{key:r}=e;let n;return"value"in e&&({value:n}=e),r??(n!==void 0?n:`rc-index-key-${t}`)}function UB(e){return typeof e<"u"&&!Number.isNaN(e)}function Sle(e,t){const{label:r,value:n,options:i,groupLabel:o}=e||{},s=r||(t?"children":"label");return{label:s,value:n||"value",options:i||"options",groupLabel:o||s}}function ROe(e,{fieldNames:t,childrenAsData:r}={}){const n=[],{label:i,value:o,options:s,groupLabel:a}=Sle(t,!1);function l(c,u){Array.isArray(c)&&c.forEach(d=>{if(u||!(s in d)){const h=d[o];n.push({key:vK(d,n.length),groupOption:u,data:d,label:d[i],value:h})}else{let h=d[a];h===void 0&&r&&(h=d.label),n.push({key:vK(d,n.length),group:!0,data:d,label:h}),l(d[s],!0)}})}return l(e,!1),n}function jB(e){const t={...e};return"props"in t||Object.defineProperty(t,"props",{get(){return Hn(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}const POe=(e,t,r)=>{if(!t||!t.length)return null;let n=!1;const i=(s,[a,...l])=>{if(!a)return[s];const c=s.split(a);return n=n||c.length>1,c.reduce((u,d)=>[...u,...i(d,l)],[]).filter(Boolean)},o=i(e,t);return n?typeof r<"u"?o.slice(0,r):o:null};function MOe(e){const{visible:t,values:r}=e;if(!t)return null;const n=50;return y.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`${r.slice(0,n).map(({label:i,value:o})=>["number","string"].includes(typeof i)?i:o).join(", ")}`,r.length>n?", ...":null)}const IOe=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},h3=(e,t=1)=>{if(t<=0){e();return}IOe(()=>{h3(e,t-1)})};function DOe(e,t,r,n){const[i,o]=y.useState(!1);y.useEffect(()=>{o(!0)},[]);const[s,a]=Fn(e,t),[l,c]=y.useState(!1),u=i?s:!1,d=n(u),h=y.useRef(0),p=br(g=>{r&&d!==g&&r(g),a(g)}),f=br((g,m={})=>{const{cancelFun:v}=m;h.current+=1;const b=h.current,S=typeof g=="boolean"?g:!d;c(!S);function x(){b===h.current&&!(v!=null&&v())&&(p(S),c(!1))}S?x():h3(()=>{x()})});return[u,d,f,l]}function k_(e){const{children:t,...r}=e;return t?y.createElement("div",r,t):null}const wle=y.createContext(null);function Lx(){return y.useContext(wle)}const xle=y.forwardRef((e,t)=>{const{onChange:r,onKeyDown:n,onBlur:i,style:o,syncWidth:s,value:a,className:l,autoComplete:c,...u}=e,{prefixCls:d,mode:h,onSearch:p,onSearchSubmit:f,onInputBlur:g,autoFocus:m,tokenWithEnter:v,placeholder:b,components:{input:S="input"}}=Lx(),{id:x,classNames:T,styles:R,open:E,activeDescendantId:M,role:D,disabled:A}=wm()||{},I=ee(`${d}-input`,T==null?void 0:T.input,l),_=y.useRef(!1),F=y.useRef(null),O=y.useRef(null);y.useImperativeHandle(t,()=>O.current);const k=Y=>{let{value:X}=Y.target;if(v&&F.current&&/[\r\n]/.test(F.current)){const le=F.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");X=X.replace(le,F.current)}F.current=null,p&&p(X,!0,_.current),r==null||r(Y)},B=Y=>{const{key:X}=Y,{value:le}=Y.currentTarget;X==="Enter"&&h==="tags"&&!_.current&&f&&f(le),n==null||n(Y)},H=Y=>{g==null||g(),i==null||i(Y)},N=()=>{_.current=!0},z=Y=>{if(_.current=!1,h!=="combobox"){const{value:X}=Y.currentTarget;p==null||p(X,!0,!1)}},U=Y=>{const{clipboardData:X}=Y,le=X==null?void 0:X.getData("text");F.current=le||""},[V,G]=y.useState(void 0);zr(()=>{const Y=O.current;if(s&&Y){Y.style.width="0px";const X=Y.scrollWidth;G(X),Y.style.width=""}},[s,a]);const K={id:x,type:h==="combobox"?"text":"search",...u,ref:O,style:{...R==null?void 0:R.input,...o,"--select-input-width":V},autoFocus:m,autoComplete:c||"off",className:I,disabled:A,value:a||"",onChange:k,onKeyDown:B,onBlur:H,onPaste:U,onCompositionStart:N,onCompositionEnd:z,role:D||"combobox","aria-expanded":E||!1,"aria-haspopup":"listbox","aria-owns":E?`${x}_list`:void 0,"aria-autocomplete":"list","aria-controls":E?`${x}_list`:void 0,"aria-activedescendant":E?M:void 0};if(y.isValidElement(S)){const Y=S.props||{},X={placeholder:e.placeholder||b,...K,...Y};return Object.keys(Y).forEach(le=>{const re=Y[le];typeof re=="function"&&(X[le]=(...ne)=>{var se;re(...ne),(se=K[le])==null||se.call(K,...ne)})}),X.ref=zo(S.ref,K.ref),y.cloneElement(S,X)}const q=S;return y.createElement(q,K)});function Tle(e){const{prefixCls:t,placeholder:r,displayValues:n}=Lx(),{classNames:i,styles:o}=wm(),{show:s=!0}=e;return n.length?null:y.createElement("div",{className:ee(`${t}-placeholder`,i==null?void 0:i.placeholder),style:{visibility:s?"visible":"hidden",...o==null?void 0:o.placeholder}},r)}const p3=y.createContext(null);function Ele(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function AOe(e){return e!=null}function FOe(e){return!e&&e!==0}function yK(e){return["string","number"].includes(typeof e)}function KB(e){let t;return e&&(yK(e.title)?t=e.title.toString():yK(e.label)&&(t=e.label.toString())),t}function qB(){return qB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:r,searchValue:n,activeValue:i,displayValues:o,maxLength:s,mode:a,components:l}=Lx(),{triggerOpen:c,title:u,showSearch:d,classNames:h,styles:p}=wm(),f=y.useContext(p3),[g,m]=y.useState(!1),v=a==="combobox",b=o[0],S=y.useMemo(()=>v&&i&&!g&&c?i:d?n:"",[v,i,g,c,n,d]),[x,T,R,E]=y.useMemo(()=>{let I,_,F;if(b&&(f!=null&&f.flattenOptions)){const k=f.flattenOptions.find(B=>B.value===b.value);k!=null&&k.data&&(I=k.data.className,_=k.data.style,F=KB(k.data))}return b&&!F&&(F=KB(b)),u!==void 0&&(F=u),[I,_,F,!!I||!!_]},[b,f==null?void 0:f.flattenOptions,u]);y.useEffect(()=>{v&&m(!1)},[v,i]);const M=b&&b.label!==null&&b.label!==void 0&&String(b.label).trim()!=="",A=!(v&&(l!=null&&l.input))?b?E?y.createElement("div",{className:ee(`${r}-content-value`,x),style:{...S?{visibility:"hidden"}:{},...T},title:R},b.label):b.label:y.createElement(Tle,{show:!S}):null;return y.createElement("div",{className:ee(`${r}-content`,M&&`${r}-content-has-value`,S&&`${r}-content-has-search-value`,E&&`${r}-content-has-option-style`,h==null?void 0:h.content),style:p==null?void 0:p.content,title:E?void 0:R},A,y.createElement(xle,qB({ref:t},e,{value:S,maxLength:a==="combobox"?s:void 0,onChange:I=>{var _;m(!0),(_=e.onChange)==null||_.call(e,I)}})))}),uv=void 0;function _Oe(e,t){const{prefixCls:r,invalidate:n,item:i,renderItem:o,responsive:s,responsiveDisabled:a,registerSize:l,itemKey:c,className:u,style:d,children:h,display:p,order:f,component:g="div",...m}=e,v=s&&!p;function b(E){l(c,E)}y.useEffect(()=>()=>{b(null)},[]);const S=o&&i!==uv?o(i,{index:f}):h;let x;n||(x={opacity:v?0:1,height:v?0:uv,overflowY:v?"hidden":uv,order:s?f:uv,pointerEvents:v?"none":uv,position:v?"absolute":uv});const T={};v&&(T["aria-hidden"]=!0);let R=y.createElement(g,ll({className:ee(!n&&r,u),style:{...x,...d}},T,m,{ref:t}),S);return s&&(R=y.createElement(Js,{onResize:({offsetWidth:E})=>{b(E)},disabled:a},R)),R}const qS=y.forwardRef(_Oe);function OOe(e){if(typeof MessageChannel>"u")Lr(e);else{const t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function kOe(){const e=y.useRef(null);return r=>{e.current||(e.current=[],OOe(()=>{ac.unstable_batchedUpdates(()=>{e.current.forEach(n=>{n()}),e.current=null})})),e.current.push(r)}}function dv(e,t){const[r,n]=y.useState(t),i=br(o=>{e(()=>{n(o)})});return[r,i]}const nM=Q.createContext(null),NOe=(e,t)=>{const r=y.useContext(nM);if(!r){const{component:a="div",...l}=e;return y.createElement(a,ll({},l,{ref:t}))}const{className:n,...i}=r,{className:o,...s}=e;return y.createElement(nM.Provider,{value:null},y.createElement(qS,ll({ref:t,className:ee(n,o)},i,s)))},BOe=y.forwardRef(NOe),Rle="responsive",Ple="invalidate";function $Oe(e){return`+ ${e.length} ...`}function GOe(e,t){const{prefixCls:r="rc-overflow",data:n=[],renderItem:i,renderRawItem:o,itemKey:s,itemWidth:a=10,ssr:l,style:c,className:u,maxCount:d,renderRest:h,renderRawRest:p,prefix:f,suffix:g,component:m="div",itemComponent:v,onVisibleChange:b,...S}=e,x=l==="full",T=kOe(),[R,E]=dv(T,null),M=R||0,[D,A]=dv(T,new Map),[I,_]=dv(T,0),[F,O]=dv(T,0),[k,B]=dv(T,0),[H,N]=dv(T,0),[z,U]=y.useState(null),[V,G]=y.useState(null),K=y.useMemo(()=>V===null&&x?Number.MAX_SAFE_INTEGER:V||0,[V,R]),[q,Y]=y.useState(!1),X=`${r}-item`,le=Math.max(I,F),re=d===Rle,ne=n.length&&re,se=d===Ple,de=ne||typeof d=="number"&&n.length>d,te=y.useMemo(()=>{let Ne=n;return ne?R===null&&x?Ne=n:Ne=n.slice(0,Math.min(n.length,M/a)):typeof d=="number"&&(Ne=n.slice(0,d)),Ne},[n,a,R,d,ne]),ie=y.useMemo(()=>ne?n.slice(K+1):n.slice(te.length),[n,te,ne,K]),pe=y.useCallback((Ne,tt)=>typeof s=="function"?s(Ne):(s&&(Ne==null?void 0:Ne[s]))??tt,[s]),Z=y.useCallback(i||(Ne=>Ne),[i]);function ue(Ne,tt,nt){V===Ne&&(tt===void 0||tt===z)||(G(Ne),nt||(Y(Ne{const Ke=new Map(nt);return tt===null?Ke.delete(Ne):Ke.set(Ne,tt),Ke})}function me(Ne,tt){O(tt),_(F)}function Oe(Ne,tt){B(tt)}function Pe(Ne,tt){N(tt)}function Me(Ne){return D.get(pe(te[Ne],Ne))}zr(()=>{if(M&&typeof le=="number"&&te){let Ne=k+H;const tt=te.length,nt=tt-1;if(!tt){ue(0,null);return}for(let Ke=0;KeM){ue(Ke-1,Ne-Ie-H+F);break}}g&&Me(0)+H>M&&U(null)}},[M,D,F,k,H,pe,te]);const He=q&&!!ie.length;let Ge={};z!==null&&ne&&(Ge={position:"absolute",left:z,top:0});const Ct={prefixCls:X,responsive:ne,component:v,invalidate:se},Ht=o?(Ne,tt)=>{const nt=pe(Ne,tt);return y.createElement(nM.Provider,{key:nt,value:{...Ct,order:tt,item:Ne,itemKey:nt,registerSize:he,display:tt<=K}},o(Ne,tt))}:(Ne,tt)=>{const nt=pe(Ne,tt);return y.createElement(qS,ll({},Ct,{order:tt,key:nt,item:Ne,renderItem:Z,itemKey:nt,registerSize:he,display:tt<=K}))},St={order:He?K:Number.MAX_SAFE_INTEGER,className:`${X}-rest`,registerSize:me,display:He},Ye=h||$Oe,Fe=p?y.createElement(nM.Provider,{value:{...Ct,...St}},p(ie)):y.createElement(qS,ll({},Ct,St),typeof Ye=="function"?Ye(ie):Ye),et=y.createElement(m,ll({className:ee(!se&&r,u),style:c,ref:t},S),f&&y.createElement(qS,ll({},Ct,{responsive:re,responsiveDisabled:!ne,order:-1,className:`${X}-prefix`,registerSize:Oe,display:!0}),f),te.map(Ht),de?Fe:null,g&&y.createElement(qS,ll({},Ct,{responsive:re,responsiveDisabled:!ne,order:K,className:`${X}-suffix`,registerSize:Pe,display:!0,style:Ge}),g));return re?y.createElement(Js,{onResize:ve,disabled:!ne},et):et}const vd=y.forwardRef(GOe);vd.Item=BOe;vd.RESPONSIVE=Rle;vd.INVALIDATE=Ple;const Mle=e=>{const{className:t,style:r,customizeIcon:n,customizeIconProps:i,children:o,onMouseDown:s,onClick:a}=e,l=typeof n=="function"?n(i):n;return y.createElement("span",{className:t,onMouseDown:c=>{c.preventDefault(),s==null||s(c)},style:{userSelect:"none",WebkitUserSelect:"none",...r},unselectable:"on",onClick:a,"aria-hidden":!0},l!==void 0?l:y.createElement("span",{className:ee(t.split(/\s+/).map(c=>`${c}-icon`))},o))};function YB(){return YB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e.preventDefault(),e.stopPropagation()},zOe=y.forwardRef(function({inputProps:t},r){const{prefixCls:n,displayValues:i,searchValue:o,mode:s,onSelectorRemove:a,removeIcon:l}=Lx(),{disabled:c,showSearch:u,triggerOpen:d,rawOpen:h,toggleOpen:p,autoClearSearchValue:f,tagRender:g,maxTagPlaceholder:m,maxTagTextLength:v,maxTagCount:b,classNames:S,styles:x}=wm(),T=`${n}-selection-item`;let R=o;!h&&s==="multiple"&&f!==!1&&(R="");const E=u&&R||"",M=u&&!c,D=l??"×",A=m??(N=>`+ ${N.length} ...`),I=g,_=N=>{p(N)},F=N=>{a==null||a(N)},O=(N,z,U,V,G)=>y.createElement("span",{title:KB(N),className:ee(T,{[`${T}-disabled`]:U},S==null?void 0:S.item),style:x==null?void 0:x.item},y.createElement("span",{className:ee(`${T}-content`,S==null?void 0:S.itemContent),style:x==null?void 0:x.itemContent},z),V&&y.createElement(Mle,{className:ee(`${T}-remove`,S==null?void 0:S.itemRemove),style:x==null?void 0:x.itemRemove,onMouseDown:CK,onClick:G,customizeIcon:D},"×")),k=(N,z,U,V,G,K,q)=>{const Y=X=>{CK(X),_(!d)};return y.createElement("span",{onMouseDown:Y},I({label:z,value:N,index:q==null?void 0:q.index,disabled:U,closable:V,onClose:G,isMaxTag:!!K}))},B=(N,z)=>{const{disabled:U,label:V,value:G}=N,K=!c&&!U;let q=V;if(typeof v=="number"&&(typeof V=="string"||typeof V=="number")){const X=String(q);X.length>v&&(q=`${X.slice(0,v)}...`)}const Y=X=>{X&&X.stopPropagation(),F(N)};return typeof I=="function"?k(G,q,U,K,Y,void 0,z):O(N,q,U,K,Y)},H=N=>{if(!i.length)return null;const z=typeof A=="function"?A(N):A;return typeof I=="function"?k(void 0,z,!1,!1,void 0,!0):O({title:z},z,!1)};return y.createElement(vd,{prefixCls:`${n}-content`,className:S==null?void 0:S.content,style:x==null?void 0:x.content,prefix:!i.length&&!E&&y.createElement(Tle,null),data:i,renderItem:B,renderRest:H,suffix:y.createElement(xle,YB({ref:r,disabled:c,readOnly:!M},t,{value:E||"",syncWidth:!0})),itemKey:VOe,maxCount:b})}),HOe=y.forwardRef(function(t,r){const{multiple:n,onInputKeyDown:i,tabIndex:o}=Lx(),s=wm(),{showSearch:a}=s,c={...hi(s,{aria:!0}),onKeyDown:i,readOnly:!a,tabIndex:o};return n?y.createElement(zOe,{ref:r,inputProps:c}):y.createElement(LOe,{ref:r,inputProps:c})});function WOe(e){return e&&![Xt.ESC,Xt.SHIFT,Xt.BACKSPACE,Xt.TAB,Xt.WIN_KEY,Xt.ALT,Xt.META,Xt.WIN_KEY_RIGHT,Xt.CTRL,Xt.SEMICOLON,Xt.EQUALS,Xt.CAPS_LOCK,Xt.CONTEXT_MENU,Xt.UP,Xt.LEFT,Xt.RIGHT,Xt.F1,Xt.F2,Xt.F3,Xt.F4,Xt.F5,Xt.F6,Xt.F7,Xt.F8,Xt.F9,Xt.F10,Xt.F11,Xt.F12].includes(e)}function iM(){return iM=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{which:re}=le,ne=z.current instanceof HTMLTextAreaElement;if(!ne&&I&&(re===Xt.UP||re===Xt.DOWN)&&le.preventDefault(),R&&R(le),ne&&!I&&~[Xt.UP,Xt.DOWN,Xt.LEFT,Xt.RIGHT].indexOf(re))return;!(le.ctrlKey||le.altKey||le.metaKey)&&WOe(re)&&_(!0)});y.useImperativeHandle(r,()=>({focus:le=>{var re,ne;(ne=(re=z.current||N.current).focus)==null||ne.call(re,le)},blur:()=>{var le,re;(re=(le=z.current||N.current).blur)==null||re.call(le)},nativeElement:lc(N.current)}));const V=br(le=>{var re;if(!O){const ne=lc(z.current);le.nativeEvent._ori_target=ne;const se=ne===le.target||(ne==null?void 0:ne.contains(le.target));ne&&!se&&le.preventDefault();const ie=I&&!u&&(p==="combobox"||F)||I&&u&&se;le.nativeEvent._select_lazy?I&&_(!1):((re=z.current)==null||re.focus(),ie||_())}x==null||x(le)}),{root:G}=D,K=En(A,UOe),q=hi(K,{aria:!0}),Y=Object.keys(q),X={...t,onInputKeyDown:U};if(G){const le=G.props||{},re={...le,...K};return Object.keys(le).forEach(ne=>{const se=le[ne],de=K[ne];typeof se=="function"&&typeof de=="function"&&(re[ne]=(...te)=>{de(...te),se(...te)})}),y.isValidElement(G)?y.cloneElement(G,{...re,ref:zo(G.ref,N)}):y.createElement(G,iM({},re,{ref:N}))}return y.createElement(wle.Provider,{value:X},y.createElement("div",iM({},En(K,Y),{ref:N,className:i,style:o,onMouseDown:V}),y.createElement(k_,{className:ee(`${n}-prefix`,B==null?void 0:B.prefix),style:H==null?void 0:H.prefix},s),y.createElement(HOe,{ref:z}),y.createElement(k_,{className:ee(`${n}-suffix`,{[`${n}-suffix-loading`]:k},B==null?void 0:B.suffix),style:H==null?void 0:H.suffix},a),l&&y.createElement(k_,{className:ee(`${n}-clear`,B==null?void 0:B.clear),style:H==null?void 0:H.clear,onMouseDown:le=>{le.nativeEvent._select_lazy=!0,T==null||T(le)}},l),c))});function KOe(e,t,r){return y.useMemo(()=>{let{root:n,input:i}=e||{};return r&&(n=r()),t&&(i=t()),{root:n,input:i}},[e,t,r])}function XB(){return XB=Object.assign?Object.assign.bind():function(e){for(var t=1;te==="tags"||e==="multiple",qOe=y.forwardRef((e,t)=>{const{id:r,prefixCls:n,className:i,styles:o,classNames:s,showSearch:a,tagRender:l,showScrollBar:c="optional",direction:u,omitDomProps:d,displayValues:h,onDisplayValuesChange:p,emptyOptions:f,notFoundContent:g="Not Found",onClear:m,maxCount:v,placeholder:b,mode:S,disabled:x,loading:T,getInputElement:R,getRawInputElement:E,open:M,defaultOpen:D,onPopupVisibleChange:A,activeValue:I,onActiveValueChange:_,activeDescendantId:F,searchValue:O,autoClearSearchValue:k,onSearch:B,onSearchSplit:H,tokenSeparators:N,allowClear:z,prefix:U,suffix:V,suffixIcon:G,clearIcon:K,OptionList:q,animation:Y,transitionName:X,popupStyle:le,popupClassName:re,popupMatchSelectWidth:ne,popupRender:se,popupAlign:de,placement:te,builtinPlacements:ie,getPopupContainer:pe,showAction:Z=[],onFocus:ue,onBlur:ve,onKeyUp:he,onKeyDown:me,onMouseDown:Oe,components:Pe,...Me}=e,He=ZB(S),Ge=y.useRef(null),Ct=y.useRef(null),Ht=y.useRef(null),[St,Ye]=y.useState(!1);y.useImperativeHandle(t,()=>{var dt,mt;return{focus:(dt=Ge.current)==null?void 0:dt.focus,blur:(mt=Ge.current)==null?void 0:mt.blur,scrollTo:It=>{var Zt;return(Zt=Ht.current)==null?void 0:Zt.scrollTo(It)},nativeElement:lc(Ge.current)}});const Fe=KOe(Pe,R,E),et=y.useMemo(()=>{var mt;if(S!=="combobox")return O;const dt=(mt=h[0])==null?void 0:mt.value;return typeof dt=="string"||typeof dt=="number"?String(dt):""},[O,S,h]),Ne=S==="combobox"&&typeof R=="function"&&R()||null,tt=!g&&f,[nt,Ke,Ie,rt]=DOe(D||!1,M,A,dt=>x||tt?!1:dt),Tt=y.useMemo(()=>(N||[]).some(dt=>[` `,`\r `].includes(dt)),[N]),Rt=(dt,mt,It)=>{if(He&&UB(v)&&h.length>=v)return;let Zt=!0,Ft=dt;_==null||_(null);const cr=POe(dt,N,UB(v)?v-h.length:void 0),fr=It?null:cr;return S!=="combobox"&&fr&&(Ft="",H==null||H(fr),Ie(!1),Zt=!1),B&&et!==Ft&&B(Ft,{source:mt?"typing":"effect"}),dt&&mt&&Zt&&Ie(!0),Zt},Bt=dt=>{!dt||!dt.trim()||B(dt,{source:"submit"})};y.useEffect(()=>{!nt&&!He&&S!=="combobox"&&Rt("",!1,!1)},[nt]),y.useEffect(()=>{x&&(Ie(!1),Ye(!1))},[x,Ke]);const[Qt,ft]=SOe(),ut=y.useRef(!1),Yt=dt=>{var cr;const mt=Qt(),{key:It}=dt,Zt=It==="Enter",Ft=It===" ";if(Zt||Ft){const fr=S==="combobox";(Ft&&!(fr||a)||Zt&&!fr)&&dt.preventDefault(),Ke||Ie(!0)}if(ft(!!et),It==="Backspace"&&!mt&&He&&!et&&h.length){const fr=[...h];let rr=null;for(let mn=fr.length-1;mn>=0;mn-=1){const un=fr[mn];if(!un.disabled){fr.splice(mn,1),rr=un;break}}rr&&p(fr,{type:"remove",values:[rr]})}Ke&&(!Zt||!ut.current)&&!Ft&&(Zt&&(ut.current=!0),(cr=Ht.current)==null||cr.onKeyDown(dt)),me==null||me(dt)},hr=(dt,...mt)=>{var It;Ke&&((It=Ht.current)==null||It.onKeyUp(dt,...mt)),dt.key==="Enter"&&(ut.current=!1),he==null||he(dt,...mt)},Je=br(dt=>{const mt=h.filter(It=>It!==dt);p(mt,{type:"remove",values:[dt]})}),ot=()=>{ut.current=!1},De=()=>{var dt;return[lc(Ge.current),(dt=Ct.current)==null?void 0:dt.getPopupElement()]};wOe(De,Ke,Ie,!!Fe.root);const Pt=y.useRef(!1),Qe=dt=>{Ye(!0),x||(Z.includes("focus")&&Ie(!0),ue==null||ue(dt))},$e=()=>{Ke&&!Pt.current&&Ie(!1,{cancelFun:()=>ble(De(),document.activeElement)})},oe=dt=>{Ye(!1),et&&(S==="tags"?B(et,{source:"submit"}):S==="multiple"&&B("",{source:"blur"})),$e(),x||ve==null||ve(dt)},ce=(dt,...mt)=>{var Ft;const{target:It}=dt,Zt=(Ft=Ct.current)==null?void 0:Ft.getPopupElement();Zt!=null&&Zt.contains(It)&&Ie&&Ie(!0),Oe==null||Oe(dt,...mt),Pt.current=!0,h3(()=>{Pt.current=!1})},[,ge]=y.useState({});function Te(){ge({})}let ke;Fe.root&&(ke=dt=>{Ie(dt)});const Ze=y.useMemo(()=>({...e,notFoundContent:g,open:Ke,triggerOpen:Ke,rawOpen:nt,id:r,showSearch:a,multiple:He,toggleOpen:Ie,showScrollBar:c,styles:o,classNames:s,lockOptions:rt}),[e,g,Ie,r,a,He,Ke,nt,c,o,s,rt]),Dt=y.useMemo(()=>{const dt=V??G;return typeof dt=="function"?dt({searchValue:et,open:Ke,focused:St,showSearch:a,loading:T}):dt},[V,G,et,Ke,St,a,T]),st=()=>{var dt;m==null||m(),(dt=Ge.current)==null||dt.focus(),p([],{type:"clear",values:h}),Rt("",!1,!1)},{allowClear:it,clearIcon:bt}=bOe(n,h,z,K,x,et,S),Mt=y.createElement(q,{ref:Ht}),_t=ee(n,i,{[`${n}-focused`]:St,[`${n}-multiple`]:He,[`${n}-single`]:!He,[`${n}-allow-clear`]:it,[`${n}-show-arrow`]:Dt!=null,[`${n}-disabled`]:x,[`${n}-loading`]:T,[`${n}-open`]:Ke,[`${n}-customize-input`]:Ne,[`${n}-show-search`]:a});let At=y.createElement(jOe,XB({},Me,{ref:Ge,prefixCls:n,className:_t,focused:St,prefix:U,suffix:Dt,clearIcon:bt,multiple:He,mode:S,displayValues:h,placeholder:b,searchValue:et,activeValue:I,onSearch:Rt,onSearchSubmit:Bt,onInputBlur:ot,onFocus:Qe,onBlur:oe,onClearMouseDown:st,onKeyDown:Yt,onKeyUp:hr,onSelectorRemove:Je,tokenWithEnter:Tt,onMouseDown:ce,components:Fe}));return At=y.createElement(EOe,{ref:Ct,disabled:x,prefixCls:n,visible:Ke,popupElement:Mt,animation:Y,transitionName:X,popupStyle:le,popupClassName:re,direction:u,popupMatchSelectWidth:ne,popupRender:se,popupAlign:de,placement:te,builtinPlacements:ie,getPopupContainer:pe,empty:f,onPopupVisibleChange:ke,onPopupMouseEnter:Te,onPopupMouseDown:ce,onPopupBlur:$e},At),y.createElement(Cle.Provider,{value:Ze},y.createElement(MOe,{visible:St&&!Ke,values:h}),At)}),f3=()=>null;f3.isSelectOptGroup=!0;const g3=()=>null;g3.isSelectOption=!0;const Ile=y.forwardRef(({height:e,offsetY:t,offsetX:r,children:n,prefixCls:i,onInnerResize:o,innerProps:s,rtl:a,extra:l},c)=>{let u={},d={display:"flex",flexDirection:"column"};return t!==void 0&&(u={height:e,position:"relative",overflow:"hidden"},d={...d,transform:`translateY(${t}px)`,[a?"marginRight":"marginLeft"]:-r,position:"absolute",left:0,right:0,top:0}),y.createElement("div",{style:u},y.createElement(Js,{onResize:({offsetHeight:h})=>{h&&o&&o()}},y.createElement("div",ll({style:d,className:ee({[`${i}-holder-inner`]:i}),ref:c},s),n,l)))});Ile.displayName="Filler";function YOe({children:e,setRef:t}){const r=y.useCallback(n=>{t(n)},[]);return y.cloneElement(e,{ref:r})}function XOe(e,t,r,n,i,o,s,{getKey:a}){return e.slice(t,r+1).map((l,c)=>{const u=t+c,d=s(l,u,{style:{width:n},offsetX:i}),h=a(l);return y.createElement(YOe,{key:h,setRef:p=>o(l,p)},d)})}function ZOe(e,t,r){const n=e.length,i=t.length;let o,s;if(n===0&&i===0)return null;n{const a=ZOe(n||[],e||[],t);(a==null?void 0:a.index)!==void 0&&s(e[a.index]),i(e)},[e]),[o]}const bK=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),Dle=((e,t,r,n)=>{const i=y.useRef(!1),o=y.useRef(null);function s(){clearTimeout(o.current),i.current=!0,o.current=setTimeout(()=>{i.current=!1},50)}const a=y.useRef({top:e,bottom:t,left:r,right:n});return a.current.top=e,a.current.bottom=t,a.current.left=r,a.current.right=n,(l,c,u=!1)=>{const d=l?c<0&&a.current.left||c>0&&a.current.right:c<0&&a.current.top||c>0&&a.current.bottom;return u&&d?(clearTimeout(o.current),i.current=!1):(!d||i.current)&&s(),!i.current&&d}});function QOe(e,t,r,n,i,o,s){const a=y.useRef(0),l=y.useRef(null),c=y.useRef(null),u=y.useRef(!1),d=Dle(t,r,n,i);function h(b,S){if(Lr.cancel(l.current),d(!1,S))return;const x=b;if(!x._virtualHandled)x._virtualHandled=!0;else return;a.current+=S,c.current=S,bK||x.preventDefault(),l.current=Lr(()=>{const T=u.current?10:1;s(a.current*T,!1),a.current=0})}function p(b,S){s(S,!0),bK||b.preventDefault()}const f=y.useRef(null),g=y.useRef(null);function m(b){if(!e)return;Lr.cancel(g.current),g.current=Lr(()=>{f.current=null},2);const{deltaX:S,deltaY:x,shiftKey:T}=b;let R=S,E=x;(f.current==="sx"||!f.current&&T&&x&&!S)&&(R=x,E=0,f.current="sx");const M=Math.abs(R),D=Math.abs(E);f.current===null&&(f.current=o&&M>D?"x":"y"),f.current==="y"?h(b,E):p(b,R)}function v(b){e&&(u.current=b.detail===c.current)}return[m,v]}function eke(e,t,r,n){const[i,o]=y.useMemo(()=>[new Map,[]],[e,r.id,n]);return(a,l=a)=>{let c=i.get(a),u=i.get(l);if(c===void 0||u===void 0){const d=e.length;for(let h=o.length;h{let p=!1;o.current.forEach((f,g)=>{if(f&&f.offsetParent){const{offsetHeight:m}=f,{marginTop:v,marginBottom:b}=getComputedStyle(f),S=SK(v),x=SK(b),T=m+S+x;s.current.get(g)!==T&&(s.current.set(g,T),p=!0)}}),p&&i(f=>f+1)};if(d)h();else{a.current+=1;const p=a.current;Promise.resolve().then(()=>{p===a.current&&h()})}}function u(d,h){const p=e(d);o.current.get(p),h?(o.current.set(p,h),c()):o.current.delete(p)}return y.useEffect(()=>l,[]),[u,c,s.current,n]}const wK=14/15;function nke(e,t,r){const n=y.useRef(!1),i=y.useRef(0),o=y.useRef(0),s=y.useRef(null),a=y.useRef(null);let l;const c=h=>{if(n.current){const p=Math.ceil(h.touches[0].pageX),f=Math.ceil(h.touches[0].pageY);let g=i.current-p,m=o.current-f;const v=Math.abs(g)>Math.abs(m);v?i.current=p:o.current=f;const b=r(v,v?g:m,!1,h);b&&h.preventDefault(),clearInterval(a.current),b&&(a.current=setInterval(()=>{v?g*=wK:m*=wK;const S=Math.floor(v?g:m);(!r(v,S,!0)||Math.abs(S)<=.1)&&clearInterval(a.current)},16))}},u=()=>{n.current=!1,l()},d=h=>{l(),h.touches.length===1&&!n.current&&(n.current=!0,i.current=Math.ceil(h.touches[0].pageX),o.current=Math.ceil(h.touches[0].pageY),s.current=h.target,s.current.addEventListener("touchmove",c,{passive:!1}),s.current.addEventListener("touchend",u,{passive:!0}))};l=()=>{s.current&&(s.current.removeEventListener("touchmove",c),s.current.removeEventListener("touchend",u))},zr(()=>(e&&t.current.addEventListener("touchstart",d,{passive:!0}),()=>{var h;(h=t.current)==null||h.removeEventListener("touchstart",d),l(),clearInterval(a.current)}),[e])}function xK(e){return Math.floor(e**.5)}function JB(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function ike(e,t,r){y.useEffect(()=>{const n=t.current;if(e&&n){let i=!1,o,s;const a=()=>{Lr.cancel(o)},l=()=>{a(),o=Lr(()=>{r(s),l()})},c=()=>{i=!1,a()},u=h=>{if(h.target.draggable||h.button!==0)return;const p=h;p._virtualHandled||(p._virtualHandled=!0,i=!0)},d=h=>{if(i){const p=JB(h,!1),{top:f,bottom:g}=n.getBoundingClientRect();if(p<=f){const m=f-p;s=-xK(m),l()}else if(p>=g){const m=p-g;s=xK(m),l()}else a()}};return n.addEventListener("mousedown",u),n.ownerDocument.addEventListener("mouseup",c),n.ownerDocument.addEventListener("mousemove",d),n.ownerDocument.addEventListener("dragend",c),()=>{n.removeEventListener("mousedown",u),n.ownerDocument.removeEventListener("mouseup",c),n.ownerDocument.removeEventListener("mousemove",d),n.ownerDocument.removeEventListener("dragend",c),a()}}},[e])}const oke=10;function ske(e,t,r,n,i,o,s,a){const l=y.useRef(),[c,u]=y.useState(null);return zr(()=>{if(c&&c.times({...S}));return}o();const{targetAlign:d,originAlign:h,index:p,offset:f}=c,g=e.current.clientHeight;let m=!1,v=d,b=null;if(g){const S=d||h;let x=0,T=0,R=0;const E=Math.min(t.length-1,p);for(let D=0;D<=E;D+=1){const A=i(t[D]);T=x;const I=r.get(A);R=T+(I===void 0?n:I),x=R}let M=S==="top"?f:g-f;for(let D=E;D>=0;D-=1){const A=i(t[D]),I=r.get(A);if(I===void 0){m=!0;break}if(M-=I,M<=0)break}switch(S){case"top":b=T-f;break;case"bottom":b=R-g+f;break;default:{const{scrollTop:D}=e.current,A=D+g;TA&&(v="bottom")}}b!==null&&s(b),b!==c.lastTop&&(m=!0)}m&&u({...c,times:c.times+1,targetAlign:v,lastTop:b})}},[c,e.current]),d=>{if(d==null){a();return}if(Lr.cancel(l.current),typeof d=="number")s(d);else if(d&&typeof d=="object"){let h;const{align:p}=d;"index"in d?{index:h}=d:h=t.findIndex(g=>i(g)===d.key);const{offset:f=0}=d;u({times:0,index:h,offset:f,originAlign:p})}}}const TK=y.forwardRef((e,t)=>{const{prefixCls:r,rtl:n,scrollOffset:i,scrollRange:o,onStartMove:s,onStopMove:a,onScroll:l,horizontal:c,spinSize:u,containerSize:d,style:h,thumbStyle:p,showScrollBar:f}=e,[g,m]=y.useState(!1),[v,b]=y.useState(null),[S,x]=y.useState(null),T=!n,R=y.useRef(),E=y.useRef(),[M,D]=y.useState(f),A=y.useRef(),I=()=>{f===!0||f===!1||(clearTimeout(A.current),D(!0),A.current=setTimeout(()=>{D(!1)},3e3))},_=o-d||0,F=d-u||0,O=y.useMemo(()=>i===0||_===0?0:i/_*F,[i,_,F]),k=K=>{K.stopPropagation(),K.preventDefault()},B=y.useRef({top:O,dragging:g,pageY:v,startTop:S});B.current={top:O,dragging:g,pageY:v,startTop:S};const H=K=>{m(!0),b(JB(K,c)),x(B.current.top),s(),K.stopPropagation(),K.preventDefault()};y.useEffect(()=>{const K=X=>{X.preventDefault()},q=R.current,Y=E.current;return q.addEventListener("touchstart",K,{passive:!1}),Y.addEventListener("touchstart",H,{passive:!1}),()=>{q.removeEventListener("touchstart",K),Y.removeEventListener("touchstart",H)}},[]);const N=y.useRef();N.current=_;const z=y.useRef();z.current=F,y.useEffect(()=>{if(g){let K;const q=X=>{const{dragging:le,pageY:re,startTop:ne}=B.current;Lr.cancel(K);const se=R.current.getBoundingClientRect(),de=d/(c?se.width:se.height);if(le){const te=(JB(X,c)-re)*de;let ie=ne;!T&&c?ie-=te:ie+=te;const pe=N.current,Z=z.current,ue=Z?ie/Z:0;let ve=Math.ceil(ue*pe);ve=Math.max(ve,0),ve=Math.min(ve,pe),K=Lr(()=>{l(ve,c)})}},Y=()=>{m(!1),a()};return window.addEventListener("mousemove",q,{passive:!0}),window.addEventListener("touchmove",q,{passive:!0}),window.addEventListener("mouseup",Y,{passive:!0}),window.addEventListener("touchend",Y,{passive:!0}),()=>{window.removeEventListener("mousemove",q),window.removeEventListener("touchmove",q),window.removeEventListener("mouseup",Y),window.removeEventListener("touchend",Y),Lr.cancel(K)}}},[g]),y.useEffect(()=>(I(),()=>{clearTimeout(A.current)}),[i]),y.useImperativeHandle(t,()=>({delayHidden:I}));const U=`${r}-scrollbar`,V={position:"absolute",visibility:M?null:"hidden"},G={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return c?(Object.assign(V,{height:8,left:0,right:0,bottom:0}),Object.assign(G,{height:"100%",width:u,[T?"left":"right"]:O})):(Object.assign(V,{width:8,top:0,bottom:0,[T?"right":"left"]:0}),Object.assign(G,{width:"100%",height:u,top:O})),y.createElement("div",{ref:R,className:ee(U,{[`${U}-horizontal`]:c,[`${U}-vertical`]:!c,[`${U}-visible`]:M}),style:{...V,...h},onMouseDown:k,onMouseMove:I},y.createElement("div",{ref:E,className:ee(`${U}-thumb`,{[`${U}-thumb-moving`]:g}),style:{...G,...p},onMouseDown:H}))}),ake=20;function EK(e=0,t=0){let r=e/t*e;return isNaN(r)&&(r=0),r=Math.max(r,ake),Math.floor(r)}const lke=[],cke={overflowY:"auto",overflowAnchor:"none"};function uke(e,t){const{prefixCls:r="rc-virtual-list",className:n,height:i,itemHeight:o,fullHeight:s=!0,style:a,data:l,children:c,itemKey:u,virtual:d,direction:h,scrollWidth:p,component:f="div",onScroll:g,onVirtualScroll:m,onVisibleChange:v,innerProps:b,extraRender:S,styles:x,showScrollBar:T="optional",...R}=e,E=y.useCallback(Qe=>typeof u=="function"?u(Qe):Qe==null?void 0:Qe[u],[u]),[M,D,A,I]=rke(E),_=!!(d!==!1&&i&&o),F=y.useMemo(()=>Object.values(A.maps).reduce((Qe,$e)=>Qe+$e,0),[A.id,A.maps]),O=_&&l&&(Math.max(o*l.length,F)>i||!!p),k=h==="rtl",B=ee(r,{[`${r}-rtl`]:k},n),H=l||lke,N=y.useRef(),z=y.useRef(),U=y.useRef(),[V,G]=y.useState(0),[K,q]=y.useState(0),[Y,X]=y.useState(!1),le=()=>{X(!0)},re=()=>{X(!1)},ne={getKey:E};function se(Qe){G($e=>{let oe;typeof Qe=="function"?oe=Qe($e):oe=Qe;const ce=St(oe);return N.current.scrollTop=ce,ce})}const de=y.useRef({start:0,end:H.length}),te=y.useRef(),[ie]=JOe(H,E);te.current=ie;const{scrollHeight:pe,start:Z,end:ue,offset:ve}=y.useMemo(()=>{var Te;if(!_)return{scrollHeight:void 0,start:0,end:H.length-1,offset:void 0};if(!O)return{scrollHeight:((Te=z.current)==null?void 0:Te.offsetHeight)||0,start:0,end:H.length-1,offset:void 0};let Qe=0,$e,oe,ce;const ge=H.length;for(let ke=0;ke=V&&$e===void 0&&($e=ke,oe=Qe),it>V+i&&ce===void 0&&(ce=ke),Qe=it}return $e===void 0&&($e=0,oe=0,ce=Math.ceil(i/o)),ce===void 0&&(ce=H.length-1),ce=Math.min(ce+1,H.length-1),{scrollHeight:Qe,start:$e,end:ce,offset:oe}},[O,_,V,H,I,i]);de.current.start=Z,de.current.end=ue,y.useLayoutEffect(()=>{const Qe=A.getRecord();if(Qe.size===1){const $e=Array.from(Qe.keys())[0],oe=Qe.get($e),ce=H[Z];if(ce&&oe===void 0&&E(ce)===$e){const ke=A.get($e)-o;se(Ze=>Ze+ke)}}A.resetRecord()},[pe]);const[he,me]=y.useState({width:0,height:i}),Oe=Qe=>{me({width:Qe.offsetWidth,height:Qe.offsetHeight})},Pe=y.useRef(),Me=y.useRef(),He=y.useMemo(()=>EK(he.width,p),[he.width,p]),Ge=y.useMemo(()=>EK(he.height,pe),[he.height,pe]),Ct=pe-i,Ht=y.useRef(Ct);Ht.current=Ct;function St(Qe){let $e=Qe;return Number.isNaN(Ht.current)||($e=Math.min($e,Ht.current)),$e=Math.max($e,0),$e}const Ye=V<=0,Fe=V>=Ct,et=K<=0,Ne=K>=p,tt=Dle(Ye,Fe,et,Ne),nt=()=>({x:k?-K:K,y:V}),Ke=y.useRef(nt()),Ie=br(Qe=>{if(m){const $e={...nt(),...Qe};(Ke.current.x!==$e.x||Ke.current.y!==$e.y)&&(m($e),Ke.current=$e)}});function rt(Qe,$e){const oe=Qe;$e?(ac.flushSync(()=>{q(oe)}),Ie()):se(oe)}function Tt(Qe){const{scrollTop:$e}=Qe.currentTarget;$e!==V&&se($e),g==null||g(Qe),Ie()}const Rt=Qe=>{let $e=Qe;const oe=p?p-he.width:0;return $e=Math.max($e,0),$e=Math.min($e,oe),$e},Bt=br((Qe,$e)=>{$e?(ac.flushSync(()=>{q(oe=>{const ce=oe+(k?-Qe:Qe);return Rt(ce)})}),Ie()):se(oe=>oe+Qe)}),[Qt,ft]=QOe(_,Ye,Fe,et,Ne,!!p,Bt);nke(_,N,(Qe,$e,oe,ce)=>{const ge=ce;return tt(Qe,$e,oe)?!1:!ge||!ge._virtualHandled?(ge&&(ge._virtualHandled=!0),Qt({preventDefault(){},deltaX:Qe?$e:0,deltaY:Qe?0:$e}),!0):!1}),ike(O,N,Qe=>{se($e=>$e+Qe)}),zr(()=>{function Qe(oe){const ce=Ye&&oe.detail<0,ge=Fe&&oe.detail>0;_&&!ce&&!ge&&oe.preventDefault()}const $e=N.current;return $e.addEventListener("wheel",Qt,{passive:!1}),$e.addEventListener("DOMMouseScroll",ft,{passive:!0}),$e.addEventListener("MozMousePixelScroll",Qe,{passive:!1}),()=>{$e.removeEventListener("wheel",Qt),$e.removeEventListener("DOMMouseScroll",ft),$e.removeEventListener("MozMousePixelScroll",Qe)}},[_,Ye,Fe]),zr(()=>{if(p){const Qe=Rt(K);q(Qe),Ie({x:Qe})}},[he.width,p]);const ut=()=>{var Qe,$e;(Qe=Pe.current)==null||Qe.delayHidden(),($e=Me.current)==null||$e.delayHidden()},Yt=ske(N,H,A,o,E,()=>D(!0),se,ut);y.useImperativeHandle(t,()=>({nativeElement:U.current,getScrollInfo:nt,scrollTo:Qe=>{function $e(oe){return oe&&typeof oe=="object"&&("left"in oe||"top"in oe)}$e(Qe)?(Qe.left!==void 0&&q(Rt(Qe.left)),Yt(Qe.top)):Yt(Qe)}})),zr(()=>{if(v){const Qe=H.slice(Z,ue+1);v(Qe,H)}},[Z,ue,H]);const hr=eke(H,E,A,o),Je=S==null?void 0:S({start:Z,end:ue,virtual:O,offsetX:K,offsetY:ve,rtl:k,getSize:hr}),ot=XOe(H,Z,ue,p,K,M,c,ne);let De=null;i&&(De={[s?"height":"maxHeight"]:i,...cke},_&&(De.overflowY="hidden",p&&(De.overflowX="hidden"),Y&&(De.pointerEvents="none")));const Pt={};return k&&(Pt.dir="rtl"),y.createElement("div",ll({ref:U,style:{...a,position:"relative"},className:B},Pt,R),y.createElement(Js,{onResize:Oe},y.createElement(f,{className:`${r}-holder`,style:De,ref:N,onScroll:Tt,onMouseEnter:ut},y.createElement(Ile,{prefixCls:r,height:pe,offsetX:K,offsetY:ve,scrollWidth:p,onInnerResize:D,ref:z,innerProps:b,rtl:k,extra:Je},ot))),O&&pe>i&&y.createElement(TK,{ref:Pe,prefixCls:r,scrollOffset:V,scrollRange:pe,rtl:k,onScroll:rt,onStartMove:le,onStopMove:re,spinSize:Ge,containerSize:he.height,style:x==null?void 0:x.verticalScrollBar,thumbStyle:x==null?void 0:x.verticalScrollBarThumb,showScrollBar:T}),O&&p>he.width&&y.createElement(TK,{ref:Me,prefixCls:r,scrollOffset:K,scrollRange:p,rtl:k,onScroll:rt,onStartMove:le,onStopMove:re,spinSize:He,containerSize:he.width,horizontal:!0,style:x==null?void 0:x.horizontalScrollBar,thumbStyle:x==null?void 0:x.horizontalScrollBarThumb,showScrollBar:T}))}const LD=y.forwardRef(uke);LD.displayName="List";function dke(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}function bw(){return bw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var se,de;const{prefixCls:r,id:n,open:i,multiple:o,mode:s,searchValue:a,toggleOpen:l,notFoundContent:c,onPopupScroll:u,showScrollBar:d,lockOptions:h}=wm(),{maxCount:p,flattenOptions:f,onActiveValue:g,defaultActiveFirstOption:m,onSelect:v,menuItemSelectedIcon:b,rawValues:S,fieldNames:x,virtual:T,direction:R,listHeight:E,listItemHeight:M,optionRender:D,classNames:A,styles:I}=y.useContext(p3),_=`${r}-item`,F=bm(()=>f,[i,h],(te,ie)=>ie[0]&&!ie[1]),O=y.useRef(null),k=y.useMemo(()=>o&&UB(p)&&(S==null?void 0:S.size)>=p,[o,p,S==null?void 0:S.size]),B=te=>{te.preventDefault()},H=te=>{var ie;(ie=O.current)==null||ie.scrollTo(typeof te=="number"?{index:te}:te)},N=y.useCallback(te=>s==="combobox"?!1:S.has(te),[s,[...S].toString(),S.size]),z=(te,ie=1)=>{const pe=F.length;for(let Z=0;Zz(0)),G=(te,ie=!1)=>{V(te);const pe={source:ie?"keyboard":"mouse"},Z=F[te];if(!Z){g(null,-1,pe);return}g(Z.value,te,pe)};y.useEffect(()=>{G(m!==!1?z(0):-1)},[F.length,a]);const K=y.useCallback(te=>s==="combobox"?String(te).toLowerCase()===a.toLowerCase():S.has(te),[s,a,[...S].toString(),S.size]);y.useEffect(()=>{var ie;let te;if(!o&&i&&S.size===1){const pe=Array.from(S)[0],Z=F.findIndex(({data:ue})=>a?String(ue.value).startsWith(a):ue.value===pe);Z!==-1&&(G(Z),te=setTimeout(()=>{H(Z)}))}return i&&((ie=O.current)==null||ie.scrollTo(void 0)),()=>clearTimeout(te)},[i,a]);const q=te=>{te!==void 0&&v(te,{selected:!S.has(te)}),o||l(!1)};if(y.useImperativeHandle(t,()=>({onKeyDown:te=>{const{which:ie,ctrlKey:pe}=te;switch(ie){case Xt.N:case Xt.P:case Xt.UP:case Xt.DOWN:{let Z=0;if(ie===Xt.UP?Z=-1:ie===Xt.DOWN?Z=1:dke()&&pe&&(ie===Xt.N?Z=1:ie===Xt.P&&(Z=-1)),Z!==0){const ue=z(U+Z,Z);H(ue),G(ue,!0)}break}case Xt.TAB:case Xt.ENTER:{const Z=F[U];if(!Z||Z.data.disabled)return q(void 0);!k||S.has(Z.value)?q(Z.value):q(void 0),i&&te.preventDefault();break}case Xt.ESC:l(!1),i&&te.stopPropagation()}},onKeyUp:()=>{},scrollTo:te=>{H(te)}})),F.length===0)return y.createElement("div",{role:"listbox",id:`${n}_list`,className:`${_}-empty`,onMouseDown:B},c);const Y=Object.keys(x).map(te=>x[te]),X=te=>te.label;function le(te,ie){const{group:pe}=te;return{role:pe?"presentation":"option",id:`${n}_list_${ie}`}}const re=te=>{const ie=F[te];if(!ie)return null;const pe=ie.data||{},{value:Z,disabled:ue}=pe,{group:ve}=ie,he=hi(pe,!0),me=X(ie);return ie?y.createElement("div",bw({"aria-label":typeof me=="string"&&!ve?me:null},he,{key:te},le(ie,te),{"aria-selected":K(Z),"aria-disabled":ue}),Z):null},ne={role:"listbox",id:`${n}_list`};return y.createElement(y.Fragment,null,T&&y.createElement("div",bw({},ne,{style:{height:0,width:0,overflow:"hidden"}}),re(U-1),re(U),re(U+1)),y.createElement(LD,{itemKey:"key",ref:O,data:F,height:E,itemHeight:M,fullHeight:!1,onMouseDown:B,onScroll:u,virtual:T,direction:R,innerProps:T?null:ne,showScrollBar:d,className:(se=A==null?void 0:A.popup)==null?void 0:se.list,style:(de=I==null?void 0:I.popup)==null?void 0:de.list},(te,ie)=>{var Ie,rt;const{group:pe,groupOption:Z,data:ue,label:ve,value:he}=te,{key:me}=ue;if(pe){const Tt=ue.title??(RK(ve)?ve.toString():void 0);return y.createElement("div",{className:ee(_,`${_}-group`,ue.className),title:Tt},ve!==void 0?ve:me)}const{disabled:Oe,title:Pe,children:Me,style:He,className:Ge,...Ct}=ue,Ht=En(Ct,Y),St=N(he),Ye=Oe||!St&&k,Fe=`${_}-option`,et=ee(_,Fe,Ge,(Ie=A==null?void 0:A.popup)==null?void 0:Ie.listItem,{[`${Fe}-grouped`]:Z,[`${Fe}-active`]:U===ie&&!Ye,[`${Fe}-disabled`]:Ye,[`${Fe}-selected`]:St}),Ne=X(te),tt=!b||typeof b=="function"||St,nt=typeof Ne=="number"?Ne:Ne||he;let Ke=RK(nt)?nt.toString():void 0;return Pe!==void 0&&(Ke=Pe),y.createElement("div",bw({},hi(Ht),T?{}:le(te,ie),{"aria-selected":T?void 0:K(he),"aria-disabled":Ye,className:et,title:Ke,onMouseMove:()=>{U===ie||Ye||G(ie)},onClick:()=>{Ye||q(he)},style:{...(rt=I==null?void 0:I.popup)==null?void 0:rt.listItem,...He}}),y.createElement("div",{className:`${Fe}-content`},typeof D=="function"?D(te,{index:ie}):nt),y.isValidElement(b)||St,tt&&y.createElement(Mle,{className:`${_}-option-state`,customizeIcon:b,customizeIconProps:{value:he,disabled:Ye,isSelected:St}},St?"✓":null))}))},pke=y.forwardRef(hke),fke=((e,t)=>{const r=y.useRef({values:new Map,options:new Map}),n=y.useMemo(()=>{const{values:o,options:s}=r.current,a=e.map(u=>{var d;return u.label===void 0?{...u,label:(d=o.get(u.value))==null?void 0:d.label}:u}),l=new Map,c=new Map;return a.forEach(u=>{l.set(u.value,u),c.set(u.value,t.get(u.value)||s.get(u.value))}),r.current.values=l,r.current.options=c,a},[e,t]),i=y.useCallback(o=>t.get(o)||r.current.options.get(o),[t]);return[n,i]});function N_(e,t){return Ele(e).join("").toUpperCase().includes(t)}const gke=((e,t,r,n,i)=>y.useMemo(()=>{if(!r||n===!1)return e;const{options:o,label:s,value:a}=t,l=[],c=typeof n=="function",u=r.toUpperCase(),d=c?n:(p,f)=>i&&i.length?i.some(g=>N_(f[g],u)):f[o]?N_(f[s!=="children"?s:"label"],u):N_(f[a],u),h=c?p=>jB(p):p=>p;return e.forEach(p=>{if(p[o]){if(d(r,h(p)))l.push(p);else{const g=p[o].filter(m=>d(r,h(m)));g.length&&l.push({...p,[o]:g})}return}d(r,h(p))&&l.push(p)}),l},[e,n,i,r,t]));function mke(e){const{key:t,props:{children:r,value:n,...i}}=e;return{key:t,value:n!==void 0?n:t,children:r,...i}}function Ale(e,t=!1){return Di(e).map((r,n)=>{if(!y.isValidElement(r)||!r.type)return null;const{type:{isSelectOptGroup:i},key:o,props:{children:s,...a}}=r;return t||!i?mke(r):{key:`__RC_SELECT_GRP__${o===null?n:o}__`,label:o,...a,options:Ale(s)}}).filter(r=>r)}const vke=(e,t,r,n,i)=>y.useMemo(()=>{let o=e;!e&&(o=Ale(t));const a=new Map,l=new Map,c=(d,h,p)=>{p&&typeof p=="string"&&d.set(h[p],h)},u=(d,h=!1)=>{for(let p=0;p{c(l,f,g)}),c(l,f,i)):u(f[r.options],!0)}};return u(o),{options:o,valueOptions:a,labelOptions:l}},[e,t,r,n,i]);function PK(e){const t=y.useRef();return t.current=e,y.useCallback((...n)=>t.current(...n),[])}function yke(e,t,r){const{filterOption:n,searchValue:i,optionFilterProp:o,filterSort:s,onSearch:a,autoClearSearchValue:l}=t;return y.useMemo(()=>{const c=typeof e=="object",u={filterOption:n,searchValue:i,optionFilterProp:o,filterSort:s,onSearch:a,autoClearSearchValue:l,...c?e:{}};return[c||r==="combobox"||r==="tags"||r==="multiple"&&e===void 0?!0:e,u]},[r,e,n,i,o,s,a,l])}function QB(){return QB=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{id:r,mode:n,prefixCls:i="rc-select",backfill:o,fieldNames:s,showSearch:a,searchValue:l,onSearch:c,autoClearSearchValue:u,filterOption:d,optionFilterProp:h,filterSort:p,onSelect:f,onDeselect:g,onActive:m,popupMatchSelectWidth:v=!0,optionLabelProp:b,options:S,optionRender:x,children:T,defaultActiveFirstOption:R,menuItemSelectedIcon:E,virtual:M,direction:D,listHeight:A=200,listItemHeight:I=20,labelRender:_,value:F,defaultValue:O,labelInValue:k,onChange:B,maxCount:H,classNames:N,styles:z,...U}=e,V={searchValue:l,onSearch:c,autoClearSearchValue:u,filterOption:d,optionFilterProp:h,filterSort:p},[G,K]=yke(a,V,n),{filterOption:q,searchValue:Y,optionFilterProp:X,filterSort:le,onSearch:re,autoClearSearchValue:ne=!0}=K,se=y.useMemo(()=>X?Array.isArray(X)?X:[X]:[],[X]),de=Tu(r),te=ZB(n),ie=!!(!S&&T),pe=y.useMemo(()=>q===void 0&&n==="combobox"?!1:q,[q,n]),Z=y.useMemo(()=>Sle(s,ie),[JSON.stringify(s),ie]),[ue,ve]=Fn("",Y),he=ue||"",me=vke(S,T,Z,se,b),{valueOptions:Oe,labelOptions:Pe,options:Me}=me,He=y.useCallback(ce=>Ele(ce).map(Te=>{let ke,Ze,Dt,st;bke(Te)?ke=Te:(Ze=Te.label,ke=Te.value);const it=Oe.get(ke);return it&&(Ze===void 0&&(Ze=it==null?void 0:it[b||Z.label]),Dt=it==null?void 0:it.disabled,st=it==null?void 0:it.title),{label:Ze,value:ke,key:ke,disabled:Dt,title:st}}),[Z,b,Oe]),[Ge,Ct]=Fn(O,F),Ht=y.useMemo(()=>{var Te;const ge=He(te&&Ge===null?[]:Ge);return n==="combobox"&&FOe((Te=ge[0])==null?void 0:Te.value)?[]:ge},[Ge,He,n,te]),[St,Ye]=fke(Ht,Oe),Fe=y.useMemo(()=>{if(!n&&St.length===1){const ce=St[0];if(ce.value===null&&(ce.label===null||ce.label===void 0))return[]}return St.map(ce=>({...ce,label:(typeof _=="function"?_(ce):ce.label)??ce.value}))},[n,St,_]),et=y.useMemo(()=>new Set(St.map(ce=>ce.value)),[St]);y.useEffect(()=>{var ce;if(n==="combobox"){const ge=(ce=St[0])==null?void 0:ce.value;ve(AOe(ge)?String(ge):"")}},[St]);const Ne=PK((ce,ge)=>{const Te=ge??ce;return{[Z.value]:ce,[Z.label]:Te}}),tt=y.useMemo(()=>{if(n!=="tags")return Me;const ce=[...Me],ge=Te=>Oe.has(Te);return[...St].sort((Te,ke)=>Te.value{const ke=Te.value;ge(ke)||ce.push(Ne(ke,Te.label))}),ce},[Ne,Me,Oe,St,n]),nt=gke(tt,Z,he,pe,se),Ke=y.useMemo(()=>{const ce=ge=>se.length?se.some(Te=>(ge==null?void 0:ge[Te])===he):(ge==null?void 0:ge.value)===he;return n!=="tags"||!he||nt.some(ge=>ce(ge))||nt.some(ge=>ge[Z.value]===he)?nt:[Ne(he),...nt]},[Ne,se,n,nt,he,Z]),Ie=ce=>[...ce].sort((Te,ke)=>le(Te,ke,{searchValue:he})).map(Te=>Array.isArray(Te.options)?{...Te,options:Te.options.length>0?Ie(Te.options):Te.options}:Te),rt=y.useMemo(()=>le?Ie(Ke):Ke,[Ke,le,he]),Tt=y.useMemo(()=>ROe(rt,{fieldNames:Z,childrenAsData:ie}),[rt,Z,ie]),Rt=ce=>{const ge=He(ce);if(Ct(ge),B&&(ge.length!==St.length||ge.some((Te,ke)=>{var Ze;return((Ze=St[ke])==null?void 0:Ze.value)!==(Te==null?void 0:Te.value)}))){const Te=k?ge.map(({label:Ze,value:Dt})=>({label:Ze,value:Dt})):ge.map(Ze=>Ze.value),ke=ge.map(Ze=>jB(Ye(Ze.value)));B(te?Te:Te[0],te?ke:ke[0])}},[Bt,Qt]=y.useState(null),[ft,ut]=y.useState(0),Yt=R!==void 0?R:n!=="combobox",hr=y.useRef(),Je=y.useCallback((ce,ge,{source:Te="keyboard"}={})=>{ut(ge),o&&n==="combobox"&&ce!==null&&Te==="keyboard"&&Qt(String(ce));const ke=Promise.resolve().then(()=>{hr.current===ke&&(m==null||m(ce))});hr.current=ke},[o,n,m]),ot=(ce,ge,Te)=>{const ke=()=>{const Ze=Ye(ce);return[k?{label:Ze==null?void 0:Ze[Z.label],value:ce}:ce,jB(Ze)]};if(ge&&f){const[Ze,Dt]=ke();f(Ze,Dt)}else if(!ge&&g&&Te!=="clear"){const[Ze,Dt]=ke();g(Ze,Dt)}},De=PK((ce,ge)=>{let Te;const ke=te?ge.selected:!0;ke?Te=te?[...St,ce]:[ce]:Te=St.filter(Ze=>Ze.value!==ce),Rt(Te),ot(ce,ke),n==="combobox"?Qt(""):(!ZB||ne)&&(ve(""),Qt(""))}),Pt=(ce,ge)=>{Rt(ce);const{type:Te,values:ke}=ge;(Te==="remove"||Te==="clear")&&ke.forEach(Ze=>{ot(Ze.value,!1,Te)})},Qe=(ce,ge)=>{if(ve(ce),Qt(null),ge.source==="submit"){const Te=(ce||"").trim();if(Te){const ke=Array.from(new Set([...et,Te]));Rt(ke),ot(Te,!0),ve("")}return}ge.source!=="blur"&&(n==="combobox"&&Rt(ce),re==null||re(ce))},$e=ce=>{let ge=ce;n!=="tags"&&(ge=ce.map(ke=>{const Ze=Pe.get(ke);return Ze==null?void 0:Ze.value}).filter(ke=>ke!==void 0));const Te=Array.from(new Set([...et,...ge]));Rt(Te),Te.forEach(ke=>{ot(ke,!0)})},oe=y.useMemo(()=>({...me,flattenOptions:Tt,onActiveValue:Je,defaultActiveFirstOption:Yt,onSelect:De,menuItemSelectedIcon:E,rawValues:et,fieldNames:Z,virtual:M!==!1&&v!==!1,direction:D,listHeight:A,listItemHeight:I,childrenAsData:ie,maxCount:H,optionRender:x,classNames:N,styles:z}),[H,me,Tt,Je,Yt,De,E,et,Z,M,v,D,A,I,ie,x,N,z]);return y.createElement(p3.Provider,{value:oe},y.createElement(qOe,QB({},U,{id:de,prefixCls:i,ref:t,omitDomProps:Cke,mode:n,classNames:N,styles:z,displayValues:Fe,onDisplayValuesChange:Pt,maxCount:H,direction:D,showSearch:G,searchValue:he,onSearch:Qe,autoClearSearchValue:ne,onSearchSplit:$e,popupMatchSelectWidth:v,OptionList:pke,emptyOptions:!Tt.length,activeValue:Bt,activeDescendantId:`${de}_list_${ft}`})))}),m3=Ske;m3.Option=g3;m3.OptGroup=f3;const Oy=(e,t,r)=>ee({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:r}),_x=(e,t)=>t||e,wke=()=>{const[,e]=ds(),[t]=Cc("Empty"),n=new an(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return y.createElement("svg",{style:n,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},y.createElement("title",null,(t==null?void 0:t.description)||"Empty"),y.createElement("g",{fill:"none",fillRule:"evenodd"},y.createElement("g",{transform:"translate(24 31.7)"},y.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.8",cy:"106.9",rx:"67.8",ry:"12.7"}),y.createElement("path",{fill:"#aeb8c2",d:"M122 69.7 98.1 40.2a6 6 0 0 0-4.6-2.2H42.1a6 6 0 0 0-4.6 2.2l-24 29.5V85H122z"}),y.createElement("path",{fill:"#f5f5f7",d:"M33.8 0h68a4 4 0 0 1 4 4v93.3a4 4 0 0 1-4 4h-68a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4"}),y.createElement("path",{fill:"#dce0e6",d:"M42.7 10h50.2a2 2 0 0 1 2 2v25a2 2 0 0 1-2 2H42.7a2 2 0 0 1-2-2V12a2 2 0 0 1 2-2m.2 39.8h49.8a2.3 2.3 0 1 1 0 4.5H42.9a2.3 2.3 0 0 1 0-4.5m0 11.7h49.8a2.3 2.3 0 1 1 0 4.6H42.9a2.3 2.3 0 0 1 0-4.6m79 43.5a7 7 0 0 1-6.8 5.4H20.5a7 7 0 0 1-6.7-5.4l-.2-1.8V69.7h26.3c2.9 0 5.2 2.4 5.2 5.4s2.4 5.4 5.3 5.4h34.8c2.9 0 5.3-2.4 5.3-5.4s2.3-5.4 5.2-5.4H122v33.5q0 1-.2 1.8"})),y.createElement("path",{fill:"#dce0e6",d:"m149.1 33.3-6.8 2.6a1 1 0 0 1-1.3-1.2l2-6.2q-4.1-4.5-4.2-10.4c0-10 10.1-18.1 22.6-18.1S184 8.1 184 18.1s-10.1 18-22.6 18q-6.8 0-12.3-2.8"}),y.createElement("g",{fill:"#fff",transform:"translate(149.7 15.4)"},y.createElement("circle",{cx:"20.7",cy:"3.2",r:"2.8"}),y.createElement("path",{d:"M5.7 5.6H0L2.9.7zM9.3.7h5v5h-5z"}))))},xke=()=>{const[,e]=ds(),[t]=Cc("Empty"),{colorFill:r,colorFillTertiary:n,colorFillQuaternary:i,colorBgContainer:o}=e,{borderColor:s,shadowColor:a,contentColor:l}=y.useMemo(()=>({borderColor:new an(r).onBackground(o).toHexString(),shadowColor:new an(n).onBackground(o).toHexString(),contentColor:new an(i).onBackground(o).toHexString()}),[r,n,i,o]);return y.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},y.createElement("title",null,(t==null?void 0:t.description)||"Empty"),y.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},y.createElement("ellipse",{fill:a,cx:"32",cy:"33",rx:"32",ry:"7"}),y.createElement("g",{fillRule:"nonzero",stroke:s},y.createElement("path",{d:"M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"}),y.createElement("path",{d:"M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3",fill:l}))))},Tke=e=>{const{componentCls:t,margin:r,marginXS:n,marginXL:i,fontSize:o,lineHeight:s}=e;return{[t]:{marginInline:n,fontSize:o,lineHeight:s,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}}}}},Eke=Yr("Empty",e=>{const{componentCls:t,controlHeightLG:r,calc:n}=e,i=Wr(e,{emptyImgCls:`${t}-img`,emptyImgHeight:n(r).mul(2.5).equal(),emptyImgHeightMD:r,emptyImgHeightSM:n(r).mul(.875).equal()});return Tke(i)}),Fle=y.createElement(wke,null),Lle=y.createElement(xke,null),nd=e=>{const{className:t,rootClassName:r,prefixCls:n,image:i,description:o,children:s,imageStyle:a,style:l,classNames:c,styles:u,...d}=e,{getPrefixCls:h,direction:p,className:f,style:g,classNames:m,styles:v,image:b}=Ur("empty"),S=h("empty",n),[x,T]=Eke(S),[R,E]=jr([m,c],[v,u],{props:e}),[M]=Cc("Empty"),D=typeof o<"u"?o:M==null?void 0:M.description,A=typeof D=="string"?D:"empty",I=i??b??Fle;let _=null;return typeof I=="string"?_=y.createElement("img",{draggable:!1,alt:A,src:I}):_=I,y.createElement("div",{className:ee(x,T,S,f,{[`${S}-normal`]:I===Lle,[`${S}-rtl`]:p==="rtl"},t,r,R.root),style:{...E.root,...g,...l},...d},y.createElement("div",{className:ee(`${S}-image`,R.image),style:{...a,...E.image}},_),D&&y.createElement("div",{className:ee(`${S}-description`,R.description),style:E.description},D),s&&y.createElement("div",{className:ee(`${S}-footer`,R.footer),style:E.footer},s))};nd.PRESENTED_IMAGE_DEFAULT=Fle;nd.PRESENTED_IMAGE_SIMPLE=Lle;const v3=e=>{const{componentName:t}=e,{getPrefixCls:r}=y.useContext(or),n=r("empty");switch(t){case"Table":case"List":return Q.createElement(nd,{image:nd.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return Q.createElement(nd,{image:nd.PRESENTED_IMAGE_SIMPLE,className:`${n}-small`});case"Table.filter":return null;default:return Q.createElement(nd,null)}},Ox=(e,t,r)=>{const{variant:n,[e]:i}=y.useContext(or),o=y.useContext(D_e),s=i==null?void 0:i.variant;let a;typeof t<"u"?a=t:r===!1?a="borderless":a=o??s??n??"outlined";const l=SMe.includes(a);return[a,l]},Rke=e=>{const r={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:{...r,points:["tl","bl"],offset:[0,4]},bottomRight:{...r,points:["tr","br"],offset:[0,4]},topLeft:{...r,points:["bl","tl"],offset:[0,-4]},topRight:{...r,points:["br","tr"],offset:[0,-4]}}};function Pke(e,t){return e||Rke(t)}const MK=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"}},Mke=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`,s=`&${t}-slide-up-leave${t}-slide-up-leave-active`,a=`${r}-dropdown-placement-`,l=`${n}-option-selected`;return[{[`${r}-dropdown`]:{...cn(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,[` ${i}${a}bottomLeft, ${o}${a}bottomLeft `]:{animationName:e3},[` ${i}${a}topLeft, ${o}${a}topLeft, ${i}${a}topRight, ${o}${a}topRight `]:{animationName:r3},[`${s}${a}bottomLeft`]:{animationName:t3},[` ${s}${a}topLeft, ${s}${a}topRight `]:{animationName:n3},"&-hidden":{display:"none"},[n]:{...MK(e),cursor:"pointer",transition:`background-color ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":{flex:"auto",...La},"&-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":{...MK(e),color:e.colorTextDisabled}},[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}}},bp(e,"slide-up"),bp(e,"slide-down"),JP(e,"move-up"),JP(e,"move-down")]},Ike=e=>{const{componentCls:t}=e;return{[`&${t}-customize`]:{border:0,padding:0,fontSize:"inherit",lineHeight:"inherit",[`${t}-placeholder`]:{display:"none"},[`${t}-content`]:{margin:0,padding:0,"&-value":{display:"none"}}}}},IK=4,Dke=e=>{const{componentCls:t,calc:r,iconCls:n,paddingXS:i,paddingXXS:o,INTERNAL_FIXED_ITEM_MARGIN:s,lineWidth:a,colorIcon:l,colorIconHover:c,inputPaddingHorizontalBase:u,antCls:d}=e,[h,p]=Jn(d,"select");return{"&-multiple":{[h("multi-item-background")]:e.multipleItemBg,[h("multi-item-border-color")]:"transparent",[h("multi-item-border-radius")]:e.borderRadiusSM,[h("multi-item-height")]:e.multipleItemHeight,[h("multi-padding-base")]:`calc((${p("height")} - ${p("multi-item-height")}) / 2)`,[h("multi-padding-vertical")]:`calc(${p("multi-padding-base")} - ${s} - ${a})`,[h("multi-item-padding-horizontal")]:`calc(${u} - ${p("multi-padding-vertical")} - ${a} * 2)`,paddingBlock:p("multi-padding-vertical"),paddingInlineStart:`calc(${p("multi-padding-base")} - ${a})`,[`${t}-prefix`]:{marginInlineStart:p("multi-item-padding-horizontal")},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:"absolute",lineHeight:p("line-height"),insetInlineStart:p("multi-item-padding-horizontal"),width:`calc(100% - ${p("multi-item-padding-horizontal")})`,top:"50%",transform:"translateY(-50%)"},[`${t}-content`]:{flexWrap:"wrap",alignItems:"center",lineHeight:1,"&-item-prefix":{height:p("font-size")},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${IK}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix, ${t}-content-item-suffix:first-child`]:{marginInlineStart:p("multi-item-padding-horizontal")},[`${t}-selection-item`]:{lineHeight:`calc(${p("multi-item-height")} - ${a} * 2)`,border:`${a} solid ${p("multi-item-border-color")}`,display:"flex",marginBlock:s,marginInlineEnd:r(s).mul(2).equal(),background:p("multi-item-background"),borderRadius:p("multi-item-border-radius"),paddingInlineStart:i,paddingInlineEnd:o,transition:["height","line-height","padding"].map(f=>`${f} ${e.motionDurationSlow}`).join(","),"&-content":{...La,marginInlineEnd:o},"&-remove":{...vx(),display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}}},[`${t}-input`]:{lineHeight:r(s).mul(2).add(p("multi-item-height")).equal(),width:"calc(var(--select-input-width, 0) * 1px)",minWidth:IK,maxWidth:"100%",transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{[h("multi-item-height")]:e.multipleItemHeightSM,[h("multi-item-border-radius")]:e.borderRadiusXS},[`&${t}-lg`]:{[h("multi-item-height")]:e.multipleItemHeightLG,[h("multi-item-border-radius")]:e.borderRadius},[`&${t}-filled`]:{[h("multi-item-border-color")]:e.colorSplit,[h("multi-item-background")]:e.colorBgContainer,[`&${t}-disabled`]:{[h("multi-item-border-color")]:"transparent"}}}}},B_=(e,t)=>{const{componentCls:r,antCls:n}=e,[i]=Jn(n,"select"),{border:o,borderHover:s,borderActive:a,borderOutline:l}=t,c=t.background||e.selectorBg||e.colorBgContainer;return{[i("border-color")]:o,[i("background-color")]:c,[i("color")]:t.color||e.colorText,[`&:not(${r}-disabled)`]:{"&:hover":{[i("border-color")]:s,[i("background-color")]:t.backgroundHover||c},[`&${r}-focused`]:{[i("border-color")]:a,[i("background-color")]:t.backgroundActive||c,boxShadow:`0 0 0 ${ae(e.controlOutlineWidth)} ${l}`}},[`&${r}-disabled`]:{[i("border-color")]:t.borderDisabled||t.border,[i("background-color")]:t.backgroundDisabled||t.background}}},XT=(e,t,r,n={},i={},o)=>{const{componentCls:s}=e;return{[`&${s}-${t}`]:[B_(e,r),{[`&${s}-status-error`]:B_(e,{...r,color:n.color||e.colorError,...n}),[`&${s}-status-warning`]:B_(e,{...r,color:i.color||e.colorWarning,...i})},o]}},Ake=e=>{const{componentCls:t,fontHeight:r,controlHeight:n,iconCls:i,antCls:o,calc:s}=e,[a,l]=Jn(o,"select");return{[t]:[{[a("border-radius")]:e.borderRadius,[a("border-color")]:"#000",[a("border-size")]:e.lineWidth,[a("background-color")]:e.colorBgContainer,[a("font-size")]:e.fontSize,[a("line-height")]:e.lineHeight,[a("font-height")]:r,[a("color")]:e.colorText,[a("height")]:n,[a("padding-horizontal")]:s(e.paddingSM).sub(e.lineWidth).equal(),[a("padding-vertical")]:`calc((${l("height")} - ${l("font-height")}) / 2 - ${l("border-size")})`,...cn(e,!0),display:"inline-flex",flexWrap:"nowrap",position:"relative",transition:`all ${e.motionDurationSlow}`,alignItems:"flex-start",outline:0,cursor:"pointer",borderRadius:l("border-radius"),borderWidth:l("border-size"),borderStyle:e.lineType,borderColor:l("border-color"),background:l("background-color"),fontSize:l("font-size"),lineHeight:l("line-height"),color:l("color"),paddingInline:l("padding-horizontal"),paddingBlock:l("padding-vertical"),[`${t}-prefix`]:{flex:"none",lineHeight:1},[`${t}-placeholder`]:{...La,color:e.colorTextPlaceholder,pointerEvents:"none",zIndex:1},[`${t}-content`]:{flex:"auto",minWidth:0,position:"relative",display:"flex",marginInlineEnd:s(e.paddingXXS).mul(1.5).equal(),"&:before":{content:'"\\a0"',width:0,overflow:"hidden"},"&-value":{visibility:"inherit"},"input[readonly]":{cursor:"inherit",caretColor:"transparent"}},[`${t}-suffix`]:{flex:"none",color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:"center",[i]:{verticalAlign:"top"}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:"not-allowed",input:{cursor:"not-allowed"}},"&-sm":{[a("height")]:e.controlHeightSM,[a("padding-horizontal")]:s(e.paddingXS).sub(e.lineWidth).equal(),[a("border-radius")]:e.borderRadiusSM,[`${t}-clear`]:{insetInlineEnd:l("padding-horizontal")}},"&-lg":{[a("height")]:e.controlHeightLG,[a("font-size")]:e.fontSizeLG,[a("line-height")]:e.lineHeightLG,[a("font-height")]:e.fontHeightLG,[a("border-radius")]:e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:"none",background:"transparent",appearance:"none",border:0,margin:0,padding:0,color:l("color"),"&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:"absolute",inset:0,lineHeight:`calc(${l("font-height")} + ${l("padding-vertical")} * 2)`},[`${t}-content`]:{...La,alignSelf:"center","&-has-value":{display:"block","&:before":{display:"none"}},"&-has-search-value":{color:"transparent"},"&-value":{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1}},[`&${t}-open ${t}-content`]:{color:e.colorTextPlaceholder,"&-has-search-value":{color:"transparent"}}}},{[`&-show-search:not(${t}-customize-input):not(${t}-disabled)`]:{cursor:"text"}},Dke(e),XT(e,"outlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline}),XT(e,"filled",{border:"transparent",borderHover:"transparent",borderActive:e.activeBorderColor,borderOutline:"transparent",borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),XT(e,"borderless",{border:"transparent",borderHover:"transparent",borderActive:"transparent",borderOutline:"transparent",background:"transparent"}),XT(e,"underlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:"transparent"},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent"}),Ike(e)]}},Fke=e=>{const{fontSize:t,lineHeight:r,lineWidth:n,controlHeight:i,controlHeightSM:o,controlHeightLG:s,paddingXXS:a,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:h,controlItemBgHover:p,colorBgContainer:f,colorFillSecondary:g,colorBgContainerDisabled:m,colorTextDisabled:v,colorPrimaryHover:b,colorPrimary:S,controlOutline:x}=e,T=a*2,R=n*2,E=Math.min(i-T,i-R),M=Math.min(o-T,o-R),D=Math.min(s-T,s-R);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(a/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:h,optionActiveBg:p,optionPadding:`${(i-t*r)/2}px ${l}px`,optionFontSize:t,optionLineHeight:r,optionHeight:i,selectorBg:f,clearBg:f,singleItemHeightLG:s,multipleItemBg:g,multipleItemBorderColor:"transparent",multipleItemHeight:E,multipleItemHeightSM:M,multipleItemHeightLG:D,multipleSelectorBgDisabled:m,multipleItemColorDisabled:v,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:b,activeBorderColor:S,activeOutlineColor:x,selectAffixPadding:a}},Lke=e=>{const{antCls:t,componentCls:r,motionDurationMid:n,inputPaddingHorizontalBase:i}=e,o={[`${r}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[r]:{...cn(e),[`${r}-selection-item`]:{flex:1,fontWeight:"normal",position:"relative",userSelect:"none",...La,[`> ${t}-typography`]:{display:"inline"}},[`${r}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${r}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:i,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","opacity"].map(s=>`${s} ${n} ease`).join(", "),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(i).add(e.fontSize).add(e.paddingXS).equal()}}}}}},_ke=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},Lke(e),Mke(e),{[`${t}-rtl`]:{direction:"rtl"}},Px(e,{focusElCls:`${t}-focused`})]},Oke=Yr("Select",(e,{rootPrefixCls:t})=>{const r=Wr(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[_ke(r),Ake(r)]},Fke,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var kke={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"};function e$(){return e$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,e$({},e,{ref:t,icon:kke})),_le=y.forwardRef(Nke);var Bke={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"};function t$(){return t$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,t$({},e,{ref:t,icon:Bke})),_D=y.forwardRef($ke);var Gke={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"};function r$(){return r$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,r$({},e,{ref:t,icon:Gke})),y3=y.forwardRef(Vke);function zke({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:r,removeIcon:n,loading:i,loadingIcon:o,multiple:s,hasFeedback:a,showSuffixIcon:l,feedbackIcon:c,showArrow:u,componentName:d}){const h=t??y.createElement(ED,null),p=v=>e===null&&!a&&!u?null:y.createElement(y.Fragment,null,l!==!1&&v,a&&c);let f=null;e!==void 0?f=p(e):i?f=p(o??y.createElement(Tx,{spin:!0})):f=({open:v,showSearch:b})=>p(v&&b?y.createElement(y3,null):y.createElement(_D,null));let g=null;r!==void 0?g=r:s?g=y.createElement(_le,null):g=null;let m=null;return n!==void 0?m=n:m=y.createElement(Bp,null),{clearIcon:h,suffixIcon:f,itemIcon:g,removeIcon:m}}function Hke(e){return Q.useMemo(()=>{if(e)return(...t)=>Q.createElement(Sp,{space:!0},e.apply(void 0,t))},[e])}function Wke(e,t){return t!==void 0?t:e!==null}const Ole="SECRET_COMBOBOX_MODE_DO_NOT_USE",Uke=(e,t)=>{var ge,Te,ke,Ze,Dt;const{prefixCls:r,bordered:n,className:i,rootClassName:o,getPopupContainer:s,popupClassName:a,dropdownClassName:l,listHeight:c=256,placement:u,listItemHeight:d,size:h,disabled:p,notFoundContent:f,status:g,builtinPlacements:m,dropdownMatchSelectWidth:v,popupMatchSelectWidth:b,direction:S,style:x,allowClear:T,variant:R,popupStyle:E,dropdownStyle:M,transitionName:D,tagRender:A,maxCount:I,prefix:_,dropdownRender:F,popupRender:O,onDropdownVisibleChange:k,onOpenChange:B,styles:H,classNames:N,...z}=e,{getPopupContainer:U,getPrefixCls:V,renderEmpty:G,direction:K,virtual:q,popupMatchSelectWidth:Y,popupOverflow:X}=y.useContext(or),{showSearch:le,style:re,styles:ne,className:se,classNames:de}=Ur("select"),[,te]=ds(),ie=d??(te==null?void 0:te.controlHeight),pe=V("select",r),Z=V(),ue=S??K,{compactSize:ve,compactItemClassnames:he}=Gp(pe,ue),[me,Oe]=Ox("select",R,n),Pe=co(pe),[Me,He]=Oke(pe,Pe),Ge=y.useMemo(()=>{const{mode:st}=e;if(st!=="combobox")return st===Ole?"combobox":st},[e.mode]),Ct=Ge==="multiple"||Ge==="tags",Ht=Wke(e.suffixIcon,e.showArrow),St=b??v??Y,Ye=Hke(O||F),Fe=B||k,{status:et,hasFeedback:Ne,isFormItemInput:tt,feedbackIcon:nt}=y.useContext(sa),Ke=_x(et,g);let Ie;f!==void 0?Ie=f:Ge==="combobox"?Ie=null:Ie=(G==null?void 0:G("Select"))||y.createElement(v3,{componentName:"Select"});const{suffixIcon:rt,itemIcon:Tt,removeIcon:Rt,clearIcon:Bt}=zke({...z,multiple:Ct,hasFeedback:Ne,feedbackIcon:nt,showSuffixIcon:Ht,componentName:"Select"}),Qt=T===!0?{clearIcon:Bt}:T,ft=En(z,["suffixIcon","itemIcon"]),ut=Li(st=>h??ve??st),Yt=y.useContext(Rs),hr=p??Yt,Je={...e,variant:me,status:Ke,disabled:hr,size:ut},[ot,De]=jr([de,N],[ne,H],{props:Je},{popup:{_default:"root"}}),Pt=ee((ge=ot.popup)==null?void 0:ge.root,a,l,{[`${pe}-dropdown-${ue}`]:ue==="rtl"},o,He,Pe,Me),Qe={...(Te=De.popup)==null?void 0:Te.root,...E??M},$e=ee({[`${pe}-lg`]:ut==="large",[`${pe}-sm`]:ut==="small",[`${pe}-rtl`]:ue==="rtl",[`${pe}-${me}`]:Oe,[`${pe}-in-form-item`]:tt},Oy(pe,Ke,Ne),he,se,i,ot.root,o,He,Pe,Me),oe=y.useMemo(()=>u!==void 0?u:ue==="rtl"?"bottomRight":"bottomLeft",[u,ue]),[ce]=$p("SelectLike",((Ze=(ke=De.popup)==null?void 0:ke.root)==null?void 0:Ze.zIndex)??(Qe==null?void 0:Qe.zIndex));return y.createElement(m3,{ref:t,virtual:q,classNames:ot,styles:De,showSearch:le,...ft,style:{...De.root,...re,...x},popupMatchSelectWidth:St,transitionName:du(Z,"slide-up",D),builtinPlacements:Pke(m,X),listHeight:c,listItemHeight:ie,mode:Ge,prefixCls:pe,placement:oe,direction:ue,prefix:_,suffixIcon:rt,menuItemSelectedIcon:Tt,removeIcon:Rt,allowClear:Qt,notFoundContent:Ie,className:$e,getPopupContainer:s||U,popupClassName:Pt,disabled:hr,popupStyle:{...(Dt=De.popup)==null?void 0:Dt.root,...Qe,zIndex:ce},maxCount:Ct?I:void 0,tagRender:Ct?A:void 0,popupRender:Ye,onPopupVisibleChange:Fe})},hu=y.forwardRef(Uke),jke=d3(hu,"popupAlign");hu.SECRET_COMBOBOX_MODE_DO_NOT_USE=Ole;hu.Option=g3;hu.OptGroup=f3;hu._InternalPanelDoNotUseOrYouWillBeFired=jke;const{Option:DK}=hu;function AK(e){return(e==null?void 0:e.type)&&(e.type.isSelectOption||e.type.isSelectOptGroup)}const Kke=(e,t)=>{const{prefixCls:r,className:n,style:i,popupClassName:o,dropdownClassName:s,children:a,dataSource:l,rootClassName:c,dropdownStyle:u,dropdownRender:d,popupRender:h,onDropdownVisibleChange:p,onOpenChange:f,styles:g,classNames:m}=e,v=Di(a),b=h||d,S=f||p;let x;v.length===1&&y.isValidElement(v[0])&&!AK(v[0])&&([x]=v);const T=x?()=>x:void 0;let R;v.length&&AK(v[0])?R=a:R=l?l.map(O=>{if(y.isValidElement(O))return O;switch(typeof O){case"string":return y.createElement(DK,{key:O,value:O},O);case"object":{const{value:k}=O;return y.createElement(DK,{key:k,value:k},O.text)}default:return}}):[];const{getPrefixCls:E}=y.useContext(or),M=E("select",r),D={...e,dataSource:l,status:e.status,popupMatchSelectWidth:e.popupMatchSelectWidth||e.dropdownMatchSelectWidth,popupRender:b,onOpenChange:S},[A,I]=jr([m],[g],{props:D},{popup:{_default:"root"}}),_=y.useMemo(()=>{var O,k,B;return{root:ee(`${M}-auto-complete`,n,c,A.root,{[`${M}-customize`]:x}),prefix:A.prefix,input:A.input,placeholder:A.placeholder,content:A.content,popup:{root:ee(o,s,(O=A.popup)==null?void 0:O.root),list:(k=A.popup)==null?void 0:k.list,listItem:(B=A.popup)==null?void 0:B.listItem}}},[M,n,c,A,o,s]),F=y.useMemo(()=>{var O,k,B;return{root:{...I.root,...i},input:I.input,prefix:I.prefix,placeholder:I.placeholder,content:I.content,popup:{root:{...u,...(O=I.popup)==null?void 0:O.root},list:(k=I.popup)==null?void 0:k.list,listItem:(B=I.popup)==null?void 0:B.listItem}}},[I,i,u]);return y.createElement(hu,{ref:t,suffixIcon:null,...En(e,["dataSource","dropdownClassName","popupClassName"]),prefixCls:M,classNames:_,styles:F,mode:hu.SECRET_COMBOBOX_MODE_DO_NOT_USE,popupRender:b,onPopupVisibleChange:S,getInputElement:T},R)},kle=y.forwardRef(Kke),{Option:qke}=hu,Yke=d3(kle,"popupAlign",e=>En(e,["visible"])),Nle=kle;Nle.Option=qke;Nle._InternalPanelDoNotUseOrYouWillBeFired=Yke;const ru=["xxxl","xxl","xl","lg","md","sm","xs"],Xke=[].concat(ru).reverse(),Zke=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)`,xxxl:`(min-width: ${e.screenXXXL}px)`}),Jke=e=>{const t=e,r=[].concat(ru).reverse();return r.forEach((n,i)=>{const o=n.toUpperCase(),s=`screen${o}Min`,a=`screen${o}`;if(!(t[s]<=t[a]))throw new Error(`${s}<=${a} fails : !(${t[s]}<=${t[a]})`);if(i{if(t){for(const r of ru)if(e[r]&&(t==null?void 0:t[r])!==void 0)return t[r]}},Qke=()=>{const[,e]=ds(),t=Zke(Jke(e));return Q.useMemo(()=>{const r=new Map;let n=-1,i={};return{responsiveMap:t,matchHandlers:{},dispatch(o){return i=o,r.forEach(s=>s(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,s])=>{const a=({matches:c})=>{this.dispatch({...i,[o]:c})},l=window.matchMedia(s);typeof(l==null?void 0:l.addEventListener)=="function"&&l.addEventListener("change",a),this.matchHandlers[s]={mql:l,listener:a},a(l)})},unregister(){Object.values(t).forEach(o=>{var a;const s=this.matchHandlers[o];typeof((a=s==null?void 0:s.mql)==null?void 0:a.removeEventListener)=="function"&&s.mql.removeEventListener("change",s==null?void 0:s.listener)}),r.clear()}}},[t])};function kx(e=!0,t={}){const r=y.useRef(t),[,n]=eae(),i=Qke();return zr(()=>{const o=i.subscribe(s=>{r.current=s,e&&n()});return()=>i.unsubscribe(o)},[]),r.current}const ky=e=>e?typeof e=="function"?e():e:null,C3=e=>{const{children:t,prefixCls:r,id:n,classNames:i,styles:o,className:s,style:a}=e;return y.createElement("div",{id:n,className:ee(`${r}-container`,i==null?void 0:i.container,s),style:{...o==null?void 0:o.container,...a},role:"tooltip"},typeof t=="function"?t():t)},hv={shiftX:64,adjustY:1},pv={adjustX:1,shiftY:!0},qa=[0,0],eNe={left:{points:["cr","cl"],overflow:pv,offset:[-4,0],targetOffset:qa},right:{points:["cl","cr"],overflow:pv,offset:[4,0],targetOffset:qa},top:{points:["bc","tc"],overflow:hv,offset:[0,-4],targetOffset:qa},bottom:{points:["tc","bc"],overflow:hv,offset:[0,4],targetOffset:qa},topLeft:{points:["bl","tl"],overflow:hv,offset:[0,-4],targetOffset:qa},leftTop:{points:["tr","tl"],overflow:pv,offset:[-4,0],targetOffset:qa},topRight:{points:["br","tr"],overflow:hv,offset:[0,-4],targetOffset:qa},rightTop:{points:["tl","tr"],overflow:pv,offset:[4,0],targetOffset:qa},bottomRight:{points:["tr","br"],overflow:hv,offset:[0,4],targetOffset:qa},rightBottom:{points:["bl","br"],overflow:pv,offset:[4,0],targetOffset:qa},bottomLeft:{points:["tl","bl"],overflow:hv,offset:[0,4],targetOffset:qa},leftBottom:{points:["br","bl"],overflow:pv,offset:[-4,0],targetOffset:qa}};function n$(){return n$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{trigger:r=["hover"],mouseEnterDelay:n=0,mouseLeaveDelay:i=.1,prefixCls:o="rc-tooltip",children:s,onVisibleChange:a,afterVisibleChange:l,motion:c,placement:u="right",align:d={},destroyOnHidden:h=!1,defaultVisible:p,getTooltipContainer:f,arrowContent:g,overlay:m,id:v,showArrow:b=!0,classNames:S,styles:x,...T}=e,R=Tu(v),E=y.useRef(null);y.useImperativeHandle(t,()=>E.current);const M={...T};"visible"in e&&(M.popupVisible=e.visible);const D=y.useMemo(()=>{if(!b)return!1;const I=b===!0?{}:b;return{...I,className:ee(I.className,S==null?void 0:S.arrow),style:{...I.style,...x==null?void 0:x.arrow},content:I.content??g}},[b,S==null?void 0:S.arrow,x==null?void 0:x.arrow,g]),A=({open:I})=>{const _=y.Children.only(s),F={"aria-describedby":m&&I?R:void 0};return y.cloneElement(_,F)};return y.createElement(MD,n$({popupClassName:S==null?void 0:S.root,prefixCls:o,popup:y.createElement(C3,{key:"content",prefixCls:o,id:R,classNames:S,styles:x},m),action:r,builtinPlacements:eNe,popupPlacement:u,ref:E,popupAlign:d,getPopupContainer:f,onOpenChange:a,afterOpenChange:l,popupMotion:c,defaultPopupVisible:p,autoDestroy:h,mouseLeaveDelay:i,popupStyle:x==null?void 0:x.root,mouseEnterDelay:n,arrow:D,uniqueContainerClassName:S==null?void 0:S.uniqueContainer,uniqueContainerStyle:x==null?void 0:x.uniqueContainer},M),A)});function b3(e){const{sizePopupArrow:t,borderRadiusXS:r,borderRadiusOuter:n}=e,i=t/2,o=0,s=i,a=n*1/Math.sqrt(2),l=i-n*(1-1/Math.sqrt(2)),c=i-r*(1/Math.sqrt(2)),u=n*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),d=2*i-c,h=u,p=2*i-a,f=l,g=2*i-o,m=s,v=i*Math.sqrt(2)+n*(Math.sqrt(2)-2),b=n*(Math.sqrt(2)-1),S=`polygon(${b}px 100%, 50% ${b}px, ${2*i-b}px 100%, ${b}px 100%)`,x=`path('M ${o} ${s} A ${n} ${n} 0 0 0 ${a} ${l} L ${c} ${u} A ${r} ${r} 0 0 1 ${d} ${h} L ${p} ${f} A ${n} ${n} 0 0 0 ${g} ${m} Z')`;return{arrowShadowWidth:v,arrowPath:x,arrowPolygon:S}}const rNe=(e,t,r)=>{const{sizePopupArrow:n,arrowPolygon:i,arrowPath:o,arrowShadowWidth:s,borderRadiusXS:a,calc:l}=e;return{pointerEvents:"none",width:n,height:n,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:n,height:l(n).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[i,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:s,height:s,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${ae(a)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:r,zIndex:0,background:"transparent"}}},$le=8;function OD(e){const{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?$le:n}}function ZT(e,t){return e?t:{}}const S3=(e,t,r)=>{const{componentCls:n,boxShadowPopoverArrow:i,arrowOffsetVertical:o,arrowOffsetHorizontal:s,antCls:a}=e,[l]=Jn(a,"tooltip"),{arrowDistance:c=0,arrowPlacement:u={left:!0,right:!0,top:!0,bottom:!0}}=r||{};return{[n]:{[`${n}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...rNe(e,t,i),"&:before":{background:t}}],...ZT(!!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":{[l("arrow-offset-x")]:s,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-topRight":{[l("arrow-offset-x")]:`calc(100% - ${ae(s)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:s}}}}),...ZT(!!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":{[l("arrow-offset-x")]:s,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-bottomRight":{[l("arrow-offset-x")]:`calc(100% - ${ae(s)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:s}}}}),...ZT(!!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}}),...ZT(!!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 nNe(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 s={...o,...i};return s.shiftX||(s.adjustX=!0),s.shiftY||(s.adjustY=!0),s}const FK={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"]}},iNe={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"]}},oNe=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function Gle(e){const{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:i,borderRadius:o,visibleFirst:s}=e,a=t/2,l={},c=OD({contentRadius:o,limitVerticalRadius:!0});return Object.keys(FK).forEach(u=>{const h={...n&&iNe[u]||FK[u],offset:[0,0],dynamicInset:!0};switch(l[u]=h,oNe.has(u)&&(h.autoArrow=!1),u){case"top":case"topLeft":case"topRight":h.offset[1]=-a-i;break;case"bottom":case"bottomLeft":case"bottomRight":h.offset[1]=a+i;break;case"left":case"leftTop":case"leftBottom":h.offset[0]=-a-i;break;case"right":case"rightTop":case"rightBottom":h.offset[0]=a+i;break}if(n)switch(u){case"topLeft":case"bottomLeft":h.offset[0]=-c.arrowOffsetHorizontal-a;break;case"topRight":case"bottomRight":h.offset[0]=c.arrowOffsetHorizontal+a;break;case"leftTop":case"rightTop":h.offset[1]=-c.arrowOffsetHorizontal*2+a;break;case"leftBottom":case"rightBottom":h.offset[1]=c.arrowOffsetHorizontal*2-a;break}h.overflow=nNe(u,c,t,r),s&&(h.htmlRegion="visibleFirst")}),l}const w3=(e,t)=>{const r=n=>typeof n=="boolean"?{show:n}:n||{};return Q.useMemo(()=>{const n=r(e),i=r(t);return{...i,...n,show:n.show??i.show??!0}},[e,t])},LK="50%",sNe=e=>{const{calc:t,componentCls:r,tooltipMaxWidth:n,tooltipColor:i,tooltipBg:o,tooltipBorderRadius:s,zIndexPopup:a,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:h,sizePopupArrow:p,antCls:f}=e,[g,m]=Jn(f,"tooltip"),v=t(s).add(p).add(h).equal(),S={minWidth:t(s).mul(2).add(p).equal(),minHeight:l,padding:`${ae(e.calc(u).div(2).equal())} ${ae(d)}`,color:m("overlay-color",i),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:s,boxShadow:c,boxSizing:"border-box"},x={[g("valid-offset-x")]:m("arrow-offset-x","var(--arrow-x)"),transformOrigin:[m("valid-offset-x",LK),`var(--arrow-y, ${LK})`].join(" ")};return[{[r]:{...cn(e),position:"absolute",zIndex:a,display:"block",width:"max-content",maxWidth:n,visibility:"visible",...x,"&-hidden":{display:"none"},[g("arrow-background-color")]:o,[`${r}-container`]:[S,QH(e,!0)],[`&:has(~ ${r}-unique-container)`]:{[`${r}-container`]:{border:"none",background:"transparent",boxShadow:"none"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:v},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${r}-inner`]:{borderRadius:e.min(s,$le)}},[`${r}-content`]:{position:"relative"},...TD(e,(T,{darkColor:R})=>({[`&${r}-${T}`]:{[`${r}-container`]:{backgroundColor:R},[`${r}-arrow`]:{[g("arrow-background-color")]:R}}})),"&-rtl":{direction:"rtl"}}},S3(e,m("arrow-background-color")),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${r}-unique-container`]:{...S,...x,position:"absolute",zIndex:t(a).sub(1).equal(),"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},aNe=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...OD({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...b3(Wr(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),Vle=(e,t,r=!0)=>Yr("Tooltip",i=>{const{borderRadius:o,colorTextLightSolid:s,colorBgSpotlight:a,maxWidth:l}=i,c=Wr(i,{tooltipMaxWidth:l,tooltipColor:s,tooltipBorderRadius:o,tooltipBg:a});return[sNe(c),Rx(i,"zoom-big-fast")]},aNe,{resetStyle:!1,injectStyle:r})(e,t),lNe=Pd.map(e=>`${e}-inverse`),cNe=["success","processing","error","default","warning"];function kD(e,t=!0){return t?[].concat(Nr(lNe),Nr(Pd)).includes(e):Pd.includes(e)}function uNe(e){return cNe.includes(e)}const zle=(e,t,r)=>{const n=kD(r),[i]=Jn(e,"tooltip"),o=ee({[`${t}-${r}`]:r&&n}),s={},a={},l=aLe(r).toRgb(),u=(.299*l.r+.587*l.g+.114*l.b)/255<.5?"#FFF":"#000";return r&&!n&&(s.background=r,s[i("overlay-color")]=u,a[i("arrow-background-color")]=r),{className:o,overlayStyle:s,arrowStyle:a}},dNe=e=>{const{prefixCls:t,className:r,placement:n="top",title:i,color:o,overlayInnerStyle:s,classNames:a,styles:l}=e,{getPrefixCls:c}=y.useContext(or),u=c("tooltip",t),d=c(),h=co(u),[p,f]=Vle(u,h),g=zle(d,u,o),m=g.arrowStyle,v=y.useMemo(()=>({container:{...s,...g.overlayStyle}}),[s,g.overlayStyle]),b={...e,placement:n},[S,x]=jr([a],[v,l],{props:b}),T=ee(h,p,f,u,`${u}-pure`,`${u}-placement-${n}`,r,g.className);return y.createElement("div",{className:T,style:m},y.createElement("div",{className:`${u}-arrow`}),y.createElement(C3,{...e,className:p,prefixCls:u,classNames:S,styles:x},i))},hNe=y.forwardRef((e,t)=>{const{prefixCls:r,openClassName:n,getTooltipContainer:i,color:o,children:s,afterOpenChange:a,arrow:l,destroyTooltipOnHide:c,destroyOnHidden:u,title:d,overlay:h,trigger:p,builtinPlacements:f,autoAdjustOverflow:g=!0,motion:m,getPopupContainer:v,placement:b="top",mouseEnterDelay:S=.1,mouseLeaveDelay:x=.1,rootClassName:T,styles:R,classNames:E,onOpenChange:M,overlayInnerStyle:D,overlayStyle:A,overlayClassName:I,..._}=e,[,F]=ds(),{getPopupContainer:O,getPrefixCls:k,direction:B,className:H,style:N,classNames:z,styles:U,arrow:V,trigger:G}=Ur("tooltip"),K=w3(l,V),q=K.show,Y=p||G||"hover";CC();const X=y.useRef(null),le=()=>{var rt;(rt=X.current)==null||rt.forceAlign()};y.useImperativeHandle(t,()=>{var rt,Tt;return{forceAlign:le,nativeElement:(rt=X.current)==null?void 0:rt.nativeElement,popupElement:(Tt=X.current)==null?void 0:Tt.popupElement}});const[re,ne]=Fn(e.defaultOpen??!1,e.open),se=!d&&!h&&d!==0,de=rt=>{ne(se?!1:rt),!se&&M&&M(rt)},te=y.useMemo(()=>f||Gle({arrowPointAtCenter:(K==null?void 0:K.pointAtCenter)??!1,autoAdjustOverflow:g,arrowWidth:q?F.sizePopupArrow:0,borderRadius:F.borderRadius,offset:F.marginXXS,visibleFirst:!0}),[K,f,F,q,g]),ie=y.useMemo(()=>d===0?d:h||d||"",[h,d]),pe=y.createElement(Sp,{space:!0,form:!0},typeof ie=="function"?ie():ie),Z={...e,trigger:Y,color:o,placement:b,builtinPlacements:f,openClassName:n,arrow:l,autoAdjustOverflow:g,getPopupContainer:v,children:s,destroyTooltipOnHide:c,destroyOnHidden:u},[ue,ve]=jr([z,E],[U,R],{props:Z}),he=k("tooltip",r),me=k(),Oe=e["data-popover-inject"];let Pe=re;!("open"in e)&&se&&(Pe=!1);const Me=y.isValidElement(s)&&!Pae(s)?s:y.createElement("span",null,s),He=Me.props,Ge=!He.className||typeof He.className=="string"?ee(He.className,n||`${he}-open`):He.className,Ct=co(he),[Ht,St]=Vle(he,Ct,!Oe),Ye=zle(me,he,o),Fe=Ye.arrowStyle,et=ee(Ct,Ht,St),Ne=ee(I,{[`${he}-rtl`]:B==="rtl"},Ye.className,T,et,H,ue.root),[tt,nt]=$p("Tooltip",_.zIndex),Ke={...ve.container,...D,...Ye.overlayStyle},Ie=y.createElement(tNe,{unique:!0,..._,trigger:Y,zIndex:tt,showArrow:q,placement:b,mouseEnterDelay:S,mouseLeaveDelay:x,prefixCls:he,classNames:{root:Ne,container:ue.container,arrow:ue.arrow,uniqueContainer:ee(et,ue.container)},styles:{root:{...Fe,...ve.root,...N,...A},container:Ke,uniqueContainer:Ke,arrow:ve.arrow},getTooltipContainer:v||i||O,ref:X,builtinPlacements:te,overlay:pe,visible:Pe,onVisibleChange:de,afterVisibleChange:a,arrowContent:y.createElement("span",{className:`${he}-arrow-content`}),motion:{motionName:du(me,"zoom-big-fast",typeof(m==null?void 0:m.motionName)=="string"?m==null?void 0:m.motionName:void 0),motionDeadline:1e3},destroyOnHidden:u??!!c},Pe?Ui(Me,{className:Ge}):Me);return y.createElement(bx.Provider,{value:nt},Ie)}),pu=hNe;pu._InternalPanelDoNotUseOrYouWillBeFired=dNe;pu.UniqueProvider=Iae;const _K="50%",pNe=e=>{const{componentCls:t,popoverColor:r,titleMinWidth:n,fontWeightStrong:i,innerPadding:o,boxShadowSecondary:s,colorTextHeading:a,borderRadiusLG:l,zIndexPopup:c,titleMarginBottom:u,colorBgElevated:d,popoverBg:h,titleBorderBottom:p,innerContentPadding:f,titlePadding:g,antCls:m}=e,[v,b]=Jn(m,"tooltip");return[{[t]:{...cn(e),position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:c,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",[v("valid-offset-x")]:b("arrow-offset-x","var(--arrow-x)"),transformOrigin:[b("valid-offset-x",_K),`var(--arrow-y, ${_K})`].join(" "),[v("arrow-background-color")]:d,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-container`]:{backgroundColor:h,backgroundClip:"padding-box",borderRadius:l,boxShadow:s,padding:o},[`${t}-title`]:{minWidth:n,marginBottom:u,color:a,fontWeight:i,borderBottom:p,padding:g},[`${t}-content`]:{color:r,padding:f}}},S3(e,b("arrow-background-color")),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block"}}]},fNe=e=>{const{componentCls:t,antCls:r}=e,[n]=Jn(r,"tooltip");return{[t]:Pd.map(i=>{const o=e[`${i}6`];return{[`&${t}-${i}`]:{[n("arrow-background-color")]:o,[`${t}-inner`]:{backgroundColor:o},[`${t}-arrow`]:{background:"transparent"}}}})}},gNe=e=>{const{lineWidth:t,controlHeight:r,fontHeight:n,padding:i,wireframe:o,zIndexPopupBase:s,borderRadiusLG:a,marginXS:l,lineType:c,colorSplit:u,paddingSM:d}=e,h=r-n,p=h/2,f=h/2-t,g=i;return{titleMinWidth:177,zIndexPopup:s+30,...b3(e),...OD({contentRadius:a,limitVerticalRadius:!0}),innerPadding:o?0:12,titleMarginBottom:o?0:l,titlePadding:o?`${p}px ${g}px ${f}px`:0,titleBorderBottom:o?`${t}px ${c} ${u}`:"none",innerContentPadding:o?`${d}px ${g}px`:0}},Hle=Yr("Popover",e=>{const{colorBgElevated:t,colorText:r}=e,n=Wr(e,{popoverBg:t,popoverColor:r});return[pNe(n),fNe(n),Rx(n,"zoom-big")]},gNe,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]}),Wle=e=>{const{title:t,content:r,prefixCls:n,classNames:i,styles:o}=e;return!t&&!r?null:y.createElement(y.Fragment,null,t&&y.createElement("div",{className:ee(`${n}-title`,i==null?void 0:i.title),style:o==null?void 0:o.title},t),r&&y.createElement("div",{className:ee(`${n}-content`,i==null?void 0:i.content),style:o==null?void 0:o.content},r))},mNe=e=>{const{hashId:t,prefixCls:r,className:n,style:i,placement:o="top",title:s,content:a,children:l,classNames:c,styles:u}=e,d=ky(s),h=ky(a),p={...e,placement:o},[f,g]=jr([c],[u],{props:p}),m=ee(t,r,`${r}-pure`,`${r}-placement-${o}`,n);return y.createElement("div",{className:m,style:i},y.createElement("div",{className:`${r}-arrow`}),y.createElement(C3,{...e,className:t,prefixCls:r,classNames:f,styles:g},l||y.createElement(Wle,{prefixCls:r,title:d,content:h,classNames:f,styles:g})))},Ule=e=>{const{prefixCls:t,className:r,...n}=e,{getPrefixCls:i}=y.useContext(or),o=i("popover",t),[s,a]=Hle(o);return y.createElement(mNe,{...n,prefixCls:o,hashId:s,className:ee(r,a)})},vNe=y.forwardRef((e,t)=>{const{prefixCls:r,title:n,content:i,overlayClassName:o,placement:s="top",trigger:a,children:l,mouseEnterDelay:c=.1,mouseLeaveDelay:u=.1,onOpenChange:d,overlayStyle:h={},styles:p,classNames:f,motion:g,arrow:m,...v}=e,{getPrefixCls:b,className:S,style:x,classNames:T,styles:R,arrow:E,trigger:M}=Ur("popover"),D=b("popover",r),[A,I]=Hle(D),_=b(),F=w3(m,E),O=a||M||"hover",k={...e,placement:s,trigger:O,mouseEnterDelay:c,mouseLeaveDelay:u,overlayStyle:h,styles:p,classNames:f},[B,H]=jr([T,f],[R,p],{props:k}),N=ee(o,A,I,S,B.root),[z,U]=Fn(e.defaultOpen??!1,e.open),V=q=>{U(q),d==null||d(q)},G=ky(n),K=ky(i);return y.createElement(pu,{unique:!1,arrow:F,placement:s,trigger:O,mouseEnterDelay:c,mouseLeaveDelay:u,...v,prefixCls:D,classNames:{root:N,container:B.container,arrow:B.arrow},styles:{root:{...H.root,...x,...h},container:H.container,arrow:H.arrow},ref:t,open:z,onOpenChange:V,overlay:G||K?y.createElement(Wle,{prefixCls:D,title:G,content:K,classNames:B,styles:H}):null,motion:{motionName:du(_,"zoom-big",typeof(g==null?void 0:g.motionName)=="string"?g==null?void 0:g.motionName:void 0)},"data-popover-inject":!0},l)}),jle=vNe;jle._InternalPanelDoNotUseOrYouWillBeFired=Ule;var yNe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z"}}]},name:"vertical-align-top",theme:"outlined"};function i$(){return i$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,i$({},e,{ref:t,icon:yNe})),bNe=y.forwardRef(CNe),OK=e=>{const{prefixCls:t,value:r,current:n,offset:i=0}=e;let o;return i&&(o={position:"absolute",top:`${i}00%`,left:0}),y.createElement("span",{style:o,className:ee(`${t}-only-unit`,{current:n})},r)};function SNe(e,t,r){let n=e,i=0;for(;(n+10)%10!==t;)n+=r,i+=r;return i}const wNe=e=>{const{prefixCls:t,count:r,value:n}=e,i=Number(n),o=Math.abs(r),[s,a]=y.useState(i),[l,c]=y.useState(o),u=()=>{a(i),c(o)};y.useEffect(()=>{const p=setTimeout(u,1e3);return()=>clearTimeout(p)},[i]);let d,h;if(s===i||Number.isNaN(i)||Number.isNaN(s))d=[y.createElement(OK,{...e,key:i,current:!0})],h={transition:"none"};else{d=[];const p=i+10,f=[];for(let b=i;b<=p;b+=1)f.push(b);const g=lb%10===s);d=(g<0?f.slice(0,m+1):f.slice(m)).map((b,S)=>{const x=b%10;return y.createElement(OK,{...e,key:b,value:x,offset:g<0?S-m:S,current:S===m})}),h={transform:`translateY(${-SNe(s,i,g)}00%)`}}return y.createElement("span",{className:`${t}-only`,style:h,onTransitionEnd:u},d)},xNe=y.forwardRef((e,t)=>{const{prefixCls:r,count:n,className:i,motionClassName:o,style:s,title:a,show:l,component:c="sup",children:u,...d}=e,{getPrefixCls:h}=y.useContext(or),p=h("scroll-number",r),f={...d,"data-show":l,style:s,className:ee(p,i,o),title:a};let g=n;if(n&&Number(n)%1===0){const m=String(n).split("");g=y.createElement("bdi",null,m.map((v,b)=>y.createElement(wNe,{prefixCls:p,count:Number(n),value:v,key:m.length-b})))}return s!=null&&s.borderColor&&(f.style={...s,boxShadow:`0 0 0 1px ${s.borderColor} inset`}),u?Ui(u,m=>({className:ee(`${p}-custom-component`,m==null?void 0:m.className,o)})):y.createElement(c,{...f,ref:t},g)}),TNe=new Zr("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),ENe=new Zr("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),RNe=new Zr("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),PNe=new Zr("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),MNe=new Zr("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),INe=new Zr("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),DNe=e=>{const{componentCls:t,iconCls:r,antCls:n,badgeShadowSize:i,textFontSize:o,textFontSizeSM:s,statusSize:a,dotSize:l,textFontWeight:c,indicatorHeight:u,indicatorHeightSM:d,marginXS:h,calc:p}=e,f=`${n}-scroll-number`,g=TD(e,(m,{darkColor:v})=>({[`&${t} ${t}-color-${m}`]:{background:v,[`&:not(${t}-count)`]:{color:v},"a:hover &":{background:v}}}));return{[t]:{...cn(e),position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${t}-count`]:{display:"inline-flex",justifyContent:"center",zIndex:e.indicatorZIndex,minWidth:u,height:u,color:e.badgeTextColor,fontWeight:c,fontSize:o,lineHeight:ae(u),whiteSpace:"nowrap",textAlign:"center",background:e.badgeColor,borderRadius:p(u).div(2).equal(),boxShadow:`0 0 0 ${ae(i)} ${e.badgeShadowColor}`,transition:`background-color ${e.motionDurationMid}`,a:{color:e.badgeTextColor},"a:hover":{color:e.badgeTextColor},"a:hover &":{background:e.badgeColorHover}},[`${t}-count-sm`]:{minWidth:d,height:d,fontSize:s,lineHeight:ae(d),borderRadius:p(d).div(2).equal()},[`${t}-multiple-words`]:{padding:`0 ${ae(e.paddingXS)}`,bdi:{unicodeBidi:"plaintext"}},[`${t}-dot`]:{zIndex:e.indicatorZIndex,width:l,minWidth:l,height:l,background:e.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${ae(i)} ${e.badgeShadowColor}`},[`${t}-count, ${t}-dot, ${f}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${r}-spin`]:{animationName:INe,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${t}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${t}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:a,height:a,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:TNe,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:h,color:e.colorText,fontSize:e.fontSize}},...g,[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:ENe,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`${t}-zoom-leave`]:{animationName:RNe,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack,animationFillMode:"both"},[`&${t}-not-a-wrapper`]:{[`${t}-zoom-appear, ${t}-zoom-enter`]:{animationName:PNe,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`${t}-zoom-leave`]:{animationName:MNe,animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseOutBack},[`&:not(${t}-status)`]:{verticalAlign:"middle"},[`${f}-custom-component, ${t}-count`]:{transform:"none"},[`${f}-custom-component, ${f}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[f]:{overflow:"hidden",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack}`,[`${f}-only`]:{position:"relative",display:"inline-block",height:u,transition:`all ${e.motionDurationSlow} ${e.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${f}-only-unit`]:{height:u,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${f}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${t}-count, ${t}-dot, ${f}-custom-component`]:{transform:"translate(-50%, -50%)"}}}}},Kle=e=>{const{fontHeight:t,lineWidth:r,marginXS:n,colorBorderBg:i}=e,o=t,s=r,a=e.colorTextLightSolid,l=e.colorError,c=e.colorErrorHover;return Wr(e,{badgeFontHeight:o,badgeShadowSize:s,badgeTextColor:a,badgeColor:l,badgeColorHover:c,badgeShadowColor:i,badgeProcessingDuration:"1.2s",badgeRibbonOffset:n,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"})},qle=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}},ANe=Yr("Badge",e=>{const t=Kle(e);return DNe(t)},qle),FNe=y.forwardRef((e,t)=>{const{prefixCls:r,scrollNumberPrefixCls:n,children:i,status:o,text:s,color:a,count:l=null,overflowCount:c=99,dot:u=!1,size:d="medium",title:h,offset:p,style:f,className:g,rootClassName:m,classNames:v,styles:b,showZero:S=!1,...x}=e,{getPrefixCls:T,direction:R,className:E,style:M,classNames:D,styles:A}=Ur("badge"),I=T("badge",r),[_,F]=ANe(I),O={...e,overflowCount:c,size:d,dot:u,showZero:S},[k,B]=jr([D,v],[A,b],{props:O}),H=l>c?`${c}+`:l,N=H==="0"||H===0||s==="0"||s===0,z=l===null||N&&!S,U=(xn(o)||xn(a))&&z,V=xn(o)||!N,G=u&&!N,K=G?"":H,q=y.useMemo(()=>((!xn(K)||K==="")&&(!xn(s)||s==="")||N&&!S)&&!G,[K,N,S,G,s]),Y=y.useRef(l);q||(Y.current=l);const X=Y.current,le=y.useRef(K);q||(le.current=K);const re=le.current,ne=y.useRef(G);q||(ne.current=G);const se=y.useMemo(()=>{if(!p)return{...M,...f};const me=Number.parseInt(p[0],10);return{...{marginTop:p[1],insetInlineEnd:-me},...M,...f}},[p,f,M]),de=h??(typeof X=="string"||typeof X=="number"?X:void 0),te=!q&&(s===0?S:!!s&&s!==!0),ie=te?y.createElement("span",{className:`${I}-status-text`},s):null,pe=!X||typeof X!="object"?void 0:Ui(X,me=>({style:{...se,...me.style}})),Z=kD(a,!1),ue=ee(k.indicator,{[`${I}-status-dot`]:U,[`${I}-status-${o}`]:!!o,[`${I}-color-${a}`]:Z}),ve={};a&&!Z&&(ve.color=a,ve.background=a);const he=ee(I,{[`${I}-status`]:U,[`${I}-not-a-wrapper`]:!i,[`${I}-rtl`]:R==="rtl"},g,m,E,k.root,_,F);if(!i&&U&&(s||V||!z)){const me=se.color;return y.createElement("span",{ref:t,...x,className:he,style:{...B.root,...se}},y.createElement("span",{className:ue,style:{...B.indicator,...ve}}),te&&y.createElement("span",{style:{color:me},className:`${I}-status-text`},s))}return y.createElement("span",{ref:t,...x,className:he,style:B.root},i,y.createElement(Sm,{visible:!q,motionName:`${I}-zoom`,motionAppear:!1,motionDeadline:1e3},({className:me})=>{const Oe=T("scroll-number",n),Pe=ne.current,Me=ee(k.indicator,{[`${I}-dot`]:Pe,[`${I}-count`]:!Pe,[`${I}-count-sm`]:d==="small",[`${I}-multiple-words`]:!Pe&&re&&re.toString().length>1,[`${I}-status-${o}`]:!!o,[`${I}-color-${a}`]:Z});let He={...B.indicator,...se};return a&&!Z&&(He=He||{},He.background=a),y.createElement(xNe,{prefixCls:Oe,show:!q,motionClassName:me,className:Me,count:re,title:de,style:He,key:"scrollNumber"},pe)}),ie)}),LNe=e=>{const{antCls:t,badgeFontHeight:r,marginXS:n,badgeRibbonOffset:i,calc:o}=e,s=`${t}-ribbon`,a=`${t}-ribbon-wrapper`,l=TD(e,(c,{darkColor:u})=>({[`&${s}-color-${c}`]:{background:u,color:u}}));return{[a]:{position:"relative"},[s]:{...cn(e),position:"absolute",top:n,padding:`0 ${ae(e.paddingXS)}`,color:e.colorPrimary,lineHeight:ae(r),whiteSpace:"nowrap",backgroundColor:e.colorPrimary,borderRadius:e.borderRadiusSM,[`${s}-content`]:{color:e.badgeTextColor},[`${s}-corner`]:{position:"absolute",top:"100%",width:i,height:i,color:"currentcolor",border:`${ae(o(i).div(2).equal())} solid`,transform:e.badgeRibbonCornerTransform,transformOrigin:"top",filter:e.badgeRibbonCornerFilter},...l,[`&${s}-placement-end`]:{insetInlineEnd:o(i).mul(-1).equal(),borderEndEndRadius:0,[`${s}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${s}-placement-start`]:{insetInlineStart:o(i).mul(-1).equal(),borderEndStartRadius:0,[`${s}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}}}},_Ne=Yr(["Badge","Ribbon"],e=>{const t=Kle(e);return LNe(t)},qle),ONe=e=>{const{className:t,prefixCls:r,style:n,color:i,children:o,text:s,placement:a="end",rootClassName:l,styles:c,classNames:u}=e,{getPrefixCls:d,direction:h,className:p,style:f,classNames:g,styles:m}=Ur("ribbon"),v=d("ribbon",r),b=`${v}-wrapper`,[S,x]=_Ne(v,b),T={...e,placement:a},[R,E]=jr([g,u],[m,c],{props:T}),M=kD(i,!1),D=ee(v,`${v}-placement-${a}`,{[`${v}-rtl`]:h==="rtl",[`${v}-color-${i}`]:M},t,p,R.indicator),A={},I={};return i&&!M&&(A.background=i,I.color=i),y.createElement("div",{className:ee(b,l,S,x,R.root),style:E.root},o,y.createElement("div",{className:ee(D,S),style:{...A,...E.indicator,...f,...n}},y.createElement("span",{className:ee(`${v}-content`,R.content),style:E.content},s),y.createElement("div",{className:`${v}-corner`,style:I})))},Yle=FNe;Yle.Ribbon=ONe;const x3=Q.createContext({});var kNe={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"};function o$(){return o$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,o$({},e,{ref:t,icon:kNe})),s$=y.forwardRef(NNe),{ESC:BNe,TAB:$Ne}=Xt;function GNe({visible:e,triggerRef:t,onVisibleChange:r,autoFocus:n,overlayRef:i}){const o=y.useRef(!1),s=()=>{var c,u;e&&((u=(c=t.current)==null?void 0:c.focus)==null||u.call(c),r==null||r(!1))},a=()=>{var c;return(c=i.current)!=null&&c.focus?(i.current.focus(),o.current=!0,!0):!1},l=c=>{switch(c.keyCode){case BNe:s();break;case $Ne:{let u=!1;o.current||(u=a()),u?c.preventDefault():s();break}}};y.useEffect(()=>e?(window.addEventListener("keydown",l),n&&Lr(a,3),()=>{window.removeEventListener("keydown",l),o.current=!1}):()=>{o.current=!1},[e])}const VNe=y.forwardRef((e,t)=>{const{overlay:r,arrow:n,prefixCls:i}=e,o=y.useMemo(()=>{let a;return typeof r=="function"?a=r():a=r,a},[r]),s=zo(t,zd(o));return Q.createElement(Q.Fragment,null,n&&Q.createElement("div",{className:`${i}-arrow`}),Q.cloneElement(o,{ref:cu(o)?s:void 0}))}),fv={adjustX:1,adjustY:1},gv=[0,0],zNe={topLeft:{points:["bl","tl"],overflow:fv,offset:[0,-4],targetOffset:gv},top:{points:["bc","tc"],overflow:fv,offset:[0,-4],targetOffset:gv},topRight:{points:["br","tr"],overflow:fv,offset:[0,-4],targetOffset:gv},bottomLeft:{points:["tl","bl"],overflow:fv,offset:[0,4],targetOffset:gv},bottom:{points:["tc","bc"],overflow:fv,offset:[0,4],targetOffset:gv},bottomRight:{points:["tr","br"],overflow:fv,offset:[0,4],targetOffset:gv}};function a$(){return a$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var U;const{arrow:r=!1,prefixCls:n="rc-dropdown",transitionName:i,animation:o,align:s,placement:a="bottomLeft",placements:l=zNe,getPopupContainer:c,showAction:u,hideAction:d,overlayClassName:h,overlayStyle:p,visible:f,trigger:g=["hover"],autoFocus:m,overlay:v,children:b,onVisibleChange:S,...x}=e,[T,R]=Q.useState(),E="visible"in e?f:T,M=o?`${n}-${o}`:i,D=Q.useRef(null),A=Q.useRef(null),I=Q.useRef(null);Q.useImperativeHandle(t,()=>D.current);const _=V=>{R(V),S==null||S(V)};GNe({visible:E,triggerRef:I,onVisibleChange:_,autoFocus:m,overlayRef:A});const F=V=>{const{onOverlayClick:G}=e;R(!1),G&&G(V)},O=()=>Q.createElement(VNe,{ref:A,overlay:v,prefixCls:n,arrow:r}),k=()=>typeof v=="function"?O:O(),B=()=>{const{minOverlayWidthMatchTrigger:V,alignPoint:G}=e;return"minOverlayWidthMatchTrigger"in e?V:!G},H=()=>{const{openClassName:V}=e;return V!==void 0?V:`${n}-open`},N=Q.cloneElement(b,{className:ee((U=b.props)==null?void 0:U.className,E&&H()),ref:cu(b)?zo(I,zd(b)):void 0});let z=d;return!z&&g.indexOf("contextMenu")!==-1&&(z=["click"]),Q.createElement(MD,a$({builtinPlacements:l},x,{prefixCls:n,ref:D,popupClassName:ee(h,{[`${n}-show-arrow`]:r}),popupStyle:p,action:g,showAction:u,hideAction:z,popupPlacement:a,popupAlign:s,popupMotion:{motionName:M},popupVisible:E,stretch:B()?"minWidth":"",popup:k(),onOpenChange:_,onPopupClick:F,getPopupContainer:c}),N)}),HNe=e=>typeof e!="object"&&typeof e!="function"||e===null,Zle=y.createContext(null);function Jle(e,t){return`${e}-${t}`}function Qle(e){const t=y.useContext(Zle);return Jle(t,e)}const hc=y.createContext(null);function WNe(e,t){const r={...e};return Object.keys(t).forEach(n=>{const i=t[n];i!==void 0&&(r[n]=i)}),r}function y0({children:e,locked:t,...r}){const n=y.useContext(hc),i=bm(()=>WNe(n,r),[n,r],(o,s)=>!t&&(o[0]!==s[0]||!cc(o[1],s[1],!0)));return y.createElement(hc.Provider,{value:i},e)}const UNe=[],ece=y.createContext(null);function ND(){return y.useContext(ece)}const tce=y.createContext(UNe);function wC(e){const t=y.useContext(tce);return y.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}const rce=y.createContext(null),T3=y.createContext({}),{LEFT:l$,RIGHT:c$,UP:u$,DOWN:QR,ENTER:eP,ESC:nce,HOME:Xb,END:Zb}=Xt,kK=[u$,QR,l$,c$];function jNe(e,t,r,n){var p;const i="prev",o="next",s="children",a="parent";if(e==="inline"&&n===eP)return{inlineTrigger:!0};const l={[u$]:i,[QR]:o},c={[l$]:r?o:i,[c$]:r?i:o,[QR]:s,[eP]:s},u={[u$]:i,[QR]:o,[eP]:s,[nce]:a,[l$]:r?s:a,[c$]:r?a:s};switch((p={inline:l,horizontal:c,vertical:u,inlineSub:l,horizontalSub:u,verticalSub:u}[`${e}${t?"":"Sub"}`])==null?void 0:p[n]){case i:return{offset:-1,sibling:!0};case o:return{offset:1,sibling:!0};case a:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function KNe(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function qNe(e,t){let r=e||document.activeElement;for(;r;){if(t.has(r))return r;r=r.parentElement}return null}function E3(e,t){return s3(e,!0).filter(n=>t.has(n))}function NK(e,t,r,n=1){if(!e)return null;const i=E3(e,t),o=i.length;let s=i.findIndex(a=>r===a);return n<0?s===-1?s=o-1:s-=1:n>0&&(s+=1),s=(s+o)%o,i[s]}const oM=(e,t)=>{const r=new Set,n=new Map,i=new Map;return e.forEach(o=>{const s=document.querySelector(`[data-menu-id='${Jle(t,o)}']`);s&&(r.add(s),i.set(s,o),n.set(o,s))}),{elements:r,key2element:n,element2key:i}};function YNe(e,t,r,n,i,o,s,a,l,c){const u=y.useRef(),d=y.useRef();d.current=t;const h=()=>{Lr.cancel(u.current)};return y.useEffect(()=>()=>{h()},[]),p=>{const{which:f}=p;if([...kK,eP,nce,Xb,Zb].includes(f)){const g=o();let m=oM(g,n);const{elements:v,key2element:b,element2key:S}=m,x=b.get(t),T=qNe(x,v),R=S.get(T),E=jNe(e,s(R,!0).length===1,r,f);if(!E&&f!==Xb&&f!==Zb)return;(kK.includes(f)||[Xb,Zb].includes(f))&&p.preventDefault();const M=D=>{if(D){let A=D;const I=D.querySelector("a");I!=null&&I.getAttribute("href")&&(A=I);const _=S.get(D);a(_),h(),u.current=Lr(()=>{d.current===_&&A.focus()})}};if([Xb,Zb].includes(f)||E.sibling||!T){let D;!T||e==="inline"?D=i.current:D=KNe(T);let A;const I=E3(D,v);f===Xb?A=I[0]:f===Zb?A=I[I.length-1]:A=NK(D,v,T,E.offset),M(A)}else if(E.inlineTrigger)l(R);else if(E.offset>0)l(R,!0),h(),u.current=Lr(()=>{m=oM(g,n);const D=T.getAttribute("aria-controls"),A=document.getElementById(D),I=NK(A,m.elements);M(I)},5);else if(E.offset<0){const D=s(R,!0),A=D[D.length-2],I=b.get(A);l(A,!1),M(I)}}c==null||c(p)}}function XNe(e){Promise.resolve().then(e)}const R3="__RC_UTIL_PATH_SPLIT__",BK=e=>e.join(R3),ZNe=e=>e.split(R3),d$="rc-menu-more";function JNe(){const[,e]=y.useState({}),t=y.useRef(new Map),r=y.useRef(new Map),[n,i]=y.useState([]),o=y.useRef(0),s=y.useRef(!1),a=()=>{s.current||e({})},l=y.useCallback((g,m)=>{const v=BK(m);r.current.set(v,g),t.current.set(g,v),o.current+=1;const b=o.current;XNe(()=>{b===o.current&&a()})},[]),c=y.useCallback((g,m)=>{const v=BK(m);r.current.delete(v),t.current.delete(g)},[]),u=y.useCallback(g=>{i(g)},[]),d=y.useCallback((g,m)=>{const v=t.current.get(g)||"",b=ZNe(v);return m&&n.includes(b[0])&&b.unshift(d$),b},[n]),h=y.useCallback((g,m)=>g.filter(v=>v!==void 0).some(v=>d(v,!0).includes(m)),[d]),p=()=>{const g=[...t.current.keys()];return n.length&&g.push(d$),g},f=y.useCallback(g=>{const m=`${t.current.get(g)}${R3}`,v=new Set;return[...r.current.keys()].forEach(b=>{b.startsWith(m)&&v.add(r.current.get(b))}),v},[]);return y.useEffect(()=>()=>{s.current=!0},[]),{registerPath:l,unregisterPath:c,refreshOverflowKeys:u,isSubPathKey:h,getKeyPath:d,getKeys:p,getSubPathKeys:f}}function YS(e){const t=y.useRef(e);t.current=e;const r=y.useCallback((...n)=>{var i;return(i=t.current)==null?void 0:i.call(t,...n)},[]);return e?r:void 0}function ice(e,t,r,n){const{activeKey:i,onActive:o,onInactive:s}=y.useContext(hc),a={active:i===e};return t||(a.onMouseEnter=l=>{r==null||r({key:e,domEvent:l}),o(e)},a.onMouseLeave=l=>{n==null||n({key:e,domEvent:l}),s(e)}),a}function oce(e){const{mode:t,rtl:r,inlineIndent:n}=y.useContext(hc);if(t!=="inline")return null;const i=e;return r?{paddingRight:i*n}:{paddingLeft:i*n}}function sce({icon:e,props:t,children:r}){let n;return e===null||e===!1?null:(typeof e=="function"?n=y.createElement(e,{...t}):typeof e!="boolean"&&(n=e),n||r||null)}function sM({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(Hn(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function C0(){return C0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{style:r,className:n,eventKey:i,warnKey:o,disabled:s,itemIcon:a,children:l,role:c,onMouseEnter:u,onMouseLeave:d,onClick:h,onKeyDown:p,onFocus:f,...g}=e,m=Qle(i),{prefixCls:v,onItemClick:b,disabled:S,overflowDisabled:x,itemIcon:T,selectedKeys:R,onActive:E}=y.useContext(hc),{_internalRenderMenuItem:M}=y.useContext(T3),D=`${v}-item`,A=y.useRef(),I=y.useRef(),_=S||s,F=xu(t,I),O=wC(i),k=X=>({key:i,keyPath:[...O].reverse(),item:A.current,domEvent:X}),B=a||T,{active:H,...N}=ice(i,_,u,d),z=R.includes(i),U=oce(O.length),V=X=>{if(_)return;const le=k(X);h==null||h(sM(le)),b(le)},G=X=>{if(p==null||p(X),X.which===Xt.ENTER){const le=k(X);h==null||h(sM(le)),b(le)}},K=X=>{E(i),f==null||f(X)},q={};e.role==="option"&&(q["aria-selected"]=z);let Y=y.createElement(QNe,C0({ref:A,elementRef:F,role:c===null?"none":c||"menuitem",tabIndex:s?null:-1,"data-menu-id":x&&m?null:m},En(g,["extra"]),N,q,{component:"li","aria-disabled":s,style:{...U,...r},className:ee(D,{[`${D}-active`]:H,[`${D}-selected`]:z,[`${D}-disabled`]:_},n),onClick:V,onKeyDown:G,onFocus:K}),l,y.createElement(sce,{props:{...e,isSelected:z},icon:B}));return M&&(Y=M(Y,e,{selected:z})),Y});function t2e(e,t){const{eventKey:r}=e,n=ND(),i=wC(r);return y.useEffect(()=>{if(n)return n.registerPath(r,i),()=>{n.unregisterPath(r,i)}},[i]),n?null:y.createElement(e2e,C0({},e,{ref:t}))}const Nx=y.forwardRef(t2e);function h$(){return h$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:i,mode:o,rtl:s}=y.useContext(hc);return y.createElement("ul",h$({className:ee(i,s&&`${i}-rtl`,`${i}-sub`,`${i}-${o==="inline"?"inline":"vertical"}`,e),role:"menu"},r,{"data-menu-list":!0,ref:n}),t)},ace=y.forwardRef(r2e);function P3(e,t){return Di(e).map((r,n)=>{var i;if(y.isValidElement(r)){const{key:o}=r;let s=((i=r.props)==null?void 0:i.eventKey)??o;s==null&&(s=`tmp_key-${[...t,n].join("-")}`);const l={key:s,eventKey:s};return y.cloneElement(r,l)}return r})}const es={adjustX:1,adjustY:1},n2e={topLeft:{points:["bl","tl"],overflow:es},topRight:{points:["br","tr"],overflow:es},bottomLeft:{points:["tl","bl"],overflow:es},bottomRight:{points:["tr","br"],overflow:es},leftTop:{points:["tr","tl"],overflow:es},leftBottom:{points:["br","bl"],overflow:es},rightTop:{points:["tl","tr"],overflow:es},rightBottom:{points:["bl","br"],overflow:es}},i2e={topLeft:{points:["bl","tl"],overflow:es},topRight:{points:["br","tr"],overflow:es},bottomLeft:{points:["tl","bl"],overflow:es},bottomRight:{points:["tr","br"],overflow:es},rightTop:{points:["tr","tl"],overflow:es},rightBottom:{points:["br","bl"],overflow:es},leftTop:{points:["tl","tr"],overflow:es},leftBottom:{points:["bl","br"],overflow:es}};function lce(e,t,r){if(t)return t;if(r)return r[e]||r.other}const o2e={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function s2e({prefixCls:e,visible:t,children:r,popup:n,popupStyle:i,popupClassName:o,popupOffset:s,disabled:a,mode:l,onVisibleChange:c}){const{getPopupContainer:u,rtl:d,subMenuOpenDelay:h,subMenuCloseDelay:p,builtinPlacements:f,triggerSubMenuAction:g,forceSubMenuRender:m,rootClassName:v,motion:b,defaultMotions:S}=y.useContext(hc),[x,T]=y.useState(!1),R=d?{...i2e,...f}:{...n2e,...f},E=o2e[l],M=lce(l,b,S),D=y.useRef(M);l!=="inline"&&(D.current=M);const A={...D.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},I=y.useRef();return y.useEffect(()=>(I.current=Lr(()=>{T(t)}),()=>{Lr.cancel(I.current)}),[t]),y.createElement(MD,{prefixCls:e,popupClassName:ee(`${e}-popup`,{[`${e}-rtl`]:d},o,v),stretch:l==="horizontal"?"minWidth":null,getPopupContainer:u,builtinPlacements:R,popupPlacement:E,popupVisible:x,popup:n,popupStyle:i,popupAlign:s&&{offset:s},action:a?[]:[g],mouseEnterDelay:h,mouseLeaveDelay:p,onPopupVisibleChange:c,forceRender:m,popupMotion:A,fresh:!0},r)}function p$(){return p$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current&&h(!1)},[c]);const f={...lce(i,a,l)};r.length>1&&(f.motionAppear=!1);const g=f.onVisibleChanged;return f.onVisibleChanged=m=>(!u.current&&!m&&h(!0),g==null?void 0:g(m)),d?null:y.createElement(y0,{mode:i,locked:!u.current},y.createElement(uu,p$({visible:p},f,{forceRender:s,removeOnLeave:!1,leavedClassName:`${o}-hidden`}),({className:m,style:v})=>y.createElement(ace,{id:e,className:m,style:v},n)))}function b0(){return b0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{style:r,className:n,styles:i,classNames:o,title:s,eventKey:a,warnKey:l,disabled:c,internalPopupClose:u,children:d,itemIcon:h,expandIcon:p,popupClassName:f,popupOffset:g,popupStyle:m,onClick:v,onMouseEnter:b,onMouseLeave:S,onTitleClick:x,onTitleMouseEnter:T,onTitleMouseLeave:R,popupRender:E,...M}=e,D=Qle(a),{prefixCls:A,mode:I,openKeys:_,disabled:F,overflowDisabled:O,activeKey:k,selectedKeys:B,itemIcon:H,expandIcon:N,onItemClick:z,onOpenChange:U,onActive:V,popupRender:G}=y.useContext(hc),{_internalRenderSubMenuItem:K}=y.useContext(T3),{isSubPathKey:q}=y.useContext(rce),Y=wC(),X=`${A}-submenu`,le=F||c,re=y.useRef(),ne=y.useRef(),se=h??H,de=p??N,te=_.includes(a),ie=!O&&te,pe=q(B,a),{active:Z,...ue}=ice(a,le,T,R),[ve,he]=y.useState(!1),me=Ie=>{le||he(Ie)},Oe=Ie=>{me(!0),b==null||b({key:a,domEvent:Ie})},Pe=Ie=>{me(!1),S==null||S({key:a,domEvent:Ie})},Me=y.useMemo(()=>Z||(I!=="inline"?ve||q([k],a):!1),[I,Z,k,ve,a,q]),He=oce(Y.length),Ge=Ie=>{le||(x==null||x({key:a,domEvent:Ie}),I==="inline"&&U(a,!te))},Ct=YS(Ie=>{v==null||v(sM(Ie)),z(Ie)}),Ht=Ie=>{I!=="inline"&&U(a,Ie)},St=()=>{V(a)},Ye=D&&`${D}-popup`,Fe=y.useMemo(()=>y.createElement(sce,{icon:I!=="horizontal"?de:void 0,props:{...e,isOpen:ie,isSubMenu:!0}},y.createElement("i",{className:`${X}-arrow`})),[I,de,e,ie,X]);let et=y.createElement("div",b0({role:"menuitem",style:He,className:`${X}-title`,tabIndex:le?null:-1,ref:re,title:typeof s=="string"?s:null,"data-menu-id":O&&D?null:D,"aria-expanded":ie,"aria-haspopup":!0,"aria-controls":Ye,"aria-disabled":le,onClick:Ge,onFocus:St},ue),s,Fe);const Ne=y.useRef(I);I!=="inline"&&Y.length>1?Ne.current="vertical":Ne.current=I;const tt=Ne.current,nt=y.useMemo(()=>{const Ie=y.createElement(y0,{classNames:o,styles:i,mode:tt==="horizontal"?"vertical":tt},y.createElement(ace,{id:Ye,ref:ne},d)),rt=E||G;return rt?rt(Ie,{item:e,keys:Y}):Ie},[E,G,Y,Ye,d,e,tt]);if(!O){const Ie=Ne.current;et=y.createElement(s2e,{mode:Ie,prefixCls:X,visible:!u&&ie&&I!=="inline",popupClassName:f,popupOffset:g,popupStyle:m,popup:nt,disabled:le,onVisibleChange:Ht},et)}let Ke=y.createElement(vd.Item,b0({ref:t,role:"none"},M,{component:"li",style:r,className:ee(X,`${X}-${I}`,n,{[`${X}-open`]:ie,[`${X}-active`]:Me,[`${X}-selected`]:pe,[`${X}-disabled`]:le}),onMouseEnter:Oe,onMouseLeave:Pe}),et,!O&&y.createElement(a2e,{id:Ye,open:ie,keyPath:Y},d));return K&&(Ke=K(Ke,e,{selected:pe,active:Me,open:ie,disabled:le})),y.createElement(y0,{classNames:o,styles:i,onItemClick:Ct,mode:I==="horizontal"?"vertical":I,itemIcon:se,expandIcon:de},Ke)}),BD=y.forwardRef((e,t)=>{const{eventKey:r,children:n}=e,i=wC(r),o=P3(n,i),s=ND();y.useEffect(()=>{if(s)return s.registerPath(r,i),()=>{s.unregisterPath(r,i)}},[i]);let a;return s?a=o:a=y.createElement(l2e,b0({ref:t},e),o),y.createElement(tce.Provider,{value:i},a)});function M3({className:e,style:t}){const{prefixCls:r}=y.useContext(hc);return ND()?null:y.createElement("li",{role:"separator",className:ee(`${r}-item-divider`,e),style:t})}function aM(){return aM=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:r,title:n,eventKey:i,children:o,...s}=e,{prefixCls:a,classNames:l,styles:c}=y.useContext(hc),u=`${a}-item-group`;return y.createElement("li",aM({ref:t,role:"presentation"},s,{onClick:d=>d.stopPropagation(),className:ee(u,r)}),y.createElement("div",{role:"presentation",className:ee(`${u}-title`,l==null?void 0:l.listTitle),style:c==null?void 0:c.listTitle,title:typeof n=="string"?n:void 0},n),y.createElement("ul",{role:"group",className:ee(`${u}-list`,l==null?void 0:l.list),style:c==null?void 0:c.list},o))}),I3=y.forwardRef((e,t)=>{const{eventKey:r,children:n}=e,i=wC(r),o=P3(n,i);return ND()?o:y.createElement(c2e,aM({ref:t},En(e,["warnKey"])),o)});function Qv(){return Qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(a&&typeof a=="object"){const{label:c,children:u,key:d,type:h,extra:p,...f}=a,g=d??`tmp-${l}`;return u||h==="group"?h==="group"?y.createElement(i,Qv({key:g},f,{title:c}),f$(u,t,r)):y.createElement(o,Qv({key:g},f,{title:c}),f$(u,t,r)):h==="divider"?y.createElement(s,Qv({key:g},f)):y.createElement(n,Qv({key:g},f,{extra:p}),c,(!!p||p===0)&&y.createElement("span",{className:`${r}-item-extra`},p))}return null}).filter(a=>a)}function $K(e,t,r,n,i){let o=e;const s={divider:M3,item:Nx,group:I3,submenu:BD,...n};return t&&(o=f$(t,s,i)),P3(o,r)}function g$(){return g$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var _t;const{prefixCls:r="rc-menu",rootClassName:n,style:i,className:o,styles:s,classNames:a,tabIndex:l=0,items:c,children:u,direction:d,id:h,mode:p="vertical",inlineCollapsed:f,disabled:g,disabledOverflow:m,subMenuOpenDelay:v=.1,subMenuCloseDelay:b=.1,forceSubMenuRender:S,defaultOpenKeys:x,openKeys:T,activeKey:R,defaultActiveFirst:E,selectable:M=!0,multiple:D=!1,defaultSelectedKeys:A,selectedKeys:I,onSelect:_,onDeselect:F,inlineIndent:O=24,motion:k,defaultMotions:B,triggerSubMenuAction:H="hover",builtinPlacements:N,itemIcon:z,expandIcon:U,overflowedIndicator:V="...",overflowedIndicatorPopupClassName:G,getPopupContainer:K,onClick:q,onOpenChange:Y,onKeyDown:X,openAnimation:le,openTransitionName:re,_internalRenderMenuItem:ne,_internalRenderSubMenuItem:se,_internalComponents:de,popupRender:te,...ie}=e,[pe,Z]=y.useMemo(()=>[$K(u,c,gf,de,r),$K(u,c,gf,{},r)],[u,c,de]),[ue,ve]=y.useState(!1),he=y.useRef(),me=Tu(h?`rc-menu-uuid-${h}`:"rc-menu-uuid"),Oe=d==="rtl",[Pe,Me]=Fn(x,T),He=Pe||gf,Ge=(At,dt=!1)=>{function mt(){Me(At),Y==null||Y(At)}dt?ac.flushSync(mt):mt()},[Ct,Ht]=y.useState(He),St=y.useRef(!1),[Ye,Fe]=y.useMemo(()=>(p==="inline"||p==="vertical")&&f?["vertical",f]:[p,!1],[p,f]),et=Ye==="inline",[Ne,tt]=y.useState(Ye),[nt,Ke]=y.useState(Fe);y.useEffect(()=>{tt(Ye),Ke(Fe),St.current&&(et?Me(Ct):Ge(gf))},[Ye,Fe]);const[Ie,rt]=y.useState(0),Tt=Ie>=pe.length-1||Ne!=="horizontal"||m;y.useEffect(()=>{et&&Ht(He)},[He]),y.useEffect(()=>(St.current=!0,()=>{St.current=!1}),[]);const{registerPath:Rt,unregisterPath:Bt,refreshOverflowKeys:Qt,isSubPathKey:ft,getKeyPath:ut,getKeys:Yt,getSubPathKeys:hr}=JNe(),Je=y.useMemo(()=>({registerPath:Rt,unregisterPath:Bt}),[Rt,Bt]),ot=y.useMemo(()=>({isSubPathKey:ft}),[ft]);y.useEffect(()=>{Qt(Tt?gf:pe.slice(Ie+1).map(At=>At.key))},[Ie,Tt]);const[De,Pt]=Fn(R||E&&((_t=pe[0])==null?void 0:_t.key),R),Qe=YS(At=>{Pt(At)}),$e=YS(()=>{Pt(void 0)});y.useImperativeHandle(t,()=>({list:he.current,focus:At=>{var rr,mn;const dt=Yt(),{elements:mt,key2element:It,element2key:Zt}=oM(dt,me),Ft=E3(he.current,mt);let cr;De&&dt.includes(De)?cr=De:cr=Ft[0]?Zt.get(Ft[0]):(rr=pe.find(un=>!un.props.disabled))==null?void 0:rr.key;const fr=It.get(cr);cr&&fr&&((mn=fr==null?void 0:fr.focus)==null||mn.call(fr,At))},findItem:({key:At})=>{const dt=Yt(),{key2element:mt}=oM(dt,me);return mt.get(At)||null}}));const[oe,ce]=Fn(A||[],I),ge=y.useMemo(()=>Array.isArray(oe)?oe:oe==null?gf:[oe],[oe]),Te=At=>{if(M){const{key:dt}=At,mt=ge.includes(dt);let It;D?mt?It=ge.filter(Ft=>Ft!==dt):It=[...ge,dt]:It=[dt],ce(It);const Zt={...At,selectedKeys:It};mt?F==null||F(Zt):_==null||_(Zt)}!D&&He.length&&Ne!=="inline"&&Ge(gf)},ke=YS(At=>{q==null||q(sM(At)),Te(At)}),Ze=YS((At,dt)=>{let mt=He.filter(It=>It!==At);if(dt)mt.push(At);else if(Ne!=="inline"){const It=hr(At);mt=mt.filter(Zt=>!It.has(Zt))}cc(He,mt,!0)||Ge(mt,!0)}),st=YNe(Ne,De,Oe,me,he,Yt,ut,Pt,(At,dt)=>{const mt=dt??!He.includes(At);Ze(At,mt)},X);y.useEffect(()=>{ve(!0)},[]);const it=y.useMemo(()=>({_internalRenderMenuItem:ne,_internalRenderSubMenuItem:se}),[ne,se]),bt=Ne!=="horizontal"||m?pe:pe.map((At,dt)=>y.createElement(y0,{key:At.key,overflowDisabled:dt>Ie,classNames:a,styles:s},At)),Mt=y.createElement(vd,g$({id:h,ref:he,prefixCls:`${r}-overflow`,component:"ul",itemComponent:Nx,className:ee(r,`${r}-root`,`${r}-${Ne}`,o,{[`${r}-inline-collapsed`]:nt,[`${r}-rtl`]:Oe},n),dir:d,style:i,role:"menu",tabIndex:l,data:bt,renderRawItem:At=>At,renderRawRest:At=>{const dt=At.length,mt=dt?pe.slice(-dt):null;return y.createElement(BD,{eventKey:d$,title:V,disabled:Tt,internalPopupClose:dt===0,popupClassName:G},mt)},maxCount:Ne!=="horizontal"||m?vd.INVALIDATE:vd.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:At=>{rt(At)},onKeyDown:st},ie));return y.createElement(T3.Provider,{value:it},y.createElement(Zle.Provider,{value:me},y.createElement(y0,{prefixCls:r,rootClassName:n,classNames:a,styles:s,mode:Ne,openKeys:He,rtl:Oe,disabled:g,motion:ue?k:null,defaultMotions:ue?B:null,activeKey:De,onActive:Qe,onInactive:$e,selectedKeys:ge,inlineIndent:O,subMenuOpenDelay:v,subMenuCloseDelay:b,forceSubMenuRender:S,builtinPlacements:N,triggerSubMenuAction:H,getPopupContainer:K,itemIcon:z,expandIcon:U,onItemClick:ke,onOpenChange:Ze,popupRender:te},y.createElement(rce.Provider,{value:ot},Mt),y.createElement("div",{style:{display:"none"},"aria-hidden":!0},y.createElement(ece.Provider,{value:Je},Z)))))}),xC=u2e;xC.Item=Nx;xC.SubMenu=BD;xC.ItemGroup=I3;xC.Divider=M3;const cce=y.createContext({});var d2e={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"};function m$(){return m$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,m$({},e,{ref:t,icon:d2e})),D3=y.forwardRef(h2e),lM=y.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),uce=e=>{const{prefixCls:t,className:r,dashed:n,...i}=e,{getPrefixCls:o}=y.useContext(or),s=o("menu",t),a=ee({[`${s}-item-divider-dashed`]:!!n},r);return y.createElement(M3,{className:a,...i})},dce=e=>{var E,M;const{className:t,children:r,icon:n,title:i,danger:o,extra:s}=e,{prefixCls:a,firstLevel:l,direction:c,disableMenuItemTitleTooltip:u,tooltip:d,inlineCollapsed:h,styles:p,classNames:f}=y.useContext(lM),g=D=>{var _,F;const A=r==null?void 0:r[0],I=y.createElement("span",{className:ee(`${a}-title-content`,l?f==null?void 0:f.itemContent:(_=f==null?void 0:f.subMenu)==null?void 0:_.itemContent,{[`${a}-title-content-with-extra`]:!!s||s===0}),style:l?p==null?void 0:p.itemContent:(F=p==null?void 0:p.subMenu)==null?void 0:F.itemContent},r);return(!n||y.isValidElement(r)&&r.type==="span")&&r&&D&&l&&typeof A=="string"?y.createElement("div",{className:`${a}-inline-collapsed-noicon`},A.charAt(0)):I},{siderCollapsed:m}=y.useContext(cce);let v=i;typeof i>"u"?v=l?r:"":i===!1&&(v="");const b=d===!1?void 0:d,S=b&&b.title!==void 0?b.title:v,x={...b??null,title:S};!m&&!h&&(x.title=null,x.open=!1);const T=Di(r).length;let R=y.createElement(Nx,{...En(e,["title","icon","danger"]),className:ee(l?f==null?void 0:f.item:(E=f==null?void 0:f.subMenu)==null?void 0:E.item,{[`${a}-item-danger`]:o,[`${a}-item-only-child`]:(n?T+1:T)===1},t),style:{...l?p==null?void 0:p.item:(M=p==null?void 0:p.subMenu)==null?void 0:M.item,...e.style},title:typeof i=="string"?i:void 0},Ui(n,D=>{var A,I;return{className:ee(`${a}-item-icon`,l?f==null?void 0:f.itemIcon:(A=f==null?void 0:f.subMenu)==null?void 0:A.itemIcon,D.className),style:{...l?p==null?void 0:p.itemIcon:(I=p==null?void 0:p.subMenu)==null?void 0:I.itemIcon,...D.style}}}),g(h));if(!u&&d!==!1){const D=b&&b.placement?b.placement:c==="rtl"?"left":"right",A=`${a}-inline-collapsed-tooltip`,I=F=>({...F,root:ee(A,F==null?void 0:F.root)}),_=b&&typeof b.classNames=="function"?F=>{const O=b.classNames(F);return I(O)}:I(b==null?void 0:b.classNames);R=y.createElement(pu,{...x,placement:D,classNames:_},R)}return R},cM=y.createContext(null),hce=y.forwardRef((e,t)=>{const{children:r,...n}=e,i=y.useContext(cM),o=y.useMemo(()=>({...i,...n}),[i,n.prefixCls,n.mode,n.selectable,n.rootClassName]),s=QPe(r),a=xu(t,s?zd(r):null);return y.createElement(cM.Provider,{value:o},y.createElement(Sp,{space:!0},s?y.cloneElement(r,{ref:a}):r))}),p2e=e=>{const{componentCls:t,motionDurationSlow:r,horizontalLineHeight:n,colorSplit:i,lineWidth:o,lineType:s,itemPaddingInline:a}=e;return{[`${t}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${ae(o)} ${s} ${i}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:a},[`> ${t}-item:hover, > ${t}-item-active, > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:["border-color","background-color"].map(l=>`${l} ${r}`).join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},f2e=({componentCls:e,menuArrowOffset:t,calc:r})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical, ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${ae(r(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${ae(t)})`}}}}),GK=e=>uc(e),VK=(e,t)=>{const{componentCls:r,itemColor:n,itemSelectedColor:i,subMenuItemSelectedColor:o,groupTitleColor:s,itemBg:a,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:h,motionDurationSlow:p,motionEaseInOut:f,motionEaseOut:g,itemPaddingInline:m,motionDurationMid:v,itemHoverColor:b,lineType:S,colorSplit:x,itemDisabledColor:T,dangerItemColor:R,dangerItemHoverColor:E,dangerItemSelectedColor:M,dangerItemActiveBg:D,dangerItemSelectedBg:A,popupBg:I,itemHoverBg:_,itemActiveBg:F,menuSubMenuBg:O,horizontalItemSelectedColor:k,horizontalItemSelectedBg:B,horizontalItemBorderRadius:H,horizontalItemHoverBg:N}=e;return{[`${r}-${t}, ${r}-${t} > ${r}`]:{color:n,background:a,[`&${r}-root:focus-visible`]:{...GK(e)},[`${r}-item`]:{"&-group-title, &-extra":{color:s}},[`${r}-submenu-selected > ${r}-submenu-title`]:{color:o},[`${r}-item, ${r}-submenu-title`]:{color:n,[`&:not(${r}-item-disabled):focus-visible`]:{...GK(e)}},[`${r}-item-disabled, ${r}-submenu-disabled`]:{color:`${T} !important`},[`${r}-item:not(${r}-item-selected):not(${r}-submenu-selected)`]:{[`&:hover, > ${r}-submenu-title:hover`]:{color:b}},[`&:not(${r}-horizontal)`]:{[`${r}-item:not(${r}-item-selected)`]:{"&:hover":{backgroundColor:_},"&:active":{backgroundColor:F}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:_},"&:active":{backgroundColor:F}}},[`${r}-item-danger`]:{color:R,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:E}},[`&${r}-item:active`]:{background:D}},[`${r}-item a`]:{"&, &:hover":{color:"inherit"}},[`${r}-item-selected`]:{color:i,[`&${r}-item-danger`]:{color:M},"a, a:hover":{color:"inherit"}},[`& ${r}-item-selected`]:{backgroundColor:c,[`&${r}-item-danger`]:{backgroundColor:A}},[`&${r}-submenu > ${r}`]:{backgroundColor:O},[`&${r}-popup > ${r}`]:{backgroundColor:I},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:I},[`&${r}-horizontal`]:{...t==="dark"?{borderBottom:0}:{},[`> ${r}-item, > ${r}-submenu`]:{top:h,marginTop:e.calc(h).mul(-1).equal(),marginBottom:0,borderRadius:H,"&::after":{position:"absolute",insetInline:m,bottom:0,borderBottom:`${ae(u)} solid transparent`,transition:`border-color ${p} ${f}`,content:'""'},"&:hover, &-active, &-open":{background:N,"&::after":{borderBottomWidth:u,borderBottomColor:k}},"&-selected":{color:k,backgroundColor:B,"&:hover":{backgroundColor:B},"&::after":{borderBottomWidth:u,borderBottomColor:k}}}},[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${ae(h)} ${S} ${x}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:l},[`${r}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${ae(d)} solid ${i}`,transform:"scaleY(0.0001)",opacity:0,transition:["transform","opacity"].map(z=>`${z} ${v} ${g}`).join(","),content:'""'},[`&${r}-item-danger`]:{"&::after":{borderInlineEndColor:M}}},[`${r}-selected, ${r}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform","opacity"].map(z=>`${z} ${v} ${f}`).join(",")}}}}}},zK=e=>{const{componentCls:t,itemHeight:r,itemMarginInline:n,padding:i,menuArrowSize:o,marginXS:s,itemMarginBlock:a,itemWidth:l,itemPaddingInline:c}=e,u=e.calc(o).add(i).add(s).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:r,lineHeight:ae(r),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:a,width:l},[`> ${t}-item, > ${t}-submenu > ${t}-submenu-title`]:{height:r,lineHeight:ae(r)},[`${t}-item-group-list ${t}-submenu-title, ${t}-submenu-title`]:{paddingInlineEnd:u}}},g2e=e=>{const{componentCls:t,iconCls:r,itemHeight:n,colorTextLightSolid:i,dropdownWidth:o,controlHeightLG:s,motionEaseOut:a,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:h,paddingXS:p,boxShadowSecondary:f,collapsedWidth:g,collapsedIconSize:m}=e,v={height:n,lineHeight:ae(n),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:"none"},...zK(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...zK(e),boxShadow:f}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:o,maxHeight:`calc(100vh - ${ae(e.calc(s).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 ${h}`,`background-color ${h}`,`padding ${d} ${a}`].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`]:v,[`& ${t}-item-group-title`]:{paddingInlineStart:l}},[`${t}-item`]:v}},{[`${t}-inline-collapsed`]:{width:g,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${t}-item, > ${t}-item-group > ${t}-item-group-list > ${t}-item, > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title, > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${ae(e.calc(m).div(2).equal())} - ${ae(c)})`,textOverflow:"clip",[` ${t}-submenu-arrow, ${t}-submenu-expand-icon `]:{opacity:0},[`${t}-item-icon, ${r}`]:{margin:0,fontSize:m,lineHeight:ae(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`]:{...La,paddingInline:p}}}]},HK=e=>{const{componentCls:t,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:i,motionEaseOut:o,iconCls:s,iconSize:a,iconMarginInlineEnd:l}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${r}`,`background-color ${r}`,`padding calc(${r} + 0.1s) ${i}`].join(","),[`${t}-item-icon, ${s}`]:{minWidth:a,fontSize:a,transition:[`font-size ${n} ${o}`,`margin ${r} ${i}`,`color ${r}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${r} ${i}`,`margin ${r}`,`color ${r}`].join(",")}},[`${t}-item-icon`]:{...vx()},[`&${t}-item-only-child`]:{[`> ${s}, > ${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"}}}},WK=e=>{const{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,borderRadius:i,menuArrowSize:o,menuArrowOffset:s}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:o,color:"currentcolor",transform:"translateY(-50%)",transition:["transform","opacity"].map(a=>`${a} ${r}`).join(",")},"&-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-color","transform","top","color"].map(a=>`${a} ${r} ${n}`).join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${ae(e.calc(s).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${ae(s)})`}}}}},m2e=e=>{const{antCls:t,componentCls:r,fontSize:n,motionDurationSlow:i,motionDurationMid:o,motionEaseInOut:s,paddingXS:a,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:h,subMenuItemBorderRadius:p,menuArrowSize:f,menuArrowOffset:g,lineType:m,groupTitleLineHeight:v,groupTitleFontSize:b}=e;return[{"":{[r]:{...Cp(),"&-hidden":{display:"none"}}},[`${r}-submenu-hidden`]:{display:"none"}},{[r]:{...cn(e),...Cp(),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:`${ae(a)} ${ae(l)}`,fontSize:b,lineHeight:v,transition:`all ${i}`},[`&-horizontal ${r}-submenu`]:{transition:["border-color","background-color"].map(S=>`${S} ${i} ${s}`).join(",")},[`${r}-submenu, ${r}-submenu-inline`]:{transition:[`border-color ${i}`,`background-color ${i}`,`padding ${o}`].map(S=>`${S} ${s}`).join(",")},[`${r}-submenu ${r}-sub`]:{cursor:"initial",transition:["background-color","padding"].map(S=>`${S} ${i} ${s}`).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:c,borderStyle:m,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}},...HK(e),[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${ae(e.calc(n).mul(2).equal())} ${ae(l)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:h,boxShadow:"none",transformOrigin:"0 0",[`&${r}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${r}`]:{borderRadius:h,...HK(e),...WK(e),[`${r}-item, ${r}-submenu > ${r}-submenu-title`]:{borderRadius:p},[`${r}-submenu-title::after`]:{transition:`transform ${i} ${s}`}}},"\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}},...WK(e),[`&-inline-collapsed ${r}-submenu-arrow, &-inline ${r}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${ae(g)})`},"&::after":{transform:`rotate(45deg) translateX(${ae(e.calc(g).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${ae(e.calc(f).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${ae(e.calc(g).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${ae(g)})`}}}},{[`${t}-layout-header`]:{[r]:{lineHeight:"inherit"}}}]},v2e=e=>{const{colorPrimary:t,colorError:r,colorTextDisabled:n,colorErrorBg:i,colorText:o,colorTextDescription:s,colorBgContainer:a,colorFillAlter:l,colorFillContent:c,lineWidth:u,lineWidthBold:d,controlItemBgActive:h,colorBgTextHover:p,controlHeightLG:f,lineHeight:g,colorBgElevated:m,marginXXS:v,padding:b,fontSize:S,controlHeightSM:x,fontSizeLG:T,colorTextLightSolid:R,colorErrorHover:E}=e,M=e.activeBarWidth??0,D=e.activeBarBorderWidth??u,A=e.itemMarginInline??e.marginXXS,I=new an(R).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:o,itemColor:o,colorItemTextHover:o,itemHoverColor:o,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:s,groupTitleColor:s,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:a,itemBg:a,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:c,itemActiveBg:h,colorSubItemBg:l,subMenuItemBg:l,colorItemBgSelected:h,itemSelectedBg:h,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:M,colorActiveBarHeight:d,activeBarHeight:d,colorActiveBarBorderSize:u,activeBarBorderWidth:D,colorItemTextDisabled:n,itemDisabledColor:n,colorDangerItemText:r,dangerItemColor:r,colorDangerItemTextHover:r,dangerItemHoverColor:r,colorDangerItemTextSelected:r,dangerItemSelectedColor:r,colorDangerItemBgActive:i,dangerItemActiveBg:i,colorDangerItemBgSelected:i,dangerItemSelectedBg:i,itemMarginInline:A,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:f,groupTitleLineHeight:g,collapsedWidth:f*2,popupBg:m,itemMarginBlock:v,itemPaddingInline:b,horizontalLineHeight:`${f*1.15}px`,iconSize:S,iconMarginInlineEnd:x-S,collapsedIconSize:T,groupTitleFontSize:S,darkItemDisabledColor:new an(R).setA(.25).toRgbString(),darkItemColor:I,darkDangerItemColor:r,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:R,darkItemSelectedBg:t,darkDangerItemSelectedBg:r,darkItemHoverBg:"transparent",darkGroupTitleColor:I,darkItemHoverColor:R,darkDangerItemHoverColor:E,darkDangerItemSelectedColor:R,darkDangerItemActiveBg:r,itemWidth:M?`calc(100% + ${D}px)`:`calc(100% - ${A*2}px)`}},y2e=(e,t=e,r=!0)=>Yr("Menu",i=>{const{colorBgElevated:o,controlHeightLG:s,fontSize:a,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:h,darkItemSelectedBg:p,darkDangerItemSelectedBg:f,darkItemHoverBg:g,darkGroupTitleColor:m,darkItemHoverColor:v,darkItemDisabledColor:b,darkDangerItemHoverColor:S,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:T,popupBg:R,darkPopupBg:E}=i,M=i.calc(a).div(7).mul(5).equal(),D=Wr(i,{menuArrowSize:M,menuHorizontalHeight:i.calc(s).mul(1.15).equal(),menuArrowOffset:i.calc(M).mul(.25).equal(),menuSubMenuBg:o,calc:i.calc,popupBg:R}),A=Wr(D,{itemColor:l,itemHoverColor:v,groupTitleColor:m,itemSelectedColor:h,subMenuItemSelectedColor:h,itemBg:u,popupBg:E,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:p,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:g,itemDisabledColor:b,dangerItemColor:c,dangerItemHoverColor:S,dangerItemSelectedColor:x,dangerItemActiveBg:T,dangerItemSelectedBg:f,menuSubMenuBg:d,horizontalItemSelectedColor:h,horizontalItemSelectedBg:p});return[m2e(D),p2e(D),g2e(D),VK(D,"light"),VK(A,"dark"),f2e(D),$ae(D),bp(D,"slide-up"),bp(D,"slide-down"),Rx(D,"zoom-big")]},v2e,{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),pce=e=>{var g,m,v,b,S,x;const{popupClassName:t,icon:r,title:n,theme:i}=e,o=y.useContext(lM),{prefixCls:s,inlineCollapsed:a,theme:l,classNames:c,styles:u}=o,d=wC();let h;if(!r)h=a&&!d.length&&n&&typeof n=="string"?y.createElement("div",{className:`${s}-inline-collapsed-noicon`},n.charAt(0)):y.createElement("span",{className:`${s}-title-content`},n);else{const T=y.isValidElement(n)&&n.type==="span";h=y.createElement(y.Fragment,null,Ui(r,R=>({className:ee(R.className,`${s}-item-icon`,c==null?void 0:c.itemIcon),style:{...R.style,...u==null?void 0:u.itemIcon}})),T?n:y.createElement("span",{className:`${s}-title-content`},n))}const p=y.useMemo(()=>({...o,firstLevel:!1}),[o]),[f]=$p("Menu");return y.createElement(lM.Provider,{value:p},y.createElement(BD,{...En(e,["icon"]),title:h,classNames:{list:(g=c==null?void 0:c.subMenu)==null?void 0:g.list,listTitle:(m=c==null?void 0:c.subMenu)==null?void 0:m.itemTitle},styles:{list:(v=u==null?void 0:u.subMenu)==null?void 0:v.list,listTitle:(b=u==null?void 0:u.subMenu)==null?void 0:b.itemTitle},popupClassName:ee(s,t,(S=c==null?void 0:c.popup)==null?void 0:S.root,`${s}-${i||l}`),popupStyle:{zIndex:f,...e.popupStyle,...(x=u==null?void 0:u.popup)==null?void 0:x.root}}))};function $_(e){return e===null||e===!1}const C2e={item:dce,submenu:pce,divider:uce},b2e=y.forwardRef((e,t)=>{var se;const r=y.useContext(cM),n=r||{},{prefixCls:i,className:o,style:s,theme:a="light",expandIcon:l,_internalDisableMenuItemTitleTooltip:c,tooltip:u,inlineCollapsed:d,siderCollapsed:h,rootClassName:p,mode:f,selectable:g,onClick:m,overflowedIndicatorPopupClassName:v,classNames:b,styles:S,...x}=e,{menu:T}=y.useContext(or),{getPrefixCls:R,getPopupContainer:E,direction:M,className:D,style:A,classNames:I,styles:_}=Ur("menu"),F=R(),O=En(x,["collapsedWidth"]);(se=n.validator)==null||se.call(n,{mode:f});const k=br((...de)=>{var te;m==null||m(...de),(te=n.onClick)==null||te.call(n)}),B=n.mode||f,H=g??n.selectable,N=d??h,z={...e,mode:B,inlineCollapsed:N,selectable:H,theme:a},[U,V]=jr([I,b],[_,S],{props:z},{popup:{_default:"root"},subMenu:{_default:"item"}}),G={horizontal:{motionName:`${F}-slide-up`},inline:kae(F),other:{motionName:`${F}-zoom-big`}},K=R("menu",i||n.prefixCls),q=co(K),[Y,X]=y2e(K,q,!r),le=ee(`${K}-${a}`,D,o),re=y.useMemo(()=>{var te;if(typeof l=="function"||$_(l))return l||null;if(typeof n.expandIcon=="function"||$_(n.expandIcon))return n.expandIcon||null;if(typeof(T==null?void 0:T.expandIcon)=="function"||$_(T==null?void 0:T.expandIcon))return(T==null?void 0:T.expandIcon)||null;const de=l??(n==null?void 0:n.expandIcon)??(T==null?void 0:T.expandIcon);return Ui(de,{className:ee(`${K}-submenu-expand-icon`,y.isValidElement(de)?(te=de.props)==null?void 0:te.className:void 0)})},[l,n==null?void 0:n.expandIcon,T==null?void 0:T.expandIcon,K]),ne=y.useMemo(()=>({prefixCls:K,inlineCollapsed:N||!1,direction:M,firstLevel:!0,theme:a,mode:B,disableMenuItemTitleTooltip:c,tooltip:u,classNames:U,styles:V}),[K,N,M,c,a,B,U,V,u]);return y.createElement(cM.Provider,{value:null},y.createElement(lM.Provider,{value:ne},y.createElement(xC,{getPopupContainer:E,overflowedIndicator:y.createElement(D3,null),overflowedIndicatorPopupClassName:ee(K,`${K}-${a}`,v),classNames:{list:U.list,listTitle:U.itemTitle},styles:{list:V.list,listTitle:V.itemTitle},mode:B,selectable:H,onClick:k,...O,inlineCollapsed:N,style:{...V.root,...A,...s},className:le,prefixCls:K,direction:M,defaultMotions:G,expandIcon:re,ref:t,rootClassName:ee(p,Y,n.rootClassName,X,q,U.root),_internalComponents:C2e})))}),TC=y.forwardRef((e,t)=>{const r=y.useRef(null),n=y.useContext(cce);return y.useImperativeHandle(t,()=>({menu:r.current,focus:i=>{var o;(o=r.current)==null||o.focus(i)}})),y.createElement(b2e,{ref:r,...e,...n})});TC.Item=dce;TC.SubMenu=pce;TC.Divider=uce;TC.ItemGroup=I3;const S2e=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}}}}}},w2e=e=>{const{componentCls:t,menuCls:r,zIndexPopup:n,dropdownArrowDistance:i,sizePopupArrow:o,antCls:s,iconCls:a,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:h,fontSizeIcon:p,controlPaddingHorizontal:f,colorBgElevated:g}=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${s}-btn`]:{[`& > ${a}-down, & > ${s}-btn-icon > ${a}-down`]:{fontSize:p}},[`${t}-wrap`]:{position:"relative",[`${s}-btn > ${a}-down`]:{fontSize:p},[`${a}-down::before`]:{transition:`transform ${l}`}},[`${t}-wrap-open`]:{[`${a}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${s}-slide-down-enter${s}-slide-down-enter-active${t}-placement-bottomLeft, &${s}-slide-down-appear${s}-slide-down-appear-active${t}-placement-bottomLeft, &${s}-slide-down-enter${s}-slide-down-enter-active${t}-placement-bottom, &${s}-slide-down-appear${s}-slide-down-appear-active${t}-placement-bottom, &${s}-slide-down-enter${s}-slide-down-enter-active${t}-placement-bottomRight, &${s}-slide-down-appear${s}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:e3},[`&${s}-slide-up-enter${s}-slide-up-enter-active${t}-placement-topLeft, &${s}-slide-up-appear${s}-slide-up-appear-active${t}-placement-topLeft, &${s}-slide-up-enter${s}-slide-up-enter-active${t}-placement-top, &${s}-slide-up-appear${s}-slide-up-appear-active${t}-placement-top, &${s}-slide-up-enter${s}-slide-up-enter-active${t}-placement-topRight, &${s}-slide-up-appear${s}-slide-up-appear-active${t}-placement-topRight`]:{animationName:r3},[`&${s}-slide-down-leave${s}-slide-down-leave-active${t}-placement-bottomLeft, &${s}-slide-down-leave${s}-slide-down-leave-active${t}-placement-bottom, &${s}-slide-down-leave${s}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:t3},[`&${s}-slide-up-leave${s}-slide-up-leave-active${t}-placement-topLeft, &${s}-slide-up-leave${s}-slide-up-leave-active${t}-placement-top, &${s}-slide-up-leave${s}-slide-up-leave-active${t}-placement-topRight`]:{animationName:n3}}},S3(e,g,{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`]:{...cn(e),[r]:{padding:d,listStyleType:"none",backgroundColor:g,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,...yl(e),"&:empty":{padding:0,boxShadow:"none"},[`${r}-item-group-title`]:{padding:`${ae(c)} ${ae(f)}`,color:e.colorTextDescription,transition:`all ${l}`},[`${r}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${r}-item-icon`]:{minWidth:u,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 ${l}`,"&: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`]:{display:"flex",margin:0,padding:`${ae(c)} ${ae(f)}`,color:e.colorText,fontWeight:"normal",fontSize:u,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...yl(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:h,cursor:"not-allowed","&:hover":{color:h,backgroundColor:g,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${ae(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:p,fontStyle:"normal"}}},[`${r}-item-group-list`]:{margin:`0 ${ae(e.marginXS)}`,padding:0,listStyle:"none"},[`${r}-submenu-title`]:{paddingInlineEnd:e.calc(f).add(e.fontSizeSM).equal()},[`${r}-submenu-vertical`]:{position:"relative"},[`${r}-submenu${r}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:h,backgroundColor:g,cursor:"not-allowed"}},[`${r}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[bp(e,"slide-up"),bp(e,"slide-down"),JP(e,"move-up"),JP(e,"move-down"),Rx(e,"zoom-big")]]},x2e=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...OD({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...b3(e)}),T2e=Yr("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:r,paddingXXS:n,componentCls:i}=e,o=Wr(e,{menuCls:`${i}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[w2e(o),S2e(o)]},x2e,{resetStyle:!1}),Bx=e=>{const{menu:t,arrow:r,prefixCls:n,children:i,trigger:o,disabled:s,dropdownRender:a,popupRender:l,getPopupContainer:c,overlayClassName:u,rootClassName:d,overlayStyle:h,open:p,onOpenChange:f,mouseEnterDelay:g=.15,mouseLeaveDelay:m=.1,autoAdjustOverflow:v=!0,placement:b="",transitionName:S,classNames:x,styles:T,destroyPopupOnHide:R,destroyOnHidden:E}=e,{getPrefixCls:M,direction:D,getPopupContainer:A,className:I,style:_,classNames:F,styles:O}=Ur("dropdown"),k={...e,mouseEnterDelay:g,mouseLeaveDelay:m,autoAdjustOverflow:v},[B,H]=jr([F,x],[O,T],{props:k}),N={..._,...h,...H.root},z=l||a;CC();const U=y.useMemo(()=>{const Pe=M();return S!==void 0?S:b.includes("top")?`${Pe}-slide-down`:`${Pe}-slide-up`},[M,b,S]),V=y.useMemo(()=>b?b.includes("Center")?b.slice(0,b.indexOf("Center")):b:D==="rtl"?"bottomRight":"bottomLeft",[b,D]),G=M("dropdown",n),K=co(G),[q,Y]=T2e(G,K),[,X]=ds(),le=y.Children.only(HNe(i)?y.createElement("span",null,i):i),re=Ui(le,{className:ee(`${G}-trigger`,{[`${G}-rtl`]:D==="rtl"},le.props.className),disabled:le.props.disabled??s}),ne=s?[]:o,se=!!(ne!=null&&ne.includes("contextMenu")),[de,te]=Fn(!1,p),ie=br(Pe=>{f==null||f(Pe,{source:"trigger"}),te(Pe)}),pe=ee(u,d,q,Y,K,I,B.root,{[`${G}-rtl`]:D==="rtl"}),Z=Gle({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:v,offset:X.marginXXS,arrowWidth:r?X.sizePopupArrow:0,borderRadius:X.borderRadius}),ue=br(()=>{t!=null&&t.selectable&&(t!=null&&t.multiple)||(f==null||f(!1,{source:"menu"}),te(!1))}),ve=()=>{const Pe=En(B,["root"]),Me=En(H,["root"]);let He;return t!=null&&t.items&&(He=y.createElement(TC,{...t,classNames:{...Pe,subMenu:{...Pe}},styles:{...Me,subMenu:{...Me}}})),z&&(He=z(He)),He=y.Children.only(typeof He=="string"?y.createElement("span",null,He):He),y.createElement(hce,{prefixCls:`${G}-menu`,rootClassName:ee(Y,K),expandIcon:y.createElement("span",{className:`${G}-menu-submenu-arrow`},D==="rtl"?y.createElement(s$,{className:`${G}-menu-submenu-arrow-icon`}):y.createElement(PB,{className:`${G}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ue,validator:({mode:Ge})=>{}},He)},[he,me]=$p("Dropdown",N.zIndex);let Oe=y.createElement(Xle,{alignPoint:se,...En(e,["rootClassName","onOpenChange"]),mouseEnterDelay:g,mouseLeaveDelay:m,visible:de,builtinPlacements:Z,arrow:!!r,overlayClassName:pe,prefixCls:G,getPopupContainer:c||A,transitionName:U,trigger:ne,overlay:ve,placement:V,onVisibleChange:ie,overlayStyle:{...N,zIndex:he},autoDestroy:E??R},re);return he&&(Oe=y.createElement(bx.Provider,{value:me},Oe)),Oe},E2e=d3(Bx,"align",void 0,"dropdown",e=>e),R2e=e=>y.createElement(E2e,{...e},y.createElement("span",null));Bx._InternalPanelDoNotUseOrYouWillBeFired=R2e;const $D=({children:e})=>{const{getPrefixCls:t}=y.useContext(or),r=t("breadcrumb"),n=y.useContext(x3),{classNames:i,styles:o}=n;return y.createElement("li",{className:ee(`${r}-separator`,i==null?void 0:i.separator),style:o==null?void 0:o.separator,"aria-hidden":"true"},e===""?e:e||"/")};$D.__ANT_BREADCRUMB_SEPARATOR=!0;function P2e(e,t){if(!xn(e.title))return null;const r=Object.keys(t).join("|");return typeof e.title=="object"?e.title:String(e.title).replace(new RegExp(`:(${r})`,"g"),(n,i)=>t[i]||n)}function fce(e,t,r,n){if(!xn(r))return null;const{className:i,onClick:o,...s}=t,a={...hi(s,{data:!0,aria:!0}),onClick:o};return n!==void 0?y.createElement("a",{...a,className:ee(`${e}-link`,i),href:n},r):y.createElement("span",{...a,className:ee(`${e}-link`,i)},r)}function M2e(e,t){return(n,i,o,s,a)=>{if(t)return t(n,i,o,s);const l=P2e(n,i);return fce(e,n,l,a)}}const gce=e=>{const{prefixCls:t,separator:r="/",children:n,menu:i,dropdownProps:o,href:s,dropdownIcon:a}=e,l=y.useContext(x3),{classNames:c,styles:u}=l,h=(p=>{if(i){const f={...o};if(i){const{items:g,...m}=i||{};f.menu={...m,items:g==null?void 0:g.map(({key:v,title:b,label:S,path:x,...T},R)=>{let E=S??b;return x&&(E=y.createElement("a",{href:`${s}${x}`},E)),{...T,key:v??R,label:E}})}}return y.createElement(Bx,{placement:"bottom",...f},y.createElement("span",{className:`${t}-overlay-link`},p,a))}return p})(n);return xn(h)?y.createElement(y.Fragment,null,y.createElement("li",{className:ee(`${t}-item`,c==null?void 0:c.item),style:u==null?void 0:u.item},h),r&&y.createElement($D,null,r)):null},mce=e=>{const{prefixCls:t,children:r,href:n,...i}=e,{getPrefixCls:o}=y.useContext(or),s=o("breadcrumb",t);return y.createElement(gce,{...i,prefixCls:s},fce(s,i,r,n))};mce.__ANT_BREADCRUMB_ITEM=!0;const I2e=e=>{const{componentCls:t,iconCls:r,calc:n}=e;return{[t]:{...cn(e),color:e.itemColor,fontSize:e.fontSize,[r]:{fontSize:e.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},[`${t}-item a`]:{color:e.linkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${ae(e.paddingXXS)}`,borderRadius:e.borderRadiusSM,height:e.fontHeight,display:"inline-block",marginInline:n(e.marginXXS).mul(-1).equal(),"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover},...yl(e)},[`${t}-item:last-child`]:{color:e.lastItemColor},[`${t}-separator`]:{marginInline:e.separatorMargin,color:e.separatorColor},[`${t}-link`]:{[` > ${r} + span, > ${r} + a `]:{marginInlineStart:e.marginXXS}},[`${t}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.fontHeight,display:"inline-block",padding:`0 ${ae(e.paddingXXS)}`,marginInline:n(e.marginXXS).mul(-1).equal(),[`> ${r}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover,a:{color:e.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}}}},D2e=e=>({itemColor:e.colorTextDescription,lastItemColor:e.colorText,iconFontSize:e.fontSize,linkColor:e.colorTextDescription,linkHoverColor:e.colorText,separatorColor:e.colorTextDescription,separatorMargin:e.marginXS}),A2e=Yr("Breadcrumb",e=>{const t=Wr(e,{});return I2e(t)},D2e);function F2e(e){const{breadcrumbName:t,children:r,...n}=e,i={title:t,...n};return r&&(i.menu={items:r.map(({breadcrumbName:o,...s})=>({...s,title:o}))}),i}function L2e(e,t){return y.useMemo(()=>e||(t?t.map(F2e):null),[e,t])}const _2e=(e,t)=>{if(t===void 0)return t;let r=(t||"").replace(/^\//,"");return Object.keys(e).forEach(n=>{r=r.replace(`:${n}`,e[n])}),r},O2e=e=>{const{prefixCls:t,separator:r,style:n,className:i,rootClassName:o,routes:s,items:a,children:l,itemRender:c,params:u={},classNames:d,styles:h,dropdownIcon:p,...f}=e,{getPrefixCls:g,direction:m,className:v,style:b,classNames:S,styles:x,separator:T,dropdownIcon:R}=Ur("breadcrumb"),E=r??T??"/",M=p??R??y.createElement(_D,null);let D;const A=g("breadcrumb",t),[I,_]=A2e(A),F=L2e(a,s),O=y.useMemo(()=>({...e,separator:E}),[e,E]),[k,B]=jr([S,d],[x,h],{props:O}),H=M2e(A,c);if(F&&F.length>0){const V=[],G=a||s;D=F.map((K,q)=>{const{path:Y,key:X,type:le,menu:re,onClick:ne,className:se,style:de,separator:te,dropdownProps:ie}=K,pe=_2e(u,Y);pe!==void 0&&V.push(pe);const Z=X??q;if(le==="separator")return y.createElement($D,{key:Z},te);const ue={},ve=q===F.length-1;re&&(ue.menu=re);let{href:he}=K;return V.length&&pe!==void 0&&(he=`#/${V.join("/")}`),y.createElement(gce,{key:Z,...ue,...hi(K,{data:!0,aria:!0}),className:se,style:de,dropdownProps:ie,dropdownIcon:M,href:he,separator:ve?"":E,onClick:ne,prefixCls:A},H(K,u,G,V,he))})}else if(l){const V=Di(l).length;D=Di(l).map((G,K)=>{if(!G)return G;const q=K===V-1;return Ui(G,{separator:q?"":E,key:K})})}const N=ee(A,v,{[`${A}-rtl`]:m==="rtl"},i,o,k.root,I,_),z={...B.root,...b,...n},U=y.useMemo(()=>({classNames:k,styles:B}),[k,B]);return y.createElement(x3.Provider,{value:U},y.createElement("nav",{className:N,style:z,...f},y.createElement("ol",null,D)))},vce=O2e;vce.Item=mce;vce.Separator=$D;function k2e(e){return e===void 0||e===!1?[]:Array.isArray(e)?e:[e]}function N2e(e){return k2e(e).join("_")}const yce=y.createContext(void 0),B2e=yce.Provider,Cce=y.createContext(void 0),$2e=Cce.Provider;function v$(){return v$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:r="rc-checkbox",className:n,style:i,checked:o,disabled:s,defaultChecked:a=!1,type:l="checkbox",title:c,onChange:u,...d}=e,h=y.useRef(null),p=y.useRef(null),[f,g]=Fn(a,o);y.useImperativeHandle(t,()=>({focus:b=>{var S;(S=h.current)==null||S.focus(b)},blur:()=>{var b;(b=h.current)==null||b.blur()},input:h.current,nativeElement:p.current}));const m=ee(r,n,{[`${r}-checked`]:f,[`${r}-disabled`]:s}),v=b=>{s||("checked"in e||g(b.target.checked),u==null||u({target:{...e,type:l,checked:b.target.checked},stopPropagation(){b.stopPropagation()},preventDefault(){b.preventDefault()},nativeEvent:b.nativeEvent}))};return y.createElement("span",{className:m,title:c,style:i,ref:p},y.createElement("input",v$({},d,{className:`${r}-input`,ref:h,onChange:v,disabled:s,checked:!!f,type:l})))});function Sce(e){const t=Q.useRef(null),r=()=>{Lr.cancel(t.current),t.current=null};return[()=>{r(),t.current=Lr(()=>{t.current=null})},o=>{t.current&&(o.stopPropagation(),r()),e==null||e(o)}]}const G2e=e=>{const{componentCls:t,antCls:r}=e,n=`${t}-group`;return{[n]:{...cn(e),display:"inline-block",fontSize:0,[`&${n}-rtl`]:{direction:"rtl"},[`&${n}-block`]:{display:"flex"},[`${r}-badge ${r}-badge-count`]:{zIndex:1},[`> ${r}-badge:not(:first-child) > ${r}-button-wrapper`]:{borderInlineStart:"none"},"&-vertical":{display:"flex",flexDirection:"column",rowGap:e.marginXS,[`${t}-wrapper`]:{marginInlineEnd:0}}}}},V2e=e=>{const{componentCls:t,wrapperMarginInlineEnd:r,colorPrimary:n,colorPrimaryHover:i,radioSize:o,motionDurationSlow:s,motionDurationMid:a,motionEaseInOutCirc:l,colorBgContainer:c,colorBorder:u,lineWidth:d,colorBgContainerDisabled:h,colorTextDisabled:p,paddingXS:f,dotColorDisabled:g,dotSize:m,lineType:v,radioColor:b,radioBgColor:S}=e;return{[`${t}-wrapper`]:{...cn(e),display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:r,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[t]:{...cn(e),position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",boxSizing:"border-box",display:"block",width:`calc(${o} * 1px)`,height:`calc(${o} * 1px)`,backgroundColor:c,border:`${ae(d)} ${v} ${u}`,borderRadius:"50%",transition:`all ${a}`,flex:"none","&:after":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) scale(0)",width:`calc(${m} * 1px)`,height:`calc(${m} * 1px)`,backgroundColor:b,borderRadius:"50%",transformOrigin:"50% 50%",opacity:0,transition:`all ${s} ${l}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:uc(e)},[`&:hover ${t}`]:{borderColor:n},[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:i,borderColor:"transparent"},[`${t}-checked`]:{backgroundColor:S,borderColor:n,"&::after":{transform:"translate(-50%, -50%)",opacity:1}},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},background:h,borderColor:u,"&::after":{backgroundColor:g}},[`${t}-disabled + span`]:{color:p,cursor:"not-allowed"},[`span${t} + *`]:{paddingInlineStart:f,paddingInlineEnd:f}}}},z2e=e=>{const{buttonColor:t,controlHeight:r,componentCls:n,lineWidth:i,lineType:o,colorBorder:s,motionDurationMid:a,buttonPaddingInline:l,fontSize:c,buttonBg:u,fontSizeLG:d,controlHeightLG:h,controlHeightSM:p,paddingXS:f,borderRadius:g,borderRadiusSM:m,borderRadiusLG:v,buttonCheckedBg:b,buttonSolidCheckedColor:S,colorTextDisabled:x,colorBgContainerDisabled:T,buttonCheckedBgDisabled:R,buttonCheckedColorDisabled:E,colorPrimary:M,colorPrimaryHover:D,colorPrimaryActive:A,buttonSolidCheckedBg:I,buttonSolidCheckedHoverBg:_,buttonSolidCheckedActiveBg:F,calc:O}=e;return{[`${n}-button-wrapper`]:{position:"relative",display:"inline-block",height:r,margin:0,paddingInline:l,paddingBlock:0,color:t,fontSize:c,lineHeight:ae(O(r).sub(O(i).mul(2)).equal()),background:u,border:`${ae(i)} ${o} ${s}`,borderBlockStartWidth:O(i).add(.02).equal(),borderInlineEndWidth:i,cursor:"pointer",transition:["color","background-color","box-shadow"].map(k=>`${k} ${a}`).join(","),a:{color:t},[`> ${n}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:last-child)":{marginInlineEnd:O(i).mul(-1).equal()},"&:first-child":{borderInlineStart:`${ae(i)} ${o} ${s}`,borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g},"&:first-child:last-child":{borderRadius:g},[`${n}-group-large &`]:{height:h,fontSize:d,lineHeight:ae(O(h).sub(O(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:v,borderEndStartRadius:v},"&:last-child":{borderStartEndRadius:v,borderEndEndRadius:v}},[`${n}-group-small &`]:{height:p,paddingInline:O(f).sub(i).equal(),paddingBlock:0,lineHeight:ae(O(p).sub(O(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:m,borderEndStartRadius:m},"&:last-child":{borderStartEndRadius:m,borderEndEndRadius:m}},"&:hover":{position:"relative",color:M},"&:has(:focus-visible)":uc(e),[`${n}, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${n}-button-wrapper-disabled)`]:{zIndex:1,color:M,background:b,borderColor:M,"&::before":{backgroundColor:M},"&:first-child":{borderColor:M},"&:hover":{color:D,borderColor:D,"&::before":{backgroundColor:D}},"&:active":{color:A,borderColor:A,"&::before":{backgroundColor:A}}},[`${n}-group-solid &-checked:not(${n}-button-wrapper-disabled)`]:{color:S,background:I,borderColor:I,"&:hover":{color:S,background:_,borderColor:_},"&:active":{color:S,background:F,borderColor:F}},"&-disabled":{color:x,backgroundColor:T,borderColor:s,cursor:"not-allowed","&:first-child, &:hover":{color:x,backgroundColor:T,borderColor:s}},[`&-disabled${n}-button-wrapper-checked`]:{color:E,backgroundColor:R,borderColor:s,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},H2e=e=>{const{wireframe:t,padding:r,marginXS:n,lineWidth:i,fontSizeLG:o,colorText:s,colorBgContainer:a,colorTextDisabled:l,controlItemBgActiveDisabled:c,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:h,colorPrimaryActive:p,colorWhite:f}=e,g=4,m=o,v=t?m-g*2:m-(g+i)*2;return{radioSize:m,dotSize:v,dotColorDisabled:l,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:h,buttonSolidCheckedActiveBg:p,buttonBg:a,buttonCheckedBg:a,buttonColor:s,buttonCheckedBgDisabled:c,buttonCheckedColorDisabled:l,buttonPaddingInline:r-i,wrapperMarginInlineEnd:n,radioColor:t?d:f,radioBgColor:t?a:d}},wce=Yr("Radio",e=>{const{controlOutline:t,controlOutlineWidth:r}=e,n=`0 0 0 ${ae(r)} ${t}`,o=Wr(e,{radioFocusShadow:n,radioButtonFocusShadow:n});return[G2e(o),V2e(o),z2e(o)]},H2e,{unitless:{radioSize:!0,dotSize:!0}}),W2e=(e,t)=>{const r=y.useContext(yce),n=y.useContext(Cce),{getPrefixCls:i,direction:o,className:s,style:a,classNames:l,styles:c}=Ur("radio"),u=y.useRef(null),d=zo(t,u),{isFormItemInput:h}=y.useContext(sa),p=G=>{var K,q;(K=e.onChange)==null||K.call(e,G),(q=r==null?void 0:r.onChange)==null||q.call(r,G)},{prefixCls:f,className:g,rootClassName:m,children:v,style:b,title:S,classNames:x,styles:T,...R}=e,E=i("radio",f),M=((r==null?void 0:r.optionType)||n)==="button",D=M?`${E}-button`:E,A=co(E),[I,_]=wce(E,A),F={...R},O=y.useContext(Rs);let k=F.checked;r&&(F.name=r.name,F.onChange=p,k=e.value===r.value,F.disabled=F.disabled??r.disabled),F.disabled=F.disabled??O;const B={...e,...F,checked:k},[H,N]=jr([l,x],[c,T],{props:B}),z=ee(`${D}-wrapper`,{[`${D}-wrapper-checked`]:k,[`${D}-wrapper-disabled`]:F.disabled,[`${D}-wrapper-rtl`]:o==="rtl",[`${D}-wrapper-in-form-item`]:h,[`${D}-wrapper-block`]:!!(r!=null&&r.block)},s,g,m,H.root,I,_,A),[U,V]=Sce(F.onClick);return y.createElement(Ex,{component:"Radio",disabled:F.disabled},y.createElement("label",{className:z,style:{...N.root,...a,...b},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:S,onClick:U},y.createElement(bce,{...F,checked:k,className:ee(H.icon,{[ID]:!M}),style:N.icon,type:"radio",prefixCls:D,ref:d,onClick:V}),v!==void 0?y.createElement("span",{className:ee(`${D}-label`,H.label),style:N.label},v):null))},uM=y.forwardRef(W2e),U2e=y.forwardRef((e,t)=>{const{getPrefixCls:r,direction:n}=y.useContext(or),{name:i}=y.useContext(sa),o=Tu(N2e(i)),{prefixCls:s,className:a,rootClassName:l,options:c,buttonStyle:u="outline",disabled:d,children:h,size:p,style:f,id:g,optionType:m,name:v=o,defaultValue:b,value:S,block:x=!1,onChange:T,onMouseEnter:R,onMouseLeave:E,onFocus:M,onBlur:D,orientation:A,vertical:I,role:_="radiogroup"}=e,[F,O]=Fn(b,S),k=y.useCallback(X=>{const le=F,re=X.target.value;"value"in e||O(re),re!==le&&(T==null||T(X))},[F,O,T]),B=r("radio",s),H=`${B}-group`,N=co(B),[z,U]=wce(B,N);let V=h;c&&c.length>0&&(V=c.map(X=>typeof X=="string"||typeof X=="number"?y.createElement(uM,{key:X.toString(),prefixCls:B,disabled:d,value:X,checked:F===X},X):y.createElement(uM,{key:`radio-group-value-options-${X.value}`,prefixCls:B,disabled:X.disabled||d,value:X.value,checked:F===X.value,title:X.title,style:X.style,className:X.className,id:X.id,required:X.required},X.label)));const G=Li(p),[,K]=Cx(A,I),q=ee(H,`${H}-${u}`,{[`${H}-large`]:G==="large",[`${H}-small`]:G==="small",[`${H}-rtl`]:n==="rtl",[`${H}-block`]:x},a,l,z,U,N),Y=y.useMemo(()=>({onChange:k,value:F,disabled:d,name:v,optionType:m,block:x}),[k,F,d,v,m,x]);return y.createElement("div",{...hi(e,{aria:!0,data:!0}),role:_,className:ee(q,{[`${B}-group-vertical`]:K}),style:f,onMouseEnter:R,onMouseLeave:E,onFocus:M,onBlur:D,id:g,ref:t},y.createElement(B2e,{value:Y},V))}),j2e=y.memo(U2e),K2e=(e,t)=>{const{getPrefixCls:r}=y.useContext(or),{prefixCls:n,...i}=e,o=r("radio",n);return y.createElement($2e,{value:"button"},y.createElement(uM,{prefixCls:o,...i,type:"radio",ref:t}))},q2e=y.forwardRef(K2e),$x=uM;$x.Button=q2e;$x.Group=j2e;$x.__ANT_RADIO=!0;function EC(e){return Wr(e,{inputAffixPadding:e.paddingXXS})}const RC=e=>{const{controlHeight:t,fontSize:r,lineHeight:n,lineWidth:i,controlHeightSM:o,controlHeightLG:s,fontSizeLG:a,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:h,colorPrimaryHover:p,colorPrimary:f,controlOutlineWidth:g,controlOutline:m,colorErrorOutline:v,colorWarningOutline:b,colorBgContainer:S,inputFontSize:x,inputFontSizeLG:T,inputFontSizeSM:R}=e,E=x||r,M=R||E,D=T||a,A=Math.round((t-E*n)/2*10)/10-i,I=Math.round((o-M*n)/2*10)/10-i,_=Math.ceil((s-D*l)/2*10)/10-i;return{paddingBlock:Math.max(A,0),paddingBlockSM:Math.max(I,0),paddingBlockLG:Math.max(_,0),paddingInline:c-i,paddingInlineSM:u-i,paddingInlineLG:d-i,addonBg:h,activeBorderColor:f,hoverBorderColor:p,activeShadow:`0 0 0 ${g}px ${m}`,errorActiveShadow:`0 0 0 ${g}px ${v}`,warningActiveShadow:`0 0 0 ${g}px ${b}`,hoverBg:S,activeBg:S,inputFontSize:E,inputFontSizeLG:D,inputFontSizeSM:M}},Y2e=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),GD=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])":{...Y2e(Wr(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled}))}}),A3=(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}}),UK=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...A3(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),xce=(e,t)=>({"&-outlined":{...A3(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...GD(e)},...UK(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...UK(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),jK=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),X2e=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${ae(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...jK(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...jK(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...GD(e)}}}}),Tce=(e,t)=>{const{componentCls:r}=e;return{"&-borderless":{background:"transparent",border:"none",paddingBlock:e.calc(e.paddingBlock).add(e.lineWidth).equal(),[`&${r}-sm, &${r}-affix-wrapper-sm`]:{paddingBlock:e.calc(e.paddingBlockSM).add(e.lineWidth).equal()},[`&${r}-lg, &${r}-affix-wrapper-lg`]:{paddingBlock:e.calc(e.paddingBlockLG).add(e.lineWidth).equal()},"&: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}}},Ece=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(t==null?void 0:t.inputColor)??"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),KK=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...Ece(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),Rce=(e,t)=>({"&-filled":{...Ece(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...GD(e)},...KK(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...KK(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),qK=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),Z2e=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...qK(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...qK(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:`${ae(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ae(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ae(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${ae(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ae(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ae(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),Pce=(e,t)=>({background:e.colorBgContainer,borderWidth:`${ae(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}}),YK=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...Pce(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`}}),Mce=(e,t)=>({"&-underlined":{...Pce(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"},...YK(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...YK(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),Ice=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),F3=e=>{const{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:i}=e;return{padding:`${ae(t)} ${ae(i)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},L3=e=>({padding:`${ae(e.paddingBlockSM)} ${ae(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),VD=(e,t={})=>({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${ae(e.paddingBlock)} ${ae(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...Ice(e.colorTextPlaceholder),"&-lg":{...F3(e),...t.largeStyle},"&-sm":{...L3(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),J2e=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`]:{...F3(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...L3(e)},[`&-lg ${r}-select-single`]:{height:e.controlHeightLG},[`&-sm ${r}-select-single`]:{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 ${ae(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${ae(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${ae(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${ae(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},[`${r}-cascader-picker`]:{margin:`-9px ${ae(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}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select`]:{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`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:"block",...Cp(),[`${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},[` & > ${t}-affix-wrapper, & > ${t}-number-affix-wrapper, & > ${r}-picker-range `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${r}-select, & > ${r}-select-auto-complete ${t}, & > ${r}-cascader-picker ${t}, & > ${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, & > ${r}-select:first-child, & > ${r}-select-auto-complete:first-child ${t}, & > ${r}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child, & > ${r}-select:last-child, & > ${r}-cascader-picker:last-child ${t}, & > ${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`]:{}}}}},Q2e=e=>{const{componentCls:t,controlHeightSM:r,lineWidth:n,calc:i}=e,s=i(r).sub(i(n).mul(2)).sub(16).div(2).equal();return{[t]:{...cn(e),...VD(e),...xce(e),...Rce(e),...Tce(e),...Mce(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:r,paddingTop:s,paddingBottom:s}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}}}},eBe=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 ${ae(e.inputAffixPadding)}`}}}},tBe=e=>{const{componentCls:t,inputAffixPadding:r,colorTextDescription:n,motionDurationSlow:i,colorIcon:o,colorIconHover:s,iconCls:a}=e,l=`${t}-affix-wrapper`,c=`${t}-affix-wrapper-disabled`;return{[l]:{...VD(e),display:"inline-flex","&-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}},...eBe(e),[`${a}${t}-password-icon`]:{color:o,cursor:"pointer",transition:`all ${i}`,"&:hover":{color:s}}},[`${t}-underlined`]:{borderRadius:0},[c]:{[`${a}${t}-password-icon`]:{color:o,cursor:"not-allowed","&:hover":{color:o}}}}},rBe=e=>{const{componentCls:t,borderRadiusLG:r,borderRadiusSM:n}=e;return{[`${t}-group`]:{...cn(e),...J2e(e),"&-rtl":{direction:"rtl"},"&-wrapper":{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}},...X2e(e),...Z2e(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}}}}}},nBe=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},Dce=Yr(["Input","Shared"],e=>{const t=Wr(e,EC(e));return[Q2e(t),tBe(t)]},RC,{resetFont:!1}),Ace=Yr(["Input","Component"],e=>{const t=Wr(e,EC(e));return[rBe(t),nBe(t),Px(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},RC,{resetFont:!1});var iBe={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"};function y$(){return y$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,y$({},e,{ref:t,icon:iBe})),Fce=y.forwardRef(oBe);var Jb={exports:{}},XK;function sBe(){if(XK)return Jb.exports;XK=1,Jb.exports=n,Jb.exports.isMobile=n,Jb.exports.default=n;const e=/(android|bb\d+|meego).+mobile|armv7l|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|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,r=/android|ipad|playbook|silk/i;function n(i){i||(i={});let o=i.ua;if(!o&&typeof navigator<"u"&&(o=navigator.userAgent),o&&o.headers&&typeof o.headers["user-agent"]=="string"&&(o=o.headers["user-agent"]),typeof o!="string")return!1;let s=e.test(o)&&!t.test(o)||!!i.tablet&&r.test(o);return!s&&i.tablet&&i.featureDetect&&navigator&&navigator.maxTouchPoints>1&&o.indexOf("Macintosh")!==-1&&o.indexOf("Safari")!==-1&&(s=!0),s}return Jb.exports}var aBe=sBe();const lBe=ux(aBe);let G_;const cBe=(()=>(typeof G_>"u"&&(G_=lBe()),G_)),_3=y.createContext(null),uBe=e=>{const{activeTabOffset:t,horizontal:r,rtl:n,indicator:i={}}=e,{size:o,align:s="center"}=i,[a,l]=y.useState(),c=y.useRef(),u=Q.useCallback(h=>typeof o=="function"?o(h):typeof o=="number"?o:h,[o]);function d(){Lr.cancel(c.current)}return y.useEffect(()=>{const h={};if(t)if(r){h.width=u(t.width);const p=n?"right":"left";s==="start"&&(h[p]=t[p]),s==="center"&&(h[p]=t[p]+t.width/2,h.transform=n?"translateX(50%)":"translateX(-50%)"),s==="end"&&(h[p]=t[p]+t.width,h.transform="translateX(-100%)")}else h.height=u(t.height),s==="start"&&(h.top=t.top),s==="center"&&(h.top=t.top+t.height/2,h.transform="translateY(-50%)"),s==="end"&&(h.top=t.top+t.height,h.transform="translateY(-100%)");return d(),c.current=Lr(()=>{a&&h&&Object.keys(h).every(f=>{const g=h[f],m=a[f];return typeof g=="number"&&typeof m=="number"?Math.round(g)===Math.round(m):g===m})||l(h)}),d},[JSON.stringify(t),r,n,s,u]),{style:a}},ZK={width:0,height:0,left:0,top:0};function dBe(e,t,r){return y.useMemo(()=>{var s,a;const n=new Map,i=t.get((s=e[0])==null?void 0:s.key)||ZK,o=i.left+i.width;for(let l=0;ln.key).join("_"),t,r])}function JK(e,t){const r=y.useRef(e),[,n]=y.useState({});function i(o){const s=typeof o=="function"?o(r.current):o;s!==r.current&&t(s,r.current),r.current=s,n({})}return[r.current,i]}const hBe=.1,QK=.01,tP=20,eq=.995**tP;function pBe(e,t){const[r,n]=y.useState(),[i,o]=y.useState(0),[s,a]=y.useState(0),[l,c]=y.useState(),u=y.useRef();function d(v){const{screenX:b,screenY:S}=v.touches[0];n({x:b,y:S}),window.clearInterval(u.current)}function h(v){if(!r)return;const{screenX:b,screenY:S}=v.touches[0];n({x:b,y:S});const x=b-r.x,T=S-r.y;t(x,T);const R=Date.now();o(R),a(R-i),c({x,y:T})}function p(){if(r&&(n(null),c(null),l)){const v=l.x/s,b=l.y/s,S=Math.abs(v),x=Math.abs(b);if(Math.max(S,x){if(Math.abs(T)R?(x=b,f.current="x"):(x=S,f.current="y"),t(-x,-x)&&v.preventDefault()}const m=y.useRef(null);m.current={onTouchStart:d,onTouchMove:h,onTouchEnd:p,onWheel:g},y.useEffect(()=>{function v(T){m.current.onTouchStart(T)}function b(T){m.current.onTouchMove(T)}function S(T){m.current.onTouchEnd(T)}function x(T){m.current.onWheel(T)}return document.addEventListener("touchmove",b,{passive:!1}),document.addEventListener("touchend",S,{passive:!0}),e.current.addEventListener("touchstart",v,{passive:!0}),e.current.addEventListener("wheel",x,{passive:!1}),()=>{document.removeEventListener("touchmove",b),document.removeEventListener("touchend",S)}},[])}function Lce(e){const[t,r]=y.useState(0),n=y.useRef(0),i=y.useRef();return i.current=e,UR(()=>{var o;(o=i.current)==null||o.call(i)},[t]),()=>{n.current===t&&(n.current+=1,r(n.current))}}function fBe(e){const t=y.useRef([]),[,r]=y.useState({}),n=y.useRef(typeof e=="function"?e():e),i=Lce(()=>{let s=n.current;t.current.forEach(a=>{s=a(s)}),t.current=[],n.current=s,r({})});function o(s){t.current.push(s),i()}return[n.current,o]}const tq={width:0,height:0,left:0,top:0,right:0};function gBe(e,t,r,n,i,o,{tabs:s,tabPosition:a,rtl:l}){let c,u,d;return["top","bottom"].includes(a)?(c="width",u=l?"right":"left",d=Math.abs(r)):(c="height",u="top",d=-r),y.useMemo(()=>{if(!s.length)return[0,0];const h=s.length;let p=h;for(let g=0;gMath.floor(d+t)){p=g-1;break}}let f=0;for(let g=h-1;g>=0;g-=1)if((e.get(s[g].key)||tq)[u]p?[0,-1]:[f,p]},[e,t,n,i,o,d,a,s.map(h=>h.key).join("_"),l])}function rq(e){let t;return e instanceof Map?(t={},e.forEach((r,n)=>{t[n]=r})):t=e,JSON.stringify(t)}const mBe="TABS_DQ";function _ce(e){return String(e).replace(/"/g,mBe)}function O3(e,t,r,n){return!(!r||n||e===!1||e===void 0&&(t===!1||t===null))}const Oce=y.forwardRef((e,t)=>{const{prefixCls:r,editable:n,locale:i,style:o}=e;return!n||n.showAdd===!1?null:y.createElement("button",{ref:t,type:"button",className:`${r}-nav-add`,style:o,"aria-label":(i==null?void 0:i.addAriaLabel)||"Add tab",onClick:s=>{n.onEdit("add",{event:s})}},n.addIcon||"+")}),nq=y.forwardRef((e,t)=>{const{position:r,prefixCls:n,extra:i}=e;if(!i)return null;let o,s={};return typeof i=="object"&&!y.isValidElement(i)?s=i:s.right=i,r==="right"&&(o=s.right),r==="left"&&(o=s.left),o?y.createElement("div",{className:`${n}-extra-content`,ref:t},o):null});function C$(){return C$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:r,id:n,tabs:i,locale:o,mobile:s,more:a={},style:l,className:c,editable:u,tabBarGutter:d,rtl:h,removeAriaLabel:p,onTabClick:f,getPopupContainer:g,popupClassName:m,popupStyle:v}=e,[b,S]=y.useState(!1),[x,T]=y.useState(null),{icon:R="More"}=a,E=`${n}-more-popup`,M=`${r}-dropdown`,D=x!==null?`${E}-${x}`:null,A=o==null?void 0:o.dropdownAriaLabel;function I(N,z){N.preventDefault(),N.stopPropagation(),u.onEdit("remove",{key:z,event:N})}const _=y.createElement(xC,{onClick:({key:N,domEvent:z})=>{f(N,z),S(!1)},prefixCls:`${M}-menu`,id:E,tabIndex:-1,role:"listbox","aria-activedescendant":D,selectedKeys:[x],"aria-label":A!==void 0?A:"expanded dropdown"},i.map(N=>{const{closable:z,disabled:U,closeIcon:V,key:G,label:K}=N,q=O3(z,V,u,U);return y.createElement(Nx,{key:G,id:`${E}-${G}`,role:"option","aria-controls":n&&`${n}-panel-${G}`,disabled:U},y.createElement("span",null,K),q&&y.createElement("button",{type:"button","aria-label":p||"remove",tabIndex:0,className:`${M}-menu-item-remove`,onClick:Y=>{Y.stopPropagation(),I(Y,G)}},V||u.removeIcon||"×"))}));function F(N){const z=i.filter(G=>!G.disabled);let U=z.findIndex(G=>G.key===x)||0;const V=z.length;for(let G=0;G{const N=document.getElementById(D);N!=null&&N.scrollIntoView&&N.scrollIntoView(!1)},[D,x]),y.useEffect(()=>{b||T(null)},[b]);const k={marginInlineStart:d};i.length||(k.visibility="hidden",k.order=1);const B=ee(m,{[`${M}-rtl`]:h}),H=s?null:y.createElement(Xle,C$({prefixCls:M,overlay:_,visible:i.length?b:!1,onVisibleChange:S,overlayClassName:B,overlayStyle:v,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:g},a),y.createElement("button",{type:"button",className:`${r}-nav-more`,style:k,"aria-haspopup":"listbox","aria-controls":E,id:`${n}-more`,"aria-expanded":b,onKeyDown:O},R));return y.createElement("div",{className:ee(`${r}-nav-operations`,c),style:l,ref:t},H,y.createElement(Oce,{prefixCls:r,locale:o,editable:u}))}),yBe=y.memo(vBe,(e,t)=>t.tabMoving),CBe=e=>{const{prefixCls:t,id:r,active:n,focus:i,tab:{key:o,label:s,disabled:a,closeIcon:l,icon:c},closable:u,renderWrapper:d,removeAriaLabel:h,editable:p,onClick:f,onFocus:g,onBlur:m,onKeyDown:v,onMouseDown:b,onMouseUp:S,style:x,className:T,tabCount:R,currentPosition:E}=e,M=`${t}-tab`,D=O3(u,l,p,a);function A(k){a||f(k)}function I(k){k.preventDefault(),k.stopPropagation(),p.onEdit("remove",{key:o,event:k})}const _=y.useMemo(()=>c&&typeof s=="string"?y.createElement("span",null,s):s,[s,c]),F=y.useRef(null);y.useEffect(()=>{i&&F.current&&F.current.focus()},[i]);const O=y.createElement("div",{key:o,"data-node-key":_ce(o),className:ee(M,T,{[`${M}-with-remove`]:D,[`${M}-active`]:n,[`${M}-disabled`]:a,[`${M}-focus`]:i}),style:x,onClick:A},y.createElement("div",{ref:F,role:"tab","aria-selected":n,id:r&&`${r}-tab-${o}`,className:`${M}-btn`,"aria-controls":r&&`${r}-panel-${o}`,"aria-disabled":a,tabIndex:a?null:n?0:-1,onClick:k=>{k.stopPropagation(),A(k)},onKeyDown:v,onMouseDown:b,onMouseUp:S,onFocus:g,onBlur:m},i&&y.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`Tab ${E} of ${R}`),c&&y.createElement("span",{className:`${M}-icon`},c),s&&_),D&&y.createElement("button",{type:"button","aria-label":h||"remove",tabIndex:n?0:-1,className:`${M}-remove`,onClick:k=>{k.stopPropagation(),I(k)}},l||p.removeIcon||"×"));return d?d(O):O};function b$(){return b$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{offsetWidth:r,offsetHeight:n,offsetTop:i,offsetLeft:o}=e,{width:s,height:a,left:l,top:c}=e.getBoundingClientRect();return Math.abs(s-r)<1?[s,a,l-t.left,c-t.top]:[r,n,o,i]},mv=e=>{const{offsetWidth:t=0,offsetHeight:r=0}=e.current||{};if(e.current){const{width:n,height:i}=e.current.getBoundingClientRect();if(Math.abs(n-t)<1)return[n,i]}return[t,r]},JT=(e,t)=>e[t?0:1],iq=y.forwardRef((e,t)=>{const{className:r,style:n,id:i,animated:o,activeKey:s,rtl:a,extra:l,editable:c,locale:u,tabPosition:d,tabBarGutter:h,children:p,onTabClick:f,onTabScroll:g,indicator:m,classNames:v,styles:b}=e,{prefixCls:S,tabs:x}=y.useContext(_3),T=y.useRef(null),R=y.useRef(null),E=y.useRef(null),M=y.useRef(null),D=y.useRef(null),A=y.useRef(null),I=y.useRef(null),_=d==="top"||d==="bottom",[F,O]=JK(0,($e,oe)=>{_&&g&&g({direction:$e>oe?"left":"right"})}),[k,B]=JK(0,($e,oe)=>{!_&&g&&g({direction:$e>oe?"top":"bottom"})}),[H,N]=y.useState([0,0]),[z,U]=y.useState([0,0]),[V,G]=y.useState([0,0]),[K,q]=y.useState([0,0]),[Y,X]=fBe(new Map),le=dBe(x,Y,z[0]),re=JT(H,_),ne=JT(z,_),se=JT(V,_),de=JT(K,_),te=Math.floor(re)ue?ue:$e}const he=y.useRef(null),[me,Oe]=y.useState();function Pe(){Oe(Date.now())}function Me(){he.current&&clearTimeout(he.current)}pBe(M,($e,oe)=>{function ce(ge,Te){ge(ke=>ve(ke+Te))}return te?(_?ce(O,$e):ce(B,oe),Me(),Pe(),!0):!1}),y.useEffect(()=>(Me(),me&&(he.current=setTimeout(()=>{Oe(0)},100)),Me),[me]);const[He,Ge]=gBe(le,ie,_?F:k,ne,se,de,{...e,tabs:x}),Ct=br(($e=s)=>{const oe=le.get($e)||{width:0,height:0,left:0,right:0,top:0};if(_){let ce=F;a?oe.rightF+ie&&(ce=oe.right+oe.width-ie):oe.left<-F?ce=-oe.left:oe.left+oe.width>-F+ie&&(ce=-(oe.left+oe.width-ie)),B(0),O(ve(ce))}else{let ce=k;oe.top<-k?ce=-oe.top:oe.top+oe.height>-k+ie&&(ce=-(oe.top+oe.height-ie)),O(0),B(ve(ce))}}),[Ht,St]=y.useState(),[Ye,Fe]=y.useState(!1),et=x.filter($e=>!$e.disabled).map($e=>$e.key),Ne=$e=>{const oe=et.indexOf(Ht||s),ce=et.length,ge=(oe+$e+ce)%ce,Te=et[ge];St(Te)},tt=($e,oe)=>{const ce=et.indexOf($e),ge=x.find(ke=>ke.key===$e);O3(ge==null?void 0:ge.closable,ge==null?void 0:ge.closeIcon,c,ge==null?void 0:ge.disabled)&&(oe.preventDefault(),oe.stopPropagation(),c.onEdit("remove",{key:$e,event:oe}),ce===et.length-1?Ne(-1):Ne(1))},nt=($e,oe)=>{Fe(!0),oe.button===1&&tt($e,oe)},Ke=$e=>{const{code:oe}=$e,ce=a&&_,ge=et[0],Te=et[et.length-1];switch(oe){case"ArrowLeft":{_&&Ne(ce?1:-1);break}case"ArrowRight":{_&&Ne(ce?-1:1);break}case"ArrowUp":{$e.preventDefault(),_||Ne(-1);break}case"ArrowDown":{$e.preventDefault(),_||Ne(1);break}case"Home":{$e.preventDefault(),St(ge);break}case"End":{$e.preventDefault(),St(Te);break}case"Enter":case"Space":{$e.preventDefault(),f(Ht??s,$e);break}case"Backspace":case"Delete":{tt(Ht,$e);break}}},Ie={};_?Ie.marginInlineStart=h:Ie.marginTop=h;const rt=x.map(($e,oe)=>{const{key:ce}=$e;return y.createElement(CBe,{id:i,prefixCls:S,key:ce,tab:$e,className:v==null?void 0:v.item,style:oe===0?b==null?void 0:b.item:{...Ie,...b==null?void 0:b.item},closable:$e.closable,editable:c,active:ce===s,focus:ce===Ht,renderWrapper:p,removeAriaLabel:u==null?void 0:u.removeAriaLabel,tabCount:et.length,currentPosition:oe+1,onClick:ge=>{f(ce,ge)},onKeyDown:Ke,onFocus:()=>{Ye||St(ce),Ct(ce),Pe(),M.current&&(a||(M.current.scrollLeft=0),M.current.scrollTop=0)},onBlur:()=>{St(void 0)},onMouseDown:ge=>nt(ce,ge),onMouseUp:()=>{Fe(!1)}})}),Tt=()=>X(()=>{var ce;const $e=new Map,oe=(ce=D.current)==null?void 0:ce.getBoundingClientRect();return x.forEach(({key:ge})=>{var ke;const Te=(ke=D.current)==null?void 0:ke.querySelector(`[data-node-key="${_ce(ge)}"]`);if(Te){const[Ze,Dt,st,it]=bBe(Te,oe);$e.set(ge,{width:Ze,height:Dt,left:st,top:it})}}),$e});y.useEffect(()=>{Tt()},[x.map($e=>$e.key).join("_")]);const Rt=Lce(()=>{const $e=mv(T),oe=mv(R),ce=mv(E);N([$e[0]-oe[0]-ce[0],$e[1]-oe[1]-ce[1]]);const ge=mv(I);G(ge);const Te=mv(A);q(Te);const ke=mv(D);U([ke[0]-ge[0],ke[1]-ge[1]]),Tt()}),Bt=x.slice(0,He),Qt=x.slice(Ge+1),ft=[...Bt,...Qt],ut=le.get(s),{style:Yt}=uBe({activeTabOffset:ut,horizontal:_,indicator:m,rtl:a});y.useEffect(()=>{Ct()},[s,Z,ue,rq(ut),rq(le),_]),y.useEffect(()=>{Rt()},[a]);const hr=!!ft.length,Je=`${S}-nav-wrap`;let ot,De,Pt,Qe;return _?a?(De=F>0,ot=F!==ue):(ot=F<0,De=F!==Z):(Pt=k<0,Qe=k!==Z),y.createElement(Js,{onResize:Rt},y.createElement("div",{ref:xu(t,T),role:"tablist","aria-orientation":_?"horizontal":"vertical",className:ee(`${S}-nav`,r,v==null?void 0:v.header),style:{...b==null?void 0:b.header,...n},onKeyDown:()=>{Pe()}},y.createElement(nq,{ref:R,position:"left",extra:l,prefixCls:S}),y.createElement(Js,{onResize:Rt},y.createElement("div",{className:ee(Je,{[`${Je}-ping-left`]:ot,[`${Je}-ping-right`]:De,[`${Je}-ping-top`]:Pt,[`${Je}-ping-bottom`]:Qe}),ref:M},y.createElement(Js,{onResize:Rt},y.createElement("div",{ref:D,className:`${S}-nav-list`,style:{transform:`translate(${F}px, ${k}px)`,transition:me?"none":void 0}},rt,y.createElement(Oce,{ref:I,prefixCls:S,locale:u,editable:c,style:{...rt.length===0?void 0:Ie,visibility:hr?"hidden":null}}),y.createElement("div",{className:ee(`${S}-ink-bar`,v==null?void 0:v.indicator,{[`${S}-ink-bar-animated`]:o.inkBar}),style:{...Yt,...b==null?void 0:b.indicator}}))))),y.createElement(yBe,b$({},e,{removeAriaLabel:u==null?void 0:u.removeAriaLabel,ref:A,prefixCls:S,tabs:ft,className:!hr&&pe,popupStyle:b==null?void 0:b.popup,tabMoving:!!me})),y.createElement(nq,{ref:E,position:"right",extra:l,prefixCls:S})))}),SBe=({renderTabBar:e,...t})=>e?e(t,iq):y.createElement(iq,t),wBe=y.forwardRef((e,t)=>{const{prefixCls:r,className:n,style:i,id:o,active:s,tabKey:a,children:l}=e,c=y.Children.count(l)>0;return y.createElement("div",{id:o&&`${o}-panel-${a}`,role:"tabpanel",tabIndex:s&&c?0:-1,"aria-labelledby":o&&`${o}-tab-${a}`,"aria-hidden":!s,style:i,className:ee(r,s&&`${r}-active`,n),ref:t},l)});function dM(){return dM=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{id:t,activeKey:r,animated:n,tabPosition:i,destroyOnHidden:o,contentStyle:s,contentClassName:a}=e,{prefixCls:l,tabs:c}=y.useContext(_3),u=n.tabPane,d=`${l}-tabpane`;return y.createElement("div",{className:ee(`${l}-content-holder`)},y.createElement("div",{className:ee(`${l}-content`,`${l}-content-${i}`,{[`${l}-content-animated`]:u})},c.map(h=>{const{key:p,forceRender:f,style:g,className:m,destroyOnHidden:v,...b}=h,S=p===r;return y.createElement(uu,dM({key:p,visible:S,forceRender:f,removeOnLeave:!!(o??v),leavedClassName:`${d}-hidden`},n.tabPaneMotion),({style:x,className:T},R)=>y.createElement(wBe,dM({},b,{prefixCls:d,id:t,tabKey:p,animated:u,active:S,style:{...s,...g,...x},className:ee(a,m,T),ref:R})))})))};function TBe(e={inkBar:!0,tabPane:!1}){let t;return e===!1?t={inkBar:!1,tabPane:!1}:e===!0?t={inkBar:!0,tabPane:!1}:t={inkBar:!0,...typeof e=="object"?e:{}},t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}function Sw(){return Sw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var le;const{id:r,prefixCls:n="rc-tabs",className:i,items:o,direction:s,activeKey:a,defaultActiveKey:l,editable:c,animated:u,tabPosition:d="top",tabBarGutter:h,tabBarStyle:p,tabBarExtraContent:f,locale:g,more:m,destroyOnHidden:v,renderTabBar:b,onChange:S,onTabClick:x,onTabScroll:T,getPopupContainer:R,popupClassName:E,indicator:M,classNames:D,styles:A,...I}=e,_=y.useMemo(()=>(o||[]).filter(re=>re&&typeof re=="object"&&"key"in re),[o]),F=s==="rtl",O=TBe(u),[k,B]=y.useState(!1);y.useEffect(()=>{B(cBe())},[]);const[H,N]=Fn(l??((le=_[0])==null?void 0:le.key),a),[z,U]=y.useState(()=>_.findIndex(re=>re.key===H));y.useEffect(()=>{var ne;let re=_.findIndex(se=>se.key===H);re===-1&&(re=Math.max(0,Math.min(z,_.length-1)),N((ne=_[re])==null?void 0:ne.key)),U(re)},[_.map(re=>re.key).join("_"),H,z]);const[V,G]=Fn(null,r);y.useEffect(()=>{r||(G(`rc-tabs-${oq}`),oq+=1)},[]);function K(re,ne){x==null||x(re,ne);const se=re!==H;N(re),se&&(S==null||S(re))}const q={id:V,activeKey:H,animated:O,tabPosition:d,rtl:F,mobile:k},Y={...q,editable:c,locale:g,more:m,tabBarGutter:h,onTabClick:K,onTabScroll:T,extra:f,style:p,getPopupContainer:R,popupClassName:ee(E,D==null?void 0:D.popup),indicator:M,styles:A,classNames:D},X=y.useMemo(()=>({tabs:_,prefixCls:n}),[_,n]);return y.createElement(_3.Provider,{value:X},y.createElement("div",Sw({ref:t,id:r,className:ee(n,`${n}-${d}`,{[`${n}-mobile`]:k,[`${n}-editable`]:c,[`${n}-rtl`]:F},i)},I),y.createElement(SBe,Sw({},Y,{renderTabBar:b})),y.createElement(xBe,Sw({destroyOnHidden:v},q,{contentStyle:A==null?void 0:A.content,contentClassName:D==null?void 0:D.content,animated:O}))))}),RBe={motionAppear:!1,motionEnter:!0,motionLeave:!0};function PBe(e,t={inkBar:!0,tabPane:!1}){let r;return t===!1?r={inkBar:!1,tabPane:!1}:t===!0?r={inkBar:!0,tabPane:!0}:r={inkBar:!0,...typeof t=="object"?t:{}},r.tabPane&&(r.tabPaneMotion={...RBe,motionName:du(e,"switch")}),r}function MBe(e){return e.filter(t=>t)}function IBe(e,t){if(e)return e.map(n=>({...n,destroyOnHidden:n.destroyOnHidden??n.destroyInactiveTabPane}));const r=Di(t).map(n=>{if(y.isValidElement(n)){const{key:i,props:o}=n,{tab:s,...a}=o||{};return{key:String(i),...a,label:s}}return null});return MBe(r)}const DBe=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}`}}}}},[bp(e,"slide-up"),bp(e,"slide-down")]]},ABe=e=>{const{componentCls:t,tabsCardPadding:r,cardBg:n,cardGutter:i,colorBorderSecondary:o,itemSelectedColor:s}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:r,background:n,border:`${ae(e.lineWidth)} ${e.lineType} ${o}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:s,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:uc(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:ae(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${ae(e.borderRadiusLG)} ${ae(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${ae(e.borderRadiusLG)} ${ae(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:ae(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${ae(e.borderRadiusLG)} 0 0 ${ae(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 ${ae(e.borderRadiusLG)} ${ae(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},FBe=e=>{const{componentCls:t,itemHoverColor:r,dropdownEdgeChildVerticalPadding:n}=e;return{[`${t}-dropdown`]:{...cn(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:`${ae(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":{...La,display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${ae(e.paddingXXS)} ${ae(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"}}}}}}},LBe=e=>{const{componentCls:t,margin:r,colorBorderSecondary:n,horizontalMargin:i,verticalItemPadding:o,verticalItemMargin:s,motionDurationSlow:a,calc:l}=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:`${ae(e.lineWidth)} ${e.lineType} ${n}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:["width","left","right"].map(c=>`${c} ${a}`).join(", ")}},[`${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, > 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:l(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:o,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:s},[`${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","top"].map(c=>`${c} ${a}`).join(", ")}},[`${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:ae(l(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${ae(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:l(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${ae(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},_Be=e=>{const{componentCls:t,cardPaddingSM:r,cardPaddingLG:n,cardHeightSM:i,cardHeightLG:o,horizontalItemPaddingSM:s,horizontalItemPaddingLG:a}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:a,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 ${ae(e.borderRadius)} ${ae(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${ae(e.borderRadius)} ${ae(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${ae(e.borderRadius)} ${ae(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${ae(e.borderRadius)} 0 0 ${ae(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:o,minHeight:o}}}}}},OBe=e=>{const{componentCls:t,itemActiveColor:r,itemHoverColor:n,iconCls:i,tabsHorizontalItemMargin:o,horizontalItemPadding:s,itemSelectedColor:a,itemColor:l}=e,c=`${t}-tab`;return{[c]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:s,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:l,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:r}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${c}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":{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},...yl(e)},"&:hover":{color:n},[`&${c}-active ${c}-btn`]:{color:a},[`&${c}-focus ${c}-btn:focus-visible`]:uc(e),[`&${c}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${c}-disabled ${c}-btn, &${c}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${c}-remove ${i}`]:{margin:0,verticalAlign:"middle"},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${c} + ${c}`]:{margin:{_skip_check_:!0,value:o}}}},kBe=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:ae(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:ae(e.marginXS)},marginLeft:{_skip_check_:!0,value:ae(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"}}}}},NBe=e=>{const{componentCls:t,tabsCardPadding:r,cardHeight:n,cardGutter:i,itemHoverColor:o,itemActiveColor:s,colorBorderSecondary:a}=e;return{[t]:{...cn(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`]:{minWidth:n,minHeight:n,marginLeft:{_skip_check_:!0,value:i},background:"transparent",border:`${ae(e.lineWidth)} ${e.lineType} ${a}`,borderRadius:`${ae(e.borderRadiusLG)} ${ae(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:s},...yl(e,-3)}},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"},...OBe(e),[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:{...yl(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"}}}}}},BBe=e=>{const{cardHeight:t,cardHeightSM:r,cardHeightLG:n,controlHeight:i,controlHeightLG:o}=e,s=t||o,a=r||i,l=n||o+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:s,cardHeightSM:a,cardHeightLG:l,cardPadding:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(a-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(l-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}},$Be=Yr("Tabs",e=>{const t=Wr(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${ae(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${ae(e.horizontalItemGutter)}`});return[_Be(t),kBe(t),LBe(t),FBe(t),ABe(t),NBe(t),DBe(t)]},BBe),GBe=()=>null,VBe=y.forwardRef((e,t)=>{var Z,ue,ve,he;const{type:r,className:n,rootClassName:i,size:o,onEdit:s,hideAdd:a,centered:l,addIcon:c,removeIcon:u,moreIcon:d,more:h,popupClassName:p,children:f,items:g,animated:m,style:v,indicatorSize:b,indicator:S,classNames:x,styles:T,destroyInactiveTabPane:R,destroyOnHidden:E,tabPlacement:M,tabPosition:D,...A}=e,{prefixCls:I}=A,{getPrefixCls:_,direction:F,getPopupContainer:O,className:k,style:B,classNames:H,styles:N}=Ur("tabs"),{tabs:z}=y.useContext(or),U=_("tabs",I),V=co(U),[G,K]=$Be(U,V),q=y.useRef(null);y.useImperativeHandle(t,()=>({nativeElement:q.current}));let Y;r==="editable-card"&&(Y={onEdit:(me,{key:Oe,event:Pe})=>{s==null||s(me==="add"?Pe:Oe,me)},removeIcon:u??(z==null?void 0:z.removeIcon)??y.createElement(Bp,null),addIcon:(c??(z==null?void 0:z.addIcon))||y.createElement(Fce,null),showAdd:a!==!0});const X=_(),le=Li(o),re=IBe(g,f),ne=PBe(U,m),se={align:(S==null?void 0:S.align)??((Z=z==null?void 0:z.indicator)==null?void 0:Z.align),size:(S==null?void 0:S.size)??b??((ue=z==null?void 0:z.indicator)==null?void 0:ue.size)??(z==null?void 0:z.indicatorSize)},de=y.useMemo(()=>{const me=M??D??void 0,Oe=F==="rtl";switch(me){case"start":return Oe?"right":"left";case"end":return Oe?"left":"right";default:return me}},[M,D,F]),te={...e,size:le,tabPlacement:de,items:re},[ie,pe]=jr([H,x],[N,T],{props:te},{popup:{_default:"root"}});return y.createElement(EBe,{ref:q,direction:F,getPopupContainer:O,...A,items:re,className:ee({[`${U}-large`]:le==="large",[`${U}-small`]:le==="small",[`${U}-card`]:["card","editable-card"].includes(r),[`${U}-editable-card`]:r==="editable-card",[`${U}-centered`]:l},k,n,i,ie.root,G,K,V),classNames:{...ie,popup:ee(p,G,K,V,(ve=ie.popup)==null?void 0:ve.root)},styles:pe,style:{...pe.root,...B,...v},editable:Y,more:{icon:((he=z==null?void 0:z.more)==null?void 0:he.icon)??(z==null?void 0:z.moreIcon)??d??y.createElement(D3,null),transitionName:`${X}-slide-up`,...h},prefixCls:U,animated:ne,indicator:se,destroyOnHidden:E??R,tabPosition:de})}),kce=VBe;kce.TabPane=GBe;const Nce=({prefixCls:e,className:t,hoverable:r=!0,...n})=>{const{getPrefixCls:i}=y.useContext(or),o=i("card",e),s=ee(`${o}-grid`,t,{[`${o}-grid-hoverable`]:r});return y.createElement("div",{...n,className:s})},zBe=e=>{const{antCls:t,componentCls:r,headerHeight:n,headerPadding:i,tabsMarginBottom:o}=e;return{display:"flex",justifyContent:"center",flexDirection:"column",minHeight:n,marginBottom:-1,padding:`0 ${ae(i)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${ae(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${ae(e.borderRadiusLG)} ${ae(e.borderRadiusLG)} 0 0`,...Cp(),"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":{display:"inline-block",flex:1,...La,[` > ${r}-typography, > ${r}-typography-edit-content `]:{insetInlineStart:0,marginTop:0,marginBottom:0}},[`${t}-tabs-top`]:{clear:"both",marginBottom:o,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${ae(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}}},HBe=e=>{const{cardPaddingBase:t,colorBorderSecondary:r,cardShadow:n,lineWidth:i}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:` ${ae(i)} 0 0 0 ${r}, 0 ${ae(i)} 0 0 ${r}, ${ae(i)} ${ae(i)} 0 0 ${r}, ${ae(i)} 0 0 0 ${r} inset, 0 ${ae(i)} 0 0 ${r} inset; `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:n}}},WBe=e=>{const{componentCls:t,iconCls:r,actionsLiMargin:n,cardActionsIconSize:i,colorBorderSecondary:o,actionsBg:s}=e;return{margin:0,padding:0,listStyle:"none",background:s,borderTop:`${ae(e.lineWidth)} ${e.lineType} ${o}`,display:"flex",borderRadius:`0 0 ${ae(e.borderRadiusLG)} ${ae(e.borderRadiusLG)}`,...Cp(),"& > li":{margin:n,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${r}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:ae(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${r}`]:{fontSize:i,lineHeight:ae(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${ae(e.lineWidth)} ${e.lineType} ${o}`}}}},UBe=e=>({margin:`${ae(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex",...Cp(),"&-avatar":{paddingInlineEnd:e.padding},"&-section":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,...La},"&-description":{color:e.colorTextDescription}}),jBe=e=>{const{componentCls:t,colorFillAlter:r,headerPadding:n,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${ae(n)}`,background:r,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${ae(e.padding)} ${ae(i)}`}}},KBe=e=>{const{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}},qBe=e=>{const{componentCls:t,cardShadow:r,cardHeadPadding:n,colorBorderSecondary:i,boxShadowTertiary:o,bodyPadding:s,extraColor:a,motionDurationMid:l}=e;return{[t]:{...cn(e),position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:o},[`${t}-head`]:zBe(e),[`${t}-extra`]:{marginInlineStart:"auto",color:a,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:s,borderRadius:`0 0 ${ae(e.borderRadiusLG)} ${ae(e.borderRadiusLG)}`,"&:first-child":{borderStartStartRadius:e.borderRadiusLG,borderStartEndRadius:e.borderRadiusLG},"&:not(:last-child)":{borderEndStartRadius:0,borderEndEndRadius:0}},[`${t}-grid`]:HBe(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${ae(e.borderRadiusLG)} ${ae(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:WBe(e),[`${t}-meta`]:UBe(e)},[`${t}-bordered`]:{border:`${ae(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:["box-shadow","border-color"].map(c=>`${c} ${l}`).join(", "),"&:hover":{borderColor:"transparent",boxShadow:r}},[`${t}-contain-grid`]:{borderRadius:`${ae(e.borderRadiusLG)} ${ae(e.borderRadiusLG)} 0 0 `,[`&:not(:has(> ${t}-head))`]:{borderRadius:0},[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:n}}},[`${t}-type-inner`]:jBe(e),[`${t}-loading`]:KBe(e),[`${t}-rtl`]:{direction:"rtl"}}},YBe=e=>{const{componentCls:t,bodyPaddingSM:r,headerPaddingSM:n,headerHeightSM:i,headerFontSizeSM:o}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${ae(n)}`,fontSize:o,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:r}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}},XBe=e=>({headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG}),ZBe=Yr("Card",e=>{const t=Wr(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[qBe(t),YBe(t)]},XBe),JBe=e=>{const{actionClasses:t,actions:r=[],actionStyle:n}=e;return y.createElement("ul",{className:t,style:n},r.map((i,o)=>{const s=`action-${o}`;return y.createElement("li",{style:{width:`${100/r.length}%`},key:s},y.createElement("span",null,i))}))},QBe=y.forwardRef((e,t)=>{const{prefixCls:r,className:n,rootClassName:i,style:o,extra:s,headStyle:a={},bodyStyle:l={},title:c,loading:u,bordered:d,variant:h,size:p,type:f,cover:g,actions:m,tabList:v,children:b,activeTabKey:S,defaultActiveTabKey:x,tabBarExtraContent:T,hoverable:R,tabProps:E={},classNames:M,styles:D,...A}=e,{getPrefixCls:I,direction:_,className:F,style:O,classNames:k,styles:B}=Ur("card"),[H]=Ox("card",h,d),N=Li(p),z={...e,size:N,variant:H,loading:u},[U,V]=jr([k,M],[B,D],{props:z}),G=He=>{var Ge;(Ge=e.onTabChange)==null||Ge.call(e,He)},K=y.useMemo(()=>Di(b).some(Ge=>y.isValidElement(Ge)&&Ge.type===Nce),[b]),q=I("card",r),[Y,X]=ZBe(q),le=y.createElement(Vp,{loading:!0,active:!0,paragraph:{rows:4},title:!1},b),re=S!==void 0,ne={...E,[re?"activeKey":"defaultActiveKey"]:re?S:x,tabBarExtraContent:T};let se;const de=N!=="small"?"large":N,te=v?y.createElement(kce,{size:de,...ne,className:`${q}-head-tabs`,onChange:G,items:v.map(({tab:He,...Ge})=>({label:He,...Ge}))}):null;if(c||s||te){const He=ee(`${q}-head`,U.header),Ge=ee(`${q}-head-title`,U.title),Ct=ee(`${q}-extra`,U.extra),Ht={...a,...V.header};se=y.createElement("div",{className:He,style:Ht},y.createElement("div",{className:`${q}-head-wrapper`},c&&y.createElement("div",{className:Ge,style:V.title},c),s&&y.createElement("div",{className:Ct,style:V.extra},s)),te)}const ie=ee(`${q}-cover`,U.cover),pe=g?y.createElement("div",{className:ie,style:V.cover},g):null,Z=ee(`${q}-body`,U.body),ue={...l,...V.body},ve=y.createElement("div",{className:Z,style:ue},u?le:b),he=ee(`${q}-actions`,U.actions),me=m!=null&&m.length?y.createElement(JBe,{actionClasses:he,actionStyle:V.actions,actions:m}):null,Oe=En(A,["onTabChange"]),Pe=ee(q,F,{[`${q}-loading`]:u,[`${q}-bordered`]:H!=="borderless",[`${q}-hoverable`]:R,[`${q}-contain-grid`]:K,[`${q}-contain-tabs`]:v==null?void 0:v.length,[`${q}-small`]:N==="small",[`${q}-type-${f}`]:!!f,[`${q}-rtl`]:_==="rtl"},n,i,Y,X,U.root),Me={...V.root,...O,...o};return y.createElement("div",{ref:t,...Oe,className:Pe,style:Me},se,pe,ve,me)}),e$e=e=>{const{prefixCls:t,className:r,avatar:n,title:i,description:o,style:s,classNames:a,styles:l,...c}=e,{getPrefixCls:u,className:d,style:h,classNames:p,styles:f}=Ur("cardMeta"),m=`${u("card",t)}-meta`,[v,b]=jr([p,a],[f,l],{props:e}),S=ee(m,r,d,v.root),x={...h,...b.root,...s},T=ee(`${m}-avatar`,v.avatar),R=ee(`${m}-title`,v.title),E=ee(`${m}-description`,v.description),M=ee(`${m}-section`,v.section),D=n?y.createElement("div",{className:T,style:b.avatar},n):null,A=i?y.createElement("div",{className:R,style:b.title},i):null,I=o?y.createElement("div",{className:E,style:b.description},o):null,_=A||I?y.createElement("div",{className:M,style:b.section},A,I):null;return y.createElement("div",{...c,className:S,style:x},D,_)},Bce=QBe;Bce.Grid=Nce;Bce.Meta=e$e;function t$e(e,t,r){var n=r||{},i=n.noTrailing,o=i===void 0?!1:i,s=n.noLeading,a=s===void 0?!1:s,l=n.debounceMode,c=l===void 0?void 0:l,u,d=!1,h=0;function p(){u&&clearTimeout(u)}function f(m){var v=m||{},b=v.upcomingOnly,S=b===void 0?!1:b;p(),d=!S}function g(){for(var m=arguments.length,v=new Array(m),b=0;be?a?(h=Date.now(),o||(u=setTimeout(c?R:T,e))):T():o!==!0&&(u=setTimeout(c?R:T,c===void 0?e-x:e))}return g.cancel=f,g}function r$e(e,t,r){var n={},i=n.atBegin,o=i===void 0?!1:i;return t$e(e,t,{debounceMode:o!==!1})}function Ss(e,t){return e[t]}function $ce(e,t){return`${e}-${t}`}function n$e(e){return e&&e.type&&e.type.isTreeNode}function Gx(e,t){return e??t}function Ny(e){const{title:t,_title:r,key:n,children:i}=e||{},o=t||"title";return{title:o,_title:r||[o],key:n||"key",children:i||"children"}}function Gce(e){function t(r){return Di(r).map(i=>{if(!n$e(i))return Hn(!i,"Tree/TreeNode can only accept TreeNode as children."),null;const{key:o}=i,{children:s,...a}=i.props,l={key:o,...a},c=t(s);return c.length&&(l.children=c),l}).filter(i=>i)}return t(e)}function V_(e,t,r){const{_title:n,key:i,children:o}=Ny(r),s=new Set(t===!0?[]:t),a=[];function l(c,u=null){return c.map((d,h)=>{const p=$ce(u?u.pos:"0",h),f=Gx(d[i],p);let g;for(let v=0;vh[o]:typeof o=="function"&&(u=h=>o(h)):u=(h,p)=>Gx(h[a],p);function d(h,p,f,g){const m=h?h[c]:e,v=h?$ce(f.pos,p):"0",b=h?[...g,h]:[];if(h){const S=u(h,v),x={node:h,index:p,pos:v,key:S,parentPos:f.node?f.pos:null,level:f.level+1,nodes:b};t(x)}m&&m.forEach((S,x)=>{d(S,x,{node:h,pos:v,level:f?f.level+1:-1},b)})}d(null)}function k3(e,{initWrapper:t,processEntity:r,onProcessFinished:n,externalGetKey:i,childrenPropName:o,fieldNames:s}={},a){const l=i||a,c={},u={};let d={posEntities:c,keyEntities:u};return t&&(d=t(d)||d),i$e(e,h=>{const{node:p,index:f,pos:g,key:m,parentPos:v,level:b,nodes:S}=h,x={node:p,nodes:S,index:f,key:m,pos:g,level:b},T=Gx(m,g);c[g]=x,u[T]=x,x.parent=c[v],x.parent&&(x.parent.children=x.parent.children||[],x.parent.children.push(x)),r&&r(x,d)},{externalGetKey:l,childrenPropName:o,fieldNames:s}),n&&n(d),d}function Vce(e,t,r,n){return e===!1?!1:e||!t&&!r||t&&n&&!r}function ww(e,{expandedKeys:t,selectedKeys:r,loadedKeys:n,loadingKeys:i,checkedKeys:o,halfCheckedKeys:s,dragOverNodeKey:a,dropPosition:l,keyEntities:c}){const u=Ss(c,e);return{eventKey:e,expanded:t.indexOf(e)!==-1,selected:r.indexOf(e)!==-1,loaded:n.indexOf(e)!==-1,loading:i.indexOf(e)!==-1,checked:o.indexOf(e)!==-1,halfChecked:s.indexOf(e)!==-1,pos:String(u?u.pos:""),dragOver:a===e&&l===0,dragOverGapTop:a===e&&l===-1,dragOverGapBottom:a===e&&l===1}}function Gi(e){const{data:t,expanded:r,selected:n,checked:i,loaded:o,loading:s,halfChecked:a,dragOver:l,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:h,eventKey:p}=e,f={...t,expanded:r,selected:n,checked:i,loaded:o,loading:s,halfChecked:a,dragOver:l,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:h,key:p};return"props"in f||Object.defineProperty(f,"props",{get(){return Hn(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),f}function zce(e,t){const r=new Set;return e.forEach(n=>{t.has(n)||r.add(n)}),r}function o$e(e){const{disabled:t,disableCheckbox:r,checkable:n}=e||{};return!!(t||r)||n===!1}function s$e(e,t,r,n){const i=new Set(e),o=new Set;for(let a=0;a<=r;a+=1)(t.get(a)||new Set).forEach(c=>{const{key:u,node:d,children:h=[]}=c;i.has(u)&&!n(d)&&h.filter(p=>!n(p.node)).forEach(p=>{i.add(p.key)})});const s=new Set;for(let a=r;a>=0;a-=1)(t.get(a)||new Set).forEach(c=>{const{parent:u,node:d}=c;if(n(d)||!c.parent||s.has(c.parent.key))return;if(n(c.parent.node)){s.add(u.key);return}let h=!0,p=!1;(u.children||[]).filter(f=>!n(f.node)).forEach(({key:f})=>{const g=i.has(f);h&&!g&&(h=!1),!p&&(g||o.has(f))&&(p=!0)}),h&&i.add(u.key),p&&o.add(u.key),s.add(u.key)});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(zce(o,i))}}function a$e(e,t,r,n,i){const o=new Set(e);let s=new Set(t);for(let l=0;l<=n;l+=1)(r.get(l)||new Set).forEach(u=>{const{key:d,node:h,children:p=[]}=u;!o.has(d)&&!s.has(d)&&!i(h)&&p.filter(f=>!i(f.node)).forEach(f=>{o.delete(f.key)})});s=new Set;const a=new Set;for(let l=n;l>=0;l-=1)(r.get(l)||new Set).forEach(u=>{const{parent:d,node:h}=u;if(i(h)||!u.parent||a.has(u.parent.key))return;if(i(u.parent.node)){a.add(d.key);return}let p=!0,f=!1;(d.children||[]).filter(g=>!i(g.node)).forEach(({key:g})=>{const m=o.has(g);p&&!m&&(p=!1),!f&&(m||s.has(g))&&(f=!0)}),p||o.delete(d.key),f&&s.add(d.key),a.add(d.key)});return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(zce(s,o))}}function fy(e,t,r,n){const i=[];let o;n?o=n:o=o$e;const s=new Set(e.filter(u=>{const d=!!Ss(r,u);return d||i.push(u),d})),a=new Map;let l=0;Object.keys(r).forEach(u=>{const d=r[u],{level:h}=d;let p=a.get(h);p||(p=new Set,a.set(h,p)),p.add(d),l=Math.max(l,h)}),Hn(!i.length,`Tree missing follow keys: ${i.slice(0,100).map(u=>`'${u}'`).join(", ")}`);let c;return t===!0?c=s$e(s,a,l,o):c=a$e(s,t.halfCheckedKeys,a,l,o),c}const l$e=e=>{const{checkboxCls:t,checkboxSize:r,lineWidth:n}=e,i=`${t}-wrapper`;return[{[`${t}-group`]:{...cn(e),display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[i]:{...cn(e),display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${i}`]:{marginInlineStart:0},[`&${i}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}},[t]:{...cn(e),position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",boxSizing:"border-box",display:"block",width:r,height:r,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${ae(n)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,flex:"none",...md(),"&:after":{boxSizing:"border-box",position:"absolute",top:`calc(${r} / 2 - ${n})`,insetInlineStart:`calc(${r} / 4 - ${n})`,display:"table",width:e.calc(r).div(14).mul(5).equal(),height:e.calc(r).div(14).mul(8).equal(),border:`${ae(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}`,...md()},[`${t}-input`]:{position:"absolute",inset:`calc(-1 * (${n}))`,zIndex:1,cursor:"pointer",opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:uc(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[` ${i}:not(${i}-disabled), ${t}:not(${t}-disabled) `]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${i}:not(${i}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[`${t}-checked`]:{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}`,...md()},[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{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":{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}},{[`${i}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function Hce(e,t){const r=Wr(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return l$e(r)}const Wce=Yr("Checkbox",(e,{prefixCls:t})=>[Hce(t,e)]),Uce=Q.createContext(null),c$e=(e,t)=>{const{prefixCls:r,children:n,indeterminate:i=!1,onMouseEnter:o,onMouseLeave:s,skipGroup:a=!1,disabled:l,rootClassName:c,className:u,style:d,classNames:h,styles:p,name:f,value:g,checked:m,defaultChecked:v,onChange:b,...S}=e,{getPrefixCls:x,direction:T,className:R,style:E,classNames:M,styles:D}=Ur("checkbox"),A=y.useContext(Uce),{isFormItemInput:I}=y.useContext(sa),_=y.useContext(Rs),F=((A==null?void 0:A.disabled)||l)??_,[O,k]=Fn(v,m);let B=O;const H=br(te=>{k(te.target.checked),b==null||b(te),!a&&(A!=null&&A.toggleOption)&&A.toggleOption({label:n,value:g})});A&&!a&&(B=A.value.includes(g));const N=y.useRef(null),z=xu(t,N);y.useEffect(()=>{if(!(a||!A))return A.registerValue(g),()=>{A.cancelValue(g)}},[g,a]),y.useEffect(()=>{var te;(te=N.current)!=null&&te.input&&(N.current.input.indeterminate=i)},[i]);const U=x("checkbox",r),V=co(U),[G,K]=Wce(U,V),q={...S},Y={...e,indeterminate:i,disabled:F,checked:B},[X,le]=jr([M,h],[D,p],{props:Y}),re=ee(`${U}-wrapper`,{[`${U}-rtl`]:T==="rtl",[`${U}-wrapper-checked`]:B,[`${U}-wrapper-disabled`]:F,[`${U}-wrapper-in-form-item`]:I},R,u,X.root,c,K,V,G),ne=ee(X.icon,{[`${U}-indeterminate`]:i},ID,G),[se,de]=Sce(q.onClick);return y.createElement(Ex,{component:"Checkbox",disabled:F},y.createElement("label",{className:re,style:{...le.root,...E,...d},onMouseEnter:o,onMouseLeave:s,onClick:se},y.createElement(bce,{...q,name:!a&&A?A.name:f,checked:B,onClick:de,onChange:H,prefixCls:U,className:ne,style:le.icon,disabled:F,ref:z,value:g}),xn(n)&&y.createElement("span",{className:ee(`${U}-label`,X.label),style:le.label},n)))},jce=y.forwardRef(c$e),u$e=y.forwardRef((e,t)=>{const{defaultValue:r,children:n,options:i=[],prefixCls:o,className:s,rootClassName:a,style:l,onChange:c,role:u="group",...d}=e,{getPrefixCls:h,direction:p}=y.useContext(or),[f,g]=y.useState(d.value||r||[]),[m,v]=y.useState([]);y.useEffect(()=>{"value"in d&&g(d.value||[])},[d.value]);const b=y.useMemo(()=>i.map(k=>typeof k=="string"||typeof k=="number"?{label:k,value:k}:k),[i]),S=k=>{v(B=>B.filter(H=>H!==k))},x=k=>{v(B=>[].concat(Nr(B),[k]))},T=k=>{const B=f.indexOf(k.value),H=Nr(f);B===-1?H.push(k.value):H.splice(B,1),"value"in d||g(H),c==null||c(H.filter(N=>m.includes(N)).sort((N,z)=>{const U=b.findIndex(G=>G.value===N),V=b.findIndex(G=>G.value===z);return U-V}))},R=h("checkbox",o),E=`${R}-group`,M=co(R),[D,A]=Wce(R,M),I=En(d,["value","disabled"]),_=i.length?b.map(k=>y.createElement(jce,{prefixCls:R,key:k.value.toString(),disabled:"disabled"in k?k.disabled:d.disabled,value:k.value,checked:f.includes(k.value),onChange:k.onChange,className:ee(`${E}-item`,k.className),style:k.style,title:k.title,id:k.id,required:k.required},k.label)):n,F=y.useMemo(()=>({toggleOption:T,value:f,disabled:d.disabled,name:d.name,registerValue:x,cancelValue:S}),[T,f,d.disabled,d.name,x,S]),O=ee(E,{[`${E}-rtl`]:p==="rtl"},s,a,A,M,D);return y.createElement("div",{className:O,style:l,role:u,...I,ref:t},y.createElement(Uce.Provider,{value:F},_))}),By=jce;By.Group=u$e;By.__ANT_CHECKBOX=!0;const Kce=y.createContext({}),d$e=e=>typeof e=="number"&&!Number.isNaN(e);function sq(e){return e==="auto"?"1 1 auto":d$e(e)?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}const h$e=y.forwardRef((e,t)=>{const{getPrefixCls:r,direction:n}=y.useContext(or),{gutter:i,wrap:o}=y.useContext(Kce),{prefixCls:s,span:a,order:l,offset:c,push:u,pull:d,className:h,children:p,flex:f,style:g,...m}=e,v=r("col",s),b=r(),[S,x]=sOe(v),[T]=Jn(b,"col"),R={};let E={};Xke.forEach(A=>{let I={};const _=e[A];typeof _=="number"?I.span=_:typeof _=="object"&&(I=_||{}),delete m[A],E={...E,[`${v}-${A}-${I.span}`]:I.span!==void 0,[`${v}-${A}-order-${I.order}`]:I.order||I.order===0,[`${v}-${A}-offset-${I.offset}`]:I.offset||I.offset===0,[`${v}-${A}-push-${I.push}`]:I.push||I.push===0,[`${v}-${A}-pull-${I.pull}`]:I.pull||I.pull===0,[`${v}-rtl`]:n==="rtl"},I.flex&&(E[`${v}-${A}-flex`]=!0,R[T(`${A}-flex`)]=sq(I.flex))});const M=ee(v,{[`${v}-${a}`]:a!==void 0,[`${v}-order-${l}`]:l,[`${v}-offset-${c}`]:c,[`${v}-push-${u}`]:u,[`${v}-pull-${d}`]:d},h,E,S,x),D={};if(i!=null&&i[0]){const A=typeof i[0]=="number"?`${i[0]/2}px`:`calc(${i[0]} / 2)`;D.paddingInline=A}return f&&(D.flex=sq(f),o===!1&&!D.minWidth&&(D.minWidth=0)),y.createElement("div",{...m,style:{...D,...g,...R},className:M,ref:t},p)});function p$e(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,xxxl:!0};return n.forEach((o,s)=>{if(typeof o=="object"&&o!==null)for(let a=0;a{if(typeof e=="string"&&n(e),typeof e=="object")for(let o=0;o{i()},[JSON.stringify(e),t]),r}const f$e=y.forwardRef((e,t)=>{const{prefixCls:r,justify:n,align:i,className:o,style:s,children:a,gutter:l=0,wrap:c,...u}=e,{getPrefixCls:d,direction:h}=y.useContext(or),p=kx(!0,null),f=aq(i,p),g=aq(n,p),m=d("row",r),[v,b]=oOe(m),S=p$e(l,p),x=ee(m,{[`${m}-no-wrap`]:c===!1,[`${m}-${g}`]:g,[`${m}-${f}`]:f,[`${m}-rtl`]:h==="rtl"},o,v,b),T={};if(S!=null&&S[0]){const D=typeof S[0]=="number"?`${S[0]/-2}px`:`calc(${S[0]} / -2)`;T.marginInline=D}const[R,E]=S;T.rowGap=E;const M=y.useMemo(()=>({gutter:[R,E],wrap:c}),[R,E,c]);return y.createElement(Kce.Provider,{value:M},y.createElement("div",{...u,className:x,style:{...T,...s},ref:t},a))}),g$e=e=>{const{componentCls:t}=e;return{[t]:{"&-horizontal":{[`&${t}`]:{"&-sm":{marginBlock:e.marginXS},"&-md":{marginBlock:e.margin}}}}}},m$e=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:r,colorSplit:n,lineWidth:i,textPaddingInline:o,orientationMargin:s,verticalMarginInline:a}=e,l=`${t}-rail`;return{[t]:{...cn(e),borderBlockStart:`${ae(i)} solid ${n}`,[l]:{borderBlockStart:`${ae(i)} solid ${n}`},"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:a,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${ae(i)} solid ${n}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${ae(e.marginLG)} 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${ae(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${n}`,[`${l}-start, ${l}-end`]:{width:"50%",borderBlockStartColor:"inherit",borderBlockEnd:0,content:"''"}},[`&-horizontal${t}-with-text-start`]:{[`${l}-start`]:{width:`calc(${s} * 100%)`},[`${l}-end`]:{width:`calc(100% - ${s} * 100%)`}},[`&-horizontal${t}-with-text-end`]:{[`${l}-start`]:{width:`calc(100% - ${s} * 100%)`},[`${l}-end`]:{width:`calc(${s} * 100%)`}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:o},"&-dashed":{background:"none",borderColor:n,borderStyle:"dashed",borderWidth:`${ae(i)} 0 0`,[l]:{borderBlockStart:`${ae(i)} dashed ${n}`}},[`&-horizontal${t}-with-text${t}-dashed`]:{[`${l}-start, ${l}-end`]:{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:n,borderStyle:"dotted",borderWidth:`${ae(i)} 0 0`,[l]:{borderBlockStart:`${ae(i)} dotted ${n}`}},[`&-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`]:{[`${l}-start`]:{width:0},[`${l}-end`]:{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:r}},[`&-horizontal${t}-with-text-end${t}-no-default-orientation-margin-end`]:{[`${l}-start`]:{width:"100%"},[`${l}-end`]:{width:0},[`${t}-inner-text`]:{paddingInlineEnd:r}}}}},v$e=e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}),y$e=Yr("Divider",e=>{const t=Wr(e,{dividerHorizontalWithTextGutterMargin:e.margin,sizePaddingEdgeHorizontal:0});return[m$e(t),g$e(t)]},v$e,{unitless:{orientationMargin:!0}}),C$e=["left","right","center","start","end"],Qkt=e=>{const{getPrefixCls:t,direction:r,className:n,style:i,classNames:o,styles:s}=Ur("divider"),{prefixCls:a,type:l,orientation:c,vertical:u,titlePlacement:d,orientationMargin:h,className:p,rootClassName:f,children:g,dashed:m,variant:v="solid",plain:b,style:S,size:x,classNames:T,styles:R,...E}=e,M=t("divider",a),D=`${M}-rail`,[A,I]=y$e(M),_=Li(x),F=!!g,O=C$e.includes(c||""),k=y.useMemo(()=>{const X=d??(O?c:"center");return X==="left"?r==="rtl"?"end":"start":X==="right"?r==="rtl"?"start":"end":X},[r,c,d,O]),B=k==="start"&&h!=null,H=k==="end"&&h!=null,[N,z]=Cx(c,u,l),U={...e,orientation:N,titlePlacement:k,size:_},[V,G]=jr([o,T],[s,R],{props:U}),K=ee(M,n,A,I,`${M}-${N}`,{[`${M}-with-text`]:F,[`${M}-with-text-${k}`]:F,[`${M}-dashed`]:!!m,[`${M}-${v}`]:v!=="solid",[`${M}-plain`]:!!b,[`${M}-rtl`]:r==="rtl",[`${M}-no-default-orientation-margin-start`]:B,[`${M}-no-default-orientation-margin-end`]:H,[`${M}-md`]:_==="medium"||_==="middle",[`${M}-sm`]:_==="small",[D]:!g,[V.rail]:V.rail&&!g},p,f,V.root),q=y.useMemo(()=>typeof h=="number"?h:/^\d+$/.test(h)?Number(h):h,[h]),Y={marginInlineStart:B?q:void 0,marginInlineEnd:H?q:void 0};return y.createElement("div",{className:K,style:{...i,...G.root,...g?{}:G.rail,...S},...E,role:"separator"},g&&!z&&y.createElement(y.Fragment,null,y.createElement("div",{className:ee(D,`${D}-start`,V.rail),style:G.rail}),y.createElement("span",{className:ee(`${M}-inner-text`,V.content),style:{...Y,...G.content}},g),y.createElement("div",{className:ee(D,`${D}-end`,V.rail),style:G.rail})))};var b$e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"};function S$(){return S$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,S$({},e,{ref:t,icon:b$e})),w$e=y.forwardRef(S$e);var x$e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};function w$(){return w$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,w$({},e,{ref:t,icon:x$e})),E$e=y.forwardRef(T$e);function x$(){return typeof BigInt=="function"}function qce(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Ag(e){var t=e.trim(),r=t.startsWith("-");r&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t="0".concat(t));var n=t||"0",i=n.split("."),o=i[0]||"0",s=i[1]||"0";o==="0"&&s==="0"&&(r=!1);var a=r?"-":"";return{negative:r,negativeStr:a,trimStr:n,integerStr:o,decimalStr:s,fullStr:"".concat(a).concat(n)}}function N3(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function mg(e){var t=String(e);if(N3(e)){var r=Number(t.slice(t.indexOf("e-")+2)),n=t.match(/\.(\d+)/);return n!=null&&n[1]&&(r+=n[1].length),r}return t.includes(".")&&B3(t)?t.length-t.indexOf(".")-1:0}function zD(e){var t=String(e);if(N3(e)){if(e>Number.MAX_SAFE_INTEGER)return String(x$()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e0&&arguments[0]!==void 0?arguments[0]:!0;return r?this.isInvalidate()?"":Ag("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e})(),P$e=(function(){function e(t){if(Hd(this,e),Nn(this,"origin",""),Nn(this,"number",void 0),Nn(this,"empty",void 0),qce(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return Wd(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(r){if(this.isInvalidate())return new e(r);var n=Number(r);if(Number.isNaN(n))return this;var i=this.number+n;if(i>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(iNumber.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(i0&&arguments[0]!==void 0?arguments[0]:!0;return r?this.isInvalidate()?"":zD(this.number):this.origin}}]),e})();function Gl(e){return x$()?new R$e(e):new P$e(e)}function rP(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";var i=Ag(e),o=i.negativeStr,s=i.integerStr,a=i.decimalStr,l="".concat(t).concat(a),c="".concat(o).concat(s);if(r>=0){var u=Number(a[r]);if(u>=5&&!n){var d=Gl(e).add("".concat(o,"0.").concat("0".repeat(r)).concat(10-u));return rP(d.toString(),t,r,n)}return r===0?c:"".concat(c).concat(t).concat(a.padEnd(r,"0").slice(0,r))}return l===".0"?c:"".concat(c).concat(l)}function M$e(e,t){return typeof Proxy<"u"&&e?new Proxy(e,{get(r,n){if(t[n])return t[n];const i=r[n];return typeof i=="function"?i.bind(r):i}}):e}function I$e(e,t){const r=y.useRef(null);function n(){try{const{selectionStart:o,selectionEnd:s,value:a}=e,l=a.substring(0,o),c=a.substring(s);r.current={start:o,end:s,value:a,beforeTxt:l,afterTxt:c}}catch{}}function i(){if(e&&r.current&&t)try{const{value:o}=e,{beforeTxt:s,afterTxt:a,start:l}=r.current;let c=o.length;if(o.startsWith(s))c=s.length;else if(o.endsWith(a))c=o.length-r.current.afterTxt.length;else{const u=s[l-1],d=o.indexOf(u,l-1);d!==-1&&(c=d+1)}e.setSelectionRange(c,c)}catch(o){Hn(!1,`Something warning of cursor restore. Please fire issue about this: ${o.message}`)}}return[n,i]}const D$e=200,A$e=600;function lq({prefixCls:e,action:t,children:r,disabled:n,className:i,style:o,onStep:s}){const a=t==="up",l=y.useRef(),c=y.useRef([]),u=()=>{clearTimeout(l.current)},d=g=>{g.preventDefault(),u(),s(a,"handler");function m(){s(a,"handler"),l.current=setTimeout(m,D$e)}l.current=setTimeout(m,A$e)};y.useEffect(()=>()=>{u(),c.current.forEach(g=>{Lr.cancel(g)})},[]);const h=`${e}-action`,p=ee(h,`${h}-${t}`,{[`${h}-${t}-disabled`]:n},i),f=()=>c.current.push(Lr(u));return y.createElement("span",{unselectable:"on",role:"button",onMouseUp:f,onMouseLeave:f,onMouseDown:g=>{d(g)},"aria-label":a?"Increase Value":"Decrease Value","aria-disabled":n,className:p,style:o},r||y.createElement("span",{unselectable:"on",className:`${e}-action-${t}-inner`}))}function cq(e){const t=typeof e=="number"?zD(e):Ag(e).fullStr;return t.includes(".")?Ag(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}const F$e=(()=>{const e=y.useRef(0),t=()=>{Lr.cancel(e.current)};return y.useEffect(()=>t,[]),r=>{t(),e.current=Lr(()=>{r()})}});function xw(){return xw=Object.assign?Object.assign.bind():function(e){for(var t=1;te||t.isEmpty()?t.toString():t.toNumber(),dq=e=>{const t=Gl(e);return t.isInvalidate()?null:t},L$e=y.forwardRef((e,t)=>{const{mode:r="input",prefixCls:n="rc-input-number",className:i,style:o,classNames:s,styles:a,min:l,max:c,step:u=1,defaultValue:d,value:h,disabled:p,readOnly:f,upHandler:g,downHandler:m,keyboard:v,changeOnWheel:b=!1,controls:S=!0,prefix:x,suffix:T,stringMode:R,parser:E,formatter:M,precision:D,decimalSeparator:A,onChange:I,onInput:_,onPressEnter:F,onStep:O,onMouseDown:k,onClick:B,onMouseUp:H,onMouseLeave:N,onMouseMove:z,onMouseEnter:U,onMouseOut:V,changeOnBlur:G=!0,...K}=e,[q,Y]=y.useState(!1),X=y.useRef(!1),le=y.useRef(!1),re=y.useRef(!1),ne=y.useRef(null),se=y.useRef(null);y.useImperativeHandle(t,()=>M$e(se.current,{focus:Je=>{a3(se.current,Je)},blur:()=>{var Je;(Je=se.current)==null||Je.blur()},nativeElement:ne.current}));const[de,te]=y.useState(()=>Gl(h??d));function ie(Je){h===void 0&&te(Je)}const pe=y.useCallback((Je,ot)=>{if(!ot)return D>=0?D:Math.max(mg(Je),mg(u))},[D,u]),Z=y.useCallback(Je=>{const ot=String(Je);if(E)return E(ot);let De=ot;return A&&(De=De.replace(A,".")),De.replace(/[^\w.-]+/g,"")},[E,A]),ue=y.useRef(""),ve=y.useCallback((Je,ot)=>{if(M)return M(Je,{userTyping:ot,input:String(ue.current)});let De=typeof Je=="number"?zD(Je):Je;if(!ot){const Pt=pe(De,ot);B3(De)&&(A||Pt>=0)&&(De=rP(De,A||".",Pt))}return De},[M,pe,A]),[he,me]=y.useState(()=>{const Je=d??h;return de.isInvalidate()&&["string","number"].includes(typeof Je)?Number.isNaN(Je)?"":Je:ve(de.toString(),!1)});ue.current=he;function Oe(Je,ot){me(ve(Je.isInvalidate()?Je.toString(!1):Je.toString(!ot),ot))}const Pe=y.useMemo(()=>dq(c),[c,D]),Me=y.useMemo(()=>dq(l),[l,D]),He=y.useMemo(()=>!Pe||!de||de.isInvalidate()?!1:Pe.lessEquals(de),[Pe,de]),Ge=y.useMemo(()=>!Me||!de||de.isInvalidate()?!1:de.lessEquals(Me),[Me,de]),[Ct,Ht]=I$e(se.current,q),St=Je=>Pe&&!Je.lessEquals(Pe)?Pe:Me&&!Me.lessEquals(Je)?Me:null,Ye=Je=>!St(Je),Fe=(Je,ot)=>{let De=Je,Pt=Ye(De)||De.isEmpty();if(!De.isEmpty()&&!ot&&(De=St(De)||De,Pt=!0),!f&&!p&&Pt){const Qe=De.toString(),$e=pe(Qe,ot);return $e>=0&&(De=Gl(rP(Qe,".",$e)),Ye(De)||(De=Gl(rP(Qe,".",$e,!0)))),De.equals(de)||(ie(De),I==null||I(De.isEmpty()?null:uq(R,De)),h===void 0&&Oe(De,ot)),De}return de},et=F$e(),Ne=Je=>{if(Ct(),ue.current=Je,me(Je),!le.current){const ot=Z(Je),De=Gl(ot);De.isNaN()||Fe(De,!0)}_==null||_(Je),et(()=>{let ot=Je;E||(ot=Je.replace(/。/g,".")),ot!==Je&&Ne(ot)})},tt=()=>{le.current=!0},nt=()=>{le.current=!1,Ne(se.current.value)},Ke=Je=>{Ne(Je.target.value)},Ie=br((Je,ot)=>{var $e;if(Je&&He||!Je&&Ge)return;X.current=!1;let De=Gl(re.current?cq(u):u);Je||(De=De.negate());const Pt=(de||Gl(0)).add(De.toString()),Qe=Fe(Pt,!1);O==null||O(uq(R,Qe),{offset:re.current?cq(u):u,type:Je?"up":"down",emitter:ot}),($e=se.current)==null||$e.focus()}),rt=Je=>{const ot=Gl(Z(he));let De;ot.isNaN()?De=Fe(de,Je):De=Fe(ot,Je),h!==void 0?Oe(de,!1):De.isNaN()||Oe(De,!1)},Tt=()=>{X.current=!0},Rt=Je=>{const{key:ot,shiftKey:De}=Je;X.current=!0,re.current=De,ot==="Enter"&&(le.current||(X.current=!1),rt(!1),F==null||F(Je)),v!==!1&&!le.current&&["Up","ArrowUp","Down","ArrowDown"].includes(ot)&&(Ie(ot==="Up"||ot==="ArrowUp","keyboard"),Je.preventDefault())},Bt=()=>{X.current=!1,re.current=!1};y.useEffect(()=>{if(b&&q){const Je=De=>{Ie(De.deltaY<0,"wheel"),De.preventDefault()},ot=se.current;if(ot)return ot.addEventListener("wheel",Je,{passive:!1}),()=>ot.removeEventListener("wheel",Je)}});const Qt=()=>{G&&rt(!1),Y(!1),X.current=!1},ft=Je=>{se.current&&Je.target!==se.current&&(se.current.focus(),Je.preventDefault()),k==null||k(Je)};UR(()=>{de.isInvalidate()||Oe(de,!1)},[D,M]),UR(()=>{const Je=Gl(h);te(Je);const ot=Gl(Z(he));(!Je.equals(ot)||!X.current||M)&&Oe(Je,X.current)},[h]),UR(()=>{M&&Ht()},[he]);const ut={prefixCls:n,onStep:Ie,className:s==null?void 0:s.action,style:a==null?void 0:a.action},Yt=y.createElement(lq,xw({},ut,{action:"up",disabled:He}),g),hr=y.createElement(lq,xw({},ut,{action:"down",disabled:Ge}),m);return y.createElement("div",{ref:ne,className:ee(n,`${n}-mode-${r}`,i,s==null?void 0:s.root,{[`${n}-focused`]:q,[`${n}-disabled`]:p,[`${n}-readonly`]:f,[`${n}-not-a-number`]:de.isNaN(),[`${n}-out-of-range`]:!de.isInvalidate()&&!Ye(de)}),style:{...a==null?void 0:a.root,...o},onMouseDown:ft,onMouseUp:H,onMouseLeave:N,onMouseMove:z,onMouseEnter:U,onMouseOut:V,onClick:B,onFocus:()=>{Y(!0)},onBlur:Qt,onKeyDown:Rt,onKeyUp:Bt,onCompositionStart:tt,onCompositionEnd:nt,onBeforeInput:Tt},r==="spinner"&&S&&hr,x!==void 0&&y.createElement("div",{className:ee(`${n}-prefix`,s==null?void 0:s.prefix),style:a==null?void 0:a.prefix},x),y.createElement("input",xw({autoComplete:"off",role:"spinbutton","aria-valuemin":l,"aria-valuemax":c,"aria-valuenow":de.isInvalidate()?null:de.toString(),step:u,ref:se,className:ee(`${n}-input`,s==null?void 0:s.input),style:a==null?void 0:a.input,value:he,onChange:Ke,disabled:p,readOnly:f},K)),T!==void 0&&y.createElement("div",{className:ee(`${n}-suffix`,s==null?void 0:s.suffix),style:a==null?void 0:a.suffix},T),r==="spinner"&&S&&Yt,r==="input"&&S&&y.createElement("div",{className:ee(`${n}-actions`,s==null?void 0:s.actions),style:a==null?void 0:a.actions},Yt,hr))}),_$e=e=>{const{componentCls:t,borderRadius:r,paddingSM:n,colorBorder:i,paddingXS:o,fontSizeLG:s,fontSizeSM:a,borderRadiusLG:l,borderRadiusSM:c,colorBgContainerDisabled:u,lineWidth:d,antCls:h}=e,[p,f]=Jn(h,"space");return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:n,margin:0,borderWidth:d,borderStyle:"solid",borderRadius:r,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:s,borderRadius:l},"&-small":{paddingInline:o,borderRadius:c,fontSize:a},"&-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},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[p("addon-border-color")]:i,[p("addon-background")]:u,[p("addon-border-color-outlined")]:i,[p("addon-background-filled")]:u,borderColor:f("addon-border-color"),background:f("addon-background"),"&-variant-outlined":{[p("addon-border-color")]:f("addon-border-color-outlined")},"&-variant-filled":{[p("addon-border-color")]:"transparent",[p("addon-background")]:f("addon-background-filled"),[`&${t}-disabled`]:{[p("addon-border-color")]:i,[p("addon-background")]:u}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{[p("addon-border-color-outlined")]:e.colorError,[p("addon-background-filled")]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[p("addon-border-color-outlined")]:e.colorWarning,[p("addon-background-filled")]:e.colorWarningBg,color:e.colorWarning}}]}},O$e=Yr(["Space","Addon"],e=>[_$e(e),Px(e,{focus:!1})]),Yce=Q.forwardRef((e,t)=>{const{className:r,children:n,style:i,prefixCls:o,variant:s="outlined",disabled:a,status:l,...c}=e,{getPrefixCls:u,direction:d}=Q.useContext(or),h=u("space-addon",o),[p,f]=O$e(h),{compactItemClassnames:g,compactSize:m}=Gp(h,d),v=Oy(h,l),b=ee(h,p,g,f,`${h}-variant-${s}`,v,{[`${h}-${m}`]:m,[`${h}-disabled`]:a},r);return Q.createElement("div",{ref:t,className:b,style:i,...c},n)}),k$e=e=>{const t=e.handleVisible??"auto",r=e.controlHeightSM-e.lineWidth*2;return{...RC(e),controlWidth:90,handleWidth:r,handleFontSize:e.fontSize/2,handleVisible:t,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new an(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:t===!0?1:0,handleVisibleWidth:t===!0?r:0}},N$e=e=>{const{componentCls:t,lineWidth:r,lineType:n,borderRadius:i,inputFontSizeSM:o,inputFontSizeLG:s,colorError:a,paddingInlineSM:l,paddingBlockSM:c,paddingBlockLG:u,paddingInlineLG:d,colorIcon:h,motionDurationMid:p,handleHoverColor:f,handleOpacity:g,paddingInline:m,paddingBlock:v,handleBg:b,handleActiveBg:S,inputAffixPadding:x,borderRadiusSM:T,controlWidth:R,handleBorderColor:E,filledHandleBg:M,lineHeightLG:D,antCls:A}=e,I=`${ae(r)} ${n} ${E}`,[_,F]=Jn(A,"input-number");return[{[t]:{...cn(e),...VD(e),[_("input-padding-block")]:ae(v),[_("input-padding-inline")]:ae(m),display:"inline-flex",width:R,margin:0,paddingBlock:0,borderRadius:i,...xce(e,{[`${t}-actions`]:{background:b,[`${t}-action-down`]:{borderBlockStart:I}}}),...Rce(e,{[`${t}-actions`]:{background:M,[`${t}-action-down`]:{borderBlockStart:I}},"&:focus-within":{[`${t}-actions`]:{background:b}}}),...Mce(e,{[`${t}-actions`]:{background:b,[`${t}-action-down`]:{borderBlockStart:I}}}),...Tce(e),[`&${t}-borderless`]:{paddingBlock:0,[_("input-padding-block")]:ae(e.calc(v).add(r).equal())},[`&${t}-borderless${t}-sm`]:{paddingBlock:0,[_("input-padding-block")]:ae(e.calc(c).add(r).equal())},[`&${t}-borderless${t}-lg`]:{paddingBlock:0,[_("input-padding-block")]:ae(e.calc(u).add(r).equal())},"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},[`&${t}-out-of-range`]:{[`${t}-input`]:{color:a}},[`${t}-input`]:{...cn(e),width:"100%",paddingBlock:F("input-padding-block"),textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:i,outline:0,transition:`all ${p} linear`,appearance:"textfield",fontSize:"inherit",lineHeight:"inherit",...Ice(e.colorTextPlaceholder),'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&-disabled ${t}-input`]:{cursor:"not-allowed",color:e.colorTextDisabled}}},{[t]:{[` ${t}-action-up-disabled, ${t}-action-down-disabled `]:{cursor:"not-allowed"},[`${t}-action`]:{...vx(),userSelect:"none",overflow:"hidden",fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",transition:`all ${p} linear`,"&:active":{background:S},"&:hover":{color:f}},"&-mode-input":{overflow:"hidden",[`${t}-actions`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:g,height:"100%",borderRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${p}`,overflow:"hidden",[`${t}-action`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",marginInlineEnd:0,fontSize:e.handleFontSize}},[`&:hover ${t}-actions, &-focused ${t}-actions`]:{width:e.handleWidth,opacity:1},[`${t}-action`]:{color:h,height:"50%",borderInlineStart:I,"&:hover":{height:"60%"}},[`&${t}-disabled, &${t}-readonly`]:{[`${t}-actions`]:{display:"none"}}},[`&${t}-mode-spinner`]:{padding:0,width:"auto",[`${t}-action`]:{flex:"none",paddingInline:F("input-padding-inline"),"&-up":{borderInlineStart:I},"&-down":{borderInlineEnd:I}},[`${t}-input`]:{textAlign:"center",paddingInline:F("input-padding-inline")}}}},{[t]:{"&-lg":{[_("input-padding-block")]:ae(u),[_("input-padding-inline")]:ae(d),paddingBlock:0,fontSize:s,lineHeight:D},"&-sm":{[_("input-padding-block")]:ae(c),[_("input-padding-inline")]:ae(l),paddingBlock:0,fontSize:o,borderRadius:T}}},{[t]:{[`${t}-prefix, ${t}-suffix`]:{display:"flex",flex:"none",alignItems:"center",alignSelf:"center",pointerEvents:"none"},[`${t}-prefix`]:{marginInlineEnd:x},[`${t}-suffix`]:{height:"100%",marginInlineStart:x,transition:`margin ${p}`},[`&:hover:not(${t}-without-controls)`]:{[`${t}-suffix`]:{marginInlineEnd:e.handleWidth}}}}]},B$e=e=>{const{componentCls:t,antCls:r}=e;return{[`${t}-addon`]:{[`&:has(${r}-select)`]:{border:0,padding:0}}}},$$e=Yr("InputNumber",e=>{const t=Wr(e,EC(e));return[N$e(t),B$e(t),Px(t)]},k$e,{unitless:{handleOpacity:!0},resetFont:!1}),G$e=y.forwardRef((e,t)=>{const r=y.useRef(null);y.useImperativeHandle(t,()=>r.current);const{rootClassName:n,size:i,disabled:o,prefixCls:s,addonBefore:a,addonAfter:l,prefix:c,suffix:u,bordered:d,readOnly:h,status:p,controls:f=!0,variant:g,className:m,style:v,classNames:b,styles:S,mode:x,...T}=e,{direction:R,className:E,style:M,styles:D,classNames:A}=Ur("inputNumber"),I=y.useContext(Rs),_=o??I,F=y.useMemo(()=>!f||_||h?!1:f,[f,_,h]),{compactSize:O,compactItemClassnames:k}=Gp(s,R);let B=x==="spinner"?y.createElement(Fce,null):y.createElement(E$e,null),H=x==="spinner"?y.createElement(w$e,null):y.createElement(_D,null);const N=typeof F=="boolean"?F:void 0;typeof F=="object"&&(B=F.upIcon||B,H=F.downIcon||H);const{hasFeedback:z,isFormItemInput:U,feedbackIcon:V}=y.useContext(sa),G=Li(ne=>i??O??ne),[K,q]=Ox("inputNumber",g,d),Y=z&&y.createElement(y.Fragment,null,V),X={...e,size:G,disabled:_,controls:F},[le,re]=jr([A,b],[D,S],{props:X});return y.createElement(L$e,{ref:r,mode:x,disabled:_,className:ee(m,n,le.root,E,k,Oy(s,p,z),{[`${s}-${K}`]:q,[`${s}-lg`]:G==="large",[`${s}-sm`]:G==="small",[`${s}-rtl`]:R==="rtl",[`${s}-in-form-item`]:U,[`${s}-without-controls`]:!F}),style:{...re.root,...M,...v},upHandler:B,downHandler:H,prefixCls:s,readOnly:h,controls:N,prefix:c,suffix:Y||u,classNames:le,styles:re,...T})}),Xce=y.forwardRef((e,t)=>{const{addonBefore:r,addonAfter:n,prefixCls:i,className:o,status:s,rootClassName:a,...l}=e,{getPrefixCls:c}=Ur("inputNumber"),u=c("input-number",i),{status:d}=y.useContext(sa),h=_x(d,s),p=co(u),[f,g]=$$e(u,p),m=r||n,v=y.createElement(G$e,{ref:t,...l,prefixCls:u,status:h,className:ee(g,p,f,o),rootClassName:m?void 0:a});if(m){const b=T=>T?y.createElement(Yce,{className:ee(`${u}-addon`,g,f),variant:e.variant,disabled:e.disabled,status:h},y.createElement(Sp,{form:!0},T)):null,S=b(r),x=b(n);return y.createElement(ZH,{rootClassName:a},S,v,x)}return v}),V$e=Xce,z$e=e=>y.createElement(Eu,{theme:{components:{InputNumber:{handleVisible:!0}}}},y.createElement(Xce,{...e}));V$e._InternalPanelDoNotUseOrYouWillBeFired=z$e;function H$e(e){return!!(e.addonBefore||e.addonAfter)}function W$e(e){return!!(e.prefix||e.suffix||e.allowClear)}function hq(e,t,r){const 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=(...o)=>{t.setSelectionRange(...o)},i}function hM(e,t,r,n){if(!r)return;let i=t;if(t.type==="click"){i=hq(t,e,""),r(i);return}if(e.type!=="file"&&n!==void 0){i=hq(t,e,n),r(i);return}r(i)}function T$(){return T$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var z,U,V;const{inputElement:r,children:n,prefixCls:i,prefix:o,suffix:s,addonBefore:a,addonAfter:l,className:c,style:u,disabled:d,readOnly:h,focused:p,triggerFocus:f,allowClear:g,value:m,handleReset:v,hidden:b,classes:S,classNames:x,dataAttrs:T,styles:R,components:E,onClear:M}=e,D=n??r,A=(E==null?void 0:E.affixWrapper)||"span",I=(E==null?void 0:E.groupWrapper)||"span",_=(E==null?void 0:E.wrapper)||"span",F=(E==null?void 0:E.groupAddon)||"span",O=y.useRef(null),k=G=>{var K;(K=O.current)!=null&&K.contains(G.target)&&(f==null||f())},B=W$e(e);let H=y.cloneElement(D,{value:m,className:ee((z=D.props)==null?void 0:z.className,!B&&(x==null?void 0:x.variant))||null});const N=y.useRef(null);if(Q.useImperativeHandle(t,()=>({nativeElement:N.current||O.current})),B){let G=null;if(g){const X=!d&&!h&&m,le=`${i}-clear-icon`,re=typeof g=="object"&&(g!=null&&g.clearIcon)?g.clearIcon:"✖";G=Q.createElement("button",{type:"button",tabIndex:-1,onClick:ne=>{v==null||v(ne),M==null||M()},onMouseDown:ne=>ne.preventDefault(),className:ee(le,{[`${le}-hidden`]:!X,[`${le}-has-suffix`]:!!s})},re)}const K=`${i}-affix-wrapper`,q=ee(K,{[`${i}-disabled`]:d,[`${K}-disabled`]:d,[`${K}-focused`]:p,[`${K}-readonly`]:h,[`${K}-input-with-clear-btn`]:s&&g&&m},S==null?void 0:S.affixWrapper,x==null?void 0:x.affixWrapper,x==null?void 0:x.variant),Y=(s||g)&&Q.createElement("span",{className:ee(`${i}-suffix`,x==null?void 0:x.suffix),style:R==null?void 0:R.suffix},G,s);H=Q.createElement(A,T$({className:q,style:R==null?void 0:R.affixWrapper,onClick:k},T==null?void 0:T.affixWrapper,{ref:O}),o&&Q.createElement("span",{className:ee(`${i}-prefix`,x==null?void 0:x.prefix),style:R==null?void 0:R.prefix},o),H,Y)}if(H$e(e)){const G=`${i}-group`,K=`${G}-addon`,q=`${G}-wrapper`,Y=ee(`${i}-wrapper`,G,S==null?void 0:S.wrapper,x==null?void 0:x.wrapper),X=ee(q,{[`${q}-disabled`]:d},S==null?void 0:S.group,x==null?void 0:x.groupWrapper);H=Q.createElement(I,{className:X,ref:N},Q.createElement(_,{className:Y},a&&Q.createElement(F,{className:K},a),H,l&&Q.createElement(F,{className:K},l)))}return Q.cloneElement(H,{className:ee((U=H.props)==null?void 0:U.className,c)||null,style:{...(V=H.props)==null?void 0:V.style,...u},hidden:b})});function Jce(e,t){return y.useMemo(()=>{let r={};t&&(r.show=typeof t=="object"&&t.formatter?t.formatter:!!t),r={...r,...e};const{show:n,...i}=r;return{...i,show:!!n,showFormatter:typeof n=="function"?n:void 0,strategy:i.strategy||(o=>o.length)}},[e,t])}function pM(){return pM=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{autoComplete:r,onChange:n,onFocus:i,onBlur:o,onPressEnter:s,onKeyDown:a,onKeyUp:l,prefixCls:c="rc-input",disabled:u,htmlSize:d,className:h,maxLength:p,suffix:f,showCount:g,count:m,type:v="text",classes:b,classNames:S,styles:x,onCompositionStart:T,onCompositionEnd:R,...E}=e,[M,D]=y.useState(!1),A=y.useRef(!1),I=y.useRef(!1),_=y.useRef(null),F=y.useRef(null),O=Z=>{_.current&&a3(_.current,Z)},[k,B]=Fn(e.defaultValue,e.value),H=k==null?"":String(k),[N,z]=y.useState(null),U=Jce(m,g),V=U.max||p,G=U.strategy(H),K=!!V&&G>V;y.useImperativeHandle(t,()=>{var Z;return{focus:O,blur:()=>{var ue;(ue=_.current)==null||ue.blur()},setSelectionRange:(ue,ve,he)=>{var me;(me=_.current)==null||me.setSelectionRange(ue,ve,he)},select:()=>{var ue;(ue=_.current)==null||ue.select()},input:_.current,nativeElement:((Z=F.current)==null?void 0:Z.nativeElement)||_.current}}),y.useEffect(()=>{I.current&&(I.current=!1),D(Z=>Z&&u?!1:Z)},[u]);const q=(Z,ue,ve)=>{var me,Oe;let he=ue;if(!A.current&&U.exceedFormatter&&U.max&&U.strategy(ue)>U.max)he=U.exceedFormatter(ue,{max:U.max}),ue!==he&&z([((me=_.current)==null?void 0:me.selectionStart)||0,((Oe=_.current)==null?void 0:Oe.selectionEnd)||0]);else if(ve.source==="compositionEnd")return;B(he),_.current&&hM(_.current,Z,n,he)};y.useEffect(()=>{var Z;N&&((Z=_.current)==null||Z.setSelectionRange(...N))},[N]);const Y=Z=>{q(Z,Z.target.value,{source:"change"})},X=Z=>{A.current=!1,q(Z,Z.currentTarget.value,{source:"compositionEnd"}),R==null||R(Z)},le=Z=>{s&&Z.key==="Enter"&&!I.current&&!Z.nativeEvent.isComposing&&(I.current=!0,s(Z)),a==null||a(Z)},re=Z=>{Z.key==="Enter"&&(I.current=!1),l==null||l(Z)},ne=Z=>{D(!0),i==null||i(Z)},se=Z=>{I.current&&(I.current=!1),D(!1),o==null||o(Z)},de=Z=>{B(""),O(),_.current&&hM(_.current,Z,n)},te=K&&`${c}-out-of-range`,ie=()=>{const Z=En(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return Q.createElement("input",pM({autoComplete:r},Z,{onChange:Y,onFocus:ne,onBlur:se,onKeyDown:le,onKeyUp:re,className:ee(c,{[`${c}-disabled`]:u},S==null?void 0:S.input),style:x==null?void 0:x.input,ref:_,size:d,type:v,onCompositionStart:ue=>{A.current=!0,T==null||T(ue)},onCompositionEnd:X}))},pe=()=>{const Z=Number(V)>0;if(f||U.show){const ue=U.showFormatter?U.showFormatter({value:H,count:G,maxLength:V}):`${G}${Z?` / ${V}`:""}`;return Q.createElement(Q.Fragment,null,U.show&&Q.createElement("span",{className:ee(`${c}-show-count-suffix`,{[`${c}-show-count-has-suffix`]:!!f},S==null?void 0:S.count),style:{...x==null?void 0:x.count}},ue),f)}return null};return Q.createElement(Zce,pM({},E,{prefixCls:c,className:ee(h,te),handleReset:de,value:H,focused:M,triggerFocus:O,suffix:pe(),disabled:u,classes:b,classNames:S,styles:x,ref:F}),ie())}),Qce=e=>{let t;return typeof e=="object"&&(e!=null&&e.clearIcon)?t=e:e&&(t={clearIcon:Q.createElement(ED,null)}),t};function eue(e,t){const r=y.useRef([]),n=()=>{r.current.push(setTimeout(()=>{var i,o,s,a;(i=e.current)!=null&&i.input&&((o=e.current)==null?void 0:o.input.getAttribute("type"))==="password"&&((s=e.current)!=null&&s.input.hasAttribute("value"))&&((a=e.current)==null||a.input.removeAttribute("value"))}))};return y.useEffect(()=>(t&&n(),()=>r.current.forEach(i=>{i&&clearTimeout(i)})),[]),n}function j$e(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}const Vx=y.forwardRef((e,t)=>{const{prefixCls:r,bordered:n=!0,status:i,size:o,disabled:s,onBlur:a,onFocus:l,suffix:c,allowClear:u,addonAfter:d,addonBefore:h,className:p,style:f,styles:g,rootClassName:m,onChange:v,classNames:b,variant:S,...x}=e,{getPrefixCls:T,direction:R,allowClear:E,autoComplete:M,className:D,style:A,classNames:I,styles:_}=Ur("input"),F=T("input",r),O=y.useRef(null),k=co(F),[B,H]=Dce(F,m);Ace(F,k);const{compactSize:N,compactItemClassnames:z}=Gp(F,R),U=Li(me=>o??N??me),V=Q.useContext(Rs),G=s??V,K={...e,size:U,disabled:G},[q,Y]=jr([I,b],[_,g],{props:K}),{status:X,hasFeedback:le,feedbackIcon:re}=y.useContext(sa),ne=_x(X,i),se=j$e(e)||!!le;y.useRef(se);const de=eue(O,!0),te=me=>{de(),a==null||a(me)},ie=me=>{de(),l==null||l(me)},pe=me=>{de(),v==null||v(me)},Z=(le||c)&&Q.createElement(Q.Fragment,null,c,le&&re),ue=Qce(u??E),[ve,he]=Ox("input",S,n);return Q.createElement(U$e,{ref:zo(t,O),prefixCls:F,autoComplete:M,...x,disabled:G,onBlur:te,onFocus:ie,style:{...Y.root,...A,...f},styles:Y,suffix:Z,allowClear:ue,className:ee(p,m,H,k,z,D,q.root),onChange:pe,addonBefore:h&&Q.createElement(Sp,{form:!0,space:!0},h),addonAfter:d&&Q.createElement(Sp,{form:!0,space:!0},d),classNames:{...q,input:ee({[`${F}-sm`]:U==="small",[`${F}-lg`]:U==="large",[`${F}-rtl`]:R==="rtl"},q.input,B),variant:ee({[`${F}-${ve}`]:he},Oy(F,ne)),affixWrapper:ee({[`${F}-affix-wrapper-sm`]:U==="small",[`${F}-affix-wrapper-lg`]:U==="large",[`${F}-affix-wrapper-rtl`]:R==="rtl"},B),wrapper:ee({[`${F}-group-rtl`]:R==="rtl"},B),groupWrapper:ee({[`${F}-group-wrapper-sm`]:U==="small",[`${F}-group-wrapper-lg`]:U==="large",[`${F}-group-wrapper-rtl`]:R==="rtl",[`${F}-group-wrapper-${ve}`]:he},Oy(`${F}-group-wrapper`,ne,le),B)}})}),K$e={xxxl:4,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},$3=Q.createContext(null),q$e=e=>Di(e).map(t=>({...t==null?void 0:t.props,key:t.key}));function Y$e(e,t,r){const n=y.useMemo(()=>t||q$e(r),[t,r]);return y.useMemo(()=>n.map(({span:o,...s})=>o==="filled"?{...s,filled:!0}:{...s,span:typeof o=="number"?o:Ble(e,o)}),[n,e])}function X$e(e,t){let r=[],n=[],i=!1,o=0;return e.filter(s=>s).forEach(s=>{const{filled:a,...l}=s;if(a){n.push(l),r.push(n),n=[],o=0;return}const c=t-o;o+=s.span||1,o>=t?(o>t?(i=!0,n.push({...l,span:c})):n.push(l),r.push(n),n=[],o=0):n.push(l)}),n.length>0&&r.push(n),r=r.map(s=>{const a=s.reduce((l,c)=>l+(c.span||1),0);if(a{const[r,n]=y.useMemo(()=>X$e(t,e),[t,e]);return r},J$e=e=>e.children,z_=e=>{const{itemPrefixCls:t,component:r,span:n,className:i,style:o,labelStyle:s,contentStyle:a,bordered:l,label:c,content:u,colon:d,type:h,styles:p,classNames:f}=e,g=r,{classNames:m,styles:v}=Q.useContext($3),[b,S]=jr([m,f],[v,p],{props:e}),x={...s,...S.label},T={...a,...S.content};return l?Q.createElement(g,{colSpan:n,style:o,className:ee(i,{[`${t}-item-${h}`]:h==="label"||h==="content",[b.label]:b.label&&h==="label",[b.content]:b.content&&h==="content"})},xn(c)&&Q.createElement("span",{style:x},c),xn(u)&&Q.createElement("span",{style:T},u)):Q.createElement(g,{className:ee(`${t}-item`,i),style:o,colSpan:n},Q.createElement("div",{className:`${t}-item-container`},xn(c)&&Q.createElement("span",{style:x,className:ee(`${t}-item-label`,b.label,{[`${t}-item-no-colon`]:!d})},c),xn(u)&&Q.createElement("span",{style:T,className:ee(`${t}-item-content`,b.content)},u)))};function H_(e,{colon:t,prefixCls:r,bordered:n},{component:i,type:o,showLabel:s,showContent:a,labelStyle:l,contentStyle:c,styles:u}){return e.map(({label:d,children:h,prefixCls:p=r,className:f,style:g,labelStyle:m,contentStyle:v,span:b=1,key:S,styles:x,classNames:T},R)=>typeof i=="string"?y.createElement(z_,{key:`${o}-${S||R}`,className:f,style:g,classNames:T,styles:{label:{...l,...u==null?void 0:u.label,...m,...x==null?void 0:x.label},content:{...c,...u==null?void 0:u.content,...v,...x==null?void 0:x.content}},span:b,colon:t,component:i,itemPrefixCls:p,bordered:n,label:s?d:null,content:a?h:null,type:o}):[y.createElement(z_,{key:`label-${S||R}`,className:f,style:{...l,...u==null?void 0:u.label,...g,...m,...x==null?void 0:x.label},span:1,colon:t,component:i[0],itemPrefixCls:p,bordered:n,label:d,type:"label"}),y.createElement(z_,{key:`content-${S||R}`,className:f,style:{...c,...u==null?void 0:u.content,...g,...v,...x==null?void 0:x.content},span:b*2-1,component:i[1],itemPrefixCls:p,bordered:n,content:h,type:"content"})])}const Q$e=e=>{const t=y.useContext($3),{prefixCls:r,vertical:n,row:i,index:o,bordered:s}=e;return n?y.createElement(y.Fragment,null,y.createElement("tr",{key:`label-${o}`,className:`${r}-row`},H_(i,e,{component:"th",type:"label",showLabel:!0,...t})),y.createElement("tr",{key:`content-${o}`,className:`${r}-row`},H_(i,e,{component:"td",type:"content",showContent:!0,...t}))):y.createElement("tr",{key:o,className:`${r}-row`},H_(i,e,{component:s?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0,...t}))},eGe=e=>{const{componentCls:t,labelBg:r}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${ae(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto"},[`${t}-row`]:{borderBottom:`${ae(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:first-child":{"> th:first-child, > td:first-child":{borderStartStartRadius:e.borderRadiusLG}},"&:last-child":{borderBottom:"none","> th:first-child, > td:first-child":{borderEndStartRadius:e.borderRadiusLG}},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${ae(e.padding)} ${ae(e.paddingLG)}`,borderInlineEnd:`${ae(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:r,"&::after":{display:"none"}}}},[`&${t}-medium`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${ae(e.paddingSM)} ${ae(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${ae(e.paddingXS)} ${ae(e.padding)}`}}}}}},tGe=e=>{const{componentCls:t,extraColor:r,itemPaddingBottom:n,itemPaddingEnd:i,colonMarginRight:o,colonMarginLeft:s,titleMarginBottom:a}=e;return{[t]:{...cn(e),...eGe(e),"&-rtl":{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:a},[`${t}-title`]:{...La,flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG},[`${t}-extra`]:{marginInlineStart:"auto",color:r,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed",borderCollapse:"collapse"}},[`${t}-row`]:{"> th, > td":{paddingBottom:n,paddingInlineEnd:i},"> th:last-child, > td:last-child":{paddingInlineEnd:0},"&:last-child":{borderBottom:"none","> th, > td":{paddingBottom:0}}},[`${t}-item-label`]:{color:e.labelColor,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${ae(s)} ${ae(o)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline",minWidth:"1em"}}},"&-medium":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}}}},rGe=e=>({labelBg:e.colorFillAlter,labelColor:e.colorTextTertiary,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,itemPaddingEnd:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText}),nGe=Yr("Descriptions",e=>{const t=Wr(e,{});return tGe(t)},rGe),iGe=e=>{const{prefixCls:t,title:r,extra:n,column:i,colon:o=!0,bordered:s,layout:a,children:l,className:c,rootClassName:u,style:d,size:h,labelStyle:p,contentStyle:f,styles:g,items:m,classNames:v,...b}=e,{getPrefixCls:S,direction:x,className:T,style:R,classNames:E,styles:M}=Ur("descriptions"),D=S("descriptions",t),A=kx(),I=y.useMemo(()=>typeof i=="number"?i:Ble(A,{...K$e,...i})??3,[A,i]),_=Y$e(A,m,l),F=Li(h),O=Z$e(I,_),[k,B]=nGe(D),H={...e,column:I,items:_,size:F},[N,z]=jr([E,v],[M,g],{props:H}),U=y.useMemo(()=>({labelStyle:p,contentStyle:f,styles:{label:z.label,content:z.content},classNames:{label:N.label,content:N.content}}),[p,f,z.label,z.content,N.label,N.content]);return y.createElement($3.Provider,{value:U},y.createElement("div",{className:ee(D,T,N.root,{[`${D}-medium`]:F==="medium"||F==="middle",[`${D}-small`]:F==="small",[`${D}-bordered`]:!!s,[`${D}-rtl`]:x==="rtl"},c,u,k,B),style:{...R,...z.root,...d},...b},(r||n)&&y.createElement("div",{className:ee(`${D}-header`,N.header),style:z.header},r&&y.createElement("div",{className:ee(`${D}-title`,N.title),style:z.title},r),n&&y.createElement("div",{className:ee(`${D}-extra`,N.extra),style:z.extra},n)),y.createElement("div",{className:`${D}-view`},y.createElement("table",null,y.createElement("tbody",null,O.map((V,G)=>y.createElement(Q$e,{key:G,index:G,colon:o,prefixCls:D,vertical:a==="vertical",bordered:s,row:V})))))))};iGe.Item=J$e;const pq=y.createContext(null),tue=y.createContext({});function E$(){return E$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:t,className:r,containerRef:n,...i}=e,{panel:o}=y.useContext(tue),s=xu(o,n);return y.createElement("div",E$({className:ee(`${t}-section`,r),role:"dialog",ref:s},hi(e,{aria:!0}),{"aria-modal":"true"},i))};function sGe(e){const{prefixCls:t,direction:r,className:n,style:i,maxSize:o,containerRef:s,currentSize:a,onResize:l,onResizeEnd:c,onResizeStart:u}=e,[d,h]=y.useState(!1),[p,f]=y.useState(0),[g,m]=y.useState(0),v=r==="left"||r==="right",b=br(R=>{R.preventDefault(),R.stopPropagation(),h(!0),f(v?R.clientX:R.clientY);let E;if(typeof a=="number")E=a;else if(s!=null&&s.current){const M=s.current.getBoundingClientRect();E=v?M.width:M.height}m(E),u==null||u(E)}),S=br(R=>{if(!d)return;let M=(v?R.clientX:R.clientY)-p;(r==="right"||r==="bottom")&&(M=-M);let D=g+M;D<0&&(D=0),o&&D>o&&(D=o),l==null||l(D)}),x=y.useCallback(()=>{if(d&&(h(!1),s!=null&&s.current)){const R=s.current.getBoundingClientRect(),E=v?R.width:R.height;c==null||c(E)}},[d,s,c,v]);return y.useEffect(()=>{if(d)return document.addEventListener("mousemove",S),document.addEventListener("mouseup",x),()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",x)}},[d,S,x]),{dragElementProps:{className:ee(`${t}-dragger`,`${t}-dragger-${r}`,{[`${t}-dragger-dragging`]:d,[`${t}-dragger-horizontal`]:v,[`${t}-dragger-vertical`]:!v},n),style:i,onMouseDown:b},isDragging:d}}function W_(e){if(typeof e=="string"){const t=Number(e.replace(/px$/i,""));if(parseFloat(e)===t&&Hn(!1,"Invalid value type of `width` or `height` which should be number type instead."),!Number.isNaN(t))return t}return e}function aGe(e,t,r,n,i){const o=n??i!==!1,[s]=Uae(t&&o,e);return Q.useEffect(()=>{var a;t&&r===!0&&((a=e())==null||a.focus({preventScroll:!0}))},[t]),s}function ey(){return ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:r,open:n,placement:i,inline:o,push:s,forceRender:a,autoFocus:l,focusTrap:c,classNames:u,rootClassName:d,rootStyle:h,zIndex:p,className:f,id:g,style:m,motion:v,width:b,height:S,size:x,maxSize:T,children:R,mask:E,maskClosable:M,maskMotion:D,maskClassName:A,maskStyle:I,afterOpenChange:_,onClose:F,onMouseEnter:O,onMouseOver:k,onMouseLeave:B,onClick:H,onKeyDown:N,onKeyUp:z,styles:U,drawerRender:V,resizable:G,defaultSize:K}=e,q=y.useRef(null);y.useImperativeHandle(t,()=>q.current);const Y=aGe(()=>q.current,n,l,c,E),[X,le]=y.useState(!1),re=y.useContext(pq);let ne;typeof s=="boolean"?ne=s?{}:{distance:0}:ne=s||{};const se=(ne==null?void 0:ne.distance)??(re==null?void 0:re.pushDistance)??180,de=y.useMemo(()=>({pushDistance:se,push:()=>{le(!0)},pull:()=>{le(!1)}}),[se]);y.useEffect(()=>{var Ye,Fe;n?(Ye=re==null?void 0:re.push)==null||Ye.call(re):(Fe=re==null?void 0:re.pull)==null||Fe.call(re)},[n]),y.useEffect(()=>()=>{var Ye;(Ye=re==null?void 0:re.pull)==null||Ye.call(re)},[]);const te=y.createElement(uu,ey({key:"mask"},D,{visible:E&&n}),({className:Ye,style:Fe},et)=>y.createElement("div",{className:ee(`${r}-mask`,Ye,u==null?void 0:u.mask,A),style:{...Fe,...I,...U==null?void 0:U.mask},onClick:M&&n?F:void 0,ref:et})),ie=typeof v=="function"?v(i):v,[pe,Z]=y.useState(),ue=i==="left"||i==="right",ve=y.useMemo(()=>W_(x??(ue?b:S)??pe??K??(ue?378:void 0)),[x,b,S,K,ue,pe]),he=y.useMemo(()=>{const Ye={};if(X&&se)switch(i){case"top":Ye.transform=`translateY(${se}px)`;break;case"bottom":Ye.transform=`translateY(${-se}px)`;break;case"left":Ye.transform=`translateX(${se}px)`;break;default:Ye.transform=`translateX(${-se}px)`;break}return ue?Ye.width=W_(ve):Ye.height=W_(ve),Ye},[X,se,i,ue,ve]),me=y.useRef(null),Oe=!!G,Pe=typeof G=="object"&&G||{},Me=br(Ye=>{var Fe;Z(Ye),(Fe=Pe.onResize)==null||Fe.call(Pe,Ye)}),{dragElementProps:He,isDragging:Ge}=sGe({prefixCls:`${r}-resizable`,direction:i,className:u==null?void 0:u.dragger,style:U==null?void 0:U.dragger,maxSize:T,containerRef:me,currentSize:ve,onResize:Me,onResizeStart:Pe.onResizeStart,onResizeEnd:Pe.onResizeEnd}),Ct={onMouseEnter:O,onMouseOver:k,onMouseLeave:B,onClick:H,onKeyDown:N,onKeyUp:z,onFocus:Ye=>{Y(Ye.target)}},Ht=y.createElement(uu,ey({key:"panel"},ie,{visible:n,forceRender:a,onVisibleChanged:_,removeOnLeave:!1,leavedClassName:`${r}-content-wrapper-hidden`}),({className:Ye,style:Fe},et)=>{const Ne=y.createElement(oGe,ey({id:g,containerRef:et,prefixCls:r,className:ee(f,u==null?void 0:u.section),style:{...m,...U==null?void 0:U.section}},hi(e,{aria:!0}),Ct),R);return y.createElement("div",ey({ref:me,className:ee(`${r}-content-wrapper`,Ge&&`${r}-content-wrapper-dragging`,u==null?void 0:u.wrapper,!Ge&&Ye),style:{...Fe,...he,...U==null?void 0:U.wrapper}},hi(e,{data:!0})),Oe&&y.createElement("div",He),V?V(Ne):Ne)}),St={...h};return p&&(St.zIndex=p),y.createElement(pq.Provider,{value:de},y.createElement("div",{className:ee(r,`${r}-${i}`,d,{[`${r}-open`]:n,[`${r}-inline`]:o}),style:St,tabIndex:-1,ref:q},te,Ht))},cGe=y.forwardRef(lGe),uGe=e=>{const{open:t=!1,prefixCls:r="rc-drawer",placement:n="right",autoFocus:i=!0,keyboard:o=!0,width:s,height:a,size:l,maxSize:c,mask:u=!0,maskClosable:d=!0,getContainer:h,forceRender:p,afterOpenChange:f,destroyOnHidden:g,onMouseEnter:m,onMouseOver:v,onMouseLeave:b,onClick:S,onKeyDown:x,onKeyUp:T,onClose:R,resizable:E,defaultSize:M,focusTriggerAfterClose:D,panelRef:A}=e,[I,_]=y.useState(!1),[F,O]=y.useState(!1);zr(()=>{O(!0)},[]);const k=F?t:!1,B=y.useRef(null),H=y.useRef(null);zr(()=>{k&&(H.current=document.activeElement)},[k]);const N=K=>{var q,Y;_(K),f==null||f(K),!K&&D!==!1&&H.current&&!((q=B.current)!=null&&q.contains(H.current))&&((Y=H.current)==null||Y.focus({preventScroll:!0}))},z=y.useMemo(()=>({panel:A}),[A]);if(!p&&!I&&!k&&g)return null;const V={...e,open:k,prefixCls:r,placement:n,autoFocus:i,keyboard:o,width:s,height:a,size:l,maxSize:c,defaultSize:M,mask:u,maskClosable:d,inline:h===!1,afterOpenChange:N,ref:B,resizable:E,...{onMouseEnter:m,onMouseOver:v,onMouseLeave:b,onClick:S,onKeyDown:x,onKeyUp:T}},G=({top:K,event:q})=>{K&&o&&(q.stopPropagation(),R==null||R(q))};return y.createElement(tue.Provider,{value:z},y.createElement(Sx,{open:k||p||I,autoDestroy:!1,getContainer:h,autoLock:u&&(k||I),onEsc:G},y.createElement(cGe,V)))},rue=e=>{const{prefixCls:t,ariaId:r,title:n,footer:i,extra:o,closable:s,loading:a,onClose:l,headerStyle:c,bodyStyle:u,footerStyle:d,children:h,classNames:p,styles:f}=e,g=Ur("drawer"),{classNames:m,styles:v,closable:b}=g,[S,x]=jr([m,p],[v,f],{props:{...e,closable:s??b}}),T=y.useMemo(()=>{const I=s??b;if(I!==!1)return typeof I=="object"&&(I==null?void 0:I.placement)==="end"?"end":"start"},[s,b]),R=y.useCallback(I=>y.createElement("button",{type:"button",onClick:l,className:ee(`${t}-close`,{[`${t}-close-${T}`]:T==="end"},S.close),style:x.close},I),[l,t,T,S.close,x.close]),[E,M]=YH(Fy(e),Fy(g),{closable:!0,closeIconRender:R}),D=()=>!n&&!E?null:y.createElement("div",{style:{...x.header,...c},className:ee(`${t}-header`,S.header,{[`${t}-header-close-only`]:E&&!n&&!o})},y.createElement("div",{className:`${t}-header-title`},T==="start"&&M,n&&y.createElement("div",{className:ee(`${t}-title`,S.title),style:x.title,id:r},n)),o&&y.createElement("div",{className:ee(`${t}-extra`,S.extra),style:x.extra},o),T==="end"&&M),A=()=>i?y.createElement("div",{className:ee(`${t}-footer`,S.footer),style:{...x.footer,...d}},i):null;return y.createElement(y.Fragment,null,D(),y.createElement("div",{className:ee(`${t}-body`,S.body),style:{...x.body,...u}},a?y.createElement(Vp,{active:!0,title:!1,paragraph:{rows:5},className:`${t}-body-skeleton`}):h),A())},dGe=e=>{const t="100%";return{left:`translateX(-${t})`,right:`translateX(${t})`,top:`translateY(-${t})`,bottom:`translateY(${t})`}[e]},nue=(e,t)=>({"&-enter, &-appear":{...e,"&-active":t},"&-leave":{...t,"&-active":e}}),iue=(e,t)=>({"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${t}`}},...nue({opacity:e},{opacity:1})}),hGe=(e,t)=>[iue(.7,t),nue({transform:dGe(e)},{transform:"none"})],pGe=e=>{const{componentCls:t,motionDurationSlow:r}=e;return{[t]:{[`${t}-mask-motion`]:iue(0,r),[`${t}-panel-motion`]:["left","right","top","bottom"].reduce((n,i)=>({...n,[`&-${i}`]:hGe(i,r)}),{})}}},fGe=e=>{const{borderRadiusSM:t,componentCls:r,zIndexPopup:n,colorBgMask:i,colorBgElevated:o,motionDurationSlow:s,motionDurationMid:a,paddingXS:l,padding:c,paddingLG:u,fontSizeLG:d,lineHeightLG:h,lineWidth:p,lineType:f,colorSplit:g,marginXS:m,colorIcon:v,colorIconHover:b,colorBgTextHover:S,colorBgTextActive:x,colorText:T,fontWeightStrong:R,footerPaddingBlock:E,footerPaddingInline:M,draggerSize:D,calc:A}=e,I=`${r}-content-wrapper`,_=`${r}-resizable-dragger`;return{[r]:{position:"fixed",inset:0,zIndex:n,pointerEvents:"none",color:T,"&-pure":{position:"relative",background:o,display:"flex",flexDirection:"column",pointerEvents:"auto",[`&${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",[`&${r}-mask-blur`]:{backdropFilter:"blur(4px)"}},[I]:{position:"absolute",zIndex:n,maxWidth:"100vw",transition:`all ${s}`,"&-hidden":{display:"none"}},[`&-left > ${I}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowDrawerLeft},[`&-right > ${I}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:e.boxShadowDrawerRight},[`&-top > ${I}`]:{top:0,insetInline:0,boxShadow:e.boxShadowDrawerUp},[`&-bottom > ${I}`]:{bottom:0,insetInline:0,boxShadow:e.boxShadowDrawerDown},[`${r}-section`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"auto",background:o,pointerEvents:"auto"},[`${r}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${ae(c)} ${ae(u)}`,fontSize:d,lineHeight:h,borderBottom:`${ae(p)} ${f} ${g}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${r}-extra`]:{flex:"none"},[`${r}-close`]:{display:"inline-flex",width:A(d).add(l).equal(),height:A(d).add(l).equal(),borderRadius:t,justifyContent:"center",alignItems:"center",color:v,fontWeight:R,fontSize:d,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,cursor:"pointer",transition:`all ${a}`,textRendering:"auto",[`&${r}-close-end`]:{marginInlineStart:m},[`&:not(${r}-close-end)`]:{marginInlineEnd:m},"&:hover":{color:b,backgroundColor:S,textDecoration:"none"},"&:active":{backgroundColor:x},...yl(e)},[`${r}-title`]:{flex:1,margin:0,fontWeight:e.fontWeightStrong,fontSize:d,lineHeight:h},[`${r}-body`]:{flex:1,minWidth:0,minHeight:0,padding:u,overflow:"auto",[`${r}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center"}},[`${r}-footer`]:{flexShrink:0,padding:`${ae(E)} ${ae(M)}`,borderTop:`${ae(p)} ${f} ${g}`},[_]:{position:"absolute",zIndex:1,backgroundColor:"transparent",userSelect:"none",pointerEvents:"auto","&:hover":{backgroundColor:e.colorPrimary,opacity:.2},"&-dragging":{backgroundColor:e.colorPrimary,opacity:.3}},[`${_}-left`]:{top:0,bottom:0,right:{_skip_check_:!0,value:0},width:D,cursor:"col-resize"},[`${_}-right`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},width:D,cursor:"col-resize"},[`${_}-top`]:{insetInline:0,bottom:0,height:D,cursor:"row-resize"},[`${_}-bottom`]:{insetInline:0,top:0,height:D,cursor:"row-resize"},[`${I}-dragging`]:{userSelect:"none",transition:"none",willChange:"width, height",[`${r}-content`]:{pointerEvents:"none"},[`${r}-section`]:{pointerEvents:"none"}},"&-rtl":{direction:"rtl"}}}},gGe=e=>({zIndexPopup:e.zIndexPopupBase,footerPaddingBlock:e.paddingXS,footerPaddingInline:e.padding,draggerSize:4}),oue=Yr("Drawer",e=>{const t=Wr(e,{});return[fGe(t),pGe(t)]},gGe),mGe={distance:180},fq=378,gq={motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},vGe=e=>{const{rootClassName:t,size:r,defaultSize:n=fq,height:i,width:o,mask:s,push:a=mGe,open:l,afterOpenChange:c,onClose:u,prefixCls:d,getContainer:h,panelRef:p=null,style:f,className:g,resizable:m,"aria-labelledby":v,focusable:b,maskClosable:S,maskStyle:x,drawerStyle:T,contentWrapperStyle:R,destroyOnClose:E,destroyOnHidden:M,...D}=e,{placement:A}=D,I=Tu(),_=D.title?I:void 0,{getPopupContainer:F,getPrefixCls:O,direction:k,className:B,style:H,classNames:N,styles:z,mask:U}=Ur("drawer"),V=O("drawer",d),[G,K]=oue(V),q=h===void 0&&F?()=>F(document.body):h,Y=y.useMemo(()=>typeof r=="number"?r:r==="large"?736:r==="default"?fq:typeof r=="string"?/^\d+(\.\d+)?$/.test(r)?Number(r):r:!A||A==="left"||A==="right"?o:i,[r,A,o,i]),X={motionName:du(V,"mask-motion"),...gq},le=He=>({motionName:du(V,`panel-motion-${He}`),...gq}),re=tle(),ne=zo(p,re),[se,de]=$p("Drawer",D.zIndex),[te,ie,pe]=tae(s,U,V,S),Z=Jae(b,q!==!1&&te),{classNames:ue,styles:ve,rootStyle:he}=D,me={...e,zIndex:se,panelRef:p,mask:te,maskClosable:pe,defaultSize:n,push:a,focusable:Z},[Oe,Pe]=jr([N,ue],[z,ve],{props:me}),Me=ee({"no-mask":!te,[`${V}-rtl`]:k==="rtl"},t,G,K,Oe.root);return y.createElement(Sp,{form:!0,space:!0},y.createElement(bx.Provider,{value:de},y.createElement(uGe,{prefixCls:V,onClose:u,maskMotion:X,motion:le,...D,classNames:{mask:ee(Oe.mask,ie.mask),section:Oe.section,wrapper:Oe.wrapper,dragger:Oe.dragger},styles:{mask:{...Pe.mask,...x},section:{...Pe.section,...T},wrapper:{...Pe.wrapper,...R},dragger:Pe.dragger},open:l,mask:te,maskClosable:pe,push:a,size:Y,defaultSize:n,style:{...H,...f},rootStyle:{...he,...Pe.root},className:ee(B,g),rootClassName:Me,getContainer:q,afterOpenChange:c,panelRef:ne,zIndex:se,...m?{resizable:m}:{},"aria-labelledby":v??_,destroyOnHidden:M??E,focusTriggerAfterClose:Z.focusTriggerAfterClose,focusTrap:Z.trap},y.createElement(rue,{prefixCls:V,size:r,...D,ariaId:_,onClose:u}))))},yGe=e=>{const{prefixCls:t,style:r,className:n,placement:i="right",...o}=e,{getPrefixCls:s}=y.useContext(or),a=s("drawer",t),[l,c]=oue(a),u=ee(a,`${a}-pure`,`${a}-${i}`,l,c,n);return y.createElement("div",{className:u,style:r},y.createElement(rue,{prefixCls:a,...o}))};vGe._InternalPanelDoNotUseOrYouWillBeFired=yGe;function fM(e){return["small","middle","medium","large"].includes(e)}function mq(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const sue=Q.createContext({latestIndex:0}),CGe=sue.Provider,bGe=e=>{const{className:t,prefix:r,index:n,children:i,separator:o,style:s,classNames:a,styles:l}=e,{latestIndex:c}=y.useContext(sue);return xn(i)?y.createElement(y.Fragment,null,y.createElement("div",{className:t,style:s},i),n{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"}}}},wGe=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-medium, &-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-medium, &-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},xGe=Yr("Space",e=>{const t=Wr(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[SGe(t),wGe(t)]},()=>({}),{resetStyle:!1}),TGe=y.forwardRef((e,t)=>{const{getPrefixCls:r,direction:n,size:i,className:o,style:s,classNames:a,styles:l}=Ur("space"),{size:c=i??"small",align:u,className:d,rootClassName:h,children:p,direction:f,orientation:g,prefixCls:m,split:v,separator:b,style:S,vertical:x,wrap:T=!1,classNames:R,styles:E,...M}=e,[D,A]=Array.isArray(c)?c:[c,c],I=fM(A),_=fM(D),F=mq(A),O=mq(D),k=Di(p,{keepEmpty:!0}),[B,H]=Cx(g,x,f),N=u===void 0&&!H?"center":u,z=b??v,U=r("space",m),[V,G]=xGe(U),K={...e,size:c,orientation:B,align:N},[q,Y]=jr([a,R],[l,E],{props:K}),X=ee(U,o,V,`${U}-${B}`,{[`${U}-rtl`]:n==="rtl",[`${U}-align-${N}`]:N,[`${U}-gap-row-${A}`]:I,[`${U}-gap-col-${D}`]:_},d,h,G,q.root),le=ee(`${U}-item`,q.item),re=k.map((de,te)=>{const ie=(de==null?void 0:de.key)||`${le}-${te}`;return y.createElement(bGe,{prefix:U,classNames:q,styles:Y,className:le,key:ie,index:te,separator:z,style:Y.item},de)}),ne=y.useMemo(()=>({latestIndex:k.reduce((te,ie,pe)=>xn(ie)?pe:te,0)}),[k]);if(k.length===0)return null;const se={};return T&&(se.flexWrap="wrap"),!_&&O&&(se.columnGap=D),!I&&F&&(se.rowGap=A),y.createElement("div",{ref:t,className:X,style:{...se,...Y.root,...s,...S},...M},y.createElement(CGe,{value:ne},re))}),zx=TGe;zx.Compact=ZH;zx.Addon=Yce;const aue=e=>{const{getPopupContainer:t,getPrefixCls:r,direction:n}=y.useContext(or),{prefixCls:i,type:o="default",danger:s,disabled:a,loading:l,onClick:c,htmlType:u,children:d,className:h,menu:p,arrow:f,autoFocus:g,trigger:m,align:v,open:b,onOpenChange:S,placement:x,getPopupContainer:T,href:R,icon:E=y.createElement(D3,null),title:M,buttonsRender:D=se=>se,mouseEnterDelay:A,mouseLeaveDelay:I,overlayClassName:_,overlayStyle:F,destroyOnHidden:O,destroyPopupOnHide:k,dropdownRender:B,popupRender:H,...N}=e,z=r("dropdown",i),U=`${z}-button`,G={menu:p,arrow:f,autoFocus:g,align:v,disabled:a,trigger:a?[]:m,onOpenChange:S,getPopupContainer:T||t,mouseEnterDelay:A,mouseLeaveDelay:I,classNames:{root:_},styles:{root:F},destroyOnHidden:O,popupRender:H||B},{compactSize:K,compactItemClassnames:q}=Gp(z,n),Y=ee(U,q,h);"destroyPopupOnHide"in e&&(G.destroyPopupOnHide=k),"open"in e&&(G.open=b),"placement"in e?G.placement=x:G.placement=n==="rtl"?"bottomLeft":"bottomRight";const X=y.createElement(Cl,{type:o,danger:s,disabled:a,loading:l,onClick:c,htmlType:u,href:R,title:M},d),le=y.createElement(Cl,{type:o,danger:s,icon:E}),[re,ne]=D([X,le]);return y.createElement(zx.Compact,{className:Y,size:K,block:!0,...N},re,y.createElement(Bx,{...G},ne))};aue.__ANT_BUTTON=!0;const G3=Bx;G3.Button=aue;const lue=["wrap","nowrap","wrap-reverse"],cue=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],uue=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],EGe=(e,t)=>{const r=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${r}`]:r&&lue.includes(r)}},RGe=(e,t)=>{const r={};return uue.forEach(n=>{r[`${e}-align-${n}`]=t.align===n}),r[`${e}-align-stretch`]=!t.align&&!!t.vertical,r},PGe=(e,t)=>{const r={};return cue.forEach(n=>{r[`${e}-justify-${n}`]=t.justify===n}),r},MGe=(e,t)=>ee({...EGe(e,t),...RGe(e,t),...PGe(e,t)}),IGe=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},DGe=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-medium, &-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},AGe=e=>{const{componentCls:t}=e,r={};return lue.forEach(n=>{r[`${t}-wrap-${n}`]={flexWrap:n}}),r},FGe=e=>{const{componentCls:t}=e,r={};return uue.forEach(n=>{r[`${t}-align-${n}`]={alignItems:n}}),r},LGe=e=>{const{componentCls:t}=e,r={};return cue.forEach(n=>{r[`${t}-justify-${n}`]={justifyContent:n}}),r},_Ge=()=>({}),OGe=Yr("Flex",e=>{const{paddingXS:t,padding:r,paddingLG:n}=e,i=Wr(e,{flexGapSM:t,flexGap:r,flexGapLG:n});return[IGe(i),DGe(i),AGe(i),FGe(i),LGe(i)]},_Ge,{resetStyle:!1}),kGe=Q.forwardRef((e,t)=>{const{prefixCls:r,rootClassName:n,className:i,style:o,flex:s,gap:a,vertical:l,orientation:c,component:u="div",children:d,...h}=e,{flex:p,direction:f,getPrefixCls:g}=Q.useContext(or),m=g("flex",r),[v,b]=OGe(m),[,S]=Cx(c,l??(p==null?void 0:p.vertical)),x=ee(i,n,p==null?void 0:p.className,m,v,b,MGe(m,{...e,vertical:S}),{[`${m}-rtl`]:f==="rtl",[`${m}-gap-${a}`]:fM(a),[`${m}-vertical`]:S}),T={...p==null?void 0:p.style,...o};return xn(s)&&(T.flex=s),xn(a)&&!fM(a)&&(T.gap=a),Q.createElement(u,{ref:t,className:x,style:T,...En(h,["justify","wrap","align"])},d)}),gM=Q.createContext(null);var NGe={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"};function R$(){return R$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,R$({},e,{ref:t,icon:NGe})),due=y.forwardRef(BGe),$Ge=(e,t)=>xn(e)?typeof e=="object"&&!y.isValidElement(e)?{...t,...e}:{...t,title:e}:null,GGe=e=>{const{componentCls:t,floatButtonSize:r,iconCls:n,antCls:i,floatButtonIconSize:o}=e,[s,a]=Jn(i,"float-btn"),l=`${t}-badge`,c=Math.SQRT2,u=(c-1)/c,d=e.calc(e.borderRadius).mul(u).equal(),h=e.calc(e.controlHeight).div(2).mul(u).equal();return{[t]:[{[s("size")]:ae(r)},{flexDirection:"column",margin:0,padding:`${ae(e.paddingXXS)} 0`,width:a("size"),minHeight:a("size"),height:"auto",wordBreak:"break-word",whiteSpace:"normal",gap:e.calc(e.paddingXXS).div(2).equal(),"&-rtl":{direction:"rtl"},[`&${t}-individual`]:{position:"fixed",zIndex:e.zIndexPopupBase,insetInlineEnd:e.floatButtonInsetInlineEnd,bottom:e.floatButtonInsetBlockEnd,boxShadow:e.boxShadowSecondary},[`&${t}-pure`]:{position:"relative",inset:"auto"},"&:empty":{display:"none"},[`${t}-icon`]:{lineHeight:1},[`&${t}-icon-only`]:{[n]:{fontSize:o}},[`${t}-content`]:{fontSize:e.fontSizeSM},[l]:{position:"absolute",top:0,insetInlineEnd:0,[`&:not(${l}-dot)`]:{transform:"translate(50%, -50%)"}},[`&-rtl ${l}:not(${l}-dot)`]:{transform:"translate(-50%, -50%)"},"&-square":{[`${l}-dot`]:{marginTop:d,marginInlineEnd:d}},"&-circle":{[l]:{marginTop:h,marginInlineEnd:h}}}]}},VGe=e=>{const{componentCls:t,antCls:r,floatButtonSize:n,padding:i}=e,o=`${t}-group`,s=`${o}-list`,[a,l]=Jn(r,"float-btn");return{[o]:[{[a("list-transform-start")]:`translate(0,${ae(n)})`,[a("list-trigger-offset")]:`calc(${ae(n)} + ${ae(i)})`},{...cn(e),position:"fixed",zIndex:e.zIndexPopupBase,insetInlineEnd:e.floatButtonInsetInlineEnd,bottom:e.floatButtonInsetBlockEnd,gap:i,"&-rtl":{direction:"rtl"},[`&${t}-pure`]:{position:"relative",inset:"auto"},[t]:{position:"relative",inset:"auto"}},{[`&:not(${o}-individual) ${s}`]:{boxShadow:e.boxShadowSecondary},[`&${o}-individual ${s}`]:{gap:i},[`&-menu-mode ${s}`]:{position:"absolute"},[s]:{borderRadius:e.borderRadiusLG,"&-motion":{transition:`all ${e.motionDurationSlow}`,"&-enter, &-appear":{opacity:0,transform:l("list-transform-start"),"&-active":{opacity:1,transform:"translate(0, 0)"}},"&-leave":{"&-active":{opacity:0,transform:l("list-transform-start")}}}},"&-top":{[s]:{bottom:l("list-trigger-offset")}},"&-bottom":{[s]:{[a("list-transform-start")]:`translate(0, calc(${ae(n)} * -1))`,top:l("list-trigger-offset")}},"&-left":{[s]:{[a("list-transform-start")]:`translate(${ae(n)}, 0)`,right:l("list-trigger-offset")}},"&-right":{[s]:{[a("list-transform-start")]:`translate(calc(${ae(n)} * -1), 0)`,left:l("list-trigger-offset")}}}]}},zGe=()=>({}),hue=Yr("FloatButton",e=>{const{controlHeightLG:t,marginXXL:r,marginLG:n,fontSizeIcon:i,calc:o}=e,s=Wr(e,{floatButtonIconSize:o(i).mul(1.5).equal(),floatButtonSize:t,floatButtonInsetBlockEnd:r,floatButtonInsetInlineEnd:n});return[GGe(s),VGe(s),QH(e)]},zGe,{order:-998}),HD="float-btn",HGe=Q.forwardRef((e,t)=>{const{prefixCls:r,className:n,rootClassName:i,style:o,type:s="default",shape:a="circle",icon:l,description:c,content:u,tooltip:d,badge:h={},classNames:p,styles:f,...g}=e,{getPrefixCls:m,direction:v}=Q.useContext(or),b=Q.useContext(gM),S=m(HD,r),x=co(S),{shape:T,individual:R,classNames:E,styles:M}=b||{},D=T||a,A=R??!0,I=u??c,_={...e,type:s,shape:D},[F,O]=hue(S,x),k=Q.useMemo(()=>({icon:`${S}-icon`,content:`${S}-content`}),[S]),[B,H]=jr([k,E,p],[M,f],{props:_}),N=!I&&!l?Q.createElement(due,null):l,[z]=$p("FloatButton",o==null?void 0:o.zIndex),U={...o,zIndex:z},V=En(h,["title","children","status","text"]),G="badge"in e&&Q.createElement(Yle,{...V,className:ee(V.className,`${S}-badge`,{[`${S}-badge-dot`]:V.dot})}),K=$Ge(d);let q=Q.createElement(Cl,{...g,ref:t,className:ee(F,O,x,S,n,i,`${S}-${s}`,`${S}-${D}`,{[`${S}-rtl`]:v==="rtl",[`${S}-individual`]:A,[`${S}-icon-only`]:!I}),classNames:B,styles:H,style:U,shape:D,type:s,size:"large",icon:N,_skipSemantic:!0},I,G);return K&&(q=Q.createElement(pu,{...K},q)),q}),PC=HGe,WGe=Q.createElement(bNe,null),pue=Q.forwardRef((e,t)=>{var A;const{backTopIcon:r}=Ur("floatButton"),{prefixCls:n,className:i,type:o="default",shape:s="circle",visibilityHeight:a=400,icon:l,target:c,onClick:u,duration:d=450,...h}=e,p=l??r??WGe,[f,g]=y.useState(a===0),m=Q.useRef(null);Q.useImperativeHandle(t,()=>({nativeElement:m.current}));const v=()=>{var I;return((I=m.current)==null?void 0:I.ownerDocument)||window},b=bMe(I=>{const _=oae(I.target);g(_>=a)});y.useEffect(()=>{const _=(c||v)();return b({target:_}),_==null||_.addEventListener("scroll",b),()=>{b.cancel(),_==null||_.removeEventListener("scroll",b)}},[c]);const S=I=>{sae(0,{getContainer:c||v,duration:d}),u==null||u(I)},{getPrefixCls:x}=y.useContext(or),T=x(HD,n),R=x(),M=((A=y.useContext(gM))==null?void 0:A.shape)||s,D={prefixCls:T,icon:p,type:o,shape:M,...h};return Q.createElement(Sm,{visible:f,motionName:`${R}-fade`},({className:I},_)=>Q.createElement(PC,{ref:zo(m,_),...D,onClick:S,className:ee(i,I)}))}),fue=e=>{const{prefixCls:t,className:r,style:n,classNames:i,styles:o,rootClassName:s,shape:a="circle",type:l="default",placement:c,icon:u=Q.createElement(due,null),closeIcon:d,trigger:h,children:p,onOpenChange:f,open:g,onClick:m,...v}=e,{direction:b,getPrefixCls:S,closeIcon:x,classNames:T,styles:R,className:E,style:M}=Ur("floatButtonGroup"),D=d??x??Q.createElement(Bp,null),A=S(HD,t),I=co(A),[_,F]=hue(A,I),O=`${A}-group`,k=h&&["click","hover"].includes(h),[B]=$p("FloatButton",n==null?void 0:n.zIndex),H=Q.useRef(null),N=["top","left","right","bottom"].includes(c)?c:"top",[z,U]=Fn(!1,g),V=h==="hover",G=h==="click",K=br(ue=>{z!==ue&&(U(ue),f==null||f(ue))}),q=()=>{V&&K(!0)},Y=()=>{V&&K(!1)},X=ue=>{G&&K(!z),m==null||m(ue)};Q.useEffect(()=>{if(G){const ue=ve=>{var he;(he=H.current)!=null&&he.contains(ve.target)||K(!1)};return document.addEventListener("click",ue,{capture:!0}),()=>document.removeEventListener("click",ue,{capture:!0})}},[G]);const le=a==="circle",re={...e,shape:a,type:l,placement:N},[ne,se]=jr([T,i],[R,o],{props:re}),de=Q.useMemo(()=>({shape:a,individual:le,classNames:{root:ne.item,icon:ne.itemIcon,content:ne.itemContent},styles:{root:se.item,icon:se.itemIcon,content:se.itemContent}}),[a,le,ne,se]),te=Q.useMemo(()=>({...de,individual:!0,classNames:{root:ne.trigger,icon:ne.triggerIcon,content:ne.triggerContent},styles:{root:se.trigger,icon:se.triggerIcon,content:se.triggerContent}}),[de,ne,se]);let ie;const pe=`${O}-list`,Z=ue=>{const ve=N==="top"||N==="bottom",he={className:ee(pe,ne.list,ue),style:se.list};return le?ie=Q.createElement(kGe,{vertical:ve,...he},p):ie=Q.createElement(zx.Compact,{vertical:ve,...he},p),ie};return Q.createElement(gM.Provider,{value:de},Q.createElement("div",{className:ee(O,_,F,I,E,ne.root,r,s,{[`${O}-rtl`]:b==="rtl",[`${O}-individual`]:le,[`${O}-${N}`]:k,[`${O}-menu-mode`]:k}),style:{...M,zIndex:B,...se.root,...n},ref:H,onMouseEnter:q,onMouseLeave:Y},k?Q.createElement(Sm,{visible:z,motionName:`${pe}-motion`},({className:ue})=>Z(ue)):Z(),k&&Q.createElement(gM.Provider,{value:te},Q.createElement(PC,{type:l,icon:z?D:u,"aria-label":e["aria-label"],className:`${O}-trigger`,onClick:X,...v}))))},vq=({backTop:e,...t})=>e?y.createElement(pue,{...t,visibilityHeight:0}):y.createElement(PC,{...t}),UGe=({className:e,items:t,classNames:r,styles:n,prefixCls:i,...o})=>{const{getPrefixCls:s}=y.useContext(or),l=`${s(HD,i)}-pure`;return t?y.createElement(fue,{className:ee(e,l),classNames:r,styles:n,...o},t.map((c,u)=>y.createElement(vq,{key:u,...c}))):y.createElement(vq,{className:ee(e,l),classNames:r,styles:n,...o})};PC.BackTop=pue;PC.Group=fue;PC._InternalPanelDoNotUseOrYouWillBeFired=UGe;const jGe=e=>{const{getPrefixCls:t,direction:r}=y.useContext(or),{prefixCls:n,className:i}=e,o=t("input-group",n),s=t("input"),[a,l]=Ace(s),c=ee(o,l,{[`${o}-lg`]:e.size==="large",[`${o}-sm`]:e.size==="small",[`${o}-compact`]:e.compact,[`${o}-rtl`]:r==="rtl"},a,i),u=y.useContext(sa),d=y.useMemo(()=>({...u,isFormItemInput:!1}),[u]);return y.createElement(sa.Provider,{value:d},y.createElement(zx.Compact,{className:c,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},KGe=e=>{const{componentCls:t,paddingXS:r}=e;return{[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:r,[`${t}-input-wrapper`]:{position:"relative",[`${t}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${t}-mask-input`]:{color:"transparent",caretColor:e.colorText},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},qGe=Yr(["Input","OTP"],e=>{const t=Wr(e,EC(e));return KGe(t)},RC),YGe=y.forwardRef((e,t)=>{const{className:r,value:n,onChange:i,onActiveChange:o,index:s,mask:a,onFocus:l,...c}=e,{getPrefixCls:u}=y.useContext(or),d=u("otp"),h=typeof a=="string"?a:n,p=y.useRef(null);y.useImperativeHandle(t,()=>p.current);const f=b=>{i(s,b.target.value)},g=()=>{Lr(()=>{var S;const b=(S=p.current)==null?void 0:S.input;document.activeElement===b&&b&&b.select()})},m=b=>{l==null||l(b),g()},v=b=>{const{key:S,ctrlKey:x,metaKey:T}=b;S==="ArrowLeft"?o(s-1):S==="ArrowRight"?o(s+1):S==="z"&&(x||T)?b.preventDefault():S==="Backspace"&&!n&&o(s-1),g()};return y.createElement("span",{className:`${d}-input-wrapper`,role:"presentation"},a&&n!==""&&n!==void 0&&y.createElement("span",{className:`${d}-mask-icon`,"aria-hidden":"true"},h),y.createElement(Vx,{"aria-label":`OTP Input ${s+1}`,type:a===!0?"password":"text",...c,ref:p,value:n,onInput:f,onFocus:m,onKeyDown:v,onMouseDown:g,onMouseUp:g,className:ee(r,{[`${d}-mask-input`]:a})}))});function QT(e){return(e||"").split("")}const XGe=e=>{const{index:t,prefixCls:r,separator:n,className:i,style:o}=e,s=typeof n=="function"?n(t):n;return s?y.createElement("span",{className:ee(`${r}-separator`,i),style:o},s):null},ZGe=y.forwardRef((e,t)=>{const{prefixCls:r,length:n=6,size:i,defaultValue:o,value:s,onChange:a,formatter:l,separator:c,variant:u,disabled:d,status:h,autoFocus:p,mask:f,type:g,autoComplete:m,onInput:v,onFocus:b,inputMode:S,classNames:x,styles:T,className:R,style:E,...M}=e,{classNames:D,styles:A,getPrefixCls:I,direction:_,style:F,className:O}=Ur("otp"),k=I("otp",r),B={...e,length:n},[H,N]=jr([D,x],[A,T],{props:B}),z=hi(M,{aria:!0,data:!0,attr:!0}),[U,V]=qGe(k),G=Li(ve=>i??ve),K=y.useContext(sa),q=_x(K.status,h),Y=y.useMemo(()=>({...K,status:q,hasFeedback:!1,feedbackIcon:null}),[K,q]),X=y.useRef(null),le=y.useRef({});y.useImperativeHandle(t,()=>({focus:()=>{var ve;(ve=le.current[0])==null||ve.focus()},blur:()=>{var ve;for(let he=0;hel?l(ve):ve,[ne,se]=y.useState(()=>QT(re(o||"")));y.useEffect(()=>{s!==void 0&&se(QT(s))},[s]);const de=br(ve=>{se(ve),v&&v(ve),a&&ve.length===n&&ve.every(he=>he)&&ve.some((he,me)=>ne[me]!==he)&&a(ve.join(""))}),te=br((ve,he)=>{let me=Nr(ne);for(let Pe=0;Pe=0&&!me[Pe];Pe-=1)me.pop();const Oe=re(me.map(Pe=>Pe||" ").join(""));return me=QT(Oe).map((Pe,Me)=>Pe===" "&&!me[Me]?me[Me]:Pe),me}),ie=(ve,he)=>{var Pe;const me=te(ve,he),Oe=Math.min(ve+he.length,n-1);Oe!==ve&&me[ve]!==void 0&&((Pe=le.current[Oe])==null||Pe.focus()),de(me)},pe=ve=>{var he;(he=le.current[ve])==null||he.focus()},Z=(ve,he)=>{var me,Oe,Pe;for(let Me=0;Me{const me=`otp-${he}`,Oe=ne[he]||"";return y.createElement(y.Fragment,{key:me},y.createElement(YGe,{ref:Pe=>{le.current[he]=Pe},index:he,size:G,htmlSize:1,className:ee(H.input,`${k}-input`),style:N.input,onChange:ie,value:Oe,onActiveChange:pe,autoFocus:he===0&&p,onFocus:Pe=>Z(Pe,he),...ue}),hey.createElement(kr,P$({},e,{ref:t,icon:JGe})),eVe=y.forwardRef(QGe);var tVe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function M$(){return M$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,M$({},e,{ref:t,icon:tVe})),nVe=y.forwardRef(rVe),iVe=e=>e?y.createElement(nVe,null):y.createElement(eVe,null),oVe={click:"onClick",hover:"onMouseOver"},sVe=y.forwardRef((e,t)=>{const{disabled:r,action:n="click",visibilityToggle:i=!0,iconRender:o=iVe,suffix:s}=e,a=y.useContext(Rs),l=r??a,c=typeof i=="object"&&i.visible!==void 0,[u,d]=y.useState(()=>c?i.visible:!1),h=y.useRef(null);y.useEffect(()=>{c&&d(i.visible)},[c,i]);const p=eue(h),f=()=>{var _;if(l)return;u&&p();const I=!u;d(I),typeof i=="object"&&((_=i.onVisibleChange)==null||_.call(i,I))},g=I=>{const _=oVe[n]||"",F=o(u),O={[_]:f,className:`${I}-icon`,key:"passwordIcon",onMouseDown:k=>{k.preventDefault()},onMouseUp:k=>{k.preventDefault()}};return y.cloneElement(y.isValidElement(F)?F:y.createElement("span",null,F),O)},{className:m,prefixCls:v,inputPrefixCls:b,size:S,...x}=e,{getPrefixCls:T}=y.useContext(or),R=T("input",b),E=T("input-password",v),M=i&&g(E),D=ee(E,m,{[`${E}-${S}`]:!!S}),A={...En(x,["suffix","iconRender","visibilityToggle"]),type:u?"text":"password",className:D,prefixCls:R,suffix:y.createElement(y.Fragment,null,M,s)};return S&&(A.size=S),y.createElement(Vx,{ref:zo(t,h),...A})}),aVe=e=>{const{componentCls:t}=e,r=`${t}-btn`;return{[t]:{width:"100%",[r]:{"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}}}}},lVe=Yr(["Input","Search"],aVe),cVe=y.forwardRef((e,t)=>{const{prefixCls:r,inputPrefixCls:n,className:i,size:o,style:s,enterButton:a=!1,addonAfter:l,loading:c,disabled:u,onSearch:d,onChange:h,onCompositionStart:p,onCompositionEnd:f,variant:g,onPressEnter:m,classNames:v,styles:b,hidden:S,...x}=e,{direction:T,getPrefixCls:R,classNames:E,styles:M}=Ur("inputSearch"),D={...e,enterButton:a},[A,I]=jr([E,v],[M,b],{props:D},{button:{_default:"root"}}),_=y.useRef(!1),F=R("input-search",r),O=R("input",n),[k,B]=lVe(F),{compactSize:H}=Gp(F,T),N=Li(Z=>o??H??Z),z=y.useRef(null),U=Z=>{Z!=null&&Z.target&&Z.type==="click"&&d&&d(Z.target.value,Z,{source:"clear"}),h==null||h(Z)},V=Z=>{var ue;document.activeElement===((ue=z.current)==null?void 0:ue.input)&&Z.preventDefault()},G=Z=>{var ue,ve;d&&d((ve=(ue=z.current)==null?void 0:ue.input)==null?void 0:ve.value,Z,{source:"input"})},K=Z=>{_.current||c||(m==null||m(Z),G(Z))},q=typeof a=="boolean"?y.createElement(y3,null):null,Y=`${F}-btn`,X=ee(Y,{[`${Y}-${g}`]:g});let le;const re=a||{},ne=re.type&&re.type.__ANT_BUTTON===!0;ne||re.type==="button"?le=Ui(re,{onMouseDown:V,onClick:Z=>{var ue,ve;(ve=(ue=re==null?void 0:re.props)==null?void 0:ue.onClick)==null||ve.call(ue,Z),G(Z)},key:"enterButton",...ne?{className:X,size:N}:{}}):le=y.createElement(Cl,{classNames:A.button,styles:I.button,className:X,color:a?"primary":"default",size:N,disabled:u,key:"enterButton",onMouseDown:V,onClick:G,loading:c,icon:q,variant:g==="borderless"||g==="filled"||g==="underlined"?"text":a?"solid":void 0},a),l&&(le=[le,Ui(l,{key:"addonAfter"})]);const se=ee(F,B,{[`${F}-rtl`]:T==="rtl",[`${F}-${N}`]:!!N,[`${F}-with-button`]:!!a},i,k,A.root),de=Z=>{_.current=!0,p==null||p(Z)},te=Z=>{_.current=!1,f==null||f(Z)},ie=hi(x,{data:!0}),pe=En({...x,classNames:En(A,["button","root"]),styles:En(I,["button","root"]),prefixCls:O,type:"search",size:N,variant:g,onPressEnter:K,onCompositionStart:de,onCompositionEnd:te,onChange:U,disabled:u},Object.keys(ie));return y.createElement(ZH,{className:se,style:{...s,...I.root},...ie,hidden:S},y.createElement(Vx,{ref:zo(z,t),...pe}),le)}),uVe=` min-height:0 !important; max-height:none !important; height:0 !important; visibility:hidden !important; overflow:hidden !important; position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; pointer-events: none !important; `,dVe=["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"],U_={};let va;function hVe(e,t=!1){const r=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&U_[r])return U_[r];const 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")),s=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),l={sizingStyle:dVe.map(c=>`${c}:${n.getPropertyValue(c)}`).join(";"),paddingSize:o,borderSize:s,boxSizing:i};return t&&r&&(U_[r]=l),l}function pVe(e,t=!1,r=null,n=null){va||(va=document.createElement("textarea"),va.setAttribute("tab-index","-1"),va.setAttribute("aria-hidden","true"),va.setAttribute("name","hiddenTextarea"),document.body.appendChild(va)),e.getAttribute("wrap")?va.setAttribute("wrap",e.getAttribute("wrap")):va.removeAttribute("wrap");const{paddingSize:i,borderSize:o,boxSizing:s,sizingStyle:a}=hVe(e,t);va.setAttribute("style",`${a};${uVe}`),va.value=e.value||e.placeholder||"";let l,c,u,d=va.scrollHeight;if(s==="border-box"?d+=o:s==="content-box"&&(d-=i),r!==null||n!==null){va.value=" ";const p=va.scrollHeight-i;r!==null&&(l=p*r,s==="border-box"&&(l=l+i+o),d=Math.max(l,d)),n!==null&&(c=p*n,s==="border-box"&&(c=c+i+o),u=d>c?"":"hidden",d=Math.min(c,d))}const h={height:d,overflowY:u,resize:"none"};return l&&(h.minHeight=l),c&&(h.maxHeight=c),h}function I$(){return I$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:r,defaultValue:n,value:i,autoSize:o,onResize:s,className:a,style:l,disabled:c,onChange:u,onInternalAutoSize:d,...h}=e,[p,f]=Fn(n,i),g=p??"",m=k=>{f(k.target.value),u==null||u(k)},v=y.useRef();y.useImperativeHandle(t,()=>({textArea:v.current}));const[b,S]=y.useMemo(()=>o&&typeof o=="object"?[o.minRows,o.maxRows]:[],[o]),x=!!o,[T,R]=y.useState(q_),[E,M]=y.useState(),D=()=>{R(j_)};zr(()=>{x&&D()},[i,b,S,x]),zr(()=>{if(T===j_)R(K_);else if(T===K_){const k=pVe(v.current,!1,b,S);R(q_),M(k)}},[T]);const A=y.useRef(),I=()=>{Lr.cancel(A.current)},_=k=>{T===q_&&(s==null||s(k),o&&(I(),A.current=Lr(()=>{D()})))};y.useEffect(()=>I,[]);const O={...l,...x?E:null};return(T===j_||T===K_)&&(O.overflowY="hidden",O.overflowX="hidden"),y.createElement(Js,{onResize:_,disabled:!(o||s)},y.createElement("textarea",I$({},h,{ref:v,style:O,className:ee(r,a,{[`${r}-disabled`]:c}),disabled:c,value:g,onChange:m})))});function D$(){return D$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const[I,_]=Fn(e,t),F=I==null?"":String(I),[O,k]=Q.useState(!1),B=Q.useRef(!1),[H,N]=Q.useState(null),z=y.useRef(null),U=y.useRef(null),V=()=>{var Me;return(Me=U.current)==null?void 0:Me.textArea},G=()=>{V().focus()};y.useImperativeHandle(A,()=>{var Me;return{resizableTextArea:U.current,focus:G,blur:()=>{V().blur()},nativeElement:((Me=z.current)==null?void 0:Me.nativeElement)||V()}}),y.useEffect(()=>{k(Me=>!g&&Me)},[g]);const[K,q]=Q.useState(null);Q.useEffect(()=>{K&&V().setSelectionRange(...K)},[K]);const Y=Jce(h,d),X=Y.max??s,le=Number(X)>0,re=Y.strategy(F),ne=!!X&&re>X,se=(Me,He)=>{let Ge=He;!B.current&&Y.exceedFormatter&&Y.max&&Y.strategy(He)>Y.max&&(Ge=Y.exceedFormatter(He,{max:Y.max}),He!==Ge&&q([V().selectionStart||0,V().selectionEnd||0])),_(Ge),hM(Me.currentTarget,Me,i,Ge)},de=Me=>{B.current=!0,a==null||a(Me)},te=Me=>{B.current=!1,se(Me,Me.currentTarget.value),l==null||l(Me)},ie=Me=>{se(Me,Me.target.value)},pe=Me=>{Me.key==="Enter"&&T&&!Me.nativeEvent.isComposing&&T(Me),M==null||M(Me)},Z=Me=>{k(!0),r==null||r(Me)},ue=Me=>{k(!1),n==null||n(Me)},ve=Me=>{_(""),G(),hM(V(),Me,i)};let he=c,me;Y.show&&(Y.showFormatter?me=Y.showFormatter({value:F,count:re,maxLength:X}):me=`${re}${le?` / ${X}`:""}`,he=Q.createElement(Q.Fragment,null,he,Q.createElement("span",{className:ee(`${u}-data-count`,v==null?void 0:v.count),style:b==null?void 0:b.count},me)));const Oe=Me=>{var He;S==null||S(Me),(He=V())!=null&&He.style.height&&N(!0)},Pe=!E&&!d&&!o;return Q.createElement(Zce,{ref:z,value:F,allowClear:o,handleReset:ve,suffix:he,prefixCls:u,classNames:{...v,affixWrapper:ee(v==null?void 0:v.affixWrapper,{[`${u}-show-count`]:d,[`${u}-textarea-allow-clear`]:o})},disabled:g,focused:O,className:ee(p,ne&&`${u}-out-of-range`),style:{...f,...H&&!Pe?{height:"auto"}:{}},dataAttrs:{affixWrapper:{"data-count":typeof me=="string"?me:void 0}},hidden:m,readOnly:R,onClear:x},Q.createElement(fVe,D$({},D,{autoSize:E,maxLength:s,onKeyDown:pe,onChange:ie,onFocus:Z,onBlur:ue,onCompositionStart:de,onCompositionEnd:te,className:ee(v==null?void 0:v.textarea),style:{resize:f==null?void 0:f.resize,...b==null?void 0:b.textarea},disabled:g,prefixCls:u,onResize:Oe,ref:U,readOnly:R})))}),mVe=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"}},[` &-allow-clear > ${t}, &-affix-wrapper${n}-has-feedback ${t} `]:{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}}}}}},vVe=Yr(["Input","TextArea"],e=>{const t=Wr(e,EC(e));return mVe(t)},RC,{resetFont:!1}),gue=y.forwardRef((e,t)=>{var Z;const{prefixCls:r,bordered:n=!0,size:i,disabled:o,status:s,allowClear:a,classNames:l,rootClassName:c,className:u,style:d,styles:h,variant:p,showCount:f,onMouseDown:g,onResize:m,...v}=e,{getPrefixCls:b,direction:S,allowClear:x,autoComplete:T,className:R,style:E,classNames:M,styles:D}=Ur("textArea"),A=y.useContext(Rs),I=o??A,{status:_,hasFeedback:F,feedbackIcon:O}=y.useContext(sa),k=_x(_,s),[B,H]=jr([M,l],[D,h],{props:e}),N=y.useRef(null);y.useImperativeHandle(t,()=>{var ue,ve;return{resizableTextArea:(ue=N.current)==null?void 0:ue.resizableTextArea,focus:he=>{var me,Oe;a3((Oe=(me=N.current)==null?void 0:me.resizableTextArea)==null?void 0:Oe.textArea,he)},blur:()=>{var he;return(he=N.current)==null?void 0:he.blur()},nativeElement:((ve=N.current)==null?void 0:ve.nativeElement)||null}});const z=b("input",r),U=co(z),[V,G]=Dce(z,c);vVe(z,U);const{compactSize:K,compactItemClassnames:q}=Gp(z,S),Y=Li(ue=>i??K??ue),[X,le]=Ox("textArea",p,n),re=Qce(a??x),[ne,se]=y.useState(!1),[de,te]=y.useState(!1),ie=ue=>{se(!0),g==null||g(ue);const ve=()=>{se(!1),document.removeEventListener("mouseup",ve)};document.addEventListener("mouseup",ve)},pe=ue=>{var ve,he;if(m==null||m(ue),ne&&typeof getComputedStyle=="function"){const me=(he=(ve=N.current)==null?void 0:ve.nativeElement)==null?void 0:he.querySelector("textarea");me&&getComputedStyle(me).resize==="both"&&te(!0)}};return y.createElement(gVe,{autoComplete:T,...v,style:{...H.root,...E,...d},styles:H,disabled:I,allowClear:re,className:ee(G,U,u,c,q,R,B.root,{[`${z}-textarea-affix-wrapper-resize-dirty`]:de}),classNames:{...B,textarea:ee({[`${z}-sm`]:Y==="small",[`${z}-lg`]:Y==="large"},V,B.textarea,ne&&`${z}-mouse-active`),variant:ee({[`${z}-${X}`]:le},Oy(z,k)),affixWrapper:ee(`${z}-textarea-affix-wrapper`,{[`${z}-affix-wrapper-rtl`]:S==="rtl",[`${z}-affix-wrapper-sm`]:Y==="small",[`${z}-affix-wrapper-lg`]:Y==="large",[`${z}-textarea-show-count`]:f||((Z=e.count)==null?void 0:Z.show)},V)},prefixCls:z,suffix:F&&y.createElement("span",{className:`${z}-textarea-suffix`},O),showCount:f,ref:N,onResize:pe,onMouseDown:ie})}),Hx=Vx;Hx.Group=jGe;Hx.Search=cVe;Hx.TextArea=gue;Hx.Password=sVe;Hx.OTP=ZGe;var yVe={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"};function A$(){return A$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,A$({},e,{ref:t,icon:yVe})),yq=y.forwardRef(CVe);var bVe={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"};function F$(){return F$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,F$({},e,{ref:t,icon:bVe})),Cq=y.forwardRef(SVe),wVe={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:"页码"},xVe=[10,20,50,100],TVe=e=>{const{pageSizeOptions:t=xVe,locale:r,changeSize:n,pageSize:i,goButton:o,quickGo:s,rootPrefixCls:a,disabled:l,buildOptionText:c,showSizeChanger:u,sizeChangerRender:d}=e,[h,p]=Q.useState(""),f=Q.useMemo(()=>!h||Number.isNaN(h)?void 0:Number(h),[h]),g=typeof c=="function"?c:M=>`${M} ${r.items_per_page}`,m=M=>{const D=M.target.value;/^\d*$/.test(D)&&p(D)},v=M=>{o||h===""||(p(""),!(M.relatedTarget&&(M.relatedTarget.className.includes(`${a}-item-link`)||M.relatedTarget.className.includes(`${a}-item`)))&&(s==null||s(f)))},b=M=>{h!==""&&(M.keyCode===Xt.ENTER||M.type==="click")&&(p(""),s==null||s(f))},S=()=>t.some(M=>M.toString()===i.toString())?t:t.concat([i]).sort((M,D)=>{const A=Number.isNaN(Number(M))?0:Number(M),I=Number.isNaN(Number(D))?0:Number(D);return A-I}),x=`${a}-options`;if(!u&&!s)return null;let T=null,R=null,E=null;return u&&d&&(T=d({disabled:l,size:i,onSizeChange:M=>{n==null||n(Number(M))},"aria-label":r.page_size,className:`${x}-size-changer`,options:S().map(M=>({label:g(M),value:M}))})),s&&(o&&(E=typeof o=="boolean"?Q.createElement("button",{type:"button",onClick:b,onKeyUp:b,disabled:l,className:`${x}-quick-jumper-button`},r.jump_to_confirm):Q.createElement("span",{onClick:b,onKeyUp:b},o)),R=Q.createElement("div",{className:`${x}-quick-jumper`},r.jump_to,Q.createElement("input",{disabled:l,type:"text",value:h,onChange:m,onKeyUp:b,onBlur:v,"aria-label":r.page}),r.page,E)),Q.createElement("li",{className:x},T,R)},Qb=e=>{const{rootPrefixCls:t,page:r,active:n,className:i,style:o,showTitle:s,onClick:a,onKeyPress:l,itemRender:c}=e,u=`${t}-item`,d=ee(u,`${u}-${r}`,{[`${u}-active`]:n,[`${u}-disabled`]:!r},i),h=()=>{a(r)},p=g=>{l(g,a,r)},f=c(r,"page",Q.createElement("a",{rel:"nofollow"},r));return f?Q.createElement("li",{title:s?String(r):null,className:d,style:o,onClick:h,onKeyDown:p,tabIndex:0},f):null};function _h(){return _h=Object.assign?Object.assign.bind():function(e){for(var t=1;tr;function bq(){}function Sq(e){const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function mf(e,t,r){const n=typeof e>"u"?t:e;return Math.floor((r-1)/n)+1}const RVe=e=>{const{prefixCls:t="rc-pagination",selectPrefixCls:r="rc-select",className:n,classNames:i,styles:o,current:s,defaultCurrent:a=1,total:l=0,pageSize:c,defaultPageSize:u=10,onChange:d=bq,hideOnSinglePage:h,align:p,showPrevNextJumpers:f=!0,showQuickJumper:g,showLessItems:m,showTitle:v=!0,onShowSizeChange:b=bq,locale:S=wVe,style:x,totalBoundaryShowSizeChanger:T=50,disabled:R,simple:E,showTotal:M,showSizeChanger:D=l>T,sizeChangerRender:A,pageSizeOptions:I,itemRender:_=EVe,jumpPrevIcon:F,jumpNextIcon:O,prevIcon:k,nextIcon:B}=e,H=Q.useRef(null),[N,z]=Fn(u,c),[U,V]=Fn(a,s),G=Math.max(1,Math.min(U,mf(void 0,N,l))),[K,q]=Q.useState(G);y.useEffect(()=>{q(G)},[G]);const Y=Math.max(1,G-(m?3:5)),X=Math.min(mf(void 0,N,l),G+(m?3:5));function le(De,Pt){let Qe=De||Q.createElement("button",{type:"button","aria-label":Pt,className:`${t}-item-link`});return typeof De=="function"&&(Qe=Q.createElement(De,e)),Qe}function re(De){const Pt=De.target.value,Qe=mf(void 0,N,l);let $e;return Pt===""?$e=Pt:Number.isNaN(Number(Pt))?$e=K:Pt>=Qe?$e=Qe:$e=Number(Pt),$e}function ne(De){return Sq(De)&&De!==G&&Sq(l)&&l>0}const se=l>N?g:!1;function de(De){(De.keyCode===Xt.UP||De.keyCode===Xt.DOWN)&&De.preventDefault()}function te(De){const Pt=re(De);switch(Pt!==K&&q(Pt),De.keyCode){case Xt.ENTER:Z(Pt);break;case Xt.UP:Z(Pt-1);break;case Xt.DOWN:Z(Pt+1);break}}function ie(De){Z(re(De))}function pe(De){const Pt=mf(De,N,l),Qe=G>Pt&&Pt!==0?Pt:G;z(De),q(Qe),b==null||b(G,De),V(Qe),d==null||d(Qe,De)}function Z(De){if(ne(De)&&!R){const Pt=mf(void 0,N,l);let Qe=De;return De>Pt?Qe=Pt:De<1&&(Qe=1),Qe!==K&&q(Qe),V(Qe),d==null||d(Qe,N),Qe}return G}const ue=G>1,ve=Gl?l:G*N]));let nt=null;const Ke=mf(void 0,N,l);if(h&&l<=N)return null;const Ie=[],rt={rootPrefixCls:t,onClick:Z,onKeyPress:Me,showTitle:v,itemRender:_,page:-1,className:i==null?void 0:i.item,style:o==null?void 0:o.item},Tt=G-1>0?G-1:0,Rt=G+1=Yt*2&&G!==3&&(Ie[0]=Q.cloneElement(Ie[0],{className:ee(`${t}-item-after-jump-prev`,Ie[0].props.className)}),Ie.unshift(et)),Ke-G>=Yt*2&&G!==Ke-2){const ge=Ie[Ie.length-1];Ie[Ie.length-1]=Q.cloneElement(ge,{className:ee(`${t}-item-before-jump-next`,ge.props.className)}),Ie.push(nt)}oe!==1&&Ie.unshift(Q.createElement(Qb,_h({},rt,{key:1,page:1}))),ce!==Ke&&Ie.push(Q.createElement(Qb,_h({},rt,{key:Ke,page:Ke})))}let hr=St(Tt);if(hr){const De=!ue||!Ke;hr=Q.createElement("li",{title:v?S.prev_page:null,onClick:he,tabIndex:De?null:0,onKeyDown:He,className:ee(`${t}-prev`,i==null?void 0:i.item,{[`${t}-disabled`]:De}),style:o==null?void 0:o.item,"aria-disabled":De},hr)}let Je=Ye(Rt);if(Je){let De,Pt;E?(De=!ve,Pt=ue?0:null):(De=!ve||!Ke,Pt=De?null:0),Je=Q.createElement("li",{title:v?S.next_page:null,onClick:me,tabIndex:Pt,onKeyDown:Ge,className:ee(`${t}-next`,i==null?void 0:i.item,{[`${t}-disabled`]:De}),style:o==null?void 0:o.item,"aria-disabled":De},Je)}const ot=ee(t,n,{[`${t}-start`]:p==="start",[`${t}-center`]:p==="center",[`${t}-end`]:p==="end",[`${t}-simple`]:E,[`${t}-disabled`]:R});return Q.createElement("ul",_h({className:ot,style:x,ref:H},Ne),tt,hr,E?ut:Ie,Je,Q.createElement(TVe,{locale:S,rootPrefixCls:t,disabled:R,selectPrefixCls:r,changeSize:pe,pageSize:N,pageSizeOptions:I,quickGo:se?Z:null,goButton:ft,showSizeChanger:D,sizeChangerRender:A}))},PVe=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}}}}},MVe=e=>{const{componentCls:t}=e;return{[`&${t}-small ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-quick-jumper":{input:{...L3(e),width:e.paginationMiniQuickJumperInputWidth}}}}},IVe=e=>{const{componentCls:t}=e;return{[`&${t}-large ${t}-options`]:{"&-quick-jumper":{input:{...F3(e)}}}}},DVe=e=>{const{componentCls:t,antCls:r}=e,[,n]=Jn(r,"pagination");return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:n("item-size-actual"),lineHeight:n("item-size-actual"),verticalAlign:"top",[`${t}-item-link`]:{height:n("item-size-actual"),backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:n("item-size-actual"),lineHeight:n("item-size-actual")}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:n("item-size-actual"),marginInlineEnd:n("item-spacing-actual"),input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${ae(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${ae(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:`${ae(e.inputOutlineOffset)} 0 ${ae(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}-small`]:{[`${t}-simple-pager`]:{input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},AVe=e=>{const{componentCls:t,antCls:r}=e,[,n]=Jn(r,"pagination");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}}},[` ${t}-prev, ${t}-jump-prev, ${t}-jump-next `]:{marginInlineEnd:n("item-spacing-actual")},[` ${t}-prev, ${t}-next, ${t}-jump-prev, ${t}-jump-next `]:{display:"inline-block",minWidth:n("item-size-actual"),height:n("item-size-actual"),color:e.colorText,fontFamily:e.fontFamily,lineHeight:n("item-size-actual"),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:`${ae(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":{width:"auto"},"&-quick-jumper":{display:"inline-block",height:n("item-size-actual"),marginInlineStart:e.marginXS,lineHeight:n("item-size-actual"),verticalAlign:"baseline",input:{...VD(e),...A3(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow}),"&[disabled]":{...GD(e)},width:e.quickJumperInputWidth,height:n("item-size-actual"),boxSizing:"border-box",margin:0,marginInlineStart:n("item-spacing-actual"),marginInlineEnd:n("item-spacing-actual")}}}}},FVe=e=>{const{componentCls:t,antCls:r}=e,[,n]=Jn(r,"pagination");return{[`${t}-item`]:{display:"inline-block",minWidth:n("item-size-actual"),height:n("item-size-actual"),marginInlineEnd:n("item-spacing-actual"),fontFamily:e.fontFamily,lineHeight:ae(e.calc(n("item-size-actual")).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${ae(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${ae(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}}}}},LVe=e=>{const{componentCls:t,antCls:r}=e,[n,i]=Jn(r,"pagination");return{[t]:{[n("item-size-actual")]:ae(e.itemSize),[n("item-spacing-actual")]:ae(e.marginXS),"&-small":{[n("item-size-actual")]:ae(e.itemSizeSM),[n("item-spacing-actual")]:ae(e.marginXXS)},"&-large":{[n("item-size-actual")]:ae(e.itemSizeLG),[n("item-spacing-actual")]:ae(e.marginSM)},...cn(e),display:"flex",alignItems:"center","&-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:i("item-size-actual"),marginInlineEnd:i("item-spacing-actual"),lineHeight:ae(e.calc(i("item-size-actual")).sub(2).equal()),verticalAlign:"middle"},...FVe(e),...AVe(e),...DVe(e),...MVe(e),...IVe(e),...PVe(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"}}},_Ve=e=>{const{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:{...yl(e)},[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0},...uc(e)}},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:uc(e)}}}},mue=e=>({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemSizeLG:e.controlHeightLG,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0,...RC(e)}),vue=e=>Wr(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"},EC(e)),OVe=Yr("Pagination",e=>{const t=vue(e);return[LVe(t),_Ve(t)]},mue),kVe=e=>{const{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled`]:{"&, &: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`]:{[`${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:`${ae(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}}}}},NVe=yx(["Pagination","bordered"],e=>{const t=vue(e);return kVe(t)},mue);function wq(e){return y.useMemo(()=>typeof e=="boolean"?[e,{}]:e&&typeof e=="object"?[!0,e]:[void 0,void 0],[e])}const yue=e=>{const{align:t,prefixCls:r,selectPrefixCls:n,className:i,rootClassName:o,style:s,size:a,locale:l,responsive:c,showSizeChanger:u,selectComponentClass:d,pageSizeOptions:h,styles:p,classNames:f,...g}=e,{xs:m}=kx(c),[,v]=ds(),{getPrefixCls:b,direction:S,showSizeChanger:x,className:T,style:R,classNames:E,styles:M,totalBoundaryShowSizeChanger:D}=Ur("pagination"),A=b("pagination",r),[I,_]=OVe(A),F=Li(a),O=F==="small"||!!(m&&!F&&c),k={...e,size:F},[B,H]=jr([E,f],[M,p],{props:k}),[N]=Cc("Pagination",Xse),z={...N,...l},[U,V]=wq(u),[G,K]=wq(x),q=U??G,Y=V??K,X=d||hu,le=y.useMemo(()=>h?h.map(Number):void 0,[h]),re=ie=>{var He;const{disabled:pe,size:Z,onSizeChange:ue,"aria-label":ve,className:he,options:me}=ie,{className:Oe,onChange:Pe}=Y||{},Me=(He=me.find(Ge=>String(Ge.value)===String(Z)))==null?void 0:He.value;return y.createElement(X,{disabled:pe,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:Ge=>Ge.parentNode,"aria-label":ve,options:me,...Y,value:Me,onChange:(Ge,Ct)=>{ue==null||ue(Ge),Pe==null||Pe(Ge,Ct)},size:F,className:ee(he,Oe)})},ne=y.useMemo(()=>{const ie=y.createElement("span",{className:`${A}-item-ellipsis`},"•••"),pe=y.createElement("button",{className:`${A}-item-link`,type:"button",tabIndex:-1},S==="rtl"?y.createElement(PB,null):y.createElement(s$,null)),Z=y.createElement("button",{className:`${A}-item-link`,type:"button",tabIndex:-1},S==="rtl"?y.createElement(s$,null):y.createElement(PB,null)),ue=y.createElement("a",{className:`${A}-item-link`},y.createElement("div",{className:`${A}-item-container`},S==="rtl"?y.createElement(Cq,{className:`${A}-item-link-icon`}):y.createElement(yq,{className:`${A}-item-link-icon`}),ie)),ve=y.createElement("a",{className:`${A}-item-link`},y.createElement("div",{className:`${A}-item-container`},S==="rtl"?y.createElement(yq,{className:`${A}-item-link-icon`}):y.createElement(Cq,{className:`${A}-item-link-icon`}),ie));return{prevIcon:pe,nextIcon:Z,jumpPrevIcon:ue,jumpNextIcon:ve}},[S,A]),se=b("select",n),de=ee({[`${A}-${t}`]:!!t,[`${A}-${F}`]:F,[`${A}-mini`]:O,[`${A}-rtl`]:S==="rtl",[`${A}-bordered`]:v.wireframe},T,i,o,B.root,I,_),te={...H.root,...R,...s};return y.createElement(y.Fragment,null,v.wireframe&&y.createElement(NVe,{prefixCls:A}),y.createElement(RVe,{...ne,...g,styles:H,classNames:B,style:te,prefixCls:A,selectPrefixCls:se,className:de,locale:z,pageSizeOptions:le,showSizeChanger:q,totalBoundaryShowSizeChanger:g.totalBoundaryShowSizeChanger??D,sizeChangerRender:re}))},mM=100,Cue=mM/5,bue=mM/2-Cue/2,Y_=bue*2*Math.PI,xq=50,Tq=e=>{const{dotClassName:t,style:r,hasCircleCls:n}=e;return y.createElement("circle",{className:ee(`${t}-circle`,{[`${t}-circle-bg`]:n}),r:bue,cx:xq,cy:xq,strokeWidth:Cue,style:r})},BVe=({percent:e,prefixCls:t})=>{const r=`${t}-dot`,n=`${r}-holder`,i=`${n}-hidden`,[o,s]=y.useState(!1);zr(()=>{e!==0&&s(!0)},[e!==0]);const a=Math.max(Math.min(e,100),0);if(!o)return null;const l={strokeDashoffset:`${Y_/4}`,strokeDasharray:`${Y_*a/100} ${Y_*(100-a)/100}`};return y.createElement("span",{className:ee(n,`${r}-progress`,a<=0&&i)},y.createElement("svg",{viewBox:`0 0 ${mM} ${mM}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a},y.createElement(Tq,{dotClassName:r,hasCircleCls:!0}),y.createElement(Tq,{dotClassName:r,style:l})))};function $Ve(e){const{prefixCls:t,percent:r=0,className:n,style:i}=e,o=`${t}-dot`,s=`${o}-holder`,a=`${s}-hidden`;return y.createElement(y.Fragment,null,y.createElement("span",{className:ee(s,n,r>0&&a),style:i},y.createElement("span",{className:ee(o,`${t}-dot-spin`)},[1,2,3,4].map(l=>y.createElement("i",{className:`${t}-dot-item`,key:l})))),y.createElement(BVe,{prefixCls:t,percent:r}))}function GVe(e){const{prefixCls:t,indicator:r,percent:n,className:i,style:o}=e,s=`${t}-dot`;return r&&y.isValidElement(r)?Ui(r,a=>({className:ee(a.className,s,i),style:{...a.style,...o},percent:n})):y.createElement($Ve,{prefixCls:t,percent:n,className:i,style:o})}const VVe=new Zr("antSpinMove",{to:{opacity:1}}),zVe=new Zr("antRotate",{to:{transform:"rotate(405deg)"}}),HVe=e=>{const{componentCls:t}=e,r=`${t}-section`;return{[t]:{...cn(e),position:"relative","&-rtl":{direction:"rtl"},[`&${r}, ${r}`]:{display:"flex",alignItems:"center",flexDirection:"column",gap:e.paddingSM,color:e.colorPrimary},[`&${r}`]:{display:"inline-flex"},[r]:{position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)",zIndex:1},[`${t}-description`]:{fontSize:e.fontSize,lineHeight:1},[`${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"}},"&-spinning":{[`${t}-description`]:{textShadow:`0 0px 5px ${e.colorBgContainer}`},[`${t}-container`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-fullscreen":{position:"fixed",inset:0,backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,opacity:0,pointerEvents:"none",transition:`all ${e.motionDurationMid}`,[`&${t}-spinning`]:{opacity:1,pointerEvents:"auto"},[r]:{color:e.colorWhite,[`${t}-description`]:{color:e.colorTextLightSolid}}}}}},WVe=e=>{const{componentCls:t,antCls:r,motionDurationSlow:n}=e,[i,o]=Jn(r,"spin");return{[t]:{[i("dot-holder-size")]:e.dotSize,[i("dot-item-size")]:`calc((${o("dot-holder-size")} - ${e.marginXXS} / 2) / 2)`,[`${t}-dot`]:{"&-holder":{width:"1em",height:"1em",fontSize:o("dot-holder-size"),display:"inline-block",transition:["transform","opacity"].map(s=>`${s} ${n} ease`).join(", "),transformOrigin:"50% 50%",lineHeight:1,"&-hidden":{transform:"scale(0.3)",opacity:0}},position:"relative",display:"inline-block",fontSize:o("dot-holder-size"),width:"1em",height:"1em","&-spin":{transform:"rotate(45deg)",animationName:zVe,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-item":{position:"absolute",display:"block",width:o("dot-item-size"),height:o("dot-item-size"),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:VVe,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"}},"&-progress":{position:"absolute",left:"50%",top:0,transform:"translateX(-50%)"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(s=>`${s} ${n} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}}}}},UVe=e=>{const{componentCls:t}=e,[r]=Jn(e.antCls,"spin");return{[t]:{"&-sm":{[r("dot-holder-size")]:e.dotSizeSM},"&-lg":{[r("dot-holder-size")]:e.dotSizeLG}}}},jVe=e=>{const{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:r}},KVe=Yr("Spin",e=>{const t=Wr(e,{spinDotDefault:e.colorTextDescription});return[HVe(t),WVe(t),UVe(t)]},jVe),qVe=200,Eq=[[30,.05],[70,.03],[96,.01]];function YVe(e,t){const[r,n]=y.useState(0),i=y.useRef(null),o=t==="auto";return y.useEffect(()=>(o&&e&&(n(0),i.current=setInterval(()=>{n(s=>{const a=100-s;for(let l=0;l{i.current&&(clearInterval(i.current),i.current=null)}),[o,e]),o?r:t}let Sue;function XVe(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}const V3=e=>{const{prefixCls:t,spinning:r=!0,delay:n=0,className:i,rootClassName:o,size:s,tip:a,description:l,wrapperClassName:c,style:u,children:d,fullscreen:h=!1,indicator:p,percent:f,classNames:g,styles:m,...v}=e,{getPrefixCls:b,direction:S,indicator:x,className:T,style:R,classNames:E,styles:M}=Ur("spin"),D=b("spin",t),[A,I]=KVe(D),[_,F]=y.useState(()=>r&&!XVe(r,n)),O=YVe(_,f);y.useEffect(()=>{if(r){const q=r$e(n,()=>{F(!0)});return q(),()=>{var Y;(Y=q==null?void 0:q.cancel)==null||Y.call(q)}}F(!1)},[n,r]);const k=Li(q=>s??q),B=l??a,H={...e,size:k,spinning:_,tip:B,description:B,fullscreen:h,children:d,percent:O},[N,z]=jr([E,g],[M,m],{props:H}),U=p??x??Sue,V=typeof d<"u",G=V||h,K=y.createElement(y.Fragment,null,y.createElement(GVe,{className:ee(N.indicator),style:z.indicator,prefixCls:D,indicator:U,percent:O}),B&&y.createElement("div",{className:ee(`${D}-description`,N.tip,N.description),style:{...z.tip,...z.description}},B));return y.createElement("div",{className:ee(D,{[`${D}-sm`]:k==="small",[`${D}-lg`]:k==="large",[`${D}-spinning`]:_,[`${D}-rtl`]:S==="rtl",[`${D}-fullscreen`]:h},o,N.root,h&&N.mask,G?c:[`${D}-section`,N.section],T,i,A,I),style:{...z.root,...G?{}:z.section,...h?z.mask:{},...R,...u},"aria-live":"polite","aria-busy":_,...v},_&&(G?y.createElement("div",{className:ee(`${D}-section`,N.section),style:z.section},K):K),V&&y.createElement("div",{className:ee(`${D}-container`,N.container),style:z.container},d))};V3.setDefaultIndicator=e=>{Sue=e};const z3=Q.createContext({});z3.Consumer;const ZVe=({prefixCls:e,className:t,avatar:r,title:n,description:i,...o})=>{const{getPrefixCls:s}=y.useContext(or),a=s("list",e),l=ee(`${a}-item-meta`,t),c=Q.createElement("div",{className:`${a}-item-meta-content`},n&&Q.createElement("h4",{className:`${a}-item-meta-title`},n),i&&Q.createElement("div",{className:`${a}-item-meta-description`},i));return Q.createElement("div",{...o,className:l},r&&Q.createElement("div",{className:`${a}-item-meta-avatar`},r),(n||i)&&c)},JVe=Q.forwardRef((e,t)=>{const{prefixCls:r,children:n,actions:i,extra:o,styles:s,className:a,classNames:l,colStyle:c,...u}=e,{grid:d,itemLayout:h}=y.useContext(z3),{getPrefixCls:p,list:f}=y.useContext(or),g=E=>{var M,D;return ee((D=(M=f==null?void 0:f.item)==null?void 0:M.classNames)==null?void 0:D[E],l==null?void 0:l[E])},m=E=>{var M,D;return{...(D=(M=f==null?void 0:f.item)==null?void 0:M.styles)==null?void 0:D[E],...s==null?void 0:s[E]}},v=()=>{const E=Di(n);return E.some(D=>typeof D=="string")&&E.length>1},b=()=>h==="vertical"?!!o:!v(),S=p("list",r),x=i&&i.length>0&&Q.createElement("ul",{className:ee(`${S}-item-action`,g("actions")),key:"actions",style:m("actions")},i.map((E,M)=>Q.createElement("li",{key:`${S}-item-action-${M}`},E,M!==i.length-1&&Q.createElement("em",{className:`${S}-item-action-split`})))),T=d?"div":"li",R=Q.createElement(T,{...u,...d?{}:{ref:t},className:ee(`${S}-item`,{[`${S}-item-no-flex`]:!b()},a)},h==="vertical"&&o?[Q.createElement("div",{className:`${S}-item-main`,key:"content"},n,x),Q.createElement("div",{className:ee(`${S}-item-extra`,g("extra")),key:"extra",style:m("extra")},o)]:[n,x,Ui(o,{key:"extra"})]);return d?Q.createElement(h$e,{ref:t,flex:1,style:c},R):R}),wue=JVe;wue.Meta=ZVe;const QVe=e=>{const{listBorderedCls:t,componentCls:r,paddingLG:n,margin:i,itemPaddingSM:o,itemPaddingLG:s,marginLG:a,borderRadiusLG:l}=e,c=ae(e.calc(l).sub(e.lineWidth).equal());return{[t]:{border:`${ae(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:l,[`${r}-header`]:{borderRadius:`${c} ${c} 0 0`},[`${r}-footer`]:{borderRadius:`0 0 ${c} ${c}`},[`${r}-header,${r}-footer,${r}-item`]:{paddingInline:n},[`${r}-pagination`]:{margin:`${ae(i)} ${ae(a)}`}},[`${t}${r}-sm`]:{[`${r}-item,${r}-header,${r}-footer`]:{padding:o}},[`${t}${r}-lg`]:{[`${r}-item,${r}-header,${r}-footer`]:{padding:s}}}},eze=e=>{const{componentCls:t,screenSM:r,screenMD:n,marginLG:i,marginSM:o,margin:s}=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 ${ae(s)}`}}}}}},tze=e=>{const{componentCls:t,antCls:r,controlHeight:n,minHeight:i,paddingSM:o,marginLG:s,padding:a,itemPadding:l,colorPrimary:c,itemPaddingSM:u,itemPaddingLG:d,paddingXS:h,margin:p,colorText:f,colorTextDescription:g,motionDurationSlow:m,lineWidth:v,headerBg:b,footerBg:S,emptyTextPadding:x,metaMarginBottom:T,avatarMarginRight:R,titleMarginBottom:E,descriptionFontSize:M}=e;return{[t]:{...cn(e),position:"relative","--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:"none"},[`${t}-header`]:{background:b},[`${t}-footer`]:{background:S},[`${t}-header, ${t}-footer`]:{paddingBlock:o},[`${t}-pagination`]:{marginBlockStart:s,[`${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:l,color:f,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:R},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:f},[`${t}-item-meta-title`]:{margin:`0 0 ${ae(e.marginXXS)} 0`,color:f,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:f,transition:`all ${m}`,"&:hover":{color:c}}},[`${t}-item-meta-description`]:{color:g,fontSize:M,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 ${ae(h)}`,color:g,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:v,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${ae(a)} 0`,color:g,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:x,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:p,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:s},[`${t}-item-meta`]:{marginBlockEnd:T,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:E,color:f,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:a,marginInlineStart:"auto","> li":{padding:`0 ${ae(a)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${ae(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${ae(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${ae(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:`${ae(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:d},[`${t}-sm ${t}-item`]:{padding:u},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}},rze=e=>({contentWidth:220,itemPadding:`${ae(e.paddingContentVertical)} 0`,itemPaddingSM:`${ae(e.paddingContentVerticalSM)} ${ae(e.paddingContentHorizontal)}`,itemPaddingLG:`${ae(e.paddingContentVerticalLG)} ${ae(e.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}),nze=Yr("List",e=>{const t=Wr(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[tze(t),QVe(t),eze(t)]},rze,{extraCssVarPrefixCls:({prefixCls:e})=>[`${e}-container`]}),ize=(e,t)=>{const{pagination:r=!1,prefixCls:n,bordered:i=!1,split:o=!0,className:s,rootClassName:a,style:l,children:c,itemLayout:u,loadMore:d,grid:h,dataSource:p=[],size:f,header:g,footer:m,loading:v=!1,rowKey:b,renderItem:S,locale:x,...T}=e,R=r&&typeof r=="object"?r:{},[E,M]=y.useState(R.defaultCurrent||1),[D,A]=y.useState(R.defaultPageSize||10),{getPrefixCls:I,direction:_,className:F,style:O}=Ur("list"),{renderEmpty:k}=y.useContext(or),B={current:1,total:0,position:"bottom"},H=Me=>(He,Ge)=>{var Ct;M(He),A(Ge),r&&((Ct=r==null?void 0:r[Me])==null||Ct.call(r,He,Ge))},N=H("onChange"),z=H("onShowSizeChange"),U=(Me,He)=>{if(!S)return null;let Ge;return typeof b=="function"?Ge=b(Me):b?Ge=Me[b]:Ge=Me.key,Ge||(Ge=`list-item-${He}`),y.createElement(y.Fragment,{key:Ge},S(Me,He))},V=!!(d||r||m),G=I("list",n),[K,q]=nze(G);let Y=v;typeof Y=="boolean"&&(Y={spinning:Y});const X=!!(Y!=null&&Y.spinning),le=Li(f);let re="";switch(le){case"large":re="lg";break;case"small":re="sm";break}const ne=ee(G,{[`${G}-vertical`]:u==="vertical",[`${G}-${re}`]:re,[`${G}-split`]:o,[`${G}-bordered`]:i,[`${G}-loading`]:X,[`${G}-grid`]:!!h,[`${G}-something-after-last-item`]:V,[`${G}-rtl`]:_==="rtl"},F,s,a,K,q),se=`${G}-container`,de=g0(B,{total:p.length,current:E,pageSize:D},r||{}),te=Math.ceil(de.total/de.pageSize);de.current=Math.min(de.current,te);const ie=r&&y.createElement("div",{className:ee(`${G}-pagination`)},y.createElement(yue,{align:"end",...de,onChange:N,onShowSizeChange:z}));let pe=Nr(p);r&&p.length>(de.current-1)*de.pageSize&&(pe=Nr(p).splice((de.current-1)*de.pageSize,de.pageSize));const Z=Object.keys(h||{}).some(Me=>ru.includes(Me)),ue=kx(Z),ve=y.useMemo(()=>{for(let Me=0;Me{if(!h)return;const Me=ve&&h[ve]?h[ve]:h.column;if(Me)return{width:`${100/Me}%`,maxWidth:`${100/Me}%`}},[JSON.stringify(h),ve]);let me=X&&y.createElement("div",{style:{minHeight:53}});if(pe.length>0){const Me=pe.map(U);me=h?y.createElement(f$e,{className:ee(se,q),gutter:h.gutter},y.Children.map(Me,He=>y.createElement("div",{key:He==null?void 0:He.key,style:he},He))):y.createElement("ul",{className:ee(`${G}-items`,se,q)},Me)}else!c&&!X&&(me=y.createElement("div",{className:`${G}-empty-text`},(x==null?void 0:x.emptyText)||(k==null?void 0:k("List"))||y.createElement(v3,{componentName:"List"})));const Oe=de.position,Pe=y.useMemo(()=>({grid:h,itemLayout:u}),[JSON.stringify(h),u]);return y.createElement(z3.Provider,{value:Pe},y.createElement("div",{ref:t,style:{...O,...l},className:ne,...T},(Oe==="top"||Oe==="both")&&ie,g&&y.createElement("div",{className:`${G}-header`},g),y.createElement(V3,{...Y},me,c),m&&y.createElement("div",{className:`${G}-footer`},m),d||(Oe==="bottom"||Oe==="both")&&ie))},oze=y.forwardRef(ize),sze=oze;sze.Item=wue;const xue=(e,t={})=>!xn(e)&&(t!=null&&t.skipEmpty)?[]:Array.isArray(e)?e:[e],aze=e=>{const{prefixCls:t,className:r,closeIcon:n,closable:i,type:o,title:s,children:a,footer:l,classNames:c,styles:u,...d}=e,{getPrefixCls:h}=y.useContext(or),{className:p,style:f,classNames:g,styles:m}=Ur("modal"),v=h(),b=t||h("modal"),S=co(v),[x,T]=ale(b,S),[R,E]=jr([g,c],[m,u],{props:e}),M=`${b}-confirm`;let D={};return o?D={closable:i??!1,title:"",footer:"",children:y.createElement(cle,{...e,prefixCls:b,confirmPrefixCls:M,rootPrefixCls:v,content:a})}:D={closable:i??!0,title:s,footer:l!==null&&y.createElement(nle,{...e}),children:a},y.createElement(jae,{prefixCls:b,className:ee(x,`${b}-pure-panel`,o&&M,o&&`${M}-${o}`,r,p,T,S,R.root),style:{...f,...E.root},...d,closeIcon:rle(b,n),closable:i,classNames:R,styles:E,...D})},lze=yle(aze);function Tue(e){return Fx(ple(e))}const Ru=lle;Ru.useModal=COe;Ru.info=function(t){return Fx(fle(t))};Ru.success=function(t){return Fx(gle(t))};Ru.error=function(t){return Fx(mle(t))};Ru.warning=Tue;Ru.warn=Tue;Ru.confirm=function(t){return Fx(vle(t))};Ru.destroyAll=function(){for(;gg.length;){const t=gg.pop();t&&t()}};Ru.config=mOe;Ru._InternalPanelDoNotUseOrYouWillBeFired=lze;const cze=e=>{const{componentCls:t,iconCls:r,antCls:n,zIndexPopup:i,colorText:o,colorWarning:s,marginXXS:a,marginXS:l,fontSize:c,fontWeightStrong:u,colorTextHeading:d}=e;return{[t]:{zIndex:i,[`&${n}-popover`]:{fontSize:c},[`${t}-message`]:{marginBottom:l,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${r}`]:{color:s,fontSize:c,lineHeight:1,marginInlineEnd:l},[`${t}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:a,color:o}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:l}}}}},uze=e=>{const{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},Eue=Yr("Popconfirm",cze,uze,{resetStyle:!1}),Rue=e=>{const{prefixCls:t,okButtonProps:r,cancelButtonProps:n,title:i,description:o,cancelText:s,okText:a,okType:l="primary",icon:c=y.createElement(RD,null),showCancel:u=!0,close:d,onConfirm:h,onCancel:p,onPopupClick:f,classNames:g,styles:m}=e,{getPrefixCls:v}=y.useContext(or),[b]=Cc("Popconfirm",dc.Popconfirm),S=ky(i),x=ky(o);return y.createElement("div",{className:`${t}-inner-content`,onClick:f},y.createElement("div",{className:`${t}-message`},c&&y.createElement("span",{className:`${t}-message-icon`},c),y.createElement("div",{className:`${t}-message-text`},S&&y.createElement("div",{className:ee(`${t}-title`,g==null?void 0:g.title),style:m==null?void 0:m.title},S),x&&y.createElement("div",{className:ee(`${t}-description`,g==null?void 0:g.content),style:m==null?void 0:m.content},x))),y.createElement("div",{className:`${t}-buttons`},u&&y.createElement(Cl,{onClick:p,size:"small",...n},s||(b==null?void 0:b.cancelText)),y.createElement(o3,{buttonProps:{size:"small",...JH(l),...r},actionFn:h,close:d,prefixCls:v("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},a||(b==null?void 0:b.okText))))},dze=e=>{const{prefixCls:t,placement:r,className:n,style:i,...o}=e,{getPrefixCls:s}=y.useContext(or),a=s("popconfirm",t);return Eue(a),y.createElement(Ule,{placement:r,className:ee(a,n),style:i,content:y.createElement(Rue,{prefixCls:a,...o})})},hze=y.forwardRef((e,t)=>{const{prefixCls:r,placement:n="top",trigger:i,okType:o="primary",icon:s=y.createElement(RD,null),children:a,overlayClassName:l,onOpenChange:c,overlayStyle:u,styles:d,arrow:h,classNames:p,...f}=e,{getPrefixCls:g,className:m,style:v,classNames:b,styles:S,arrow:x,trigger:T}=Ur("popconfirm"),[R,E]=Fn(e.defaultOpen??!1,e.open),M=w3(h,x),D=i||T||"click",A=U=>{E(U),c==null||c(U)},I=()=>{A(!1)},_=U=>{var V;return(V=e.onConfirm)==null?void 0:V.call(void 0,U)},F=U=>{var V;A(!1),(V=e.onCancel)==null||V.call(void 0,U)},O=U=>{const{disabled:V=!1}=e;V||A(U)},k=g("popconfirm",r),B={...e,placement:n,trigger:D,okType:o,overlayStyle:u,styles:d,classNames:p},[H,N]=jr([b,p],[S,d],{props:B}),z=ee(k,m,l,H.root);return Eue(k),y.createElement(jle,{arrow:M,...En(f,["title"]),trigger:D,placement:n,onOpenChange:O,open:R,ref:t,classNames:{root:z,container:H.container,arrow:H.arrow},styles:{root:{...v,...N.root,...u},container:N.container,arrow:N.arrow},content:y.createElement(Rue,{okType:o,icon:s,...e,prefixCls:k,close:I,onConfirm:_,onCancel:F,classNames:H,styles:N}),"data-popover-inject":!0},a)}),pze=hze;pze._InternalPanelDoNotUseOrYouWillBeFired=dze;var fze={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"};function L$(){return L$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,L$({},e,{ref:t,icon:fze})),eNt=y.forwardRef(gze);function _$(){return _$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const[g,m]=Fn(n??!1,r);function v(T,R){let E=g;return i||(E=T,m(E),c==null||c(E,R)),E}function b(T){T.which===Xt.LEFT?v(!1,T):T.which===Xt.RIGHT&&v(!0,T),u==null||u(T)}function S(T){const R=v(!g,T);l==null||l(R,T)}const x=ee(e,t,{[`${e}-checked`]:g,[`${e}-disabled`]:i});return y.createElement("button",_$({},p,{type:"button",role:"switch","aria-checked":g,disabled:i,className:x,ref:f,onKeyDown:b,onClick:S}),o,y.createElement("span",{className:`${e}-inner`},y.createElement("span",{className:ee(`${e}-inner-checked`,h==null?void 0:h.content),style:d==null?void 0:d.content},s),y.createElement("span",{className:ee(`${e}-inner-unchecked`,h==null?void 0:h.content),style:d==null?void 0:d.content},a)))});Pue.displayName="Switch";const mze=e=>{const{componentCls:t,trackHeightSM:r,trackPadding:n,trackMinWidthSM:i,innerMinMarginSM:o,innerMaxMarginSM:s,handleSizeSM:a,calc:l}=e,c=`${t}-inner`,u=ae(l(a).add(l(n).mul(2)).equal()),d=ae(l(s).mul(2).equal());return{[t]:{[`&${t}-small`]:{minWidth:i,height:r,lineHeight:ae(r),[`${t}-inner`]:{paddingInlineStart:s,paddingInlineEnd:o,[`${c}-checked, ${c}-unchecked`]:{minHeight:r},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${c}-unchecked`]:{marginTop:l(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${t}-handle`]:{width:a,height:a},[`${t}-loading-icon`]:{top:l(l(a).sub(e.switchLoadingIconSize)).div(2).equal(),fontSize:e.switchLoadingIconSize},[`&${t}-checked`]:{[`${t}-inner`]:{paddingInlineStart:o,paddingInlineEnd:s,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`${t}-handle`]:{insetInlineStart:`calc(100% - ${ae(l(a).add(n).equal())})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:l(e.marginXXS).div(2).equal(),marginInlineEnd:l(e.marginXXS).mul(-1).div(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:l(e.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:l(e.marginXXS).div(2).equal()}}}}}}},vze=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}}}},yze=e=>{const{componentCls:t,trackPadding:r,handleBg:n,handleShadow:i,handleSize:o,calc:s}=e,a=`${t}-handle`;return{[t]:{[a]:{position:"absolute",top:r,insetInlineStart:r,width:o,height:o,transition:`all ${e.switchDuration} ease-in-out`,...md(),"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:s(o).div(2).equal(),boxShadow:i,transition:`all ${e.switchDuration} ease-in-out`,content:'""',...md()}},[`&${t}-checked ${a}`]:{insetInlineStart:`calc(100% - ${ae(s(o).add(r).equal())})`},[`&:not(${t}-disabled):active`]:{[`${a}::before`]:{insetInlineEnd:e.switchHandleActiveInset,insetInlineStart:0},[`&${t}-checked ${a}::before`]:{insetInlineEnd:0,insetInlineStart:e.switchHandleActiveInset}}}}},Cze=e=>{const{componentCls:t,trackHeight:r,trackPadding:n,innerMinMargin:i,innerMaxMargin:o,handleSize:s,switchDuration:a,calc:l}=e,c=`${t}-inner`,u=ae(l(s).add(l(n).mul(2)).equal()),d=ae(l(o).mul(2).equal());return{[t]:{[c]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:o,paddingInlineEnd:i,transition:["padding-inline-start","padding-inline-end"].map(h=>`${h} ${a} ease-in-out`).join(", "),...md(),[`${c}-checked, ${c}-unchecked`]:{display:"block",color:e.colorTextLightSolid,fontSize:e.fontSizeSM,pointerEvents:"none",minHeight:r,transition:["margin-inline-start","margin-inline-end"].map(h=>`${h} ${a} ease-in-out`).join(", "),...md()},[`${c}-checked`]:{marginInlineStart:`calc(-100% + ${u} - ${d})`,marginInlineEnd:`calc(100% - ${u} + ${d})`},[`${c}-unchecked`]:{marginTop:l(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${t}-checked ${c}`]:{paddingInlineStart:i,paddingInlineEnd:o,[`${c}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${c}-unchecked`]:{marginInlineStart:`calc(100% - ${u} + ${d})`,marginInlineEnd:`calc(-100% + ${u} - ${d})`}},[`&:not(${t}-disabled):active`]:{[`&:not(${t}-checked) ${c}`]:{[`${c}-unchecked`]:{marginInlineStart:l(n).mul(2).equal(),marginInlineEnd:l(n).mul(-1).mul(2).equal()}},[`&${t}-checked ${c}`]:{[`${c}-checked`]:{marginInlineStart:l(n).mul(-1).mul(2).equal(),marginInlineEnd:l(n).mul(2).equal()}}}}}},bze=e=>{const{componentCls:t,trackHeight:r,trackMinWidth:n}=e;return{[t]:{...cn(e),position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:r,lineHeight:ae(r),verticalAlign:"middle",background:e.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${e.motionDurationMid}`,userSelect:"none",...md(),[`&:hover:not(${t}-disabled)`]:{background:e.colorTextTertiary},...yl(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"}}}},Sze=e=>{const{fontSize:t,lineHeight:r,controlHeight:n,colorWhite:i}=e,o=t*r,s=n/2,a=2,l=o-a*2,c=s-a*2;return{trackHeight:o,trackHeightSM:s,trackMinWidth:l*2+a*4,trackMinWidthSM:c*2+a*2,trackPadding:a,handleBg:i,handleSize:l,handleSizeSM:c,handleShadow:`0 2px 4px 0 ${new an("#00230b").setA(.2).toRgbString()}`,innerMinMargin:l/2,innerMaxMargin:l+a+a*2,innerMinMarginSM:c/2,innerMaxMarginSM:c+a+a*2}},wze=Yr("Switch",e=>{const t=Wr(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[bze(t),Cze(t),yze(t),vze(t),mze(t)]},Sze),xze=y.forwardRef((e,t)=>{const{prefixCls:r,size:n,disabled:i,loading:o,className:s,rootClassName:a,style:l,checked:c,value:u,defaultChecked:d,defaultValue:h,onChange:p,styles:f,classNames:g,...m}=e,[v,b]=Fn(d??h??!1,c??u),{getPrefixCls:S,direction:x,className:T,style:R,classNames:E,styles:M}=Ur("switch"),D=y.useContext(Rs),A=(i??D)||o,I=S("switch",r),[_,F]=wze(I),O=Li(n),k={...e,size:O,disabled:A},[B,H]=jr([E,g],[M,f],{props:k}),N=y.createElement("div",{className:ee(`${I}-handle`,B.indicator),style:H.indicator},o&&y.createElement(Tx,{className:`${I}-loading-icon`})),z=ee(T,{[`${I}-small`]:O==="small",[`${I}-loading`]:o,[`${I}-rtl`]:x==="rtl"},s,a,B.root,_,F),U={...H.root,...R,...l},V=(...G)=>{b(G[0]),p==null||p(...G)};return y.createElement(Ex,{component:"Switch",disabled:A},y.createElement(Pue,{...m,classNames:B,styles:H,checked:v,onChange:V,prefixCls:I,className:z,style:U,disabled:A,ref:t,loadingIcon:N}))}),Tze=xze;Tze.__ANT_SWITCH=!0;const Oh={},Wx="rc-table-internal-hook";function H3(e){const t=y.createContext(void 0);return{Context:t,Provider:({value:n,children:i})=>{const o=y.useRef(n);o.current=n;const[s]=y.useState(()=>({getValue:()=>o.current,listeners:new Set}));return zr(()=>{ac.unstable_batchedUpdates(()=>{s.listeners.forEach(a=>{a(n)})})},[n]),y.createElement(t.Provider,{value:s},i)},defaultValue:e}}function so(e,t){const r=br(typeof t=="function"?t:l=>{if(t===void 0)return l;if(!Array.isArray(t))return l[t];const c={};return t.forEach(u=>{c[u]=l[u]}),c}),n=y.useContext(e==null?void 0:e.Context),{listeners:i,getValue:o}=n||{},s=y.useRef();s.current=r(n?o():e==null?void 0:e.defaultValue);const[,a]=y.useState({});return zr(()=>{if(!n)return;function l(c){const u=r(c);cc(s.current,u,!0)||a({})}return i.add(l),()=>{i.delete(l)}},[n]),s.current}function Tw(){return Tw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const u=s?{ref:c}:{},d=y.useRef(0),h=y.useRef(l);return t()!==null?y.createElement(i,Tw({},l,u)):((!o||o(h.current,l))&&(d.current+=1),h.current=l,y.createElement(e.Provider,{value:d.current},y.createElement(i,Tw({},l,u))))};return s?y.forwardRef(a):a}function n(i,o){const s=cu(i),a=(l,c)=>{const u=s?{ref:c}:{};return t(),y.createElement(i,Tw({},l,u))};return y.memo(s?y.forwardRef(a):a,o)}return{makeImmutable:r,responseImmutable:n,useImmutableMark:t}}const{makeImmutable:Mue,responseImmutable:MC,useImmutableMark:Rze}=Eze(),No=H3(),Iue=y.createContext({renderWithProps:!1}),Pze="RC_TABLE_KEY";function Mze(e){return e==null?[]:Array.isArray(e)?e:[e]}function WD(e){const t=[],r={};return e.forEach(n=>{const{key:i,dataIndex:o}=n||{};let s=i||Mze(o).join("-")||Pze;for(;r[s];)s=`${s}_next`;r[s]=!0,t.push(s)}),t}function O$(e){return e!=null}function Ize(e){return typeof e=="number"&&!Number.isNaN(e)}function Dze(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!y.isValidElement(e)}function Aze(e,t,r,n,i,o){const s=y.useContext(Iue),a=Rze();return bm(()=>{if(O$(n))return[n];const c=t==null||t===""?[]:Array.isArray(t)?t:[t],u=qs(e,c);let d=u,h;if(i){const p=i(u,e,r);Dze(p)?(d=p.children,h=p.props,s.renderWithProps=!0):d=p}return[d,h]},[a,e,n,t,i,r],(c,u)=>{if(o){const[,d]=c,[,h]=u;return o(h,d)}return s.renderWithProps?!0:!cc(c,u,!0)})}function Fze(e,t,r,n){const i=e+t-1;return e<=n&&i>=r}function Lze(e,t){return so(No,r=>[Fze(e,t||1,r.hoverStartRow,r.hoverEndRow),r.onHover])}function k$(){return k$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var o,s;let n;const i=e===!0?{showTitle:!0}:e;return i&&(i.showTitle||t==="header")&&(typeof r=="string"||typeof r=="number"?n=r.toString():y.isValidElement(r)&&typeof((o=r.props)==null?void 0:o.children)=="string"&&(n=(s=r.props)==null?void 0:s.children)),n},Oze=e=>{const{component:t,children:r,ellipsis:n,scope:i,prefixCls:o,className:s,style:a,align:l,record:c,render:u,dataIndex:d,renderIndex:h,shouldCellUpdate:p,index:f,rowType:g,colSpan:m,rowSpan:v,fixStart:b,fixEnd:S,fixedStartShadow:x,fixedEndShadow:T,offsetFixedStartShadow:R,offsetFixedEndShadow:E,zIndex:M,zIndexReverse:D,appendNode:A,additionalProps:I={},isSticky:_}=e,F=`${o}-cell`,{allColumnsFixedLeft:O,rowHoverable:k}=so(No,["allColumnsFixedLeft","rowHoverable"]),[B,H]=Aze(c,d,h,r,u,p),N={},z=typeof b=="number"&&!O,U=typeof S=="number"&&!O,[V,G]=so(No,({scrollInfo:pe})=>{if(!z&&!U)return[!1,!1];const[Z,ue]=pe,ve=(z&&x&&Z)-R>=1,he=(U&&T&&ue-Z)-E>1;return[ve,he]});z&&(N.insetInlineStart=b,N["--z-offset"]=M,N["--z-offset-reverse"]=D),U&&(N.insetInlineEnd=S,N["--z-offset"]=M,N["--z-offset-reverse"]=D);const K=(H==null?void 0:H.colSpan)??I.colSpan??m??1,q=(H==null?void 0:H.rowSpan)??I.rowSpan??v??1,[Y,X]=Lze(f,q),le=br(pe=>{var Z;c&&X(f,f+q-1),(Z=I==null?void 0:I.onMouseEnter)==null||Z.call(I,pe)}),re=br(pe=>{var Z;c&&X(-1,-1),(Z=I==null?void 0:I.onMouseLeave)==null||Z.call(I,pe)});if(K===0||q===0)return null;const ne=I.title??_ze({rowType:g,ellipsis:n,children:B}),se=ee(F,s,{[`${F}-fix`]:z||U,[`${F}-fix-start`]:z,[`${F}-fix-end`]:U,[`${F}-fix-start-shadow`]:x,[`${F}-fix-start-shadow-show`]:x&&V,[`${F}-fix-end-shadow`]:T,[`${F}-fix-end-shadow-show`]:T&&G,[`${F}-ellipsis`]:n,[`${F}-with-append`]:A,[`${F}-fix-sticky`]:(z||U)&&_,[`${F}-row-hover`]:!H&&Y},I.className,H==null?void 0:H.className),de={};l&&(de.textAlign=l);const te={...H==null?void 0:H.style,...N,...de,...I.style,...a};let ie=B;return typeof ie=="object"&&!Array.isArray(ie)&&!y.isValidElement(ie)&&(ie=null),n&&(x||T)&&(ie=y.createElement("span",{className:`${F}-content`},ie)),y.createElement(t,k$({},H,I,{className:se,style:te,title:ne,scope:i,onMouseEnter:k?le:void 0,onMouseLeave:k?re:void 0,colSpan:K!==1?K:null,rowSpan:q!==1?q:null}),A,ie)},IC=y.memo(Oze);function eE(e){return e.fixed==="start"}function tE(e){return e.fixed==="end"}function W3(e,t,r,n){const i=r[e]||{},o=r[t]||{};let s=null,a=null;eE(i)&&eE(o)?s=n.start[e]:tE(o)&&tE(i)&&(a=n.end[t]);let l=!1,c=!1,u=0,d=0;s!==null&&(l=!r[t+1]||!eE(r[t+1]),u=r.length*2-e,d=r.length+e),a!==null&&(c=!r[e-1]||!tE(r[e-1]),u=t,d=r.length-t);let h=0,p=0;if(l)for(let f=0;ft;f-=1)tE(r[f])||(p+=n.widths[f]||0);return{fixStart:s,fixEnd:a,fixedStartShadow:l,fixedEndShadow:c,offsetFixedStartShadow:h,offsetFixedEndShadow:p,isSticky:n.isSticky,zIndex:u,zIndexReverse:d}}const Due=y.createContext({});function N$(){return N$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:t,index:r,children:n,colSpan:i=1,rowSpan:o,align:s}=e,{prefixCls:a}=so(No,["prefixCls"]),{scrollColumnIndex:l,stickyOffsets:c,flattenColumns:u}=y.useContext(Due),h=r+i-1+1===l?i+1:i,p=y.useMemo(()=>W3(r,r+h-1,u,c),[r,h,u,c]);return y.createElement(IC,N$({className:t,index:r,component:"td",prefixCls:a,record:null,dataIndex:null,align:s,colSpan:h,rowSpan:o,render:()=>n},p))},Nze=e=>{const{children:t,...r}=e;return y.createElement("tr",r,t)},UD=e=>{const{children:t}=e;return t};UD.Row=Nze;UD.Cell=kze;const Bze=e=>{const{children:t,stickyOffsets:r,flattenColumns:n}=e,i=so(No,"prefixCls"),o=n.length-1,s=n[o],a=y.useMemo(()=>({stickyOffsets:r,flattenColumns:n,scrollColumnIndex:s!=null&&s.scrollbar?o:null}),[s,n,o,r]);return y.createElement(Due.Provider,{value:a},y.createElement("tfoot",{className:`${i}-summary`},t))},rE=MC(Bze),Aue=UD;function $ze(e){return null}function Gze(e){return null}function Fue(e,t,r,n,i,o,s){const a=o(t,s);e.push({record:t,indent:r,index:s,rowKey:a});const l=i==null?void 0:i.has(a);if(t&&Array.isArray(t[n])&&l)for(let c=0;c{if(r!=null&&r.size){const o=[];for(let s=0;s<(e==null?void 0:e.length);s+=1){const a=e[s];Fue(o,a,0,t,r,n,s)}return o}return e==null?void 0:e.map((o,s)=>({record:o,indent:0,index:s,rowKey:n(o,s)}))},[e,t,r,n])}function _ue(e,t,r,n){const i=so(No,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),{flattenColumns:o,expandableType:s,expandedKeys:a,childrenColumnName:l,onTriggerExpand:c,rowExpandable:u,onRow:d,expandRowByClick:h,rowClassName:p}=i,f=s==="nest",g=s==="row"&&(!u||u(e)),m=g||f,v=a&&a.has(t),b=l&&e&&e[l],S=br(c),x=d==null?void 0:d(e,r),T=x==null?void 0:x.onClick,R=(D,...A)=>{h&&m&&c(e,D),T==null||T(D,...A)};let E;typeof p=="string"?E=p:typeof p=="function"&&(E=p(e,r,n));const M=WD(o);return{...i,columnsKey:M,nestExpandable:f,expanded:v,hasNestChildren:b,record:e,onTriggerExpand:S,rowSupportExpand:g,expandable:m,rowProps:{...x,className:ee(E,x==null?void 0:x.className),onClick:R}}}const Oue=e=>{const{prefixCls:t,children:r,component:n,cellComponent:i,className:o,expanded:s,colSpan:a,isEmpty:l,stickyOffset:c=0}=e,{scrollbarSize:u,fixHeader:d,fixColumn:h,componentWidth:p,horizonScroll:f}=so(No,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]);let g=r;return(l?f&&p:h)&&(g=y.createElement("div",{style:{width:p-c-(d&&!l?u:0),position:"sticky",left:c,overflow:"hidden"},className:`${t}-expanded-row-fixed`},g)),y.createElement(n,{className:o,style:{display:s?null:"none"}},y.createElement(IC,{component:i,prefixCls:t,colSpan:a},g))};function Vze({prefixCls:e,record:t,onExpand:r,expanded:n,expandable:i}){const o=`${e}-row-expand-icon`;if(!i)return y.createElement("span",{className:ee(o,`${e}-row-spaced`)});const s=a=>{r(t,a),a.stopPropagation()};return y.createElement("span",{className:ee(o,{[`${e}-row-expanded`]:n,[`${e}-row-collapsed`]:!n}),onClick:s})}function zze(e,t,r){const n=[];function i(o){(o||[]).forEach((s,a)=>{n.push(t(s,a)),i(s[r])})}return i(e),n}function kue(e,t,r,n){return typeof e=="string"?e:typeof e=="function"?e(t,r,n):""}function vM(){return vM=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:t,style:r,classNames:n,styles:i,record:o,index:s,renderIndex:a,rowKey:l,rowKeys:c,indent:u=0,rowComponent:d,cellComponent:h,scopeCellComponent:p,expandedRowInfo:f}=e,g=_ue(o,l,s,u),{prefixCls:m,flattenColumns:v,expandedRowClassName:b,expandedRowRender:S,rowProps:x,expanded:T,rowSupportExpand:R}=g,E=y.useRef(!1);E.current||(E.current=T);const M=kue(b,o,s,u),D=y.createElement(d,vM({},x,{"data-row-key":l,className:ee(t,`${m}-row`,`${m}-row-level-${u}`,x==null?void 0:x.className,n.row,{[M]:u>=1}),style:{...r,...x==null?void 0:x.style,...i.row}}),v.map((I,_)=>{const{render:F,dataIndex:O,className:k}=I,{key:B,fixedInfo:H,appendCellNode:N,additionalCellProps:z}=Nue(g,I,_,u,s,c,f==null?void 0:f.offset);return y.createElement(IC,vM({className:ee(k,n.cell),style:i.cell,ellipsis:I.ellipsis,align:I.align,scope:I.rowScope,component:I.rowScope?p:h,prefixCls:m,key:B,record:o,index:s,renderIndex:a,dataIndex:O,render:F,shouldCellUpdate:I.shouldCellUpdate},H,{appendNode:N,additionalProps:z}))}));let A;if(R&&(E.current||T)){const I=S(o,s,u+1,T);A=y.createElement(Oue,{expanded:T,className:ee(`${m}-expanded-row`,`${m}-expanded-row-level-${u+1}`,M),prefixCls:m,component:d,cellComponent:h,colSpan:f?f.colSpan:v.length,isEmpty:!1,stickyOffset:f==null?void 0:f.sticky},I)}return y.createElement(y.Fragment,null,D,A)},Wze=MC(Hze),Uze=e=>{const{columnKey:t,onColumnResize:r,title:n}=e,i=y.useRef(null);return zr(()=>{i.current&&r(t,i.current.offsetWidth)},[]),y.createElement(Js,{data:t},y.createElement("td",{ref:i,style:{paddingTop:0,paddingBottom:0,borderTop:0,borderBottom:0,height:0}},y.createElement("div",{style:{height:0,overflow:"hidden",fontWeight:"bold"}},n||" ")))},jze=({prefixCls:e,columnsKey:t,onColumnResize:r,columns:n})=>{const i=y.useRef(null),{measureRowRender:o}=so(No,["measureRowRender"]),s=y.createElement("tr",{"aria-hidden":"true",className:`${e}-measure-row`,style:{height:0},ref:i},y.createElement(Js.Collection,{onBatchResize:a=>{PD(i.current)&&a.forEach(({data:l,size:c})=>{r(l,c.offsetWidth)})}},t.map(a=>{const l=n.find(d=>d.key===a),c=l==null?void 0:l.title,u=y.isValidElement(c)?y.cloneElement(c,{ref:null}):c;return y.createElement(Uze,{key:a,columnKey:a,onColumnResize:r,title:u})})));return typeof o=="function"?o(s):s},Kze=e=>{const{data:t,measureColumnWidth:r}=e,{prefixCls:n,getComponent:i,onColumnResize:o,flattenColumns:s,getRowKey:a,expandedKeys:l,childrenColumnName:c,emptyNode:u,classNames:d,styles:h,expandedRowOffset:p=0,colWidths:f}=so(No,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","classNames","styles","expandedRowOffset","fixedInfoList","colWidths"]),{body:g={}}=d||{},{body:m={}}=h||{},v=Lue(t,c,l,a),b=y.useMemo(()=>v.map(I=>I.rowKey),[v]),S=y.useRef({renderWithProps:!1}),x=y.useMemo(()=>{const I=s.length-p;let _=0;for(let F=0;F{const{record:F,indent:O,index:k,rowKey:B}=I;return y.createElement(Wze,{classNames:g,styles:m,key:B,rowKey:B,rowKeys:b,record:F,index:_,renderIndex:k,rowComponent:R,cellComponent:E,scopeCellComponent:M,indent:O,expandedRowInfo:x})}):D=y.createElement(Oue,{expanded:!0,className:`${n}-placeholder`,prefixCls:n,component:R,cellComponent:E,colSpan:s.length,isEmpty:!0},u);const A=WD(s);return y.createElement(Iue.Provider,{value:S.current},y.createElement(T,{style:m.wrapper,className:ee(`${n}-tbody`,g.wrapper)},r&&y.createElement(jze,{prefixCls:n,columnsKey:A,onColumnResize:o,columns:s}),D))},qze=MC(Kze),Ew="RC_TABLE_INTERNAL_COL_DEFINE";function Yze(e){const{expandable:t,...r}=e;let n;return"expandable"in e?n={...r,...t}:n=r,n.showExpandColumn===!1&&(n.expandIconColumnIndex=-1),n}function B$(){return B$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{colWidths:t,columns:r,columCount:n}=e,{tableLayout:i}=so(No,["tableLayout"]),o=[],s=n||r.length;let a=!1;for(let l=s-1;l>=0;l-=1){const c=t[l],u=r&&r[l];let d,h;if(u&&(d=u[Ew],i==="auto"&&(h=u.minWidth)),c||h||d||a){const{columnType:p,...f}=d||{};o.unshift(y.createElement("col",B$({key:l,style:{width:c,minWidth:h}},f))),a=!0}}return o.length>0?y.createElement("colgroup",null,o):null};function Xze(e,t){return y.useMemo(()=>{const r=[];for(let n=0;n{const{className:r,style:n,noData:i,columns:o,flattenColumns:s,colWidths:a,colGroup:l,columCount:c,stickyOffsets:u,direction:d,fixHeader:h,stickyTopOffset:p,stickyBottomOffset:f,stickyClassName:g,scrollX:m,tableLayout:v="fixed",onScroll:b,maxContentScroll:S,children:x,...T}=e,{prefixCls:R,scrollbarSize:E,isSticky:M,getComponent:D}=so(No,["prefixCls","scrollbarSize","isSticky","getComponent"]),A=D(["header","table"],"table"),I=M&&!h?0:E,_=y.useRef(null),F=y.useCallback(V=>{O2(t,V),O2(_,V)},[]);y.useEffect(()=>{function V(K){const{currentTarget:q,deltaX:Y}=K;if(Y){const{scrollLeft:X,scrollWidth:le,clientWidth:re}=q,ne=le-re;let se=X+Y;d==="rtl"?(se=Math.max(-ne,se),se=Math.min(0,se)):(se=Math.min(ne,se),se=Math.max(0,se)),b({currentTarget:q,scrollLeft:se}),K.preventDefault()}}const G=_.current;return G==null||G.addEventListener("wheel",V,{passive:!1}),()=>{G==null||G.removeEventListener("wheel",V)}},[]);const O=s[s.length-1],k={fixed:O?O.fixed:null,scrollbar:!0,onHeaderCell:()=>({className:`${R}-cell-scrollbar`})},B=y.useMemo(()=>I?[...o,k]:o,[I,o]),H=y.useMemo(()=>I?[...s,k]:s,[I,s]),N=y.useMemo(()=>{const{start:V,end:G}=u;return{...u,start:V,end:[...G.map(K=>K+I),0],isSticky:M}},[I,u,M]),z=Xze(a,c),U=y.useMemo(()=>{const V=!z||!z.length||z.every(G=>!G);return i||V},[i,z]);return y.createElement("div",{style:{overflow:"hidden",...M?{top:p,bottom:f}:{},...n},ref:F,className:ee(r,{[g]:!!g})},y.createElement(A,{style:{tableLayout:v,minWidth:"100%",width:m}},U?l:y.createElement(Bue,{colWidths:[...z,I],columCount:c+1,columns:H}),x({...T,stickyOffsets:N,columns:B,flattenColumns:H})))}),Rq=y.memo(Zze);function yM(){return yM=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{cells:t,stickyOffsets:r,flattenColumns:n,rowComponent:i,cellComponent:o,onHeaderRow:s,index:a,classNames:l,styles:c}=e,{prefixCls:u}=so(No,["prefixCls"]);let d;s&&(d=s(t.map(p=>p.column),a));const h=WD(t.map(p=>p.column));return y.createElement(i,yM({},d,{className:l.row,style:c.row}),t.map((p,f)=>{var T;const{column:g,colStart:m,colEnd:v,colSpan:b}=p,S=W3(m,v,n,r),x=((T=g==null?void 0:g.onHeaderCell)==null?void 0:T.call(g,g))||{};return y.createElement(IC,yM({},p,{scope:g.title?b>1?"colgroup":"col":null,ellipsis:g.ellipsis,align:g.align,component:o,prefixCls:u,key:h[f]},S,{additionalProps:x,rowType:"header"}))}))};function Qze(e,t,r){const n=[];function i(s,a,l=0){n[l]=n[l]||[];let c=a;return s.filter(Boolean).map(d=>{const h={key:d.key,className:ee(d.className,t.cell)||"",style:r.cell,children:d.title,column:d,colStart:c};let p=1;const f=d.children;return f&&f.length>0&&(p=i(f,c,l+1).reduce((g,m)=>g+m,0),h.hasSubColumns=!0),"colSpan"in d&&({colSpan:p}=d),"rowSpan"in d&&(h.rowSpan=d.rowSpan),h.colSpan=p,h.colEnd=h.colStart+p-1,n[l].push(h),c+=p,p})}i(e,0);const o=n.length;for(let s=0;s{!("rowSpan"in a)&&!a.hasSubColumns&&(a.rowSpan=o-s)});return n}const eHe=e=>{const{stickyOffsets:t,columns:r,flattenColumns:n,onHeaderRow:i}=e,{prefixCls:o,getComponent:s,classNames:a,styles:l}=so(No,["prefixCls","getComponent","classNames","styles"]),{header:c={}}=a||{},{header:u={}}=l||{},d=y.useMemo(()=>Qze(r,c,u),[r,c,u]),h=s(["header","wrapper"],"thead"),p=s(["header","row"],"tr"),f=s(["header","cell"],"th");return y.createElement(h,{className:ee(`${o}-thead`,c.wrapper),style:u.wrapper},d.map((g,m)=>y.createElement(Jze,{classNames:c,styles:u,key:m,flattenColumns:n,cells:g,stickyOffsets:t,rowComponent:p,cellComponent:f,onHeaderRow:i,index:m})))},Pq=MC(eHe);function Mq(e,t=""){return typeof t=="number"?t:t.endsWith("%")?e*parseFloat(t)/100:null}function tHe(e,t,r){return y.useMemo(()=>{if(t&&t>0){let n=0,i=0;e.forEach(d=>{const h=Mq(t,d.width);h?n+=h:i+=1});const o=Math.max(t,r);let s=Math.max(o-n,i),a=i;const l=s/i;let c=0;const u=e.map(d=>{const h={...d},p=Mq(t,h.width);if(p)h.width=p;else{const f=Math.floor(l);h.width=a===1?s:f,s-=f,a-=1}return c+=h.width,h});if(c{const f=Math.floor(h.width*d);h.width=p===u.length-1?s:f,s-=f})}return[u,Math.max(c,o)]}return[e,t]},[e,t,r])}function U3(e){return Di(e).filter(t=>y.isValidElement(t)).map(t=>{const{key:r,props:n}=t,{children:i,...o}=n,s={key:r,...o};return i&&(s.children=U3(i)),s})}function $ue(e){return e.filter(t=>t&&typeof t=="object"&&!t.hidden).map(t=>{const r=t.children;return r&&r.length>0?{...t,children:$ue(r)}:t})}function Gue(e,t="key"){return e.filter(r=>r&&typeof r=="object").reduce((r,n,i)=>{const{fixed:o}=n,s=o===!0||o==="left"?"start":o==="right"?"end":o,a=`${t}-${i}`,l=n.children;return l&&l.length>0?[...r,...Gue(l,a).map(c=>({...c,fixed:c.fixed??s}))]:[...r,{key:a,...n,fixed:s}]},[])}function rHe({prefixCls:e,columns:t,children:r,expandable:n,expandedKeys:i,columnTitle:o,getRowKey:s,onTriggerExpand:a,expandIcon:l,rowExpandable:c,expandIconColumnIndex:u,expandedRowOffset:d=0,direction:h,expandRowByClick:p,columnWidth:f,fixed:g,scrollWidth:m,clientWidth:v},b){const S=y.useMemo(()=>{const D=t||U3(r)||[];return $ue(D.slice())},[t,r]),x=y.useMemo(()=>{if(n){let D=S.slice();if(!D.includes(Oh)){const O=u||0,k=O===0&&(g==="right"||g==="end")?S.length:O;k>=0&&D.splice(k,0,Oh)}const A=D.indexOf(Oh);D=D.filter((O,k)=>O!==Oh||k===A);const I=S[A];let _;g?_=g:_=I?I.fixed:null;const F={[Ew]:{className:`${e}-expand-icon-col`,columnType:"EXPAND_COLUMN"},title:o,fixed:_,className:`${e}-row-expand-icon-cell`,width:f,render:(O,k,B)=>{const H=s(k,B),N=i.has(H),z=c?c(k):!0,U=l({prefixCls:e,expanded:N,expandable:z,record:k,onExpand:a});return p?y.createElement("span",{onClick:V=>V.stopPropagation()},U):U}};return D.map((O,k)=>{const B=O===Oh?F:O;return kD!==Oh)},[n,S,s,i,l,h,d]),T=y.useMemo(()=>{let D=x;return b&&(D=b(D)),D.length||(D=[{render:()=>null}]),D},[b,x,h]),R=y.useMemo(()=>Gue(T),[T,h,m]),[E,M]=tHe(R,m,v);return[T,E,M]}function nHe(e,t,r){const n=Yze(e),{expandIcon:i,expandedRowKeys:o,defaultExpandedRowKeys:s,defaultExpandAllRows:a,expandedRowRender:l,onExpand:c,onExpandedRowsChange:u,childrenColumnName:d}=n,h=i||Vze,p=d||"children",f=y.useMemo(()=>l?"row":e.expandable&&e.internalHooks===Wx&&e.expandable.__PARENT_RENDER_ICON__||t.some(S=>S&&typeof S=="object"&&S[p])?"nest":!1,[!!l,t]),[g,m]=y.useState(()=>s||(a?zze(t,r,p):[])),v=y.useMemo(()=>new Set(o||g||[]),[o,g]),b=y.useCallback(S=>{const x=r(S,t.indexOf(S));let T;const R=v.has(x);R?(v.delete(x),T=[...v]):T=[...v,x],m(T),c&&c(!R,S),u&&u(T)},[r,v,t,c,u]);return[n,f,v,h,p,b]}function iHe(e,t){const r=y.useMemo(()=>e.map((n,i)=>W3(i,i,e,t)),[e,t]);return bm(()=>r,[r],(n,i)=>!cc(n,i))}function oHe(e){const t=y.useRef(e),[,r]=y.useState({}),n=y.useRef(null),i=y.useRef([]);function o(s){i.current.push(s);const a=Promise.resolve();n.current=a,a.then(()=>{if(n.current===a){const l=i.current,c=t.current;i.current=[],l.forEach(u=>{t.current=u(t.current)}),n.current=null,c!==t.current&&r({})}})}return y.useEffect(()=>()=>{n.current=null},[]),[t.current,o]}function sHe(e){const t=y.useRef(null),r=y.useRef(null);function n(){clearTimeout(r.current)}function i(s){t.current=s,n(),r.current=setTimeout(()=>{t.current=null,r.current=void 0},100)}function o(){return t.current}return y.useEffect(()=>n,[]),[i,o]}function aHe(){const[e,t]=y.useState(-1),[r,n]=y.useState(-1),i=y.useCallback((o,s)=>{t(o),n(s)},[]);return[e,r,i]}const Iq=xo()?window:null;function lHe(e,t){const{offsetHeader:r=0,offsetSummary:n=0,offsetScroll:i=0,getContainer:o=()=>Iq}=typeof e=="object"?e:{},s=o()||Iq,a=!!e;return y.useMemo(()=>({isSticky:a,stickyClassName:a?`${t}-sticky-holder`:"",offsetHeader:r,offsetSummary:n,offsetScroll:i,container:s}),[a,i,r,n,t,s])}function cHe(e,t){return y.useMemo(()=>{const n=t.length,i=(a,l,c)=>{const u=[];let d=0;for(let h=a;h!==l;h+=c)u.push(d),t[h].fixed&&(d+=e[h]||0);return u},o=i(0,n,1),s=i(n-1,-1,-1).reverse();return{start:o,end:s,widths:e}},[e,t])}const Dq=e=>{const{children:t,className:r,style:n}=e;return y.createElement("div",{className:r,style:n},t)};function Aq(e){const r=lc(e).getBoundingClientRect(),n=document.documentElement;return{left:r.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:r.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}const Fq="mouseup",Lq="mousemove",vv="scroll",_q="resize",uHe=(e,t)=>{var E,M;const{scrollBodyRef:r,onScroll:n,offsetScroll:i,container:o,direction:s}=e,a=so(No,"prefixCls"),l=((E=r.current)==null?void 0:E.scrollWidth)||0,c=((M=r.current)==null?void 0:M.clientWidth)||0,u=l&&c*(c/l),d=y.useRef(null),[h,p]=oHe({scrollLeft:0,isHiddenScrollBar:!0}),f=y.useRef({delta:0,x:0}),[g,m]=y.useState(!1),v=y.useRef(null);y.useEffect(()=>()=>{Lr.cancel(v.current)},[]);const b=()=>{m(!1)},S=D=>{D.persist(),f.current.delta=D.pageX-h.scrollLeft,f.current.x=0,m(!0),D.preventDefault()},x=D=>{const{buttons:A}=D||(window==null?void 0:window.event);if(!g||A===0){g&&m(!1);return}let I=f.current.x+D.pageX-f.current.x-f.current.delta;const _=s==="rtl";I=Math.max(_?u-c:0,Math.min(_?0:c-u,I)),(!_||Math.abs(I)+Math.abs(u){Lr.cancel(v.current),v.current=Lr(()=>{if(!r.current)return;const D=Aq(r.current).top,A=D+r.current.offsetHeight,I=o===window?document.documentElement.scrollTop+window.innerHeight:Aq(o).top+o.clientHeight;A-E9()<=I||D>=I-i?p(_=>({..._,isHiddenScrollBar:!0})):p(_=>({..._,isHiddenScrollBar:!1}))})},R=D=>{p(A=>({...A,scrollLeft:D/l*c||0}))};return y.useImperativeHandle(t,()=>({setScrollLeft:R,checkScrollBarVisible:T})),y.useEffect(()=>(document.body.addEventListener(Fq,b,!1),document.body.addEventListener(Lq,x,!1),T(),()=>{document.body.removeEventListener(Fq,b),document.body.removeEventListener(Lq,x)}),[u,g]),y.useEffect(()=>{if(r.current){const D=[];let A=lc(r.current);for(;A;)D.push(A),A=A.parentElement;return D.forEach(I=>{I.addEventListener(vv,T,!1)}),window.addEventListener(_q,T,!1),window.addEventListener(vv,T,!1),o.addEventListener(vv,T,!1),()=>{D.forEach(I=>{I.removeEventListener(vv,T)}),window.removeEventListener(_q,T),window.removeEventListener(vv,T),o.removeEventListener(vv,T)}}},[o]),y.useEffect(()=>{h.isHiddenScrollBar||p(D=>{const A=r.current;return A?{...D,scrollLeft:A.scrollLeft/A.scrollWidth*A.clientWidth}:D})},[h.isHiddenScrollBar]),l<=c||!u||h.isHiddenScrollBar?null:y.createElement("div",{style:{height:E9(),width:c,bottom:i},className:`${a}-sticky-scroll`},y.createElement("div",{onMouseDown:S,ref:d,className:ee(`${a}-sticky-scroll-bar`,{[`${a}-sticky-scroll-bar-active`]:g}),style:{width:`${u}px`,transform:`translate3d(${h.scrollLeft}px, 0, 0)`}}))},dHe=y.forwardRef(uHe);function kh(){return kh=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var ei,mr;const r={rowKey:"key",prefixCls:Vue,emptyText:fHe,...e},{prefixCls:n,className:i,rowClassName:o,style:s,classNames:a,styles:l,data:c,rowKey:u,scroll:d,tableLayout:h,direction:p,title:f,footer:g,summary:m,caption:v,id:b,showHeader:S,components:x,emptyText:T,onRow:R,onHeaderRow:E,measureRowRender:M,onScroll:D,internalHooks:A,transformColumns:I,internalRefs:_,tailor:F,getContainerWidth:O,sticky:k,rowHoverable:B=!0}=r,H=c||hHe,N=!!H.length,z=A===Wx,U=y.useCallback((vt,vr)=>qs(x,vt)||vr,[x]),V=y.useMemo(()=>typeof u=="function"?u:vt=>vt&&vt[u],[u]),G=U(["body"]),[K,q,Y]=aHe(),[X,le,re,ne,se,de]=nHe(r,H,V),te=d==null?void 0:d.x,[ie,pe]=y.useState(0),[Z,ue,ve]=rHe({...r,...X,expandable:!!X.expandedRowRender,columnTitle:X.columnTitle,expandedKeys:re,getRowKey:V,onTriggerExpand:de,expandIcon:ne,expandIconColumnIndex:X.expandIconColumnIndex,direction:p,scrollWidth:z&&F&&typeof te=="number"?te:null,clientWidth:ie},z?I:null),he=ve??te,me=y.useMemo(()=>({columns:Z,flattenColumns:ue}),[Z,ue]),Oe=y.useRef(null),Pe=y.useRef(null),Me=y.useRef(null),He=y.useRef(null);y.useImperativeHandle(t,()=>({nativeElement:Oe.current,scrollTo:vt=>{var vr,bn;if(Me.current instanceof HTMLElement){const{index:ti,top:_i,key:$a,offset:Ho}=vt;if(Ize(_i))(vr=Me.current)==null||vr.scrollTo({top:_i});else{const Ls=$a??V(H[ti]),ua=Me.current.querySelector(`[data-row-key="${Ls}"]`);if(ua)if(!Ho)ua.scrollIntoView();else{const kt=ua.offsetTop;Me.current.scrollTo({top:kt+Ho})}}}else(bn=Me.current)!=null&&bn.scrollTo&&Me.current.scrollTo(vt)}}));const Ge=y.useRef(null),[Ct,Ht]=y.useState(!1),[St,Ye]=y.useState(!1),[Fe,et]=y.useState(new Map),tt=WD(ue).map(vt=>Fe.get(vt)),nt=y.useMemo(()=>tt,[tt.join("_")]),Ke=cHe(nt,ue),Ie=d&&O$(d.y),rt=d&&O$(he)||!!X.fixed,Tt=rt&&ue.some(({fixed:vt})=>vt),Rt=y.useRef(null),{isSticky:Bt,offsetHeader:Qt,offsetSummary:ft,offsetScroll:ut,stickyClassName:Yt,container:hr}=lHe(k,n),Je=y.useMemo(()=>m==null?void 0:m(H),[m,H]),ot=(Ie||Bt)&&y.isValidElement(Je)&&Je.type===UD&&Je.props.fixed;let De,Pt,Qe;Ie&&(Pt={overflowY:N?"scroll":"auto",maxHeight:d.y}),rt&&(De={overflowX:"auto"},Ie||(Pt={overflowY:"hidden"}),Qe={width:he===!0?"auto":he,minWidth:"100%"});const $e=y.useCallback((vt,vr)=>{et(bn=>{if(bn.get(vt)!==vr){const ti=new Map(bn);return ti.set(vt,vr),ti}return bn})},[]),[oe,ce]=sHe();function ge(vt,vr){vr&&(typeof vr=="function"?vr(vt):vr.scrollLeft!==vt&&(vr.scrollLeft=vt,vr.scrollLeft!==vt&&setTimeout(()=>{vr.scrollLeft=vt},0)))}const[Te,ke]=y.useState([0,0]),Ze=br(({currentTarget:vt,scrollLeft:vr})=>{var $a;const bn=typeof vr=="number"?vr:vt.scrollLeft,ti=vt||pHe;(!ce()||ce()===ti)&&(oe(ti),ge(bn,Pe.current),ge(bn,Me.current),ge(bn,Ge.current),ge(bn,($a=Rt.current)==null?void 0:$a.setScrollLeft));const _i=vt||Pe.current;if(_i){const Ho=z&&F&&typeof he=="number"?he:_i.scrollWidth,Ls=_i.clientWidth,ua=Math.abs(bn);if(ke(kt=>{const Vr=[ua,Ho-Ls];return cc(kt,Vr)?kt:Vr}),Ho===Ls){Ht(!1),Ye(!1);return}Ht(ua>0),Ye(ua{Ze(vt),D==null||D(vt)}),st=()=>{var vt;rt&&Me.current?Ze({currentTarget:lc(Me.current),scrollLeft:(vt=Me.current)==null?void 0:vt.scrollLeft}):(Ht(!1),Ye(!1))},it=vt=>{var bn,ti;(bn=Rt.current)==null||bn.checkScrollBarVisible();let vr=vt??((ti=Oe.current)==null?void 0:ti.offsetWidth)??0;z&&O&&Oe.current&&(vr=O(Oe.current,vr)||vr),vr!==ie&&(st(),pe(vr))};zr(()=>{rt&&it()},[rt]);const bt=y.useRef(!1);y.useEffect(()=>{bt.current&&st()},[rt,c,Z.length]),y.useEffect(()=>{bt.current=!0},[]);const[Mt,_t]=y.useState(0);zr(()=>{(!F||!z)&&(Me.current instanceof Element?_t(CB(Me.current).width):_t(CB(He.current).width))},[]),y.useEffect(()=>{z&&_&&(_.body.current=Me.current)});const At=y.useCallback(vt=>y.createElement(y.Fragment,null,y.createElement(Pq,vt),ot==="top"&&y.createElement(rE,vt,Je)),[ot,Je]),dt=y.useCallback(vt=>y.createElement(rE,vt,Je),[Je]),mt=U(["table"],"table"),It=y.useMemo(()=>h||(Tt?he==="max-content"?"auto":"fixed":Ie||Bt||ue.some(({ellipsis:vt})=>vt)?"fixed":"auto"),[Ie,Tt,ue,h,Bt]);let Zt;const Ft={colWidths:nt,columCount:ue.length,stickyOffsets:Ke,onHeaderRow:E,fixHeader:Ie,scroll:d},cr=y.useMemo(()=>N?null:typeof T=="function"?T():T,[N,T]),fr=y.createElement(qze,{data:H,measureColumnWidth:Ie||rt||Bt}),rr=y.createElement(Bue,{colWidths:ue.map(({width:vt})=>vt),columns:ue}),mn=v!=null?y.createElement("caption",{className:`${n}-caption`},v):void 0,un=hi(r,{data:!0}),dn=hi(r,{aria:!0});if(Ie||Bt){let vt;typeof G=="function"?(vt=G(H,{scrollbarSize:Mt,ref:Me,onScroll:Ze}),Ft.colWidths=ue.map(({width:bn},ti)=>{const _i=ti===ue.length-1?bn-Mt:bn;return typeof _i=="number"&&!Number.isNaN(_i)?_i:0})):vt=y.createElement("div",{style:{...De,...Pt},onScroll:Dt,ref:Me,className:`${n}-body`},y.createElement(mt,kh({style:{...Qe,tableLayout:It}},dn),mn,rr,fr,!ot&&Je&&y.createElement(rE,{stickyOffsets:Ke,flattenColumns:ue},Je)));const vr={noData:!H.length,maxContentScroll:rt&&he==="max-content",...Ft,...me,direction:p,stickyClassName:Yt,scrollX:he,tableLayout:It,onScroll:Ze};Zt=y.createElement(y.Fragment,null,S!==!1&&y.createElement(Rq,kh({},vr,{stickyTopOffset:Qt,className:`${n}-header`,ref:Pe,colGroup:rr}),At),vt,ot&&ot!=="top"&&y.createElement(Rq,kh({},vr,{stickyBottomOffset:ft,className:`${n}-summary`,ref:Ge,colGroup:rr}),dt),Bt&&Me.current&&Me.current instanceof Element&&y.createElement(dHe,{ref:Rt,offsetScroll:ut,scrollBodyRef:Me,onScroll:Ze,container:hr,direction:p}))}else Zt=y.createElement("div",{style:{...De,...Pt,...l==null?void 0:l.content},className:ee(`${n}-content`,a==null?void 0:a.content),onScroll:Ze,ref:Me},y.createElement(mt,kh({style:{...Qe,tableLayout:It}},dn),mn,rr,S!==!1&&y.createElement(Pq,kh({},Ft,me)),fr,Je&&y.createElement(rE,{stickyOffsets:Ke,flattenColumns:ue},Je)));const en={...s};Bt&&(en["--columns-count"]=ue.length);let ho=y.createElement("div",kh({className:ee(n,i,{[`${n}-rtl`]:p==="rtl",[`${n}-fix-start-shadow`]:rt,[`${n}-fix-end-shadow`]:rt,[`${n}-fix-start-shadow-show`]:rt&&Ct,[`${n}-fix-end-shadow-show`]:rt&&St,[`${n}-layout-fixed`]:h==="fixed",[`${n}-fixed-header`]:Ie,[`${n}-fixed-column`]:Tt,[`${n}-scroll-horizontal`]:rt,[`${n}-has-fix-start`]:(ei=ue[0])==null?void 0:ei.fixed,[`${n}-has-fix-end`]:((mr=ue[ue.length-1])==null?void 0:mr.fixed)==="end"}),style:en,id:b,ref:Oe},un),f&&y.createElement(Dq,{className:ee(`${n}-title`,a==null?void 0:a.title),style:l==null?void 0:l.title},f(H)),y.createElement("div",{ref:He,className:ee(`${n}-container`,a==null?void 0:a.section),style:l==null?void 0:l.section},Zt),g&&y.createElement(Dq,{className:ee(`${n}-footer`,a==null?void 0:a.footer),style:l==null?void 0:l.footer},g(H)));rt&&(ho=y.createElement(Js,{onResize:({offsetWidth:vt})=>it(vt)},ho));const Mr=iHe(ue,Ke),on=y.useMemo(()=>({scrollX:he,scrollInfo:Te,classNames:a,styles:l,prefixCls:n,getComponent:U,scrollbarSize:Mt,direction:p,fixedInfoList:Mr,isSticky:Bt,componentWidth:ie,fixHeader:Ie,fixColumn:Tt,horizonScroll:rt,tableLayout:It,rowClassName:o,expandedRowClassName:X.expandedRowClassName,expandIcon:ne,expandableType:le,expandRowByClick:X.expandRowByClick,expandedRowRender:X.expandedRowRender,expandedRowOffset:X.expandedRowOffset,onTriggerExpand:de,expandIconColumnIndex:X.expandIconColumnIndex,indentSize:X.indentSize,allColumnsFixedLeft:ue.every(vt=>vt.fixed==="start"),emptyNode:cr,columns:Z,flattenColumns:ue,onColumnResize:$e,colWidths:nt,hoverStartRow:K,hoverEndRow:q,onHover:Y,rowExpandable:X.rowExpandable,onRow:R,getRowKey:V,expandedKeys:re,childrenColumnName:se,rowHoverable:B,measureRowRender:M}),[he,Te,a,l,n,U,Mt,p,Mr,Bt,ie,Ie,Tt,rt,It,o,X.expandedRowClassName,ne,le,X.expandRowByClick,X.expandedRowRender,X.expandedRowOffset,de,X.expandIconColumnIndex,X.indentSize,cr,Z,ue,$e,nt,K,q,Y,X.rowExpandable,R,V,re,se,B,M]);return y.createElement(No.Provider,{value:on},ho)},mHe=y.forwardRef(gHe),zue=e=>Mue(mHe,e),DC=zue();DC.EXPAND_COLUMN=Oh;DC.INTERNAL_HOOKS=Wx;DC.Column=$ze;DC.ColumnGroup=Gze;DC.Summary=Aue;const j3=H3(null),Hue=H3(null);function $$(){return $$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{rowInfo:t,column:r,colIndex:n,indent:i,index:o,component:s,renderIndex:a,record:l,style:c,className:u,inverse:d,getHeight:h}=e,{render:p,dataIndex:f,className:g,width:m}=r,{columnsOffset:v}=so(Hue,["columnsOffset"]),{key:b,fixedInfo:S,appendCellNode:x,additionalCellProps:T}=Nue(t,r,n,i,o),{style:R,colSpan:E=1,rowSpan:M=1}=T,D=n-1,A=vHe(D,E,v),I=E>1?m-A:0,_={...R,...c,flex:`0 0 ${A}px`,width:`${A}px`,marginRight:I,pointerEvents:"auto"},F=y.useMemo(()=>d?M<=1:E===0||M===0||M>1,[M,E,d]);F?_.visibility="hidden":d&&(_.height=h==null?void 0:h(M));const O=F?()=>null:p,k={};return(M===0||E===0)&&(k.rowSpan=1,k.colSpan=1),y.createElement(IC,$$({className:ee(g,u),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:s,prefixCls:t.prefixCls,key:b,record:l,index:o,renderIndex:a,dataIndex:f,render:O,shouldCellUpdate:r.shouldCellUpdate},S,{appendNode:x,additionalProps:{...T,style:_,...k}}))};function G$(){return G$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{data:r,index:n,className:i,rowKey:o,style:s,extra:a,getHeight:l,...c}=e,{record:u,indent:d,index:h}=r,{scrollX:p,flattenColumns:f,prefixCls:g,fixColumn:m,componentWidth:v}=so(No,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),{getComponent:b}=so(j3,["getComponent"]),S=_ue(u,o,n,d),x=b(["body","row"],"div"),T=b(["body","cell"],"div"),{rowSupportExpand:R,expanded:E,rowProps:M,expandedRowRender:D,expandedRowClassName:A}=S;let I;if(R&&E){const O=D(u,n,d+1,E),k=kue(A,u,n,d);let B={};m&&(B={style:{"--virtual-width":`${v}px`}});const H=`${g}-expanded-row-cell`;I=y.createElement(x,{className:ee(`${g}-expanded-row`,`${g}-expanded-row-level-${d+1}`,k)},y.createElement(IC,{component:T,prefixCls:g,className:ee(H,{[`${H}-fixed`]:m}),additionalProps:B},O))}const _={...s,width:p};a&&(_.position="absolute",_.pointerEvents="none");const F=y.createElement(x,G$({},M,c,{"data-row-key":o,ref:R?null:t,className:ee(i,`${g}-row`,M==null?void 0:M.className,{[`${g}-row-extra`]:a}),style:{..._,...M==null?void 0:M.style}}),f.map((O,k)=>y.createElement(yHe,{key:k,component:T,rowInfo:S,column:O,colIndex:k,indent:d,index:n,renderIndex:h,record:u,inverse:a,getHeight:l})));return R?y.createElement("div",{ref:t},F,I):F}),Oq=MC(CHe),bHe=y.forwardRef((e,t)=>{const{data:r,onScroll:n}=e,{flattenColumns:i,onColumnResize:o,getRowKey:s,expandedKeys:a,prefixCls:l,childrenColumnName:c,scrollX:u,direction:d}=so(No,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),{sticky:h,scrollY:p,listItemHeight:f,getComponent:g,onScroll:m}=so(j3),v=y.useRef(null),b=Lue(r,c,a,s),S=y.useMemo(()=>{let I=0;return i.map(({width:_,minWidth:F,key:O})=>{const k=Math.max(_||0,F||0);return I+=k,[O,k,I]})},[i]),x=y.useMemo(()=>S.map(I=>I[2]),[S]);y.useEffect(()=>{S.forEach(([I,_])=>{o(I,_)})},[S]),y.useImperativeHandle(t,()=>{var _;const I={scrollTo:F=>{var B,H;const{offset:O,...k}=F;O?(B=v.current)==null||B.scrollTo({...k,offset:O,align:"top"}):(H=v.current)==null||H.scrollTo(F)},nativeElement:(_=v.current)==null?void 0:_.nativeElement};return Object.defineProperty(I,"scrollLeft",{get:()=>{var F;return((F=v.current)==null?void 0:F.getScrollInfo().x)||0},set:F=>{var O;(O=v.current)==null||O.scrollTo({left:F})}}),Object.defineProperty(I,"scrollTop",{get:()=>{var F;return((F=v.current)==null?void 0:F.getScrollInfo().y)||0},set:F=>{var O;(O=v.current)==null||O.scrollTo({top:F})}}),I});const T=(I,_)=>{var k;const F=(k=b[_])==null?void 0:k.record,{onCell:O}=I;if(O){const B=O(F,_);return(B==null?void 0:B.rowSpan)??1}return 1},R=I=>{const{start:_,end:F,getSize:O,offsetY:k}=I;if(F<0)return null;let B=i.filter(G=>T(G,_)===0),H=_;for(let G=_;G>=0;G-=1)if(B=B.filter(K=>T(K,G)===0),!B.length){H=G;break}let N=i.filter(G=>T(G,F)!==1),z=F;for(let G=F;GT(K,G)!==1),!N.length){z=Math.max(G-1,F);break}const U=[];for(let G=H;G<=z;G+=1)b[G]&&i.some(q=>T(q,G)>1)&&U.push(G);return U.map(G=>{const K=b[G],q=s(K.record,G),Y=le=>{const re=G+le-1,ne=b[re];if(!ne||!ne.record){const te=Math.min(re,b.length-1),ie=b[te],pe=s(ie.record,te),Z=O(q,pe);return Z.bottom-Z.top}const se=s(ne.record,re),de=O(q,se);return de.bottom-de.top},X=O(q);return y.createElement(Oq,{key:G,data:K,rowKey:q,index:G,style:{top:-k+X.top},extra:!0,getHeight:Y})})},E=y.useMemo(()=>({columnsOffset:x}),[x]),M=`${l}-tbody`,D=g(["body","wrapper"]),A={};return h&&(A.position="sticky",A.bottom=0,typeof h=="object"&&h.offsetScroll&&(A.bottom=h.offsetScroll)),y.createElement(Hue.Provider,{value:E},y.createElement(LD,{fullHeight:!1,ref:v,prefixCls:`${M}-virtual`,styles:{horizontalScrollBar:A},className:M,height:p,itemHeight:f||24,data:b,itemKey:I=>s(I.record),component:D,scrollWidth:u,direction:d,onVirtualScroll:({x:I})=>{var _;n({currentTarget:(_=v.current)==null?void 0:_.nativeElement,scrollLeft:I})},onScroll:m,extraRender:R},(I,_,F)=>{const O=s(I.record,_);return y.createElement(Oq,{data:I,rowKey:O,index:_,style:F.style})}))}),SHe=MC(bHe);function V$(){return V$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{ref:r,onScroll:n}=t;return y.createElement(SHe,{ref:r,data:e,onScroll:n})},xHe=(e,t)=>{const{data:r,columns:n,scroll:i,sticky:o,prefixCls:s=Vue,className:a,listItemHeight:l,components:c,onScroll:u}=e;let{x:d,y:h}=i||{};typeof d!="number"&&(d=1),typeof h!="number"&&(h=500);const p=br((m,v)=>qs(c,m)||v),f=br(u),g=y.useMemo(()=>({sticky:o,scrollY:h,listItemHeight:l,getComponent:p,onScroll:f}),[o,h,l,p,f]);return y.createElement(j3.Provider,{value:g},y.createElement(DC,V$({},e,{className:ee(a,`${s}-virtual`),scroll:{...i,x:d},components:{...c,body:r!=null&&r.length?wHe:void 0},columns:n,internalHooks:Wx,tailor:!0,ref:t})))},THe=y.forwardRef(xHe),Wue=e=>Mue(THe,e);Wue();const EHe=e=>null,RHe=e=>null,K3=y.createContext(null),PHe=y.createContext({}),MHe=({prefixCls:e,level:t,isStart:r,isEnd:n})=>{const i=`${e}-indent-unit`,o=[];for(let s=0;s{var St,Ye;const{eventKey:t,className:r,style:n,dragOver:i,dragOverGapTop:o,dragOverGapBottom:s,isLeaf:a,isStart:l,isEnd:c,expanded:u,selected:d,checked:h,halfChecked:p,loading:f,domRef:g,active:m,data:v,onMouseMove:b,selectable:S,treeId:x,...T}=e,R=cae(x,t),E=Q.useContext(K3),{classNames:M,styles:D}=E||{},A=Q.useContext(PHe),I=Q.useRef(null),[_,F]=Q.useState(!1),O=!!(E.disabled||e.disabled||(St=A.nodeDisabled)!=null&&St.call(A,v)),k=Q.useMemo(()=>!E.checkable||e.checkable===!1?!1:E.checkable,[E.checkable,e.checkable]),B=Fe=>{O||E.onNodeSelect(Fe,Gi(e))},H=Fe=>{O||!k||e.disableCheckbox||E.onNodeCheck(Fe,Gi(e),!h)},N=Q.useMemo(()=>typeof S=="boolean"?S:E.selectable,[S,E.selectable]),z=Fe=>{E.onNodeClick(Fe,Gi(e)),N?B(Fe):H(Fe)},U=Fe=>{E.onNodeDoubleClick(Fe,Gi(e))},V=Fe=>{E.onNodeMouseEnter(Fe,Gi(e))},G=Fe=>{E.onNodeMouseLeave(Fe,Gi(e))},K=Fe=>{E.onNodeContextMenu(Fe,Gi(e))},q=Q.useMemo(()=>!!(E.draggable&&(!E.draggable.nodeDraggable||E.draggable.nodeDraggable(v))),[E.draggable,v]),Y=Fe=>{Fe.stopPropagation(),F(!0),E.onNodeDragStart(Fe,e);try{Fe.dataTransfer.setData("text/plain","")}catch{}},X=Fe=>{Fe.preventDefault(),Fe.stopPropagation(),E.onNodeDragEnter(Fe,e)},le=Fe=>{Fe.preventDefault(),Fe.stopPropagation(),E.onNodeDragOver(Fe,e)},re=Fe=>{Fe.stopPropagation(),E.onNodeDragLeave(Fe,e)},ne=Fe=>{Fe.stopPropagation(),F(!1),E.onNodeDragEnd(Fe,e)},se=Fe=>{Fe.preventDefault(),Fe.stopPropagation(),F(!1),E.onNodeDrop(Fe,e)},de=Fe=>{f||E.onNodeExpand(Fe,Gi(e))},te=Q.useMemo(()=>{const{children:Fe}=Ss(E.keyEntities,t)||{};return!!(Fe||[]).length},[E.keyEntities,t]),ie=Q.useMemo(()=>Vce(a,E.loadData,te,e.loaded),[a,E.loadData,te,e.loaded]);Q.useEffect(()=>{f||typeof E.loadData=="function"&&u&&!ie&&!e.loaded&&E.onNodeLoad(Gi(e))},[f,E.loadData,E.onNodeLoad,u,ie,e]);const pe=Q.useMemo(()=>{var Fe;return(Fe=E.draggable)!=null&&Fe.icon?Q.createElement("span",{className:`${E.prefixCls}-draggable-icon`},E.draggable.icon):null},[E.draggable]),Z=Fe=>{const et=e.switcherIcon||E.switcherIcon;return typeof et=="function"?et({...e,isLeaf:Fe}):et},ue=()=>{if(ie){const et=Z(!0);return et!==!1?Q.createElement("span",{className:ee(`${E.prefixCls}-switcher`,`${E.prefixCls}-switcher-noop`)},et):null}const Fe=Z(!1);return Fe!==!1?Q.createElement("span",{onClick:de,className:ee(`${E.prefixCls}-switcher`,`${E.prefixCls}-switcher_${u?kq:Nq}`)},Fe):null},ve=Q.useMemo(()=>{if(!k)return null;const Fe=typeof k!="boolean"?k:null;return Q.createElement("span",{className:ee(`${E.prefixCls}-checkbox`,{[`${E.prefixCls}-checkbox-checked`]:h,[`${E.prefixCls}-checkbox-indeterminate`]:!h&&p,[`${E.prefixCls}-checkbox-disabled`]:O||e.disableCheckbox}),onClick:H,role:"checkbox","aria-checked":p?"mixed":h,"aria-disabled":O||e.disableCheckbox,"aria-labelledby":R},Fe)},[k,h,p,O,e.disableCheckbox,R]),he=Q.useMemo(()=>ie?null:u?kq:Nq,[ie,u]),me=Q.useMemo(()=>Q.createElement("span",{className:ee(M==null?void 0:M.itemIcon,`${E.prefixCls}-iconEle`,`${E.prefixCls}-icon__${he||"docu"}`,{[`${E.prefixCls}-icon_loading`]:f}),style:D==null?void 0:D.itemIcon}),[E.prefixCls,he,f]),Oe=Q.useMemo(()=>{const Fe=!!E.draggable;return!e.disabled&&Fe&&E.dragOverNodeKey===t?E.dropIndicatorRender({dropPosition:E.dropPosition,dropLevelOffset:E.dropLevelOffset,indent:E.indent,prefixCls:E.prefixCls,direction:E.direction}):null},[E.dropPosition,E.dropLevelOffset,E.indent,E.prefixCls,E.direction,E.draggable,E.dragOverNodeKey,E.dropIndicatorRender]),Pe=Q.useMemo(()=>{const{title:Fe=DHe}=e,et=`${E.prefixCls}-node-content-wrapper`;let Ne;if(E.showIcon){const nt=e.icon||E.icon;Ne=nt?Q.createElement("span",{className:ee(M==null?void 0:M.itemIcon,`${E.prefixCls}-iconEle`,`${E.prefixCls}-icon__customize`),style:D==null?void 0:D.itemIcon},typeof nt=="function"?nt(e):nt):me}else E.loadData&&f&&(Ne=me);let tt;return typeof Fe=="function"?tt=Fe(v):E.titleRender?tt=E.titleRender(v):tt=Fe,Q.createElement("span",{ref:I,title:typeof Fe=="string"?Fe:"",className:ee(et,`${et}-${he||"normal"}`,{[`${E.prefixCls}-node-selected`]:!O&&(d||_)}),onMouseEnter:V,onMouseLeave:G,onContextMenu:K,onClick:z,onDoubleClick:U},Ne,Q.createElement("span",{className:ee(`${E.prefixCls}-title`,M==null?void 0:M.itemTitle),style:D==null?void 0:D.itemTitle},tt),Oe)},[E.prefixCls,E.showIcon,e,E.icon,me,E.titleRender,v,he,V,G,K,z,U]),Me=hi(T,{aria:!0,data:!0}),{level:He}=Ss(E.keyEntities,t)||{},Ge=c[c.length-1],Ct=!O&&q,Ht=E.draggingNodeKey===t;return Q.createElement("div",z$({ref:g,role:"treeitem",id:R,"aria-expanded":ie?void 0:u,"aria-selected":N&&!O?d:void 0,"aria-checked":k&&!O?p?"mixed":h:void 0,"aria-disabled":O,className:ee(r,`${E.prefixCls}-treenode`,M==null?void 0:M.item,{[`${E.prefixCls}-treenode-disabled`]:O,[`${E.prefixCls}-treenode-switcher-${u?"open":"close"}`]:!a,[`${E.prefixCls}-treenode-checkbox-checked`]:h,[`${E.prefixCls}-treenode-checkbox-indeterminate`]:p,[`${E.prefixCls}-treenode-selected`]:d,[`${E.prefixCls}-treenode-loading`]:f,[`${E.prefixCls}-treenode-active`]:m,[`${E.prefixCls}-treenode-leaf-last`]:Ge,[`${E.prefixCls}-treenode-draggable`]:q,dragging:Ht,"drop-target":E.dropTargetKey===t,"drop-container":E.dropContainerKey===t,"drag-over":!O&&i,"drag-over-gap-top":!O&&o,"drag-over-gap-bottom":!O&&s,"filter-node":(Ye=E.filterTreeNode)==null?void 0:Ye.call(E,Gi(e)),[`${E.prefixCls}-treenode-leaf`]:ie}),style:{...n,...D==null?void 0:D.item},draggable:Ct,onDragStart:Ct?Y:void 0,onDragEnter:q?X:void 0,onDragOver:q?le:void 0,onDragLeave:q?re:void 0,onDrop:q?se:void 0,onDragEnd:q?ne:void 0,onMouseMove:b},Me),Q.createElement(IHe,{prefixCls:E.prefixCls,level:He,isStart:l,isEnd:c}),pe,ue(),ve,Pe)};S0.isTreeNode=1;function Gc(e,t){if(!e)return[];const r=e.slice(),n=r.indexOf(t);return n>=0&&r.splice(n,1),r}function Xu(e,t){const r=(e||[]).slice();return r.indexOf(t)===-1&&r.push(t),r}function q3(e){return e.split("-")}function AHe(e,t){const r=[],n=Ss(t,e);function i(o=[]){o.forEach(({key:s,children:a})=>{r.push(s),i(a)})}return i(n.children),r}function FHe(e){if(e.parent){const t=q3(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function LHe(e){const t=q3(e.pos);return Number(t[t.length-1])===0}function Bq(e,t,r,n,i,o,s,a,l,c){var A;const{clientX:u,clientY:d}=e,{top:h,height:p}=e.target.getBoundingClientRect(),g=((c==="rtl"?-1:1)*(((i==null?void 0:i.x)||0)-u)-12)/n,m=l.filter(I=>{var _,F;return(F=(_=a[I])==null?void 0:_.children)==null?void 0:F.length});let v=Ss(a,r.eventKey);if(dO.key===v.key),_=I<=0?0:I-1,F=s[_].key;v=Ss(a,F)}const b=v.key,S=v,x=v.key;let T=0,R=0;if(!m.includes(b))for(let I=0;I-1.5?o({dragNode:E,dropNode:M,dropPosition:1})?T=1:D=!1:o({dragNode:E,dropNode:M,dropPosition:0})?T=0:o({dragNode:E,dropNode:M,dropPosition:1})?T=1:D=!1:o({dragNode:E,dropNode:M,dropPosition:1})?T=1:D=!1,{dropPosition:T,dropLevelOffset:R,dropTargetKey:v.key,dropTargetPos:v.pos,dragOverNodeKey:x,dropContainerKey:T===0?null:((A=v.parent)==null?void 0:A.key)||null,dropAllowed:D}}function $q(e,t){if(!e)return;const{multiple:r}=t;return r?e.slice():e.length?[e[0]]:e}function X_(e){if(!e)return null;let t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(typeof e=="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return Hn(!1,"`checkedKeys` is not an array or an object"),null;return t}function H$(e,t){const r=new Set;function n(i){if(r.has(i))return;const o=Ss(t,i);if(!o)return;r.add(i);const{parent:s,node:a}=o;a.disabled||s&&n(s.key)}return(e||[]).forEach(i=>{n(i)}),[...r]}const Dh={},W$="SELECT_ALL",U$="SELECT_INVERT",j$="SELECT_NONE",Gq=[],Uue=(e,t,r=[])=>((t||[]).forEach(n=>{r.push(n),n&&typeof n=="object"&&e in n&&Uue(e,n[e],r)}),r),_He=(e,t)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:n,defaultSelectedRowKeys:i,getCheckboxProps:o,getTitleCheckboxProps:s,onChange:a,onSelect:l,onSelectAll:c,onSelectInvert:u,onSelectNone:d,onSelectMultiple:h,columnWidth:p,type:f,selections:g,fixed:m,renderCell:v,hideSelectAll:b,checkStrictly:S=!0}=t||{},{prefixCls:x,data:T,pageData:R,getRecordByKey:E,getRowKey:M,expandType:D,childrenColumnName:A,locale:I,getPopupContainer:_}=e,F=CC(),[O,k]=XDe(te=>te),[B,H]=Fn(i||Gq,n),N=y.useRef(new Map),z=y.useCallback(te=>{if(r){const ie=new Map;te.forEach(pe=>{let Z=E(pe);!Z&&N.current.has(pe)&&(Z=N.current.get(pe)),ie.set(pe,Z)}),N.current=ie}},[E,r]);y.useEffect(()=>{z(B)},[B]);const U=y.useMemo(()=>Uue(A,R),[A,R]),{keyEntities:V}=y.useMemo(()=>{if(S)return{keyEntities:null};let te=T;if(r){const ie=new Set(U.map(M)),pe=Array.from(N.current).reduce((Z,[ue,ve])=>ie.has(ue)?Z:Z.concat(ve),[]);te=[].concat(Nr(te),Nr(pe))}return k3(te,{externalGetKey:M,childrenPropName:A})},[T,M,S,A,r,U]),G=y.useMemo(()=>{const te=new Map;return U.forEach((ie,pe)=>{const Z=M(ie,pe),ue=(o?o(ie):null)||{};te.set(Z,ue)}),te},[U,M,o]),K=y.useCallback(te=>{const ie=M(te);let pe;return G.has(ie)?pe=G.get(M(te)):pe=o?o(te):void 0,!!(pe!=null&&pe.disabled)},[G,M]),[q,Y]=y.useMemo(()=>{if(S)return[B||[],[]];const{checkedKeys:te,halfCheckedKeys:ie}=fy(B,!0,V,K);return[te||[],ie]},[B,S,V,K]),X=y.useMemo(()=>{const te=f==="radio"?q.slice(0,1):q;return new Set(te)},[q,f]),le=y.useMemo(()=>f==="radio"?new Set:new Set(Y),[Y,f]);y.useEffect(()=>{t||H(Gq)},[!!t]);const re=y.useCallback((te,ie)=>{let pe,Z;z(te),r?(pe=te,Z=te.map(ue=>N.current.get(ue))):(pe=[],Z=[],te.forEach(ue=>{const ve=E(ue);ve!==void 0&&(pe.push(ue),Z.push(ve))})),H(pe),a==null||a(pe,Z,{type:ie})},[H,E,a,r]),ne=y.useCallback((te,ie,pe,Z)=>{if(l){const ue=pe.map(E);l(E(te),ie,ue,Z)}re(pe,"single")},[l,E,re]),se=y.useMemo(()=>!g||b?null:(g===!0?[W$,U$,j$]:g).map(ie=>ie===W$?{key:"all",text:I.selectionAll,onSelect(){re(T.map((pe,Z)=>M(pe,Z)).filter(pe=>{const Z=G.get(pe);return!(Z!=null&&Z.disabled)||X.has(pe)}),"all")}}:ie===U$?{key:"invert",text:I.selectInvert,onSelect(){const pe=new Set(X);R.forEach((ue,ve)=>{const he=M(ue,ve),me=G.get(he);me!=null&&me.disabled||(pe.has(he)?pe.delete(he):pe.add(he))});const Z=Array.from(pe);u&&(F.deprecated(!1,"onSelectInvert","onChange"),u(Z)),re(Z,"invert")}}:ie===j$?{key:"none",text:I.selectNone,onSelect(){d==null||d(),re(Array.from(X).filter(pe=>{const Z=G.get(pe);return Z==null?void 0:Z.disabled}),"none")}}:ie).map(ie=>({...ie,onSelect:(...pe)=>{var Z;(Z=ie.onSelect)==null||Z.call(ie,...pe),k(null)}})),[g,b,I.selectionAll,I.selectInvert,I.selectNone,G,X,T,R,M,u,re]);return[y.useCallback(te=>{var et;if(!t)return te.filter(Ne=>Ne!==Dh);let ie=Nr(te);const pe=new Set(X),Z=U.map(M).filter(Ne=>!G.get(Ne).disabled),ue=Z.every(Ne=>pe.has(Ne)),ve=Z.some(Ne=>pe.has(Ne)),he=()=>{const Ne=[];ue?Z.forEach(nt=>{pe.delete(nt),Ne.push(nt)}):Z.forEach(nt=>{pe.has(nt)||(pe.add(nt),Ne.push(nt))});const tt=Array.from(pe);c==null||c(!ue,tt.map(E),Ne.map(E)),re(tt,"all"),k(null)};let me,Oe;if(f!=="radio"){let Ne;if(se){const Bt={getPopupContainer:_,items:se.map((Qt,ft)=>{const{key:ut,text:Yt,onSelect:hr}=Qt;return{key:ut??ft,onClick:()=>{hr==null||hr(Z)},label:Yt}})};Ne=y.createElement("div",{className:`${x}-selection-extra`},y.createElement(G3,{menu:Bt,getPopupContainer:_},y.createElement("span",null,y.createElement(_D,null))))}const tt=U.map((Bt,Qt)=>{const ft=M(Bt,Qt),ut=G.get(ft)||{};return{checked:pe.has(ft),...ut}}).filter(({disabled:Bt})=>Bt),nt=!!tt.length&&tt.length===U.length,Ke=nt&&tt.every(({checked:Bt})=>Bt),Ie=nt&&tt.some(({checked:Bt})=>Bt),rt=(s==null?void 0:s())||{},{onChange:Tt,disabled:Rt}=rt;Oe=y.createElement(By,{"aria-label":Ne?"Custom selection":"Select all",...rt,checked:nt?Ke:!!U.length&&ue,indeterminate:nt?!Ke&&Ie:!ue&&ve,onChange:Bt=>{he(),Tt==null||Tt(Bt)},disabled:Rt??(U.length===0||nt),skipGroup:!0}),me=!b&&y.createElement("div",{className:`${x}-selection`},Oe,Ne)}let Pe;f==="radio"?Pe=(Ne,tt,nt)=>{const Ke=M(tt,nt),Ie=pe.has(Ke),rt=G.get(Ke);return{node:y.createElement($x,{...rt,checked:Ie,onClick:Tt=>{var Rt;Tt.stopPropagation(),(Rt=rt==null?void 0:rt.onClick)==null||Rt.call(rt,Tt)},onChange:Tt=>{var Rt;pe.has(Ke)||ne(Ke,!0,[Ke],Tt.nativeEvent),(Rt=rt==null?void 0:rt.onChange)==null||Rt.call(rt,Tt)}}),checked:Ie}}:Pe=(Ne,tt,nt)=>{const Ke=M(tt,nt),Ie=pe.has(Ke),rt=le.has(Ke),Tt=G.get(Ke);let Rt;return D==="nest"?Rt=rt:Rt=(Tt==null?void 0:Tt.indeterminate)??rt,{node:y.createElement(By,{...Tt,indeterminate:Rt,checked:Ie,skipGroup:!0,onClick:Bt=>{var Qt;Bt.stopPropagation(),(Qt=Tt==null?void 0:Tt.onClick)==null||Qt.call(Tt,Bt)},onChange:Bt=>{var hr;const{nativeEvent:Qt}=Bt,{shiftKey:ft}=Qt,ut=Z.indexOf(Ke),Yt=q.some(Je=>Z.includes(Je));if(ft&&S&&Yt){const Je=O(ut,Z,pe),ot=Array.from(pe);h==null||h(!Ie,ot.map(E),Je.map(E)),re(ot,"multiple")}else{const Je=q;if(S){const ot=Ie?Gc(Je,Ke):Xu(Je,Ke);ne(Ke,!Ie,ot,Qt)}else{const ot=fy([].concat(Nr(Je),[Ke]),!0,V,K),{checkedKeys:De,halfCheckedKeys:Pt}=ot;let Qe=De;if(Ie){const $e=new Set(De);$e.delete(Ke),Qe=fy(Array.from($e),{halfCheckedKeys:Pt},V,K).checkedKeys}ne(Ke,!Ie,Qe,Qt)}}k(Ie?null:ut),(hr=Tt==null?void 0:Tt.onChange)==null||hr.call(Tt,Bt)}}),checked:Ie}};const Me=(Ne,tt,nt)=>{const{node:Ke,checked:Ie}=Pe(Ne,tt,nt);return v?v(Ie,tt,nt,Ke):Ke};if(!ie.includes(Dh))if(ie.findIndex(Ne=>{var tt;return((tt=Ne[Ew])==null?void 0:tt.columnType)==="EXPAND_COLUMN"})===0){const[Ne,...tt]=ie;ie=[Ne,Dh].concat(Nr(tt))}else ie=[Dh].concat(Nr(ie));const He=ie.indexOf(Dh);ie=ie.filter((Ne,tt)=>Ne!==Dh||tt===He);const Ge=ie[He-1],Ct=ie[He+1];let Ht=m;Ht===void 0&&((Ct==null?void 0:Ct.fixed)!==void 0?Ht=Ct.fixed:(Ge==null?void 0:Ge.fixed)!==void 0&&(Ht=Ge.fixed)),Ht&&Ge&&((et=Ge[Ew])==null?void 0:et.columnType)==="EXPAND_COLUMN"&&Ge.fixed===void 0&&(Ge.fixed=Ht);const St=ee(`${x}-selection-col`,{[`${x}-selection-col-with-dropdown`]:g&&f==="checkbox"}),Ye=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(Oe):t.columnTitle:me,Fe={fixed:Ht,width:p,className:`${x}-selection-column`,title:Ye(),render:Me,onCell:t.onCell,align:t.align,[Ew]:{className:St}};return ie.map(Ne=>Ne===Dh?Fe:Ne)},[M,U,t,q,X,le,p,se,D,G,h,ne,K]),X]};function OHe(e){return t=>{const{prefixCls:r,onExpand:n,record:i,expanded:o,expandable:s}=t,a=`${r}-row-expand-icon`;return y.createElement("button",{type:"button",onClick:l=>{n(i,l),l.stopPropagation()},className:ee(a,{[`${a}-spaced`]:!s,[`${a}-expanded`]:s&&o,[`${a}-collapsed`]:s&&!o}),"aria-label":o?e.collapse:e.expand,"aria-expanded":o})}}function kHe(e){return(r,n)=>{const i=r.querySelector(`.${e}-container`);let o=n;if(i){const s=getComputedStyle(i),a=Number.parseInt(s.borderLeftWidth,10),l=Number.parseInt(s.borderRightWidth,10);o=n-a-l}return o}}const wp=(e,t)=>"key"in e&&xn(e.key)?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t;function AC(e,t){return t?`${t}-${e}`:`${e}`}const jD=(e,t)=>typeof e=="function"?e(t):e,NHe=(e,t)=>{const r=jD(e,t);return Object.prototype.toString.call(r)==="[object Object]"?"":r};var BHe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"};function K$(){return K$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,K$({},e,{ref:t,icon:BHe})),GHe=y.forwardRef($He),VHe=e=>{const{dropPosition:t,dropLevelOffset:r,indent:n}=e,i={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:i.top=0,i.left=-r*n;break;case 1:i.bottom=0,i.left=-r*n;break;case 0:i.bottom=0,i.left=n;break}return Q.createElement("div",{style:i})};function zHe(e,t){const[r,n]=y.useState(!1);zr(()=>{if(r)return e(),()=>{t()}},[r]),zr(()=>(n(!0),()=>{n(!1)}),[])}function Rw(){return Rw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:r,style:n,motion:i,motionNodes:o,motionType:s,onMotionStart:a,onMotionEnd:l,active:c,treeNodeRequiredProps:u,...d}=e,[h,p]=y.useState(!0),{prefixCls:f}=y.useContext(K3),g=o&&s!=="hide";zr(()=>{o&&g!==h&&p(g)},[o]);const m=()=>{o&&a()},v=y.useRef(!1),b=()=>{o&&!v.current&&(v.current=!0,l())};zHe(m,b);const S=x=>{g===x&&b()};return o?y.createElement(uu,Rw({ref:t,visible:h},i,{motionAppear:s==="show",onVisibleChanged:S}),({className:x,style:T},R)=>y.createElement("div",{ref:R,className:ee(`${f}-treenode-motion`,x),style:T},o.map(E=>{const{data:{...M},title:D,key:A,isStart:I,isEnd:_}=E;delete M.children;const F=ww(A,u);return y.createElement(S0,Rw({},M,F,{title:D,active:c,data:E.data,key:A,isStart:I,isEnd:_}))}))):y.createElement(S0,Rw({domRef:t,className:r,style:n},d,{active:c}))});function WHe(e=[],t=[]){const r=e.length,n=t.length;if(Math.abs(r-n)!==1)return{add:!1,key:null};function i(o,s){const a=new Map;o.forEach(c=>{a.set(c,!0)});const l=s.filter(c=>!a.has(c));return l.length===1?l[0]:null}return rs.key===r),i=e[n+1],o=t.findIndex(s=>s.key===r);if(i){const s=t.findIndex(a=>a.key===i.key);return t.slice(o+1,s)}return t.slice(o+1)}function CM(){return CM=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:r,data:n,selectable:i,checkable:o,expandedKeys:s,selectedKeys:a,checkedKeys:l,loadedKeys:c,loadingKeys:u,halfCheckedKeys:d,keyEntities:h,disabled:p,dragging:f,dragOverNodeKey:g,dropPosition:m,motion:v,height:b,itemHeight:S,virtual:x,scrollWidth:T,focusable:R,activeItem:E,tabIndex:M,onKeyDown:D,onFocus:A,onBlur:I,onActiveChange:_,onListChangeStart:F,onListChangeEnd:O,...k}=e,B=Tu(),H=y.useRef(null),N=y.useRef(null);y.useImperativeHandle(t,()=>({scrollTo:ie=>{H.current.scrollTo(ie)},getIndentWidth:()=>N.current.offsetWidth}));const[z,U]=y.useState(s),[V,G]=y.useState(n),[K,q]=y.useState(n),[Y,X]=y.useState([]),[le,re]=y.useState(null),ne=y.useRef(n);ne.current=n;function se(){const ie=ne.current;G(ie),q(ie),X([]),re(null),O()}zr(()=>{U(s);const ie=WHe(z,s);if(ie.key!==null)if(ie.add){const pe=V.findIndex(({key:ve})=>ve===ie.key),Z=Hq(Vq(V,n,ie.key),x,b,S),ue=V.slice();ue.splice(pe+1,0,zq),q(ue),X(Z),re("show")}else{const pe=n.findIndex(({key:ve})=>ve===ie.key),Z=Hq(Vq(n,V,ie.key),x,b,S),ue=n.slice();ue.splice(pe+1,0,zq),q(ue),X(Z),re("hide")}else V!==n&&(G(n),q(n))},[s,n]),y.useEffect(()=>{f||se()},[f]);const de=v?K:n,te={expandedKeys:s,selectedKeys:a,loadedKeys:c,loadingKeys:u,checkedKeys:l,halfCheckedKeys:d,dragOverNodeKey:g,dropPosition:m,keyEntities:h};return y.createElement(y.Fragment,null,y.createElement("div",{className:`${r}-treenode`,"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},y.createElement("div",{className:`${r}-indent`},y.createElement("div",{ref:N,className:`${r}-indent-unit`}))),y.createElement(LD,CM({},k,{data:de,itemKey:Wq,height:b,fullHeight:!1,virtual:x,itemHeight:S,scrollWidth:T,prefixCls:`${r}-list`,ref:H,role:"tree",tabIndex:R!==!1&&!p?M:void 0,"aria-activedescendant":E?cae(B,E.key):void 0,onKeyDown:D,onFocus:A,onBlur:I,onVisibleChange:ie=>{ie.every(pe=>Wq(pe)!==Zg)&&se()}}),ie=>{const{pos:pe,data:{...Z},title:ue,key:ve,isStart:he,isEnd:me}=ie,Oe=Gx(ve,pe);delete Z.key,delete Z.children;const Pe=ww(Oe,te);return y.createElement(HHe,CM({},Z,Pe,{title:ue,active:!!E&&ve===E.key,pos:pe,data:ie.data,isStart:he,isEnd:me,motion:v,motionNodes:ve===Zg?Y:null,motionType:le,onMotionStart:F,onMotionEnd:se,treeNodeRequiredProps:te,treeId:B,onMouseMove:()=>{_(null)}}))}))});function Y$(){return Y$=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{expandedKeys:i,keyEntities:o}=this.state,{onDragStart:s}=this.props,{eventKey:a}=n;this.dragNodeProps=n,this.dragStartMousePosition={x:r.clientX,y:r.clientY};const l=Gc(i,a);this.setState({draggingNodeKey:a,dragChildrenKeys:AHe(a,o),indent:this.listRef.current.getIndentWidth()}),this.setExpandedKeys(l),window.addEventListener("dragend",this.onWindowDragEnd),s==null||s({event:r,node:Gi(n)})});Ae(this,"onNodeDragEnter",(r,n)=>{const{expandedKeys:i,keyEntities:o,dragChildrenKeys:s,flattenNodes:a,indent:l}=this.state,{onDragEnter:c,onExpand:u,allowDrop:d,direction:h}=this.props,{pos:p,eventKey:f}=n;if(this.currentMouseOverDroppableNodeKey!==f&&(this.currentMouseOverDroppableNodeKey=f),!this.dragNodeProps){this.resetDragState();return}const{dropPosition:g,dropLevelOffset:m,dropTargetKey:v,dropContainerKey:b,dropTargetPos:S,dropAllowed:x,dragOverNodeKey:T}=Bq(r,this.dragNodeProps,n,l,this.dragStartMousePosition,d,a,o,i,h);if(s.includes(v)||!x){this.resetDragState();return}if(this.delayedDragEnterLogic||(this.delayedDragEnterLogic={}),Object.keys(this.delayedDragEnterLogic).forEach(R=>{clearTimeout(this.delayedDragEnterLogic[R])}),this.dragNodeProps.eventKey!==n.eventKey&&(r.persist(),this.delayedDragEnterLogic[p]=window.setTimeout(()=>{if(this.state.draggingNodeKey===null)return;let R=[...i];const E=Ss(o,n.eventKey);E&&(E.children||[]).length&&(R=Xu(i,n.eventKey)),this.props.hasOwnProperty("expandedKeys")||this.setExpandedKeys(R),u==null||u(R,{node:Gi(n),expanded:!0,nativeEvent:r.nativeEvent})},800)),this.dragNodeProps.eventKey===v&&m===0){this.resetDragState();return}this.setState({dragOverNodeKey:T,dropPosition:g,dropLevelOffset:m,dropTargetKey:v,dropContainerKey:b,dropTargetPos:S,dropAllowed:x}),c==null||c({event:r,node:Gi(n),expandedKeys:i})});Ae(this,"onNodeDragOver",(r,n)=>{const{dragChildrenKeys:i,flattenNodes:o,keyEntities:s,expandedKeys:a,indent:l}=this.state,{onDragOver:c,allowDrop:u,direction:d}=this.props;if(!this.dragNodeProps)return;const{dropPosition:h,dropLevelOffset:p,dropTargetKey:f,dropContainerKey:g,dropTargetPos:m,dropAllowed:v,dragOverNodeKey:b}=Bq(r,this.dragNodeProps,n,l,this.dragStartMousePosition,u,o,s,a,d);i.includes(f)||!v||(this.dragNodeProps.eventKey===f&&p===0?this.state.dropPosition===null&&this.state.dropLevelOffset===null&&this.state.dropTargetKey===null&&this.state.dropContainerKey===null&&this.state.dropTargetPos===null&&this.state.dropAllowed===!1&&this.state.dragOverNodeKey===null||this.resetDragState():h===this.state.dropPosition&&p===this.state.dropLevelOffset&&f===this.state.dropTargetKey&&g===this.state.dropContainerKey&&m===this.state.dropTargetPos&&v===this.state.dropAllowed&&b===this.state.dragOverNodeKey||this.setState({dropPosition:h,dropLevelOffset:p,dropTargetKey:f,dropContainerKey:g,dropTargetPos:m,dropAllowed:v,dragOverNodeKey:b}),c==null||c({event:r,node:Gi(n)}))});Ae(this,"onNodeDragLeave",(r,n)=>{this.currentMouseOverDroppableNodeKey===n.eventKey&&!r.currentTarget.contains(r.relatedTarget)&&(this.resetDragState(),this.currentMouseOverDroppableNodeKey=null);const{onDragLeave:i}=this.props;i==null||i({event:r,node:Gi(n)})});Ae(this,"onWindowDragEnd",r=>{this.onNodeDragEnd(r,null,!0),window.removeEventListener("dragend",this.onWindowDragEnd)});Ae(this,"onNodeDragEnd",(r,n)=>{const{onDragEnd:i}=this.props;this.setState({dragOverNodeKey:null}),this.cleanDragState(),i==null||i({event:r,node:Gi(n)}),this.dragNodeProps=null,window.removeEventListener("dragend",this.onWindowDragEnd)});Ae(this,"onNodeDrop",(r,n,i=!1)=>{var g;const{dragChildrenKeys:o,dropPosition:s,dropTargetKey:a,dropTargetPos:l,dropAllowed:c}=this.state;if(!c)return;const{onDrop:u}=this.props;if(this.setState({dragOverNodeKey:null}),this.cleanDragState(),a===null)return;const d={...ww(a,this.getTreeNodeRequiredProps()),active:((g=this.getActiveItem())==null?void 0:g.key)===a,data:Ss(this.state.keyEntities,a).node},h=o.includes(a);Hn(!h,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");const p=q3(l),f={event:r,node:Gi(d),dragNode:this.dragNodeProps?Gi(this.dragNodeProps):null,dragNodesKeys:[this.dragNodeProps.eventKey].concat(o),dropToGap:s!==0,dropPosition:s+Number(p[p.length-1])};i||u==null||u(f),this.dragNodeProps=null});Ae(this,"cleanDragState",()=>{const{draggingNodeKey:r}=this.state;r!==null&&this.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),this.dragStartMousePosition=null,this.currentMouseOverDroppableNodeKey=null});Ae(this,"triggerExpandActionExpand",(r,n)=>{const{expandedKeys:i,flattenNodes:o}=this.state,{expanded:s,key:a,isLeaf:l}=n;if(l||r.shiftKey||r.metaKey||r.ctrlKey)return;const c=o.filter(d=>d.key===a)[0],u=Gi({...ww(a,this.getTreeNodeRequiredProps()),data:c.data});this.setExpandedKeys(s?Gc(i,a):Xu(i,a)),this.onNodeExpand(r,u)});Ae(this,"onNodeClick",(r,n)=>{const{onClick:i,expandAction:o}=this.props;o==="click"&&this.triggerExpandActionExpand(r,n),i==null||i(r,n)});Ae(this,"onNodeDoubleClick",(r,n)=>{const{onDoubleClick:i,expandAction:o}=this.props;o==="doubleClick"&&this.triggerExpandActionExpand(r,n),i==null||i(r,n)});Ae(this,"onNodeSelect",(r,n)=>{let{selectedKeys:i}=this.state;const{keyEntities:o,fieldNames:s}=this.state,{onSelect:a,multiple:l}=this.props,{selected:c}=n,u=n[s.key],d=!c;d?l?i=Xu(i,u):i=[u]:i=Gc(i,u);const h=i.map(p=>{const f=Ss(o,p);return f?f.node:null}).filter(Boolean);this.setUncontrolledState({selectedKeys:i}),a==null||a(i,{event:"select",selected:d,node:n,selectedNodes:h,nativeEvent:r.nativeEvent})});Ae(this,"onNodeCheck",(r,n,i)=>{const{keyEntities:o,checkedKeys:s,halfCheckedKeys:a}=this.state,{checkStrictly:l,onCheck:c}=this.props,{key:u}=n;let d;const h={event:"check",node:n,checked:i,nativeEvent:r.nativeEvent};if(l){const p=i?Xu(s,u):Gc(s,u),f=Gc(a,u);d={checked:p,halfChecked:f},h.checkedNodes=p.map(g=>Ss(o,g)).filter(Boolean).map(g=>g.node),this.setUncontrolledState({checkedKeys:p})}else{let{checkedKeys:p,halfCheckedKeys:f}=fy([...s,u],!0,o);if(!i){const g=new Set(p);g.delete(u),{checkedKeys:p,halfCheckedKeys:f}=fy(Array.from(g),{halfCheckedKeys:f},o)}d=p,h.checkedNodes=[],h.checkedNodesPositions=[],h.halfCheckedKeys=f,p.forEach(g=>{const m=Ss(o,g);if(!m)return;const{node:v,pos:b}=m;h.checkedNodes.push(v),h.checkedNodesPositions.push({node:v,pos:b})}),this.setUncontrolledState({checkedKeys:p},!1,{halfCheckedKeys:f})}c==null||c(d,h)});Ae(this,"onNodeLoad",r=>{var a;const{key:n}=r,{keyEntities:i}=this.state,o=Ss(i,n);if((a=o==null?void 0:o.children)!=null&&a.length)return;const s=new Promise((l,c)=>{this.setState(({loadedKeys:u=[],loadingKeys:d=[]})=>{const{loadData:h,onLoad:p}=this.props;return!h||u.includes(n)||d.includes(n)?null:(h(r).then(()=>{const{loadedKeys:g}=this.state,m=Xu(g,n);p==null||p(m,{event:"load",node:r}),this.setUncontrolledState({loadedKeys:m}),this.setState(v=>({loadingKeys:Gc(v.loadingKeys,n)})),l()}).catch(g=>{if(this.setState(m=>({loadingKeys:Gc(m.loadingKeys,n)})),this.loadingRetryTimes[n]=(this.loadingRetryTimes[n]||0)+1,this.loadingRetryTimes[n]>=jHe){const{loadedKeys:m}=this.state;Hn(!1,"Retry for `loadData` many times but still failed. No more retry."),this.setUncontrolledState({loadedKeys:Xu(m,n)}),l()}c(g)}),{loadingKeys:Xu(d,n)})})});return s.catch(()=>{}),s});Ae(this,"onNodeMouseEnter",(r,n)=>{const{onMouseEnter:i}=this.props;i==null||i({event:r,node:n})});Ae(this,"onNodeMouseLeave",(r,n)=>{const{onMouseLeave:i}=this.props;i==null||i({event:r,node:n})});Ae(this,"onNodeContextMenu",(r,n)=>{const{onRightClick:i}=this.props;i&&(r.preventDefault(),i({event:r,node:n}))});Ae(this,"onFocus",(...r)=>{var l;const{onFocus:n,disabled:i}=this.props,{activeKey:o,selectedKeys:s,flattenNodes:a}=this.state;if(!i&&o===null){const c=s.find(u=>a.some(d=>d.key===u));c!==void 0?this.onActiveChange(c):this.onActiveChange(((l=a==null?void 0:a[0])==null?void 0:l.key)||null)}n==null||n(...r)});Ae(this,"onBlur",(...r)=>{const{onBlur:n}=this.props;this.onActiveChange(null),n==null||n(...r)});Ae(this,"getTreeNodeRequiredProps",()=>{const{expandedKeys:r,selectedKeys:n,loadedKeys:i,loadingKeys:o,checkedKeys:s,halfCheckedKeys:a,dragOverNodeKey:l,dropPosition:c,keyEntities:u}=this.state;return{expandedKeys:r||[],selectedKeys:n||[],loadedKeys:i||[],loadingKeys:o||[],checkedKeys:s||[],halfCheckedKeys:a||[],dragOverNodeKey:l,dropPosition:c,keyEntities:u}});Ae(this,"setExpandedKeys",r=>{const{treeData:n,fieldNames:i}=this.state,o=V_(n,r,i);this.setUncontrolledState({expandedKeys:r,flattenNodes:o},!0)});Ae(this,"onNodeExpand",(r,n)=>{let{expandedKeys:i}=this.state;const{listChanging:o,fieldNames:s}=this.state,{onExpand:a,loadData:l}=this.props,{expanded:c}=n,u=n[s.key];if(o)return;const d=i.includes(u),h=!c;if(Hn(c&&d||!c&&!d,"Expand state not sync with index check"),i=h?Xu(i,u):Gc(i,u),this.setExpandedKeys(i),a==null||a(i,{node:n,expanded:h,nativeEvent:r.nativeEvent}),h&&l){const p=this.onNodeLoad(n);p&&p.then(()=>{const f=V_(this.state.treeData,i,s);this.setUncontrolledState({flattenNodes:f})}).catch(()=>{const{expandedKeys:f}=this.state,g=Gc(f,u);this.setExpandedKeys(g)})}});Ae(this,"onListChangeStart",()=>{this.setUncontrolledState({listChanging:!0})});Ae(this,"onListChangeEnd",()=>{setTimeout(()=>{this.setUncontrolledState({listChanging:!1})})});Ae(this,"onActiveChange",r=>{const{activeKey:n}=this.state,{onActiveChange:i,itemScrollOffset:o=0}=this.props;n!==r&&(this.setState({activeKey:r}),r!==null&&this.scrollTo({key:r,offset:o}),i==null||i(r))});Ae(this,"getActiveItem",()=>{const{activeKey:r,flattenNodes:n}=this.state;return r===null?null:n.find(({key:i})=>i===r)||null});Ae(this,"offsetActiveKey",r=>{const{flattenNodes:n,activeKey:i}=this.state;let o=n.findIndex(({key:a})=>a===i);o===-1&&r<0&&(o=n.length),o=(o+r+n.length)%n.length;const s=n[o];if(s){const{key:a}=s;this.onActiveChange(a)}else this.onActiveChange(null)});Ae(this,"onKeyDown",r=>{var f,g,m;const{activeKey:n,expandedKeys:i,checkedKeys:o,flattenNodes:s,keyEntities:a}=this.state,{onKeyDown:l,checkable:c,selectable:u,disabled:d,loadData:h}=this.props;if(d)return;switch(r.key){case"ArrowUp":{this.offsetActiveKey(-1),r.preventDefault();break}case"ArrowDown":{this.offsetActiveKey(1),r.preventDefault();break}case"Home":{this.onActiveChange((f=s==null?void 0:s[0])==null?void 0:f.key),r.preventDefault();break}case"End":{this.onActiveChange((g=s==null?void 0:s[s.length-1])==null?void 0:g.key),r.preventDefault();break}}const p=this.getActiveItem();if(p&&p.data){const v=this.getTreeNodeRequiredProps(),b=Gi({...ww(n,v),data:p.data,active:!0}),S=Ss(a,n),x=!!((m=S==null?void 0:S.children)!=null&&m.length),T=!Vce(p.data.isLeaf,h,x,b.loaded),R=c&&!b.disabled&&b.checkable!==!1&&!b.disableCheckbox,E=!c&&u&&!b.disabled&&b.selectable!==!1;switch(r.key){case"ArrowLeft":{T&&i.includes(n)?this.onNodeExpand({},b):p.parent&&this.onActiveChange(p.parent.key),r.preventDefault();break}case"ArrowRight":{T&&!i.includes(n)?this.onNodeExpand({},b):p.children&&p.children.length&&this.onActiveChange(p.children[0].key),r.preventDefault();break}case"Enter":{T?(r.preventDefault(),this.onNodeExpand({},b)):R?o.includes(n)||(r.preventDefault(),this.onNodeCheck({},b,!0)):E&&!b.selected&&(r.preventDefault(),this.onNodeSelect({},b));break}case" ":{R?(r.preventDefault(),this.onNodeCheck({},b,!o.includes(n))):E&&(r.preventDefault(),this.onNodeSelect({},b));break}}}l==null||l(r)});Ae(this,"setUncontrolledState",(r,n=!1,i=null)=>{if(!this.destroyed){let o=!1,s=!0;const a={};Object.keys(r).forEach(l=>{if(this.props.hasOwnProperty(l)){s=!1;return}o=!0,a[l]=r[l]}),o&&(!n||s)&&this.setState({...a,...i})}});Ae(this,"scrollTo",r=>{this.listRef.current.scrollTo(r)})}componentDidMount(){this.destroyed=!1,this.onUpdated()}componentDidUpdate(){this.onUpdated()}onUpdated(){const{activeKey:r,itemScrollOffset:n=0}=this.props;r!==void 0&&r!==this.state.activeKey&&(this.setState({activeKey:r}),r!==null&&this.scrollTo({key:r,offset:n}))}componentWillUnmount(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}static getDerivedStateFromProps(r,n){const{prevProps:i}=n,o={prevProps:r};function s(u){return!i&&r.hasOwnProperty(u)||i&&i[u]!==r[u]}let a,{fieldNames:l}=n;if(s("fieldNames")&&(l=Ny(r.fieldNames),o.fieldNames=l),s("treeData")?{treeData:a}=r:s("children")&&(Hn(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),a=Gce(r.children)),a){o.treeData=a;const u=k3(a,{fieldNames:l});o.keyEntities={[Zg]:jue,...u.keyEntities}}const c=o.keyEntities||n.keyEntities;if(s("expandedKeys")||i&&s("autoExpandParent"))o.expandedKeys=r.autoExpandParent||!i&&r.defaultExpandParent?H$(r.expandedKeys,c):r.expandedKeys;else if(!i&&r.defaultExpandAll){const u={...c};delete u[Zg];const d=[];Object.keys(u).forEach(h=>{const p=u[h];p.children&&p.children.length&&d.push(p.key)}),o.expandedKeys=d}else!i&&r.defaultExpandedKeys&&(o.expandedKeys=r.autoExpandParent||r.defaultExpandParent?H$(r.defaultExpandedKeys,c):r.defaultExpandedKeys);if(o.expandedKeys||delete o.expandedKeys,a||o.expandedKeys){const u=V_(a||n.treeData,o.expandedKeys||n.expandedKeys,l);o.flattenNodes=u}if(r.selectable&&(s("selectedKeys")?o.selectedKeys=$q(r.selectedKeys,r):!i&&r.defaultSelectedKeys&&(o.selectedKeys=$q(r.defaultSelectedKeys,r))),r.checkable){let u;if(s("checkedKeys")?u=X_(r.checkedKeys)||{}:!i&&r.defaultCheckedKeys?u=X_(r.defaultCheckedKeys)||{}:a&&(u=X_(r.checkedKeys)||{checkedKeys:n.checkedKeys,halfCheckedKeys:n.halfCheckedKeys}),u){let{checkedKeys:d=[],halfCheckedKeys:h=[]}=u;r.checkStrictly||({checkedKeys:d,halfCheckedKeys:h}=fy(d,!0,c)),o.checkedKeys=d,o.halfCheckedKeys=h}}return s("loadedKeys")&&(o.loadedKeys=r.loadedKeys),o}resetDragState(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}render(){const{flattenNodes:r,keyEntities:n,draggingNodeKey:i,dropLevelOffset:o,dropContainerKey:s,dropTargetKey:a,dropPosition:l,dragOverNodeKey:c,indent:u}=this.state,{prefixCls:d,className:h,style:p,styles:f,classNames:g,showLine:m,focusable:v,tabIndex:b=0,selectable:S,showIcon:x,icon:T,switcherIcon:R,draggable:E,checkable:M,checkStrictly:D,disabled:A,motion:I,loadData:_,filterTreeNode:F,height:O,itemHeight:k,scrollWidth:B,virtual:H,titleRender:N,dropIndicatorRender:z,onContextMenu:U,onScroll:V,direction:G,rootClassName:K,rootStyle:q}=this.props,Y=hi(this.props,{aria:!0,data:!0});let X;E&&(typeof E=="object"?X=E:typeof E=="function"?X={nodeDraggable:E}:X={});const le={styles:f,classNames:g,prefixCls:d,selectable:S,showIcon:x,icon:T,switcherIcon:R,draggable:X,draggingNodeKey:i,checkable:M,checkStrictly:D,disabled:A,keyEntities:n,dropLevelOffset:o,dropContainerKey:s,dropTargetKey:a,dropPosition:l,dragOverNodeKey:c,indent:u,direction:G,dropIndicatorRender:z,loadData:_,filterTreeNode:F,titleRender:N,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return y.createElement(K3.Provider,{value:le},y.createElement("div",{className:ee(d,h,K,{[`${d}-show-line`]:m}),style:q},y.createElement(UHe,Y$({ref:this.listRef,prefixCls:d,style:p,data:r,disabled:A,selectable:S,checkable:!!M,motion:I,dragging:i!==null,height:O,itemHeight:k,virtual:H,focusable:v,tabIndex:b,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:U,onScroll:V,scrollWidth:B},this.getTreeNodeRequiredProps(),Y))))}},Ae(GR,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:VHe,allowDrop:()=>!0,expandAction:!1}),Ae(GR,"TreeNode",S0),GR);var qHe={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 42h216v494z"}}]},name:"file",theme:"outlined"};function X$(){return X$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,X$({},e,{ref:t,icon:qHe})),Kue=y.forwardRef(YHe);var XHe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};function Z$(){return Z$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,Z$({},e,{ref:t,icon:XHe})),JHe=y.forwardRef(ZHe);var QHe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"};function J$(){return J$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,J$({},e,{ref:t,icon:QHe})),t3e=y.forwardRef(e3e);var r3e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"};function Q$(){return Q$=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,Q$({},e,{ref:t,icon:r3e})),i3e=y.forwardRef(n3e),o3e=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:r,directoryNodeSelectedColor:n,motionDurationMid:i,borderRadius:o,controlItemBgHover:s})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:"static",[`&:has(${e}-drop-indicator)`]:{position:"relative"},[`> *:not(${e}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${i}`,content:'""',borderRadius:o},"&:hover:before":{background:s}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:r,borderRadius:o,[`${e}-switcher, ${e}-draggable-icon`]:{color:n},[`${e}-node-content-wrapper`]:{color:n,background:"transparent","&, &:hover":{color:n},"&:before, &:hover:before":{background:r}}}}}),s3e=new Zr("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),a3e=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),l3e=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${ae(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),c3e=(e,t)=>{const{treeCls:r,treeNodeCls:n,treeNodePadding:i,titleHeight:o,indentSize:s,switcherSize:a,motionDurationMid:l,nodeSelectedBg:c,nodeHoverBg:u,colorTextQuaternary:d,controlItemBgActiveDisabled:h}=t;return{[r]:{...cn(t),"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${r}-rtl ${r}-switcher_close ${r}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`${r}-list`]:{"&:focus-visible":{outline:"none",[`${n}-active ${r}-node-content-wrapper`]:{...uc(t)}}},[`${r}-list-holder-inner`]:{alignItems:"flex-start"},[`&${r}-block-node`]:{[`${r}-list-holder-inner`]:{alignItems:"stretch",[`${r}-node-content-wrapper`]:{flex:"auto"},[`${n}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:s3e,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[n]:{display:"flex",alignItems:"flex-start",marginBottom:i,lineHeight:ae(o),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:i},[`&-disabled ${r}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${r}-checkbox-disabled + ${r}-node-selected,&${n}-disabled${n}-selected ${r}-node-content-wrapper`]:{backgroundColor:h},[`${r}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${n}-disabled)`]:{[`${r}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${r}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${n}-disabled).filter-node ${r}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:"grab",[`${r}-draggable-icon`]:{flexShrink:0,width:a,textAlign:"center",visibility:"visible",color:d},[`&${n}-disabled ${r}-draggable-icon`]:{visibility:"hidden"}}},[`${r}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:s}},[`${r}-draggable-icon`]:{visibility:"hidden"},[`${r}-switcher, ${r}-checkbox`]:{marginInlineEnd:t.calc(t.calc(a).sub(t.controlInteractiveSize)).div(2).equal()},[`${r}-checkbox`]:{flexShrink:0},[`${r}-switcher`]:{...a3e(e,t),position:"relative",flex:"none",alignSelf:"stretch",width:a,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:a,height:o,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${r}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${r}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(a).div(2).equal()).mul(.8).equal(),height:t.calc(o).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}},[`${r}-node-content-wrapper`]:{position:"relative",minHeight:o,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:[`all ${l}`,"border 0s","line-height 0s","box-shadow 0s"].join(", "),...l3e(e,t),"&:hover":{backgroundColor:u},[`&${r}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:c},[`${r}-iconEle`]:{display:"inline-block",width:a,height:o,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${r}-unselectable ${r}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${r}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(i).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${r}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${n}-leaf-last ${r}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${ae(t.calc(o).div(2).equal())} !important`}}}},u3e=(e,t,r=!0)=>{const n=`.${e}`,i=`${n}-treenode`,o=t.calc(t.paddingXS).div(2).equal(),s=Wr(t,{treeCls:n,treeNodeCls:i,treeNodePadding:o});return[c3e(e,s),r&&o3e(s)].filter(Boolean)},d3e=e=>{const{controlHeightSM:t,controlItemBgHover:r,controlItemBgActive:n}=e,i=t;return{titleHeight:i,switcherSize:i,indentSize:i,nodeHoverBg:r,nodeHoverColor:e.colorText,nodeSelectedBg:n,nodeSelectedColor:e.colorText}},h3e=e=>{const{colorTextLightSolid:t,colorPrimary:r}=e;return{...d3e(e),directoryNodeSelectedColor:t,directoryNodeSelectedBg:r}},p3e=Yr("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:Hce(`${t}-checkbox`,e)},u3e(t,e),$ae(e)],h3e),Uq=4;function f3e(e){const{dropPosition:t,dropLevelOffset:r,prefixCls:n,indent:i,direction:o="ltr"}=e,s=o==="ltr"?"left":"right",a=o==="ltr"?"right":"left",l={[s]:-r*i+Uq,[a]:0};switch(t){case-1:l.top=-3;break;case 1:l.bottom=-3;break;default:l.bottom=-3,l[s]=i+Uq;break}return Q.createElement("div",{style:l,className:`${n}-drop-indicator`})}var g3e={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"};function eG(){return eG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,eG({},e,{ref:t,icon:g3e})),v3e=y.forwardRef(m3e);var y3e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 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:"minus-square",theme:"outlined"};function tG(){return tG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,tG({},e,{ref:t,icon:y3e})),b3e=y.forwardRef(C3e);var S3e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 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:"plus-square",theme:"outlined"};function rG(){return rG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,rG({},e,{ref:t,icon:S3e})),x3e=y.forwardRef(w3e),T3e=e=>{var h,p;const{prefixCls:t,switcherIcon:r,treeNodeProps:n,showLine:i,switcherLoadingIcon:o}=e,{isLeaf:s,expanded:a,loading:l}=n;if(l)return y.isValidElement(o)?o:y.createElement(Tx,{className:`${t}-switcher-loading-icon`});let c;if(i&&typeof i=="object"&&(c=i.showLeafIcon),s){if(!i)return null;if(typeof c!="boolean"&&c){const f=typeof c=="function"?c(n):c,g=`${t}-switcher-line-custom-icon`;return y.isValidElement(f)?Ui(f,{className:ee((h=f.props)==null?void 0:h.className,g)}):f}return c?y.createElement(Kue,{className:`${t}-switcher-line-icon`}):y.createElement("span",{className:`${t}-switcher-leaf-line`})}const u=`${t}-switcher-icon`,d=typeof r=="function"?r(n):r;return y.isValidElement(d)?Ui(d,{className:ee((p=d.props)==null?void 0:p.className,u)}):d!==void 0?d:i?a?y.createElement(b3e,{className:`${t}-switcher-line-icon`}):y.createElement(x3e,{className:`${t}-switcher-line-icon`}):y.createElement(v3e,{className:u})},que=Q.forwardRef((e,t)=>{var Y;const{getPrefixCls:r,direction:n,className:i,style:o,classNames:s,styles:a}=Ur("tree"),{virtual:l}=Q.useContext(or),{prefixCls:c,className:u,showIcon:d=!1,showLine:h,switcherIcon:p,switcherLoadingIcon:f,blockNode:g=!1,children:m,checkable:v=!1,selectable:b=!0,draggable:S,disabled:x,motion:T,style:R,rootClassName:E,classNames:M,styles:D}=e,A=Q.useContext(Rs),I=x??A,_=r("tree",c),F=r(),O=T??{...kae(F),motionAppear:!1},k={...e,showIcon:d,blockNode:g,checkable:v,selectable:b,disabled:I,motion:O},[B,H]=jr([s,M],[a,D],{props:k}),N={...k,showLine:!!h,dropIndicatorRender:f3e},[z,U]=p3e(_),[,V]=ds(),G=V.paddingXS/2+(((Y=V.Tree)==null?void 0:Y.titleHeight)||V.controlHeightSM),K=Q.useMemo(()=>{if(!S)return!1;let X={};switch(typeof S){case"function":X.nodeDraggable=S;break;case"object":X={...S};break}return X.icon!==!1&&(X.icon=X.icon||Q.createElement(i3e,null)),X},[S]),q=X=>Q.createElement(T3e,{prefixCls:_,switcherIcon:p,switcherLoadingIcon:f,treeNodeProps:X,showLine:h});return Q.createElement(KHe,{itemHeight:G,ref:t,virtual:l,...N,prefixCls:_,className:ee({[`${_}-icon-hide`]:!d,[`${_}-block-node`]:g,[`${_}-unselectable`]:!b,[`${_}-rtl`]:n==="rtl",[`${_}-disabled`]:I},i,u,z,U),style:{...o,...R},rootClassName:ee(B==null?void 0:B.root,E),rootStyle:H==null?void 0:H.root,classNames:B,styles:H,direction:n,checkable:v&&Q.createElement("span",{className:`${_}-checkbox-inner`}),selectable:b,switcherIcon:q,draggable:K},m)}),jq=0,Z_=1,Kq=2;function Y3(e,t,r){const{key:n,children:i}=r;function o(s){const a=s[n],l=s[i];t(a,s)!==!1&&Y3(l||[],t,r)}e.forEach(o)}function E3e({treeData:e,expandedKeys:t,startKey:r,endKey:n,fieldNames:i}){const o=[];let s=jq;if(r&&r===n)return[r];if(!r||!n)return[];function a(l){return l===r||l===n}return Y3(e,l=>{if(s===Kq)return!1;if(a(l)){if(o.push(l),s===jq)s=Z_;else if(s===Z_)return s=Kq,!1}else s===Z_&&o.push(l);return t.includes(l)},Ny(i)),o}function J_(e,t,r){const n=Nr(t),i=[];return Y3(e,(o,s)=>{const a=n.indexOf(o);return a!==-1&&(i.push(s),n.splice(a,1)),!!n.length},Ny(r)),i}function R3e(e){const{isLeaf:t,expanded:r}=e;return t?y.createElement(Kue,null):r?y.createElement(JHe,null):y.createElement(t3e,null)}function qq({treeData:e,children:t}){return e||Gce(t)}const P3e=y.forwardRef((e,t)=>{const{defaultExpandAll:r,defaultExpandParent:n,defaultExpandedKeys:i,...o}=e,s=y.useRef(null),a=y.useRef(null),l=()=>{const{keyEntities:M}=k3(qq(o),{fieldNames:o.fieldNames});let D;const A=o.expandedKeys||i||[];return r?D=Object.keys(M):n?D=H$(A,M):D=A,D},[c,u]=y.useState(o.selectedKeys||o.defaultSelectedKeys||[]),[d,h]=y.useState(()=>l());y.useEffect(()=>{"selectedKeys"in o&&u(o.selectedKeys)},[o.selectedKeys]),y.useEffect(()=>{"expandedKeys"in o&&h(o.expandedKeys)},[o.expandedKeys]);const p=(M,D)=>{var A;return"expandedKeys"in o||h(M),(A=o.onExpand)==null?void 0:A.call(o,M,D)},f=(M,D)=>{var U;const{multiple:A,fieldNames:I}=o,{node:_,nativeEvent:F}=D,{key:O=""}=_,k=qq(o),B={...D,selected:!0},H=(F==null?void 0:F.ctrlKey)||(F==null?void 0:F.metaKey),N=F==null?void 0:F.shiftKey;let z;A&&H?(z=M,s.current=O,a.current=z,B.selectedNodes=J_(k,z,I)):A&&N?(z=Array.from(new Set([].concat(Nr(a.current||[]),Nr(E3e({treeData:k,expandedKeys:d,startKey:O,endKey:s.current,fieldNames:I}))))),B.selectedNodes=J_(k,z,I)):(z=[O],s.current=O,a.current=z,B.selectedNodes=J_(k,z,I)),(U=o.onSelect)==null||U.call(o,z,B),"selectedKeys"in o||u(z)},{getPrefixCls:g,direction:m}=y.useContext(or),{prefixCls:v,className:b,showIcon:S=!0,expandAction:x="click",...T}=o,R=g("tree",v),E=ee(`${R}-directory`,{[`${R}-directory-rtl`]:m==="rtl"},b);return y.createElement(que,{icon:R3e,ref:t,blockNode:!0,...T,showIcon:S,expandAction:x,prefixCls:R,className:E,expandedKeys:d,selectedKeys:c,onSelect:f,onExpand:p})}),X3=que;X3.DirectoryTree=P3e;X3.TreeNode=S0;const Yue=Q.createContext(!1),Yq=e=>{const{value:t,filterSearch:r,tablePrefixCls:n,locale:i,onChange:o}=e;return r?y.createElement("div",{className:`${n}-filter-dropdown-search`},y.createElement(Vx,{prefix:y.createElement(y3,null),placeholder:i.filterSearchPlaceholder,onChange:o,value:t,htmlSize:1,className:`${n}-filter-dropdown-search-input`})):null},M3e=e=>{const{keyCode:t}=e;t===Xt.ENTER&&e.stopPropagation()},I3e=y.forwardRef((e,t)=>y.createElement("div",{className:e.className,onClick:r=>r.stopPropagation(),onKeyDown:M3e,ref:t},e.children));function gy(e){let t=[];return(e||[]).forEach(({value:r,children:n})=>{t.push(r),n&&(t=[].concat(Nr(t),Nr(gy(n))))}),t}function D3e(e){return e.some(({children:t})=>t)}function Xue(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function Zue({filters:e,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:i,filterSearch:o}){return e.map((s,a)=>{const l=String(s.value);if(s.children)return{key:l||a,label:s.text,popupClassName:`${t}-dropdown-submenu`,children:Zue({filters:s.children,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:i,filterSearch:o})};const c=n?By:$x,u={key:s.value!==void 0?l:a,label:y.createElement(y.Fragment,null,y.createElement(c,{checked:r.includes(l)}),y.createElement("span",null,s.text))};return i.trim()?typeof o=="function"?o(i,s)?u:null:Xue(i,s.text)?u:null:u})}function Q_(e){return e||[]}const A3e=e=>{var ve;const{tablePrefixCls:t,prefixCls:r,column:n,dropdownPrefixCls:i,columnKey:o,filterOnClose:s,filterMultiple:a,filterMode:l="menu",filterSearch:c=!1,filterState:u,triggerFilter:d,locale:h,children:p,getPopupContainer:f,rootClassName:g}=e,{filterResetToDefaultFilteredValue:m,defaultFilteredValue:v,filterDropdownProps:b={},filterDropdownOpen:S,onFilterDropdownOpenChange:x}=n,[T,R]=y.useState(!1),E=y.useContext(Yue),M=!!(u&&((ve=u.filteredKeys)!=null&&ve.length||u.forceFiltered)),D=he=>{var me;R(he),(me=b.onOpenChange)==null||me.call(b,he),x==null||x(he)},A=b.open??S??T,I=u==null?void 0:u.filteredKeys,[_,F]=eAe(Q_(I)),O=({selectedKeys:he})=>{F(he)},k=(he,{node:me,checked:Oe})=>{O(a?{selectedKeys:he}:{selectedKeys:Oe&&me.key?[me.key]:[]})};y.useEffect(()=>{T&&O({selectedKeys:Q_(I)})},[I]);const[B,H]=y.useState([]),N=he=>{H(he)},[z,U]=y.useState(""),V=he=>{const{value:me}=he.target;U(me)};y.useEffect(()=>{T||U("")},[T]);const G=he=>{const me=he!=null&&he.length?he:null;if(me===null&&(!u||!u.filteredKeys)||cc(me,u==null?void 0:u.filteredKeys,!0))return null;d({column:n,key:o,filteredKeys:me})},K=()=>{D(!1),G(_())},q=({confirm:he,closeDropdown:me}={confirm:!1,closeDropdown:!1})=>{he&&G([]),me&&D(!1),U(""),F(m?(v||[]).map(String):[])},Y=({closeDropdown:he}={closeDropdown:!0})=>{he&&D(!1),G(_())},X=(he,me)=>{me.source==="trigger"&&(he&&I!==void 0&&F(Q_(I)),D(he),!he&&!n.filterDropdown&&s&&K())},le=ee({[`${i}-menu-without-submenu`]:!D3e(n.filters||[])}),re=he=>{if(he.target.checked){const me=gy(n==null?void 0:n.filters).map(String);F(me)}else F([])},ne=({filters:he})=>(he||[]).map((me,Oe)=>{const Pe=String(me.value),Me={title:me.text,key:me.value!==void 0?Pe:String(Oe)};return me.children&&(Me.children=ne({filters:me.children})),Me}),se=he=>{var me;return{...he,text:he.title,value:he.key,children:((me=he.children)==null?void 0:me.map(se))||[]}};let de;const{direction:te,renderEmpty:ie}=y.useContext(or);if(typeof n.filterDropdown=="function")de=n.filterDropdown({prefixCls:`${i}-custom`,setSelectedKeys:he=>O({selectedKeys:he}),selectedKeys:_(),confirm:Y,clearFilters:q,filters:n.filters,visible:A,close:()=>{D(!1)}});else if(n.filterDropdown)de=n.filterDropdown;else{const he=_()||[],me=()=>{const Pe=(ie==null?void 0:ie("Table.filter"))??y.createElement(nd,{image:nd.PRESENTED_IMAGE_SIMPLE,description:h.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((n.filters||[]).length===0)return Pe;if(l==="tree")return y.createElement(y.Fragment,null,y.createElement(Yq,{filterSearch:c,value:z,onChange:V,tablePrefixCls:t,locale:h}),y.createElement("div",{className:`${t}-filter-dropdown-tree`},a?y.createElement(By,{checked:he.length===gy(n.filters).length,indeterminate:he.length>0&&he.lengthtypeof c=="function"?c(z,se(Ge)):Xue(z,Ge.title):void 0})));const Me=Zue({filters:n.filters||[],filterSearch:c,prefixCls:r,filteredKeys:_(),filterMultiple:a,searchValue:z}),He=Me.every(Ge=>Ge===null);return y.createElement(y.Fragment,null,y.createElement(Yq,{filterSearch:c,value:z,onChange:V,tablePrefixCls:t,locale:h}),He?Pe:y.createElement(TC,{selectable:!0,multiple:a,prefixCls:`${i}-menu`,className:le,onSelect:O,onDeselect:O,selectedKeys:he,getPopupContainer:f,openKeys:B,onOpenChange:N,items:Me}))},Oe=()=>m?cc((v||[]).map(String),he,!0):he.length===0;de=y.createElement(y.Fragment,null,me(),y.createElement("div",{className:`${r}-dropdown-btns`},y.createElement(Cl,{type:"link",size:"small",disabled:Oe(),onClick:()=>q()},h.filterReset),y.createElement(Cl,{type:"primary",size:"small",onClick:K},h.filterConfirm)))}n.filterDropdown&&(de=y.createElement(hce,{selectable:void 0},de)),de=y.createElement(I3e,{className:`${r}-dropdown`},de);const Z=(()=>{let he;return typeof n.filterIcon=="function"?he=n.filterIcon(M):n.filterIcon?he=n.filterIcon:he=y.createElement(GHe,null),y.createElement("span",{role:"button",tabIndex:-1,className:ee(`${r}-trigger`,{active:M}),onClick:me=>{me.stopPropagation()}},he)})();if(E)return y.createElement("div",{className:`${r}-column`},y.createElement("span",{className:`${t}-column-title`},p),Z);const ue=g0({trigger:["click"],placement:te==="rtl"?"bottomLeft":"bottomRight",children:Z,getPopupContainer:f},{...b,rootClassName:ee(g,b.rootClassName),open:A,onOpenChange:X,popupRender:()=>typeof(b==null?void 0:b.dropdownRender)=="function"?b.dropdownRender(de):de});return y.createElement("div",{className:`${r}-column`},y.createElement("span",{className:`${t}-column-title`},p),y.createElement(G3,{...ue}))},nG=(e,t,r)=>{let n=[];return(e||[]).forEach((i,o)=>{const s=AC(o,r),a=i.filterDropdown!==void 0;if(i.filters||a||"onFilter"in i)if("filteredValue"in i){let l=i.filteredValue;a||(l=(l==null?void 0:l.map(String))??l),n.push({column:i,key:wp(i,s),filteredKeys:l,forceFiltered:i.filtered})}else n.push({column:i,key:wp(i,s),filteredKeys:t&&i.defaultFilteredValue?i.defaultFilteredValue:void 0,forceFiltered:i.filtered});"children"in i&&(n=[].concat(Nr(n),Nr(nG(i.children,t,s))))}),n};function Jue(e,t,r,n,i,o,s,a,l){return r.map((c,u)=>{const d=AC(u,a),{filterOnClose:h=!0,filterMultiple:p=!0,filterMode:f,filterSearch:g}=c;let m=c;if(m.filters||m.filterDropdown){const v=wp(m,d),b=n.find(({key:S})=>v===S);m={...m,title:S=>y.createElement(A3e,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:m,columnKey:v,filterState:b,filterOnClose:h,filterMultiple:p,filterMode:f,filterSearch:g,triggerFilter:o,locale:i,getPopupContainer:s,rootClassName:l},jD(c.title,S))}}return"children"in m&&(m={...m,children:Jue(e,t,m.children,n,i,o,s,d,l)}),m})}const Xq=e=>{const t={};return e.forEach(({key:r,filteredKeys:n,column:i})=>{const o=r,{filters:s,filterDropdown:a}=i;if(a)t[o]=n||null;else if(Array.isArray(n)){const l=gy(s);t[o]=l.filter(c=>n.includes(String(c)))}else t[o]=null}),t},iG=(e,t,r)=>t.reduce((i,o)=>{const{column:{onFilter:s,filters:a},filteredKeys:l}=o;return s&&l&&l.length?i.map(c=>({...c})).filter(c=>l.some(u=>{const d=gy(a),h=d.findIndex(f=>String(f)===String(u)),p=h!==-1?d[h]:u;return c[r]&&(c[r]=iG(c[r],t,r)),s(p,c)})):i},e),Que=e=>e.flatMap(t=>"children"in t?[t].concat(Nr(Que(t.children||[]))):[t]),F3e=e=>{const{prefixCls:t,dropdownPrefixCls:r,mergedColumns:n,onFilterChange:i,getPopupContainer:o,locale:s,rootClassName:a}=e;CC();const l=y.useMemo(()=>Que(n||[]),[n]),[c,u]=y.useState(()=>nG(l,!0)),d=y.useMemo(()=>{const g=nG(l,!1);if(g.length===0)return g;let m=!0;if(g.forEach(({filteredKeys:v})=>{v!==void 0&&(m=!1)}),m){const v=(l||[]).map((b,S)=>wp(b,AC(S)));return c.filter(({key:b})=>v.includes(b)).map(b=>{const S=l[v.indexOf(b.key)];return{...b,column:{...b.column,...S},forceFiltered:S.filtered}})}return g},[l,c]),h=y.useMemo(()=>Xq(d),[d]),p=g=>{const m=d.filter(({key:v})=>v!==g.key);m.push(g),u(m),i(Xq(m),m)};return[g=>Jue(t,r,g,d,s,p,o,void 0,a),d,h]},L3e=(e,t,r)=>{const n=y.useRef({});function i(o){var s;if(!n.current||n.current.data!==e||n.current.childrenColumnName!==t||n.current.getRowKey!==r){let l=function(c){c.forEach((u,d)=>{const h=r(u,d);a.set(h,u),u&&typeof u=="object"&&t in u&&l(u[t]||[])})};const a=new Map;l(e),n.current={data:e,childrenColumnName:t,kvMap:a,getRowKey:r}}return(s=n.current.kvMap)==null?void 0:s.get(o)}return[i]},ede=10;function _3e(e,t){const r={current:e.current,pageSize:e.pageSize};return Object.keys(t&&typeof t=="object"?t:{}).forEach(i=>{const o=e[i];typeof o!="function"&&(r[i]=o)}),r}function O3e(e,t,r){const{total:n=0,...i}=r&&typeof r=="object"?r:{},[o,s]=y.useState(()=>({current:"defaultCurrent"in i?i.defaultCurrent:1,pageSize:"defaultPageSize"in i?i.defaultPageSize:ede})),a=g0(o,i,{total:n>0?n:e}),l=Math.ceil((n||e)/a.pageSize);a.current>l&&(a.current=l||1);const c=(d,h)=>{s({current:d??1,pageSize:h||a.pageSize})},u=(d,h)=>{var p;r&&((p=r.onChange)==null||p.call(r,d,h)),c(d,h),t(d,h||(a==null?void 0:a.pageSize))};return r===!1?[{},()=>{}]:[{...a,onChange:u},c]}var k3e={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};function oG(){return oG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,oG({},e,{ref:t,icon:k3e})),B3e=y.forwardRef(N3e);var $3e={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"};function sG(){return sG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,sG({},e,{ref:t,icon:$3e})),V3e=y.forwardRef(G3e),nP="ascend",eO="descend",bM=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,Zq=e=>typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1,z3e=(e,t)=>t?e[e.indexOf(t)+1]:e[0],aG=(e,t,r)=>{let n=[];const i=(o,s)=>{n.push({column:o,key:wp(o,s),multiplePriority:bM(o),sortOrder:o.sortOrder})};return(e||[]).forEach((o,s)=>{const a=AC(s,r);o.children?("sortOrder"in o&&i(o,a),n=[].concat(Nr(n),Nr(aG(o.children,t,a)))):o.sorter&&("sortOrder"in o?i(o,a):t&&o.defaultSortOrder&&n.push({column:o,key:wp(o,a),multiplePriority:bM(o),sortOrder:o.defaultSortOrder}))}),n},tde=(e,t,r,n,i,o,s,a,l)=>(t||[]).map((u,d)=>{const h=AC(d,a);let p=u;if(p.sorter){const f=p.sortDirections||i,g=p.showSorterTooltip===void 0?s:p.showSorterTooltip,m=wp(p,h),v=r.find(({key:A})=>A===m),b=v?v.sortOrder:null,S=z3e(f,b);let x;if(u.sortIcon)x=u.sortIcon({sortOrder:b});else{const A=f.includes(nP)&&y.createElement(V3e,{className:ee(`${e}-column-sorter-up`,{active:b===nP})}),I=f.includes(eO)&&y.createElement(B3e,{className:ee(`${e}-column-sorter-down`,{active:b===eO})});x=y.createElement("span",{className:ee(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(A&&I)})},y.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},A,I))}const{cancelSort:T,triggerAsc:R,triggerDesc:E}=o||{};let M=T;S===eO?M=E:S===nP&&(M=R);const D=typeof g=="object"?{title:M,...g}:{title:M};p={...p,className:ee(p.className,{[`${e}-column-sort`]:b}),title:A=>{const I=`${e}-column-sorters`,_=y.createElement("span",{className:`${e}-column-title`},jD(u.title,A)),F=y.createElement("div",{className:I},_,x);return g?typeof g!="boolean"&&(g==null?void 0:g.target)==="sorter-icon"?y.createElement("div",{className:ee(I,`${I}-tooltip-target-sorter`)},_,y.createElement(pu,{...D},x)):y.createElement(pu,{...D},F):F},onHeaderCell:A=>{var B;const I=((B=u.onHeaderCell)==null?void 0:B.call(u,A))||{},_=I.onClick,F=I.onKeyDown;I.onClick=H=>{n({column:u,key:m,sortOrder:S,multiplePriority:bM(u)}),_==null||_(H)},I.onKeyDown=H=>{H.keyCode===Xt.ENTER&&(n({column:u,key:m,sortOrder:S,multiplePriority:bM(u)}),F==null||F(H))};const O=NHe(u.title,{}),k=O==null?void 0:O.toString();return b&&(I["aria-sort"]=b==="ascend"?"ascending":"descending"),I["aria-description"]=l==null?void 0:l.sortable,I["aria-label"]=k||"",I.className=ee(I.className,`${e}-column-has-sorters`),I.tabIndex=0,u.ellipsis&&(I.title=(O??"").toString()),I}}}return"children"in p&&(p={...p,children:tde(e,p.children,r,n,i,o,s,h,l)}),p}),Jq=e=>{const{column:t,sortOrder:r}=e;return{column:t,order:r,field:t.dataIndex,columnKey:t.key}},Qq=e=>{const t=e.filter(({sortOrder:r})=>r).map(Jq);if(t.length===0&&e.length){const r=e.length-1;return{...Jq(e[r]),column:void 0,order:void 0,field:void 0,columnKey:void 0}}return t.length<=1?t[0]||{}:t},lG=(e,t,r)=>{const n=t.slice().sort((s,a)=>a.multiplePriority-s.multiplePriority),i=e.slice(),o=n.filter(({column:{sorter:s},sortOrder:a})=>Zq(s)&&a);return o.length?i.sort((s,a)=>{for(let l=0;l{const a=s[r];return a?{...s,[r]:lG(a,t,r)}:s}):i},H3e=e=>{const{prefixCls:t,mergedColumns:r,sortDirections:n,tableLocale:i,showSorterTooltip:o,onSorterChange:s,globalLocale:a}=e,[l,c]=y.useState(()=>aG(r,!0)),u=(m,v)=>{const b=[];return m.forEach((S,x)=>{const T=AC(x,v);if(b.push(wp(S,T)),Array.isArray(S.children)){const R=u(S.children,T);b.push.apply(b,Nr(R))}}),b},d=y.useMemo(()=>{let m=!0;const v=aG(r,!1);if(!v.length){const T=u(r);return l.filter(({key:R})=>T.includes(R))}const b=[];function S(T){m?b.push(T):b.push({...T,sortOrder:null})}let x=null;return v.forEach(T=>{x===null?(S(T),T.sortOrder&&(T.multiplePriority===!1?m=!1:x=!0)):(x&&T.multiplePriority!==!1||(m=!1),S(T))}),b},[r,l]),h=y.useMemo(()=>{var v,b;const m=d.map(({column:S,sortOrder:x})=>({column:S,order:x}));return{sortColumns:m,sortColumn:(v=m[0])==null?void 0:v.column,sortOrder:(b=m[0])==null?void 0:b.order}},[d]),p=m=>{let v;m.multiplePriority===!1||!d.length||d[0].multiplePriority===!1?v=[m]:v=[].concat(Nr(d.filter(({key:b})=>b!==m.key)),[m]),c(v),s(Qq(v),v)};return[m=>tde(t,m,d,p,n,i,o,void 0,a),d,h,()=>Qq(d)]},rde=(e,t)=>e.map(n=>{const i={...n};return i.title=jD(n.title,t),"children"in i&&(i.children=rde(i.children,t)),i}),W3e=e=>[y.useCallback(r=>rde(r,e),[e])],U3e=zue((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),j3e=Wue((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),K3e=e=>{const{componentCls:t,lineWidth:r,lineType:n,tableBorderColor:i,tableHeaderBg:o,tablePaddingVertical:s,tablePaddingHorizontal:a,calc:l}=e,c=`${ae(r)} ${n} ${i}`,u=(d,h,p)=>({[`&${t}-${d}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${ae(l(h).mul(-1).equal())} ${ae(l(l(p).add(r)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:{[`> ${t}-title`]:{border:c,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:c,borderTop:c,[` > ${t}-content, > ${t}-header, > ${t}-body, > ${t}-summary `]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:c},"> thead":{"> tr:not(:last-child) > th":{borderBottom:c},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:c}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${ae(l(s).mul(-1).equal())} ${ae(l(l(a).add(r)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:r,bottom:0,borderInlineEnd:c,content:'""'}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[` > tr${t}-expanded-row, > tr${t}-placeholder `]:{"> th, > td":{borderInlineEnd:0}}}}},...u("medium",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle),...u("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall),[`> ${t}-footer`]:{border:c,borderTop:0}},[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${ae(r)} 0 ${ae(r)} ${o}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:c}}}},q3e=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:{...La,wordBreak:"keep-all",[` &${t}-cell-fix-start-shadow, &${t}-cell-fix-end-shadow `]:{overflow:"visible",[`${t}-cell-content`]:{...La,display:"block"}},[`${t}-column-title`]:{...La,wordBreak:"keep-all"}}}}},Y3e=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},X3e=e=>{const{componentCls:t,antCls:r,motionDurationSlow:n,lineWidth:i,paddingXS:o,lineType:s,tableBorderColor:a,tableExpandIconBg:l,tableExpandColumnWidth:c,borderRadius:u,tablePaddingVertical:d,tablePaddingHorizontal:h,tableExpandedRowBg:p,paddingXXS:f,expandIconMarginTop:g,expandIconSize:m,expandIconHalfInner:v,expandIconScale:b,calc:S}=e,x=`${ae(i)} ${s} ${a}`,T=S(f).sub(i).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:c},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:{...UH(e),position:"relative",float:"left",width:m,height:m,color:"inherit",lineHeight:ae(m),background:l,border:x,borderRadius:u,transform:`scale(${b})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${n} ease-out`,content:'""'},"&::before":{top:v,insetInlineEnd:T,insetInlineStart:T,height:i},"&::after":{top:T,bottom:T,insetInlineStart:v,width:i,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}},[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:g,marginInlineEnd:o},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:p}},[`${r}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${ae(S(d).mul(-1).equal())} ${ae(S(h).mul(-1).equal())}`,padding:`${ae(d)} ${ae(h)}`}}}},Z3e=e=>{const{componentCls:t,antCls:r,iconCls:n,tableFilterDropdownWidth:i,tableFilterDropdownSearchWidth:o,paddingXXS:s,paddingXS:a,colorText:l,lineWidth:c,lineType:u,tableBorderColor:d,headerIconColor:h,fontSizeSM:p,tablePaddingHorizontal:f,borderRadius:g,motionDurationSlow:m,colorIcon:v,colorPrimary:b,tableHeaderFilterActiveBg:S,colorTextDisabled:x,tableFilterDropdownBg:T,tableFilterDropdownHeight:R,controlItemBgHover:E,controlItemBgActive:M,boxShadowSecondary:D,filterDropdownMenuBg:A,calc:I}=e,_=`${r}-dropdown`,F=`${t}-filter-dropdown`,O=`${r}-tree`,k=`${ae(c)} ${u} ${d}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:I(s).mul(-1).equal(),marginInline:`${ae(s)} ${ae(I(f).div(2).mul(-1).equal())}`,padding:`0 ${ae(s)}`,color:h,fontSize:p,borderRadius:g,cursor:"pointer",transition:`all ${m}`,"&:hover":{color:v,background:S},"&.active":{color:b}}}},{[`${r}-dropdown`]:{[F]:{...cn(e),minWidth:i,backgroundColor:T,borderRadius:g,boxShadow:D,overflow:"hidden",[`${_}-menu`]:{maxHeight:R,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:A,"&:empty::after":{display:"block",padding:`${ae(a)} 0`,color:x,fontSize:p,textAlign:"center",content:'"Not Found"'}},[`${F}-tree`]:{paddingBlock:`${ae(a)} 0`,paddingInline:a,[O]:{padding:0},[`${O}-treenode ${O}-node-content-wrapper:hover`]:{backgroundColor:E},[`${O}-treenode-checkbox-checked ${O}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:M}}},[`${F}-search`]:{padding:a,borderBottom:k,"&-input":{input:{minWidth:o},[n]:{color:x}}},[`${F}-checkall`]:{width:"100%",marginBottom:s,marginInlineStart:s},[`${F}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${ae(I(a).sub(c).equal())} ${ae(a)}`,overflow:"hidden",borderTop:k}}}},{[`${r}-dropdown ${F}, ${F}-submenu`]:{[`${r}-checkbox-wrapper + span`]:{paddingInlineStart:a,color:l},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]};function nde({colorSplit:e}){const t={boxShadow:`inset 10px 0 8px -8px ${e}`},r={boxShadow:`inset -10px 0 8px -8px ${e}`};return[t,r]}const J3e=e=>{const{componentCls:t,lineWidth:r,motionDurationSlow:n,zIndexTableFixed:i,tableBg:o,calc:s}=e,a=`${t}-cell`,l=`${a}-fix`,c={position:"absolute",top:0,bottom:s(r).mul(-1).equal(),width:30,transition:`box-shadow ${n}`,content:'""',pointerEvents:"none"},[u,d]=nde(e);return{[`${t}-wrapper`]:{[`${a}${l}`]:{position:"sticky"},[l]:{zIndex:`calc(var(--z-offset-reverse) + ${i})`,background:o,"&:after":c,"&-start:after":{insetInlineStart:"100%"},"&-end:after":{insetInlineEnd:"100%"},"&-start-shadow-show:after":u,"&-end-shadow-show:after":d},[`${t}-container`]:{position:"relative","&:before, &:after":{...c,zIndex:`calc(var(--columns-count) * 2 + ${i} + 1)`},"&:before":{insetInlineStart:0},"&:after":{insetInlineEnd:0}},[`${t}-has-fix-start ${t}-container:before`]:{display:"none"},[`${t}-has-fix-end ${t}-container:after`]:{display:"none"},[`${t}-fix-start-shadow-show ${t}-container:before`]:u,[`${t}-fix-end-shadow-show ${t}-container:after`]:d}}},Q3e=e=>{const{componentCls:t,antCls:r,margin:n}=e;return{[`${t}-wrapper`]:{[`${t}-pagination${r}-pagination`]:{margin:`${ae(n)} 0`},[`${t}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"> *":{flex:"none"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"}}}}},e5e=e=>{const{componentCls:t,tableRadius:r}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${ae(r)} ${ae(r)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:r,borderStartEndRadius:r,"&::before":{borderStartStartRadius:r},"&::after":{borderStartEndRadius:r},[`> ${t}-content`]:{borderStartStartRadius:r,borderStartEndRadius:r},"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:r},"> *:last-child":{borderStartEndRadius:r}}},"&-footer":{borderRadius:`0 0 ${ae(r)} ${ae(r)}`}}}}},t5e=e=>{const{componentCls:t}=e,[r,n]=nde(e);return{[`${t}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${t}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${t}-cell-fix`]:{"&-start-shadow-show:after":n,"&-end-shadow-show:after":r},[`${t}-container`]:{[`${t}-row-indent`]:{float:"right"}},[`${t}-fix-start-shadow-show ${t}-container:before`]:n,[`${t}-fix-end-shadow-show ${t}-container:after`]:r}}},r5e=e=>{const{componentCls:t,antCls:r,iconCls:n,fontSizeIcon:i,padding:o,paddingXS:s,headerIconColor:a,headerIconHoverColor:l,tableSelectionColumnWidth:c,tableSelectedRowBg:u,tableSelectedRowHoverBg:d,tableRowHoverBg:h,tablePaddingHorizontal:p,calc:f}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:c,[`&${t}-selection-col-with-dropdown`]:{width:f(c).add(i).add(f(o).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:f(c).add(f(s).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:f(c).add(i).add(f(o).div(4)).add(f(s).mul(2)).equal()}},[` table tr th${t}-selection-column, table tr td${t}-selection-column, ${t}-selection-column `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${r}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:f(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:ae(f(p).div(4).equal()),[n]:{color:a,fontSize:i,verticalAlign:"baseline","&:hover":{color:l}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:u,"&-row-hover":{background:d}}},[`> ${t}-cell-row-hover`]:{background:h}}}}}},n5e=e=>{const{componentCls:t,tableExpandColumnWidth:r,calc:n}=e,i=(o,s,a,l)=>({[`${t}${t}-${o}`]:{fontSize:l,[` ${t}-title, ${t}-footer, ${t}-cell, ${t}-thead > tr > th, ${t}-tbody > tr > th, ${t}-tbody > tr > td, tfoot > tr > th, tfoot > tr > td `]:{padding:`${ae(s)} ${ae(a)}`},[`${t}-filter-trigger`]:{marginInlineEnd:ae(n(a).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${ae(n(s).mul(-1).equal())} ${ae(n(a).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:ae(n(s).mul(-1).equal()),marginInline:`${ae(n(r).sub(a).equal())} ${ae(n(a).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:ae(n(a).div(4).equal())}}});return{[`${t}-wrapper`]:{...i("medium",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle),...i("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall)}}},i5e=e=>{const{componentCls:t,marginXXS:r,fontSizeIcon:n,headerIconColor:i,headerIconHoverColor:o}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},[` &${t}-cell-fix-left:hover, &${t}-cell-fix-right:hover `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${t}-column-sorter`]:{marginInlineStart:r,color:i,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:n,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:o}}}},o5e=e=>{const{componentCls:t,opacityLoading:r,tableScrollThumbBg:n,tableScrollThumbBgHover:i,tableScrollThumbSize:o,tableScrollBg:s,stickyScrollBarBorderRadius:a,lineWidth:l,lineType:c,tableBorderColor:u,zIndexTableFixed:d}=e,h=`${ae(l)} ${c} ${u}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:`calc(var(--columns-count) * 2 + ${d} + 1)`,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${ae(o)} !important`,zIndex:`calc(var(--columns-count) * 2 + ${d} + 1)`,display:"flex",alignItems:"center",background:s,borderTop:h,opacity:r,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:o,backgroundColor:n,borderRadius:a,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:i}}}}}}},eY=e=>{const{componentCls:t,lineWidth:r,tableBorderColor:n,calc:i}=e,o=`${ae(r)} ${e.lineType} ${n}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:o}}},[`div${t}-summary`]:{boxShadow:`0 ${ae(i(r).mul(-1).equal())} 0 ${n}`}}}},s5e=e=>{const{componentCls:t,motionDurationMid:r,lineWidth:n,lineType:i,tableBorderColor:o,calc:s}=e,a=`${ae(n)} ${i} ${o}`,l=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[` & > ${t}-row, & > div:not(${t}-row) > ${t}-row `]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${t}-cell`]:{borderBottom:a,transition:`background-color ${r}`},[`${t}-expanded-row`]:{[`${l}${l}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${ae(n)})`,borderInlineEnd:"none"}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:a,position:"absolute"},[`${t}-cell`]:{borderInlineEnd:a,[`&${t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:s(n).mul(-1).equal(),borderInlineStart:a}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:a,borderBottom:a}}}}}},a5e=e=>{const{componentCls:t,fontWeightStrong:r,tablePaddingVertical:n,tablePaddingHorizontal:i,tableExpandColumnWidth:o,lineWidth:s,lineType:a,tableBorderColor:l,tableFontSize:c,tableBg:u,tableRadius:d,tableHeaderTextColor:h,motionDurationMid:p,tableHeaderBg:f,tableHeaderCellSplitColor:g,tableFooterTextColor:m,tableFooterBg:v,calc:b}=e,S=`${ae(s)} ${a} ${l}`;return{[`${t}-wrapper`]:{clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg,...Cp(),[t]:{...cn(e),fontSize:c,background:u,borderRadius:`${ae(d)} ${ae(d)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`},table:{width:"100%",textAlign:"start",borderRadius:`${ae(d)} ${ae(d)} 0 0`,borderCollapse:"separate",borderSpacing:0},[` ${t}-cell, ${t}-thead > tr > th, ${t}-tbody > tr > th, ${t}-tbody > tr > td, tfoot > tr > th, tfoot > tr > td `]:{position:"relative",padding:`${ae(n)} ${ae(i)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${ae(n)} ${ae(i)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:h,fontWeight:r,textAlign:"start",background:f,borderBottom:S,transition:`background-color ${p} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:g,transform:"translateY(-50%)",transition:`background-color ${p}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{borderBottom:S,transition:["background-color","border-color"].map(x=>`${x} ${p}`).join(", "),[` > ${t}-wrapper:only-child, > ${t}-expanded-row-fixed > ${t}-wrapper:only-child `]:{[t]:{marginBlock:ae(b(n).mul(-1).equal()),marginInline:`${ae(b(o).sub(i).equal())} ${ae(b(i).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:h,fontWeight:r,textAlign:"start",background:f,borderBottom:S,transition:`background-color ${p} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:"0 !important",borderBlock:"0 !important",[`${t}-measure-cell-content`]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},[`${t}-footer`]:{padding:`${ae(n)} ${ae(i)}`,color:m,background:v}}}},l5e=e=>{const{colorFillAlter:t,colorBgContainer:r,colorTextHeading:n,colorFillSecondary:i,colorFillContent:o,controlItemBgActive:s,controlItemBgActiveHover:a,padding:l,paddingSM:c,paddingXS:u,colorBorderSecondary:d,borderRadiusLG:h,controlHeight:p,colorTextPlaceholder:f,fontSize:g,fontSizeSM:m,lineHeight:v,lineWidth:b,colorIcon:S,colorIconHover:x,opacityLoading:T,controlInteractiveSize:R}=e,E=new an(i).onBackground(r).toHexString(),M=new an(o).onBackground(r).toHexString(),D=new an(t).onBackground(r).toHexString(),A=new an(S),I=new an(x),_=R/2-b,F=_*2+b*3;return{headerBg:D,headerColor:n,headerSortActiveBg:E,headerSortHoverBg:M,bodySortBg:D,rowHoverBg:D,rowSelectedBg:s,rowSelectedHoverBg:a,rowExpandedBg:t,cellPaddingBlock:l,cellPaddingInline:l,cellPaddingBlockMD:c,cellPaddingInlineMD:u,cellPaddingBlockSM:u,cellPaddingInlineSM:u,borderColor:d,headerBorderRadius:h,footerBg:D,footerColor:n,cellFontSize:g,cellFontSizeMD:g,cellFontSizeSM:g,headerSplitColor:d,fixedHeaderSortActiveBg:E,headerFilterHoverBg:o,filterDropdownMenuBg:r,filterDropdownBg:r,expandIconBg:r,selectionColumnWidth:p,stickyScrollBarBg:f,stickyScrollBarBorderRadius:100,expandIconMarginTop:(g*v-b*3)/2-Math.ceil((m*1.4-b*3)/2),headerIconColor:A.clone().setA(A.a*T).toRgbString(),headerIconHoverColor:I.clone().setA(I.a*T).toRgbString(),expandIconHalfInner:_,expandIconSize:F,expandIconScale:R/F}},c5e=2,u5e=Yr("Table",e=>{const{colorTextHeading:t,colorSplit:r,colorBgContainer:n,controlInteractiveSize:i,headerBg:o,headerColor:s,headerSortActiveBg:a,headerSortHoverBg:l,bodySortBg:c,rowHoverBg:u,rowSelectedBg:d,rowSelectedHoverBg:h,rowExpandedBg:p,cellPaddingBlock:f,cellPaddingInline:g,cellPaddingBlockMD:m,cellPaddingInlineMD:v,cellPaddingBlockSM:b,cellPaddingInlineSM:S,borderColor:x,footerBg:T,footerColor:R,headerBorderRadius:E,cellFontSize:M,cellFontSizeMD:D,cellFontSizeSM:A,headerSplitColor:I,fixedHeaderSortActiveBg:_,headerFilterHoverBg:F,filterDropdownBg:O,expandIconBg:k,selectionColumnWidth:B,stickyScrollBarBg:H,calc:N}=e,z=Wr(e,{tableFontSize:M,tableBg:n,tableRadius:E,tablePaddingVertical:f,tablePaddingHorizontal:g,tablePaddingVerticalMiddle:m,tablePaddingHorizontalMiddle:v,tablePaddingVerticalSmall:b,tablePaddingHorizontalSmall:S,tableBorderColor:x,tableHeaderTextColor:s,tableHeaderBg:o,tableFooterTextColor:R,tableFooterBg:T,tableHeaderCellSplitColor:I,tableHeaderSortBg:a,tableHeaderSortHoverBg:l,tableBodySortBg:c,tableFixedHeaderSortActiveBg:_,tableHeaderFilterActiveBg:F,tableFilterDropdownBg:O,tableRowHoverBg:u,tableSelectedRowBg:d,tableSelectedRowHoverBg:h,zIndexTableFixed:c5e,tableFontSizeMiddle:D,tableFontSizeSmall:A,tableSelectionColumnWidth:B,tableExpandIconBg:k,tableExpandColumnWidth:N(i).add(N(e.padding).mul(2)).equal(),tableExpandedRowBg:p,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:H,tableScrollThumbBgHover:t,tableScrollBg:r});return[a5e(z),Q3e(z),eY(z),i5e(z),Z3e(z),K3e(z),e5e(z),X3e(z),eY(z),Y3e(z),r5e(z),J3e(z),o5e(z),q3e(z),n5e(z),t5e(z),s5e(z)]},l5e,{resetFont:!1,unitless:{expandIconScale:!0}}),tY=[],d5e=(e,t)=>{var Zt;const{prefixCls:r,className:n,rootClassName:i,style:o,classNames:s,styles:a,size:l,bordered:c,dropdownPrefixCls:u,dataSource:d,pagination:h,rowSelection:p,rowKey:f,rowClassName:g,columns:m,children:v,childrenColumnName:b,onChange:S,getPopupContainer:x,loading:T,expandIcon:R,expandable:E,expandedRowRender:M,expandIconColumnIndex:D,indentSize:A,scroll:I,sortDirections:_,locale:F,showSorterTooltip:O={target:"full-header"},virtual:k}=e;CC();const B=y.useMemo(()=>m||U3(v),[m,v]),H=y.useMemo(()=>B.some(Ft=>Ft.responsive),[B]),N=kx(H),z=y.useMemo(()=>{const Ft=new Set(Object.keys(N).filter(cr=>N[cr]));return B.filter(cr=>!cr.responsive||cr.responsive.some(fr=>Ft.has(fr)))},[B,N]),U=En(e,["className","style","columns"]),{locale:V=dc,table:G}=y.useContext(or),{getPrefixCls:K,direction:q,renderEmpty:Y,getPopupContainer:X,className:le,style:re,classNames:ne,styles:se}=Ur("table"),de=Li(Ft=>l==="middle"?"medium":l??Ft),te={...e,size:de,bordered:c},[ie,pe]=jr([ne,s],[se,a],{props:te},{pagination:{_default:"root"},header:{_default:"wrapper"},body:{_default:"wrapper"}}),Z={...V.Table,...F},[ue]=Cc("global",dc.global),ve=d||tY,he=K("table",r),me=K("dropdown",u),[,Oe]=ds(),Pe=co(he),[Me,He]=u5e(he,Pe),Ge={childrenColumnName:b,expandIconColumnIndex:D,...E,expandIcon:(E==null?void 0:E.expandIcon)??((Zt=G==null?void 0:G.expandable)==null?void 0:Zt.expandIcon)},{childrenColumnName:Ct="children"}=Ge,Ht=y.useMemo(()=>ve.some(Ft=>Ft==null?void 0:Ft[Ct])?"nest":M||E!=null&&E.expandedRowRender?"row":null,[Ct,ve]),St={body:y.useRef(null)},Ye=kHe(he),Fe=y.useRef(null),et=y.useRef(null);QDe(t,()=>({...et.current,nativeElement:Fe.current}));const Ne=f||(G==null?void 0:G.rowKey)||"key",tt=I??(G==null?void 0:G.scroll),nt=y.useMemo(()=>typeof Ne=="function"?Ne:Ft=>Ft==null?void 0:Ft[Ne],[Ne]),[Ke]=L3e(ve,Ct,nt),Ie={},rt=(Ft,cr,fr=!1)=>{var mn,un,dn,en;const rr={...Ie,...Ft};fr&&((mn=Ie.resetPagination)==null||mn.call(Ie),(un=rr.pagination)!=null&&un.current&&(rr.pagination.current=1),h&&((en=h.onChange)==null||en.call(h,1,(dn=rr.pagination)==null?void 0:dn.pageSize))),I&&I.scrollToFirstRowOnChange!==!1&&St.body.current&&sae(0,{getContainer:()=>St.body.current}),S==null||S(rr.pagination,rr.filters,rr.sorter,{currentDataSource:iG(lG(ve,rr.sorterStates,Ct),rr.filterStates,Ct),action:cr})},Tt=(Ft,cr)=>{rt({sorter:Ft,sorterStates:cr},"sort",!1)},[Rt,Bt,Qt,ft]=H3e({prefixCls:he,mergedColumns:z,onSorterChange:Tt,sortDirections:_||["ascend","descend"],tableLocale:Z,showSorterTooltip:O,globalLocale:ue}),ut=y.useMemo(()=>lG(ve,Bt,Ct),[Ct,ve,Bt]);Ie.sorter=ft(),Ie.sorterStates=Bt;const Yt=(Ft,cr)=>{rt({filters:Ft,filterStates:cr},"filter",!0)},[hr,Je,ot]=F3e({prefixCls:he,locale:Z,dropdownPrefixCls:me,mergedColumns:z,onFilterChange:Yt,getPopupContainer:x||X,rootClassName:ee(i,Pe)}),De=iG(ut,Je,Ct);Ie.filters=ot,Ie.filterStates=Je;const Pt=y.useMemo(()=>{const Ft={};return Object.keys(ot).forEach(cr=>{ot[cr]!==null&&(Ft[cr]=ot[cr])}),{...Qt,filters:Ft}},[Qt,ot]),[Qe]=W3e(Pt),$e=(Ft,cr)=>{rt({pagination:{...Ie.pagination,current:Ft,pageSize:cr}},"paginate")},[oe,ce]=O3e(De.length,$e,h);Ie.pagination=h===!1?{}:_3e(oe,h),Ie.resetPagination=ce;const ge=y.useMemo(()=>{if(h===!1||!oe.pageSize)return De;const{current:Ft=1,total:cr,pageSize:fr=ede}=oe;return De.lengthfr?De.slice((Ft-1)*fr,Ft*fr):De:De.slice((Ft-1)*fr,Ft*fr)},[!!h,De,oe==null?void 0:oe.current,oe==null?void 0:oe.pageSize,oe==null?void 0:oe.total]),[Te,ke]=_He({prefixCls:he,data:De,pageData:ge,getRowKey:nt,getRecordByKey:Ke,expandType:Ht,childrenColumnName:Ct,locale:Z,getPopupContainer:x||X},p),Ze=(Ft,cr,fr)=>{const rr=typeof g=="function"?g(Ft,cr,fr):g;return ee({[`${he}-row-selected`]:ke.has(nt(Ft,cr))},rr)};Ge.__PARENT_RENDER_ICON__=Ge.expandIcon,Ge.expandIcon=Ge.expandIcon||R||OHe(Z),Ht==="nest"&&Ge.expandIconColumnIndex===void 0?Ge.expandIconColumnIndex=p?1:0:Ge.expandIconColumnIndex>0&&p&&(Ge.expandIconColumnIndex-=1),typeof Ge.indentSize!="number"&&(Ge.indentSize=typeof A=="number"?A:15);const Dt=y.useCallback(Ft=>Qe(Te(hr(Rt(Ft)))),[Rt,hr,Te]);let st,it;if(h!==!1&&(oe!=null&&oe.total)){let Ft;oe.size?Ft=oe.size:Ft=de==="small"||de==="medium"?"small":void 0;const cr=(dn="end")=>y.createElement(yue,{...oe,classNames:ie.pagination,styles:pe.pagination,className:ee(`${he}-pagination ${he}-pagination-${dn}`,oe.className),size:Ft}),{placement:fr,position:rr}=oe,mn=fr??rr,un=dn=>{const en=dn.toLowerCase();return en.includes("center")?"center":en.includes("left")||en.includes("start")?"start":"end"};if(Array.isArray(mn)){const[dn,en]=["top","bottom"].map(Mr=>mn.find(on=>on.includes(Mr))),ho=mn.every(Mr=>`${Mr}`=="none");!dn&&!en&&!ho&&(it=cr()),dn&&(st=cr(un(dn))),en&&(it=cr(un(en)))}else it=cr()}const bt=y.useMemo(()=>typeof T=="boolean"?{spinning:T}:typeof T=="object"&&T!==null?{spinning:!0,...T}:void 0,[T]),Mt=ee(He,Pe,`${he}-wrapper`,le,{[`${he}-wrapper-rtl`]:q==="rtl"},n,i,ie.root,Me),_t={...pe.root,...re,...o},At=y.useMemo(()=>bt!=null&&bt.spinning&&ve===tY?null:typeof(F==null?void 0:F.emptyText)<"u"?F.emptyText:(Y==null?void 0:Y("Table"))||y.createElement(v3,{componentName:"Table"}),[bt==null?void 0:bt.spinning,ve,F==null?void 0:F.emptyText,Y]),dt=k?j3e:U3e,mt={},It=y.useMemo(()=>{const{fontSize:Ft,lineHeight:cr,lineWidth:fr,padding:rr,paddingXS:mn,paddingSM:un}=Oe,dn=Math.floor(Ft*cr);switch(de){case"medium":return un*2+dn+fr;case"small":return mn*2+dn+fr;default:return rr*2+dn+fr}},[Oe,de]);return k&&(mt.listItemHeight=It),y.createElement("div",{ref:Fe,className:Mt,style:_t},y.createElement(V3,{spinning:!1,...bt},st,y.createElement(dt,{...mt,...U,scroll:tt,classNames:ie,styles:pe,ref:et,columns:z,direction:q,expandable:Ge,prefixCls:he,className:ee({[`${he}-medium`]:de==="medium",[`${he}-small`]:de==="small",[`${he}-bordered`]:c,[`${he}-empty`]:ve.length===0},He,Pe,Me),data:ge,rowKey:nt,rowClassName:Ze,emptyText:At,internalHooks:Wx,internalRefs:St,transformColumns:Dt,getContainerWidth:Ye,measureRowRender:Ft=>y.createElement(Yue.Provider,{value:!0},y.createElement(Eu,{getPopupContainer:cr=>cr},Ft))}),it))},h5e=y.forwardRef(d5e),p5e=(e,t)=>{const r=y.useRef(0);return r.current+=1,y.createElement(h5e,{...e,ref:t,_renderTimes:r.current})},zp=y.forwardRef(p5e);zp.SELECTION_COLUMN=Dh;zp.EXPAND_COLUMN=Oh;zp.SELECTION_ALL=W$;zp.SELECTION_INVERT=U$;zp.SELECTION_NONE=j$;zp.Column=EHe;zp.ColumnGroup=RHe;zp.Summary=Aue;const f5e=e=>{const{paddingXXS:t,lineWidth:r,tagPaddingHorizontal:n,componentCls:i,calc:o}=e,s=o(n).sub(r).equal(),a=o(t).sub(r).equal();return{[i]:{...cn(e),display:"inline-block",height:"auto",paddingInline:s,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",backgroundColor:e.defaultBg,border:`${ae(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:a,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},"&-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},"&-disabled":{cursor:"not-allowed",[`&:not(${i}-checkable-checked)`]:{color:e.colorTextDisabled,"&:hover":{backgroundColor:"transparent"}},[`&${i}-checkable-checked`]:{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled},"&:hover, &:active":{backgroundColor:e.colorBgContainerDisabled,color:e.colorTextDisabled},[`&:not(${i}-checkable-checked):hover`]:{color:e.colorTextDisabled}},"&-group":{display:"flex",flexWrap:"wrap",gap:e.paddingXS}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:s}},[`&${e.componentCls}-solid`]:{borderColor:"transparent",color:e.colorTextLightSolid,backgroundColor:e.colorBgSolid,[`&${i}-default`]:{color:e.solidTextColor}},[`${i}-filled`]:{borderColor:"transparent",backgroundColor:e.tagBorderlessBg},[`&${i}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",backgroundColor:e.colorBgContainerDisabled,a:{cursor:"not-allowed",pointerEvents:"none",color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}},"a&":{"&:hover, &:active":{color:e.colorTextDisabled}},[`&${i}-outlined`]:{borderColor:e.colorBorderDisabled},[`&${i}-solid, &${i}-filled`]:{color:e.colorTextDisabled,[`${i}-close-icon`]:{color:e.colorTextDisabled}},[`${i}-close-icon`]:{cursor:"not-allowed",color:e.colorTextDisabled,"&:hover":{color:e.colorTextDisabled}}}}},Z3=e=>{const{lineWidth:t,fontSizeIcon:r,calc:n}=e,i=e.fontSizeSM;return Wr(e,{tagFontSize:i,tagLineHeight:ae(n(e.lineHeightSM).mul(i).equal()),tagIconSize:n(r).sub(n(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},J3=e=>{const t=Gae(new QP(e.colorBgSolid),"#fff")?"#000":"#fff";return{defaultBg:new an(e.colorFillTertiary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText,solidTextColor:t}},Q3=Yr("Tag",e=>{const t=Z3(e);return f5e(t)},J3),ide=y.forwardRef((e,t)=>{const{prefixCls:r,style:n,className:i,checked:o,children:s,icon:a,onChange:l,onClick:c,disabled:u,...d}=e,{getPrefixCls:h,tag:p}=y.useContext(or),f=y.useContext(Rs),g=u??f,m=T=>{g||(l==null||l(!o),c==null||c(T))},v=h("tag",r),[b,S]=Q3(v),x=ee(v,`${v}-checkable`,{[`${v}-checkable-checked`]:o,[`${v}-checkable-disabled`]:g},p==null?void 0:p.className,i,b,S);return y.createElement("span",{...d,ref:t,style:{...n,...p==null?void 0:p.style},className:x,onClick:m},a,y.createElement("span",null,s))}),g5e=Q.forwardRef((e,t)=>{const{id:r,prefixCls:n,rootClassName:i,className:o,style:s,classNames:a,styles:l,disabled:c,options:u,value:d,defaultValue:h,onChange:p,multiple:f,...g}=e,{getPrefixCls:m,direction:v,className:b,style:S,classNames:x,styles:T}=Ur("tag"),R=m("tag",n),E=`${R}-checkable-group`,M=co(R),[D,A]=Q3(R,M),[I,_]=jr([x,a],[T,l],{props:e}),F=y.useMemo(()=>Array.isArray(u)?u.map(z=>z&&typeof z=="object"?z:{value:z,label:z}):[],[u]),[O,k]=Fn(h,d),B=(z,U)=>{let V=null;if(f){const G=O||[];V=z?[].concat(Nr(G),[U.value]):G.filter(K=>K!==U.value)}else V=z?U.value:null;k(V),p==null||p(V)},H=Q.useRef(null);y.useImperativeHandle(t,()=>({nativeElement:H.current}));const N=hi(g,{aria:!0,data:!0});return Q.createElement("div",{...N,className:ee(E,b,i,{[`${E}-disabled`]:c,[`${E}-rtl`]:v==="rtl"},D,A,o,I.root),style:{...S,..._.root,...s},id:r,ref:H},F.map(z=>Q.createElement(ide,{key:z.value,className:ee(`${E}-item`,I.item),style:_.item,checked:f?(O||[]).includes(z.value):O===z.value,onChange:U=>B(U,z),disabled:c},z.label)))});function m5e(e,t){const{color:r,variant:n,bordered:i}=e;return y.useMemo(()=>{const o=r==null?void 0:r.endsWith("-inverse");let s;n?s=n:o?s="solid":i===!1?s="filled":s=t||"filled";const a=o?r==null?void 0:r.replace("-inverse",""):r,l=kD(r),c=uNe(r),u={};if(!l&&!c&&a)if(s==="solid")u.backgroundColor=r;else{const d=new an(a).toHsl();d.l=.95,u.backgroundColor=new an(d).toHexString(),u.color=r,s==="outlined"&&(u.borderColor=r)}return[s,a,l,c,u]},[r,n,i,t])}const v5e=e=>TD(e,(t,{textColor:r,lightBorderColor:n,lightColor:i,darkColor:o})=>({[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:i,borderColor:n,color:r},[`&${e.componentCls}-solid`]:{backgroundColor:o,borderColor:o,color:e.colorTextLightSolid},[`&${e.componentCls}-filled`]:{backgroundColor:i,color:r}}})),y5e=yx(["Tag","preset"],e=>{const t=Z3(e);return v5e(t)},J3);function C5e(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const nE=(e,t,r)=>{const n=C5e(r);return{[`${e.componentCls}${e.componentCls}-${t}:not(${e.componentCls}-disabled)`]:{[`&${e.componentCls}-outlined`]:{backgroundColor:e[`color${n}Bg`],borderColor:e[`color${n}Border`],color:e[`color${r}`]},[`&${e.componentCls}-solid`]:{backgroundColor:e[`color${r}`],borderColor:e[`color${r}`]},[`&${e.componentCls}-filled`]:{backgroundColor:e[`color${n}Bg`],color:e[`color${r}`]}}}},b5e=yx(["Tag","status"],e=>{const t=Z3(e);return[nE(t,"success","Success"),nE(t,"processing","Info"),nE(t,"error","Error"),nE(t,"warning","Warning")]},J3),S5e=y.forwardRef((e,t)=>{var ue;const{prefixCls:r,className:n,rootClassName:i,style:o,children:s,icon:a,color:l,variant:c,onClose:u,bordered:d,disabled:h,href:p,target:f,styles:g,classNames:m,...v}=e,{getPrefixCls:b,direction:S,className:x,variant:T,style:R,classNames:E,styles:M}=Ur("tag"),[D,A,I,_,F]=m5e(e,T),O=I||_,k=y.useContext(Rs),B=h??k,{tag:H}=y.useContext(or),[N,z]=y.useState(!0),U=En(v,["closeIcon","closable"]),V={...e,color:A,variant:D,disabled:B,href:p,target:f,icon:a},[G,K]=jr([E,m],[M,g],{props:V}),q=y.useMemo(()=>{let ve={...K.root,...R,...o};return B||(ve={...F,...ve}),ve},[K.root,R,o,F,B]),Y=b("tag",r),[X,le]=Q3(Y),re=ee(Y,x,G.root,`${Y}-${D}`,{[`${Y}-${A}`]:O,[`${Y}-hidden`]:!N,[`${Y}-rtl`]:S==="rtl",[`${Y}-disabled`]:B},n,i,X,le),ne=ve=>{B||(ve.stopPropagation(),u==null||u(ve),!ve.defaultPrevented&&z(!1))},[,se]=YH(Fy(e),Fy(H),{closable:!1,closeIconRender:ve=>{const he=y.createElement("span",{className:`${Y}-close-icon`,onClick:ne},ve);return Mae(ve,he,me=>({onClick:Oe=>{var Pe;(Pe=me==null?void 0:me.onClick)==null||Pe.call(me,Oe),ne(Oe)},className:ee(me==null?void 0:me.className,`${Y}-close-icon`)}))}}),de=typeof v.onClick=="function"||s&&s.type==="a",te=Ui(a,{className:ee(y.isValidElement(a)?(ue=a.props)==null?void 0:ue.className:void 0,G.icon),style:K.icon}),ie=te?y.createElement(y.Fragment,null,te,s&&y.createElement("span",{className:G.content,style:K.content},s)):s,pe=p?"a":"span",Z=y.createElement(pe,{...U,ref:t,className:re,style:q,href:B?void 0:p,target:f,onClick:B?void 0:U.onClick,...p&&B?{"aria-disabled":!0}:{}},ie,se,I&&y.createElement(y5e,{key:"preset",prefixCls:Y}),_&&y.createElement(b5e,{key:"status",prefixCls:Y}));return de?y.createElement(Ex,{component:"Tag"},Z):Z}),ode=S5e;ode.CheckableTag=ide;ode.CheckableTagGroup=g5e;var w5e={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"};function cG(){return cG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,cG({},e,{ref:t,icon:w5e})),T5e=y.forwardRef(x5e);var E5e={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"};function uG(){return uG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,uG({},e,{ref:t,icon:E5e})),P5e=y.forwardRef(R5e),M5e=(e,t,r,n)=>{const{titleMarginBottom:i,fontWeightStrong:o}=n;return{marginBottom:i,color:r,fontWeight:o,fontSize:e,lineHeight:t}},I5e=e=>{const t=[1,2,3,4,5],r={};return t.forEach(n=>{r[` h${n}&, div&-h${n}, div&-h${n} > textarea, h${n} `]=M5e(e[`fontSizeHeading${n}`],e[`lineHeightHeading${n}`],e.colorTextHeading,e)}),r},D5e=e=>{const{componentCls:t}=e;return{[`&${`${t}-link`}`]:{...UH(e),userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}}}},A5e=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:jP[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}}),F5e=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"}}}},L5e=e=>({[`${e.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),_5e=()=>({"\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"}}),O5e=e=>{const{componentCls:t,titleMarginTop:r}=e;return{[t]:{color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary, &${t}-link${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success, &${t}-link${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning, &${t}-link${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger, &${t}-link${t}-danger`]:{color:e.colorErrorText,[`&${t}-link:active, &${t}-link:focus`]:{color:e.colorErrorTextActive},[`&${t}-link:hover`]:{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"},...I5e(e),[` & + h1${t}, & + h2${t}, & + h3${t}, & + h4${t}, & + h5${t} `]:{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}},...A5e(e),...D5e(e),[`${t}-actions`]:{display:"inline"},[` ${t}-expand, ${t}-collapse, ${t}-edit, ${t}-copy `]:{...UH(e),marginInlineStart:e.marginXXS},...F5e(e),...L5e(e),..._5e(),"&-rtl":{direction:"rtl"}}}},k5e=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),sde=Yr("Typography",O5e,k5e),N5e=e=>{const{prefixCls:t,"aria-label":r,className:n,style:i,direction:o,maxLength:s,autoSize:a=!0,value:l,onSave:c,onCancel:u,onEnd:d,component:h,enterIcon:p=y.createElement(P5e,null)}=e,f=y.useRef(null),g=y.useRef(!1),m=y.useRef(null),[v,b]=y.useState(l);y.useEffect(()=>{b(l)},[l]),y.useEffect(()=>{var F;if((F=f.current)!=null&&F.resizableTextArea){const{textArea:O}=f.current.resizableTextArea;O.focus();const{length:k}=O.value;O.setSelectionRange(k,k)}},[]);const S=({target:F})=>{b(F.value.replace(/[\n\r]/g,""))},x=()=>{g.current=!0},T=()=>{g.current=!1},R=({keyCode:F})=>{g.current||(m.current=F)},E=()=>{c(v.trim())},M=({keyCode:F,ctrlKey:O,altKey:k,metaKey:B,shiftKey:H})=>{m.current!==F||g.current||O||k||B||H||(F===Xt.ENTER?(E(),d==null||d()):F===Xt.ESC&&u())},D=()=>{E()},[A,I]=sde(t),_=ee(t,`${t}-edit-content`,{[`${t}-rtl`]:o==="rtl",[`${t}-${h}`]:!!h},n,A,I);return y.createElement("div",{className:_,style:i},y.createElement(gue,{ref:f,maxLength:s,value:v,onChange:S,onKeyDown:R,onKeyUp:M,onCompositionStart:x,onCompositionEnd:T,onBlur:D,"aria-label":r,rows:1,autoSize:a}),p!==null?Ui(p,{className:`${t}-edit-content-confirm`}):null)},B5e=(e,t)=>{let r=!1;const n=i=>{var o,s,a;i.stopPropagation(),i.preventDefault(),(o=i.clipboardData)==null||o.clearData(),(s=i.clipboardData)==null||s.setData("text/plain",e),t&&((a=i.clipboardData)==null||a.setData("text/html",e)),r=!0};try{return document.addEventListener("copy",n,{capture:!0}),document.execCommand("copy"),r}catch{return!1}finally{document.removeEventListener("copy",n,{capture:!0})}},$5e=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:"text/html"}),"text/plain":new Blob([e],{type:"text/plain"})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function G5e(e,t){if(typeof e!="string")return!1;const r=(t==null?void 0:t.format)==="text/html";return!!(await $5e(e,r)||B5e(e,r))}const V5e=({copyConfig:e,children:t})=>{const[r,n]=y.useState(!1),[i,o]=y.useState(!1),s=y.useRef(null),a=()=>{s.current&&clearTimeout(s.current)},l={};e.format&&(l.format=e.format),y.useEffect(()=>a,[]);const c=br(async u=>{var d;u==null||u.preventDefault(),u==null||u.stopPropagation(),o(!0);try{const h=typeof e.text=="function"?await e.text():e.text;await G5e(h||xue(t,{skipEmpty:!0}).join("")||"",l),o(!1),n(!0),a(),s.current=setTimeout(()=>{n(!1)},3e3),(d=e.onCopy)==null||d.call(e,u)}catch(h){throw o(!1),h}});return{copied:r,copyLoading:i,onClick:c}};function tO(e,t){return y.useMemo(()=>{const r=!!e;return[r,{...t,...r&&typeof e=="object"?e:null}]},[e])}const z5e=e=>{const t=y.useRef(void 0);return y.useEffect(()=>{t.current=e}),t.current},H5e=(e,t,r)=>y.useMemo(()=>e===!0?{title:t??r}:y.isValidElement(e)?{title:e}:typeof e=="object"?{title:t??r,...e}:{title:e},[e,t,r]),ade=y.forwardRef((e,t)=>{const{prefixCls:r,component:n="article",className:i,rootClassName:o,children:s,direction:a,style:l,...c}=e,{getPrefixCls:u,direction:d,className:h,style:p}=Ur("typography"),f=a??d,g=u("typography",r),[m,v]=sde(g),b=ee(g,h,{[`${g}-rtl`]:f==="rtl"},i,o,m,v),S={...p,...l};return y.createElement(n,{className:b,style:S,ref:t,...c},s)});var W5e={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"};function dG(){return dG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,dG({},e,{ref:t,icon:W5e})),j5e=y.forwardRef(U5e),rY=e=>e===!1?[!1,!1]:xue(e);function rO(e,t,r){return e===!0||e===void 0?t:e||r&&t}function K5e(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 e5=e=>["string","number"].includes(typeof e),q5e=e=>{const{prefixCls:t,copied:r,locale:n,iconOnly:i,tooltips:o,icon:s,tabIndex:a,onCopy:l,loading:c}=e,u=rY(o),d=rY(s),{copied:h,copy:p}=n??{},f=r?h:p,g=rO(u[r?1:0],f),m=typeof g=="string"?g:f;return y.createElement(pu,{title:g},y.createElement("button",{type:"button",className:ee(`${t}-copy`,{[`${t}-copy-success`]:r,[`${t}-copy-icon-only`]:i}),onClick:l,"aria-label":m,tabIndex:a},r?rO(d[1],y.createElement(_le,null),!0):rO(d[0],c?y.createElement(Tx,null):y.createElement(j5e,null),!0)))},iE=y.forwardRef(({style:e,children:t},r)=>{const n=y.useRef(null);return y.useImperativeHandle(r,()=>({isExceed:()=>{const i=n.current;return i.scrollHeight>i.clientHeight},getHeight:()=>n.current.clientHeight})),y.createElement("span",{"aria-hidden":!0,ref:n,style:{position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)",...e}},t)}),Y5e=e=>e.reduce((t,r)=>t+(e5(r)?String(r).length:1),0);function nY(e,t){let r=0;const n=[];for(let i=0;it){const c=t-r;return n.push(String(o).slice(0,c)),n}n.push(o),r=l}return e}const nO=0,iO=1,oO=2,sO=3,iY=4,oE={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function X5e(e){const{enableMeasure:t,width:r,text:n,children:i,rows:o,expanded:s,miscDeps:a,onEllipsis:l}=e,c=y.useMemo(()=>Di(n),[n]),u=y.useMemo(()=>Y5e(c),[n]),d=y.useMemo(()=>i(c,!1),[n]),[h,p]=y.useState(null),f=y.useRef(null),g=y.useRef(null),m=y.useRef(null),v=y.useRef(null),b=y.useRef(null),[S,x]=y.useState(!1),[T,R]=y.useState(nO),[E,M]=y.useState(0),[D,A]=y.useState(null);zr(()=>{R(t&&r&&u?iO:nO)},[r,n,o,t,c]),zr(()=>{var O,k,B,H;if(T===iO){R(oO);const N=g.current&&getComputedStyle(g.current).whiteSpace;A(N)}else if(T===oO){const N=!!((O=m.current)!=null&&O.isExceed());R(N?sO:iY),p(N?[0,u]:null),x(N);const z=((k=m.current)==null?void 0:k.getHeight())||0,U=o===1?0:((B=v.current)==null?void 0:B.getHeight())||0,V=((H=b.current)==null?void 0:H.getHeight())||0,G=Math.max(z,U+V);M(G+1),l(N)}},[T]);const I=h?Math.ceil((h[0]+h[1])/2):0;zr(()=>{var B;const[O,k]=h||[0,0];if(O!==k){const N=(((B=f.current)==null?void 0:B.getHeight())||0)>E;let z=I;k-O===1&&(z=N?O:k),p(N?[O,z]:[z,k])}},[h,I]);const _=y.useMemo(()=>{if(!t)return i(c,!1);if(T!==sO||!h||h[0]!==h[1]){const O=i(c,!1);return[iY,nO].includes(T)?O:y.createElement("span",{style:{...oE,WebkitLineClamp:o}},O)}return i(s?c:nY(c,h[0]),S)},[s,T,h,c].concat(Nr(a))),F={width:r,margin:0,padding:0,whiteSpace:D==="nowrap"?"normal":"inherit"};return y.createElement(y.Fragment,null,_,T===oO&&y.createElement(y.Fragment,null,y.createElement(iE,{style:{...F,...oE,WebkitLineClamp:o},ref:m},d),y.createElement(iE,{style:{...F,...oE,WebkitLineClamp:o-1},ref:v},d),y.createElement(iE,{style:{...F,...oE,WebkitLineClamp:1},ref:b},i([],!0))),T===sO&&h&&h[0]!==h[1]&&y.createElement(iE,{style:{...F,top:400},ref:f},i(nY(c,I),!0)),T===iO&&y.createElement("span",{style:{whiteSpace:"inherit"},ref:g}))}const Z5e=({enableEllipsis:e,isEllipsis:t,open:r,children:n,tooltipProps:i})=>{if(!(i!=null&&i.title)||!e)return n;const o=r&&t;return y.createElement(pu,{open:o,...i},n)};function J5e({mark:e,code:t,underline:r,delete:n,strong:i,keyboard:o,italic:s},a){let l=a;function c(u,d){d&&(l=y.createElement(u,{},l))}return c("strong",i),c("u",r),c("del",n),c("code",t),c("mark",e),c("kbd",o),c("i",s),l}const Q5e="...",oY=["delete","mark","code","underline","strong","keyboard","italic"],KD=y.forwardRef((e,t)=>{const{prefixCls:r,className:n,style:i,type:o,disabled:s,children:a,ellipsis:l,editable:c,copyable:u,component:d,title:h,onMouseEnter:p,onMouseLeave:f,...g}=e,{getPrefixCls:m,direction:v}=y.useContext(or),[b]=Cc("Text"),S=y.useRef(null),x=y.useRef(null),T=m("typography",r),R=En(g,oY),[E,M]=tO(c),[D,A]=Fn(!1,M.editing),{triggerType:I=["icon"]}=M,_=ft=>{var ut;ft&&((ut=M.onStart)==null||ut.call(M)),A(ft)},F=z5e(D);zr(()=>{var ft;!D&&F&&((ft=x.current)==null||ft.focus())},[D]);const O=ft=>{ft==null||ft.preventDefault(),_(!0)},k=ft=>{var ut;(ut=M.onChange)==null||ut.call(M,ft),_(!1)},B=()=>{var ft;(ft=M.onCancel)==null||ft.call(M),_(!1)},[H,N]=tO(u),{copied:z,copyLoading:U,onClick:V}=V5e({copyConfig:N,children:a}),[G,K]=y.useState(!1),[q,Y]=y.useState(!1),[X,le]=y.useState(!1),[re,ne]=y.useState(!1),[se,de]=y.useState(!0),[te,ie]=tO(l,{expandable:!1,symbol:ft=>ft?b==null?void 0:b.collapse:b==null?void 0:b.expand}),[pe,Z]=Fn(ie.defaultExpanded||!1,ie.expanded),ue=te&&(!pe||ie.expandable==="collapsible"),{rows:ve=1}=ie,he=y.useMemo(()=>ue&&(ie.suffix!==void 0||ie.onEllipsis||ie.expandable||E||H),[ue,ie,E,H]);zr(()=>{te&&!he&&(K(dK("webkitLineClamp")),Y(dK("textOverflow")))},[he,te]);const[me,Oe]=y.useState(ue),Pe=y.useMemo(()=>he?!1:ve===1?q:G,[he,q,G]);zr(()=>{Oe(Pe&&ue)},[Pe,ue]);const Me=ue&&(me?re:X),He=ue&&ve===1&&me,Ge=ue&&ve>1&&me,Ct=(ft,ut)=>{var Yt;Z(ut.expanded),(Yt=ie.onExpand)==null||Yt.call(ie,ft,ut)},[Ht,St]=y.useState(0),[Ye,Fe]=y.useState(!1),[et,Ne]=y.useState(!1),tt=({offsetWidth:ft})=>{St(ft)},nt=ft=>{var ut;le(ft),X!==ft&&((ut=ie.onEllipsis)==null||ut.call(ie,ft))};y.useEffect(()=>{const ft=S.current;if(te&&me&&ft){const ut=K5e(ft);re!==ut&&ne(ut)}},[te,me,a,Ge,se,Ht]),y.useEffect(()=>{const ft=S.current;if(typeof IntersectionObserver>"u"||!ft||!me||!ue)return;const ut=new IntersectionObserver(()=>{de(!!ft.offsetParent)});return ut.observe(ft),()=>{ut.disconnect()}},[me,ue]);const Ke=H5e(ie.tooltip,M.text,a),Ie=y.useMemo(()=>{if(!(!te||me))return[M.text,a,h,Ke.title].find(e5)},[te,me,h,Ke.title,Me]);if(D)return y.createElement(N5e,{value:M.text??(typeof a=="string"?a:""),onSave:k,onCancel:B,onEnd:M.onEnd,prefixCls:T,className:n,style:i,direction:v,component:d,maxLength:M.maxLength,autoSize:M.autoSize,enterIcon:M.enterIcon});const rt=()=>{const{expandable:ft,symbol:ut}=ie;return ft?y.createElement("button",{type:"button",key:"expand",className:`${T}-${pe?"collapse":"expand"}`,onClick:Yt=>Ct(Yt,{expanded:!pe}),"aria-label":pe?b.collapse:b==null?void 0:b.expand},typeof ut=="function"?ut(pe):ut):null},Tt=()=>{if(!E)return;const{icon:ft,tooltip:ut,tabIndex:Yt}=M,hr=Di(ut)[0]||(b==null?void 0:b.edit),Je=typeof hr=="string"?hr:"";return I.includes("icon")?y.createElement(pu,{key:"edit",title:ut===!1?"":hr},y.createElement("button",{type:"button",ref:x,className:`${T}-edit`,onClick:O,"aria-label":Je,tabIndex:Yt},ft||y.createElement(T5e,{role:"button"}))):null},Rt=()=>H?y.createElement(q5e,{key:"copy",...N,prefixCls:T,copied:z,locale:b,onCopy:V,loading:U,iconOnly:!xn(a)}):null,Bt=ft=>{const ut=ft&&rt(),Yt=Tt(),hr=Rt();return!ut&&!Yt&&!hr?null:y.createElement("span",{key:"operations",className:`${T}-actions`,onMouseEnter:()=>Fe(!0),onMouseLeave:()=>Fe(!1)},ut,Yt,hr)},Qt=ft=>[ft&&!pe&&y.createElement("span",{"aria-hidden":!0,key:"ellipsis"},Q5e),ie.suffix,Bt(ft)];return y.createElement(Js,{onResize:tt,disabled:!ue},ft=>y.createElement(Z5e,{tooltipProps:Ke,enableEllipsis:ue,isEllipsis:Me,open:et&&!Ye},y.createElement(ade,{onMouseEnter:ut=>{Ne(!0),p==null||p(ut)},onMouseLeave:ut=>{Ne(!1),f==null||f(ut)},className:ee({[`${T}-${o}`]:o,[`${T}-disabled`]:s,[`${T}-ellipsis`]:te,[`${T}-ellipsis-single-line`]:He,[`${T}-ellipsis-multiple-line`]:Ge,[`${T}-link`]:d==="a"},n),prefixCls:r,style:{...i,WebkitLineClamp:Ge?ve:void 0},component:d,ref:zo(ft,S,t),direction:v,onClick:I.includes("text")?O:void 0,"aria-label":Ie==null?void 0:Ie.toString(),title:h,...R},y.createElement(X5e,{enableMeasure:ue&&!me,text:a,rows:ve,width:Ht,onEllipsis:nt,expanded:pe,miscDeps:[z,pe,U,E,H,b].concat(Nr(oY.map(ut=>e[ut])))},(ut,Yt)=>J5e(e,y.createElement(y.Fragment,null,ut.length>0&&Yt&&!pe&&Ie?y.createElement("span",{key:"show-content","aria-hidden":!0},ut):ut,Qt(Yt)))))))}),e4e=y.forwardRef((e,t)=>{const{ellipsis:r,rel:n,children:i,navigate:o,...s}=e,a={...s,rel:n===void 0&&s.target==="_blank"?"noopener noreferrer":n};return y.createElement(KD,{...a,ref:t,ellipsis:!!r,component:"a"},i)}),t4e=y.forwardRef((e,t)=>{const{children:r,...n}=e;return y.createElement(KD,{ref:t,...n,component:"div"},r)}),r4e=y.forwardRef((e,t)=>{const{ellipsis:r,children:n,...i}=e,o=y.useMemo(()=>r&&typeof r=="object"?En(r,["expandable","rows"]):r,[r]);return y.createElement(KD,{ref:t,...i,ellipsis:o,component:"span"},n)}),n4e=[1,2,3,4,5],i4e=y.forwardRef((e,t)=>{const{level:r=1,children:n,...i}=e,o=n4e.includes(r)?`h${r}`:"h1";return y.createElement(KD,{ref:t,...i,component:o},n)}),qD=ade;qD.Text=r4e;qD.Link=e4e;qD.Title=i4e;qD.Paragraph=t4e;var o4e={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"};function hG(){return hG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,hG({},e,{ref:t,icon:o4e})),rNt=y.forwardRef(s4e);var a4e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]},name:"arrow-down",theme:"outlined"};function pG(){return pG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,pG({},e,{ref:t,icon:a4e})),nNt=y.forwardRef(l4e);var c4e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};function fG(){return fG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,fG({},e,{ref:t,icon:c4e})),iNt=y.forwardRef(u4e);var d4e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 545.5L536.1 163a31.96 31.96 0 00-48.3 0L156 545.5a7.97 7.97 0 006 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]},name:"arrow-up",theme:"outlined"};function gG(){return gG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,gG({},e,{ref:t,icon:d4e})),oNt=y.forwardRef(h4e);var p4e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M632 888H392c-4.4 0-8 3.6-8 8v32c0 17.7 14.3 32 32 32h192c17.7 0 32-14.3 32-32v-32c0-4.4-3.6-8-8-8zM512 64c-181.1 0-328 146.9-328 328 0 121.4 66 227.4 164 284.1V792c0 17.7 14.3 32 32 32h264c17.7 0 32-14.3 32-32V676.1c98-56.7 164-162.7 164-284.1 0-181.1-146.9-328-328-328zm127.9 549.8L604 634.6V752H420V634.6l-35.9-20.8C305.4 568.3 256 484.5 256 392c0-141.4 114.6-256 256-256s256 114.6 256 256c0 92.5-49.4 176.3-128.1 221.8z"}}]},name:"bulb",theme:"outlined"};function mG(){return mG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,mG({},e,{ref:t,icon:p4e})),sNt=y.forwardRef(f4e);var g4e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311h-.3v428h472.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM112 528v364c0 17.7 14.3 32 32 32h65V496h-65c-17.7 0-32 14.3-32 32z"}}]},name:"like",theme:"filled"};function vG(){return vG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,vG({},e,{ref:t,icon:g4e})),aNt=y.forwardRef(m4e);var v4e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.3 338.4a447.57 447.57 0 00-96.1-143.3 443.09 443.09 0 00-143-96.3A443.91 443.91 0 00512 64h-2c-60.5.3-119 12.3-174.1 35.9a444.08 444.08 0 00-141.7 96.5 445 445 0 00-95 142.8A449.89 449.89 0 0065 514.1c.3 69.4 16.9 138.3 47.9 199.9v152c0 25.4 20.6 46 45.9 46h151.8a447.72 447.72 0 00199.5 48h2.1c59.8 0 117.7-11.6 172.3-34.3A443.2 443.2 0 00827 830.5c41.2-40.9 73.6-88.7 96.3-142 23.5-55.2 35.5-113.9 35.8-174.5.2-60.9-11.6-120-34.8-175.6zM312.4 560c-26.4 0-47.9-21.5-47.9-48s21.5-48 47.9-48 47.9 21.5 47.9 48-21.4 48-47.9 48zm199.6 0c-26.4 0-47.9-21.5-47.9-48s21.5-48 47.9-48 47.9 21.5 47.9 48-21.5 48-47.9 48zm199.6 0c-26.4 0-47.9-21.5-47.9-48s21.5-48 47.9-48 47.9 21.5 47.9 48-21.5 48-47.9 48z"}}]},name:"message",theme:"filled"};function yG(){return yG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,yG({},e,{ref:t,icon:v4e})),lNt=y.forwardRef(y4e);var C4e={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"};function CG(){return CG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,CG({},e,{ref:t,icon:C4e})),cNt=y.forwardRef(b4e);var S4e={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};function bG(){return bG=Object.assign?Object.assign.bind():function(e){for(var t=1;ty.createElement(kr,bG({},e,{ref:t,icon:S4e})),uNt=y.forwardRef(w4e),x4e=e=>{const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),t},T4e=(e,t=100,r=!1)=>{const n=x4e(e),i=y.useRef(),o=[t,r,n];function s(){i.current&&clearTimeout(i.current),i.current=void 0}y.useEffect(()=>s,o);function a(){i.current=void 0}return y.useCallback(function(){const l=arguments,{current:c}=i;if(c===void 0&&r)return i.current=setTimeout(a,t),n.current.apply(null,l);c&&clearTimeout(c),i.current=setTimeout(()=>{i.current=void 0,n.current.apply(null,l)},t)},o)},dNt=(e,t,r)=>{const n=y.useState(e);return[n[0],T4e(n[1],t,r),n[1]]},E4e="modulepreload",R4e=function(e){return"/"+e},sY={},P4e=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let s=function(c){return Promise.all(c.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=s(r.map(c=>{if(c=R4e(c),c in sY)return;sY[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":E4e,u||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),u)return new Promise((p,f)=>{h.addEventListener("load",p),h.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return i.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})};var Pw=(e=>(e.DEV="dev",e.STAGE="stage",e.PROD="prod",e))(Pw||{});const ya={code:"code",error:"error",state:"state",clientId:"client_id",audience:"audience",prompt:"prompt",redirectUri:"redirect_uri",scope:"scope",responseType:"response_type",codeChallengeMethod:"code_challenge_method",codeChallenge:"code_challenge",phone:"phone"},M4e={consent:"consent"},I4e={code:"code"},D4e={S256:"S256"};function lde(e,t){return function(){return e.apply(t,arguments)}}const{toString:A4e}=Object.prototype,{getPrototypeOf:t5}=Object,{iterator:YD,toStringTag:cde}=Symbol,XD=(e=>t=>{const r=A4e.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),bc=e=>(e=e.toLowerCase(),t=>XD(t)===e),ZD=e=>t=>typeof t===e,{isArray:FC}=Array,$y=ZD("undefined");function Ux(e){return e!==null&&!$y(e)&&e.constructor!==null&&!$y(e.constructor)&&Qs(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ude=bc("ArrayBuffer");function F4e(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ude(e.buffer),t}const L4e=ZD("string"),Qs=ZD("function"),dde=ZD("number"),jx=e=>e!==null&&typeof e=="object",_4e=e=>e===!0||e===!1,iP=e=>{if(XD(e)!=="object")return!1;const t=t5(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(cde in e)&&!(YD in e)},O4e=e=>{if(!jx(e)||Ux(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},k4e=bc("Date"),N4e=bc("File"),B4e=bc("Blob"),$4e=bc("FileList"),G4e=e=>jx(e)&&Qs(e.pipe),V4e=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Qs(e.append)&&((t=XD(e))==="formdata"||t==="object"&&Qs(e.toString)&&e.toString()==="[object FormData]"))},z4e=bc("URLSearchParams"),[H4e,W4e,U4e,j4e]=["ReadableStream","Request","Response","Headers"].map(bc),K4e=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Kx(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),FC(e))for(n=0,i=e.length;n0;)if(i=r[n],t===i.toLowerCase())return i;return null}const vg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,pde=e=>!$y(e)&&e!==vg;function SG(){const{caseless:e,skipUndefined:t}=pde(this)&&this||{},r={},n=(i,o)=>{const s=e&&hde(r,o)||o;iP(r[s])&&iP(i)?r[s]=SG(r[s],i):iP(i)?r[s]=SG({},i):FC(i)?r[s]=i.slice():(!t||!$y(i))&&(r[s]=i)};for(let i=0,o=arguments.length;i(Kx(t,(i,o)=>{r&&Qs(i)?e[o]=lde(i,r):e[o]=i},{allOwnKeys:n}),e),Y4e=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),X4e=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Z4e=(e,t,r,n)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=r!==!1&&t5(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},J4e=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Q4e=e=>{if(!e)return null;if(FC(e))return e;let t=e.length;if(!dde(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},eWe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&t5(Uint8Array)),tWe=(e,t)=>{const n=(e&&e[YD]).call(e);let i;for(;(i=n.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},rWe=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},nWe=bc("HTMLFormElement"),iWe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),aY=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),oWe=bc("RegExp"),fde=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Kx(r,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(n[o]=s||i)}),Object.defineProperties(e,n)},sWe=e=>{fde(e,(t,r)=>{if(Qs(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Qs(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},aWe=(e,t)=>{const r={},n=i=>{i.forEach(o=>{r[o]=!0})};return FC(e)?n(e):n(String(e).split(t)),r},lWe=()=>{},cWe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function uWe(e){return!!(e&&Qs(e.append)&&e[cde]==="FormData"&&e[YD])}const dWe=e=>{const t=new Array(10),r=(n,i)=>{if(jx(n)){if(t.indexOf(n)>=0)return;if(Ux(n))return n;if(!("toJSON"in n)){t[i]=n;const o=FC(n)?[]:{};return Kx(n,(s,a)=>{const l=r(s,i+1);!$y(l)&&(o[a]=l)}),t[i]=void 0,o}}return n};return r(e,0)},hWe=bc("AsyncFunction"),pWe=e=>e&&(jx(e)||Qs(e))&&Qs(e.then)&&Qs(e.catch),gde=((e,t)=>e?setImmediate:t?((r,n)=>(vg.addEventListener("message",({source:i,data:o})=>{i===vg&&o===r&&n.length&&n.shift()()},!1),i=>{n.push(i),vg.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Qs(vg.postMessage)),fWe=typeof queueMicrotask<"u"?queueMicrotask.bind(vg):typeof process<"u"&&process.nextTick||gde,gWe=e=>e!=null&&Qs(e[YD]),Ue={isArray:FC,isArrayBuffer:ude,isBuffer:Ux,isFormData:V4e,isArrayBufferView:F4e,isString:L4e,isNumber:dde,isBoolean:_4e,isObject:jx,isPlainObject:iP,isEmptyObject:O4e,isReadableStream:H4e,isRequest:W4e,isResponse:U4e,isHeaders:j4e,isUndefined:$y,isDate:k4e,isFile:N4e,isBlob:B4e,isRegExp:oWe,isFunction:Qs,isStream:G4e,isURLSearchParams:z4e,isTypedArray:eWe,isFileList:$4e,forEach:Kx,merge:SG,extend:q4e,trim:K4e,stripBOM:Y4e,inherits:X4e,toFlatObject:Z4e,kindOf:XD,kindOfTest:bc,endsWith:J4e,toArray:Q4e,forEachEntry:tWe,matchAll:rWe,isHTMLForm:nWe,hasOwnProperty:aY,hasOwnProp:aY,reduceDescriptors:fde,freezeMethods:sWe,toObjectSet:aWe,toCamelCase:iWe,noop:lWe,toFiniteNumber:cWe,findKey:hde,global:vg,isContextDefined:pde,isSpecCompliantForm:uWe,toJSONObject:dWe,isAsyncFn:hWe,isThenable:pWe,setImmediate:gde,asap:fWe,isIterable:gWe};function Kr(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}Ue.inherits(Kr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ue.toJSONObject(this.config),code:this.code,status:this.status}}});const mde=Kr.prototype,vde={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{vde[e]={value:e}});Object.defineProperties(Kr,vde);Object.defineProperty(mde,"isAxiosError",{value:!0});Kr.from=(e,t,r,n,i,o)=>{const s=Object.create(mde);Ue.toFlatObject(e,s,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return Kr.call(s,a,l,r,n,i),e&&s.cause==null&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",o&&Object.assign(s,o),s};const mWe=null;function wG(e){return Ue.isPlainObject(e)||Ue.isArray(e)}function yde(e){return Ue.endsWith(e,"[]")?e.slice(0,-2):e}function lY(e,t,r){return e?e.concat(t).map(function(i,o){return i=yde(i),!r&&o?"["+i+"]":i}).join(r?".":""):t}function vWe(e){return Ue.isArray(e)&&!e.some(wG)}const yWe=Ue.toFlatObject(Ue,{},null,function(t){return/^is[A-Z]/.test(t)});function JD(e,t,r){if(!Ue.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=Ue.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,m){return!Ue.isUndefined(m[g])});const n=r.metaTokens,i=r.visitor||u,o=r.dots,s=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&Ue.isSpecCompliantForm(t);if(!Ue.isFunction(i))throw new TypeError("visitor must be a function");function c(f){if(f===null)return"";if(Ue.isDate(f))return f.toISOString();if(Ue.isBoolean(f))return f.toString();if(!l&&Ue.isBlob(f))throw new Kr("Blob is not supported. Use a Buffer instead.");return Ue.isArrayBuffer(f)||Ue.isTypedArray(f)?l&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function u(f,g,m){let v=f;if(f&&!m&&typeof f=="object"){if(Ue.endsWith(g,"{}"))g=n?g:g.slice(0,-2),f=JSON.stringify(f);else if(Ue.isArray(f)&&vWe(f)||(Ue.isFileList(f)||Ue.endsWith(g,"[]"))&&(v=Ue.toArray(f)))return g=yde(g),v.forEach(function(S,x){!(Ue.isUndefined(S)||S===null)&&t.append(s===!0?lY([g],x,o):s===null?g:g+"[]",c(S))}),!1}return wG(f)?!0:(t.append(lY(m,g,o),c(f)),!1)}const d=[],h=Object.assign(yWe,{defaultVisitor:u,convertValue:c,isVisitable:wG});function p(f,g){if(!Ue.isUndefined(f)){if(d.indexOf(f)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(f),Ue.forEach(f,function(v,b){(!(Ue.isUndefined(v)||v===null)&&i.call(t,v,Ue.isString(b)?b.trim():b,g,h))===!0&&p(v,g?g.concat(b):[b])}),d.pop()}}if(!Ue.isObject(e))throw new TypeError("data must be an object");return p(e),t}function cY(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function r5(e,t){this._pairs=[],e&&JD(e,this,t)}const Cde=r5.prototype;Cde.append=function(t,r){this._pairs.push([t,r])};Cde.toString=function(t){const r=t?function(n){return t.call(this,n,cY)}:cY;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function CWe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function bde(e,t,r){if(!t)return e;const n=r&&r.encode||CWe;Ue.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let o;if(i?o=i(t,r):o=Ue.isURLSearchParams(t)?t.toString():new r5(t,r).toString(n),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class uY{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Ue.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Sde={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},bWe=typeof URLSearchParams<"u"?URLSearchParams:r5,SWe=typeof FormData<"u"?FormData:null,wWe=typeof Blob<"u"?Blob:null,xWe={isBrowser:!0,classes:{URLSearchParams:bWe,FormData:SWe,Blob:wWe},protocols:["http","https","file","blob","url","data"]},n5=typeof window<"u"&&typeof document<"u",xG=typeof navigator=="object"&&navigator||void 0,TWe=n5&&(!xG||["ReactNative","NativeScript","NS"].indexOf(xG.product)<0),EWe=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",RWe=n5&&window.location.href||"http://localhost",PWe=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:n5,hasStandardBrowserEnv:TWe,hasStandardBrowserWebWorkerEnv:EWe,navigator:xG,origin:RWe},Symbol.toStringTag,{value:"Module"})),os={...PWe,...xWe};function MWe(e,t){return JD(e,new os.classes.URLSearchParams,{visitor:function(r,n,i,o){return os.isNode&&Ue.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function IWe(e){return Ue.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function DWe(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n=r.length;return s=!s&&Ue.isArray(i)?i.length:s,l?(Ue.hasOwnProp(i,s)?i[s]=[i[s],n]:i[s]=n,!a):((!i[s]||!Ue.isObject(i[s]))&&(i[s]=[]),t(r,n,i[s],o)&&Ue.isArray(i[s])&&(i[s]=DWe(i[s])),!a)}if(Ue.isFormData(e)&&Ue.isFunction(e.entries)){const r={};return Ue.forEachEntry(e,(n,i)=>{t(IWe(n),i,r,0)}),r}return null}function AWe(e,t,r){if(Ue.isString(e))try{return(t||JSON.parse)(e),Ue.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const qx={transitional:Sde,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,o=Ue.isObject(t);if(o&&Ue.isHTMLForm(t)&&(t=new FormData(t)),Ue.isFormData(t))return i?JSON.stringify(wde(t)):t;if(Ue.isArrayBuffer(t)||Ue.isBuffer(t)||Ue.isStream(t)||Ue.isFile(t)||Ue.isBlob(t)||Ue.isReadableStream(t))return t;if(Ue.isArrayBufferView(t))return t.buffer;if(Ue.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return MWe(t,this.formSerializer).toString();if((a=Ue.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return JD(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(r.setContentType("application/json",!1),AWe(t)):t}],transformResponse:[function(t){const r=this.transitional||qx.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(Ue.isResponse(t)||Ue.isReadableStream(t))return t;if(t&&Ue.isString(t)&&(n&&!this.responseType||i)){const s=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(a){if(s)throw a.name==="SyntaxError"?Kr.from(a,Kr.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:os.classes.FormData,Blob:os.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ue.forEach(["delete","get","head","post","put","patch"],e=>{qx.headers[e]={}});const FWe=Ue.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),LWe=e=>{const t={};let r,n,i;return e&&e.split(` `).forEach(function(s){i=s.indexOf(":"),r=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!r||t[r]&&FWe[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},dY=Symbol("internals");function eS(e){return e&&String(e).trim().toLowerCase()}function oP(e){return e===!1||e==null?e:Ue.isArray(e)?e.map(oP):String(e)}function _We(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const OWe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function aO(e,t,r,n,i){if(Ue.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!Ue.isString(t)){if(Ue.isString(n))return t.indexOf(n)!==-1;if(Ue.isRegExp(n))return n.test(t)}}function kWe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function NWe(e,t){const r=Ue.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,o,s){return this[n].call(this,t,i,o,s)},configurable:!0})})}let ea=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function o(a,l,c){const u=eS(l);if(!u)throw new Error("header name must be a non-empty string");const d=Ue.findKey(i,u);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=oP(a))}const s=(a,l)=>Ue.forEach(a,(c,u)=>o(c,u,l));if(Ue.isPlainObject(t)||t instanceof this.constructor)s(t,r);else if(Ue.isString(t)&&(t=t.trim())&&!OWe(t))s(LWe(t),r);else if(Ue.isObject(t)&&Ue.isIterable(t)){let a={},l,c;for(const u of t){if(!Ue.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[c=u[0]]=(l=a[c])?Ue.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}s(a,r)}else t!=null&&o(r,t,n);return this}get(t,r){if(t=eS(t),t){const n=Ue.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return _We(i);if(Ue.isFunction(r))return r.call(this,i,n);if(Ue.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=eS(t),t){const n=Ue.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||aO(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function o(s){if(s=eS(s),s){const a=Ue.findKey(n,s);a&&(!r||aO(n,n[a],a,r))&&(delete n[a],i=!0)}}return Ue.isArray(t)?t.forEach(o):o(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const o=r[n];(!t||aO(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const r=this,n={};return Ue.forEach(this,(i,o)=>{const s=Ue.findKey(n,o);if(s){r[s]=oP(i),delete r[o];return}const a=t?kWe(o):String(o).trim();a!==o&&delete r[o],r[a]=oP(i),n[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return Ue.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&Ue.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[dY]=this[dY]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=eS(s);n[a]||(NWe(i,s),n[a]=!0)}return Ue.isArray(t)?t.forEach(o):o(t),this}};ea.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ue.reduceDescriptors(ea.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});Ue.freezeMethods(ea);function lO(e,t){const r=this||qx,n=t||r,i=ea.from(n.headers);let o=n.data;return Ue.forEach(e,function(a){o=a.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function xde(e){return!!(e&&e.__CANCEL__)}function LC(e,t,r){Kr.call(this,e??"canceled",Kr.ERR_CANCELED,t,r),this.name="CanceledError"}Ue.inherits(LC,Kr,{__CANCEL__:!0});function Tde(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Kr("Request failed with status code "+r.status,[Kr.ERR_BAD_REQUEST,Kr.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function BWe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function $We(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=n[o];s||(s=c),r[i]=l,n[i]=c;let d=o,h=0;for(;d!==i;)h+=r[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-s{r=u,i=null,o&&(clearTimeout(o),o=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-r;d>=n?s(c,u):(i=c,o||(o=setTimeout(()=>{o=null,s(i)},n-d)))},()=>i&&s(i)]}const SM=(e,t,r=3)=>{let n=0;const i=$We(50,250);return GWe(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,l=s-n,c=i(l),u=s<=a;n=s;const d={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-s)/c:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},r)},hY=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},pY=e=>(...t)=>Ue.asap(()=>e(...t)),VWe=os.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,os.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(os.origin),os.navigator&&/(msie|trident)/i.test(os.navigator.userAgent)):()=>!0,zWe=os.hasStandardBrowserEnv?{write(e,t,r,n,i,o,s){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];Ue.isNumber(r)&&a.push(`expires=${new Date(r).toUTCString()}`),Ue.isString(n)&&a.push(`path=${n}`),Ue.isString(i)&&a.push(`domain=${i}`),o===!0&&a.push("secure"),Ue.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function HWe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function WWe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ede(e,t,r){let n=!HWe(t);return e&&(n||r==!1)?WWe(e,t):t}const fY=e=>e instanceof ea?{...e}:e;function Jg(e,t){t=t||{};const r={};function n(c,u,d,h){return Ue.isPlainObject(c)&&Ue.isPlainObject(u)?Ue.merge.call({caseless:h},c,u):Ue.isPlainObject(u)?Ue.merge({},u):Ue.isArray(u)?u.slice():u}function i(c,u,d,h){if(Ue.isUndefined(u)){if(!Ue.isUndefined(c))return n(void 0,c,d,h)}else return n(c,u,d,h)}function o(c,u){if(!Ue.isUndefined(u))return n(void 0,u)}function s(c,u){if(Ue.isUndefined(u)){if(!Ue.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function a(c,u,d){if(d in t)return n(c,u);if(d in e)return n(void 0,c)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,u,d)=>i(fY(c),fY(u),d,!0)};return Ue.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||i,h=d(e[u],t[u],u);Ue.isUndefined(h)&&d!==a||(r[u]=h)}),r}const Rde=e=>{const t=Jg({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=ea.from(s),t.url=bde(Ede(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),Ue.isFormData(r)){if(os.hasStandardBrowserEnv||os.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(Ue.isFunction(r.getHeaders)){const l=r.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&s.set(u,d)})}}if(os.hasStandardBrowserEnv&&(n&&Ue.isFunction(n)&&(n=n(t)),n||n!==!1&&VWe(t.url))){const l=i&&o&&zWe.read(o);l&&s.set(i,l)}return t},UWe=typeof XMLHttpRequest<"u",jWe=UWe&&function(e){return new Promise(function(r,n){const i=Rde(e);let o=i.data;const s=ea.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=i,u,d,h,p,f;function g(){p&&p(),f&&f(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function v(){if(!m)return;const S=ea.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),T={data:!a||a==="text"||a==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:S,config:e,request:m};Tde(function(E){r(E),g()},function(E){n(E),g()},T),m=null}"onloadend"in m?m.onloadend=v:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(v)},m.onabort=function(){m&&(n(new Kr("Request aborted",Kr.ECONNABORTED,e,m)),m=null)},m.onerror=function(x){const T=x&&x.message?x.message:"Network Error",R=new Kr(T,Kr.ERR_NETWORK,e,m);R.event=x||null,n(R),m=null},m.ontimeout=function(){let x=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const T=i.transitional||Sde;i.timeoutErrorMessage&&(x=i.timeoutErrorMessage),n(new Kr(x,T.clarifyTimeoutError?Kr.ETIMEDOUT:Kr.ECONNABORTED,e,m)),m=null},o===void 0&&s.setContentType(null),"setRequestHeader"in m&&Ue.forEach(s.toJSON(),function(x,T){m.setRequestHeader(T,x)}),Ue.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),a&&a!=="json"&&(m.responseType=i.responseType),c&&([h,f]=SM(c,!0),m.addEventListener("progress",h)),l&&m.upload&&([d,p]=SM(l),m.upload.addEventListener("progress",d),m.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(u=S=>{m&&(n(!S||S.type?new LC(null,e,m):S),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const b=BWe(i.url);if(b&&os.protocols.indexOf(b)===-1){n(new Kr("Unsupported protocol "+b+":",Kr.ERR_BAD_REQUEST,e));return}m.send(o||null)})},KWe=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const o=function(c){if(!i){i=!0,a();const u=c instanceof Error?c:this.reason;n.abort(u instanceof Kr?u:new LC(u instanceof Error?u.message:u))}};let s=t&&setTimeout(()=>{s=null,o(new Kr(`timeout ${t} of ms exceeded`,Kr.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:l}=n;return l.unsubscribe=()=>Ue.asap(a),l}},qWe=function*(e,t){let r=e.byteLength;if(r{const i=YWe(e,t);let o=0,s,a=l=>{s||(s=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){a(),l.close();return}let d=u.byteLength;if(r){let h=o+=d;r(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},mY=64*1024,{isFunction:sE}=Ue,ZWe=(({Request:e,Response:t})=>({Request:e,Response:t}))(Ue.global),{ReadableStream:vY,TextEncoder:yY}=Ue.global,CY=(e,...t)=>{try{return!!e(...t)}catch{return!1}},JWe=e=>{e=Ue.merge.call({skipUndefined:!0},ZWe,e);const{fetch:t,Request:r,Response:n}=e,i=t?sE(t):typeof fetch=="function",o=sE(r),s=sE(n);if(!i)return!1;const a=i&&sE(vY),l=i&&(typeof yY=="function"?(f=>g=>f.encode(g))(new yY):async f=>new Uint8Array(await new r(f).arrayBuffer())),c=o&&a&&CY(()=>{let f=!1;const g=new r(os.origin,{body:new vY,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!g}),u=s&&a&&CY(()=>Ue.isReadableStream(new n("").body)),d={stream:u&&(f=>f.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!d[f]&&(d[f]=(g,m)=>{let v=g&&g[f];if(v)return v.call(g);throw new Kr(`Response type '${f}' is not supported`,Kr.ERR_NOT_SUPPORT,m)})});const h=async f=>{if(f==null)return 0;if(Ue.isBlob(f))return f.size;if(Ue.isSpecCompliantForm(f))return(await new r(os.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(Ue.isArrayBufferView(f)||Ue.isArrayBuffer(f))return f.byteLength;if(Ue.isURLSearchParams(f)&&(f=f+""),Ue.isString(f))return(await l(f)).byteLength},p=async(f,g)=>{const m=Ue.toFiniteNumber(f.getContentLength());return m??h(g)};return async f=>{let{url:g,method:m,data:v,signal:b,cancelToken:S,timeout:x,onDownloadProgress:T,onUploadProgress:R,responseType:E,headers:M,withCredentials:D="same-origin",fetchOptions:A}=Rde(f),I=t||fetch;E=E?(E+"").toLowerCase():"text";let _=KWe([b,S&&S.toAbortSignal()],x),F=null;const O=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let k;try{if(R&&c&&m!=="get"&&m!=="head"&&(k=await p(M,v))!==0){let V=new r(g,{method:"POST",body:v,duplex:"half"}),G;if(Ue.isFormData(v)&&(G=V.headers.get("content-type"))&&M.setContentType(G),V.body){const[K,q]=hY(k,SM(pY(R)));v=gY(V.body,mY,K,q)}}Ue.isString(D)||(D=D?"include":"omit");const B=o&&"credentials"in r.prototype,H={...A,signal:_,method:m.toUpperCase(),headers:M.normalize().toJSON(),body:v,duplex:"half",credentials:B?D:void 0};F=o&&new r(g,H);let N=await(o?I(F,A):I(g,H));const z=u&&(E==="stream"||E==="response");if(u&&(T||z&&O)){const V={};["status","statusText","headers"].forEach(Y=>{V[Y]=N[Y]});const G=Ue.toFiniteNumber(N.headers.get("content-length")),[K,q]=T&&hY(G,SM(pY(T),!0))||[];N=new n(gY(N.body,mY,K,()=>{q&&q(),O&&O()}),V)}E=E||"text";let U=await d[Ue.findKey(d,E)||"text"](N,f);return!z&&O&&O(),await new Promise((V,G)=>{Tde(V,G,{data:U,headers:ea.from(N.headers),status:N.status,statusText:N.statusText,config:f,request:F})})}catch(B){throw O&&O(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new Kr("Network Error",Kr.ERR_NETWORK,f,F),{cause:B.cause||B}):Kr.from(B,B&&B.code,f,F)}}},QWe=new Map,Pde=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t,o=[n,i,r];let s=o.length,a=s,l,c,u=QWe;for(;a--;)l=o[a],c=u.get(l),c===void 0&&u.set(l,c=a?new Map:JWe(t)),u=c;return c};Pde();const i5={http:mWe,xhr:jWe,fetch:{get:Pde}};Ue.forEach(i5,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const bY=e=>`- ${e}`,e6e=e=>Ue.isFunction(e)||e===null||e===!1;function t6e(e,t){e=Ue.isArray(e)?e:[e];const{length:r}=e;let n,i;const o={};for(let s=0;s`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=r?s.length>1?`since : `+s.map(bY).join(` `):" "+bY(s[0]):"as no adapter specified";throw new Kr("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i}const Mde={getAdapter:t6e,adapters:i5};function cO(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new LC(null,e)}function SY(e){return cO(e),e.headers=ea.from(e.headers),e.data=lO.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Mde.getAdapter(e.adapter||qx.adapter,e)(e).then(function(n){return cO(e),n.data=lO.call(e,e.transformResponse,n),n.headers=ea.from(n.headers),n},function(n){return xde(n)||(cO(e),n&&n.response&&(n.response.data=lO.call(e,e.transformResponse,n.response),n.response.headers=ea.from(n.response.headers))),Promise.reject(n)})}const Ide="1.13.2",QD={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{QD[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const wY={};QD.transitional=function(t,r,n){function i(o,s){return"[Axios v"+Ide+"] Transitional option '"+o+"'"+s+(n?". "+n:"")}return(o,s,a)=>{if(t===!1)throw new Kr(i(s," has been removed"+(r?" in "+r:"")),Kr.ERR_DEPRECATED);return r&&!wY[s]&&(wY[s]=!0,console.warn(i(s," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,s,a):!0}};QD.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function r6e(e,t,r){if(typeof e!="object")throw new Kr("options must be an object",Kr.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],s=t[o];if(s){const a=e[o],l=a===void 0||s(a,o,e);if(l!==!0)throw new Kr("option "+o+" must be "+l,Kr.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Kr("Unknown option "+o,Kr.ERR_BAD_OPTION)}}const sP={assertOptions:r6e,validators:QD},Ac=sP.validators;let Fg=class{constructor(t){this.defaults=t||{},this.interceptors={request:new uY,response:new uY}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?o&&!String(n.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(n.stack+=` `+o):n.stack=o}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Jg(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:o}=r;n!==void 0&&sP.assertOptions(n,{silentJSONParsing:Ac.transitional(Ac.boolean),forcedJSONParsing:Ac.transitional(Ac.boolean),clarifyTimeoutError:Ac.transitional(Ac.boolean)},!1),i!=null&&(Ue.isFunction(i)?r.paramsSerializer={serialize:i}:sP.assertOptions(i,{encode:Ac.function,serialize:Ac.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),sP.assertOptions(r,{baseUrl:Ac.spelling("baseURL"),withXsrfToken:Ac.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=o&&Ue.merge(o.common,o[r.method]);o&&Ue.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),r.headers=ea.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(r)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let u,d=0,h;if(!l){const f=[SY.bind(this),void 0];for(f.unshift(...a),f.push(...c),h=f.length,u=Promise.resolve(r);d{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](i);n._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{n.subscribe(a),o=a}).then(i);return s.cancel=function(){n.unsubscribe(o)},s},t(function(o,s,a){n.reason||(n.reason=new LC(o,s,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Dde(function(i){t=i}),cancel:t}}};function i6e(e){return function(r){return e.apply(null,r)}}function o6e(e){return Ue.isObject(e)&&e.isAxiosError===!0}const TG={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(TG).forEach(([e,t])=>{TG[t]=e});function Ade(e){const t=new Fg(e),r=lde(Fg.prototype.request,t);return Ue.extend(r,Fg.prototype,t,{allOwnKeys:!0}),Ue.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return Ade(Jg(e,i))},r}const Ai=Ade(qx);Ai.Axios=Fg;Ai.CanceledError=LC;Ai.CancelToken=n6e;Ai.isCancel=xde;Ai.VERSION=Ide;Ai.toFormData=JD;Ai.AxiosError=Kr;Ai.Cancel=Ai.CanceledError;Ai.all=function(t){return Promise.all(t)};Ai.spread=i6e;Ai.isAxiosError=o6e;Ai.mergeConfig=Jg;Ai.AxiosHeaders=ea;Ai.formToJSON=e=>wde(Ue.isHTMLForm(e)?new FormData(e):e);Ai.getAdapter=Mde.getAdapter;Ai.HttpStatusCode=TG;Ai.default=Ai;const{Axios:fNt,AxiosError:gNt,CanceledError:mNt,isCancel:vNt,CancelToken:yNt,VERSION:CNt,all:bNt,Cancel:SNt,isAxiosError:wNt,spread:xNt,toFormData:TNt,AxiosHeaders:ENt,HttpStatusCode:RNt,formToJSON:PNt,getAdapter:MNt,mergeConfig:INt}=Ai;class XS extends Error{}XS.prototype.name="InvalidTokenError";function s6e(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,r)=>{let n=r.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function a6e(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return s6e(t)}catch{return atob(t)}}function l6e(e,t){if(typeof e!="string")throw new XS("Invalid token specified: must be a string");t||(t={});const r=t.header===!0?0:1,n=e.split(".")[r];if(typeof n!="string")throw new XS(`Invalid token specified: missing part #${r+1}`);let i;try{i=a6e(n)}catch(o){throw new XS(`Invalid token specified: invalid base64 for part #${r+1} (${o.message})`)}try{return JSON.parse(i)}catch(o){throw new XS(`Invalid token specified: invalid json for part #${r+1} (${o.message})`)}}/*! js-cookie v3.0.5 | MIT */function aE(e){for(var t=1;t"u")){s=aE({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in s)s[l]&&(a+="; "+l,s[l]!==!0&&(a+="="+s[l].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+a}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;au6e.get(e)},d6e="refresh_token",h6e="authorization_code",p6e="wbid-sdk-access-token",Lde="wbid-oauth-sdk-access-token",f6e={[Pw.DEV]:"https://stage-id.wb.ru",[Pw.STAGE]:"https://stage-id.wb.ru",[Pw.PROD]:"https://id.wb.ru"};class g6e{constructor(){Ae(this,"_accessToken");Ae(this,"axios");this.axios=Ai.create(),this._accessToken="",typeof localStorage<"u"&&(this._accessToken=localStorage.getItem(Lde)??"")}async setAccessToken(t){return this._accessToken=t,this}get accessToken(){return this._accessToken}get isAccessTokenExpired(){return this.accessToken?(l6e(this.accessToken).exp||0)crypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");const xY=(e=22)=>m6e(e),v6e=e=>e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/m,""),y6e=async e=>{let t;return crypto.subtle?t=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(e)):t=(await P4e(()=>import("./sha256-CBw6sojz-PkoITTVd.js"),[]).then(n=>n.s)).sha256.create().update(e).arrayBuffer(),v6e(btoa(String.fromCharCode(...new Uint8Array(t))))};var ZS=(e=>(e.AUTHORIZATION_REJECTED="AUTHORIZATION_REJECTED",e.INVALID_CALLBACK_PARAMS="INVALID_CALLBACK_PARAMS",e.TOKEN_NOT_RECEIVED="TOKEN_NOT_RECEIVED",e.LOGIN_FAILED="LOGIN_FAILED",e))(ZS||{});class DNt extends g6e{constructor(r){super();Ae(this,"params");Ae(this,"_validationKey");this.params={clientId:r.clientId,scope:r.scope,redirectUri:r.redirectUri,debug:r.debug??lE.debug,audience:r.audience??lE.audience,endpoints:{...lE.endpoints??{},...r.endpoints??{}},getCookie:r.getCookie??lE.getCookie,environment:r.environment}}async setAccessToken(r){return await super.setAccessToken(r),typeof localStorage<"u"&&localStorage.setItem(Lde,r),this}get validationKey(){return this._validationKey??""}get accessTokenHeader(){return"Authorization"}get accessTokenHeaderValue(){return`Bearer ${this.accessToken}`}get isUserLoggedIn(){return!!this.accessToken}async getCurrentUser(){return this.axios.post(this.params.endpoints.user,{clientId:this.params.clientId}).then(r=>r.data).catch(r=>(this.params.debug&&console.error(r),null))}async initializeWithSSR(){const r=await this.params.getCookie(p6e)??"";return r&&await this.setAccessToken(r),this}async login({prompt:r=M4e.consent,phone:n}={}){if(typeof document>"u"||typeof sessionStorage>"u"||typeof URLSearchParams>"u")return;const i=this.params.endpoints.authorize,o=xY(64),s=await y6e(o),a=xY(32);sessionStorage.setItem(a,o);const l=new URLSearchParams;l.set(ya.clientId,this.params.clientId),l.set(ya.audience,this.params.audience),l.set(ya.prompt,r),l.set(ya.redirectUri,this.params.redirectUri),l.set(ya.scope,this.params.scope),l.set(ya.state,a),l.set(ya.codeChallengeMethod,D4e.S256),l.set(ya.responseType,I4e.code),l.set(ya.codeChallenge,s),n&&l.set(ya.phone,n),document.location=`${i}?${l.toString()}`}async handleCallback(){if(typeof window>"u"||typeof sessionStorage>"u"||typeof URLSearchParams>"u")return null;const r=new URLSearchParams(window.location.search),n=r.get(ya.code),i=r.get(ya.error),o=r.get(ya.state),s=sessionStorage.getItem(o??"");return i==="consent_rejected"?(o&&sessionStorage.removeItem(o),{code:ZS.AUTHORIZATION_REJECTED}):!n||!o||!s?(o&&sessionStorage.removeItem(o),{code:ZS.INVALID_CALLBACK_PARAMS}):this.axios.post(this.params.endpoints.token,{clientId:this.params.clientId,code:n,grantType:h6e,codeVerifier:s,redirectUri:this.params.redirectUri,state:o}).then(a=>{var l;return(l=a.data)==null?void 0:l.accessToken}).then(a=>a?this.setAccessToken(a).then(()=>null):{code:ZS.TOKEN_NOT_RECEIVED}).catch(a=>this.params.debug?(console.error(a),{code:ZS.LOGIN_FAILED}):null).finally(()=>{sessionStorage.removeItem(o)})}async logout(){return this.axios.post(this.params.endpoints.revoke,{clientId:this.params.clientId,accessToken:this.accessToken}).then(({status:r})=>{const n=[200,204].includes(r);return n&&this.setAccessToken("").then(()=>n)}).catch(r=>(this.params.debug&&console.error(r),!1))}async refresh(){return this.axios.post(this.params.endpoints.token,{grantType:d6e,clientId:this.params.clientId}).then(r=>{if([200,204].includes(r.status)){const{accessToken:i,validationKey:o}=r.data;return this._validationKey=o,this.setAccessToken(i).then(()=>({accessToken:i,validationKey:o}))}return null}).catch(r=>(this.params.debug&&console.error(r),null))}goToProfile(){const r=this.params.environment??Pw.PROD,n=f6e[r];typeof window<"u"&&window.open(n,"_blank")}}function rs(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function a(u){try{c(n.next(u))}catch(d){s(d)}}function l(u){try{c(n.throw(u))}catch(d){s(d)}}function c(u){u.done?o(u.value):i(u.value).then(a,l)}c((n=n.apply(e,[])).next())})}function C6e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o5={exports:{}},my=typeof Reflect=="object"?Reflect:null,TY=my&&typeof my.apply=="function"?my.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},aP;my&&typeof my.ownKeys=="function"?aP=my.ownKeys:Object.getOwnPropertySymbols?aP=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:aP=function(t){return Object.getOwnPropertyNames(t)};function b6e(e){console&&console.warn&&console.warn(e)}var _de=Number.isNaN||function(t){return t!==t};function Bn(){Bn.init.call(this)}o5.exports=Bn;o5.exports.once=T6e;Bn.EventEmitter=Bn;Bn.prototype._events=void 0;Bn.prototype._eventsCount=0;Bn.prototype._maxListeners=void 0;var EY=10;function eA(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(Bn,"defaultMaxListeners",{enumerable:!0,get:function(){return EY},set:function(e){if(typeof e!="number"||e<0||_de(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");EY=e}});Bn.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Bn.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||_de(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Ode(e){return e._maxListeners===void 0?Bn.defaultMaxListeners:e._maxListeners}Bn.prototype.getMaxListeners=function(){return Ode(this)};Bn.prototype.emit=function(t){for(var r=[],n=1;n0&&(s=r[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[t];if(l===void 0)return!1;if(typeof l=="function")TY(l,this,r);else for(var c=l.length,u=Gde(l,c),n=0;n0&&s.length>i&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,b6e(a)}return e}Bn.prototype.addListener=function(t,r){return kde(this,t,r,!1)};Bn.prototype.on=Bn.prototype.addListener;Bn.prototype.prependListener=function(t,r){return kde(this,t,r,!0)};function S6e(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Nde(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=S6e.bind(n);return i.listener=r,n.wrapFn=i,i}Bn.prototype.once=function(t,r){return eA(r),this.on(t,Nde(this,t,r)),this};Bn.prototype.prependOnceListener=function(t,r){return eA(r),this.prependListener(t,Nde(this,t,r)),this};Bn.prototype.removeListener=function(t,r){var n,i,o,s,a;if(eA(r),i=this._events,i===void 0)return this;if(n=i[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(o=-1,s=n.length-1;s>=0;s--)if(n[s]===r||n[s].listener===r){a=n[s].listener,o=s;break}if(o<0)return this;o===0?n.shift():w6e(n,o),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,a||r)}return this};Bn.prototype.off=Bn.prototype.removeListener;Bn.prototype.removeAllListeners=function(t){var r,n,i;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var o=Object.keys(n),s;for(i=0;i=0;i--)this.removeListener(t,r[i]);return this};function Bde(e,t,r){var n=e._events;if(n===void 0)return[];var i=n[t];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?x6e(i):Gde(i,i.length)}Bn.prototype.listeners=function(t){return Bde(this,t,!0)};Bn.prototype.rawListeners=function(t){return Bde(this,t,!1)};Bn.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):$de.call(e,t)};Bn.prototype.listenerCount=$de;function $de(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Bn.prototype.eventNames=function(){return this._eventsCount>0?aP(this._events):[]};function Gde(e,t){for(var r=new Array(t),n=0;n31&&(e=31);const n=I6e(0,Math.min(r,t*Math.pow(2,e)));return Math.min(r,t+n)}function D6e(e){return"error"in e&&e.error!==null}function EM(e){return Math.min(e*1e3,2147483647)}class A6e extends zde{constructor(t,r,n){super(),this._resubscribeTimeout=null,this._refreshTimeout=null,this.channel=r,this.state=vs.Unsubscribed,this._centrifuge=t,this._token="",this._getToken=null,this._data=null,this._getData=null,this._recover=!1,this._offset=null,this._epoch=null,this._id=0,this._recoverable=!1,this._positioned=!1,this._joinLeave=!1,this._minResubscribeDelay=500,this._maxResubscribeDelay=2e4,this._resubscribeTimeout=null,this._resubscribeAttempts=0,this._promises={},this._promiseId=0,this._inflight=!1,this._refreshTimeout=null,this._delta="",this._delta_negotiated=!1,this._tagsFilter=null,this._prevValue=null,this._unsubPromise=Promise.resolve(),this._setOptions(n),this._centrifuge._debugEnabled?(this.on("state",i=>{this._debug("subscription state",r,i.oldState,"->",i.newState)}),this.on("error",i=>{this._debug("subscription error",r,i)})):this.on("error",function(){Function.prototype()})}ready(t){return this.state===vs.Unsubscribed?Promise.reject({code:Xn.subscriptionUnsubscribed,message:this.state}):this.state===vs.Subscribed?Promise.resolve():new Promise((r,n)=>{const i={resolve:r,reject:n};t&&(i.timeout=setTimeout(function(){n({code:Xn.timeout,message:"timeout"})},t)),this._promises[this._nextPromiseId()]=i})}subscribe(){this._isSubscribed()||(this._resubscribeAttempts=0,this._setSubscribing(wM.subscribeCalled,"subscribe called"))}unsubscribe(){this._unsubPromise=this._setUnsubscribed(xM.unsubscribeCalled,"unsubscribe called",!0)}publish(t){return rs(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.publish(this.channel,t)})}presence(){return rs(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.presence(this.channel)})}presenceStats(){return rs(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.presenceStats(this.channel)})}history(t){return rs(this,void 0,void 0,function*(){return yield this._methodCall(),this._centrifuge.history(this.channel,t)})}setTagsFilter(t){if(t&&this._delta)throw new Error("cannot use delta and tagsFilter together");this._tagsFilter=t}setData(t){this._data=t}_methodCall(){return this._isSubscribed()?Promise.resolve():this._isUnsubscribed()?Promise.reject({code:Xn.subscriptionUnsubscribed,message:this.state}):new Promise((t,r)=>{const n=this._centrifuge._config.timeout,i=setTimeout(()=>{r({code:Xn.timeout,message:"timeout"})},n);this._promises[this._nextPromiseId()]={timeout:i,resolve:t,reject:r}})}_nextPromiseId(){return++this._promiseId}_needRecover(){return this._recover===!0}_isUnsubscribed(){return this.state===vs.Unsubscribed}_isSubscribing(){return this.state===vs.Subscribing}_isSubscribed(){return this.state===vs.Subscribed}_setState(t){if(this.state!==t){const r=this.state;return this.state=t,this.emit("state",{newState:t,oldState:r,channel:this.channel}),!0}return!1}_usesToken(){return this._token!==""||this._getToken!==null}_clearSubscribingState(){this._resubscribeAttempts=0,this._clearResubscribeTimeout()}_clearSubscribedState(){this._clearRefreshTimeout()}_setSubscribed(t){if(!this._isSubscribing())return;this._clearSubscribingState(),t.id&&(this._id=t.id),t.recoverable&&(this._recover=!0,this._offset=t.offset||0,this._epoch=t.epoch||""),t.delta?this._delta_negotiated=!0:this._delta_negotiated=!1,this._setState(vs.Subscribed);const r=this._centrifuge._getSubscribeContext(this.channel,t);this.emit("subscribed",r),this._resolvePromises();const n=t.publications;if(n&&n.length>0)for(const i in n)n.hasOwnProperty(i)&&this._handlePublication(n[i]);t.expires===!0&&(this._refreshTimeout=setTimeout(()=>this._refresh(),EM(t.ttl)))}_setSubscribing(t,r){return rs(this,void 0,void 0,function*(){this._isSubscribing()||(this._isSubscribed()&&this._clearSubscribedState(),this._setState(vs.Subscribing)&&this.emit("subscribing",{channel:this.channel,code:t,reason:r}),this._centrifuge._transport&&this._centrifuge._transport.emulation()&&(yield this._unsubPromise),this._isSubscribing()&&this._subscribe())})}_subscribe(){return this._debug("subscribing on",this.channel),this._isTransportOpen()?this._inflight?null:(this._inflight=!0,this._canSubscribeWithoutGettingToken()?this._subscribeWithoutToken():(this._getSubscriptionToken().then(t=>this._handleTokenResponse(t)).catch(t=>this._handleTokenError(t)),null)):(this._debug("delay subscribe on",this.channel,"till connected"),null)}_isTransportOpen(){return this._centrifuge._transportIsOpen}_canSubscribeWithoutGettingToken(){return!this._usesToken()||!!this._token}_subscribeWithoutToken(){return this._getData?(this._getDataAndSubscribe(this._token),null):this._sendSubscribe(this._token)}_getDataAndSubscribe(t){if(!this._getData){this._inflight=!1;return}this._getData({channel:this.channel}).then(r=>{if(!this._isSubscribing()){this._inflight=!1;return}this._data=r,this._sendSubscribe(t)}).catch(r=>this._handleGetDataError(r))}_handleGetDataError(t){if(!this._isSubscribing()){this._inflight=!1;return}if(t instanceof sd){this._inflight=!1,this._failUnauthorized();return}this.emit("error",{type:"subscribeData",channel:this.channel,error:{code:Xn.badConfiguration,message:(t==null?void 0:t.toString())||""}}),this._inflight=!1,this._scheduleResubscribe()}_handleTokenResponse(t){if(!this._isSubscribing()){this._inflight=!1;return}if(!t){this._inflight=!1,this._failUnauthorized();return}this._token=t,this._getData?this._getDataAndSubscribe(t):this._sendSubscribe(t)}_handleTokenError(t){if(!this._isSubscribing()){this._inflight=!1;return}if(t instanceof sd){this._inflight=!1,this._failUnauthorized();return}this.emit("error",{type:"subscribeToken",channel:this.channel,error:{code:Xn.subscriptionSubscribeToken,message:(t==null?void 0:t.toString())||""}}),this._inflight=!1,this._scheduleResubscribe()}_sendSubscribe(t){if(!this._isTransportOpen())return this._inflight=!1,null;const r=this._buildSubscribeCommand(t);return this._centrifuge._call(r).then(n=>{this._inflight=!1;const i=n.reply.subscribe;this._handleSubscribeResponse(i),n.next&&n.next()},n=>{this._inflight=!1,this._handleSubscribeError(n.error),n.next&&n.next()}),r}_buildSubscribeCommand(t){const r={channel:this.channel};if(t&&(r.token=t),this._data&&(r.data=this._data),this._positioned&&(r.positioned=!0),this._recoverable&&(r.recoverable=!0),this._joinLeave&&(r.join_leave=!0),r.flag=RG.channelCompaction,this._needRecover()){r.recover=!0;const n=this._getOffset();n&&(r.offset=n);const i=this._getEpoch();i&&(r.epoch=i)}return this._delta&&(r.delta=this._delta),this._tagsFilter&&(r.tf=this._tagsFilter),{subscribe:r}}_debug(...t){this._centrifuge._debug(...t)}_handleSubscribeError(t){if(this._isSubscribing()){if(t.code===Xn.timeout){this._centrifuge._disconnect(Uh.subscribeTimeout,"subscribe timeout",!0);return}this._subscribeError(t)}}_handleSubscribeResponse(t){this._isSubscribing()&&this._setSubscribed(t)}_setUnsubscribed(t,r,n){if(this._isUnsubscribed())return Promise.resolve();let i=Promise.resolve();return this._isSubscribed()?(n&&(i=this._centrifuge._unsubscribe(this)),this._clearSubscribedState()):this._isSubscribing()&&(this._inflight&&n&&(i=this._centrifuge._unsubscribe(this)),this._clearSubscribingState()),this._inflight=!1,this._setState(vs.Unsubscribed)&&this.emit("unsubscribed",{channel:this.channel,code:t,reason:r}),this._rejectPromises({code:Xn.subscriptionUnsubscribed,message:this.state}),i}_handlePublication(t){if(this._delta&&this._delta_negotiated){const{newData:n,newPrevValue:i}=this._centrifuge._codec.applyDeltaIfNeeded(t,this._prevValue);t.data=n,this._prevValue=i}const r=this._centrifuge._getPublicationContext(this.channel,t);this.emit("publication",r),t.offset&&(this._offset=t.offset)}_handleJoin(t){const r=this._centrifuge._getJoinLeaveContext(t.info);this.emit("join",{channel:this.channel,info:r})}_handleLeave(t){const r=this._centrifuge._getJoinLeaveContext(t.info);this.emit("leave",{channel:this.channel,info:r})}_resolvePromises(){for(const t in this._promises)this._promises.hasOwnProperty(t)&&(this._promises[t].timeout&&clearTimeout(this._promises[t].timeout),this._promises[t].resolve(),delete this._promises[t])}_rejectPromises(t){for(const r in this._promises)this._promises.hasOwnProperty(r)&&(this._promises[r].timeout&&clearTimeout(this._promises[r].timeout),this._promises[r].reject(t),delete this._promises[r])}_scheduleResubscribe(){if(!this._isSubscribing()){this._debug("not in subscribing state, skip resubscribe scheduling",this.channel);return}const t=this,r=this._getResubscribeDelay();this._resubscribeTimeout=setTimeout(function(){t._isSubscribing()&&t._subscribe()},r),this._debug("resubscribe scheduled after "+r,this.channel)}_subscribeError(t){if(this._isSubscribing())if(t.code<100||t.code===109||t.temporary===!0){t.code===109&&(this._token="");const r={channel:this.channel,type:"subscribe",error:t};this._centrifuge.state===Ni.Connected&&this.emit("error",r),this._scheduleResubscribe()}else this._setUnsubscribed(t.code,t.message,!1)}_getResubscribeDelay(){const t=TM(this._resubscribeAttempts,this._minResubscribeDelay,this._maxResubscribeDelay);return this._resubscribeAttempts++,t}_setOptions(t){if(t){if(t.since&&(this._offset=t.since.offset||0,this._epoch=t.since.epoch||"",this._recover=!0),t.data&&(this._data=t.data),t.getData&&(this._getData=t.getData),t.minResubscribeDelay!==void 0&&(this._minResubscribeDelay=t.minResubscribeDelay),t.maxResubscribeDelay!==void 0&&(this._maxResubscribeDelay=t.maxResubscribeDelay),t.token&&(this._token=t.token),t.getToken&&(this._getToken=t.getToken),t.positioned===!0&&(this._positioned=!0),t.recoverable===!0&&(this._recoverable=!0),t.joinLeave===!0&&(this._joinLeave=!0),t.delta){if(t.delta!=="fossil")throw new Error("unsupported delta format");this._delta=t.delta}if(t.tagsFilter&&(this._tagsFilter=t.tagsFilter),this._tagsFilter&&this._delta)throw new Error("cannot use delta and tagsFilter together")}}_getOffset(){const t=this._offset;return t!==null?t:0}_getEpoch(){const t=this._epoch;return t!==null?t:""}_clearRefreshTimeout(){this._refreshTimeout!==null&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null)}_clearResubscribeTimeout(){this._resubscribeTimeout!==null&&(clearTimeout(this._resubscribeTimeout),this._resubscribeTimeout=null)}_getSubscriptionToken(){this._debug("get subscription token for channel",this.channel);const t={channel:this.channel},r=this._getToken;return r===null?(this.emit("error",{type:"configuration",channel:this.channel,error:{code:Xn.badConfiguration,message:"provide a function to get channel subscription token"}}),Promise.reject(new sd(""))):r(t)}_refresh(){this._clearRefreshTimeout();const t=this;this._getSubscriptionToken().then(function(r){if(!t._isSubscribed())return;if(!r){t._failUnauthorized();return}t._token=r;const i={sub_refresh:{channel:t.channel,token:r}};t._centrifuge._call(i).then(o=>{const s=o.reply.sub_refresh;t._refreshResponse(s),o.next&&o.next()},o=>{t._refreshError(o.error),o.next&&o.next()})}).catch(function(r){if(r instanceof sd){t._failUnauthorized();return}t.emit("error",{type:"refreshToken",channel:t.channel,error:{code:Xn.subscriptionRefreshToken,message:r!==void 0?r.toString():""}}),t._refreshTimeout=setTimeout(()=>t._refresh(),t._getRefreshRetryDelay())})}_refreshResponse(t){this._isSubscribed()&&(this._debug("subscription token refreshed, channel",this.channel),this._clearRefreshTimeout(),t.expires===!0&&(this._refreshTimeout=setTimeout(()=>this._refresh(),EM(t.ttl))))}_refreshError(t){this._isSubscribed()&&(t.code<100||t.temporary===!0?(this.emit("error",{type:"refresh",channel:this.channel,error:t}),this._refreshTimeout=setTimeout(()=>this._refresh(),this._getRefreshRetryDelay())):this._setUnsubscribed(t.code,t.message,!0))}_getRefreshRetryDelay(){return TM(0,1e4,2e4)}_failUnauthorized(){this._setUnsubscribed(xM.unauthorized,"unauthorized",!0)}}class F6e{constructor(t,r){this.endpoint=t,this.options=r,this._transport=null}name(){return"sockjs"}subName(){return"sockjs-"+this._transport.transport}emulation(){return!1}supported(){return this.options.sockjs!==null}initialize(t,r){this._transport=new this.options.sockjs(this.endpoint,null,this.options.sockjsOptions),this._transport.onopen=()=>{r.onOpen()},this._transport.onerror=n=>{r.onError(n)},this._transport.onclose=n=>{r.onClose(n)},this._transport.onmessage=n=>{r.onMessage(n.data)}}close(){this._transport.close()}send(t){this._transport.send(t)}}class RY{constructor(t,r){this.endpoint=t,this.options=r,this._transport=null}name(){return"websocket"}subName(){return"websocket"}emulation(){return!1}supported(){return this.options.websocket!==void 0&&this.options.websocket!==null}initialize(t,r){let n="";t==="protobuf"&&(n="centrifuge-protobuf"),n!==""?this._transport=new this.options.websocket(this.endpoint,n):this._transport=new this.options.websocket(this.endpoint),t==="protobuf"&&(this._transport.binaryType="arraybuffer"),this._transport.onopen=()=>{r.onOpen()},this._transport.onerror=i=>{r.onError(i)},this._transport.onclose=i=>{r.onClose(i)},this._transport.onmessage=i=>{r.onMessage(i.data)}}close(){this._transport.close()}send(t){this._transport.send(t)}}class L6e{constructor(t,r){this.endpoint=t,this.options=r,this._abortController=null,this._utf8decoder=new TextDecoder,this._protocol="json"}name(){return"http_stream"}subName(){return"http_stream"}emulation(){return!0}_handleErrors(t){if(!t.ok)throw new Error(t.status);return t}_fetchEventTarget(t,r,n){const i=new EventTarget,o=t.options.fetch;return o(r,n).then(t._handleErrors).then(s=>{i.dispatchEvent(new Event("open"));let a="",l=0,c=new Uint8Array;const u=s.body.getReader();return new t.options.readableStream({start(d){function h(){return u.read().then(({done:p,value:f})=>{if(p){i.dispatchEvent(new Event("close")),d.close();return}try{if(t._protocol==="json")for(a+=t._utf8decoder.decode(f);l{i.dispatchEvent(new Event("error",{detail:s})),i.dispatchEvent(new Event("close"))}),i}supported(){return this.options.fetch!==null&&this.options.readableStream!==null&&typeof TextDecoder<"u"&&typeof AbortController<"u"&&typeof EventTarget<"u"&&typeof Event<"u"&&typeof MessageEvent<"u"&&typeof Error<"u"}initialize(t,r,n){this._protocol=t,this._abortController=new AbortController;let i,o;t==="json"?(i={Accept:"application/json","Content-Type":"application/json"},o=n):(i={Accept:"application/octet-stream","Content-Type":"application/octet-stream"},o=n);const s={method:"POST",headers:i,body:o,mode:"cors",credentials:"same-origin",signal:this._abortController.signal},a=this._fetchEventTarget(this,this.endpoint,s);a.addEventListener("open",()=>{r.onOpen()}),a.addEventListener("error",l=>{this._abortController.abort(),r.onError(l)}),a.addEventListener("close",()=>{this._abortController.abort(),r.onClose({code:4,reason:"connection closed"})}),a.addEventListener("message",l=>{r.onMessage(l.data)})}close(){this._abortController.abort()}send(t,r,n){let i,o;const s={session:r,node:n,data:t};this._protocol==="json"?(i={"Content-Type":"application/json"},o=JSON.stringify(s)):(i={"Content-Type":"application/octet-stream"},o=this.options.encoder.encodeEmulationRequest(s));const a=this.options.fetch,l={method:"POST",headers:i,body:o,mode:"cors",credentials:"same-origin"};a(this.options.emulationEndpoint,l)}}class _6e{constructor(t,r){this.endpoint=t,this.options=r,this._protocol="json",this._transport=null,this._onClose=null}name(){return"sse"}subName(){return"sse"}emulation(){return!0}supported(){return this.options.eventsource!==null&&this.options.fetch!==null}initialize(t,r,n){let i;globalThis&&globalThis.document&&globalThis.document.baseURI?i=new URL(this.endpoint,globalThis.document.baseURI):i=new URL(this.endpoint),i.searchParams.append("cf_connect",n);const o={},s=new this.options.eventsource(i.toString(),o);this._transport=s;const a=this;s.onopen=function(){r.onOpen()},s.onerror=function(l){s.close(),r.onError(l),r.onClose({code:4,reason:"connection closed"})},s.onmessage=function(l){r.onMessage(l.data)},a._onClose=function(){r.onClose({code:4,reason:"connection closed"})}}close(){this._transport.close(),this._onClose!==null&&this._onClose()}send(t,r,n){const i={session:r,node:n,data:t},o={"Content-Type":"application/json"},s=JSON.stringify(i),a=this.options.fetch,l={method:"POST",headers:o,body:s,mode:"cors",credentials:"same-origin"};a(this.options.emulationEndpoint,l)}}class O6e{constructor(t,r){this.endpoint=t,this.options=r,this._transport=null,this._stream=null,this._writer=null,this._utf8decoder=new TextDecoder,this._protocol="json"}name(){return"webtransport"}subName(){return"webtransport"}emulation(){return!1}supported(){return this.options.webtransport!==void 0&&this.options.webtransport!==null}initialize(t,r){return rs(this,void 0,void 0,function*(){let n;globalThis&&globalThis.document&&globalThis.document.baseURI?n=new URL(this.endpoint,globalThis.document.baseURI):n=new URL(this.endpoint),t==="protobuf"&&n.searchParams.append("cf_protocol","protobuf"),this._protocol=t;const i=new EventTarget;this._transport=new this.options.webtransport(n.toString()),this._transport.closed.then(()=>{r.onClose({code:4,reason:"connection closed"})}).catch(()=>{r.onClose({code:4,reason:"connection closed"})});try{yield this._transport.ready}catch{this.close();return}let o;try{o=yield this._transport.createBidirectionalStream()}catch{this.close();return}this._stream=o,this._writer=this._stream.writable.getWriter(),i.addEventListener("close",()=>{r.onClose({code:4,reason:"connection closed"})}),i.addEventListener("message",s=>{r.onMessage(s.data)}),this._startReading(i),r.onOpen()})}_startReading(t){return rs(this,void 0,void 0,function*(){const r=this._stream.readable.getReader();let n="",i=0,o=new Uint8Array;try{for(;;){const{done:s,value:a}=yield r.read();if(a.length>0)if(this._protocol==="json")for(n+=this._utf8decoder.decode(a);ithis.a.length)throw new RangeError("out of bounds");return t}getChar(){return String.fromCharCode(this.getByte())}getInt(){let t=0,r;for(;this.haveBytes()&&(r=k6e[127&this.getByte()])>=0;)t=(t<<6)+r;return this.pos--,t>>>0}}class B6e{constructor(){this.a=[]}toByteArray(t){return Array.isArray(t)?this.a:new Uint8Array(this.a)}putArray(t,r,n){for(let i=r;i=16;)t=t+e[o+0]|0,r=r+e[o+1]|0,n=n+e[o+2]|0,i=i+e[o+3]|0,t=t+e[o+4]|0,r=r+e[o+5]|0,n=n+e[o+6]|0,i=i+e[o+7]|0,t=t+e[o+8]|0,r=r+e[o+9]|0,n=n+e[o+10]|0,i=i+e[o+11]|0,t=t+e[o+12]|0,r=r+e[o+13]|0,n=n+e[o+14]|0,i=i+e[o+15]|0,o+=16,s-=16;for(;s>=4;)t=t+e[o+0]|0,r=r+e[o+1]|0,n=n+e[o+2]|0,i=i+e[o+3]|0,o+=4,s-=4;switch(i=((i+(n<<8)|0)+(r<<16)|0)+(t<<24)|0,s){case 3:i=i+(e[o+2]<<8)|0;case 2:i=i+(e[o+1]<<16)|0;case 1:i=i+(e[o+0]<<24)|0}return i>>>0}function G6e(e,t){let r=0;const n=new N6e(t),i=e.length,o=t.length,s=n.getInt();if(n.getChar()!==` `)throw new Error("size integer not terminated by '\\n'");const a=new B6e;for(;n.haveBytes();){const l=n.getInt();let c;switch(n.getChar()){case"@":if(c=n.getInt(),n.haveBytes()&&n.getChar()!==",")throw new Error("copy command not terminated by ','");if(r+=l,r>s)throw new Error("copy exceeds output file size");if(c+l>i)throw new Error("copy extends past end of input");a.putArray(e,c,c+l);break;case":":if(r+=l,r>s)throw new Error("insert command gives an output larger than predicted");if(l>o)throw new Error("insert count exceeds size of delta");a.putArray(n.a,n.pos,n.pos+l),n.pos+=l;break;case";":{const u=a.toByteArray(e);if(l!==$6e(u))throw new Error("bad checksum");if(r!==s)throw new Error("generated size does not match predicted size");return u}default:throw new Error("unknown delta operator")}}throw new Error("unterminated delta")}class PY{name(){return"json"}encodeCommands(t){return t.map(r=>JSON.stringify(r)).join(` `)}decodeReplies(t){return t.trim().split(` `).map(r=>JSON.parse(r))}applyDeltaIfNeeded(t,r){let n,i;if(t.delta){const o=G6e(r,new TextEncoder().encode(t.data));n=JSON.parse(new TextDecoder().decode(o)),i=o}else n=JSON.parse(t.data),i=new TextEncoder().encode(t.data);return{newData:n,newPrevValue:i}}}const V6e={headers:{},token:"",getToken:null,data:null,getData:null,debug:!1,name:"js",version:"",fetch:null,readableStream:null,websocket:null,eventsource:null,sockjs:null,sockjsOptions:{},emulationEndpoint:"/emulation",minReconnectDelay:500,maxReconnectDelay:2e4,timeout:5e3,maxServerPingDelay:1e4,networkEventTarget:null};class sd extends Error{constructor(t){super(t),this.name=this.constructor.name}}class s5 extends zde{constructor(t,r){super(),this._reconnectTimeout=null,this._refreshTimeout=null,this._serverPingTimeout=null,this.state=Ni.Disconnected,this._transportIsOpen=!1,this._endpoint=t,this._emulation=!1,this._transports=[],this._currentTransportIndex=0,this._triedAllTransports=!1,this._transportWasOpen=!1,this._transport=null,this._transportId=0,this._deviceWentOffline=!1,this._transportClosed=!0,this._codec=new PY,this._reconnecting=!1,this._reconnectTimeout=null,this._reconnectAttempts=0,this._client=null,this._session="",this._node="",this._subs={},this._serverSubs={},this._commandId=0,this._commands=[],this._batching=!1,this._refreshRequired=!1,this._refreshTimeout=null,this._callbacks={},this._token="",this._data=null,this._dispatchPromise=Promise.resolve(),this._serverPing=0,this._serverPingTimeout=null,this._sendPong=!1,this._promises={},this._promiseId=0,this._debugEnabled=!1,this._networkEventsSet=!1,this._config=Object.assign(Object.assign({},V6e),r),this._configure(),this._debugEnabled?(this.on("state",n=>{this._debug("client state",n.oldState,"->",n.newState)}),this.on("error",n=>{this._debug("client error",n)})):this.on("error",function(){Function.prototype()})}newSubscription(t,r){if(this.getSubscription(t)!==null)throw new Error("Subscription to the channel "+t+" already exists");const n=new A6e(this,t,r);return this._subs[t]=n,n}getSubscription(t){return this._getSub(t)}removeSubscription(t){t&&(t.state!==vs.Unsubscribed&&t.unsubscribe(),this._removeSubscription(t))}subscriptions(){return this._subs}ready(t){return rs(this,void 0,void 0,function*(){switch(this.state){case Ni.Disconnected:throw{code:Xn.clientDisconnected,message:"client disconnected"};case Ni.Connected:return;default:return new Promise((r,n)=>{const i={resolve:r,reject:n};t&&(i.timeout=setTimeout(()=>{n({code:Xn.timeout,message:"timeout"})},t)),this._promises[this._nextPromiseId()]=i})}})}connect(){if(this._isConnected()){this._debug("connect called when already connected");return}if(this._isConnecting()){this._debug("connect called when already connecting");return}this._debug("connect called"),this._reconnectAttempts=0,this._startConnecting()}disconnect(){this._disconnect(Mw.disconnectCalled,"disconnect called",!1)}setToken(t){this._token=t}setData(t){this._data=t}setHeaders(t){this._config.headers=t}send(t){return rs(this,void 0,void 0,function*(){const r={send:{data:t}};if(yield this._methodCall(),!this._transportSendCommands([r]))throw this._createErrorObject(Xn.transportWriteError,"transport write error")})}rpc(t,r){return rs(this,void 0,void 0,function*(){const n={rpc:{method:t,data:r}};return yield this._methodCall(),{data:(yield this._callPromise(n,o=>o.rpc)).data}})}publish(t,r){return rs(this,void 0,void 0,function*(){const n={publish:{channel:t,data:r}};return yield this._methodCall(),yield this._callPromise(n,()=>({})),{}})}history(t,r){return rs(this,void 0,void 0,function*(){const n={history:this._getHistoryRequest(t,r)};yield this._methodCall();const i=yield this._callPromise(n,s=>s.history),o=[];if(i.publications)for(let s=0;so.presence)).presence;for(const o in i)if(Object.prototype.hasOwnProperty.call(i,o)){const s=i[o],a=s.conn_info,l=s.chan_info;a&&(s.connInfo=a),l&&(s.chanInfo=l)}return{clients:i}})}presenceStats(t){return rs(this,void 0,void 0,function*(){const r={presence_stats:{channel:t}};yield this._methodCall();const n=yield this._callPromise(r,i=>i.presence_stats);return{numUsers:n.num_users,numClients:n.num_clients}})}startBatching(){this._batching=!0}stopBatching(){const t=this;Promise.resolve().then(function(){Promise.resolve().then(function(){t._batching=!1,t._flush()})})}_debug(...t){this._debugEnabled&&M6e("debug",t)}_codecName(){return this._codec.name()}_formatOverride(){}_configure(){if(!("Promise"in globalThis))throw new Error("Promise polyfill required");if(!this._endpoint)throw new Error("endpoint configuration required");if(this._config.token!==null&&(this._token=this._config.token),this._config.data!==null&&(this._data=this._config.data),this._codec=new PY,this._formatOverride(),(this._config.debug===!0||typeof localStorage<"u"&&typeof localStorage.getItem=="function"&&localStorage.getItem("centrifuge.debug"))&&(this._debugEnabled=!0),this._debug("config",this._config),typeof this._endpoint!="string")if(Array.isArray(this._endpoint)){this._transports=this._endpoint,this._emulation=!0;for(const t in this._transports)if(this._transports.hasOwnProperty(t)){const r=this._transports[t];if(!r.endpoint||!r.transport)throw new Error("malformed transport configuration");const n=r.transport;if(["websocket","http_stream","sse","sockjs","webtransport"].indexOf(n)<0)throw new Error("unsupported transport name: "+n)}}else throw new Error("unsupported url configuration type: only string or array of objects are supported")}_setState(t){if(this.state!==t){this._reconnecting=!1;const r=this.state;return this.state=t,this.emit("state",{newState:t,oldState:r}),!0}return!1}_isDisconnected(){return this.state===Ni.Disconnected}_isConnecting(){return this.state===Ni.Connecting}_isConnected(){return this.state===Ni.Connected}_nextCommandId(){return++this._commandId}_setNetworkEvents(){if(this._networkEventsSet)return;let t=null;this._config.networkEventTarget!==null?t=this._config.networkEventTarget:typeof globalThis.addEventListener<"u"&&(t=globalThis),t&&(t.addEventListener("offline",()=>{this._debug("offline event triggered"),(this.state===Ni.Connected||this.state===Ni.Connecting)&&(this._disconnect(Uh.transportClosed,"transport closed",!0),this._deviceWentOffline=!0)}),t.addEventListener("online",()=>{this._debug("online event triggered"),this.state===Ni.Connecting&&(this._deviceWentOffline&&!this._transportClosed&&(this._deviceWentOffline=!1,this._transportClosed=!0),this._clearReconnectTimeout(),this._startReconnecting())}),this._networkEventsSet=!0)}_getReconnectDelay(){const t=TM(this._reconnectAttempts,this._config.minReconnectDelay,this._config.maxReconnectDelay);return this._reconnectAttempts+=1,t}_clearOutgoingRequests(){for(const t in this._callbacks)if(this._callbacks.hasOwnProperty(t)){const r=this._callbacks[t];clearTimeout(r.timeout);const n=r.errback;if(!n)continue;n({error:this._createErrorObject(Xn.connectionClosed,"connection closed")})}this._callbacks={}}_clearConnectedState(){this._client=null,this._clearServerPingTimeout(),this._clearRefreshTimeout();for(const t in this._subs){if(!this._subs.hasOwnProperty(t))continue;const r=this._subs[t];r.state===vs.Subscribed&&r._setSubscribing(wM.transportClosed,"transport closed")}for(const t in this._serverSubs)this._serverSubs.hasOwnProperty(t)&&this.emit("subscribing",{channel:t})}_handleWriteError(t){for(const r of t){const n=r.id;if(!(n in this._callbacks))continue;const i=this._callbacks[n];clearTimeout(this._callbacks[n].timeout),delete this._callbacks[n];const o=i.errback;o({error:this._createErrorObject(Xn.transportWriteError,"transport write error")})}}_transportSendCommands(t){if(!t.length)return!0;if(!this._transport)return!1;try{this._transport.send(this._codec.encodeCommands(t),this._session,this._node)}catch(r){return this._debug("error writing commands",r),this._handleWriteError(t),!1}return!0}_initializeTransport(){let t;this._config.websocket!==null?t=this._config.websocket:typeof globalThis.WebSocket!="function"&&typeof globalThis.WebSocket!="object"||(t=globalThis.WebSocket);let r=null;this._config.sockjs!==null?r=this._config.sockjs:typeof globalThis.SockJS<"u"&&(r=globalThis.SockJS);let n=null;this._config.eventsource!==null?n=this._config.eventsource:typeof globalThis.EventSource<"u"&&(n=globalThis.EventSource);let i=null;this._config.fetch!==null?i=this._config.fetch:typeof globalThis.fetch<"u"&&(i=globalThis.fetch);let o=null;if(this._config.readableStream!==null?o=this._config.readableStream:typeof globalThis.ReadableStream<"u"&&(o=globalThis.ReadableStream),this._emulation){this._currentTransportIndex>=this._transports.length&&(this._triedAllTransports=!0,this._currentTransportIndex=0);let p=0;for(;;){if(p>=this._transports.length)throw new Error("no supported transport found");const f=this._transports[this._currentTransportIndex],g=f.transport,m=f.endpoint;if(g==="websocket"){if(this._debug("trying websocket transport"),this._transport=new RY(m,{websocket:t}),!this._transport.supported()){this._debug("websocket transport not available"),this._currentTransportIndex++,p++;continue}}else if(g==="webtransport"){if(this._debug("trying webtransport transport"),this._transport=new O6e(m,{webtransport:globalThis.WebTransport,decoder:this._codec,encoder:this._codec}),!this._transport.supported()){this._debug("webtransport transport not available"),this._currentTransportIndex++,p++;continue}}else if(g==="http_stream"){if(this._debug("trying http_stream transport"),this._transport=new L6e(m,{fetch:i,readableStream:o,emulationEndpoint:this._config.emulationEndpoint,decoder:this._codec,encoder:this._codec}),!this._transport.supported()){this._debug("http_stream transport not available"),this._currentTransportIndex++,p++;continue}}else if(g==="sse"){if(this._debug("trying sse transport"),this._transport=new _6e(m,{eventsource:n,fetch:i,emulationEndpoint:this._config.emulationEndpoint}),!this._transport.supported()){this._debug("sse transport not available"),this._currentTransportIndex++,p++;continue}}else if(g==="sockjs"){if(this._debug("trying sockjs"),this._transport=new F6e(m,{sockjs:r,sockjsOptions:this._config.sockjsOptions}),!this._transport.supported()){this._debug("sockjs transport not available"),this._currentTransportIndex++,p++;continue}}else throw new Error("unknown transport "+g);break}}else{if(P6e(this._endpoint,"http"))throw new Error("Provide explicit transport endpoints configuration in case of using HTTP (i.e. using array of TransportEndpoint instead of a single string), or use ws(s):// scheme in an endpoint if you aimed using WebSocket transport");if(this._debug("client will use websocket"),this._transport=new RY(this._endpoint,{websocket:t}),!this._transport.supported())throw new Error("WebSocket constructor not found, make sure it is available globally or passed as a dependency in Centrifuge options")}const s=this,a=this._transport,l=this._nextTransportId();s._debug("id of transport",l);let c=!1;const u=[];if(this._transport.emulation()){const p=s._sendConnect(!0);u.push(p)}this._setNetworkEvents();const d=this._codec.encodeCommands(u);this._transportClosed=!1;let h;h=setTimeout(function(){a.close()},this._config.timeout),this._transport.initialize(this._codecName(),{onOpen:function(){if(h&&(clearTimeout(h),h=null),s._transportId!=l){s._debug("open callback from non-actual transport"),a.close();return}c=!0,s._debug(a.subName(),"transport open"),!a.emulation()&&(s._transportIsOpen=!0,s._transportWasOpen=!0,s.startBatching(),s._sendConnect(!1),s._sendSubscribeCommands(),s.stopBatching(),s.emit("__centrifuge_debug:connect_frame_sent",{}))},onError:function(p){if(s._transportId!=l){s._debug("error callback from non-actual transport");return}s._debug("transport level error",p)},onClose:function(p){if(h&&(clearTimeout(h),h=null),s._transportId!=l){s._debug("close callback from non-actual transport");return}s._debug(a.subName(),"transport closed"),s._transportClosed=!0,s._transportIsOpen=!1;let f="connection closed",g=!0,m=0;if(p&&"code"in p&&p.code&&(m=p.code),p&&p.reason)try{const v=JSON.parse(p.reason);f=v.reason,g=v.reconnect}catch{f=p.reason,(m>=3500&&m<4e3||m>=4500&&m<5e3)&&(g=!1)}m<3e3?(m===1009?(m=Mw.messageSizeLimit,f="message size limit exceeded",g=!1):(m=Uh.transportClosed,f="transport closed"),s._emulation&&!s._transportWasOpen&&(s._currentTransportIndex++,s._currentTransportIndex>=s._transports.length&&(s._triedAllTransports=!0,s._currentTransportIndex=0))):s._transportWasOpen=!0,s._isConnecting()&&!c&&s.emit("error",{type:"transport",error:{code:Xn.transportClosed,message:"transport closed"},transport:a.name()}),s._reconnecting=!1,s._disconnect(m,f,g)},onMessage:function(p){s._dataReceived(p)}},d),s.emit("__centrifuge_debug:transport_initialized",{})}_sendConnect(t){const r=this._constructConnectCommand(),n=this;return this._call(r,t).then(i=>{const o=i.reply.connect;n._connectResponse(o),i.next&&i.next()},i=>{n._connectError(i.error),i.next&&i.next()}),r}_startReconnecting(){if(this._debug("start reconnecting"),!this._isConnecting()){this._debug("stop reconnecting: client not in connecting state");return}if(this._reconnecting){this._debug("reconnect already in progress, return from reconnect routine");return}if(this._transportClosed===!1){this._debug("waiting for transport close");return}this._reconnecting=!0;const t=this._token==="";if(!(this._refreshRequired||t&&this._config.getToken!==null)){this._config.getData?this._config.getData().then(i=>{this._isConnecting()&&(this._data=i,this._initializeTransport())}).catch(i=>this._handleGetDataError(i)):this._initializeTransport();return}const n=this;this._getToken().then(function(i){if(n._isConnecting()){if(i==null||i==null){n._failUnauthorized();return}n._token=i,n._debug("connection token refreshed"),n._config.getData?n._config.getData().then(function(o){n._isConnecting()&&(n._data=o,n._initializeTransport())}).catch(o=>n._handleGetDataError(o)):n._initializeTransport()}}).catch(function(i){if(!n._isConnecting())return;if(i instanceof sd){n._failUnauthorized();return}n.emit("error",{type:"connectToken",error:{code:Xn.clientConnectToken,message:i!==void 0?i.toString():""}});const o=n._getReconnectDelay();n._debug("error on getting connection token, reconnect after "+o+" milliseconds",i),n._reconnecting=!1,n._reconnectTimeout=setTimeout(()=>{n._startReconnecting()},o)})}_handleGetDataError(t){if(t instanceof sd){this._failUnauthorized();return}this.emit("error",{type:"connectData",error:{code:Xn.badConfiguration,message:(t==null?void 0:t.toString())||""}});const r=this._getReconnectDelay();this._debug("error on getting connect data, reconnect after "+r+" milliseconds",t),this._reconnecting=!1,this._reconnectTimeout=setTimeout(()=>{this._startReconnecting()},r)}_connectError(t){this.state===Ni.Connecting&&(t.code===109&&(this._refreshRequired=!0),t.code<100||t.temporary===!0||t.code===109?(this.emit("error",{type:"connect",error:t}),this._debug("closing transport due to connect error"),this._disconnect(t.code,t.message,!0)):this._disconnect(t.code,t.message,!1))}_scheduleReconnect(){if(!this._isConnecting())return;let t=!1;this._emulation&&!this._transportWasOpen&&!this._triedAllTransports&&(t=!0);let r=this._getReconnectDelay();t&&(r=0),this._debug("reconnect after "+r+" milliseconds"),this._clearReconnectTimeout(),this._reconnectTimeout=setTimeout(()=>{this._startReconnecting()},r)}_constructConnectCommand(){const t={};this._token&&(t.token=this._token),this._data&&(t.data=this._data),this._config.name&&(t.name=this._config.name),this._config.version&&(t.version=this._config.version),Object.keys(this._config.headers).length>0&&(t.headers=this._config.headers);const r={};let n=!1;for(const i in this._serverSubs)if(this._serverSubs.hasOwnProperty(i)&&this._serverSubs[i].recoverable){n=!0;const o={recover:!0};this._serverSubs[i].offset&&(o.offset=this._serverSubs[i].offset),this._serverSubs[i].epoch&&(o.epoch=this._serverSubs[i].epoch),r[i]=o}return n&&(t.subs=r),{connect:t}}_getHistoryRequest(t,r){const n={channel:t};return r!==void 0&&(r.since&&(n.since={offset:r.since.offset},r.since.epoch&&(n.since.epoch=r.since.epoch)),r.limit!==void 0&&(n.limit=r.limit),r.reverse===!0&&(n.reverse=!0)),n}_methodCall(){return this._isConnected()?Promise.resolve():new Promise((t,r)=>{const n=setTimeout(function(){r({code:Xn.timeout,message:"timeout"})},this._config.timeout);this._promises[this._nextPromiseId()]={timeout:n,resolve:t,reject:r}})}_callPromise(t,r){return new Promise((n,i)=>{this._call(t,!1).then(o=>{var s;const a=r(o.reply);n(a),(s=o.next)===null||s===void 0||s.call(o)},o=>{var s;i(o.error),(s=o.next)===null||s===void 0||s.call(o)})})}_dataReceived(t){this._serverPing>0&&this._waitServerPing();const r=this._codec.decodeReplies(t);this._dispatchPromise=this._dispatchPromise.then(()=>{let n;this._dispatchPromise=new Promise(i=>{n=i}),this._dispatchSynchronized(r,n)})}_dispatchSynchronized(t,r){let n=Promise.resolve();for(const i in t)t.hasOwnProperty(i)&&(n=n.then(()=>this._dispatchReply(t[i])));n=n.then(()=>{r()})}_dispatchReply(t){let r;const n=new Promise(o=>{r=o});if(t==null)return this._debug("dispatch: got undefined or null reply"),r(),n;const i=t.id;return i&&i>0?this._handleReply(t,r):t.push?this._handlePush(t.push,r):this._handleServerPing(r),n}_call(t,r){return new Promise((n,i)=>{t.id=this._nextCommandId(),this._registerCall(t.id,n,i),r||this._addCommand(t)})}_startConnecting(){this._debug("start connecting"),this._setState(Ni.Connecting)&&this.emit("connecting",{code:Uh.connectCalled,reason:"connect called"}),this._client=null,this._startReconnecting()}_disconnect(t,r,n){if(this._isDisconnected())return;this._transportIsOpen=!1;const i=this.state;this._reconnecting=!1;const o={code:t,reason:r};let s=!1;if(n?s=this._setState(Ni.Connecting):(s=this._setState(Ni.Disconnected),this._rejectPromises({code:Xn.clientDisconnected,message:"disconnected"})),this._clearOutgoingRequests(),i===Ni.Connecting&&this._clearReconnectTimeout(),i===Ni.Connected&&this._clearConnectedState(),s&&(this._isConnecting()?this.emit("connecting",o):this.emit("disconnected",o)),this._transport){this._debug("closing existing transport");const a=this._transport;this._transport=null,a.close(),this._transportClosed=!0,this._nextTransportId()}else this._debug("no transport to close");this._scheduleReconnect()}_failUnauthorized(){this._disconnect(Mw.unauthorized,"unauthorized",!1)}_getToken(){return this._debug("get connection token"),this._config.getToken?this._config.getToken({}):(this.emit("error",{type:"configuration",error:{code:Xn.badConfiguration,message:"token expired but no getToken function set in the configuration"}}),Promise.reject(new sd("")))}_refresh(){const t=this._client,r=this;this._getToken().then(function(n){if(t!==r._client)return;if(!n){r._failUnauthorized();return}if(r._token=n,r._debug("connection token refreshed"),!r._isConnected())return;const i={refresh:{token:r._token}};r._call(i,!1).then(o=>{const s=o.reply.refresh;r._refreshResponse(s),o.next&&o.next()},o=>{r._refreshError(o.error),o.next&&o.next()})}).catch(function(n){if(r._isConnected()){if(n instanceof sd){r._failUnauthorized();return}r.emit("error",{type:"refreshToken",error:{code:Xn.clientRefreshToken,message:n!==void 0?n.toString():""}}),r._refreshTimeout=setTimeout(()=>r._refresh(),r._getRefreshRetryDelay())}})}_refreshError(t){t.code<100||t.temporary===!0?(this.emit("error",{type:"refresh",error:t}),this._refreshTimeout=setTimeout(()=>this._refresh(),this._getRefreshRetryDelay())):this._disconnect(t.code,t.message,!1)}_getRefreshRetryDelay(){return TM(0,5e3,1e4)}_refreshResponse(t){this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null),t.expires&&(this._client=t.client,this._refreshTimeout=setTimeout(()=>this._refresh(),EM(t.ttl)))}_removeSubscription(t){t!==null&&delete this._subs[t.channel]}_unsubscribe(t){if(!this._transportIsOpen)return Promise.resolve();const n={unsubscribe:{channel:t.channel}},i=this;return new Promise((s,a)=>{this._call(n,!1).then(l=>{s(),l.next&&l.next()},l=>{s(),l.next&&l.next(),i._disconnect(Uh.unsubscribeError,"unsubscribe error",!0)})})}_getSub(t,r){if(r&&r>0){for(const i in this._subs)if(this._subs.hasOwnProperty(i)){const o=this._subs[i];if(o._id===r)return o}return null}const n=this._subs[t];return n||null}_isServerSub(t){return this._serverSubs[t]!==void 0}_sendSubscribeCommands(){const t=[];for(const r in this._subs){if(!this._subs.hasOwnProperty(r))continue;const n=this._subs[r];if(n._inflight!==!0&&n.state===vs.Subscribing){const i=n._subscribe();i&&t.push(i)}}return t}_connectResponse(t){if(this._transportIsOpen=!0,this._transportWasOpen=!0,this._reconnectAttempts=0,this._refreshRequired=!1,this._isConnected())return;this._client=t.client,this._setState(Ni.Connected),this._refreshTimeout&&clearTimeout(this._refreshTimeout),t.expires&&(this._refreshTimeout=setTimeout(()=>this._refresh(),EM(t.ttl))),this._session=t.session,this._node=t.node,this.startBatching(),this._sendSubscribeCommands(),this.stopBatching();const r={client:t.client,transport:this._transport.subName()};t.data&&(r.data=t.data),this.emit("connected",r),this._resolvePromises(),this._processServerSubs(t.subs||{}),t.ping&&t.ping>0?(this._serverPing=t.ping*1e3,this._sendPong=t.pong===!0,this._waitServerPing()):this._serverPing=0}_processServerSubs(t){for(const r in t){if(!t.hasOwnProperty(r))continue;const n=t[r];this._serverSubs[r]={offset:n.offset,epoch:n.epoch,recoverable:n.recoverable||!1};const i=this._getSubscribeContext(r,n);this.emit("subscribed",i)}for(const r in t){if(!t.hasOwnProperty(r))continue;const n=t[r];if(n.recovered){const i=n.publications;if(i&&i.length>0)for(const o in i)i.hasOwnProperty(o)&&this._handlePublication(r,i[o])}}for(const r in this._serverSubs)this._serverSubs.hasOwnProperty(r)&&(t[r]||(this.emit("unsubscribed",{channel:r}),delete this._serverSubs[r]))}_clearRefreshTimeout(){this._refreshTimeout!==null&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null)}_clearReconnectTimeout(){this._reconnectTimeout!==null&&(clearTimeout(this._reconnectTimeout),this._reconnectTimeout=null)}_clearServerPingTimeout(){this._serverPingTimeout!==null&&(clearTimeout(this._serverPingTimeout),this._serverPingTimeout=null)}_waitServerPing(){this._config.maxServerPingDelay!==0&&this._isConnected()&&(this._clearServerPingTimeout(),this._serverPingTimeout=setTimeout(()=>{this._isConnected()&&this._disconnect(Uh.noPing,"no ping",!0)},this._serverPing+this._config.maxServerPingDelay))}_getSubscribeContext(t,r){const n={channel:t,positioned:!1,recoverable:!1,wasRecovering:!1,recovered:!1,hasRecoveredPublications:!1};r.recovered&&(n.recovered=!0),r.positioned&&(n.positioned=!0),r.recoverable&&(n.recoverable=!0),r.was_recovering&&(n.wasRecovering=!0);let i="";"epoch"in r&&(i=r.epoch);let o=0;return"offset"in r&&(o=r.offset),(n.positioned||n.recoverable)&&(n.streamPosition={offset:o,epoch:i}),Array.isArray(r.publications)&&r.publications.length>0&&(n.hasRecoveredPublications=!0),r.data&&(n.data=r.data),n}_handleReply(t,r){const n=t.id;if(!(n in this._callbacks)){r();return}const i=this._callbacks[n];if(clearTimeout(this._callbacks[n].timeout),delete this._callbacks[n],D6e(t)){const o=i.errback;if(!o){r();return}const s={code:t.error.code,message:t.error.message||"",temporary:t.error.temporary||!1};o({error:s,next:r})}else{const o=i.callback;if(!o)return;o({reply:t,next:r})}}_handleJoin(t,r,n){const i=this._getSub(t,n);if(!i&&t){if(this._isServerSub(t)){const o={channel:t,info:this._getJoinLeaveContext(r.info)};this.emit("join",o)}return}i._handleJoin(r)}_handleLeave(t,r,n){const i=this._getSub(t,n);if(!i&&t){if(this._isServerSub(t)){const o={channel:t,info:this._getJoinLeaveContext(r.info)};this.emit("leave",o)}return}i._handleLeave(r)}_handleUnsubscribe(t,r){const n=this._getSub(t,0);if(!n&&t){this._isServerSub(t)&&(delete this._serverSubs[t],this.emit("unsubscribed",{channel:t}));return}r.code<2500?n._setUnsubscribed(r.code,r.reason,!1):n._setSubscribing(r.code,r.reason)}_handleSubscribe(t,r){this._serverSubs[t]={offset:r.offset,epoch:r.epoch,recoverable:r.recoverable||!1},this.emit("subscribed",this._getSubscribeContext(t,r))}_handleDisconnect(t){const r=t.code;let n=!0;(r>=3500&&r<4e3||r>=4500&&r<5e3)&&(n=!1),this._disconnect(r,t.reason,n)}_getPublicationContext(t,r){const n={channel:t,data:r.data};return r.offset&&(n.offset=r.offset),r.info&&(n.info=this._getJoinLeaveContext(r.info)),r.tags&&(n.tags=r.tags),n}_getJoinLeaveContext(t){const r={client:t.client,user:t.user},n=t.conn_info;n&&(r.connInfo=n);const i=t.chan_info;return i&&(r.chanInfo=i),r}_handlePublication(t,r,n){const i=this._getSub(t,n);if(!i&&t){if(this._isServerSub(t)){const o=this._getPublicationContext(t,r);this.emit("publication",o),r.offset!==void 0&&(this._serverSubs[t].offset=r.offset)}return}i._handlePublication(r)}_handleMessage(t){this.emit("message",{data:t.data})}_handleServerPing(t){if(this._sendPong){const r={};this._transportSendCommands([r])}t()}_handlePush(t,r){const n=t.channel,i=t.id;t.pub?this._handlePublication(n,t.pub,i):t.message?this._handleMessage(t.message):t.join?this._handleJoin(n,t.join,i):t.leave?this._handleLeave(n,t.leave,i):t.unsubscribe?this._handleUnsubscribe(n,t.unsubscribe):t.subscribe?this._handleSubscribe(n,t.subscribe):t.disconnect&&this._handleDisconnect(t.disconnect),r()}_flush(){const t=this._commands.slice(0);this._commands=[],this._transportSendCommands(t)}_createErrorObject(t,r,n){const i={code:t,message:r};return n&&(i.temporary=!0),i}_registerCall(t,r,n){this._callbacks[t]={callback:r,errback:n,timeout:null},this._callbacks[t].timeout=setTimeout(()=>{delete this._callbacks[t],Hde(n)&&n({error:this._createErrorObject(Xn.timeout,"timeout")})},this._config.timeout)}_addCommand(t){this._batching?this._commands.push(t):this._transportSendCommands([t])}_nextPromiseId(){return++this._promiseId}_nextTransportId(){return++this._transportId}_resolvePromises(){for(const t in this._promises)this._promises.hasOwnProperty(t)&&(this._promises[t].timeout&&clearTimeout(this._promises[t].timeout),this._promises[t].resolve(),delete this._promises[t])}_rejectPromises(t){for(const r in this._promises)this._promises.hasOwnProperty(r)&&(this._promises[r].timeout&&clearTimeout(this._promises[r].timeout),this._promises[r].reject(t),delete this._promises[r])}}s5.SubscriptionState=vs;s5.State=Ni;s5.UnauthorizedError=sd;/** * React Router v6.30.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const z6e=y.createContext({outlet:null,matches:[],isDataRoute:!1});function ANt(){let{matches:e}=y.useContext(z6e),t=e[e.length-1];return t?t.params:{}}new Promise(()=>{});var Hp=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,r){const n=t?this.allAsyncListeners:this.allSyncListeners;let i=n.get(e);return!i&&r&&(i=new Set,n.set(e,i)),i}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,r=!1){this.getListeners(e,r,!0).add(t)}removeEventListener(e,t,r=!1){const n=this.getListeners(e,r,!1);n&&(n.delete(t),n.size===0&&(r?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const r=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const n=(a,l)=>a.forEach(c=>{if(!l.has(c))return;const u=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>c(e)):()=>c(e);t?this.dispatchAsync(u):u()}),i=this.getListeners(r,t,!1)??new Set,o=new Set(i);o.size>0&&n(o,i),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{const l=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(r,e)):()=>a(r,e);t?this.dispatchAsync(l):l()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}};function H6e(e,t){return t}function a5(e){return(e==null?void 0:e.getLocaleTextFunc())??H6e}function El(e,t,r){r==null||typeof r=="string"&&r==""?l5(e,t):Rl(e,t,r)}function Rl(e,t,r){e.setAttribute(Wde(t),r.toString())}function l5(e,t){e.removeAttribute(Wde(t))}function Wde(e){return`aria-${e}`}function Wn(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function W6e(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function U6e(e){return parseInt(e.getAttribute("aria-posinset"),10)}function j6e(e){return e.getAttribute("aria-label")}function Un(e,t){El(e,"label",t)}function xp(e,t){El(e,"labelledby",t)}function tA(e,t){El(e,"describedby",t)}function Ude(e,t){El(e,"live",t)}function K6e(e,t){El(e,"atomic",t)}function q6e(e,t){El(e,"relevant",t)}function Yx(e,t){El(e,"level",t)}function RM(e,t){El(e,"disabled",t)}function c5(e,t){El(e,"hidden",t)}function jde(e,t){El(e,"activedescendant",t)}function Ps(e,t){Rl(e,"expanded",t)}function Kde(e){l5(e,"expanded")}function rA(e,t){Rl(e,"setsize",t)}function nA(e,t){Rl(e,"posinset",t)}function Y6e(e,t){Rl(e,"multiselectable",t)}function qde(e,t){Rl(e,"rowcount",t)}function u5(e,t){Rl(e,"rowindex",t)}function Yde(e,t){Rl(e,"colcount",t)}function d5(e,t){Rl(e,"colindex",t)}function Xde(e,t){Rl(e,"colspan",t)}function Zde(e,t){Rl(e,"sort",t)}function Jde(e){l5(e,"sort")}function w0(e,t){El(e,"selected",t)}function Qde(e,t){Rl(e,"checked",t===void 0?"mixed":t)}function h5(e,t){El(e,"controls",t.id),xp(t,e.id)}function p5(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var uO,dO,hO,pO,fO,PG,MG,gO;function xm(){return uO===void 0&&(uO=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),uO}function ehe(){if(dO===void 0){const e=window;dO=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return dO}function the(){return hO===void 0&&(hO=/(firefox)/i.test(navigator.userAgent)),hO}function rhe(){return pO===void 0&&(pO=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),pO}function lp(){return fO===void 0&&(fO=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),fO}function IG(e){if(!e)return null;const t=e.tabIndex,r=e.getAttribute("tabIndex");return t===-1&&(r===null||r===""&&!the())?null:t.toString()}function X6e(){if(gO!==void 0)return gO;if(!document.body)return-1;let e=1e6;const t=the()?6e6:1e9,r=document.createElement("div");for(document.body.appendChild(r);;){const n=e*2;if(r.style.height=n+"px",n>t||r.clientHeight!==n)break;e=n}return document.body.removeChild(r),gO=e,e}function Z6e(){return MG==null&&nhe(),MG}function nhe(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let r=t.offsetWidth-t.clientWidth;r===0&&t.clientWidth===0&&(r=null),t.parentNode&&t.parentNode.removeChild(t),r!=null&&(MG=r,PG=r===0)}function ihe(){return PG==null&&nhe(),PG}var cE;function PM(e,t,r){const n=e.parentElement;let i=n&&n.firstChild;for(;i;)t&&i.classList.toggle(t,i===e),r&&i.classList.toggle(r,i!==e),i=i.nextSibling}var J6e="[tabindex], input, select, button, textarea, [href]",ohe="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function f5(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,n=t.call(e,"input, select, button, textarea"),i=t.call(e,ohe),o=us(e);return n&&!i&&o}function Et(e,t,r={}){const{skipAriaHidden:n}=r;e.classList.toggle("ag-hidden",!t),n||c5(e,!t)}function she(e,t,r={}){const{skipAriaHidden:n}=r;e.classList.toggle("ag-invisible",!t),n||c5(e,!t)}function ol(e,t){const r="disabled",n=t?i=>i.setAttribute(r,""):i=>i.removeAttribute(r);n(e),hhe(e.querySelectorAll("input"),i=>n(i))}function Lg(e,t,r){let n=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof r=="number"){if(++n>r)break}else if(e===r)break}return!1}function Tm(e){const{height:t,width:r,borderTopWidth:n,borderRightWidth:i,borderBottomWidth:o,borderLeftWidth:s,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:u,marginTop:d,marginRight:h,marginBottom:p,marginLeft:f,boxSizing:g}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(r||"0"),borderTopWidth:parseFloat(n||"0"),borderRightWidth:parseFloat(i||"0"),borderBottomWidth:parseFloat(o||"0"),borderLeftWidth:parseFloat(s||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(c||"0"),paddingLeft:parseFloat(u||"0"),marginTop:parseFloat(d||"0"),marginRight:parseFloat(h||"0"),marginBottom:parseFloat(p||"0"),marginLeft:parseFloat(f||"0"),boxSizing:g}}function iA(e){const t=Tm(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function Gy(e){const t=Tm(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function oA(e){const{height:t,marginBottom:r,marginTop:n}=Tm(e);return Math.floor(t+r+n)}function Qg(e){const{width:t,marginLeft:r,marginRight:n}=Tm(e);return Math.floor(t+r+n)}function ahe(e){const t=e.getBoundingClientRect(),{borderTopWidth:r,borderLeftWidth:n,borderRightWidth:i,borderBottomWidth:o}=Tm(e);return{top:t.top+(r||0),left:t.left+(n||0),right:t.right+(i||0),bottom:t.bottom+(o||0)}}function MM(){if(typeof cE=="boolean")return cE;const e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML=`
`,document.body.appendChild(e),e.scrollLeft=1,cE=Math.floor(e.scrollLeft)===0,document.body.removeChild(e),cE}function IM(e,t){let r=e.scrollLeft;return t&&(r=Math.abs(r),ehe()&&!MM()&&(r=e.scrollWidth-e.getBoundingClientRect().width-r)),r}function DM(e,t,r){r&&(MM()?t*=-1:(xm()||ehe())&&(t=e.scrollWidth-e.getBoundingClientRect().width-t)),e.scrollLeft=t}function Qr(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function oi(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function lhe(e){return!!e.offsetParent}function us(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!lhe(e)||window.getComputedStyle(e).visibility!=="visible")}function ws(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function che(e,t,r){r&&r.nextSibling===t||(r?r.nextSibling?e.insertBefore(t,r.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t))}function uhe(e,t){for(let r=0;r`-${t.toLocaleLowerCase()}`)}function dhe(e,t){if(t)for(const[r,n]of Object.entries(t)){if(!r||!r.length||n==null)continue;const i=eUe(r),o=n.toString(),s=o.replace(/\s*!important/g,""),a=s.length!=o.length?"important":void 0;e.style.setProperty(i,s,a)}}function tUe(e){return e.clientWidtht.push(r)),t}function iUe(e,t){if(e)for(let r=0;r{const n=r.getGui();n!=null&&(typeof n=="object"?t.appendChild(n):t.innerHTML=n)})}function ka(e,t,r){const i=whe(e).ResizeObserver,o=i?new i(r):null;return o==null||o.observe(t),()=>o==null?void 0:o.disconnect()}function Mi(e){return e==null||e===""?null:e}function qe(e){return e!=null&&e!==""}function Hr(e){return!qe(e)}function ta(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Vy(e,t){const r=e?JSON.stringify(e):null,n=t?JSON.stringify(t):null;return r===n}function lP(e,t,r=!1){const n=e==null,i=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),n&&i)return 0;if(n)return-1;if(i)return 1;function o(s,a){return s>a?1:sconsole.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function vy(e,...t){m5(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var mO=[],vO=!1;function IY(e){mO.push(e),!vO&&(vO=!0,window.setTimeout(()=>{const t=mO.slice();mO.length=0,vO=!1,t.forEach(r=>r())},0))}function to(e,t,r){let n;return function(...i){const o=this;window.clearTimeout(n),n=window.setTimeout(function(){e.isAlive()&&t.apply(o,i)},r)}}function DY(e,t){let r=0;return function(...n){const i=this,o=new Date().getTime();o-r{const l=new Date().getTime()-i>r;(e()||l)&&(t(),s=!0,o!=null&&(window.clearInterval(o),o=null))};a(),s||(o=window.setInterval(a,10))}var Nt="33.0.4",AY=2e3,FY=100,mhe="_version_",cP=null,zy=`${fhe}/javascript-data-grid`;function oUe(e){cP=e}function sUe(e){zy=e}function vhe(e,t,r){return(cP==null?void 0:cP.getConsoleMessage(e,t))??[uUe(e,t,r)]}function v5(e,t,r,n){e(`error #${t}`,...vhe(t,r,n))}function aUe(e){if(!e)return String(e);const t={};for(const r of Object.keys(e))typeof e[r]!="object"&&typeof e[r]!="function"&&(t[r]=e[r]);return JSON.stringify(t)}function lUe(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=aUe(e)),t}function FM(e){return e===void 0?"undefined":e===null?"null":e}function DG(e,t){return`${e}?${t.toString()}`}function cUe(e,t,r){const n=Array.from(t.entries()).sort((o,s)=>s[1].length-o[1].length);let i=DG(e,t);for(const[o,s]of n){if(o===mhe)continue;const a=i.length-r;if(a<=0)break;const l="...",c=a+l.length,u=s.length-c>FY?s.slice(0,s.length-c)+l:s.slice(0,FY)+l;t.set(o,u),i=DG(e,t)}return i}function yhe(e,t){const r=new URLSearchParams;r.append(mhe,Nt),t&&Object.entries(t).forEach(([o,s])=>{r.append(o,lUe(s))});const n=`${zy}/errors/${e}`,i=DG(n,r);return i.length<=AY?i:cUe(n,r,AY)}var uUe=(e,t,r)=>{const n=yhe(e,t);return`${r?r+` `:""}Visit ${n}${r?"":` Alternatively register the ValidationModule to see the full message in the console.`}`};function we(...e){v5(nu,e[0],e[1])}function yr(...e){v5(vy,e[0],e[1])}function AG(e,t,r){v5(vy,e,t,r)}function Che(e,t){const r=t[0];return`error #${r} `+vhe(r,t[1],e).join(" ")}function fl(...e){return Che(void 0,e)}function bhe(...e){return Che(` `,e)}function She(e,t){return e.get("rowModelType")===t}function wn(e,t){return She(e,"clientSide")}function To(e,t){return She(e,"serverSide")}function wo(e,t){return e.get("domLayout")===t}function Ma(e){return Uy(e)!==void 0}function y5(e){return typeof e.get("getRowHeight")=="function"}function dUe(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function ss(e,t,r=!1,n){const{gos:i,environment:o}=e;if(n==null&&(n=o.getDefaultRowHeight()),y5(i)){if(r)return{height:n,estimated:!0};const l={node:t,data:t.data},c=i.getCallback("getRowHeight")(l);if(FG(c))return c===0&&we(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&i.get("masterDetail"))return hUe(i);const s=i.get("rowHeight");return{height:s&&FG(s)?s:n,estimated:!1}}function hUe(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return FG(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function ra(e){const{environment:t,gos:r}=e,n=r.get("rowHeight");if(!n||Hr(n))return t.getDefaultRowHeight();const i=t.refreshRowHeightVariable();return i!==-1?i:(we(24),t.getDefaultRowHeight())}function FG(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function LM(e,t,r){const n=t[e.getDomDataKey()];return n?n[r]:void 0}function em(e,t,r,n){const i=e.getDomDataKey();let o=t[i];Hr(o)&&(o={},t[i]=o),o[r]=n}function hn(e){const{gos:t,eGridDiv:r}=e;let n=null;const i=t.get("getDocument");return i&&qe(i)?n=i():r&&(n=r.ownerDocument),n&&qe(n)?n:document}function whe(e){return hn(e).defaultView||window}function Hy(e){return e.eGridDiv.getRootNode()}function Br(e){return Hy(e).activeElement}function aA(e){let t=null,r=null;try{t=hn(e).fullscreenElement}catch{}finally{t||(t=Hy(e));const n=t.querySelector("body");n?r=n:t instanceof ShadowRoot?r=t:t instanceof Document?r=t==null?void 0:t.documentElement:r=t}return r}function pUe(e){const t=aA(e);return(t==null?void 0:t.clientWidth)??(window.innerHeight||-1)}function fUe(e){const t=aA(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function LG(e,t,r){const i=e.getBoundingClientRect().height,o=pUe(r)-2,s=fUe(r)-2;if(!e.offsetParent)return;const l=ahe(e.offsetParent),{clientY:c,clientX:u}=t;let d=c-l.top-i/2,h=u-l.left-10;const p=hn(r),f=p.defaultView||window,g=f.pageYOffset||p.documentElement.scrollTop,m=f.pageXOffset||p.documentElement.scrollLeft;o>0&&h+e.clientWidth>o+m&&(h=o+m-e.clientWidth),h<0&&(h=0),s>0&&d+e.clientHeight>s+g&&(d=s+g-e.clientHeight),d<0&&(d=0),e.style.left=`${h}px`,e.style.top=`${d}px`}function Ep(e){const t=hn(e),r=Br(e);return r===null||r===t.body}function yy(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function lA(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||wo(e,"print"))}function Xl(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function x0(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function cA(e){return e.get("grandTotalRow")}function Wy(e){const t=e.get("groupTotalRow");return typeof t=="function"?e.getCallback("groupTotalRow"):()=>t??void 0}function C5(e){return e.exists("groupDisplayType")?e.get("groupDisplayType")==="multipleColumns":e.get("groupHideOpenParents")}function uA(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function Md(e){const t=e.getCallback("getRowId");return t===void 0?t:r=>{let n=t(r);return typeof n!="string"&&(we(25,{id:n}),n=String(n)),n}}function gUe(e,t){const r=e.get("groupHideParentOfSingleChild");return!!(r===!0||r==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function xhe(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function The(e,t){const r=e.get("suppressGroupChangesColumnVisibility");if(r===!0||t&&r==="suppressHideOnGroup"||!t&&r==="suppressShowOnUngroup")return!1;const n=e.get("suppressRowGroupHidesColumns");if(t&&n===!0)return!1;const i=e.get("suppressMakeColumnVisibleAfterUnGroup");return!(!t&&i===!0)}function _g(e){return(e==null?void 0:e.checkboxes)??!0}function uP(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function _M(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function yO(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function b5(e){return typeof e.get("rowSelection")!="string"}function mUe(e){return e.get("cellSelection")!==void 0}function uE(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?(t==null?void 0:t.suppressMultiRanges)??!1:!1:e.get("suppressMultiRangeSelection")}function xs(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function CO(e){var n;const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"&&((n=t.handle)==null?void 0:n.mode)==="fill"?t.handle:void 0:{mode:"fill",setFillValue:e.get("fillOperation"),direction:e.get("fillHandleDirection"),suppressClearOnFillReduction:e.get("suppressClearOnFillReduction")}}function Ehe(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const r=e.get("suppressRowClickSelection"),n=e.get("suppressRowDeselection");return r&&n?!1:r?"enableDeselection":n?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function vUe(e){const t=Ehe(e);return t===!0||t==="enableSelection"}function LY(e){const t=Ehe(e);return t===!0||t==="enableDeselection"}function _G(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function Uy(e){const t=e.get("rowSelection");if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Rp(e){return Uy(e)==="multiRow"}function yUe(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function OM(e){const t=e.get("rowSelection");if(typeof t=="string"){const r=e.get("groupSelectsChildren"),n=e.get("groupSelectsFiltered");return r&&n?"filteredDescendants":r?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function Rhe(e,t=!0){const r=e.get("rowSelection");return typeof r!="object"?t?"all":void 0:r.mode==="multiRow"?r.selectAll:"all"}function tm(e){const t=OM(e);return t==="descendants"||t==="filteredDescendants"}function bO(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function bo(e){return e.get("columnMenu")==="legacy"}function Phe(e){return!bo(e)}function Mhe(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function CUe(e,t,r){typeof e!="object"&&(e={});const n={...e};return r.forEach(i=>{const o=t[i];typeof o<"u"&&(n[i]=o)}),n}function bUe(e,t){if(!e)return;const r={};let n=!1;if(Object.keys(e).forEach(s=>{r[s]=e[s],n=!0}),!n)return;const i={type:"gridOptionsChanged",options:r};t.dispatchEvent(i);const o={type:"componentStateChanged",...r};t.dispatchEvent(o)}var Ihe="__ag_Grid_Stop_Propagation",SUe=["touchstart","touchend","touchmove","touchcancel","scroll"],wUe=["wheel"],SO={};function ci(e){e[Ihe]=!0}function _a(e){return e[Ihe]===!0}var Dhe=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return r=>{if(typeof SO[r]=="boolean")return SO[r];const n=document.createElement(e[r]||"div");return r="on"+r,SO[r]=r in n}})();function Ahe(e,t,r){let n=t;for(;n;){const i=LM(e,n,r);if(i)return i;n=n.parentElement}return null}function OG(e,t){return!t||!e?!1:TUe(t).indexOf(e)>=0}function xUe(e){const t=[];let r=e.target;for(;r;)t.push(r),r=r.parentElement;return t}function TUe(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():xUe(t)}function EUe(e,t,r,n){const i=Fhe(r);let o;i!=null&&(o={passive:i}),e&&e.addEventListener&&e.addEventListener(t,r,n,o)}var Fhe=e=>{const t=SUe.includes(e),r=wUe.includes(e);if(t)return!0;if(r)return!1},xe=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;tnull;e instanceof HTMLElement?EUe(this.beans.frameworkOverrides,e,t,r):e.addEventListener(t,r);const n=()=>(e.removeEventListener(t,r),null);return this.destroyFunctions.push(n),()=>(n(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==n),null)}setupGridOptionListener(e,t){const{gos:r}=this;r.addPropertyEventListener(e,t);const n=()=>(r.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(n),()=>(n(),this.destroyFunctions=this.destroyFunctions.filter(i=>i!==n),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const r=e.join("-")+this.propertyListenerId++,n=i=>{if(i.changeSet){if(i.changeSet&&i.changeSet.id===this.lastChangeSetIdLookup[r])return;this.lastChangeSetIdLookup[r]=i.changeSet.id}const o={type:"gridPropertyChanged",changeSet:i.changeSet,source:i.source};t(o)};e.forEach(i=>this.setupGridOptionListener(i,n))}getLocaleTextFunc(){return a5(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const r=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),r}createBean(e,t,r){return(t||this.stubContext).createBean(e,r)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}},Lhe=new Set(["__proto__","constructor","prototype"]);function RUe(e,t){if(e!=null){if(Array.isArray(e)){for(let r=0;r{if(Lhe.has(i))return;let s=e[i];s!==o&&(n&&s==null&&o!=null&&typeof o=="object"&&o.constructor===Object&&(s={},e[i]=s),_Y(o)&&_Y(s)&&!Array.isArray(s)?Ri(s,o,r,n):(r||o!==void 0)&&(e[i]=o))})}function Dw(e,t,r){if(!t||!e)return;if(!r)return e[t];const n=t.split(".");let i=e;for(let o=0;o=0&&!n,this.tooltipFieldContainsDots=qe(r)&&r.indexOf(".")>=0&&!n}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const r=e.width,n=e.initialWidth;return r!=null?t=r:n!=null?t=n:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){var t;return((t=this.beans.showRowGroupCols)==null?void 0:t.isRowGroupDisplayed(this,e))??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}addEventListener(e,t){var n,i,o;this.frameworkEventListenerService=(i=(n=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:i.call(n,this.frameworkEventListenerService,this.colEventSvc);const r=((o=this.frameworkEventListenerService)==null?void 0:o.wrap(t))??t;this.colEventSvc.addEventListener(e,r)}removeEventListener(e,t){var n;const r=((n=this.frameworkEventListenerService)==null?void 0:n.unwrap(t))??t;this.colEventSvc.removeEventListener(e,r)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t;return((t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))??!1}isCellEditable(e){var t;return((t=this.beans.editSvc)==null?void 0:t.isCellEditable(this,e))??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){var t;return((t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))??!1}isSuppressPaste(e){var t;return this.isColumnFunc(e,((t=this.colDef)==null?void 0:t.suppressPaste)??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??PUe[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const r=this.createColumnFunctionCallbackParams(e);return t(r)}return!1}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return Hr(this.sort)}isSorting(){return qe(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){var e;return we(261),!!((e=this.beans.colHover)!=null&&e.isHovered(this))}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const r=e===!0;this.visible!==r&&(this.visible=r,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let r=!0;for(;e;){if(!e.isPadding()){r=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:r}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(Hr(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),r=this.colDef.colSpan(t);return Math.max(r,1)}getRowSpan(e){if(Hr(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),r=this.colDef.rowSpan(t);return Math.max(r,1)}setActualWidth(e,t,r=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),r||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,r){const n=this.createColumnEvent(e,t);r&&Ri(n,r),this.colEventSvc.dispatchEvent(n)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function Zn(e){return e instanceof Aw}var Aw=class extends xe{constructor(e,t,r,n){super(),this.colGroupDef=e,this.groupId=t,this.padding=r,this.level=n,this.isColumn=!1,this.expandable=!1,this.instanceId=_he(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&e.openByDefault)}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{fu(t)?e.push(t):Zn(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,r=!1;const n=this.findChildrenRemovingPadding();for(let o=0,s=n.length;o{r.forEach(n=>{Zn(n)&&n.isPadding()?t(n.children):e.push(n)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},IUe={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},DUe=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;tr?r(n,t[i]):t[i]===n)}function AUe(e){return e.sort((t,r)=>t-r)}function Eo(e,t){const r=e.indexOf(t);r>=0&&e.splice(r,1)}function OY(e,t,r){for(let n=0;n=0;n--)e.splice(r,0,t[n])}function Ohe(e,t){const r=[],n=[],i=[];return e.forEach(s=>{const a=s.getColDef().lockPosition;a==="right"?i.push(s):a==="left"||a===!0?r.push(s):n.push(s)}),t.get("enableRtl")?[...i,...n,...r]:[...r,...n,...i]}function khe(e,t){let r=!0;return yd(null,t,n=>{if(!Zn(n))return;const i=n,o=i.getColGroupDef();if(!(o&&o.marryChildren))return;const a=[];i.getLeafColumns().forEach(h=>{const p=e.indexOf(h);a.push(p)});const l=Math.max.apply(Math,a),c=Math.min.apply(Math,a),u=l-c,d=i.getLeafColumns().length-1;u>d&&(r=!1)}),r}function Nhe(e,t){if(!e||e.length==0)return;const r=t(e[0]);for(let n=1;no.getPinned());e.dispatchEvent({type:"columnPinned",pinned:i??null,columns:t,column:n,source:r})}function FUe(e,t,r){if(!t.length)return;const n=t.length===1?t[0]:null,i=Nhe(t,o=>o.isVisible());e.dispatchEvent({type:"columnVisible",visible:i,columns:t,column:n,source:r})}function $he(e,t,r,n){e.dispatchEvent({type:t,columns:r,column:r&&r.length==1?r[0]:null,source:n})}function jy(e,t,r,n,i=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:i,finished:r,source:n})}function na(e,t,r){var x;const{colModel:n,rowGroupColsSvc:i,pivotColsSvc:o,autoColSvc:s,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:u,environment:d,valueColsSvc:h,eventSvc:p,gos:f}=e,g=n.getColDefCols()||[];if(!(g!=null&&g.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return we(32),!1;const m=(T,R,E,M,D)=>{if(!T)return;const A=NUe(R,t.defaultState),I=A("flex").value1;if(Xhe(e,T,A("hide").value1,A("sort").value1,A("sortIndex").value1,A("pinned").value1,I,r),I==null){const _=A("width").value1;if(_!=null){const F=T.getColDef().minWidth??d.getDefaultColumnMinWidth();F!=null&&_>=F&&T.setActualWidth(_,r)}}D||!T.isPrimary()||(h==null||h.syncColumnWithState(T,r,A),i==null||i.syncColumnWithState(T,r,A,E),o==null||o.syncColumnWithState(T,r,A,M))},v=(T,R,E)=>{var U,V;const M=Vhe(e,r),D=R.slice(),A={},I={},_=[],F=[],O=[];let k=0;const B=(i==null?void 0:i.columns.slice())??[],H=(o==null?void 0:o.columns.slice())??[];T.forEach(G=>{const K=G.colId;if(K.startsWith(Pp)){_.push(G),O.push(G);return}if(iu(K)){F.push(G),O.push(G);return}const Y=E(K);Y?(m(Y,G,A,I,!1),Eo(D,Y)):(O.push(G),k+=1)});const N=G=>m(G,null,A,I,!1);D.forEach(N),i==null||i.sortColumns(kY.bind(i,A,B)),o==null||o.sortColumns(kY.bind(o,I,H)),n.refreshCols(!1);const z=(G,K,q=[])=>{K.forEach(Y=>{const X=G(Y.colId);Eo(q,X),m(X,Y,null,null,!0)}),q.forEach(N)};return z(G=>(s==null?void 0:s.getAutoCol(G))??null,_,(U=s==null?void 0:s.getAutoCols())==null?void 0:U.slice()),z(G=>(a==null?void 0:a.getSelectionCol(G))??null,F,(V=a==null?void 0:a.getSelectionCols())==null?void 0:V.slice()),LUe(t,n,f),c.refresh(r),p.dispatchEvent({type:"columnEverythingChanged",source:r}),M(),{unmatchedAndAutoStates:O,unmatchedCount:k}};l==null||l.start();let{unmatchedAndAutoStates:b,unmatchedCount:S}=v(t.state||[],g,T=>n.getColDefCol(T));if(b.length>0||qe(t.defaultState)){const T=((x=u==null?void 0:u.getPivotResultCols())==null?void 0:x.list)??[];S=v(b,T,R=>(u==null?void 0:u.getPivotResultCol(R))??null).unmatchedCount}return l==null||l.finish(),S===0}function Ghe(e,t){const{colModel:r,autoColSvc:n}=e,i=r.getColDefCols();if(!(i!=null&&i.length))return;const o=r.getColDefColTree(),s=S5(o),a=[];let l=1e3,c=1e3,u=[];const d=n==null?void 0:n.getAutoCols();d&&(u=u.concat(d)),s&&(u=u.concat(s)),u.forEach(h=>{const p=zhe(h);Hr(p.rowGroupIndex)&&p.rowGroup&&(p.rowGroupIndex=l++),Hr(p.pivotIndex)&&p.pivot&&(p.pivotIndex=c++),a.push(p)}),na(e,{state:a,applyOrder:!0},t)}function Vhe(e,t){const{rowGroupColsSvc:r,pivotColsSvc:n,valueColsSvc:i,colModel:o,sortSvc:s,eventSvc:a}=e,l={rowGroupColumns:(r==null?void 0:r.columns.slice())??[],pivotColumns:(n==null?void 0:n.columns.slice())??[],valueColumns:(i==null?void 0:i.columns.slice())??[]},c=T0(e),u={};return c.forEach(d=>{u[d.colId]=d}),()=>{const d=o.getAllCols(),h=(E,M,D,A)=>{const I=M.map(A),_=D.map(A);if(_o(I,_))return;const O=new Set(M);D.forEach(B=>{O.delete(B)||O.add(B)});const k=[...O];a.dispatchEvent({type:E,columns:k,column:k.length===1?k[0]:null,source:t})},p=E=>{const M=[];return d.forEach(D=>{const A=u[D.getColId()];A&&E(A,D)&&M.push(D)}),M},f=E=>E.getColId();h("columnRowGroupChanged",l.rowGroupColumns,(r==null?void 0:r.columns)??[],f),h("columnPivotChanged",l.pivotColumns,(n==null?void 0:n.columns)??[],f);const m=p((E,M)=>{const D=E.aggFunc!=null,A=D!=M.isValueActive(),I=D&&E.aggFunc!=M.getAggFunc();return A||I});m.length>0&&$he(a,"columnValueChanged",m,t),jy(a,p((E,M)=>E.width!=M.getActualWidth()),!0,t),Bhe(a,p((E,M)=>E.pinned!=M.getPinned()),t),FUe(a,p((E,M)=>E.hide==M.isVisible()),t);const T=p((E,M)=>E.sort!=M.getSort()||E.sortIndex!=M.getSortIndex());T.length>0&&(s==null||s.dispatchSortChangedEvents(t,T));const R=T0(e);OUe(c,R,t,o,a)}}function T0(e){const{colModel:t,rowGroupColsSvc:r,pivotColsSvc:n}=e,i=t.getColDefCols();if(Hr(i)||!t.isAlive())return[];const o=t.getAllCols(),s=r==null?void 0:r.columns,a=n==null?void 0:n.columns,l=d=>{const h=d.isRowGroupActive()&&s?s.indexOf(d):null,p=d.isPivotActive()&&a?a.indexOf(d):null,f=d.isValueActive()?d.getAggFunc():null,g=d.getSort()!=null?d.getSort():null,m=d.getSortIndex()!=null?d.getSortIndex():null;return{colId:d.getColId(),width:d.getActualWidth(),hide:!d.isVisible(),pinned:d.getPinned(),sort:g,sortIndex:m,aggFunc:f,rowGroup:d.isRowGroupActive(),rowGroupIndex:h,pivot:d.isPivotActive(),pivotIndex:p,flex:d.getFlex()??null}},c=o.map(d=>l(d)),u=new Map(t.getCols().map((d,h)=>[d.getColId(),h]));return c.sort((d,h)=>{const p=u.has(d.colId)?u.get(d.colId):-1,f=u.has(h.colId)?u.get(h.colId):-1;return p-f}),c}function zhe(e){const t=(f,g)=>f??g??null,r=e.getColDef(),n=t(r.sort,r.initialSort),i=t(r.sortIndex,r.initialSortIndex),o=t(r.hide,r.initialHide),s=t(r.pinned,r.initialPinned),a=t(r.width,r.initialWidth),l=t(r.flex,r.initialFlex);let c=t(r.rowGroupIndex,r.initialRowGroupIndex),u=t(r.rowGroup,r.initialRowGroup);c==null&&(u==null||u==!1)&&(c=null,u=null);let d=t(r.pivotIndex,r.initialPivotIndex),h=t(r.pivot,r.initialPivot);d==null&&(h==null||h==!1)&&(d=null,h=null);const p=t(r.aggFunc,r.initialAggFunc);return{colId:e.getColId(),sort:n,sortIndex:i,hide:o,pinned:s,width:a,flex:l,rowGroup:u,rowGroupIndex:c,pivot:h,pivotIndex:d,aggFunc:p}}function LUe(e,t,r){if(!e.applyOrder||!e.state)return;const n=[];e.state.forEach(i=>{i.colId!=null&&n.push(i.colId)}),_Ue(t.cols,n,t,r)}function _Ue(e,t,r,n){if(e==null)return;let i=[];const o={};t.forEach(a=>{if(o[a])return;const l=e.map[a];l&&(i.push(l),o[a]=!0)});let s=0;if(e.list.forEach(a=>{const l=a.getColId();if(o[l]!=null)return;l.startsWith(Pp)?i.splice(s++,0,a):i.push(a)}),i=Ohe(i,n),!khe(i,r.getColTree())){we(39);return}e.list=i}function OUe(e,t,r,n,i){const o={};t.forEach(u=>o[u.colId]=u);const s={};e.forEach(u=>{o[u.colId]&&(s[u.colId]=!0)});const a=e.filter(u=>s[u.colId]),l=t.filter(u=>s[u.colId]),c=[];l.forEach((u,d)=>{const h=a&&a[d];if(h&&h.colId!==u.colId){const p=n.getCol(h.colId);p&&c.push(p)}}),c.length&&i.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:r})}var kY=(e,t,r,n)=>{const i=e[r.getId()],o=e[n.getId()],s=i!=null,a=o!=null;if(s&&a)return i-o;if(s)return-1;if(a)return 1;const l=t.indexOf(r),c=t.indexOf(n),u=l>=0,d=c>=0;return u&&d?l-c:u?-1:1},Hhe="ag-Grid-SelectionColumn",kUe=class extends xe{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,Og(e.source))})}addSelectionCols(e){const t=this.selectionCols;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),Khe(e))}createSelectionCols(e,t){var h,p;const r=()=>{var f;Mp(this.beans,(f=this.selectionCols)==null?void 0:f.tree),this.selectionCols=null},n=e.treeDepth,o=(((h=this.selectionCols)==null?void 0:h.treeDepth)??-1)==n,s=this.generateSelectionCols();if(jhe(s,((p=this.selectionCols)==null?void 0:p.list)??[])&&o)return;r();const{colGroupSvc:l}=this.beans,c=(l==null?void 0:l.findDepth(e.tree))??0,u=(l==null?void 0:l.balanceTreeForAutoCols(s,c))??[];this.selectionCols={list:s,tree:u,treeDepth:c,map:{}},t(f=>{if(!f)return null;const g=f.filter(m=>!iu(m));return[...s,...g]})}isSelectionColumnEnabled(){var s,a;const{gos:e,beans:t}=this,r=e.get("rowSelection");if(typeof r!="object"||!Ma(e))return!1;const n=(((a=(s=t.autoColSvc)==null?void 0:s.getAutoCols())==null?void 0:a.length)??0)>0;if(r.checkboxLocation==="autoGroupColumn"&&n)return!1;const i=!!_g(r),o=uP(r);return i||o}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const{gos:e,validation:t}=this.beans,r=e.get("selectionColumnDef"),i={width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:e.get("enableRtl")?"right":"left",comparator(a,l,c,u){const d=c.isSelected(),h=u.isSelected();return d===h?0:d?1:-1},editable:!1,suppressFillHandle:!0,...r,colId:Hhe},o=i.colId;t==null||t.validateColDef(i,o,!0);const s=new dA(i,null,o,!1);return this.createBean(s),[s]}putSelectionColsFirstInList(e,t){if(!t)return null;const r=t.filter(n=>!iu(n));return[...e,...r]}getSelectionCol(e){var t;return((t=this.selectionCols)==null?void 0:t.list.find(r=>w5(r,e)))??null}getSelectionCols(){var e;return((e=this.selectionCols)==null?void 0:e.list)??null}onSelectionOptionsChanged(e,t,r){const n=t&&typeof t!="string"?_g(t):void 0,i=e&&typeof e!="string"?_g(e):void 0,o=n!==i,s=t&&typeof t!="string"?uP(t):void 0,a=e&&typeof e!="string"?uP(e):void 0,l=s!==a,c=_M(e),u=_M(t);(o||l||c!==u)&&this.beans.colModel.refreshAll(r)}destroy(){var e;Mp(this.beans,(e=this.selectionCols)==null?void 0:e.tree),super.destroy()}refreshVisibility(e){if(!this.isSelectionColumnEnabled())return;const t=this.beans,r=t.visibleCols.getAllTrees()??[];if(r.length!==0){if(!r.some(Whe)){const n=T0(t).find(i=>iu(i.colId));n&&na(t,{state:[{colId:n.colId,hide:!n.hide}]},e)}if(r.length===1){const n=r[0],i=Uhe(n);if(!i)return;na(t,{state:[{colId:i.getColId(),hide:!0}]},e)}}}},Whe=e=>{var t;return e.isColumn?iu(e):((t=e.getChildren())==null?void 0:t.some(Whe))??!1};function Uhe(e){if(e.isColumn)return iu(e)?e:null;const t=e.getChildren()??[];for(const r of t){const n=Uhe(r);if(n)return n}return null}var Pp="ag-Grid-AutoColumn";function S5(e){const t=[],r=n=>{for(let i=0;it+r.getActualWidth(),0)}function Mp(e,t,r){const n={};if(!t)return;yd(null,t,o=>{n[o.getInstanceId()]=o}),r&&yd(null,r,o=>{n[o.getInstanceId()]=null});const i=Object.values(n).filter(o=>o!=null);e.context.destroyBeans(i)}function hA(e){return e.getId().startsWith(Pp)}function iu(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(Hhe))??!1}function kM(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function jhe(e,t){return _o(e,t,(r,n)=>r.getColId()===n.getColId())}function Khe(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function Og(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function w5(e,t){const r=e===t,n=e.getColDef()===t,i=e.getColId()==t;return r||n||i}var NUe=(e,t)=>(r,n)=>{const i={value1:void 0,value2:void 0};let o=!1;return e&&(e[r]!==void 0&&(i.value1=e[r],o=!0),qe(n)&&e[n]!==void 0&&(i.value2=e[n],o=!0)),!o&&t&&(t[r]!==void 0&&(i.value1=t[r]),qe(n)&&t[n]!==void 0&&(i.value2=t[n])),i};function qhe(e,t=null,r,n,i){const o=new DUe,{existingCols:s,existingGroups:a,existingColKeys:l}=BUe(n);o.addExistingKeys(l);const c=Yhe(e,t,0,r,s,o,a,i),{colGroupSvc:u}=e,d=(u==null?void 0:u.findMaxDepth(c,0))??0,h=u?u.balanceColumnTree(c,0,d,o):c;return yd(null,h,(f,g)=>{Zn(f)&&f.setupExpandable(),f.originalParent=g}),{columnTree:h,treeDept:d}}function BUe(e){const t=[],r=[],n=[];return e&&yd(null,e,i=>{if(Zn(i)){const o=i;r.push(o)}else{const o=i;n.push(o.getId()),t.push(o)}}),{existingCols:t,existingGroups:r,existingColKeys:n}}function Yhe(e,t,r,n,i,o,s,a){if(!t)return[];const{colGroupSvc:l}=e,c=new Array(t.length);for(let u=0;u0))if(r.width!=null)t.setActualWidth(r.width,n);else{const o=t.getActualWidth();t.setActualWidth(o,n)}}function GUe(e,t){if(t)for(let r=0;r{const s=n[o.trim()];s?Ri(r,s,!1,!0):we(36,{t:o})})}function HUe(e){return e.children!==void 0}function yd(e,t,r){if(t)for(let n=0;nthis.refreshAll(Og(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],e=>this.recreateColumnDefs(Og(e.source))),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Og(e.source)))}createColsFromColDefs(e){var b,S,x;const{beans:t}=this,{valueCache:r,colAutosize:n,rowGroupColsSvc:i,pivotColsSvc:o,valueColsSvc:s,visibleCols:a,colViewport:l,eventSvc:c}=t,u=this.colDefs?Vhe(t,e):void 0;r==null||r.expire();const d=(b=this.colDefCols)==null?void 0:b.list,h=(S=this.colDefCols)==null?void 0:S.tree,p=qhe(t,this.colDefs,!0,h,e);Mp(t,(x=this.colDefCols)==null?void 0:x.tree,p.columnTree);const f=p.columnTree,g=p.treeDept,m=S5(f),v={};m.forEach(T=>v[T.getId()]=T),this.colDefCols={tree:f,treeDepth:g,list:m,map:v},i==null||i.extractCols(e,d),o==null||o.extractCols(e,d),s==null||s.extractCols(e,d),this.ready=!0,this.refreshCols(!0),a.refresh(e),l.checkViewportColumns(),c.dispatchEvent({type:"columnEverythingChanged",source:e}),u&&(this.changeEventsDispatching=!0,u(),this.changeEventsDispatching=!1),c.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(n==null||n.applyAutosizeStrategy())}refreshCols(e){var f;if(!this.colDefCols)return;const t=(f=this.cols)==null?void 0:f.tree;this.saveColOrder();const{autoColSvc:r,selectionColSvc:n,quickFilter:i,pivotResultCols:o,showRowGroupCols:s,rowAutoHeight:a,visibleCols:l,colViewport:c,eventSvc:u}=this.beans,d=this.selectCols(o,this.colDefCols);r==null||r.createAutoCols(d,g=>{this.lastOrder=g(this.lastOrder),this.lastPivotOrder=g(this.lastPivotOrder)}),r==null||r.addAutoCols(d),n==null||n.createSelectionCols(d,g=>{this.lastOrder=g(this.lastOrder)??null,this.lastPivotOrder=g(this.lastPivotOrder)??null}),n==null||n.addSelectionCols(d);const h=dUe(this.gos,this.showingPivotResult);(!e||h)&&this.restoreColOrder(d),this.positionLockedCols(d),s==null||s.refresh(),i==null||i.refreshCols(),this.setColSpanActive(),a==null||a.setAutoHeightActive(d),l.clear(),c.clear(),!_o(t,this.cols.tree)&&u.dispatchEvent({type:"gridColumnsChanged"})}selectCols(e,t){const r=(e==null?void 0:e.getPivotResultCols())??null;this.showingPivotResult=r!=null;const{map:n,list:i,tree:o,treeDepth:s}=r??t;return this.cols={list:i.slice(),map:{...n},tree:o.slice(),treeDepth:s},r&&(r.list.some(l=>{var c;return((c=this.cols)==null?void 0:c.map[l.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){var n;if(!this.cols)return[];const e=this.isPivotMode()&&!this.showingPivotResult,t=(n=this.beans.valueColsSvc)==null?void 0:n.columns;return this.cols.list.filter(i=>{const o=hA(i);if(e){const s=t==null?void 0:t.includes(i);return o||s}else return o||i.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,r){na(this.beans,{state:e.map(n=>({colId:typeof n=="string"?n:n.getColId(),hide:!t}))},r)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const r=new Map(t.map((c,u)=>[c,u]));if(!e.list.some(c=>r.has(c)))return;const i=new Map(e.list.map(c=>[c,!0])),o=t.filter(c=>i.has(c)),s=new Map(o.map(c=>[c,!0])),a=e.list.filter(c=>!s.has(c)),l=o.slice();a.forEach(c=>{let u=c.getOriginalParent();if(!u){l.push(c);return}const d=[];for(;!d.length&&u;)u.getLeafColumns().forEach(g=>{const m=l.indexOf(g)>=0,v=d.indexOf(g)<0;m&&v&&d.push(g)}),u=u.getOriginalParent();if(!d.length){l.push(c);return}const h=d.map(f=>l.indexOf(f)),p=Math.max(...h);l.splice(p+1,0,c)}),e.list=l}positionLockedCols(e){e.list=Ohe(e.list,this.gos)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=((e=this.cols)==null?void 0:e.list)??null:this.lastOrder=((t=this.cols)==null?void 0:t.list)??null}getColumnDefs(){var e,t;return this.colDefCols?(t=this.beans.colDefFactory)==null?void 0:t.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,((e=this.cols)==null?void 0:e.list)??[]):void 0}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.getColDef().colSpan!=null))}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1);const{visibleCols:r,eventSvc:n}=this.beans;r.refresh(t),n.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){var t;const e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var t;this.cols&&((t=this.beans.autoColSvc)==null||t.updateAutoCols(e),this.createColsFromColDefs(e))}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;Mp(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e;return((e=this.cols)==null?void 0:e.tree)??[]}getColDefColTree(){var e;return((e=this.colDefCols)==null?void 0:e.tree)??[]}getColDefCols(){var e;return((e=this.colDefCols)==null?void 0:e.list)??null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}getAllCols(){var i,o,s,a;const{pivotResultCols:e,autoColSvc:t,selectionColSvc:r}=this.beans,n=(i=e==null?void 0:e.getPivotResultCols())==null?void 0:i.list;return[((o=this.colDefCols)==null?void 0:o.list)??[],((s=t==null?void 0:t.autoCols)==null?void 0:s.list)??[],((a=r==null?void 0:r.selectionCols)==null?void 0:a.list)??[],n??[]].flat()}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){var i;if(t==null)return null;const{map:r,list:n}=t;if(typeof e=="string"&&r[e])return r[e];for(let o=0;ol.set(u,d)),t.length=0,qe(e)&&e.forEach(u=>{const d=this.colModel.getColDefCol(u);d&&t.push(d)}),t.forEach((u,d)=>{const h=l.get(u);if(h===void 0){l.set(u,0);return}n&&h!==d||l.delete(u)}),(this.colModel.getColDefCols()||[]).forEach(u=>{const d=t.indexOf(u)>=0;o(u,d,s)}),i&&this.colModel.refreshCols(!1),this.visibleCols.refresh(s),this.dispatchColumnChangedEvent(this.eventSvc,r,[...l.keys()],s)}updateColList(e=[],t,r,n,i,o,s){if(!e||e.length===0)return;let a=!1;const l=new Set;if(e.forEach(u=>{if(!u)return;const d=this.colModel.getColDefCol(u);if(d){if(l.add(d),r){if(t.indexOf(d)>=0)return;t.push(d)}else{const h=t.indexOf(d);if(h<0)return;for(let p=h+1;p{const f=t.indexOf(p)<0,g=p.getColDef(),m=l(g),v=c(g),b=s(g),S=a(g);let x;m!==void 0?x=m:b!==void 0?b===null?x=!1:x=b>=0:f?v!==void 0?x=v:S!==void 0?x=S!=null&&S>=0:x=!1:x=r.indexOf(p)>=0,x&&((f?b!=null||S!=null:b!=null)?n.push(p):i.push(p))});const d=p=>{const f=s(p.getColDef()),g=a(p.getColDef());return f??g};n.sort((p,f)=>{const g=d(p),m=d(f);return g===m?0:g{i.indexOf(p)>=0&&h.push(p)}),i.forEach(p=>{h.indexOf(p)<0&&h.push(p)}),r.forEach(p=>{h.indexOf(p)<0&&o(p,!1,e)}),h.forEach(p=>{r.indexOf(p)<0&&o(p,!0,e)}),this.columns=h}restoreColumnOrder(e,t){const r=this.columns,n=this.colModel.getColDefCols();if(!r.length||!n)return e;const i=Object.keys(t),o=new Set(i),s=new Set(i),a=new Set(r.map(S=>{const x=S.getColId();return s.delete(x),x}).concat(i)),l=[],c={};let u=0;for(let S=0;S{const x=c[S];for(let T=p;T{const x=S.getColId();if(o.has(x))b(x),t[x][m]=d++;else{const T=S.getColDef();(T[m]===null||T[m]===void 0&&T[v]==null)&&(h||(T[f]||T[f]===void 0&&T[g]?b(x):(s.forEach(M=>{t[M][m]=d+c[M]}),d+=l.length,h=!0)),e[x]||(e[x]={colId:x}),e[x][m]=d++)}}),e}},Jhe=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let r;return typeof t!="number"?r=0:r=t+1,this.existingIds[e]=r,r}},_C=class extends xe{};function Xx(e,t,r){return r&&e.addDestroyFunc(()=>t.destroyBean(r)),r??e}var Zx=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){this.addOrRemoveCssClass(e,!0)}removeCssClass(e){this.addOrRemoveCssClass(e,!1)}containsCssClass(e){const t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const n=(e||"").split(" ");if(n.length>1){n.forEach(i=>this.addOrRemoveCssClass(i,t));return}}if(this.cssClassStates[e]!==t&&e.length){const n=this.getGui();n&&n.classList.toggle(e,t),this.cssClassStates[e]=t}}},UUe=0,Ce=null,Xe=class extends xe{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=UUe++,this.cssClassManager=new Zx(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(r=>[r.selector,r])),e&&this.setTemplate(e)}preConstruct(){var t,r,n;this.wireTemplate(this.getGui());const e="component-"+((r=(t=Object.getPrototypeOf(this))==null?void 0:t.constructor)==null?void 0:r.name);(n=this.css)==null||n.forEach(i=>this.beans.environment.addGlobalCSS(i,e))}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute("data-ref"):null}applyElementsToComponent(e,t,r,n=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const i=this[t];if(i===Ce)this[t]=n??e;else{const o=r&&r[t];if(!this.suppressDataRefValidation&&!o)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${i}`)}}}createChildComponentsFromTags(e,t){nUe(e.childNodes).forEach(n=>{if(!(n instanceof HTMLElement))return;const i=this.createComponentFromElement(n,o=>{o.getGui()&&this.copyAttributesFromNode(n,o.getGui())},t);if(i){if(i.addItems&&n.children.length){this.createChildComponentsFromTags(n,t);const o=Array.prototype.slice.call(n.children);i.addItems(o)}this.swapComponentForNode(i,e,n)}else n.childNodes&&this.createChildComponentsFromTags(n,t)})}createComponentFromElement(e,t,r){const n=e.nodeName,i=this.getDataRefAttribute(e),o=n.indexOf("AG-")===0,s=o?this.componentSelectors.get(n):null;let a=null;if(s){const l=r&&i?r[i]:void 0;a=new s.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(o)throw new Error(`selector: ${n}`);return this.applyElementsToComponent(e,i,r,a),a}copyAttributesFromNode(e,t){iUe(e.attributes,(r,n)=>t.setAttribute(r,n))}swapComponentForNode(e,t,r){const n=e.getGui();t.replaceChild(n,r),t.insertBefore(document.createComment(r.nodeName),n),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(r=>r.setAttribute("tabindex",t.toString()))}setTemplate(e,t,r){const n=ws(e);this.setTemplateFromElement(n,t,r)}setTemplateFromElement(e,t,r,n=!1){if(this.eGui=e,this.suppressDataRefValidation=n,t)for(let i=0;ithis.eGui.removeEventListener(e,t))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}};function jUe(e){return typeof e.then=="function"}var lr=class JS{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(r=>this.onDone(r),r=>this.onReject(r))}static all(t){return t.length?new JS(r=>{let n=t.length;const i=new Array(n);t.forEach((o,s)=>{o.then(a=>{i[s]=a,n--,n===0&&r(i)})})}):JS.resolve()}static resolve(t=null){return new JS(r=>r(t))}then(t){return new JS(r=>{this.status===1?r(t(this.resolution)):this.waiters.push(n=>r(t(n)))})}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(r=>r(t))}onReject(t){}};function KUe(e){return e?e.prototype&&"getGui"in e.prototype:!1}function Qhe(e,t,r,n){const{name:i}=r;let o,s,a,l,c,u;if(t){const d=t,h=d[i+"Selector"],p=h?h(n):null,f=g=>{typeof g=="string"?o=g:g!=null&&g!==!0&&(e.isFrameworkComponent(g)?a=g:s=g)};p?(f(p.component),l=p.params,c=p.popup,u=p.popupPosition):f(d[i])}return{compName:o,jsComp:s,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:u}}var qUe=class extends xe{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,r,n=!1){return this.getCompDetails(this.gridOptions,e,t,r,n)}getCompDetails(e,t,r,n,i=!1){var b;const{name:o,cellRenderer:s}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:u,popupFromSelector:d,popupPositionFromSelector:h}=Qhe(this.beans.frameworkOverrides,e,t,n),p;const f=S=>{const x=this.registry.getUserComponent(o,S);x&&(l=x.componentFromFramework?void 0:x.component,c=x.componentFromFramework?x.component:void 0,p=x.params)};if(a!=null&&f(a),l==null&&c==null&&r!=null&&f(r),l&&s&&!KUe(l)&&(l=(b=this.agCompUtils)==null?void 0:b.adaptFunction(t,l)),!l&&!c){const{validation:S}=this.beans;i&&(a!==r||!r)?a?S!=null&&S.isProvidedUserComp(a)||yr(50,{compName:a}):r?S||yr(260,{...this.gos.getModuleErrorParams(),propName:o,compName:r}):yr(216,{name:o}):r&&!S&&yr(146,{comp:r});return}const g=this.mergeParams(e,t,n,u,p),m=l==null,v=l??c;return{componentFromFramework:m,componentClass:v,params:g,type:t,popupFromSelector:d,popupPositionFromSelector:h,newAgStackInstance:()=>this.newAgStackInstance(v,m,g,t)}}newAgStackInstance(e,t,r,n){var a;const i=!t;let o;i?o=new e:o=this.frameworkCompWrapper.wrap(e,n.mandatoryMethods,n.optionalMethods,n),this.createBean(o);const s=(a=o.init)==null?void 0:a.call(o,r);return s==null?lr.resolve(o):s.then(()=>o)}mergeParams(e,t,r,n=null,i){const o=this.gos.getGridCommonParams();Ri(o,r),i&&Ri(o,i);const s=e,a=s&&s[t.name+"Params"];if(typeof a=="function"){const l=a(r);Ri(o,l)}else typeof a=="object"&&Ri(o,a);return Ri(o,n),o}},YUe={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},XUe={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},ZUe={name:"headerComponent",optionalMethods:["refresh"]},JUe={name:"innerHeaderComponent"},QUe={name:"innerHeaderGroupComponent"},e8e={name:"headerGroupComponent"},t8e={name:"innerRenderer",cellRenderer:!0,optionalMethods:["afterGuiAttached"]},r8e={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},n8e={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"]},i8e={name:"loadingCellRenderer",cellRenderer:!0},o8e={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},s8e={name:"loadingOverlayComponent",optionalMethods:["refresh"]},a8e={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},l8e={name:"tooltipComponent"},T5={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},c8e={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},u8e={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},d8e={name:"loadingCellRenderer",cellRenderer:!0},h8e={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},p8e={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function f8e(e,t){return e.getCompDetailsFromGridOptions(XUe,"agDragAndDropImage",t,!0)}function wO(e,t,r){return e.getCompDetails(t,t8e,void 0,r)}function g8e(e,t,r){return e.getCompDetails(t,ZUe,"agColumnHeader",r)}function m8e(e,t,r){return e.getCompDetails(t,JUe,void 0,r)}function v8e(e,t){const r=t.columnGroup.getColGroupDef();return e.getCompDetails(r,e8e,"agColumnGroupHeader",t)}function y8e(e,t,r){return e.getCompDetails(t,QUe,void 0,r)}function C8e(e,t){return e.getCompDetailsFromGridOptions(u8e,void 0,t,!0)}function b8e(e,t){return e.getCompDetailsFromGridOptions(d8e,"agLoadingCellRenderer",t,!0)}function S8e(e,t){return e.getCompDetailsFromGridOptions(h8e,"agGroupRowRenderer",t,!0)}function w8e(e,t){return e.getCompDetailsFromGridOptions(p8e,"agDetailCellRenderer",t,!0)}function BM(e,t,r){return e.getCompDetails(t,r8e,void 0,r)}function epe(e,t,r){return e.getCompDetails(t,n8e,void 0,r)}function x8e(e,t,r){return e.getCompDetails(t,i8e,"agSkeletonCellRenderer",r,!0)}function NY(e,t,r){return e.getCompDetails(t,o8e,"agCellEditor",r,!0)}function tpe(e,t,r,n){return e.getCompDetails(t,T5,n,r,!0)}function T8e(e,t){return e.getCompDetailsFromGridOptions(YUe,"agDateInput",t,!0)}function E8e(e,t){return e.getCompDetailsFromGridOptions(s8e,"agLoadingOverlay",t,!0)}function R8e(e,t){return e.getCompDetailsFromGridOptions(a8e,"agNoRowsOverlay",t,!0)}function P8e(e,t){return e.getCompDetails(t.colDef,l8e,"agTooltipComponent",t,!0)}function rpe(e,t,r,n){return e.getCompDetails(t,c8e,n,r)}function M8e(e,t){return Qhe(e,t,T5)}function I8e(e,t,r){return e.mergeParams(t,T5,r)}function rm(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var npe=new Set,$M={},kg={},dP,ipe=!1;function D8e(e){const[t,r]=e.version.split(".")||[],[n,i]=dP.split(".")||[];return t===n&&r===i}function A8e(e){dP||(dP=e.version);const t=r=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${r} Please update all modules to the same version.`;if(e.version?D8e(e)||vy(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${dP}.`)):vy(t(`'${e.moduleName}' is incompatible.`)),e.validate){const r=e.validate();r.isValid||vy(`${r.message}`)}}function E0(e,t){A8e(e);const r=e.rowModels??["all"];npe.add(e);let n;t!==void 0?(ipe=!0,kg[t]===void 0&&(kg[t]={}),n=kg[t]):n=$M,r.forEach(i=>{n[i]===void 0&&(n[i]={}),n[i][e.moduleName]=e}),e.dependsOn&&e.dependsOn.forEach(i=>E0(i,t))}function F8e(e){delete kg[e]}function ope(e,t,r){const n=i=>{var o,s,a;return!!((o=$M[i])!=null&&o[e])||!!((a=(s=kg[t])==null?void 0:s[i])!=null&&a[e])};return n(r)||n("all")}function E5(){return ipe}function L8e(e,t){const r=kg[e]??{};return[...Object.values($M.all??{}),...Object.values(r.all??{}),...Object.values($M[t]??{}),...Object.values(r[t]??{})]}function _8e(){return new Set(npe)}function spe(e,t){const r=kg[e]??{};return[...Object.values(r.all??{}),...Object.values(r[t]??{})]}var FNt=class{static register(e){E0(e,void 0)}static registerModules(e){e.forEach(t=>E0(t,void 0))}},O8e=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,!(!e||!e.beanClasses)&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){var t;Object.entries(e.providedBeanInstances).forEach(([r,n])=>{this.beans[r]=n}),e.beanClasses.forEach(r=>{const n=new r;n.beanName?this.beans[n.beanName]=n:console.error(`Bean ${r.name} is missing beanName`),this.createdBeans.push(n)}),(t=e.derivedBeans)==null||t.forEach(r=>{const{beanName:n,bean:i}=r(this);this.beans[n]=i,this.createdBeans.push(i)}),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){if(!e)throw Error("null bean");return this.initBeans([e],t),e}initBeans(e,t){e.forEach(r=>{var n,i;(n=r.preWireBeans)==null||n.call(r,this.beans),(i=r.wireBeans)==null||i.call(r,this.beans)}),e.forEach(r=>{var n;return(n=r.preConstruct)==null?void 0:n.call(r)}),t&&e.forEach(t),e.forEach(r=>{var n;return(n=r.postConstruct)==null?void 0:n.call(r)})}getBeans(){return this.beans}getBean(e){return this.beans[e]}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[]}destroyBean(e){var t;(t=e==null?void 0:e.destroy)==null||t.call(e)}destroyBeans(e){if(e)for(let t=0;t=this.lastScrollTop,n&&e===0){const i=(r==null?void 0:r.getCurrentPage())??0;i!==this.lastPage&&(this.lastPage=i,this.scrollGoingDown=!0)}this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame")}verifyAnimationFrameOn(e){this.active===!1&&we(92,{methodName:e})}createTask(e,t,r){this.verifyAnimationFrameOn(r);const n={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[r],n),this.schedule()}cancelTask(e){this.cancelledTasks.add(e)}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((r,n)=>r.index!==n.index?t*(n.index-r.index):n.createOrder-r.createOrder),e.sorted=!0}addDestroyTask(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()}executeFrame(e){this.verifyAnimationFrameOn("executeFrame");const t=this.createTasksP1,r=t.list,n=this.createTasksP2,i=n.list,o=this.destroyTasks,s=new Date().getTime();let a=new Date().getTime()-s;const l=e<=0,c=this.beans.ctrlsSvc.getScrollFeature();for(;l||a0||(e.addEventListener("keydown",VM),e.addEventListener("mousedown",VM))}function z8e(e){GM>0||(e.removeEventListener("keydown",VM),e.removeEventListener("mousedown",VM))}function VM(e){const t=kG,r=e.type==="keydown";r&&(e.ctrlKey||e.metaKey||e.altKey)||t!==r&&(kG=r)}function H8e(e){const t=hn(e);return V8e(t),GM++,()=>{GM--,z8e(t)}}function pA(){return kG}function upe(e,t,r){t.addManagedElementListeners(r,{keydown:n=>{if(!n.defaultPrevented&&n.key===fe.TAB){const i=n.shiftKey;Oo(e,r,!1,i)||Id(e,i)&&n.preventDefault()}}})}function tc(e,t,r=!1){const n=J6e;let i=ohe;t&&(i+=", "+t),r&&(i+=', [tabindex="-1"]');const o=Array.prototype.slice.apply(e.querySelectorAll(n)).filter(l=>us(l)),s=Array.prototype.slice.apply(e.querySelectorAll(i));return s.length?((l,c)=>l.filter(u=>c.indexOf(u)===-1))(o,s):o}function ao(e,t=!1,r=!1){const n=tc(e,null,r),i=t?er(n):n[0];return i?(i.focus({preventScroll:!0}),!0):!1}function Oo(e,t,r,n){const i=tc(t,r?':not([tabindex="-1"])':null),o=Br(e);let s;r?s=i.findIndex(l=>l.contains(o)):s=i.indexOf(o);const a=s+(n?-1:1);return a<0||a>=i.length?null:i[a]}function P5(e,t=5){let r=0;for(;e&&IG(e)===null&&++r<=t;)e=e.parentElement;return IG(e)===null?null:e}function dpe(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function Cy(e){var t;return e.gos.get("suppressHeaderFocus")||!!((t=e.overlays)!=null&&t.isExclusive())}function hpe(e){var t;return e.gos.get("suppressCellFocus")||!!((t=e.overlays)!=null&&t.isExclusive())}function Id(e,t,r=!1){const n=e.ctrlsSvc.get("gridCtrl");return!r&&n.focusNextInnerContainer(t)?!0:((r||!t&&!n.isDetailGrid())&&n.forceFocusOutOfContainer(t),!1)}var W8e=/[&<>"']/g,U8e={"&":"&","<":"<",">":">",'"':""","'":"'"};function Cn(e,t){if(e==null)return null;const r=e.toString().toString();return t?r:r.replace(W8e,n=>U8e[n])}function j8e(e,t=!1){return e===fe.DELETE?!0:!t&&e===fe.BACKSPACE?rhe():!1}var K8e=class extends xe{constructor(e,t,r,n){super(),this.cellCtrl=e,this.rowNode=r,this.rowCtrl=n,this.beans=t}setComp(e){this.eGui=e}onKeyDown(e){const t=e.key;switch(t){case fe.ENTER:this.onEnterKeyDown(e);break;case fe.F2:this.onF2KeyDown(e);break;case fe.ESCAPE:this.onEscapeKeyDown(e);break;case fe.TAB:this.onTabKeyDown(e);break;case fe.BACKSPACE:case fe.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case fe.DOWN:case fe.UP:case fe.RIGHT:case fe.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){var r;this.cellCtrl.editing||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):(r=this.beans.navigation)==null||r.navigateToNextCell(e,t,this.cellCtrl.cellPosition,!0),e.preventDefault())}onShiftRangeSelect(e){const{rangeSvc:t,navigation:r}=this.beans;if(!t)return;const n=t.extendLatestRangeInDirection(e);n&&(r==null||r.ensureCellVisible(n))}onTabKeyDown(e){var t;(t=this.beans.navigation)==null||t.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){var l;const{cellCtrl:r,beans:n,rowNode:i}=this,{gos:o,rangeSvc:s,eventSvc:a}=n;if(!r.editing){if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),j8e(e,o.get("enableCellEditingOnBackspace"))){if(s&&xs(o))s.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(r.isCellEditable()){const{column:c}=r,u=this.beans.valueSvc.getDeleteValue(c,i);i.setDataValue(c,u,"cellClear")}}else(l=n.editSvc)==null||l.startRowOrCellEdit(r,e,t);a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}}onEnterKeyDown(e){var n,i;const{cellCtrl:t,beans:r}=this;if(t.editing||this.rowCtrl.editing)t.stopEditingAndFocus(!1,e.shiftKey);else if(r.gos.get("enterNavigatesVertically")){const o=e.shiftKey?fe.UP:fe.DOWN;(n=r.navigation)==null||n.navigateToNextCell(null,o,t.cellPosition,!1)}else(i=r.editSvc)==null||i.startRowOrCellEdit(t,fe.ENTER,e),t.editing&&e.preventDefault()}onF2KeyDown(e){var n;const{cellCtrl:t,beans:r}=this;t.editing||(n=r.editSvc)==null||n.startRowOrCellEdit(t,fe.F2,e)}onEscapeKeyDown(e){var n;const{cellCtrl:t,beans:r}=this;t.editing&&((n=r.editSvc)==null||n.stopRowOrCellEdit(t,!0),t.focusCell(!0))}processCharacter(e){var i;if(e.target!==this.eGui||this.cellCtrl.editing)return;const n=e.key;n===fe.SPACE?this.onSpaceKeyDown(e):(i=this.beans.editSvc)!=null&&i.startRowOrCellEdit(this.cellCtrl,n,e)&&e.preventDefault()}onSpaceKeyDown(e){var r;const{gos:t}=this.beans;!this.cellCtrl.editing&&Ma(t)&&((r=this.beans.selectionSvc)==null||r.handleSelectionEvent(e,this.rowNode,"spaceKey")),e.preventDefault()}destroy(){super.destroy()}},q8e=class extends xe{constructor(e,t,r){super(),this.cellCtrl=e,this.column=r,this.beans=t}onMouseEvent(e,t){if(!_a(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){var c;if((c=this.beans.touchSvc)!=null&&c.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:r,gos:n,editSvc:i}=this.beans,o=e.ctrlKey||e.metaKey;r&&o&&r.getCellRangeCount(this.cellCtrl.cellPosition)>1&&r.intersectLastRange(!0);const s=this.cellCtrl.createEvent(e,"cellClicked");t.dispatchEvent(s);const a=this.column.getColDef();a.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{a.onCellClicked(s)})},0),(n.get("singleClickEdit")||a.singleClickEdit)&&!n.get("suppressClickEdit")&&!(e.shiftKey&&(r==null?void 0:r.getCellRanges().length)!=0)&&(i==null||i.startRowOrCellEdit(this.cellCtrl))}onCellDoubleClicked(e){const{column:t,beans:r,cellCtrl:n}=this,{eventSvc:i,frameworkOverrides:o,gos:s,editSvc:a}=r,l=t.getColDef(),c=n.createEvent(e,"cellDoubleClicked");i.dispatchEvent(c),typeof l.onCellDoubleClicked=="function"&&window.setTimeout(()=>{o.wrapOutgoing(()=>{l.onCellDoubleClicked(c)})},0),!s.get("singleClickEdit")&&!s.get("suppressClickEdit")&&(a==null||a.startRowOrCellEdit(n,null,e))}onMouseDown(e){const{ctrlKey:t,metaKey:r,shiftKey:n}=e,i=e.target,{cellCtrl:o,beans:s}=this,{eventSvc:a,rangeSvc:l,focusSvc:c,gos:u}=s;if(this.isRightClickInExistingRange(e))return;const d=l&&!l.isEmpty(),h=this.containsWidget(i),{cellPosition:p}=o;if(!n||!d){const g=u.get("enableCellTextSelection")&&e.defaultPrevented,m=(xm()||g)&&!o.editing&&!f5(i)&&!h;o.focusCell(m)}if(n&&d&&!c.isCellFocused(p)){e.preventDefault();const f=c.getFocusedCell();if(f){const{column:g,rowIndex:m,rowPinned:v}=f,b=s.rowRenderer.getRowByPosition({rowIndex:m,rowPinned:v}),S=b==null?void 0:b.getCellCtrl(g);S!=null&&S.editing&&S.stopEditing(),c.setFocusedCell({column:g,rowIndex:m,rowPinned:v,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!h){if(l)if(n)l.extendLatestRangeToCell(p);else{const f=t||r;l.setRangeToCell(p,f)}a.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const r=t.isCellInAnyRange(this.cellCtrl.cellPosition),n=e.button===2||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(r&&n)return!0}return!1}containsWidget(e){return Lg(e,"ag-selection-checkbox",3)||Lg(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:r}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),r==null||r.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:r}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),r==null||r.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const{eGui:t}=this.cellCtrl,r=t.contains(e.target),n=t.contains(e.relatedTarget);return r&&n}destroy(){super.destroy()}},Y8e=class extends xe{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}setComp(e){this.eGui=e,this.setupColSpan(),this.setupRowSpan(),this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this.applyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();_o(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eGui)return;const e=this.getCellWidth();this.eGui.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const{column:e,rowNode:t}=this,r=e.getColSpan(t),n=[];if(r===1)n.push(e);else{let i=e;const o=e.getPinned();for(let s=0;i&&sthis.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(r,o),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),(s=this.positionFeature)==null||s.setComp(t),(a=this.customStyleFeature)==null||a.setComp(e),(l=this.tooltipFeature)==null||l.refreshTooltip(),(c=this.keyboardListener)==null||c.setComp(this.eGui),this.rangeFeature&&this.rangeFeature.setComp(e,t),i&&this.isCellEditable()?(u=this.beans.editSvc)==null||u.startEditing(this):this.showValue(),this.onCompAttachedFuncs.length&&(this.onCompAttachedFuncs.forEach(d=>d()),this.onCompAttachedFuncs=[])}setupAutoHeight(e,t){var r;this.isAutoHeight=this.column.isAutoHeight(),!(!this.isAutoHeight||!e)&&((r=this.beans.rowAutoHeight)==null||r.setupCellAutoHeight(this,e,t))}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}showValue(e=!1){var c;const{beans:t,column:r,rowNode:n,rangeFeature:i}=this,{userCompFactory:o}=t,s=this.getValueToDisplay();let a;if(n.stub&&((c=n.groupData)==null?void 0:c[r.getId()])==null){const u=this.createCellRendererParams();a=x8e(o,r.getColDef(),u)}else if(this.isCellRenderer()){const u=this.createCellRendererParams();a=BM(o,r.getColDef(),u)}this.comp.setRenderDetails(a,s,e),i&&bl(t,()=>i==null?void 0:i.refreshHandle())}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e)),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(e){return this.rowNode.rowPinned!=null?!1:typeof e=="function"||e===!0}isCheckboxSelection(e){const{rowSelection:t}=this.beans.gridOptions;return e.checkboxSelection||iu(this.column)&&t&&typeof t!="string"&&_g(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e)),r=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),n=this.includeDndSource!=this.isIncludeControl(e.dndSource),i=this.isAutoHeight!=this.column.isAutoHeight();return t||r||n||i}onPopupEditorClosed(){this.editing&&this.stopEditingAndFocus()}stopEditing(e=!1){var t;return((t=this.beans.editSvc)==null?void 0:t.stopEditing(this,e))??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:r,rowNode:n,comp:i,eGui:o,beans:{valueSvc:s,gos:a}}=this;return a.addGridCommonParams({value:e,valueFormatted:t,getValue:()=>s.getValueForDisplay(r,n),setValue:c=>s.setValue(n,r,c),formatValue:this.formatValue.bind(this),data:n.data,node:n,pinned:r.getPinned(),colDef:r.getColDef(),column:r,refreshCell:this.refreshCell.bind(this),eGridCell:o,eParentOfValue:i.getParentOfValue(),registerRowDragger:(c,u,d,h)=>this.registerRowDragger(c,u,h),setTooltip:(c,u)=>{var d;a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(c,u),(d=this.tooltipFeature)==null||d.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){var t;this.refreshShouldDestroy()?(t=this.rowCtrl)==null||t.recreateCell(this):this.refreshCell(e)}refreshCell(e){var c,u,d,h,p,f;if(this.suppressRefreshCell||this.editing)return;const t=this.column.getColDef(),r=e!=null&&!!e.newData,n=e!=null&&!!e.suppressFlash,i=t.field==null&&t.valueGetter==null&&t.showRowGroup==null,o=e&&e.forceRefresh||i||r,s=!!this.comp,a=this.updateAndFormatValue(s),l=o||a;if(s){if(l){this.showValue(r);const g=(c=this.beans.filterManager)==null?void 0:c.isSuppressFlashingCellsBecauseFiltering();!n&&!g&&t.enableCellChangeFlash&&((u=this.beans.cellFlashSvc)==null||u.flashCell(this)),(d=this.customStyleFeature)==null||d.applyUserStyles(),(h=this.customStyleFeature)==null||h.applyClassesFromColDef()}(p=this.tooltipFeature)==null||p.refreshTooltip(),(f=this.customStyleFeature)==null||f.applyCellClassRules()}}stopEditingAndFocus(e=!1,t=!1){var r;(r=this.beans.editSvc)==null||r.stopEditingAndFocus(this,e,t)}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,r=this.valueFormatted;return this.value=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode),this.valueFormatted=this.callValueFormatter(this.value),e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=r:!0}valuesAreEqual(e,t){const r=this.column.getColDef();return r.equals?r.equals(e,t):e===t}addDomData(e){const t=this.eGui;em(this.beans.gos,t,zM,this),e.addDestroyFunc(()=>em(this.beans.gos,t,zM,null))}createEvent(e,t){const{rowNode:r,column:n,value:i}=this;return this.beans.gos.addGridCommonParams({type:t,node:r,data:r.data,value:i,column:n,colDef:n.getColDef(),rowPinned:r.rowPinned,event:e,rowIndex:r.rowIndex})}processCharacter(e){var t;(t=this.keyboardListener)==null||t.processCharacter(e)}onKeyDown(e){var t;(t=this.keyboardListener)==null||t.onKeyDown(e)}onMouseEvent(e,t){var r;(r=this.mouseListener)==null||r.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature.getColSpanningList()}onLeftChanged(){var e;this.comp&&((e=this.positionFeature)==null||e.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:r}=this;lpe(e,t,r.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);d5(this.eGui,e)}onWidthChanged(){var e;return(e=this.positionFeature)==null?void 0:e.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){var e;this.comp&&((e=this.rangeFeature)==null||e.updateRangeBordersIfRangeCount())}onCellSelectionChanged(){var e;this.comp&&((e=this.rangeFeature)==null||e.onCellSelectionChanged())}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1){this.beans.focusSvc.setFocusedCell({rowIndex:this.cellPosition.rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:e})}onRowIndexChanged(){var e;this.createCellPosition(),this.onCellFocused(),(e=this.rangeFeature)==null||e.onCellSelectionChanged()}onSuppressCellFocusChanged(e){this.eGui&&pl(this.eGui,"tabindex",e?void 0:-1)}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.addOrRemoveCssClass(e7e,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.addOrRemoveCssClass(t7e,e)}onCellFocused(e){var i;const{beans:t}=this;if(hpe(t))return;const r=t.focusSvc.isCellFocused(this.cellPosition);if(!this.comp){r&&(e!=null&&e.forceBrowserFocus)&&(this.focusEventToRestore=e);return}if(this.focusEventToRestore=void 0,this.comp.addOrRemoveCssClass(Q8e,r),r&&e&&e.forceBrowserFocus){let o=this.comp.getFocusableElement();if(this.editing){const s=tc(o,null,!0);s.length&&(o=s[0])}o.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}const n=t.gos.get("editType")==="fullRow";!r&&!n&&this.editing&&((i=t.editSvc)==null||i.stopRowOrCellEdit(this)),r&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:Mi(t),column:this.column}}setInlineEditingCss(){var e;(e=this.beans.editSvc)==null||e.setInlineEditingCss(this.rowCtrl)}applyStaticCssClasses(){const{comp:e}=this;e.addOrRemoveCssClass(X8e,!0),e.addOrRemoveCssClass(r7e,!0);const t=this.column.isAutoHeight()==!0;e.addOrRemoveCssClass(Z8e,t),e.addOrRemoveCssClass(J8e,!t)}onColumnHover(){var e;(e=this.beans.colHover)==null||e.onCellColumnHover(this.column,this.comp)}onColDefChanged(){var e;this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing?(e=this.beans.editSvc)==null||e.handleColDefChanged(this):this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.addOrRemoveCssClass(n7e,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),r=this.createEvent(e,"cellContextMenu"),{beans:n}=this;n.eventSvc.dispatchEvent(r),t.onCellContextMenu&&window.setTimeout(()=>{n.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(r)})},0)}getCellRenderer(){var e;return((e=this.comp)==null?void 0:e.getCellRenderer())??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],super.destroy()}createSelectionCheckbox(){var t;const e=(t=this.beans.selectionSvc)==null?void 0:t.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,r){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const n=this.createRowDragComp(e,t,r);n&&(this.customRowDragComp=n,this.addDestroyFunc(()=>{this.beans.context.destroyBean(n),this.customRowDragComp=null}))}createRowDragComp(e,t,r){var i;const n=(i=this.beans.rowDragSvc)==null?void 0:i.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,r);if(n)return this.beans.context.createBean(n),n}cellEditorAttached(){this.onEditorAttachedFuncs.forEach(e=>e()),this.onEditorAttachedFuncs=[]}},ppe="__ag_grid_instance";function fpe(e,t){t[ppe]=e.gridInstanceId}function HM(e,t){return gpe(e,t.target)}function gpe(e,t){let r=t;for(;r;){const n=r[ppe];if(qe(n))return n===e.gridInstanceId;r=r.parentElement}return!1}function mpe(e,t){var r;return((r=M5(e,t.target))==null?void 0:r.cellPosition)??null}function Fw(e,t){const r=wo(e.gos,"normal"),n=t;let i,o;if(n.clientX!=null||n.clientY!=null?(i=n.clientX,o=n.clientY):(i=n.x,o=n.y),r){const s=e.ctrlsSvc.getScrollFeature(),a=s.getVScrollPosition(),l=s.getHScrollPosition();i+=l.left,o+=a.top}return{x:i,y:o}}var pc=(e=>(e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag",e[e.ChartPanel=3]="ChartPanel",e[e.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",e))(pc||{}),o7e=class extends xe{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.dragSvc=e.dragSvc,this.environment=e.environment,this.userCompFactory=e.userCompFactory}addDragSource(e,t=!1){const r={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:r,dragSource:e}),this.dragSvc.addDragSource(r)}getDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;return!e||!e.comp?null:e.comp}removeDragSource(e){const{dragSourceAndParamsList:t,dragSvc:r}=this,n=t.find(i=>i.dragSource===e);n&&(r.removeDragSource(n.params),Eo(t,n))}destroy(){const{dragSourceAndParamsList:e,dragSvc:t,dropTargets:r}=this;e.forEach(n=>t.removeDragSource(n.params)),e.length=0,r.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){var r;this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=e.getDragItem(),(r=e.onDragStarted)==null||r.call(e),this.createDragAndDropImageComponent()}onDragStop(e){var r,n;(n=(r=this.dragSource)==null?void 0:r.onDragStopped)==null||n.call(r);const{lastDropTarget:t}=this;if(t!=null&&t.onDragStop){const i=this.createDropTargetEvent(t,e,null,null,!1);t.onDragStop(i)}this.clearDragAndDropProperties()}onDragCancel(){var r;const{dragSource:e,lastDropTarget:t}=this;(r=e==null?void 0:e.onDragCancelled)==null||r.call(e),t!=null&&t.onDragCancel&&t.onDragCancel(this.createDropTargetEvent(t,this.eventLastTime,null,null,!1)),this.clearDragAndDropProperties()}clearDragAndDropProperties(){this.eventLastTime=null,this.dragging=!1,this.lastDropTarget=void 0,this.dragItem=null,this.dragSource=null,this.removeDragAndDropImageComponent()}onDragging(e,t=!1){var u,d;const r=this.getHorizontalDirection(e),n=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);const i=this.dropTargets.filter(h=>this.isMouseOnDropTarget(e,h)),o=this.findCurrentDropTarget(e,i),{lastDropTarget:s,dragSource:a,dragAndDropImageComp:l,dragItem:c}=this;if(o!==s){if(this.leaveLastTargetIfExists(e,r,n,t),s!==null&&o===null&&((u=a==null?void 0:a.onGridExit)==null||u.call(a,c)),s===null&&o!==null&&((d=a==null?void 0:a.onGridEnter)==null||d.call(a,c)),this.enterDragTargetIfExists(o,e,r,n,t),o&&l){const{comp:h,promise:p}=l;h?h.setIcon(o.getIconName?o.getIconName():null,!1):p.then(f=>{f&&f.setIcon(o.getIconName?o.getIconName():null,!1)})}this.lastDropTarget=o}else if(o&&o.onDragging){const h=this.createDropTargetEvent(o,e,r,n,t);o.onDragging(h)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,r=[[e.getContainer()]];return t?r.concat(t):r}isMouseOnDropTarget(e,t){const r=this.getAllContainersFromDropTarget(t);let n=!1;const i=(a,l)=>{for(const c of l){const{width:u,height:d,left:h,right:p,top:f,bottom:g}=c.getBoundingClientRect();if(u===0||d===0)return!1;const m=a.clientX>=h&&a.clientX=f&&a.clientYl).indexOf(o)!==-1)return s;return null}enterDragTargetIfExists(e,t,r,n,i){if(e&&e.onDragEnter){const o=this.createDropTargetEvent(e,t,r,n,i);e.onDragEnter(o)}}leaveLastTargetIfExists(e,t,r,n){const{lastDropTarget:i}=this;if(!i)return;if(i.onDragLeave){const s=this.createDropTargetEvent(i,e,t,r,n);i.onDragLeave(s)}const o=this.getDragAndDropImageComponent();o&&o.setIcon(null,!1)}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(r=>r.external).find(r=>r.getContainer()===e.getContainer())||null}isDropZoneWithinThisGrid(e){const r=this.ctrlsSvc.getGridBodyCtrl().eGridBody,{dropZoneTarget:n}=e;return r.contains(n)}getHorizontalDirection(e){var n;const t=(n=this.eventLastTime)==null?void 0:n.clientX,r=e.clientX;return t===r?null:t>r?"left":"right"}getVerticalDirection(e){var n;const t=(n=this.eventLastTime)==null?void 0:n.clientY,r=e.clientY;return t===r?null:t>r?"up":"down"}createDropTargetEvent(e,t,r,n,i){const o=e.getContainer(),s=o.getBoundingClientRect(),{dragItem:a,dragSource:l,gos:c}=this,u=t.clientX-s.left,d=t.clientY-s.top;return c.addGridCommonParams({event:t,x:u,y:d,vDirection:n,hDirection:r,dragSource:l,fromNudge:i,dragItem:a,dropZoneTarget:o})}positionDragAndDropImageComp(e){const t=this.getDragAndDropImageComponent();t&&LG(t.getGui(),e,this.beans)}removeDragAndDropImageComponent(){var t;const{dragAndDropImageComp:e}=this;if(e){const{comp:r}=e;if(r){const n=r.getGui();(t=this.dragAndDropImageParent)==null||t.removeChild(n),this.destroyBean(r)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){const{dragSource:e}=this;if(!e)return;const t=f8e(this.userCompFactory,{dragSource:e});if(!t)return;const r=t.newAgStackInstance();this.dragAndDropImageComp={promise:r},r.then(n=>{!n||!this.isAlive()||(this.processDragAndDropImageComponent(n),this.dragAndDropImageComp.comp=n)})}processDragAndDropImageComponent(e){const{dragSource:t,environment:r}=this;if(!t)return;const n=e.getGui();n.style.setProperty("position","absolute"),n.style.setProperty("z-index","9999"),fpe(this.gos,n),r.applyThemeClasses(n),e.setIcon(null,!1);let{dragItemName:i}=t;typeof i=="function"&&(i=i()),e.setLabel(i||""),n.style.top="20px",n.style.left="20px";const o=aA(this.beans);this.dragAndDropImageParent=o,o?o.appendChild(n):we(54)}registerGridDropTarget(e,t){const r={getContainer:e,isInterestedIn:n=>n===1||n===0,getIconName:()=>"notAllowed"};this.addDropTarget(r),t.addDestroyFunc(()=>this.removeDropTarget(r))}},I5=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.indexOf("x")!==-1,this.scrollVertically=e.scrollAxis.indexOf("y")!==-1,this.scrollByTick=e.scrollByTick!=null?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,t=!1){const r=t||this.shouldSkipVerticalScroll();if(r&&this.shouldSkipHorizontalScroll())return;const n=this.scrollContainer.getBoundingClientRect(),i=this.scrollByTick;this.tickLeft=e.clientXn.right-i,this.tickUp=e.clientYn.bottom-i&&!r,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}};function Nh(e){const{rowIndex:t,rowPinned:r,column:n}=e;return`${t}.${r??"null"}.${n.getId()}`}function Ky(e,t){const r=e.column===t.column,n=e.rowPinned===t.rowPinned,i=e.rowIndex===t.rowIndex;return r&&n&&i}function Zo(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(qe(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex{const i=n.gridBodyCtrl;this.autoScrollService=new I5({scrollContainer:i.eBodyViewport,scrollAxis:"y",getVerticalPosition:()=>i.scrollFeature.getVScrollPosition().top,setVerticalPosition:o=>i.scrollFeature.setVerticalScrollPosition(o),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})})}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){const{rowGroupColsSvc:e,filterManager:t,sortSvc:r}=this.beans;return!!(((e==null?void 0:e.columns)??[]).length||(t==null?void 0:t.isAnyFilterPresent())||(r==null?void 0:r.isSortActive()))}getRowNodes(e){var n;if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const i=[...((n=this.beans.selectionSvc)==null?void 0:n.getSelectedNodes())??[]].sort((o,s)=>o.rowIndex==null||s.rowIndex==null?0:this.getRowIndexNumber(o)-this.getRowIndexNumber(s));if(i.indexOf(t)!==-1)return i}return[t]}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent("rowDragEnter",e),this.getRowNodes(e).forEach(t=>{this.setRowNodeDragging(t,!0)}),this.onEnterOrDragging(e)}onDragging(e){this.onEnterOrDragging(e)}isFromThisGrid(e){const{dragSourceDomDataKey:t}=e.dragSource;return t===this.gos.getDomDataKey()}onEnterOrDragging(e){this.dispatchGridEvent("rowDragMove",e),this.lastDraggingEvent=e;const t=Fw(this.beans,e).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)}doManagedDrag(e,t){const{dragAndDrop:r,gos:n}=this.beans,i=this.isFromThisGrid(e),o=n.get("rowDragManaged"),s=e.dragItem.rowNodes;o&&this.shouldPreventRowMove()||(n.get("suppressMoveWhenRowDragging")||!i?r.isDropZoneWithinThisGrid(e)&&this.clientSideRowModel.highlightRowAtPixel(s[0],t):this.moveRows(s,t))}getRowIndexNumber(e){const t=e.getRowIndexString();return parseInt(er(t.split("-")),10)}moveRowAndClearHighlight(e){const t=this.clientSideRowModel,r=t.getLastHighlightedRowNode(),n=r&&r.highlighted==="Below",i=Fw(this.beans,e).y,o=e.dragItem.rowNodes;let s=n?1:0;if(this.isFromThisGrid(e))o.forEach(a=>{a.rowTop!t.getRowNode((a==null?void 0:a({data:c.data,level:0,rowPinned:c.rowPinned}))??c.data.id)).map(c=>c.data),addIndex:l})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(e,t,r=0){const n=this.beans.focusSvc,i=n.getFocusedCell(),o=i&&Yc(this.beans,i);this.clientSideRowModel.ensureRowsAtPixel(e,t,r)&&(o?o.focusCell():n.clearFocusedCell())}addRowDropZone(e){if(!e.getContainer()){we(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e)){we(56);return}let r={getContainer:e.getContainer};e.fromGrid?r=e:(e.onDragEnter&&(r.onDragEnter=i=>{e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",i))}),e.onDragLeave&&(r.onDragLeave=i=>{e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",i))}),e.onDragging&&(r.onDragging=i=>{e.onDragging(this.draggingToRowDragEvent("rowDragMove",i))}),e.onDragStop&&(r.onDragStop=i=>{e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",i))}),e.onDragCancel&&(r.onDragCancel=i=>{e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",i))}));const n={isInterestedIn:i=>i===2,getIconName:()=>"move",external:!0,...r};t.addDropTarget(n),this.addDestroyFunc(()=>t.removeDropTarget(n))}getRowDropZone(e){const t=this.getContainer.bind(this),r=this.onDragEnter.bind(this),n=this.onDragLeave.bind(this),i=this.onDragging.bind(this),o=this.onDragStop.bind(this),s=this.onDragCancel.bind(this);let a;return e?a={getContainer:t,onDragEnter:e.onDragEnter?l=>{r(l),e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",l))}:r,onDragLeave:e.onDragLeave?l=>{n(l),e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",l))}:n,onDragging:e.onDragging?l=>{i(l),e.onDragging(this.draggingToRowDragEvent("rowDragMove",l))}:i,onDragStop:e.onDragStop?l=>{o(l),e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",l))}:o,onDragCancel:e.onDragCancel?l=>{s(l),e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",l))}:s,fromGrid:!0}:a={getContainer:t,onDragEnter:r,onDragLeave:n,onDragging:i,onDragStop:o,onDragCancel:s,fromGrid:!0},a}draggingToRowDragEvent(e,t){const r=this.beans,{pageBounds:n,rowModel:i,gos:o}=r,s=Fw(r,t).y,a=s>n.getCurrentPageHeight();let l=-1,c;return a||(l=i.getRowIndexAtPixel(s),c=i.getRow(l)),o.addGridCommonParams({type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:l,overNode:c,y:s,vDirection:t.vDirection})}dispatchGridEvent(e,t){const r=this.draggingToRowDragEvent(e,t);this.eventSvc.dispatchEvent(r)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clearRowHighlight()}onDragStop(e){this.dispatchGridEvent("rowDragEnd",e),this.stopDragging(e);const{dragAndDrop:t,gos:r}=this.beans;r.get("rowDragManaged")&&(r.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&t.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e);const{dragAndDrop:t,gos:r}=this.beans;r.get("rowDragManaged")&&(r.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&t.isDropZoneWithinThisGrid(e)&&this.clearRowHighlight()}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(t=>{this.setRowNodeDragging(t,!1)})}setRowNodeDragging(e,t){e.dragging!==t&&(e.dragging=t,e.dispatchRowEvent("draggingChanged"))}};function vpe(e,t,r){if(r===0)return!1;const n=Math.abs(e.clientX-t.clientX),i=Math.abs(e.clientY-t.clientY);return Math.max(n,i)<=r}var c7e=class extends xe{constructor(){super(...arguments),this.beanName="dragSvc",this.dragEndFunctions=[],this.dragSources=[]}destroy(){const{dragSources:e}=this;e.forEach(this.removeListener.bind(this)),e.length=0,super.destroy()}removeListener(e){const t=e.dragSource.eElement,r=e.mouseDownListener;if(t.removeEventListener("mousedown",r),e.touchEnabled){const n=e.touchStartListener;t.removeEventListener("touchstart",n,{passive:!0})}}removeDragSource(e){const{dragSources:t}=this,r=t.find(n=>n.dragSource===e);r&&(this.removeListener(r),Eo(t,r))}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:r,includeTouch:n,stopPropagationForTouch:i}=e;r.addEventListener("mousedown",t);let o=null;const s=this.gos.get("suppressTouch");n&&!s&&(o=a=>{f5(a.target)||(i&&a.stopPropagation(),this.onTouchStart(e,a))},r.addEventListener("touchstart",o,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:o,touchEnabled:!!n})}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const r=t.touches[0];this.touchLastTime=r,this.touchStart=r;const n=l=>this.onTouchMove(l,e.eElement),i=l=>this.onTouchUp(l,e.eElement),o=l=>{l.cancelable&&l.preventDefault()},s=t.target,a=[{target:Hy(this.beans),type:"touchmove",listener:o,options:{passive:!1}},{target:s,type:"touchmove",listener:n,options:{passive:!0}},{target:s,type:"touchend",listener:i,options:{passive:!0}},{target:s,type:"touchcancel",listener:i,options:{passive:!0}}];this.addTemporaryEvents(a),e.dragStartPixels===0&&this.onCommonMove(r,this.touchStart,e.eElement)}onMouseDown(e,t){const r=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||r._alreadyProcessedByDragService||(r._alreadyProcessedByDragService=!0,t.button!==0))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const n=c=>this.onMouseMove(c,e.eElement),i=c=>this.onMouseUp(c,e.eElement),o=c=>c.preventDefault(),s=c=>{c.key===fe.ESCAPE&&this.cancelDrag(e.eElement)},a=Hy(this.beans),l=[{target:a,type:"mousemove",listener:n},{target:a,type:"mouseup",listener:i},{target:a,type:"contextmenu",listener:o},{target:a,type:"keydown",listener:s}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(t=>{const{target:r,type:n,listener:i,options:o}=t;r.addEventListener(n,i,o)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:r,type:n,listener:i,options:o}=t;r.removeEventListener(n,i,o)})})}isEventNearStartEvent(e,t){const{dragStartPixels:r}=this.currentDragParams,n=qe(r)?r:4;return vpe(e,t,n)}getFirstActiveTouch(e){for(let t=0;t{const s=o.target,a=s==null?void 0:s.tagName.toLocaleLowerCase();return!!(a!=null&&a.match("^a$|textarea|input|select|button"))};return r&&n&&e.cancelable&&HM(t,e)&&!i(e)}onTouchUp(e,t){let r=this.getFirstActiveTouch(e.changedTouches);r||(r=this.touchLastTime),this.onUpCommon(r,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t})),this.resetDragProperties()}cancelDrag(e){var t,r;this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),(r=(t=this.currentDragParams)==null?void 0:t.onDragCancel)==null||r.call(t),this.resetDragProperties()}resetDragProperties(){this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null;const{dragEndFunctions:e}=this;e.forEach(t=>t()),e.length=0}};function ype(e,t){return e+"_"+t}function li(e){return e instanceof Cpe}var Cpe=class extends xe{constructor(e,t,r,n){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=r,this.pinned=n,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return ype(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{li(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=er(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){var t;let e=0;return(t=this.displayedChildren)==null||t.forEach(r=>{e+=r.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{fu(t)?e.push(t):li(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{fu(t)?e.push(t):li(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(r=>{if(li(r)&&(!r.displayedChildren||!r.displayedChildren.length))return;switch(r.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(r);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(r);break;default:this.displayedChildren.push(r);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},R0="row-group-",bpe="t-",Spe="b-",u7e=0,aa=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped={},this.treeNode=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=u7e++,this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.__selected=!1,this.beans=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){var i,o,s;const r=this.data;this.data=e,(i=this.beans.valueCache)==null||i.onDataChanged(),this.updateDataOnDetailNode(),(o=this.beans.selectionSvc)==null||o.updateRowSelectable(this),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,r,t);(s=this.__localEventService)==null||s.dispatchEvent(n)}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(e,t,r){return{type:"dataChanged",node:this,oldData:t,newData:e,update:r}}getRowIndexString(){return this.rowIndex==null?(yr(13),null):this.rowPinned==="top"?bpe+this.rowIndex:this.rowPinned==="bottom"?Spe+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){var s,a;const{selectionSvc:r}=this.beans,n=(s=r==null?void 0:r.createDaemonNode)==null?void 0:s.call(r,this),i=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),r&&(r.updateRowSelectable(this),r.syncInRowNode(this,n));const o=this.createDataChangedEvent(e,i,!1);(a=this.__localEventService)==null||a.dispatchEvent(o)}setId(e){var r;const t=Md(this.beans.gos);if(t)if(this.data){const n=((r=this.parent)==null?void 0:r.getRoute())??[];this.id=t({data:this.data,parentKeys:n.length>0?n:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(R0)&&yr(14,{groupPrefix:R0})}else this.id=void 0;else this.id=e}setRowTop(e){this.oldRowTop=this.rowTop,this.rowTop!==e&&(this.rowTop=e,this.dispatchRowEvent("topChanged"),this.setDisplayed(e!==null))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,r){var n;(n=this.beans.expansionSvc)==null||n.setExpanded(this,e,t,r)}setDataValue(e,t,r){const{colModel:n,valueSvc:i,gos:o,selectionSvc:s}=this.beans,a=typeof e!="string"?e:n.getCol(e)??n.getColDefCol(e);if(!a)return!1;const l=i.getValueForDisplay(a,this);if(o.get("readOnlyEdit")){const{beans:{eventSvc:u},data:d,rowIndex:h,rowPinned:p}=this;return u.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:h,rowPinned:p,column:a,colDef:a.colDef,data:d,node:this,oldValue:l,newValue:t,value:t,source:r}),!1}const c=i.setValue(this,a,t,r);return this.dispatchCellChangedEvent(a,t,l),s==null||s.updateRowSelectable(this),c}updateHasChildren(){let e=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,r){var i;const n={type:"cellChanged",node:this,column:e,newValue:t,oldValue:r};(i=this.__localEventService)==null||i.dispatchEvent(n)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){var e;return((e=this.beans.expansionSvc)==null?void 0:e.isExpandable(this))??!1}isSelected(){return this.footer?this.sibling.isSelected():this.__selected}depthFirstSearch(e){var t;(t=this.childrenAfterGroup)==null||t.forEach(r=>r.depthFirstSearch(e)),e(this)}dispatchRowEvent(e){var t;(t=this.__localEventService)==null||t.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,r="api"){var n;(n=this.beans.selectionSvc)==null||n.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:r})}isRowPinned(){return!!this.rowPinned}addEventListener(e,t){var n,i,o,s;(n=this.beans.validation)==null||n.checkRowEvents(e),this.__localEventService||(this.__localEventService=new Hp),this.frameworkEventListenerService=(o=(i=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:o.call(i,this.frameworkEventListenerService,this.__localEventService);const r=((s=this.frameworkEventListenerService)==null?void 0:s.wrap(t))??t;this.__localEventService.addEventListener(e,r)}removeEventListener(e,t){var n;if(!this.__localEventService)return;const r=((n=this.frameworkEventListenerService)==null?void 0:n.unwrap(t))??t;this.__localEventService.removeEventListener(e,r),this.__localEventService.noRegisteredListenersExist()&&(this.__localEventService=null)}isFullWidthCell(){if(we(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t&&t.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setFirstChild(e){this.firstChild!==e&&(this.firstChild=e,this.dispatchRowEvent("firstChildChanged"))}setDisplayed(e){this.displayed!==e&&(this.displayed=e,this.dispatchRowEvent("displayedChanged"))}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}};function wpe(e,t,r){return t.addGridCommonParams({type:r,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var fA=class extends Xe{constructor(e,t){super('
'),this.column=e,this.source=t,this.filterWrapper=null}postConstruct(){this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return!!this.filterWrapper}getFilter(){var e;return((e=this.filterWrapper)==null?void 0:e.filterPromise)??null}afterInit(){var e,t;return((t=(e=this.filterWrapper)==null?void 0:e.filterPromise)==null?void 0:t.then(()=>{}))??lr.resolve()}afterGuiAttached(e){var t,r;(r=(t=this.filterWrapper)==null?void 0:t.filterPromise)==null||r.then(n=>{var i;(i=n==null?void 0:n.afterGuiAttached)==null||i.call(n,e)})}afterGuiDetached(){var e,t;(t=(e=this.filterWrapper)==null?void 0:e.filterPromise)==null||t.then(r=>{var n;(n=r==null?void 0:r.afterGuiDetached)==null||n.call(r)})}createFilter(e){var n,i;const{column:t,source:r}=this;this.filterWrapper=((n=this.beans.filterManager)==null?void 0:n.getOrCreateFilterWrapper(t))??null,(i=this.filterWrapper)!=null&&i.filterPromise&&this.filterWrapper.filterPromise.then(o=>{const s=o.getGui();qe(s)||we(69,{guiFromFilter:s}),this.appendChild(s),e&&this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:r,eGui:this.getGui()})})}onFilterDestroyed(e){(e.source==="api"||e.source==="paramsUpdated")&&e.column.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(Qr(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}},xpe="ag-resizer-wrapper",mh=(e,t)=>`
`,d7e=`
${mh("eTopLeft","topLeft")} ${mh("eTop","top")} ${mh("eTopRight","topRight")} ${mh("eRight","right")} ${mh("eBottomRight","bottomRight")} ${mh("eBottom","bottom")} ${mh("eBottomLeft","bottomLeft")} ${mh("eLeft","left")}
`,gA=class extends xe{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(){const{clientHeight:e,clientWidth:t}=this.offsetParent,r=t/2-this.getWidth()/2,n=e/2-this.getHeight()/2;this.offsetElement(r,n)}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:t,minWidth:r,width:n,minHeight:i,height:o,x:s,y:a}=this.config;this.offsetParent||this.setOffsetParent();let l=0,c=0;const u=us(this.element);if(u){const d=this.findBoundaryElement(),h=window.getComputedStyle(d);if(h.minWidth!=null){const p=d.offsetWidth-this.element.offsetWidth;c=parseInt(h.minWidth,10)-p}if(h.minHeight!=null){const p=d.offsetHeight-this.element.offsetHeight;l=parseInt(h.minHeight,10)-p}}if(this.minHeight=i||l,this.minWidth=r||c,n&&this.setWidth(n),o&&this.setHeight(o),(!n||!o)&&this.refreshSize(),e)this.center();else if(s||a)this.offsetElement(s,a);else if(u&&t){let d=this.boundaryEl,h=!0;if(d||(d=this.findBoundaryElement(),h=!1),d){const p=parseFloat(d.style.top),f=parseFloat(d.style.left);h?this.offsetElement(isNaN(f)?0:f,isNaN(p)?0:p):this.setPosition(f,p)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){var n,i;if(!this.config.popup||e===this.movable)return;this.movable=e;const r=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?((n=this.dragSvc)==null||n.addDragSource(r),this.moveElementDragListener=r):((i=this.dragSvc)==null||i.removeDragSource(r),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{var s;const n=!!e[t],i=this.getResizerElement(t),o={dragStartPixels:0,eElement:i,onDragStart:a=>this.onResizeStart(a,t),onDragging:this.onResize.bind(this),onDragStop:a=>this.onResizeEnd(a,t)};(n||!this.isAlive()&&!n)&&(n?((s=this.dragSvc)==null||s.addDragSource(o),this.resizeListeners.push(o),i.style.pointerEvents="all"):i.style.pointerEvents="none",this.resizable[t]=n)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,r=this.element;let n=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Iw(r,e),e=oA(r),n=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const i=this.getAvailableHeight();i&&e>i&&(e=i)}this.getHeight()!==e&&(n?(r.style.maxHeight="unset",r.style.minHeight="unset"):t?Iw(r,e):(r.style.height=`${e}px`,r.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:r}=this.offsetParent;if(!r)return null;const n=this.element.getBoundingClientRect(),i=this.offsetParent.getBoundingClientRect(),o=e?this.position.y:n.top,s=e?0:i.top;let a=0;if(t){const c=this.element.parentElement;if(c){const{bottom:u}=c.getBoundingClientRect();a=u-n.bottom}}return r+s-o-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:r}=this.config;let n=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)ec(t,e),e=Qg(t),n=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:i}=this.offsetParent,o=r?this.position.x:this.element.getBoundingClientRect().left;i&&e+o>i&&(e=i-o)}this.getWidth()!==e&&(n?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?ec(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:parseFloat(e)))}offsetElement(e=0,t=0){var i;const{forcePopupParentAsOffsetParent:r}=this.config,n=r?this.boundaryEl:this.element;n&&((i=this.popupSvc)==null||i.positionPopup({ePopup:n,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(n.style.left),parseFloat(n.style.top)))}constrainSizeToAvailableHeight(e){var r;if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const n=this.getAvailableHeight();this.element.style.setProperty("max-height",`${n}px`)};e&&this.popupSvc?this.resizeObserverSubscriber=ka(this.beans,(r=this.popupSvc)==null?void 0:r.getPopupParent(),t):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:r,isTop:n,anywhereWithin:i,topBuffer:o}=e,s=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!r,!!i,s)?0:s,c=this.shouldSkipY(t,!!n,o,a)?0:a;return{movementX:l,movementY:c}}shouldSkipX(e,t,r,n){const i=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),s=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:i.left;let l=a<=0&&o.left>=e.clientX||o.right<=e.clientX&&o.right<=s.right;return l?!0:(t?l=n<0&&e.clientX>a+o.left||n>0&&e.clientXs.right||n>0&&e.clientXs.right||n>0&&e.clientX=e.clientY||o.bottom<=e.clientY&&o.bottom<=s.bottom;return l?!0:(t?l=n<0&&e.clientY>a+o.top+r||n>0&&e.clientYs.bottom||n>0&&e.clientY!r.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,r=0;for(let n=0;ne)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:r}=this.config,{isTop:n,isRight:i,isBottom:o,isLeft:s}=this.currentResizer,a=i||s,l=o||n,{movementX:c,movementY:u}=this.calculateMouseMovement({e,isLeft:s,isTop:n}),d=this.position.x,h=this.position.y;let p=0,f=0;if(a&&c){const g=s?-1:1,m=this.getWidth(),v=m+c*g;let b=!1;s&&(p=m-v,(d+p<=0||v<=this.minWidth)&&(b=!0,p=0)),b||this.setWidth(v)}if(l&&u){const g=n?-1:1,m=this.getHeight(),v=m+u*g;let b=!1;n?(f=m-v,(h+f<=0||v<=this.minHeight)&&(b=!0,f=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&mthis.element.parentElement.offsetHeight&&(b=!0),b||this.setHeight(v)}this.updateDragStartPosition(e.clientX,e.clientY),((t||r)&&p||f)&&this.offsetElement(d+p,h+f)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:r}=this.position;let n;this.config.calculateTopBuffer&&(n=this.config.calculateTopBuffer());const{movementX:i,movementY:o}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:n});this.offsetElement(t+i,r+o),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){var e;for(;this.resizeListeners.length;){const t=this.resizeListeners.pop();(e=this.dragSvc)==null||e.removeDragSource(t)}}destroy(){var e;super.destroy(),this.moveElementDragListener&&((e=this.dragSvc)==null||e.removeDragSource(this.moveElementDragListener)),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},Tpe="ag-focus-managed",Wp=class extends xe{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:r=>{if(r.defaultPrevented)return;const n=Oo(this.beans,this.eFocusable,!1,r.shiftKey);n&&(n.focus(),r.preventDefault())},...t}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:r}}=this;e.classList.add(Tpe),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),r&&this.addManagedElementListeners(e,{focusout:r})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||_a(t))return;const{callbacks:r}=this;if(r.shouldStopEventPropagation(t)){ci(t);return}t.key===fe.TAB?r.onTabKeyDown(t):r.handleKeyDown&&r.handleKeyDown(t)}})}},Epe={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"};function D5(e,t){const{debounceMs:r}=e;return WM(e)?(r!=null&&we(71),0):r??t}function WM(e){var t;return(((t=e.buttons)==null?void 0:t.indexOf("apply"))??-1)>=0}var mA=class extends Xe{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.eFilterBody=Ce,this.buttonListeners=[],this.defaultDebounceMs=0}postConstruct(){this.resetTemplate(),this.createManagedBean(new Wp(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new gA(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit);const r=`
${this.createBodyTemplate()}
`;this.setTemplate(r,this.getAgComponents(),e),t=this.getGui(),t==null||t.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.params.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(e){this.params=e,this.applyActive=WM(e),this.resetButtonsPanel(e)}updateParams(e){this.params=e,this.applyActive=WM(e),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(e,t){const{buttons:r,readOnly:n}=t??{},{buttons:i,readOnly:o}=e;if(n===o&&Vy(r,i))return;const s=i&&i.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(Qr(this.eButtonsPanel),this.buttonListeners.forEach(c=>c()),this.buttonListeners=[]):s&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!s){this.eButtonsPanel&&oi(this.eButtonsPanel);return}const a=document.createDocumentFragment(),l=c=>{let u;const d=c?this.translate(`${c}Filter`):void 0;switch(c){case"apply":u=f=>this.onBtApply(!1,!1,f);break;case"clear":u=()=>this.onBtClear();break;case"reset":u=()=>this.onBtReset();break;case"cancel":u=f=>{this.onBtCancel(f)};break;default:we(75);return}const p=ws(``);this.buttonListeners.push(...this.addManagedElementListeners(p,{click:u})),a.append(p)};i.forEach(c=>l(c)),this.eButtonsPanel.append(a),this.getGui().appendChild(this.eButtonsPanel)}setupOnBtApplyDebounce(){const e=D5(this.params,this.defaultDebounceMs),t=to(this,this.checkApplyDebounce.bind(this),e);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel??null}setModel(e){return(e!=null?this.setModelIntoUi(e):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(e)})}handleCancelEnd(e){this.params.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){const r=()=>{this.onUiChanged(!1,"prevent"),t==null||t()};e!=null?this.setModelIntoUi(e).then(r):this.resetUiToDefaults().then(r)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(e="api"){const t=this.getModelFromUi();if(!this.isModelValid(t))return!1;const r=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(r,t)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(e=!1,t=!1,r){r&&r.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")&&this.params.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:"columnFilter"});const{closeOnApply:n}=this.params;n&&this.applyActive&&!e&&!t&&this.close(r)}onNewRowsLoaded(){}close(e){if(!this.hidePopup)return;const t=e,r=t&&t.key;let n;(r==="Enter"||r==="Space")&&(n={keyboardEvent:t}),this.hidePopup(n),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.params.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const r=this.isModelValid(this.getModelFromUi()),n=this.queryForHtmlElement('[data-ref="applyFilterButton"]');n&&ol(n,!r)}e&&!t||t==="immediately"?this.onBtApply(e):(!this.applyActive&&!t||t==="debounce")&&this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e==null?void 0:e.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:r}=this;if(!t||e==="toolPanel")return;e==="floatingFilter"||e==="columnFilter"?(t.restoreLastSize(),t.setResizable(r.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){var e;this.checkApplyDebounce(),(e=this.positionableFeature)==null||e.constrainSizeToAvailableHeight(!1)}refresh(e){const t=this.params;return this.params=e,this.resetButtonsPanel(e,t),!0}destroy(){const e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(e){return this.getLocaleTextFunc()(e,Epe[e])}getCellValue(e){return this.params.getValue(e)}getPositionableElement(){return this.eFilterBody}};function Rpe(e,t,r){if(t==null)return null;let n=null;const{compName:i,jsComp:o,fwComp:s}=M8e(e,t);return i?n={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[i]:o==null&&s==null&&t.filter===!0&&(n=r()),n}var Yl={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},A5=class extends xe{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},r=t.autoHeight?Yl.AUTO_HEIGHT:t.print?Yl.PRINT:Yl.NORMAL;this.view.updateLayoutClasses(r,t)}},vh="Viewport",BY="fakeVScrollComp",$Y=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],h7e=class extends xe{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.scrollTimer=0,this.needsRefreshedScrollPosition=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=to(this,()=>this.lastScrollSource[1]=null,500),this.resetLastVScrollDebounced=to(this,()=>this.lastScrollSource[0]=null,500)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.requireUpdatedScrollPosition.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),gridSizeChanged:e}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,t=>{this.centerRowsCtrl=t.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}requireUpdatedScrollPosition(){this.needsRefreshedScrollPosition=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,vh)});for(const e of $Y){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsSvc.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),r=t?to(this,this.onVScroll.bind(this,vh),100):this.onVScroll.bind(this,vh),n=t?to(this,this.onVScroll.bind(this,BY),100):this.onVScroll.bind(this,BY);this.addManagedElementListeners(this.eBodyViewport,{scroll:r}),this.registerScrollPartner(e,n)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...$Y,vh]){if(this.lastScrollSource[1]===t)continue;const r=this.getViewportForSource(t);DM(r,e,this.enableRtl)}}getViewportForSource(e){return e===vh?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:r}=t;if(this.shouldBlockScrollUpdate(1,r,!0))return;const n=IM(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(n),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===vh?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:r}=this;r==null||r.setScrollTop(t),this.nextScrollTop=t,e===vh?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,!r||this.gos.get("suppressAnimationFrame")?this.scrollGridIfNeeded():r.schedule(),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},100)}shouldBlockScrollUpdate(e,t,r=!1){return r&&!lp()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=iA(this.eBodyViewport),{scrollHeight:r}=this.eBodyViewport;return e<0||e+t>r}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:r}=this.centerRowsCtrl.eViewport;if(this.enableRtl&&MM()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>r}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScroll(vh)}scrollGridIfNeeded(){const e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e}setHorizontalScrollPosition(e,t=!1){const n=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl&&MM()?e=e>0?0:n:e=Math.min(Math.max(e,0),n)),DM(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.needsRefreshedScrollPosition){const{lastOffsetHeight:r,lastScrollTop:n}=this;return{top:n,bottom:n+r}}this.needsRefreshedScrollPosition=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.centerRowsCtrl.isHorizontalScrollShowing()}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const{rowModel:r}=this.beans,n=r.getRowCount();let i=-1;for(let o=0;o=0&&this.ensureIndexVisible(i,t)}ensureIndexVisible(e,t){if(wo(this.gos,"print"))return;const{rowModel:r}=this.beans,n=r.getRowCount();if(typeof e!="number"||e<0||e>=n){we(88,{index:e});return}const o=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel"),{frameworkOverrides:s,pagination:a,pageBounds:l,rowContainerHeight:c,rowRenderer:u}=this.beans;s.wrapIncoming(()=>{var m;o||a==null||a.goToPageWithIndex(e);const d=this.ctrlsSvc.getGridBodyCtrl(),h=d.stickyTopHeight,p=d.stickyBottomHeight,f=r.getRow(e);let g;do{const v=f.rowTop,b=f.rowHeight,S=l.getPixelOffset(),x=f.rowTop-S,T=x+f.rowHeight,R=this.getVScrollPosition(),E=c.divStretchOffset,M=R.top+E,D=R.bottom+E,A=D-M,I=c.getScrollPositionForPixel(x),_=c.getScrollPositionForPixel(T-A),F=Math.min((I+_)/2,x),O=M+h>x,k=D-p{var s;o!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(o),this.centerRowsCtrl.onHorizontalViewportChanged(),(s=this.animationFrameSvc)==null||s.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:r,columnAfterEnd:n}=this.isColumnOutsideViewport(e),i=this.centerRowsCtrl.getCenterWidth()i:rn;return{columnBeforeStart:s,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,r=this.visibleCols.bodyWidth,n=e.getActualWidth(),i=e.getLeft(),o=t?-1:1,s=t?r-i:i,a=s+n*o,l=s+n/2*o;return{colLeft:s,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),r=t,n=e+t;return{start:r,end:n,width:e}}},F5=class extends xe{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=wo(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:r}=this.beans,n=t.bodyWidth,i=t.getColsLeftWidth(),o=t.getDisplayedColumnsRightWidth();let s;e?s=n+i+o:(s=n,this.addSpacer&&(this.gos.get("enableRtl")?i:o)===0&&r.verticalScrollShowing&&(s+=r.getScrollbarWidth())),this.callback(s)}},p7e=class extends xe{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:r}=this,n=()=>{bl(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(n),r.registerBodyViewportResizeListener(n)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e==null||e.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const r=this.centerContainerCtrl.getCenterWidth();r!==this.centerWidth&&(this.centerWidth=r,t==null||t.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=iA(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,t)}};function L5(e,t,r,n,i,o){if(r==null&&t==null)return;const s={},a={},l=(c,u)=>{c.split(" ").forEach(d=>{d.trim()!=""&&u(d)})};if(r){const c=Object.keys(r);for(let u=0;u{p?s[f]=!0:a[f]=!0})}}t&&o&&Object.keys(t).forEach(c=>l(c,u=>{s[u]||(a[u]=!0)})),o&&Object.keys(a).forEach(o),Object.keys(s).forEach(i)}function GY(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var f7e=class extends xe{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const r=this.gos,n=s=>{typeof s=="string"?e.push(s):Array.isArray(s)&&s.forEach(a=>e.push(a))},i=r.get("rowClass");i&&n(i);const o=r.getCallback("getRowClass");if(o){const s={data:t.data,node:t,rowIndex:t.rowIndex},a=o(s);n(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,r=>{e.push(r)},()=>{})}processRowClassRules(e,t,r){const{gos:n,expressionSvc:i}=this.beans,o=n.addGridCommonParams({data:e.data,node:e,rowIndex:e.rowIndex});L5(i,void 0,n.get("rowClassRules"),o,t,r)}processStylesFromGridOptions(e){const t=this.gos,r=t.get("rowStyle"),n=t.getCallback("getRowStyle");let i;if(n){const o={data:e.data,node:e,rowIndex:e.rowIndex};i=n(o)}if(i||r)return Object.assign({},r,i)}},g7e=0,P0="renderedRow",NG=class extends xe{constructor(e,t,r,n,i){var o;super(),this.rowNode=e,this.useAnimationFrameForCreate=n,this.printLayout=i,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=((o=t.pagination)==null?void 0:o.getCurrentPage())??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+g7e++,this.rowId=Cn(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=GY(this.rowNode),this.setRowType(),this.setAnimateFlags(r),this.rowStyles=this.processStylesFromGridOptions(),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=Cn(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,r,n){n=Xx(this,this.beans.context,n);const i={rowComp:e,element:t,containerType:r,compBean:n};this.allRowGuis.push(i),this.updateGui(r,i),this.initialiseRowComp(i),this.rowType!=="FullWidthLoading"&&!this.rowNode.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";this.allRowGuis.forEach(r=>r.element.style.display=t)}initialiseRowComp(e){var i;const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),(i=this.beans.rowAutoHeight)==null||i.checkAutoHeights(this.rowNode),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),Ma(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const r=e.rowComp;this.getInitialRowClasses(e.containerType).forEach(o=>r.addOrRemoveCssClass(o,!0)),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&Ps(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(r),this.setRowCompRowBusinessKey(r),em(t,e.element,P0,this),e.compBean.addDestroyFunc(()=>em(t,e.element,P0,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=Cn(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(IY(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(IY(()=>{e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){var n;const t=(n=this.beans.rowDragSvc)==null?void 0:n.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const r=this.createBean(t,this.beans.context);this.rowDragComps.push(r),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(i=>i!==r),this.destroyBean(r,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),r=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(r)}getFullWidthCellRenderers(){var e,t;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(r=>{var n;return(n=r==null?void 0:r.rowComp)==null?void 0:n.getFullWidthCellRenderer()}):[(t=(e=this.fullWidthGui)==null?void 0:e.rowComp)==null?void 0:t.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:r,beans:{visibleCols:n}}=this,i=!!e||!n.isPinningLeft(),o=!!t,s=!!r||!n.isPinningRight();return i&&o&&s}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),r=this.gos.get("masterDetail")&&this.rowNode.detail,n=this.beans.colModel.isPivotMode(),o=!!this.rowNode.group&&!this.rowNode.footer&&uA(this.gos,n);e?this.rowType="FullWidthLoading":r?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":o?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:r}=this.beans;if(!r||e||this.gos.get("suppressAnimationFrame")||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(r.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0)}createCellCtrls(e,t,r=null){const n={list:[],map:{}},i=(o,s)=>{n.list.push(s),n.map[o]=s};return t.forEach(o=>{const s=o.getInstanceId();let a=e.map[s];a||(a=new hP(o,this.rowNode,this.beans,this)),i(s,a)}),e.list.forEach(o=>{const s=o.column.getInstanceId();if(n.map[s]!=null)return;if(!this.isCellEligibleToBeRemoved(o,r)){i(s,o);return}o.destroy()}),n}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{const r=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(r,e)})}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const r=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,r);const n=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,n,"left");const i=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,i,"right")}}isCellEligibleToBeRemoved(e,t){const{column:i}=e;if(i.getPinned()!=t)return!0;const{editing:o,cellPosition:s}=e,{focusSvc:a,visibleCols:l}=this.beans,c=a.isCellFocused(s);return o||c?!(l.allCols.indexOf(i)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||wo(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=qe(this.rowNode.oldRowTop),{visibleCols:r}=this.beans,n=r.isPinningLeft(),i=r.isPinningRight();if(t){const{slideInAnimation:o}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){o.fullWidth=!0;return}o.center=!0,o.left=n,o.right=i}else{const{fadeInAnimation:o}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){o.fullWidth=!0;return}o.center=!0,o.left=n,o.right=i}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(s,a)=>s?s.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(s.element,a).params):!0,t=e(this.fullWidthGui,null),r=e(this.centerGui,null),n=e(this.leftGui,"left"),i=e(this.rightGui,"right");return t&&r&&n&&i}addListeners(){var e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...((e=this.beans.expansionSvc)==null?void 0:e.getRowExpandedListeners(this))??{}}),this.rowNode.detail&&this.addManagedListeners(this.rowNode.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(this.rowNode,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this)}),this.addManagedListeners(this.beans.eventSvc,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(this.gos.get("rowDragEntireRow")){this.allRowGuis.forEach(r=>{this.addRowDraggerToRow(r)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged())},cellChanged:e=>{this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))}})}onRowNodeDataChanged(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(r=>r.refreshCell({suppressFlash:!e.update,newData:!e.update})),this.allRowGuis.forEach(r=>{this.setRowCompRowId(r.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(r.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.rowNode.highlighted;this.allRowGuis.forEach(t=>{const r=e==="Above",n=e==="Below";t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",r),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",n)})}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-dragging",e))}onDisplayedColumnsChanged(){var e;this.updateColumnLists(!0),(e=this.beans.rowAutoHeight)==null||e.checkAutoHeights(this.rowNode)}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:Mi(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}onKeyboardNavigate(e){const t=this.findFullWidthRowGui(e.target);if(!((t?t.element:null)===e.target))return;const i=this.rowNode,{focusSvc:o,navigation:s}=this.beans,a=o.getFocusedCell(),l={rowIndex:i.rowIndex,rowPinned:i.rowPinned,column:(a==null?void 0:a.column)??this.getColumnForFullWidth(t)};s==null||s.navigateToNextCell(e,e.key,l,!0),e.preventDefault()}onTabKeyDown(e){var a;if(e.defaultPrevented||_a(e))return;const t=this.allRowGuis.find(l=>l.element.contains(e.target)),r=t?t.element:null,n=r===e.target,i=Br(this.beans);let o=!1;r&&i&&(o=r.contains(i)&&i.classList.contains("ag-cell"));let s=null;!n&&!o&&(s=Oo(this.beans,r,!1,e.shiftKey)),(this.isFullWidth()&&n||!s)&&((a=this.beans.navigation)==null||a.onTabKeyDown(this,e))}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var t;const e=(t=this.allRowGuis.find(r=>us(r.element)))==null?void 0:t.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach(r=>{pl(r.element,"tabindex",t)})}onFullWidthRowFocused(e){var i;const t=this.rowNode,r=e?this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned:!1,n=this.fullWidthGui?this.fullWidthGui.element:(i=this.centerGui)==null?void 0:i.element;n&&(n.classList.toggle("ag-full-width-focus",r),r&&(e!=null&&e.forceBrowserFocus)&&n.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const r={list:[],map:{}};return e.list.forEach(n=>{n!==t&&(r.list.push(n),r.map[n.column.getInstanceId()]=n)}),r}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:r}=this;return this.gos.addGridCommonParams({type:e,node:r,data:r.data,rowIndex:r.rowIndex,rowPinned:r.rowPinned,event:t})}createRowEventWithSource(e,t){const r=this.createRowEvent(e,t);return r.source=this,r}onRowDblClick(e){_a(e)||this.beans.eventSvc.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e==null?void 0:e.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=Lg(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode,{rangeSvc:r,focusSvc:n}=this.beans;r==null||r.removeAllCellRanges();const i=this.findFullWidthRowGui(e.target),o=i==null?void 0:i.element,s=e.target;let a=!0;o&&o.contains(s)&&f5(s)&&(a=!1),n.setFocusedCell({rowIndex:t.rowIndex,column:this.getColumnForFullWidth(i),rowPinned:t.rowPinned,forceBrowserFocus:a})}onRowClick(e){if(_a(e)||this.lastMouseDownOnDragger)return;const{eventSvc:r,selectionSvc:n}=this.beans;r.dispatchEvent(this.createRowEventWithSource("rowClicked",e)),n==null||n.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){var t;this.rowType==="FullWidthDetail"&&((t=this.beans.masterDetailSvc)==null||t.setupDetailRowAutoHeight(this,e))}createFullWidthCompDetails(e,t){const{gos:r,rowNode:n}=this,i=r.addGridCommonParams({fullWidth:!0,data:n.data,node:n,value:n.key,valueFormatted:n.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(s,a,l,c)=>this.addFullWidthRowDragging(s,a,l,c),setTooltip:(s,a)=>{r.assertModuleRegistered("Tooltip",3),this.refreshRowTooltip(s,a)}}),o=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return w8e(o,i);case"FullWidthGroup":return S8e(o,i);case"FullWidthLoading":return b8e(o,i);default:return C8e(o,i)}}refreshRowTooltip(e,t){var r;this.fullWidthGui&&(this.tooltipFeature=(r=this.beans.tooltipSvc)==null?void 0:r.refreshRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,r="",n){const{rowDragSvc:i,context:o}=this.beans;if(!i||!this.isFullWidth())return;const s=i.createRowDragComp(()=>r,this.rowNode,void 0,e,t,n);this.createBean(s,o),this.addDestroyFunc(()=>{this.destroyBean(s,o)})}onUiLevelChanged(){const e=GY(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,r="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(n=>{n.rowComp.addOrRemoveCssClass(t,!0),n.rowComp.addOrRemoveCssClass(r,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(r=>r.rowComp.addOrRemoveCssClass("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(r=>r.rowComp.addOrRemoveCssClass("ag-row-last",t)))}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){var t;const e=[];(t=this.beans.rowStyleSvc)==null||t.processClassesFromGridOptions(e,this.rowNode),e.length&&e.forEach(r=>{this.allRowGuis.forEach(n=>n.rowComp.addOrRemoveCssClass(r,!0))})}postProcessRowClassRules(){var e;(e=this.beans.rowStyleSvc)==null||e.processRowClassRules(this.rowNode,t=>{this.allRowGuis.forEach(r=>r.rowComp.addOrRemoveCssClass(t,!0))},t=>{this.allRowGuis.forEach(r=>r.rowComp.addOrRemoveCssClass(t,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,r=>r.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){var a;const t=this.getPinnedForContainer(e),r=this.isFullWidth(),{rowNode:n,beans:i}=this,o=[];o.push("ag-row"),o.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&o.push("ag-opacity-zero"),o.push(n.rowIndex%2===0?"ag-row-even":"ag-row-odd"),n.isRowPinned()&&o.push("ag-row-pinned"),n.isSelected()&&o.push("ag-row-selected"),n.footer&&o.push("ag-row-footer"),o.push("ag-row-level-"+this.rowLevel),n.stub&&o.push("ag-row-loading"),r&&o.push("ag-full-width-row"),(a=i.expansionSvc)==null||a.addExpandedCss(o,n),n.dragging&&o.push("ag-row-dragging");const{rowStyleSvc:s}=i;return s&&(s.processClassesFromGridOptions(o,n),s.preProcessRowClassRules(o,n)),o.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&o.push("ag-row-first"),this.isLastRowOnPage()&&o.push("ag-row-last"),r&&(t==="left"&&o.push("ag-cell-last-left-pinned"),t==="right"&&o.push("ag-cell-first-right-pinned")),o}processStylesFromGridOptions(){var e;return((e=this.beans.rowStyleSvc)==null?void 0:e.processStylesFromGridOptions(this.rowNode))??this.emptyStyle}onRowSelected(e){var t;(t=this.beans.selectionSvc)==null||t.onRowCtrlSelected(this,r=>{(r===this.centerGui||r===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){var e;(e=this.beans.selectionSvc)==null||e.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:r}=e,{rowNode:n,beans:i,gos:o}=this;r.addManagedListeners(t,{mouseenter:()=>n.dispatchRowEvent("mouseEnter"),mouseleave:()=>n.dispatchRowEvent("mouseLeave")}),r.addManagedListeners(n,{mouseEnter:()=>{var s;!((s=i.dragSvc)!=null&&s.dragging)&&!o.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),n.setHovered(!0))},mouseLeave:()=>{t.classList.remove("ag-row-hover"),n.setHovered(!1)}})}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),r=this.applyPaginationOffset(t.top,!0)-100,n=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(r,e),n)}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,r=this.beans.environment.getDefaultRowHeight(),i=y5(this.gos)?ss(this.beans,this.rowNode).height:void 0,o=i?`${Math.min(r,i)-2}px`:void 0;this.forEachGui(e,s=>{s.element.style.height=`${t}px`,o&&s.element.style.setProperty("--ag-line-height",o)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&yy(this.gos)&&!t.sticky)if(t.rowTop!=null){const i=this.roundRowTopToBounds(t.rowTop);this.setRowTop(i)}else this.allRowGuis.forEach(i=>i.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));t.setHovered(!1);const r=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(r),this.beans.eventSvc.dispatchEvent(r),super.destroy()}destroySecondPass(){var t;this.allRowGuis.length=0,(t=this.beans.editSvc)==null||t.stopRowEditing(this);const e=r=>(r.list.forEach(n=>n.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),t.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e,editSvc:t}=this.beans,r=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);r!==this.rowFocused&&(this.rowFocused=r,this.setFocusedClasses()),!r&&this.editing&&(t==null||t.stopRowEditing(this,!1))}onPaginationChanged(){var t;const e=((t=this.beans.pagination)==null?void 0:t.getCurrentPage())??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const r=this.beans.pageBounds.getPixelOffset();return e+r*(t?1:-1)}setRowTop(e){if(!this.printLayout&&qe(e)){const t=this.applyPaginationOffset(e),i=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(i)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let r;if(t.sticky)r=t.stickyRowTop;else{const n=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,i=this.applyPaginationOffset(n);r=t.isRowPinned()?i:this.beans.rowContainerHeight.getRealPixelPosition(i)}return r+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getCellCtrl(e,t=!1){let r=null;return this.getAllCellCtrls().forEach(n=>{n.column==e&&(r=n)}),r!=null||t||this.getAllCellCtrls().forEach(n=>{n.getColSpanningList().indexOf(e)>=0&&(r=n)}),r}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){var o,s;const t=this.rowNode.getRowIndexString();if(t===null)return;const r=(((o=this.beans.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:o.getRowCount())??0)+(((s=this.beans.filterManager)==null?void 0:s.getHeaderRowCount())??0),n=this.rowNode.rowIndex%2===0,i=r+this.rowNode.rowIndex+1;this.forEachGui(e,a=>{a.rowComp.setRowIndex(t),a.rowComp.addOrRemoveCssClass("ag-row-even",n),a.rowComp.addOrRemoveCssClass("ag-row-odd",!n),u5(a.element,i)})}};function _5(e){var r;return e.altKey||e.ctrlKey||e.metaKey?!1:((r=e.key)==null?void 0:r.length)===1}function BG(e,t,r,n,i){const o=n?n.getColDef().suppressKeyboardEvent:void 0;if(!o)return!1;const s=e.addGridCommonParams({event:t,editing:i,column:n,node:r,data:r.data,colDef:n.getColDef()});return!!(o&&o(s))}var m7e=65,v7e=67,y7e=86,C7e=68,b7e=90,S7e=89;function w7e(e){const{keyCode:t}=e;let r;switch(t){case m7e:r=fe.A;break;case v7e:r=fe.C;break;case y7e:r=fe.V;break;case C7e:r=fe.D;break;case b7e:r=fe.Z;break;case S7e:r=fe.Y;break;default:r=e.code}return r}var x7e=class extends xe{constructor(e){super(),this.element=e}postConstruct(){var e;this.addKeyboardListeners(),this.addMouseListeners(),(e=this.beans.touchSvc)==null||e.mockRowContextMenu(this)}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",Dhe("touchstart")?"touchstart":"mousedown"].forEach(r=>{const n=this.processMouseEvent.bind(this,r);this.addManagedElementListeners(this.element,{[r]:n})})}processMouseEvent(e,t){var i;if(!HM(this.gos,t)||_a(t))return;const{cellCtrl:r,rowCtrl:n}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(r!=null&&r.column&&r.dispatchCellContextMenuEvent(t),(i=this.beans.contextMenuSvc)==null||i.handleContextMenuMouseEvent(t,void 0,n,r)):(r&&r.onMouseEvent(e,t),n&&n.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:M5(t,e),rowCtrl:Ahe(t,e,P0)}}processKeyboardEvent(e,t){const{cellCtrl:r,rowCtrl:n}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(r?this.processCellKeyboardEvent(r,e,t):n&&n.isFullWidth()&&this.processFullWidthRowKeyboardEvent(n,e,t))}processCellKeyboardEvent(e,t,r){var a;const{rowNode:n,column:i,editing:o}=e;!BG(this.gos,r,n,i,o)&&t==="keydown"&&(!o&&((a=this.beans.navigation)!=null&&a.handlePageScrollingKey(r))||e.onKeyDown(r),this.doGridOperations(r,e.editing),_5(r)&&e.processCharacter(r)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(r,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,r){const{rowNode:n}=e,{focusSvc:i,navigation:o}=this.beans,s=i.getFocusedCell(),a=s&&s.column;if(!BG(this.gos,r,n,a,!1)){const c=r.key;if(t==="keydown")switch(c){case fe.PAGE_HOME:case fe.PAGE_END:case fe.PAGE_UP:case fe.PAGE_DOWN:o==null||o.handlePageScrollingKey(r,!0);break;case fe.UP:case fe.DOWN:e.onKeyboardNavigate(r);break;case fe.TAB:e.onTabKeyDown(r);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",r))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!HM(this.gos,e))return;const r=w7e(e),{clipboardSvc:n,undoRedo:i}=this.beans;if(r===fe.A)return this.onCtrlAndA(e);if(r===fe.C)return this.onCtrlAndC(n,e);if(r===fe.D)return this.onCtrlAndD(n,e);if(r===fe.V)return this.onCtrlAndV(n,e);if(r===fe.X)return this.onCtrlAndX(n,e);if(r===fe.Y)return this.onCtrlAndY(i);if(r===fe.Z)return this.onCtrlAndZ(i,e)}onCtrlAndA(e){const{beans:{pinnedRowModel:t,rowModel:r,visibleCols:n,rangeSvc:i,selectionSvc:o},gos:s}=this;if(i&&xs(s)&&r.isRowsToRender()){const[a,l]=[(t==null?void 0:t.isEmpty("top"))??!0,(t==null?void 0:t.isEmpty("bottom"))??!0],c=a?null:"top";let u,d;l?(u=null,d=r.getRowCount()-1):(u="bottom",d=(t==null?void 0:t.getPinnedBottomRowCount())??-1);const h=n.allCols;if(!(h!=null&&h.length))return;i.setCellRange({rowStartIndex:0,rowStartPinned:c,rowEndIndex:d,rowEndPinned:u,columnStart:h[0],columnEnd:er(h)})}else o&&(o==null||o.selectAllRowNodes({source:"keyboardSelectAll",selectAll:Rhe(s)}));e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:r,rowCtrl:n}=this.getControlsForEventTarget(t.target);r!=null&&r.editing||n!=null&&n.editing||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:r,rowCtrl:n}=this.getControlsForEventTarget(t.target);r!=null&&r.editing||n!=null&&n.editing||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:r,rowCtrl:n}=this.getControlsForEventTarget(t.target);r!=null&&r.editing||n!=null&&n.editing||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e==null||e.redo("ui")}},Ppe=class extends xe{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,r=t!=null?`${t}px`:"";this.eContainer.style.height=r,this.eViewport&&(this.eViewport.style.height=r)}},dE=e=>e.topRowCtrls,hE=e=>e.getStickyTopRowCtrls(),pE=e=>e.getStickyBottomRowCtrls(),fE=e=>e.bottomRowCtrls,gE=e=>e.allRowCtrls,T7e={center:{type:"center",container:"ag-center-cols-container",viewport:"ag-center-cols-viewport",getRowCtrls:gE},left:{type:"left",container:"ag-pinned-left-cols-container",pinnedType:"left",getRowCtrls:gE},right:{type:"right",container:"ag-pinned-right-cols-container",pinnedType:"right",getRowCtrls:gE},fullWidth:{type:"fullWidth",container:"ag-full-width-container",fullWidth:!0,getRowCtrls:gE},topCenter:{type:"center",container:"ag-floating-top-container",viewport:"ag-floating-top-viewport",getRowCtrls:dE},topLeft:{type:"left",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:dE},topRight:{type:"right",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:dE},topFullWidth:{type:"fullWidth",container:"ag-floating-top-full-width-container",fullWidth:!0,getRowCtrls:dE},stickyTopCenter:{type:"center",container:"ag-sticky-top-container",viewport:"ag-sticky-top-viewport",getRowCtrls:hE},stickyTopLeft:{type:"left",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:hE},stickyTopRight:{type:"right",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:hE},stickyTopFullWidth:{type:"fullWidth",container:"ag-sticky-top-full-width-container",fullWidth:!0,getRowCtrls:hE},stickyBottomCenter:{type:"center",container:"ag-sticky-bottom-container",viewport:"ag-sticky-bottom-viewport",getRowCtrls:pE},stickyBottomLeft:{type:"left",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:pE},stickyBottomRight:{type:"right",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:pE},stickyBottomFullWidth:{type:"fullWidth",container:"ag-sticky-bottom-full-width-container",fullWidth:!0,getRowCtrls:pE},bottomCenter:{type:"center",container:"ag-floating-bottom-container",viewport:"ag-floating-bottom-viewport",getRowCtrls:fE},bottomLeft:{type:"left",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:fE},bottomRight:{type:"right",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:fE},bottomFullWidth:{type:"fullWidth",container:"ag-floating-bottom-full-width-container",fullWidth:!0,getRowCtrls:fE}};function yg(e){return T7e[e]}var E7e=["topCenter","topLeft","topRight"],R7e=["bottomCenter","bottomLeft","bottomRight"],P7e=["center","left","right"],M7e=["center","left","right","fullWidth"],I7e=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],D7e=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],A7e=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],Mpe=["stickyTopCenter","stickyTopLeft","stickyTopRight"],Ipe=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],F7e=[...Mpe,"stickyTopFullWidth",...Ipe,"stickyBottomFullWidth"],L7e=[...E7e,...R7e,...P7e,...Mpe,...Ipe],Dpe=class extends xe{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=yg(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new p7e(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,r){this.comp=e,this.eContainer=t,this.eViewport=r,this.createManagedBean(new x7e(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:n,rangeSvc:i}=this.beans,o=()=>this.onPinnedWidthChanged();this.forContainers(D7e,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(n==null?void 0:n.createPinnedWidthFeature(this.eContainer,!0)),this.addManagedEventListeners({leftPinnedWidthChanged:o})}),this.forContainers(A7e,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(n==null?void 0:n.createPinnedWidthFeature(this.eContainer,!1)),this.addManagedEventListeners({rightPinnedWidthChanged:o})}),this.forContainers(M7e,()=>this.createManagedBean(new Ppe(this.eContainer,this.name==="center"?r:void 0))),i&&this.forContainers(L7e,()=>this.createManagedBean(i.createDragListenerFeature(this.eContainer))),this.forContainers(I7e,()=>this.createManagedBean(new F5(s=>this.comp.setContainerWidth(`${s}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsChanged.bind(this),displayedRowsChanged:e=>this.onDisplayedRowsChanged(e.afterScroll)}),this.onDisplayedColumnsChanged(),this.onDisplayedRowsChanged()}listenOnDomOrder(){if(F7e.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const r=this.gos.get("ensureDomOrder"),n=wo(this.gos,"print");this.comp.setDomOrder(r||n)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=r=>{e.dragging&&r.cancelable&&r.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),r=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,r,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return Gy(this.eViewport)}getCenterViewportScrollLeft(){return IM(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=ka(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return lhe(this.eViewport)}getViewportScrollLeft(){return IM(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||tUe(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){DM(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const r=wo(this.gos,"print"),i=this.gos.get("embedFullWidthRows")||r,o=t.filter(s=>{const a=s.isFullWidth();return this.options.fullWidth?!i&&a:i||!a});this.comp.setRowCtrls({rowCtrls:o,useFlushSync:e})}},Ape="ag-force-vertical-scroll",_7e="ag-selectable",O7e="ag-column-moving",Fpe=class extends xe{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,r,n,i,o,s){var a,l;this.comp=e,this.eGridBody=t,this.eBodyViewport=r,this.eTop=n,this.eBottom=i,this.eStickyTop=o,this.eStickyBottom=s,this.eCenterColsViewport=r.querySelector(`.${yg("center").viewport}`),this.eFullWidthContainer=r.querySelector(`.${yg("fullWidth").container}`),this.eStickyTopFullWidthContainer=o.querySelector(`.${yg("stickyTopFullWidth").container}`),this.eStickyBottomFullWidthContainer=s.querySelector(`.${yg("stickyBottomFullWidth").container}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",c=>this.setCellTextSelection(c.currentValue)),this.createManagedBean(new A5(this.comp)),this.scrollFeature=this.createManagedBean(new h7e(this.eBodyViewport)),(a=this.beans.rowDragSvc)==null||a.setupRowDrag(this.eBodyViewport,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([n,r,i,o,s]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),(l=this.filterManager)==null||l.setupAdvFilterHeaderComp(n),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t}),this.addManagedPropertyListener("treeData",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const r=t&&e.getScrollbarWidth()||0,n=ihe()?16:0,i=`calc(100% + ${r+n}px)`;bl(this.beans,()=>this.comp.setBodyViewportWidth(i)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t}=this;let r=this.gos.get("treeData");if(!r){const n=t.isPivotMode();r=(e?e.columns.length:0)>=(n?2:1)}this.comp.setGridRootRole(r?"treegrid":"grid")}addFocusListeners(e){e.forEach(t=>{this.addManagedElementListeners(t,{focusin:r=>{const{target:n}=r,i=Lg(n,"ag-root",t);t.classList.toggle("ag-has-focus",!i)},focusout:r=>{const{target:n,relatedTarget:i}=r,o=t.contains(i),s=Lg(i,"ag-root",t);Lg(n,"ag-root",t)||(!o||s)&&t.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(O7e,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(_7e,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){var e;(e=this.beans.editSvc)==null||e.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){var i,o;const e=(((i=this.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:i.getRowCount())??0)+(((o=this.filterManager)==null?void 0:o.getHeaderRowCount())??0),{rowModel:t}=this.beans,r=t.isLastRowIndexKnown()?t.getRowCount():-1,n=r===-1?-1:e+r;this.comp.setRowCount(n)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?Ape:null,r=wo(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||r&&rUe(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let r=t.sizesMeasured;const n=()=>{const i=r&&yy(this.gos)&&!e.stretching,o=i?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(o,i)};n(),this.addManagedEventListeners({heightScaleChanged:n}),this.addManagedPropertyListener("animateRows",n),this.addManagedEventListeners({gridStylesChanged:()=>{!r&&t.sizesMeasured&&(r=!0,n())}})}addBodyViewportListener(){const{popupSvc:e,touchSvc:t}=this.beans,r=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(this.eBodyViewport,{contextmenu:r}),t==null||t.mockBodyContextMenu(this,r),this.addManagedElementListeners(this.eBodyViewport,{wheel:this.onBodyViewportWheel.bind(this,e)}),this.addManagedElementListeners(this.eStickyTop,{wheel:this.onStickyWheel.bind(this)}),this.addManagedElementListeners(this.eStickyBottom,{wheel:this.onStickyWheel.bind(this)}),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:r,shiftKey:n}=e;(n||Math.abs(t)>Math.abs(r))&&HM(this.gos,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaX:t,deltaY:r,shiftKey:n}=e,i=n||Math.abs(t)>Math.abs(r),o=e.target;i?(this.eStickyTopFullWidthContainer.contains(o)||this.eStickyBottomFullWidthContainer.contains(o))&&this.scrollGridBodyToMatchEvent(e):(e.preventDefault(),this.scrollVertically(r))}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:r}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||r})}onBodyViewportContextMenu(e,t,r){var i;if(!e&&!r)return;this.gos.get("preventDefaultOnContextMenu")&&(e||r).preventDefault();const{target:n}=e||t;(n===this.eBodyViewport||n===this.ctrlsSvc.get("center").eViewport)&&((i=this.beans.contextMenuSvc)==null||i.showContextMenu({mouseEvent:e,touchEvent:r,value:null,anchorToElement:this.eGridBody}))}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e!=null&&e.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e}=this,t=(e==null?void 0:e.getPinnedTopTotalHeight())??0,r=(e==null?void 0:e.getPinnedBottomTotalHeight())??0;this.comp.setTopHeight(t),this.comp.setBottomHeight(r),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(r?"inherit":"none"),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){var i,o;const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(((i=this.filterManager)==null?void 0:i.getHeaderHeight())??0),r=((o=this.pinnedRowModel)==null?void 0:o.getPinnedTopTotalHeight())??0;let n=0;t>0&&(n+=t),r>0&&(n+=r),n>0&&(n+=1),this.comp.setStickyTopTop(`${n}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:r}=this,n=(e==null?void 0:e.getPinnedBottomTotalHeight())??0,o=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,s=n+o;r.setStickyBottomBottom(`${s}px`)}},Lpe=class extends Xe{constructor(e,t){super(),this.direction=t,this.eViewport=Ce,this.eContainer=Ce,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",rhe()||lp())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=ihe(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0),r=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:r,touchend:r})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),bl(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;ghe(()=>us(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},_pe=class extends Lpe{constructor(){super(``,"horizontal"),this.eLeftSpacer=Ce,this.eRightSpacer=Ce,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new F5(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){var t;if(!this.invisibleScrollbar)return;const e=((t=this.beans.pinnedRowModel)==null?void 0:t.getPinnedBottomTotalHeight())??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const r=!this.enableRtl&&e,n=this.scrollVisibleSvc.getScrollbarWidth();r&&(t+=n),ec(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=n);let i=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(i+=n),ec(this.eLeftSpacer,i),this.eLeftSpacer.classList.toggle("ag-scroller-corner",i<=n)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,r=this.gos.get("suppressHorizontalScroll"),n=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,o=r?0:n===0&&t?16:n,s=()=>{this.setScrollVisibleDebounce=0,this.addOrRemoveCssClass("ag-scrollbar-invisible",t),Iw(this.getGui(),o),Iw(this.eViewport,o),Iw(this.eContainer,o),this.setDisplayed(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(s,100):s()}getScrollPosition(){return IM(this.eViewport,this.enableRtl)}setScrollPosition(e){us(this.eViewport)||this.attemptSettingScrollPosition(e),DM(this.eViewport,e,this.enableRtl)}},k7e={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:_pe},Ope=class extends Lpe{constructor(){super(``,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new Ppe(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,r=this.invisibleScrollbar,n=t&&e.getScrollbarWidth()||0,i=n===0&&r?16:n;this.addOrRemoveCssClass("ag-scrollbar-invisible",r),ec(this.getGui(),i),ec(this.eViewport,i),ec(this.eContainer,i),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const r=e.getGridBodyCtrl().eBodyViewport,n=this.getScrollPosition(),i=r.scrollTop;n!=i&&this.setScrollPosition(i,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!us(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},N7e={selector:"AG-FAKE-VERTICAL-SCROLL",component:Ope};function kpe(e){return e.cols?e.cols.treeDepth+1:-1}function ad(e){var t;return((t=e.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:t.getRowCount())??0}function O5(e){const t=[],r=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const n of r){if(!n)continue;const i=n.getGroupRowCount()||0;for(let o=0;oa)&&(t[o]=l)}}}return t}function B7e(e,t){const r=e.colModel.isPivotMode()?G7e(e):Npe(e);let n=0;const i=t.getHeaderCtrls();for(const o of i){const{column:s}=o;if(s.isAutoHeaderHeight()){const a=s.getAutoHeaderHeight();a!=null&&a>n&&(n=a)}}return Math.max(r,n)}function k5(e){const t=e.colModel.isPivotMode()?$7e(e):Jx(e),n=e.visibleCols.allCols.filter(i=>i.isAutoHeaderHeight()).map(i=>i.getAutoHeaderHeight()||0);return Math.max(t,...n)}function Jx(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function N5(e){return e.gos.get("floatingFiltersHeight")??Jx(e)}function Npe(e){return e.gos.get("groupHeaderHeight")??Jx(e)}function $7e(e){return e.gos.get("pivotHeaderHeight")??Jx(e)}function G7e(e){return e.gos.get("pivotGroupHeaderHeight")??Npe(e)}var Bpe=class extends xe{setComp(e,t,r){this.comp=e,this.eGui=t;const{beans:n}=this,{headerNavigation:i,touchSvc:o,ctrlsSvc:s}=n;i&&this.createManagedBean(new Wp(r,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,n),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,n)}),this.onPivotModeChanged(n),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),o==null||o.mockHeaderContextMenu(this,a),s.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({displayedColumnsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>bl(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){var o;const{beans:e}=this;let t=0;const r=O5(e).reduce((s,a)=>s+a,0),n=k5(e);if((o=e.filterManager)!=null&&o.hasFloatingFilters()&&(t+=N5(e)),t+=r,t+=n,this.headerHeight===t)return;this.headerHeight=t;const i=`${t+1}px`;this.comp.setHeightAndMinHeight(i),this.eventSvc.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",t),this.comp.addOrRemoveCssClass("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const r=e.visibleCols.allCols.some(n=>n.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",r)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),r=e.shiftKey,n=r!==t?"LEFT":"RIGHT",{beans:i}=this,{headerNavigation:o,focusSvc:s}=i;(o.navigateHorizontally(n,!0,e)||!r&&s.focusOverlay(!1)||Id(i,r,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:r}=this.beans;switch(e.key){case fe.LEFT:t="LEFT";case fe.RIGHT:{qe(t)||(t="RIGHT"),r.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case fe.UP:t="UP";case fe.DOWN:{qe(t)||(t="DOWN"),r.navigateVertically(t,null,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:r,beans:n}=this;!t&&r.contains(Br(n))||r.contains(t)||(n.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,r){var s;const{menuSvc:n,ctrlsSvc:i}=this.beans;if(!e&&!r||!(n!=null&&n.isHeaderContextMenuEnabled()))return;const{target:o}=e??t;(o===this.eGui||o===((s=i.getHeaderRowContainerCtrl())==null?void 0:s.eViewport))&&n.showHeaderContextMenu(void 0,e,r)}},B5=class extends Xe{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},V7e=class extends B5{constructor(t){super(`
`,t),this.eResize=Ce,this.eHeaderCompWrapper=Ce,this.headerCompVersion=0}postConstruct(){const t=this.getGui();((o,s)=>{s!=null&&s!=""?t.setAttribute(o,s):t.removeAttribute(o)})("col-id",this.ctrl.column.getColId());const n={setWidth:o=>t.style.width=o,addOrRemoveCssClass:(o,s)=>this.addOrRemoveCssClass(o,s),setAriaSort:o=>o?Zde(t,o):Jde(t),setUserCompDetails:o=>this.setUserCompDetails(o),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(n,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0);const i=this.ctrl.getSelectAllGui();i&&this.eResize.insertAdjacentElement("afterend",i)}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(t){this.headerCompVersion++;const r=this.headerCompVersion;t.newAgStackInstance().then(n=>this.afterCompCreated(r,n))}afterCompCreated(t,r){if(t!=this.headerCompVersion||!this.isAlive()){this.destroyBean(r);return}this.destroyHeaderComp(),this.headerComp=r,this.headerCompGui=r.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},z7e=class extends B5{constructor(t){super(`
`,t),this.eResize=Ce,this.eHeaderCompWrapper=Ce}postConstruct(){const t=this.getGui(),r=(i,o)=>o!=null?t.setAttribute(i,o):t.removeAttribute(i);t.setAttribute("col-id",this.ctrl.column.getUniqueId());const n={addOrRemoveCssClass:(i,o)=>this.addOrRemoveCssClass(i,o),setHeaderWrapperHidden:i=>{i?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:i=>{i!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${i}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",i!=null)},setResizableDisplayed:i=>Et(this.eResize,i),setWidth:i=>t.style.width=i,setAriaExpanded:i=>r("aria-expanded",i),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(n,t,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(t){t.newAgStackInstance().then(r=>this.afterHeaderCompCreated(r))}afterHeaderCompCreated(t){const r=()=>this.destroyBean(t);if(!this.isAlive()){r();return}const n=this.getGui(),i=t.getGui();this.eHeaderCompWrapper.appendChild(i),this.addDestroyFunc(r),this.headerGroupComp=t,this.ctrl.setDragSource(n)}addOrRemoveHeaderWrapperStyle(t,r){const{eHeaderCompWrapper:n}=this;r?n.style.setProperty(t,r):n.style.removeProperty(t)}},H7e=class extends B5{constructor(t){super(`
`,t),this.eFloatingFilterBody=Ce,this.eButtonWrapper=Ce,this.eButtonShowMainFilter=Ce}postConstruct(){const t=this.getGui(),r={addOrRemoveCssClass:(n,i)=>this.addOrRemoveCssClass(n,i),addOrRemoveBodyCssClass:(n,i)=>this.eFloatingFilterBody.classList.toggle(n,i),setButtonWrapperDisplayed:n=>Et(this.eButtonWrapper,n),setCompDetails:n=>this.setCompDetails(n),getFloatingFilterComp:()=>this.compPromise,setWidth:n=>t.style.width=n,setMenuIcon:n=>this.eButtonShowMainFilter.appendChild(n)};this.ctrl.setComp(r,t,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(t){if(!t){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=t.newAgStackInstance(),this.compPromise.then(r=>this.afterCompCreated(r))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(t){if(t){if(!this.isAlive()){this.destroyBean(t);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=t,this.eFloatingFilterBody.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached()}}},W7e=class extends Xe{constructor(t){super(),this.headerComps={},this.ctrl=t,this.setTemplate(`
`)}postConstruct(){u5(this.getGui(),this.ctrl.getAriaRowIndex());const t={setHeight:r=>this.getGui().style.height=r,setTop:r=>this.getGui().style.top=r,setHeaderCtrls:(r,n)=>this.setHeaderCtrls(r,n),setWidth:r=>this.getGui().style.width=r};this.ctrl.setComp(t,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(t,r){if(!this.isAlive())return;const n=this.headerComps;if(this.headerComps={},t.forEach(i=>{const o=i.instanceId;let s=n[o];delete n[o],s==null&&(s=this.createHeaderComp(i),this.getGui().appendChild(s.getGui())),this.headerComps[o]=s}),Object.values(n).forEach(i=>{this.getGui().removeChild(i.getGui()),this.destroyBean(i)}),r){const i=Object.values(this.headerComps);i.sort((s,a)=>{const l=s.getCtrl().column.getLeft(),c=a.getCtrl().column.getLeft();return l-c});const o=i.map(s=>s.getGui());uhe(this.getGui(),o)}}createHeaderComp(t){let r;switch(this.ctrl.type){case"group":r=new z7e(t);break;case"filter":r=new H7e(t);break;default:r=new V7e(t);break}return this.createBean(r),r.setParentComponent(this),r}},$5=class extends xe{constructor(e,t,r,n){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=n,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=r}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?er(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,r=e.get("suppressColumnMoveAnimation"),n=qe(this.columnOrGroup.getOldLeft());(t==null?void 0:t.isActive())&&n&&!r?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),r=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=r,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===r&&this.setLeft(r)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:r,visibleCols:n}=this.beans;if(!wo(r,"print")||e.getPinned()==="left")return t;const o=n.getColsLeftWidth();if(e.getPinned()==="right"){const s=n.bodyWidth;return o+s+t}return o+t}setLeft(e){if(qe(e)&&(this.eCell.style.left=`${e}px`),li(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&Xde(this.ariaEl,t.length)}}},U7e=0,$pe="headerCtrl",G5=class extends xe{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.instanceId=e.getUniqueId()+"-"+U7e++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}shouldStopEventPropagation(e){const{headerRowIndex:t,column:r}=this.beans.focusSvc.focusedHeader,n=r.getDefinition(),i=n&&n.suppressHeaderKeyboardEvent;if(!qe(i))return!1;const o=this.gos.addGridCommonParams({colDef:n,column:r,headerRowIndex:t,event:e});return!!i(o)}getWrapperHasFocus(){return Br(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:r,compBean:n}=e,{beans:i}=this,o=d=>{if(!this.isAlive()||!n.isAlive())return;const{paddingTop:h,paddingBottom:p,borderBottomWidth:f,borderTopWidth:g}=Tm(this.eGui),m=h+p+f+g,b=t.offsetHeight+m;if(d<5){const S=hn(i),x=!S||!S.contains(t),T=b==0;if(x||T){bl(i,()=>o(d+1));return}}this.setColHeaderHeight(this.column,b)};let s=!1,a;const l=()=>{const d=this.column.isAutoHeaderHeight();d&&!s&&c(),!d&&s&&u()},c=()=>{s=!0,o(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),a=ka(this.beans,t,()=>o(0))},u=()=>{s=!1,a&&a(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),a=void 0};l(),n.addDestroyFunc(()=>u()),n.addManagedListeners(this.column,{widthChanged:()=>s&&o(0)}),n.addManagedEventListeners({sortChanged:()=>{s&&window.setTimeout(()=>o(0))}}),r&&r(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:r,eGui:n}=this;!e||!t||!n||(lpe(e,t,r.visibleCols),d5(n,r.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=Cy(this.beans);this.eGui&&pl(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){var o;const t=Br(this.beans),r=e.key===fe.LEFT||e.key===fe.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||r)&&(e.preventDefault(),e.stopImmediatePropagation()),!r))return;const i=e.key===fe.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const s=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(s,e.shiftKey),(o=this.resizeFeature)==null||o.toggleColumnResizing(!0)}else this.moveHeader(i)}moveHeader(e){var t;(t=this.beans.colMoves)==null||t.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:r}=this.beans;return r?r.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:r}=this;let n=e.key===fe.LEFT!==t.get("enableRtl");const i=r.getPinned(),o=t.get("enableRtl");return i&&o!==(i==="right")&&(n=!n),(n?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{var e;(e=this.resizeFeature)==null||e.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case fe.PAGE_DOWN:case fe.PAGE_UP:case fe.PAGE_HOME:case fe.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=$pe,{eGui:r,gos:n}=this;em(n,r,t,this),e.addDestroyFunc(()=>em(n,r,t,null))}focus(e){const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus(),!0):!1}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){var e;this.dragSource&&((e=this.beans.dragAndDrop)==null||e.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,r){const n=e??t,{menuSvc:i,gos:o}=this.beans;o.get("preventDefaultOnContextMenu")&&n.preventDefault(),i!=null&&i.isHeaderContextMenuEnabled(r)&&i.showHeaderContextMenu(r,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",r)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:r}=this;e.isColumn?r.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):r.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},j7e=class extends G5{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}setComp(e,t,r,n,i){this.comp=e;const{colResize:o,context:s,colHover:a}=this.beans,l=Xx(this,s,i);this.setGui(t,l),this.updateState(),this.setupWidth(l),this.setupMovingCss(l),this.setupMenuClass(l),this.setupSortableClass(l),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:n,checkMeasuringCallback:u=>this.setRefreshFunction("measuring",u),compBean:l}),this.addColumnHoverListener(l),this.setupFilterClass(l),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(l),this.setupSelectAll(l),this.setupUserComp(),this.refreshAria(),o?this.resizeFeature=l.createManagedBean(o.createResizeFeature(this.rowCtrl.pinned,this.column,r,e,this)):Et(r,!1),a==null||a.createHoverFeature(l,[this.column],t),l.createManagedBean(new $5(this.column,t,this.beans)),l.createManagedBean(new Wp(t,{shouldStopEventPropagation:u=>this.shouldStopEventPropagation(u),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(l),l.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],()=>this.refresh()),l.addManagedListeners(this.column,{colDefChanged:()=>this.refresh()}),l.addManagedListeners(this.column,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const c=()=>this.checkDisplayName();l.addManagedEventListeners({columnValueChanged:c,columnRowGroupChanged:c,columnPivotChanged:c,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),l.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){var r;(r=this.beans.colResize)==null||r.resizeHeader(this.column,e,t)}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return g8e(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:r,gos:n}=this.beans;return n.addGridCommonParams({column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!(e!=null&&e.isHeaderFilterButtonEnabled(this.column)),enableFilterIcon:!!r&&(!this.openFilterEnabled||bo(this.gos)),showColumnMenu:o=>{e==null||e.showColumnMenu({column:this.column,buttonElement:o,positionBy:"button"})},showColumnMenuAfterMouseClick:o=>{e==null||e.showColumnMenu({column:this.column,mouseEvent:o,positionBy:"mouse"})},showFilter:o=>{e==null||e.showFilterMenu({column:this.column,buttonElement:o,containerType:"columnFilter",positionBy:"button"})},progressSort:o=>{t==null||t.progressSort(this.column,!!o,"uiColumnSorted")},setSort:(o,s)=>{t==null||t.setSortForColumn(this.column,o,!!s,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(o,s)=>{n.assertModuleRegistered("Tooltip",3),this.setupTooltip(o,s)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature.setComp(this))}getSelectAllGui(){var e;return(e=this.selectAllFeature)==null?void 0:e.getCheckboxGui()}handleKeyDown(e){var t;super.handleKeyDown(e),e.key===fe.SPACE&&((t=this.selectAllFeature)==null||t.onSpaceKeyDown(e)),e.key===fe.ENTER&&this.onEnterKeyDown(e),e.key===fe.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){var t;e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&((t=this.beans.sortSvc)==null||t.progressSort(this.column,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const r=this.comp.getUserCompInstance();VY(r)&&r.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),pA()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){var r;this.tooltipFeature=(r=this.beans.tooltipSvc)==null?void 0:r.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),r=R5(t,this.gos,this.column,null),n=this.userHeaderClasses;this.userHeaderClasses=new Set(r),r.forEach(i=>{n.has(i)?n.delete(i):this.comp.addOrRemoveCssClass(i,!0)}),n.forEach(i=>this.comp.addOrRemoveCssClass(i,!1))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){var t;this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=((t=this.beans.colMoves)==null?void 0:t.setDragSourceForHeader(e,this.column,this.displayName))??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!(e!=null&&e.isColumnMenuInHeaderEnabled(this.column)),this.openFilterEnabled=!!(e!=null&&e.isFilterMenuInHeaderEnabled(this.column)),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),Object.values(this.refreshFunctions).forEach(e=>e())}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const r=this.column.getActualWidth();this.comp.setWidth(`${r}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const r=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",r),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,r=e===1;this.comp.addOrRemoveCssClass("ag-header-highlight-before",t),this.comp.addOrRemoveCssClass("ag-header-highlight-after",r)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:r,beans:n}=this,i=O5(this.beans),o=i.reduce((u,d)=>u+=d,0)===0;if(r.addOrRemoveCssClass("ag-header-parent-hidden",o),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),r.addOrRemoveCssClass("ag-header-span-height",!1),r.addOrRemoveCssClass("ag-header-span-total",!1);return}const{numberOfParents:s,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();r.addOrRemoveCssClass("ag-header-span-height",s>0);const l=k5(n);if(s===0){r.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}r.addOrRemoveCssClass("ag-header-span-total",a);let c=0;for(let u=0;ur==="filter"?-1:n.charCodeAt(0)-r.charCodeAt(0)).map(r=>this.ariaDescriptionProperties.get(r)).join(". ");(t=this.beans.ariaAnnounce)==null||t.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){var t;(t=this.beans.colHover)==null||t.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=i=>this.handleMouseOverChange(i.type==="mouseenter"),r=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column),n=i=>this.handleContextMenuMouseEvent(i,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:r,contextmenu:n})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return VY(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function VY(e){return typeof e.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var K7e=0,xO=class extends xe{constructor(e,t,r){super(),this.rowIndex=e,this.pinned=t,this.type=r,this.instanceId=K7e++;const n=r=="group"?"ag-header-row-column-group":r=="filter"?"ag-header-row-column-filter":"ag-header-row-column";this.headerRowClass=`ag-header-row ${n}`}postConstruct(){this.isPrintLayout=wo(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.getHeaderCellCtrls().every(e=>e.eGui!=null):!1}setComp(e,t,r=!0){this.comp=e,t=Xx(this,this.beans.context,t),r&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:r=>this.onVirtualColumnsChanged(r.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),e.addManagedPropertyListener("ensureDomOrder",r=>this.isEnsureDomOrder=r.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}getHeaderCellCtrl(e){if(this.headerCellCtrls){for(const t of this.headerCellCtrls.values())if(t.column===e)return t}}onDisplayedColumnsChanged(){this.isPrintLayout=wo(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){const{filterManager:e}=this.beans,t=[],r=O5(this.beans),n=k5(this.beans);t.push(...r),t.push(n),e!=null&&e.hasFloatingFilters()&&t.push(N5(this.beans));let i=0;for(let s=0;s{const{focusSvc:i,visibleCols:o}=this.beans;return i.isHeaderWrapperFocused(n)?o.isVisible(n.column):!1};if(e)for(const[n,i]of e)r(i)?this.headerCellCtrls.set(n,i):this.destroyBean(i);return this.getHeaderCellCtrls()}getHeaderCellCtrls(){var e;return Array.from(((e=this.headerCellCtrls)==null?void 0:e.values())??[])}recycleAndCreateHeaderCtrls(e,t){if(!this.headerCellCtrls||e.isEmptyGroup())return;const r=e.getUniqueId();let n;if(t&&(n=t.get(r),t.delete(r)),n&&n.column!=e&&(this.destroyBean(n),n=void 0),n==null)switch(this.type){case"filter":{n=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":n=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:n=this.createBean(new j7e(e,this));break}this.headerCellCtrls.set(r,n)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(this.pinned!=null)return[];let e=[];const t=this.getActualDepth(),{colViewport:r}=this.beans;return["left",null,"right"].forEach(n=>{const i=r.getHeadersToRender(n,t);e=e.concat(i)}),e}getActualDepth(){return this.type=="filter"?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.colViewport.getHeadersToRender(this.pinned,this.getActualDepth())}findHeaderCellCtrl(e){if(!this.headerCellCtrls)return;const t=this.getHeaderCellCtrls();let r;return typeof e=="function"?r=t.find(e):r=t.find(n=>n.column==e),r}focusHeader(e,t){const r=this.findHeaderCellCtrl(e);return r?r.focus(t):!1}destroy(){var e;(e=this.headerCellCtrls)==null||e.forEach(t=>{this.destroyBean(t)}),this.headerCellCtrls=void 0,super.destroy()}},Gpe=class extends xe{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:r,ctrlsSvc:n,colModel:i,colMoves:o,filterManager:s}=this.beans;this.setupCenterWidth(),r==null||r.setupHeaderPinnedWidth(this),this.setupDragAndDrop(o,this.eViewport);const a=this.onDisplayedColumnsChanged.bind(this,s);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsChanged:a,advancedFilterEnabledChanged:a});const l=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;n.register(l,this),i.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,colModel:r,filterManager:n}=this.beans;let i=0;const o=t.getFocusHeaderToUseAfterRefresh(),s=()=>{const u=kpe(r)-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let d=0;d{const u=i++,d=!this.hidden&&(this.columnsRowCtrl==null||!e||this.columnsRowCtrl.rowIndex!==u);(d||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),d&&(this.columnsRowCtrl=this.createBean(new xO(u,this.pinned,"column")))},l=()=>{this.includeFloatingFilter=!!(n!=null&&n.hasFloatingFilters())&&!this.hidden;const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){u();return}const d=i++;if(this.filtersRowCtrl){const h=this.filtersRowCtrl.rowIndex!==d;(!e||h)&&u()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new xO(d,this.pinned,"filter")))};s(),a(),l();const c=this.getAllCtrls();this.comp.setCtrls(c),this.restoreFocusOnHeader(t,o)}getHeaderCtrlForColumn(e){var t;if(fu(e))return(t=this.columnsRowCtrl)==null?void 0:t.getHeaderCellCtrl(e);if(this.groupsRowCtrls.length!==0)for(let r=0;rthis.comp.setCenterWidth(`${e}px`),!0))}},q7e=class extends xe{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){const{enterpriseMenuFactory:t,filterMenuFactory:r}=this.beans,n=t&&bo(this.gos)?t:r;this.showColumnMenuCommon(n,e,e.containerType,!0)}showHeaderContextMenu(e,t,r){var n;(n=this.activeMenuFactory)==null||n.showMenuAfterContextMenuEvent(e,t,r)}hidePopupMenu(){var e,t;(e=this.beans.contextMenuSvc)==null||e.hideActiveMenu(),(t=this.activeMenuFactory)==null||t.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){var r;const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!((r=this.activeMenuFactory)!=null&&r.isMenuEnabled(e))&&(bo(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){var t;return!e.getColDef().suppressHeaderFilterButton&&!!((t=this.beans.filterManager)!=null&&t.isFilterAllowed(e))}isHeaderContextMenuEnabled(e){const t=e&&fu(e)?e.getColDef():e==null?void 0:e.getColGroupDef();return!(t!=null&&t.suppressHeaderContextMenu)&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(lp()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!bo(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){var t;return!!((t=this.beans.filterManager)!=null&&t.isFilterAllowed(e))&&!bo(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return bo(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,r,n){const{positionBy:i}=t,o=t.column;if(i==="button"){const{buttonElement:s}=t;e==null||e.showMenuAfterButtonClick(o,s,r,n)}else if(i==="mouse"){const{mouseEvent:s}=t;e==null||e.showMenuAfterMouseEvent(o,s,r,n)}else if(o){const s=this.beans,a=s.ctrlsSvc;a.getScrollFeature().ensureColumnVisible(o,"auto"),bl(s,()=>{var c;const l=(c=a.getHeaderRowContainerCtrl(o.getPinned()))==null?void 0:c.getHeaderCtrlForColumn(o);l&&(e==null||e.showMenuAfterButtonClick(o,l.getAnchorElementForMenu(n),r,!0))})}}};function UM(e,t,r){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",r))}var Vpe=class extends Xe{constructor(){super()}},Y7e=class extends Vpe{init(){var t;const e=Mi((t=this.gos.get("overlayLoadingTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??''),!e){const r=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=r("loadingOoo","Loading...")})}}},X7e=class extends Vpe{init(){var t;const e=Mi((t=this.gos.get("overlayNoRowsTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??''),!e){const r=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=r("noRowsToShow","No Rows To Show")})}}};function cp(e,t,r){const n=zt(e,t,r);if(n){const{className:o}=n;if(typeof o=="string"&&o.indexOf("ag-icon")>-1||typeof o=="object"&&o["ag-icon"])return n}const i=document.createElement("span");return i.appendChild(n),i}function zt(e,t,r){var o;let n=null;e==="smallDown"?we(262):e==="smallLeft"?we(263):e==="smallRight"&&we(264);const i=r&&r.getColDef().icons;if(i&&(n=i[e]),t.gos&&!n){const s=t.gos.get("icons");s&&(n=s[e])}if(n){let s;if(typeof n=="function")s=n();else if(typeof n=="string")s=n;else{we(38,{iconName:e});return}if(typeof s=="string")return ws(s);if(sA(s))return s;we(133,{iconName:e});return}else{const s=document.createElement("span"),a=t.registry.getIcon(e);a||(o=t.validation)==null||o.validateIcon(e);const l=a??e;return s.setAttribute("class",`ag-icon ag-icon-${l}`),s.setAttribute("unselectable","on"),Wn(s,"presentation"),s}}var Z7e=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}",J7e=class extends Xe{constructor(){super(),this.dragSource=null,this.eIcon=Ce,this.eLabel=Ce,this.registerCSS(Z7e)}postConstruct(){const e=t=>cp(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(`
`)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eIcon:r,dragSource:n,dropIconMap:i,gos:o}=this;Qr(r);let s=null;e||(e=n!=null&&n.getDefaultIconName?n.getDefaultIconName():"notAllowed"),s=i[e],r.classList.toggle("ag-shake-left-to-right",t),!(s===i.hide&&o.get("suppressDragLeaveHidesColumns"))&&s&&r.appendChild(s)}setLabel(e){this.eLabel.textContent=Cn(e)}},Q7e=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",V5=class extends Xe{constructor(e,t,r){super(t,r),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(Q7e)}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:r,labelAlignment:n,disabled:i}=this.config;i!=null&&this.setDisabled(i),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),r!=null&&this.setLabelWidth(r),this.setLabelAlignment(n||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;Qr(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(Et(t,!1),Wn(t,"presentation")):(Et(t,!0),Wn(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const r=this.getGui().classList;return r.toggle("ag-label-align-left",e==="left"),r.toggle("ag-label-align-right",e==="right"),r.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(AM(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return ol(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},zpe=class extends V5{constructor(e,t,r,n){super(e,t,r),this.className=n}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:r}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),r!=null&&this.onValueChange(r),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),r=this.getLabel();r==null||r==""||j6e(e)!==null?xp(e,""):xp(e,t??"")}setAriaLabel(e){return Un(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return ec(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}},Xh=class extends zpe{constructor(e,t,r="text",n="input"){super(e,(e==null?void 0:e.template)??`
`,[],t),this.inputType=r,this.displayFieldTag=n,this.eLabel=Ce,this.eWrapper=Ce,this.eInput=Ce}postConstruct(){super.postConstruct(),this.setInputType();const{eLabel:e,eWrapper:t,eInput:r,className:n}=this;e.classList.add(`${n}-label`),t.classList.add(`${n}-input-wrapper`),r.classList.add(`${n}-input`),this.addCssClass("ag-input-field"),r.id=r.id||`ag-${this.getCompId()}-input`;const{inputName:i,inputWidth:o}=this.config;i!=null&&this.setInputName(i),o!=null&&this.setInputWidth(o),this.addInputListeners(),this.activateTabIndex([r])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return AM(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return pl(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return Un(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return ol(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)pl(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";pl(this.eInput,"autocomplete",t)}return this}},Em=class extends Xh{constructor(e,t="ag-checkbox",r="checkbox"){super(e,t,r),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const r=this.eInput;r.checked=e,r.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,r){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:r});const n=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:n.id,name:n.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),r=this.selected=e.target.checked;this.refreshSelectedClass(r),this.dispatchChange(r,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},Sc={selector:"AG-CHECKBOX",component:Em},eje=".ag-checkbox-cell{height:100%}",tje=class extends Xe{constructor(){super(` `,[Sc]),this.eCheckbox=Ce,this.registerCSS(eje)}init(e){this.refresh(e);const{eCheckbox:t,beans:r}=this,n=t.getInputElement();n.setAttribute("tabindex","-1"),Ude(n,"polite"),this.addManagedListeners(n,{click:i=>{if(ci(i),t.isDisabled())return;const o=t.getValue();this.onCheckboxChanged(o)},dblclick:i=>{ci(i)}}),this.addManagedElementListeners(e.eGridCell,{keydown:i=>{if(i.key===fe.SPACE&&!t.isDisabled()){e.eGridCell===Br(r)&&t.toggle();const o=t.getValue();this.onCheckboxChanged(o),i.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,r=!0;const{value:n,column:i,node:o}=e;if(o.group&&i)if(typeof n=="boolean")t=n;else{const d=i.getColId();d.startsWith(Pp)?t=n==null||n===""?void 0:n==="true":o.aggData&&o.aggData[d]!==void 0?t=n??void 0:r=!1}else t=n??void 0;const{eCheckbox:s}=this;if(!r){s.setDisplayed(!1);return}s.setValue(t);const a=e.disabled??!(i!=null&&i.isCellEditable(o));s.setDisabled(a);const l=this.getLocaleTextFunc(),c=p5(l,t),u=a?c:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${c})`;s.setInputAriaLabel(u)}onCheckboxChanged(e){const{eventSvc:t,params:r}=this,{column:n,node:i,value:o}=r,s={column:n,colDef:n.getColDef(),data:i.data,node:i,rowIndex:i.rowIndex,rowPinned:i.rowPinned,value:o};t.dispatchEvent({type:"cellEditingStarted",...s});const a=i.setDataValue(n,e,"edit");t.dispatchEvent({type:"cellEditingStopped",...s,oldValue:o,newValue:e,valueChanged:a}),a||this.updateCheckbox(r)}},rje="ROOT_NODE_ID",Hpe=class extends xe{constructor(){super(...arguments),this.nextId=0,this.allNodesMap={},this.rootNode=null}get treeData(){return!1}getRowNode(e){return this.allNodesMap[e]}extractRowData(){var e,t;return(t=(e=this.rootNode)==null?void 0:e.allLeafChildren)==null?void 0:t.map(r=>r.data)}activate(e){this.rootNode=e,e.group=!0,e.level=-1,e.id=rje,e.allLeafChildren=[],e.childrenAfterGroup=[],e.childrenAfterSort=[],e.childrenAfterAggFilter=[],e.childrenAfterFilter=[],this.updateRootSiblingArrays(e)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(e){const t=this.rootNode;t&&(this.dispatchRowDataUpdateStartedEvent(e),t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(e),this.updateRootSiblingArrays(t))}updateRootSiblingArrays(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter,t.childrenAfterGroup=e.childrenAfterGroup,t.childrenAfterAggFilter=e.childrenAfterAggFilter,t.childrenAfterSort=e.childrenAfterSort,t.childrenMapped=e.childrenMapped,t.allLeafChildren=e.allLeafChildren)}loadNewRowData(e){this.rootNode.allLeafChildren=(e==null?void 0:e.map((t,r)=>this.createRowNode(t,r)))??[]}setImmutableRowData(e,t){const r=this.createTransactionForRowData(t),n=this.updateRowData(r,e.changedRowNodes);let i=!1;this.gos.get("suppressMaintainUnsortedOrder")||(i=this.updateRowOrderFromRowData(t));const{rowNodeTransaction:o,rowsInserted:s}=n,{add:a,remove:l,update:c}=o;(s||i||a.length||l.length||c.length)&&(e.step="group",e.rowDataUpdated=!0,e.rowNodeTransactions=[o],e.rowNodesOrderChanged=s||i)}updateRowData(e,t){this.dispatchRowDataUpdateStartedEvent(e.add);const r={changedRowNodes:t,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},n=[],i=Md(this.gos);return this.executeRemove(i,e,r,n),this.executeUpdate(i,e,r,n),this.executeAdd(e,r),this.deselectNodes(n),r}createTransactionForRowData(e){const t=Md(this.gos),r={...this.allNodesMap},n=[],i=[],o=[];qe(e)&&e.forEach(s=>{const a=t({data:s,level:0}),l=r[a];l?(l.data!==s&&i.push(s),r[a]=void 0):o.push(s)});for(const s of Object.values(r))s&&n.push(s.data);return{remove:n,update:i,add:o}}updateRowOrderFromRowData(e){var s;const t=(s=this.rootNode)==null?void 0:s.allLeafChildren,r=(t==null?void 0:t.length)??0,n=new Map;let i=-1,o=-1;for(let a=0;a0&&this.gos.get("treeData")&&this.gos.get("getDataPath")))for(let d=0;d{const h=this.lookupRowNode(e,d);h&&(h.isSelected()&&i.push(h),h.clearRowTopAndRowIndex(),s[h.id]=!0,delete this.allNodesMap[h.id],n.remove.push(h),r.remove(h))});const a=this.rootNode;a.allLeafChildren=((c=a.allLeafChildren)==null?void 0:c.filter(d=>!s[d.id]))??null,(u=a.allLeafChildren)==null||u.forEach((d,h)=>{d.sourceRowIndex=h});const l=a.sibling;l&&(l.allLeafChildren=a.allLeafChildren)}executeUpdate(e,t,{changedRowNodes:r,rowNodeTransaction:n},i){const{update:o}=t;o!=null&&o.length&&o.forEach(s=>{const a=this.lookupRowNode(e,s);a&&(a.updateData(s),!a.selectable&&a.isSelected()&&i.push(a),n.update.push(a),r.update(a))})}dispatchRowDataUpdateStartedEvent(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e!=null&&e.length?e[0]:null})}deselectNodes(e){var i;const t="rowDataChanged",r=this.beans.selectionSvc,n=e.length>0;n&&(r==null||r.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t})),(i=r==null?void 0:r.updateGroupsFromChildrenSelections)==null||i.call(r,t),n&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t})}sanitizeAddIndex(e){var r;const t=((r=this.rootNode.allLeafChildren)==null?void 0:r.length)??0;return e<0||e>=t||Number.isNaN(e)?t:Math.ceil(e)}createRowNode(e,t){const r=new aa(this.beans);return r.parent=this.rootNode,r.level=0,r.group=!1,r.expanded=!1,r.sourceRowIndex=t,r.setDataAndId(e,String(this.nextId)),this.allNodesMap[r.id]&&we(2,{nodeId:r.id}),this.allNodesMap[r.id]=r,this.nextId++,r}lookupRowNode(e,t){var n,i;let r;if(e){const o=e({data:t,level:0});if(r=this.allNodesMap[o],!r)return yr(4,{id:o}),null}else if(r=(i=(n=this.rootNode)==null?void 0:n.allLeafChildren)==null?void 0:i.find(o=>o.data===t),!r)return yr(5,{data:t}),null;return r||null}},Uc=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(Uc||{}),nje=class extends Xe{constructor(){super(` `,[Sc]),this.eCheckbox=Ce}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:r}=this,n=t.isSelected(),i=p5(e,n),[o,s]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(o,s);r.setValue(n,!0),r.setInputAriaLabel(`${a} (${i})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:ci,click:n=>{var i;ci(n),(i=this.beans.selectionSvc)==null||i.handleSelectionEvent(n,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:n,previousValue:i})=>{const o=typeof n=="object"?yO(n):void 0,s=typeof i=="object"?yO(i):void 0;o!==s&&this.onSelectableChanged()}),_G(this.gos)||typeof this.getIsVisible()=="function"){const n=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:n}),this.addManagedListeners(this.rowNode,{dataChanged:n,cellChanged:n}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:r,gos:n}=this;let i=t.selectable;const o=this.getIsVisible();if(i)if(typeof o=="function"){const l=r==null?void 0:r.callbackParams;if(!e)i=o({...l,node:t,data:t.data});else{const c=e.createColumnFunctionCallbackParams(t);i=o({...l,...c})}}else i=o??!1;const s=n.get("rowSelection");if(s&&typeof s!="string"?!yO(s):e==null?void 0:e.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!i),this.setVisible(!0),this.setDisplayed(!0);return}if(r!=null&&r.removeHidden){this.setDisplayed(i);return}this.setVisible(i)}getIsVisible(){var r,n;const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?_g(t):(n=(r=this.column)==null?void 0:r.getColDef())==null?void 0:n.checkboxSelection}},ije=class{constructor(e){this.rootId=null,this.endId=null,this.cachedRange=[],this.rowModel=e}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(){return this.rootId?this.rowModel.getRowNode(this.rootId)??null:null}getEnd(){return this.endId?this.rowModel.getRowNode(this.endId)??null:null}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const r=t[0].id===this.rootId,n=t.findIndex(i=>i.id===e.id);if(n>-1){const i=t.slice(0,n),o=t.slice(n+1);return this.setEndRange(e),r?{keep:i,discard:o}:{keep:o,discard:i}}else return{keep:t,discard:[]}}extend(e,t=!1){const r=this.getRoot();if(r==null){const i=this.getRange().slice();return t&&e.depthFirstSearch(o=>!o.group&&i.push(o)),i.push(e),this.setRoot(e),{keep:i,discard:[]}}const n=this.rowModel.getNodesInRangeForSelection(r,e);if(!n)return this.setRoot(e),{keep:[e],discard:[]};if(n.find(i=>i.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const i=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:i}}}},oje=class extends xe{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(Br(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new Em);this.cbSelectAll=t,t.addCssClass("ag-header-select-all"),Wn(t.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideSelectAll.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:this.onSelectionChanged.bind(this),paginationChanged:this.onSelectionChanged.bind(this),modelUpdated:this.onModelChanged.bind(this)}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(){this.isAlive()&&this.showOrHideSelectAll()}showOrHideSelectAll(){const e=this.isCheckboxSelection();this.cbSelectAllVisible=e,this.cbSelectAll.setDisplayed(e),e&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,r=this.cbSelectAll,n=t.getSelectAllState(e);r.setValue(n);const i=t.hasNodesToSelect(e);r.setDisabled(!i),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(){const e=this.getLocaleTextFunc(),{headerCellCtrl:t,cbSelectAll:r,cbSelectAllVisible:n}=this,o=r.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),s=e("ariaRowSelectAll","Press Space to toggle all rows selection");t.setAriaDescriptionProperty("selectAll",n?`${s} (${o})`:null),r.setInputAriaLabel(e("ariaHeaderSelection","Column with Header Selection")),t.announceAriaDescription()}checkSelectionType(e){return Rp(this.gos)?!0:(we(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:r}=this.beans;return wn(t)||To(t)?!0:(we(129,{feature:e,rowModel:r.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let r="uiSelectAll";t==="currentPage"?r="uiSelectAllCurrentPage":t==="filtered"&&(r="uiSelectAllFiltered");const n={source:r,selectAll:t},i=this.beans.selectionSvc;e?i.selectAllRowNodes(n):i.deselectAllRowNodes(n)}isCheckboxSelection(){var c;const{column:e,gos:t,beans:r}=this,n=t.get("rowSelection"),i=e.getColDef(),{headerCheckboxSelection:o}=i;let s=!1;const a=typeof n=="object";if(a){const u=iu(e),d=hA(e);(_M(n)==="autoGroupColumn"&&d||u&&((c=r.selectionColSvc)!=null&&c.isSelectionColumnEnabled()))&&(s=uP(n))}else typeof o=="function"?s=o(t.addGridCommonParams({column:e,colDef:i})):s=!!o;const l=a?"headerCheckbox":"headerCheckboxSelection";return s&&this.checkRightRowModelType(l)&&this.checkSelectionType(l)}getSelectAllMode(){const e=Rhe(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:r}=this.column.getColDef();return t?"currentPage":r?"filtered":"all"}},Wpe=class extends xe{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new ije(t.rowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const r=_G(e);r!==this.isRowSelectable&&(this.isRowSelectable=r,this.updateSelectable())}),this.isRowSelectable=_G(e)}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new nje}createSelectAllFeature(e){return new oje(e)}isMultiSelect(){return Rp(this.gos)}onRowCtrlSelected(e,t,r){const n=!!e.rowNode.isSelected();e.forEachGui(r,i=>{i.rowComp.addOrRemoveCssClass("ag-row-selected",n);const o=i.element;w0(o,n),o.contains(Br(this.beans))&&t(i)})}announceAriaRowSelection(e){var i;if(this.isRowSelectionBlocked(e))return;const t=e.isSelected();if(t&&!LY(this.gos))return;const n=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);(i=this.beans.ariaAnnounce)==null||i.announceValue(n,"rowSelection")}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e})}isRowSelectionBlocked(e){return!e.selectable||!!e.rowPinned||!Ma(this.gos)}updateRowSelectable(e,t){var n;const r=((n=this.isRowSelectable)==null?void 0:n.call(this,e))??!0;return this.setRowSelectable(e,r,t),r}setRowSelectable(e,t,r){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),r)return;if(tm(this.gos)){const i=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:i??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){var n;let t=!1,r=!1;if(!((n=e.childrenAfterGroup)!=null&&n.length))return e.selectable?e.__selected:null;for(let i=0;i{_5(r)&&r.key&&!e.test(r.key)&&r.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:r=>{var i;const n=(i=r.clipboardData)==null?void 0:i.getData("text");n&&n.split("").some(o=>!e.test(o))&&r.preventDefault()}})}},Pl={selector:"AG-INPUT-TEXT-FIELD",component:wc},cje=class extends Xh{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const r=super.setValue(e,t);return this.eInput.value=e,r}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},uje={selector:"AG-INPUT-TEXT-AREA",component:cje},vA=class extends wc{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const o=parseFloat(e.value),s=isNaN(o)?"":this.normalizeValue(o.toString());this.value!==s&&this.setValue(s)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:r,max:n,step:i}=this.config;typeof t=="number"&&this.setPrecision(t),typeof r=="number"&&this.setMin(r),typeof n=="number"&&this.setMax(n),typeof i=="number"&&this.setStep(i)}onWheel(e){Br(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){if(e==="")return"";this.precision!=null&&(e=this.adjustPrecision(e));const t=parseFloat(e),{min:r,max:n}=this;return r!=null&&tn&&(e=n.toString()),e}adjustPrecision(e,t){const r=this.precision;if(r==null)return e;if(t){const i=parseFloat(e).toFixed(r);return parseFloat(i).toString()}const n=String(e).split(".");if(n.length>1){if(n[1].length<=r)return e;if(r>0)return`${n[0]}.${n[1].slice(0,r)}`}return n[0]}setMin(e){return this.min===e?this:(this.min=e,pl(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,pl(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,pl(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(r=>super.setValue(r,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,r){if(qe(r)){let n=this.isScientificNotation(r);if(n&&this.eInput.validity.valid)return e(r);if(!n){r=this.adjustPrecision(r);const i=this.normalizeValue(r);n=r!=i}if(n)return t(r)}return e(r)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},yA={selector:"AG-INPUT-NUMBER-FIELD",component:vA};function Lw(e,t){return e.toString().padStart(t,"0")}function ia(e,t=!0,r="-"){if(!e)return null;let n=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(i=>Lw(i,2)).join(r);return t&&(n+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(i=>Lw(i,2)).join(":")),n}var TO=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function _w(e,t="YYYY-MM-DD"){const r=Lw(e.getFullYear(),4),n=["January","February","March","April","May","June","July","August","September","October","November","December"],i=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o={YYYY:()=>r.slice(r.length-4,r.length),YY:()=>r.slice(r.length-2,r.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>n[e.getMonth()],MMM:()=>n[e.getMonth()].slice(0,3),MM:()=>Lw(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${TO(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${TO(e.getDate())}`,DD:()=>Lw(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>i[e.getDay()],ddd:()=>i[e.getDay()].slice(0,3),dd:()=>i[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${TO(e.getDay())}`,d:()=>`${e.getDay()}`},s=new RegExp(Object.keys(o).join("|"),"g");return t.replace(s,a=>a in o?o[a]():a)}function as(e){if(!e)return null;const[t,r]=e.split(" ");if(!t)return null;const n=t.split("-").map(d=>parseInt(d,10));if(n.filter(d=>!isNaN(d)).length!==3)return null;const[i,o,s]=n,a=new Date(i,o-1,s);if(a.getFullYear()!==i||a.getMonth()!==o-1||a.getDate()!==s)return null;if(!r||r==="00:00:00")return a;const[l,c,u]=r.split(":").map(d=>parseInt(d,10));return l>=0&&l<24&&a.setHours(l),c>=0&&c<60&&a.setMinutes(c),u>=0&&u<60&&a.setSeconds(u),a}var Upe=class extends wc{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=xm();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){Br(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?ia(e??null,!1)??void 0:e;return this.min===t?this:(this.min=t,pl(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?ia(e??null,!1)??void 0:e;return this.max===t?this:(this.max=t,pl(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,pl(this.eInput,"step",e),this)}getDate(){if(this.eInput.validity.valid)return as(this.getValue())??void 0}setDate(e,t){this.setValue(ia(e??null,!1),t)}},jpe={selector:"AG-INPUT-DATE-FIELD",component:Upe},dje=1e3,hje=1e3,zY=100,HY,mE=!1,pje=class extends xe{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc,this.userCompFactory=e.userCompFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){var t,r,n,i;return e==="show"?((r=(t=this.tooltipCtrl).getTooltipShowDelayOverride)==null?void 0:r.call(t))??this.getGridOptionsTooltipDelay("tooltipShowDelay"):((i=(n=this.tooltipCtrl).getTooltipHideDelayOverride)==null?void 0:i.call(n))??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!lp()&&(mE?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},zY):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){var i;const t=e.relatedTarget,r=this.tooltipCtrl.getGui(),n=(i=this.tooltipComp)==null?void 0:i.getGui();this.isInteractingWithTooltip||r.contains(t)||this.interactionEnabled&&(n!=null&&n.contains(t))||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||mE)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return new Date().getTime()-HYthis.hideTooltip(!0),...((h=t.getAdditionalParams)==null?void 0:h.call(t))??{}};this.state=2,this.tooltipInstanceCount++;const i=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount),o=P8e(this.userCompFactory,n);o==null||o.newAgStackInstance().then(i)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),HY=new Date().getTime()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){var s;if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const n=t.getGui();this.tooltipComp=t,n.classList.contains("ag-tooltip")||n.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&n.classList.add("ag-tooltip-animate"),this.interactionEnabled&&n.classList.add("ag-tooltip-interactive");const i=this.getLocaleTextFunc(),o=(s=this.popupSvc)==null?void 0:s.addPopup({eChild:n,ariaLabel:i("ariaLabelTooltip","Tooltip")});if(o&&(this.tooltipPopupDestroyFunc=o.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const a=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:a,columnMoved:a})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(n,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(hn(this.beans),{keydown:a=>{n.contains(a==null?void 0:a.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(n,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:n,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){var r;const e=(r=this.tooltipComp)==null?void 0:r.getGui(),t=Br(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){var t,r;const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?(t=this.popupSvc)==null||t.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):(r=this.popupSvc)==null||r.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,r=this.tooltipTrigger===0?hje:0;window.setTimeout(()=>{e(),this.destroyBean(t)},r),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){mE=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},zY)}unlockService(){mE=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};function Ow(e){return e.get("tooltipShowMode")==="whenTruncated"}function CA(e,t){return Ow(e)?Ng(t):void 0}function Ng(e){return()=>{const t=e();return t?t.scrollWidth>t.clientWidth:!0}}var fje=class extends xe{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e){const t="title",r=this.ctrl.getGui();r&&(e!=null&&e!=""?r.setAttribute(t,e):r.removeAttribute(t))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){this.tooltipManager==null&&(this.tooltipManager=this.createBean(new pje(this.ctrl,()=>this.tooltip),this.beans.context))}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},gje=class extends Xe{constructor(e="default",t=!1){super(`
`),this.cssIdentifier=e,this.unFocusable=t,this.activeClass="ag-active-item",this.options=[],this.itemEls=[]}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()}),!this.unFocusable&&this.addManagedElementListeners(e,{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){const t=e.key;switch(t){case fe.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{const r=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(r)}break;case fe.DOWN:case fe.UP:e.preventDefault(),this.navigate(t);break;case fe.PAGE_DOWN:case fe.PAGE_UP:case fe.PAGE_HOME:case fe.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}navigate(e){const t=e===fe.DOWN;let r;const{itemEls:n,highlightedEl:i}=this;if(!i)r=n[t?0:n.length-1];else{let s=n.indexOf(i)+(t?1:-1);s=Math.min(Math.max(s,0),n.length-1),r=n[s]}this.highlightItem(r)}navigateToPage(e){const{itemEls:t,highlightedEl:r}=this;if(!r||t.length===0)return;const n=t.indexOf(r),i=this.options.length-1,o=t[0].clientHeight,s=Math.floor(this.getGui().clientHeight/o);let a=-1;e===fe.PAGE_HOME?a=0:e===fe.PAGE_END?a=i:e===fe.PAGE_DOWN?a=Math.min(n+s,i):e===fe.PAGE_UP&&(a=Math.max(n-s,0)),a!==-1&&this.highlightItem(t[a])}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){const{value:t,text:r}=e,n=r||t;return this.options.push({value:t,text:n}),this.renderOption(t,n),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{oi(e)}),this.itemEls=[]}updateIndices(){const e=this.getGui().querySelectorAll(".ag-list-item");e.forEach((t,r)=>{nA(t,r+1),rA(t,e.length)})}renderOption(e,t){const r=hn(this.beans),n=r.createElement("div");Wn(n,"option"),n.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);const i=r.createElement("span");n.appendChild(i),i.textContent=t,this.unFocusable||(n.tabIndex=-1),this.itemEls.push(n),this.addManagedListeners(n,{mouseover:()=>this.highlightItem(n),mousedown:o=>{o.preventDefault(),o.stopPropagation(),this.setValue(e)}}),this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getTooltipValue:()=>t,getGui:()=>n,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>i.scrollWidth>i.clientWidth})),this.getGui().appendChild(n)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const r=this.options.findIndex(n=>n.value===e);if(r!==-1){const n=this.options[r];this.value=n.value,this.displayValue=n.text,this.highlightItem(this.itemEls[r]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(e){if(!us(e))return;this.clearHighlighted(),this.highlightedEl=e,e.classList.add(this.activeClass),w0(e,!0);const t=this.getGui(),{scrollTop:r,clientHeight:n}=t,{offsetTop:i,offsetHeight:o}=e;(i+o>r+n||i
`,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=Ce,this.eWrapper=Ce,this.eDisplayField=Ce,this.eIcon=Ce,this.registerCSS(mje),this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:r,variableWidth:n,minPickerWidth:i,maxPickerWidth:o}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!n,r!=null&&this.setPickerMaxHeight(r),i!=null&&this.setPickerMinWidth(i),o!=null&&this.setPickerMaxWidth(o)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:r,inputWidth:n}=this.config;if(r){const i=zt(r,this.beans);i&&this.eIcon.appendChild(i)}n!=null&&this.setInputWidth(n)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),Ps(e,!1),this.ariaRole&&Wn(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case fe.UP:case fe.DOWN:case fe.ENTER:case fe.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case fe.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:r,pickerAriaLabelValue:n,modalPicker:i=!0},maxPickerHeight:o,minPickerWidth:s,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:u}=this,d={modal:i,eChild:e,closeOnEsc:!0,closedCallback:()=>{const g=Ep(c);this.beforeHidePicker(),g&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(r,n),anchorToElement:u};e.style.position="absolute";const h=c.popupSvc,p=h.addPopup(d);l?(s&&(e.style.minWidth=s),e.style.width=g5(Qg(u)),a&&(e.style.maxWidth=a)):AM(e,a??Qg(u));const f=o??`${iA(h.getPopupParent())}px`;return e.style.setProperty("max-height",f),this.alignPickerToComponent(),p.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:r,gos:n},eWrapper:i,pickerComponent:o}=this,s=n.get("enableRtl")?"right":"left";r.positionPopupByComponent({type:t,eventSource:i,ePopup:o.getGui(),position:"under",alignSide:s,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();Ps(t,e);const r=this.eWrapper.classList;r.toggle("ag-picker-expanded",e),r.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(t=this.pickerComponent)!=null&&t.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){var e;(e=this.hideCurrentPicker)==null||e.call(this)}setInputWidth(e){return AM(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},vje=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}",Ts=class extends z5{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(vje)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Ng(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:r}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),r&&t==null&&(this.eDisplayField.textContent=r),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new gje("select",!0));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),r=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",r),h5(this.getAriaElement(),t),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})}}),e.addManagedListeners(e,{fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}onKeyDown(e){var r;const{key:t}=e;switch(t===fe.TAB&&this.hidePicker(),t){case fe.ENTER:case fe.UP:case fe.DOWN:case fe.PAGE_UP:case fe.PAGE_DOWN:case fe.PAGE_HOME:case fe.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(r=this.listComponent)==null||r.handleKeyDown(e):super.onKeyDown(e);break;case fe.ESCAPE:super.onKeyDown(e);break;case fe.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return(e=this.listComponent)==null||e.clearOptions(),this}setValue(e,t,r){const{listComponent:n,config:{placeholder:i},eDisplayField:o,tooltipFeature:s}=this;if(this.value===e||!n)return this;if(r||n.setValue(e,!0),n.getValue()===this.getValue())return this;let l=n.getDisplayValue();return l==null&&i&&(l=i),o.textContent=l,s==null||s.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},Qx={selector:"AG-SELECT",component:Ts},Bg={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},Kpe=class extends xe{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:r,eBottomGuard:n,focusTrapActive:i,forceFocusOutWhenTabGuardsAreEmpty:o,isFocusableContainer:s,focusInnerElement:a,onFocusIn:l,onFocusOut:c,shouldStopEventPropagation:u,onTabKeyDown:d,handleKeyDown:h,eFocusableElement:p}=e;this.comp=t,this.eTopGuard=r,this.eBottomGuard=n,this.providedFocusInnerElement=a,this.eFocusableElement=p,this.focusTrapActive=!!i,this.forceFocusOutWhenTabGuardsAreEmpty=!!o,this.isFocusableContainer=!!s,this.providedFocusIn=l,this.providedFocusOut=c,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=d,this.providedHandleKeyDown=h}postConstruct(){this.createManagedBean(new Wp(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)}))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&tc(this.eFocusableElement,".ag-tab-guard").length===0){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t)}findNextElementOutsideAndFocus(e){var l;const t=hn(this.beans),r=tc(t.body,null,!0),n=r.indexOf(e?this.eTopGuard:this.eBottomGuard);if(n===-1)return;let i,o;e?(i=0,o=n):(i=n+1,o=r.length);const s=r.slice(i,o),a=this.gos.get("tabIndex");s.sort((c,u)=>{const d=parseInt(c.getAttribute("tabindex")||"0"),h=parseInt(u.getAttribute("tabindex")||"0");return h===a?1:d===a?-1:d===0?1:h===0?-1:d-h}),(l=s[e?s.length-1:0])==null||l.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const r=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),r&&(r.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=tc(this.eFocusableElement);this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length&&t[e?t.length-1:0].focus({preventScroll:!0})}getNextFocusableElement(e){return Oo(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},qpe=class extends xe{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:r,eFocusableElement:n}=this,i=[t,r],o={setTabIndex:g=>{i.forEach(m=>g!=null?m.setAttribute("tabindex",g):m.removeAttribute("tabindex"))}};this.addTabGuards(t,r);const{focusTrapActive:s=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:c,handleKeyDown:u,onTabKeyDown:d,shouldStopEventPropagation:h,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}=e;this.tabGuardCtrl=this.createManagedBean(new Kpe({comp:o,focusTrapActive:s,eTopGuard:t,eBottomGuard:r,eFocusableElement:n,onFocusIn:a,onFocusOut:l,focusInnerElement:c,handleKeyDown:u,onTabKeyDown:d,shouldStopEventPropagation:h,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=hn(this.beans).createElement("div"),r=e==="top"?Bg.TAB_GUARD_TOP:Bg.TAB_GUARD_BOTTOM;return t.classList.add(Bg.TAB_GUARD,r),Wn(t,"presentation"),t}addTabGuards(e,t){const r=this.eFocusableElement;r.insertAdjacentElement("afterbegin",e),r.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];Qr(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,r){sA(t)||(t=t.getGui());const{eBottomGuard:n}=this;n?n.insertAdjacentElement("beforebegin",t):e(t,r)}},Pu=class extends Xe{initialiseTabGuard(t){this.tabGuardFeature=this.createManagedBean(new qpe(this)),this.tabGuardFeature.initialiseTabGuard(t)}forceFocusOutOfContainer(t=!1){this.tabGuardFeature.forceFocusOutOfContainer(t)}appendChild(t,r){this.tabGuardFeature.appendChild(super.appendChild.bind(this),t,r)}},Up=class extends Xe{isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},jh=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new Hp,this.preventMouseClick=t;const r=this.onTouchStart.bind(this),n=this.onTouchMove.bind(this),i=this.onTouchEnd.bind(this);e.addEventListener("touchstart",r,{passive:!0}),e.addEventListener("touchmove",n,{passive:!0}),e.addEventListener("touchend",i,{passive:!1}),this.destroyFuncs.push(()=>{e.removeEventListener("touchstart",r,{passive:!0}),e.removeEventListener("touchmove",n,{passive:!0}),e.removeEventListener("touchend",i,{passive:!1})})}getActiveTouch(e){for(let t=0;t{const r=this.touchStart===t;if(this.touching&&r&&!this.moved){this.moved=!0;const n={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(n)}},500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);if(!t)return;!vpe(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){const t={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){const e=new Date().getTime();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){const r={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(r),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}},cl=(e=>(e[e.VALUE=0]="VALUE",e[e.DIMENSION=1]="DIMENSION",e))(cl||{}),Ype=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${fhe}/${this.frameworkName}-data-grid`,sUe(this.baseDocLink)}setInterval(e,t){return new lr(r=>{r(window.setInterval(e,t))})}addEventListener(e,t,r,n){let i={};if(typeof n=="object"?i=n:typeof n=="boolean"&&(i={capture:n}),i.passive==null){const o=Fhe(t);o!=null&&(i.passive=o)}e.addEventListener(t,r,i)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`${this.baseDocLink}${e?`/${e}`:""}`}};function yje(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var Cje=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","funcColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],WY=Object.fromEntries(Cje.map((e,t)=>[e,t]));function bje(e,t){const r=(e.beanName?WY[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,n=(t.beanName?WY[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return r-n}function Sje(e,t){return(e==null?void 0:e.beanName)==="gridDestroySvc"?-1:0}var wje='
',xje='
',Tje=``,EO=class extends Xe{constructor(t){super(),this.eCenterContainer=Ce,this.headerRowComps={},this.rowCompsList=[],this.pinned=t}postConstruct(){this.selectAndSetTemplate();const t={setDisplayed:n=>this.setDisplayed(n),setCtrls:n=>this.setCtrls(n),setCenterWidth:n=>this.eCenterContainer.style.width=n,setViewportScrollLeft:n=>this.getGui().scrollLeft=n,setPinnedContainerWidth:n=>{const i=this.getGui();i.style.width=n,i.style.maxWidth=n,i.style.minWidth=n}};this.createManagedBean(new Gpe(this.pinned)).setComp(t,this.getGui())}selectAndSetTemplate(){const t=this.pinned=="left",r=this.pinned=="right",n=t?wje:r?xje:Tje;this.setTemplate(n),this.eRowContainer=this.eCenterContainer!==Ce?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(t){this.destroyBean(t),this.eRowContainer.removeChild(t.getGui())}setCtrls(t){const r=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let n;const i=o=>{const s=o.getGui();s.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(s),n&&che(this.eRowContainer,s,n),n=s};t.forEach(o=>{const s=o.instanceId,a=r[s];delete r[s];const l=a||this.createBean(new W7e(o));this.headerRowComps[s]=l,this.rowCompsList.push(l),i(l)}),Object.values(r).forEach(o=>this.destroyRowComp(o))}},Eje=class extends Xe{constructor(){super('