mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-17 04:37:53 +00:00
1 line
22 KiB
JavaScript
1 line
22 KiB
JavaScript
"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[9324],{93689:function(e,o,n){n.d(o,{Z:function(){return s}});var t=n(11757),r=n(44194),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{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"}}]},name:"check-circle",theme:"outlined"},l=n(54183),a=function(e,o){return r.createElement(l.Z,(0,t.Z)({},e,{ref:o,icon:i}))};var s=r.forwardRef(a)},40439:function(e,o,n){n.d(o,{Z:function(){return s}});var t=n(11757),r=n(44194),i={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 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"},l=n(54183),a=function(e,o){return r.createElement(l.Z,(0,t.Z)({},e,{ref:o,icon:i}))};var s=r.forwardRef(a)},37665:function(e,o,n){n.r(o),n.d(o,{default:function(){return S}});var t=n(45332),r=n.n(t),i=n(44194),l=n(32327),a=n(29266),s=n(32943),c=n(88201),d=n(5602),u=n(62673),g=n(38775),p=n(19116),f=n(9452),m=n(40269),h=n(93689),b=n(40439),v=n(88008),x=n(36310),$="licenseContainer___vEcmL",y=n(31549),C=l.Z.Title,j=l.Z.Text,I=l.Z.Paragraph,S=function(){var e=(0,i.useState)(null),o=r()(e,2),n=o[0],t=o[1];(0,i.useEffect)((function(){var e=(0,x.xn)();t(e)}),[]);var l=function(e){switch(e){case"COMMUNITY":return"blue";case"ENTERPRISE":return"purple";case"PLATFORM":return"gold";default:return"default"}},S=function(e){return"paid"===e?(0,y.jsx)(a.Z,{color:"green",children:"付费版"}):(0,y.jsx)(a.Z,{color:"orange",children:"试用版"})},w=function(){return n?n.isValid?(0,y.jsx)(a.Z,{color:"success",icon:(0,y.jsx)(h.Z,{}),children:"有效"}):(0,y.jsx)(a.Z,{color:"error",icon:(0,y.jsx)(b.Z,{}),children:"已过期"}):(0,y.jsx)(a.Z,{color:"default",children:"未知"})};if(!n)return(0,y.jsx)(s.Z,{message:"正在加载许可证信息...",type:"info"});var k=function(){if(!n||!n.expiryDate)return null;var e=new Date(n.expiryDate),o=new Date,t=e.getTime()-o.getTime(),r=Math.ceil(t/864e5);return Math.max(0,r)}();return(0,y.jsx)("div",{className:$||"",children:(0,y.jsx)(c.Z,{gutter:[16,16],children:(0,y.jsx)(d.Z,{span:24,children:(0,y.jsxs)(u.Z,{children:[(0,y.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:16},children:[(0,y.jsx)(v.Z,{style:{fontSize:24,color:"#faad14",marginRight:8}}),(0,y.jsx)(C,{level:3,style:{margin:0},children:"微语 AI 许可证信息"})]}),(0,y.jsx)(s.Z,{message:(0,y.jsxs)("div",{children:[(0,y.jsx)("span",{children:"当前版本: "}),(0,y.jsxs)(a.Z,{color:l(n.edition),children:["COMMUNITY"===n.edition&&"社区版","ENTERPRISE"===n.edition&&"企业版","PLATFORM"===n.edition&&"平台版"]}),"paid"===n.userType?(0,y.jsxs)("span",{children:[S(n.userType),null!==k&&(0,y.jsxs)("span",{style:{color:k<=7?"#ff4d4f":k<=15?"#faad14":"#52c41a"},children:["(剩余 ",k," 天)"]})]}):S(n.userType),w()]}),type:n.isValid?"success":"warning",showIcon:!0}),(0,y.jsx)(g.Z,{}),(0,y.jsxs)(p.Z,{bordered:!0,column:{xxl:3,xl:3,lg:2,md:2,sm:1,xs:1},children:[(0,y.jsx)(p.Z.Item,{label:"许可证版本",children:(0,y.jsxs)(a.Z,{color:l(n.edition),children:["COMMUNITY"===n.edition&&"社区版","ENTERPRISE"===n.edition&&"企业版","PLATFORM"===n.edition&&"平台版"]})}),(0,y.jsx)(p.Z.Item,{label:"许可证类型",children:S(n.userType)}),(0,y.jsx)(p.Z.Item,{label:"许可证状态",children:w()}),(0,y.jsxs)(p.Z.Item,{label:"过期日期",children:[n.expiryDate||"未设置",null!==k&&(0,y.jsxs)(j,{style:{marginLeft:8,color:k<=7?"#ff4d4f":k<=15?"#faad14":"#52c41a"},children:["(剩余 ",k," 天)"]})]})]}),(0,y.jsx)(g.Z,{children:"授权信息"}),(0,y.jsxs)(c.Z,{gutter:[16,16],children:[(0,y.jsx)(d.Z,{xs:24,md:12,children:(0,y.jsx)(u.Z,{title:"授权服务器IP",size:"small",children:n.serverIps&&n.serverIps.length>0?(0,y.jsx)(f.Z,{size:"small",dataSource:n.serverIps,renderItem:function(e){return(0,y.jsx)(f.Z.Item,{children:(0,y.jsx)(m.Z,{status:"processing",text:e})})}}):(0,y.jsx)(s.Z,{message:"未设置授权IP限制",type:"info",showIcon:!0})})}),(0,y.jsx)(d.Z,{xs:24,md:12,children:(0,y.jsx)(u.Z,{title:"授权域名",size:"small",children:n.serverDomains&&n.serverDomains.length>0?(0,y.jsx)(f.Z,{size:"small",dataSource:n.serverDomains,renderItem:function(e){return(0,y.jsx)(f.Z.Item,{children:(0,y.jsx)(m.Z,{status:"processing",text:e})})}}):(0,y.jsx)(s.Z,{message:"未设置授权域名限制",type:"info",showIcon:!0})})})]}),(0,y.jsx)(g.Z,{}),(0,y.jsx)(s.Z,{message:"授权说明",description:(0,y.jsxs)("div",{children:[(0,y.jsx)(I,{children:"1. 社区版:适用于个人或小型组织,基础功能免费使用"}),(0,y.jsx)(I,{children:"2. 企业版:适用于中型组织,包含高级功能和优先支持"}),(0,y.jsx)(I,{children:"3. 平台版:适用于大型企业或平台型业务,提供定制化功能和专属支持"}),(0,y.jsxs)(I,{children:["如需升级许可证或了解更多信息,请访问 ",(0,y.jsx)("a",{href:"https://www.weiyuai.cn",target:"_blank",rel:"noopener noreferrer",children:"官方网站"})]})]}),type:"info"})]})})})})}},32943:function(e,o,n){n.d(o,{Z:function(){return H}});var t=n(44194),r=n(58644),i=n(92520),l=n(14377),a=n(64985),s=n(18701),c=n(51865),d=n.n(c),u=n(77588),g=n(67762),p=n(34221),f=n(79145),m=n(37167),h=n(47825),b=n(88874),v=n(65759);const x=(e,o,n,t,r)=>({background:e,border:`${(0,h.bf)(t.lineWidth)} ${t.lineType} ${o}`,[`${r}-icon`]:{color:n}}),$=e=>{const{componentCls:o,motionDurationSlow:n,marginXS:t,marginSM:r,fontSize:i,fontSizeLG:l,lineHeight:a,borderRadiusLG:s,motionEaseInOutCirc:c,withDescriptionIconSize:d,colorText:u,colorTextHeading:g,withDescriptionPadding:p,defaultPadding:f}=e;return{[o]:Object.assign(Object.assign({},(0,b.Wf)(e)),{position:"relative",display:"flex",alignItems:"center",padding:f,wordWrap:"break-word",borderRadius:s,[`&${o}-rtl`]:{direction:"rtl"},[`${o}-content`]:{flex:1,minWidth:0},[`${o}-icon`]:{marginInlineEnd:t,lineHeight:0},"&-description":{display:"none",fontSize:i,lineHeight:a},"&-message":{color:g},[`&${o}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c},\n padding-top ${n} ${c}, padding-bottom ${n} ${c},\n margin-bottom ${n} ${c}`},[`&${o}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${o}-with-description`]:{alignItems:"flex-start",padding:p,[`${o}-icon`]:{marginInlineEnd:r,fontSize:d,lineHeight:0},[`${o}-message`]:{display:"block",marginBottom:t,color:g,fontSize:l},[`${o}-description`]:{display:"block",color:u}},[`${o}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},y=e=>{const{componentCls:o,colorSuccess:n,colorSuccessBorder:t,colorSuccessBg:r,colorWarning:i,colorWarningBorder:l,colorWarningBg:a,colorError:s,colorErrorBorder:c,colorErrorBg:d,colorInfo:u,colorInfoBorder:g,colorInfoBg:p}=e;return{[o]:{"&-success":x(r,t,n,e,o),"&-info":x(p,g,u,e,o),"&-warning":x(a,l,i,e,o),"&-error":Object.assign(Object.assign({},x(d,c,s,e,o)),{[`${o}-description > pre`]:{margin:0,padding:0}})}}},C=e=>{const{componentCls:o,iconCls:n,motionDurationMid:t,marginXS:r,fontSizeIcon:i,colorIcon:l,colorIconHover:a}=e;return{[o]:{"&-action":{marginInlineStart:r},[`${o}-close-icon`]:{marginInlineStart:r,padding:0,overflow:"hidden",fontSize:i,lineHeight:(0,h.bf)(i),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:l,transition:`color ${t}`,"&:hover":{color:a}}},"&-close-text":{color:l,transition:`color ${t}`,"&:hover":{color:a}}}}};var j=(0,v.I$)("Alert",(e=>[$(e),y(e),C(e)]),(e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`}))),I=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)o.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(n[t[r]]=e[t[r]])}return n};const S={success:r.Z,info:s.Z,error:i.Z,warning:a.Z},w=e=>{const{icon:o,prefixCls:n,type:r}=e,i=S[r]||null;return o?(0,f.wm)(o,t.createElement("span",{className:`${n}-icon`},o),(()=>({className:d()(`${n}-icon`,o.props.className)}))):t.createElement(i,{className:`${n}-icon`})},k=e=>{const{isClosable:o,prefixCls:n,closeIcon:r,handleClose:i,ariaProps:a}=e,s=!0===r||void 0===r?t.createElement(l.Z,null):r;return o?t.createElement("button",Object.assign({type:"button",onClick:i,className:`${n}-close-icon`,tabIndex:0},a),s):null},E=t.forwardRef(((e,o)=>{const{description:n,prefixCls:r,message:i,banner:l,className:a,rootClassName:s,style:c,onMouseEnter:f,onMouseLeave:h,onClick:b,afterClose:v,showIcon:x,closable:$,closeText:y,closeIcon:C,action:S,id:E}=e,Z=I(e,["description","prefixCls","message","banner","className","rootClassName","style","onMouseEnter","onMouseLeave","onClick","afterClose","showIcon","closable","closeText","closeIcon","action","id"]),[O,z]=t.useState(!1);const M=t.useRef(null);t.useImperativeHandle(o,(()=>({nativeElement:M.current})));const{getPrefixCls:N,direction:P,alert:T}=t.useContext(m.E_),B=N("alert",r),[H,L,R]=j(B),W=o=>{var n;z(!0),null===(n=e.onClose)||void 0===n||n.call(e,o)},D=t.useMemo((()=>void 0!==e.type?e.type:l?"warning":"info"),[e.type,l]),A=t.useMemo((()=>!("object"!=typeof $||!$.closeIcon)||(!!y||("boolean"==typeof $?$:!1!==C&&null!=C||!!(null==T?void 0:T.closable)))),[y,C,$,null==T?void 0:T.closable]),G=!(!l||void 0!==x)||x,X=d()(B,`${B}-${D}`,{[`${B}-with-description`]:!!n,[`${B}-no-icon`]:!G,[`${B}-banner`]:!!l,[`${B}-rtl`]:"rtl"===P},null==T?void 0:T.className,a,s,R,L),F=(0,g.Z)(Z,{aria:!0,data:!0}),_=t.useMemo((()=>{var e,o;return"object"==typeof $&&$.closeIcon?$.closeIcon:y||(void 0!==C?C:"object"==typeof(null==T?void 0:T.closable)&&(null===(e=null==T?void 0:T.closable)||void 0===e?void 0:e.closeIcon)?null===(o=null==T?void 0:T.closable)||void 0===o?void 0:o.closeIcon:null==T?void 0:T.closeIcon)}),[C,$,y,null==T?void 0:T.closeIcon]),q=t.useMemo((()=>{const e=null!=$?$:null==T?void 0:T.closable;if("object"==typeof e){const{closeIcon:o}=e;return I(e,["closeIcon"])}return{}}),[$,null==T?void 0:T.closable]);return H(t.createElement(u.ZP,{visible:!O,motionName:`${B}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:e=>({maxHeight:e.offsetHeight}),onLeaveEnd:v},((o,r)=>{let{className:l,style:a}=o;return t.createElement("div",Object.assign({id:E,ref:(0,p.sQ)(M,r),"data-show":!O,className:d()(X,l),style:Object.assign(Object.assign(Object.assign({},null==T?void 0:T.style),c),a),onMouseEnter:f,onMouseLeave:h,onClick:b,role:"alert"},F),G?t.createElement(w,{description:n,icon:e.icon,prefixCls:B,type:D}):null,t.createElement("div",{className:`${B}-content`},i?t.createElement("div",{className:`${B}-message`},i):null,n?t.createElement("div",{className:`${B}-description`},n):null),S?t.createElement("div",{className:`${B}-action`},S):null,t.createElement(k,{isClosable:A,prefixCls:B,closeIcon:_,handleClose:W,ariaProps:q}))})))}));var Z=E,O=n(74592),z=n(32099),M=n(67019),N=n(14755);let P=function(e){function o(){var e;return(0,O.Z)(this,o),(e=(0,M.Z)(this,o,arguments)).state={error:void 0,info:{componentStack:""}},e}return(0,N.Z)(o,e),(0,z.Z)(o,[{key:"componentDidCatch",value:function(e,o){this.setState({error:e,info:o})}},{key:"render",value:function(){const{message:e,description:o,id:n,children:r}=this.props,{error:i,info:l}=this.state,a=(null==l?void 0:l.componentStack)||null,s=void 0===e?(i||"").toString():e,c=void 0===o?a:o;return i?t.createElement(Z,{id:n,type:"error",message:s,description:t.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},c)}):r}}])}(t.Component);var T=P;const B=Z;B.ErrorBoundary=T;var H=B},38775:function(e,o,n){n.d(o,{Z:function(){return f}});var t=n(44194),r=n(51865),i=n.n(r),l=n(37167),a=n(47825),s=n(88874),c=n(65759),d=n(77167);const u=e=>{const{componentCls:o,sizePaddingEdgeHorizontal:n,colorSplit:t,lineWidth:r,textPaddingInline:i,orientationMargin:l,verticalMarginInline:c}=e;return{[o]:Object.assign(Object.assign({},(0,s.Wf)(e)),{borderBlockStart:`${(0,a.bf)(r)} solid ${t}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:c,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${(0,a.bf)(r)} solid ${t}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${(0,a.bf)(e.dividerHorizontalGutterMargin)} 0`},[`&-horizontal${o}-with-text`]:{display:"flex",alignItems:"center",margin:`${(0,a.bf)(e.dividerHorizontalWithTextGutterMargin)} 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${t}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${(0,a.bf)(r)} solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${o}-with-text-left`]:{"&::before":{width:`calc(${l} * 100%)`},"&::after":{width:`calc(100% - ${l} * 100%)`}},[`&-horizontal${o}-with-text-right`]:{"&::before":{width:`calc(100% - ${l} * 100%)`},"&::after":{width:`calc(${l} * 100%)`}},[`${o}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:i},"&-dashed":{background:"none",borderColor:t,borderStyle:"dashed",borderWidth:`${(0,a.bf)(r)} 0 0`},[`&-horizontal${o}-with-text${o}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${o}-dashed`]:{borderInlineStartWidth:r,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:t,borderStyle:"dotted",borderWidth:`${(0,a.bf)(r)} 0 0`},[`&-horizontal${o}-with-text${o}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${o}-dotted`]:{borderInlineStartWidth:r,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${o}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${o}-with-text-left${o}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${o}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${o}-with-text-right${o}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${o}-inner-text`]:{paddingInlineEnd:n}}})}};var g=(0,c.I$)("Divider",(e=>{const o=(0,d.IX)(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0});return[u(o)]}),(e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS})),{unitless:{orientationMargin:!0}}),p=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)o.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(n[t[r]]=e[t[r]])}return n};var f=e=>{const{getPrefixCls:o,direction:n,divider:r}=t.useContext(l.E_),{prefixCls:a,type:s="horizontal",orientation:c="center",orientationMargin:d,className:u,rootClassName:f,children:m,dashed:h,variant:b="solid",plain:v,style:x}=e,$=p(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","variant","plain","style"]),y=o("divider",a),[C,j,I]=g(y),S=!!m,w="left"===c&&null!=d,k="right"===c&&null!=d,E=i()(y,null==r?void 0:r.className,j,I,`${y}-${s}`,{[`${y}-with-text`]:S,[`${y}-with-text-${c}`]:S,[`${y}-dashed`]:!!h,[`${y}-${b}`]:"solid"!==b,[`${y}-plain`]:!!v,[`${y}-rtl`]:"rtl"===n,[`${y}-no-default-orientation-margin-left`]:w,[`${y}-no-default-orientation-margin-right`]:k},u,f),Z=t.useMemo((()=>"number"==typeof d?d:/^\d+$/.test(d)?Number(d):d),[d]),O=Object.assign(Object.assign({},w&&{marginLeft:Z}),k&&{marginRight:Z});return C(t.createElement("div",Object.assign({className:E,style:Object.assign(Object.assign({},null==r?void 0:r.style),x)},$,{role:"separator"}),m&&"vertical"!==s&&t.createElement("span",{className:`${y}-inner-text`,style:O},m)))}},29266:function(e,o,n){n.d(o,{Z:function(){return O}});var t=n(44194),r=n(51865),i=n.n(r),l=n(97859),a=n(63125),s=n(80314),c=n(79145),d=n(18011),u=n(37167),g=n(47825),p=n(87471),f=n(88874),m=n(77167),h=n(65759);const b=e=>{const{lineWidth:o,fontSizeIcon:n,calc:t}=e,r=e.fontSizeSM;return(0,m.IX)(e,{tagFontSize:r,tagLineHeight:(0,g.bf)(t(e.lineHeightSM).mul(r).equal()),tagIconSize:t(n).sub(t(o).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},v=e=>({defaultBg:new p.t(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var x=(0,h.I$)("Tag",(e=>(e=>{const{paddingXXS:o,lineWidth:n,tagPaddingHorizontal:t,componentCls:r,calc:i}=e,l=i(t).sub(n).equal(),a=i(o).sub(n).equal();return{[r]:Object.assign(Object.assign({},(0,f.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:l,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,g.bf)(e.lineWidth)} ${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,fontSize:e.tagIconSize,color:e.colorTextDescription,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:l}}),[`${r}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}})(b(e))),v),$=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)o.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(n[t[r]]=e[t[r]])}return n};const y=t.forwardRef(((e,o)=>{const{prefixCls:n,style:r,className:l,checked:a,onChange:s,onClick:c}=e,d=$(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:g,tag:p}=t.useContext(u.E_),f=g("tag",n),[m,h,b]=x(f),v=i()(f,`${f}-checkable`,{[`${f}-checkable-checked`]:a},null==p?void 0:p.className,l,h,b);return m(t.createElement("span",Object.assign({},d,{ref:o,style:Object.assign(Object.assign({},r),null==p?void 0:p.style),className:v,onClick:e=>{null==s||s(!a),null==c||c(e)}})))}));var C=y,j=n(85772);var I=(0,h.bk)(["Tag","preset"],(e=>(e=>(0,j.Z)(e,((o,n)=>{let{textColor:t,lightBorderColor:r,lightColor:i,darkColor:l}=n;return{[`${e.componentCls}${e.componentCls}-${o}`]:{color:t,background:i,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:l,borderColor:l},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}})))(b(e))),v);const S=(e,o,n)=>{const t="string"!=typeof(r=n)?r:r.charAt(0).toUpperCase()+r.slice(1);var r;return{[`${e.componentCls}${e.componentCls}-${o}`]:{color:e[`color${n}`],background:e[`color${t}Bg`],borderColor:e[`color${t}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}};var w=(0,h.bk)(["Tag","status"],(e=>{const o=b(e);return[S(o,"success","Success"),S(o,"processing","Info"),S(o,"error","Error"),S(o,"warning","Warning")]}),v),k=function(e,o){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&o.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(t=Object.getOwnPropertySymbols(e);r<t.length;r++)o.indexOf(t[r])<0&&Object.prototype.propertyIsEnumerable.call(e,t[r])&&(n[t[r]]=e[t[r]])}return n};const E=t.forwardRef(((e,o)=>{const{prefixCls:n,className:r,rootClassName:g,style:p,children:f,icon:m,color:h,onClose:b,bordered:v=!0,visible:$}=e,y=k(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:C,direction:j,tag:S}=t.useContext(u.E_),[E,Z]=t.useState(!0),O=(0,l.Z)(y,["closeIcon","closable"]);t.useEffect((()=>{void 0!==$&&Z($)}),[$]);const z=(0,a.o2)(h),M=(0,a.yT)(h),N=z||M,P=Object.assign(Object.assign({backgroundColor:h&&!N?h:void 0},null==S?void 0:S.style),p),T=C("tag",n),[B,H,L]=x(T),R=i()(T,null==S?void 0:S.className,{[`${T}-${h}`]:N,[`${T}-has-color`]:h&&!N,[`${T}-hidden`]:!E,[`${T}-rtl`]:"rtl"===j,[`${T}-borderless`]:!v},r,g,H,L),W=e=>{e.stopPropagation(),null==b||b(e),e.defaultPrevented||Z(!1)},[,D]=(0,s.Z)((0,s.w)(e),(0,s.w)(S),{closable:!1,closeIconRender:e=>{const o=t.createElement("span",{className:`${T}-close-icon`,onClick:W},e);return(0,c.wm)(e,o,(e=>({onClick:o=>{var n;null===(n=null==e?void 0:e.onClick)||void 0===n||n.call(e,o),W(o)},className:i()(null==e?void 0:e.className,`${T}-close-icon`)})))}}),A="function"==typeof y.onClick||f&&"a"===f.type,G=m||null,X=G?t.createElement(t.Fragment,null,G,f&&t.createElement("span",null,f)):f,F=t.createElement("span",Object.assign({},O,{ref:o,className:R,style:P}),X,D,z&&t.createElement(I,{key:"preset",prefixCls:T}),M&&t.createElement(w,{key:"status",prefixCls:T}));return B(A?t.createElement(d.Z,{component:"Tag"},F):F)})),Z=E;Z.CheckableTag=C;var O=Z},67019:function(e,o,n){n.d(o,{Z:function(){return l}});var t=n(42885),r=n(19567),i=n(27842);function l(e,o,n){return o=(0,t.Z)(o),(0,i.Z)(e,(0,r.Z)()?Reflect.construct(o,n||[],(0,t.Z)(e).constructor):o.apply(e,n))}}}]); |