| 1234567891011121314 |
- import{a as e,n as t}from"./react-dom-stZKkA6x.js";import{M as n,N as r,j as i}from"./theme-CVfSdO4m.js";import{$n as a,Ar as o,Bn as s,Cn as c,D as l,Dn as u,Dr as d,Fn as f,Ft as p,Kt as m,M as h,Mn as g,Mr as _,Nn as v,Nr as y,O as b,Or as x,P as S,Q as C,Tn as w,Xt as T,Zt as E,_r as D,ar as O,cn as k,ct as A,dn as j,er as M,fn as N,fr as P,gr as F,hn as I,hr as L,it as R,jr as z,kn as B,ln as V,mn as H,mr as U,nr as W,or as G,pn as K,sr as q,ur as ee,vn as te,vr as ne,wn as re,wr as ie,xn as ae,yr as oe,zn as se}from"./jsx-runtime-C5RSiriy.js";var J=e(t()),Y=e(y()),ce=(e,t,n,r,i)=>({background:e,border:`${M(r.lineWidth)} ${r.lineType} ${t}`,[`${i}-icon`]:{color:n}}),le=e=>{let{componentCls:t,motionDurationSlow:n,marginXS:r,marginSM:i,fontSize:a,fontSizeLG:o,lineHeight:s,borderRadiusLG:c,motionEaseInOutCirc:l,withDescriptionIconSize:d,colorText:f,colorTextHeading:p,withDescriptionPadding:m,defaultPadding:h}=e;return{[t]:Object.assign(Object.assign({},u(e)),{position:`relative`,display:`flex`,alignItems:`center`,padding:h,wordWrap:`break-word`,borderRadius:c,[`&${t}-rtl`]:{direction:`rtl`},[`${t}-content`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:`none`,fontSize:a,lineHeight:s},"&-message":{color:p},[`&${t}-motion-leave`]:{overflow:`hidden`,opacity:1,transition:`max-height ${n} ${l}, opacity ${n} ${l},
- padding-top ${n} ${l}, padding-bottom ${n} ${l},
- margin-bottom ${n} ${l}`},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:`0 !important`,paddingTop:0,paddingBottom:0,opacity:0}}),[`${t}-with-description`]:{alignItems:`flex-start`,padding:m,[`${t}-icon`]:{marginInlineEnd:i,fontSize:d,lineHeight:0},[`${t}-message`]:{display:`block`,marginBottom:r,color:p,fontSize:o},[`${t}-description`]:{display:`block`,color:f}},[`${t}-banner`]:{marginBottom:0,border:`0 !important`,borderRadius:0}}},ue=e=>{let{componentCls:t,colorSuccess:n,colorSuccessBorder:r,colorSuccessBg:i,colorWarning:a,colorWarningBorder:o,colorWarningBg:s,colorError:c,colorErrorBorder:l,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:p}=e;return{[t]:{"&-success":ce(i,r,n,e,t),"&-info":ce(p,f,d,e,t),"&-warning":ce(s,o,a,e,t),"&-error":Object.assign(Object.assign({},ce(u,l,c,e,t)),{[`${t}-description > pre`]:{margin:0,padding:0}})}}},de=e=>{let{componentCls:t,iconCls:n,motionDurationMid:r,marginXS:i,fontSizeIcon:a,colorIcon:o,colorIconHover:s}=e;return{[t]:{"&-action":{marginInlineStart:i},[`${t}-close-icon`]:{marginInlineStart:i,padding:0,overflow:`hidden`,fontSize:a,lineHeight:M(a),backgroundColor:`transparent`,border:`none`,outline:`none`,cursor:`pointer`,[`${n}-close`]:{color:o,transition:`color ${r}`,"&:hover":{color:s}}},"&-close-text":{color:o,transition:`color ${r}`,"&:hover":{color:s}}}}},fe=ae(`Alert`,e=>[le(e),ue(e),de(e)],e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`})),pe=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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},me={success:r,info:i,error:H,warning:n},X=e=>{let{icon:t,prefixCls:n,type:r}=e,i=me[r]||null;return t?j(t,J.createElement(`span`,{className:`${n}-icon`},t),()=>({className:(0,Y.default)(`${n}-icon`,t.props.className)})):J.createElement(i,{className:`${n}-icon`})},he=e=>{let{isClosable:t,prefixCls:n,closeIcon:r,handleClose:i,ariaProps:a}=e,o=r===!0||r===void 0?J.createElement(K,null):r;return t?J.createElement(`button`,Object.assign({type:`button`,onClick:i,className:`${n}-close-icon`,tabIndex:0},a),o):null},Z=J.forwardRef((e,t)=>{let{description:n,prefixCls:r,message:i,banner:a,className:o,rootClassName:c,style:l,onMouseEnter:u,onMouseLeave:d,onClick:f,afterClose:p,showIcon:m,closable:h,closeText:g,closeIcon:_,action:v,id:y}=e,b=pe(e,[`description`,`prefixCls`,`message`,`banner`,`className`,`rootClassName`,`style`,`onMouseEnter`,`onMouseLeave`,`onClick`,`afterClose`,`showIcon`,`closable`,`closeText`,`closeIcon`,`action`,`id`]),[x,S]=J.useState(!1),C=J.useRef(null);J.useImperativeHandle(t,()=>({nativeElement:C.current}));let{getPrefixCls:w,direction:T,closable:E,closeIcon:D,className:O,style:k}=s(`alert`),A=w(`alert`,r),[j,M,P]=fe(A),F=t=>{var n;S(!0),(n=e.onClose)==null||n.call(e,t)},I=J.useMemo(()=>e.type===void 0?a?`warning`:`info`:e.type,[e.type,a]),L=J.useMemo(()=>typeof h==`object`&&h.closeIcon||g?!0:typeof h==`boolean`?h:_!==!1&&_!=null?!0:!!E,[g,_,h,E]),R=a&&m===void 0?!0:m,z=(0,Y.default)(A,`${A}-${I}`,{[`${A}-with-description`]:!!n,[`${A}-no-icon`]:!R,[`${A}-banner`]:!!a,[`${A}-rtl`]:T===`rtl`},O,o,c,P,M),B=N(b,{aria:!0,data:!0}),V=J.useMemo(()=>typeof h==`object`&&h.closeIcon?h.closeIcon:g||(_===void 0?typeof E==`object`&&E.closeIcon?E.closeIcon:D:_),[_,h,E,g,D]),H=J.useMemo(()=>{let e=h??E;if(typeof e==`object`){let{closeIcon:t}=e;return pe(e,[`closeIcon`])}return{}},[h,E]);return j(J.createElement(te,{visible:!x,motionName:`${A}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:p},({className:t,style:r},a)=>J.createElement(`div`,Object.assign({id:y,ref:oe(C,a),"data-show":!x,className:(0,Y.default)(z,t),style:Object.assign(Object.assign(Object.assign({},k),l),r),onMouseEnter:u,onMouseLeave:d,onClick:f,role:`alert`},B),R?J.createElement(X,{description:n,icon:e.icon,prefixCls:A,type:I}):null,J.createElement(`div`,{className:`${A}-content`},i?J.createElement(`div`,{className:`${A}-message`},i):null,n?J.createElement(`div`,{className:`${A}-description`},n):null),v?J.createElement(`div`,{className:`${A}-action`},v):null,J.createElement(he,{isClosable:L,prefixCls:A,closeIcon:V,handleClose:F,ariaProps:H}))))});function Q(e,t,n){return t=L(t),P(e,U()?Reflect.construct(t,n||[],L(e).constructor):t.apply(e,n))}var ge=function(e){function t(){var e;return ne(this,t),e=Q(this,t,arguments),e.state={error:void 0,info:{componentStack:``}},e}return F(t,e),D(t,[{key:`componentDidCatch`,value:function(e,t){this.setState({error:e,info:t})}},{key:`render`,value:function(){let{message:e,description:t,id:n,children:r}=this.props,{error:i,info:a}=this.state,o=a?.componentStack||null,s=e===void 0?(i||``).toString():e,c=t===void 0?o:t;return i?J.createElement(Z,{id:n,type:`error`,message:s,description:J.createElement(`pre`,{style:{fontSize:`0.9em`,overflowX:`auto`}},c)}):r}}])}(J.Component),_e=Z;_e.ErrorBoundary=ge;var ve={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z`}},{tag:`path`,attrs:{d:`M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z`}}]},name:`plus`,theme:`outlined`},ye=J.forwardRef(function(e,t){return J.createElement(I,_({},e,{ref:t,icon:ve}))}),be=(0,J.createContext)(null),xe=function(e){var t=e.activeTabOffset,n=e.horizontal,r=e.rtl,i=e.indicator,a=i===void 0?{}:i,o=a.size,s=a.align,c=s===void 0?`center`:s,l=O((0,J.useState)(),2),u=l[0],d=l[1],f=(0,J.useRef)(),p=J.useCallback(function(e){return typeof o==`function`?o(e):typeof o==`number`?o:e},[o]);function m(){G.cancel(f.current)}return(0,J.useEffect)(function(){var e={};if(t)if(n){e.width=p(t.width);var i=r?`right`:`left`;c===`start`&&(e[i]=t[i]),c===`center`&&(e[i]=t[i]+t.width/2,e.transform=r?`translateX(50%)`:`translateX(-50%)`),c===`end`&&(e[i]=t[i]+t.width,e.transform=`translateX(-100%)`)}else e.height=p(t.height),c===`start`&&(e.top=t.top),c===`center`&&(e.top=t.top+t.height/2,e.transform=`translateY(-50%)`),c===`end`&&(e.top=t.top+t.height,e.transform=`translateY(-100%)`);return m(),f.current=G(function(){u&&e&&Object.keys(e).every(function(t){var n=e[t],r=u[t];return typeof n==`number`&&typeof r==`number`?Math.round(n)===Math.round(r):n===r})||d(e)}),m},[JSON.stringify(t),n,r,c,p]),{style:u}},Se={width:0,height:0,left:0,top:0};function Ce(e,t,n){return(0,J.useMemo)(function(){for(var n=new Map,r=t.get(e[0]?.key)||Se,i=r.left+r.width,a=0;a<e.length;a+=1){var o=e[a].key,s=t.get(o);s||=t.get(e[a-1]?.key)||Se;var c=n.get(o)||d({},s);c.right=i-c.left-c.width,n.set(o,c)}return n},[e.map(function(e){return e.key}).join(`_`),t,n])}function we(e,t){var n=J.useRef(e),r=O(J.useState({}),2)[1];function i(e){var i=typeof e==`function`?e(n.current):e;i!==n.current&&t(i,n.current),n.current=i,r({})}return[n.current,i]}var Te=.1,Ee=.01,De=20,Oe=.995**De;function ke(e,t){var n=O((0,J.useState)(),2),r=n[0],i=n[1],a=O((0,J.useState)(0),2),o=a[0],s=a[1],c=O((0,J.useState)(0),2),l=c[0],u=c[1],d=O((0,J.useState)(),2),f=d[0],p=d[1],m=(0,J.useRef)();function h(e){var t=e.touches[0],n=t.screenX,r=t.screenY;i({x:n,y:r}),window.clearInterval(m.current)}function g(e){if(r){var n=e.touches[0],a=n.screenX,c=n.screenY;i({x:a,y:c});var l=a-r.x,d=c-r.y;t(l,d);var f=Date.now();s(f),u(f-o),p({x:l,y:d})}}function _(){if(r&&(i(null),p(null),f)){var e=f.x/l,n=f.y/l;if(Math.max(Math.abs(e),Math.abs(n))<Te)return;var a=e,o=n;m.current=window.setInterval(function(){if(Math.abs(a)<Ee&&Math.abs(o)<Ee){window.clearInterval(m.current);return}a*=Oe,o*=Oe,t(a*De,o*De)},De)}}var v=(0,J.useRef)();function y(e){var n=e.deltaX,r=e.deltaY,i=0,a=Math.abs(n),o=Math.abs(r);a===o?i=v.current===`x`?n:r:a>o?(i=n,v.current=`x`):(i=r,v.current=`y`),t(-i,-i)&&e.preventDefault()}var b=(0,J.useRef)(null);b.current={onTouchStart:h,onTouchMove:g,onTouchEnd:_,onWheel:y},J.useEffect(function(){function t(e){b.current.onTouchStart(e)}function n(e){b.current.onTouchMove(e)}function r(e){b.current.onTouchEnd(e)}function i(e){b.current.onWheel(e)}return document.addEventListener(`touchmove`,n,{passive:!1}),document.addEventListener(`touchend`,r,{passive:!0}),e.current.addEventListener(`touchstart`,t,{passive:!0}),e.current.addEventListener(`wheel`,i,{passive:!1}),function(){document.removeEventListener(`touchmove`,n),document.removeEventListener(`touchend`,r)}},[])}function Ae(e){var t=O((0,J.useState)(0),2),n=t[0],r=t[1],i=(0,J.useRef)(0),o=(0,J.useRef)();return o.current=e,a(function(){var e;(e=o.current)==null||e.call(o)},[n]),function(){i.current===n&&(i.current+=1,r(i.current))}}function je(e){var t=(0,J.useRef)([]),n=O((0,J.useState)({}),2)[1],r=(0,J.useRef)(typeof e==`function`?e():e),i=Ae(function(){var e=r.current;t.current.forEach(function(t){e=t(e)}),t.current=[],r.current=e,n({})});function a(e){t.current.push(e),i()}return[r.current,a]}var Me={width:0,height:0,left:0,top:0,right:0};function Ne(e,t,n,r,i,a,o){var s=o.tabs,c=o.tabPosition,l=o.rtl,u,d,f;return[`top`,`bottom`].includes(c)?(u=`width`,d=l?`right`:`left`,f=Math.abs(n)):(u=`height`,d=`top`,f=-n),(0,J.useMemo)(function(){if(!s.length)return[0,0];for(var n=s.length,r=n,i=0;i<n;i+=1){var a=e.get(s[i].key)||Me;if(Math.floor(a[d]+a[u])>Math.floor(f+t)){r=i-1;break}}for(var o=0,c=n-1;c>=0;--c)if((e.get(s[c].key)||Me)[d]<f){o=c+1;break}return o>r?[0,-1]:[o,r]},[e,t,r,i,a,f,c,s.map(function(e){return e.key}).join(`_`),l])}function Pe(e){var t;return e instanceof Map?(t={},e.forEach(function(e,n){t[n]=e})):t=e,JSON.stringify(t)}var Fe=`TABS_DQ`;function Ie(e){return String(e).replace(/"/g,Fe)}function Le(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}var Re=J.forwardRef(function(e,t){var n=e.prefixCls,r=e.editable,i=e.locale,a=e.style;return!r||r.showAdd===!1?null:J.createElement(`button`,{ref:t,type:`button`,className:`${n}-nav-add`,style:a,"aria-label":i?.addAriaLabel||`Add tab`,onClick:function(e){r.onEdit(`add`,{event:e})}},r.addIcon||`+`)}),ze=J.forwardRef(function(e,t){var n=e.position,r=e.prefixCls,i=e.extra;if(!i)return null;var a,o={};return z(i)===`object`&&!J.isValidElement(i)?o=i:o.right=i,n===`right`&&(a=o.right),n===`left`&&(a=o.left),a?J.createElement(`div`,{className:`${r}-extra-content`,ref:t},a):null}),Be=J.forwardRef(function(e,t){var n=e.prefixCls,r=e.id,i=e.tabs,a=e.locale,o=e.mobile,s=e.more,c=s===void 0?{}:s,l=e.style,u=e.className,d=e.editable,f=e.tabBarGutter,p=e.rtl,m=e.removeAriaLabel,g=e.onTabClick,v=e.getPopupContainer,y=e.popupClassName,C=O((0,J.useState)(!1),2),w=C[0],T=C[1],E=O((0,J.useState)(null),2),D=E[0],A=E[1],j=c.icon,M=j===void 0?`More`:j,N=`${r}-more-popup`,P=`${n}-dropdown`,F=D===null?null:`${N}-${D}`,I=a?.dropdownAriaLabel;function L(e,t){e.preventDefault(),e.stopPropagation(),d.onEdit(`remove`,{key:t,event:e})}var R=J.createElement(b,{onClick:function(e){var t=e.key,n=e.domEvent;g(t,n),T(!1)},prefixCls:`${P}-menu`,id:N,tabIndex:-1,role:`listbox`,"aria-activedescendant":F,selectedKeys:[D],"aria-label":I===void 0?`expanded dropdown`:I},i.map(function(e){var t=e.closable,n=e.disabled,i=e.closeIcon,a=e.key,o=e.label,s=Le(t,i,d,n);return J.createElement(h,{key:a,id:`${N}-${a}`,role:`option`,"aria-controls":r&&`${r}-panel-${a}`,disabled:n},J.createElement(`span`,null,o),s&&J.createElement(`button`,{type:`button`,"aria-label":m||`remove`,tabIndex:0,className:`${P}-menu-item-remove`,onClick:function(e){e.stopPropagation(),L(e,a)}},i||d.removeIcon||`×`))}));function z(e){for(var t=i.filter(function(e){return!e.disabled}),n=t.findIndex(function(e){return e.key===D})||0,r=t.length,a=0;a<r;a+=1){n=(n+e+r)%r;var o=t[n];if(!o.disabled){A(o.key);return}}}function B(e){var t=e.which;if(!w){[k.DOWN,k.SPACE,k.ENTER].includes(t)&&(T(!0),e.preventDefault());return}switch(t){case k.UP:z(-1),e.preventDefault();break;case k.DOWN:z(1),e.preventDefault();break;case k.ESC:T(!1);break;case k.SPACE:case k.ENTER:D!==null&&g(D,e);break}}(0,J.useEffect)(function(){var e=document.getElementById(F);e&&e.scrollIntoView&&e.scrollIntoView(!1)},[D]),(0,J.useEffect)(function(){w||A(null)},[w]);var V=x({},p?`marginRight`:`marginLeft`,f);i.length||(V.visibility=`hidden`,V.order=1);var H=(0,Y.default)(x({},`${P}-rtl`,p)),U=o?null:J.createElement(S,_({prefixCls:P,overlay:R,visible:i.length?w:!1,onVisibleChange:T,overlayClassName:(0,Y.default)(H,y),mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:v},c),J.createElement(`button`,{type:`button`,className:`${n}-nav-more`,style:V,"aria-haspopup":`listbox`,"aria-controls":N,id:`${r}-more`,"aria-expanded":w,onKeyDown:B},M));return J.createElement(`div`,{className:(0,Y.default)(`${n}-nav-operations`,u),style:l,ref:t},U,J.createElement(Re,{prefixCls:n,locale:a,editable:d}))}),Ve=J.memo(Be,function(e,t){return t.tabMoving}),He=function(e){var t=e.prefixCls,n=e.id,r=e.active,i=e.focus,a=e.tab,o=a.key,s=a.label,c=a.disabled,l=a.closeIcon,u=a.icon,d=e.closable,f=e.renderWrapper,p=e.removeAriaLabel,m=e.editable,h=e.onClick,g=e.onFocus,_=e.onBlur,v=e.onKeyDown,y=e.onMouseDown,b=e.onMouseUp,S=e.style,C=e.tabCount,w=e.currentPosition,T=`${t}-tab`,E=Le(d,l,m,c);function D(e){c||h(e)}function O(e){e.preventDefault(),e.stopPropagation(),m.onEdit(`remove`,{key:o,event:e})}var k=J.useMemo(function(){return u&&typeof s==`string`?J.createElement(`span`,null,s):s},[s,u]),A=J.useRef(null);J.useEffect(function(){i&&A.current&&A.current.focus()},[i]);var j=J.createElement(`div`,{key:o,"data-node-key":Ie(o),className:(0,Y.default)(T,x(x(x(x({},`${T}-with-remove`,E),`${T}-active`,r),`${T}-disabled`,c),`${T}-focus`,i)),style:S,onClick:D},J.createElement(`div`,{ref:A,role:`tab`,"aria-selected":r,id:n&&`${n}-tab-${o}`,className:`${T}-btn`,"aria-controls":n&&`${n}-panel-${o}`,"aria-disabled":c,tabIndex:c?null:r?0:-1,onClick:function(e){e.stopPropagation(),D(e)},onKeyDown:v,onMouseDown:y,onMouseUp:b,onFocus:g,onBlur:_},i&&J.createElement(`div`,{"aria-live":`polite`,style:{width:0,height:0,position:`absolute`,overflow:`hidden`,opacity:0}},`Tab ${w} of ${C}`),u&&J.createElement(`span`,{className:`${T}-icon`},u),s&&k),E&&J.createElement(`button`,{type:`button`,role:`tab`,"aria-label":p||`remove`,tabIndex:r?0:-1,className:`${T}-remove`,onClick:function(e){e.stopPropagation(),O(e)}},l||m.removeIcon||`×`));return f?f(j):j},Ue=function(e,t){var n=e.offsetWidth,r=e.offsetHeight,i=e.offsetTop,a=e.offsetLeft,o=e.getBoundingClientRect(),s=o.width,c=o.height,l=o.left,u=o.top;return Math.abs(s-n)<1?[s,c,l-t.left,u-t.top]:[n,r,a,i]},We=function(e){var t=e.current||{},n=t.offsetWidth,r=n===void 0?0:n,i=t.offsetHeight,a=i===void 0?0:i;if(e.current){var o=e.current.getBoundingClientRect(),s=o.width,c=o.height;if(Math.abs(s-r)<1)return[s,c]}return[r,a]},Ge=function(e,t){return e[+!t]},Ke=J.forwardRef(function(e,t){var n=e.className,r=e.style,i=e.id,a=e.animated,o=e.activeKey,s=e.rtl,c=e.extra,l=e.editable,u=e.locale,p=e.tabPosition,m=e.tabBarGutter,h=e.children,g=e.onTabClick,v=e.onTabScroll,y=e.indicator,b=J.useContext(be),S=b.prefixCls,C=b.tabs,w=(0,J.useRef)(null),T=(0,J.useRef)(null),E=(0,J.useRef)(null),D=(0,J.useRef)(null),k=(0,J.useRef)(null),A=(0,J.useRef)(null),j=(0,J.useRef)(null),M=p===`top`||p===`bottom`,N=O(we(0,function(e,t){M&&v&&v({direction:e>t?`left`:`right`})}),2),P=N[0],F=N[1],I=O(we(0,function(e,t){!M&&v&&v({direction:e>t?`top`:`bottom`})}),2),L=I[0],R=I[1],z=O((0,J.useState)([0,0]),2),B=z[0],V=z[1],H=O((0,J.useState)([0,0]),2),U=H[0],W=H[1],G=O((0,J.useState)([0,0]),2),K=G[0],te=G[1],ne=O((0,J.useState)([0,0]),2),re=ne[0],ae=ne[1],oe=O(je(new Map),2),se=oe[0],ce=oe[1],le=Ce(C,se,U[0]),ue=Ge(B,M),de=Ge(U,M),fe=Ge(K,M),pe=Ge(re,M),me=Math.floor(ue)<Math.floor(de+fe),X=me?ue-pe:ue-fe,he=`${S}-nav-operations-hidden`,Z=0,Q=0;M&&s?(Z=0,Q=Math.max(0,de-X)):(Z=Math.min(0,X-de),Q=0);function ge(e){return e<Z?Z:e>Q?Q:e}var _e=(0,J.useRef)(null),ve=O((0,J.useState)(),2),ye=ve[0],Se=ve[1];function Te(){Se(Date.now())}function Ee(){_e.current&&clearTimeout(_e.current)}ke(D,function(e,t){function n(e,t){e(function(e){return ge(e+t)})}return me?(M?n(F,e):n(R,t),Ee(),Te(),!0):!1}),(0,J.useEffect)(function(){return Ee(),ye&&(_e.current=setTimeout(function(){Se(0)},100)),Ee},[ye]);var De=O(Ne(le,X,M?P:L,de,fe,pe,d(d({},e),{},{tabs:C})),2),Oe=De[0],Me=De[1],Fe=f(function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:o,t=le.get(e)||{width:0,height:0,left:0,right:0,top:0};if(M){var n=P;s?t.right<P?n=t.right:t.right+t.width>P+X&&(n=t.right+t.width-X):t.left<-P?n=-t.left:t.left+t.width>-P+X&&(n=-(t.left+t.width-X)),R(0),F(ge(n))}else{var r=L;t.top<-L?r=-t.top:t.top+t.height>-L+X&&(r=-(t.top+t.height-X)),F(0),R(ge(r))}}),Be=O((0,J.useState)(),2),Ke=Be[0],qe=Be[1],Je=O((0,J.useState)(!1),2),Ye=Je[0],Xe=Je[1],$=C.filter(function(e){return!e.disabled}).map(function(e){return e.key}),Ze=function(e){var t=$.indexOf(Ke||o),n=$.length,r=$[(t+e+n)%n];qe(r)},Qe=function(e,t){var n=$.indexOf(e),r=C.find(function(t){return t.key===e});Le(r?.closable,r?.closeIcon,l,r?.disabled)&&(t.preventDefault(),t.stopPropagation(),l.onEdit(`remove`,{key:e,event:t}),n===$.length-1?Ze(-1):Ze(1))},$e=function(e,t){Xe(!0),t.button===1&&Qe(e,t)},et=function(e){var t=e.code,n=s&&M,r=$[0],i=$[$.length-1];switch(t){case`ArrowLeft`:M&&Ze(n?1:-1);break;case`ArrowRight`:M&&Ze(n?-1:1);break;case`ArrowUp`:e.preventDefault(),M||Ze(-1);break;case`ArrowDown`:e.preventDefault(),M||Ze(1);break;case`Home`:e.preventDefault(),qe(r);break;case`End`:e.preventDefault(),qe(i);break;case`Enter`:case`Space`:e.preventDefault(),g(Ke??o,e);break;case`Backspace`:case`Delete`:Qe(Ke,e);break}},tt={};M?tt[s?`marginRight`:`marginLeft`]=m:tt.marginTop=m;var nt=C.map(function(e,t){var n=e.key;return J.createElement(He,{id:i,prefixCls:S,key:n,tab:e,style:t===0?void 0:tt,closable:e.closable,editable:l,active:n===o,focus:n===Ke,renderWrapper:h,removeAriaLabel:u?.removeAriaLabel,tabCount:$.length,currentPosition:t+1,onClick:function(e){g(n,e)},onKeyDown:et,onFocus:function(){Ye||qe(n),Fe(n),Te(),D.current&&(s||(D.current.scrollLeft=0),D.current.scrollTop=0)},onBlur:function(){qe(void 0)},onMouseDown:function(e){return $e(n,e)},onMouseUp:function(){Xe(!1)}})}),rt=function(){return ce(function(){var e=new Map,t=k.current?.getBoundingClientRect();return C.forEach(function(n){var r=n.key,i=k.current?.querySelector(`[data-node-key="${Ie(r)}"]`);if(i){var a=O(Ue(i,t),4),o=a[0],s=a[1],c=a[2],l=a[3];e.set(r,{width:o,height:s,left:c,top:l})}}),e})};(0,J.useEffect)(function(){rt()},[C.map(function(e){return e.key}).join(`_`)]);var it=Ae(function(){var e=We(w),t=We(T),n=We(E);V([e[0]-t[0]-n[0],e[1]-t[1]-n[1]]);var r=We(j);te(r),ae(We(A));var i=We(k);W([i[0]-r[0],i[1]-r[1]]),rt()}),at=C.slice(0,Oe),ot=C.slice(Me+1),st=[].concat(q(at),q(ot)),ct=le.get(o),lt=xe({activeTabOffset:ct,horizontal:M,indicator:y,rtl:s}).style;(0,J.useEffect)(function(){Fe()},[o,Z,Q,Pe(ct),Pe(le),M]),(0,J.useEffect)(function(){it()},[s]);var ut=!!st.length,dt=`${S}-nav-wrap`,ft,pt,mt,ht;return M?s?(pt=P>0,ft=P!==Q):(ft=P<0,pt=P!==Z):(mt=L<0,ht=L!==Z),J.createElement(ee,{onResize:it},J.createElement(`div`,{ref:ie(t,w),role:`tablist`,"aria-orientation":M?`horizontal`:`vertical`,className:(0,Y.default)(`${S}-nav`,n),style:r,onKeyDown:function(){Te()}},J.createElement(ze,{ref:T,position:`left`,extra:c,prefixCls:S}),J.createElement(ee,{onResize:it},J.createElement(`div`,{className:(0,Y.default)(dt,x(x(x(x({},`${dt}-ping-left`,ft),`${dt}-ping-right`,pt),`${dt}-ping-top`,mt),`${dt}-ping-bottom`,ht)),ref:D},J.createElement(ee,{onResize:it},J.createElement(`div`,{ref:k,className:`${S}-nav-list`,style:{transform:`translate(${P}px, ${L}px)`,transition:ye?`none`:void 0}},nt,J.createElement(Re,{ref:j,prefixCls:S,locale:u,editable:l,style:d(d({},nt.length===0?void 0:tt),{},{visibility:ut?`hidden`:null})}),J.createElement(`div`,{className:(0,Y.default)(`${S}-ink-bar`,x({},`${S}-ink-bar-animated`,a.inkBar)),style:lt}))))),J.createElement(Ve,_({},e,{removeAriaLabel:u?.removeAriaLabel,ref:A,prefixCls:S,tabs:st,className:!ut&&he,tabMoving:!!ye})),J.createElement(ze,{ref:E,position:`right`,extra:c,prefixCls:S})))}),qe=J.forwardRef(function(e,t){var n=e.prefixCls,r=e.className,i=e.style,a=e.id,o=e.active,s=e.tabKey,c=e.children;return J.createElement(`div`,{id:a&&`${a}-panel-${s}`,role:`tabpanel`,tabIndex:o?0:-1,"aria-labelledby":a&&`${a}-tab-${s}`,"aria-hidden":!o,style:i,className:(0,Y.default)(n,o&&`${n}-active`,r),ref:t},c)}),Je=[`renderTabBar`],Ye=[`label`,`key`],Xe=function(e){var t=e.renderTabBar,n=W(e,Je),r=J.useContext(be).tabs;return t?t(d(d({},n),{},{panes:r.map(function(e){var t=e.label,n=e.key,r=W(e,Ye);return J.createElement(qe,_({tab:t,key:n,tabKey:n},r))})}),Ke):J.createElement(Ke,n)},$=[`key`,`forceRender`,`style`,`className`,`destroyInactiveTabPane`],Ze=function(e){var t=e.id,n=e.activeKey,r=e.animated,i=e.tabPosition,a=e.destroyInactiveTabPane,o=J.useContext(be),s=o.prefixCls,c=o.tabs,l=r.tabPane,u=`${s}-tabpane`;return J.createElement(`div`,{className:(0,Y.default)(`${s}-content-holder`)},J.createElement(`div`,{className:(0,Y.default)(`${s}-content`,`${s}-content-${i}`,x({},`${s}-content-animated`,l))},c.map(function(e){var i=e.key,o=e.forceRender,s=e.style,c=e.className,f=e.destroyInactiveTabPane,p=W(e,$),m=i===n;return J.createElement(te,_({key:i,visible:m,forceRender:o,removeOnLeave:!!(a||f),leavedClassName:`${u}-hidden`},r.tabPaneMotion),function(e,n){var r=e.style,a=e.className;return J.createElement(qe,_({},p,{prefixCls:u,id:t,tabKey:i,animated:l,active:m,style:d(d({},s),r),className:(0,Y.default)(c,a),ref:n}))})})))};function Qe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{inkBar:!0,tabPane:!1},t=e===!1?{inkBar:!1,tabPane:!1}:e===!0?{inkBar:!0,tabPane:!1}:d({inkBar:!0},z(e)===`object`?e:{});return t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}var $e=[`id`,`prefixCls`,`className`,`items`,`direction`,`activeKey`,`defaultActiveKey`,`editable`,`animated`,`tabPosition`,`tabBarGutter`,`tabBarStyle`,`tabBarExtraContent`,`locale`,`more`,`destroyInactiveTabPane`,`renderTabBar`,`onChange`,`onTabClick`,`onTabScroll`,`getPopupContainer`,`popupClassName`,`indicator`],et=0,tt=J.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,i=r===void 0?`rc-tabs`:r,a=e.className,o=e.items,s=e.direction,c=e.activeKey,l=e.defaultActiveKey,u=e.editable,f=e.animated,p=e.tabPosition,m=p===void 0?`top`:p,h=e.tabBarGutter,g=e.tabBarStyle,y=e.tabBarExtraContent,b=e.locale,S=e.more,C=e.destroyInactiveTabPane,w=e.renderTabBar,T=e.onChange,E=e.onTabClick,D=e.onTabScroll,k=e.getPopupContainer,A=e.popupClassName,j=e.indicator,M=W(e,$e),N=J.useMemo(function(){return(o||[]).filter(function(e){return e&&z(e)===`object`&&`key`in e})},[o]),P=s===`rtl`,F=Qe(f),I=O((0,J.useState)(!1),2),L=I[0],B=I[1];(0,J.useEffect)(function(){B(R())},[]);var V=O(v(function(){return N[0]?.key},{value:c,defaultValue:l}),2),H=V[0],U=V[1],G=O((0,J.useState)(function(){return N.findIndex(function(e){return e.key===H})}),2),K=G[0],q=G[1];(0,J.useEffect)(function(){var e=N.findIndex(function(e){return e.key===H});e===-1&&(e=Math.max(0,Math.min(K,N.length-1)),U(N[e]?.key)),q(e)},[N.map(function(e){return e.key}).join(`_`),H,K]);var ee=O(v(null,{value:n}),2),te=ee[0],ne=ee[1];(0,J.useEffect)(function(){n||(ne(`rc-tabs-${et}`),et+=1)},[]);function re(e,t){E?.(e,t);var n=e!==H;U(e),n&&T?.(e)}var ie={id:te,activeKey:H,animated:F,tabPosition:m,rtl:P,mobile:L},ae=d(d({},ie),{},{editable:u,locale:b,more:S,tabBarGutter:h,onTabClick:re,onTabScroll:D,extra:y,style:g,panes:null,getPopupContainer:k,popupClassName:A,indicator:j});return J.createElement(be.Provider,{value:{tabs:N,prefixCls:i}},J.createElement(`div`,_({ref:t,id:n,className:(0,Y.default)(i,`${i}-${m}`,x(x(x({},`${i}-mobile`,L),`${i}-editable`,u),`${i}-rtl`,P),a)},M),J.createElement(Xe,_({},ae,{renderTabBar:w})),J.createElement(Ze,_({destroyInactiveTabPane:C},ie,{animated:F}))))}),nt={motionAppear:!1,motionEnter:!0,motionLeave:!0};function rt(e,t={inkBar:!0,tabPane:!1}){let n;return n=t===!1?{inkBar:!1,tabPane:!1}:t===!0?{inkBar:!0,tabPane:!0}:Object.assign({inkBar:!0},typeof t==`object`?t:{}),n.tabPane&&(n.tabPaneMotion=Object.assign(Object.assign({},nt),{motionName:E(e,`switch`)})),n}var it=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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function at(e){return e.filter(e=>e)}function ot(e,t){return e?e.map(e=>{let t=e.destroyOnHidden??e.destroyInactiveTabPane;return Object.assign(Object.assign({},e),{destroyInactiveTabPane:t})}):at(o(t).map(e=>{if(J.isValidElement(e)){let{key:t,props:n}=e,r=n||{},{tab:i}=r,a=it(r,[`tab`]);return Object.assign(Object.assign({key:String(t)},a),{label:i})}return null}))}var st=e=>{let{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:`none`,"&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:`absolute`,transition:`none`,inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[p(e,`slide-up`),p(e,`slide-down`)]]},ct=e=>{let{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:i,colorBorderSecondary:a,itemSelectedColor:o}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${M(e.lineWidth)} ${e.lineType} ${a}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:o,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:re(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:`none`},[`${t}-ink-bar`]:{visibility:`hidden`}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:M(i)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:M(i)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${M(e.borderRadiusLG)} 0 0 ${M(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},lt=e=>{let{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:Object.assign(Object.assign({},u(e)),{position:`absolute`,top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:`block`,"&-hidden":{display:`none`},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${M(r)} 0`,overflowX:`hidden`,overflowY:`auto`,textAlign:{_skip_check_:!0,value:`left`},listStyleType:`none`,backgroundColor:e.colorBgContainer,backgroundClip:`padding-box`,borderRadius:e.borderRadiusLG,outline:`none`,boxShadow:e.boxShadowSecondary,"&-item":Object.assign(Object.assign({},B),{display:`flex`,alignItems:`center`,minWidth:e.tabsDropdownWidth,margin:0,padding:`${M(e.paddingXXS)} ${M(e.paddingSM)}`,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:`nowrap`},"&-remove":{flex:`none`,marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:0,cursor:`pointer`,"&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:`transparent`,cursor:`not-allowed`}}})}})}},ut=e=>{let{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:i,verticalItemPadding:a,verticalItemMargin:o,calc:s}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:`column`,[`> ${t}-nav, > div > ${t}-nav`]:{margin:i,"&::before":{position:`absolute`,right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${M(e.lineWidth)} ${e.lineType} ${r}`,content:`''`},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:`width ${e.motionDurationSlow}, left ${e.motionDurationSlow},
- right ${e.motionDurationSlow}`}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav,
- > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:`column`,minWidth:s(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:a,textAlign:`center`},[`${t}-tab + ${t}-tab`]:{margin:o},[`${t}-nav-wrap`]:{flexDirection:`column`,"&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:`height ${e.motionDurationSlow}, top ${e.motionDurationSlow}`}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:`1 0 auto`,flexDirection:`column`}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:M(s(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${M(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:s(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${M(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},dt=e=>{let{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:i,cardHeightLG:a,horizontalItemPaddingSM:o,horizontalItemPaddingLG:s}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:s,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:i,minHeight:i}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${M(e.borderRadius)} ${M(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${M(e.borderRadius)} ${M(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${M(e.borderRadius)} ${M(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${M(e.borderRadius)} 0 0 ${M(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:a,minHeight:a}}}}}},ft=e=>{let{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:i,tabsHorizontalItemMargin:a,horizontalItemPadding:o,itemSelectedColor:s,itemColor:c}=e,l=`${t}-tab`;return{[l]:{position:`relative`,WebkitTouchCallout:`none`,WebkitTapHighlightColor:`transparent`,display:`inline-flex`,alignItems:`center`,padding:o,fontSize:e.titleFontSize,background:`transparent`,border:0,outline:`none`,cursor:`pointer`,color:c,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:`none`,transition:`all ${e.motionDurationSlow}`,[`${l}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":Object.assign({flex:`none`,lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:`transparent`,border:`none`,outline:`none`,cursor:`pointer`,transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading}},w(e)),"&:hover":{color:r},[`&${l}-active ${l}-btn`]:{color:s,textShadow:e.tabsActiveTextShadow},[`&${l}-focus ${l}-btn:focus-visible`]:re(e),[`&${l}-disabled`]:{color:e.colorTextDisabled,cursor:`not-allowed`},[`&${l}-disabled ${l}-btn, &${l}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${l}-remove ${i}`]:{margin:0,verticalAlign:`middle`},[`${i}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${l} + ${l}`]:{margin:{_skip_check_:!0,value:a}}}},pt=e=>{let{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:i,calc:a}=e;return{[`${t}-rtl`]:{direction:`rtl`,[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:M(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:M(e.marginXS)},marginLeft:{_skip_check_:!0,value:M(a(e.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:i},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:`rtl`},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:`right`}}}}},mt=e=>{let{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:i,itemHoverColor:a,itemActiveColor:o,colorBorderSecondary:s}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign({},u(e)),{display:`flex`,[`> ${t}-nav, > div > ${t}-nav`]:{position:`relative`,display:`flex`,flex:`none`,alignItems:`center`,[`${t}-nav-wrap`]:{position:`relative`,display:`flex`,flex:`auto`,alignSelf:`stretch`,overflow:`hidden`,whiteSpace:`nowrap`,transform:`translate(0)`,"&::before, &::after":{position:`absolute`,zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:`''`,pointerEvents:`none`}},[`${t}-nav-list`]:{position:`relative`,display:`flex`,transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:`flex`,alignSelf:`stretch`},[`${t}-nav-operations-hidden`]:{position:`absolute`,visibility:`hidden`,pointerEvents:`none`},[`${t}-nav-more`]:{position:`relative`,padding:n,background:`transparent`,border:0,color:e.colorText,"&::after":{position:`absolute`,right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:`translateY(100%)`,content:`''`}},[`${t}-nav-add`]:Object.assign({minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:i},background:`transparent`,border:`${M(e.lineWidth)} ${e.lineType} ${s}`,borderRadius:`${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)} 0 0`,outline:`none`,cursor:`pointer`,color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:a},"&:active, &:focus:not(:focus-visible)":{color:o}},w(e,-3))},[`${t}-extra-content`]:{flex:`none`},[`${t}-ink-bar`]:{position:`absolute`,background:e.inkBarColor,pointerEvents:`none`}}),ft(e)),{[`${t}-content`]:{position:`relative`,width:`100%`},[`${t}-content-holder`]:{flex:`auto`,minWidth:0,minHeight:0},[`${t}-tabpane`]:Object.assign(Object.assign({},w(e)),{"&-hidden":{display:`none`}})}),[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:`auto`}}}}}},ht=ae(`Tabs`,e=>{let t=g(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsActiveTextShadow:`0 0 0.25px currentcolor`,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${M(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${M(e.horizontalItemGutter)}`});return[dt(t),pt(t),ut(t),lt(t),ct(t),mt(t),st(t)]},e=>{let{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:i,controlHeightLG:a}=e,o=t||a,s=n||i,c=r||a+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:o,cardHeightSM:s,cardHeightLG:c,cardPadding:`${(o-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(s-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(c-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:``,horizontalItemMarginRTL:``,horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}}),gt=()=>null,_t=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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},vt=J.forwardRef((e,t)=>{let{type:n,className:r,rootClassName:i,size:a,onEdit:o,hideAdd:s,centered:c,addIcon:u,removeIcon:d,moreIcon:f,more:p,popupClassName:h,children:g,items:_,animated:v,style:y,indicatorSize:b,indicator:x,destroyInactiveTabPane:S,destroyOnHidden:C}=e,w=_t(e,[`type`,`className`,`rootClassName`,`size`,`onEdit`,`hideAdd`,`centered`,`addIcon`,`removeIcon`,`moreIcon`,`more`,`popupClassName`,`children`,`items`,`animated`,`style`,`indicatorSize`,`indicator`,`destroyInactiveTabPane`,`destroyOnHidden`]),{prefixCls:T}=w,{direction:E,tabs:D,getPrefixCls:O,getPopupContainer:k}=J.useContext(se),A=O(`tabs`,T),j=V(A),[M,N,P]=ht(A,j),F=J.useRef(null);J.useImperativeHandle(t,()=>({nativeElement:F.current}));let I;n===`editable-card`&&(I={onEdit:(e,{key:t,event:n})=>{o?.(e===`add`?n:t,e)},removeIcon:d??D?.removeIcon??J.createElement(K,null),addIcon:(u??D?.addIcon)||J.createElement(ye,null),showAdd:s!==!0});let L=O(),R=m(a),z=ot(_,g),B=rt(A,v),H=Object.assign(Object.assign({},D?.style),y),U={align:x?.align??D?.indicator?.align,size:x?.size??b??D?.indicator?.size??D?.indicatorSize};return M(J.createElement(tt,Object.assign({ref:F,direction:E,getPopupContainer:k},w,{items:z,className:(0,Y.default)({[`${A}-${R}`]:R,[`${A}-card`]:[`card`,`editable-card`].includes(n),[`${A}-editable-card`]:n===`editable-card`,[`${A}-centered`]:c},D?.className,r,i,N,P,j),popupClassName:(0,Y.default)(h,N,P,j),style:H,editable:I,more:Object.assign({icon:D?.more?.icon??D?.moreIcon??f??J.createElement(l,null),transitionName:`${L}-slide-up`},p),prefixCls:A,animated:B,indicator:U,destroyInactiveTabPane:C??S})))});vt.TabPane=gt;var yt=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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},bt=e=>{var{prefixCls:t,className:n,hoverable:r=!0}=e,i=yt(e,[`prefixCls`,`className`,`hoverable`]);let{getPrefixCls:a}=J.useContext(se),o=a(`card`,t),s=(0,Y.default)(`${o}-grid`,n,{[`${o}-grid-hoverable`]:r});return J.createElement(`div`,Object.assign({},i,{className:s}))},xt=e=>{let{antCls:t,componentCls:n,headerHeight:r,headerPadding:i,tabsMarginBottom:a}=e;return Object.assign(Object.assign({display:`flex`,justifyContent:`center`,flexDirection:`column`,minHeight:r,marginBottom:-1,padding:`0 ${M(i)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${M(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)} 0 0`},c()),{"&-wrapper":{width:`100%`,display:`flex`,alignItems:`center`},"&-title":Object.assign(Object.assign({display:`inline-block`,flex:1},B),{[`
- > ${n}-typography,
- > ${n}-typography-edit-content
- `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:`both`,marginBottom:a,color:e.colorText,fontWeight:`normal`,fontSize:e.fontSize,"&-bar":{borderBottom:`${M(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})},St=e=>{let{cardPaddingBase:t,colorBorderSecondary:n,cardShadow:r,lineWidth:i}=e;return{width:`33.33%`,padding:t,border:0,borderRadius:0,boxShadow:`
- ${M(i)} 0 0 0 ${n},
- 0 ${M(i)} 0 0 ${n},
- ${M(i)} ${M(i)} 0 0 ${n},
- ${M(i)} 0 0 0 ${n} inset,
- 0 ${M(i)} 0 0 ${n} inset;
- `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:`relative`,zIndex:1,boxShadow:r}}},Ct=e=>{let{componentCls:t,iconCls:n,actionsLiMargin:r,cardActionsIconSize:i,colorBorderSecondary:a,actionsBg:o}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:`none`,background:o,borderTop:`${M(e.lineWidth)} ${e.lineType} ${a}`,display:`flex`,borderRadius:`0 0 ${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)}`},c()),{"& > li":{margin:r,color:e.colorTextDescription,textAlign:`center`,"> span":{position:`relative`,display:`block`,minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:`pointer`,"&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${n}`]:{display:`inline-block`,width:`100%`,color:e.colorIcon,lineHeight:M(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${n}`]:{fontSize:i,lineHeight:M(e.calc(i).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${M(e.lineWidth)} ${e.lineType} ${a}`}}})},wt=e=>Object.assign(Object.assign({margin:`${M(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:`flex`},c()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:`hidden`,flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},B),"&-description":{color:e.colorTextDescription}}),Tt=e=>{let{componentCls:t,colorFillAlter:n,headerPadding:r,bodyPadding:i}=e;return{[`${t}-head`]:{padding:`0 ${M(r)}`,background:n,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${M(e.padding)} ${M(i)}`}}},Et=e=>{let{componentCls:t}=e;return{overflow:`hidden`,[`${t}-body`]:{userSelect:`none`}}},Dt=e=>{let{componentCls:t,cardShadow:n,cardHeadPadding:r,colorBorderSecondary:i,boxShadowTertiary:a,bodyPadding:o,extraColor:s}=e;return{[t]:Object.assign(Object.assign({},u(e)),{position:`relative`,background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:a},[`${t}-head`]:xt(e),[`${t}-extra`]:{marginInlineStart:`auto`,color:s,fontWeight:`normal`,fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)}`},[`${t}-grid`]:St(e),[`${t}-cover`]:{"> *":{display:`block`,width:`100%`,borderRadius:`${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:Ct(e),[`${t}-meta`]:wt(e)}),[`${t}-bordered`]:{border:`${M(e.lineWidth)} ${e.lineType} ${i}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:`pointer`,transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:`transparent`,boxShadow:n}},[`${t}-contain-grid`]:{borderRadius:`${M(e.borderRadiusLG)} ${M(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:`flex`,flexWrap:`wrap`},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:r}}},[`${t}-type-inner`]:Tt(e),[`${t}-loading`]:Et(e),[`${t}-rtl`]:{direction:`rtl`}}},Ot=e=>{let{componentCls:t,bodyPaddingSM:n,headerPaddingSM:r,headerHeightSM:i,headerFontSizeSM:a}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:i,padding:`0 ${M(r)}`,fontSize:a,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:n}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:`flex`,alignItems:`center`}}}}},kt=ae(`Card`,e=>{let t=g(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[Dt(t),Ot(t)]},e=>({headerBg:`transparent`,headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+e.padding*2,headerHeightSM:e.fontSize*e.lineHeight+e.paddingXS*2,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG})),At=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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},jt=e=>{let{actionClasses:t,actions:n=[],actionStyle:r}=e;return J.createElement(`ul`,{className:t,style:r},n.map((e,t)=>{let r=`action-${t}`;return J.createElement(`li`,{style:{width:`${100/n.length}%`},key:r},J.createElement(`span`,null,e))}))},Mt=J.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,style:a,extra:o,headStyle:s={},bodyStyle:c={},title:l,loading:u,bordered:d,variant:f,size:p,type:h,cover:g,actions:_,tabList:v,children:y,activeTabKey:b,defaultActiveTabKey:x,tabBarExtraContent:S,hoverable:w,tabProps:E={},classNames:D,styles:O}=e,k=At(e,[`prefixCls`,`className`,`rootClassName`,`style`,`extra`,`headStyle`,`bodyStyle`,`title`,`loading`,`bordered`,`variant`,`size`,`type`,`cover`,`actions`,`tabList`,`children`,`activeTabKey`,`defaultActiveTabKey`,`tabBarExtraContent`,`hoverable`,`tabProps`,`classNames`,`styles`]),{getPrefixCls:j,direction:M,card:N}=J.useContext(se),[P]=C(`card`,f,d),F=t=>{var n;(n=e.onTabChange)==null||n.call(e,t)},I=e=>(0,Y.default)(N?.classNames?.[e],D?.[e]),L=e=>Object.assign(Object.assign({},N?.styles?.[e]),O?.[e]),R=J.useMemo(()=>{let e=!1;return J.Children.forEach(y,t=>{t?.type===bt&&(e=!0)}),e},[y]),z=j(`card`,n),[B,V,H]=kt(z),U=J.createElement(A,{loading:!0,active:!0,paragraph:{rows:4},title:!1},y),W=b!==void 0,G=Object.assign(Object.assign({},E),{[W?`activeKey`:`defaultActiveKey`]:W?b:x,tabBarExtraContent:S}),K,q=m(p),ee=!q||q==="default"?`large`:q,te=v?J.createElement(vt,Object.assign({size:ee},G,{className:`${z}-head-tabs`,onChange:F,items:v.map(e=>{var{tab:t}=e,n=At(e,[`tab`]);return Object.assign({label:t},n)})})):null;if(l||o||te){let e=(0,Y.default)(`${z}-head`,I(`header`)),t=(0,Y.default)(`${z}-head-title`,I(`title`)),n=(0,Y.default)(`${z}-extra`,I(`extra`)),r=Object.assign(Object.assign({},s),L(`header`));K=J.createElement(`div`,{className:e,style:r},J.createElement(`div`,{className:`${z}-head-wrapper`},l&&J.createElement(`div`,{className:t,style:L(`title`)},l),o&&J.createElement(`div`,{className:n,style:L(`extra`)},o)),te)}let ne=(0,Y.default)(`${z}-cover`,I(`cover`)),re=g?J.createElement(`div`,{className:ne,style:L(`cover`)},g):null,ie=(0,Y.default)(`${z}-body`,I(`body`)),ae=Object.assign(Object.assign({},c),L(`body`)),oe=J.createElement(`div`,{className:ie,style:ae},u?U:y),ce=(0,Y.default)(`${z}-actions`,I(`actions`)),le=_?.length?J.createElement(jt,{actionClasses:ce,actionStyle:L(`actions`),actions:_}):null,ue=T(k,[`onTabChange`]),de=(0,Y.default)(z,N?.className,{[`${z}-loading`]:u,[`${z}-bordered`]:P!==`borderless`,[`${z}-hoverable`]:w,[`${z}-contain-grid`]:R,[`${z}-contain-tabs`]:v?.length,[`${z}-${q}`]:q,[`${z}-type-${h}`]:!!h,[`${z}-rtl`]:M===`rtl`},r,i,V,H),fe=Object.assign(Object.assign({},N?.style),a);return B(J.createElement(`div`,Object.assign({ref:t},ue,{className:de,style:fe}),K,re,oe,le))}),Nt=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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Pt=e=>{let{prefixCls:t,className:n,avatar:r,title:i,description:a}=e,o=Nt(e,[`prefixCls`,`className`,`avatar`,`title`,`description`]),{getPrefixCls:s}=J.useContext(se),c=s(`card`,t),l=(0,Y.default)(`${c}-meta`,n),u=r?J.createElement(`div`,{className:`${c}-meta-avatar`},r):null,d=i?J.createElement(`div`,{className:`${c}-meta-title`},i):null,f=a?J.createElement(`div`,{className:`${c}-meta-description`},a):null,p=d||f?J.createElement(`div`,{className:`${c}-meta-detail`},d,f):null;return J.createElement(`div`,Object.assign({},o,{className:l}),u,p)},Ft=Mt;Ft.Grid=bt,Ft.Meta=Pt;export{Q as i,vt as n,_e as r,Ft as t};
|