@gientech/modual 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chat.js +111 -111
- package/database.js +2 -2
- package/databaseId.js +6 -6
- package/databaseTable.js +4 -4
- package/gientechStreamFilesReader.js +2 -2
- package/modelManage.js +1 -1
- package/package.json +1 -21
- package/sensitive.js +1 -1
- package/streamFilesReader.js +33 -33
- package/assets/jsx-runtime-vC1aA8e7.js +0 -9
package/chat.js
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import{j as B}from"./assets/jsx-runtime-vC1aA8e7.js";import*as f from"react";import be,{forwardRef as jr,useMemo as Lt,useRef as wt,useCallback as ma,useImperativeHandle as Do,createContext as ra,useState as dt,useEffect as ft,useContext as $n,Component as ap,createElement as Sa,PureComponent as $0,version as E0,useLayoutEffect as k0,isValidElement as I0}from"react";import{a as kn}from"./assets/index-NIGUFBhG.js";import{Icon as qt,defaultTheme as Qc,deepMergeTheme as O0}from"@mxmweb/zui";import*as N0 from"react-dom";import od,{flushSync as ji,createPortal as D0}from"react-dom";import op from"clipboard";import{Flipper as M0,Flipped as F0}from"react-flip-toolkit";import{ChatMessageAdapter as id}from"@mxmweb/rtext";import{i as ip,g as sp,a as lp,b as cp,c as up,d as dp,e as fp,B as P0,t as j0,f as mp,h as R0,j as A0,k as T0,u as Zc,l as Ri,m as eu,R as _0,n as B0,I as Qr,o as L0,C as sd}from"./assets/index-E7FJJ9zV.js";import{g as tu,t as z0,F as Xt,u as pp}from"./assets/index-BW1L5s38.js";import{w as zt,K as Et,c as Mo,g as nu,s as gp,_ as Nt,a as oe,b as pe,T as ru,d as Oe,e as J,u as H0,i as au,f as ye,h as rt,j as vp,k as an,l as In,m as hp,o as Vn,n as es,p as ts,q as aa,r as oa,t as ns,C as rs,v as mn,I as hn,x as cn,y as Fr,z as V0,A as vo,B as fe,D as Fo,E as as,F as rr,G as Hn,H as yp,J as Ai,L as pn,M as mr,N as bp,O as os,P as Ut,Q as ia,R as ou,S as ld,U as K0,V as xp,W as W0,X as iu,Y as sa,Z as mi,$ as Rn,a0 as Cp,a1 as la,a2 as Po,a3 as Fa,a4 as q0,a5 as U0,a6 as Y0,a7 as is,a8 as wp,a9 as G0,aa as ss,ab as ls,ac as jo,ad as gn,ae as cs,af as Sp,ag as X0,ah as J0,ai as $p,aj as Q0,ak as Z0,al as Ep,am as ey,an as Nl,ao as Ti,ap as ty,aq as ny,ar as ry,as as Xe,at as Dl,au as kr,av as bn,aw as ay,ax as cd,ay as oy,az as iy,aA as Vt,aB as us,aC as Go}from"./assets/index-CGHNxHzA.js";import{B as sy}from"./assets/index-Df9lUffW.js";import{F as $a,i as Ia,s as kp,a as Ip,b as Op,c as Np,d as _i,R as ly,e as cy,g as uy,f as dy,h as fy,u as my,j as py,L as gy,S as vy}from"./assets/LeftOutlined-C1Tv2UIq.js";import{T as Ro,g as hy,a as yy,b as Dp,c as by,d as xy}from"./assets/index-JdQHnMoG.js";import{g as ud,P as Cy,a as Mp,S as wy,T as Fp}from"./assets/index-DkrRMiqX.js";import{u as Zr}from"./assets/index-CpW6Dhpp.js";/* empty css */import{c as gr}from"./assets/createLucideIcon-Bj5DlX2s.js";import{P as Pp}from"./assets/plus-B679mjyt.js";import{X as su}from"./assets/x-CdZQbi--.js";import{C as Sy}from"./assets/chevron-right-CrkLSPrQ.js";var $y=Et.ESC,Ey=Et.TAB;function ky(e){var t=e.visible,n=e.triggerRef,r=e.onVisibleChange,a=e.autoFocus,o=e.overlayRef,i=f.useRef(!1),s=function(){if(t){var d,g;(d=n.current)===null||d===void 0||(g=d.focus)===null||g===void 0||g.call(d),r==null||r(!1)}},l=function(){var d;return(d=o.current)!==null&&d!==void 0&&d.focus?(o.current.focus(),i.current=!0,!0):!1},c=function(d){switch(d.keyCode){case $y:s();break;case Ey:{var g=!1;i.current||(g=l()),g?d.preventDefault():s();break}}};f.useEffect(function(){return t?(window.addEventListener("keydown",c),a&&zt(l,3),function(){window.removeEventListener("keydown",c),i.current=!1}):function(){i.current=!1}},[t])}var Iy=jr(function(e,t){var n=e.overlay,r=e.arrow,a=e.prefixCls,o=Lt(function(){var s;return typeof n=="function"?s=n():s=n,s},[n]),i=Mo(t,nu(o));return be.createElement(be.Fragment,null,r&&be.createElement("div",{className:"".concat(a,"-arrow")}),be.cloneElement(o,{ref:gp(o)?i:void 0}))}),pa={adjustX:1,adjustY:1},ga=[0,0],Oy={topLeft:{points:["bl","tl"],overflow:pa,offset:[0,-4],targetOffset:ga},top:{points:["bc","tc"],overflow:pa,offset:[0,-4],targetOffset:ga},topRight:{points:["br","tr"],overflow:pa,offset:[0,-4],targetOffset:ga},bottomLeft:{points:["tl","bl"],overflow:pa,offset:[0,4],targetOffset:ga},bottom:{points:["tc","bc"],overflow:pa,offset:[0,4],targetOffset:ga},bottomRight:{points:["tr","br"],overflow:pa,offset:[0,4],targetOffset:ga}},Ny=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Dy(e,t){var n,r=e.arrow,a=r===void 0?!1:r,o=e.prefixCls,i=o===void 0?"rc-dropdown":o,s=e.transitionName,l=e.animation,c=e.align,u=e.placement,d=u===void 0?"bottomLeft":u,g=e.placements,h=g===void 0?Oy:g,v=e.getPopupContainer,m=e.showAction,p=e.hideAction,b=e.overlayClassName,y=e.overlayStyle,x=e.visible,w=e.trigger,C=w===void 0?["hover"]:w,S=e.autoFocus,E=e.overlay,k=e.children,$=e.onVisibleChange,O=Nt(e,Ny),D=be.useState(),P=oe(D,2),R=P[0],N=P[1],I="visible"in e?x:R,M=be.useRef(null),F=be.useRef(null),j=be.useRef(null);be.useImperativeHandle(t,function(){return M.current});var A=function(U){N(U),$==null||$(U)};ky({visible:I,triggerRef:j,onVisibleChange:A,autoFocus:S,overlayRef:F});var _=function(U){var Z=e.onOverlayClick;N(!1),Z&&Z(U)},L=function(){return be.createElement(Iy,{ref:F,overlay:E,prefixCls:i,arrow:a})},z=function(){return typeof E=="function"?L:L()},T=function(){var U=e.minOverlayWidthMatchTrigger,Z=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?U:!Z},H=function(){var U=e.openClassName;return U!==void 0?U:"".concat(i,"-open")},W=be.cloneElement(k,{className:pe((n=k.props)===null||n===void 0?void 0:n.className,I&&H()),ref:gp(k)?Mo(j,nu(k)):void 0}),K=p;return!K&&C.indexOf("contextMenu")!==-1&&(K=["click"]),be.createElement(ru,Oe({builtinPlacements:h},O,{prefixCls:i,ref:M,popupClassName:pe(b,J({},"".concat(i,"-show-arrow"),a)),popupStyle:y,action:C,showAction:m,hideAction:K,popupPlacement:d,popupAlign:c,popupTransitionName:s,popupAnimation:l,popupVisible:I,stretch:T()?"minWidth":"",popup:z(),onPopupVisibleChange:A,onPopupClick:_,getPopupContainer:v}),W)}const My=be.forwardRef(Dy),Fy=e=>typeof e!="object"&&typeof e!="function"||e===null;var jp=f.createContext(null);function Rp(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function Ap(e){var t=f.useContext(jp);return Rp(t,e)}var Py=["children","locked"],nr=f.createContext(null);function jy(e,t){var n=ye({},e);return Object.keys(t).forEach(function(r){var a=t[r];a!==void 0&&(n[r]=a)}),n}function ho(e){var t=e.children,n=e.locked,r=Nt(e,Py),a=f.useContext(nr),o=H0(function(){return jy(a,r)},[a,r],function(i,s){return!n&&(i[0]!==s[0]||!au(i[1],s[1],!0))});return f.createElement(nr.Provider,{value:o},t)}var Ry=[],Tp=f.createContext(null);function ds(){return f.useContext(Tp)}var _p=f.createContext(Ry);function Pa(e){var t=f.useContext(_p);return f.useMemo(function(){return e!==void 0?[].concat(rt(t),[e]):t},[t,e])}var Bp=f.createContext(null),lu=f.createContext({});function dd(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(vp(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),a=e.getAttribute("tabindex"),o=Number(a),i=null;return a&&!Number.isNaN(o)?i=o:r&&i===null&&(i=0),r&&e.disabled&&(i=null),i!==null&&(i>=0||t&&i<0)}return!1}function Ay(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=rt(e.querySelectorAll("*")).filter(function(r){return dd(r,t)});return dd(e,t)&&n.unshift(e),n}var Ml=Et.LEFT,Fl=Et.RIGHT,Pl=Et.UP,pi=Et.DOWN,gi=Et.ENTER,Lp=Et.ESC,Ga=Et.HOME,Xa=Et.END,fd=[Pl,pi,Ml,Fl];function Ty(e,t,n,r){var a,o="prev",i="next",s="children",l="parent";if(e==="inline"&&r===gi)return{inlineTrigger:!0};var c=J(J({},Pl,o),pi,i),u=J(J(J(J({},Ml,n?i:o),Fl,n?o:i),pi,s),gi,s),d=J(J(J(J(J(J({},Pl,o),pi,i),gi,s),Lp,l),Ml,n?s:l),Fl,n?l:s),g={inline:c,horizontal:u,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d},h=(a=g["".concat(e).concat(t?"":"Sub")])===null||a===void 0?void 0:a[r];switch(h){case o:return{offset:-1,sibling:!0};case i:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function _y(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function By(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}function cu(e,t){var n=Ay(e,!0);return n.filter(function(r){return t.has(r)})}function md(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var a=cu(e,t),o=a.length,i=a.findIndex(function(s){return n===s});return r<0?i===-1?i=o-1:i-=1:r>0&&(i+=1),i=(i+o)%o,a[i]}var jl=function(t,n){var r=new Set,a=new Map,o=new Map;return t.forEach(function(i){var s=document.querySelector("[data-menu-id='".concat(Rp(n,i),"']"));s&&(r.add(s),o.set(s,i),a.set(i,s))}),{elements:r,key2element:a,element2key:o}};function Ly(e,t,n,r,a,o,i,s,l,c){var u=f.useRef(),d=f.useRef();d.current=t;var g=function(){zt.cancel(u.current)};return f.useEffect(function(){return function(){g()}},[]),function(h){var v=h.which;if([].concat(fd,[gi,Lp,Ga,Xa]).includes(v)){var m=o(),p=jl(m,r),b=p,y=b.elements,x=b.key2element,w=b.element2key,C=x.get(t),S=By(C,y),E=w.get(S),k=Ty(e,i(E,!0).length===1,n,v);if(!k&&v!==Ga&&v!==Xa)return;(fd.includes(v)||[Ga,Xa].includes(v))&&h.preventDefault();var $=function(F){if(F){var j=F,A=F.querySelector("a");A!=null&&A.getAttribute("href")&&(j=A);var _=w.get(F);s(_),g(),u.current=zt(function(){d.current===_&&j.focus()})}};if([Ga,Xa].includes(v)||k.sibling||!S){var O;!S||e==="inline"?O=a.current:O=_y(S);var D,P=cu(O,y);v===Ga?D=P[0]:v===Xa?D=P[P.length-1]:D=md(O,y,S,k.offset),$(D)}else if(k.inlineTrigger)l(E);else if(k.offset>0)l(E,!0),g(),u.current=zt(function(){p=jl(m,r);var M=S.getAttribute("aria-controls"),F=document.getElementById(M),j=md(F,p.elements);$(j)},5);else if(k.offset<0){var R=i(E,!0),N=R[R.length-2],I=x.get(N);l(N,!1),$(I)}}c==null||c(h)}}function zy(e){Promise.resolve().then(e)}var uu="__RC_UTIL_PATH_SPLIT__",pd=function(t){return t.join(uu)},Hy=function(t){return t.split(uu)},Rl="rc-menu-more";function Vy(){var e=f.useState({}),t=oe(e,2),n=t[1],r=wt(new Map),a=wt(new Map),o=f.useState([]),i=oe(o,2),s=i[0],l=i[1],c=wt(0),u=wt(!1),d=function(){u.current||n({})},g=ma(function(x,w){var C=pd(w);a.current.set(C,x),r.current.set(x,C),c.current+=1;var S=c.current;zy(function(){S===c.current&&d()})},[]),h=ma(function(x,w){var C=pd(w);a.current.delete(C),r.current.delete(x)},[]),v=ma(function(x){l(x)},[]),m=ma(function(x,w){var C=r.current.get(x)||"",S=Hy(C);return w&&s.includes(S[0])&&S.unshift(Rl),S},[s]),p=ma(function(x,w){return x.filter(function(C){return C!==void 0}).some(function(C){var S=m(C,!0);return S.includes(w)})},[m]),b=function(){var w=rt(r.current.keys());return s.length&&w.push(Rl),w},y=ma(function(x){var w="".concat(r.current.get(x)).concat(uu),C=new Set;return rt(a.current.keys()).forEach(function(S){S.startsWith(w)&&C.add(a.current.get(S))}),C},[]);return f.useEffect(function(){return function(){u.current=!0}},[]),{registerPath:g,unregisterPath:h,refreshOverflowKeys:v,isSubPathKey:p,getKeyPath:m,getKeys:b,getSubPathKeys:y}}function ro(e){var t=f.useRef(e);t.current=e;var n=f.useCallback(function(){for(var r,a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(o))},[]);return e?n:void 0}var Ky=Math.random().toFixed(5).toString().slice(2),gd=0;function Wy(e){var t=an(e,{value:e}),n=oe(t,2),r=n[0],a=n[1];return f.useEffect(function(){gd+=1;var o="".concat(Ky,"-").concat(gd);a("rc-menu-uuid-".concat(o))},[]),r}function zp(e,t,n,r){var a=f.useContext(nr),o=a.activeKey,i=a.onActive,s=a.onInactive,l={active:o===e};return t||(l.onMouseEnter=function(c){n==null||n({key:e,domEvent:c}),i(e)},l.onMouseLeave=function(c){r==null||r({key:e,domEvent:c}),s(e)}),l}function Hp(e){var t=f.useContext(nr),n=t.mode,r=t.rtl,a=t.inlineIndent;if(n!=="inline")return null;var o=e;return r?{paddingRight:o*a}:{paddingLeft:o*a}}function Vp(e){var t=e.icon,n=e.props,r=e.children,a;return t===null||t===!1?null:(typeof t=="function"?a=f.createElement(t,ye({},n)):typeof t!="boolean"&&(a=t),a||r||null)}var qy=["item"];function Bi(e){var t=e.item,n=Nt(e,qy);return Object.defineProperty(n,"item",{get:function(){return In(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}var Uy=["title","attribute","elementRef"],Yy=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Gy=["active"],Xy=(function(e){es(n,e);var t=ts(n);function n(){return aa(this,n),t.apply(this,arguments)}return oa(n,[{key:"render",value:function(){var a=this.props,o=a.title,i=a.attribute,s=a.elementRef,l=Nt(a,Uy),c=Vn(l,["eventKey","popupClassName","popupOffset","onTitleClick"]);return In(!i,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),f.createElement($a.Item,Oe({},i,{title:typeof o=="string"?o:void 0},c,{ref:s}))}}]),n})(f.Component),Jy=f.forwardRef(function(e,t){var n=e.style,r=e.className,a=e.eventKey;e.warnKey;var o=e.disabled,i=e.itemIcon,s=e.children,l=e.role,c=e.onMouseEnter,u=e.onMouseLeave,d=e.onClick,g=e.onKeyDown,h=e.onFocus,v=Nt(e,Yy),m=Ap(a),p=f.useContext(nr),b=p.prefixCls,y=p.onItemClick,x=p.disabled,w=p.overflowDisabled,C=p.itemIcon,S=p.selectedKeys,E=p.onActive,k=f.useContext(lu),$=k._internalRenderMenuItem,O="".concat(b,"-item"),D=f.useRef(),P=f.useRef(),R=x||o,N=hp(t,P),I=Pa(a),M=function(Z){return{key:a,keyPath:rt(I).reverse(),item:D.current,domEvent:Z}},F=i||C,j=zp(a,R,c,u),A=j.active,_=Nt(j,Gy),L=S.includes(a),z=Hp(I.length),T=function(Z){if(!R){var Q=M(Z);d==null||d(Bi(Q)),y(Q)}},H=function(Z){if(g==null||g(Z),Z.which===Et.ENTER){var Q=M(Z);d==null||d(Bi(Q)),y(Q)}},W=function(Z){E(a),h==null||h(Z)},K={};e.role==="option"&&(K["aria-selected"]=L);var G=f.createElement(Xy,Oe({ref:D,elementRef:N,role:l===null?"none":l||"menuitem",tabIndex:o?null:-1,"data-menu-id":w&&m?null:m},Vn(v,["extra"]),_,K,{component:"li","aria-disabled":o,style:ye(ye({},z),n),className:pe(O,J(J(J({},"".concat(O,"-active"),A),"".concat(O,"-selected"),L),"".concat(O,"-disabled"),R),r),onClick:T,onKeyDown:H,onFocus:W}),s,f.createElement(Vp,{props:ye(ye({},e),{},{isSelected:L}),icon:F}));return $&&(G=$(G,e,{selected:L})),G});function Qy(e,t){var n=e.eventKey,r=ds(),a=Pa(n);return f.useEffect(function(){if(r)return r.registerPath(n,a),function(){r.unregisterPath(n,a)}},[a]),r?null:f.createElement(Jy,Oe({},e,{ref:t}))}const fs=f.forwardRef(Qy);var Zy=["className","children"],eb=function(t,n){var r=t.className,a=t.children,o=Nt(t,Zy),i=f.useContext(nr),s=i.prefixCls,l=i.mode,c=i.rtl;return f.createElement("ul",Oe({className:pe(s,c&&"".concat(s,"-rtl"),"".concat(s,"-sub"),"".concat(s,"-").concat(l==="inline"?"inline":"vertical"),r),role:"menu"},o,{"data-menu-list":!0,ref:n}),a)},du=f.forwardRef(eb);du.displayName="SubMenuList";function fu(e,t){return ns(e).map(function(n,r){if(f.isValidElement(n)){var a,o,i=n.key,s=(a=(o=n.props)===null||o===void 0?void 0:o.eventKey)!==null&&a!==void 0?a:i,l=s==null;l&&(s="tmp_key-".concat([].concat(rt(t),[r]).join("-")));var c={key:s,eventKey:s};return f.cloneElement(n,c)}return n})}var xn={adjustX:1,adjustY:1},tb={topLeft:{points:["bl","tl"],overflow:xn},topRight:{points:["br","tr"],overflow:xn},bottomLeft:{points:["tl","bl"],overflow:xn},bottomRight:{points:["tr","br"],overflow:xn},leftTop:{points:["tr","tl"],overflow:xn},leftBottom:{points:["br","bl"],overflow:xn},rightTop:{points:["tl","tr"],overflow:xn},rightBottom:{points:["bl","br"],overflow:xn}},nb={topLeft:{points:["bl","tl"],overflow:xn},topRight:{points:["br","tr"],overflow:xn},bottomLeft:{points:["tl","bl"],overflow:xn},bottomRight:{points:["tr","br"],overflow:xn},rightTop:{points:["tr","tl"],overflow:xn},rightBottom:{points:["br","bl"],overflow:xn},leftTop:{points:["tl","tr"],overflow:xn},leftBottom:{points:["bl","br"],overflow:xn}};function Kp(e,t,n){if(t)return t;if(n)return n[e]||n.other}var rb={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function ab(e){var t=e.prefixCls,n=e.visible,r=e.children,a=e.popup,o=e.popupStyle,i=e.popupClassName,s=e.popupOffset,l=e.disabled,c=e.mode,u=e.onVisibleChange,d=f.useContext(nr),g=d.getPopupContainer,h=d.rtl,v=d.subMenuOpenDelay,m=d.subMenuCloseDelay,p=d.builtinPlacements,b=d.triggerSubMenuAction,y=d.forceSubMenuRender,x=d.rootClassName,w=d.motion,C=d.defaultMotions,S=f.useState(!1),E=oe(S,2),k=E[0],$=E[1],O=h?ye(ye({},nb),p):ye(ye({},tb),p),D=rb[c],P=Kp(c,w,C),R=f.useRef(P);c!=="inline"&&(R.current=P);var N=ye(ye({},R.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),I=f.useRef();return f.useEffect(function(){return I.current=zt(function(){$(n)}),function(){zt.cancel(I.current)}},[n]),f.createElement(ru,{prefixCls:t,popupClassName:pe("".concat(t,"-popup"),J({},"".concat(t,"-rtl"),h),i,x),stretch:c==="horizontal"?"minWidth":null,getPopupContainer:g,builtinPlacements:O,popupPlacement:D,popupVisible:k,popup:a,popupStyle:o,popupAlign:s&&{offset:s},action:l?[]:[b],mouseEnterDelay:v,mouseLeaveDelay:m,onPopupVisibleChange:u,forceRender:y,popupMotion:N,fresh:!0},r)}function ob(e){var t=e.id,n=e.open,r=e.keyPath,a=e.children,o="inline",i=f.useContext(nr),s=i.prefixCls,l=i.forceSubMenuRender,c=i.motion,u=i.defaultMotions,d=i.mode,g=f.useRef(!1);g.current=d===o;var h=f.useState(!g.current),v=oe(h,2),m=v[0],p=v[1],b=g.current?n:!1;f.useEffect(function(){g.current&&p(!1)},[d]);var y=ye({},Kp(o,c,u));r.length>1&&(y.motionAppear=!1);var x=y.onVisibleChanged;return y.onVisibleChanged=function(w){return!g.current&&!w&&p(!0),x==null?void 0:x(w)},m?null:f.createElement(ho,{mode:o,locked:!g.current},f.createElement(rs,Oe({visible:b},y,{forceRender:l,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(w){var C=w.className,S=w.style;return f.createElement(du,{id:t,className:C,style:S},a)}))}var ib=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],sb=["active"],lb=f.forwardRef(function(e,t){var n=e.style,r=e.className,a=e.title,o=e.eventKey;e.warnKey;var i=e.disabled,s=e.internalPopupClose,l=e.children,c=e.itemIcon,u=e.expandIcon,d=e.popupClassName,g=e.popupOffset,h=e.popupStyle,v=e.onClick,m=e.onMouseEnter,p=e.onMouseLeave,b=e.onTitleClick,y=e.onTitleMouseEnter,x=e.onTitleMouseLeave,w=Nt(e,ib),C=Ap(o),S=f.useContext(nr),E=S.prefixCls,k=S.mode,$=S.openKeys,O=S.disabled,D=S.overflowDisabled,P=S.activeKey,R=S.selectedKeys,N=S.itemIcon,I=S.expandIcon,M=S.onItemClick,F=S.onOpenChange,j=S.onActive,A=f.useContext(lu),_=A._internalRenderSubMenuItem,L=f.useContext(Bp),z=L.isSubPathKey,T=Pa(),H="".concat(E,"-submenu"),W=O||i,K=f.useRef(),G=f.useRef(),U=c??N,Z=u??I,Q=$.includes(o),Y=!D&&Q,ee=z(R,o),ce=zp(o,W,y,x),me=ce.active,we=Nt(ce,sb),se=f.useState(!1),ge=oe(se,2),Ee=ge[0],Te=ge[1],Pe=function(ue){W||Te(ue)},he=function(ue){Pe(!0),m==null||m({key:o,domEvent:ue})},ke=function(ue){Pe(!1),p==null||p({key:o,domEvent:ue})},de=f.useMemo(function(){return me||(k!=="inline"?Ee||z([P],o):!1)},[k,me,P,Ee,o,z]),Re=Hp(T.length),He=function(ue){W||(b==null||b({key:o,domEvent:ue}),k==="inline"&&F(o,!Q))},Ke=ro(function($e){v==null||v(Bi($e)),M($e)}),tt=function(ue){k!=="inline"&&F(o,ue)},qe=function(){j(o)},We=C&&"".concat(C,"-popup"),lt=f.useMemo(function(){return f.createElement(Vp,{icon:k!=="horizontal"?Z:void 0,props:ye(ye({},e),{},{isOpen:Y,isSubMenu:!0})},f.createElement("i",{className:"".concat(H,"-arrow")}))},[k,Z,e,Y,H]),Fe=f.createElement("div",Oe({role:"menuitem",style:Re,className:"".concat(H,"-title"),tabIndex:W?null:-1,ref:K,title:typeof a=="string"?a:null,"data-menu-id":D&&C?null:C,"aria-expanded":Y,"aria-haspopup":!0,"aria-controls":We,"aria-disabled":W,onClick:He,onFocus:qe},we),a,lt),ae=f.useRef(k);if(k!=="inline"&&T.length>1?ae.current="vertical":ae.current=k,!D){var Le=ae.current;Fe=f.createElement(ab,{mode:Le,prefixCls:H,visible:!s&&Y&&k!=="inline",popupClassName:d,popupOffset:g,popupStyle:h,popup:f.createElement(ho,{mode:Le==="horizontal"?"vertical":Le},f.createElement(du,{id:We,ref:G},l)),disabled:W,onVisibleChange:tt},Fe)}var Ce=f.createElement($a.Item,Oe({ref:t,role:"none"},w,{component:"li",style:n,className:pe(H,"".concat(H,"-").concat(k),r,J(J(J(J({},"".concat(H,"-open"),Y),"".concat(H,"-active"),de),"".concat(H,"-selected"),ee),"".concat(H,"-disabled"),W)),onMouseEnter:he,onMouseLeave:ke}),Fe,!D&&f.createElement(ob,{id:We,open:Y,keyPath:T},l));return _&&(Ce=_(Ce,e,{selected:ee,active:de,open:Y,disabled:W})),f.createElement(ho,{onItemClick:Ke,mode:k==="horizontal"?"vertical":k,itemIcon:U,expandIcon:Z},Ce)}),ms=f.forwardRef(function(e,t){var n=e.eventKey,r=e.children,a=Pa(n),o=fu(r,a),i=ds();f.useEffect(function(){if(i)return i.registerPath(n,a),function(){i.unregisterPath(n,a)}},[a]);var s;return i?s=o:s=f.createElement(lb,Oe({ref:t},e),o),f.createElement(_p.Provider,{value:a},s)});function mu(e){var t=e.className,n=e.style,r=f.useContext(nr),a=r.prefixCls,o=ds();return o?null:f.createElement("li",{role:"separator",className:pe("".concat(a,"-item-divider"),t),style:n})}var cb=["className","title","eventKey","children"],ub=f.forwardRef(function(e,t){var n=e.className,r=e.title;e.eventKey;var a=e.children,o=Nt(e,cb),i=f.useContext(nr),s=i.prefixCls,l="".concat(s,"-item-group");return f.createElement("li",Oe({ref:t,role:"presentation"},o,{onClick:function(u){return u.stopPropagation()},className:pe(l,n)}),f.createElement("div",{role:"presentation",className:"".concat(l,"-title"),title:typeof r=="string"?r:void 0},r),f.createElement("ul",{role:"group",className:"".concat(l,"-list")},a))}),pu=f.forwardRef(function(e,t){var n=e.eventKey,r=e.children,a=Pa(n),o=fu(r,a),i=ds();return i?o:f.createElement(ub,Oe({ref:t},Vn(e,["warnKey"])),o)}),db=["label","children","key","type","extra"];function Al(e,t,n){var r=t.item,a=t.group,o=t.submenu,i=t.divider;return(e||[]).map(function(s,l){if(s&&mn(s)==="object"){var c=s,u=c.label,d=c.children,g=c.key,h=c.type,v=c.extra,m=Nt(c,db),p=g??"tmp-".concat(l);return d||h==="group"?h==="group"?f.createElement(a,Oe({key:p},m,{title:u}),Al(d,t,n)):f.createElement(o,Oe({key:p},m,{title:u}),Al(d,t,n)):h==="divider"?f.createElement(i,Oe({key:p},m)):f.createElement(r,Oe({key:p},m,{extra:v}),u,(!!v||v===0)&&f.createElement("span",{className:"".concat(n,"-item-extra")},v))}return null}).filter(function(s){return s})}function vd(e,t,n,r,a){var o=e,i=ye({divider:mu,item:fs,group:pu,submenu:ms},r);return t&&(o=Al(t,i,a)),fu(o,n)}var fb=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],_r=[],mb=f.forwardRef(function(e,t){var n,r=e,a=r.prefixCls,o=a===void 0?"rc-menu":a,i=r.rootClassName,s=r.style,l=r.className,c=r.tabIndex,u=c===void 0?0:c,d=r.items,g=r.children,h=r.direction,v=r.id,m=r.mode,p=m===void 0?"vertical":m,b=r.inlineCollapsed,y=r.disabled,x=r.disabledOverflow,w=r.subMenuOpenDelay,C=w===void 0?.1:w,S=r.subMenuCloseDelay,E=S===void 0?.1:S,k=r.forceSubMenuRender,$=r.defaultOpenKeys,O=r.openKeys,D=r.activeKey,P=r.defaultActiveFirst,R=r.selectable,N=R===void 0?!0:R,I=r.multiple,M=I===void 0?!1:I,F=r.defaultSelectedKeys,j=r.selectedKeys,A=r.onSelect,_=r.onDeselect,L=r.inlineIndent,z=L===void 0?24:L,T=r.motion,H=r.defaultMotions,W=r.triggerSubMenuAction,K=W===void 0?"hover":W,G=r.builtinPlacements,U=r.itemIcon,Z=r.expandIcon,Q=r.overflowedIndicator,Y=Q===void 0?"...":Q,ee=r.overflowedIndicatorPopupClassName,ce=r.getPopupContainer,me=r.onClick,we=r.onOpenChange,se=r.onKeyDown;r.openAnimation,r.openTransitionName;var ge=r._internalRenderMenuItem,Ee=r._internalRenderSubMenuItem,Te=r._internalComponents,Pe=Nt(r,fb),he=f.useMemo(function(){return[vd(g,d,_r,Te,o),vd(g,d,_r,{},o)]},[g,d,Te]),ke=oe(he,2),de=ke[0],Re=ke[1],He=f.useState(!1),Ke=oe(He,2),tt=Ke[0],qe=Ke[1],We=f.useRef(),lt=Wy(v),Fe=h==="rtl",ae=an($,{value:O,postState:function(It){return It||_r}}),Le=oe(ae,2),Ce=Le[0],$e=Le[1],ue=function(It){var Dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function dn(){$e(It),we==null||we(It)}Dt?ji(dn):dn()},ie=f.useState(Ce),xe=oe(ie,2),_e=xe[0],ze=xe[1],st=f.useRef(!1),Ne=f.useMemo(function(){return(p==="inline"||p==="vertical")&&b?["vertical",b]:[p,!1]},[p,b]),Ie=oe(Ne,2),Ue=Ie[0],Ye=Ie[1],bt=Ue==="inline",At=f.useState(Ue),Ht=oe(At,2),Ft=Ht[0],Yt=Ht[1],Tt=f.useState(Ye),tn=oe(Tt,2),un=tn[0],Pt=tn[1];f.useEffect(function(){Yt(Ue),Pt(Ye),st.current&&(bt?$e(_e):ue(_r))},[Ue,Ye]);var Tn=f.useState(0),q=oe(Tn,2),V=q[0],ne=q[1],le=V>=de.length-1||Ft!=="horizontal"||x;f.useEffect(function(){bt&&ze(Ce)},[Ce]),f.useEffect(function(){return st.current=!0,function(){st.current=!1}},[]);var Se=Vy(),Ae=Se.registerPath,ct=Se.unregisterPath,Qe=Se.refreshOverflowKeys,it=Se.isSubPathKey,gt=Se.getKeyPath,Ve=Se.getKeys,ht=Se.getSubPathKeys,Ze=f.useMemo(function(){return{registerPath:Ae,unregisterPath:ct}},[Ae,ct]),kt=f.useMemo(function(){return{isSubPathKey:it}},[it]);f.useEffect(function(){Qe(le?_r:de.slice(V+1).map(function(Bt){return Bt.key}))},[V,le]);var je=an(D||P&&((n=de[0])===null||n===void 0?void 0:n.key),{value:D}),De=oe(je,2),Me=De[0],Be=De[1],et=ro(function(Bt){Be(Bt)}),yt=ro(function(){Be(void 0)});Do(t,function(){return{list:We.current,focus:function(It){var Dt,dn=Ve(),Ge=jl(dn,lt),nt=Ge.elements,sn=Ge.key2element,Kn=Ge.element2key,Ar=cu(We.current,nt),Yo=Me??(Ar[0]?Kn.get(Ar[0]):(Dt=de.find(function(St){return!St.props.disabled}))===null||Dt===void 0?void 0:Dt.key),Tr=sn.get(Yo);if(Yo&&Tr){var Ya;Tr==null||(Ya=Tr.focus)===null||Ya===void 0||Ya.call(Tr,It)}}}});var vt=an(F||[],{value:j,postState:function(It){return Array.isArray(It)?It:It==null?_r:[It]}}),_t=oe(vt,2),jt=_t[0],nn=_t[1],Dn=function(It){if(N){var Dt=It.key,dn=jt.includes(Dt),Ge;M?dn?Ge=jt.filter(function(sn){return sn!==Dt}):Ge=[].concat(rt(jt),[Dt]):Ge=[Dt],nn(Ge);var nt=ye(ye({},It),{},{selectedKeys:Ge});dn?_==null||_(nt):A==null||A(nt)}!M&&Ce.length&&Ft!=="inline"&&ue(_r)},Mn=ro(function(Bt){me==null||me(Bi(Bt)),Dn(Bt)}),Gn=ro(function(Bt,It){var Dt=Ce.filter(function(Ge){return Ge!==Bt});if(It)Dt.push(Bt);else if(Ft!=="inline"){var dn=ht(Bt);Dt=Dt.filter(function(Ge){return!dn.has(Ge)})}au(Ce,Dt,!0)||ue(Dt,!0)}),xr=function(It,Dt){var dn=Dt??!Ce.includes(It);Gn(It,dn)},Ka=Ly(Ft,Me,Fe,lt,We,Ve,gt,Be,xr,se);f.useEffect(function(){qe(!0)},[]);var Wa=f.useMemo(function(){return{_internalRenderMenuItem:ge,_internalRenderSubMenuItem:Ee}},[ge,Ee]),qa=Ft!=="horizontal"||x?de:de.map(function(Bt,It){return f.createElement(ho,{key:Bt.key,overflowDisabled:It>V},Bt)}),Ua=f.createElement($a,Oe({id:v,ref:We,prefixCls:"".concat(o,"-overflow"),component:"ul",itemComponent:fs,className:pe(o,"".concat(o,"-root"),"".concat(o,"-").concat(Ft),l,J(J({},"".concat(o,"-inline-collapsed"),un),"".concat(o,"-rtl"),Fe),i),dir:h,style:s,role:"menu",tabIndex:u,data:qa,renderRawItem:function(It){return It},renderRawRest:function(It){var Dt=It.length,dn=Dt?de.slice(-Dt):null;return f.createElement(ms,{eventKey:Rl,title:Y,disabled:le,internalPopupClose:Dt===0,popupClassName:ee},dn)},maxCount:Ft!=="horizontal"||x?$a.INVALIDATE:$a.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(It){ne(It)},onKeyDown:Ka},Pe));return f.createElement(lu.Provider,{value:Wa},f.createElement(jp.Provider,{value:lt},f.createElement(ho,{prefixCls:o,rootClassName:i,mode:Ft,openKeys:Ce,rtl:Fe,disabled:y,motion:tt?T:null,defaultMotions:tt?H:null,activeKey:Me,onActive:et,onInactive:yt,selectedKeys:jt,inlineIndent:z,subMenuOpenDelay:C,subMenuCloseDelay:E,forceSubMenuRender:k,builtinPlacements:G,triggerSubMenuAction:K,getPopupContainer:ce,itemIcon:U,expandIcon:Z,onItemClick:Mn,onOpenChange:Gn},f.createElement(Bp.Provider,{value:kt},Ua),f.createElement("div",{style:{display:"none"},"aria-hidden":!0},f.createElement(Tp.Provider,{value:Ze},Re)))))}),Ao=mb;Ao.Item=fs;Ao.SubMenu=ms;Ao.ItemGroup=pu;Ao.Divider=mu;const Wp=f.createContext({});var pb={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"},gb=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:pb}))},qp=f.forwardRef(gb);const Li=ra({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var vb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const Up=e=>{const{prefixCls:t,className:n,dashed:r}=e,a=vb(e,["prefixCls","className","dashed"]),{getPrefixCls:o}=f.useContext(cn),i=o("menu",t),s=pe({[`${i}-item-divider-dashed`]:!!r},n);return f.createElement(mu,Object.assign({className:s},a))},Yp=e=>{var t;const{className:n,children:r,icon:a,title:o,danger:i,extra:s}=e,{prefixCls:l,firstLevel:c,direction:u,disableMenuItemTitleTooltip:d,inlineCollapsed:g}=f.useContext(Li),h=x=>{const w=r==null?void 0:r[0],C=f.createElement("span",{className:pe(`${l}-title-content`,{[`${l}-title-content-with-extra`]:!!s||s===0})},r);return(!a||f.isValidElement(r)&&r.type==="span")&&r&&x&&c&&typeof w=="string"?f.createElement("div",{className:`${l}-inline-collapsed-noicon`},w.charAt(0)):C},{siderCollapsed:v}=f.useContext(Wp);let m=o;typeof o>"u"?m=c?r:"":o===!1&&(m="");const p={title:m};!v&&!g&&(p.title=null,p.open=!1);const b=ns(r).length;let y=f.createElement(fs,Object.assign({},Vn(e,["title","icon","danger"]),{className:pe({[`${l}-item-danger`]:i,[`${l}-item-only-child`]:(a?b+1:b)===1},n),title:typeof o=="string"?o:void 0}),Fr(a,{className:pe(f.isValidElement(a)?(t=a.props)===null||t===void 0?void 0:t.className:void 0,`${l}-item-icon`)}),h(g));return d||(y=f.createElement(Ro,Object.assign({},p,{placement:u==="rtl"?"left":"right",classNames:{root:`${l}-inline-collapsed-tooltip`}}),y)),y};var hb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const zi=f.createContext(null),yb=f.forwardRef((e,t)=>{const{children:n}=e,r=hb(e,["children"]),a=f.useContext(zi),o=f.useMemo(()=>Object.assign(Object.assign({},a),r),[a,r.prefixCls,r.mode,r.selectable,r.rootClassName]),i=V0(n),s=hp(t,i?nu(n):null);return f.createElement(zi.Provider,{value:o},f.createElement(vo,{space:!0},i?f.cloneElement(n,{ref:s}):n))}),bb=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:a,lineWidth:o,lineType:i,itemPaddingInline:s}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${fe(o)} ${i} ${a}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${t}-item:hover,
|
|
1
|
+
import{jsx as W,jsxs as Pe,Fragment as E0}from"react/jsx-runtime";import*as f from"react";import be,{forwardRef as Ar,useMemo as zt,useRef as St,useCallback as pa,useImperativeHandle as Mo,createContext as aa,useState as ft,useEffect as mt,useContext as En,Component as op,createElement as $a,PureComponent as k0,version as I0,useLayoutEffect as O0,isValidElement as N0}from"react";import{a as In}from"./assets/index-NIGUFBhG.js";import{Icon as Ut,defaultTheme as Zc,deepMergeTheme as D0}from"@mxmweb/zui";import*as M0 from"react-dom";import id,{flushSync as Ai,createPortal as F0}from"react-dom";import ip from"clipboard";import{Flipper as P0,Flipped as R0}from"react-flip-toolkit";import{ChatMessageAdapter as ld}from"@mxmweb/rtext";import{i as lp,g as sp,a as cp,b as up,c as dp,d as fp,e as mp,B as A0,t as T0,f as pp,h as j0,j as _0,k as B0,u as eu,l as Ti,m as tu,R as L0,n as z0,I as Zr,o as H0,C as sd}from"./assets/index-E7FJJ9zV.js";import{g as nu,t as V0,F as Jt,u as gp}from"./assets/index-BW1L5s38.js";import{w as Ht,K as kt,c as Fo,g as ru,s as vp,_ as Dt,a as oe,b as pe,T as au,d as Oe,e as J,u as K0,i as ou,f as ye,h as at,j as hp,k as on,l as On,m as yp,o as Kn,n as tl,p as nl,q as oa,r as ia,t as rl,C as al,v as pn,I as yn,x as un,y as Pr,z as W0,A as ho,B as fe,D as Po,E as ol,F as ar,G as Vn,H as bp,J as ji,L as gn,M as pr,N as xp,O as il,P as Yt,Q as la,R as iu,S as cd,U as q0,V as Cp,W as U0,X as lu,Y as sa,Z as pi,$ as Tn,a0 as wp,a1 as ca,a2 as Ro,a3 as Pa,a4 as Y0,a5 as G0,a6 as X0,a7 as ll,a8 as Sp,a9 as J0,aa as sl,ab as cl,ac as Ao,ad as vn,ae as ul,af as $p,ag as Q0,ah as Z0,ai as Ep,aj as ey,ak as ty,al as kp,am as ny,an as Ds,ao as _i,ap as ry,aq as ay,ar as oy,as as Je,at as Ms,au as Ir,av as xn,aw as iy,ax as ud,ay as ly,az as sy,aA as Kt,aB as dl,aC as Xo}from"./assets/index-CGHNxHzA.js";import{B as cy}from"./assets/index-Df9lUffW.js";import{F as Ea,i as Oa,s as Ip,a as Op,b as Np,c as Dp,d as Bi,R as uy,e as dy,g as fy,f as my,h as py,u as gy,j as vy,L as hy,S as yy}from"./assets/LeftOutlined-C1Tv2UIq.js";import{T as To,g as by,a as xy,b as Mp,c as Cy,d as wy}from"./assets/index-JdQHnMoG.js";import{g as dd,P as Sy,a as Fp,S as $y,T as Pp}from"./assets/index-DkrRMiqX.js";import{u as ea}from"./assets/index-CpW6Dhpp.js";/* empty css */import{c as vr}from"./assets/createLucideIcon-Bj5DlX2s.js";import{P as Rp}from"./assets/plus-B679mjyt.js";import{X as su}from"./assets/x-CdZQbi--.js";import{C as Ey}from"./assets/chevron-right-CrkLSPrQ.js";var ky=kt.ESC,Iy=kt.TAB;function Oy(e){var t=e.visible,n=e.triggerRef,r=e.onVisibleChange,a=e.autoFocus,o=e.overlayRef,i=f.useRef(!1),l=function(){if(t){var d,g;(d=n.current)===null||d===void 0||(g=d.focus)===null||g===void 0||g.call(d),r==null||r(!1)}},s=function(){var d;return(d=o.current)!==null&&d!==void 0&&d.focus?(o.current.focus(),i.current=!0,!0):!1},c=function(d){switch(d.keyCode){case ky:l();break;case Iy:{var g=!1;i.current||(g=s()),g?d.preventDefault():l();break}}};f.useEffect(function(){return t?(window.addEventListener("keydown",c),a&&Ht(s,3),function(){window.removeEventListener("keydown",c),i.current=!1}):function(){i.current=!1}},[t])}var Ny=Ar(function(e,t){var n=e.overlay,r=e.arrow,a=e.prefixCls,o=zt(function(){var l;return typeof n=="function"?l=n():l=n,l},[n]),i=Fo(t,ru(o));return be.createElement(be.Fragment,null,r&&be.createElement("div",{className:"".concat(a,"-arrow")}),be.cloneElement(o,{ref:vp(o)?i:void 0}))}),ga={adjustX:1,adjustY:1},va=[0,0],Dy={topLeft:{points:["bl","tl"],overflow:ga,offset:[0,-4],targetOffset:va},top:{points:["bc","tc"],overflow:ga,offset:[0,-4],targetOffset:va},topRight:{points:["br","tr"],overflow:ga,offset:[0,-4],targetOffset:va},bottomLeft:{points:["tl","bl"],overflow:ga,offset:[0,4],targetOffset:va},bottom:{points:["tc","bc"],overflow:ga,offset:[0,4],targetOffset:va},bottomRight:{points:["tr","br"],overflow:ga,offset:[0,4],targetOffset:va}},My=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function Fy(e,t){var n,r=e.arrow,a=r===void 0?!1:r,o=e.prefixCls,i=o===void 0?"rc-dropdown":o,l=e.transitionName,s=e.animation,c=e.align,u=e.placement,d=u===void 0?"bottomLeft":u,g=e.placements,h=g===void 0?Dy:g,v=e.getPopupContainer,m=e.showAction,p=e.hideAction,b=e.overlayClassName,y=e.overlayStyle,x=e.visible,w=e.trigger,C=w===void 0?["hover"]:w,S=e.autoFocus,E=e.overlay,k=e.children,$=e.onVisibleChange,O=Dt(e,My),D=be.useState(),P=oe(D,2),A=P[0],N=P[1],I="visible"in e?x:A,M=be.useRef(null),F=be.useRef(null),R=be.useRef(null);be.useImperativeHandle(t,function(){return M.current});var T=function(U){N(U),$==null||$(U)};Oy({visible:I,triggerRef:R,onVisibleChange:T,autoFocus:S,overlayRef:F});var _=function(U){var Z=e.onOverlayClick;N(!1),Z&&Z(U)},B=function(){return be.createElement(Ny,{ref:F,overlay:E,prefixCls:i,arrow:a})},L=function(){return typeof E=="function"?B:B()},j=function(){var U=e.minOverlayWidthMatchTrigger,Z=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?U:!Z},z=function(){var U=e.openClassName;return U!==void 0?U:"".concat(i,"-open")},K=be.cloneElement(k,{className:pe((n=k.props)===null||n===void 0?void 0:n.className,I&&z()),ref:vp(k)?Fo(R,ru(k)):void 0}),V=p;return!V&&C.indexOf("contextMenu")!==-1&&(V=["click"]),be.createElement(au,Oe({builtinPlacements:h},O,{prefixCls:i,ref:M,popupClassName:pe(b,J({},"".concat(i,"-show-arrow"),a)),popupStyle:y,action:C,showAction:m,hideAction:V,popupPlacement:d,popupAlign:c,popupTransitionName:l,popupAnimation:s,popupVisible:I,stretch:j()?"minWidth":"",popup:L(),onPopupVisibleChange:T,onPopupClick:_,getPopupContainer:v}),K)}const Py=be.forwardRef(Fy),Ry=e=>typeof e!="object"&&typeof e!="function"||e===null;var Ap=f.createContext(null);function Tp(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function jp(e){var t=f.useContext(Ap);return Tp(t,e)}var Ay=["children","locked"],rr=f.createContext(null);function Ty(e,t){var n=ye({},e);return Object.keys(t).forEach(function(r){var a=t[r];a!==void 0&&(n[r]=a)}),n}function yo(e){var t=e.children,n=e.locked,r=Dt(e,Ay),a=f.useContext(rr),o=K0(function(){return Ty(a,r)},[a,r],function(i,l){return!n&&(i[0]!==l[0]||!ou(i[1],l[1],!0))});return f.createElement(rr.Provider,{value:o},t)}var jy=[],_p=f.createContext(null);function fl(){return f.useContext(_p)}var Bp=f.createContext(jy);function Ra(e){var t=f.useContext(Bp);return f.useMemo(function(){return e!==void 0?[].concat(at(t),[e]):t},[t,e])}var Lp=f.createContext(null),cu=f.createContext({});function fd(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(hp(e)){var n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),a=e.getAttribute("tabindex"),o=Number(a),i=null;return a&&!Number.isNaN(o)?i=o:r&&i===null&&(i=0),r&&e.disabled&&(i=null),i!==null&&(i>=0||t&&i<0)}return!1}function _y(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=at(e.querySelectorAll("*")).filter(function(r){return fd(r,t)});return fd(e,t)&&n.unshift(e),n}var Fs=kt.LEFT,Ps=kt.RIGHT,Rs=kt.UP,gi=kt.DOWN,vi=kt.ENTER,zp=kt.ESC,Xa=kt.HOME,Ja=kt.END,md=[Rs,gi,Fs,Ps];function By(e,t,n,r){var a,o="prev",i="next",l="children",s="parent";if(e==="inline"&&r===vi)return{inlineTrigger:!0};var c=J(J({},Rs,o),gi,i),u=J(J(J(J({},Fs,n?i:o),Ps,n?o:i),gi,l),vi,l),d=J(J(J(J(J(J({},Rs,o),gi,i),vi,l),zp,s),Fs,n?l:s),Ps,n?s:l),g={inline:c,horizontal:u,vertical:d,inlineSub:c,horizontalSub:d,verticalSub:d},h=(a=g["".concat(e).concat(t?"":"Sub")])===null||a===void 0?void 0:a[r];switch(h){case o:return{offset:-1,sibling:!0};case i:return{offset:1,sibling:!0};case s:return{offset:-1,sibling:!1};case l:return{offset:1,sibling:!1};default:return null}}function Ly(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function zy(e,t){for(var n=e||document.activeElement;n;){if(t.has(n))return n;n=n.parentElement}return null}function uu(e,t){var n=_y(e,!0);return n.filter(function(r){return t.has(r)})}function pd(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var a=uu(e,t),o=a.length,i=a.findIndex(function(l){return n===l});return r<0?i===-1?i=o-1:i-=1:r>0&&(i+=1),i=(i+o)%o,a[i]}var As=function(t,n){var r=new Set,a=new Map,o=new Map;return t.forEach(function(i){var l=document.querySelector("[data-menu-id='".concat(Tp(n,i),"']"));l&&(r.add(l),o.set(l,i),a.set(i,l))}),{elements:r,key2element:a,element2key:o}};function Hy(e,t,n,r,a,o,i,l,s,c){var u=f.useRef(),d=f.useRef();d.current=t;var g=function(){Ht.cancel(u.current)};return f.useEffect(function(){return function(){g()}},[]),function(h){var v=h.which;if([].concat(md,[vi,zp,Xa,Ja]).includes(v)){var m=o(),p=As(m,r),b=p,y=b.elements,x=b.key2element,w=b.element2key,C=x.get(t),S=zy(C,y),E=w.get(S),k=By(e,i(E,!0).length===1,n,v);if(!k&&v!==Xa&&v!==Ja)return;(md.includes(v)||[Xa,Ja].includes(v))&&h.preventDefault();var $=function(F){if(F){var R=F,T=F.querySelector("a");T!=null&&T.getAttribute("href")&&(R=T);var _=w.get(F);l(_),g(),u.current=Ht(function(){d.current===_&&R.focus()})}};if([Xa,Ja].includes(v)||k.sibling||!S){var O;!S||e==="inline"?O=a.current:O=Ly(S);var D,P=uu(O,y);v===Xa?D=P[0]:v===Ja?D=P[P.length-1]:D=pd(O,y,S,k.offset),$(D)}else if(k.inlineTrigger)s(E);else if(k.offset>0)s(E,!0),g(),u.current=Ht(function(){p=As(m,r);var M=S.getAttribute("aria-controls"),F=document.getElementById(M),R=pd(F,p.elements);$(R)},5);else if(k.offset<0){var A=i(E,!0),N=A[A.length-2],I=x.get(N);s(N,!1),$(I)}}c==null||c(h)}}function Vy(e){Promise.resolve().then(e)}var du="__RC_UTIL_PATH_SPLIT__",gd=function(t){return t.join(du)},Ky=function(t){return t.split(du)},Ts="rc-menu-more";function Wy(){var e=f.useState({}),t=oe(e,2),n=t[1],r=St(new Map),a=St(new Map),o=f.useState([]),i=oe(o,2),l=i[0],s=i[1],c=St(0),u=St(!1),d=function(){u.current||n({})},g=pa(function(x,w){var C=gd(w);a.current.set(C,x),r.current.set(x,C),c.current+=1;var S=c.current;Vy(function(){S===c.current&&d()})},[]),h=pa(function(x,w){var C=gd(w);a.current.delete(C),r.current.delete(x)},[]),v=pa(function(x){s(x)},[]),m=pa(function(x,w){var C=r.current.get(x)||"",S=Ky(C);return w&&l.includes(S[0])&&S.unshift(Ts),S},[l]),p=pa(function(x,w){return x.filter(function(C){return C!==void 0}).some(function(C){var S=m(C,!0);return S.includes(w)})},[m]),b=function(){var w=at(r.current.keys());return l.length&&w.push(Ts),w},y=pa(function(x){var w="".concat(r.current.get(x)).concat(du),C=new Set;return at(a.current.keys()).forEach(function(S){S.startsWith(w)&&C.add(a.current.get(S))}),C},[]);return f.useEffect(function(){return function(){u.current=!0}},[]),{registerPath:g,unregisterPath:h,refreshOverflowKeys:v,isSubPathKey:p,getKeyPath:m,getKeys:b,getSubPathKeys:y}}function ao(e){var t=f.useRef(e);t.current=e;var n=f.useCallback(function(){for(var r,a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(o))},[]);return e?n:void 0}var qy=Math.random().toFixed(5).toString().slice(2),vd=0;function Uy(e){var t=on(e,{value:e}),n=oe(t,2),r=n[0],a=n[1];return f.useEffect(function(){vd+=1;var o="".concat(qy,"-").concat(vd);a("rc-menu-uuid-".concat(o))},[]),r}function Hp(e,t,n,r){var a=f.useContext(rr),o=a.activeKey,i=a.onActive,l=a.onInactive,s={active:o===e};return t||(s.onMouseEnter=function(c){n==null||n({key:e,domEvent:c}),i(e)},s.onMouseLeave=function(c){r==null||r({key:e,domEvent:c}),l(e)}),s}function Vp(e){var t=f.useContext(rr),n=t.mode,r=t.rtl,a=t.inlineIndent;if(n!=="inline")return null;var o=e;return r?{paddingRight:o*a}:{paddingLeft:o*a}}function Kp(e){var t=e.icon,n=e.props,r=e.children,a;return t===null||t===!1?null:(typeof t=="function"?a=f.createElement(t,ye({},n)):typeof t!="boolean"&&(a=t),a||r||null)}var Yy=["item"];function Li(e){var t=e.item,n=Dt(e,Yy);return Object.defineProperty(n,"item",{get:function(){return On(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),n}var Gy=["title","attribute","elementRef"],Xy=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Jy=["active"],Qy=(function(e){tl(n,e);var t=nl(n);function n(){return oa(this,n),t.apply(this,arguments)}return ia(n,[{key:"render",value:function(){var a=this.props,o=a.title,i=a.attribute,l=a.elementRef,s=Dt(a,Gy),c=Kn(s,["eventKey","popupClassName","popupOffset","onTitleClick"]);return On(!i,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),f.createElement(Ea.Item,Oe({},i,{title:typeof o=="string"?o:void 0},c,{ref:l}))}}]),n})(f.Component),Zy=f.forwardRef(function(e,t){var n=e.style,r=e.className,a=e.eventKey;e.warnKey;var o=e.disabled,i=e.itemIcon,l=e.children,s=e.role,c=e.onMouseEnter,u=e.onMouseLeave,d=e.onClick,g=e.onKeyDown,h=e.onFocus,v=Dt(e,Xy),m=jp(a),p=f.useContext(rr),b=p.prefixCls,y=p.onItemClick,x=p.disabled,w=p.overflowDisabled,C=p.itemIcon,S=p.selectedKeys,E=p.onActive,k=f.useContext(cu),$=k._internalRenderMenuItem,O="".concat(b,"-item"),D=f.useRef(),P=f.useRef(),A=x||o,N=yp(t,P),I=Ra(a),M=function(Z){return{key:a,keyPath:at(I).reverse(),item:D.current,domEvent:Z}},F=i||C,R=Hp(a,A,c,u),T=R.active,_=Dt(R,Jy),B=S.includes(a),L=Vp(I.length),j=function(Z){if(!A){var Q=M(Z);d==null||d(Li(Q)),y(Q)}},z=function(Z){if(g==null||g(Z),Z.which===kt.ENTER){var Q=M(Z);d==null||d(Li(Q)),y(Q)}},K=function(Z){E(a),h==null||h(Z)},V={};e.role==="option"&&(V["aria-selected"]=B);var G=f.createElement(Qy,Oe({ref:D,elementRef:N,role:s===null?"none":s||"menuitem",tabIndex:o?null:-1,"data-menu-id":w&&m?null:m},Kn(v,["extra"]),_,V,{component:"li","aria-disabled":o,style:ye(ye({},L),n),className:pe(O,J(J(J({},"".concat(O,"-active"),T),"".concat(O,"-selected"),B),"".concat(O,"-disabled"),A),r),onClick:j,onKeyDown:z,onFocus:K}),l,f.createElement(Kp,{props:ye(ye({},e),{},{isSelected:B}),icon:F}));return $&&(G=$(G,e,{selected:B})),G});function eb(e,t){var n=e.eventKey,r=fl(),a=Ra(n);return f.useEffect(function(){if(r)return r.registerPath(n,a),function(){r.unregisterPath(n,a)}},[a]),r?null:f.createElement(Zy,Oe({},e,{ref:t}))}const ml=f.forwardRef(eb);var tb=["className","children"],nb=function(t,n){var r=t.className,a=t.children,o=Dt(t,tb),i=f.useContext(rr),l=i.prefixCls,s=i.mode,c=i.rtl;return f.createElement("ul",Oe({className:pe(l,c&&"".concat(l,"-rtl"),"".concat(l,"-sub"),"".concat(l,"-").concat(s==="inline"?"inline":"vertical"),r),role:"menu"},o,{"data-menu-list":!0,ref:n}),a)},fu=f.forwardRef(nb);fu.displayName="SubMenuList";function mu(e,t){return rl(e).map(function(n,r){if(f.isValidElement(n)){var a,o,i=n.key,l=(a=(o=n.props)===null||o===void 0?void 0:o.eventKey)!==null&&a!==void 0?a:i,s=l==null;s&&(l="tmp_key-".concat([].concat(at(t),[r]).join("-")));var c={key:l,eventKey:l};return f.cloneElement(n,c)}return n})}var Cn={adjustX:1,adjustY:1},rb={topLeft:{points:["bl","tl"],overflow:Cn},topRight:{points:["br","tr"],overflow:Cn},bottomLeft:{points:["tl","bl"],overflow:Cn},bottomRight:{points:["tr","br"],overflow:Cn},leftTop:{points:["tr","tl"],overflow:Cn},leftBottom:{points:["br","bl"],overflow:Cn},rightTop:{points:["tl","tr"],overflow:Cn},rightBottom:{points:["bl","br"],overflow:Cn}},ab={topLeft:{points:["bl","tl"],overflow:Cn},topRight:{points:["br","tr"],overflow:Cn},bottomLeft:{points:["tl","bl"],overflow:Cn},bottomRight:{points:["tr","br"],overflow:Cn},rightTop:{points:["tr","tl"],overflow:Cn},rightBottom:{points:["br","bl"],overflow:Cn},leftTop:{points:["tl","tr"],overflow:Cn},leftBottom:{points:["bl","br"],overflow:Cn}};function Wp(e,t,n){if(t)return t;if(n)return n[e]||n.other}var ob={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function ib(e){var t=e.prefixCls,n=e.visible,r=e.children,a=e.popup,o=e.popupStyle,i=e.popupClassName,l=e.popupOffset,s=e.disabled,c=e.mode,u=e.onVisibleChange,d=f.useContext(rr),g=d.getPopupContainer,h=d.rtl,v=d.subMenuOpenDelay,m=d.subMenuCloseDelay,p=d.builtinPlacements,b=d.triggerSubMenuAction,y=d.forceSubMenuRender,x=d.rootClassName,w=d.motion,C=d.defaultMotions,S=f.useState(!1),E=oe(S,2),k=E[0],$=E[1],O=h?ye(ye({},ab),p):ye(ye({},rb),p),D=ob[c],P=Wp(c,w,C),A=f.useRef(P);c!=="inline"&&(A.current=P);var N=ye(ye({},A.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),I=f.useRef();return f.useEffect(function(){return I.current=Ht(function(){$(n)}),function(){Ht.cancel(I.current)}},[n]),f.createElement(au,{prefixCls:t,popupClassName:pe("".concat(t,"-popup"),J({},"".concat(t,"-rtl"),h),i,x),stretch:c==="horizontal"?"minWidth":null,getPopupContainer:g,builtinPlacements:O,popupPlacement:D,popupVisible:k,popup:a,popupStyle:o,popupAlign:l&&{offset:l},action:s?[]:[b],mouseEnterDelay:v,mouseLeaveDelay:m,onPopupVisibleChange:u,forceRender:y,popupMotion:N,fresh:!0},r)}function lb(e){var t=e.id,n=e.open,r=e.keyPath,a=e.children,o="inline",i=f.useContext(rr),l=i.prefixCls,s=i.forceSubMenuRender,c=i.motion,u=i.defaultMotions,d=i.mode,g=f.useRef(!1);g.current=d===o;var h=f.useState(!g.current),v=oe(h,2),m=v[0],p=v[1],b=g.current?n:!1;f.useEffect(function(){g.current&&p(!1)},[d]);var y=ye({},Wp(o,c,u));r.length>1&&(y.motionAppear=!1);var x=y.onVisibleChanged;return y.onVisibleChanged=function(w){return!g.current&&!w&&p(!0),x==null?void 0:x(w)},m?null:f.createElement(yo,{mode:o,locked:!g.current},f.createElement(al,Oe({visible:b},y,{forceRender:s,removeOnLeave:!1,leavedClassName:"".concat(l,"-hidden")}),function(w){var C=w.className,S=w.style;return f.createElement(fu,{id:t,className:C,style:S},a)}))}var sb=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],cb=["active"],ub=f.forwardRef(function(e,t){var n=e.style,r=e.className,a=e.title,o=e.eventKey;e.warnKey;var i=e.disabled,l=e.internalPopupClose,s=e.children,c=e.itemIcon,u=e.expandIcon,d=e.popupClassName,g=e.popupOffset,h=e.popupStyle,v=e.onClick,m=e.onMouseEnter,p=e.onMouseLeave,b=e.onTitleClick,y=e.onTitleMouseEnter,x=e.onTitleMouseLeave,w=Dt(e,sb),C=jp(o),S=f.useContext(rr),E=S.prefixCls,k=S.mode,$=S.openKeys,O=S.disabled,D=S.overflowDisabled,P=S.activeKey,A=S.selectedKeys,N=S.itemIcon,I=S.expandIcon,M=S.onItemClick,F=S.onOpenChange,R=S.onActive,T=f.useContext(cu),_=T._internalRenderSubMenuItem,B=f.useContext(Lp),L=B.isSubPathKey,j=Ra(),z="".concat(E,"-submenu"),K=O||i,V=f.useRef(),G=f.useRef(),U=c??N,Z=u??I,Q=$.includes(o),Y=!D&&Q,ee=L(A,o),ce=Hp(o,K,y,x),me=ce.active,we=Dt(ce,cb),le=f.useState(!1),ge=oe(le,2),Ee=ge[0],_e=ge[1],Re=function(ue){K||_e(ue)},he=function(ue){Re(!0),m==null||m({key:o,domEvent:ue})},ke=function(ue){Re(!1),p==null||p({key:o,domEvent:ue})},de=f.useMemo(function(){return me||(k!=="inline"?Ee||L([P],o):!1)},[k,me,P,Ee,o,L]),Te=Vp(j.length),Ve=function(ue){K||(b==null||b({key:o,domEvent:ue}),k==="inline"&&F(o,!Q))},We=ao(function($e){v==null||v(Li($e)),M($e)}),nt=function(ue){k!=="inline"&&F(o,ue)},Ue=function(){R(o)},qe=C&&"".concat(C,"-popup"),ct=f.useMemo(function(){return f.createElement(Kp,{icon:k!=="horizontal"?Z:void 0,props:ye(ye({},e),{},{isOpen:Y,isSubMenu:!0})},f.createElement("i",{className:"".concat(z,"-arrow")}))},[k,Z,e,Y,z]),Fe=f.createElement("div",Oe({role:"menuitem",style:Te,className:"".concat(z,"-title"),tabIndex:K?null:-1,ref:V,title:typeof a=="string"?a:null,"data-menu-id":D&&C?null:C,"aria-expanded":Y,"aria-haspopup":!0,"aria-controls":qe,"aria-disabled":K,onClick:Ve,onFocus:Ue},we),a,ct),ae=f.useRef(k);if(k!=="inline"&&j.length>1?ae.current="vertical":ae.current=k,!D){var ze=ae.current;Fe=f.createElement(ib,{mode:ze,prefixCls:z,visible:!l&&Y&&k!=="inline",popupClassName:d,popupOffset:g,popupStyle:h,popup:f.createElement(yo,{mode:ze==="horizontal"?"vertical":ze},f.createElement(fu,{id:qe,ref:G},s)),disabled:K,onVisibleChange:nt},Fe)}var Ce=f.createElement(Ea.Item,Oe({ref:t,role:"none"},w,{component:"li",style:n,className:pe(z,"".concat(z,"-").concat(k),r,J(J(J(J({},"".concat(z,"-open"),Y),"".concat(z,"-active"),de),"".concat(z,"-selected"),ee),"".concat(z,"-disabled"),K)),onMouseEnter:he,onMouseLeave:ke}),Fe,!D&&f.createElement(lb,{id:qe,open:Y,keyPath:j},s));return _&&(Ce=_(Ce,e,{selected:ee,active:de,open:Y,disabled:K})),f.createElement(yo,{onItemClick:We,mode:k==="horizontal"?"vertical":k,itemIcon:U,expandIcon:Z},Ce)}),pl=f.forwardRef(function(e,t){var n=e.eventKey,r=e.children,a=Ra(n),o=mu(r,a),i=fl();f.useEffect(function(){if(i)return i.registerPath(n,a),function(){i.unregisterPath(n,a)}},[a]);var l;return i?l=o:l=f.createElement(ub,Oe({ref:t},e),o),f.createElement(Bp.Provider,{value:a},l)});function pu(e){var t=e.className,n=e.style,r=f.useContext(rr),a=r.prefixCls,o=fl();return o?null:f.createElement("li",{role:"separator",className:pe("".concat(a,"-item-divider"),t),style:n})}var db=["className","title","eventKey","children"],fb=f.forwardRef(function(e,t){var n=e.className,r=e.title;e.eventKey;var a=e.children,o=Dt(e,db),i=f.useContext(rr),l=i.prefixCls,s="".concat(l,"-item-group");return f.createElement("li",Oe({ref:t,role:"presentation"},o,{onClick:function(u){return u.stopPropagation()},className:pe(s,n)}),f.createElement("div",{role:"presentation",className:"".concat(s,"-title"),title:typeof r=="string"?r:void 0},r),f.createElement("ul",{role:"group",className:"".concat(s,"-list")},a))}),gu=f.forwardRef(function(e,t){var n=e.eventKey,r=e.children,a=Ra(n),o=mu(r,a),i=fl();return i?o:f.createElement(fb,Oe({ref:t},Kn(e,["warnKey"])),o)}),mb=["label","children","key","type","extra"];function js(e,t,n){var r=t.item,a=t.group,o=t.submenu,i=t.divider;return(e||[]).map(function(l,s){if(l&&pn(l)==="object"){var c=l,u=c.label,d=c.children,g=c.key,h=c.type,v=c.extra,m=Dt(c,mb),p=g??"tmp-".concat(s);return d||h==="group"?h==="group"?f.createElement(a,Oe({key:p},m,{title:u}),js(d,t,n)):f.createElement(o,Oe({key:p},m,{title:u}),js(d,t,n)):h==="divider"?f.createElement(i,Oe({key:p},m)):f.createElement(r,Oe({key:p},m,{extra:v}),u,(!!v||v===0)&&f.createElement("span",{className:"".concat(n,"-item-extra")},v))}return null}).filter(function(l){return l})}function hd(e,t,n,r,a){var o=e,i=ye({divider:pu,item:ml,group:gu,submenu:pl},r);return t&&(o=js(t,i,a)),mu(o,n)}var pb=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],Br=[],gb=f.forwardRef(function(e,t){var n,r=e,a=r.prefixCls,o=a===void 0?"rc-menu":a,i=r.rootClassName,l=r.style,s=r.className,c=r.tabIndex,u=c===void 0?0:c,d=r.items,g=r.children,h=r.direction,v=r.id,m=r.mode,p=m===void 0?"vertical":m,b=r.inlineCollapsed,y=r.disabled,x=r.disabledOverflow,w=r.subMenuOpenDelay,C=w===void 0?.1:w,S=r.subMenuCloseDelay,E=S===void 0?.1:S,k=r.forceSubMenuRender,$=r.defaultOpenKeys,O=r.openKeys,D=r.activeKey,P=r.defaultActiveFirst,A=r.selectable,N=A===void 0?!0:A,I=r.multiple,M=I===void 0?!1:I,F=r.defaultSelectedKeys,R=r.selectedKeys,T=r.onSelect,_=r.onDeselect,B=r.inlineIndent,L=B===void 0?24:B,j=r.motion,z=r.defaultMotions,K=r.triggerSubMenuAction,V=K===void 0?"hover":K,G=r.builtinPlacements,U=r.itemIcon,Z=r.expandIcon,Q=r.overflowedIndicator,Y=Q===void 0?"...":Q,ee=r.overflowedIndicatorPopupClassName,ce=r.getPopupContainer,me=r.onClick,we=r.onOpenChange,le=r.onKeyDown;r.openAnimation,r.openTransitionName;var ge=r._internalRenderMenuItem,Ee=r._internalRenderSubMenuItem,_e=r._internalComponents,Re=Dt(r,pb),he=f.useMemo(function(){return[hd(g,d,Br,_e,o),hd(g,d,Br,{},o)]},[g,d,_e]),ke=oe(he,2),de=ke[0],Te=ke[1],Ve=f.useState(!1),We=oe(Ve,2),nt=We[0],Ue=We[1],qe=f.useRef(),ct=Uy(v),Fe=h==="rtl",ae=on($,{value:O,postState:function(Ot){return Ot||Br}}),ze=oe(ae,2),Ce=ze[0],$e=ze[1],ue=function(Ot){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function fn(){$e(Ot),we==null||we(Ot)}Mt?Ai(fn):fn()},ie=f.useState(Ce),xe=oe(ie,2),Be=xe[0],He=xe[1],st=f.useRef(!1),Ne=f.useMemo(function(){return(p==="inline"||p==="vertical")&&b?["vertical",b]:[p,!1]},[p,b]),Ie=oe(Ne,2),Ye=Ie[0],Ge=Ie[1],xt=Ye==="inline",jt=f.useState(Ye),Vt=oe(jt,2),Pt=Vt[0],Gt=Vt[1],_t=f.useState(Ge),nn=oe(_t,2),dn=nn[0],Rt=nn[1];f.useEffect(function(){Gt(Ye),Rt(Ge),st.current&&(xt?$e(Be):ue(Br))},[Ye,Ge]);var _n=f.useState(0),q=oe(_n,2),H=q[0],ne=q[1],se=H>=de.length-1||Pt!=="horizontal"||x;f.useEffect(function(){xt&&He(Ce)},[Ce]),f.useEffect(function(){return st.current=!0,function(){st.current=!1}},[]);var Se=Wy(),je=Se.registerPath,ut=Se.unregisterPath,Ze=Se.refreshOverflowKeys,lt=Se.isSubPathKey,vt=Se.getKeyPath,Ke=Se.getKeys,yt=Se.getSubPathKeys,et=f.useMemo(function(){return{registerPath:je,unregisterPath:ut}},[je,ut]),It=f.useMemo(function(){return{isSubPathKey:lt}},[lt]);f.useEffect(function(){Ze(se?Br:de.slice(H+1).map(function(Lt){return Lt.key}))},[H,se]);var Ae=on(D||P&&((n=de[0])===null||n===void 0?void 0:n.key),{value:D}),De=oe(Ae,2),Me=De[0],Le=De[1],tt=ao(function(Lt){Le(Lt)}),bt=ao(function(){Le(void 0)});Mo(t,function(){return{list:qe.current,focus:function(Ot){var Mt,fn=Ke(),Xe=As(fn,ct),rt=Xe.elements,sn=Xe.key2element,Wn=Xe.element2key,jr=uu(qe.current,rt),Go=Me??(jr[0]?Wn.get(jr[0]):(Mt=de.find(function($t){return!$t.props.disabled}))===null||Mt===void 0?void 0:Mt.key),_r=sn.get(Go);if(Go&&_r){var Ga;_r==null||(Ga=_r.focus)===null||Ga===void 0||Ga.call(_r,Ot)}}}});var ht=on(F||[],{value:R,postState:function(Ot){return Array.isArray(Ot)?Ot:Ot==null?Br:[Ot]}}),Bt=oe(ht,2),At=Bt[0],rn=Bt[1],Mn=function(Ot){if(N){var Mt=Ot.key,fn=At.includes(Mt),Xe;M?fn?Xe=At.filter(function(sn){return sn!==Mt}):Xe=[].concat(at(At),[Mt]):Xe=[Mt],rn(Xe);var rt=ye(ye({},Ot),{},{selectedKeys:Xe});fn?_==null||_(rt):T==null||T(rt)}!M&&Ce.length&&Pt!=="inline"&&ue(Br)},Fn=ao(function(Lt){me==null||me(Li(Lt)),Mn(Lt)}),Xn=ao(function(Lt,Ot){var Mt=Ce.filter(function(Xe){return Xe!==Lt});if(Ot)Mt.push(Lt);else if(Pt!=="inline"){var fn=yt(Lt);Mt=Mt.filter(function(Xe){return!fn.has(Xe)})}ou(Ce,Mt,!0)||ue(Mt,!0)}),Cr=function(Ot,Mt){var fn=Mt??!Ce.includes(Ot);Xn(Ot,fn)},Wa=Hy(Pt,Me,Fe,ct,qe,Ke,vt,Le,Cr,le);f.useEffect(function(){Ue(!0)},[]);var qa=f.useMemo(function(){return{_internalRenderMenuItem:ge,_internalRenderSubMenuItem:Ee}},[ge,Ee]),Ua=Pt!=="horizontal"||x?de:de.map(function(Lt,Ot){return f.createElement(yo,{key:Lt.key,overflowDisabled:Ot>H},Lt)}),Ya=f.createElement(Ea,Oe({id:v,ref:qe,prefixCls:"".concat(o,"-overflow"),component:"ul",itemComponent:ml,className:pe(o,"".concat(o,"-root"),"".concat(o,"-").concat(Pt),s,J(J({},"".concat(o,"-inline-collapsed"),dn),"".concat(o,"-rtl"),Fe),i),dir:h,style:l,role:"menu",tabIndex:u,data:Ua,renderRawItem:function(Ot){return Ot},renderRawRest:function(Ot){var Mt=Ot.length,fn=Mt?de.slice(-Mt):null;return f.createElement(pl,{eventKey:Ts,title:Y,disabled:se,internalPopupClose:Mt===0,popupClassName:ee},fn)},maxCount:Pt!=="horizontal"||x?Ea.INVALIDATE:Ea.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Ot){ne(Ot)},onKeyDown:Wa},Re));return f.createElement(cu.Provider,{value:qa},f.createElement(Ap.Provider,{value:ct},f.createElement(yo,{prefixCls:o,rootClassName:i,mode:Pt,openKeys:Ce,rtl:Fe,disabled:y,motion:nt?j:null,defaultMotions:nt?z:null,activeKey:Me,onActive:tt,onInactive:bt,selectedKeys:At,inlineIndent:L,subMenuOpenDelay:C,subMenuCloseDelay:E,forceSubMenuRender:k,builtinPlacements:G,triggerSubMenuAction:V,getPopupContainer:ce,itemIcon:U,expandIcon:Z,onItemClick:Fn,onOpenChange:Xn},f.createElement(Lp.Provider,{value:It},Ya),f.createElement("div",{style:{display:"none"},"aria-hidden":!0},f.createElement(_p.Provider,{value:et},Te)))))}),jo=gb;jo.Item=ml;jo.SubMenu=pl;jo.ItemGroup=gu;jo.Divider=pu;const qp=f.createContext({});var vb={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"},hb=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:vb}))},Up=f.forwardRef(hb);const zi=aa({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var yb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const Yp=e=>{const{prefixCls:t,className:n,dashed:r}=e,a=yb(e,["prefixCls","className","dashed"]),{getPrefixCls:o}=f.useContext(un),i=o("menu",t),l=pe({[`${i}-item-divider-dashed`]:!!r},n);return f.createElement(pu,Object.assign({className:l},a))},Gp=e=>{var t;const{className:n,children:r,icon:a,title:o,danger:i,extra:l}=e,{prefixCls:s,firstLevel:c,direction:u,disableMenuItemTitleTooltip:d,inlineCollapsed:g}=f.useContext(zi),h=x=>{const w=r==null?void 0:r[0],C=f.createElement("span",{className:pe(`${s}-title-content`,{[`${s}-title-content-with-extra`]:!!l||l===0})},r);return(!a||f.isValidElement(r)&&r.type==="span")&&r&&x&&c&&typeof w=="string"?f.createElement("div",{className:`${s}-inline-collapsed-noicon`},w.charAt(0)):C},{siderCollapsed:v}=f.useContext(qp);let m=o;typeof o>"u"?m=c?r:"":o===!1&&(m="");const p={title:m};!v&&!g&&(p.title=null,p.open=!1);const b=rl(r).length;let y=f.createElement(ml,Object.assign({},Kn(e,["title","icon","danger"]),{className:pe({[`${s}-item-danger`]:i,[`${s}-item-only-child`]:(a?b+1:b)===1},n),title:typeof o=="string"?o:void 0}),Pr(a,{className:pe(f.isValidElement(a)?(t=a.props)===null||t===void 0?void 0:t.className:void 0,`${s}-item-icon`)}),h(g));return d||(y=f.createElement(To,Object.assign({},p,{placement:u==="rtl"?"left":"right",classNames:{root:`${s}-inline-collapsed-tooltip`}}),y)),y};var bb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const Hi=f.createContext(null),xb=f.forwardRef((e,t)=>{const{children:n}=e,r=bb(e,["children"]),a=f.useContext(Hi),o=f.useMemo(()=>Object.assign(Object.assign({},a),r),[a,r.prefixCls,r.mode,r.selectable,r.rootClassName]),i=W0(n),l=yp(t,i?ru(n):null);return f.createElement(Hi.Provider,{value:o},f.createElement(ho,{space:!0},i?f.cloneElement(n,{ref:l}):n))}),Cb=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:a,lineWidth:o,lineType:i,itemPaddingInline:l}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${fe(o)} ${i} ${a}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:l},[`> ${t}-item:hover,
|
|
2
2
|
> ${t}-item-active,
|
|
3
|
-
> ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},
|
|
4
|
-
${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${fe(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${fe(t)})`}}}}),
|
|
3
|
+
> ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},wb=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
|
|
4
|
+
${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${fe(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${fe(t)})`}}}}),yd=e=>Po(e),bd=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:a,subMenuItemSelectedColor:o,groupTitleColor:i,itemBg:l,subMenuItemBg:s,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:d,activeBarBorderWidth:g,motionDurationSlow:h,motionEaseInOut:v,motionEaseOut:m,itemPaddingInline:p,motionDurationMid:b,itemHoverColor:y,lineType:x,colorSplit:w,itemDisabledColor:C,dangerItemColor:S,dangerItemHoverColor:E,dangerItemSelectedColor:k,dangerItemActiveBg:$,dangerItemSelectedBg:O,popupBg:D,itemHoverBg:P,itemActiveBg:A,menuSubMenuBg:N,horizontalItemSelectedColor:I,horizontalItemSelectedBg:M,horizontalItemBorderRadius:F,horizontalItemHoverBg:R}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:l,[`&${n}-root:focus-visible`]:Object.assign({},yd(e)),[`${n}-item`]:{"&-group-title, &-extra":{color:i}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:o},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:Object.assign({},yd(e))},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${C} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:y}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:P},"&:active":{backgroundColor:A}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:P},"&:active":{backgroundColor:A}}},[`${n}-item-danger`]:{color:S,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:E}},[`&${n}-item:active`]:{background:$}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:a,[`&${n}-item-danger`]:{color:k},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:O}},[`&${n}-submenu > ${n}`]:{backgroundColor:N},[`&${n}-popup > ${n}`]:{backgroundColor:D},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:D},[`&${n}-horizontal`]:Object.assign(Object.assign({},t==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:g,marginTop:e.calc(g).mul(-1).equal(),marginBottom:0,borderRadius:F,"&::after":{position:"absolute",insetInline:p,bottom:0,borderBottom:`${fe(u)} solid transparent`,transition:`border-color ${h} ${v}`,content:'""'},"&:hover, &-active, &-open":{background:R,"&::after":{borderBottomWidth:u,borderBottomColor:I}},"&-selected":{color:I,backgroundColor:M,"&:hover":{backgroundColor:M},"&::after":{borderBottomWidth:u,borderBottomColor:I}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${fe(g)} ${x} ${w}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:s},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${fe(d)} solid ${a}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${b} ${m}`,`opacity ${b} ${m}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:k}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${b} ${v}`,`opacity ${b} ${v}`].join(",")}}}}}},xd=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:a,menuArrowSize:o,marginXS:i,itemMarginBlock:l,itemWidth:s,itemPaddingInline:c}=e,u=e.calc(o).add(a).add(i).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:fe(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:l,width:s},[`> ${t}-item,
|
|
5
5
|
> ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:fe(n)},[`${t}-item-group-list ${t}-submenu-title,
|
|
6
|
-
${t}-submenu-title`]:{paddingInlineEnd:u}}},
|
|
6
|
+
${t}-submenu-title`]:{paddingInlineEnd:u}}},Sb=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:a,dropdownWidth:o,controlHeightLG:i,motionEaseOut:l,paddingXL:s,itemMarginInline:c,fontSizeLG:u,motionDurationFast:d,motionDurationSlow:g,paddingXS:h,boxShadowSecondary:v,collapsedWidth:m,collapsedIconSize:p}=e,b={height:r,lineHeight:fe(r),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},xd(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},xd(e)),{boxShadow:v})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:o,maxHeight:`calc(100vh - ${fe(e.calc(i).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${g}`,`background ${g}`,`padding ${d} ${l}`].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`]:b,[`& ${t}-item-group-title`]:{paddingInlineStart:s}},[`${t}-item`]:b}},{[`${t}-inline-collapsed`]:{width:m,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${t}-item,
|
|
7
7
|
> ${t}-item-group > ${t}-item-group-list > ${t}-item,
|
|
8
8
|
> ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
|
|
9
9
|
> ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${fe(e.calc(p).div(2).equal())} - ${fe(c)})`,textOverflow:"clip",[`
|
|
10
10
|
${t}-submenu-arrow,
|
|
11
11
|
${t}-submenu-expand-icon
|
|
12
|
-
`]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:p,lineHeight:fe(r),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:a}},[`${t}-item-group-title`]:Object.assign(Object.assign({},
|
|
13
|
-
&-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${fe(m)})`},"&::after":{transform:`rotate(45deg) translateX(${fe(e.calc(m).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${fe(e.calc(v).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${fe(e.calc(m).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${fe(m)})`}}})},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},Sb=e=>{var t,n,r;const{colorPrimary:a,colorError:o,colorTextDisabled:i,colorErrorBg:s,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:g,lineWidth:h,lineWidthBold:v,controlItemBgActive:m,colorBgTextHover:p,controlHeightLG:b,lineHeight:y,colorBgElevated:x,marginXXS:w,padding:C,fontSize:S,controlHeightSM:E,fontSizeLG:k,colorTextLightSolid:$,colorErrorHover:O}=e,D=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,P=(n=e.activeBarBorderWidth)!==null&&n!==void 0?n:h,R=(r=e.itemMarginInline)!==null&&r!==void 0?r:e.marginXXS,N=new mr($).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:l,itemColor:l,colorItemTextHover:l,itemHoverColor:l,colorItemTextHoverHorizontal:a,horizontalItemHoverColor:a,colorGroupTitle:c,groupTitleColor:c,colorItemTextSelected:a,itemSelectedColor:a,subMenuItemSelectedColor:a,colorItemTextSelectedHorizontal:a,horizontalItemSelectedColor:a,colorItemBg:u,itemBg:u,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:g,itemActiveBg:m,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:m,itemSelectedBg:m,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:D,colorActiveBarHeight:v,activeBarHeight:v,colorActiveBarBorderSize:h,activeBarBorderWidth:P,colorItemTextDisabled:i,itemDisabledColor:i,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:R,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:b,groupTitleLineHeight:y,collapsedWidth:b*2,popupBg:x,itemMarginBlock:w,itemPaddingInline:C,horizontalLineHeight:`${b*1.15}px`,iconSize:S,iconMarginInlineEnd:E-S,collapsedIconSize:k,groupTitleFontSize:S,darkItemDisabledColor:new mr($).setA(.25).toRgbString(),darkItemColor:N,darkDangerItemColor:o,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:$,darkItemSelectedBg:a,darkDangerItemSelectedBg:o,darkItemHoverBg:"transparent",darkGroupTitleColor:N,darkItemHoverColor:$,darkDangerItemHoverColor:O,darkDangerItemSelectedColor:$,darkDangerItemActiveBg:o,itemWidth:D?`calc(100% + ${P}px)`:`calc(100% - ${R*2}px)`}},$b=(e,t=e,n=!0)=>rr("Menu",a=>{const{colorBgElevated:o,controlHeightLG:i,fontSize:s,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:g,darkItemSelectedBg:h,darkDangerItemSelectedBg:v,darkItemHoverBg:m,darkGroupTitleColor:p,darkItemHoverColor:b,darkItemDisabledColor:y,darkDangerItemHoverColor:x,darkDangerItemSelectedColor:w,darkDangerItemActiveBg:C,popupBg:S,darkPopupBg:E}=a,k=a.calc(s).div(7).mul(5).equal(),$=Hn(a,{menuArrowSize:k,menuHorizontalHeight:a.calc(i).mul(1.15).equal(),menuArrowOffset:a.calc(k).mul(.25).equal(),menuSubMenuBg:o,calc:a.calc,popupBg:S}),O=Hn($,{itemColor:l,itemHoverColor:b,groupTitleColor:p,itemSelectedColor:g,subMenuItemSelectedColor:g,itemBg:u,popupBg:E,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:h,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:m,itemDisabledColor:y,dangerItemColor:c,dangerItemHoverColor:x,dangerItemSelectedColor:w,dangerItemActiveBg:C,dangerItemSelectedBg:v,menuSubMenuBg:d,horizontalItemSelectedColor:g,horizontalItemSelectedBg:h});return[wb($),bb($),Cb($),yd($,"light"),yd(O,"dark"),xb($),tu($),Ia($,"slide-up"),Ia($,"slide-down"),yp($,"zoom-big")]},Sb,{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:n,unitless:{groupTitleLineHeight:!0}})(e,t),Gp=e=>{var t;const{popupClassName:n,icon:r,title:a,theme:o}=e,i=f.useContext(Li),{prefixCls:s,inlineCollapsed:l,theme:c}=i,u=Pa();let d;if(!r)d=l&&!u.length&&a&&typeof a=="string"?f.createElement("div",{className:`${s}-inline-collapsed-noicon`},a.charAt(0)):f.createElement("span",{className:`${s}-title-content`},a);else{const v=f.isValidElement(a)&&a.type==="span";d=f.createElement(f.Fragment,null,Fr(r,{className:pe(f.isValidElement(r)?(t=r.props)===null||t===void 0?void 0:t.className:void 0,`${s}-item-icon`)}),v?a:f.createElement("span",{className:`${s}-title-content`},a))}const g=f.useMemo(()=>Object.assign(Object.assign({},i),{firstLevel:!1}),[i]),[h]=os("Menu");return f.createElement(Li.Provider,{value:g},f.createElement(ms,Object.assign({},Vn(e,["icon"]),{title:d,popupClassName:pe(s,n,`${s}-${o||c}`),popupStyle:Object.assign({zIndex:h},e.popupStyle)})))};var Eb=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};function zs(e){return e===null||e===!1}const kb={item:Yp,submenu:Gp,divider:Up},Ib=jr((e,t)=>{var n;const r=f.useContext(zi),a=r||{},{getPrefixCls:o,getPopupContainer:i,direction:s,menu:l}=f.useContext(cn),c=o(),{prefixCls:u,className:d,style:g,theme:h="light",expandIcon:v,_internalDisableMenuItemTitleTooltip:m,inlineCollapsed:p,siderCollapsed:b,rootClassName:y,mode:x,selectable:w,onClick:C,overflowedIndicatorPopupClassName:S}=e,E=Eb(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),k=Vn(E,["collapsedWidth"]);(n=a.validator)===null||n===void 0||n.call(a,{mode:x});const $=Ut((...z)=>{var T;C==null||C.apply(void 0,z),(T=a.onClick)===null||T===void 0||T.call(a)}),O=a.mode||x,D=w??a.selectable,P=p??b,R={horizontal:{motionName:`${c}-slide-up`},inline:ou(c),other:{motionName:`${c}-zoom-big`}},N=o("menu",u||a.prefixCls),I=ia(N),[M,F,j]=$b(N,I,!r),A=pe(`${N}-${h}`,l==null?void 0:l.className,d),_=f.useMemo(()=>{var z,T;if(typeof v=="function"||zs(v))return v||null;if(typeof a.expandIcon=="function"||zs(a.expandIcon))return a.expandIcon||null;if(typeof(l==null?void 0:l.expandIcon)=="function"||zs(l==null?void 0:l.expandIcon))return(l==null?void 0:l.expandIcon)||null;const H=(z=v??(a==null?void 0:a.expandIcon))!==null&&z!==void 0?z:l==null?void 0:l.expandIcon;return Fr(H,{className:pe(`${N}-submenu-expand-icon`,f.isValidElement(H)?(T=H.props)===null||T===void 0?void 0:T.className:void 0)})},[v,a==null?void 0:a.expandIcon,l==null?void 0:l.expandIcon,N]),L=f.useMemo(()=>({prefixCls:N,inlineCollapsed:P||!1,direction:s,firstLevel:!0,theme:h,mode:O,disableMenuItemTitleTooltip:m}),[N,P,s,m,h]);return M(f.createElement(zi.Provider,{value:null},f.createElement(Li.Provider,{value:L},f.createElement(Ao,Object.assign({getPopupContainer:i,overflowedIndicator:f.createElement(qp,null),overflowedIndicatorPopupClassName:pe(N,`${N}-${h}`,S),mode:O,selectable:D,onClick:$},k,{inlineCollapsed:P,style:Object.assign(Object.assign({},l==null?void 0:l.style),g),className:A,prefixCls:N,direction:s,defaultMotions:R,expandIcon:_,ref:t,rootClassName:pe(y,F,a.rootClassName,j,I),_internalComponents:kb})))))}),To=jr((e,t)=>{const n=wt(null),r=f.useContext(Wp);return Do(t,()=>({menu:n.current,focus:a=>{var o;(o=n.current)===null||o===void 0||o.focus(a)}})),f.createElement(Ib,Object.assign({ref:n},e,r))});To.Item=Yp;To.SubMenu=Gp;To.Divider=Up;To.ItemGroup=pu;const Ob=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:a}=e,o=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${o}`]:{[`&${o}-danger:not(${o}-disabled)`]:{color:r,"&:hover":{color:a,backgroundColor:r}}}}}},Nb=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:a,sizePopupArrow:o,antCls:i,iconCls:s,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:g,fontSizeIcon:h,controlPaddingHorizontal:v,colorBgElevated:m}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(o).div(2).sub(a).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${i}-btn`]:{[`& > ${s}-down, & > ${i}-btn-icon > ${s}-down`]:{fontSize:h}},[`${t}-wrap`]:{position:"relative",[`${i}-btn > ${s}-down`]:{fontSize:h},[`${s}-down::before`]:{transition:`transform ${l}`}},[`${t}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottomLeft,
|
|
12
|
+
`]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:p,lineHeight:fe(r),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:a}},[`${t}-item-group-title`]:Object.assign(Object.assign({},ol),{paddingInline:h})}}]},Cd=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:a,motionEaseOut:o,iconCls:i,iconSize:l,iconMarginInlineEnd:s}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background ${n}`,`padding calc(${n} + 0.1s) ${a}`].join(","),[`${t}-item-icon, ${i}`]:{minWidth:l,fontSize:l,transition:[`font-size ${r} ${o}`,`margin ${n} ${a}`,`color ${n}`].join(","),"+ span":{marginInlineStart:s,opacity:1,transition:[`opacity ${n} ${a}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:Object.assign({},xp()),[`&${t}-item-only-child`]:{[`> ${i}, > ${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"}}}},wd=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:a,menuArrowSize:o,menuArrowOffset:i}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:o,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${r}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(o).mul(.6).equal(),height:e.calc(o).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:a,transition:[`background ${n} ${r}`,`transform ${n} ${r}`,`top ${n} ${r}`,`color ${n} ${r}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${fe(e.calc(i).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${fe(i)})`}}}}},$b=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:a,motionDurationMid:o,motionEaseInOut:i,paddingXS:l,padding:s,colorSplit:c,lineWidth:u,zIndexPopup:d,borderRadiusLG:g,subMenuItemBorderRadius:h,menuArrowSize:v,menuArrowOffset:m,lineType:p,groupTitleLineHeight:b,groupTitleFontSize:y}=e;return[{"":{[n]:Object.assign(Object.assign({},ji()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},gn(e)),ji()),{marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${a} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${fe(l)} ${fe(s)}`,fontSize:y,lineHeight:b,transition:`all ${a}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${a} ${i}`,`background ${a} ${i}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${a} ${i}`,`background ${a} ${i}`,`padding ${o} ${i}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${a} ${i}`,`padding ${a} ${i}`].join(",")},[`${n}-title-content`]:{transition:`color ${a}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:p,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),Cd(e)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${fe(e.calc(r).mul(2).equal())} ${fe(s)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:d,borderRadius:g,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:Object.assign(Object.assign(Object.assign({borderRadius:g},Cd(e)),wd(e)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:h},[`${n}-submenu-title::after`]:{transition:`transform ${a} ${i}`}})},"\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}}}),wd(e)),{[`&-inline-collapsed ${n}-submenu-arrow,
|
|
13
|
+
&-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${fe(m)})`},"&::after":{transform:`rotate(45deg) translateX(${fe(e.calc(m).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${fe(e.calc(v).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${fe(e.calc(m).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${fe(m)})`}}})},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},Eb=e=>{var t,n,r;const{colorPrimary:a,colorError:o,colorTextDisabled:i,colorErrorBg:l,colorText:s,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:g,lineWidth:h,lineWidthBold:v,controlItemBgActive:m,colorBgTextHover:p,controlHeightLG:b,lineHeight:y,colorBgElevated:x,marginXXS:w,padding:C,fontSize:S,controlHeightSM:E,fontSizeLG:k,colorTextLightSolid:$,colorErrorHover:O}=e,D=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,P=(n=e.activeBarBorderWidth)!==null&&n!==void 0?n:h,A=(r=e.itemMarginInline)!==null&&r!==void 0?r:e.marginXXS,N=new pr($).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:s,itemColor:s,colorItemTextHover:s,itemHoverColor:s,colorItemTextHoverHorizontal:a,horizontalItemHoverColor:a,colorGroupTitle:c,groupTitleColor:c,colorItemTextSelected:a,itemSelectedColor:a,subMenuItemSelectedColor:a,colorItemTextSelectedHorizontal:a,horizontalItemSelectedColor:a,colorItemBg:u,itemBg:u,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:g,itemActiveBg:m,colorSubItemBg:d,subMenuItemBg:d,colorItemBgSelected:m,itemSelectedBg:m,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:D,colorActiveBarHeight:v,activeBarHeight:v,colorActiveBarBorderSize:h,activeBarBorderWidth:P,colorItemTextDisabled:i,itemDisabledColor:i,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:l,dangerItemActiveBg:l,colorDangerItemBgSelected:l,dangerItemSelectedBg:l,itemMarginInline:A,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:b,groupTitleLineHeight:y,collapsedWidth:b*2,popupBg:x,itemMarginBlock:w,itemPaddingInline:C,horizontalLineHeight:`${b*1.15}px`,iconSize:S,iconMarginInlineEnd:E-S,collapsedIconSize:k,groupTitleFontSize:S,darkItemDisabledColor:new pr($).setA(.25).toRgbString(),darkItemColor:N,darkDangerItemColor:o,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:$,darkItemSelectedBg:a,darkDangerItemSelectedBg:o,darkItemHoverBg:"transparent",darkGroupTitleColor:N,darkItemHoverColor:$,darkDangerItemHoverColor:O,darkDangerItemSelectedColor:$,darkDangerItemActiveBg:o,itemWidth:D?`calc(100% + ${P}px)`:`calc(100% - ${A*2}px)`}},kb=(e,t=e,n=!0)=>ar("Menu",a=>{const{colorBgElevated:o,controlHeightLG:i,fontSize:l,darkItemColor:s,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:d,darkItemSelectedColor:g,darkItemSelectedBg:h,darkDangerItemSelectedBg:v,darkItemHoverBg:m,darkGroupTitleColor:p,darkItemHoverColor:b,darkItemDisabledColor:y,darkDangerItemHoverColor:x,darkDangerItemSelectedColor:w,darkDangerItemActiveBg:C,popupBg:S,darkPopupBg:E}=a,k=a.calc(l).div(7).mul(5).equal(),$=Vn(a,{menuArrowSize:k,menuHorizontalHeight:a.calc(i).mul(1.15).equal(),menuArrowOffset:a.calc(k).mul(.25).equal(),menuSubMenuBg:o,calc:a.calc,popupBg:S}),O=Vn($,{itemColor:s,itemHoverColor:b,groupTitleColor:p,itemSelectedColor:g,subMenuItemSelectedColor:g,itemBg:u,popupBg:E,subMenuItemBg:d,itemActiveBg:"transparent",itemSelectedBg:h,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:m,itemDisabledColor:y,dangerItemColor:c,dangerItemHoverColor:x,dangerItemSelectedColor:w,dangerItemActiveBg:C,dangerItemSelectedBg:v,menuSubMenuBg:d,horizontalItemSelectedColor:g,horizontalItemSelectedBg:h});return[$b($),Cb($),Sb($),bd($,"light"),bd(O,"dark"),wb($),nu($),Oa($,"slide-up"),Oa($,"slide-down"),bp($,"zoom-big")]},Eb,{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:n,unitless:{groupTitleLineHeight:!0}})(e,t),Xp=e=>{var t;const{popupClassName:n,icon:r,title:a,theme:o}=e,i=f.useContext(zi),{prefixCls:l,inlineCollapsed:s,theme:c}=i,u=Ra();let d;if(!r)d=s&&!u.length&&a&&typeof a=="string"?f.createElement("div",{className:`${l}-inline-collapsed-noicon`},a.charAt(0)):f.createElement("span",{className:`${l}-title-content`},a);else{const v=f.isValidElement(a)&&a.type==="span";d=f.createElement(f.Fragment,null,Pr(r,{className:pe(f.isValidElement(r)?(t=r.props)===null||t===void 0?void 0:t.className:void 0,`${l}-item-icon`)}),v?a:f.createElement("span",{className:`${l}-title-content`},a))}const g=f.useMemo(()=>Object.assign(Object.assign({},i),{firstLevel:!1}),[i]),[h]=il("Menu");return f.createElement(zi.Provider,{value:g},f.createElement(pl,Object.assign({},Kn(e,["icon"]),{title:d,popupClassName:pe(l,n,`${l}-${o||c}`),popupStyle:Object.assign({zIndex:h},e.popupStyle)})))};var Ib=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};function Hl(e){return e===null||e===!1}const Ob={item:Gp,submenu:Xp,divider:Yp},Nb=Ar((e,t)=>{var n;const r=f.useContext(Hi),a=r||{},{getPrefixCls:o,getPopupContainer:i,direction:l,menu:s}=f.useContext(un),c=o(),{prefixCls:u,className:d,style:g,theme:h="light",expandIcon:v,_internalDisableMenuItemTitleTooltip:m,inlineCollapsed:p,siderCollapsed:b,rootClassName:y,mode:x,selectable:w,onClick:C,overflowedIndicatorPopupClassName:S}=e,E=Ib(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),k=Kn(E,["collapsedWidth"]);(n=a.validator)===null||n===void 0||n.call(a,{mode:x});const $=Yt((...L)=>{var j;C==null||C.apply(void 0,L),(j=a.onClick)===null||j===void 0||j.call(a)}),O=a.mode||x,D=w??a.selectable,P=p??b,A={horizontal:{motionName:`${c}-slide-up`},inline:iu(c),other:{motionName:`${c}-zoom-big`}},N=o("menu",u||a.prefixCls),I=la(N),[M,F,R]=kb(N,I,!r),T=pe(`${N}-${h}`,s==null?void 0:s.className,d),_=f.useMemo(()=>{var L,j;if(typeof v=="function"||Hl(v))return v||null;if(typeof a.expandIcon=="function"||Hl(a.expandIcon))return a.expandIcon||null;if(typeof(s==null?void 0:s.expandIcon)=="function"||Hl(s==null?void 0:s.expandIcon))return(s==null?void 0:s.expandIcon)||null;const z=(L=v??(a==null?void 0:a.expandIcon))!==null&&L!==void 0?L:s==null?void 0:s.expandIcon;return Pr(z,{className:pe(`${N}-submenu-expand-icon`,f.isValidElement(z)?(j=z.props)===null||j===void 0?void 0:j.className:void 0)})},[v,a==null?void 0:a.expandIcon,s==null?void 0:s.expandIcon,N]),B=f.useMemo(()=>({prefixCls:N,inlineCollapsed:P||!1,direction:l,firstLevel:!0,theme:h,mode:O,disableMenuItemTitleTooltip:m}),[N,P,l,m,h]);return M(f.createElement(Hi.Provider,{value:null},f.createElement(zi.Provider,{value:B},f.createElement(jo,Object.assign({getPopupContainer:i,overflowedIndicator:f.createElement(Up,null),overflowedIndicatorPopupClassName:pe(N,`${N}-${h}`,S),mode:O,selectable:D,onClick:$},k,{inlineCollapsed:P,style:Object.assign(Object.assign({},s==null?void 0:s.style),g),className:T,prefixCls:N,direction:l,defaultMotions:A,expandIcon:_,ref:t,rootClassName:pe(y,F,a.rootClassName,R,I),_internalComponents:Ob})))))}),_o=Ar((e,t)=>{const n=St(null),r=f.useContext(qp);return Mo(t,()=>({menu:n.current,focus:a=>{var o;(o=n.current)===null||o===void 0||o.focus(a)}})),f.createElement(Nb,Object.assign({ref:n},e,r))});_o.Item=Gp;_o.SubMenu=Xp;_o.Divider=Yp;_o.ItemGroup=gu;const Db=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:a}=e,o=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${o}`]:{[`&${o}-danger:not(${o}-disabled)`]:{color:r,"&:hover":{color:a,backgroundColor:r}}}}}},Mb=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:a,sizePopupArrow:o,antCls:i,iconCls:l,motionDurationMid:s,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:d,colorTextDisabled:g,fontSizeIcon:h,controlPaddingHorizontal:v,colorBgElevated:m}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(o).div(2).sub(a).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${i}-btn`]:{[`& > ${l}-down, & > ${i}-btn-icon > ${l}-down`]:{fontSize:h}},[`${t}-wrap`]:{position:"relative",[`${i}-btn > ${l}-down`]:{fontSize:h},[`${l}-down::before`]:{transition:`transform ${s}`}},[`${t}-wrap-open`]:{[`${l}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottomLeft,
|
|
14
14
|
&${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottomLeft,
|
|
15
15
|
&${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottom,
|
|
16
16
|
&${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottom,
|
|
17
17
|
&${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottomRight,
|
|
18
|
-
&${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:
|
|
18
|
+
&${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:Dp},[`&${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-topLeft,
|
|
19
19
|
&${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-topLeft,
|
|
20
20
|
&${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-top,
|
|
21
21
|
&${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-top,
|
|
22
22
|
&${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-topRight,
|
|
23
|
-
&${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-topRight`]:{animationName:
|
|
23
|
+
&${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Np},[`&${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottomLeft,
|
|
24
24
|
&${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottom,
|
|
25
|
-
&${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:
|
|
25
|
+
&${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Op},[`&${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-topLeft,
|
|
26
26
|
&${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-top,
|
|
27
|
-
&${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-topRight`]:{animationName:kp}}},hy(e,m,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:Object.assign(Object.assign({},pn(e)),{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},ld(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${fe(c)} ${fe(v)}`,color:e.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-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:'""'}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${fe(c)} ${fe(v)}`,color:e.colorText,fontWeight:"normal",fontSize:u,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},ld(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:g,cursor:"not-allowed","&:hover":{color:g,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${fe(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:h,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${fe(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(v).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:g,backgroundColor:m,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[Ia(e,"slide-up"),Ia(e,"slide-down"),_i(e,"move-up"),_i(e,"move-down"),yp(e,"zoom-big")]]},Db=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},yy({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),Dp(e)),Mb=rr("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:a}=e,o=Hn(e,{menuCls:`${a}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[Nb(o),Ob(o)]},Db,{resetStyle:!1}),ps=e=>{var t;const{menu:n,arrow:r,prefixCls:a,children:o,trigger:i,disabled:s,dropdownRender:l,popupRender:c,getPopupContainer:u,overlayClassName:d,rootClassName:g,overlayStyle:h,open:v,onOpenChange:m,visible:p,onVisibleChange:b,mouseEnterDelay:y=.15,mouseLeaveDelay:x=.1,autoAdjustOverflow:w=!0,placement:C="",overlay:S,transitionName:E,destroyOnHidden:k,destroyPopupOnHide:$}=e,{getPopupContainer:O,getPrefixCls:D,direction:P,dropdown:R}=f.useContext(cn),N=c||l;K0();const I=f.useMemo(()=>{const ge=D();return E!==void 0?E:C.includes("top")?`${ge}-slide-down`:`${ge}-slide-up`},[D,C,E]),M=f.useMemo(()=>C?C.includes("Center")?C.slice(0,C.indexOf("Center")):C:P==="rtl"?"bottomRight":"bottomLeft",[C,P]),F=D("dropdown",a),j=ia(F),[A,_,L]=Mb(F,j),[,z]=xp(),T=f.Children.only(Fy(o)?f.createElement("span",null,o):o),H=Fr(T,{className:pe(`${F}-trigger`,{[`${F}-rtl`]:P==="rtl"},T.props.className),disabled:(t=T.props.disabled)!==null&&t!==void 0?t:s}),W=s?[]:i,K=!!(W!=null&&W.includes("contextMenu")),[G,U]=an(!1,{value:v??p}),Z=Ut(ge=>{m==null||m(ge,{source:"trigger"}),b==null||b(ge),U(ge)}),Q=pe(d,g,_,L,j,R==null?void 0:R.className,{[`${F}-rtl`]:P==="rtl"}),Y=by({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:w,offset:z.marginXXS,arrowWidth:r?z.sizePopupArrow:0,borderRadius:z.borderRadius}),ee=f.useCallback(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(m==null||m(!1,{source:"menu"}),U(!1))},[n==null?void 0:n.selectable,n==null?void 0:n.multiple]),ce=()=>{let ge;return n!=null&&n.items?ge=f.createElement(To,Object.assign({},n)):typeof S=="function"?ge=S():ge=S,N&&(ge=N(ge)),ge=f.Children.only(typeof ge=="string"?f.createElement("span",null,ge):ge),f.createElement(yb,{prefixCls:`${F}-menu`,rootClassName:pe(L,j),expandIcon:f.createElement("span",{className:`${F}-menu-submenu-arrow`},P==="rtl"?f.createElement(ly,{className:`${F}-menu-submenu-arrow-icon`}):f.createElement(cy,{className:`${F}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ee,validator:({mode:Ee})=>{}},ge)},[me,we]=os("Dropdown",h==null?void 0:h.zIndex);let se=f.createElement(My,Object.assign({alignPoint:K},Vn(e,["rootClassName"]),{mouseEnterDelay:y,mouseLeaveDelay:x,visible:G,builtinPlacements:Y,arrow:!!r,overlayClassName:Q,prefixCls:F,getPopupContainer:u||O,transitionName:I,trigger:W,overlay:ce,placement:M,onVisibleChange:Z,overlayStyle:Object.assign(Object.assign(Object.assign({},R==null?void 0:R.style),h),{zIndex:me}),autoDestroy:k??$}),H);return me&&(se=f.createElement(W0.Provider,{value:we},se)),A(se)},Fb=iu(ps,"align",void 0,"dropdown",e=>e),Pb=e=>f.createElement(Fb,Object.assign({},e),f.createElement("span",null));ps._InternalPanelDoNotUseOrYouWillBeFired=Pb;var vi={exports:{}},jb=vi.exports,wd;function Rb(){return wd||(wd=1,(function(e,t){(function(n,r){e.exports=r()})(jb,(function(){var n=1e3,r=6e4,a=36e5,o="millisecond",i="second",s="minute",l="hour",c="day",u="week",d="month",g="quarter",h="year",v="date",m="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var I=["th","st","nd","rd"],M=N%100;return"["+N+(I[(M-20)%10]||I[M]||I[0])+"]"}},x=function(N,I,M){var F=String(N);return!F||F.length>=I?N:""+Array(I+1-F.length).join(M)+N},w={s:x,z:function(N){var I=-N.utcOffset(),M=Math.abs(I),F=Math.floor(M/60),j=M%60;return(I<=0?"+":"-")+x(F,2,"0")+":"+x(j,2,"0")},m:function N(I,M){if(I.date()<M.date())return-N(M,I);var F=12*(M.year()-I.year())+(M.month()-I.month()),j=I.clone().add(F,d),A=M-j<0,_=I.clone().add(F+(A?-1:1),d);return+(-(F+(M-j)/(A?j-_:_-j))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:d,y:h,w:u,d:c,D:v,h:l,m:s,s:i,ms:o,Q:g}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},C="en",S={};S[C]=y;var E="$isDayjsObject",k=function(N){return N instanceof P||!(!N||!N[E])},$=function N(I,M,F){var j;if(!I)return C;if(typeof I=="string"){var A=I.toLowerCase();S[A]&&(j=A),M&&(S[A]=M,j=A);var _=I.split("-");if(!j&&_.length>1)return N(_[0])}else{var L=I.name;S[L]=I,j=L}return!F&&j&&(C=j),j||!F&&C},O=function(N,I){if(k(N))return N.clone();var M=typeof I=="object"?I:{};return M.date=N,M.args=arguments,new P(M)},D=w;D.l=$,D.i=k,D.w=function(N,I){return O(N,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var P=(function(){function N(M){this.$L=$(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[E]=!0}var I=N.prototype;return I.parse=function(M){this.$d=(function(F){var j=F.date,A=F.utc;if(j===null)return new Date(NaN);if(D.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var _=j.match(p);if(_){var L=_[2]-1||0,z=(_[7]||"0").substring(0,3);return A?new Date(Date.UTC(_[1],L,_[3]||1,_[4]||0,_[5]||0,_[6]||0,z)):new Date(_[1],L,_[3]||1,_[4]||0,_[5]||0,_[6]||0,z)}}return new Date(j)})(M),this.init()},I.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},I.$utils=function(){return D},I.isValid=function(){return this.$d.toString()!==m},I.isSame=function(M,F){var j=O(M);return this.startOf(F)<=j&&j<=this.endOf(F)},I.isAfter=function(M,F){return O(M)<this.startOf(F)},I.isBefore=function(M,F){return this.endOf(F)<O(M)},I.$g=function(M,F,j){return D.u(M)?this[F]:this.set(j,M)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(M,F){var j=this,A=!!D.u(F)||F,_=D.p(M),L=function(Z,Q){var Y=D.w(j.$u?Date.UTC(j.$y,Q,Z):new Date(j.$y,Q,Z),j);return A?Y:Y.endOf(c)},z=function(Z,Q){return D.w(j.toDate()[Z].apply(j.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(Q)),j)},T=this.$W,H=this.$M,W=this.$D,K="set"+(this.$u?"UTC":"");switch(_){case h:return A?L(1,0):L(31,11);case d:return A?L(1,H):L(0,H+1);case u:var G=this.$locale().weekStart||0,U=(T<G?T+7:T)-G;return L(A?W-U:W+(6-U),H);case c:case v:return z(K+"Hours",0);case l:return z(K+"Minutes",1);case s:return z(K+"Seconds",2);case i:return z(K+"Milliseconds",3);default:return this.clone()}},I.endOf=function(M){return this.startOf(M,!1)},I.$set=function(M,F){var j,A=D.p(M),_="set"+(this.$u?"UTC":""),L=(j={},j[c]=_+"Date",j[v]=_+"Date",j[d]=_+"Month",j[h]=_+"FullYear",j[l]=_+"Hours",j[s]=_+"Minutes",j[i]=_+"Seconds",j[o]=_+"Milliseconds",j)[A],z=A===c?this.$D+(F-this.$W):F;if(A===d||A===h){var T=this.clone().set(v,1);T.$d[L](z),T.init(),this.$d=T.set(v,Math.min(this.$D,T.daysInMonth())).$d}else L&&this.$d[L](z);return this.init(),this},I.set=function(M,F){return this.clone().$set(M,F)},I.get=function(M){return this[D.p(M)]()},I.add=function(M,F){var j,A=this;M=Number(M);var _=D.p(F),L=function(H){var W=O(A);return D.w(W.date(W.date()+Math.round(H*M)),A)};if(_===d)return this.set(d,this.$M+M);if(_===h)return this.set(h,this.$y+M);if(_===c)return L(1);if(_===u)return L(7);var z=(j={},j[s]=r,j[l]=a,j[i]=n,j)[_]||1,T=this.$d.getTime()+M*z;return D.w(T,this)},I.subtract=function(M,F){return this.add(-1*M,F)},I.format=function(M){var F=this,j=this.$locale();if(!this.isValid())return j.invalidDate||m;var A=M||"YYYY-MM-DDTHH:mm:ssZ",_=D.z(this),L=this.$H,z=this.$m,T=this.$M,H=j.weekdays,W=j.months,K=j.meridiem,G=function(Q,Y,ee,ce){return Q&&(Q[Y]||Q(F,A))||ee[Y].slice(0,ce)},U=function(Q){return D.s(L%12||12,Q,"0")},Z=K||function(Q,Y,ee){var ce=Q<12?"AM":"PM";return ee?ce.toLowerCase():ce};return A.replace(b,(function(Q,Y){return Y||(function(ee){switch(ee){case"YY":return String(F.$y).slice(-2);case"YYYY":return D.s(F.$y,4,"0");case"M":return T+1;case"MM":return D.s(T+1,2,"0");case"MMM":return G(j.monthsShort,T,W,3);case"MMMM":return G(W,T);case"D":return F.$D;case"DD":return D.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return G(j.weekdaysMin,F.$W,H,2);case"ddd":return G(j.weekdaysShort,F.$W,H,3);case"dddd":return H[F.$W];case"H":return String(L);case"HH":return D.s(L,2,"0");case"h":return U(1);case"hh":return U(2);case"a":return Z(L,z,!0);case"A":return Z(L,z,!1);case"m":return String(z);case"mm":return D.s(z,2,"0");case"s":return String(F.$s);case"ss":return D.s(F.$s,2,"0");case"SSS":return D.s(F.$ms,3,"0");case"Z":return _}return null})(Q)||_.replace(":","")}))},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(M,F,j){var A,_=this,L=D.p(F),z=O(M),T=(z.utcOffset()-this.utcOffset())*r,H=this-z,W=function(){return D.m(_,z)};switch(L){case h:A=W()/12;break;case d:A=W();break;case g:A=W()/3;break;case u:A=(H-T)/6048e5;break;case c:A=(H-T)/864e5;break;case l:A=H/a;break;case s:A=H/r;break;case i:A=H/n;break;default:A=H}return j?A:D.a(A)},I.daysInMonth=function(){return this.endOf(d).$D},I.$locale=function(){return S[this.$L]},I.locale=function(M,F){if(!M)return this.$L;var j=this.clone(),A=$(M,F,!0);return A&&(j.$L=A),j},I.clone=function(){return D.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},N})(),R=P.prototype;return O.prototype=R,[["$ms",o],["$s",i],["$m",s],["$H",l],["$W",c],["$M",d],["$y",h],["$D",v]].forEach((function(N){R[N[1]]=function(I){return this.$g(I,N[0],N[1])}})),O.extend=function(N,I){return N.$i||(N(I,P,O),N.$i=!0),O},O.locale=$,O.isDayjs=k,O.unix=function(N){return O(1e3*N)},O.en=S[C],O.Ls=S,O.p={},O}))})(vi)),vi.exports}var Ab=Rb();const Cn=sa(Ab);var hi={exports:{}},Tb=hi.exports,Sd;function _b(){return Sd||(Sd=1,(function(e,t){(function(n,r){e.exports=r()})(Tb,(function(){return function(n,r){r.prototype.weekday=function(a){var o=this.$locale().weekStart||0,i=this.$W,s=(i<o?i+7:i)-o;return this.$utils().u(a)?s:this.subtract(s,"day").add(a,"day")}}}))})(hi)),hi.exports}var Bb=_b();const Lb=sa(Bb);var yi={exports:{}},zb=yi.exports,$d;function Hb(){return $d||($d=1,(function(e,t){(function(n,r){e.exports=r()})(zb,(function(){return function(n,r,a){var o=r.prototype,i=function(d){return d&&(d.indexOf?d:d.s)},s=function(d,g,h,v,m){var p=d.name?d:d.$locale(),b=i(p[g]),y=i(p[h]),x=b||y.map((function(C){return C.slice(0,v)}));if(!m)return x;var w=p.weekStart;return x.map((function(C,S){return x[(S+(w||0))%7]}))},l=function(){return a.Ls[a.locale()]},c=function(d,g){return d.formats[g]||(function(h){return h.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(v,m,p){return m||p.slice(1)}))})(d.formats[g.toUpperCase()])},u=function(){var d=this;return{months:function(g){return g?g.format("MMMM"):s(d,"months")},monthsShort:function(g){return g?g.format("MMM"):s(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(g){return g?g.format("dddd"):s(d,"weekdays")},weekdaysMin:function(g){return g?g.format("dd"):s(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(g){return g?g.format("ddd"):s(d,"weekdaysShort","weekdays",3)},longDateFormat:function(g){return c(d.$locale(),g)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return u.bind(this)()},a.localeData=function(){var d=l();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return a.weekdays()},weekdaysShort:function(){return a.weekdaysShort()},weekdaysMin:function(){return a.weekdaysMin()},months:function(){return a.months()},monthsShort:function(){return a.monthsShort()},longDateFormat:function(g){return c(d,g)},meridiem:d.meridiem,ordinal:d.ordinal}},a.months=function(){return s(l(),"months")},a.monthsShort=function(){return s(l(),"monthsShort","months",3)},a.weekdays=function(d){return s(l(),"weekdays",null,null,d)},a.weekdaysShort=function(d){return s(l(),"weekdaysShort","weekdays",3,d)},a.weekdaysMin=function(d){return s(l(),"weekdaysMin","weekdays",2,d)}}}))})(yi)),yi.exports}var Vb=Hb();const Kb=sa(Vb);var bi={exports:{}},Wb=bi.exports,Ed;function qb(){return Ed||(Ed=1,(function(e,t){(function(n,r){e.exports=r()})(Wb,(function(){var n="week",r="year";return function(a,o,i){var s=o.prototype;s.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=i(this).startOf(r).add(1,r).date(c),d=i(this).endOf(n);if(u.isBefore(d))return 1}var g=i(this).startOf(r).date(c).startOf(n).subtract(1,"millisecond"),h=this.diff(g,n,!0);return h<0?i(this).startOf("week").week():Math.ceil(h)},s.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}}))})(bi)),bi.exports}var Ub=qb();const Yb=sa(Ub);var xi={exports:{}},Gb=xi.exports,kd;function Xb(){return kd||(kd=1,(function(e,t){(function(n,r){e.exports=r()})(Gb,(function(){return function(n,r){r.prototype.weekYear=function(){var a=this.month(),o=this.week(),i=this.year();return o===1&&a===11?i+1:a===0&&o>=52?i-1:i}}}))})(xi)),xi.exports}var Jb=Xb();const Qb=sa(Jb);var Ci={exports:{}},Zb=Ci.exports,Id;function ex(){return Id||(Id=1,(function(e,t){(function(n,r){e.exports=r()})(Zb,(function(){return function(n,r){var a=r.prototype,o=a.format;a.format=function(i){var s=this,l=this.$locale();if(!this.isValid())return o.bind(this)(i);var c=this.$utils(),u=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(d){switch(d){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return l.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return l.ordinal(s.week(),"W");case"w":case"ww":return c.s(s.week(),d==="w"?1:2,"0");case"W":case"WW":return c.s(s.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return c.s(String(s.$H===0?24:s.$H),d==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return d}}));return o.bind(this)(u)}}}))})(Ci)),Ci.exports}var tx=ex();const nx=sa(tx);var wi={exports:{}},rx=wi.exports,Od;function ax(){return Od||(Od=1,(function(e,t){(function(n,r){e.exports=r()})(rx,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,o=/\d\d/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},c=function(p){return(p=+p)+(p>68?1900:2e3)},u=function(p){return function(b){this[p]=+b}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=(function(b){if(!b||b==="Z")return 0;var y=b.match(/([+-]|\d\d)/g),x=60*y[1]+(+y[2]||0);return x===0?0:y[0]==="+"?-x:x})(p)}],g=function(p){var b=l[p];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(p,b){var y,x=l.meridiem;if(x){for(var w=1;w<=24;w+=1)if(p.indexOf(x(w,0,b))>-1){y=w>12;break}}else y=p===(b?"pm":"PM");return y},v={A:[s,function(p){this.afternoon=h(p,!1)}],a:[s,function(p){this.afternoon=h(p,!0)}],Q:[a,function(p){this.month=3*(p-1)+1}],S:[a,function(p){this.milliseconds=100*+p}],SS:[o,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[i,u("seconds")],ss:[i,u("seconds")],m:[i,u("minutes")],mm:[i,u("minutes")],H:[i,u("hours")],h:[i,u("hours")],HH:[i,u("hours")],hh:[i,u("hours")],D:[i,u("day")],DD:[o,u("day")],Do:[s,function(p){var b=l.ordinal,y=p.match(/\d+/);if(this.day=y[0],b)for(var x=1;x<=31;x+=1)b(x).replace(/\[|\]/g,"")===p&&(this.day=x)}],w:[i,u("week")],ww:[o,u("week")],M:[i,u("month")],MM:[o,u("month")],MMM:[s,function(p){var b=g("months"),y=(g("monthsShort")||b.map((function(x){return x.slice(0,3)}))).indexOf(p)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[s,function(p){var b=g("months").indexOf(p)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(p){this.year=c(p)}],YYYY:[/\d{4}/,u("year")],Z:d,ZZ:d};function m(p){var b,y;b=p,y=l&&l.formats;for(var x=(p=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(O,D,P){var R=P&&P.toUpperCase();return D||y[P]||n[P]||y[R].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(N,I,M){return I||M.slice(1)}))}))).match(r),w=x.length,C=0;C<w;C+=1){var S=x[C],E=v[S],k=E&&E[0],$=E&&E[1];x[C]=$?{regex:k,parser:$}:S.replace(/^\[|\]$/g,"")}return function(O){for(var D={},P=0,R=0;P<w;P+=1){var N=x[P];if(typeof N=="string")R+=N.length;else{var I=N.regex,M=N.parser,F=O.slice(R),j=I.exec(F)[0];M.call(D,j),O=O.replace(j,"")}}return(function(A){var _=A.afternoon;if(_!==void 0){var L=A.hours;_?L<12&&(A.hours+=12):L===12&&(A.hours=0),delete A.afternoon}})(D),D}}return function(p,b,y){y.p.customParseFormat=!0,p&&p.parseTwoDigitYear&&(c=p.parseTwoDigitYear);var x=b.prototype,w=x.parse;x.parse=function(C){var S=C.date,E=C.utc,k=C.args;this.$u=E;var $=k[1];if(typeof $=="string"){var O=k[2]===!0,D=k[3]===!0,P=O||D,R=k[2];D&&(R=k[2]),l=this.$locale(),!O&&R&&(l=y.Ls[R]),this.$d=(function(F,j,A,_){try{if(["x","X"].indexOf(j)>-1)return new Date((j==="X"?1e3:1)*F);var L=m(j)(F),z=L.year,T=L.month,H=L.day,W=L.hours,K=L.minutes,G=L.seconds,U=L.milliseconds,Z=L.zone,Q=L.week,Y=new Date,ee=H||(z||T?1:Y.getDate()),ce=z||Y.getFullYear(),me=0;z&&!T||(me=T>0?T-1:Y.getMonth());var we,se=W||0,ge=K||0,Ee=G||0,Te=U||0;return Z?new Date(Date.UTC(ce,me,ee,se,ge,Ee,Te+60*Z.offset*1e3)):A?new Date(Date.UTC(ce,me,ee,se,ge,Ee,Te)):(we=new Date(ce,me,ee,se,ge,Ee,Te),Q&&(we=_(we).week(Q).toDate()),we)}catch{return new Date("")}})(S,$,E,y),this.init(),R&&R!==!0&&(this.$L=this.locale(R).$L),P&&S!=this.format($)&&(this.$d=new Date("")),l={}}else if($ instanceof Array)for(var N=$.length,I=1;I<=N;I+=1){k[1]=$[I-1];var M=y.apply(this,k);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}I===N&&(this.$d=new Date(""))}else w.call(this,C)}}}))})(wi)),wi.exports}var ox=ax();const ix=sa(ox);Cn.extend(ix);Cn.extend(nx);Cn.extend(Lb);Cn.extend(Kb);Cn.extend(Yb);Cn.extend(Qb);Cn.extend(function(e,t){var n=t.prototype,r=n.format;n.format=function(o){var i=(o||"").replace("Wo","wo");return r.bind(this)(i)}});var sx={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},Br=function(t){var n=sx[t];return n||t.split("_")[0]},lx={getNow:function(){var t=Cn();return typeof t.tz=="function"?t.tz():t},getFixedDate:function(t){return Cn(t,["YYYY-M-DD","YYYY-MM-DD"])},getEndDate:function(t){return t.endOf("month")},getWeekDay:function(t){var n=t.locale("en");return n.weekday()+n.localeData().firstDayOfWeek()},getYear:function(t){return t.year()},getMonth:function(t){return t.month()},getDate:function(t){return t.date()},getHour:function(t){return t.hour()},getMinute:function(t){return t.minute()},getSecond:function(t){return t.second()},getMillisecond:function(t){return t.millisecond()},addYear:function(t,n){return t.add(n,"year")},addMonth:function(t,n){return t.add(n,"month")},addDate:function(t,n){return t.add(n,"day")},setYear:function(t,n){return t.year(n)},setMonth:function(t,n){return t.month(n)},setDate:function(t,n){return t.date(n)},setHour:function(t,n){return t.hour(n)},setMinute:function(t,n){return t.minute(n)},setSecond:function(t,n){return t.second(n)},setMillisecond:function(t,n){return t.millisecond(n)},isAfter:function(t,n){return t.isAfter(n)},isValidate:function(t){return t.isValid()},locale:{getWeekFirstDay:function(t){return Cn().locale(Br(t)).localeData().firstDayOfWeek()},getWeekFirstDate:function(t,n){return n.locale(Br(t)).weekday(0)},getWeek:function(t,n){return n.locale(Br(t)).week()},getShortWeekDays:function(t){return Cn().locale(Br(t)).localeData().weekdaysMin()},getShortMonths:function(t){return Cn().locale(Br(t)).localeData().monthsShort()},format:function(t,n,r){return n.locale(Br(t)).format(r)},parse:function(t,n,r){for(var a=Br(t),o=0;o<r.length;o+=1){var i=r[o],s=n;if(i.includes("wo")||i.includes("Wo")){for(var l=s.split("-")[0],c=s.split("-")[1],u=Cn(l,"YYYY").startOf("year").locale(a),d=0;d<=52;d+=1){var g=u.add(d,"week");if(g.format("Wo")===c)return g}return null}var h=Cn(s,i,!0).locale(a);if(h.isValid())return h}return null}}};function cx(e,t){return e!==void 0?e:t?"bottomRight":"bottomLeft"}var ar=f.createContext(null),ux={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function Xp(e){var t=e.popupElement,n=e.popupStyle,r=e.popupClassName,a=e.popupAlign,o=e.transitionName,i=e.getPopupContainer,s=e.children,l=e.range,c=e.placement,u=e.builtinPlacements,d=u===void 0?ux:u,g=e.direction,h=e.visible,v=e.onClose,m=f.useContext(ar),p=m.prefixCls,b="".concat(p,"-dropdown"),y=cx(c,g==="rtl");return f.createElement(ru,{showAction:[],hideAction:["click"],popupPlacement:y,builtinPlacements:d,prefixCls:b,popupTransitionName:o,popup:t,popupAlign:a,popupVisible:h,popupClassName:pe(r,J(J({},"".concat(b,"-range"),l),"".concat(b,"-rtl"),g==="rtl")),popupStyle:n,stretch:"minWidth",getPopupContainer:i,onPopupVisibleChange:function(w){w||v()}},s)}function gu(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",r=String(e);r.length<t;)r="".concat(n).concat(r);return r}function ca(e){return e==null?[]:Array.isArray(e)?e:[e]}function co(e,t,n){var r=rt(e);return r[t]=n,r}function gs(e,t){var n={},r=t||Object.keys(e);return r.forEach(function(a){e[a]!==void 0&&(n[a]=e[a])}),n}function Jp(e,t,n){if(n)return n;switch(e){case"time":return t.fieldTimeFormat;case"datetime":return t.fieldDateTimeFormat;case"month":return t.fieldMonthFormat;case"year":return t.fieldYearFormat;case"quarter":return t.fieldQuarterFormat;case"week":return t.fieldWeekFormat;default:return t.fieldDateFormat}}function Qp(e,t,n){var r=n!==void 0?n:t[t.length-1],a=t.find(function(o){return e[o]});return r!==a?e[a]:void 0}function Zp(e){return gs(e,["placement","builtinPlacements","popupAlign","getPopupContainer","transitionName","direction"])}function vu(e,t,n,r){var a=f.useMemo(function(){return e||function(i,s){var l=i;return t&&s.type==="date"?t(l,s.today):n&&s.type==="month"?n(l,s.locale):s.originNode}},[e,n,t]),o=f.useCallback(function(i,s){return a(i,ye(ye({},s),{},{range:r}))},[a,r]);return o}function eg(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=f.useState([!1,!1]),a=oe(r,2),o=a[0],i=a[1],s=function(u,d){i(function(g){return co(g,d,u)})},l=f.useMemo(function(){return o.map(function(c,u){if(c)return!0;var d=e[u];return d?!!(!n[u]&&!d||d&&t(d,{activeIndex:u})):!1})},[e,o,t,n]);return[l,s]}function tg(e,t,n,r,a){var o="",i=[];return e&&i.push(a?"hh":"HH"),t&&i.push("mm"),n&&i.push("ss"),o=i.join(":"),r&&(o+=".SSS"),a&&(o+=" A"),o}function dx(e,t,n,r,a,o){var i=e.fieldDateTimeFormat,s=e.fieldDateFormat,l=e.fieldTimeFormat,c=e.fieldMonthFormat,u=e.fieldYearFormat,d=e.fieldWeekFormat,g=e.fieldQuarterFormat,h=e.yearFormat,v=e.cellYearFormat,m=e.cellQuarterFormat,p=e.dayFormat,b=e.cellDateFormat,y=tg(t,n,r,a,o);return ye(ye({},e),{},{fieldDateTimeFormat:i||"YYYY-MM-DD ".concat(y),fieldDateFormat:s||"YYYY-MM-DD",fieldTimeFormat:l||y,fieldMonthFormat:c||"YYYY-MM",fieldYearFormat:u||"YYYY",fieldWeekFormat:d||"gggg-wo",fieldQuarterFormat:g||"YYYY-[Q]Q",yearFormat:h||"YYYY",cellYearFormat:v||"YYYY",cellQuarterFormat:m||"[Q]Q",cellDateFormat:b||p||"D"})}function ng(e,t){var n=t.showHour,r=t.showMinute,a=t.showSecond,o=t.showMillisecond,i=t.use12Hours;return be.useMemo(function(){return dx(e,n,r,a,o,i)},[e,n,r,a,o,i])}function Ja(e,t,n){return n??t.some(function(r){return e.includes(r)})}var fx=["showNow","showHour","showMinute","showSecond","showMillisecond","use12Hours","hourStep","minuteStep","secondStep","millisecondStep","hideDisabledOptions","defaultValue","disabledHours","disabledMinutes","disabledSeconds","disabledMilliseconds","disabledTime","changeOnScroll","defaultOpenValue"];function mx(e){var t=gs(e,fx),n=e.format,r=e.picker,a=null;return n&&(a=n,Array.isArray(a)&&(a=a[0]),a=mn(a)==="object"?a.format:a),r==="time"&&(t.format=a),[t,a]}function px(e){return e&&typeof e=="string"}function rg(e,t,n,r){return[e,t,n,r].some(function(a){return a!==void 0})}function ag(e,t,n,r,a){var o=t,i=n,s=r;if(!e&&!o&&!i&&!s&&!a)o=!0,i=!0,s=!0;else if(e){var l,c,u,d=[o,i,s].some(function(v){return v===!1}),g=[o,i,s].some(function(v){return v===!0}),h=d?!0:!g;o=(l=o)!==null&&l!==void 0?l:h,i=(c=i)!==null&&c!==void 0?c:h,s=(u=s)!==null&&u!==void 0?u:h}return[o,i,s,a]}function og(e){var t=e.showTime,n=mx(e),r=oe(n,2),a=r[0],o=r[1],i=t&&mn(t)==="object"?t:{},s=ye(ye({defaultOpenValue:i.defaultOpenValue||i.defaultValue},a),i),l=s.showMillisecond,c=s.showHour,u=s.showMinute,d=s.showSecond,g=rg(c,u,d,l),h=ag(g,c,u,d,l),v=oe(h,3);return c=v[0],u=v[1],d=v[2],[s,ye(ye({},s),{},{showHour:c,showMinute:u,showSecond:d,showMillisecond:l}),s.format,o]}function ig(e,t,n,r,a){var o=e==="time";if(e==="datetime"||o){for(var i=r,s=Jp(e,a,null),l=s,c=[t,n],u=0;u<c.length;u+=1){var d=ca(c[u])[0];if(px(d)){l=d;break}}var g=i.showHour,h=i.showMinute,v=i.showSecond,m=i.showMillisecond,p=i.use12Hours,b=Ja(l,["a","A","LT","LLL","LTS"],p),y=rg(g,h,v,m);y||(g=Ja(l,["H","h","k","LT","LLL"]),h=Ja(l,["m","LT","LLL"]),v=Ja(l,["s","LTS"]),m=Ja(l,["SSS"]));var x=ag(y,g,h,v,m),w=oe(x,3);g=w[0],h=w[1],v=w[2];var C=t||tg(g,h,v,m,b);return ye(ye({},i),{},{format:C,showHour:g,showMinute:h,showSecond:v,showMillisecond:m,use12Hours:b})}return null}function gx(e,t,n){if(t===!1)return null;var r=t&&mn(t)==="object"?t:{};return r.clearIcon||n||f.createElement("span",{className:"".concat(e,"-clear-btn")})}var Hs=7;function Rr(e,t,n){return!e&&!t||e===t?!0:!e||!t?!1:n()}function Tl(e,t,n){return Rr(t,n,function(){var r=Math.floor(e.getYear(t)/10),a=Math.floor(e.getYear(n)/10);return r===a})}function ea(e,t,n){return Rr(t,n,function(){return e.getYear(t)===e.getYear(n)})}function Nd(e,t){var n=Math.floor(e.getMonth(t)/3);return n+1}function vx(e,t,n){return Rr(t,n,function(){return ea(e,t,n)&&Nd(e,t)===Nd(e,n)})}function hu(e,t,n){return Rr(t,n,function(){return ea(e,t,n)&&e.getMonth(t)===e.getMonth(n)})}function yu(e,t,n){return Rr(t,n,function(){return ea(e,t,n)&&hu(e,t,n)&&e.getDate(t)===e.getDate(n)})}function sg(e,t,n){return Rr(t,n,function(){return e.getHour(t)===e.getHour(n)&&e.getMinute(t)===e.getMinute(n)&&e.getSecond(t)===e.getSecond(n)})}function lg(e,t,n){return Rr(t,n,function(){return yu(e,t,n)&&sg(e,t,n)&&e.getMillisecond(t)===e.getMillisecond(n)})}function ao(e,t,n,r){return Rr(n,r,function(){var a=e.locale.getWeekFirstDate(t,n),o=e.locale.getWeekFirstDate(t,r);return ea(e,a,o)&&e.locale.getWeek(t,n)===e.locale.getWeek(t,r)})}function Sn(e,t,n,r,a){switch(a){case"date":return yu(e,n,r);case"week":return ao(e,t.locale,n,r);case"month":return hu(e,n,r);case"quarter":return vx(e,n,r);case"year":return ea(e,n,r);case"decade":return Tl(e,n,r);case"time":return sg(e,n,r);default:return lg(e,n,r)}}function vs(e,t,n,r){return!t||!n||!r?!1:e.isAfter(r,t)&&e.isAfter(n,r)}function Xo(e,t,n,r,a){return Sn(e,t,n,r,a)?!0:e.isAfter(n,r)}function hx(e,t,n){var r=t.locale.getWeekFirstDay(e),a=t.setDate(n,1),o=t.getWeekDay(a),i=t.addDate(a,r-o);return t.getMonth(i)===t.getMonth(n)&&t.getDate(i)>1&&(i=t.addDate(i,-7)),i}function rn(e,t){var n=t.generateConfig,r=t.locale,a=t.format;return e?typeof a=="function"?a(e):n.locale.format(r.locale,e,a):""}function Hi(e,t,n){var r=t,a=["getHour","getMinute","getSecond","getMillisecond"],o=["setHour","setMinute","setSecond","setMillisecond"];return o.forEach(function(i,s){n?r=e[i](r,e[a[s]](n)):r=e[i](r,0)}),r}function yx(e,t,n,r,a){var o=Ut(function(i,s){return!!(n&&n(i,s)||r&&e.isAfter(r,i)&&!Sn(e,t,r,i,s.type)||a&&e.isAfter(i,a)&&!Sn(e,t,a,i,s.type))});return o}function bx(e,t,n){return f.useMemo(function(){var r=Jp(e,t,n),a=ca(r),o=a[0],i=mn(o)==="object"&&o.type==="mask"?o.format:null;return[a.map(function(s){return typeof s=="string"||typeof s=="function"?s:s.format}),i]},[e,t,n])}function xx(e,t,n){return typeof e[0]=="function"||n?!0:t}function Cx(e,t,n,r){var a=Ut(function(o,i){var s=ye({type:t},i);if(delete s.activeIndex,!e.isValidate(o)||n&&n(o,s))return!0;if((t==="date"||t==="time")&&r){var l,c=i&&i.activeIndex===1?"end":"start",u=((l=r.disabledTime)===null||l===void 0?void 0:l.call(r,o,c,{from:s.from}))||{},d=u.disabledHours,g=u.disabledMinutes,h=u.disabledSeconds,v=u.disabledMilliseconds,m=r.disabledHours,p=r.disabledMinutes,b=r.disabledSeconds,y=d||m,x=g||p,w=h||b,C=e.getHour(o),S=e.getMinute(o),E=e.getSecond(o),k=e.getMillisecond(o);if(y&&y().includes(C)||x&&x(C).includes(S)||w&&w(C,S).includes(E)||v&&v(C,S,E).includes(k))return!0}return!1});return a}function Jo(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=f.useMemo(function(){var r=e&&ca(e);return t&&r&&(r[1]=r[1]||r[0]),r},[e,t]);return n}function cg(e,t){var n=e.generateConfig,r=e.locale,a=e.picker,o=a===void 0?"date":a,i=e.prefixCls,s=i===void 0?"rc-picker":i,l=e.styles,c=l===void 0?{}:l,u=e.classNames,d=u===void 0?{}:u,g=e.order,h=g===void 0?!0:g,v=e.components,m=v===void 0?{}:v,p=e.inputRender,b=e.allowClear,y=e.clearIcon,x=e.needConfirm,w=e.multiple,C=e.format,S=e.inputReadOnly,E=e.disabledDate,k=e.minDate,$=e.maxDate,O=e.showTime,D=e.value,P=e.defaultValue,R=e.pickerValue,N=e.defaultPickerValue,I=Jo(D),M=Jo(P),F=Jo(R),j=Jo(N),A=o==="date"&&O?"datetime":o,_=A==="time"||A==="datetime",L=_||w,z=x??_,T=og(e),H=oe(T,4),W=H[0],K=H[1],G=H[2],U=H[3],Z=ng(r,K),Q=f.useMemo(function(){return ig(A,G,U,W,Z)},[A,G,U,W,Z]),Y=f.useMemo(function(){return ye(ye({},e),{},{prefixCls:s,locale:Z,picker:o,styles:c,classNames:d,order:h,components:ye({input:p},m),clearIcon:gx(s,b,y),showTime:Q,value:I,defaultValue:M,pickerValue:F,defaultPickerValue:j},t==null?void 0:t())},[e]),ee=bx(A,Z,C),ce=oe(ee,2),me=ce[0],we=ce[1],se=xx(me,S,w),ge=yx(n,r,E,k,$),Ee=Cx(n,o,ge,Q),Te=f.useMemo(function(){return ye(ye({},Y),{},{needConfirm:z,inputReadOnly:se,disabledDate:ge})},[Y,z,se,ge]);return[Te,A,L,me,we,Ee]}function wx(e,t,n){var r=an(t,{value:e}),a=oe(r,2),o=a[0],i=a[1],s=be.useRef(e),l=be.useRef(),c=function(){zt.cancel(l.current)},u=Ut(function(){i(s.current),n&&o!==s.current&&n(s.current)}),d=Ut(function(g,h){c(),s.current=g,g||h?u():l.current=zt(u)});return be.useEffect(function(){return c},[]),[o,d]}function ug(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,a=n.every(function(u){return u})?!1:e,o=wx(a,t||!1,r),i=oe(o,2),s=i[0],l=i[1];function c(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!d.inherit||s)&&l(u,d.force)}return[s,c]}function dg(e){var t=f.useRef();return f.useImperativeHandle(e,function(){var n;return{nativeElement:(n=t.current)===null||n===void 0?void 0:n.nativeElement,focus:function(a){var o;(o=t.current)===null||o===void 0||o.focus(a)},blur:function(){var a;(a=t.current)===null||a===void 0||a.blur()}}}),t}function fg(e,t){return f.useMemo(function(){return e||(t?(In(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.entries(t).map(function(n){var r=oe(n,2),a=r[0],o=r[1];return{label:a,value:o}})):[])},[e,t])}function bu(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=f.useRef(t);r.current=t,mi(function(){if(e)r.current(e);else{var a=zt(function(){r.current(e)},n);return function(){zt.cancel(a)}}},[e])}function mg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=f.useState(0),a=oe(r,2),o=a[0],i=a[1],s=f.useState(!1),l=oe(s,2),c=l[0],u=l[1],d=f.useRef([]),g=f.useRef(null),h=f.useRef(null),v=function(w){g.current=w},m=function(w){return g.current===w},p=function(w){u(w)},b=function(w){return w&&(h.current=w),h.current},y=function(w){var C=d.current,S=new Set(C.filter(function(k){return w[k]||t[k]})),E=C[C.length-1]===0?1:0;return S.size>=2||e[E]?null:E};return bu(c||n,function(){c||(d.current=[],v(null))}),f.useEffect(function(){c&&d.current.push(o)},[c,o]),[c,p,b,o,i,y,d.current,v,m]}function Sx(e,t,n,r,a,o){var i=n[n.length-1],s=function(c,u){var d=oe(e,2),g=d[0],h=d[1],v=ye(ye({},u),{},{from:Qp(e,n)});return i===1&&t[0]&&g&&!Sn(r,a,g,c,v.type)&&r.isAfter(g,c)||i===0&&t[1]&&h&&!Sn(r,a,h,c,v.type)&&r.isAfter(c,h)?!0:o==null?void 0:o(c,v)};return s}function oo(e,t,n,r){switch(t){case"date":case"week":return e.addMonth(n,r);case"month":case"quarter":return e.addYear(n,r);case"year":return e.addYear(n,r*10);case"decade":return e.addYear(n,r*100);default:return n}}var Vs=[];function pg(e,t,n,r,a,o,i,s){var l=arguments.length>8&&arguments[8]!==void 0?arguments[8]:Vs,c=arguments.length>9&&arguments[9]!==void 0?arguments[9]:Vs,u=arguments.length>10&&arguments[10]!==void 0?arguments[10]:Vs,d=arguments.length>11?arguments[11]:void 0,g=arguments.length>12?arguments[12]:void 0,h=arguments.length>13?arguments[13]:void 0,v=i==="time",m=o||0,p=function(F){var j=e.getNow();return v&&(j=Hi(e,j)),l[F]||n[F]||j},b=oe(c,2),y=b[0],x=b[1],w=an(function(){return p(0)},{value:y}),C=oe(w,2),S=C[0],E=C[1],k=an(function(){return p(1)},{value:x}),$=oe(k,2),O=$[0],D=$[1],P=f.useMemo(function(){var M=[S,O][m];return v?M:Hi(e,M,u[m])},[v,S,O,m,e,u]),R=function(F){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"panel",A=[E,D][m];A(F);var _=[S,O];_[m]=F,d&&(!Sn(e,t,S,_[0],i)||!Sn(e,t,O,_[1],i))&&d(_,{source:j,range:m===1?"end":"start",mode:r})},N=function(F,j){if(s){var A={date:"month",week:"month",month:"year",quarter:"year"},_=A[i];if(_&&!Sn(e,t,F,j,_))return oo(e,i,j,-1);if(i==="year"&&F){var L=Math.floor(e.getYear(F)/10),z=Math.floor(e.getYear(j)/10);if(L!==z)return oo(e,i,j,-1)}}return j},I=f.useRef(null);return Rn(function(){if(a&&!l[m]){var M=v?null:e.getNow();if(I.current!==null&&I.current!==m?M=[S,O][m^1]:n[m]?M=m===0?n[0]:N(n[0],n[1]):n[m^1]&&(M=n[m^1]),M){g&&e.isAfter(g,M)&&(M=g);var F=s?oo(e,i,M,1):M;h&&e.isAfter(F,h)&&(M=s?oo(e,i,h,-1):h),R(M,"reset")}}},[a,m,n[m]]),f.useEffect(function(){a?I.current=m:I.current=null},[a,m]),Rn(function(){a&&l&&l[m]&&R(l[m],"reset")},[a,m]),[P,R]}function gg(e,t){var n=f.useRef(e),r=f.useState({}),a=oe(r,2),o=a[1],i=function(c){return c&&t!==void 0?t:n.current},s=function(c){n.current=c,o({})};return[i,s,i(!0)]}var $x=[];function vg(e,t,n){var r=function(i){return i.map(function(s){return rn(s,{generateConfig:e,locale:t,format:n[0]})})},a=function(i,s){for(var l=Math.max(i.length,s.length),c=-1,u=0;u<l;u+=1){var d=i[u]||null,g=s[u]||null;if(d!==g&&!lg(e,d,g)){c=u;break}}return[c<0,c!==0]};return[r,a]}function hg(e,t){return rt(e).sort(function(n,r){return t.isAfter(n,r)?1:-1})}function Ex(e){var t=gg(e),n=oe(t,2),r=n[0],a=n[1],o=Ut(function(){a(e)});return f.useEffect(function(){o()},[e]),[r,a]}function yg(e,t,n,r,a,o,i,s,l){var c=an(o,{value:i}),u=oe(c,2),d=u[0],g=u[1],h=d||$x,v=Ex(h),m=oe(v,2),p=m[0],b=m[1],y=vg(e,t,n),x=oe(y,2),w=x[0],C=x[1],S=Ut(function(k){var $=rt(k);if(r)for(var O=0;O<2;O+=1)$[O]=$[O]||null;else a&&($=hg($.filter(function(M){return M}),e));var D=C(p(),$),P=oe(D,2),R=P[0],N=P[1];if(!R&&(b($),s)){var I=w($);s($,I,{range:N?"end":"start"})}}),E=function(){l&&l(p())};return[h,g,p,S,E]}function bg(e,t,n,r,a,o,i,s,l,c){var u=e.generateConfig,d=e.locale,g=e.picker,h=e.onChange,v=e.allowEmpty,m=e.order,p=o.some(function(R){return R})?!1:m,b=vg(u,d,i),y=oe(b,2),x=y[0],w=y[1],C=gg(t),S=oe(C,2),E=S[0],k=S[1],$=Ut(function(){k(t)});f.useEffect(function(){$()},[t]);var O=Ut(function(R){var N=R===null,I=rt(R||E());if(N)for(var M=Math.max(o.length,I.length),F=0;F<M;F+=1)o[F]||(I[F]=null);p&&I[0]&&I[1]&&(I=hg(I,u)),a(I);var j=I,A=oe(j,2),_=A[0],L=A[1],z=!_,T=!L,H=v?(!z||v[0])&&(!T||v[1]):!0,W=!m||z||T||Sn(u,d,_,L,g)||u.isAfter(L,_),K=(o[0]||!_||!c(_,{activeIndex:0}))&&(o[1]||!L||!c(L,{from:_,activeIndex:1})),G=N||H&&W&&K;if(G){n(I);var U=w(I,t),Z=oe(U,1),Q=Z[0];h&&!Q&&h(N&&I.every(function(Y){return!Y})?null:I,x(I))}return G}),D=Ut(function(R,N){var I=co(E(),R,r()[R]);k(I),N&&O()}),P=!s&&!l;return bu(!P,function(){P&&(O(),a(t),$())},2),[D,O]}function xg(e,t,n,r,a){return t!=="date"&&t!=="time"?!1:n!==void 0?n:r!==void 0?r:!a&&(e==="date"||e==="time")}function kx(e,t,n,r,a,o){var i=e;function s(d,g,h){var v=o[d](i),m=h.find(function(x){return x.value===v});if(!m||m.disabled){var p=h.filter(function(x){return!x.disabled}),b=rt(p).reverse(),y=b.find(function(x){return x.value<=v})||p[0];y&&(v=y.value,i=o[g](i,v))}return v}var l=s("getHour","setHour",t()),c=s("getMinute","setMinute",n(l)),u=s("getSecond","setSecond",r(l,c));return s("getMillisecond","setMillisecond",a(l,c,u)),i}function Qo(){return[]}function Zo(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,i=[],s=n>=1?n|0:1,l=e;l<=t;l+=s){var c=a.includes(l);(!c||!r)&&i.push({label:gu(l,o),value:l,disabled:c})}return i}function xu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t||{},a=r.use12Hours,o=r.hourStep,i=o===void 0?1:o,s=r.minuteStep,l=s===void 0?1:s,c=r.secondStep,u=c===void 0?1:c,d=r.millisecondStep,g=d===void 0?100:d,h=r.hideDisabledOptions,v=r.disabledTime,m=r.disabledHours,p=r.disabledMinutes,b=r.disabledSeconds,y=f.useMemo(function(){return n||e.getNow()},[n,e]),x=f.useCallback(function(j){var A=(v==null?void 0:v(j))||{};return[A.disabledHours||m||Qo,A.disabledMinutes||p||Qo,A.disabledSeconds||b||Qo,A.disabledMilliseconds||Qo]},[v,m,p,b]),w=f.useMemo(function(){return x(y)},[y,x]),C=oe(w,4),S=C[0],E=C[1],k=C[2],$=C[3],O=f.useCallback(function(j,A,_,L){var z=Zo(0,23,i,h,j()),T=a?z.map(function(G){return ye(ye({},G),{},{label:gu(G.value%12||12,2)})}):z,H=function(U){return Zo(0,59,l,h,A(U))},W=function(U,Z){return Zo(0,59,u,h,_(U,Z))},K=function(U,Z,Q){return Zo(0,999,g,h,L(U,Z,Q),3)};return[T,H,W,K]},[h,i,a,g,l,u]),D=f.useMemo(function(){return O(S,E,k,$)},[O,S,E,k,$]),P=oe(D,4),R=P[0],N=P[1],I=P[2],M=P[3],F=function(A,_){var L=function(){return R},z=N,T=I,H=M;if(_){var W=x(_),K=oe(W,4),G=K[0],U=K[1],Z=K[2],Q=K[3],Y=O(G,U,Z,Q),ee=oe(Y,4),ce=ee[0],me=ee[1],we=ee[2],se=ee[3];L=function(){return ce},z=me,T=we,H=se}var ge=kx(A,L,z,T,H,e);return ge};return[F,R,N,I,M]}function Ix(e){var t=e.mode,n=e.internalMode,r=e.renderExtraFooter,a=e.showNow,o=e.showTime,i=e.onSubmit,s=e.onNow,l=e.invalid,c=e.needConfirm,u=e.generateConfig,d=e.disabledDate,g=f.useContext(ar),h=g.prefixCls,v=g.locale,m=g.button,p=m===void 0?"button":m,b=u.getNow(),y=xu(u,o,b),x=oe(y,1),w=x[0],C=r==null?void 0:r(t),S=d(b,{type:t}),E=function(){if(!S){var N=w(b);s(N)}},k="".concat(h,"-now"),$="".concat(k,"-btn"),O=a&&f.createElement("li",{className:k},f.createElement("a",{className:pe($,S&&"".concat($,"-disabled")),"aria-disabled":S,onClick:E},n==="date"?v.today:v.now)),D=c&&f.createElement("li",{className:"".concat(h,"-ok")},f.createElement(p,{disabled:l,onClick:i},v.ok)),P=(O||D)&&f.createElement("ul",{className:"".concat(h,"-ranges")},O,D);return!C&&!P?null:f.createElement("div",{className:"".concat(h,"-footer")},C&&f.createElement("div",{className:"".concat(h,"-footer-extra")},C),P)}function Cg(e,t,n){function r(a,o){var i=a.findIndex(function(l){return Sn(e,t,l,o,n)});if(i===-1)return[].concat(rt(a),[o]);var s=rt(a);return s.splice(i,1),s}return r}var ua=f.createContext(null);function hs(){return f.useContext(ua)}function ja(e,t){var n=e.prefixCls,r=e.generateConfig,a=e.locale,o=e.disabledDate,i=e.minDate,s=e.maxDate,l=e.cellRender,c=e.hoverValue,u=e.hoverRangeValue,d=e.onHover,g=e.values,h=e.pickerValue,v=e.onSelect,m=e.prevIcon,p=e.nextIcon,b=e.superPrevIcon,y=e.superNextIcon,x=r.getNow(),w={now:x,values:g,pickerValue:h,prefixCls:n,disabledDate:o,minDate:i,maxDate:s,cellRender:l,hoverValue:c,hoverRangeValue:u,onHover:d,locale:a,generateConfig:r,onSelect:v,panelType:t,prevIcon:m,nextIcon:p,superPrevIcon:b,superNextIcon:y};return[w,x]}var Dr=f.createContext({});function _o(e){for(var t=e.rowNum,n=e.colNum,r=e.baseDate,a=e.getCellDate,o=e.prefixColumn,i=e.rowClassName,s=e.titleFormat,l=e.getCellText,c=e.getCellClassName,u=e.headerCells,d=e.cellSelection,g=d===void 0?!0:d,h=e.disabledDate,v=hs(),m=v.prefixCls,p=v.panelType,b=v.now,y=v.disabledDate,x=v.cellRender,w=v.onHover,C=v.hoverValue,S=v.hoverRangeValue,E=v.generateConfig,k=v.values,$=v.locale,O=v.onSelect,D=h||y,P="".concat(m,"-cell"),R=f.useContext(Dr),N=R.onCellDblClick,I=function(T){return k.some(function(H){return H&&Sn(E,$,T,H,p)})},M=[],F=0;F<t;F+=1){for(var j=[],A=void 0,_=function(){var T=F*n+L,H=a(r,T),W=D==null?void 0:D(H,{type:p});L===0&&(A=H,o&&j.push(o(A)));var K=!1,G=!1,U=!1;if(g&&S){var Z=oe(S,2),Q=Z[0],Y=Z[1];K=vs(E,Q,Y,H),G=Sn(E,$,H,Q,p),U=Sn(E,$,H,Y,p)}var ee=s?rn(H,{locale:$,format:s,generateConfig:E}):void 0,ce=f.createElement("div",{className:"".concat(P,"-inner")},l(H));j.push(f.createElement("td",{key:L,title:ee,className:pe(P,ye(J(J(J(J(J(J({},"".concat(P,"-disabled"),W),"".concat(P,"-hover"),(C||[]).some(function(me){return Sn(E,$,H,me,p)})),"".concat(P,"-in-range"),K&&!G&&!U),"".concat(P,"-range-start"),G),"".concat(P,"-range-end"),U),"".concat(m,"-cell-selected"),!S&&p!=="week"&&I(H)),c(H))),onClick:function(){W||O(H)},onDoubleClick:function(){!W&&N&&N()},onMouseEnter:function(){W||w==null||w(H)},onMouseLeave:function(){W||w==null||w(null)}},x?x(H,{prefixCls:m,originNode:ce,today:b,type:p,locale:$}):ce))},L=0;L<n;L+=1)_();M.push(f.createElement("tr",{key:F,className:i==null?void 0:i(A)},j))}return f.createElement("div",{className:"".concat(m,"-body")},f.createElement("table",{className:"".concat(m,"-content")},u&&f.createElement("thead",null,f.createElement("tr",null,u)),f.createElement("tbody",null,M)))}var ei={visibility:"hidden"};function Ra(e){var t=e.offset,n=e.superOffset,r=e.onChange,a=e.getStart,o=e.getEnd,i=e.children,s=hs(),l=s.prefixCls,c=s.prevIcon,u=c===void 0?"\u2039":c,d=s.nextIcon,g=d===void 0?"\u203A":d,h=s.superPrevIcon,v=h===void 0?"\xAB":h,m=s.superNextIcon,p=m===void 0?"\xBB":m,b=s.minDate,y=s.maxDate,x=s.generateConfig,w=s.locale,C=s.pickerValue,S=s.panelType,E="".concat(l,"-header"),k=f.useContext(Dr),$=k.hidePrev,O=k.hideNext,D=k.hideHeader,P=f.useMemo(function(){if(!b||!t||!o)return!1;var z=o(t(-1,C));return!Xo(x,w,z,b,S)},[b,t,C,o,x,w,S]),R=f.useMemo(function(){if(!b||!n||!o)return!1;var z=o(n(-1,C));return!Xo(x,w,z,b,S)},[b,n,C,o,x,w,S]),N=f.useMemo(function(){if(!y||!t||!a)return!1;var z=a(t(1,C));return!Xo(x,w,y,z,S)},[y,t,C,a,x,w,S]),I=f.useMemo(function(){if(!y||!n||!a)return!1;var z=a(n(1,C));return!Xo(x,w,y,z,S)},[y,n,C,a,x,w,S]),M=function(T){t&&r(t(T,C))},F=function(T){n&&r(n(T,C))};if(D)return null;var j="".concat(E,"-prev-btn"),A="".concat(E,"-next-btn"),_="".concat(E,"-super-prev-btn"),L="".concat(E,"-super-next-btn");return f.createElement("div",{className:E},n&&f.createElement("button",{type:"button","aria-label":w.previousYear,onClick:function(){return F(-1)},tabIndex:-1,className:pe(_,R&&"".concat(_,"-disabled")),disabled:R,style:$?ei:{}},v),t&&f.createElement("button",{type:"button","aria-label":w.previousMonth,onClick:function(){return M(-1)},tabIndex:-1,className:pe(j,P&&"".concat(j,"-disabled")),disabled:P,style:$?ei:{}},u),f.createElement("div",{className:"".concat(E,"-view")},i),t&&f.createElement("button",{type:"button","aria-label":w.nextMonth,onClick:function(){return M(1)},tabIndex:-1,className:pe(A,N&&"".concat(A,"-disabled")),disabled:N,style:O?ei:{}},g),n&&f.createElement("button",{type:"button","aria-label":w.nextYear,onClick:function(){return F(1)},tabIndex:-1,className:pe(L,I&&"".concat(L,"-disabled")),disabled:I,style:O?ei:{}},p))}function ys(e){var t=e.prefixCls,n=e.panelName,r=n===void 0?"date":n,a=e.locale,o=e.generateConfig,i=e.pickerValue,s=e.onPickerValueChange,l=e.onModeChange,c=e.mode,u=c===void 0?"date":c,d=e.disabledDate,g=e.onSelect,h=e.onHover,v=e.showWeek,m="".concat(t,"-").concat(r,"-panel"),p="".concat(t,"-cell"),b=u==="week",y=ja(e,u),x=oe(y,2),w=x[0],C=x[1],S=o.locale.getWeekFirstDay(a.locale),E=o.setDate(i,1),k=hx(a.locale,o,E),$=o.getMonth(i),O=v===void 0?b:v,D=O?function(z){var T=d==null?void 0:d(z,{type:"week"});return f.createElement("td",{key:"week",className:pe(p,"".concat(p,"-week"),J({},"".concat(p,"-disabled"),T)),onClick:function(){T||g(z)},onMouseEnter:function(){T||h==null||h(z)},onMouseLeave:function(){T||h==null||h(null)}},f.createElement("div",{className:"".concat(p,"-inner")},o.locale.getWeek(a.locale,z)))}:null,P=[],R=a.shortWeekDays||(o.locale.getShortWeekDays?o.locale.getShortWeekDays(a.locale):[]);D&&P.push(f.createElement("th",{key:"empty"},f.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},a.week)));for(var N=0;N<Hs;N+=1)P.push(f.createElement("th",{key:N},R[(N+S)%Hs]));var I=function(T,H){return o.addDate(T,H)},M=function(T){return rn(T,{locale:a,format:a.cellDateFormat,generateConfig:o})},F=function(T){var H=J(J({},"".concat(t,"-cell-in-view"),hu(o,T,i)),"".concat(t,"-cell-today"),yu(o,T,C));return H},j=a.shortMonths||(o.locale.getShortMonths?o.locale.getShortMonths(a.locale):[]),A=f.createElement("button",{type:"button","aria-label":a.yearSelect,key:"year",onClick:function(){l("year",i)},tabIndex:-1,className:"".concat(t,"-year-btn")},rn(i,{locale:a,format:a.yearFormat,generateConfig:o})),_=f.createElement("button",{type:"button","aria-label":a.monthSelect,key:"month",onClick:function(){l("month",i)},tabIndex:-1,className:"".concat(t,"-month-btn")},a.monthFormat?rn(i,{locale:a,format:a.monthFormat,generateConfig:o}):j[$]),L=a.monthBeforeYear?[_,A]:[A,_];return f.createElement(ua.Provider,{value:w},f.createElement("div",{className:pe(m,v&&"".concat(m,"-show-week"))},f.createElement(Ra,{offset:function(T){return o.addMonth(i,T)},superOffset:function(T){return o.addYear(i,T)},onChange:s,getStart:function(T){return o.setDate(T,1)},getEnd:function(T){var H=o.setDate(T,1);return H=o.addMonth(H,1),o.addDate(H,-1)}},L),f.createElement(_o,Oe({titleFormat:a.fieldDateFormat},e,{colNum:Hs,rowNum:6,baseDate:k,headerCells:P,getCellDate:I,getCellText:M,getCellClassName:F,prefixColumn:D,cellSelection:!b}))))}var Ox=1/3;function Nx(e,t){var n=f.useRef(!1),r=f.useRef(null),a=f.useRef(null),o=function(){return n.current},i=function(){zt.cancel(r.current),n.current=!1},s=f.useRef(),l=function(){var d=e.current;if(a.current=null,s.current=0,d){var g=d.querySelector('[data-value="'.concat(t,'"]')),h=d.querySelector("li"),v=function m(){i(),n.current=!0,s.current+=1;var p=d.scrollTop,b=h.offsetTop,y=g.offsetTop,x=y-b;if(y===0&&g!==h||!vp(d)){s.current<=5&&(r.current=zt(m));return}var w=p+(x-p)*Ox,C=Math.abs(x-w);if(a.current!==null&&a.current<C){i();return}if(a.current=C,C<=1){d.scrollTop=x,i();return}d.scrollTop=w,r.current=zt(m)};g&&h&&v()}},c=Ut(l);return[c,i,o]}var Dx=300;function Mx(e){return e.map(function(t){var n=t.value,r=t.label,a=t.disabled;return[n,r,a].join(",")}).join(";")}function Qa(e){var t=e.units,n=e.value,r=e.optionalValue,a=e.type,o=e.onChange,i=e.onHover,s=e.onDblClick,l=e.changeOnScroll,c=hs(),u=c.prefixCls,d=c.cellRender,g=c.now,h=c.locale,v="".concat(u,"-time-panel"),m="".concat(u,"-time-panel-cell"),p=f.useRef(null),b=f.useRef(),y=function(){clearTimeout(b.current)},x=Nx(p,n??r),w=oe(x,3),C=w[0],S=w[1],E=w[2];Rn(function(){return C(),y(),function(){S(),y()}},[n,r,Mx(t)]);var k=function(D){y();var P=D.target;!E()&&l&&(b.current=setTimeout(function(){var R=p.current,N=R.querySelector("li").offsetTop,I=Array.from(R.querySelectorAll("li")),M=I.map(function(L){return L.offsetTop-N}),F=M.map(function(L,z){return t[z].disabled?Number.MAX_SAFE_INTEGER:Math.abs(L-P.scrollTop)}),j=Math.min.apply(Math,rt(F)),A=F.findIndex(function(L){return L===j}),_=t[A];_&&!_.disabled&&o(_.value)},Dx))},$="".concat(v,"-column");return f.createElement("ul",{className:$,ref:p,"data-type":a,onScroll:k},t.map(function(O){var D=O.label,P=O.value,R=O.disabled,N=f.createElement("div",{className:"".concat(m,"-inner")},D);return f.createElement("li",{key:P,className:pe(m,J(J({},"".concat(m,"-selected"),n===P),"".concat(m,"-disabled"),R)),onClick:function(){R||o(P)},onDoubleClick:function(){!R&&s&&s()},onMouseEnter:function(){i(P)},onMouseLeave:function(){i(null)},"data-value":P},d?d(P,{prefixCls:u,originNode:N,today:g,type:"time",subType:a,locale:h}):N)}))}function Cr(e){return e<12}function Fx(e){var t=e.showHour,n=e.showMinute,r=e.showSecond,a=e.showMillisecond,o=e.use12Hours,i=e.changeOnScroll,s=hs(),l=s.prefixCls,c=s.values,u=s.generateConfig,d=s.locale,g=s.onSelect,h=s.onHover,v=h===void 0?function(){}:h,m=s.pickerValue,p=(c==null?void 0:c[0])||null,b=f.useContext(Dr),y=b.onCellDblClick,x=xu(u,e,p),w=oe(x,5),C=w[0],S=w[1],E=w[2],k=w[3],$=w[4],O=function(xe){var _e=p&&u[xe](p),ze=m&&u[xe](m);return[_e,ze]},D=O("getHour"),P=oe(D,2),R=P[0],N=P[1],I=O("getMinute"),M=oe(I,2),F=M[0],j=M[1],A=O("getSecond"),_=oe(A,2),L=_[0],z=_[1],T=O("getMillisecond"),H=oe(T,2),W=H[0],K=H[1],G=R===null?null:Cr(R)?"am":"pm",U=f.useMemo(function(){return o?Cr(R)?S.filter(function(ie){return Cr(ie.value)}):S.filter(function(ie){return!Cr(ie.value)}):S},[R,S,o]),Z=function(xe,_e){var ze,st=xe.filter(function(Ne){return!Ne.disabled});return _e??(st==null||(ze=st[0])===null||ze===void 0?void 0:ze.value)},Q=Z(S,R),Y=f.useMemo(function(){return E(Q)},[E,Q]),ee=Z(Y,F),ce=f.useMemo(function(){return k(Q,ee)},[k,Q,ee]),me=Z(ce,L),we=f.useMemo(function(){return $(Q,ee,me)},[$,Q,ee,me]),se=Z(we,W),ge=f.useMemo(function(){if(!o)return[];var ie=u.getNow(),xe=u.setHour(ie,6),_e=u.setHour(ie,18),ze=function(Ne,Ie){var Ue=d.cellMeridiemFormat;return Ue?rn(Ne,{generateConfig:u,locale:d,format:Ue}):Ie};return[{label:ze(xe,"AM"),value:"am",disabled:S.every(function(st){return st.disabled||!Cr(st.value)})},{label:ze(_e,"PM"),value:"pm",disabled:S.every(function(st){return st.disabled||Cr(st.value)})}]},[S,o,u,d]),Ee=function(xe){var _e=C(xe);g(_e)},Te=f.useMemo(function(){var ie=p||m||u.getNow(),xe=function(ze){return ze!=null};return xe(R)?(ie=u.setHour(ie,R),ie=u.setMinute(ie,F),ie=u.setSecond(ie,L),ie=u.setMillisecond(ie,W)):xe(N)?(ie=u.setHour(ie,N),ie=u.setMinute(ie,j),ie=u.setSecond(ie,z),ie=u.setMillisecond(ie,K)):xe(Q)&&(ie=u.setHour(ie,Q),ie=u.setMinute(ie,ee),ie=u.setSecond(ie,me),ie=u.setMillisecond(ie,se)),ie},[p,m,R,F,L,W,Q,ee,me,se,N,j,z,K,u]),Pe=function(xe,_e){return xe===null?null:u[_e](Te,xe)},he=function(xe){return Pe(xe,"setHour")},ke=function(xe){return Pe(xe,"setMinute")},de=function(xe){return Pe(xe,"setSecond")},Re=function(xe){return Pe(xe,"setMillisecond")},He=function(xe){return xe===null?null:xe==="am"&&!Cr(R)?u.setHour(Te,R-12):xe==="pm"&&Cr(R)?u.setHour(Te,R+12):Te},Ke=function(xe){Ee(he(xe))},tt=function(xe){Ee(ke(xe))},qe=function(xe){Ee(de(xe))},We=function(xe){Ee(Re(xe))},lt=function(xe){Ee(He(xe))},Fe=function(xe){v(he(xe))},ae=function(xe){v(ke(xe))},Le=function(xe){v(de(xe))},Ce=function(xe){v(Re(xe))},$e=function(xe){v(He(xe))},ue={onDblClick:y,changeOnScroll:i};return f.createElement("div",{className:"".concat(l,"-content")},t&&f.createElement(Qa,Oe({units:U,value:R,optionalValue:N,type:"hour",onChange:Ke,onHover:Fe},ue)),n&&f.createElement(Qa,Oe({units:Y,value:F,optionalValue:j,type:"minute",onChange:tt,onHover:ae},ue)),r&&f.createElement(Qa,Oe({units:ce,value:L,optionalValue:z,type:"second",onChange:qe,onHover:Le},ue)),a&&f.createElement(Qa,Oe({units:we,value:W,optionalValue:K,type:"millisecond",onChange:We,onHover:Ce},ue)),o&&f.createElement(Qa,Oe({units:ge,value:G,type:"meridiem",onChange:lt,onHover:$e},ue)))}function wg(e){var t=e.prefixCls,n=e.value,r=e.locale,a=e.generateConfig,o=e.showTime,i=o||{},s=i.format,l="".concat(t,"-time-panel"),c=ja(e,"time"),u=oe(c,1),d=u[0];return f.createElement(ua.Provider,{value:d},f.createElement("div",{className:pe(l)},f.createElement(Ra,null,n?rn(n,{locale:r,format:s,generateConfig:a}):"\xA0"),f.createElement(Fx,o)))}function Px(e){var t=e.prefixCls,n=e.generateConfig,r=e.showTime,a=e.onSelect,o=e.value,i=e.pickerValue,s=e.onHover,l="".concat(t,"-datetime-panel"),c=xu(n,r),u=oe(c,1),d=u[0],g=function(p){return o?Hi(n,p,o):Hi(n,p,i)},h=function(p){s==null||s(p&&g(p))},v=function(p){var b=g(p);a(d(b,b))};return f.createElement("div",{className:l},f.createElement(ys,Oe({},e,{onSelect:v,onHover:h})),f.createElement(wg,e))}function jx(e){var t=e.prefixCls,n=e.locale,r=e.generateConfig,a=e.pickerValue,o=e.disabledDate,i=e.onPickerValueChange,s="".concat(t,"-decade-panel"),l=ja(e,"decade"),c=oe(l,1),u=c[0],d=function(S){var E=Math.floor(r.getYear(S)/100)*100;return r.setYear(S,E)},g=function(S){var E=d(S);return r.addYear(E,99)},h=d(a),v=g(a),m=r.addYear(h,-10),p=function(S,E){return r.addYear(S,E*10)},b=function(S){var E=n.cellYearFormat,k=rn(S,{locale:n,format:E,generateConfig:r}),$=rn(r.addYear(S,9),{locale:n,format:E,generateConfig:r});return"".concat(k,"-").concat($)},y=function(S){return J({},"".concat(t,"-cell-in-view"),Tl(r,S,h)||Tl(r,S,v)||vs(r,h,v,S))},x=o?function(C,S){var E=r.setDate(C,1),k=r.setMonth(E,0),$=r.setYear(k,Math.floor(r.getYear(k)/10)*10),O=r.addYear($,10),D=r.addDate(O,-1);return o($,S)&&o(D,S)}:null,w="".concat(rn(h,{locale:n,format:n.yearFormat,generateConfig:r}),"-").concat(rn(v,{locale:n,format:n.yearFormat,generateConfig:r}));return f.createElement(ua.Provider,{value:u},f.createElement("div",{className:s},f.createElement(Ra,{superOffset:function(S){return r.addYear(a,S*100)},onChange:i,getStart:d,getEnd:g},w),f.createElement(_o,Oe({},e,{disabledDate:x,colNum:3,rowNum:4,baseDate:m,getCellDate:p,getCellText:b,getCellClassName:y}))))}function Rx(e){var t=e.prefixCls,n=e.locale,r=e.generateConfig,a=e.pickerValue,o=e.disabledDate,i=e.onPickerValueChange,s=e.onModeChange,l="".concat(t,"-month-panel"),c=ja(e,"month"),u=oe(c,1),d=u[0],g=r.setMonth(a,0),h=n.shortMonths||(r.locale.getShortMonths?r.locale.getShortMonths(n.locale):[]),v=function(w,C){return r.addMonth(w,C)},m=function(w){var C=r.getMonth(w);return n.monthFormat?rn(w,{locale:n,format:n.monthFormat,generateConfig:r}):h[C]},p=function(){return J({},"".concat(t,"-cell-in-view"),!0)},b=o?function(x,w){var C=r.setDate(x,1),S=r.setMonth(C,r.getMonth(C)+1),E=r.addDate(S,-1);return o(C,w)&&o(E,w)}:null,y=f.createElement("button",{type:"button",key:"year","aria-label":n.yearSelect,onClick:function(){s("year")},tabIndex:-1,className:"".concat(t,"-year-btn")},rn(a,{locale:n,format:n.yearFormat,generateConfig:r}));return f.createElement(ua.Provider,{value:d},f.createElement("div",{className:l},f.createElement(Ra,{superOffset:function(w){return r.addYear(a,w)},onChange:i,getStart:function(w){return r.setMonth(w,0)},getEnd:function(w){return r.setMonth(w,11)}},y),f.createElement(_o,Oe({},e,{disabledDate:b,titleFormat:n.fieldMonthFormat,colNum:3,rowNum:4,baseDate:g,getCellDate:v,getCellText:m,getCellClassName:p}))))}function Ax(e){var t=e.prefixCls,n=e.locale,r=e.generateConfig,a=e.pickerValue,o=e.onPickerValueChange,i=e.onModeChange,s="".concat(t,"-quarter-panel"),l=ja(e,"quarter"),c=oe(l,1),u=c[0],d=r.setMonth(a,0),g=function(b,y){return r.addMonth(b,y*3)},h=function(b){return rn(b,{locale:n,format:n.cellQuarterFormat,generateConfig:r})},v=function(){return J({},"".concat(t,"-cell-in-view"),!0)},m=f.createElement("button",{type:"button",key:"year","aria-label":n.yearSelect,onClick:function(){i("year")},tabIndex:-1,className:"".concat(t,"-year-btn")},rn(a,{locale:n,format:n.yearFormat,generateConfig:r}));return f.createElement(ua.Provider,{value:u},f.createElement("div",{className:s},f.createElement(Ra,{superOffset:function(b){return r.addYear(a,b)},onChange:o,getStart:function(b){return r.setMonth(b,0)},getEnd:function(b){return r.setMonth(b,11)}},m),f.createElement(_o,Oe({},e,{titleFormat:n.fieldQuarterFormat,colNum:4,rowNum:1,baseDate:d,getCellDate:g,getCellText:h,getCellClassName:v}))))}function Tx(e){var t=e.prefixCls,n=e.generateConfig,r=e.locale,a=e.value,o=e.hoverValue,i=e.hoverRangeValue,s=r.locale,l="".concat(t,"-week-panel-row"),c=function(d){var g={};if(i){var h=oe(i,2),v=h[0],m=h[1],p=ao(n,s,v,d),b=ao(n,s,m,d);g["".concat(l,"-range-start")]=p,g["".concat(l,"-range-end")]=b,g["".concat(l,"-range-hover")]=!p&&!b&&vs(n,v,m,d)}return o&&(g["".concat(l,"-hover")]=o.some(function(y){return ao(n,s,d,y)})),pe(l,J({},"".concat(l,"-selected"),!i&&ao(n,s,a,d)),g)};return f.createElement(ys,Oe({},e,{mode:"week",panelName:"week",rowClassName:c}))}function _x(e){var t=e.prefixCls,n=e.locale,r=e.generateConfig,a=e.pickerValue,o=e.disabledDate,i=e.onPickerValueChange,s=e.onModeChange,l="".concat(t,"-year-panel"),c=ja(e,"year"),u=oe(c,1),d=u[0],g=function(E){var k=Math.floor(r.getYear(E)/10)*10;return r.setYear(E,k)},h=function(E){var k=g(E);return r.addYear(k,9)},v=g(a),m=h(a),p=r.addYear(v,-1),b=function(E,k){return r.addYear(E,k)},y=function(E){return rn(E,{locale:n,format:n.cellYearFormat,generateConfig:r})},x=function(E){return J({},"".concat(t,"-cell-in-view"),ea(r,E,v)||ea(r,E,m)||vs(r,v,m,E))},w=o?function(S,E){var k=r.setMonth(S,0),$=r.setDate(k,1),O=r.addYear($,1),D=r.addDate(O,-1);return o($,E)&&o(D,E)}:null,C=f.createElement("button",{type:"button",key:"decade","aria-label":n.decadeSelect,onClick:function(){s("decade")},tabIndex:-1,className:"".concat(t,"-decade-btn")},rn(v,{locale:n,format:n.yearFormat,generateConfig:r}),"-",rn(m,{locale:n,format:n.yearFormat,generateConfig:r}));return f.createElement(ua.Provider,{value:d},f.createElement("div",{className:l},f.createElement(Ra,{superOffset:function(E){return r.addYear(a,E*10)},onChange:i,getStart:g,getEnd:h},C),f.createElement(_o,Oe({},e,{disabledDate:w,titleFormat:n.fieldYearFormat,colNum:3,rowNum:4,baseDate:p,getCellDate:b,getCellText:y,getCellClassName:x}))))}var Bx={date:ys,datetime:Px,week:Tx,month:Rx,quarter:Ax,year:_x,decade:jx,time:wg};function Lx(e,t){var n,r=e.locale,a=e.generateConfig,o=e.direction,i=e.prefixCls,s=e.tabIndex,l=s===void 0?0:s,c=e.multiple,u=e.defaultValue,d=e.value,g=e.onChange,h=e.onSelect,v=e.defaultPickerValue,m=e.pickerValue,p=e.onPickerValueChange,b=e.mode,y=e.onPanelChange,x=e.picker,w=x===void 0?"date":x,C=e.showTime,S=e.hoverValue,E=e.hoverRangeValue,k=e.cellRender,$=e.dateRender,O=e.monthCellRender,D=e.components,P=D===void 0?{}:D,R=e.hideHeader,N=((n=f.useContext(ar))===null||n===void 0?void 0:n.prefixCls)||i||"rc-picker",I=f.useRef();f.useImperativeHandle(t,function(){return{nativeElement:I.current}});var M=og(e),F=oe(M,4),j=F[0],A=F[1],_=F[2],L=F[3],z=ng(r,A),T=w==="date"&&C?"datetime":w,H=f.useMemo(function(){return ig(T,_,L,j,z)},[T,_,L,j,z]),W=a.getNow(),K=an(w,{value:b,postState:function($e){return $e||"date"}}),G=oe(K,2),U=G[0],Z=G[1],Q=U==="date"&&H?"datetime":U,Y=Cg(a,r,T),ee=an(u,{value:d}),ce=oe(ee,2),me=ce[0],we=ce[1],se=f.useMemo(function(){var Ce=ca(me).filter(function($e){return $e});return c?Ce:Ce.slice(0,1)},[me,c]),ge=Ut(function(Ce){we(Ce),g&&(Ce===null||se.length!==Ce.length||se.some(function($e,ue){return!Sn(a,r,$e,Ce[ue],T)}))&&(g==null||g(c?Ce:Ce[0]))}),Ee=Ut(function(Ce){if(h==null||h(Ce),U===w){var $e=c?Y(se,Ce):[Ce];ge($e)}}),Te=an(v||se[0]||W,{value:m}),Pe=oe(Te,2),he=Pe[0],ke=Pe[1];f.useEffect(function(){se[0]&&!m&&ke(se[0])},[se[0]]);var de=function($e,ue){y==null||y($e||m,ue||U)},Re=function($e){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;ke($e),p==null||p($e),ue&&de($e)},He=function($e,ue){Z($e),ue&&Re(ue),de(ue,$e)},Ke=function($e){if(Ee($e),Re($e),U!==w){var ue=["decade","year"],ie=[].concat(ue,["month"]),xe={quarter:[].concat(ue,["quarter"]),week:[].concat(rt(ie),["week"]),date:[].concat(rt(ie),["date"])},_e=xe[w]||ie,ze=_e.indexOf(U),st=_e[ze+1];st&&He(st,$e)}},tt=f.useMemo(function(){var Ce,$e;if(Array.isArray(E)){var ue=oe(E,2);Ce=ue[0],$e=ue[1]}else Ce=E;return!Ce&&!$e?null:(Ce=Ce||$e,$e=$e||Ce,a.isAfter(Ce,$e)?[$e,Ce]:[Ce,$e])},[E,a]),qe=vu(k,$,O),We=P[Q]||Bx[Q]||ys,lt=f.useContext(Dr),Fe=f.useMemo(function(){return ye(ye({},lt),{},{hideHeader:R})},[lt,R]),ae="".concat(N,"-panel"),Le=gs(e,["showWeek","prevIcon","nextIcon","superPrevIcon","superNextIcon","disabledDate","minDate","maxDate","onHover"]);return f.createElement(Dr.Provider,{value:Fe},f.createElement("div",{ref:I,tabIndex:l,className:pe(ae,J({},"".concat(ae,"-rtl"),o==="rtl"))},f.createElement(We,Oe({},Le,{showTime:H,prefixCls:N,locale:z,generateConfig:a,onModeChange:He,pickerValue:he,onPickerValueChange:function($e){Re($e,!0)},value:se[0],onSelect:Ke,values:se,cellRender:qe,hoverRangeValue:tt,hoverValue:S}))))}var Ks=f.memo(f.forwardRef(Lx));function zx(e){var t=e.picker,n=e.multiplePanel,r=e.pickerValue,a=e.onPickerValueChange,o=e.needConfirm,i=e.onSubmit,s=e.range,l=e.hoverValue,c=f.useContext(ar),u=c.prefixCls,d=c.generateConfig,g=f.useCallback(function(y,x){return oo(d,t,y,x)},[d,t]),h=f.useMemo(function(){return g(r,1)},[r,g]),v=function(x){a(g(x,-1))},m={onCellDblClick:function(){o&&i()}},p=t==="time",b=ye(ye({},e),{},{hoverValue:null,hoverRangeValue:null,hideHeader:p});return s?b.hoverRangeValue=l:b.hoverValue=l,n?f.createElement("div",{className:"".concat(u,"-panels")},f.createElement(Dr.Provider,{value:ye(ye({},m),{},{hideNext:!0})},f.createElement(Ks,b)),f.createElement(Dr.Provider,{value:ye(ye({},m),{},{hidePrev:!0})},f.createElement(Ks,Oe({},b,{pickerValue:h,onPickerValueChange:v})))):f.createElement(Dr.Provider,{value:ye({},m)},f.createElement(Ks,b))}function Dd(e){return typeof e=="function"?e():e}function Hx(e){var t=e.prefixCls,n=e.presets,r=e.onClick,a=e.onHover;return n.length?f.createElement("div",{className:"".concat(t,"-presets")},f.createElement("ul",null,n.map(function(o,i){var s=o.label,l=o.value;return f.createElement("li",{key:i,onClick:function(){r(Dd(l))},onMouseEnter:function(){a(Dd(l))},onMouseLeave:function(){a(null)}},s)}))):null}function Sg(e){var t=e.panelRender,n=e.internalMode,r=e.picker,a=e.showNow,o=e.range,i=e.multiple,s=e.activeInfo,l=s===void 0?[0,0,0]:s,c=e.presets,u=e.onPresetHover,d=e.onPresetSubmit,g=e.onFocus,h=e.onBlur,v=e.onPanelMouseDown,m=e.direction,p=e.value,b=e.onSelect,y=e.isInvalid,x=e.defaultOpenValue,w=e.onOk,C=e.onSubmit,S=f.useContext(ar),E=S.prefixCls,k="".concat(E,"-panel"),$=m==="rtl",O=f.useRef(null),D=f.useRef(null),P=f.useState(0),R=oe(P,2),N=R[0],I=R[1],M=f.useState(0),F=oe(M,2),j=F[0],A=F[1],_=f.useState(0),L=oe(_,2),z=L[0],T=L[1],H=function(Ke){Ke.width&&I(Ke.width)},W=oe(l,3),K=W[0],G=W[1],U=W[2],Z=f.useState(0),Q=oe(Z,2),Y=Q[0],ee=Q[1];f.useEffect(function(){ee(10)},[K]),f.useEffect(function(){if(o&&D.current){var He,Ke=((He=O.current)===null||He===void 0?void 0:He.offsetWidth)||0,tt=D.current.getBoundingClientRect();if(!tt.height||tt.right<0){ee(function(Fe){return Math.max(0,Fe-1)});return}var qe=($?G-Ke:K)-tt.left;if(T(qe),N&&N<U){var We=$?tt.right-(G-Ke+N):K+Ke-tt.left-N,lt=Math.max(0,We);A(lt)}else A(0)}},[Y,$,N,K,G,U,o]);function ce(He){return He.filter(function(Ke){return Ke})}var me=f.useMemo(function(){return ce(ca(p))},[p]),we=r==="time"&&!me.length,se=f.useMemo(function(){return we?ce([x]):me},[we,me,x]),ge=we?x:me,Ee=f.useMemo(function(){return se.length?se.some(function(He){return y(He)}):!0},[se,y]),Te=function(){we&&b(x),w(),C()},Pe=f.createElement("div",{className:"".concat(E,"-panel-layout")},f.createElement(Hx,{prefixCls:E,presets:c,onClick:d,onHover:u}),f.createElement("div",null,f.createElement(zx,Oe({},e,{value:ge})),f.createElement(Ix,Oe({},e,{showNow:i?!1:a,invalid:Ee,onSubmit:Te}))));t&&(Pe=t(Pe));var he="".concat(k,"-container"),ke="marginLeft",de="marginRight",Re=f.createElement("div",{onMouseDown:v,tabIndex:-1,className:pe(he,"".concat(E,"-").concat(n,"-panel-container")),style:J(J({},$?de:ke,j),$?ke:de,"auto"),onFocus:g,onBlur:h},Pe);return o&&(Re=f.createElement("div",{onMouseDown:v,ref:D,className:pe("".concat(E,"-range-wrapper"),"".concat(E,"-").concat(r,"-range-wrapper"))},f.createElement("div",{ref:O,className:"".concat(E,"-range-arrow"),style:{left:z}}),f.createElement(Cp,{onResize:H},Re))),Re}function $g(e,t){var n=e.format,r=e.maskFormat,a=e.generateConfig,o=e.locale,i=e.preserveInvalidOnBlur,s=e.inputReadOnly,l=e.required,c=e["aria-required"],u=e.onSubmit,d=e.onFocus,g=e.onBlur,h=e.onInputChange,v=e.onInvalid,m=e.open,p=e.onOpenChange,b=e.onKeyDown,y=e.onChange,x=e.activeHelp,w=e.name,C=e.autoComplete,S=e.id,E=e.value,k=e.invalid,$=e.placeholder,O=e.disabled,D=e.activeIndex,P=e.allHelp,R=e.picker,N=function(z,T){var H=a.locale.parse(o.locale,z,[T]);return H&&a.isValidate(H)?H:null},I=n[0],M=f.useCallback(function(L){return rn(L,{locale:o,format:I,generateConfig:a})},[o,a,I]),F=f.useMemo(function(){return E.map(M)},[E,M]),j=f.useMemo(function(){var L=R==="time"?8:10,z=typeof I=="function"?I(a.getNow()).length:I.length;return Math.max(L,z)+2},[I,R,a]),A=function(z){for(var T=0;T<n.length;T+=1){var H=n[T];if(typeof H=="string"){var W=N(z,H);if(W)return W}}return!1},_=function(z){function T(K){return z!==void 0?K[z]:K}var H=la(e,{aria:!0,data:!0}),W=ye(ye({},H),{},{format:r,validateFormat:function(G){return!!A(G)},preserveInvalidOnBlur:i,readOnly:s,required:l,"aria-required":c,name:w,autoComplete:C,size:j,id:T(S),value:T(F)||"",invalid:T(k),placeholder:T($),active:D===z,helped:P||x&&D===z,disabled:T(O),onFocus:function(G){d(G,z)},onBlur:function(G){g(G,z)},onSubmit:u,onChange:function(G){h();var U=A(G);if(U){v(!1,z),y(U,z);return}v(!!G,z)},onHelp:function(){p(!0,{index:z})},onKeyDown:function(G){var U=!1;if(b==null||b(G,function(){U=!0}),!G.defaultPrevented&&!U)switch(G.key){case"Escape":p(!1,{index:z});break;case"Enter":m||p(!0);break}}},t==null?void 0:t({valueTexts:F}));return Object.keys(W).forEach(function(K){W[K]===void 0&&delete W[K]}),W};return[_,M]}var Vx=["onMouseEnter","onMouseLeave"];function Eg(e){return f.useMemo(function(){return gs(e,Vx)},[e])}var Kx=["icon","type"],Wx=["onClear"];function bs(e){var t=e.icon,n=e.type,r=Nt(e,Kx),a=f.useContext(ar),o=a.prefixCls;return t?f.createElement("span",Oe({className:"".concat(o,"-").concat(n)},r),t):null}function _l(e){var t=e.onClear,n=Nt(e,Wx);return f.createElement(bs,Oe({},n,{type:"clear",role:"button",onMouseDown:function(a){a.preventDefault()},onClick:function(a){a.stopPropagation(),t()}}))}var Ws=["YYYY","MM","DD","HH","mm","ss","SSS"],Md="\u9867",qx=(function(){function e(t){aa(this,e),J(this,"format",void 0),J(this,"maskFormat",void 0),J(this,"cells",void 0),J(this,"maskCells",void 0),this.format=t;var n=Ws.map(function(s){return"(".concat(s,")")}).join("|"),r=new RegExp(n,"g");this.maskFormat=t.replace(r,function(s){return Md.repeat(s.length)});var a=new RegExp("(".concat(Ws.join("|"),")")),o=(t.split(a)||[]).filter(function(s){return s}),i=0;this.cells=o.map(function(s){var l=Ws.includes(s),c=i,u=i+s.length;return i=u,{text:s,mask:l,start:c,end:u}}),this.maskCells=this.cells.filter(function(s){return s.mask})}return oa(e,[{key:"getSelection",value:function(n){var r=this.maskCells[n]||{},a=r.start,o=r.end;return[a||0,o||0]}},{key:"match",value:function(n){for(var r=0;r<this.maskFormat.length;r+=1){var a=this.maskFormat[r],o=n[r];if(!o||a!==Md&&a!==o)return!1}return!0}},{key:"size",value:function(){return this.maskCells.length}},{key:"getMaskCellIndex",value:function(n){for(var r=Number.MAX_SAFE_INTEGER,a=0,o=0;o<this.maskCells.length;o+=1){var i=this.maskCells[o],s=i.start,l=i.end;if(n>=s&&n<=l)return o;var c=Math.min(Math.abs(n-s),Math.abs(n-l));c<r&&(r=c,a=o)}return a}}]),e})();function Ux(e){var t={YYYY:[0,9999,new Date().getFullYear()],MM:[1,12],DD:[1,31],HH:[0,23],mm:[0,59],ss:[0,59],SSS:[0,999]};return t[e]}var Yx=["active","showActiveCls","suffixIcon","format","validateFormat","onChange","onInput","helped","onHelp","onSubmit","onKeyDown","preserveInvalidOnBlur","invalid","clearIcon"],Bl=f.forwardRef(function(e,t){var n=e.active,r=e.showActiveCls,a=r===void 0?!0:r,o=e.suffixIcon,i=e.format,s=e.validateFormat,l=e.onChange;e.onInput;var c=e.helped,u=e.onHelp,d=e.onSubmit,g=e.onKeyDown,h=e.preserveInvalidOnBlur,v=h===void 0?!1:h,m=e.invalid,p=e.clearIcon,b=Nt(e,Yx),y=e.value,x=e.onFocus,w=e.onBlur,C=e.onMouseUp,S=f.useContext(ar),E=S.prefixCls,k=S.input,$=k===void 0?"input":k,O="".concat(E,"-input"),D=f.useState(!1),P=oe(D,2),R=P[0],N=P[1],I=f.useState(y),M=oe(I,2),F=M[0],j=M[1],A=f.useState(""),_=oe(A,2),L=_[0],z=_[1],T=f.useState(null),H=oe(T,2),W=H[0],K=H[1],G=f.useState(null),U=oe(G,2),Z=U[0],Q=U[1],Y=F||"";f.useEffect(function(){j(y)},[y]);var ee=f.useRef(),ce=f.useRef();f.useImperativeHandle(t,function(){return{nativeElement:ee.current,inputElement:ce.current,focus:function(Ce){ce.current.focus(Ce)},blur:function(){ce.current.blur()}}});var me=f.useMemo(function(){return new qx(i||"")},[i]),we=f.useMemo(function(){return c?[0,0]:me.getSelection(W)},[me,W,c]),se=oe(we,2),ge=se[0],Ee=se[1],Te=function(Ce){Ce&&Ce!==i&&Ce!==y&&u()},Pe=Ut(function(Le){s(Le)&&l(Le),j(Le),Te(Le)}),he=function(Ce){if(!i){var $e=Ce.target.value;Te($e),j($e),l($e)}},ke=function(Ce){var $e=Ce.clipboardData.getData("text");s($e)&&Pe($e)},de=f.useRef(!1),Re=function(){de.current=!0},He=function(Ce){var $e=Ce.target,ue=$e.selectionStart,ie=me.getMaskCellIndex(ue);K(ie),Q({}),C==null||C(Ce),de.current=!1},Ke=function(Ce){N(!0),K(0),z(""),x(Ce)},tt=function(Ce){w(Ce)},qe=function(Ce){N(!1),tt(Ce)};bu(n,function(){!n&&!v&&j(y)});var We=function(Ce){Ce.key==="Enter"&&s(Y)&&d(),g==null||g(Ce)},lt=function(Ce){We(Ce);var $e=Ce.key,ue=null,ie=null,xe=Ee-ge,_e=i.slice(ge,Ee),ze=function(Ue){K(function(Ye){var bt=Ye+Ue;return bt=Math.max(bt,0),bt=Math.min(bt,me.size()-1),bt})},st=function(Ue){var Ye=Ux(_e),bt=oe(Ye,3),At=bt[0],Ht=bt[1],Ft=bt[2],Yt=Y.slice(ge,Ee),Tt=Number(Yt);if(isNaN(Tt))return String(Ft||(Ue>0?At:Ht));var tn=Tt+Ue,un=Ht-At+1;return String(At+(un+tn-At)%un)};switch($e){case"Backspace":case"Delete":ue="",ie=_e;break;case"ArrowLeft":ue="",ze(-1);break;case"ArrowRight":ue="",ze(1);break;case"ArrowUp":ue="",ie=st(1);break;case"ArrowDown":ue="",ie=st(-1);break;default:isNaN(Number($e))||(ue=L+$e,ie=ue);break}if(ue!==null&&(z(ue),ue.length>=xe&&(ze(1),z(""))),ie!==null){var Ne=Y.slice(0,ge)+gu(ie,xe)+Y.slice(Ee);Pe(Ne.slice(0,i.length))}Q({})},Fe=f.useRef();Rn(function(){if(!(!R||!i||de.current)){if(!me.match(Y)){Pe(i);return}return ce.current.setSelectionRange(ge,Ee),Fe.current=zt(function(){ce.current.setSelectionRange(ge,Ee)}),function(){zt.cancel(Fe.current)}}},[me,i,R,Y,W,ge,Ee,Z,Pe]);var ae=i?{onFocus:Ke,onBlur:qe,onKeyDown:lt,onMouseDown:Re,onMouseUp:He,onPaste:ke}:{};return f.createElement("div",{ref:ee,className:pe(O,J(J({},"".concat(O,"-active"),n&&a),"".concat(O,"-placeholder"),c))},f.createElement($,Oe({ref:ce,"aria-invalid":m,autoComplete:"off"},b,{onKeyDown:We,onBlur:tt},ae,{value:Y,onChange:he})),f.createElement(bs,{type:"suffix",icon:o}),p)}),Gx=["id","prefix","clearIcon","suffixIcon","separator","activeIndex","activeHelp","allHelp","focused","onFocus","onBlur","onKeyDown","locale","generateConfig","placeholder","className","style","onClick","onClear","value","onChange","onSubmit","onInputChange","format","maskFormat","preserveInvalidOnBlur","onInvalid","disabled","invalid","inputReadOnly","direction","onOpenChange","onActiveInfo","placement","onMouseDown","required","aria-required","autoFocus","tabIndex"],Xx=["index"];function Jx(e,t){var n=e.id,r=e.prefix,a=e.clearIcon,o=e.suffixIcon,i=e.separator,s=i===void 0?"~":i,l=e.activeIndex;e.activeHelp,e.allHelp;var c=e.focused;e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig;var u=e.placeholder,d=e.className,g=e.style,h=e.onClick,v=e.onClear,m=e.value;e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var p=e.disabled,b=e.invalid;e.inputReadOnly;var y=e.direction;e.onOpenChange;var x=e.onActiveInfo;e.placement;var w=e.onMouseDown;e.required,e["aria-required"];var C=e.autoFocus,S=e.tabIndex,E=Nt(e,Gx),k=y==="rtl",$=f.useContext(ar),O=$.prefixCls,D=f.useMemo(function(){if(typeof n=="string")return[n];var Z=n||{};return[Z.start,Z.end]},[n]),P=f.useRef(),R=f.useRef(),N=f.useRef(),I=function(Q){var Y;return(Y=[R,N][Q])===null||Y===void 0?void 0:Y.current};f.useImperativeHandle(t,function(){return{nativeElement:P.current,focus:function(Q){if(mn(Q)==="object"){var Y,ee=Q||{},ce=ee.index,me=ce===void 0?0:ce,we=Nt(ee,Xx);(Y=I(me))===null||Y===void 0||Y.focus(we)}else{var se;(se=I(Q??0))===null||se===void 0||se.focus()}},blur:function(){var Q,Y;(Q=I(0))===null||Q===void 0||Q.blur(),(Y=I(1))===null||Y===void 0||Y.blur()}}});var M=Eg(E),F=f.useMemo(function(){return Array.isArray(u)?u:[u,u]},[u]),j=$g(ye(ye({},e),{},{id:D,placeholder:F})),A=oe(j,1),_=A[0],L=f.useState({position:"absolute",width:0}),z=oe(L,2),T=z[0],H=z[1],W=Ut(function(){var Z=I(l);if(Z){var Q=Z.nativeElement.getBoundingClientRect(),Y=P.current.getBoundingClientRect(),ee=Q.left-Y.left;H(function(ce){return ye(ye({},ce),{},{width:Q.width,left:ee})}),x([Q.left,Q.right,Y.width])}});f.useEffect(function(){W()},[l]);var K=a&&(m[0]&&!p[0]||m[1]&&!p[1]),G=C&&!p[0],U=C&&!G&&!p[1];return f.createElement(Cp,{onResize:W},f.createElement("div",Oe({},M,{className:pe(O,"".concat(O,"-range"),J(J(J(J({},"".concat(O,"-focused"),c),"".concat(O,"-disabled"),p.every(function(Z){return Z})),"".concat(O,"-invalid"),b.some(function(Z){return Z})),"".concat(O,"-rtl"),k),d),style:g,ref:P,onClick:h,onMouseDown:function(Q){var Y=Q.target;Y!==R.current.inputElement&&Y!==N.current.inputElement&&Q.preventDefault(),w==null||w(Q)}}),r&&f.createElement("div",{className:"".concat(O,"-prefix")},r),f.createElement(Bl,Oe({ref:R},_(0),{autoFocus:G,tabIndex:S,"date-range":"start"})),f.createElement("div",{className:"".concat(O,"-range-separator")},s),f.createElement(Bl,Oe({ref:N},_(1),{autoFocus:U,tabIndex:S,"date-range":"end"})),f.createElement("div",{className:"".concat(O,"-active-bar"),style:T}),f.createElement(bs,{type:"suffix",icon:o}),K&&f.createElement(_l,{icon:a,onClear:v})))}var Qx=f.forwardRef(Jx);function Fd(e,t){var n=e??t;return Array.isArray(n)?n:[n,n]}function ti(e){return e===1?"end":"start"}function Zx(e,t){var n=cg(e,function(){var St=e.disabled,ut=e.allowEmpty,Ct=Fd(St,!1),Wt=Fd(ut,!1);return{disabled:Ct,allowEmpty:Wt}}),r=oe(n,6),a=r[0],o=r[1],i=r[2],s=r[3],l=r[4],c=r[5],u=a.prefixCls,d=a.styles,g=a.classNames,h=a.defaultValue,v=a.value,m=a.needConfirm,p=a.onKeyDown,b=a.disabled,y=a.allowEmpty,x=a.disabledDate,w=a.minDate,C=a.maxDate,S=a.defaultOpen,E=a.open,k=a.onOpenChange,$=a.locale,O=a.generateConfig,D=a.picker,P=a.showNow,R=a.showToday,N=a.showTime,I=a.mode,M=a.onPanelChange,F=a.onCalendarChange,j=a.onOk,A=a.defaultPickerValue,_=a.pickerValue,L=a.onPickerValueChange,z=a.inputReadOnly,T=a.suffixIcon,H=a.onFocus,W=a.onBlur,K=a.presets,G=a.ranges,U=a.components,Z=a.cellRender,Q=a.dateRender,Y=a.monthCellRender,ee=a.onClick,ce=dg(t),me=ug(E,S,b,k),we=oe(me,2),se=we[0],ge=we[1],Ee=function(ut,Ct){(b.some(function(Wt){return!Wt})||!ut)&&ge(ut,Ct)},Te=yg(O,$,s,!0,!1,h,v,F,j),Pe=oe(Te,5),he=Pe[0],ke=Pe[1],de=Pe[2],Re=Pe[3],He=Pe[4],Ke=de(),tt=mg(b,y,se),qe=oe(tt,9),We=qe[0],lt=qe[1],Fe=qe[2],ae=qe[3],Le=qe[4],Ce=qe[5],$e=qe[6],ue=qe[7],ie=qe[8],xe=function(ut,Ct){lt(!0),H==null||H(ut,{range:ti(Ct??ae)})},_e=function(ut,Ct){lt(!1),W==null||W(ut,{range:ti(Ct??ae)})},ze=f.useMemo(function(){if(!N)return null;var St=N.disabledTime,ut=St?function(Ct){var Wt=ti(ae),fn=Qp(Ke,$e,ae);return St(Ct,Wt,{from:fn})}:void 0;return ye(ye({},N),{},{disabledTime:ut})},[N,ae,Ke,$e]),st=an([D,D],{value:I}),Ne=oe(st,2),Ie=Ne[0],Ue=Ne[1],Ye=Ie[ae]||D,bt=Ye==="date"&&ze?"datetime":Ye,At=bt===D&&bt!=="time",Ht=xg(D,Ye,P,R,!0),Ft=bg(a,he,ke,de,Re,b,s,We,se,c),Yt=oe(Ft,2),Tt=Yt[0],tn=Yt[1],un=Sx(Ke,b,$e,O,$,x),Pt=eg(Ke,c,y),Tn=oe(Pt,2),q=Tn[0],V=Tn[1],ne=pg(O,$,Ke,Ie,se,ae,o,At,A,_,ze==null?void 0:ze.defaultOpenValue,L,w,C),le=oe(ne,2),Se=le[0],Ae=le[1],ct=Ut(function(St,ut,Ct){var Wt=co(Ie,ae,ut);if((Wt[0]!==Ie[0]||Wt[1]!==Ie[1])&&Ue(Wt),M&&Ct!==!1){var fn=rt(Ke);St&&(fn[ae]=St),M(fn,Wt)}}),Qe=function(ut,Ct){return co(Ke,Ct,ut)},it=function(ut,Ct){var Wt=Ke;ut&&(Wt=Qe(ut,ae)),ue(ae);var fn=Ce(Wt);Re(Wt),Tt(ae,fn===null),fn===null?Ee(!1,{force:!0}):Ct||ce.current.focus({index:fn})},gt=function(ut){var Ct,Wt=ut.target.getRootNode();if(!ce.current.nativeElement.contains((Ct=Wt.activeElement)!==null&&Ct!==void 0?Ct:document.activeElement)){var fn=b.findIndex(function(S0){return!S0});fn>=0&&ce.current.focus({index:fn})}Ee(!0),ee==null||ee(ut)},Ve=function(){tn(null),Ee(!1,{force:!0})},ht=f.useState(null),Ze=oe(ht,2),kt=Ze[0],je=Ze[1],De=f.useState(null),Me=oe(De,2),Be=Me[0],et=Me[1],yt=f.useMemo(function(){return Be||Ke},[Ke,Be]);f.useEffect(function(){se||et(null)},[se]);var vt=f.useState([0,0,0]),_t=oe(vt,2),jt=_t[0],nn=_t[1],Dn=fg(K,G),Mn=function(ut){et(ut),je("preset")},Gn=function(ut){var Ct=tn(ut);Ct&&Ee(!1,{force:!0})},xr=function(ut){it(ut)},Ka=function(ut){et(ut?Qe(ut,ae):null),je("cell")},Wa=function(ut){Ee(!0),xe(ut)},qa=function(){Fe("panel")},Ua=function(ut){var Ct=co(Ke,ae,ut);Re(Ct),!m&&!i&&o===bt&&it(ut)},Bt=function(){Ee(!1)},It=vu(Z,Q,Y,ti(ae)),Dt=Ke[ae]||null,dn=Ut(function(St){return c(St,{activeIndex:ae})}),Ge=f.useMemo(function(){var St=la(a,!1),ut=Vn(a,[].concat(rt(Object.keys(St)),["onChange","onCalendarChange","style","className","onPanelChange","disabledTime"]));return ut},[a]),nt=f.createElement(Sg,Oe({},Ge,{showNow:Ht,showTime:ze,range:!0,multiplePanel:At,activeInfo:jt,disabledDate:un,onFocus:Wa,onBlur:_e,onPanelMouseDown:qa,picker:D,mode:Ye,internalMode:bt,onPanelChange:ct,format:l,value:Dt,isInvalid:dn,onChange:null,onSelect:Ua,pickerValue:Se,defaultOpenValue:ca(N==null?void 0:N.defaultOpenValue)[ae],onPickerValueChange:Ae,hoverValue:yt,onHover:Ka,needConfirm:m,onSubmit:it,onOk:He,presets:Dn,onPresetHover:Mn,onPresetSubmit:Gn,onNow:xr,cellRender:It})),sn=function(ut,Ct){var Wt=Qe(ut,Ct);Re(Wt)},Kn=function(){Fe("input")},Ar=function(ut,Ct){var Wt=$e.length,fn=$e[Wt-1];if(Wt&&fn!==Ct&&m&&!y[fn]&&!ie(fn)&&Ke[fn]){ce.current.focus({index:fn});return}Fe("input"),Ee(!0,{inherit:!0}),ae!==Ct&&se&&!m&&i&&it(null,!0),Le(Ct),xe(ut,Ct)},Yo=function(ut,Ct){if(Ee(!1),!m&&Fe()==="input"){var Wt=Ce(Ke);Tt(ae,Wt===null)}_e(ut,Ct)},Tr=function(ut,Ct){ut.key==="Tab"&&it(null,!0),p==null||p(ut,Ct)},Ya=f.useMemo(function(){return{prefixCls:u,locale:$,generateConfig:O,button:U.button,input:U.input}},[u,$,O,U.button,U.input]);return Rn(function(){se&&ae!==void 0&&ct(null,D,!1)},[se,ae,D]),Rn(function(){var St=Fe();!se&&St==="input"&&(Ee(!1),it(null,!0)),!se&&i&&!m&&St==="panel"&&(Ee(!0),it())},[se]),f.createElement(ar.Provider,{value:Ya},f.createElement(Xp,Oe({},Zp(a),{popupElement:nt,popupStyle:d.popup,popupClassName:g.popup,visible:se,onClose:Bt,range:!0}),f.createElement(Qx,Oe({},a,{ref:ce,suffixIcon:T,activeIndex:We||se?ae:null,activeHelp:!!Be,allHelp:!!Be&&kt==="preset",focused:We,onFocus:Ar,onBlur:Yo,onKeyDown:Tr,onSubmit:it,value:yt,maskFormat:l,onChange:sn,onInputChange:Kn,format:s,inputReadOnly:z,disabled:b,open:se,onOpenChange:Ee,onClick:gt,onClear:Ve,invalid:q,onInvalid:V,onActiveInfo:nn}))))}var e1=f.forwardRef(Zx);function t1(e){var t=e.prefixCls,n=e.value,r=e.onRemove,a=e.removeIcon,o=a===void 0?"\xD7":a,i=e.formatDate,s=e.disabled,l=e.maxTagCount,c=e.placeholder,u="".concat(t,"-selector"),d="".concat(t,"-selection"),g="".concat(d,"-overflow");function h(p,b){return f.createElement("span",{className:pe("".concat(d,"-item")),title:typeof p=="string"?p:null},f.createElement("span",{className:"".concat(d,"-item-content")},p),!s&&b&&f.createElement("span",{onMouseDown:function(x){x.preventDefault()},onClick:b,className:"".concat(d,"-item-remove")},o))}function v(p){var b=i(p),y=function(w){w&&w.stopPropagation(),r(p)};return h(b,y)}function m(p){var b="+ ".concat(p.length," ...");return h(b)}return f.createElement("div",{className:u},f.createElement($a,{prefixCls:g,data:n,renderItem:v,renderRest:m,itemKey:function(b){return i(b)},maxCount:l}),!n.length&&f.createElement("span",{className:"".concat(t,"-selection-placeholder")},c))}var n1=["id","open","prefix","clearIcon","suffixIcon","activeHelp","allHelp","focused","onFocus","onBlur","onKeyDown","locale","generateConfig","placeholder","className","style","onClick","onClear","internalPicker","value","onChange","onSubmit","onInputChange","multiple","maxTagCount","format","maskFormat","preserveInvalidOnBlur","onInvalid","disabled","invalid","inputReadOnly","direction","onOpenChange","onMouseDown","required","aria-required","autoFocus","tabIndex","removeIcon"];function r1(e,t){e.id;var n=e.open,r=e.prefix,a=e.clearIcon,o=e.suffixIcon;e.activeHelp,e.allHelp;var i=e.focused;e.onFocus,e.onBlur,e.onKeyDown;var s=e.locale,l=e.generateConfig,c=e.placeholder,u=e.className,d=e.style,g=e.onClick,h=e.onClear,v=e.internalPicker,m=e.value,p=e.onChange,b=e.onSubmit;e.onInputChange;var y=e.multiple,x=e.maxTagCount;e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var w=e.disabled,C=e.invalid;e.inputReadOnly;var S=e.direction;e.onOpenChange;var E=e.onMouseDown;e.required,e["aria-required"];var k=e.autoFocus,$=e.tabIndex,O=e.removeIcon,D=Nt(e,n1),P=S==="rtl",R=f.useContext(ar),N=R.prefixCls,I=f.useRef(),M=f.useRef();f.useImperativeHandle(t,function(){return{nativeElement:I.current,focus:function(G){var U;(U=M.current)===null||U===void 0||U.focus(G)},blur:function(){var G;(G=M.current)===null||G===void 0||G.blur()}}});var F=Eg(D),j=function(G){p([G])},A=function(G){var U=m.filter(function(Z){return Z&&!Sn(l,s,Z,G,v)});p(U),n||b()},_=$g(ye(ye({},e),{},{onChange:j}),function(K){var G=K.valueTexts;return{value:G[0]||"",active:i}}),L=oe(_,2),z=L[0],T=L[1],H=!!(a&&m.length&&!w),W=y?f.createElement(f.Fragment,null,f.createElement(t1,{prefixCls:N,value:m,onRemove:A,formatDate:T,maxTagCount:x,disabled:w,removeIcon:O,placeholder:c}),f.createElement("input",{className:"".concat(N,"-multiple-input"),value:m.map(T).join(","),ref:M,readOnly:!0,autoFocus:k,tabIndex:$}),f.createElement(bs,{type:"suffix",icon:o}),H&&f.createElement(_l,{icon:a,onClear:h})):f.createElement(Bl,Oe({ref:M},z(),{autoFocus:k,tabIndex:$,suffixIcon:o,clearIcon:H&&f.createElement(_l,{icon:a,onClear:h}),showActiveCls:!1}));return f.createElement("div",Oe({},F,{className:pe(N,J(J(J(J(J({},"".concat(N,"-multiple"),y),"".concat(N,"-focused"),i),"".concat(N,"-disabled"),w),"".concat(N,"-invalid"),C),"".concat(N,"-rtl"),P),u),style:d,ref:I,onClick:g,onMouseDown:function(G){var U,Z=G.target;Z!==((U=M.current)===null||U===void 0?void 0:U.inputElement)&&G.preventDefault(),E==null||E(G)}}),r&&f.createElement("div",{className:"".concat(N,"-prefix")},r),W)}var a1=f.forwardRef(r1);function o1(e,t){var n=cg(e),r=oe(n,6),a=r[0],o=r[1],i=r[2],s=r[3],l=r[4],c=r[5],u=a,d=u.prefixCls,g=u.styles,h=u.classNames,v=u.order,m=u.defaultValue,p=u.value,b=u.needConfirm,y=u.onChange,x=u.onKeyDown,w=u.disabled,C=u.disabledDate,S=u.minDate,E=u.maxDate,k=u.defaultOpen,$=u.open,O=u.onOpenChange,D=u.locale,P=u.generateConfig,R=u.picker,N=u.showNow,I=u.showToday,M=u.showTime,F=u.mode,j=u.onPanelChange,A=u.onCalendarChange,_=u.onOk,L=u.multiple,z=u.defaultPickerValue,T=u.pickerValue,H=u.onPickerValueChange,W=u.inputReadOnly,K=u.suffixIcon,G=u.removeIcon,U=u.onFocus,Z=u.onBlur,Q=u.presets,Y=u.components,ee=u.cellRender,ce=u.dateRender,me=u.monthCellRender,we=u.onClick,se=dg(t);function ge(Ge){return Ge===null?null:L?Ge:Ge[0]}var Ee=Cg(P,D,o),Te=ug($,k,[w],O),Pe=oe(Te,2),he=Pe[0],ke=Pe[1],de=function(nt,sn,Kn){if(A){var Ar=ye({},Kn);delete Ar.range,A(ge(nt),ge(sn),Ar)}},Re=function(nt){_==null||_(ge(nt))},He=yg(P,D,s,!1,v,m,p,de,Re),Ke=oe(He,5),tt=Ke[0],qe=Ke[1],We=Ke[2],lt=Ke[3],Fe=Ke[4],ae=We(),Le=mg([w]),Ce=oe(Le,4),$e=Ce[0],ue=Ce[1],ie=Ce[2],xe=Ce[3],_e=function(nt){ue(!0),U==null||U(nt,{})},ze=function(nt){ue(!1),Z==null||Z(nt,{})},st=an(R,{value:F}),Ne=oe(st,2),Ie=Ne[0],Ue=Ne[1],Ye=Ie==="date"&&M?"datetime":Ie,bt=xg(R,Ie,N,I),At=y&&function(Ge,nt){y(ge(Ge),ge(nt))},Ht=bg(ye(ye({},a),{},{onChange:At}),tt,qe,We,lt,[],s,$e,he,c),Ft=oe(Ht,2),Yt=Ft[1],Tt=eg(ae,c),tn=oe(Tt,2),un=tn[0],Pt=tn[1],Tn=f.useMemo(function(){return un.some(function(Ge){return Ge})},[un]),q=function(nt,sn){if(H){var Kn=ye(ye({},sn),{},{mode:sn.mode[0]});delete Kn.range,H(nt[0],Kn)}},V=pg(P,D,ae,[Ie],he,xe,o,!1,z,T,ca(M==null?void 0:M.defaultOpenValue),q,S,E),ne=oe(V,2),le=ne[0],Se=ne[1],Ae=Ut(function(Ge,nt,sn){if(Ue(nt),j&&sn!==!1){var Kn=Ge||ae[ae.length-1];j(Kn,nt)}}),ct=function(){Yt(We()),ke(!1,{force:!0})},Qe=function(nt){!w&&!se.current.nativeElement.contains(document.activeElement)&&se.current.focus(),ke(!0),we==null||we(nt)},it=function(){Yt(null),ke(!1,{force:!0})},gt=f.useState(null),Ve=oe(gt,2),ht=Ve[0],Ze=Ve[1],kt=f.useState(null),je=oe(kt,2),De=je[0],Me=je[1],Be=f.useMemo(function(){var Ge=[De].concat(rt(ae)).filter(function(nt){return nt});return L?Ge:Ge.slice(0,1)},[ae,De,L]),et=f.useMemo(function(){return!L&&De?[De]:ae.filter(function(Ge){return Ge})},[ae,De,L]);f.useEffect(function(){he||Me(null)},[he]);var yt=fg(Q),vt=function(nt){Me(nt),Ze("preset")},_t=function(nt){var sn=L?Ee(We(),nt):[nt],Kn=Yt(sn);Kn&&!L&&ke(!1,{force:!0})},jt=function(nt){_t(nt)},nn=function(nt){Me(nt),Ze("cell")},Dn=function(nt){ke(!0),_e(nt)},Mn=function(nt){if(ie("panel"),!(L&&Ye!==R)){var sn=L?Ee(We(),nt):[nt];lt(sn),!b&&!i&&o===Ye&&ct()}},Gn=function(){ke(!1)},xr=vu(ee,ce,me),Ka=f.useMemo(function(){var Ge=la(a,!1),nt=Vn(a,[].concat(rt(Object.keys(Ge)),["onChange","onCalendarChange","style","className","onPanelChange"]));return ye(ye({},nt),{},{multiple:a.multiple})},[a]),Wa=f.createElement(Sg,Oe({},Ka,{showNow:bt,showTime:M,disabledDate:C,onFocus:Dn,onBlur:ze,picker:R,mode:Ie,internalMode:Ye,onPanelChange:Ae,format:l,value:ae,isInvalid:c,onChange:null,onSelect:Mn,pickerValue:le,defaultOpenValue:M==null?void 0:M.defaultOpenValue,onPickerValueChange:Se,hoverValue:Be,onHover:nn,needConfirm:b,onSubmit:ct,onOk:Fe,presets:yt,onPresetHover:vt,onPresetSubmit:_t,onNow:jt,cellRender:xr})),qa=function(nt){lt(nt)},Ua=function(){ie("input")},Bt=function(nt){ie("input"),ke(!0,{inherit:!0}),_e(nt)},It=function(nt){ke(!1),ze(nt)},Dt=function(nt,sn){nt.key==="Tab"&&ct(),x==null||x(nt,sn)},dn=f.useMemo(function(){return{prefixCls:d,locale:D,generateConfig:P,button:Y.button,input:Y.input}},[d,D,P,Y.button,Y.input]);return Rn(function(){he&&xe!==void 0&&Ae(null,R,!1)},[he,xe,R]),Rn(function(){var Ge=ie();!he&&Ge==="input"&&(ke(!1),ct()),!he&&i&&!b&&Ge==="panel"&&ct()},[he]),f.createElement(ar.Provider,{value:dn},f.createElement(Xp,Oe({},Zp(a),{popupElement:Wa,popupStyle:g.popup,popupClassName:h.popup,visible:he,onClose:Gn}),f.createElement(a1,Oe({},a,{ref:se,suffixIcon:K,removeIcon:G,activeHelp:!!De,allHelp:!!De&&ht==="preset",focused:$e,onFocus:Bt,onBlur:It,onKeyDown:Dt,onSubmit:ct,value:et,maskFormat:l,onChange:qa,onInputChange:Ua,internalPicker:o,format:s,inputReadOnly:W,disabled:w,open:he,onOpenChange:ke,onClick:Qe,onClear:it,invalid:Tn,onInvalid:function(nt){Pt(nt,0)}}))))}var i1=f.forwardRef(o1);const kg=f.createContext(null),s1=kg.Provider,Ig=f.createContext(null),l1=Ig.Provider;var c1=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],u1=jr(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-checkbox":n,a=e.className,o=e.style,i=e.checked,s=e.disabled,l=e.defaultChecked,c=l===void 0?!1:l,u=e.type,d=u===void 0?"checkbox":u,g=e.title,h=e.onChange,v=Nt(e,c1),m=wt(null),p=wt(null),b=an(c,{value:i}),y=oe(b,2),x=y[0],w=y[1];Do(t,function(){return{focus:function(k){var $;($=m.current)===null||$===void 0||$.focus(k)},blur:function(){var k;(k=m.current)===null||k===void 0||k.blur()},input:m.current,nativeElement:p.current}});var C=pe(r,a,J(J({},"".concat(r,"-checked"),x),"".concat(r,"-disabled"),s)),S=function(k){s||("checked"in e||w(k.target.checked),h==null||h({target:ye(ye({},e),{},{type:d,checked:k.target.checked}),stopPropagation:function(){k.stopPropagation()},preventDefault:function(){k.preventDefault()},nativeEvent:k.nativeEvent}))};return f.createElement("span",{className:C,title:g,style:o,ref:p},f.createElement("input",Oe({},v,{className:"".concat(r,"-input"),ref:m,onChange:S,disabled:s,checked:!!x,type:d})),f.createElement("span",{className:"".concat(r,"-inner")}))});function d1(e){const t=be.useRef(null),n=()=>{zt.cancel(t.current),t.current=null};return[()=>{n(),t.current=zt(()=>{t.current=null})},o=>{t.current&&(o.stopPropagation(),n()),e==null||e(o)}]}const f1=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:Object.assign(Object.assign({},pn(e)),{display:"inline-block",fontSize:0,[`&${r}-rtl`]:{direction:"rtl"},[`&${r}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},m1=e=>{const{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,radioSize:a,motionDurationSlow:o,motionDurationMid:i,motionEaseInOutCirc:s,colorBgContainer:l,colorBorder:c,lineWidth:u,colorBgContainerDisabled:d,colorTextDisabled:g,paddingXS:h,dotColorDisabled:v,lineType:m,radioColor:p,radioBgColor:b,calc:y}=e,x=`${t}-inner`,C=y(a).sub(y(4).mul(2)),S=y(1).mul(a).equal({unit:!0});return{[`${t}-wrapper`]:Object.assign(Object.assign({},pn(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,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}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${fe(u)} ${m} ${r}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:Object.assign(Object.assign({},pn(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${t}-wrapper:hover &,
|
|
28
|
-
&:hover ${x}`]:{borderColor:r},[`${t}-input:focus-visible + ${x}`]:Fo(e),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:S,height:S,marginBlockStart:y(1).mul(a).div(-2).equal({unit:!0}),marginInlineStart:y(1).mul(a).div(-2).equal({unit:!0}),backgroundColor:p,borderBlockStart:0,borderInlineStart:0,borderRadius:S,transform:"scale(0)",opacity:0,transition:`all ${o} ${s}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:S,height:S,backgroundColor:l,borderColor:c,borderStyle:"solid",borderWidth:u,borderRadius:"50%",transition:`all ${i}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[x]:{borderColor:r,backgroundColor:b,"&::after":{transform:`scale(${e.calc(e.dotSize).div(a).equal()})`,opacity:1,transition:`all ${o} ${s}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[x]:{backgroundColor:d,borderColor:c,cursor:"not-allowed","&::after":{backgroundColor:v}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:g,cursor:"not-allowed"},[`&${t}-checked`]:{[x]:{"&::after":{transform:`scale(${y(C).div(a).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:h,paddingInlineEnd:h}})}},p1=e=>{const{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:a,lineType:o,colorBorder:i,motionDurationSlow:s,motionDurationMid:l,buttonPaddingInline:c,fontSize:u,buttonBg:d,fontSizeLG:g,controlHeightLG:h,controlHeightSM:v,paddingXS:m,borderRadius:p,borderRadiusSM:b,borderRadiusLG:y,buttonCheckedBg:x,buttonSolidCheckedColor:w,colorTextDisabled:C,colorBgContainerDisabled:S,buttonCheckedBgDisabled:E,buttonCheckedColorDisabled:k,colorPrimary:$,colorPrimaryHover:O,colorPrimaryActive:D,buttonSolidCheckedBg:P,buttonSolidCheckedHoverBg:R,buttonSolidCheckedActiveBg:N,calc:I}=e;return{[`${r}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:u,lineHeight:fe(I(n).sub(I(a).mul(2)).equal()),background:d,border:`${fe(a)} ${o} ${i}`,borderBlockStartWidth:I(a).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:a,cursor:"pointer",transition:[`color ${l}`,`background ${l}`,`box-shadow ${l}`].join(","),a:{color:t},[`> ${r}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:I(a).mul(-1).equal(),insetInlineStart:I(a).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:a,paddingInline:0,backgroundColor:i,transition:`background-color ${s}`,content:'""'}},"&:first-child":{borderInlineStart:`${fe(a)} ${o} ${i}`,borderStartStartRadius:p,borderEndStartRadius:p},"&:last-child":{borderStartEndRadius:p,borderEndEndRadius:p},"&:first-child:last-child":{borderRadius:p},[`${r}-group-large &`]:{height:h,fontSize:g,lineHeight:fe(I(h).sub(I(a).mul(2)).equal()),"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},[`${r}-group-small &`]:{height:v,paddingInline:I(m).sub(a).equal(),paddingBlock:0,lineHeight:fe(I(v).sub(I(a).mul(2)).equal()),"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},"&:hover":{position:"relative",color:$},"&:has(:focus-visible)":Fo(e),[`${r}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:$,background:x,borderColor:$,"&::before":{backgroundColor:$},"&:first-child":{borderColor:$},"&:hover":{color:O,borderColor:O,"&::before":{backgroundColor:O}},"&:active":{color:D,borderColor:D,"&::before":{backgroundColor:D}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:w,background:P,borderColor:P,"&:hover":{color:w,background:R,borderColor:R},"&:active":{color:w,background:N,borderColor:N}},"&-disabled":{color:C,backgroundColor:S,borderColor:i,cursor:"not-allowed","&:first-child, &:hover":{color:C,backgroundColor:S,borderColor:i}},[`&-disabled${r}-button-wrapper-checked`]:{color:k,backgroundColor:E,borderColor:i,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},g1=e=>{const{wireframe:t,padding:n,marginXS:r,lineWidth:a,fontSizeLG:o,colorText:i,colorBgContainer:s,colorTextDisabled:l,controlItemBgActiveDisabled:c,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:g,colorPrimaryActive:h,colorWhite:v}=e,m=4,p=o,b=t?p-m*2:p-(m+a)*2;return{radioSize:p,dotSize:b,dotColorDisabled:l,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:g,buttonSolidCheckedActiveBg:h,buttonBg:s,buttonCheckedBg:s,buttonColor:i,buttonCheckedBgDisabled:c,buttonCheckedColorDisabled:l,buttonPaddingInline:n-a,wrapperMarginInlineEnd:r,radioColor:t?d:v,radioBgColor:t?s:d}},Og=rr("Radio",e=>{const{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${fe(n)} ${t}`,o=Hn(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[f1(o),m1(o),p1(o)]},g1,{unitless:{radioSize:!0,dotSize:!0}});var v1=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const h1=(e,t)=>{var n,r;const a=f.useContext(kg),o=f.useContext(Ig),{getPrefixCls:i,direction:s,radio:l}=f.useContext(cn),c=f.useRef(null),u=Mo(t,c),{isFormItemInput:d}=f.useContext(Po),g=M=>{var F,j;(F=e.onChange)===null||F===void 0||F.call(e,M),(j=a==null?void 0:a.onChange)===null||j===void 0||j.call(a,M)},{prefixCls:h,className:v,rootClassName:m,children:p,style:b,title:y}=e,x=v1(e,["prefixCls","className","rootClassName","children","style","title"]),w=i("radio",h),C=((a==null?void 0:a.optionType)||o)==="button",S=C?`${w}-button`:w,E=ia(w),[k,$,O]=Og(w,E),D=Object.assign({},x),P=f.useContext(Fa);a&&(D.name=a.name,D.onChange=g,D.checked=e.value===a.value,D.disabled=(n=D.disabled)!==null&&n!==void 0?n:a.disabled),D.disabled=(r=D.disabled)!==null&&r!==void 0?r:P;const R=pe(`${S}-wrapper`,{[`${S}-wrapper-checked`]:D.checked,[`${S}-wrapper-disabled`]:D.disabled,[`${S}-wrapper-rtl`]:s==="rtl",[`${S}-wrapper-in-form-item`]:d,[`${S}-wrapper-block`]:!!(a!=null&&a.block)},l==null?void 0:l.className,v,m,$,O,E),[N,I]=d1(D.onClick);return k(f.createElement(q0,{component:"Radio",disabled:D.disabled},f.createElement("label",{className:R,style:Object.assign(Object.assign({},l==null?void 0:l.style),b),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:y,onClick:N},f.createElement(u1,Object.assign({},D,{className:pe(D.className,{[U0]:!C}),type:"radio",prefixCls:S,ref:u,onClick:I})),p!==void 0?f.createElement("span",{className:`${S}-label`},p):null)))},Vi=f.forwardRef(h1),y1=f.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=f.useContext(cn),{name:a}=f.useContext(Po),o=Y0(z0(a)),{prefixCls:i,className:s,rootClassName:l,options:c,buttonStyle:u="outline",disabled:d,children:g,size:h,style:v,id:m,optionType:p,name:b=o,defaultValue:y,value:x,block:w=!1,onChange:C,onMouseEnter:S,onMouseLeave:E,onFocus:k,onBlur:$}=e,[O,D]=an(y,{value:x}),P=f.useCallback(T=>{const H=O,W=T.target.value;"value"in e||D(W),W!==H&&(C==null||C(T))},[O,D,C]),R=n("radio",i),N=`${R}-group`,I=ia(R),[M,F,j]=Og(R,I);let A=g;c&&c.length>0&&(A=c.map(T=>typeof T=="string"||typeof T=="number"?f.createElement(Vi,{key:T.toString(),prefixCls:R,disabled:d,value:T,checked:O===T},T):f.createElement(Vi,{key:`radio-group-value-options-${T.value}`,prefixCls:R,disabled:T.disabled||d,value:T.value,checked:O===T.value,title:T.title,style:T.style,className:T.className,id:T.id,required:T.required},T.label)));const _=is(h),L=pe(N,`${N}-${u}`,{[`${N}-${_}`]:_,[`${N}-rtl`]:r==="rtl",[`${N}-block`]:w},s,l,F,j,I),z=f.useMemo(()=>({onChange:P,value:O,disabled:d,name:b,optionType:p,block:w}),[P,O,d,b,p,w]);return M(f.createElement("div",Object.assign({},la(e,{aria:!0,data:!0}),{className:L,style:v,onMouseEnter:S,onMouseLeave:E,onFocus:k,onBlur:$,id:m,ref:t}),f.createElement(s1,{value:z},A)))}),b1=f.memo(y1);var x1=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const C1=(e,t)=>{const{getPrefixCls:n}=f.useContext(cn),{prefixCls:r}=e,a=x1(e,["prefixCls"]),o=n("radio",r);return f.createElement(l1,{value:"button"},f.createElement(Vi,Object.assign({prefixCls:o},a,{type:"radio",ref:t})))},w1=f.forwardRef(C1),xs=Vi;xs.Button=w1;xs.Group=b1;xs.__ANT_RADIO=!0;const qs=(e,t)=>{const{componentCls:n,controlHeight:r}=e,a=t?`${n}-${t}`:"",o=dy(e);return[{[`${n}-multiple${a}`]:{paddingBlock:o.containerPadding,paddingInlineStart:o.basePadding,minHeight:r,[`${n}-selection-item`]:{height:o.itemHeight,lineHeight:fe(o.itemLineHeight)}}}]},S1=e=>{const{componentCls:t,calc:n,lineWidth:r}=e,a=Hn(e,{fontHeight:e.fontSize,selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS,controlHeight:e.controlHeightSM}),o=Hn(e,{fontHeight:n(e.multipleItemHeightLG).sub(n(r).mul(2).equal()).equal(),fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius,controlHeight:e.controlHeightLG});return[qs(a,"small"),qs(e),qs(o,"large"),{[`${t}${t}-multiple`]:Object.assign(Object.assign({width:"100%",cursor:"text",[`${t}-selector`]:{flex:"auto",padding:0,position:"relative","&:after":{margin:0},[`${t}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:0,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}}},uy(e)),{[`${t}-multiple-input`]:{width:0,height:0,border:0,visibility:"hidden",position:"absolute",zIndex:-1}})}]},$1=e=>{const{pickerCellCls:t,pickerCellInnerCls:n,cellHeight:r,borderRadiusSM:a,motionDurationMid:o,cellHoverBg:i,lineWidth:s,lineType:l,colorPrimary:c,cellActiveWithRangeBg:u,colorTextLightSolid:d,colorTextDisabled:g,cellBgDisabled:h,colorFillSecondary:v}=e;return{"&::before":{position:"absolute",top:"50%",insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:r,transform:"translateY(-50%)",content:'""',pointerEvents:"none"},[n]:{position:"relative",zIndex:2,display:"inline-block",minWidth:r,height:r,lineHeight:fe(r),borderRadius:a,transition:`background ${o}`},[`&:hover:not(${t}-in-view):not(${t}-disabled),
|
|
29
|
-
&:hover:not(${t}-selected):not(${t}-range-start):not(${t}-range-end):not(${t}-disabled)`]:{[n]:{background:i}},[`&-in-view${t}-today ${n}`]:{"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${fe(
|
|
27
|
+
&${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Ip}}},by(e,m,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:Object.assign(Object.assign({},gn(e)),{[n]:Object.assign(Object.assign({padding:d,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},cd(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${fe(c)} ${fe(v)}`,color:e.colorTextDescription,transition:`all ${s}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${s}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${fe(c)} ${fe(v)}`,color:e.colorText,fontWeight:"normal",fontSize:u,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${s}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},cd(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:g,cursor:"not-allowed","&:hover":{color:g,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${fe(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:h,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${fe(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(v).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:g,backgroundColor:m,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[Oa(e,"slide-up"),Oa(e,"slide-down"),Bi(e,"move-up"),Bi(e,"move-down"),bp(e,"zoom-big")]]},Fb=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},xy({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),Mp(e)),Pb=ar("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:a}=e,o=Vn(e,{menuCls:`${a}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[Mb(o),Db(o)]},Fb,{resetStyle:!1}),gl=e=>{var t;const{menu:n,arrow:r,prefixCls:a,children:o,trigger:i,disabled:l,dropdownRender:s,popupRender:c,getPopupContainer:u,overlayClassName:d,rootClassName:g,overlayStyle:h,open:v,onOpenChange:m,visible:p,onVisibleChange:b,mouseEnterDelay:y=.15,mouseLeaveDelay:x=.1,autoAdjustOverflow:w=!0,placement:C="",overlay:S,transitionName:E,destroyOnHidden:k,destroyPopupOnHide:$}=e,{getPopupContainer:O,getPrefixCls:D,direction:P,dropdown:A}=f.useContext(un),N=c||s;q0();const I=f.useMemo(()=>{const ge=D();return E!==void 0?E:C.includes("top")?`${ge}-slide-down`:`${ge}-slide-up`},[D,C,E]),M=f.useMemo(()=>C?C.includes("Center")?C.slice(0,C.indexOf("Center")):C:P==="rtl"?"bottomRight":"bottomLeft",[C,P]),F=D("dropdown",a),R=la(F),[T,_,B]=Pb(F,R),[,L]=Cp(),j=f.Children.only(Ry(o)?f.createElement("span",null,o):o),z=Pr(j,{className:pe(`${F}-trigger`,{[`${F}-rtl`]:P==="rtl"},j.props.className),disabled:(t=j.props.disabled)!==null&&t!==void 0?t:l}),K=l?[]:i,V=!!(K!=null&&K.includes("contextMenu")),[G,U]=on(!1,{value:v??p}),Z=Yt(ge=>{m==null||m(ge,{source:"trigger"}),b==null||b(ge),U(ge)}),Q=pe(d,g,_,B,R,A==null?void 0:A.className,{[`${F}-rtl`]:P==="rtl"}),Y=Cy({arrowPointAtCenter:typeof r=="object"&&r.pointAtCenter,autoAdjustOverflow:w,offset:L.marginXXS,arrowWidth:r?L.sizePopupArrow:0,borderRadius:L.borderRadius}),ee=f.useCallback(()=>{n!=null&&n.selectable&&(n!=null&&n.multiple)||(m==null||m(!1,{source:"menu"}),U(!1))},[n==null?void 0:n.selectable,n==null?void 0:n.multiple]),ce=()=>{let ge;return n!=null&&n.items?ge=f.createElement(_o,Object.assign({},n)):typeof S=="function"?ge=S():ge=S,N&&(ge=N(ge)),ge=f.Children.only(typeof ge=="string"?f.createElement("span",null,ge):ge),f.createElement(xb,{prefixCls:`${F}-menu`,rootClassName:pe(B,R),expandIcon:f.createElement("span",{className:`${F}-menu-submenu-arrow`},P==="rtl"?f.createElement(uy,{className:`${F}-menu-submenu-arrow-icon`}):f.createElement(dy,{className:`${F}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ee,validator:({mode:Ee})=>{}},ge)},[me,we]=il("Dropdown",h==null?void 0:h.zIndex);let le=f.createElement(Py,Object.assign({alignPoint:V},Kn(e,["rootClassName"]),{mouseEnterDelay:y,mouseLeaveDelay:x,visible:G,builtinPlacements:Y,arrow:!!r,overlayClassName:Q,prefixCls:F,getPopupContainer:u||O,transitionName:I,trigger:K,overlay:ce,placement:M,onVisibleChange:Z,overlayStyle:Object.assign(Object.assign(Object.assign({},A==null?void 0:A.style),h),{zIndex:me}),autoDestroy:k??$}),z);return me&&(le=f.createElement(U0.Provider,{value:we},le)),T(le)},Rb=lu(gl,"align",void 0,"dropdown",e=>e),Ab=e=>f.createElement(Rb,Object.assign({},e),f.createElement("span",null));gl._InternalPanelDoNotUseOrYouWillBeFired=Ab;var hi={exports:{}},Tb=hi.exports,Sd;function jb(){return Sd||(Sd=1,(function(e,t){(function(n,r){e.exports=r()})(Tb,(function(){var n=1e3,r=6e4,a=36e5,o="millisecond",i="second",l="minute",s="hour",c="day",u="week",d="month",g="quarter",h="year",v="date",m="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var I=["th","st","nd","rd"],M=N%100;return"["+N+(I[(M-20)%10]||I[M]||I[0])+"]"}},x=function(N,I,M){var F=String(N);return!F||F.length>=I?N:""+Array(I+1-F.length).join(M)+N},w={s:x,z:function(N){var I=-N.utcOffset(),M=Math.abs(I),F=Math.floor(M/60),R=M%60;return(I<=0?"+":"-")+x(F,2,"0")+":"+x(R,2,"0")},m:function N(I,M){if(I.date()<M.date())return-N(M,I);var F=12*(M.year()-I.year())+(M.month()-I.month()),R=I.clone().add(F,d),T=M-R<0,_=I.clone().add(F+(T?-1:1),d);return+(-(F+(M-R)/(T?R-_:_-R))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:d,y:h,w:u,d:c,D:v,h:s,m:l,s:i,ms:o,Q:g}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},C="en",S={};S[C]=y;var E="$isDayjsObject",k=function(N){return N instanceof P||!(!N||!N[E])},$=function N(I,M,F){var R;if(!I)return C;if(typeof I=="string"){var T=I.toLowerCase();S[T]&&(R=T),M&&(S[T]=M,R=T);var _=I.split("-");if(!R&&_.length>1)return N(_[0])}else{var B=I.name;S[B]=I,R=B}return!F&&R&&(C=R),R||!F&&C},O=function(N,I){if(k(N))return N.clone();var M=typeof I=="object"?I:{};return M.date=N,M.args=arguments,new P(M)},D=w;D.l=$,D.i=k,D.w=function(N,I){return O(N,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var P=(function(){function N(M){this.$L=$(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[E]=!0}var I=N.prototype;return I.parse=function(M){this.$d=(function(F){var R=F.date,T=F.utc;if(R===null)return new Date(NaN);if(D.u(R))return new Date;if(R instanceof Date)return new Date(R);if(typeof R=="string"&&!/Z$/i.test(R)){var _=R.match(p);if(_){var B=_[2]-1||0,L=(_[7]||"0").substring(0,3);return T?new Date(Date.UTC(_[1],B,_[3]||1,_[4]||0,_[5]||0,_[6]||0,L)):new Date(_[1],B,_[3]||1,_[4]||0,_[5]||0,_[6]||0,L)}}return new Date(R)})(M),this.init()},I.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},I.$utils=function(){return D},I.isValid=function(){return this.$d.toString()!==m},I.isSame=function(M,F){var R=O(M);return this.startOf(F)<=R&&R<=this.endOf(F)},I.isAfter=function(M,F){return O(M)<this.startOf(F)},I.isBefore=function(M,F){return this.endOf(F)<O(M)},I.$g=function(M,F,R){return D.u(M)?this[F]:this.set(R,M)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(M,F){var R=this,T=!!D.u(F)||F,_=D.p(M),B=function(Z,Q){var Y=D.w(R.$u?Date.UTC(R.$y,Q,Z):new Date(R.$y,Q,Z),R);return T?Y:Y.endOf(c)},L=function(Z,Q){return D.w(R.toDate()[Z].apply(R.toDate("s"),(T?[0,0,0,0]:[23,59,59,999]).slice(Q)),R)},j=this.$W,z=this.$M,K=this.$D,V="set"+(this.$u?"UTC":"");switch(_){case h:return T?B(1,0):B(31,11);case d:return T?B(1,z):B(0,z+1);case u:var G=this.$locale().weekStart||0,U=(j<G?j+7:j)-G;return B(T?K-U:K+(6-U),z);case c:case v:return L(V+"Hours",0);case s:return L(V+"Minutes",1);case l:return L(V+"Seconds",2);case i:return L(V+"Milliseconds",3);default:return this.clone()}},I.endOf=function(M){return this.startOf(M,!1)},I.$set=function(M,F){var R,T=D.p(M),_="set"+(this.$u?"UTC":""),B=(R={},R[c]=_+"Date",R[v]=_+"Date",R[d]=_+"Month",R[h]=_+"FullYear",R[s]=_+"Hours",R[l]=_+"Minutes",R[i]=_+"Seconds",R[o]=_+"Milliseconds",R)[T],L=T===c?this.$D+(F-this.$W):F;if(T===d||T===h){var j=this.clone().set(v,1);j.$d[B](L),j.init(),this.$d=j.set(v,Math.min(this.$D,j.daysInMonth())).$d}else B&&this.$d[B](L);return this.init(),this},I.set=function(M,F){return this.clone().$set(M,F)},I.get=function(M){return this[D.p(M)]()},I.add=function(M,F){var R,T=this;M=Number(M);var _=D.p(F),B=function(z){var K=O(T);return D.w(K.date(K.date()+Math.round(z*M)),T)};if(_===d)return this.set(d,this.$M+M);if(_===h)return this.set(h,this.$y+M);if(_===c)return B(1);if(_===u)return B(7);var L=(R={},R[l]=r,R[s]=a,R[i]=n,R)[_]||1,j=this.$d.getTime()+M*L;return D.w(j,this)},I.subtract=function(M,F){return this.add(-1*M,F)},I.format=function(M){var F=this,R=this.$locale();if(!this.isValid())return R.invalidDate||m;var T=M||"YYYY-MM-DDTHH:mm:ssZ",_=D.z(this),B=this.$H,L=this.$m,j=this.$M,z=R.weekdays,K=R.months,V=R.meridiem,G=function(Q,Y,ee,ce){return Q&&(Q[Y]||Q(F,T))||ee[Y].slice(0,ce)},U=function(Q){return D.s(B%12||12,Q,"0")},Z=V||function(Q,Y,ee){var ce=Q<12?"AM":"PM";return ee?ce.toLowerCase():ce};return T.replace(b,(function(Q,Y){return Y||(function(ee){switch(ee){case"YY":return String(F.$y).slice(-2);case"YYYY":return D.s(F.$y,4,"0");case"M":return j+1;case"MM":return D.s(j+1,2,"0");case"MMM":return G(R.monthsShort,j,K,3);case"MMMM":return G(K,j);case"D":return F.$D;case"DD":return D.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return G(R.weekdaysMin,F.$W,z,2);case"ddd":return G(R.weekdaysShort,F.$W,z,3);case"dddd":return z[F.$W];case"H":return String(B);case"HH":return D.s(B,2,"0");case"h":return U(1);case"hh":return U(2);case"a":return Z(B,L,!0);case"A":return Z(B,L,!1);case"m":return String(L);case"mm":return D.s(L,2,"0");case"s":return String(F.$s);case"ss":return D.s(F.$s,2,"0");case"SSS":return D.s(F.$ms,3,"0");case"Z":return _}return null})(Q)||_.replace(":","")}))},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(M,F,R){var T,_=this,B=D.p(F),L=O(M),j=(L.utcOffset()-this.utcOffset())*r,z=this-L,K=function(){return D.m(_,L)};switch(B){case h:T=K()/12;break;case d:T=K();break;case g:T=K()/3;break;case u:T=(z-j)/6048e5;break;case c:T=(z-j)/864e5;break;case s:T=z/a;break;case l:T=z/r;break;case i:T=z/n;break;default:T=z}return R?T:D.a(T)},I.daysInMonth=function(){return this.endOf(d).$D},I.$locale=function(){return S[this.$L]},I.locale=function(M,F){if(!M)return this.$L;var R=this.clone(),T=$(M,F,!0);return T&&(R.$L=T),R},I.clone=function(){return D.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},N})(),A=P.prototype;return O.prototype=A,[["$ms",o],["$s",i],["$m",l],["$H",s],["$W",c],["$M",d],["$y",h],["$D",v]].forEach((function(N){A[N[1]]=function(I){return this.$g(I,N[0],N[1])}})),O.extend=function(N,I){return N.$i||(N(I,P,O),N.$i=!0),O},O.locale=$,O.isDayjs=k,O.unix=function(N){return O(1e3*N)},O.en=S[C],O.Ls=S,O.p={},O}))})(hi)),hi.exports}var _b=jb();const wn=sa(_b);var yi={exports:{}},Bb=yi.exports,$d;function Lb(){return $d||($d=1,(function(e,t){(function(n,r){e.exports=r()})(Bb,(function(){return function(n,r){r.prototype.weekday=function(a){var o=this.$locale().weekStart||0,i=this.$W,l=(i<o?i+7:i)-o;return this.$utils().u(a)?l:this.subtract(l,"day").add(a,"day")}}}))})(yi)),yi.exports}var zb=Lb();const Hb=sa(zb);var bi={exports:{}},Vb=bi.exports,Ed;function Kb(){return Ed||(Ed=1,(function(e,t){(function(n,r){e.exports=r()})(Vb,(function(){return function(n,r,a){var o=r.prototype,i=function(d){return d&&(d.indexOf?d:d.s)},l=function(d,g,h,v,m){var p=d.name?d:d.$locale(),b=i(p[g]),y=i(p[h]),x=b||y.map((function(C){return C.slice(0,v)}));if(!m)return x;var w=p.weekStart;return x.map((function(C,S){return x[(S+(w||0))%7]}))},s=function(){return a.Ls[a.locale()]},c=function(d,g){return d.formats[g]||(function(h){return h.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(v,m,p){return m||p.slice(1)}))})(d.formats[g.toUpperCase()])},u=function(){var d=this;return{months:function(g){return g?g.format("MMMM"):l(d,"months")},monthsShort:function(g){return g?g.format("MMM"):l(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(g){return g?g.format("dddd"):l(d,"weekdays")},weekdaysMin:function(g){return g?g.format("dd"):l(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(g){return g?g.format("ddd"):l(d,"weekdaysShort","weekdays",3)},longDateFormat:function(g){return c(d.$locale(),g)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return u.bind(this)()},a.localeData=function(){var d=s();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return a.weekdays()},weekdaysShort:function(){return a.weekdaysShort()},weekdaysMin:function(){return a.weekdaysMin()},months:function(){return a.months()},monthsShort:function(){return a.monthsShort()},longDateFormat:function(g){return c(d,g)},meridiem:d.meridiem,ordinal:d.ordinal}},a.months=function(){return l(s(),"months")},a.monthsShort=function(){return l(s(),"monthsShort","months",3)},a.weekdays=function(d){return l(s(),"weekdays",null,null,d)},a.weekdaysShort=function(d){return l(s(),"weekdaysShort","weekdays",3,d)},a.weekdaysMin=function(d){return l(s(),"weekdaysMin","weekdays",2,d)}}}))})(bi)),bi.exports}var Wb=Kb();const qb=sa(Wb);var xi={exports:{}},Ub=xi.exports,kd;function Yb(){return kd||(kd=1,(function(e,t){(function(n,r){e.exports=r()})(Ub,(function(){var n="week",r="year";return function(a,o,i){var l=o.prototype;l.week=function(s){if(s===void 0&&(s=null),s!==null)return this.add(7*(s-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=i(this).startOf(r).add(1,r).date(c),d=i(this).endOf(n);if(u.isBefore(d))return 1}var g=i(this).startOf(r).date(c).startOf(n).subtract(1,"millisecond"),h=this.diff(g,n,!0);return h<0?i(this).startOf("week").week():Math.ceil(h)},l.weeks=function(s){return s===void 0&&(s=null),this.week(s)}}}))})(xi)),xi.exports}var Gb=Yb();const Xb=sa(Gb);var Ci={exports:{}},Jb=Ci.exports,Id;function Qb(){return Id||(Id=1,(function(e,t){(function(n,r){e.exports=r()})(Jb,(function(){return function(n,r){r.prototype.weekYear=function(){var a=this.month(),o=this.week(),i=this.year();return o===1&&a===11?i+1:a===0&&o>=52?i-1:i}}}))})(Ci)),Ci.exports}var Zb=Qb();const e1=sa(Zb);var wi={exports:{}},t1=wi.exports,Od;function n1(){return Od||(Od=1,(function(e,t){(function(n,r){e.exports=r()})(t1,(function(){return function(n,r){var a=r.prototype,o=a.format;a.format=function(i){var l=this,s=this.$locale();if(!this.isValid())return o.bind(this)(i);var c=this.$utils(),u=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(d){switch(d){case"Q":return Math.ceil((l.$M+1)/3);case"Do":return s.ordinal(l.$D);case"gggg":return l.weekYear();case"GGGG":return l.isoWeekYear();case"wo":return s.ordinal(l.week(),"W");case"w":case"ww":return c.s(l.week(),d==="w"?1:2,"0");case"W":case"WW":return c.s(l.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return c.s(String(l.$H===0?24:l.$H),d==="k"?1:2,"0");case"X":return Math.floor(l.$d.getTime()/1e3);case"x":return l.$d.getTime();case"z":return"["+l.offsetName()+"]";case"zzz":return"["+l.offsetName("long")+"]";default:return d}}));return o.bind(this)(u)}}}))})(wi)),wi.exports}var r1=n1();const a1=sa(r1);var Si={exports:{}},o1=Si.exports,Nd;function i1(){return Nd||(Nd=1,(function(e,t){(function(n,r){e.exports=r()})(o1,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,o=/\d\d/,i=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,s={},c=function(p){return(p=+p)+(p>68?1900:2e3)},u=function(p){return function(b){this[p]=+b}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=(function(b){if(!b||b==="Z")return 0;var y=b.match(/([+-]|\d\d)/g),x=60*y[1]+(+y[2]||0);return x===0?0:y[0]==="+"?-x:x})(p)}],g=function(p){var b=s[p];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(p,b){var y,x=s.meridiem;if(x){for(var w=1;w<=24;w+=1)if(p.indexOf(x(w,0,b))>-1){y=w>12;break}}else y=p===(b?"pm":"PM");return y},v={A:[l,function(p){this.afternoon=h(p,!1)}],a:[l,function(p){this.afternoon=h(p,!0)}],Q:[a,function(p){this.month=3*(p-1)+1}],S:[a,function(p){this.milliseconds=100*+p}],SS:[o,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[i,u("seconds")],ss:[i,u("seconds")],m:[i,u("minutes")],mm:[i,u("minutes")],H:[i,u("hours")],h:[i,u("hours")],HH:[i,u("hours")],hh:[i,u("hours")],D:[i,u("day")],DD:[o,u("day")],Do:[l,function(p){var b=s.ordinal,y=p.match(/\d+/);if(this.day=y[0],b)for(var x=1;x<=31;x+=1)b(x).replace(/\[|\]/g,"")===p&&(this.day=x)}],w:[i,u("week")],ww:[o,u("week")],M:[i,u("month")],MM:[o,u("month")],MMM:[l,function(p){var b=g("months"),y=(g("monthsShort")||b.map((function(x){return x.slice(0,3)}))).indexOf(p)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[l,function(p){var b=g("months").indexOf(p)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(p){this.year=c(p)}],YYYY:[/\d{4}/,u("year")],Z:d,ZZ:d};function m(p){var b,y;b=p,y=s&&s.formats;for(var x=(p=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(O,D,P){var A=P&&P.toUpperCase();return D||y[P]||n[P]||y[A].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(N,I,M){return I||M.slice(1)}))}))).match(r),w=x.length,C=0;C<w;C+=1){var S=x[C],E=v[S],k=E&&E[0],$=E&&E[1];x[C]=$?{regex:k,parser:$}:S.replace(/^\[|\]$/g,"")}return function(O){for(var D={},P=0,A=0;P<w;P+=1){var N=x[P];if(typeof N=="string")A+=N.length;else{var I=N.regex,M=N.parser,F=O.slice(A),R=I.exec(F)[0];M.call(D,R),O=O.replace(R,"")}}return(function(T){var _=T.afternoon;if(_!==void 0){var B=T.hours;_?B<12&&(T.hours+=12):B===12&&(T.hours=0),delete T.afternoon}})(D),D}}return function(p,b,y){y.p.customParseFormat=!0,p&&p.parseTwoDigitYear&&(c=p.parseTwoDigitYear);var x=b.prototype,w=x.parse;x.parse=function(C){var S=C.date,E=C.utc,k=C.args;this.$u=E;var $=k[1];if(typeof $=="string"){var O=k[2]===!0,D=k[3]===!0,P=O||D,A=k[2];D&&(A=k[2]),s=this.$locale(),!O&&A&&(s=y.Ls[A]),this.$d=(function(F,R,T,_){try{if(["x","X"].indexOf(R)>-1)return new Date((R==="X"?1e3:1)*F);var B=m(R)(F),L=B.year,j=B.month,z=B.day,K=B.hours,V=B.minutes,G=B.seconds,U=B.milliseconds,Z=B.zone,Q=B.week,Y=new Date,ee=z||(L||j?1:Y.getDate()),ce=L||Y.getFullYear(),me=0;L&&!j||(me=j>0?j-1:Y.getMonth());var we,le=K||0,ge=V||0,Ee=G||0,_e=U||0;return Z?new Date(Date.UTC(ce,me,ee,le,ge,Ee,_e+60*Z.offset*1e3)):T?new Date(Date.UTC(ce,me,ee,le,ge,Ee,_e)):(we=new Date(ce,me,ee,le,ge,Ee,_e),Q&&(we=_(we).week(Q).toDate()),we)}catch{return new Date("")}})(S,$,E,y),this.init(),A&&A!==!0&&(this.$L=this.locale(A).$L),P&&S!=this.format($)&&(this.$d=new Date("")),s={}}else if($ instanceof Array)for(var N=$.length,I=1;I<=N;I+=1){k[1]=$[I-1];var M=y.apply(this,k);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}I===N&&(this.$d=new Date(""))}else w.call(this,C)}}}))})(Si)),Si.exports}var l1=i1();const s1=sa(l1);wn.extend(s1);wn.extend(a1);wn.extend(Hb);wn.extend(qb);wn.extend(Xb);wn.extend(e1);wn.extend(function(e,t){var n=t.prototype,r=n.format;n.format=function(o){var i=(o||"").replace("Wo","wo");return r.bind(this)(i)}});var c1={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},Lr=function(t){var n=c1[t];return n||t.split("_")[0]},u1={getNow:function(){var t=wn();return typeof t.tz=="function"?t.tz():t},getFixedDate:function(t){return wn(t,["YYYY-M-DD","YYYY-MM-DD"])},getEndDate:function(t){return t.endOf("month")},getWeekDay:function(t){var n=t.locale("en");return n.weekday()+n.localeData().firstDayOfWeek()},getYear:function(t){return t.year()},getMonth:function(t){return t.month()},getDate:function(t){return t.date()},getHour:function(t){return t.hour()},getMinute:function(t){return t.minute()},getSecond:function(t){return t.second()},getMillisecond:function(t){return t.millisecond()},addYear:function(t,n){return t.add(n,"year")},addMonth:function(t,n){return t.add(n,"month")},addDate:function(t,n){return t.add(n,"day")},setYear:function(t,n){return t.year(n)},setMonth:function(t,n){return t.month(n)},setDate:function(t,n){return t.date(n)},setHour:function(t,n){return t.hour(n)},setMinute:function(t,n){return t.minute(n)},setSecond:function(t,n){return t.second(n)},setMillisecond:function(t,n){return t.millisecond(n)},isAfter:function(t,n){return t.isAfter(n)},isValidate:function(t){return t.isValid()},locale:{getWeekFirstDay:function(t){return wn().locale(Lr(t)).localeData().firstDayOfWeek()},getWeekFirstDate:function(t,n){return n.locale(Lr(t)).weekday(0)},getWeek:function(t,n){return n.locale(Lr(t)).week()},getShortWeekDays:function(t){return wn().locale(Lr(t)).localeData().weekdaysMin()},getShortMonths:function(t){return wn().locale(Lr(t)).localeData().monthsShort()},format:function(t,n,r){return n.locale(Lr(t)).format(r)},parse:function(t,n,r){for(var a=Lr(t),o=0;o<r.length;o+=1){var i=r[o],l=n;if(i.includes("wo")||i.includes("Wo")){for(var s=l.split("-")[0],c=l.split("-")[1],u=wn(s,"YYYY").startOf("year").locale(a),d=0;d<=52;d+=1){var g=u.add(d,"week");if(g.format("Wo")===c)return g}return null}var h=wn(l,i,!0).locale(a);if(h.isValid())return h}return null}}};function d1(e,t){return e!==void 0?e:t?"bottomRight":"bottomLeft"}var or=f.createContext(null),f1={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function Jp(e){var t=e.popupElement,n=e.popupStyle,r=e.popupClassName,a=e.popupAlign,o=e.transitionName,i=e.getPopupContainer,l=e.children,s=e.range,c=e.placement,u=e.builtinPlacements,d=u===void 0?f1:u,g=e.direction,h=e.visible,v=e.onClose,m=f.useContext(or),p=m.prefixCls,b="".concat(p,"-dropdown"),y=d1(c,g==="rtl");return f.createElement(au,{showAction:[],hideAction:["click"],popupPlacement:y,builtinPlacements:d,prefixCls:b,popupTransitionName:o,popup:t,popupAlign:a,popupVisible:h,popupClassName:pe(r,J(J({},"".concat(b,"-range"),s),"".concat(b,"-rtl"),g==="rtl")),popupStyle:n,stretch:"minWidth",getPopupContainer:i,onPopupVisibleChange:function(w){w||v()}},l)}function vu(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",r=String(e);r.length<t;)r="".concat(n).concat(r);return r}function ua(e){return e==null?[]:Array.isArray(e)?e:[e]}function uo(e,t,n){var r=at(e);return r[t]=n,r}function vl(e,t){var n={},r=t||Object.keys(e);return r.forEach(function(a){e[a]!==void 0&&(n[a]=e[a])}),n}function Qp(e,t,n){if(n)return n;switch(e){case"time":return t.fieldTimeFormat;case"datetime":return t.fieldDateTimeFormat;case"month":return t.fieldMonthFormat;case"year":return t.fieldYearFormat;case"quarter":return t.fieldQuarterFormat;case"week":return t.fieldWeekFormat;default:return t.fieldDateFormat}}function Zp(e,t,n){var r=n!==void 0?n:t[t.length-1],a=t.find(function(o){return e[o]});return r!==a?e[a]:void 0}function eg(e){return vl(e,["placement","builtinPlacements","popupAlign","getPopupContainer","transitionName","direction"])}function hu(e,t,n,r){var a=f.useMemo(function(){return e||function(i,l){var s=i;return t&&l.type==="date"?t(s,l.today):n&&l.type==="month"?n(s,l.locale):l.originNode}},[e,n,t]),o=f.useCallback(function(i,l){return a(i,ye(ye({},l),{},{range:r}))},[a,r]);return o}function tg(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=f.useState([!1,!1]),a=oe(r,2),o=a[0],i=a[1],l=function(u,d){i(function(g){return uo(g,d,u)})},s=f.useMemo(function(){return o.map(function(c,u){if(c)return!0;var d=e[u];return d?!!(!n[u]&&!d||d&&t(d,{activeIndex:u})):!1})},[e,o,t,n]);return[s,l]}function ng(e,t,n,r,a){var o="",i=[];return e&&i.push(a?"hh":"HH"),t&&i.push("mm"),n&&i.push("ss"),o=i.join(":"),r&&(o+=".SSS"),a&&(o+=" A"),o}function m1(e,t,n,r,a,o){var i=e.fieldDateTimeFormat,l=e.fieldDateFormat,s=e.fieldTimeFormat,c=e.fieldMonthFormat,u=e.fieldYearFormat,d=e.fieldWeekFormat,g=e.fieldQuarterFormat,h=e.yearFormat,v=e.cellYearFormat,m=e.cellQuarterFormat,p=e.dayFormat,b=e.cellDateFormat,y=ng(t,n,r,a,o);return ye(ye({},e),{},{fieldDateTimeFormat:i||"YYYY-MM-DD ".concat(y),fieldDateFormat:l||"YYYY-MM-DD",fieldTimeFormat:s||y,fieldMonthFormat:c||"YYYY-MM",fieldYearFormat:u||"YYYY",fieldWeekFormat:d||"gggg-wo",fieldQuarterFormat:g||"YYYY-[Q]Q",yearFormat:h||"YYYY",cellYearFormat:v||"YYYY",cellQuarterFormat:m||"[Q]Q",cellDateFormat:b||p||"D"})}function rg(e,t){var n=t.showHour,r=t.showMinute,a=t.showSecond,o=t.showMillisecond,i=t.use12Hours;return be.useMemo(function(){return m1(e,n,r,a,o,i)},[e,n,r,a,o,i])}function Qa(e,t,n){return n??t.some(function(r){return e.includes(r)})}var p1=["showNow","showHour","showMinute","showSecond","showMillisecond","use12Hours","hourStep","minuteStep","secondStep","millisecondStep","hideDisabledOptions","defaultValue","disabledHours","disabledMinutes","disabledSeconds","disabledMilliseconds","disabledTime","changeOnScroll","defaultOpenValue"];function g1(e){var t=vl(e,p1),n=e.format,r=e.picker,a=null;return n&&(a=n,Array.isArray(a)&&(a=a[0]),a=pn(a)==="object"?a.format:a),r==="time"&&(t.format=a),[t,a]}function v1(e){return e&&typeof e=="string"}function ag(e,t,n,r){return[e,t,n,r].some(function(a){return a!==void 0})}function og(e,t,n,r,a){var o=t,i=n,l=r;if(!e&&!o&&!i&&!l&&!a)o=!0,i=!0,l=!0;else if(e){var s,c,u,d=[o,i,l].some(function(v){return v===!1}),g=[o,i,l].some(function(v){return v===!0}),h=d?!0:!g;o=(s=o)!==null&&s!==void 0?s:h,i=(c=i)!==null&&c!==void 0?c:h,l=(u=l)!==null&&u!==void 0?u:h}return[o,i,l,a]}function ig(e){var t=e.showTime,n=g1(e),r=oe(n,2),a=r[0],o=r[1],i=t&&pn(t)==="object"?t:{},l=ye(ye({defaultOpenValue:i.defaultOpenValue||i.defaultValue},a),i),s=l.showMillisecond,c=l.showHour,u=l.showMinute,d=l.showSecond,g=ag(c,u,d,s),h=og(g,c,u,d,s),v=oe(h,3);return c=v[0],u=v[1],d=v[2],[l,ye(ye({},l),{},{showHour:c,showMinute:u,showSecond:d,showMillisecond:s}),l.format,o]}function lg(e,t,n,r,a){var o=e==="time";if(e==="datetime"||o){for(var i=r,l=Qp(e,a,null),s=l,c=[t,n],u=0;u<c.length;u+=1){var d=ua(c[u])[0];if(v1(d)){s=d;break}}var g=i.showHour,h=i.showMinute,v=i.showSecond,m=i.showMillisecond,p=i.use12Hours,b=Qa(s,["a","A","LT","LLL","LTS"],p),y=ag(g,h,v,m);y||(g=Qa(s,["H","h","k","LT","LLL"]),h=Qa(s,["m","LT","LLL"]),v=Qa(s,["s","LTS"]),m=Qa(s,["SSS"]));var x=og(y,g,h,v,m),w=oe(x,3);g=w[0],h=w[1],v=w[2];var C=t||ng(g,h,v,m,b);return ye(ye({},i),{},{format:C,showHour:g,showMinute:h,showSecond:v,showMillisecond:m,use12Hours:b})}return null}function h1(e,t,n){if(t===!1)return null;var r=t&&pn(t)==="object"?t:{};return r.clearIcon||n||f.createElement("span",{className:"".concat(e,"-clear-btn")})}var Vl=7;function Tr(e,t,n){return!e&&!t||e===t?!0:!e||!t?!1:n()}function _s(e,t,n){return Tr(t,n,function(){var r=Math.floor(e.getYear(t)/10),a=Math.floor(e.getYear(n)/10);return r===a})}function ta(e,t,n){return Tr(t,n,function(){return e.getYear(t)===e.getYear(n)})}function Dd(e,t){var n=Math.floor(e.getMonth(t)/3);return n+1}function y1(e,t,n){return Tr(t,n,function(){return ta(e,t,n)&&Dd(e,t)===Dd(e,n)})}function yu(e,t,n){return Tr(t,n,function(){return ta(e,t,n)&&e.getMonth(t)===e.getMonth(n)})}function bu(e,t,n){return Tr(t,n,function(){return ta(e,t,n)&&yu(e,t,n)&&e.getDate(t)===e.getDate(n)})}function sg(e,t,n){return Tr(t,n,function(){return e.getHour(t)===e.getHour(n)&&e.getMinute(t)===e.getMinute(n)&&e.getSecond(t)===e.getSecond(n)})}function cg(e,t,n){return Tr(t,n,function(){return bu(e,t,n)&&sg(e,t,n)&&e.getMillisecond(t)===e.getMillisecond(n)})}function oo(e,t,n,r){return Tr(n,r,function(){var a=e.locale.getWeekFirstDate(t,n),o=e.locale.getWeekFirstDate(t,r);return ta(e,a,o)&&e.locale.getWeek(t,n)===e.locale.getWeek(t,r)})}function $n(e,t,n,r,a){switch(a){case"date":return bu(e,n,r);case"week":return oo(e,t.locale,n,r);case"month":return yu(e,n,r);case"quarter":return y1(e,n,r);case"year":return ta(e,n,r);case"decade":return _s(e,n,r);case"time":return sg(e,n,r);default:return cg(e,n,r)}}function hl(e,t,n,r){return!t||!n||!r?!1:e.isAfter(r,t)&&e.isAfter(n,r)}function Jo(e,t,n,r,a){return $n(e,t,n,r,a)?!0:e.isAfter(n,r)}function b1(e,t,n){var r=t.locale.getWeekFirstDay(e),a=t.setDate(n,1),o=t.getWeekDay(a),i=t.addDate(a,r-o);return t.getMonth(i)===t.getMonth(n)&&t.getDate(i)>1&&(i=t.addDate(i,-7)),i}function an(e,t){var n=t.generateConfig,r=t.locale,a=t.format;return e?typeof a=="function"?a(e):n.locale.format(r.locale,e,a):""}function Vi(e,t,n){var r=t,a=["getHour","getMinute","getSecond","getMillisecond"],o=["setHour","setMinute","setSecond","setMillisecond"];return o.forEach(function(i,l){n?r=e[i](r,e[a[l]](n)):r=e[i](r,0)}),r}function x1(e,t,n,r,a){var o=Yt(function(i,l){return!!(n&&n(i,l)||r&&e.isAfter(r,i)&&!$n(e,t,r,i,l.type)||a&&e.isAfter(i,a)&&!$n(e,t,a,i,l.type))});return o}function C1(e,t,n){return f.useMemo(function(){var r=Qp(e,t,n),a=ua(r),o=a[0],i=pn(o)==="object"&&o.type==="mask"?o.format:null;return[a.map(function(l){return typeof l=="string"||typeof l=="function"?l:l.format}),i]},[e,t,n])}function w1(e,t,n){return typeof e[0]=="function"||n?!0:t}function S1(e,t,n,r){var a=Yt(function(o,i){var l=ye({type:t},i);if(delete l.activeIndex,!e.isValidate(o)||n&&n(o,l))return!0;if((t==="date"||t==="time")&&r){var s,c=i&&i.activeIndex===1?"end":"start",u=((s=r.disabledTime)===null||s===void 0?void 0:s.call(r,o,c,{from:l.from}))||{},d=u.disabledHours,g=u.disabledMinutes,h=u.disabledSeconds,v=u.disabledMilliseconds,m=r.disabledHours,p=r.disabledMinutes,b=r.disabledSeconds,y=d||m,x=g||p,w=h||b,C=e.getHour(o),S=e.getMinute(o),E=e.getSecond(o),k=e.getMillisecond(o);if(y&&y().includes(C)||x&&x(C).includes(S)||w&&w(C,S).includes(E)||v&&v(C,S,E).includes(k))return!0}return!1});return a}function Qo(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=f.useMemo(function(){var r=e&&ua(e);return t&&r&&(r[1]=r[1]||r[0]),r},[e,t]);return n}function ug(e,t){var n=e.generateConfig,r=e.locale,a=e.picker,o=a===void 0?"date":a,i=e.prefixCls,l=i===void 0?"rc-picker":i,s=e.styles,c=s===void 0?{}:s,u=e.classNames,d=u===void 0?{}:u,g=e.order,h=g===void 0?!0:g,v=e.components,m=v===void 0?{}:v,p=e.inputRender,b=e.allowClear,y=e.clearIcon,x=e.needConfirm,w=e.multiple,C=e.format,S=e.inputReadOnly,E=e.disabledDate,k=e.minDate,$=e.maxDate,O=e.showTime,D=e.value,P=e.defaultValue,A=e.pickerValue,N=e.defaultPickerValue,I=Qo(D),M=Qo(P),F=Qo(A),R=Qo(N),T=o==="date"&&O?"datetime":o,_=T==="time"||T==="datetime",B=_||w,L=x??_,j=ig(e),z=oe(j,4),K=z[0],V=z[1],G=z[2],U=z[3],Z=rg(r,V),Q=f.useMemo(function(){return lg(T,G,U,K,Z)},[T,G,U,K,Z]),Y=f.useMemo(function(){return ye(ye({},e),{},{prefixCls:l,locale:Z,picker:o,styles:c,classNames:d,order:h,components:ye({input:p},m),clearIcon:h1(l,b,y),showTime:Q,value:I,defaultValue:M,pickerValue:F,defaultPickerValue:R},t==null?void 0:t())},[e]),ee=C1(T,Z,C),ce=oe(ee,2),me=ce[0],we=ce[1],le=w1(me,S,w),ge=x1(n,r,E,k,$),Ee=S1(n,o,ge,Q),_e=f.useMemo(function(){return ye(ye({},Y),{},{needConfirm:L,inputReadOnly:le,disabledDate:ge})},[Y,L,le,ge]);return[_e,T,B,me,we,Ee]}function $1(e,t,n){var r=on(t,{value:e}),a=oe(r,2),o=a[0],i=a[1],l=be.useRef(e),s=be.useRef(),c=function(){Ht.cancel(s.current)},u=Yt(function(){i(l.current),n&&o!==l.current&&n(l.current)}),d=Yt(function(g,h){c(),l.current=g,g||h?u():s.current=Ht(u)});return be.useEffect(function(){return c},[]),[o,d]}function dg(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,a=n.every(function(u){return u})?!1:e,o=$1(a,t||!1,r),i=oe(o,2),l=i[0],s=i[1];function c(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(!d.inherit||l)&&s(u,d.force)}return[l,c]}function fg(e){var t=f.useRef();return f.useImperativeHandle(e,function(){var n;return{nativeElement:(n=t.current)===null||n===void 0?void 0:n.nativeElement,focus:function(a){var o;(o=t.current)===null||o===void 0||o.focus(a)},blur:function(){var a;(a=t.current)===null||a===void 0||a.blur()}}}),t}function mg(e,t){return f.useMemo(function(){return e||(t?(On(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.entries(t).map(function(n){var r=oe(n,2),a=r[0],o=r[1];return{label:a,value:o}})):[])},[e,t])}function xu(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=f.useRef(t);r.current=t,pi(function(){if(e)r.current(e);else{var a=Ht(function(){r.current(e)},n);return function(){Ht.cancel(a)}}},[e])}function pg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=f.useState(0),a=oe(r,2),o=a[0],i=a[1],l=f.useState(!1),s=oe(l,2),c=s[0],u=s[1],d=f.useRef([]),g=f.useRef(null),h=f.useRef(null),v=function(w){g.current=w},m=function(w){return g.current===w},p=function(w){u(w)},b=function(w){return w&&(h.current=w),h.current},y=function(w){var C=d.current,S=new Set(C.filter(function(k){return w[k]||t[k]})),E=C[C.length-1]===0?1:0;return S.size>=2||e[E]?null:E};return xu(c||n,function(){c||(d.current=[],v(null))}),f.useEffect(function(){c&&d.current.push(o)},[c,o]),[c,p,b,o,i,y,d.current,v,m]}function E1(e,t,n,r,a,o){var i=n[n.length-1],l=function(c,u){var d=oe(e,2),g=d[0],h=d[1],v=ye(ye({},u),{},{from:Zp(e,n)});return i===1&&t[0]&&g&&!$n(r,a,g,c,v.type)&&r.isAfter(g,c)||i===0&&t[1]&&h&&!$n(r,a,h,c,v.type)&&r.isAfter(c,h)?!0:o==null?void 0:o(c,v)};return l}function io(e,t,n,r){switch(t){case"date":case"week":return e.addMonth(n,r);case"month":case"quarter":return e.addYear(n,r);case"year":return e.addYear(n,r*10);case"decade":return e.addYear(n,r*100);default:return n}}var Kl=[];function gg(e,t,n,r,a,o,i,l){var s=arguments.length>8&&arguments[8]!==void 0?arguments[8]:Kl,c=arguments.length>9&&arguments[9]!==void 0?arguments[9]:Kl,u=arguments.length>10&&arguments[10]!==void 0?arguments[10]:Kl,d=arguments.length>11?arguments[11]:void 0,g=arguments.length>12?arguments[12]:void 0,h=arguments.length>13?arguments[13]:void 0,v=i==="time",m=o||0,p=function(F){var R=e.getNow();return v&&(R=Vi(e,R)),s[F]||n[F]||R},b=oe(c,2),y=b[0],x=b[1],w=on(function(){return p(0)},{value:y}),C=oe(w,2),S=C[0],E=C[1],k=on(function(){return p(1)},{value:x}),$=oe(k,2),O=$[0],D=$[1],P=f.useMemo(function(){var M=[S,O][m];return v?M:Vi(e,M,u[m])},[v,S,O,m,e,u]),A=function(F){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"panel",T=[E,D][m];T(F);var _=[S,O];_[m]=F,d&&(!$n(e,t,S,_[0],i)||!$n(e,t,O,_[1],i))&&d(_,{source:R,range:m===1?"end":"start",mode:r})},N=function(F,R){if(l){var T={date:"month",week:"month",month:"year",quarter:"year"},_=T[i];if(_&&!$n(e,t,F,R,_))return io(e,i,R,-1);if(i==="year"&&F){var B=Math.floor(e.getYear(F)/10),L=Math.floor(e.getYear(R)/10);if(B!==L)return io(e,i,R,-1)}}return R},I=f.useRef(null);return Tn(function(){if(a&&!s[m]){var M=v?null:e.getNow();if(I.current!==null&&I.current!==m?M=[S,O][m^1]:n[m]?M=m===0?n[0]:N(n[0],n[1]):n[m^1]&&(M=n[m^1]),M){g&&e.isAfter(g,M)&&(M=g);var F=l?io(e,i,M,1):M;h&&e.isAfter(F,h)&&(M=l?io(e,i,h,-1):h),A(M,"reset")}}},[a,m,n[m]]),f.useEffect(function(){a?I.current=m:I.current=null},[a,m]),Tn(function(){a&&s&&s[m]&&A(s[m],"reset")},[a,m]),[P,A]}function vg(e,t){var n=f.useRef(e),r=f.useState({}),a=oe(r,2),o=a[1],i=function(c){return c&&t!==void 0?t:n.current},l=function(c){n.current=c,o({})};return[i,l,i(!0)]}var k1=[];function hg(e,t,n){var r=function(i){return i.map(function(l){return an(l,{generateConfig:e,locale:t,format:n[0]})})},a=function(i,l){for(var s=Math.max(i.length,l.length),c=-1,u=0;u<s;u+=1){var d=i[u]||null,g=l[u]||null;if(d!==g&&!cg(e,d,g)){c=u;break}}return[c<0,c!==0]};return[r,a]}function yg(e,t){return at(e).sort(function(n,r){return t.isAfter(n,r)?1:-1})}function I1(e){var t=vg(e),n=oe(t,2),r=n[0],a=n[1],o=Yt(function(){a(e)});return f.useEffect(function(){o()},[e]),[r,a]}function bg(e,t,n,r,a,o,i,l,s){var c=on(o,{value:i}),u=oe(c,2),d=u[0],g=u[1],h=d||k1,v=I1(h),m=oe(v,2),p=m[0],b=m[1],y=hg(e,t,n),x=oe(y,2),w=x[0],C=x[1],S=Yt(function(k){var $=at(k);if(r)for(var O=0;O<2;O+=1)$[O]=$[O]||null;else a&&($=yg($.filter(function(M){return M}),e));var D=C(p(),$),P=oe(D,2),A=P[0],N=P[1];if(!A&&(b($),l)){var I=w($);l($,I,{range:N?"end":"start"})}}),E=function(){s&&s(p())};return[h,g,p,S,E]}function xg(e,t,n,r,a,o,i,l,s,c){var u=e.generateConfig,d=e.locale,g=e.picker,h=e.onChange,v=e.allowEmpty,m=e.order,p=o.some(function(A){return A})?!1:m,b=hg(u,d,i),y=oe(b,2),x=y[0],w=y[1],C=vg(t),S=oe(C,2),E=S[0],k=S[1],$=Yt(function(){k(t)});f.useEffect(function(){$()},[t]);var O=Yt(function(A){var N=A===null,I=at(A||E());if(N)for(var M=Math.max(o.length,I.length),F=0;F<M;F+=1)o[F]||(I[F]=null);p&&I[0]&&I[1]&&(I=yg(I,u)),a(I);var R=I,T=oe(R,2),_=T[0],B=T[1],L=!_,j=!B,z=v?(!L||v[0])&&(!j||v[1]):!0,K=!m||L||j||$n(u,d,_,B,g)||u.isAfter(B,_),V=(o[0]||!_||!c(_,{activeIndex:0}))&&(o[1]||!B||!c(B,{from:_,activeIndex:1})),G=N||z&&K&&V;if(G){n(I);var U=w(I,t),Z=oe(U,1),Q=Z[0];h&&!Q&&h(N&&I.every(function(Y){return!Y})?null:I,x(I))}return G}),D=Yt(function(A,N){var I=uo(E(),A,r()[A]);k(I),N&&O()}),P=!l&&!s;return xu(!P,function(){P&&(O(),a(t),$())},2),[D,O]}function Cg(e,t,n,r,a){return t!=="date"&&t!=="time"?!1:n!==void 0?n:r!==void 0?r:!a&&(e==="date"||e==="time")}function O1(e,t,n,r,a,o){var i=e;function l(d,g,h){var v=o[d](i),m=h.find(function(x){return x.value===v});if(!m||m.disabled){var p=h.filter(function(x){return!x.disabled}),b=at(p).reverse(),y=b.find(function(x){return x.value<=v})||p[0];y&&(v=y.value,i=o[g](i,v))}return v}var s=l("getHour","setHour",t()),c=l("getMinute","setMinute",n(s)),u=l("getSecond","setSecond",r(s,c));return l("getMillisecond","setMillisecond",a(s,c,u)),i}function Zo(){return[]}function ei(e,t){for(var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:2,i=[],l=n>=1?n|0:1,s=e;s<=t;s+=l){var c=a.includes(s);(!c||!r)&&i.push({label:vu(s,o),value:s,disabled:c})}return i}function Cu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t||{},a=r.use12Hours,o=r.hourStep,i=o===void 0?1:o,l=r.minuteStep,s=l===void 0?1:l,c=r.secondStep,u=c===void 0?1:c,d=r.millisecondStep,g=d===void 0?100:d,h=r.hideDisabledOptions,v=r.disabledTime,m=r.disabledHours,p=r.disabledMinutes,b=r.disabledSeconds,y=f.useMemo(function(){return n||e.getNow()},[n,e]),x=f.useCallback(function(R){var T=(v==null?void 0:v(R))||{};return[T.disabledHours||m||Zo,T.disabledMinutes||p||Zo,T.disabledSeconds||b||Zo,T.disabledMilliseconds||Zo]},[v,m,p,b]),w=f.useMemo(function(){return x(y)},[y,x]),C=oe(w,4),S=C[0],E=C[1],k=C[2],$=C[3],O=f.useCallback(function(R,T,_,B){var L=ei(0,23,i,h,R()),j=a?L.map(function(G){return ye(ye({},G),{},{label:vu(G.value%12||12,2)})}):L,z=function(U){return ei(0,59,s,h,T(U))},K=function(U,Z){return ei(0,59,u,h,_(U,Z))},V=function(U,Z,Q){return ei(0,999,g,h,B(U,Z,Q),3)};return[j,z,K,V]},[h,i,a,g,s,u]),D=f.useMemo(function(){return O(S,E,k,$)},[O,S,E,k,$]),P=oe(D,4),A=P[0],N=P[1],I=P[2],M=P[3],F=function(T,_){var B=function(){return A},L=N,j=I,z=M;if(_){var K=x(_),V=oe(K,4),G=V[0],U=V[1],Z=V[2],Q=V[3],Y=O(G,U,Z,Q),ee=oe(Y,4),ce=ee[0],me=ee[1],we=ee[2],le=ee[3];B=function(){return ce},L=me,j=we,z=le}var ge=O1(T,B,L,j,z,e);return ge};return[F,A,N,I,M]}function N1(e){var t=e.mode,n=e.internalMode,r=e.renderExtraFooter,a=e.showNow,o=e.showTime,i=e.onSubmit,l=e.onNow,s=e.invalid,c=e.needConfirm,u=e.generateConfig,d=e.disabledDate,g=f.useContext(or),h=g.prefixCls,v=g.locale,m=g.button,p=m===void 0?"button":m,b=u.getNow(),y=Cu(u,o,b),x=oe(y,1),w=x[0],C=r==null?void 0:r(t),S=d(b,{type:t}),E=function(){if(!S){var N=w(b);l(N)}},k="".concat(h,"-now"),$="".concat(k,"-btn"),O=a&&f.createElement("li",{className:k},f.createElement("a",{className:pe($,S&&"".concat($,"-disabled")),"aria-disabled":S,onClick:E},n==="date"?v.today:v.now)),D=c&&f.createElement("li",{className:"".concat(h,"-ok")},f.createElement(p,{disabled:s,onClick:i},v.ok)),P=(O||D)&&f.createElement("ul",{className:"".concat(h,"-ranges")},O,D);return!C&&!P?null:f.createElement("div",{className:"".concat(h,"-footer")},C&&f.createElement("div",{className:"".concat(h,"-footer-extra")},C),P)}function wg(e,t,n){function r(a,o){var i=a.findIndex(function(s){return $n(e,t,s,o,n)});if(i===-1)return[].concat(at(a),[o]);var l=at(a);return l.splice(i,1),l}return r}var da=f.createContext(null);function yl(){return f.useContext(da)}function Aa(e,t){var n=e.prefixCls,r=e.generateConfig,a=e.locale,o=e.disabledDate,i=e.minDate,l=e.maxDate,s=e.cellRender,c=e.hoverValue,u=e.hoverRangeValue,d=e.onHover,g=e.values,h=e.pickerValue,v=e.onSelect,m=e.prevIcon,p=e.nextIcon,b=e.superPrevIcon,y=e.superNextIcon,x=r.getNow(),w={now:x,values:g,pickerValue:h,prefixCls:n,disabledDate:o,minDate:i,maxDate:l,cellRender:s,hoverValue:c,hoverRangeValue:u,onHover:d,locale:a,generateConfig:r,onSelect:v,panelType:t,prevIcon:m,nextIcon:p,superPrevIcon:b,superNextIcon:y};return[w,x]}var Mr=f.createContext({});function Bo(e){for(var t=e.rowNum,n=e.colNum,r=e.baseDate,a=e.getCellDate,o=e.prefixColumn,i=e.rowClassName,l=e.titleFormat,s=e.getCellText,c=e.getCellClassName,u=e.headerCells,d=e.cellSelection,g=d===void 0?!0:d,h=e.disabledDate,v=yl(),m=v.prefixCls,p=v.panelType,b=v.now,y=v.disabledDate,x=v.cellRender,w=v.onHover,C=v.hoverValue,S=v.hoverRangeValue,E=v.generateConfig,k=v.values,$=v.locale,O=v.onSelect,D=h||y,P="".concat(m,"-cell"),A=f.useContext(Mr),N=A.onCellDblClick,I=function(j){return k.some(function(z){return z&&$n(E,$,j,z,p)})},M=[],F=0;F<t;F+=1){for(var R=[],T=void 0,_=function(){var j=F*n+B,z=a(r,j),K=D==null?void 0:D(z,{type:p});B===0&&(T=z,o&&R.push(o(T)));var V=!1,G=!1,U=!1;if(g&&S){var Z=oe(S,2),Q=Z[0],Y=Z[1];V=hl(E,Q,Y,z),G=$n(E,$,z,Q,p),U=$n(E,$,z,Y,p)}var ee=l?an(z,{locale:$,format:l,generateConfig:E}):void 0,ce=f.createElement("div",{className:"".concat(P,"-inner")},s(z));R.push(f.createElement("td",{key:B,title:ee,className:pe(P,ye(J(J(J(J(J(J({},"".concat(P,"-disabled"),K),"".concat(P,"-hover"),(C||[]).some(function(me){return $n(E,$,z,me,p)})),"".concat(P,"-in-range"),V&&!G&&!U),"".concat(P,"-range-start"),G),"".concat(P,"-range-end"),U),"".concat(m,"-cell-selected"),!S&&p!=="week"&&I(z)),c(z))),onClick:function(){K||O(z)},onDoubleClick:function(){!K&&N&&N()},onMouseEnter:function(){K||w==null||w(z)},onMouseLeave:function(){K||w==null||w(null)}},x?x(z,{prefixCls:m,originNode:ce,today:b,type:p,locale:$}):ce))},B=0;B<n;B+=1)_();M.push(f.createElement("tr",{key:F,className:i==null?void 0:i(T)},R))}return f.createElement("div",{className:"".concat(m,"-body")},f.createElement("table",{className:"".concat(m,"-content")},u&&f.createElement("thead",null,f.createElement("tr",null,u)),f.createElement("tbody",null,M)))}var ti={visibility:"hidden"};function Ta(e){var t=e.offset,n=e.superOffset,r=e.onChange,a=e.getStart,o=e.getEnd,i=e.children,l=yl(),s=l.prefixCls,c=l.prevIcon,u=c===void 0?"\u2039":c,d=l.nextIcon,g=d===void 0?"\u203A":d,h=l.superPrevIcon,v=h===void 0?"\xAB":h,m=l.superNextIcon,p=m===void 0?"\xBB":m,b=l.minDate,y=l.maxDate,x=l.generateConfig,w=l.locale,C=l.pickerValue,S=l.panelType,E="".concat(s,"-header"),k=f.useContext(Mr),$=k.hidePrev,O=k.hideNext,D=k.hideHeader,P=f.useMemo(function(){if(!b||!t||!o)return!1;var L=o(t(-1,C));return!Jo(x,w,L,b,S)},[b,t,C,o,x,w,S]),A=f.useMemo(function(){if(!b||!n||!o)return!1;var L=o(n(-1,C));return!Jo(x,w,L,b,S)},[b,n,C,o,x,w,S]),N=f.useMemo(function(){if(!y||!t||!a)return!1;var L=a(t(1,C));return!Jo(x,w,y,L,S)},[y,t,C,a,x,w,S]),I=f.useMemo(function(){if(!y||!n||!a)return!1;var L=a(n(1,C));return!Jo(x,w,y,L,S)},[y,n,C,a,x,w,S]),M=function(j){t&&r(t(j,C))},F=function(j){n&&r(n(j,C))};if(D)return null;var R="".concat(E,"-prev-btn"),T="".concat(E,"-next-btn"),_="".concat(E,"-super-prev-btn"),B="".concat(E,"-super-next-btn");return f.createElement("div",{className:E},n&&f.createElement("button",{type:"button","aria-label":w.previousYear,onClick:function(){return F(-1)},tabIndex:-1,className:pe(_,A&&"".concat(_,"-disabled")),disabled:A,style:$?ti:{}},v),t&&f.createElement("button",{type:"button","aria-label":w.previousMonth,onClick:function(){return M(-1)},tabIndex:-1,className:pe(R,P&&"".concat(R,"-disabled")),disabled:P,style:$?ti:{}},u),f.createElement("div",{className:"".concat(E,"-view")},i),t&&f.createElement("button",{type:"button","aria-label":w.nextMonth,onClick:function(){return M(1)},tabIndex:-1,className:pe(T,N&&"".concat(T,"-disabled")),disabled:N,style:O?ti:{}},g),n&&f.createElement("button",{type:"button","aria-label":w.nextYear,onClick:function(){return F(1)},tabIndex:-1,className:pe(B,I&&"".concat(B,"-disabled")),disabled:I,style:O?ti:{}},p))}function bl(e){var t=e.prefixCls,n=e.panelName,r=n===void 0?"date":n,a=e.locale,o=e.generateConfig,i=e.pickerValue,l=e.onPickerValueChange,s=e.onModeChange,c=e.mode,u=c===void 0?"date":c,d=e.disabledDate,g=e.onSelect,h=e.onHover,v=e.showWeek,m="".concat(t,"-").concat(r,"-panel"),p="".concat(t,"-cell"),b=u==="week",y=Aa(e,u),x=oe(y,2),w=x[0],C=x[1],S=o.locale.getWeekFirstDay(a.locale),E=o.setDate(i,1),k=b1(a.locale,o,E),$=o.getMonth(i),O=v===void 0?b:v,D=O?function(L){var j=d==null?void 0:d(L,{type:"week"});return f.createElement("td",{key:"week",className:pe(p,"".concat(p,"-week"),J({},"".concat(p,"-disabled"),j)),onClick:function(){j||g(L)},onMouseEnter:function(){j||h==null||h(L)},onMouseLeave:function(){j||h==null||h(null)}},f.createElement("div",{className:"".concat(p,"-inner")},o.locale.getWeek(a.locale,L)))}:null,P=[],A=a.shortWeekDays||(o.locale.getShortWeekDays?o.locale.getShortWeekDays(a.locale):[]);D&&P.push(f.createElement("th",{key:"empty"},f.createElement("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},a.week)));for(var N=0;N<Vl;N+=1)P.push(f.createElement("th",{key:N},A[(N+S)%Vl]));var I=function(j,z){return o.addDate(j,z)},M=function(j){return an(j,{locale:a,format:a.cellDateFormat,generateConfig:o})},F=function(j){var z=J(J({},"".concat(t,"-cell-in-view"),yu(o,j,i)),"".concat(t,"-cell-today"),bu(o,j,C));return z},R=a.shortMonths||(o.locale.getShortMonths?o.locale.getShortMonths(a.locale):[]),T=f.createElement("button",{type:"button","aria-label":a.yearSelect,key:"year",onClick:function(){s("year",i)},tabIndex:-1,className:"".concat(t,"-year-btn")},an(i,{locale:a,format:a.yearFormat,generateConfig:o})),_=f.createElement("button",{type:"button","aria-label":a.monthSelect,key:"month",onClick:function(){s("month",i)},tabIndex:-1,className:"".concat(t,"-month-btn")},a.monthFormat?an(i,{locale:a,format:a.monthFormat,generateConfig:o}):R[$]),B=a.monthBeforeYear?[_,T]:[T,_];return f.createElement(da.Provider,{value:w},f.createElement("div",{className:pe(m,v&&"".concat(m,"-show-week"))},f.createElement(Ta,{offset:function(j){return o.addMonth(i,j)},superOffset:function(j){return o.addYear(i,j)},onChange:l,getStart:function(j){return o.setDate(j,1)},getEnd:function(j){var z=o.setDate(j,1);return z=o.addMonth(z,1),o.addDate(z,-1)}},B),f.createElement(Bo,Oe({titleFormat:a.fieldDateFormat},e,{colNum:Vl,rowNum:6,baseDate:k,headerCells:P,getCellDate:I,getCellText:M,getCellClassName:F,prefixColumn:D,cellSelection:!b}))))}var D1=1/3;function M1(e,t){var n=f.useRef(!1),r=f.useRef(null),a=f.useRef(null),o=function(){return n.current},i=function(){Ht.cancel(r.current),n.current=!1},l=f.useRef(),s=function(){var d=e.current;if(a.current=null,l.current=0,d){var g=d.querySelector('[data-value="'.concat(t,'"]')),h=d.querySelector("li"),v=function m(){i(),n.current=!0,l.current+=1;var p=d.scrollTop,b=h.offsetTop,y=g.offsetTop,x=y-b;if(y===0&&g!==h||!hp(d)){l.current<=5&&(r.current=Ht(m));return}var w=p+(x-p)*D1,C=Math.abs(x-w);if(a.current!==null&&a.current<C){i();return}if(a.current=C,C<=1){d.scrollTop=x,i();return}d.scrollTop=w,r.current=Ht(m)};g&&h&&v()}},c=Yt(s);return[c,i,o]}var F1=300;function P1(e){return e.map(function(t){var n=t.value,r=t.label,a=t.disabled;return[n,r,a].join(",")}).join(";")}function Za(e){var t=e.units,n=e.value,r=e.optionalValue,a=e.type,o=e.onChange,i=e.onHover,l=e.onDblClick,s=e.changeOnScroll,c=yl(),u=c.prefixCls,d=c.cellRender,g=c.now,h=c.locale,v="".concat(u,"-time-panel"),m="".concat(u,"-time-panel-cell"),p=f.useRef(null),b=f.useRef(),y=function(){clearTimeout(b.current)},x=M1(p,n??r),w=oe(x,3),C=w[0],S=w[1],E=w[2];Tn(function(){return C(),y(),function(){S(),y()}},[n,r,P1(t)]);var k=function(D){y();var P=D.target;!E()&&s&&(b.current=setTimeout(function(){var A=p.current,N=A.querySelector("li").offsetTop,I=Array.from(A.querySelectorAll("li")),M=I.map(function(B){return B.offsetTop-N}),F=M.map(function(B,L){return t[L].disabled?Number.MAX_SAFE_INTEGER:Math.abs(B-P.scrollTop)}),R=Math.min.apply(Math,at(F)),T=F.findIndex(function(B){return B===R}),_=t[T];_&&!_.disabled&&o(_.value)},F1))},$="".concat(v,"-column");return f.createElement("ul",{className:$,ref:p,"data-type":a,onScroll:k},t.map(function(O){var D=O.label,P=O.value,A=O.disabled,N=f.createElement("div",{className:"".concat(m,"-inner")},D);return f.createElement("li",{key:P,className:pe(m,J(J({},"".concat(m,"-selected"),n===P),"".concat(m,"-disabled"),A)),onClick:function(){A||o(P)},onDoubleClick:function(){!A&&l&&l()},onMouseEnter:function(){i(P)},onMouseLeave:function(){i(null)},"data-value":P},d?d(P,{prefixCls:u,originNode:N,today:g,type:"time",subType:a,locale:h}):N)}))}function wr(e){return e<12}function R1(e){var t=e.showHour,n=e.showMinute,r=e.showSecond,a=e.showMillisecond,o=e.use12Hours,i=e.changeOnScroll,l=yl(),s=l.prefixCls,c=l.values,u=l.generateConfig,d=l.locale,g=l.onSelect,h=l.onHover,v=h===void 0?function(){}:h,m=l.pickerValue,p=(c==null?void 0:c[0])||null,b=f.useContext(Mr),y=b.onCellDblClick,x=Cu(u,e,p),w=oe(x,5),C=w[0],S=w[1],E=w[2],k=w[3],$=w[4],O=function(xe){var Be=p&&u[xe](p),He=m&&u[xe](m);return[Be,He]},D=O("getHour"),P=oe(D,2),A=P[0],N=P[1],I=O("getMinute"),M=oe(I,2),F=M[0],R=M[1],T=O("getSecond"),_=oe(T,2),B=_[0],L=_[1],j=O("getMillisecond"),z=oe(j,2),K=z[0],V=z[1],G=A===null?null:wr(A)?"am":"pm",U=f.useMemo(function(){return o?wr(A)?S.filter(function(ie){return wr(ie.value)}):S.filter(function(ie){return!wr(ie.value)}):S},[A,S,o]),Z=function(xe,Be){var He,st=xe.filter(function(Ne){return!Ne.disabled});return Be??(st==null||(He=st[0])===null||He===void 0?void 0:He.value)},Q=Z(S,A),Y=f.useMemo(function(){return E(Q)},[E,Q]),ee=Z(Y,F),ce=f.useMemo(function(){return k(Q,ee)},[k,Q,ee]),me=Z(ce,B),we=f.useMemo(function(){return $(Q,ee,me)},[$,Q,ee,me]),le=Z(we,K),ge=f.useMemo(function(){if(!o)return[];var ie=u.getNow(),xe=u.setHour(ie,6),Be=u.setHour(ie,18),He=function(Ne,Ie){var Ye=d.cellMeridiemFormat;return Ye?an(Ne,{generateConfig:u,locale:d,format:Ye}):Ie};return[{label:He(xe,"AM"),value:"am",disabled:S.every(function(st){return st.disabled||!wr(st.value)})},{label:He(Be,"PM"),value:"pm",disabled:S.every(function(st){return st.disabled||wr(st.value)})}]},[S,o,u,d]),Ee=function(xe){var Be=C(xe);g(Be)},_e=f.useMemo(function(){var ie=p||m||u.getNow(),xe=function(He){return He!=null};return xe(A)?(ie=u.setHour(ie,A),ie=u.setMinute(ie,F),ie=u.setSecond(ie,B),ie=u.setMillisecond(ie,K)):xe(N)?(ie=u.setHour(ie,N),ie=u.setMinute(ie,R),ie=u.setSecond(ie,L),ie=u.setMillisecond(ie,V)):xe(Q)&&(ie=u.setHour(ie,Q),ie=u.setMinute(ie,ee),ie=u.setSecond(ie,me),ie=u.setMillisecond(ie,le)),ie},[p,m,A,F,B,K,Q,ee,me,le,N,R,L,V,u]),Re=function(xe,Be){return xe===null?null:u[Be](_e,xe)},he=function(xe){return Re(xe,"setHour")},ke=function(xe){return Re(xe,"setMinute")},de=function(xe){return Re(xe,"setSecond")},Te=function(xe){return Re(xe,"setMillisecond")},Ve=function(xe){return xe===null?null:xe==="am"&&!wr(A)?u.setHour(_e,A-12):xe==="pm"&&wr(A)?u.setHour(_e,A+12):_e},We=function(xe){Ee(he(xe))},nt=function(xe){Ee(ke(xe))},Ue=function(xe){Ee(de(xe))},qe=function(xe){Ee(Te(xe))},ct=function(xe){Ee(Ve(xe))},Fe=function(xe){v(he(xe))},ae=function(xe){v(ke(xe))},ze=function(xe){v(de(xe))},Ce=function(xe){v(Te(xe))},$e=function(xe){v(Ve(xe))},ue={onDblClick:y,changeOnScroll:i};return f.createElement("div",{className:"".concat(s,"-content")},t&&f.createElement(Za,Oe({units:U,value:A,optionalValue:N,type:"hour",onChange:We,onHover:Fe},ue)),n&&f.createElement(Za,Oe({units:Y,value:F,optionalValue:R,type:"minute",onChange:nt,onHover:ae},ue)),r&&f.createElement(Za,Oe({units:ce,value:B,optionalValue:L,type:"second",onChange:Ue,onHover:ze},ue)),a&&f.createElement(Za,Oe({units:we,value:K,optionalValue:V,type:"millisecond",onChange:qe,onHover:Ce},ue)),o&&f.createElement(Za,Oe({units:ge,value:G,type:"meridiem",onChange:ct,onHover:$e},ue)))}function Sg(e){var t=e.prefixCls,n=e.value,r=e.locale,a=e.generateConfig,o=e.showTime,i=o||{},l=i.format,s="".concat(t,"-time-panel"),c=Aa(e,"time"),u=oe(c,1),d=u[0];return f.createElement(da.Provider,{value:d},f.createElement("div",{className:pe(s)},f.createElement(Ta,null,n?an(n,{locale:r,format:l,generateConfig:a}):"\xA0"),f.createElement(R1,o)))}function A1(e){var t=e.prefixCls,n=e.generateConfig,r=e.showTime,a=e.onSelect,o=e.value,i=e.pickerValue,l=e.onHover,s="".concat(t,"-datetime-panel"),c=Cu(n,r),u=oe(c,1),d=u[0],g=function(p){return o?Vi(n,p,o):Vi(n,p,i)},h=function(p){l==null||l(p&&g(p))},v=function(p){var b=g(p);a(d(b,b))};return f.createElement("div",{className:s},f.createElement(bl,Oe({},e,{onSelect:v,onHover:h})),f.createElement(Sg,e))}function T1(e){var t=e.prefixCls,n=e.locale,r=e.generateConfig,a=e.pickerValue,o=e.disabledDate,i=e.onPickerValueChange,l="".concat(t,"-decade-panel"),s=Aa(e,"decade"),c=oe(s,1),u=c[0],d=function(S){var E=Math.floor(r.getYear(S)/100)*100;return r.setYear(S,E)},g=function(S){var E=d(S);return r.addYear(E,99)},h=d(a),v=g(a),m=r.addYear(h,-10),p=function(S,E){return r.addYear(S,E*10)},b=function(S){var E=n.cellYearFormat,k=an(S,{locale:n,format:E,generateConfig:r}),$=an(r.addYear(S,9),{locale:n,format:E,generateConfig:r});return"".concat(k,"-").concat($)},y=function(S){return J({},"".concat(t,"-cell-in-view"),_s(r,S,h)||_s(r,S,v)||hl(r,h,v,S))},x=o?function(C,S){var E=r.setDate(C,1),k=r.setMonth(E,0),$=r.setYear(k,Math.floor(r.getYear(k)/10)*10),O=r.addYear($,10),D=r.addDate(O,-1);return o($,S)&&o(D,S)}:null,w="".concat(an(h,{locale:n,format:n.yearFormat,generateConfig:r}),"-").concat(an(v,{locale:n,format:n.yearFormat,generateConfig:r}));return f.createElement(da.Provider,{value:u},f.createElement("div",{className:l},f.createElement(Ta,{superOffset:function(S){return r.addYear(a,S*100)},onChange:i,getStart:d,getEnd:g},w),f.createElement(Bo,Oe({},e,{disabledDate:x,colNum:3,rowNum:4,baseDate:m,getCellDate:p,getCellText:b,getCellClassName:y}))))}function j1(e){var t=e.prefixCls,n=e.locale,r=e.generateConfig,a=e.pickerValue,o=e.disabledDate,i=e.onPickerValueChange,l=e.onModeChange,s="".concat(t,"-month-panel"),c=Aa(e,"month"),u=oe(c,1),d=u[0],g=r.setMonth(a,0),h=n.shortMonths||(r.locale.getShortMonths?r.locale.getShortMonths(n.locale):[]),v=function(w,C){return r.addMonth(w,C)},m=function(w){var C=r.getMonth(w);return n.monthFormat?an(w,{locale:n,format:n.monthFormat,generateConfig:r}):h[C]},p=function(){return J({},"".concat(t,"-cell-in-view"),!0)},b=o?function(x,w){var C=r.setDate(x,1),S=r.setMonth(C,r.getMonth(C)+1),E=r.addDate(S,-1);return o(C,w)&&o(E,w)}:null,y=f.createElement("button",{type:"button",key:"year","aria-label":n.yearSelect,onClick:function(){l("year")},tabIndex:-1,className:"".concat(t,"-year-btn")},an(a,{locale:n,format:n.yearFormat,generateConfig:r}));return f.createElement(da.Provider,{value:d},f.createElement("div",{className:s},f.createElement(Ta,{superOffset:function(w){return r.addYear(a,w)},onChange:i,getStart:function(w){return r.setMonth(w,0)},getEnd:function(w){return r.setMonth(w,11)}},y),f.createElement(Bo,Oe({},e,{disabledDate:b,titleFormat:n.fieldMonthFormat,colNum:3,rowNum:4,baseDate:g,getCellDate:v,getCellText:m,getCellClassName:p}))))}function _1(e){var t=e.prefixCls,n=e.locale,r=e.generateConfig,a=e.pickerValue,o=e.onPickerValueChange,i=e.onModeChange,l="".concat(t,"-quarter-panel"),s=Aa(e,"quarter"),c=oe(s,1),u=c[0],d=r.setMonth(a,0),g=function(b,y){return r.addMonth(b,y*3)},h=function(b){return an(b,{locale:n,format:n.cellQuarterFormat,generateConfig:r})},v=function(){return J({},"".concat(t,"-cell-in-view"),!0)},m=f.createElement("button",{type:"button",key:"year","aria-label":n.yearSelect,onClick:function(){i("year")},tabIndex:-1,className:"".concat(t,"-year-btn")},an(a,{locale:n,format:n.yearFormat,generateConfig:r}));return f.createElement(da.Provider,{value:u},f.createElement("div",{className:l},f.createElement(Ta,{superOffset:function(b){return r.addYear(a,b)},onChange:o,getStart:function(b){return r.setMonth(b,0)},getEnd:function(b){return r.setMonth(b,11)}},m),f.createElement(Bo,Oe({},e,{titleFormat:n.fieldQuarterFormat,colNum:4,rowNum:1,baseDate:d,getCellDate:g,getCellText:h,getCellClassName:v}))))}function B1(e){var t=e.prefixCls,n=e.generateConfig,r=e.locale,a=e.value,o=e.hoverValue,i=e.hoverRangeValue,l=r.locale,s="".concat(t,"-week-panel-row"),c=function(d){var g={};if(i){var h=oe(i,2),v=h[0],m=h[1],p=oo(n,l,v,d),b=oo(n,l,m,d);g["".concat(s,"-range-start")]=p,g["".concat(s,"-range-end")]=b,g["".concat(s,"-range-hover")]=!p&&!b&&hl(n,v,m,d)}return o&&(g["".concat(s,"-hover")]=o.some(function(y){return oo(n,l,d,y)})),pe(s,J({},"".concat(s,"-selected"),!i&&oo(n,l,a,d)),g)};return f.createElement(bl,Oe({},e,{mode:"week",panelName:"week",rowClassName:c}))}function L1(e){var t=e.prefixCls,n=e.locale,r=e.generateConfig,a=e.pickerValue,o=e.disabledDate,i=e.onPickerValueChange,l=e.onModeChange,s="".concat(t,"-year-panel"),c=Aa(e,"year"),u=oe(c,1),d=u[0],g=function(E){var k=Math.floor(r.getYear(E)/10)*10;return r.setYear(E,k)},h=function(E){var k=g(E);return r.addYear(k,9)},v=g(a),m=h(a),p=r.addYear(v,-1),b=function(E,k){return r.addYear(E,k)},y=function(E){return an(E,{locale:n,format:n.cellYearFormat,generateConfig:r})},x=function(E){return J({},"".concat(t,"-cell-in-view"),ta(r,E,v)||ta(r,E,m)||hl(r,v,m,E))},w=o?function(S,E){var k=r.setMonth(S,0),$=r.setDate(k,1),O=r.addYear($,1),D=r.addDate(O,-1);return o($,E)&&o(D,E)}:null,C=f.createElement("button",{type:"button",key:"decade","aria-label":n.decadeSelect,onClick:function(){l("decade")},tabIndex:-1,className:"".concat(t,"-decade-btn")},an(v,{locale:n,format:n.yearFormat,generateConfig:r}),"-",an(m,{locale:n,format:n.yearFormat,generateConfig:r}));return f.createElement(da.Provider,{value:d},f.createElement("div",{className:s},f.createElement(Ta,{superOffset:function(E){return r.addYear(a,E*10)},onChange:i,getStart:g,getEnd:h},C),f.createElement(Bo,Oe({},e,{disabledDate:w,titleFormat:n.fieldYearFormat,colNum:3,rowNum:4,baseDate:p,getCellDate:b,getCellText:y,getCellClassName:x}))))}var z1={date:bl,datetime:A1,week:B1,month:j1,quarter:_1,year:L1,decade:T1,time:Sg};function H1(e,t){var n,r=e.locale,a=e.generateConfig,o=e.direction,i=e.prefixCls,l=e.tabIndex,s=l===void 0?0:l,c=e.multiple,u=e.defaultValue,d=e.value,g=e.onChange,h=e.onSelect,v=e.defaultPickerValue,m=e.pickerValue,p=e.onPickerValueChange,b=e.mode,y=e.onPanelChange,x=e.picker,w=x===void 0?"date":x,C=e.showTime,S=e.hoverValue,E=e.hoverRangeValue,k=e.cellRender,$=e.dateRender,O=e.monthCellRender,D=e.components,P=D===void 0?{}:D,A=e.hideHeader,N=((n=f.useContext(or))===null||n===void 0?void 0:n.prefixCls)||i||"rc-picker",I=f.useRef();f.useImperativeHandle(t,function(){return{nativeElement:I.current}});var M=ig(e),F=oe(M,4),R=F[0],T=F[1],_=F[2],B=F[3],L=rg(r,T),j=w==="date"&&C?"datetime":w,z=f.useMemo(function(){return lg(j,_,B,R,L)},[j,_,B,R,L]),K=a.getNow(),V=on(w,{value:b,postState:function($e){return $e||"date"}}),G=oe(V,2),U=G[0],Z=G[1],Q=U==="date"&&z?"datetime":U,Y=wg(a,r,j),ee=on(u,{value:d}),ce=oe(ee,2),me=ce[0],we=ce[1],le=f.useMemo(function(){var Ce=ua(me).filter(function($e){return $e});return c?Ce:Ce.slice(0,1)},[me,c]),ge=Yt(function(Ce){we(Ce),g&&(Ce===null||le.length!==Ce.length||le.some(function($e,ue){return!$n(a,r,$e,Ce[ue],j)}))&&(g==null||g(c?Ce:Ce[0]))}),Ee=Yt(function(Ce){if(h==null||h(Ce),U===w){var $e=c?Y(le,Ce):[Ce];ge($e)}}),_e=on(v||le[0]||K,{value:m}),Re=oe(_e,2),he=Re[0],ke=Re[1];f.useEffect(function(){le[0]&&!m&&ke(le[0])},[le[0]]);var de=function($e,ue){y==null||y($e||m,ue||U)},Te=function($e){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;ke($e),p==null||p($e),ue&&de($e)},Ve=function($e,ue){Z($e),ue&&Te(ue),de(ue,$e)},We=function($e){if(Ee($e),Te($e),U!==w){var ue=["decade","year"],ie=[].concat(ue,["month"]),xe={quarter:[].concat(ue,["quarter"]),week:[].concat(at(ie),["week"]),date:[].concat(at(ie),["date"])},Be=xe[w]||ie,He=Be.indexOf(U),st=Be[He+1];st&&Ve(st,$e)}},nt=f.useMemo(function(){var Ce,$e;if(Array.isArray(E)){var ue=oe(E,2);Ce=ue[0],$e=ue[1]}else Ce=E;return!Ce&&!$e?null:(Ce=Ce||$e,$e=$e||Ce,a.isAfter(Ce,$e)?[$e,Ce]:[Ce,$e])},[E,a]),Ue=hu(k,$,O),qe=P[Q]||z1[Q]||bl,ct=f.useContext(Mr),Fe=f.useMemo(function(){return ye(ye({},ct),{},{hideHeader:A})},[ct,A]),ae="".concat(N,"-panel"),ze=vl(e,["showWeek","prevIcon","nextIcon","superPrevIcon","superNextIcon","disabledDate","minDate","maxDate","onHover"]);return f.createElement(Mr.Provider,{value:Fe},f.createElement("div",{ref:I,tabIndex:s,className:pe(ae,J({},"".concat(ae,"-rtl"),o==="rtl"))},f.createElement(qe,Oe({},ze,{showTime:z,prefixCls:N,locale:L,generateConfig:a,onModeChange:Ve,pickerValue:he,onPickerValueChange:function($e){Te($e,!0)},value:le[0],onSelect:We,values:le,cellRender:Ue,hoverRangeValue:nt,hoverValue:S}))))}var Wl=f.memo(f.forwardRef(H1));function V1(e){var t=e.picker,n=e.multiplePanel,r=e.pickerValue,a=e.onPickerValueChange,o=e.needConfirm,i=e.onSubmit,l=e.range,s=e.hoverValue,c=f.useContext(or),u=c.prefixCls,d=c.generateConfig,g=f.useCallback(function(y,x){return io(d,t,y,x)},[d,t]),h=f.useMemo(function(){return g(r,1)},[r,g]),v=function(x){a(g(x,-1))},m={onCellDblClick:function(){o&&i()}},p=t==="time",b=ye(ye({},e),{},{hoverValue:null,hoverRangeValue:null,hideHeader:p});return l?b.hoverRangeValue=s:b.hoverValue=s,n?f.createElement("div",{className:"".concat(u,"-panels")},f.createElement(Mr.Provider,{value:ye(ye({},m),{},{hideNext:!0})},f.createElement(Wl,b)),f.createElement(Mr.Provider,{value:ye(ye({},m),{},{hidePrev:!0})},f.createElement(Wl,Oe({},b,{pickerValue:h,onPickerValueChange:v})))):f.createElement(Mr.Provider,{value:ye({},m)},f.createElement(Wl,b))}function Md(e){return typeof e=="function"?e():e}function K1(e){var t=e.prefixCls,n=e.presets,r=e.onClick,a=e.onHover;return n.length?f.createElement("div",{className:"".concat(t,"-presets")},f.createElement("ul",null,n.map(function(o,i){var l=o.label,s=o.value;return f.createElement("li",{key:i,onClick:function(){r(Md(s))},onMouseEnter:function(){a(Md(s))},onMouseLeave:function(){a(null)}},l)}))):null}function $g(e){var t=e.panelRender,n=e.internalMode,r=e.picker,a=e.showNow,o=e.range,i=e.multiple,l=e.activeInfo,s=l===void 0?[0,0,0]:l,c=e.presets,u=e.onPresetHover,d=e.onPresetSubmit,g=e.onFocus,h=e.onBlur,v=e.onPanelMouseDown,m=e.direction,p=e.value,b=e.onSelect,y=e.isInvalid,x=e.defaultOpenValue,w=e.onOk,C=e.onSubmit,S=f.useContext(or),E=S.prefixCls,k="".concat(E,"-panel"),$=m==="rtl",O=f.useRef(null),D=f.useRef(null),P=f.useState(0),A=oe(P,2),N=A[0],I=A[1],M=f.useState(0),F=oe(M,2),R=F[0],T=F[1],_=f.useState(0),B=oe(_,2),L=B[0],j=B[1],z=function(We){We.width&&I(We.width)},K=oe(s,3),V=K[0],G=K[1],U=K[2],Z=f.useState(0),Q=oe(Z,2),Y=Q[0],ee=Q[1];f.useEffect(function(){ee(10)},[V]),f.useEffect(function(){if(o&&D.current){var Ve,We=((Ve=O.current)===null||Ve===void 0?void 0:Ve.offsetWidth)||0,nt=D.current.getBoundingClientRect();if(!nt.height||nt.right<0){ee(function(Fe){return Math.max(0,Fe-1)});return}var Ue=($?G-We:V)-nt.left;if(j(Ue),N&&N<U){var qe=$?nt.right-(G-We+N):V+We-nt.left-N,ct=Math.max(0,qe);T(ct)}else T(0)}},[Y,$,N,V,G,U,o]);function ce(Ve){return Ve.filter(function(We){return We})}var me=f.useMemo(function(){return ce(ua(p))},[p]),we=r==="time"&&!me.length,le=f.useMemo(function(){return we?ce([x]):me},[we,me,x]),ge=we?x:me,Ee=f.useMemo(function(){return le.length?le.some(function(Ve){return y(Ve)}):!0},[le,y]),_e=function(){we&&b(x),w(),C()},Re=f.createElement("div",{className:"".concat(E,"-panel-layout")},f.createElement(K1,{prefixCls:E,presets:c,onClick:d,onHover:u}),f.createElement("div",null,f.createElement(V1,Oe({},e,{value:ge})),f.createElement(N1,Oe({},e,{showNow:i?!1:a,invalid:Ee,onSubmit:_e}))));t&&(Re=t(Re));var he="".concat(k,"-container"),ke="marginLeft",de="marginRight",Te=f.createElement("div",{onMouseDown:v,tabIndex:-1,className:pe(he,"".concat(E,"-").concat(n,"-panel-container")),style:J(J({},$?de:ke,R),$?ke:de,"auto"),onFocus:g,onBlur:h},Re);return o&&(Te=f.createElement("div",{onMouseDown:v,ref:D,className:pe("".concat(E,"-range-wrapper"),"".concat(E,"-").concat(r,"-range-wrapper"))},f.createElement("div",{ref:O,className:"".concat(E,"-range-arrow"),style:{left:L}}),f.createElement(wp,{onResize:z},Te))),Te}function Eg(e,t){var n=e.format,r=e.maskFormat,a=e.generateConfig,o=e.locale,i=e.preserveInvalidOnBlur,l=e.inputReadOnly,s=e.required,c=e["aria-required"],u=e.onSubmit,d=e.onFocus,g=e.onBlur,h=e.onInputChange,v=e.onInvalid,m=e.open,p=e.onOpenChange,b=e.onKeyDown,y=e.onChange,x=e.activeHelp,w=e.name,C=e.autoComplete,S=e.id,E=e.value,k=e.invalid,$=e.placeholder,O=e.disabled,D=e.activeIndex,P=e.allHelp,A=e.picker,N=function(L,j){var z=a.locale.parse(o.locale,L,[j]);return z&&a.isValidate(z)?z:null},I=n[0],M=f.useCallback(function(B){return an(B,{locale:o,format:I,generateConfig:a})},[o,a,I]),F=f.useMemo(function(){return E.map(M)},[E,M]),R=f.useMemo(function(){var B=A==="time"?8:10,L=typeof I=="function"?I(a.getNow()).length:I.length;return Math.max(B,L)+2},[I,A,a]),T=function(L){for(var j=0;j<n.length;j+=1){var z=n[j];if(typeof z=="string"){var K=N(L,z);if(K)return K}}return!1},_=function(L){function j(V){return L!==void 0?V[L]:V}var z=ca(e,{aria:!0,data:!0}),K=ye(ye({},z),{},{format:r,validateFormat:function(G){return!!T(G)},preserveInvalidOnBlur:i,readOnly:l,required:s,"aria-required":c,name:w,autoComplete:C,size:R,id:j(S),value:j(F)||"",invalid:j(k),placeholder:j($),active:D===L,helped:P||x&&D===L,disabled:j(O),onFocus:function(G){d(G,L)},onBlur:function(G){g(G,L)},onSubmit:u,onChange:function(G){h();var U=T(G);if(U){v(!1,L),y(U,L);return}v(!!G,L)},onHelp:function(){p(!0,{index:L})},onKeyDown:function(G){var U=!1;if(b==null||b(G,function(){U=!0}),!G.defaultPrevented&&!U)switch(G.key){case"Escape":p(!1,{index:L});break;case"Enter":m||p(!0);break}}},t==null?void 0:t({valueTexts:F}));return Object.keys(K).forEach(function(V){K[V]===void 0&&delete K[V]}),K};return[_,M]}var W1=["onMouseEnter","onMouseLeave"];function kg(e){return f.useMemo(function(){return vl(e,W1)},[e])}var q1=["icon","type"],U1=["onClear"];function xl(e){var t=e.icon,n=e.type,r=Dt(e,q1),a=f.useContext(or),o=a.prefixCls;return t?f.createElement("span",Oe({className:"".concat(o,"-").concat(n)},r),t):null}function Bs(e){var t=e.onClear,n=Dt(e,U1);return f.createElement(xl,Oe({},n,{type:"clear",role:"button",onMouseDown:function(a){a.preventDefault()},onClick:function(a){a.stopPropagation(),t()}}))}var ql=["YYYY","MM","DD","HH","mm","ss","SSS"],Fd="\u9867",Y1=(function(){function e(t){oa(this,e),J(this,"format",void 0),J(this,"maskFormat",void 0),J(this,"cells",void 0),J(this,"maskCells",void 0),this.format=t;var n=ql.map(function(l){return"(".concat(l,")")}).join("|"),r=new RegExp(n,"g");this.maskFormat=t.replace(r,function(l){return Fd.repeat(l.length)});var a=new RegExp("(".concat(ql.join("|"),")")),o=(t.split(a)||[]).filter(function(l){return l}),i=0;this.cells=o.map(function(l){var s=ql.includes(l),c=i,u=i+l.length;return i=u,{text:l,mask:s,start:c,end:u}}),this.maskCells=this.cells.filter(function(l){return l.mask})}return ia(e,[{key:"getSelection",value:function(n){var r=this.maskCells[n]||{},a=r.start,o=r.end;return[a||0,o||0]}},{key:"match",value:function(n){for(var r=0;r<this.maskFormat.length;r+=1){var a=this.maskFormat[r],o=n[r];if(!o||a!==Fd&&a!==o)return!1}return!0}},{key:"size",value:function(){return this.maskCells.length}},{key:"getMaskCellIndex",value:function(n){for(var r=Number.MAX_SAFE_INTEGER,a=0,o=0;o<this.maskCells.length;o+=1){var i=this.maskCells[o],l=i.start,s=i.end;if(n>=l&&n<=s)return o;var c=Math.min(Math.abs(n-l),Math.abs(n-s));c<r&&(r=c,a=o)}return a}}]),e})();function G1(e){var t={YYYY:[0,9999,new Date().getFullYear()],MM:[1,12],DD:[1,31],HH:[0,23],mm:[0,59],ss:[0,59],SSS:[0,999]};return t[e]}var X1=["active","showActiveCls","suffixIcon","format","validateFormat","onChange","onInput","helped","onHelp","onSubmit","onKeyDown","preserveInvalidOnBlur","invalid","clearIcon"],Ls=f.forwardRef(function(e,t){var n=e.active,r=e.showActiveCls,a=r===void 0?!0:r,o=e.suffixIcon,i=e.format,l=e.validateFormat,s=e.onChange;e.onInput;var c=e.helped,u=e.onHelp,d=e.onSubmit,g=e.onKeyDown,h=e.preserveInvalidOnBlur,v=h===void 0?!1:h,m=e.invalid,p=e.clearIcon,b=Dt(e,X1),y=e.value,x=e.onFocus,w=e.onBlur,C=e.onMouseUp,S=f.useContext(or),E=S.prefixCls,k=S.input,$=k===void 0?"input":k,O="".concat(E,"-input"),D=f.useState(!1),P=oe(D,2),A=P[0],N=P[1],I=f.useState(y),M=oe(I,2),F=M[0],R=M[1],T=f.useState(""),_=oe(T,2),B=_[0],L=_[1],j=f.useState(null),z=oe(j,2),K=z[0],V=z[1],G=f.useState(null),U=oe(G,2),Z=U[0],Q=U[1],Y=F||"";f.useEffect(function(){R(y)},[y]);var ee=f.useRef(),ce=f.useRef();f.useImperativeHandle(t,function(){return{nativeElement:ee.current,inputElement:ce.current,focus:function(Ce){ce.current.focus(Ce)},blur:function(){ce.current.blur()}}});var me=f.useMemo(function(){return new Y1(i||"")},[i]),we=f.useMemo(function(){return c?[0,0]:me.getSelection(K)},[me,K,c]),le=oe(we,2),ge=le[0],Ee=le[1],_e=function(Ce){Ce&&Ce!==i&&Ce!==y&&u()},Re=Yt(function(ze){l(ze)&&s(ze),R(ze),_e(ze)}),he=function(Ce){if(!i){var $e=Ce.target.value;_e($e),R($e),s($e)}},ke=function(Ce){var $e=Ce.clipboardData.getData("text");l($e)&&Re($e)},de=f.useRef(!1),Te=function(){de.current=!0},Ve=function(Ce){var $e=Ce.target,ue=$e.selectionStart,ie=me.getMaskCellIndex(ue);V(ie),Q({}),C==null||C(Ce),de.current=!1},We=function(Ce){N(!0),V(0),L(""),x(Ce)},nt=function(Ce){w(Ce)},Ue=function(Ce){N(!1),nt(Ce)};xu(n,function(){!n&&!v&&R(y)});var qe=function(Ce){Ce.key==="Enter"&&l(Y)&&d(),g==null||g(Ce)},ct=function(Ce){qe(Ce);var $e=Ce.key,ue=null,ie=null,xe=Ee-ge,Be=i.slice(ge,Ee),He=function(Ye){V(function(Ge){var xt=Ge+Ye;return xt=Math.max(xt,0),xt=Math.min(xt,me.size()-1),xt})},st=function(Ye){var Ge=G1(Be),xt=oe(Ge,3),jt=xt[0],Vt=xt[1],Pt=xt[2],Gt=Y.slice(ge,Ee),_t=Number(Gt);if(isNaN(_t))return String(Pt||(Ye>0?jt:Vt));var nn=_t+Ye,dn=Vt-jt+1;return String(jt+(dn+nn-jt)%dn)};switch($e){case"Backspace":case"Delete":ue="",ie=Be;break;case"ArrowLeft":ue="",He(-1);break;case"ArrowRight":ue="",He(1);break;case"ArrowUp":ue="",ie=st(1);break;case"ArrowDown":ue="",ie=st(-1);break;default:isNaN(Number($e))||(ue=B+$e,ie=ue);break}if(ue!==null&&(L(ue),ue.length>=xe&&(He(1),L(""))),ie!==null){var Ne=Y.slice(0,ge)+vu(ie,xe)+Y.slice(Ee);Re(Ne.slice(0,i.length))}Q({})},Fe=f.useRef();Tn(function(){if(!(!A||!i||de.current)){if(!me.match(Y)){Re(i);return}return ce.current.setSelectionRange(ge,Ee),Fe.current=Ht(function(){ce.current.setSelectionRange(ge,Ee)}),function(){Ht.cancel(Fe.current)}}},[me,i,A,Y,K,ge,Ee,Z,Re]);var ae=i?{onFocus:We,onBlur:Ue,onKeyDown:ct,onMouseDown:Te,onMouseUp:Ve,onPaste:ke}:{};return f.createElement("div",{ref:ee,className:pe(O,J(J({},"".concat(O,"-active"),n&&a),"".concat(O,"-placeholder"),c))},f.createElement($,Oe({ref:ce,"aria-invalid":m,autoComplete:"off"},b,{onKeyDown:qe,onBlur:nt},ae,{value:Y,onChange:he})),f.createElement(xl,{type:"suffix",icon:o}),p)}),J1=["id","prefix","clearIcon","suffixIcon","separator","activeIndex","activeHelp","allHelp","focused","onFocus","onBlur","onKeyDown","locale","generateConfig","placeholder","className","style","onClick","onClear","value","onChange","onSubmit","onInputChange","format","maskFormat","preserveInvalidOnBlur","onInvalid","disabled","invalid","inputReadOnly","direction","onOpenChange","onActiveInfo","placement","onMouseDown","required","aria-required","autoFocus","tabIndex"],Q1=["index"];function Z1(e,t){var n=e.id,r=e.prefix,a=e.clearIcon,o=e.suffixIcon,i=e.separator,l=i===void 0?"~":i,s=e.activeIndex;e.activeHelp,e.allHelp;var c=e.focused;e.onFocus,e.onBlur,e.onKeyDown,e.locale,e.generateConfig;var u=e.placeholder,d=e.className,g=e.style,h=e.onClick,v=e.onClear,m=e.value;e.onChange,e.onSubmit,e.onInputChange,e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var p=e.disabled,b=e.invalid;e.inputReadOnly;var y=e.direction;e.onOpenChange;var x=e.onActiveInfo;e.placement;var w=e.onMouseDown;e.required,e["aria-required"];var C=e.autoFocus,S=e.tabIndex,E=Dt(e,J1),k=y==="rtl",$=f.useContext(or),O=$.prefixCls,D=f.useMemo(function(){if(typeof n=="string")return[n];var Z=n||{};return[Z.start,Z.end]},[n]),P=f.useRef(),A=f.useRef(),N=f.useRef(),I=function(Q){var Y;return(Y=[A,N][Q])===null||Y===void 0?void 0:Y.current};f.useImperativeHandle(t,function(){return{nativeElement:P.current,focus:function(Q){if(pn(Q)==="object"){var Y,ee=Q||{},ce=ee.index,me=ce===void 0?0:ce,we=Dt(ee,Q1);(Y=I(me))===null||Y===void 0||Y.focus(we)}else{var le;(le=I(Q??0))===null||le===void 0||le.focus()}},blur:function(){var Q,Y;(Q=I(0))===null||Q===void 0||Q.blur(),(Y=I(1))===null||Y===void 0||Y.blur()}}});var M=kg(E),F=f.useMemo(function(){return Array.isArray(u)?u:[u,u]},[u]),R=Eg(ye(ye({},e),{},{id:D,placeholder:F})),T=oe(R,1),_=T[0],B=f.useState({position:"absolute",width:0}),L=oe(B,2),j=L[0],z=L[1],K=Yt(function(){var Z=I(s);if(Z){var Q=Z.nativeElement.getBoundingClientRect(),Y=P.current.getBoundingClientRect(),ee=Q.left-Y.left;z(function(ce){return ye(ye({},ce),{},{width:Q.width,left:ee})}),x([Q.left,Q.right,Y.width])}});f.useEffect(function(){K()},[s]);var V=a&&(m[0]&&!p[0]||m[1]&&!p[1]),G=C&&!p[0],U=C&&!G&&!p[1];return f.createElement(wp,{onResize:K},f.createElement("div",Oe({},M,{className:pe(O,"".concat(O,"-range"),J(J(J(J({},"".concat(O,"-focused"),c),"".concat(O,"-disabled"),p.every(function(Z){return Z})),"".concat(O,"-invalid"),b.some(function(Z){return Z})),"".concat(O,"-rtl"),k),d),style:g,ref:P,onClick:h,onMouseDown:function(Q){var Y=Q.target;Y!==A.current.inputElement&&Y!==N.current.inputElement&&Q.preventDefault(),w==null||w(Q)}}),r&&f.createElement("div",{className:"".concat(O,"-prefix")},r),f.createElement(Ls,Oe({ref:A},_(0),{autoFocus:G,tabIndex:S,"date-range":"start"})),f.createElement("div",{className:"".concat(O,"-range-separator")},l),f.createElement(Ls,Oe({ref:N},_(1),{autoFocus:U,tabIndex:S,"date-range":"end"})),f.createElement("div",{className:"".concat(O,"-active-bar"),style:j}),f.createElement(xl,{type:"suffix",icon:o}),V&&f.createElement(Bs,{icon:a,onClear:v})))}var ex=f.forwardRef(Z1);function Pd(e,t){var n=e??t;return Array.isArray(n)?n:[n,n]}function ni(e){return e===1?"end":"start"}function tx(e,t){var n=ug(e,function(){var $t=e.disabled,dt=e.allowEmpty,wt=Pd($t,!1),qt=Pd(dt,!1);return{disabled:wt,allowEmpty:qt}}),r=oe(n,6),a=r[0],o=r[1],i=r[2],l=r[3],s=r[4],c=r[5],u=a.prefixCls,d=a.styles,g=a.classNames,h=a.defaultValue,v=a.value,m=a.needConfirm,p=a.onKeyDown,b=a.disabled,y=a.allowEmpty,x=a.disabledDate,w=a.minDate,C=a.maxDate,S=a.defaultOpen,E=a.open,k=a.onOpenChange,$=a.locale,O=a.generateConfig,D=a.picker,P=a.showNow,A=a.showToday,N=a.showTime,I=a.mode,M=a.onPanelChange,F=a.onCalendarChange,R=a.onOk,T=a.defaultPickerValue,_=a.pickerValue,B=a.onPickerValueChange,L=a.inputReadOnly,j=a.suffixIcon,z=a.onFocus,K=a.onBlur,V=a.presets,G=a.ranges,U=a.components,Z=a.cellRender,Q=a.dateRender,Y=a.monthCellRender,ee=a.onClick,ce=fg(t),me=dg(E,S,b,k),we=oe(me,2),le=we[0],ge=we[1],Ee=function(dt,wt){(b.some(function(qt){return!qt})||!dt)&&ge(dt,wt)},_e=bg(O,$,l,!0,!1,h,v,F,R),Re=oe(_e,5),he=Re[0],ke=Re[1],de=Re[2],Te=Re[3],Ve=Re[4],We=de(),nt=pg(b,y,le),Ue=oe(nt,9),qe=Ue[0],ct=Ue[1],Fe=Ue[2],ae=Ue[3],ze=Ue[4],Ce=Ue[5],$e=Ue[6],ue=Ue[7],ie=Ue[8],xe=function(dt,wt){ct(!0),z==null||z(dt,{range:ni(wt??ae)})},Be=function(dt,wt){ct(!1),K==null||K(dt,{range:ni(wt??ae)})},He=f.useMemo(function(){if(!N)return null;var $t=N.disabledTime,dt=$t?function(wt){var qt=ni(ae),mn=Zp(We,$e,ae);return $t(wt,qt,{from:mn})}:void 0;return ye(ye({},N),{},{disabledTime:dt})},[N,ae,We,$e]),st=on([D,D],{value:I}),Ne=oe(st,2),Ie=Ne[0],Ye=Ne[1],Ge=Ie[ae]||D,xt=Ge==="date"&&He?"datetime":Ge,jt=xt===D&&xt!=="time",Vt=Cg(D,Ge,P,A,!0),Pt=xg(a,he,ke,de,Te,b,l,qe,le,c),Gt=oe(Pt,2),_t=Gt[0],nn=Gt[1],dn=E1(We,b,$e,O,$,x),Rt=tg(We,c,y),_n=oe(Rt,2),q=_n[0],H=_n[1],ne=gg(O,$,We,Ie,le,ae,o,jt,T,_,He==null?void 0:He.defaultOpenValue,B,w,C),se=oe(ne,2),Se=se[0],je=se[1],ut=Yt(function($t,dt,wt){var qt=uo(Ie,ae,dt);if((qt[0]!==Ie[0]||qt[1]!==Ie[1])&&Ye(qt),M&&wt!==!1){var mn=at(We);$t&&(mn[ae]=$t),M(mn,qt)}}),Ze=function(dt,wt){return uo(We,wt,dt)},lt=function(dt,wt){var qt=We;dt&&(qt=Ze(dt,ae)),ue(ae);var mn=Ce(qt);Te(qt),_t(ae,mn===null),mn===null?Ee(!1,{force:!0}):wt||ce.current.focus({index:mn})},vt=function(dt){var wt,qt=dt.target.getRootNode();if(!ce.current.nativeElement.contains((wt=qt.activeElement)!==null&&wt!==void 0?wt:document.activeElement)){var mn=b.findIndex(function($0){return!$0});mn>=0&&ce.current.focus({index:mn})}Ee(!0),ee==null||ee(dt)},Ke=function(){nn(null),Ee(!1,{force:!0})},yt=f.useState(null),et=oe(yt,2),It=et[0],Ae=et[1],De=f.useState(null),Me=oe(De,2),Le=Me[0],tt=Me[1],bt=f.useMemo(function(){return Le||We},[We,Le]);f.useEffect(function(){le||tt(null)},[le]);var ht=f.useState([0,0,0]),Bt=oe(ht,2),At=Bt[0],rn=Bt[1],Mn=mg(V,G),Fn=function(dt){tt(dt),Ae("preset")},Xn=function(dt){var wt=nn(dt);wt&&Ee(!1,{force:!0})},Cr=function(dt){lt(dt)},Wa=function(dt){tt(dt?Ze(dt,ae):null),Ae("cell")},qa=function(dt){Ee(!0),xe(dt)},Ua=function(){Fe("panel")},Ya=function(dt){var wt=uo(We,ae,dt);Te(wt),!m&&!i&&o===xt&<(dt)},Lt=function(){Ee(!1)},Ot=hu(Z,Q,Y,ni(ae)),Mt=We[ae]||null,fn=Yt(function($t){return c($t,{activeIndex:ae})}),Xe=f.useMemo(function(){var $t=ca(a,!1),dt=Kn(a,[].concat(at(Object.keys($t)),["onChange","onCalendarChange","style","className","onPanelChange","disabledTime"]));return dt},[a]),rt=f.createElement($g,Oe({},Xe,{showNow:Vt,showTime:He,range:!0,multiplePanel:jt,activeInfo:At,disabledDate:dn,onFocus:qa,onBlur:Be,onPanelMouseDown:Ua,picker:D,mode:Ge,internalMode:xt,onPanelChange:ut,format:s,value:Mt,isInvalid:fn,onChange:null,onSelect:Ya,pickerValue:Se,defaultOpenValue:ua(N==null?void 0:N.defaultOpenValue)[ae],onPickerValueChange:je,hoverValue:bt,onHover:Wa,needConfirm:m,onSubmit:lt,onOk:Ve,presets:Mn,onPresetHover:Fn,onPresetSubmit:Xn,onNow:Cr,cellRender:Ot})),sn=function(dt,wt){var qt=Ze(dt,wt);Te(qt)},Wn=function(){Fe("input")},jr=function(dt,wt){var qt=$e.length,mn=$e[qt-1];if(qt&&mn!==wt&&m&&!y[mn]&&!ie(mn)&&We[mn]){ce.current.focus({index:mn});return}Fe("input"),Ee(!0,{inherit:!0}),ae!==wt&&le&&!m&&i&<(null,!0),ze(wt),xe(dt,wt)},Go=function(dt,wt){if(Ee(!1),!m&&Fe()==="input"){var qt=Ce(We);_t(ae,qt===null)}Be(dt,wt)},_r=function(dt,wt){dt.key==="Tab"&<(null,!0),p==null||p(dt,wt)},Ga=f.useMemo(function(){return{prefixCls:u,locale:$,generateConfig:O,button:U.button,input:U.input}},[u,$,O,U.button,U.input]);return Tn(function(){le&&ae!==void 0&&ut(null,D,!1)},[le,ae,D]),Tn(function(){var $t=Fe();!le&&$t==="input"&&(Ee(!1),lt(null,!0)),!le&&i&&!m&&$t==="panel"&&(Ee(!0),lt())},[le]),f.createElement(or.Provider,{value:Ga},f.createElement(Jp,Oe({},eg(a),{popupElement:rt,popupStyle:d.popup,popupClassName:g.popup,visible:le,onClose:Lt,range:!0}),f.createElement(ex,Oe({},a,{ref:ce,suffixIcon:j,activeIndex:qe||le?ae:null,activeHelp:!!Le,allHelp:!!Le&&It==="preset",focused:qe,onFocus:jr,onBlur:Go,onKeyDown:_r,onSubmit:lt,value:bt,maskFormat:s,onChange:sn,onInputChange:Wn,format:l,inputReadOnly:L,disabled:b,open:le,onOpenChange:Ee,onClick:vt,onClear:Ke,invalid:q,onInvalid:H,onActiveInfo:rn}))))}var nx=f.forwardRef(tx);function rx(e){var t=e.prefixCls,n=e.value,r=e.onRemove,a=e.removeIcon,o=a===void 0?"\xD7":a,i=e.formatDate,l=e.disabled,s=e.maxTagCount,c=e.placeholder,u="".concat(t,"-selector"),d="".concat(t,"-selection"),g="".concat(d,"-overflow");function h(p,b){return f.createElement("span",{className:pe("".concat(d,"-item")),title:typeof p=="string"?p:null},f.createElement("span",{className:"".concat(d,"-item-content")},p),!l&&b&&f.createElement("span",{onMouseDown:function(x){x.preventDefault()},onClick:b,className:"".concat(d,"-item-remove")},o))}function v(p){var b=i(p),y=function(w){w&&w.stopPropagation(),r(p)};return h(b,y)}function m(p){var b="+ ".concat(p.length," ...");return h(b)}return f.createElement("div",{className:u},f.createElement(Ea,{prefixCls:g,data:n,renderItem:v,renderRest:m,itemKey:function(b){return i(b)},maxCount:s}),!n.length&&f.createElement("span",{className:"".concat(t,"-selection-placeholder")},c))}var ax=["id","open","prefix","clearIcon","suffixIcon","activeHelp","allHelp","focused","onFocus","onBlur","onKeyDown","locale","generateConfig","placeholder","className","style","onClick","onClear","internalPicker","value","onChange","onSubmit","onInputChange","multiple","maxTagCount","format","maskFormat","preserveInvalidOnBlur","onInvalid","disabled","invalid","inputReadOnly","direction","onOpenChange","onMouseDown","required","aria-required","autoFocus","tabIndex","removeIcon"];function ox(e,t){e.id;var n=e.open,r=e.prefix,a=e.clearIcon,o=e.suffixIcon;e.activeHelp,e.allHelp;var i=e.focused;e.onFocus,e.onBlur,e.onKeyDown;var l=e.locale,s=e.generateConfig,c=e.placeholder,u=e.className,d=e.style,g=e.onClick,h=e.onClear,v=e.internalPicker,m=e.value,p=e.onChange,b=e.onSubmit;e.onInputChange;var y=e.multiple,x=e.maxTagCount;e.format,e.maskFormat,e.preserveInvalidOnBlur,e.onInvalid;var w=e.disabled,C=e.invalid;e.inputReadOnly;var S=e.direction;e.onOpenChange;var E=e.onMouseDown;e.required,e["aria-required"];var k=e.autoFocus,$=e.tabIndex,O=e.removeIcon,D=Dt(e,ax),P=S==="rtl",A=f.useContext(or),N=A.prefixCls,I=f.useRef(),M=f.useRef();f.useImperativeHandle(t,function(){return{nativeElement:I.current,focus:function(G){var U;(U=M.current)===null||U===void 0||U.focus(G)},blur:function(){var G;(G=M.current)===null||G===void 0||G.blur()}}});var F=kg(D),R=function(G){p([G])},T=function(G){var U=m.filter(function(Z){return Z&&!$n(s,l,Z,G,v)});p(U),n||b()},_=Eg(ye(ye({},e),{},{onChange:R}),function(V){var G=V.valueTexts;return{value:G[0]||"",active:i}}),B=oe(_,2),L=B[0],j=B[1],z=!!(a&&m.length&&!w),K=y?f.createElement(f.Fragment,null,f.createElement(rx,{prefixCls:N,value:m,onRemove:T,formatDate:j,maxTagCount:x,disabled:w,removeIcon:O,placeholder:c}),f.createElement("input",{className:"".concat(N,"-multiple-input"),value:m.map(j).join(","),ref:M,readOnly:!0,autoFocus:k,tabIndex:$}),f.createElement(xl,{type:"suffix",icon:o}),z&&f.createElement(Bs,{icon:a,onClear:h})):f.createElement(Ls,Oe({ref:M},L(),{autoFocus:k,tabIndex:$,suffixIcon:o,clearIcon:z&&f.createElement(Bs,{icon:a,onClear:h}),showActiveCls:!1}));return f.createElement("div",Oe({},F,{className:pe(N,J(J(J(J(J({},"".concat(N,"-multiple"),y),"".concat(N,"-focused"),i),"".concat(N,"-disabled"),w),"".concat(N,"-invalid"),C),"".concat(N,"-rtl"),P),u),style:d,ref:I,onClick:g,onMouseDown:function(G){var U,Z=G.target;Z!==((U=M.current)===null||U===void 0?void 0:U.inputElement)&&G.preventDefault(),E==null||E(G)}}),r&&f.createElement("div",{className:"".concat(N,"-prefix")},r),K)}var ix=f.forwardRef(ox);function lx(e,t){var n=ug(e),r=oe(n,6),a=r[0],o=r[1],i=r[2],l=r[3],s=r[4],c=r[5],u=a,d=u.prefixCls,g=u.styles,h=u.classNames,v=u.order,m=u.defaultValue,p=u.value,b=u.needConfirm,y=u.onChange,x=u.onKeyDown,w=u.disabled,C=u.disabledDate,S=u.minDate,E=u.maxDate,k=u.defaultOpen,$=u.open,O=u.onOpenChange,D=u.locale,P=u.generateConfig,A=u.picker,N=u.showNow,I=u.showToday,M=u.showTime,F=u.mode,R=u.onPanelChange,T=u.onCalendarChange,_=u.onOk,B=u.multiple,L=u.defaultPickerValue,j=u.pickerValue,z=u.onPickerValueChange,K=u.inputReadOnly,V=u.suffixIcon,G=u.removeIcon,U=u.onFocus,Z=u.onBlur,Q=u.presets,Y=u.components,ee=u.cellRender,ce=u.dateRender,me=u.monthCellRender,we=u.onClick,le=fg(t);function ge(Xe){return Xe===null?null:B?Xe:Xe[0]}var Ee=wg(P,D,o),_e=dg($,k,[w],O),Re=oe(_e,2),he=Re[0],ke=Re[1],de=function(rt,sn,Wn){if(T){var jr=ye({},Wn);delete jr.range,T(ge(rt),ge(sn),jr)}},Te=function(rt){_==null||_(ge(rt))},Ve=bg(P,D,l,!1,v,m,p,de,Te),We=oe(Ve,5),nt=We[0],Ue=We[1],qe=We[2],ct=We[3],Fe=We[4],ae=qe(),ze=pg([w]),Ce=oe(ze,4),$e=Ce[0],ue=Ce[1],ie=Ce[2],xe=Ce[3],Be=function(rt){ue(!0),U==null||U(rt,{})},He=function(rt){ue(!1),Z==null||Z(rt,{})},st=on(A,{value:F}),Ne=oe(st,2),Ie=Ne[0],Ye=Ne[1],Ge=Ie==="date"&&M?"datetime":Ie,xt=Cg(A,Ie,N,I),jt=y&&function(Xe,rt){y(ge(Xe),ge(rt))},Vt=xg(ye(ye({},a),{},{onChange:jt}),nt,Ue,qe,ct,[],l,$e,he,c),Pt=oe(Vt,2),Gt=Pt[1],_t=tg(ae,c),nn=oe(_t,2),dn=nn[0],Rt=nn[1],_n=f.useMemo(function(){return dn.some(function(Xe){return Xe})},[dn]),q=function(rt,sn){if(z){var Wn=ye(ye({},sn),{},{mode:sn.mode[0]});delete Wn.range,z(rt[0],Wn)}},H=gg(P,D,ae,[Ie],he,xe,o,!1,L,j,ua(M==null?void 0:M.defaultOpenValue),q,S,E),ne=oe(H,2),se=ne[0],Se=ne[1],je=Yt(function(Xe,rt,sn){if(Ye(rt),R&&sn!==!1){var Wn=Xe||ae[ae.length-1];R(Wn,rt)}}),ut=function(){Gt(qe()),ke(!1,{force:!0})},Ze=function(rt){!w&&!le.current.nativeElement.contains(document.activeElement)&&le.current.focus(),ke(!0),we==null||we(rt)},lt=function(){Gt(null),ke(!1,{force:!0})},vt=f.useState(null),Ke=oe(vt,2),yt=Ke[0],et=Ke[1],It=f.useState(null),Ae=oe(It,2),De=Ae[0],Me=Ae[1],Le=f.useMemo(function(){var Xe=[De].concat(at(ae)).filter(function(rt){return rt});return B?Xe:Xe.slice(0,1)},[ae,De,B]),tt=f.useMemo(function(){return!B&&De?[De]:ae.filter(function(Xe){return Xe})},[ae,De,B]);f.useEffect(function(){he||Me(null)},[he]);var bt=mg(Q),ht=function(rt){Me(rt),et("preset")},Bt=function(rt){var sn=B?Ee(qe(),rt):[rt],Wn=Gt(sn);Wn&&!B&&ke(!1,{force:!0})},At=function(rt){Bt(rt)},rn=function(rt){Me(rt),et("cell")},Mn=function(rt){ke(!0),Be(rt)},Fn=function(rt){if(ie("panel"),!(B&&Ge!==A)){var sn=B?Ee(qe(),rt):[rt];ct(sn),!b&&!i&&o===Ge&&ut()}},Xn=function(){ke(!1)},Cr=hu(ee,ce,me),Wa=f.useMemo(function(){var Xe=ca(a,!1),rt=Kn(a,[].concat(at(Object.keys(Xe)),["onChange","onCalendarChange","style","className","onPanelChange"]));return ye(ye({},rt),{},{multiple:a.multiple})},[a]),qa=f.createElement($g,Oe({},Wa,{showNow:xt,showTime:M,disabledDate:C,onFocus:Mn,onBlur:He,picker:A,mode:Ie,internalMode:Ge,onPanelChange:je,format:s,value:ae,isInvalid:c,onChange:null,onSelect:Fn,pickerValue:se,defaultOpenValue:M==null?void 0:M.defaultOpenValue,onPickerValueChange:Se,hoverValue:Le,onHover:rn,needConfirm:b,onSubmit:ut,onOk:Fe,presets:bt,onPresetHover:ht,onPresetSubmit:Bt,onNow:At,cellRender:Cr})),Ua=function(rt){ct(rt)},Ya=function(){ie("input")},Lt=function(rt){ie("input"),ke(!0,{inherit:!0}),Be(rt)},Ot=function(rt){ke(!1),He(rt)},Mt=function(rt,sn){rt.key==="Tab"&&ut(),x==null||x(rt,sn)},fn=f.useMemo(function(){return{prefixCls:d,locale:D,generateConfig:P,button:Y.button,input:Y.input}},[d,D,P,Y.button,Y.input]);return Tn(function(){he&&xe!==void 0&&je(null,A,!1)},[he,xe,A]),Tn(function(){var Xe=ie();!he&&Xe==="input"&&(ke(!1),ut()),!he&&i&&!b&&Xe==="panel"&&ut()},[he]),f.createElement(or.Provider,{value:fn},f.createElement(Jp,Oe({},eg(a),{popupElement:qa,popupStyle:g.popup,popupClassName:h.popup,visible:he,onClose:Xn}),f.createElement(ix,Oe({},a,{ref:le,suffixIcon:V,removeIcon:G,activeHelp:!!De,allHelp:!!De&&yt==="preset",focused:$e,onFocus:Lt,onBlur:Ot,onKeyDown:Mt,onSubmit:ut,value:tt,maskFormat:s,onChange:Ua,onInputChange:Ya,internalPicker:o,format:l,inputReadOnly:K,disabled:w,open:he,onOpenChange:ke,onClick:Ze,onClear:lt,invalid:_n,onInvalid:function(rt){Rt(rt,0)}}))))}var sx=f.forwardRef(lx);const Ig=f.createContext(null),cx=Ig.Provider,Og=f.createContext(null),ux=Og.Provider;var dx=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],fx=Ar(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-checkbox":n,a=e.className,o=e.style,i=e.checked,l=e.disabled,s=e.defaultChecked,c=s===void 0?!1:s,u=e.type,d=u===void 0?"checkbox":u,g=e.title,h=e.onChange,v=Dt(e,dx),m=St(null),p=St(null),b=on(c,{value:i}),y=oe(b,2),x=y[0],w=y[1];Mo(t,function(){return{focus:function(k){var $;($=m.current)===null||$===void 0||$.focus(k)},blur:function(){var k;(k=m.current)===null||k===void 0||k.blur()},input:m.current,nativeElement:p.current}});var C=pe(r,a,J(J({},"".concat(r,"-checked"),x),"".concat(r,"-disabled"),l)),S=function(k){l||("checked"in e||w(k.target.checked),h==null||h({target:ye(ye({},e),{},{type:d,checked:k.target.checked}),stopPropagation:function(){k.stopPropagation()},preventDefault:function(){k.preventDefault()},nativeEvent:k.nativeEvent}))};return f.createElement("span",{className:C,title:g,style:o,ref:p},f.createElement("input",Oe({},v,{className:"".concat(r,"-input"),ref:m,onChange:S,disabled:l,checked:!!x,type:d})),f.createElement("span",{className:"".concat(r,"-inner")}))});function mx(e){const t=be.useRef(null),n=()=>{Ht.cancel(t.current),t.current=null};return[()=>{n(),t.current=Ht(()=>{t.current=null})},o=>{t.current&&(o.stopPropagation(),n()),e==null||e(o)}]}const px=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:Object.assign(Object.assign({},gn(e)),{display:"inline-block",fontSize:0,[`&${r}-rtl`]:{direction:"rtl"},[`&${r}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},gx=e=>{const{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,radioSize:a,motionDurationSlow:o,motionDurationMid:i,motionEaseInOutCirc:l,colorBgContainer:s,colorBorder:c,lineWidth:u,colorBgContainerDisabled:d,colorTextDisabled:g,paddingXS:h,dotColorDisabled:v,lineType:m,radioColor:p,radioBgColor:b,calc:y}=e,x=`${t}-inner`,C=y(a).sub(y(4).mul(2)),S=y(1).mul(a).equal({unit:!0});return{[`${t}-wrapper`]:Object.assign(Object.assign({},gn(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,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}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${fe(u)} ${m} ${r}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:Object.assign(Object.assign({},gn(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${t}-wrapper:hover &,
|
|
28
|
+
&:hover ${x}`]:{borderColor:r},[`${t}-input:focus-visible + ${x}`]:Po(e),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:S,height:S,marginBlockStart:y(1).mul(a).div(-2).equal({unit:!0}),marginInlineStart:y(1).mul(a).div(-2).equal({unit:!0}),backgroundColor:p,borderBlockStart:0,borderInlineStart:0,borderRadius:S,transform:"scale(0)",opacity:0,transition:`all ${o} ${l}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:S,height:S,backgroundColor:s,borderColor:c,borderStyle:"solid",borderWidth:u,borderRadius:"50%",transition:`all ${i}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[x]:{borderColor:r,backgroundColor:b,"&::after":{transform:`scale(${e.calc(e.dotSize).div(a).equal()})`,opacity:1,transition:`all ${o} ${l}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[x]:{backgroundColor:d,borderColor:c,cursor:"not-allowed","&::after":{backgroundColor:v}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:g,cursor:"not-allowed"},[`&${t}-checked`]:{[x]:{"&::after":{transform:`scale(${y(C).div(a).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:h,paddingInlineEnd:h}})}},vx=e=>{const{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:a,lineType:o,colorBorder:i,motionDurationSlow:l,motionDurationMid:s,buttonPaddingInline:c,fontSize:u,buttonBg:d,fontSizeLG:g,controlHeightLG:h,controlHeightSM:v,paddingXS:m,borderRadius:p,borderRadiusSM:b,borderRadiusLG:y,buttonCheckedBg:x,buttonSolidCheckedColor:w,colorTextDisabled:C,colorBgContainerDisabled:S,buttonCheckedBgDisabled:E,buttonCheckedColorDisabled:k,colorPrimary:$,colorPrimaryHover:O,colorPrimaryActive:D,buttonSolidCheckedBg:P,buttonSolidCheckedHoverBg:A,buttonSolidCheckedActiveBg:N,calc:I}=e;return{[`${r}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:u,lineHeight:fe(I(n).sub(I(a).mul(2)).equal()),background:d,border:`${fe(a)} ${o} ${i}`,borderBlockStartWidth:I(a).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:a,cursor:"pointer",transition:[`color ${s}`,`background ${s}`,`box-shadow ${s}`].join(","),a:{color:t},[`> ${r}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:I(a).mul(-1).equal(),insetInlineStart:I(a).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:a,paddingInline:0,backgroundColor:i,transition:`background-color ${l}`,content:'""'}},"&:first-child":{borderInlineStart:`${fe(a)} ${o} ${i}`,borderStartStartRadius:p,borderEndStartRadius:p},"&:last-child":{borderStartEndRadius:p,borderEndEndRadius:p},"&:first-child:last-child":{borderRadius:p},[`${r}-group-large &`]:{height:h,fontSize:g,lineHeight:fe(I(h).sub(I(a).mul(2)).equal()),"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},[`${r}-group-small &`]:{height:v,paddingInline:I(m).sub(a).equal(),paddingBlock:0,lineHeight:fe(I(v).sub(I(a).mul(2)).equal()),"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},"&:hover":{position:"relative",color:$},"&:has(:focus-visible)":Po(e),[`${r}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:$,background:x,borderColor:$,"&::before":{backgroundColor:$},"&:first-child":{borderColor:$},"&:hover":{color:O,borderColor:O,"&::before":{backgroundColor:O}},"&:active":{color:D,borderColor:D,"&::before":{backgroundColor:D}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:w,background:P,borderColor:P,"&:hover":{color:w,background:A,borderColor:A},"&:active":{color:w,background:N,borderColor:N}},"&-disabled":{color:C,backgroundColor:S,borderColor:i,cursor:"not-allowed","&:first-child, &:hover":{color:C,backgroundColor:S,borderColor:i}},[`&-disabled${r}-button-wrapper-checked`]:{color:k,backgroundColor:E,borderColor:i,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},hx=e=>{const{wireframe:t,padding:n,marginXS:r,lineWidth:a,fontSizeLG:o,colorText:i,colorBgContainer:l,colorTextDisabled:s,controlItemBgActiveDisabled:c,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:g,colorPrimaryActive:h,colorWhite:v}=e,m=4,p=o,b=t?p-m*2:p-(m+a)*2;return{radioSize:p,dotSize:b,dotColorDisabled:s,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:g,buttonSolidCheckedActiveBg:h,buttonBg:l,buttonCheckedBg:l,buttonColor:i,buttonCheckedBgDisabled:c,buttonCheckedColorDisabled:s,buttonPaddingInline:n-a,wrapperMarginInlineEnd:r,radioColor:t?d:v,radioBgColor:t?l:d}},Ng=ar("Radio",e=>{const{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${fe(n)} ${t}`,o=Vn(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[px(o),gx(o),vx(o)]},hx,{unitless:{radioSize:!0,dotSize:!0}});var yx=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const bx=(e,t)=>{var n,r;const a=f.useContext(Ig),o=f.useContext(Og),{getPrefixCls:i,direction:l,radio:s}=f.useContext(un),c=f.useRef(null),u=Fo(t,c),{isFormItemInput:d}=f.useContext(Ro),g=M=>{var F,R;(F=e.onChange)===null||F===void 0||F.call(e,M),(R=a==null?void 0:a.onChange)===null||R===void 0||R.call(a,M)},{prefixCls:h,className:v,rootClassName:m,children:p,style:b,title:y}=e,x=yx(e,["prefixCls","className","rootClassName","children","style","title"]),w=i("radio",h),C=((a==null?void 0:a.optionType)||o)==="button",S=C?`${w}-button`:w,E=la(w),[k,$,O]=Ng(w,E),D=Object.assign({},x),P=f.useContext(Pa);a&&(D.name=a.name,D.onChange=g,D.checked=e.value===a.value,D.disabled=(n=D.disabled)!==null&&n!==void 0?n:a.disabled),D.disabled=(r=D.disabled)!==null&&r!==void 0?r:P;const A=pe(`${S}-wrapper`,{[`${S}-wrapper-checked`]:D.checked,[`${S}-wrapper-disabled`]:D.disabled,[`${S}-wrapper-rtl`]:l==="rtl",[`${S}-wrapper-in-form-item`]:d,[`${S}-wrapper-block`]:!!(a!=null&&a.block)},s==null?void 0:s.className,v,m,$,O,E),[N,I]=mx(D.onClick);return k(f.createElement(Y0,{component:"Radio",disabled:D.disabled},f.createElement("label",{className:A,style:Object.assign(Object.assign({},s==null?void 0:s.style),b),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:y,onClick:N},f.createElement(fx,Object.assign({},D,{className:pe(D.className,{[G0]:!C}),type:"radio",prefixCls:S,ref:u,onClick:I})),p!==void 0?f.createElement("span",{className:`${S}-label`},p):null)))},Ki=f.forwardRef(bx),xx=f.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=f.useContext(un),{name:a}=f.useContext(Ro),o=X0(V0(a)),{prefixCls:i,className:l,rootClassName:s,options:c,buttonStyle:u="outline",disabled:d,children:g,size:h,style:v,id:m,optionType:p,name:b=o,defaultValue:y,value:x,block:w=!1,onChange:C,onMouseEnter:S,onMouseLeave:E,onFocus:k,onBlur:$}=e,[O,D]=on(y,{value:x}),P=f.useCallback(j=>{const z=O,K=j.target.value;"value"in e||D(K),K!==z&&(C==null||C(j))},[O,D,C]),A=n("radio",i),N=`${A}-group`,I=la(A),[M,F,R]=Ng(A,I);let T=g;c&&c.length>0&&(T=c.map(j=>typeof j=="string"||typeof j=="number"?f.createElement(Ki,{key:j.toString(),prefixCls:A,disabled:d,value:j,checked:O===j},j):f.createElement(Ki,{key:`radio-group-value-options-${j.value}`,prefixCls:A,disabled:j.disabled||d,value:j.value,checked:O===j.value,title:j.title,style:j.style,className:j.className,id:j.id,required:j.required},j.label)));const _=ll(h),B=pe(N,`${N}-${u}`,{[`${N}-${_}`]:_,[`${N}-rtl`]:r==="rtl",[`${N}-block`]:w},l,s,F,R,I),L=f.useMemo(()=>({onChange:P,value:O,disabled:d,name:b,optionType:p,block:w}),[P,O,d,b,p,w]);return M(f.createElement("div",Object.assign({},ca(e,{aria:!0,data:!0}),{className:B,style:v,onMouseEnter:S,onMouseLeave:E,onFocus:k,onBlur:$,id:m,ref:t}),f.createElement(cx,{value:L},T)))}),Cx=f.memo(xx);var wx=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const Sx=(e,t)=>{const{getPrefixCls:n}=f.useContext(un),{prefixCls:r}=e,a=wx(e,["prefixCls"]),o=n("radio",r);return f.createElement(ux,{value:"button"},f.createElement(Ki,Object.assign({prefixCls:o},a,{type:"radio",ref:t})))},$x=f.forwardRef(Sx),Cl=Ki;Cl.Button=$x;Cl.Group=Cx;Cl.__ANT_RADIO=!0;const Ul=(e,t)=>{const{componentCls:n,controlHeight:r}=e,a=t?`${n}-${t}`:"",o=my(e);return[{[`${n}-multiple${a}`]:{paddingBlock:o.containerPadding,paddingInlineStart:o.basePadding,minHeight:r,[`${n}-selection-item`]:{height:o.itemHeight,lineHeight:fe(o.itemLineHeight)}}}]},Ex=e=>{const{componentCls:t,calc:n,lineWidth:r}=e,a=Vn(e,{fontHeight:e.fontSize,selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS,controlHeight:e.controlHeightSM}),o=Vn(e,{fontHeight:n(e.multipleItemHeightLG).sub(n(r).mul(2).equal()).equal(),fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius,controlHeight:e.controlHeightLG});return[Ul(a,"small"),Ul(e),Ul(o,"large"),{[`${t}${t}-multiple`]:Object.assign(Object.assign({width:"100%",cursor:"text",[`${t}-selector`]:{flex:"auto",padding:0,position:"relative","&:after":{margin:0},[`${t}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.inputPaddingHorizontalBase,insetInlineEnd:0,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}}},fy(e)),{[`${t}-multiple-input`]:{width:0,height:0,border:0,visibility:"hidden",position:"absolute",zIndex:-1}})}]},kx=e=>{const{pickerCellCls:t,pickerCellInnerCls:n,cellHeight:r,borderRadiusSM:a,motionDurationMid:o,cellHoverBg:i,lineWidth:l,lineType:s,colorPrimary:c,cellActiveWithRangeBg:u,colorTextLightSolid:d,colorTextDisabled:g,cellBgDisabled:h,colorFillSecondary:v}=e;return{"&::before":{position:"absolute",top:"50%",insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:r,transform:"translateY(-50%)",content:'""',pointerEvents:"none"},[n]:{position:"relative",zIndex:2,display:"inline-block",minWidth:r,height:r,lineHeight:fe(r),borderRadius:a,transition:`background ${o}`},[`&:hover:not(${t}-in-view):not(${t}-disabled),
|
|
29
|
+
&:hover:not(${t}-selected):not(${t}-range-start):not(${t}-range-end):not(${t}-disabled)`]:{[n]:{background:i}},[`&-in-view${t}-today ${n}`]:{"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${fe(l)} ${s} ${c}`,borderRadius:a,content:'""'}},[`&-in-view${t}-in-range,
|
|
30
30
|
&-in-view${t}-range-start,
|
|
31
31
|
&-in-view${t}-range-end`]:{position:"relative",[`&:not(${t}-disabled):before`]:{background:u}},[`&-in-view${t}-selected,
|
|
32
32
|
&-in-view${t}-range-start,
|
|
33
|
-
&-in-view${t}-range-end`]:{[`&:not(${t}-disabled) ${n}`]:{color:d,background:c},[`&${t}-disabled ${n}`]:{background:v}},[`&-in-view${t}-range-start:not(${t}-disabled):before`]:{insetInlineStart:"50%"},[`&-in-view${t}-range-end:not(${t}-disabled):before`]:{insetInlineEnd:"50%"},[`&-in-view${t}-range-start:not(${t}-range-end) ${n}`]:{borderStartStartRadius:a,borderEndStartRadius:a,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${t}-range-end:not(${t}-range-start) ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:a,borderEndEndRadius:a},"&-disabled":{color:g,cursor:"not-allowed",[n]:{background:"transparent"},"&::before":{background:h}},[`&-disabled${t}-today ${n}::before`]:{borderColor:g}}},
|
|
33
|
+
&-in-view${t}-range-end`]:{[`&:not(${t}-disabled) ${n}`]:{color:d,background:c},[`&${t}-disabled ${n}`]:{background:v}},[`&-in-view${t}-range-start:not(${t}-disabled):before`]:{insetInlineStart:"50%"},[`&-in-view${t}-range-end:not(${t}-disabled):before`]:{insetInlineEnd:"50%"},[`&-in-view${t}-range-start:not(${t}-range-end) ${n}`]:{borderStartStartRadius:a,borderEndStartRadius:a,borderStartEndRadius:0,borderEndEndRadius:0},[`&-in-view${t}-range-end:not(${t}-range-start) ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0,borderStartEndRadius:a,borderEndEndRadius:a},"&-disabled":{color:g,cursor:"not-allowed",[n]:{background:"transparent"},"&::before":{background:h}},[`&-disabled${t}-today ${n}::before`]:{borderColor:g}}},Ix=e=>{const{componentCls:t,pickerCellCls:n,pickerCellInnerCls:r,pickerYearMonthCellWidth:a,pickerControlIconSize:o,cellWidth:i,paddingSM:l,paddingXS:s,paddingXXS:c,colorBgContainer:u,lineWidth:d,lineType:g,borderRadiusLG:h,colorPrimary:v,colorTextHeading:m,colorSplit:p,pickerControlIconBorderWidth:b,colorIcon:y,textHeight:x,motionDurationMid:w,colorIconHover:C,fontWeightStrong:S,cellHeight:E,pickerCellPaddingVertical:k,colorTextDisabled:$,colorText:O,fontSize:D,motionDurationSlow:P,withoutTimeCellHeight:A,pickerQuarterPanelContentHeight:N,borderRadiusSM:I,colorTextLightSolid:M,cellHoverBg:F,timeColumnHeight:R,timeColumnWidth:T,timeCellHeight:_,controlItemBgActive:B,marginXXS:L,pickerDatePanelPaddingHorizontal:j,pickerControlIconMargin:z}=e,K=e.calc(i).mul(7).add(e.calc(j).mul(2)).equal();return{[t]:{"&-panel":{display:"inline-flex",flexDirection:"column",textAlign:"center",background:u,borderRadius:h,outline:"none","&-focused":{borderColor:v},"&-rtl":{[`${t}-prev-icon,
|
|
34
34
|
${t}-super-prev-icon`]:{transform:"rotate(45deg)"},[`${t}-next-icon,
|
|
35
|
-
${t}-super-next-icon`]:{transform:"rotate(-135deg)"},[`${t}-time-panel`]:{[`${t}-content`]:{direction:"ltr","> *":{direction:"rtl"}}}}},"&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel,\n &-week-panel,\n &-date-panel,\n &-time-panel":{display:"flex",flexDirection:"column",width:
|
|
35
|
+
${t}-super-next-icon`]:{transform:"rotate(-135deg)"},[`${t}-time-panel`]:{[`${t}-content`]:{direction:"ltr","> *":{direction:"rtl"}}}}},"&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel,\n &-week-panel,\n &-date-panel,\n &-time-panel":{display:"flex",flexDirection:"column",width:K},"&-header":{display:"flex",padding:`0 ${fe(s)}`,color:m,borderBottom:`${fe(d)} ${g} ${p}`,"> *":{flex:"none"},button:{padding:0,color:y,lineHeight:fe(x),background:"transparent",border:0,cursor:"pointer",transition:`color ${w}`,fontSize:"inherit",display:"inline-flex",alignItems:"center",justifyContent:"center","&:empty":{display:"none"}},"> button":{minWidth:"1.6em",fontSize:D,"&:hover":{color:C},"&:disabled":{opacity:.25,pointerEvents:"none"}},"&-view":{flex:"auto",fontWeight:S,lineHeight:fe(x),"> button":{color:"inherit",fontWeight:"inherit",verticalAlign:"top","&:not(:first-child)":{marginInlineStart:s},"&:hover":{color:v}}}},"&-prev-icon,\n &-next-icon,\n &-super-prev-icon,\n &-super-next-icon":{position:"relative",width:o,height:o,"&::before":{position:"absolute",top:0,insetInlineStart:0,width:o,height:o,border:"0 solid currentcolor",borderBlockStartWidth:b,borderInlineStartWidth:b,content:'""'}},"&-super-prev-icon,\n &-super-next-icon":{"&::after":{position:"absolute",top:z,insetInlineStart:z,display:"inline-block",width:o,height:o,border:"0 solid currentcolor",borderBlockStartWidth:b,borderInlineStartWidth:b,content:'""'}},"&-prev-icon, &-super-prev-icon":{transform:"rotate(-45deg)"},"&-next-icon, &-super-next-icon":{transform:"rotate(135deg)"},"&-content":{width:"100%",tableLayout:"fixed",borderCollapse:"collapse","th, td":{position:"relative",minWidth:E,fontWeight:"normal"},th:{height:e.calc(E).add(e.calc(k).mul(2)).equal(),color:O,verticalAlign:"middle"}},"&-cell":Object.assign({padding:`${fe(k)} 0`,color:$,cursor:"pointer","&-in-view":{color:O}},kx(e)),"&-decade-panel,\n &-year-panel,\n &-quarter-panel,\n &-month-panel":{[`${t}-content`]:{height:e.calc(A).mul(4).equal()},[r]:{padding:`0 ${fe(s)}`}},"&-quarter-panel":{[`${t}-content`]:{height:N}},"&-decade-panel":{[r]:{padding:`0 ${fe(e.calc(s).div(2).equal())}`},[`${t}-cell::before`]:{display:"none"}},"&-year-panel,\n &-quarter-panel,\n &-month-panel":{[`${t}-body`]:{padding:`0 ${fe(s)}`},[r]:{width:a}},"&-date-panel":{[`${t}-body`]:{padding:`${fe(s)} ${fe(j)}`},[`${t}-content th`]:{boxSizing:"border-box",padding:0}},"&-week-panel-row":{td:{"&:before":{transition:`background ${w}`},"&:first-child:before":{borderStartStartRadius:I,borderEndStartRadius:I},"&:last-child:before":{borderStartEndRadius:I,borderEndEndRadius:I}},"&:hover td:before":{background:F},"&-range-start td, &-range-end td, &-selected td, &-hover td":{[`&${n}`]:{"&:before":{background:v},[`&${t}-cell-week`]:{color:new pr(M).setA(.5).toHexString()},[r]:{color:M}}},"&-range-hover td:before":{background:B}},"&-week-panel, &-date-panel-show-week":{[`${t}-body`]:{padding:`${fe(s)} ${fe(l)}`},[`${t}-content th`]:{width:"auto"}},"&-datetime-panel":{display:"flex",[`${t}-time-panel`]:{borderInlineStart:`${fe(d)} ${g} ${p}`},[`${t}-date-panel,
|
|
36
36
|
${t}-time-panel`]:{transition:`opacity ${P}`},"&-active":{[`${t}-date-panel,
|
|
37
|
-
${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:"auto",minWidth:"auto",[`${t}-content`]:{display:"flex",flex:"auto",height:
|
|
37
|
+
${t}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:"auto",minWidth:"auto",[`${t}-content`]:{display:"flex",flex:"auto",height:R},"&-column":{flex:"1 0 auto",width:T,margin:`${fe(c)} 0`,padding:0,overflowY:"hidden",textAlign:"start",listStyle:"none",transition:`background ${w}`,overflowX:"hidden","&::-webkit-scrollbar":{width:8,backgroundColor:"transparent"},"&::-webkit-scrollbar-thumb":{backgroundColor:e.colorTextTertiary,borderRadius:e.borderRadiusSM},"&":{scrollbarWidth:"thin",scrollbarColor:`${e.colorTextTertiary} transparent`},"&::after":{display:"block",height:`calc(100% - ${fe(_)})`,content:'""'},"&:not(:first-child)":{borderInlineStart:`${fe(d)} ${g} ${p}`},"&-active":{background:new pr(B).setA(.2).toHexString()},"&:hover":{overflowY:"auto"},"> li":{margin:0,padding:0,[`&${t}-time-panel-cell`]:{marginInline:L,[`${t}-time-panel-cell-inner`]:{display:"block",width:e.calc(T).sub(e.calc(L).mul(2)).equal(),height:_,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:e.calc(T).sub(_).div(2).equal(),color:O,lineHeight:fe(_),borderRadius:I,cursor:"pointer",transition:`background ${w}`,"&:hover":{background:F}},"&-selected":{[`${t}-time-panel-cell-inner`]:{background:B}},"&-disabled":{[`${t}-time-panel-cell-inner`]:{color:$,background:"transparent",cursor:"not-allowed"}}}}}}}}},Ox=e=>{const{componentCls:t,textHeight:n,lineWidth:r,paddingSM:a,antCls:o,colorPrimary:i,cellActiveWithRangeBg:l,colorPrimaryBorder:s,lineType:c,colorSplit:u}=e;return{[`${t}-dropdown`]:{[`${t}-footer`]:{borderTop:`${fe(r)} ${c} ${u}`,"&-extra":{padding:`0 ${fe(a)}`,lineHeight:fe(e.calc(n).sub(e.calc(r).mul(2)).equal()),textAlign:"start","&:not(:last-child)":{borderBottom:`${fe(r)} ${c} ${u}`}}},[`${t}-panels + ${t}-footer ${t}-ranges`]:{justifyContent:"space-between"},[`${t}-ranges`]:{marginBlock:0,paddingInline:fe(a),overflow:"hidden",textAlign:"start",listStyle:"none",display:"flex",justifyContent:"center",alignItems:"center","> li":{lineHeight:fe(e.calc(n).sub(e.calc(r).mul(2)).equal()),display:"inline-block"},[`${t}-now-btn-disabled`]:{pointerEvents:"none",color:e.colorTextDisabled},[`${t}-preset > ${o}-tag-blue`]:{color:i,background:l,borderColor:s,cursor:"pointer"},[`${t}-ok`]:{paddingBlock:e.calc(r).mul(2).equal(),marginInlineStart:"auto"}}}}},Nx=e=>{const{componentCls:t,controlHeightLG:n,paddingXXS:r,padding:a}=e;return{pickerCellCls:`${t}-cell`,pickerCellInnerCls:`${t}-cell-inner`,pickerYearMonthCellWidth:e.calc(n).mul(1.5).equal(),pickerQuarterPanelContentHeight:e.calc(n).mul(1.4).equal(),pickerCellPaddingVertical:e.calc(r).add(e.calc(r).div(2)).equal(),pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconMargin:4,pickerControlIconBorderWidth:1.5,pickerDatePanelPaddingHorizontal:e.calc(a).add(e.calc(r).div(2)).equal()}},Dx=e=>{const{colorBgContainerDisabled:t,controlHeight:n,controlHeightSM:r,controlHeightLG:a,paddingXXS:o,lineWidth:i}=e,l=o*2,s=i*2,c=Math.min(n-l,n-s),u=Math.min(r-l,r-s),d=Math.min(a-l,a-s);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(o/2),cellHoverBg:e.controlItemBgHover,cellActiveWithRangeBg:e.controlItemBgActive,cellHoverWithRangeBg:new pr(e.colorPrimary).lighten(35).toHexString(),cellRangeBorderColor:new pr(e.colorPrimary).lighten(20).toHexString(),cellBgDisabled:t,timeColumnWidth:a*1.4,timeColumnHeight:224,timeCellHeight:28,cellWidth:r*1.5,cellHeight:r,textHeight:a,withoutTimeCellHeight:a*1.65,multipleItemBg:e.colorFillSecondary,multipleItemBorderColor:"transparent",multipleItemHeight:c,multipleItemHeightSM:u,multipleItemHeightLG:d,multipleSelectorBgDisabled:t,multipleItemColorDisabled:e.colorTextDisabled,multipleItemBorderColorDisabled:"transparent"}},Mx=e=>Object.assign(Object.assign(Object.assign(Object.assign({},lp(e)),Dx(e)),Mp(e)),{presetsWidth:120,presetsMaxWidth:200,zIndexPopup:e.zIndexPopupBase+50}),Fx=e=>{const{componentCls:t}=e;return{[t]:[Object.assign(Object.assign(Object.assign(Object.assign({},sp(e)),cp(e)),up(e)),dp(e)),{"&-outlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${fe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-filled":{[`&${t}-multiple ${t}-selection-item`]:{background:e.colorBgContainer,border:`${fe(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}},"&-borderless":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${fe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}},"&-underlined":{[`&${t}-multiple ${t}-selection-item`]:{background:e.multipleItemBg,border:`${fe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}}}]}},Yl=(e,t)=>({padding:`${fe(e)} ${fe(t)}`}),Px=e=>{const{componentCls:t,colorError:n,colorWarning:r}=e;return{[`${t}:not(${t}-disabled):not([disabled])`]:{[`&${t}-status-error`]:{[`${t}-active-bar`]:{background:n}},[`&${t}-status-warning`]:{[`${t}-active-bar`]:{background:r}}}}},Rx=e=>{var t;const{componentCls:n,antCls:r,paddingInline:a,lineWidth:o,lineType:i,colorBorder:l,borderRadius:s,motionDurationMid:c,colorTextDisabled:u,colorTextPlaceholder:d,fontSizeLG:g,inputFontSizeLG:h,fontSizeSM:v,inputFontSizeSM:m,controlHeightSM:p,paddingInlineSM:b,paddingXS:y,marginXS:x,colorIcon:w,lineWidthBold:C,colorPrimary:S,motionDurationSlow:E,zIndexPopup:k,paddingXXS:$,sizePopupArrow:O,colorBgElevated:D,borderRadiusLG:P,boxShadowSecondary:A,borderRadiusSM:N,colorSplit:I,cellHoverBg:M,presetsWidth:F,presetsMaxWidth:R,boxShadowPopoverArrow:T,fontHeight:_,lineHeightLG:B}=e;return[{[n]:Object.assign(Object.assign(Object.assign({},gn(e)),Yl(e.paddingBlock,e.paddingInline)),{position:"relative",display:"inline-flex",alignItems:"center",lineHeight:1,borderRadius:s,transition:`border ${c}, box-shadow ${c}, background ${c}`,[`${n}-prefix`]:{flex:"0 0 auto",marginInlineEnd:e.inputAffixPadding},[`${n}-input`]:{position:"relative",display:"inline-flex",alignItems:"center",width:"100%","> input":Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",color:"inherit",fontSize:(t=e.inputFontSize)!==null&&t!==void 0?t:e.fontSize,lineHeight:e.lineHeight,transition:`all ${c}`},mp(d)),{flex:"auto",minWidth:1,height:"auto",padding:0,background:"transparent",border:0,fontFamily:"inherit","&:focus":{boxShadow:"none",outline:0},"&[disabled]":{background:"transparent",color:u,cursor:"not-allowed"}}),"&-placeholder":{"> input":{color:d}}},"&-large":Object.assign(Object.assign({},Yl(e.paddingBlockLG,e.paddingInlineLG)),{[`${n}-input > input`]:{fontSize:h??g,lineHeight:B}}),"&-small":Object.assign(Object.assign({},Yl(e.paddingBlockSM,e.paddingInlineSM)),{[`${n}-input > input`]:{fontSize:m??v}}),[`${n}-suffix`]:{display:"flex",flex:"none",alignSelf:"center",marginInlineStart:e.calc(y).div(2).equal(),color:u,lineHeight:1,pointerEvents:"none",transition:`opacity ${c}, color ${c}`,"> *":{verticalAlign:"top","&:not(:last-child)":{marginInlineEnd:x}}},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineEnd:0,color:u,lineHeight:1,transform:"translateY(-50%)",cursor:"pointer",opacity:0,transition:`opacity ${c}, color ${c}`,"> *":{verticalAlign:"top"},"&:hover":{color:w}},"&:hover":{[`${n}-clear`]:{opacity:1},[`${n}-suffix:not(:last-child)`]:{opacity:0}},[`${n}-separator`]:{position:"relative",display:"inline-block",width:"1em",height:g,color:u,fontSize:g,verticalAlign:"top",cursor:"default",[`${n}-focused &`]:{color:w},[`${n}-range-separator &`]:{[`${n}-disabled &`]:{cursor:"not-allowed"}}},"&-range":{position:"relative",display:"inline-flex",[`${n}-active-bar`]:{bottom:e.calc(o).mul(-1).equal(),height:C,background:S,opacity:0,transition:`all ${E} ease-out`,pointerEvents:"none"},[`&${n}-focused`]:{[`${n}-active-bar`]:{opacity:1}},[`${n}-range-separator`]:{alignItems:"center",padding:`0 ${fe(y)}`,lineHeight:1}},"&-range, &-multiple":{[`${n}-clear`]:{insetInlineEnd:a},[`&${n}-small`]:{[`${n}-clear`]:{insetInlineEnd:b}}},"&-dropdown":Object.assign(Object.assign(Object.assign({},gn(e)),Ix(e)),{pointerEvents:"none",position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:k,[`&${n}-dropdown-hidden`]:{display:"none"},"&-rtl":{direction:"rtl"},[`&${n}-dropdown-placement-bottomLeft,
|
|
38
38
|
&${n}-dropdown-placement-bottomRight`]:{[`${n}-range-arrow`]:{top:0,display:"block",transform:"translateY(-100%)"}},[`&${n}-dropdown-placement-topLeft,
|
|
39
39
|
&${n}-dropdown-placement-topRight`]:{[`${n}-range-arrow`]:{bottom:0,display:"block",transform:"translateY(100%) rotate(180deg)"}},[`&${r}-slide-up-appear, &${r}-slide-up-enter`]:{[`${n}-range-arrow${n}-range-arrow`]:{transition:"none"}},[`&${r}-slide-up-enter${r}-slide-up-enter-active${n}-dropdown-placement-topLeft,
|
|
40
40
|
&${r}-slide-up-enter${r}-slide-up-enter-active${n}-dropdown-placement-topRight,
|
|
41
41
|
&${r}-slide-up-appear${r}-slide-up-appear-active${n}-dropdown-placement-topLeft,
|
|
42
|
-
&${r}-slide-up-appear${r}-slide-up-appear-active${n}-dropdown-placement-topRight`]:{animationName:
|
|
42
|
+
&${r}-slide-up-appear${r}-slide-up-appear-active${n}-dropdown-placement-topRight`]:{animationName:Np},[`&${r}-slide-up-enter${r}-slide-up-enter-active${n}-dropdown-placement-bottomLeft,
|
|
43
43
|
&${r}-slide-up-enter${r}-slide-up-enter-active${n}-dropdown-placement-bottomRight,
|
|
44
44
|
&${r}-slide-up-appear${r}-slide-up-appear-active${n}-dropdown-placement-bottomLeft,
|
|
45
|
-
&${r}-slide-up-appear${r}-slide-up-appear-active${n}-dropdown-placement-bottomRight`]:{animationName:
|
|
46
|
-
&${r}-slide-up-leave${r}-slide-up-leave-active${n}-dropdown-placement-topRight`]:{animationName:
|
|
47
|
-
&${r}-slide-up-leave${r}-slide-up-leave-active${n}-dropdown-placement-bottomRight`]:{animationName:
|
|
45
|
+
&${r}-slide-up-appear${r}-slide-up-appear-active${n}-dropdown-placement-bottomRight`]:{animationName:Dp},[`&${r}-slide-up-leave ${n}-panel-container`]:{pointerEvents:"none"},[`&${r}-slide-up-leave${r}-slide-up-leave-active${n}-dropdown-placement-topLeft,
|
|
46
|
+
&${r}-slide-up-leave${r}-slide-up-leave-active${n}-dropdown-placement-topRight`]:{animationName:Ip},[`&${r}-slide-up-leave${r}-slide-up-leave-active${n}-dropdown-placement-bottomLeft,
|
|
47
|
+
&${r}-slide-up-leave${r}-slide-up-leave-active${n}-dropdown-placement-bottomRight`]:{animationName:Op},[`${n}-panel > ${n}-time-panel`]:{paddingTop:$},[`${n}-range-wrapper`]:{display:"flex",position:"relative"},[`${n}-range-arrow`]:Object.assign(Object.assign({position:"absolute",zIndex:1,display:"none",paddingInline:e.calc(a).mul(1.5).equal(),boxSizing:"content-box",transition:`all ${E} ease-out`},wy(e,D,T)),{"&:before":{insetInlineStart:e.calc(a).mul(1.5).equal()}}),[`${n}-panel-container`]:{overflow:"hidden",verticalAlign:"top",background:D,borderRadius:P,boxShadow:A,transition:`margin ${E}`,display:"inline-block",pointerEvents:"auto",[`${n}-panel-layout`]:{display:"flex",flexWrap:"nowrap",alignItems:"stretch"},[`${n}-presets`]:{display:"flex",flexDirection:"column",minWidth:F,maxWidth:R,ul:{height:0,flex:"auto",listStyle:"none",overflow:"auto",margin:0,padding:y,borderInlineEnd:`${fe(o)} ${i} ${I}`,li:Object.assign(Object.assign({},ol),{borderRadius:N,paddingInline:y,paddingBlock:e.calc(p).sub(_).div(2).equal(),cursor:"pointer",transition:`all ${E}`,"+ li":{marginTop:x},"&:hover":{background:M}})}},[`${n}-panels`]:{display:"inline-flex",flexWrap:"nowrap","&:last-child":{[`${n}-panel`]:{borderWidth:0}}},[`${n}-panel`]:{verticalAlign:"top",background:"transparent",borderRadius:0,borderWidth:0,[`${n}-content, table`]:{textAlign:"center"},"&-focused":{borderColor:l}}}}),"&-dropdown-range":{padding:`${fe(e.calc(O).mul(2).div(3).equal())} 0`,"&-hidden":{display:"none"}},"&-rtl":{direction:"rtl",[`${n}-separator`]:{transform:"scale(-1, 1)"},[`${n}-footer`]:{"&-extra":{direction:"rtl"}}}})},Oa(e,"slide-up"),Oa(e,"slide-down"),Bi(e,"move-up"),Bi(e,"move-down")]},Dg=ar("DatePicker",e=>{const t=Vn(fp(e),Nx(e),{inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[Ox(t),Rx(t),Fx(t),Px(t),Ex(t),Sp(e,{focusElCls:`${e.componentCls}-focused`})]},Mx);function Pn(e,t){return e[t]}var Ax=["children"];function Mg(e,t){return"".concat(e,"-").concat(t)}function Tx(e){return e&&e.type&&e.type.isTreeNode}function Lo(e,t){return e??t}function Na(e){var t=e||{},n=t.title,r=t._title,a=t.key,o=t.children,i=n||"title";return{title:i,_title:r||[i],key:a||"key",children:o||"children"}}function Fg(e){function t(n){var r=rl(n);return r.map(function(a){if(!Tx(a))return On(!a,"Tree/TreeNode can only accept TreeNode as children."),null;var o=a.key,i=a.props,l=i.children,s=Dt(i,Ax),c=ye({key:o},s),u=t(l);return u.length&&(c.children=u),c}).filter(function(a){return a})}return t(e)}function Gl(e,t,n){var r=Na(n),a=r._title,o=r.key,i=r.children,l=new Set(t===!0?[]:t),s=[];function c(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return u.map(function(g,h){for(var v=Mg(d?d.pos:"0",h),m=Lo(g[o],v),p,b=0;b<a.length;b+=1){var y=a[b];if(g[y]!==void 0){p=g[y];break}}var x=Object.assign(Kn(g,[].concat(at(a),[o,i])),{title:p,key:m,parent:d,pos:v,children:null,data:g,isStart:[].concat(at(d?d.isStart:[]),[h===0]),isEnd:[].concat(at(d?d.isEnd:[]),[h===u.length-1])});return s.push(x),t===!0||l.has(m)?x.children=c(g[i]||[],x):x.children=[],x})}return c(e),s}function jx(e,t,n){var r={};pn(n)==="object"?r=n:r={externalGetKey:n},r=r||{};var a=r,o=a.childrenPropName,i=a.externalGetKey,l=a.fieldNames,s=Na(l),c=s.key,u=s.children,d=o||u,g;i?typeof i=="string"?g=function(m){return m[i]}:typeof i=="function"&&(g=function(m){return i(m)}):g=function(m,p){return Lo(m[c],p)};function h(v,m,p,b){var y=v?v[d]:e,x=v?Mg(p.pos,m):"0",w=v?[].concat(at(b),[v]):[];if(v){var C=g(v,x),S={node:v,index:m,pos:x,key:C,parentPos:p.node?p.pos:null,level:p.level+1,nodes:w};t(S)}y&&y.forEach(function(E,k){h(E,k,{node:v,pos:x,level:p?p.level+1:-1},w)})}h(null)}function Pg(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.initWrapper,r=t.processEntity,a=t.onProcessFinished,o=t.externalGetKey,i=t.childrenPropName,l=t.fieldNames,s=arguments.length>2?arguments[2]:void 0,c=o||s,u={},d={},g={posEntities:u,keyEntities:d};return n&&(g=n(g)||g),jx(e,function(h){var v=h.node,m=h.index,p=h.pos,b=h.key,y=h.parentPos,x=h.level,w=h.nodes,C={node:v,nodes:w,index:m,key:b,pos:p,level:x},S=Lo(b,p);u[p]=C,d[S]=C,C.parent=u[y],C.parent&&(C.parent.children=C.parent.children||[],C.parent.children.push(C)),r&&r(C,g)},{externalGetKey:c,childrenPropName:i,fieldNames:l}),a&&a(g),g}function fo(e,t){var n=t.expandedKeys,r=t.selectedKeys,a=t.loadedKeys,o=t.loadingKeys,i=t.checkedKeys,l=t.halfCheckedKeys,s=t.dragOverNodeKey,c=t.dropPosition,u=t.keyEntities,d=Pn(u,e),g={eventKey:e,expanded:n.indexOf(e)!==-1,selected:r.indexOf(e)!==-1,loaded:a.indexOf(e)!==-1,loading:o.indexOf(e)!==-1,checked:i.indexOf(e)!==-1,halfChecked:l.indexOf(e)!==-1,pos:String(d?d.pos:""),dragOver:s===e&&c===0,dragOverGapTop:s===e&&c===-1,dragOverGapBottom:s===e&&c===1};return g}function Zt(e){var t=e.data,n=e.expanded,r=e.selected,a=e.checked,o=e.loaded,i=e.loading,l=e.halfChecked,s=e.dragOver,c=e.dragOverGapTop,u=e.dragOverGapBottom,d=e.pos,g=e.active,h=e.eventKey,v=ye(ye({},t),{},{expanded:n,selected:r,checked:a,loaded:o,loading:i,halfChecked:l,dragOver:s,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:g,key:h});return"props"in v||Object.defineProperty(v,"props",{get:function(){return On(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),v}function Rg(e,t){var n=new Set;return e.forEach(function(r){t.has(r)||n.add(r)}),n}function _x(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,a=t.checkable;return!!(n||r)||a===!1}function Bx(e,t,n,r){for(var a=new Set(e),o=new Set,i=0;i<=n;i+=1){var l=t.get(i)||new Set;l.forEach(function(d){var g=d.key,h=d.node,v=d.children,m=v===void 0?[]:v;a.has(g)&&!r(h)&&m.filter(function(p){return!r(p.node)}).forEach(function(p){a.add(p.key)})})}for(var s=new Set,c=n;c>=0;c-=1){var u=t.get(c)||new Set;u.forEach(function(d){var g=d.parent,h=d.node;if(!(r(h)||!d.parent||s.has(d.parent.key))){if(r(d.parent.node)){s.add(g.key);return}var v=!0,m=!1;(g.children||[]).filter(function(p){return!r(p.node)}).forEach(function(p){var b=p.key,y=a.has(b);v&&!y&&(v=!1),!m&&(y||o.has(b))&&(m=!0)}),v&&a.add(g.key),m&&o.add(g.key),s.add(g.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(Rg(o,a))}}function Lx(e,t,n,r,a){for(var o=new Set(e),i=new Set(t),l=0;l<=r;l+=1){var s=n.get(l)||new Set;s.forEach(function(g){var h=g.key,v=g.node,m=g.children,p=m===void 0?[]:m;!o.has(h)&&!i.has(h)&&!a(v)&&p.filter(function(b){return!a(b.node)}).forEach(function(b){o.delete(b.key)})})}i=new Set;for(var c=new Set,u=r;u>=0;u-=1){var d=n.get(u)||new Set;d.forEach(function(g){var h=g.parent,v=g.node;if(!(a(v)||!g.parent||c.has(g.parent.key))){if(a(g.parent.node)){c.add(h.key);return}var m=!0,p=!1;(h.children||[]).filter(function(b){return!a(b.node)}).forEach(function(b){var y=b.key,x=o.has(y);m&&!x&&(m=!1),!p&&(x||i.has(y))&&(p=!0)}),m||o.delete(h.key),p&&i.add(h.key),c.add(h.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(Rg(i,o))}}function Xl(e,t,n,r){var a=[],o;o=_x;var i=new Set(e.filter(function(u){var d=!!Pn(n,u);return d||a.push(u),d})),l=new Map,s=0;Object.keys(n).forEach(function(u){var d=n[u],g=d.level,h=l.get(g);h||(h=new Set,l.set(g,h)),h.add(d),s=Math.max(s,g)}),On(!a.length,"Tree missing follow keys: ".concat(a.slice(0,100).map(function(u){return"'".concat(u,"'")}).join(", ")));var c;return t===!0?c=Bx(i,l,s,o):c=Lx(i,t.halfCheckedKeys,l,s,o),c}const zx=e=>{const{checkboxCls:t}=e,n=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},gn(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[n]:Object.assign(Object.assign({},gn(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},gn(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:Po(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${fe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${fe(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`
|
|
48
48
|
${n}:not(${n}-disabled),
|
|
49
49
|
${t}:not(${t}-disabled)
|
|
50
50
|
`]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
|
|
51
51
|
${n}-checked:not(${n}-disabled),
|
|
52
52
|
${t}-checked:not(${t}-disabled)
|
|
53
|
-
`]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function jg(e,t){const n=Hn(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return B1(n)}rr("Checkbox",(e,{prefixCls:t})=>[jg(t,e)]);var L1={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"},z1=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:L1}))},H1=f.forwardRef(z1);function Ll(){return typeof BigInt=="function"}function Rg(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Yr(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t="0".concat(t));var r=t||"0",a=r.split("."),o=a[0]||"0",i=a[1]||"0";o==="0"&&i==="0"&&(n=!1);var s=n?"-":"";return{negative:n,negativeStr:s,trimStr:r,integerStr:o,decimalStr:i,fullStr:"".concat(s).concat(r)}}function Cu(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function Vr(e){var t=String(e);if(Cu(e)){var n=Number(t.slice(t.indexOf("e-")+2)),r=t.match(/\.(\d+)/);return r!=null&&r[1]&&(n+=r[1].length),n}return t.includes(".")&&wu(t)?t.length-t.indexOf(".")-1:0}function Cs(e){var t=String(e);if(Cu(e)){if(e>Number.MAX_SAFE_INTEGER)return String(Ll()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e<Number.MIN_SAFE_INTEGER)return String(Ll()?BigInt(e).toString():Number.MIN_SAFE_INTEGER);t=e.toFixed(Vr(t))}return Yr(t).fullStr}function wu(e){return typeof e=="number"?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}var V1=(function(){function e(t){if(aa(this,e),J(this,"origin",""),J(this,"negative",void 0),J(this,"integer",void 0),J(this,"decimal",void 0),J(this,"decimalLen",void 0),J(this,"empty",void 0),J(this,"nan",void 0),Rg(t)){this.empty=!0;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=!0;return}var n=t;if(Cu(n)&&(n=Number(n)),n=typeof n=="string"?n:Cs(n),wu(n)){var r=Yr(n);this.negative=r.negative;var a=r.trimStr.split(".");this.integer=BigInt(a[0]);var o=a[1]||"0";this.decimal=BigInt(o),this.decimalLen=o.length}else this.nan=!0}return oa(e,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(n){var r="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(n,"0"));return BigInt(r)}},{key:"negate",value:function(){var n=new e(this.toString());return n.negative=!n.negative,n}},{key:"cal",value:function(n,r,a){var o=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),i=this.alignDecimal(o),s=n.alignDecimal(o),l=r(i,s).toString(),c=a(o),u=Yr(l),d=u.negativeStr,g=u.trimStr,h="".concat(d).concat(g.padStart(c+1,"0"));return new e("".concat(h.slice(0,-c),".").concat(h.slice(-c)))}},{key:"add",value:function(n){if(this.isInvalidate())return new e(n);var r=new e(n);return r.isInvalidate()?this:this.cal(r,function(a,o){return a+o},function(a){return a})}},{key:"multi",value:function(n){var r=new e(n);return this.isInvalidate()||r.isInvalidate()?new e(NaN):this.cal(r,function(a,o){return a*o},function(a){return a*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toString()===(n==null?void 0:n.toString())}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":Yr("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e})(),K1=(function(){function e(t){if(aa(this,e),J(this,"origin",""),J(this,"number",void 0),J(this,"empty",void 0),Rg(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return oa(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(n){if(this.isInvalidate())return new e(n);var r=Number(n);if(Number.isNaN(r))return this;var a=this.number+r;if(a>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(a<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var o=Math.max(Vr(this.number),Vr(r));return new e(a.toFixed(o))}},{key:"multi",value:function(n){var r=Number(n);if(this.isInvalidate()||Number.isNaN(r))return new e(NaN);var a=this.number*r;if(a>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(a<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var o=Math.max(Vr(this.number),Vr(r));return new e(a.toFixed(o))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toNumber()===(n==null?void 0:n.toNumber())}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":Cs(this.number):this.origin}}]),e})();function Xn(e){return Ll()?new V1(e):new K1(e)}function Si(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";var a=Yr(e),o=a.negativeStr,i=a.integerStr,s=a.decimalStr,l="".concat(t).concat(s),c="".concat(o).concat(i);if(n>=0){var u=Number(s[n]);if(u>=5&&!r){var d=Xn(e).add("".concat(o,"0.").concat("0".repeat(n)).concat(10-u));return Si(d.toString(),t,n,r)}return n===0?c:"".concat(c).concat(t).concat(s.padEnd(n,"0").slice(0,n))}return l===".0"?c:"".concat(c).concat(l)}function W1(e,t){return typeof Proxy<"u"&&e?new Proxy(e,{get:function(r,a){if(t[a])return t[a];var o=r[a];return typeof o=="function"?o.bind(r):o}}):e}function q1(e,t){var n=wt(null);function r(){try{var o=e.selectionStart,i=e.selectionEnd,s=e.value,l=s.substring(0,o),c=s.substring(i);n.current={start:o,end:i,value:s,beforeTxt:l,afterTxt:c}}catch{}}function a(){if(e&&n.current&&t)try{var o=e.value,i=n.current,s=i.beforeTxt,l=i.afterTxt,c=i.start,u=o.length;if(o.startsWith(s))u=s.length;else if(o.endsWith(l))u=o.length-n.current.afterTxt.length;else{var d=s[c-1],g=o.indexOf(d,c-1);g!==-1&&(u=g+1)}e.setSelectionRange(u,u)}catch(h){In(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(h.message))}}return[r,a]}var U1=function(){var t=dt(!1),n=oe(t,2),r=n[0],a=n[1];return Rn(function(){a(G0())},[]),r},Y1=200,G1=600;function X1(e){var t=e.prefixCls,n=e.upNode,r=e.downNode,a=e.upDisabled,o=e.downDisabled,i=e.onStep,s=f.useRef(),l=f.useRef([]),c=f.useRef();c.current=i;var u=function(){clearTimeout(s.current)},d=function(x,w){x.preventDefault(),u(),c.current(w);function C(){c.current(w),s.current=setTimeout(C,Y1)}s.current=setTimeout(C,G1)};f.useEffect(function(){return function(){u(),l.current.forEach(function(y){return zt.cancel(y)})}},[]);var g=U1();if(g)return null;var h="".concat(t,"-handler"),v=pe(h,"".concat(h,"-up"),J({},"".concat(h,"-up-disabled"),a)),m=pe(h,"".concat(h,"-down"),J({},"".concat(h,"-down-disabled"),o)),p=function(){return l.current.push(zt(u))},b={unselectable:"on",role:"button",onMouseUp:p,onMouseLeave:p};return f.createElement("div",{className:"".concat(h,"-wrap")},f.createElement("span",Oe({},b,{onMouseDown:function(x){d(x,!0)},"aria-label":"Increase Value","aria-disabled":a,className:v}),n||f.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-up-inner")})),f.createElement("span",Oe({},b,{onMouseDown:function(x){d(x,!1)},"aria-label":"Decrease Value","aria-disabled":o,className:m}),r||f.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-down-inner")})))}function Pd(e){var t=typeof e=="number"?Cs(e):Yr(e).fullStr,n=t.includes(".");return n?Yr(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}const J1=(function(){var e=wt(0),t=function(){zt.cancel(e.current)};return ft(function(){return t},[]),function(n){t(),e.current=zt(function(){n()})}});var Q1=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],Z1=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],jd=function(t,n){return t||n.isEmpty()?n.toString():n.toNumber()},Rd=function(t){var n=Xn(t);return n.isInvalidate()?null:n},eC=f.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,a=e.style,o=e.min,i=e.max,s=e.step,l=s===void 0?1:s,c=e.defaultValue,u=e.value,d=e.disabled,g=e.readOnly,h=e.upHandler,v=e.downHandler,m=e.keyboard,p=e.changeOnWheel,b=p===void 0?!1:p,y=e.controls,x=y===void 0?!0:y;e.classNames;var w=e.stringMode,C=e.parser,S=e.formatter,E=e.precision,k=e.decimalSeparator,$=e.onChange,O=e.onInput,D=e.onPressEnter,P=e.onStep,R=e.changeOnBlur,N=R===void 0?!0:R,I=e.domRef,M=Nt(e,Q1),F="".concat(n,"-input"),j=f.useRef(null),A=f.useState(!1),_=oe(A,2),L=_[0],z=_[1],T=f.useRef(!1),H=f.useRef(!1),W=f.useRef(!1),K=f.useState(function(){return Xn(u??c)}),G=oe(K,2),U=G[0],Z=G[1];function Q(Ne){u===void 0&&Z(Ne)}var Y=f.useCallback(function(Ne,Ie){if(!Ie)return E>=0?E:Math.max(Vr(Ne),Vr(l))},[E,l]),ee=f.useCallback(function(Ne){var Ie=String(Ne);if(C)return C(Ie);var Ue=Ie;return k&&(Ue=Ue.replace(k,".")),Ue.replace(/[^\w.-]+/g,"")},[C,k]),ce=f.useRef(""),me=f.useCallback(function(Ne,Ie){if(S)return S(Ne,{userTyping:Ie,input:String(ce.current)});var Ue=typeof Ne=="number"?Cs(Ne):Ne;if(!Ie){var Ye=Y(Ue,Ie);if(wu(Ue)&&(k||Ye>=0)){var bt=k||".";Ue=Si(Ue,bt,Ye)}}return Ue},[S,Y,k]),we=f.useState(function(){var Ne=c??u;return U.isInvalidate()&&["string","number"].includes(mn(Ne))?Number.isNaN(Ne)?"":Ne:me(U.toString(),!1)}),se=oe(we,2),ge=se[0],Ee=se[1];ce.current=ge;function Te(Ne,Ie){Ee(me(Ne.isInvalidate()?Ne.toString(!1):Ne.toString(!Ie),Ie))}var Pe=f.useMemo(function(){return Rd(i)},[i,E]),he=f.useMemo(function(){return Rd(o)},[o,E]),ke=f.useMemo(function(){return!Pe||!U||U.isInvalidate()?!1:Pe.lessEquals(U)},[Pe,U]),de=f.useMemo(function(){return!he||!U||U.isInvalidate()?!1:U.lessEquals(he)},[he,U]),Re=q1(j.current,L),He=oe(Re,2),Ke=He[0],tt=He[1],qe=function(Ie){return Pe&&!Ie.lessEquals(Pe)?Pe:he&&!he.lessEquals(Ie)?he:null},We=function(Ie){return!qe(Ie)},lt=function(Ie,Ue){var Ye=Ie,bt=We(Ye)||Ye.isEmpty();if(!Ye.isEmpty()&&!Ue&&(Ye=qe(Ye)||Ye,bt=!0),!g&&!d&&bt){var At=Ye.toString(),Ht=Y(At,Ue);return Ht>=0&&(Ye=Xn(Si(At,".",Ht)),We(Ye)||(Ye=Xn(Si(At,".",Ht,!0)))),Ye.equals(U)||(Q(Ye),$==null||$(Ye.isEmpty()?null:jd(w,Ye)),u===void 0&&Te(Ye,Ue)),Ye}return U},Fe=J1(),ae=function Ne(Ie){if(Ke(),ce.current=Ie,Ee(Ie),!H.current){var Ue=ee(Ie),Ye=Xn(Ue);Ye.isNaN()||lt(Ye,!0)}O==null||O(Ie),Fe(function(){var bt=Ie;C||(bt=Ie.replace(/。/g,".")),bt!==Ie&&Ne(bt)})},Le=function(){H.current=!0},Ce=function(){H.current=!1,ae(j.current.value)},$e=function(Ie){ae(Ie.target.value)},ue=function(Ie){var Ue;if(!(Ie&&ke||!Ie&&de)){T.current=!1;var Ye=Xn(W.current?Pd(l):l);Ie||(Ye=Ye.negate());var bt=(U||Xn(0)).add(Ye.toString()),At=lt(bt,!1);P==null||P(jd(w,At),{offset:W.current?Pd(l):l,type:Ie?"up":"down"}),(Ue=j.current)===null||Ue===void 0||Ue.focus()}},ie=function(Ie){var Ue=Xn(ee(ge)),Ye;Ue.isNaN()?Ye=lt(U,Ie):Ye=lt(Ue,Ie),u!==void 0?Te(U,!1):Ye.isNaN()||Te(Ye,!1)},xe=function(){T.current=!0},_e=function(Ie){var Ue=Ie.key,Ye=Ie.shiftKey;T.current=!0,W.current=Ye,Ue==="Enter"&&(H.current||(T.current=!1),ie(!1),D==null||D(Ie)),m!==!1&&!H.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Ue)&&(ue(Ue==="Up"||Ue==="ArrowUp"),Ie.preventDefault())},ze=function(){T.current=!1,W.current=!1};f.useEffect(function(){if(b&&L){var Ne=function(Ye){ue(Ye.deltaY<0),Ye.preventDefault()},Ie=j.current;if(Ie)return Ie.addEventListener("wheel",Ne,{passive:!1}),function(){return Ie.removeEventListener("wheel",Ne)}}});var st=function(){N&&ie(!1),z(!1),T.current=!1};return mi(function(){U.isInvalidate()||Te(U,!1)},[E,S]),mi(function(){var Ne=Xn(u);Z(Ne);var Ie=Xn(ee(ge));(!Ne.equals(Ie)||!T.current||S)&&Te(Ne,T.current)},[u]),mi(function(){S&&tt()},[ge]),f.createElement("div",{ref:I,className:pe(n,r,J(J(J(J(J({},"".concat(n,"-focused"),L),"".concat(n,"-disabled"),d),"".concat(n,"-readonly"),g),"".concat(n,"-not-a-number"),U.isNaN()),"".concat(n,"-out-of-range"),!U.isInvalidate()&&!We(U))),style:a,onFocus:function(){z(!0)},onBlur:st,onKeyDown:_e,onKeyUp:ze,onCompositionStart:Le,onCompositionEnd:Ce,onBeforeInput:xe},x&&f.createElement(X1,{prefixCls:n,upNode:h,downNode:v,upDisabled:ke,downDisabled:de,onStep:ue}),f.createElement("div",{className:"".concat(F,"-wrap")},f.createElement("input",Oe({autoComplete:"off",role:"spinbutton","aria-valuemin":o,"aria-valuemax":i,"aria-valuenow":U.isInvalidate()?null:U.toString(),step:l},M,{ref:Mo(j,t),className:F,value:ge,onChange:$e,disabled:d,readOnly:g}))))}),tC=f.forwardRef(function(e,t){var n=e.disabled,r=e.style,a=e.prefixCls,o=a===void 0?"rc-input-number":a,i=e.value,s=e.prefix,l=e.suffix,c=e.addonBefore,u=e.addonAfter,d=e.className,g=e.classNames,h=Nt(e,Z1),v=f.useRef(null),m=f.useRef(null),p=f.useRef(null),b=function(x){p.current&&j0(p.current,x)};return f.useImperativeHandle(t,function(){return W1(p.current,{focus:b,nativeElement:v.current.nativeElement||m.current})}),f.createElement(P0,{className:d,triggerFocus:b,prefixCls:o,value:i,disabled:n,style:r,prefix:s,suffix:l,addonAfter:u,addonBefore:c,classNames:g,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:v},f.createElement(eC,Oe({prefixCls:o,disabled:n,ref:p,domRef:m,className:g==null?void 0:g.input},h)))});const nC=e=>{var t;const n=(t=e.handleVisible)!==null&&t!==void 0?t:"auto",r=e.controlHeightSM-e.lineWidth*2;return Object.assign(Object.assign({},ip(e)),{controlWidth:90,handleWidth:r,handleFontSize:e.fontSize/2,handleVisible:n,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new mr(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:n===!0?1:0,handleVisibleWidth:n===!0?r:0})},Ad=({componentCls:e,borderRadiusSM:t,borderRadiusLG:n},r)=>{const a=r==="lg"?n:t;return{[`&-${r}`]:{[`${e}-handler-wrap`]:{borderStartEndRadius:a,borderEndEndRadius:a},[`${e}-handler-up`]:{borderStartEndRadius:a},[`${e}-handler-down`]:{borderEndEndRadius:a}}}},rC=e=>{const{componentCls:t,lineWidth:n,lineType:r,borderRadius:a,inputFontSizeSM:o,inputFontSizeLG:i,controlHeightLG:s,controlHeightSM:l,colorError:c,paddingInlineSM:u,paddingBlockSM:d,paddingBlockLG:g,paddingInlineLG:h,colorIcon:v,motionDurationMid:m,handleHoverColor:p,handleOpacity:b,paddingInline:y,paddingBlock:x,handleBg:w,handleActiveBg:C,colorTextDisabled:S,borderRadiusSM:E,borderRadiusLG:k,controlWidth:$,handleBorderColor:O,filledHandleBg:D,lineHeightLG:P,calc:R}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},pn(e)),mp(e)),{display:"inline-block",width:$,margin:0,padding:0,borderRadius:a}),sp(e,{[`${t}-handler-wrap`]:{background:w,[`${t}-handler-down`]:{borderBlockStart:`${fe(n)} ${r} ${O}`}}})),cp(e,{[`${t}-handler-wrap`]:{background:D,[`${t}-handler-down`]:{borderBlockStart:`${fe(n)} ${r} ${O}`}},"&:focus-within":{[`${t}-handler-wrap`]:{background:w}}})),lp(e,{[`${t}-handler-wrap`]:{background:w,[`${t}-handler-down`]:{borderBlockStart:`${fe(n)} ${r} ${O}`}}})),up(e)),{"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:i,lineHeight:P,borderRadius:k,[`input${t}-input`]:{height:R(s).sub(R(n).mul(2)).equal(),padding:`${fe(g)} ${fe(h)}`}},"&-sm":{padding:0,fontSize:o,borderRadius:E,[`input${t}-input`]:{height:R(l).sub(R(n).mul(2)).equal(),padding:`${fe(d)} ${fe(u)}`}},"&-out-of-range":{[`${t}-input-wrap`]:{input:{color:c}}},"&-group":Object.assign(Object.assign(Object.assign({},pn(e)),R0(e)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:k,fontSize:e.fontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:E}}},A0(e)),T0(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}}})}),[`&-disabled ${t}-input`]:{cursor:"not-allowed"},[t]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},pn(e)),{width:"100%",padding:`${fe(x)} ${fe(y)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:a,outline:0,transition:`all ${m} linear`,appearance:"textfield",fontSize:"inherit"}),fp(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}})},{[t]:Object.assign(Object.assign(Object.assign({[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:b,height:"100%",borderStartStartRadius:0,borderStartEndRadius:a,borderEndEndRadius:a,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${m}`,overflow:"hidden",[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
53
|
+
`]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function Ag(e,t){const n=Vn(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return zx(n)}ar("Checkbox",(e,{prefixCls:t})=>[Ag(t,e)]);var Hx={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"},Vx=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:Hx}))},Kx=f.forwardRef(Vx);function zs(){return typeof BigInt=="function"}function Tg(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Gr(e){var t=e.trim(),n=t.startsWith("-");n&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t="0".concat(t));var r=t||"0",a=r.split("."),o=a[0]||"0",i=a[1]||"0";o==="0"&&i==="0"&&(n=!1);var l=n?"-":"";return{negative:n,negativeStr:l,trimStr:r,integerStr:o,decimalStr:i,fullStr:"".concat(l).concat(r)}}function wu(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function Kr(e){var t=String(e);if(wu(e)){var n=Number(t.slice(t.indexOf("e-")+2)),r=t.match(/\.(\d+)/);return r!=null&&r[1]&&(n+=r[1].length),n}return t.includes(".")&&Su(t)?t.length-t.indexOf(".")-1:0}function wl(e){var t=String(e);if(wu(e)){if(e>Number.MAX_SAFE_INTEGER)return String(zs()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e<Number.MIN_SAFE_INTEGER)return String(zs()?BigInt(e).toString():Number.MIN_SAFE_INTEGER);t=e.toFixed(Kr(t))}return Gr(t).fullStr}function Su(e){return typeof e=="number"?!Number.isNaN(e):e?/^\s*-?\d+(\.\d+)?\s*$/.test(e)||/^\s*-?\d+\.\s*$/.test(e)||/^\s*-?\.\d+\s*$/.test(e):!1}var Wx=(function(){function e(t){if(oa(this,e),J(this,"origin",""),J(this,"negative",void 0),J(this,"integer",void 0),J(this,"decimal",void 0),J(this,"decimalLen",void 0),J(this,"empty",void 0),J(this,"nan",void 0),Tg(t)){this.empty=!0;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=!0;return}var n=t;if(wu(n)&&(n=Number(n)),n=typeof n=="string"?n:wl(n),Su(n)){var r=Gr(n);this.negative=r.negative;var a=r.trimStr.split(".");this.integer=BigInt(a[0]);var o=a[1]||"0";this.decimal=BigInt(o),this.decimalLen=o.length}else this.nan=!0}return ia(e,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(n){var r="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(n,"0"));return BigInt(r)}},{key:"negate",value:function(){var n=new e(this.toString());return n.negative=!n.negative,n}},{key:"cal",value:function(n,r,a){var o=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),i=this.alignDecimal(o),l=n.alignDecimal(o),s=r(i,l).toString(),c=a(o),u=Gr(s),d=u.negativeStr,g=u.trimStr,h="".concat(d).concat(g.padStart(c+1,"0"));return new e("".concat(h.slice(0,-c),".").concat(h.slice(-c)))}},{key:"add",value:function(n){if(this.isInvalidate())return new e(n);var r=new e(n);return r.isInvalidate()?this:this.cal(r,function(a,o){return a+o},function(a){return a})}},{key:"multi",value:function(n){var r=new e(n);return this.isInvalidate()||r.isInvalidate()?new e(NaN):this.cal(r,function(a,o){return a*o},function(a){return a*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toString()===(n==null?void 0:n.toString())}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":Gr("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e})(),qx=(function(){function e(t){if(oa(this,e),J(this,"origin",""),J(this,"number",void 0),J(this,"empty",void 0),Tg(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return ia(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(n){if(this.isInvalidate())return new e(n);var r=Number(n);if(Number.isNaN(r))return this;var a=this.number+r;if(a>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(a<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var o=Math.max(Kr(this.number),Kr(r));return new e(a.toFixed(o))}},{key:"multi",value:function(n){var r=Number(n);if(this.isInvalidate()||Number.isNaN(r))return new e(NaN);var a=this.number*r;if(a>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(a<Number.MIN_SAFE_INTEGER)return new e(Number.MIN_SAFE_INTEGER);var o=Math.max(Kr(this.number),Kr(r));return new e(a.toFixed(o))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(n){return this.toNumber()===(n==null?void 0:n.toNumber())}},{key:"lessEquals",value:function(n){return this.add(n.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return n?this.isInvalidate()?"":wl(this.number):this.origin}}]),e})();function Jn(e){return zs()?new Wx(e):new qx(e)}function $i(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";var a=Gr(e),o=a.negativeStr,i=a.integerStr,l=a.decimalStr,s="".concat(t).concat(l),c="".concat(o).concat(i);if(n>=0){var u=Number(l[n]);if(u>=5&&!r){var d=Jn(e).add("".concat(o,"0.").concat("0".repeat(n)).concat(10-u));return $i(d.toString(),t,n,r)}return n===0?c:"".concat(c).concat(t).concat(l.padEnd(n,"0").slice(0,n))}return s===".0"?c:"".concat(c).concat(s)}function Ux(e,t){return typeof Proxy<"u"&&e?new Proxy(e,{get:function(r,a){if(t[a])return t[a];var o=r[a];return typeof o=="function"?o.bind(r):o}}):e}function Yx(e,t){var n=St(null);function r(){try{var o=e.selectionStart,i=e.selectionEnd,l=e.value,s=l.substring(0,o),c=l.substring(i);n.current={start:o,end:i,value:l,beforeTxt:s,afterTxt:c}}catch{}}function a(){if(e&&n.current&&t)try{var o=e.value,i=n.current,l=i.beforeTxt,s=i.afterTxt,c=i.start,u=o.length;if(o.startsWith(l))u=l.length;else if(o.endsWith(s))u=o.length-n.current.afterTxt.length;else{var d=l[c-1],g=o.indexOf(d,c-1);g!==-1&&(u=g+1)}e.setSelectionRange(u,u)}catch(h){On(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(h.message))}}return[r,a]}var Gx=function(){var t=ft(!1),n=oe(t,2),r=n[0],a=n[1];return Tn(function(){a(J0())},[]),r},Xx=200,Jx=600;function Qx(e){var t=e.prefixCls,n=e.upNode,r=e.downNode,a=e.upDisabled,o=e.downDisabled,i=e.onStep,l=f.useRef(),s=f.useRef([]),c=f.useRef();c.current=i;var u=function(){clearTimeout(l.current)},d=function(x,w){x.preventDefault(),u(),c.current(w);function C(){c.current(w),l.current=setTimeout(C,Xx)}l.current=setTimeout(C,Jx)};f.useEffect(function(){return function(){u(),s.current.forEach(function(y){return Ht.cancel(y)})}},[]);var g=Gx();if(g)return null;var h="".concat(t,"-handler"),v=pe(h,"".concat(h,"-up"),J({},"".concat(h,"-up-disabled"),a)),m=pe(h,"".concat(h,"-down"),J({},"".concat(h,"-down-disabled"),o)),p=function(){return s.current.push(Ht(u))},b={unselectable:"on",role:"button",onMouseUp:p,onMouseLeave:p};return f.createElement("div",{className:"".concat(h,"-wrap")},f.createElement("span",Oe({},b,{onMouseDown:function(x){d(x,!0)},"aria-label":"Increase Value","aria-disabled":a,className:v}),n||f.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-up-inner")})),f.createElement("span",Oe({},b,{onMouseDown:function(x){d(x,!1)},"aria-label":"Decrease Value","aria-disabled":o,className:m}),r||f.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-down-inner")})))}function Rd(e){var t=typeof e=="number"?wl(e):Gr(e).fullStr,n=t.includes(".");return n?Gr(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}const Zx=(function(){var e=St(0),t=function(){Ht.cancel(e.current)};return mt(function(){return t},[]),function(n){t(),e.current=Ht(function(){n()})}});var eC=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],tC=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],Ad=function(t,n){return t||n.isEmpty()?n.toString():n.toNumber()},Td=function(t){var n=Jn(t);return n.isInvalidate()?null:n},nC=f.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,a=e.style,o=e.min,i=e.max,l=e.step,s=l===void 0?1:l,c=e.defaultValue,u=e.value,d=e.disabled,g=e.readOnly,h=e.upHandler,v=e.downHandler,m=e.keyboard,p=e.changeOnWheel,b=p===void 0?!1:p,y=e.controls,x=y===void 0?!0:y;e.classNames;var w=e.stringMode,C=e.parser,S=e.formatter,E=e.precision,k=e.decimalSeparator,$=e.onChange,O=e.onInput,D=e.onPressEnter,P=e.onStep,A=e.changeOnBlur,N=A===void 0?!0:A,I=e.domRef,M=Dt(e,eC),F="".concat(n,"-input"),R=f.useRef(null),T=f.useState(!1),_=oe(T,2),B=_[0],L=_[1],j=f.useRef(!1),z=f.useRef(!1),K=f.useRef(!1),V=f.useState(function(){return Jn(u??c)}),G=oe(V,2),U=G[0],Z=G[1];function Q(Ne){u===void 0&&Z(Ne)}var Y=f.useCallback(function(Ne,Ie){if(!Ie)return E>=0?E:Math.max(Kr(Ne),Kr(s))},[E,s]),ee=f.useCallback(function(Ne){var Ie=String(Ne);if(C)return C(Ie);var Ye=Ie;return k&&(Ye=Ye.replace(k,".")),Ye.replace(/[^\w.-]+/g,"")},[C,k]),ce=f.useRef(""),me=f.useCallback(function(Ne,Ie){if(S)return S(Ne,{userTyping:Ie,input:String(ce.current)});var Ye=typeof Ne=="number"?wl(Ne):Ne;if(!Ie){var Ge=Y(Ye,Ie);if(Su(Ye)&&(k||Ge>=0)){var xt=k||".";Ye=$i(Ye,xt,Ge)}}return Ye},[S,Y,k]),we=f.useState(function(){var Ne=c??u;return U.isInvalidate()&&["string","number"].includes(pn(Ne))?Number.isNaN(Ne)?"":Ne:me(U.toString(),!1)}),le=oe(we,2),ge=le[0],Ee=le[1];ce.current=ge;function _e(Ne,Ie){Ee(me(Ne.isInvalidate()?Ne.toString(!1):Ne.toString(!Ie),Ie))}var Re=f.useMemo(function(){return Td(i)},[i,E]),he=f.useMemo(function(){return Td(o)},[o,E]),ke=f.useMemo(function(){return!Re||!U||U.isInvalidate()?!1:Re.lessEquals(U)},[Re,U]),de=f.useMemo(function(){return!he||!U||U.isInvalidate()?!1:U.lessEquals(he)},[he,U]),Te=Yx(R.current,B),Ve=oe(Te,2),We=Ve[0],nt=Ve[1],Ue=function(Ie){return Re&&!Ie.lessEquals(Re)?Re:he&&!he.lessEquals(Ie)?he:null},qe=function(Ie){return!Ue(Ie)},ct=function(Ie,Ye){var Ge=Ie,xt=qe(Ge)||Ge.isEmpty();if(!Ge.isEmpty()&&!Ye&&(Ge=Ue(Ge)||Ge,xt=!0),!g&&!d&&xt){var jt=Ge.toString(),Vt=Y(jt,Ye);return Vt>=0&&(Ge=Jn($i(jt,".",Vt)),qe(Ge)||(Ge=Jn($i(jt,".",Vt,!0)))),Ge.equals(U)||(Q(Ge),$==null||$(Ge.isEmpty()?null:Ad(w,Ge)),u===void 0&&_e(Ge,Ye)),Ge}return U},Fe=Zx(),ae=function Ne(Ie){if(We(),ce.current=Ie,Ee(Ie),!z.current){var Ye=ee(Ie),Ge=Jn(Ye);Ge.isNaN()||ct(Ge,!0)}O==null||O(Ie),Fe(function(){var xt=Ie;C||(xt=Ie.replace(/。/g,".")),xt!==Ie&&Ne(xt)})},ze=function(){z.current=!0},Ce=function(){z.current=!1,ae(R.current.value)},$e=function(Ie){ae(Ie.target.value)},ue=function(Ie){var Ye;if(!(Ie&&ke||!Ie&&de)){j.current=!1;var Ge=Jn(K.current?Rd(s):s);Ie||(Ge=Ge.negate());var xt=(U||Jn(0)).add(Ge.toString()),jt=ct(xt,!1);P==null||P(Ad(w,jt),{offset:K.current?Rd(s):s,type:Ie?"up":"down"}),(Ye=R.current)===null||Ye===void 0||Ye.focus()}},ie=function(Ie){var Ye=Jn(ee(ge)),Ge;Ye.isNaN()?Ge=ct(U,Ie):Ge=ct(Ye,Ie),u!==void 0?_e(U,!1):Ge.isNaN()||_e(Ge,!1)},xe=function(){j.current=!0},Be=function(Ie){var Ye=Ie.key,Ge=Ie.shiftKey;j.current=!0,K.current=Ge,Ye==="Enter"&&(z.current||(j.current=!1),ie(!1),D==null||D(Ie)),m!==!1&&!z.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Ye)&&(ue(Ye==="Up"||Ye==="ArrowUp"),Ie.preventDefault())},He=function(){j.current=!1,K.current=!1};f.useEffect(function(){if(b&&B){var Ne=function(Ge){ue(Ge.deltaY<0),Ge.preventDefault()},Ie=R.current;if(Ie)return Ie.addEventListener("wheel",Ne,{passive:!1}),function(){return Ie.removeEventListener("wheel",Ne)}}});var st=function(){N&&ie(!1),L(!1),j.current=!1};return pi(function(){U.isInvalidate()||_e(U,!1)},[E,S]),pi(function(){var Ne=Jn(u);Z(Ne);var Ie=Jn(ee(ge));(!Ne.equals(Ie)||!j.current||S)&&_e(Ne,j.current)},[u]),pi(function(){S&&nt()},[ge]),f.createElement("div",{ref:I,className:pe(n,r,J(J(J(J(J({},"".concat(n,"-focused"),B),"".concat(n,"-disabled"),d),"".concat(n,"-readonly"),g),"".concat(n,"-not-a-number"),U.isNaN()),"".concat(n,"-out-of-range"),!U.isInvalidate()&&!qe(U))),style:a,onFocus:function(){L(!0)},onBlur:st,onKeyDown:Be,onKeyUp:He,onCompositionStart:ze,onCompositionEnd:Ce,onBeforeInput:xe},x&&f.createElement(Qx,{prefixCls:n,upNode:h,downNode:v,upDisabled:ke,downDisabled:de,onStep:ue}),f.createElement("div",{className:"".concat(F,"-wrap")},f.createElement("input",Oe({autoComplete:"off",role:"spinbutton","aria-valuemin":o,"aria-valuemax":i,"aria-valuenow":U.isInvalidate()?null:U.toString(),step:s},M,{ref:Fo(R,t),className:F,value:ge,onChange:$e,disabled:d,readOnly:g}))))}),rC=f.forwardRef(function(e,t){var n=e.disabled,r=e.style,a=e.prefixCls,o=a===void 0?"rc-input-number":a,i=e.value,l=e.prefix,s=e.suffix,c=e.addonBefore,u=e.addonAfter,d=e.className,g=e.classNames,h=Dt(e,tC),v=f.useRef(null),m=f.useRef(null),p=f.useRef(null),b=function(x){p.current&&T0(p.current,x)};return f.useImperativeHandle(t,function(){return Ux(p.current,{focus:b,nativeElement:v.current.nativeElement||m.current})}),f.createElement(A0,{className:d,triggerFocus:b,prefixCls:o,value:i,disabled:n,style:r,prefix:l,suffix:s,addonAfter:u,addonBefore:c,classNames:g,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:v},f.createElement(nC,Oe({prefixCls:o,disabled:n,ref:p,domRef:m,className:g==null?void 0:g.input},h)))});const aC=e=>{var t;const n=(t=e.handleVisible)!==null&&t!==void 0?t:"auto",r=e.controlHeightSM-e.lineWidth*2;return Object.assign(Object.assign({},lp(e)),{controlWidth:90,handleWidth:r,handleFontSize:e.fontSize/2,handleVisible:n,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new pr(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:n===!0?1:0,handleVisibleWidth:n===!0?r:0})},jd=({componentCls:e,borderRadiusSM:t,borderRadiusLG:n},r)=>{const a=r==="lg"?n:t;return{[`&-${r}`]:{[`${e}-handler-wrap`]:{borderStartEndRadius:a,borderEndEndRadius:a},[`${e}-handler-up`]:{borderStartEndRadius:a},[`${e}-handler-down`]:{borderEndEndRadius:a}}}},oC=e=>{const{componentCls:t,lineWidth:n,lineType:r,borderRadius:a,inputFontSizeSM:o,inputFontSizeLG:i,controlHeightLG:l,controlHeightSM:s,colorError:c,paddingInlineSM:u,paddingBlockSM:d,paddingBlockLG:g,paddingInlineLG:h,colorIcon:v,motionDurationMid:m,handleHoverColor:p,handleOpacity:b,paddingInline:y,paddingBlock:x,handleBg:w,handleActiveBg:C,colorTextDisabled:S,borderRadiusSM:E,borderRadiusLG:k,controlWidth:$,handleBorderColor:O,filledHandleBg:D,lineHeightLG:P,calc:A}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},gn(e)),pp(e)),{display:"inline-block",width:$,margin:0,padding:0,borderRadius:a}),sp(e,{[`${t}-handler-wrap`]:{background:w,[`${t}-handler-down`]:{borderBlockStart:`${fe(n)} ${r} ${O}`}}})),up(e,{[`${t}-handler-wrap`]:{background:D,[`${t}-handler-down`]:{borderBlockStart:`${fe(n)} ${r} ${O}`}},"&:focus-within":{[`${t}-handler-wrap`]:{background:w}}})),cp(e,{[`${t}-handler-wrap`]:{background:w,[`${t}-handler-down`]:{borderBlockStart:`${fe(n)} ${r} ${O}`}}})),dp(e)),{"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:i,lineHeight:P,borderRadius:k,[`input${t}-input`]:{height:A(l).sub(A(n).mul(2)).equal(),padding:`${fe(g)} ${fe(h)}`}},"&-sm":{padding:0,fontSize:o,borderRadius:E,[`input${t}-input`]:{height:A(s).sub(A(n).mul(2)).equal(),padding:`${fe(d)} ${fe(u)}`}},"&-out-of-range":{[`${t}-input-wrap`]:{input:{color:c}}},"&-group":Object.assign(Object.assign(Object.assign({},gn(e)),j0(e)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:k,fontSize:e.fontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:E}}},_0(e)),B0(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}}})}),[`&-disabled ${t}-input`]:{cursor:"not-allowed"},[t]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},gn(e)),{width:"100%",padding:`${fe(x)} ${fe(y)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:a,outline:0,transition:`all ${m} linear`,appearance:"textfield",fontSize:"inherit"}),mp(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}})},{[t]:Object.assign(Object.assign(Object.assign({[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:b,height:"100%",borderStartStartRadius:0,borderStartEndRadius:a,borderEndEndRadius:a,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${m}`,overflow:"hidden",[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
54
54
|
${t}-handler-up-inner,
|
|
55
55
|
${t}-handler-down-inner
|
|
56
56
|
`]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},[`${t}-handler`]:{height:"50%",overflow:"hidden",color:v,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${fe(n)} ${r} ${O}`,transition:`all ${m} linear`,"&:active":{background:C},"&:hover":{height:"60%",[`
|
|
57
57
|
${t}-handler-up-inner,
|
|
58
58
|
${t}-handler-down-inner
|
|
59
|
-
`]:{color:p}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},
|
|
59
|
+
`]:{color:p}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},xp()),{color:v,transition:`all ${m} linear`,userSelect:"none"})},[`${t}-handler-up`]:{borderStartEndRadius:a},[`${t}-handler-down`]:{borderEndEndRadius:a}},jd(e,"lg")),jd(e,"sm")),{"&-disabled, &-readonly":{[`${t}-handler-wrap`]:{display:"none"},[`${t}-input`]:{color:"inherit"}},[`
|
|
60
60
|
${t}-handler-up-disabled,
|
|
61
61
|
${t}-handler-down-disabled
|
|
62
62
|
`]:{cursor:"not-allowed"},[`
|
|
63
63
|
${t}-handler-up-disabled:hover &-handler-up-inner,
|
|
64
64
|
${t}-handler-down-disabled:hover &-handler-down-inner
|
|
65
|
-
`]:{color:S}})}]},aC=e=>{const{componentCls:t,paddingBlock:n,paddingInline:r,inputAffixPadding:a,controlWidth:o,borderRadiusLG:i,borderRadiusSM:s,paddingInlineLG:l,paddingInlineSM:c,paddingBlockLG:u,paddingBlockSM:d,motionDurationMid:g}=e;return{[`${t}-affix-wrapper`]:Object.assign(Object.assign({[`input${t}-input`]:{padding:`${fe(n)} 0`}},mp(e)),{position:"relative",display:"inline-flex",alignItems:"center",width:o,padding:0,paddingInlineStart:r,"&-lg":{borderRadius:i,paddingInlineStart:l,[`input${t}-input`]:{padding:`${fe(u)} 0`}},"&-sm":{borderRadius:s,paddingInlineStart:c,[`input${t}-input`]:{padding:`${fe(d)} 0`}},[`&:not(${t}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${t}-disabled`]:{background:"transparent"},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:a},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:r,marginInlineStart:a,transition:`margin ${g}`}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&:not(${t}-affix-wrapper-without-controls):hover ${t}-suffix`]:{marginInlineEnd:e.calc(e.handleWidth).add(r).equal()}}),[`${t}-underlined`]:{borderRadius:0}}},oC=rr("InputNumber",e=>{const t=Hn(e,dp(e));return[rC(t),aC(t),wp(t)]},nC,{unitless:{handleOpacity:!0},resetFont:!1});var iC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const Ag=f.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=f.useContext(cn),a=f.useRef(null);f.useImperativeHandle(t,()=>a.current);const{className:o,rootClassName:i,size:s,disabled:l,prefixCls:c,addonBefore:u,addonAfter:d,prefix:g,suffix:h,bordered:v,readOnly:m,status:p,controls:b,variant:y}=e,x=iC(e,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),w=n("input-number",c),C=ia(w),[S,E,k]=oC(w,C),{compactSize:$,compactItemClassnames:O}=ss(w,r);let D=f.createElement(H1,{className:`${w}-handler-up-inner`}),P=f.createElement(fy,{className:`${w}-handler-down-inner`});const R=typeof b=="boolean"?b:void 0;typeof b=="object"&&(D=typeof b.upIcon>"u"?D:f.createElement("span",{className:`${w}-handler-up-inner`},b.upIcon),P=typeof b.downIcon>"u"?P:f.createElement("span",{className:`${w}-handler-down-inner`},b.downIcon));const{hasFeedback:N,status:I,isFormItemInput:M,feedbackIcon:F}=f.useContext(Po),j=eu(I,p),A=is(U=>{var Z;return(Z=s??$)!==null&&Z!==void 0?Z:U}),_=f.useContext(Fa),L=l??_,[z,T]=Zc("inputNumber",y,v),H=N&&f.createElement(f.Fragment,null,F),W=pe({[`${w}-lg`]:A==="large",[`${w}-sm`]:A==="small",[`${w}-rtl`]:r==="rtl",[`${w}-in-form-item`]:M},E),K=`${w}-group`,G=f.createElement(tC,Object.assign({ref:a,disabled:L,className:pe(k,C,o,i,O),upHandler:D,downHandler:P,prefixCls:w,readOnly:m,controls:R,prefix:g,suffix:H||h,addonBefore:u&&f.createElement(vo,{form:!0,space:!0},u),addonAfter:d&&f.createElement(vo,{form:!0,space:!0},d),classNames:{input:W,variant:pe({[`${w}-${z}`]:T},Ri(w,j,N)),affixWrapper:pe({[`${w}-affix-wrapper-sm`]:A==="small",[`${w}-affix-wrapper-lg`]:A==="large",[`${w}-affix-wrapper-rtl`]:r==="rtl",[`${w}-affix-wrapper-without-controls`]:b===!1||L||m},E),wrapper:pe({[`${K}-rtl`]:r==="rtl"},E),groupWrapper:pe({[`${w}-group-wrapper-sm`]:A==="small",[`${w}-group-wrapper-lg`]:A==="large",[`${w}-group-wrapper-rtl`]:r==="rtl",[`${w}-group-wrapper-${z}`]:T},Ri(`${w}-group-wrapper`,j,N),E)}},x));return S(G)}),zl=Ag,sC=e=>f.createElement(ls,{theme:{components:{InputNumber:{handleVisible:!0}}}},f.createElement(Ag,Object.assign({},e)));zl._InternalPanelDoNotUseOrYouWillBeFired=sC;function Hl(e,t,n){return(e-t)/(n-t)}function Su(e,t,n,r){var a=Hl(t,n,r),o={};switch(e){case"rtl":o.right="".concat(a*100,"%"),o.transform="translateX(50%)";break;case"btt":o.bottom="".concat(a*100,"%"),o.transform="translateY(50%)";break;case"ttb":o.top="".concat(a*100,"%"),o.transform="translateY(-50%)";break;default:o.left="".concat(a*100,"%"),o.transform="translateX(-50%)";break}return o}function Lr(e,t){return Array.isArray(e)?e[t]:e}var da=f.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),lC=f.createContext({}),cC=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],Td=f.forwardRef(function(e,t){var n=e.prefixCls,r=e.value,a=e.valueIndex,o=e.onStartMove,i=e.onDelete,s=e.style,l=e.render,c=e.dragging,u=e.draggingDelete,d=e.onOffsetChange,g=e.onChangeComplete,h=e.onFocus,v=e.onMouseEnter,m=Nt(e,cC),p=f.useContext(da),b=p.min,y=p.max,x=p.direction,w=p.disabled,C=p.keyboard,S=p.range,E=p.tabIndex,k=p.ariaLabelForHandle,$=p.ariaLabelledByForHandle,O=p.ariaRequired,D=p.ariaValueTextFormatterForHandle,P=p.styles,R=p.classNames,N="".concat(n,"-handle"),I=function(W){w||o(W,a)},M=function(W){h==null||h(W,a)},F=function(W){v(W,a)},j=function(W){if(!w&&C){var K=null;switch(W.which||W.keyCode){case Et.LEFT:K=x==="ltr"||x==="btt"?-1:1;break;case Et.RIGHT:K=x==="ltr"||x==="btt"?1:-1;break;case Et.UP:K=x!=="ttb"?1:-1;break;case Et.DOWN:K=x!=="ttb"?-1:1;break;case Et.HOME:K="min";break;case Et.END:K="max";break;case Et.PAGE_UP:K=2;break;case Et.PAGE_DOWN:K=-2;break;case Et.BACKSPACE:case Et.DELETE:i(a);break}K!==null&&(W.preventDefault(),d(K,a))}},A=function(W){switch(W.which||W.keyCode){case Et.LEFT:case Et.RIGHT:case Et.UP:case Et.DOWN:case Et.HOME:case Et.END:case Et.PAGE_UP:case Et.PAGE_DOWN:g==null||g();break}},_=Su(x,r,b,y),L={};if(a!==null){var z;L={tabIndex:w?null:Lr(E,a),role:"slider","aria-valuemin":b,"aria-valuemax":y,"aria-valuenow":r,"aria-disabled":w,"aria-label":Lr(k,a),"aria-labelledby":Lr($,a),"aria-required":Lr(O,a),"aria-valuetext":(z=Lr(D,a))===null||z===void 0?void 0:z(r),"aria-orientation":x==="ltr"||x==="rtl"?"horizontal":"vertical",onMouseDown:I,onTouchStart:I,onFocus:M,onMouseEnter:F,onKeyDown:j,onKeyUp:A}}var T=f.createElement("div",Oe({ref:t,className:pe(N,J(J(J({},"".concat(N,"-").concat(a+1),a!==null&&S),"".concat(N,"-dragging"),c),"".concat(N,"-dragging-delete"),u),R.handle),style:ye(ye(ye({},_),s),P.handle)},L,m));return l&&(T=l(T,{index:a,prefixCls:n,value:r,dragging:c,draggingDelete:u})),T}),uC=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],dC=f.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,a=e.onStartMove,o=e.onOffsetChange,i=e.values,s=e.handleRender,l=e.activeHandleRender,c=e.draggingIndex,u=e.draggingDelete,d=e.onFocus,g=Nt(e,uC),h=f.useRef({}),v=f.useState(!1),m=oe(v,2),p=m[0],b=m[1],y=f.useState(-1),x=oe(y,2),w=x[0],C=x[1],S=function(D){C(D),b(!0)},E=function(D,P){S(P),d==null||d(D)},k=function(D,P){S(P)};f.useImperativeHandle(t,function(){return{focus:function(D){var P;(P=h.current[D])===null||P===void 0||P.focus()},hideHelp:function(){ji(function(){b(!1)})}}});var $=ye({prefixCls:n,onStartMove:a,onOffsetChange:o,render:s,onFocus:E,onMouseEnter:k},g);return f.createElement(f.Fragment,null,i.map(function(O,D){var P=c===D;return f.createElement(Td,Oe({ref:function(N){N?h.current[D]=N:delete h.current[D]},dragging:P,draggingDelete:P&&u,style:Lr(r,D),key:D,value:O,valueIndex:D},$))}),l&&p&&f.createElement(Td,Oe({key:"a11y"},$,{value:i[w],valueIndex:null,dragging:c!==-1,draggingDelete:u,render:l,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))}),fC=function(t){var n=t.prefixCls,r=t.style,a=t.children,o=t.value,i=t.onClick,s=f.useContext(da),l=s.min,c=s.max,u=s.direction,d=s.includedStart,g=s.includedEnd,h=s.included,v="".concat(n,"-text"),m=Su(u,o,l,c);return f.createElement("span",{className:pe(v,J({},"".concat(v,"-active"),h&&d<=o&&o<=g)),style:ye(ye({},m),r),onMouseDown:function(b){b.stopPropagation()},onClick:function(){i(o)}},a)},mC=function(t){var n=t.prefixCls,r=t.marks,a=t.onClick,o="".concat(n,"-mark");return r.length?f.createElement("div",{className:o},r.map(function(i){var s=i.value,l=i.style,c=i.label;return f.createElement(fC,{key:s,prefixCls:o,style:l,value:s,onClick:a},c)})):null},pC=function(t){var n=t.prefixCls,r=t.value,a=t.style,o=t.activeStyle,i=f.useContext(da),s=i.min,l=i.max,c=i.direction,u=i.included,d=i.includedStart,g=i.includedEnd,h="".concat(n,"-dot"),v=u&&d<=r&&r<=g,m=ye(ye({},Su(c,r,s,l)),typeof a=="function"?a(r):a);return v&&(m=ye(ye({},m),typeof o=="function"?o(r):o)),f.createElement("span",{className:pe(h,J({},"".concat(h,"-active"),v)),style:m})},gC=function(t){var n=t.prefixCls,r=t.marks,a=t.dots,o=t.style,i=t.activeStyle,s=f.useContext(da),l=s.min,c=s.max,u=s.step,d=f.useMemo(function(){var g=new Set;if(r.forEach(function(v){g.add(v.value)}),a&&u!==null)for(var h=l;h<=c;)g.add(h),h+=u;return Array.from(g)},[l,c,u,a,r]);return f.createElement("div",{className:"".concat(n,"-step")},d.map(function(g){return f.createElement(pC,{prefixCls:n,key:g,value:g,style:o,activeStyle:i})}))},_d=function(t){var n=t.prefixCls,r=t.style,a=t.start,o=t.end,i=t.index,s=t.onStartMove,l=t.replaceCls,c=f.useContext(da),u=c.direction,d=c.min,g=c.max,h=c.disabled,v=c.range,m=c.classNames,p="".concat(n,"-track"),b=Hl(a,d,g),y=Hl(o,d,g),x=function(E){!h&&s&&s(E,-1)},w={};switch(u){case"rtl":w.right="".concat(b*100,"%"),w.width="".concat(y*100-b*100,"%");break;case"btt":w.bottom="".concat(b*100,"%"),w.height="".concat(y*100-b*100,"%");break;case"ttb":w.top="".concat(b*100,"%"),w.height="".concat(y*100-b*100,"%");break;default:w.left="".concat(b*100,"%"),w.width="".concat(y*100-b*100,"%")}var C=l||pe(p,J(J({},"".concat(p,"-").concat(i+1),i!==null&&v),"".concat(n,"-track-draggable"),s),m.track);return f.createElement("div",{className:C,style:ye(ye({},w),r),onMouseDown:x,onTouchStart:x})},vC=function(t){var n=t.prefixCls,r=t.style,a=t.values,o=t.startPoint,i=t.onStartMove,s=f.useContext(da),l=s.included,c=s.range,u=s.min,d=s.styles,g=s.classNames,h=f.useMemo(function(){if(!c){if(a.length===0)return[];var m=o??u,p=a[0];return[{start:Math.min(m,p),end:Math.max(m,p)}]}for(var b=[],y=0;y<a.length-1;y+=1)b.push({start:a[y],end:a[y+1]});return b},[a,c,o,u]);if(!l)return null;var v=h!=null&&h.length&&(g.tracks||d.tracks)?f.createElement(_d,{index:null,prefixCls:n,start:h[0].start,end:h[h.length-1].end,replaceCls:pe(g.tracks,"".concat(n,"-tracks")),style:d.tracks}):null;return f.createElement(f.Fragment,null,v,h.map(function(m,p){var b=m.start,y=m.end;return f.createElement(_d,{index:p,prefixCls:n,style:ye(ye({},Lr(r,p)),d.track),start:b,end:y,key:p,onStartMove:i})}))},hC=130;function Bd(e){var t="targetTouches"in e?e.targetTouches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function yC(e,t,n,r,a,o,i,s,l,c,u){var d=f.useState(null),g=oe(d,2),h=g[0],v=g[1],m=f.useState(-1),p=oe(m,2),b=p[0],y=p[1],x=f.useState(!1),w=oe(x,2),C=w[0],S=w[1],E=f.useState(n),k=oe(E,2),$=k[0],O=k[1],D=f.useState(n),P=oe(D,2),R=P[0],N=P[1],I=f.useRef(null),M=f.useRef(null),F=f.useRef(null),j=f.useContext(lC),A=j.onDragStart,_=j.onDragChange;Rn(function(){b===-1&&O(n)},[n,b]),f.useEffect(function(){return function(){document.removeEventListener("mousemove",I.current),document.removeEventListener("mouseup",M.current),F.current&&(F.current.removeEventListener("touchmove",I.current),F.current.removeEventListener("touchend",M.current))}},[]);var L=function(K,G,U){G!==void 0&&v(G),O(K);var Z=K;U&&(Z=K.filter(function(Q,Y){return Y!==b})),i(Z),_&&_({rawValues:K,deleteIndex:U?b:-1,draggingIndex:b,draggingValue:G})},z=Ut(function(W,K,G){if(W===-1){var U=R[0],Z=R[R.length-1],Q=r-U,Y=a-Z,ee=K*(a-r);ee=Math.max(ee,Q),ee=Math.min(ee,Y);var ce=o(U+ee);ee=ce-U;var me=R.map(function(Ee){return Ee+ee});L(me)}else{var we=(a-r)*K,se=rt($);se[W]=R[W];var ge=l(se,we,W,"dist");L(ge.values,ge.value,G)}}),T=function(K,G,U){K.stopPropagation();var Z=U||n,Q=Z[G];y(G),v(Q),N(Z),O(Z),S(!1);var Y=Bd(K),ee=Y.pageX,ce=Y.pageY,me=!1;A&&A({rawValues:Z,draggingIndex:G,draggingValue:Q});var we=function(Ee){Ee.preventDefault();var Te=Bd(Ee),Pe=Te.pageX,he=Te.pageY,ke=Pe-ee,de=he-ce,Re=e.current.getBoundingClientRect(),He=Re.width,Ke=Re.height,tt,qe;switch(t){case"btt":tt=-de/Ke,qe=ke;break;case"ttb":tt=de/Ke,qe=ke;break;case"rtl":tt=-ke/He,qe=de;break;default:tt=ke/He,qe=de}me=c?Math.abs(qe)>hC&&u<$.length:!1,S(me),z(G,tt,me)},se=function ge(Ee){Ee.preventDefault(),document.removeEventListener("mouseup",ge),document.removeEventListener("mousemove",we),F.current&&(F.current.removeEventListener("touchmove",I.current),F.current.removeEventListener("touchend",M.current)),I.current=null,M.current=null,F.current=null,s(me),y(-1),S(!1)};document.addEventListener("mouseup",se),document.addEventListener("mousemove",we),K.currentTarget.addEventListener("touchend",se),K.currentTarget.addEventListener("touchmove",we),I.current=we,M.current=se,F.current=K.currentTarget},H=f.useMemo(function(){var W=rt(n).sort(function(Q,Y){return Q-Y}),K=rt($).sort(function(Q,Y){return Q-Y}),G={};K.forEach(function(Q){G[Q]=(G[Q]||0)+1}),W.forEach(function(Q){G[Q]=(G[Q]||0)-1});var U=c?1:0,Z=Object.values(G).reduce(function(Q,Y){return Q+Math.abs(Y)},0);return Z<=U?$:n},[n,$,c]);return[b,h,C,H,T]}function bC(e,t,n,r,a,o){var i=f.useCallback(function(h){return Math.max(e,Math.min(t,h))},[e,t]),s=f.useCallback(function(h){if(n!==null){var v=e+Math.round((i(h)-e)/n)*n,m=function(x){return(String(x).split(".")[1]||"").length},p=Math.max(m(n),m(t),m(e)),b=Number(v.toFixed(p));return e<=b&&b<=t?b:null}return null},[n,e,t,i]),l=f.useCallback(function(h){var v=i(h),m=r.map(function(y){return y.value});n!==null&&m.push(s(h)),m.push(e,t);var p=m[0],b=t-e;return m.forEach(function(y){var x=Math.abs(v-y);x<=b&&(p=y,b=x)}),p},[e,t,r,n,i,s]),c=function h(v,m,p){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof m=="number"){var y,x=v[p],w=x+m,C=[];r.forEach(function(O){C.push(O.value)}),C.push(e,t),C.push(s(x));var S=m>0?1:-1;b==="unit"?C.push(s(x+S*n)):C.push(s(w)),C=C.filter(function(O){return O!==null}).filter(function(O){return m<0?O<=x:O>=x}),b==="unit"&&(C=C.filter(function(O){return O!==x}));var E=b==="unit"?x:w;y=C[0];var k=Math.abs(y-E);if(C.forEach(function(O){var D=Math.abs(O-E);D<k&&(y=O,k=D)}),y===void 0)return m<0?e:t;if(b==="dist")return y;if(Math.abs(m)>1){var $=rt(v);return $[p]=y,h($,m-S,p,b)}return y}else{if(m==="min")return e;if(m==="max")return t}},u=function(v,m,p){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",y=v[p],x=c(v,m,p,b);return{value:x,changed:x!==y}},d=function(v){return o===null&&v===0||typeof o=="number"&&v<o},g=function(v,m,p){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",y=v.map(l),x=y[p],w=c(y,m,p,b);if(y[p]=w,a===!1){var C=o||0;p>0&&y[p-1]!==x&&(y[p]=Math.max(y[p],y[p-1]+C)),p<y.length-1&&y[p+1]!==x&&(y[p]=Math.min(y[p],y[p+1]-C))}else if(typeof o=="number"||o===null){for(var S=p+1;S<y.length;S+=1)for(var E=!0;d(y[S]-y[S-1])&&E;){var k=u(y,1,S);y[S]=k.value,E=k.changed}for(var $=p;$>0;$-=1)for(var O=!0;d(y[$]-y[$-1])&&O;){var D=u(y,-1,$-1);y[$-1]=D.value,O=D.changed}for(var P=y.length-1;P>0;P-=1)for(var R=!0;d(y[P]-y[P-1])&&R;){var N=u(y,-1,P-1);y[P-1]=N.value,R=N.changed}for(var I=0;I<y.length-1;I+=1)for(var M=!0;d(y[I+1]-y[I])&&M;){var F=u(y,1,I+1);y[I+1]=F.value,M=F.changed}}return{value:y[p],values:y}};return[l,g]}function xC(e){return Lt(function(){if(e===!0||!e)return[!!e,!1,!1,0];var t=e.editable,n=e.draggableTrack,r=e.minCount,a=e.maxCount;return[!0,t,!t&&n,r||0,a]},[e])}var CC=f.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-slider":n,a=e.className,o=e.style,i=e.classNames,s=e.styles,l=e.id,c=e.disabled,u=c===void 0?!1:c,d=e.keyboard,g=d===void 0?!0:d,h=e.autoFocus,v=e.onFocus,m=e.onBlur,p=e.min,b=p===void 0?0:p,y=e.max,x=y===void 0?100:y,w=e.step,C=w===void 0?1:w,S=e.value,E=e.defaultValue,k=e.range,$=e.count,O=e.onChange,D=e.onBeforeChange,P=e.onAfterChange,R=e.onChangeComplete,N=e.allowCross,I=N===void 0?!0:N,M=e.pushable,F=M===void 0?!1:M,j=e.reverse,A=e.vertical,_=e.included,L=_===void 0?!0:_,z=e.startPoint,T=e.trackStyle,H=e.handleStyle,W=e.railStyle,K=e.dotStyle,G=e.activeDotStyle,U=e.marks,Z=e.dots,Q=e.handleRender,Y=e.activeHandleRender,ee=e.track,ce=e.tabIndex,me=ce===void 0?0:ce,we=e.ariaLabelForHandle,se=e.ariaLabelledByForHandle,ge=e.ariaRequired,Ee=e.ariaValueTextFormatterForHandle,Te=f.useRef(null),Pe=f.useRef(null),he=f.useMemo(function(){return A?j?"ttb":"btt":j?"rtl":"ltr"},[j,A]),ke=xC(k),de=oe(ke,5),Re=de[0],He=de[1],Ke=de[2],tt=de[3],qe=de[4],We=f.useMemo(function(){return isFinite(b)?b:0},[b]),lt=f.useMemo(function(){return isFinite(x)?x:100},[x]),Fe=f.useMemo(function(){return C!==null&&C<=0?1:C},[C]),ae=f.useMemo(function(){return typeof F=="boolean"?F?Fe:!1:F>=0?F:!1},[F,Fe]),Le=f.useMemo(function(){return Object.keys(U||{}).map(function(je){var De=U[je],Me={value:Number(je)};return De&&mn(De)==="object"&&!f.isValidElement(De)&&("label"in De||"style"in De)?(Me.style=De.style,Me.label=De.label):Me.label=De,Me}).filter(function(je){var De=je.label;return De||typeof De=="number"}).sort(function(je,De){return je.value-De.value})},[U]),Ce=bC(We,lt,Fe,Le,I,ae),$e=oe(Ce,2),ue=$e[0],ie=$e[1],xe=an(E,{value:S}),_e=oe(xe,2),ze=_e[0],st=_e[1],Ne=f.useMemo(function(){var je=ze==null?[]:Array.isArray(ze)?ze:[ze],De=oe(je,1),Me=De[0],Be=Me===void 0?We:Me,et=ze===null?[]:[Be];if(Re){if(et=rt(je),$||ze===void 0){var yt=$>=0?$+1:2;for(et=et.slice(0,yt);et.length<yt;){var vt;et.push((vt=et[et.length-1])!==null&&vt!==void 0?vt:We)}}et.sort(function(_t,jt){return _t-jt})}return et.forEach(function(_t,jt){et[jt]=ue(_t)}),et},[ze,Re,We,$,ue]),Ie=function(De){return Re?De:De[0]},Ue=Ut(function(je){var De=rt(je).sort(function(Me,Be){return Me-Be});O&&!au(De,Ne,!0)&&O(Ie(De)),st(De)}),Ye=Ut(function(je){je&&Te.current.hideHelp();var De=Ie(Ne);P==null||P(De),In(!P,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),R==null||R(De)}),bt=function(De){if(!(u||!He||Ne.length<=tt)){var Me=rt(Ne);Me.splice(De,1),D==null||D(Ie(Me)),Ue(Me);var Be=Math.max(0,De-1);Te.current.hideHelp(),Te.current.focus(Be)}},At=yC(Pe,he,Ne,We,lt,ue,Ue,Ye,ie,He,tt),Ht=oe(At,5),Ft=Ht[0],Yt=Ht[1],Tt=Ht[2],tn=Ht[3],un=Ht[4],Pt=function(De,Me){if(!u){var Be=rt(Ne),et=0,yt=0,vt=lt-We;Ne.forEach(function(Mn,Gn){var xr=Math.abs(De-Mn);xr<=vt&&(vt=xr,et=Gn),Mn<De&&(yt=Gn)});var _t=et;He&&vt!==0&&(!qe||Ne.length<qe)?(Be.splice(yt+1,0,De),_t=yt+1):Be[et]=De,Re&&!Ne.length&&$===void 0&&Be.push(De);var jt=Ie(Be);if(D==null||D(jt),Ue(Be),Me){var nn,Dn;(nn=document.activeElement)===null||nn===void 0||(Dn=nn.blur)===null||Dn===void 0||Dn.call(nn),Te.current.focus(_t),un(Me,_t,Be)}else P==null||P(jt),In(!P,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),R==null||R(jt)}},Tn=function(De){De.preventDefault();var Me=Pe.current.getBoundingClientRect(),Be=Me.width,et=Me.height,yt=Me.left,vt=Me.top,_t=Me.bottom,jt=Me.right,nn=De.clientX,Dn=De.clientY,Mn;switch(he){case"btt":Mn=(_t-Dn)/et;break;case"ttb":Mn=(Dn-vt)/et;break;case"rtl":Mn=(jt-nn)/Be;break;default:Mn=(nn-yt)/Be}var Gn=We+Mn*(lt-We);Pt(ue(Gn),De)},q=f.useState(null),V=oe(q,2),ne=V[0],le=V[1],Se=function(De,Me){if(!u){var Be=ie(Ne,De,Me);D==null||D(Ie(Ne)),Ue(Be.values),le(Be.value)}};f.useEffect(function(){if(ne!==null){var je=Ne.indexOf(ne);je>=0&&Te.current.focus(je)}le(null)},[ne]);var Ae=f.useMemo(function(){return Ke&&Fe===null?!1:Ke},[Ke,Fe]),ct=Ut(function(je,De){un(je,De),D==null||D(Ie(Ne))}),Qe=Ft!==-1;f.useEffect(function(){if(!Qe){var je=Ne.lastIndexOf(Yt);Te.current.focus(je)}},[Qe]);var it=f.useMemo(function(){return rt(tn).sort(function(je,De){return je-De})},[tn]),gt=f.useMemo(function(){return Re?[it[0],it[it.length-1]]:[We,it[0]]},[it,Re,We]),Ve=oe(gt,2),ht=Ve[0],Ze=Ve[1];f.useImperativeHandle(t,function(){return{focus:function(){Te.current.focus(0)},blur:function(){var De,Me=document,Be=Me.activeElement;(De=Pe.current)!==null&&De!==void 0&&De.contains(Be)&&(Be==null||Be.blur())}}}),f.useEffect(function(){h&&Te.current.focus(0)},[]);var kt=f.useMemo(function(){return{min:We,max:lt,direction:he,disabled:u,keyboard:g,step:Fe,included:L,includedStart:ht,includedEnd:Ze,range:Re,tabIndex:me,ariaLabelForHandle:we,ariaLabelledByForHandle:se,ariaRequired:ge,ariaValueTextFormatterForHandle:Ee,styles:s||{},classNames:i||{}}},[We,lt,he,u,g,Fe,L,ht,Ze,Re,me,we,se,ge,Ee,s,i]);return f.createElement(da.Provider,{value:kt},f.createElement("div",{ref:Pe,className:pe(r,a,J(J(J(J({},"".concat(r,"-disabled"),u),"".concat(r,"-vertical"),A),"".concat(r,"-horizontal"),!A),"".concat(r,"-with-marks"),Le.length)),style:o,onMouseDown:Tn,id:l},f.createElement("div",{className:pe("".concat(r,"-rail"),i==null?void 0:i.rail),style:ye(ye({},W),s==null?void 0:s.rail)}),ee!==!1&&f.createElement(vC,{prefixCls:r,style:T,values:Ne,startPoint:z,onStartMove:Ae?ct:void 0}),f.createElement(gC,{prefixCls:r,marks:Le,dots:Z,style:K,activeStyle:G}),f.createElement(dC,{ref:Te,prefixCls:r,style:H,values:tn,draggingIndex:Ft,draggingDelete:Tt,onStartMove:ct,onOffsetChange:Se,onFocus:v,onBlur:m,handleRender:Q,activeHandleRender:Y,onChangeComplete:Ye,onDelete:He?bt:void 0}),f.createElement(mC,{prefixCls:r,marks:Le,onClick:Pt})))});const wC=ra({}),Ld=f.forwardRef((e,t)=>{const{open:n,draggingDelete:r,value:a}=e,o=wt(null),i=n&&!r,s=wt(null);function l(){zt.cancel(s.current),s.current=null}function c(){s.current=zt(()=>{var u;(u=o.current)===null||u===void 0||u.forceAlign(),s.current=null})}return f.useEffect(()=>(i?c():l(),l),[i,e.title,a]),f.createElement(Ro,Object.assign({ref:Mo(o,t)},e,{open:i}))}),SC=e=>{const{componentCls:t,antCls:n,controlSize:r,dotSize:a,marginFull:o,marginPart:i,colorFillContentHover:s,handleColorDisabled:l,calc:c,handleSize:u,handleSizeHover:d,handleActiveColor:g,handleActiveOutlineColor:h,handleLineWidth:v,handleLineWidthHover:m,motionDurationMid:p}=e;return{[t]:Object.assign(Object.assign({},pn(e)),{position:"relative",height:r,margin:`${fe(i)} ${fe(o)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${fe(o)} ${fe(i)}`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${p}`},[`${t}-track,${t}-tracks`]:{position:"absolute",transition:`background-color ${p}`},[`${t}-track`]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},[`${t}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${t}-rail`]:{backgroundColor:e.railHoverBg},[`${t}-track`]:{backgroundColor:e.trackHoverBg},[`${t}-dot`]:{borderColor:s},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${fe(v)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-handle`]:{position:"absolute",width:u,height:u,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:c(v).mul(-1).equal(),insetBlockStart:c(v).mul(-1).equal(),width:c(u).add(c(v).mul(2)).equal(),height:c(u).add(c(v).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${fe(v)} ${e.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:`
|
|
65
|
+
`]:{color:S}})}]},iC=e=>{const{componentCls:t,paddingBlock:n,paddingInline:r,inputAffixPadding:a,controlWidth:o,borderRadiusLG:i,borderRadiusSM:l,paddingInlineLG:s,paddingInlineSM:c,paddingBlockLG:u,paddingBlockSM:d,motionDurationMid:g}=e;return{[`${t}-affix-wrapper`]:Object.assign(Object.assign({[`input${t}-input`]:{padding:`${fe(n)} 0`}},pp(e)),{position:"relative",display:"inline-flex",alignItems:"center",width:o,padding:0,paddingInlineStart:r,"&-lg":{borderRadius:i,paddingInlineStart:s,[`input${t}-input`]:{padding:`${fe(u)} 0`}},"&-sm":{borderRadius:l,paddingInlineStart:c,[`input${t}-input`]:{padding:`${fe(d)} 0`}},[`&:not(${t}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${t}-disabled`]:{background:"transparent"},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:a},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:r,marginInlineStart:a,transition:`margin ${g}`}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&:not(${t}-affix-wrapper-without-controls):hover ${t}-suffix`]:{marginInlineEnd:e.calc(e.handleWidth).add(r).equal()}}),[`${t}-underlined`]:{borderRadius:0}}},lC=ar("InputNumber",e=>{const t=Vn(e,fp(e));return[oC(t),iC(t),Sp(t)]},aC,{unitless:{handleOpacity:!0},resetFont:!1});var sC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const jg=f.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=f.useContext(un),a=f.useRef(null);f.useImperativeHandle(t,()=>a.current);const{className:o,rootClassName:i,size:l,disabled:s,prefixCls:c,addonBefore:u,addonAfter:d,prefix:g,suffix:h,bordered:v,readOnly:m,status:p,controls:b,variant:y}=e,x=sC(e,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),w=n("input-number",c),C=la(w),[S,E,k]=lC(w,C),{compactSize:$,compactItemClassnames:O}=sl(w,r);let D=f.createElement(Kx,{className:`${w}-handler-up-inner`}),P=f.createElement(py,{className:`${w}-handler-down-inner`});const A=typeof b=="boolean"?b:void 0;typeof b=="object"&&(D=typeof b.upIcon>"u"?D:f.createElement("span",{className:`${w}-handler-up-inner`},b.upIcon),P=typeof b.downIcon>"u"?P:f.createElement("span",{className:`${w}-handler-down-inner`},b.downIcon));const{hasFeedback:N,status:I,isFormItemInput:M,feedbackIcon:F}=f.useContext(Ro),R=tu(I,p),T=ll(U=>{var Z;return(Z=l??$)!==null&&Z!==void 0?Z:U}),_=f.useContext(Pa),B=s??_,[L,j]=eu("inputNumber",y,v),z=N&&f.createElement(f.Fragment,null,F),K=pe({[`${w}-lg`]:T==="large",[`${w}-sm`]:T==="small",[`${w}-rtl`]:r==="rtl",[`${w}-in-form-item`]:M},E),V=`${w}-group`,G=f.createElement(rC,Object.assign({ref:a,disabled:B,className:pe(k,C,o,i,O),upHandler:D,downHandler:P,prefixCls:w,readOnly:m,controls:A,prefix:g,suffix:z||h,addonBefore:u&&f.createElement(ho,{form:!0,space:!0},u),addonAfter:d&&f.createElement(ho,{form:!0,space:!0},d),classNames:{input:K,variant:pe({[`${w}-${L}`]:j},Ti(w,R,N)),affixWrapper:pe({[`${w}-affix-wrapper-sm`]:T==="small",[`${w}-affix-wrapper-lg`]:T==="large",[`${w}-affix-wrapper-rtl`]:r==="rtl",[`${w}-affix-wrapper-without-controls`]:b===!1||B||m},E),wrapper:pe({[`${V}-rtl`]:r==="rtl"},E),groupWrapper:pe({[`${w}-group-wrapper-sm`]:T==="small",[`${w}-group-wrapper-lg`]:T==="large",[`${w}-group-wrapper-rtl`]:r==="rtl",[`${w}-group-wrapper-${L}`]:j},Ti(`${w}-group-wrapper`,R,N),E)}},x));return S(G)}),Hs=jg,cC=e=>f.createElement(cl,{theme:{components:{InputNumber:{handleVisible:!0}}}},f.createElement(jg,Object.assign({},e)));Hs._InternalPanelDoNotUseOrYouWillBeFired=cC;function Vs(e,t,n){return(e-t)/(n-t)}function $u(e,t,n,r){var a=Vs(t,n,r),o={};switch(e){case"rtl":o.right="".concat(a*100,"%"),o.transform="translateX(50%)";break;case"btt":o.bottom="".concat(a*100,"%"),o.transform="translateY(50%)";break;case"ttb":o.top="".concat(a*100,"%"),o.transform="translateY(-50%)";break;default:o.left="".concat(a*100,"%"),o.transform="translateX(-50%)";break}return o}function zr(e,t){return Array.isArray(e)?e[t]:e}var fa=f.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),uC=f.createContext({}),dC=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],_d=f.forwardRef(function(e,t){var n=e.prefixCls,r=e.value,a=e.valueIndex,o=e.onStartMove,i=e.onDelete,l=e.style,s=e.render,c=e.dragging,u=e.draggingDelete,d=e.onOffsetChange,g=e.onChangeComplete,h=e.onFocus,v=e.onMouseEnter,m=Dt(e,dC),p=f.useContext(fa),b=p.min,y=p.max,x=p.direction,w=p.disabled,C=p.keyboard,S=p.range,E=p.tabIndex,k=p.ariaLabelForHandle,$=p.ariaLabelledByForHandle,O=p.ariaRequired,D=p.ariaValueTextFormatterForHandle,P=p.styles,A=p.classNames,N="".concat(n,"-handle"),I=function(K){w||o(K,a)},M=function(K){h==null||h(K,a)},F=function(K){v(K,a)},R=function(K){if(!w&&C){var V=null;switch(K.which||K.keyCode){case kt.LEFT:V=x==="ltr"||x==="btt"?-1:1;break;case kt.RIGHT:V=x==="ltr"||x==="btt"?1:-1;break;case kt.UP:V=x!=="ttb"?1:-1;break;case kt.DOWN:V=x!=="ttb"?-1:1;break;case kt.HOME:V="min";break;case kt.END:V="max";break;case kt.PAGE_UP:V=2;break;case kt.PAGE_DOWN:V=-2;break;case kt.BACKSPACE:case kt.DELETE:i(a);break}V!==null&&(K.preventDefault(),d(V,a))}},T=function(K){switch(K.which||K.keyCode){case kt.LEFT:case kt.RIGHT:case kt.UP:case kt.DOWN:case kt.HOME:case kt.END:case kt.PAGE_UP:case kt.PAGE_DOWN:g==null||g();break}},_=$u(x,r,b,y),B={};if(a!==null){var L;B={tabIndex:w?null:zr(E,a),role:"slider","aria-valuemin":b,"aria-valuemax":y,"aria-valuenow":r,"aria-disabled":w,"aria-label":zr(k,a),"aria-labelledby":zr($,a),"aria-required":zr(O,a),"aria-valuetext":(L=zr(D,a))===null||L===void 0?void 0:L(r),"aria-orientation":x==="ltr"||x==="rtl"?"horizontal":"vertical",onMouseDown:I,onTouchStart:I,onFocus:M,onMouseEnter:F,onKeyDown:R,onKeyUp:T}}var j=f.createElement("div",Oe({ref:t,className:pe(N,J(J(J({},"".concat(N,"-").concat(a+1),a!==null&&S),"".concat(N,"-dragging"),c),"".concat(N,"-dragging-delete"),u),A.handle),style:ye(ye(ye({},_),l),P.handle)},B,m));return s&&(j=s(j,{index:a,prefixCls:n,value:r,dragging:c,draggingDelete:u})),j}),fC=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],mC=f.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,a=e.onStartMove,o=e.onOffsetChange,i=e.values,l=e.handleRender,s=e.activeHandleRender,c=e.draggingIndex,u=e.draggingDelete,d=e.onFocus,g=Dt(e,fC),h=f.useRef({}),v=f.useState(!1),m=oe(v,2),p=m[0],b=m[1],y=f.useState(-1),x=oe(y,2),w=x[0],C=x[1],S=function(D){C(D),b(!0)},E=function(D,P){S(P),d==null||d(D)},k=function(D,P){S(P)};f.useImperativeHandle(t,function(){return{focus:function(D){var P;(P=h.current[D])===null||P===void 0||P.focus()},hideHelp:function(){Ai(function(){b(!1)})}}});var $=ye({prefixCls:n,onStartMove:a,onOffsetChange:o,render:l,onFocus:E,onMouseEnter:k},g);return f.createElement(f.Fragment,null,i.map(function(O,D){var P=c===D;return f.createElement(_d,Oe({ref:function(N){N?h.current[D]=N:delete h.current[D]},dragging:P,draggingDelete:P&&u,style:zr(r,D),key:D,value:O,valueIndex:D},$))}),s&&p&&f.createElement(_d,Oe({key:"a11y"},$,{value:i[w],valueIndex:null,dragging:c!==-1,draggingDelete:u,render:s,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))}),pC=function(t){var n=t.prefixCls,r=t.style,a=t.children,o=t.value,i=t.onClick,l=f.useContext(fa),s=l.min,c=l.max,u=l.direction,d=l.includedStart,g=l.includedEnd,h=l.included,v="".concat(n,"-text"),m=$u(u,o,s,c);return f.createElement("span",{className:pe(v,J({},"".concat(v,"-active"),h&&d<=o&&o<=g)),style:ye(ye({},m),r),onMouseDown:function(b){b.stopPropagation()},onClick:function(){i(o)}},a)},gC=function(t){var n=t.prefixCls,r=t.marks,a=t.onClick,o="".concat(n,"-mark");return r.length?f.createElement("div",{className:o},r.map(function(i){var l=i.value,s=i.style,c=i.label;return f.createElement(pC,{key:l,prefixCls:o,style:s,value:l,onClick:a},c)})):null},vC=function(t){var n=t.prefixCls,r=t.value,a=t.style,o=t.activeStyle,i=f.useContext(fa),l=i.min,s=i.max,c=i.direction,u=i.included,d=i.includedStart,g=i.includedEnd,h="".concat(n,"-dot"),v=u&&d<=r&&r<=g,m=ye(ye({},$u(c,r,l,s)),typeof a=="function"?a(r):a);return v&&(m=ye(ye({},m),typeof o=="function"?o(r):o)),f.createElement("span",{className:pe(h,J({},"".concat(h,"-active"),v)),style:m})},hC=function(t){var n=t.prefixCls,r=t.marks,a=t.dots,o=t.style,i=t.activeStyle,l=f.useContext(fa),s=l.min,c=l.max,u=l.step,d=f.useMemo(function(){var g=new Set;if(r.forEach(function(v){g.add(v.value)}),a&&u!==null)for(var h=s;h<=c;)g.add(h),h+=u;return Array.from(g)},[s,c,u,a,r]);return f.createElement("div",{className:"".concat(n,"-step")},d.map(function(g){return f.createElement(vC,{prefixCls:n,key:g,value:g,style:o,activeStyle:i})}))},Bd=function(t){var n=t.prefixCls,r=t.style,a=t.start,o=t.end,i=t.index,l=t.onStartMove,s=t.replaceCls,c=f.useContext(fa),u=c.direction,d=c.min,g=c.max,h=c.disabled,v=c.range,m=c.classNames,p="".concat(n,"-track"),b=Vs(a,d,g),y=Vs(o,d,g),x=function(E){!h&&l&&l(E,-1)},w={};switch(u){case"rtl":w.right="".concat(b*100,"%"),w.width="".concat(y*100-b*100,"%");break;case"btt":w.bottom="".concat(b*100,"%"),w.height="".concat(y*100-b*100,"%");break;case"ttb":w.top="".concat(b*100,"%"),w.height="".concat(y*100-b*100,"%");break;default:w.left="".concat(b*100,"%"),w.width="".concat(y*100-b*100,"%")}var C=s||pe(p,J(J({},"".concat(p,"-").concat(i+1),i!==null&&v),"".concat(n,"-track-draggable"),l),m.track);return f.createElement("div",{className:C,style:ye(ye({},w),r),onMouseDown:x,onTouchStart:x})},yC=function(t){var n=t.prefixCls,r=t.style,a=t.values,o=t.startPoint,i=t.onStartMove,l=f.useContext(fa),s=l.included,c=l.range,u=l.min,d=l.styles,g=l.classNames,h=f.useMemo(function(){if(!c){if(a.length===0)return[];var m=o??u,p=a[0];return[{start:Math.min(m,p),end:Math.max(m,p)}]}for(var b=[],y=0;y<a.length-1;y+=1)b.push({start:a[y],end:a[y+1]});return b},[a,c,o,u]);if(!s)return null;var v=h!=null&&h.length&&(g.tracks||d.tracks)?f.createElement(Bd,{index:null,prefixCls:n,start:h[0].start,end:h[h.length-1].end,replaceCls:pe(g.tracks,"".concat(n,"-tracks")),style:d.tracks}):null;return f.createElement(f.Fragment,null,v,h.map(function(m,p){var b=m.start,y=m.end;return f.createElement(Bd,{index:p,prefixCls:n,style:ye(ye({},zr(r,p)),d.track),start:b,end:y,key:p,onStartMove:i})}))},bC=130;function Ld(e){var t="targetTouches"in e?e.targetTouches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function xC(e,t,n,r,a,o,i,l,s,c,u){var d=f.useState(null),g=oe(d,2),h=g[0],v=g[1],m=f.useState(-1),p=oe(m,2),b=p[0],y=p[1],x=f.useState(!1),w=oe(x,2),C=w[0],S=w[1],E=f.useState(n),k=oe(E,2),$=k[0],O=k[1],D=f.useState(n),P=oe(D,2),A=P[0],N=P[1],I=f.useRef(null),M=f.useRef(null),F=f.useRef(null),R=f.useContext(uC),T=R.onDragStart,_=R.onDragChange;Tn(function(){b===-1&&O(n)},[n,b]),f.useEffect(function(){return function(){document.removeEventListener("mousemove",I.current),document.removeEventListener("mouseup",M.current),F.current&&(F.current.removeEventListener("touchmove",I.current),F.current.removeEventListener("touchend",M.current))}},[]);var B=function(V,G,U){G!==void 0&&v(G),O(V);var Z=V;U&&(Z=V.filter(function(Q,Y){return Y!==b})),i(Z),_&&_({rawValues:V,deleteIndex:U?b:-1,draggingIndex:b,draggingValue:G})},L=Yt(function(K,V,G){if(K===-1){var U=A[0],Z=A[A.length-1],Q=r-U,Y=a-Z,ee=V*(a-r);ee=Math.max(ee,Q),ee=Math.min(ee,Y);var ce=o(U+ee);ee=ce-U;var me=A.map(function(Ee){return Ee+ee});B(me)}else{var we=(a-r)*V,le=at($);le[K]=A[K];var ge=s(le,we,K,"dist");B(ge.values,ge.value,G)}}),j=function(V,G,U){V.stopPropagation();var Z=U||n,Q=Z[G];y(G),v(Q),N(Z),O(Z),S(!1);var Y=Ld(V),ee=Y.pageX,ce=Y.pageY,me=!1;T&&T({rawValues:Z,draggingIndex:G,draggingValue:Q});var we=function(Ee){Ee.preventDefault();var _e=Ld(Ee),Re=_e.pageX,he=_e.pageY,ke=Re-ee,de=he-ce,Te=e.current.getBoundingClientRect(),Ve=Te.width,We=Te.height,nt,Ue;switch(t){case"btt":nt=-de/We,Ue=ke;break;case"ttb":nt=de/We,Ue=ke;break;case"rtl":nt=-ke/Ve,Ue=de;break;default:nt=ke/Ve,Ue=de}me=c?Math.abs(Ue)>bC&&u<$.length:!1,S(me),L(G,nt,me)},le=function ge(Ee){Ee.preventDefault(),document.removeEventListener("mouseup",ge),document.removeEventListener("mousemove",we),F.current&&(F.current.removeEventListener("touchmove",I.current),F.current.removeEventListener("touchend",M.current)),I.current=null,M.current=null,F.current=null,l(me),y(-1),S(!1)};document.addEventListener("mouseup",le),document.addEventListener("mousemove",we),V.currentTarget.addEventListener("touchend",le),V.currentTarget.addEventListener("touchmove",we),I.current=we,M.current=le,F.current=V.currentTarget},z=f.useMemo(function(){var K=at(n).sort(function(Q,Y){return Q-Y}),V=at($).sort(function(Q,Y){return Q-Y}),G={};V.forEach(function(Q){G[Q]=(G[Q]||0)+1}),K.forEach(function(Q){G[Q]=(G[Q]||0)-1});var U=c?1:0,Z=Object.values(G).reduce(function(Q,Y){return Q+Math.abs(Y)},0);return Z<=U?$:n},[n,$,c]);return[b,h,C,z,j]}function CC(e,t,n,r,a,o){var i=f.useCallback(function(h){return Math.max(e,Math.min(t,h))},[e,t]),l=f.useCallback(function(h){if(n!==null){var v=e+Math.round((i(h)-e)/n)*n,m=function(x){return(String(x).split(".")[1]||"").length},p=Math.max(m(n),m(t),m(e)),b=Number(v.toFixed(p));return e<=b&&b<=t?b:null}return null},[n,e,t,i]),s=f.useCallback(function(h){var v=i(h),m=r.map(function(y){return y.value});n!==null&&m.push(l(h)),m.push(e,t);var p=m[0],b=t-e;return m.forEach(function(y){var x=Math.abs(v-y);x<=b&&(p=y,b=x)}),p},[e,t,r,n,i,l]),c=function h(v,m,p){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof m=="number"){var y,x=v[p],w=x+m,C=[];r.forEach(function(O){C.push(O.value)}),C.push(e,t),C.push(l(x));var S=m>0?1:-1;b==="unit"?C.push(l(x+S*n)):C.push(l(w)),C=C.filter(function(O){return O!==null}).filter(function(O){return m<0?O<=x:O>=x}),b==="unit"&&(C=C.filter(function(O){return O!==x}));var E=b==="unit"?x:w;y=C[0];var k=Math.abs(y-E);if(C.forEach(function(O){var D=Math.abs(O-E);D<k&&(y=O,k=D)}),y===void 0)return m<0?e:t;if(b==="dist")return y;if(Math.abs(m)>1){var $=at(v);return $[p]=y,h($,m-S,p,b)}return y}else{if(m==="min")return e;if(m==="max")return t}},u=function(v,m,p){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",y=v[p],x=c(v,m,p,b);return{value:x,changed:x!==y}},d=function(v){return o===null&&v===0||typeof o=="number"&&v<o},g=function(v,m,p){var b=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",y=v.map(s),x=y[p],w=c(y,m,p,b);if(y[p]=w,a===!1){var C=o||0;p>0&&y[p-1]!==x&&(y[p]=Math.max(y[p],y[p-1]+C)),p<y.length-1&&y[p+1]!==x&&(y[p]=Math.min(y[p],y[p+1]-C))}else if(typeof o=="number"||o===null){for(var S=p+1;S<y.length;S+=1)for(var E=!0;d(y[S]-y[S-1])&&E;){var k=u(y,1,S);y[S]=k.value,E=k.changed}for(var $=p;$>0;$-=1)for(var O=!0;d(y[$]-y[$-1])&&O;){var D=u(y,-1,$-1);y[$-1]=D.value,O=D.changed}for(var P=y.length-1;P>0;P-=1)for(var A=!0;d(y[P]-y[P-1])&&A;){var N=u(y,-1,P-1);y[P-1]=N.value,A=N.changed}for(var I=0;I<y.length-1;I+=1)for(var M=!0;d(y[I+1]-y[I])&&M;){var F=u(y,1,I+1);y[I+1]=F.value,M=F.changed}}return{value:y[p],values:y}};return[s,g]}function wC(e){return zt(function(){if(e===!0||!e)return[!!e,!1,!1,0];var t=e.editable,n=e.draggableTrack,r=e.minCount,a=e.maxCount;return[!0,t,!t&&n,r||0,a]},[e])}var SC=f.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-slider":n,a=e.className,o=e.style,i=e.classNames,l=e.styles,s=e.id,c=e.disabled,u=c===void 0?!1:c,d=e.keyboard,g=d===void 0?!0:d,h=e.autoFocus,v=e.onFocus,m=e.onBlur,p=e.min,b=p===void 0?0:p,y=e.max,x=y===void 0?100:y,w=e.step,C=w===void 0?1:w,S=e.value,E=e.defaultValue,k=e.range,$=e.count,O=e.onChange,D=e.onBeforeChange,P=e.onAfterChange,A=e.onChangeComplete,N=e.allowCross,I=N===void 0?!0:N,M=e.pushable,F=M===void 0?!1:M,R=e.reverse,T=e.vertical,_=e.included,B=_===void 0?!0:_,L=e.startPoint,j=e.trackStyle,z=e.handleStyle,K=e.railStyle,V=e.dotStyle,G=e.activeDotStyle,U=e.marks,Z=e.dots,Q=e.handleRender,Y=e.activeHandleRender,ee=e.track,ce=e.tabIndex,me=ce===void 0?0:ce,we=e.ariaLabelForHandle,le=e.ariaLabelledByForHandle,ge=e.ariaRequired,Ee=e.ariaValueTextFormatterForHandle,_e=f.useRef(null),Re=f.useRef(null),he=f.useMemo(function(){return T?R?"ttb":"btt":R?"rtl":"ltr"},[R,T]),ke=wC(k),de=oe(ke,5),Te=de[0],Ve=de[1],We=de[2],nt=de[3],Ue=de[4],qe=f.useMemo(function(){return isFinite(b)?b:0},[b]),ct=f.useMemo(function(){return isFinite(x)?x:100},[x]),Fe=f.useMemo(function(){return C!==null&&C<=0?1:C},[C]),ae=f.useMemo(function(){return typeof F=="boolean"?F?Fe:!1:F>=0?F:!1},[F,Fe]),ze=f.useMemo(function(){return Object.keys(U||{}).map(function(Ae){var De=U[Ae],Me={value:Number(Ae)};return De&&pn(De)==="object"&&!f.isValidElement(De)&&("label"in De||"style"in De)?(Me.style=De.style,Me.label=De.label):Me.label=De,Me}).filter(function(Ae){var De=Ae.label;return De||typeof De=="number"}).sort(function(Ae,De){return Ae.value-De.value})},[U]),Ce=CC(qe,ct,Fe,ze,I,ae),$e=oe(Ce,2),ue=$e[0],ie=$e[1],xe=on(E,{value:S}),Be=oe(xe,2),He=Be[0],st=Be[1],Ne=f.useMemo(function(){var Ae=He==null?[]:Array.isArray(He)?He:[He],De=oe(Ae,1),Me=De[0],Le=Me===void 0?qe:Me,tt=He===null?[]:[Le];if(Te){if(tt=at(Ae),$||He===void 0){var bt=$>=0?$+1:2;for(tt=tt.slice(0,bt);tt.length<bt;){var ht;tt.push((ht=tt[tt.length-1])!==null&&ht!==void 0?ht:qe)}}tt.sort(function(Bt,At){return Bt-At})}return tt.forEach(function(Bt,At){tt[At]=ue(Bt)}),tt},[He,Te,qe,$,ue]),Ie=function(De){return Te?De:De[0]},Ye=Yt(function(Ae){var De=at(Ae).sort(function(Me,Le){return Me-Le});O&&!ou(De,Ne,!0)&&O(Ie(De)),st(De)}),Ge=Yt(function(Ae){Ae&&_e.current.hideHelp();var De=Ie(Ne);P==null||P(De),On(!P,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),A==null||A(De)}),xt=function(De){if(!(u||!Ve||Ne.length<=nt)){var Me=at(Ne);Me.splice(De,1),D==null||D(Ie(Me)),Ye(Me);var Le=Math.max(0,De-1);_e.current.hideHelp(),_e.current.focus(Le)}},jt=xC(Re,he,Ne,qe,ct,ue,Ye,Ge,ie,Ve,nt),Vt=oe(jt,5),Pt=Vt[0],Gt=Vt[1],_t=Vt[2],nn=Vt[3],dn=Vt[4],Rt=function(De,Me){if(!u){var Le=at(Ne),tt=0,bt=0,ht=ct-qe;Ne.forEach(function(Fn,Xn){var Cr=Math.abs(De-Fn);Cr<=ht&&(ht=Cr,tt=Xn),Fn<De&&(bt=Xn)});var Bt=tt;Ve&&ht!==0&&(!Ue||Ne.length<Ue)?(Le.splice(bt+1,0,De),Bt=bt+1):Le[tt]=De,Te&&!Ne.length&&$===void 0&&Le.push(De);var At=Ie(Le);if(D==null||D(At),Ye(Le),Me){var rn,Mn;(rn=document.activeElement)===null||rn===void 0||(Mn=rn.blur)===null||Mn===void 0||Mn.call(rn),_e.current.focus(Bt),dn(Me,Bt,Le)}else P==null||P(At),On(!P,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),A==null||A(At)}},_n=function(De){De.preventDefault();var Me=Re.current.getBoundingClientRect(),Le=Me.width,tt=Me.height,bt=Me.left,ht=Me.top,Bt=Me.bottom,At=Me.right,rn=De.clientX,Mn=De.clientY,Fn;switch(he){case"btt":Fn=(Bt-Mn)/tt;break;case"ttb":Fn=(Mn-ht)/tt;break;case"rtl":Fn=(At-rn)/Le;break;default:Fn=(rn-bt)/Le}var Xn=qe+Fn*(ct-qe);Rt(ue(Xn),De)},q=f.useState(null),H=oe(q,2),ne=H[0],se=H[1],Se=function(De,Me){if(!u){var Le=ie(Ne,De,Me);D==null||D(Ie(Ne)),Ye(Le.values),se(Le.value)}};f.useEffect(function(){if(ne!==null){var Ae=Ne.indexOf(ne);Ae>=0&&_e.current.focus(Ae)}se(null)},[ne]);var je=f.useMemo(function(){return We&&Fe===null?!1:We},[We,Fe]),ut=Yt(function(Ae,De){dn(Ae,De),D==null||D(Ie(Ne))}),Ze=Pt!==-1;f.useEffect(function(){if(!Ze){var Ae=Ne.lastIndexOf(Gt);_e.current.focus(Ae)}},[Ze]);var lt=f.useMemo(function(){return at(nn).sort(function(Ae,De){return Ae-De})},[nn]),vt=f.useMemo(function(){return Te?[lt[0],lt[lt.length-1]]:[qe,lt[0]]},[lt,Te,qe]),Ke=oe(vt,2),yt=Ke[0],et=Ke[1];f.useImperativeHandle(t,function(){return{focus:function(){_e.current.focus(0)},blur:function(){var De,Me=document,Le=Me.activeElement;(De=Re.current)!==null&&De!==void 0&&De.contains(Le)&&(Le==null||Le.blur())}}}),f.useEffect(function(){h&&_e.current.focus(0)},[]);var It=f.useMemo(function(){return{min:qe,max:ct,direction:he,disabled:u,keyboard:g,step:Fe,included:B,includedStart:yt,includedEnd:et,range:Te,tabIndex:me,ariaLabelForHandle:we,ariaLabelledByForHandle:le,ariaRequired:ge,ariaValueTextFormatterForHandle:Ee,styles:l||{},classNames:i||{}}},[qe,ct,he,u,g,Fe,B,yt,et,Te,me,we,le,ge,Ee,l,i]);return f.createElement(fa.Provider,{value:It},f.createElement("div",{ref:Re,className:pe(r,a,J(J(J(J({},"".concat(r,"-disabled"),u),"".concat(r,"-vertical"),T),"".concat(r,"-horizontal"),!T),"".concat(r,"-with-marks"),ze.length)),style:o,onMouseDown:_n,id:s},f.createElement("div",{className:pe("".concat(r,"-rail"),i==null?void 0:i.rail),style:ye(ye({},K),l==null?void 0:l.rail)}),ee!==!1&&f.createElement(yC,{prefixCls:r,style:j,values:Ne,startPoint:L,onStartMove:je?ut:void 0}),f.createElement(hC,{prefixCls:r,marks:ze,dots:Z,style:V,activeStyle:G}),f.createElement(mC,{ref:_e,prefixCls:r,style:z,values:nn,draggingIndex:Pt,draggingDelete:_t,onStartMove:ut,onOffsetChange:Se,onFocus:v,onBlur:m,handleRender:Q,activeHandleRender:Y,onChangeComplete:Ge,onDelete:Ve?xt:void 0}),f.createElement(gC,{prefixCls:r,marks:ze,onClick:Rt})))});const $C=aa({}),zd=f.forwardRef((e,t)=>{const{open:n,draggingDelete:r,value:a}=e,o=St(null),i=n&&!r,l=St(null);function s(){Ht.cancel(l.current),l.current=null}function c(){l.current=Ht(()=>{var u;(u=o.current)===null||u===void 0||u.forceAlign(),l.current=null})}return f.useEffect(()=>(i?c():s(),s),[i,e.title,a]),f.createElement(To,Object.assign({ref:Fo(o,t)},e,{open:i}))}),EC=e=>{const{componentCls:t,antCls:n,controlSize:r,dotSize:a,marginFull:o,marginPart:i,colorFillContentHover:l,handleColorDisabled:s,calc:c,handleSize:u,handleSizeHover:d,handleActiveColor:g,handleActiveOutlineColor:h,handleLineWidth:v,handleLineWidthHover:m,motionDurationMid:p}=e;return{[t]:Object.assign(Object.assign({},gn(e)),{position:"relative",height:r,margin:`${fe(i)} ${fe(o)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${fe(o)} ${fe(i)}`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${p}`},[`${t}-track,${t}-tracks`]:{position:"absolute",transition:`background-color ${p}`},[`${t}-track`]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},[`${t}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${t}-rail`]:{backgroundColor:e.railHoverBg},[`${t}-track`]:{backgroundColor:e.trackHoverBg},[`${t}-dot`]:{borderColor:l},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${fe(v)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-handle`]:{position:"absolute",width:u,height:u,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:c(v).mul(-1).equal(),insetBlockStart:c(v).mul(-1).equal(),width:c(u).add(c(v).mul(2)).equal(),height:c(u).add(c(v).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${fe(v)} ${e.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:`
|
|
66
66
|
inset-inline-start ${p},
|
|
67
67
|
inset-block-start ${p},
|
|
68
68
|
width ${p},
|
|
@@ -71,31 +71,31 @@ import{j as B}from"./assets/jsx-runtime-vC1aA8e7.js";import*as f from"react";imp
|
|
|
71
71
|
outline ${p}
|
|
72
72
|
`},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:c(d).sub(u).div(2).add(m).mul(-1).equal(),insetBlockStart:c(d).sub(u).div(2).add(m).mul(-1).equal(),width:c(d).add(c(m).mul(2)).equal(),height:c(d).add(c(m).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${fe(m)} ${g}`,outline:`6px solid ${h}`,width:d,height:d,insetInlineStart:e.calc(u).sub(d).div(2).equal(),insetBlockStart:e.calc(u).sub(d).div(2).equal()}}},[`&-lock ${t}-handle`]:{"&::before, &::after":{transition:"none"}},[`${t}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${t}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${t}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${t}-dot`]:{position:"absolute",width:a,height:a,backgroundColor:e.colorBgElevated,border:`${fe(v)} solid ${e.dotBorderColor}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:e.dotActiveBorderColor}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-rail`]:{backgroundColor:`${e.railBg} !important`},[`${t}-track`]:{backgroundColor:`${e.trackBgDisabled} !important`},[`
|
|
73
73
|
${t}-dot
|
|
74
|
-
`]:{backgroundColor:e.colorBgElevated,borderColor:e.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:u,height:u,boxShadow:`0 0 0 ${fe(v)} ${
|
|
74
|
+
`]:{backgroundColor:e.colorBgElevated,borderColor:e.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:u,height:u,boxShadow:`0 0 0 ${fe(v)} ${s}`,insetInlineStart:0,insetBlockStart:0},[`
|
|
75
75
|
${t}-mark-text,
|
|
76
76
|
${t}-dot
|
|
77
|
-
`]:{cursor:"not-allowed !important"}},[`&-tooltip ${n}-tooltip-inner`]:{minWidth:"unset"}})}},Tg=(e,t)=>{const{componentCls:n,railSize:r,handleSize:a,dotSize:o,marginFull:i,calc:s}=e,l=t?"paddingBlock":"paddingInline",c=t?"width":"height",u=t?"height":"width",d=t?"insetBlockStart":"insetInlineStart",g=t?"top":"insetInlineStart",h=s(r).mul(3).sub(a).div(2).equal(),v=s(a).sub(r).div(2).equal(),m=t?{borderWidth:`${fe(v)} 0`,transform:`translateY(${fe(s(v).mul(-1).equal())})`}:{borderWidth:`0 ${fe(v)}`,transform:`translateX(${fe(e.calc(v).mul(-1).equal())})`};return{[l]:r,[u]:s(r).mul(3).equal(),[`${n}-rail`]:{[c]:"100%",[u]:r},[`${n}-track,${n}-tracks`]:{[u]:r},[`${n}-track-draggable`]:Object.assign({},m),[`${n}-handle`]:{[d]:h},[`${n}-mark`]:{insetInlineStart:0,top:0,[g]:s(r).mul(3).add(t?0:i).equal(),[c]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[g]:r,[c]:"100%",[u]:r},[`${n}-dot`]:{position:"absolute",[d]:s(r).sub(o).div(2).equal()}}},$C=e=>{const{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},Tg(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},EC=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},Tg(e,!1)),{height:"100%"})}},kC=e=>{const n=e.controlHeightLG/4,r=e.controlHeightSM/2,a=e.lineWidth+1,o=e.lineWidth+1*1.5,i=e.colorPrimary,s=new mr(i).setA(.2).toRgbString();return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:r,dotSize:8,handleLineWidth:a,handleLineWidthHover:o,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:i,handleActiveOutlineColor:s,handleColorDisabled:new mr(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}},IC=rr("Slider",e=>{const t=Hn(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return[SC(t),$C(t),EC(t)]},kC);function Xs(){const[e,t]=f.useState(!1),n=f.useRef(null),r=()=>{zt.cancel(n.current)},a=o=>{r(),o?t(o):n.current=zt(()=>{t(o)})};return f.useEffect(()=>r,[]),[e,a]}var OC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};function NC(e,t){return e||e===null?e:t||t===null?t:n=>typeof n=="number"?n.toString():""}const DC=be.forwardRef((e,t)=>{const{prefixCls:n,range:r,className:a,rootClassName:o,style:i,disabled:s,tooltipPrefixCls:l,tipFormatter:c,tooltipVisible:u,getTooltipPopupContainer:d,tooltipPlacement:g,tooltip:h={},onChangeComplete:v,classNames:m,styles:p}=e,b=OC(e,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete","classNames","styles"]),{vertical:y}=e,{getPrefixCls:x,direction:w,className:C,style:S,classNames:E,styles:k,getPopupContainer:$}=jo("slider"),O=be.useContext(Fa),D=s??O,{handleRender:P,direction:R}=be.useContext(wC),I=(R||w)==="rtl",[M,F]=Xs(),[j,A]=Xs(),_=Object.assign({},h),{open:L,placement:z,getPopupContainer:T,prefixCls:H,formatter:W}=_,K=L??u,G=(M||j)&&K!==!1,U=NC(W,c),[Z,Q]=Xs(),Y=Re=>{v==null||v(Re),Q(!1)},ee=(Re,He)=>Re||(He?I?"left":"right":"top"),ce=x("slider",n),[me,we,se]=IC(ce),ge=pe(a,C,E.root,m==null?void 0:m.root,o,{[`${ce}-rtl`]:I,[`${ce}-lock`]:Z},we,se);I&&!b.vertical&&(b.reverse=!b.reverse),be.useEffect(()=>{const Re=()=>{zt(()=>{A(!1)},1)};return document.addEventListener("mouseup",Re),()=>{document.removeEventListener("mouseup",Re)}},[]);const Ee=r&&!K,Te=P||((Re,He)=>{const{index:Ke}=He,tt=Re.props;function qe(ae,Le,Ce){var $e,ue,ie,xe;Ce&&((ue=($e=b)[ae])===null||ue===void 0||ue.call($e,Le)),(xe=(ie=tt)[ae])===null||xe===void 0||xe.call(ie,Le)}const We=Object.assign(Object.assign({},tt),{onMouseEnter:ae=>{F(!0),qe("onMouseEnter",ae)},onMouseLeave:ae=>{F(!1),qe("onMouseLeave",ae)},onMouseDown:ae=>{A(!0),Q(!0),qe("onMouseDown",ae)},onFocus:ae=>{var Le;A(!0),(Le=b.onFocus)===null||Le===void 0||Le.call(b,ae),qe("onFocus",ae,!0)},onBlur:ae=>{var Le;A(!1),(Le=b.onBlur)===null||Le===void 0||Le.call(b,ae),qe("onBlur",ae,!0)}}),lt=be.cloneElement(Re,We),Fe=(!!K||G)&&U!==null;return Ee?lt:be.createElement(Ld,Object.assign({},_,{prefixCls:x("tooltip",H??l),title:U?U(He.value):"",value:He.value,open:Fe,placement:ee(z??g,y),key:Ke,classNames:{root:`${ce}-tooltip`},getPopupContainer:T||d||$}),lt)}),Pe=Ee?(Re,He)=>{const Ke=be.cloneElement(Re,{style:Object.assign(Object.assign({},Re.props.style),{visibility:"hidden"})});return be.createElement(Ld,Object.assign({},_,{prefixCls:x("tooltip",H??l),title:U?U(He.value):"",open:U!==null&&G,placement:ee(z??g,y),key:"tooltip",classNames:{root:`${ce}-tooltip`},getPopupContainer:T||d||$,draggingDelete:He.draggingDelete}),Ke)}:void 0,he=Object.assign(Object.assign(Object.assign(Object.assign({},k.root),S),p==null?void 0:p.root),i),ke=Object.assign(Object.assign({},k.tracks),p==null?void 0:p.tracks),de=pe(E.tracks,m==null?void 0:m.tracks);return me(be.createElement(CC,Object.assign({},b,{classNames:Object.assign({handle:pe(E.handle,m==null?void 0:m.handle),rail:pe(E.rail,m==null?void 0:m.rail),track:pe(E.track,m==null?void 0:m.track)},de?{tracks:de}:{}),styles:Object.assign({handle:Object.assign(Object.assign({},k.handle),p==null?void 0:p.handle),rail:Object.assign(Object.assign({},k.rail),p==null?void 0:p.rail),track:Object.assign(Object.assign({},k.track),p==null?void 0:p.track)},Object.keys(ke).length?{tracks:ke}:{}),step:b.step,range:r,className:ge,style:he,disabled:D,ref:t,prefixCls:ce,handleRender:Te,activeHandleRender:Pe,onChangeComplete:Y})))});var MC={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},FC=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:MC}))},_g=f.forwardRef(FC),PC={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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},jC=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:PC}))},Bg=f.forwardRef(jC),RC={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"}}]},name:"swap-right",theme:"outlined"},AC=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:RC}))},TC=f.forwardRef(AC);function _C(e,t,n){return n!==void 0?n:t==="year"&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t==="quarter"&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t==="month"&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t==="week"&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t==="time"&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder}function BC(e,t,n){return n!==void 0?n:t==="year"&&e.lang.yearPlaceholder?e.lang.rangeYearPlaceholder:t==="quarter"&&e.lang.quarterPlaceholder?e.lang.rangeQuarterPlaceholder:t==="month"&&e.lang.monthPlaceholder?e.lang.rangeMonthPlaceholder:t==="week"&&e.lang.weekPlaceholder?e.lang.rangeWeekPlaceholder:t==="time"&&e.timePickerLocale.placeholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder}function Lg(e,t){const{allowClear:n=!0}=e,{clearIcon:r,removeIcon:a}=my(Object.assign(Object.assign({},e),{prefixCls:t,componentName:"DatePicker"}));return[f.useMemo(()=>n===!1?!1:Object.assign({clearIcon:r},n===!0?{}:n),[n,r]),a]}const[LC,zC]=["week","WeekPicker"],[HC,VC]=["month","MonthPicker"],[KC,WC]=["year","YearPicker"],[qC,UC]=["quarter","QuarterPicker"],[Vl,zd]=["time","TimePicker"],YC=e=>f.createElement(gn,Object.assign({size:"small",type:"primary"},e));function zg(e){return Lt(()=>Object.assign({button:YC},e),[e])}function Hg(e,...t){const n=e||{};return t.reduce((r,a)=>(Object.keys(a||{}).forEach(o=>{const i=n[o],s=a[o];if(i&&typeof i=="object")if(s&&typeof s=="object")r[o]=Hg(i,r[o],s);else{const{_default:l}=i;r[o]=r[o]||{},r[o][l]=pe(r[o][l],s)}else r[o]=pe(r[o],s)}),r),{})}function GC(e,...t){return f.useMemo(()=>Hg.apply(void 0,[e].concat(t)),[t])}function XC(...e){return f.useMemo(()=>e.reduce((t,n={})=>(Object.keys(n).forEach(r=>{t[r]=Object.assign(Object.assign({},t[r]),n[r])}),t),{}),[e])}function Kl(e,t){const n=Object.assign({},e);return Object.keys(t).forEach(r=>{if(r!=="_default"){const a=t[r],o=n[r]||{};n[r]=a?Kl(o,a):o}}),n}function JC(e,t,n){const r=GC.apply(void 0,[n].concat(rt(e))),a=XC.apply(void 0,rt(t));return f.useMemo(()=>[Kl(r,n),Kl(a,n)],[r,a])}const Vg=(e,t,n,r,a)=>{const{classNames:o,styles:i}=jo(e),[s,l]=JC([o,t],[i,n],{popup:{_default:"root"}});return f.useMemo(()=>{var c,u;const d=Object.assign(Object.assign({},s),{popup:Object.assign(Object.assign({},s.popup),{root:pe((c=s.popup)===null||c===void 0?void 0:c.root,r)})}),g=Object.assign(Object.assign({},l),{popup:Object.assign(Object.assign({},l.popup),{root:Object.assign(Object.assign({},(u=l.popup)===null||u===void 0?void 0:u.root),a)})});return[d,g]},[s,l,r,a])};var QC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const ZC=e=>jr((n,r)=>{var a;const{prefixCls:o,getPopupContainer:i,components:s,className:l,style:c,placement:u,size:d,disabled:g,bordered:h=!0,placeholder:v,popupStyle:m,popupClassName:p,dropdownClassName:b,status:y,rootClassName:x,variant:w,picker:C,styles:S,classNames:E}=n,k=QC(n,["prefixCls","getPopupContainer","components","className","style","placement","size","disabled","bordered","placeholder","popupStyle","popupClassName","dropdownClassName","status","rootClassName","variant","picker","styles","classNames"]),$=C===Vl?"timePicker":"datePicker",O=f.useRef(null),{getPrefixCls:D,direction:P,getPopupContainer:R,rangePicker:N}=$n(cn),I=D("picker",o),{compactSize:M,compactItemClassnames:F}=ss(I,P),j=D(),[A,_]=Zc("rangePicker",w,h),L=ia(I),[z,T,H]=Ng(I,L),[W,K]=Vg($,E,S,p||b,m),[G]=Lg(n,I),U=zg(s),Z=is(Pe=>{var he;return(he=d??M)!==null&&he!==void 0?he:Pe}),Q=f.useContext(Fa),Y=g??Q,ee=$n(Po),{hasFeedback:ce,status:me,feedbackIcon:we}=ee,se=f.createElement(f.Fragment,null,C===Vl?f.createElement(Bg,null):f.createElement(_g,null),ce&&we);Do(r,()=>O.current);const[ge]=cs("Calendar",Sp),Ee=Object.assign(Object.assign({},ge),n.locale),[Te]=os("DatePicker",(a=K.popup.root)===null||a===void 0?void 0:a.zIndex);return z(f.createElement(vo,{space:!0},f.createElement(e1,Object.assign({separator:f.createElement("span",{"aria-label":"to",className:`${I}-separator`},f.createElement(TC,null)),disabled:Y,ref:O,placement:u,placeholder:BC(Ee,C,v),suffixIcon:se,prevIcon:f.createElement("span",{className:`${I}-prev-icon`}),nextIcon:f.createElement("span",{className:`${I}-next-icon`}),superPrevIcon:f.createElement("span",{className:`${I}-super-prev-icon`}),superNextIcon:f.createElement("span",{className:`${I}-super-next-icon`}),transitionName:`${j}-slide-up`,picker:C},k,{className:pe({[`${I}-${Z}`]:Z,[`${I}-${A}`]:_},Ri(I,eu(me,y),ce),T,F,l,N==null?void 0:N.className,H,L,x,W.root),style:Object.assign(Object.assign(Object.assign({},N==null?void 0:N.style),c),K.root),locale:Ee.lang,prefixCls:I,getPopupContainer:i||R,generateConfig:e,components:U,direction:P,classNames:{popup:pe(T,H,L,x,W.popup.root)},styles:{popup:Object.assign(Object.assign({},K.popup.root),{zIndex:Te})},allowClear:G}))))});var ew=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const tw=e=>{const t=(l,c)=>{const u=c===zd?"timePicker":"datePicker";return jr((g,h)=>{var v;const{prefixCls:m,getPopupContainer:p,components:b,style:y,className:x,rootClassName:w,size:C,bordered:S,placement:E,placeholder:k,popupStyle:$,popupClassName:O,dropdownClassName:D,disabled:P,status:R,variant:N,onCalendarChange:I,styles:M,classNames:F}=g,j=ew(g,["prefixCls","getPopupContainer","components","style","className","rootClassName","size","bordered","placement","placeholder","popupStyle","popupClassName","dropdownClassName","disabled","status","variant","onCalendarChange","styles","classNames"]),{getPrefixCls:A,direction:_,getPopupContainer:L,[u]:z}=$n(cn),T=A("picker",m),{compactSize:H,compactItemClassnames:W}=ss(T,_),K=f.useRef(null),[G,U]=Zc("datePicker",N,S),Z=ia(T),[Q,Y,ee]=Ng(T,Z);Do(h,()=>K.current);const ce={showToday:!0},me=l||g.picker,we=A(),{onSelect:se,multiple:ge}=j,Ee=se&&l==="time"&&!ge,Te=(ue,ie,xe)=>{I==null||I(ue,ie,xe),Ee&&se(ue)},[Pe,he]=Vg(u,F,M,O||D,$),[ke,de]=Lg(g,T),Re=zg(b),He=is(ue=>{var ie;return(ie=C??H)!==null&&ie!==void 0?ie:ue}),Ke=f.useContext(Fa),tt=P??Ke,qe=$n(Po),{hasFeedback:We,status:lt,feedbackIcon:Fe}=qe,ae=f.createElement(f.Fragment,null,me==="time"?f.createElement(Bg,null):f.createElement(_g,null),We&&Fe),[Le]=cs("DatePicker",Sp),Ce=Object.assign(Object.assign({},Le),g.locale),[$e]=os("DatePicker",(v=he.popup.root)===null||v===void 0?void 0:v.zIndex);return Q(f.createElement(vo,{space:!0},f.createElement(i1,Object.assign({ref:K,placeholder:_C(Ce,me,k),suffixIcon:ae,placement:E,prevIcon:f.createElement("span",{className:`${T}-prev-icon`}),nextIcon:f.createElement("span",{className:`${T}-next-icon`}),superPrevIcon:f.createElement("span",{className:`${T}-super-prev-icon`}),superNextIcon:f.createElement("span",{className:`${T}-super-next-icon`}),transitionName:`${we}-slide-up`,picker:l,onCalendarChange:Te},ce,j,{locale:Ce.lang,className:pe({[`${T}-${He}`]:He,[`${T}-${G}`]:U},Ri(T,eu(lt,R),We),Y,W,z==null?void 0:z.className,x,ee,Z,w,Pe.root),style:Object.assign(Object.assign(Object.assign({},z==null?void 0:z.style),y),he.root),prefixCls:T,getPopupContainer:p||L,generateConfig:e,components:Re,direction:_,disabled:tt,classNames:{popup:pe(Y,ee,Z,w,Pe.popup.root)},styles:{popup:Object.assign(Object.assign({},he.popup.root),{zIndex:$e})},allowClear:ke,removeIcon:de}))))})},n=t(),r=t(LC,zC),a=t(HC,VC),o=t(KC,WC),i=t(qC,UC),s=t(Vl,zd);return{DatePicker:n,WeekPicker:r,MonthPicker:a,YearPicker:o,TimePicker:s,QuarterPicker:i}},Kg=e=>{const{DatePicker:t,WeekPicker:n,MonthPicker:r,YearPicker:a,TimePicker:o,QuarterPicker:i}=tw(e),s=ZC(e),l=t;return l.WeekPicker=n,l.MonthPicker=r,l.YearPicker=a,l.RangePicker=s,l.TimePicker=o,l.QuarterPicker=i,l},Aa=Kg(lx),nw=iu(Aa,"popupAlign",void 0,"picker");Aa._InternalPanelDoNotUseOrYouWillBeFired=nw;const rw=iu(Aa.RangePicker,"popupAlign",void 0,"picker");Aa._InternalRangePanelDoNotUseOrYouWillBeFired=rw;Aa.generatePicker=Kg;function Hd(e){return["small","middle","large"].includes(e)}function Vd(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const Wg=be.createContext({latestIndex:0}),aw=Wg.Provider,ow=({className:e,index:t,children:n,split:r,style:a})=>{const{latestIndex:o}=f.useContext(Wg);return n==null?null:f.createElement(f.Fragment,null,f.createElement("div",{className:e,style:a},n),t<o&&r&&f.createElement("span",{className:`${e}-split`},r))};var iw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const sw=f.forwardRef((e,t)=>{var n;const{getPrefixCls:r,direction:a,size:o,className:i,style:s,classNames:l,styles:c}=jo("space"),{size:u=o??"small",align:d,className:g,rootClassName:h,children:v,direction:m="horizontal",prefixCls:p,split:b,style:y,wrap:x=!1,classNames:w,styles:C}=e,S=iw(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[E,k]=Array.isArray(u)?u:[u,u],$=Hd(k),O=Hd(E),D=Vd(k),P=Vd(E),R=ns(v,{keepEmpty:!0}),N=d===void 0&&m==="horizontal"?"center":d,I=r("space",p),[M,F,j]=X0(I),A=pe(I,i,F,`${I}-${m}`,{[`${I}-rtl`]:a==="rtl",[`${I}-align-${N}`]:N,[`${I}-gap-row-${k}`]:$,[`${I}-gap-col-${E}`]:O},g,h,j),_=pe(`${I}-item`,(n=w==null?void 0:w.item)!==null&&n!==void 0?n:l.item);let L=0;const z=R.map((W,K)=>{var G;W!=null&&(L=K);const U=(W==null?void 0:W.key)||`${_}-${K}`;return f.createElement(ow,{className:_,key:U,index:K,split:b,style:(G=C==null?void 0:C.item)!==null&&G!==void 0?G:c.item},W)}),T=f.useMemo(()=>({latestIndex:L}),[L]);if(R.length===0)return null;const H={};return x&&(H.flexWrap="wrap"),!O&&P&&(H.columnGap=E),!$&&D&&(H.rowGap=k),M(f.createElement("div",Object.assign({ref:t,className:A,style:Object.assign(Object.assign(Object.assign({},H),s),y)},S),f.createElement(aw,{value:T},z)))}),qg=sw;qg.Compact=J0;var lw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const Ug=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:r}=f.useContext(cn),{prefixCls:a,type:o="default",danger:i,disabled:s,loading:l,onClick:c,htmlType:u,children:d,className:g,menu:h,arrow:v,autoFocus:m,overlay:p,trigger:b,align:y,open:x,onOpenChange:w,placement:C,getPopupContainer:S,href:E,icon:k=f.createElement(qp,null),title:$,buttonsRender:O=Y=>Y,mouseEnterDelay:D,mouseLeaveDelay:P,overlayClassName:R,overlayStyle:N,destroyOnHidden:I,destroyPopupOnHide:M,dropdownRender:F,popupRender:j}=e,A=lw(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),_=n("dropdown",a),L=`${_}-button`,T={menu:h,arrow:v,autoFocus:m,align:y,disabled:s,trigger:s?[]:b,onOpenChange:w,getPopupContainer:S||t,mouseEnterDelay:D,mouseLeaveDelay:P,overlayClassName:R,overlayStyle:N,destroyOnHidden:I,popupRender:j||F},{compactSize:H,compactItemClassnames:W}=ss(_,r),K=pe(L,W,g);"destroyPopupOnHide"in e&&(T.destroyPopupOnHide=M),"overlay"in e&&(T.overlay=p),"open"in e&&(T.open=x),"placement"in e?T.placement=C:T.placement=r==="rtl"?"bottomLeft":"bottomRight";const G=f.createElement(gn,{type:o,danger:i,disabled:s,loading:l,onClick:c,htmlType:u,href:E,title:$},d),U=f.createElement(gn,{type:o,danger:i,icon:k}),[Z,Q]=O([G,U]);return f.createElement(qg.Compact,Object.assign({className:K,size:H,block:!0},A),Z,f.createElement(ps,Object.assign({},T),Q))};Ug.__ANT_BUTTON=!0;const Yg=ps;Yg.Button=Ug;const cw=e=>{const{componentCls:t,iconCls:n,antCls:r,zIndexPopup:a,colorText:o,colorWarning:i,marginXXS:s,marginXS:l,fontSize:c,fontWeightStrong:u,colorTextHeading:d}=e;return{[t]:{zIndex:a,[`&${r}-popover`]:{fontSize:c},[`${t}-message`]:{marginBottom:l,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${n}`]:{color:i,fontSize:c,lineHeight:1,marginInlineEnd:l},[`${t}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:s,color:o}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:l}}}}},uw=e=>{const{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},Gg=rr("Popconfirm",e=>cw(e),uw,{resetStyle:!1});var dw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const Xg=e=>{const{prefixCls:t,okButtonProps:n,cancelButtonProps:r,title:a,description:o,cancelText:i,okText:s,okType:l="primary",icon:c=f.createElement($p,null),showCancel:u=!0,close:d,onConfirm:g,onCancel:h,onPopupClick:v}=e,{getPrefixCls:m}=f.useContext(cn),[p]=cs("Popconfirm",Ep.Popconfirm),b=ud(a),y=ud(o);return f.createElement("div",{className:`${t}-inner-content`,onClick:v},f.createElement("div",{className:`${t}-message`},c&&f.createElement("span",{className:`${t}-message-icon`},c),f.createElement("div",{className:`${t}-message-text`},b&&f.createElement("div",{className:`${t}-title`},b),y&&f.createElement("div",{className:`${t}-description`},y))),f.createElement("div",{className:`${t}-buttons`},u&&f.createElement(gn,Object.assign({onClick:h,size:"small"},r),i||(p==null?void 0:p.cancelText)),f.createElement(Q0,{buttonProps:Object.assign(Object.assign({size:"small"},Z0(l)),n),actionFn:g,close:d,prefixCls:m("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},s||(p==null?void 0:p.okText))))},fw=e=>{const{prefixCls:t,placement:n,className:r,style:a}=e,o=dw(e,["prefixCls","placement","className","style"]),{getPrefixCls:i}=f.useContext(cn),s=i("popconfirm",t),[l]=Gg(s);return l(f.createElement(Cy,{placement:n,className:pe(s,r),style:a,content:f.createElement(Xg,Object.assign({prefixCls:s},o))}))};var mw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const pw=f.forwardRef((e,t)=>{var n,r;const{prefixCls:a,placement:o="top",trigger:i="click",okType:s="primary",icon:l=f.createElement($p,null),children:c,overlayClassName:u,onOpenChange:d,onVisibleChange:g,overlayStyle:h,styles:v,classNames:m}=e,p=mw(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:b,className:y,style:x,classNames:w,styles:C}=jo("popconfirm"),[S,E]=an(!1,{value:(n=e.open)!==null&&n!==void 0?n:e.visible,defaultValue:(r=e.defaultOpen)!==null&&r!==void 0?r:e.defaultVisible}),k=(F,j)=>{E(F,!0),g==null||g(F),d==null||d(F,j)},$=F=>{k(!1,F)},O=F=>{var j;return(j=e.onConfirm)===null||j===void 0?void 0:j.call(void 0,F)},D=F=>{var j;k(!1,F),(j=e.onCancel)===null||j===void 0||j.call(void 0,F)},P=(F,j)=>{const{disabled:A=!1}=e;A||k(F,j)},R=b("popconfirm",a),N=pe(R,y,u,w.root,m==null?void 0:m.root),I=pe(w.body,m==null?void 0:m.body),[M]=Gg(R);return M(f.createElement(Mp,Object.assign({},Vn(p,["title"]),{trigger:i,placement:o,onOpenChange:P,open:S,ref:t,classNames:{root:N,body:I},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},C.root),x),h),v==null?void 0:v.root),body:Object.assign(Object.assign({},C.body),v==null?void 0:v.body)},content:f.createElement(Xg,Object.assign({okType:s,icon:l},e,{prefixCls:R,close:$,onConfirm:O,onCancel:D})),"data-popover-inject":!0}),c))}),Jg=pw;Jg._InternalPanelDoNotUseOrYouWillBeFired=fw;var gw={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},vw=function(){var t=wt([]),n=wt(null);return ft(function(){var r=Date.now(),a=!1;t.current.forEach(function(o){if(o){a=!0;var i=o.style;i.transitionDuration=".3s, .3s, .3s, .06s",n.current&&r-n.current<100&&(i.transitionDuration="0s, 0s")}}),a&&(n.current=Date.now())}),t.current},Kd=0,hw=ey();function yw(){var e;return hw?(e=Kd,Kd+=1):e="TEST_OR_SSR",e}const bw=(function(e){var t=f.useState(),n=oe(t,2),r=n[0],a=n[1];return f.useEffect(function(){a("rc_progress_".concat(yw()))},[]),e||r});var Wd=function(t){var n=t.bg,r=t.children;return f.createElement("div",{style:{width:"100%",height:"100%",background:n}},r)};function qd(e,t){return Object.keys(e).map(function(n){var r=parseFloat(n),a="".concat(Math.floor(r*t),"%");return"".concat(e[n]," ").concat(a)})}var xw=f.forwardRef(function(e,t){var n=e.prefixCls,r=e.color,a=e.gradientId,o=e.radius,i=e.style,s=e.ptg,l=e.strokeLinecap,c=e.strokeWidth,u=e.size,d=e.gapDegree,g=r&&mn(r)==="object",h=g?"#FFF":void 0,v=u/2,m=f.createElement("circle",{className:"".concat(n,"-circle-path"),r:o,cx:v,cy:v,stroke:h,strokeLinecap:l,strokeWidth:c,opacity:s===0?0:1,style:i,ref:t});if(!g)return m;var p="".concat(a,"-conic"),b=d?"".concat(180+d/2,"deg"):"0deg",y=qd(r,(360-d)/360),x=qd(r,1),w="conic-gradient(from ".concat(b,", ").concat(y.join(", "),")"),C="linear-gradient(to ".concat(d?"bottom":"top",", ").concat(x.join(", "),")");return f.createElement(f.Fragment,null,f.createElement("mask",{id:p},m),f.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(p,")")},f.createElement(Wd,{bg:C},f.createElement(Wd,{bg:w}))))}),io=100,Js=function(t,n,r,a,o,i,s,l,c,u){var d=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,g=r/100*360*((360-i)/360),h=i===0?0:{bottom:0,top:180,left:90,right:-90}[s],v=(100-a)/100*n;c==="round"&&a!==100&&(v+=u/2,v>=n&&(v=n-.01));var m=io/2;return{stroke:typeof l=="string"?l:void 0,strokeDasharray:"".concat(n,"px ").concat(t),strokeDashoffset:v+d,transform:"rotate(".concat(o+g+h,"deg)"),transformOrigin:"".concat(m,"px ").concat(m,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Cw=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Ud(e){var t=e??[];return Array.isArray(t)?t:[t]}var ww=function(t){var n=ye(ye({},gw),t),r=n.id,a=n.prefixCls,o=n.steps,i=n.strokeWidth,s=n.trailWidth,l=n.gapDegree,c=l===void 0?0:l,u=n.gapPosition,d=n.trailColor,g=n.strokeLinecap,h=n.style,v=n.className,m=n.strokeColor,p=n.percent,b=Nt(n,Cw),y=io/2,x=bw(r),w="".concat(x,"-gradient"),C=y-i/2,S=Math.PI*2*C,E=c>0?90+c/2:-90,k=S*((360-c)/360),$=mn(o)==="object"?o:{count:o,gap:2},O=$.count,D=$.gap,P=Ud(p),R=Ud(m),N=R.find(function(L){return L&&mn(L)==="object"}),I=N&&mn(N)==="object",M=I?"butt":g,F=Js(S,k,0,100,E,c,u,d,M,i),j=vw(),A=function(){var z=0;return P.map(function(T,H){var W=R[H]||R[R.length-1],K=Js(S,k,z,T,E,c,u,W,M,i);return z+=T,f.createElement(xw,{key:H,color:W,ptg:T,radius:C,prefixCls:a,gradientId:w,style:K,strokeLinecap:M,strokeWidth:i,gapDegree:c,ref:function(U){j[H]=U},size:io})}).reverse()},_=function(){var z=Math.round(O*(P[0]/100)),T=100/O,H=0;return new Array(O).fill(null).map(function(W,K){var G=K<=z-1?R[0]:d,U=G&&mn(G)==="object"?"url(#".concat(w,")"):void 0,Z=Js(S,k,H,T,E,c,u,G,"butt",i,D);return H+=(k-Z.strokeDashoffset+D)*100/k,f.createElement("circle",{key:K,className:"".concat(a,"-circle-path"),r:C,cx:y,cy:y,stroke:U,strokeWidth:i,opacity:1,style:Z,ref:function(Y){j[K]=Y}})})};return f.createElement("svg",Oe({className:pe("".concat(a,"-circle"),v),viewBox:"0 0 ".concat(io," ").concat(io),style:h,id:r,role:"presentation"},b),!O&&f.createElement("circle",{className:"".concat(a,"-circle-trail"),r:C,cx:y,cy:y,stroke:d,strokeLinecap:M,strokeWidth:s||i,style:F}),O?_():A())};function Mr(e){return!e||e<0?0:e>100?100:e}function Ki({success:e,successPercent:t}){let n=t;return e&&"progress"in e&&(n=e.progress),e&&"percent"in e&&(n=e.percent),n}const Sw=({percent:e,success:t,successPercent:n})=>{const r=Mr(Ki({success:t,successPercent:n}));return[r,Mr(Mr(e)-r)]},$w=({success:e={},strokeColor:t})=>{const{strokeColor:n}=e;return[n||Nl.green,t||null]},ws=(e,t,n)=>{var r,a,o,i;let s=-1,l=-1;if(t==="step"){const c=n.steps,u=n.strokeWidth;typeof e=="string"||typeof e>"u"?(s=e==="small"?2:14,l=u??8):typeof e=="number"?[s,l]=[e,e]:[s=14,l=8]=Array.isArray(e)?e:[e.width,e.height],s*=c}else if(t==="line"){const c=n==null?void 0:n.strokeWidth;typeof e=="string"||typeof e>"u"?l=c||(e==="small"?6:8):typeof e=="number"?[s,l]=[e,e]:[s=-1,l=8]=Array.isArray(e)?e:[e.width,e.height]}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[s,l]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[s,l]=[e,e]:Array.isArray(e)&&(s=(a=(r=e[0])!==null&&r!==void 0?r:e[1])!==null&&a!==void 0?a:120,l=(i=(o=e[0])!==null&&o!==void 0?o:e[1])!==null&&i!==void 0?i:120));return[s,l]},Ew=3,kw=e=>Ew/e*100,Iw=e=>{const{prefixCls:t,trailColor:n=null,strokeLinecap:r="round",gapPosition:a,gapDegree:o,width:i=120,type:s,children:l,success:c,size:u=i,steps:d}=e,[g,h]=ws(u,"circle");let{strokeWidth:v}=e;v===void 0&&(v=Math.max(kw(g),6));const m={width:g,height:h,fontSize:g*.15+6},p=f.useMemo(()=>{if(o||o===0)return o;if(s==="dashboard")return 75},[o,s]),b=Sw(e),y=a||s==="dashboard"&&"bottom"||void 0,x=Object.prototype.toString.call(e.strokeColor)==="[object Object]",w=$w({success:c,strokeColor:e.strokeColor}),C=pe(`${t}-inner`,{[`${t}-circle-gradient`]:x}),S=f.createElement(ww,{steps:d,percent:d?b[1]:b,strokeWidth:v,trailWidth:v,strokeColor:d?w[1]:w,strokeLinecap:r,trailColor:n,prefixCls:t,gapDegree:p,gapPosition:y}),E=g<=20,k=f.createElement("div",{className:C,style:m},S,!E&&l);return E?f.createElement(Ro,{title:l},k):k},Wi="--progress-line-stroke-color",Qg="--progress-percent",Yd=e=>{const t=e?"100%":"-100%";return new Ti(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Ow=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:Object.assign(Object.assign({},pn(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${Wi})`]},height:"100%",width:`calc(1 / var(${Qg}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${fe(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:Yd(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:Yd(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},Nw=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[n]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},Dw=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},Mw=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${n}`]:{fontSize:e.fontSizeSM}}}},Fw=e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}),Pw=rr("Progress",e=>{const t=e.calc(e.marginXXS).div(2).equal(),n=Hn(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Ow(n),Nw(n),Dw(n),Mw(n)]},Fw);var jw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const Rw=e=>{let t=[];return Object.keys(e).forEach(n=>{const r=parseFloat(n.replace(/%/g,""));Number.isNaN(r)||t.push({key:r,value:e[n]})}),t=t.sort((n,r)=>n.key-r.key),t.map(({key:n,value:r})=>`${r} ${n}%`).join(", ")},Aw=(e,t)=>{const{from:n=Nl.blue,to:r=Nl.blue,direction:a=t==="rtl"?"to left":"to right"}=e,o=jw(e,["from","to","direction"]);if(Object.keys(o).length!==0){const s=Rw(o),l=`linear-gradient(${a}, ${s})`;return{background:l,[Wi]:l}}const i=`linear-gradient(${a}, ${n}, ${r})`;return{background:i,[Wi]:i}},Tw=e=>{const{prefixCls:t,direction:n,percent:r,size:a,strokeWidth:o,strokeColor:i,strokeLinecap:s="round",children:l,trailColor:c=null,percentPosition:u,success:d}=e,{align:g,type:h}=u,v=i&&typeof i!="string"?Aw(i,n):{[Wi]:i,background:i},m=s==="square"||s==="butt"?0:void 0,p=a??[-1,o||(a==="small"?6:8)],[b,y]=ws(p,"line",{strokeWidth:o}),x={backgroundColor:c||void 0,borderRadius:m},w=Object.assign(Object.assign({width:`${Mr(r)}%`,height:y,borderRadius:m},v),{[Qg]:Mr(r)/100}),C=Ki(e),S={width:`${Mr(C)}%`,height:y,borderRadius:m,backgroundColor:d==null?void 0:d.strokeColor},E={width:b<0?"100%":b},k=f.createElement("div",{className:`${t}-inner`,style:x},f.createElement("div",{className:pe(`${t}-bg`,`${t}-bg-${h}`),style:w},h==="inner"&&l),C!==void 0&&f.createElement("div",{className:`${t}-success-bg`,style:S})),$=h==="outer"&&g==="start",O=h==="outer"&&g==="end";return h==="outer"&&g==="center"?f.createElement("div",{className:`${t}-layout-bottom`},k,l):f.createElement("div",{className:`${t}-outer`,style:E},$&&l,k,O&&l)},_w=e=>{const{size:t,steps:n,rounding:r=Math.round,percent:a=0,strokeWidth:o=8,strokeColor:i,trailColor:s=null,prefixCls:l,children:c}=e,u=r(n*(a/100)),g=t??[t==="small"?2:14,o],[h,v]=ws(g,"step",{steps:n,strokeWidth:o}),m=h/n,p=Array.from({length:n});for(let b=0;b<n;b++){const y=Array.isArray(i)?i[b]:i;p[b]=f.createElement("div",{key:b,className:pe(`${l}-steps-item`,{[`${l}-steps-item-active`]:b<=u-1}),style:{backgroundColor:b<=u-1?y:s,width:m,height:v}})}return f.createElement("div",{className:`${l}-steps-outer`},p,c)};var Bw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const Lw=["normal","exception","active","success"],zw=f.forwardRef((e,t)=>{const{prefixCls:n,className:r,rootClassName:a,steps:o,strokeColor:i,percent:s=0,size:l="default",showInfo:c=!0,type:u="line",status:d,format:g,style:h,percentPosition:v={}}=e,m=Bw(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:p="end",type:b="outer"}=v,y=Array.isArray(i)?i[0]:i,x=typeof i=="string"||Array.isArray(i)?i:void 0,w=f.useMemo(()=>{if(y){const A=typeof y=="string"?y:Object.values(y)[0];return new mr(A).isLight()}return!1},[i]),C=f.useMemo(()=>{var A,_;const L=Ki(e);return parseInt(L!==void 0?(A=L??0)===null||A===void 0?void 0:A.toString():(_=s??0)===null||_===void 0?void 0:_.toString(),10)},[s,e.success,e.successPercent]),S=f.useMemo(()=>!Lw.includes(d)&&C>=100?"success":d||"normal",[d,C]),{getPrefixCls:E,direction:k,progress:$}=f.useContext(cn),O=E("progress",n),[D,P,R]=Pw(O),N=u==="line",I=N&&!o,M=f.useMemo(()=>{if(!c)return null;const A=Ki(e);let _;const L=g||(T=>`${T}%`),z=N&&w&&b==="inner";return b==="inner"||g||S!=="exception"&&S!=="success"?_=L(Mr(s),Mr(A)):S==="exception"?_=N?f.createElement(ty,null):f.createElement(ny,null):S==="success"&&(_=N?f.createElement(ry,null):f.createElement(py,null)),f.createElement("span",{className:pe(`${O}-text`,{[`${O}-text-bright`]:z,[`${O}-text-${p}`]:I,[`${O}-text-${b}`]:I}),title:typeof _=="string"?_:void 0},_)},[c,s,C,S,u,O,g]);let F;u==="line"?F=o?f.createElement(_w,Object.assign({},e,{strokeColor:x,prefixCls:O,steps:typeof o=="object"?o.count:o}),M):f.createElement(Tw,Object.assign({},e,{strokeColor:y,prefixCls:O,direction:k,percentPosition:{align:p,type:b}}),M):(u==="circle"||u==="dashboard")&&(F=f.createElement(Iw,Object.assign({},e,{strokeColor:y,prefixCls:O,progressStatus:S}),M));const j=pe(O,`${O}-status-${S}`,{[`${O}-${u==="dashboard"&&"circle"||u}`]:u!=="line",[`${O}-inline-circle`]:u==="circle"&&ws(l,"circle")[0]<=20,[`${O}-line`]:I,[`${O}-line-align-${p}`]:I,[`${O}-line-position-${b}`]:I,[`${O}-steps`]:o,[`${O}-show-info`]:c,[`${O}-${l}`]:typeof l=="string",[`${O}-rtl`]:k==="rtl"},$==null?void 0:$.className,r,a,P,R);return D(f.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},$==null?void 0:$.style),h),className:j,role:"progressbar","aria-valuenow":C,"aria-valuemin":0,"aria-valuemax":100},Vn(m,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),F))});var Hw={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"},Vw=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:Hw}))},Kw=f.forwardRef(Vw),Ww={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},qw=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:Ww}))},Uw=f.forwardRef(qw),Yw={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"},Gw=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:Yw}))},Xw=f.forwardRef(Gw),Jw={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"},Qw=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:Jw}))},Zg=f.forwardRef(Qw),Zw={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:n}},{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.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"},eS=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:Zw}))},tS=f.forwardRef(eS),nS={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"},rS=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:nS}))},aS=f.forwardRef(rS),oS={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"},iS=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:oS}))},sS=f.forwardRef(iS),lS={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"},cS=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:lS}))},uS=f.forwardRef(cS),dS={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"},fS=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:dS}))},mS=f.forwardRef(fS),pS={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},gS=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:pS}))},vS=f.forwardRef(gS),hS={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:n}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:n}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:n}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"},yS=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:hS}))},bS=f.forwardRef(yS),xS={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"},CS=function(t,n){return f.createElement(hn,Oe({},t,{ref:n,icon:xS}))},wS=f.forwardRef(CS),$u=f.createContext(null),SS=f.createContext({}),$S=function(t){for(var n=t.prefixCls,r=t.level,a=t.isStart,o=t.isEnd,i="".concat(n,"-indent-unit"),s=[],l=0;l<r;l+=1)s.push(f.createElement("span",{key:l,className:pe(i,J(J({},"".concat(i,"-start"),a[l]),"".concat(i,"-end"),o[l]))}));return f.createElement("span",{"aria-hidden":"true",className:"".concat(n,"-indent")},s)};const ES=f.memo($S);var kS=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],Gd="open",Xd="close",IS="---",yo=function(t){var n,r,a,o=t.eventKey,i=t.className,s=t.style,l=t.dragOver,c=t.dragOverGapTop,u=t.dragOverGapBottom,d=t.isLeaf,g=t.isStart,h=t.isEnd,v=t.expanded,m=t.selected,p=t.checked,b=t.halfChecked,y=t.loading,x=t.domRef,w=t.active,C=t.data,S=t.onMouseMove,E=t.selectable,k=Nt(t,kS),$=be.useContext($u),O=be.useContext(SS),D=be.useRef(null),P=be.useState(!1),R=oe(P,2),N=R[0],I=R[1],M=!!($.disabled||t.disabled||(n=O.nodeDisabled)!==null&&n!==void 0&&n.call(O,C)),F=be.useMemo(function(){return!$.checkable||t.checkable===!1?!1:$.checkable},[$.checkable,t.checkable]),j=function(ae){M||$.onNodeSelect(ae,Qt(t))},A=function(ae){M||!F||t.disableCheckbox||$.onNodeCheck(ae,Qt(t),!p)},_=be.useMemo(function(){return typeof E=="boolean"?E:$.selectable},[E,$.selectable]),L=function(ae){$.onNodeClick(ae,Qt(t)),_?j(ae):A(ae)},z=function(ae){$.onNodeDoubleClick(ae,Qt(t))},T=function(ae){$.onNodeMouseEnter(ae,Qt(t))},H=function(ae){$.onNodeMouseLeave(ae,Qt(t))},W=function(ae){$.onNodeContextMenu(ae,Qt(t))},K=be.useMemo(function(){return!!($.draggable&&(!$.draggable.nodeDraggable||$.draggable.nodeDraggable(C)))},[$.draggable,C]),G=function(ae){ae.stopPropagation(),I(!0),$.onNodeDragStart(ae,t);try{ae.dataTransfer.setData("text/plain","")}catch{}},U=function(ae){ae.preventDefault(),ae.stopPropagation(),$.onNodeDragEnter(ae,t)},Z=function(ae){ae.preventDefault(),ae.stopPropagation(),$.onNodeDragOver(ae,t)},Q=function(ae){ae.stopPropagation(),$.onNodeDragLeave(ae,t)},Y=function(ae){ae.stopPropagation(),I(!1),$.onNodeDragEnd(ae,t)},ee=function(ae){ae.preventDefault(),ae.stopPropagation(),I(!1),$.onNodeDrop(ae,t)},ce=function(ae){y||$.onNodeExpand(ae,Qt(t))},me=be.useMemo(function(){var Fe=Fn($.keyEntities,o)||{},ae=Fe.children;return!!(ae||[]).length},[$.keyEntities,o]),we=be.useMemo(function(){return d===!1?!1:d||!$.loadData&&!me||$.loadData&&t.loaded&&!me},[d,$.loadData,me,t.loaded]);be.useEffect(function(){y||typeof $.loadData=="function"&&v&&!we&&!t.loaded&&$.onNodeLoad(Qt(t))},[y,$.loadData,$.onNodeLoad,v,we,t]);var se=be.useMemo(function(){var Fe;return(Fe=$.draggable)!==null&&Fe!==void 0&&Fe.icon?be.createElement("span",{className:"".concat($.prefixCls,"-draggable-icon")},$.draggable.icon):null},[$.draggable]),ge=function(ae){var Le=t.switcherIcon||$.switcherIcon;return typeof Le=="function"?Le(ye(ye({},t),{},{isLeaf:ae})):Le},Ee=function(){if(we){var ae=ge(!0);return ae!==!1?be.createElement("span",{className:pe("".concat($.prefixCls,"-switcher"),"".concat($.prefixCls,"-switcher-noop"))},ae):null}var Le=ge(!1);return Le!==!1?be.createElement("span",{onClick:ce,className:pe("".concat($.prefixCls,"-switcher"),"".concat($.prefixCls,"-switcher_").concat(v?Gd:Xd))},Le):null},Te=be.useMemo(function(){if(!F)return null;var Fe=typeof F!="boolean"?F:null;return be.createElement("span",{className:pe("".concat($.prefixCls,"-checkbox"),J(J(J({},"".concat($.prefixCls,"-checkbox-checked"),p),"".concat($.prefixCls,"-checkbox-indeterminate"),!p&&b),"".concat($.prefixCls,"-checkbox-disabled"),M||t.disableCheckbox)),onClick:A,role:"checkbox","aria-checked":b?"mixed":p,"aria-disabled":M||t.disableCheckbox,"aria-label":"Select ".concat(typeof t.title=="string"?t.title:"tree node")},Fe)},[F,p,b,M,t.disableCheckbox,t.title]),Pe=be.useMemo(function(){return we?null:v?Gd:Xd},[we,v]),he=be.useMemo(function(){return be.createElement("span",{className:pe("".concat($.prefixCls,"-iconEle"),"".concat($.prefixCls,"-icon__").concat(Pe||"docu"),J({},"".concat($.prefixCls,"-icon_loading"),y))})},[$.prefixCls,Pe,y]),ke=be.useMemo(function(){var Fe=!!$.draggable,ae=!t.disabled&&Fe&&$.dragOverNodeKey===o;return ae?$.dropIndicatorRender({dropPosition:$.dropPosition,dropLevelOffset:$.dropLevelOffset,indent:$.indent,prefixCls:$.prefixCls,direction:$.direction}):null},[$.dropPosition,$.dropLevelOffset,$.indent,$.prefixCls,$.direction,$.draggable,$.dragOverNodeKey,$.dropIndicatorRender]),de=be.useMemo(function(){var Fe=t.title,ae=Fe===void 0?IS:Fe,Le="".concat($.prefixCls,"-node-content-wrapper"),Ce;if($.showIcon){var $e=t.icon||$.icon;Ce=$e?be.createElement("span",{className:pe("".concat($.prefixCls,"-iconEle"),"".concat($.prefixCls,"-icon__customize"))},typeof $e=="function"?$e(t):$e):he}else $.loadData&&y&&(Ce=he);var ue;return typeof ae=="function"?ue=ae(C):$.titleRender?ue=$.titleRender(C):ue=ae,be.createElement("span",{ref:D,title:typeof ae=="string"?ae:"",className:pe(Le,"".concat(Le,"-").concat(Pe||"normal"),J({},"".concat($.prefixCls,"-node-selected"),!M&&(m||N))),onMouseEnter:T,onMouseLeave:H,onContextMenu:W,onClick:L,onDoubleClick:z},Ce,be.createElement("span",{className:"".concat($.prefixCls,"-title")},ue),ke)},[$.prefixCls,$.showIcon,t,$.icon,he,$.titleRender,C,Pe,T,H,W,L,z]),Re=la(k,{aria:!0,data:!0}),He=Fn($.keyEntities,o)||{},Ke=He.level,tt=h[h.length-1],qe=!M&&K,We=$.draggingNodeKey===o,lt=E!==void 0?{"aria-selected":!!E}:void 0;return be.createElement("div",Oe({ref:x,role:"treeitem","aria-expanded":d?void 0:v,className:pe(i,"".concat($.prefixCls,"-treenode"),(a={},J(J(J(J(J(J(J(J(J(J(a,"".concat($.prefixCls,"-treenode-disabled"),M),"".concat($.prefixCls,"-treenode-switcher-").concat(v?"open":"close"),!d),"".concat($.prefixCls,"-treenode-checkbox-checked"),p),"".concat($.prefixCls,"-treenode-checkbox-indeterminate"),b),"".concat($.prefixCls,"-treenode-selected"),m),"".concat($.prefixCls,"-treenode-loading"),y),"".concat($.prefixCls,"-treenode-active"),w),"".concat($.prefixCls,"-treenode-leaf-last"),tt),"".concat($.prefixCls,"-treenode-draggable"),K),"dragging",We),J(J(J(J(J(J(J(a,"drop-target",$.dropTargetKey===o),"drop-container",$.dropContainerKey===o),"drag-over",!M&&l),"drag-over-gap-top",!M&&c),"drag-over-gap-bottom",!M&&u),"filter-node",(r=$.filterTreeNode)===null||r===void 0?void 0:r.call($,Qt(t))),"".concat($.prefixCls,"-treenode-leaf"),we))),style:s,draggable:qe,onDragStart:qe?G:void 0,onDragEnter:K?U:void 0,onDragOver:K?Z:void 0,onDragLeave:K?Q:void 0,onDrop:K?ee:void 0,onDragEnd:K?Y:void 0,onMouseMove:S},lt,Re),be.createElement(ES,{prefixCls:$.prefixCls,level:Ke,isStart:g,isEnd:h}),se,Ee(),Te,de)};yo.isTreeNode=1;function vr(e,t){if(!e)return[];var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function wr(e,t){var n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function Eu(e){return e.split("-")}function OS(e,t){var n=[],r=Fn(t,e);function a(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(i){var s=i.key,l=i.children;n.push(s),a(l)})}return a(r.children),n}function NS(e){if(e.parent){var t=Eu(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function DS(e){var t=Eu(e.pos);return Number(t[t.length-1])===0}function Jd(e,t,n,r,a,o,i,s,l,c){var u,d=e.clientX,g=e.clientY,h=e.target.getBoundingClientRect(),v=h.top,m=h.height,p=(c==="rtl"?-1:1)*(((a==null?void 0:a.x)||0)-d),b=(p-12)/r,y=l.filter(function(M){var F;return(F=s[M])===null||F===void 0||(F=F.children)===null||F===void 0?void 0:F.length}),x=Fn(s,n.eventKey);if(g<v+m/2){var w=i.findIndex(function(M){return M.key===x.key}),C=w<=0?0:w-1,S=i[C].key;x=Fn(s,S)}var E=x.key,k=x,$=x.key,O=0,D=0;if(!y.includes(E))for(var P=0;P<b&&NS(x);P+=1)x=x.parent,D+=1;var R=t.data,N=x.node,I=!0;return DS(x)&&x.level===0&&g<v+m/2&&o({dragNode:R,dropNode:N,dropPosition:-1})&&x.key===n.eventKey?O=-1:(k.children||[]).length&&y.includes($)?o({dragNode:R,dropNode:N,dropPosition:0})?O=0:I=!1:D===0?b>-1.5?o({dragNode:R,dropNode:N,dropPosition:1})?O=1:I=!1:o({dragNode:R,dropNode:N,dropPosition:0})?O=0:o({dragNode:R,dropNode:N,dropPosition:1})?O=1:I=!1:o({dragNode:R,dropNode:N,dropPosition:1})?O=1:I=!1,{dropPosition:O,dropLevelOffset:D,dropTargetKey:x.key,dropTargetPos:x.pos,dragOverNodeKey:$,dropContainerKey:O===0?null:((u=x.parent)===null||u===void 0?void 0:u.key)||null,dropAllowed:I}}function Qd(e,t){if(e){var n=t.multiple;return n?e.slice():e.length?[e[0]]:e}}function Qs(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(mn(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return In(!1,"`checkedKeys` is not an array or an object"),null;return t}function Wl(e,t){var n=new Set;function r(a){if(!n.has(a)){var o=Fn(t,a);if(o){n.add(a);var i=o.parent,s=o.node;s.disabled||i&&r(i.key)}}}return(e||[]).forEach(function(a){r(a)}),rt(n)}var MS=function(t){var n=t.dropPosition,r=t.dropLevelOffset,a=t.indent,o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(n){case-1:o.top=0,o.left=-r*a;break;case 1:o.bottom=0,o.left=-r*a;break;case 0:o.bottom=0,o.left=a;break}return be.createElement("div",{style:o})};function ev(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function FS(e,t){var n=f.useState(!1),r=oe(n,2),a=r[0],o=r[1];Rn(function(){if(a)return e(),function(){t()}},[a]),Rn(function(){return o(!0),function(){o(!1)}},[])}var PS=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],jS=f.forwardRef(function(e,t){var n=e.className,r=e.style,a=e.motion,o=e.motionNodes,i=e.motionType,s=e.onMotionStart,l=e.onMotionEnd,c=e.active,u=e.treeNodeRequiredProps,d=Nt(e,PS),g=f.useState(!0),h=oe(g,2),v=h[0],m=h[1],p=f.useContext($u),b=p.prefixCls,y=o&&i!=="hide";Rn(function(){o&&y!==v&&m(y)},[o]);var x=function(){o&&s()},w=f.useRef(!1),C=function(){o&&!w.current&&(w.current=!0,l())};FS(x,C);var S=function(k){y===k&&C()};return o?f.createElement(rs,Oe({ref:t,visible:v},a,{motionAppear:i==="show",onVisibleChanged:S}),function(E,k){var $=E.className,O=E.style;return f.createElement("div",{ref:k,className:pe("".concat(b,"-treenode-motion"),$),style:O},o.map(function(D){var P=Object.assign({},(ev(D.data),D.data)),R=D.title,N=D.key,I=D.isStart,M=D.isEnd;delete P.children;var F=uo(N,u);return f.createElement(yo,Oe({},P,F,{title:R,active:c,data:D.data,key:N,isStart:I,isEnd:M}))}))}):f.createElement(yo,Oe({domRef:t,className:n,style:r},d,{active:c}))});function RS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function a(o,i){var s=new Map;o.forEach(function(c){s.set(c,!0)});var l=i.filter(function(c){return!s.has(c)});return l.length===1?l[0]:null}return n<r?{add:!0,key:a(e,t)}:{add:!1,key:a(t,e)}}function Zd(e,t,n){var r=e.findIndex(function(s){return s.key===n}),a=e[r+1],o=t.findIndex(function(s){return s.key===n});if(a){var i=t.findIndex(function(s){return s.key===a.key});return t.slice(o+1,i)}return t.slice(o+1)}var AS=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],ef={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},TS=function(){},ta="RC_TREE_MOTION_".concat(Math.random()),ql={key:ta},tv={key:ta,level:0,index:0,pos:"0",node:ql,nodes:[ql]},tf={parent:null,children:[],pos:tv.pos,data:ql,title:null,key:ta,isStart:[],isEnd:[]};function nf(e,t,n,r){return t===!1||!n?e:e.slice(0,Math.ceil(n/r)+1)}function rf(e){var t=e.key,n=e.pos;return Bo(t,n)}function _S(e){for(var t=String(e.data.key),n=e;n.parent;)n=n.parent,t="".concat(n.data.key," > ").concat(t);return t}var BS=f.forwardRef(function(e,t){var n=e.prefixCls,r=e.data;e.selectable,e.checkable;var a=e.expandedKeys,o=e.selectedKeys,i=e.checkedKeys,s=e.loadedKeys,l=e.loadingKeys,c=e.halfCheckedKeys,u=e.keyEntities,d=e.disabled,g=e.dragging,h=e.dragOverNodeKey,v=e.dropPosition,m=e.motion,p=e.height,b=e.itemHeight,y=e.virtual,x=e.scrollWidth,w=e.focusable,C=e.activeItem,S=e.focused,E=e.tabIndex,k=e.onKeyDown,$=e.onFocus,O=e.onBlur,D=e.onActiveChange,P=e.onListChangeStart,R=e.onListChangeEnd,N=Nt(e,AS),I=f.useRef(null),M=f.useRef(null);f.useImperativeHandle(t,function(){return{scrollTo:function(ke){I.current.scrollTo(ke)},getIndentWidth:function(){return M.current.offsetWidth}}});var F=f.useState(a),j=oe(F,2),A=j[0],_=j[1],L=f.useState(r),z=oe(L,2),T=z[0],H=z[1],W=f.useState(r),K=oe(W,2),G=K[0],U=K[1],Z=f.useState([]),Q=oe(Z,2),Y=Q[0],ee=Q[1],ce=f.useState(null),me=oe(ce,2),we=me[0],se=me[1],ge=f.useRef(r);ge.current=r;function Ee(){var he=ge.current;H(he),U(he),ee([]),se(null),R()}Rn(function(){_(a);var he=RS(A,a);if(he.key!==null)if(he.add){var ke=T.findIndex(function(qe){var We=qe.key;return We===he.key}),de=nf(Zd(T,r,he.key),y,p,b),Re=T.slice();Re.splice(ke+1,0,tf),U(Re),ee(de),se("show")}else{var He=r.findIndex(function(qe){var We=qe.key;return We===he.key}),Ke=nf(Zd(r,T,he.key),y,p,b),tt=r.slice();tt.splice(He+1,0,tf),U(tt),ee(Ke),se("hide")}else T!==r&&(H(r),U(r))},[a,r]),f.useEffect(function(){g||Ee()},[g]);var Te=m?G:r,Pe={expandedKeys:a,selectedKeys:o,loadedKeys:s,loadingKeys:l,checkedKeys:i,halfCheckedKeys:c,dragOverNodeKey:h,dropPosition:v,keyEntities:u};return f.createElement(f.Fragment,null,S&&C&&f.createElement("span",{style:ef,"aria-live":"assertive"},_S(C)),f.createElement("div",null,f.createElement("input",{style:ef,disabled:w===!1||d,tabIndex:w!==!1?E:null,onKeyDown:k,onFocus:$,onBlur:O,value:"",onChange:TS,"aria-label":"for screen reader"})),f.createElement("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},f.createElement("div",{className:"".concat(n,"-indent")},f.createElement("div",{ref:M,className:"".concat(n,"-indent-unit")}))),f.createElement(gy,Oe({},N,{data:Te,itemKey:rf,height:p,fullHeight:!1,virtual:y,itemHeight:b,scrollWidth:x,prefixCls:"".concat(n,"-list"),ref:I,role:"tree",onVisibleChange:function(ke){ke.every(function(de){return rf(de)!==ta})&&Ee()}}),function(he){var ke=he.pos,de=Object.assign({},(ev(he.data),he.data)),Re=he.title,He=he.key,Ke=he.isStart,tt=he.isEnd,qe=Bo(He,ke);delete de.key,delete de.children;var We=uo(qe,Pe);return f.createElement(jS,Oe({},de,We,{title:Re,active:!!C&&He===C.key,pos:ke,data:he.data,isStart:Ke,isEnd:tt,motion:m,motionNodes:He===ta?Y:null,motionType:we,onMotionStart:P,onMotionEnd:Ee,treeNodeRequiredProps:Pe,onMouseMove:function(){D(null)}}))}))}),LS=10,ku=(function(e){es(n,e);var t=ts(n);function n(){var r;aa(this,n);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return r=t.call.apply(t,[this].concat(o)),J(Xe(r),"destroyed",!1),J(Xe(r),"delayedDragEnterLogic",void 0),J(Xe(r),"loadingRetryTimes",{}),J(Xe(r),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:Oa()}),J(Xe(r),"dragStartMousePosition",null),J(Xe(r),"dragNodeProps",null),J(Xe(r),"currentMouseOverDroppableNodeKey",null),J(Xe(r),"listRef",f.createRef()),J(Xe(r),"onNodeDragStart",function(s,l){var c=r.state,u=c.expandedKeys,d=c.keyEntities,g=r.props.onDragStart,h=l.eventKey;r.dragNodeProps=l,r.dragStartMousePosition={x:s.clientX,y:s.clientY};var v=vr(u,h);r.setState({draggingNodeKey:h,dragChildrenKeys:OS(h,d),indent:r.listRef.current.getIndentWidth()}),r.setExpandedKeys(v),window.addEventListener("dragend",r.onWindowDragEnd),g==null||g({event:s,node:Qt(l)})}),J(Xe(r),"onNodeDragEnter",function(s,l){var c=r.state,u=c.expandedKeys,d=c.keyEntities,g=c.dragChildrenKeys,h=c.flattenNodes,v=c.indent,m=r.props,p=m.onDragEnter,b=m.onExpand,y=m.allowDrop,x=m.direction,w=l.pos,C=l.eventKey;if(r.currentMouseOverDroppableNodeKey!==C&&(r.currentMouseOverDroppableNodeKey=C),!r.dragNodeProps){r.resetDragState();return}var S=Jd(s,r.dragNodeProps,l,v,r.dragStartMousePosition,y,h,d,u,x),E=S.dropPosition,k=S.dropLevelOffset,$=S.dropTargetKey,O=S.dropContainerKey,D=S.dropTargetPos,P=S.dropAllowed,R=S.dragOverNodeKey;if(g.includes($)||!P){r.resetDragState();return}if(r.delayedDragEnterLogic||(r.delayedDragEnterLogic={}),Object.keys(r.delayedDragEnterLogic).forEach(function(N){clearTimeout(r.delayedDragEnterLogic[N])}),r.dragNodeProps.eventKey!==l.eventKey&&(s.persist(),r.delayedDragEnterLogic[w]=window.setTimeout(function(){if(r.state.draggingNodeKey!==null){var N=rt(u),I=Fn(d,l.eventKey);I&&(I.children||[]).length&&(N=wr(u,l.eventKey)),r.props.hasOwnProperty("expandedKeys")||r.setExpandedKeys(N),b==null||b(N,{node:Qt(l),expanded:!0,nativeEvent:s.nativeEvent})}},800)),r.dragNodeProps.eventKey===$&&k===0){r.resetDragState();return}r.setState({dragOverNodeKey:R,dropPosition:E,dropLevelOffset:k,dropTargetKey:$,dropContainerKey:O,dropTargetPos:D,dropAllowed:P}),p==null||p({event:s,node:Qt(l),expandedKeys:u})}),J(Xe(r),"onNodeDragOver",function(s,l){var c=r.state,u=c.dragChildrenKeys,d=c.flattenNodes,g=c.keyEntities,h=c.expandedKeys,v=c.indent,m=r.props,p=m.onDragOver,b=m.allowDrop,y=m.direction;if(r.dragNodeProps){var x=Jd(s,r.dragNodeProps,l,v,r.dragStartMousePosition,b,d,g,h,y),w=x.dropPosition,C=x.dropLevelOffset,S=x.dropTargetKey,E=x.dropContainerKey,k=x.dropTargetPos,$=x.dropAllowed,O=x.dragOverNodeKey;u.includes(S)||!$||(r.dragNodeProps.eventKey===S&&C===0?r.state.dropPosition===null&&r.state.dropLevelOffset===null&&r.state.dropTargetKey===null&&r.state.dropContainerKey===null&&r.state.dropTargetPos===null&&r.state.dropAllowed===!1&&r.state.dragOverNodeKey===null||r.resetDragState():w===r.state.dropPosition&&C===r.state.dropLevelOffset&&S===r.state.dropTargetKey&&E===r.state.dropContainerKey&&k===r.state.dropTargetPos&&$===r.state.dropAllowed&&O===r.state.dragOverNodeKey||r.setState({dropPosition:w,dropLevelOffset:C,dropTargetKey:S,dropContainerKey:E,dropTargetPos:k,dropAllowed:$,dragOverNodeKey:O}),p==null||p({event:s,node:Qt(l)}))}}),J(Xe(r),"onNodeDragLeave",function(s,l){r.currentMouseOverDroppableNodeKey===l.eventKey&&!s.currentTarget.contains(s.relatedTarget)&&(r.resetDragState(),r.currentMouseOverDroppableNodeKey=null);var c=r.props.onDragLeave;c==null||c({event:s,node:Qt(l)})}),J(Xe(r),"onWindowDragEnd",function(s){r.onNodeDragEnd(s,null,!0),window.removeEventListener("dragend",r.onWindowDragEnd)}),J(Xe(r),"onNodeDragEnd",function(s,l){var c=r.props.onDragEnd;r.setState({dragOverNodeKey:null}),r.cleanDragState(),c==null||c({event:s,node:Qt(l)}),r.dragNodeProps=null,window.removeEventListener("dragend",r.onWindowDragEnd)}),J(Xe(r),"onNodeDrop",function(s,l){var c,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=r.state,g=d.dragChildrenKeys,h=d.dropPosition,v=d.dropTargetKey,m=d.dropTargetPos,p=d.dropAllowed;if(p){var b=r.props.onDrop;if(r.setState({dragOverNodeKey:null}),r.cleanDragState(),v!==null){var y=ye(ye({},uo(v,r.getTreeNodeRequiredProps())),{},{active:((c=r.getActiveItem())===null||c===void 0?void 0:c.key)===v,data:Fn(r.state.keyEntities,v).node}),x=g.includes(v);In(!x,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var w=Eu(m),C={event:s,node:Qt(y),dragNode:r.dragNodeProps?Qt(r.dragNodeProps):null,dragNodesKeys:[r.dragNodeProps.eventKey].concat(g),dropToGap:h!==0,dropPosition:h+Number(w[w.length-1])};u||b==null||b(C),r.dragNodeProps=null}}}),J(Xe(r),"cleanDragState",function(){var s=r.state.draggingNodeKey;s!==null&&r.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),r.dragStartMousePosition=null,r.currentMouseOverDroppableNodeKey=null}),J(Xe(r),"triggerExpandActionExpand",function(s,l){var c=r.state,u=c.expandedKeys,d=c.flattenNodes,g=l.expanded,h=l.key,v=l.isLeaf;if(!(v||s.shiftKey||s.metaKey||s.ctrlKey)){var m=d.filter(function(b){return b.key===h})[0],p=Qt(ye(ye({},uo(h,r.getTreeNodeRequiredProps())),{},{data:m.data}));r.setExpandedKeys(g?vr(u,h):wr(u,h)),r.onNodeExpand(s,p)}}),J(Xe(r),"onNodeClick",function(s,l){var c=r.props,u=c.onClick,d=c.expandAction;d==="click"&&r.triggerExpandActionExpand(s,l),u==null||u(s,l)}),J(Xe(r),"onNodeDoubleClick",function(s,l){var c=r.props,u=c.onDoubleClick,d=c.expandAction;d==="doubleClick"&&r.triggerExpandActionExpand(s,l),u==null||u(s,l)}),J(Xe(r),"onNodeSelect",function(s,l){var c=r.state.selectedKeys,u=r.state,d=u.keyEntities,g=u.fieldNames,h=r.props,v=h.onSelect,m=h.multiple,p=l.selected,b=l[g.key],y=!p;y?m?c=wr(c,b):c=[b]:c=vr(c,b);var x=c.map(function(w){var C=Fn(d,w);return C?C.node:null}).filter(Boolean);r.setUncontrolledState({selectedKeys:c}),v==null||v(c,{event:"select",selected:y,node:l,selectedNodes:x,nativeEvent:s.nativeEvent})}),J(Xe(r),"onNodeCheck",function(s,l,c){var u=r.state,d=u.keyEntities,g=u.checkedKeys,h=u.halfCheckedKeys,v=r.props,m=v.checkStrictly,p=v.onCheck,b=l.key,y,x={event:"check",node:l,checked:c,nativeEvent:s.nativeEvent};if(m){var w=c?wr(g,b):vr(g,b),C=vr(h,b);y={checked:w,halfChecked:C},x.checkedNodes=w.map(function(D){return Fn(d,D)}).filter(Boolean).map(function(D){return D.node}),r.setUncontrolledState({checkedKeys:w})}else{var S=Gs([].concat(rt(g),[b]),!0,d),E=S.checkedKeys,k=S.halfCheckedKeys;if(!c){var $=new Set(E);$.delete(b);var O=Gs(Array.from($),{halfCheckedKeys:k},d);E=O.checkedKeys,k=O.halfCheckedKeys}y=E,x.checkedNodes=[],x.checkedNodesPositions=[],x.halfCheckedKeys=k,E.forEach(function(D){var P=Fn(d,D);if(P){var R=P.node,N=P.pos;x.checkedNodes.push(R),x.checkedNodesPositions.push({node:R,pos:N})}}),r.setUncontrolledState({checkedKeys:E},!1,{halfCheckedKeys:k})}p==null||p(y,x)}),J(Xe(r),"onNodeLoad",function(s){var l,c=s.key,u=r.state.keyEntities,d=Fn(u,c);if(!(d!=null&&(l=d.children)!==null&&l!==void 0&&l.length)){var g=new Promise(function(h,v){r.setState(function(m){var p=m.loadedKeys,b=p===void 0?[]:p,y=m.loadingKeys,x=y===void 0?[]:y,w=r.props,C=w.loadData,S=w.onLoad;if(!C||b.includes(c)||x.includes(c))return null;var E=C(s);return E.then(function(){var k=r.state.loadedKeys,$=wr(k,c);S==null||S($,{event:"load",node:s}),r.setUncontrolledState({loadedKeys:$}),r.setState(function(O){return{loadingKeys:vr(O.loadingKeys,c)}}),h()}).catch(function(k){if(r.setState(function(O){return{loadingKeys:vr(O.loadingKeys,c)}}),r.loadingRetryTimes[c]=(r.loadingRetryTimes[c]||0)+1,r.loadingRetryTimes[c]>=LS){var $=r.state.loadedKeys;In(!1,"Retry for `loadData` many times but still failed. No more retry."),r.setUncontrolledState({loadedKeys:wr($,c)}),h()}v(k)}),{loadingKeys:wr(x,c)}})});return g.catch(function(){}),g}}),J(Xe(r),"onNodeMouseEnter",function(s,l){var c=r.props.onMouseEnter;c==null||c({event:s,node:l})}),J(Xe(r),"onNodeMouseLeave",function(s,l){var c=r.props.onMouseLeave;c==null||c({event:s,node:l})}),J(Xe(r),"onNodeContextMenu",function(s,l){var c=r.props.onRightClick;c&&(s.preventDefault(),c({event:s,node:l}))}),J(Xe(r),"onFocus",function(){var s=r.props.onFocus;r.setState({focused:!0});for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];s==null||s.apply(void 0,c)}),J(Xe(r),"onBlur",function(){var s=r.props.onBlur;r.setState({focused:!1}),r.onActiveChange(null);for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];s==null||s.apply(void 0,c)}),J(Xe(r),"getTreeNodeRequiredProps",function(){var s=r.state,l=s.expandedKeys,c=s.selectedKeys,u=s.loadedKeys,d=s.loadingKeys,g=s.checkedKeys,h=s.halfCheckedKeys,v=s.dragOverNodeKey,m=s.dropPosition,p=s.keyEntities;return{expandedKeys:l||[],selectedKeys:c||[],loadedKeys:u||[],loadingKeys:d||[],checkedKeys:g||[],halfCheckedKeys:h||[],dragOverNodeKey:v,dropPosition:m,keyEntities:p}}),J(Xe(r),"setExpandedKeys",function(s){var l=r.state,c=l.treeData,u=l.fieldNames,d=Ys(c,s,u);r.setUncontrolledState({expandedKeys:s,flattenNodes:d},!0)}),J(Xe(r),"onNodeExpand",function(s,l){var c=r.state.expandedKeys,u=r.state,d=u.listChanging,g=u.fieldNames,h=r.props,v=h.onExpand,m=h.loadData,p=l.expanded,b=l[g.key];if(!d){var y=c.includes(b),x=!p;if(In(p&&y||!p&&!y,"Expand state not sync with index check"),c=x?wr(c,b):vr(c,b),r.setExpandedKeys(c),v==null||v(c,{node:l,expanded:x,nativeEvent:s.nativeEvent}),x&&m){var w=r.onNodeLoad(l);w&&w.then(function(){var C=Ys(r.state.treeData,c,g);r.setUncontrolledState({flattenNodes:C})}).catch(function(){var C=r.state.expandedKeys,S=vr(C,b);r.setExpandedKeys(S)})}}}),J(Xe(r),"onListChangeStart",function(){r.setUncontrolledState({listChanging:!0})}),J(Xe(r),"onListChangeEnd",function(){setTimeout(function(){r.setUncontrolledState({listChanging:!1})})}),J(Xe(r),"onActiveChange",function(s){var l=r.state.activeKey,c=r.props,u=c.onActiveChange,d=c.itemScrollOffset,g=d===void 0?0:d;l!==s&&(r.setState({activeKey:s}),s!==null&&r.scrollTo({key:s,offset:g}),u==null||u(s))}),J(Xe(r),"getActiveItem",function(){var s=r.state,l=s.activeKey,c=s.flattenNodes;return l===null?null:c.find(function(u){var d=u.key;return d===l})||null}),J(Xe(r),"offsetActiveKey",function(s){var l=r.state,c=l.flattenNodes,u=l.activeKey,d=c.findIndex(function(v){var m=v.key;return m===u});d===-1&&s<0&&(d=c.length),d=(d+s+c.length)%c.length;var g=c[d];if(g){var h=g.key;r.onActiveChange(h)}else r.onActiveChange(null)}),J(Xe(r),"onKeyDown",function(s){var l=r.state,c=l.activeKey,u=l.expandedKeys,d=l.checkedKeys,g=l.fieldNames,h=r.props,v=h.onKeyDown,m=h.checkable,p=h.selectable;switch(s.which){case Et.UP:{r.offsetActiveKey(-1),s.preventDefault();break}case Et.DOWN:{r.offsetActiveKey(1),s.preventDefault();break}}var b=r.getActiveItem();if(b&&b.data){var y=r.getTreeNodeRequiredProps(),x=b.data.isLeaf===!1||!!(b.data[g.children]||[]).length,w=Qt(ye(ye({},uo(c,y)),{},{data:b.data,active:!0}));switch(s.which){case Et.LEFT:{x&&u.includes(c)?r.onNodeExpand({},w):b.parent&&r.onActiveChange(b.parent.key),s.preventDefault();break}case Et.RIGHT:{x&&!u.includes(c)?r.onNodeExpand({},w):b.children&&b.children.length&&r.onActiveChange(b.children[0].key),s.preventDefault();break}case Et.ENTER:case Et.SPACE:{m&&!w.disabled&&w.checkable!==!1&&!w.disableCheckbox?r.onNodeCheck({},w,!d.includes(c)):!m&&p&&!w.disabled&&w.selectable!==!1&&r.onNodeSelect({},w);break}}}v==null||v(s)}),J(Xe(r),"setUncontrolledState",function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!r.destroyed){var u=!1,d=!0,g={};Object.keys(s).forEach(function(h){if(r.props.hasOwnProperty(h)){d=!1;return}u=!0,g[h]=s[h]}),u&&(!l||d)&&r.setState(ye(ye({},g),c))}}),J(Xe(r),"scrollTo",function(s){r.listRef.current.scrollTo(s)}),r}return oa(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var a=this.props,o=a.activeKey,i=a.itemScrollOffset,s=i===void 0?0:i;o!==void 0&&o!==this.state.activeKey&&(this.setState({activeKey:o}),o!==null&&this.scrollTo({key:o,offset:s}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var a=this.state,o=a.focused,i=a.flattenNodes,s=a.keyEntities,l=a.draggingNodeKey,c=a.activeKey,u=a.dropLevelOffset,d=a.dropContainerKey,g=a.dropTargetKey,h=a.dropPosition,v=a.dragOverNodeKey,m=a.indent,p=this.props,b=p.prefixCls,y=p.className,x=p.style,w=p.showLine,C=p.focusable,S=p.tabIndex,E=S===void 0?0:S,k=p.selectable,$=p.showIcon,O=p.icon,D=p.switcherIcon,P=p.draggable,R=p.checkable,N=p.checkStrictly,I=p.disabled,M=p.motion,F=p.loadData,j=p.filterTreeNode,A=p.height,_=p.itemHeight,L=p.scrollWidth,z=p.virtual,T=p.titleRender,H=p.dropIndicatorRender,W=p.onContextMenu,K=p.onScroll,G=p.direction,U=p.rootClassName,Z=p.rootStyle,Q=la(this.props,{aria:!0,data:!0}),Y;P&&(mn(P)==="object"?Y=P:typeof P=="function"?Y={nodeDraggable:P}:Y={});var ee={prefixCls:b,selectable:k,showIcon:$,icon:O,switcherIcon:D,draggable:Y,draggingNodeKey:l,checkable:R,checkStrictly:N,disabled:I,keyEntities:s,dropLevelOffset:u,dropContainerKey:d,dropTargetKey:g,dropPosition:h,dragOverNodeKey:v,indent:m,direction:G,dropIndicatorRender:H,loadData:F,filterTreeNode:j,titleRender:T,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 f.createElement($u.Provider,{value:ee},f.createElement("div",{className:pe(b,y,U,J(J(J({},"".concat(b,"-show-line"),w),"".concat(b,"-focused"),o),"".concat(b,"-active-focused"),c!==null)),style:Z},f.createElement(BS,Oe({ref:this.listRef,prefixCls:b,style:x,data:i,disabled:I,selectable:k,checkable:!!R,motion:M,dragging:l!==null,height:A,itemHeight:_,virtual:z,focusable:C,focused:o,tabIndex:E,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:W,onScroll:K,scrollWidth:L},this.getTreeNodeRequiredProps(),Q))))}}],[{key:"getDerivedStateFromProps",value:function(a,o){var i=o.prevProps,s={prevProps:a};function l(E){return!i&&a.hasOwnProperty(E)||i&&i[E]!==a[E]}var c,u=o.fieldNames;if(l("fieldNames")&&(u=Oa(a.fieldNames),s.fieldNames=u),l("treeData")?c=a.treeData:l("children")&&(In(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),c=Mg(a.children)),c){s.treeData=c;var d=Fg(c,{fieldNames:u});s.keyEntities=ye(J({},ta,tv),d.keyEntities)}var g=s.keyEntities||o.keyEntities;if(l("expandedKeys")||i&&l("autoExpandParent"))s.expandedKeys=a.autoExpandParent||!i&&a.defaultExpandParent?Wl(a.expandedKeys,g):a.expandedKeys;else if(!i&&a.defaultExpandAll){var h=ye({},g);delete h[ta];var v=[];Object.keys(h).forEach(function(E){var k=h[E];k.children&&k.children.length&&v.push(k.key)}),s.expandedKeys=v}else!i&&a.defaultExpandedKeys&&(s.expandedKeys=a.autoExpandParent||a.defaultExpandParent?Wl(a.defaultExpandedKeys,g):a.defaultExpandedKeys);if(s.expandedKeys||delete s.expandedKeys,c||s.expandedKeys){var m=Ys(c||o.treeData,s.expandedKeys||o.expandedKeys,u);s.flattenNodes=m}if(a.selectable&&(l("selectedKeys")?s.selectedKeys=Qd(a.selectedKeys,a):!i&&a.defaultSelectedKeys&&(s.selectedKeys=Qd(a.defaultSelectedKeys,a))),a.checkable){var p;if(l("checkedKeys")?p=Qs(a.checkedKeys)||{}:!i&&a.defaultCheckedKeys?p=Qs(a.defaultCheckedKeys)||{}:c&&(p=Qs(a.checkedKeys)||{checkedKeys:o.checkedKeys,halfCheckedKeys:o.halfCheckedKeys}),p){var b=p,y=b.checkedKeys,x=y===void 0?[]:y,w=b.halfCheckedKeys,C=w===void 0?[]:w;if(!a.checkStrictly){var S=Gs(x,!0,g);x=S.checkedKeys,C=S.halfCheckedKeys}s.checkedKeys=x,s.halfCheckedKeys=C}}return l("loadedKeys")&&(s.loadedKeys=a.loadedKeys),s}}]),n})(f.Component);J(ku,"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:MS,allowDrop:function(){return!0},expandAction:!1});J(ku,"TreeNode",yo);const zS=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:n,directoryNodeSelectedColor:r,motionDurationMid:a,borderRadius:o,controlItemBgHover:i})=>({[`${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 ${a}`,content:'""',borderRadius:o},"&:hover:before":{background:i}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:n,borderRadius:o,[`${e}-switcher, ${e}-draggable-icon`]:{color:r},[`${e}-node-content-wrapper`]:{color:r,background:"transparent","&:before, &:hover:before":{background:n}}}}}),HS=new Ti("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),VS=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),KS=(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:`${fe(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),WS=(e,t)=>{const{treeCls:n,treeNodeCls:r,treeNodePadding:a,titleHeight:o,indentSize:i,nodeSelectedBg:s,nodeHoverBg:l,colorTextQuaternary:c,controlItemBgActiveDisabled:u}=t;return{[n]:Object.assign(Object.assign({},pn(t)),{"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${n}-rtl ${n}-switcher_close ${n}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${n}-active-focused)`]:Fo(t),[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${r}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:HS,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[r]:{display:"flex",alignItems:"flex-start",marginBottom:a,lineHeight:fe(o),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:a},[`&-disabled ${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${n}-checkbox-disabled + ${n}-node-selected,&${r}-disabled${r}-selected ${n}-node-content-wrapper`]:{backgroundColor:u},[`${n}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${r}-disabled)`]:{[`${n}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${n}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${r}-disabled).filter-node ${n}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:"grab",[`${n}-draggable-icon`]:{flexShrink:0,width:o,textAlign:"center",visibility:"visible",color:c},[`&${r}-disabled ${n}-draggable-icon`]:{visibility:"hidden"}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:i}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher, ${n}-checkbox`]:{marginInlineEnd:t.calc(t.calc(o).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-switcher`]:Object.assign(Object.assign({},VS(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:o,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:o,height:o,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${n}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${n}-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(o).div(2).equal(),bottom:t.calc(a).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(o).div(2).equal()).mul(.8).equal(),height:t.calc(o).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${n}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:o,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},KS(e,t)),{"&:hover":{backgroundColor:l},[`&${n}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:s},[`${n}-iconEle`]:{display:"inline-block",width:o,height:o,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${r}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${n}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(o).div(2).equal(),bottom:t.calc(a).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${r}-leaf-last ${n}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${fe(t.calc(o).div(2).equal())} !important`}})}},qS=(e,t,n=!0)=>{const r=`.${e}`,a=`${r}-treenode`,o=t.calc(t.paddingXS).div(2).equal(),i=Hn(t,{treeCls:r,treeNodeCls:a,treeNodePadding:o});return[WS(e,i),n&&zS(i)].filter(Boolean)},US=e=>{const{controlHeightSM:t,controlItemBgHover:n,controlItemBgActive:r}=e,a=t;return{titleHeight:a,indentSize:a,nodeHoverBg:n,nodeHoverColor:e.colorText,nodeSelectedBg:r,nodeSelectedColor:e.colorText}},YS=e=>{const{colorTextLightSolid:t,colorPrimary:n}=e;return Object.assign(Object.assign({},US(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:n})},GS=rr("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:jg(`${t}-checkbox`,e)},qS(t,e),tu(e)],YS),af=4;function XS(e){const{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:a,direction:o="ltr"}=e,i=o==="ltr"?"left":"right",s=o==="ltr"?"right":"left",l={[i]:-n*a+af,[s]:0};switch(t){case-1:l.top=-3;break;case 1:l.bottom=-3;break;default:l.bottom=-3,l[i]=a+af;break}return be.createElement("div",{style:l,className:`${r}-drop-indicator`})}const JS=e=>{var t,n;const{prefixCls:r,switcherIcon:a,treeNodeProps:o,showLine:i,switcherLoadingIcon:s}=e,{isLeaf:l,expanded:c,loading:u}=o;if(u)return f.isValidElement(s)?s:f.createElement(Dl,{className:`${r}-switcher-loading-icon`});let d;if(i&&typeof i=="object"&&(d=i.showLeafIcon),l){if(!i)return null;if(typeof d!="boolean"&&d){const v=typeof d=="function"?d(o):d,m=`${r}-switcher-line-custom-icon`;return f.isValidElement(v)?Fr(v,{className:pe((t=v.props)===null||t===void 0?void 0:t.className,m)}):v}return d?f.createElement(Zg,{className:`${r}-switcher-line-icon`}):f.createElement("span",{className:`${r}-switcher-leaf-line`})}const g=`${r}-switcher-icon`,h=typeof a=="function"?a(o):a;return f.isValidElement(h)?Fr(h,{className:pe((n=h.props)===null||n===void 0?void 0:n.className,g)}):h!==void 0?h:i?c?f.createElement(mS,{className:`${r}-switcher-line-icon`}):f.createElement(wS,{className:`${r}-switcher-line-icon`}):f.createElement(Kw,{className:g})},nv=be.forwardRef((e,t)=>{var n;const{getPrefixCls:r,direction:a,virtual:o,tree:i}=be.useContext(cn),{prefixCls:s,className:l,showIcon:c=!1,showLine:u,switcherIcon:d,switcherLoadingIcon:g,blockNode:h=!1,children:v,checkable:m=!1,selectable:p=!0,draggable:b,motion:y,style:x}=e,w=r("tree",s),C=r(),S=y??Object.assign(Object.assign({},ou(C)),{motionAppear:!1}),E=Object.assign(Object.assign({},e),{checkable:m,selectable:p,showIcon:c,motion:S,blockNode:h,showLine:!!u,dropIndicatorRender:XS}),[k,$,O]=GS(w),[,D]=xp(),P=D.paddingXS/2+(((n=D.Tree)===null||n===void 0?void 0:n.titleHeight)||D.controlHeightSM),R=be.useMemo(()=>{if(!b)return!1;let I={};switch(typeof b){case"function":I.nodeDraggable=b;break;case"object":I=Object.assign({},b);break}return I.icon!==!1&&(I.icon=I.icon||be.createElement(uS,null)),I},[b]),N=I=>be.createElement(JS,{prefixCls:w,switcherIcon:d,switcherLoadingIcon:g,treeNodeProps:I,showLine:u});return k(be.createElement(ku,Object.assign({itemHeight:P,ref:t,virtual:o},E,{style:Object.assign(Object.assign({},i==null?void 0:i.style),x),prefixCls:w,className:pe({[`${w}-icon-hide`]:!c,[`${w}-block-node`]:h,[`${w}-unselectable`]:!p,[`${w}-rtl`]:a==="rtl"},i==null?void 0:i.className,l,$,O),direction:a,checkable:m&&be.createElement("span",{className:`${w}-checkbox-inner`}),selectable:p,switcherIcon:N,draggable:R}),v))}),of=0,Zs=1,sf=2;function Iu(e,t,n){const{key:r,children:a}=n;function o(i){const s=i[r],l=i[a];t(s,i)!==!1&&Iu(l||[],t,n)}e.forEach(o)}function QS({treeData:e,expandedKeys:t,startKey:n,endKey:r,fieldNames:a}){const o=[];let i=of;if(n&&n===r)return[n];if(!n||!r)return[];function s(l){return l===n||l===r}return Iu(e,l=>{if(i===sf)return!1;if(s(l)){if(o.push(l),i===of)i=Zs;else if(i===Zs)return i=sf,!1}else i===Zs&&o.push(l);return t.includes(l)},Oa(a)),o}function el(e,t,n){const r=rt(t),a=[];return Iu(e,(o,i)=>{const s=r.indexOf(o);return s!==-1&&(a.push(i),r.splice(s,1)),!!r.length},Oa(n)),a}var lf=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};function ZS(e){const{isLeaf:t,expanded:n}=e;return t?f.createElement(Zg,null):n?f.createElement(aS,null):f.createElement(sS,null)}function cf({treeData:e,children:t}){return e||Mg(t)}const e2=(e,t)=>{var{defaultExpandAll:n,defaultExpandParent:r,defaultExpandedKeys:a}=e,o=lf(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const i=f.useRef(null),s=f.useRef(null),l=()=>{const{keyEntities:k}=Fg(cf(o));let $;return n?$=Object.keys(k):r?$=Wl(o.expandedKeys||a||[],k):$=o.expandedKeys||a||[],$},[c,u]=f.useState(o.selectedKeys||o.defaultSelectedKeys||[]),[d,g]=f.useState(()=>l());f.useEffect(()=>{"selectedKeys"in o&&u(o.selectedKeys)},[o.selectedKeys]),f.useEffect(()=>{"expandedKeys"in o&&g(o.expandedKeys)},[o.expandedKeys]);const h=(k,$)=>{var O;return"expandedKeys"in o||g(k),(O=o.onExpand)===null||O===void 0?void 0:O.call(o,k,$)},v=(k,$)=>{var O;const{multiple:D,fieldNames:P}=o,{node:R,nativeEvent:N}=$,{key:I=""}=R,M=cf(o),F=Object.assign(Object.assign({},$),{selected:!0}),j=(N==null?void 0:N.ctrlKey)||(N==null?void 0:N.metaKey),A=N==null?void 0:N.shiftKey;let _;D&&j?(_=k,i.current=I,s.current=_,F.selectedNodes=el(M,_,P)):D&&A?(_=Array.from(new Set([].concat(rt(s.current||[]),rt(QS({treeData:M,expandedKeys:d,startKey:I,endKey:i.current,fieldNames:P}))))),F.selectedNodes=el(M,_,P)):(_=[I],i.current=I,s.current=_,F.selectedNodes=el(M,_,P)),(O=o.onSelect)===null||O===void 0||O.call(o,_,F),"selectedKeys"in o||u(_)},{getPrefixCls:m,direction:p}=f.useContext(cn),{prefixCls:b,className:y,showIcon:x=!0,expandAction:w="click"}=o,C=lf(o,["prefixCls","className","showIcon","expandAction"]),S=m("tree",b),E=pe(`${S}-directory`,{[`${S}-directory-rtl`]:p==="rtl"},y);return f.createElement(nv,Object.assign({icon:ZS,ref:t,blockNode:!0},C,{showIcon:x,expandAction:w,prefixCls:S,className:E,expandedKeys:d,selectedKeys:c,onSelect:v,onExpand:h}))},t2=f.forwardRef(e2),Ou=nv;Ou.DirectoryTree=t2;Ou.TreeNode=yo;const tl=(function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",a=e.type||"",o=a.replace(/\/.*$/,"");return n.some(function(i){var s=i.trim();if(/^\*(\/\*)?$/.test(i))return!0;if(s.charAt(0)==="."){var l=r.toLowerCase(),c=s.toLowerCase(),u=[c];return(c===".jpg"||c===".jpeg")&&(u=[".jpg",".jpeg"]),u.some(function(d){return l.endsWith(d)})}return/\/\*$/.test(s)?o===s.replace(/\/.*$/,""):a===s?!0:/^\w+$/.test(s)?(In(!1,"Upload takes an invalidate 'accept' type '".concat(s,"'.Skip for check.")),!0):!1})}return!0});function n2(e,t){var n="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}function uf(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function r2(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(o){o.total>0&&(o.percent=o.loaded/o.total*100),e.onProgress(o)});var n=new FormData;e.data&&Object.keys(e.data).forEach(function(a){var o=e.data[a];if(Array.isArray(o)){o.forEach(function(i){n.append("".concat(a,"[]"),i)});return}n.append(a,o)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(o){e.onError(o)},t.onload=function(){return t.status<200||t.status>=300?e.onError(n2(e,t),uf(t)):e.onSuccess(uf(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return r["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach(function(a){r[a]!==null&&t.setRequestHeader(a,r[a])}),t.send(n),{abort:function(){t.abort()}}}var a2=(function(){var e=kr(bn().mark(function t(n,r){var a,o,i,s,l,c,u,d;return bn().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:c=function(){return c=kr(bn().mark(function m(p){return bn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.abrupt("return",new Promise(function(x){p.file(function(w){r(w)?(p.fullPath&&!w.webkitRelativePath&&(Object.defineProperties(w,{webkitRelativePath:{writable:!0}}),w.webkitRelativePath=p.fullPath.replace(/^\//,""),Object.defineProperties(w,{webkitRelativePath:{writable:!1}})),x(w)):x(null)})}));case 1:case"end":return y.stop()}},m)})),c.apply(this,arguments)},l=function(m){return c.apply(this,arguments)},s=function(){return s=kr(bn().mark(function m(p){var b,y,x,w,C;return bn().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:b=p.createReader(),y=[];case 2:return E.next=5,new Promise(function(k){b.readEntries(k,function(){return k([])})});case 5:if(x=E.sent,w=x.length,w){E.next=9;break}return E.abrupt("break",12);case 9:for(C=0;C<w;C++)y.push(x[C]);E.next=2;break;case 12:return E.abrupt("return",y);case 13:case"end":return E.stop()}},m)})),s.apply(this,arguments)},i=function(m){return s.apply(this,arguments)},a=[],o=[],n.forEach(function(v){return o.push(v.webkitGetAsEntry())}),u=(function(){var v=kr(bn().mark(function m(p,b){var y,x;return bn().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(p){C.next=2;break}return C.abrupt("return");case 2:if(p.path=b||"",!p.isFile){C.next=10;break}return C.next=6,l(p);case 6:y=C.sent,y&&a.push(y),C.next=15;break;case 10:if(!p.isDirectory){C.next=15;break}return C.next=13,i(p);case 13:x=C.sent,o.push.apply(o,rt(x));case 15:case"end":return C.stop()}},m)}));return function(p,b){return v.apply(this,arguments)}})(),d=0;case 9:if(!(d<o.length)){h.next=15;break}return h.next=12,u(o[d]);case 12:d++,h.next=9;break;case 15:return h.abrupt("return",a);case 16:case"end":return h.stop()}},t)}));return function(n,r){return e.apply(this,arguments)}})(),o2=+new Date,i2=0;function nl(){return"rc-upload-".concat(o2,"-").concat(++i2)}var s2=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],l2=(function(e){es(n,e);var t=ts(n);function n(){var r;aa(this,n);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return r=t.call.apply(t,[this].concat(o)),J(Xe(r),"state",{uid:nl()}),J(Xe(r),"reqs",{}),J(Xe(r),"fileInput",void 0),J(Xe(r),"_isMounted",void 0),J(Xe(r),"onChange",function(s){var l=r.props,c=l.accept,u=l.directory,d=s.target.files,g=rt(d).filter(function(h){return!u||tl(h,c)});r.uploadFiles(g),r.reset()}),J(Xe(r),"onClick",function(s){var l=r.fileInput;if(l){var c=s.target,u=r.props.onClick;if(c&&c.tagName==="BUTTON"){var d=l.parentNode;d.focus(),c.blur()}l.click(),u&&u(s)}}),J(Xe(r),"onKeyDown",function(s){s.key==="Enter"&&r.onClick(s)}),J(Xe(r),"onDataTransferFiles",(function(){var s=kr(bn().mark(function l(c,u){var d,g,h,v,m,p,b;return bn().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(d=r.props,g=d.multiple,h=d.accept,v=d.directory,m=rt(c.items||[]),p=rt(c.files||[]),(p.length>0||m.some(function(w){return w.kind==="file"}))&&(u==null||u()),!v){x.next=11;break}return x.next=7,a2(Array.prototype.slice.call(m),function(w){return tl(w,r.props.accept)});case 7:p=x.sent,r.uploadFiles(p),x.next=14;break;case 11:b=rt(p).filter(function(w){return tl(w,h)}),g===!1&&(b=p.slice(0,1)),r.uploadFiles(b);case 14:case"end":return x.stop()}},l)}));return function(l,c){return s.apply(this,arguments)}})()),J(Xe(r),"onFilePaste",(function(){var s=kr(bn().mark(function l(c){var u,d;return bn().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(u=r.props.pastable,u){h.next=3;break}return h.abrupt("return");case 3:if(c.type!=="paste"){h.next=6;break}return d=c.clipboardData,h.abrupt("return",r.onDataTransferFiles(d,function(){c.preventDefault()}));case 6:case"end":return h.stop()}},l)}));return function(l){return s.apply(this,arguments)}})()),J(Xe(r),"onFileDragOver",function(s){s.preventDefault()}),J(Xe(r),"onFileDrop",(function(){var s=kr(bn().mark(function l(c){var u;return bn().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(c.preventDefault(),c.type!=="drop"){g.next=4;break}return u=c.dataTransfer,g.abrupt("return",r.onDataTransferFiles(u));case 4:case"end":return g.stop()}},l)}));return function(l){return s.apply(this,arguments)}})()),J(Xe(r),"uploadFiles",function(s){var l=rt(s),c=l.map(function(u){return u.uid=nl(),r.processFile(u,l)});Promise.all(c).then(function(u){var d=r.props.onBatchStart;d==null||d(u.map(function(g){var h=g.origin,v=g.parsedFile;return{file:h,parsedFile:v}})),u.filter(function(g){return g.parsedFile!==null}).forEach(function(g){r.post(g)})})}),J(Xe(r),"processFile",(function(){var s=kr(bn().mark(function l(c,u){var d,g,h,v,m,p,b,y,x;return bn().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(d=r.props.beforeUpload,g=c,!d){C.next=14;break}return C.prev=3,C.next=6,d(c,u);case 6:g=C.sent,C.next=12;break;case 9:C.prev=9,C.t0=C.catch(3),g=!1;case 12:if(g!==!1){C.next=14;break}return C.abrupt("return",{origin:c,parsedFile:null,action:null,data:null});case 14:if(h=r.props.action,typeof h!="function"){C.next=21;break}return C.next=18,h(c);case 18:v=C.sent,C.next=22;break;case 21:v=h;case 22:if(m=r.props.data,typeof m!="function"){C.next=29;break}return C.next=26,m(c);case 26:p=C.sent,C.next=30;break;case 29:p=m;case 30:return b=(mn(g)==="object"||typeof g=="string")&&g?g:c,b instanceof File?y=b:y=new File([b],c.name,{type:c.type}),x=y,x.uid=c.uid,C.abrupt("return",{origin:c,data:p,parsedFile:x,action:v});case 35:case"end":return C.stop()}},l,null,[[3,9]])}));return function(l,c){return s.apply(this,arguments)}})()),J(Xe(r),"saveFileInput",function(s){r.fileInput=s}),r}return oa(n,[{key:"componentDidMount",value:function(){this._isMounted=!0;var a=this.props.pastable;a&&document.addEventListener("paste",this.onFilePaste)}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort(),document.removeEventListener("paste",this.onFilePaste)}},{key:"componentDidUpdate",value:function(a){var o=this.props.pastable;o&&!a.pastable?document.addEventListener("paste",this.onFilePaste):!o&&a.pastable&&document.removeEventListener("paste",this.onFilePaste)}},{key:"post",value:function(a){var o=this,i=a.data,s=a.origin,l=a.action,c=a.parsedFile;if(this._isMounted){var u=this.props,d=u.onStart,g=u.customRequest,h=u.name,v=u.headers,m=u.withCredentials,p=u.method,b=s.uid,y=g||r2,x={action:l,filename:h,data:i,file:c,headers:v,withCredentials:m,method:p||"post",onProgress:function(C){var S=o.props.onProgress;S==null||S(C,c)},onSuccess:function(C,S){var E=o.props.onSuccess;E==null||E(C,c,S),delete o.reqs[b]},onError:function(C,S){var E=o.props.onError;E==null||E(C,S,c),delete o.reqs[b]}};d(s),this.reqs[b]=y(x)}}},{key:"reset",value:function(){this.setState({uid:nl()})}},{key:"abort",value:function(a){var o=this.reqs;if(a){var i=a.uid?a.uid:a;o[i]&&o[i].abort&&o[i].abort(),delete o[i]}else Object.keys(o).forEach(function(s){o[s]&&o[s].abort&&o[s].abort(),delete o[s]})}},{key:"render",value:function(){var a=this.props,o=a.component,i=a.prefixCls,s=a.className,l=a.classNames,c=l===void 0?{}:l,u=a.disabled,d=a.id,g=a.name,h=a.style,v=a.styles,m=v===void 0?{}:v,p=a.multiple,b=a.accept,y=a.capture,x=a.children,w=a.directory,C=a.openFileDialogOnClick,S=a.onMouseEnter,E=a.onMouseLeave,k=a.hasControlInside,$=Nt(a,s2),O=pe(J(J(J({},i,!0),"".concat(i,"-disabled"),u),s,s)),D=w?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},P=u?{}:{onClick:C?this.onClick:function(){},onKeyDown:C?this.onKeyDown:function(){},onMouseEnter:S,onMouseLeave:E,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:k?void 0:"0"};return be.createElement(o,Oe({},P,{className:O,role:k?void 0:"button",style:h}),be.createElement("input",Oe({},la($,{aria:!0,data:!0}),{id:d,name:g,disabled:u,type:"file",ref:this.saveFileInput,onClick:function(N){return N.stopPropagation()},key:this.state.uid,style:ye({display:"none"},m.input),className:c.input,accept:b},D,{multiple:p,onChange:this.onChange},y!=null?{capture:y}:{})),x)}}]),n})(ap);function rl(){}var Ul=(function(e){es(n,e);var t=ts(n);function n(){var r;aa(this,n);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return r=t.call.apply(t,[this].concat(o)),J(Xe(r),"uploader",void 0),J(Xe(r),"saveUploader",function(s){r.uploader=s}),r}return oa(n,[{key:"abort",value:function(a){this.uploader.abort(a)}},{key:"render",value:function(){return be.createElement(l2,Oe({},this.props,{ref:this.saveUploader}))}}]),n})(ap);J(Ul,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:rl,onError:rl,onSuccess:rl,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});const c2=e=>{const{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${fe(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${fe(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`
|
|
77
|
+
`]:{cursor:"not-allowed !important"}},[`&-tooltip ${n}-tooltip-inner`]:{minWidth:"unset"}})}},_g=(e,t)=>{const{componentCls:n,railSize:r,handleSize:a,dotSize:o,marginFull:i,calc:l}=e,s=t?"paddingBlock":"paddingInline",c=t?"width":"height",u=t?"height":"width",d=t?"insetBlockStart":"insetInlineStart",g=t?"top":"insetInlineStart",h=l(r).mul(3).sub(a).div(2).equal(),v=l(a).sub(r).div(2).equal(),m=t?{borderWidth:`${fe(v)} 0`,transform:`translateY(${fe(l(v).mul(-1).equal())})`}:{borderWidth:`0 ${fe(v)}`,transform:`translateX(${fe(e.calc(v).mul(-1).equal())})`};return{[s]:r,[u]:l(r).mul(3).equal(),[`${n}-rail`]:{[c]:"100%",[u]:r},[`${n}-track,${n}-tracks`]:{[u]:r},[`${n}-track-draggable`]:Object.assign({},m),[`${n}-handle`]:{[d]:h},[`${n}-mark`]:{insetInlineStart:0,top:0,[g]:l(r).mul(3).add(t?0:i).equal(),[c]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[g]:r,[c]:"100%",[u]:r},[`${n}-dot`]:{position:"absolute",[d]:l(r).sub(o).div(2).equal()}}},kC=e=>{const{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},_g(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},IC=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},_g(e,!1)),{height:"100%"})}},OC=e=>{const n=e.controlHeightLG/4,r=e.controlHeightSM/2,a=e.lineWidth+1,o=e.lineWidth+1*1.5,i=e.colorPrimary,l=new pr(i).setA(.2).toRgbString();return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:r,dotSize:8,handleLineWidth:a,handleLineWidthHover:o,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:i,handleActiveOutlineColor:l,handleColorDisabled:new pr(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}},NC=ar("Slider",e=>{const t=Vn(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return[EC(t),kC(t),IC(t)]},OC);function Jl(){const[e,t]=f.useState(!1),n=f.useRef(null),r=()=>{Ht.cancel(n.current)},a=o=>{r(),o?t(o):n.current=Ht(()=>{t(o)})};return f.useEffect(()=>r,[]),[e,a]}var DC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};function MC(e,t){return e||e===null?e:t||t===null?t:n=>typeof n=="number"?n.toString():""}const FC=be.forwardRef((e,t)=>{const{prefixCls:n,range:r,className:a,rootClassName:o,style:i,disabled:l,tooltipPrefixCls:s,tipFormatter:c,tooltipVisible:u,getTooltipPopupContainer:d,tooltipPlacement:g,tooltip:h={},onChangeComplete:v,classNames:m,styles:p}=e,b=DC(e,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete","classNames","styles"]),{vertical:y}=e,{getPrefixCls:x,direction:w,className:C,style:S,classNames:E,styles:k,getPopupContainer:$}=Ao("slider"),O=be.useContext(Pa),D=l??O,{handleRender:P,direction:A}=be.useContext($C),I=(A||w)==="rtl",[M,F]=Jl(),[R,T]=Jl(),_=Object.assign({},h),{open:B,placement:L,getPopupContainer:j,prefixCls:z,formatter:K}=_,V=B??u,G=(M||R)&&V!==!1,U=MC(K,c),[Z,Q]=Jl(),Y=Te=>{v==null||v(Te),Q(!1)},ee=(Te,Ve)=>Te||(Ve?I?"left":"right":"top"),ce=x("slider",n),[me,we,le]=NC(ce),ge=pe(a,C,E.root,m==null?void 0:m.root,o,{[`${ce}-rtl`]:I,[`${ce}-lock`]:Z},we,le);I&&!b.vertical&&(b.reverse=!b.reverse),be.useEffect(()=>{const Te=()=>{Ht(()=>{T(!1)},1)};return document.addEventListener("mouseup",Te),()=>{document.removeEventListener("mouseup",Te)}},[]);const Ee=r&&!V,_e=P||((Te,Ve)=>{const{index:We}=Ve,nt=Te.props;function Ue(ae,ze,Ce){var $e,ue,ie,xe;Ce&&((ue=($e=b)[ae])===null||ue===void 0||ue.call($e,ze)),(xe=(ie=nt)[ae])===null||xe===void 0||xe.call(ie,ze)}const qe=Object.assign(Object.assign({},nt),{onMouseEnter:ae=>{F(!0),Ue("onMouseEnter",ae)},onMouseLeave:ae=>{F(!1),Ue("onMouseLeave",ae)},onMouseDown:ae=>{T(!0),Q(!0),Ue("onMouseDown",ae)},onFocus:ae=>{var ze;T(!0),(ze=b.onFocus)===null||ze===void 0||ze.call(b,ae),Ue("onFocus",ae,!0)},onBlur:ae=>{var ze;T(!1),(ze=b.onBlur)===null||ze===void 0||ze.call(b,ae),Ue("onBlur",ae,!0)}}),ct=be.cloneElement(Te,qe),Fe=(!!V||G)&&U!==null;return Ee?ct:be.createElement(zd,Object.assign({},_,{prefixCls:x("tooltip",z??s),title:U?U(Ve.value):"",value:Ve.value,open:Fe,placement:ee(L??g,y),key:We,classNames:{root:`${ce}-tooltip`},getPopupContainer:j||d||$}),ct)}),Re=Ee?(Te,Ve)=>{const We=be.cloneElement(Te,{style:Object.assign(Object.assign({},Te.props.style),{visibility:"hidden"})});return be.createElement(zd,Object.assign({},_,{prefixCls:x("tooltip",z??s),title:U?U(Ve.value):"",open:U!==null&&G,placement:ee(L??g,y),key:"tooltip",classNames:{root:`${ce}-tooltip`},getPopupContainer:j||d||$,draggingDelete:Ve.draggingDelete}),We)}:void 0,he=Object.assign(Object.assign(Object.assign(Object.assign({},k.root),S),p==null?void 0:p.root),i),ke=Object.assign(Object.assign({},k.tracks),p==null?void 0:p.tracks),de=pe(E.tracks,m==null?void 0:m.tracks);return me(be.createElement(SC,Object.assign({},b,{classNames:Object.assign({handle:pe(E.handle,m==null?void 0:m.handle),rail:pe(E.rail,m==null?void 0:m.rail),track:pe(E.track,m==null?void 0:m.track)},de?{tracks:de}:{}),styles:Object.assign({handle:Object.assign(Object.assign({},k.handle),p==null?void 0:p.handle),rail:Object.assign(Object.assign({},k.rail),p==null?void 0:p.rail),track:Object.assign(Object.assign({},k.track),p==null?void 0:p.track)},Object.keys(ke).length?{tracks:ke}:{}),step:b.step,range:r,className:ge,style:he,disabled:D,ref:t,prefixCls:ce,handleRender:_e,activeHandleRender:Re,onChangeComplete:Y})))});var PC={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"},RC=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:PC}))},Bg=f.forwardRef(RC),AC={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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},TC=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:AC}))},Lg=f.forwardRef(TC),jC={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"}}]},name:"swap-right",theme:"outlined"},_C=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:jC}))},BC=f.forwardRef(_C);function LC(e,t,n){return n!==void 0?n:t==="year"&&e.lang.yearPlaceholder?e.lang.yearPlaceholder:t==="quarter"&&e.lang.quarterPlaceholder?e.lang.quarterPlaceholder:t==="month"&&e.lang.monthPlaceholder?e.lang.monthPlaceholder:t==="week"&&e.lang.weekPlaceholder?e.lang.weekPlaceholder:t==="time"&&e.timePickerLocale.placeholder?e.timePickerLocale.placeholder:e.lang.placeholder}function zC(e,t,n){return n!==void 0?n:t==="year"&&e.lang.yearPlaceholder?e.lang.rangeYearPlaceholder:t==="quarter"&&e.lang.quarterPlaceholder?e.lang.rangeQuarterPlaceholder:t==="month"&&e.lang.monthPlaceholder?e.lang.rangeMonthPlaceholder:t==="week"&&e.lang.weekPlaceholder?e.lang.rangeWeekPlaceholder:t==="time"&&e.timePickerLocale.placeholder?e.timePickerLocale.rangePlaceholder:e.lang.rangePlaceholder}function zg(e,t){const{allowClear:n=!0}=e,{clearIcon:r,removeIcon:a}=gy(Object.assign(Object.assign({},e),{prefixCls:t,componentName:"DatePicker"}));return[f.useMemo(()=>n===!1?!1:Object.assign({clearIcon:r},n===!0?{}:n),[n,r]),a]}const[HC,VC]=["week","WeekPicker"],[KC,WC]=["month","MonthPicker"],[qC,UC]=["year","YearPicker"],[YC,GC]=["quarter","QuarterPicker"],[Ks,Hd]=["time","TimePicker"],XC=e=>f.createElement(vn,Object.assign({size:"small",type:"primary"},e));function Hg(e){return zt(()=>Object.assign({button:XC},e),[e])}function Vg(e,...t){const n=e||{};return t.reduce((r,a)=>(Object.keys(a||{}).forEach(o=>{const i=n[o],l=a[o];if(i&&typeof i=="object")if(l&&typeof l=="object")r[o]=Vg(i,r[o],l);else{const{_default:s}=i;r[o]=r[o]||{},r[o][s]=pe(r[o][s],l)}else r[o]=pe(r[o],l)}),r),{})}function JC(e,...t){return f.useMemo(()=>Vg.apply(void 0,[e].concat(t)),[t])}function QC(...e){return f.useMemo(()=>e.reduce((t,n={})=>(Object.keys(n).forEach(r=>{t[r]=Object.assign(Object.assign({},t[r]),n[r])}),t),{}),[e])}function Ws(e,t){const n=Object.assign({},e);return Object.keys(t).forEach(r=>{if(r!=="_default"){const a=t[r],o=n[r]||{};n[r]=a?Ws(o,a):o}}),n}function ZC(e,t,n){const r=JC.apply(void 0,[n].concat(at(e))),a=QC.apply(void 0,at(t));return f.useMemo(()=>[Ws(r,n),Ws(a,n)],[r,a])}const Kg=(e,t,n,r,a)=>{const{classNames:o,styles:i}=Ao(e),[l,s]=ZC([o,t],[i,n],{popup:{_default:"root"}});return f.useMemo(()=>{var c,u;const d=Object.assign(Object.assign({},l),{popup:Object.assign(Object.assign({},l.popup),{root:pe((c=l.popup)===null||c===void 0?void 0:c.root,r)})}),g=Object.assign(Object.assign({},s),{popup:Object.assign(Object.assign({},s.popup),{root:Object.assign(Object.assign({},(u=s.popup)===null||u===void 0?void 0:u.root),a)})});return[d,g]},[l,s,r,a])};var ew=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const tw=e=>Ar((n,r)=>{var a;const{prefixCls:o,getPopupContainer:i,components:l,className:s,style:c,placement:u,size:d,disabled:g,bordered:h=!0,placeholder:v,popupStyle:m,popupClassName:p,dropdownClassName:b,status:y,rootClassName:x,variant:w,picker:C,styles:S,classNames:E}=n,k=ew(n,["prefixCls","getPopupContainer","components","className","style","placement","size","disabled","bordered","placeholder","popupStyle","popupClassName","dropdownClassName","status","rootClassName","variant","picker","styles","classNames"]),$=C===Ks?"timePicker":"datePicker",O=f.useRef(null),{getPrefixCls:D,direction:P,getPopupContainer:A,rangePicker:N}=En(un),I=D("picker",o),{compactSize:M,compactItemClassnames:F}=sl(I,P),R=D(),[T,_]=eu("rangePicker",w,h),B=la(I),[L,j,z]=Dg(I,B),[K,V]=Kg($,E,S,p||b,m),[G]=zg(n,I),U=Hg(l),Z=ll(Re=>{var he;return(he=d??M)!==null&&he!==void 0?he:Re}),Q=f.useContext(Pa),Y=g??Q,ee=En(Ro),{hasFeedback:ce,status:me,feedbackIcon:we}=ee,le=f.createElement(f.Fragment,null,C===Ks?f.createElement(Lg,null):f.createElement(Bg,null),ce&&we);Mo(r,()=>O.current);const[ge]=ul("Calendar",$p),Ee=Object.assign(Object.assign({},ge),n.locale),[_e]=il("DatePicker",(a=V.popup.root)===null||a===void 0?void 0:a.zIndex);return L(f.createElement(ho,{space:!0},f.createElement(nx,Object.assign({separator:f.createElement("span",{"aria-label":"to",className:`${I}-separator`},f.createElement(BC,null)),disabled:Y,ref:O,placement:u,placeholder:zC(Ee,C,v),suffixIcon:le,prevIcon:f.createElement("span",{className:`${I}-prev-icon`}),nextIcon:f.createElement("span",{className:`${I}-next-icon`}),superPrevIcon:f.createElement("span",{className:`${I}-super-prev-icon`}),superNextIcon:f.createElement("span",{className:`${I}-super-next-icon`}),transitionName:`${R}-slide-up`,picker:C},k,{className:pe({[`${I}-${Z}`]:Z,[`${I}-${T}`]:_},Ti(I,tu(me,y),ce),j,F,s,N==null?void 0:N.className,z,B,x,K.root),style:Object.assign(Object.assign(Object.assign({},N==null?void 0:N.style),c),V.root),locale:Ee.lang,prefixCls:I,getPopupContainer:i||A,generateConfig:e,components:U,direction:P,classNames:{popup:pe(j,z,B,x,K.popup.root)},styles:{popup:Object.assign(Object.assign({},V.popup.root),{zIndex:_e})},allowClear:G}))))});var nw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const rw=e=>{const t=(s,c)=>{const u=c===Hd?"timePicker":"datePicker";return Ar((g,h)=>{var v;const{prefixCls:m,getPopupContainer:p,components:b,style:y,className:x,rootClassName:w,size:C,bordered:S,placement:E,placeholder:k,popupStyle:$,popupClassName:O,dropdownClassName:D,disabled:P,status:A,variant:N,onCalendarChange:I,styles:M,classNames:F}=g,R=nw(g,["prefixCls","getPopupContainer","components","style","className","rootClassName","size","bordered","placement","placeholder","popupStyle","popupClassName","dropdownClassName","disabled","status","variant","onCalendarChange","styles","classNames"]),{getPrefixCls:T,direction:_,getPopupContainer:B,[u]:L}=En(un),j=T("picker",m),{compactSize:z,compactItemClassnames:K}=sl(j,_),V=f.useRef(null),[G,U]=eu("datePicker",N,S),Z=la(j),[Q,Y,ee]=Dg(j,Z);Mo(h,()=>V.current);const ce={showToday:!0},me=s||g.picker,we=T(),{onSelect:le,multiple:ge}=R,Ee=le&&s==="time"&&!ge,_e=(ue,ie,xe)=>{I==null||I(ue,ie,xe),Ee&&le(ue)},[Re,he]=Kg(u,F,M,O||D,$),[ke,de]=zg(g,j),Te=Hg(b),Ve=ll(ue=>{var ie;return(ie=C??z)!==null&&ie!==void 0?ie:ue}),We=f.useContext(Pa),nt=P??We,Ue=En(Ro),{hasFeedback:qe,status:ct,feedbackIcon:Fe}=Ue,ae=f.createElement(f.Fragment,null,me==="time"?f.createElement(Lg,null):f.createElement(Bg,null),qe&&Fe),[ze]=ul("DatePicker",$p),Ce=Object.assign(Object.assign({},ze),g.locale),[$e]=il("DatePicker",(v=he.popup.root)===null||v===void 0?void 0:v.zIndex);return Q(f.createElement(ho,{space:!0},f.createElement(sx,Object.assign({ref:V,placeholder:LC(Ce,me,k),suffixIcon:ae,placement:E,prevIcon:f.createElement("span",{className:`${j}-prev-icon`}),nextIcon:f.createElement("span",{className:`${j}-next-icon`}),superPrevIcon:f.createElement("span",{className:`${j}-super-prev-icon`}),superNextIcon:f.createElement("span",{className:`${j}-super-next-icon`}),transitionName:`${we}-slide-up`,picker:s,onCalendarChange:_e},ce,R,{locale:Ce.lang,className:pe({[`${j}-${Ve}`]:Ve,[`${j}-${G}`]:U},Ti(j,tu(ct,A),qe),Y,K,L==null?void 0:L.className,x,ee,Z,w,Re.root),style:Object.assign(Object.assign(Object.assign({},L==null?void 0:L.style),y),he.root),prefixCls:j,getPopupContainer:p||B,generateConfig:e,components:Te,direction:_,disabled:nt,classNames:{popup:pe(Y,ee,Z,w,Re.popup.root)},styles:{popup:Object.assign(Object.assign({},he.popup.root),{zIndex:$e})},allowClear:ke,removeIcon:de}))))})},n=t(),r=t(HC,VC),a=t(KC,WC),o=t(qC,UC),i=t(YC,GC),l=t(Ks,Hd);return{DatePicker:n,WeekPicker:r,MonthPicker:a,YearPicker:o,TimePicker:l,QuarterPicker:i}},Wg=e=>{const{DatePicker:t,WeekPicker:n,MonthPicker:r,YearPicker:a,TimePicker:o,QuarterPicker:i}=rw(e),l=tw(e),s=t;return s.WeekPicker=n,s.MonthPicker=r,s.YearPicker=a,s.RangePicker=l,s.TimePicker=o,s.QuarterPicker=i,s},ja=Wg(u1),aw=lu(ja,"popupAlign",void 0,"picker");ja._InternalPanelDoNotUseOrYouWillBeFired=aw;const ow=lu(ja.RangePicker,"popupAlign",void 0,"picker");ja._InternalRangePanelDoNotUseOrYouWillBeFired=ow;ja.generatePicker=Wg;function Vd(e){return["small","middle","large"].includes(e)}function Kd(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const qg=be.createContext({latestIndex:0}),iw=qg.Provider,lw=({className:e,index:t,children:n,split:r,style:a})=>{const{latestIndex:o}=f.useContext(qg);return n==null?null:f.createElement(f.Fragment,null,f.createElement("div",{className:e,style:a},n),t<o&&r&&f.createElement("span",{className:`${e}-split`},r))};var sw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const cw=f.forwardRef((e,t)=>{var n;const{getPrefixCls:r,direction:a,size:o,className:i,style:l,classNames:s,styles:c}=Ao("space"),{size:u=o??"small",align:d,className:g,rootClassName:h,children:v,direction:m="horizontal",prefixCls:p,split:b,style:y,wrap:x=!1,classNames:w,styles:C}=e,S=sw(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[E,k]=Array.isArray(u)?u:[u,u],$=Vd(k),O=Vd(E),D=Kd(k),P=Kd(E),A=rl(v,{keepEmpty:!0}),N=d===void 0&&m==="horizontal"?"center":d,I=r("space",p),[M,F,R]=Q0(I),T=pe(I,i,F,`${I}-${m}`,{[`${I}-rtl`]:a==="rtl",[`${I}-align-${N}`]:N,[`${I}-gap-row-${k}`]:$,[`${I}-gap-col-${E}`]:O},g,h,R),_=pe(`${I}-item`,(n=w==null?void 0:w.item)!==null&&n!==void 0?n:s.item);let B=0;const L=A.map((K,V)=>{var G;K!=null&&(B=V);const U=(K==null?void 0:K.key)||`${_}-${V}`;return f.createElement(lw,{className:_,key:U,index:V,split:b,style:(G=C==null?void 0:C.item)!==null&&G!==void 0?G:c.item},K)}),j=f.useMemo(()=>({latestIndex:B}),[B]);if(A.length===0)return null;const z={};return x&&(z.flexWrap="wrap"),!O&&P&&(z.columnGap=E),!$&&D&&(z.rowGap=k),M(f.createElement("div",Object.assign({ref:t,className:T,style:Object.assign(Object.assign(Object.assign({},z),l),y)},S),f.createElement(iw,{value:j},L)))}),Ug=cw;Ug.Compact=Z0;var uw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const Yg=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:r}=f.useContext(un),{prefixCls:a,type:o="default",danger:i,disabled:l,loading:s,onClick:c,htmlType:u,children:d,className:g,menu:h,arrow:v,autoFocus:m,overlay:p,trigger:b,align:y,open:x,onOpenChange:w,placement:C,getPopupContainer:S,href:E,icon:k=f.createElement(Up,null),title:$,buttonsRender:O=Y=>Y,mouseEnterDelay:D,mouseLeaveDelay:P,overlayClassName:A,overlayStyle:N,destroyOnHidden:I,destroyPopupOnHide:M,dropdownRender:F,popupRender:R}=e,T=uw(e,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),_=n("dropdown",a),B=`${_}-button`,j={menu:h,arrow:v,autoFocus:m,align:y,disabled:l,trigger:l?[]:b,onOpenChange:w,getPopupContainer:S||t,mouseEnterDelay:D,mouseLeaveDelay:P,overlayClassName:A,overlayStyle:N,destroyOnHidden:I,popupRender:R||F},{compactSize:z,compactItemClassnames:K}=sl(_,r),V=pe(B,K,g);"destroyPopupOnHide"in e&&(j.destroyPopupOnHide=M),"overlay"in e&&(j.overlay=p),"open"in e&&(j.open=x),"placement"in e?j.placement=C:j.placement=r==="rtl"?"bottomLeft":"bottomRight";const G=f.createElement(vn,{type:o,danger:i,disabled:l,loading:s,onClick:c,htmlType:u,href:E,title:$},d),U=f.createElement(vn,{type:o,danger:i,icon:k}),[Z,Q]=O([G,U]);return f.createElement(Ug.Compact,Object.assign({className:V,size:z,block:!0},T),Z,f.createElement(gl,Object.assign({},j),Q))};Yg.__ANT_BUTTON=!0;const Gg=gl;Gg.Button=Yg;const dw=e=>{const{componentCls:t,iconCls:n,antCls:r,zIndexPopup:a,colorText:o,colorWarning:i,marginXXS:l,marginXS:s,fontSize:c,fontWeightStrong:u,colorTextHeading:d}=e;return{[t]:{zIndex:a,[`&${r}-popover`]:{fontSize:c},[`${t}-message`]:{marginBottom:s,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t}-message-icon ${n}`]:{color:i,fontSize:c,lineHeight:1,marginInlineEnd:s},[`${t}-title`]:{fontWeight:u,color:d,"&:only-child":{fontWeight:"normal"}},[`${t}-description`]:{marginTop:l,color:o}},[`${t}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:s}}}}},fw=e=>{const{zIndexPopupBase:t}=e;return{zIndexPopup:t+60}},Xg=ar("Popconfirm",e=>dw(e),fw,{resetStyle:!1});var mw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const Jg=e=>{const{prefixCls:t,okButtonProps:n,cancelButtonProps:r,title:a,description:o,cancelText:i,okText:l,okType:s="primary",icon:c=f.createElement(Ep,null),showCancel:u=!0,close:d,onConfirm:g,onCancel:h,onPopupClick:v}=e,{getPrefixCls:m}=f.useContext(un),[p]=ul("Popconfirm",kp.Popconfirm),b=dd(a),y=dd(o);return f.createElement("div",{className:`${t}-inner-content`,onClick:v},f.createElement("div",{className:`${t}-message`},c&&f.createElement("span",{className:`${t}-message-icon`},c),f.createElement("div",{className:`${t}-message-text`},b&&f.createElement("div",{className:`${t}-title`},b),y&&f.createElement("div",{className:`${t}-description`},y))),f.createElement("div",{className:`${t}-buttons`},u&&f.createElement(vn,Object.assign({onClick:h,size:"small"},r),i||(p==null?void 0:p.cancelText)),f.createElement(ey,{buttonProps:Object.assign(Object.assign({size:"small"},ty(s)),n),actionFn:g,close:d,prefixCls:m("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},l||(p==null?void 0:p.okText))))},pw=e=>{const{prefixCls:t,placement:n,className:r,style:a}=e,o=mw(e,["prefixCls","placement","className","style"]),{getPrefixCls:i}=f.useContext(un),l=i("popconfirm",t),[s]=Xg(l);return s(f.createElement(Sy,{placement:n,className:pe(l,r),style:a,content:f.createElement(Jg,Object.assign({prefixCls:l},o))}))};var gw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const vw=f.forwardRef((e,t)=>{var n,r;const{prefixCls:a,placement:o="top",trigger:i="click",okType:l="primary",icon:s=f.createElement(Ep,null),children:c,overlayClassName:u,onOpenChange:d,onVisibleChange:g,overlayStyle:h,styles:v,classNames:m}=e,p=gw(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange","overlayStyle","styles","classNames"]),{getPrefixCls:b,className:y,style:x,classNames:w,styles:C}=Ao("popconfirm"),[S,E]=on(!1,{value:(n=e.open)!==null&&n!==void 0?n:e.visible,defaultValue:(r=e.defaultOpen)!==null&&r!==void 0?r:e.defaultVisible}),k=(F,R)=>{E(F,!0),g==null||g(F),d==null||d(F,R)},$=F=>{k(!1,F)},O=F=>{var R;return(R=e.onConfirm)===null||R===void 0?void 0:R.call(void 0,F)},D=F=>{var R;k(!1,F),(R=e.onCancel)===null||R===void 0||R.call(void 0,F)},P=(F,R)=>{const{disabled:T=!1}=e;T||k(F,R)},A=b("popconfirm",a),N=pe(A,y,u,w.root,m==null?void 0:m.root),I=pe(w.body,m==null?void 0:m.body),[M]=Xg(A);return M(f.createElement(Fp,Object.assign({},Kn(p,["title"]),{trigger:i,placement:o,onOpenChange:P,open:S,ref:t,classNames:{root:N,body:I},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},C.root),x),h),v==null?void 0:v.root),body:Object.assign(Object.assign({},C.body),v==null?void 0:v.body)},content:f.createElement(Jg,Object.assign({okType:l,icon:s},e,{prefixCls:A,close:$,onConfirm:O,onCancel:D})),"data-popover-inject":!0}),c))}),Qg=vw;Qg._InternalPanelDoNotUseOrYouWillBeFired=pw;var hw={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},yw=function(){var t=St([]),n=St(null);return mt(function(){var r=Date.now(),a=!1;t.current.forEach(function(o){if(o){a=!0;var i=o.style;i.transitionDuration=".3s, .3s, .3s, .06s",n.current&&r-n.current<100&&(i.transitionDuration="0s, 0s")}}),a&&(n.current=Date.now())}),t.current},Wd=0,bw=ny();function xw(){var e;return bw?(e=Wd,Wd+=1):e="TEST_OR_SSR",e}const Cw=(function(e){var t=f.useState(),n=oe(t,2),r=n[0],a=n[1];return f.useEffect(function(){a("rc_progress_".concat(xw()))},[]),e||r});var qd=function(t){var n=t.bg,r=t.children;return f.createElement("div",{style:{width:"100%",height:"100%",background:n}},r)};function Ud(e,t){return Object.keys(e).map(function(n){var r=parseFloat(n),a="".concat(Math.floor(r*t),"%");return"".concat(e[n]," ").concat(a)})}var ww=f.forwardRef(function(e,t){var n=e.prefixCls,r=e.color,a=e.gradientId,o=e.radius,i=e.style,l=e.ptg,s=e.strokeLinecap,c=e.strokeWidth,u=e.size,d=e.gapDegree,g=r&&pn(r)==="object",h=g?"#FFF":void 0,v=u/2,m=f.createElement("circle",{className:"".concat(n,"-circle-path"),r:o,cx:v,cy:v,stroke:h,strokeLinecap:s,strokeWidth:c,opacity:l===0?0:1,style:i,ref:t});if(!g)return m;var p="".concat(a,"-conic"),b=d?"".concat(180+d/2,"deg"):"0deg",y=Ud(r,(360-d)/360),x=Ud(r,1),w="conic-gradient(from ".concat(b,", ").concat(y.join(", "),")"),C="linear-gradient(to ".concat(d?"bottom":"top",", ").concat(x.join(", "),")");return f.createElement(f.Fragment,null,f.createElement("mask",{id:p},m),f.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(p,")")},f.createElement(qd,{bg:C},f.createElement(qd,{bg:w}))))}),lo=100,Ql=function(t,n,r,a,o,i,l,s,c,u){var d=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,g=r/100*360*((360-i)/360),h=i===0?0:{bottom:0,top:180,left:90,right:-90}[l],v=(100-a)/100*n;c==="round"&&a!==100&&(v+=u/2,v>=n&&(v=n-.01));var m=lo/2;return{stroke:typeof s=="string"?s:void 0,strokeDasharray:"".concat(n,"px ").concat(t),strokeDashoffset:v+d,transform:"rotate(".concat(o+g+h,"deg)"),transformOrigin:"".concat(m,"px ").concat(m,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Sw=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Yd(e){var t=e??[];return Array.isArray(t)?t:[t]}var $w=function(t){var n=ye(ye({},hw),t),r=n.id,a=n.prefixCls,o=n.steps,i=n.strokeWidth,l=n.trailWidth,s=n.gapDegree,c=s===void 0?0:s,u=n.gapPosition,d=n.trailColor,g=n.strokeLinecap,h=n.style,v=n.className,m=n.strokeColor,p=n.percent,b=Dt(n,Sw),y=lo/2,x=Cw(r),w="".concat(x,"-gradient"),C=y-i/2,S=Math.PI*2*C,E=c>0?90+c/2:-90,k=S*((360-c)/360),$=pn(o)==="object"?o:{count:o,gap:2},O=$.count,D=$.gap,P=Yd(p),A=Yd(m),N=A.find(function(B){return B&&pn(B)==="object"}),I=N&&pn(N)==="object",M=I?"butt":g,F=Ql(S,k,0,100,E,c,u,d,M,i),R=yw(),T=function(){var L=0;return P.map(function(j,z){var K=A[z]||A[A.length-1],V=Ql(S,k,L,j,E,c,u,K,M,i);return L+=j,f.createElement(ww,{key:z,color:K,ptg:j,radius:C,prefixCls:a,gradientId:w,style:V,strokeLinecap:M,strokeWidth:i,gapDegree:c,ref:function(U){R[z]=U},size:lo})}).reverse()},_=function(){var L=Math.round(O*(P[0]/100)),j=100/O,z=0;return new Array(O).fill(null).map(function(K,V){var G=V<=L-1?A[0]:d,U=G&&pn(G)==="object"?"url(#".concat(w,")"):void 0,Z=Ql(S,k,z,j,E,c,u,G,"butt",i,D);return z+=(k-Z.strokeDashoffset+D)*100/k,f.createElement("circle",{key:V,className:"".concat(a,"-circle-path"),r:C,cx:y,cy:y,stroke:U,strokeWidth:i,opacity:1,style:Z,ref:function(Y){R[V]=Y}})})};return f.createElement("svg",Oe({className:pe("".concat(a,"-circle"),v),viewBox:"0 0 ".concat(lo," ").concat(lo),style:h,id:r,role:"presentation"},b),!O&&f.createElement("circle",{className:"".concat(a,"-circle-trail"),r:C,cx:y,cy:y,stroke:d,strokeLinecap:M,strokeWidth:l||i,style:F}),O?_():T())};function Fr(e){return!e||e<0?0:e>100?100:e}function Wi({success:e,successPercent:t}){let n=t;return e&&"progress"in e&&(n=e.progress),e&&"percent"in e&&(n=e.percent),n}const Ew=({percent:e,success:t,successPercent:n})=>{const r=Fr(Wi({success:t,successPercent:n}));return[r,Fr(Fr(e)-r)]},kw=({success:e={},strokeColor:t})=>{const{strokeColor:n}=e;return[n||Ds.green,t||null]},Sl=(e,t,n)=>{var r,a,o,i;let l=-1,s=-1;if(t==="step"){const c=n.steps,u=n.strokeWidth;typeof e=="string"||typeof e>"u"?(l=e==="small"?2:14,s=u??8):typeof e=="number"?[l,s]=[e,e]:[l=14,s=8]=Array.isArray(e)?e:[e.width,e.height],l*=c}else if(t==="line"){const c=n==null?void 0:n.strokeWidth;typeof e=="string"||typeof e>"u"?s=c||(e==="small"?6:8):typeof e=="number"?[l,s]=[e,e]:[l=-1,s=8]=Array.isArray(e)?e:[e.width,e.height]}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[l,s]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[l,s]=[e,e]:Array.isArray(e)&&(l=(a=(r=e[0])!==null&&r!==void 0?r:e[1])!==null&&a!==void 0?a:120,s=(i=(o=e[0])!==null&&o!==void 0?o:e[1])!==null&&i!==void 0?i:120));return[l,s]},Iw=3,Ow=e=>Iw/e*100,Nw=e=>{const{prefixCls:t,trailColor:n=null,strokeLinecap:r="round",gapPosition:a,gapDegree:o,width:i=120,type:l,children:s,success:c,size:u=i,steps:d}=e,[g,h]=Sl(u,"circle");let{strokeWidth:v}=e;v===void 0&&(v=Math.max(Ow(g),6));const m={width:g,height:h,fontSize:g*.15+6},p=f.useMemo(()=>{if(o||o===0)return o;if(l==="dashboard")return 75},[o,l]),b=Ew(e),y=a||l==="dashboard"&&"bottom"||void 0,x=Object.prototype.toString.call(e.strokeColor)==="[object Object]",w=kw({success:c,strokeColor:e.strokeColor}),C=pe(`${t}-inner`,{[`${t}-circle-gradient`]:x}),S=f.createElement($w,{steps:d,percent:d?b[1]:b,strokeWidth:v,trailWidth:v,strokeColor:d?w[1]:w,strokeLinecap:r,trailColor:n,prefixCls:t,gapDegree:p,gapPosition:y}),E=g<=20,k=f.createElement("div",{className:C,style:m},S,!E&&s);return E?f.createElement(To,{title:s},k):k},qi="--progress-line-stroke-color",Zg="--progress-percent",Gd=e=>{const t=e?"100%":"-100%";return new _i(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Dw=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:Object.assign(Object.assign({},gn(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${qi})`]},height:"100%",width:`calc(1 / var(${Zg}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${fe(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:Gd(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:Gd(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},Mw=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[n]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},Fw=e=>{const{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},Pw=e=>{const{componentCls:t,iconCls:n}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${n}`]:{fontSize:e.fontSizeSM}}}},Rw=e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}),Aw=ar("Progress",e=>{const t=e.calc(e.marginXXS).div(2).equal(),n=Vn(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Dw(n),Mw(n),Fw(n),Pw(n)]},Rw);var Tw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const jw=e=>{let t=[];return Object.keys(e).forEach(n=>{const r=parseFloat(n.replace(/%/g,""));Number.isNaN(r)||t.push({key:r,value:e[n]})}),t=t.sort((n,r)=>n.key-r.key),t.map(({key:n,value:r})=>`${r} ${n}%`).join(", ")},_w=(e,t)=>{const{from:n=Ds.blue,to:r=Ds.blue,direction:a=t==="rtl"?"to left":"to right"}=e,o=Tw(e,["from","to","direction"]);if(Object.keys(o).length!==0){const l=jw(o),s=`linear-gradient(${a}, ${l})`;return{background:s,[qi]:s}}const i=`linear-gradient(${a}, ${n}, ${r})`;return{background:i,[qi]:i}},Bw=e=>{const{prefixCls:t,direction:n,percent:r,size:a,strokeWidth:o,strokeColor:i,strokeLinecap:l="round",children:s,trailColor:c=null,percentPosition:u,success:d}=e,{align:g,type:h}=u,v=i&&typeof i!="string"?_w(i,n):{[qi]:i,background:i},m=l==="square"||l==="butt"?0:void 0,p=a??[-1,o||(a==="small"?6:8)],[b,y]=Sl(p,"line",{strokeWidth:o}),x={backgroundColor:c||void 0,borderRadius:m},w=Object.assign(Object.assign({width:`${Fr(r)}%`,height:y,borderRadius:m},v),{[Zg]:Fr(r)/100}),C=Wi(e),S={width:`${Fr(C)}%`,height:y,borderRadius:m,backgroundColor:d==null?void 0:d.strokeColor},E={width:b<0?"100%":b},k=f.createElement("div",{className:`${t}-inner`,style:x},f.createElement("div",{className:pe(`${t}-bg`,`${t}-bg-${h}`),style:w},h==="inner"&&s),C!==void 0&&f.createElement("div",{className:`${t}-success-bg`,style:S})),$=h==="outer"&&g==="start",O=h==="outer"&&g==="end";return h==="outer"&&g==="center"?f.createElement("div",{className:`${t}-layout-bottom`},k,s):f.createElement("div",{className:`${t}-outer`,style:E},$&&s,k,O&&s)},Lw=e=>{const{size:t,steps:n,rounding:r=Math.round,percent:a=0,strokeWidth:o=8,strokeColor:i,trailColor:l=null,prefixCls:s,children:c}=e,u=r(n*(a/100)),g=t??[t==="small"?2:14,o],[h,v]=Sl(g,"step",{steps:n,strokeWidth:o}),m=h/n,p=Array.from({length:n});for(let b=0;b<n;b++){const y=Array.isArray(i)?i[b]:i;p[b]=f.createElement("div",{key:b,className:pe(`${s}-steps-item`,{[`${s}-steps-item-active`]:b<=u-1}),style:{backgroundColor:b<=u-1?y:l,width:m,height:v}})}return f.createElement("div",{className:`${s}-steps-outer`},p,c)};var zw=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const Hw=["normal","exception","active","success"],Vw=f.forwardRef((e,t)=>{const{prefixCls:n,className:r,rootClassName:a,steps:o,strokeColor:i,percent:l=0,size:s="default",showInfo:c=!0,type:u="line",status:d,format:g,style:h,percentPosition:v={}}=e,m=zw(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:p="end",type:b="outer"}=v,y=Array.isArray(i)?i[0]:i,x=typeof i=="string"||Array.isArray(i)?i:void 0,w=f.useMemo(()=>{if(y){const T=typeof y=="string"?y:Object.values(y)[0];return new pr(T).isLight()}return!1},[i]),C=f.useMemo(()=>{var T,_;const B=Wi(e);return parseInt(B!==void 0?(T=B??0)===null||T===void 0?void 0:T.toString():(_=l??0)===null||_===void 0?void 0:_.toString(),10)},[l,e.success,e.successPercent]),S=f.useMemo(()=>!Hw.includes(d)&&C>=100?"success":d||"normal",[d,C]),{getPrefixCls:E,direction:k,progress:$}=f.useContext(un),O=E("progress",n),[D,P,A]=Aw(O),N=u==="line",I=N&&!o,M=f.useMemo(()=>{if(!c)return null;const T=Wi(e);let _;const B=g||(j=>`${j}%`),L=N&&w&&b==="inner";return b==="inner"||g||S!=="exception"&&S!=="success"?_=B(Fr(l),Fr(T)):S==="exception"?_=N?f.createElement(ry,null):f.createElement(ay,null):S==="success"&&(_=N?f.createElement(oy,null):f.createElement(vy,null)),f.createElement("span",{className:pe(`${O}-text`,{[`${O}-text-bright`]:L,[`${O}-text-${p}`]:I,[`${O}-text-${b}`]:I}),title:typeof _=="string"?_:void 0},_)},[c,l,C,S,u,O,g]);let F;u==="line"?F=o?f.createElement(Lw,Object.assign({},e,{strokeColor:x,prefixCls:O,steps:typeof o=="object"?o.count:o}),M):f.createElement(Bw,Object.assign({},e,{strokeColor:y,prefixCls:O,direction:k,percentPosition:{align:p,type:b}}),M):(u==="circle"||u==="dashboard")&&(F=f.createElement(Nw,Object.assign({},e,{strokeColor:y,prefixCls:O,progressStatus:S}),M));const R=pe(O,`${O}-status-${S}`,{[`${O}-${u==="dashboard"&&"circle"||u}`]:u!=="line",[`${O}-inline-circle`]:u==="circle"&&Sl(s,"circle")[0]<=20,[`${O}-line`]:I,[`${O}-line-align-${p}`]:I,[`${O}-line-position-${b}`]:I,[`${O}-steps`]:o,[`${O}-show-info`]:c,[`${O}-${s}`]:typeof s=="string",[`${O}-rtl`]:k==="rtl"},$==null?void 0:$.className,r,a,P,A);return D(f.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},$==null?void 0:$.style),h),className:R,role:"progressbar","aria-valuenow":C,"aria-valuemin":0,"aria-valuemax":100},Kn(m,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),F))});var Kw={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"},Ww=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:Kw}))},qw=f.forwardRef(Ww),Uw={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},Yw=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:Uw}))},Gw=f.forwardRef(Yw),Xw={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"},Jw=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:Xw}))},Qw=f.forwardRef(Jw),Zw={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"},eS=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:Zw}))},ev=f.forwardRef(eS),tS={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:n}},{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.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"},nS=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:tS}))},rS=f.forwardRef(nS),aS={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"},oS=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:aS}))},iS=f.forwardRef(oS),lS={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"},sS=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:lS}))},cS=f.forwardRef(sS),uS={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"},dS=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:uS}))},fS=f.forwardRef(dS),mS={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"},pS=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:mS}))},gS=f.forwardRef(pS),vS={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},hS=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:vS}))},yS=f.forwardRef(hS),bS={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:n}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:n}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:n}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"},xS=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:bS}))},CS=f.forwardRef(xS),wS={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"},SS=function(t,n){return f.createElement(yn,Oe({},t,{ref:n,icon:wS}))},$S=f.forwardRef(SS),Eu=f.createContext(null),ES=f.createContext({}),kS=function(t){for(var n=t.prefixCls,r=t.level,a=t.isStart,o=t.isEnd,i="".concat(n,"-indent-unit"),l=[],s=0;s<r;s+=1)l.push(f.createElement("span",{key:s,className:pe(i,J(J({},"".concat(i,"-start"),a[s]),"".concat(i,"-end"),o[s]))}));return f.createElement("span",{"aria-hidden":"true",className:"".concat(n,"-indent")},l)};const IS=f.memo(kS);var OS=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],Xd="open",Jd="close",NS="---",bo=function(t){var n,r,a,o=t.eventKey,i=t.className,l=t.style,s=t.dragOver,c=t.dragOverGapTop,u=t.dragOverGapBottom,d=t.isLeaf,g=t.isStart,h=t.isEnd,v=t.expanded,m=t.selected,p=t.checked,b=t.halfChecked,y=t.loading,x=t.domRef,w=t.active,C=t.data,S=t.onMouseMove,E=t.selectable,k=Dt(t,OS),$=be.useContext(Eu),O=be.useContext(ES),D=be.useRef(null),P=be.useState(!1),A=oe(P,2),N=A[0],I=A[1],M=!!($.disabled||t.disabled||(n=O.nodeDisabled)!==null&&n!==void 0&&n.call(O,C)),F=be.useMemo(function(){return!$.checkable||t.checkable===!1?!1:$.checkable},[$.checkable,t.checkable]),R=function(ae){M||$.onNodeSelect(ae,Zt(t))},T=function(ae){M||!F||t.disableCheckbox||$.onNodeCheck(ae,Zt(t),!p)},_=be.useMemo(function(){return typeof E=="boolean"?E:$.selectable},[E,$.selectable]),B=function(ae){$.onNodeClick(ae,Zt(t)),_?R(ae):T(ae)},L=function(ae){$.onNodeDoubleClick(ae,Zt(t))},j=function(ae){$.onNodeMouseEnter(ae,Zt(t))},z=function(ae){$.onNodeMouseLeave(ae,Zt(t))},K=function(ae){$.onNodeContextMenu(ae,Zt(t))},V=be.useMemo(function(){return!!($.draggable&&(!$.draggable.nodeDraggable||$.draggable.nodeDraggable(C)))},[$.draggable,C]),G=function(ae){ae.stopPropagation(),I(!0),$.onNodeDragStart(ae,t);try{ae.dataTransfer.setData("text/plain","")}catch{}},U=function(ae){ae.preventDefault(),ae.stopPropagation(),$.onNodeDragEnter(ae,t)},Z=function(ae){ae.preventDefault(),ae.stopPropagation(),$.onNodeDragOver(ae,t)},Q=function(ae){ae.stopPropagation(),$.onNodeDragLeave(ae,t)},Y=function(ae){ae.stopPropagation(),I(!1),$.onNodeDragEnd(ae,t)},ee=function(ae){ae.preventDefault(),ae.stopPropagation(),I(!1),$.onNodeDrop(ae,t)},ce=function(ae){y||$.onNodeExpand(ae,Zt(t))},me=be.useMemo(function(){var Fe=Pn($.keyEntities,o)||{},ae=Fe.children;return!!(ae||[]).length},[$.keyEntities,o]),we=be.useMemo(function(){return d===!1?!1:d||!$.loadData&&!me||$.loadData&&t.loaded&&!me},[d,$.loadData,me,t.loaded]);be.useEffect(function(){y||typeof $.loadData=="function"&&v&&!we&&!t.loaded&&$.onNodeLoad(Zt(t))},[y,$.loadData,$.onNodeLoad,v,we,t]);var le=be.useMemo(function(){var Fe;return(Fe=$.draggable)!==null&&Fe!==void 0&&Fe.icon?be.createElement("span",{className:"".concat($.prefixCls,"-draggable-icon")},$.draggable.icon):null},[$.draggable]),ge=function(ae){var ze=t.switcherIcon||$.switcherIcon;return typeof ze=="function"?ze(ye(ye({},t),{},{isLeaf:ae})):ze},Ee=function(){if(we){var ae=ge(!0);return ae!==!1?be.createElement("span",{className:pe("".concat($.prefixCls,"-switcher"),"".concat($.prefixCls,"-switcher-noop"))},ae):null}var ze=ge(!1);return ze!==!1?be.createElement("span",{onClick:ce,className:pe("".concat($.prefixCls,"-switcher"),"".concat($.prefixCls,"-switcher_").concat(v?Xd:Jd))},ze):null},_e=be.useMemo(function(){if(!F)return null;var Fe=typeof F!="boolean"?F:null;return be.createElement("span",{className:pe("".concat($.prefixCls,"-checkbox"),J(J(J({},"".concat($.prefixCls,"-checkbox-checked"),p),"".concat($.prefixCls,"-checkbox-indeterminate"),!p&&b),"".concat($.prefixCls,"-checkbox-disabled"),M||t.disableCheckbox)),onClick:T,role:"checkbox","aria-checked":b?"mixed":p,"aria-disabled":M||t.disableCheckbox,"aria-label":"Select ".concat(typeof t.title=="string"?t.title:"tree node")},Fe)},[F,p,b,M,t.disableCheckbox,t.title]),Re=be.useMemo(function(){return we?null:v?Xd:Jd},[we,v]),he=be.useMemo(function(){return be.createElement("span",{className:pe("".concat($.prefixCls,"-iconEle"),"".concat($.prefixCls,"-icon__").concat(Re||"docu"),J({},"".concat($.prefixCls,"-icon_loading"),y))})},[$.prefixCls,Re,y]),ke=be.useMemo(function(){var Fe=!!$.draggable,ae=!t.disabled&&Fe&&$.dragOverNodeKey===o;return ae?$.dropIndicatorRender({dropPosition:$.dropPosition,dropLevelOffset:$.dropLevelOffset,indent:$.indent,prefixCls:$.prefixCls,direction:$.direction}):null},[$.dropPosition,$.dropLevelOffset,$.indent,$.prefixCls,$.direction,$.draggable,$.dragOverNodeKey,$.dropIndicatorRender]),de=be.useMemo(function(){var Fe=t.title,ae=Fe===void 0?NS:Fe,ze="".concat($.prefixCls,"-node-content-wrapper"),Ce;if($.showIcon){var $e=t.icon||$.icon;Ce=$e?be.createElement("span",{className:pe("".concat($.prefixCls,"-iconEle"),"".concat($.prefixCls,"-icon__customize"))},typeof $e=="function"?$e(t):$e):he}else $.loadData&&y&&(Ce=he);var ue;return typeof ae=="function"?ue=ae(C):$.titleRender?ue=$.titleRender(C):ue=ae,be.createElement("span",{ref:D,title:typeof ae=="string"?ae:"",className:pe(ze,"".concat(ze,"-").concat(Re||"normal"),J({},"".concat($.prefixCls,"-node-selected"),!M&&(m||N))),onMouseEnter:j,onMouseLeave:z,onContextMenu:K,onClick:B,onDoubleClick:L},Ce,be.createElement("span",{className:"".concat($.prefixCls,"-title")},ue),ke)},[$.prefixCls,$.showIcon,t,$.icon,he,$.titleRender,C,Re,j,z,K,B,L]),Te=ca(k,{aria:!0,data:!0}),Ve=Pn($.keyEntities,o)||{},We=Ve.level,nt=h[h.length-1],Ue=!M&&V,qe=$.draggingNodeKey===o,ct=E!==void 0?{"aria-selected":!!E}:void 0;return be.createElement("div",Oe({ref:x,role:"treeitem","aria-expanded":d?void 0:v,className:pe(i,"".concat($.prefixCls,"-treenode"),(a={},J(J(J(J(J(J(J(J(J(J(a,"".concat($.prefixCls,"-treenode-disabled"),M),"".concat($.prefixCls,"-treenode-switcher-").concat(v?"open":"close"),!d),"".concat($.prefixCls,"-treenode-checkbox-checked"),p),"".concat($.prefixCls,"-treenode-checkbox-indeterminate"),b),"".concat($.prefixCls,"-treenode-selected"),m),"".concat($.prefixCls,"-treenode-loading"),y),"".concat($.prefixCls,"-treenode-active"),w),"".concat($.prefixCls,"-treenode-leaf-last"),nt),"".concat($.prefixCls,"-treenode-draggable"),V),"dragging",qe),J(J(J(J(J(J(J(a,"drop-target",$.dropTargetKey===o),"drop-container",$.dropContainerKey===o),"drag-over",!M&&s),"drag-over-gap-top",!M&&c),"drag-over-gap-bottom",!M&&u),"filter-node",(r=$.filterTreeNode)===null||r===void 0?void 0:r.call($,Zt(t))),"".concat($.prefixCls,"-treenode-leaf"),we))),style:l,draggable:Ue,onDragStart:Ue?G:void 0,onDragEnter:V?U:void 0,onDragOver:V?Z:void 0,onDragLeave:V?Q:void 0,onDrop:V?ee:void 0,onDragEnd:V?Y:void 0,onMouseMove:S},ct,Te),be.createElement(IS,{prefixCls:$.prefixCls,level:We,isStart:g,isEnd:h}),le,Ee(),_e,de)};bo.isTreeNode=1;function hr(e,t){if(!e)return[];var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function Sr(e,t){var n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function ku(e){return e.split("-")}function DS(e,t){var n=[],r=Pn(t,e);function a(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(i){var l=i.key,s=i.children;n.push(l),a(s)})}return a(r.children),n}function MS(e){if(e.parent){var t=ku(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function FS(e){var t=ku(e.pos);return Number(t[t.length-1])===0}function Qd(e,t,n,r,a,o,i,l,s,c){var u,d=e.clientX,g=e.clientY,h=e.target.getBoundingClientRect(),v=h.top,m=h.height,p=(c==="rtl"?-1:1)*(((a==null?void 0:a.x)||0)-d),b=(p-12)/r,y=s.filter(function(M){var F;return(F=l[M])===null||F===void 0||(F=F.children)===null||F===void 0?void 0:F.length}),x=Pn(l,n.eventKey);if(g<v+m/2){var w=i.findIndex(function(M){return M.key===x.key}),C=w<=0?0:w-1,S=i[C].key;x=Pn(l,S)}var E=x.key,k=x,$=x.key,O=0,D=0;if(!y.includes(E))for(var P=0;P<b&&MS(x);P+=1)x=x.parent,D+=1;var A=t.data,N=x.node,I=!0;return FS(x)&&x.level===0&&g<v+m/2&&o({dragNode:A,dropNode:N,dropPosition:-1})&&x.key===n.eventKey?O=-1:(k.children||[]).length&&y.includes($)?o({dragNode:A,dropNode:N,dropPosition:0})?O=0:I=!1:D===0?b>-1.5?o({dragNode:A,dropNode:N,dropPosition:1})?O=1:I=!1:o({dragNode:A,dropNode:N,dropPosition:0})?O=0:o({dragNode:A,dropNode:N,dropPosition:1})?O=1:I=!1:o({dragNode:A,dropNode:N,dropPosition:1})?O=1:I=!1,{dropPosition:O,dropLevelOffset:D,dropTargetKey:x.key,dropTargetPos:x.pos,dragOverNodeKey:$,dropContainerKey:O===0?null:((u=x.parent)===null||u===void 0?void 0:u.key)||null,dropAllowed:I}}function Zd(e,t){if(e){var n=t.multiple;return n?e.slice():e.length?[e[0]]:e}}function Zl(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(pn(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return On(!1,"`checkedKeys` is not an array or an object"),null;return t}function qs(e,t){var n=new Set;function r(a){if(!n.has(a)){var o=Pn(t,a);if(o){n.add(a);var i=o.parent,l=o.node;l.disabled||i&&r(i.key)}}}return(e||[]).forEach(function(a){r(a)}),at(n)}var PS=function(t){var n=t.dropPosition,r=t.dropLevelOffset,a=t.indent,o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(n){case-1:o.top=0,o.left=-r*a;break;case 1:o.bottom=0,o.left=-r*a;break;case 0:o.bottom=0,o.left=a;break}return be.createElement("div",{style:o})};function tv(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function RS(e,t){var n=f.useState(!1),r=oe(n,2),a=r[0],o=r[1];Tn(function(){if(a)return e(),function(){t()}},[a]),Tn(function(){return o(!0),function(){o(!1)}},[])}var AS=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],TS=f.forwardRef(function(e,t){var n=e.className,r=e.style,a=e.motion,o=e.motionNodes,i=e.motionType,l=e.onMotionStart,s=e.onMotionEnd,c=e.active,u=e.treeNodeRequiredProps,d=Dt(e,AS),g=f.useState(!0),h=oe(g,2),v=h[0],m=h[1],p=f.useContext(Eu),b=p.prefixCls,y=o&&i!=="hide";Tn(function(){o&&y!==v&&m(y)},[o]);var x=function(){o&&l()},w=f.useRef(!1),C=function(){o&&!w.current&&(w.current=!0,s())};RS(x,C);var S=function(k){y===k&&C()};return o?f.createElement(al,Oe({ref:t,visible:v},a,{motionAppear:i==="show",onVisibleChanged:S}),function(E,k){var $=E.className,O=E.style;return f.createElement("div",{ref:k,className:pe("".concat(b,"-treenode-motion"),$),style:O},o.map(function(D){var P=Object.assign({},(tv(D.data),D.data)),A=D.title,N=D.key,I=D.isStart,M=D.isEnd;delete P.children;var F=fo(N,u);return f.createElement(bo,Oe({},P,F,{title:A,active:c,data:D.data,key:N,isStart:I,isEnd:M}))}))}):f.createElement(bo,Oe({domRef:t,className:n,style:r},d,{active:c}))});function jS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function a(o,i){var l=new Map;o.forEach(function(c){l.set(c,!0)});var s=i.filter(function(c){return!l.has(c)});return s.length===1?s[0]:null}return n<r?{add:!0,key:a(e,t)}:{add:!1,key:a(t,e)}}function ef(e,t,n){var r=e.findIndex(function(l){return l.key===n}),a=e[r+1],o=t.findIndex(function(l){return l.key===n});if(a){var i=t.findIndex(function(l){return l.key===a.key});return t.slice(o+1,i)}return t.slice(o+1)}var _S=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],tf={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},BS=function(){},na="RC_TREE_MOTION_".concat(Math.random()),Us={key:na},nv={key:na,level:0,index:0,pos:"0",node:Us,nodes:[Us]},nf={parent:null,children:[],pos:nv.pos,data:Us,title:null,key:na,isStart:[],isEnd:[]};function rf(e,t,n,r){return t===!1||!n?e:e.slice(0,Math.ceil(n/r)+1)}function af(e){var t=e.key,n=e.pos;return Lo(t,n)}function LS(e){for(var t=String(e.data.key),n=e;n.parent;)n=n.parent,t="".concat(n.data.key," > ").concat(t);return t}var zS=f.forwardRef(function(e,t){var n=e.prefixCls,r=e.data;e.selectable,e.checkable;var a=e.expandedKeys,o=e.selectedKeys,i=e.checkedKeys,l=e.loadedKeys,s=e.loadingKeys,c=e.halfCheckedKeys,u=e.keyEntities,d=e.disabled,g=e.dragging,h=e.dragOverNodeKey,v=e.dropPosition,m=e.motion,p=e.height,b=e.itemHeight,y=e.virtual,x=e.scrollWidth,w=e.focusable,C=e.activeItem,S=e.focused,E=e.tabIndex,k=e.onKeyDown,$=e.onFocus,O=e.onBlur,D=e.onActiveChange,P=e.onListChangeStart,A=e.onListChangeEnd,N=Dt(e,_S),I=f.useRef(null),M=f.useRef(null);f.useImperativeHandle(t,function(){return{scrollTo:function(ke){I.current.scrollTo(ke)},getIndentWidth:function(){return M.current.offsetWidth}}});var F=f.useState(a),R=oe(F,2),T=R[0],_=R[1],B=f.useState(r),L=oe(B,2),j=L[0],z=L[1],K=f.useState(r),V=oe(K,2),G=V[0],U=V[1],Z=f.useState([]),Q=oe(Z,2),Y=Q[0],ee=Q[1],ce=f.useState(null),me=oe(ce,2),we=me[0],le=me[1],ge=f.useRef(r);ge.current=r;function Ee(){var he=ge.current;z(he),U(he),ee([]),le(null),A()}Tn(function(){_(a);var he=jS(T,a);if(he.key!==null)if(he.add){var ke=j.findIndex(function(Ue){var qe=Ue.key;return qe===he.key}),de=rf(ef(j,r,he.key),y,p,b),Te=j.slice();Te.splice(ke+1,0,nf),U(Te),ee(de),le("show")}else{var Ve=r.findIndex(function(Ue){var qe=Ue.key;return qe===he.key}),We=rf(ef(r,j,he.key),y,p,b),nt=r.slice();nt.splice(Ve+1,0,nf),U(nt),ee(We),le("hide")}else j!==r&&(z(r),U(r))},[a,r]),f.useEffect(function(){g||Ee()},[g]);var _e=m?G:r,Re={expandedKeys:a,selectedKeys:o,loadedKeys:l,loadingKeys:s,checkedKeys:i,halfCheckedKeys:c,dragOverNodeKey:h,dropPosition:v,keyEntities:u};return f.createElement(f.Fragment,null,S&&C&&f.createElement("span",{style:tf,"aria-live":"assertive"},LS(C)),f.createElement("div",null,f.createElement("input",{style:tf,disabled:w===!1||d,tabIndex:w!==!1?E:null,onKeyDown:k,onFocus:$,onBlur:O,value:"",onChange:BS,"aria-label":"for screen reader"})),f.createElement("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},f.createElement("div",{className:"".concat(n,"-indent")},f.createElement("div",{ref:M,className:"".concat(n,"-indent-unit")}))),f.createElement(hy,Oe({},N,{data:_e,itemKey:af,height:p,fullHeight:!1,virtual:y,itemHeight:b,scrollWidth:x,prefixCls:"".concat(n,"-list"),ref:I,role:"tree",onVisibleChange:function(ke){ke.every(function(de){return af(de)!==na})&&Ee()}}),function(he){var ke=he.pos,de=Object.assign({},(tv(he.data),he.data)),Te=he.title,Ve=he.key,We=he.isStart,nt=he.isEnd,Ue=Lo(Ve,ke);delete de.key,delete de.children;var qe=fo(Ue,Re);return f.createElement(TS,Oe({},de,qe,{title:Te,active:!!C&&Ve===C.key,pos:ke,data:he.data,isStart:We,isEnd:nt,motion:m,motionNodes:Ve===na?Y:null,motionType:we,onMotionStart:P,onMotionEnd:Ee,treeNodeRequiredProps:Re,onMouseMove:function(){D(null)}}))}))}),HS=10,Iu=(function(e){tl(n,e);var t=nl(n);function n(){var r;oa(this,n);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return r=t.call.apply(t,[this].concat(o)),J(Je(r),"destroyed",!1),J(Je(r),"delayedDragEnterLogic",void 0),J(Je(r),"loadingRetryTimes",{}),J(Je(r),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:Na()}),J(Je(r),"dragStartMousePosition",null),J(Je(r),"dragNodeProps",null),J(Je(r),"currentMouseOverDroppableNodeKey",null),J(Je(r),"listRef",f.createRef()),J(Je(r),"onNodeDragStart",function(l,s){var c=r.state,u=c.expandedKeys,d=c.keyEntities,g=r.props.onDragStart,h=s.eventKey;r.dragNodeProps=s,r.dragStartMousePosition={x:l.clientX,y:l.clientY};var v=hr(u,h);r.setState({draggingNodeKey:h,dragChildrenKeys:DS(h,d),indent:r.listRef.current.getIndentWidth()}),r.setExpandedKeys(v),window.addEventListener("dragend",r.onWindowDragEnd),g==null||g({event:l,node:Zt(s)})}),J(Je(r),"onNodeDragEnter",function(l,s){var c=r.state,u=c.expandedKeys,d=c.keyEntities,g=c.dragChildrenKeys,h=c.flattenNodes,v=c.indent,m=r.props,p=m.onDragEnter,b=m.onExpand,y=m.allowDrop,x=m.direction,w=s.pos,C=s.eventKey;if(r.currentMouseOverDroppableNodeKey!==C&&(r.currentMouseOverDroppableNodeKey=C),!r.dragNodeProps){r.resetDragState();return}var S=Qd(l,r.dragNodeProps,s,v,r.dragStartMousePosition,y,h,d,u,x),E=S.dropPosition,k=S.dropLevelOffset,$=S.dropTargetKey,O=S.dropContainerKey,D=S.dropTargetPos,P=S.dropAllowed,A=S.dragOverNodeKey;if(g.includes($)||!P){r.resetDragState();return}if(r.delayedDragEnterLogic||(r.delayedDragEnterLogic={}),Object.keys(r.delayedDragEnterLogic).forEach(function(N){clearTimeout(r.delayedDragEnterLogic[N])}),r.dragNodeProps.eventKey!==s.eventKey&&(l.persist(),r.delayedDragEnterLogic[w]=window.setTimeout(function(){if(r.state.draggingNodeKey!==null){var N=at(u),I=Pn(d,s.eventKey);I&&(I.children||[]).length&&(N=Sr(u,s.eventKey)),r.props.hasOwnProperty("expandedKeys")||r.setExpandedKeys(N),b==null||b(N,{node:Zt(s),expanded:!0,nativeEvent:l.nativeEvent})}},800)),r.dragNodeProps.eventKey===$&&k===0){r.resetDragState();return}r.setState({dragOverNodeKey:A,dropPosition:E,dropLevelOffset:k,dropTargetKey:$,dropContainerKey:O,dropTargetPos:D,dropAllowed:P}),p==null||p({event:l,node:Zt(s),expandedKeys:u})}),J(Je(r),"onNodeDragOver",function(l,s){var c=r.state,u=c.dragChildrenKeys,d=c.flattenNodes,g=c.keyEntities,h=c.expandedKeys,v=c.indent,m=r.props,p=m.onDragOver,b=m.allowDrop,y=m.direction;if(r.dragNodeProps){var x=Qd(l,r.dragNodeProps,s,v,r.dragStartMousePosition,b,d,g,h,y),w=x.dropPosition,C=x.dropLevelOffset,S=x.dropTargetKey,E=x.dropContainerKey,k=x.dropTargetPos,$=x.dropAllowed,O=x.dragOverNodeKey;u.includes(S)||!$||(r.dragNodeProps.eventKey===S&&C===0?r.state.dropPosition===null&&r.state.dropLevelOffset===null&&r.state.dropTargetKey===null&&r.state.dropContainerKey===null&&r.state.dropTargetPos===null&&r.state.dropAllowed===!1&&r.state.dragOverNodeKey===null||r.resetDragState():w===r.state.dropPosition&&C===r.state.dropLevelOffset&&S===r.state.dropTargetKey&&E===r.state.dropContainerKey&&k===r.state.dropTargetPos&&$===r.state.dropAllowed&&O===r.state.dragOverNodeKey||r.setState({dropPosition:w,dropLevelOffset:C,dropTargetKey:S,dropContainerKey:E,dropTargetPos:k,dropAllowed:$,dragOverNodeKey:O}),p==null||p({event:l,node:Zt(s)}))}}),J(Je(r),"onNodeDragLeave",function(l,s){r.currentMouseOverDroppableNodeKey===s.eventKey&&!l.currentTarget.contains(l.relatedTarget)&&(r.resetDragState(),r.currentMouseOverDroppableNodeKey=null);var c=r.props.onDragLeave;c==null||c({event:l,node:Zt(s)})}),J(Je(r),"onWindowDragEnd",function(l){r.onNodeDragEnd(l,null,!0),window.removeEventListener("dragend",r.onWindowDragEnd)}),J(Je(r),"onNodeDragEnd",function(l,s){var c=r.props.onDragEnd;r.setState({dragOverNodeKey:null}),r.cleanDragState(),c==null||c({event:l,node:Zt(s)}),r.dragNodeProps=null,window.removeEventListener("dragend",r.onWindowDragEnd)}),J(Je(r),"onNodeDrop",function(l,s){var c,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=r.state,g=d.dragChildrenKeys,h=d.dropPosition,v=d.dropTargetKey,m=d.dropTargetPos,p=d.dropAllowed;if(p){var b=r.props.onDrop;if(r.setState({dragOverNodeKey:null}),r.cleanDragState(),v!==null){var y=ye(ye({},fo(v,r.getTreeNodeRequiredProps())),{},{active:((c=r.getActiveItem())===null||c===void 0?void 0:c.key)===v,data:Pn(r.state.keyEntities,v).node}),x=g.includes(v);On(!x,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var w=ku(m),C={event:l,node:Zt(y),dragNode:r.dragNodeProps?Zt(r.dragNodeProps):null,dragNodesKeys:[r.dragNodeProps.eventKey].concat(g),dropToGap:h!==0,dropPosition:h+Number(w[w.length-1])};u||b==null||b(C),r.dragNodeProps=null}}}),J(Je(r),"cleanDragState",function(){var l=r.state.draggingNodeKey;l!==null&&r.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),r.dragStartMousePosition=null,r.currentMouseOverDroppableNodeKey=null}),J(Je(r),"triggerExpandActionExpand",function(l,s){var c=r.state,u=c.expandedKeys,d=c.flattenNodes,g=s.expanded,h=s.key,v=s.isLeaf;if(!(v||l.shiftKey||l.metaKey||l.ctrlKey)){var m=d.filter(function(b){return b.key===h})[0],p=Zt(ye(ye({},fo(h,r.getTreeNodeRequiredProps())),{},{data:m.data}));r.setExpandedKeys(g?hr(u,h):Sr(u,h)),r.onNodeExpand(l,p)}}),J(Je(r),"onNodeClick",function(l,s){var c=r.props,u=c.onClick,d=c.expandAction;d==="click"&&r.triggerExpandActionExpand(l,s),u==null||u(l,s)}),J(Je(r),"onNodeDoubleClick",function(l,s){var c=r.props,u=c.onDoubleClick,d=c.expandAction;d==="doubleClick"&&r.triggerExpandActionExpand(l,s),u==null||u(l,s)}),J(Je(r),"onNodeSelect",function(l,s){var c=r.state.selectedKeys,u=r.state,d=u.keyEntities,g=u.fieldNames,h=r.props,v=h.onSelect,m=h.multiple,p=s.selected,b=s[g.key],y=!p;y?m?c=Sr(c,b):c=[b]:c=hr(c,b);var x=c.map(function(w){var C=Pn(d,w);return C?C.node:null}).filter(Boolean);r.setUncontrolledState({selectedKeys:c}),v==null||v(c,{event:"select",selected:y,node:s,selectedNodes:x,nativeEvent:l.nativeEvent})}),J(Je(r),"onNodeCheck",function(l,s,c){var u=r.state,d=u.keyEntities,g=u.checkedKeys,h=u.halfCheckedKeys,v=r.props,m=v.checkStrictly,p=v.onCheck,b=s.key,y,x={event:"check",node:s,checked:c,nativeEvent:l.nativeEvent};if(m){var w=c?Sr(g,b):hr(g,b),C=hr(h,b);y={checked:w,halfChecked:C},x.checkedNodes=w.map(function(D){return Pn(d,D)}).filter(Boolean).map(function(D){return D.node}),r.setUncontrolledState({checkedKeys:w})}else{var S=Xl([].concat(at(g),[b]),!0,d),E=S.checkedKeys,k=S.halfCheckedKeys;if(!c){var $=new Set(E);$.delete(b);var O=Xl(Array.from($),{halfCheckedKeys:k},d);E=O.checkedKeys,k=O.halfCheckedKeys}y=E,x.checkedNodes=[],x.checkedNodesPositions=[],x.halfCheckedKeys=k,E.forEach(function(D){var P=Pn(d,D);if(P){var A=P.node,N=P.pos;x.checkedNodes.push(A),x.checkedNodesPositions.push({node:A,pos:N})}}),r.setUncontrolledState({checkedKeys:E},!1,{halfCheckedKeys:k})}p==null||p(y,x)}),J(Je(r),"onNodeLoad",function(l){var s,c=l.key,u=r.state.keyEntities,d=Pn(u,c);if(!(d!=null&&(s=d.children)!==null&&s!==void 0&&s.length)){var g=new Promise(function(h,v){r.setState(function(m){var p=m.loadedKeys,b=p===void 0?[]:p,y=m.loadingKeys,x=y===void 0?[]:y,w=r.props,C=w.loadData,S=w.onLoad;if(!C||b.includes(c)||x.includes(c))return null;var E=C(l);return E.then(function(){var k=r.state.loadedKeys,$=Sr(k,c);S==null||S($,{event:"load",node:l}),r.setUncontrolledState({loadedKeys:$}),r.setState(function(O){return{loadingKeys:hr(O.loadingKeys,c)}}),h()}).catch(function(k){if(r.setState(function(O){return{loadingKeys:hr(O.loadingKeys,c)}}),r.loadingRetryTimes[c]=(r.loadingRetryTimes[c]||0)+1,r.loadingRetryTimes[c]>=HS){var $=r.state.loadedKeys;On(!1,"Retry for `loadData` many times but still failed. No more retry."),r.setUncontrolledState({loadedKeys:Sr($,c)}),h()}v(k)}),{loadingKeys:Sr(x,c)}})});return g.catch(function(){}),g}}),J(Je(r),"onNodeMouseEnter",function(l,s){var c=r.props.onMouseEnter;c==null||c({event:l,node:s})}),J(Je(r),"onNodeMouseLeave",function(l,s){var c=r.props.onMouseLeave;c==null||c({event:l,node:s})}),J(Je(r),"onNodeContextMenu",function(l,s){var c=r.props.onRightClick;c&&(l.preventDefault(),c({event:l,node:s}))}),J(Je(r),"onFocus",function(){var l=r.props.onFocus;r.setState({focused:!0});for(var s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];l==null||l.apply(void 0,c)}),J(Je(r),"onBlur",function(){var l=r.props.onBlur;r.setState({focused:!1}),r.onActiveChange(null);for(var s=arguments.length,c=new Array(s),u=0;u<s;u++)c[u]=arguments[u];l==null||l.apply(void 0,c)}),J(Je(r),"getTreeNodeRequiredProps",function(){var l=r.state,s=l.expandedKeys,c=l.selectedKeys,u=l.loadedKeys,d=l.loadingKeys,g=l.checkedKeys,h=l.halfCheckedKeys,v=l.dragOverNodeKey,m=l.dropPosition,p=l.keyEntities;return{expandedKeys:s||[],selectedKeys:c||[],loadedKeys:u||[],loadingKeys:d||[],checkedKeys:g||[],halfCheckedKeys:h||[],dragOverNodeKey:v,dropPosition:m,keyEntities:p}}),J(Je(r),"setExpandedKeys",function(l){var s=r.state,c=s.treeData,u=s.fieldNames,d=Gl(c,l,u);r.setUncontrolledState({expandedKeys:l,flattenNodes:d},!0)}),J(Je(r),"onNodeExpand",function(l,s){var c=r.state.expandedKeys,u=r.state,d=u.listChanging,g=u.fieldNames,h=r.props,v=h.onExpand,m=h.loadData,p=s.expanded,b=s[g.key];if(!d){var y=c.includes(b),x=!p;if(On(p&&y||!p&&!y,"Expand state not sync with index check"),c=x?Sr(c,b):hr(c,b),r.setExpandedKeys(c),v==null||v(c,{node:s,expanded:x,nativeEvent:l.nativeEvent}),x&&m){var w=r.onNodeLoad(s);w&&w.then(function(){var C=Gl(r.state.treeData,c,g);r.setUncontrolledState({flattenNodes:C})}).catch(function(){var C=r.state.expandedKeys,S=hr(C,b);r.setExpandedKeys(S)})}}}),J(Je(r),"onListChangeStart",function(){r.setUncontrolledState({listChanging:!0})}),J(Je(r),"onListChangeEnd",function(){setTimeout(function(){r.setUncontrolledState({listChanging:!1})})}),J(Je(r),"onActiveChange",function(l){var s=r.state.activeKey,c=r.props,u=c.onActiveChange,d=c.itemScrollOffset,g=d===void 0?0:d;s!==l&&(r.setState({activeKey:l}),l!==null&&r.scrollTo({key:l,offset:g}),u==null||u(l))}),J(Je(r),"getActiveItem",function(){var l=r.state,s=l.activeKey,c=l.flattenNodes;return s===null?null:c.find(function(u){var d=u.key;return d===s})||null}),J(Je(r),"offsetActiveKey",function(l){var s=r.state,c=s.flattenNodes,u=s.activeKey,d=c.findIndex(function(v){var m=v.key;return m===u});d===-1&&l<0&&(d=c.length),d=(d+l+c.length)%c.length;var g=c[d];if(g){var h=g.key;r.onActiveChange(h)}else r.onActiveChange(null)}),J(Je(r),"onKeyDown",function(l){var s=r.state,c=s.activeKey,u=s.expandedKeys,d=s.checkedKeys,g=s.fieldNames,h=r.props,v=h.onKeyDown,m=h.checkable,p=h.selectable;switch(l.which){case kt.UP:{r.offsetActiveKey(-1),l.preventDefault();break}case kt.DOWN:{r.offsetActiveKey(1),l.preventDefault();break}}var b=r.getActiveItem();if(b&&b.data){var y=r.getTreeNodeRequiredProps(),x=b.data.isLeaf===!1||!!(b.data[g.children]||[]).length,w=Zt(ye(ye({},fo(c,y)),{},{data:b.data,active:!0}));switch(l.which){case kt.LEFT:{x&&u.includes(c)?r.onNodeExpand({},w):b.parent&&r.onActiveChange(b.parent.key),l.preventDefault();break}case kt.RIGHT:{x&&!u.includes(c)?r.onNodeExpand({},w):b.children&&b.children.length&&r.onActiveChange(b.children[0].key),l.preventDefault();break}case kt.ENTER:case kt.SPACE:{m&&!w.disabled&&w.checkable!==!1&&!w.disableCheckbox?r.onNodeCheck({},w,!d.includes(c)):!m&&p&&!w.disabled&&w.selectable!==!1&&r.onNodeSelect({},w);break}}}v==null||v(l)}),J(Je(r),"setUncontrolledState",function(l){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!r.destroyed){var u=!1,d=!0,g={};Object.keys(l).forEach(function(h){if(r.props.hasOwnProperty(h)){d=!1;return}u=!0,g[h]=l[h]}),u&&(!s||d)&&r.setState(ye(ye({},g),c))}}),J(Je(r),"scrollTo",function(l){r.listRef.current.scrollTo(l)}),r}return ia(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var a=this.props,o=a.activeKey,i=a.itemScrollOffset,l=i===void 0?0:i;o!==void 0&&o!==this.state.activeKey&&(this.setState({activeKey:o}),o!==null&&this.scrollTo({key:o,offset:l}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var a=this.state,o=a.focused,i=a.flattenNodes,l=a.keyEntities,s=a.draggingNodeKey,c=a.activeKey,u=a.dropLevelOffset,d=a.dropContainerKey,g=a.dropTargetKey,h=a.dropPosition,v=a.dragOverNodeKey,m=a.indent,p=this.props,b=p.prefixCls,y=p.className,x=p.style,w=p.showLine,C=p.focusable,S=p.tabIndex,E=S===void 0?0:S,k=p.selectable,$=p.showIcon,O=p.icon,D=p.switcherIcon,P=p.draggable,A=p.checkable,N=p.checkStrictly,I=p.disabled,M=p.motion,F=p.loadData,R=p.filterTreeNode,T=p.height,_=p.itemHeight,B=p.scrollWidth,L=p.virtual,j=p.titleRender,z=p.dropIndicatorRender,K=p.onContextMenu,V=p.onScroll,G=p.direction,U=p.rootClassName,Z=p.rootStyle,Q=ca(this.props,{aria:!0,data:!0}),Y;P&&(pn(P)==="object"?Y=P:typeof P=="function"?Y={nodeDraggable:P}:Y={});var ee={prefixCls:b,selectable:k,showIcon:$,icon:O,switcherIcon:D,draggable:Y,draggingNodeKey:s,checkable:A,checkStrictly:N,disabled:I,keyEntities:l,dropLevelOffset:u,dropContainerKey:d,dropTargetKey:g,dropPosition:h,dragOverNodeKey:v,indent:m,direction:G,dropIndicatorRender:z,loadData:F,filterTreeNode:R,titleRender:j,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 f.createElement(Eu.Provider,{value:ee},f.createElement("div",{className:pe(b,y,U,J(J(J({},"".concat(b,"-show-line"),w),"".concat(b,"-focused"),o),"".concat(b,"-active-focused"),c!==null)),style:Z},f.createElement(zS,Oe({ref:this.listRef,prefixCls:b,style:x,data:i,disabled:I,selectable:k,checkable:!!A,motion:M,dragging:s!==null,height:T,itemHeight:_,virtual:L,focusable:C,focused:o,tabIndex:E,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:K,onScroll:V,scrollWidth:B},this.getTreeNodeRequiredProps(),Q))))}}],[{key:"getDerivedStateFromProps",value:function(a,o){var i=o.prevProps,l={prevProps:a};function s(E){return!i&&a.hasOwnProperty(E)||i&&i[E]!==a[E]}var c,u=o.fieldNames;if(s("fieldNames")&&(u=Na(a.fieldNames),l.fieldNames=u),s("treeData")?c=a.treeData:s("children")&&(On(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),c=Fg(a.children)),c){l.treeData=c;var d=Pg(c,{fieldNames:u});l.keyEntities=ye(J({},na,nv),d.keyEntities)}var g=l.keyEntities||o.keyEntities;if(s("expandedKeys")||i&&s("autoExpandParent"))l.expandedKeys=a.autoExpandParent||!i&&a.defaultExpandParent?qs(a.expandedKeys,g):a.expandedKeys;else if(!i&&a.defaultExpandAll){var h=ye({},g);delete h[na];var v=[];Object.keys(h).forEach(function(E){var k=h[E];k.children&&k.children.length&&v.push(k.key)}),l.expandedKeys=v}else!i&&a.defaultExpandedKeys&&(l.expandedKeys=a.autoExpandParent||a.defaultExpandParent?qs(a.defaultExpandedKeys,g):a.defaultExpandedKeys);if(l.expandedKeys||delete l.expandedKeys,c||l.expandedKeys){var m=Gl(c||o.treeData,l.expandedKeys||o.expandedKeys,u);l.flattenNodes=m}if(a.selectable&&(s("selectedKeys")?l.selectedKeys=Zd(a.selectedKeys,a):!i&&a.defaultSelectedKeys&&(l.selectedKeys=Zd(a.defaultSelectedKeys,a))),a.checkable){var p;if(s("checkedKeys")?p=Zl(a.checkedKeys)||{}:!i&&a.defaultCheckedKeys?p=Zl(a.defaultCheckedKeys)||{}:c&&(p=Zl(a.checkedKeys)||{checkedKeys:o.checkedKeys,halfCheckedKeys:o.halfCheckedKeys}),p){var b=p,y=b.checkedKeys,x=y===void 0?[]:y,w=b.halfCheckedKeys,C=w===void 0?[]:w;if(!a.checkStrictly){var S=Xl(x,!0,g);x=S.checkedKeys,C=S.halfCheckedKeys}l.checkedKeys=x,l.halfCheckedKeys=C}}return s("loadedKeys")&&(l.loadedKeys=a.loadedKeys),l}}]),n})(f.Component);J(Iu,"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:PS,allowDrop:function(){return!0},expandAction:!1});J(Iu,"TreeNode",bo);const VS=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:n,directoryNodeSelectedColor:r,motionDurationMid:a,borderRadius:o,controlItemBgHover:i})=>({[`${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 ${a}`,content:'""',borderRadius:o},"&:hover:before":{background:i}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:n,borderRadius:o,[`${e}-switcher, ${e}-draggable-icon`]:{color:r},[`${e}-node-content-wrapper`]:{color:r,background:"transparent","&:before, &:hover:before":{background:n}}}}}),KS=new _i("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),WS=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),qS=(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:`${fe(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),US=(e,t)=>{const{treeCls:n,treeNodeCls:r,treeNodePadding:a,titleHeight:o,indentSize:i,nodeSelectedBg:l,nodeHoverBg:s,colorTextQuaternary:c,controlItemBgActiveDisabled:u}=t;return{[n]:Object.assign(Object.assign({},gn(t)),{"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${n}-rtl ${n}-switcher_close ${n}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${n}-active-focused)`]:Po(t),[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${r}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:KS,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[r]:{display:"flex",alignItems:"flex-start",marginBottom:a,lineHeight:fe(o),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:a},[`&-disabled ${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${n}-checkbox-disabled + ${n}-node-selected,&${r}-disabled${r}-selected ${n}-node-content-wrapper`]:{backgroundColor:u},[`${n}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${r}-disabled)`]:{[`${n}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${n}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${r}-disabled).filter-node ${n}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:"grab",[`${n}-draggable-icon`]:{flexShrink:0,width:o,textAlign:"center",visibility:"visible",color:c},[`&${r}-disabled ${n}-draggable-icon`]:{visibility:"hidden"}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:i}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher, ${n}-checkbox`]:{marginInlineEnd:t.calc(t.calc(o).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-switcher`]:Object.assign(Object.assign({},WS(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:o,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:o,height:o,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${n}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${n}-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(o).div(2).equal(),bottom:t.calc(a).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(o).div(2).equal()).mul(.8).equal(),height:t.calc(o).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${n}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:o,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},qS(e,t)),{"&:hover":{backgroundColor:s},[`&${n}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:l},[`${n}-iconEle`]:{display:"inline-block",width:o,height:o,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${r}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${n}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(o).div(2).equal(),bottom:t.calc(a).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${r}-leaf-last ${n}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${fe(t.calc(o).div(2).equal())} !important`}})}},YS=(e,t,n=!0)=>{const r=`.${e}`,a=`${r}-treenode`,o=t.calc(t.paddingXS).div(2).equal(),i=Vn(t,{treeCls:r,treeNodeCls:a,treeNodePadding:o});return[US(e,i),n&&VS(i)].filter(Boolean)},GS=e=>{const{controlHeightSM:t,controlItemBgHover:n,controlItemBgActive:r}=e,a=t;return{titleHeight:a,indentSize:a,nodeHoverBg:n,nodeHoverColor:e.colorText,nodeSelectedBg:r,nodeSelectedColor:e.colorText}},XS=e=>{const{colorTextLightSolid:t,colorPrimary:n}=e;return Object.assign(Object.assign({},GS(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:n})},JS=ar("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:Ag(`${t}-checkbox`,e)},YS(t,e),nu(e)],XS),of=4;function QS(e){const{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:a,direction:o="ltr"}=e,i=o==="ltr"?"left":"right",l=o==="ltr"?"right":"left",s={[i]:-n*a+of,[l]:0};switch(t){case-1:s.top=-3;break;case 1:s.bottom=-3;break;default:s.bottom=-3,s[i]=a+of;break}return be.createElement("div",{style:s,className:`${r}-drop-indicator`})}const ZS=e=>{var t,n;const{prefixCls:r,switcherIcon:a,treeNodeProps:o,showLine:i,switcherLoadingIcon:l}=e,{isLeaf:s,expanded:c,loading:u}=o;if(u)return f.isValidElement(l)?l:f.createElement(Ms,{className:`${r}-switcher-loading-icon`});let d;if(i&&typeof i=="object"&&(d=i.showLeafIcon),s){if(!i)return null;if(typeof d!="boolean"&&d){const v=typeof d=="function"?d(o):d,m=`${r}-switcher-line-custom-icon`;return f.isValidElement(v)?Pr(v,{className:pe((t=v.props)===null||t===void 0?void 0:t.className,m)}):v}return d?f.createElement(ev,{className:`${r}-switcher-line-icon`}):f.createElement("span",{className:`${r}-switcher-leaf-line`})}const g=`${r}-switcher-icon`,h=typeof a=="function"?a(o):a;return f.isValidElement(h)?Pr(h,{className:pe((n=h.props)===null||n===void 0?void 0:n.className,g)}):h!==void 0?h:i?c?f.createElement(gS,{className:`${r}-switcher-line-icon`}):f.createElement($S,{className:`${r}-switcher-line-icon`}):f.createElement(qw,{className:g})},rv=be.forwardRef((e,t)=>{var n;const{getPrefixCls:r,direction:a,virtual:o,tree:i}=be.useContext(un),{prefixCls:l,className:s,showIcon:c=!1,showLine:u,switcherIcon:d,switcherLoadingIcon:g,blockNode:h=!1,children:v,checkable:m=!1,selectable:p=!0,draggable:b,motion:y,style:x}=e,w=r("tree",l),C=r(),S=y??Object.assign(Object.assign({},iu(C)),{motionAppear:!1}),E=Object.assign(Object.assign({},e),{checkable:m,selectable:p,showIcon:c,motion:S,blockNode:h,showLine:!!u,dropIndicatorRender:QS}),[k,$,O]=JS(w),[,D]=Cp(),P=D.paddingXS/2+(((n=D.Tree)===null||n===void 0?void 0:n.titleHeight)||D.controlHeightSM),A=be.useMemo(()=>{if(!b)return!1;let I={};switch(typeof b){case"function":I.nodeDraggable=b;break;case"object":I=Object.assign({},b);break}return I.icon!==!1&&(I.icon=I.icon||be.createElement(fS,null)),I},[b]),N=I=>be.createElement(ZS,{prefixCls:w,switcherIcon:d,switcherLoadingIcon:g,treeNodeProps:I,showLine:u});return k(be.createElement(Iu,Object.assign({itemHeight:P,ref:t,virtual:o},E,{style:Object.assign(Object.assign({},i==null?void 0:i.style),x),prefixCls:w,className:pe({[`${w}-icon-hide`]:!c,[`${w}-block-node`]:h,[`${w}-unselectable`]:!p,[`${w}-rtl`]:a==="rtl"},i==null?void 0:i.className,s,$,O),direction:a,checkable:m&&be.createElement("span",{className:`${w}-checkbox-inner`}),selectable:p,switcherIcon:N,draggable:A}),v))}),lf=0,es=1,sf=2;function Ou(e,t,n){const{key:r,children:a}=n;function o(i){const l=i[r],s=i[a];t(l,i)!==!1&&Ou(s||[],t,n)}e.forEach(o)}function e2({treeData:e,expandedKeys:t,startKey:n,endKey:r,fieldNames:a}){const o=[];let i=lf;if(n&&n===r)return[n];if(!n||!r)return[];function l(s){return s===n||s===r}return Ou(e,s=>{if(i===sf)return!1;if(l(s)){if(o.push(s),i===lf)i=es;else if(i===es)return i=sf,!1}else i===es&&o.push(s);return t.includes(s)},Na(a)),o}function ts(e,t,n){const r=at(t),a=[];return Ou(e,(o,i)=>{const l=r.indexOf(o);return l!==-1&&(a.push(i),r.splice(l,1)),!!r.length},Na(n)),a}var cf=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};function t2(e){const{isLeaf:t,expanded:n}=e;return t?f.createElement(ev,null):n?f.createElement(iS,null):f.createElement(cS,null)}function uf({treeData:e,children:t}){return e||Fg(t)}const n2=(e,t)=>{var{defaultExpandAll:n,defaultExpandParent:r,defaultExpandedKeys:a}=e,o=cf(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const i=f.useRef(null),l=f.useRef(null),s=()=>{const{keyEntities:k}=Pg(uf(o));let $;return n?$=Object.keys(k):r?$=qs(o.expandedKeys||a||[],k):$=o.expandedKeys||a||[],$},[c,u]=f.useState(o.selectedKeys||o.defaultSelectedKeys||[]),[d,g]=f.useState(()=>s());f.useEffect(()=>{"selectedKeys"in o&&u(o.selectedKeys)},[o.selectedKeys]),f.useEffect(()=>{"expandedKeys"in o&&g(o.expandedKeys)},[o.expandedKeys]);const h=(k,$)=>{var O;return"expandedKeys"in o||g(k),(O=o.onExpand)===null||O===void 0?void 0:O.call(o,k,$)},v=(k,$)=>{var O;const{multiple:D,fieldNames:P}=o,{node:A,nativeEvent:N}=$,{key:I=""}=A,M=uf(o),F=Object.assign(Object.assign({},$),{selected:!0}),R=(N==null?void 0:N.ctrlKey)||(N==null?void 0:N.metaKey),T=N==null?void 0:N.shiftKey;let _;D&&R?(_=k,i.current=I,l.current=_,F.selectedNodes=ts(M,_,P)):D&&T?(_=Array.from(new Set([].concat(at(l.current||[]),at(e2({treeData:M,expandedKeys:d,startKey:I,endKey:i.current,fieldNames:P}))))),F.selectedNodes=ts(M,_,P)):(_=[I],i.current=I,l.current=_,F.selectedNodes=ts(M,_,P)),(O=o.onSelect)===null||O===void 0||O.call(o,_,F),"selectedKeys"in o||u(_)},{getPrefixCls:m,direction:p}=f.useContext(un),{prefixCls:b,className:y,showIcon:x=!0,expandAction:w="click"}=o,C=cf(o,["prefixCls","className","showIcon","expandAction"]),S=m("tree",b),E=pe(`${S}-directory`,{[`${S}-directory-rtl`]:p==="rtl"},y);return f.createElement(rv,Object.assign({icon:t2,ref:t,blockNode:!0},C,{showIcon:x,expandAction:w,prefixCls:S,className:E,expandedKeys:d,selectedKeys:c,onSelect:v,onExpand:h}))},r2=f.forwardRef(n2),Nu=rv;Nu.DirectoryTree=r2;Nu.TreeNode=bo;const ns=(function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",a=e.type||"",o=a.replace(/\/.*$/,"");return n.some(function(i){var l=i.trim();if(/^\*(\/\*)?$/.test(i))return!0;if(l.charAt(0)==="."){var s=r.toLowerCase(),c=l.toLowerCase(),u=[c];return(c===".jpg"||c===".jpeg")&&(u=[".jpg",".jpeg"]),u.some(function(d){return s.endsWith(d)})}return/\/\*$/.test(l)?o===l.replace(/\/.*$/,""):a===l?!0:/^\w+$/.test(l)?(On(!1,"Upload takes an invalidate 'accept' type '".concat(l,"'.Skip for check.")),!0):!1})}return!0});function a2(e,t){var n="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}function df(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function o2(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(o){o.total>0&&(o.percent=o.loaded/o.total*100),e.onProgress(o)});var n=new FormData;e.data&&Object.keys(e.data).forEach(function(a){var o=e.data[a];if(Array.isArray(o)){o.forEach(function(i){n.append("".concat(a,"[]"),i)});return}n.append(a,o)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(o){e.onError(o)},t.onload=function(){return t.status<200||t.status>=300?e.onError(a2(e,t),df(t)):e.onSuccess(df(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var r=e.headers||{};return r["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach(function(a){r[a]!==null&&t.setRequestHeader(a,r[a])}),t.send(n),{abort:function(){t.abort()}}}var i2=(function(){var e=Ir(xn().mark(function t(n,r){var a,o,i,l,s,c,u,d;return xn().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:c=function(){return c=Ir(xn().mark(function m(p){return xn().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.abrupt("return",new Promise(function(x){p.file(function(w){r(w)?(p.fullPath&&!w.webkitRelativePath&&(Object.defineProperties(w,{webkitRelativePath:{writable:!0}}),w.webkitRelativePath=p.fullPath.replace(/^\//,""),Object.defineProperties(w,{webkitRelativePath:{writable:!1}})),x(w)):x(null)})}));case 1:case"end":return y.stop()}},m)})),c.apply(this,arguments)},s=function(m){return c.apply(this,arguments)},l=function(){return l=Ir(xn().mark(function m(p){var b,y,x,w,C;return xn().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:b=p.createReader(),y=[];case 2:return E.next=5,new Promise(function(k){b.readEntries(k,function(){return k([])})});case 5:if(x=E.sent,w=x.length,w){E.next=9;break}return E.abrupt("break",12);case 9:for(C=0;C<w;C++)y.push(x[C]);E.next=2;break;case 12:return E.abrupt("return",y);case 13:case"end":return E.stop()}},m)})),l.apply(this,arguments)},i=function(m){return l.apply(this,arguments)},a=[],o=[],n.forEach(function(v){return o.push(v.webkitGetAsEntry())}),u=(function(){var v=Ir(xn().mark(function m(p,b){var y,x;return xn().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(p){C.next=2;break}return C.abrupt("return");case 2:if(p.path=b||"",!p.isFile){C.next=10;break}return C.next=6,s(p);case 6:y=C.sent,y&&a.push(y),C.next=15;break;case 10:if(!p.isDirectory){C.next=15;break}return C.next=13,i(p);case 13:x=C.sent,o.push.apply(o,at(x));case 15:case"end":return C.stop()}},m)}));return function(p,b){return v.apply(this,arguments)}})(),d=0;case 9:if(!(d<o.length)){h.next=15;break}return h.next=12,u(o[d]);case 12:d++,h.next=9;break;case 15:return h.abrupt("return",a);case 16:case"end":return h.stop()}},t)}));return function(n,r){return e.apply(this,arguments)}})(),l2=+new Date,s2=0;function rs(){return"rc-upload-".concat(l2,"-").concat(++s2)}var c2=["component","prefixCls","className","classNames","disabled","id","name","style","styles","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave","hasControlInside"],u2=(function(e){tl(n,e);var t=nl(n);function n(){var r;oa(this,n);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return r=t.call.apply(t,[this].concat(o)),J(Je(r),"state",{uid:rs()}),J(Je(r),"reqs",{}),J(Je(r),"fileInput",void 0),J(Je(r),"_isMounted",void 0),J(Je(r),"onChange",function(l){var s=r.props,c=s.accept,u=s.directory,d=l.target.files,g=at(d).filter(function(h){return!u||ns(h,c)});r.uploadFiles(g),r.reset()}),J(Je(r),"onClick",function(l){var s=r.fileInput;if(s){var c=l.target,u=r.props.onClick;if(c&&c.tagName==="BUTTON"){var d=s.parentNode;d.focus(),c.blur()}s.click(),u&&u(l)}}),J(Je(r),"onKeyDown",function(l){l.key==="Enter"&&r.onClick(l)}),J(Je(r),"onDataTransferFiles",(function(){var l=Ir(xn().mark(function s(c,u){var d,g,h,v,m,p,b;return xn().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(d=r.props,g=d.multiple,h=d.accept,v=d.directory,m=at(c.items||[]),p=at(c.files||[]),(p.length>0||m.some(function(w){return w.kind==="file"}))&&(u==null||u()),!v){x.next=11;break}return x.next=7,i2(Array.prototype.slice.call(m),function(w){return ns(w,r.props.accept)});case 7:p=x.sent,r.uploadFiles(p),x.next=14;break;case 11:b=at(p).filter(function(w){return ns(w,h)}),g===!1&&(b=p.slice(0,1)),r.uploadFiles(b);case 14:case"end":return x.stop()}},s)}));return function(s,c){return l.apply(this,arguments)}})()),J(Je(r),"onFilePaste",(function(){var l=Ir(xn().mark(function s(c){var u,d;return xn().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(u=r.props.pastable,u){h.next=3;break}return h.abrupt("return");case 3:if(c.type!=="paste"){h.next=6;break}return d=c.clipboardData,h.abrupt("return",r.onDataTransferFiles(d,function(){c.preventDefault()}));case 6:case"end":return h.stop()}},s)}));return function(s){return l.apply(this,arguments)}})()),J(Je(r),"onFileDragOver",function(l){l.preventDefault()}),J(Je(r),"onFileDrop",(function(){var l=Ir(xn().mark(function s(c){var u;return xn().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(c.preventDefault(),c.type!=="drop"){g.next=4;break}return u=c.dataTransfer,g.abrupt("return",r.onDataTransferFiles(u));case 4:case"end":return g.stop()}},s)}));return function(s){return l.apply(this,arguments)}})()),J(Je(r),"uploadFiles",function(l){var s=at(l),c=s.map(function(u){return u.uid=rs(),r.processFile(u,s)});Promise.all(c).then(function(u){var d=r.props.onBatchStart;d==null||d(u.map(function(g){var h=g.origin,v=g.parsedFile;return{file:h,parsedFile:v}})),u.filter(function(g){return g.parsedFile!==null}).forEach(function(g){r.post(g)})})}),J(Je(r),"processFile",(function(){var l=Ir(xn().mark(function s(c,u){var d,g,h,v,m,p,b,y,x;return xn().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(d=r.props.beforeUpload,g=c,!d){C.next=14;break}return C.prev=3,C.next=6,d(c,u);case 6:g=C.sent,C.next=12;break;case 9:C.prev=9,C.t0=C.catch(3),g=!1;case 12:if(g!==!1){C.next=14;break}return C.abrupt("return",{origin:c,parsedFile:null,action:null,data:null});case 14:if(h=r.props.action,typeof h!="function"){C.next=21;break}return C.next=18,h(c);case 18:v=C.sent,C.next=22;break;case 21:v=h;case 22:if(m=r.props.data,typeof m!="function"){C.next=29;break}return C.next=26,m(c);case 26:p=C.sent,C.next=30;break;case 29:p=m;case 30:return b=(pn(g)==="object"||typeof g=="string")&&g?g:c,b instanceof File?y=b:y=new File([b],c.name,{type:c.type}),x=y,x.uid=c.uid,C.abrupt("return",{origin:c,data:p,parsedFile:x,action:v});case 35:case"end":return C.stop()}},s,null,[[3,9]])}));return function(s,c){return l.apply(this,arguments)}})()),J(Je(r),"saveFileInput",function(l){r.fileInput=l}),r}return ia(n,[{key:"componentDidMount",value:function(){this._isMounted=!0;var a=this.props.pastable;a&&document.addEventListener("paste",this.onFilePaste)}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort(),document.removeEventListener("paste",this.onFilePaste)}},{key:"componentDidUpdate",value:function(a){var o=this.props.pastable;o&&!a.pastable?document.addEventListener("paste",this.onFilePaste):!o&&a.pastable&&document.removeEventListener("paste",this.onFilePaste)}},{key:"post",value:function(a){var o=this,i=a.data,l=a.origin,s=a.action,c=a.parsedFile;if(this._isMounted){var u=this.props,d=u.onStart,g=u.customRequest,h=u.name,v=u.headers,m=u.withCredentials,p=u.method,b=l.uid,y=g||o2,x={action:s,filename:h,data:i,file:c,headers:v,withCredentials:m,method:p||"post",onProgress:function(C){var S=o.props.onProgress;S==null||S(C,c)},onSuccess:function(C,S){var E=o.props.onSuccess;E==null||E(C,c,S),delete o.reqs[b]},onError:function(C,S){var E=o.props.onError;E==null||E(C,S,c),delete o.reqs[b]}};d(l),this.reqs[b]=y(x)}}},{key:"reset",value:function(){this.setState({uid:rs()})}},{key:"abort",value:function(a){var o=this.reqs;if(a){var i=a.uid?a.uid:a;o[i]&&o[i].abort&&o[i].abort(),delete o[i]}else Object.keys(o).forEach(function(l){o[l]&&o[l].abort&&o[l].abort(),delete o[l]})}},{key:"render",value:function(){var a=this.props,o=a.component,i=a.prefixCls,l=a.className,s=a.classNames,c=s===void 0?{}:s,u=a.disabled,d=a.id,g=a.name,h=a.style,v=a.styles,m=v===void 0?{}:v,p=a.multiple,b=a.accept,y=a.capture,x=a.children,w=a.directory,C=a.openFileDialogOnClick,S=a.onMouseEnter,E=a.onMouseLeave,k=a.hasControlInside,$=Dt(a,c2),O=pe(J(J(J({},i,!0),"".concat(i,"-disabled"),u),l,l)),D=w?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},P=u?{}:{onClick:C?this.onClick:function(){},onKeyDown:C?this.onKeyDown:function(){},onMouseEnter:S,onMouseLeave:E,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:k?void 0:"0"};return be.createElement(o,Oe({},P,{className:O,role:k?void 0:"button",style:h}),be.createElement("input",Oe({},ca($,{aria:!0,data:!0}),{id:d,name:g,disabled:u,type:"file",ref:this.saveFileInput,onClick:function(N){return N.stopPropagation()},key:this.state.uid,style:ye({display:"none"},m.input),className:c.input,accept:b},D,{multiple:p,onChange:this.onChange},y!=null?{capture:y}:{})),x)}}]),n})(op);function as(){}var Ys=(function(e){tl(n,e);var t=nl(n);function n(){var r;oa(this,n);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return r=t.call.apply(t,[this].concat(o)),J(Je(r),"uploader",void 0),J(Je(r),"saveUploader",function(l){r.uploader=l}),r}return ia(n,[{key:"abort",value:function(a){this.uploader.abort(a)}},{key:"render",value:function(){return be.createElement(u2,Oe({},this.props,{ref:this.saveUploader}))}}]),n})(op);J(Ys,"defaultProps",{component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:as,onError:as,onSuccess:as,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0,hasControlInside:!1});const d2=e=>{const{componentCls:t,iconCls:n}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${fe(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${fe(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`
|
|
78
78
|
&:not(${t}-disabled):hover,
|
|
79
79
|
&-hover:not(${t}-disabled)
|
|
80
80
|
`]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[n]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${fe(e.marginXXS)}`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{[`p${t}-drag-icon ${n},
|
|
81
81
|
p${t}-text,
|
|
82
82
|
p${t}-hint
|
|
83
|
-
`]:{color:e.colorTextDisabled}}}}}},
|
|
84
|
-
${
|
|
85
|
-
&.picture ${
|
|
86
|
-
`]:{opacity:1}},[`${t}-icon ${n}`]:{color:e.colorIcon,fontSize:r},[`${i}-progress`]:{position:"absolute",bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:o(r).add(e.paddingXS).equal(),fontSize:r,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${i}:hover ${
|
|
83
|
+
`]:{color:e.colorTextDisabled}}}}}},f2=e=>{const{componentCls:t,iconCls:n,fontSize:r,lineHeight:a,calc:o}=e,i=`${t}-list-item`,l=`${i}-actions`,s=`${i}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:Object.assign(Object.assign({},ji()),{lineHeight:e.lineHeight,[i]:{position:"relative",height:o(e.lineHeight).mul(r).equal(),marginTop:e.marginXS,fontSize:r,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${i}-name`]:Object.assign(Object.assign({},ol),{padding:`0 ${fe(e.paddingXS)}`,lineHeight:a,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[l]:{whiteSpace:"nowrap",[s]:{opacity:0},[n]:{color:e.actionsColor,transition:`all ${e.motionDurationSlow}`},[`
|
|
84
|
+
${s}:focus-visible,
|
|
85
|
+
&.picture ${s}
|
|
86
|
+
`]:{opacity:1}},[`${t}-icon ${n}`]:{color:e.colorIcon,fontSize:r},[`${i}-progress`]:{position:"absolute",bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:o(r).add(e.paddingXS).equal(),fontSize:r,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${i}:hover ${s}`]:{opacity:1},[`${i}-error`]:{color:e.colorError,[`${i}-name, ${t}-icon ${n}`]:{color:e.colorError},[l]:{[`${n}, ${n}:hover`]:{color:e.colorError},[s]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},m2=e=>{const{componentCls:t}=e,n=new _i("uploadAnimateInlineIn",{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),r=new _i("uploadAnimateInlineOut",{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),a=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${a}-appear, ${a}-enter, ${a}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${a}-appear, ${a}-enter`]:{animationName:n},[`${a}-leave`]:{animationName:r}}},{[`${t}-wrapper`]:iy(e)},n,r]},p2=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:r,uploadProgressOffset:a,calc:o}=e,i=`${t}-list`,l=`${i}-item`;return{[`${t}-wrapper`]:{[`
|
|
87
87
|
${i}${i}-picture,
|
|
88
88
|
${i}${i}-picture-card,
|
|
89
89
|
${i}${i}-picture-circle
|
|
90
|
-
`]:{[
|
|
90
|
+
`]:{[l]:{position:"relative",height:o(r).add(o(e.lineWidth).mul(2)).add(o(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${fe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${l}-thumbnail`]:Object.assign(Object.assign({},ol),{width:r,height:r,lineHeight:fe(o(r).add(e.paddingSM).equal()),textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${l}-progress`]:{bottom:a,width:`calc(100% - ${fe(o(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:o(r).add(e.paddingXS).equal()}},[`${l}-error`]:{borderColor:e.colorError,[`${l}-thumbnail ${n}`]:{[`svg path[fill='${ud[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${ud.primary}']`]:{fill:e.colorError}}},[`${l}-uploading`]:{borderStyle:"dashed",[`${l}-name`]:{marginBottom:a}}},[`${i}${i}-picture-circle ${l}`]:{[`&, &::before, ${l}-thumbnail`]:{borderRadius:"50%"}}}}},g2=e=>{const{componentCls:t,iconCls:n,fontSizeLG:r,colorTextLightSolid:a,calc:o}=e,i=`${t}-list`,l=`${i}-item`,s=e.uploadPicCardSize;return{[`
|
|
91
91
|
${t}-wrapper${t}-picture-card-wrapper,
|
|
92
92
|
${t}-wrapper${t}-picture-circle-wrapper
|
|
93
|
-
`]:Object.assign(Object.assign({},
|
|
93
|
+
`]:Object.assign(Object.assign({},ji()),{display:"block",[`${t}${t}-select`]:{width:s,height:s,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${fe(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${i}${i}-picture-card, ${i}${i}-picture-circle`]:{display:"flex",flexWrap:"wrap","@supports not (gap: 1px)":{"& > *":{marginBlockEnd:e.marginXS,marginInlineEnd:e.marginXS}},"@supports (gap: 1px)":{gap:e.marginXS},[`${i}-item-container`]:{display:"inline-block",width:s,height:s,verticalAlign:"top"},"&::after":{display:"none"},"&::before":{display:"none"},[l]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${fe(o(e.paddingXS).mul(2).equal())})`,height:`calc(100% - ${fe(o(e.paddingXS).mul(2).equal())})`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${l}:hover`]:{[`&::before, ${l}-actions`]:{opacity:1}},[`${l}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`
|
|
94
94
|
${n}-eye,
|
|
95
95
|
${n}-download,
|
|
96
96
|
${n}-delete
|
|
97
|
-
`]:{zIndex:10,width:r,margin:`0 ${fe(e.marginXXS)}`,fontSize:r,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,color:a,"&:hover":{color:a},svg:{verticalAlign:"baseline"}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${s}-name`]:{display:"none",textAlign:"center"},[`${s}-file + ${s}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${fe(o(e.paddingXS).mul(2).equal())})`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${fe(o(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:"50%"}}}},p2=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},g2=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:Object.assign(Object.assign({},pn(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-hidden`]:{display:"none"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},v2=e=>({actionsColor:e.colorIcon}),h2=rr("Upload",e=>{const{fontSizeHeading3:t,fontHeight:n,lineWidth:r,controlHeightLG:a,calc:o}=e,i=Hn(e,{uploadThumbnailSize:o(t).mul(2).equal(),uploadProgressOffset:o(o(n).div(2)).add(r).equal(),uploadPicCardSize:o(a).mul(2.55).equal()});return[g2(i),c2(i),f2(i),m2(i),u2(i),d2(i),p2(i),tu(i)]},v2);function ni(e){return Object.assign(Object.assign({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function ri(e,t){const n=rt(t),r=n.findIndex(({uid:a})=>a===e.uid);return r===-1?n.push(e):n[r]=e,n}function al(e,t){const n=e.uid!==void 0?"uid":"name";return t.filter(r=>r[n]===e[n])[0]}function y2(e,t){const n=e.uid!==void 0?"uid":"name",r=t.filter(a=>a[n]!==e[n]);return r.length===t.length?null:r}const b2=(e="")=>{const t=e.split("/"),r=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(r)||[""])[0]},rv=e=>e.indexOf("image/")===0,x2=e=>{if(e.type&&!e.thumbUrl)return rv(e.type);const t=e.thumbUrl||e.url||"",n=b2(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},Sr=200;function C2(e){return new Promise(t=>{if(!e.type||!rv(e.type)){t("");return}const n=document.createElement("canvas");n.width=Sr,n.height=Sr,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${Sr}px; height: ${Sr}px; z-index: 9999; display: none;`,document.body.appendChild(n);const r=n.getContext("2d"),a=new Image;if(a.onload=()=>{const{width:o,height:i}=a;let s=Sr,l=Sr,c=0,u=0;o>i?(l=i*(Sr/o),u=-(l-s)/2):(s=o*(Sr/i),c=-(s-l)/2),r.drawImage(a,c,u,s,l);const d=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(a.src),t(d)},a.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const o=new FileReader;o.onload=()=>{o.result&&typeof o.result=="string"&&(a.src=o.result)},o.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){const o=new FileReader;o.onload=()=>{o.result&&t(o.result)},o.readAsDataURL(e)}else a.src=window.URL.createObjectURL(e)})}const w2=f.forwardRef(({prefixCls:e,className:t,style:n,locale:r,listType:a,file:o,items:i,progress:s,iconRender:l,actionIconRender:c,itemRender:u,isImgUrl:d,showPreviewIcon:g,showRemoveIcon:h,showDownloadIcon:v,previewIcon:m,removeIcon:p,downloadIcon:b,extra:y,onPreview:x,onDownload:w,onClose:C},S)=>{var E,k;const{status:$}=o,[O,D]=f.useState($);f.useEffect(()=>{$!=="removed"&&D($)},[$]);const[P,R]=f.useState(!1);f.useEffect(()=>{const ee=setTimeout(()=>{R(!0)},300);return()=>{clearTimeout(ee)}},[]);const N=l(o);let I=f.createElement("div",{className:`${e}-icon`},N);if(a==="picture"||a==="picture-card"||a==="picture-circle")if(O==="uploading"||!o.thumbUrl&&!o.url){const ee=pe(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:O!=="uploading"});I=f.createElement("div",{className:ee},N)}else{const ee=d!=null&&d(o)?f.createElement("img",{src:o.thumbUrl||o.url,alt:o.name,className:`${e}-list-item-image`,crossOrigin:o.crossOrigin}):N,ce=pe(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:d&&!d(o)});I=f.createElement("a",{className:ce,onClick:me=>x(o,me),href:o.url||o.thumbUrl,target:"_blank",rel:"noopener noreferrer"},ee)}const M=pe(`${e}-list-item`,`${e}-list-item-${O}`),F=typeof o.linkProps=="string"?JSON.parse(o.linkProps):o.linkProps,j=(typeof h=="function"?h(o):h)?c((typeof p=="function"?p(o):p)||f.createElement(Uw,null),()=>C(o),e,r.removeFile,!0):null,A=(typeof v=="function"?v(o):v)&&O==="done"?c((typeof b=="function"?b(o):b)||f.createElement(Xw,null),()=>w(o),e,r.downloadFile):null,_=a!=="picture-card"&&a!=="picture-circle"&&f.createElement("span",{key:"download-delete",className:pe(`${e}-list-item-actions`,{picture:a==="picture"})},A,j),L=typeof y=="function"?y(o):y,z=L&&f.createElement("span",{className:`${e}-list-item-extra`},L),T=pe(`${e}-list-item-name`),H=o.url?f.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:T,title:o.name},F,{href:o.url,onClick:ee=>x(o,ee)}),o.name,z):f.createElement("span",{key:"view",className:T,onClick:ee=>x(o,ee),title:o.name},o.name,z),W=(typeof g=="function"?g(o):g)&&(o.url||o.thumbUrl)?f.createElement("a",{href:o.url||o.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:ee=>x(o,ee),title:r.previewFile},typeof m=="function"?m(o):m||f.createElement(_0,null)):null,K=(a==="picture-card"||a==="picture-circle")&&O!=="uploading"&&f.createElement("span",{className:`${e}-list-item-actions`},W,O==="done"&&A,j),{getPrefixCls:G}=f.useContext(cn),U=G(),Z=f.createElement("div",{className:M},I,H,_,K,P&&f.createElement(rs,{motionName:`${U}-fade`,visible:O==="uploading",motionDeadline:2e3},({className:ee})=>{const ce="percent"in o?f.createElement(zw,Object.assign({type:"line",percent:o.percent,"aria-label":o["aria-label"],"aria-labelledby":o["aria-labelledby"]},s)):null;return f.createElement("div",{className:pe(`${e}-list-item-progress`,ee)},ce)})),Q=o.response&&typeof o.response=="string"?o.response:((E=o.error)===null||E===void 0?void 0:E.statusText)||((k=o.error)===null||k===void 0?void 0:k.message)||r.uploadError,Y=O==="error"?f.createElement(Ro,{title:Q,getPopupContainer:ee=>ee.parentNode},Z):Z;return f.createElement("div",{className:pe(`${e}-list-item-container`,t),style:n,ref:S},u?u(Y,o,i,{download:w.bind(null,o),preview:x.bind(null,o),remove:C.bind(null,o)}):Y)}),S2=(e,t)=>{const{listType:n="text",previewFile:r=C2,onPreview:a,onDownload:o,onRemove:i,locale:s,iconRender:l,isImageUrl:c=x2,prefixCls:u,items:d=[],showPreviewIcon:g=!0,showRemoveIcon:h=!0,showDownloadIcon:v=!1,removeIcon:m,previewIcon:p,downloadIcon:b,extra:y,progress:x={size:[-1,2],showInfo:!1},appendAction:w,appendActionVisible:C=!0,itemRender:S,disabled:E}=e,k=B0(),[$,O]=f.useState(!1),D=["picture-card","picture-circle"].includes(n);f.useEffect(()=>{n.startsWith("picture")&&(d||[]).forEach(T=>{!(T.originFileObj instanceof File||T.originFileObj instanceof Blob)||T.thumbUrl!==void 0||(T.thumbUrl="",r==null||r(T.originFileObj).then(H=>{T.thumbUrl=H||"",k()}))})},[n,d,r]),f.useEffect(()=>{O(!0)},[]);const P=(T,H)=>{if(a)return H==null||H.preventDefault(),a(T)},R=T=>{typeof o=="function"?o(T):T.url&&window.open(T.url)},N=T=>{i==null||i(T)},I=T=>{if(l)return l(T,n);const H=T.status==="uploading";if(n.startsWith("picture")){const W=n==="picture"?f.createElement(Dl,null):s.uploading,K=c!=null&&c(T)?f.createElement(bS,null):f.createElement(tS,null);return H?W:K}return H?f.createElement(Dl,null):f.createElement(vS,null)},M=(T,H,W,K,G)=>{const U={type:"text",size:"small",title:K,onClick:Z=>{var Q,Y;H(),f.isValidElement(T)&&((Y=(Q=T.props).onClick)===null||Y===void 0||Y.call(Q,Z))},className:`${W}-list-item-action`,disabled:G?E:!1};return f.isValidElement(T)?f.createElement(gn,Object.assign({},U,{icon:Fr(T,Object.assign(Object.assign({},T.props),{onClick:()=>{}}))})):f.createElement(gn,Object.assign({},U),f.createElement("span",null,T))};f.useImperativeHandle(t,()=>({handlePreview:P,handleDownload:R}));const{getPrefixCls:F}=f.useContext(cn),j=F("upload",u),A=F(),_=pe(`${j}-list`,`${j}-list-${n}`),L=f.useMemo(()=>Vn(ou(A),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[A]),z=Object.assign(Object.assign({},D?{}:L),{motionDeadline:2e3,motionName:`${j}-${D?"animate-inline":"animate"}`,keys:rt(d.map(T=>({key:T.uid,file:T}))),motionAppear:$});return f.createElement("div",{className:_},f.createElement(oy,Object.assign({},z,{component:!1}),({key:T,file:H,className:W,style:K})=>f.createElement(w2,{key:T,locale:s,prefixCls:j,className:W,style:K,file:H,items:d,progress:x,listType:n,isImgUrl:c,showPreviewIcon:g,showRemoveIcon:h,showDownloadIcon:v,removeIcon:m,previewIcon:p,downloadIcon:b,extra:y,iconRender:I,actionIconRender:M,itemRender:S,onPreview:P,onDownload:R,onClose:N})),w&&f.createElement(rs,Object.assign({},z,{visible:C,forceRender:!0}),({className:T,style:H})=>Fr(w,W=>({className:pe(W.className,T),style:Object.assign(Object.assign(Object.assign({},H),{pointerEvents:T?"none":void 0}),W.style)}))))},$2=f.forwardRef(S2);var E2=function(e,t,n,r){function a(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function s(u){try{c(r.next(u))}catch(d){i(d)}}function l(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?o(u.value):a(u.value).then(s,l)}c((r=r.apply(e,[])).next())})};const so=`__LIST_IGNORE_${Date.now()}__`,k2=(e,t)=>{const n=jo("upload"),{fileList:r,defaultFileList:a,onRemove:o,showUploadList:i=!0,listType:s="text",onPreview:l,onDownload:c,onChange:u,onDrop:d,previewFile:g,disabled:h,locale:v,iconRender:m,isImageUrl:p,progress:b,prefixCls:y,className:x,type:w="select",children:C,style:S,itemRender:E,maxCount:k,data:$={},multiple:O=!1,hasControlInside:D=!0,action:P="",accept:R="",supportServerRender:N=!0,rootClassName:I}=e,M=f.useContext(Fa),F=h??M,j=e.customRequest||n.customRequest,[A,_]=an(a||[],{value:r,postState:ue=>ue??[]}),[L,z]=f.useState("drop"),T=f.useRef(null),H=f.useRef(null);f.useMemo(()=>{const ue=Date.now();(r||[]).forEach((ie,xe)=>{!ie.uid&&!Object.isFrozen(ie)&&(ie.uid=`__AUTO__${ue}_${xe}__`)})},[r]);const W=(ue,ie,xe)=>{let _e=rt(ie),ze=!1;k===1?_e=_e.slice(-1):k&&(ze=_e.length>k,_e=_e.slice(0,k)),ji(()=>{_(_e)});const st={file:ue,fileList:_e};xe&&(st.event=xe),(!ze||ue.status==="removed"||_e.some(Ne=>Ne.uid===ue.uid))&&ji(()=>{u==null||u(st)})},K=(ue,ie)=>E2(void 0,void 0,void 0,function*(){const{beforeUpload:xe,transformFile:_e}=e;let ze=ue;if(xe){const st=yield xe(ue,ie);if(st===!1)return!1;if(delete ue[so],st===so)return Object.defineProperty(ue,so,{value:!0,configurable:!0}),!1;typeof st=="object"&&st&&(ze=st)}return _e&&(ze=yield _e(ze)),ze}),G=ue=>{const ie=ue.filter(ze=>!ze.file[so]);if(!ie.length)return;const xe=ie.map(ze=>ni(ze.file));let _e=rt(A);xe.forEach(ze=>{_e=ri(ze,_e)}),xe.forEach((ze,st)=>{let Ne=ze;if(ie[st].parsedFile)ze.status="uploading";else{const{originFileObj:Ie}=ze;let Ue;try{Ue=new File([Ie],Ie.name,{type:Ie.type})}catch{Ue=new Blob([Ie],{type:Ie.type}),Ue.name=Ie.name,Ue.lastModifiedDate=new Date,Ue.lastModified=new Date().getTime()}Ue.uid=ze.uid,Ne=Ue}W(Ne,_e)})},U=(ue,ie,xe)=>{try{typeof ue=="string"&&(ue=JSON.parse(ue))}catch{}if(!al(ie,A))return;const _e=ni(ie);_e.status="done",_e.percent=100,_e.response=ue,_e.xhr=xe;const ze=ri(_e,A);W(_e,ze)},Z=(ue,ie)=>{if(!al(ie,A))return;const xe=ni(ie);xe.status="uploading",xe.percent=ue.percent;const _e=ri(xe,A);W(xe,_e,ue)},Q=(ue,ie,xe)=>{if(!al(xe,A))return;const _e=ni(xe);_e.error=ue,_e.response=ie,_e.status="error";const ze=ri(_e,A);W(_e,ze)},Y=ue=>{let ie;Promise.resolve(typeof o=="function"?o(ue):o).then(xe=>{var _e;if(xe===!1)return;const ze=y2(ue,A);ze&&(ie=Object.assign(Object.assign({},ue),{status:"removed"}),A==null||A.forEach(st=>{const Ne=ie.uid!==void 0?"uid":"name";st[Ne]===ie[Ne]&&!Object.isFrozen(st)&&(st.status="removed")}),(_e=T.current)===null||_e===void 0||_e.abort(ie),W(ie,ze))})},ee=ue=>{z(ue.type),ue.type==="drop"&&(d==null||d(ue))};f.useImperativeHandle(t,()=>({onBatchStart:G,onSuccess:U,onProgress:Z,onError:Q,fileList:A,upload:T.current,nativeElement:H.current}));const{getPrefixCls:ce,direction:me,upload:we}=f.useContext(cn),se=ce("upload",y),ge=Object.assign(Object.assign({onBatchStart:G,onError:Q,onProgress:Z,onSuccess:U},e),{customRequest:j,data:$,multiple:O,action:P,accept:R,supportServerRender:N,prefixCls:se,disabled:F,beforeUpload:K,onChange:void 0,hasControlInside:D});delete ge.className,delete ge.style,(!C||F)&&delete ge.id;const Ee=`${se}-wrapper`,[Te,Pe,he]=h2(se,Ee),[ke]=cs("Upload",Ep.Upload),{showRemoveIcon:de,showPreviewIcon:Re,showDownloadIcon:He,removeIcon:Ke,previewIcon:tt,downloadIcon:qe,extra:We}=typeof i=="boolean"?{}:i,lt=typeof de>"u"?!F:de,Fe=(ue,ie)=>i?f.createElement($2,{prefixCls:se,listType:s,items:A,previewFile:g,onPreview:l,onDownload:c,onRemove:Y,showRemoveIcon:lt,showPreviewIcon:Re,showDownloadIcon:He,removeIcon:Ke,previewIcon:tt,downloadIcon:qe,iconRender:m,extra:We,locale:Object.assign(Object.assign({},ke),v),isImageUrl:p,progress:b,appendAction:ue,appendActionVisible:ie,itemRender:E,disabled:F}):ue,ae=pe(Ee,x,I,Pe,he,we==null?void 0:we.className,{[`${se}-rtl`]:me==="rtl",[`${se}-picture-card-wrapper`]:s==="picture-card",[`${se}-picture-circle-wrapper`]:s==="picture-circle"}),Le=Object.assign(Object.assign({},we==null?void 0:we.style),S);if(w==="drag"){const ue=pe(Pe,se,`${se}-drag`,{[`${se}-drag-uploading`]:A.some(ie=>ie.status==="uploading"),[`${se}-drag-hover`]:L==="dragover",[`${se}-disabled`]:F,[`${se}-rtl`]:me==="rtl"});return Te(f.createElement("span",{className:ae,ref:H},f.createElement("div",{className:ue,style:Le,onDrop:ee,onDragOver:ee,onDragLeave:ee},f.createElement(Ul,Object.assign({},ge,{ref:T,className:`${se}-btn`}),f.createElement("div",{className:`${se}-drag-container`},C))),Fe()))}const Ce=pe(se,`${se}-select`,{[`${se}-disabled`]:F,[`${se}-hidden`]:!C}),$e=f.createElement("div",{className:Ce,style:Le},f.createElement(Ul,Object.assign({},ge,{ref:T})));return Te(s==="picture-card"||s==="picture-circle"?f.createElement("span",{className:ae,ref:H},Fe($e,!!C)):f.createElement("span",{className:ae,ref:H},$e,Fe()))},av=f.forwardRef(k2);var I2=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const O2=f.forwardRef((e,t)=>{var{style:n,height:r,hasControlInside:a=!1}=e,o=I2(e,["style","height","hasControlInside"]);return f.createElement(av,Object.assign({ref:t,hasControlInside:a},o,{type:"drag",style:Object.assign(Object.assign({},n),{height:r})}))}),Nu=av;Nu.Dragger=O2;Nu.LIST_IGNORE=so;function N2(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,iy(e,t)}var df=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function D2(e,t){return!!(e===t||df(e)&&df(t))}function M2(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!D2(e[n],t[n]))return!1;return!0}function ol(e,t){t===void 0&&(t=M2);var n,r=[],a,o=!1;function i(){for(var s=[],l=0;l<arguments.length;l++)s[l]=arguments[l];return o&&n===this&&t(s,r)||(a=e.apply(this,s),o=!0,n=this,r=s),a}return i}var F2=typeof performance=="object"&&typeof performance.now=="function",ff=F2?function(){return performance.now()}:function(){return Date.now()};function mf(e){cancelAnimationFrame(e.id)}function P2(e,t){var n=ff();function r(){ff()-n>=t?e.call(null):a.id=requestAnimationFrame(r)}var a={id:requestAnimationFrame(r)};return a}var il=-1;function pf(e){if(e===void 0&&(e=!1),il===-1||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),il=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return il}var va=null;function gf(e){if(e===void 0&&(e=!1),va===null||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),a=r.style;return a.width="100px",a.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?va="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?va="negative":va="positive-ascending"),document.body.removeChild(t),va}return va}var j2=150,R2=function(t,n){return t};function A2(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,a=e.getItemSize,o=e.getOffsetForIndexAndAlignment,i=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=(function(d){N2(g,d);function g(v){var m;return m=d.call(this,v)||this,m._instanceProps=l(m.props,Xe(m)),m._outerRef=void 0,m._resetIsScrollingTimeoutId=null,m.state={instance:Xe(m),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof m.props.initialScrollOffset=="number"?m.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},m._callOnItemsRendered=void 0,m._callOnItemsRendered=ol(function(p,b,y,x){return m.props.onItemsRendered({overscanStartIndex:p,overscanStopIndex:b,visibleStartIndex:y,visibleStopIndex:x})}),m._callOnScroll=void 0,m._callOnScroll=ol(function(p,b,y){return m.props.onScroll({scrollDirection:p,scrollOffset:b,scrollUpdateWasRequested:y})}),m._getItemStyle=void 0,m._getItemStyle=function(p){var b=m.props,y=b.direction,x=b.itemSize,w=b.layout,C=m._getItemStyleCache(c&&x,c&&w,c&&y),S;if(C.hasOwnProperty(p))S=C[p];else{var E=n(m.props,p,m._instanceProps),k=a(m.props,p,m._instanceProps),$=y==="horizontal"||w==="horizontal",O=y==="rtl",D=$?E:0;C[p]=S={position:"absolute",left:O?void 0:D,right:O?D:void 0,top:$?0:E,height:$?"100%":k,width:$?k:"100%"}}return S},m._getItemStyleCache=void 0,m._getItemStyleCache=ol(function(p,b,y){return{}}),m._onScrollHorizontal=function(p){var b=p.currentTarget,y=b.clientWidth,x=b.scrollLeft,w=b.scrollWidth;m.setState(function(C){if(C.scrollOffset===x)return null;var S=m.props.direction,E=x;if(S==="rtl")switch(gf()){case"negative":E=-x;break;case"positive-descending":E=w-y-x;break}return E=Math.max(0,Math.min(E,w-y)),{isScrolling:!0,scrollDirection:C.scrollOffset<E?"forward":"backward",scrollOffset:E,scrollUpdateWasRequested:!1}},m._resetIsScrollingDebounced)},m._onScrollVertical=function(p){var b=p.currentTarget,y=b.clientHeight,x=b.scrollHeight,w=b.scrollTop;m.setState(function(C){if(C.scrollOffset===w)return null;var S=Math.max(0,Math.min(w,x-y));return{isScrolling:!0,scrollDirection:C.scrollOffset<S?"forward":"backward",scrollOffset:S,scrollUpdateWasRequested:!1}},m._resetIsScrollingDebounced)},m._outerRefSetter=function(p){var b=m.props.outerRef;m._outerRef=p,typeof b=="function"?b(p):b!=null&&typeof b=="object"&&b.hasOwnProperty("current")&&(b.current=p)},m._resetIsScrollingDebounced=function(){m._resetIsScrollingTimeoutId!==null&&mf(m._resetIsScrollingTimeoutId),m._resetIsScrollingTimeoutId=P2(m._resetIsScrolling,j2)},m._resetIsScrolling=function(){m._resetIsScrollingTimeoutId=null,m.setState({isScrolling:!1},function(){m._getItemStyleCache(-1,null)})},m}g.getDerivedStateFromProps=function(m,p){return T2(m,p),u(m),null};var h=g.prototype;return h.scrollTo=function(m){m=Math.max(0,m),this.setState(function(p){return p.scrollOffset===m?null:{scrollDirection:p.scrollOffset<m?"forward":"backward",scrollOffset:m,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},h.scrollToItem=function(m,p){p===void 0&&(p="auto");var b=this.props,y=b.itemCount,x=b.layout,w=this.state.scrollOffset;m=Math.max(0,Math.min(m,y-1));var C=0;if(this._outerRef){var S=this._outerRef;x==="vertical"?C=S.scrollWidth>S.clientWidth?pf():0:C=S.scrollHeight>S.clientHeight?pf():0}this.scrollTo(o(this.props,m,p,w,this._instanceProps,C))},h.componentDidMount=function(){var m=this.props,p=m.direction,b=m.initialScrollOffset,y=m.layout;if(typeof b=="number"&&this._outerRef!=null){var x=this._outerRef;p==="horizontal"||y==="horizontal"?x.scrollLeft=b:x.scrollTop=b}this._callPropsCallbacks()},h.componentDidUpdate=function(){var m=this.props,p=m.direction,b=m.layout,y=this.state,x=y.scrollOffset,w=y.scrollUpdateWasRequested;if(w&&this._outerRef!=null){var C=this._outerRef;if(p==="horizontal"||b==="horizontal")if(p==="rtl")switch(gf()){case"negative":C.scrollLeft=-x;break;case"positive-ascending":C.scrollLeft=x;break;default:var S=C.clientWidth,E=C.scrollWidth;C.scrollLeft=E-S-x;break}else C.scrollLeft=x;else C.scrollTop=x}this._callPropsCallbacks()},h.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&mf(this._resetIsScrollingTimeoutId)},h.render=function(){var m=this.props,p=m.children,b=m.className,y=m.direction,x=m.height,w=m.innerRef,C=m.innerElementType,S=m.innerTagName,E=m.itemCount,k=m.itemData,$=m.itemKey,O=$===void 0?R2:$,D=m.layout,P=m.outerElementType,R=m.outerTagName,N=m.style,I=m.useIsScrolling,M=m.width,F=this.state.isScrolling,j=y==="horizontal"||D==="horizontal",A=j?this._onScrollHorizontal:this._onScrollVertical,_=this._getRangeToRender(),L=_[0],z=_[1],T=[];if(E>0)for(var H=L;H<=z;H++)T.push(Sa(p,{data:k,key:O(H,k),index:H,isScrolling:I?F:void 0,style:this._getItemStyle(H)}));var W=r(this.props,this._instanceProps);return Sa(P||R||"div",{className:b,onScroll:A,ref:this._outerRefSetter,style:Oe({position:"relative",height:x,width:M,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:y},N)},Sa(C||S||"div",{children:T,ref:w,style:{height:j?"100%":W,pointerEvents:F?"none":void 0,width:j?W:"100%"}}))},h._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var m=this.props.itemCount;if(m>0){var p=this._getRangeToRender(),b=p[0],y=p[1],x=p[2],w=p[3];this._callOnItemsRendered(b,y,x,w)}}if(typeof this.props.onScroll=="function"){var C=this.state,S=C.scrollDirection,E=C.scrollOffset,k=C.scrollUpdateWasRequested;this._callOnScroll(S,E,k)}},h._getRangeToRender=function(){var m=this.props,p=m.itemCount,b=m.overscanCount,y=this.state,x=y.isScrolling,w=y.scrollDirection,C=y.scrollOffset;if(p===0)return[0,0,0,0];var S=i(this.props,C,this._instanceProps),E=s(this.props,S,C,this._instanceProps),k=!x||w==="backward"?Math.max(1,b):1,$=!x||w==="forward"?Math.max(1,b):1;return[Math.max(0,S-k),Math.max(0,Math.min(p-1,E+$)),S,E]},g})($0),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var T2=function(t,n){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,n.instance},_2=50,ba=function(t,n,r){var a=t,o=a.itemSize,i=r.itemMetadataMap,s=r.lastMeasuredIndex;if(n>s){var l=0;if(s>=0){var c=i[s];l=c.offset+c.size}for(var u=s+1;u<=n;u++){var d=o(u);i[u]={offset:l,size:d},l+=d}r.lastMeasuredIndex=n}return i[n]},B2=function(t,n,r){var a=n.itemMetadataMap,o=n.lastMeasuredIndex,i=o>0?a[o].offset:0;return i>=r?ov(t,n,o,0,r):L2(t,n,Math.max(0,o),r)},ov=function(t,n,r,a,o){for(;a<=r;){var i=a+Math.floor((r-a)/2),s=ba(t,i,n).offset;if(s===o)return i;s<o?a=i+1:s>o&&(r=i-1)}return a>0?a-1:0},L2=function(t,n,r,a){for(var o=t.itemCount,i=1;r<o&&ba(t,r,n).offset<a;)r+=i,i*=2;return ov(t,n,Math.min(r,o-1),Math.floor(r/2),a)},vf=function(t,n){var r=t.itemCount,a=n.itemMetadataMap,o=n.estimatedItemSize,i=n.lastMeasuredIndex,s=0;if(i>=r&&(i=r-1),i>=0){var l=a[i];s=l.offset+l.size}var c=r-i-1,u=c*o;return s+u},z2=A2({getItemOffset:function(t,n,r){return ba(t,n,r).offset},getItemSize:function(t,n,r){return r.itemMetadataMap[n].size},getEstimatedTotalSize:vf,getOffsetForIndexAndAlignment:function(t,n,r,a,o,i){var s=t.direction,l=t.height,c=t.layout,u=t.width,d=s==="horizontal"||c==="horizontal",g=d?u:l,h=ba(t,n,o),v=vf(t,o),m=Math.max(0,Math.min(v-g,h.offset)),p=Math.max(0,h.offset-g+h.size+i);switch(r==="smart"&&(a>=p-g&&a<=m+g?r="auto":r="center"),r){case"start":return m;case"end":return p;case"center":return Math.round(p+(m-p)/2);case"auto":default:return a>=p&&a<=m?a:a<p?p:m}},getStartIndexForOffset:function(t,n,r){return B2(t,r,n)},getStopIndexForStartIndex:function(t,n,r,a){for(var o=t.direction,i=t.height,s=t.itemCount,l=t.layout,c=t.width,u=o==="horizontal"||l==="horizontal",d=u?c:i,g=ba(t,n,a),h=r+d,v=g.offset+g.size,m=n;m<s-1&&v<h;)m++,v+=ba(t,m,a).size;return m},initInstanceProps:function(t,n){var r=t,a=r.estimatedItemSize,o={itemMetadataMap:{},estimatedItemSize:a||_2,lastMeasuredIndex:-1};return n.resetAfterIndex=function(i,s){s===void 0&&(s=!0),o.lastMeasuredIndex=Math.min(o.lastMeasuredIndex,i-1),n._getItemStyleCache(-1),s&&n.forceUpdate()},o},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(t){t.itemSize}});async function H2(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function V2(e){let t,n,r,a=!1;return function(i){t===void 0?(t=i,n=0,r=-1):t=W2(t,i);const s=t.length;let l=0;for(;n<s;){a&&(t[n]===10&&(l=++n),a=!1);let c=-1;for(;n<s&&c===-1;++n)switch(t[n]){case 58:r===-1&&(r=n-l);break;case 13:a=!0;case 10:c=n;break}if(c===-1)break;e(t.subarray(l,c),r),l=n,r=-1}l===s?t=void 0:l!==0&&(t=t.subarray(l),n-=l)}}function K2(e,t,n){let r=hf();const a=new TextDecoder;return function(i,s){if(i.length===0)n==null||n(r),r=hf();else if(s>0){const l=a.decode(i.subarray(0,s)),c=s+(i[s+1]===32?2:1),u=a.decode(i.subarray(c));switch(l){case"data":r.data=r.data?r.data+`
|
|
98
|
-
`+u:u;break;case"event":r.event=u;break;case"id":e(r.id=u);break;case"retry":const d=parseInt(u,10);isNaN(d)||t(r.retry=d);break}}}}function
|
|
97
|
+
`]:{zIndex:10,width:r,margin:`0 ${fe(e.marginXXS)}`,fontSize:r,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,color:a,"&:hover":{color:a},svg:{verticalAlign:"baseline"}}},[`${l}-thumbnail, ${l}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${l}-name`]:{display:"none",textAlign:"center"},[`${l}-file + ${l}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${fe(o(e.paddingXS).mul(2).equal())})`},[`${l}-uploading`]:{[`&${l}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${l}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${fe(o(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:"50%"}}}},v2=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},h2=e=>{const{componentCls:t,colorTextDisabled:n}=e;return{[`${t}-wrapper`]:Object.assign(Object.assign({},gn(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-hidden`]:{display:"none"},[`${t}-disabled`]:{color:n,cursor:"not-allowed"}})}},y2=e=>({actionsColor:e.colorIcon}),b2=ar("Upload",e=>{const{fontSizeHeading3:t,fontHeight:n,lineWidth:r,controlHeightLG:a,calc:o}=e,i=Vn(e,{uploadThumbnailSize:o(t).mul(2).equal(),uploadProgressOffset:o(o(n).div(2)).add(r).equal(),uploadPicCardSize:o(a).mul(2.55).equal()});return[h2(i),d2(i),p2(i),g2(i),f2(i),m2(i),v2(i),nu(i)]},y2);function ri(e){return Object.assign(Object.assign({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function ai(e,t){const n=at(t),r=n.findIndex(({uid:a})=>a===e.uid);return r===-1?n.push(e):n[r]=e,n}function os(e,t){const n=e.uid!==void 0?"uid":"name";return t.filter(r=>r[n]===e[n])[0]}function x2(e,t){const n=e.uid!==void 0?"uid":"name",r=t.filter(a=>a[n]!==e[n]);return r.length===t.length?null:r}const C2=(e="")=>{const t=e.split("/"),r=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(r)||[""])[0]},av=e=>e.indexOf("image/")===0,w2=e=>{if(e.type&&!e.thumbUrl)return av(e.type);const t=e.thumbUrl||e.url||"",n=C2(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(n)?!0:!(/^data:/.test(t)||n)},$r=200;function S2(e){return new Promise(t=>{if(!e.type||!av(e.type)){t("");return}const n=document.createElement("canvas");n.width=$r,n.height=$r,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${$r}px; height: ${$r}px; z-index: 9999; display: none;`,document.body.appendChild(n);const r=n.getContext("2d"),a=new Image;if(a.onload=()=>{const{width:o,height:i}=a;let l=$r,s=$r,c=0,u=0;o>i?(s=i*($r/o),u=-(s-l)/2):(l=o*($r/i),c=-(l-s)/2),r.drawImage(a,c,u,l,s);const d=n.toDataURL();document.body.removeChild(n),window.URL.revokeObjectURL(a.src),t(d)},a.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){const o=new FileReader;o.onload=()=>{o.result&&typeof o.result=="string"&&(a.src=o.result)},o.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){const o=new FileReader;o.onload=()=>{o.result&&t(o.result)},o.readAsDataURL(e)}else a.src=window.URL.createObjectURL(e)})}const $2=f.forwardRef(({prefixCls:e,className:t,style:n,locale:r,listType:a,file:o,items:i,progress:l,iconRender:s,actionIconRender:c,itemRender:u,isImgUrl:d,showPreviewIcon:g,showRemoveIcon:h,showDownloadIcon:v,previewIcon:m,removeIcon:p,downloadIcon:b,extra:y,onPreview:x,onDownload:w,onClose:C},S)=>{var E,k;const{status:$}=o,[O,D]=f.useState($);f.useEffect(()=>{$!=="removed"&&D($)},[$]);const[P,A]=f.useState(!1);f.useEffect(()=>{const ee=setTimeout(()=>{A(!0)},300);return()=>{clearTimeout(ee)}},[]);const N=s(o);let I=f.createElement("div",{className:`${e}-icon`},N);if(a==="picture"||a==="picture-card"||a==="picture-circle")if(O==="uploading"||!o.thumbUrl&&!o.url){const ee=pe(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:O!=="uploading"});I=f.createElement("div",{className:ee},N)}else{const ee=d!=null&&d(o)?f.createElement("img",{src:o.thumbUrl||o.url,alt:o.name,className:`${e}-list-item-image`,crossOrigin:o.crossOrigin}):N,ce=pe(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:d&&!d(o)});I=f.createElement("a",{className:ce,onClick:me=>x(o,me),href:o.url||o.thumbUrl,target:"_blank",rel:"noopener noreferrer"},ee)}const M=pe(`${e}-list-item`,`${e}-list-item-${O}`),F=typeof o.linkProps=="string"?JSON.parse(o.linkProps):o.linkProps,R=(typeof h=="function"?h(o):h)?c((typeof p=="function"?p(o):p)||f.createElement(Gw,null),()=>C(o),e,r.removeFile,!0):null,T=(typeof v=="function"?v(o):v)&&O==="done"?c((typeof b=="function"?b(o):b)||f.createElement(Qw,null),()=>w(o),e,r.downloadFile):null,_=a!=="picture-card"&&a!=="picture-circle"&&f.createElement("span",{key:"download-delete",className:pe(`${e}-list-item-actions`,{picture:a==="picture"})},T,R),B=typeof y=="function"?y(o):y,L=B&&f.createElement("span",{className:`${e}-list-item-extra`},B),j=pe(`${e}-list-item-name`),z=o.url?f.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:j,title:o.name},F,{href:o.url,onClick:ee=>x(o,ee)}),o.name,L):f.createElement("span",{key:"view",className:j,onClick:ee=>x(o,ee),title:o.name},o.name,L),K=(typeof g=="function"?g(o):g)&&(o.url||o.thumbUrl)?f.createElement("a",{href:o.url||o.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:ee=>x(o,ee),title:r.previewFile},typeof m=="function"?m(o):m||f.createElement(L0,null)):null,V=(a==="picture-card"||a==="picture-circle")&&O!=="uploading"&&f.createElement("span",{className:`${e}-list-item-actions`},K,O==="done"&&T,R),{getPrefixCls:G}=f.useContext(un),U=G(),Z=f.createElement("div",{className:M},I,z,_,V,P&&f.createElement(al,{motionName:`${U}-fade`,visible:O==="uploading",motionDeadline:2e3},({className:ee})=>{const ce="percent"in o?f.createElement(Vw,Object.assign({type:"line",percent:o.percent,"aria-label":o["aria-label"],"aria-labelledby":o["aria-labelledby"]},l)):null;return f.createElement("div",{className:pe(`${e}-list-item-progress`,ee)},ce)})),Q=o.response&&typeof o.response=="string"?o.response:((E=o.error)===null||E===void 0?void 0:E.statusText)||((k=o.error)===null||k===void 0?void 0:k.message)||r.uploadError,Y=O==="error"?f.createElement(To,{title:Q,getPopupContainer:ee=>ee.parentNode},Z):Z;return f.createElement("div",{className:pe(`${e}-list-item-container`,t),style:n,ref:S},u?u(Y,o,i,{download:w.bind(null,o),preview:x.bind(null,o),remove:C.bind(null,o)}):Y)}),E2=(e,t)=>{const{listType:n="text",previewFile:r=S2,onPreview:a,onDownload:o,onRemove:i,locale:l,iconRender:s,isImageUrl:c=w2,prefixCls:u,items:d=[],showPreviewIcon:g=!0,showRemoveIcon:h=!0,showDownloadIcon:v=!1,removeIcon:m,previewIcon:p,downloadIcon:b,extra:y,progress:x={size:[-1,2],showInfo:!1},appendAction:w,appendActionVisible:C=!0,itemRender:S,disabled:E}=e,k=z0(),[$,O]=f.useState(!1),D=["picture-card","picture-circle"].includes(n);f.useEffect(()=>{n.startsWith("picture")&&(d||[]).forEach(j=>{!(j.originFileObj instanceof File||j.originFileObj instanceof Blob)||j.thumbUrl!==void 0||(j.thumbUrl="",r==null||r(j.originFileObj).then(z=>{j.thumbUrl=z||"",k()}))})},[n,d,r]),f.useEffect(()=>{O(!0)},[]);const P=(j,z)=>{if(a)return z==null||z.preventDefault(),a(j)},A=j=>{typeof o=="function"?o(j):j.url&&window.open(j.url)},N=j=>{i==null||i(j)},I=j=>{if(s)return s(j,n);const z=j.status==="uploading";if(n.startsWith("picture")){const K=n==="picture"?f.createElement(Ms,null):l.uploading,V=c!=null&&c(j)?f.createElement(CS,null):f.createElement(rS,null);return z?K:V}return z?f.createElement(Ms,null):f.createElement(yS,null)},M=(j,z,K,V,G)=>{const U={type:"text",size:"small",title:V,onClick:Z=>{var Q,Y;z(),f.isValidElement(j)&&((Y=(Q=j.props).onClick)===null||Y===void 0||Y.call(Q,Z))},className:`${K}-list-item-action`,disabled:G?E:!1};return f.isValidElement(j)?f.createElement(vn,Object.assign({},U,{icon:Pr(j,Object.assign(Object.assign({},j.props),{onClick:()=>{}}))})):f.createElement(vn,Object.assign({},U),f.createElement("span",null,j))};f.useImperativeHandle(t,()=>({handlePreview:P,handleDownload:A}));const{getPrefixCls:F}=f.useContext(un),R=F("upload",u),T=F(),_=pe(`${R}-list`,`${R}-list-${n}`),B=f.useMemo(()=>Kn(iu(T),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[T]),L=Object.assign(Object.assign({},D?{}:B),{motionDeadline:2e3,motionName:`${R}-${D?"animate-inline":"animate"}`,keys:at(d.map(j=>({key:j.uid,file:j}))),motionAppear:$});return f.createElement("div",{className:_},f.createElement(ly,Object.assign({},L,{component:!1}),({key:j,file:z,className:K,style:V})=>f.createElement($2,{key:j,locale:l,prefixCls:R,className:K,style:V,file:z,items:d,progress:x,listType:n,isImgUrl:c,showPreviewIcon:g,showRemoveIcon:h,showDownloadIcon:v,removeIcon:m,previewIcon:p,downloadIcon:b,extra:y,iconRender:I,actionIconRender:M,itemRender:S,onPreview:P,onDownload:A,onClose:N})),w&&f.createElement(al,Object.assign({},L,{visible:C,forceRender:!0}),({className:j,style:z})=>Pr(w,K=>({className:pe(K.className,j),style:Object.assign(Object.assign(Object.assign({},z),{pointerEvents:j?"none":void 0}),K.style)}))))},k2=f.forwardRef(E2);var I2=function(e,t,n,r){function a(o){return o instanceof n?o:new n(function(i){i(o)})}return new(n||(n=Promise))(function(o,i){function l(u){try{c(r.next(u))}catch(d){i(d)}}function s(u){try{c(r.throw(u))}catch(d){i(d)}}function c(u){u.done?o(u.value):a(u.value).then(l,s)}c((r=r.apply(e,[])).next())})};const so=`__LIST_IGNORE_${Date.now()}__`,O2=(e,t)=>{const n=Ao("upload"),{fileList:r,defaultFileList:a,onRemove:o,showUploadList:i=!0,listType:l="text",onPreview:s,onDownload:c,onChange:u,onDrop:d,previewFile:g,disabled:h,locale:v,iconRender:m,isImageUrl:p,progress:b,prefixCls:y,className:x,type:w="select",children:C,style:S,itemRender:E,maxCount:k,data:$={},multiple:O=!1,hasControlInside:D=!0,action:P="",accept:A="",supportServerRender:N=!0,rootClassName:I}=e,M=f.useContext(Pa),F=h??M,R=e.customRequest||n.customRequest,[T,_]=on(a||[],{value:r,postState:ue=>ue??[]}),[B,L]=f.useState("drop"),j=f.useRef(null),z=f.useRef(null);f.useMemo(()=>{const ue=Date.now();(r||[]).forEach((ie,xe)=>{!ie.uid&&!Object.isFrozen(ie)&&(ie.uid=`__AUTO__${ue}_${xe}__`)})},[r]);const K=(ue,ie,xe)=>{let Be=at(ie),He=!1;k===1?Be=Be.slice(-1):k&&(He=Be.length>k,Be=Be.slice(0,k)),Ai(()=>{_(Be)});const st={file:ue,fileList:Be};xe&&(st.event=xe),(!He||ue.status==="removed"||Be.some(Ne=>Ne.uid===ue.uid))&&Ai(()=>{u==null||u(st)})},V=(ue,ie)=>I2(void 0,void 0,void 0,function*(){const{beforeUpload:xe,transformFile:Be}=e;let He=ue;if(xe){const st=yield xe(ue,ie);if(st===!1)return!1;if(delete ue[so],st===so)return Object.defineProperty(ue,so,{value:!0,configurable:!0}),!1;typeof st=="object"&&st&&(He=st)}return Be&&(He=yield Be(He)),He}),G=ue=>{const ie=ue.filter(He=>!He.file[so]);if(!ie.length)return;const xe=ie.map(He=>ri(He.file));let Be=at(T);xe.forEach(He=>{Be=ai(He,Be)}),xe.forEach((He,st)=>{let Ne=He;if(ie[st].parsedFile)He.status="uploading";else{const{originFileObj:Ie}=He;let Ye;try{Ye=new File([Ie],Ie.name,{type:Ie.type})}catch{Ye=new Blob([Ie],{type:Ie.type}),Ye.name=Ie.name,Ye.lastModifiedDate=new Date,Ye.lastModified=new Date().getTime()}Ye.uid=He.uid,Ne=Ye}K(Ne,Be)})},U=(ue,ie,xe)=>{try{typeof ue=="string"&&(ue=JSON.parse(ue))}catch{}if(!os(ie,T))return;const Be=ri(ie);Be.status="done",Be.percent=100,Be.response=ue,Be.xhr=xe;const He=ai(Be,T);K(Be,He)},Z=(ue,ie)=>{if(!os(ie,T))return;const xe=ri(ie);xe.status="uploading",xe.percent=ue.percent;const Be=ai(xe,T);K(xe,Be,ue)},Q=(ue,ie,xe)=>{if(!os(xe,T))return;const Be=ri(xe);Be.error=ue,Be.response=ie,Be.status="error";const He=ai(Be,T);K(Be,He)},Y=ue=>{let ie;Promise.resolve(typeof o=="function"?o(ue):o).then(xe=>{var Be;if(xe===!1)return;const He=x2(ue,T);He&&(ie=Object.assign(Object.assign({},ue),{status:"removed"}),T==null||T.forEach(st=>{const Ne=ie.uid!==void 0?"uid":"name";st[Ne]===ie[Ne]&&!Object.isFrozen(st)&&(st.status="removed")}),(Be=j.current)===null||Be===void 0||Be.abort(ie),K(ie,He))})},ee=ue=>{L(ue.type),ue.type==="drop"&&(d==null||d(ue))};f.useImperativeHandle(t,()=>({onBatchStart:G,onSuccess:U,onProgress:Z,onError:Q,fileList:T,upload:j.current,nativeElement:z.current}));const{getPrefixCls:ce,direction:me,upload:we}=f.useContext(un),le=ce("upload",y),ge=Object.assign(Object.assign({onBatchStart:G,onError:Q,onProgress:Z,onSuccess:U},e),{customRequest:R,data:$,multiple:O,action:P,accept:A,supportServerRender:N,prefixCls:le,disabled:F,beforeUpload:V,onChange:void 0,hasControlInside:D});delete ge.className,delete ge.style,(!C||F)&&delete ge.id;const Ee=`${le}-wrapper`,[_e,Re,he]=b2(le,Ee),[ke]=ul("Upload",kp.Upload),{showRemoveIcon:de,showPreviewIcon:Te,showDownloadIcon:Ve,removeIcon:We,previewIcon:nt,downloadIcon:Ue,extra:qe}=typeof i=="boolean"?{}:i,ct=typeof de>"u"?!F:de,Fe=(ue,ie)=>i?f.createElement(k2,{prefixCls:le,listType:l,items:T,previewFile:g,onPreview:s,onDownload:c,onRemove:Y,showRemoveIcon:ct,showPreviewIcon:Te,showDownloadIcon:Ve,removeIcon:We,previewIcon:nt,downloadIcon:Ue,iconRender:m,extra:qe,locale:Object.assign(Object.assign({},ke),v),isImageUrl:p,progress:b,appendAction:ue,appendActionVisible:ie,itemRender:E,disabled:F}):ue,ae=pe(Ee,x,I,Re,he,we==null?void 0:we.className,{[`${le}-rtl`]:me==="rtl",[`${le}-picture-card-wrapper`]:l==="picture-card",[`${le}-picture-circle-wrapper`]:l==="picture-circle"}),ze=Object.assign(Object.assign({},we==null?void 0:we.style),S);if(w==="drag"){const ue=pe(Re,le,`${le}-drag`,{[`${le}-drag-uploading`]:T.some(ie=>ie.status==="uploading"),[`${le}-drag-hover`]:B==="dragover",[`${le}-disabled`]:F,[`${le}-rtl`]:me==="rtl"});return _e(f.createElement("span",{className:ae,ref:z},f.createElement("div",{className:ue,style:ze,onDrop:ee,onDragOver:ee,onDragLeave:ee},f.createElement(Ys,Object.assign({},ge,{ref:j,className:`${le}-btn`}),f.createElement("div",{className:`${le}-drag-container`},C))),Fe()))}const Ce=pe(le,`${le}-select`,{[`${le}-disabled`]:F,[`${le}-hidden`]:!C}),$e=f.createElement("div",{className:Ce,style:ze},f.createElement(Ys,Object.assign({},ge,{ref:j})));return _e(l==="picture-card"||l==="picture-circle"?f.createElement("span",{className:ae,ref:z},Fe($e,!!C)):f.createElement("span",{className:ae,ref:z},$e,Fe()))},ov=f.forwardRef(O2);var N2=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const D2=f.forwardRef((e,t)=>{var{style:n,height:r,hasControlInside:a=!1}=e,o=N2(e,["style","height","hasControlInside"]);return f.createElement(ov,Object.assign({ref:t,hasControlInside:a},o,{type:"drag",style:Object.assign(Object.assign({},n),{height:r})}))}),Du=ov;Du.Dragger=D2;Du.LIST_IGNORE=so;function M2(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,sy(e,t)}var ff=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function F2(e,t){return!!(e===t||ff(e)&&ff(t))}function P2(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!F2(e[n],t[n]))return!1;return!0}function is(e,t){t===void 0&&(t=P2);var n,r=[],a,o=!1;function i(){for(var l=[],s=0;s<arguments.length;s++)l[s]=arguments[s];return o&&n===this&&t(l,r)||(a=e.apply(this,l),o=!0,n=this,r=l),a}return i}var R2=typeof performance=="object"&&typeof performance.now=="function",mf=R2?function(){return performance.now()}:function(){return Date.now()};function pf(e){cancelAnimationFrame(e.id)}function A2(e,t){var n=mf();function r(){mf()-n>=t?e.call(null):a.id=requestAnimationFrame(r)}var a={id:requestAnimationFrame(r)};return a}var ls=-1;function gf(e){if(e===void 0&&(e=!1),ls===-1||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),ls=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return ls}var ha=null;function vf(e){if(e===void 0&&(e=!1),ha===null||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),a=r.style;return a.width="100px",a.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?ha="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?ha="negative":ha="positive-ascending"),document.body.removeChild(t),ha}return ha}var T2=150,j2=function(t,n){return t};function _2(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,a=e.getItemSize,o=e.getOffsetForIndexAndAlignment,i=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,s=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=(function(d){M2(g,d);function g(v){var m;return m=d.call(this,v)||this,m._instanceProps=s(m.props,Je(m)),m._outerRef=void 0,m._resetIsScrollingTimeoutId=null,m.state={instance:Je(m),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof m.props.initialScrollOffset=="number"?m.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},m._callOnItemsRendered=void 0,m._callOnItemsRendered=is(function(p,b,y,x){return m.props.onItemsRendered({overscanStartIndex:p,overscanStopIndex:b,visibleStartIndex:y,visibleStopIndex:x})}),m._callOnScroll=void 0,m._callOnScroll=is(function(p,b,y){return m.props.onScroll({scrollDirection:p,scrollOffset:b,scrollUpdateWasRequested:y})}),m._getItemStyle=void 0,m._getItemStyle=function(p){var b=m.props,y=b.direction,x=b.itemSize,w=b.layout,C=m._getItemStyleCache(c&&x,c&&w,c&&y),S;if(C.hasOwnProperty(p))S=C[p];else{var E=n(m.props,p,m._instanceProps),k=a(m.props,p,m._instanceProps),$=y==="horizontal"||w==="horizontal",O=y==="rtl",D=$?E:0;C[p]=S={position:"absolute",left:O?void 0:D,right:O?D:void 0,top:$?0:E,height:$?"100%":k,width:$?k:"100%"}}return S},m._getItemStyleCache=void 0,m._getItemStyleCache=is(function(p,b,y){return{}}),m._onScrollHorizontal=function(p){var b=p.currentTarget,y=b.clientWidth,x=b.scrollLeft,w=b.scrollWidth;m.setState(function(C){if(C.scrollOffset===x)return null;var S=m.props.direction,E=x;if(S==="rtl")switch(vf()){case"negative":E=-x;break;case"positive-descending":E=w-y-x;break}return E=Math.max(0,Math.min(E,w-y)),{isScrolling:!0,scrollDirection:C.scrollOffset<E?"forward":"backward",scrollOffset:E,scrollUpdateWasRequested:!1}},m._resetIsScrollingDebounced)},m._onScrollVertical=function(p){var b=p.currentTarget,y=b.clientHeight,x=b.scrollHeight,w=b.scrollTop;m.setState(function(C){if(C.scrollOffset===w)return null;var S=Math.max(0,Math.min(w,x-y));return{isScrolling:!0,scrollDirection:C.scrollOffset<S?"forward":"backward",scrollOffset:S,scrollUpdateWasRequested:!1}},m._resetIsScrollingDebounced)},m._outerRefSetter=function(p){var b=m.props.outerRef;m._outerRef=p,typeof b=="function"?b(p):b!=null&&typeof b=="object"&&b.hasOwnProperty("current")&&(b.current=p)},m._resetIsScrollingDebounced=function(){m._resetIsScrollingTimeoutId!==null&&pf(m._resetIsScrollingTimeoutId),m._resetIsScrollingTimeoutId=A2(m._resetIsScrolling,T2)},m._resetIsScrolling=function(){m._resetIsScrollingTimeoutId=null,m.setState({isScrolling:!1},function(){m._getItemStyleCache(-1,null)})},m}g.getDerivedStateFromProps=function(m,p){return B2(m,p),u(m),null};var h=g.prototype;return h.scrollTo=function(m){m=Math.max(0,m),this.setState(function(p){return p.scrollOffset===m?null:{scrollDirection:p.scrollOffset<m?"forward":"backward",scrollOffset:m,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},h.scrollToItem=function(m,p){p===void 0&&(p="auto");var b=this.props,y=b.itemCount,x=b.layout,w=this.state.scrollOffset;m=Math.max(0,Math.min(m,y-1));var C=0;if(this._outerRef){var S=this._outerRef;x==="vertical"?C=S.scrollWidth>S.clientWidth?gf():0:C=S.scrollHeight>S.clientHeight?gf():0}this.scrollTo(o(this.props,m,p,w,this._instanceProps,C))},h.componentDidMount=function(){var m=this.props,p=m.direction,b=m.initialScrollOffset,y=m.layout;if(typeof b=="number"&&this._outerRef!=null){var x=this._outerRef;p==="horizontal"||y==="horizontal"?x.scrollLeft=b:x.scrollTop=b}this._callPropsCallbacks()},h.componentDidUpdate=function(){var m=this.props,p=m.direction,b=m.layout,y=this.state,x=y.scrollOffset,w=y.scrollUpdateWasRequested;if(w&&this._outerRef!=null){var C=this._outerRef;if(p==="horizontal"||b==="horizontal")if(p==="rtl")switch(vf()){case"negative":C.scrollLeft=-x;break;case"positive-ascending":C.scrollLeft=x;break;default:var S=C.clientWidth,E=C.scrollWidth;C.scrollLeft=E-S-x;break}else C.scrollLeft=x;else C.scrollTop=x}this._callPropsCallbacks()},h.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&pf(this._resetIsScrollingTimeoutId)},h.render=function(){var m=this.props,p=m.children,b=m.className,y=m.direction,x=m.height,w=m.innerRef,C=m.innerElementType,S=m.innerTagName,E=m.itemCount,k=m.itemData,$=m.itemKey,O=$===void 0?j2:$,D=m.layout,P=m.outerElementType,A=m.outerTagName,N=m.style,I=m.useIsScrolling,M=m.width,F=this.state.isScrolling,R=y==="horizontal"||D==="horizontal",T=R?this._onScrollHorizontal:this._onScrollVertical,_=this._getRangeToRender(),B=_[0],L=_[1],j=[];if(E>0)for(var z=B;z<=L;z++)j.push($a(p,{data:k,key:O(z,k),index:z,isScrolling:I?F:void 0,style:this._getItemStyle(z)}));var K=r(this.props,this._instanceProps);return $a(P||A||"div",{className:b,onScroll:T,ref:this._outerRefSetter,style:Oe({position:"relative",height:x,width:M,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:y},N)},$a(C||S||"div",{children:j,ref:w,style:{height:R?"100%":K,pointerEvents:F?"none":void 0,width:R?K:"100%"}}))},h._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var m=this.props.itemCount;if(m>0){var p=this._getRangeToRender(),b=p[0],y=p[1],x=p[2],w=p[3];this._callOnItemsRendered(b,y,x,w)}}if(typeof this.props.onScroll=="function"){var C=this.state,S=C.scrollDirection,E=C.scrollOffset,k=C.scrollUpdateWasRequested;this._callOnScroll(S,E,k)}},h._getRangeToRender=function(){var m=this.props,p=m.itemCount,b=m.overscanCount,y=this.state,x=y.isScrolling,w=y.scrollDirection,C=y.scrollOffset;if(p===0)return[0,0,0,0];var S=i(this.props,C,this._instanceProps),E=l(this.props,S,C,this._instanceProps),k=!x||w==="backward"?Math.max(1,b):1,$=!x||w==="forward"?Math.max(1,b):1;return[Math.max(0,S-k),Math.max(0,Math.min(p-1,E+$)),S,E]},g})(k0),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var B2=function(t,n){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,n.instance},L2=50,xa=function(t,n,r){var a=t,o=a.itemSize,i=r.itemMetadataMap,l=r.lastMeasuredIndex;if(n>l){var s=0;if(l>=0){var c=i[l];s=c.offset+c.size}for(var u=l+1;u<=n;u++){var d=o(u);i[u]={offset:s,size:d},s+=d}r.lastMeasuredIndex=n}return i[n]},z2=function(t,n,r){var a=n.itemMetadataMap,o=n.lastMeasuredIndex,i=o>0?a[o].offset:0;return i>=r?iv(t,n,o,0,r):H2(t,n,Math.max(0,o),r)},iv=function(t,n,r,a,o){for(;a<=r;){var i=a+Math.floor((r-a)/2),l=xa(t,i,n).offset;if(l===o)return i;l<o?a=i+1:l>o&&(r=i-1)}return a>0?a-1:0},H2=function(t,n,r,a){for(var o=t.itemCount,i=1;r<o&&xa(t,r,n).offset<a;)r+=i,i*=2;return iv(t,n,Math.min(r,o-1),Math.floor(r/2),a)},hf=function(t,n){var r=t.itemCount,a=n.itemMetadataMap,o=n.estimatedItemSize,i=n.lastMeasuredIndex,l=0;if(i>=r&&(i=r-1),i>=0){var s=a[i];l=s.offset+s.size}var c=r-i-1,u=c*o;return l+u},V2=_2({getItemOffset:function(t,n,r){return xa(t,n,r).offset},getItemSize:function(t,n,r){return r.itemMetadataMap[n].size},getEstimatedTotalSize:hf,getOffsetForIndexAndAlignment:function(t,n,r,a,o,i){var l=t.direction,s=t.height,c=t.layout,u=t.width,d=l==="horizontal"||c==="horizontal",g=d?u:s,h=xa(t,n,o),v=hf(t,o),m=Math.max(0,Math.min(v-g,h.offset)),p=Math.max(0,h.offset-g+h.size+i);switch(r==="smart"&&(a>=p-g&&a<=m+g?r="auto":r="center"),r){case"start":return m;case"end":return p;case"center":return Math.round(p+(m-p)/2);case"auto":default:return a>=p&&a<=m?a:a<p?p:m}},getStartIndexForOffset:function(t,n,r){return z2(t,r,n)},getStopIndexForStartIndex:function(t,n,r,a){for(var o=t.direction,i=t.height,l=t.itemCount,s=t.layout,c=t.width,u=o==="horizontal"||s==="horizontal",d=u?c:i,g=xa(t,n,a),h=r+d,v=g.offset+g.size,m=n;m<l-1&&v<h;)m++,v+=xa(t,m,a).size;return m},initInstanceProps:function(t,n){var r=t,a=r.estimatedItemSize,o={itemMetadataMap:{},estimatedItemSize:a||L2,lastMeasuredIndex:-1};return n.resetAfterIndex=function(i,l){l===void 0&&(l=!0),o.lastMeasuredIndex=Math.min(o.lastMeasuredIndex,i-1),n._getItemStyleCache(-1),l&&n.forceUpdate()},o},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(t){t.itemSize}});async function K2(e,t){const n=e.getReader();let r;for(;!(r=await n.read()).done;)t(r.value)}function W2(e){let t,n,r,a=!1;return function(i){t===void 0?(t=i,n=0,r=-1):t=U2(t,i);const l=t.length;let s=0;for(;n<l;){a&&(t[n]===10&&(s=++n),a=!1);let c=-1;for(;n<l&&c===-1;++n)switch(t[n]){case 58:r===-1&&(r=n-s);break;case 13:a=!0;case 10:c=n;break}if(c===-1)break;e(t.subarray(s,c),r),s=n,r=-1}s===l?t=void 0:s!==0&&(t=t.subarray(s),n-=s)}}function q2(e,t,n){let r=yf();const a=new TextDecoder;return function(i,l){if(i.length===0)n==null||n(r),r=yf();else if(l>0){const s=a.decode(i.subarray(0,l)),c=l+(i[l+1]===32?2:1),u=a.decode(i.subarray(c));switch(s){case"data":r.data=r.data?r.data+`
|
|
98
|
+
`+u:u;break;case"event":r.event=u;break;case"id":e(r.id=u);break;case"retry":const d=parseInt(u,10);isNaN(d)||t(r.retry=d);break}}}}function U2(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function yf(){return{data:"",event:"",id:"",retry:void 0}}var Y2=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const Gs="text/event-stream",G2=1e3,bf="last-event-id";function X2(e,t){var{signal:n,headers:r,onopen:a,onmessage:o,onclose:i,onerror:l,openWhenHidden:s,fetch:c}=t,u=Y2(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((d,g)=>{const h=Object.assign({},r);h.accept||(h.accept=Gs);let v;function m(){v.abort(),document.hidden||C()}s||document.addEventListener("visibilitychange",m);let p=G2,b=0;function y(){document.removeEventListener("visibilitychange",m),window.clearTimeout(b),v.abort()}n==null||n.addEventListener("abort",()=>{y(),d()});const x=c??window.fetch,w=a??J2;async function C(){var S;v=new AbortController;try{const E=await x(e,Object.assign(Object.assign({},u),{headers:h,signal:v.signal}));await w(E),await K2(E.body,W2(q2(k=>{k?h[bf]=k:delete h[bf]},k=>{p=k},o))),i==null||i(),y(),d()}catch(E){if(!v.signal.aborted)try{const k=(S=l==null?void 0:l(E))!==null&&S!==void 0?S:p;window.clearTimeout(b),b=window.setTimeout(C,k)}catch(k){y(),g(k)}}}C()})}function J2(e){const t=e.headers.get("content-type");if(!(t!=null&&t.startsWith(Gs)))throw new Error(`Expected content-type to be ${Gs}, Actual: ${t}`)}function lv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xf={exports:{}},eo={};/**
|
|
99
99
|
* @license React
|
|
100
100
|
* react-jsx-runtime.production.min.js
|
|
101
101
|
*
|
|
@@ -103,174 +103,174 @@ import{j as B}from"./assets/jsx-runtime-vC1aA8e7.js";import*as f from"react";imp
|
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the MIT license found in the
|
|
105
105
|
* LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/var
|
|
106
|
+
*/var Cf;function Q2(){if(Cf)return eo;Cf=1;var e=be,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(l,s,c){var u,d={},g=null,h=null;c!==void 0&&(g=""+c),s.key!==void 0&&(g=""+s.key),s.ref!==void 0&&(h=s.ref);for(u in s)r.call(s,u)&&!o.hasOwnProperty(u)&&(d[u]=s[u]);if(l&&l.defaultProps)for(u in s=l.defaultProps,s)d[u]===void 0&&(d[u]=s[u]);return{$$typeof:t,type:l,key:g,ref:h,props:d,_owner:a.current}}return eo.Fragment=n,eo.jsx=i,eo.jsxs=i,eo}var wf;function Z2(){return wf||(wf=1,xf.exports=Q2()),xf.exports}var X=Z2();const e$={colors:{primary:"#007bff",secondary:"#6c757d",success:"#008000",warning:"#FFA500",error:"#FF0000",info:"#0000FF",background:"#f8f9fa",text:"#343a40",border:"#dee2e6",disabled:"#808080",disabledBackground:"#F5F5F5",disabledText:"#808080",shadow:"#000000",appBackground:"#fff"},space:{sidebar:"md",size:"md",radius:"md",padding:"md",margin:"md",shadow:"md",lineHeight:"md"},icons:{aiAvatar:"http://10.15.12.13:9000/dev-rag-data/header_pic/JIABINBIN00/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20231212161213.jpg",userAvatar:"http://10.15.12.13:9005/assets/nav-logo-BKaOCDqi.png",pdf:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/pdf-icon.png",word:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/word-icon.png",image:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/image-icon.png",video:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/video-icon.png",audio:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/audio-icon.png",excel:"https://ai-chat-1326151111.cos.c zap-shanghai.myqcloud.com/excel-icon.png",ppt:"https://ai-chat-1326151111.cos.ap-shanghai.myqcloud.com/ppt-icon.png"},others:{baseFontWeight:"normal"}},t$={sm:"240px",md:"260px",lg:"280px"},Xs={sm:"12px",md:"16px",lg:"20px"},sv={sm:"2px",md:"4px",lg:"8px"},n$={sm:"4px",md:"8px",lg:"16px"},r$={sm:"4px",md:"8px",lg:"16px"},a$={sm:"0 1px 2px #eee",md:"0 2px 8px #ddd",lg:"0 4px 16px #ccc"},o$={sm:"1.2",md:"1.5",lg:"2"};/**
|
|
107
107
|
* @license lucide-react v0.456.0 - ISC
|
|
108
108
|
*
|
|
109
109
|
* This source code is licensed under the ISC license.
|
|
110
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const
|
|
111
|
+
*/const i$=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cv=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
112
112
|
* @license lucide-react v0.456.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/var
|
|
116
|
+
*/var l$={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
117
117
|
* @license lucide-react v0.456.0 - ISC
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
120
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const
|
|
121
|
+
*/const s$=Ar(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:o,iconNode:i,...l},s)=>$a("svg",{ref:s,...l$,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:cv("lucide",a),...l},[...i.map(([c,u])=>$a(c,u)),...Array.isArray(o)?o:[o]]));/**
|
|
122
122
|
* @license lucide-react v0.456.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const
|
|
126
|
+
*/const Wt=(e,t)=>{const n=Ar(({className:r,...a},o)=>$a(s$,{ref:o,iconNode:t,className:cv(`lucide-${i$(e)}`,r),...a}));return n.displayName=`${e}`,n};/**
|
|
127
127
|
* @license lucide-react v0.456.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/
|
|
131
|
+
*/Wt("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
|
|
132
132
|
* @license lucide-react v0.456.0 - ISC
|
|
133
133
|
*
|
|
134
134
|
* This source code is licensed under the ISC license.
|
|
135
135
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/
|
|
136
|
+
*/Wt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
137
137
|
* @license lucide-react v0.456.0 - ISC
|
|
138
138
|
*
|
|
139
139
|
* This source code is licensed under the ISC license.
|
|
140
140
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const
|
|
141
|
+
*/const c$=Wt("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
142
142
|
* @license lucide-react v0.456.0 - ISC
|
|
143
143
|
*
|
|
144
144
|
* This source code is licensed under the ISC license.
|
|
145
145
|
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const
|
|
146
|
+
*/const u$=Wt("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
147
147
|
* @license lucide-react v0.456.0 - ISC
|
|
148
148
|
*
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const
|
|
151
|
+
*/const d$=Wt("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
152
152
|
* @license lucide-react v0.456.0 - ISC
|
|
153
153
|
*
|
|
154
154
|
* This source code is licensed under the ISC license.
|
|
155
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const
|
|
156
|
+
*/const f$=Wt("CircleStop",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]]);/**
|
|
157
157
|
* @license lucide-react v0.456.0 - ISC
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the ISC license.
|
|
160
160
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const
|
|
161
|
+
*/const m$=Wt("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
162
162
|
* @license lucide-react v0.456.0 - ISC
|
|
163
163
|
*
|
|
164
164
|
* This source code is licensed under the ISC license.
|
|
165
165
|
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/
|
|
166
|
+
*/Wt("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
167
167
|
* @license lucide-react v0.456.0 - ISC
|
|
168
168
|
*
|
|
169
169
|
* This source code is licensed under the ISC license.
|
|
170
170
|
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/
|
|
171
|
+
*/Wt("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
172
172
|
* @license lucide-react v0.456.0 - ISC
|
|
173
173
|
*
|
|
174
174
|
* This source code is licensed under the ISC license.
|
|
175
175
|
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/
|
|
176
|
+
*/Wt("FolderUp",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m9 13 3-3 3 3",key:"1pxg3c"}]]);/**
|
|
177
177
|
* @license lucide-react v0.456.0 - ISC
|
|
178
178
|
*
|
|
179
179
|
* This source code is licensed under the ISC license.
|
|
180
180
|
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/
|
|
181
|
+
*/Wt("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
182
182
|
* @license lucide-react v0.456.0 - ISC
|
|
183
183
|
*
|
|
184
184
|
* This source code is licensed under the ISC license.
|
|
185
185
|
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/
|
|
186
|
+
*/Wt("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
187
187
|
* @license lucide-react v0.456.0 - ISC
|
|
188
188
|
*
|
|
189
189
|
* This source code is licensed under the ISC license.
|
|
190
190
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const
|
|
191
|
+
*/const Sf=Wt("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
192
192
|
* @license lucide-react v0.456.0 - ISC
|
|
193
193
|
*
|
|
194
194
|
* This source code is licensed under the ISC license.
|
|
195
195
|
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/
|
|
196
|
+
*/Wt("OctagonX",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
197
197
|
* @license lucide-react v0.456.0 - ISC
|
|
198
198
|
*
|
|
199
199
|
* This source code is licensed under the ISC license.
|
|
200
200
|
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/
|
|
201
|
+
*/Wt("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
|
|
202
202
|
* @license lucide-react v0.456.0 - ISC
|
|
203
203
|
*
|
|
204
204
|
* This source code is licensed under the ISC license.
|
|
205
205
|
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/
|
|
206
|
+
*/Wt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
207
207
|
* @license lucide-react v0.456.0 - ISC
|
|
208
208
|
*
|
|
209
209
|
* This source code is licensed under the ISC license.
|
|
210
210
|
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const
|
|
211
|
+
*/const p$=Wt("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);/**
|
|
212
212
|
* @license lucide-react v0.456.0 - ISC
|
|
213
213
|
*
|
|
214
214
|
* This source code is licensed under the ISC license.
|
|
215
215
|
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/
|
|
216
|
+
*/Wt("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
217
217
|
* @license lucide-react v0.456.0 - ISC
|
|
218
218
|
*
|
|
219
219
|
* This source code is licensed under the ISC license.
|
|
220
220
|
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/
|
|
221
|
+
*/Wt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
222
222
|
* @license lucide-react v0.456.0 - ISC
|
|
223
223
|
*
|
|
224
224
|
* This source code is licensed under the ISC license.
|
|
225
225
|
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const
|
|
226
|
+
*/const g$=Wt("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
227
227
|
* @license lucide-react v0.456.0 - ISC
|
|
228
228
|
*
|
|
229
229
|
* This source code is licensed under the ISC license.
|
|
230
230
|
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
-
*/const
|
|
231
|
+
*/const v$=Wt("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
|
|
232
232
|
* @license lucide-react v0.456.0 - ISC
|
|
233
233
|
*
|
|
234
234
|
* This source code is licensed under the ISC license.
|
|
235
235
|
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/const
|
|
236
|
+
*/const h$=Wt("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
|
|
237
237
|
* @license lucide-react v0.456.0 - ISC
|
|
238
238
|
*
|
|
239
239
|
* This source code is licensed under the ISC license.
|
|
240
240
|
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
-
*/
|
|
241
|
+
*/Wt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
242
242
|
* @license lucide-react v0.456.0 - ISC
|
|
243
243
|
*
|
|
244
244
|
* This source code is licensed under the ISC license.
|
|
245
245
|
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/const cv=Kt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var uv={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},Du={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},v$=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],qi={CSS:{},springs:{}};function cr(e,t,n){return Math.min(Math.max(e,t),n)}function fo(e,t){return e.indexOf(t)>-1}function sl(e,t){return e.apply(null,t)}var Je={arr:function(e){return Array.isArray(e)},obj:function(e){return fo(Object.prototype.toString.call(e),"Object")},pth:function(e){return Je.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},inp:function(e){return e instanceof HTMLInputElement},dom:function(e){return e.nodeType||Je.svg(e)},str:function(e){return typeof e=="string"},fnc:function(e){return typeof e=="function"},und:function(e){return typeof e>"u"},nil:function(e){return Je.und(e)||e===null},hex:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},rgb:function(e){return/^rgb/.test(e)},hsl:function(e){return/^hsl/.test(e)},col:function(e){return Je.hex(e)||Je.rgb(e)||Je.hsl(e)},key:function(e){return!uv.hasOwnProperty(e)&&!Du.hasOwnProperty(e)&&e!=="targets"&&e!=="keyframes"}};function dv(e){var t=/\(([^)]+)\)/.exec(e);return t?t[1].split(",").map(function(n){return parseFloat(n)}):[]}function fv(e,t){var n=dv(e),r=cr(Je.und(n[0])?1:n[0],.1,100),a=cr(Je.und(n[1])?100:n[1],.1,100),o=cr(Je.und(n[2])?10:n[2],.1,100),i=cr(Je.und(n[3])?0:n[3],.1,100),s=Math.sqrt(a/r),l=o/(2*Math.sqrt(a*r)),c=l<1?s*Math.sqrt(1-l*l):0,u=1,d=l<1?(l*s+-i)/c:-i+s;function g(v){var m=t?t*v/1e3:v;return l<1?m=Math.exp(-m*l*s)*(u*Math.cos(c*m)+d*Math.sin(c*m)):m=(u+d*m)*Math.exp(-m*s),v===0||v===1?v:1-m}function h(){var v=qi.springs[e];if(v)return v;for(var m=1/6,p=0,b=0;;)if(p+=m,g(p)===1){if(b++,b>=16)break}else b=0;var y=p*m*1e3;return qi.springs[e]=y,y}return t?g:h}function h$(e){return e===void 0&&(e=10),function(t){return Math.ceil(cr(t,1e-6,1)*e)*(1/e)}}var y$=(function(){var e=11,t=1/(e-1);function n(u,d){return 1-3*d+3*u}function r(u,d){return 3*d-6*u}function a(u){return 3*u}function o(u,d,g){return((n(d,g)*u+r(d,g))*u+a(d))*u}function i(u,d,g){return 3*n(d,g)*u*u+2*r(d,g)*u+a(d)}function s(u,d,g,h,v){var m,p,b=0;do p=d+(g-d)/2,m=o(p,h,v)-u,m>0?g=p:d=p;while(Math.abs(m)>1e-7&&++b<10);return p}function l(u,d,g,h){for(var v=0;v<4;++v){var m=i(d,g,h);if(m===0)return d;var p=o(d,g,h)-u;d-=p/m}return d}function c(u,d,g,h){if(!(0<=u&&u<=1&&0<=g&&g<=1))return;var v=new Float32Array(e);if(u!==d||g!==h)for(var m=0;m<e;++m)v[m]=o(m*t,u,g);function p(b){for(var y=0,x=1,w=e-1;x!==w&&v[x]<=b;++x)y+=t;--x;var C=(b-v[x])/(v[x+1]-v[x]),S=y+C*t,E=i(S,u,g);return E>=.001?l(b,S,u,g):E===0?S:s(b,y,y+t,u,g)}return function(b){return u===d&&g===h||b===0||b===1?b:o(p(b),d,h)}}return c})(),mv=(function(){var e={linear:function(){return function(r){return r}}},t={Sine:function(){return function(r){return 1-Math.cos(r*Math.PI/2)}},Expo:function(){return function(r){return r?Math.pow(2,10*r-10):0}},Circ:function(){return function(r){return 1-Math.sqrt(1-r*r)}},Back:function(){return function(r){return r*r*(3*r-2)}},Bounce:function(){return function(r){for(var a,o=4;r<((a=Math.pow(2,--o))-1)/11;);return 1/Math.pow(4,3-o)-7.5625*Math.pow((a*3-2)/22-r,2)}},Elastic:function(r,a){r===void 0&&(r=1),a===void 0&&(a=.5);var o=cr(r,1,10),i=cr(a,.1,2);return function(s){return s===0||s===1?s:-o*Math.pow(2,10*(s-1))*Math.sin((s-1-i/(Math.PI*2)*Math.asin(1/o))*(Math.PI*2)/i)}}},n=["Quad","Cubic","Quart","Quint"];return n.forEach(function(r,a){t[r]=function(){return function(o){return Math.pow(o,a+2)}}}),Object.keys(t).forEach(function(r){var a=t[r];e["easeIn"+r]=a,e["easeOut"+r]=function(o,i){return function(s){return 1-a(o,i)(1-s)}},e["easeInOut"+r]=function(o,i){return function(s){return s<.5?a(o,i)(s*2)/2:1-a(o,i)(s*-2+2)/2}},e["easeOutIn"+r]=function(o,i){return function(s){return s<.5?(1-a(o,i)(1-s*2))/2:(a(o,i)(s*2-1)+1)/2}}}),e})();function Mu(e,t){if(Je.fnc(e))return e;var n=e.split("(")[0],r=mv[n],a=dv(e);switch(n){case"spring":return fv(e,t);case"cubicBezier":return sl(y$,a);case"steps":return sl(h$,a);default:return sl(r,a)}}function pv(e){try{var t=document.querySelectorAll(e);return t}catch{return}}function Ss(e,t){for(var n=e.length,r=arguments.length>=2?arguments[1]:void 0,a=[],o=0;o<n;o++)if(o in e){var i=e[o];t.call(r,i,o,e)&&a.push(i)}return a}function $s(e){return e.reduce(function(t,n){return t.concat(Je.arr(n)?$s(n):n)},[])}function Sf(e){return Je.arr(e)?e:(Je.str(e)&&(e=pv(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function Fu(e,t){return e.some(function(n){return n===t})}function Pu(e){var t={};for(var n in e)t[n]=e[n];return t}function Xl(e,t){var n=Pu(e);for(var r in e)n[r]=t.hasOwnProperty(r)?t[r]:e[r];return n}function Es(e,t){var n=Pu(e);for(var r in t)n[r]=Je.und(e[r])?t[r]:e[r];return n}function b$(e){var t=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(e);return t?"rgba("+t[1]+",1)":e}function x$(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,n=e.replace(t,function(s,l,c,u){return l+l+c+c+u+u}),r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n),a=parseInt(r[1],16),o=parseInt(r[2],16),i=parseInt(r[3],16);return"rgba("+a+","+o+","+i+",1)"}function C$(e){var t=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e),n=parseInt(t[1],10)/360,r=parseInt(t[2],10)/100,a=parseInt(t[3],10)/100,o=t[4]||1;function i(g,h,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?g+(h-g)*6*v:v<1/2?h:v<2/3?g+(h-g)*(2/3-v)*6:g}var s,l,c;if(r==0)s=l=c=a;else{var u=a<.5?a*(1+r):a+r-a*r,d=2*a-u;s=i(d,u,n+1/3),l=i(d,u,n),c=i(d,u,n-1/3)}return"rgba("+s*255+","+l*255+","+c*255+","+o+")"}function w$(e){if(Je.rgb(e))return b$(e);if(Je.hex(e))return x$(e);if(Je.hsl(e))return C$(e)}function hr(e){var t=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);if(t)return t[1]}function S$(e){if(fo(e,"translate")||e==="perspective")return"px";if(fo(e,"rotate")||fo(e,"skew"))return"deg"}function Jl(e,t){return Je.fnc(e)?e(t.target,t.id,t.total):e}function ur(e,t){return e.getAttribute(t)}function ju(e,t,n){var r=hr(t);if(Fu([n,"deg","rad","turn"],r))return t;var a=qi.CSS[t+n];if(!Je.und(a))return a;var o=100,i=document.createElement(e.tagName),s=e.parentNode&&e.parentNode!==document?e.parentNode:document.body;s.appendChild(i),i.style.position="absolute",i.style.width=o+n;var l=o/i.offsetWidth;s.removeChild(i);var c=l*parseFloat(t);return qi.CSS[t+n]=c,c}function gv(e,t,n){if(t in e.style){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),a=e.style[t]||getComputedStyle(e).getPropertyValue(r)||"0";return n?ju(e,a,n):a}}function Ru(e,t){if(Je.dom(e)&&!Je.inp(e)&&(!Je.nil(ur(e,t))||Je.svg(e)&&e[t]))return"attribute";if(Je.dom(e)&&Fu(v$,t))return"transform";if(Je.dom(e)&&t!=="transform"&&gv(e,t))return"css";if(e[t]!=null)return"object"}function vv(e){if(Je.dom(e)){for(var t=e.style.transform||"",n=/(\w+)\(([^)]*)\)/g,r=new Map,a;a=n.exec(t);)r.set(a[1],a[2]);return r}}function $$(e,t,n,r){var a=fo(t,"scale")?1:0+S$(t),o=vv(e).get(t)||a;return n&&(n.transforms.list.set(t,o),n.transforms.last=t),r?ju(e,o,r):o}function Au(e,t,n,r){switch(Ru(e,t)){case"transform":return $$(e,t,r,n);case"css":return gv(e,t,n);case"attribute":return ur(e,t);default:return e[t]||0}}function Tu(e,t){var n=/^(\*=|\+=|-=)/.exec(e);if(!n)return e;var r=hr(e)||0,a=parseFloat(t),o=parseFloat(e.replace(n[0],""));switch(n[0][0]){case"+":return a+o+r;case"-":return a-o+r;case"*":return a*o+r}}function hv(e,t){if(Je.col(e))return w$(e);if(/\s/g.test(e))return e;var n=hr(e),r=n?e.substr(0,e.length-n.length):e;return t?r+t:r}function _u(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function E$(e){return Math.PI*2*ur(e,"r")}function k$(e){return ur(e,"width")*2+ur(e,"height")*2}function I$(e){return _u({x:ur(e,"x1"),y:ur(e,"y1")},{x:ur(e,"x2"),y:ur(e,"y2")})}function yv(e){for(var t=e.points,n=0,r,a=0;a<t.numberOfItems;a++){var o=t.getItem(a);a>0&&(n+=_u(r,o)),r=o}return n}function O$(e){var t=e.points;return yv(e)+_u(t.getItem(t.numberOfItems-1),t.getItem(0))}function bv(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return E$(e);case"rect":return k$(e);case"line":return I$(e);case"polyline":return yv(e);case"polygon":return O$(e)}}function N$(e){var t=bv(e);return e.setAttribute("stroke-dasharray",t),t}function D$(e){for(var t=e.parentNode;Je.svg(t)&&Je.svg(t.parentNode);)t=t.parentNode;return t}function xv(e,t){var n=t||{},r=n.el||D$(e),a=r.getBoundingClientRect(),o=ur(r,"viewBox"),i=a.width,s=a.height,l=n.viewBox||(o?o.split(" "):[0,0,i,s]);return{el:r,viewBox:l,x:l[0]/1,y:l[1]/1,w:i,h:s,vW:l[2],vH:l[3]}}function M$(e,t){var n=Je.str(e)?pv(e)[0]:e,r=t||100;return function(a){return{property:a,el:n,svg:xv(n),totalLength:bv(n)*(r/100)}}}function F$(e,t,n){function r(u){u===void 0&&(u=0);var d=t+u>=1?t+u:0;return e.el.getPointAtLength(d)}var a=xv(e.el,e.svg),o=r(),i=r(-1),s=r(1),l=n?1:a.w/a.vW,c=n?1:a.h/a.vH;switch(e.property){case"x":return(o.x-a.x)*l;case"y":return(o.y-a.y)*c;case"angle":return Math.atan2(s.y-i.y,s.x-i.x)*180/Math.PI}}function $f(e,t){var n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,r=hv(Je.pth(e)?e.totalLength:e,t)+"";return{original:r,numbers:r.match(n)?r.match(n).map(Number):[0],strings:Je.str(e)||t?r.split(n):[]}}function Bu(e){var t=e?$s(Je.arr(e)?e.map(Sf):Sf(e)):[];return Ss(t,function(n,r,a){return a.indexOf(n)===r})}function Cv(e){var t=Bu(e);return t.map(function(n,r){return{target:n,id:r,total:t.length,transforms:{list:vv(n)}}})}function P$(e,t){var n=Pu(t);if(/^spring/.test(n.easing)&&(n.duration=fv(n.easing)),Je.arr(e)){var r=e.length,a=r===2&&!Je.obj(e[0]);a?e={value:e}:Je.fnc(t.duration)||(n.duration=t.duration/r)}var o=Je.arr(e)?e:[e];return o.map(function(i,s){var l=Je.obj(i)&&!Je.pth(i)?i:{value:i};return Je.und(l.delay)&&(l.delay=s?0:t.delay),Je.und(l.endDelay)&&(l.endDelay=s===o.length-1?t.endDelay:0),l}).map(function(i){return Es(i,n)})}function j$(e){for(var t=Ss($s(e.map(function(o){return Object.keys(o)})),function(o){return Je.key(o)}).reduce(function(o,i){return o.indexOf(i)<0&&o.push(i),o},[]),n={},r=function(o){var i=t[o];n[i]=e.map(function(s){var l={};for(var c in s)Je.key(c)?c==i&&(l.value=s[c]):l[c]=s[c];return l})},a=0;a<t.length;a++)r(a);return n}function R$(e,t){var n=[],r=t.keyframes;r&&(t=Es(j$(r),t));for(var a in t)Je.key(a)&&n.push({name:a,tweens:P$(t[a],e)});return n}function A$(e,t){var n={};for(var r in e){var a=Jl(e[r],t);Je.arr(a)&&(a=a.map(function(o){return Jl(o,t)}),a.length===1&&(a=a[0])),n[r]=a}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}function T$(e,t){var n;return e.tweens.map(function(r){var a=A$(r,t),o=a.value,i=Je.arr(o)?o[1]:o,s=hr(i),l=Au(t.target,e.name,s,t),c=n?n.to.original:l,u=Je.arr(o)?o[0]:c,d=hr(u)||hr(l),g=s||d;return Je.und(i)&&(i=c),a.from=$f(u,g),a.to=$f(Tu(i,u),g),a.start=n?n.end:0,a.end=a.start+a.delay+a.duration+a.endDelay,a.easing=Mu(a.easing,a.duration),a.isPath=Je.pth(o),a.isPathTargetInsideSVG=a.isPath&&Je.svg(t.target),a.isColor=Je.col(a.from.original),a.isColor&&(a.round=1),n=a,a})}var wv={css:function(e,t,n){return e.style[t]=n},attribute:function(e,t,n){return e.setAttribute(t,n)},object:function(e,t,n){return e[t]=n},transform:function(e,t,n,r,a){if(r.list.set(t,n),t===r.last||a){var o="";r.list.forEach(function(i,s){o+=s+"("+i+") "}),e.style.transform=o}}};function Sv(e,t){var n=Cv(e);n.forEach(function(r){for(var a in t){var o=Jl(t[a],r),i=r.target,s=hr(o),l=Au(i,a,s,r),c=s||hr(l),u=Tu(hv(o,c),l),d=Ru(i,a);wv[d](i,a,u,r.transforms,!0)}})}function _$(e,t){var n=Ru(e.target,t.name);if(n){var r=T$(t,e),a=r[r.length-1];return{type:n,property:t.name,animatable:e,tweens:r,duration:a.end,delay:r[0].delay,endDelay:a.endDelay}}}function B$(e,t){return Ss($s(e.map(function(n){return t.map(function(r){return _$(n,r)})})),function(n){return!Je.und(n)})}function $v(e,t){var n=e.length,r=function(o){return o.timelineOffset?o.timelineOffset:0},a={};return a.duration=n?Math.max.apply(Math,e.map(function(o){return r(o)+o.duration})):t.duration,a.delay=n?Math.min.apply(Math,e.map(function(o){return r(o)+o.delay})):t.delay,a.endDelay=n?a.duration-Math.max.apply(Math,e.map(function(o){return r(o)+o.duration-o.endDelay})):t.endDelay,a}var Ef=0;function L$(e){var t=Xl(uv,e),n=Xl(Du,e),r=R$(n,e),a=Cv(e.targets),o=B$(a,r),i=$v(o,n),s=Ef;return Ef++,Es(t,{id:s,children:[],animatables:a,animations:o,duration:i.duration,delay:i.delay,endDelay:i.endDelay})}var Zn=[],Ev=(function(){var e;function t(){!e&&(!kf()||!Rt.suspendWhenDocumentHidden)&&Zn.length>0&&(e=requestAnimationFrame(n))}function n(a){for(var o=Zn.length,i=0;i<o;){var s=Zn[i];s.paused?(Zn.splice(i,1),o--):(s.tick(a),i++)}e=i>0?requestAnimationFrame(n):void 0}function r(){Rt.suspendWhenDocumentHidden&&(kf()?e=cancelAnimationFrame(e):(Zn.forEach(function(a){return a._onDocumentVisibility()}),Ev()))}return typeof document<"u"&&document.addEventListener("visibilitychange",r),t})();function kf(){return!!document&&document.hidden}function Rt(e){e===void 0&&(e={});var t=0,n=0,r=0,a,o=0,i=null;function s(y){var x=window.Promise&&new Promise(function(w){return i=w});return y.finished=x,x}var l=L$(e);s(l);function c(){var y=l.direction;y!=="alternate"&&(l.direction=y!=="normal"?"normal":"reverse"),l.reversed=!l.reversed,a.forEach(function(x){return x.reversed=l.reversed})}function u(y){return l.reversed?l.duration-y:y}function d(){t=0,n=u(l.currentTime)*(1/Rt.speed)}function g(y,x){x&&x.seek(y-x.timelineOffset)}function h(y){if(l.reversePlayback)for(var x=o;x--;)g(y,a[x]);else for(var w=0;w<o;w++)g(y,a[w])}function v(y){for(var x=0,w=l.animations,C=w.length;x<C;){var S=w[x],E=S.animatable,k=S.tweens,$=k.length-1,O=k[$];$&&(O=Ss(k,function(K){return y<K.end})[0]||O);for(var D=cr(y-O.start-O.delay,0,O.duration)/O.duration,P=isNaN(D)?1:O.easing(D),R=O.to.strings,N=O.round,I=[],M=O.to.numbers.length,F=void 0,j=0;j<M;j++){var A=void 0,_=O.to.numbers[j],L=O.from.numbers[j]||0;O.isPath?A=F$(O.value,P*_,O.isPathTargetInsideSVG):A=L+P*(_-L),N&&(O.isColor&&j>2||(A=Math.round(A*N)/N)),I.push(A)}var z=R.length;if(!z)F=I[0];else{F=R[0];for(var T=0;T<z;T++){var H=R[T+1],W=I[T];isNaN(W)||(H?F+=W+H:F+=W+" ")}}wv[S.type](E.target,S.property,F,E.transforms),S.currentValue=F,x++}}function m(y){l[y]&&!l.passThrough&&l[y](l)}function p(){l.remaining&&l.remaining!==!0&&l.remaining--}function b(y){var x=l.duration,w=l.delay,C=x-l.endDelay,S=u(y);l.progress=cr(S/x*100,0,100),l.reversePlayback=S<l.currentTime,a&&h(S),!l.began&&l.currentTime>0&&(l.began=!0,m("begin")),!l.loopBegan&&l.currentTime>0&&(l.loopBegan=!0,m("loopBegin")),S<=w&&l.currentTime!==0&&v(0),(S>=C&&l.currentTime!==x||!x)&&v(x),S>w&&S<C?(l.changeBegan||(l.changeBegan=!0,l.changeCompleted=!1,m("changeBegin")),m("change"),v(S)):l.changeBegan&&(l.changeCompleted=!0,l.changeBegan=!1,m("changeComplete")),l.currentTime=cr(S,0,x),l.began&&m("update"),y>=x&&(n=0,p(),l.remaining?(t=r,m("loopComplete"),l.loopBegan=!1,l.direction==="alternate"&&c()):(l.paused=!0,l.completed||(l.completed=!0,m("loopComplete"),m("complete"),!l.passThrough&&"Promise"in window&&(i(),s(l)))))}return l.reset=function(){var y=l.direction;l.passThrough=!1,l.currentTime=0,l.progress=0,l.paused=!0,l.began=!1,l.loopBegan=!1,l.changeBegan=!1,l.completed=!1,l.changeCompleted=!1,l.reversePlayback=!1,l.reversed=y==="reverse",l.remaining=l.loop,a=l.children,o=a.length;for(var x=o;x--;)l.children[x].reset();(l.reversed&&l.loop!==!0||y==="alternate"&&l.loop===1)&&l.remaining++,v(l.reversed?l.duration:0)},l._onDocumentVisibility=d,l.set=function(y,x){return Sv(y,x),l},l.tick=function(y){r=y,t||(t=r),b((r+(n-t))*Rt.speed)},l.seek=function(y){b(u(y))},l.pause=function(){l.paused=!0,d()},l.play=function(){l.paused&&(l.completed&&l.reset(),l.paused=!1,Zn.push(l),d(),Ev())},l.reverse=function(){c(),l.completed=!l.reversed,d()},l.restart=function(){l.reset(),l.play()},l.remove=function(y){var x=Bu(y);kv(x,l)},l.reset(),l.autoplay&&l.play(),l}function If(e,t){for(var n=t.length;n--;)Fu(e,t[n].animatable.target)&&t.splice(n,1)}function kv(e,t){var n=t.animations,r=t.children;If(e,n);for(var a=r.length;a--;){var o=r[a],i=o.animations;If(e,i),!i.length&&!o.children.length&&r.splice(a,1)}!n.length&&!r.length&&t.pause()}function z$(e){for(var t=Bu(e),n=Zn.length;n--;){var r=Zn[n];kv(t,r)}}function H$(e,t){t===void 0&&(t={});var n=t.direction||"normal",r=t.easing?Mu(t.easing):null,a=t.grid,o=t.axis,i=t.from||0,s=i==="first",l=i==="center",c=i==="last",u=Je.arr(e),d=parseFloat(u?e[0]:e),g=u?parseFloat(e[1]):0,h=hr(u?e[1]:e)||0,v=t.start||0+(u?d:0),m=[],p=0;return function(b,y,x){if(s&&(i=0),l&&(i=(x-1)/2),c&&(i=x-1),!m.length){for(var w=0;w<x;w++){if(!a)m.push(Math.abs(i-w));else{var C=l?(a[0]-1)/2:i%a[0],S=l?(a[1]-1)/2:Math.floor(i/a[0]),E=w%a[0],k=Math.floor(w/a[0]),$=C-E,O=S-k,D=Math.sqrt($*$+O*O);o==="x"&&(D=-$),o==="y"&&(D=-O),m.push(D)}p=Math.max.apply(Math,m)}r&&(m=m.map(function(R){return r(R/p)*p})),n==="reverse"&&(m=m.map(function(R){return o?R<0?R*-1:-R:Math.abs(p-R)}))}var P=u?(g-d)/p:d;return v+P*(Math.round(m[y]*100)/100)+h}}function V$(e){e===void 0&&(e={});var t=Rt(e);return t.duration=0,t.add=function(n,r){var a=Zn.indexOf(t),o=t.children;a>-1&&Zn.splice(a,1);function i(g){g.passThrough=!0}for(var s=0;s<o.length;s++)i(o[s]);var l=Es(n,Xl(Du,e));l.targets=l.targets||e.targets;var c=t.duration;l.autoplay=!1,l.direction=t.direction,l.timelineOffset=Je.und(r)?c:Tu(r,c),i(t),t.seek(l.timelineOffset);var u=Rt(l);i(u),o.push(u);var d=$v(o,e);return t.delay=d.delay,t.endDelay=d.endDelay,t.duration=d.duration,t.seek(0),t.reset(),t.autoplay&&t.play(),t},t}Rt.version="3.2.1";Rt.speed=1;Rt.suspendWhenDocumentHidden=!0;Rt.running=Zn;Rt.remove=z$;Rt.get=Au;Rt.set=Sv;Rt.convertPx=ju;Rt.path=M$;Rt.setDashoffset=N$;Rt.stagger=H$;Rt.timeline=V$;Rt.easing=Mu;Rt.penner=mv;Rt.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e};const K$=ra({badgeCounts:{},updateBadgeCount:()=>{}}),W$=()=>{const e=$n(K$);if(!e)throw new Error("useBadge must be used within a BadgeProvider");return e};var Ql={exports:{}},q$=Ql.exports,Of;function U$(){return Of||(Of=1,(function(e,t){(function(n,r){e.exports=r()})(q$,(function(){var n=1e3,r=6e4,a=36e5,o="millisecond",i="second",s="minute",l="hour",c="day",u="week",d="month",g="quarter",h="year",v="date",m="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var I=["th","st","nd","rd"],M=N%100;return"["+N+(I[(M-20)%10]||I[M]||I[0])+"]"}},x=function(N,I,M){var F=String(N);return!F||F.length>=I?N:""+Array(I+1-F.length).join(M)+N},w={s:x,z:function(N){var I=-N.utcOffset(),M=Math.abs(I),F=Math.floor(M/60),j=M%60;return(I<=0?"+":"-")+x(F,2,"0")+":"+x(j,2,"0")},m:function N(I,M){if(I.date()<M.date())return-N(M,I);var F=12*(M.year()-I.year())+(M.month()-I.month()),j=I.clone().add(F,d),A=M-j<0,_=I.clone().add(F+(A?-1:1),d);return+(-(F+(M-j)/(A?j-_:_-j))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:d,y:h,w:u,d:c,D:v,h:l,m:s,s:i,ms:o,Q:g}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},C="en",S={};S[C]=y;var E="$isDayjsObject",k=function(N){return N instanceof P||!(!N||!N[E])},$=function N(I,M,F){var j;if(!I)return C;if(typeof I=="string"){var A=I.toLowerCase();S[A]&&(j=A),M&&(S[A]=M,j=A);var _=I.split("-");if(!j&&_.length>1)return N(_[0])}else{var L=I.name;S[L]=I,j=L}return!F&&j&&(C=j),j||!F&&C},O=function(N,I){if(k(N))return N.clone();var M=typeof I=="object"?I:{};return M.date=N,M.args=arguments,new P(M)},D=w;D.l=$,D.i=k,D.w=function(N,I){return O(N,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var P=(function(){function N(M){this.$L=$(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[E]=!0}var I=N.prototype;return I.parse=function(M){this.$d=(function(F){var j=F.date,A=F.utc;if(j===null)return new Date(NaN);if(D.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var _=j.match(p);if(_){var L=_[2]-1||0,z=(_[7]||"0").substring(0,3);return A?new Date(Date.UTC(_[1],L,_[3]||1,_[4]||0,_[5]||0,_[6]||0,z)):new Date(_[1],L,_[3]||1,_[4]||0,_[5]||0,_[6]||0,z)}}return new Date(j)})(M),this.init()},I.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},I.$utils=function(){return D},I.isValid=function(){return this.$d.toString()!==m},I.isSame=function(M,F){var j=O(M);return this.startOf(F)<=j&&j<=this.endOf(F)},I.isAfter=function(M,F){return O(M)<this.startOf(F)},I.isBefore=function(M,F){return this.endOf(F)<O(M)},I.$g=function(M,F,j){return D.u(M)?this[F]:this.set(j,M)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(M,F){var j=this,A=!!D.u(F)||F,_=D.p(M),L=function(Z,Q){var Y=D.w(j.$u?Date.UTC(j.$y,Q,Z):new Date(j.$y,Q,Z),j);return A?Y:Y.endOf(c)},z=function(Z,Q){return D.w(j.toDate()[Z].apply(j.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(Q)),j)},T=this.$W,H=this.$M,W=this.$D,K="set"+(this.$u?"UTC":"");switch(_){case h:return A?L(1,0):L(31,11);case d:return A?L(1,H):L(0,H+1);case u:var G=this.$locale().weekStart||0,U=(T<G?T+7:T)-G;return L(A?W-U:W+(6-U),H);case c:case v:return z(K+"Hours",0);case l:return z(K+"Minutes",1);case s:return z(K+"Seconds",2);case i:return z(K+"Milliseconds",3);default:return this.clone()}},I.endOf=function(M){return this.startOf(M,!1)},I.$set=function(M,F){var j,A=D.p(M),_="set"+(this.$u?"UTC":""),L=(j={},j[c]=_+"Date",j[v]=_+"Date",j[d]=_+"Month",j[h]=_+"FullYear",j[l]=_+"Hours",j[s]=_+"Minutes",j[i]=_+"Seconds",j[o]=_+"Milliseconds",j)[A],z=A===c?this.$D+(F-this.$W):F;if(A===d||A===h){var T=this.clone().set(v,1);T.$d[L](z),T.init(),this.$d=T.set(v,Math.min(this.$D,T.daysInMonth())).$d}else L&&this.$d[L](z);return this.init(),this},I.set=function(M,F){return this.clone().$set(M,F)},I.get=function(M){return this[D.p(M)]()},I.add=function(M,F){var j,A=this;M=Number(M);var _=D.p(F),L=function(H){var W=O(A);return D.w(W.date(W.date()+Math.round(H*M)),A)};if(_===d)return this.set(d,this.$M+M);if(_===h)return this.set(h,this.$y+M);if(_===c)return L(1);if(_===u)return L(7);var z=(j={},j[s]=r,j[l]=a,j[i]=n,j)[_]||1,T=this.$d.getTime()+M*z;return D.w(T,this)},I.subtract=function(M,F){return this.add(-1*M,F)},I.format=function(M){var F=this,j=this.$locale();if(!this.isValid())return j.invalidDate||m;var A=M||"YYYY-MM-DDTHH:mm:ssZ",_=D.z(this),L=this.$H,z=this.$m,T=this.$M,H=j.weekdays,W=j.months,K=j.meridiem,G=function(Q,Y,ee,ce){return Q&&(Q[Y]||Q(F,A))||ee[Y].slice(0,ce)},U=function(Q){return D.s(L%12||12,Q,"0")},Z=K||function(Q,Y,ee){var ce=Q<12?"AM":"PM";return ee?ce.toLowerCase():ce};return A.replace(b,(function(Q,Y){return Y||(function(ee){switch(ee){case"YY":return String(F.$y).slice(-2);case"YYYY":return D.s(F.$y,4,"0");case"M":return T+1;case"MM":return D.s(T+1,2,"0");case"MMM":return G(j.monthsShort,T,W,3);case"MMMM":return G(W,T);case"D":return F.$D;case"DD":return D.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return G(j.weekdaysMin,F.$W,H,2);case"ddd":return G(j.weekdaysShort,F.$W,H,3);case"dddd":return H[F.$W];case"H":return String(L);case"HH":return D.s(L,2,"0");case"h":return U(1);case"hh":return U(2);case"a":return Z(L,z,!0);case"A":return Z(L,z,!1);case"m":return String(z);case"mm":return D.s(z,2,"0");case"s":return String(F.$s);case"ss":return D.s(F.$s,2,"0");case"SSS":return D.s(F.$ms,3,"0");case"Z":return _}return null})(Q)||_.replace(":","")}))},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(M,F,j){var A,_=this,L=D.p(F),z=O(M),T=(z.utcOffset()-this.utcOffset())*r,H=this-z,W=function(){return D.m(_,z)};switch(L){case h:A=W()/12;break;case d:A=W();break;case g:A=W()/3;break;case u:A=(H-T)/6048e5;break;case c:A=(H-T)/864e5;break;case l:A=H/a;break;case s:A=H/r;break;case i:A=H/n;break;default:A=H}return j?A:D.a(A)},I.daysInMonth=function(){return this.endOf(d).$D},I.$locale=function(){return S[this.$L]},I.locale=function(M,F){if(!M)return this.$L;var j=this.clone(),A=$(M,F,!0);return A&&(j.$L=A),j},I.clone=function(){return D.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},N})(),R=P.prototype;return O.prototype=R,[["$ms",o],["$s",i],["$m",s],["$H",l],["$W",c],["$M",d],["$y",h],["$D",v]].forEach((function(N){R[N[1]]=function(I){return this.$g(I,N[0],N[1])}})),O.extend=function(N,I){return N.$i||(N(I,P,O),N.$i=!0),O},O.locale=$,O.isDayjs=k,O.unix=function(N){return O(1e3*N)},O.en=S[C],O.Ls=S,O.p={},O}))})(Ql)),Ql.exports}var Y$=U$();const Iv=iv(Y$);function G$(e,t){var r;const n=((r=t==null?void 0:t.theme)==null?void 0:r.icons)||{};switch(e.toLowerCase()){case"docx":case"doc":return n.docx?X.jsx("img",{src:n.docx,alt:"docx",style:{width:20,height:20}}):X.jsx(qt,{type:"rag/word",size:18});case"image":case"jpg":case"jpeg":case"png":case"gif":case"bmp":case"webp":case"svg":case"ico":return n.image?X.jsx("img",{src:n.image,alt:"image",style:{width:20,height:20}}):X.jsx(qt,{type:"rag/pic",size:18});case"pptx":case"ppt":return n.pptx?X.jsx("img",{src:n.pptx,alt:"pptx",style:{width:20,height:20}}):X.jsx(qt,{type:"rag/ppt",size:18});case"sheets":case"excel":case"xls":case"csv":case"xlsx":case"xlsm":case"xlsb":case"xltx":case"xltm":case"xlt":case"xlam":return n.sheets?X.jsx("img",{src:n.sheets,alt:"sheets",style:{width:20,height:20}}):X.jsx(qt,{type:"rag/excel",size:18});case"pdf":return n.pdf?X.jsx("img",{src:n.pdf,alt:"pdf",style:{width:20,height:20}}):X.jsx(qt,{type:"rag/pdf",size:18});case"txt":return n.txt?X.jsx("img",{src:n.txt,alt:"txt",style:{width:20,height:20}}):X.jsx(qt,{type:"rag/txt",size:18});case"md":return n.md?X.jsx("img",{src:n.md,alt:"txt",style:{width:20,height:20}}):X.jsx(qt,{type:"rag/document",size:18});case"json":return n.json?X.jsx("img",{src:n.json,alt:"json",style:{width:20,height:20}}):X.jsx(qt,{type:"rag/json",size:18});case"html":case"htm":return n.html?X.jsx("img",{src:n.html,alt:"html",style:{width:20,height:20}}):X.jsx(qt,{type:"rag/url",size:18});case"xml":default:return X.jsx(qt,{type:"rag/file",size:18})}}const X$=e=>e?e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/1024/1024).toFixed(1)}MB`:"",J$=({fileName:e,fileSize:t,icon:n,statusText:r,statusColor:a="text-gray-400",statusIcon:o,onRemove:i,themeColors:s={},cardId:l,showRemove:c=!0,disabledRemove:u=!1,onRemoveWithAnim:d,extra:g,style:h})=>X.jsxs("div",{id:l,className:"group gap-x-2.5 items-center file-display-card relative flex w-[210px] bg-white border border-gray-200 rounded-md shadow-sm px-2 py-1 transition-all hover:shadow-md hover:border-blue-300",style:h,children:[X.jsx("div",{className:"pt-1",children:n}),X.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[X.jsxs("div",{className:"flex items-center justify-between gap-1",children:[X.jsx("span",{className:"text-[12px] font-medium truncate max-w-[120px]",title:e,children:e}),X.jsx("span",{className:"ml-1 text-[11px] text-gray-400",children:X$(t)})]}),X.jsxs("div",{className:`text-[10px] mt-0.5 flex items-center gap-3 ${a}`,children:[o,X.jsx("span",{children:r})]})]}),g,c&&!u&&X.jsx("button",{className:"absolute top-0.5 right-0.5 opacity-0 group-hover:opacity-100 transition-opacity text-gray-300 hover:text-red-400 text-xs p-0.5 rounded-full bg-white shadow-sm z-10",onClick:()=>{d&&l?d(l):i&&i()},title:"\u79FB\u9664",style:{lineHeight:0,color:s.error||"#FF0000"},children:X.jsx(cv,{className:"w-3.5 h-3.5"})})]});function Q$({uploadedFiles:e,onRemoveFile:t,eventsEmit:n,styles:r}){return ft(()=>{e.forEach((a,o)=>{a&&console.log("FilesDisplay currentStatus",a.status)})},[e]),ft(()=>{e.length>0&&e.every(a=>a.status==="finished")&&Rt({targets:".file-display-card",opacity:0,scale:.8,delay:Rt.stagger(100),duration:400,easing:"easeOutExpo",complete:()=>{n==null||n("files:finished_animation_complete")}})},[e,n]),X.jsx("div",{className:"flex overflow-x-auto gap-2 pb-2 px-1",children:e.filter(Boolean).map((a,o)=>{var g,h;if(!a||!a.file)return null;const i=a.name||a.file.name,s=(g=a.file)==null?void 0:g.size;let{status:l}=a;l==="finished"&&(l="done");const c={pending:{text:"\u5F85\u53D1\u9001",icon:null,color:"text-gray-400"},uploading:{text:"\u4E0A\u4F20\u4E2D",icon:X.jsx(wf,{className:"w-3 h-3 animate-spin"}),color:"text-blue-500"},parsing:{text:"\u89E3\u6790\u4E2D",icon:X.jsx(wf,{className:"w-3 h-3 animate-spin"}),color:"text-blue-500"},done:{text:"\u5DF2\u5C31\u7EEA",icon:X.jsx(l$,{className:"w-3 h-3"}),color:"text-green-500"},error:{text:"\u5931\u8D25",icon:X.jsx(s$,{className:"w-3 h-3"}),color:"text-red-500"}}[l||"pending"]||{text:"\u672A\u77E5",icon:null,color:"text-gray-400"},u=i.split(".").pop()||"",d=G$(u,r);return X.jsx(J$,{cardId:`file-card-${o}`,fileName:i,fileSize:s,icon:d,statusText:c.text||"\u672A\u77E5",statusColor:c.color||"text-gray-400",statusIcon:c.icon||null,showRemove:l!=="parsing"&&l!=="uploading",onRemoveWithAnim:v=>{Rt({targets:`#${v}`,opacity:0,scale:.8,duration:300,easing:"easeOutExpo",complete:()=>{t==null||t(o)}})},themeColors:(h=r==null?void 0:r.theme)==null?void 0:h.colors},i+o)})})}function Z$({checked:e,onChange:t,icon:n,children:r,styles:a,disabled:o}){var h,v,m,p,b,y,x,w,C,S,E,k,$,O;const i=((v=(h=a==null?void 0:a.theme)==null?void 0:h.colors)==null?void 0:v.primary)||"#00C26A",s=((p=(m=a==null?void 0:a.theme)==null?void 0:m.colors)==null?void 0:p.text)||"#343a40",l=((y=(b=a==null?void 0:a.theme)==null?void 0:b.colors)==null?void 0:y.background)||"#fff",c=((w=(x=a==null?void 0:a.theme)==null?void 0:x.colors)==null?void 0:w.border)||"#dee2e6",u=((S=(C=a==null?void 0:a.theme)==null?void 0:C.colors)==null?void 0:S.disabledBackground)||"#F5F5F5",d=((k=(E=a==null?void 0:a.theme)==null?void 0:E.colors)==null?void 0:k.disabledText)||"#808080",g=((O=($=a==null?void 0:a.theme)==null?void 0:$.colors)==null?void 0:O.disabled)||"#808080";return X.jsxs("button",{type:"button",onClick:()=>t(!e),disabled:o,className:"flex items-center gap-1 bg-white px-3 py-1 rounded-full border transition-all duration-200 text-xs select-none",style:{borderWidth:1.5,outline:"none",cursor:o?"not-allowed":"pointer",minWidth:0,background:o?u:e?i:"transparent",color:o?d:e?l:s,borderColor:o?g:e?i:c},children:[n,X.jsx("span",{children:r})]})}function eE({value:e,eventsEmit:t,styles:n,status:r,onUpload:a,onVoice:o,uploadedFiles:i,onRemoveFile:s,senderConfig:l={},recommandQuestions:c=[],fileUploadStatus:u=[]}={}){var W;const{badgeCounts:d}=W$(),g=wt(null),h=l.switchs||[],[v,m]=dt(()=>{const K={};return h.forEach(G=>{G.type==="checkbox"&&(K[G.name]=G.defaultValue??!1)}),K});ft(()=>{console.log(v,"checkboxStates"),t&&t("sender:configChange",{all:v})},[v]);const[p,b]=dt(e||"");ft(()=>{b(e||"")},[e]);const y=()=>{const K=g.current;if(K){K.style.height="auto";const G=144,U=K.scrollHeight;U<=G?(K.style.height=`${U}px`,K.style.overflowY="hidden"):(K.style.height=`${G}px`,K.style.overflowY="auto")}},x=K=>{b(K.target.value),t&&t("sender:change",K.target.value),y()},w=K=>{K.key==="Enter"&&!K.shiftKey&&(console.log("enter"),K.preventDefault(),t&&t("sender:send"))};ft(()=>{y()},[p]),ft(()=>{let K;try{K=typeof c=="string"?JSON.parse(c):c}catch{K=[]}},[c]);const C=Lt(()=>{if(c==null||c==="")return[];if(typeof c=="string")try{const K=JSON.parse(c);return Array.isArray(K)?K:[]}catch{return[]}return Array.isArray(c)?c:[]},[c]),[S,E]=dt(!1);ft(()=>{if(!C||C.length===0){E(!1);return}E(!1),setTimeout(()=>{E(!0)},0)},[C]),ft(()=>{if(!S)return;const K=document.querySelectorAll(".recommand-question-btn");K.forEach(G=>{const U=G;U.style.visibility="visible",U.style.opacity="0",U.style.transform="translateY(20px)"}),Rt.remove(K),Rt({targets:K,opacity:[0,1],translateY:[20,0],delay:Rt.stagger(120),duration:400,easing:"easeOutCubic",complete:()=>{K.forEach(G=>{const U=G;U.removeAttribute("style"),U.style.color=L})}})},[S,C]);const k=Lt(()=>u&&u.length>0?u:i||[],[u,i]),$=Lt(()=>p&&p.trim().length>0,[p]),O=Lt(()=>{const K=p&&p.trim().length>0,G=k&&k.length>0;return K||G},[p,k]),D=Lt(()=>{const K=O?[{icon:X.jsx(cv,{className:"w-[18px] h-[18px] text-gray-500 group-hover:text-gray-700"}),name:"clear",tip:"\u6E05\u7A7A\u8F93\u5165\u548C\u6587\u4EF6"}]:[],G=(l.actions||[]).map(U=>({...U,badgeCount:d[U.name]??U.badgeCount??0}));return[...K,...G]},[O,l.actions,d]),P=(W=n==null?void 0:n.theme)==null?void 0:W.colors,R=(P==null?void 0:P.primary)||"#007bff",N=(P==null?void 0:P.text)||"#343a40",I=(P==null?void 0:P.background)||"#ffffff",M=(P==null?void 0:P.border)||"#dee2e6",F=(P==null?void 0:P.background)||"#ffffff",j=(P==null?void 0:P.disabled)||"#808080",A=(P==null?void 0:P.disabledBackground)||"#F5F5F5",_=(P==null?void 0:P.error)||"#FF0000",L=(P==null?void 0:P.disabledText)||"#808080",z="rgba(255, 255, 255, 0.9)",T=(P==null?void 0:P.text)||"#000",H="dynamic-placeholder-style";return ft(()=>{const K=document.getElementById(H)||document.createElement("style");K.id=H,K.innerHTML=`
|
|
246
|
+
*/const uv=Wt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var dv={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},Mu={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},y$=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],Ui={CSS:{},springs:{}};function ur(e,t,n){return Math.min(Math.max(e,t),n)}function mo(e,t){return e.indexOf(t)>-1}function ss(e,t){return e.apply(null,t)}var Qe={arr:function(e){return Array.isArray(e)},obj:function(e){return mo(Object.prototype.toString.call(e),"Object")},pth:function(e){return Qe.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},inp:function(e){return e instanceof HTMLInputElement},dom:function(e){return e.nodeType||Qe.svg(e)},str:function(e){return typeof e=="string"},fnc:function(e){return typeof e=="function"},und:function(e){return typeof e>"u"},nil:function(e){return Qe.und(e)||e===null},hex:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},rgb:function(e){return/^rgb/.test(e)},hsl:function(e){return/^hsl/.test(e)},col:function(e){return Qe.hex(e)||Qe.rgb(e)||Qe.hsl(e)},key:function(e){return!dv.hasOwnProperty(e)&&!Mu.hasOwnProperty(e)&&e!=="targets"&&e!=="keyframes"}};function fv(e){var t=/\(([^)]+)\)/.exec(e);return t?t[1].split(",").map(function(n){return parseFloat(n)}):[]}function mv(e,t){var n=fv(e),r=ur(Qe.und(n[0])?1:n[0],.1,100),a=ur(Qe.und(n[1])?100:n[1],.1,100),o=ur(Qe.und(n[2])?10:n[2],.1,100),i=ur(Qe.und(n[3])?0:n[3],.1,100),l=Math.sqrt(a/r),s=o/(2*Math.sqrt(a*r)),c=s<1?l*Math.sqrt(1-s*s):0,u=1,d=s<1?(s*l+-i)/c:-i+l;function g(v){var m=t?t*v/1e3:v;return s<1?m=Math.exp(-m*s*l)*(u*Math.cos(c*m)+d*Math.sin(c*m)):m=(u+d*m)*Math.exp(-m*l),v===0||v===1?v:1-m}function h(){var v=Ui.springs[e];if(v)return v;for(var m=1/6,p=0,b=0;;)if(p+=m,g(p)===1){if(b++,b>=16)break}else b=0;var y=p*m*1e3;return Ui.springs[e]=y,y}return t?g:h}function b$(e){return e===void 0&&(e=10),function(t){return Math.ceil(ur(t,1e-6,1)*e)*(1/e)}}var x$=(function(){var e=11,t=1/(e-1);function n(u,d){return 1-3*d+3*u}function r(u,d){return 3*d-6*u}function a(u){return 3*u}function o(u,d,g){return((n(d,g)*u+r(d,g))*u+a(d))*u}function i(u,d,g){return 3*n(d,g)*u*u+2*r(d,g)*u+a(d)}function l(u,d,g,h,v){var m,p,b=0;do p=d+(g-d)/2,m=o(p,h,v)-u,m>0?g=p:d=p;while(Math.abs(m)>1e-7&&++b<10);return p}function s(u,d,g,h){for(var v=0;v<4;++v){var m=i(d,g,h);if(m===0)return d;var p=o(d,g,h)-u;d-=p/m}return d}function c(u,d,g,h){if(!(0<=u&&u<=1&&0<=g&&g<=1))return;var v=new Float32Array(e);if(u!==d||g!==h)for(var m=0;m<e;++m)v[m]=o(m*t,u,g);function p(b){for(var y=0,x=1,w=e-1;x!==w&&v[x]<=b;++x)y+=t;--x;var C=(b-v[x])/(v[x+1]-v[x]),S=y+C*t,E=i(S,u,g);return E>=.001?s(b,S,u,g):E===0?S:l(b,y,y+t,u,g)}return function(b){return u===d&&g===h||b===0||b===1?b:o(p(b),d,h)}}return c})(),pv=(function(){var e={linear:function(){return function(r){return r}}},t={Sine:function(){return function(r){return 1-Math.cos(r*Math.PI/2)}},Expo:function(){return function(r){return r?Math.pow(2,10*r-10):0}},Circ:function(){return function(r){return 1-Math.sqrt(1-r*r)}},Back:function(){return function(r){return r*r*(3*r-2)}},Bounce:function(){return function(r){for(var a,o=4;r<((a=Math.pow(2,--o))-1)/11;);return 1/Math.pow(4,3-o)-7.5625*Math.pow((a*3-2)/22-r,2)}},Elastic:function(r,a){r===void 0&&(r=1),a===void 0&&(a=.5);var o=ur(r,1,10),i=ur(a,.1,2);return function(l){return l===0||l===1?l:-o*Math.pow(2,10*(l-1))*Math.sin((l-1-i/(Math.PI*2)*Math.asin(1/o))*(Math.PI*2)/i)}}},n=["Quad","Cubic","Quart","Quint"];return n.forEach(function(r,a){t[r]=function(){return function(o){return Math.pow(o,a+2)}}}),Object.keys(t).forEach(function(r){var a=t[r];e["easeIn"+r]=a,e["easeOut"+r]=function(o,i){return function(l){return 1-a(o,i)(1-l)}},e["easeInOut"+r]=function(o,i){return function(l){return l<.5?a(o,i)(l*2)/2:1-a(o,i)(l*-2+2)/2}},e["easeOutIn"+r]=function(o,i){return function(l){return l<.5?(1-a(o,i)(1-l*2))/2:(a(o,i)(l*2-1)+1)/2}}}),e})();function Fu(e,t){if(Qe.fnc(e))return e;var n=e.split("(")[0],r=pv[n],a=fv(e);switch(n){case"spring":return mv(e,t);case"cubicBezier":return ss(x$,a);case"steps":return ss(b$,a);default:return ss(r,a)}}function gv(e){try{var t=document.querySelectorAll(e);return t}catch{return}}function $l(e,t){for(var n=e.length,r=arguments.length>=2?arguments[1]:void 0,a=[],o=0;o<n;o++)if(o in e){var i=e[o];t.call(r,i,o,e)&&a.push(i)}return a}function El(e){return e.reduce(function(t,n){return t.concat(Qe.arr(n)?El(n):n)},[])}function $f(e){return Qe.arr(e)?e:(Qe.str(e)&&(e=gv(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function Pu(e,t){return e.some(function(n){return n===t})}function Ru(e){var t={};for(var n in e)t[n]=e[n];return t}function Js(e,t){var n=Ru(e);for(var r in e)n[r]=t.hasOwnProperty(r)?t[r]:e[r];return n}function kl(e,t){var n=Ru(e);for(var r in t)n[r]=Qe.und(e[r])?t[r]:e[r];return n}function C$(e){var t=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(e);return t?"rgba("+t[1]+",1)":e}function w$(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,n=e.replace(t,function(l,s,c,u){return s+s+c+c+u+u}),r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n),a=parseInt(r[1],16),o=parseInt(r[2],16),i=parseInt(r[3],16);return"rgba("+a+","+o+","+i+",1)"}function S$(e){var t=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e),n=parseInt(t[1],10)/360,r=parseInt(t[2],10)/100,a=parseInt(t[3],10)/100,o=t[4]||1;function i(g,h,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?g+(h-g)*6*v:v<1/2?h:v<2/3?g+(h-g)*(2/3-v)*6:g}var l,s,c;if(r==0)l=s=c=a;else{var u=a<.5?a*(1+r):a+r-a*r,d=2*a-u;l=i(d,u,n+1/3),s=i(d,u,n),c=i(d,u,n-1/3)}return"rgba("+l*255+","+s*255+","+c*255+","+o+")"}function $$(e){if(Qe.rgb(e))return C$(e);if(Qe.hex(e))return w$(e);if(Qe.hsl(e))return S$(e)}function yr(e){var t=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);if(t)return t[1]}function E$(e){if(mo(e,"translate")||e==="perspective")return"px";if(mo(e,"rotate")||mo(e,"skew"))return"deg"}function Qs(e,t){return Qe.fnc(e)?e(t.target,t.id,t.total):e}function dr(e,t){return e.getAttribute(t)}function Au(e,t,n){var r=yr(t);if(Pu([n,"deg","rad","turn"],r))return t;var a=Ui.CSS[t+n];if(!Qe.und(a))return a;var o=100,i=document.createElement(e.tagName),l=e.parentNode&&e.parentNode!==document?e.parentNode:document.body;l.appendChild(i),i.style.position="absolute",i.style.width=o+n;var s=o/i.offsetWidth;l.removeChild(i);var c=s*parseFloat(t);return Ui.CSS[t+n]=c,c}function vv(e,t,n){if(t in e.style){var r=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),a=e.style[t]||getComputedStyle(e).getPropertyValue(r)||"0";return n?Au(e,a,n):a}}function Tu(e,t){if(Qe.dom(e)&&!Qe.inp(e)&&(!Qe.nil(dr(e,t))||Qe.svg(e)&&e[t]))return"attribute";if(Qe.dom(e)&&Pu(y$,t))return"transform";if(Qe.dom(e)&&t!=="transform"&&vv(e,t))return"css";if(e[t]!=null)return"object"}function hv(e){if(Qe.dom(e)){for(var t=e.style.transform||"",n=/(\w+)\(([^)]*)\)/g,r=new Map,a;a=n.exec(t);)r.set(a[1],a[2]);return r}}function k$(e,t,n,r){var a=mo(t,"scale")?1:0+E$(t),o=hv(e).get(t)||a;return n&&(n.transforms.list.set(t,o),n.transforms.last=t),r?Au(e,o,r):o}function ju(e,t,n,r){switch(Tu(e,t)){case"transform":return k$(e,t,r,n);case"css":return vv(e,t,n);case"attribute":return dr(e,t);default:return e[t]||0}}function _u(e,t){var n=/^(\*=|\+=|-=)/.exec(e);if(!n)return e;var r=yr(e)||0,a=parseFloat(t),o=parseFloat(e.replace(n[0],""));switch(n[0][0]){case"+":return a+o+r;case"-":return a-o+r;case"*":return a*o+r}}function yv(e,t){if(Qe.col(e))return $$(e);if(/\s/g.test(e))return e;var n=yr(e),r=n?e.substr(0,e.length-n.length):e;return t?r+t:r}function Bu(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function I$(e){return Math.PI*2*dr(e,"r")}function O$(e){return dr(e,"width")*2+dr(e,"height")*2}function N$(e){return Bu({x:dr(e,"x1"),y:dr(e,"y1")},{x:dr(e,"x2"),y:dr(e,"y2")})}function bv(e){for(var t=e.points,n=0,r,a=0;a<t.numberOfItems;a++){var o=t.getItem(a);a>0&&(n+=Bu(r,o)),r=o}return n}function D$(e){var t=e.points;return bv(e)+Bu(t.getItem(t.numberOfItems-1),t.getItem(0))}function xv(e){if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return I$(e);case"rect":return O$(e);case"line":return N$(e);case"polyline":return bv(e);case"polygon":return D$(e)}}function M$(e){var t=xv(e);return e.setAttribute("stroke-dasharray",t),t}function F$(e){for(var t=e.parentNode;Qe.svg(t)&&Qe.svg(t.parentNode);)t=t.parentNode;return t}function Cv(e,t){var n=t||{},r=n.el||F$(e),a=r.getBoundingClientRect(),o=dr(r,"viewBox"),i=a.width,l=a.height,s=n.viewBox||(o?o.split(" "):[0,0,i,l]);return{el:r,viewBox:s,x:s[0]/1,y:s[1]/1,w:i,h:l,vW:s[2],vH:s[3]}}function P$(e,t){var n=Qe.str(e)?gv(e)[0]:e,r=t||100;return function(a){return{property:a,el:n,svg:Cv(n),totalLength:xv(n)*(r/100)}}}function R$(e,t,n){function r(u){u===void 0&&(u=0);var d=t+u>=1?t+u:0;return e.el.getPointAtLength(d)}var a=Cv(e.el,e.svg),o=r(),i=r(-1),l=r(1),s=n?1:a.w/a.vW,c=n?1:a.h/a.vH;switch(e.property){case"x":return(o.x-a.x)*s;case"y":return(o.y-a.y)*c;case"angle":return Math.atan2(l.y-i.y,l.x-i.x)*180/Math.PI}}function Ef(e,t){var n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,r=yv(Qe.pth(e)?e.totalLength:e,t)+"";return{original:r,numbers:r.match(n)?r.match(n).map(Number):[0],strings:Qe.str(e)||t?r.split(n):[]}}function Lu(e){var t=e?El(Qe.arr(e)?e.map($f):$f(e)):[];return $l(t,function(n,r,a){return a.indexOf(n)===r})}function wv(e){var t=Lu(e);return t.map(function(n,r){return{target:n,id:r,total:t.length,transforms:{list:hv(n)}}})}function A$(e,t){var n=Ru(t);if(/^spring/.test(n.easing)&&(n.duration=mv(n.easing)),Qe.arr(e)){var r=e.length,a=r===2&&!Qe.obj(e[0]);a?e={value:e}:Qe.fnc(t.duration)||(n.duration=t.duration/r)}var o=Qe.arr(e)?e:[e];return o.map(function(i,l){var s=Qe.obj(i)&&!Qe.pth(i)?i:{value:i};return Qe.und(s.delay)&&(s.delay=l?0:t.delay),Qe.und(s.endDelay)&&(s.endDelay=l===o.length-1?t.endDelay:0),s}).map(function(i){return kl(i,n)})}function T$(e){for(var t=$l(El(e.map(function(o){return Object.keys(o)})),function(o){return Qe.key(o)}).reduce(function(o,i){return o.indexOf(i)<0&&o.push(i),o},[]),n={},r=function(o){var i=t[o];n[i]=e.map(function(l){var s={};for(var c in l)Qe.key(c)?c==i&&(s.value=l[c]):s[c]=l[c];return s})},a=0;a<t.length;a++)r(a);return n}function j$(e,t){var n=[],r=t.keyframes;r&&(t=kl(T$(r),t));for(var a in t)Qe.key(a)&&n.push({name:a,tweens:A$(t[a],e)});return n}function _$(e,t){var n={};for(var r in e){var a=Qs(e[r],t);Qe.arr(a)&&(a=a.map(function(o){return Qs(o,t)}),a.length===1&&(a=a[0])),n[r]=a}return n.duration=parseFloat(n.duration),n.delay=parseFloat(n.delay),n}function B$(e,t){var n;return e.tweens.map(function(r){var a=_$(r,t),o=a.value,i=Qe.arr(o)?o[1]:o,l=yr(i),s=ju(t.target,e.name,l,t),c=n?n.to.original:s,u=Qe.arr(o)?o[0]:c,d=yr(u)||yr(s),g=l||d;return Qe.und(i)&&(i=c),a.from=Ef(u,g),a.to=Ef(_u(i,u),g),a.start=n?n.end:0,a.end=a.start+a.delay+a.duration+a.endDelay,a.easing=Fu(a.easing,a.duration),a.isPath=Qe.pth(o),a.isPathTargetInsideSVG=a.isPath&&Qe.svg(t.target),a.isColor=Qe.col(a.from.original),a.isColor&&(a.round=1),n=a,a})}var Sv={css:function(e,t,n){return e.style[t]=n},attribute:function(e,t,n){return e.setAttribute(t,n)},object:function(e,t,n){return e[t]=n},transform:function(e,t,n,r,a){if(r.list.set(t,n),t===r.last||a){var o="";r.list.forEach(function(i,l){o+=l+"("+i+") "}),e.style.transform=o}}};function $v(e,t){var n=wv(e);n.forEach(function(r){for(var a in t){var o=Qs(t[a],r),i=r.target,l=yr(o),s=ju(i,a,l,r),c=l||yr(s),u=_u(yv(o,c),s),d=Tu(i,a);Sv[d](i,a,u,r.transforms,!0)}})}function L$(e,t){var n=Tu(e.target,t.name);if(n){var r=B$(t,e),a=r[r.length-1];return{type:n,property:t.name,animatable:e,tweens:r,duration:a.end,delay:r[0].delay,endDelay:a.endDelay}}}function z$(e,t){return $l(El(e.map(function(n){return t.map(function(r){return L$(n,r)})})),function(n){return!Qe.und(n)})}function Ev(e,t){var n=e.length,r=function(o){return o.timelineOffset?o.timelineOffset:0},a={};return a.duration=n?Math.max.apply(Math,e.map(function(o){return r(o)+o.duration})):t.duration,a.delay=n?Math.min.apply(Math,e.map(function(o){return r(o)+o.delay})):t.delay,a.endDelay=n?a.duration-Math.max.apply(Math,e.map(function(o){return r(o)+o.duration-o.endDelay})):t.endDelay,a}var kf=0;function H$(e){var t=Js(dv,e),n=Js(Mu,e),r=j$(n,e),a=wv(e.targets),o=z$(a,r),i=Ev(o,n),l=kf;return kf++,kl(t,{id:l,children:[],animatables:a,animations:o,duration:i.duration,delay:i.delay,endDelay:i.endDelay})}var er=[],kv=(function(){var e;function t(){!e&&(!If()||!Tt.suspendWhenDocumentHidden)&&er.length>0&&(e=requestAnimationFrame(n))}function n(a){for(var o=er.length,i=0;i<o;){var l=er[i];l.paused?(er.splice(i,1),o--):(l.tick(a),i++)}e=i>0?requestAnimationFrame(n):void 0}function r(){Tt.suspendWhenDocumentHidden&&(If()?e=cancelAnimationFrame(e):(er.forEach(function(a){return a._onDocumentVisibility()}),kv()))}return typeof document<"u"&&document.addEventListener("visibilitychange",r),t})();function If(){return!!document&&document.hidden}function Tt(e){e===void 0&&(e={});var t=0,n=0,r=0,a,o=0,i=null;function l(y){var x=window.Promise&&new Promise(function(w){return i=w});return y.finished=x,x}var s=H$(e);l(s);function c(){var y=s.direction;y!=="alternate"&&(s.direction=y!=="normal"?"normal":"reverse"),s.reversed=!s.reversed,a.forEach(function(x){return x.reversed=s.reversed})}function u(y){return s.reversed?s.duration-y:y}function d(){t=0,n=u(s.currentTime)*(1/Tt.speed)}function g(y,x){x&&x.seek(y-x.timelineOffset)}function h(y){if(s.reversePlayback)for(var x=o;x--;)g(y,a[x]);else for(var w=0;w<o;w++)g(y,a[w])}function v(y){for(var x=0,w=s.animations,C=w.length;x<C;){var S=w[x],E=S.animatable,k=S.tweens,$=k.length-1,O=k[$];$&&(O=$l(k,function(V){return y<V.end})[0]||O);for(var D=ur(y-O.start-O.delay,0,O.duration)/O.duration,P=isNaN(D)?1:O.easing(D),A=O.to.strings,N=O.round,I=[],M=O.to.numbers.length,F=void 0,R=0;R<M;R++){var T=void 0,_=O.to.numbers[R],B=O.from.numbers[R]||0;O.isPath?T=R$(O.value,P*_,O.isPathTargetInsideSVG):T=B+P*(_-B),N&&(O.isColor&&R>2||(T=Math.round(T*N)/N)),I.push(T)}var L=A.length;if(!L)F=I[0];else{F=A[0];for(var j=0;j<L;j++){var z=A[j+1],K=I[j];isNaN(K)||(z?F+=K+z:F+=K+" ")}}Sv[S.type](E.target,S.property,F,E.transforms),S.currentValue=F,x++}}function m(y){s[y]&&!s.passThrough&&s[y](s)}function p(){s.remaining&&s.remaining!==!0&&s.remaining--}function b(y){var x=s.duration,w=s.delay,C=x-s.endDelay,S=u(y);s.progress=ur(S/x*100,0,100),s.reversePlayback=S<s.currentTime,a&&h(S),!s.began&&s.currentTime>0&&(s.began=!0,m("begin")),!s.loopBegan&&s.currentTime>0&&(s.loopBegan=!0,m("loopBegin")),S<=w&&s.currentTime!==0&&v(0),(S>=C&&s.currentTime!==x||!x)&&v(x),S>w&&S<C?(s.changeBegan||(s.changeBegan=!0,s.changeCompleted=!1,m("changeBegin")),m("change"),v(S)):s.changeBegan&&(s.changeCompleted=!0,s.changeBegan=!1,m("changeComplete")),s.currentTime=ur(S,0,x),s.began&&m("update"),y>=x&&(n=0,p(),s.remaining?(t=r,m("loopComplete"),s.loopBegan=!1,s.direction==="alternate"&&c()):(s.paused=!0,s.completed||(s.completed=!0,m("loopComplete"),m("complete"),!s.passThrough&&"Promise"in window&&(i(),l(s)))))}return s.reset=function(){var y=s.direction;s.passThrough=!1,s.currentTime=0,s.progress=0,s.paused=!0,s.began=!1,s.loopBegan=!1,s.changeBegan=!1,s.completed=!1,s.changeCompleted=!1,s.reversePlayback=!1,s.reversed=y==="reverse",s.remaining=s.loop,a=s.children,o=a.length;for(var x=o;x--;)s.children[x].reset();(s.reversed&&s.loop!==!0||y==="alternate"&&s.loop===1)&&s.remaining++,v(s.reversed?s.duration:0)},s._onDocumentVisibility=d,s.set=function(y,x){return $v(y,x),s},s.tick=function(y){r=y,t||(t=r),b((r+(n-t))*Tt.speed)},s.seek=function(y){b(u(y))},s.pause=function(){s.paused=!0,d()},s.play=function(){s.paused&&(s.completed&&s.reset(),s.paused=!1,er.push(s),d(),kv())},s.reverse=function(){c(),s.completed=!s.reversed,d()},s.restart=function(){s.reset(),s.play()},s.remove=function(y){var x=Lu(y);Iv(x,s)},s.reset(),s.autoplay&&s.play(),s}function Of(e,t){for(var n=t.length;n--;)Pu(e,t[n].animatable.target)&&t.splice(n,1)}function Iv(e,t){var n=t.animations,r=t.children;Of(e,n);for(var a=r.length;a--;){var o=r[a],i=o.animations;Of(e,i),!i.length&&!o.children.length&&r.splice(a,1)}!n.length&&!r.length&&t.pause()}function V$(e){for(var t=Lu(e),n=er.length;n--;){var r=er[n];Iv(t,r)}}function K$(e,t){t===void 0&&(t={});var n=t.direction||"normal",r=t.easing?Fu(t.easing):null,a=t.grid,o=t.axis,i=t.from||0,l=i==="first",s=i==="center",c=i==="last",u=Qe.arr(e),d=parseFloat(u?e[0]:e),g=u?parseFloat(e[1]):0,h=yr(u?e[1]:e)||0,v=t.start||0+(u?d:0),m=[],p=0;return function(b,y,x){if(l&&(i=0),s&&(i=(x-1)/2),c&&(i=x-1),!m.length){for(var w=0;w<x;w++){if(!a)m.push(Math.abs(i-w));else{var C=s?(a[0]-1)/2:i%a[0],S=s?(a[1]-1)/2:Math.floor(i/a[0]),E=w%a[0],k=Math.floor(w/a[0]),$=C-E,O=S-k,D=Math.sqrt($*$+O*O);o==="x"&&(D=-$),o==="y"&&(D=-O),m.push(D)}p=Math.max.apply(Math,m)}r&&(m=m.map(function(A){return r(A/p)*p})),n==="reverse"&&(m=m.map(function(A){return o?A<0?A*-1:-A:Math.abs(p-A)}))}var P=u?(g-d)/p:d;return v+P*(Math.round(m[y]*100)/100)+h}}function W$(e){e===void 0&&(e={});var t=Tt(e);return t.duration=0,t.add=function(n,r){var a=er.indexOf(t),o=t.children;a>-1&&er.splice(a,1);function i(g){g.passThrough=!0}for(var l=0;l<o.length;l++)i(o[l]);var s=kl(n,Js(Mu,e));s.targets=s.targets||e.targets;var c=t.duration;s.autoplay=!1,s.direction=t.direction,s.timelineOffset=Qe.und(r)?c:_u(r,c),i(t),t.seek(s.timelineOffset);var u=Tt(s);i(u),o.push(u);var d=Ev(o,e);return t.delay=d.delay,t.endDelay=d.endDelay,t.duration=d.duration,t.seek(0),t.reset(),t.autoplay&&t.play(),t},t}Tt.version="3.2.1";Tt.speed=1;Tt.suspendWhenDocumentHidden=!0;Tt.running=er;Tt.remove=V$;Tt.get=ju;Tt.set=$v;Tt.convertPx=Au;Tt.path=P$;Tt.setDashoffset=M$;Tt.stagger=K$;Tt.timeline=W$;Tt.easing=Fu;Tt.penner=pv;Tt.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e};const q$=aa({badgeCounts:{},updateBadgeCount:()=>{}}),U$=()=>{const e=En(q$);if(!e)throw new Error("useBadge must be used within a BadgeProvider");return e};var Zs={exports:{}},Y$=Zs.exports,Nf;function G$(){return Nf||(Nf=1,(function(e,t){(function(n,r){e.exports=r()})(Y$,(function(){var n=1e3,r=6e4,a=36e5,o="millisecond",i="second",l="minute",s="hour",c="day",u="week",d="month",g="quarter",h="year",v="date",m="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var I=["th","st","nd","rd"],M=N%100;return"["+N+(I[(M-20)%10]||I[M]||I[0])+"]"}},x=function(N,I,M){var F=String(N);return!F||F.length>=I?N:""+Array(I+1-F.length).join(M)+N},w={s:x,z:function(N){var I=-N.utcOffset(),M=Math.abs(I),F=Math.floor(M/60),R=M%60;return(I<=0?"+":"-")+x(F,2,"0")+":"+x(R,2,"0")},m:function N(I,M){if(I.date()<M.date())return-N(M,I);var F=12*(M.year()-I.year())+(M.month()-I.month()),R=I.clone().add(F,d),T=M-R<0,_=I.clone().add(F+(T?-1:1),d);return+(-(F+(M-R)/(T?R-_:_-R))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:d,y:h,w:u,d:c,D:v,h:s,m:l,s:i,ms:o,Q:g}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},C="en",S={};S[C]=y;var E="$isDayjsObject",k=function(N){return N instanceof P||!(!N||!N[E])},$=function N(I,M,F){var R;if(!I)return C;if(typeof I=="string"){var T=I.toLowerCase();S[T]&&(R=T),M&&(S[T]=M,R=T);var _=I.split("-");if(!R&&_.length>1)return N(_[0])}else{var B=I.name;S[B]=I,R=B}return!F&&R&&(C=R),R||!F&&C},O=function(N,I){if(k(N))return N.clone();var M=typeof I=="object"?I:{};return M.date=N,M.args=arguments,new P(M)},D=w;D.l=$,D.i=k,D.w=function(N,I){return O(N,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var P=(function(){function N(M){this.$L=$(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[E]=!0}var I=N.prototype;return I.parse=function(M){this.$d=(function(F){var R=F.date,T=F.utc;if(R===null)return new Date(NaN);if(D.u(R))return new Date;if(R instanceof Date)return new Date(R);if(typeof R=="string"&&!/Z$/i.test(R)){var _=R.match(p);if(_){var B=_[2]-1||0,L=(_[7]||"0").substring(0,3);return T?new Date(Date.UTC(_[1],B,_[3]||1,_[4]||0,_[5]||0,_[6]||0,L)):new Date(_[1],B,_[3]||1,_[4]||0,_[5]||0,_[6]||0,L)}}return new Date(R)})(M),this.init()},I.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},I.$utils=function(){return D},I.isValid=function(){return this.$d.toString()!==m},I.isSame=function(M,F){var R=O(M);return this.startOf(F)<=R&&R<=this.endOf(F)},I.isAfter=function(M,F){return O(M)<this.startOf(F)},I.isBefore=function(M,F){return this.endOf(F)<O(M)},I.$g=function(M,F,R){return D.u(M)?this[F]:this.set(R,M)},I.unix=function(){return Math.floor(this.valueOf()/1e3)},I.valueOf=function(){return this.$d.getTime()},I.startOf=function(M,F){var R=this,T=!!D.u(F)||F,_=D.p(M),B=function(Z,Q){var Y=D.w(R.$u?Date.UTC(R.$y,Q,Z):new Date(R.$y,Q,Z),R);return T?Y:Y.endOf(c)},L=function(Z,Q){return D.w(R.toDate()[Z].apply(R.toDate("s"),(T?[0,0,0,0]:[23,59,59,999]).slice(Q)),R)},j=this.$W,z=this.$M,K=this.$D,V="set"+(this.$u?"UTC":"");switch(_){case h:return T?B(1,0):B(31,11);case d:return T?B(1,z):B(0,z+1);case u:var G=this.$locale().weekStart||0,U=(j<G?j+7:j)-G;return B(T?K-U:K+(6-U),z);case c:case v:return L(V+"Hours",0);case s:return L(V+"Minutes",1);case l:return L(V+"Seconds",2);case i:return L(V+"Milliseconds",3);default:return this.clone()}},I.endOf=function(M){return this.startOf(M,!1)},I.$set=function(M,F){var R,T=D.p(M),_="set"+(this.$u?"UTC":""),B=(R={},R[c]=_+"Date",R[v]=_+"Date",R[d]=_+"Month",R[h]=_+"FullYear",R[s]=_+"Hours",R[l]=_+"Minutes",R[i]=_+"Seconds",R[o]=_+"Milliseconds",R)[T],L=T===c?this.$D+(F-this.$W):F;if(T===d||T===h){var j=this.clone().set(v,1);j.$d[B](L),j.init(),this.$d=j.set(v,Math.min(this.$D,j.daysInMonth())).$d}else B&&this.$d[B](L);return this.init(),this},I.set=function(M,F){return this.clone().$set(M,F)},I.get=function(M){return this[D.p(M)]()},I.add=function(M,F){var R,T=this;M=Number(M);var _=D.p(F),B=function(z){var K=O(T);return D.w(K.date(K.date()+Math.round(z*M)),T)};if(_===d)return this.set(d,this.$M+M);if(_===h)return this.set(h,this.$y+M);if(_===c)return B(1);if(_===u)return B(7);var L=(R={},R[l]=r,R[s]=a,R[i]=n,R)[_]||1,j=this.$d.getTime()+M*L;return D.w(j,this)},I.subtract=function(M,F){return this.add(-1*M,F)},I.format=function(M){var F=this,R=this.$locale();if(!this.isValid())return R.invalidDate||m;var T=M||"YYYY-MM-DDTHH:mm:ssZ",_=D.z(this),B=this.$H,L=this.$m,j=this.$M,z=R.weekdays,K=R.months,V=R.meridiem,G=function(Q,Y,ee,ce){return Q&&(Q[Y]||Q(F,T))||ee[Y].slice(0,ce)},U=function(Q){return D.s(B%12||12,Q,"0")},Z=V||function(Q,Y,ee){var ce=Q<12?"AM":"PM";return ee?ce.toLowerCase():ce};return T.replace(b,(function(Q,Y){return Y||(function(ee){switch(ee){case"YY":return String(F.$y).slice(-2);case"YYYY":return D.s(F.$y,4,"0");case"M":return j+1;case"MM":return D.s(j+1,2,"0");case"MMM":return G(R.monthsShort,j,K,3);case"MMMM":return G(K,j);case"D":return F.$D;case"DD":return D.s(F.$D,2,"0");case"d":return String(F.$W);case"dd":return G(R.weekdaysMin,F.$W,z,2);case"ddd":return G(R.weekdaysShort,F.$W,z,3);case"dddd":return z[F.$W];case"H":return String(B);case"HH":return D.s(B,2,"0");case"h":return U(1);case"hh":return U(2);case"a":return Z(B,L,!0);case"A":return Z(B,L,!1);case"m":return String(L);case"mm":return D.s(L,2,"0");case"s":return String(F.$s);case"ss":return D.s(F.$s,2,"0");case"SSS":return D.s(F.$ms,3,"0");case"Z":return _}return null})(Q)||_.replace(":","")}))},I.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},I.diff=function(M,F,R){var T,_=this,B=D.p(F),L=O(M),j=(L.utcOffset()-this.utcOffset())*r,z=this-L,K=function(){return D.m(_,L)};switch(B){case h:T=K()/12;break;case d:T=K();break;case g:T=K()/3;break;case u:T=(z-j)/6048e5;break;case c:T=(z-j)/864e5;break;case s:T=z/a;break;case l:T=z/r;break;case i:T=z/n;break;default:T=z}return R?T:D.a(T)},I.daysInMonth=function(){return this.endOf(d).$D},I.$locale=function(){return S[this.$L]},I.locale=function(M,F){if(!M)return this.$L;var R=this.clone(),T=$(M,F,!0);return T&&(R.$L=T),R},I.clone=function(){return D.w(this.$d,this)},I.toDate=function(){return new Date(this.valueOf())},I.toJSON=function(){return this.isValid()?this.toISOString():null},I.toISOString=function(){return this.$d.toISOString()},I.toString=function(){return this.$d.toUTCString()},N})(),A=P.prototype;return O.prototype=A,[["$ms",o],["$s",i],["$m",l],["$H",s],["$W",c],["$M",d],["$y",h],["$D",v]].forEach((function(N){A[N[1]]=function(I){return this.$g(I,N[0],N[1])}})),O.extend=function(N,I){return N.$i||(N(I,P,O),N.$i=!0),O},O.locale=$,O.isDayjs=k,O.unix=function(N){return O(1e3*N)},O.en=S[C],O.Ls=S,O.p={},O}))})(Zs)),Zs.exports}var X$=G$();const Ov=lv(X$);function J$(e,t){var r;const n=((r=t==null?void 0:t.theme)==null?void 0:r.icons)||{};switch(e.toLowerCase()){case"docx":case"doc":return n.docx?X.jsx("img",{src:n.docx,alt:"docx",style:{width:20,height:20}}):X.jsx(Ut,{type:"rag/word",size:18});case"image":case"jpg":case"jpeg":case"png":case"gif":case"bmp":case"webp":case"svg":case"ico":return n.image?X.jsx("img",{src:n.image,alt:"image",style:{width:20,height:20}}):X.jsx(Ut,{type:"rag/pic",size:18});case"pptx":case"ppt":return n.pptx?X.jsx("img",{src:n.pptx,alt:"pptx",style:{width:20,height:20}}):X.jsx(Ut,{type:"rag/ppt",size:18});case"sheets":case"excel":case"xls":case"csv":case"xlsx":case"xlsm":case"xlsb":case"xltx":case"xltm":case"xlt":case"xlam":return n.sheets?X.jsx("img",{src:n.sheets,alt:"sheets",style:{width:20,height:20}}):X.jsx(Ut,{type:"rag/excel",size:18});case"pdf":return n.pdf?X.jsx("img",{src:n.pdf,alt:"pdf",style:{width:20,height:20}}):X.jsx(Ut,{type:"rag/pdf",size:18});case"txt":return n.txt?X.jsx("img",{src:n.txt,alt:"txt",style:{width:20,height:20}}):X.jsx(Ut,{type:"rag/txt",size:18});case"md":return n.md?X.jsx("img",{src:n.md,alt:"txt",style:{width:20,height:20}}):X.jsx(Ut,{type:"rag/document",size:18});case"json":return n.json?X.jsx("img",{src:n.json,alt:"json",style:{width:20,height:20}}):X.jsx(Ut,{type:"rag/json",size:18});case"html":case"htm":return n.html?X.jsx("img",{src:n.html,alt:"html",style:{width:20,height:20}}):X.jsx(Ut,{type:"rag/url",size:18});case"xml":default:return X.jsx(Ut,{type:"rag/file",size:18})}}const Q$=e=>e?e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/1024/1024).toFixed(1)}MB`:"",Z$=({fileName:e,fileSize:t,icon:n,statusText:r,statusColor:a="text-gray-400",statusIcon:o,onRemove:i,themeColors:l={},cardId:s,showRemove:c=!0,disabledRemove:u=!1,onRemoveWithAnim:d,extra:g,style:h})=>X.jsxs("div",{id:s,className:"group gap-x-2.5 items-center file-display-card relative flex w-[210px] bg-white border border-gray-200 rounded-md shadow-sm px-2 py-1 transition-all hover:shadow-md hover:border-blue-300",style:h,children:[X.jsx("div",{className:"pt-1",children:n}),X.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[X.jsxs("div",{className:"flex items-center justify-between gap-1",children:[X.jsx("span",{className:"text-[12px] font-medium truncate max-w-[120px]",title:e,children:e}),X.jsx("span",{className:"ml-1 text-[11px] text-gray-400",children:Q$(t)})]}),X.jsxs("div",{className:`text-[10px] mt-0.5 flex items-center gap-3 ${a}`,children:[o,X.jsx("span",{children:r})]})]}),g,c&&!u&&X.jsx("button",{className:"absolute top-0.5 right-0.5 opacity-0 group-hover:opacity-100 transition-opacity text-gray-300 hover:text-red-400 text-xs p-0.5 rounded-full bg-white shadow-sm z-10",onClick:()=>{d&&s?d(s):i&&i()},title:"\u79FB\u9664",style:{lineHeight:0,color:l.error||"#FF0000"},children:X.jsx(uv,{className:"w-3.5 h-3.5"})})]});function eE({uploadedFiles:e,onRemoveFile:t,eventsEmit:n,styles:r}){return mt(()=>{e.forEach((a,o)=>{a&&console.log("FilesDisplay currentStatus",a.status)})},[e]),mt(()=>{e.length>0&&e.every(a=>a.status==="finished")&&Tt({targets:".file-display-card",opacity:0,scale:.8,delay:Tt.stagger(100),duration:400,easing:"easeOutExpo",complete:()=>{n==null||n("files:finished_animation_complete")}})},[e,n]),X.jsx("div",{className:"flex overflow-x-auto gap-2 pb-2 px-1",children:e.filter(Boolean).map((a,o)=>{var g,h;if(!a||!a.file)return null;const i=a.name||a.file.name,l=(g=a.file)==null?void 0:g.size;let{status:s}=a;s==="finished"&&(s="done");const c={pending:{text:"\u5F85\u53D1\u9001",icon:null,color:"text-gray-400"},uploading:{text:"\u4E0A\u4F20\u4E2D",icon:X.jsx(Sf,{className:"w-3 h-3 animate-spin"}),color:"text-blue-500"},parsing:{text:"\u89E3\u6790\u4E2D",icon:X.jsx(Sf,{className:"w-3 h-3 animate-spin"}),color:"text-blue-500"},done:{text:"\u5DF2\u5C31\u7EEA",icon:X.jsx(u$,{className:"w-3 h-3"}),color:"text-green-500"},error:{text:"\u5931\u8D25",icon:X.jsx(c$,{className:"w-3 h-3"}),color:"text-red-500"}}[s||"pending"]||{text:"\u672A\u77E5",icon:null,color:"text-gray-400"},u=i.split(".").pop()||"",d=J$(u,r);return X.jsx(Z$,{cardId:`file-card-${o}`,fileName:i,fileSize:l,icon:d,statusText:c.text||"\u672A\u77E5",statusColor:c.color||"text-gray-400",statusIcon:c.icon||null,showRemove:s!=="parsing"&&s!=="uploading",onRemoveWithAnim:v=>{Tt({targets:`#${v}`,opacity:0,scale:.8,duration:300,easing:"easeOutExpo",complete:()=>{t==null||t(o)}})},themeColors:(h=r==null?void 0:r.theme)==null?void 0:h.colors},i+o)})})}function tE({checked:e,onChange:t,icon:n,children:r,styles:a,disabled:o}){var h,v,m,p,b,y,x,w,C,S,E,k,$,O;const i=((v=(h=a==null?void 0:a.theme)==null?void 0:h.colors)==null?void 0:v.primary)||"#00C26A",l=((p=(m=a==null?void 0:a.theme)==null?void 0:m.colors)==null?void 0:p.text)||"#343a40",s=((y=(b=a==null?void 0:a.theme)==null?void 0:b.colors)==null?void 0:y.background)||"#fff",c=((w=(x=a==null?void 0:a.theme)==null?void 0:x.colors)==null?void 0:w.border)||"#dee2e6",u=((S=(C=a==null?void 0:a.theme)==null?void 0:C.colors)==null?void 0:S.disabledBackground)||"#F5F5F5",d=((k=(E=a==null?void 0:a.theme)==null?void 0:E.colors)==null?void 0:k.disabledText)||"#808080",g=((O=($=a==null?void 0:a.theme)==null?void 0:$.colors)==null?void 0:O.disabled)||"#808080";return X.jsxs("button",{type:"button",onClick:()=>t(!e),disabled:o,className:"flex items-center gap-1 bg-white px-3 py-1 rounded-full border transition-all duration-200 text-xs select-none",style:{borderWidth:1.5,outline:"none",cursor:o?"not-allowed":"pointer",minWidth:0,background:o?u:e?i:"transparent",color:o?d:e?s:l,borderColor:o?g:e?i:c},children:[n,X.jsx("span",{children:r})]})}function nE({value:e,eventsEmit:t,styles:n,status:r,onUpload:a,onVoice:o,uploadedFiles:i,onRemoveFile:l,senderConfig:s={},recommandQuestions:c=[],fileUploadStatus:u=[]}={}){var K;const{badgeCounts:d}=U$(),g=St(null),h=s.switchs||[],[v,m]=ft(()=>{const V={};return h.forEach(G=>{G.type==="checkbox"&&(V[G.name]=G.defaultValue??!1)}),V});mt(()=>{console.log(v,"checkboxStates"),t&&t("sender:configChange",{all:v})},[v]);const[p,b]=ft(e||"");mt(()=>{b(e||"")},[e]);const y=()=>{const V=g.current;if(V){V.style.height="auto";const G=144,U=V.scrollHeight;U<=G?(V.style.height=`${U}px`,V.style.overflowY="hidden"):(V.style.height=`${G}px`,V.style.overflowY="auto")}},x=V=>{b(V.target.value),t&&t("sender:change",V.target.value),y()},w=V=>{V.key==="Enter"&&!V.shiftKey&&(console.log("enter"),V.preventDefault(),t&&t("sender:send"))};mt(()=>{y()},[p]),mt(()=>{let V;try{V=typeof c=="string"?JSON.parse(c):c}catch{V=[]}},[c]);const C=zt(()=>{if(c==null||c==="")return[];if(typeof c=="string")try{const V=JSON.parse(c);return Array.isArray(V)?V:[]}catch{return[]}return Array.isArray(c)?c:[]},[c]),[S,E]=ft(!1);mt(()=>{if(!C||C.length===0){E(!1);return}E(!1),setTimeout(()=>{E(!0)},0)},[C]),mt(()=>{if(!S)return;const V=document.querySelectorAll(".recommand-question-btn");V.forEach(G=>{const U=G;U.style.visibility="visible",U.style.opacity="0",U.style.transform="translateY(20px)"}),Tt.remove(V),Tt({targets:V,opacity:[0,1],translateY:[20,0],delay:Tt.stagger(120),duration:400,easing:"easeOutCubic",complete:()=>{V.forEach(G=>{const U=G;U.removeAttribute("style"),U.style.color=B})}})},[S,C]);const k=zt(()=>u&&u.length>0?u:i||[],[u,i]),$=zt(()=>p&&p.trim().length>0,[p]),O=zt(()=>{const V=p&&p.trim().length>0,G=k&&k.length>0;return V||G},[p,k]),D=zt(()=>{const V=O?[{icon:X.jsx(uv,{className:"w-[18px] h-[18px] text-gray-500 group-hover:text-gray-700"}),name:"clear",tip:"\u6E05\u7A7A\u8F93\u5165\u548C\u6587\u4EF6"}]:[],G=(s.actions||[]).map(U=>({...U,badgeCount:d[U.name]??U.badgeCount??0}));return[...V,...G]},[O,s.actions,d]),P=(K=n==null?void 0:n.theme)==null?void 0:K.colors,A=(P==null?void 0:P.primary)||"#007bff",N=(P==null?void 0:P.text)||"#343a40",I=(P==null?void 0:P.background)||"#ffffff",M=(P==null?void 0:P.border)||"#dee2e6",F=(P==null?void 0:P.background)||"#ffffff",R=(P==null?void 0:P.disabled)||"#808080",T=(P==null?void 0:P.disabledBackground)||"#F5F5F5",_=(P==null?void 0:P.error)||"#FF0000",B=(P==null?void 0:P.disabledText)||"#808080",L="rgba(255, 255, 255, 0.9)",j=(P==null?void 0:P.text)||"#000",z="dynamic-placeholder-style";return mt(()=>{const V=document.getElementById(z)||document.createElement("style");V.id=z,V.innerHTML=`
|
|
247
247
|
.dynamic-placeholder::placeholder {
|
|
248
|
-
color: ${
|
|
248
|
+
color: ${R};
|
|
249
249
|
opacity: 1; /* Firefox */
|
|
250
250
|
}
|
|
251
251
|
.dynamic-placeholder:-ms-input-placeholder { /* Internet Explorer 10-11 */
|
|
252
|
-
color: ${
|
|
252
|
+
color: ${R};
|
|
253
253
|
}
|
|
254
254
|
.dynamic-placeholder::-ms-input-placeholder { /* Microsoft Edge */
|
|
255
|
-
color: ${
|
|
255
|
+
color: ${R};
|
|
256
256
|
}
|
|
257
|
-
`,document.head.appendChild(
|
|
258
|
-
max-h-[180px] text-[14px] dynamic-placeholder`,style:{backgroundColor:"transparent",color:N}}),X.jsxs("div",{className:"flex items-center ml-2 space-x-1.5",children:[D.filter(
|
|
257
|
+
`,document.head.appendChild(V)},[R]),X.jsxs("div",{className:" absolute left-0 bottom-0 w-[90%] z-10 mx-[6.5%] px-5 bg-transparent!",children:[X.jsx("div",{className:"absolute inset-0 bg-transparent! pointer-events-none"}),X.jsx("div",{className:"absolute inset-0 bg-transparent! pointer-events-none"}),X.jsxs("div",{className:"relative max-w-[1000px] mx-auto p-3",children:[X.jsx("div",{className:"mb-3 flex flex-wrap gap-2 animate-fade-in-up",children:S&&C.map((V,G)=>X.jsx("button",{onClick:()=>{t&&t("sender:send_recommandQuestion",{content:V,clearFn:()=>{t&&t("sender:clear")}})},className:"recommand-question-btn shadow-sm px-3 py-1.5 bg-white cursor-pointer text-xs rounded-full transition-all duration-200 ease-in-out hover:shadow-lg",style:{visibility:"hidden",transform:"translateY(20px)",backgroundColor:L,color:B,border:"none"},onMouseEnter:U=>{U.currentTarget.style.color=j},onMouseOut:U=>{U.currentTarget.style.color=B},children:V},G))}),k.length>0&&X.jsx(eE,{styles:n,uploadedFiles:k,onRemoveFile:l||(()=>{}),eventsEmit:t}),X.jsxs("div",{className:"flex items-end w-full rounded-2xl shadow-sm",style:{backgroundColor:F,border:`1px solid ${M}`,padding:"0 12px 8px 12px"},children:[X.jsx("textarea",{ref:g,value:p,onChange:x,onKeyDown:w,rows:1,placeholder:"\u6211\u53EF\u4EE5\u9605\u8BFB\u77E5\u8BC6\u5E93\u7684\u8D44\u6599\u5E76\u4F7F\u7528\u81EA\u7136\u8BED\u8A00\u56DE\u7B54\u4F60\u7684\u95EE\u9898...",className:`flex-1 py-2 resize-none outline-none border-none min-h-[85px]
|
|
258
|
+
max-h-[180px] text-[14px] dynamic-placeholder`,style:{backgroundColor:"transparent",color:N}}),X.jsxs("div",{className:"flex items-center ml-2 space-x-1.5",children:[D.filter(V=>V.enabled!==!1).map((V,G)=>X.jsx(cy,{count:V.badgeCount,size:"small",style:{backgroundColor:A,color:I,fontWeight:500,fontSize:9,minWidth:16,height:16,lineHeight:"19px",borderRadius:9,marginLeft:8,display:"flex",alignItems:"center",justifyContent:"center",padding:"0 5px"},offset:[-2,10],showZero:!0,children:X.jsx("button",{type:"button",className:"relative w-8 h-8 flex items-center justify-center rounded-lg cursor-pointer group hover:bg-blue-50 active:bg-blue-100 transition-colors",style:{border:"none",background:"transparent",color:N,fontWeight:500,fontSize:15,outline:"none",padding:0,margin:0,transition:"background 0.2s"},title:V.tip||V.name,onClick:()=>{V.name==="clear"?t&&t("sender:clear"):t&&t(`sender:action_${V.name}`)},children:V.icon})},V.name||G)),X.jsx("div",{className:"ml-3 mr-3 h-5 w-px",style:{backgroundColor:M}}),X.jsx("div",{className:`
|
|
259
259
|
relative w-[85px] h-8 flex items-center justify-center rounded-lg group overflow-hidden shadow-sm
|
|
260
260
|
transition-all duration-200
|
|
261
261
|
${r==="processing"?"animate-pulse":""}
|
|
262
|
-
`,style:{cursor:r==="processing"||$?"pointer":"not-allowed",background:r==="processing"?`linear-gradient(to bottom right, ${_}, ${(P==null?void 0:P.error)||"#d9534f"})`:$?`linear-gradient(to bottom right, ${
|
|
263
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
264
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ot(e,t){return Nv(e)||sE(e,t)||Lu(e,t)||Dv()}function mt(e){"@babel/helpers - typeof";return mt=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},mt(e)}function lE(e,t){if(mt(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mv(e){var t=lE(e,"string");return mt(t)=="symbol"?t:t+""}function te(e,t,n){return(t=Mv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nf(Object(n),!0).forEach(function(r){te(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bo(e){for(var t=0,n,r=0,a=e.length;a>=4;++r,a-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&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 yr(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function cE(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var Df="data-rc-order",Mf="data-rc-priority",uE="rc-util-key",ec=new Map;function Fv(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):uE}function ks(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function dE(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function zu(e){return Array.from((ec.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function Pv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!yr())return null;var n=t.csp,r=t.prepend,a=t.priority,o=a===void 0?0:a,i=dE(r),s=i==="prependQueue",l=document.createElement("style");l.setAttribute(Df,i),s&&o&&l.setAttribute(Mf,"".concat(o)),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=e;var c=ks(t),u=c.firstChild;if(r){if(s){var d=(t.styles||zu(c)).filter(function(g){if(!["prepend","prependQueue"].includes(g.getAttribute(Df)))return!1;var h=Number(g.getAttribute(Mf)||0);return o>=h});if(d.length)return c.insertBefore(l,d[d.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function jv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=ks(t);return(t.styles||zu(n)).find(function(r){return r.getAttribute(Fv(t))===e})}function Rv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=jv(e,t);if(n){var r=ks(t);r.removeChild(n)}}function fE(e,t){var n=ec.get(e);if(!n||!cE(document,n)){var r=Pv("",t),a=r.parentNode;ec.set(e,a),e.removeChild(r)}}function Gr(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=ks(n),a=zu(r),o=ve(ve({},n),{},{styles:a});fE(r,o);var i=jv(t,o);if(i){var s,l;if((s=o.csp)!==null&&s!==void 0&&s.nonce&&i.nonce!==((l=o.csp)===null||l===void 0?void 0:l.nonce)){var c;i.nonce=(c=o.csp)===null||c===void 0?void 0:c.nonce}return i.innerHTML!==e&&(i.innerHTML=e),i}var u=Pv(e,o);return u.setAttribute(Fv(o),t),u}function mE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function pr(e,t){if(e==null)return{};var n,r,a=mE(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Av(e,t,n){var r=f.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}var tc={},pE=function(e){};function gE(e,t){}function vE(e,t){}function hE(){tc={}}function Tv(e,t,n){!t&&!tc[n]&&(e(!1,n),tc[n]=!0)}function zn(e,t){Tv(gE,e,t)}function yE(e,t){Tv(vE,e,t)}zn.preMessage=pE;zn.resetWarned=hE;zn.noteOnce=yE;function nc(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function a(o,i){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=r.has(o);if(zn(!l,"Warning: There may be circular references"),l)return!1;if(o===i)return!0;if(n&&s>1)return!1;r.add(o);var c=s+1;if(Array.isArray(o)){if(!Array.isArray(i)||o.length!==i.length)return!1;for(var u=0;u<o.length;u++)if(!a(o[u],i[u],c))return!1;return!0}if(o&&i&&mt(o)==="object"&&mt(i)==="object"){var d=Object.keys(o);return d.length!==Object.keys(i).length?!1:d.every(function(g){return a(o[g],i[g],c)})}return!1}return a(e,t)}function On(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ff(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Mv(r.key),r)}}function Nn(e,t,n){return t&&Ff(e.prototype,t),n&&Ff(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var bE="%";function rc(e){return e.join(bE)}var xE=(function(){function e(t){On(this,e),te(this,"instanceId",void 0),te(this,"cache",new Map),te(this,"extracted",new Set),this.instanceId=t}return Nn(e,[{key:"get",value:function(t){return this.opGet(rc(t))}},{key:"opGet",value:function(t){return this.cache.get(t)||null}},{key:"update",value:function(t,n){return this.opUpdate(rc(t),n)}},{key:"opUpdate",value:function(t,n){var r=this.cache.get(t),a=n(r);a===null?this.cache.delete(t):this.cache.set(t,a)}}]),e})(),xo="data-token-hash",fr="data-css-hash",Ir="__cssinjs_instance__";function CE(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(fr,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(a){a[Ir]=a[Ir]||e,a[Ir]===e&&document.head.insertBefore(a,n)});var r={};Array.from(document.querySelectorAll("style[".concat(fr,"]"))).forEach(function(a){var o=a.getAttribute(fr);if(r[o]){if(a[Ir]===e){var i;(i=a.parentNode)===null||i===void 0||i.removeChild(a)}}else r[o]=!0})}return new xE(e)}var Lo=f.createContext({hashPriority:"low",cache:CE(),defaultCache:!0});function xt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Co(e,t){return Co=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Co(e,t)}function Ta(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Co(e,t)}function wo(e){return wo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wo(e)}function Hu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hu=function(){return!!e})()}function wE(e,t){if(t&&(mt(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xt(e)}function _a(e){var t=Hu();return function(){var n,r=wo(e);if(t){var a=wo(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return wE(this,n)}}function SE(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Vu=(function(){function e(){On(this,e),te(this,"cache",void 0),te(this,"keys",void 0),te(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return Nn(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(t){var n,r,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o={map:this.cache};return t.forEach(function(i){if(!o)o=void 0;else{var s;o=(s=o)===null||s===void 0||(s=s.map)===null||s===void 0?void 0:s.get(i)}}),(n=o)!==null&&n!==void 0&&n.value&&a&&(o.value[1]=this.cacheCallTimes++),(r=o)===null||r===void 0?void 0:r.value}},{key:"get",value:function(t){var n;return(n=this.internalGet(t,!0))===null||n===void 0?void 0:n[0]}},{key:"has",value:function(t){return!!this.internalGet(t)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var a=this.keys.reduce(function(l,c){var u=ot(l,2),d=u[1];return r.internalGet(c)[1]<d?[c,r.internalGet(c)[1]]:l},[this.keys[0],this.cacheCallTimes]),o=ot(a,1),i=o[0];this.delete(i)}this.keys.push(t)}var s=this.cache;t.forEach(function(l,c){if(c===t.length-1)s.set(l,{value:[n,r.cacheCallTimes++]});else{var u=s.get(l);u?u.map||(u.map=new Map):s.set(l,{map:new Map}),s=s.get(l).map}})}},{key:"deleteByPath",value:function(t,n){var r=t.get(n[0]);if(n.length===1){var a;return r.map?t.set(n[0],{map:r.map}):t.delete(n[0]),(a=r.value)===null||a===void 0?void 0:a[0]}var o=this.deleteByPath(r.map,n.slice(1));return(!r.map||r.map.size===0)&&!r.value&&t.delete(n[0]),o}},{key:"delete",value:function(t){if(this.has(t))return this.keys=this.keys.filter(function(n){return!SE(n,t)}),this.deleteByPath(this.cache,t)}}]),e})();te(Vu,"MAX_CACHE_SIZE",20);te(Vu,"MAX_CACHE_OFFSET",5);var Pf=0,_v=(function(){function e(t){On(this,e),te(this,"derivatives",void 0),te(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=Pf,t.length===0&&(t.length>0,void 0),Pf+=1}return Nn(e,[{key:"getDerivativeToken",value:function(t){return this.derivatives.reduce(function(n,r){return r(t,n)},void 0)}}]),e})(),ll=new Vu;function ac(e){var t=Array.isArray(e)?e:[e];return ll.has(t)||ll.set(t,new _v(t)),ll.get(t)}var $E=new WeakMap,cl={};function EE(e,t){for(var n=$E,r=0;r<t.length;r+=1){var a=t[r];n.has(a)||n.set(a,new WeakMap),n=n.get(a)}return n.has(cl)||n.set(cl,e()),n.get(cl)}var jf=new WeakMap;function mo(e){var t=jf.get(e)||"";return t||(Object.keys(e).forEach(function(n){var r=e[n];t+=n,r instanceof _v?t+=r.id:r&&mt(r)==="object"?t+=mo(r):t+=r}),t=bo(t),jf.set(e,t)),t}function Rf(e,t){return bo("".concat(t,"_").concat(mo(e)))}var oc=yr();function Or(e){return typeof e=="number"?"".concat(e,"px"):e}var $i=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(t?"".concat(t,"-"):"").concat(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()},kE=function(e,t,n){return Object.keys(e).length?".".concat(t).concat(n!=null&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(e).map(function(r){var a=ot(r,2),o=a[0],i=a[1];return"".concat(o,":").concat(i,";")}).join(""),"}"):""},Bv=function(e,t,n){var r={},a={};return Object.entries(e).forEach(function(o){var i,s,l=ot(o,2),c=l[0],u=l[1];if(n!=null&&(i=n.preserve)!==null&&i!==void 0&&i[c])a[c]=u;else if((typeof u=="string"||typeof u=="number")&&!(n!=null&&(s=n.ignore)!==null&&s!==void 0&&s[c])){var d,g=$i(c,n==null?void 0:n.prefix);r[g]=typeof u=="number"&&!(n!=null&&(d=n.unitless)!==null&&d!==void 0&&d[c])?"".concat(u,"px"):String(u),a[c]="var(".concat(g,")")}}),[a,kE(r,t,{scope:n==null?void 0:n.scope})]},Af=yr()?f.useLayoutEffect:f.useEffect,IE=function(e,t){var n=f.useRef(!0);Af(function(){return e(n.current)},t),Af(function(){return n.current=!1,function(){n.current=!0}},[])},OE=ve({},f),Tf=OE.useInsertionEffect,NE=function(e,t,n){f.useMemo(e,n),IE(function(){return t(!0)},n)},DE=Tf?function(e,t,n){return Tf(function(){return e(),t()},n)}:NE,ME=ve({},f),FE=ME.useInsertionEffect,PE=function(e){var t=[],n=!1;function r(a){n||t.push(a)}return f.useEffect(function(){return n=!1,function(){n=!0,t.length&&t.forEach(function(a){return a()})}},e),r},jE=function(){return function(e){e()}},RE=typeof FE<"u"?PE:jE;function Ku(e,t,n,r,a){var o=f.useContext(Lo),i=o.cache,s=[e].concat(at(t)),l=rc(s),c=RE([l]),u=function(h){i.opUpdate(l,function(v){var m=v||[void 0,void 0],p=ot(m,2),b=p[0],y=b===void 0?0:b,x=p[1],w=x,C=w||n(),S=[y,C];return h?h(S):S})};f.useMemo(function(){u()},[l]);var d=i.opGet(l),g=d[1];return DE(function(){a==null||a(g)},function(h){return u(function(v){var m=ot(v,2),p=m[0],b=m[1];return h&&p===0&&(a==null||a(g)),[p+1,b]}),function(){i.opUpdate(l,function(v){var m=v||[],p=ot(m,2),b=p[0],y=b===void 0?0:b,x=p[1],w=y-1;return w===0?(c(function(){(h||!i.opGet(l))&&(r==null||r(x,!1))}),null):[y-1,x]})}},[l]),g}var AE={},TE="css",zr=new Map;function _E(e){zr.set(e,(zr.get(e)||0)+1)}function BE(e,t){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(xo,'="').concat(e,'"]'));n.forEach(function(r){if(r[Ir]===t){var a;(a=r.parentNode)===null||a===void 0||a.removeChild(r)}})}}var LE=0;function zE(e,t){zr.set(e,(zr.get(e)||0)-1);var n=new Set;zr.forEach(function(r,a){r<=0&&n.add(a)}),zr.size-n.size>LE&&n.forEach(function(r){BE(r,t),zr.delete(r)})}var HE=function(e,t,n,r){var a=n.getDerivativeToken(e),o=ve(ve({},a),t);return r&&(o=r(o)),o},VE="token";function KE(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=$n(Lo),a=r.cache.instanceId,o=r.container,i=n.salt,s=i===void 0?"":i,l=n.override,c=l===void 0?AE:l,u=n.formatToken,d=n.getComputedToken,g=n.cssVar,h=EE(function(){return Object.assign.apply(Object,[{}].concat(at(t)))},t),v=mo(h),m=mo(c),p=g?mo(g):"",b=Ku(VE,[s,e.id,v,m,p],function(){var y,x=d?d(h,c,e):HE(h,c,e,u),w=ve({},x),C="";if(g){var S=Bv(x,g.key,{prefix:g.prefix,ignore:g.ignore,unitless:g.unitless,preserve:g.preserve}),E=ot(S,2);x=E[0],C=E[1]}var k=Rf(x,s);x._tokenKey=k,w._tokenKey=Rf(w,s);var $=(y=g==null?void 0:g.key)!==null&&y!==void 0?y:k;x._themeKey=$,_E($);var O="".concat(TE,"-").concat(bo(k));return x._hashId=O,[x,O,w,C,(g==null?void 0:g.key)||""]},function(y){zE(y[0]._themeKey,a)},function(y){var x=ot(y,4),w=x[0],C=x[3];if(g&&C){var S=Gr(C,bo("css-variables-".concat(w._themeKey)),{mark:fr,prepend:"queue",attachTo:o,priority:-999});S[Ir]=a,S.setAttribute(xo,w._themeKey)}});return b}function vn(){return vn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vn.apply(null,arguments)}var WE={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},Lv="comm",zv="rule",Hv="decl",qE="@import",UE="@namespace",YE="@keyframes",GE="@layer",Vv=Math.abs,Wu=String.fromCharCode;function Kv(e){return e.trim()}function Ei(e,t,n){return e.replace(t,n)}function XE(e,t,n){return e.indexOf(t,n)}function Ea(e,t){return e.charCodeAt(t)|0}function Na(e,t,n){return e.slice(t,n)}function lr(e){return e.length}function JE(e){return e.length}function ai(e,t){return t.push(e),e}var Is=1,Da=1,Wv=0,Yn=0,Zt=0,Ba="";function qu(e,t,n,r,a,o,i,s){return{value:e,root:t,parent:n,type:r,props:a,children:o,line:Is,column:Da,length:i,return:"",siblings:s}}function QE(){return Zt}function ZE(){return Zt=Yn>0?Ea(Ba,--Yn):0,Da--,Zt===10&&(Da=1,Is--),Zt}function er(){return Zt=Yn<Wv?Ea(Ba,Yn++):0,Da++,Zt===10&&(Da=1,Is++),Zt}function Nr(){return Ea(Ba,Yn)}function ki(){return Yn}function Os(e,t){return Na(Ba,e,t)}function So(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ek(e){return Is=Da=1,Wv=lr(Ba=e),Yn=0,[]}function tk(e){return Ba="",e}function ul(e){return Kv(Os(Yn-1,ic(e===91?e+2:e===40?e+1:e)))}function nk(e){for(;(Zt=Nr())&&Zt<33;)er();return So(e)>2||So(Zt)>3?"":" "}function rk(e,t){for(;--t&&er()&&!(Zt<48||Zt>102||Zt>57&&Zt<65||Zt>70&&Zt<97););return Os(e,ki()+(t<6&&Nr()==32&&er()==32))}function ic(e){for(;er();)switch(Zt){case e:return Yn;case 34:case 39:e!==34&&e!==39&&ic(Zt);break;case 40:e===41&&ic(e);break;case 92:er();break}return Yn}function ak(e,t){for(;er()&&e+Zt!==57&&!(e+Zt===84&&Nr()===47););return"/*"+Os(t,Yn-1)+"*"+Wu(e===47?e:er())}function ok(e){for(;!So(Nr());)er();return Os(e,Yn)}function ik(e){return tk(Ii("",null,null,null,[""],e=ek(e),0,[0],e))}function Ii(e,t,n,r,a,o,i,s,l){for(var c=0,u=0,d=i,g=0,h=0,v=0,m=1,p=1,b=1,y=0,x="",w=a,C=o,S=r,E=x;p;)switch(v=y,y=er()){case 40:if(v!=108&&Ea(E,d-1)==58){XE(E+=Ei(ul(y),"&","&\f"),"&\f",Vv(c?s[c-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:E+=ul(y);break;case 9:case 10:case 13:case 32:E+=nk(v);break;case 92:E+=rk(ki()-1,7);continue;case 47:switch(Nr()){case 42:case 47:ai(sk(ak(er(),ki()),t,n,l),l),(So(v||1)==5||So(Nr()||1)==5)&&lr(E)&&Na(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*m:s[c++]=lr(E)*b;case 125*m:case 59:case 0:switch(y){case 0:case 125:p=0;case 59+u:b==-1&&(E=Ei(E,/\f/g,"")),h>0&&(lr(E)-d||m===0&&v===47)&&ai(h>32?Bf(E+";",r,n,d-1,l):Bf(Ei(E," ","")+";",r,n,d-2,l),l);break;case 59:E+=";";default:if(ai(S=_f(E,t,n,c,u,a,s,x,w=[],C=[],d,o),o),y===123)if(u===0)Ii(E,t,S,S,w,o,d,s,C);else{switch(g){case 99:if(Ea(E,3)===110)break;case 108:if(Ea(E,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Ii(e,S,S,r&&ai(_f(e,S,S,0,0,a,s,x,a,w=[],d,C),C),a,C,d,s,r?w:C):Ii(E,S,S,S,[""],C,0,s,C)}}c=u=h=0,m=b=1,x=E="",d=i;break;case 58:d=1+lr(E),h=v;default:if(m<1){if(y==123)--m;else if(y==125&&m++==0&&ZE()==125)continue}switch(E+=Wu(y),y*m){case 38:b=u>0?1:(E+="\f",-1);break;case 44:s[c++]=(lr(E)-1)*b,b=1;break;case 64:Nr()===45&&(E+=ul(er())),g=Nr(),u=d=lr(x=E+=ok(ki())),y++;break;case 45:v===45&&lr(E)==2&&(m=0)}}return o}function _f(e,t,n,r,a,o,i,s,l,c,u,d){for(var g=a-1,h=a===0?o:[""],v=JE(h),m=0,p=0,b=0;m<r;++m)for(var y=0,x=Na(e,g+1,g=Vv(p=i[m])),w=e;y<v;++y)(w=Kv(p>0?h[y]+" "+x:Ei(x,/&\f/g,h[y])))&&(l[b++]=w);return qu(e,t,n,a===0?zv:s,l,c,u,d)}function sk(e,t,n,r){return qu(e,t,n,Lv,Wu(QE()),Na(e,2,-2),0,r)}function Bf(e,t,n,r,a){return qu(e,t,n,Hv,Na(e,0,r),Na(e,r+1,-1),r,a)}function sc(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function lk(e,t,n,r){switch(e.type){case GE:if(e.children.length)break;case qE:case UE:case Hv:return e.return=e.return||e.value;case Lv:return"";case YE:return e.return=e.value+"{"+sc(e.children,r)+"}";case zv:if(!lr(e.value=e.props.join(",")))return""}return lr(n=sc(e.children,r))?e.return=e.value+"{"+n+"}":""}var Lf="data-ant-cssinjs-cache-path",qv="_FILE_STYLE__",Xr,Uv=!0;function ck(){if(!Xr&&(Xr={},yr())){var e=document.createElement("div");e.className=Lf,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(a){var o=a.split(":"),i=ot(o,2),s=i[0],l=i[1];Xr[s]=l});var n=document.querySelector("style[".concat(Lf,"]"));if(n){var r;Uv=!1,(r=n.parentNode)===null||r===void 0||r.removeChild(n)}document.body.removeChild(e)}}function uk(e){return ck(),!!Xr[e]}function dk(e){var t=Xr[e],n=null;if(t&&yr())if(Uv)n=qv;else{var r=document.querySelector("style[".concat(fr,'="').concat(Xr[e],'"]'));r?n=r.innerHTML:delete Xr[e]}return[n,t]}var fk="_skip_check_",Yv="_multi_value_";function dl(e){var t=sc(ik(e),lk);return t.replace(/\{%%%\:[^;];}/g,";")}function mk(e){return mt(e)==="object"&&e&&(fk in e||Yv in e)}function zf(e,t,n){if(!t)return e;var r=".".concat(t),a=n==="low"?":where(".concat(r,")"):r,o=e.split(",").map(function(i){var s,l=i.trim().split(/\s+/),c=l[0]||"",u=((s=c.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return c="".concat(u).concat(a).concat(c.slice(u.length)),[c].concat(at(l.slice(1))).join(" ")});return o.join(",")}var pk=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},a=r.root,o=r.injectHash,i=r.parentSelectors,s=n.hashId,l=n.layer;n.path;var c=n.hashPriority,u=n.transformers,d=u===void 0?[]:u;n.linters;var g="",h={};function v(b){var y=b.getName(s);if(!h[y]){var x=e(b.style,n,{root:!1,parentSelectors:i}),w=ot(x,1),C=w[0];h[y]="@keyframes ".concat(b.getName(s)).concat(C)}}function m(b){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return b.forEach(function(x){Array.isArray(x)?m(x,y):x&&y.push(x)}),y}var p=m(Array.isArray(t)?t:[t]);return p.forEach(function(b){var y=typeof b=="string"&&!a?{}:b;if(typeof y=="string")g+="".concat(y,`
|
|
265
|
-
`);else if(y._keyframe)v(y);else{var x=d.reduce(function(w,C){var S;return(C==null||(S=C.visit)===null||S===void 0?void 0:S.call(C,w))||w},y);Object.keys(x).forEach(function(w){var C=x[w];if(
|
|
266
|
-
`))):g="{".concat(g,"}"),[g,h]};function
|
|
262
|
+
`,style:{cursor:r==="processing"||$?"pointer":"not-allowed",background:r==="processing"?`linear-gradient(to bottom right, ${_}, ${(P==null?void 0:P.error)||"#d9534f"})`:$?`linear-gradient(to bottom right, ${A}, ${(P==null?void 0:P.primary)||"#0275d8"})`:T},onClick:()=>{r==="processing"?t&&t("sender:stop",{}):$&&t&&t("sender:send")},title:r==="processing"?"\u505C\u6B62\u5F53\u524D\u5BF9\u8BDD":"\u53D1\u9001",children:X.jsx("div",{className:"relative flex items-center gap-x-1 font-medium",style:{color:!$&&r!=="processing"?B:I},children:r==="processing"?X.jsxs(X.Fragment,{children:[X.jsx(f$,{className:"w-[18px] h-[18px]"}),X.jsx("span",{className:"ml-1 text-[13px]",children:"\u505C\u6B62"})]}):X.jsxs(X.Fragment,{children:[X.jsx(g$,{size:12}),X.jsx("span",{className:"ml-1 text-[13px]",children:"\u53D1\u9001"})]})})})]})]}),X.jsxs("div",{className:"mt-2 pt-2 pb-3 px-1 flex items-center justify-between ",children:[X.jsx("span",{className:"text-[10px]",style:{color:R},children:"\u652F\u6301\u62D6\u62FD\u6216\u70B9\u51FB\u4E0A\u4F20PDF\u3001Word\u3001\u56FE\u7247\u7B49\u6587\u4EF6"}),X.jsx("div",{className:"flex items-center gap-4",children:h.filter(V=>V.enabled!==!1).map(V=>X.jsx(tE,{styles:n,checked:v[V.name],disabled:!V.enabled,onChange:G=>{m(U=>({...U,[V.name]:G}))},icon:V.icon,children:V.label},V.name))})]})]})]})}function rE({content:e,time:t,sessionContext:n,eventsEmit:r}){const a=()=>{r==null||r("action_retry",{content:e,sessionContext:n})};return X.jsxs("div",{className:"flex items-start mb-6 animate-fadeIn w-full text-wrap",children:[X.jsx("div",{className:"w-8 h-8 rounded-full bg-gradient-to-r from-blue-400 to-blue-500 flex items-center justify-center mr-3 shadow-sm",children:X.jsx("span",{className:"text-white text-xs",children:"\u6211"})}),X.jsx("div",{className:"flex-1",children:X.jsxs("div",{className:"flex-col",children:[X.jsx("div",{className:"text-xs text-gray-400 mb-3",children:Ov(t).format("YYYY-MM-DD HH:mm:ss")}),X.jsx("div",{className:"bg-gradient-to-r from-blue-50 to-blue-100 rounded-lg p-4 inline-block max-w-[80%] shadow-sm relative prose prose-sm",children:X.jsx("span",{className:"text-gray-700 break-words",children:e})}),X.jsx("div",{className:"w-full mt-2 actions-btns flex py-2 items-center justify-end gap-2 px-2",children:X.jsxs("button",{className:"flex items-center gap-1 text-sm text-gray-500 hover:text-blue-700",onClick:a,title:"\u91CD\u53D1",children:[X.jsx(p$,{className:"w-4 h-4"}),X.jsx("span",{className:"hidden sm:inline",children:"\u91CD\u53D1"})]})})]})})]})}function aE({content:e,time:t,sessionContext:n,eventsEmit:r,feedbackResult:a}){const o=s=>{r==null||r("action_copy:click",{content:e,event:s})},i=()=>{r==null||r("action_thumbsup",{result:a,sessionContext:n})},l=()=>{r==null||r("action_thumbsdown",{content:e,sessionContext:n})};return X.jsxs("div",{className:"flex items-start mb-6 animate-fadeIn w-full text-wrap",children:[X.jsx("div",{className:"w-8 h-8 rounded-full bg-gradient-to-r from-purple-400 to-purple-500 flex items-center justify-center mr-3 shadow-sm",children:X.jsx("span",{className:"text-white w-8 h-8 flex items-center justify-center text-xs",children:"AI"})}),X.jsx("div",{className:"flex-1 w-[calc(100%-40px)]",children:X.jsxs("div",{className:"flex flex-col w-full relative",children:[X.jsx("div",{className:"text-xs text-gray-400 mb-3",children:Ov(t).format("YYYY-MM-DD HH:mm:ss")}),X.jsx("div",{className:"bg-white rounded-lg shadow-md w-full overflow-hidden border border-gray-100 p-4 relative prose prose-sm",children:X.jsx("span",{className:"text-gray-800 w-full leading-relaxed break-words",children:e})}),X.jsxs("div",{className:"w-full mt-2 actions-btns flex py-2 items-center justify-end gap-2 px-2",children:[X.jsxs("button",{className:"flex items-center gap-1 text-sm text-gray-500 hover:text-blue-700",onClick:o,title:"\u590D\u5236",children:[X.jsx(m$,{className:"w-4 h-4"}),X.jsx("span",{className:"hidden sm:inline",children:"\u590D\u5236"})]}),X.jsxs("button",{className:`flex items-center gap-1 text-sm text-gray-500 hover:text-blue-700 ${a===1?"text-blue-700":""}`,onClick:i,title:"\u70B9\u8D5E",children:[X.jsx(h$,{className:"w-4 h-4"}),X.jsx("span",{className:"hidden sm:inline",children:"\u8D5E"})]}),X.jsxs("button",{className:`flex items-center gap-1 text-sm text-gray-500 hover:text-blue-700 ${a===0?"text-blue-700":""}`,onClick:l,title:"\u70B9\u8E29",children:[X.jsx(v$,{className:"w-4 h-4"}),X.jsx("span",{className:"hidden sm:inline",children:"\u8E29"})]})]})]})})]})}function oE({messages:e=[],renderAiChatBox:t,renderUserChatBox:n,sessionContext:r,status:a,eventsEmit:o}){const i=St(null);return X.jsxs("div",{style:{direction:"rtl",transform:"rotate(180deg)"},className:" max-w-[1000px] min-w-[650px] mx-auto",children:[e.map((l,s)=>X.jsx("div",{className:"mb-6",children:l.istype==="user"?n?X.jsx("div",{style:{direction:"ltr"},children:n(l,s)}):X.jsx("div",{style:{direction:"ltr"},children:X.jsx(rE,{...l,sessionContext:r,eventsEmit:o})}):t?X.jsx("div",{style:{direction:"ltr"},children:t(l,s)}):X.jsx("div",{style:{direction:"ltr"},children:X.jsx(aE,{...l,sessionContext:r,eventsEmit:o})})},l.istype==="user"?l.queryId:"relatedTo-"+l.queryId)),X.jsx("div",{ref:i})]})}function ec(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function iE(e){if(Array.isArray(e))return ec(e)}function Nv(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zu(e,t){if(e){if(typeof e=="string")return ec(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ec(e,t):void 0}}function lE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
263
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ot(e){return iE(e)||Nv(e)||zu(e)||lE()}const sE=be.createContext({});function Dv(e){if(Array.isArray(e))return e}function cE(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,o,i,l=[],s=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(u){c=!0,a=u}finally{try{if(!s&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw a}}return l}}function Mv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
264
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function it(e,t){return Dv(e)||cE(e,t)||zu(e,t)||Mv()}function pt(e){"@babel/helpers - typeof";return pt=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},pt(e)}function uE(e,t){if(pt(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pt(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fv(e){var t=uE(e,"string");return pt(t)=="symbol"?t:t+""}function te(e,t,n){return(t=Fv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Df(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Df(Object(n),!0).forEach(function(r){te(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Df(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xo(e){for(var t=0,n,r=0,a=e.length;a>=4;++r,a-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&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 br(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function dE(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var Mf="data-rc-order",Ff="data-rc-priority",fE="rc-util-key",tc=new Map;function Pv(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):fE}function Il(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function mE(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Hu(e){return Array.from((tc.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function Rv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!br())return null;var n=t.csp,r=t.prepend,a=t.priority,o=a===void 0?0:a,i=mE(r),l=i==="prependQueue",s=document.createElement("style");s.setAttribute(Mf,i),l&&o&&s.setAttribute(Ff,"".concat(o)),n!=null&&n.nonce&&(s.nonce=n==null?void 0:n.nonce),s.innerHTML=e;var c=Il(t),u=c.firstChild;if(r){if(l){var d=(t.styles||Hu(c)).filter(function(g){if(!["prepend","prependQueue"].includes(g.getAttribute(Mf)))return!1;var h=Number(g.getAttribute(Ff)||0);return o>=h});if(d.length)return c.insertBefore(s,d[d.length-1].nextSibling),s}c.insertBefore(s,u)}else c.appendChild(s);return s}function Av(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Il(t);return(t.styles||Hu(n)).find(function(r){return r.getAttribute(Pv(t))===e})}function Tv(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=Av(e,t);if(n){var r=Il(t);r.removeChild(n)}}function pE(e,t){var n=tc.get(e);if(!n||!dE(document,n)){var r=Rv("",t),a=r.parentNode;tc.set(e,a),e.removeChild(r)}}function Xr(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=Il(n),a=Hu(r),o=ve(ve({},n),{},{styles:a});pE(r,o);var i=Av(t,o);if(i){var l,s;if((l=o.csp)!==null&&l!==void 0&&l.nonce&&i.nonce!==((s=o.csp)===null||s===void 0?void 0:s.nonce)){var c;i.nonce=(c=o.csp)===null||c===void 0?void 0:c.nonce}return i.innerHTML!==e&&(i.innerHTML=e),i}var u=Rv(e,o);return u.setAttribute(Pv(o),t),u}function gE(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function gr(e,t){if(e==null)return{};var n,r,a=gE(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function jv(e,t,n){var r=f.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}var nc={},vE=function(e){};function hE(e,t){}function yE(e,t){}function bE(){nc={}}function _v(e,t,n){!t&&!nc[n]&&(e(!1,n),nc[n]=!0)}function Hn(e,t){_v(hE,e,t)}function xE(e,t){_v(yE,e,t)}Hn.preMessage=vE;Hn.resetWarned=bE;Hn.noteOnce=xE;function rc(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function a(o,i){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,s=r.has(o);if(Hn(!s,"Warning: There may be circular references"),s)return!1;if(o===i)return!0;if(n&&l>1)return!1;r.add(o);var c=l+1;if(Array.isArray(o)){if(!Array.isArray(i)||o.length!==i.length)return!1;for(var u=0;u<o.length;u++)if(!a(o[u],i[u],c))return!1;return!0}if(o&&i&&pt(o)==="object"&&pt(i)==="object"){var d=Object.keys(o);return d.length!==Object.keys(i).length?!1:d.every(function(g){return a(o[g],i[g],c)})}return!1}return a(e,t)}function Nn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fv(r.key),r)}}function Dn(e,t,n){return t&&Pf(e.prototype,t),n&&Pf(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var CE="%";function ac(e){return e.join(CE)}var wE=(function(){function e(t){Nn(this,e),te(this,"instanceId",void 0),te(this,"cache",new Map),te(this,"extracted",new Set),this.instanceId=t}return Dn(e,[{key:"get",value:function(t){return this.opGet(ac(t))}},{key:"opGet",value:function(t){return this.cache.get(t)||null}},{key:"update",value:function(t,n){return this.opUpdate(ac(t),n)}},{key:"opUpdate",value:function(t,n){var r=this.cache.get(t),a=n(r);a===null?this.cache.delete(t):this.cache.set(t,a)}}]),e})(),Co="data-token-hash",mr="data-css-hash",Or="__cssinjs_instance__";function SE(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(mr,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(a){a[Or]=a[Or]||e,a[Or]===e&&document.head.insertBefore(a,n)});var r={};Array.from(document.querySelectorAll("style[".concat(mr,"]"))).forEach(function(a){var o=a.getAttribute(mr);if(r[o]){if(a[Or]===e){var i;(i=a.parentNode)===null||i===void 0||i.removeChild(a)}}else r[o]=!0})}return new wE(e)}var zo=f.createContext({hashPriority:"low",cache:SE(),defaultCache:!0});function Ct(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wo(e,t){return wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},wo(e,t)}function _a(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wo(e,t)}function So(e){return So=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},So(e)}function Vu(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Vu=function(){return!!e})()}function $E(e,t){if(t&&(pt(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ct(e)}function Ba(e){var t=Vu();return function(){var n,r=So(e);if(t){var a=So(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return $E(this,n)}}function EE(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Ku=(function(){function e(){Nn(this,e),te(this,"cache",void 0),te(this,"keys",void 0),te(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return Dn(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(t){var n,r,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o={map:this.cache};return t.forEach(function(i){if(!o)o=void 0;else{var l;o=(l=o)===null||l===void 0||(l=l.map)===null||l===void 0?void 0:l.get(i)}}),(n=o)!==null&&n!==void 0&&n.value&&a&&(o.value[1]=this.cacheCallTimes++),(r=o)===null||r===void 0?void 0:r.value}},{key:"get",value:function(t){var n;return(n=this.internalGet(t,!0))===null||n===void 0?void 0:n[0]}},{key:"has",value:function(t){return!!this.internalGet(t)}},{key:"set",value:function(t,n){var r=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var a=this.keys.reduce(function(s,c){var u=it(s,2),d=u[1];return r.internalGet(c)[1]<d?[c,r.internalGet(c)[1]]:s},[this.keys[0],this.cacheCallTimes]),o=it(a,1),i=o[0];this.delete(i)}this.keys.push(t)}var l=this.cache;t.forEach(function(s,c){if(c===t.length-1)l.set(s,{value:[n,r.cacheCallTimes++]});else{var u=l.get(s);u?u.map||(u.map=new Map):l.set(s,{map:new Map}),l=l.get(s).map}})}},{key:"deleteByPath",value:function(t,n){var r=t.get(n[0]);if(n.length===1){var a;return r.map?t.set(n[0],{map:r.map}):t.delete(n[0]),(a=r.value)===null||a===void 0?void 0:a[0]}var o=this.deleteByPath(r.map,n.slice(1));return(!r.map||r.map.size===0)&&!r.value&&t.delete(n[0]),o}},{key:"delete",value:function(t){if(this.has(t))return this.keys=this.keys.filter(function(n){return!EE(n,t)}),this.deleteByPath(this.cache,t)}}]),e})();te(Ku,"MAX_CACHE_SIZE",20);te(Ku,"MAX_CACHE_OFFSET",5);var Rf=0,Bv=(function(){function e(t){Nn(this,e),te(this,"derivatives",void 0),te(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=Rf,t.length===0&&(t.length>0,void 0),Rf+=1}return Dn(e,[{key:"getDerivativeToken",value:function(t){return this.derivatives.reduce(function(n,r){return r(t,n)},void 0)}}]),e})(),cs=new Ku;function oc(e){var t=Array.isArray(e)?e:[e];return cs.has(t)||cs.set(t,new Bv(t)),cs.get(t)}var kE=new WeakMap,us={};function IE(e,t){for(var n=kE,r=0;r<t.length;r+=1){var a=t[r];n.has(a)||n.set(a,new WeakMap),n=n.get(a)}return n.has(us)||n.set(us,e()),n.get(us)}var Af=new WeakMap;function po(e){var t=Af.get(e)||"";return t||(Object.keys(e).forEach(function(n){var r=e[n];t+=n,r instanceof Bv?t+=r.id:r&&pt(r)==="object"?t+=po(r):t+=r}),t=xo(t),Af.set(e,t)),t}function Tf(e,t){return xo("".concat(t,"_").concat(po(e)))}var ic=br();function Nr(e){return typeof e=="number"?"".concat(e,"px"):e}var Ei=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(t?"".concat(t,"-"):"").concat(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()},OE=function(e,t,n){return Object.keys(e).length?".".concat(t).concat(n!=null&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(e).map(function(r){var a=it(r,2),o=a[0],i=a[1];return"".concat(o,":").concat(i,";")}).join(""),"}"):""},Lv=function(e,t,n){var r={},a={};return Object.entries(e).forEach(function(o){var i,l,s=it(o,2),c=s[0],u=s[1];if(n!=null&&(i=n.preserve)!==null&&i!==void 0&&i[c])a[c]=u;else if((typeof u=="string"||typeof u=="number")&&!(n!=null&&(l=n.ignore)!==null&&l!==void 0&&l[c])){var d,g=Ei(c,n==null?void 0:n.prefix);r[g]=typeof u=="number"&&!(n!=null&&(d=n.unitless)!==null&&d!==void 0&&d[c])?"".concat(u,"px"):String(u),a[c]="var(".concat(g,")")}}),[a,OE(r,t,{scope:n==null?void 0:n.scope})]},jf=br()?f.useLayoutEffect:f.useEffect,NE=function(e,t){var n=f.useRef(!0);jf(function(){return e(n.current)},t),jf(function(){return n.current=!1,function(){n.current=!0}},[])},DE=ve({},f),_f=DE.useInsertionEffect,ME=function(e,t,n){f.useMemo(e,n),NE(function(){return t(!0)},n)},FE=_f?function(e,t,n){return _f(function(){return e(),t()},n)}:ME,PE=ve({},f),RE=PE.useInsertionEffect,AE=function(e){var t=[],n=!1;function r(a){n||t.push(a)}return f.useEffect(function(){return n=!1,function(){n=!0,t.length&&t.forEach(function(a){return a()})}},e),r},TE=function(){return function(e){e()}},jE=typeof RE<"u"?AE:TE;function Wu(e,t,n,r,a){var o=f.useContext(zo),i=o.cache,l=[e].concat(ot(t)),s=ac(l),c=jE([s]),u=function(h){i.opUpdate(s,function(v){var m=v||[void 0,void 0],p=it(m,2),b=p[0],y=b===void 0?0:b,x=p[1],w=x,C=w||n(),S=[y,C];return h?h(S):S})};f.useMemo(function(){u()},[s]);var d=i.opGet(s),g=d[1];return FE(function(){a==null||a(g)},function(h){return u(function(v){var m=it(v,2),p=m[0],b=m[1];return h&&p===0&&(a==null||a(g)),[p+1,b]}),function(){i.opUpdate(s,function(v){var m=v||[],p=it(m,2),b=p[0],y=b===void 0?0:b,x=p[1],w=y-1;return w===0?(c(function(){(h||!i.opGet(s))&&(r==null||r(x,!1))}),null):[y-1,x]})}},[s]),g}var _E={},BE="css",Hr=new Map;function LE(e){Hr.set(e,(Hr.get(e)||0)+1)}function zE(e,t){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(Co,'="').concat(e,'"]'));n.forEach(function(r){if(r[Or]===t){var a;(a=r.parentNode)===null||a===void 0||a.removeChild(r)}})}}var HE=0;function VE(e,t){Hr.set(e,(Hr.get(e)||0)-1);var n=new Set;Hr.forEach(function(r,a){r<=0&&n.add(a)}),Hr.size-n.size>HE&&n.forEach(function(r){zE(r,t),Hr.delete(r)})}var KE=function(e,t,n,r){var a=n.getDerivativeToken(e),o=ve(ve({},a),t);return r&&(o=r(o)),o},WE="token";function qE(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=En(zo),a=r.cache.instanceId,o=r.container,i=n.salt,l=i===void 0?"":i,s=n.override,c=s===void 0?_E:s,u=n.formatToken,d=n.getComputedToken,g=n.cssVar,h=IE(function(){return Object.assign.apply(Object,[{}].concat(ot(t)))},t),v=po(h),m=po(c),p=g?po(g):"",b=Wu(WE,[l,e.id,v,m,p],function(){var y,x=d?d(h,c,e):KE(h,c,e,u),w=ve({},x),C="";if(g){var S=Lv(x,g.key,{prefix:g.prefix,ignore:g.ignore,unitless:g.unitless,preserve:g.preserve}),E=it(S,2);x=E[0],C=E[1]}var k=Tf(x,l);x._tokenKey=k,w._tokenKey=Tf(w,l);var $=(y=g==null?void 0:g.key)!==null&&y!==void 0?y:k;x._themeKey=$,LE($);var O="".concat(BE,"-").concat(xo(k));return x._hashId=O,[x,O,w,C,(g==null?void 0:g.key)||""]},function(y){VE(y[0]._themeKey,a)},function(y){var x=it(y,4),w=x[0],C=x[3];if(g&&C){var S=Xr(C,xo("css-variables-".concat(w._themeKey)),{mark:mr,prepend:"queue",attachTo:o,priority:-999});S[Or]=a,S.setAttribute(Co,w._themeKey)}});return b}function hn(){return hn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hn.apply(null,arguments)}var UE={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},zv="comm",Hv="rule",Vv="decl",YE="@import",GE="@namespace",XE="@keyframes",JE="@layer",Kv=Math.abs,qu=String.fromCharCode;function Wv(e){return e.trim()}function ki(e,t,n){return e.replace(t,n)}function QE(e,t,n){return e.indexOf(t,n)}function ka(e,t){return e.charCodeAt(t)|0}function Da(e,t,n){return e.slice(t,n)}function cr(e){return e.length}function ZE(e){return e.length}function oi(e,t){return t.push(e),e}var Ol=1,Ma=1,qv=0,Gn=0,en=0,La="";function Uu(e,t,n,r,a,o,i,l){return{value:e,root:t,parent:n,type:r,props:a,children:o,line:Ol,column:Ma,length:i,return:"",siblings:l}}function ek(){return en}function tk(){return en=Gn>0?ka(La,--Gn):0,Ma--,en===10&&(Ma=1,Ol--),en}function tr(){return en=Gn<qv?ka(La,Gn++):0,Ma++,en===10&&(Ma=1,Ol++),en}function Dr(){return ka(La,Gn)}function Ii(){return Gn}function Nl(e,t){return Da(La,e,t)}function $o(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function nk(e){return Ol=Ma=1,qv=cr(La=e),Gn=0,[]}function rk(e){return La="",e}function ds(e){return Wv(Nl(Gn-1,lc(e===91?e+2:e===40?e+1:e)))}function ak(e){for(;(en=Dr())&&en<33;)tr();return $o(e)>2||$o(en)>3?"":" "}function ok(e,t){for(;--t&&tr()&&!(en<48||en>102||en>57&&en<65||en>70&&en<97););return Nl(e,Ii()+(t<6&&Dr()==32&&tr()==32))}function lc(e){for(;tr();)switch(en){case e:return Gn;case 34:case 39:e!==34&&e!==39&&lc(en);break;case 40:e===41&&lc(e);break;case 92:tr();break}return Gn}function ik(e,t){for(;tr()&&e+en!==57&&!(e+en===84&&Dr()===47););return"/*"+Nl(t,Gn-1)+"*"+qu(e===47?e:tr())}function lk(e){for(;!$o(Dr());)tr();return Nl(e,Gn)}function sk(e){return rk(Oi("",null,null,null,[""],e=nk(e),0,[0],e))}function Oi(e,t,n,r,a,o,i,l,s){for(var c=0,u=0,d=i,g=0,h=0,v=0,m=1,p=1,b=1,y=0,x="",w=a,C=o,S=r,E=x;p;)switch(v=y,y=tr()){case 40:if(v!=108&&ka(E,d-1)==58){QE(E+=ki(ds(y),"&","&\f"),"&\f",Kv(c?l[c-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:E+=ds(y);break;case 9:case 10:case 13:case 32:E+=ak(v);break;case 92:E+=ok(Ii()-1,7);continue;case 47:switch(Dr()){case 42:case 47:oi(ck(ik(tr(),Ii()),t,n,s),s),($o(v||1)==5||$o(Dr()||1)==5)&&cr(E)&&Da(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*m:l[c++]=cr(E)*b;case 125*m:case 59:case 0:switch(y){case 0:case 125:p=0;case 59+u:b==-1&&(E=ki(E,/\f/g,"")),h>0&&(cr(E)-d||m===0&&v===47)&&oi(h>32?Lf(E+";",r,n,d-1,s):Lf(ki(E," ","")+";",r,n,d-2,s),s);break;case 59:E+=";";default:if(oi(S=Bf(E,t,n,c,u,a,l,x,w=[],C=[],d,o),o),y===123)if(u===0)Oi(E,t,S,S,w,o,d,l,C);else{switch(g){case 99:if(ka(E,3)===110)break;case 108:if(ka(E,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Oi(e,S,S,r&&oi(Bf(e,S,S,0,0,a,l,x,a,w=[],d,C),C),a,C,d,l,r?w:C):Oi(E,S,S,S,[""],C,0,l,C)}}c=u=h=0,m=b=1,x=E="",d=i;break;case 58:d=1+cr(E),h=v;default:if(m<1){if(y==123)--m;else if(y==125&&m++==0&&tk()==125)continue}switch(E+=qu(y),y*m){case 38:b=u>0?1:(E+="\f",-1);break;case 44:l[c++]=(cr(E)-1)*b,b=1;break;case 64:Dr()===45&&(E+=ds(tr())),g=Dr(),u=d=cr(x=E+=lk(Ii())),y++;break;case 45:v===45&&cr(E)==2&&(m=0)}}return o}function Bf(e,t,n,r,a,o,i,l,s,c,u,d){for(var g=a-1,h=a===0?o:[""],v=ZE(h),m=0,p=0,b=0;m<r;++m)for(var y=0,x=Da(e,g+1,g=Kv(p=i[m])),w=e;y<v;++y)(w=Wv(p>0?h[y]+" "+x:ki(x,/&\f/g,h[y])))&&(s[b++]=w);return Uu(e,t,n,a===0?Hv:l,s,c,u,d)}function ck(e,t,n,r){return Uu(e,t,n,zv,qu(ek()),Da(e,2,-2),0,r)}function Lf(e,t,n,r,a){return Uu(e,t,n,Vv,Da(e,0,r),Da(e,r+1,-1),r,a)}function sc(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function uk(e,t,n,r){switch(e.type){case JE:if(e.children.length)break;case YE:case GE:case Vv:return e.return=e.return||e.value;case zv:return"";case XE:return e.return=e.value+"{"+sc(e.children,r)+"}";case Hv:if(!cr(e.value=e.props.join(",")))return""}return cr(n=sc(e.children,r))?e.return=e.value+"{"+n+"}":""}var zf="data-ant-cssinjs-cache-path",Uv="_FILE_STYLE__",Jr,Yv=!0;function dk(){if(!Jr&&(Jr={},br())){var e=document.createElement("div");e.className=zf,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(a){var o=a.split(":"),i=it(o,2),l=i[0],s=i[1];Jr[l]=s});var n=document.querySelector("style[".concat(zf,"]"));if(n){var r;Yv=!1,(r=n.parentNode)===null||r===void 0||r.removeChild(n)}document.body.removeChild(e)}}function fk(e){return dk(),!!Jr[e]}function mk(e){var t=Jr[e],n=null;if(t&&br())if(Yv)n=Uv;else{var r=document.querySelector("style[".concat(mr,'="').concat(Jr[e],'"]'));r?n=r.innerHTML:delete Jr[e]}return[n,t]}var pk="_skip_check_",Gv="_multi_value_";function fs(e){var t=sc(sk(e),uk);return t.replace(/\{%%%\:[^;];}/g,";")}function gk(e){return pt(e)==="object"&&e&&(pk in e||Gv in e)}function Hf(e,t,n){if(!t)return e;var r=".".concat(t),a=n==="low"?":where(".concat(r,")"):r,o=e.split(",").map(function(i){var l,s=i.trim().split(/\s+/),c=s[0]||"",u=((l=c.match(/^\w+/))===null||l===void 0?void 0:l[0])||"";return c="".concat(u).concat(a).concat(c.slice(u.length)),[c].concat(ot(s.slice(1))).join(" ")});return o.join(",")}var vk=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},a=r.root,o=r.injectHash,i=r.parentSelectors,l=n.hashId,s=n.layer;n.path;var c=n.hashPriority,u=n.transformers,d=u===void 0?[]:u;n.linters;var g="",h={};function v(b){var y=b.getName(l);if(!h[y]){var x=e(b.style,n,{root:!1,parentSelectors:i}),w=it(x,1),C=w[0];h[y]="@keyframes ".concat(b.getName(l)).concat(C)}}function m(b){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return b.forEach(function(x){Array.isArray(x)?m(x,y):x&&y.push(x)}),y}var p=m(Array.isArray(t)?t:[t]);return p.forEach(function(b){var y=typeof b=="string"&&!a?{}:b;if(typeof y=="string")g+="".concat(y,`
|
|
265
|
+
`);else if(y._keyframe)v(y);else{var x=d.reduce(function(w,C){var S;return(C==null||(S=C.visit)===null||S===void 0?void 0:S.call(C,w))||w},y);Object.keys(x).forEach(function(w){var C=x[w];if(pt(C)==="object"&&C&&(w!=="animationName"||!C._keyframe)&&!gk(C)){var S=!1,E=w.trim(),k=!1;(a||o)&&l?E.startsWith("@")?S=!0:E==="&"?E=Hf("",l,c):E=Hf(w,l,c):a&&!l&&(E==="&"||E==="")&&(E="",k=!0);var $=e(C,n,{root:k,injectHash:S,parentSelectors:[].concat(ot(i),[E])}),O=it($,2),D=O[0],P=O[1];h=ve(ve({},h),P),g+="".concat(E).concat(D)}else{let I=function(M,F){var R=M.replace(/[A-Z]/g,function(_){return"-".concat(_.toLowerCase())}),T=F;!UE[M]&&typeof T=="number"&&T!==0&&(T="".concat(T,"px")),M==="animationName"&&F!==null&&F!==void 0&&F._keyframe&&(v(F),T=F.getName(l)),g+="".concat(R,":").concat(T,";")};var A,N=(A=C==null?void 0:C.value)!==null&&A!==void 0?A:C;pt(C)==="object"&&C!==null&&C!==void 0&&C[Gv]&&Array.isArray(N)?N.forEach(function(M){I(w,M)}):I(w,N)}})}}),a?s&&(g&&(g="@layer ".concat(s.name," {").concat(g,"}")),s.dependencies&&(h["@layer ".concat(s.name)]=s.dependencies.map(function(b){return"@layer ".concat(b,", ").concat(s.name,";")}).join(`
|
|
266
|
+
`))):g="{".concat(g,"}"),[g,h]};function Xv(e,t){return xo("".concat(e.join("%")).concat(t))}function hk(){return null}var yk="style";function cc(e,t){var n=e.token,r=e.path,a=e.hashId,o=e.layer,i=e.nonce,l=e.clientOnly,s=e.order,c=s===void 0?0:s,u=f.useContext(zo),d=u.autoClear;u.mock;var g=u.defaultCache,h=u.hashPriority,v=u.container,m=u.ssrInline,p=u.transformers,b=u.linters,y=u.cache,x=u.layer,w=n._tokenKey,C=[w];x&&C.push("layer"),C.push.apply(C,ot(r));var S=ic,E=Wu(yk,C,function(){var P=C.join("|");if(fk(P)){var A=mk(P),N=it(A,2),I=N[0],M=N[1];if(I)return[I,w,M,{},l,c]}var F=t(),R=vk(F,{hashId:a,hashPriority:h,layer:x?o:void 0,path:r.join("-"),transformers:p,linters:b}),T=it(R,2),_=T[0],B=T[1],L=fs(_),j=Xv(C,L);return[L,w,j,B,l,c]},function(P,A){var N=it(P,3),I=N[2];(A||d)&&ic&&Tv(I,{mark:mr,attachTo:v})},function(P){var A=it(P,4),N=A[0],I=A[2],M=A[3];if(S&&N!==Uv){var F={mark:mr,prepend:x?!1:"queue",attachTo:v,priority:c},R=typeof i=="function"?i():i;R&&(F.csp={nonce:R});var T=[],_=[];Object.keys(M).forEach(function(L){L.startsWith("@layer")?T.push(L):_.push(L)}),T.forEach(function(L){Xr(fs(M[L]),"_layer-".concat(L),ve(ve({},F),{},{prepend:!0}))});var B=Xr(N,I,F);B[Or]=y.instanceId,B.setAttribute(Co,w),_.forEach(function(L){Xr(fs(M[L]),"_effect-".concat(L),F)})}}),k=it(E,3),$=k[0],O=k[1],D=k[2];return function(P){var A;return!m||S||!g?A=f.createElement(hk,null):A=f.createElement("style",hn({},te(te({},Co,O),mr,D),{dangerouslySetInnerHTML:{__html:$}})),f.createElement(f.Fragment,null,A,P)}}var bk="cssVar",xk=function(e,t){var n=e.key,r=e.prefix,a=e.unitless,o=e.ignore,i=e.token,l=e.scope,s=l===void 0?"":l,c=En(zo),u=c.cache.instanceId,d=c.container,g=i._tokenKey,h=[].concat(ot(e.path),[n,s,g]),v=Wu(bk,h,function(){var m=t(),p=Lv(m,n,{prefix:r,unitless:a,ignore:o,scope:s}),b=it(p,2),y=b[0],x=b[1],w=Xv(h,x);return[y,x,w,n]},function(m){var p=it(m,3),b=p[2];ic&&Tv(b,{mark:mr,attachTo:d})},function(m){var p=it(m,3),b=p[1],y=p[2];if(b){var x=Xr(b,y,{mark:mr,prepend:"queue",attachTo:d,priority:-999});x[Or]=u,x.setAttribute(Co,n)}});return v},jn=(function(){function e(t,n){Nn(this,e),te(this,"name",void 0),te(this,"style",void 0),te(this,"_keyframe",!0),this.name=t,this.style=n}return Dn(e,[{key:"getName",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t?"".concat(t,"-").concat(this.name):this.name}}]),e})(),Yu=aa({});function Ck(e){return Dv(e)||Nv(e)||zu(e)||Mv()}function fr(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function Jv(e,t,n,r){if(!t.length)return n;var a=Ck(t),o=a[0],i=a.slice(1),l;return!e&&typeof o=="number"?l=[]:Array.isArray(e)?l=ot(e):l=ve({},e),r&&n===void 0&&i.length===1?delete l[o][i[0]]:l[o]=Jv(l[o],i,n,r),l}function Qn(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!fr(e,t.slice(0,-1))?e:Jv(e,t,n,r)}function wk(e){return pt(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function Vf(e){return Array.isArray(e)?[]:{}}var Sk=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Ca(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Vf(t[0]);return t.forEach(function(a){function o(i,l){var s=new Set(l),c=fr(a,i),u=Array.isArray(c);if(u||wk(c)){if(!s.has(c)){s.add(c);var d=fr(r,i);u?r=Qn(r,i,[]):(!d||pt(d)!=="object")&&(r=Qn(r,i,Vf(c))),Sk(c).forEach(function(g){o([].concat(ot(i),[g]),s)})}}else r=Qn(r,i,c)}o([])}),r}const $k=f.createContext({}),Ek=aa(void 0),Bn="${label} is not a valid ${type}",Dl={Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Bn,method:Bn,array:Bn,object:Bn,number:Bn,date:Bn,boolean:Bn,integer:Bn,float:Bn,regexp:Bn,email:Bn,url:Bn,hex:Bn},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}}};Object.assign({},Dl.Modal);let Ni=[];const Kf=()=>Ni.reduce((e,t)=>Object.assign(Object.assign({},e),t),Dl.Modal);function kk(e){if(e){const t=Object.assign({},e);return Ni.push(t),Kf(),()=>{Ni=Ni.filter(n=>n!==t),Kf()}}Object.assign({},Dl.Modal)}const Qv=aa(void 0),Ik="internalMark",Ok=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;f.useEffect(()=>kk(t==null?void 0:t.Modal),[t]);const a=f.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return f.createElement(Qv.Provider,{value:a},n)},Zv={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"},Eo=Object.assign(Object.assign({},Zv),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
267
267
|
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
268
|
-
'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}),ln=Math.round;function fl(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(a=>parseFloat(a));for(let a=0;a<3;a+=1)r[a]=t(r[a]||0,n[a]||"",a);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const Kf=(e,t,n)=>n===0?e:e/100;function eo(e,t){const n=t||255;return e>n?n:e<0?0:e}class Jt{constructor(t){te(this,"isValid",!0),te(this,"r",0),te(this,"g",0),te(this,"b",0),te(this,"a",1),te(this,"_h",void 0),te(this,"_s",void 0),te(this,"_l",void 0),te(this,"_v",void 0),te(this,"_max",void 0),te(this,"_min",void 0),te(this,"_brightness",void 0);function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let r=function(o){return a.startsWith(o)};const a=t.trim();/^#?[A-F\d]{3,8}$/i.test(a)?this.fromHexString(a):r("rgb")?this.fromRgbString(a):r("hsl")?this.fromHslString(a):(r("hsv")||r("hsb"))&&this.fromHsvString(a)}else if(t instanceof Jt)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=eo(t.r),this.g=eo(t.g),this.b=eo(t.b),this.a=typeof t.a=="number"?eo(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("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 n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(o){const i=o/255;return i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),a=t(this.b);return .2126*n+.7152*r+.0722*a}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=ln(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let a=this.getLightness()-t/100;return a<0&&(a=0),this._c({h:n,s:r,l:a,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let a=this.getLightness()+t/100;return a>1&&(a=1),this._c({h:n,s:r,l:a,a:this.a})}mix(t,n=50){const r=this._c(t),a=n/100,o=s=>(r[s]-this[s])*a+this[s],i={r:ln(o("r")),g:ln(o("g")),b:ln(o("b")),a:ln(o("a")*100)/100};return this._c(i)}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 n=this._c(t),r=this.a+n.a*(1-this.a),a=o=>ln((this[o]*this.a+n[o]*n.a*(1-this.a))/r);return this._c({r:a("r"),g:a("g"),b:a("b"),a:r})}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 n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const a=(this.b||0).toString(16);if(t+=a.length===2?a:"0"+a,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=ln(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=ln(this.getSaturation()*100),r=ln(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const a=this.clone();return a[t]=eo(n,r),a}_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 n=t.replace("#","");function r(a,o){return parseInt(n[a]+n[o||a],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a}){if(this._h=t%360,this._s=n,this._l=r,this.a=typeof a=="number"?a:1,n<=0){const g=ln(r*255);this.r=g,this.g=g,this.b=g}let o=0,i=0,s=0;const l=t/60,c=(1-Math.abs(2*r-1))*n,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(o=c,i=u):l>=1&&l<2?(o=u,i=c):l>=2&&l<3?(i=c,s=u):l>=3&&l<4?(i=u,s=c):l>=4&&l<5?(o=u,s=c):l>=5&&l<6&&(o=c,s=u);const d=r-c/2;this.r=ln((o+d)*255),this.g=ln((i+d)*255),this.b=ln((s+d)*255)}fromHsv({h:t,s:n,v:r,a}){this._h=t%360,this._s=n,this._v=r,this.a=typeof a=="number"?a:1;const o=ln(r*255);if(this.r=o,this.g=o,this.b=o,n<=0)return;const i=t/60,s=Math.floor(i),l=i-s,c=ln(r*(1-n)*255),u=ln(r*(1-n*l)*255),d=ln(r*(1-n*(1-l))*255);switch(s){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(t){const n=fl(t,Kf);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=fl(t,Kf);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=fl(t,(r,a)=>a.includes("%")?ln(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var oi=2,Wf=.16,Ik=.05,Ok=.05,Nk=.15,Zv=5,eh=4,Dk=[{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 qf(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-oi*t:Math.round(e.h)+oi*t:r=n?Math.round(e.h)+oi*t:Math.round(e.h)-oi*t,r<0?r+=360:r>=360&&(r-=360),r}function Uf(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-Wf*t:t===eh?r=e.s+Wf:r=e.s+Ik*t,r>1&&(r=1),n&&t===Zv&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function Yf(e,t,n){var r;return n?r=e.v+Ok*t:r=e.v-Nk*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Eo(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new Jt(e),a=r.toHsv(),o=Zv;o>0;o-=1){var i=new Jt({h:qf(a,o,!0),s:Uf(a,o,!0),v:Yf(a,o,!0)});n.push(i)}n.push(r);for(var s=1;s<=eh;s+=1){var l=new Jt({h:qf(a,s),s:Uf(a,s),v:Yf(a,s)});n.push(l)}return t.theme==="dark"?Dk.map(function(c){var u=c.index,d=c.amount;return new Jt(t.backgroundColor||"#141414").mix(n[u],d).toHexString()}):n.map(function(c){return c.toHexString()})}var ml={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"},cc=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];cc.primary=cc[5];var uc=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];uc.primary=uc[5];var dc=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];dc.primary=dc[5];var fc=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];fc.primary=fc[5];var mc=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];mc.primary=mc[5];var pc=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];pc.primary=pc[5];var gc=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];gc.primary=gc[5];var vc=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];vc.primary=vc[5];var Ui=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Ui.primary=Ui[5];var hc=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];hc.primary=hc[5];var yc=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];yc.primary=yc[5];var bc=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];bc.primary=bc[5];var xc=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];xc.primary=xc[5];var pl={red:cc,volcano:uc,orange:dc,gold:fc,yellow:mc,lime:pc,green:gc,cyan:vc,blue:Ui,geekblue:hc,purple:yc,magenta:bc,grey:xc};function Mk(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:a,colorError:o,colorInfo:i,colorPrimary:s,colorBgBase:l,colorTextBase:c}=e,u=t(s),d=t(r),g=t(a),h=t(o),v=t(i),m=n(l,c),p=e.colorLink||e.colorInfo,b=t(p),y=new Jt(h[1]).mix(new Jt(h[3]),50).toHexString();return Object.assign(Object.assign({},m),{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:h[1],colorErrorBgHover:h[2],colorErrorBgFilledHover:y,colorErrorBgActive:h[3],colorErrorBorder:h[3],colorErrorBorderHover:h[4],colorErrorHover:h[5],colorError:h[6],colorErrorActive:h[7],colorErrorTextHover:h[8],colorErrorText:h[9],colorErrorTextActive:h[10],colorWarningBg:g[1],colorWarningBgHover:g[2],colorWarningBorder:g[3],colorWarningBorderHover:g[4],colorWarningHover:g[4],colorWarning:g[6],colorWarningActive:g[7],colorWarningTextHover:g[8],colorWarningText:g[9],colorWarningTextActive:g[10],colorInfoBg:v[1],colorInfoBgHover:v[2],colorInfoBorder:v[3],colorInfoBorderHover:v[4],colorInfoHover:v[4],colorInfo:v[6],colorInfoActive:v[7],colorInfoTextHover:v[8],colorInfoText:v[9],colorInfoTextActive:v[10],colorLinkHover:b[4],colorLink:b[6],colorLinkActive:b[7],colorBgMask:new Jt("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const Fk=e=>{let t=e,n=e,r=e,a=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?a=4:e>=8&&(a=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:a}};function Pk(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:a}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:a+1},Fk(r))}const jk=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function Rk(e){return(e+8)/e}function Ak(e){const t=Array.from({length:10}).map((n,r)=>{const a=r-1,o=e*Math.pow(Math.E,a/5),i=r>1?Math.floor(o):Math.ceil(o);return Math.floor(i/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:Rk(n)}))}const Tk=e=>{const t=Ak(e),n=t.map(u=>u.size),r=t.map(u=>u.lineHeight),a=n[1],o=n[0],i=n[2],s=r[1],l=r[0],c=r[2];return{fontSizeSM:o,fontSize:a,fontSizeLG:i,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*a),fontHeightLG:Math.round(c*i),fontHeightSM:Math.round(l*o),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function _k(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const Wn=(e,t)=>new Jt(e).setA(t).toRgbString(),to=(e,t)=>new Jt(e).darken(t).toHexString(),Bk=e=>{const t=Eo(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]}},Lk=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:Wn(r,.88),colorTextSecondary:Wn(r,.65),colorTextTertiary:Wn(r,.45),colorTextQuaternary:Wn(r,.25),colorFill:Wn(r,.15),colorFillSecondary:Wn(r,.06),colorFillTertiary:Wn(r,.04),colorFillQuaternary:Wn(r,.02),colorBgSolid:Wn(r,1),colorBgSolidHover:Wn(r,.75),colorBgSolidActive:Wn(r,.95),colorBgLayout:to(n,4),colorBgContainer:to(n,0),colorBgElevated:to(n,0),colorBgSpotlight:Wn(r,.85),colorBgBlur:"transparent",colorBorder:to(n,15),colorBorderSecondary:to(n,6)}};function zk(e){ml.pink=ml.magenta,pl.pink=pl.magenta;const t=Object.keys(Qv).map(n=>{const r=e[n]===ml[n]?pl[n]:Eo(e[n]);return Array.from({length:10},()=>1).reduce((a,o,i)=>(a[`${n}-${i+1}`]=r[i],a[`${n}${i+1}`]=r[i],a),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),Mk(e,{generateColorPalettes:Bk,generateNeutralColorPalettes:Lk})),Tk(e.fontSize)),_k(e)),jk(e)),Pk(e))}const th=ac(zk),Cc={token:$o,override:{override:$o},hashed:!0},nh=be.createContext(Cc),wc="ant",Ds="anticon",Hk=(e,t)=>t||(e?`${wc}-${e}`:wc),Pr=f.createContext({getPrefixCls:Hk,iconPrefixCls:Ds}),Vk=`-ant-${Date.now()}-${Math.random()}`;function Kk(e,t){const n={},r=(o,i)=>{let s=o.clone();return s=(i==null?void 0:i(s))||s,s.toRgbString()},a=(o,i)=>{const s=new Jt(o),l=Eo(s.toRgbString());n[`${i}-color`]=r(s),n[`${i}-color-disabled`]=l[1],n[`${i}-color-hover`]=l[4],n[`${i}-color-active`]=l[6],n[`${i}-color-outline`]=s.clone().setA(.2).toRgbString(),n[`${i}-color-deprecated-bg`]=l[0],n[`${i}-color-deprecated-border`]=l[2]};if(t.primaryColor){a(t.primaryColor,"primary");const o=new Jt(t.primaryColor),i=Eo(o.toRgbString());i.forEach((l,c)=>{n[`primary-${c+1}`]=l}),n["primary-color-deprecated-l-35"]=r(o,l=>l.lighten(35)),n["primary-color-deprecated-l-20"]=r(o,l=>l.lighten(20)),n["primary-color-deprecated-t-20"]=r(o,l=>l.tint(20)),n["primary-color-deprecated-t-50"]=r(o,l=>l.tint(50)),n["primary-color-deprecated-f-12"]=r(o,l=>l.setA(l.a*.12));const s=new Jt(i[0]);n["primary-color-active-deprecated-f-30"]=r(s,l=>l.setA(l.a*.3)),n["primary-color-active-deprecated-d-02"]=r(s,l=>l.darken(2))}return t.successColor&&a(t.successColor,"success"),t.warningColor&&a(t.warningColor,"warning"),t.errorColor&&a(t.errorColor,"error"),t.infoColor&&a(t.infoColor,"info"),`
|
|
268
|
+
'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}),cn=Math.round;function ms(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(a=>parseFloat(a));for(let a=0;a<3;a+=1)r[a]=t(r[a]||0,n[a]||"",a);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const Wf=(e,t,n)=>n===0?e:e/100;function to(e,t){const n=t||255;return e>n?n:e<0?0:e}class Qt{constructor(t){te(this,"isValid",!0),te(this,"r",0),te(this,"g",0),te(this,"b",0),te(this,"a",1),te(this,"_h",void 0),te(this,"_s",void 0),te(this,"_l",void 0),te(this,"_v",void 0),te(this,"_max",void 0),te(this,"_min",void 0),te(this,"_brightness",void 0);function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let r=function(o){return a.startsWith(o)};const a=t.trim();/^#?[A-F\d]{3,8}$/i.test(a)?this.fromHexString(a):r("rgb")?this.fromRgbString(a):r("hsl")?this.fromHslString(a):(r("hsv")||r("hsb"))&&this.fromHsvString(a)}else if(t instanceof Qt)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=to(t.r),this.g=to(t.g),this.b=to(t.b),this.a=typeof t.a=="number"?to(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("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 n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(o){const i=o/255;return i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),a=t(this.b);return .2126*n+.7152*r+.0722*a}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=cn(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let a=this.getLightness()-t/100;return a<0&&(a=0),this._c({h:n,s:r,l:a,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let a=this.getLightness()+t/100;return a>1&&(a=1),this._c({h:n,s:r,l:a,a:this.a})}mix(t,n=50){const r=this._c(t),a=n/100,o=l=>(r[l]-this[l])*a+this[l],i={r:cn(o("r")),g:cn(o("g")),b:cn(o("b")),a:cn(o("a")*100)/100};return this._c(i)}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 n=this._c(t),r=this.a+n.a*(1-this.a),a=o=>cn((this[o]*this.a+n[o]*n.a*(1-this.a))/r);return this._c({r:a("r"),g:a("g"),b:a("b"),a:r})}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 n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const a=(this.b||0).toString(16);if(t+=a.length===2?a:"0"+a,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=cn(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=cn(this.getSaturation()*100),r=cn(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const a=this.clone();return a[t]=to(n,r),a}_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 n=t.replace("#","");function r(a,o){return parseInt(n[a]+n[o||a],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a}){if(this._h=t%360,this._s=n,this._l=r,this.a=typeof a=="number"?a:1,n<=0){const g=cn(r*255);this.r=g,this.g=g,this.b=g}let o=0,i=0,l=0;const s=t/60,c=(1-Math.abs(2*r-1))*n,u=c*(1-Math.abs(s%2-1));s>=0&&s<1?(o=c,i=u):s>=1&&s<2?(o=u,i=c):s>=2&&s<3?(i=c,l=u):s>=3&&s<4?(i=u,l=c):s>=4&&s<5?(o=u,l=c):s>=5&&s<6&&(o=c,l=u);const d=r-c/2;this.r=cn((o+d)*255),this.g=cn((i+d)*255),this.b=cn((l+d)*255)}fromHsv({h:t,s:n,v:r,a}){this._h=t%360,this._s=n,this._v=r,this.a=typeof a=="number"?a:1;const o=cn(r*255);if(this.r=o,this.g=o,this.b=o,n<=0)return;const i=t/60,l=Math.floor(i),s=i-l,c=cn(r*(1-n)*255),u=cn(r*(1-n*s)*255),d=cn(r*(1-n*(1-s))*255);switch(l){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(t){const n=ms(t,Wf);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=ms(t,Wf);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=ms(t,(r,a)=>a.includes("%")?cn(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var ii=2,qf=.16,Nk=.05,Dk=.05,Mk=.15,eh=5,th=4,Fk=[{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 Uf(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-ii*t:Math.round(e.h)+ii*t:r=n?Math.round(e.h)+ii*t:Math.round(e.h)-ii*t,r<0?r+=360:r>=360&&(r-=360),r}function Yf(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-qf*t:t===th?r=e.s+qf:r=e.s+Nk*t,r>1&&(r=1),n&&t===eh&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function Gf(e,t,n){var r;return n?r=e.v+Dk*t:r=e.v-Mk*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function ko(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new Qt(e),a=r.toHsv(),o=eh;o>0;o-=1){var i=new Qt({h:Uf(a,o,!0),s:Yf(a,o,!0),v:Gf(a,o,!0)});n.push(i)}n.push(r);for(var l=1;l<=th;l+=1){var s=new Qt({h:Uf(a,l),s:Yf(a,l),v:Gf(a,l)});n.push(s)}return t.theme==="dark"?Fk.map(function(c){var u=c.index,d=c.amount;return new Qt(t.backgroundColor||"#141414").mix(n[u],d).toHexString()}):n.map(function(c){return c.toHexString()})}var ps={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"},uc=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];uc.primary=uc[5];var dc=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];dc.primary=dc[5];var fc=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];fc.primary=fc[5];var mc=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];mc.primary=mc[5];var pc=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];pc.primary=pc[5];var gc=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];gc.primary=gc[5];var vc=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];vc.primary=vc[5];var hc=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];hc.primary=hc[5];var Yi=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Yi.primary=Yi[5];var yc=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];yc.primary=yc[5];var bc=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];bc.primary=bc[5];var xc=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];xc.primary=xc[5];var Cc=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Cc.primary=Cc[5];var gs={red:uc,volcano:dc,orange:fc,gold:mc,yellow:pc,lime:gc,green:vc,cyan:hc,blue:Yi,geekblue:yc,purple:bc,magenta:xc,grey:Cc};function Pk(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:a,colorError:o,colorInfo:i,colorPrimary:l,colorBgBase:s,colorTextBase:c}=e,u=t(l),d=t(r),g=t(a),h=t(o),v=t(i),m=n(s,c),p=e.colorLink||e.colorInfo,b=t(p),y=new Qt(h[1]).mix(new Qt(h[3]),50).toHexString();return Object.assign(Object.assign({},m),{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:h[1],colorErrorBgHover:h[2],colorErrorBgFilledHover:y,colorErrorBgActive:h[3],colorErrorBorder:h[3],colorErrorBorderHover:h[4],colorErrorHover:h[5],colorError:h[6],colorErrorActive:h[7],colorErrorTextHover:h[8],colorErrorText:h[9],colorErrorTextActive:h[10],colorWarningBg:g[1],colorWarningBgHover:g[2],colorWarningBorder:g[3],colorWarningBorderHover:g[4],colorWarningHover:g[4],colorWarning:g[6],colorWarningActive:g[7],colorWarningTextHover:g[8],colorWarningText:g[9],colorWarningTextActive:g[10],colorInfoBg:v[1],colorInfoBgHover:v[2],colorInfoBorder:v[3],colorInfoBorderHover:v[4],colorInfoHover:v[4],colorInfo:v[6],colorInfoActive:v[7],colorInfoTextHover:v[8],colorInfoText:v[9],colorInfoTextActive:v[10],colorLinkHover:b[4],colorLink:b[6],colorLinkActive:b[7],colorBgMask:new Qt("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const Rk=e=>{let t=e,n=e,r=e,a=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?a=4:e>=8&&(a=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:a}};function Ak(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:a}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:a+1},Rk(r))}const Tk=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function jk(e){return(e+8)/e}function _k(e){const t=Array.from({length:10}).map((n,r)=>{const a=r-1,o=e*Math.pow(Math.E,a/5),i=r>1?Math.floor(o):Math.ceil(o);return Math.floor(i/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:jk(n)}))}const Bk=e=>{const t=_k(e),n=t.map(u=>u.size),r=t.map(u=>u.lineHeight),a=n[1],o=n[0],i=n[2],l=r[1],s=r[0],c=r[2];return{fontSizeSM:o,fontSize:a,fontSizeLG:i,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:l,lineHeightLG:c,lineHeightSM:s,fontHeight:Math.round(l*a),fontHeightLG:Math.round(c*i),fontHeightSM:Math.round(s*o),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function Lk(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const qn=(e,t)=>new Qt(e).setA(t).toRgbString(),no=(e,t)=>new Qt(e).darken(t).toHexString(),zk=e=>{const t=ko(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]}},Hk=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:qn(r,.88),colorTextSecondary:qn(r,.65),colorTextTertiary:qn(r,.45),colorTextQuaternary:qn(r,.25),colorFill:qn(r,.15),colorFillSecondary:qn(r,.06),colorFillTertiary:qn(r,.04),colorFillQuaternary:qn(r,.02),colorBgSolid:qn(r,1),colorBgSolidHover:qn(r,.75),colorBgSolidActive:qn(r,.95),colorBgLayout:no(n,4),colorBgContainer:no(n,0),colorBgElevated:no(n,0),colorBgSpotlight:qn(r,.85),colorBgBlur:"transparent",colorBorder:no(n,15),colorBorderSecondary:no(n,6)}};function Vk(e){ps.pink=ps.magenta,gs.pink=gs.magenta;const t=Object.keys(Zv).map(n=>{const r=e[n]===ps[n]?gs[n]:ko(e[n]);return Array.from({length:10},()=>1).reduce((a,o,i)=>(a[`${n}-${i+1}`]=r[i],a[`${n}${i+1}`]=r[i],a),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),Pk(e,{generateColorPalettes:zk,generateNeutralColorPalettes:Hk})),Bk(e.fontSize)),Lk(e)),Tk(e)),Ak(e))}const nh=oc(Vk),wc={token:Eo,override:{override:Eo},hashed:!0},rh=be.createContext(wc),Sc="ant",Ml="anticon",Kk=(e,t)=>t||(e?`${Sc}-${e}`:Sc),Rr=f.createContext({getPrefixCls:Kk,iconPrefixCls:Ml}),Wk=`-ant-${Date.now()}-${Math.random()}`;function qk(e,t){const n={},r=(o,i)=>{let l=o.clone();return l=(i==null?void 0:i(l))||l,l.toRgbString()},a=(o,i)=>{const l=new Qt(o),s=ko(l.toRgbString());n[`${i}-color`]=r(l),n[`${i}-color-disabled`]=s[1],n[`${i}-color-hover`]=s[4],n[`${i}-color-active`]=s[6],n[`${i}-color-outline`]=l.clone().setA(.2).toRgbString(),n[`${i}-color-deprecated-bg`]=s[0],n[`${i}-color-deprecated-border`]=s[2]};if(t.primaryColor){a(t.primaryColor,"primary");const o=new Qt(t.primaryColor),i=ko(o.toRgbString());i.forEach((s,c)=>{n[`primary-${c+1}`]=s}),n["primary-color-deprecated-l-35"]=r(o,s=>s.lighten(35)),n["primary-color-deprecated-l-20"]=r(o,s=>s.lighten(20)),n["primary-color-deprecated-t-20"]=r(o,s=>s.tint(20)),n["primary-color-deprecated-t-50"]=r(o,s=>s.tint(50)),n["primary-color-deprecated-f-12"]=r(o,s=>s.setA(s.a*.12));const l=new Qt(i[0]);n["primary-color-active-deprecated-f-30"]=r(l,s=>s.setA(s.a*.3)),n["primary-color-active-deprecated-d-02"]=r(l,s=>s.darken(2))}return t.successColor&&a(t.successColor,"success"),t.warningColor&&a(t.warningColor,"warning"),t.errorColor&&a(t.errorColor,"error"),t.infoColor&&a(t.infoColor,"info"),`
|
|
269
269
|
:root {
|
|
270
270
|
${Object.keys(n).map(o=>`--${e}-${o}: ${n[o]};`).join(`
|
|
271
271
|
`)}
|
|
272
272
|
}
|
|
273
|
-
`.trim()}function
|
|
273
|
+
`.trim()}function Uk(e,t){const n=qk(e,t);br()&&Xr(n,`${Wk}-dynamic-theme`)}const $c=f.createContext(!1),Yk=({children:e,disabled:t})=>{const n=f.useContext($c);return f.createElement($c.Provider,{value:t??n},e)},Io=f.createContext(void 0),Gk=({children:e,size:t})=>{const n=f.useContext(Io);return f.createElement(Io.Provider,{value:t||n},e)};function Xk(){const e=En($c),t=En(Io);return{componentDisabled:e,componentSize:t}}var ah=Dn(function e(){Nn(this,e)}),oh="CALC_UNIT",Jk=new RegExp(oh,"g");function vs(e){return typeof e=="number"?"".concat(e).concat(oh):e}var Qk=(function(e){_a(n,e);var t=Ba(n);function n(r,a){var o;Nn(this,n),o=t.call(this),te(Ct(o),"result",""),te(Ct(o),"unitlessCssVar",void 0),te(Ct(o),"lowPriority",void 0);var i=pt(r);return o.unitlessCssVar=a,r instanceof n?o.result="(".concat(r.result,")"):i==="number"?o.result=vs(r):i==="string"&&(o.result=r),o}return Dn(n,[{key:"add",value:function(r){return r instanceof n?this.result="".concat(this.result," + ").concat(r.getResult()):(typeof r=="number"||typeof r=="string")&&(this.result="".concat(this.result," + ").concat(vs(r))),this.lowPriority=!0,this}},{key:"sub",value:function(r){return r instanceof n?this.result="".concat(this.result," - ").concat(r.getResult()):(typeof r=="number"||typeof r=="string")&&(this.result="".concat(this.result," - ").concat(vs(r))),this.lowPriority=!0,this}},{key:"mul",value:function(r){return this.lowPriority&&(this.result="(".concat(this.result,")")),r instanceof n?this.result="".concat(this.result," * ").concat(r.getResult(!0)):(typeof r=="number"||typeof r=="string")&&(this.result="".concat(this.result," * ").concat(r)),this.lowPriority=!1,this}},{key:"div",value:function(r){return this.lowPriority&&(this.result="(".concat(this.result,")")),r instanceof n?this.result="".concat(this.result," / ").concat(r.getResult(!0)):(typeof r=="number"||typeof r=="string")&&(this.result="".concat(this.result," / ").concat(r)),this.lowPriority=!1,this}},{key:"getResult",value:function(r){return this.lowPriority||r?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(r){var a=this,o=r||{},i=o.unit,l=!0;return typeof i=="boolean"?l=i:Array.from(this.unitlessCssVar).some(function(s){return a.result.includes(s)})&&(l=!1),this.result=this.result.replace(Jk,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),n})(ah),Zk=(function(e){_a(n,e);var t=Ba(n);function n(r){var a;return Nn(this,n),a=t.call(this),te(Ct(a),"result",0),r instanceof n?a.result=r.result:typeof r=="number"&&(a.result=r),a}return Dn(n,[{key:"add",value:function(r){return r instanceof n?this.result+=r.result:typeof r=="number"&&(this.result+=r),this}},{key:"sub",value:function(r){return r instanceof n?this.result-=r.result:typeof r=="number"&&(this.result-=r),this}},{key:"mul",value:function(r){return r instanceof n?this.result*=r.result:typeof r=="number"&&(this.result*=r),this}},{key:"div",value:function(r){return r instanceof n?this.result/=r.result:typeof r=="number"&&(this.result/=r),this}},{key:"equal",value:function(){return this.result}}]),n})(ah),eI=function(e,t){var n=e==="css"?Qk:Zk;return function(r){return new n(r,t)}},Xf=function(e,t){return"".concat([t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function Gi(e){var t=f.useRef();t.current=e;var n=f.useCallback(function(){for(var r,a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return(r=t.current)===null||r===void 0?void 0:r.call.apply(r,[t].concat(o))},[]);return n}function Ec(e){var t=f.useRef(!1),n=f.useState(e),r=it(n,2),a=r[0],o=r[1];f.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function i(l,s){s&&t.current||o(l)}return[a,i]}var Jf={exports:{}},Nt={};/**
|
|
274
274
|
* @license React
|
|
275
275
|
* react-is.production.min.js
|
|
276
276
|
*
|
|
@@ -278,7 +278,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
278
278
|
*
|
|
279
279
|
* This source code is licensed under the MIT license found in the
|
|
280
280
|
* LICENSE file in the root directory of this source tree.
|
|
281
|
-
*/var Jf;function Zk(){if(Jf)return Ot;Jf=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),i=Symbol.for("react.context"),s=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"),g=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),v;v=Symbol.for("react.module.reference");function m(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case e:switch(p=p.type,p){case n:case a:case r:case c:case u:return p;default:switch(p=p&&p.$$typeof,p){case s:case i:case l:case g:case d:case o:return p;default:return b}}case t:return b}}}return Ot.ContextConsumer=i,Ot.ContextProvider=o,Ot.Element=e,Ot.ForwardRef=l,Ot.Fragment=n,Ot.Lazy=g,Ot.Memo=d,Ot.Portal=t,Ot.Profiler=a,Ot.StrictMode=r,Ot.Suspense=c,Ot.SuspenseList=u,Ot.isAsyncMode=function(){return!1},Ot.isConcurrentMode=function(){return!1},Ot.isContextConsumer=function(p){return m(p)===i},Ot.isContextProvider=function(p){return m(p)===o},Ot.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},Ot.isForwardRef=function(p){return m(p)===l},Ot.isFragment=function(p){return m(p)===n},Ot.isLazy=function(p){return m(p)===g},Ot.isMemo=function(p){return m(p)===d},Ot.isPortal=function(p){return m(p)===t},Ot.isProfiler=function(p){return m(p)===a},Ot.isStrictMode=function(p){return m(p)===r},Ot.isSuspense=function(p){return m(p)===c},Ot.isSuspenseList=function(p){return m(p)===u},Ot.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===a||p===r||p===c||p===u||p===h||typeof p=="object"&&p!==null&&(p.$$typeof===g||p.$$typeof===d||p.$$typeof===o||p.$$typeof===i||p.$$typeof===l||p.$$typeof===v||p.getModuleId!==void 0)},Ot.typeOf=m,Ot}var Qf;function eI(){return Qf||(Qf=1,Xf.exports=Zk()),Xf.exports}var vl=eI(),tI=Symbol.for("react.element"),nI=Symbol.for("react.transitional.element"),rI=Symbol.for("react.fragment");function oh(e){return e&&mt(e)==="object"&&(e.$$typeof===tI||e.$$typeof===nI)&&e.type===rI}var aI=Number(E0.split(".")[0]),oI=function(e,t){typeof e=="function"?e(t):mt(e)==="object"&&e&&"current"in e&&(e.current=t)},iI=function(e){var t,n;if(!e)return!1;if(ih(e)&&aI>=19)return!0;var r=vl.isMemo(e)?e.type.type:e.type;return!(typeof r=="function"&&!((t=r.prototype)!==null&&t!==void 0&&t.render)&&r.$$typeof!==vl.ForwardRef||typeof e=="function"&&!((n=e.prototype)!==null&&n!==void 0&&n.render)&&e.$$typeof!==vl.ForwardRef)};function ih(e){return I0(e)&&!oh(e)}var sI=function(e){if(e&&ih(e)){var t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function Zf(e,t,n,r){var a=ve({},t[e]);if(r!=null&&r.deprecatedTokens){var o=r.deprecatedTokens;o.forEach(function(s){var l=ot(s,2),c=l[0],u=l[1];if(a!=null&&a[c]||a!=null&&a[u]){var d;(d=a[u])!==null&&d!==void 0||(a[u]=a==null?void 0:a[c])}})}var i=ve(ve({},n),a);return Object.keys(i).forEach(function(s){i[s]===t[s]&&delete i[s]}),i}var sh=typeof CSSINJS_STATISTIC<"u",Ec=!0;function Ms(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!sh)return Object.assign.apply(Object,[{}].concat(t));Ec=!1;var r={};return t.forEach(function(a){if(mt(a)==="object"){var o=Object.keys(a);o.forEach(function(i){Object.defineProperty(r,i,{configurable:!0,enumerable:!0,get:function(){return a[i]}})})}}),Ec=!0,r}var em={};function lI(){}var cI=function(e){var t,n=e,r=lI;return sh&&typeof Proxy<"u"&&(t=new Set,n=new Proxy(e,{get:function(a,o){if(Ec){var i;(i=t)===null||i===void 0||i.add(o)}return a[o]}}),r=function(a,o){var i;em[a]={global:Array.from(t),component:ve(ve({},(i=em[a])===null||i===void 0?void 0:i.component),o)}}),{token:n,keys:t,flush:r}};function tm(e,t,n){if(typeof n=="function"){var r;return n(Ms(t,(r=t[e])!==null&&r!==void 0?r:{}))}return n??{}}function uI(e){return e==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return"max(".concat(n.map(function(a){return Or(a)}).join(","),")")},min:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return"min(".concat(n.map(function(a){return Or(a)}).join(","),")")}}}var dI=1e3*60*10,fI=(function(){function e(){On(this,e),te(this,"map",new Map),te(this,"objectIDMap",new WeakMap),te(this,"nextID",0),te(this,"lastAccessBeat",new Map),te(this,"accessBeat",0)}return Nn(e,[{key:"set",value:function(t,n){this.clear();var r=this.getCompositeKey(t);this.map.set(r,n),this.lastAccessBeat.set(r,Date.now())}},{key:"get",value:function(t){var n=this.getCompositeKey(t),r=this.map.get(n);return this.lastAccessBeat.set(n,Date.now()),this.accessBeat+=1,r}},{key:"getCompositeKey",value:function(t){var n=this,r=t.map(function(a){return a&&mt(a)==="object"?"obj_".concat(n.getObjectID(a)):"".concat(mt(a),"_").concat(a)});return r.join("|")}},{key:"getObjectID",value:function(t){if(this.objectIDMap.has(t))return this.objectIDMap.get(t);var n=this.nextID;return this.objectIDMap.set(t,n),this.nextID+=1,n}},{key:"clear",value:function(){var t=this;if(this.accessBeat>1e4){var n=Date.now();this.lastAccessBeat.forEach(function(r,a){n-r>dI&&(t.map.delete(a),t.lastAccessBeat.delete(a))}),this.accessBeat=0}}}]),e})(),nm=new fI;function mI(e,t){return be.useMemo(function(){var n=nm.get(t);if(n)return n;var r=e();return nm.set(t,r),r},t)}var pI=function(){return{}};function gI(e){var t=e.useCSP,n=t===void 0?pI:t,r=e.useToken,a=e.usePrefix,o=e.getResetStyles,i=e.getCommonStyle,s=e.getCompUnitless;function l(g,h,v,m){var p=Array.isArray(g)?g[0]:g;function b(k){return"".concat(String(p)).concat(k.slice(0,1).toUpperCase()).concat(k.slice(1))}var y=(m==null?void 0:m.unitless)||{},x=typeof s=="function"?s(g):{},w=ve(ve({},x),{},te({},b("zIndexPopup"),!0));Object.keys(y).forEach(function(k){w[b(k)]=y[k]});var C=ve(ve({},m),{},{unitless:w,prefixToken:b}),S=u(g,h,v,C),E=c(p,v,C);return function(k){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,O=S(k,$),D=ot(O,2),P=D[1],R=E($),N=ot(R,2),I=N[0],M=N[1];return[I,P,M]}}function c(g,h,v){var m=v.unitless,p=v.injectStyle,b=p===void 0?!0:p,y=v.prefixToken,x=v.ignore,w=function(S){var E=S.rootCls,k=S.cssVar,$=k===void 0?{}:k,O=r(),D=O.realToken;return yk({path:[g],prefix:$.prefix,key:$.key,unitless:m,ignore:x,token:D,scope:E},function(){var P=tm(g,D,h),R=Zf(g,D,P,{deprecatedTokens:v==null?void 0:v.deprecatedTokens});return Object.keys(P).forEach(function(N){R[y(N)]=R[N],delete R[N]}),R}),null},C=function(S){var E=r(),k=E.cssVar;return[function($){return b&&k?be.createElement(be.Fragment,null,be.createElement(w,{rootCls:S,cssVar:k,component:g}),$):$},k==null?void 0:k.key]};return C}function u(g,h,v){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},p=Array.isArray(g)?g:[g,g],b=ot(p,1),y=b[0],x=p.join("-"),w=e.layer||{name:"antd"};return function(C){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C,E=r(),k=E.theme,$=E.realToken,O=E.hashId,D=E.token,P=E.cssVar,R=a(),N=R.rootPrefixCls,I=R.iconPrefixCls,M=n(),F=P?"css":"js",j=mI(function(){var H=new Set;return P&&Object.keys(m.unitless||{}).forEach(function(W){H.add($i(W,P.prefix)),H.add($i(W,Gf(y,P.prefix)))}),Qk(F,H)},[F,y,P==null?void 0:P.prefix]),A=uI(F),_=A.max,L=A.min,z={theme:k,token:D,hashId:O,nonce:function(){return M.nonce},clientOnly:m.clientOnly,layer:w,order:m.order||-999};typeof o=="function"&&lc(ve(ve({},z),{},{clientOnly:!1,path:["Shared",N]}),function(){return o(D,{prefix:{rootPrefixCls:N,iconPrefixCls:I},csp:M})});var T=lc(ve(ve({},z),{},{path:[x,C,I]}),function(){if(m.injectStyle===!1)return[];var H=cI(D),W=H.token,K=H.flush,G=tm(y,$,v),U=".".concat(C),Z=Zf(y,$,G,{deprecatedTokens:m.deprecatedTokens});P&&G&&mt(G)==="object"&&Object.keys(G).forEach(function(ce){G[ce]="var(".concat($i(ce,Gf(y,P.prefix)),")")});var Q=Ms(W,{componentCls:U,prefixCls:C,iconCls:".".concat(I),antCls:".".concat(N),calc:j,max:_,min:L},P?G:Z),Y=h(Q,{hashId:O,prefixCls:C,rootPrefixCls:N,iconPrefixCls:I});K(y,Z);var ee=typeof i=="function"?i(Q,C,S,m.resetFont):null;return[m.resetStyle===!1?null:ee,Y]});return[T,O]}}function d(g,h,v){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},p=u(g,h,v,ve({resetStyle:!1,order:-998},m)),b=function(y){var x=y.prefixCls,w=y.rootCls,C=w===void 0?x:w;return p(x,C),null};return b}return{genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}const vI="5.27.1";function hl(e){return e>=0&&e<=255}function ii(e,t){const{r:n,g:r,b:a,a:o}=new Jt(e).toRgb();if(o<1)return e;const{r:i,g:s,b:l}=new Jt(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-i*(1-c))/c),d=Math.round((r-s*(1-c))/c),g=Math.round((a-l*(1-c))/c);if(hl(u)&&hl(d)&&hl(g))return new Jt({r:u,g:d,b:g,a:Math.round(c*100)/100}).toRgbString()}return new Jt({r:n,g:r,b:a,a:1}).toRgbString()}var hI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};function lh(e){const{override:t}=e,n=hI(e,["override"]),r=Object.assign({},t);Object.keys($o).forEach(d=>{delete r[d]});const a=Object.assign(Object.assign({},n),r),o=480,i=576,s=768,l=992,c=1200,u=1600;return a.motion===!1&&(a.motionDurationFast="0s",a.motionDurationMid="0s",a.motionDurationSlow="0s"),Object.assign(Object.assign(Object.assign({},a),{colorFillContent:a.colorFillSecondary,colorFillContentHover:a.colorFill,colorFillAlter:a.colorFillQuaternary,colorBgContainerDisabled:a.colorFillTertiary,colorBorderBg:a.colorBgContainer,colorSplit:ii(a.colorBorderSecondary,a.colorBgContainer),colorTextPlaceholder:a.colorTextQuaternary,colorTextDisabled:a.colorTextQuaternary,colorTextHeading:a.colorText,colorTextLabel:a.colorTextSecondary,colorTextDescription:a.colorTextTertiary,colorTextLightSolid:a.colorWhite,colorHighlight:a.colorError,colorBgTextHover:a.colorFillSecondary,colorBgTextActive:a.colorFill,colorIcon:a.colorTextTertiary,colorIconHover:a.colorText,colorErrorOutline:ii(a.colorErrorBg,a.colorBgContainer),colorWarningOutline:ii(a.colorWarningBg,a.colorBgContainer),fontSizeIcon:a.fontSizeSM,lineWidthFocus:a.lineWidth*3,lineWidth:a.lineWidth,controlOutlineWidth:a.lineWidth*2,controlInteractiveSize:a.controlHeight/2,controlItemBgHover:a.colorFillTertiary,controlItemBgActive:a.colorPrimaryBg,controlItemBgActiveHover:a.colorPrimaryBgHover,controlItemBgActiveDisabled:a.colorFill,controlTmpOutline:a.colorFillQuaternary,controlOutline:ii(a.colorPrimaryBg,a.colorBgContainer),lineType:a.lineType,borderRadius:a.borderRadius,borderRadiusXS:a.borderRadiusXS,borderRadiusSM:a.borderRadiusSM,borderRadiusLG:a.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:a.sizeXXS,paddingXS:a.sizeXS,paddingSM:a.sizeSM,padding:a.size,paddingMD:a.sizeMD,paddingLG:a.sizeLG,paddingXL:a.sizeXL,paddingContentHorizontalLG:a.sizeLG,paddingContentVerticalLG:a.sizeMS,paddingContentHorizontal:a.sizeMS,paddingContentVertical:a.sizeSM,paddingContentHorizontalSM:a.size,paddingContentVerticalSM:a.sizeXS,marginXXS:a.sizeXXS,marginXS:a.sizeXS,marginSM:a.sizeSM,margin:a.size,marginMD:a.sizeMD,marginLG:a.sizeLG,marginXL:a.sizeXL,marginXXL:a.sizeXXL,boxShadow:`
|
|
281
|
+
*/var Qf;function tI(){if(Qf)return Nt;Qf=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),i=Symbol.for("react.context"),l=Symbol.for("react.server_context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),v;v=Symbol.for("react.module.reference");function m(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case e:switch(p=p.type,p){case n:case a:case r:case c:case u:return p;default:switch(p=p&&p.$$typeof,p){case l:case i:case s:case g:case d:case o:return p;default:return b}}case t:return b}}}return Nt.ContextConsumer=i,Nt.ContextProvider=o,Nt.Element=e,Nt.ForwardRef=s,Nt.Fragment=n,Nt.Lazy=g,Nt.Memo=d,Nt.Portal=t,Nt.Profiler=a,Nt.StrictMode=r,Nt.Suspense=c,Nt.SuspenseList=u,Nt.isAsyncMode=function(){return!1},Nt.isConcurrentMode=function(){return!1},Nt.isContextConsumer=function(p){return m(p)===i},Nt.isContextProvider=function(p){return m(p)===o},Nt.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},Nt.isForwardRef=function(p){return m(p)===s},Nt.isFragment=function(p){return m(p)===n},Nt.isLazy=function(p){return m(p)===g},Nt.isMemo=function(p){return m(p)===d},Nt.isPortal=function(p){return m(p)===t},Nt.isProfiler=function(p){return m(p)===a},Nt.isStrictMode=function(p){return m(p)===r},Nt.isSuspense=function(p){return m(p)===c},Nt.isSuspenseList=function(p){return m(p)===u},Nt.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===a||p===r||p===c||p===u||p===h||typeof p=="object"&&p!==null&&(p.$$typeof===g||p.$$typeof===d||p.$$typeof===o||p.$$typeof===i||p.$$typeof===s||p.$$typeof===v||p.getModuleId!==void 0)},Nt.typeOf=m,Nt}var Zf;function nI(){return Zf||(Zf=1,Jf.exports=tI()),Jf.exports}var hs=nI(),rI=Symbol.for("react.element"),aI=Symbol.for("react.transitional.element"),oI=Symbol.for("react.fragment");function ih(e){return e&&pt(e)==="object"&&(e.$$typeof===rI||e.$$typeof===aI)&&e.type===oI}var iI=Number(I0.split(".")[0]),lI=function(e,t){typeof e=="function"?e(t):pt(e)==="object"&&e&&"current"in e&&(e.current=t)},sI=function(e){var t,n;if(!e)return!1;if(lh(e)&&iI>=19)return!0;var r=hs.isMemo(e)?e.type.type:e.type;return!(typeof r=="function"&&!((t=r.prototype)!==null&&t!==void 0&&t.render)&&r.$$typeof!==hs.ForwardRef||typeof e=="function"&&!((n=e.prototype)!==null&&n!==void 0&&n.render)&&e.$$typeof!==hs.ForwardRef)};function lh(e){return N0(e)&&!ih(e)}var cI=function(e){if(e&&lh(e)){var t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function em(e,t,n,r){var a=ve({},t[e]);if(r!=null&&r.deprecatedTokens){var o=r.deprecatedTokens;o.forEach(function(l){var s=it(l,2),c=s[0],u=s[1];if(a!=null&&a[c]||a!=null&&a[u]){var d;(d=a[u])!==null&&d!==void 0||(a[u]=a==null?void 0:a[c])}})}var i=ve(ve({},n),a);return Object.keys(i).forEach(function(l){i[l]===t[l]&&delete i[l]}),i}var sh=typeof CSSINJS_STATISTIC<"u",kc=!0;function Fl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!sh)return Object.assign.apply(Object,[{}].concat(t));kc=!1;var r={};return t.forEach(function(a){if(pt(a)==="object"){var o=Object.keys(a);o.forEach(function(i){Object.defineProperty(r,i,{configurable:!0,enumerable:!0,get:function(){return a[i]}})})}}),kc=!0,r}var tm={};function uI(){}var dI=function(e){var t,n=e,r=uI;return sh&&typeof Proxy<"u"&&(t=new Set,n=new Proxy(e,{get:function(a,o){if(kc){var i;(i=t)===null||i===void 0||i.add(o)}return a[o]}}),r=function(a,o){var i;tm[a]={global:Array.from(t),component:ve(ve({},(i=tm[a])===null||i===void 0?void 0:i.component),o)}}),{token:n,keys:t,flush:r}};function nm(e,t,n){if(typeof n=="function"){var r;return n(Fl(t,(r=t[e])!==null&&r!==void 0?r:{}))}return n??{}}function fI(e){return e==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return"max(".concat(n.map(function(a){return Nr(a)}).join(","),")")},min:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return"min(".concat(n.map(function(a){return Nr(a)}).join(","),")")}}}var mI=1e3*60*10,pI=(function(){function e(){Nn(this,e),te(this,"map",new Map),te(this,"objectIDMap",new WeakMap),te(this,"nextID",0),te(this,"lastAccessBeat",new Map),te(this,"accessBeat",0)}return Dn(e,[{key:"set",value:function(t,n){this.clear();var r=this.getCompositeKey(t);this.map.set(r,n),this.lastAccessBeat.set(r,Date.now())}},{key:"get",value:function(t){var n=this.getCompositeKey(t),r=this.map.get(n);return this.lastAccessBeat.set(n,Date.now()),this.accessBeat+=1,r}},{key:"getCompositeKey",value:function(t){var n=this,r=t.map(function(a){return a&&pt(a)==="object"?"obj_".concat(n.getObjectID(a)):"".concat(pt(a),"_").concat(a)});return r.join("|")}},{key:"getObjectID",value:function(t){if(this.objectIDMap.has(t))return this.objectIDMap.get(t);var n=this.nextID;return this.objectIDMap.set(t,n),this.nextID+=1,n}},{key:"clear",value:function(){var t=this;if(this.accessBeat>1e4){var n=Date.now();this.lastAccessBeat.forEach(function(r,a){n-r>mI&&(t.map.delete(a),t.lastAccessBeat.delete(a))}),this.accessBeat=0}}}]),e})(),rm=new pI;function gI(e,t){return be.useMemo(function(){var n=rm.get(t);if(n)return n;var r=e();return rm.set(t,r),r},t)}var vI=function(){return{}};function hI(e){var t=e.useCSP,n=t===void 0?vI:t,r=e.useToken,a=e.usePrefix,o=e.getResetStyles,i=e.getCommonStyle,l=e.getCompUnitless;function s(g,h,v,m){var p=Array.isArray(g)?g[0]:g;function b(k){return"".concat(String(p)).concat(k.slice(0,1).toUpperCase()).concat(k.slice(1))}var y=(m==null?void 0:m.unitless)||{},x=typeof l=="function"?l(g):{},w=ve(ve({},x),{},te({},b("zIndexPopup"),!0));Object.keys(y).forEach(function(k){w[b(k)]=y[k]});var C=ve(ve({},m),{},{unitless:w,prefixToken:b}),S=u(g,h,v,C),E=c(p,v,C);return function(k){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,O=S(k,$),D=it(O,2),P=D[1],A=E($),N=it(A,2),I=N[0],M=N[1];return[I,P,M]}}function c(g,h,v){var m=v.unitless,p=v.injectStyle,b=p===void 0?!0:p,y=v.prefixToken,x=v.ignore,w=function(S){var E=S.rootCls,k=S.cssVar,$=k===void 0?{}:k,O=r(),D=O.realToken;return xk({path:[g],prefix:$.prefix,key:$.key,unitless:m,ignore:x,token:D,scope:E},function(){var P=nm(g,D,h),A=em(g,D,P,{deprecatedTokens:v==null?void 0:v.deprecatedTokens});return Object.keys(P).forEach(function(N){A[y(N)]=A[N],delete A[N]}),A}),null},C=function(S){var E=r(),k=E.cssVar;return[function($){return b&&k?be.createElement(be.Fragment,null,be.createElement(w,{rootCls:S,cssVar:k,component:g}),$):$},k==null?void 0:k.key]};return C}function u(g,h,v){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},p=Array.isArray(g)?g:[g,g],b=it(p,1),y=b[0],x=p.join("-"),w=e.layer||{name:"antd"};return function(C){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C,E=r(),k=E.theme,$=E.realToken,O=E.hashId,D=E.token,P=E.cssVar,A=a(),N=A.rootPrefixCls,I=A.iconPrefixCls,M=n(),F=P?"css":"js",R=gI(function(){var z=new Set;return P&&Object.keys(m.unitless||{}).forEach(function(K){z.add(Ei(K,P.prefix)),z.add(Ei(K,Xf(y,P.prefix)))}),eI(F,z)},[F,y,P==null?void 0:P.prefix]),T=fI(F),_=T.max,B=T.min,L={theme:k,token:D,hashId:O,nonce:function(){return M.nonce},clientOnly:m.clientOnly,layer:w,order:m.order||-999};typeof o=="function"&&cc(ve(ve({},L),{},{clientOnly:!1,path:["Shared",N]}),function(){return o(D,{prefix:{rootPrefixCls:N,iconPrefixCls:I},csp:M})});var j=cc(ve(ve({},L),{},{path:[x,C,I]}),function(){if(m.injectStyle===!1)return[];var z=dI(D),K=z.token,V=z.flush,G=nm(y,$,v),U=".".concat(C),Z=em(y,$,G,{deprecatedTokens:m.deprecatedTokens});P&&G&&pt(G)==="object"&&Object.keys(G).forEach(function(ce){G[ce]="var(".concat(Ei(ce,Xf(y,P.prefix)),")")});var Q=Fl(K,{componentCls:U,prefixCls:C,iconCls:".".concat(I),antCls:".".concat(N),calc:R,max:_,min:B},P?G:Z),Y=h(Q,{hashId:O,prefixCls:C,rootPrefixCls:N,iconPrefixCls:I});V(y,Z);var ee=typeof i=="function"?i(Q,C,S,m.resetFont):null;return[m.resetStyle===!1?null:ee,Y]});return[j,O]}}function d(g,h,v){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},p=u(g,h,v,ve({resetStyle:!1,order:-998},m)),b=function(y){var x=y.prefixCls,w=y.rootCls,C=w===void 0?x:w;return p(x,C),null};return b}return{genStyleHooks:s,genSubStyleComponent:d,genComponentStyleHook:u}}const yI="5.27.1";function ys(e){return e>=0&&e<=255}function li(e,t){const{r:n,g:r,b:a,a:o}=new Qt(e).toRgb();if(o<1)return e;const{r:i,g:l,b:s}=new Qt(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-i*(1-c))/c),d=Math.round((r-l*(1-c))/c),g=Math.round((a-s*(1-c))/c);if(ys(u)&&ys(d)&&ys(g))return new Qt({r:u,g:d,b:g,a:Math.round(c*100)/100}).toRgbString()}return new Qt({r:n,g:r,b:a,a:1}).toRgbString()}var bI=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};function ch(e){const{override:t}=e,n=bI(e,["override"]),r=Object.assign({},t);Object.keys(Eo).forEach(d=>{delete r[d]});const a=Object.assign(Object.assign({},n),r),o=480,i=576,l=768,s=992,c=1200,u=1600;return a.motion===!1&&(a.motionDurationFast="0s",a.motionDurationMid="0s",a.motionDurationSlow="0s"),Object.assign(Object.assign(Object.assign({},a),{colorFillContent:a.colorFillSecondary,colorFillContentHover:a.colorFill,colorFillAlter:a.colorFillQuaternary,colorBgContainerDisabled:a.colorFillTertiary,colorBorderBg:a.colorBgContainer,colorSplit:li(a.colorBorderSecondary,a.colorBgContainer),colorTextPlaceholder:a.colorTextQuaternary,colorTextDisabled:a.colorTextQuaternary,colorTextHeading:a.colorText,colorTextLabel:a.colorTextSecondary,colorTextDescription:a.colorTextTertiary,colorTextLightSolid:a.colorWhite,colorHighlight:a.colorError,colorBgTextHover:a.colorFillSecondary,colorBgTextActive:a.colorFill,colorIcon:a.colorTextTertiary,colorIconHover:a.colorText,colorErrorOutline:li(a.colorErrorBg,a.colorBgContainer),colorWarningOutline:li(a.colorWarningBg,a.colorBgContainer),fontSizeIcon:a.fontSizeSM,lineWidthFocus:a.lineWidth*3,lineWidth:a.lineWidth,controlOutlineWidth:a.lineWidth*2,controlInteractiveSize:a.controlHeight/2,controlItemBgHover:a.colorFillTertiary,controlItemBgActive:a.colorPrimaryBg,controlItemBgActiveHover:a.colorPrimaryBgHover,controlItemBgActiveDisabled:a.colorFill,controlTmpOutline:a.colorFillQuaternary,controlOutline:li(a.colorPrimaryBg,a.colorBgContainer),lineType:a.lineType,borderRadius:a.borderRadius,borderRadiusXS:a.borderRadiusXS,borderRadiusSM:a.borderRadiusSM,borderRadiusLG:a.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:a.sizeXXS,paddingXS:a.sizeXS,paddingSM:a.sizeSM,padding:a.size,paddingMD:a.sizeMD,paddingLG:a.sizeLG,paddingXL:a.sizeXL,paddingContentHorizontalLG:a.sizeLG,paddingContentVerticalLG:a.sizeMS,paddingContentHorizontal:a.sizeMS,paddingContentVertical:a.sizeSM,paddingContentHorizontalSM:a.size,paddingContentVerticalSM:a.sizeXS,marginXXS:a.sizeXXS,marginXS:a.sizeXS,marginSM:a.sizeSM,margin:a.size,marginMD:a.sizeMD,marginLG:a.sizeLG,marginXL:a.sizeXL,marginXXL:a.sizeXXL,boxShadow:`
|
|
282
282
|
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
283
283
|
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
284
284
|
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
@@ -290,10 +290,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
290
290
|
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
291
291
|
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
292
292
|
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
293
|
-
`,screenXS:o,screenXSMin:o,screenXSMax:i-1,screenSM:i,screenSMMin:i,screenSMMax:
|
|
294
|
-
0 1px 2px -2px ${new
|
|
295
|
-
0 3px 6px 0 ${new
|
|
296
|
-
0 5px 12px 4px ${new
|
|
293
|
+
`,screenXS:o,screenXSMin:o,screenXSMax:i-1,screenSM:i,screenSMMin:i,screenSMMax:l-1,screenMD:l,screenMDMin:l,screenMDMax:s-1,screenLG:s,screenLGMin:s,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
|
|
294
|
+
0 1px 2px -2px ${new Qt("rgba(0, 0, 0, 0.16)").toRgbString()},
|
|
295
|
+
0 3px 6px 0 ${new Qt("rgba(0, 0, 0, 0.12)").toRgbString()},
|
|
296
|
+
0 5px 12px 4px ${new Qt("rgba(0, 0, 0, 0.09)").toRgbString()}
|
|
297
297
|
`,boxShadowDrawerRight:`
|
|
298
298
|
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
299
299
|
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
@@ -310,11 +310,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
310
310
|
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
311
311
|
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
312
312
|
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
313
|
-
`,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)"}),r)}var
|
|
313
|
+
`,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)"}),r)}var am=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const uh={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},xI={motionBase:!0,motionUnit:!0},CI={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},dh=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:a}=t,o=am(t,["override"]);let i=Object.assign(Object.assign({},r),{override:a});return i=ch(i),o&&Object.entries(o).forEach(([l,s])=>{const{theme:c}=s,u=am(s,["theme"]);let d=u;c&&(d=dh(Object.assign(Object.assign({},i),u),{override:u},c)),i[l]=d}),i};function Pl(){const{token:e,hashed:t,theme:n,override:r,cssVar:a}=be.useContext(rh),o=`${yI}-${t||""}`,i=n||nh,[l,s,c]=qE(i,[Eo,e],{salt:o,override:r,getComputedToken:dh,formatToken:ch,cssVar:a&&{prefix:a.prefix,key:a.key,unitless:uh,ignore:xI,preserve:CI}});return[i,c,t?s:"",l,a]}const Gu=(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}),wI=()=>({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"}}),SI=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"}}}),$I=(e,t,n,r)=>{const a=`[class^="${t}"], [class*=" ${t}"]`,o=n?`.${n}`:a,i={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let l={};return r!==!1&&(l={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[o]:Object.assign(Object.assign(Object.assign({},l),i),{[a]:i})}},fh=e=>({[`.${e}`]:Object.assign(Object.assign({},wI()),{[`.${e} .${e}-icon`]:{display:"block"}})}),{genStyleHooks:mh}=hI({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=En(Rr);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,a]=Pl();return{theme:e,realToken:t,hashId:n,token:r,cssVar:a}},useCSP:()=>{const{csp:e}=En(Rr);return e??{}},getResetStyles:(e,t)=>{var n;const r=SI(e);return[r,{"&":r},fh((n=t==null?void 0:t.prefix.iconPrefixCls)!==null&&n!==void 0?n:Ml)]},getCommonStyle:$I,getCompUnitless:()=>uh}),EI=(e,t)=>{const[n,r]=Pl();return cc({token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>fh(e))},kI=Object.assign({},f),{useId:om}=kI,II=()=>"",OI=typeof om>"u"?II:om;function NI(e,t,n){var r;const a=e||{},o=a.inherit===!1||!t?Object.assign(Object.assign({},wc),{hashed:(r=t==null?void 0:t.hashed)!==null&&r!==void 0?r:wc.hashed,cssVar:t==null?void 0:t.cssVar}):t,i=OI();return jv(()=>{var l,s;if(!e)return t;const c=Object.assign({},o.components);Object.keys(e.components||{}).forEach(g=>{c[g]=Object.assign(Object.assign({},c[g]),e.components[g])});const u=`css-var-${i.replace(/:/g,"")}`,d=((l=a.cssVar)!==null&&l!==void 0?l:o.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:n==null?void 0:n.prefixCls},typeof o.cssVar=="object"?o.cssVar:{}),typeof a.cssVar=="object"?a.cssVar:{}),{key:typeof a.cssVar=="object"&&((s=a.cssVar)===null||s===void 0?void 0:s.key)||u});return Object.assign(Object.assign(Object.assign({},o),a),{token:Object.assign(Object.assign({},o.token),a.token),components:c,cssVar:d})},[a,o],(l,s)=>l.some((c,u)=>{const d=s[u];return!rc(c,d,!0)}))}var im={exports:{}};/*!
|
|
314
314
|
Copyright (c) 2018 Jed Watson.
|
|
315
315
|
Licensed under the MIT License (MIT), see
|
|
316
316
|
http://jedwatson.github.io/classnames
|
|
317
|
-
*/var im;function OI(){return im||(im=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",i=0;i<arguments.length;i++){var s=arguments[i];s&&(o=a(o,r(s)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var s in o)t.call(o,s)&&o[s]&&(i=a(i,s));return i}function a(o,i){return i?o?o+" "+i:o+i:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(om)),om.exports}var NI=OI();const tr=iv(NI);function sm(e){return e instanceof HTMLElement||e instanceof SVGElement}function DI(e){return e&&mt(e)==="object"&&sm(e.nativeElement)?e.nativeElement:sm(e)?e:null}function MI(e){var t=DI(e);if(t)return t;if(e instanceof be.Component){var n;return(n=od.findDOMNode)===null||n===void 0?void 0:n.call(od,e)}return null}var FI=["children"],mh=f.createContext({});function PI(e){var t=e.children,n=pr(e,FI);return f.createElement(mh.Provider,{value:n},t)}var jI=(function(e){Ta(n,e);var t=_a(n);function n(){return On(this,n),t.apply(this,arguments)}return Nn(n,[{key:"render",value:function(){return this.props.children}}]),n})(f.Component);function RI(e){var t=f.useReducer(function(s){return s+1},0),n=ot(t,2),r=n[1],a=f.useRef(e),o=Yi(function(){return a.current}),i=Yi(function(s){a.current=typeof s=="function"?s(a.current):s,r()});return[o,i]}var Er="none",si="appear",li="enter",ci="leave",lm="none",Qn="prepare",Ca="start",wa="active",Gu="end",ph="prepared";function cm(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function AI(e,t){var n={animationend:cm("Animation","AnimationEnd"),transitionend:cm("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var TI=AI(yr(),typeof window<"u"?window:{}),gh={};if(yr()){var _I=document.createElement("div");gh=_I.style}var ui={};function vh(e){if(ui[e])return ui[e];var t=TI[e];if(t)for(var n=Object.keys(t),r=n.length,a=0;a<r;a+=1){var o=n[a];if(Object.prototype.hasOwnProperty.call(t,o)&&o in gh)return ui[e]=t[o],ui[e]}return""}var hh=vh("animationend"),yh=vh("transitionend"),bh=!!(hh&&yh),um=hh||"animationend",dm=yh||"transitionend";function fm(e,t){if(!e)return null;if(mt(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const BI=(function(e){var t=wt();function n(a){a&&(a.removeEventListener(dm,e),a.removeEventListener(um,e))}function r(a){t.current&&t.current!==a&&n(t.current),a&&a!==t.current&&(a.addEventListener(dm,e),a.addEventListener(um,e),t.current=a)}return f.useEffect(function(){return function(){n(t.current)}},[]),[r,n]});var xh=yr()?k0:ft,Ch=function(e){return+setTimeout(e,16)},wh=function(e){return clearTimeout(e)};typeof window<"u"&&"requestAnimationFrame"in window&&(Ch=function(e){return window.requestAnimationFrame(e)},wh=function(e){return window.cancelAnimationFrame(e)});var mm=0,Xu=new Map;function Sh(e){Xu.delete(e)}var kc=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;mm+=1;var n=mm;function r(a){if(a===0)Sh(n),e();else{var o=Ch(function(){r(a-1)});Xu.set(n,o)}}return r(t),n};kc.cancel=function(e){var t=Xu.get(e);return Sh(e),wh(t)};const LI=(function(){var e=f.useRef(null);function t(){kc.cancel(e.current)}function n(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var o=kc(function(){a<=1?r({isCanceled:function(){return o!==e.current}}):n(r,a-1)});e.current=o}return f.useEffect(function(){return function(){t()}},[]),[n,t]});var zI=[Qn,Ca,wa,Gu],HI=[Qn,ph],$h=!1,VI=!0;function Eh(e){return e===wa||e===Gu}const KI=(function(e,t,n){var r=$c(lm),a=ot(r,2),o=a[0],i=a[1],s=LI(),l=ot(s,2),c=l[0],u=l[1];function d(){i(Qn,!0)}var g=t?HI:zI;return xh(function(){if(o!==lm&&o!==Gu){var h=g.indexOf(o),v=g[h+1],m=n(o);m===$h?i(v,!0):v&&c(function(p){function b(){p.isCanceled()||i(v,!0)}m===!0?b():Promise.resolve(m).then(b)})}},[e,o]),f.useEffect(function(){return function(){u()}},[]),[d,o]});function WI(e,t,n,r){var a=r.motionEnter,o=a===void 0?!0:a,i=r.motionAppear,s=i===void 0?!0:i,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,d=r.motionLeaveImmediately,g=r.onAppearPrepare,h=r.onEnterPrepare,v=r.onLeavePrepare,m=r.onAppearStart,p=r.onEnterStart,b=r.onLeaveStart,y=r.onAppearActive,x=r.onEnterActive,w=r.onLeaveActive,C=r.onAppearEnd,S=r.onEnterEnd,E=r.onLeaveEnd,k=r.onVisibleChanged,$=$c(),O=ot($,2),D=O[0],P=O[1],R=RI(Er),N=ot(R,2),I=N[0],M=N[1],F=$c(null),j=ot(F,2),A=j[0],_=j[1],L=I(),z=wt(!1),T=wt(null);function H(){return n()}var W=wt(!1);function K(){M(Er),_(null,!0)}var G=Yi(function(he){var ke=I();if(ke!==Er){var de=H();if(!(he&&!he.deadline&&he.target!==de)){var Re=W.current,He;ke===si&&Re?He=C==null?void 0:C(de,he):ke===li&&Re?He=S==null?void 0:S(de,he):ke===ci&&Re&&(He=E==null?void 0:E(de,he)),Re&&He!==!1&&K()}}}),U=BI(G),Z=ot(U,1),Q=Z[0],Y=function(he){switch(he){case si:return te(te(te({},Qn,g),Ca,m),wa,y);case li:return te(te(te({},Qn,h),Ca,p),wa,x);case ci:return te(te(te({},Qn,v),Ca,b),wa,w);default:return{}}},ee=f.useMemo(function(){return Y(L)},[L]),ce=KI(L,!e,function(he){if(he===Qn){var ke=ee[Qn];return ke?ke(H()):$h}if(se in ee){var de;_(((de=ee[se])===null||de===void 0?void 0:de.call(ee,H(),null))||null)}return se===wa&&L!==Er&&(Q(H()),u>0&&(clearTimeout(T.current),T.current=setTimeout(function(){G({deadline:!0})},u))),se===ph&&K(),VI}),me=ot(ce,2),we=me[0],se=me[1],ge=Eh(se);W.current=ge;var Ee=wt(null);xh(function(){if(!(z.current&&Ee.current===t)){P(t);var he=z.current;z.current=!0;var ke;!he&&t&&s&&(ke=si),he&&t&&o&&(ke=li),(he&&!t&&c||!he&&d&&!t&&c)&&(ke=ci);var de=Y(ke);ke&&(e||de[Qn])?(M(ke),we()):M(Er),Ee.current=t}},[t]),ft(function(){(L===si&&!s||L===li&&!o||L===ci&&!c)&&M(Er)},[s,o,c]),ft(function(){return function(){z.current=!1,clearTimeout(T.current)}},[]);var Te=f.useRef(!1);ft(function(){D&&(Te.current=!0),D!==void 0&&L===Er&&((Te.current||D)&&(k==null||k(D)),Te.current=!0)},[D,L]);var Pe=A;return ee[Qn]&&se===Ca&&(Pe=ve({transition:"none"},Pe)),[L,se,Pe,D??t]}function qI(e){var t=e;mt(e)==="object"&&(t=e.transitionSupport);function n(a,o){return!!(a.motionName&&t&&o!==!1)}var r=f.forwardRef(function(a,o){var i=a.visible,s=i===void 0?!0:i,l=a.removeOnLeave,c=l===void 0?!0:l,u=a.forceRender,d=a.children,g=a.motionName,h=a.leavedClassName,v=a.eventProps,m=f.useContext(mh),p=m.motion,b=n(a,p),y=wt(),x=wt();function w(){try{return y.current instanceof HTMLElement?y.current:MI(x.current)}catch{return null}}var C=WI(b,s,w,a),S=ot(C,4),E=S[0],k=S[1],$=S[2],O=S[3],D=f.useRef(O);O&&(D.current=!0);var P=f.useCallback(function(j){y.current=j,oI(o,j)},[o]),R,N=ve(ve({},v),{},{visible:s});if(!d)R=null;else if(E===Er)O?R=d(ve({},N),P):!c&&D.current&&h?R=d(ve(ve({},N),{},{className:h}),P):u||!c&&!h?R=d(ve(ve({},N),{},{style:{display:"none"}}),P):R=null;else{var I;k===Qn?I="prepare":Eh(k)?I="active":k===Ca&&(I="start");var M=fm(g,"".concat(E,"-").concat(I));R=d(ve(ve({},N),{},{className:tr(fm(g,E),te(te({},M,M&&I),g,typeof g=="string")),style:$}),P)}if(f.isValidElement(R)&&iI(R)){var F=sI(R);F||(R=f.cloneElement(R,{ref:P}))}return f.createElement(jI,{ref:x},R)});return r.displayName="CSSMotion",r}const UI=qI(bh);var Ic="add",Oc="keep",Nc="remove",yl="removed";function YI(e){var t;return e&&mt(e)==="object"&&"key"in e?t=e:t={key:e},ve(ve({},t),{},{key:String(t.key)})}function Dc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(YI)}function GI(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,a=t.length,o=Dc(e),i=Dc(t);o.forEach(function(c){for(var u=!1,d=r;d<a;d+=1){var g=i[d];if(g.key===c.key){r<d&&(n=n.concat(i.slice(r,d).map(function(h){return ve(ve({},h),{},{status:Ic})})),r=d),n.push(ve(ve({},g),{},{status:Oc})),r+=1,u=!0;break}}u||n.push(ve(ve({},c),{},{status:Nc}))}),r<a&&(n=n.concat(i.slice(r).map(function(c){return ve(ve({},c),{},{status:Ic})})));var s={};n.forEach(function(c){var u=c.key;s[u]=(s[u]||0)+1});var l=Object.keys(s).filter(function(c){return s[c]>1});return l.forEach(function(c){n=n.filter(function(u){var d=u.key,g=u.status;return d!==c||g!==Nc}),n.forEach(function(u){u.key===c&&(u.status=Oc)})}),n}var XI=["component","children","onVisibleChanged","onAllRemoved"],JI=["status"],QI=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function ZI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:UI,n=(function(r){Ta(o,r);var a=_a(o);function o(){var i;On(this,o);for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=a.call.apply(a,[this].concat(l)),te(xt(i),"state",{keyEntities:[]}),te(xt(i),"removeKey",function(u){i.setState(function(d){var g=d.keyEntities.map(function(h){return h.key!==u?h:ve(ve({},h),{},{status:yl})});return{keyEntities:g}},function(){var d=i.state.keyEntities,g=d.filter(function(h){var v=h.status;return v!==yl}).length;g===0&&i.props.onAllRemoved&&i.props.onAllRemoved()})}),i}return Nn(o,[{key:"render",value:function(){var i=this,s=this.state.keyEntities,l=this.props,c=l.component,u=l.children,d=l.onVisibleChanged,g=pr(l,XI),h=c||f.Fragment,v={};return QI.forEach(function(m){v[m]=g[m],delete g[m]}),delete g.keys,f.createElement(h,g,s.map(function(m,p){var b=m.status,y=pr(m,JI),x=b===Ic||b===Oc;return f.createElement(t,vn({},v,{key:y.key,visible:x,eventProps:y,onVisibleChanged:function(w){d==null||d(w,{key:y.key}),w||i.removeKey(y.key)}}),function(w,C){return u(ve(ve({},w),{},{index:p}),C)})}))}}],[{key:"getDerivedStateFromProps",value:function(i,s){var l=i.keys,c=s.keyEntities,u=Dc(l),d=GI(c,u);return{keyEntities:d.filter(function(g){var h=c.find(function(v){var m=v.key;return g.key===m});return!(h&&h.status===yl&&g.status===Nc)})}}}]),o})(f.Component);return te(n,"defaultProps",{component:"div"}),n}const eO=ZI(bh),pm=f.createContext(!0);function tO(e){const t=f.useContext(pm),{children:n}=e,[,r]=Fs(),{motion:a}=r,o=f.useRef(!1);return o.current||(o.current=t!==a),o.current?f.createElement(pm.Provider,{value:a},f.createElement(PI,{motion:a},n)):n}const nO=()=>null;var rO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const aO=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let Ju,kh,Ih,Oh;function Ni(){return Ju||wc}function oO(){return kh||Ds}function iO(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const sO=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:a}=e;t!==void 0&&(Ju=t),n!==void 0&&(kh=n),"holderRender"in e&&(Oh=a),r&&(iO(r)?Wk(Ni(),r):Ih=r)},lO=()=>({getPrefixCls:(e,t)=>t||(e?`${Ni()}-${e}`:Ni()),getIconPrefixCls:oO,getRootPrefixCls:()=>Ju||Ni(),getTheme:()=>Ih,holderRender:Oh}),cO=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:a,anchor:o,form:i,locale:s,componentSize:l,direction:c,space:u,splitter:d,virtual:g,dropdownMatchSelectWidth:h,popupMatchSelectWidth:v,popupOverflow:m,legacyLocale:p,parentContext:b,iconPrefixCls:y,theme:x,componentDisabled:w,segmented:C,statistic:S,spin:E,calendar:k,carousel:$,cascader:O,collapse:D,typography:P,checkbox:R,descriptions:N,divider:I,drawer:M,skeleton:F,steps:j,image:A,layout:_,list:L,mentions:z,modal:T,progress:H,result:W,slider:K,breadcrumb:G,menu:U,pagination:Z,input:Q,textArea:Y,empty:ee,badge:ce,radio:me,rate:we,switch:se,transfer:ge,avatar:Ee,message:Te,tag:Pe,table:he,card:ke,tabs:de,timeline:Re,timePicker:He,upload:Ke,notification:tt,tree:qe,colorPicker:We,datePicker:lt,rangePicker:Fe,flex:ae,wave:Le,dropdown:Ce,warning:$e,tour:ue,tooltip:ie,popover:xe,popconfirm:_e,floatButton:ze,floatButtonGroup:st,variant:Ne,inputNumber:Ie,treeSelect:Ue}=e,Ye=f.useCallback((V,ne)=>{const{prefixCls:le}=e;if(ne)return ne;const Se=le||b.getPrefixCls("");return V?`${Se}-${V}`:Se},[b.getPrefixCls,e.prefixCls]),bt=y||b.iconPrefixCls||Ds,At=n||b.csp;SI(bt,At);const Ht=II(x,b.theme,{prefixCls:Ye("")}),Ft={csp:At,autoInsertSpaceInButton:r,alert:a,anchor:o,locale:s||p,direction:c,space:u,splitter:d,virtual:g,popupMatchSelectWidth:v??h,popupOverflow:m,getPrefixCls:Ye,iconPrefixCls:bt,theme:Ht,segmented:C,statistic:S,spin:E,calendar:k,carousel:$,cascader:O,collapse:D,typography:P,checkbox:R,descriptions:N,divider:I,drawer:M,skeleton:F,steps:j,image:A,input:Q,textArea:Y,layout:_,list:L,mentions:z,modal:T,progress:H,result:W,slider:K,breadcrumb:G,menu:U,pagination:Z,empty:ee,badge:ce,radio:me,rate:we,switch:se,transfer:ge,avatar:Ee,message:Te,tag:Pe,table:he,card:ke,tabs:de,timeline:Re,timePicker:He,upload:Ke,notification:tt,tree:qe,colorPicker:We,datePicker:lt,rangePicker:Fe,flex:ae,wave:Le,dropdown:Ce,warning:$e,tour:ue,tooltip:ie,popover:xe,popconfirm:_e,floatButton:ze,floatButtonGroup:st,variant:Ne,inputNumber:Ie,treeSelect:Ue},Yt=Object.assign({},b);Object.keys(Ft).forEach(V=>{Ft[V]!==void 0&&(Yt[V]=Ft[V])}),aO.forEach(V=>{const ne=e[V];ne&&(Yt[V]=ne)}),typeof r<"u"&&(Yt.button=Object.assign({autoInsertSpace:r},Yt.button));const Tt=Av(()=>Yt,Yt,(V,ne)=>{const le=Object.keys(V),Se=Object.keys(ne);return le.length!==Se.length||le.some(Ae=>V[Ae]!==ne[Ae])}),{layer:tn}=f.useContext(Lo),un=f.useMemo(()=>({prefixCls:bt,csp:At,layer:tn?"antd":void 0}),[bt,At,tn]);let Pt=f.createElement(f.Fragment,null,f.createElement(nO,{dropdownMatchSelectWidth:h}),t);const Tn=f.useMemo(()=>{var V,ne,le,Se;return xa(((V=Ns.Form)===null||V===void 0?void 0:V.defaultValidateMessages)||{},((le=(ne=Tt.locale)===null||ne===void 0?void 0:ne.Form)===null||le===void 0?void 0:le.defaultValidateMessages)||{},((Se=Tt.form)===null||Se===void 0?void 0:Se.validateMessages)||{},(i==null?void 0:i.validateMessages)||{})},[Tt,i==null?void 0:i.validateMessages]);Object.keys(Tn).length>0&&(Pt=f.createElement(Sk.Provider,{value:Tn},Pt)),s&&(Pt=f.createElement(kk,{locale:s,_ANT_MARK__:Ek},Pt)),Pt=f.createElement(Uu.Provider,{value:un},Pt),l&&(Pt=f.createElement(Uk,{size:l},Pt)),Pt=f.createElement(tO,null,Pt);const q=f.useMemo(()=>{const V=Ht||{},{algorithm:ne,token:le,components:Se,cssVar:Ae}=V,ct=rO(V,["algorithm","token","components","cssVar"]),Qe=ne&&(!Array.isArray(ne)||ne.length>0)?ac(ne):th,it={};Object.entries(Se||{}).forEach(([Ve,ht])=>{const Ze=Object.assign({},ht);"algorithm"in Ze&&(Ze.algorithm===!0?Ze.theme=Qe:(Array.isArray(Ze.algorithm)||typeof Ze.algorithm=="function")&&(Ze.theme=ac(Ze.algorithm)),delete Ze.algorithm),it[Ve]=Ze});const gt=Object.assign(Object.assign({},$o),le);return Object.assign(Object.assign({},ct),{theme:Qe,token:gt,components:it,override:Object.assign({override:gt},it),cssVar:Ae})},[Ht]);return x&&(Pt=f.createElement(nh.Provider,{value:q},Pt)),Tt.warning&&(Pt=f.createElement(wk.Provider,{value:Tt.warning},Pt)),w!==void 0&&(Pt=f.createElement(qk,{disabled:w},Pt)),f.createElement(Pr.Provider,{value:Tt},Pt)},La=e=>{const t=f.useContext(Pr),n=f.useContext(Jv);return f.createElement(cO,Object.assign({parentContext:t,legacyLocale:n},e))};La.ConfigContext=Pr;La.SizeContext=ko;La.config=sO;La.useConfig=Yk;Object.defineProperty(La,"SizeContext",{get:()=>ko});function Nh(e,t){this.v=e,this.k=t}function yn(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch{a=0}yn=function(o,i,s,l){function c(u,d){yn(o,u,function(g){return this._invoke(u,d,g)})}i?a?a(o,i,{value:s,enumerable:!l,configurable:!l,writable:!l}):o[i]=s:(c("next",0),c("throw",1),c("return",2))},yn(e,t,n,r)}function Qu(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(h,v,m,p){var b=v&&v.prototype instanceof s?v:s,y=Object.create(b.prototype);return yn(y,"_invoke",(function(x,w,C){var S,E,k,$=0,O=C||[],D=!1,P={p:0,n:0,v:e,a:R,f:R.bind(e,4),d:function(N,I){return S=N,E=0,k=e,P.n=I,i}};function R(N,I){for(E=N,k=I,t=0;!D&&$&&!M&&t<O.length;t++){var M,F=O[t],j=P.p,A=F[2];N>3?(M=A===I)&&(k=F[(E=F[4])?5:(E=3,3)],F[4]=F[5]=e):F[0]<=j&&((M=N<2&&j<F[1])?(E=0,P.v=I,P.n=F[1]):j<A&&(M=N<3||F[0]>I||I>A)&&(F[4]=N,F[5]=I,P.n=A,E=0))}if(M||N>1)return i;throw D=!0,I}return function(N,I,M){if($>1)throw TypeError("Generator is already running");for(D&&I===1&&R(I,M),E=I,k=M;(t=E<2?e:k)||!D;){S||(E?E<3?(E>1&&(P.n=-1),R(E,k)):P.n=k:P.v=k);try{if($=2,S){if(E||(N="next"),t=S[N]){if(!(t=t.call(S,k)))throw TypeError("iterator result is not an object");if(!t.done)return t;k=t.value,E<2&&(E=0)}else E===1&&(t=S.return)&&t.call(S),E<2&&(k=TypeError("The iterator does not provide a '"+N+"' method"),E=1);S=e}else if((t=(D=P.n<0)?k:x.call(w,P))!==i)break}catch(F){S=e,E=1,k=F}finally{$=1}}return{value:t,done:D}}})(h,m,p),!0),y}var i={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(yn(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function g(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,yn(h,a,"GeneratorFunction")),h.prototype=Object.create(d),h}return l.prototype=c,yn(d,"constructor",c),yn(c,"constructor",l),l.displayName="GeneratorFunction",yn(c,a,"GeneratorFunction"),yn(d),yn(d,a,"Generator"),yn(d,r,function(){return this}),yn(d,"toString",function(){return"[object Generator]"}),(Qu=function(){return{w:o,m:g}})()}function Gi(e,t){function n(a,o,i,s){try{var l=e[a](o),c=l.value;return c instanceof Nh?t.resolve(c.v).then(function(u){n("next",u,i,s)},function(u){n("throw",u,i,s)}):t.resolve(c).then(function(u){l.value=u,i(l)},function(u){return n("throw",u,i,s)})}catch(u){s(u)}}var r;this.next||(yn(Gi.prototype),yn(Gi.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),yn(this,"_invoke",function(a,o,i){function s(){return new t(function(l,c){n(a,i,l,c)})}return r=r?r.then(s,s):s()},!0)}function Dh(e,t,n,r,a){return new Gi(Qu().w(e,t,n,r),a||Promise)}function uO(e,t,n,r,a){var o=Dh(e,t,n,r,a);return o.next().then(function(i){return i.done?i.value:o.next()})}function dO(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function a(){for(;n.length;)if((r=n.pop())in t)return a.value=r,a.done=!1,a;return a.done=!0,a}}function gm(e){if(e!=null){var t=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(mt(e)+" is not iterable")}function En(){var e=Qu(),t=e.m(En),n=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function r(i){var s=typeof i=="function"&&i.constructor;return!!s&&(s===n||(s.displayName||s.name)==="GeneratorFunction")}var a={throw:1,return:2,break:3,continue:3};function o(i){var s,l;return function(c){s||(s={stop:function(){return l(c.a,2)},catch:function(){return c.v},abrupt:function(u,d){return l(c.a,a[u],d)},delegateYield:function(u,d,g){return s.resultName=d,l(c.d,gm(u),g)},finish:function(u){return l(c.f,u)}},l=function(u,d,g){c.p=s.prev,c.n=s.next;try{return u(d,g)}finally{s.next=c.n}}),s.resultName&&(s[s.resultName]=c.v,s.resultName=void 0),s.sent=c.v,s.next=c.n;try{return i.call(this,s)}finally{c.p=s.prev,c.n=s.next}}}return(En=function(){return{wrap:function(i,s,l,c){return e.w(o(i),s,l,c&&c.reverse())},isGeneratorFunction:r,mark:e.m,awrap:function(i,s){return new Nh(i,s)},AsyncIterator:Gi,async:function(i,s,l,c,u){return(r(s)?Dh:uO)(o(i),s,l,c,u)},keys:dO,values:gm}})()}function vm(e,t,n,r,a,o,i){try{var s=e[o](i),l=s.value}catch(c){return void n(c)}s.done?t(l):Promise.resolve(l).then(r,a)}function fa(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(l){vm(o,r,a,i,s,"next",l)}function s(l){vm(o,r,a,i,s,"throw",l)}i(void 0)})}}var zo=ve({},N0),fO=zo.version,bl=zo.render,mO=zo.unmountComponentAtNode,Ps;try{var pO=Number((fO||"").split(".")[0]);pO>=18&&(Ps=zo.createRoot)}catch{}function hm(e){var t=zo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&mt(t)==="object"&&(t.usingClientEntryPoint=e)}var Xi="__rc_react_root__";function gO(e,t){hm(!0);var n=t[Xi]||Ps(t);hm(!1),n.render(e),t[Xi]=n}function vO(e,t){bl==null||bl(e,t)}function hO(e,t){if(Ps){gO(e,t);return}vO(e,t)}function yO(e){return Mc.apply(this,arguments)}function Mc(){return Mc=fa(En().mark(function e(t){return En().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.resolve().then(function(){var r;(r=t[Xi])===null||r===void 0||r.unmount(),delete t[Xi]}));case 1:case"end":return n.stop()}},e)})),Mc.apply(this,arguments)}function bO(e){mO(e)}function xO(e){return Fc.apply(this,arguments)}function Fc(){return Fc=fa(En().mark(function e(t){return En().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(Ps===void 0){n.next=2;break}return n.abrupt("return",yO(t));case 2:bO(t);case 3:case"end":return n.stop()}},e)})),Fc.apply(this,arguments)}const CO=(e,t)=>(hO(e,t),()=>xO(t));let wO=CO;function SO(e){return wO}var $O={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function Mh(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function EO(e){return Mh(e)instanceof ShadowRoot}function kO(e){return EO(e)?Mh(e):null}function IO(e){return e.replace(/-(.)/g,function(t,n){return n.toUpperCase()})}function OO(e,t){zn(e,"[@ant-design/icons] ".concat(t))}function ym(e){return mt(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(mt(e.icon)==="object"||typeof e.icon=="function")}function bm(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[IO(n)]=r}return t},{})}function Pc(e,t,n){return n?be.createElement(e.tag,ve(ve({key:t},bm(e.attrs)),n),(e.children||[]).map(function(r,a){return Pc(r,"".concat(t,"-").concat(e.tag,"-").concat(a))})):be.createElement(e.tag,ve({key:t},bm(e.attrs)),(e.children||[]).map(function(r,a){return Pc(r,"".concat(t,"-").concat(e.tag,"-").concat(a))}))}function Fh(e){return Eo(e)[0]}function Ph(e){return e?Array.isArray(e)?e:[e]:[]}var NO=`
|
|
317
|
+
*/var lm;function DI(){return lm||(lm=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",i=0;i<arguments.length;i++){var l=arguments[i];l&&(o=a(o,r(l)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var l in o)t.call(o,l)&&o[l]&&(i=a(i,l));return i}function a(o,i){return i?o?o+" "+i:o+i:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(im)),im.exports}var MI=DI();const nr=lv(MI);function sm(e){return e instanceof HTMLElement||e instanceof SVGElement}function FI(e){return e&&pt(e)==="object"&&sm(e.nativeElement)?e.nativeElement:sm(e)?e:null}function PI(e){var t=FI(e);if(t)return t;if(e instanceof be.Component){var n;return(n=id.findDOMNode)===null||n===void 0?void 0:n.call(id,e)}return null}var RI=["children"],ph=f.createContext({});function AI(e){var t=e.children,n=gr(e,RI);return f.createElement(ph.Provider,{value:n},t)}var TI=(function(e){_a(n,e);var t=Ba(n);function n(){return Nn(this,n),t.apply(this,arguments)}return Dn(n,[{key:"render",value:function(){return this.props.children}}]),n})(f.Component);function jI(e){var t=f.useReducer(function(l){return l+1},0),n=it(t,2),r=n[1],a=f.useRef(e),o=Gi(function(){return a.current}),i=Gi(function(l){a.current=typeof l=="function"?l(a.current):l,r()});return[o,i]}var kr="none",si="appear",ci="enter",ui="leave",cm="none",Zn="prepare",wa="start",Sa="active",Xu="end",gh="prepared";function um(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function _I(e,t){var n={animationend:um("Animation","AnimationEnd"),transitionend:um("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var BI=_I(br(),typeof window<"u"?window:{}),vh={};if(br()){var LI=document.createElement("div");vh=LI.style}var di={};function hh(e){if(di[e])return di[e];var t=BI[e];if(t)for(var n=Object.keys(t),r=n.length,a=0;a<r;a+=1){var o=n[a];if(Object.prototype.hasOwnProperty.call(t,o)&&o in vh)return di[e]=t[o],di[e]}return""}var yh=hh("animationend"),bh=hh("transitionend"),xh=!!(yh&&bh),dm=yh||"animationend",fm=bh||"transitionend";function mm(e,t){if(!e)return null;if(pt(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const zI=(function(e){var t=St();function n(a){a&&(a.removeEventListener(fm,e),a.removeEventListener(dm,e))}function r(a){t.current&&t.current!==a&&n(t.current),a&&a!==t.current&&(a.addEventListener(fm,e),a.addEventListener(dm,e),t.current=a)}return f.useEffect(function(){return function(){n(t.current)}},[]),[r,n]});var Ch=br()?O0:mt,wh=function(e){return+setTimeout(e,16)},Sh=function(e){return clearTimeout(e)};typeof window<"u"&&"requestAnimationFrame"in window&&(wh=function(e){return window.requestAnimationFrame(e)},Sh=function(e){return window.cancelAnimationFrame(e)});var pm=0,Ju=new Map;function $h(e){Ju.delete(e)}var Ic=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;pm+=1;var n=pm;function r(a){if(a===0)$h(n),e();else{var o=wh(function(){r(a-1)});Ju.set(n,o)}}return r(t),n};Ic.cancel=function(e){var t=Ju.get(e);return $h(e),Sh(t)};const HI=(function(){var e=f.useRef(null);function t(){Ic.cancel(e.current)}function n(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var o=Ic(function(){a<=1?r({isCanceled:function(){return o!==e.current}}):n(r,a-1)});e.current=o}return f.useEffect(function(){return function(){t()}},[]),[n,t]});var VI=[Zn,wa,Sa,Xu],KI=[Zn,gh],Eh=!1,WI=!0;function kh(e){return e===Sa||e===Xu}const qI=(function(e,t,n){var r=Ec(cm),a=it(r,2),o=a[0],i=a[1],l=HI(),s=it(l,2),c=s[0],u=s[1];function d(){i(Zn,!0)}var g=t?KI:VI;return Ch(function(){if(o!==cm&&o!==Xu){var h=g.indexOf(o),v=g[h+1],m=n(o);m===Eh?i(v,!0):v&&c(function(p){function b(){p.isCanceled()||i(v,!0)}m===!0?b():Promise.resolve(m).then(b)})}},[e,o]),f.useEffect(function(){return function(){u()}},[]),[d,o]});function UI(e,t,n,r){var a=r.motionEnter,o=a===void 0?!0:a,i=r.motionAppear,l=i===void 0?!0:i,s=r.motionLeave,c=s===void 0?!0:s,u=r.motionDeadline,d=r.motionLeaveImmediately,g=r.onAppearPrepare,h=r.onEnterPrepare,v=r.onLeavePrepare,m=r.onAppearStart,p=r.onEnterStart,b=r.onLeaveStart,y=r.onAppearActive,x=r.onEnterActive,w=r.onLeaveActive,C=r.onAppearEnd,S=r.onEnterEnd,E=r.onLeaveEnd,k=r.onVisibleChanged,$=Ec(),O=it($,2),D=O[0],P=O[1],A=jI(kr),N=it(A,2),I=N[0],M=N[1],F=Ec(null),R=it(F,2),T=R[0],_=R[1],B=I(),L=St(!1),j=St(null);function z(){return n()}var K=St(!1);function V(){M(kr),_(null,!0)}var G=Gi(function(he){var ke=I();if(ke!==kr){var de=z();if(!(he&&!he.deadline&&he.target!==de)){var Te=K.current,Ve;ke===si&&Te?Ve=C==null?void 0:C(de,he):ke===ci&&Te?Ve=S==null?void 0:S(de,he):ke===ui&&Te&&(Ve=E==null?void 0:E(de,he)),Te&&Ve!==!1&&V()}}}),U=zI(G),Z=it(U,1),Q=Z[0],Y=function(he){switch(he){case si:return te(te(te({},Zn,g),wa,m),Sa,y);case ci:return te(te(te({},Zn,h),wa,p),Sa,x);case ui:return te(te(te({},Zn,v),wa,b),Sa,w);default:return{}}},ee=f.useMemo(function(){return Y(B)},[B]),ce=qI(B,!e,function(he){if(he===Zn){var ke=ee[Zn];return ke?ke(z()):Eh}if(le in ee){var de;_(((de=ee[le])===null||de===void 0?void 0:de.call(ee,z(),null))||null)}return le===Sa&&B!==kr&&(Q(z()),u>0&&(clearTimeout(j.current),j.current=setTimeout(function(){G({deadline:!0})},u))),le===gh&&V(),WI}),me=it(ce,2),we=me[0],le=me[1],ge=kh(le);K.current=ge;var Ee=St(null);Ch(function(){if(!(L.current&&Ee.current===t)){P(t);var he=L.current;L.current=!0;var ke;!he&&t&&l&&(ke=si),he&&t&&o&&(ke=ci),(he&&!t&&c||!he&&d&&!t&&c)&&(ke=ui);var de=Y(ke);ke&&(e||de[Zn])?(M(ke),we()):M(kr),Ee.current=t}},[t]),mt(function(){(B===si&&!l||B===ci&&!o||B===ui&&!c)&&M(kr)},[l,o,c]),mt(function(){return function(){L.current=!1,clearTimeout(j.current)}},[]);var _e=f.useRef(!1);mt(function(){D&&(_e.current=!0),D!==void 0&&B===kr&&((_e.current||D)&&(k==null||k(D)),_e.current=!0)},[D,B]);var Re=T;return ee[Zn]&&le===wa&&(Re=ve({transition:"none"},Re)),[B,le,Re,D??t]}function YI(e){var t=e;pt(e)==="object"&&(t=e.transitionSupport);function n(a,o){return!!(a.motionName&&t&&o!==!1)}var r=f.forwardRef(function(a,o){var i=a.visible,l=i===void 0?!0:i,s=a.removeOnLeave,c=s===void 0?!0:s,u=a.forceRender,d=a.children,g=a.motionName,h=a.leavedClassName,v=a.eventProps,m=f.useContext(ph),p=m.motion,b=n(a,p),y=St(),x=St();function w(){try{return y.current instanceof HTMLElement?y.current:PI(x.current)}catch{return null}}var C=UI(b,l,w,a),S=it(C,4),E=S[0],k=S[1],$=S[2],O=S[3],D=f.useRef(O);O&&(D.current=!0);var P=f.useCallback(function(R){y.current=R,lI(o,R)},[o]),A,N=ve(ve({},v),{},{visible:l});if(!d)A=null;else if(E===kr)O?A=d(ve({},N),P):!c&&D.current&&h?A=d(ve(ve({},N),{},{className:h}),P):u||!c&&!h?A=d(ve(ve({},N),{},{style:{display:"none"}}),P):A=null;else{var I;k===Zn?I="prepare":kh(k)?I="active":k===wa&&(I="start");var M=mm(g,"".concat(E,"-").concat(I));A=d(ve(ve({},N),{},{className:nr(mm(g,E),te(te({},M,M&&I),g,typeof g=="string")),style:$}),P)}if(f.isValidElement(A)&&sI(A)){var F=cI(A);F||(A=f.cloneElement(A,{ref:P}))}return f.createElement(TI,{ref:x},A)});return r.displayName="CSSMotion",r}const GI=YI(xh);var Oc="add",Nc="keep",Dc="remove",bs="removed";function XI(e){var t;return e&&pt(e)==="object"&&"key"in e?t=e:t={key:e},ve(ve({},t),{},{key:String(t.key)})}function Mc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(XI)}function JI(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,a=t.length,o=Mc(e),i=Mc(t);o.forEach(function(c){for(var u=!1,d=r;d<a;d+=1){var g=i[d];if(g.key===c.key){r<d&&(n=n.concat(i.slice(r,d).map(function(h){return ve(ve({},h),{},{status:Oc})})),r=d),n.push(ve(ve({},g),{},{status:Nc})),r+=1,u=!0;break}}u||n.push(ve(ve({},c),{},{status:Dc}))}),r<a&&(n=n.concat(i.slice(r).map(function(c){return ve(ve({},c),{},{status:Oc})})));var l={};n.forEach(function(c){var u=c.key;l[u]=(l[u]||0)+1});var s=Object.keys(l).filter(function(c){return l[c]>1});return s.forEach(function(c){n=n.filter(function(u){var d=u.key,g=u.status;return d!==c||g!==Dc}),n.forEach(function(u){u.key===c&&(u.status=Nc)})}),n}var QI=["component","children","onVisibleChanged","onAllRemoved"],ZI=["status"],eO=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function tO(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:GI,n=(function(r){_a(o,r);var a=Ba(o);function o(){var i;Nn(this,o);for(var l=arguments.length,s=new Array(l),c=0;c<l;c++)s[c]=arguments[c];return i=a.call.apply(a,[this].concat(s)),te(Ct(i),"state",{keyEntities:[]}),te(Ct(i),"removeKey",function(u){i.setState(function(d){var g=d.keyEntities.map(function(h){return h.key!==u?h:ve(ve({},h),{},{status:bs})});return{keyEntities:g}},function(){var d=i.state.keyEntities,g=d.filter(function(h){var v=h.status;return v!==bs}).length;g===0&&i.props.onAllRemoved&&i.props.onAllRemoved()})}),i}return Dn(o,[{key:"render",value:function(){var i=this,l=this.state.keyEntities,s=this.props,c=s.component,u=s.children,d=s.onVisibleChanged,g=gr(s,QI),h=c||f.Fragment,v={};return eO.forEach(function(m){v[m]=g[m],delete g[m]}),delete g.keys,f.createElement(h,g,l.map(function(m,p){var b=m.status,y=gr(m,ZI),x=b===Oc||b===Nc;return f.createElement(t,hn({},v,{key:y.key,visible:x,eventProps:y,onVisibleChanged:function(w){d==null||d(w,{key:y.key}),w||i.removeKey(y.key)}}),function(w,C){return u(ve(ve({},w),{},{index:p}),C)})}))}}],[{key:"getDerivedStateFromProps",value:function(i,l){var s=i.keys,c=l.keyEntities,u=Mc(s),d=JI(c,u);return{keyEntities:d.filter(function(g){var h=c.find(function(v){var m=v.key;return g.key===m});return!(h&&h.status===bs&&g.status===Dc)})}}}]),o})(f.Component);return te(n,"defaultProps",{component:"div"}),n}const nO=tO(xh),gm=f.createContext(!0);function rO(e){const t=f.useContext(gm),{children:n}=e,[,r]=Pl(),{motion:a}=r,o=f.useRef(!1);return o.current||(o.current=t!==a),o.current?f.createElement(gm.Provider,{value:a},f.createElement(AI,{motion:a},n)):n}const aO=()=>null;var oO=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const iO=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let Qu,Ih,Oh,Nh;function Di(){return Qu||Sc}function lO(){return Ih||Ml}function sO(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const cO=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:a}=e;t!==void 0&&(Qu=t),n!==void 0&&(Ih=n),"holderRender"in e&&(Nh=a),r&&(sO(r)?Uk(Di(),r):Oh=r)},uO=()=>({getPrefixCls:(e,t)=>t||(e?`${Di()}-${e}`:Di()),getIconPrefixCls:lO,getRootPrefixCls:()=>Qu||Di(),getTheme:()=>Oh,holderRender:Nh}),dO=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:a,anchor:o,form:i,locale:l,componentSize:s,direction:c,space:u,splitter:d,virtual:g,dropdownMatchSelectWidth:h,popupMatchSelectWidth:v,popupOverflow:m,legacyLocale:p,parentContext:b,iconPrefixCls:y,theme:x,componentDisabled:w,segmented:C,statistic:S,spin:E,calendar:k,carousel:$,cascader:O,collapse:D,typography:P,checkbox:A,descriptions:N,divider:I,drawer:M,skeleton:F,steps:R,image:T,layout:_,list:B,mentions:L,modal:j,progress:z,result:K,slider:V,breadcrumb:G,menu:U,pagination:Z,input:Q,textArea:Y,empty:ee,badge:ce,radio:me,rate:we,switch:le,transfer:ge,avatar:Ee,message:_e,tag:Re,table:he,card:ke,tabs:de,timeline:Te,timePicker:Ve,upload:We,notification:nt,tree:Ue,colorPicker:qe,datePicker:ct,rangePicker:Fe,flex:ae,wave:ze,dropdown:Ce,warning:$e,tour:ue,tooltip:ie,popover:xe,popconfirm:Be,floatButton:He,floatButtonGroup:st,variant:Ne,inputNumber:Ie,treeSelect:Ye}=e,Ge=f.useCallback((H,ne)=>{const{prefixCls:se}=e;if(ne)return ne;const Se=se||b.getPrefixCls("");return H?`${Se}-${H}`:Se},[b.getPrefixCls,e.prefixCls]),xt=y||b.iconPrefixCls||Ml,jt=n||b.csp;EI(xt,jt);const Vt=NI(x,b.theme,{prefixCls:Ge("")}),Pt={csp:jt,autoInsertSpaceInButton:r,alert:a,anchor:o,locale:l||p,direction:c,space:u,splitter:d,virtual:g,popupMatchSelectWidth:v??h,popupOverflow:m,getPrefixCls:Ge,iconPrefixCls:xt,theme:Vt,segmented:C,statistic:S,spin:E,calendar:k,carousel:$,cascader:O,collapse:D,typography:P,checkbox:A,descriptions:N,divider:I,drawer:M,skeleton:F,steps:R,image:T,input:Q,textArea:Y,layout:_,list:B,mentions:L,modal:j,progress:z,result:K,slider:V,breadcrumb:G,menu:U,pagination:Z,empty:ee,badge:ce,radio:me,rate:we,switch:le,transfer:ge,avatar:Ee,message:_e,tag:Re,table:he,card:ke,tabs:de,timeline:Te,timePicker:Ve,upload:We,notification:nt,tree:Ue,colorPicker:qe,datePicker:ct,rangePicker:Fe,flex:ae,wave:ze,dropdown:Ce,warning:$e,tour:ue,tooltip:ie,popover:xe,popconfirm:Be,floatButton:He,floatButtonGroup:st,variant:Ne,inputNumber:Ie,treeSelect:Ye},Gt=Object.assign({},b);Object.keys(Pt).forEach(H=>{Pt[H]!==void 0&&(Gt[H]=Pt[H])}),iO.forEach(H=>{const ne=e[H];ne&&(Gt[H]=ne)}),typeof r<"u"&&(Gt.button=Object.assign({autoInsertSpace:r},Gt.button));const _t=jv(()=>Gt,Gt,(H,ne)=>{const se=Object.keys(H),Se=Object.keys(ne);return se.length!==Se.length||se.some(je=>H[je]!==ne[je])}),{layer:nn}=f.useContext(zo),dn=f.useMemo(()=>({prefixCls:xt,csp:jt,layer:nn?"antd":void 0}),[xt,jt,nn]);let Rt=f.createElement(f.Fragment,null,f.createElement(aO,{dropdownMatchSelectWidth:h}),t);const _n=f.useMemo(()=>{var H,ne,se,Se;return Ca(((H=Dl.Form)===null||H===void 0?void 0:H.defaultValidateMessages)||{},((se=(ne=_t.locale)===null||ne===void 0?void 0:ne.Form)===null||se===void 0?void 0:se.defaultValidateMessages)||{},((Se=_t.form)===null||Se===void 0?void 0:Se.validateMessages)||{},(i==null?void 0:i.validateMessages)||{})},[_t,i==null?void 0:i.validateMessages]);Object.keys(_n).length>0&&(Rt=f.createElement(Ek.Provider,{value:_n},Rt)),l&&(Rt=f.createElement(Ok,{locale:l,_ANT_MARK__:Ik},Rt)),Rt=f.createElement(Yu.Provider,{value:dn},Rt),s&&(Rt=f.createElement(Gk,{size:s},Rt)),Rt=f.createElement(rO,null,Rt);const q=f.useMemo(()=>{const H=Vt||{},{algorithm:ne,token:se,components:Se,cssVar:je}=H,ut=oO(H,["algorithm","token","components","cssVar"]),Ze=ne&&(!Array.isArray(ne)||ne.length>0)?oc(ne):nh,lt={};Object.entries(Se||{}).forEach(([Ke,yt])=>{const et=Object.assign({},yt);"algorithm"in et&&(et.algorithm===!0?et.theme=Ze:(Array.isArray(et.algorithm)||typeof et.algorithm=="function")&&(et.theme=oc(et.algorithm)),delete et.algorithm),lt[Ke]=et});const vt=Object.assign(Object.assign({},Eo),se);return Object.assign(Object.assign({},ut),{theme:Ze,token:vt,components:lt,override:Object.assign({override:vt},lt),cssVar:je})},[Vt]);return x&&(Rt=f.createElement(rh.Provider,{value:q},Rt)),_t.warning&&(Rt=f.createElement($k.Provider,{value:_t.warning},Rt)),w!==void 0&&(Rt=f.createElement(Yk,{disabled:w},Rt)),f.createElement(Rr.Provider,{value:_t},Rt)},za=e=>{const t=f.useContext(Rr),n=f.useContext(Qv);return f.createElement(dO,Object.assign({parentContext:t,legacyLocale:n},e))};za.ConfigContext=Rr;za.SizeContext=Io;za.config=cO;za.useConfig=Xk;Object.defineProperty(za,"SizeContext",{get:()=>Io});function Dh(e,t){this.v=e,this.k=t}function bn(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch{a=0}bn=function(o,i,l,s){function c(u,d){bn(o,u,function(g){return this._invoke(u,d,g)})}i?a?a(o,i,{value:l,enumerable:!s,configurable:!s,writable:!s}):o[i]=l:(c("next",0),c("throw",1),c("return",2))},bn(e,t,n,r)}function Zu(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n=typeof Symbol=="function"?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(h,v,m,p){var b=v&&v.prototype instanceof l?v:l,y=Object.create(b.prototype);return bn(y,"_invoke",(function(x,w,C){var S,E,k,$=0,O=C||[],D=!1,P={p:0,n:0,v:e,a:A,f:A.bind(e,4),d:function(N,I){return S=N,E=0,k=e,P.n=I,i}};function A(N,I){for(E=N,k=I,t=0;!D&&$&&!M&&t<O.length;t++){var M,F=O[t],R=P.p,T=F[2];N>3?(M=T===I)&&(k=F[(E=F[4])?5:(E=3,3)],F[4]=F[5]=e):F[0]<=R&&((M=N<2&&R<F[1])?(E=0,P.v=I,P.n=F[1]):R<T&&(M=N<3||F[0]>I||I>T)&&(F[4]=N,F[5]=I,P.n=T,E=0))}if(M||N>1)return i;throw D=!0,I}return function(N,I,M){if($>1)throw TypeError("Generator is already running");for(D&&I===1&&A(I,M),E=I,k=M;(t=E<2?e:k)||!D;){S||(E?E<3?(E>1&&(P.n=-1),A(E,k)):P.n=k:P.v=k);try{if($=2,S){if(E||(N="next"),t=S[N]){if(!(t=t.call(S,k)))throw TypeError("iterator result is not an object");if(!t.done)return t;k=t.value,E<2&&(E=0)}else E===1&&(t=S.return)&&t.call(S),E<2&&(k=TypeError("The iterator does not provide a '"+N+"' method"),E=1);S=e}else if((t=(D=P.n<0)?k:x.call(w,P))!==i)break}catch(F){S=e,E=1,k=F}finally{$=1}}return{value:t,done:D}}})(h,m,p),!0),y}var i={};function l(){}function s(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(bn(t={},r,function(){return this}),t),d=c.prototype=l.prototype=Object.create(u);function g(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,c):(h.__proto__=c,bn(h,a,"GeneratorFunction")),h.prototype=Object.create(d),h}return s.prototype=c,bn(d,"constructor",c),bn(c,"constructor",s),s.displayName="GeneratorFunction",bn(c,a,"GeneratorFunction"),bn(d),bn(d,a,"Generator"),bn(d,r,function(){return this}),bn(d,"toString",function(){return"[object Generator]"}),(Zu=function(){return{w:o,m:g}})()}function Xi(e,t){function n(a,o,i,l){try{var s=e[a](o),c=s.value;return c instanceof Dh?t.resolve(c.v).then(function(u){n("next",u,i,l)},function(u){n("throw",u,i,l)}):t.resolve(c).then(function(u){s.value=u,i(s)},function(u){return n("throw",u,i,l)})}catch(u){l(u)}}var r;this.next||(bn(Xi.prototype),bn(Xi.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),bn(this,"_invoke",function(a,o,i){function l(){return new t(function(s,c){n(a,i,s,c)})}return r=r?r.then(l,l):l()},!0)}function Mh(e,t,n,r,a){return new Xi(Zu().w(e,t,n,r),a||Promise)}function fO(e,t,n,r,a){var o=Mh(e,t,n,r,a);return o.next().then(function(i){return i.done?i.value:o.next()})}function mO(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function a(){for(;n.length;)if((r=n.pop())in t)return a.value=r,a.done=!1,a;return a.done=!0,a}}function vm(e){if(e!=null){var t=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(pt(e)+" is not iterable")}function kn(){var e=Zu(),t=e.m(kn),n=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function r(i){var l=typeof i=="function"&&i.constructor;return!!l&&(l===n||(l.displayName||l.name)==="GeneratorFunction")}var a={throw:1,return:2,break:3,continue:3};function o(i){var l,s;return function(c){l||(l={stop:function(){return s(c.a,2)},catch:function(){return c.v},abrupt:function(u,d){return s(c.a,a[u],d)},delegateYield:function(u,d,g){return l.resultName=d,s(c.d,vm(u),g)},finish:function(u){return s(c.f,u)}},s=function(u,d,g){c.p=l.prev,c.n=l.next;try{return u(d,g)}finally{l.next=c.n}}),l.resultName&&(l[l.resultName]=c.v,l.resultName=void 0),l.sent=c.v,l.next=c.n;try{return i.call(this,l)}finally{c.p=l.prev,c.n=l.next}}}return(kn=function(){return{wrap:function(i,l,s,c){return e.w(o(i),l,s,c&&c.reverse())},isGeneratorFunction:r,mark:e.m,awrap:function(i,l){return new Dh(i,l)},AsyncIterator:Xi,async:function(i,l,s,c,u){return(r(l)?Mh:fO)(o(i),l,s,c,u)},keys:mO,values:vm}})()}function hm(e,t,n,r,a,o,i){try{var l=e[o](i),s=l.value}catch(c){return void n(c)}l.done?t(s):Promise.resolve(s).then(r,a)}function ma(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(s){hm(o,r,a,i,l,"next",s)}function l(s){hm(o,r,a,i,l,"throw",s)}i(void 0)})}}var Ho=ve({},M0),pO=Ho.version,xs=Ho.render,gO=Ho.unmountComponentAtNode,Rl;try{var vO=Number((pO||"").split(".")[0]);vO>=18&&(Rl=Ho.createRoot)}catch{}function ym(e){var t=Ho.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&pt(t)==="object"&&(t.usingClientEntryPoint=e)}var Ji="__rc_react_root__";function hO(e,t){ym(!0);var n=t[Ji]||Rl(t);ym(!1),n.render(e),t[Ji]=n}function yO(e,t){xs==null||xs(e,t)}function bO(e,t){if(Rl){hO(e,t);return}yO(e,t)}function xO(e){return Fc.apply(this,arguments)}function Fc(){return Fc=ma(kn().mark(function e(t){return kn().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.resolve().then(function(){var r;(r=t[Ji])===null||r===void 0||r.unmount(),delete t[Ji]}));case 1:case"end":return n.stop()}},e)})),Fc.apply(this,arguments)}function CO(e){gO(e)}function wO(e){return Pc.apply(this,arguments)}function Pc(){return Pc=ma(kn().mark(function e(t){return kn().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(Rl===void 0){n.next=2;break}return n.abrupt("return",xO(t));case 2:CO(t);case 3:case"end":return n.stop()}},e)})),Pc.apply(this,arguments)}const SO=(e,t)=>(bO(e,t),()=>wO(t));let $O=SO;function EO(e){return $O}var kO={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function Fh(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function IO(e){return Fh(e)instanceof ShadowRoot}function OO(e){return IO(e)?Fh(e):null}function NO(e){return e.replace(/-(.)/g,function(t,n){return n.toUpperCase()})}function DO(e,t){Hn(e,"[@ant-design/icons] ".concat(t))}function bm(e){return pt(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(pt(e.icon)==="object"||typeof e.icon=="function")}function xm(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[NO(n)]=r}return t},{})}function Rc(e,t,n){return n?be.createElement(e.tag,ve(ve({key:t},xm(e.attrs)),n),(e.children||[]).map(function(r,a){return Rc(r,"".concat(t,"-").concat(e.tag,"-").concat(a))})):be.createElement(e.tag,ve({key:t},xm(e.attrs)),(e.children||[]).map(function(r,a){return Rc(r,"".concat(t,"-").concat(e.tag,"-").concat(a))}))}function Ph(e){return ko(e)[0]}function Rh(e){return e?Array.isArray(e)?e:[e]:[]}var MO=`
|
|
318
318
|
.anticon {
|
|
319
319
|
display: inline-flex;
|
|
320
320
|
align-items: center;
|
|
@@ -369,9 +369,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
369
369
|
transform: rotate(360deg);
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
`,
|
|
372
|
+
`,FO=function(e){var t=En(Yu),n=t.csp,r=t.prefixCls,a=t.layer,o=MO;r&&(o=o.replace(/anticon/g,r)),a&&(o="@layer ".concat(a,` {
|
|
373
373
|
`).concat(o,`
|
|
374
|
-
}`)),
|
|
374
|
+
}`)),mt(function(){var i=e.current,l=OO(i);Xr(o,"@ant-design-icons",{prepend:!a,csp:n,attachTo:l})},[])},PO=["icon","className","onClick","style","primaryColor","secondaryColor"],go={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function RO(e){var t=e.primaryColor,n=e.secondaryColor;go.primaryColor=t,go.secondaryColor=n||Ph(t),go.calculated=!!n}function AO(){return ve({},go)}var Ha=function(e){var t=e.icon,n=e.className,r=e.onClick,a=e.style,o=e.primaryColor,i=e.secondaryColor,l=gr(e,PO),s=f.useRef(),c=go;if(o&&(c={primaryColor:o,secondaryColor:i||Ph(o)}),FO(s),DO(bm(t),"icon should be icon definiton, but got ".concat(t)),!bm(t))return null;var u=t;return u&&typeof u.icon=="function"&&(u=ve(ve({},u),{},{icon:u.icon(c.primaryColor,c.secondaryColor)})),Rc(u.icon,"svg-".concat(u.name),ve(ve({className:n,onClick:r,style:a,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:s}))};Ha.displayName="IconReact";Ha.getTwoToneColors=AO;Ha.setTwoToneColors=RO;function Ah(e){var t=Rh(e),n=it(t,2),r=n[0],a=n[1];return Ha.setTwoToneColors({primaryColor:r,secondaryColor:a})}function TO(){var e=Ha.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var jO=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];Ah(Yi.primary);var xr=f.forwardRef(function(e,t){var n=e.className,r=e.icon,a=e.spin,o=e.rotate,i=e.tabIndex,l=e.onClick,s=e.twoToneColor,c=gr(e,jO),u=f.useContext(Yu),d=u.prefixCls,g=d===void 0?"anticon":d,h=u.rootClassName,v=nr(h,g,te(te({},"".concat(g,"-").concat(r.name),!!r.name),"".concat(g,"-spin"),!!a||r.name==="loading"),n),m=i;m===void 0&&l&&(m=-1);var p=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,b=Rh(s),y=it(b,2),x=y[0],w=y[1];return f.createElement("span",hn({role:"img","aria-label":r.name},c,{ref:t,tabIndex:m,onClick:l,className:v}),f.createElement(Ha,{icon:r,primaryColor:x,secondaryColor:w,style:p}))});xr.displayName="AntdIcon";xr.getTwoToneColor=TO;xr.setTwoToneColor=Ah;var _O=function(e,t){return f.createElement(xr,hn({},e,{ref:t,icon:kO}))},BO=f.forwardRef(_O),LO={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"},zO=function(e,t){return f.createElement(xr,hn({},e,{ref:t,icon:LO}))},HO=f.forwardRef(zO),VO={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"},KO=function(e,t){return f.createElement(xr,hn({},e,{ref:t,icon:VO}))},WO=f.forwardRef(KO),qO={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"},UO=function(e,t){return f.createElement(xr,hn({},e,{ref:t,icon:qO}))},YO=f.forwardRef(UO),GO={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"},XO=function(e,t){return f.createElement(xr,hn({},e,{ref:t,icon:GO}))},JO=f.forwardRef(XO),QO={ENTER:13},ZO=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
375
375
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
376
376
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
377
377
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
@@ -382,25 +382,25 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
382
382
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
383
383
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
384
384
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
385
|
-
summary tabIndex target title type useMap value width wmode wrap`,
|
|
385
|
+
summary tabIndex target title type useMap value width wmode wrap`,eN=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
386
386
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
387
387
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
388
388
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
389
389
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
390
390
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
391
|
-
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,
|
|
392
|
-
${t}-loading > ${n}`]:{color:
|
|
391
|
+
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,tN="".concat(ZO," ").concat(eN).split(/[\s\n]+/),nN="aria-",rN="data-";function Cm(e,t){return e.indexOf(t)===0}function aN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n=ve({},t);var r={};return Object.keys(e).forEach(function(a){(n.aria&&(a==="role"||Cm(a,nN))||n.data&&Cm(a,rN)||n.attr&&tN.includes(a))&&(r[a]=e[a])}),r}var Th=f.forwardRef(function(e,t){var n=e.prefixCls,r=e.style,a=e.className,o=e.duration,i=o===void 0?4.5:o,l=e.showProgress,s=e.pauseOnHover,c=s===void 0?!0:s,u=e.eventKey,d=e.content,g=e.closable,h=e.closeIcon,v=h===void 0?"x":h,m=e.props,p=e.onClick,b=e.onNoticeClose,y=e.times,x=e.hovering,w=f.useState(!1),C=it(w,2),S=C[0],E=C[1],k=f.useState(0),$=it(k,2),O=$[0],D=$[1],P=f.useState(0),A=it(P,2),N=A[0],I=A[1],M=x||S,F=i>0&&l,R=function(){b(u)},T=function(z){(z.key==="Enter"||z.code==="Enter"||z.keyCode===QO.ENTER)&&R()};f.useEffect(function(){if(!M&&i>0){var z=Date.now()-N,K=setTimeout(function(){R()},i*1e3-N);return function(){c&&clearTimeout(K),I(Date.now()-z)}}},[i,M,y]),f.useEffect(function(){if(!M&&F&&(c||N===0)){var z=performance.now(),K,V=function G(){cancelAnimationFrame(K),K=requestAnimationFrame(function(U){var Z=U+N-z,Q=Math.min(Z/(i*1e3),1);D(Q*100),Q<1&&G()})};return V(),function(){c&&cancelAnimationFrame(K)}}},[i,N,M,F,y]);var _=f.useMemo(function(){return pt(g)==="object"&&g!==null?g:g?{closeIcon:v}:{}},[g,v]),B=aN(_,!0),L=100-(!O||O<0?0:O>100?100:O),j="".concat(n,"-notice");return f.createElement("div",hn({},m,{ref:t,className:nr(j,a,te({},"".concat(j,"-closable"),g)),style:r,onMouseEnter:function(z){var K;E(!0),m==null||(K=m.onMouseEnter)===null||K===void 0||K.call(m,z)},onMouseLeave:function(z){var K;E(!1),m==null||(K=m.onMouseLeave)===null||K===void 0||K.call(m,z)},onClick:p}),f.createElement("div",{className:"".concat(j,"-content")},d),g&&f.createElement("a",hn({tabIndex:0,className:"".concat(j,"-close"),onKeyDown:T,"aria-label":"Close"},B,{onClick:function(z){z.preventDefault(),z.stopPropagation(),R()}}),_.closeIcon),F&&f.createElement("progress",{className:"".concat(j,"-progress"),max:"100",value:L},L+"%"))}),jh=be.createContext({}),oN=function(e){var t=e.children,n=e.classNames;return be.createElement(jh.Provider,{value:{classNames:n}},t)},wm=8,Sm=3,$m=16,iN=function(e){var t={offset:wm,threshold:Sm,gap:$m};if(e&&pt(e)==="object"){var n,r,a;t.offset=(n=e.offset)!==null&&n!==void 0?n:wm,t.threshold=(r=e.threshold)!==null&&r!==void 0?r:Sm,t.gap=(a=e.gap)!==null&&a!==void 0?a:$m}return[!!e,t]},lN=["className","style","classNames","styles"],sN=function(e){var t=e.configList,n=e.placement,r=e.prefixCls,a=e.className,o=e.style,i=e.motion,l=e.onAllNoticeRemoved,s=e.onNoticeClose,c=e.stack,u=En(jh),d=u.classNames,g=St({}),h=ft(null),v=it(h,2),m=v[0],p=v[1],b=ft([]),y=it(b,2),x=y[0],w=y[1],C=t.map(function(I){return{config:I,key:String(I.key)}}),S=iN(c),E=it(S,2),k=E[0],$=E[1],O=$.offset,D=$.threshold,P=$.gap,A=k&&(x.length>0||C.length<=D),N=typeof i=="function"?i(n):i;return mt(function(){k&&x.length>1&&w(function(I){return I.filter(function(M){return C.some(function(F){var R=F.key;return M===R})})})},[x,C,k]),mt(function(){var I;if(k&&g.current[(I=C[C.length-1])===null||I===void 0?void 0:I.key]){var M;p(g.current[(M=C[C.length-1])===null||M===void 0?void 0:M.key])}},[C,k]),be.createElement(nO,hn({key:n,className:nr(r,"".concat(r,"-").concat(n),d==null?void 0:d.list,a,te(te({},"".concat(r,"-stack"),!!k),"".concat(r,"-stack-expanded"),A)),style:o,keys:C,motionAppear:!0},N,{onAllRemoved:function(){l(n)}}),function(I,M){var F=I.config,R=I.className,T=I.style,_=I.index,B=F,L=B.key,j=B.times,z=String(L),K=F,V=K.className,G=K.style,U=K.classNames,Z=K.styles,Q=gr(K,lN),Y=C.findIndex(function(de){return de.key===z}),ee={};if(k){var ce=C.length-1-(Y>-1?Y:_-1),me=n==="top"||n==="bottom"?"-50%":"0";if(ce>0){var we,le,ge;ee.height=A?(we=g.current[z])===null||we===void 0?void 0:we.offsetHeight:m==null?void 0:m.offsetHeight;for(var Ee=0,_e=0;_e<ce;_e++){var Re;Ee+=((Re=g.current[C[C.length-1-_e].key])===null||Re===void 0?void 0:Re.offsetHeight)+P}var he=(A?Ee:ce*O)*(n.startsWith("top")?1:-1),ke=!A&&m!==null&&m!==void 0&&m.offsetWidth&&(le=g.current[z])!==null&&le!==void 0&&le.offsetWidth?((m==null?void 0:m.offsetWidth)-O*2*(ce<3?ce:3))/((ge=g.current[z])===null||ge===void 0?void 0:ge.offsetWidth):1;ee.transform="translate3d(".concat(me,", ").concat(he,"px, 0) scaleX(").concat(ke,")")}else ee.transform="translate3d(".concat(me,", 0, 0)")}return be.createElement("div",{ref:M,className:nr("".concat(r,"-notice-wrapper"),R,U==null?void 0:U.wrapper),style:ve(ve(ve({},T),ee),Z==null?void 0:Z.wrapper),onMouseEnter:function(){return w(function(de){return de.includes(z)?de:[].concat(ot(de),[z])})},onMouseLeave:function(){return w(function(de){return de.filter(function(Te){return Te!==z})})}},be.createElement(Th,hn({},Q,{ref:function(de){Y>-1?g.current[z]=de:delete g.current[z]},prefixCls:r,classNames:U,styles:Z,className:nr(V,d==null?void 0:d.notice),style:G,times:j,key:L,eventKey:L,onNoticeClose:s,hovering:k&&x.length>0})))})},cN=f.forwardRef(function(e,t){var n=e.prefixCls,r=n===void 0?"rc-notification":n,a=e.container,o=e.motion,i=e.maxCount,l=e.className,s=e.style,c=e.onAllRemoved,u=e.stack,d=e.renderNotifications,g=f.useState([]),h=it(g,2),v=h[0],m=h[1],p=function(k){var $,O=v.find(function(D){return D.key===k});O==null||($=O.onClose)===null||$===void 0||$.call(O),m(function(D){return D.filter(function(P){return P.key!==k})})};f.useImperativeHandle(t,function(){return{open:function(k){m(function($){var O=ot($),D=O.findIndex(function(N){return N.key===k.key}),P=ve({},k);if(D>=0){var A;P.times=(((A=$[D])===null||A===void 0?void 0:A.times)||0)+1,O[D]=P}else P.times=0,O.push(P);return i>0&&O.length>i&&(O=O.slice(-i)),O})},close:function(k){p(k)},destroy:function(){m([])}}});var b=f.useState({}),y=it(b,2),x=y[0],w=y[1];f.useEffect(function(){var k={};v.forEach(function($){var O=$.placement,D=O===void 0?"topRight":O;D&&(k[D]=k[D]||[],k[D].push($))}),Object.keys(x).forEach(function($){k[$]=k[$]||[]}),w(k)},[v]);var C=function(k){w(function($){var O=ve({},$),D=O[k]||[];return D.length||delete O[k],O})},S=f.useRef(!1);if(f.useEffect(function(){Object.keys(x).length>0?S.current=!0:S.current&&(c==null||c(),S.current=!1)},[x]),!a)return null;var E=Object.keys(x);return F0(f.createElement(f.Fragment,null,E.map(function(k){var $=x[k],O=f.createElement(sN,{key:k,configList:$,placement:k,prefixCls:r,className:l==null?void 0:l(k),style:s==null?void 0:s(k),motion:o,onNoticeClose:p,onAllNoticeRemoved:C,stack:u});return d?d(O,{prefixCls:r,key:k}):O})),a)}),uN=["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"],dN=function(){return document.body},Em=0;function fN(){for(var e={},t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(a){a&&Object.keys(a).forEach(function(o){var i=a[o];i!==void 0&&(e[o]=i)})}),e}function mN(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.getContainer,n=t===void 0?dN:t,r=e.motion,a=e.prefixCls,o=e.maxCount,i=e.className,l=e.style,s=e.onAllRemoved,c=e.stack,u=e.renderNotifications,d=gr(e,uN),g=f.useState(),h=it(g,2),v=h[0],m=h[1],p=f.useRef(),b=f.createElement(cN,{container:v,ref:p,prefixCls:a,motion:r,maxCount:o,className:i,style:l,onAllRemoved:s,stack:c,renderNotifications:u}),y=f.useState([]),x=it(y,2),w=x[0],C=x[1],S=Gi(function(k){var $=fN(d,k);($.key===null||$.key===void 0)&&($.key="rc-notification-".concat(Em),Em+=1),C(function(O){return[].concat(ot(O),[{type:"open",config:$}])})}),E=f.useMemo(function(){return{open:S,close:function(k){C(function($){return[].concat(ot($),[{type:"close",key:k}])})},destroy:function(){C(function(k){return[].concat(ot(k),[{type:"destroy"}])})}}},[]);return f.useEffect(function(){m(n())}),f.useEffect(function(){if(p.current&&w.length){w.forEach(function(O){switch(O.type){case"open":p.current.open(O.config);break;case"close":p.current.close(O.key);break;case"destroy":p.current.destroy();break}});var k,$;C(function(O){return(k!==O||!$)&&(k=O,$=O.filter(function(D){return!w.includes(D)})),$})}},[w]),[E,b]}const _h=e=>{const[,,,,t]=Pl();return t?`${e}-css-var`:""},pN=100,gN=10,vN=pN*gN,hN=e=>{const{componentCls:t,iconCls:n,boxShadow:r,colorText:a,colorSuccess:o,colorError:i,colorWarning:l,colorInfo:s,fontSizeLG:c,motionEaseInOutCirc:u,motionDurationSlow:d,marginXS:g,paddingXS:h,borderRadiusLG:v,zIndexPopup:m,contentPadding:p,contentBg:b}=e,y=`${t}-notice`,x=new jn("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:h,transform:"translateY(0)",opacity:1}}),w=new jn("MessageMoveOut",{"0%":{maxHeight:e.height,padding:h,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),C={padding:h,textAlign:"center",[`${t}-custom-content`]:{display:"flex",alignItems:"center"},[`${t}-custom-content > ${n}`]:{marginInlineEnd:g,fontSize:c},[`${y}-content`]:{display:"inline-block",padding:p,background:b,borderRadius:v,boxShadow:r,pointerEvents:"all"},[`${t}-success > ${n}`]:{color:o},[`${t}-error > ${n}`]:{color:i},[`${t}-warning > ${n}`]:{color:l},[`${t}-info > ${n},
|
|
392
|
+
${t}-loading > ${n}`]:{color:s}};return[{[t]:Object.assign(Object.assign({},Gu(e)),{color:a,position:"fixed",top:g,width:"100%",pointerEvents:"none",zIndex:m,[`${t}-move-up`]:{animationFillMode:"forwards"},[`
|
|
393
393
|
${t}-move-up-appear,
|
|
394
394
|
${t}-move-up-enter
|
|
395
395
|
`]:{animationName:x,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},[`
|
|
396
396
|
${t}-move-up-appear${t}-move-up-appear-active,
|
|
397
397
|
${t}-move-up-enter${t}-move-up-enter-active
|
|
398
|
-
`]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:w,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[t]:{[`${y}-wrapper`]:Object.assign({},C)}},{[`${t}-notice-pure-panel`]:Object.assign(Object.assign({},C),{padding:0,textAlign:"start"})}]},vN=e=>({zIndexPopup:e.zIndexPopupBase+pN+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`}),_h=fh("Message",e=>{const t=Ms(e,{height:150});return gN(t)},vN);var hN=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const yN={info:f.createElement(qO,null),success:f.createElement(TO,null),error:f.createElement(LO,null),warning:f.createElement(VO,null),loading:f.createElement(GO,null)},Bh=({prefixCls:e,type:t,icon:n,children:r})=>f.createElement("div",{className:tr(`${e}-custom-content`,`${e}-${t}`)},n||yN[t],f.createElement("span",null,r)),bN=e=>{const{prefixCls:t,className:n,type:r,icon:a,content:o}=e,i=hN(e,["prefixCls","className","type","icon","content"]),{getPrefixCls:s}=f.useContext(Pr),l=t||s("message"),c=Th(l),[u,d,g]=_h(l,c);return u(f.createElement(Rh,Object.assign({},i,{prefixCls:l,className:tr(n,d,`${l}-notice-pure-panel`,g,c),eventKey:"pure",duration:null,content:f.createElement(Bh,{prefixCls:l,type:r,icon:a},o)})))};var xN={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"},CN=function(e,t){return f.createElement(br,vn({},e,{ref:t,icon:xN}))},wN=f.forwardRef(CN);function SN(e,t){return{motionName:t??`${e}-move-up`}}function Zu(e){let t;const n=new Promise(a=>{t=e(()=>{a(!0)})}),r=()=>{t==null||t()};return r.then=(a,o)=>n.then(a,o),r.promise=n,r}var $N=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const EN=8,kN=3,IN=({children:e,prefixCls:t})=>{const n=Th(t),[r,a,o]=_h(t,n);return r(f.createElement(rN,{classNames:{list:tr(a,o,n)}},e))},ON=(e,{prefixCls:t,key:n})=>f.createElement(IN,{prefixCls:t,key:n},e),NN=f.forwardRef((e,t)=>{const{top:n,prefixCls:r,getContainer:a,maxCount:o,duration:i=kN,rtl:s,transitionName:l,onAllRemoved:c}=e,{getPrefixCls:u,getPopupContainer:d,message:g,direction:h}=f.useContext(Pr),v=r||u("message"),m=()=>({left:"50%",transform:"translateX(-50%)",top:n??EN}),p=()=>tr({[`${v}-rtl`]:s??h==="rtl"}),b=()=>SN(v,l),y=f.createElement("span",{className:`${v}-close-x`},f.createElement(wN,{className:`${v}-close-icon`})),[x,w]=dN({prefixCls:v,style:m,className:p,motion:b,closable:!1,closeIcon:y,duration:i,getContainer:()=>(a==null?void 0:a())||(d==null?void 0:d())||document.body,maxCount:o,onAllRemoved:c,renderNotifications:ON});return f.useImperativeHandle(t,()=>Object.assign(Object.assign({},x),{prefixCls:v,message:g})),w});let Em=0;function Lh(e){const t=f.useRef(null);return[f.useMemo(()=>{const n=o=>{var i;(i=t.current)===null||i===void 0||i.close(o)},r=o=>{if(!t.current){const x=()=>{};return x.then=()=>{},x}const{open:i,prefixCls:s,message:l}=t.current,c=`${s}-notice`,{content:u,icon:d,type:g,key:h,className:v,style:m,onClose:p}=o,b=$N(o,["content","icon","type","key","className","style","onClose"]);let y=h;return y==null&&(Em+=1,y=`antd-message-${Em}`),Zu(x=>(i(Object.assign(Object.assign({},b),{key:y,content:f.createElement(Bh,{prefixCls:s,type:g,icon:d},u),placement:"top",className:tr(g&&`${c}-${g}`,v,l==null?void 0:l.className),style:Object.assign(Object.assign({},l==null?void 0:l.style),m),onClose:()=>{p==null||p(),x()}})),()=>{n(y)}))},a={open:r,destroy:o=>{var i;o!==void 0?n(o):(i=t.current)===null||i===void 0||i.destroy()}};return["info","success","warning","error","loading"].forEach(o=>{const i=(s,l,c)=>{let u;s&&typeof s=="object"&&"content"in s?u=s:u={content:s};let d,g;typeof l=="function"?g=l:(d=l,g=c);const h=Object.assign(Object.assign({onClose:g,duration:d},u),{type:o});return r(h)};a[o]=i}),a},[]),f.createElement(NN,Object.assign({key:"message-holder"},e,{ref:t}))]}function DN(e){return Lh(e)}let Un=null,Kr=e=>e(),Io=[],Oo={};function km(){const{getContainer:e,duration:t,rtl:n,maxCount:r,top:a}=Oo,o=(e==null?void 0:e())||document.body;return{getContainer:()=>o,duration:t,rtl:n,maxCount:r,top:a}}const MN=be.forwardRef((e,t)=>{const{messageConfig:n,sync:r}=e,{getPrefixCls:a}=$n(Pr),o=Oo.prefixCls||a("message"),i=$n(iE),[s,l]=Lh(Object.assign(Object.assign(Object.assign({},n),{prefixCls:o}),i.message));return be.useImperativeHandle(t,()=>{const c=Object.assign({},s);return Object.keys(c).forEach(u=>{c[u]=(...d)=>(r(),s[u].apply(s,d))}),{instance:c,sync:r}}),l}),FN=be.forwardRef((e,t)=>{const[n,r]=be.useState(km),a=()=>{r(km)};be.useEffect(a,[]);const o=lO(),i=o.getRootPrefixCls(),s=o.getIconPrefixCls(),l=o.getTheme(),c=be.createElement(MN,{ref:t,sync:a,messageConfig:n});return be.createElement(La,{prefixCls:i,iconPrefixCls:s,theme:l},o.holderRender?o.holderRender(c):c)}),js=()=>{if(!Un){const e=document.createDocumentFragment(),t={fragment:e};Un=t,Kr(()=>{SO()(be.createElement(FN,{ref:n=>{const{instance:r,sync:a}=n||{};Promise.resolve().then(()=>{!t.instance&&r&&(t.instance=r,t.sync=a,js())})}}),e)});return}Un.instance&&(Io.forEach(e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case"open":{Kr(()=>{const r=Un.instance.open(Object.assign(Object.assign({},Oo),e.config));r==null||r.then(e.resolve),e.setCloseFn(r)});break}case"destroy":Kr(()=>{Un==null||Un.instance.destroy(e.key)});break;default:Kr(()=>{var r;const a=(r=Un.instance)[t].apply(r,at(e.args));a==null||a.then(e.resolve),e.setCloseFn(a)})}}),Io=[])};function PN(e){Oo=Object.assign(Object.assign({},Oo),e),Kr(()=>{var t;(t=Un==null?void 0:Un.sync)===null||t===void 0||t.call(Un)})}function jN(e){const t=Zu(n=>{let r;const a={type:"open",config:e,resolve:n,setCloseFn:o=>{r=o}};return Io.push(a),()=>{r?Kr(()=>{r()}):a.skipped=!0}});return js(),t}function RN(e,t){const n=Zu(r=>{let a;const o={type:e,args:t,resolve:r,setCloseFn:i=>{a=i}};return Io.push(o),()=>{a?Kr(()=>{a()}):o.skipped=!0}});return js(),n}const AN=e=>{Io.push({type:"destroy",key:e}),js()},TN=["success","info","warning","error","loading"],_N={open:jN,destroy:AN,config:PN,useMessage:DN,_InternalPanelDoNotUseOrYouWillBeFired:bN},Di=_N;TN.forEach(e=>{Di[e]=(...t)=>RN(e,t)});var Wr=256,zh=[],Im=256,di;for(;Wr--;)zh[Wr]=(Wr+256).toString(16).substring(1);function BN(e){var t=0,n=e;if(!di||Wr+n>Im*2)for(di="",Wr=0;t<Im;t++)di+=zh[Math.random()*256|0];return di.substring(Wr,Wr+++n)}const LN=(e,t)=>{let n=e&&e.replace(/<think>[\s\S]*?<\/think>/g,"");n=n.replace(/\[retrive-tag[^\]]*\][\s\S]*?\[\/retrive-tag\]/g,""),n=n.replace(/<a\s+[^>]*>(.*?)<\/a>/g,""),console.log("_content",n);const r=new op(t.currentTarget||t.target,{text:()=>n});try{r.on("success",()=>{Di.success("\u6587\u672C\u590D\u5236\u6210\u529F",2),r.destroy()}),r.on("error",a=>{Di.error("\u590D\u5236\u5931\u8D25",2),r.destroy()}),r.onClick(t)}catch(a){r.destroy(),Di.error("\u590D\u5236\u5931\u8D25: "+a,2)}};function $r(e){return X.jsxs("span",{className:"flex items-center gap-1",children:[X.jsx("span",{className:"font-medium text-gray-800",children:e.label}),e.description&&X.jsx(Ro,{title:e.description,className:" cursor-help",children:X.jsx(c$,{className:"ml-0.5 text-gray-400",size:12})}),e.required&&X.jsx(Fp,{className:"text-[9px]",bordered:!1,color:"warning",children:"\u5FC5\u586B"})]})}function zN(e=[],t,n={}){const[r,a]=be.useState(()=>{const c={};return e.forEach(u=>{u.type==="switch"&&(c[u.name]=n[u.name]??u.defaultValue??!1)}),c}),o=be.useRef(),i=(c,u,d)=>{a(g=>({...g,[c]:u})),o.current&&d&&(u||d.forEach(g=>{o.current.setFieldsValue({[g]:void 0})}))},s=new Set;e.forEach(c=>{c.type==="switch"&&c.controlledItems&&r[c.name]===!1&&c.controlledItems.forEach(u=>s.add(u))});const l=e.map(c=>{var u,d,g,h,v,m;return s.has(c.name)?null:c.type==="divider"?X.jsx("div",{className:"my-3 border-b border-solid border-gray-200"},c.name||Math.random()):c.type==="input"?X.jsx(Xt.Item,{label:$r(c),name:c.name,rules:[{required:c.required,message:c.error||`\u8BF7\u8F93\u5165${c.label}`}],children:X.jsx(Qr,{placeholder:c.placeholder,disabled:c.disabled,className:c.className})},c.name):c.type==="select"?X.jsx(Xt.Item,{label:$r(c),name:c.name,rules:[{required:c.required,message:c.error||`\u8BF7\u9009\u62E9${c.label}`}],children:X.jsx(vy,{options:c.options,placeholder:c.placeholder,disabled:c.disabled,className:c.className})},c.name):c.type==="number"?X.jsx(Xt.Item,{label:$r(c),name:c.name,rules:[{required:c.required,message:c.error||`\u8BF7\u8F93\u5165${c.label}`}],children:X.jsx(zl,{addonAfter:c.unit?X.jsx("span",{className:"text-[10px] text-gray-300",children:c.unit}):null,min:(u=c.range)==null?void 0:u.min,max:(d=c.range)==null?void 0:d.max,step:c.step,placeholder:c.placeholder,disabled:c.disabled,className:c.className,style:{width:"100%"}})},c.name):c.type==="slider"?X.jsxs("div",{className:"mb-6",children:[X.jsxs("div",{className:"flex items-center justify-between mb-3",children:[X.jsx("div",{className:"flex items-center text-sm",children:$r(c)}),X.jsx(Xt.Item,{name:c.name,noStyle:!0,children:X.jsx(zl,{min:(g=c.range)==null?void 0:g.min,max:(h=c.range)==null?void 0:h.max,step:c.step,disabled:c.disabled,style:{width:80,marginLeft:8}})}),c.unit&&X.jsx("span",{className:"ml-2",children:c.unit})]}),X.jsx(Xt.Item,{name:c.name,noStyle:!0,children:X.jsx(DC,{min:(v=c.range)==null?void 0:v.min,max:(m=c.range)==null?void 0:m.max,step:c.step,disabled:c.disabled,className:c.className})})]},c.name):c.type==="switch"?X.jsx(Xt.Item,{label:null,colon:!1,style:{marginBottom:16},children:X.jsxs(L0,{align:"middle",justify:"space-between",children:[X.jsx(sd,{children:$r(c)}),X.jsx(sd,{children:X.jsx(Xt.Item,{name:c.name,valuePropName:"checked",noStyle:!0,children:X.jsx(wy,{disabled:c.disabled,checked:r[c.name],onChange:p=>i(c.name,p,c.controlledItems)})})})]})},c.name):c.type==="textarea"?X.jsx(Xt.Item,{label:$r(c),name:c.name,rules:[{required:c.required,message:c.error||`\u8BF7\u8F93\u5165${c.label}`}],children:X.jsx(Qr.TextArea,{placeholder:c.placeholder,disabled:c.disabled,className:c.className,autoSize:{minRows:2,maxRows:6}})},c.name):c.type==="date"?X.jsx(Xt.Item,{label:$r(c),name:c.name,rules:[{required:c.required,message:c.error||`\u8BF7\u9009\u62E9${c.label}`}],children:X.jsx(Aa,{placeholder:c.placeholder,disabled:c.disabled,className:c.className,style:{width:"100%"}})},c.name):c.type==="radio"?X.jsx(Xt.Item,{label:$r(c),name:c.name,rules:[{required:c.required,message:c.error||`\u8BF7\u9009\u62E9${c.label}`}],children:X.jsx(xs.Group,{options:c.options,disabled:c.disabled,className:c.className})},c.name):null});return be.useEffect(()=>{t&&typeof t.setFormRef=="function"&&t.setFormRef(o)},[t]),l}function HN({config:e=[],initialValues:t={},onChange:n,styles:r}){const a=zN(e,r,t),[o]=Xt.useForm();return X.jsx(Xt,{form:o,layout:"vertical",size:(r==null?void 0:r.formSize)||"middle",initialValues:t,onValuesChange:(i,s)=>n==null?void 0:n(s),requiredMark:!1,style:{padding:16},children:a})}function VN(){return X.jsx("div",{className:"main relative h-full w-full flex items-center justify-center",children:X.jsx("div",{className:"text-2xl font-bold",children:"app loading..."})})}function KN(){return X.jsx("div",{className:"main relative h-full w-full flex items-center justify-center",children:X.jsx("div",{className:"text-2xl font-bold",children:"display loading..."})})}function WN(){return X.jsx("div",{className:"main relative h-full w-full bg-transparent! flex items-center justify-center",children:X.jsx("div",{className:"text-2xl font-bold",children:"app error..."})})}function qN(){return X.jsx("div",{className:"main relative h-full w-full flex items-center justify-center",children:X.jsx("div",{className:"text-2xl font-bold",children:"display error..."})})}function UN(){return X.jsxs("div",{className:"flex flex-col items-center justify-center h-full w-full",children:[X.jsx("div",{className:"text-2xl text-blue-500 font-bold mb-4",children:"\u60A8\u597D\uFF0C\u6211\u662F\u60A8\u7684\u4E13\u5C5EAI\u52A9\u7406\u3010\u5C0F\u9CB8\u3011"}),X.jsx("div",{className:"text-zinc-500",children:"\u8BF7\u8F93\u5165\u60A8\u7684\u95EE\u9898\u6216\u9700\u6C42\uFF0C\u6211\u4F1A\u5C3D\u529B\u4E3A\u60A8\u89E3\u7B54\u3002"})]})}function YN(e,t){return t?{...e,...t,colors:{...e.colors,...t.colors},space:{...e.space,...t.space},icons:{...e.icons,...t.icons},others:{...e.others,...t.others}}:e}function GN(e){return{...e,size:Gl[e.size]||e.size,radius:sv[e.radius]||e.radius,padding:e$[e.padding]||e.padding,margin:t$[e.margin]||e.margin,shadow:n$[e.shadow]||e.shadow,lineHeight:r$[e.lineHeight]||e.lineHeight,sidebar:Z2[e.sidebar]||e.sidebar}}function XN({chatData:e,sidebar:t,eventsEmit:n,status:r,CustomComponents:a,recommandQuestions:o=[],styles:i,senderConfig:s,fileUploadStatus:l,onSenderConfigChange:c,activeSessionId:u}){const d=wt(null),[g,h]=dt(""),[v,m]=dt([]),[p,b]=dt(!1),y=(t&&t.length>0?t:[]).filter(Y=>Y.enabled!==!1),[x,w]=dt(()=>{var Y;return(Y=y[0])==null?void 0:Y.key}),C=wt({}),[S]=dt(0),E=(e==null?void 0:e.messages)||[],[k,$]=dt({});ft(()=>{n==null||n("fileManager:change",{uploadedFiles:v,removeFile:(Y,ee,ce)=>{m(me=>me.filter((we,se)=>se!==ee))},setUploadedFiles:Y=>{m(ee=>typeof Y=="function"?Y(ee):[...ee,...Y])}})},[v]);const O=()=>{h(""),m([])},D=(Y,ee)=>{if(n)switch(console.log(Y,ee,"core\u5185\u90E8\u8F6C\u53D1"),Y){case"action_copy:click":ee&&LN(ee.content,ee.event);break;case"sender:configChange":$(ee.all),c==null||c(ee),n(Y,ee);break;case"conversation:create":const ce=BN(3);n==null||n("conversation:create",{id:ce});break;case"sender:change":ee&&h(ee);break;case"sender:clear":O();break;case"sender:send_recommandQuestion":{const me={};y.forEach(we=>{we.type==="form"&&(me[we.key]=C.current[we.key]??we.initialValues??{})}),n==null||n("sender:send",{content:ee.content,files:v,status:r,currentData:e,senderConfig:k,formData:me,clearFn:O}),setTimeout(()=>{d.current&&d.current.scrollTo&&d.current.scrollTo({top:0,behavior:"smooth"})},120);break}case"sender:send":{const me={};y.forEach(we=>{we.type==="form"&&(me[we.key]=C.current[we.key]??we.initialValues??{})}),n==null||n("sender:send",{content:g,files:v,status:r,currentData:e,senderConfig:k,formData:me,clearFn:O}),setTimeout(()=>{d.current&&d.current.scrollTo&&d.current.scrollTo({top:0,behavior:"smooth"})},120);break}default:n(Y,ee)}},P=Y=>{Y.preventDefault(),b(!1);const ee=Array.from(Y.dataTransfer.files||[]);if(ee.length>0){const ce=ee.filter(me=>/image|pdf|word|doc|docx|ppt|pptx|xls|xlsx|text|plain|csv|zip|rar|7z|json|markdown|md/.test(me.type)||/\.(pdf|docx?|pptx?|xlsx?|csv|zip|rar|7z|json|md)$/i.test(me.name));ce.length>0&&m(me=>[...me,...ce.map(we=>({file:we,type:I(we)}))])}},R=Y=>{Y.preventDefault(),p||b(!0)},N=Y=>{Y.preventDefault(),b(!1)};function I(Y){return Y.type.startsWith("image")?"image":"document"}const M=Y=>{$(Y.all),c==null||c(Y)},F=()=>{d.current.addEventListener("wheel",Y=>{Y.preventDefault();const{deltaY:ee}=Y;d.current.scrollTop-=ee})},j=wt(null);ft(()=>{if(!j.current)return j.current=setInterval(()=>{var Y;(Y=d==null?void 0:d.current)!=null&&Y.scrollTo&&(F(),clearInterval(j.current),j.current=null)},100),()=>{var Y;clearInterval(j.current),j.current=null,(Y=d==null?void 0:d.current)!=null&&Y.removeEventListener&&d.current.removeEventListener("wheel",F)}},[u]);const A=YN(Q2,i==null?void 0:i.theme),_=GN(A.space),L={...A,space:_,colors:{...A.colors,info:A.colors.info||"#0000FF",background:A.colors.background||"#ffffff",text:A.colors.text||"#343a40",border:A.colors.border||"#dee2e6",disabled:A.colors.disabled||"#808080",disabledBackground:A.colors.disabledBackground||"#F5F5F5",disabledText:A.colors.disabledText||"#808080"}},z={...i,theme:L},T=L.space.radius,H=L.colors.appBackground,W="",K=L.space.shadow,G=y.length===0?0:L.space.sidebar,U=L.space.size,Z=L.space.padding,Q=L.colors.text;return X.jsxs(X.Fragment,{children:[r.app==="initializing"&&(a!=null&&a.AppLoading?X.jsx(a.AppLoading,{}):X.jsx(VN,{})),r.app==="error"&&(a!=null&&a.AppError?X.jsx(a.AppError,{}):X.jsx(WN,{})),r.app==="ready"&&X.jsxs("div",{style:{width:"100%",height:"100%",position:"relative",display:"flex"},children:[y.length===0?null:X.jsxs("div",{style:{width:G,borderRadius:T,boxShadow:K,background:W,display:"flex",flexDirection:"column",height:"100%"},children:[(a==null?void 0:a.LogoBox)&&X.jsx("header",{style:{display:"flex",alignItems:"center",height:55,width:"100%",borderBottom:`1px solid ${A.colors.border}`,padding:Z,fontSize:Gl.lg,fontWeight:700,color:A.colors.primary,background:W,borderTopLeftRadius:T,borderTopRightRadius:T},children:X.jsx(a.LogoBox,{})}),X.jsxs("div",{style:{width:G,borderRadius:T,background:W,flex:1,display:"flex",flexDirection:"column",position:"relative",marginBottom:y.length>1?55:0,borderBottomRightRadius:T},children:[(()=>{const Y=y.find(ee=>ee.key===x);if(!Y)return null;if(Y.type==="custom")return Y.component;if(Y.type==="form"){const ee=C.current[Y.key]||Y.initialValues||{};return X.jsx(HN,{config:Y.formConfig,initialValues:ee,onChange:ce=>{var me;C.current[Y.key]=ce,(me=Y.onChange)==null||me.call(Y,ce),typeof n=="function"&&n("form:change",{...C.current})},styles:i},Y.key+"_"+S)}return null})(),y.length>1&&X.jsx("div",{style:{display:"flex",gap:12,margin:"0 auto",width:"100%",alignItems:"center",justifyContent:"end",padding:"8px 12px",position:"absolute",bottom:0,borderBottom:`1px solid ${A.colors.border}`,borderTop:`1px solid ${A.colors.border}`,borderBottomRightRadius:T,background:W},children:y.map(Y=>{const ee=Y.icon,ce=x===Y.key;return X.jsx("button",{onClick:()=>w(Y.key),style:{padding:8,borderRadius:sv.md,background:ce?A.colors.primary+"22":"transparent",color:ce?A.colors.primary:"#888",border:"none",cursor:"pointer",fontWeight:ce?600:400,transition:"all 0.2s"},title:Y.label,children:ee},Y.key)})})]})]}),X.jsxs("div",{className:"relative ",style:{width:G===0?"100%":`calc(100% - ${G})`,borderRadius:T,background:H,fontSize:U,color:Q,position:"relative",height:"100%",zIndex:p?10:void 0,display:"flex",flexDirection:"column"},onDrop:P,onDragOver:R,onDragLeave:N,children:[p&&X.jsx("div",{style:{position:"absolute",inset:0,background:A.colors.primary+"14",border:`4px dashed ${A.colors.primary}`,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,pointerEvents:"none",userSelect:"none",borderRadius:T},children:X.jsx("div",{style:{color:A.colors.primary,fontSize:Gl.lg,fontWeight:700},children:"\u677E\u5F00\u6587\u4EF6\u4EE5\u4E0A\u4F20"})}),X.jsx("div",{style:{width:"100%",position:"relative",height:"calc(100% - 155px)",zIndex:p?10:void 0,display:"flex",flexDirection:"column"},children:X.jsx("div",{style:{width:"100%",minWidth:520,margin:"0 auto",flex:1,display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:e.isNew?a!=null&&a.WelcomeComponent?X.jsx(a.WelcomeComponent,{}):X.jsx(UN,{}):r.display==="loading"?a!=null&&a.DisplayLoading?X.jsx(a.DisplayLoading,{}):X.jsx(KN,{}):r.display==="error"?a!=null&&a.DisplayError?X.jsx(a.DisplayError,{}):X.jsx(qN,{}):X.jsxs("div",{ref:d,className:"relative px-8",style:{direction:"rtl",transform:"rotate(180deg)",flex:1,overflowY:"scroll",paddingTop:230,paddingBottom:20,display:"flex",flexDirection:"column",alignItems:"center"},children:[X.jsx("div",{style:{flexGrow:1,flexShrink:1,flex:1}}),X.jsx("div",{style:{width:"100%",maxWidth:1200},children:X.jsx(rE,{status:r.display,messages:E,eventsEmit:n,renderAiChatBox:a==null?void 0:a.AiChatBox,renderUserChatBox:a==null?void 0:a.UserChatBox})})]})})}),X.jsx(eE,{value:g,status:r.sender,styles:z,recommandQuestions:o,eventsEmit:(Y,ee)=>{D(Y,ee)},uploadedFiles:v,fileUploadStatus:l,onUpload:Y=>{Y&&Y.length>0&&m(ee=>[...ee,...Array.from(Y).map(ce=>({file:ce,type:I(ce)}))])},onRemoveFile:Y=>{m(ee=>ee.filter((ce,me)=>me!==Y))},senderConfig:s,onSenderConfigChange:M})]})]})]})}ra({badgeCounts:{},updateBadgeCount:()=>{}});function Hh(e,t){return function(){return e.apply(t,arguments)}}const{toString:JN}=Object.prototype,{getPrototypeOf:ed}=Object,{iterator:Rs,toStringTag:Vh}=Symbol,As=(e=>t=>{const n=JN.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),or=e=>(e=e.toLowerCase(),t=>As(t)===e),Ts=e=>t=>typeof t===e,{isArray:Ha}=Array,No=Ts("undefined");function Ho(e){return e!==null&&!No(e)&&e.constructor!==null&&!No(e.constructor)&&Pn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Kh=or("ArrayBuffer");function QN(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Kh(e.buffer),t}const ZN=Ts("string"),Pn=Ts("function"),Wh=Ts("number"),Vo=e=>e!==null&&typeof e=="object",eD=e=>e===!0||e===!1,Mi=e=>{if(As(e)!=="object")return!1;const t=ed(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Vh in e)&&!(Rs in e)},tD=e=>{if(!Vo(e)||Ho(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},nD=or("Date"),rD=or("File"),aD=or("Blob"),oD=or("FileList"),iD=e=>Vo(e)&&Pn(e.pipe),sD=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Pn(e.append)&&((t=As(e))==="formdata"||t==="object"&&Pn(e.toString)&&e.toString()==="[object FormData]"))},lD=or("URLSearchParams"),[cD,uD,dD,fD]=["ReadableStream","Request","Response","Headers"].map(or),mD=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ko(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),Ha(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{if(Ho(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function qh(e,t){if(Ho(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,a;for(;r-- >0;)if(a=n[r],t===a.toLowerCase())return a;return null}const qr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Uh=e=>!No(e)&&e!==qr;function jc(){const{caseless:e}=Uh(this)&&this||{},t={},n=(r,a)=>{const o=e&&qh(t,a)||a;Mi(t[o])&&Mi(r)?t[o]=jc(t[o],r):Mi(r)?t[o]=jc({},r):Ha(r)?t[o]=r.slice():t[o]=r};for(let r=0,a=arguments.length;r<a;r++)arguments[r]&&Ko(arguments[r],n);return t}const pD=(e,t,n,{allOwnKeys:r}={})=>(Ko(t,(a,o)=>{n&&Pn(a)?e[o]=Hh(a,n):e[o]=a},{allOwnKeys:r}),e),gD=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),vD=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},hD=(e,t,n,r)=>{let a,o,i;const s={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)i=a[o],(!r||r(i,e,t))&&!s[i]&&(t[i]=e[i],s[i]=!0);e=n!==!1&&ed(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},yD=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},bD=e=>{if(!e)return null;if(Ha(e))return e;let t=e.length;if(!Wh(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},xD=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ed(Uint8Array)),CD=(e,t)=>{const n=(e&&e[Rs]).call(e);let r;for(;(r=n.next())&&!r.done;){const a=r.value;t.call(e,a[0],a[1])}},wD=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},SD=or("HTMLFormElement"),$D=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,r){return n.toUpperCase()+r}),Om=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ED=or("RegExp"),Yh=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ko(n,(a,o)=>{let i;(i=t(a,o,e))!==!1&&(r[o]=i||a)}),Object.defineProperties(e,r)},kD=e=>{Yh(e,(t,n)=>{if(Pn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Pn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ID=(e,t)=>{const n={},r=a=>{a.forEach(o=>{n[o]=!0})};return Ha(e)?r(e):r(String(e).split(t)),n},OD=()=>{},ND=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function DD(e){return!!(e&&Pn(e.append)&&e[Vh]==="FormData"&&e[Rs])}const MD=e=>{const t=new Array(10),n=(r,a)=>{if(Vo(r)){if(t.indexOf(r)>=0)return;if(Ho(r))return r;if(!("toJSON"in r)){t[a]=r;const o=Ha(r)?[]:{};return Ko(r,(i,s)=>{const l=n(i,a+1);!No(l)&&(o[s]=l)}),t[a]=void 0,o}}return r};return n(e,0)},FD=or("AsyncFunction"),PD=e=>e&&(Vo(e)||Pn(e))&&Pn(e.then)&&Pn(e.catch),Gh=((e,t)=>e?setImmediate:t?((n,r)=>(qr.addEventListener("message",({source:a,data:o})=>{a===qr&&o===n&&r.length&&r.shift()()},!1),a=>{r.push(a),qr.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Pn(qr.postMessage)),jD=typeof queueMicrotask<"u"?queueMicrotask.bind(qr):typeof process<"u"&&process.nextTick||Gh,RD=e=>e!=null&&Pn(e[Rs]),re={isArray:Ha,isArrayBuffer:Kh,isBuffer:Ho,isFormData:sD,isArrayBufferView:QN,isString:ZN,isNumber:Wh,isBoolean:eD,isObject:Vo,isPlainObject:Mi,isEmptyObject:tD,isReadableStream:cD,isRequest:uD,isResponse:dD,isHeaders:fD,isUndefined:No,isDate:nD,isFile:rD,isBlob:aD,isRegExp:ED,isFunction:Pn,isStream:iD,isURLSearchParams:lD,isTypedArray:xD,isFileList:oD,forEach:Ko,merge:jc,extend:pD,trim:mD,stripBOM:gD,inherits:vD,toFlatObject:hD,kindOf:As,kindOfTest:or,endsWith:yD,toArray:bD,forEachEntry:CD,matchAll:wD,isHTMLForm:SD,hasOwnProperty:Om,hasOwnProp:Om,reduceDescriptors:Yh,freezeMethods:kD,toObjectSet:ID,toCamelCase:$D,noop:OD,toFiniteNumber:ND,findKey:qh,global:qr,isContextDefined:Uh,isSpecCompliantForm:DD,toJSONObject:MD,isAsyncFn:FD,isThenable:PD,setImmediate:Gh,asap:jD,isIterable:RD};function pt(e,t,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}re.inherits(pt,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:re.toJSONObject(this.config),code:this.code,status:this.status}}});const Xh=pt.prototype,Jh={};["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=>{Jh[e]={value:e}});Object.defineProperties(pt,Jh);Object.defineProperty(Xh,"isAxiosError",{value:!0});pt.from=(e,t,n,r,a,o)=>{const i=Object.create(Xh);return re.toFlatObject(e,i,function(s){return s!==Error.prototype},s=>s!=="isAxiosError"),pt.call(i,e.message,t,n,r,a),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const AD=null;function Rc(e){return re.isPlainObject(e)||re.isArray(e)}function Qh(e){return re.endsWith(e,"[]")?e.slice(0,-2):e}function Nm(e,t,n){return e?e.concat(t).map(function(r,a){return r=Qh(r),!n&&a?"["+r+"]":r}).join(n?".":""):t}function TD(e){return re.isArray(e)&&!e.some(Rc)}const _D=re.toFlatObject(re,{},null,function(e){return/^is[A-Z]/.test(e)});function _s(e,t,n){if(!re.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=re.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,v){return!re.isUndefined(v[h])});const r=n.metaTokens,a=n.visitor||c,o=n.dots,i=n.indexes,s=(n.Blob||typeof Blob<"u"&&Blob)&&re.isSpecCompliantForm(t);if(!re.isFunction(a))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(re.isDate(h))return h.toISOString();if(re.isBoolean(h))return h.toString();if(!s&&re.isBlob(h))throw new pt("Blob is not supported. Use a Buffer instead.");return re.isArrayBuffer(h)||re.isTypedArray(h)?s&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,v,m){let p=h;if(h&&!m&&typeof h=="object"){if(re.endsWith(v,"{}"))v=r?v:v.slice(0,-2),h=JSON.stringify(h);else if(re.isArray(h)&&TD(h)||(re.isFileList(h)||re.endsWith(v,"[]"))&&(p=re.toArray(h)))return v=Qh(v),p.forEach(function(b,y){!(re.isUndefined(b)||b===null)&&t.append(i===!0?Nm([v],y,o):i===null?v:v+"[]",l(b))}),!1}return Rc(h)?!0:(t.append(Nm(m,v,o),l(h)),!1)}const u=[],d=Object.assign(_D,{defaultVisitor:c,convertValue:l,isVisitable:Rc});function g(h,v){if(!re.isUndefined(h)){if(u.indexOf(h)!==-1)throw Error("Circular reference detected in "+v.join("."));u.push(h),re.forEach(h,function(m,p){(!(re.isUndefined(m)||m===null)&&a.call(t,m,re.isString(p)?p.trim():p,v,d))===!0&&g(m,v?v.concat(p):[p])}),u.pop()}}if(!re.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Dm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function td(e,t){this._pairs=[],e&&_s(e,this,t)}const Zh=td.prototype;Zh.append=function(e,t){this._pairs.push([e,t])};Zh.toString=function(e){const t=e?function(n){return e.call(this,n,Dm)}:Dm;return this._pairs.map(function(n){return t(n[0])+"="+t(n[1])},"").join("&")};function BD(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function e0(e,t,n){if(!t)return e;const r=n&&n.encode||BD;re.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let o;if(a?o=a(t,n):o=re.isURLSearchParams(t)?t.toString():new td(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Mm{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){re.forEach(this.handlers,function(n){n!==null&&t(n)})}}const t0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},LD=typeof URLSearchParams<"u"?URLSearchParams:td,zD=typeof FormData<"u"?FormData:null,HD=typeof Blob<"u"?Blob:null,VD={isBrowser:!0,classes:{URLSearchParams:LD,FormData:zD,Blob:HD},protocols:["http","https","file","blob","url","data"]},nd=typeof window<"u"&&typeof document<"u",Ac=typeof navigator=="object"&&navigator||void 0,KD=nd&&(!Ac||["ReactNative","NativeScript","NS"].indexOf(Ac.product)<0),WD=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",qD=nd&&window.location.href||"http://localhost",UD=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:nd,hasStandardBrowserEnv:KD,hasStandardBrowserWebWorkerEnv:WD,navigator:Ac,origin:qD},Symbol.toStringTag,{value:"Module"})),wn={...UD,...VD};function YD(e,t){return _s(e,new wn.classes.URLSearchParams,{visitor:function(n,r,a,o){return wn.isNode&&re.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function GD(e){return re.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function XD(e){const t={},n=Object.keys(e);let r;const a=n.length;let o;for(r=0;r<a;r++)o=n[r],t[o]=e[o];return t}function n0(e){function t(n,r,a,o){let i=n[o++];if(i==="__proto__")return!0;const s=Number.isFinite(+i),l=o>=n.length;return i=!i&&re.isArray(a)?a.length:i,l?(re.hasOwnProp(a,i)?a[i]=[a[i],r]:a[i]=r,!s):((!a[i]||!re.isObject(a[i]))&&(a[i]=[]),t(n,r,a[i],o)&&re.isArray(a[i])&&(a[i]=XD(a[i])),!s)}if(re.isFormData(e)&&re.isFunction(e.entries)){const n={};return re.forEachEntry(e,(r,a)=>{t(GD(r),a,n,0)}),n}return null}function JD(e,t,n){if(re.isString(e))try{return(t||JSON.parse)(e),re.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Wo={transitional:t0,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,a=re.isObject(e);if(a&&re.isHTMLForm(e)&&(e=new FormData(e)),re.isFormData(e))return r?JSON.stringify(n0(e)):e;if(re.isArrayBuffer(e)||re.isBuffer(e)||re.isStream(e)||re.isFile(e)||re.isBlob(e)||re.isReadableStream(e))return e;if(re.isArrayBufferView(e))return e.buffer;if(re.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return YD(e,this.formSerializer).toString();if((o=re.isFileList(e))||n.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return _s(o?{"files[]":e}:e,i&&new i,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),JD(e)):e}],transformResponse:[function(e){const t=this.transitional||Wo.transitional,n=t&&t.forcedJSONParsing,r=this.responseType==="json";if(re.isResponse(e)||re.isReadableStream(e))return e;if(e&&re.isString(e)&&(n&&!this.responseType||r)){const a=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(o){if(a)throw o.name==="SyntaxError"?pt.from(o,pt.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:wn.classes.FormData,Blob:wn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};re.forEach(["delete","get","head","post","put","patch"],e=>{Wo.headers[e]={}});const QD=re.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"]),ZD=e=>{const t={};let n,r,a;return e&&e.split(`
|
|
399
|
-
`).forEach(function(o){a=o.indexOf(":"),n=o.substring(0,a).trim().toLowerCase(),r=o.substring(a+1).trim(),!(!n||t[n]&&
|
|
400
|
-
`)}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,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const n=(this[Fm]=this[Fm]={accessors:{}}).accessors,r=this.prototype;function a(o){const i=no(o);n[i]||(rM(r,o),n[i]=!0)}return re.isArray(t)?t.forEach(a):a(t),this}}jn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);re.reduceDescriptors(jn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});re.freezeMethods(jn);function Cl(e,t){const n=this||Wo,r=t||n,a=jn.from(r.headers);let o=r.data;return re.forEach(e,function(i){o=i.call(n,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function r0(e){return!!(e&&e.__CANCEL__)}function Va(e,t,n){pt.call(this,e??"canceled",pt.ERR_CANCELED,t,n),this.name="CanceledError"}re.inherits(Va,pt,{__CANCEL__:!0});function a0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new pt("Request failed with status code "+n.status,[pt.ERR_BAD_REQUEST,pt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function aM(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function oM(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,o=0,i;return t=t!==void 0?t:1e3,function(s){const l=Date.now(),c=r[o];i||(i=l),n[a]=s,r[a]=l;let u=o,d=0;for(;u!==a;)d+=n[u++],u=u%e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),l-i<t)return;const g=c&&l-c;return g?Math.round(d*1e3/g):void 0}}function iM(e,t){let n=0,r=1e3/t,a,o;const i=(s,l=Date.now())=>{n=l,a=null,o&&(clearTimeout(o),o=null),e(...s)};return[(...s)=>{const l=Date.now(),c=l-n;c>=r?i(s,l):(a=s,o||(o=setTimeout(()=>{o=null,i(a)},r-c)))},()=>a&&i(a)]}const Ji=(e,t,n=3)=>{let r=0;const a=oM(50,250);return iM(o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,l=i-r,c=a(l),u=i<=s;r=i;const d={loaded:i,total:s,progress:s?i/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-i)/c:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},Pm=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},jm=e=>(...t)=>re.asap(()=>e(...t)),sM=wn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,wn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(wn.origin),wn.navigator&&/(msie|trident)/i.test(wn.navigator.userAgent)):()=>!0,lM=wn.hasStandardBrowserEnv?{write(e,t,n,r,a,o){const i=[e+"="+encodeURIComponent(t)];re.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),re.isString(r)&&i.push("path="+r),re.isString(a)&&i.push("domain="+a),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function cM(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function uM(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function o0(e,t,n){let r=!cM(t);return e&&(r||n==!1)?uM(e,t):t}const Rm=e=>e instanceof jn?{...e}:e;function na(e,t){t=t||{};const n={};function r(c,u,d,g){return re.isPlainObject(c)&&re.isPlainObject(u)?re.merge.call({caseless:g},c,u):re.isPlainObject(u)?re.merge({},u):re.isArray(u)?u.slice():u}function a(c,u,d,g){if(re.isUndefined(u)){if(!re.isUndefined(c))return r(void 0,c,d,g)}else return r(c,u,d,g)}function o(c,u){if(!re.isUndefined(u))return r(void 0,u)}function i(c,u){if(re.isUndefined(u)){if(!re.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(c,u,d)=>a(Rm(c),Rm(u),d,!0)};return re.forEach(Object.keys({...e,...t}),function(c){const u=l[c]||a,d=u(e[c],t[c],c);re.isUndefined(d)&&u!==s||(n[c]=d)}),n}const i0=e=>{const t=na({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:o,headers:i,auth:s}=t;t.headers=i=jn.from(i),t.url=e0(o0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(re.isFormData(n)){if(wn.hasStandardBrowserEnv||wn.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((l=i.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([c||"multipart/form-data",...u].join("; "))}}if(wn.hasStandardBrowserEnv&&(r&&re.isFunction(r)&&(r=r(t)),r||r!==!1&&sM(t.url))){const c=a&&o&&lM.read(o);c&&i.set(a,c)}return t},dM=typeof XMLHttpRequest<"u",fM=dM&&function(e){return new Promise(function(t,n){const r=i0(e);let a=r.data;const o=jn.from(r.headers).normalize();let{responseType:i,onUploadProgress:s,onDownloadProgress:l}=r,c,u,d,g,h;function v(){g&&g(),h&&h(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let m=new XMLHttpRequest;m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout;function p(){if(!m)return;const y=jn.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),x={data:!i||i==="text"||i==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:y,config:e,request:m};a0(function(w){t(w),v()},function(w){n(w),v()},x),m=null}"onloadend"in m?m.onloadend=p:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(p)},m.onabort=function(){m&&(n(new pt("Request aborted",pt.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new pt("Network Error",pt.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let y=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const x=r.transitional||t0;r.timeoutErrorMessage&&(y=r.timeoutErrorMessage),n(new pt(y,x.clarifyTimeoutError?pt.ETIMEDOUT:pt.ECONNABORTED,e,m)),m=null},a===void 0&&o.setContentType(null),"setRequestHeader"in m&&re.forEach(o.toJSON(),function(y,x){m.setRequestHeader(x,y)}),re.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),i&&i!=="json"&&(m.responseType=r.responseType),l&&([d,h]=Ji(l,!0),m.addEventListener("progress",d)),s&&m.upload&&([u,g]=Ji(s),m.upload.addEventListener("progress",u),m.upload.addEventListener("loadend",g)),(r.cancelToken||r.signal)&&(c=y=>{m&&(n(!y||y.type?new Va(null,e,m):y),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const b=aM(r.url);if(b&&wn.protocols.indexOf(b)===-1){n(new pt("Unsupported protocol "+b+":",pt.ERR_BAD_REQUEST,e));return}m.send(a||null)})},mM=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,a;const o=function(c){if(!a){a=!0,s();const u=c instanceof Error?c:this.reason;r.abort(u instanceof pt?u:new Va(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,o(new pt(`timeout ${t} of ms exceeded`,pt.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=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}=r;return l.unsubscribe=()=>re.asap(s),l}},pM=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,a;for(;r<n;)a=r+t,yield e.slice(r,a),r=a},gM=async function*(e,t){for await(const n of vM(e))yield*pM(n,t)},vM=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Am=(e,t,n,r)=>{const a=gM(e,t);let o=0,i,s=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await a.next();if(c){s(),l.close();return}let d=u.byteLength;if(n){let g=o+=d;n(g)}l.enqueue(new Uint8Array(u))}catch(c){throw s(c),c}},cancel(l){return s(l),a.return()}},{highWaterMark:2})},Bs=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",s0=Bs&&typeof ReadableStream=="function",hM=Bs&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),l0=(e,...t)=>{try{return!!e(...t)}catch{return!1}},yM=s0&&l0(()=>{let e=!1;const t=new Request(wn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Tm=64*1024,Tc=s0&&l0(()=>re.isReadableStream(new Response("").body)),Qi={stream:Tc&&(e=>e.body)};Bs&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Qi[t]&&(Qi[t]=re.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new pt(`Response type '${t}' is not supported`,pt.ERR_NOT_SUPPORT,r)})})})(new Response);const bM=async e=>{if(e==null)return 0;if(re.isBlob(e))return e.size;if(re.isSpecCompliantForm(e))return(await new Request(wn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(re.isArrayBufferView(e)||re.isArrayBuffer(e))return e.byteLength;if(re.isURLSearchParams(e)&&(e=e+""),re.isString(e))return(await hM(e)).byteLength},xM=async(e,t)=>re.toFiniteNumber(e.getContentLength())??bM(t),CM=Bs&&(async e=>{let{url:t,method:n,data:r,signal:a,cancelToken:o,timeout:i,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:g}=i0(e);c=c?(c+"").toLowerCase():"text";let h=mM([a,o&&o.toAbortSignal()],i),v;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let p;try{if(l&&yM&&n!=="get"&&n!=="head"&&(p=await xM(u,r))!==0){let C=new Request(t,{method:"POST",body:r,duplex:"half"}),S;if(re.isFormData(r)&&(S=C.headers.get("content-type"))&&u.setContentType(S),C.body){const[E,k]=Pm(p,Ji(jm(l)));r=Am(C.body,Tm,E,k)}}re.isString(d)||(d=d?"include":"omit");const b="credentials"in Request.prototype;v=new Request(t,{...g,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:b?d:void 0});let y=await fetch(v,g);const x=Tc&&(c==="stream"||c==="response");if(Tc&&(s||x&&m)){const C={};["status","statusText","headers"].forEach($=>{C[$]=y[$]});const S=re.toFiniteNumber(y.headers.get("content-length")),[E,k]=s&&Pm(S,Ji(jm(s),!0))||[];y=new Response(Am(y.body,Tm,E,()=>{k&&k(),m&&m()}),C)}c=c||"text";let w=await Qi[re.findKey(Qi,c)||"text"](y,e);return!x&&m&&m(),await new Promise((C,S)=>{a0(C,S,{data:w,headers:jn.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:v})})}catch(b){throw m&&m(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)?Object.assign(new pt("Network Error",pt.ERR_NETWORK,e,v),{cause:b.cause||b}):pt.from(b,b&&b.code,e,v)}}),_c={http:AD,xhr:fM,fetch:CM};re.forEach(_c,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const _m=e=>`- ${e}`,wM=e=>re.isFunction(e)||e===null||e===!1,c0={getAdapter:e=>{e=re.isArray(e)?e:[e];const{length:t}=e;let n,r;const a={};for(let o=0;o<t;o++){n=e[o];let i;if(r=n,!wM(n)&&(r=_c[(i=String(n)).toLowerCase()],r===void 0))throw new pt(`Unknown adapter '${i}'`);if(r)break;a[i||"#"+o]=r}if(!r){const o=Object.entries(a).map(([s,l])=>`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since :
|
|
401
|
-
`+o.map(
|
|
402
|
-
`):" "+
|
|
403
|
-
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=
|
|
398
|
+
`]:{animationPlayState:"running"},[`${t}-move-up-leave`]:{animationName:w,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},[`${t}-move-up-leave${t}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[t]:{[`${y}-wrapper`]:Object.assign({},C)}},{[`${t}-notice-pure-panel`]:Object.assign(Object.assign({},C),{padding:0,textAlign:"start"})}]},yN=e=>({zIndexPopup:e.zIndexPopupBase+vN+10,contentBg:e.colorBgElevated,contentPadding:`${(e.controlHeightLG-e.fontSize*e.lineHeight)/2}px ${e.paddingSM}px`}),Bh=mh("Message",e=>{const t=Fl(e,{height:150});return hN(t)},yN);var bN=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const xN={info:f.createElement(YO,null),success:f.createElement(BO,null),error:f.createElement(HO,null),warning:f.createElement(WO,null),loading:f.createElement(JO,null)},Lh=({prefixCls:e,type:t,icon:n,children:r})=>f.createElement("div",{className:nr(`${e}-custom-content`,`${e}-${t}`)},n||xN[t],f.createElement("span",null,r)),CN=e=>{const{prefixCls:t,className:n,type:r,icon:a,content:o}=e,i=bN(e,["prefixCls","className","type","icon","content"]),{getPrefixCls:l}=f.useContext(Rr),s=t||l("message"),c=_h(s),[u,d,g]=Bh(s,c);return u(f.createElement(Th,Object.assign({},i,{prefixCls:s,className:nr(n,d,`${s}-notice-pure-panel`,g,c),eventKey:"pure",duration:null,content:f.createElement(Lh,{prefixCls:s,type:r,icon:a},o)})))};var wN={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"},SN=function(e,t){return f.createElement(xr,hn({},e,{ref:t,icon:wN}))},$N=f.forwardRef(SN);function EN(e,t){return{motionName:t??`${e}-move-up`}}function ed(e){let t;const n=new Promise(a=>{t=e(()=>{a(!0)})}),r=()=>{t==null||t()};return r.then=(a,o)=>n.then(a,o),r.promise=n,r}var kN=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const IN=8,ON=3,NN=({children:e,prefixCls:t})=>{const n=_h(t),[r,a,o]=Bh(t,n);return r(f.createElement(oN,{classNames:{list:nr(a,o,n)}},e))},DN=(e,{prefixCls:t,key:n})=>f.createElement(NN,{prefixCls:t,key:n},e),MN=f.forwardRef((e,t)=>{const{top:n,prefixCls:r,getContainer:a,maxCount:o,duration:i=ON,rtl:l,transitionName:s,onAllRemoved:c}=e,{getPrefixCls:u,getPopupContainer:d,message:g,direction:h}=f.useContext(Rr),v=r||u("message"),m=()=>({left:"50%",transform:"translateX(-50%)",top:n??IN}),p=()=>nr({[`${v}-rtl`]:l??h==="rtl"}),b=()=>EN(v,s),y=f.createElement("span",{className:`${v}-close-x`},f.createElement($N,{className:`${v}-close-icon`})),[x,w]=mN({prefixCls:v,style:m,className:p,motion:b,closable:!1,closeIcon:y,duration:i,getContainer:()=>(a==null?void 0:a())||(d==null?void 0:d())||document.body,maxCount:o,onAllRemoved:c,renderNotifications:DN});return f.useImperativeHandle(t,()=>Object.assign(Object.assign({},x),{prefixCls:v,message:g})),w});let km=0;function zh(e){const t=f.useRef(null);return[f.useMemo(()=>{const n=o=>{var i;(i=t.current)===null||i===void 0||i.close(o)},r=o=>{if(!t.current){const x=()=>{};return x.then=()=>{},x}const{open:i,prefixCls:l,message:s}=t.current,c=`${l}-notice`,{content:u,icon:d,type:g,key:h,className:v,style:m,onClose:p}=o,b=kN(o,["content","icon","type","key","className","style","onClose"]);let y=h;return y==null&&(km+=1,y=`antd-message-${km}`),ed(x=>(i(Object.assign(Object.assign({},b),{key:y,content:f.createElement(Lh,{prefixCls:l,type:g,icon:d},u),placement:"top",className:nr(g&&`${c}-${g}`,v,s==null?void 0:s.className),style:Object.assign(Object.assign({},s==null?void 0:s.style),m),onClose:()=>{p==null||p(),x()}})),()=>{n(y)}))},a={open:r,destroy:o=>{var i;o!==void 0?n(o):(i=t.current)===null||i===void 0||i.destroy()}};return["info","success","warning","error","loading"].forEach(o=>{const i=(l,s,c)=>{let u;l&&typeof l=="object"&&"content"in l?u=l:u={content:l};let d,g;typeof s=="function"?g=s:(d=s,g=c);const h=Object.assign(Object.assign({onClose:g,duration:d},u),{type:o});return r(h)};a[o]=i}),a},[]),f.createElement(MN,Object.assign({key:"message-holder"},e,{ref:t}))]}function FN(e){return zh(e)}let Yn=null,Wr=e=>e(),Oo=[],No={};function Im(){const{getContainer:e,duration:t,rtl:n,maxCount:r,top:a}=No,o=(e==null?void 0:e())||document.body;return{getContainer:()=>o,duration:t,rtl:n,maxCount:r,top:a}}const PN=be.forwardRef((e,t)=>{const{messageConfig:n,sync:r}=e,{getPrefixCls:a}=En(Rr),o=No.prefixCls||a("message"),i=En(sE),[l,s]=zh(Object.assign(Object.assign(Object.assign({},n),{prefixCls:o}),i.message));return be.useImperativeHandle(t,()=>{const c=Object.assign({},l);return Object.keys(c).forEach(u=>{c[u]=(...d)=>(r(),l[u].apply(l,d))}),{instance:c,sync:r}}),s}),RN=be.forwardRef((e,t)=>{const[n,r]=be.useState(Im),a=()=>{r(Im)};be.useEffect(a,[]);const o=uO(),i=o.getRootPrefixCls(),l=o.getIconPrefixCls(),s=o.getTheme(),c=be.createElement(PN,{ref:t,sync:a,messageConfig:n});return be.createElement(za,{prefixCls:i,iconPrefixCls:l,theme:s},o.holderRender?o.holderRender(c):c)}),Al=()=>{if(!Yn){const e=document.createDocumentFragment(),t={fragment:e};Yn=t,Wr(()=>{EO()(be.createElement(RN,{ref:n=>{const{instance:r,sync:a}=n||{};Promise.resolve().then(()=>{!t.instance&&r&&(t.instance=r,t.sync=a,Al())})}}),e)});return}Yn.instance&&(Oo.forEach(e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case"open":{Wr(()=>{const r=Yn.instance.open(Object.assign(Object.assign({},No),e.config));r==null||r.then(e.resolve),e.setCloseFn(r)});break}case"destroy":Wr(()=>{Yn==null||Yn.instance.destroy(e.key)});break;default:Wr(()=>{var r;const a=(r=Yn.instance)[t].apply(r,ot(e.args));a==null||a.then(e.resolve),e.setCloseFn(a)})}}),Oo=[])};function AN(e){No=Object.assign(Object.assign({},No),e),Wr(()=>{var t;(t=Yn==null?void 0:Yn.sync)===null||t===void 0||t.call(Yn)})}function TN(e){const t=ed(n=>{let r;const a={type:"open",config:e,resolve:n,setCloseFn:o=>{r=o}};return Oo.push(a),()=>{r?Wr(()=>{r()}):a.skipped=!0}});return Al(),t}function jN(e,t){const n=ed(r=>{let a;const o={type:e,args:t,resolve:r,setCloseFn:i=>{a=i}};return Oo.push(o),()=>{a?Wr(()=>{a()}):o.skipped=!0}});return Al(),n}const _N=e=>{Oo.push({type:"destroy",key:e}),Al()},BN=["success","info","warning","error","loading"],LN={open:TN,destroy:_N,config:AN,useMessage:FN,_InternalPanelDoNotUseOrYouWillBeFired:CN},Mi=LN;BN.forEach(e=>{Mi[e]=(...t)=>jN(e,t)});var qr=256,Hh=[],Om=256,fi;for(;qr--;)Hh[qr]=(qr+256).toString(16).substring(1);function zN(e){var t=0,n=e;if(!fi||qr+n>Om*2)for(fi="",qr=0;t<Om;t++)fi+=Hh[Math.random()*256|0];return fi.substring(qr,qr+++n)}const HN=(e,t)=>{let n=e&&e.replace(/<think>[\s\S]*?<\/think>/g,"");n=n.replace(/\[retrive-tag[^\]]*\][\s\S]*?\[\/retrive-tag\]/g,""),n=n.replace(/<a\s+[^>]*>(.*?)<\/a>/g,""),console.log("_content",n);const r=new ip(t.currentTarget||t.target,{text:()=>n});try{r.on("success",()=>{Mi.success("\u6587\u672C\u590D\u5236\u6210\u529F",2),r.destroy()}),r.on("error",a=>{Mi.error("\u590D\u5236\u5931\u8D25",2),r.destroy()}),r.onClick(t)}catch(a){r.destroy(),Mi.error("\u590D\u5236\u5931\u8D25: "+a,2)}};function Er(e){return X.jsxs("span",{className:"flex items-center gap-1",children:[X.jsx("span",{className:"font-medium text-gray-800",children:e.label}),e.description&&X.jsx(To,{title:e.description,className:" cursor-help",children:X.jsx(d$,{className:"ml-0.5 text-gray-400",size:12})}),e.required&&X.jsx(Pp,{className:"text-[9px]",bordered:!1,color:"warning",children:"\u5FC5\u586B"})]})}function VN(e=[],t,n={}){const[r,a]=be.useState(()=>{const c={};return e.forEach(u=>{u.type==="switch"&&(c[u.name]=n[u.name]??u.defaultValue??!1)}),c}),o=be.useRef(),i=(c,u,d)=>{a(g=>({...g,[c]:u})),o.current&&d&&(u||d.forEach(g=>{o.current.setFieldsValue({[g]:void 0})}))},l=new Set;e.forEach(c=>{c.type==="switch"&&c.controlledItems&&r[c.name]===!1&&c.controlledItems.forEach(u=>l.add(u))});const s=e.map(c=>{var u,d,g,h,v,m;return l.has(c.name)?null:c.type==="divider"?X.jsx("div",{className:"my-3 border-b border-solid border-gray-200"},c.name||Math.random()):c.type==="input"?X.jsx(Jt.Item,{label:Er(c),name:c.name,rules:[{required:c.required,message:c.error||`\u8BF7\u8F93\u5165${c.label}`}],children:X.jsx(Zr,{placeholder:c.placeholder,disabled:c.disabled,className:c.className})},c.name):c.type==="select"?X.jsx(Jt.Item,{label:Er(c),name:c.name,rules:[{required:c.required,message:c.error||`\u8BF7\u9009\u62E9${c.label}`}],children:X.jsx(yy,{options:c.options,placeholder:c.placeholder,disabled:c.disabled,className:c.className})},c.name):c.type==="number"?X.jsx(Jt.Item,{label:Er(c),name:c.name,rules:[{required:c.required,message:c.error||`\u8BF7\u8F93\u5165${c.label}`}],children:X.jsx(Hs,{addonAfter:c.unit?X.jsx("span",{className:"text-[10px] text-gray-300",children:c.unit}):null,min:(u=c.range)==null?void 0:u.min,max:(d=c.range)==null?void 0:d.max,step:c.step,placeholder:c.placeholder,disabled:c.disabled,className:c.className,style:{width:"100%"}})},c.name):c.type==="slider"?X.jsxs("div",{className:"mb-6",children:[X.jsxs("div",{className:"flex items-center justify-between mb-3",children:[X.jsx("div",{className:"flex items-center text-sm",children:Er(c)}),X.jsx(Jt.Item,{name:c.name,noStyle:!0,children:X.jsx(Hs,{min:(g=c.range)==null?void 0:g.min,max:(h=c.range)==null?void 0:h.max,step:c.step,disabled:c.disabled,style:{width:80,marginLeft:8}})}),c.unit&&X.jsx("span",{className:"ml-2",children:c.unit})]}),X.jsx(Jt.Item,{name:c.name,noStyle:!0,children:X.jsx(FC,{min:(v=c.range)==null?void 0:v.min,max:(m=c.range)==null?void 0:m.max,step:c.step,disabled:c.disabled,className:c.className})})]},c.name):c.type==="switch"?X.jsx(Jt.Item,{label:null,colon:!1,style:{marginBottom:16},children:X.jsxs(H0,{align:"middle",justify:"space-between",children:[X.jsx(sd,{children:Er(c)}),X.jsx(sd,{children:X.jsx(Jt.Item,{name:c.name,valuePropName:"checked",noStyle:!0,children:X.jsx($y,{disabled:c.disabled,checked:r[c.name],onChange:p=>i(c.name,p,c.controlledItems)})})})]})},c.name):c.type==="textarea"?X.jsx(Jt.Item,{label:Er(c),name:c.name,rules:[{required:c.required,message:c.error||`\u8BF7\u8F93\u5165${c.label}`}],children:X.jsx(Zr.TextArea,{placeholder:c.placeholder,disabled:c.disabled,className:c.className,autoSize:{minRows:2,maxRows:6}})},c.name):c.type==="date"?X.jsx(Jt.Item,{label:Er(c),name:c.name,rules:[{required:c.required,message:c.error||`\u8BF7\u9009\u62E9${c.label}`}],children:X.jsx(ja,{placeholder:c.placeholder,disabled:c.disabled,className:c.className,style:{width:"100%"}})},c.name):c.type==="radio"?X.jsx(Jt.Item,{label:Er(c),name:c.name,rules:[{required:c.required,message:c.error||`\u8BF7\u9009\u62E9${c.label}`}],children:X.jsx(Cl.Group,{options:c.options,disabled:c.disabled,className:c.className})},c.name):null});return be.useEffect(()=>{t&&typeof t.setFormRef=="function"&&t.setFormRef(o)},[t]),s}function KN({config:e=[],initialValues:t={},onChange:n,styles:r}){const a=VN(e,r,t),[o]=Jt.useForm();return X.jsx(Jt,{form:o,layout:"vertical",size:(r==null?void 0:r.formSize)||"middle",initialValues:t,onValuesChange:(i,l)=>n==null?void 0:n(l),requiredMark:!1,style:{padding:16},children:a})}function WN(){return X.jsx("div",{className:"main relative h-full w-full flex items-center justify-center",children:X.jsx("div",{className:"text-2xl font-bold",children:"app loading..."})})}function qN(){return X.jsx("div",{className:"main relative h-full w-full flex items-center justify-center",children:X.jsx("div",{className:"text-2xl font-bold",children:"display loading..."})})}function UN(){return X.jsx("div",{className:"main relative h-full w-full bg-transparent! flex items-center justify-center",children:X.jsx("div",{className:"text-2xl font-bold",children:"app error..."})})}function YN(){return X.jsx("div",{className:"main relative h-full w-full flex items-center justify-center",children:X.jsx("div",{className:"text-2xl font-bold",children:"display error..."})})}function GN(){return X.jsxs("div",{className:"flex flex-col items-center justify-center h-full w-full",children:[X.jsx("div",{className:"text-2xl text-blue-500 font-bold mb-4",children:"\u60A8\u597D\uFF0C\u6211\u662F\u60A8\u7684\u4E13\u5C5EAI\u52A9\u7406\u3010\u5C0F\u9CB8\u3011"}),X.jsx("div",{className:"text-zinc-500",children:"\u8BF7\u8F93\u5165\u60A8\u7684\u95EE\u9898\u6216\u9700\u6C42\uFF0C\u6211\u4F1A\u5C3D\u529B\u4E3A\u60A8\u89E3\u7B54\u3002"})]})}function XN(e,t){return t?{...e,...t,colors:{...e.colors,...t.colors},space:{...e.space,...t.space},icons:{...e.icons,...t.icons},others:{...e.others,...t.others}}:e}function JN(e){return{...e,size:Xs[e.size]||e.size,radius:sv[e.radius]||e.radius,padding:n$[e.padding]||e.padding,margin:r$[e.margin]||e.margin,shadow:a$[e.shadow]||e.shadow,lineHeight:o$[e.lineHeight]||e.lineHeight,sidebar:t$[e.sidebar]||e.sidebar}}function QN({chatData:e,sidebar:t,eventsEmit:n,status:r,CustomComponents:a,recommandQuestions:o=[],styles:i,senderConfig:l,fileUploadStatus:s,onSenderConfigChange:c,activeSessionId:u}){const d=St(null),[g,h]=ft(""),[v,m]=ft([]),[p,b]=ft(!1),y=(t&&t.length>0?t:[]).filter(Y=>Y.enabled!==!1),[x,w]=ft(()=>{var Y;return(Y=y[0])==null?void 0:Y.key}),C=St({}),[S]=ft(0),E=(e==null?void 0:e.messages)||[],[k,$]=ft({});mt(()=>{n==null||n("fileManager:change",{uploadedFiles:v,removeFile:(Y,ee,ce)=>{m(me=>me.filter((we,le)=>le!==ee))},setUploadedFiles:Y=>{m(ee=>typeof Y=="function"?Y(ee):[...ee,...Y])}})},[v]);const O=()=>{h(""),m([])},D=(Y,ee)=>{if(n)switch(console.log(Y,ee,"core\u5185\u90E8\u8F6C\u53D1"),Y){case"action_copy:click":ee&&HN(ee.content,ee.event);break;case"sender:configChange":$(ee.all),c==null||c(ee),n(Y,ee);break;case"conversation:create":const ce=zN(3);n==null||n("conversation:create",{id:ce});break;case"sender:change":ee&&h(ee);break;case"sender:clear":O();break;case"sender:send_recommandQuestion":{const me={};y.forEach(we=>{we.type==="form"&&(me[we.key]=C.current[we.key]??we.initialValues??{})}),n==null||n("sender:send",{content:ee.content,files:v,status:r,currentData:e,senderConfig:k,formData:me,clearFn:O}),setTimeout(()=>{d.current&&d.current.scrollTo&&d.current.scrollTo({top:0,behavior:"smooth"})},120);break}case"sender:send":{const me={};y.forEach(we=>{we.type==="form"&&(me[we.key]=C.current[we.key]??we.initialValues??{})}),n==null||n("sender:send",{content:g,files:v,status:r,currentData:e,senderConfig:k,formData:me,clearFn:O}),setTimeout(()=>{d.current&&d.current.scrollTo&&d.current.scrollTo({top:0,behavior:"smooth"})},120);break}default:n(Y,ee)}},P=Y=>{Y.preventDefault(),b(!1);const ee=Array.from(Y.dataTransfer.files||[]);if(ee.length>0){const ce=ee.filter(me=>/image|pdf|word|doc|docx|ppt|pptx|xls|xlsx|text|plain|csv|zip|rar|7z|json|markdown|md/.test(me.type)||/\.(pdf|docx?|pptx?|xlsx?|csv|zip|rar|7z|json|md)$/i.test(me.name));ce.length>0&&m(me=>[...me,...ce.map(we=>({file:we,type:I(we)}))])}},A=Y=>{Y.preventDefault(),p||b(!0)},N=Y=>{Y.preventDefault(),b(!1)};function I(Y){return Y.type.startsWith("image")?"image":"document"}const M=Y=>{$(Y.all),c==null||c(Y)},F=()=>{d.current.addEventListener("wheel",Y=>{Y.preventDefault();const{deltaY:ee}=Y;d.current.scrollTop-=ee})},R=St(null);mt(()=>{if(!R.current)return R.current=setInterval(()=>{var Y;(Y=d==null?void 0:d.current)!=null&&Y.scrollTo&&(F(),clearInterval(R.current),R.current=null)},100),()=>{var Y;clearInterval(R.current),R.current=null,(Y=d==null?void 0:d.current)!=null&&Y.removeEventListener&&d.current.removeEventListener("wheel",F)}},[u]);const T=XN(e$,i==null?void 0:i.theme),_=JN(T.space),B={...T,space:_,colors:{...T.colors,info:T.colors.info||"#0000FF",background:T.colors.background||"#ffffff",text:T.colors.text||"#343a40",border:T.colors.border||"#dee2e6",disabled:T.colors.disabled||"#808080",disabledBackground:T.colors.disabledBackground||"#F5F5F5",disabledText:T.colors.disabledText||"#808080"}},L={...i,theme:B},j=B.space.radius,z=B.colors.appBackground,K="",V=B.space.shadow,G=y.length===0?0:B.space.sidebar,U=B.space.size,Z=B.space.padding,Q=B.colors.text;return X.jsxs(X.Fragment,{children:[r.app==="initializing"&&(a!=null&&a.AppLoading?X.jsx(a.AppLoading,{}):X.jsx(WN,{})),r.app==="error"&&(a!=null&&a.AppError?X.jsx(a.AppError,{}):X.jsx(UN,{})),r.app==="ready"&&X.jsxs("div",{style:{width:"100%",height:"100%",position:"relative",display:"flex"},children:[y.length===0?null:X.jsxs("div",{style:{width:G,borderRadius:j,boxShadow:V,background:K,display:"flex",flexDirection:"column",height:"100%"},children:[(a==null?void 0:a.LogoBox)&&X.jsx("header",{style:{display:"flex",alignItems:"center",height:55,width:"100%",borderBottom:`1px solid ${T.colors.border}`,padding:Z,fontSize:Xs.lg,fontWeight:700,color:T.colors.primary,background:K,borderTopLeftRadius:j,borderTopRightRadius:j},children:X.jsx(a.LogoBox,{})}),X.jsxs("div",{style:{width:G,borderRadius:j,background:K,flex:1,display:"flex",flexDirection:"column",position:"relative",marginBottom:y.length>1?55:0,borderBottomRightRadius:j},children:[(()=>{const Y=y.find(ee=>ee.key===x);if(!Y)return null;if(Y.type==="custom")return Y.component;if(Y.type==="form"){const ee=C.current[Y.key]||Y.initialValues||{};return X.jsx(KN,{config:Y.formConfig,initialValues:ee,onChange:ce=>{var me;C.current[Y.key]=ce,(me=Y.onChange)==null||me.call(Y,ce),typeof n=="function"&&n("form:change",{...C.current})},styles:i},Y.key+"_"+S)}return null})(),y.length>1&&X.jsx("div",{style:{display:"flex",gap:12,margin:"0 auto",width:"100%",alignItems:"center",justifyContent:"end",padding:"8px 12px",position:"absolute",bottom:0,borderBottom:`1px solid ${T.colors.border}`,borderTop:`1px solid ${T.colors.border}`,borderBottomRightRadius:j,background:K},children:y.map(Y=>{const ee=Y.icon,ce=x===Y.key;return X.jsx("button",{onClick:()=>w(Y.key),style:{padding:8,borderRadius:sv.md,background:ce?T.colors.primary+"22":"transparent",color:ce?T.colors.primary:"#888",border:"none",cursor:"pointer",fontWeight:ce?600:400,transition:"all 0.2s"},title:Y.label,children:ee},Y.key)})})]})]}),X.jsxs("div",{className:"relative ",style:{width:G===0?"100%":`calc(100% - ${G})`,borderRadius:j,background:z,fontSize:U,color:Q,position:"relative",height:"100%",zIndex:p?10:void 0,display:"flex",flexDirection:"column"},onDrop:P,onDragOver:A,onDragLeave:N,children:[p&&X.jsx("div",{style:{position:"absolute",inset:0,background:T.colors.primary+"14",border:`4px dashed ${T.colors.primary}`,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,pointerEvents:"none",userSelect:"none",borderRadius:j},children:X.jsx("div",{style:{color:T.colors.primary,fontSize:Xs.lg,fontWeight:700},children:"\u677E\u5F00\u6587\u4EF6\u4EE5\u4E0A\u4F20"})}),X.jsx("div",{style:{width:"100%",position:"relative",height:"calc(100% - 155px)",zIndex:p?10:void 0,display:"flex",flexDirection:"column"},children:X.jsx("div",{style:{width:"100%",minWidth:520,margin:"0 auto",flex:1,display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:e.isNew?a!=null&&a.WelcomeComponent?X.jsx(a.WelcomeComponent,{}):X.jsx(GN,{}):r.display==="loading"?a!=null&&a.DisplayLoading?X.jsx(a.DisplayLoading,{}):X.jsx(qN,{}):r.display==="error"?a!=null&&a.DisplayError?X.jsx(a.DisplayError,{}):X.jsx(YN,{}):X.jsxs("div",{ref:d,className:"relative px-8",style:{direction:"rtl",transform:"rotate(180deg)",flex:1,overflowY:"scroll",paddingTop:230,paddingBottom:20,display:"flex",flexDirection:"column",alignItems:"center"},children:[X.jsx("div",{style:{flexGrow:1,flexShrink:1,flex:1}}),X.jsx("div",{style:{width:"100%",maxWidth:1200},children:X.jsx(oE,{status:r.display,messages:E,eventsEmit:n,renderAiChatBox:a==null?void 0:a.AiChatBox,renderUserChatBox:a==null?void 0:a.UserChatBox})})]})})}),X.jsx(nE,{value:g,status:r.sender,styles:L,recommandQuestions:o,eventsEmit:(Y,ee)=>{D(Y,ee)},uploadedFiles:v,fileUploadStatus:s,onUpload:Y=>{Y&&Y.length>0&&m(ee=>[...ee,...Array.from(Y).map(ce=>({file:ce,type:I(ce)}))])},onRemoveFile:Y=>{m(ee=>ee.filter((ce,me)=>me!==Y))},senderConfig:l,onSenderConfigChange:M})]})]})]})}aa({badgeCounts:{},updateBadgeCount:()=>{}});function Vh(e,t){return function(){return e.apply(t,arguments)}}const{toString:ZN}=Object.prototype,{getPrototypeOf:td}=Object,{iterator:Tl,toStringTag:Kh}=Symbol,jl=(e=>t=>{const n=ZN.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ir=e=>(e=e.toLowerCase(),t=>jl(t)===e),_l=e=>t=>typeof t===e,{isArray:Va}=Array,Do=_l("undefined");function Vo(e){return e!==null&&!Do(e)&&e.constructor!==null&&!Do(e.constructor)&&Rn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Wh=ir("ArrayBuffer");function eD(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Wh(e.buffer),t}const tD=_l("string"),Rn=_l("function"),qh=_l("number"),Ko=e=>e!==null&&typeof e=="object",nD=e=>e===!0||e===!1,Fi=e=>{if(jl(e)!=="object")return!1;const t=td(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Kh in e)&&!(Tl in e)},rD=e=>{if(!Ko(e)||Vo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},aD=ir("Date"),oD=ir("File"),iD=ir("Blob"),lD=ir("FileList"),sD=e=>Ko(e)&&Rn(e.pipe),cD=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Rn(e.append)&&((t=jl(e))==="formdata"||t==="object"&&Rn(e.toString)&&e.toString()==="[object FormData]"))},uD=ir("URLSearchParams"),[dD,fD,mD,pD]=["ReadableStream","Request","Response","Headers"].map(ir),gD=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Wo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),Va(e))for(r=0,a=e.length;r<a;r++)t.call(null,e[r],r,e);else{if(Vo(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let l;for(r=0;r<i;r++)l=o[r],t.call(null,e[l],l,e)}}function Uh(e,t){if(Vo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,a;for(;r-- >0;)if(a=n[r],t===a.toLowerCase())return a;return null}const Ur=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Yh=e=>!Do(e)&&e!==Ur;function Ac(){const{caseless:e}=Yh(this)&&this||{},t={},n=(r,a)=>{const o=e&&Uh(t,a)||a;Fi(t[o])&&Fi(r)?t[o]=Ac(t[o],r):Fi(r)?t[o]=Ac({},r):Va(r)?t[o]=r.slice():t[o]=r};for(let r=0,a=arguments.length;r<a;r++)arguments[r]&&Wo(arguments[r],n);return t}const vD=(e,t,n,{allOwnKeys:r}={})=>(Wo(t,(a,o)=>{n&&Rn(a)?e[o]=Vh(a,n):e[o]=a},{allOwnKeys:r}),e),hD=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),yD=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},bD=(e,t,n,r)=>{let a,o,i;const l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)i=a[o],(!r||r(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=n!==!1&&td(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},xD=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},CD=e=>{if(!e)return null;if(Va(e))return e;let t=e.length;if(!qh(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},wD=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&td(Uint8Array)),SD=(e,t)=>{const n=(e&&e[Tl]).call(e);let r;for(;(r=n.next())&&!r.done;){const a=r.value;t.call(e,a[0],a[1])}},$D=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ED=ir("HTMLFormElement"),kD=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,n,r){return n.toUpperCase()+r}),Nm=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ID=ir("RegExp"),Gh=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Wo(n,(a,o)=>{let i;(i=t(a,o,e))!==!1&&(r[o]=i||a)}),Object.defineProperties(e,r)},OD=e=>{Gh(e,(t,n)=>{if(Rn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Rn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ND=(e,t)=>{const n={},r=a=>{a.forEach(o=>{n[o]=!0})};return Va(e)?r(e):r(String(e).split(t)),n},DD=()=>{},MD=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function FD(e){return!!(e&&Rn(e.append)&&e[Kh]==="FormData"&&e[Tl])}const PD=e=>{const t=new Array(10),n=(r,a)=>{if(Ko(r)){if(t.indexOf(r)>=0)return;if(Vo(r))return r;if(!("toJSON"in r)){t[a]=r;const o=Va(r)?[]:{};return Wo(r,(i,l)=>{const s=n(i,a+1);!Do(s)&&(o[l]=s)}),t[a]=void 0,o}}return r};return n(e,0)},RD=ir("AsyncFunction"),AD=e=>e&&(Ko(e)||Rn(e))&&Rn(e.then)&&Rn(e.catch),Xh=((e,t)=>e?setImmediate:t?((n,r)=>(Ur.addEventListener("message",({source:a,data:o})=>{a===Ur&&o===n&&r.length&&r.shift()()},!1),a=>{r.push(a),Ur.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Rn(Ur.postMessage)),TD=typeof queueMicrotask<"u"?queueMicrotask.bind(Ur):typeof process<"u"&&process.nextTick||Xh,jD=e=>e!=null&&Rn(e[Tl]),re={isArray:Va,isArrayBuffer:Wh,isBuffer:Vo,isFormData:cD,isArrayBufferView:eD,isString:tD,isNumber:qh,isBoolean:nD,isObject:Ko,isPlainObject:Fi,isEmptyObject:rD,isReadableStream:dD,isRequest:fD,isResponse:mD,isHeaders:pD,isUndefined:Do,isDate:aD,isFile:oD,isBlob:iD,isRegExp:ID,isFunction:Rn,isStream:sD,isURLSearchParams:uD,isTypedArray:wD,isFileList:lD,forEach:Wo,merge:Ac,extend:vD,trim:gD,stripBOM:hD,inherits:yD,toFlatObject:bD,kindOf:jl,kindOfTest:ir,endsWith:xD,toArray:CD,forEachEntry:SD,matchAll:$D,isHTMLForm:ED,hasOwnProperty:Nm,hasOwnProp:Nm,reduceDescriptors:Gh,freezeMethods:OD,toObjectSet:ND,toCamelCase:kD,noop:DD,toFiniteNumber:MD,findKey:Uh,global:Ur,isContextDefined:Yh,isSpecCompliantForm:FD,toJSONObject:PD,isAsyncFn:RD,isThenable:AD,setImmediate:Xh,asap:TD,isIterable:jD};function gt(e,t,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}re.inherits(gt,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:re.toJSONObject(this.config),code:this.code,status:this.status}}});const Jh=gt.prototype,Qh={};["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=>{Qh[e]={value:e}});Object.defineProperties(gt,Qh);Object.defineProperty(Jh,"isAxiosError",{value:!0});gt.from=(e,t,n,r,a,o)=>{const i=Object.create(Jh);return re.toFlatObject(e,i,function(l){return l!==Error.prototype},l=>l!=="isAxiosError"),gt.call(i,e.message,t,n,r,a),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const _D=null;function Tc(e){return re.isPlainObject(e)||re.isArray(e)}function Zh(e){return re.endsWith(e,"[]")?e.slice(0,-2):e}function Dm(e,t,n){return e?e.concat(t).map(function(r,a){return r=Zh(r),!n&&a?"["+r+"]":r}).join(n?".":""):t}function BD(e){return re.isArray(e)&&!e.some(Tc)}const LD=re.toFlatObject(re,{},null,function(e){return/^is[A-Z]/.test(e)});function Bl(e,t,n){if(!re.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=re.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,v){return!re.isUndefined(v[h])});const r=n.metaTokens,a=n.visitor||c,o=n.dots,i=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&re.isSpecCompliantForm(t);if(!re.isFunction(a))throw new TypeError("visitor must be a function");function s(h){if(h===null)return"";if(re.isDate(h))return h.toISOString();if(re.isBoolean(h))return h.toString();if(!l&&re.isBlob(h))throw new gt("Blob is not supported. Use a Buffer instead.");return re.isArrayBuffer(h)||re.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,v,m){let p=h;if(h&&!m&&typeof h=="object"){if(re.endsWith(v,"{}"))v=r?v:v.slice(0,-2),h=JSON.stringify(h);else if(re.isArray(h)&&BD(h)||(re.isFileList(h)||re.endsWith(v,"[]"))&&(p=re.toArray(h)))return v=Zh(v),p.forEach(function(b,y){!(re.isUndefined(b)||b===null)&&t.append(i===!0?Dm([v],y,o):i===null?v:v+"[]",s(b))}),!1}return Tc(h)?!0:(t.append(Dm(m,v,o),s(h)),!1)}const u=[],d=Object.assign(LD,{defaultVisitor:c,convertValue:s,isVisitable:Tc});function g(h,v){if(!re.isUndefined(h)){if(u.indexOf(h)!==-1)throw Error("Circular reference detected in "+v.join("."));u.push(h),re.forEach(h,function(m,p){(!(re.isUndefined(m)||m===null)&&a.call(t,m,re.isString(p)?p.trim():p,v,d))===!0&&g(m,v?v.concat(p):[p])}),u.pop()}}if(!re.isObject(e))throw new TypeError("data must be an object");return g(e),t}function Mm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function nd(e,t){this._pairs=[],e&&Bl(e,this,t)}const e0=nd.prototype;e0.append=function(e,t){this._pairs.push([e,t])};e0.toString=function(e){const t=e?function(n){return e.call(this,n,Mm)}:Mm;return this._pairs.map(function(n){return t(n[0])+"="+t(n[1])},"").join("&")};function zD(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function t0(e,t,n){if(!t)return e;const r=n&&n.encode||zD;re.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let o;if(a?o=a(t,n):o=re.isURLSearchParams(t)?t.toString():new nd(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Fm{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){re.forEach(this.handlers,function(n){n!==null&&t(n)})}}const n0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},HD=typeof URLSearchParams<"u"?URLSearchParams:nd,VD=typeof FormData<"u"?FormData:null,KD=typeof Blob<"u"?Blob:null,WD={isBrowser:!0,classes:{URLSearchParams:HD,FormData:VD,Blob:KD},protocols:["http","https","file","blob","url","data"]},rd=typeof window<"u"&&typeof document<"u",jc=typeof navigator=="object"&&navigator||void 0,qD=rd&&(!jc||["ReactNative","NativeScript","NS"].indexOf(jc.product)<0),UD=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",YD=rd&&window.location.href||"http://localhost",GD=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rd,hasStandardBrowserEnv:qD,hasStandardBrowserWebWorkerEnv:UD,navigator:jc,origin:YD},Symbol.toStringTag,{value:"Module"})),Sn={...GD,...WD};function XD(e,t){return Bl(e,new Sn.classes.URLSearchParams,{visitor:function(n,r,a,o){return Sn.isNode&&re.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function JD(e){return re.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function QD(e){const t={},n=Object.keys(e);let r;const a=n.length;let o;for(r=0;r<a;r++)o=n[r],t[o]=e[o];return t}function r0(e){function t(n,r,a,o){let i=n[o++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),s=o>=n.length;return i=!i&&re.isArray(a)?a.length:i,s?(re.hasOwnProp(a,i)?a[i]=[a[i],r]:a[i]=r,!l):((!a[i]||!re.isObject(a[i]))&&(a[i]=[]),t(n,r,a[i],o)&&re.isArray(a[i])&&(a[i]=QD(a[i])),!l)}if(re.isFormData(e)&&re.isFunction(e.entries)){const n={};return re.forEachEntry(e,(r,a)=>{t(JD(r),a,n,0)}),n}return null}function ZD(e,t,n){if(re.isString(e))try{return(t||JSON.parse)(e),re.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const qo={transitional:n0,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,a=re.isObject(e);if(a&&re.isHTMLForm(e)&&(e=new FormData(e)),re.isFormData(e))return r?JSON.stringify(r0(e)):e;if(re.isArrayBuffer(e)||re.isBuffer(e)||re.isStream(e)||re.isFile(e)||re.isBlob(e)||re.isReadableStream(e))return e;if(re.isArrayBufferView(e))return e.buffer;if(re.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return XD(e,this.formSerializer).toString();if((o=re.isFileList(e))||n.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return Bl(o?{"files[]":e}:e,i&&new i,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),ZD(e)):e}],transformResponse:[function(e){const t=this.transitional||qo.transitional,n=t&&t.forcedJSONParsing,r=this.responseType==="json";if(re.isResponse(e)||re.isReadableStream(e))return e;if(e&&re.isString(e)&&(n&&!this.responseType||r)){const a=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(o){if(a)throw o.name==="SyntaxError"?gt.from(o,gt.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Sn.classes.FormData,Blob:Sn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};re.forEach(["delete","get","head","post","put","patch"],e=>{qo.headers[e]={}});const eM=re.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"]),tM=e=>{const t={};let n,r,a;return e&&e.split(`
|
|
399
|
+
`).forEach(function(o){a=o.indexOf(":"),n=o.substring(0,a).trim().toLowerCase(),r=o.substring(a+1).trim(),!(!n||t[n]&&eM[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Pm=Symbol("internals");function ro(e){return e&&String(e).trim().toLowerCase()}function Pi(e){return e===!1||e==null?e:re.isArray(e)?e.map(Pi):String(e)}function nM(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const rM=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Cs(e,t,n,r,a){if(re.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!re.isString(t)){if(re.isString(r))return t.indexOf(r)!==-1;if(re.isRegExp(r))return r.test(t)}}function aM(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function oM(e,t){const n=re.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(a,o,i){return this[r].call(this,t,a,o,i)},configurable:!0})})}class An{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function o(l,s,c){const u=ro(s);if(!u)throw new Error("header name must be a non-empty string");const d=re.findKey(a,u);(!d||a[d]===void 0||c===!0||c===void 0&&a[d]!==!1)&&(a[d||s]=Pi(l))}const i=(l,s)=>re.forEach(l,(c,u)=>o(c,u,s));if(re.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(re.isString(t)&&(t=t.trim())&&!rM(t))i(tM(t),n);else if(re.isObject(t)&&re.isIterable(t)){let l={},s,c;for(const u of t){if(!re.isArray(u))throw TypeError("Object iterator must return a key-value pair");l[c=u[0]]=(s=l[c])?re.isArray(s)?[...s,u[1]]:[s,u[1]]:u[1]}i(l,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=ro(t),t){const r=re.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return nM(a);if(re.isFunction(n))return n.call(this,a,r);if(re.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ro(t),t){const r=re.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Cs(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function o(i){if(i=ro(i),i){const l=re.findKey(r,i);l&&(!n||Cs(r,r[l],l,n))&&(delete r[l],a=!0)}}return re.isArray(t)?t.forEach(o):o(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const o=n[r];(!t||Cs(this,this[o],o,t,!0))&&(delete this[o],a=!0)}return a}normalize(t){const n=this,r={};return re.forEach(this,(a,o)=>{const i=re.findKey(r,o);if(i){n[i]=Pi(a),delete n[o];return}const l=t?aM(o):String(o).trim();l!==o&&delete n[o],n[l]=Pi(a),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return re.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&re.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
400
|
+
`)}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,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const n=(this[Pm]=this[Pm]={accessors:{}}).accessors,r=this.prototype;function a(o){const i=ro(o);n[i]||(oM(r,o),n[i]=!0)}return re.isArray(t)?t.forEach(a):a(t),this}}An.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);re.reduceDescriptors(An.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});re.freezeMethods(An);function ws(e,t){const n=this||qo,r=t||n,a=An.from(r.headers);let o=r.data;return re.forEach(e,function(i){o=i.call(n,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function a0(e){return!!(e&&e.__CANCEL__)}function Ka(e,t,n){gt.call(this,e??"canceled",gt.ERR_CANCELED,t,n),this.name="CanceledError"}re.inherits(Ka,gt,{__CANCEL__:!0});function o0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new gt("Request failed with status code "+n.status,[gt.ERR_BAD_REQUEST,gt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function iM(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function lM(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,o=0,i;return t=t!==void 0?t:1e3,function(l){const s=Date.now(),c=r[o];i||(i=s),n[a]=l,r[a]=s;let u=o,d=0;for(;u!==a;)d+=n[u++],u=u%e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),s-i<t)return;const g=c&&s-c;return g?Math.round(d*1e3/g):void 0}}function sM(e,t){let n=0,r=1e3/t,a,o;const i=(l,s=Date.now())=>{n=s,a=null,o&&(clearTimeout(o),o=null),e(...l)};return[(...l)=>{const s=Date.now(),c=s-n;c>=r?i(l,s):(a=l,o||(o=setTimeout(()=>{o=null,i(a)},r-c)))},()=>a&&i(a)]}const Qi=(e,t,n=3)=>{let r=0;const a=lM(50,250);return sM(o=>{const i=o.loaded,l=o.lengthComputable?o.total:void 0,s=i-r,c=a(s),u=i<=l;r=i;const d={loaded:i,total:l,progress:l?i/l:void 0,bytes:s,rate:c||void 0,estimated:c&&l&&u?(l-i)/c:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(d)},n)},Rm=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Am=e=>(...t)=>re.asap(()=>e(...t)),cM=Sn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Sn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Sn.origin),Sn.navigator&&/(msie|trident)/i.test(Sn.navigator.userAgent)):()=>!0,uM=Sn.hasStandardBrowserEnv?{write(e,t,n,r,a,o){const i=[e+"="+encodeURIComponent(t)];re.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),re.isString(r)&&i.push("path="+r),re.isString(a)&&i.push("domain="+a),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function dM(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function fM(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function i0(e,t,n){let r=!dM(t);return e&&(r||n==!1)?fM(e,t):t}const Tm=e=>e instanceof An?{...e}:e;function ra(e,t){t=t||{};const n={};function r(c,u,d,g){return re.isPlainObject(c)&&re.isPlainObject(u)?re.merge.call({caseless:g},c,u):re.isPlainObject(u)?re.merge({},u):re.isArray(u)?u.slice():u}function a(c,u,d,g){if(re.isUndefined(u)){if(!re.isUndefined(c))return r(void 0,c,d,g)}else return r(c,u,d,g)}function o(c,u){if(!re.isUndefined(u))return r(void 0,u)}function i(c,u){if(re.isUndefined(u)){if(!re.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function l(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const s={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(c,u,d)=>a(Tm(c),Tm(u),d,!0)};return re.forEach(Object.keys({...e,...t}),function(c){const u=s[c]||a,d=u(e[c],t[c],c);re.isUndefined(d)&&u!==l||(n[c]=d)}),n}const l0=e=>{const t=ra({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:o,headers:i,auth:l}=t;t.headers=i=An.from(i),t.url=t0(i0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let s;if(re.isFormData(n)){if(Sn.hasStandardBrowserEnv||Sn.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((s=i.getContentType())!==!1){const[c,...u]=s?s.split(";").map(d=>d.trim()).filter(Boolean):[];i.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Sn.hasStandardBrowserEnv&&(r&&re.isFunction(r)&&(r=r(t)),r||r!==!1&&cM(t.url))){const c=a&&o&&uM.read(o);c&&i.set(a,c)}return t},mM=typeof XMLHttpRequest<"u",pM=mM&&function(e){return new Promise(function(t,n){const r=l0(e);let a=r.data;const o=An.from(r.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:s}=r,c,u,d,g,h;function v(){g&&g(),h&&h(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let m=new XMLHttpRequest;m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout;function p(){if(!m)return;const y=An.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),x={data:!i||i==="text"||i==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:y,config:e,request:m};o0(function(w){t(w),v()},function(w){n(w),v()},x),m=null}"onloadend"in m?m.onloadend=p:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(p)},m.onabort=function(){m&&(n(new gt("Request aborted",gt.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new gt("Network Error",gt.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let y=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const x=r.transitional||n0;r.timeoutErrorMessage&&(y=r.timeoutErrorMessage),n(new gt(y,x.clarifyTimeoutError?gt.ETIMEDOUT:gt.ECONNABORTED,e,m)),m=null},a===void 0&&o.setContentType(null),"setRequestHeader"in m&&re.forEach(o.toJSON(),function(y,x){m.setRequestHeader(x,y)}),re.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),i&&i!=="json"&&(m.responseType=r.responseType),s&&([d,h]=Qi(s,!0),m.addEventListener("progress",d)),l&&m.upload&&([u,g]=Qi(l),m.upload.addEventListener("progress",u),m.upload.addEventListener("loadend",g)),(r.cancelToken||r.signal)&&(c=y=>{m&&(n(!y||y.type?new Ka(null,e,m):y),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const b=iM(r.url);if(b&&Sn.protocols.indexOf(b)===-1){n(new gt("Unsupported protocol "+b+":",gt.ERR_BAD_REQUEST,e));return}m.send(a||null)})},gM=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,a;const o=function(c){if(!a){a=!0,l();const u=c instanceof Error?c:this.reason;r.abort(u instanceof gt?u:new Ka(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,o(new gt(`timeout ${t} of ms exceeded`,gt.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>re.asap(l),s}},vM=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,a;for(;r<n;)a=r+t,yield e.slice(r,a),r=a},hM=async function*(e,t){for await(const n of yM(e))yield*vM(n,t)},yM=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},jm=(e,t,n,r)=>{const a=hM(e,t);let o=0,i,l=s=>{i||(i=!0,r&&r(s))};return new ReadableStream({async pull(s){try{const{done:c,value:u}=await a.next();if(c){l(),s.close();return}let d=u.byteLength;if(n){let g=o+=d;n(g)}s.enqueue(new Uint8Array(u))}catch(c){throw l(c),c}},cancel(s){return l(s),a.return()}},{highWaterMark:2})},Ll=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",s0=Ll&&typeof ReadableStream=="function",bM=Ll&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),c0=(e,...t)=>{try{return!!e(...t)}catch{return!1}},xM=s0&&c0(()=>{let e=!1;const t=new Request(Sn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),_m=64*1024,_c=s0&&c0(()=>re.isReadableStream(new Response("").body)),Zi={stream:_c&&(e=>e.body)};Ll&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Zi[t]&&(Zi[t]=re.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new gt(`Response type '${t}' is not supported`,gt.ERR_NOT_SUPPORT,r)})})})(new Response);const CM=async e=>{if(e==null)return 0;if(re.isBlob(e))return e.size;if(re.isSpecCompliantForm(e))return(await new Request(Sn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(re.isArrayBufferView(e)||re.isArrayBuffer(e))return e.byteLength;if(re.isURLSearchParams(e)&&(e=e+""),re.isString(e))return(await bM(e)).byteLength},wM=async(e,t)=>re.toFiniteNumber(e.getContentLength())??CM(t),SM=Ll&&(async e=>{let{url:t,method:n,data:r,signal:a,cancelToken:o,timeout:i,onDownloadProgress:l,onUploadProgress:s,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:g}=l0(e);c=c?(c+"").toLowerCase():"text";let h=gM([a,o&&o.toAbortSignal()],i),v;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let p;try{if(s&&xM&&n!=="get"&&n!=="head"&&(p=await wM(u,r))!==0){let C=new Request(t,{method:"POST",body:r,duplex:"half"}),S;if(re.isFormData(r)&&(S=C.headers.get("content-type"))&&u.setContentType(S),C.body){const[E,k]=Rm(p,Qi(Am(s)));r=jm(C.body,_m,E,k)}}re.isString(d)||(d=d?"include":"omit");const b="credentials"in Request.prototype;v=new Request(t,{...g,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:b?d:void 0});let y=await fetch(v,g);const x=_c&&(c==="stream"||c==="response");if(_c&&(l||x&&m)){const C={};["status","statusText","headers"].forEach($=>{C[$]=y[$]});const S=re.toFiniteNumber(y.headers.get("content-length")),[E,k]=l&&Rm(S,Qi(Am(l),!0))||[];y=new Response(jm(y.body,_m,E,()=>{k&&k(),m&&m()}),C)}c=c||"text";let w=await Zi[re.findKey(Zi,c)||"text"](y,e);return!x&&m&&m(),await new Promise((C,S)=>{o0(C,S,{data:w,headers:An.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:v})})}catch(b){throw m&&m(),b&&b.name==="TypeError"&&/Load failed|fetch/i.test(b.message)?Object.assign(new gt("Network Error",gt.ERR_NETWORK,e,v),{cause:b.cause||b}):gt.from(b,b&&b.code,e,v)}}),Bc={http:_D,xhr:pM,fetch:SM};re.forEach(Bc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Bm=e=>`- ${e}`,$M=e=>re.isFunction(e)||e===null||e===!1,u0={getAdapter:e=>{e=re.isArray(e)?e:[e];const{length:t}=e;let n,r;const a={};for(let o=0;o<t;o++){n=e[o];let i;if(r=n,!$M(n)&&(r=Bc[(i=String(n)).toLowerCase()],r===void 0))throw new gt(`Unknown adapter '${i}'`);if(r)break;a[i||"#"+o]=r}if(!r){const o=Object.entries(a).map(([l,s])=>`adapter ${l} `+(s===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since :
|
|
401
|
+
`+o.map(Bm).join(`
|
|
402
|
+
`):" "+Bm(o[0]):"as no adapter specified";throw new gt("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:Bc};function Ss(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ka(null,e)}function Lm(e){return Ss(e),e.headers=An.from(e.headers),e.data=ws.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),u0.getAdapter(e.adapter||qo.adapter)(e).then(function(t){return Ss(e),t.data=ws.call(e,e.transformResponse,t),t.headers=An.from(t.headers),t},function(t){return a0(t)||(Ss(e),t&&t.response&&(t.response.data=ws.call(e,e.transformResponse,t.response),t.response.headers=An.from(t.response.headers))),Promise.reject(t)})}const d0="1.11.0",zl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{zl[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const zm={};zl.transitional=function(e,t,n){function r(a,o){return"[Axios v"+d0+"] Transitional option '"+a+"'"+o+(n?". "+n:"")}return(a,o,i)=>{if(e===!1)throw new gt(r(o," has been removed"+(t?" in "+t:"")),gt.ERR_DEPRECATED);return t&&!zm[o]&&(zm[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(a,o,i):!0}};zl.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function EM(e,t,n){if(typeof e!="object")throw new gt("options must be an object",gt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const o=r[a],i=t[o];if(i){const l=e[o],s=l===void 0||i(l,o,e);if(s!==!0)throw new gt("option "+o+" must be "+s,gt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new gt("Unknown option "+o,gt.ERR_BAD_OPTION)}}const Ri={assertOptions:EM,validators:zl},lr=Ri.validators;class Qr{constructor(t){this.defaults=t||{},this.interceptors={request:new Fm,response:new Fm}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const o=a.stack?a.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
403
|
+
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ra(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:o}=n;r!==void 0&&Ri.assertOptions(r,{silentJSONParsing:lr.transitional(lr.boolean),forcedJSONParsing:lr.transitional(lr.boolean),clarifyTimeoutError:lr.transitional(lr.boolean)},!1),a!=null&&(re.isFunction(a)?n.paramsSerializer={serialize:a}:Ri.assertOptions(a,{encode:lr.function,serialize:lr.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ri.assertOptions(n,{baseUrl:lr.spelling("baseURL"),withXsrfToken:lr.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&re.merge(o.common,o[n.method]);o&&re.forEach(["delete","get","head","post","put","patch","common"],v=>{delete o[v]}),n.headers=An.concat(i,o);const l=[];let s=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(s=s&&v.synchronous,l.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let u,d=0,g;if(!s){const v=[Lm.bind(this),void 0];for(v.unshift(...l),v.push(...c),g=v.length,u=Promise.resolve(n);d<g;)u=u.then(v[d++],v[d++]);return u}g=l.length;let h=n;for(d=0;d<g;){const v=l[d++],m=l[d++];try{h=v(h)}catch(p){m.call(this,p);break}}try{u=Lm.call(this,h)}catch(v){return Promise.reject(v)}for(d=0,g=c.length;d<g;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=ra(this.defaults,t);const n=i0(t.baseURL,t.url,t.allowAbsoluteUrls);return t0(n,t.params,t.paramsSerializer)}}re.forEach(["delete","get","head","options"],function(e){Qr.prototype[e]=function(t,n){return this.request(ra(n||{},{method:e,url:t,data:(n||{}).data}))}});re.forEach(["post","put","patch"],function(e){function t(n){return function(r,a,o){return this.request(ra(o||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:a}))}}Qr.prototype[e]=t(),Qr.prototype[e+"Form"]=t(!0)});class ad{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(a=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](a);r._listeners=null}),this.promise.then=a=>{let o;const i=new Promise(l=>{r.subscribe(l),o=l}).then(a);return i.cancel=function(){r.unsubscribe(o)},i},t(function(a,o,i){r.reason||(r.reason=new Ka(a,o,i),n(r.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 n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ad(function(n){t=n}),cancel:t}}}function kM(e){return function(t){return e.apply(null,t)}}function IM(e){return re.isObject(e)&&e.isAxiosError===!0}const Lc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Lc).forEach(([e,t])=>{Lc[t]=e});function f0(e){const t=new Qr(e),n=Vh(Qr.prototype.request,t);return re.extend(n,Qr.prototype,t,{allOwnKeys:!0}),re.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return f0(ra(e,r))},n}const tn=f0(qo);tn.Axios=Qr;tn.CanceledError=Ka;tn.CancelToken=ad;tn.isCancel=a0;tn.VERSION=d0;tn.toFormData=Bl;tn.AxiosError=gt;tn.Cancel=tn.CanceledError;tn.all=function(e){return Promise.all(e)};tn.spread=kM;tn.isAxiosError=IM;tn.mergeConfig=ra;tn.AxiosHeaders=An;tn.formToJSON=e=>r0(re.isHTMLForm(e)?new FormData(e):e);tn.getAdapter=u0.getAdapter;tn.HttpStatusCode=Lc;tn.default=tn;const{TextArea:q5}=Zr,{useForm:U5}=Jt,m0=document.createElement("style");m0.textContent=`
|
|
404
404
|
.animate-bounce-slow {
|
|
405
405
|
animation: bounce 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
406
406
|
}
|
|
@@ -408,66 +408,66 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
408
408
|
0%, 100% { transform: translateY(0); }
|
|
409
409
|
50% { transform: translateY(-12px); }
|
|
410
410
|
}
|
|
411
|
-
`;document.head.appendChild(f0);function Lc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return be.Children.forEach(e,function(r){r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(Lc(r)):oh(r)&&r.props?n=n.concat(Lc(r.props.children,t)):n.push(r))}),n}var Ur="RC_FORM_INTERNAL_HOOKS",Mt=function(){zn(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Ma=f.createContext({getFieldValue:Mt,getFieldsValue:Mt,getFieldError:Mt,getFieldWarning:Mt,getFieldsError:Mt,isFieldsTouched:Mt,isFieldTouched:Mt,isFieldValidating:Mt,isFieldsValidating:Mt,resetFields:Mt,setFields:Mt,setFieldValue:Mt,setFieldsValue:Mt,validateFields:Mt,submit:Mt,getInternalHooks:function(){return Mt(),{dispatch:Mt,initEntityValue:Mt,registerField:Mt,useSubscribe:Mt,setInitialValues:Mt,destroyForm:Mt,setCallbacks:Mt,registerWatch:Mt,getFields:Mt,setValidateMessages:Mt,setPreserve:Mt,getInitialValue:Mt}}}),Zi=f.createContext(null);function zc(e){return e==null?[]:Array.isArray(e)?e:[e]}function kM(e){return e&&!!e._init}function Hc(){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",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 e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Vc=Hc();function IM(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function OM(e,t,n){if(Hu())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var a=new(e.bind.apply(e,r));return n&&Co(a,n.prototype),a}function Kc(e){var t=typeof Map=="function"?new Map:void 0;return Kc=function(n){if(n===null||!IM(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,r)}function r(){return OM(n,arguments,wo(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Co(r,n)},Kc(e)}var NM=/%[sdj%]/g,DM=function(){};function Wc(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function Ln(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=0,o=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var i=e.replace(NM,function(s){if(s==="%%")return"%";if(a>=o)return s;switch(s){case"%s":return String(n[a++]);case"%d":return Number(n[a++]);case"%j":try{return JSON.stringify(n[a++])}catch{return"[Circular]"}break;default:return s}});return i}return e}function MM(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function on(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||MM(t)&&typeof e=="string"&&!e)}function FM(e,t,n){var r=[],a=0,o=e.length;function i(s){r.push.apply(r,at(s||[])),a++,a===o&&n(r)}e.forEach(function(s){t(s,i)})}function zm(e,t,n){var r=0,a=e.length;function o(i){if(i&&i.length){n(i);return}var s=r;r=r+1,s<a?t(e[s],o):n([])}o([])}function PM(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,at(e[n]||[]))}),t}var Hm=(function(e){Ta(n,e);var t=_a(n);function n(r,a){var o;return On(this,n),o=t.call(this,"Async Validation Error"),te(xt(o),"errors",void 0),te(xt(o),"fields",void 0),o.errors=r,o.fields=a,o}return Nn(n)})(Kc(Error));function jM(e,t,n,r,a){if(t.first){var o=new Promise(function(g,h){var v=function(p){return r(p),p.length?h(new Hm(p,Wc(p))):g(a)},m=PM(e);zm(m,n,v)});return o.catch(function(g){return g}),o}var i=t.firstFields===!0?Object.keys(e):t.firstFields||[],s=Object.keys(e),l=s.length,c=0,u=[],d=new Promise(function(g,h){var v=function(m){if(u.push.apply(u,m),c++,c===l)return r(u),u.length?h(new Hm(u,Wc(u))):g(a)};s.length||(r(u),g(a)),s.forEach(function(m){var p=e[m];i.indexOf(m)!==-1?zm(p,n,v):FM(p,n,v)})});return d.catch(function(g){return g}),d}function RM(e){return!!(e&&e.message!==void 0)}function AM(e,t){for(var n=e,r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]]}return n}function Vm(e,t){return function(n){var r;return e.fullFields?r=AM(t,e.fullFields):r=t[n.field||e.fullField],RM(n)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||e.fullField}}}function Km(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];mt(r)==="object"&&mt(e[n])==="object"?e[n]=ve(ve({},e[n]),r):e[n]=r}}return e}var ha="enum",TM=function(e,t,n,r,a){e[ha]=Array.isArray(e[ha])?e[ha]:[],e[ha].indexOf(t)===-1&&r.push(Ln(a.messages[ha],e.fullField,e[ha].join(", ")))},_M=function(e,t,n,r,a){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(Ln(a.messages.pattern.mismatch,e.fullField,t,e.pattern));else if(typeof e.pattern=="string"){var o=new RegExp(e.pattern);o.test(t)||r.push(Ln(a.messages.pattern.mismatch,e.fullField,t,e.pattern))}}},BM=function(e,t,n,r,a){var o=typeof e.len=="number",i=typeof e.min=="number",s=typeof e.max=="number",l=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=t,u=null,d=typeof t=="number",g=typeof t=="string",h=Array.isArray(t);if(d?u="number":g?u="string":h&&(u="array"),!u)return!1;h&&(c=t.length),g&&(c=t.replace(l,"_").length),o?c!==e.len&&r.push(Ln(a.messages[u].len,e.fullField,e.len)):i&&!s&&c<e.min?r.push(Ln(a.messages[u].min,e.fullField,e.min)):s&&!i&&c>e.max?r.push(Ln(a.messages[u].max,e.fullField,e.max)):i&&s&&(c<e.min||c>e.max)&&r.push(Ln(a.messages[u].range,e.fullField,e.min,e.max))},m0=function(e,t,n,r,a,o){e.required&&(!n.hasOwnProperty(e.field)||on(t,o||e.type))&&r.push(Ln(a.messages.required,e.fullField))},fi;const LM=(function(){if(fi)return fi;var e="[a-fA-F\\d:]",t=function(C){return C&&C.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},n="(?: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}",r="[a-fA-F\\d]{1,4}",a=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],o="(?:%[0-9a-zA-Z]{1,})?",i="(?:".concat(a.join("|"),")").concat(o),s=new RegExp("(?:^".concat(n,"$)|(?:^").concat(i,"$)")),l=new RegExp("^".concat(n,"$")),c=new RegExp("^".concat(i,"$")),u=function(C){return C&&C.exact?s:new RegExp("(?:".concat(t(C)).concat(n).concat(t(C),")|(?:").concat(t(C)).concat(i).concat(t(C),")"),"g")};u.v4=function(C){return C&&C.exact?l:new RegExp("".concat(t(C)).concat(n).concat(t(C)),"g")},u.v6=function(C){return C&&C.exact?c:new RegExp("".concat(t(C)).concat(i).concat(t(C)),"g")};var d="(?:(?:[a-z]+:)?//)",g="(?:\\S+(?::\\S*)?@)?",h=u.v4().source,v=u.v6().source,m="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",p="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",b="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",x='(?:[/?#][^\\s"]*)?',w="(?:".concat(d,"|www\\.)").concat(g,"(?:localhost|").concat(h,"|").concat(v,"|").concat(m).concat(p).concat(b,")").concat(y).concat(x);return fi=new RegExp("(?:^".concat(w,"$)"),"i"),fi});var Wm={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,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},lo={integer:function(e){return lo.number(e)&&parseInt(e,10)===e},float:function(e){return lo.number(e)&&!lo.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return mt(e)==="object"&&!lo.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(Wm.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(LM())},hex:function(e){return typeof e=="string"&&!!e.match(Wm.hex)}},zM=function(e,t,n,r,a){if(e.required&&t===void 0){m0(e,t,n,r,a);return}var o=["integer","float","array","regexp","object","method","email","number","date","url","hex"],i=e.type;o.indexOf(i)>-1?lo[i](t)||r.push(Ln(a.messages.types[i],e.fullField,e.type)):i&&mt(t)!==e.type&&r.push(Ln(a.messages.types[i],e.fullField,e.type))},HM=function(e,t,n,r,a){(/^\s+$/.test(t)||t==="")&&r.push(Ln(a.messages.whitespace,e.fullField))};const $t={required:m0,whitespace:HM,type:zM,range:BM,enum:TM,pattern:_M};var VM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(on(t)&&!e.required)return n();$t.required(e,t,r,o,a)}n(o)},KM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(t==null&&!e.required)return n();$t.required(e,t,r,o,a,"array"),t!=null&&($t.type(e,t,r,o,a),$t.range(e,t,r,o,a))}n(o)},WM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(on(t)&&!e.required)return n();$t.required(e,t,r,o,a),t!==void 0&&$t.type(e,t,r,o,a)}n(o)},qM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(on(t,"date")&&!e.required)return n();if($t.required(e,t,r,o,a),!on(t,"date")){var s;t instanceof Date?s=t:s=new Date(t),$t.type(e,s,r,o,a),s&&$t.range(e,s.getTime(),r,o,a)}}n(o)},UM="enum",YM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(on(t)&&!e.required)return n();$t.required(e,t,r,o,a),t!==void 0&&$t[UM](e,t,r,o,a)}n(o)},GM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(on(t)&&!e.required)return n();$t.required(e,t,r,o,a),t!==void 0&&($t.type(e,t,r,o,a),$t.range(e,t,r,o,a))}n(o)},XM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(on(t)&&!e.required)return n();$t.required(e,t,r,o,a),t!==void 0&&($t.type(e,t,r,o,a),$t.range(e,t,r,o,a))}n(o)},JM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(on(t)&&!e.required)return n();$t.required(e,t,r,o,a),t!==void 0&&$t.type(e,t,r,o,a)}n(o)},QM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(t===""&&(t=void 0),on(t)&&!e.required)return n();$t.required(e,t,r,o,a),t!==void 0&&($t.type(e,t,r,o,a),$t.range(e,t,r,o,a))}n(o)},ZM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(on(t)&&!e.required)return n();$t.required(e,t,r,o,a),t!==void 0&&$t.type(e,t,r,o,a)}n(o)},eF=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(on(t,"string")&&!e.required)return n();$t.required(e,t,r,o,a),on(t,"string")||$t.pattern(e,t,r,o,a)}n(o)},tF=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(on(t)&&!e.required)return n();$t.required(e,t,r,o,a),on(t)||$t.type(e,t,r,o,a)}n(o)},nF=function(e,t,n,r,a){var o=[],i=Array.isArray(t)?"array":mt(t);$t.required(e,t,r,o,a,i),n(o)},rF=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(on(t,"string")&&!e.required)return n();$t.required(e,t,r,o,a,"string"),on(t,"string")||($t.type(e,t,r,o,a),$t.range(e,t,r,o,a),$t.pattern(e,t,r,o,a),e.whitespace===!0&&$t.whitespace(e,t,r,o,a))}n(o)},Sl=function(e,t,n,r,a){var o=e.type,i=[],s=e.required||!e.required&&r.hasOwnProperty(e.field);if(s){if(on(t,o)&&!e.required)return n();$t.required(e,t,r,i,a,o),on(t,o)||$t.type(e,t,r,i,a)}n(i)};const go={string:rF,method:JM,number:QM,boolean:WM,regexp:tF,integer:XM,float:GM,array:KM,object:ZM,enum:YM,pattern:eF,date:qM,url:Sl,hex:Sl,email:Sl,required:nF,any:VM};var qo=(function(){function e(t){On(this,e),te(this,"rules",null),te(this,"_messages",Vc),this.define(t)}return Nn(e,[{key:"define",value:function(t){var n=this;if(!t)throw new Error("Cannot configure a schema with no rules");if(mt(t)!=="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={},Object.keys(t).forEach(function(r){var a=t[r];n.rules[r]=Array.isArray(a)?a:[a]})}},{key:"messages",value:function(t){return t&&(this._messages=Km(Hc(),t)),this._messages}},{key:"validate",value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},o=t,i=r,s=a;if(typeof i=="function"&&(s=i,i={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(null,o),Promise.resolve(o);function l(g){var h=[],v={};function m(b){if(Array.isArray(b)){var y;h=(y=h).concat.apply(y,at(b))}else h.push(b)}for(var p=0;p<g.length;p++)m(g[p]);h.length?(v=Wc(h),s(h,v)):s(null,o)}if(i.messages){var c=this.messages();c===Vc&&(c=Hc()),Km(c,i.messages),i.messages=c}else i.messages=this.messages();var u={},d=i.keys||Object.keys(this.rules);return d.forEach(function(g){var h=n.rules[g],v=o[g];h.forEach(function(m){var p=m;typeof p.transform=="function"&&(o===t&&(o=ve({},o)),v=o[g]=p.transform(v),v!=null&&(p.type=p.type||(Array.isArray(v)?"array":mt(v)))),typeof p=="function"?p={validator:p}:p=ve({},p),p.validator=n.getValidationMethod(p),p.validator&&(p.field=g,p.fullField=p.fullField||g,p.type=n.getType(p),u[g]=u[g]||[],u[g].push({rule:p,value:v,source:o,field:g}))})}),jM(u,i,function(g,h){var v=g.rule,m=(v.type==="object"||v.type==="array")&&(mt(v.fields)==="object"||mt(v.defaultField)==="object");m=m&&(v.required||!v.required&&g.value),v.field=g.field;function p(C,S){return ve(ve({},S),{},{fullField:"".concat(v.fullField,".").concat(C),fullFields:v.fullFields?[].concat(at(v.fullFields),[C]):[C]})}function b(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],S=Array.isArray(C)?C:[C];!i.suppressWarning&&S.length&&e.warning("async-validator:",S),S.length&&v.message!==void 0&&(S=[].concat(v.message));var E=S.map(Vm(v,o));if(i.first&&E.length)return h(E);if(!m)h(E);else{if(v.required&&!g.value)return v.message!==void 0?E=[].concat(v.message).map(Vm(v,o)):i.error&&(E=[i.error(v,Ln(i.messages.required,v.field))]),h(E);var k={};v.defaultField&&Object.keys(g.value).map(function(D){k[D]=v.defaultField}),k=ve(ve({},k),g.rule.fields);var $={};Object.keys(k).forEach(function(D){var P=k[D],R=Array.isArray(P)?P:[P];$[D]=R.map(p.bind(null,D))});var O=new e($);O.messages(i.messages),g.rule.options&&(g.rule.options.messages=i.messages,g.rule.options.error=i.error),O.validate(g.value,g.rule.options||i,function(D){var P=[];E&&E.length&&P.push.apply(P,at(E)),D&&D.length&&P.push.apply(P,at(D)),h(P.length?P:null)})}}var y;if(v.asyncValidator)y=v.asyncValidator(v,g.value,b,g.source,i);else if(v.validator){try{y=v.validator(v,g.value,b,g.source,i)}catch(C){var x,w;(x=(w=console).error)===null||x===void 0||x.call(w,C),i.suppressValidatorError||setTimeout(function(){throw C},0),b(C.message)}y===!0?b():y===!1?b(typeof v.message=="function"?v.message(v.fullField||v.field):v.message||"".concat(v.fullField||v.field," fails")):y instanceof Array?b(y):y instanceof Error&&b(y.message)}y&&y.then&&y.then(function(){return b()},function(C){return b(C)})},function(g){l(g)},o)}},{key:"getType",value:function(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!go.hasOwnProperty(t.type))throw new Error(Ln("Unknown rule type %s",t.type));return t.type||"string"}},{key:"getValidationMethod",value:function(t){if(typeof t.validator=="function")return t.validator;var n=Object.keys(t),r=n.indexOf("message");return r!==-1&&n.splice(r,1),n.length===1&&n[0]==="required"?go.required:go[this.getType(t)]||void 0}}]),e})();te(qo,"register",function(e,t){if(typeof t!="function")throw new Error("Cannot register a validator by type, validator is not a function");go[e]=t});te(qo,"warning",DM);te(qo,"messages",Vc);te(qo,"validators",go);var Bn="'${name}' is not a valid ${type}",p0={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:Bn,method:Bn,array:Bn,object:Bn,number:Bn,date:Bn,boolean:Bn,integer:Bn,float:Bn,regexp:Bn,email:Bn,url:Bn,hex:Bn},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}"}},qm=qo;function aF(e,t){return e.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var r=n.slice(2,-1);return t[r]})}var Um="CODE_LOGIC_ERROR";function qc(e,t,n,r,a){return Uc.apply(this,arguments)}function Uc(){return Uc=fa(En().mark(function e(t,n,r,a,o){var i,s,l,c,u,d,g,h,v;return En().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return i=ve({},r),delete i.ruleIndex,qm.warning=function(){},i.validator&&(s=i.validator,i.validator=function(){try{return s.apply(void 0,arguments)}catch(p){return console.error(p),Promise.reject(Um)}}),l=null,i&&i.type==="array"&&i.defaultField&&(l=i.defaultField,delete i.defaultField),c=new qm(te({},t,[i])),u=xa(p0,a.validateMessages),c.messages(u),d=[],m.prev=10,m.next=13,Promise.resolve(c.validate(te({},t,n),ve({},a)));case 13:m.next=18;break;case 15:m.prev=15,m.t0=m.catch(10),m.t0.errors&&(d=m.t0.errors.map(function(p,b){var y=p.message,x=y===Um?u.default:y;return f.isValidElement(x)?f.cloneElement(x,{key:"error_".concat(b)}):x}));case 18:if(!(!d.length&&l)){m.next=23;break}return m.next=21,Promise.all(n.map(function(p,b){return qc("".concat(t,".").concat(b),p,l,a,o)}));case 21:return g=m.sent,m.abrupt("return",g.reduce(function(p,b){return[].concat(at(p),at(b))},[]));case 23:return h=ve(ve({},r),{},{name:t,enum:(r.enum||[]).join(", ")},o),v=d.map(function(p){return typeof p=="string"?aF(p,h):p}),m.abrupt("return",v);case 26:case"end":return m.stop()}},e,null,[[10,15]])})),Uc.apply(this,arguments)}function oF(e,t,n,r,a,o){var i=e.join("."),s=n.map(function(u,d){var g=u.validator,h=ve(ve({},u),{},{ruleIndex:d});return g&&(h.validator=function(v,m,p){var b=!1,y=function(){for(var w=arguments.length,C=new Array(w),S=0;S<w;S++)C[S]=arguments[S];Promise.resolve().then(function(){zn(!b,"Your validator function has already return a promise. `callback` will be ignored."),b||p.apply(void 0,C)})},x=g(v,m,y);b=x&&typeof x.then=="function"&&typeof x.catch=="function",zn(b,"`callback` is deprecated. Please return a promise instead."),b&&x.then(function(){p()}).catch(function(w){p(w||" ")})}),h}).sort(function(u,d){var g=u.warningOnly,h=u.ruleIndex,v=d.warningOnly,m=d.ruleIndex;return!!g==!!v?h-m:g?1:-1}),l;if(a===!0)l=new Promise((function(){var u=fa(En().mark(function d(g,h){var v,m,p;return En().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:v=0;case 1:if(!(v<s.length)){b.next=12;break}return m=s[v],b.next=5,qc(i,t,m,r,o);case 5:if(p=b.sent,!p.length){b.next=9;break}return h([{errors:p,rule:m}]),b.abrupt("return");case 9:v+=1,b.next=1;break;case 12:g([]);case 13:case"end":return b.stop()}},d)}));return function(d,g){return u.apply(this,arguments)}})());else{var c=s.map(function(u){return qc(i,t,u,r,o).then(function(d){return{errors:d,rule:u}})});l=(a?sF(c):iF(c)).then(function(u){return Promise.reject(u)})}return l.catch(function(u){return u}),l}function iF(e){return Yc.apply(this,arguments)}function Yc(){return Yc=fa(En().mark(function e(t){return En().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.all(t).then(function(r){var a,o=(a=[]).concat.apply(a,at(r));return o}));case 1:case"end":return n.stop()}},e)})),Yc.apply(this,arguments)}function sF(e){return Gc.apply(this,arguments)}function Gc(){return Gc=fa(En().mark(function e(t){var n;return En().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n=0,r.abrupt("return",new Promise(function(a){t.forEach(function(o){o.then(function(i){i.errors.length&&a([i]),n+=1,n===t.length&&a([])})})}));case 2:case"end":return r.stop()}},e)})),Gc.apply(this,arguments)}function Gt(e){return zc(e)}function Ym(e,t){var n={};return t.forEach(function(r){var a=dr(e,r);n=Jn(n,r,a)}),n}function ka(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return e&&e.some(function(r){return g0(t,r,n)})}function g0(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e||!t||!n&&e.length!==t.length?!1:t.every(function(r,a){return e[a]===r})}function lF(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||mt(e)!=="object"||mt(t)!=="object")return!1;var n=Object.keys(e),r=Object.keys(t),a=new Set([].concat(n,r));return at(a).every(function(o){var i=e[o],s=t[o];return typeof i=="function"&&typeof s=="function"?!0:i===s})}function cF(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&mt(t.target)==="object"&&e in t.target?t.target[e]:t}function Gm(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var a=e[t],o=t-n;return o>0?[].concat(at(e.slice(0,n)),[a],at(e.slice(n,t)),at(e.slice(t+1,r))):o<0?[].concat(at(e.slice(0,t)),at(e.slice(t+1,n+1)),[a],at(e.slice(n+1,r))):e}var uF=["name"],qn=[];function $l(e,t,n,r,a,o){return typeof e=="function"?e(t,n,"source"in o?{source:o.source}:{}):r!==a}var ad=(function(e){Ta(n,e);var t=_a(n);function n(r){var a;if(On(this,n),a=t.call(this,r),te(xt(a),"state",{resetCount:0}),te(xt(a),"cancelRegisterFunc",null),te(xt(a),"mounted",!1),te(xt(a),"touched",!1),te(xt(a),"dirty",!1),te(xt(a),"validatePromise",void 0),te(xt(a),"prevValidating",void 0),te(xt(a),"errors",qn),te(xt(a),"warnings",qn),te(xt(a),"cancelRegister",function(){var l=a.props,c=l.preserve,u=l.isListField,d=l.name;a.cancelRegisterFunc&&a.cancelRegisterFunc(u,c,Gt(d)),a.cancelRegisterFunc=null}),te(xt(a),"getNamePath",function(){var l=a.props,c=l.name,u=l.fieldContext,d=u.prefixName,g=d===void 0?[]:d;return c!==void 0?[].concat(at(g),at(c)):[]}),te(xt(a),"getRules",function(){var l=a.props,c=l.rules,u=c===void 0?[]:c,d=l.fieldContext;return u.map(function(g){return typeof g=="function"?g(d):g})}),te(xt(a),"refresh",function(){a.mounted&&a.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),te(xt(a),"metaCache",null),te(xt(a),"triggerMetaEvent",function(l){var c=a.props.onMetaChange;if(c){var u=ve(ve({},a.getMeta()),{},{destroy:l});nc(a.metaCache,u)||c(u),a.metaCache=u}else a.metaCache=null}),te(xt(a),"onStoreChange",function(l,c,u){var d=a.props,g=d.shouldUpdate,h=d.dependencies,v=h===void 0?[]:h,m=d.onReset,p=u.store,b=a.getNamePath(),y=a.getValue(l),x=a.getValue(p),w=c&&ka(c,b);switch(u.type==="valueUpdate"&&u.source==="external"&&!nc(y,x)&&(a.touched=!0,a.dirty=!0,a.validatePromise=null,a.errors=qn,a.warnings=qn,a.triggerMetaEvent()),u.type){case"reset":if(!c||w){a.touched=!1,a.dirty=!1,a.validatePromise=void 0,a.errors=qn,a.warnings=qn,a.triggerMetaEvent(),m==null||m(),a.refresh();return}break;case"remove":{if(g&&$l(g,l,p,y,x,u)){a.reRender();return}break}case"setField":{var C=u.data;if(w){"touched"in C&&(a.touched=C.touched),"validating"in C&&!("originRCField"in C)&&(a.validatePromise=C.validating?Promise.resolve([]):null),"errors"in C&&(a.errors=C.errors||qn),"warnings"in C&&(a.warnings=C.warnings||qn),a.dirty=!0,a.triggerMetaEvent(),a.reRender();return}else if("value"in C&&ka(c,b,!0)){a.reRender();return}if(g&&!b.length&&$l(g,l,p,y,x,u)){a.reRender();return}break}case"dependenciesUpdate":{var S=v.map(Gt);if(S.some(function(E){return ka(u.relatedFields,E)})){a.reRender();return}break}default:if(w||(!v.length||b.length||g)&&$l(g,l,p,y,x,u)){a.reRender();return}break}g===!0&&a.reRender()}),te(xt(a),"validateRules",function(l){var c=a.getNamePath(),u=a.getValue(),d=l||{},g=d.triggerName,h=d.validateOnly,v=h===void 0?!1:h,m=Promise.resolve().then(fa(En().mark(function p(){var b,y,x,w,C,S,E;return En().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:if(a.mounted){k.next=2;break}return k.abrupt("return",[]);case 2:if(b=a.props,y=b.validateFirst,x=y===void 0?!1:y,w=b.messageVariables,C=b.validateDebounce,S=a.getRules(),g&&(S=S.filter(function($){return $}).filter(function($){var O=$.validateTrigger;if(!O)return!0;var D=zc(O);return D.includes(g)})),!(C&&g)){k.next=10;break}return k.next=8,new Promise(function($){setTimeout($,C)});case 8:if(a.validatePromise===m){k.next=10;break}return k.abrupt("return",[]);case 10:return E=oF(c,u,S,l,x,w),E.catch(function($){return $}).then(function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qn;if(a.validatePromise===m){var O;a.validatePromise=null;var D=[],P=[];(O=$.forEach)===null||O===void 0||O.call($,function(R){var N=R.rule.warningOnly,I=R.errors,M=I===void 0?qn:I;N?P.push.apply(P,at(M)):D.push.apply(D,at(M))}),a.errors=D,a.warnings=P,a.triggerMetaEvent(),a.reRender()}}),k.abrupt("return",E);case 13:case"end":return k.stop()}},p)})));return v||(a.validatePromise=m,a.dirty=!0,a.errors=qn,a.warnings=qn,a.triggerMetaEvent(),a.reRender()),m}),te(xt(a),"isFieldValidating",function(){return!!a.validatePromise}),te(xt(a),"isFieldTouched",function(){return a.touched}),te(xt(a),"isFieldDirty",function(){if(a.dirty||a.props.initialValue!==void 0)return!0;var l=a.props.fieldContext,c=l.getInternalHooks(Ur),u=c.getInitialValue;return u(a.getNamePath())!==void 0}),te(xt(a),"getErrors",function(){return a.errors}),te(xt(a),"getWarnings",function(){return a.warnings}),te(xt(a),"isListField",function(){return a.props.isListField}),te(xt(a),"isList",function(){return a.props.isList}),te(xt(a),"isPreserve",function(){return a.props.preserve}),te(xt(a),"getMeta",function(){a.prevValidating=a.isFieldValidating();var l={touched:a.isFieldTouched(),validating:a.prevValidating,errors:a.errors,warnings:a.warnings,name:a.getNamePath(),validated:a.validatePromise===null};return l}),te(xt(a),"getOnlyChild",function(l){if(typeof l=="function"){var c=a.getMeta();return ve(ve({},a.getOnlyChild(l(a.getControlled(),c,a.props.fieldContext))),{},{isFunction:!0})}var u=Lc(l);return u.length!==1||!f.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),te(xt(a),"getValue",function(l){var c=a.props.fieldContext.getFieldsValue,u=a.getNamePath();return dr(l||c(!0),u)}),te(xt(a),"getControlled",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=a.props,u=c.name,d=c.trigger,g=c.validateTrigger,h=c.getValueFromEvent,v=c.normalize,m=c.valuePropName,p=c.getValueProps,b=c.fieldContext,y=g!==void 0?g:b.validateTrigger,x=a.getNamePath(),w=b.getInternalHooks,C=b.getFieldsValue,S=w(Ur),E=S.dispatch,k=a.getValue(),$=p||function(N){return te({},m,N)},O=l[d],D=u!==void 0?$(k):{},P=ve(ve({},l),D);P[d]=function(){a.touched=!0,a.dirty=!0,a.triggerMetaEvent();for(var N,I=arguments.length,M=new Array(I),F=0;F<I;F++)M[F]=arguments[F];h?N=h.apply(void 0,M):N=cF.apply(void 0,[m].concat(M)),v&&(N=v(N,k,C(!0))),N!==k&&E({type:"updateValue",namePath:x,value:N}),O&&O.apply(void 0,M)};var R=zc(y||[]);return R.forEach(function(N){var I=P[N];P[N]=function(){I&&I.apply(void 0,arguments);var M=a.props.rules;M&&M.length&&E({type:"validateField",namePath:x,triggerName:N})}}),P}),r.fieldContext){var o=r.fieldContext.getInternalHooks,i=o(Ur),s=i.initEntityValue;s(xt(a))}return a}return Nn(n,[{key:"componentDidMount",value:function(){var r=this.props,a=r.shouldUpdate,o=r.fieldContext;if(this.mounted=!0,o){var i=o.getInternalHooks,s=i(Ur),l=s.registerField;this.cancelRegisterFunc=l(this)}a===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var r=this.state.resetCount,a=this.props.children,o=this.getOnlyChild(a),i=o.child,s=o.isFunction,l;return s?l=i:f.isValidElement(i)?l=f.cloneElement(i,this.getControlled(i.props)):(zn(!i,"`children` of Field is not validate ReactElement."),l=i),f.createElement(f.Fragment,{key:r},l)}}]),n})(f.Component);te(ad,"contextType",Ma);te(ad,"defaultProps",{trigger:"onChange",valuePropName:"value"});function v0(e){var t,n=e.name,r=pr(e,uF),a=f.useContext(Ma),o=f.useContext(Zi),i=n!==void 0?Gt(n):void 0,s=(t=r.isListField)!==null&&t!==void 0?t:!!o,l="keep";return s||(l="_".concat((i||[]).join("_"))),f.createElement(ad,vn({key:l,name:i,isListField:s},r,{fieldContext:a}))}function dF(e){var t=e.name,n=e.initialValue,r=e.children,a=e.rules,o=e.validateTrigger,i=e.isListField,s=f.useContext(Ma),l=f.useContext(Zi),c=f.useRef({keys:[],id:0}),u=c.current,d=f.useMemo(function(){var m=Gt(s.prefixName)||[];return[].concat(at(m),at(Gt(t)))},[s.prefixName,t]),g=f.useMemo(function(){return ve(ve({},s),{},{prefixName:d})},[s,d]),h=f.useMemo(function(){return{getKey:function(m){var p=d.length,b=m[p];return[u.keys[b],m.slice(p+1)]}}},[d]);if(typeof r!="function")return zn(!1,"Form.List only accepts function as children."),null;var v=function(m,p,b){var y=b.source;return y==="internal"?!1:m!==p};return f.createElement(Zi.Provider,{value:h},f.createElement(Ma.Provider,{value:g},f.createElement(v0,{name:[],shouldUpdate:v,rules:a,validateTrigger:o,initialValue:n,isList:!0,isListField:i??!!l},function(m,p){var b=m.value,y=b===void 0?[]:b,x=m.onChange,w=s.getFieldValue,C=function(){var k=w(d||[]);return k||[]},S={add:function(k,$){var O=C();$>=0&&$<=O.length?(u.keys=[].concat(at(u.keys.slice(0,$)),[u.id],at(u.keys.slice($))),x([].concat(at(O.slice(0,$)),[k],at(O.slice($))))):(u.keys=[].concat(at(u.keys),[u.id]),x([].concat(at(O),[k]))),u.id+=1},remove:function(k){var $=C(),O=new Set(Array.isArray(k)?k:[k]);O.size<=0||(u.keys=u.keys.filter(function(D,P){return!O.has(P)}),x($.filter(function(D,P){return!O.has(P)})))},move:function(k,$){if(k!==$){var O=C();k<0||k>=O.length||$<0||$>=O.length||(u.keys=Gm(u.keys,k,$),x(Gm(O,k,$)))}}},E=y||[];return Array.isArray(E)||(E=[]),r(E.map(function(k,$){var O=u.keys[$];return O===void 0&&(u.keys[$]=u.id,O=u.keys[$],u.id+=1),{name:$,key:O,isListField:!0}}),S,p)})))}function fF(e){var t=!1,n=e.length,r=[];return e.length?new Promise(function(a,o){e.forEach(function(i,s){i.catch(function(l){return t=!0,l}).then(function(l){n-=1,r[s]=l,!(n>0)&&(t&&o(r),a(r))})})}):Promise.resolve([])}var h0="__@field_split__";function El(e){return e.map(function(t){return"".concat(mt(t),":").concat(t)}).join(h0)}var ya=(function(){function e(){On(this,e),te(this,"kvs",new Map)}return Nn(e,[{key:"set",value:function(t,n){this.kvs.set(El(t),n)}},{key:"get",value:function(t){return this.kvs.get(El(t))}},{key:"update",value:function(t,n){var r=this.get(t),a=n(r);a?this.set(t,a):this.delete(t)}},{key:"delete",value:function(t){this.kvs.delete(El(t))}},{key:"map",value:function(t){return at(this.kvs.entries()).map(function(n){var r=ot(n,2),a=r[0],o=r[1],i=a.split(h0);return t({key:i.map(function(s){var l=s.match(/^([^:]*):(.*)$/),c=ot(l,3),u=c[1],d=c[2];return u==="number"?Number(d):d}),value:o})})}},{key:"toJSON",value:function(){var t={};return this.map(function(n){var r=n.key,a=n.value;return t[r.join(".")]=a,null}),t}}]),e})(),mF=["name"],pF=Nn(function e(t){var n=this;On(this,e),te(this,"formHooked",!1),te(this,"forceRootUpdate",void 0),te(this,"subscribable",!0),te(this,"store",{}),te(this,"fieldEntities",[]),te(this,"initialValues",{}),te(this,"callbacks",{}),te(this,"validateMessages",null),te(this,"preserve",null),te(this,"lastValidatePromise",null),te(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),te(this,"getInternalHooks",function(r){return r===Ur?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(zn(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),te(this,"useSubscribe",function(r){n.subscribable=r}),te(this,"prevWithoutPreserves",null),te(this,"setInitialValues",function(r,a){if(n.initialValues=r||{},a){var o,i=xa(r,n.store);(o=n.prevWithoutPreserves)===null||o===void 0||o.map(function(s){var l=s.key;i=Jn(i,l,dr(r,l))}),n.prevWithoutPreserves=null,n.updateStore(i)}}),te(this,"destroyForm",function(r){if(r)n.updateStore({});else{var a=new ya;n.getFieldEntities(!0).forEach(function(o){n.isMergedPreserve(o.isPreserve())||a.set(o.getNamePath(),!0)}),n.prevWithoutPreserves=a}}),te(this,"getInitialValue",function(r){var a=dr(n.initialValues,r);return r.length?xa(a):a}),te(this,"setCallbacks",function(r){n.callbacks=r}),te(this,"setValidateMessages",function(r){n.validateMessages=r}),te(this,"setPreserve",function(r){n.preserve=r}),te(this,"watchList",[]),te(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(a){return a!==r})}}),te(this,"notifyWatch",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var a=n.getFieldsValue(),o=n.getFieldsValue(!0);n.watchList.forEach(function(i){i(a,o,r)})}}),te(this,"timeoutId",null),te(this,"warningUnhooked",function(){}),te(this,"updateStore",function(r){n.store=r}),te(this,"getFieldEntities",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(a){return a.getNamePath().length}):n.fieldEntities}),te(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=new ya;return n.getFieldEntities(r).forEach(function(o){var i=o.getNamePath();a.set(i,o)}),a}),te(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var a=n.getFieldsMap(!0);return r.map(function(o){var i=Gt(o);return a.get(i)||{INVALIDATE_NAME_PATH:Gt(o)}})}),te(this,"getFieldsValue",function(r,a){n.warningUnhooked();var o,i,s;if(r===!0||Array.isArray(r)?(o=r,i=a):r&&mt(r)==="object"&&(s=r.strict,i=r.filter),o===!0&&!i)return n.store;var l=n.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),c=[];return l.forEach(function(u){var d,g,h="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(s){var v,m;if((v=(m=u).isList)!==null&&v!==void 0&&v.call(m))return}else if(!o&&(d=(g=u).isListField)!==null&&d!==void 0&&d.call(g))return;if(!i)c.push(h);else{var p="getMeta"in u?u.getMeta():null;i(p)&&c.push(h)}}),Ym(n.store,c.map(Gt))}),te(this,"getFieldValue",function(r){n.warningUnhooked();var a=Gt(r);return dr(n.store,a)}),te(this,"getFieldsError",function(r){n.warningUnhooked();var a=n.getFieldEntitiesForNamePathList(r);return a.map(function(o,i){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:Gt(r[i]),errors:[],warnings:[]}})}),te(this,"getFieldError",function(r){n.warningUnhooked();var a=Gt(r),o=n.getFieldsError([a])[0];return o.errors}),te(this,"getFieldWarning",function(r){n.warningUnhooked();var a=Gt(r),o=n.getFieldsError([a])[0];return o.warnings}),te(this,"isFieldsTouched",function(){n.warningUnhooked();for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];var i=a[0],s=a[1],l,c=!1;a.length===0?l=null:a.length===1?Array.isArray(i)?(l=i.map(Gt),c=!1):(l=null,c=i):(l=i.map(Gt),c=s);var u=n.getFieldEntities(!0),d=function(m){return m.isFieldTouched()};if(!l)return c?u.every(function(m){return d(m)||m.isList()}):u.some(d);var g=new ya;l.forEach(function(m){g.set(m,[])}),u.forEach(function(m){var p=m.getNamePath();l.forEach(function(b){b.every(function(y,x){return p[x]===y})&&g.update(b,function(y){return[].concat(at(y),[m])})})});var h=function(m){return m.some(d)},v=g.map(function(m){var p=m.value;return p});return c?v.every(h):v.some(h)}),te(this,"isFieldTouched",function(r){return n.warningUnhooked(),n.isFieldsTouched([r])}),te(this,"isFieldsValidating",function(r){n.warningUnhooked();var a=n.getFieldEntities();if(!r)return a.some(function(i){return i.isFieldValidating()});var o=r.map(Gt);return a.some(function(i){var s=i.getNamePath();return ka(o,s)&&i.isFieldValidating()})}),te(this,"isFieldValidating",function(r){return n.warningUnhooked(),n.isFieldsValidating([r])}),te(this,"resetWithFieldInitialValue",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=new ya,o=n.getFieldEntities(!0);o.forEach(function(l){var c=l.props.initialValue,u=l.getNamePath();if(c!==void 0){var d=a.get(u)||new Set;d.add({entity:l,value:c}),a.set(u,d)}});var i=function(l){l.forEach(function(c){var u=c.props.initialValue;if(u!==void 0){var d=c.getNamePath(),g=n.getInitialValue(d);if(g!==void 0)zn(!1,"Form already set 'initialValues' with path '".concat(d.join("."),"'. Field can not overwrite it."));else{var h=a.get(d);if(h&&h.size>1)zn(!1,"Multiple Field with path '".concat(d.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(h){var v=n.getFieldValue(d),m=c.isListField();!m&&(!r.skipExist||v===void 0)&&n.updateStore(Jn(n.store,d,at(h)[0].value))}}}})},s;r.entities?s=r.entities:r.namePathList?(s=[],r.namePathList.forEach(function(l){var c=a.get(l);if(c){var u;(u=s).push.apply(u,at(at(c).map(function(d){return d.entity})))}})):s=o,i(s)}),te(this,"resetFields",function(r){n.warningUnhooked();var a=n.store;if(!r){n.updateStore(xa(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(a,null,{type:"reset"}),n.notifyWatch();return}var o=r.map(Gt);o.forEach(function(i){var s=n.getInitialValue(i);n.updateStore(Jn(n.store,i,s))}),n.resetWithFieldInitialValue({namePathList:o}),n.notifyObservers(a,o,{type:"reset"}),n.notifyWatch(o)}),te(this,"setFields",function(r){n.warningUnhooked();var a=n.store,o=[];r.forEach(function(i){var s=i.name,l=pr(i,mF),c=Gt(s);o.push(c),"value"in l&&n.updateStore(Jn(n.store,c,l.value)),n.notifyObservers(a,[c],{type:"setField",data:i})}),n.notifyWatch(o)}),te(this,"getFields",function(){var r=n.getFieldEntities(!0),a=r.map(function(o){var i=o.getNamePath(),s=o.getMeta(),l=ve(ve({},s),{},{name:i,value:n.getFieldValue(i)});return Object.defineProperty(l,"originRCField",{value:!0}),l});return a}),te(this,"initEntityValue",function(r){var a=r.props.initialValue;if(a!==void 0){var o=r.getNamePath(),i=dr(n.store,o);i===void 0&&n.updateStore(Jn(n.store,o,a))}}),te(this,"isMergedPreserve",function(r){var a=r!==void 0?r:n.preserve;return a??!0}),te(this,"registerField",function(r){n.fieldEntities.push(r);var a=r.getNamePath();if(n.notifyWatch([a]),r.props.initialValue!==void 0){var o=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(o,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(i,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(d){return d!==r}),!n.isMergedPreserve(s)&&(!i||l.length>1)){var c=i?void 0:n.getInitialValue(a);if(a.length&&n.getFieldValue(a)!==c&&n.fieldEntities.every(function(d){return!g0(d.getNamePath(),a)})){var u=n.store;n.updateStore(Jn(u,a,c,!0)),n.notifyObservers(u,[a],{type:"remove"}),n.triggerDependenciesUpdate(u,a)}}n.notifyWatch([a])}}),te(this,"dispatch",function(r){switch(r.type){case"updateValue":{var a=r.namePath,o=r.value;n.updateValue(a,o);break}case"validateField":{var i=r.namePath,s=r.triggerName;n.validateFields([i],{triggerName:s});break}}}),te(this,"notifyObservers",function(r,a,o){if(n.subscribable){var i=ve(ve({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(s){var l=s.onStoreChange;l(r,a,i)})}else n.forceRootUpdate()}),te(this,"triggerDependenciesUpdate",function(r,a){var o=n.getDependencyChildrenFields(a);return o.length&&n.validateFields(o),n.notifyObservers(r,o,{type:"dependenciesUpdate",relatedFields:[a].concat(at(o))}),o}),te(this,"updateValue",function(r,a){var o=Gt(r),i=n.store;n.updateStore(Jn(n.store,o,a)),n.notifyObservers(i,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var s=n.triggerDependenciesUpdate(i,o),l=n.callbacks.onValuesChange;if(l){var c=Ym(n.store,[o]);l(c,n.getFieldsValue())}n.triggerOnFieldsChange([o].concat(at(s)))}),te(this,"setFieldsValue",function(r){n.warningUnhooked();var a=n.store;if(r){var o=xa(n.store,r);n.updateStore(o)}n.notifyObservers(a,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),te(this,"setFieldValue",function(r,a){n.setFields([{name:r,value:a,errors:[],warnings:[]}])}),te(this,"getDependencyChildrenFields",function(r){var a=new Set,o=[],i=new ya;n.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var d=Gt(u);i.update(d,function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return g.add(l),g})})});var s=function l(c){var u=i.get(c)||new Set;u.forEach(function(d){if(!a.has(d)){a.add(d);var g=d.getNamePath();d.isFieldDirty()&&g.length&&(o.push(g),l(g))}})};return s(r),o}),te(this,"triggerOnFieldsChange",function(r,a){var o=n.callbacks.onFieldsChange;if(o){var i=n.getFields();if(a){var s=new ya;a.forEach(function(c){var u=c.name,d=c.errors;s.set(u,d)}),i.forEach(function(c){c.errors=s.get(c.name)||c.errors})}var l=i.filter(function(c){var u=c.name;return ka(r,u)});l.length&&o(l,i)}}),te(this,"validateFields",function(r,a){n.warningUnhooked();var o,i;Array.isArray(r)||typeof r=="string"||typeof a=="string"?(o=r,i=a):i=r;var s=!!o,l=s?o.map(Gt):[],c=[],u=String(Date.now()),d=new Set,g=i||{},h=g.recursive,v=g.dirty;n.getFieldEntities(!0).forEach(function(y){if(s||l.push(y.getNamePath()),!(!y.props.rules||!y.props.rules.length)&&!(v&&!y.isFieldDirty())){var x=y.getNamePath();if(d.add(x.join(u)),!s||ka(l,x,h)){var w=y.validateRules(ve({validateMessages:ve(ve({},p0),n.validateMessages)},i));c.push(w.then(function(){return{name:x,errors:[],warnings:[]}}).catch(function(C){var S,E=[],k=[];return(S=C.forEach)===null||S===void 0||S.call(C,function($){var O=$.rule.warningOnly,D=$.errors;O?k.push.apply(k,at(D)):E.push.apply(E,at(D))}),E.length?Promise.reject({name:x,errors:E,warnings:k}):{name:x,errors:E,warnings:k}}))}}});var m=fF(c);n.lastValidatePromise=m,m.catch(function(y){return y}).then(function(y){var x=y.map(function(w){var C=w.name;return C});n.notifyObservers(n.store,x,{type:"validateFinish"}),n.triggerOnFieldsChange(x,y)});var p=m.then(function(){return n.lastValidatePromise===m?Promise.resolve(n.getFieldsValue(l)):Promise.reject([])}).catch(function(y){var x=y.filter(function(w){return w&&w.errors.length});return Promise.reject({values:n.getFieldsValue(l),errorFields:x,outOfDate:n.lastValidatePromise!==m})});p.catch(function(y){return y});var b=l.filter(function(y){return d.has(y.join(u))});return n.triggerOnFieldsChange(b),p}),te(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(r){var a=n.callbacks.onFinish;if(a)try{a(r)}catch(o){console.error(o)}}).catch(function(r){var a=n.callbacks.onFinishFailed;a&&a(r)})}),this.forceRootUpdate=t});function y0(e){var t=f.useRef(),n=f.useState({}),r=ot(n,2),a=r[1];if(!t.current)if(e)t.current=e;else{var o=function(){a({})},i=new pF(o);t.current=i.getForm()}return[t.current]}var Xc=f.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),gF=function(e){var t=e.validateMessages,n=e.onFormChange,r=e.onFormFinish,a=e.children,o=f.useContext(Xc),i=f.useRef({});return f.createElement(Xc.Provider,{value:ve(ve({},o),{},{validateMessages:ve(ve({},o.validateMessages),t),triggerFormChange:function(s,l){n&&n(s,{changedFields:l,forms:i.current}),o.triggerFormChange(s,l)},triggerFormFinish:function(s,l){r&&r(s,{values:l,forms:i.current}),o.triggerFormFinish(s,l)},registerForm:function(s,l){s&&(i.current=ve(ve({},i.current),{},te({},s,l))),o.registerForm(s,l)},unregisterForm:function(s){var l=ve({},i.current);delete l[s],i.current=l,o.unregisterForm(s)}})},a)},vF=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],hF=function(e,t){var n=e.name,r=e.initialValues,a=e.fields,o=e.form,i=e.preserve,s=e.children,l=e.component,c=l===void 0?"form":l,u=e.validateMessages,d=e.validateTrigger,g=d===void 0?"onChange":d,h=e.onValuesChange,v=e.onFieldsChange,m=e.onFinish,p=e.onFinishFailed,b=e.clearOnDestroy,y=pr(e,vF),x=f.useRef(null),w=f.useContext(Xc),C=y0(o),S=ot(C,1),E=S[0],k=E.getInternalHooks(Ur),$=k.useSubscribe,O=k.setInitialValues,D=k.setCallbacks,P=k.setValidateMessages,R=k.setPreserve,N=k.destroyForm;f.useImperativeHandle(t,function(){return ve(ve({},E),{},{nativeElement:x.current})}),f.useEffect(function(){return w.registerForm(n,E),function(){w.unregisterForm(n)}},[w,E,n]),P(ve(ve({},w.validateMessages),u)),D({onValuesChange:h,onFieldsChange:function(z){if(w.triggerFormChange(n,z),v){for(var T=arguments.length,H=new Array(T>1?T-1:0),W=1;W<T;W++)H[W-1]=arguments[W];v.apply(void 0,[z].concat(H))}},onFinish:function(z){w.triggerFormFinish(n,z),m&&m(z)},onFinishFailed:p}),R(i);var I=f.useRef(null);O(r,!I.current),I.current||(I.current=!0),f.useEffect(function(){return function(){return N(b)}},[]);var M,F=typeof s=="function";if(F){var j=E.getFieldsValue(!0);M=s(j,E)}else M=s;$(!F);var A=f.useRef();f.useEffect(function(){lF(A.current||[],a||[])||E.setFields(a||[]),A.current=a},[a,E]);var _=f.useMemo(function(){return ve(ve({},E),{},{validateTrigger:g})},[E,g]),L=f.createElement(Zi.Provider,{value:null},f.createElement(Ma.Provider,{value:_},M));return c===!1?L:f.createElement(c,vn({},y,{ref:x,onSubmit:function(z){z.preventDefault(),z.stopPropagation(),E.submit()},onReset:function(z){var T;z.preventDefault(),E.resetFields(),(T=y.onReset)===null||T===void 0||T.call(y,z)}}),L)};function Xm(e){try{return JSON.stringify(e)}catch{return Math.random()}}function yF(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],a=t[1],o=a===void 0?{}:a,i=kM(o)?{form:o}:o,s=i.form,l=dt(),c=ot(l,2),u=c[0],d=c[1],g=Lt(function(){return Xm(u)},[u]),h=wt(g);h.current=g;var v=$n(Ma),m=s||v,p=m&&m._init,b=Gt(r),y=wt(b);return y.current=b,ft(function(){if(p){var x=m.getFieldsValue,w=m.getInternalHooks,C=w(Ur),S=C.registerWatch,E=function(O,D){var P=i.preserve?D:O;return typeof r=="function"?r(P):dr(P,y.current)},k=S(function(O,D){var P=E(O,D),R=Xm(P);h.current!==R&&(h.current=R,d(P))}),$=E(x(),x(!0));return u!==$&&d($),k}},[p]),u}var bF=f.forwardRef(hF),Uo=bF;Uo.FormProvider=gF;Uo.Field=v0;Uo.List=dF;Uo.useForm=y0;Uo.useWatch=yF;const xF=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
|
|
411
|
+
`;document.head.appendChild(m0);function zc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[];return be.Children.forEach(e,function(r){r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(zc(r)):ih(r)&&r.props?n=n.concat(zc(r.props.children,t)):n.push(r))}),n}var Yr="RC_FORM_INTERNAL_HOOKS",Ft=function(){Hn(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Fa=f.createContext({getFieldValue:Ft,getFieldsValue:Ft,getFieldError:Ft,getFieldWarning:Ft,getFieldsError:Ft,isFieldsTouched:Ft,isFieldTouched:Ft,isFieldValidating:Ft,isFieldsValidating:Ft,resetFields:Ft,setFields:Ft,setFieldValue:Ft,setFieldsValue:Ft,validateFields:Ft,submit:Ft,getInternalHooks:function(){return Ft(),{dispatch:Ft,initEntityValue:Ft,registerField:Ft,useSubscribe:Ft,setInitialValues:Ft,destroyForm:Ft,setCallbacks:Ft,registerWatch:Ft,getFields:Ft,setValidateMessages:Ft,setPreserve:Ft,getInitialValue:Ft}}}),el=f.createContext(null);function Hc(e){return e==null?[]:Array.isArray(e)?e:[e]}function OM(e){return e&&!!e._init}function Vc(){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",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 e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Kc=Vc();function NM(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function DM(e,t,n){if(Vu())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var a=new(e.bind.apply(e,r));return n&&wo(a,n.prototype),a}function Wc(e){var t=typeof Map=="function"?new Map:void 0;return Wc=function(n){if(n===null||!NM(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,r)}function r(){return DM(n,arguments,So(this).constructor)}return r.prototype=Object.create(n.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),wo(r,n)},Wc(e)}var MM=/%[sdj%]/g,FM=function(){};function qc(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function zn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var a=0,o=n.length;if(typeof e=="function")return e.apply(null,n);if(typeof e=="string"){var i=e.replace(MM,function(l){if(l==="%%")return"%";if(a>=o)return l;switch(l){case"%s":return String(n[a++]);case"%d":return Number(n[a++]);case"%j":try{return JSON.stringify(n[a++])}catch{return"[Circular]"}break;default:return l}});return i}return e}function PM(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function ln(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||PM(t)&&typeof e=="string"&&!e)}function RM(e,t,n){var r=[],a=0,o=e.length;function i(l){r.push.apply(r,ot(l||[])),a++,a===o&&n(r)}e.forEach(function(l){t(l,i)})}function Hm(e,t,n){var r=0,a=e.length;function o(i){if(i&&i.length){n(i);return}var l=r;r=r+1,l<a?t(e[l],o):n([])}o([])}function AM(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,ot(e[n]||[]))}),t}var Vm=(function(e){_a(n,e);var t=Ba(n);function n(r,a){var o;return Nn(this,n),o=t.call(this,"Async Validation Error"),te(Ct(o),"errors",void 0),te(Ct(o),"fields",void 0),o.errors=r,o.fields=a,o}return Dn(n)})(Wc(Error));function TM(e,t,n,r,a){if(t.first){var o=new Promise(function(g,h){var v=function(p){return r(p),p.length?h(new Vm(p,qc(p))):g(a)},m=AM(e);Hm(m,n,v)});return o.catch(function(g){return g}),o}var i=t.firstFields===!0?Object.keys(e):t.firstFields||[],l=Object.keys(e),s=l.length,c=0,u=[],d=new Promise(function(g,h){var v=function(m){if(u.push.apply(u,m),c++,c===s)return r(u),u.length?h(new Vm(u,qc(u))):g(a)};l.length||(r(u),g(a)),l.forEach(function(m){var p=e[m];i.indexOf(m)!==-1?Hm(p,n,v):RM(p,n,v)})});return d.catch(function(g){return g}),d}function jM(e){return!!(e&&e.message!==void 0)}function _M(e,t){for(var n=e,r=0;r<t.length;r++){if(n==null)return n;n=n[t[r]]}return n}function Km(e,t){return function(n){var r;return e.fullFields?r=_M(t,e.fullFields):r=t[n.field||e.fullField],jM(n)?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:typeof n=="function"?n():n,fieldValue:r,field:n.field||e.fullField}}}function Wm(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];pt(r)==="object"&&pt(e[n])==="object"?e[n]=ve(ve({},e[n]),r):e[n]=r}}return e}var ya="enum",BM=function(e,t,n,r,a){e[ya]=Array.isArray(e[ya])?e[ya]:[],e[ya].indexOf(t)===-1&&r.push(zn(a.messages[ya],e.fullField,e[ya].join(", ")))},LM=function(e,t,n,r,a){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(zn(a.messages.pattern.mismatch,e.fullField,t,e.pattern));else if(typeof e.pattern=="string"){var o=new RegExp(e.pattern);o.test(t)||r.push(zn(a.messages.pattern.mismatch,e.fullField,t,e.pattern))}}},zM=function(e,t,n,r,a){var o=typeof e.len=="number",i=typeof e.min=="number",l=typeof e.max=="number",s=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=t,u=null,d=typeof t=="number",g=typeof t=="string",h=Array.isArray(t);if(d?u="number":g?u="string":h&&(u="array"),!u)return!1;h&&(c=t.length),g&&(c=t.replace(s,"_").length),o?c!==e.len&&r.push(zn(a.messages[u].len,e.fullField,e.len)):i&&!l&&c<e.min?r.push(zn(a.messages[u].min,e.fullField,e.min)):l&&!i&&c>e.max?r.push(zn(a.messages[u].max,e.fullField,e.max)):i&&l&&(c<e.min||c>e.max)&&r.push(zn(a.messages[u].range,e.fullField,e.min,e.max))},p0=function(e,t,n,r,a,o){e.required&&(!n.hasOwnProperty(e.field)||ln(t,o||e.type))&&r.push(zn(a.messages.required,e.fullField))},mi;const HM=(function(){if(mi)return mi;var e="[a-fA-F\\d:]",t=function(C){return C&&C.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},n="(?: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}",r="[a-fA-F\\d]{1,4}",a=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],o="(?:%[0-9a-zA-Z]{1,})?",i="(?:".concat(a.join("|"),")").concat(o),l=new RegExp("(?:^".concat(n,"$)|(?:^").concat(i,"$)")),s=new RegExp("^".concat(n,"$")),c=new RegExp("^".concat(i,"$")),u=function(C){return C&&C.exact?l:new RegExp("(?:".concat(t(C)).concat(n).concat(t(C),")|(?:").concat(t(C)).concat(i).concat(t(C),")"),"g")};u.v4=function(C){return C&&C.exact?s:new RegExp("".concat(t(C)).concat(n).concat(t(C)),"g")},u.v6=function(C){return C&&C.exact?c:new RegExp("".concat(t(C)).concat(i).concat(t(C)),"g")};var d="(?:(?:[a-z]+:)?//)",g="(?:\\S+(?::\\S*)?@)?",h=u.v4().source,v=u.v6().source,m="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",p="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",b="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",x='(?:[/?#][^\\s"]*)?',w="(?:".concat(d,"|www\\.)").concat(g,"(?:localhost|").concat(h,"|").concat(v,"|").concat(m).concat(p).concat(b,")").concat(y).concat(x);return mi=new RegExp("(?:^".concat(w,"$)"),"i"),mi});var qm={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,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},co={integer:function(e){return co.number(e)&&parseInt(e,10)===e},float:function(e){return co.number(e)&&!co.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return pt(e)==="object"&&!co.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(qm.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(HM())},hex:function(e){return typeof e=="string"&&!!e.match(qm.hex)}},VM=function(e,t,n,r,a){if(e.required&&t===void 0){p0(e,t,n,r,a);return}var o=["integer","float","array","regexp","object","method","email","number","date","url","hex"],i=e.type;o.indexOf(i)>-1?co[i](t)||r.push(zn(a.messages.types[i],e.fullField,e.type)):i&&pt(t)!==e.type&&r.push(zn(a.messages.types[i],e.fullField,e.type))},KM=function(e,t,n,r,a){(/^\s+$/.test(t)||t==="")&&r.push(zn(a.messages.whitespace,e.fullField))};const Et={required:p0,whitespace:KM,type:VM,range:zM,enum:BM,pattern:LM};var WM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(ln(t)&&!e.required)return n();Et.required(e,t,r,o,a)}n(o)},qM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(t==null&&!e.required)return n();Et.required(e,t,r,o,a,"array"),t!=null&&(Et.type(e,t,r,o,a),Et.range(e,t,r,o,a))}n(o)},UM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(ln(t)&&!e.required)return n();Et.required(e,t,r,o,a),t!==void 0&&Et.type(e,t,r,o,a)}n(o)},YM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(ln(t,"date")&&!e.required)return n();if(Et.required(e,t,r,o,a),!ln(t,"date")){var l;t instanceof Date?l=t:l=new Date(t),Et.type(e,l,r,o,a),l&&Et.range(e,l.getTime(),r,o,a)}}n(o)},GM="enum",XM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(ln(t)&&!e.required)return n();Et.required(e,t,r,o,a),t!==void 0&&Et[GM](e,t,r,o,a)}n(o)},JM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(ln(t)&&!e.required)return n();Et.required(e,t,r,o,a),t!==void 0&&(Et.type(e,t,r,o,a),Et.range(e,t,r,o,a))}n(o)},QM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(ln(t)&&!e.required)return n();Et.required(e,t,r,o,a),t!==void 0&&(Et.type(e,t,r,o,a),Et.range(e,t,r,o,a))}n(o)},ZM=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(ln(t)&&!e.required)return n();Et.required(e,t,r,o,a),t!==void 0&&Et.type(e,t,r,o,a)}n(o)},eF=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(t===""&&(t=void 0),ln(t)&&!e.required)return n();Et.required(e,t,r,o,a),t!==void 0&&(Et.type(e,t,r,o,a),Et.range(e,t,r,o,a))}n(o)},tF=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(ln(t)&&!e.required)return n();Et.required(e,t,r,o,a),t!==void 0&&Et.type(e,t,r,o,a)}n(o)},nF=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(ln(t,"string")&&!e.required)return n();Et.required(e,t,r,o,a),ln(t,"string")||Et.pattern(e,t,r,o,a)}n(o)},rF=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(ln(t)&&!e.required)return n();Et.required(e,t,r,o,a),ln(t)||Et.type(e,t,r,o,a)}n(o)},aF=function(e,t,n,r,a){var o=[],i=Array.isArray(t)?"array":pt(t);Et.required(e,t,r,o,a,i),n(o)},oF=function(e,t,n,r,a){var o=[],i=e.required||!e.required&&r.hasOwnProperty(e.field);if(i){if(ln(t,"string")&&!e.required)return n();Et.required(e,t,r,o,a,"string"),ln(t,"string")||(Et.type(e,t,r,o,a),Et.range(e,t,r,o,a),Et.pattern(e,t,r,o,a),e.whitespace===!0&&Et.whitespace(e,t,r,o,a))}n(o)},$s=function(e,t,n,r,a){var o=e.type,i=[],l=e.required||!e.required&&r.hasOwnProperty(e.field);if(l){if(ln(t,o)&&!e.required)return n();Et.required(e,t,r,i,a,o),ln(t,o)||Et.type(e,t,r,i,a)}n(i)};const vo={string:oF,method:ZM,number:eF,boolean:UM,regexp:rF,integer:QM,float:JM,array:qM,object:tF,enum:XM,pattern:nF,date:YM,url:$s,hex:$s,email:$s,required:aF,any:WM};var Uo=(function(){function e(t){Nn(this,e),te(this,"rules",null),te(this,"_messages",Kc),this.define(t)}return Dn(e,[{key:"define",value:function(t){var n=this;if(!t)throw new Error("Cannot configure a schema with no rules");if(pt(t)!=="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={},Object.keys(t).forEach(function(r){var a=t[r];n.rules[r]=Array.isArray(a)?a:[a]})}},{key:"messages",value:function(t){return t&&(this._messages=Wm(Vc(),t)),this._messages}},{key:"validate",value:function(t){var n=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},o=t,i=r,l=a;if(typeof i=="function"&&(l=i,i={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,o),Promise.resolve(o);function s(g){var h=[],v={};function m(b){if(Array.isArray(b)){var y;h=(y=h).concat.apply(y,ot(b))}else h.push(b)}for(var p=0;p<g.length;p++)m(g[p]);h.length?(v=qc(h),l(h,v)):l(null,o)}if(i.messages){var c=this.messages();c===Kc&&(c=Vc()),Wm(c,i.messages),i.messages=c}else i.messages=this.messages();var u={},d=i.keys||Object.keys(this.rules);return d.forEach(function(g){var h=n.rules[g],v=o[g];h.forEach(function(m){var p=m;typeof p.transform=="function"&&(o===t&&(o=ve({},o)),v=o[g]=p.transform(v),v!=null&&(p.type=p.type||(Array.isArray(v)?"array":pt(v)))),typeof p=="function"?p={validator:p}:p=ve({},p),p.validator=n.getValidationMethod(p),p.validator&&(p.field=g,p.fullField=p.fullField||g,p.type=n.getType(p),u[g]=u[g]||[],u[g].push({rule:p,value:v,source:o,field:g}))})}),TM(u,i,function(g,h){var v=g.rule,m=(v.type==="object"||v.type==="array")&&(pt(v.fields)==="object"||pt(v.defaultField)==="object");m=m&&(v.required||!v.required&&g.value),v.field=g.field;function p(C,S){return ve(ve({},S),{},{fullField:"".concat(v.fullField,".").concat(C),fullFields:v.fullFields?[].concat(ot(v.fullFields),[C]):[C]})}function b(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],S=Array.isArray(C)?C:[C];!i.suppressWarning&&S.length&&e.warning("async-validator:",S),S.length&&v.message!==void 0&&(S=[].concat(v.message));var E=S.map(Km(v,o));if(i.first&&E.length)return h(E);if(!m)h(E);else{if(v.required&&!g.value)return v.message!==void 0?E=[].concat(v.message).map(Km(v,o)):i.error&&(E=[i.error(v,zn(i.messages.required,v.field))]),h(E);var k={};v.defaultField&&Object.keys(g.value).map(function(D){k[D]=v.defaultField}),k=ve(ve({},k),g.rule.fields);var $={};Object.keys(k).forEach(function(D){var P=k[D],A=Array.isArray(P)?P:[P];$[D]=A.map(p.bind(null,D))});var O=new e($);O.messages(i.messages),g.rule.options&&(g.rule.options.messages=i.messages,g.rule.options.error=i.error),O.validate(g.value,g.rule.options||i,function(D){var P=[];E&&E.length&&P.push.apply(P,ot(E)),D&&D.length&&P.push.apply(P,ot(D)),h(P.length?P:null)})}}var y;if(v.asyncValidator)y=v.asyncValidator(v,g.value,b,g.source,i);else if(v.validator){try{y=v.validator(v,g.value,b,g.source,i)}catch(C){var x,w;(x=(w=console).error)===null||x===void 0||x.call(w,C),i.suppressValidatorError||setTimeout(function(){throw C},0),b(C.message)}y===!0?b():y===!1?b(typeof v.message=="function"?v.message(v.fullField||v.field):v.message||"".concat(v.fullField||v.field," fails")):y instanceof Array?b(y):y instanceof Error&&b(y.message)}y&&y.then&&y.then(function(){return b()},function(C){return b(C)})},function(g){s(g)},o)}},{key:"getType",value:function(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!vo.hasOwnProperty(t.type))throw new Error(zn("Unknown rule type %s",t.type));return t.type||"string"}},{key:"getValidationMethod",value:function(t){if(typeof t.validator=="function")return t.validator;var n=Object.keys(t),r=n.indexOf("message");return r!==-1&&n.splice(r,1),n.length===1&&n[0]==="required"?vo.required:vo[this.getType(t)]||void 0}}]),e})();te(Uo,"register",function(e,t){if(typeof t!="function")throw new Error("Cannot register a validator by type, validator is not a function");vo[e]=t});te(Uo,"warning",FM);te(Uo,"messages",Kc);te(Uo,"validators",vo);var Ln="'${name}' is not a valid ${type}",g0={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:Ln,method:Ln,array:Ln,object:Ln,number:Ln,date:Ln,boolean:Ln,integer:Ln,float:Ln,regexp:Ln,email:Ln,url:Ln,hex:Ln},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}"}},Um=Uo;function iF(e,t){return e.replace(/\\?\$\{\w+\}/g,function(n){if(n.startsWith("\\"))return n.slice(1);var r=n.slice(2,-1);return t[r]})}var Ym="CODE_LOGIC_ERROR";function Uc(e,t,n,r,a){return Yc.apply(this,arguments)}function Yc(){return Yc=ma(kn().mark(function e(t,n,r,a,o){var i,l,s,c,u,d,g,h,v;return kn().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return i=ve({},r),delete i.ruleIndex,Um.warning=function(){},i.validator&&(l=i.validator,i.validator=function(){try{return l.apply(void 0,arguments)}catch(p){return console.error(p),Promise.reject(Ym)}}),s=null,i&&i.type==="array"&&i.defaultField&&(s=i.defaultField,delete i.defaultField),c=new Um(te({},t,[i])),u=Ca(g0,a.validateMessages),c.messages(u),d=[],m.prev=10,m.next=13,Promise.resolve(c.validate(te({},t,n),ve({},a)));case 13:m.next=18;break;case 15:m.prev=15,m.t0=m.catch(10),m.t0.errors&&(d=m.t0.errors.map(function(p,b){var y=p.message,x=y===Ym?u.default:y;return f.isValidElement(x)?f.cloneElement(x,{key:"error_".concat(b)}):x}));case 18:if(!(!d.length&&s)){m.next=23;break}return m.next=21,Promise.all(n.map(function(p,b){return Uc("".concat(t,".").concat(b),p,s,a,o)}));case 21:return g=m.sent,m.abrupt("return",g.reduce(function(p,b){return[].concat(ot(p),ot(b))},[]));case 23:return h=ve(ve({},r),{},{name:t,enum:(r.enum||[]).join(", ")},o),v=d.map(function(p){return typeof p=="string"?iF(p,h):p}),m.abrupt("return",v);case 26:case"end":return m.stop()}},e,null,[[10,15]])})),Yc.apply(this,arguments)}function lF(e,t,n,r,a,o){var i=e.join("."),l=n.map(function(u,d){var g=u.validator,h=ve(ve({},u),{},{ruleIndex:d});return g&&(h.validator=function(v,m,p){var b=!1,y=function(){for(var w=arguments.length,C=new Array(w),S=0;S<w;S++)C[S]=arguments[S];Promise.resolve().then(function(){Hn(!b,"Your validator function has already return a promise. `callback` will be ignored."),b||p.apply(void 0,C)})},x=g(v,m,y);b=x&&typeof x.then=="function"&&typeof x.catch=="function",Hn(b,"`callback` is deprecated. Please return a promise instead."),b&&x.then(function(){p()}).catch(function(w){p(w||" ")})}),h}).sort(function(u,d){var g=u.warningOnly,h=u.ruleIndex,v=d.warningOnly,m=d.ruleIndex;return!!g==!!v?h-m:g?1:-1}),s;if(a===!0)s=new Promise((function(){var u=ma(kn().mark(function d(g,h){var v,m,p;return kn().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:v=0;case 1:if(!(v<l.length)){b.next=12;break}return m=l[v],b.next=5,Uc(i,t,m,r,o);case 5:if(p=b.sent,!p.length){b.next=9;break}return h([{errors:p,rule:m}]),b.abrupt("return");case 9:v+=1,b.next=1;break;case 12:g([]);case 13:case"end":return b.stop()}},d)}));return function(d,g){return u.apply(this,arguments)}})());else{var c=l.map(function(u){return Uc(i,t,u,r,o).then(function(d){return{errors:d,rule:u}})});s=(a?cF(c):sF(c)).then(function(u){return Promise.reject(u)})}return s.catch(function(u){return u}),s}function sF(e){return Gc.apply(this,arguments)}function Gc(){return Gc=ma(kn().mark(function e(t){return kn().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.all(t).then(function(r){var a,o=(a=[]).concat.apply(a,ot(r));return o}));case 1:case"end":return n.stop()}},e)})),Gc.apply(this,arguments)}function cF(e){return Xc.apply(this,arguments)}function Xc(){return Xc=ma(kn().mark(function e(t){var n;return kn().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return n=0,r.abrupt("return",new Promise(function(a){t.forEach(function(o){o.then(function(i){i.errors.length&&a([i]),n+=1,n===t.length&&a([])})})}));case 2:case"end":return r.stop()}},e)})),Xc.apply(this,arguments)}function Xt(e){return Hc(e)}function Gm(e,t){var n={};return t.forEach(function(r){var a=fr(e,r);n=Qn(n,r,a)}),n}function Ia(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return e&&e.some(function(r){return v0(t,r,n)})}function v0(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e||!t||!n&&e.length!==t.length?!1:t.every(function(r,a){return e[a]===r})}function uF(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||pt(e)!=="object"||pt(t)!=="object")return!1;var n=Object.keys(e),r=Object.keys(t),a=new Set([].concat(n,r));return ot(a).every(function(o){var i=e[o],l=t[o];return typeof i=="function"&&typeof l=="function"?!0:i===l})}function dF(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&pt(t.target)==="object"&&e in t.target?t.target[e]:t}function Xm(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var a=e[t],o=t-n;return o>0?[].concat(ot(e.slice(0,n)),[a],ot(e.slice(n,t)),ot(e.slice(t+1,r))):o<0?[].concat(ot(e.slice(0,t)),ot(e.slice(t+1,n+1)),[a],ot(e.slice(n+1,r))):e}var fF=["name"],Un=[];function Es(e,t,n,r,a,o){return typeof e=="function"?e(t,n,"source"in o?{source:o.source}:{}):r!==a}var od=(function(e){_a(n,e);var t=Ba(n);function n(r){var a;if(Nn(this,n),a=t.call(this,r),te(Ct(a),"state",{resetCount:0}),te(Ct(a),"cancelRegisterFunc",null),te(Ct(a),"mounted",!1),te(Ct(a),"touched",!1),te(Ct(a),"dirty",!1),te(Ct(a),"validatePromise",void 0),te(Ct(a),"prevValidating",void 0),te(Ct(a),"errors",Un),te(Ct(a),"warnings",Un),te(Ct(a),"cancelRegister",function(){var s=a.props,c=s.preserve,u=s.isListField,d=s.name;a.cancelRegisterFunc&&a.cancelRegisterFunc(u,c,Xt(d)),a.cancelRegisterFunc=null}),te(Ct(a),"getNamePath",function(){var s=a.props,c=s.name,u=s.fieldContext,d=u.prefixName,g=d===void 0?[]:d;return c!==void 0?[].concat(ot(g),ot(c)):[]}),te(Ct(a),"getRules",function(){var s=a.props,c=s.rules,u=c===void 0?[]:c,d=s.fieldContext;return u.map(function(g){return typeof g=="function"?g(d):g})}),te(Ct(a),"refresh",function(){a.mounted&&a.setState(function(s){var c=s.resetCount;return{resetCount:c+1}})}),te(Ct(a),"metaCache",null),te(Ct(a),"triggerMetaEvent",function(s){var c=a.props.onMetaChange;if(c){var u=ve(ve({},a.getMeta()),{},{destroy:s});rc(a.metaCache,u)||c(u),a.metaCache=u}else a.metaCache=null}),te(Ct(a),"onStoreChange",function(s,c,u){var d=a.props,g=d.shouldUpdate,h=d.dependencies,v=h===void 0?[]:h,m=d.onReset,p=u.store,b=a.getNamePath(),y=a.getValue(s),x=a.getValue(p),w=c&&Ia(c,b);switch(u.type==="valueUpdate"&&u.source==="external"&&!rc(y,x)&&(a.touched=!0,a.dirty=!0,a.validatePromise=null,a.errors=Un,a.warnings=Un,a.triggerMetaEvent()),u.type){case"reset":if(!c||w){a.touched=!1,a.dirty=!1,a.validatePromise=void 0,a.errors=Un,a.warnings=Un,a.triggerMetaEvent(),m==null||m(),a.refresh();return}break;case"remove":{if(g&&Es(g,s,p,y,x,u)){a.reRender();return}break}case"setField":{var C=u.data;if(w){"touched"in C&&(a.touched=C.touched),"validating"in C&&!("originRCField"in C)&&(a.validatePromise=C.validating?Promise.resolve([]):null),"errors"in C&&(a.errors=C.errors||Un),"warnings"in C&&(a.warnings=C.warnings||Un),a.dirty=!0,a.triggerMetaEvent(),a.reRender();return}else if("value"in C&&Ia(c,b,!0)){a.reRender();return}if(g&&!b.length&&Es(g,s,p,y,x,u)){a.reRender();return}break}case"dependenciesUpdate":{var S=v.map(Xt);if(S.some(function(E){return Ia(u.relatedFields,E)})){a.reRender();return}break}default:if(w||(!v.length||b.length||g)&&Es(g,s,p,y,x,u)){a.reRender();return}break}g===!0&&a.reRender()}),te(Ct(a),"validateRules",function(s){var c=a.getNamePath(),u=a.getValue(),d=s||{},g=d.triggerName,h=d.validateOnly,v=h===void 0?!1:h,m=Promise.resolve().then(ma(kn().mark(function p(){var b,y,x,w,C,S,E;return kn().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:if(a.mounted){k.next=2;break}return k.abrupt("return",[]);case 2:if(b=a.props,y=b.validateFirst,x=y===void 0?!1:y,w=b.messageVariables,C=b.validateDebounce,S=a.getRules(),g&&(S=S.filter(function($){return $}).filter(function($){var O=$.validateTrigger;if(!O)return!0;var D=Hc(O);return D.includes(g)})),!(C&&g)){k.next=10;break}return k.next=8,new Promise(function($){setTimeout($,C)});case 8:if(a.validatePromise===m){k.next=10;break}return k.abrupt("return",[]);case 10:return E=lF(c,u,S,s,x,w),E.catch(function($){return $}).then(function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Un;if(a.validatePromise===m){var O;a.validatePromise=null;var D=[],P=[];(O=$.forEach)===null||O===void 0||O.call($,function(A){var N=A.rule.warningOnly,I=A.errors,M=I===void 0?Un:I;N?P.push.apply(P,ot(M)):D.push.apply(D,ot(M))}),a.errors=D,a.warnings=P,a.triggerMetaEvent(),a.reRender()}}),k.abrupt("return",E);case 13:case"end":return k.stop()}},p)})));return v||(a.validatePromise=m,a.dirty=!0,a.errors=Un,a.warnings=Un,a.triggerMetaEvent(),a.reRender()),m}),te(Ct(a),"isFieldValidating",function(){return!!a.validatePromise}),te(Ct(a),"isFieldTouched",function(){return a.touched}),te(Ct(a),"isFieldDirty",function(){if(a.dirty||a.props.initialValue!==void 0)return!0;var s=a.props.fieldContext,c=s.getInternalHooks(Yr),u=c.getInitialValue;return u(a.getNamePath())!==void 0}),te(Ct(a),"getErrors",function(){return a.errors}),te(Ct(a),"getWarnings",function(){return a.warnings}),te(Ct(a),"isListField",function(){return a.props.isListField}),te(Ct(a),"isList",function(){return a.props.isList}),te(Ct(a),"isPreserve",function(){return a.props.preserve}),te(Ct(a),"getMeta",function(){a.prevValidating=a.isFieldValidating();var s={touched:a.isFieldTouched(),validating:a.prevValidating,errors:a.errors,warnings:a.warnings,name:a.getNamePath(),validated:a.validatePromise===null};return s}),te(Ct(a),"getOnlyChild",function(s){if(typeof s=="function"){var c=a.getMeta();return ve(ve({},a.getOnlyChild(s(a.getControlled(),c,a.props.fieldContext))),{},{isFunction:!0})}var u=zc(s);return u.length!==1||!f.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),te(Ct(a),"getValue",function(s){var c=a.props.fieldContext.getFieldsValue,u=a.getNamePath();return fr(s||c(!0),u)}),te(Ct(a),"getControlled",function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=a.props,u=c.name,d=c.trigger,g=c.validateTrigger,h=c.getValueFromEvent,v=c.normalize,m=c.valuePropName,p=c.getValueProps,b=c.fieldContext,y=g!==void 0?g:b.validateTrigger,x=a.getNamePath(),w=b.getInternalHooks,C=b.getFieldsValue,S=w(Yr),E=S.dispatch,k=a.getValue(),$=p||function(N){return te({},m,N)},O=s[d],D=u!==void 0?$(k):{},P=ve(ve({},s),D);P[d]=function(){a.touched=!0,a.dirty=!0,a.triggerMetaEvent();for(var N,I=arguments.length,M=new Array(I),F=0;F<I;F++)M[F]=arguments[F];h?N=h.apply(void 0,M):N=dF.apply(void 0,[m].concat(M)),v&&(N=v(N,k,C(!0))),N!==k&&E({type:"updateValue",namePath:x,value:N}),O&&O.apply(void 0,M)};var A=Hc(y||[]);return A.forEach(function(N){var I=P[N];P[N]=function(){I&&I.apply(void 0,arguments);var M=a.props.rules;M&&M.length&&E({type:"validateField",namePath:x,triggerName:N})}}),P}),r.fieldContext){var o=r.fieldContext.getInternalHooks,i=o(Yr),l=i.initEntityValue;l(Ct(a))}return a}return Dn(n,[{key:"componentDidMount",value:function(){var r=this.props,a=r.shouldUpdate,o=r.fieldContext;if(this.mounted=!0,o){var i=o.getInternalHooks,l=i(Yr),s=l.registerField;this.cancelRegisterFunc=s(this)}a===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var r=this.state.resetCount,a=this.props.children,o=this.getOnlyChild(a),i=o.child,l=o.isFunction,s;return l?s=i:f.isValidElement(i)?s=f.cloneElement(i,this.getControlled(i.props)):(Hn(!i,"`children` of Field is not validate ReactElement."),s=i),f.createElement(f.Fragment,{key:r},s)}}]),n})(f.Component);te(od,"contextType",Fa);te(od,"defaultProps",{trigger:"onChange",valuePropName:"value"});function h0(e){var t,n=e.name,r=gr(e,fF),a=f.useContext(Fa),o=f.useContext(el),i=n!==void 0?Xt(n):void 0,l=(t=r.isListField)!==null&&t!==void 0?t:!!o,s="keep";return l||(s="_".concat((i||[]).join("_"))),f.createElement(od,hn({key:s,name:i,isListField:l},r,{fieldContext:a}))}function mF(e){var t=e.name,n=e.initialValue,r=e.children,a=e.rules,o=e.validateTrigger,i=e.isListField,l=f.useContext(Fa),s=f.useContext(el),c=f.useRef({keys:[],id:0}),u=c.current,d=f.useMemo(function(){var m=Xt(l.prefixName)||[];return[].concat(ot(m),ot(Xt(t)))},[l.prefixName,t]),g=f.useMemo(function(){return ve(ve({},l),{},{prefixName:d})},[l,d]),h=f.useMemo(function(){return{getKey:function(m){var p=d.length,b=m[p];return[u.keys[b],m.slice(p+1)]}}},[d]);if(typeof r!="function")return Hn(!1,"Form.List only accepts function as children."),null;var v=function(m,p,b){var y=b.source;return y==="internal"?!1:m!==p};return f.createElement(el.Provider,{value:h},f.createElement(Fa.Provider,{value:g},f.createElement(h0,{name:[],shouldUpdate:v,rules:a,validateTrigger:o,initialValue:n,isList:!0,isListField:i??!!s},function(m,p){var b=m.value,y=b===void 0?[]:b,x=m.onChange,w=l.getFieldValue,C=function(){var k=w(d||[]);return k||[]},S={add:function(k,$){var O=C();$>=0&&$<=O.length?(u.keys=[].concat(ot(u.keys.slice(0,$)),[u.id],ot(u.keys.slice($))),x([].concat(ot(O.slice(0,$)),[k],ot(O.slice($))))):(u.keys=[].concat(ot(u.keys),[u.id]),x([].concat(ot(O),[k]))),u.id+=1},remove:function(k){var $=C(),O=new Set(Array.isArray(k)?k:[k]);O.size<=0||(u.keys=u.keys.filter(function(D,P){return!O.has(P)}),x($.filter(function(D,P){return!O.has(P)})))},move:function(k,$){if(k!==$){var O=C();k<0||k>=O.length||$<0||$>=O.length||(u.keys=Xm(u.keys,k,$),x(Xm(O,k,$)))}}},E=y||[];return Array.isArray(E)||(E=[]),r(E.map(function(k,$){var O=u.keys[$];return O===void 0&&(u.keys[$]=u.id,O=u.keys[$],u.id+=1),{name:$,key:O,isListField:!0}}),S,p)})))}function pF(e){var t=!1,n=e.length,r=[];return e.length?new Promise(function(a,o){e.forEach(function(i,l){i.catch(function(s){return t=!0,s}).then(function(s){n-=1,r[l]=s,!(n>0)&&(t&&o(r),a(r))})})}):Promise.resolve([])}var y0="__@field_split__";function ks(e){return e.map(function(t){return"".concat(pt(t),":").concat(t)}).join(y0)}var ba=(function(){function e(){Nn(this,e),te(this,"kvs",new Map)}return Dn(e,[{key:"set",value:function(t,n){this.kvs.set(ks(t),n)}},{key:"get",value:function(t){return this.kvs.get(ks(t))}},{key:"update",value:function(t,n){var r=this.get(t),a=n(r);a?this.set(t,a):this.delete(t)}},{key:"delete",value:function(t){this.kvs.delete(ks(t))}},{key:"map",value:function(t){return ot(this.kvs.entries()).map(function(n){var r=it(n,2),a=r[0],o=r[1],i=a.split(y0);return t({key:i.map(function(l){var s=l.match(/^([^:]*):(.*)$/),c=it(s,3),u=c[1],d=c[2];return u==="number"?Number(d):d}),value:o})})}},{key:"toJSON",value:function(){var t={};return this.map(function(n){var r=n.key,a=n.value;return t[r.join(".")]=a,null}),t}}]),e})(),gF=["name"],vF=Dn(function e(t){var n=this;Nn(this,e),te(this,"formHooked",!1),te(this,"forceRootUpdate",void 0),te(this,"subscribable",!0),te(this,"store",{}),te(this,"fieldEntities",[]),te(this,"initialValues",{}),te(this,"callbacks",{}),te(this,"validateMessages",null),te(this,"preserve",null),te(this,"lastValidatePromise",null),te(this,"getForm",function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}}),te(this,"getInternalHooks",function(r){return r===Yr?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(Hn(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),te(this,"useSubscribe",function(r){n.subscribable=r}),te(this,"prevWithoutPreserves",null),te(this,"setInitialValues",function(r,a){if(n.initialValues=r||{},a){var o,i=Ca(r,n.store);(o=n.prevWithoutPreserves)===null||o===void 0||o.map(function(l){var s=l.key;i=Qn(i,s,fr(r,s))}),n.prevWithoutPreserves=null,n.updateStore(i)}}),te(this,"destroyForm",function(r){if(r)n.updateStore({});else{var a=new ba;n.getFieldEntities(!0).forEach(function(o){n.isMergedPreserve(o.isPreserve())||a.set(o.getNamePath(),!0)}),n.prevWithoutPreserves=a}}),te(this,"getInitialValue",function(r){var a=fr(n.initialValues,r);return r.length?Ca(a):a}),te(this,"setCallbacks",function(r){n.callbacks=r}),te(this,"setValidateMessages",function(r){n.validateMessages=r}),te(this,"setPreserve",function(r){n.preserve=r}),te(this,"watchList",[]),te(this,"registerWatch",function(r){return n.watchList.push(r),function(){n.watchList=n.watchList.filter(function(a){return a!==r})}}),te(this,"notifyWatch",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(n.watchList.length){var a=n.getFieldsValue(),o=n.getFieldsValue(!0);n.watchList.forEach(function(i){i(a,o,r)})}}),te(this,"timeoutId",null),te(this,"warningUnhooked",function(){}),te(this,"updateStore",function(r){n.store=r}),te(this,"getFieldEntities",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return r?n.fieldEntities.filter(function(a){return a.getNamePath().length}):n.fieldEntities}),te(this,"getFieldsMap",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=new ba;return n.getFieldEntities(r).forEach(function(o){var i=o.getNamePath();a.set(i,o)}),a}),te(this,"getFieldEntitiesForNamePathList",function(r){if(!r)return n.getFieldEntities(!0);var a=n.getFieldsMap(!0);return r.map(function(o){var i=Xt(o);return a.get(i)||{INVALIDATE_NAME_PATH:Xt(o)}})}),te(this,"getFieldsValue",function(r,a){n.warningUnhooked();var o,i,l;if(r===!0||Array.isArray(r)?(o=r,i=a):r&&pt(r)==="object"&&(l=r.strict,i=r.filter),o===!0&&!i)return n.store;var s=n.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),c=[];return s.forEach(function(u){var d,g,h="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(l){var v,m;if((v=(m=u).isList)!==null&&v!==void 0&&v.call(m))return}else if(!o&&(d=(g=u).isListField)!==null&&d!==void 0&&d.call(g))return;if(!i)c.push(h);else{var p="getMeta"in u?u.getMeta():null;i(p)&&c.push(h)}}),Gm(n.store,c.map(Xt))}),te(this,"getFieldValue",function(r){n.warningUnhooked();var a=Xt(r);return fr(n.store,a)}),te(this,"getFieldsError",function(r){n.warningUnhooked();var a=n.getFieldEntitiesForNamePathList(r);return a.map(function(o,i){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:Xt(r[i]),errors:[],warnings:[]}})}),te(this,"getFieldError",function(r){n.warningUnhooked();var a=Xt(r),o=n.getFieldsError([a])[0];return o.errors}),te(this,"getFieldWarning",function(r){n.warningUnhooked();var a=Xt(r),o=n.getFieldsError([a])[0];return o.warnings}),te(this,"isFieldsTouched",function(){n.warningUnhooked();for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];var i=a[0],l=a[1],s,c=!1;a.length===0?s=null:a.length===1?Array.isArray(i)?(s=i.map(Xt),c=!1):(s=null,c=i):(s=i.map(Xt),c=l);var u=n.getFieldEntities(!0),d=function(m){return m.isFieldTouched()};if(!s)return c?u.every(function(m){return d(m)||m.isList()}):u.some(d);var g=new ba;s.forEach(function(m){g.set(m,[])}),u.forEach(function(m){var p=m.getNamePath();s.forEach(function(b){b.every(function(y,x){return p[x]===y})&&g.update(b,function(y){return[].concat(ot(y),[m])})})});var h=function(m){return m.some(d)},v=g.map(function(m){var p=m.value;return p});return c?v.every(h):v.some(h)}),te(this,"isFieldTouched",function(r){return n.warningUnhooked(),n.isFieldsTouched([r])}),te(this,"isFieldsValidating",function(r){n.warningUnhooked();var a=n.getFieldEntities();if(!r)return a.some(function(i){return i.isFieldValidating()});var o=r.map(Xt);return a.some(function(i){var l=i.getNamePath();return Ia(o,l)&&i.isFieldValidating()})}),te(this,"isFieldValidating",function(r){return n.warningUnhooked(),n.isFieldsValidating([r])}),te(this,"resetWithFieldInitialValue",function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=new ba,o=n.getFieldEntities(!0);o.forEach(function(s){var c=s.props.initialValue,u=s.getNamePath();if(c!==void 0){var d=a.get(u)||new Set;d.add({entity:s,value:c}),a.set(u,d)}});var i=function(s){s.forEach(function(c){var u=c.props.initialValue;if(u!==void 0){var d=c.getNamePath(),g=n.getInitialValue(d);if(g!==void 0)Hn(!1,"Form already set 'initialValues' with path '".concat(d.join("."),"'. Field can not overwrite it."));else{var h=a.get(d);if(h&&h.size>1)Hn(!1,"Multiple Field with path '".concat(d.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(h){var v=n.getFieldValue(d),m=c.isListField();!m&&(!r.skipExist||v===void 0)&&n.updateStore(Qn(n.store,d,ot(h)[0].value))}}}})},l;r.entities?l=r.entities:r.namePathList?(l=[],r.namePathList.forEach(function(s){var c=a.get(s);if(c){var u;(u=l).push.apply(u,ot(ot(c).map(function(d){return d.entity})))}})):l=o,i(l)}),te(this,"resetFields",function(r){n.warningUnhooked();var a=n.store;if(!r){n.updateStore(Ca(n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(a,null,{type:"reset"}),n.notifyWatch();return}var o=r.map(Xt);o.forEach(function(i){var l=n.getInitialValue(i);n.updateStore(Qn(n.store,i,l))}),n.resetWithFieldInitialValue({namePathList:o}),n.notifyObservers(a,o,{type:"reset"}),n.notifyWatch(o)}),te(this,"setFields",function(r){n.warningUnhooked();var a=n.store,o=[];r.forEach(function(i){var l=i.name,s=gr(i,gF),c=Xt(l);o.push(c),"value"in s&&n.updateStore(Qn(n.store,c,s.value)),n.notifyObservers(a,[c],{type:"setField",data:i})}),n.notifyWatch(o)}),te(this,"getFields",function(){var r=n.getFieldEntities(!0),a=r.map(function(o){var i=o.getNamePath(),l=o.getMeta(),s=ve(ve({},l),{},{name:i,value:n.getFieldValue(i)});return Object.defineProperty(s,"originRCField",{value:!0}),s});return a}),te(this,"initEntityValue",function(r){var a=r.props.initialValue;if(a!==void 0){var o=r.getNamePath(),i=fr(n.store,o);i===void 0&&n.updateStore(Qn(n.store,o,a))}}),te(this,"isMergedPreserve",function(r){var a=r!==void 0?r:n.preserve;return a??!0}),te(this,"registerField",function(r){n.fieldEntities.push(r);var a=r.getNamePath();if(n.notifyWatch([a]),r.props.initialValue!==void 0){var o=n.store;n.resetWithFieldInitialValue({entities:[r],skipExist:!0}),n.notifyObservers(o,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(i,l){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter(function(d){return d!==r}),!n.isMergedPreserve(l)&&(!i||s.length>1)){var c=i?void 0:n.getInitialValue(a);if(a.length&&n.getFieldValue(a)!==c&&n.fieldEntities.every(function(d){return!v0(d.getNamePath(),a)})){var u=n.store;n.updateStore(Qn(u,a,c,!0)),n.notifyObservers(u,[a],{type:"remove"}),n.triggerDependenciesUpdate(u,a)}}n.notifyWatch([a])}}),te(this,"dispatch",function(r){switch(r.type){case"updateValue":{var a=r.namePath,o=r.value;n.updateValue(a,o);break}case"validateField":{var i=r.namePath,l=r.triggerName;n.validateFields([i],{triggerName:l});break}}}),te(this,"notifyObservers",function(r,a,o){if(n.subscribable){var i=ve(ve({},o),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach(function(l){var s=l.onStoreChange;s(r,a,i)})}else n.forceRootUpdate()}),te(this,"triggerDependenciesUpdate",function(r,a){var o=n.getDependencyChildrenFields(a);return o.length&&n.validateFields(o),n.notifyObservers(r,o,{type:"dependenciesUpdate",relatedFields:[a].concat(ot(o))}),o}),te(this,"updateValue",function(r,a){var o=Xt(r),i=n.store;n.updateStore(Qn(n.store,o,a)),n.notifyObservers(i,[o],{type:"valueUpdate",source:"internal"}),n.notifyWatch([o]);var l=n.triggerDependenciesUpdate(i,o),s=n.callbacks.onValuesChange;if(s){var c=Gm(n.store,[o]);s(c,n.getFieldsValue())}n.triggerOnFieldsChange([o].concat(ot(l)))}),te(this,"setFieldsValue",function(r){n.warningUnhooked();var a=n.store;if(r){var o=Ca(n.store,r);n.updateStore(o)}n.notifyObservers(a,null,{type:"valueUpdate",source:"external"}),n.notifyWatch()}),te(this,"setFieldValue",function(r,a){n.setFields([{name:r,value:a,errors:[],warnings:[]}])}),te(this,"getDependencyChildrenFields",function(r){var a=new Set,o=[],i=new ba;n.getFieldEntities().forEach(function(s){var c=s.props.dependencies;(c||[]).forEach(function(u){var d=Xt(u);i.update(d,function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return g.add(s),g})})});var l=function s(c){var u=i.get(c)||new Set;u.forEach(function(d){if(!a.has(d)){a.add(d);var g=d.getNamePath();d.isFieldDirty()&&g.length&&(o.push(g),s(g))}})};return l(r),o}),te(this,"triggerOnFieldsChange",function(r,a){var o=n.callbacks.onFieldsChange;if(o){var i=n.getFields();if(a){var l=new ba;a.forEach(function(c){var u=c.name,d=c.errors;l.set(u,d)}),i.forEach(function(c){c.errors=l.get(c.name)||c.errors})}var s=i.filter(function(c){var u=c.name;return Ia(r,u)});s.length&&o(s,i)}}),te(this,"validateFields",function(r,a){n.warningUnhooked();var o,i;Array.isArray(r)||typeof r=="string"||typeof a=="string"?(o=r,i=a):i=r;var l=!!o,s=l?o.map(Xt):[],c=[],u=String(Date.now()),d=new Set,g=i||{},h=g.recursive,v=g.dirty;n.getFieldEntities(!0).forEach(function(y){if(l||s.push(y.getNamePath()),!(!y.props.rules||!y.props.rules.length)&&!(v&&!y.isFieldDirty())){var x=y.getNamePath();if(d.add(x.join(u)),!l||Ia(s,x,h)){var w=y.validateRules(ve({validateMessages:ve(ve({},g0),n.validateMessages)},i));c.push(w.then(function(){return{name:x,errors:[],warnings:[]}}).catch(function(C){var S,E=[],k=[];return(S=C.forEach)===null||S===void 0||S.call(C,function($){var O=$.rule.warningOnly,D=$.errors;O?k.push.apply(k,ot(D)):E.push.apply(E,ot(D))}),E.length?Promise.reject({name:x,errors:E,warnings:k}):{name:x,errors:E,warnings:k}}))}}});var m=pF(c);n.lastValidatePromise=m,m.catch(function(y){return y}).then(function(y){var x=y.map(function(w){var C=w.name;return C});n.notifyObservers(n.store,x,{type:"validateFinish"}),n.triggerOnFieldsChange(x,y)});var p=m.then(function(){return n.lastValidatePromise===m?Promise.resolve(n.getFieldsValue(s)):Promise.reject([])}).catch(function(y){var x=y.filter(function(w){return w&&w.errors.length});return Promise.reject({values:n.getFieldsValue(s),errorFields:x,outOfDate:n.lastValidatePromise!==m})});p.catch(function(y){return y});var b=s.filter(function(y){return d.has(y.join(u))});return n.triggerOnFieldsChange(b),p}),te(this,"submit",function(){n.warningUnhooked(),n.validateFields().then(function(r){var a=n.callbacks.onFinish;if(a)try{a(r)}catch(o){console.error(o)}}).catch(function(r){var a=n.callbacks.onFinishFailed;a&&a(r)})}),this.forceRootUpdate=t});function b0(e){var t=f.useRef(),n=f.useState({}),r=it(n,2),a=r[1];if(!t.current)if(e)t.current=e;else{var o=function(){a({})},i=new vF(o);t.current=i.getForm()}return[t.current]}var Jc=f.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),hF=function(e){var t=e.validateMessages,n=e.onFormChange,r=e.onFormFinish,a=e.children,o=f.useContext(Jc),i=f.useRef({});return f.createElement(Jc.Provider,{value:ve(ve({},o),{},{validateMessages:ve(ve({},o.validateMessages),t),triggerFormChange:function(l,s){n&&n(l,{changedFields:s,forms:i.current}),o.triggerFormChange(l,s)},triggerFormFinish:function(l,s){r&&r(l,{values:s,forms:i.current}),o.triggerFormFinish(l,s)},registerForm:function(l,s){l&&(i.current=ve(ve({},i.current),{},te({},l,s))),o.registerForm(l,s)},unregisterForm:function(l){var s=ve({},i.current);delete s[l],i.current=s,o.unregisterForm(l)}})},a)},yF=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],bF=function(e,t){var n=e.name,r=e.initialValues,a=e.fields,o=e.form,i=e.preserve,l=e.children,s=e.component,c=s===void 0?"form":s,u=e.validateMessages,d=e.validateTrigger,g=d===void 0?"onChange":d,h=e.onValuesChange,v=e.onFieldsChange,m=e.onFinish,p=e.onFinishFailed,b=e.clearOnDestroy,y=gr(e,yF),x=f.useRef(null),w=f.useContext(Jc),C=b0(o),S=it(C,1),E=S[0],k=E.getInternalHooks(Yr),$=k.useSubscribe,O=k.setInitialValues,D=k.setCallbacks,P=k.setValidateMessages,A=k.setPreserve,N=k.destroyForm;f.useImperativeHandle(t,function(){return ve(ve({},E),{},{nativeElement:x.current})}),f.useEffect(function(){return w.registerForm(n,E),function(){w.unregisterForm(n)}},[w,E,n]),P(ve(ve({},w.validateMessages),u)),D({onValuesChange:h,onFieldsChange:function(L){if(w.triggerFormChange(n,L),v){for(var j=arguments.length,z=new Array(j>1?j-1:0),K=1;K<j;K++)z[K-1]=arguments[K];v.apply(void 0,[L].concat(z))}},onFinish:function(L){w.triggerFormFinish(n,L),m&&m(L)},onFinishFailed:p}),A(i);var I=f.useRef(null);O(r,!I.current),I.current||(I.current=!0),f.useEffect(function(){return function(){return N(b)}},[]);var M,F=typeof l=="function";if(F){var R=E.getFieldsValue(!0);M=l(R,E)}else M=l;$(!F);var T=f.useRef();f.useEffect(function(){uF(T.current||[],a||[])||E.setFields(a||[]),T.current=a},[a,E]);var _=f.useMemo(function(){return ve(ve({},E),{},{validateTrigger:g})},[E,g]),B=f.createElement(el.Provider,{value:null},f.createElement(Fa.Provider,{value:_},M));return c===!1?B:f.createElement(c,hn({},y,{ref:x,onSubmit:function(L){L.preventDefault(),L.stopPropagation(),E.submit()},onReset:function(L){var j;L.preventDefault(),E.resetFields(),(j=y.onReset)===null||j===void 0||j.call(y,L)}}),B)};function Jm(e){try{return JSON.stringify(e)}catch{return Math.random()}}function xF(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],a=t[1],o=a===void 0?{}:a,i=OM(o)?{form:o}:o,l=i.form,s=ft(),c=it(s,2),u=c[0],d=c[1],g=zt(function(){return Jm(u)},[u]),h=St(g);h.current=g;var v=En(Fa),m=l||v,p=m&&m._init,b=Xt(r),y=St(b);return y.current=b,mt(function(){if(p){var x=m.getFieldsValue,w=m.getInternalHooks,C=w(Yr),S=C.registerWatch,E=function(O,D){var P=i.preserve?D:O;return typeof r=="function"?r(P):fr(P,y.current)},k=S(function(O,D){var P=E(O,D),A=Jm(P);h.current!==A&&(h.current=A,d(P))}),$=E(x(),x(!0));return u!==$&&d($),k}},[p]),u}var CF=f.forwardRef(bF),Yo=CF;Yo.FormProvider=hF;Yo.Field=h0;Yo.List=mF;Yo.useForm=b0;Yo.useWatch=xF;const wF=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
|
|
412
412
|
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
|
|
413
|
-
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),
|
|
413
|
+
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),x0=new jn("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}});new jn("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}});new jn("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}});new jn("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}});new jn("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}});new jn("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}});new jn("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}});new jn("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}});new jn("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}});new jn("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}});new jn("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}});new jn("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}});const SF=e=>{const{componentCls:t}=e,n=`${t}-show-help`,r=`${t}-show-help-item`;return{[n]:{transition:`opacity ${e.motionDurationFast} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:"hidden",transition:`height ${e.motionDurationFast} ${e.motionEaseInOut},
|
|
414
414
|
opacity ${e.motionDurationFast} ${e.motionEaseInOut},
|
|
415
|
-
transform ${e.motionDurationFast} ${e.motionEaseInOut} !important`,[`&${r}-appear, &${r}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${r}-leave-active`]:{transform:"translateY(-5px)"}}}}}
|
|
416
|
-
&-hidden${a}-row`]:{display:"none"},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:e.lineHeight,whiteSpace:"unset","> label":{verticalAlign:"middle",textWrap:"balance"}},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:
|
|
417
|
-
${t}-col-xl-24${n}-label`]:
|
|
418
|
-
> ${n}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${n}-label`]:{flex:"none"},[`${t}-text`]:{display:"inline-block"},[`${n}-has-feedback`]:{display:"inline-block"}}}}},
|
|
415
|
+
transform ${e.motionDurationFast} ${e.motionEaseInOut} !important`,[`&${r}-appear, &${r}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${r}-leave-active`]:{transform:"translateY(-5px)"}}}}},$F=e=>({legend:{display:"block",width:"100%",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${Nr(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${Nr(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:"block",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),Qm=(e,t)=>{const{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},EF=e=>{const{componentCls:t}=e;return{[e.componentCls]:Object.assign(Object.assign(Object.assign({},Gu(e)),$F(e)),{[`${t}-text`]:{display:"inline-block",paddingInlineEnd:e.paddingSM},"&-small":Object.assign({},Qm(e,e.controlHeightSM)),"&-large":Object.assign({},Qm(e,e.controlHeightLG))})}},kF=e=>{const{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:a,labelRequiredMarkColor:o,labelColor:i,labelFontSize:l,labelHeight:s,labelColonMarginInlineStart:c,labelColonMarginInlineEnd:u,itemMarginBottom:d}=e;return{[t]:Object.assign(Object.assign({},Gu(e)),{marginBottom:d,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
|
|
416
|
+
&-hidden${a}-row`]:{display:"none"},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:e.lineHeight,whiteSpace:"unset","> label":{verticalAlign:"middle",textWrap:"balance"}},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:s,color:i,fontSize:l,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:"top"},[`&${t}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:e.marginXXS,color:o,fontSize:e.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${t}-required-mark-hidden, &${t}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${t}-optional`]:{display:"inline-block",marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`&${t}-required-mark-hidden`]:{display:"none"}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:e.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:c,marginInlineEnd:u},[`&${t}-no-colon::after`]:{content:'"\\a0"'}}},[`${t}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:e.controlHeight,"&-content":{flex:"auto",maxWidth:"100%",[`&:has(> ${a}-switch:only-child, > ${a}-rate:only-child)`]:{display:"flex",alignItems:"center"}}}},[t]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:"auto",opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:"center",visibility:"visible",animationName:x0,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:"none","&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},Vr=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),IF=e=>{const{antCls:t,formItemCls:n}=e;return{[`${n}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:"1 1 0",minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:"unset"}},[`${t}-col-24${n}-label,
|
|
417
|
+
${t}-col-xl-24${n}-label`]:Vr(e)}}},OF=e=>{const{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:"flex",flexWrap:"wrap",[`${n}-inline`]:{flex:"none",marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:"nowrap"},[`> ${n}-label,
|
|
418
|
+
> ${n}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${n}-label`]:{flex:"none"},[`${t}-text`]:{display:"inline-block"},[`${n}-has-feedback`]:{display:"inline-block"}}}}},NF=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:Vr(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:"wrap",[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},DF=e=>{const{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:"column"},[`${n}-label > label`]:{height:"auto"},[`${n}-control`]:{width:"100%"},[`${n}-label,
|
|
419
419
|
${r}-col-24${n}-label,
|
|
420
|
-
${r}-col-xl-24${n}-label`]:
|
|
420
|
+
${r}-col-xl-24${n}-label`]:Vr(e)},[`@media (max-width: ${Nr(e.screenXSMax)})`]:[NF(e),{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:Vr(e)}}}],[`@media (max-width: ${Nr(e.screenSMMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:Vr(e)}}},[`@media (max-width: ${Nr(e.screenMDMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:Vr(e)}}},[`@media (max-width: ${Nr(e.screenLGMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:Vr(e)}}}}},MF=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),FF=(e,t)=>Fl(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t});mh("Form",(e,{rootPrefixCls:t})=>{const n=FF(e,t);return[EF(n),kF(n),SF(n),IF(n),OF(n),DF(n),wF(n),x0]},MF,{order:-1e3});const PF=tn.create({timeout:15e3});PF.interceptors.response.use(e=>e.data&&e.data.success===!1?(Kt.error(e.data.errorMsg||"\u8BF7\u6C42\u5931\u8D25"),Promise.reject(e.data)):e,e=>{var t,n;if(((t=e==null?void 0:e.response)==null?void 0:t.status)===401){const r=new Error("Unauthorized");return r.isAuthError=!0,r.origin=e,Promise.reject(r)}if(((n=e==null?void 0:e.response)==null?void 0:n.status)===500){const r=new Error("Server Error");return r.isAuthError=!0,r.origin=e,Promise.reject(r)}return Promise.reject(e)});/**
|
|
421
421
|
* @license lucide-react v0.456.0 - ISC
|
|
422
422
|
*
|
|
423
423
|
* This source code is licensed under the ISC license.
|
|
424
424
|
* See the LICENSE file in the root directory of this source tree.
|
|
425
|
-
*/const
|
|
425
|
+
*/const RF=vr("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
426
426
|
* @license lucide-react v0.456.0 - ISC
|
|
427
427
|
*
|
|
428
428
|
* This source code is licensed under the ISC license.
|
|
429
429
|
* See the LICENSE file in the root directory of this source tree.
|
|
430
|
-
*/const
|
|
430
|
+
*/const AF=vr("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
431
431
|
* @license lucide-react v0.456.0 - ISC
|
|
432
432
|
*
|
|
433
433
|
* This source code is licensed under the ISC license.
|
|
434
434
|
* See the LICENSE file in the root directory of this source tree.
|
|
435
|
-
*/const
|
|
435
|
+
*/const TF=vr("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
436
436
|
* @license lucide-react v0.456.0 - ISC
|
|
437
437
|
*
|
|
438
438
|
* This source code is licensed under the ISC license.
|
|
439
439
|
* See the LICENSE file in the root directory of this source tree.
|
|
440
|
-
*/const
|
|
440
|
+
*/const Is=vr("FolderUp",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m9 13 3-3 3 3",key:"1pxg3c"}]]);/**
|
|
441
441
|
* @license lucide-react v0.456.0 - ISC
|
|
442
442
|
*
|
|
443
443
|
* This source code is licensed under the ISC license.
|
|
444
444
|
* See the LICENSE file in the root directory of this source tree.
|
|
445
|
-
*/const
|
|
445
|
+
*/const jF=vr("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
446
446
|
* @license lucide-react v0.456.0 - ISC
|
|
447
447
|
*
|
|
448
448
|
* This source code is licensed under the ISC license.
|
|
449
449
|
* See the LICENSE file in the root directory of this source tree.
|
|
450
|
-
*/const
|
|
450
|
+
*/const _F=vr("OctagonX",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
451
451
|
* @license lucide-react v0.456.0 - ISC
|
|
452
452
|
*
|
|
453
453
|
* This source code is licensed under the ISC license.
|
|
454
454
|
* See the LICENSE file in the root directory of this source tree.
|
|
455
|
-
*/const
|
|
455
|
+
*/const BF=vr("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
|
|
456
456
|
* @license lucide-react v0.456.0 - ISC
|
|
457
457
|
*
|
|
458
458
|
* This source code is licensed under the ISC license.
|
|
459
459
|
* See the LICENSE file in the root directory of this source tree.
|
|
460
|
-
*/const
|
|
460
|
+
*/const C0=vr("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
461
461
|
* @license lucide-react v0.456.0 - ISC
|
|
462
462
|
*
|
|
463
463
|
* This source code is licensed under the ISC license.
|
|
464
464
|
* See the LICENSE file in the root directory of this source tree.
|
|
465
|
-
*/const
|
|
465
|
+
*/const LF=vr("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
466
466
|
* @license lucide-react v0.456.0 - ISC
|
|
467
467
|
*
|
|
468
468
|
* This source code is licensed under the ISC license.
|
|
469
469
|
* See the LICENSE file in the root directory of this source tree.
|
|
470
|
-
*/const BF=gr("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),Qm={actions:[{icon:B.jsx(qt,{type:"rag/folder",size:18}),name:"history",badgeCount:0}],switchs:[{label:"\u8054\u7F51\u641C\u7D22",name:"netSearch",type:"checkbox",defaultValue:!1,enabled:!0,icon:B.jsx(qt,{type:"rag/url",size:12})},{label:"\u63A8\u7406\u601D\u8003",name:"reasoning",type:"checkbox",defaultValue:!1,enabled:!0,icon:B.jsx(qt,{type:"rag/think",size:12})}]};function LF({isActive:e,isNew:t,isDisabled:n,data:r,eventsEmit:a,styles:o={},assistantList:i=[]}){const[s,l]=dt(!1),c=(o==null?void 0:o.colors)||{},u=Lt(()=>{const p=r==null?void 0:r.configId;if(!p||!i||i.length===0)return"\u672A\u9009\u62E9\u52A9\u624B";const b=i.find(y=>String(y==null?void 0:y.id)===String(p));if(!b)return"\u672A\u9009\u62E9\u52A9\u624B";if(b!=null&&b.name)return b.name;try{const y=typeof b.configJson=="string"?JSON.parse(b.configJson):b.configJson;return(y==null?void 0:y.config_name)||"\u672A\u9009\u62E9\u52A9\u624B"}catch{return"\u672A\u9009\u62E9\u52A9\u624B"}},[i,r==null?void 0:r.configId]),d=[{key:"rename",icon:B.jsx(TF,{size:12}),label:"\u91CD\u547D\u540D",onClick:p=>{p.domEvent.stopPropagation(),a&&a("conversations:rename_icon_clicked",r)}},{key:"delete",icon:B.jsx(BF,{size:12}),label:"\u5220\u9664",danger:!0,onClick:p=>{p.domEvent.stopPropagation(),a&&a("conversations:delete_icon_clicked",r)}}],g=e?c.activeItemBg||"#f0f4ff":s?c.itemHoverBg||"#f5f7fa":c.itemBg||"transparent",h=e?c.activeItemText||c.primary||"#0122ff":c.itemText||"#333",v=e?c.activeItemBorder||c.primary||"#0122ff":"transparent",m=p=>{const b=Cn(),y=Cn(p);return b.isSame(y,"day")?y.format("HH:mm"):y.format("MM-DD HH:mm")};return B.jsxs("div",{className:"flex relative items-center justify-between mb-2 px-4 py-3 rounded-md transition-colors cursor-pointer select-none",onClick:()=>!n&&a&&a("conversation:item_click",r),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),style:{minHeight:48,background:g,color:h,border:`1px solid ${v}`,...o.item,opacity:n?.5:1},children:[B.jsxs("div",{className:"flex flex-col gap-y-2 flex-1 min-w-0",children:[B.jsx("span",{className:"truncate text-sm max-w-[160px] font-medium",title:r.label||"\u672A\u547D\u540D\u4F1A\u8BDD",style:{color:h,fontSize:"14px",lineHeight:"1.4"},children:r.label||"\u672A\u547D\u540D\u4F1A\u8BDD"}),B.jsxs("div",{className:"flex items-center justify-between gap-2",children:[B.jsx("span",{className:"text-xs truncate flex-1",style:{color:e?c.activeItemTextSecondary||"#666":c.itemTextSecondary||"#666",fontSize:"12px",lineHeight:"1.3"},children:u}),r.gmtModified&&B.jsx("span",{className:"text-xs flex-shrink-0",style:{color:e?c.activeItemTextSecondary||"#999":c.itemTextSecondary||"#999",fontSize:"12px",lineHeight:"1.3"},children:m(r.gmtModified)})]})]}),!n&&s&&!t&&B.jsx("div",{className:"absolute top-2 right-3",children:B.jsx(Yg,{menu:{items:d},trigger:["click"],placement:"bottomRight",children:B.jsx(PF,{size:16,className:"text-gray-600 hover:text-gray-800",style:{cursor:"pointer",color:e?c.activeItemTextSecondary||"#999":c.itemTextSecondary||"#999"},onClick:p=>p.stopPropagation()})})})]})}function zF(e,t=[{label:"\u5F53\u5929",dayPeriod:1}]){const n=new Date,r={other:[]};return e.forEach(a=>{const o=new Date(a.gmtModified),i=Math.floor((+n-+o)/(1e3*60*60*24));let s=!1;for(const l of t)if(i<=l.dayPeriod){r[l.label]||(r[l.label]=[]),r[l.label].push(a),s=!0;break}s||r.other.push(a)}),r}function HF(e){const{data:t,activedItem:n,onChange:r,onDelete:a,sortRules:o=[{label:"\u5F53\u5929",dayPeriod:1}],eventsEmit:i,assistantList:s,height:l=400,styles:c={}}=e,u=t.map(x=>x.sessionId+"-"+x.gmtModified).join(","),d=Lt(()=>{const x=o.length>0?o:[{label:"\u5F53\u5929",dayPeriod:1}],w=zF(t,x),C=x.every(E=>!w[E.label]||w[E.label].length===0),S=[];return x.forEach(E=>{w[E.label]&&w[E.label].length>0&&(S.push({type:"group",label:E.label}),w[E.label].forEach(k=>S.push({type:"item",data:k})))}),w.other.length>0&&!C&&(S.push({type:"group",label:"\u5176\u4ED6"}),w.other.forEach(E=>S.push({type:"item",data:E}))),C&&w.other.length>0&&w.other.forEach(E=>S.push({type:"item",data:E})),S},[t,o,u]),g=56,h=14,v=x=>d[x].type==="group"?32:g+h,m=wt(null),p=Lt(()=>d.findIndex(x=>{var w;return x.type==="item"&&((w=x.data)==null?void 0:w.sessionId)===n}),[d,n]),b=Lt(()=>d.findIndex(x=>x.type==="item"),[d]);if(ft(()=>{p>-1&&p===b&&m.current&&m.current.scrollToItem(p,"start")},[p,b,d.length]),ft(()=>{m.current&&m.current.resetAfterIndex(0,!0)},[u]),d.length===0)return B.jsx("div",{className:"text-center text-zinc-400 py-8",children:"\u6682\u65E0\u4F1A\u8BDD"});const y=(c==null?void 0:c.colors)||{};return B.jsx(M0,{flipKey:u,spring:{stiffness:180,damping:18},children:B.jsx(z2,{ref:m,height:l,width:"100%",itemCount:d.length,itemSize:v,itemKey:x=>{const w=d[x];return w.type==="item"?w.data.sessionId:`group-${w.label}`},style:{overflowX:"hidden"},children:({index:x,style:w})=>{const C=d[x];return C.type==="group"?B.jsx("div",{style:{...w,background:y.groupBg||"white",zIndex:1},className:"pt-2 pb-1 px-[28px] py-[2px] text-xs text-gray-400",children:C.label}):B.jsx(F0,{flipId:C.data.sessionId,children:B.jsx("div",{style:w,className:"px-[12px] py-[2px]",children:B.jsx(LF,{isActive:n===C.data.sessionId,isDisabled:!1,isNew:C.data.isNew,data:C.data,eventsEmit:i,assistantList:s,styles:c})})},C.data.sessionId)}})})}const VF=({value:e,eventsEmit:t,setSearch:n,style:r,styles:a={}})=>{const o=a.colors||{},i=a.radius||"12px",s=o.border||"#e5e7eb",l=o.primary||"#2563eb",c=a.headerBg||o.sidebarBg||o.background||"#fff",[u,d]=be.useState(!1);return B.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 sticky top-0 z-10 min-w-0",style:{...r,background:c,borderTopLeftRadius:i,borderTopRightRadius:i},children:[B.jsx("button",{className:"border-none flex items-center justify-center",onClick:()=>{d(!1),t&&t("conversation:create")},title:"\u65B0\u5EFA\u4F1A\u8BDD",style:{height:42,borderRadius:"90px",background:l,color:o.buttonText||"#fff",fontWeight:600,boxShadow:a.shadow||"0 2px 8px 0 rgba(0,0,0,0.04)",padding:u?"0 0":"0 14px",minWidth:u?0:180,width:u?0:void 0,opacity:u?0:1,overflow:"hidden",flexShrink:0,transition:"width .22s ease, min-width .22s ease, padding .22s ease, opacity .18s ease"},children:B.jsxs("div",{className:"flex items-center gap-2",children:[B.jsx(Pp,{size:18}),B.jsx("span",{className:"text-sm",children:"\u65B0\u5EFA\u5BF9\u8BDD"})]})}),u?B.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[B.jsx("input",{className:"flex-1 px-3 py-2 text-sm transition-all",placeholder:"\u641C\u7D22\u4F1A\u8BDD...",value:e,onChange:g=>n(g.target.value),onBlur:()=>d(!1),onKeyDown:g=>{g.key==="Enter"&&d(!1)},style:{minWidth:0,width:"100%",maxWidth:"100%",borderRadius:i,background:o.inputBg||"#f4f4f5",border:`1px solid ${s}`,color:o.text||"#222",outline:"none"}}),B.jsx("button",{className:"flex items-center justify-center transition-colors",style:{width:36,height:36,borderRadius:"90px",border:`1px solid ${s}`,color:o.text||"#222",flexShrink:0},onClick:()=>d(!1),title:"\u6536\u8D77\u641C\u7D22",children:B.jsx(su,{size:16})})]}):B.jsx("button",{className:"ml-auto flex items-center justify-center transition-colors",style:{width:36,height:36,borderRadius:"90px",border:`1px solid ${s}`,color:l,flexShrink:0},onClick:()=>d(!0),title:"\u641C\u7D22",children:B.jsx(_F,{size:18})})]})};function KF(e){const{data:t,sortRules:n,activedItem:r,eventsEmit:a,assistantList:o,styles:i={}}=e,[s,l]=dt(""),c=Lt(()=>s?t.filter(x=>(x.label||"\u672A\u547D\u540D\u4F1A\u8BDD").toLowerCase().includes(s.toLowerCase())):t,[t,s]),u=Lt(()=>[...c].sort((x,w)=>new Date(w.gmtModified).getTime()-new Date(x.gmtModified).getTime()),[c]),d=wt(null),[g,h]=dt(400);ft(()=>{function x(){d.current&&h(d.current.clientHeight)}return x(),window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[]);const v=(i==null?void 0:i.colors)||{};i!=null&&i.radius;const m=(i==null?void 0:i.shadow)||"0 4px 24px 0 rgba(0,0,0,0.06)",p=v.border||"#e5e7eb",b=v.sidebarBg||v.background||"#EAEEFF",y=v.text||"#222";return B.jsxs("div",{className:"h-full flex flex-col overflow-y-hidden",style:{background:b,color:y,boxShadow:m,border:`1px solid ${p}`,...i.container},children:[B.jsx(VF,{value:s,setSearch:l,eventsEmit:a,style:i.header,styles:i}),B.jsxs("div",{className:"flex-1 min-h-0 relative",ref:d,style:i.list,children:[B.jsx(HF,{eventsEmit:a,data:u,assistantList:o,activedItem:r,sortRules:n,height:g,styles:i}),B.jsx("div",{className:"pointer-events-none absolute left-0 right-0 top-0 h-3 z-20",style:{background:`linear-gradient(to bottom, ${b}cc, transparent)`}})]})]})}const WF=(e,t)=>{let n=e&&e.replace(/<think>[\s\S]*?<\/think>/g,"");n=n.replace(/\[retrive-tag[^\]]*\][\s\S]*?\[\/retrive-tag\]/g,""),n=n.replace(/<a\s+[^>]*>(.*?)<\/a>/g,""),console.log("_content",n);const r=new op(t.currentTarget||t.target,{text:()=>n});try{r.on("success",()=>{Vt.success("\u6587\u672C\u590D\u5236\u6210\u529F",2),r.destroy()}),r.on("error",a=>{Vt.error("\u590D\u5236\u5931\u8D25",2),r.destroy()}),r.onClick(t)}catch(a){r.destroy(),Vt.error("\u590D\u5236\u5931\u8D25: "+a,2)}},Zm=e=>{const t=e.toLowerCase().split(".").pop()||"";return/^(jpg|jpeg|png|gif|bmp|webp)$/.test(t)?"image":/^(doc|docx)$/.test(t)?"word":/^(xls|xlsx|csv)$/.test(t)?"excel":/^(ppt|pptx)$/.test(t)?"ppt":t==="pdf"?"pdf":/^(txt|json|md|markdown)$/.test(t)?"text":/^(zip|rar|7z)$/.test(t)?"archive":"file"};function qF(e){const t=[];for(const n of e){if(n.query){const r=n.query.queryId||n.query.id||n.queryId||n.id||Zr(32);t.push({istype:"user",content:n.query.content,time:n.query.gmtCreate,queryId:r,clientSideId:r+"-user",...n.query})}if(n.reply){const r=n.reply.queryId||n.reply.id||n.queryId||n.id||Zr(32);t.push({istype:"ai",content:n.reply.content,isDefault:n.reply.isDefault,time:n.time||n.gmtCreate||Date.now(),queryId:r,clientSideId:r+"-ai",...n.reply})}}return t}const ep=async(e,t,n)=>{try{kn.post(`${e.url}/qa/feedback`,t,{headers:{Authorization:e.token,"X-CSRF-TOKEN-IN":e.CSRFToken||""}}).then(r=>{r.data.success&&n&&n()})}catch(r){console.log("error",r)}},Il=async(e,t,n)=>{try{kn.delete(`${e.url}/qa/feedback/cancel?queryId=${t.queryId}`,{headers:{Authorization:e.token,"X-CSRF-TOKEN-IN":e.CSRFToken||""}}).then(r=>{r.data.success&&n&&n()})}catch(r){console.log("error",r)}},UF=(e,t)=>{try{kn.get(`${e.url}/qa/feedback/que/list`,{headers:{Authorization:e.token}}).then(n=>{n.data.success&&t&&t(n.data.data)})}catch(n){console.log("error",n)}},YF=async(e,t,n)=>{try{kn.post(`${e.url}/qa/dialogue/reName`,t,{headers:{Authorization:e.token,"X-CSRF-TOKEN-IN":e.CSRFToken||""}}).then(r=>{r.data.success?n&&n(r):Vt.error("\u7F16\u8F91\u540D\u5B57\u5931\u8D25")}).catch(r=>{var a,o;(o=(a=r==null?void 0:r.response)==null?void 0:a.data)!=null&&o.errorMsg&&Vt.error(r.response.data.errorMsg)})}catch(r){console.log("error",r)}},GF=async(e,t,n)=>{try{kn.delete(`${e.url}/qa/dialogue/delete?sessionId=${t.sessionId}`,{headers:{Authorization:e.token,"X-CSRF-TOKEN-IN":e.CSRFToken||""}}).then(r=>{r.data.success&&n&&n(r.data)})}catch(r){console.log("error",r)}},XF=async(e,t,n)=>{console.log("[DEBUG] handleCreateConversation \u8BF7\u6C42",{url:e.url,token:e.token,data:t});try{kn.post(`${e.url}/qa/dialogue/create`,t,{headers:{Authorization:e.token,"X-CSRF-TOKEN-IN":e.CSRFToken||""}}).then(r=>{r.data.success?n&&n(r.data):Vt.error(r.data.errorMsg||"\u521B\u5EFA\u4F1A\u8BDD\u5931\u8D25")}).catch(r=>{var a,o;(o=(a=r==null?void 0:r.response)==null?void 0:a.data)!=null&&o.errorMsg&&Vt.error(r.response.data.errorMsg)})}catch(r){console.log("error",r)}},JF=async(e,t,n)=>{try{const{uid:r,queryId:a}=t;let o=`${e.url}/index/knowledgeBase/file/deleteByUid?uid=${r}`;a&&(o+=`&queryId=${a}`),kn.delete(o,{headers:{Authorization:e.token,"X-CSRF-TOKEN-IN":e.CSRFToken||""}}).then(i=>{i.data.success?n&&n(!0,i):n&&n(!1,i)}).catch(i=>{n&&n(!1,i)})}catch(r){n&&n(!1,r)}},QF=""+new URL("assets/defaultWeLogo.svg",import.meta.url).href,ZF="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAOkSURBVHgBxZRbTBxlFMd/c2EvXBbZLbsCVhcKaAyh2BKTWrX12RhNmxa1IVp98FEJVGNMY2KItSZtqGjaROMlaDSVxiZeqiRa0FBpIlSkhgK15WoLu7AL3V1md25+7CpUojzYB7/km5OZc+Z35pzz/wb+l3X7PotNL9tvd1yIc8OrYp9pWXZ6JXXdfLOtbdNa4fJazoZdu9xVNUE5petIVS9h/npRfkDKefg/A+OaJuUGvIz3DzD14R6uHv/WCmzbcuNlj7S+3z7+5Xepno7TLeJWWiv2n5zyTcEaT/TJlrfwljxCTm42lgHRmIHDqaIqIsTE43NS7FHCBXKkIzw4eGKkYcdnwmGvBspSy+DpxlrffXtqC6WeqM3+CZ3wnAZLOyXAlsXfOjU7D6EYHLw7zVKvgykcG+r98YmKjdG5BK3nw7w7YQuATdAJWR4IJ2UiswKoiC39+S0+4QjNL0NWgDU7y57ZVlLd2n+FO/Kd7BxxcPOpMKGrCSxNTNm2kVUZ2e1g+5YCxh4q4IW+cAactYTZLi6dxgqw4dUjj+UgfXpSJRAaY9Lt4dZAkoW5YWSXyKwo6ZYbhsFCciPe9hgHtDiB+kqe6huF6jknv2As9/Dj3mv2se4Yh5RhEr4SbD2FpMjomkZ0eoaunl5yxXwqKsspKwsiOVzYqST143k8Xe7gvaN17tHOTi0D/D6U3DqhO7oNNxOlU6heD0cOH2frg/dSU1ywMgRhRmMpvvjoG55t3I0RWWDvuST9iy5q64qtr2/LV9Ill/aNOsb9fnC48a+zGYzF6R/opefsGU59sl88d6V5tpagqekNFg2LgeHN3F/pJS9rET2l4v15Ruav1PHLEdsUJYpXcNjXKA54iCd11gf9ONUkLqeVtu4ciQUjwcCF3wjc4sUlJbhouyjOVek6O2kvT3kGV3e9P/uetlmhi4VpCsU0Wz5o5i6/kIehY8UjyHlLpVt8daKZc1d0qt3zaV2ex09LjYvnhsx3rj8pEq90N1QU+Q+9WJVgbzBPpFIzIrZNsYWVlYyVhJXVtFys6UHWf76O36NDu3nt0fbVJ0Wm6Sedomx5hzPCwYpJygvdkOMVQhbKFjrEFG2JRQjPTHH4Uh4HoptFfy2T5+9clt/qo6fS9MMYilqEL1dCyCQtQsnKhC51yUyCkBLz4qeT77Np3KCme/EvwJVndUcfl0qr6uzKwAb8biemqTCjmYS0RUKhM1zuep2TzZfIpFlefwDISXe8s31UTQAAAABJRU5ErkJggg==",e5=(e,t)=>{const n={...Qc.colors,...e};return`
|
|
470
|
+
*/const zF=vr("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),Zm={actions:[{icon:W(Ut,{type:"rag/folder",size:18}),name:"history",badgeCount:0}],switchs:[{label:"\u8054\u7F51\u641C\u7D22",name:"netSearch",type:"checkbox",defaultValue:!1,enabled:!0,icon:W(Ut,{type:"rag/url",size:12})},{label:"\u63A8\u7406\u601D\u8003",name:"reasoning",type:"checkbox",defaultValue:!1,enabled:!0,icon:W(Ut,{type:"rag/think",size:12})}]};function HF({isActive:e,isNew:t,isDisabled:n,data:r,eventsEmit:a,styles:o={},assistantList:i=[]}){const[l,s]=ft(!1),c=(o==null?void 0:o.colors)||{},u=zt(()=>{const p=r==null?void 0:r.configId;if(!p||!i||i.length===0)return"\u672A\u9009\u62E9\u52A9\u624B";const b=i.find(y=>String(y==null?void 0:y.id)===String(p));if(!b)return"\u672A\u9009\u62E9\u52A9\u624B";if(b!=null&&b.name)return b.name;try{const y=typeof b.configJson=="string"?JSON.parse(b.configJson):b.configJson;return(y==null?void 0:y.config_name)||"\u672A\u9009\u62E9\u52A9\u624B"}catch{return"\u672A\u9009\u62E9\u52A9\u624B"}},[i,r==null?void 0:r.configId]),d=[{key:"rename",icon:W(BF,{size:12}),label:"\u91CD\u547D\u540D",onClick:p=>{p.domEvent.stopPropagation(),a&&a("conversations:rename_icon_clicked",r)}},{key:"delete",icon:W(zF,{size:12}),label:"\u5220\u9664",danger:!0,onClick:p=>{p.domEvent.stopPropagation(),a&&a("conversations:delete_icon_clicked",r)}}],g=e?c.activeItemBg||"#f0f4ff":l?c.itemHoverBg||"#f5f7fa":c.itemBg||"transparent",h=e?c.activeItemText||c.primary||"#0122ff":c.itemText||"#333",v=e?c.activeItemBorder||c.primary||"#0122ff":"transparent",m=p=>{const b=wn(),y=wn(p);return b.isSame(y,"day")?y.format("HH:mm"):y.format("MM-DD HH:mm")};return Pe("div",{className:"flex relative items-center justify-between mb-2 px-4 py-3 rounded-md transition-colors cursor-pointer select-none",onClick:()=>!n&&a&&a("conversation:item_click",r),onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),style:{minHeight:48,background:g,color:h,border:`1px solid ${v}`,...o.item,opacity:n?.5:1},children:[Pe("div",{className:"flex flex-col gap-y-2 flex-1 min-w-0",children:[W("span",{className:"truncate text-sm max-w-[160px] font-medium",title:r.label||"\u672A\u547D\u540D\u4F1A\u8BDD",style:{color:h,fontSize:"14px",lineHeight:"1.4"},children:r.label||"\u672A\u547D\u540D\u4F1A\u8BDD"}),Pe("div",{className:"flex items-center justify-between gap-2",children:[W("span",{className:"text-xs truncate flex-1",style:{color:e?c.activeItemTextSecondary||"#666":c.itemTextSecondary||"#666",fontSize:"12px",lineHeight:"1.3"},children:u}),r.gmtModified&&W("span",{className:"text-xs flex-shrink-0",style:{color:e?c.activeItemTextSecondary||"#999":c.itemTextSecondary||"#999",fontSize:"12px",lineHeight:"1.3"},children:m(r.gmtModified)})]})]}),!n&&l&&!t&&W("div",{className:"absolute top-2 right-3",children:W(Gg,{menu:{items:d},trigger:["click"],placement:"bottomRight",children:W(AF,{size:16,className:"text-gray-600 hover:text-gray-800",style:{cursor:"pointer",color:e?c.activeItemTextSecondary||"#999":c.itemTextSecondary||"#999"},onClick:p=>p.stopPropagation()})})})]})}function VF(e,t=[{label:"\u5F53\u5929",dayPeriod:1}]){const n=new Date,r={other:[]};return e.forEach(a=>{const o=new Date(a.gmtModified),i=Math.floor((+n-+o)/(1e3*60*60*24));let l=!1;for(const s of t)if(i<=s.dayPeriod){r[s.label]||(r[s.label]=[]),r[s.label].push(a),l=!0;break}l||r.other.push(a)}),r}function KF(e){const{data:t,activedItem:n,onChange:r,onDelete:a,sortRules:o=[{label:"\u5F53\u5929",dayPeriod:1}],eventsEmit:i,assistantList:l,height:s=400,styles:c={}}=e,u=t.map(x=>x.sessionId+"-"+x.gmtModified).join(","),d=zt(()=>{const x=o.length>0?o:[{label:"\u5F53\u5929",dayPeriod:1}],w=VF(t,x),C=x.every(E=>!w[E.label]||w[E.label].length===0),S=[];return x.forEach(E=>{w[E.label]&&w[E.label].length>0&&(S.push({type:"group",label:E.label}),w[E.label].forEach(k=>S.push({type:"item",data:k})))}),w.other.length>0&&!C&&(S.push({type:"group",label:"\u5176\u4ED6"}),w.other.forEach(E=>S.push({type:"item",data:E}))),C&&w.other.length>0&&w.other.forEach(E=>S.push({type:"item",data:E})),S},[t,o,u]),g=56,h=14,v=x=>d[x].type==="group"?32:g+h,m=St(null),p=zt(()=>d.findIndex(x=>{var w;return x.type==="item"&&((w=x.data)==null?void 0:w.sessionId)===n}),[d,n]),b=zt(()=>d.findIndex(x=>x.type==="item"),[d]);if(mt(()=>{p>-1&&p===b&&m.current&&m.current.scrollToItem(p,"start")},[p,b,d.length]),mt(()=>{m.current&&m.current.resetAfterIndex(0,!0)},[u]),d.length===0)return W("div",{className:"text-center text-zinc-400 py-8",children:"\u6682\u65E0\u4F1A\u8BDD"});const y=(c==null?void 0:c.colors)||{};return W(P0,{flipKey:u,spring:{stiffness:180,damping:18},children:W(V2,{ref:m,height:s,width:"100%",itemCount:d.length,itemSize:v,itemKey:x=>{const w=d[x];return w.type==="item"?w.data.sessionId:`group-${w.label}`},style:{overflowX:"hidden"},children:({index:x,style:w})=>{const C=d[x];return C.type==="group"?W("div",{style:{...w,background:y.groupBg||"white",zIndex:1},className:"pt-2 pb-1 px-[28px] py-[2px] text-xs text-gray-400",children:C.label}):W(R0,{flipId:C.data.sessionId,children:W("div",{style:w,className:"px-[12px] py-[2px]",children:W(HF,{isActive:n===C.data.sessionId,isDisabled:!1,isNew:C.data.isNew,data:C.data,eventsEmit:i,assistantList:l,styles:c})})},C.data.sessionId)}})})}const WF=({value:e,eventsEmit:t,setSearch:n,style:r,styles:a={}})=>{const o=a.colors||{},i=a.radius||"12px",l=o.border||"#e5e7eb",s=o.primary||"#2563eb",c=a.headerBg||o.sidebarBg||o.background||"#fff",[u,d]=be.useState(!1);return Pe("div",{className:"flex items-center gap-2 px-4 py-3 sticky top-0 z-10 min-w-0",style:{...r,background:c,borderTopLeftRadius:i,borderTopRightRadius:i},children:[W("button",{className:"border-none flex items-center justify-center",onClick:()=>{d(!1),t&&t("conversation:create")},title:"\u65B0\u5EFA\u4F1A\u8BDD",style:{height:42,borderRadius:"90px",background:s,color:o.buttonText||"#fff",fontWeight:600,boxShadow:a.shadow||"0 2px 8px 0 rgba(0,0,0,0.04)",padding:u?"0 0":"0 14px",minWidth:u?0:180,width:u?0:void 0,opacity:u?0:1,overflow:"hidden",flexShrink:0,transition:"width .22s ease, min-width .22s ease, padding .22s ease, opacity .18s ease"},children:Pe("div",{className:"flex items-center gap-2",children:[W(Rp,{size:18}),W("span",{className:"text-sm",children:"\u65B0\u5EFA\u5BF9\u8BDD"})]})}),u?Pe("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[W("input",{className:"flex-1 px-3 py-2 text-sm transition-all",placeholder:"\u641C\u7D22\u4F1A\u8BDD...",value:e,onChange:g=>n(g.target.value),onBlur:()=>d(!1),onKeyDown:g=>{g.key==="Enter"&&d(!1)},style:{minWidth:0,width:"100%",maxWidth:"100%",borderRadius:i,background:o.inputBg||"#f4f4f5",border:`1px solid ${l}`,color:o.text||"#222",outline:"none"}}),W("button",{className:"flex items-center justify-center transition-colors",style:{width:36,height:36,borderRadius:"90px",border:`1px solid ${l}`,color:o.text||"#222",flexShrink:0},onClick:()=>d(!1),title:"\u6536\u8D77\u641C\u7D22",children:W(su,{size:16})})]}):W("button",{className:"ml-auto flex items-center justify-center transition-colors",style:{width:36,height:36,borderRadius:"90px",border:`1px solid ${l}`,color:s,flexShrink:0},onClick:()=>d(!0),title:"\u641C\u7D22",children:W(LF,{size:18})})]})};function qF(e){const{data:t,sortRules:n,activedItem:r,eventsEmit:a,assistantList:o,styles:i={}}=e,[l,s]=ft(""),c=zt(()=>l?t.filter(x=>(x.label||"\u672A\u547D\u540D\u4F1A\u8BDD").toLowerCase().includes(l.toLowerCase())):t,[t,l]),u=zt(()=>[...c].sort((x,w)=>new Date(w.gmtModified).getTime()-new Date(x.gmtModified).getTime()),[c]),d=St(null),[g,h]=ft(400);mt(()=>{function x(){d.current&&h(d.current.clientHeight)}return x(),window.addEventListener("resize",x),()=>window.removeEventListener("resize",x)},[]);const v=(i==null?void 0:i.colors)||{};i!=null&&i.radius;const m=(i==null?void 0:i.shadow)||"0 4px 24px 0 rgba(0,0,0,0.06)",p=v.border||"#e5e7eb",b=v.sidebarBg||v.background||"#EAEEFF",y=v.text||"#222";return Pe("div",{className:"h-full flex flex-col overflow-y-hidden",style:{background:b,color:y,boxShadow:m,border:`1px solid ${p}`,...i.container},children:[W(WF,{value:l,setSearch:s,eventsEmit:a,style:i.header,styles:i}),Pe("div",{className:"flex-1 min-h-0 relative",ref:d,style:i.list,children:[W(KF,{eventsEmit:a,data:u,assistantList:o,activedItem:r,sortRules:n,height:g,styles:i}),W("div",{className:"pointer-events-none absolute left-0 right-0 top-0 h-3 z-20",style:{background:`linear-gradient(to bottom, ${b}cc, transparent)`}})]})]})}const UF=(e,t)=>{let n=e&&e.replace(/<think>[\s\S]*?<\/think>/g,"");n=n.replace(/\[retrive-tag[^\]]*\][\s\S]*?\[\/retrive-tag\]/g,""),n=n.replace(/<a\s+[^>]*>(.*?)<\/a>/g,""),console.log("_content",n);const r=new ip(t.currentTarget||t.target,{text:()=>n});try{r.on("success",()=>{Kt.success("\u6587\u672C\u590D\u5236\u6210\u529F",2),r.destroy()}),r.on("error",a=>{Kt.error("\u590D\u5236\u5931\u8D25",2),r.destroy()}),r.onClick(t)}catch(a){r.destroy(),Kt.error("\u590D\u5236\u5931\u8D25: "+a,2)}},ep=e=>{const t=e.toLowerCase().split(".").pop()||"";return/^(jpg|jpeg|png|gif|bmp|webp)$/.test(t)?"image":/^(doc|docx)$/.test(t)?"word":/^(xls|xlsx|csv)$/.test(t)?"excel":/^(ppt|pptx)$/.test(t)?"ppt":t==="pdf"?"pdf":/^(txt|json|md|markdown)$/.test(t)?"text":/^(zip|rar|7z)$/.test(t)?"archive":"file"};function YF(e){const t=[];for(const n of e){if(n.query){const r=n.query.queryId||n.query.id||n.queryId||n.id||ea(32);t.push({istype:"user",content:n.query.content,time:n.query.gmtCreate,queryId:r,clientSideId:r+"-user",...n.query})}if(n.reply){const r=n.reply.queryId||n.reply.id||n.queryId||n.id||ea(32);t.push({istype:"ai",content:n.reply.content,isDefault:n.reply.isDefault,time:n.time||n.gmtCreate||Date.now(),queryId:r,clientSideId:r+"-ai",...n.reply})}}return t}const tp=async(e,t,n)=>{try{In.post(`${e.url}/qa/feedback`,t,{headers:{Authorization:e.token,"X-CSRF-TOKEN-IN":e.CSRFToken||""}}).then(r=>{r.data.success&&n&&n()})}catch(r){console.log("error",r)}},Os=async(e,t,n)=>{try{In.delete(`${e.url}/qa/feedback/cancel?queryId=${t.queryId}`,{headers:{Authorization:e.token,"X-CSRF-TOKEN-IN":e.CSRFToken||""}}).then(r=>{r.data.success&&n&&n()})}catch(r){console.log("error",r)}},GF=(e,t)=>{try{In.get(`${e.url}/qa/feedback/que/list`,{headers:{Authorization:e.token}}).then(n=>{n.data.success&&t&&t(n.data.data)})}catch(n){console.log("error",n)}},XF=async(e,t,n)=>{try{In.post(`${e.url}/qa/dialogue/reName`,t,{headers:{Authorization:e.token,"X-CSRF-TOKEN-IN":e.CSRFToken||""}}).then(r=>{r.data.success?n&&n(r):Kt.error("\u7F16\u8F91\u540D\u5B57\u5931\u8D25")}).catch(r=>{var a,o;(o=(a=r==null?void 0:r.response)==null?void 0:a.data)!=null&&o.errorMsg&&Kt.error(r.response.data.errorMsg)})}catch(r){console.log("error",r)}},JF=async(e,t,n)=>{try{In.delete(`${e.url}/qa/dialogue/delete?sessionId=${t.sessionId}`,{headers:{Authorization:e.token,"X-CSRF-TOKEN-IN":e.CSRFToken||""}}).then(r=>{r.data.success&&n&&n(r.data)})}catch(r){console.log("error",r)}},QF=async(e,t,n)=>{console.log("[DEBUG] handleCreateConversation \u8BF7\u6C42",{url:e.url,token:e.token,data:t});try{In.post(`${e.url}/qa/dialogue/create`,t,{headers:{Authorization:e.token,"X-CSRF-TOKEN-IN":e.CSRFToken||""}}).then(r=>{r.data.success?n&&n(r.data):Kt.error(r.data.errorMsg||"\u521B\u5EFA\u4F1A\u8BDD\u5931\u8D25")}).catch(r=>{var a,o;(o=(a=r==null?void 0:r.response)==null?void 0:a.data)!=null&&o.errorMsg&&Kt.error(r.response.data.errorMsg)})}catch(r){console.log("error",r)}},ZF=async(e,t,n)=>{try{const{uid:r,queryId:a}=t;let o=`${e.url}/index/knowledgeBase/file/deleteByUid?uid=${r}`;a&&(o+=`&queryId=${a}`),In.delete(o,{headers:{Authorization:e.token,"X-CSRF-TOKEN-IN":e.CSRFToken||""}}).then(i=>{i.data.success?n&&n(!0,i):n&&n(!1,i)}).catch(i=>{n&&n(!1,i)})}catch(r){n&&n(!1,r)}},e5=""+new URL("assets/defaultWeLogo.svg",import.meta.url).href,t5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAOkSURBVHgBxZRbTBxlFMd/c2EvXBbZLbsCVhcKaAyh2BKTWrX12RhNmxa1IVp98FEJVGNMY2KItSZtqGjaROMlaDSVxiZeqiRa0FBpIlSkhgK15WoLu7AL3V1md25+7CpUojzYB7/km5OZc+Z35pzz/wb+l3X7PotNL9tvd1yIc8OrYp9pWXZ6JXXdfLOtbdNa4fJazoZdu9xVNUE5petIVS9h/npRfkDKefg/A+OaJuUGvIz3DzD14R6uHv/WCmzbcuNlj7S+3z7+5Xepno7TLeJWWiv2n5zyTcEaT/TJlrfwljxCTm42lgHRmIHDqaIqIsTE43NS7FHCBXKkIzw4eGKkYcdnwmGvBspSy+DpxlrffXtqC6WeqM3+CZ3wnAZLOyXAlsXfOjU7D6EYHLw7zVKvgykcG+r98YmKjdG5BK3nw7w7YQuATdAJWR4IJ2UiswKoiC39+S0+4QjNL0NWgDU7y57ZVlLd2n+FO/Kd7BxxcPOpMKGrCSxNTNm2kVUZ2e1g+5YCxh4q4IW+cAactYTZLi6dxgqw4dUjj+UgfXpSJRAaY9Lt4dZAkoW5YWSXyKwo6ZYbhsFCciPe9hgHtDiB+kqe6huF6jknv2As9/Dj3mv2se4Yh5RhEr4SbD2FpMjomkZ0eoaunl5yxXwqKsspKwsiOVzYqST143k8Xe7gvaN17tHOTi0D/D6U3DqhO7oNNxOlU6heD0cOH2frg/dSU1ywMgRhRmMpvvjoG55t3I0RWWDvuST9iy5q64qtr2/LV9Ill/aNOsb9fnC48a+zGYzF6R/opefsGU59sl88d6V5tpagqekNFg2LgeHN3F/pJS9rET2l4v15Ruav1PHLEdsUJYpXcNjXKA54iCd11gf9ONUkLqeVtu4ciQUjwcCF3wjc4sUlJbhouyjOVek6O2kvT3kGV3e9P/uetlmhi4VpCsU0Wz5o5i6/kIehY8UjyHlLpVt8daKZc1d0qt3zaV2ex09LjYvnhsx3rj8pEq90N1QU+Q+9WJVgbzBPpFIzIrZNsYWVlYyVhJXVtFys6UHWf76O36NDu3nt0fbVJ0Wm6Sedomx5hzPCwYpJygvdkOMVQhbKFjrEFG2JRQjPTHH4Uh4HoptFfy2T5+9clt/qo6fS9MMYilqEL1dCyCQtQsnKhC51yUyCkBLz4qeT77Np3KCme/EvwJVndUcfl0qr6uzKwAb8biemqTCjmYS0RUKhM1zuep2TzZfIpFlefwDISXe8s31UTQAAAABJRU5ErkJggg==",n5=(e,t)=>{const n={...Zc.colors,...e};return`
|
|
471
471
|
.g-welcome-${t} .g-welcome-title {
|
|
472
472
|
background-image: linear-gradient(90deg, #3262FA 0%, #6C18FF 100%);
|
|
473
473
|
-webkit-background-clip: text;
|
|
@@ -517,7 +517,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
517
517
|
.g-welcome-${t} .g-welcome-pagination-text {
|
|
518
518
|
color: ${n.text};
|
|
519
519
|
}
|
|
520
|
-
`};function t5({config:e,styles:t}){if(!e)return null;const n=JSON.parse(e.configJson),r=Lt(()=>{var a;return{...Qc.colors,...(a=t==null?void 0:t.theme)==null?void 0:a.colors}},[t]);return B.jsxs("div",{className:"w-[340px] rounded-xl p-4 animate-fade-in bg-white",children:[B.jsxs("div",{className:"flex items-center mb-2",children:[B.jsx("span",{className:"text-md font-bold truncate mr-2",style:{color:r.primary},children:n.config_name||"\u52A9\u624B\u914D\u7F6E"}),B.jsx("span",{className:"text-xs truncate rounded px-2 py-0.5",style:{backgroundColor:`${r.primary}1A`,color:r.disabled},children:n.model_name})]}),B.jsx("div",{className:"border-b my-2",style:{borderColor:r.border}}),B.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-xs text-gray-700 mb-2",style:{color:r.text},children:[B.jsxs("div",{children:["\u4E0A\u4E0B\u6587\u6700\u5927\u8F6E\u6570\uFF1A",B.jsx("span",{className:"font-semibold",children:n.max_round})]}),B.jsxs("div",{children:["\u6700\u5927\u4EE4\u724C\u6570\uFF1A",B.jsx("span",{className:"font-semibold",children:n.max_tokens})]}),B.jsxs("div",{children:["\u6E29\u5EA6\uFF1A",B.jsx("span",{className:"font-semibold",children:n.temperature})]}),B.jsxs("div",{children:["\u53EC\u56DE\u6570\uFF1A",B.jsx("span",{className:"font-semibold",children:n.top_k})]}),B.jsxs("div",{children:["\u591A\u6837\u6027\uFF1A",B.jsx("span",{className:"font-semibold",children:n.top_p})]}),B.jsxs("div",{children:["\u76F8\u4F3C\u5EA6\u9608\u503C\uFF1A",B.jsx("span",{className:"font-semibold",children:n.score_threshold})]})]}),B.jsxs("div",{className:"mb-2",children:[B.jsx("div",{className:"text-xs text-gray-400 mb-1",style:{color:r.disabled},children:"\u5173\u8054\u77E5\u8BC6\u5E93\uFF1A"}),B.jsx("div",{className:"flex flex-wrap gap-1",children:n.knowledge_base_name?n.knowledge_base_name.split(";").map((a,o)=>B.jsx("span",{className:"px-2 py-0.5 rounded-full text-xs",style:{backgroundColor:`${r.primary}1A`,color:r.primary},children:a},o)):B.jsx("span",{className:"text-gray-300",style:{color:r.disabled},children:"\u65E0"})})]}),B.jsxs("div",{className:"mb-2",children:[B.jsx("div",{className:"text-xs text-gray-400 mb-1",style:{color:r.disabled},children:"\u5F00\u542F\u529F\u80FD:"}),B.jsxs("div",{className:"flex flex-wrap gap-2 text-xs mt-2",children:[!!n.enabled_faq&&B.jsx("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${r.success}1A`,color:r.success},children:"FAQ"}),!!n.enabled_graph&&B.jsx("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${r.success}1A`,color:r.success},children:"\u56FE\u8C31"}),!!n.dependOnKb&&B.jsx("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${r.success}1A`,color:r.success},children:"\u5F3A\u77E5\u8BC6\u4F9D\u8D56"}),!!n.enabled_table_select&&B.jsx("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${r.success}1A`,color:r.success},children:"\u8868\u683C\u7B5B\u9009"}),!!n.enabled_rerank&&B.jsx("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${r.success}1A`,color:r.success},children:"\u7CBE\u6392\u6A21\u5F0F"}),!!n.need_trace_source&&B.jsx("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${r.success}1A`,color:r.success},children:"\u6EAF\u6E90"}),!!n.is_download&&B.jsx("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${r.success}1A`,color:r.success},children:"\u4E0B\u8F7D\u6EAF\u6E90"})]})]})]})}function n5(e,t=[],n=60){const[r,a]=dt("");return ft(()=>{a("");let o=0;const i=setInterval(()=>{a(s=>o>=e.length?(clearInterval(i),s):(o++,e.slice(0,o)))},n);return()=>clearInterval(i)},[e,...t]),r}function r5(e){const{assistantList:t,eventsEmit:n,styles:r,selectedId:a,onSelectAssistant:o,productLogo:i}=e,[s,l]=dt(1),c=12,u=wt();ft(()=>{a&&u.current!==a&&(n==null||n("conversation:new_assistant_change",{assistantId:a}),u.current=a)},[a,n]);const d=Lt(()=>Zr(),[]);ft(()=>{var y;if((y=r==null?void 0:r.theme)!=null&&y.colors){const x=document.createElement("style");return x.innerHTML=e5(r.theme.colors,d),x.id=`g-welcome-styles-${d}`,document.head.appendChild(x),()=>{const w=document.getElementById(x.id);w&&w.remove()}}},[r,d]);const g=Lt(()=>t.find(y=>y.id===a),[t,a]),h=Lt(()=>JSON.parse((g==null?void 0:g.configJson)||"{}"),[g]),v=Math.ceil(((t==null?void 0:t.length)||0)/c),m=(t==null?void 0:t.slice((s-1)*c,s*c))||[];ft(()=>{if(a&&t){const y=t.findIndex(x=>x.id===a);if(y!==-1){const x=Math.floor(y/c)+1;l(x)}}},[a,t,c]);const p=h.prologue||"\u60A8\u597D\uFF0C\u6B22\u8FCE\u4F7F\u7528\u5C0F\u9CB8\u667A\u80FD\u95EE\u7B54",b=n5(p,[a],30);return B.jsxs("div",{className:`flex flex-col items-center justify-center h-full w-full g-welcome-${d}`,children:[B.jsx("img",{src:i||QF,alt:"logo",className:"mb-4",style:{width:100,height:100}}),B.jsx("div",{className:"text-3xl font-bold mb-2 g-welcome-title",children:b}),B.jsx("div",{className:"text-sm text-gray-500 mb-20",children:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u667A\u80FD\u52A9\u624B\uFF0C\u5F00\u59CB\u4F60\u7684\u667A\u80FD\u95EE\u7B54\u4E4B\u65C5"}),!a&&B.jsx("div",{className:"flex mb-2 g-welcome-subtitle",children:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u667A\u80FD\u52A9\u624B"}),B.jsx("div",{className:"flex flex-wrap gap-3 px-5 justify-center mb-4",children:m&&m.length>0?m.map(y=>{const x=a===y.id;let w=y.icon;try{const C=JSON.parse(y.configJson||"{}");w=w||C.icon||C.avatar||C.logo}catch{}return w=w||ZF,B.jsx(Mp,{content:()=>B.jsx(t5,{config:t.find(C=>C.id===y.id),styles:r}),trigger:"hover",placement:"bottom",children:B.jsxs("button",{className:`g-welcome-btn px-3 cursor-pointer rounded-full border font-medium min-w-[160px] text-sm transition-all flex items-center gap-2 ${x?"active":""}`,onClick:()=>o==null?void 0:o(y.id),title:y.name,children:[B.jsx("span",{className:"icon-badge",children:B.jsx("img",{src:w,alt:"icon",style:{width:16,height:16,borderRadius:4}})}),B.jsx("span",{className:"truncate max-w-[180px]",children:y.name})]})},y.id)}):B.jsx("div",{className:"g-welcome-subtitle",children:"\u6682\u65E0\u53EF\u7528\u52A9\u624B"})}),v>1&&B.jsxs("div",{className:"flex items-center gap-3 text-sm",children:[B.jsx("button",{className:"g-welcome-pagination-btn px-3 py-1 rounded transition-colors",onClick:()=>l(y=>Math.max(1,y-1)),disabled:s===1,children:"\u4E0A\u4E00\u9875"}),B.jsxs("span",{className:"g-welcome-pagination-text",children:[s," / ",v]}),B.jsx("button",{className:"g-welcome-pagination-btn px-3 py-1 rounded transition-colors",onClick:()=>l(y=>Math.min(v,y+1)),disabled:s===v,children:"\u4E0B\u4E00\u9875"})]})]})}class Ol extends Error{}let sr=null;const a5=({baseUrl:e,token:t,CSRFToken:n,setChatData:r,activeSessionId:a,setAppStatus:o,setConversationList:i})=>{const s=({content:v,status:m,respTime:p,filePaths:b,reference:y,webReference:x,databaseReference:w,llmType:C,resultType:S,queryId:E,tokens:k})=>{r($=>{var F;if(!$[0])return $;const O=$[0],D=O.messages||[],P=D.length-1;if(P<0)return $;const R=D[P];if(R.istype!=="ai")return $;let N=D.slice();if(b!=null&&b.length){const j=D.length-2;if(j>=0&&((F=D[j])==null?void 0:F.istype)==="user"){const A={...D[j],filePaths:b};N[j]=A}}const I={...R,content:(R.content||"")+v,status:m,respTime:p,filePaths:b,reference:y,webReference:x,databaseReference:w??R.databaseReference,resultType:S,llmType:C,tokens:k,queryId:E||R.queryId||Zr(32)};return I.clientSideId=I.clientSideId||I.queryId+"-ai",N[P]=I,[{...O,isNew:!1,messages:N},...$.slice(1)]})},l=v=>{if(v instanceof Ol)throw o(m=>({...m,display:"error",sender:"ready"})),sr&&(sr.abort(),sr=null),v};return{updateUserFilesMessage:({currentFiles:v})=>{r(m=>{if(!m[0])return m;const p=m[0],b=p.messages||[];if(!b.length)return m;const y=b.length-2;if(y<0||b[y].istype!=="user")return m;const w=b.slice();return w[y]={...b[y],currentFiles:v},[{...p,messages:w},...m.slice(1)]})},api_startChat_re:(v,m)=>{sr&&sr.abort(),sr=new AbortController;const p=`${e}/qa/ai/question_re`;console.log("data",v);const b={...v};Y2(p,{method:"post",signal:sr.signal,headers:{"Content-Type":"application/json",Accept:"text/event-stream",Authorization:t||"","X-CSRF-TOKEN-IN":n||""},openWhenHidden:!0,body:JSON.stringify(b),onopen:async y=>{if(y.status===500)throw new Ol("Internal Server Error");if(!y.ok)throw new Ol(`HTTP error: ${y.status}`)},onmessage:y=>{const x=JSON.parse(y.data);if(a!==x.sessionId)return;const{reply:w,resultType:C,respTime:S,reference:E,webReference:k,filePaths:$,status:O,docs:D,llmType:P,databaseReference:R}=x,N=$?JSON.parse($):[];if(O===2&&w&&w.content&&(w.content.includes("\u6A21\u578B\u6682\u65E0\u6CD5\u8FD4\u56DE")||w.content.includes("\u5931\u8D25")||w.content.includes("\u9519\u8BEF")||w.content.includes("\u8BF7\u7A0D\u540E\u518D\u8BD5"))&&o(I=>({...I,display:"ready",sender:"ready"})),O===2){if(s({content:w.content||"",status:2,respTime:S,filePaths:N,reference:E||D||"",webReference:k||"",databaseReference:R,llmType:P,resultType:C,queryId:x.queryId,tokens:x.tokens}),o(I=>({...I,display:"ready",sender:"ready"})),m){const I=S||Date.now();console.log("[AichatUseController] \u6D88\u606F\u53D1\u9001\u6210\u529F\uFF0CgmtModified:",I),m(I)}}else s({content:w.content||"",status:O,respTime:S,filePaths:N,reference:E||D||"",webReference:k||"",databaseReference:R,llmType:P,resultType:C,queryId:x.queryId,tokens:x.tokens})},onerror:l})},addEmptyMessage:({queryId:v,content:m,filePaths:p,currentFiles:b})=>{r(y=>{const x=new Date().toISOString(),w=v||Zr(32),C={istype:"user",content:m,time:x,queryId:w,clientSideId:w+"-user",filePaths:p||"",currentFiles:b||[]},S={istype:"ai",content:"",time:new Date(Date.now()+1).toISOString(),streaming:!0,status:0,queryId:w,clientSideId:w+"-ai"},E=y.find(k=>k.id===a);return E?E.messages.push(C,S):console.warn("addEmptyMessage called without an active session."),[...y]})},setLastEmptyMessage:({now:v})=>{r(m=>{if(!m[0])return m;const p=m[0],b=p.messages||[];if(!b.length)return m;const y=b.length-1;if(y<0)return m;const x=b[y];if(x.istype!=="ai")return m;const w=b.slice();return w[y]={...x,istype:"ai",content:"",time:v,streaming:!0,status:0},[{...p,messages:w},...m.slice(1)]})},stopStream:()=>{sr&&(sr.abort(),sr=null),o(v=>({...v,display:"ready",sender:"ready"}))}}},o5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACRSURBVHgB7ZJBCsQgDEWTmQvMncT7dOuqmY3iai6kMN31UmIjdNFFKuk+DwKahP9ABDAMQyTnvHCtT/ZjjIs0e0nN1hr03kkjGTu8+0PEjzR/S81a6+6cQz6S9x5KKdsknLi+IQRSC07JfybRhE8FM4k2fICgIKVE/MYrF427NlwtuEpOgSr8MUNy9x0Nw7jnAFsnZ7Uu5CkqAAAAAElFTkSuQmCC",{TextArea:tp}=Qr,{useForm:i5}=Xt,C0={\u56DE\u7B54\u4E0D\u4F73:"ansPoor",\u683C\u5F0F\u95EE\u9898:"formatError",\u7406\u89E3\u95EE\u9898\u6709\u8BEF:"harmfulInfo",\u5176\u4ED6:"othres"},s5=({open:e,setOpen:t,feedBackList:n,handleConfirm:r})=>{const a={header:{padding:"20px 24px",borderBottom:"1px solid #F0F0F0",margin:0},body:{padding:"16px 24px 20px 24px",borderBottom:"1px solid #F0F0F0"},mask:{},footer:{padding:"16px 24px",margin:0},content:{padding:0,borderRadius:"4px",width:"563px"}},[o]=i5(),[i,s]=dt({}),l=async()=>{try{const c=await o.validateFields();t(!1);const u={...c};Object.entries(i||{}).forEach(d=>{const[g,h]=d;h&&(u[C0[g]]=h)}),r(u)}catch(c){console.log(c);return}};return ft(()=>{e||(o.resetFields(),s(null))},[e]),B.jsx(ls,{modal:{styles:a},children:B.jsxs(us,{open:e,onCancel:()=>t(!1),title:B.jsx("div",{className:"text-[16px] text-[#2A2A2A] font-bold leading-[1]",children:"\u611F\u8C22\u60A8\u7684\u53CD\u9988\uFF01\u8FD9\u5C06\u5E2E\u52A9\u6211\u4EEC\u4E0D\u65AD\u4F18\u5316\u4E0E\u63D0\u5347\u3002"}),footer:B.jsxs("div",{children:[B.jsx(gn,{className:"mr-[16px] w-[76px]",onClick:()=>{t(!1)},children:"\u53D6\u6D88"}),B.jsx(gn,{type:"primary",className:"w-[76px] border-none",onClick:l,children:"\u786E\u8BA4"})]}),children:[B.jsx(l5,{feedBackList:n,treeSelectResult:i,setTreeSelectResult:s}),B.jsxs(Xt,{form:o,layout:"vertical",children:[B.jsx(Xt.Item,{name:"supplementExplain",label:"\u8865\u5145\u63CF\u8FF0",children:B.jsx(tp,{})})," ",B.jsx(Xt.Item,{name:"idealAnswer",label:"\u60A8\u89C9\u5F97\u66F4\u597D\u7684\u56DE\u7B54\u662F\u4EC0\u4E48\uFF1F",children:B.jsx(tp,{})}),B.jsx(Xt.Item,{name:"userPhone",label:"\u8054\u7CFB\u7535\u8BDD",children:B.jsx(Qr,{})}),B.jsx(Xt.Item,{name:"deptName",label:"\u90E8\u95E8",children:B.jsx(Qr,{})})]})]})})},l5=({feedBackList:e,treeSelectResult:t,setTreeSelectResult:n})=>{const[r,a]=dt(!1),[o,i]=dt([]),[s,l]=dt([]),[c,u]=dt([]),[d,g]=dt(null),h=Lt(()=>(l([]),d!=null&&d.items?[{title:"\u5168\u9009",key:"\u5168\u9009",children:d.items.map(m=>({title:m,key:m}))}]:[]),[d]),v=m=>{u(p=>Array.isArray(p)&&Array.isArray(s)?Object.entries(t).reduce((y,x)=>{const[w,C]=x,E=(C?C.split(";"):[]).filter(k=>k!==m);return n(k=>({...k||{},[w]:E.join(";")})),[...y,...E]},[]):p)};return ft(()=>{if(i(["\u5168\u9009"]),!t||!(d!=null&&d.que_name))return;const m=t[d.que_name]||"",p=m?m.split(";"):[];l(p)},[h,r]),ft(()=>{t===null&&(u([]),g(null),l([]))},[t]),ft(()=>{console.log("treeSelectResult",t),console.log("selectedValue",c),console.log("feedBackList",e),console.log("pKey",C0),console.log("selectedParent",d)},[t,c]),B.jsxs("div",{className:"relative mb-[24px] z-20",children:[B.jsxs("div",{className:"absolute w-full z-10",children:[B.jsxs("div",{className:"h-[32px] box-border flex items-center justify-between border-[1px] border-solid border-[#D9D9D9] rounded-[4px] cursor-pointer",onClick:()=>a(!r),children:[B.jsx("div",{className:"ml-[16px]",children:"\u95EE\u9898\u7C7B\u578B"}),B.jsx("img",{src:o5,width:24,height:24,className:"mr-[16px]"})]}),B.jsxs("div",{style:{display:r?"":"none"},className:"h-[288px] rounded-[4px] shadow-md mt-[4px] bg-white",children:[B.jsxs("div",{className:"h-[248px] flex",style:{borderBottom:"1px solid #F0F0F0"},children:[B.jsx("div",{className:"w-[203px] px-[8px] py-[8px]",style:{borderRight:"1px solid #F0F0F0"},children:e.map((m,p)=>{var b;return B.jsxs("div",{className:"rounded-[4px] h-[32px] cursor-pointer flex items-center",style:{backgroundColor:(d==null?void 0:d.que_name)===m.que_name?"#E6F4FF":""},children:[B.jsx("div",{className:"h-full w-full leading-[32px]",onClick:()=>{g(m)},children:B.jsxs("div",{className:"ml-[8px] text-[14px] text-[#2A2A2A]",children:[m.que_name,"(",t&&t[m.que_name]?t[m.que_name].split(";").length:0,"/",(b=m==null?void 0:m.items)==null?void 0:b.length,")"]})}),B.jsx(Sy,{className:"mr-[8px] w-3 h-3 text-[rgba(0,0,0,0.45)]"})]},p)})}),B.jsx("div",{className:"selfTree h-full flex-1 mt-[8px] ml-[16px]",children:B.jsx(Ou,{checkable:!0,defaultSelectedKeys:["0-1"],treeData:h,blockNode:!0,checkedKeys:s,expandedKeys:o,onCheck:m=>{Array.isArray(m)&&n(p=>({...p||{},[(d==null?void 0:d.que_name)||""]:(m||[]).filter(b=>b!=="\u5168\u9009").join(";")})),l(m)}})})]}),B.jsxs("div",{className:"flex justify-end h-[40px] items-center",children:[B.jsx(gn,{size:"small",className:"mr-[8px]",onClick:()=>a(!1),children:"\u53D6\u6D88"}),B.jsx(gn,{size:"small",type:"primary",className:"border-none mr-[16px]",onClick:()=>{u(m=>Array.isArray(m)&&Array.isArray(s)?Object.values(t).reduce((b,y)=>[...b,...y?y.split(";"):[]],[]):m),a(!1)},children:"\u786E\u8BA4"})]})]})]}),B.jsx("div",{className:"h-[32px]"}),!!(c!=null&&c.length)&&B.jsxs("div",{children:[B.jsxs("div",{className:"mt-[5px] text-[12px] text-[#555555]",children:["\u5DF2\u9009\u62E9 ",c.length," \u4E2A"]}),(c||[]).map(m=>{let p="";return Object.entries(t||{}).forEach(b=>{const[y,x]=b;x.indexOf(m)>-1&&(p=y)}),B.jsxs(Fp,{closable:!0,className:"mt-[5px]",onClose:()=>v(m),children:[p,"\uFF08",m,"\uFF09"]},m)})]})]})},np=e=>e?Array.isArray(e)?e.map(r=>"/minio/"+r.split("/").slice(3).join("/")):"/minio/"+e.split("/").slice(3).join("/"):"",rp="http://10.15.12.13:9000/",c5=e=>{if(typeof e=="string"){const t=e.split(".");return t.length?t[t.length-1]:""}else return""},u5=e=>{var C,S,E,k,$,O,D,P;const{file_type:t,file_name:n,url:r,parse_url:a,retrieve_tags:o,file_id:i,parsed_file_type:s,onlyDownloadTypes:l,references:c,eventsEmit:u,styles:d,isUploadFile:g,type:h,collectionItems:v,pdfPages:m=0,fileManagerData:p}=e;if(h==="collection"&&Array.isArray(v)){const I=`calc(90% - ${.5}px)`,M=v.slice(0,4),F=v.length>4,j="\u6253\u5F00\u5408\u96C6",A=()=>{if(p&&t==="pdf"&&!e.pdfPages){const _=((p==null?void 0:p.uploadedFiles)||[]).find(L=>{var z;return((L==null?void 0:L.name)||((z=L==null?void 0:L.file)==null?void 0:z.name))===n});if(!(_!=null&&_.pdfPages)){Vt.warning("\u8BE5PDF\u6587\u4EF6\u672A\u89E3\u6790\u5B8C\u6210\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5");return}u==null||u("reference_file:click",{...e,pdfPages:(_==null?void 0:_.pdfPages)||0})}else u==null||u("reference_file:click",e)};return B.jsxs("div",{className:"user-file relative group flex flex-col items-center justify-center cursor-pointer backdrop-blur-sm rounded-lg border p-2 text-sm transition-all bg-white shadow",style:{width:94,height:94,minWidth:94,minHeight:94,borderColor:(S=(C=d==null?void 0:d.theme)==null?void 0:C.colors)==null?void 0:S.border},onClick:A,children:[B.jsx("div",{className:"grid grid-cols-2 items-center justify-center grid-rows-2 gap-1 w-full h-full",style:{width:"100%",height:"100%",gap:1},children:M.map((_,L)=>{var H,W,K,G;if(F&&L===3)return B.jsx("div",{className:"flex items-center justify-center bg-gray-100 rounded",style:{width:I,height:I},children:B.jsx("span",{className:"text-xl text-gray-300 font-bold scale-75",children:"..."})},"ellipsis");if(_.file_type==="image"||_.file_type==="jpg"||_.file_type==="jpeg"||_.file_type==="png"||_.file_type==="gif"||_.file_type==="bmp"||_.file_type==="webp")return B.jsx("div",{className:"relative flex items-center justify-center bg-white rounded-lg border overflow-hidden",style:{width:I,height:I,borderColor:(W=(H=d==null?void 0:d.theme)==null?void 0:H.colors)==null?void 0:W.border},children:B.jsx("div",{className:"flex items-center justify-center w-full h-full scale-75",children:B.jsx("img",{src:String(_.url||_.file_path||""),alt:_.file_name||"",className:"object-contain max-w-full max-h-full"})})},_.file_name||L);const T=Jc(String(_.file_type||""),d);return B.jsx("div",{className:"user-file flex flex-col items-center justify-center rounded-lg border bg-gray-50 p-1 text-sm",title:_.file_name,style:{width:I,height:I,borderColor:(G=(K=d==null?void 0:d.theme)==null?void 0:K.colors)==null?void 0:G.border},children:B.jsx("div",{className:"flex items-center justify-center w-full h-full scale-75",children:T})},_.file_name||L)})}),B.jsx("div",{className:"absolute inset-0 bg-transparent group-hover:bg-black/40 transition-all duration-300 flex items-center justify-center rounded-lg pointer-events-none",children:B.jsxs("div",{className:"flex flex-col items-center text-xs justify-center text-white opacity-0 group-hover:opacity-100 transition-opacity",children:[B.jsx(kl,{size:20,className:"mb-1 text-white"}),B.jsx("span",{className:"text-white text-center",style:{fontSize:12},children:j})]})})]})}const b=()=>{if(console.log(a,"parse_url",r,"url"),p&&t==="pdf"&&!m){const R=((p==null?void 0:p.uploadedFiles)||[]).find(N=>{var I;return((N==null?void 0:N.name)||((I=N==null?void 0:N.file)==null?void 0:I.name))===(n||"").replace(/\s+/g,"")});if(!(R!=null&&R.pdfPages)){Vt.warning("\u8BE5PDF\u6587\u4EF6\u672A\u89E3\u6790\u5B8C\u6210\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5");return}u==null||u("reference_file:click",{file:n,file_type:t,url:r,parse_url:a,retrieve_tags:o,file_id:i,parsed_file_type:s,references:c,type:y,isUploadFile:g,pdfPages:R.pdfPages||0})}else u==null||u("reference_file:click",{file:n,file_type:t,url:r,parse_url:a,retrieve_tags:o,file_id:i,parsed_file_type:s,references:c,type:y,isUploadFile:g,pdfPages:m})},y=Lt(()=>(n||"").split(".").pop()||"",[n]),x=Jc(y,d),w=async()=>{if(r){const R=np(r.indexOf("http")>-1?r:`${rp}/${r}`);if(y.toLowerCase()==="json"){try{const M=await fetch(R);if(!M.ok)throw new Error("\u4E0B\u8F7D\u5931\u8D25");const F=await M.blob(),j=document.createElement("a");j.href=URL.createObjectURL(F),j.download=n||"",document.body.appendChild(j),j.click(),document.body.removeChild(j),setTimeout(()=>URL.revokeObjectURL(j.href),1e3)}catch{alert("\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25")}return}const I=document.createElement("a");I.href=R,I.download=n||"",document.body.appendChild(I),I.click(),document.body.removeChild(I)}};return l&&l.includes(y.toLowerCase())?B.jsxs("div",{className:"user-file relative group w-24 h-24 flex flex-col items-center justify-center cursor-pointer backdrop-blur-sm rounded-lg border p-2 text-sm transition-all",title:n,onClick:w,style:{borderColor:(k=(E=d==null?void 0:d.theme)==null?void 0:E.colors)==null?void 0:k.border},children:[x,B.jsx("span",{className:"file-name font-medium truncate text-center px-2 pt-1",style:{fontSize:10,maxWidth:"5.5rem"},children:n}),B.jsx("div",{className:"absolute text-center inset-0 cursor-pointer bg-transparent group-hover:bg-black/40 transition-all duration-300 flex items-center justify-center rounded-lg",children:B.jsxs("div",{className:"flex flex-col items-center text-xs justify-center text-white opacity-0 group-hover:opacity-100 transition-opacity",children:[B.jsx(kl,{className:"text-white opacity-0 group-hover:opacity-100 transition-opacity mx-auto"}),B.jsx("div",{className:"text-white text-center",style:{fontSize:10},children:"\u4E0B\u8F7D\u6587\u4EF6"})]})})]},n):y==="image"||y==="jpg"||y==="jpeg"||y==="png"||y==="gif"||y==="bmp"||y==="webp"?B.jsxs("div",{className:"relative group w-24 h-24 cursor-pointer flex items-center justify-center",onClick:()=>b(),children:[r?B.jsx("img",{src:String(np(r&&r.indexOf("http")>-1?r:`${rp}/${r}`)||""),alt:n||"",className:"w-full h-full object-cover rounded-md border",style:{borderColor:(O=($=d==null?void 0:d.theme)==null?void 0:$.colors)==null?void 0:O.border}}):B.jsx("div",{className:"w-full h-full flex items-center justify-center",children:B.jsx("span",{className:"animate-spin rounded-full border-2 border-gray-300 border-t-blue-500 w-8 h-8 inline-block"})}),B.jsx("div",{className:"absolute inset-0 bg-transparent group-hover:bg-black/40 transition-all duration-300 flex items-center justify-center rounded-md",children:B.jsxs("div",{className:"flex flex-col items-center text-xs justify-center text-white opacity-0 group-hover:opacity-100 transition-opacity",children:[B.jsx(jF,{className:"text-white opacity-0 group-hover:opacity-100 transition-opacity mx-auto"}),B.jsx("div",{className:"text-white text-center",children:"\u67E5\u770B\u56FE\u7247"})]})})]},n):B.jsxs("div",{className:"user-file relative group w-24 h-24 flex flex-col items-center justify-center cursor-pointer backdrop-blur-sm rounded-lg border p-2 text-sm transition-all",title:n,onClick:b,style:{borderColor:(P=(D=d==null?void 0:d.theme)==null?void 0:D.colors)==null?void 0:P.border},children:[x,B.jsx("span",{className:"file-name font-medium truncate text-center px-2 pt-1",style:{fontSize:10,maxWidth:"5.5rem"},children:n}),B.jsx("div",{className:"absolute text-center inset-0 cursor-pointer bg-transparent group-hover:bg-black/40 transition-all duration-300 flex items-center justify-center rounded-lg",children:B.jsxs("div",{className:"flex flex-col items-center text-xs justify-center text-white opacity-0 group-hover:opacity-100 transition-opacity",children:[B.jsx(kl,{className:"text-white opacity-0 group-hover:opacity-100 transition-opacity mx-auto"}),B.jsx("div",{className:"text-white text-center",style:{fontSize:10},children:"\u6253\u5F00\u6587\u4EF6"})]})})]},n)},d5=e=>e?e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/1024/1024).toFixed(1)}MB`:"",f5=({fileName:e,fileSize:t,icon:n,statusText:r,statusColor:a="text-gray-400",statusIcon:o,onRemove:i,themeColors:s={},cardId:l,showRemove:c=!0,disabledRemove:u=!1,onRemoveWithAnim:d,extra:g,style:h})=>B.jsxs("div",{id:l,className:"group gap-x-2.5 items-center file-display-card relative flex w-[210px] bg-white border border-gray-200 rounded-md shadow-sm px-2 py-1 transition-all hover:shadow-md hover:border-blue-300",style:h,children:[B.jsx("div",{className:"pt-1",children:n}),B.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[B.jsxs("div",{className:"flex items-center justify-between gap-1",children:[B.jsx("span",{className:"text-[12px] font-medium truncate max-w-[120px]",title:e,children:e}),B.jsx("span",{className:"ml-1 text-[11px] text-gray-400",children:d5(t)})]}),B.jsxs("div",{className:`text-[10px] mt-0.5 flex items-center gap-3 ${a}`,children:[o,B.jsx("span",{children:r})]})]}),g,c&&!u&&B.jsx("button",{className:"absolute top-0.5 right-0.5 opacity-0 group-hover:opacity-100 transition-opacity text-gray-300 hover:text-red-400 text-xs p-0.5 rounded-full bg-white shadow-sm z-10",onClick:()=>{d&&l?d(l):i&&i()},title:"\u79FB\u9664",style:{lineHeight:0,color:s.error||"#FF0000"},children:B.jsx(su,{className:"w-3.5 h-3.5"})})]});function Jc(e,t){var r;const n=((r=t==null?void 0:t.theme)==null?void 0:r.icons)||{};switch(e.toLowerCase()){case"docx":case"doc":return n.docx?B.jsx("img",{src:n.docx,alt:"docx",style:{width:20,height:20}}):B.jsx(qt,{type:"rag/word",size:18});case"image":case"jpg":case"jpeg":case"png":case"gif":case"bmp":case"webp":case"svg":case"ico":return n.image?B.jsx("img",{src:n.image,alt:"image",style:{width:20,height:20}}):B.jsx(qt,{type:"rag/pic",size:18});case"pptx":case"ppt":return n.pptx?B.jsx("img",{src:n.pptx,alt:"pptx",style:{width:20,height:20}}):B.jsx(qt,{type:"rag/ppt",size:18});case"sheets":case"excel":case"xls":case"csv":case"xlsx":case"xlsm":case"xlsb":case"xltx":case"xltm":case"xlt":case"xlam":return n.sheets?B.jsx("img",{src:n.sheets,alt:"sheets",style:{width:20,height:20}}):B.jsx(qt,{type:"rag/excel",size:18});case"pdf":return n.pdf?B.jsx("img",{src:n.pdf,alt:"pdf",style:{width:20,height:20}}):B.jsx(qt,{type:"rag/pdf",size:18});case"txt":return n.txt?B.jsx("img",{src:n.txt,alt:"txt",style:{width:20,height:20}}):B.jsx(qt,{type:"rag/txt",size:18});case"md":return n.md?B.jsx("img",{src:n.md,alt:"txt",style:{width:20,height:20}}):B.jsx(qt,{type:"rag/document",size:18});case"json":return n.json?B.jsx("img",{src:n.json,alt:"json",style:{width:20,height:20}}):B.jsx(qt,{type:"rag/json",size:18});case"html":case"htm":return n.html?B.jsx("img",{src:n.html,alt:"html",style:{width:20,height:20}}):B.jsx(qt,{type:"rag/url",size:18});case"xml":default:return B.jsx(qt,{type:"rag/file",size:18})}}const m5=[{file:{name:"\u4EA7\u54C1\u9700\u6C42\u6587\u6863.pdf",size:1024*1024*2.5,type:"application/pdf"},type:"pdf",status:"uploaded",url:"https://example.com/file1.pdf"},{file:{name:"\u6570\u636E\u5206\u6790\u62A5\u544A.xlsx",size:1024*1024*1.2,type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},type:"excel",status:"uploaded",url:"https://example.com/file3.xlsx"},{file:{name:"\u7CFB\u7EDF\u67B6\u6784\u56FE.png",size:1024*512,type:"image/png"},type:"image",status:"uploaded",url:"https://example.com/file2.png"}];function p5({open:e,onCancel:t,files:n=m5,currentFiles:r=[],onUpload:a,onRemoveFile:o,styles:i,eventsEmit:s}){const l={pending:"\u5F85\u4E0A\u4F20",uploading:"\u4E0A\u4F20\u4E2D",uploaded:"\u5DF2\u4E0A\u4F20",analyzing:"\u89E3\u6790\u4E2D",analyze_failed:"\u89E3\u6790\u5931\u8D25",error:"\u5931\u8D25"},[c,u]=dt([]),d=(m,p)=>{s&&s("uploaded_file:removeFromTemp",{file:m,idx:p})},g=i&&i.theme&&i.theme.colors?i.theme.colors:{primary:"#007bff",secondary:"#6c757d",success:"#008000",warning:"#FFA500",error:"#FF0000",info:"#0000FF",background:"#f8f9fa",text:"#343a40",border:"#dee2e6",disabled:"#808080",disabledBackground:"#F5F5F5",disabledText:"#808080",shadow:"#000000",appBackground:"#fff"},h=n.map((m,p)=>B.jsxs("div",{className:"relative flex flex-col gap-2.5 items-center justify-center",children:[B.jsx("div",{className:"absolute right-1 top-1 z-10",children:B.jsx(Jg,{title:"\u786E\u8BA4\u4ECE\u4E34\u65F6\u5BF9\u8BDD\u77E5\u8BC6\u5E93\u79FB\u9664\u8BE5\u6587\u4EF6\uFF1F",onConfirm:()=>d(m,p),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",children:B.jsx("button",{className:"bg-white cursor-pointer rounded-full p-0.5",style:{lineHeight:0,color:g&&g.text?g.text:"#FF0000",transition:"background 0.2s, color 0.2s"},onMouseOver:b=>{b.currentTarget.style.color=g&&g.error?g.error:"#FF0000"},onMouseOut:b=>{b.currentTarget.style.color=g.text},title:"\u79FB\u9664",children:B.jsx(su,{className:"w-3 h-3"})})})}),B.jsx(u5,{file_type:c5(m.file.name||m.name),file_name:m.name||m.file.name,url:m.url,retrieve_tags:[],styles:i,isUploadFile:!0,eventsEmit:s,parse_url:m.convertedFilePath,pdfPages:m.pdfPages||0})]},m.file.name+p)),v=r.map((m,p)=>{const b=m.file.name.split(".").pop()||"",y=Jc(b,i);return B.jsx(f5,{cardId:`pending-file-card-${p}`,fileName:m.file.name,fileSize:m.file.size,icon:y,statusText:l[m.status||"pending"],statusColor:"text-gray-400",showRemove:!0,onRemove:()=>o&&o(m,p,"pending"),themeColors:g,style:{boxShadow:"none",height:55,background:"#f8fafc"}},m.file.name+p)});return c.length>0?(g&&g.error&&g.error,g&&g.error&&g.error+"",g&&g.error&&g.error):(g&&g.disabledText&&g.disabledText,g&&g.disabledBackground&&g.disabledBackground,g&&g.disabledText&&g.disabledText),B.jsxs(us,{open:e,onCancel:t,footer:null,title:"\u5BF9\u8BDD\u4E34\u65F6\u6587\u4EF6\u77E5\u8BC6\u5E93",closable:!1,width:800,styles:{body:{padding:"0",maxHeight:"70vh",overflow:"auto"}},children:[B.jsxs("div",{className:"file-manager-modal space-y-6 px-4 py-4",children:[B.jsxs("div",{className:"",children:[B.jsx("div",{className:"flex items-center mb-2 justify-between",children:B.jsxs("div",{className:"flex items-center",children:[B.jsx("span",{className:"text-xs font-semibold text-gray-700",children:"\u5DF2\u4E0A\u4F20\u6587\u4EF6"}),B.jsxs("span",{className:"ml-2 text-xs text-gray-400",children:[n.length," \u4E2A"]})]})}),B.jsx("div",{className:"w-full relative min-h-[200px] max-h-[260px] p-2 overflow-y-auto",style:{overflowX:"hidden"},children:B.jsx("div",{className:"flex flex-wrap gap-1",children:h.length>0?h:B.jsx("div",{className:"flex items-center w-full h-full py-10 justify-center text-gray-400 text-sm",children:"\u6682\u65E0\u5DF2\u4E0A\u4F20\u6587\u4EF6"})})})]}),B.jsxs("div",{children:[B.jsxs("div",{className:"flex items-center mb-2",children:[B.jsx("span",{className:"text-xs font-semibold text-gray-700",children:"\u5F85\u4E0A\u4F20\u6587\u4EF6"}),B.jsxs("span",{className:"ml-2 text-xs text-gray-400",children:[r.length," \u4E2A"]})]}),B.jsxs("div",{className:"flex gap-2 overflow-x-auto pb-2",children:[v,B.jsx(Nu.Dragger,{multiple:!0,showUploadList:!1,beforeUpload:(m,p)=>(m===p[0]&&(a==null||a(p)),!1),className:"!bg-gray-50 !border-dashed !border-gray-300 hover:!border-blue-400 cursor-pointer min-w-[160px] max-w-[220px] flex flex-row items-center justify-center border-2 rounded-lg transition-all",style:{height:45,boxShadow:"none",padding:0},children:B.jsxs("div",{className:"flex flex-row items-center pb-8 justify-center",children:[B.jsx(Pp,{size:20,className:"text-blue-400 mr-2"}),B.jsx("div",{className:"text-xs text-gray-500",children:"\u4E0A\u4F20\u6587\u4EF6"})]})})]})]}),B.jsx("div",{className:"flex justify-end gap-2",children:B.jsx(gn,{type:"primary",onClick:t,children:"\u786E\u8BA4"})})]}),B.jsx("style",{children:`
|
|
520
|
+
`};function r5({config:e,styles:t}){if(!e)return null;const n=JSON.parse(e.configJson),r=zt(()=>{var a;return{...Zc.colors,...(a=t==null?void 0:t.theme)==null?void 0:a.colors}},[t]);return Pe("div",{className:"w-[340px] rounded-xl p-4 animate-fade-in bg-white",children:[Pe("div",{className:"flex items-center mb-2",children:[W("span",{className:"text-md font-bold truncate mr-2",style:{color:r.primary},children:n.config_name||"\u52A9\u624B\u914D\u7F6E"}),W("span",{className:"text-xs truncate rounded px-2 py-0.5",style:{backgroundColor:`${r.primary}1A`,color:r.disabled},children:n.model_name})]}),W("div",{className:"border-b my-2",style:{borderColor:r.border}}),Pe("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-xs text-gray-700 mb-2",style:{color:r.text},children:[Pe("div",{children:["\u4E0A\u4E0B\u6587\u6700\u5927\u8F6E\u6570\uFF1A",W("span",{className:"font-semibold",children:n.max_round})]}),Pe("div",{children:["\u6700\u5927\u4EE4\u724C\u6570\uFF1A",W("span",{className:"font-semibold",children:n.max_tokens})]}),Pe("div",{children:["\u6E29\u5EA6\uFF1A",W("span",{className:"font-semibold",children:n.temperature})]}),Pe("div",{children:["\u53EC\u56DE\u6570\uFF1A",W("span",{className:"font-semibold",children:n.top_k})]}),Pe("div",{children:["\u591A\u6837\u6027\uFF1A",W("span",{className:"font-semibold",children:n.top_p})]}),Pe("div",{children:["\u76F8\u4F3C\u5EA6\u9608\u503C\uFF1A",W("span",{className:"font-semibold",children:n.score_threshold})]})]}),Pe("div",{className:"mb-2",children:[W("div",{className:"text-xs text-gray-400 mb-1",style:{color:r.disabled},children:"\u5173\u8054\u77E5\u8BC6\u5E93\uFF1A"}),W("div",{className:"flex flex-wrap gap-1",children:n.knowledge_base_name?n.knowledge_base_name.split(";").map((a,o)=>W("span",{className:"px-2 py-0.5 rounded-full text-xs",style:{backgroundColor:`${r.primary}1A`,color:r.primary},children:a},o)):W("span",{className:"text-gray-300",style:{color:r.disabled},children:"\u65E0"})})]}),Pe("div",{className:"mb-2",children:[W("div",{className:"text-xs text-gray-400 mb-1",style:{color:r.disabled},children:"\u5F00\u542F\u529F\u80FD:"}),Pe("div",{className:"flex flex-wrap gap-2 text-xs mt-2",children:[!!n.enabled_faq&&W("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${r.success}1A`,color:r.success},children:"FAQ"}),!!n.enabled_graph&&W("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${r.success}1A`,color:r.success},children:"\u56FE\u8C31"}),!!n.dependOnKb&&W("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${r.success}1A`,color:r.success},children:"\u5F3A\u77E5\u8BC6\u4F9D\u8D56"}),!!n.enabled_table_select&&W("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${r.success}1A`,color:r.success},children:"\u8868\u683C\u7B5B\u9009"}),!!n.enabled_rerank&&W("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${r.success}1A`,color:r.success},children:"\u7CBE\u6392\u6A21\u5F0F"}),!!n.need_trace_source&&W("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${r.success}1A`,color:r.success},children:"\u6EAF\u6E90"}),!!n.is_download&&W("span",{className:"px-2 py-0.5 rounded",style:{backgroundColor:`${r.success}1A`,color:r.success},children:"\u4E0B\u8F7D\u6EAF\u6E90"})]})]})]})}function a5(e,t=[],n=60){const[r,a]=ft("");return mt(()=>{a("");let o=0;const i=setInterval(()=>{a(l=>o>=e.length?(clearInterval(i),l):(o++,e.slice(0,o)))},n);return()=>clearInterval(i)},[e,...t]),r}function o5(e){const{assistantList:t,eventsEmit:n,styles:r,selectedId:a,onSelectAssistant:o,productLogo:i}=e,[l,s]=ft(1),c=12,u=St();mt(()=>{a&&u.current!==a&&(n==null||n("conversation:new_assistant_change",{assistantId:a}),u.current=a)},[a,n]);const d=zt(()=>ea(),[]);mt(()=>{var y;if((y=r==null?void 0:r.theme)!=null&&y.colors){const x=document.createElement("style");return x.innerHTML=n5(r.theme.colors,d),x.id=`g-welcome-styles-${d}`,document.head.appendChild(x),()=>{const w=document.getElementById(x.id);w&&w.remove()}}},[r,d]);const g=zt(()=>t.find(y=>y.id===a),[t,a]),h=zt(()=>JSON.parse((g==null?void 0:g.configJson)||"{}"),[g]),v=Math.ceil(((t==null?void 0:t.length)||0)/c),m=(t==null?void 0:t.slice((l-1)*c,l*c))||[];mt(()=>{if(a&&t){const y=t.findIndex(x=>x.id===a);if(y!==-1){const x=Math.floor(y/c)+1;s(x)}}},[a,t,c]);const p=h.prologue||"\u60A8\u597D\uFF0C\u6B22\u8FCE\u4F7F\u7528\u5C0F\u9CB8\u667A\u80FD\u95EE\u7B54",b=a5(p,[a],30);return Pe("div",{className:`flex flex-col items-center justify-center h-full w-full g-welcome-${d}`,children:[W("img",{src:i||e5,alt:"logo",className:"mb-4",style:{width:100,height:100}}),W("div",{className:"text-3xl font-bold mb-2 g-welcome-title",children:b}),W("div",{className:"text-sm text-gray-500 mb-20",children:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u667A\u80FD\u52A9\u624B\uFF0C\u5F00\u59CB\u4F60\u7684\u667A\u80FD\u95EE\u7B54\u4E4B\u65C5"}),!a&&W("div",{className:"flex mb-2 g-welcome-subtitle",children:"\u8BF7\u9009\u62E9\u4E00\u4E2A\u667A\u80FD\u52A9\u624B"}),W("div",{className:"flex flex-wrap gap-3 px-5 justify-center mb-4",children:m&&m.length>0?m.map(y=>{const x=a===y.id;let w=y.icon;try{const C=JSON.parse(y.configJson||"{}");w=w||C.icon||C.avatar||C.logo}catch{}return w=w||t5,W(Fp,{content:()=>W(r5,{config:t.find(C=>C.id===y.id),styles:r}),trigger:"hover",placement:"bottom",children:Pe("button",{className:`g-welcome-btn px-3 cursor-pointer rounded-full border font-medium min-w-[160px] text-sm transition-all flex items-center gap-2 ${x?"active":""}`,onClick:()=>o==null?void 0:o(y.id),title:y.name,children:[W("span",{className:"icon-badge",children:W("img",{src:w,alt:"icon",style:{width:16,height:16,borderRadius:4}})}),W("span",{className:"truncate max-w-[180px]",children:y.name})]})},y.id)}):W("div",{className:"g-welcome-subtitle",children:"\u6682\u65E0\u53EF\u7528\u52A9\u624B"})}),v>1&&Pe("div",{className:"flex items-center gap-3 text-sm",children:[W("button",{className:"g-welcome-pagination-btn px-3 py-1 rounded transition-colors",onClick:()=>s(y=>Math.max(1,y-1)),disabled:l===1,children:"\u4E0A\u4E00\u9875"}),Pe("span",{className:"g-welcome-pagination-text",children:[l," / ",v]}),W("button",{className:"g-welcome-pagination-btn px-3 py-1 rounded transition-colors",onClick:()=>s(y=>Math.min(v,y+1)),disabled:l===v,children:"\u4E0B\u4E00\u9875"})]})]})}class Ns extends Error{}let sr=null;const i5=({baseUrl:e,token:t,CSRFToken:n,setChatData:r,activeSessionId:a,setAppStatus:o,setConversationList:i})=>{const l=({content:v,status:m,respTime:p,filePaths:b,reference:y,webReference:x,databaseReference:w,llmType:C,resultType:S,queryId:E,tokens:k})=>{r($=>{var F;if(!$[0])return $;const O=$[0],D=O.messages||[],P=D.length-1;if(P<0)return $;const A=D[P];if(A.istype!=="ai")return $;let N=D.slice();if(b!=null&&b.length){const R=D.length-2;if(R>=0&&((F=D[R])==null?void 0:F.istype)==="user"){const T={...D[R],filePaths:b};N[R]=T}}const I={...A,content:(A.content||"")+v,status:m,respTime:p,filePaths:b,reference:y,webReference:x,databaseReference:w??A.databaseReference,resultType:S,llmType:C,tokens:k,queryId:E||A.queryId||ea(32)};return I.clientSideId=I.clientSideId||I.queryId+"-ai",N[P]=I,[{...O,isNew:!1,messages:N},...$.slice(1)]})},s=v=>{if(v instanceof Ns)throw o(m=>({...m,display:"error",sender:"ready"})),sr&&(sr.abort(),sr=null),v};return{updateUserFilesMessage:({currentFiles:v})=>{r(m=>{if(!m[0])return m;const p=m[0],b=p.messages||[];if(!b.length)return m;const y=b.length-2;if(y<0||b[y].istype!=="user")return m;const w=b.slice();return w[y]={...b[y],currentFiles:v},[{...p,messages:w},...m.slice(1)]})},api_startChat_re:(v,m)=>{sr&&sr.abort(),sr=new AbortController;const p=`${e}/qa/ai/question_re`;console.log("data",v);const b={...v};X2(p,{method:"post",signal:sr.signal,headers:{"Content-Type":"application/json",Accept:"text/event-stream",Authorization:t||"","X-CSRF-TOKEN-IN":n||""},openWhenHidden:!0,body:JSON.stringify(b),onopen:async y=>{if(y.status===500)throw new Ns("Internal Server Error");if(!y.ok)throw new Ns(`HTTP error: ${y.status}`)},onmessage:y=>{const x=JSON.parse(y.data);if(a!==x.sessionId)return;const{reply:w,resultType:C,respTime:S,reference:E,webReference:k,filePaths:$,status:O,docs:D,llmType:P,databaseReference:A}=x,N=$?JSON.parse($):[];if(O===2&&w&&w.content&&(w.content.includes("\u6A21\u578B\u6682\u65E0\u6CD5\u8FD4\u56DE")||w.content.includes("\u5931\u8D25")||w.content.includes("\u9519\u8BEF")||w.content.includes("\u8BF7\u7A0D\u540E\u518D\u8BD5"))&&o(I=>({...I,display:"ready",sender:"ready"})),O===2){if(l({content:w.content||"",status:2,respTime:S,filePaths:N,reference:E||D||"",webReference:k||"",databaseReference:A,llmType:P,resultType:C,queryId:x.queryId,tokens:x.tokens}),o(I=>({...I,display:"ready",sender:"ready"})),m){const I=S||Date.now();console.log("[AichatUseController] \u6D88\u606F\u53D1\u9001\u6210\u529F\uFF0CgmtModified:",I),m(I)}}else l({content:w.content||"",status:O,respTime:S,filePaths:N,reference:E||D||"",webReference:k||"",databaseReference:A,llmType:P,resultType:C,queryId:x.queryId,tokens:x.tokens})},onerror:s})},addEmptyMessage:({queryId:v,content:m,filePaths:p,currentFiles:b})=>{r(y=>{const x=new Date().toISOString(),w=v||ea(32),C={istype:"user",content:m,time:x,queryId:w,clientSideId:w+"-user",filePaths:p||"",currentFiles:b||[]},S={istype:"ai",content:"",time:new Date(Date.now()+1).toISOString(),streaming:!0,status:0,queryId:w,clientSideId:w+"-ai"},E=y.find(k=>k.id===a);return E?E.messages.push(C,S):console.warn("addEmptyMessage called without an active session."),[...y]})},setLastEmptyMessage:({now:v})=>{r(m=>{if(!m[0])return m;const p=m[0],b=p.messages||[];if(!b.length)return m;const y=b.length-1;if(y<0)return m;const x=b[y];if(x.istype!=="ai")return m;const w=b.slice();return w[y]={...x,istype:"ai",content:"",time:v,streaming:!0,status:0},[{...p,messages:w},...m.slice(1)]})},stopStream:()=>{sr&&(sr.abort(),sr=null),o(v=>({...v,display:"ready",sender:"ready"}))}}},l5="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACRSURBVHgB7ZJBCsQgDEWTmQvMncT7dOuqmY3iai6kMN31UmIjdNFFKuk+DwKahP9ABDAMQyTnvHCtT/ZjjIs0e0nN1hr03kkjGTu8+0PEjzR/S81a6+6cQz6S9x5KKdsknLi+IQRSC07JfybRhE8FM4k2fICgIKVE/MYrF427NlwtuEpOgSr8MUNy9x0Nw7jnAFsnZ7Uu5CkqAAAAAElFTkSuQmCC",{TextArea:np}=Zr,{useForm:s5}=Jt,w0={\u56DE\u7B54\u4E0D\u4F73:"ansPoor",\u683C\u5F0F\u95EE\u9898:"formatError",\u7406\u89E3\u95EE\u9898\u6709\u8BEF:"harmfulInfo",\u5176\u4ED6:"othres"},c5=({open:e,setOpen:t,feedBackList:n,handleConfirm:r})=>{const a={header:{padding:"20px 24px",borderBottom:"1px solid #F0F0F0",margin:0},body:{padding:"16px 24px 20px 24px",borderBottom:"1px solid #F0F0F0"},mask:{},footer:{padding:"16px 24px",margin:0},content:{padding:0,borderRadius:"4px",width:"563px"}},[o]=s5(),[i,l]=ft({}),s=async()=>{try{const c=await o.validateFields();t(!1);const u={...c};Object.entries(i||{}).forEach(d=>{const[g,h]=d;h&&(u[w0[g]]=h)}),r(u)}catch(c){console.log(c);return}};return mt(()=>{e||(o.resetFields(),l(null))},[e]),W(cl,{modal:{styles:a},children:Pe(dl,{open:e,onCancel:()=>t(!1),title:W("div",{className:"text-[16px] text-[#2A2A2A] font-bold leading-[1]",children:"\u611F\u8C22\u60A8\u7684\u53CD\u9988\uFF01\u8FD9\u5C06\u5E2E\u52A9\u6211\u4EEC\u4E0D\u65AD\u4F18\u5316\u4E0E\u63D0\u5347\u3002"}),footer:Pe("div",{children:[W(vn,{className:"mr-[16px] w-[76px]",onClick:()=>{t(!1)},children:"\u53D6\u6D88"}),W(vn,{type:"primary",className:"w-[76px] border-none",onClick:s,children:"\u786E\u8BA4"})]}),children:[W(u5,{feedBackList:n,treeSelectResult:i,setTreeSelectResult:l}),Pe(Jt,{form:o,layout:"vertical",children:[W(Jt.Item,{name:"supplementExplain",label:"\u8865\u5145\u63CF\u8FF0",children:W(np,{})})," ",W(Jt.Item,{name:"idealAnswer",label:"\u60A8\u89C9\u5F97\u66F4\u597D\u7684\u56DE\u7B54\u662F\u4EC0\u4E48\uFF1F",children:W(np,{})}),W(Jt.Item,{name:"userPhone",label:"\u8054\u7CFB\u7535\u8BDD",children:W(Zr,{})}),W(Jt.Item,{name:"deptName",label:"\u90E8\u95E8",children:W(Zr,{})})]})]})})},u5=({feedBackList:e,treeSelectResult:t,setTreeSelectResult:n})=>{const[r,a]=ft(!1),[o,i]=ft([]),[l,s]=ft([]),[c,u]=ft([]),[d,g]=ft(null),h=zt(()=>(s([]),d!=null&&d.items?[{title:"\u5168\u9009",key:"\u5168\u9009",children:d.items.map(m=>({title:m,key:m}))}]:[]),[d]),v=m=>{u(p=>Array.isArray(p)&&Array.isArray(l)?Object.entries(t).reduce((y,x)=>{const[w,C]=x,E=(C?C.split(";"):[]).filter(k=>k!==m);return n(k=>({...k||{},[w]:E.join(";")})),[...y,...E]},[]):p)};return mt(()=>{if(i(["\u5168\u9009"]),!t||!(d!=null&&d.que_name))return;const m=t[d.que_name]||"",p=m?m.split(";"):[];s(p)},[h,r]),mt(()=>{t===null&&(u([]),g(null),s([]))},[t]),mt(()=>{console.log("treeSelectResult",t),console.log("selectedValue",c),console.log("feedBackList",e),console.log("pKey",w0),console.log("selectedParent",d)},[t,c]),Pe("div",{className:"relative mb-[24px] z-20",children:[Pe("div",{className:"absolute w-full z-10",children:[Pe("div",{className:"h-[32px] box-border flex items-center justify-between border-[1px] border-solid border-[#D9D9D9] rounded-[4px] cursor-pointer",onClick:()=>a(!r),children:[W("div",{className:"ml-[16px]",children:"\u95EE\u9898\u7C7B\u578B"}),W("img",{src:l5,width:24,height:24,className:"mr-[16px]"})]}),Pe("div",{style:{display:r?"":"none"},className:"h-[288px] rounded-[4px] shadow-md mt-[4px] bg-white",children:[Pe("div",{className:"h-[248px] flex",style:{borderBottom:"1px solid #F0F0F0"},children:[W("div",{className:"w-[203px] px-[8px] py-[8px]",style:{borderRight:"1px solid #F0F0F0"},children:e.map((m,p)=>{var b;return Pe("div",{className:"rounded-[4px] h-[32px] cursor-pointer flex items-center",style:{backgroundColor:(d==null?void 0:d.que_name)===m.que_name?"#E6F4FF":""},children:[W("div",{className:"h-full w-full leading-[32px]",onClick:()=>{g(m)},children:Pe("div",{className:"ml-[8px] text-[14px] text-[#2A2A2A]",children:[m.que_name,"(",t&&t[m.que_name]?t[m.que_name].split(";").length:0,"/",(b=m==null?void 0:m.items)==null?void 0:b.length,")"]})}),W(Ey,{className:"mr-[8px] w-3 h-3 text-[rgba(0,0,0,0.45)]"})]},p)})}),W("div",{className:"selfTree h-full flex-1 mt-[8px] ml-[16px]",children:W(Nu,{checkable:!0,defaultSelectedKeys:["0-1"],treeData:h,blockNode:!0,checkedKeys:l,expandedKeys:o,onCheck:m=>{Array.isArray(m)&&n(p=>({...p||{},[(d==null?void 0:d.que_name)||""]:(m||[]).filter(b=>b!=="\u5168\u9009").join(";")})),s(m)}})})]}),Pe("div",{className:"flex justify-end h-[40px] items-center",children:[W(vn,{size:"small",className:"mr-[8px]",onClick:()=>a(!1),children:"\u53D6\u6D88"}),W(vn,{size:"small",type:"primary",className:"border-none mr-[16px]",onClick:()=>{u(m=>Array.isArray(m)&&Array.isArray(l)?Object.values(t).reduce((b,y)=>[...b,...y?y.split(";"):[]],[]):m),a(!1)},children:"\u786E\u8BA4"})]})]})]}),W("div",{className:"h-[32px]"}),!!(c!=null&&c.length)&&Pe("div",{children:[Pe("div",{className:"mt-[5px] text-[12px] text-[#555555]",children:["\u5DF2\u9009\u62E9 ",c.length," \u4E2A"]}),(c||[]).map(m=>{let p="";return Object.entries(t||{}).forEach(b=>{const[y,x]=b;x.indexOf(m)>-1&&(p=y)}),Pe(Pp,{closable:!0,className:"mt-[5px]",onClose:()=>v(m),children:[p,"\uFF08",m,"\uFF09"]},m)})]})]})},rp=e=>e?Array.isArray(e)?e.map(r=>"/minio/"+r.split("/").slice(3).join("/")):"/minio/"+e.split("/").slice(3).join("/"):"",ap="http://10.15.12.13:9000/",d5=e=>{if(typeof e=="string"){const t=e.split(".");return t.length?t[t.length-1]:""}else return""},f5=e=>{var C,S,E,k,$,O,D,P;const{file_type:t,file_name:n,url:r,parse_url:a,retrieve_tags:o,file_id:i,parsed_file_type:l,onlyDownloadTypes:s,references:c,eventsEmit:u,styles:d,isUploadFile:g,type:h,collectionItems:v,pdfPages:m=0,fileManagerData:p}=e;if(h==="collection"&&Array.isArray(v)){const I=`calc(90% - ${.5}px)`,M=v.slice(0,4),F=v.length>4,R="\u6253\u5F00\u5408\u96C6",T=()=>{if(p&&t==="pdf"&&!e.pdfPages){const _=((p==null?void 0:p.uploadedFiles)||[]).find(B=>{var L;return((B==null?void 0:B.name)||((L=B==null?void 0:B.file)==null?void 0:L.name))===n});if(!(_!=null&&_.pdfPages)){Kt.warning("\u8BE5PDF\u6587\u4EF6\u672A\u89E3\u6790\u5B8C\u6210\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5");return}u==null||u("reference_file:click",{...e,pdfPages:(_==null?void 0:_.pdfPages)||0})}else u==null||u("reference_file:click",e)};return Pe("div",{className:"user-file relative group flex flex-col items-center justify-center cursor-pointer backdrop-blur-sm rounded-lg border p-2 text-sm transition-all bg-white shadow",style:{width:94,height:94,minWidth:94,minHeight:94,borderColor:(S=(C=d==null?void 0:d.theme)==null?void 0:C.colors)==null?void 0:S.border},onClick:T,children:[W("div",{className:"grid grid-cols-2 items-center justify-center grid-rows-2 gap-1 w-full h-full",style:{width:"100%",height:"100%",gap:1},children:M.map((_,B)=>{var z,K,V,G;if(F&&B===3)return W("div",{className:"flex items-center justify-center bg-gray-100 rounded",style:{width:I,height:I},children:W("span",{className:"text-xl text-gray-300 font-bold scale-75",children:"..."})},"ellipsis");if(_.file_type==="image"||_.file_type==="jpg"||_.file_type==="jpeg"||_.file_type==="png"||_.file_type==="gif"||_.file_type==="bmp"||_.file_type==="webp")return W("div",{className:"relative flex items-center justify-center bg-white rounded-lg border overflow-hidden",style:{width:I,height:I,borderColor:(K=(z=d==null?void 0:d.theme)==null?void 0:z.colors)==null?void 0:K.border},children:W("div",{className:"flex items-center justify-center w-full h-full scale-75",children:W("img",{src:String(_.url||_.file_path||""),alt:_.file_name||"",className:"object-contain max-w-full max-h-full"})})},_.file_name||B);const j=Qc(String(_.file_type||""),d);return W("div",{className:"user-file flex flex-col items-center justify-center rounded-lg border bg-gray-50 p-1 text-sm",title:_.file_name,style:{width:I,height:I,borderColor:(G=(V=d==null?void 0:d.theme)==null?void 0:V.colors)==null?void 0:G.border},children:W("div",{className:"flex items-center justify-center w-full h-full scale-75",children:j})},_.file_name||B)})}),W("div",{className:"absolute inset-0 bg-transparent group-hover:bg-black/40 transition-all duration-300 flex items-center justify-center rounded-lg pointer-events-none",children:Pe("div",{className:"flex flex-col items-center text-xs justify-center text-white opacity-0 group-hover:opacity-100 transition-opacity",children:[W(Is,{size:20,className:"mb-1 text-white"}),W("span",{className:"text-white text-center",style:{fontSize:12},children:R})]})})]})}const b=()=>{if(console.log(a,"parse_url",r,"url"),p&&t==="pdf"&&!m){const A=((p==null?void 0:p.uploadedFiles)||[]).find(N=>{var I;return((N==null?void 0:N.name)||((I=N==null?void 0:N.file)==null?void 0:I.name))===(n||"").replace(/\s+/g,"")});if(!(A!=null&&A.pdfPages)){Kt.warning("\u8BE5PDF\u6587\u4EF6\u672A\u89E3\u6790\u5B8C\u6210\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5");return}u==null||u("reference_file:click",{file:n,file_type:t,url:r,parse_url:a,retrieve_tags:o,file_id:i,parsed_file_type:l,references:c,type:y,isUploadFile:g,pdfPages:A.pdfPages||0})}else u==null||u("reference_file:click",{file:n,file_type:t,url:r,parse_url:a,retrieve_tags:o,file_id:i,parsed_file_type:l,references:c,type:y,isUploadFile:g,pdfPages:m})},y=zt(()=>(n||"").split(".").pop()||"",[n]),x=Qc(y,d),w=async()=>{if(r){const A=rp(r.indexOf("http")>-1?r:`${ap}/${r}`);if(y.toLowerCase()==="json"){try{const M=await fetch(A);if(!M.ok)throw new Error("\u4E0B\u8F7D\u5931\u8D25");const F=await M.blob(),R=document.createElement("a");R.href=URL.createObjectURL(F),R.download=n||"",document.body.appendChild(R),R.click(),document.body.removeChild(R),setTimeout(()=>URL.revokeObjectURL(R.href),1e3)}catch{alert("\u6587\u4EF6\u4E0B\u8F7D\u5931\u8D25")}return}const I=document.createElement("a");I.href=A,I.download=n||"",document.body.appendChild(I),I.click(),document.body.removeChild(I)}};return s&&s.includes(y.toLowerCase())?Pe("div",{className:"user-file relative group w-24 h-24 flex flex-col items-center justify-center cursor-pointer backdrop-blur-sm rounded-lg border p-2 text-sm transition-all",title:n,onClick:w,style:{borderColor:(k=(E=d==null?void 0:d.theme)==null?void 0:E.colors)==null?void 0:k.border},children:[x,W("span",{className:"file-name font-medium truncate text-center px-2 pt-1",style:{fontSize:10,maxWidth:"5.5rem"},children:n}),W("div",{className:"absolute text-center inset-0 cursor-pointer bg-transparent group-hover:bg-black/40 transition-all duration-300 flex items-center justify-center rounded-lg",children:Pe("div",{className:"flex flex-col items-center text-xs justify-center text-white opacity-0 group-hover:opacity-100 transition-opacity",children:[W(Is,{className:"text-white opacity-0 group-hover:opacity-100 transition-opacity mx-auto"}),W("div",{className:"text-white text-center",style:{fontSize:10},children:"\u4E0B\u8F7D\u6587\u4EF6"})]})})]},n):y==="image"||y==="jpg"||y==="jpeg"||y==="png"||y==="gif"||y==="bmp"||y==="webp"?Pe("div",{className:"relative group w-24 h-24 cursor-pointer flex items-center justify-center",onClick:()=>b(),children:[r?W("img",{src:String(rp(r&&r.indexOf("http")>-1?r:`${ap}/${r}`)||""),alt:n||"",className:"w-full h-full object-cover rounded-md border",style:{borderColor:(O=($=d==null?void 0:d.theme)==null?void 0:$.colors)==null?void 0:O.border}}):W("div",{className:"w-full h-full flex items-center justify-center",children:W("span",{className:"animate-spin rounded-full border-2 border-gray-300 border-t-blue-500 w-8 h-8 inline-block"})}),W("div",{className:"absolute inset-0 bg-transparent group-hover:bg-black/40 transition-all duration-300 flex items-center justify-center rounded-md",children:Pe("div",{className:"flex flex-col items-center text-xs justify-center text-white opacity-0 group-hover:opacity-100 transition-opacity",children:[W(TF,{className:"text-white opacity-0 group-hover:opacity-100 transition-opacity mx-auto"}),W("div",{className:"text-white text-center",children:"\u67E5\u770B\u56FE\u7247"})]})})]},n):Pe("div",{className:"user-file relative group w-24 h-24 flex flex-col items-center justify-center cursor-pointer backdrop-blur-sm rounded-lg border p-2 text-sm transition-all",title:n,onClick:b,style:{borderColor:(P=(D=d==null?void 0:d.theme)==null?void 0:D.colors)==null?void 0:P.border},children:[x,W("span",{className:"file-name font-medium truncate text-center px-2 pt-1",style:{fontSize:10,maxWidth:"5.5rem"},children:n}),W("div",{className:"absolute text-center inset-0 cursor-pointer bg-transparent group-hover:bg-black/40 transition-all duration-300 flex items-center justify-center rounded-lg",children:Pe("div",{className:"flex flex-col items-center text-xs justify-center text-white opacity-0 group-hover:opacity-100 transition-opacity",children:[W(Is,{className:"text-white opacity-0 group-hover:opacity-100 transition-opacity mx-auto"}),W("div",{className:"text-white text-center",style:{fontSize:10},children:"\u6253\u5F00\u6587\u4EF6"})]})})]},n)},m5=e=>e?e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/1024/1024).toFixed(1)}MB`:"",p5=({fileName:e,fileSize:t,icon:n,statusText:r,statusColor:a="text-gray-400",statusIcon:o,onRemove:i,themeColors:l={},cardId:s,showRemove:c=!0,disabledRemove:u=!1,onRemoveWithAnim:d,extra:g,style:h})=>Pe("div",{id:s,className:"group gap-x-2.5 items-center file-display-card relative flex w-[210px] bg-white border border-gray-200 rounded-md shadow-sm px-2 py-1 transition-all hover:shadow-md hover:border-blue-300",style:h,children:[W("div",{className:"pt-1",children:n}),Pe("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[Pe("div",{className:"flex items-center justify-between gap-1",children:[W("span",{className:"text-[12px] font-medium truncate max-w-[120px]",title:e,children:e}),W("span",{className:"ml-1 text-[11px] text-gray-400",children:m5(t)})]}),Pe("div",{className:`text-[10px] mt-0.5 flex items-center gap-3 ${a}`,children:[o,W("span",{children:r})]})]}),g,c&&!u&&W("button",{className:"absolute top-0.5 right-0.5 opacity-0 group-hover:opacity-100 transition-opacity text-gray-300 hover:text-red-400 text-xs p-0.5 rounded-full bg-white shadow-sm z-10",onClick:()=>{d&&s?d(s):i&&i()},title:"\u79FB\u9664",style:{lineHeight:0,color:l.error||"#FF0000"},children:W(su,{className:"w-3.5 h-3.5"})})]});function Qc(e,t){var r;const n=((r=t==null?void 0:t.theme)==null?void 0:r.icons)||{};switch(e.toLowerCase()){case"docx":case"doc":return n.docx?W("img",{src:n.docx,alt:"docx",style:{width:20,height:20}}):W(Ut,{type:"rag/word",size:18});case"image":case"jpg":case"jpeg":case"png":case"gif":case"bmp":case"webp":case"svg":case"ico":return n.image?W("img",{src:n.image,alt:"image",style:{width:20,height:20}}):W(Ut,{type:"rag/pic",size:18});case"pptx":case"ppt":return n.pptx?W("img",{src:n.pptx,alt:"pptx",style:{width:20,height:20}}):W(Ut,{type:"rag/ppt",size:18});case"sheets":case"excel":case"xls":case"csv":case"xlsx":case"xlsm":case"xlsb":case"xltx":case"xltm":case"xlt":case"xlam":return n.sheets?W("img",{src:n.sheets,alt:"sheets",style:{width:20,height:20}}):W(Ut,{type:"rag/excel",size:18});case"pdf":return n.pdf?W("img",{src:n.pdf,alt:"pdf",style:{width:20,height:20}}):W(Ut,{type:"rag/pdf",size:18});case"txt":return n.txt?W("img",{src:n.txt,alt:"txt",style:{width:20,height:20}}):W(Ut,{type:"rag/txt",size:18});case"md":return n.md?W("img",{src:n.md,alt:"txt",style:{width:20,height:20}}):W(Ut,{type:"rag/document",size:18});case"json":return n.json?W("img",{src:n.json,alt:"json",style:{width:20,height:20}}):W(Ut,{type:"rag/json",size:18});case"html":case"htm":return n.html?W("img",{src:n.html,alt:"html",style:{width:20,height:20}}):W(Ut,{type:"rag/url",size:18});case"xml":default:return W(Ut,{type:"rag/file",size:18})}}const g5=[{file:{name:"\u4EA7\u54C1\u9700\u6C42\u6587\u6863.pdf",size:1024*1024*2.5,type:"application/pdf"},type:"pdf",status:"uploaded",url:"https://example.com/file1.pdf"},{file:{name:"\u6570\u636E\u5206\u6790\u62A5\u544A.xlsx",size:1024*1024*1.2,type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},type:"excel",status:"uploaded",url:"https://example.com/file3.xlsx"},{file:{name:"\u7CFB\u7EDF\u67B6\u6784\u56FE.png",size:1024*512,type:"image/png"},type:"image",status:"uploaded",url:"https://example.com/file2.png"}];function v5({open:e,onCancel:t,files:n=g5,currentFiles:r=[],onUpload:a,onRemoveFile:o,styles:i,eventsEmit:l}){const s={pending:"\u5F85\u4E0A\u4F20",uploading:"\u4E0A\u4F20\u4E2D",uploaded:"\u5DF2\u4E0A\u4F20",analyzing:"\u89E3\u6790\u4E2D",analyze_failed:"\u89E3\u6790\u5931\u8D25",error:"\u5931\u8D25"},[c,u]=ft([]),d=(m,p)=>{l&&l("uploaded_file:removeFromTemp",{file:m,idx:p})},g=i&&i.theme&&i.theme.colors?i.theme.colors:{primary:"#007bff",secondary:"#6c757d",success:"#008000",warning:"#FFA500",error:"#FF0000",info:"#0000FF",background:"#f8f9fa",text:"#343a40",border:"#dee2e6",disabled:"#808080",disabledBackground:"#F5F5F5",disabledText:"#808080",shadow:"#000000",appBackground:"#fff"},h=n.map((m,p)=>Pe("div",{className:"relative flex flex-col gap-2.5 items-center justify-center",children:[W("div",{className:"absolute right-1 top-1 z-10",children:W(Qg,{title:"\u786E\u8BA4\u4ECE\u4E34\u65F6\u5BF9\u8BDD\u77E5\u8BC6\u5E93\u79FB\u9664\u8BE5\u6587\u4EF6\uFF1F",onConfirm:()=>d(m,p),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",children:W("button",{className:"bg-white cursor-pointer rounded-full p-0.5",style:{lineHeight:0,color:g&&g.text?g.text:"#FF0000",transition:"background 0.2s, color 0.2s"},onMouseOver:b=>{b.currentTarget.style.color=g&&g.error?g.error:"#FF0000"},onMouseOut:b=>{b.currentTarget.style.color=g.text},title:"\u79FB\u9664",children:W(su,{className:"w-3 h-3"})})})}),W(f5,{file_type:d5(m.file.name||m.name),file_name:m.name||m.file.name,url:m.url,retrieve_tags:[],styles:i,isUploadFile:!0,eventsEmit:l,parse_url:m.convertedFilePath,pdfPages:m.pdfPages||0})]},m.file.name+p)),v=r.map((m,p)=>{const b=m.file.name.split(".").pop()||"",y=Qc(b,i);return W(p5,{cardId:`pending-file-card-${p}`,fileName:m.file.name,fileSize:m.file.size,icon:y,statusText:s[m.status||"pending"],statusColor:"text-gray-400",showRemove:!0,onRemove:()=>o&&o(m,p,"pending"),themeColors:g,style:{boxShadow:"none",height:55,background:"#f8fafc"}},m.file.name+p)});return c.length>0?(g&&g.error&&g.error,g&&g.error&&g.error+"",g&&g.error&&g.error):(g&&g.disabledText&&g.disabledText,g&&g.disabledBackground&&g.disabledBackground,g&&g.disabledText&&g.disabledText),Pe(dl,{open:e,onCancel:t,footer:null,title:"\u5BF9\u8BDD\u4E34\u65F6\u6587\u4EF6\u77E5\u8BC6\u5E93",closable:!1,width:800,styles:{body:{padding:"0",maxHeight:"70vh",overflow:"auto"}},children:[Pe("div",{className:"file-manager-modal space-y-6 px-4 py-4",children:[Pe("div",{className:"",children:[W("div",{className:"flex items-center mb-2 justify-between",children:Pe("div",{className:"flex items-center",children:[W("span",{className:"text-xs font-semibold text-gray-700",children:"\u5DF2\u4E0A\u4F20\u6587\u4EF6"}),Pe("span",{className:"ml-2 text-xs text-gray-400",children:[n.length," \u4E2A"]})]})}),W("div",{className:"w-full relative min-h-[200px] max-h-[260px] p-2 overflow-y-auto",style:{overflowX:"hidden"},children:W("div",{className:"flex flex-wrap gap-1",children:h.length>0?h:W("div",{className:"flex items-center w-full h-full py-10 justify-center text-gray-400 text-sm",children:"\u6682\u65E0\u5DF2\u4E0A\u4F20\u6587\u4EF6"})})})]}),Pe("div",{children:[Pe("div",{className:"flex items-center mb-2",children:[W("span",{className:"text-xs font-semibold text-gray-700",children:"\u5F85\u4E0A\u4F20\u6587\u4EF6"}),Pe("span",{className:"ml-2 text-xs text-gray-400",children:[r.length," \u4E2A"]})]}),Pe("div",{className:"flex gap-2 overflow-x-auto pb-2",children:[v,W(Du.Dragger,{multiple:!0,showUploadList:!1,beforeUpload:(m,p)=>(m===p[0]&&(a==null||a(p)),!1),className:"!bg-gray-50 !border-dashed !border-gray-300 hover:!border-blue-400 cursor-pointer min-w-[160px] max-w-[220px] flex flex-row items-center justify-center border-2 rounded-lg transition-all",style:{height:45,boxShadow:"none",padding:0},children:Pe("div",{className:"flex flex-row items-center pb-8 justify-center",children:[W(Rp,{size:20,className:"text-blue-400 mr-2"}),W("div",{className:"text-xs text-gray-500",children:"\u4E0A\u4F20\u6587\u4EF6"})]})})]})]}),W("div",{className:"flex justify-end gap-2",children:W(vn,{type:"primary",onClick:t,children:"\u786E\u8BA4"})})]}),W("style",{children:`
|
|
521
521
|
.file-manager-modal .ant-upload-wrapper,
|
|
522
522
|
.file-manager-modal .ant-upload-drag,
|
|
523
523
|
.file-manager-modal .ant-upload-drag-container {
|
|
@@ -525,7 +525,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
525
525
|
height: 55px !important;
|
|
526
526
|
padding: 0 !important;
|
|
527
527
|
}
|
|
528
|
-
`})]})}function
|
|
528
|
+
`})]})}function h5(){const[e,t]=ft(0);return mt(()=>{let n;return e<98?n=setTimeout(()=>{t(r=>r+Math.random()*6+1)},80):e<100&&(n=setTimeout(()=>t(100),400)),()=>clearTimeout(n)},[e]),Pe("div",{className:"flex flex-col justify-center items-center min-h-screen bg-gradient-to-br from-[#EEF4FF] via-white to-[#F5F8FF]",children:[Pe("div",{className:"mb-8 flex flex-col items-center",children:[W("div",{className:"mt-6 text-2xl font-semibold text-[#222222] tracking-wide",children:"\u5C0F\u9CB8\u667A\u80FD\u4F1A\u8BDD\u52A9\u624B"}),W("div",{className:"mt-2 text-sm text-[#555555]",children:"\u8BA9\u667A\u80FD\u5BF9\u8BDD\u66F4\u7B80\u5355"})]}),Pe("div",{className:"relative w-80 max-w-sm",children:[W("div",{className:"w-full h-2 bg-[#EEF4FF] rounded-full overflow-hidden shadow-inner",children:W("div",{className:"h-full bg-gradient-to-r from-[#2B69FF] to-[#8F91FF] transition-all duration-300 ease-out",style:{width:`${Math.min(e,100)}%`}})}),Pe("div",{className:"absolute -right-2 top-5 text-sm text-[#555555]",children:[Math.min(Math.round(e),100),"%"]})]}),Pe("div",{className:"mt-8 flex flex-col items-center gap-2",children:[W("div",{className:"text-sm text-[#555555] animate-pulse",children:"\u6B63\u5728\u521D\u59CB\u5316\u5E94\u7528"}),W("div",{className:"text-xs text-[#888888]",children:"\u9996\u6B21\u52A0\u8F7D\u53EF\u80FD\u9700\u8981\u4E00\u4E9B\u65F6\u95F4\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85"})]})]})}const S0=document.createElement("style");S0.textContent=`
|
|
529
529
|
.animate-bounce-slow {
|
|
530
530
|
animation: bounce 2.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
531
531
|
}
|
|
@@ -533,4 +533,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
533
533
|
0%, 100% { transform: translateY(0); }
|
|
534
534
|
50% { transform: translateY(-12px); }
|
|
535
535
|
}
|
|
536
|
-
`;document.head.appendChild(w0);function v5(){return B.jsxs("div",{className:"flex flex-col gap-8 p-4 w-full mx-auto",children:[B.jsxs("div",{className:"flex items-start gap-4",children:[B.jsx("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),B.jsx("div",{className:"flex-1",children:B.jsx(Go,{active:!0,paragraph:{rows:1}})})]}),B.jsxs("div",{className:"flex items-start gap-4",children:[B.jsx("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),B.jsx("div",{className:"flex-1",children:B.jsx(Go,{active:!0,paragraph:{rows:3}})})]}),B.jsxs("div",{className:"flex items-start gap-4",children:[B.jsx("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),B.jsx("div",{className:"flex-1",children:B.jsx(Go,{active:!0,paragraph:{rows:1}})})]}),B.jsxs("div",{className:"flex items-start gap-4",children:[B.jsx("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),B.jsx("div",{className:"flex-1",children:B.jsx(Go,{active:!0,paragraph:{rows:2}})})]})]})}function h5({msg:e,subMsg:t}){return B.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center bg-white/80 backdrop-blur-sm",children:[B.jsx("div",{className:"mb-6 animate-bounce",children:B.jsx(AF,{size:64,className:"text-[#d70016]"})}),B.jsx("h2",{className:"text-[20px] font-medium text-[#222222] mb-3",children:e||"\u5E94\u7528\u521D\u59CB\u5316\u5931\u8D25"}),B.jsx("p",{className:"text-[14px] text-[#555555] mb-8 max-w-[400px]",children:t||"\u65E0\u6CD5\u5B8C\u6210\u5E94\u7528\u521D\u59CB\u5316\uFF0C\u8FD9\u53EF\u80FD\u662F\u7531\u4E8E\u7F51\u7EDC\u8FDE\u63A5\u95EE\u9898\u6216\u670D\u52A1\u914D\u7F6E\u9519\u8BEF\u5BFC\u81F4\u7684\u3002\u8BF7\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u8FDE\u63A5\u5E76\u91CD\u8BD5\u3002"}),B.jsx(gn,{type:"primary",icon:B.jsx(x0,{className:"w-4 h-4"}),onClick:()=>window.location.reload(),className:"flex items-center gap-2 bg-gradient-to-r from-[#2B69FF] to-[#8F91FF] border-none hover:opacity-90",children:"\u91CD\u65B0\u52A0\u8F7D"})]})}function y5(){return B.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center bg-transparent! backdrop-blur-sm",children:[B.jsx("div",{className:"mb-6 animate-bounce",children:B.jsx(FF,{size:64,className:"text-[#d70016]"})}),B.jsx("h2",{className:"text-[20px] font-medium text-[#222222] mb-3",children:"\u62B1\u6B49\uFF0C\u9047\u5230\u4E86\u4E00\u4E9B\u95EE\u9898"}),B.jsx("p",{className:"text-[14px] text-[#555555] mb-8 max-w-[400px]",children:"\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"}),B.jsx(gn,{type:"primary",icon:B.jsx(x0,{className:"w-4 h-4"}),onClick:()=>window.location.reload(),className:"flex items-center gap-2 bg-gradient-to-r from-[#2B69FF] to-[#8F91FF] border-none hover:opacity-90",children:"\u91CD\u65B0\u52A0\u8F7D"})]})}const b5=1e3,x5=3e3,C5=({isModalOpen:e,handleOk:t,handleCancel:n,data:r})=>{const a={header:{height:"60px",borderBottom:"1px solid #F0F0F0",display:"flex",paddingLeft:"24px",alignItems:"center",marginBottom:"16px"},title:{fontSize:"16px"},body:{padding:"0 24px"},mask:{},footer:{marginTop:"0px",padding:"0 24px 16px 24px"},content:{padding:0}},[o]=pp();return ft(()=>{if(!e){o.resetFields();return}o.setFieldValue("new_name",r==null?void 0:r.label)},[r,e]),B.jsx(ls,{modal:{styles:a},children:B.jsx(us,{title:B.jsx("div",{className:"text-[16px]",children:"\u7F16\u8F91\u4F1A\u8BDD\u540D\u79F0"}),closeIcon:null,open:e,width:520,centered:!0,className:"[&:[.ant-modal-content]]:bg-red",footer:B.jsxs("div",{className:"mt-[16px] flex justify-end",children:[B.jsx(gn,{children:"\u53D6\u6D88",onClick:n,className:"mr-[8px]"}),B.jsx(gn,{children:"\u786E\u8BA4",onClick:async()=>{try{const i=await o.validateFields();t("ok_rename",i)}catch(i){console.log(i);return}},type:"primary",className:"border-none"})]}),children:B.jsx(Xt,{form:o,children:B.jsx(Xt.Item,{name:"new_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165"},{max:100,message:"\u6700\u5927\u5B57\u6570\u9650\u5236100"}],children:B.jsx(Qr,{})})})})})},w5=({isModalOpen:e,handleOk:t,handleCancel:n,data:r})=>{const a={header:{height:"60px",borderBottom:"1px solid #F0F0F0",display:"flex",paddingLeft:"24px",alignItems:"center",marginBottom:"16px"},title:{fontSize:"16px"},body:{padding:"0 24px"},mask:{},footer:{marginTop:"0px",padding:"0 24px 16px 24px"},content:{padding:0}},[o]=pp();return ft(()=>{if(!e){o.resetFields();return}o.setFieldValue("new_name",r==null?void 0:r.label)},[r,e]),B.jsx(ls,{modal:{styles:a},children:B.jsx(us,{title:B.jsx("div",{className:"text-[16px]",children:"\u5220\u9664\u4F1A\u8BDD"}),closeIcon:null,open:e,width:520,centered:!0,className:"[&:[.ant-modal-content]]:bg-red",footer:B.jsxs("div",{className:"mt-[16px] flex justify-end",children:[B.jsx(gn,{children:"\u53D6\u6D88",onClick:n,className:"mr-[8px]"}),B.jsx(gn,{children:"\u786E\u8BA4",onClick:async()=>{try{const i=await o.validateFields();t("ok_remove",i)}catch(i){console.log(i);return}},type:"primary",className:"border-none"})]}),children:B.jsx("div",{children:`\u786E\u5B9A\u8981\u5220\u9664\u4F1A\u8BDD\u300C${r.label}\u300D\u5417\uFF1F\u5220\u9664\u540E\u65E0\u6CD5\u6062\u590D\u3002`})})})};function q5(e=XN){return function({token:n,url:r="http://localhost:8888",styles:a,CSRFToken:o,eventsEmit:i,...s}){const l=Lt(()=>O0({theme:Qc,mode:"light"},a),[a]),[c,u]=dt(!1),[d,g]=dt(!1),[h,v]=dt(null),[m,p]=dt([]),[b,y]=dt([]),[x,w]=dt(void 0),[C,S]=dt([]),[E,k]=dt([]),[$,O]=dt(void 0),[D,P]=dt(!1),[R,N]=dt({display:"ready",sender:"ready",app:"initializing"}),[I,M]=dt([]);function F(q,V){if(!V)return q;const ne=Array.isArray(q)?[...q]:{...q};for(const le in V)V[le]!==void 0&&V[le]!==null&&Object.prototype.hasOwnProperty.call(V,le)&&(typeof q[le]=="object"&&q[le]!==null&&!Array.isArray(q[le])&&typeof V[le]=="object"&&V[le]!==null&&!Array.isArray(V[le])?ne[le]=F(q[le],V[le]):ne[le]=V[le]);return ne}const[j,A]=dt(()=>F(Qm,s.senderConfig));ft(()=>{s.senderConfig&&(console.log("hahah",j,s.senderConfig),A(F(Qm,s.senderConfig)))},[s.senderConfig]);const[_,L]=dt([]),[z,T]=dt(()=>({uploadedFiles:[]}));ft(()=>{console.log("fileManagerData",z)},[]),ft(()=>{if(!x)return;const q=b.find(le=>le.id===x);let V=[],ne=!1;if(q&&q.messages){const le=[...q.messages||[]].reverse().find(Se=>Se.istype==="ai");if(le!=null&&le.reference&&le.resultType===5){ne=!0;try{V=JSON.parse(le.reference).map(Ae=>tt(Ae))}catch{}}}ne&&T({uploadedFiles:V})},[b]),ft(()=>{T({uploadedFiles:[]})},[x]);const[H,W]=be.useState(()=>{var V;if(!E||E.length===0)return;const q=E.find(ne=>ne.isDefault);return q?q.id:(V=E[0])==null?void 0:V.id});be.useEffect(()=>{if(!E||E.length===0)return;const q=E.some(V=>V.id===H);if(!H||!q){const V=E.find(ne=>ne.isDefault);W(V?V.id:E[0].id)}},[E]);const[K,G]=dt({}),U=wt(void 0),Z=wt(void 0),Q=wt(void 0);wt({sessionId:""}),wt(null);const[Y,ee]=dt({}),[ce,me]=dt(!1),[we,se]=dt([]),ge=wt(!1),{api_startChat_re:Ee,addEmptyMessage:Te,setLastEmptyMessage:Pe,stopStream:he}=a5({baseUrl:r,CSRFToken:o,token:n,setChatData:y,activeSessionId:x,setAppStatus:N,setConversationList:p}),ke=Lt(()=>{const q={};return(E||[]).forEach(V=>{q[V.id]=V}),q},[E]),de=Lt(()=>{const q=b.find(ne=>ne.id===x)||{id:x,messages:[]},V=q.configId?ke[q.configId]:null;return{...q,assistantInfo:V}},[b,x,ke]),Re=Lt(()=>{if(de.configId&&ke){const q=ke[de.configId];return q!=null&&q.configJson?JSON.parse(q.configJson).is_download:!1}else return!1},[de.configId,ke]),He=Lt(()=>{if((de.configId||$)&&ke){const q=ke[de.configId];if(q!=null&&q.configJson){const V=JSON.parse(q.configJson);return console.log("is_enableThinking",de.configId,ke,$),!!V.thinking}else if($){const V=ke[$];if(V!=null&&V.configJson)return!!JSON.parse(V.configJson).thinking}}return!1},[de.configId,ke,$]);function Ke(q,V){const ne=new Map;return q.forEach(le=>ne.set(le.uid,tt(le))),V.forEach(le=>ne.set(le.uid,tt(le))),Array.from(ne.values())}function tt(q){if(!q||q.file&&q.file.name)return q;const V=q.name||q.fileName||"";return{...q,url:q.filePath||"",uid:q.uid||"",file:{name:V,size:typeof q.size=="string"&&q.size.endsWith("MB")?Number(q.size.replace("MB",""))*1024*1024:q.size||0,type:q.type||""},name:V}}ft(()=>{if(U.current&&U.current!==x){const V=U.current,ne=m.find(Ae=>Ae.sessionId===V&&Ae.isNew),le=b.find(Ae=>Ae.id===V&&Ae.isNew),Se=le&&le.messages&&le.messages.length>0;ne&&!Se&&(p(Ae=>Ae.filter(ct=>ct.sessionId!==V)),y(Ae=>Ae.filter(ct=>ct.id!==V)))}U.current=x;const q=de.messages&&de.messages.length>0?de.messages[de.messages.length-1].recommendQuestion:[];S(q)},[x,m,b,de.messages]),ft(()=>{N(q=>({...q,app:"initializing"})),Promise.all([kn.get(`${r}/qa/dialogue/list?pageNo=1&pageSize=3000&sysType=INT_SESSION`,{headers:{Authorization:n}}),kn.get(`${r}/qa/search/config/helper/list?pageNo=1&pageSize=3000`,{headers:{Authorization:n}})]).then(([q,V])=>{const ne=q.data.data.records||[];p(ne),x||ie(),k(V.data.data||[]),N(le=>({...le,app:"ready"}))}).catch(q=>{N(V=>({...V,app:"error"}))})},[r,n]),ft(()=>{x&&(N(q=>({...q,display:"loading"})),kn.get(`${r}/qa/dialogue/getDialogBySessionId?sessionId=${x}`,{headers:{Authorization:n}}).then(q=>{var De;if(!q.data.data){N(Me=>({...Me,display:"ready"}));return}const V=((De=q.data.data)==null?void 0:De.queryReplyPairList)||[],ne=qF(V),{sessionId:le,searchConfigDTO:Se,filePath:Ae,configId:ct,reference:Qe,webReference:it,uploadedFiles:gt,fileList:Ve,currentFiles:ht}=q.data.data;if(ne.length>0){const Me=ne.length-1-[...ne].reverse().findIndex(Be=>Be.istype==="ai");Me>=0&&Me<ne.length&&ne[Me].istype==="ai"&&(Qe&&(ne[Me].reference=Qe),it&&(ne[Me].webReference=it))}const Ze=ht||Ve||gt;if(Ze&&ne.length>0){const Me=[...ne].reverse().findIndex(Be=>Be.istype==="user");Me!==-1&&(console.log(ne[ne.length-1-Me].currentFiles,"filesData"),ne[ne.length-1-Me].currentFiles=Ze)}m.find(Me=>Me.sessionId===le)&&p(Me=>Me.map(Be=>Be.sessionId===le?{...Be,searchConfigDTO:Se,filePath:Ae,configId:ct}:Be));const je={configId:q.data.data.configId,filePath:q.data.data.filePath,searchConfigDTO:q.data.data.searchConfigDTO||{},sessionId:q.data.data.sessionId,label:q.data.data.label,kbId:q.data.data.kbId};y(Me=>{const Be=Me.filter(yt=>yt.id!==x);return[{id:x,messages:ne,...je},...Be]}),N(Me=>({...Me,display:"ready"}))}).catch(q=>{console.error("\u83B7\u53D6\u804A\u5929\u6570\u636E\u5931\u8D25:",q),q.response&&q.response.status===404&&ie(),N(V=>({...V,display:"error"}))}))},[x,r,n]),ft(()=>{const q=z.uploadedFiles.length;A(V=>{const ne=Array.isArray(V.actions)?V.actions:[];return{...V,actions:ne.map(Se=>Se.name==="history"?{...Se,badgeCount:q}:Se)}})},[z.uploadedFiles]),ft(()=>{UF({url:r,token:n},q=>{se(q)})},[]),be.useEffect(()=>{_.length&&y(q=>{if(!q[0])return q;const{messages:V}=q[0];for(let ne=V.length-1;ne>=0;ne--)if(V[ne].istype==="user"){const le=V[ne].currentFiles||[];V[ne].currentFiles=_.map(Se=>{var ct,Qe,it;const Ae=le.find(gt=>gt.uid===Se.uid);return{name:((ct=Se.file)==null?void 0:ct.name)||Se.name,size:((Qe=Se.file)==null?void 0:Qe.size)||Se.size,type:((it=Se.file)==null?void 0:it.type)||Se.type,status:Se.status,uid:Se.uid,url:Se.url||(Ae==null?void 0:Ae.url)||""}});break}return[...q]})},[_]);let qe=null,We=null;const lt=(q,V,ne,le)=>{const Se=q.join(",");let Ae=0;We=()=>{ge.current=!0};const ct=async()=>{if(!ge.current){if(Ae>=b5){ge.current||le("\u6587\u4EF6\u89E3\u6790\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");return}Ae++;try{const Qe=await kn.get(`${r}/index/knowledgeBase/file/getFileStatusByUids?uids=${Se}`,{headers:{Authorization:n}});if(ge.current)return;if(Qe.data.success){const it=Qe.data.data;ge.current||V(it),it.every(Ve=>Ve.status===3)?ge.current||ne():ge.current||setTimeout(ct,x5)}else ge.current||le(Qe.data.errorMsg||"\u67E5\u8BE2\u6587\u4EF6\u72B6\u6001\u5931\u8D25")}catch{if(ge.current)return;le("\u67E5\u8BE2\u6587\u4EF6\u72B6\u6001\u65F6\u53D1\u751F\u7F51\u7EDC\u9519\u8BEF")}}};ct()},Fe=(q,V)=>{y(ne=>{const le=[...ne];return le[0]&&(le[0]={...le[0],messages:le[0].messages.map(Se=>Se.queryId===q?{...Se,feedbackResult:V}:Se)}),le})},ae=async q=>{var V,ne;if(q)try{const le=(de==null?void 0:de.configId)||((V=ke==null?void 0:ke[(de==null?void 0:de.configId)||""])==null?void 0:V.id)||"",Se=await kn.get(`${r}/qa/ai/recommendQuestion?queryId=${q}&configId=${le||""}`.replace(/\?&/,"?"),{headers:{Authorization:n}});S(((ne=Se.data)==null?void 0:ne.data)||[])}catch{S([])}};function Le(q){const{content:V,audioUrl:ne,filePaths:le,queryId:Se}=q;if(!x||!Se)return;const Ae=(de==null?void 0:de.messages)||[],ct=Ae.findIndex(Ze=>(Ze==null?void 0:Ze.queryId)===Se&&((Ze==null?void 0:Ze.istype)==="ai"||(Ze==null?void 0:Ze.isUser)===!1));let Qe;if(ct>0)for(let Ze=ct-1;Ze>=0;Ze-=1){const kt=Ae[Ze];if((kt==null?void 0:kt.istype)==="user"||(kt==null?void 0:kt.isUser)===!0){Qe=kt;break}}const it=(Qe==null?void 0:Qe.content)??V;if(!it)return;const gt=(Qe==null?void 0:Qe.filePaths)??le,Ve=(typeof gt=="string"&>?JSON.parse(gt):gt||[]).map(Ze=>Ze.uid),ht=Date.now();Pe({now:ht}),N(Ze=>({...Ze,display:"processing",sender:"processing"})),q.clearFn&&q.clearFn(),p(Ze=>Ze.map(kt=>kt.sessionId===x?{...kt,gmtModified:ht}:kt)),Ee({configId:de.configId,content:it,fileUids:Ve,lastDate:ht,name:de.label||"",queryId:Se,sessionId:String(x||""),type:(Qe==null?void 0:Qe.audioUrl)??ne?"audioUrl":"text",audioUrl:((Qe==null?void 0:Qe.audioUrl)??ne)||"",enableThinking:!!K.reasoning,enableWebsearch:!!K.netSearch},Ze=>{ae(Se)})}async function Ce(q,V){if(!x)return;const ne=m.find(le=>le.sessionId===x);if(ne&&ne.isNew){let le=!1;const Se=$||ne.configId,Ae=q&&q.content?q.content.slice(0,20):ne.label||"\u672A\u547D\u540D\u4F1A\u8BDD";if(await new Promise((ct,Qe)=>{XF({url:r,token:n,CSRFToken:o},{label:Ae,sessionId:ne.sessionId,sysType:"INT_SESSION",configId:Se},it=>{it&&it.data&&it.data.sessionId?(p(gt=>gt.map(Ve=>Ve.sessionId===ne.sessionId?{...Ve,isNew:!1,configId:Se,label:Ae}:Ve)),y(gt=>gt.map(Ve=>Ve.id===ne.sessionId?{...Ve,isNew:!1,configId:Se,label:Ae}:Ve)),le=!0,ct()):(Vt.error("\u521B\u5EFA\u4F1A\u8BDD\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),Qe())})}),!le)return;$e(x,q,V,Se);return}$e(x,q,V)}function $e(q,V,ne,le){const Se="query-"+Zr(32),Ae=m.find(Ve=>Ve.sessionId===q),ct=le||(Ae==null?void 0:Ae.configId)||de.configId;console.log("\u52A9\u624B\u914D\u7F6E\u8BE6\u60C5",ct);const Qe=V&&V.content?V.content.slice(0,20):"\u672A\u547D\u540D\u4F1A\u8BDD";let it;if(V.files&&V.files.length>0&&(it=V.files.map(Ve=>({name:Ve.file.name,size:Ve.file.size,type:Ve.file.type,filePath:Ve.filePath||"",convertedFilePath:Ve.convertedFilePath||"",uid:Ve.uid||""}))),console.log("\u672C\u5730\u6587\u4EF6\u4E0A\u4F20",V.files),Te({content:V.content||V.text||"",queryId:Se,currentFiles:it,filePaths:it?JSON.stringify(it):void 0}),p(Ve=>Ve.map(ht=>ht.sessionId===q&&ht.label==="\u672A\u547D\u540D\u4F1A\u8BDD"&&ht.isNew?{...ht,label:Qe,gmtModified:Date.now(),isNew:!1}:ht)),y(Ve=>Ve.map(ht=>ht.id===q&&ht.label==="\u672A\u547D\u540D\u4F1A\u8BDD"&&ht.isNew?{...ht,label:Qe,isNew:!1}:ht)),V.files&&V.files.length>0){N(je=>({...je,sender:"uploading",display:"uploading"})),qe=new AbortController,ge.current=!1;const Ve=V.files.map(()=>`rc-upload-${Date.now()}-${Math.random().toString(36).slice(2)}`),ht=V.files.map((je,De)=>({...je,uid:Ve[De],status:"uploading"}));L(ht);const Ze=new FormData;V.files.forEach(je=>{Ze.append("files",je.file)});const kt=String(q||"");Ze.append("sessionId",kt),Ze.append("uids",Ve.join(",")),kn.post(`${r}/index/knowledgeBase/file/uploadFiles`,Ze,{headers:{Authorization:n,"Content-Type":"multipart/form-data"},signal:qe.signal}).then(je=>{if(console.log("\u6587\u4EF6\u4E0A\u4F20\u7684\u6253\u5370\u7ED3\u679C",je),!ge.current)if(je.data.success&&Array.isArray(je.data.data)&&je.data.data.length>0){L(Be=>Be.map(et=>{const yt=je.data.data.find(vt=>vt.uid===et.uid);return yt?{...et,...yt}:et})),N(Be=>({...Be,sender:"processing",display:"analyzing"})),L(Be=>Be.map(et=>({...et,status:"parsing"})));const De=je.data.data,Me=De.map(Be=>Be.uid);lt(Me,Be=>{if(L(yt=>yt.map(vt=>{const _t=Be.find(jt=>jt.uid===vt.uid);if(_t)switch(_t.status){case 3:return{...vt,status:"done"};case 4:return{...vt,status:"error"};case 1:case 2:default:return{...vt,status:"parsing"}}return vt})),Be.length>0&&Be.every(yt=>yt.status===3)){L([]);const yt=new Map;(Be||[]).forEach(vt=>{yt.set(vt.id,vt)}),T(vt=>({uploadedFiles:Ke(vt.uploadedFiles,De).map(jt=>{var nn;return{...jt,pdfPages:((nn=yt.get(jt.id))==null?void 0:nn.pdfPages)||0}})}))}},()=>{ne==null||ne(),N(et=>({...et,sender:"processing",display:"processing"})),L(et=>et.map(yt=>{const vt=De.find(_t=>_t.uid===yt.uid);return vt?{...yt,...vt,url:vt.filePath,filePath:vt.filePath,name:vt.fileName||yt.name,convertedFilePath:vt.convertedFilePath||yt.convertedFilePath}:yt})),y(et=>{if(!et[0])return et;const{messages:yt}=et[0];for(let vt=yt.length-1;vt>=0;vt--)if(yt[vt].istype==="user"){const _t=yt[vt].currentFiles||[];yt[vt].currentFiles=_t.map(jt=>{const nn=De.find(Dn=>Dn.uid===jt.uid);return nn?{...jt,...nn}:jt});break}return[...et]});const Be=Date.now();Ee({configId:ct,content:V.content||V.text||"",fileUids:Me,lastDate:Be,name:Qe,queryId:Se,sessionId:String(q||""),type:"text",audioUrl:"",enableThinking:!!K.reasoning,enableWebsearch:!!K.netSearch},et=>{ae(Se)})},Be=>{N(et=>({...et,display:"ready",sender:"ready"})),L(et=>et.map(yt=>({...yt,status:"error",message:Be})))})}else{const De=je.data.errorMsg||"\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25";N(Me=>({...Me,display:"error",sender:"ready"})),L(Me=>Me.map(Be=>({...Be,status:"error",message:De})))}}).catch(je=>{var De,Me;((De=je==null?void 0:je.response)==null?void 0:De.status)===413?(Me=je==null?void 0:je.response)!=null&&Me.statusText.includes("Request Entity Too Large")&&Vt.error("\u6587\u4EF6\u8D85\u8FC7\u6700\u5927\u53EF\u4E0A\u4F20\u9650\u5236"):Vt.error("\u7F51\u7EDC\u9519\u8BEF"),N(Be=>({...Be,display:"error",sender:"ready"})),L(Be=>Be.map(et=>({...et,status:"error",message:"\u7F51\u7EDC\u9519\u8BEF"})))});return}N(Ve=>({...Ve,display:"processing",sender:"processing"}));const gt=Date.now();p(Ve=>Ve.map(ht=>ht.sessionId===q?{...ht,gmtModified:gt}:ht)),ne==null||ne(),Ee({configId:ct,content:V.content||V.text||"",fileUids:[],lastDate:gt,name:Qe,queryId:Se,sessionId:String(q||""),type:"text",audioUrl:"",enableThinking:!!K.reasoning,enableWebsearch:!!K.netSearch},Ve=>{ae(Se)})}function ue(q){q.restult==1?Il({url:r,token:n,CSRFToken:o},{queryId:q.queryId},()=>{Fe(q.queryId,null)}):ep({url:r,token:n,CSRFToken:o},{restult:1,queryId:q.queryId},()=>{Fe(q.queryId,1)})}function ie(q){const V=Zr(32),ne={sessionId:V,label:"\u672A\u547D\u540D\u4F1A\u8BDD",gmtModified:Date.now(),searchConfigDTO:{},filePath:"",configId:"",isNew:!0};p(le=>[{...ne,messages:[]},...le]),y(le=>[{id:V,messages:[],...ne},...le]),w(V)}const xe=q=>{var Se;const V=new Set([...z.uploadedFiles.map(Ae=>Ae.file.name),...I.map(Ae=>Ae.file.name)]),ne=[],le=new Set;Array.from(q).forEach(Ae=>{V.has(Ae.name)?le.add(Ae.name):(ne.push({file:Ae,type:Zm(Ae.name),status:"pending",preview:Ae.type.startsWith("image")?URL.createObjectURL(Ae):void 0}),V.add(Ae.name))}),le.size>0&&Vt.warning(`\u4E0D\u80FD\u4E0A\u4F20\u540C\u540D\u6587\u4EF6: ${Array.from(le).join(", ")}`),ne.length>0&&(M(Ae=>[...Ae,...ne]),(Se=Z.current)==null||Se.call(Z,ne))},_e=(q,V,ne)=>{var le;(le=Q.current)==null||le.call(Q,q,V,ne)};function ze(q){if(q!=null&&q.sessionId&&q.sessionId!==x){w(q.sessionId),N(ne=>({...ne,sender:"ready"}));const V=b.find(ne=>ne.id===q.sessionId);if(V&&V.messages&&V.messages.length>0){const ne=[...V.messages].reverse().find(le=>le.istype==="ai");ne&&ne.recommendQuestion?S(ne.recommendQuestion):S([])}else S([])}}const st=async q=>new Promise((V,ne)=>{GF({url:r,token:n,CSRFToken:o},{sessionId:q},le=>{le?(Vt.success("\u5220\u9664\u6210\u529F!"),V(le)):(Vt.error("\u5220\u9664\u5931\u8D25!"),ne(le))})}),Ne=async()=>{try{const V=(await kn.get(`${r}/qa/dialogue/list?pageNo=1&pageSize=3000&sysType=INT_SESSION`,{headers:{Authorization:n}})).data.data.records||[];return p(V),V}catch(q){throw Vt.error("\u5237\u65B0\u4F1A\u8BDD\u5217\u8868\u5931\u8D25"),q}},Ie=async(q,V)=>new Promise((ne,le)=>{YF({url:r,token:n,CSRFToken:o},{label:V,sessionId:q},Se=>{if(Se){const Ae=Date.now();p(ct=>ct.map(Qe=>Qe.sessionId===q?{...Qe,label:V,gmtModified:Ae}:Qe)),Vt.success("\u91CD\u547D\u540D\u6210\u529F!"),ne(Se)}else Vt.error("\u91CD\u547D\u540D\u5931\u8D25"),le(Se)})}),Ue=q=>{p(V=>{const ne=V.filter(le=>le.sessionId!==q);return x===q&&(ne.length>0?w(ne[0].sessionId):ie()),ne})},Ye=(q,V)=>{const ne=Date.now();p(le=>le.map(Se=>Se.sessionId===q?{...Se,label:V,gmtModified:ne}:Se))},bt=q=>{ep({url:r,token:n,CSRFToken:o},{...q,...Y,restult:0},()=>{Fe(Y.queryId,0)})},At=q=>{const V=q.new_name,ne=h.data.label;V&&V!==ne?h.async_renameConversation(V).then(()=>{h.fn_renameItemInList(V),u(!1)}).catch(()=>{}):u(!1)},Ht=q=>{h.async_deleteConversation().then(()=>{h.fn_removeItemFromList(),g(!1)}).catch(()=>{})},Ft=(q,V)=>{switch(console.log(q,V),q){case"close_remove":g(!1);break;case"close_rename":u(!1);break;case"ok_rename":At(V);break;case"ok_remove":Ht();break}},Yt=async({url:q,params:V,replacePredataFunction:ne})=>{var le,Se;try{const Ae=await kn.post(q,V,{headers:{Authorization:n}}),ct=(Se=(le=Ae==null?void 0:Ae.data)==null?void 0:le.data)==null?void 0:Se.data;ct&&ne(ct)}catch(Ae){console.log("error",Ae)}},Tt=(q,V)=>{var ne,le,Se;switch(console.log(`[Event] ${q}`,V),q){case"retrieve-sql-data:pagingation_click":const{page:Ae,pageSize:ct,fetchUrl:Qe,source:it,replacePredataFunction:gt}=V;Yt({url:`${r}${Qe}`,replacePredataFunction:gt,params:{pageNo:Ae,pageSize:ct,convertedFilePath:it,stream:!1}});break;case"web_referenceFile_title:click":if(!((ne=V==null?void 0:V.data)!=null&&ne.link))return console.error("\u6CA1\u6709\u7F51\u9875\u5730\u5740");window.open(V.data.link,"_blank");break;case"conversation:item_click":ze(V);break;case"files:finished_animation_complete":L([]);break;case"conversation:create":ie();break;case"conversation:new_assistant_change":O(V.assistantId);break;case"conversations:rename_icon_clicked":v({data:V,async_renameConversation:Ve=>Ie(V.sessionId,Ve),fn_renameItemInList:Ve=>Ye(V.sessionId,Ve)}),u(!0);break;case"conversations:delete_icon_clicked":v({data:V,async_deleteConversation:()=>st(V.sessionId),async_refreshConversationList:Ne,fn_removeItemFromList:()=>Ue(V.sessionId)}),g(!0);break;case"sender:send":Ce(V,V.clearFn);break;case"sender:send_recommandQuestion":{const Ve=((V==null?void 0:V.content)??"").toString();if(!Ve)break;Ce({content:Ve},()=>{});break}case"chatbox:follow_up_question_click":{const Ve=((V==null?void 0:V.question)??(V==null?void 0:V.content)??"").toString();if(!Ve)break;Ce({content:Ve},()=>{});break}case"sender:action_history":P(!0);break;case"sender:stop":ge.current=!0,qe&&(qe.abort(),qe=null),We&&(We(),We=null),N(Ve=>({...Ve,display:"ready",sender:"ready"})),L([]),he==null||he();break;case"sender:clear":(le=V.clearFn)==null||le.call(V);break;case"sender:configChange":V&&V.all&&G(V.all);break;case"action_copy:click":V&&WF(V.content,V.event);break;case"chatbox:copy":{const Ve=(V==null?void 0:V.content)||"";if(!Ve)break;const ht=async kt=>{try{return await navigator.clipboard.writeText(kt),Vt.success("\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F"),!0}catch{return!1}},Ze=kt=>{const je=document.createElement("textarea");je.value=kt,je.style.position="fixed",je.style.opacity="0",document.body.appendChild(je),je.focus(),je.select();try{document.execCommand("copy"),Vt.success("\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F")}catch{Vt.error("\u590D\u5236\u5931\u8D25")}document.body.removeChild(je)};ht(Ve).then(kt=>{kt||Ze(Ve)});break}case"chatbox:repeat":console.log(V,"sdkflskdjflksdjfklsdjlfkjsdklfjsdklfjlks"),Le(V);break;case"action_thumbsup":ue(V);break;case"chatbox:like":ue({queryId:V==null?void 0:V.queryId,restult:V==null?void 0:V.result});break;case"action_thumbsdown":V.restult===0?Il({url:r,token:n,CSRFToken:o},{queryId:V.queryId},()=>{Fe(V.queryId,null)}):(ee(V),me(!0));break;case"chatbox:dislike":(V==null?void 0:V.result)===0?Il({url:r,token:n,CSRFToken:o},{queryId:V.queryId},()=>{Fe(V.queryId,null)}):(ee({queryId:V==null?void 0:V.queryId}),me(!0));break;case"action_retrive_tag":i==null||i("action_retrive_tag",V);break;case"referenceFile_view":i==null||i("referenceFile_view",V);break;case"referenceFile_question":console.log(V,"zhezhhzhzh"),i==null||i("referenceFile_question",V);break;case"referenceFile_download":i==null||i("referenceFile_download",V);break;case"retrive_tag:click":i==null||i("retrive_tag:click",V);break;case"fileManager:change":{const Ve=Array.isArray(V==null?void 0:V.uploadedFiles)?V.uploadedFiles:[];M(Ve),typeof(V==null?void 0:V.setUploadedFiles)=="function"&&(Z.current=V.setUploadedFiles,Q.current=V.removeFile);break}case"uploaded_file:removeFromTemp":{console.log("[DEBUG] mergedEventsEmit uploaded_file:removeFromTemp \u4E8B\u4EF6",V);const Ve=(Se=V==null?void 0:V.file)==null?void 0:Se.uid;if(!Ve){console.warn("[DEBUG] \u7F3A\u5C11uid\uFF0C\u65E0\u6CD5\u5220\u9664\u4E34\u65F6\u6587\u4EF6",V);break}const ht=[...de.messages||[]].reverse().find(kt=>kt.istype==="user"),Ze=ht==null?void 0:ht.queryId;JF({url:r,token:n,CSRFToken:o},{uid:Ve,queryId:Ze},(kt,je)=>{if(kt){if(Vt.success("\u6587\u4EF6\u5DF2\u4ECE\u4E34\u65F6\u77E5\u8BC6\u5E93\u79FB\u9664"),je&&Array.isArray(je.data&&je.data.data)){const De=je.data.data.map(Me=>{var et;const Be=Me.name||Me.fileName||"";return{file:{name:Be,size:Number((et=Me.size)==null?void 0:et.replace("MB",""))*1024*1024||0,type:Me.type},type:Zm(Be),status:"uploaded",url:Me.filePath,convertedFilePath:Me.convertedFilePath,uid:Me.uid,preview:Me.type==="image"?Me.filePath:void 0}});T({uploadedFiles:De})}}else console.log("[DEBUG] removeFilefromTempUpload \u56DE\u8C03 false\uFF0Cres:",je),Vt.error("\u6587\u4EF6\u79FB\u9664\u5931\u8D25")});break}case"uploaded_file:remove_batch":break;default:i==null||i(q,V)}},tn=[{key:"conversations",type:"custom",label:"\u5BF9\u8BDD\u5386\u53F2",icon:B.jsx(RF,{size:16}),enabled:!0,component:B.jsx(KF,{data:m,assistantList:E,activedItem:x||"",sortRules:[{label:"\u5F53\u5929",dayPeriod:1},{label:"3\u5929",dayPeriod:3},{label:"7\u5929",dayPeriod:7},{label:"30\u5929",dayPeriod:30}],eventsEmit:Tt,styles:l.theme})}],un=be.useMemo(()=>()=>B.jsx(r5,{eventsEmit:Tt,assistantList:E,styles:l,selectedId:H,onSelectAssistant:W}),[H]),Tn={...be.useMemo(()=>({AiChatBox:(q,V)=>{var Qe,it;const ne=V===(((Qe=de==null?void 0:de.messages)==null?void 0:Qe.length)||0)-1;let le="ready";if(ne)if(q.status!==void 0)switch(q.status){case 0:le="thinking";break;case 1:le="processing";break;case 2:le="ready";break;case 3:le="error";break;default:le=R.display}else le=R.display;let Se=[];if(Array.isArray(C))Se=C;else if(typeof C=="string")try{Se=JSON.parse(C)||[]}catch{Se=[]}const Ae=(()=>{const gt=q==null?void 0:q.reference;if(!gt)return"[]";if(typeof gt=="string")try{return JSON.parse(gt),gt}catch{return"[]"}try{return JSON.stringify(gt)}catch{return"[]"}})(),ct=(()=>{const gt=q==null?void 0:q.webReference;if(!gt)return"[]";if(typeof gt=="string")try{return JSON.parse(gt),gt}catch{return"[]"}try{return JSON.stringify(gt)}catch{return"[]"}})();return B.jsx(id,{...q,reference:Ae,webReference:ct,contentType:"stream",displayStatus:le,eventsEmit:Tt,isLast:ne&&(q==null?void 0:q.istype)==="ai",followUpQuestions:ne&&(q==null?void 0:q.istype)==="ai"?Se:[],defaultAnswer:((it=de==null?void 0:de.searchConfigDTO)==null?void 0:it.defaultAnswer)||"\u4E0D\u77E5\u9053\u4EC0\u4E48\u539F\u56E0\u6211\u4EEC\u6CA1\u80FD\u67E5\u5230\u4F60\u8981\u7684\u95EE\u9898*-*",is_download:Re,styles:l},`${(q==null?void 0:q.queryId)||(q==null?void 0:q.id)||V}-${(q==null?void 0:q.istype)||"unknown"}`)},LogoBox:q=>q&&q.LogoBox===null?null:q&&typeof q.LogoBox=="function"?B.jsx(q.LogoBox,{}):B.jsx("div",{className:"text-2xl w-full text-center font-bold",children:"\u5C0F\u9CB8\u667A\u80FD\u52A9\u624B"}),DisplayLoading:()=>B.jsx(v5,{}),DisplayError:()=>B.jsx(y5,{}),AppError:()=>B.jsx(h5,{msg:"\u5E94\u7528\u521D\u59CB\u5316\u5931\u8D25",subMsg:"\u65E0\u6CD5\u5B8C\u6210\u5E94\u7528\u521D\u59CB\u5316\uFF0C\u8FD9\u53EF\u80FD\u662F\u7531\u4E8E\u7F51\u7EDC\u8FDE\u63A5\u95EE\u9898\u6216\u670D\u52A1\u914D\u7F6E\u9519\u8BEF\u5BFC\u81F4\u7684\u3002\u8BF7\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u8FDE\u63A5\u5E76\u91CD\u8BD5\u3002"}),AppLoading:()=>B.jsx(g5,{}),UserChatBox:(q,V)=>B.jsx(id,{...q,contentType:"plainText",isUser:!0,displayStatus:"ready",eventsEmit:Tt,styles:l,fileManagerData:z},`${(q==null?void 0:q.queryId)||(q==null?void 0:q.id)||V}-user`),WelcomeComponent:un}),[un,de,R.display,Tt,l,Re,z]),...s.CustomComponents||{}};return ft(()=>{A(q=>{const V=Array.isArray(q.switchs)?q.switchs.map(ne=>ne.name==="reasoning"?{...ne,enabled:He}:ne):[];return{...q,switchs:V}})},[He]),B.jsxs(B.Fragment,{children:[B.jsx(p5,{open:D,onCancel:()=>P(!1),files:z.uploadedFiles,currentFiles:I,onUpload:xe,onRemoveFile:_e,styles:l,eventsEmit:Tt}),B.jsx(e,{...s,status:R,chatData:de,sidebar:tn,recommandQuestions:[],eventsEmit:Tt,styles:l,senderConfig:j,fileUploadStatus:_,CustomComponents:Tn,activeSessionId:x}),B.jsx(s5,{open:ce,feedBackList:we,setOpen:me,handleConfirm:bt}),B.jsx(C5,{isModalOpen:c,handleOk:Ft,handleCancel:()=>Ft("close_rename"),data:(h==null?void 0:h.data)||{}}),B.jsx(w5,{isModalOpen:d,handleOk:Ft,handleCancel:()=>Ft("close_remove"),data:(h==null?void 0:h.data)||{}})]})}}export{q5 as default};
|
|
536
|
+
`;document.head.appendChild(S0);function y5(){return Pe("div",{className:"flex flex-col gap-8 p-4 w-full mx-auto",children:[Pe("div",{className:"flex items-start gap-4",children:[W("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),W("div",{className:"flex-1",children:W(Xo,{active:!0,paragraph:{rows:1}})})]}),Pe("div",{className:"flex items-start gap-4",children:[W("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),W("div",{className:"flex-1",children:W(Xo,{active:!0,paragraph:{rows:3}})})]}),Pe("div",{className:"flex items-start gap-4",children:[W("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),W("div",{className:"flex-1",children:W(Xo,{active:!0,paragraph:{rows:1}})})]}),Pe("div",{className:"flex items-start gap-4",children:[W("div",{className:"w-10 h-10 rounded-full bg-muted/80 animate-pulse"}),W("div",{className:"flex-1",children:W(Xo,{active:!0,paragraph:{rows:2}})})]})]})}function b5({msg:e,subMsg:t}){return Pe("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center bg-white/80 backdrop-blur-sm",children:[W("div",{className:"mb-6 animate-bounce",children:W(_F,{size:64,className:"text-[#d70016]"})}),W("h2",{className:"text-[20px] font-medium text-[#222222] mb-3",children:e||"\u5E94\u7528\u521D\u59CB\u5316\u5931\u8D25"}),W("p",{className:"text-[14px] text-[#555555] mb-8 max-w-[400px]",children:t||"\u65E0\u6CD5\u5B8C\u6210\u5E94\u7528\u521D\u59CB\u5316\uFF0C\u8FD9\u53EF\u80FD\u662F\u7531\u4E8E\u7F51\u7EDC\u8FDE\u63A5\u95EE\u9898\u6216\u670D\u52A1\u914D\u7F6E\u9519\u8BEF\u5BFC\u81F4\u7684\u3002\u8BF7\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u8FDE\u63A5\u5E76\u91CD\u8BD5\u3002"}),W(vn,{type:"primary",icon:W(C0,{className:"w-4 h-4"}),onClick:()=>window.location.reload(),className:"flex items-center gap-2 bg-gradient-to-r from-[#2B69FF] to-[#8F91FF] border-none hover:opacity-90",children:"\u91CD\u65B0\u52A0\u8F7D"})]})}function x5(){return Pe("div",{className:"flex flex-col items-center justify-center h-full p-8 text-center bg-transparent! backdrop-blur-sm",children:[W("div",{className:"mb-6 animate-bounce",children:W(RF,{size:64,className:"text-[#d70016]"})}),W("h2",{className:"text-[20px] font-medium text-[#222222] mb-3",children:"\u62B1\u6B49\uFF0C\u9047\u5230\u4E86\u4E00\u4E9B\u95EE\u9898"}),W("p",{className:"text-[14px] text-[#555555] mb-8 max-w-[400px]",children:"\u8BF7\u6C42\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"}),W(vn,{type:"primary",icon:W(C0,{className:"w-4 h-4"}),onClick:()=>window.location.reload(),className:"flex items-center gap-2 bg-gradient-to-r from-[#2B69FF] to-[#8F91FF] border-none hover:opacity-90",children:"\u91CD\u65B0\u52A0\u8F7D"})]})}const C5=1e3,w5=3e3,S5=({isModalOpen:e,handleOk:t,handleCancel:n,data:r})=>{const a={header:{height:"60px",borderBottom:"1px solid #F0F0F0",display:"flex",paddingLeft:"24px",alignItems:"center",marginBottom:"16px"},title:{fontSize:"16px"},body:{padding:"0 24px"},mask:{},footer:{marginTop:"0px",padding:"0 24px 16px 24px"},content:{padding:0}},[o]=gp();return mt(()=>{if(!e){o.resetFields();return}o.setFieldValue("new_name",r==null?void 0:r.label)},[r,e]),W(cl,{modal:{styles:a},children:W(dl,{title:W("div",{className:"text-[16px]",children:"\u7F16\u8F91\u4F1A\u8BDD\u540D\u79F0"}),closeIcon:null,open:e,width:520,centered:!0,className:"[&:[.ant-modal-content]]:bg-red",footer:Pe("div",{className:"mt-[16px] flex justify-end",children:[W(vn,{children:"\u53D6\u6D88",onClick:n,className:"mr-[8px]"}),W(vn,{children:"\u786E\u8BA4",onClick:async()=>{try{const i=await o.validateFields();t("ok_rename",i)}catch(i){console.log(i);return}},type:"primary",className:"border-none"})]}),children:W(Jt,{form:o,children:W(Jt.Item,{name:"new_name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165"},{max:100,message:"\u6700\u5927\u5B57\u6570\u9650\u5236100"}],children:W(Zr,{})})})})})},$5=({isModalOpen:e,handleOk:t,handleCancel:n,data:r})=>{const a={header:{height:"60px",borderBottom:"1px solid #F0F0F0",display:"flex",paddingLeft:"24px",alignItems:"center",marginBottom:"16px"},title:{fontSize:"16px"},body:{padding:"0 24px"},mask:{},footer:{marginTop:"0px",padding:"0 24px 16px 24px"},content:{padding:0}},[o]=gp();return mt(()=>{if(!e){o.resetFields();return}o.setFieldValue("new_name",r==null?void 0:r.label)},[r,e]),W(cl,{modal:{styles:a},children:W(dl,{title:W("div",{className:"text-[16px]",children:"\u5220\u9664\u4F1A\u8BDD"}),closeIcon:null,open:e,width:520,centered:!0,className:"[&:[.ant-modal-content]]:bg-red",footer:Pe("div",{className:"mt-[16px] flex justify-end",children:[W(vn,{children:"\u53D6\u6D88",onClick:n,className:"mr-[8px]"}),W(vn,{children:"\u786E\u8BA4",onClick:async()=>{try{const i=await o.validateFields();t("ok_remove",i)}catch(i){console.log(i);return}},type:"primary",className:"border-none"})]}),children:W("div",{children:`\u786E\u5B9A\u8981\u5220\u9664\u4F1A\u8BDD\u300C${r.label}\u300D\u5417\uFF1F\u5220\u9664\u540E\u65E0\u6CD5\u6062\u590D\u3002`})})})};function Y5(e=QN){return function({token:n,url:r="http://localhost:8888",styles:a,CSRFToken:o,eventsEmit:i,...l}){const s=zt(()=>D0({theme:Zc,mode:"light"},a),[a]),[c,u]=ft(!1),[d,g]=ft(!1),[h,v]=ft(null),[m,p]=ft([]),[b,y]=ft([]),[x,w]=ft(void 0),[C,S]=ft([]),[E,k]=ft([]),[$,O]=ft(void 0),[D,P]=ft(!1),[A,N]=ft({display:"ready",sender:"ready",app:"initializing"}),[I,M]=ft([]);function F(q,H){if(!H)return q;const ne=Array.isArray(q)?[...q]:{...q};for(const se in H)H[se]!==void 0&&H[se]!==null&&Object.prototype.hasOwnProperty.call(H,se)&&(typeof q[se]=="object"&&q[se]!==null&&!Array.isArray(q[se])&&typeof H[se]=="object"&&H[se]!==null&&!Array.isArray(H[se])?ne[se]=F(q[se],H[se]):ne[se]=H[se]);return ne}const[R,T]=ft(()=>F(Zm,l.senderConfig));mt(()=>{l.senderConfig&&(console.log("hahah",R,l.senderConfig),T(F(Zm,l.senderConfig)))},[l.senderConfig]);const[_,B]=ft([]),[L,j]=ft(()=>({uploadedFiles:[]}));mt(()=>{console.log("fileManagerData",L)},[]),mt(()=>{if(!x)return;const q=b.find(se=>se.id===x);let H=[],ne=!1;if(q&&q.messages){const se=[...q.messages||[]].reverse().find(Se=>Se.istype==="ai");if(se!=null&&se.reference&&se.resultType===5){ne=!0;try{H=JSON.parse(se.reference).map(je=>nt(je))}catch{}}}ne&&j({uploadedFiles:H})},[b]),mt(()=>{j({uploadedFiles:[]})},[x]);const[z,K]=be.useState(()=>{var H;if(!E||E.length===0)return;const q=E.find(ne=>ne.isDefault);return q?q.id:(H=E[0])==null?void 0:H.id});be.useEffect(()=>{if(!E||E.length===0)return;const q=E.some(H=>H.id===z);if(!z||!q){const H=E.find(ne=>ne.isDefault);K(H?H.id:E[0].id)}},[E]);const[V,G]=ft({}),U=St(void 0),Z=St(void 0),Q=St(void 0);St({sessionId:""}),St(null);const[Y,ee]=ft({}),[ce,me]=ft(!1),[we,le]=ft([]),ge=St(!1),{api_startChat_re:Ee,addEmptyMessage:_e,setLastEmptyMessage:Re,stopStream:he}=i5({baseUrl:r,CSRFToken:o,token:n,setChatData:y,activeSessionId:x,setAppStatus:N,setConversationList:p}),ke=zt(()=>{const q={};return(E||[]).forEach(H=>{q[H.id]=H}),q},[E]),de=zt(()=>{const q=b.find(ne=>ne.id===x)||{id:x,messages:[]},H=q.configId?ke[q.configId]:null;return{...q,assistantInfo:H}},[b,x,ke]),Te=zt(()=>{if(de.configId&&ke){const q=ke[de.configId];return q!=null&&q.configJson?JSON.parse(q.configJson).is_download:!1}else return!1},[de.configId,ke]),Ve=zt(()=>{if((de.configId||$)&&ke){const q=ke[de.configId];if(q!=null&&q.configJson){const H=JSON.parse(q.configJson);return console.log("is_enableThinking",de.configId,ke,$),!!H.thinking}else if($){const H=ke[$];if(H!=null&&H.configJson)return!!JSON.parse(H.configJson).thinking}}return!1},[de.configId,ke,$]);function We(q,H){const ne=new Map;return q.forEach(se=>ne.set(se.uid,nt(se))),H.forEach(se=>ne.set(se.uid,nt(se))),Array.from(ne.values())}function nt(q){if(!q||q.file&&q.file.name)return q;const H=q.name||q.fileName||"";return{...q,url:q.filePath||"",uid:q.uid||"",file:{name:H,size:typeof q.size=="string"&&q.size.endsWith("MB")?Number(q.size.replace("MB",""))*1024*1024:q.size||0,type:q.type||""},name:H}}mt(()=>{if(U.current&&U.current!==x){const H=U.current,ne=m.find(je=>je.sessionId===H&&je.isNew),se=b.find(je=>je.id===H&&je.isNew),Se=se&&se.messages&&se.messages.length>0;ne&&!Se&&(p(je=>je.filter(ut=>ut.sessionId!==H)),y(je=>je.filter(ut=>ut.id!==H)))}U.current=x;const q=de.messages&&de.messages.length>0?de.messages[de.messages.length-1].recommendQuestion:[];S(q)},[x,m,b,de.messages]),mt(()=>{N(q=>({...q,app:"initializing"})),Promise.all([In.get(`${r}/qa/dialogue/list?pageNo=1&pageSize=3000&sysType=INT_SESSION`,{headers:{Authorization:n}}),In.get(`${r}/qa/search/config/helper/list?pageNo=1&pageSize=3000`,{headers:{Authorization:n}})]).then(([q,H])=>{const ne=q.data.data.records||[];p(ne),x||ie(),k(H.data.data||[]),N(se=>({...se,app:"ready"}))}).catch(q=>{N(H=>({...H,app:"error"}))})},[r,n]),mt(()=>{x&&(N(q=>({...q,display:"loading"})),In.get(`${r}/qa/dialogue/getDialogBySessionId?sessionId=${x}`,{headers:{Authorization:n}}).then(q=>{var De;if(!q.data.data){N(Me=>({...Me,display:"ready"}));return}const H=((De=q.data.data)==null?void 0:De.queryReplyPairList)||[],ne=YF(H),{sessionId:se,searchConfigDTO:Se,filePath:je,configId:ut,reference:Ze,webReference:lt,uploadedFiles:vt,fileList:Ke,currentFiles:yt}=q.data.data;if(ne.length>0){const Me=ne.length-1-[...ne].reverse().findIndex(Le=>Le.istype==="ai");Me>=0&&Me<ne.length&&ne[Me].istype==="ai"&&(Ze&&(ne[Me].reference=Ze),lt&&(ne[Me].webReference=lt))}const et=yt||Ke||vt;if(et&&ne.length>0){const Me=[...ne].reverse().findIndex(Le=>Le.istype==="user");Me!==-1&&(console.log(ne[ne.length-1-Me].currentFiles,"filesData"),ne[ne.length-1-Me].currentFiles=et)}m.find(Me=>Me.sessionId===se)&&p(Me=>Me.map(Le=>Le.sessionId===se?{...Le,searchConfigDTO:Se,filePath:je,configId:ut}:Le));const Ae={configId:q.data.data.configId,filePath:q.data.data.filePath,searchConfigDTO:q.data.data.searchConfigDTO||{},sessionId:q.data.data.sessionId,label:q.data.data.label,kbId:q.data.data.kbId};y(Me=>{const Le=Me.filter(bt=>bt.id!==x);return[{id:x,messages:ne,...Ae},...Le]}),N(Me=>({...Me,display:"ready"}))}).catch(q=>{console.error("\u83B7\u53D6\u804A\u5929\u6570\u636E\u5931\u8D25:",q),q.response&&q.response.status===404&&ie(),N(H=>({...H,display:"error"}))}))},[x,r,n]),mt(()=>{const q=L.uploadedFiles.length;T(H=>{const ne=Array.isArray(H.actions)?H.actions:[];return{...H,actions:ne.map(Se=>Se.name==="history"?{...Se,badgeCount:q}:Se)}})},[L.uploadedFiles]),mt(()=>{GF({url:r,token:n},q=>{le(q)})},[]),be.useEffect(()=>{_.length&&y(q=>{if(!q[0])return q;const{messages:H}=q[0];for(let ne=H.length-1;ne>=0;ne--)if(H[ne].istype==="user"){const se=H[ne].currentFiles||[];H[ne].currentFiles=_.map(Se=>{var ut,Ze,lt;const je=se.find(vt=>vt.uid===Se.uid);return{name:((ut=Se.file)==null?void 0:ut.name)||Se.name,size:((Ze=Se.file)==null?void 0:Ze.size)||Se.size,type:((lt=Se.file)==null?void 0:lt.type)||Se.type,status:Se.status,uid:Se.uid,url:Se.url||(je==null?void 0:je.url)||""}});break}return[...q]})},[_]);let Ue=null,qe=null;const ct=(q,H,ne,se)=>{const Se=q.join(",");let je=0;qe=()=>{ge.current=!0};const ut=async()=>{if(!ge.current){if(je>=C5){ge.current||se("\u6587\u4EF6\u89E3\u6790\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");return}je++;try{const Ze=await In.get(`${r}/index/knowledgeBase/file/getFileStatusByUids?uids=${Se}`,{headers:{Authorization:n}});if(ge.current)return;if(Ze.data.success){const lt=Ze.data.data;ge.current||H(lt),lt.every(Ke=>Ke.status===3)?ge.current||ne():ge.current||setTimeout(ut,w5)}else ge.current||se(Ze.data.errorMsg||"\u67E5\u8BE2\u6587\u4EF6\u72B6\u6001\u5931\u8D25")}catch{if(ge.current)return;se("\u67E5\u8BE2\u6587\u4EF6\u72B6\u6001\u65F6\u53D1\u751F\u7F51\u7EDC\u9519\u8BEF")}}};ut()},Fe=(q,H)=>{y(ne=>{const se=[...ne];return se[0]&&(se[0]={...se[0],messages:se[0].messages.map(Se=>Se.queryId===q?{...Se,feedbackResult:H}:Se)}),se})},ae=async q=>{var H,ne;if(q)try{const se=(de==null?void 0:de.configId)||((H=ke==null?void 0:ke[(de==null?void 0:de.configId)||""])==null?void 0:H.id)||"",Se=await In.get(`${r}/qa/ai/recommendQuestion?queryId=${q}&configId=${se||""}`.replace(/\?&/,"?"),{headers:{Authorization:n}});S(((ne=Se.data)==null?void 0:ne.data)||[])}catch{S([])}};function ze(q){const{content:H,audioUrl:ne,filePaths:se,queryId:Se}=q;if(!x||!Se)return;const je=(de==null?void 0:de.messages)||[],ut=je.findIndex(et=>(et==null?void 0:et.queryId)===Se&&((et==null?void 0:et.istype)==="ai"||(et==null?void 0:et.isUser)===!1));let Ze;if(ut>0)for(let et=ut-1;et>=0;et-=1){const It=je[et];if((It==null?void 0:It.istype)==="user"||(It==null?void 0:It.isUser)===!0){Ze=It;break}}const lt=(Ze==null?void 0:Ze.content)??H;if(!lt)return;const vt=(Ze==null?void 0:Ze.filePaths)??se,Ke=(typeof vt=="string"&&vt?JSON.parse(vt):vt||[]).map(et=>et.uid),yt=Date.now();Re({now:yt}),N(et=>({...et,display:"processing",sender:"processing"})),q.clearFn&&q.clearFn(),p(et=>et.map(It=>It.sessionId===x?{...It,gmtModified:yt}:It)),Ee({configId:de.configId,content:lt,fileUids:Ke,lastDate:yt,name:de.label||"",queryId:Se,sessionId:String(x||""),type:(Ze==null?void 0:Ze.audioUrl)??ne?"audioUrl":"text",audioUrl:((Ze==null?void 0:Ze.audioUrl)??ne)||"",enableThinking:!!V.reasoning,enableWebsearch:!!V.netSearch},et=>{ae(Se)})}async function Ce(q,H){if(!x)return;const ne=m.find(se=>se.sessionId===x);if(ne&&ne.isNew){let se=!1;const Se=$||ne.configId,je=q&&q.content?q.content.slice(0,20):ne.label||"\u672A\u547D\u540D\u4F1A\u8BDD";if(await new Promise((ut,Ze)=>{QF({url:r,token:n,CSRFToken:o},{label:je,sessionId:ne.sessionId,sysType:"INT_SESSION",configId:Se},lt=>{lt&<.data&<.data.sessionId?(p(vt=>vt.map(Ke=>Ke.sessionId===ne.sessionId?{...Ke,isNew:!1,configId:Se,label:je}:Ke)),y(vt=>vt.map(Ke=>Ke.id===ne.sessionId?{...Ke,isNew:!1,configId:Se,label:je}:Ke)),se=!0,ut()):(Kt.error("\u521B\u5EFA\u4F1A\u8BDD\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"),Ze())})}),!se)return;$e(x,q,H,Se);return}$e(x,q,H)}function $e(q,H,ne,se){const Se="query-"+ea(32),je=m.find(Ke=>Ke.sessionId===q),ut=se||(je==null?void 0:je.configId)||de.configId;console.log("\u52A9\u624B\u914D\u7F6E\u8BE6\u60C5",ut);const Ze=H&&H.content?H.content.slice(0,20):"\u672A\u547D\u540D\u4F1A\u8BDD";let lt;if(H.files&&H.files.length>0&&(lt=H.files.map(Ke=>({name:Ke.file.name,size:Ke.file.size,type:Ke.file.type,filePath:Ke.filePath||"",convertedFilePath:Ke.convertedFilePath||"",uid:Ke.uid||""}))),console.log("\u672C\u5730\u6587\u4EF6\u4E0A\u4F20",H.files),_e({content:H.content||H.text||"",queryId:Se,currentFiles:lt,filePaths:lt?JSON.stringify(lt):void 0}),p(Ke=>Ke.map(yt=>yt.sessionId===q&&yt.label==="\u672A\u547D\u540D\u4F1A\u8BDD"&&yt.isNew?{...yt,label:Ze,gmtModified:Date.now(),isNew:!1}:yt)),y(Ke=>Ke.map(yt=>yt.id===q&&yt.label==="\u672A\u547D\u540D\u4F1A\u8BDD"&&yt.isNew?{...yt,label:Ze,isNew:!1}:yt)),H.files&&H.files.length>0){N(Ae=>({...Ae,sender:"uploading",display:"uploading"})),Ue=new AbortController,ge.current=!1;const Ke=H.files.map(()=>`rc-upload-${Date.now()}-${Math.random().toString(36).slice(2)}`),yt=H.files.map((Ae,De)=>({...Ae,uid:Ke[De],status:"uploading"}));B(yt);const et=new FormData;H.files.forEach(Ae=>{et.append("files",Ae.file)});const It=String(q||"");et.append("sessionId",It),et.append("uids",Ke.join(",")),In.post(`${r}/index/knowledgeBase/file/uploadFiles`,et,{headers:{Authorization:n,"Content-Type":"multipart/form-data"},signal:Ue.signal}).then(Ae=>{if(console.log("\u6587\u4EF6\u4E0A\u4F20\u7684\u6253\u5370\u7ED3\u679C",Ae),!ge.current)if(Ae.data.success&&Array.isArray(Ae.data.data)&&Ae.data.data.length>0){B(Le=>Le.map(tt=>{const bt=Ae.data.data.find(ht=>ht.uid===tt.uid);return bt?{...tt,...bt}:tt})),N(Le=>({...Le,sender:"processing",display:"analyzing"})),B(Le=>Le.map(tt=>({...tt,status:"parsing"})));const De=Ae.data.data,Me=De.map(Le=>Le.uid);ct(Me,Le=>{if(B(bt=>bt.map(ht=>{const Bt=Le.find(At=>At.uid===ht.uid);if(Bt)switch(Bt.status){case 3:return{...ht,status:"done"};case 4:return{...ht,status:"error"};case 1:case 2:default:return{...ht,status:"parsing"}}return ht})),Le.length>0&&Le.every(bt=>bt.status===3)){B([]);const bt=new Map;(Le||[]).forEach(ht=>{bt.set(ht.id,ht)}),j(ht=>({uploadedFiles:We(ht.uploadedFiles,De).map(At=>{var rn;return{...At,pdfPages:((rn=bt.get(At.id))==null?void 0:rn.pdfPages)||0}})}))}},()=>{ne==null||ne(),N(tt=>({...tt,sender:"processing",display:"processing"})),B(tt=>tt.map(bt=>{const ht=De.find(Bt=>Bt.uid===bt.uid);return ht?{...bt,...ht,url:ht.filePath,filePath:ht.filePath,name:ht.fileName||bt.name,convertedFilePath:ht.convertedFilePath||bt.convertedFilePath}:bt})),y(tt=>{if(!tt[0])return tt;const{messages:bt}=tt[0];for(let ht=bt.length-1;ht>=0;ht--)if(bt[ht].istype==="user"){const Bt=bt[ht].currentFiles||[];bt[ht].currentFiles=Bt.map(At=>{const rn=De.find(Mn=>Mn.uid===At.uid);return rn?{...At,...rn}:At});break}return[...tt]});const Le=Date.now();Ee({configId:ut,content:H.content||H.text||"",fileUids:Me,lastDate:Le,name:Ze,queryId:Se,sessionId:String(q||""),type:"text",audioUrl:"",enableThinking:!!V.reasoning,enableWebsearch:!!V.netSearch},tt=>{ae(Se)})},Le=>{N(tt=>({...tt,display:"ready",sender:"ready"})),B(tt=>tt.map(bt=>({...bt,status:"error",message:Le})))})}else{const De=Ae.data.errorMsg||"\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25";N(Me=>({...Me,display:"error",sender:"ready"})),B(Me=>Me.map(Le=>({...Le,status:"error",message:De})))}}).catch(Ae=>{var De,Me;((De=Ae==null?void 0:Ae.response)==null?void 0:De.status)===413?(Me=Ae==null?void 0:Ae.response)!=null&&Me.statusText.includes("Request Entity Too Large")&&Kt.error("\u6587\u4EF6\u8D85\u8FC7\u6700\u5927\u53EF\u4E0A\u4F20\u9650\u5236"):Kt.error("\u7F51\u7EDC\u9519\u8BEF"),N(Le=>({...Le,display:"error",sender:"ready"})),B(Le=>Le.map(tt=>({...tt,status:"error",message:"\u7F51\u7EDC\u9519\u8BEF"})))});return}N(Ke=>({...Ke,display:"processing",sender:"processing"}));const vt=Date.now();p(Ke=>Ke.map(yt=>yt.sessionId===q?{...yt,gmtModified:vt}:yt)),ne==null||ne(),Ee({configId:ut,content:H.content||H.text||"",fileUids:[],lastDate:vt,name:Ze,queryId:Se,sessionId:String(q||""),type:"text",audioUrl:"",enableThinking:!!V.reasoning,enableWebsearch:!!V.netSearch},Ke=>{ae(Se)})}function ue(q){q.restult==1?Os({url:r,token:n,CSRFToken:o},{queryId:q.queryId},()=>{Fe(q.queryId,null)}):tp({url:r,token:n,CSRFToken:o},{restult:1,queryId:q.queryId},()=>{Fe(q.queryId,1)})}function ie(q){const H=ea(32),ne={sessionId:H,label:"\u672A\u547D\u540D\u4F1A\u8BDD",gmtModified:Date.now(),searchConfigDTO:{},filePath:"",configId:"",isNew:!0};p(se=>[{...ne,messages:[]},...se]),y(se=>[{id:H,messages:[],...ne},...se]),w(H)}const xe=q=>{var Se;const H=new Set([...L.uploadedFiles.map(je=>je.file.name),...I.map(je=>je.file.name)]),ne=[],se=new Set;Array.from(q).forEach(je=>{H.has(je.name)?se.add(je.name):(ne.push({file:je,type:ep(je.name),status:"pending",preview:je.type.startsWith("image")?URL.createObjectURL(je):void 0}),H.add(je.name))}),se.size>0&&Kt.warning(`\u4E0D\u80FD\u4E0A\u4F20\u540C\u540D\u6587\u4EF6: ${Array.from(se).join(", ")}`),ne.length>0&&(M(je=>[...je,...ne]),(Se=Z.current)==null||Se.call(Z,ne))},Be=(q,H,ne)=>{var se;(se=Q.current)==null||se.call(Q,q,H,ne)};function He(q){if(q!=null&&q.sessionId&&q.sessionId!==x){w(q.sessionId),N(ne=>({...ne,sender:"ready"}));const H=b.find(ne=>ne.id===q.sessionId);if(H&&H.messages&&H.messages.length>0){const ne=[...H.messages].reverse().find(se=>se.istype==="ai");ne&&ne.recommendQuestion?S(ne.recommendQuestion):S([])}else S([])}}const st=async q=>new Promise((H,ne)=>{JF({url:r,token:n,CSRFToken:o},{sessionId:q},se=>{se?(Kt.success("\u5220\u9664\u6210\u529F!"),H(se)):(Kt.error("\u5220\u9664\u5931\u8D25!"),ne(se))})}),Ne=async()=>{try{const H=(await In.get(`${r}/qa/dialogue/list?pageNo=1&pageSize=3000&sysType=INT_SESSION`,{headers:{Authorization:n}})).data.data.records||[];return p(H),H}catch(q){throw Kt.error("\u5237\u65B0\u4F1A\u8BDD\u5217\u8868\u5931\u8D25"),q}},Ie=async(q,H)=>new Promise((ne,se)=>{XF({url:r,token:n,CSRFToken:o},{label:H,sessionId:q},Se=>{if(Se){const je=Date.now();p(ut=>ut.map(Ze=>Ze.sessionId===q?{...Ze,label:H,gmtModified:je}:Ze)),Kt.success("\u91CD\u547D\u540D\u6210\u529F!"),ne(Se)}else Kt.error("\u91CD\u547D\u540D\u5931\u8D25"),se(Se)})}),Ye=q=>{p(H=>{const ne=H.filter(se=>se.sessionId!==q);return x===q&&(ne.length>0?w(ne[0].sessionId):ie()),ne})},Ge=(q,H)=>{const ne=Date.now();p(se=>se.map(Se=>Se.sessionId===q?{...Se,label:H,gmtModified:ne}:Se))},xt=q=>{tp({url:r,token:n,CSRFToken:o},{...q,...Y,restult:0},()=>{Fe(Y.queryId,0)})},jt=q=>{const H=q.new_name,ne=h.data.label;H&&H!==ne?h.async_renameConversation(H).then(()=>{h.fn_renameItemInList(H),u(!1)}).catch(()=>{}):u(!1)},Vt=q=>{h.async_deleteConversation().then(()=>{h.fn_removeItemFromList(),g(!1)}).catch(()=>{})},Pt=(q,H)=>{switch(console.log(q,H),q){case"close_remove":g(!1);break;case"close_rename":u(!1);break;case"ok_rename":jt(H);break;case"ok_remove":Vt();break}},Gt=async({url:q,params:H,replacePredataFunction:ne})=>{var se,Se;try{const je=await In.post(q,H,{headers:{Authorization:n}}),ut=(Se=(se=je==null?void 0:je.data)==null?void 0:se.data)==null?void 0:Se.data;ut&&ne(ut)}catch(je){console.log("error",je)}},_t=(q,H)=>{var ne,se,Se;switch(console.log(`[Event] ${q}`,H),q){case"retrieve-sql-data:pagingation_click":const{page:je,pageSize:ut,fetchUrl:Ze,source:lt,replacePredataFunction:vt}=H;Gt({url:`${r}${Ze}`,replacePredataFunction:vt,params:{pageNo:je,pageSize:ut,convertedFilePath:lt,stream:!1}});break;case"web_referenceFile_title:click":if(!((ne=H==null?void 0:H.data)!=null&&ne.link))return console.error("\u6CA1\u6709\u7F51\u9875\u5730\u5740");window.open(H.data.link,"_blank");break;case"conversation:item_click":He(H);break;case"files:finished_animation_complete":B([]);break;case"conversation:create":ie();break;case"conversation:new_assistant_change":O(H.assistantId);break;case"conversations:rename_icon_clicked":v({data:H,async_renameConversation:Ke=>Ie(H.sessionId,Ke),fn_renameItemInList:Ke=>Ge(H.sessionId,Ke)}),u(!0);break;case"conversations:delete_icon_clicked":v({data:H,async_deleteConversation:()=>st(H.sessionId),async_refreshConversationList:Ne,fn_removeItemFromList:()=>Ye(H.sessionId)}),g(!0);break;case"sender:send":Ce(H,H.clearFn);break;case"sender:send_recommandQuestion":{const Ke=((H==null?void 0:H.content)??"").toString();if(!Ke)break;Ce({content:Ke},()=>{});break}case"chatbox:follow_up_question_click":{const Ke=((H==null?void 0:H.question)??(H==null?void 0:H.content)??"").toString();if(!Ke)break;Ce({content:Ke},()=>{});break}case"sender:action_history":P(!0);break;case"sender:stop":ge.current=!0,Ue&&(Ue.abort(),Ue=null),qe&&(qe(),qe=null),N(Ke=>({...Ke,display:"ready",sender:"ready"})),B([]),he==null||he();break;case"sender:clear":(se=H.clearFn)==null||se.call(H);break;case"sender:configChange":H&&H.all&&G(H.all);break;case"action_copy:click":H&&UF(H.content,H.event);break;case"chatbox:copy":{const Ke=(H==null?void 0:H.content)||"";if(!Ke)break;const yt=async It=>{try{return await navigator.clipboard.writeText(It),Kt.success("\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F"),!0}catch{return!1}},et=It=>{const Ae=document.createElement("textarea");Ae.value=It,Ae.style.position="fixed",Ae.style.opacity="0",document.body.appendChild(Ae),Ae.focus(),Ae.select();try{document.execCommand("copy"),Kt.success("\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F")}catch{Kt.error("\u590D\u5236\u5931\u8D25")}document.body.removeChild(Ae)};yt(Ke).then(It=>{It||et(Ke)});break}case"chatbox:repeat":console.log(H,"sdkflskdjflksdjfklsdjlfkjsdklfjsdklfjlks"),ze(H);break;case"action_thumbsup":ue(H);break;case"chatbox:like":ue({queryId:H==null?void 0:H.queryId,restult:H==null?void 0:H.result});break;case"action_thumbsdown":H.restult===0?Os({url:r,token:n,CSRFToken:o},{queryId:H.queryId},()=>{Fe(H.queryId,null)}):(ee(H),me(!0));break;case"chatbox:dislike":(H==null?void 0:H.result)===0?Os({url:r,token:n,CSRFToken:o},{queryId:H.queryId},()=>{Fe(H.queryId,null)}):(ee({queryId:H==null?void 0:H.queryId}),me(!0));break;case"action_retrive_tag":i==null||i("action_retrive_tag",H);break;case"referenceFile_view":i==null||i("referenceFile_view",H);break;case"referenceFile_question":console.log(H,"zhezhhzhzh"),i==null||i("referenceFile_question",H);break;case"referenceFile_download":i==null||i("referenceFile_download",H);break;case"retrive_tag:click":i==null||i("retrive_tag:click",H);break;case"fileManager:change":{const Ke=Array.isArray(H==null?void 0:H.uploadedFiles)?H.uploadedFiles:[];M(Ke),typeof(H==null?void 0:H.setUploadedFiles)=="function"&&(Z.current=H.setUploadedFiles,Q.current=H.removeFile);break}case"uploaded_file:removeFromTemp":{console.log("[DEBUG] mergedEventsEmit uploaded_file:removeFromTemp \u4E8B\u4EF6",H);const Ke=(Se=H==null?void 0:H.file)==null?void 0:Se.uid;if(!Ke){console.warn("[DEBUG] \u7F3A\u5C11uid\uFF0C\u65E0\u6CD5\u5220\u9664\u4E34\u65F6\u6587\u4EF6",H);break}const yt=[...de.messages||[]].reverse().find(It=>It.istype==="user"),et=yt==null?void 0:yt.queryId;ZF({url:r,token:n,CSRFToken:o},{uid:Ke,queryId:et},(It,Ae)=>{if(It){if(Kt.success("\u6587\u4EF6\u5DF2\u4ECE\u4E34\u65F6\u77E5\u8BC6\u5E93\u79FB\u9664"),Ae&&Array.isArray(Ae.data&&Ae.data.data)){const De=Ae.data.data.map(Me=>{var tt;const Le=Me.name||Me.fileName||"";return{file:{name:Le,size:Number((tt=Me.size)==null?void 0:tt.replace("MB",""))*1024*1024||0,type:Me.type},type:ep(Le),status:"uploaded",url:Me.filePath,convertedFilePath:Me.convertedFilePath,uid:Me.uid,preview:Me.type==="image"?Me.filePath:void 0}});j({uploadedFiles:De})}}else console.log("[DEBUG] removeFilefromTempUpload \u56DE\u8C03 false\uFF0Cres:",Ae),Kt.error("\u6587\u4EF6\u79FB\u9664\u5931\u8D25")});break}case"uploaded_file:remove_batch":break;default:i==null||i(q,H)}},nn=[{key:"conversations",type:"custom",label:"\u5BF9\u8BDD\u5386\u53F2",icon:W(jF,{size:16}),enabled:!0,component:W(qF,{data:m,assistantList:E,activedItem:x||"",sortRules:[{label:"\u5F53\u5929",dayPeriod:1},{label:"3\u5929",dayPeriod:3},{label:"7\u5929",dayPeriod:7},{label:"30\u5929",dayPeriod:30}],eventsEmit:_t,styles:s.theme})}],dn=be.useMemo(()=>()=>W(o5,{eventsEmit:_t,assistantList:E,styles:s,selectedId:z,onSelectAssistant:K}),[z]),_n={...be.useMemo(()=>({AiChatBox:(q,H)=>{var Ze,lt;const ne=H===(((Ze=de==null?void 0:de.messages)==null?void 0:Ze.length)||0)-1;let se="ready";if(ne)if(q.status!==void 0)switch(q.status){case 0:se="thinking";break;case 1:se="processing";break;case 2:se="ready";break;case 3:se="error";break;default:se=A.display}else se=A.display;let Se=[];if(Array.isArray(C))Se=C;else if(typeof C=="string")try{Se=JSON.parse(C)||[]}catch{Se=[]}const je=(()=>{const vt=q==null?void 0:q.reference;if(!vt)return"[]";if(typeof vt=="string")try{return JSON.parse(vt),vt}catch{return"[]"}try{return JSON.stringify(vt)}catch{return"[]"}})(),ut=(()=>{const vt=q==null?void 0:q.webReference;if(!vt)return"[]";if(typeof vt=="string")try{return JSON.parse(vt),vt}catch{return"[]"}try{return JSON.stringify(vt)}catch{return"[]"}})();return W(ld,{...q,reference:je,webReference:ut,contentType:"stream",displayStatus:se,eventsEmit:_t,isLast:ne&&(q==null?void 0:q.istype)==="ai",followUpQuestions:ne&&(q==null?void 0:q.istype)==="ai"?Se:[],defaultAnswer:((lt=de==null?void 0:de.searchConfigDTO)==null?void 0:lt.defaultAnswer)||"\u4E0D\u77E5\u9053\u4EC0\u4E48\u539F\u56E0\u6211\u4EEC\u6CA1\u80FD\u67E5\u5230\u4F60\u8981\u7684\u95EE\u9898*-*",is_download:Te,styles:s},`${(q==null?void 0:q.queryId)||(q==null?void 0:q.id)||H}-${(q==null?void 0:q.istype)||"unknown"}`)},LogoBox:q=>q&&q.LogoBox===null?null:q&&typeof q.LogoBox=="function"?W(q.LogoBox,{}):W("div",{className:"text-2xl w-full text-center font-bold",children:"\u5C0F\u9CB8\u667A\u80FD\u52A9\u624B"}),DisplayLoading:()=>W(y5,{}),DisplayError:()=>W(x5,{}),AppError:()=>W(b5,{msg:"\u5E94\u7528\u521D\u59CB\u5316\u5931\u8D25",subMsg:"\u65E0\u6CD5\u5B8C\u6210\u5E94\u7528\u521D\u59CB\u5316\uFF0C\u8FD9\u53EF\u80FD\u662F\u7531\u4E8E\u7F51\u7EDC\u8FDE\u63A5\u95EE\u9898\u6216\u670D\u52A1\u914D\u7F6E\u9519\u8BEF\u5BFC\u81F4\u7684\u3002\u8BF7\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u8FDE\u63A5\u5E76\u91CD\u8BD5\u3002"}),AppLoading:()=>W(h5,{}),UserChatBox:(q,H)=>W(ld,{...q,contentType:"plainText",isUser:!0,displayStatus:"ready",eventsEmit:_t,styles:s,fileManagerData:L},`${(q==null?void 0:q.queryId)||(q==null?void 0:q.id)||H}-user`),WelcomeComponent:dn}),[dn,de,A.display,_t,s,Te,L]),...l.CustomComponents||{}};return mt(()=>{T(q=>{const H=Array.isArray(q.switchs)?q.switchs.map(ne=>ne.name==="reasoning"?{...ne,enabled:Ve}:ne):[];return{...q,switchs:H}})},[Ve]),Pe(E0,{children:[W(v5,{open:D,onCancel:()=>P(!1),files:L.uploadedFiles,currentFiles:I,onUpload:xe,onRemoveFile:Be,styles:s,eventsEmit:_t}),W(e,{...l,status:A,chatData:de,sidebar:nn,recommandQuestions:[],eventsEmit:_t,styles:s,senderConfig:R,fileUploadStatus:_,CustomComponents:_n,activeSessionId:x}),W(c5,{open:ce,feedBackList:we,setOpen:me,handleConfirm:xt}),W(S5,{isModalOpen:c,handleOk:Pt,handleCancel:()=>Pt("close_rename"),data:(h==null?void 0:h.data)||{}}),W($5,{isModalOpen:d,handleOk:Pt,handleCancel:()=>Pt("close_remove"),data:(h==null?void 0:h.data)||{}})]})}}export{Y5 as default};
|