formifex 0.3.9 → 0.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -21907,7 +21907,7 @@ const B6 = /* @__PURE__ */ Dl(J2), Cce = (n, e) => {
|
|
|
21907
21907
|
}
|
|
21908
21908
|
for (const N of y) {
|
|
21909
21909
|
const E = N.split("."), T = w == null ? void 0 : w.getFieldValue(E);
|
|
21910
|
-
T != null && T !== "" &&
|
|
21910
|
+
T != null && T !== "" && i.current.add(N);
|
|
21911
21911
|
}
|
|
21912
21912
|
}, 200),
|
|
21913
21913
|
// 200ms debounce delay, same as debounceValidateFields
|
package/dist/index.umd.js
CHANGED
|
@@ -203,7 +203,7 @@ __p += '`),n1&&(fe+=`' +
|
|
|
203
203
|
function print() { __p += __j.call(arguments, '') }
|
|
204
204
|
`:`;
|
|
205
205
|
`)+fe+`return __p
|
|
206
|
-
}`;var qe=oy(function(){return o1(R,Ve+"return "+fe).apply(t,B)});if(qe.source=fe,aa(qe))throw qe;return qe}function Roe(r){return u1(r).toLowerCase()}function Toe(r){return u1(r).toUpperCase()}function Soe(r,o,s){if(r=u1(r),r&&(s||o===t))return pz(r);if(!r||!(o=T4(o)))return r;var p=ct(r),O=ct(o),R=gz(p,O),B=wz(p,O)+1;return Gt(p,R,B).join("")}function Foe(r,o,s){if(r=u1(r),r&&(s||o===t))return r.slice(0,Ez(r)+1);if(!r||!(o=T4(o)))return r;var p=ct(r),O=wz(p,ct(o))+1;return Gt(p,0,O).join("")}function Hoe(r,o,s){if(r=u1(r),r&&(s||o===t))return r.replace(r4,"");if(!r||!(o=T4(o)))return r;var p=ct(r),O=gz(p,ct(o));return Gt(p,O).join("")}function $oe(r,o){var s=G,p=K;if(T1(o)){var O="separator"in o?o.separator:O;s="length"in o?je(o.length):s,p="omission"in o?T4(o.omission):p}r=u1(r);var R=r.length;if(P2(r)){var B=ct(r);R=B.length}if(s>=R)return r;var W=s-k2(p);if(W<1)return p;var X=B?Gt(B,0,W).join(""):r.slice(0,W);if(O===t)return X+p;if(B&&(W+=X.length-W),ia(O)){if(r.slice(W).search(O)){var le,se=X;for(O.global||(O=z0(O.source,u1(i1.exec(O))+"g")),O.lastIndex=0;le=O.exec(se);)var fe=le.index;X=X.slice(0,fe===t?W:fe)}}else if(r.indexOf(T4(O),W)!=W){var we=X.lastIndexOf(O);we>-1&&(X=X.slice(0,we))}return X+p}function _oe(r){return r=u1(r),r&&P1.test(r)?r.replace(vt,u6e):r}var Ioe=K2(function(r,o,s){return r+(s?" ":"")+o.toUpperCase()}),la=lb("toUpperCase");function cy(r,o,s){return r=u1(r),o=s?t:o,o===t?i6e(r)?v6e(r):X8e(r):r.match(o)||[]}var oy=Ke(function(r,o){try{return M4(r,t,o)}catch(s){return aa(s)?s:new Be(s)}}),Loe=xt(function(r,o){return j4(o,function(s){s=pt(s),Vt(r,s,na(r[s],r))}),r});function Doe(r){var o=r==null?0:r.length,s=Te();return r=o?M1(r,function(p){if(typeof p[1]!="function")throw new q4(d);return[s(p[0]),p[1]]}):[],Ke(function(p){for(var O=-1;++O<o;){var R=r[O];if(M4(R[0],this,p))return M4(R[1],this,p)}})}function Boe(r){return u0e(U4(r,w))}function sa(r){return function(){return r}}function Aoe(r,o){return r==null||r!==r?o:r}var Poe=ub(),koe=ub(!0);function y4(r){return r}function ua(r){return Az(typeof r=="function"?r:U4(r,w))}function joe(r){return kz(U4(r,w))}function qoe(r,o){return jz(r,U4(o,w))}var Woe=Ke(function(r,o){return function(s){return j3(s,r,o)}}),Uoe=Ke(function(r,o){return function(s){return j3(r,s,o)}});function da(r,o,s){var p=e4(o),O=Nr(o,p);s==null&&!(T1(o)&&(O.length||!p.length))&&(s=o,o=r,r=this,O=Nr(o,e4(o)));var R=!(T1(s)&&"chain"in s)||!!s.chain,B=Mt(r);return j4(O,function(W){var X=o[W];r[W]=X,B&&(r.prototype[W]=function(){var le=this.__chain__;if(R||le){var se=r(this.__wrapped__),fe=se.__actions__=E4(this.__actions__);return fe.push({func:X,args:arguments,thisArg:r}),se.__chain__=le,se}return X.apply(r,Pt([this.value()],arguments))})}),r}function Goe(){return a4._===this&&(a4._=O6e),this}function fa(){}function Yoe(r){return r=je(r),Ke(function(o){return qz(o,r)})}var Koe=j0(M1),Xoe=j0(dz),Zoe=j0(h0);function ly(r){return X0(r)?m0(pt(r)):C0e(r)}function Qoe(r){return function(o){return r==null?t:u2(r,o)}}var Joe=fb(),ele=fb(!0);function va(){return[]}function ha(){return!1}function tle(){return{}}function nle(){return""}function rle(){return!0}function ale(r,o){if(r=je(r),r<1||r>_)return[];var s=Q,p=u4(r,Q);o=Te(o),r-=Q;for(var O=w0(p,o);++s<r;)o(s);return O}function ile(r){return Ae(r)?M1(r,pt):S4(r)?[r]:E4(Mb(u1(r)))}function cle(r){var o=++g6e;return u1(r)+o}var ole=Sr(function(r,o){return r+o},0),lle=q0("ceil"),sle=Sr(function(r,o){return r/o},1),ule=q0("floor");function dle(r){return r&&r.length?Vr(r,y4,R0):t}function fle(r,o){return r&&r.length?Vr(r,Te(o,2),R0):t}function vle(r){return hz(r,y4)}function hle(r,o){return hz(r,Te(o,2))}function mle(r){return r&&r.length?Vr(r,y4,H0):t}function ple(r,o){return r&&r.length?Vr(r,Te(o,2),H0):t}var gle=Sr(function(r,o){return r*o},1),wle=q0("round"),Ole=Sr(function(r,o){return r-o},0);function Ele(r){return r&&r.length?g0(r,y4):0}function zle(r,o){return r&&r.length?g0(r,Te(o,2)):0}return N.after=jie,N.ary=Bb,N.assign=Tce,N.assignIn=Jb,N.assignInWith=qr,N.assignWith=Sce,N.at=Fce,N.before=Ab,N.bind=na,N.bindAll=Loe,N.bindKey=Pb,N.castArray=tce,N.chain=Ib,N.chunk=uae,N.compact=dae,N.concat=fae,N.cond=Doe,N.conforms=Boe,N.constant=sa,N.countBy=Eie,N.create=Hce,N.curry=kb,N.curryRight=jb,N.debounce=qb,N.defaults=$ce,N.defaultsDeep=_ce,N.defer=qie,N.delay=Wie,N.difference=vae,N.differenceBy=hae,N.differenceWith=mae,N.drop=pae,N.dropRight=gae,N.dropRightWhile=wae,N.dropWhile=Oae,N.fill=Eae,N.filter=bie,N.flatMap=Nie,N.flatMapDeep=xie,N.flatMapDepth=Cie,N.flatten=Fb,N.flattenDeep=zae,N.flattenDepth=bae,N.flip=Uie,N.flow=Poe,N.flowRight=koe,N.fromPairs=yae,N.functions=kce,N.functionsIn=jce,N.groupBy=Mie,N.initial=Nae,N.intersection=xae,N.intersectionBy=Cae,N.intersectionWith=Mae,N.invert=Wce,N.invertBy=Uce,N.invokeMap=Tie,N.iteratee=ua,N.keyBy=Sie,N.keys=e4,N.keysIn=b4,N.map=Dr,N.mapKeys=Yce,N.mapValues=Kce,N.matches=joe,N.matchesProperty=qoe,N.memoize=Ar,N.merge=Xce,N.mergeWith=ey,N.method=Woe,N.methodOf=Uoe,N.mixin=da,N.negate=Pr,N.nthArg=Yoe,N.omit=Zce,N.omitBy=Qce,N.once=Gie,N.orderBy=Fie,N.over=Koe,N.overArgs=Yie,N.overEvery=Xoe,N.overSome=Zoe,N.partial=ra,N.partialRight=Wb,N.partition=Hie,N.pick=Jce,N.pickBy=ty,N.property=ly,N.propertyOf=Qoe,N.pull=Fae,N.pullAll=$b,N.pullAllBy=Hae,N.pullAllWith=$ae,N.pullAt=_ae,N.range=Joe,N.rangeRight=ele,N.rearg=Kie,N.reject=Iie,N.remove=Iae,N.rest=Xie,N.reverse=ea,N.sampleSize=Die,N.set=toe,N.setWith=noe,N.shuffle=Bie,N.slice=Lae,N.sortBy=kie,N.sortedUniq=qae,N.sortedUniqBy=Wae,N.split=Noe,N.spread=Zie,N.tail=Uae,N.take=Gae,N.takeRight=Yae,N.takeRightWhile=Kae,N.takeWhile=Xae,N.tap=die,N.throttle=Qie,N.thru=Lr,N.toArray=Xb,N.toPairs=ny,N.toPairsIn=ry,N.toPath=ile,N.toPlainObject=Qb,N.transform=roe,N.unary=Jie,N.union=Zae,N.unionBy=Qae,N.unionWith=Jae,N.uniq=eie,N.uniqBy=tie,N.uniqWith=nie,N.unset=aoe,N.unzip=ta,N.unzipWith=_b,N.update=ioe,N.updateWith=coe,N.values=Q2,N.valuesIn=ooe,N.without=rie,N.words=cy,N.wrap=ece,N.xor=aie,N.xorBy=iie,N.xorWith=cie,N.zip=oie,N.zipObject=lie,N.zipObjectDeep=sie,N.zipWith=uie,N.entries=ny,N.entriesIn=ry,N.extend=Jb,N.extendWith=qr,da(N,N),N.add=ole,N.attempt=oy,N.camelCase=doe,N.capitalize=ay,N.ceil=lle,N.clamp=loe,N.clone=nce,N.cloneDeep=ace,N.cloneDeepWith=ice,N.cloneWith=rce,N.conformsTo=cce,N.deburr=iy,N.defaultTo=Aoe,N.divide=sle,N.endsWith=foe,N.eq=lt,N.escape=voe,N.escapeRegExp=hoe,N.every=zie,N.find=yie,N.findIndex=Tb,N.findKey=Ice,N.findLast=Vie,N.findLastIndex=Sb,N.findLastKey=Lce,N.floor=ule,N.forEach=Lb,N.forEachRight=Db,N.forIn=Dce,N.forInRight=Bce,N.forOwn=Ace,N.forOwnRight=Pce,N.get=ca,N.gt=oce,N.gte=lce,N.has=qce,N.hasIn=oa,N.head=Hb,N.identity=y4,N.includes=Rie,N.indexOf=Vae,N.inRange=soe,N.invoke=Gce,N.isArguments=v2,N.isArray=Ae,N.isArrayBuffer=sce,N.isArrayLike=z4,N.isArrayLikeObject=L1,N.isBoolean=uce,N.isBuffer=Yt,N.isDate=dce,N.isElement=fce,N.isEmpty=vce,N.isEqual=hce,N.isEqualWith=mce,N.isError=aa,N.isFinite=pce,N.isFunction=Mt,N.isInteger=Ub,N.isLength=kr,N.isMap=Gb,N.isMatch=gce,N.isMatchWith=wce,N.isNaN=Oce,N.isNative=Ece,N.isNil=bce,N.isNull=zce,N.isNumber=Yb,N.isObject=T1,N.isObjectLike=H1,N.isPlainObject=K3,N.isRegExp=ia,N.isSafeInteger=yce,N.isSet=Kb,N.isString=jr,N.isSymbol=S4,N.isTypedArray=Z2,N.isUndefined=Vce,N.isWeakMap=Nce,N.isWeakSet=xce,N.join=Rae,N.kebabCase=moe,N.last=Y4,N.lastIndexOf=Tae,N.lowerCase=poe,N.lowerFirst=goe,N.lt=Cce,N.lte=Mce,N.max=dle,N.maxBy=fle,N.mean=vle,N.meanBy=hle,N.min=mle,N.minBy=ple,N.stubArray=va,N.stubFalse=ha,N.stubObject=tle,N.stubString=nle,N.stubTrue=rle,N.multiply=gle,N.nth=Sae,N.noConflict=Goe,N.noop=fa,N.now=Br,N.pad=woe,N.padEnd=Ooe,N.padStart=Eoe,N.parseInt=zoe,N.random=uoe,N.reduce=$ie,N.reduceRight=_ie,N.repeat=boe,N.replace=yoe,N.result=eoe,N.round=wle,N.runInContext=Y,N.sample=Lie,N.size=Aie,N.snakeCase=Voe,N.some=Pie,N.sortedIndex=Dae,N.sortedIndexBy=Bae,N.sortedIndexOf=Aae,N.sortedLastIndex=Pae,N.sortedLastIndexBy=kae,N.sortedLastIndexOf=jae,N.startCase=xoe,N.startsWith=Coe,N.subtract=Ole,N.sum=Ele,N.sumBy=zle,N.template=Moe,N.times=ale,N.toFinite=Rt,N.toInteger=je,N.toLength=Zb,N.toLower=Roe,N.toNumber=K4,N.toSafeInteger=Rce,N.toString=u1,N.toUpper=Toe,N.trim=Soe,N.trimEnd=Foe,N.trimStart=Hoe,N.truncate=$oe,N.unescape=_oe,N.uniqueId=cle,N.upperCase=Ioe,N.upperFirst=la,N.each=Lb,N.eachRight=Db,N.first=Hb,da(N,function(){var r={};return ht(N,function(o,s){f1.call(N.prototype,s)||(r[s]=o)}),r}(),{chain:!1}),N.VERSION=i,j4(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){N[r].placeholder=N}),j4(["drop","take"],function(r,o){t1.prototype[r]=function(s){s=s===t?1:K1(je(s),0);var p=this.__filtered__&&!o?new t1(this):this.clone();return p.__filtered__?p.__takeCount__=u4(s,p.__takeCount__):p.__views__.push({size:u4(s,Q),type:r+(p.__dir__<0?"Right":"")}),p},t1.prototype[r+"Right"]=function(s){return this.reverse()[r](s).reverse()}}),j4(["filter","map","takeWhile"],function(r,o){var s=o+1,p=s==j||s==D;t1.prototype[r]=function(O){var R=this.clone();return R.__iteratees__.push({iteratee:Te(O,3),type:s}),R.__filtered__=R.__filtered__||p,R}}),j4(["head","last"],function(r,o){var s="take"+(o?"Right":"");t1.prototype[r]=function(){return this[s](1).value()[0]}}),j4(["initial","tail"],function(r,o){var s="drop"+(o?"":"Right");t1.prototype[r]=function(){return this.__filtered__?new t1(this):this[s](1)}}),t1.prototype.compact=function(){return this.filter(y4)},t1.prototype.find=function(r){return this.filter(r).head()},t1.prototype.findLast=function(r){return this.reverse().find(r)},t1.prototype.invokeMap=Ke(function(r,o){return typeof r=="function"?new t1(this):this.map(function(s){return j3(s,r,o)})}),t1.prototype.reject=function(r){return this.filter(Pr(Te(r)))},t1.prototype.slice=function(r,o){r=je(r);var s=this;return s.__filtered__&&(r>0||o<0)?new t1(s):(r<0?s=s.takeRight(-r):r&&(s=s.drop(r)),o!==t&&(o=je(o),s=o<0?s.dropRight(-o):s.take(o-r)),s)},t1.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},t1.prototype.toArray=function(){return this.take(Q)},ht(t1.prototype,function(r,o){var s=/^(?:filter|find|map|reject)|While$/.test(o),p=/^(?:head|last)$/.test(o),O=N[p?"take"+(o=="last"?"Right":""):o],R=p||/^find/.test(o);O&&(N.prototype[o]=function(){var B=this.__wrapped__,W=p?[1]:arguments,X=B instanceof t1,le=W[0],se=X||Ae(B),fe=function(Je){var n1=O.apply(N,Pt([Je],W));return p&&we?n1[0]:n1};se&&s&&typeof le=="function"&&le.length!=1&&(X=se=!1);var we=this.__chain__,Ve=!!this.__actions__.length,Se=R&&!we,qe=X&&!Ve;if(!R&&se){B=qe?B:new t1(this);var Fe=r.apply(B,W);return Fe.__actions__.push({func:Lr,args:[fe],thisArg:t}),new W4(Fe,we)}return Se&&qe?r.apply(this,W):(Fe=this.thru(fe),Se?p?Fe.value()[0]:Fe.value():Fe)})}),j4(["pop","push","shift","sort","splice","unshift"],function(r){var o=sr[r],s=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",p=/^(?:pop|shift)$/.test(r);N.prototype[r]=function(){var O=arguments;if(p&&!this.__chain__){var R=this.value();return o.apply(Ae(R)?R:[],O)}return this[s](function(B){return o.apply(Ae(B)?B:[],O)})}}),ht(t1.prototype,function(r,o){var s=N[o];if(s){var p=s.name+"";f1.call(U2,p)||(U2[p]=[]),U2[p].push({name:o,func:s})}}),U2[Tr(t,S).name]=[{name:"wrapper",func:t}],t1.prototype.clone=_6e,t1.prototype.reverse=I6e,t1.prototype.value=L6e,N.prototype.at=fie,N.prototype.chain=vie,N.prototype.commit=hie,N.prototype.next=mie,N.prototype.plant=gie,N.prototype.reverse=wie,N.prototype.toJSON=N.prototype.valueOf=N.prototype.value=Oie,N.prototype.first=N.prototype.head,I3&&(N.prototype[I3]=pie),N},j2=h6e();i2?((i2.exports=j2)._=j2,u0._=j2):a4._=j2}).call(P3e)}(b3,b3.exports)),b3.exports}var H2=k3e();const D6=ma(H2),j3e=(n,e)=>{const t=n.field.split("."),i=e==null?void 0:e.getFieldValue(t),c=n.value,l=n.operator||"=";if(!c)return Array.isArray(i)?i.length>0:!!i;const v={"=":()=>Array.isArray(c)?c.includes(i):i===c,"!=":()=>Array.isArray(c)?!c.includes(i):i!==c,">":()=>i>c,"<":()=>i<c,">=":()=>i>=c,"<=":()=>i<=c,includes:()=>Array.isArray(i)?Array.isArray(c)?i.some(h=>c.includes(h)):i.includes(c):typeof i=="string"?Array.isArray(c)?c.some(h=>i.includes(h)):i.includes(c):!1}[l];return v?v():!1},q3e=n=>{var x,E,S,F;let e=(x=n==null?void 0:n.id)==null?void 0:x.split("."),t=ue.Form.useWatch(e,n.formRef);const[i,c]=y.useState(!!n.lookupFetcher),l={textarea:LM,string:py,number:AM,color:$3e,date:Co,datetime:Co,time:D3e,checkbox:DM,switch:BM,select:H3e,password:_3e,radio:I3e,rate:L3e,slider:B3e,upload:A3e};async function d(){var $,T;if(n.lookupFetcher&&n.lookupKey){n.pendingLookupsRef&&n.pendingLookupsRef.current++,c(!0);try{const b=await(($=n.lookupFetcher)==null?void 0:$.call(n,n))||[];(T=n.updateLookupData)==null||T.call(n,n.lookupKey||"",b)}finally{c(!1),n.pendingLookupsRef&&n.pendingLookupsRef.current--}}}const v=["select","checkbox","radio","upload"],h=(n.enableWhen||[]).reduce(($,T)=>{var b;if(typeof T!="function"&&(T!=null&&T.field)){const I=(b=T==null?void 0:T.field)==null?void 0:b.split(".");$[T==null?void 0:T.field]=ue.Form.useWatch(I,n.formRef)}return $},{}),m=y.useRef({}),g=y.useRef(!1);y.useEffect(()=>{var $;($=n.suppressionRef)!=null&&$.current&&(g.current=!1,m.current={})},[(E=n.suppressionRef)==null?void 0:E.current]);const w=H2.debounce(()=>{var b,I,H,k;const $=m.current;if(!g.current&&!((b=n.suppressionRef)!=null&&b.current)){g.current=!0,m.current={...h};return}if((I=n.suppressionRef)!=null&&I.current)return;const T=Object.keys(h).filter(P=>$[P]!==h[P]);if(m.current={...h},T.length>0){let P=(H=n==null?void 0:n.id)==null?void 0:H.split(".");const G=n.resetOnDependencyChange??!1,K=n.resetOnDependencyEmpty??!0;if(n.enableWhen&&((k=n==null?void 0:n.enableWhen)==null?void 0:k.length)>0){let te=n.formRef;(te&&K&&(T!=null&&T.some(U=>{var j;if((j=n.resetIgnoreFields)!=null&&j.includes(U))return!1;{let ee=U==null?void 0:U.split("."),D=te==null?void 0:te.getFieldValue(ee);return Array.isArray(D)?D.length==0:!D}}))||te&&G&&(T!=null&&T.some(U=>{var j;return!((j=n.resetIgnoreFields)!=null&&j.includes(U))})))&&te.setFieldValue(P,void 0)}}},200),z=H2.debounce(d,200);y.useEffect(()=>(z(),w(),()=>{z.cancel(),w.cancel()}),[...((S=n.enableWhen)==null?void 0:S.map($=>{if(typeof $!="function")return h[$==null?void 0:$.field]}))||[]]);const V=$=>{if(!$||($==null?void 0:$.length)==0)return!1;{let T=n.formRef;return!$.every(b=>typeof b!="function"?b.evaluate&&typeof b.evaluate=="function"?b.evaluate(n):b!=null&&b.field?j3e(b,T):!0:b(n))}};return y.useMemo(()=>{var I;const $=l==null?void 0:l[n.inputType];let T=(I=n==null?void 0:n.id)==null?void 0:I.split("."),b={...n};return v.includes(n.inputType)?b.suppressionRef=n.suppressionRef:(b==null||delete b.lookupData,b==null||delete b.initialData,b==null||delete b.httpAgent,b==null||delete b.form),typeof(b==null?void 0:b.addonBefore)=="function"&&(b.addonBefore=b.addonBefore(n)),typeof(b==null?void 0:b.addonAfter)=="function"&&(b.addonAfter=b.addonAfter(n)),b==null||delete b.resetOnDependencyChange,b==null||delete b.resetOnDependencyEmpty,b==null||delete b.inputType,b==null||delete b.dataType,b==null||delete b.input,b==null||delete b.enableWhen,n.inputType==="hidden"?A.jsx(ue.Form.Item,{name:T,noStyle:!0}):$?A.jsx(ue.Form.Item,{colon:typeof n.colon=="boolean"?n.colon:!0,className:n.wrapperClassName,style:{...n.wrapperStyle,...n.readOnly?{pointerEvents:"none"}:{}},label:typeof n.label=="function"?n.label(b):n.label,name:T,tooltip:n.tooltip,rules:[{required:n.required,message:n.defaultErrorMessage??`${n.label} is required`},...n.validators??[]],getValueProps:H=>(n.inputType==="date"&&X3(H).isValid()&&H&&(H=X3(H)),{value:H}),layout:n.layout??void 0,...n.inputType==="upload"?{valuePropName:"fileList",getValueFromEvent:H=>H.fileList}:{},...n.inputType==="color"?{getValueFromEvent:H=>H.toHexString()}:{},...["string","textarea"].includes(n.inputType)?{normalize:H=>H==null?void 0:H.trimStart()}:{},children:A.jsx($,{loading:i,...b,form:n.formRef,data:t,disabled:n.disabled||V(n.enableWhen)})}):A.jsxs("div",{children:["Unknown Input Type - ",n.inputType]})},[n.id,t,n.lookupData,n.readOnly,n.disabled,i,...((F=n.enableWhen)==null?void 0:F.map($=>{if(typeof $!="function")return h[$==null?void 0:$.field]}))||[]])},W3e=({children:n=[],label:e="",id:t="",className:i="",style:c={},section_id:l="",wrapperClassName:d="",wrapperStyle:v={},collapsible:h=!0,labelPlacement:m="start",labelMargin:g=0,showHeader:w=!0,showDivider:z=!0,expandIcon:V=null,collapseIcon:C=null,tooltip:x=null,...E})=>{var k;const[S,F]=y.useState(!0),[$,T]=y.useState("auto"),b=y.useRef(null);y.useEffect(()=>{if(!b.current)return;const P=()=>{b.current&&T(`${b.current.scrollHeight}px`)};P();const G=new ResizeObserver(()=>{P()});G.observe(b.current);const K=new MutationObserver(()=>{setTimeout(P,0)});return K.observe(b.current,{childList:!0,subtree:!0,attributes:!0}),()=>{G.disconnect(),K.disconnect()}},[]);const I={maxHeight:S?$:"0px",overflow:"hidden",transition:"max-height 0.3s ease-in-out",opacity:S?1:0,transform:`translateY(${S?"0":"-10px"})`},H=P=>A.jsxs("div",{className:`antd-form-section-wrapper ${d}`,style:{...v},children:[w&&(z?A.jsx(ue.Divider,{orientation:m,orientationMargin:g,className:i,children:A.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",...c},children:[h&&A.jsx(A.Fragment,{children:V&&C?A.jsx("div",{style:h?{transition:"transform 0.3s ease-in-out",cursor:"pointer"}:{},onClick:()=>h&&F(!S),children:S?V:C}):A.jsx("div",{style:h?{transform:`rotate(${S?"0deg":"-90deg"})`,transition:"transform 0.3s ease-in-out",cursor:"pointer"}:{},onClick:()=>h&&F(!S),children:A.jsx(_n,{})})}),A.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[" ",A.jsx("span",{style:h?{cursor:"pointer"}:{},onClick:()=>h&&F(!S),children:e}),x&&A.jsx(ue.Tooltip,{title:x,children:A.jsx(F6,{style:{opacity:.5}})})]})]})}):A.jsxs("div",{className:i,style:{margin:"16px 0",display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",...c},children:[h&&A.jsx(A.Fragment,{children:V&&C?A.jsx("div",{style:h?{transition:"transform 0.3s ease-in-out",cursor:"pointer"}:{},onClick:()=>h&&F(!S),children:S?V:C}):A.jsx("div",{style:h?{transform:`rotate(${S?"0deg":"-90deg"})`,transition:"transform 0.3s ease-in-out",cursor:"pointer"}:{},onClick:()=>h&&F(!S),children:A.jsx(_n,{})})}),A.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[" ",A.jsx("span",{style:h?{cursor:"pointer"}:{},onClick:()=>h&&F(!S),children:e}),x&&A.jsx(ue.Tooltip,{title:x,children:A.jsx(R6,{style:{opacity:.5}})})]})]})),A.jsx("div",{style:I,children:A.jsx("div",{ref:b,children:A.jsx(Dn,{...E,items:P},t)})})]});if(l){const P=(k=E.sections)==null?void 0:k.find(G=>G.id===l);if(P)return H((P==null?void 0:P.items)||[])}else if(n&&n.length>0)return H(n);return A.jsx(A.Fragment,{})},kO=(n,e)=>{const t=n.field.split("."),i=e==null?void 0:e.getFieldValue(t),c=n.value,l=n.operator||"=";if(!c)return Array.isArray(i)?i.length>0:!!i;const v={"=":()=>Array.isArray(c)?c.includes(i):i===c,"!=":()=>Array.isArray(c)?!c.includes(i):i!==c,">":()=>i>c,"<":()=>i<c,">=":()=>i>=c,"<=":()=>i<=c,includes:()=>Array.isArray(i)?Array.isArray(c)?i.some(h=>c.includes(h)):i.includes(c):typeof i=="string"?Array.isArray(c)?c.some(h=>i.includes(h)):i.includes(c):!1}[l];return v?v():!1},U3e=(n,e)=>{const t=n.displayWhen;return t?t.every(i=>i!=null&&i.field?typeof i!="function"?i.evaluate&&typeof i.evaluate=="function"?i.evaluate({formRef:e}):kO(i,e):i({formRef:e}):!0):!0},jO=n=>{const e=[];for(const t of n)t.displayWhen&&e.push(t),"children"in t&&Array.isArray(t.children)&&e.push(...jO(t.children));return e},Dn=n=>{var m;const e=((m=n==null?void 0:n.items)==null?void 0:m.sort((g,w)=>(g.sequence??9999)-(w.sequence??9999)))??[],t=ue.Form.useWatch([],n.formRef),i=y.useRef(new Set),c=y.useRef(new Map),l=y.useRef(e),d=y.useRef(n.formRef),v=y.useRef(n.suppressionRef);y.useEffect(()=>{l.current=e,d.current=n.formRef,v.current=n.suppressionRef},[e,n.formRef,n.suppressionRef]);const h=y.useMemo(()=>H2.debounce(()=>{var C;if(console.log("debouncedHandleHiddenFields"),(C=v.current)!=null&&C.current)return;const g=l.current,w=d.current,z=jO(g),V=[];for(const x of z){const E=x.id;if(!E)continue;const S=x.key||E,F=U3e(x,w),$=c.current.get(S);if(c.current.set(S,F),!F&&$!==!1){const T=E.split("."),b=w==null?void 0:w.getFieldValue(T);b!=null&&b!==""&&V.push(E)}else F&&i.current.delete(E)}for(const x of V){const E=x.split("."),S=w==null?void 0:w.getFieldValue(E);S!=null&&S!==""&&(w==null||w.setFieldValue(E,void 0),i.current.add(x))}},200),[]);return y.useEffect(()=>(h(),()=>{h.cancel()}),[t,h]),A.jsx(A.Fragment,{children:e.map(({displayWhen:g,...w})=>{if(g&&!g.every(z=>z!=null&&z.field?typeof z!="function"?z.evaluate&&typeof z.evaluate=="function"?z.evaluate(n):kO(z,n.formRef):z(n):!0))return null;if("dataType"in w&&w.type==="input")return A.jsx(q3e,{initialData:n.initialData,resetOnDependencyChange:n.resetOnDependencyChange,resetOnDependencyEmpty:n.resetOnDependencyEmpty,disabled:n.disabled,readOnly:n.readOnly,...w,formRef:n.formRef,httpAgent:n.httpAgent,lookupData:n.lookupData,suppressionRef:n.suppressionRef,pendingLookupsRef:n.pendingLookupsRef,updateLookupData:n.updateLookupData},w.key||w.id);if(w.type==="section")return A.jsx(W3e,{...n,...w});if(w.type==="grid")return A.jsx(my,{...n,...w},w.key||w.id);if(w.type==="flex")return A.jsx(hy,{...n,...w},w.key||w.id);if(w.type==="divider")return A.jsx(ue.Divider,{...w,type:w.orientation||"horizontal",orientation:w.labelPlacement||"center",dashed:w.dashed,children:w.label},w.key||w.id);if(w.type==="custom"&&typeof(w==null?void 0:w.render)=="function")return w.render(n)})})},qO=n=>typeof n=="object"&&n!=null&&n.nodeType===1,WO=(n,e)=>(!e||n!=="hidden")&&n!=="visible"&&n!=="clip",Bn=(n,e)=>{if(n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){const t=getComputedStyle(n,null);return WO(t.overflowY,e)||WO(t.overflowX,e)||(i=>{const c=(l=>{if(!l.ownerDocument||!l.ownerDocument.defaultView)return null;try{return l.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!c&&(c.clientHeight<i.scrollHeight||c.clientWidth<i.scrollWidth)})(n)}return!1},An=(n,e,t,i,c,l,d,v)=>l<n&&d>e||l>n&&d<e?0:l<=n&&v<=t||d>=e&&v>=t?l-n-i:d>e&&v<t||l<n&&v>t?d-e+c:0,G3e=n=>{const e=n.parentElement;return e??(n.getRootNode().host||null)},UO=(n,e)=>{var t,i,c,l;if(typeof document>"u")return[];const{scrollMode:d,block:v,inline:h,boundary:m,skipOverflowHiddenElements:g}=e,w=typeof m=="function"?m:D=>D!==m;if(!qO(n))throw new TypeError("Invalid target");const z=document.scrollingElement||document.documentElement,V=[];let C=n;for(;qO(C)&&w(C);){if(C=G3e(C),C===z){V.push(C);break}C!=null&&C===document.body&&Bn(C)&&!Bn(document.documentElement)||C!=null&&Bn(C,g)&&V.push(C)}const x=(i=(t=window.visualViewport)==null?void 0:t.width)!=null?i:innerWidth,E=(l=(c=window.visualViewport)==null?void 0:c.height)!=null?l:innerHeight,{scrollX:S,scrollY:F}=window,{height:$,width:T,top:b,right:I,bottom:H,left:k}=n.getBoundingClientRect(),{top:P,right:G,bottom:K,left:te}=(D=>{const M=window.getComputedStyle(D);return{top:parseFloat(M.scrollMarginTop)||0,right:parseFloat(M.scrollMarginRight)||0,bottom:parseFloat(M.scrollMarginBottom)||0,left:parseFloat(M.scrollMarginLeft)||0}})(n);let U=v==="start"||v==="nearest"?b-P:v==="end"?H+K:b+$/2-P+K,j=h==="center"?k+T/2-te+G:h==="end"?I+G:k-te;const ee=[];for(let D=0;D<V.length;D++){const M=V[D],{height:_,width:q,top:J,right:Q,bottom:ie,left:oe}=M.getBoundingClientRect();if(d==="if-needed"&&b>=0&&k>=0&&H<=E&&I<=x&&(M===z&&!Bn(M)||b>=J&&H<=ie&&k>=oe&&I<=Q))return ee;const de=getComputedStyle(M),Oe=parseInt(de.borderLeftWidth,10),me=parseInt(de.borderTopWidth,10),ye=parseInt(de.borderRightWidth,10),he=parseInt(de.borderBottomWidth,10);let be=0,pe=0;const Ne="offsetWidth"in M?M.offsetWidth-M.clientWidth-Oe-ye:0,Me="offsetHeight"in M?M.offsetHeight-M.clientHeight-me-he:0,De="offsetWidth"in M?M.offsetWidth===0?0:q/M.offsetWidth:0,ve="offsetHeight"in M?M.offsetHeight===0?0:_/M.offsetHeight:0;if(z===M)be=v==="start"?U:v==="end"?U-E:v==="nearest"?An(F,F+E,E,me,he,F+U,F+U+$,$):U-E/2,pe=h==="start"?j:h==="center"?j-x/2:h==="end"?j-x:An(S,S+x,x,Oe,ye,S+j,S+j+T,T),be=Math.max(0,be+F),pe=Math.max(0,pe+S);else{be=v==="start"?U-J-me:v==="end"?U-ie+he+Me:v==="nearest"?An(J,ie,_,me,he+Me,U,U+$,$):U-(J+_/2)+Me/2,pe=h==="start"?j-oe-Oe:h==="center"?j-(oe+q/2)+Ne/2:h==="end"?j-Q+ye+Ne:An(oe,Q,q,Oe,ye+Ne,j,j+T,T);const{scrollLeft:Pe,scrollTop:ze}=M;be=ve===0?0:Math.max(0,Math.min(ze+be/ve,M.scrollHeight-_/ve+Me)),pe=De===0?0:Math.max(0,Math.min(Pe+pe/De,M.scrollWidth-q/De+Ne)),U+=ze-be,j+=Pe-pe}ee.push({el:M,top:be,left:pe})}return ee},Y3e=n=>n===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(n)?n:{block:"start",inline:"nearest"};function K3e(n,e){if(!n.isConnected||!(c=>{let l=c;for(;l&&l.parentNode;){if(l.parentNode===document)return!0;l=l.parentNode instanceof ShadowRoot?l.parentNode.host:l.parentNode}return!1})(n))return;const t=(c=>{const l=window.getComputedStyle(c);return{top:parseFloat(l.scrollMarginTop)||0,right:parseFloat(l.scrollMarginRight)||0,bottom:parseFloat(l.scrollMarginBottom)||0,left:parseFloat(l.scrollMarginLeft)||0}})(n);if((c=>typeof c=="object"&&typeof c.behavior=="function")(e))return e.behavior(UO(n,e));const i=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:c,top:l,left:d}of UO(n,Y3e(e))){const v=l-t.top+t.bottom,h=d-t.left+t.right;c.scroll({top:v,left:h,behavior:i})}}const X3e=["parentNode"],Z3e="form_item";function GO(n){return n===void 0||n===!1?[]:Array.isArray(n)?n:[n]}function Q3e(n,e){if(!n.length)return;const t=n.join("_");return e?`${e}_${t}`:X3e.includes(t)?`${Z3e}_${t}`:t}var J3e=function(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,i=Object.getOwnPropertySymbols(n);c<i.length;c++)e.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(n,i[c])&&(t[i[c]]=n[i[c]]);return t};function YO(n){return GO(n).join("_")}function KO(n,e){const t=e.getFieldInstance(n),i=Ia(t);if(i)return i;const c=Q3e(GO(n),e.__INTERNAL__.name);if(c)return document.getElementById(c)}function XO(n){const[e]=v6(),t=a.useRef({}),i=a.useMemo(()=>n??Object.assign(Object.assign({},e),{__INTERNAL__:{itemRef:c=>l=>{const d=YO(c);l?t.current[d]=l:delete t.current[d]}},scrollToField:(c,l={})=>{const{focus:d}=l,v=J3e(l,["focus"]),h=KO(c,i);h&&(K3e(h,Object.assign({scrollMode:"if-needed",block:"nearest"},v)),d&&i.focusField(c))},focusField:c=>{var l,d;const v=i.getFieldInstance(c);typeof(v==null?void 0:v.focus)=="function"?v.focus():(d=(l=KO(c,i))===null||l===void 0?void 0:l.focus)===null||d===void 0||d.call(l)},getFieldInstance:c=>{const l=YO(c);return t.current[l]}}),[n,e]);return[i]}const Pn={};function ene({name:n}){const e=St("Form");a.useEffect(()=>{if(n)return Pn[n]=(Pn[n]||0)+1,process.env.NODE_ENV!=="production"&&e(Pn[n]<=1,"usage","There exist multiple Form with same `name`."),()=>{Pn[n]-=1}},[n])}const tne=n=>({[n.componentCls]:{[`${n.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${n.motionDurationMid} ${n.motionEaseInOut},
|
|
206
|
+
}`;var qe=oy(function(){return o1(R,Ve+"return "+fe).apply(t,B)});if(qe.source=fe,aa(qe))throw qe;return qe}function Roe(r){return u1(r).toLowerCase()}function Toe(r){return u1(r).toUpperCase()}function Soe(r,o,s){if(r=u1(r),r&&(s||o===t))return pz(r);if(!r||!(o=T4(o)))return r;var p=ct(r),O=ct(o),R=gz(p,O),B=wz(p,O)+1;return Gt(p,R,B).join("")}function Foe(r,o,s){if(r=u1(r),r&&(s||o===t))return r.slice(0,Ez(r)+1);if(!r||!(o=T4(o)))return r;var p=ct(r),O=wz(p,ct(o))+1;return Gt(p,0,O).join("")}function Hoe(r,o,s){if(r=u1(r),r&&(s||o===t))return r.replace(r4,"");if(!r||!(o=T4(o)))return r;var p=ct(r),O=gz(p,ct(o));return Gt(p,O).join("")}function $oe(r,o){var s=G,p=K;if(T1(o)){var O="separator"in o?o.separator:O;s="length"in o?je(o.length):s,p="omission"in o?T4(o.omission):p}r=u1(r);var R=r.length;if(P2(r)){var B=ct(r);R=B.length}if(s>=R)return r;var W=s-k2(p);if(W<1)return p;var X=B?Gt(B,0,W).join(""):r.slice(0,W);if(O===t)return X+p;if(B&&(W+=X.length-W),ia(O)){if(r.slice(W).search(O)){var le,se=X;for(O.global||(O=z0(O.source,u1(i1.exec(O))+"g")),O.lastIndex=0;le=O.exec(se);)var fe=le.index;X=X.slice(0,fe===t?W:fe)}}else if(r.indexOf(T4(O),W)!=W){var we=X.lastIndexOf(O);we>-1&&(X=X.slice(0,we))}return X+p}function _oe(r){return r=u1(r),r&&P1.test(r)?r.replace(vt,u6e):r}var Ioe=K2(function(r,o,s){return r+(s?" ":"")+o.toUpperCase()}),la=lb("toUpperCase");function cy(r,o,s){return r=u1(r),o=s?t:o,o===t?i6e(r)?v6e(r):X8e(r):r.match(o)||[]}var oy=Ke(function(r,o){try{return M4(r,t,o)}catch(s){return aa(s)?s:new Be(s)}}),Loe=xt(function(r,o){return j4(o,function(s){s=pt(s),Vt(r,s,na(r[s],r))}),r});function Doe(r){var o=r==null?0:r.length,s=Te();return r=o?M1(r,function(p){if(typeof p[1]!="function")throw new q4(d);return[s(p[0]),p[1]]}):[],Ke(function(p){for(var O=-1;++O<o;){var R=r[O];if(M4(R[0],this,p))return M4(R[1],this,p)}})}function Boe(r){return u0e(U4(r,w))}function sa(r){return function(){return r}}function Aoe(r,o){return r==null||r!==r?o:r}var Poe=ub(),koe=ub(!0);function y4(r){return r}function ua(r){return Az(typeof r=="function"?r:U4(r,w))}function joe(r){return kz(U4(r,w))}function qoe(r,o){return jz(r,U4(o,w))}var Woe=Ke(function(r,o){return function(s){return j3(s,r,o)}}),Uoe=Ke(function(r,o){return function(s){return j3(r,s,o)}});function da(r,o,s){var p=e4(o),O=Nr(o,p);s==null&&!(T1(o)&&(O.length||!p.length))&&(s=o,o=r,r=this,O=Nr(o,e4(o)));var R=!(T1(s)&&"chain"in s)||!!s.chain,B=Mt(r);return j4(O,function(W){var X=o[W];r[W]=X,B&&(r.prototype[W]=function(){var le=this.__chain__;if(R||le){var se=r(this.__wrapped__),fe=se.__actions__=E4(this.__actions__);return fe.push({func:X,args:arguments,thisArg:r}),se.__chain__=le,se}return X.apply(r,Pt([this.value()],arguments))})}),r}function Goe(){return a4._===this&&(a4._=O6e),this}function fa(){}function Yoe(r){return r=je(r),Ke(function(o){return qz(o,r)})}var Koe=j0(M1),Xoe=j0(dz),Zoe=j0(h0);function ly(r){return X0(r)?m0(pt(r)):C0e(r)}function Qoe(r){return function(o){return r==null?t:u2(r,o)}}var Joe=fb(),ele=fb(!0);function va(){return[]}function ha(){return!1}function tle(){return{}}function nle(){return""}function rle(){return!0}function ale(r,o){if(r=je(r),r<1||r>_)return[];var s=Q,p=u4(r,Q);o=Te(o),r-=Q;for(var O=w0(p,o);++s<r;)o(s);return O}function ile(r){return Ae(r)?M1(r,pt):S4(r)?[r]:E4(Mb(u1(r)))}function cle(r){var o=++g6e;return u1(r)+o}var ole=Sr(function(r,o){return r+o},0),lle=q0("ceil"),sle=Sr(function(r,o){return r/o},1),ule=q0("floor");function dle(r){return r&&r.length?Vr(r,y4,R0):t}function fle(r,o){return r&&r.length?Vr(r,Te(o,2),R0):t}function vle(r){return hz(r,y4)}function hle(r,o){return hz(r,Te(o,2))}function mle(r){return r&&r.length?Vr(r,y4,H0):t}function ple(r,o){return r&&r.length?Vr(r,Te(o,2),H0):t}var gle=Sr(function(r,o){return r*o},1),wle=q0("round"),Ole=Sr(function(r,o){return r-o},0);function Ele(r){return r&&r.length?g0(r,y4):0}function zle(r,o){return r&&r.length?g0(r,Te(o,2)):0}return N.after=jie,N.ary=Bb,N.assign=Tce,N.assignIn=Jb,N.assignInWith=qr,N.assignWith=Sce,N.at=Fce,N.before=Ab,N.bind=na,N.bindAll=Loe,N.bindKey=Pb,N.castArray=tce,N.chain=Ib,N.chunk=uae,N.compact=dae,N.concat=fae,N.cond=Doe,N.conforms=Boe,N.constant=sa,N.countBy=Eie,N.create=Hce,N.curry=kb,N.curryRight=jb,N.debounce=qb,N.defaults=$ce,N.defaultsDeep=_ce,N.defer=qie,N.delay=Wie,N.difference=vae,N.differenceBy=hae,N.differenceWith=mae,N.drop=pae,N.dropRight=gae,N.dropRightWhile=wae,N.dropWhile=Oae,N.fill=Eae,N.filter=bie,N.flatMap=Nie,N.flatMapDeep=xie,N.flatMapDepth=Cie,N.flatten=Fb,N.flattenDeep=zae,N.flattenDepth=bae,N.flip=Uie,N.flow=Poe,N.flowRight=koe,N.fromPairs=yae,N.functions=kce,N.functionsIn=jce,N.groupBy=Mie,N.initial=Nae,N.intersection=xae,N.intersectionBy=Cae,N.intersectionWith=Mae,N.invert=Wce,N.invertBy=Uce,N.invokeMap=Tie,N.iteratee=ua,N.keyBy=Sie,N.keys=e4,N.keysIn=b4,N.map=Dr,N.mapKeys=Yce,N.mapValues=Kce,N.matches=joe,N.matchesProperty=qoe,N.memoize=Ar,N.merge=Xce,N.mergeWith=ey,N.method=Woe,N.methodOf=Uoe,N.mixin=da,N.negate=Pr,N.nthArg=Yoe,N.omit=Zce,N.omitBy=Qce,N.once=Gie,N.orderBy=Fie,N.over=Koe,N.overArgs=Yie,N.overEvery=Xoe,N.overSome=Zoe,N.partial=ra,N.partialRight=Wb,N.partition=Hie,N.pick=Jce,N.pickBy=ty,N.property=ly,N.propertyOf=Qoe,N.pull=Fae,N.pullAll=$b,N.pullAllBy=Hae,N.pullAllWith=$ae,N.pullAt=_ae,N.range=Joe,N.rangeRight=ele,N.rearg=Kie,N.reject=Iie,N.remove=Iae,N.rest=Xie,N.reverse=ea,N.sampleSize=Die,N.set=toe,N.setWith=noe,N.shuffle=Bie,N.slice=Lae,N.sortBy=kie,N.sortedUniq=qae,N.sortedUniqBy=Wae,N.split=Noe,N.spread=Zie,N.tail=Uae,N.take=Gae,N.takeRight=Yae,N.takeRightWhile=Kae,N.takeWhile=Xae,N.tap=die,N.throttle=Qie,N.thru=Lr,N.toArray=Xb,N.toPairs=ny,N.toPairsIn=ry,N.toPath=ile,N.toPlainObject=Qb,N.transform=roe,N.unary=Jie,N.union=Zae,N.unionBy=Qae,N.unionWith=Jae,N.uniq=eie,N.uniqBy=tie,N.uniqWith=nie,N.unset=aoe,N.unzip=ta,N.unzipWith=_b,N.update=ioe,N.updateWith=coe,N.values=Q2,N.valuesIn=ooe,N.without=rie,N.words=cy,N.wrap=ece,N.xor=aie,N.xorBy=iie,N.xorWith=cie,N.zip=oie,N.zipObject=lie,N.zipObjectDeep=sie,N.zipWith=uie,N.entries=ny,N.entriesIn=ry,N.extend=Jb,N.extendWith=qr,da(N,N),N.add=ole,N.attempt=oy,N.camelCase=doe,N.capitalize=ay,N.ceil=lle,N.clamp=loe,N.clone=nce,N.cloneDeep=ace,N.cloneDeepWith=ice,N.cloneWith=rce,N.conformsTo=cce,N.deburr=iy,N.defaultTo=Aoe,N.divide=sle,N.endsWith=foe,N.eq=lt,N.escape=voe,N.escapeRegExp=hoe,N.every=zie,N.find=yie,N.findIndex=Tb,N.findKey=Ice,N.findLast=Vie,N.findLastIndex=Sb,N.findLastKey=Lce,N.floor=ule,N.forEach=Lb,N.forEachRight=Db,N.forIn=Dce,N.forInRight=Bce,N.forOwn=Ace,N.forOwnRight=Pce,N.get=ca,N.gt=oce,N.gte=lce,N.has=qce,N.hasIn=oa,N.head=Hb,N.identity=y4,N.includes=Rie,N.indexOf=Vae,N.inRange=soe,N.invoke=Gce,N.isArguments=v2,N.isArray=Ae,N.isArrayBuffer=sce,N.isArrayLike=z4,N.isArrayLikeObject=L1,N.isBoolean=uce,N.isBuffer=Yt,N.isDate=dce,N.isElement=fce,N.isEmpty=vce,N.isEqual=hce,N.isEqualWith=mce,N.isError=aa,N.isFinite=pce,N.isFunction=Mt,N.isInteger=Ub,N.isLength=kr,N.isMap=Gb,N.isMatch=gce,N.isMatchWith=wce,N.isNaN=Oce,N.isNative=Ece,N.isNil=bce,N.isNull=zce,N.isNumber=Yb,N.isObject=T1,N.isObjectLike=H1,N.isPlainObject=K3,N.isRegExp=ia,N.isSafeInteger=yce,N.isSet=Kb,N.isString=jr,N.isSymbol=S4,N.isTypedArray=Z2,N.isUndefined=Vce,N.isWeakMap=Nce,N.isWeakSet=xce,N.join=Rae,N.kebabCase=moe,N.last=Y4,N.lastIndexOf=Tae,N.lowerCase=poe,N.lowerFirst=goe,N.lt=Cce,N.lte=Mce,N.max=dle,N.maxBy=fle,N.mean=vle,N.meanBy=hle,N.min=mle,N.minBy=ple,N.stubArray=va,N.stubFalse=ha,N.stubObject=tle,N.stubString=nle,N.stubTrue=rle,N.multiply=gle,N.nth=Sae,N.noConflict=Goe,N.noop=fa,N.now=Br,N.pad=woe,N.padEnd=Ooe,N.padStart=Eoe,N.parseInt=zoe,N.random=uoe,N.reduce=$ie,N.reduceRight=_ie,N.repeat=boe,N.replace=yoe,N.result=eoe,N.round=wle,N.runInContext=Y,N.sample=Lie,N.size=Aie,N.snakeCase=Voe,N.some=Pie,N.sortedIndex=Dae,N.sortedIndexBy=Bae,N.sortedIndexOf=Aae,N.sortedLastIndex=Pae,N.sortedLastIndexBy=kae,N.sortedLastIndexOf=jae,N.startCase=xoe,N.startsWith=Coe,N.subtract=Ole,N.sum=Ele,N.sumBy=zle,N.template=Moe,N.times=ale,N.toFinite=Rt,N.toInteger=je,N.toLength=Zb,N.toLower=Roe,N.toNumber=K4,N.toSafeInteger=Rce,N.toString=u1,N.toUpper=Toe,N.trim=Soe,N.trimEnd=Foe,N.trimStart=Hoe,N.truncate=$oe,N.unescape=_oe,N.uniqueId=cle,N.upperCase=Ioe,N.upperFirst=la,N.each=Lb,N.eachRight=Db,N.first=Hb,da(N,function(){var r={};return ht(N,function(o,s){f1.call(N.prototype,s)||(r[s]=o)}),r}(),{chain:!1}),N.VERSION=i,j4(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){N[r].placeholder=N}),j4(["drop","take"],function(r,o){t1.prototype[r]=function(s){s=s===t?1:K1(je(s),0);var p=this.__filtered__&&!o?new t1(this):this.clone();return p.__filtered__?p.__takeCount__=u4(s,p.__takeCount__):p.__views__.push({size:u4(s,Q),type:r+(p.__dir__<0?"Right":"")}),p},t1.prototype[r+"Right"]=function(s){return this.reverse()[r](s).reverse()}}),j4(["filter","map","takeWhile"],function(r,o){var s=o+1,p=s==j||s==D;t1.prototype[r]=function(O){var R=this.clone();return R.__iteratees__.push({iteratee:Te(O,3),type:s}),R.__filtered__=R.__filtered__||p,R}}),j4(["head","last"],function(r,o){var s="take"+(o?"Right":"");t1.prototype[r]=function(){return this[s](1).value()[0]}}),j4(["initial","tail"],function(r,o){var s="drop"+(o?"":"Right");t1.prototype[r]=function(){return this.__filtered__?new t1(this):this[s](1)}}),t1.prototype.compact=function(){return this.filter(y4)},t1.prototype.find=function(r){return this.filter(r).head()},t1.prototype.findLast=function(r){return this.reverse().find(r)},t1.prototype.invokeMap=Ke(function(r,o){return typeof r=="function"?new t1(this):this.map(function(s){return j3(s,r,o)})}),t1.prototype.reject=function(r){return this.filter(Pr(Te(r)))},t1.prototype.slice=function(r,o){r=je(r);var s=this;return s.__filtered__&&(r>0||o<0)?new t1(s):(r<0?s=s.takeRight(-r):r&&(s=s.drop(r)),o!==t&&(o=je(o),s=o<0?s.dropRight(-o):s.take(o-r)),s)},t1.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},t1.prototype.toArray=function(){return this.take(Q)},ht(t1.prototype,function(r,o){var s=/^(?:filter|find|map|reject)|While$/.test(o),p=/^(?:head|last)$/.test(o),O=N[p?"take"+(o=="last"?"Right":""):o],R=p||/^find/.test(o);O&&(N.prototype[o]=function(){var B=this.__wrapped__,W=p?[1]:arguments,X=B instanceof t1,le=W[0],se=X||Ae(B),fe=function(Je){var n1=O.apply(N,Pt([Je],W));return p&&we?n1[0]:n1};se&&s&&typeof le=="function"&&le.length!=1&&(X=se=!1);var we=this.__chain__,Ve=!!this.__actions__.length,Se=R&&!we,qe=X&&!Ve;if(!R&&se){B=qe?B:new t1(this);var Fe=r.apply(B,W);return Fe.__actions__.push({func:Lr,args:[fe],thisArg:t}),new W4(Fe,we)}return Se&&qe?r.apply(this,W):(Fe=this.thru(fe),Se?p?Fe.value()[0]:Fe.value():Fe)})}),j4(["pop","push","shift","sort","splice","unshift"],function(r){var o=sr[r],s=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",p=/^(?:pop|shift)$/.test(r);N.prototype[r]=function(){var O=arguments;if(p&&!this.__chain__){var R=this.value();return o.apply(Ae(R)?R:[],O)}return this[s](function(B){return o.apply(Ae(B)?B:[],O)})}}),ht(t1.prototype,function(r,o){var s=N[o];if(s){var p=s.name+"";f1.call(U2,p)||(U2[p]=[]),U2[p].push({name:o,func:s})}}),U2[Tr(t,S).name]=[{name:"wrapper",func:t}],t1.prototype.clone=_6e,t1.prototype.reverse=I6e,t1.prototype.value=L6e,N.prototype.at=fie,N.prototype.chain=vie,N.prototype.commit=hie,N.prototype.next=mie,N.prototype.plant=gie,N.prototype.reverse=wie,N.prototype.toJSON=N.prototype.valueOf=N.prototype.value=Oie,N.prototype.first=N.prototype.head,I3&&(N.prototype[I3]=pie),N},j2=h6e();i2?((i2.exports=j2)._=j2,u0._=j2):a4._=j2}).call(P3e)}(b3,b3.exports)),b3.exports}var H2=k3e();const D6=ma(H2),j3e=(n,e)=>{const t=n.field.split("."),i=e==null?void 0:e.getFieldValue(t),c=n.value,l=n.operator||"=";if(!c)return Array.isArray(i)?i.length>0:!!i;const v={"=":()=>Array.isArray(c)?c.includes(i):i===c,"!=":()=>Array.isArray(c)?!c.includes(i):i!==c,">":()=>i>c,"<":()=>i<c,">=":()=>i>=c,"<=":()=>i<=c,includes:()=>Array.isArray(i)?Array.isArray(c)?i.some(h=>c.includes(h)):i.includes(c):typeof i=="string"?Array.isArray(c)?c.some(h=>i.includes(h)):i.includes(c):!1}[l];return v?v():!1},q3e=n=>{var x,E,S,F;let e=(x=n==null?void 0:n.id)==null?void 0:x.split("."),t=ue.Form.useWatch(e,n.formRef);const[i,c]=y.useState(!!n.lookupFetcher),l={textarea:LM,string:py,number:AM,color:$3e,date:Co,datetime:Co,time:D3e,checkbox:DM,switch:BM,select:H3e,password:_3e,radio:I3e,rate:L3e,slider:B3e,upload:A3e};async function d(){var $,T;if(n.lookupFetcher&&n.lookupKey){n.pendingLookupsRef&&n.pendingLookupsRef.current++,c(!0);try{const b=await(($=n.lookupFetcher)==null?void 0:$.call(n,n))||[];(T=n.updateLookupData)==null||T.call(n,n.lookupKey||"",b)}finally{c(!1),n.pendingLookupsRef&&n.pendingLookupsRef.current--}}}const v=["select","checkbox","radio","upload"],h=(n.enableWhen||[]).reduce(($,T)=>{var b;if(typeof T!="function"&&(T!=null&&T.field)){const I=(b=T==null?void 0:T.field)==null?void 0:b.split(".");$[T==null?void 0:T.field]=ue.Form.useWatch(I,n.formRef)}return $},{}),m=y.useRef({}),g=y.useRef(!1);y.useEffect(()=>{var $;($=n.suppressionRef)!=null&&$.current&&(g.current=!1,m.current={})},[(E=n.suppressionRef)==null?void 0:E.current]);const w=H2.debounce(()=>{var b,I,H,k;const $=m.current;if(!g.current&&!((b=n.suppressionRef)!=null&&b.current)){g.current=!0,m.current={...h};return}if((I=n.suppressionRef)!=null&&I.current)return;const T=Object.keys(h).filter(P=>$[P]!==h[P]);if(m.current={...h},T.length>0){let P=(H=n==null?void 0:n.id)==null?void 0:H.split(".");const G=n.resetOnDependencyChange??!1,K=n.resetOnDependencyEmpty??!0;if(n.enableWhen&&((k=n==null?void 0:n.enableWhen)==null?void 0:k.length)>0){let te=n.formRef;(te&&K&&(T!=null&&T.some(U=>{var j;if((j=n.resetIgnoreFields)!=null&&j.includes(U))return!1;{let ee=U==null?void 0:U.split("."),D=te==null?void 0:te.getFieldValue(ee);return Array.isArray(D)?D.length==0:!D}}))||te&&G&&(T!=null&&T.some(U=>{var j;return!((j=n.resetIgnoreFields)!=null&&j.includes(U))})))&&te.setFieldValue(P,void 0)}}},200),z=H2.debounce(d,200);y.useEffect(()=>(z(),w(),()=>{z.cancel(),w.cancel()}),[...((S=n.enableWhen)==null?void 0:S.map($=>{if(typeof $!="function")return h[$==null?void 0:$.field]}))||[]]);const V=$=>{if(!$||($==null?void 0:$.length)==0)return!1;{let T=n.formRef;return!$.every(b=>typeof b!="function"?b.evaluate&&typeof b.evaluate=="function"?b.evaluate(n):b!=null&&b.field?j3e(b,T):!0:b(n))}};return y.useMemo(()=>{var I;const $=l==null?void 0:l[n.inputType];let T=(I=n==null?void 0:n.id)==null?void 0:I.split("."),b={...n};return v.includes(n.inputType)?b.suppressionRef=n.suppressionRef:(b==null||delete b.lookupData,b==null||delete b.initialData,b==null||delete b.httpAgent,b==null||delete b.form),typeof(b==null?void 0:b.addonBefore)=="function"&&(b.addonBefore=b.addonBefore(n)),typeof(b==null?void 0:b.addonAfter)=="function"&&(b.addonAfter=b.addonAfter(n)),b==null||delete b.resetOnDependencyChange,b==null||delete b.resetOnDependencyEmpty,b==null||delete b.inputType,b==null||delete b.dataType,b==null||delete b.input,b==null||delete b.enableWhen,n.inputType==="hidden"?A.jsx(ue.Form.Item,{name:T,noStyle:!0}):$?A.jsx(ue.Form.Item,{colon:typeof n.colon=="boolean"?n.colon:!0,className:n.wrapperClassName,style:{...n.wrapperStyle,...n.readOnly?{pointerEvents:"none"}:{}},label:typeof n.label=="function"?n.label(b):n.label,name:T,tooltip:n.tooltip,rules:[{required:n.required,message:n.defaultErrorMessage??`${n.label} is required`},...n.validators??[]],getValueProps:H=>(n.inputType==="date"&&X3(H).isValid()&&H&&(H=X3(H)),{value:H}),layout:n.layout??void 0,...n.inputType==="upload"?{valuePropName:"fileList",getValueFromEvent:H=>H.fileList}:{},...n.inputType==="color"?{getValueFromEvent:H=>H.toHexString()}:{},...["string","textarea"].includes(n.inputType)?{normalize:H=>H==null?void 0:H.trimStart()}:{},children:A.jsx($,{loading:i,...b,form:n.formRef,data:t,disabled:n.disabled||V(n.enableWhen)})}):A.jsxs("div",{children:["Unknown Input Type - ",n.inputType]})},[n.id,t,n.lookupData,n.readOnly,n.disabled,i,...((F=n.enableWhen)==null?void 0:F.map($=>{if(typeof $!="function")return h[$==null?void 0:$.field]}))||[]])},W3e=({children:n=[],label:e="",id:t="",className:i="",style:c={},section_id:l="",wrapperClassName:d="",wrapperStyle:v={},collapsible:h=!0,labelPlacement:m="start",labelMargin:g=0,showHeader:w=!0,showDivider:z=!0,expandIcon:V=null,collapseIcon:C=null,tooltip:x=null,...E})=>{var k;const[S,F]=y.useState(!0),[$,T]=y.useState("auto"),b=y.useRef(null);y.useEffect(()=>{if(!b.current)return;const P=()=>{b.current&&T(`${b.current.scrollHeight}px`)};P();const G=new ResizeObserver(()=>{P()});G.observe(b.current);const K=new MutationObserver(()=>{setTimeout(P,0)});return K.observe(b.current,{childList:!0,subtree:!0,attributes:!0}),()=>{G.disconnect(),K.disconnect()}},[]);const I={maxHeight:S?$:"0px",overflow:"hidden",transition:"max-height 0.3s ease-in-out",opacity:S?1:0,transform:`translateY(${S?"0":"-10px"})`},H=P=>A.jsxs("div",{className:`antd-form-section-wrapper ${d}`,style:{...v},children:[w&&(z?A.jsx(ue.Divider,{orientation:m,orientationMargin:g,className:i,children:A.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",...c},children:[h&&A.jsx(A.Fragment,{children:V&&C?A.jsx("div",{style:h?{transition:"transform 0.3s ease-in-out",cursor:"pointer"}:{},onClick:()=>h&&F(!S),children:S?V:C}):A.jsx("div",{style:h?{transform:`rotate(${S?"0deg":"-90deg"})`,transition:"transform 0.3s ease-in-out",cursor:"pointer"}:{},onClick:()=>h&&F(!S),children:A.jsx(_n,{})})}),A.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[" ",A.jsx("span",{style:h?{cursor:"pointer"}:{},onClick:()=>h&&F(!S),children:e}),x&&A.jsx(ue.Tooltip,{title:x,children:A.jsx(F6,{style:{opacity:.5}})})]})]})}):A.jsxs("div",{className:i,style:{margin:"16px 0",display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",...c},children:[h&&A.jsx(A.Fragment,{children:V&&C?A.jsx("div",{style:h?{transition:"transform 0.3s ease-in-out",cursor:"pointer"}:{},onClick:()=>h&&F(!S),children:S?V:C}):A.jsx("div",{style:h?{transform:`rotate(${S?"0deg":"-90deg"})`,transition:"transform 0.3s ease-in-out",cursor:"pointer"}:{},onClick:()=>h&&F(!S),children:A.jsx(_n,{})})}),A.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[" ",A.jsx("span",{style:h?{cursor:"pointer"}:{},onClick:()=>h&&F(!S),children:e}),x&&A.jsx(ue.Tooltip,{title:x,children:A.jsx(R6,{style:{opacity:.5}})})]})]})),A.jsx("div",{style:I,children:A.jsx("div",{ref:b,children:A.jsx(Dn,{...E,items:P},t)})})]});if(l){const P=(k=E.sections)==null?void 0:k.find(G=>G.id===l);if(P)return H((P==null?void 0:P.items)||[])}else if(n&&n.length>0)return H(n);return A.jsx(A.Fragment,{})},kO=(n,e)=>{const t=n.field.split("."),i=e==null?void 0:e.getFieldValue(t),c=n.value,l=n.operator||"=";if(!c)return Array.isArray(i)?i.length>0:!!i;const v={"=":()=>Array.isArray(c)?c.includes(i):i===c,"!=":()=>Array.isArray(c)?!c.includes(i):i!==c,">":()=>i>c,"<":()=>i<c,">=":()=>i>=c,"<=":()=>i<=c,includes:()=>Array.isArray(i)?Array.isArray(c)?i.some(h=>c.includes(h)):i.includes(c):typeof i=="string"?Array.isArray(c)?c.some(h=>i.includes(h)):i.includes(c):!1}[l];return v?v():!1},U3e=(n,e)=>{const t=n.displayWhen;return t?t.every(i=>i!=null&&i.field?typeof i!="function"?i.evaluate&&typeof i.evaluate=="function"?i.evaluate({formRef:e}):kO(i,e):i({formRef:e}):!0):!0},jO=n=>{const e=[];for(const t of n)t.displayWhen&&e.push(t),"children"in t&&Array.isArray(t.children)&&e.push(...jO(t.children));return e},Dn=n=>{var m;const e=((m=n==null?void 0:n.items)==null?void 0:m.sort((g,w)=>(g.sequence??9999)-(w.sequence??9999)))??[],t=ue.Form.useWatch([],n.formRef),i=y.useRef(new Set),c=y.useRef(new Map),l=y.useRef(e),d=y.useRef(n.formRef),v=y.useRef(n.suppressionRef);y.useEffect(()=>{l.current=e,d.current=n.formRef,v.current=n.suppressionRef},[e,n.formRef,n.suppressionRef]);const h=y.useMemo(()=>H2.debounce(()=>{var C;if(console.log("debouncedHandleHiddenFields"),(C=v.current)!=null&&C.current)return;const g=l.current,w=d.current,z=jO(g),V=[];for(const x of z){const E=x.id;if(!E)continue;const S=x.key||E,F=U3e(x,w),$=c.current.get(S);if(c.current.set(S,F),!F&&$!==!1){const T=E.split("."),b=w==null?void 0:w.getFieldValue(T);b!=null&&b!==""&&V.push(E)}else F&&i.current.delete(E)}for(const x of V){const E=x.split("."),S=w==null?void 0:w.getFieldValue(E);S!=null&&S!==""&&i.current.add(x)}},200),[]);return y.useEffect(()=>(h(),()=>{h.cancel()}),[t,h]),A.jsx(A.Fragment,{children:e.map(({displayWhen:g,...w})=>{if(g&&!g.every(z=>z!=null&&z.field?typeof z!="function"?z.evaluate&&typeof z.evaluate=="function"?z.evaluate(n):kO(z,n.formRef):z(n):!0))return null;if("dataType"in w&&w.type==="input")return A.jsx(q3e,{initialData:n.initialData,resetOnDependencyChange:n.resetOnDependencyChange,resetOnDependencyEmpty:n.resetOnDependencyEmpty,disabled:n.disabled,readOnly:n.readOnly,...w,formRef:n.formRef,httpAgent:n.httpAgent,lookupData:n.lookupData,suppressionRef:n.suppressionRef,pendingLookupsRef:n.pendingLookupsRef,updateLookupData:n.updateLookupData},w.key||w.id);if(w.type==="section")return A.jsx(W3e,{...n,...w});if(w.type==="grid")return A.jsx(my,{...n,...w},w.key||w.id);if(w.type==="flex")return A.jsx(hy,{...n,...w},w.key||w.id);if(w.type==="divider")return A.jsx(ue.Divider,{...w,type:w.orientation||"horizontal",orientation:w.labelPlacement||"center",dashed:w.dashed,children:w.label},w.key||w.id);if(w.type==="custom"&&typeof(w==null?void 0:w.render)=="function")return w.render(n)})})},qO=n=>typeof n=="object"&&n!=null&&n.nodeType===1,WO=(n,e)=>(!e||n!=="hidden")&&n!=="visible"&&n!=="clip",Bn=(n,e)=>{if(n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){const t=getComputedStyle(n,null);return WO(t.overflowY,e)||WO(t.overflowX,e)||(i=>{const c=(l=>{if(!l.ownerDocument||!l.ownerDocument.defaultView)return null;try{return l.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!c&&(c.clientHeight<i.scrollHeight||c.clientWidth<i.scrollWidth)})(n)}return!1},An=(n,e,t,i,c,l,d,v)=>l<n&&d>e||l>n&&d<e?0:l<=n&&v<=t||d>=e&&v>=t?l-n-i:d>e&&v<t||l<n&&v>t?d-e+c:0,G3e=n=>{const e=n.parentElement;return e??(n.getRootNode().host||null)},UO=(n,e)=>{var t,i,c,l;if(typeof document>"u")return[];const{scrollMode:d,block:v,inline:h,boundary:m,skipOverflowHiddenElements:g}=e,w=typeof m=="function"?m:D=>D!==m;if(!qO(n))throw new TypeError("Invalid target");const z=document.scrollingElement||document.documentElement,V=[];let C=n;for(;qO(C)&&w(C);){if(C=G3e(C),C===z){V.push(C);break}C!=null&&C===document.body&&Bn(C)&&!Bn(document.documentElement)||C!=null&&Bn(C,g)&&V.push(C)}const x=(i=(t=window.visualViewport)==null?void 0:t.width)!=null?i:innerWidth,E=(l=(c=window.visualViewport)==null?void 0:c.height)!=null?l:innerHeight,{scrollX:S,scrollY:F}=window,{height:$,width:T,top:b,right:I,bottom:H,left:k}=n.getBoundingClientRect(),{top:P,right:G,bottom:K,left:te}=(D=>{const M=window.getComputedStyle(D);return{top:parseFloat(M.scrollMarginTop)||0,right:parseFloat(M.scrollMarginRight)||0,bottom:parseFloat(M.scrollMarginBottom)||0,left:parseFloat(M.scrollMarginLeft)||0}})(n);let U=v==="start"||v==="nearest"?b-P:v==="end"?H+K:b+$/2-P+K,j=h==="center"?k+T/2-te+G:h==="end"?I+G:k-te;const ee=[];for(let D=0;D<V.length;D++){const M=V[D],{height:_,width:q,top:J,right:Q,bottom:ie,left:oe}=M.getBoundingClientRect();if(d==="if-needed"&&b>=0&&k>=0&&H<=E&&I<=x&&(M===z&&!Bn(M)||b>=J&&H<=ie&&k>=oe&&I<=Q))return ee;const de=getComputedStyle(M),Oe=parseInt(de.borderLeftWidth,10),me=parseInt(de.borderTopWidth,10),ye=parseInt(de.borderRightWidth,10),he=parseInt(de.borderBottomWidth,10);let be=0,pe=0;const Ne="offsetWidth"in M?M.offsetWidth-M.clientWidth-Oe-ye:0,Me="offsetHeight"in M?M.offsetHeight-M.clientHeight-me-he:0,De="offsetWidth"in M?M.offsetWidth===0?0:q/M.offsetWidth:0,ve="offsetHeight"in M?M.offsetHeight===0?0:_/M.offsetHeight:0;if(z===M)be=v==="start"?U:v==="end"?U-E:v==="nearest"?An(F,F+E,E,me,he,F+U,F+U+$,$):U-E/2,pe=h==="start"?j:h==="center"?j-x/2:h==="end"?j-x:An(S,S+x,x,Oe,ye,S+j,S+j+T,T),be=Math.max(0,be+F),pe=Math.max(0,pe+S);else{be=v==="start"?U-J-me:v==="end"?U-ie+he+Me:v==="nearest"?An(J,ie,_,me,he+Me,U,U+$,$):U-(J+_/2)+Me/2,pe=h==="start"?j-oe-Oe:h==="center"?j-(oe+q/2)+Ne/2:h==="end"?j-Q+ye+Ne:An(oe,Q,q,Oe,ye+Ne,j,j+T,T);const{scrollLeft:Pe,scrollTop:ze}=M;be=ve===0?0:Math.max(0,Math.min(ze+be/ve,M.scrollHeight-_/ve+Me)),pe=De===0?0:Math.max(0,Math.min(Pe+pe/De,M.scrollWidth-q/De+Ne)),U+=ze-be,j+=Pe-pe}ee.push({el:M,top:be,left:pe})}return ee},Y3e=n=>n===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(n)?n:{block:"start",inline:"nearest"};function K3e(n,e){if(!n.isConnected||!(c=>{let l=c;for(;l&&l.parentNode;){if(l.parentNode===document)return!0;l=l.parentNode instanceof ShadowRoot?l.parentNode.host:l.parentNode}return!1})(n))return;const t=(c=>{const l=window.getComputedStyle(c);return{top:parseFloat(l.scrollMarginTop)||0,right:parseFloat(l.scrollMarginRight)||0,bottom:parseFloat(l.scrollMarginBottom)||0,left:parseFloat(l.scrollMarginLeft)||0}})(n);if((c=>typeof c=="object"&&typeof c.behavior=="function")(e))return e.behavior(UO(n,e));const i=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:c,top:l,left:d}of UO(n,Y3e(e))){const v=l-t.top+t.bottom,h=d-t.left+t.right;c.scroll({top:v,left:h,behavior:i})}}const X3e=["parentNode"],Z3e="form_item";function GO(n){return n===void 0||n===!1?[]:Array.isArray(n)?n:[n]}function Q3e(n,e){if(!n.length)return;const t=n.join("_");return e?`${e}_${t}`:X3e.includes(t)?`${Z3e}_${t}`:t}var J3e=function(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,i=Object.getOwnPropertySymbols(n);c<i.length;c++)e.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(n,i[c])&&(t[i[c]]=n[i[c]]);return t};function YO(n){return GO(n).join("_")}function KO(n,e){const t=e.getFieldInstance(n),i=Ia(t);if(i)return i;const c=Q3e(GO(n),e.__INTERNAL__.name);if(c)return document.getElementById(c)}function XO(n){const[e]=v6(),t=a.useRef({}),i=a.useMemo(()=>n??Object.assign(Object.assign({},e),{__INTERNAL__:{itemRef:c=>l=>{const d=YO(c);l?t.current[d]=l:delete t.current[d]}},scrollToField:(c,l={})=>{const{focus:d}=l,v=J3e(l,["focus"]),h=KO(c,i);h&&(K3e(h,Object.assign({scrollMode:"if-needed",block:"nearest"},v)),d&&i.focusField(c))},focusField:c=>{var l,d;const v=i.getFieldInstance(c);typeof(v==null?void 0:v.focus)=="function"?v.focus():(d=(l=KO(c,i))===null||l===void 0?void 0:l.focus)===null||d===void 0||d.call(l)},getFieldInstance:c=>{const l=YO(c);return t.current[l]}}),[n,e]);return[i]}const Pn={};function ene({name:n}){const e=St("Form");a.useEffect(()=>{if(n)return Pn[n]=(Pn[n]||0)+1,process.env.NODE_ENV!=="production"&&e(Pn[n]<=1,"usage","There exist multiple Form with same `name`."),()=>{Pn[n]-=1}},[n])}const tne=n=>({[n.componentCls]:{[`${n.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${n.motionDurationMid} ${n.motionEaseInOut},
|
|
207
207
|
opacity ${n.motionDurationMid} ${n.motionEaseInOut} !important`}},[`${n.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${n.motionDurationMid} ${n.motionEaseInOut},
|
|
208
208
|
opacity ${n.motionDurationMid} ${n.motionEaseInOut} !important`}}}),ZO=new _4("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}});new _4("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),new _4("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),new _4("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),new _4("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),new _4("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),new _4("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),new _4("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),new _4("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),new _4("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),new _4("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),new _4("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}});const nne=n=>{const{componentCls:e}=n,t=`${e}-show-help`,i=`${e}-show-help-item`;return{[t]:{transition:`opacity ${n.motionDurationFast} ${n.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[i]:{overflow:"hidden",transition:`height ${n.motionDurationFast} ${n.motionEaseInOut},
|
|
209
209
|
opacity ${n.motionDurationFast} ${n.motionEaseInOut},
|