You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
27 KiB
1 line
27 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[49969,79817],{680:function(e,t,n){n.d(t,{Z:function(){return c}});var o=n(5891),r=n(59301),i={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:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},a=n(22589),l=function(e,t){return r.createElement(a.Z,(0,o.Z)({},e,{ref:t,icon:i}))};var c=r.forwardRef(l)},27666:function(e,t,n){var o=n(26390),r=n(71783);t.Z=function(e){let t;const n=n=>()=>{t=null,e.apply(void 0,(0,o.Z)(n))},i=function(){if(null==t){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];t=(0,r.Z)(n(o))}};return i.cancel=()=>{r.Z.cancel(t),t=null},i}},81228:function(e,t,n){n.d(t,{Z:function(){return E}});var o=n(79545),r=n(68550),i=n(17928),a=n(99487),l=n(59301),c=n(92310),s=n.n(c),d=n(28647),p=n(55405),u=n(27666),f=n(36355),g=n(83116),h=n(37613);const m=e=>{const{componentCls:t}=e;return{[t]:{position:"fixed",zIndex:e.zIndexPopup}}};var v=(0,g.Z)("Affix",(e=>{const t=(0,h.TS)(e,{zIndexPopup:e.zIndexBase+10});return[m(t)]}));function b(e){return e!==window?e.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function x(e,t,n){if(void 0!==n&&t.top>e.top-n)return n+t.top}function C(e,t,n){if(void 0!==n&&t.bottom<e.bottom+n){return n+(window.innerHeight-t.bottom)}}const y=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"];function $(){return"undefined"!=typeof window?window:null}var k;!function(e){e[e.None=0]="None",e[e.Prepare=1]="Prepare"}(k||(k={}));let S=function(e){(0,i.Z)(n,e);var t=(0,a.Z)(n);function n(){var e;return(0,o.Z)(this,n),(e=t.apply(this,arguments)).state={status:k.None,lastAffix:!1,prevTarget:null},e.placeholderNodeRef=(0,l.createRef)(),e.fixedNodeRef=(0,l.createRef)(),e.addListeners=()=>{const t=e.getTargetFunc(),n=null==t?void 0:t(),{prevTarget:o}=e.state;o!==n&&(y.forEach((t=>{null==o||o.removeEventListener(t,e.lazyUpdatePosition),null==n||n.addEventListener(t,e.lazyUpdatePosition)})),e.updatePosition(),e.setState({prevTarget:n}))},e.removeListeners=()=>{e.timer&&(clearTimeout(e.timer),e.timer=null);const{prevTarget:t}=e.state,n=e.getTargetFunc(),o=null==n?void 0:n();y.forEach((n=>{null==o||o.removeEventListener(n,e.lazyUpdatePosition),null==t||t.removeEventListener(n,e.lazyUpdatePosition)})),e.updatePosition.cancel(),e.lazyUpdatePosition.cancel()},e.getOffsetTop=()=>{const{offsetBottom:t,offsetTop:n}=e.props;return void 0===t&&void 0===n?0:n},e.getOffsetBottom=()=>e.props.offsetBottom,e.measure=()=>{const{status:t,lastAffix:n}=e.state,{onChange:o}=e.props,r=e.getTargetFunc();if(t!==k.Prepare||!e.fixedNodeRef.current||!e.placeholderNodeRef.current||!r)return;const i=e.getOffsetTop(),a=e.getOffsetBottom(),l=r();if(l){const t={status:k.None},r=b(e.placeholderNodeRef.current);if(0===r.top&&0===r.left&&0===r.width&&0===r.height)return;const c=b(l),s=x(r,c,i),d=C(r,c,a);void 0!==s?(t.affixStyle={position:"fixed",top:s,width:r.width,height:r.height},t.placeholderStyle={width:r.width,height:r.height}):void 0!==d&&(t.affixStyle={position:"fixed",bottom:d,width:r.width,height:r.height},t.placeholderStyle={width:r.width,height:r.height}),t.lastAffix=!!t.affixStyle,o&&n!==t.lastAffix&&o(t.lastAffix),e.setState(t)}},e.prepareMeasure=()=>{e.setState({status:k.Prepare,affixStyle:void 0,placeholderStyle:void 0})},e.updatePosition=(0,u.Z)((()=>{e.prepareMeasure()})),e.lazyUpdatePosition=(0,u.Z)((()=>{const t=e.getTargetFunc(),{affixStyle:n}=e.state;if(t&&n){const o=e.getOffsetTop(),r=e.getOffsetBottom(),i=t();if(i&&e.placeholderNodeRef.current){const t=b(i),a=b(e.placeholderNodeRef.current),l=x(a,t,o),c=C(a,t,r);if(void 0!==l&&n.top===l||void 0!==c&&n.bottom===c)return}}e.prepareMeasure()})),e}return(0,r.Z)(n,[{key:"getTargetFunc",value:function(){const{getTargetContainer:e}=this.context,{target:t}=this.props;return void 0!==t?t:null!=e?e:$}},{key:"componentDidMount",value:function(){this.timer=setTimeout(this.addListeners)}},{key:"componentDidUpdate",value:function(e){this.addListeners(),e.offsetTop===this.props.offsetTop&&e.offsetBottom===this.props.offsetBottom||this.updatePosition(),this.measure()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"render",value:function(){const{affixStyle:e,placeholderStyle:t}=this.state,{affixPrefixCls:n,rootClassName:o,children:r}=this.props,i=s()(e&&o,{[n]:!!e});let a=(0,p.Z)(this.props,["prefixCls","offsetTop","offsetBottom","target","onChange","affixPrefixCls","rootClassName"]);return l.createElement(d.Z,{onResize:this.updatePosition},l.createElement("div",Object.assign({},a,{ref:this.placeholderNodeRef}),e&&l.createElement("div",{style:t,"aria-hidden":"true"}),l.createElement("div",{className:i,ref:this.fixedNodeRef,style:e},l.createElement(d.Z,{onResize:this.updatePosition},r))))}}]),n}(l.Component);S.contextType=f.E_;var E=(0,l.forwardRef)(((e,t)=>{const{prefixCls:n,rootClassName:o}=e,{getPrefixCls:r}=(0,l.useContext)(f.E_),i=r("affix",n),[a,c]=v(i),d=Object.assign(Object.assign({},e),{affixPrefixCls:i,rootClassName:s()(o,c)});return a(l.createElement(S,Object.assign({},d,{ref:t})))}))},79817:function(e,t,n){n.d(t,{Z:function(){return P}});var o=n(26390),r=n(92310),i=n.n(r),a=n(83794),l=n(59301),c=n(6774),s=n(13845),d=n(68031),p=n(81228),u=n(36355);var f=l.createContext(void 0);var g=e=>{const{href:t,title:n,prefixCls:o,children:r,className:a,target:c,replace:s}=e,d=l.useContext(f),{registerLink:p,unregisterLink:g,scrollTo:h,onClick:m,activeLink:v,direction:b}=d||{};l.useEffect((()=>(null==p||p(t),()=>{null==g||g(t)})),[t]);const{getPrefixCls:x}=l.useContext(u.E_),C=x("anchor",o),y=v===t,$=i()(`${C}-link`,a,{[`${C}-link-active`]:y}),k=i()(`${C}-link-title`,{[`${C}-link-title-active`]:y});return l.createElement("div",{className:$},l.createElement("a",{className:k,href:t,title:"string"==typeof n?n:"",target:c,onClick:e=>{s&&(e.preventDefault(),window.location.replace(t)),null==m||m(e,{title:n,href:t}),null==h||h(t)}},n),"horizontal"!==b?r:null)},h=n(17313),m=n(83116),v=n(37613);const b=e=>{const{componentCls:t,holderOffsetBlock:n,motionDurationSlow:o,lineWidthBold:r,colorPrimary:i,lineType:a,colorSplit:l}=e;return{[`${t}-wrapper`]:{marginBlockStart:-n,paddingBlockStart:n,[t]:Object.assign(Object.assign({},(0,h.Wf)(e)),{position:"relative",paddingInlineStart:r,[`${t}-link`]:{paddingBlock:e.linkPaddingBlock,paddingInline:`${e.linkPaddingInlineStart}px 0`,"&-title":Object.assign(Object.assign({},h.vS),{position:"relative",display:"block",marginBlockEnd:e.anchorTitleBlock,color:e.colorText,transition:`all ${e.motionDurationSlow}`,"&:only-child":{marginBlockEnd:0}}),[`&-active > ${t}-link-title`]:{color:e.colorPrimary},[`${t}-link`]:{paddingBlock:e.anchorPaddingBlockSecondary}}}),[`&:not(${t}-wrapper-horizontal)`]:{[t]:{"&::before":{position:"absolute",insetInlineStart:0,top:0,height:"100%",borderInlineStart:`${r}px ${a} ${l}`,content:'" "'},[`${t}-ink`]:{position:"absolute",insetInlineStart:0,display:"none",transform:"translateY(-50%)",transition:`top ${o} ease-in-out`,width:r,backgroundColor:i,[`&${t}-ink-visible`]:{display:"inline-block"}}}},[`${t}-fixed ${t}-ink ${t}-ink`]:{display:"none"}}}},x=e=>{const{componentCls:t,motionDurationSlow:n,lineWidthBold:o,colorPrimary:r}=e;return{[`${t}-wrapper-horizontal`]:{position:"relative","&::before":{position:"absolute",left:{_skip_check_:!0,value:0},right:{_skip_check_:!0,value:0},bottom:0,borderBottom:`1px ${e.lineType} ${e.colorSplit}`,content:'" "'},[t]:{overflowX:"scroll",position:"relative",display:"flex",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},[`${t}-link:first-of-type`]:{paddingInline:0},[`${t}-ink`]:{position:"absolute",bottom:0,transition:`left ${n} ease-in-out, width ${n} ease-in-out`,height:o,backgroundColor:r}}}}};var C=(0,m.Z)("Anchor",(e=>{const{fontSize:t,fontSizeLG:n,paddingXXS:o}=e,r=(0,v.TS)(e,{holderOffsetBlock:o,anchorPaddingBlockSecondary:o/2,anchorTitleBlock:t/14*3,anchorBallSize:n/2});return[b(r),x(r)]}),(e=>({linkPaddingBlock:e.paddingXXS,linkPaddingInlineStart:e.padding})));function y(){return window}function $(e,t){if(!e.getClientRects().length)return 0;const n=e.getBoundingClientRect();return n.width||n.height?t===window?(t=e.ownerDocument.documentElement,n.top-t.clientTop):n.top-t.getBoundingClientRect().top:n.top}const k=/#([\S ]+)$/,S=e=>{var t;const{rootClassName:n,anchorPrefixCls:r,className:h,style:m,offsetTop:v,affix:b=!0,showInkInFixed:x=!1,children:C,items:S,direction:E="vertical",bounds:P,targetOffset:w,onClick:I,onChange:N,getContainer:O,getCurrentAnchor:Z,replace:T}=e;const[B,R]=l.useState([]),[j,z]=l.useState(null),L=l.useRef(j),A=l.useRef(null),M=l.useRef(null),H=l.useRef(!1),{direction:_,getTargetContainer:W,anchor:D}=l.useContext(u.E_),F=null!==(t=null!=O?O:W)&&void 0!==t?t:y,X=JSON.stringify(B),K=(0,a.useEvent)((e=>{B.includes(e)||R((t=>[].concat((0,o.Z)(t),[e])))})),U=(0,a.useEvent)((e=>{B.includes(e)&&R((t=>t.filter((t=>t!==e))))})),G=(0,a.useEvent)((e=>{if(L.current===e)return;const t="function"==typeof Z?Z(e):e;z(t),L.current=t,null==N||N(e)})),V=l.useCallback((()=>{if(H.current)return;const e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;const o=[],r=F();if(e.forEach((e=>{const i=k.exec(null==e?void 0:e.toString());if(!i)return;const a=document.getElementById(i[1]);if(a){const i=$(a,r);i<t+n&&o.push({link:e,top:i})}})),o.length)return o.reduce(((e,t)=>t.top>e.top?t:e)).link;return""}(B,void 0!==w?w:v||0,P);G(e)}),[X,w,v]),q=l.useCallback((e=>{G(e);const t=k.exec(e);if(!t)return;const n=document.getElementById(t[1]);if(!n)return;const o=F();let r=(0,s.Z)(o,!0)+$(n,o);r-=void 0!==w?w:v||0,H.current=!0,(0,d.Z)(r,{getContainer:F,callback(){H.current=!1}})}),[w,v]),J=i()(n,`${r}-wrapper`,{[`${r}-wrapper-horizontal`]:"horizontal"===E,[`${r}-rtl`]:"rtl"===_},h,null==D?void 0:D.className),Q=i()(r,{[`${r}-fixed`]:!b&&!x}),Y=i()(`${r}-ink`,{[`${r}-ink-visible`]:j}),ee=Object.assign(Object.assign({maxHeight:v?`calc(100vh - ${v}px)`:"100vh"},null==D?void 0:D.style),m),te=e=>Array.isArray(e)?e.map((e=>l.createElement(g,Object.assign({replace:T},e,{key:e.key}),"vertical"===E&&te(e.children)))):null,ne=l.createElement("div",{ref:A,className:J,style:ee},l.createElement("div",{className:Q},l.createElement("span",{className:Y,ref:M}),"items"in e?te(S):C));l.useEffect((()=>{const e=F();return V(),null==e||e.addEventListener("scroll",V),()=>{null==e||e.removeEventListener("scroll",V)}}),[X]),l.useEffect((()=>{"function"==typeof Z&&G(Z(L.current||""))}),[Z]),l.useEffect((()=>{(()=>{var e;const t=null===(e=A.current)||void 0===e?void 0:e.querySelector(`.${r}-link-title-active`);if(t&&M.current){const{style:e}=M.current,n="horizontal"===E;e.top=n?"":`${t.offsetTop+t.clientHeight/2}px`,e.height=n?"":`${t.clientHeight}px`,e.left=n?`${t.offsetLeft}px`:"",e.width=n?`${t.clientWidth}px`:"",n&&(0,c.Z)(t,{scrollMode:"if-needed",block:"nearest"})}})()}),[E,Z,X,j]);const oe=l.useMemo((()=>({registerLink:K,unregisterLink:U,scrollTo:q,activeLink:j,onClick:I,direction:E})),[j,I,q,E]);return l.createElement(f.Provider,{value:oe},b?l.createElement(p.Z,{offsetTop:v,target:F},ne):ne)};const E=e=>{const{prefixCls:t,rootClassName:n}=e,{getPrefixCls:o}=l.useContext(u.E_),r=o("anchor",t),[a,c]=C(r);return a(l.createElement(S,Object.assign({},e,{rootClassName:i()(c,n),anchorPrefixCls:r})))};E.Link=g;var P=E},36381:function(e,t,n){n.d(t,{Z:function(){return X}});var o=n(14988),r=n(92310),i=n.n(r),a=n(5891),l=n(26390),c=n(29043),s=n(80665),d=n(71366),p=n(85870),u=n(59301),f=n(19149),g=n(75440),h=n(80962),m=n(43167),v=n(20287),b=u.forwardRef((function(e,t){var n=e.prefixCls,o=e.forceRender,r=e.className,a=e.style,l=e.children,s=e.isActive,d=e.role,p=u.useState(s||o),f=(0,c.Z)(p,2),g=f[0],m=f[1];return u.useEffect((function(){(o||s)&&m(!0)}),[o,s]),g?u.createElement("div",{ref:t,className:i()("".concat(n,"-content"),(0,h.Z)((0,h.Z)({},"".concat(n,"-content-active"),s),"".concat(n,"-content-inactive"),!s),r),style:a,role:d},u.createElement("div",{className:"".concat(n,"-content-box")},l)):null}));b.displayName="PanelContent";var x=b,C=["showArrow","headerClass","isActive","onItemClick","forceRender","className","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],y=u.forwardRef((function(e,t){var n=e.showArrow,o=void 0===n||n,r=e.headerClass,l=e.isActive,c=e.onItemClick,s=e.forceRender,d=e.className,p=e.prefixCls,g=e.collapsible,b=e.accordion,y=e.panelKey,$=e.extra,k=e.header,S=e.expandIcon,E=e.openMotion,P=e.destroyInactivePanel,w=e.children,I=(0,f.Z)(e,C),N="disabled"===g,O="header"===g,Z="icon"===g,T=null!=$&&"boolean"!=typeof $,B=function(){null==c||c(y)},R="function"==typeof S?S(e):u.createElement("i",{className:"arrow"});R&&(R=u.createElement("div",{className:"".concat(p,"-expand-icon"),onClick:["header","icon"].includes(g)?B:void 0},R));var j=i()((0,h.Z)((0,h.Z)((0,h.Z)({},"".concat(p,"-item"),!0),"".concat(p,"-item-active"),l),"".concat(p,"-item-disabled"),N),d),z={className:i()(r,(0,h.Z)((0,h.Z)((0,h.Z)({},"".concat(p,"-header"),!0),"".concat(p,"-header-collapsible-only"),O),"".concat(p,"-icon-collapsible-only"),Z)),"aria-expanded":l,"aria-disabled":N,onKeyDown:function(e){"Enter"!==e.key&&e.keyCode!==v.Z.ENTER&&e.which!==v.Z.ENTER||B()}};return O||Z||(z.onClick=B,z.role=b?"tab":"button",z.tabIndex=N?-1:0),u.createElement("div",(0,a.Z)({},I,{ref:t,className:j}),u.createElement("div",z,o&&R,u.createElement("span",{className:"".concat(p,"-header-text"),onClick:"header"===g?B:void 0},k),T&&u.createElement("div",{className:"".concat(p,"-extra")},$)),u.createElement(m.default,(0,a.Z)({visible:l,leavedClassName:"".concat(p,"-content-hidden")},E,{forceRender:s,removeOnLeave:P}),(function(e,t){var n=e.className,o=e.style;return u.createElement(x,{ref:t,prefixCls:p,className:n,style:o,isActive:l,forceRender:s,role:b?"tabpanel":void 0},w)})))})),$=["children","label","key","collapsible","onItemClick","destroyInactivePanel"];var k=function(e,t,n){return Array.isArray(e)?function(e,t){var n=t.prefixCls,o=t.accordion,r=t.collapsible,i=t.destroyInactivePanel,l=t.onItemClick,c=t.activeKey,s=t.openMotion,d=t.expandIcon;return e.map((function(e,t){var p=e.children,g=e.label,h=e.key,m=e.collapsible,v=e.onItemClick,b=e.destroyInactivePanel,x=(0,f.Z)(e,$),C=String(null!=h?h:t),k=null!=m?m:r,S=null!=b?b:i,E=!1;return E=o?c[0]===C:c.indexOf(C)>-1,u.createElement(y,(0,a.Z)({},x,{prefixCls:n,key:C,panelKey:C,isActive:E,accordion:o,openMotion:s,expandIcon:d,header:g,collapsible:k,onItemClick:function(e){"disabled"!==k&&(l(e),null==v||v(e))},destroyInactivePanel:S}),p)}))}(e,n):(0,g.Z)(t).map((function(e,t){return function(e,t,n){if(!e)return null;var o=n.prefixCls,r=n.accordion,i=n.collapsible,a=n.destroyInactivePanel,l=n.onItemClick,c=n.activeKey,s=n.openMotion,d=n.expandIcon,p=e.key||String(t),f=e.props,g=f.header,h=f.headerClass,m=f.destroyInactivePanel,v=f.collapsible,b=f.onItemClick,x=!1;x=r?c[0]===p:c.indexOf(p)>-1;var C=null!=v?v:i,y={key:p,panelKey:p,header:g,headerClass:h,isActive:x,prefixCls:o,destroyInactivePanel:null!=m?m:a,openMotion:s,accordion:r,children:e.props.children,onItemClick:function(e){"disabled"!==C&&(l(e),null==b||b(e))},expandIcon:d,collapsible:C};return"string"==typeof e.type?e:(Object.keys(y).forEach((function(e){void 0===y[e]&&delete y[e]})),u.cloneElement(e,y))}(e,t,n)}))},S=n(47413);function E(e){var t=e;if(!Array.isArray(t)){var n=(0,s.Z)(t);t="number"===n||"string"===n?[t]:[]}return t.map((function(e){return String(e)}))}var P=u.forwardRef((function(e,t){var n=e.prefixCls,o=void 0===n?"rc-collapse":n,r=e.destroyInactivePanel,s=void 0!==r&&r,f=e.style,g=e.accordion,h=e.className,m=e.children,v=e.collapsible,b=e.openMotion,x=e.expandIcon,C=e.activeKey,y=e.defaultActiveKey,$=e.onChange,P=e.items,w=i()(o,h),I=(0,d.Z)([],{value:C,onChange:function(e){return null==$?void 0:$(e)},defaultValue:y,postState:E}),N=(0,c.Z)(I,2),O=N[0],Z=N[1];(0,p.ZP)(!m,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var T=k(P,m,{prefixCls:o,accordion:g,openMotion:b,expandIcon:x,collapsible:v,destroyInactivePanel:s,onItemClick:function(e){return Z((function(){return g?O[0]===e?[]:[e]:O.indexOf(e)>-1?O.filter((function(t){return t!==e})):[].concat((0,l.Z)(O),[e])}))},activeKey:O});return u.createElement("div",(0,a.Z)({ref:t,className:w,style:f,role:g?"tablist":void 0},(0,S.Z)(e,{aria:!0,data:!0})),T)})),w=Object.assign(P,{Panel:y}),I=w,N=(w.Panel,n(55405)),O=n(62892),Z=n(92343),T=n(36355),B=n(19716);var R=u.forwardRef(((e,t)=>{const{getPrefixCls:n}=u.useContext(T.E_),{prefixCls:o,className:r,showArrow:a=!0}=e,l=n("collapse",o),c=i()({[`${l}-no-arrow`]:!a},r);return u.createElement(I.Panel,Object.assign({ref:t},e,{prefixCls:l,className:c}))})),j=n(17313),z=n(8378),L=n(83116),A=n(37613);const M=e=>{const{componentCls:t,contentBg:n,padding:o,headerBg:r,headerPadding:i,collapseHeaderPaddingSM:a,collapseHeaderPaddingLG:l,collapsePanelBorderRadius:c,lineWidth:s,lineType:d,colorBorder:p,colorText:u,colorTextHeading:f,colorTextDisabled:g,fontSize:h,fontSizeLG:m,lineHeight:v,marginSM:b,paddingSM:x,paddingLG:C,paddingXS:y,motionDurationSlow:$,fontSizeIcon:k,contentPadding:S}=e,E=`${s}px ${d} ${p}`;return{[t]:Object.assign(Object.assign({},(0,j.Wf)(e)),{backgroundColor:r,border:E,borderBottom:0,borderRadius:`${c}px`,"&-rtl":{direction:"rtl"},[`& > ${t}-item`]:{borderBottom:E,"&:last-child":{[`\n &,\n & > ${t}-header`]:{borderRadius:`0 0 ${c}px ${c}px`}},[`> ${t}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:i,color:f,lineHeight:v,cursor:"pointer",transition:`all ${$}, visibility 0s`,[`> ${t}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${t}-expand-icon`]:{height:h*v,display:"flex",alignItems:"center",paddingInlineEnd:b},[`${t}-arrow`]:Object.assign(Object.assign({},(0,j.Ro)()),{fontSize:k,svg:{transition:`transform ${$}`}}),[`${t}-header-text`]:{marginInlineEnd:"auto"}},[`${t}-header-collapsible-only`]:{cursor:"default",[`${t}-header-text`]:{flex:"none",cursor:"pointer"}},[`${t}-icon-collapsible-only`]:{cursor:"default",[`${t}-expand-icon`]:{cursor:"pointer"}}},[`${t}-content`]:{color:u,backgroundColor:n,borderTop:E,[`& > ${t}-content-box`]:{padding:S},"&-hidden":{display:"none"}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:a,paddingInlineStart:y,[`> ${t}-expand-icon`]:{marginInlineStart:x-y}},[`> ${t}-content > ${t}-content-box`]:{padding:x}}},"&-large":{[`> ${t}-item`]:{fontSize:m,[`> ${t}-header`]:{padding:l,paddingInlineStart:o,[`> ${t}-expand-icon`]:{height:m*v,marginInlineStart:C-o}},[`> ${t}-content > ${t}-content-box`]:{padding:C}}},[`${t}-item:last-child`]:{[`> ${t}-content`]:{borderRadius:`0 0 ${c}px ${c}px`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:g,cursor:"not-allowed"}},[`&${t}-icon-position-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:b}}}}})}},H=e=>{const{componentCls:t}=e;return{[`${t}-rtl`]:{[`> ${t}-item > ${t}-header ${t}-arrow svg`]:{transform:"rotate(180deg)"}}}},_=e=>{const{componentCls:t,headerBg:n,paddingXXS:o,colorBorder:r}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${r}`},[`\n > ${t}-item:last-child,\n > ${t}-item:last-child ${t}-header\n `]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{paddingTop:o}}}},W=e=>{const{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:"transparent",border:0,[`> ${t}-content-box`]:{paddingBlock:n}}}}}};var D=(0,L.Z)("Collapse",(e=>{const t=(0,A.TS)(e,{collapseHeaderPaddingSM:`${e.paddingXS}px ${e.paddingSM}px`,collapseHeaderPaddingLG:`${e.padding}px ${e.paddingLG}px`,collapsePanelBorderRadius:e.borderRadiusLG});return[M(t),_(t),W(t),H(t),(0,z.Z)(t)]}),(e=>({headerPadding:`${e.paddingSM}px ${e.padding}px`,headerBg:e.colorFillAlter,contentPadding:`${e.padding}px 16px`,contentBg:e.colorBgContainer})));const F=u.forwardRef(((e,t)=>{const{getPrefixCls:n,direction:r,collapse:a}=u.useContext(T.E_),{prefixCls:l,className:c,rootClassName:s,style:d,bordered:p=!0,ghost:f,size:h,expandIconPosition:m="start",children:v,expandIcon:b}=e,x=(0,B.Z)((e=>{var t;return null!==(t=null!=h?h:e)&&void 0!==t?t:"middle"})),C=n("collapse",l),y=n(),[$,k]=D(C),S=u.useMemo((()=>"left"===m?"start":"right"===m?"end":m),[m]),E=i()(`${C}-icon-position-${S}`,{[`${C}-borderless`]:!p,[`${C}-rtl`]:"rtl"===r,[`${C}-ghost`]:!!f,[`${C}-${x}`]:"middle"!==x},null==a?void 0:a.className,c,s,k),P=Object.assign(Object.assign({},(0,O.Z)(y)),{motionAppear:!1,leavedClassName:`${C}-content-hidden`}),w=u.useMemo((()=>v?(0,g.Z)(v).map(((e,t)=>{var n,o;if(null===(n=e.props)||void 0===n?void 0:n.disabled){const n=null!==(o=e.key)&&void 0!==o?o:String(t),{disabled:r,collapsible:i}=e.props,a=Object.assign(Object.assign({},(0,N.Z)(e.props,["disabled"])),{key:n,collapsible:null!=i?i:r?"disabled":void 0});return(0,Z.Tm)(e,a)}return e})):null),[v]);return $(u.createElement(I,Object.assign({ref:t,openMotion:P},(0,N.Z)(e,["rootClassName"]),{expandIcon:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=b?b(e):u.createElement(o.Z,{rotate:e.isActive?90:void 0});return(0,Z.Tm)(t,(()=>({className:i()(t.props.className,`${C}-arrow`)})))},prefixCls:C,className:E,style:Object.assign(Object.assign({},null==a?void 0:a.style),d)}),w))}));var X=Object.assign(F,{Panel:R})},12563:function(e,t,n){n.d(t,{Z:function(){return P}});var o=n(59301),r=n(51638),i=n(92310),a=n.n(i),l=n(36785),c=n(47729),s=n(14088),d=n(36355),p=n(17313),u=n(37613),f=n(83116);const g=e=>{const{lineWidth:t,fontSizeIcon:n}=e,o=e.fontSizeSM,r=e.lineHeightSM*o+"px";return(0,u.TS)(e,{tagFontSize:o,tagLineHeight:r,tagIconSize:n-2*t,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary})},h=e=>({defaultBg:e.colorFillQuaternary,defaultColor:e.colorText});var m=(0,f.Z)("Tag",(e=>(e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:o,componentCls:r}=e,i=o-n,a=t-n;return{[r]:Object.assign(Object.assign({},(0,p.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:i,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${r}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${r}-close-icon`]:{marginInlineStart:a,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${r}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${r}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:i}}),[`${r}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(g(e))),h),v=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};var b=e=>{const{prefixCls:t,style:n,className:r,checked:i,onChange:l,onClick:c}=e,s=v(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:p,tag:u}=o.useContext(d.E_),f=p("tag",t),[g,h]=m(f),b=a()(f,`${f}-checkable`,{[`${f}-checkable-checked`]:i},null==u?void 0:u.className,r,h);return g(o.createElement("span",Object.assign({},s,{style:Object.assign(Object.assign({},n),null==u?void 0:u.style),className:b,onClick:e=>{null==l||l(!i),null==c||c(e)}})))},x=n(45157);var C=(0,f.b)(["Tag","preset"],(e=>(e=>(0,x.Z)(e,((t,n)=>{let{textColor:o,lightBorderColor:r,lightColor:i,darkColor:a}=n;return{[`${e.componentCls}-${t}`]:{color:o,background:i,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:a,borderColor:a},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}})))(g(e))),h);const y=(e,t,n)=>{const o="string"!=typeof(r=n)?r:r.charAt(0).toUpperCase()+r.slice(1);var r;return{[`${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${o}Bg`],borderColor:e[`color${o}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}};var $=(0,f.b)(["Tag","status"],(e=>{const t=g(e);return[y(t,"success","Success"),y(t,"processing","Info"),y(t,"error","Error"),y(t,"warning","Warning")]}),h),k=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};const S=(e,t)=>{const{prefixCls:n,className:i,rootClassName:p,style:u,children:f,icon:g,color:h,onClose:v,closeIcon:b,closable:x,bordered:y=!0}=e,S=k(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","closeIcon","closable","bordered"]),{getPrefixCls:E,direction:P,tag:w}=o.useContext(d.E_),[I,N]=o.useState(!0);o.useEffect((()=>{"visible"in S&&N(S.visible)}),[S.visible]);const O=(0,l.o2)(h),Z=(0,l.yT)(h),T=O||Z,B=Object.assign(Object.assign({backgroundColor:h&&!T?h:void 0},null==w?void 0:w.style),u),R=E("tag",n),[j,z]=m(R),L=a()(R,null==w?void 0:w.className,{[`${R}-${h}`]:T,[`${R}-has-color`]:h&&!T,[`${R}-hidden`]:!I,[`${R}-rtl`]:"rtl"===P,[`${R}-borderless`]:!y},i,p,z),A=e=>{e.stopPropagation(),null==v||v(e),e.defaultPrevented||N(!1)},[,M]=(0,c.Z)(x,b,(e=>null===e?o.createElement(r.Z,{className:`${R}-close-icon`,onClick:A}):o.createElement("span",{className:`${R}-close-icon`,onClick:A},e)),null,!1),H="function"==typeof S.onClick||f&&"a"===f.type,_=g||null,W=_?o.createElement(o.Fragment,null,_,f&&o.createElement("span",null,f)):f,D=o.createElement("span",Object.assign({},S,{ref:t,className:L,style:B}),W,M,O&&o.createElement(C,{key:"preset",prefixCls:R}),Z&&o.createElement($,{key:"status",prefixCls:R}));return j(H?o.createElement(s.Z,{component:"Tag"},D):D)},E=o.forwardRef(S);E.CheckableTag=b;var P=E}}]); |