lu-lowcode-package-form 0.10.52 → 0.10.53
Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.cjs.js
CHANGED
@@ -413,7 +413,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
413
413
|
transform: rotate(360deg);
|
414
414
|
}
|
415
415
|
}
|
416
|
-
`,GHt=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:KHt,n=J.useContext(Fet),r=n.csp;J.useEffect(function(){Od(t,"@ant-design-icons",{prepend:!0,csp:r})},[])},qHt=["icon","className","onClick","style","primaryColor","secondaryColor"],OT={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function YHt(e){var t=e.primaryColor,n=e.secondaryColor;OT.primaryColor=t,OT.secondaryColor=n||ltt(t),OT.calculated=!!n}function XHt(){return ve({},OT)}var Ax=function(t){var n=t.icon,r=t.className,o=t.onClick,i=t.style,a=t.primaryColor,l=t.secondaryColor,s=gn(t,qHt),u=OT;if(a&&(u={primaryColor:a,secondaryColor:l||ltt(a)}),GHt(),WHt(JDe(n),"icon should be icon definiton, but got ".concat(n)),!JDe(n))return null;var c=n;return c&&typeof c.icon=="function"&&(c=ve(ve({},c),{},{icon:c.icon(u.primaryColor,u.secondaryColor)})),Mie(c.icon,"svg-".concat(c.name),ve({className:r,onClick:o,style:i,"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},s))};Ax.displayName="IconReact";Ax.getTwoToneColors=XHt;Ax.setTwoToneColors=YHt;function utt(e){var t=stt(e),n=be(t,2),r=n[0],o=n[1];return Ax.setTwoToneColors({primaryColor:r,secondaryColor:o})}function QHt(){var e=Ax.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var ZHt=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];utt("#1890ff");var b0=D.forwardRef(function(e,t){var n=e.className,r=e.icon,o=e.spin,i=e.rotate,a=e.tabIndex,l=e.onClick,s=e.twoToneColor,u=gn(e,ZHt),c=D.useContext(Fet),f=c.prefixCls,d=f===void 0?"anticon":f,p=c.rootClassName,m=$e(p,d,ie(ie({},"".concat(d,"-").concat(r.name),!!r.name),"".concat(d,"-spin"),!!o||r.name==="loading"),n),y=a;y===void 0&&l&&(y=-1);var v=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,g=stt(s),h=be(g,2),b=h[0],E=h[1];return D.createElement("span",ve(ve({role:"img","aria-label":r.name},u),{},{ref:t,tabIndex:y,onClick:l,className:m}),D.createElement(Ax,{icon:r,primaryColor:b,secondaryColor:E,style:v}))});b0.displayName="AntdIcon";b0.getTwoToneColor=QHt;b0.setTwoToneColor=utt;var JHt=function(t,n){return D.createElement(b0,ve(ve({},t),{},{ref:n,icon:a9t}))},ctt=D.forwardRef(JHt);process.env.NODE_ENV!=="production"&&(ctt.displayName="CopyOutlined");var ezt=function(t,n){return D.createElement(b0,ve(ve({},t),{},{ref:n,icon:bet}))},gge=D.forwardRef(ezt);process.env.NODE_ENV!=="production"&&(gge.displayName="DeleteOutlined");var tzt=function(t,n){return D.createElement(b0,ve(ve({},t),{},{ref:n,icon:EJe}))},ftt=D.forwardRef(tzt);process.env.NODE_ENV!=="production"&&(ftt.displayName="EyeOutlined");var nzt=function(t,n){return D.createElement(b0,ve(ve({},t),{},{ref:n,icon:YZe}))},dtt=D.forwardRef(nzt);process.env.NODE_ENV!=="production"&&(dtt.displayName="PlusOutlined");var rzt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},ozt=function(t,n){return D.createElement(b0,ve(ve({},t),{},{ref:n,icon:rzt}))},ptt=D.forwardRef(ozt);process.env.NODE_ENV!=="production"&&(ptt.displayName="UploadOutlined");function vtt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"id",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"title",r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"parentId",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"children",i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0;return izt(e,t,n,r,o,i,l=>({value:l[t],title:l[n],key:l[t],disabled:l[t]===a}))}function izt(e,t,n,r,o,i,a){if(!Array.isArray(e)||e.length===0)return[];const l=e.map(s=>({...s,...a(s)}));return l.filter(s=>{const u=l.filter(c=>s[t]===c[r]);return s[o]=u.length>0?u:[],s[r]===i})}const htt=e=>{let{request:t,title:n,disabledValue:r,callError:o,...i}=e;const[a,l]=J.useState(!1),[s,u]=J.useState([]);J.useEffect(()=>{c()},[]);const c=async()=>{if(t&&typeof t=="function"){var f;const d=await t();if(d.code>0){o&&typeof o=="function"&&o(d.message);return}let p=vtt(((f=d.data)===null||f===void 0?void 0:f.list)||d.data||[],"id",n||"title",i.parentId||"parentId","children",0,r);p=[{value:0,title:"根节点",children:p}],i.treeData=p,u(p)}i.treeData&&u(i.treeData),l(!0)};return Le.jsx(mi,{...i,children:a&&Le.jsx(y0,{...i,treeData:s,treeDefaultExpandAll:!0,style:{width:"100%"}})})},mge=J.forwardRef((e,t)=>{let{addWrapper:n=!0,form:r,fieldName:o,fieldsValue:i,shouldUpdateKey:a,value:l,type:s,defaultValue:u,onChange:c,option_label:f,option_value:d,option_search:p,options:m,request:y,requestParams:v,callError:g,subRequest:h,sub_option_label:b="label",mode:E="single",sub_option_value:S="id",rightIconRender:C,rightIcon:w,rightIconClick:A,recordFieldsChange:T,...x}=e;const[O,P]=J.useState([]),[N,M]=J.useState(!1);J.useEffect(()=>{if(l){let R=null;Array.isArray(O)&&O.length>0&&(R=O.find(B=>B.value==(l==null?void 0:l.value)||B.value==l),R&&!av.isEqual(R,l)&&(console.log("new value /////",R),typeof c=="function"&&c(R))),R||F()}},[l]),J.useEffect(()=>{console.log("SearchSelect useEffect shouldUpdateKey",a),console.log("SearchSelect useEffect requestParams",v),k(v)},[a,v]);const F=async()=>{y&&d&&H({...v,[d]:l==null?void 0:l.value},null,R=>{if(console.log("loadSelectOptions selectOptions",R),R&&R.length>0){let B=R.find(j=>j.value==(l==null?void 0:l.value)||j.value==l);console.log("loadSelectOptions item",B),B&&!av.isEqual(B,l)&&(console.log("new value /////",B),typeof c=="function"&&c(B))}})},k=async R=>{y&&typeof y=="function"&&H(R,{}),m&&m.length>0&&P(m)},L=async R=>{const B={...v};B[p]=R,await H(B)},H=J.useCallback(av.debounce((R,B,j)=>{z(R,B).then(W=>{typeof j=="function"&&j(W)})},200),[]),z=async(R,B)=>{try{let W=[];if(!(B&&Object.values(B).some(K=>K==="##norequest##"))){var j;M(!0);const K=await y({...R,ruleParams:B},r,o);M(!1),K.code>0?g&&typeof g=="function"&&g(K.message):W=((j=K.data)===null||j===void 0?void 0:j.list)||K.data}if(Array.isArray(W)){for(let K=0;K<W.length;K++){const U=W[K];if(typeof h=="function"){let G=[];const{data:q}=await h(U);q!=null&&q.list&&Array.isArray(q.list)&&(G=q.list.map(X=>({label:"".concat(U[f],"-").concat(X[b]),value:"".concat(U[d],"-").concat(X[S])}))),W[K]={...U,label:U[f],title:U[f],options:G}}W[K]={...U,label:U[f],value:U[d]}}O.length>0&&!av.isEqual(O,W)&&typeof c=="function"&&c(void 0),P(W)}else P([]);return W}catch(W){console.error("fetchOptions",W),M(!1)}finally{}},_=R=>{Array.isArray(R)?c(R.map(B=>O.find(j=>j.value===B))):c(O.find(B=>B.value===R))};return n?Le.jsxs(mi,{...x,children:[Le.jsx(_d,{ref:t,notFoundContent:N?Le.jsx(GP,{size:"small"}):null,value:l,...x,filterOption:!1,showSearch:!!(y&&p),onSearch:y&&p?L:null,onChange:_,style:{width:"100%",flex:1},options:O,mode:E}),!(x!=null&&x.disabled)&&w,!(x!=null&&x.disabled)&&typeof C=="function"&&C({value:l,onChange:c,form:r,fieldName:o,recordFieldsChange:T})]}):Le.jsxs(Le.Fragment,{children:[Le.jsx(_d,{ref:t,notFoundContent:N?Le.jsx(GP,{size:"small"}):null,value:l,...x,filterOption:!1,showSearch:!!(y&&p),onSearch:y&&p?L:null,onChange:_,style:{width:"100%"},options:O,mode:E}),!(x!=null&&x.disabled)&&w,!(x!=null&&x.disabled)&&typeof C=="function"&&C({value:l,onChange:c,form:r,fieldName:o,recordFieldsChange:T})]})}),yge=e=>{let{request:t,option_label:n="label",option_value:r="id",disabledValue:o,callError:i,options:a,addWrapper:l=!0,...s}=e;const[u,c]=J.useState([]);J.useEffect(()=>{f()},[]);const f=async()=>{if(t&&typeof t=="function"){var d;const p=await t();if(p.code>0){i&&typeof i=="function"&&i(p.message);return}let m=((d=p.data)===null||d===void 0?void 0:d.list)||p.data;Array.isArray(m)&&m.length>0&&c(m.map(y=>({label:y[n],value:y[r]})))}a&&a.length>0&&c(a)};return l?Le.jsx(mi,{...s,children:Le.jsx(_d,{...s,options:u,style:{width:"100%"}})}):Le.jsx(_d,{...s,options:u,style:{width:"100%"}})},azt=e=>{let{...t}=e;return Le.jsx(yge,{...t,mode:"single"})},lzt=e=>{let{onChange:t,value:n,...r}=e;const[o,i]=J.useState([]);return J.useEffect(()=>{if(n&&typeof n=="string")try{n=JSON.parse(n),t(n)}catch{}n&&i(n)},[n]),Le.jsx(yge,{...r,onChange:t,mode:"multiple",value:o})},gtt=e=>{var t,n;let{readItemRender:r,readonly:o,onChange:i,onCustomChange:a,value:l,form:s,fieldName:u,...c}=e;return J.useEffect(()=>{if(l&&typeof l=="string")try{l=JSON.parse(l),s==null||s.setFieldValue(u,l),console.log("WithSingleSelect useEffect onChange////// form",s),console.log("WithSingleSelect useEffect onChange////// fieldName",u),console.log("WithSingleSelect useEffect onChange////// value",l)}catch(f){console.log("WithSingleSelect useEffect error",f)}},[l]),o?Le.jsx("div",{className:" fh-8 fflex fitems-center fgap-2",children:l&&l.label&&Le.jsx(Le.Fragment,{children:r&&typeof r=="function"?r(l):Le.jsx("span",{children:(t=l)===null||t===void 0?void 0:t.label},"btn_".concat((n=l)===null||n===void 0?void 0:n.value))})}):Le.jsx(mge,{addWrapper:!1,form:s,fieldName:u,...c,onChange:i,value:l,mode:"single",className:" fflex-1 foverflow-hidden"})},mtt=e=>{let{readItemRender:t,readonly:n,onChange:r,value:o,form:i,fieldName:a,...l}=e;return J.useEffect(()=>{if(o&&typeof o=="string")try{o=JSON.parse(o),r(o)}catch{}},[o]),n?Le.jsx("div",{className:" fh-8 fflex fitems-center fgap-2",children:Array.isArray(o)&&o.map((s,u)=>Le.jsxs(Le.Fragment,{children:[" ",t&&typeof t=="function"?t(s):Le.jsx("span",{children:s==null?void 0:s.label},"btn_".concat(s==null?void 0:s.value)),u<o.length-1?Le.jsx("span",{className:" ftext-gray-400",children:","}):null]}))}):Le.jsx(mge,{addWrapper:!1,form:i,fieldName:a,...l,onChange:r,value:o,mode:"multiple",className:" fflex-1 foverflow-hidden"})},szt=e=>{let{customComponent:t,...n}=e;return t?Le.jsx(mi,{...n,children:Le.jsx(t,{...n})}):Le.jsx(mi,{...n,children:Le.jsx(Wv,{...n})})},ytt=e=>{let{onChange:t,value:n,multiple:r,...o}=e;const[i,a]=J.useState();J.useEffect(()=>{if(n&&typeof n=="string")try{n=JSON.parse(n),t(n);return}catch{}r?Array.isArray(n)&&a(n):(Array.isArray(n)&&(n=n[0]),a(n))},[n]);const l=s=>{Array.isArray(s)||(s=[s]),t&&typeof t=="function"&&t(s)};return Le.jsx(htt,{...o,onChange:l,value:i,multiple:r})},uzt=e=>{let{FetchDeptList:t,...n}=e;return Le.jsx(ytt,{...n,title:"deptName",request:t})},czt=e=>{let{FetchPostList:t,...n}=e;return Le.jsx(ytt,{...n,title:"postName",request:t})};gtt.displayName="WithSingleSelect";mtt.displayName="WithMultipleSelect";const fzt=J.forwardRef((e,t)=>(J.useImperativeHandle(t,()=>({handleChange:n=>{e==null||e.onChange(n)}}),[]),Le.jsx(mi,{...e,children:Le.jsx(gtt,{...e})}))),dzt=J.forwardRef((e,t)=>(J.useImperativeHandle(t,()=>({handleChange:n=>{e==null||e.onChange(n)}}),[]),Le.jsx(mi,{...e,children:Le.jsx(mtt,{...e})}))),pzt=J.forwardRef((e,t)=>{let{value:n,onChange:r,...o}=e;const i=J.useRef(0),a=()=>{i.current++,r(i.current)};return Le.jsxs(mi,{...o,children:[Le.jsxs("div",{ref:t,children:["form-set-value:",n]}),Le.jsx(_s,{onClick:a,children:"test"})]})}),vzt=e=>{let t="",n="";try{n="return ".concat(e.join("")),t=new Function(n)(),t=t.toString()}catch(r){console.error("formula (".concat(n,") error"),r)}return t},hzt="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let ev=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=hzt[n[e]&63];return t};var btt={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(s,u,c){this.fn=s,this.context=u,this.once=c||!1}function i(s,u,c,f,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var p=new o(c,f||s,d),m=n?n+u:u;return s._events[m]?s._events[m].fn?s._events[m]=[s._events[m],p]:s._events[m].push(p):(s._events[m]=p,s._eventsCount++),s}function a(s,u){--s._eventsCount===0?s._events=new r:delete s._events[u]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],c,f;if(this._eventsCount===0)return u;for(f in c=this._events)t.call(c,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},l.prototype.listeners=function(u){var c=n?n+u:u,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,p=f.length,m=new Array(p);d<p;d++)m[d]=f[d].fn;return m},l.prototype.listenerCount=function(u){var c=n?n+u:u,f=this._events[c];return f?f.fn?1:f.length:0},l.prototype.emit=function(u,c,f,d,p,m){var y=n?n+u:u;if(!this._events[y])return!1;var v=this._events[y],g=arguments.length,h,b;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),g){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,c),!0;case 3:return v.fn.call(v.context,c,f),!0;case 4:return v.fn.call(v.context,c,f,d),!0;case 5:return v.fn.call(v.context,c,f,d,p),!0;case 6:return v.fn.call(v.context,c,f,d,p,m),!0}for(b=1,h=new Array(g-1);b<g;b++)h[b-1]=arguments[b];v.fn.apply(v.context,h)}else{var E=v.length,S;for(b=0;b<E;b++)switch(v[b].once&&this.removeListener(u,v[b].fn,void 0,!0),g){case 1:v[b].fn.call(v[b].context);break;case 2:v[b].fn.call(v[b].context,c);break;case 3:v[b].fn.call(v[b].context,c,f);break;case 4:v[b].fn.call(v[b].context,c,f,d);break;default:if(!h)for(S=1,h=new Array(g-1);S<g;S++)h[S-1]=arguments[S];v[b].fn.apply(v[b].context,h)}}return!0},l.prototype.on=function(u,c,f){return i(this,u,c,f,!1)},l.prototype.once=function(u,c,f){return i(this,u,c,f,!0)},l.prototype.removeListener=function(u,c,f,d){var p=n?n+u:u;if(!this._events[p])return this;if(!c)return a(this,p),this;var m=this._events[p];if(m.fn)m.fn===c&&(!d||m.once)&&(!f||m.context===f)&&a(this,p);else{for(var y=0,v=[],g=m.length;y<g;y++)(m[y].fn!==c||d&&!m[y].once||f&&m[y].context!==f)&&v.push(m[y]);v.length?this._events[p]=v.length===1?v[0]:v:a(this,p)}return this},l.prototype.removeAllListeners=function(u){var c;return u?(c=n?n+u:u,this._events[c]&&a(this,c)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(btt);var gzt=btt.exports;const mzt=Xl(gzt),Fie=new mzt,yzt=e=>{let{children:t,layout:n,onTableAddRow:r,onTableRemoveRow:o,form:i,initializeFormRender:a,recordFieldsChange:l,mode:s}=e;n=n||"1";const u=p=>{const m=p.split(",").map(Number),y=24;return m.map(v=>v/m.reduce((g,h)=>g+h)*y)},c=J.useMemo(()=>u(n),[n]),f=J.useRef({}),d=J.useMemo(()=>J.Children.toArray(t).map((p,m)=>{var y,v;const g=p.props,h=(g==null?void 0:g.componentId)||(g==null?void 0:g.__id),b=h;var E=((y=p.type)===null||y===void 0?void 0:y.displayName)||((v=p.props)===null||v===void 0?void 0:v._componentName);b in f.current||(f.current[b]=ev());const S=(g==null?void 0:g.calcHidden)&&s!="desgin",C=[];if(g!=null&&g.isRequired&&C.push({required:!0,message:"".concat(g.label,"必须填写")}),g!=null&&g.rules)if(Array.isArray(g.rules)){const T=g.rules.join("|");C.push({pattern:new RegExp(T),message:g.rulesFailMessage?g.rulesFailMessage:"".concat(g.label,"格式错误")})}else C.push({pattern:new RegExp(g.rules),message:g.rulesFailMessage?g.rulesFailMessage:"".concat(g.label,"格式错误")});const w=T=>{i.setFieldValue(b,T)};let A=null;return E=="Field.Table"?A=J.cloneElement(p,{onTableAddRow:r,onTableRemoveRow:o,form:i,fieldName:h,initializeFormRender:a,mode:s,recordFieldsChange:l}):E==="Field.WithSingleSelect"||E==="Field.WithMultipleSelect"||E==="Show.WithTable"?A=Le.jsx(ga.Item,{hidden:S,style:{margin:0},shouldUpdate:(T,x)=>{let O=!1;if(Array.isArray(g.filterRules)&&g.filterRules.length>0)for(let P of g.filterRules){if(P.valueType!="variable")continue;let N,M;if(N=T==null?void 0:T[P.value.field_key],M=x==null?void 0:x[P.value.field_key],N!==M){O=!0;break}}return O&&(f.current[b]=ev()),O},children:T=>{let{getFieldsValue:x}=T;const O=x();let P=J.cloneElement(p,{onTableAddRow:r,onTableRemoveRow:o,form:i,fieldName:b,onCustomChange:w,fieldsValue:O,initializeFormRender:a,recordFieldsChange:l,shouldUpdateKey:f.current[b]});return E==="Show.WithTable"?Le.jsx(Le.Fragment,{children:P}):Le.jsx(ga.Item,{style:{marginBottom:0},label:"",name:b,rules:C,children:P})}}):J.isValidElement(p)?A=Le.jsx(ga.Item,{style:{marginBottom:0},label:"",name:h,rules:C,children:J.cloneElement(p,{form:i,fieldName:h,initializeFormRender:a,recordFieldsChange:l})},"".concat(h,"-form-item")):A=p,(c==null?void 0:c[m])&&Le.jsx(vR,{span:c[m],children:A},m)}),[t,c]);return Le.jsx(r_,{gutter:24,children:d})},bzt=e=>{let{title:t}=e;return t?Le.jsx("div",{className:"fh-11 fflex fitems-center ftext-lg ffont-medium ",children:Le.jsx("span",{className:"fborder-l-4 fborder-slate-300 fpl-2 ",children:t})}):null};function Ezt(e,t){const n=[];let r=[];const o=(a,l)=>{const s=a-l.length;s>0&&l.push(...new Array(s).fill(J.createElement("div")))};for(const a of e){var i;const{_componentName:l}=(a==null?void 0:a.props)||{},s=((i=a.type)===null||i===void 0?void 0:i.displayName)||l;s&&s.startsWith("Layout.")?(r.length>0&&(o(t,r),n.push(r),r=[]),n.push([a])):(r.push(a),r.filter(c=>{var f;return!(c!=null&&(f=c.props)!==null&&f!==void 0&&f.calcHidden)}).length===t&&(n.push(r),r=[]))}return r.length>0&&(o(t,r),n.push(r)),n}const bge=J.forwardRef((e,t)=>{let{cols:n=1,children:r,mode:o="view"}=e;const[i]=ga.useForm(),[a,l]=J.useState(null),s=J.useRef(null),u=J.useRef(0);J.useImperativeHandle(t,()=>({formRef:i,setFieldsValue:F=>{u.current=1,i.setFieldsValue({...F,__id:F==null?void 0:F.id})},initializeFieldVisibility:y}),[]);const c=J.useCallback(av.throttle(()=>{m(),l(M())},300),[r,n]);J.useEffect(()=>(c(),()=>{c.cancel()}),[r,n]);const f=()=>{c()},d=J.useRef(null),p=F=>{var k;return(k=d.current)===null||k===void 0?void 0:k[F]},m=()=>{const F=[];function k(H){var z,_;let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;var B=((z=H.type)===null||z===void 0?void 0:z.displayName)||((_=H.props)===null||_===void 0?void 0:_._componentName);const{props:j}=H;if(B&&(B.startsWith("Field.")||B.startsWith("Layout."))){let U=(j==null?void 0:j.componentId)||(j==null?void 0:j.__id),G=[];if(R&&R!==null&&R!==void 0&&R.props){var W,K;U="".concat((R==null||(W=R.props)===null||W===void 0?void 0:W.componentId)||(R==null||(K=R.props)===null||K===void 0?void 0:K.__id),".").concat(U)}j!=null&&j.withId&&G.push(j==null?void 0:j.withId),j!=null&&j.withIds&&(G=[...G,...j==null?void 0:j.withIds]),F.push({identifier:U,withIds:G,component:H,componentName:B,fillRules:j==null?void 0:j.fillRules})}j!=null&&j.children&&J.Children.toArray(j==null?void 0:j.children).forEach(G=>k(G,B&&B.startsWith("Field.")?H:null))}s.current=new Map,console.log(" fields",F);const L=J.Children.toArray(r);for(let H=0;H<L.length;H++){const z=L[H];k(z)}F.forEach(H=>{const{identifier:z}=H;s.current.set(z,{children:F.filter(_=>_.withIds.some(R=>R==z)),show:!0,...H})}),console.log("dependencyMap.current",s.current),y()},y=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const k=i.getFieldsValue();for(let L of s.current.keys())v(L,k,!0);F&&l(M())},v=function(F,k){let L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,H=!1,z=[];if(Array.isArray(F)&&(z=[...F.slice(0,-1)],F=F.filter(_=>typeof _=="string").join(".")),s.current.has(F)){const _=s.current.get(F),R=_.children;!L&&_!==null&&_!==void 0&&_.fillRules&&Array.isArray(_==null?void 0:_.fillRules)&&(_==null?void 0:_.fillRules.length)>0&&E(F,z,k,_==null?void 0:_.fillRules),R.forEach(B=>{B.component.props.withFunc&&typeof B.component.props.withFunc=="function"&&(H=S(k,B)),!L&&B.component.props.withFill&&C(k,B,z,_==null?void 0:_.componentName)})}return H},g=function(F){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(d.current)if(k){const L=Object.keys(d.current);for(let H=0;H<L.length;H++){const z=L[H];z.includes("".concat(F,","))&&delete d.current[z]}}else delete d.current[F]},h=(F,k)=>{A.current||(A.current={}),A.current[F]=k},b=function(F){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var L=Object.keys(F);L.length>0&&(L.forEach(H=>{h(H,F[H])}),k&&T())},E=(F,k,L,H)=>{let z=w("fieldsValue",F,L,null),_={},R=[];for(let U=0;U<H.length;U++){const G=H[U];let{source:q,target:X}=G,Q=z==null?void 0:z[q],Y=Q;if((G==null?void 0:G.type)==1){if(s.current.has(X)){var B,j,W;let le=(B=s.current.get(X))===null||B===void 0||(j=B.component)===null||j===void 0||(W=j.props)===null||W===void 0?void 0:W.children;Array.isArray(le)&&le.length>0&&R.push(le.map(ee=>{var se,me;return"".concat(q,".").concat((ee==null||(se=ee.props)===null||se===void 0?void 0:se.componentId)||(ee==null||(me=ee.props)===null||me===void 0?void 0:me.__id))}))}if(Q&&typeof Q=="string")try{Q=JSON.parse(Q)}catch(le){console.error("error end",le)}if(!Array.isArray(Q))return;Y=Q.map((le,ee)=>{let se={};if(G!=null&&G.subRules&&Array.isArray(G==null?void 0:G.subRules)&&(G==null?void 0:G.subRules.length)>0)for(let me=0;me<(G==null?void 0:G.subRules.length);me++){const{source:we,target:ce}=G==null?void 0:G.subRules[me];se[ce]=le==null?void 0:le[we];let ue={name:[X,ee,ce],value:le==null?void 0:le[we]};_[ue.name]=ue}return se}),g(X,!0),Fie.emit("reloadTable",X)}else{let ne=0;if(k&&Array.isArray(k)&&k.length>1&&(k.filter(le=>typeof le=="string").join("."),ne=k[k.length-1],X=[...k,X],Array.isArray(z)&&z.length>ne)){var K;Y=(K=z[ne])===null||K===void 0?void 0:K[q]}_[X]={name:Array.isArray(X)?X:[X],value:Y}}(G==null?void 0:G.type)==1&&i.setFieldValue(X,void 0),i.setFieldValue(X,Y)}setTimeout(()=>{b(_,!0),R.length>0&&R.forEach(U=>{Array.isArray(U)&&U.length>0&&O(U)})},0)},S=(F,k,L)=>{var H,z;let _=!1;const R=k==null||(H=k.component)===null||H===void 0||(z=H.props)===null||z===void 0?void 0:z.withFunc(F),B=k==null?void 0:k.identifier;if(s.current.has(B)){const j=s.current.get(B);j.show!==R&&(j.show=R,s.current.set(B,j),_=!0)}return _},C=async(F,k,L,H)=>{var z,_;const R=k==null||(z=k.component)===null||z===void 0?void 0:z.props.withFill,B=k==null||(_=k.component)===null||_===void 0?void 0:_.props.withDataFetch;let j=0,W="",K=k.identifier;if(L&&Array.isArray(L)&&L.length>1)W=L.filter(X=>typeof X=="string").join("."),j=L[L.length-1],K.startsWith("".concat(W,"."))&&(K=[...L,K.replace("".concat(W,"."),"")]);else if(K.indexOf(".")>=0){K=K.split(".");let X=w("fieldsValue",K[0],F,[]);if(Array.isArray(X)&&X.length>0)for(let Q=0;Q<X.length;Q++)await C(F,k,[K[0],Q],H);return}let U=[];if(R!=null&&R.withData&&(R==null?void 0:R.withData.length)>0&&B&&typeof B=="function")for(let X=0;X<(R==null?void 0:R.withData.length);X++){const Q=R==null?void 0:R.withData[X];let Y={};Y.tableName=Q.withTable.table_name,Y.filter={};for(let le=0;le<Q.withCondition.length;le++){var G;const{value:ee,column:se}=Q.withCondition[le];let me=w(ee.group_key,ee.field_key,F,U);Array.isArray(me)&&Array.isArray(K)&&me.length>j&&(me=me[j]),H=="Field.WithSingleSelect"&&me&&(G=me)!==null&&G!==void 0&&G.value&&(me=me.value),Y.filter[se.column_name]=me}const ne=await B(Y);ne.code===0&&ne.data.list&&U.push({id:Q.id,data:ne.data.list})}let q;if(R.value&&R.value.length>0&&(q=R.value.map(X=>{let Q="";const{insert:Y,attributes:ne}=X;return typeof Y!="string"?Y!=null&&Y.span&&ne&&ne.tagKey&&ne.id&&(Q=w(ne.tagKey,ne.id,F,U),Array.isArray(Q)?Array.isArray(K)&&Q.length>j?Q=Q[j]:Q=JSON.stringify(Q):Q.length>0&&(Q='"'.concat(Q,'"'))):Q=Y,Q})),q&&q.length>0){const X=vzt(q);i.setFieldValue(K,X),v(K,i.getFieldsValue())}},w=(F,k,L,H)=>{let z="";if(F=="fieldsValue"){var _;if(k.indexOf(".")>=0){var R;const[W,K]=k.split("."),U=(L==null?void 0:L[W])||[];Array.isArray(U)?z=U.map(G=>{var q;return(q=G==null?void 0:G[K])!==null&&q!==void 0?q:""}):z=(R=U==null?void 0:U[K])!==null&&R!==void 0?R:""}else z=(_=L==null?void 0:L[k])!==null&&_!==void 0?_:""}else{let W=H.find(K=>K.id===F);if(W&&W.data&&W.data.length>0){var B,j;z=(B=(j=W.data[0])===null||j===void 0?void 0:j[k])!==null&&B!==void 0?B:""}}return z},A=J.useRef({}),T=av.debounce(()=>{const F=i.getFieldsValue(),k=u.current;u.current=0;let L=!1;d.current||(d.current={});for(let H in A.current){let z=A.current[H];av.isEqual(z.value,p(z.name))||(k!=1&&(L=v(z.name,F)),d.current[z.name]=z.value)}L&&l(M()),A.current={}},100),x=F=>{F.filter(k=>{k.name&&k.name.length>0&&(A.current[k.name]=k)}),T()},O=F=>{let k=[];F.forEach(H=>{if(!s.current.has(H))return;let z=s.current.get(H);z.withIds.length<=0||k.push(...z.withIds.filter(_=>!k.includes(_)))}),k=k.filter(H=>{var z=i.getFieldValue(H);return!(typeof z!="number"&&!z)});const L=i.getFieldsValue();setTimeout(()=>{k.forEach(H=>{v(H,L)})},0)},P=F=>{const k=i.getFieldsValue();setTimeout(()=>{F.forEach(L=>{v(L,k)})},0)},N=J.useRef({}),M=()=>{const F=J.Children.toArray(r);return Ezt(F.filter(L=>{var H;const z=L.props.componentId||L.props.__id;return!s.current.has(z)||((H=s.current.get(z))===null||H===void 0?void 0:H.show)}),n).map((L,H)=>Le.jsx(r_,{gutter:[24,24],children:L.map((z,_)=>{var R;const{componentId:B,__id:j,_componentName:W,...K}=z.props,U=((R=z.type)===null||R===void 0?void 0:R.displayName)||W,G=B||j;G in N.current||(N.current[G]=ev());const q=U&&U.startsWith("Layout."),X=U&&U=="Field.Table",Q=K.calcHidden&&o!="desgin",Y=[];if(K.isRequired&&Y.push({required:!0,message:"".concat(K.label,"必须填写")}),K.rules)if(Array.isArray(K.rules)){const ee=K.rules.join("|");Y.push({pattern:new RegExp(ee),message:K.rulesFailMessage?K.rulesFailMessage:"".concat(K.label,"格式错误")})}else Y.push({pattern:new RegExp(K.rules),message:K.rulesFailMessage?K.rulesFailMessage:"".concat(K.label,"格式错误")});const ne=ee=>{i.setFieldValue(G,ee)};let le;return X||q?le=J.cloneElement(z,{onTableAddRow:O,onTableRemoveRow:P,form:i,fieldName:G,onCustomChange:ne,initializeFormRender:f,mode:o,recordFieldsChange:b}):U==="Field.WithSingleSelect"||U==="Field.WithMultipleSelect"||U==="Show.WithTable"?le=Le.jsx(ga.Item,{hidden:Q,style:{margin:0},shouldUpdate:(ee,se)=>{let me=!1;if(Array.isArray(K.filterRules)&&K.filterRules.length>0)for(let we of K.filterRules){if(we.valueType!="variable")continue;let ce,ue;if(ce=ee==null?void 0:ee[we.value.field_key],ue=se==null?void 0:se[we.value.field_key],ce!==ue){me=!0;break}}return me&&(N.current[G]=ev()),me},children:ee=>{let{getFieldsValue:se}=ee;const me=se();let we=J.cloneElement(z,{onTableAddRow:O,onTableRemoveRow:P,form:i,fieldName:G,onCustomChange:ne,fieldsValue:me,initializeFormRender:f,recordFieldsChange:b,shouldUpdateKey:newidRefs.current[childIndex]});return U==="show.WithTable"?Le.jsx(Le.Fragment,{children:we}):Le.jsx(ga.Item,{style:{marginBottom:0},label:"",name:G,rules:Y,children:we})}}):le=Le.jsx(ga.Item,{hidden:Q,style:{marginBottom:0},label:"",name:G,rules:Y,children:J.cloneElement(z,{form:i,fieldName:G,onCustomChange:ne,initializeFormRender:f,recordFieldsChange:b})}),Le.jsx(vR,{span:K.calcHidden?0:q?24:24/n,style:{marginBottom:0},children:le},G||"col-".concat(_))})},"row-".concat(H)))};return Le.jsxs(ga,{form:i,className:"form-container fp-0 fw-full fh-full box-border fflex fflex-col fgap-y-2"+(o=="desgin"?" fp-6":""),onValuesChange:(F,k)=>{},onFieldsChange:x,children:[Le.jsx(ga.Item,{name:"__id",hidden:!0,children:Le.jsx("input",{type:"hidden"})}),a]})});function Szt(e){return J.forwardRef((t,n)=>Le.jsx(e,{...t,ref:n,forwardedRef:n}))}class D1r extends J.PureComponent{render(){const{forwardedRef:t,...n}=this.props;return Le.jsx(bge,{...n,ref:t})}}const Czt=Szt(e=>{let{forwardedRef:t,...n}=e;return Le.jsx(bge,{...n,ref:t})}),wzt=e=>{let{request:t,value:n,onChange:r,callError:o,disabledValue:i,addRoot:a=!0,title:l,...s}=e;const[u,c]=J.useState(!1),[f,d]=J.useState([]);J.useEffect(()=>{p()},[]),J.useEffect(()=>{if(typeof n=="string")try{n=JSON.parse(n),r(n)}catch{}Array.isArray(n)&&g(n)},[n]);const p=async()=>{if(t&&typeof t=="function"){var T;const x=await t();if(x.code>0){o&&typeof o=="function"&&o(x.message);return}let O=vtt(((T=x.data)===null||T===void 0?void 0:T.list)||x.data||[],"id",l||"title",(s==null?void 0:s.parentId)||"parentId","children",0,i);a&&(O=[{value:0,title:"根节点",children:O}]),s.treeData=O,console.log("treeData",O),d(O)}s.treeData&&d(s.treeData),c(!0)},[m,y]=J.useState([]),[v,g]=J.useState([]),[h,b]=J.useState([]),[E,S]=J.useState(!0),C=T=>{console.log("onExpand",T),y(T),S(!1)},w=T=>{console.log("onCheck",T),g(T),r(T)},A=(T,x)=>{console.log("onSelect",x),b(T)};return Le.jsx(mi,{...s,children:Le.jsx(fge,{checkable:!0,onExpand:C,onCheck:w,onSelect:A,expandedKeys:m,autoExpandParent:E,checkedKeys:v,selectedKeys:h,treeData:f})})},xzt=e=>Le.jsx(mi,{...e,children:Le.jsx(pR,{...e})}),Azt=e=>Le.jsx(mi,{...e,children:Le.jsx(pR.Group,{...e})}),$zt=e=>Le.jsx(mi,{...e,children:Le.jsx(Qj.Group,{...e})}),Ett=e=>{let{value:t,maxCount:n,multiple:r,onChange:o,...i}=e;J.useEffect(()=>{if(t){if(typeof t=="string")try{t=JSON.parse(t),o(t)}catch{}console.log("value",t),Array.isArray(t)&&l(t)}},[t]),n=n||99,r=r||!0;const[a,l]=J.useState([]),s=u=>{let{fileList:c}=u;console.log("newFileList",c),c=c.map(f=>(f.status=="done"&&f.response&&(f.url=f.response),f)),o(c.map(f=>({uid:f.uid,name:f.name,status:f.status,url:f.url||f.response||"",error:f.error}))),l(c)};return Le.jsx(c_,{...i,listType:"text",multiple:r,onChange:s,maxCount:n,fileList:a,children:!(i!=null&&i.disabled)&&!(i!=null&&i.readonly)&&a.length<n&&Le.jsx(_s,{type:(i==null?void 0:i.type)||"default",icon:(i==null?void 0:i.icon)||Le.jsx(ptt,{}),children:"点击上传文件"})})};Ett.displayName="UploadFile";const Ozt=e=>Le.jsx(mi,{...e,children:Le.jsx(Ett,{...e})}),Stt=e=>{let{maxCount:t,value:n,multiple:r,onChange:o,...i}=e;J.useEffect(()=>{if(n){if(console.log("value",n),typeof n=="string")try{n=JSON.parse(n),o(n)}catch{}let S=[];if(Array.isArray(n))for(let C=0;C<n.length;C++){let w=n[C];var E=m.current.find(A=>A.uid===w.uid);!E||(E.version||0)<(w.version||0)?S.push(w):S.push(E)}l(S)}},[n]),t=t||99,r=r||!0;const[a,l]=J.useState([]),[s,u]=J.useState(""),[c,f]=J.useState(0),[d,p]=J.useState(!1),m=J.useRef([]),y=E=>new Promise((S,C)=>{const w=new FileReader;w.readAsDataURL(E),w.onload=()=>S(w.result),w.onerror=A=>C(A)}),v=async(E,S)=>{!E.url&&!E.preview&&(E.preview=await y(E.originFileObj)),u(E.url||E.preview),f(S),p(!0)},g=async(E,S)=>{i!=null&&i.disabled||l(a.filter((C,w)=>w!==S))},h=Le.jsx(Le.Fragment,{children:Le.jsxs("div",{className:"fw-full fh-full fflex fflex-col fitems-center fjustify-center fborder fborder-dashed fcursor-pointer frounded",children:[Le.jsx(dtt,{}),Le.jsx("div",{className:"fmt-2",children:"点击上传"})]})}),b=E=>{let{fileList:S}=E,C=[];for(let T=0;T<S.length;T++){var w=S[T];w.version=new Date().getTime();var A=m.current.find(x=>x.uid===w.uid);console.log("oldfile",JSON.parse(JSON.stringify(A||{}))),A&&A.status!="uploading"?C.push(A):(w.status=="done"&&w.response&&(w.url=w.response),C.push(w))}m.current=C,l(C),o(C.map(T=>({uid:T.uid,name:T.name,status:T.status,url:T.url||T.response||"",error:T.error,version:T.version||0})))};return Le.jsxs(Le.Fragment,{children:[Le.jsx("div",{className:"fflex fgap-3 fflex-wrap",children:Le.jsx(c_,{...i,itemRender:(E,S,C)=>{console.log("file",S);let w=C.findIndex(A=>A.uid===S.uid);return Le.jsx(Le.Fragment,{children:Le.jsxs("div",{className:"fgroup fw-full fh-full fbg-transparent fborder frounded fflex fitems-center fjustify-center foverflow-hidden fcursor-pointer frelative"+(S.status=="error"?" fborder-red-500":""),children:[Le.jsxs("div",{className:" fhidden fabsolute fw-full fh-full fbg-gray-900 fbg-opacity-50 fitems-center fjustify-center fz-10 group-hover:fflex ftext-white ftext-lg fgap-2",children:[S.status=="done"&&Le.jsx(ftt,{onClick:()=>{v(S,w)},className:"hover:ftext-gray-200"}),!(i!=null&&i.disabled)&&!(i!=null&&i.readonly)&&Le.jsx(gge,{onClick:()=>{g(S,w)},className:"hover:ftext-gray-200"})]}),S.status=="uploading"&&Le.jsx("div",{className:" fw-full fh-full fflex fitems-center fjustify-center fabsolute ftop-0 fleft-0 ",children:Le.jsx(GP,{})}),Le.jsx("img",{src:S.url||S.thumbUrl,alt:"Example Image",className:"fmax-w-full fmax-h-full fobject-contain "})]},"file-".concat(S.uid))})},listType:"picture-card",fileList:a,multiple:r,onPreview:v,onChange:b,maxCount:t,children:a.length>=t||i!=null&&i.disabled||i!=null&&i.readonly?null:h})}),s&&Le.jsx(mB.PreviewGroup,{preview:{visible:d,current:c,onVisibleChange:E=>p(E),onChange:E=>{f(E)}},children:a.map((E,S)=>Le.jsx(Le.Fragment,{children:Le.jsx(mB,{wrapperStyle:{display:"none"},src:E.url})}))})]})};Stt.displayName="UploadImage";const Dzt=e=>Le.jsx(mi,{...e,children:Le.jsx(Stt,{...e})}),Tzt=e=>{let{value:t,onChange:n,form:r,fieldName:o,...i}=e,a=!1;return typeof t=="boolean"?a=t:typeof t=="string"?a=t=="1"||t=="true":typeof t=="number"&&(a=t==1),t!==a&&(r==null||r.setFieldValue(o,a)),Le.jsx(mi,{...i,children:Le.jsx(ige,{...i,onChange:n,value:t})})};var Pzt={exports:{}};(function(e,t){(function(n,r){e.exports=r(YQe)})(Er,function(n){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=r(n),i={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a,l){return l==="W"?a+"周":a+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(a,l){var s=100*a+l;return s<600?"凌晨":s<900?"早上":s<1100?"上午":s<1300?"中午":s<1800?"下午":"晚上"}};return o.default.locale(i,null,!0),i})})(Pzt);var Rzt={locale:"zh_CN",yearFormat:"YYYY年",cellDateFormat:"D",cellMeridiemFormat:"A",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"};const Izt={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},Ctt={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},Rzt),timePickerLocale:Object.assign({},Izt)};Ctt.lang.ok="确定";var wtt={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Er,function(){return function(n,r,o){o.updateLocale=function(i,a){var l=o.Ls[i];if(l)return(a?Object.keys(a):[]).forEach(function(s){l[s]=a[s]}),l}}})})(wtt);var Nzt=wtt.exports;const Mzt=Xl(Nzt);da.extend(Mzt);da.extend(nZe);da.updateLocale("zh-cn",{weekStart:0});const Fzt=e=>{let{datetype:t,value:n,defaultNow:r,onChange:o,...i}=e;t=t||"date";const[a,l]=J.useState(i==null?void 0:i.picker),[s,u]=J.useState(i==null?void 0:i.format),[c,f]=J.useState(!1),[d,p]=J.useState(!1),m=J.useRef(!1);J.useEffect(()=>{if(r&&!n){const v=da().format("YYYY-MM-DD HH:mm:ss");typeof o=="function"&&o(v);return}},[]);const y=(v,g)=>{m.current=!0,o(g)};return J.useEffect(()=>{switch(l("date"),f(!1),t){case"date":l("date"),u("YYYY-MM-DD"),p(!1);break;case"datetime":f(!0),l("datetime"),u("YYYY-MM-DD HH:mm:ss"),p(!0);break;case"month":l("month"),p(!1);break;case"year":l("year"),p(!1);break}},[t]),Le.jsx(mi,{...i,children:Le.jsx(xx,{locale:Ctt,...i,picker:a,format:s,style:{width:"100%"},onChange:y,value:n&&da(n).isValid()?da(n):void 0,showTime:c,needConfirm:d})})};var xtt={},Iv={},Ege={exports:{}};Ege.exports;(function(e){const n=(i=0)=>a=>`\x1B[${38+i};5;${a}m`,r=(i=0)=>(a,l,s)=>`\x1B[${38+i};2;${a};${l};${s}m`;function o(){const i=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.gray=a.color.blackBright,a.bgColor.bgGray=a.bgColor.bgBlackBright,a.color.grey=a.color.blackBright,a.bgColor.bgGrey=a.bgColor.bgBlackBright;for(const[l,s]of Object.entries(a)){for(const[u,c]of Object.entries(s))a[u]={open:`\x1B[${c[0]}m`,close:`\x1B[${c[1]}m`},s[u]=a[u],i.set(c[0],c[1]);Object.defineProperty(a,l,{value:s,enumerable:!1})}return Object.defineProperty(a,"codes",{value:i,enumerable:!1}),a.color.close="\x1B[39m",a.bgColor.close="\x1B[49m",a.color.ansi256=n(),a.color.ansi16m=r(),a.bgColor.ansi256=n(10),a.bgColor.ansi16m=r(10),Object.defineProperties(a,{rgbToAnsi256:{value:(l,s,u)=>l===s&&s===u?l<8?16:l>248?231:Math.round((l-8)/247*24)+232:16+36*Math.round(l/255*5)+6*Math.round(s/255*5)+Math.round(u/255*5),enumerable:!1},hexToRgb:{value:l=>{const s=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(l.toString(16));if(!s)return[0,0,0];let{colorString:u}=s.groups;u.length===3&&(u=u.split("").map(f=>f+f).join(""));const c=Number.parseInt(u,16);return[c>>16&255,c>>8&255,c&255]},enumerable:!1},hexToAnsi256:{value:l=>a.rgbToAnsi256(...a.hexToRgb(l)),enumerable:!1}}),a}Object.defineProperty(e,"exports",{enumerable:!0,get:o})})(Ege);var Att=Ege.exports,Gv={};Object.defineProperty(Gv,"__esModule",{value:!0});Gv.printIteratorEntries=kzt;Gv.printIteratorValues=Lzt;Gv.printListItems=jzt;Gv.printObjectProperties=_zt;const Bzt=(e,t)=>{const n=Object.keys(e).sort(t);return Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r=>{Object.getOwnPropertyDescriptor(e,r).enumerable&&n.push(r)}),n};function kzt(e,t,n,r,o,i,a=": "){let l="",s=e.next();if(!s.done){l+=t.spacingOuter;const u=n+t.indent;for(;!s.done;){const c=i(s.value[0],t,u,r,o),f=i(s.value[1],t,u,r,o);l+=u+c+a+f,s=e.next(),s.done?t.min||(l+=","):l+=","+t.spacingInner}l+=t.spacingOuter+n}return l}function Lzt(e,t,n,r,o,i){let a="",l=e.next();if(!l.done){a+=t.spacingOuter;const s=n+t.indent;for(;!l.done;)a+=s+i(l.value,t,s,r,o),l=e.next(),l.done?t.min||(a+=","):a+=","+t.spacingInner;a+=t.spacingOuter+n}return a}function jzt(e,t,n,r,o,i){let a="";if(e.length){a+=t.spacingOuter;const l=n+t.indent;for(let s=0;s<e.length;s++)a+=l,s in e&&(a+=i(e[s],t,l,r,o)),s<e.length-1?a+=","+t.spacingInner:t.min||(a+=",");a+=t.spacingOuter+n}return a}function _zt(e,t,n,r,o,i){let a="";const l=Bzt(e,t.compareKeys);if(l.length){a+=t.spacingOuter;const s=n+t.indent;for(let u=0;u<l.length;u++){const c=l[u],f=i(c,t,s,r,o),d=i(e[c],t,s,r,o);a+=s+f+": "+d,u<l.length-1?a+=","+t.spacingInner:t.min||(a+=",")}a+=t.spacingOuter+n}return a}var Kg={};Object.defineProperty(Kg,"__esModule",{value:!0});Kg.test=Kg.serialize=Kg.default=void 0;var tTe=Gv,SB=function(){return typeof globalThis<"u"?globalThis:typeof SB<"u"?SB:typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),qG=SB["jest-symbol-do-not-touch"]||SB.Symbol;const Hzt=typeof qG=="function"&&qG.for?qG.for("jest.asymmetricMatcher"):1267621,$6=" ",$tt=(e,t,n,r,o,i)=>{const a=e.toString();return a==="ArrayContaining"||a==="ArrayNotContaining"?++r>t.maxDepth?"["+a+"]":a+$6+"["+(0,tTe.printListItems)(e.sample,t,n,r,o,i)+"]":a==="ObjectContaining"||a==="ObjectNotContaining"?++r>t.maxDepth?"["+a+"]":a+$6+"{"+(0,tTe.printObjectProperties)(e.sample,t,n,r,o,i)+"}":a==="StringMatching"||a==="StringNotMatching"||a==="StringContaining"||a==="StringNotContaining"?a+$6+i(e.sample,t,n,r,o):e.toAsymmetricMatcher()};Kg.serialize=$tt;const Ott=e=>e&&e.$$typeof===Hzt;Kg.test=Ott;const zzt={serialize:$tt,test:Ott};var Vzt=zzt;Kg.default=Vzt;var Gg={},Uzt=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")};Object.defineProperty(Gg,"__esModule",{value:!0});Gg.test=Gg.serialize=Gg.default=void 0;var Dtt=Ttt(Uzt),Ho=Ttt(Att);function Ttt(e){return e&&e.__esModule?e:{default:e}}const Wzt=e=>e.replace((0,Dtt.default)(),t=>{switch(t){case Ho.default.red.close:case Ho.default.green.close:case Ho.default.cyan.close:case Ho.default.gray.close:case Ho.default.white.close:case Ho.default.yellow.close:case Ho.default.bgRed.close:case Ho.default.bgGreen.close:case Ho.default.bgYellow.close:case Ho.default.inverse.close:case Ho.default.dim.close:case Ho.default.bold.close:case Ho.default.reset.open:case Ho.default.reset.close:return"</>";case Ho.default.red.open:return"<red>";case Ho.default.green.open:return"<green>";case Ho.default.cyan.open:return"<cyan>";case Ho.default.gray.open:return"<gray>";case Ho.default.white.open:return"<white>";case Ho.default.yellow.open:return"<yellow>";case Ho.default.bgRed.open:return"<bgRed>";case Ho.default.bgGreen.open:return"<bgGreen>";case Ho.default.bgYellow.open:return"<bgYellow>";case Ho.default.inverse.open:return"<inverse>";case Ho.default.dim.open:return"<dim>";case Ho.default.bold.open:return"<bold>";default:return""}}),Ptt=e=>typeof e=="string"&&!!e.match((0,Dtt.default)());Gg.test=Ptt;const Rtt=(e,t,n,r,o,i)=>i(Wzt(e),t,n,r,o);Gg.serialize=Rtt;const Kzt={serialize:Rtt,test:Ptt};var Gzt=Kzt;Gg.default=Gzt;var qg={};Object.defineProperty(qg,"__esModule",{value:!0});qg.test=qg.serialize=qg.default=void 0;var nTe=Gv;const qzt=" ",Itt=["DOMStringMap","NamedNodeMap"],Yzt=/^(HTML\w*Collection|NodeList)$/,Xzt=e=>Itt.indexOf(e)!==-1||Yzt.test(e),Ntt=e=>e&&e.constructor&&!!e.constructor.name&&Xzt(e.constructor.name);qg.test=Ntt;const Qzt=e=>e.constructor.name==="NamedNodeMap",Mtt=(e,t,n,r,o,i)=>{const a=e.constructor.name;return++r>t.maxDepth?"["+a+"]":(t.min?"":a+qzt)+(Itt.indexOf(a)!==-1?"{"+(0,nTe.printObjectProperties)(Qzt(e)?Array.from(e).reduce((l,s)=>(l[s.name]=s.value,l),{}):{...e},t,n,r,o,i)+"}":"["+(0,nTe.printListItems)(Array.from(e),t,n,r,o,i)+"]")};qg.serialize=Mtt;const Zzt={serialize:Mtt,test:Ntt};var Jzt=Zzt;qg.default=Jzt;var Yg={},Nl={},Sge={};Object.defineProperty(Sge,"__esModule",{value:!0});Sge.default=eVt;function eVt(e){return e.replace(/</g,"<").replace(/>/g,">")}Object.defineProperty(Nl,"__esModule",{value:!0});Nl.printText=Nl.printProps=Nl.printElementAsLeaf=Nl.printElement=Nl.printComment=Nl.printChildren=void 0;var Ftt=tVt(Sge);function tVt(e){return e&&e.__esModule?e:{default:e}}const nVt=(e,t,n,r,o,i,a)=>{const l=r+n.indent,s=n.colors;return e.map(u=>{const c=t[u];let f=a(c,n,l,o,i);return typeof c!="string"&&(f.indexOf(`
|
416
|
+
`,GHt=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:KHt,n=J.useContext(Fet),r=n.csp;J.useEffect(function(){Od(t,"@ant-design-icons",{prepend:!0,csp:r})},[])},qHt=["icon","className","onClick","style","primaryColor","secondaryColor"],OT={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function YHt(e){var t=e.primaryColor,n=e.secondaryColor;OT.primaryColor=t,OT.secondaryColor=n||ltt(t),OT.calculated=!!n}function XHt(){return ve({},OT)}var Ax=function(t){var n=t.icon,r=t.className,o=t.onClick,i=t.style,a=t.primaryColor,l=t.secondaryColor,s=gn(t,qHt),u=OT;if(a&&(u={primaryColor:a,secondaryColor:l||ltt(a)}),GHt(),WHt(JDe(n),"icon should be icon definiton, but got ".concat(n)),!JDe(n))return null;var c=n;return c&&typeof c.icon=="function"&&(c=ve(ve({},c),{},{icon:c.icon(u.primaryColor,u.secondaryColor)})),Mie(c.icon,"svg-".concat(c.name),ve({className:r,onClick:o,style:i,"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},s))};Ax.displayName="IconReact";Ax.getTwoToneColors=XHt;Ax.setTwoToneColors=YHt;function utt(e){var t=stt(e),n=be(t,2),r=n[0],o=n[1];return Ax.setTwoToneColors({primaryColor:r,secondaryColor:o})}function QHt(){var e=Ax.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var ZHt=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];utt("#1890ff");var b0=D.forwardRef(function(e,t){var n=e.className,r=e.icon,o=e.spin,i=e.rotate,a=e.tabIndex,l=e.onClick,s=e.twoToneColor,u=gn(e,ZHt),c=D.useContext(Fet),f=c.prefixCls,d=f===void 0?"anticon":f,p=c.rootClassName,m=$e(p,d,ie(ie({},"".concat(d,"-").concat(r.name),!!r.name),"".concat(d,"-spin"),!!o||r.name==="loading"),n),y=a;y===void 0&&l&&(y=-1);var v=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,g=stt(s),h=be(g,2),b=h[0],E=h[1];return D.createElement("span",ve(ve({role:"img","aria-label":r.name},u),{},{ref:t,tabIndex:y,onClick:l,className:m}),D.createElement(Ax,{icon:r,primaryColor:b,secondaryColor:E,style:v}))});b0.displayName="AntdIcon";b0.getTwoToneColor=QHt;b0.setTwoToneColor=utt;var JHt=function(t,n){return D.createElement(b0,ve(ve({},t),{},{ref:n,icon:a9t}))},ctt=D.forwardRef(JHt);process.env.NODE_ENV!=="production"&&(ctt.displayName="CopyOutlined");var ezt=function(t,n){return D.createElement(b0,ve(ve({},t),{},{ref:n,icon:bet}))},gge=D.forwardRef(ezt);process.env.NODE_ENV!=="production"&&(gge.displayName="DeleteOutlined");var tzt=function(t,n){return D.createElement(b0,ve(ve({},t),{},{ref:n,icon:EJe}))},ftt=D.forwardRef(tzt);process.env.NODE_ENV!=="production"&&(ftt.displayName="EyeOutlined");var nzt=function(t,n){return D.createElement(b0,ve(ve({},t),{},{ref:n,icon:YZe}))},dtt=D.forwardRef(nzt);process.env.NODE_ENV!=="production"&&(dtt.displayName="PlusOutlined");var rzt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},ozt=function(t,n){return D.createElement(b0,ve(ve({},t),{},{ref:n,icon:rzt}))},ptt=D.forwardRef(ozt);process.env.NODE_ENV!=="production"&&(ptt.displayName="UploadOutlined");function vtt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"id",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"title",r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"parentId",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"children",i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0;return izt(e,t,n,r,o,i,l=>({value:l[t],title:l[n],key:l[t],disabled:l[t]===a}))}function izt(e,t,n,r,o,i,a){if(!Array.isArray(e)||e.length===0)return[];const l=e.map(s=>({...s,...a(s)}));return l.filter(s=>{const u=l.filter(c=>s[t]===c[r]);return s[o]=u.length>0?u:[],s[r]===i})}const htt=e=>{let{request:t,title:n,disabledValue:r,callError:o,...i}=e;const[a,l]=J.useState(!1),[s,u]=J.useState([]);J.useEffect(()=>{c()},[]);const c=async()=>{if(t&&typeof t=="function"){var f;const d=await t();if(d.code>0){o&&typeof o=="function"&&o(d.message);return}let p=vtt(((f=d.data)===null||f===void 0?void 0:f.list)||d.data||[],"id",n||"title",i.parentId||"parentId","children",0,r);p=[{value:0,title:"根节点",children:p}],i.treeData=p,u(p)}i.treeData&&u(i.treeData),l(!0)};return Le.jsx(mi,{...i,children:a&&Le.jsx(y0,{...i,treeData:s,treeDefaultExpandAll:!0,style:{width:"100%"}})})},mge=J.forwardRef((e,t)=>{let{addWrapper:n=!0,form:r,fieldName:o,fieldsValue:i,shouldUpdateKey:a,value:l,type:s,defaultValue:u,onChange:c,option_label:f,option_value:d,option_search:p,options:m,request:y,requestParams:v,callError:g,subRequest:h,sub_option_label:b="label",mode:E="single",sub_option_value:S="id",rightIconRender:C,rightIcon:w,rightIconClick:A,recordFieldsChange:T,...x}=e;const[O,P]=J.useState([]),[N,M]=J.useState(!1);J.useEffect(()=>{if(l){let R=null;Array.isArray(O)&&O.length>0&&(R=O.find(B=>B.value==(l==null?void 0:l.value)||B.value==l),R&&!av.isEqual(R,l)&&(console.log("new value /////",R),typeof c=="function"&&c(R))),R||F()}},[l]),J.useEffect(()=>{console.log("SearchSelect useEffect shouldUpdateKey",a),console.log("SearchSelect useEffect requestParams",v),k(v)},[a,v]);const F=async()=>{y&&d&&H({...v,[d]:l==null?void 0:l.value},null,R=>{if(console.log("loadSelectOptions selectOptions",R),R&&R.length>0){let B=R.find(j=>j.value==(l==null?void 0:l.value)||j.value==l);console.log("loadSelectOptions item",B),B&&!av.isEqual(B,l)&&(console.log("new value /////",B),typeof c=="function"&&c(B))}})},k=async R=>{y&&typeof y=="function"&&H(R,{}),m&&m.length>0&&P(m)},L=async R=>{const B={...v};B[p]=R,await H(B)},H=J.useCallback(av.debounce((R,B,j)=>{z(R,B).then(W=>{typeof j=="function"&&j(W)})},200),[]),z=async(R,B)=>{try{let W=[];if(!(B&&Object.values(B).some(K=>K==="##norequest##"))){var j;M(!0);const K=await y({...R,ruleParams:B},r,o);M(!1),K.code>0?g&&typeof g=="function"&&g(K.message):W=((j=K.data)===null||j===void 0?void 0:j.list)||K.data}if(Array.isArray(W)){for(let K=0;K<W.length;K++){const U=W[K];if(typeof h=="function"){let G=[];const{data:q}=await h(U);q!=null&&q.list&&Array.isArray(q.list)&&(G=q.list.map(X=>({label:"".concat(U[f],"-").concat(X[b]),value:"".concat(U[d],"-").concat(X[S])}))),W[K]={...U,label:U[f],title:U[f],options:G}}W[K]={...U,label:U[f],value:U[d]}}O.length>0&&!av.isEqual(O,W)&&typeof c=="function"&&c(void 0),P(W)}else P([]);return W}catch(W){console.error("fetchOptions",W),M(!1)}finally{}},_=R=>{Array.isArray(R)?c(R.map(B=>O.find(j=>j.value===B))):c(O.find(B=>B.value===R))};return n?Le.jsxs(mi,{...x,children:[Le.jsx(_d,{ref:t,notFoundContent:N?Le.jsx(GP,{size:"small"}):null,value:l,...x,filterOption:!1,showSearch:!!(y&&p),onSearch:y&&p?L:null,onChange:_,style:{width:"100%",flex:1},options:O,mode:E}),!(x!=null&&x.disabled)&&w,!(x!=null&&x.disabled)&&typeof C=="function"&&C({value:l,onChange:c,form:r,fieldName:o,recordFieldsChange:T})]}):Le.jsxs(Le.Fragment,{children:[Le.jsx(_d,{ref:t,notFoundContent:N?Le.jsx(GP,{size:"small"}):null,value:l,...x,filterOption:!1,showSearch:!!(y&&p),onSearch:y&&p?L:null,onChange:_,style:{width:"100%"},options:O,mode:E}),!(x!=null&&x.disabled)&&w,!(x!=null&&x.disabled)&&typeof C=="function"&&C({value:l,onChange:c,form:r,fieldName:o,recordFieldsChange:T})]})}),yge=e=>{let{request:t,option_label:n="label",option_value:r="id",disabledValue:o,callError:i,options:a,addWrapper:l=!0,...s}=e;const[u,c]=J.useState([]);J.useEffect(()=>{f()},[]);const f=async()=>{if(t&&typeof t=="function"){var d;const p=await t();if(p.code>0){i&&typeof i=="function"&&i(p.message);return}let m=((d=p.data)===null||d===void 0?void 0:d.list)||p.data;Array.isArray(m)&&m.length>0&&c(m.map(y=>({label:y[n],value:y[r]})))}a&&a.length>0&&c(a)};return l?Le.jsx(mi,{...s,children:Le.jsx(_d,{...s,options:u,style:{width:"100%"}})}):Le.jsx(_d,{...s,options:u,style:{width:"100%"}})},azt=e=>{let{...t}=e;return Le.jsx(yge,{...t,mode:"single"})},lzt=e=>{let{onChange:t,value:n,...r}=e;const[o,i]=J.useState([]);return J.useEffect(()=>{if(n&&typeof n=="string")try{n=JSON.parse(n),t(n)}catch{}n&&i(n)},[n]),Le.jsx(yge,{...r,onChange:t,mode:"multiple",value:o})},gtt=e=>{var t,n;let{readItemRender:r,readonly:o,onChange:i,onCustomChange:a,value:l,form:s,fieldName:u,...c}=e;return J.useEffect(()=>{if(l&&typeof l=="string")try{l=JSON.parse(l),s==null||s.setFieldValue(u,l),console.log("WithSingleSelect useEffect onChange////// form",s),console.log("WithSingleSelect useEffect onChange////// fieldName",u),console.log("WithSingleSelect useEffect onChange////// value",l)}catch(f){console.log("WithSingleSelect useEffect error",f)}},[l]),o?Le.jsx("div",{className:" fh-8 fflex fitems-center fgap-2",children:l&&l.label&&Le.jsx(Le.Fragment,{children:r&&typeof r=="function"?r(l):Le.jsx("span",{children:(t=l)===null||t===void 0?void 0:t.label},"btn_".concat((n=l)===null||n===void 0?void 0:n.value))})}):Le.jsx(mge,{addWrapper:!1,form:s,fieldName:u,...c,onChange:i,value:l,mode:"single",className:" fflex-1 foverflow-hidden"})},mtt=e=>{let{readItemRender:t,readonly:n,onChange:r,value:o,form:i,fieldName:a,...l}=e;return J.useEffect(()=>{if(o&&typeof o=="string")try{o=JSON.parse(o),r(o)}catch{}},[o]),n?Le.jsx("div",{className:" fh-8 fflex fitems-center fgap-2",children:Array.isArray(o)&&o.map((s,u)=>Le.jsxs(Le.Fragment,{children:[" ",t&&typeof t=="function"?t(s):Le.jsx("span",{children:s==null?void 0:s.label},"btn_".concat(s==null?void 0:s.value)),u<o.length-1?Le.jsx("span",{className:" ftext-gray-400",children:","}):null]}))}):Le.jsx(mge,{addWrapper:!1,form:i,fieldName:a,...l,onChange:r,value:o,mode:"multiple",className:" fflex-1 foverflow-hidden"})},szt=e=>{let{customComponent:t,...n}=e;return t?Le.jsx(mi,{...n,children:Le.jsx(t,{...n})}):Le.jsx(mi,{...n,children:Le.jsx(Wv,{...n})})},ytt=e=>{let{onChange:t,value:n,multiple:r,...o}=e;const[i,a]=J.useState();J.useEffect(()=>{if(n&&typeof n=="string")try{n=JSON.parse(n),t(n);return}catch{}r?Array.isArray(n)&&a(n):(Array.isArray(n)&&(n=n[0]),a(n))},[n]);const l=s=>{Array.isArray(s)||(s=[s]),t&&typeof t=="function"&&t(s)};return Le.jsx(htt,{...o,onChange:l,value:i,multiple:r})},uzt=e=>{let{FetchDeptList:t,...n}=e;return Le.jsx(ytt,{...n,title:"deptName",request:t})},czt=e=>{let{FetchPostList:t,...n}=e;return Le.jsx(ytt,{...n,title:"postName",request:t})};gtt.displayName="WithSingleSelect";mtt.displayName="WithMultipleSelect";const fzt=J.forwardRef((e,t)=>(J.useImperativeHandle(t,()=>({handleChange:n=>{e==null||e.onChange(n)}}),[]),Le.jsx(mi,{...e,children:Le.jsx(gtt,{...e})}))),dzt=J.forwardRef((e,t)=>(J.useImperativeHandle(t,()=>({handleChange:n=>{e==null||e.onChange(n)}}),[]),Le.jsx(mi,{...e,children:Le.jsx(mtt,{...e})}))),pzt=J.forwardRef((e,t)=>{let{value:n,onChange:r,...o}=e;const i=J.useRef(0),a=()=>{i.current++,r(i.current)};return Le.jsxs(mi,{...o,children:[Le.jsxs("div",{ref:t,children:["form-set-value:",n]}),Le.jsx(_s,{onClick:a,children:"test"})]})}),vzt=e=>{let t="",n="";try{n="return ".concat(e.join("")),t=new Function(n)(),t=t.toString()}catch(r){console.error("formula (".concat(n,") error"),r)}return t},hzt="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let ev=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+=hzt[n[e]&63];return t};var btt={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function o(s,u,c){this.fn=s,this.context=u,this.once=c||!1}function i(s,u,c,f,d){if(typeof c!="function")throw new TypeError("The listener must be a function");var p=new o(c,f||s,d),m=n?n+u:u;return s._events[m]?s._events[m].fn?s._events[m]=[s._events[m],p]:s._events[m].push(p):(s._events[m]=p,s._eventsCount++),s}function a(s,u){--s._eventsCount===0?s._events=new r:delete s._events[u]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],c,f;if(this._eventsCount===0)return u;for(f in c=this._events)t.call(c,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(c)):u},l.prototype.listeners=function(u){var c=n?n+u:u,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,p=f.length,m=new Array(p);d<p;d++)m[d]=f[d].fn;return m},l.prototype.listenerCount=function(u){var c=n?n+u:u,f=this._events[c];return f?f.fn?1:f.length:0},l.prototype.emit=function(u,c,f,d,p,m){var y=n?n+u:u;if(!this._events[y])return!1;var v=this._events[y],g=arguments.length,h,b;if(v.fn){switch(v.once&&this.removeListener(u,v.fn,void 0,!0),g){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,c),!0;case 3:return v.fn.call(v.context,c,f),!0;case 4:return v.fn.call(v.context,c,f,d),!0;case 5:return v.fn.call(v.context,c,f,d,p),!0;case 6:return v.fn.call(v.context,c,f,d,p,m),!0}for(b=1,h=new Array(g-1);b<g;b++)h[b-1]=arguments[b];v.fn.apply(v.context,h)}else{var E=v.length,S;for(b=0;b<E;b++)switch(v[b].once&&this.removeListener(u,v[b].fn,void 0,!0),g){case 1:v[b].fn.call(v[b].context);break;case 2:v[b].fn.call(v[b].context,c);break;case 3:v[b].fn.call(v[b].context,c,f);break;case 4:v[b].fn.call(v[b].context,c,f,d);break;default:if(!h)for(S=1,h=new Array(g-1);S<g;S++)h[S-1]=arguments[S];v[b].fn.apply(v[b].context,h)}}return!0},l.prototype.on=function(u,c,f){return i(this,u,c,f,!1)},l.prototype.once=function(u,c,f){return i(this,u,c,f,!0)},l.prototype.removeListener=function(u,c,f,d){var p=n?n+u:u;if(!this._events[p])return this;if(!c)return a(this,p),this;var m=this._events[p];if(m.fn)m.fn===c&&(!d||m.once)&&(!f||m.context===f)&&a(this,p);else{for(var y=0,v=[],g=m.length;y<g;y++)(m[y].fn!==c||d&&!m[y].once||f&&m[y].context!==f)&&v.push(m[y]);v.length?this._events[p]=v.length===1?v[0]:v:a(this,p)}return this},l.prototype.removeAllListeners=function(u){var c;return u?(c=n?n+u:u,this._events[c]&&a(this,c)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(btt);var gzt=btt.exports;const mzt=Xl(gzt),Fie=new mzt,yzt=e=>{let{children:t,layout:n,onTableAddRow:r,onTableRemoveRow:o,form:i,initializeFormRender:a,recordFieldsChange:l,mode:s}=e;n=n||"1";const u=p=>{const m=p.split(",").map(Number),y=24;return m.map(v=>v/m.reduce((g,h)=>g+h)*y)},c=J.useMemo(()=>u(n),[n]),f=J.useRef({}),d=J.useMemo(()=>J.Children.toArray(t).map((p,m)=>{var y,v;const g=p.props,h=(g==null?void 0:g.componentId)||(g==null?void 0:g.__id),b=h;var E=((y=p.type)===null||y===void 0?void 0:y.displayName)||((v=p.props)===null||v===void 0?void 0:v._componentName);b in f.current||(f.current[b]=ev());const S=(g==null?void 0:g.calcHidden)&&s!="desgin",C=[];if(g!=null&&g.isRequired&&C.push({required:!0,message:"".concat(g.label,"必须填写")}),g!=null&&g.rules)if(Array.isArray(g.rules)){const T=g.rules.join("|");C.push({pattern:new RegExp(T),message:g.rulesFailMessage?g.rulesFailMessage:"".concat(g.label,"格式错误")})}else C.push({pattern:new RegExp(g.rules),message:g.rulesFailMessage?g.rulesFailMessage:"".concat(g.label,"格式错误")});const w=T=>{i.setFieldValue(b,T)};let A=null;return E=="Field.Table"?A=J.cloneElement(p,{onTableAddRow:r,onTableRemoveRow:o,form:i,fieldName:h,initializeFormRender:a,mode:s,recordFieldsChange:l}):E==="Field.WithSingleSelect"||E==="Field.WithMultipleSelect"||E==="Show.WithTable"?A=Le.jsx(ga.Item,{hidden:S,style:{margin:0},shouldUpdate:(T,x)=>{let O=!1;if(Array.isArray(g.filterRules)&&g.filterRules.length>0)for(let P of g.filterRules){if(P.valueType!="variable")continue;let N,M;if(N=T==null?void 0:T[P.value.field_key],M=x==null?void 0:x[P.value.field_key],N!==M){O=!0;break}}return O&&(f.current[b]=ev()),O},children:T=>{let{getFieldsValue:x}=T;const O=x();let P=J.cloneElement(p,{onTableAddRow:r,onTableRemoveRow:o,form:i,fieldName:b,onCustomChange:w,fieldsValue:O,initializeFormRender:a,recordFieldsChange:l,shouldUpdateKey:f.current[b]});return E==="Show.WithTable"?Le.jsx(Le.Fragment,{children:P}):Le.jsx(ga.Item,{style:{marginBottom:0},label:"",name:b,rules:C,children:P})}}):J.isValidElement(p)?A=Le.jsx(ga.Item,{style:{marginBottom:0},label:"",name:h,rules:C,children:J.cloneElement(p,{form:i,fieldName:h,initializeFormRender:a,recordFieldsChange:l})},"".concat(h,"-form-item")):A=p,(c==null?void 0:c[m])&&Le.jsx(vR,{span:c[m],children:A},m)}),[t,c]);return Le.jsx(r_,{gutter:24,children:d})},bzt=e=>{let{title:t}=e;return t?Le.jsx("div",{className:"fh-11 fflex fitems-center ftext-lg ffont-medium ",children:Le.jsx("span",{className:"fborder-l-4 fborder-slate-300 fpl-2 ",children:t})}):null};function Ezt(e,t){const n=[];let r=[];const o=(a,l)=>{const s=a-l.length;s>0&&l.push(...new Array(s).fill(J.createElement("div")))};for(const a of e){var i;const{_componentName:l}=(a==null?void 0:a.props)||{},s=((i=a.type)===null||i===void 0?void 0:i.displayName)||l;s&&s.startsWith("Layout.")?(r.length>0&&(o(t,r),n.push(r),r=[]),n.push([a])):(r.push(a),r.filter(c=>{var f;return!(c!=null&&(f=c.props)!==null&&f!==void 0&&f.calcHidden)}).length===t&&(n.push(r),r=[]))}return r.length>0&&(o(t,r),n.push(r)),n}const bge=J.forwardRef((e,t)=>{let{cols:n=1,children:r,mode:o="view"}=e;const[i]=ga.useForm(),[a,l]=J.useState(null),s=J.useRef(null),u=J.useRef(0);J.useImperativeHandle(t,()=>({formRef:i,setFieldsValue:F=>{u.current=1,i.setFieldsValue({...F,__id:F==null?void 0:F.id})},initializeFieldVisibility:y}),[]);const c=J.useCallback(av.throttle(()=>{m(),l(M())},300),[r,n]);J.useEffect(()=>(c(),()=>{c.cancel()}),[r,n]);const f=()=>{c()},d=J.useRef(null),p=F=>{var k;return(k=d.current)===null||k===void 0?void 0:k[F]},m=()=>{const F=[];function k(H){var z,_;let R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;var B=((z=H.type)===null||z===void 0?void 0:z.displayName)||((_=H.props)===null||_===void 0?void 0:_._componentName);const{props:j}=H;if(B&&(B.startsWith("Field.")||B.startsWith("Layout."))){let U=(j==null?void 0:j.componentId)||(j==null?void 0:j.__id),G=[];if(R&&R!==null&&R!==void 0&&R.props){var W,K;U="".concat((R==null||(W=R.props)===null||W===void 0?void 0:W.componentId)||(R==null||(K=R.props)===null||K===void 0?void 0:K.__id),".").concat(U)}j!=null&&j.withId&&G.push(j==null?void 0:j.withId),j!=null&&j.withIds&&(G=[...G,...j==null?void 0:j.withIds]),F.push({identifier:U,withIds:G,component:H,componentName:B,fillRules:j==null?void 0:j.fillRules})}j!=null&&j.children&&J.Children.toArray(j==null?void 0:j.children).forEach(G=>k(G,B&&B.startsWith("Field.")?H:null))}s.current=new Map,console.log(" fields",F);const L=J.Children.toArray(r);for(let H=0;H<L.length;H++){const z=L[H];k(z)}F.forEach(H=>{const{identifier:z}=H;s.current.set(z,{children:F.filter(_=>_.withIds.some(R=>R==z)),show:!0,...H})}),console.log("dependencyMap.current",s.current),y()},y=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const k=i.getFieldsValue();for(let L of s.current.keys())v(L,k,!0);F&&l(M())},v=function(F,k){let L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,H=!1,z=[];if(Array.isArray(F)&&(z=[...F.slice(0,-1)],F=F.filter(_=>typeof _=="string").join(".")),s.current.has(F)){const _=s.current.get(F),R=_.children;!L&&_!==null&&_!==void 0&&_.fillRules&&Array.isArray(_==null?void 0:_.fillRules)&&(_==null?void 0:_.fillRules.length)>0&&E(F,z,k,_==null?void 0:_.fillRules),R.forEach(B=>{B.component.props.withFunc&&typeof B.component.props.withFunc=="function"&&(H=S(k,B)),!L&&B.component.props.withFill&&C(k,B,z,_==null?void 0:_.componentName)})}return H},g=function(F){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(d.current)if(k){const L=Object.keys(d.current);for(let H=0;H<L.length;H++){const z=L[H];z.includes("".concat(F,","))&&delete d.current[z]}}else delete d.current[F]},h=(F,k)=>{A.current||(A.current={}),A.current[F]=k},b=function(F){let k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var L=Object.keys(F);L.length>0&&(L.forEach(H=>{h(H,F[H])}),k&&T())},E=(F,k,L,H)=>{let z=w("fieldsValue",F,L,null),_={},R=[];for(let U=0;U<H.length;U++){const G=H[U];let{source:q,target:X}=G,Q=z==null?void 0:z[q],Y=Q;if((G==null?void 0:G.type)==1){if(s.current.has(X)){var B,j,W;let le=(B=s.current.get(X))===null||B===void 0||(j=B.component)===null||j===void 0||(W=j.props)===null||W===void 0?void 0:W.children;Array.isArray(le)&&le.length>0&&R.push(le.map(ee=>{var se,me;return"".concat(q,".").concat((ee==null||(se=ee.props)===null||se===void 0?void 0:se.componentId)||(ee==null||(me=ee.props)===null||me===void 0?void 0:me.__id))}))}if(Q&&typeof Q=="string")try{Q=JSON.parse(Q)}catch(le){console.error("error end",le)}if(!Array.isArray(Q))return;Y=Q.map((le,ee)=>{let se={};if(G!=null&&G.subRules&&Array.isArray(G==null?void 0:G.subRules)&&(G==null?void 0:G.subRules.length)>0)for(let me=0;me<(G==null?void 0:G.subRules.length);me++){const{source:we,target:ce}=G==null?void 0:G.subRules[me];se[ce]=le==null?void 0:le[we];let ue={name:[X,ee,ce],value:le==null?void 0:le[we]};_[ue.name]=ue}return se}),g(X,!0),Fie.emit("reloadTable",X)}else{let ne=0;if(k&&Array.isArray(k)&&k.length>1&&(k.filter(le=>typeof le=="string").join("."),ne=k[k.length-1],X=[...k,X],Array.isArray(z)&&z.length>ne)){var K;Y=(K=z[ne])===null||K===void 0?void 0:K[q]}_[X]={name:Array.isArray(X)?X:[X],value:Y}}(G==null?void 0:G.type)==1&&i.setFieldValue(X,void 0),i.setFieldValue(X,Y)}setTimeout(()=>{b(_,!0),R.length>0&&R.forEach(U=>{Array.isArray(U)&&U.length>0&&O(U)})},0)},S=(F,k,L)=>{var H,z;let _=!1;const R=k==null||(H=k.component)===null||H===void 0||(z=H.props)===null||z===void 0?void 0:z.withFunc(F),B=k==null?void 0:k.identifier;if(s.current.has(B)){const j=s.current.get(B);j.show!==R&&(j.show=R,s.current.set(B,j),_=!0)}return _},C=async(F,k,L,H)=>{var z,_;const R=k==null||(z=k.component)===null||z===void 0?void 0:z.props.withFill,B=k==null||(_=k.component)===null||_===void 0?void 0:_.props.withDataFetch;let j=0,W="",K=k.identifier;if(L&&Array.isArray(L)&&L.length>1)W=L.filter(X=>typeof X=="string").join("."),j=L[L.length-1],K.startsWith("".concat(W,"."))&&(K=[...L,K.replace("".concat(W,"."),"")]);else if(K.indexOf(".")>=0){K=K.split(".");let X=w("fieldsValue",K[0],F,[]);if(Array.isArray(X)&&X.length>0)for(let Q=0;Q<X.length;Q++)await C(F,k,[K[0],Q],H);return}let U=[];if(R!=null&&R.withData&&(R==null?void 0:R.withData.length)>0&&B&&typeof B=="function")for(let X=0;X<(R==null?void 0:R.withData.length);X++){const Q=R==null?void 0:R.withData[X];let Y={};Y.tableName=Q.withTable.table_name,Y.filter={};for(let le=0;le<Q.withCondition.length;le++){var G;const{value:ee,column:se}=Q.withCondition[le];let me=w(ee.group_key,ee.field_key,F,U);Array.isArray(me)&&Array.isArray(K)&&me.length>j&&(me=me[j]),H=="Field.WithSingleSelect"&&me&&(G=me)!==null&&G!==void 0&&G.value&&(me=me.value),Y.filter[se.column_name]=me}const ne=await B(Y);ne.code===0&&ne.data.list&&U.push({id:Q.id,data:ne.data.list})}let q;if(R.value&&R.value.length>0&&(q=R.value.map(X=>{let Q="";const{insert:Y,attributes:ne}=X;return typeof Y!="string"?Y!=null&&Y.span&&ne&&ne.tagKey&&ne.id&&(Q=w(ne.tagKey,ne.id,F,U),Array.isArray(Q)?Array.isArray(K)&&Q.length>j?Q=Q[j]:Q=JSON.stringify(Q):Q.length>0&&(Q='"'.concat(Q,'"'))):Q=Y,Q})),q&&q.length>0){const X=vzt(q);i.setFieldValue(K,X),v(K,i.getFieldsValue())}},w=(F,k,L,H)=>{let z="";if(F=="fieldsValue"){var _;if(k.indexOf(".")>=0){var R;const[W,K]=k.split("."),U=(L==null?void 0:L[W])||[];Array.isArray(U)?z=U.map(G=>{var q;return(q=G==null?void 0:G[K])!==null&&q!==void 0?q:""}):z=(R=U==null?void 0:U[K])!==null&&R!==void 0?R:""}else z=(_=L==null?void 0:L[k])!==null&&_!==void 0?_:""}else{let W=H.find(K=>K.id===F);if(W&&W.data&&W.data.length>0){var B,j;z=(B=(j=W.data[0])===null||j===void 0?void 0:j[k])!==null&&B!==void 0?B:""}}return z},A=J.useRef({}),T=av.debounce(()=>{const F=i.getFieldsValue(),k=u.current;u.current=0;let L=!1;d.current||(d.current={});for(let H in A.current){let z=A.current[H];av.isEqual(z.value,p(z.name))||(k!=1&&(L=v(z.name,F)),d.current[z.name]=z.value)}L&&l(M()),A.current={}},100),x=F=>{F.filter(k=>{k.name&&k.name.length>0&&(A.current[k.name]=k)}),T()},O=F=>{let k=[];F.forEach(H=>{if(!s.current.has(H))return;let z=s.current.get(H);z.withIds.length<=0||k.push(...z.withIds.filter(_=>!k.includes(_)))}),k=k.filter(H=>{var z=i.getFieldValue(H);return!(typeof z!="number"&&!z)});const L=i.getFieldsValue();setTimeout(()=>{k.forEach(H=>{v(H,L)})},0)},P=F=>{const k=i.getFieldsValue();setTimeout(()=>{F.forEach(L=>{v(L,k)})},0)},N=J.useRef({}),M=()=>{const F=J.Children.toArray(r);return Ezt(F.filter(L=>{var H;const z=L.props.componentId||L.props.__id;return!s.current.has(z)||((H=s.current.get(z))===null||H===void 0?void 0:H.show)}),n).map((L,H)=>Le.jsx(r_,{gutter:[24,24],children:L.map((z,_)=>{var R;const{componentId:B,__id:j,_componentName:W,...K}=z.props,U=((R=z.type)===null||R===void 0?void 0:R.displayName)||W,G=B||j;G in N.current||(N.current[G]=ev());const q=U&&U.startsWith("Layout."),X=U&&U=="Field.Table",Q=K.calcHidden&&o!="desgin",Y=[];if(K.isRequired&&Y.push({required:!0,message:"".concat(K.label,"必须填写")}),K.rules)if(Array.isArray(K.rules)){const ee=K.rules.join("|");Y.push({pattern:new RegExp(ee),message:K.rulesFailMessage?K.rulesFailMessage:"".concat(K.label,"格式错误")})}else Y.push({pattern:new RegExp(K.rules),message:K.rulesFailMessage?K.rulesFailMessage:"".concat(K.label,"格式错误")});const ne=ee=>{i.setFieldValue(G,ee)};let le;return X||q?le=J.cloneElement(z,{onTableAddRow:O,onTableRemoveRow:P,form:i,fieldName:G,onCustomChange:ne,initializeFormRender:f,mode:o,recordFieldsChange:b}):U==="Field.WithSingleSelect"||U==="Field.WithMultipleSelect"||U==="Show.WithTable"?le=Le.jsx(ga.Item,{hidden:Q,style:{margin:0},shouldUpdate:(ee,se)=>{let me=!1;if(Array.isArray(K.filterRules)&&K.filterRules.length>0)for(let we of K.filterRules){if(we.valueType!="variable")continue;let ce,ue;if(ce=ee==null?void 0:ee[we.value.field_key],ue=se==null?void 0:se[we.value.field_key],ce!==ue){me=!0;break}}return me&&(N.current[G]=ev()),me},children:ee=>{let{getFieldsValue:se}=ee;const me=se();let we=J.cloneElement(z,{onTableAddRow:O,onTableRemoveRow:P,form:i,fieldName:G,onCustomChange:ne,fieldsValue:me,initializeFormRender:f,recordFieldsChange:b,shouldUpdateKey:N.current[childIndex]});return U==="show.WithTable"?Le.jsx(Le.Fragment,{children:we}):Le.jsx(ga.Item,{style:{marginBottom:0},label:"",name:G,rules:Y,children:we})}}):le=Le.jsx(ga.Item,{hidden:Q,style:{marginBottom:0},label:"",name:G,rules:Y,children:J.cloneElement(z,{form:i,fieldName:G,onCustomChange:ne,initializeFormRender:f,recordFieldsChange:b})}),Le.jsx(vR,{span:K.calcHidden?0:q?24:24/n,style:{marginBottom:0},children:le},G||"col-".concat(_))})},"row-".concat(H)))};return Le.jsxs(ga,{form:i,className:"form-container fp-0 fw-full fh-full box-border fflex fflex-col fgap-y-2"+(o=="desgin"?" fp-6":""),onValuesChange:(F,k)=>{},onFieldsChange:x,children:[Le.jsx(ga.Item,{name:"__id",hidden:!0,children:Le.jsx("input",{type:"hidden"})}),a]})});function Szt(e){return J.forwardRef((t,n)=>Le.jsx(e,{...t,ref:n,forwardedRef:n}))}class D1r extends J.PureComponent{render(){const{forwardedRef:t,...n}=this.props;return Le.jsx(bge,{...n,ref:t})}}const Czt=Szt(e=>{let{forwardedRef:t,...n}=e;return Le.jsx(bge,{...n,ref:t})}),wzt=e=>{let{request:t,value:n,onChange:r,callError:o,disabledValue:i,addRoot:a=!0,title:l,...s}=e;const[u,c]=J.useState(!1),[f,d]=J.useState([]);J.useEffect(()=>{p()},[]),J.useEffect(()=>{if(typeof n=="string")try{n=JSON.parse(n),r(n)}catch{}Array.isArray(n)&&g(n)},[n]);const p=async()=>{if(t&&typeof t=="function"){var T;const x=await t();if(x.code>0){o&&typeof o=="function"&&o(x.message);return}let O=vtt(((T=x.data)===null||T===void 0?void 0:T.list)||x.data||[],"id",l||"title",(s==null?void 0:s.parentId)||"parentId","children",0,i);a&&(O=[{value:0,title:"根节点",children:O}]),s.treeData=O,console.log("treeData",O),d(O)}s.treeData&&d(s.treeData),c(!0)},[m,y]=J.useState([]),[v,g]=J.useState([]),[h,b]=J.useState([]),[E,S]=J.useState(!0),C=T=>{console.log("onExpand",T),y(T),S(!1)},w=T=>{console.log("onCheck",T),g(T),r(T)},A=(T,x)=>{console.log("onSelect",x),b(T)};return Le.jsx(mi,{...s,children:Le.jsx(fge,{checkable:!0,onExpand:C,onCheck:w,onSelect:A,expandedKeys:m,autoExpandParent:E,checkedKeys:v,selectedKeys:h,treeData:f})})},xzt=e=>Le.jsx(mi,{...e,children:Le.jsx(pR,{...e})}),Azt=e=>Le.jsx(mi,{...e,children:Le.jsx(pR.Group,{...e})}),$zt=e=>Le.jsx(mi,{...e,children:Le.jsx(Qj.Group,{...e})}),Ett=e=>{let{value:t,maxCount:n,multiple:r,onChange:o,...i}=e;J.useEffect(()=>{if(t){if(typeof t=="string")try{t=JSON.parse(t),o(t)}catch{}console.log("value",t),Array.isArray(t)&&l(t)}},[t]),n=n||99,r=r||!0;const[a,l]=J.useState([]),s=u=>{let{fileList:c}=u;console.log("newFileList",c),c=c.map(f=>(f.status=="done"&&f.response&&(f.url=f.response),f)),o(c.map(f=>({uid:f.uid,name:f.name,status:f.status,url:f.url||f.response||"",error:f.error}))),l(c)};return Le.jsx(c_,{...i,listType:"text",multiple:r,onChange:s,maxCount:n,fileList:a,children:!(i!=null&&i.disabled)&&!(i!=null&&i.readonly)&&a.length<n&&Le.jsx(_s,{type:(i==null?void 0:i.type)||"default",icon:(i==null?void 0:i.icon)||Le.jsx(ptt,{}),children:"点击上传文件"})})};Ett.displayName="UploadFile";const Ozt=e=>Le.jsx(mi,{...e,children:Le.jsx(Ett,{...e})}),Stt=e=>{let{maxCount:t,value:n,multiple:r,onChange:o,...i}=e;J.useEffect(()=>{if(n){if(console.log("value",n),typeof n=="string")try{n=JSON.parse(n),o(n)}catch{}let S=[];if(Array.isArray(n))for(let C=0;C<n.length;C++){let w=n[C];var E=m.current.find(A=>A.uid===w.uid);!E||(E.version||0)<(w.version||0)?S.push(w):S.push(E)}l(S)}},[n]),t=t||99,r=r||!0;const[a,l]=J.useState([]),[s,u]=J.useState(""),[c,f]=J.useState(0),[d,p]=J.useState(!1),m=J.useRef([]),y=E=>new Promise((S,C)=>{const w=new FileReader;w.readAsDataURL(E),w.onload=()=>S(w.result),w.onerror=A=>C(A)}),v=async(E,S)=>{!E.url&&!E.preview&&(E.preview=await y(E.originFileObj)),u(E.url||E.preview),f(S),p(!0)},g=async(E,S)=>{i!=null&&i.disabled||l(a.filter((C,w)=>w!==S))},h=Le.jsx(Le.Fragment,{children:Le.jsxs("div",{className:"fw-full fh-full fflex fflex-col fitems-center fjustify-center fborder fborder-dashed fcursor-pointer frounded",children:[Le.jsx(dtt,{}),Le.jsx("div",{className:"fmt-2",children:"点击上传"})]})}),b=E=>{let{fileList:S}=E,C=[];for(let T=0;T<S.length;T++){var w=S[T];w.version=new Date().getTime();var A=m.current.find(x=>x.uid===w.uid);console.log("oldfile",JSON.parse(JSON.stringify(A||{}))),A&&A.status!="uploading"?C.push(A):(w.status=="done"&&w.response&&(w.url=w.response),C.push(w))}m.current=C,l(C),o(C.map(T=>({uid:T.uid,name:T.name,status:T.status,url:T.url||T.response||"",error:T.error,version:T.version||0})))};return Le.jsxs(Le.Fragment,{children:[Le.jsx("div",{className:"fflex fgap-3 fflex-wrap",children:Le.jsx(c_,{...i,itemRender:(E,S,C)=>{console.log("file",S);let w=C.findIndex(A=>A.uid===S.uid);return Le.jsx(Le.Fragment,{children:Le.jsxs("div",{className:"fgroup fw-full fh-full fbg-transparent fborder frounded fflex fitems-center fjustify-center foverflow-hidden fcursor-pointer frelative"+(S.status=="error"?" fborder-red-500":""),children:[Le.jsxs("div",{className:" fhidden fabsolute fw-full fh-full fbg-gray-900 fbg-opacity-50 fitems-center fjustify-center fz-10 group-hover:fflex ftext-white ftext-lg fgap-2",children:[S.status=="done"&&Le.jsx(ftt,{onClick:()=>{v(S,w)},className:"hover:ftext-gray-200"}),!(i!=null&&i.disabled)&&!(i!=null&&i.readonly)&&Le.jsx(gge,{onClick:()=>{g(S,w)},className:"hover:ftext-gray-200"})]}),S.status=="uploading"&&Le.jsx("div",{className:" fw-full fh-full fflex fitems-center fjustify-center fabsolute ftop-0 fleft-0 ",children:Le.jsx(GP,{})}),Le.jsx("img",{src:S.url||S.thumbUrl,alt:"Example Image",className:"fmax-w-full fmax-h-full fobject-contain "})]},"file-".concat(S.uid))})},listType:"picture-card",fileList:a,multiple:r,onPreview:v,onChange:b,maxCount:t,children:a.length>=t||i!=null&&i.disabled||i!=null&&i.readonly?null:h})}),s&&Le.jsx(mB.PreviewGroup,{preview:{visible:d,current:c,onVisibleChange:E=>p(E),onChange:E=>{f(E)}},children:a.map((E,S)=>Le.jsx(Le.Fragment,{children:Le.jsx(mB,{wrapperStyle:{display:"none"},src:E.url})}))})]})};Stt.displayName="UploadImage";const Dzt=e=>Le.jsx(mi,{...e,children:Le.jsx(Stt,{...e})}),Tzt=e=>{let{value:t,onChange:n,form:r,fieldName:o,...i}=e,a=!1;return typeof t=="boolean"?a=t:typeof t=="string"?a=t=="1"||t=="true":typeof t=="number"&&(a=t==1),t!==a&&(r==null||r.setFieldValue(o,a)),Le.jsx(mi,{...i,children:Le.jsx(ige,{...i,onChange:n,value:t})})};var Pzt={exports:{}};(function(e,t){(function(n,r){e.exports=r(YQe)})(Er,function(n){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=r(n),i={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a,l){return l==="W"?a+"周":a+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(a,l){var s=100*a+l;return s<600?"凌晨":s<900?"早上":s<1100?"上午":s<1300?"中午":s<1800?"下午":"晚上"}};return o.default.locale(i,null,!0),i})})(Pzt);var Rzt={locale:"zh_CN",yearFormat:"YYYY年",cellDateFormat:"D",cellMeridiemFormat:"A",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"};const Izt={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},Ctt={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},Rzt),timePickerLocale:Object.assign({},Izt)};Ctt.lang.ok="确定";var wtt={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Er,function(){return function(n,r,o){o.updateLocale=function(i,a){var l=o.Ls[i];if(l)return(a?Object.keys(a):[]).forEach(function(s){l[s]=a[s]}),l}}})})(wtt);var Nzt=wtt.exports;const Mzt=Xl(Nzt);da.extend(Mzt);da.extend(nZe);da.updateLocale("zh-cn",{weekStart:0});const Fzt=e=>{let{datetype:t,value:n,defaultNow:r,onChange:o,...i}=e;t=t||"date";const[a,l]=J.useState(i==null?void 0:i.picker),[s,u]=J.useState(i==null?void 0:i.format),[c,f]=J.useState(!1),[d,p]=J.useState(!1),m=J.useRef(!1);J.useEffect(()=>{if(r&&!n){const v=da().format("YYYY-MM-DD HH:mm:ss");typeof o=="function"&&o(v);return}},[]);const y=(v,g)=>{m.current=!0,o(g)};return J.useEffect(()=>{switch(l("date"),f(!1),t){case"date":l("date"),u("YYYY-MM-DD"),p(!1);break;case"datetime":f(!0),l("datetime"),u("YYYY-MM-DD HH:mm:ss"),p(!0);break;case"month":l("month"),p(!1);break;case"year":l("year"),p(!1);break}},[t]),Le.jsx(mi,{...i,children:Le.jsx(xx,{locale:Ctt,...i,picker:a,format:s,style:{width:"100%"},onChange:y,value:n&&da(n).isValid()?da(n):void 0,showTime:c,needConfirm:d})})};var xtt={},Iv={},Ege={exports:{}};Ege.exports;(function(e){const n=(i=0)=>a=>`\x1B[${38+i};5;${a}m`,r=(i=0)=>(a,l,s)=>`\x1B[${38+i};2;${a};${l};${s}m`;function o(){const i=new Map,a={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};a.color.gray=a.color.blackBright,a.bgColor.bgGray=a.bgColor.bgBlackBright,a.color.grey=a.color.blackBright,a.bgColor.bgGrey=a.bgColor.bgBlackBright;for(const[l,s]of Object.entries(a)){for(const[u,c]of Object.entries(s))a[u]={open:`\x1B[${c[0]}m`,close:`\x1B[${c[1]}m`},s[u]=a[u],i.set(c[0],c[1]);Object.defineProperty(a,l,{value:s,enumerable:!1})}return Object.defineProperty(a,"codes",{value:i,enumerable:!1}),a.color.close="\x1B[39m",a.bgColor.close="\x1B[49m",a.color.ansi256=n(),a.color.ansi16m=r(),a.bgColor.ansi256=n(10),a.bgColor.ansi16m=r(10),Object.defineProperties(a,{rgbToAnsi256:{value:(l,s,u)=>l===s&&s===u?l<8?16:l>248?231:Math.round((l-8)/247*24)+232:16+36*Math.round(l/255*5)+6*Math.round(s/255*5)+Math.round(u/255*5),enumerable:!1},hexToRgb:{value:l=>{const s=/(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(l.toString(16));if(!s)return[0,0,0];let{colorString:u}=s.groups;u.length===3&&(u=u.split("").map(f=>f+f).join(""));const c=Number.parseInt(u,16);return[c>>16&255,c>>8&255,c&255]},enumerable:!1},hexToAnsi256:{value:l=>a.rgbToAnsi256(...a.hexToRgb(l)),enumerable:!1}}),a}Object.defineProperty(e,"exports",{enumerable:!0,get:o})})(Ege);var Att=Ege.exports,Gv={};Object.defineProperty(Gv,"__esModule",{value:!0});Gv.printIteratorEntries=kzt;Gv.printIteratorValues=Lzt;Gv.printListItems=jzt;Gv.printObjectProperties=_zt;const Bzt=(e,t)=>{const n=Object.keys(e).sort(t);return Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r=>{Object.getOwnPropertyDescriptor(e,r).enumerable&&n.push(r)}),n};function kzt(e,t,n,r,o,i,a=": "){let l="",s=e.next();if(!s.done){l+=t.spacingOuter;const u=n+t.indent;for(;!s.done;){const c=i(s.value[0],t,u,r,o),f=i(s.value[1],t,u,r,o);l+=u+c+a+f,s=e.next(),s.done?t.min||(l+=","):l+=","+t.spacingInner}l+=t.spacingOuter+n}return l}function Lzt(e,t,n,r,o,i){let a="",l=e.next();if(!l.done){a+=t.spacingOuter;const s=n+t.indent;for(;!l.done;)a+=s+i(l.value,t,s,r,o),l=e.next(),l.done?t.min||(a+=","):a+=","+t.spacingInner;a+=t.spacingOuter+n}return a}function jzt(e,t,n,r,o,i){let a="";if(e.length){a+=t.spacingOuter;const l=n+t.indent;for(let s=0;s<e.length;s++)a+=l,s in e&&(a+=i(e[s],t,l,r,o)),s<e.length-1?a+=","+t.spacingInner:t.min||(a+=",");a+=t.spacingOuter+n}return a}function _zt(e,t,n,r,o,i){let a="";const l=Bzt(e,t.compareKeys);if(l.length){a+=t.spacingOuter;const s=n+t.indent;for(let u=0;u<l.length;u++){const c=l[u],f=i(c,t,s,r,o),d=i(e[c],t,s,r,o);a+=s+f+": "+d,u<l.length-1?a+=","+t.spacingInner:t.min||(a+=",")}a+=t.spacingOuter+n}return a}var Kg={};Object.defineProperty(Kg,"__esModule",{value:!0});Kg.test=Kg.serialize=Kg.default=void 0;var tTe=Gv,SB=function(){return typeof globalThis<"u"?globalThis:typeof SB<"u"?SB:typeof self<"u"?self:typeof window<"u"?window:Function("return this")()}(),qG=SB["jest-symbol-do-not-touch"]||SB.Symbol;const Hzt=typeof qG=="function"&&qG.for?qG.for("jest.asymmetricMatcher"):1267621,$6=" ",$tt=(e,t,n,r,o,i)=>{const a=e.toString();return a==="ArrayContaining"||a==="ArrayNotContaining"?++r>t.maxDepth?"["+a+"]":a+$6+"["+(0,tTe.printListItems)(e.sample,t,n,r,o,i)+"]":a==="ObjectContaining"||a==="ObjectNotContaining"?++r>t.maxDepth?"["+a+"]":a+$6+"{"+(0,tTe.printObjectProperties)(e.sample,t,n,r,o,i)+"}":a==="StringMatching"||a==="StringNotMatching"||a==="StringContaining"||a==="StringNotContaining"?a+$6+i(e.sample,t,n,r,o):e.toAsymmetricMatcher()};Kg.serialize=$tt;const Ott=e=>e&&e.$$typeof===Hzt;Kg.test=Ott;const zzt={serialize:$tt,test:Ott};var Vzt=zzt;Kg.default=Vzt;var Gg={},Uzt=({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")};Object.defineProperty(Gg,"__esModule",{value:!0});Gg.test=Gg.serialize=Gg.default=void 0;var Dtt=Ttt(Uzt),Ho=Ttt(Att);function Ttt(e){return e&&e.__esModule?e:{default:e}}const Wzt=e=>e.replace((0,Dtt.default)(),t=>{switch(t){case Ho.default.red.close:case Ho.default.green.close:case Ho.default.cyan.close:case Ho.default.gray.close:case Ho.default.white.close:case Ho.default.yellow.close:case Ho.default.bgRed.close:case Ho.default.bgGreen.close:case Ho.default.bgYellow.close:case Ho.default.inverse.close:case Ho.default.dim.close:case Ho.default.bold.close:case Ho.default.reset.open:case Ho.default.reset.close:return"</>";case Ho.default.red.open:return"<red>";case Ho.default.green.open:return"<green>";case Ho.default.cyan.open:return"<cyan>";case Ho.default.gray.open:return"<gray>";case Ho.default.white.open:return"<white>";case Ho.default.yellow.open:return"<yellow>";case Ho.default.bgRed.open:return"<bgRed>";case Ho.default.bgGreen.open:return"<bgGreen>";case Ho.default.bgYellow.open:return"<bgYellow>";case Ho.default.inverse.open:return"<inverse>";case Ho.default.dim.open:return"<dim>";case Ho.default.bold.open:return"<bold>";default:return""}}),Ptt=e=>typeof e=="string"&&!!e.match((0,Dtt.default)());Gg.test=Ptt;const Rtt=(e,t,n,r,o,i)=>i(Wzt(e),t,n,r,o);Gg.serialize=Rtt;const Kzt={serialize:Rtt,test:Ptt};var Gzt=Kzt;Gg.default=Gzt;var qg={};Object.defineProperty(qg,"__esModule",{value:!0});qg.test=qg.serialize=qg.default=void 0;var nTe=Gv;const qzt=" ",Itt=["DOMStringMap","NamedNodeMap"],Yzt=/^(HTML\w*Collection|NodeList)$/,Xzt=e=>Itt.indexOf(e)!==-1||Yzt.test(e),Ntt=e=>e&&e.constructor&&!!e.constructor.name&&Xzt(e.constructor.name);qg.test=Ntt;const Qzt=e=>e.constructor.name==="NamedNodeMap",Mtt=(e,t,n,r,o,i)=>{const a=e.constructor.name;return++r>t.maxDepth?"["+a+"]":(t.min?"":a+qzt)+(Itt.indexOf(a)!==-1?"{"+(0,nTe.printObjectProperties)(Qzt(e)?Array.from(e).reduce((l,s)=>(l[s.name]=s.value,l),{}):{...e},t,n,r,o,i)+"}":"["+(0,nTe.printListItems)(Array.from(e),t,n,r,o,i)+"]")};qg.serialize=Mtt;const Zzt={serialize:Mtt,test:Ntt};var Jzt=Zzt;qg.default=Jzt;var Yg={},Nl={},Sge={};Object.defineProperty(Sge,"__esModule",{value:!0});Sge.default=eVt;function eVt(e){return e.replace(/</g,"<").replace(/>/g,">")}Object.defineProperty(Nl,"__esModule",{value:!0});Nl.printText=Nl.printProps=Nl.printElementAsLeaf=Nl.printElement=Nl.printComment=Nl.printChildren=void 0;var Ftt=tVt(Sge);function tVt(e){return e&&e.__esModule?e:{default:e}}const nVt=(e,t,n,r,o,i,a)=>{const l=r+n.indent,s=n.colors;return e.map(u=>{const c=t[u];let f=a(c,n,l,o,i);return typeof c!="string"&&(f.indexOf(`
|
417
417
|
`)!==-1&&(f=n.spacingOuter+l+f+n.spacingOuter+r),f="{"+f+"}"),n.spacingInner+r+s.prop.open+u+s.prop.close+"="+s.value.open+f+s.value.close}).join("")};Nl.printProps=nVt;const rVt=(e,t,n,r,o,i)=>e.map(a=>t.spacingOuter+n+(typeof a=="string"?Btt(a,t):i(a,t,n,r,o))).join("");Nl.printChildren=rVt;const Btt=(e,t)=>{const n=t.colors.content;return n.open+(0,Ftt.default)(e)+n.close};Nl.printText=Btt;const oVt=(e,t)=>{const n=t.colors.comment;return n.open+"<!--"+(0,Ftt.default)(e)+"-->"+n.close};Nl.printComment=oVt;const iVt=(e,t,n,r,o)=>{const i=r.colors.tag;return i.open+"<"+e+(t&&i.close+t+r.spacingOuter+o+i.open)+(n?">"+i.close+n+r.spacingOuter+o+i.open+"</"+e:(t&&!r.min?"":" ")+"/")+">"+i.close};Nl.printElement=iVt;const aVt=(e,t)=>{const n=t.colors.tag;return n.open+"<"+e+n.close+" …"+n.open+" />"+n.close};Nl.printElementAsLeaf=aVt;Object.defineProperty(Yg,"__esModule",{value:!0});Yg.test=Yg.serialize=Yg.default=void 0;var pS=Nl;const lVt=1,ktt=3,Ltt=8,jtt=11,sVt=/^((HTML|SVG)\w*)?Element$/,uVt=e=>{try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}},cVt=e=>{const t=e.constructor.name,{nodeType:n,tagName:r}=e,o=typeof r=="string"&&r.includes("-")||uVt(e);return n===lVt&&(sVt.test(t)||o)||n===ktt&&t==="Text"||n===Ltt&&t==="Comment"||n===jtt&&t==="DocumentFragment"},_tt=e=>{var t;return(e==null||(t=e.constructor)===null||t===void 0?void 0:t.name)&&cVt(e)};Yg.test=_tt;function fVt(e){return e.nodeType===ktt}function dVt(e){return e.nodeType===Ltt}function YG(e){return e.nodeType===jtt}const Htt=(e,t,n,r,o,i)=>{if(fVt(e))return(0,pS.printText)(e.data,t);if(dVt(e))return(0,pS.printComment)(e.data,t);const a=YG(e)?"DocumentFragment":e.tagName.toLowerCase();return++r>t.maxDepth?(0,pS.printElementAsLeaf)(a,t):(0,pS.printElement)(a,(0,pS.printProps)(YG(e)?[]:Array.from(e.attributes).map(l=>l.name).sort(),YG(e)?{}:Array.from(e.attributes).reduce((l,s)=>(l[s.name]=s.value,l),{}),t,n+t.indent,r,o,i),(0,pS.printChildren)(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,r,o,i),t,n)};Yg.serialize=Htt;const pVt={serialize:Htt,test:_tt};var vVt=pVt;Yg.default=vVt;var Xg={};Object.defineProperty(Xg,"__esModule",{value:!0});Xg.test=Xg.serialize=Xg.default=void 0;var qP=Gv;const hVt="@@__IMMUTABLE_ITERABLE__@@",gVt="@@__IMMUTABLE_LIST__@@",mVt="@@__IMMUTABLE_KEYED__@@",yVt="@@__IMMUTABLE_MAP__@@",rTe="@@__IMMUTABLE_ORDERED__@@",bVt="@@__IMMUTABLE_RECORD__@@",EVt="@@__IMMUTABLE_SEQ__@@",SVt="@@__IMMUTABLE_SET__@@",CVt="@@__IMMUTABLE_STACK__@@",t2=e=>"Immutable."+e,v_=e=>"["+e+"]",YP=" ",oTe="…",wVt=(e,t,n,r,o,i,a)=>++r>t.maxDepth?v_(t2(a)):t2(a)+YP+"{"+(0,qP.printIteratorEntries)(e.entries(),t,n,r,o,i)+"}";function xVt(e){let t=0;return{next(){if(t<e._keys.length){const n=e._keys[t++];return{done:!1,value:[n,e.get(n)]}}return{done:!0,value:void 0}}}}const AVt=(e,t,n,r,o,i)=>{const a=t2(e._name||"Record");return++r>t.maxDepth?v_(a):a+YP+"{"+(0,qP.printIteratorEntries)(xVt(e),t,n,r,o,i)+"}"},$Vt=(e,t,n,r,o,i)=>{const a=t2("Seq");return++r>t.maxDepth?v_(a):e[mVt]?a+YP+"{"+(e._iter||e._object?(0,qP.printIteratorEntries)(e.entries(),t,n,r,o,i):oTe)+"}":a+YP+"["+(e._iter||e._array||e._collection||e._iterable?(0,qP.printIteratorValues)(e.values(),t,n,r,o,i):oTe)+"]"},XG=(e,t,n,r,o,i,a)=>++r>t.maxDepth?v_(t2(a)):t2(a)+YP+"["+(0,qP.printIteratorValues)(e.values(),t,n,r,o,i)+"]",ztt=(e,t,n,r,o,i)=>e[yVt]?wVt(e,t,n,r,o,i,e[rTe]?"OrderedMap":"Map"):e[gVt]?XG(e,t,n,r,o,i,"List"):e[SVt]?XG(e,t,n,r,o,i,e[rTe]?"OrderedSet":"Set"):e[CVt]?XG(e,t,n,r,o,i,"Stack"):e[EVt]?$Vt(e,t,n,r,o,i):AVt(e,t,n,r,o,i);Xg.serialize=ztt;const Vtt=e=>e&&(e[hVt]===!0||e[bVt]===!0);Xg.test=Vtt;const OVt={serialize:ztt,test:Vtt};var DVt=OVt;Xg.default=DVt;var Qg={},Bie={exports:{}},wo={};/** @license React v17.0.2
|
418
418
|
* react-is.production.min.js
|
419
419
|
*
|
package/dist/index.es.js
CHANGED
@@ -45363,7 +45363,7 @@ const Rtt = /* @__PURE__ */ ts((e, t) => {
|
|
45363
45363
|
fieldsValue: ge,
|
45364
45364
|
initializeFormRender: f,
|
45365
45365
|
recordFieldsChange: b,
|
45366
|
-
shouldUpdateKey:
|
45366
|
+
shouldUpdateKey: N.current[childIndex]
|
45367
45367
|
});
|
45368
45368
|
return U === "show.WithTable" ? /* @__PURE__ */ Le.jsx(Le.Fragment, {
|
45369
45369
|
children: Ce
|
package/package.json
CHANGED
@@ -562,7 +562,7 @@ const FormContainer = forwardRef(({ cols = 1, children, mode = "view" }, ref) =>
|
|
562
562
|
const fieldsValue = getFieldsValue();
|
563
563
|
let element = React.cloneElement(child, {
|
564
564
|
onTableAddRow: handleTableAddRow, onTableRemoveRow: handleTableRemoveRow, form: form, fieldName: identifier, onCustomChange, fieldsValue, initializeFormRender, recordFieldsChange,
|
565
|
-
shouldUpdateKey:
|
565
|
+
shouldUpdateKey: shouldUpdateKey.current[childIndex],
|
566
566
|
})
|
567
567
|
return componentName === "show.WithTable" ? <>{element}</> : <Form.Item
|
568
568
|
style={{ marginBottom: 0 }}
|