(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7751],{64893:function(ce,J,e){"use strict";e.d(J,{G:function(){return C}});var P=e(96156),R=e(28481),o=e(28991),B=e(81253),S=e(85893),G=["colon","dependencies","extra","getValueFromEvent","getValueProps","hasFeedback","help","htmlFor","initialValue","noStyle","label","labelAlign","labelCol","name","preserve","normalize","required","rules","shouldUpdate","trigger","validateFirst","validateStatus","validateTrigger","valuePropName","wrapperCol","hidden","addonBefore","addonAfter"];function U(O){var g={};return G.forEach(function(Z){O[Z]!==void 0&&(g[Z]=O[Z])}),g}var V=e(51812),E=e(26369),v=e(60249),j=e(94184),T=e.n(j),ee=e(48526),c=e(80334),n=e(67294),l=e(30939),Q=e(82785),oe=e(97462),ne=e(66758),$=e(2514),_=["valueType","customLightMode","lightFilterLabelFormatter","valuePropName","ignoreWidth","defaultProps"],N=["label","tooltip","placeholder","width","bordered","messageVariables","ignoreFormItem","transform","convertValue","readonly","allowClear","colSize","getFormItemProps","getFieldProps","filedConfig","cacheForSwr","proFieldProps"],ae=Symbol("ProFormComponent"),H={xs:104,s:216,sm:216,m:328,md:328,l:440,lg:440,xl:552},I=["switch","radioButton","radio","rate"];function C(O,g){O.displayName="ProFormComponent";var Z=function(i){var a=(0,o.Z)((0,o.Z)({},i==null?void 0:i.filedConfig),g)||{},r=a.valueType,s=a.customLightMode,t=a.lightFilterLabelFormatter,f=a.valuePropName,y=f===void 0?"value":f,D=a.ignoreWidth,L=a.defaultProps,A=(0,B.Z)(a,_),d=(0,o.Z)((0,o.Z)({},L),i),h=d.label,de=d.tooltip,ue=d.placeholder,z=d.width,ve=d.bordered,Pe=d.messageVariables,ie=d.ignoreFormItem,me=d.transform,Ce=d.convertValue,fe=d.readonly,Y=d.allowClear,Ie=d.colSize,k=d.getFormItemProps,q=d.getFieldProps,De=d.filedConfig,he=d.cacheForSwr,M=d.proFieldProps,m=(0,B.Z)(d,N),se=r||m.valueType,F=(0,n.useMemo)(function(){return D||I.includes(se)},[D,se]),ge=(0,n.useState)(),ye=(0,R.Z)(ge,2),Fe=ye[1],Ee=(0,n.useState)(),pe=(0,R.Z)(Ee,2),Ze=pe[0],Me=pe[1],W=n.useContext(ne.Z),K=(0,n.useMemo)(function(){return{formItemProps:k==null?void 0:k(),fieldProps:q==null?void 0:q()}},[q,k,m.dependenciesValues,Ze]),u=(0,n.useMemo)(function(){var p=(0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},ie?(0,V.Z)({value:m.value}):{}),{},{placeholder:ue,disabled:i.disabled},W.fieldProps),K.fieldProps),m.fieldProps);return p.style=(0,V.Z)(p==null?void 0:p.style),p},[ie,m.value,m.fieldProps,ue,i.disabled,W.fieldProps,K.fieldProps]),xe=U(m),Se=(0,n.useMemo)(function(){return(0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},W.formItemProps),xe),K.formItemProps),m.formItemProps)},[K.formItemProps,W.formItemProps,m.formItemProps,xe]),b=(0,n.useMemo)(function(){return(0,o.Z)((0,o.Z)({messageVariables:Pe},A),Se)},[A,Se,Pe]);(0,c.ET)(!m.defaultValue,"\u8BF7\u4E0D\u8981\u5728 Form \u4E2D\u4F7F\u7528 defaultXXX\u3002\u5982\u679C\u9700\u8981\u9ED8\u8BA4\u503C\u8BF7\u4F7F\u7528 initialValues \u548C initialValue\u3002");var Be=(0,n.useContext)(ee.FieldContext),Oe=Be.prefixName,Te=(0,n.useMemo)(function(){var p,x=b==null?void 0:b.name;Array.isArray(x)&&(x=x.join("_")),Array.isArray(Oe)&&x&&(x="".concat(Oe.join("."),".").concat(x));var te=x&&"form-".concat((p=W.formKey)!==null&&p!==void 0?p:"","-field-").concat(x);return te},[(0,l.P)(b==null?void 0:b.name),Oe,W.formKey]),Ue=(0,E.Z)(m),Ne=(0,n.useCallback)(function(){var p;k||q?Me([]):m.renderFormItem&&Fe([]);for(var x=arguments.length,te=new Array(x),le=0;le