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.
 
 
 

2 rivejä
21 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[5776,7975,1322,1793,1588,7005,3042,3721,607,8863,1587,4001],{12826:function(we,Ce,n){"use strict";n.d(Ce,{ZP:function(){return at}});var V=n(85061),G=n(55507),_=n(92137),Pe=n(84305),le=n(75901),ze=n(98858),v=n(4914),xe=n(81253),Me=n(49111),Y=n(19650),d=n(28991),U=n(67294),e=n(85893),ve=n(54549),De=n(79508),pe=n(8212),fe=n(952),Ze=n(31649),Ne=n(58024),O=n(91894),Ie=n(71748),h=n(19586),me=n(38069),$e=n(48736),Ee=n(27049),je=function(t){var a=t.padding;return(0,e.jsx)("div",{style:{padding:a||"0 24px"},children:(0,e.jsx)(Ee.Z,{style:{margin:0}})})},f={xs:2,sm:2,md:4,lg:4,xl:6,xxl:6},u=function(t){var a=t.size,r=t.active,i=(0,me.ZP)(),s=a===void 0?f[i]||6:a,x=function(o){return o===0?0:s>2?42:16};return(0,e.jsx)(O.Z,{bordered:!1,style:{marginBottom:16},children:(0,e.jsx)("div",{style:{width:"100%",justifyContent:"space-between",display:"flex"},children:new Array(s).fill(null).map(function(Z,o){return(0,e.jsxs)("div",{style:{borderLeft:s>2&&o===1?"1px solid rgba(0,0,0,0.06)":void 0,paddingLeft:x(o),flex:1,marginRight:o===0?16:0},children:[(0,e.jsx)(h.Z,{active:r,paragraph:!1,title:{width:100,style:{marginTop:0}}}),(0,e.jsx)(h.Z.Button,{active:r,style:{height:48}})]},o)})})})},m=function(t){var a=t.active;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(O.Z,{bordered:!1,style:{borderRadius:0},bodyStyle:{padding:24},children:(0,e.jsxs)("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,e.jsx)("div",{style:{maxWidth:"100%",flex:1},children:(0,e.jsx)(h.Z,{active:a,title:{width:100,style:{marginTop:0}},paragraph:{rows:1,style:{margin:0}}})}),(0,e.jsx)(h.Z.Button,{active:a,size:"small",style:{width:165,marginTop:12}})]})}),(0,e.jsx)(je,{})]})},j=function(t){var a=t.size,r=t.active,i=r===void 0?!0:r,s=t.actionButton;return(0,e.jsxs)(O.Z,{bordered:!1,bodyStyle:{padding:0},children:[new Array(a).fill(null).map(function(x,Z){return(0,e.jsx)(m,{active:!!i},Z)}),s!==!1&&(0,e.jsx)(O.Z,{bordered:!1,style:{borderTopRightRadius:0,borderTopLeftRadius:0},bodyStyle:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,e.jsx)(h.Z.Button,{style:{width:102},active:i,size:"small"})})]})},D=function(t){var a=t.active;return(0,e.jsxs)("div",{style:{marginBottom:16},children:[(0,e.jsx)(h.Z,{paragraph:!1,title:{width:185}}),(0,e.jsx)(h.Z.Button,{active:a,size:"small"})]})},I=function(t){var a=t.active;return(0,e.jsx)(O.Z,{bordered:!1,style:{borderBottomRightRadius:0,borderBottomLeftRadius:0},bodyStyle:{paddingBottom:8},children:(0,e.jsxs)(Y.Z,{style:{width:"100%",justifyContent:"space-between"},children:[(0,e.jsx)(h.Z.Button,{active:a,style:{width:200},size:"small"}),(0,e.jsxs)(Y.Z,{children:[(0,e.jsx)(h.Z.Button,{active:a,size:"small",style:{width:120}}),(0,e.jsx)(h.Z.Button,{active:a,size:"small",style:{width:80}})]})]})})},E=function(t){var a=t.active,r=a===void 0?!0:a,i=t.statistic,s=t.actionButton,x=t.toolbar,Z=t.pageHeader,o=t.list,P=o===void 0?5:o;return(0,e.jsxs)("div",{style:{width:"100%"},children:[Z!==!1&&(0,e.jsx)(D,{active:r}),i!==!1&&(0,e.jsx)(u,{size:i,active:r}),(x!==!1||P!==!1)&&(0,e.jsxs)(O.Z,{bordered:!1,bodyStyle:{padding:0},children:[x!==!1&&(0,e.jsx)(I,{active:r}),P!==!1&&(0,e.jsx)(j,{size:P,active:r,actionButton:s})]})]})},k=E,W={xs:1,sm:2,md:3,lg:3,xl:3,xxl:4},J=function(t){var a=t.active;return(0,e.jsxs)("div",{style:{marginTop:32},children:[(0,e.jsx)(h.Z.Button,{active:a,size:"small",style:{width:100,marginBottom:16}}),(0,e.jsxs)("div",{style:{width:"100%",justifyContent:"space-between",display:"flex"},children:[(0,e.jsxs)("div",{style:{flex:1,marginRight:24,maxWidth:300},children:[(0,e.jsx)(h.Z,{active:a,paragraph:!1,title:{style:{marginTop:0}}}),(0,e.jsx)(h.Z,{active:a,paragraph:!1,title:{style:{marginTop:8}}}),(0,e.jsx)(h.Z,{active:a,paragraph:!1,title:{style:{marginTop:8}}})]}),(0,e.jsx)("div",{style:{flex:1,alignItems:"center",justifyContent:"center"},children:(0,e.jsxs)("div",{style:{maxWidth:300,margin:"auto"},children:[(0,e.jsx)(h.Z,{active:a,paragraph:!1,title:{style:{marginTop:0}}}),(0,e.jsx)(h.Z,{active:a,paragraph:!1,title:{style:{marginTop:8}}})]})})]})]})},z=function(t){var a=t.size,r=t.active,i=(0,me.ZP)(),s=a===void 0?W[i]||3:a;return(0,e.jsx)("div",{style:{width:"100%",justifyContent:"space-between",display:"flex"},children:new Array(s).fill(null).map(function(x,Z){return(0,e.jsxs)("div",{style:{flex:1,paddingLeft:Z===0?0:24,paddingRight:Z===s-1?0:24},children:[(0,e.jsx)(h.Z,{active:r,paragraph:!1,title:{style:{marginTop:0}}}),(0,e.jsx)(h.Z,{active:r,paragraph:!1,title:{style:{marginTop:8}}}),(0,e.jsx)(h.Z,{active:r,paragraph:!1,title:{style:{marginTop:8}}})]},Z)})})},A=function(t){var a=t.active,r=t.header,i=r===void 0?!1:r,s=(0,me.ZP)(),x=W[s]||3;return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{style:{display:"flex",background:i?"rgba(0,0,0,0.02)":"none",padding:"24px 8px"},children:[new Array(x).fill(null).map(function(Z,o){return(0,e.jsx)("div",{style:{flex:1,paddingLeft:i&&o===0?0:20,paddingRight:32},children:(0,e.jsx)(h.Z,{active:a,paragraph:!1,title:{style:{margin:0,height:24,width:i?"75px":"100%"}}})},o)}),(0,e.jsx)("div",{style:{flex:3,paddingLeft:32},children:(0,e.jsx)(h.Z,{active:a,paragraph:!1,title:{style:{margin:0,height:24,width:i?"75px":"100%"}}})})]}),(0,e.jsx)(je,{padding:"0px 0px"})]})},ae=function(t){var a=t.active,r=t.size,i=r===void 0?4:r;return(0,e.jsxs)(O.Z,{bordered:!1,children:[(0,e.jsx)(h.Z.Button,{active:a,size:"small",style:{width:100,marginBottom:16}}),(0,e.jsx)(A,{header:!0,active:a}),new Array(i).fill(null).map(function(s,x){return(0,e.jsx)(A,{active:a},x)}),(0,e.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",paddingTop:16},children:(0,e.jsx)(h.Z,{active:a,paragraph:!1,title:{style:{margin:0,height:32,float:"right",maxWidth:"630px"}}})})]})},q=function(t){var a=t.active;return(0,e.jsxs)(O.Z,{bordered:!1,style:{borderTopRightRadius:0,borderTopLeftRadius:0},children:[(0,e.jsx)(h.Z.Button,{active:a,size:"small",style:{width:100,marginBottom:16}}),(0,e.jsx)(z,{active:a}),(0,e.jsx)(J,{active:a})]})},R=function(t){var a=t.active,r=a===void 0?!0:a,i=t.pageHeader,s=t.list;return(0,e.jsxs)("div",{style:{width:"100%"},children:[i!==!1&&(0,e.jsx)(D,{active:r}),(0,e.jsx)(q,{active:r}),s!==!1&&(0,e.jsx)(je,{}),s!==!1&&(0,e.jsx)(ae,{active:r,size:s})]})},ie=R,se=function(t){var a=t.active,r=a===void 0?!0:a,i=t.pageHeader;return(0,e.jsxs)("div",{style:{width:"100%"},children:[i!==!1&&(0,e.jsx)(D,{active:r}),(0,e.jsx)(O.Z,{children:(0,e.jsxs)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",padding:128},children:[(0,e.jsx)(h.Z.Avatar,{size:64,style:{marginBottom:32}}),(0,e.jsx)(h.Z.Button,{active:r,style:{width:214,marginBottom:8}}),(0,e.jsx)(h.Z.Button,{active:r,style:{width:328},size:"small"}),(0,e.jsxs)(Y.Z,{style:{marginTop:24},children:[(0,e.jsx)(h.Z.Button,{active:r,style:{width:116}}),(0,e.jsx)(h.Z.Button,{active:r,style:{width:116}})]})]})})]})},oe=se,de=["type"],ce=function(t){var a=t.type,r=a===void 0?"list":a,i=(0,xe.Z)(t,de);return r==="result"?(0,e.jsx)(oe,(0,d.Z)({},i)):r==="descriptions"?(0,e.jsx)(ie,(0,d.Z)({},i)):(0,e.jsx)(k,(0,d.Z)({},i))},N=ce,Se=n(34792),ue=n(48086),ne=n(28481),ye=n(78775),ee=n(21770),ge=n(86671);function Re(l){var t=l.data,a=l.row;return(0,d.Z)((0,d.Z)({},t),a)}function be(l){var t=l.type||"single",a=(0,ye.YB)(),r=(0,ee.Z)([],{value:l.editableKeys,onChange:l.onChange?function(y){var S;l==null||(S=l.onChange)===null||S===void 0||S.call(l,y,l.dataSource)}:void 0}),i=(0,ne.Z)(r,2),s=i[0],x=i[1],Z=(0,U.useMemo)(function(){var y=t==="single"?s==null?void 0:s.slice(0,1):s;return new Set(y)},[(s||[]).join(","),t]),o=(0,U.useCallback)(function(y){return!!(s==null?void 0:s.includes((0,ge.sN)(y)))},[(s||[]).join(",")]),P=function(S){return Z.size>0&&t==="single"?(ue.default.warn(l.onlyOneLineEditorAlertMessage||a.getMessage("editableTable.onlyOneLineEditor","\u53EA\u80FD\u540C\u65F6\u7F16\u8F91\u4E00\u884C")),!1):(Z.add((0,ge.sN)(S)),x(Array.from(Z)),!0)},$=function(S){return Z.delete((0,ge.sN)(S)),x(Array.from(Z)),!0},Q=function(){var y=(0,_.Z)((0,G.Z)().mark(function S(w,b,g,T){var L,M;return(0,G.Z)().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,l==null||(L=l.onCancel)===null||L===void 0?void 0:L.call(l,w,b,g,T);case 2:if(M=c.sent,M!==!1){c.next=5;break}return c.abrupt("return",!1);case 5:return c.abrupt("return",!0);case 6:case"end":return c.stop()}},S)}));return function(w,b,g,T){return y.apply(this,arguments)}}(),F=function(){var y=(0,_.Z)((0,G.Z)().mark(function S(w,b,g){var T,L,M;return(0,G.Z)().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,l==null||(T=l.onSave)===null||T===void 0?void 0:T.call(l,w,b,g);case 2:if(L=c.sent,L!==!1){c.next=5;break}return c.abrupt("return",!1);case 5:return $(w),M={data:l.dataSource,row:b,key:w,childrenColumnName:l.childrenColumnName||"children"},l.setDataSource(Re(M)),c.abrupt("return",!0);case 9:case"end":return c.stop()}},S)}));return function(w,b,g){return y.apply(this,arguments)}}(),K=a.getMessage("editableTable.action.save","\u4FDD\u5B58"),H=a.getMessage("editableTable.action.delete","\u5220\u9664"),B=a.getMessage("editableTable.action.cancel","\u53D6\u6D88"),X=(0,U.useCallback)(function(y,S){var w=(0,d.Z)({recordKey:y,cancelEditable:$,onCancel:Q,onSave:F,editableKeys:s,setEditableRowKeys:x,saveText:K,cancelText:B,deleteText:H,deletePopconfirmMessage:"".concat(a.getMessage("deleteThisLine","\u5220\u9664\u6B64\u884C"),"?"),editorType:"Map"},S),b=(0,ge.aX)(l.dataSource,w);return l.actionRender?l.actionRender(l.dataSource,w,{save:b[0],delete:b[1],cancel:b[2]}):b},[s&&s.join(","),l.dataSource]);return{editableKeys:s,setEditableRowKeys:x,isEditable:o,actionRender:X,startEditable:P,cancelEditable:$}}var he=be,Le=n(2026),Oe=n(94984),ke=n(77398),Fe=n(53621),We=n(78164),He=n(50344),Ve=n(88306),Ue=n(30939),it=n(65515),Qe=function(t,a){var r=a||{},i=r.onRequestError,s=r.effects,x=r.manual,Z=r.dataSource,o=r.defaultDataSource,P=r.onDataSourceChange,$=(0,ee.Z)(o,{value:Z,onChange:P}),Q=(0,ne.Z)($,2),F=Q[0],K=Q[1],H=(0,ee.Z)(a==null?void 0:a.loading,{value:a==null?void 0:a.loading,onChange:a==null?void 0:a.onLoadingChange}),B=(0,ne.Z)(H,2),X=B[0],y=B[1],S=function(g){K(g),y(!1)},w=function(){var b=(0,_.Z)((0,G.Z)().mark(function g(){var T,L,M;return(0,G.Z)().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(!X){c.next=2;break}return c.abrupt("return");case 2:return y(!0),c.prev=3,c.next=6,t();case 6:if(c.t0=c.sent,c.t0){c.next=9;break}c.t0={};case 9:T=c.t0,L=T.data,M=T.success,M!==!1&&S(L),c.next=23;break;case 15:if(c.prev=15,c.t1=c.catch(3),i!==void 0){c.next=21;break}throw new Error(c.t1);case 21:i(c.t1);case 22:y(!1);case 23:case"end":return c.stop()}},g,null,[[3,15]])}));return function(){return b.apply(this,arguments)}}();return(0,U.useEffect)(function(){x||w()},[].concat((0,V.Z)(s||[]),[x])),{dataSource:F,setDataSource:K,loading:X,reload:function(){return w()}}},Xe=Qe,Ge=["valueEnum","render","renderText","mode","plain","dataIndex","request","params","editable"],Ye=["request","columns","params","dataSource","onDataSourceChange","formProps","editable","loading","onLoadingChange","actionRef","onRequestError"],Je=function(t,a){var r=t.dataIndex;if(r){var i=Array.isArray(r)?(0,Ve.Z)(a,r):a[r];if(i!==void 0||i!==null)return i}return t.children},qe=function(t){var a=t.valueEnum,r=t.action,i=t.index,s=t.text,x=t.entity,Z=t.mode,o=t.render,P=t.editableUtils,$=t.valueType,Q=t.plain,F=t.dataIndex,K=t.request,H=t.renderFormItem,B=t.params,X=fe.ZP.useFormInstance(),y={text:s,valueEnum:a,mode:Z||"read",proFieldProps:{render:o?function(){return o==null?void 0:o(s,x,i,r,(0,d.Z)((0,d.Z)({},t),{},{type:"descriptions"}))}:void 0},ignoreFormItem:!0,valueType:$,request:K,params:B,plain:Q};if(Z==="read"||!Z||$==="option"){var S=(0,Le.Z)(t.fieldProps,void 0,(0,d.Z)((0,d.Z)({},t),{},{rowKey:F,isEditable:!1}));return(0,e.jsx)(Ze.Z,(0,d.Z)((0,d.Z)({name:F},y),{},{fieldProps:S}))}var w=function(){var g,T=(0,Le.Z)(t.formItemProps,X,(0,d.Z)((0,d.Z)({},t),{},{rowKey:F,isEditable:!0})),L=(0,Le.Z)(t.fieldProps,X,(0,d.Z)((0,d.Z)({},t),{},{rowKey:F,isEditable:!0})),M=H?H==null?void 0:H((0,d.Z)((0,d.Z)({},t),{},{type:"descriptions"}),{isEditable:!0,recordKey:F,record:X.getFieldValue([F].flat(1)),defaultRender:function(){return(0,e.jsx)(Ze.Z,(0,d.Z)((0,d.Z)({},y),{},{fieldProps:L}))},type:"descriptions"},X):void 0;return(0,e.jsxs)(Y.Z,{children:[(0,e.jsx)(Oe.Z,(0,d.Z)((0,d.Z)({name:F},T),{},{style:(0,d.Z)({margin:0},(T==null?void 0:T.style)||{}),initialValue:s||(T==null?void 0:T.initialValue),children:M||(0,e.jsx)(Ze.Z,(0,d.Z)((0,d.Z)({},y),{},{proFieldProps:(0,d.Z)({},y.proFieldProps),fieldProps:L}))})),P==null||(g=P.actionRender)===null||g===void 0?void 0:g.call(P,F||i,{cancelText:(0,e.jsx)(ve.Z,{}),saveText:(0,e.jsx)(De.Z,{}),deleteText:!1})]})};return(0,e.jsx)("div",{style:{marginTop:-5,marginBottom:-5,marginLeft:0,marginRight:0},children:w()})},_e=function(t,a,r,i){var s,x=[],Z=t==null||(s=t.map)===null||s===void 0?void 0:s.call(t,function(o,P){var $,Q;if(U.isValidElement(o))return o;var F=o.valueEnum,K=o.render,H=o.renderText,B=o.mode,X=o.plain,y=o.dataIndex,S=o.request,w=o.params,b=o.editable,g=(0,xe.Z)(o,Ge),T=($=Je(o,a))!==null&&$!==void 0?$:g.children,L=H?H(T,a,P,r):T,M=typeof g.title=="function"?g.title(o,"descriptions",null):g.title,te=typeof g.valueType=="function"?g.valueType(a||{},"descriptions"):g.valueType,c=i==null?void 0:i.isEditable(y||P),re=B||c?"edit":"read",p=i&&re==="read"&&b!==!1&&(b==null?void 0:b(L,a,P))!==!1,C=p?Y.Z:U.Fragment,Be=re==="edit"?L:(0,ke.X)(L,o,L),Te=(0,U.createElement)(v.Z.Item,(0,d.Z)((0,d.Z)({},g),{},{key:g.key||((Q=g.label)===null||Q===void 0?void 0:Q.toString())||P,label:(M||g.label||g.tooltip||g.tip)&&(0,e.jsx)(Fe.Z,{label:M||g.label,tooltip:g.tooltip||g.tip,ellipsis:o.ellipsis})}),(0,e.jsxs)(C,{children:[(0,e.jsx)(qe,(0,d.Z)((0,d.Z)({},o),{},{dataIndex:o.dataIndex||P,mode:re,text:Be,valueType:te,entity:a,index:P,action:r,editableUtils:i})),p&&te!=="option"&&(0,e.jsx)(pe.Z,{onClick:function(){i==null||i.startEditable(y||P)}})]}));return te==="option"?(x.push(Te),null):Te}).filter(function(o){return o});return{options:(x==null?void 0:x.length)?x:null,children:Z}},et=function(t){return(0,e.jsx)(v.Z.Item,(0,d.Z)((0,d.Z)({},t),{},{children:t.children}))},tt=function(t){return t.children},Ae=function(t){var a,r=t.request,i=t.columns,s=t.params,x=s===void 0?{}:s,Z=t.dataSource,o=t.onDataSourceChange,P=t.formProps,$=t.editable,Q=t.loading,F=t.onLoadingChange,K=t.actionRef,H=t.onRequestError,B=(0,xe.Z)(t,Ye),X=(0,U.useContext)(le.ZP.ConfigContext),y=Xe((0,_.Z)((0,G.Z)().mark(function c(){var re;return(0,G.Z)().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(!r){C.next=6;break}return C.next=3,r(x);case 3:C.t0=C.sent,C.next=7;break;case 6:C.t0={data:{}};case 7:return re=C.t0,C.abrupt("return",re);case 9:case"end":return C.stop()}},c)})),{onRequestError:H,effects:[(0,Ue.P)(x)],manual:!r,dataSource:Z,loading:Q,onLoadingChange:F,onDataSourceChange:o}),S=he((0,d.Z)((0,d.Z)({},t.editable),{},{childrenColumnName:void 0,dataSource:y.dataSource,setDataSource:y.setDataSource}));if((0,U.useEffect)(function(){K&&(K.current=(0,d.Z)({reload:y.reload},S))},[y,K,S]),y.loading||y.loading===void 0&&r)return(0,e.jsx)(N,{type:"descriptions",list:!1,pageHeader:!1});var w=function(){var re=(0,He.Z)(t.children).filter(Boolean).map(function(p){if(!U.isValidElement(p))return p;var C=p==null?void 0:p.props,Be=C.valueEnum,Te=C.valueType,Ke=C.dataIndex,nt=C.ellipsis,rt=C.copyable,lt=C.request;return!Te&&!Be&&!Ke&&!lt&&!nt&&!rt?p:(0,d.Z)((0,d.Z)({},p==null?void 0:p.props),{},{entity:Z})});return[].concat((0,V.Z)(i||[]),(0,V.Z)(re)).filter(function(p){return!p||(p==null?void 0:p.valueType)&&["index","indexBorder"].includes(p==null?void 0:p.valueType)?!1:!(p==null?void 0:p.hideInDescriptions)}).sort(function(p,C){return C.order||p.order?(C.order||0)-(p.order||0):(C.index||0)-(p.index||0)})},b=_e(w(),y.dataSource||{},(K==null?void 0:K.current)||y,$?S:void 0),g=b.options,T=b.children,L=$?fe.ZP:tt,M=null;(B.title||B.tooltip||B.tip)&&(M=(0,e.jsx)(Fe.Z,{label:B.title,tooltip:B.tooltip||B.tip}));var te=X.getPrefixCls("pro-descriptions");return(0,e.jsx)(We.Z,{children:(0,e.jsx)(L,(0,d.Z)((0,d.Z)({form:(a=t.editable)===null||a===void 0?void 0:a.form,component:!1,submitter:!1},P),{},{onFinish:void 0,children:(0,e.jsx)(v.Z,(0,d.Z)((0,d.Z)({className:te},B),{},{extra:B.extra?(0,e.jsxs)(Y.Z,{children:[g,B.extra]}):g,title:M,children:T}))}),"form")})};Ae.Item=et;var at=Ae},65515:function(){},52953:function(){},4914:function(we,Ce,n){"use strict";n.d(Ce,{K:function(){return O},Z:function(){return je}});var V=n(96156),G=n(28481),_=n(90484),Pe=n(94184),le=n.n(Pe),ze=n(50344),v=n(67294),xe=n(53124),Me=n(96159),Y=n(24308),d=function(u){var m=u.children;return m},U=d,e=n(22122);function ve(f){return f!=null}var De=function(u){var m=u.itemPrefixCls,j=u.component,D=u.span,I=u.className,E=u.style,k=u.labelStyle,W=u.contentStyle,J=u.bordered,z=u.label,A=u.content,ae=u.colon,q=j;if(J){var R;return v.createElement(q,{className:le()((R={},(0,V.Z)(R,"".concat(m,"-item-label"),ve(z)),(0,V.Z)(R,"".concat(m,"-item-content"),ve(A)),R),I),style:E,colSpan:D},ve(z)&&v.createElement("span",{style:k},z),ve(A)&&v.createElement("span",{style:W},A))}return v.createElement(q,{className:le()("".concat(m,"-item"),I),style:E,colSpan:D},v.createElement("div",{className:"".concat(m,"-item-container")},(z||z===0)&&v.createElement("span",{className:le()("".concat(m,"-item-label"),(0,V.Z)({},"".concat(m,"-item-no-colon"),!ae)),style:k},z),(A||A===0)&&v.createElement("span",{className:le()("".concat(m,"-item-content")),style:W},A)))},pe=De;function fe(f,u,m){var j=u.colon,D=u.prefixCls,I=u.bordered,E=m.component,k=m.type,W=m.showLabel,J=m.showContent,z=m.labelStyle,A=m.contentStyle;return f.map(function(ae,q){var R=ae.props,ie=R.label,se=R.children,oe=R.prefixCls,de=oe===void 0?D:oe,ce=R.className,N=R.style,Se=R.labelStyle,ue=R.contentStyle,ne=R.span,ye=ne===void 0?1:ne,ee=ae.key;return typeof E=="string"?v.createElement(pe,{key:"".concat(k,"-").concat(ee||q),className:ce,style:N,labelStyle:(0,e.Z)((0,e.Z)({},z),Se),contentStyle:(0,e.Z)((0,e.Z)({},A),ue),span:ye,colon:j,component:E,itemPrefixCls:de,bordered:I,label:W?ie:null,content:J?se:null}):[v.createElement(pe,{key:"label-".concat(ee||q),className:ce,style:(0,e.Z)((0,e.Z)((0,e.Z)({},z),N),Se),span:1,colon:j,component:E[0],itemPrefixCls:de,bordered:I,label:ie}),v.createElement(pe,{key:"content-".concat(ee||q),className:ce,style:(0,e.Z)((0,e.Z)((0,e.Z)({},A),N),ue),span:ye*2-1,component:E[1],itemPrefixCls:de,bordered:I,content:se})]})}var Ze=function(u){var m=v.useContext(O),j=u.prefixCls,D=u.vertical,I=u.row,E=u.index,k=u.bordered;return D?v.createElement(v.Fragment,null,v.createElement("tr",{key:"label-".concat(E),className:"".concat(j,"-row")},fe(I,u,(0,e.Z)({component:"th",type:"label",showLabel:!0},m))),v.createElement("tr",{key:"content-".concat(E),className:"".concat(j,"-row")},fe(I,u,(0,e.Z)({component:"td",type:"content",showContent:!0},m)))):v.createElement("tr",{key:E,className:"".concat(j,"-row")},fe(I,u,(0,e.Z)({component:k?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},m)))},Ne=Ze,O=v.createContext({}),Ie={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1};function h(f,u){if(typeof f=="number")return f;if((0,_.Z)(f)==="object")for(var m=0;m<Y.c4.length;m++){var j=Y.c4[m];if(u[j]&&f[j]!==void 0)return f[j]||Ie[j]}return 3}function me(f,u,m){var j=f;return(u===void 0||u>m)&&(j=(0,Me.Tm)(f,{span:m})),j}function $e(f,u){var m=(0,ze.Z)(f).filter(function(E){return E}),j=[],D=[],I=u;return m.forEach(function(E,k){var W,J=(W=E.props)===null||W===void 0?void 0:W.span,z=J||1;if(k===m.length-1){D.push(me(E,J,I)),j.push(D);return}z<I?(I-=z,D.push(E)):(D.push(me(E,z,I)),j.push(D),I=u,D=[])}),j}function Ee(f){var u,m=f.prefixCls,j=f.title,D=f.extra,I=f.column,E=I===void 0?Ie:I,k=f.colon,W=k===void 0?!0:k,J=f.bordered,z=f.layout,A=f.children,ae=f.className,q=f.style,R=f.size,ie=f.labelStyle,se=f.contentStyle,oe=v.useContext(xe.E_),de=oe.getPrefixCls,ce=oe.direction,N=de("descriptions",m),Se=v.useState({}),ue=(0,G.Z)(Se,2),ne=ue[0],ye=ue[1],ee=h(E,ne);v.useEffect(function(){var be=Y.ZP.subscribe(function(he){(0,_.Z)(E)==="object"&&ye(he)});return function(){Y.ZP.unsubscribe(be)}},[]);var ge=$e(A,ee),Re=v.useMemo(function(){return{labelStyle:ie,contentStyle:se}},[ie,se]);return v.createElement(O.Provider,{value:Re},v.createElement("div",{className:le()(N,(u={},(0,V.Z)(u,"".concat(N,"-").concat(R),R&&R!=="default"),(0,V.Z)(u,"".concat(N,"-bordered"),!!J),(0,V.Z)(u,"".concat(N,"-rtl"),ce==="rtl"),u),ae),style:q},(j||D)&&v.createElement("div",{className:"".concat(N,"-header")},j&&v.createElement("div",{className:"".concat(N,"-title")},j),D&&v.createElement("div",{className:"".concat(N,"-extra")},D)),v.createElement("div",{className:"".concat(N,"-view")},v.createElement("table",null,v.createElement("tbody",null,ge.map(function(be,he){return v.createElement(Ne,{key:he,index:he,colon:W,prefixCls:N,vertical:z==="vertical",bordered:J,row:be})}))))))}Ee.Item=U;var je=Ee},98858:function(we,Ce,n){"use strict";var V=n(38663),G=n.n(V),_=n(52953),Pe=n.n(_)}}]);