@nocobase/app 1.3.53 → 1.3.54
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/client/index.html
CHANGED
|
@@ -685,7 +685,7 @@ https://requirejs.org/docs/errors.html#`+ze);return l.requireType=ze,l.requireMo
|
|
|
685
685
|
padding: 2px 7px;
|
|
686
686
|
border-radius: 10px;
|
|
687
687
|
}
|
|
688
|
-
`]))))}));return(0,H.jsx)(g.BQs,{ellipsis:!0,popoverContent:$n,children:$n})};var Yt=(0,l.createContext)([]);Yt.displayName="VariableScopeContext";function pn(Ct){var Wt=Ct.scope,Lt=Wt===void 0?[]:Wt,qt=Ct.children;return(0,H.jsx)(Yt.Provider,{value:Lt,children:qt})}function Zt(){return(0,l.useContext)(Yt)}function jt(){return null}jt.Input=(0,$.connect)(ge),jt.TextArea=(0,$.connect)(st,(0,$.mapReadPretty)(st.ReadPretty)),jt.RawTextArea=(0,$.connect)(be),jt.JSON=(0,$.connect)(Re);var an=null},88969:function(ze,X,e){"use strict";e.d(X,{m:function(){return R}});var $=e(15009),l=e.n($),z=e(19632),d=e.n(z),A=e(99289),f=e.n(A),K=e(5574),o=e.n(K),N=e(97133),m=e(38089),M=e(67294),h=e(26793),O=e(60094),n=e(9783),r=e.n(n),c=(0,O.l6)("nb-variable-select",function(W){var y=W.componentCls;return r()({},y,{position:"relative",".ant-select.ant-cascader":{position:"absolute",top:"-1px",right:"-1px",minWidth:"auto",width:"calc(100% + 2px)",height:"calc(100% + 2px)",overflow:"hidden",opacity:0},".variable-btn":{fontStyle:"italic",fontFamily:"'New York', 'Times New Roman', Times, serif"},".Cascader-popupClassName":{".ant-cascader-menu":{marginBottom:0}}})}),L=c,D=e(2876),b=e(85893);function R(W){var y=W.options,I=W.setOptions,v=W.onInsert,S=W.changeOnSelect,P=S===void 0?!1:S,i=W.fieldNames,w=i===void 0?{}:i,E=W.className,C=(0,h.$)(),u=C.t,a=(0,M.useState)([]),p=o()(a,2),j=p[0],F=p[1],t=L(),x=t.wrapSSR,k=t.componentCls,V=t.hashId,G=(0,O.dQ)(),Q=G.token;function U(Z){return H.apply(this,arguments)}function H(){return H=f()(l()().mark(function Z(ne){var ee,B;return l()().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(B=ne[ne.length-1],!(!((ee=B.children)!==null&&ee!==void 0&&ee.length)&&!B.isLeaf&&B.loadChildren)){re.next=5;break}return re.next=4,B.loadChildren(B);case 4:I(function(pe){return d()(pe)});case 5:case"end":return re.stop()}},Z)})),H.apply(this,arguments)}return x((0,b.jsx)(D.R,{className:(0,N.cx)("x-button",k,V,E),children:(0,b.jsx)(m.Z,{placeholder:u("Select a variable"),value:[],options:y,fieldNames:w,loadData:U,onChange:function(){var ne,ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(F(ee),!!ee.length){var q=B[B.length-1];(!(q!=null&&(ne=q.children)!==null&&ne!==void 0&&ne.length)&&!(q!=null&&q.loadChildren)||q!=null&&q.isLeaf)&&v(ee)}},changeOnSelect:P,onClick:function(ne){if(!(ne.detail!==2||!P))for(var ee=ne.target;ee&&ee!==ne.currentTarget;ee=ee.parentNode){var B;Array.from((B=ee.classList)!==null&&B!==void 0?B:[]).includes("ant-cascader-menu-item")&&v(j)}},popupClassName:"Cascader-popupClassName",dropdownRender:P?function(Z){return(0,b.jsxs)(b.Fragment,{children:[Z,(0,b.jsx)("div",{style:{padding:"0.5em",borderTop:"1px solid ".concat(Q.colorBorder),color:Q.colorTextDescription},children:u("Double click to choose entire object")})]})}:null})}))}},2876:function(ze,X,e){"use strict";e.d(X,{R:function(){return f}});var $=e(97857),l=e.n($),z=e(15867),d=e(67294),A=e(85893),f=(0,d.forwardRef)(function(K,o){var N=(0,d.useMemo)(function(){return{fontStyle:"italic",fontFamily:"New York, Times New Roman, Times, serif"}},[]);return(0,A.jsxs)(z.ZP,l()(l()({"aria-label":"variable-button",ref:o,style:N},K),{},{children:["x",K.children]}))});f.displayName="XButton"},72724:function(ze,X,e){"use strict";e.d(X,{L:function(){return O}});var $=e(97857),l=e.n($),z=e(5574),d=e.n(z),A=e(94697),f=e(80844),K=e(67294),o=e(26793),N=e(21143),m=e(84577),M=e(85893),h=function(r){var c=(0,m.ng)(),L=c.refresh,D=(0,N.useAPIClient)(),b=(0,o.$)(),R=b.t;return(0,K.useCallback)(function(W){var y,I,v,S,P,i,w,E,C=W.active,u=W.over,a=C==null||(y=C.data)===null||y===void 0||(y=y.current)===null||y===void 0?void 0:y.schema,p=u==null||(I=u.data)===null||I===void 0||(I=I.current)===null||I===void 0?void 0:I.schema,j=u==null||(v=u.data)===null||v===void 0||(v=v.current)===null||v===void 0?void 0:v.insertAdjacent,F=u==null||(S=u.data)===null||S===void 0||(S=S.current)===null||S===void 0?void 0:S.breakRemoveOn,t=u==null||(P=u.data)===null||P===void 0||(P=P.current)===null||P===void 0?void 0:P.wrapSchema,x=u==null||(i=u.data)===null||i===void 0||(i=i.current)===null||i===void 0?void 0:i.onSuccess,k=(w=u==null||(E=u.data)===null||E===void 0||(E=E.current)===null||E===void 0?void 0:E.removeParentsIfNoChildren)!==null&&w!==void 0?w:!0;if(!a||!p){r==null||r(W);return}if(a===p){r==null||r(W);return}if(a.parent===p&&j==="beforeEnd"){r==null||r(W);return}var V=(0,m.Pl)({t:R,api:D,refresh:L,current:p});if(V.loadAPIClientEvents(),a.parent===p.parent){V.insertBeforeBeginOrAfterEnd(a),r==null||r(W);return}if(j){V.insertAdjacent(j,a,{wrap:t,breakRemoveOn:F,removeParentsIfNoChildren:k,onSuccess:x}),r==null||r(W);return}},[r])},O=(0,f.observer)(function(n){var r=(0,o.$)(),c=r.t,L=(0,K.useState)(!0),D=d()(L,2),b=D[0],R=D[1],W=(0,K.useCallback)(function(I){var v,S=I.active,P=S==null||(v=S.data)===null||v===void 0||(v=v.current)===null||v===void 0?void 0:v.schema;if(R(!!P),n!=null&&n.onDragStart){var i;n==null||(i=n.onDragStart)===null||i===void 0||i.call(n,I)}},[n==null?void 0:n.onDragStart]),y=h(n==null?void 0:n.onDragEnd);return(0,M.jsxs)(A.DndContext,l()(l()({collisionDetection:A.rectIntersection},n),{},{onDragStart:W,onDragEnd:y,children:[(0,M.jsx)(A.DragOverlay,{dropAnimation:{duration:10,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:b&&(0,M.jsx)("span",{style:{whiteSpace:"nowrap"},children:c("Dragging")})}),n.children]}))},{displayName:"DndContext"})},14896:function(ze,X,e){"use strict";e.r(X),e.d(X,{DndContext:function(){return $.L},DragHandler:function(){return l.IW},DraggableContext:function(){return l.LC},ShowFormData:function(){return f},Sortable:function(){return l.bt},SortableContext:function(){return l.Fo},SortableItem:function(){return l.TR},SortableProvider:function(){return l.OR},getRenderContent:function(){return K.I9}});var $=e(72724),l=e(20493),z=e(67294),d=e(80844),A=e(85893),f=(0,d.observer)(function(o){var N=o.children,m=(0,d.useForm)();return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("pre",{style:{marginBottom:20},"data-testid":"form-data",children:JSON.stringify(m.values,null,2)}),N]})}),K=e(34588)},20493:function(ze,X,e){"use strict";e.d(X,{IW:function(){return W},LC:function(){return n},bt:function(){return L},Fo:function(){return r},TR:function(){return R},OR:function(){return c}});var $=e(97857),l=e.n($),z=e(13769),d=e.n(z),A=e(10274),f=e(94697),K=e(97133),o=e(80844),N=e(67294),m=e(60094),M=e(85893),h=["component","overStyle","style","children","openMode"],O=["schema","id","eid","removeParentsIfNoChildren"],n=(0,N.createContext)(null);n.displayName="DraggableContext";var r=(0,N.createContext)(null);r.displayName="SortableContext";var c=function(I){var v=I.id,S=I.data,P=I.children,i=(0,f.useDraggable)({id:v,data:S}),w=(0,f.useDroppable)({id:v,data:S});return(0,M.jsx)(r.Provider,{value:{draggable:i,droppable:w},children:P})},L=function(I){var v,S,P=I.component,i=I.overStyle,w=I.style,E=I.children,C=I.openMode,u=d()(I,h),a=(0,m.dQ)(),p=a.token,j=(0,N.useContext)(r),F=j.draggable,t=j.droppable,x=t.isOver,k=t.setNodeRef,V=l()({},w);return x&&(F==null||(v=F.active)===null||v===void 0?void 0:v.id)!==(t==null||(S=t.over)===null||S===void 0?void 0:S.id)&&(V[P==="a"?"color":"background"]=new A.C(p.colorSettings).setAlpha(.15).toHex8String(),Object.assign(V,i)),N.createElement(P||"div",l()(l()({role:"none"},u),{},{className:(0,K.cx)("nb-sortable-designer",I.className),ref:k,style:V}),E)},D=function(I){var v=b(I),S=(0,o.useFieldSchema)();return I.schema?l()(l()({},I),{},{id:v}):l()(l()({},I),{},{id:v,schema:S})},b=function(I){var v=(0,o.useField)();return I.id?I.id:v.address.toString()},R=(0,o.observer)(function(y){var I=D(y),v=I.schema,S=I.id,P=I.eid,i=I.removeParentsIfNoChildren,w=d()(I,O),E=(0,N.useMemo)(function(){return{insertAdjacent:"afterEnd",schema:v,removeParentsIfNoChildren:i!=null?i:!0}},[v,i]);return(0,M.jsx)(c,{id:S,data:E,children:(0,M.jsx)(L,l()(l()({id:P},w),{},{children:y.children}))})},{displayName:"SortableItem"}),W=function(I){var v=(0,N.useContext)(r),S=v.draggable,P=S.attributes,i=S.listeners,w=S.setNodeRef;return(0,M.jsx)("div",{style:{display:"inline-block",width:14,height:14,lineHeight:"14px",textAlign:"left"},children:(0,M.jsx)("div",l()(l()(l()({ref:w,style:{position:"relative",zIndex:1,lineHeight:0,fontSize:0,display:"inline-block"}},i),P),{},{role:"none",children:(0,M.jsx)("span",{style:{cursor:"move",fontSize:14},children:I.children})}))})}},34588:function(ze,X,e){"use strict";e.d(X,{jC:function(){return i},od:function(){return v},I9:function(){return C},Rq:function(){return S},e7:function(){return I}});var $=e(97857),l=e.n($),z=e(15009),d=e.n(z),A=e(9783),f=e.n(A),K=e(5574),o=e.n(K),N=e(99289),m=e.n(N),M=e(52677),h=e.n(M),O=e(96750),n=e.n(O),r=e(96486),c=e.n(r),L=e(10097),D=e(76690),b=e(65565),R=e(27484),W=e.n(R);function y(){"use strict";Array.isArray||(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"});function a(t){for(var x=[],k=0,V=t.length;k<V;k++)x.indexOf(t[k])===-1&&x.push(t[k]);return x}function p(t,x){return JSON.stringify(t)===JSON.stringify(x)}var j={},F={$is:function(x,k){return x===k},$match:function(x,k){return Array.isArray(x)&&Array.isArray(k)&&x.some(function(V){return Array.isArray(V)})?x.some(function(V){return(V==null?void 0:V.length)===k.length&&(V==null?void 0:V.every(function(G,Q){return G===k[Q]}))}):JSON.stringify(x)===JSON.stringify(k)},$eq:function(x,k){return Array.isArray(x)&&Array.isArray(k)?p(x,k):Array.isArray(x)?x.includes(k):x==k},$ne:function(x,k){return x!=k},"!==":function(x,k){return x!==k},$gt:function(x,k){return Array.isArray(x)?x.some(function(V){return V>k}):x>k},$gte:function(x,k){return x>=k},$lt:function(x,k,V){return Array.isArray(x)?x.some(function(G){return G<k}):V===void 0?x<k:x<k&&k<V},$lte:function(x,k,V){return V===void 0?x<=k:x<=k&&k<=V},$exists:function(x){return j.truthy(x)},$notEmpty:function(x){return j.truthy(x)},$empty:function(x){return Array.isArray(x)?x.some(function(k){return!j.truthy(k)}):!j.truthy(x)},$notExists:function(x){return!j.truthy(x)},"%":function(x,k){return x%k},log:function(x){return console.log(x),x},$in:function(x,k){return!k||typeof k.indexOf=="undefined"?!1:Array.isArray(x)&&Array.isArray(k)?k.some(function(V){return x.includes(V)}):k.indexOf(x)!==-1},$notIn:function(x,k){return!k||typeof k.indexOf=="undefined"?!1:k.indexOf(x)===-1},$includes:function(x,k){return!x||typeof x.indexOf=="undefined"?!1:Array.isArray(x)?x.some(function(V){return V==null?void 0:V.includes(k)}):x.indexOf(k)!==-1},$notIncludes:function(x,k){return Array.isArray(x)?!x.some(function(V){return(V||"").includes(k)}):(x=x||"",!x.includes(k))},$anyOf:function(x,k){return x.length===0?!1:Array.isArray(x)&&Array.isArray(k)&&x.some(function(V){return Array.isArray(V)})?x.some(function(V){return V.some(function(G){return k.includes(G)})}):x.some(function(V){return k.includes(V)})},$noneOf:function(x,k){return!x||(x==null?void 0:x.length)===0?!0:Array.isArray(x)&&Array.isArray(k)&&x.some(function(V){return Array.isArray(V)})?x.some(function(V){return V.every(function(G){return!k.some(function(Q){return G.includes(Q)})})}):k.some(function(V){return!x.includes(V)})},$notMatch:function(x,k){if(x.length!==k.length)return!0;for(var V=0;V<x.length;V++)if(x[V]!==k[V])return!0;return!1},$dateOn:function(x,k){return!x||!k?!1:(Array.isArray(x)||(x=[x,x]),Array.isArray(k)||(k=[k,k]),x=x.map(function(V){return W()(V)}),k=k.map(function(V){return W()(V)}),x[0].isBetween(k[0],k[1],null,"[]")&&x[1].isBetween(k[0],k[1],null,"[]"))},$dateBefore:function(x,k){return!x||!k?!1:(Array.isArray(x)||(x=[x,x]),Array.isArray(k)||(k=[k,k]),x=x.map(function(V){return W()(V)}),k=k.map(function(V){return W()(V)}),x[0].isBefore(k[0])&&x[1].isBefore(k[0]))},$dateNotBefore:function(x,k){return!F.$dateBefore(x,k)},$dateAfter:function(x,k){return!x||!k?!1:(Array.isArray(x)||(x=[x,x]),Array.isArray(k)||(k=[k,k]),x=x.map(function(V){return W()(V)}),k=k.map(function(V){return W()(V)}),x[0].isAfter(k[1])&&x[1].isAfter(k[1]))},$dateNotAfter:function(x,k){return!F.$dateAfter(x,k)},$dateBetween:function(x,k){return F.$dateOn(x,k)},$dateNotOn:function(x,k){return!F.$dateOn(x,k)},$isTruly:function(x){return Array.isArray(x)?x.some(function(k){return k===!0||k===1}):x===!0||x===1},$isFalsy:function(x){return Array.isArray(x)?x.some(function(k){return!j.truthy(k)}):!j.truthy(x)},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(x,k,V){if(V<0){var G=String(x).substr(k);return G.substr(0,G.length+V)}return String(x).substr(k,V)},"+":function(){return Array.prototype.reduce.call(arguments,function(x,k){return parseFloat(x,10)+parseFloat(k,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(x,k){return parseFloat(x,10)*parseFloat(k,10)})},"-":function(x,k){return k===void 0?-x:x-k},"/":function(x,k){return x/k},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(x,k){return x.concat(k)},[])},var:function(x,k){var V=k===void 0?null:k,G=this;if(typeof x=="undefined"||x===""||x===null)return G;for(var Q=String(x).split("."),U=0;U<Q.length;U++)if(G==null||(G=G[Q[U]],G===void 0))return V;return G},missing:function(){for(var x=[],k=Array.isArray(arguments[0])?arguments[0]:arguments,V=0;V<k.length;V++){var G=k[V],Q=j.apply({var:G},this);(Q===null||Q==="")&&x.push(G)}return x},missing_some:function(x,k){var V=j.apply({missing:k},this);return k.length-V.length>=x?[]:V}};return j.is_logic=function(t){return h()(t)==="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length===1},j.truthy=function(t){return Array.isArray(t)&&t.length===0?!1:!!t},j.get_operator=function(t){return Object.keys(t)[0]},j.get_values=function(t){return t[j.get_operator(t)]},j.apply=function(t,x){if(Array.isArray(t))return t.map(function(B){return j.apply(B,x)});if(!j.is_logic(t))return t;var k=j.get_operator(t),V=t[k],G,Q,U,H,Z;if(Array.isArray(V)||(V=[V]),k==="if"||k=="?:"){for(G=0;G<V.length-1;G+=2)if(j.truthy(j.apply(V[G],x)))return j.apply(V[G+1],x);return V.length===G+1?j.apply(V[G],x):null}else if(k==="$and"){for(G=0;G<V.length;G+=1)if(Q=j.apply(V[G],x),!j.truthy(Q))return Q;return Q}else if(k==="or"){for(G=0;G<V.length;G+=1)if(Q=j.apply(V[G],x),j.truthy(Q))return Q;return Q}else{if(k==="filter")return H=j.apply(V[0],x),U=V[1],Array.isArray(H)?H.filter(function(B){return j.truthy(j.apply(U,B))}):[];if(k==="map")return H=j.apply(V[0],x),U=V[1],Array.isArray(H)?H.map(function(B){return j.apply(U,B)}):[];if(k==="reduce")return H=j.apply(V[0],x),U=V[1],Z=typeof V[2]!="undefined"?V[2]:null,Array.isArray(H)?H.reduce(function(B,q){return j.apply(U,{current:q,accumulator:B})},Z):Z;if(k==="all"){if(H=j.apply(V[0],x),U=V[1],!Array.isArray(H)||!H.length)return!1;for(G=0;G<H.length;G+=1)if(!j.truthy(j.apply(U,H[G])))return!1;return!0}else if(k==="none"){if(H=j.apply(V[0],x),U=V[1],!Array.isArray(H)||!H.length)return!0;for(G=0;G<H.length;G+=1)if(j.truthy(j.apply(U,H[G])))return!1;return!0}else if(k==="some"){if(H=j.apply(V[0],x),U=V[1],!Array.isArray(H)||!H.length)return!1;for(G=0;G<H.length;G+=1)if(j.truthy(j.apply(U,H[G])))return!0;return!1}}if(V=V.map(function(B){return j.apply(B,x)}),F.hasOwnProperty(k)&&typeof F[k]=="function")return F[k].apply(x,V);if(k.indexOf(".")>0){var ne=String(k).split("."),ee=F;for(G=0;G<ne.length;G++){if(!ee.hasOwnProperty(ne[G]))throw new Error("Unrecognized operation "+k+" (failed at "+ne.slice(0,G+1).join(".")+")");ee=ee[ne[G]]}return ee.apply(x,V)}throw new Error("Unrecognized operation "+k)},j.uses_data=function(t){var x=[];if(j.is_logic(t)){var k=j.get_operator(t),V=t[k];Array.isArray(V)||(V=[V]),k==="var"?x.push(V[0]):V.forEach(function(G){x.push.apply(x,j.uses_data(G))})}return a(x)},j.add_operation=function(t,x){F[t]=x},j.rm_operation=function(t){delete F[t]},j.rule_like=function(t,x){if(x===t||x==="@")return!0;if(x==="number")return typeof t=="number";if(x==="string")return typeof t=="string";if(x==="array")return Array.isArray(t)&&!j.is_logic(t);if(j.is_logic(x)){if(j.is_logic(t)){var k=j.get_operator(x),V=j.get_operator(t);if(k==="@"||k===V)return j.rule_like(j.get_values(t,!1),j.get_values(x,!1))}return!1}if(Array.isArray(x))if(Array.isArray(t)){if(x.length!==t.length)return!1;for(var G=0;G<x.length;G+=1)if(!j.rule_like(t[G],x[G]))return!1;return!0}else return!1;return!1},j}var I=function(p,j){var F,t=/{{(.*?)}}/,x=p==null||(F=p.match)===null||F===void 0?void 0:F.call(p,t);if(x){var k=c().get(j,x[1]);return c().isFunction(k)?k():k}else return p};function v(a){if(h()(a)!=="object"||a===null)return null;for(var p in a)if(Object.prototype.hasOwnProperty.call(a,p))return Object.prototype.toString.call(a[p])==="[object Object]"&&a[p]!==null?v(a[p]):{key:p,value:a[p]};return null}var S=function(p){var j=P(p),F=(0,r.findIndex)(j,function(x,k,V){if(x.includes("$")&&k>0)return!0}),t=j.slice(0,F);return t};function P(a){var p=[];function j(F){Object.keys(F).sort().forEach(function(t){p.push(t),F[t]&&h()(F[t])==="object"&&j(F[t])})}return j(a),p}var i=function(){var a=m()(d()().mark(function p(j){var F,t,x,k,V,G,Q;return d()().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return F=j.ruleGroup,t=j.variables,x=j.localVariables,k=j.variableNameOfLeftCondition,V=Object.keys(F)[0]||"$and",G=F[V],Q=G.map(function(){var Z=m()(d()().mark(function ne(ee){var B,q,re,pe,le,he,_e,Fe,ge,Ae,De;return d()().wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(!("$and"in ee||"$or"in ee)){se.next=4;break}return se.next=3,i({ruleGroup:ee,variables:t,localVariables:x});case 3:return se.abrupt("return",se.sent);case 4:if(B=v(ee),q=B==null?void 0:B.key,q){se.next=8;break}return se.abrupt("return",!0);case 8:return re=w(S(ee),k),pe=t.parseVariable(re,x,{doNotRequest:!0}).then(function(Ce){var oe=Ce.value;return oe}),le=(0,D.cG)(B==null?void 0:B.value)?[t.parseVariable(B==null?void 0:B.value,x).then(function(Ce){var oe=Ce.value;return oe}),pe]:[B==null?void 0:B.value,pe],se.prev=11,he=y(),se.next=15,Promise.all(le);case 15:return _e=se.sent,Fe=o()(_e,2),ge=Fe[0],Ae=Fe[1],se.next=21,t.getCollectionField(re,x);case 21:return De=se.sent,se.abrupt("return",he.apply(f()({},q,[(0,b.J)(Ae,{targetCollectionField:De}),(0,b.J)(ge,{targetCollectionField:De})])));case 25:throw se.prev=25,se.t0=se.catch(11),se.t0;case 28:case"end":return se.stop()}},ne,null,[[11,25]])}));return function(ne){return Z.apply(this,arguments)}}()),H.next=6,Promise.all(Q);case 6:if(Q=H.sent,V!=="$and"){H.next=11;break}return H.abrupt("return",(0,r.every)(Q,function(Z){return Z}));case 11:return H.abrupt("return",(0,r.some)(Q,function(Z){return Z}));case 12:case"end":return H.stop()}},p)}));return function(j){return a.apply(this,arguments)}}();function w(a){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$nForm";return"{{ ".concat(p,".").concat(a.join(".")," }}")}var E=function(p){var j={};return p.map(function(F){j[F.name]=F.ctx}),j};function C(a,p,j,F,t){return u.apply(this,arguments)}function u(){return u=m()(d()().mark(function a(p,j,F,t,x){var k,V,G,Q,U,H;return d()().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(!(j&&p==="handlebars")){ne.next=19;break}return ne.prev=1,k=n().compile(j),V=E(t),G=F.ctxRef.current.$nDate,Q={},Object.keys(G).map(function(ee){Q[ee]=G[ee]()}),U=k(l()(l()(l()({},F.ctxRef.current),V),{},{$nDate:Q})),ne.next=10,x(U);case 10:return ne.abrupt("return",ne.sent);case 13:return ne.prev=13,ne.t0=ne.catch(1),console.log(ne.t0),ne.abrupt("return",j);case 17:ne.next=31;break;case 19:return ne.prev=19,ne.next=22,(0,L.replaceVariableValue)(j,F,t);case 22:return H=ne.sent,ne.next=25,x(H);case 25:return ne.abrupt("return",ne.sent);case 28:return ne.prev=28,ne.t1=ne.catch(19),ne.abrupt("return",j);case 31:case"end":return ne.stop()}},a,null,[[1,13],[19,28]])})),u.apply(this,arguments)}},61736:function(ze,X,e){"use strict";e.d(X,{D:function(){return l}});var $=e(67294),l=(0,$.createContext)({});l.displayName="SchemaComponentContext.Provider"},44245:function(ze,X,e){"use strict";e.d(X,{R:function(){return n}});var $=e(97857),l=e.n($),z=e(13769),d=e.n(z),A=e(86201),f=e(80844),K=e(67294),o=e(47844),N=e(85893),m=["children","form"],M=["children"],h=function(c){var L=c.children,D=c.form,b=d()(c,m),R=(0,K.useContext)(f.SchemaOptionsContext),W=(0,K.useContext)(f.SchemaExpressionScopeContext),y=l()(l()({},R==null?void 0:R.scope),W),I=l()({},R==null?void 0:R.components);return(0,N.jsx)(f.FormProvider,l()(l()({},b),{},{form:D,children:(0,N.jsx)(o.G,{components:I,scope:y,children:L})}))},O=function(c){var L=c.children,D=d()(c,M),b=(0,K.useContext)(f.SchemaOptionsContext),R=(0,K.useContext)(f.SchemaExpressionScopeContext),W=l()(l()({},b==null?void 0:b.scope),R),y=l()({},b==null?void 0:b.components),I=(0,K.useMemo)(function(){return(0,A.createForm)()},[]);return(0,N.jsx)(f.FormProvider,l()(l()({},D),{},{form:I,children:(0,N.jsx)(o.G,{components:y,scope:W,children:L})}))},n=function(c){return c.form?(0,N.jsx)(h,l()({},c)):(0,N.jsx)(O,l()({},c))}},93587:function(ze,X,e){"use strict";e.d(X,{m:function(){return n}});var $=e(97857),l=e.n($),z=e(86201),d=e(57953),A=e(67294),f=e(84577),K=e(44245),o=e(93323),N=e(12174),m=function(c){var L=c.uid,D=c.type,b=D===void 0?"getJsonSchema":D,R=c.onSuccess,W={url:"/uiSchemas:".concat(b,"/").concat(L)},y=(0,N.QT)(W,{refreshDeps:[L],onSuccess:function(P){R&&R(P)}}),I=y.data,v=y.loading;return{schema:I==null?void 0:I.data,loading:v}},M=e(85893),h=function(c){return c},O=function(c){var L=c.noForm,D=c.onlyRenderProperties,b=c.hidden,R=c.scope,W=c.uid,y=c.memoized,I=y===void 0?!0:y,v=c.components,S=c.onSuccess,P=c.NotFoundPage,i=c.schemaTransform,w=i===void 0?h:i,E=c.onPageNotFind,C=(0,f.Dm)(),u=C.reset,a=D?"getProperties":"getJsonSchema",p={url:"/uiSchemas:".concat(a,"/").concat(W)},j=(0,A.useMemo)(function(){return(0,z.createForm)()},[W]),F=m({uid:W,type:a,onSuccess:function(G){S&&S(G),u&&u()}}),t=F.schema,x=F.loading,k=(0,f.Co)(P);return x||b?(0,M.jsx)("div",{style:{textAlign:"center",marginTop:20},children:(0,M.jsx)(d.Z,{})}):!t||Object.keys(t).length===0?(E&&E(),k?(0,M.jsx)(k,{}):null):L?(0,M.jsx)(o.n,{components:v,scope:R,schema:w(t||{})}):(0,M.jsx)(K.R,{form:j,children:(0,M.jsx)(o.n,{components:v,scope:R,schema:w(t||{})})})},n=(0,A.memo)(function(r){return r.uid?(0,M.jsx)(O,l()({},r)):null});n.displayName="RemoteSchemaComponent"},93323:function(ze,X,e){"use strict";e.d(X,{n:function(){return R}});var $=e(97857),l=e.n($),z=e(13769),d=e.n(z),A=e(9783),f=e.n(A),K=e(80844),o=e(90105),N=e(67294),m=e(61736),M=e(47844),h=e(85893),O=["components","scope","schema","distributed"],n=["schema"],r=["memoized"];function c(W){return K.Schema.isSchemaInstance(W)?W:W!=null&&W.name?new K.Schema({type:"object",properties:f()({},W.name,W)}):new K.Schema(W)}var L=function(y){return(0,N.useMemo)(function(){return c(y)},[])},D=(0,N.memo)(function(W){var y=W.components,I=W.scope,v=W.schema,S=W.distributed,P=d()(W,O),i=(0,N.useContext)(m.D),w=(0,N.useMemo)(function(){return c(v)},[v]),E=(0,o.Z)();return(0,h.jsx)(m.D.Provider,{value:l()(l()({},i),{},{distributed:i.distributed==!1?!1:S,refresh:function(){var u;if(E(),i.distributed===!1||S===!1){var a;(a=i.refresh)===null||a===void 0||a.call(i)}(u=W.onChange)===null||u===void 0||u.call(W,w)}}),children:(0,h.jsx)(M.G,{inherit:!0,components:y,scope:I,children:(0,h.jsx)(K.RecursionField,l()(l()({},P),{},{schema:w}))})})}),b=(0,N.memo)(function(W){var y=W.schema,I=d()(W,n),v=L(y);return(0,h.jsx)(D,l()(l()({},I),{},{schema:v}))}),R=(0,N.memo)(function(W){var y=W.memoized,I=d()(W,r);return y?(0,h.jsx)(b,l()({},I)):(0,h.jsx)(D,l()({},I))})},47844:function(ze,X,e){"use strict";e.d(X,{B:function(){return f},G:function(){return K}});var $=e(97857),l=e.n($),z=e(80844),d=e(67294),A=e(85893),f=function(){var N=(0,d.useContext)(z.SchemaOptionsContext);return N||{}},K=(0,d.memo)(function(o){var N=o.children,m=f(),M=(0,d.useMemo)(function(){return l()(l()({},m.components),o.components)},[m.components,o.components]),h=(0,d.useMemo)(function(){return l()(l()({},m.scope),o.scope)},[m.scope,o.scope]),O=(0,d.useMemo)(function(){return{scope:h,components:M}},[h,M]);return(0,A.jsx)(z.SchemaOptionsContext.Provider,{value:O,children:(0,A.jsx)(z.SchemaComponentsContext.Provider,{value:M,children:(0,A.jsx)(z.ExpressionScope,{value:h,children:N})})})});K.displayName="SchemaComponentOptions"},70993:function(ze,X,e){"use strict";e.d(X,{_b:function(){return y},RV:function(){return I.R},m1:function(){return v.m},n6:function(){return S.n},G0:function(){return P.G},a$:function(){return Q},Tz:function(){return V},Bs:function(){return P.B}});var $=e(15009),l=e.n($),z=e(99289),d=e.n(z),A=e(12444),f=e.n(A),K=e(72004),o=e.n(K),N=e(31996),m=e.n(N),M=e(26037),h=e.n(M),O=e(51947),n=e(83062),r=e(15867),c=e(67294),L=e(49218),D=e(26793),b=e(40868),R=e(68230),W=e(85893),y=function(){var Z=(0,b.ngQ)(),ne=Z.designable,ee=Z.setDesignable,B=(0,D.$)(),q=B.t,re=(0,R.d)(),pe=re.token,le={};return ne?le.backgroundColor="var(--colorSettings)":le.backgroundColor="transparent",(0,L.y1)("Ctrl+Shift+U",function(){return ee(!ne)},[ne]),(0,W.jsx)(n.Z,{title:q("UI Editor"),children:(0,W.jsx)(r.ZP,{"data-testid":"ui-editor-button",icon:(0,W.jsx)(O.Z,{style:{color:pe.colorTextHeaderMenu}}),title:q("UI Editor"),style:le,onClick:function(){ee(!ne)}})})},I=e(44245),v=e(93587),S=e(93323),P=e(47844),i=e(97857),w=e.n(i),E=e(5574),C=e.n(E),u=e(86201),a=e(80844),p=e(84327),j=e(90105),F=e(61736),t=function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return"".concat(Z).concat((0,p.uid)())};a.Schema.silent(!0);var x={},k={silent:!0,compile:function(Z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee=function(){if(k.silent)try{return new Function("$root","with($root) { return (".concat(Z,"); }"))(ne)}catch(q){return"{{".concat(Z,"}}")}else return new Function("$root","with($root) { return (".concat(Z,"); }"))(ne)};return x[Z]?x[Z]:Z.trim().startsWith("t(")?(x[Z]=ee(),x[Z]):ee()}};a.Schema.registerCompiler(k.compile);var V=function(Z){var ne=Z.designable,ee=Z.onDesignableChange,B=Z.components,q=Z.children,re=(0,c.useContext)(F.D),pe=(0,P.B)(),le=(0,j.Z)(),he=(0,c.useState)((0,p.uid)()),_e=C()(he,2),Fe=_e[0],ge=_e[1],Ae=(0,c.useMemo)(function(){return Z.form||(0,u.createForm)()},[Fe]),De=(0,D.$)(),me=De.t,se=(0,c.useMemo)(function(){return w()(w()({},Z.scope),{},{t:me,randomString:t})},[Z.scope,me,pe==null?void 0:pe.scope]),Ce=(0,c.useState)(ne),oe=C()(Ce,2),fe=oe[0],xe=oe[1],be=(0,c.useMemo)(function(){return typeof ne=="boolean"?ne:fe},[ne,fe,re.designable]),je=(0,c.useMemo)(function(){return function(Oe){typeof be!="boolean"&&xe(Oe),ee==null||ee(Oe)}},[be,ee]),Re=(0,c.useCallback)(function(){ge((0,p.uid)())},[]);return(0,W.jsx)(F.D.Provider,{value:{scope:se,components:B,reset:Re,refresh:le,designable:be,setDesignable:je},children:(0,W.jsx)(a.FormProvider,{form:Ae,children:(0,W.jsx)(P.G,{inherit:!0,scope:se,components:B,children:q})})})};V.displayName="SchemaComponentProvider";var G=e(31601),Q=function(H){m()(ne,H);var Z=h()(ne);function ne(){return f()(this,ne),Z.apply(this,arguments)}return o()(ne,[{key:"load",value:function(){var ee=d()(l()().mark(function q(){return l()().wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:this.addComponents();case 1:case"end":return pe.stop()}},q,this)}));function B(){return ee.apply(this,arguments)}return B}()},{key:"addComponents",value:function(){this.app.addComponents({DesignableSwitch:y})}}]),ne}(G.S),U=null},84577:function(ze,X,e){"use strict";e.d(X,{zz:function(){return K.zz},Pl:function(){return K.Pl},oB:function(){return K.oB},lI:function(){return l},hi:function(){return b.hi},eJ:function(){return z.e},Co:function(){return f},aZ:function(){return b.aZ},ng:function(){return K.ng},et:function(){return o.e},cL:function(){return c},fd:function(){return R},Cl:function(){return M},vH:function(){return L},sR:function(){return K.sR},wN:function(){return D.w},Dm:function(){return O},fM:function(){return b.fM}});var $=e(67294),l=function(y){var I=(0,$.useRef)(null);return(0,$.useEffect)(function(){return I.current&&y!==I.current&&I.current.onUnmount(),I.current=y,y.onMount(),function(){y.onUnmount()}},[y]),y},z=e(96365),d=e(80844),A=e(96486),f=function(y,I){var v=(0,$.useContext)(d.SchemaOptionsContext),S=v.components;return y?typeof y!="string"?y:(0,A.get)(S,y)||I:I},K=e(94516),o=e(98146),N=e(97857),m=e.n(N),M=function(y){var I=(0,$.useContext)(d.SchemaOptionsContext),v=(0,$.useContext)(d.SchemaExpressionScopeContext),S=(0,$.useRef)();return S.current=v,y.toFieldProps(m()(m()({},I),{},{get scope(){return m()(m()({},I.scope),S.current)}}))},h=e(61736);function O(){return(0,$.useContext)(h.D)}var n=e(26793),r=e(6145),c=function(){var y,I=(0,r.useCollectionManager_deprecated)(),v=I.getCollectionJoinField,S=I.getCollection,P=(0,d.useFieldSchema)(),i=(0,r.useCollection_deprecated)(),w=i.getField,E=w(P.name)||v(P["x-collection-field"]),C=(0,n.$)(),u=C.t,a=((y=P["x-component-props"])===null||y===void 0?void 0:y.fieldNames)||{},p=a.label,j=(0,$.useMemo)(function(){if(!(!E||!(E!=null&&E.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m"].includes(E.interface)){var F=S(E.target);if((F==null?void 0:F.template)==="file")return[{label:u("Record picker"),value:"CollectionField"},{label:u("Select"),value:"AssociationSelect"}];switch(E.interface){case"o2m":return[{label:u("Record picker"),value:"CollectionField"},{label:u("Subtable"),value:"TableField"},{label:u("Select"),value:"AssociationSelect"}];case"m2o":case"m2m":case"linkTo":return[{label:u("Record picker"),value:"CollectionField"},{label:u("Select"),value:"AssociationSelect"}];default:return[{label:u("Record picker"),value:"CollectionField"},{label:u("Subform"),value:"FormField"},{label:u("Select"),value:"AssociationSelect"}]}}},[u,E==null?void 0:E.interface,p]);return j},L=function(){var y,I=(0,d.useField)(),v=(0,d.useFieldSchema)(),S=(0,r.useCollection_deprecated)(),P=S.getField,i=(0,r.useCollectionManager_deprecated)(),w=i.getCollectionJoinField,E=P(v.name)||w(v["x-collection-field"]),C=(0,z.e)();(0,$.useEffect)(function(){if(!(I!=null&&I.title)){var u;I.title=C(E==null||(u=E.uiSchema)===null||u===void 0?void 0:u.title)}},[E==null||(y=E.uiSchema)===null||y===void 0?void 0:y.title])},D=e(9780),b=e(18686),R=function(y){var I,v=(0,n.$)(),S=v.t,P=(0,r.useCollectionManager_deprecated)(),i=P.getCollectionJoinField,w=P.getCollection,E=(0,d.useFieldSchema)(),C=(y==null?void 0:y.fieldSchema)||E,u=(0,d.useField)(),a=(0,d.useForm)(),p=(C==null?void 0:C["x-read-pretty"])||u.readPretty||a.readPretty,j=y==null?void 0:y.fieldSchema,F=(0,r.useCollection_deprecated)(),t=F.getField,x=(y==null?void 0:y.collectionField)||t(C.name)||i(C["x-collection-field"]),k=((I=C["x-component-props"])===null||I===void 0?void 0:I.fieldNames)||{},V=k.label,G=(0,$.useMemo)(function(){if(!(!x||!(x!=null&&x.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m","updatedBy","createdBy","mbm"].includes(x.interface)){var Q=w(x.target);if((Q==null?void 0:Q.template)==="file")return p?[{label:S("Title"),value:"Select"},{label:S("File manager"),value:"FileManager"},{label:S("Tag"),value:"Tag"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},{label:S("File manager"),value:"FileManager"}];if((Q==null?void 0:Q.template)==="tree"&&["m2m","o2m","m2o"].includes(x.interface))return p?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!j&&{label:S("Sub-details"),value:"Nester"},!j&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!j&&["m2m","o2m"].includes(x.interface)&&{label:S("Sub-table"),value:"SubTable"},!j&&{label:S("Cascade Select"),value:"CascadeSelect"},!j&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];switch(x.interface){case"o2m":return p?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!j&&{label:S("Sub-table"),value:"SubTable"},!j&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!j&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"},!j&&{label:S("Sub-table"),value:"SubTable"}];case"m2m":case"mbm":return p?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!j&&{label:S("Sub-details"),value:"Nester"},!j&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!j&&{label:S("Sub-table"),value:"SubTable"},!j&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];case"m2o":case"linkTo":return p?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!j&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!j&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];default:return p?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!j&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!j&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}]}}},[S,x==null?void 0:x.interface,V]);return(G||[]).filter(Boolean)}},18686:function(ze,X,e){"use strict";e.d(X,{aZ:function(){return y},fM:function(){return v},hi:function(){return I}});var $=e(5574),l=e.n($),z=e(97857),d=e.n(z),A=e(80844),f=e(83204),K=e(9361),o=e(96486),N=e.n(o),m=e(67294),M=e(40868),h=e(21143),O=e(10097),n=e(1892),r=e(28561),c=function(i,w,E,C){return i?C.paddingContentHorizontalLG:E?w?C.controlPaddingHorizontal+3*C.controlPaddingHorizontalSM+22+C.paddingContentHorizontalLG:C.paddingContentHorizontalLG+12:w?C.paddingSM+C.controlHeight+C.marginXS+2*C.controlPaddingHorizontalSM+22+C.paddingContentHorizontalLG:C.controlHeight+C.marginXS+(C.paddingXXS+2)*2+C.paddingContentHorizontalLG},L=function(i){var w=K.Z.useToken(),E=w.token,C=(0,M.ngQ)(),u=C.designable,a=(0,O.useBlockHeightProps)(),p=a.heightProps,j=i||p||{},F=j.disablePageHeader,t=j.enablePageTabs,x=j.hidePageTitle,k=E.sizeXXL-2,V=u?E.controlHeight+2*E.paddingContentHorizontalLG:1*E.paddingContentHorizontalLG,G=c(F,t,x,E);return k+G+V},D=function(){var i=K.Z.useToken(),w=i.token,E=(0,M.ngQ)(),C=E.designable,u=w.paddingContentVerticalLG+w.margin+2*w.paddingContentVertical+24,a=C?w.controlHeight+2*w.paddingContentHorizontalLG:1*w.paddingContentHorizontalLG;return u+a},b=function(i){var w=(0,A.useFieldSchema)(),E=S(w),C=L(i),u=D();return E?u:C},R=["users_jobs","approvals","approvalRecords"],W=function(){var i,w,E=K.Z.useToken(),C=E.token,u=(0,O.useBlockHeightProps)(),a=u.heightProps,p=(0,n.Si)(),j=p.heightProps,F=(0,M.ngQ)(),t=F.designable,x=(0,A.useFieldSchema)(),k=j||a,V=b(k),G=(i=(0,h.useDataBlockRequest)())!==null&&i!==void 0?i:{},Q=G.data,U=(0,h.useCollection)(),H=U.name,Z=(Q==null?void 0:Q.meta)||{},ne=Z.count,ee=Z.pageSize,B=ne>ee,q=k.heightMode,re=k.height,pe=k.title;if(!(!(k!=null&&k.heightMode)||q===r.j.DEFAULT)){var le=Object.keys(((w=x.parent.properties.actions)===null||w===void 0?void 0:w.properties)||{}).length>0,he=B?C.controlHeight+C.padding+C.marginLG:C.marginLG,_e=le||t?C.controlHeight+2*C.marginLG:C.marginLG,Fe=(t&&!R.includes(H)?C.controlHeight:22)+2*C.padding+1,ge=pe?C.fontSizeLG*C.lineHeightLG+C.padding*2-1:0;return q===r.j.FULL_HEIGHT?window.innerHeight-V-ge-Fe-_e-he:re-ge-_e-Fe-he}},y=function(i){var w=(0,O.useBlockHeightProps)(),E=w.heightProps,C=b(),u=K.Z.useToken(),a=u.token,p=E||{},j=p.heightMode,F=p.height,t=p.title,x=t?a.fontSizeLG*a.lineHeightLG+a.padding*2-1:0;if(!(!(E!=null&&E.heightMode)||j===r.j.DEFAULT)){if(j===r.j.FULL_HEIGHT){var k=window.innerHeight-C;return i!=null&&i.removeBlockHeaderHeight&&(k=k-x),i!=null&&i.innerExtraHeight&&(k=k-i.innerExtraHeight),k}return F}},I=function(){var i=(0,A.useFieldSchema)(),w=(0,m.useMemo)(function(){return(0,O.getPageSchema)(i)},[]),E=(w==null?void 0:w["x-component-props"])||{},C=E.disablePageHeader,u=E.enablePageTabs,a=E.hidePageTitle,p=d()(d()({},i==null?void 0:i["x-component-props"]),{},{disablePageHeader:C,enablePageTabs:u,hidePageTitle:a}),j=b(p),F=p||{},t=F.heightMode,x=F.height;if(!(!(p!=null&&p.heightMode)||t===r.j.DEFAULT))return t===r.j.FULL_HEIGHT?window.innerHeight-j:x},v=function(){var i=(0,m.useState)(),w=l()(i,2),E=w[0],C=w[1],u=(0,m.useRef)(null),a=W(),p=(0,m.useCallback)((0,o.debounce)(function(){var F;if(u.current){var t=u.current.getBoundingClientRect(),x=(F=u.current.querySelector(".ant-table"))===null||F===void 0?void 0:F.getBoundingClientRect();x&&C(t.width)}},100),[a]),j=(0,m.useCallback)(function(F){u.current=F&&F.children?F.children[0]:null,p()},[p]);return(0,f.Z)("resize",p),{height:a,width:E,tableSizeRefCallback:j}},S=function P(i){return i?i["x-component"]==="Action.Container"?!0:P(i.parent):null}},96365:function(ze,X,e){"use strict";e.d(X,{e:function(){return o}});var $=e(97857),l=e.n($),z=e(52677),d=e.n(z),A=e(80844),f=e(67294),K={},o=function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{noCache:!1},M=m.noCache,h=(0,f.useContext)(A.SchemaOptionsContext),O=(0,f.useContext)(A.SchemaExpressionScopeContext);return function(n,r){var c=!1,L;if(typeof n=="string"&&n.startsWith("{{")&&(c=!0,L=n),n&&d()(n)==="object"&&!(0,f.isValidElement)(n)&&(c=!0,L=JSON.stringify(n)),Array.isArray(n)&&(c=!0),c){var D=l()(l()(l()({},h.scope),O),r);if(!L)return A.Schema.compile(n,D);try{return M?A.Schema.compile(n,D):(K[L]=K[L]||A.Schema.compile(n,D),K[L])}catch(b){return console.log("useCompile error",n,b),A.Schema.compile(n,D)}}return n}}},94516:function(ze,X,e){"use strict";e.d(X,{zz:function(){return V},Pl:function(){return p},oB:function(){return x},ng:function(){return Q},sR:function(){return G}});var $=e(5574),l=e.n($),z=e(19632),d=e.n(z),A=e(15009),f=e.n(A),K=e(99289),o=e.n(K),N=e(12444),m=e.n(N),M=e(72004),h=e.n(M),O=e(9783),n=e.n(O),r=e(97857),c=e.n(r),L=e(80844),D=e(84327),b=e(45360),R=e(50361),W=e.n(R),y=e(27361),I=e.n(y),v=e(36968),S=e.n(v),P=e(67294),i=e(26793),w=e(12174),E=e(61736);function C(U,H){if(U)return U["x-app-version"]||(U["x-app-version"]=H),Object.keys(U.properties||{}).forEach(function(Z){var ne;C((ne=U.properties)===null||ne===void 0?void 0:ne[Z],H)}),U}var u={i8:"1.3.53"},a=e(85893);function p(U){return new V(U)}var j=function U(H){H&&(H["x-uid"]||(H["x-uid"]=(0,D.uid)()),Object.keys(H.properties||{}).forEach(function(Z){U(H.properties[Z])}))},F=function(H){return H},t=function(H,Z){if(!(!H||!Z)){for(var ne in Z)if(Object.prototype.hasOwnProperty.call(Z,ne)){var ee=Z[ne];if(ee!==(H==null?void 0:H[ne]))return!1}return!0}},x=function(H,Z){if(H["x-uid"]&&H["x-uid"]===Z["x-uid"])return[null,H.toJSON()];var ne=H.toJSON(),ee=c()(c()({},ne),{},{properties:{}}),B=null,q=function re(pe,le){Object.keys(pe||{}).forEach(function(he){var _e=pe[he];if(_e["x-uid"]===Z["x-uid"]){B=pe[he];return}else le.properties[he]=c()(c()({},_e),{},{properties:{}}),re(_e==null?void 0:_e.properties,le.properties[he])})};return q(ne.properties,ee),[ee,B]},k=function(H){return H},V=function(){function U(H){m()(this,U),n()(this,"current",void 0),n()(this,"options",void 0),n()(this,"appVersion",void 0),n()(this,"events",{}),this.options=H,this.current=H.current,this.appVersion=H.appVersion}return h()(U,[{key:"model",get:function(){return this.options.model}},{key:"query",get:function(){return this.options.query}},{key:"loadAPIClientEvents",value:function(){var Z=this,ne=this.options,ee=ne.api,B=ne.t,q=B===void 0?k:B;if(ee){var re=function(le){if(!le)return[];var he=Object.values(le.properties).length,_e=[];return le.mapProperties(function(Fe){Fe["x-component-props"]=Fe["x-component-props"]||{},Fe["x-component-props"].width=100/he,Fe["x-uid"]&&_e.push({"x-uid":Fe["x-uid"],"x-component-props":Fe["x-component-props"]})}),le["x-uid"]&&_e.length?_e:[]};this.on("insertAdjacent",function(){var pe=o()(f()().mark(function le(he){var _e,Fe,ge,Ae,De,me,se,Ce,oe,fe;return f()().wrap(function(be){for(;;)switch(be.prev=be.next){case 0:if(Fe=he.onSuccess,ge=he.current,Ae=he.position,De=he.schema,me=he.wrap,se=he.wrapped,Ce=he.removed,oe=[],(se==null?void 0:se["x-component"])==="Grid.Col"&&(oe=oe.concat(re(se.parent))),(Ce==null?void 0:Ce["x-component"])==="Grid.Col"&&(oe=oe.concat(re(Ce.parent))),Z.refresh(),ge["x-uid"]){be.next=7;break}return be.abrupt("return");case 7:return be.next=9,ee.request({url:"/uiSchemas:insertAdjacent/".concat(ge["x-uid"],"?position=").concat(Ae),method:"post",data:{schema:C(De,Z.appVersion),wrap:me}});case 9:if(fe=be.sent,!oe.length){be.next=13;break}return be.next=13,ee.request({url:"/uiSchemas:batchPatch",method:"post",data:oe});case 13:if(!(Ce!=null&&Ce["x-uid"])){be.next=16;break}return be.next=16,ee.request({url:"/uiSchemas:remove/".concat(Ce["x-uid"]),method:"post"});case 16:Fe==null||Fe(fe==null||(_e=fe.data)===null||_e===void 0?void 0:_e.data),b.ZP.success(q("Saved successfully"),.2);case 18:case"end":return be.stop()}},le)}));return function(le){return pe.apply(this,arguments)}}()),this.on("patch",function(){var pe=o()(f()().mark(function le(he){var _e;return f()().wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:if(_e=he.schema,Z.refresh(),_e!=null&&_e["x-uid"]){ge.next=4;break}return ge.abrupt("return");case 4:return ge.next=6,ee.request({url:"/uiSchemas:patch",method:"post",data:c()({},_e)});case 6:b.ZP.success(q("Saved successfully"),.2);case 7:case"end":return ge.stop()}},le)}));return function(le){return pe.apply(this,arguments)}}()),this.on("initializeActionContext",function(){var pe=o()(f()().mark(function le(he){var _e;return f()().wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:if(_e=he.schema,Z.refresh(),_e!=null&&_e["x-uid"]){ge.next=4;break}return ge.abrupt("return");case 4:return ge.next=6,ee.request({url:"/uiSchemas:initializeActionContext",method:"post",data:c()({},_e)});case 6:case"end":return ge.stop()}},le)}));return function(le){return pe.apply(this,arguments)}}()),this.on("batchPatch",function(){var pe=o()(f()().mark(function le(he){var _e;return f()().wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return _e=he.schemas,Z.refresh(),ge.next=4,ee.request({url:"/uiSchemas:batchPatch",method:"post",data:_e});case 4:b.ZP.success(q("Saved successfully"),.2);case 5:case"end":return ge.stop()}},le)}));return function(le){return pe.apply(this,arguments)}}()),this.on("remove",function(){var pe=o()(f()().mark(function le(he){var _e,Fe;return f()().wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:if(_e=he.removed,Fe=[],(_e==null?void 0:_e["x-component"])==="Grid.Col"&&(Fe=re(_e.parent)),Z.refresh(),_e!=null&&_e["x-uid"]){Ae.next=6;break}return Ae.abrupt("return");case 6:return Ae.next=8,ee.request({url:"/uiSchemas:remove/".concat(_e["x-uid"]),method:"post"});case 8:if(!Fe.length){Ae.next=11;break}return Ae.next=11,ee.request({url:"/uiSchemas:batchPatch",method:"post",data:Fe});case 11:b.ZP.success(q("Saved successfully"),.2);case 12:case"end":return Ae.stop()}},le)}));return function(le){return pe.apply(this,arguments)}}())}}},{key:"prepareProperty",value:function(Z){Z.type||(Z.type="void"),Z.name||(Z.name=(0,D.uid)()),this.current["x-uid"]&&j(Z)}},{key:"on",value:function(Z,ne){this.events[Z]||(this.events[Z]=[]),this.events[Z].push(ne)}},{key:"emit",value:function(){var H=o()(f()().mark(function ne(ee){var B=this,q,re,pe,le,he,_e=arguments;return f()().wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:if(this.events[ee]){ge.next=2;break}return ge.abrupt("return");case 2:for(q=_e.length,re=new Array(q>1?q-1:0),pe=1;pe<q;pe++)re[pe-1]=_e[pe];return le=re[0],he=re.slice(1),ge.abrupt("return",Promise.all(this.events[ee].map(function(Ae){return Ae.bind(B).apply(void 0,[c()({current:B.current},le)].concat(d()(he)))})));case 5:case"end":return ge.stop()}},ne,this)}));function Z(ne){return H.apply(this,arguments)}return Z}()},{key:"parentsIn",value:function(Z){if(!Z||!L.Schema.isSchemaInstance(Z))return!1;for(var ne=this.current;(ee=ne)!==null&&ee!==void 0&&ee.parent;){var ee;if(ne.parent===Z)return!0;ne=ne.parent}return!1}},{key:"refresh",value:function(){var Z=this.options.refresh;return Z==null?void 0:Z()}},{key:"deepMerge",value:function(Z){var ne=this,ee={title:"title",description:"description",default:"initialValue",readOnly:"readOnly",writeOnly:"editable",enum:"dataSource","x-pattern":"pattern","x-display":"display","x-validator":"validator","x-decorator":"decorator","x-component":"component","x-reactions":"reactions","x-content":"content","x-visible":"visible","x-hidden":"hidden","x-disabled":"disabled","x-editable":"editable","x-read-only":"readOnly"},B={"x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(Z).forEach(function(q){ee[q]?(ne.current[q]=Z[q],ne.updateModel(ee[q],Z[q])):B[q]?Object.keys(Z[q]).forEach(function(re){S()(ne.current,[q,re],Z[q][re]),ne.updateModel([B[q],re],Z[q][re])}):ne.current[q]=Z[q]}),this.emit("patch",{schema:Z})}},{key:"getSchemaAttribute",value:function(Z,ne){return I()(this.current,Z,ne)}},{key:"shallowMerge",value:function(Z){var ne=this,ee={title:"title",description:"description",default:"initialValue",readOnly:"readOnly",writeOnly:"editable",enum:"dataSource","x-pattern":"pattern","x-display":"display","x-validator":"validator","x-decorator":"decorator","x-component":"component","x-reactions":"reactions","x-content":"content","x-visible":"visible","x-hidden":"hidden","x-disabled":"disabled","x-editable":"editable","x-read-only":"readOnly","x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(Z).forEach(function(B){ne.current[B]=Z[B],ee[B]&&ne.updateModel(ee[B],Z[B])}),this.emit("patch",{schema:Z})}},{key:"updateModel",value:function(Z,ne){var ee=function(q){S()(q,Z,ne)};this.model&&ee(this.model),this.query&&this.query.take(ee)}},{key:"insertAdjacent",value:function(Z,ne){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};switch(Z){case"beforeBegin":return this.insertBeforeBegin(ne,ee);case"afterBegin":return this.insertAfterBegin(ne,ee);case"beforeEnd":return this.insertBeforeEnd(ne,ee);case"afterEnd":return this.insertAfterEnd(ne,ee)}}},{key:"recursiveRemoveIfNoChildren",value:function(Z,ne){if(Z){for(var ee=Z,B,q=ne==null?void 0:ne.breakRemoveOn;ee;){if(typeof q=="function"){if(q(ee))break}else if(t(ee,q))break;var re=Object.keys(ee.properties||{}).length;if(re>0)break;ee.parent&&(B=ee.parent.removeProperty(ee.name)),ee=ee.parent}return B}}},{key:"remove",value:function(Z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee=ne.breakRemoveOn,B=ne.removeParentsIfNoChildren,q=Z||this.current,re=q.parent.removeProperty(q.name);if(B){var pe=this.recursiveRemoveIfNoChildren(q.parent,{breakRemoveOn:ee});pe&&(re=pe)}return this.emit("remove",{removed:re})}},{key:"removeWithoutEmit",value:function(Z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee=ne.breakRemoveOn,B=ne.removeParentsIfNoChildren,q=Z||this.current,re=q.parent.removeProperty(q.name);if(B){var pe=this.recursiveRemoveIfNoChildren(q.parent,{breakRemoveOn:ee});pe&&(re=pe)}return re}},{key:"insertBeforeBeginOrAfterEnd",value:function(Z){var ne=this,ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(L.Schema.isSchemaInstance(this.current)&&L.Schema.isSchemaInstance(Z)&&this.current.parent===Z.parent){var B=0,q=0;return this.current.parent.mapProperties(function(re,pe,le){ne.current.name===pe&&(q=le),Z.name===pe&&(B=le)}),B>q?this.insertBeforeBegin(Z,ee):this.insertAfterEnd(Z,ee)}}},{key:"insertBeforeBegin",value:function(Z){var ne=this,ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(L.Schema.isSchemaInstance(this.current)){var B={onSuccess:ee.onSuccess},q=ee.wrap,re=q===void 0?F:q,pe=ee.breakRemoveOn,le=ee.removeParentsIfNoChildren;if(L.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),le&&(B.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:pe}))}else Z&&(Z=W()(Z));var he={},_e=!1,Fe=0,ge=0;this.current.parent.mapProperties(function(fe,xe){xe===ne.current.name&&(ge=Fe,_e=!0,++Fe),fe["x-index"]=Fe,++Fe,_e&&(he[xe]=fe,ne.current.parent.removeProperty(xe))}),this.prepareProperty(Z);var Ae=re(Z),De=this.current.parent.addProperty(Ae.name||(0,D.uid)(),Ae);De["x-index"]=ge,De.parent=this.current.parent,this.current.parent.setProperties(he);var me=x(De,Z),se=l()(me,2),Ce=se[0],oe=se[1];this.emit("insertAdjacent",c()({position:"beforeBegin",schema:oe,wrapped:Ae,wrap:Ce},B))}}},{key:"insertAfterBegin",value:function(Z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(L.Schema.isSchemaInstance(this.current)){var ee={onSuccess:ne.onSuccess},B=ne.wrap,q=B===void 0?F:B,re=ne.breakRemoveOn,pe=ne.removeParentsIfNoChildren;if(L.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),pe&&(ee.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:re}))}else Z&&(Z=W()(Z));var le={},he=1;this.current.mapProperties(function(se,Ce){se["x-index"]=he,++he,le[Ce]=se}),this.current.properties={},this.prepareProperty(Z);var _e=q(Z),Fe=this.current.addProperty(_e.name||(0,D.uid)(),_e);Fe["x-index"]=0,Fe.parent=this.current,this.current.setProperties(le);var ge=x(Fe,Z),Ae=l()(ge,2),De=Ae[0],me=Ae[1];this.emit("insertAdjacent",c()({position:"afterBegin",schema:me,wrap:De,wrapped:_e},ee))}}},{key:"insertBeforeEnd",value:function(Z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(L.Schema.isSchemaInstance(this.current)){delete Z["x-index"];var ee={onSuccess:ne.onSuccess},B=ne.wrap,q=B===void 0?F:B,re=ne.breakRemoveOn,pe=ne.removeParentsIfNoChildren;if(L.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),pe&&(ee.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:re}))}else Z&&(Z=W()(Z));this.prepareProperty(Z);var le=q(Z),he=this.current.addProperty(le.name||(0,D.uid)(),le);he.parent=this.current;var _e=x(he,Z),Fe=l()(_e,2),ge=Fe[0],Ae=Fe[1];return this.emit("insertAdjacent",c()({position:"beforeEnd",schema:Ae,wrap:ge,wrapped:le},ee))}}},{key:"insertAfterEnd",value:function(Z){var ne=this,ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(L.Schema.isSchemaInstance(this.current)){var B={onSuccess:ee==null?void 0:ee.onSuccess},q=ee.wrap,re=q===void 0?F:q,pe=ee.breakRemoveOn,le=ee.removeParentsIfNoChildren,he=0,_e=0,Fe=!1,ge={};if(this.current.parent.mapProperties(function(fe,xe){fe["x-index"]=he,xe===ne.current.name&&(++he,_e=he,Fe=!0),++he,Fe&&xe!==ne.current.name&&(ge[xe]=fe,ne.current.parent.removeProperty(xe))}),L.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),le&&(B.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:pe})),Z.parent=null}else Z&&(Z=W()(Z));this.prepareProperty(Z);var Ae=re(Z),De=this.current.parent.addProperty(Ae.name||(0,D.uid)(),Ae);De.parent=this.current.parent,De["x-index"]=_e,this.current.parent.setProperties(ge);var me=x(De,Z),se=l()(me,2),Ce=se[0],oe=se[1];this.emit("insertAdjacent",c()({position:"afterEnd",schema:oe,wrap:Ce,wrapped:Ae},B))}}}]),U}();function G(){var U=(0,P.useContext)(L.SchemaOptionsContext),H=(0,P.useMemo)(function(){return(U==null?void 0:U.components)||{}},[U]),Z=function(ee){if(!ee)return null;if(typeof ee!="string")return ee;var B=I()(H,ee);return B||console.error('[nocobase]: Component "'.concat(ee,'" not found')),B};return Z}function Q(){var U=(0,P.useContext)(E.D),H=U.designable,Z=U.setDesignable,ne=U.refresh,ee=U.reset,B=(0,P.useContext)(L.SchemaOptionsContext),q=(0,P.useMemo)(function(){return(B==null?void 0:B.components)||{}},[B]),re=(0,P.useMemo)(function(){return function(){return(0,a.jsx)(a.Fragment,{})}},[]),pe=(0,L.useField)(),le=(0,L.useFieldSchema)(),he=(0,w.LY)(),_e=(0,i.$)(),Fe=_e.t,ge=(0,P.useMemo)(function(){return p({t:Fe,api:he,refresh:ne,current:le,model:pe,appVersion:u.i8})},[Fe,he,ne,le,pe]);return(0,P.useEffect)(function(){ge.loadAPIClientEvents()},[ge]),{dn:ge,designable:H,reset:ee,refresh:ne,setDesignable:Z,DesignableBar:re,findComponent:(0,P.useCallback)(function(Ae){return Ae?typeof Ae!="string"?Ae:I()(q,Ae):null},[I()]),on:ge.on.bind(ge),patch:(0,P.useCallback)(function(Ae,De){var me=function(oe){Object.keys(oe).forEach(function(fe){var xe=oe[fe];fe==="title"&&(pe.title=xe,le.title=xe),fe==="x-decorator-props"&&(pe.decoratorProps||(pe.decoratorProps={}),le["x-decorator-props"]||(le["x-decorator-props"]={}),Object.keys(xe).forEach(function(be){pe.decoratorProps[be]=xe[be],le["x-decorator-props"][be]=xe[be]})),fe==="x-component-props"&&(pe.componentProps||(pe.componentProps={}),le["x-component-props"]||(le["x-component-props"]={}),Object.keys(xe).forEach(function(be){pe.componentProps[be]=xe[be],le["x-component-props"][be]=xe[be]}))})};if(typeof Ae=="string"){var se={};return S()(se,Ae,De),me(se)}me(Ae),ne()},[ge]),shallowMerge:(0,P.useCallback)(function(Ae){ge.shallowMerge(Ae)},[ge]),deepMerge:(0,P.useCallback)(function(Ae){ge.deepMerge(Ae)},[ge]),remove:(0,P.useCallback)(function(Ae,De){ge.remove(Ae,De)},[ge]),insertAdjacent:(0,P.useCallback)(function(Ae,De,me){ge.insertAdjacent(Ae,De,me)},[ge]),insertBeforeBegin:(0,P.useCallback)(function(Ae){ge.insertBeforeBegin(Ae)},[ge]),insertAfterBegin:(0,P.useCallback)(function(Ae){ge.insertAfterBegin(Ae)},[ge]),insertBeforeEnd:(0,P.useCallback)(function(Ae){ge.insertBeforeEnd(Ae)},[ge]),insertAfterEnd:(0,P.useCallback)(function(Ae){ge.insertAfterEnd(Ae)},[ge])}}},98146:function(ze,X,e){"use strict";e.d(X,{e:function(){return f}});var $=e(80844),l=e(84577),z=e(67294),d=e(26386),A=function(){return null},f=function(){var o=(0,l.ng)(),N=o.designable,m=(0,$.useFieldSchema)(),M=(0,z.useMemo)(function(){return m["x-designer"]||m["x-toolbar"]?m["x-designer"]||m["x-toolbar"]:m["x-settings"]?d.Mf:A},[m]),h=(0,l.Co)(M);return N&&h||A}},9780:function(ze,X,e){"use strict";e.d(X,{w:function(){return K}});var $=e(97857),l=e.n($),z=e(13769),d=e.n(z),A=["useProps"],f=function(){return{}},K=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=N.useProps,M=m===void 0?f:m,h=d()(N,A),O=M;typeof M!="function"&&(O=f);var n=O();return l()(l()({},h),n)}},40868:function(ze,X,e){"use strict";e.d(X,{aUM:function(){return y.aU},olz:function(){return y.ol},N0i:function(){return y.N0},fWn:function(){return y.fW},EIK:function(){return y.EI},$Lt:function(){return y.$L},$b8:function(){return y.$b},HTy:function(){return ya},lkv:function(){return wr},rDu:function(){return Ja},eYL:function(){return y.eY},Rat:function(){return Hr},oAt:function(){return Sr},E7E:function(){return br},$SD:function(){return mi},fUi:function(){return $r.fU},QcG:function(){return Hl},MLy:function(){return _o.M},gOu:function(){return _s},jYG:function(){return Na.j},C1I:function(){return y.C1},Ssf:function(){return Jl},vTp:function(){return Xl},XZJ:function(){return Xr},Tt2:function(){return ns},zH8:function(){return ls},Q5L:function(){return cs},Pok:function(){return vi},Vm0:function(){return ps},xI_:function(){return rs},Lip:function(){return os},Mtg:function(){return qr.Mt},iNu:function(){return qr.iN},zzt:function(){return jt.zz},_bl:function(){return b._b},POi:function(){return fs},AOY:function(){return he},LBT:function(){return D.DndContext},IWB:function(){return D.DragHandler},LCt:function(){return D.DraggableContext},FyH:function(){return re.Fy},Nir:function(){return re.Ni},q8U:function(){return re.q8},HGA:function(){return re.HG},QTe:function(){return re.QT},JEX:function(){return re.JE},fAH:function(){return dl},$w$:function(){return re.$w},nBj:function(){return re.nB},Oct:function(){return re.Oc},zdw:function(){return re.zd},CXR:function(){return ul},BQs:function(){return yr.BQ},Hj5:function(){return Bn.H},M0b:function(){return pi},wn$:function(){return xn.wn},GzZ:function(){return xn.Gz},tJZ:function(){return xn.tJ},fox:function(){return xn.fo},VTd:function(){return xn.VT},XsZ:function(){return xn.Xs},AsW:function(){return Zo},cLM:function(){return Wo},m__:function(){return Oo},l09:function(){return ee},D_t:function(){return Qi.D},WiK:function(){return Vn},xJW:function(){return re.xJ},RVL:function(){return b.RV},Bc8:function(){return St},hG9:function(){return hi},DCh:function(){return fi},rjZ:function(){return ea.rj},Cqo:function(){return $a},jg7:function(){return ea.jg},gsn:function(){return yr.gs},$18:function(){return Is},IIB:function(){return yr.II},RnZ:function(){return qi},mX2:function(){return yr.mX},zDC:function(){return cr.zD},Phs:function(){return yr.Ph},aVo:function(){return Va},UGj:function(){return nl},yq5:function(){return ol},v2r:function(){return ua},HIW:function(){return Du},T3C:function(){return or},d97:function(){return Qr.d9},hGv:function(){return mr},tlE:function(){return Qs},rop:function(){return Xs},gGi:function(){return qs},DBW:function(){return va.D},MBS:function(){return eu.M},pGO:function(){return nu},Y8K:function(){return Pi},iVT:function(){return yr.iV},ODP:function(){return cr.OD},lbb:function(){return cr.lb},b7w:function(){return cr.b7},sUk:function(){return cr.sU},x1j:function(){return y.x1},m1v:function(){return b.m1},glM:function(){return Vt},xZD:function(){return y.xZ},IuH:function(){return xn.Iu},MkN:function(){return y.Mk},Hof:function(){return ru},n6:function(){return b.n6},DDd:function(){return hv.D},G0E:function(){return b.G0},a$w:function(){return b.a$},TzZ:function(){return b.Tz},y00:function(){return y.y0},PhF:function(){return _t},Cqv:function(){return D.ShowFormData},cof:function(){return y.co},bts:function(){return D.Sortable},Fop:function(){return D.SortableContext},TRI:function(){return D.SortableItem},ORg:function(){return D.SortableProvider},TaI:function(){return au},qHe:function(){return kn.q},iA_:function(){return Lr},gvM:function(){return fu},SnY:function(){return ml},ASv:function(){return gu},bwk:function(){return Zr},mQc:function(){return Si},c__:function(){return ka.c},QZ3:function(){return At},L39:function(){return Na.L},jII:function(){return vl},mPs:function(){return yu},tgM:function(){return Eu},gqx:function(){return $r.gq},Qm7:function(){return $r.Qm},_wD:function(){return Pa._w},rjl:function(){return Pa.rj},Fjw:function(){return y.Fj},SLL:function(){return y.SL},sBv:function(){return y.sB},iTm:function(){return re.iT},Pls:function(){return jt.Pl},Oxq:function(){return wt},WLi:function(){return we},$9M:function(){return re.$9},nCn:function(){return za},iNG:function(){return _a},tD8:function(){return Ci},pg9:function(){return Zn},Ofb:function(){return re.Of},ibf:function(){return Xn},WyG:function(){return q},l6$:function(){return Ie.l6},WGR:function(){return An},C$H:function(){return cr.C$},cNQ:function(){return cr.cN},I9l:function(){return D.getRenderContent},XQ2:function(){return zr.XQ},ZZb:function(){return re.ZZ},elO:function(){return cr.el},CfU:function(){return Tr},SJF:function(){return Cr},_Ko:function(){return Nr},Mev:function(){return ma},i2K:function(){return qn},WmO:function(){return xn.Wm},oBi:function(){return jt.oB},hKP:function(){return zr.hK},DU1:function(){return y.DU},XCj:function(){return y.XC},Vpg:function(){return gr},lIL:function(){return jt.lI},KxP:function(){return _o.K},hi9:function(){return jt.hi},p27:function(){return y.p2},z9d:function(){return cl.z},eJW:function(){return jt.eJ},Cor:function(){return jt.Co},Zmk:function(){return Qr.Zm},aZq:function(){return jt.aZ},P1D:function(){return qr.P1},ngQ:function(){return jt.ng},ett:function(){return jt.et},ySm:function(){return Bn.y},Zd$:function(){return re.Zd},cLh:function(){return jt.cL},baz:function(){return re.b},fde:function(){return jt.fd},Xdt:function(){return cr.Xd},Cld:function(){return jt.Cl},vH8:function(){return jt.vH},PLH:function(){return xn.PL},V8t:function(){return xn.V8},tMk:function(){return xn.tM},xQm:function(){return xn.xQ},sRe:function(){return jt.sR},frb:function(){return Ro},$N2:function(){return Uo},U1u:function(){return tt},HS$:function(){return y.HS},vBu:function(){return y.vB},QYZ:function(){return y.QY},t9d:function(){return y.t9},Kgy:function(){return xn.Kg},aJ2:function(){return xn.aJ},n14:function(){return ea.n1},DiB:function(){return ea.Di},l1O:function(){return re.l1},w5o:function(){return re.w5},p3Q:function(){return re.p3},G5e:function(){return re.G5},xj2:function(){return re.xj},rxY:function(){return re.rx},Ils:function(){return cr.Il},zCB:function(){return y.zC},a4r:function(){return va.a},wNf:function(){return jt.wN},Dmu:function(){return jt.Dm},Bsl:function(){return b.Bs},yKv:function(){return Js.y},fMB:function(){return jt.fM},gCg:function(){return ka.g},eT6:function(){return re.eT},q4O:function(){return re.q4},ymE:function(){return Pa.ym},uqQ:function(){return y.uq},K5K:function(){return y.K5}});var $={};e.r($),e.d($,{Action:function(){return y.aU},ActionBar:function(){return y.ol},ActionBarProvider:function(){return y.N0},ActionContext:function(){return y.fW},ActionContextProvider:function(){return y.EI},ActionDesigner:function(){return y.$L},AfterSuccess:function(){return y.$b},AntdSchemaComponentPlugin:function(){return ya},AntdSchemaComponentProvider:function(){return wr},AppendsTreeSelect:function(){return Ja},AssignedFieldValues:function(){return y.eY},AssociationField:function(){return Hr},AssociationFieldMode:function(){return Sr},AssociationFieldModeProvider:function(){return br},AssociationSelect:function(){return mi},AttachmentList:function(){return $r.fU},AutoComplete:function(){return Hl},BackButtonUsedInSubPage:function(){return _o.M},Block:function(){return _s},BlockItem:function(){return Na.j},ButtonEditor:function(){return y.C1},CardItem:function(){return Jl},Cascader:function(){return Xl},Checkbox:function(){return Xr},CollectionSelect:function(){return ns},ColorPicker:function(){return ls},ColorSelect:function(){return cs},Cron:function(){return vi},CronSet:function(){return ps},DataSourceCollectionCascader:function(){return rs},DataSourceSelect:function(){return os},DatePicker:function(){return qr.Mt},DatePickerProvider:function(){return qr.iN},Details:function(){return fs},DetailsDesigner:function(){return he},EditComponent:function(){return re.Fy},EditDefaultValue:function(){return re.Ni},EditDescription:function(){return re.q8},EditOperator:function(){return re.HG},EditPattern:function(){return re.QT},EditRequired:function(){return re.JE},EditSortField:function(){return dl},EditTitle:function(){return re.$w},EditTitleField:function(){return re.nB},EditTooltip:function(){return re.Oc},EditValidationRules:function(){return re.zd},Editable:function(){return ul},EllipsisWithTooltip:function(){return yr.BQ},ErrorFallback:function(){return Bn.H},Expand:function(){return pi},Filter:function(){return xn.wn},FilterAction:function(){return xn.Gz},FilterActionContext:function(){return xn.tJ},FilterContext:function(){return xn.fo},FilterDynamicComponent:function(){return xn.VT},FilterLogicContext:function(){return xn.Xs},FixedBlock:function(){return Zo},FixedBlockDesignerItem:function(){return Wo},FixedBlockWrapper:function(){return Oo},Form:function(){return ee},FormDialog:function(){return Qi.D},FormField:function(){return Vn},FormItem:function(){return re.xJ},FormV2:function(){return St},G2Plot:function(){return hi},G2PlotRenderer:function(){return fi},Grid:function(){return ea.rj},GridCard:function(){return $a},GridRowContext:function(){return ea.jg},HTMLEncode:function(){return yr.gs},IconPicker:function(){return Is},Input:function(){return yr.II},InputNumber:function(){return qi},InputReadPretty:function(){return yr.mX},InputRecordPicker:function(){return cr.zD},Json:function(){return yr.Ph},List:function(){return Va},Markdown:function(){return nl},MarkdownReadPretty:function(){return ol},Menu:function(){return ua},NanoIDInput:function(){return Du},Page:function(){return or},PagePopups:function(){return Qr.d9},PageTabs:function(){return mr},Pagination:function(){return Qs},Password:function(){return Xs},Percent:function(){return qs},PopupSettingsProvider:function(){return va.D},Preview:function(){return eu.M},QuickEdit:function(){return nu},Radio:function(){return Pi},ReadPretty:function(){return yr.iV},ReadPrettyRecordPicker:function(){return cr.OD},RecordPicker:function(){return cr.lb},RecordPickerContext:function(){return cr.b7},RecordPickerProvider:function(){return cr.sU},RefreshDataBlockRequest:function(){return y.x1},RemoteSelect:function(){return Vt},RemoveButton:function(){return y.xZ},RemoveConditionContext:function(){return xn.Iu},RequestSettings:function(){return y.Mk},RichText:function(){return ru},SecondConFirm:function(){return y.y0},Select:function(){return _t},SkipValidation:function(){return y.co},Space:function(){return au},StablePopover:function(){return kn.q},Table:function(){return Lr},TableBlockDesigner:function(){return fu},TableField:function(){return ml},TableSelectorDesigner:function(){return gu},TableV2:function(){return Zr},Tabs:function(){return Si},TabsContextProvider:function(){return ka.c},Templates:function(){return At},TestDesigner:function(){return Na.L},TimePicker:function(){return vl},TreeSelect:function(){return yu},UnixTimestamp:function(){return Eu},Upload:function(){return $r.gq},Uploader:function(){return $r.Qm},Variable:function(){return Pa._w},VariableScopeProvider:function(){return Pa.rj},WorkflowConfig:function(){return y.Fj},actionSettings:function(){return y.SL},actionSettingsItems:function(){return y.sB},allowAddNew:function(){return re.iT},defaultFieldNames:function(){return wt},fetchTemplateData:function(){return we},filterFormItemSettings:function(){return re.$9},findByUid:function(){return za},findKeysByUid:function(){return _a},findMenuItem:function(){return Ci},formDetailsSettings:function(){return Zn},formItemSettings:function(){return re.Of},formSettings:function(){return Xn},formV1Settings:function(){return q},genStyleHook:function(){return Ie.l6},getCurrentOptions:function(){return An},getDatePickerLabels:function(){return cr.C$},getLabelFormatValue:function(){return cr.cN},getStoredPopupContext:function(){return zr.XQ},isFileCollection:function(){return re.ZZ},isShowFilePicker:function(){return cr.el},isTabPage:function(){return Tr},navigateToTab:function(){return Cr},pageSettings:function(){return Nr},pageTabSettings:function(){return ma},readPrettyFormSettings:function(){return qn},removeNullCondition:function(){return xn.Wm},storePopupContext:function(){return zr.hK},useActionBarContext:function(){return y.DU},useActionContext:function(){return y.XC},useAssociationFieldModeContext:function(){return gr},useBackButton:function(){return _o.K},useCloseAction:function(){return y.p2},useColumnSchema:function(){return cl.z},useCurrentPopupContext:function(){return Qr.Zm},useDatePickerContext:function(){return qr.P1},useDownloadLogs:function(){return Bn.y},useEnsureOperatorsValid:function(){return re.Zd},useFieldMode:function(){return re.b},useFieldNames:function(){return cr.Xd},useFilterActionProps:function(){return xn.PL},useFilterFieldOptions:function(){return xn.V8},useFilterFieldProps:function(){return xn.tM},useFilterOptions:function(){return xn.xQ},useFixedBlock:function(){return Ro},useFixedSchema:function(){return Uo},useFormDataTemplates:function(){return tt},useGetAriaLabelOfAction:function(){return y.HS},useGetAriaLabelOfDrawer:function(){return y.vB},useGetAriaLabelOfModal:function(){return y.QY},useGetAriaLabelOfPopover:function(){return y.t9},useGetFilterFieldOptions:function(){return xn.Kg},useGetFilterOptions:function(){return xn.aJ},useGridContext:function(){return ea.n1},useGridRowContext:function(){return ea.Di},useIsAddNewForm:function(){return re.l1},useIsAssociationField:function(){return re.w5},useIsFieldReadPretty:function(){return re.p3},useIsFileField:function(){return re.G5},useIsFormReadPretty:function(){return re.xj},useIsSelectFieldMode:function(){return re.rx},useLabelUiSchema:function(){return cr.Il},useLinkageAction:function(){return y.zC},usePopupSettings:function(){return va.a},useStyles:function(){return Js.y},useTabsContext:function(){return ka.g},useTitleFieldOptions:function(){return re.eT},useValidateSchema:function(){return re.q4},useVariableScope:function(){return Pa.ym},useZIndexContext:function(){return y.uq},zIndexContext:function(){return y.K5}});var l=e(15009),z=e.n(l),d=e(99289),A=e.n(d),f=e(12444),K=e.n(f),o=e(72004),N=e.n(o),m=e(31996),M=e.n(m),h=e(26037),O=e.n(h),n=e(97857),r=e.n(n),c=e(67294),L=e(31601),D=e(14896),b=e(70993),R=e(89127),W=function(T){return A()(z()().mark(function te(){var ue,de;return z()().wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Ee.prev=0,Ee.next=3,this.api.request(T);case 3:return de=Ee.sent,Ee.abrupt("return",de==null||(ue=de.data)===null||ue===void 0?void 0:ue.data);case 7:return Ee.prev=7,Ee.t0=Ee.catch(0),Ee.abrupt("return",[]);case 10:case"end":return Ee.stop()}},te,this,[[0,7]])}))},y=e(76157),I=e(13769),v=e.n(I),S=e(57134),P=e(86201),i=e(80844),w=e(28459),E=e(57953),C=e(12174),u=e(6145),a=e(26386),p=e(64016),j=e(15195),F=e(23461),t=e(85893),x=["form","children"],k=["form","children","disabled"],V=["request","effects","initialValue","useValues"],G=function(T){var te=T.form,ue=T.children,de=v()(T,x),Pe=(0,i.useField)(),Ee=(0,i.useFieldSchema)(),Ve=(0,jt.lI)(te.createVoidField(r()(r()({},Pe.props),{},{basePath:""})));return(0,t.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,t.jsx)(i.FormContext.Provider,{value:te,children:(0,t.jsx)(S.FormLayout,r()(r()({layout:"vertical"},de),{},{children:(0,t.jsx)(i.RecursionField,{basePath:Ve.address,schema:Ee,onlyRenderProperties:!0})}))})})},Q=function(T){return T.children},U=function(T){var te=T.form,ue=T.children,de=T.disabled,Pe=v()(T,k),Ee=(0,i.useField)(),Ve=(0,i.useFieldSchema)(),ke=(0,jt.lI)(te.createVoidField(r()(r()({},Ee.props),{},{basePath:""}))),Qe=(0,jt.Co)(Ve["x-component"],Q);return(0,c.useEffect)(function(){te.disabled=de||Ee.disabled},[de,Ee.disabled]),(0,t.jsx)(w.ZP,{componentDisabled:de,children:(0,t.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,t.jsx)(i.FormContext.Provider,{value:te,children:(0,t.jsx)(S.FormLayout,r()(r()({layout:"vertical"},Pe),{},{children:(0,t.jsx)(i.FieldContext.Provider,{value:ke,children:(0,t.jsx)(Qe,r()(r()({},Ee.componentProps),{},{children:(0,t.jsx)(i.RecursionField,{basePath:ke.address,schema:Ve,onlyRenderProperties:!0})}))})}))})})})},H=function(T){var te=T.request,ue=T.initialValue;return te||function(){return Promise.resolve({data:ue})}},Z=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,C.QT)(H(te),T)},ne=(0,c.createContext)(null);ne.displayName="FormBlockContext";var ee=(0,i.observer)(function(J){var T=J.request,te=J.effects,ue=J.initialValue,de=J.useValues,Pe=de===void 0?Z:de,Ee=v()(J,V),Ve=(0,i.useFieldSchema)(),ke=(0,i.useField)(),Qe=(0,c.useMemo)(function(){return(0,P.createForm)({effects:te})},[]),et=Pe({uid:Ve["x-uid"],onSuccess:function(rt){return A()(z()().mark(function ft(){return z()().wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.next=2,Qe.reset();case 2:Qe.setValues(rt==null?void 0:rt.data),Qe.setInitialValues(rt==null?void 0:rt.data);case 4:case"end":return gt.stop()}},ft)}))()}},J),qe=(0,c.useContext)(ne);return(0,t.jsx)(ne.Provider,{value:{parent:qe,form:Qe,result:et,field:ke,fieldSchema:Ve},children:(0,t.jsx)(E.Z,{spinning:(et==null?void 0:et.loading)||!1,children:Ve["x-decorator"]==="Form"?(0,t.jsx)(U,r()({form:Qe},Ee)):(0,t.jsx)(G,r()({form:Qe},Ee))})})},{displayName:"Form"});ee.Designer=function(){var T=(0,u.useCollection_deprecated)(),te=T.name,ue=T.title,de=(0,j.zy)(),Pe=(0,F.rE)(),Ee=Pe.componentNamePrefix;return(0,t.jsxs)(a.aN,{template:de,title:ue||te,children:[(0,t.jsx)(p.G,{componentName:"".concat(Ee,"Form"),collectionName:te}),(0,t.jsx)(a.Z5,{}),(0,t.jsx)(a.qx,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};var B=e(5537),q=new B.F5({name:"FormV1Settings",items:[{name:"template",Component:p.G,useComponentProps:function(){var T=(0,u.useCollection_deprecated)(),te=T.name,ue=(0,F.rE)(),de=ue.componentNamePrefix;return{componentName:"".concat(de,"Form"),collectionName:te}}},{name:"divider",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),re=e(54801),pe=function(){var T=(0,u.useCollection_deprecated)(),te=T.name,ue=T.title,de=(0,j.zy)();return(0,t.jsx)(a.aN,{schemaSettings:"FormSettings",template:de,title:ue||te})},le=function(){var T=(0,u.useCollection_deprecated)(),te=T.name,ue=T.title,de=(0,j.zy)();return(0,t.jsx)(a.aN,{schemaSettings:"ReadPrettyFormSettings",template:de,title:ue||te})},he=function(){var T=(0,u.useCollection_deprecated)(),te=T.name,ue=T.title,de=(0,j.zy)();return(0,t.jsx)(a.aN,{schemaSettings:"FormDetailsSettings",template:de,title:ue||te})},_e=function(){var T=(0,u.useCollection_deprecated)(),te=T.name,ue=T.title,de=(0,j.zy)();return(0,t.jsx)(a.aN,{schemaSettings:"blockSettings:filterForm",template:de,title:ue||te})},Fe=e(7340),ge=e(15503),Ae=e(68230),De=e(68400),me=e.n(De),se=e(97133),Ce=e(84327),oe=e(9361),fe=e(31019),xe=e(22229),be=e(43321),je=e(8281),Re=e(9780),Oe=e(18686),ae=e(94804),ie=e(5574),Y=e.n(ie),g=e(68433),ve=e(42075),ye=e(34041),ce=e(96486),Be=e.n(ce),Me=e(26793),Te=e(32268),Ie=e(60094),$e=e(9783),We=e.n($e),yt=e(52677),He=e.n(yt),st=e(50888),Ue=e(66309),Mt=e(96074),Yt=e(27484),pn=e.n(Yt),Zt=e(87714),jt=e(84577),an=e(4340),Ct=e(97937),Wt=e(32983),Lt=e(58812),qt=e(96695),Rt=e.n(qt),$t=e(19632),Tt=e.n($t),wt={label:"label",value:"value",color:"color",options:"children"};function en(J,T){var te=[];if(!Array.isArray(J))return te;for(var ue=0;ue<J.length;ue++){var de=J[ue][T.options];Array.isArray(de)&&te.push.apply(te,Tt()(en(de,T))),te.push(r()({},J[ue]))}return te}function An(J,T,te){var ue=en(T,te),de=(0,ce.castArray)(J).map(function(Ee){return(0,g.isPlainObject)(Ee)?Ee[te.value]:Ee});function Pe(Ee){if(!Ee)return[];var Ve=[],ke=Rt()(de),Qe;try{var et=function(){var bt=Qe.value,rt=Ee.find(function(ft){return ft[te.value]==bt})||{value:bt,label:bt&&bt.toString()};Ve.push(rt)};for(ke.s();!(Qe=ke.n()).done;)et()}catch(qe){ke.e(qe)}finally{ke.f()}return Ve}return Pe(ue)}var Wn=e(67668),Nn=(0,i.observer)(function(J){var T,te=r()(r()({},wt),J.fieldNames),ue=(0,i.useField)(),de=(0,Wn.Hy)(),Pe=ue.dataSource||J.options||(de==null?void 0:de.uiSchema.enum)||[],Ee=An(ue.value,Pe,te);return!(0,Ce.isValid)(J.value)&&!Ee.length?(0,t.jsx)("div",{}):(0,P.isArrayField)(ue)&&(ue==null||(T=ue.value)===null||T===void 0?void 0:T.length)===0?(0,t.jsx)("div",{}):(0,t.jsx)("div",{children:(0,t.jsx)(Lt.B,{ellipsis:J.ellipsis,children:Ee.map(function(Ve,ke){return(0,t.jsx)(Ue.Z,{color:Ve[te.color],icon:Ve.icon,children:Ve[te.label]},ke)})})})},{displayName:"ReadPretty"}),oo=["value","options","onChange","fieldNames","mode","loading","rawOptions","defaultValue"],Yn=["objectValue","loading","value","rawOptions","defaultValue"],$n=function(T){return!(0,Ce.isValid)(T)||He()(T)==="object"&&Object.keys(T).length===0},Gn=function(T){var te=T.value,ue=T.options,de=T.onChange,Pe=T.fieldNames,Ee=T.mode,Ve=T.loading,ke=T.rawOptions,Qe=T.defaultValue,et=v()(T,oo),qe=function(rt){var ft;if(!$n(rt)){var ht=(0,Ce.toArr)(rt).filter(function(It){return It}).map(function(It){return(0,g.isPlainObject)(It)?It[Pe.value]:It}),gt=(ft=An(ht,ue,Pe))===null||ft===void 0?void 0:ft.map(function(It){return{label:It[Pe.label],value:It[Pe.value]}});return["tags","multiple"].includes(Ee)||T.multiple?gt:gt.shift()}};return(0,t.jsx)(ye.default,r()({role:"button","data-testid":"select-object-".concat(Ee||"single"),value:qe(te),defaultValue:qe(Qe),allowClear:{clearIcon:(0,t.jsx)(an.Z,{role:"button","aria-label":"icon-close-select"})},labelInValue:!0,notFoundContent:Ve?(0,t.jsx)(E.Z,{}):(0,t.jsx)(Wt.Z,{image:Wt.Z.PRESENTED_IMAGE_SIMPLE}),options:ue,fieldNames:Pe,showSearch:!0,popupMatchSelectWidth:!1,filterOption:function(rt,ft){var ht;return((ht=ft==null?void 0:ft[Pe.label||"label"])!==null&&ht!==void 0?ht:"").includes(rt)},filterSort:function(rt,ft){var ht,gt;return((ht=rt==null?void 0:rt[Pe.label||"label"])!==null&&ht!==void 0?ht:"").toLowerCase().localeCompare(((gt=ft==null?void 0:ft[Pe.label||"label"])!==null&>!==void 0?gt:"").toLowerCase())},onChange:function(rt){var ft=An((0,Ce.toArr)(rt).map(function(ht){return ht.value}),ke||ue,Pe);["tags","multiple"].includes(Ee)||T.multiple?de==null||de(ft):de==null||de(ft.shift()||null)},mode:Ee,tagRender:function(rt){return(0,t.jsx)(Ue.Z,r()(r()({role:"button","aria-label":rt.label,closeIcon:(0,t.jsx)(Ct.Z,{role:"button","aria-label":"icon-close-tag"})},rt),{},{children:rt.label}))}},et))},hn=function(T,te){var ue;return((ue=te==null?void 0:te.label)!==null&&ue!==void 0?ue:"").toLowerCase().includes((T||"").toLowerCase())},Ft=(0,i.connect)(function(J){var T=J.objectValue,te=J.loading,ue=J.value,de=J.rawOptions,Pe=J.defaultValue,Ee=v()(J,Yn),Ve=J.multiple?"multiple":J.mode;if(Ve&&!["multiple","tags"].includes(Ve)&&(Ve=void 0),T)return(0,t.jsx)(Gn,r()(r()({rawOptions:de},Ee),{},{defaultValue:Pe,value:ue,mode:Ve,loading:te}));var ke=function(et){return["tags","multiple"].includes(J.mode)||J.multiple?et?(0,Ce.toArr)(et):void 0:et};return(0,t.jsx)(ye.default,r()(r()({role:"button","data-testid":"select-".concat(Ve||"single"),showSearch:!0,filterOption:hn,allowClear:{clearIcon:(0,t.jsx)(an.Z,{role:"button","aria-label":"icon-close-select"})},popupMatchSelectWidth:!1,notFoundContent:te?(0,t.jsx)(E.Z,{}):(0,t.jsx)(Wt.Z,{image:Wt.Z.PRESENTED_IMAGE_SIMPLE}),value:ke(ue),defaultValue:ke(Pe),tagRender:function(et){return(0,t.jsx)(Ue.Z,r()(r()({role:"button","aria-label":et.label,closeIcon:(0,t.jsx)(Ct.Z,{role:"button","aria-label":"icon-close-tag"})},et),{},{children:et.label}))}},Ee),{},{onChange:function(et){var qe;(qe=J.onChange)===null||qe===void 0||qe.call(J,et===void 0?null:et)},mode:Ve}))},(0,i.mapProps)({dataSource:"options"},function(J,T){return r()(r()({},J),{},{fieldNames:r()(r()({},wt),J.fieldNames),suffixIcon:T!=null&&T.loading||T!=null&&T.validating?(0,t.jsx)(st.Z,{}):J.suffixIcon})}),(0,i.mapReadPretty)(Nn)),_t=Ft;_t.ReadPretty=Nn;var Pt=_t,Nt=e(36586),kt=function(T,te){return(0,ce.castArray)(T).filter(function(ue){return ue!=null}).map(function(ue){return He()(ue)==="object"?ue[te.value]:ue})},Xt=(0,i.observer)(function(J){var T=r()(r()({},wt),J.fieldNames),te=(0,i.useField)(),ue=(0,i.useFieldSchema)(),de=(0,Nt.a)(),Pe=(0,y.XC)(),Ee=Pe.snapshot,Ve=(0,C.QT)(Ee?A()(z()().mark(function Qe(){return z()().wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return qe.abrupt("return",{data:de[ue.name]});case 1:case"end":return qe.stop()}},Qe)})):r()(r()({action:"list"},J.service),{},{params:{paginate:!1,filter:We()({},T.value,{$in:kt(te.value,T)})}}),{refreshDeps:[J.service,te.value]}),ke=Ve.data;return(0,t.jsx)(_t.ReadPretty,r()(r()({},J),{},{options:ke==null?void 0:ke.data}))},{displayName:"ReadPretty"}),zt=e(8341),yn=e(44990),dn=["fieldNames","service","wait","value","defaultValue","objectValue","manual","mapOptions","targetField","CustomDropdownRender","optionFilter","dataSource"],nn="N/A",bn=(0,i.connect)(function(J){var T,te,ue=J.fieldNames,de=ue===void 0?{}:ue,Pe=J.service,Ee=Pe===void 0?{}:Pe,Ve=J.wait,ke=Ve===void 0?300:Ve,Qe=J.value,et=J.defaultValue,qe=J.objectValue,bt=J.manual,rt=bt===void 0?!0:bt,ft=J.mapOptions,ht=J.targetField,gt=J.CustomDropdownRender,It=J.optionFilter,Kt=J.dataSource,mn=v()(J,dn),Qt=(0,yn.FC)(),zn=(0,zt.FE)(Kt||Qt),jn=(0,c.useState)(!1),tn=Y()(jn,2),fn=tn[0],Ln=tn[1],In=(0,c.useRef)(!1),Dn=(0,i.useFieldSchema)(),Mn=((T=Dn["x-component-props"])===null||T===void 0?void 0:T.addMode)==="quickAdd",On=(0,u.useCollection_deprecated)(),En=On.getField,Co=(0,c.useRef)(null),Po=(0,u.useCollectionManager_deprecated)(),yo=Po.getCollectionJoinField,ro=Po.getInterface,so=Dn["x-collection-field"]||Dn.name,Un=En(so)||yo(so),Rn=ht||(Un==null?void 0:Un.target)&&(de==null?void 0:de.label)&&yo("".concat(Un.target,".").concat(de.label)),Qn=(0,c.useMemo)(function(){if(Rn!=null&&Rn.interface){var nr,Ho=ro(Rn.interface),fr=(Ho==null||(nr=Ho.filterable)===null||nr===void 0?void 0:nr.operators[0].value)||"$includes";return Rn.type==="string"?"$includes":fr}return"$includes"},[Rn]),vo=(0,jt.eJ)(),wn=(0,c.useCallback)(function(nr){try{return nr.filter(function(Ho){return["number","string"].includes(He()(Ho[de.value]))}).map(function(Ho){var fr,Pr,rr=vo(Ho[de.label]);if(Rn!=null&&(fr=Rn.uiSchema)!==null&&fr!==void 0&&fr.enum)if(Array.isArray(rr))rr=rr.map(function(Dr,Jr){var Kr=Rn.uiSchema.enum.find(function(wa){return wa.value===Dr});return Kr?(0,t.jsx)(Ue.Z,{role:"button",color:Kr.color,style:{marginRight:3},children:(Kr==null?void 0:Kr.label)||Dr},Jr):(0,t.jsx)(Ue.Z,{role:"button",children:Dr},Dr)}).reverse();else{var vr=Rn.uiSchema.enum.find(function(Dr){return Dr.value===rr});vr&&(rr=(0,t.jsx)(Ue.Z,{role:"button",color:vr.color,children:vr.label}))}if((Rn==null?void 0:Rn.type)==="date"&&(rr=pn()(rr).format("YYYY-MM-DD")),ft){var Ur;return ft((Ur={},We()(Ur,de.label,rr||nn),We()(Ur,de.value,Ho[de.value]),Ur))}return r()(r()({},Ho),{},(Pr={},We()(Pr,de.label,rr||nn),We()(Pr,de.value,Ho[de.value]),Pr))}).filter(Boolean)}catch(Ho){return console.error(Ho),nr}},[Rn==null?void 0:Rn.uiSchema,de]),no=(0,C.QT)(r()(r()({action:"list"},Ee),{},{headers:zn,params:r()(r()({pageSize:200},Ee==null?void 0:Ee.params),{},{filter:Ee==null||(te=Ee.params)===null||te===void 0?void 0:te.filter})}),{manual:rt,debounceWait:ke}),co=no.data,po=no.run,Io=no.loading,No=(0,c.useMemo)(function(){return JSON.stringify({service:Ee,fieldNames:de})},[Ee,de]),Mo=(0,c.useCallback)(function(){return Co.current&>?(0,t.jsx)(gt,{search:Co.current,callBack:function(){Co.current=null,Ln(!1)}}):null},[Co.current]);(0,c.useEffect)(function(){In.current&&po()},[No]);var $o=function(){var nr=A()(z()().mark(function Ho(fr){var Pr;return z()().wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:po({filter:(0,Zt.EO)([fr?We()({},de.label,We()({},Qn,fr)):{},Ee==null||(Pr=Ee.params)===null||Pr===void 0?void 0:Pr.filter])}),Co.current=fr;case 2:case"end":return vr.stop()}},Ho)}));return function(fr){return nr.apply(this,arguments)}}(),pr=(0,c.useMemo)(function(){var nr,Ho=Qe||et;if(!(co!=null&&(nr=co.data)!==null&&nr!==void 0&&nr.length))return Ho!=null?Array.isArray(Ho)?Ho:[Ho]:[];var fr=Ho!=null&&(Array.isArray(Ho)?Ho:[r()(r()({},Ho),{},We()({},de.value,Ho[de.value]||Ho))])||[],Pr=typeof It=="function"?co.data.filter(It):co.data;return(0,ce.uniqBy)(Pr.concat(fr!=null?fr:[]),de.value)},[Qe,et,co==null?void 0:co.data,de.value,It]),sr=function(Ho){Ln(Ho),Co.current=null,Ho&&po(),In.current=!0};return(0,t.jsx)(_t,r()(r()({open:fn,popupMatchSelectWidth:!1,autoClearSearchValue:!0,filterOption:!1,filterSort:null,fieldNames:de,onSearch:$o,onDropdownVisibleChange:sr,objectValue:qe,value:Qe,defaultValue:et},mn),{},{loading:co?Io:!0,options:wn(pr),rawOptions:pr,dropdownRender:function(Ho){var fr=pr.some(function(Pr){return Pr[de.label]===Co.current});return(0,t.jsx)(t.Fragment,{children:Mn?(0,t.jsxs)(t.Fragment,{children:[!((co==null?void 0:co.data.length)===0&&Co!==null&&Co!==void 0&&Co.current)&&Ho,(co==null?void 0:co.data.length)>0&&(Co==null?void 0:Co.current)&&!fr&&(0,t.jsx)(Mt.Z,{style:{margin:0}}),!fr&&(0,t.jsx)(Mo,{})]}):Ho})}}))},(0,i.mapProps)({dataSource:"options"},function(J,T){var te,ue=(0,i.useFieldSchema)();return r()(r()({},J),{},{fieldNames:r()(r()(r()(r()({},wt),J.fieldNames),T.componentProps.fieldNames),(te=ue["x-component-props"])===null||te===void 0?void 0:te.fieldNames),suffixIcon:T!=null&&T.loading||T!=null&&T.validating?(0,t.jsx)(st.Z,{}):J.suffixIcon})}),(0,i.mapReadPretty)(Xt)),Vt=bn;Vt.ReadPretty=Xt;var dt=null,tt=function(){var T=(0,i.useFieldSchema)(),te=(0,Me.$)(),ue=te.t,de=(0,Fe.bz)(),Pe=de.duplicateData,Ee=(0,u.useCollectionManager_deprecated)(),Ve=Ee.getCollectionJoinField;if(Pe)return Pe;var ke=Bt(T),Qe=ke.items,et=Qe===void 0?[]:Qe,qe=ke.display,bt=qe===void 0?!0:qe;et.forEach(function(ht){try{var gt;ht.fields=(gt=ht.fields)===null||gt===void 0?void 0:gt.map(function(It){var Kt=Ve("".concat(ht.collection,".").concat(It));return Kt?It:""}).filter(Boolean)}catch(It){(0,g.error)(It),ht.fields=[]}});var rt=[{key:"none",title:ue("None")}].concat(et.map(function(ht,gt){return r()(r()({key:gt},ht),{},{isLeaf:ht.dataId!==null&&ht.dataId!==void 0,titleCollectionField:(ht==null?void 0:ht.titleField)&&Ve("".concat(ht.collection,".").concat(ht.titleField))})})),ft=et.find(function(ht){return ht.default});return{templates:rt,display:bt,defaultTemplate:ft,enabled:et.length>0&&et.every(function(ht){return ht.dataId||ht.dataScope})}},At=function(T){var te=T.style,ue=te===void 0?{}:te,de=T.form,Pe=(0,Ie.dQ)(),Ee=Pe.token,Ve=tt(),ke=Ve.templates,Qe=Ve.display,et=Ve.enabled,qe=Ve.defaultTemplate,bt=(0,u.useCollectionManager_deprecated)(),rt=bt.getCollectionJoinField,ft=(0,Te.ss)(ke),ht=(0,c.useState)((qe==null?void 0:qe.key)||"none"),gt=Y()(ht,2),It=gt[0],Kt=gt[1],mn=(0,c.useState)(null),Qt=Y()(mn,2),zn=Qt[0],jn=Qt[1],tn=(0,C.LY)(),fn=(0,Me.$)(),Ln=fn.t;(0,c.useEffect)(function(){et&&qe&&de&&(de.__template=!0,qe.key==="duplicate"&&On(qe.dataId,qe))},[]),(0,c.useEffect)(function(){ft!=null&&ft.some(function(Co){return Co.key===It})||Mn("none")},[ft]);var In=(0,c.useMemo)(function(){return r()({display:"flex",alignItems:"center",backgroundColor:Ee.colorFillAlter,padding:Ee.padding},ue)},[ue,Ee.colorFillAlter]),Dn=(0,c.useMemo)(function(){return{fontSize:Ee.fontSize,fontWeight:"bold",whiteSpace:"nowrap",marginRight:Ee.marginXS}},[Ee.fontSize,Ee.marginXS]),Mn=(0,c.useCallback)(function(){var Co=A()(z()().mark(function Po(yo){return z()().wrap(function(so){for(;;)switch(so.prev=so.next){case 0:Kt(yo),jn(null),de==null||de.reset();case 3:case"end":return so.stop()}},Po)}));return function(Po){return Co.apply(this,arguments)}}(),[]),On=(0,c.useCallback)(function(){var Co=A()(z()().mark(function Po(yo,ro){var so;return z()().wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:so=r()(r()({},ro),{},{dataId:yo}),jn(ro),we(tn,so,Ln).then(function(Qn){return de&&Qn&&(de.reset(),de.__template=!0,(0,g.forEach)(Qn,function(vo,wn){if(vo){var no;de.values[wn]=vo,de==null||(no=de.setInitialValuesIn)===null||no===void 0||no.call(de,wn,vo)}})),Qn}).catch(function(Qn){console.error(Qn)});case 3:case"end":return Rn.stop()}},Po)}));return function(Po,yo){return Co.apply(this,arguments)}}(),[]);if(!et||!Qe)return null;var En=ft==null?void 0:ft.find(function(Co){return Co.key===It});return(0,t.jsx)("div",{style:In,children:(0,t.jsxs)(ve.Z,{wrap:!0,children:[(0,t.jsxs)("label",{style:Dn,children:[Ln("Data template"),": "]}),(0,t.jsx)(ye.default,{role:"button","data-testid":"select-form-data-template",popupMatchSelectWidth:!1,options:ft,fieldNames:{label:"title",value:"key"},value:It,onChange:Mn}),It!=="none"&&En&&(0,t.jsx)(Vt,{style:{width:220},fieldNames:{label:En==null?void 0:En.titleField,value:"id"},target:En==null?void 0:En.collection,value:zn,objectValue:!0,service:{resource:En==null?void 0:En.collection,params:{filter:En==null?void 0:En.dataScope}},onChange:function(Po){return On(Po==null?void 0:Po.id,r()(r()({},Po),En))},targetField:rt("".concat(En==null?void 0:En.collection,".").concat(En.titleField))})]})})};function Bt(J){var T=(0,Fe.Fi)(J);return T?Be().cloneDeep(T["x-data-templates"])||{}:{}}function we(J,T,te){return Se.apply(this,arguments)}function Se(){return Se=A()(z()().mark(function J(T,te,ue){return z()().wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if(!(te.fields.length===0||!te.dataId)){Pe.next=2;break}return Pe.abrupt("return");case 2:return Pe.abrupt("return",T.resource(te.collection).get({filterByTk:te.dataId,fields:te.fields,isTemplate:!0}).then(function(Ee){var Ve;return(Ve=Ee.data)===null||Ve===void 0?void 0:Ve.data}));case 3:case"end":return Pe.stop()}},J)})),Se.apply(this,arguments)}var Le=e(3192),Ze=function(){var T,te,ue=(0,Oe.aZ)(),de=(0,i.useFieldSchema)(),Pe=oe.Z.useToken(),Ee=Pe.token,Ve=(0,jt.ng)(),ke=Ve.designable,Qe=(0,Le.g)()||{},et=Qe.heightProps,qe=et||{},bt=qe.title,rt=tt(),ft=rt.display,ht=rt.enabled,gt=de.reduceProperties(function(On,En){return En["x-component"]==="ActionBar"?En:On}),It=Object.keys((gt==null?void 0:gt.properties)||{}).length>0,Kt=de==null||(T=de.parent)===null||T===void 0||(T=T["x-decorator"])===null||T===void 0||(te=T.includes)===null||te===void 0?void 0:te.call(T,"FormBlockProvider"),mn=It||ke?Ee.controlHeight+(Kt?1:2)*Ee.marginLG:Ee.marginLG,Qt=bt?Ee.fontSizeLG*Ee.lineHeightLG+Ee.padding*2-1:0,zn=(0,ae.hS)()||{},jn=zn.data,tn=(jn==null?void 0:jn.meta)||{},fn=tn.count,Ln=tn.pageSize,In=fn>Ln,Dn=In?Ee.controlHeightSM+1*Ee.paddingLG:0,Mn=ft&&ht?Ee.controlHeight+2*Ee.padding+Ee.margin:0;return ue-mn-Ee.paddingLG-Qt-Dn-Mn},Xe,it,ut=["form","children"],xt=["form","children","disabled"],mt=["form","disabled"],ot=function(T){var te=T.form,ue=T.children,de=v()(T,ut),Pe=(0,i.useField)(),Ee=(0,i.useFieldSchema)(),Ve=(0,jt.lI)(te.createVoidField(r()(r()({},Pe.props),{},{basePath:""}))),ke=Ze(),Qe=oe.Z.useToken(),et=Qe.token,qe=(0,jt.ng)(),bt=qe.designable;return(0,t.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,t.jsx)(i.FormContext.Provider,{value:te,children:(0,t.jsx)(S.FormLayout,r()(r()({layout:"vertical"},de),{},{children:(0,t.jsx)("div",{className:(0,se.css)(Xe||(Xe=me()([`
|
|
688
|
+
`]))))}));return(0,H.jsx)(g.BQs,{ellipsis:!0,popoverContent:$n,children:$n})};var Yt=(0,l.createContext)([]);Yt.displayName="VariableScopeContext";function pn(Ct){var Wt=Ct.scope,Lt=Wt===void 0?[]:Wt,qt=Ct.children;return(0,H.jsx)(Yt.Provider,{value:Lt,children:qt})}function Zt(){return(0,l.useContext)(Yt)}function jt(){return null}jt.Input=(0,$.connect)(ge),jt.TextArea=(0,$.connect)(st,(0,$.mapReadPretty)(st.ReadPretty)),jt.RawTextArea=(0,$.connect)(be),jt.JSON=(0,$.connect)(Re);var an=null},88969:function(ze,X,e){"use strict";e.d(X,{m:function(){return R}});var $=e(15009),l=e.n($),z=e(19632),d=e.n(z),A=e(99289),f=e.n(A),K=e(5574),o=e.n(K),N=e(97133),m=e(38089),M=e(67294),h=e(26793),O=e(60094),n=e(9783),r=e.n(n),c=(0,O.l6)("nb-variable-select",function(W){var y=W.componentCls;return r()({},y,{position:"relative",".ant-select.ant-cascader":{position:"absolute",top:"-1px",right:"-1px",minWidth:"auto",width:"calc(100% + 2px)",height:"calc(100% + 2px)",overflow:"hidden",opacity:0},".variable-btn":{fontStyle:"italic",fontFamily:"'New York', 'Times New Roman', Times, serif"},".Cascader-popupClassName":{".ant-cascader-menu":{marginBottom:0}}})}),L=c,D=e(2876),b=e(85893);function R(W){var y=W.options,I=W.setOptions,v=W.onInsert,S=W.changeOnSelect,P=S===void 0?!1:S,i=W.fieldNames,w=i===void 0?{}:i,E=W.className,C=(0,h.$)(),u=C.t,a=(0,M.useState)([]),p=o()(a,2),j=p[0],F=p[1],t=L(),x=t.wrapSSR,k=t.componentCls,V=t.hashId,G=(0,O.dQ)(),Q=G.token;function U(Z){return H.apply(this,arguments)}function H(){return H=f()(l()().mark(function Z(ne){var ee,B;return l()().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(B=ne[ne.length-1],!(!((ee=B.children)!==null&&ee!==void 0&&ee.length)&&!B.isLeaf&&B.loadChildren)){re.next=5;break}return re.next=4,B.loadChildren(B);case 4:I(function(pe){return d()(pe)});case 5:case"end":return re.stop()}},Z)})),H.apply(this,arguments)}return x((0,b.jsx)(D.R,{className:(0,N.cx)("x-button",k,V,E),children:(0,b.jsx)(m.Z,{placeholder:u("Select a variable"),value:[],options:y,fieldNames:w,loadData:U,onChange:function(){var ne,ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(F(ee),!!ee.length){var q=B[B.length-1];(!(q!=null&&(ne=q.children)!==null&&ne!==void 0&&ne.length)&&!(q!=null&&q.loadChildren)||q!=null&&q.isLeaf)&&v(ee)}},changeOnSelect:P,onClick:function(ne){if(!(ne.detail!==2||!P))for(var ee=ne.target;ee&&ee!==ne.currentTarget;ee=ee.parentNode){var B;Array.from((B=ee.classList)!==null&&B!==void 0?B:[]).includes("ant-cascader-menu-item")&&v(j)}},popupClassName:"Cascader-popupClassName",dropdownRender:P?function(Z){return(0,b.jsxs)(b.Fragment,{children:[Z,(0,b.jsx)("div",{style:{padding:"0.5em",borderTop:"1px solid ".concat(Q.colorBorder),color:Q.colorTextDescription},children:u("Double click to choose entire object")})]})}:null})}))}},2876:function(ze,X,e){"use strict";e.d(X,{R:function(){return f}});var $=e(97857),l=e.n($),z=e(15867),d=e(67294),A=e(85893),f=(0,d.forwardRef)(function(K,o){var N=(0,d.useMemo)(function(){return{fontStyle:"italic",fontFamily:"New York, Times New Roman, Times, serif"}},[]);return(0,A.jsxs)(z.ZP,l()(l()({"aria-label":"variable-button",ref:o,style:N},K),{},{children:["x",K.children]}))});f.displayName="XButton"},72724:function(ze,X,e){"use strict";e.d(X,{L:function(){return O}});var $=e(97857),l=e.n($),z=e(5574),d=e.n(z),A=e(94697),f=e(80844),K=e(67294),o=e(26793),N=e(21143),m=e(84577),M=e(85893),h=function(r){var c=(0,m.ng)(),L=c.refresh,D=(0,N.useAPIClient)(),b=(0,o.$)(),R=b.t;return(0,K.useCallback)(function(W){var y,I,v,S,P,i,w,E,C=W.active,u=W.over,a=C==null||(y=C.data)===null||y===void 0||(y=y.current)===null||y===void 0?void 0:y.schema,p=u==null||(I=u.data)===null||I===void 0||(I=I.current)===null||I===void 0?void 0:I.schema,j=u==null||(v=u.data)===null||v===void 0||(v=v.current)===null||v===void 0?void 0:v.insertAdjacent,F=u==null||(S=u.data)===null||S===void 0||(S=S.current)===null||S===void 0?void 0:S.breakRemoveOn,t=u==null||(P=u.data)===null||P===void 0||(P=P.current)===null||P===void 0?void 0:P.wrapSchema,x=u==null||(i=u.data)===null||i===void 0||(i=i.current)===null||i===void 0?void 0:i.onSuccess,k=(w=u==null||(E=u.data)===null||E===void 0||(E=E.current)===null||E===void 0?void 0:E.removeParentsIfNoChildren)!==null&&w!==void 0?w:!0;if(!a||!p){r==null||r(W);return}if(a===p){r==null||r(W);return}if(a.parent===p&&j==="beforeEnd"){r==null||r(W);return}var V=(0,m.Pl)({t:R,api:D,refresh:L,current:p});if(V.loadAPIClientEvents(),a.parent===p.parent){V.insertBeforeBeginOrAfterEnd(a),r==null||r(W);return}if(j){V.insertAdjacent(j,a,{wrap:t,breakRemoveOn:F,removeParentsIfNoChildren:k,onSuccess:x}),r==null||r(W);return}},[r])},O=(0,f.observer)(function(n){var r=(0,o.$)(),c=r.t,L=(0,K.useState)(!0),D=d()(L,2),b=D[0],R=D[1],W=(0,K.useCallback)(function(I){var v,S=I.active,P=S==null||(v=S.data)===null||v===void 0||(v=v.current)===null||v===void 0?void 0:v.schema;if(R(!!P),n!=null&&n.onDragStart){var i;n==null||(i=n.onDragStart)===null||i===void 0||i.call(n,I)}},[n==null?void 0:n.onDragStart]),y=h(n==null?void 0:n.onDragEnd);return(0,M.jsxs)(A.DndContext,l()(l()({collisionDetection:A.rectIntersection},n),{},{onDragStart:W,onDragEnd:y,children:[(0,M.jsx)(A.DragOverlay,{dropAnimation:{duration:10,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:b&&(0,M.jsx)("span",{style:{whiteSpace:"nowrap"},children:c("Dragging")})}),n.children]}))},{displayName:"DndContext"})},14896:function(ze,X,e){"use strict";e.r(X),e.d(X,{DndContext:function(){return $.L},DragHandler:function(){return l.IW},DraggableContext:function(){return l.LC},ShowFormData:function(){return f},Sortable:function(){return l.bt},SortableContext:function(){return l.Fo},SortableItem:function(){return l.TR},SortableProvider:function(){return l.OR},getRenderContent:function(){return K.I9}});var $=e(72724),l=e(20493),z=e(67294),d=e(80844),A=e(85893),f=(0,d.observer)(function(o){var N=o.children,m=(0,d.useForm)();return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("pre",{style:{marginBottom:20},"data-testid":"form-data",children:JSON.stringify(m.values,null,2)}),N]})}),K=e(34588)},20493:function(ze,X,e){"use strict";e.d(X,{IW:function(){return W},LC:function(){return n},bt:function(){return L},Fo:function(){return r},TR:function(){return R},OR:function(){return c}});var $=e(97857),l=e.n($),z=e(13769),d=e.n(z),A=e(10274),f=e(94697),K=e(97133),o=e(80844),N=e(67294),m=e(60094),M=e(85893),h=["component","overStyle","style","children","openMode"],O=["schema","id","eid","removeParentsIfNoChildren"],n=(0,N.createContext)(null);n.displayName="DraggableContext";var r=(0,N.createContext)(null);r.displayName="SortableContext";var c=function(I){var v=I.id,S=I.data,P=I.children,i=(0,f.useDraggable)({id:v,data:S}),w=(0,f.useDroppable)({id:v,data:S});return(0,M.jsx)(r.Provider,{value:{draggable:i,droppable:w},children:P})},L=function(I){var v,S,P=I.component,i=I.overStyle,w=I.style,E=I.children,C=I.openMode,u=d()(I,h),a=(0,m.dQ)(),p=a.token,j=(0,N.useContext)(r),F=j.draggable,t=j.droppable,x=t.isOver,k=t.setNodeRef,V=l()({},w);return x&&(F==null||(v=F.active)===null||v===void 0?void 0:v.id)!==(t==null||(S=t.over)===null||S===void 0?void 0:S.id)&&(V[P==="a"?"color":"background"]=new A.C(p.colorSettings).setAlpha(.15).toHex8String(),Object.assign(V,i)),N.createElement(P||"div",l()(l()({role:"none"},u),{},{className:(0,K.cx)("nb-sortable-designer",I.className),ref:k,style:V}),E)},D=function(I){var v=b(I),S=(0,o.useFieldSchema)();return I.schema?l()(l()({},I),{},{id:v}):l()(l()({},I),{},{id:v,schema:S})},b=function(I){var v=(0,o.useField)();return I.id?I.id:v.address.toString()},R=(0,o.observer)(function(y){var I=D(y),v=I.schema,S=I.id,P=I.eid,i=I.removeParentsIfNoChildren,w=d()(I,O),E=(0,N.useMemo)(function(){return{insertAdjacent:"afterEnd",schema:v,removeParentsIfNoChildren:i!=null?i:!0}},[v,i]);return(0,M.jsx)(c,{id:S,data:E,children:(0,M.jsx)(L,l()(l()({id:P},w),{},{children:y.children}))})},{displayName:"SortableItem"}),W=function(I){var v=(0,N.useContext)(r),S=v.draggable,P=S.attributes,i=S.listeners,w=S.setNodeRef;return(0,M.jsx)("div",{style:{display:"inline-block",width:14,height:14,lineHeight:"14px",textAlign:"left"},children:(0,M.jsx)("div",l()(l()(l()({ref:w,style:{position:"relative",zIndex:1,lineHeight:0,fontSize:0,display:"inline-block"}},i),P),{},{role:"none",children:(0,M.jsx)("span",{style:{cursor:"move",fontSize:14},children:I.children})}))})}},34588:function(ze,X,e){"use strict";e.d(X,{jC:function(){return i},od:function(){return v},I9:function(){return C},Rq:function(){return S},e7:function(){return I}});var $=e(97857),l=e.n($),z=e(15009),d=e.n(z),A=e(9783),f=e.n(A),K=e(5574),o=e.n(K),N=e(99289),m=e.n(N),M=e(52677),h=e.n(M),O=e(96750),n=e.n(O),r=e(96486),c=e.n(r),L=e(10097),D=e(76690),b=e(65565),R=e(27484),W=e.n(R);function y(){"use strict";Array.isArray||(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"});function a(t){for(var x=[],k=0,V=t.length;k<V;k++)x.indexOf(t[k])===-1&&x.push(t[k]);return x}function p(t,x){return JSON.stringify(t)===JSON.stringify(x)}var j={},F={$is:function(x,k){return x===k},$match:function(x,k){return Array.isArray(x)&&Array.isArray(k)&&x.some(function(V){return Array.isArray(V)})?x.some(function(V){return(V==null?void 0:V.length)===k.length&&(V==null?void 0:V.every(function(G,Q){return G===k[Q]}))}):JSON.stringify(x)===JSON.stringify(k)},$eq:function(x,k){return Array.isArray(x)&&Array.isArray(k)?p(x,k):Array.isArray(x)?x.includes(k):x==k},$ne:function(x,k){return x!=k},"!==":function(x,k){return x!==k},$gt:function(x,k){return Array.isArray(x)?x.some(function(V){return V>k}):x>k},$gte:function(x,k){return x>=k},$lt:function(x,k,V){return Array.isArray(x)?x.some(function(G){return G<k}):V===void 0?x<k:x<k&&k<V},$lte:function(x,k,V){return V===void 0?x<=k:x<=k&&k<=V},$exists:function(x){return j.truthy(x)},$notEmpty:function(x){return j.truthy(x)},$empty:function(x){return Array.isArray(x)?x.some(function(k){return!j.truthy(k)}):!j.truthy(x)},$notExists:function(x){return!j.truthy(x)},"%":function(x,k){return x%k},log:function(x){return console.log(x),x},$in:function(x,k){return!k||typeof k.indexOf=="undefined"?!1:Array.isArray(x)&&Array.isArray(k)?k.some(function(V){return x.includes(V)}):k.indexOf(x)!==-1},$notIn:function(x,k){return!k||typeof k.indexOf=="undefined"?!1:k.indexOf(x)===-1},$includes:function(x,k){return!x||typeof x.indexOf=="undefined"?!1:Array.isArray(x)?x.some(function(V){return V==null?void 0:V.includes(k)}):x.indexOf(k)!==-1},$notIncludes:function(x,k){return Array.isArray(x)?!x.some(function(V){return(V||"").includes(k)}):(x=x||"",!x.includes(k))},$anyOf:function(x,k){return x.length===0?!1:Array.isArray(x)&&Array.isArray(k)&&x.some(function(V){return Array.isArray(V)})?x.some(function(V){return V.some(function(G){return k.includes(G)})}):x.some(function(V){return k.includes(V)})},$noneOf:function(x,k){return!x||(x==null?void 0:x.length)===0?!0:Array.isArray(x)&&Array.isArray(k)&&x.some(function(V){return Array.isArray(V)})?x.some(function(V){return V.every(function(G){return!k.some(function(Q){return G.includes(Q)})})}):k.some(function(V){return!x.includes(V)})},$notMatch:function(x,k){if(x.length!==k.length)return!0;for(var V=0;V<x.length;V++)if(x[V]!==k[V])return!0;return!1},$dateOn:function(x,k){return!x||!k?!1:(Array.isArray(x)||(x=[x,x]),Array.isArray(k)||(k=[k,k]),x=x.map(function(V){return W()(V)}),k=k.map(function(V){return W()(V)}),x[0].isBetween(k[0],k[1],null,"[]")&&x[1].isBetween(k[0],k[1],null,"[]"))},$dateBefore:function(x,k){return!x||!k?!1:(Array.isArray(x)||(x=[x,x]),Array.isArray(k)||(k=[k,k]),x=x.map(function(V){return W()(V)}),k=k.map(function(V){return W()(V)}),x[0].isBefore(k[0])&&x[1].isBefore(k[0]))},$dateNotBefore:function(x,k){return!F.$dateBefore(x,k)},$dateAfter:function(x,k){return!x||!k?!1:(Array.isArray(x)||(x=[x,x]),Array.isArray(k)||(k=[k,k]),x=x.map(function(V){return W()(V)}),k=k.map(function(V){return W()(V)}),x[0].isAfter(k[1])&&x[1].isAfter(k[1]))},$dateNotAfter:function(x,k){return!F.$dateAfter(x,k)},$dateBetween:function(x,k){return F.$dateOn(x,k)},$dateNotOn:function(x,k){return!F.$dateOn(x,k)},$isTruly:function(x){return Array.isArray(x)?x.some(function(k){return k===!0||k===1}):x===!0||x===1},$isFalsy:function(x){return Array.isArray(x)?x.some(function(k){return!j.truthy(k)}):!j.truthy(x)},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(x,k,V){if(V<0){var G=String(x).substr(k);return G.substr(0,G.length+V)}return String(x).substr(k,V)},"+":function(){return Array.prototype.reduce.call(arguments,function(x,k){return parseFloat(x,10)+parseFloat(k,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(x,k){return parseFloat(x,10)*parseFloat(k,10)})},"-":function(x,k){return k===void 0?-x:x-k},"/":function(x,k){return x/k},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(x,k){return x.concat(k)},[])},var:function(x,k){var V=k===void 0?null:k,G=this;if(typeof x=="undefined"||x===""||x===null)return G;for(var Q=String(x).split("."),U=0;U<Q.length;U++)if(G==null||(G=G[Q[U]],G===void 0))return V;return G},missing:function(){for(var x=[],k=Array.isArray(arguments[0])?arguments[0]:arguments,V=0;V<k.length;V++){var G=k[V],Q=j.apply({var:G},this);(Q===null||Q==="")&&x.push(G)}return x},missing_some:function(x,k){var V=j.apply({missing:k},this);return k.length-V.length>=x?[]:V}};return j.is_logic=function(t){return h()(t)==="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length===1},j.truthy=function(t){return Array.isArray(t)&&t.length===0?!1:!!t},j.get_operator=function(t){return Object.keys(t)[0]},j.get_values=function(t){return t[j.get_operator(t)]},j.apply=function(t,x){if(Array.isArray(t))return t.map(function(B){return j.apply(B,x)});if(!j.is_logic(t))return t;var k=j.get_operator(t),V=t[k],G,Q,U,H,Z;if(Array.isArray(V)||(V=[V]),k==="if"||k=="?:"){for(G=0;G<V.length-1;G+=2)if(j.truthy(j.apply(V[G],x)))return j.apply(V[G+1],x);return V.length===G+1?j.apply(V[G],x):null}else if(k==="$and"){for(G=0;G<V.length;G+=1)if(Q=j.apply(V[G],x),!j.truthy(Q))return Q;return Q}else if(k==="or"){for(G=0;G<V.length;G+=1)if(Q=j.apply(V[G],x),j.truthy(Q))return Q;return Q}else{if(k==="filter")return H=j.apply(V[0],x),U=V[1],Array.isArray(H)?H.filter(function(B){return j.truthy(j.apply(U,B))}):[];if(k==="map")return H=j.apply(V[0],x),U=V[1],Array.isArray(H)?H.map(function(B){return j.apply(U,B)}):[];if(k==="reduce")return H=j.apply(V[0],x),U=V[1],Z=typeof V[2]!="undefined"?V[2]:null,Array.isArray(H)?H.reduce(function(B,q){return j.apply(U,{current:q,accumulator:B})},Z):Z;if(k==="all"){if(H=j.apply(V[0],x),U=V[1],!Array.isArray(H)||!H.length)return!1;for(G=0;G<H.length;G+=1)if(!j.truthy(j.apply(U,H[G])))return!1;return!0}else if(k==="none"){if(H=j.apply(V[0],x),U=V[1],!Array.isArray(H)||!H.length)return!0;for(G=0;G<H.length;G+=1)if(j.truthy(j.apply(U,H[G])))return!1;return!0}else if(k==="some"){if(H=j.apply(V[0],x),U=V[1],!Array.isArray(H)||!H.length)return!1;for(G=0;G<H.length;G+=1)if(j.truthy(j.apply(U,H[G])))return!0;return!1}}if(V=V.map(function(B){return j.apply(B,x)}),F.hasOwnProperty(k)&&typeof F[k]=="function")return F[k].apply(x,V);if(k.indexOf(".")>0){var ne=String(k).split("."),ee=F;for(G=0;G<ne.length;G++){if(!ee.hasOwnProperty(ne[G]))throw new Error("Unrecognized operation "+k+" (failed at "+ne.slice(0,G+1).join(".")+")");ee=ee[ne[G]]}return ee.apply(x,V)}throw new Error("Unrecognized operation "+k)},j.uses_data=function(t){var x=[];if(j.is_logic(t)){var k=j.get_operator(t),V=t[k];Array.isArray(V)||(V=[V]),k==="var"?x.push(V[0]):V.forEach(function(G){x.push.apply(x,j.uses_data(G))})}return a(x)},j.add_operation=function(t,x){F[t]=x},j.rm_operation=function(t){delete F[t]},j.rule_like=function(t,x){if(x===t||x==="@")return!0;if(x==="number")return typeof t=="number";if(x==="string")return typeof t=="string";if(x==="array")return Array.isArray(t)&&!j.is_logic(t);if(j.is_logic(x)){if(j.is_logic(t)){var k=j.get_operator(x),V=j.get_operator(t);if(k==="@"||k===V)return j.rule_like(j.get_values(t,!1),j.get_values(x,!1))}return!1}if(Array.isArray(x))if(Array.isArray(t)){if(x.length!==t.length)return!1;for(var G=0;G<x.length;G+=1)if(!j.rule_like(t[G],x[G]))return!1;return!0}else return!1;return!1},j}var I=function(p,j){var F,t=/{{(.*?)}}/,x=p==null||(F=p.match)===null||F===void 0?void 0:F.call(p,t);if(x){var k=c().get(j,x[1]);return c().isFunction(k)?k():k}else return p};function v(a){if(h()(a)!=="object"||a===null)return null;for(var p in a)if(Object.prototype.hasOwnProperty.call(a,p))return Object.prototype.toString.call(a[p])==="[object Object]"&&a[p]!==null?v(a[p]):{key:p,value:a[p]};return null}var S=function(p){var j=P(p),F=(0,r.findIndex)(j,function(x,k,V){if(x.includes("$")&&k>0)return!0}),t=j.slice(0,F);return t};function P(a){var p=[];function j(F){Object.keys(F).sort().forEach(function(t){p.push(t),F[t]&&h()(F[t])==="object"&&j(F[t])})}return j(a),p}var i=function(){var a=m()(d()().mark(function p(j){var F,t,x,k,V,G,Q;return d()().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return F=j.ruleGroup,t=j.variables,x=j.localVariables,k=j.variableNameOfLeftCondition,V=Object.keys(F)[0]||"$and",G=F[V],Q=G.map(function(){var Z=m()(d()().mark(function ne(ee){var B,q,re,pe,le,he,_e,Fe,ge,Ae,De;return d()().wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(!("$and"in ee||"$or"in ee)){se.next=4;break}return se.next=3,i({ruleGroup:ee,variables:t,localVariables:x});case 3:return se.abrupt("return",se.sent);case 4:if(B=v(ee),q=B==null?void 0:B.key,q){se.next=8;break}return se.abrupt("return",!0);case 8:return re=w(S(ee),k),pe=t.parseVariable(re,x,{doNotRequest:!0}).then(function(Ce){var oe=Ce.value;return oe}),le=(0,D.cG)(B==null?void 0:B.value)?[t.parseVariable(B==null?void 0:B.value,x).then(function(Ce){var oe=Ce.value;return oe}),pe]:[B==null?void 0:B.value,pe],se.prev=11,he=y(),se.next=15,Promise.all(le);case 15:return _e=se.sent,Fe=o()(_e,2),ge=Fe[0],Ae=Fe[1],se.next=21,t.getCollectionField(re,x);case 21:return De=se.sent,se.abrupt("return",he.apply(f()({},q,[(0,b.J)(Ae,{targetCollectionField:De}),(0,b.J)(ge,{targetCollectionField:De})])));case 25:throw se.prev=25,se.t0=se.catch(11),se.t0;case 28:case"end":return se.stop()}},ne,null,[[11,25]])}));return function(ne){return Z.apply(this,arguments)}}()),H.next=6,Promise.all(Q);case 6:if(Q=H.sent,V!=="$and"){H.next=11;break}return H.abrupt("return",(0,r.every)(Q,function(Z){return Z}));case 11:return H.abrupt("return",(0,r.some)(Q,function(Z){return Z}));case 12:case"end":return H.stop()}},p)}));return function(j){return a.apply(this,arguments)}}();function w(a){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$nForm";return"{{ ".concat(p,".").concat(a.join(".")," }}")}var E=function(p){var j={};return p.map(function(F){j[F.name]=F.ctx}),j};function C(a,p,j,F,t){return u.apply(this,arguments)}function u(){return u=m()(d()().mark(function a(p,j,F,t,x){var k,V,G,Q,U,H;return d()().wrap(function(ne){for(;;)switch(ne.prev=ne.next){case 0:if(!(j&&p==="handlebars")){ne.next=19;break}return ne.prev=1,k=n().compile(j),V=E(t),G=F.ctxRef.current.$nDate,Q={},Object.keys(G).map(function(ee){Q[ee]=G[ee]()}),U=k(l()(l()(l()({},F.ctxRef.current),V),{},{$nDate:Q})),ne.next=10,x(U);case 10:return ne.abrupt("return",ne.sent);case 13:return ne.prev=13,ne.t0=ne.catch(1),console.log(ne.t0),ne.abrupt("return",j);case 17:ne.next=31;break;case 19:return ne.prev=19,ne.next=22,(0,L.replaceVariableValue)(j,F,t);case 22:return H=ne.sent,ne.next=25,x(H);case 25:return ne.abrupt("return",ne.sent);case 28:return ne.prev=28,ne.t1=ne.catch(19),ne.abrupt("return",j);case 31:case"end":return ne.stop()}},a,null,[[1,13],[19,28]])})),u.apply(this,arguments)}},61736:function(ze,X,e){"use strict";e.d(X,{D:function(){return l}});var $=e(67294),l=(0,$.createContext)({});l.displayName="SchemaComponentContext.Provider"},44245:function(ze,X,e){"use strict";e.d(X,{R:function(){return n}});var $=e(97857),l=e.n($),z=e(13769),d=e.n(z),A=e(86201),f=e(80844),K=e(67294),o=e(47844),N=e(85893),m=["children","form"],M=["children"],h=function(c){var L=c.children,D=c.form,b=d()(c,m),R=(0,K.useContext)(f.SchemaOptionsContext),W=(0,K.useContext)(f.SchemaExpressionScopeContext),y=l()(l()({},R==null?void 0:R.scope),W),I=l()({},R==null?void 0:R.components);return(0,N.jsx)(f.FormProvider,l()(l()({},b),{},{form:D,children:(0,N.jsx)(o.G,{components:I,scope:y,children:L})}))},O=function(c){var L=c.children,D=d()(c,M),b=(0,K.useContext)(f.SchemaOptionsContext),R=(0,K.useContext)(f.SchemaExpressionScopeContext),W=l()(l()({},b==null?void 0:b.scope),R),y=l()({},b==null?void 0:b.components),I=(0,K.useMemo)(function(){return(0,A.createForm)()},[]);return(0,N.jsx)(f.FormProvider,l()(l()({},D),{},{form:I,children:(0,N.jsx)(o.G,{components:y,scope:W,children:L})}))},n=function(c){return c.form?(0,N.jsx)(h,l()({},c)):(0,N.jsx)(O,l()({},c))}},93587:function(ze,X,e){"use strict";e.d(X,{m:function(){return n}});var $=e(97857),l=e.n($),z=e(86201),d=e(57953),A=e(67294),f=e(84577),K=e(44245),o=e(93323),N=e(12174),m=function(c){var L=c.uid,D=c.type,b=D===void 0?"getJsonSchema":D,R=c.onSuccess,W={url:"/uiSchemas:".concat(b,"/").concat(L)},y=(0,N.QT)(W,{refreshDeps:[L],onSuccess:function(P){R&&R(P)}}),I=y.data,v=y.loading;return{schema:I==null?void 0:I.data,loading:v}},M=e(85893),h=function(c){return c},O=function(c){var L=c.noForm,D=c.onlyRenderProperties,b=c.hidden,R=c.scope,W=c.uid,y=c.memoized,I=y===void 0?!0:y,v=c.components,S=c.onSuccess,P=c.NotFoundPage,i=c.schemaTransform,w=i===void 0?h:i,E=c.onPageNotFind,C=(0,f.Dm)(),u=C.reset,a=D?"getProperties":"getJsonSchema",p={url:"/uiSchemas:".concat(a,"/").concat(W)},j=(0,A.useMemo)(function(){return(0,z.createForm)()},[W]),F=m({uid:W,type:a,onSuccess:function(G){S&&S(G),u&&u()}}),t=F.schema,x=F.loading,k=(0,f.Co)(P);return x||b?(0,M.jsx)("div",{style:{textAlign:"center",marginTop:20},children:(0,M.jsx)(d.Z,{})}):!t||Object.keys(t).length===0?(E&&E(),k?(0,M.jsx)(k,{}):null):L?(0,M.jsx)(o.n,{components:v,scope:R,schema:w(t||{})}):(0,M.jsx)(K.R,{form:j,children:(0,M.jsx)(o.n,{components:v,scope:R,schema:w(t||{})})})},n=(0,A.memo)(function(r){return r.uid?(0,M.jsx)(O,l()({},r)):null});n.displayName="RemoteSchemaComponent"},93323:function(ze,X,e){"use strict";e.d(X,{n:function(){return R}});var $=e(97857),l=e.n($),z=e(13769),d=e.n(z),A=e(9783),f=e.n(A),K=e(80844),o=e(90105),N=e(67294),m=e(61736),M=e(47844),h=e(85893),O=["components","scope","schema","distributed"],n=["schema"],r=["memoized"];function c(W){return K.Schema.isSchemaInstance(W)?W:W!=null&&W.name?new K.Schema({type:"object",properties:f()({},W.name,W)}):new K.Schema(W)}var L=function(y){return(0,N.useMemo)(function(){return c(y)},[])},D=(0,N.memo)(function(W){var y=W.components,I=W.scope,v=W.schema,S=W.distributed,P=d()(W,O),i=(0,N.useContext)(m.D),w=(0,N.useMemo)(function(){return c(v)},[v]),E=(0,o.Z)();return(0,h.jsx)(m.D.Provider,{value:l()(l()({},i),{},{distributed:i.distributed==!1?!1:S,refresh:function(){var u;if(E(),i.distributed===!1||S===!1){var a;(a=i.refresh)===null||a===void 0||a.call(i)}(u=W.onChange)===null||u===void 0||u.call(W,w)}}),children:(0,h.jsx)(M.G,{inherit:!0,components:y,scope:I,children:(0,h.jsx)(K.RecursionField,l()(l()({},P),{},{schema:w}))})})}),b=(0,N.memo)(function(W){var y=W.schema,I=d()(W,n),v=L(y);return(0,h.jsx)(D,l()(l()({},I),{},{schema:v}))}),R=(0,N.memo)(function(W){var y=W.memoized,I=d()(W,r);return y?(0,h.jsx)(b,l()({},I)):(0,h.jsx)(D,l()({},I))})},47844:function(ze,X,e){"use strict";e.d(X,{B:function(){return f},G:function(){return K}});var $=e(97857),l=e.n($),z=e(80844),d=e(67294),A=e(85893),f=function(){var N=(0,d.useContext)(z.SchemaOptionsContext);return N||{}},K=(0,d.memo)(function(o){var N=o.children,m=f(),M=(0,d.useMemo)(function(){return l()(l()({},m.components),o.components)},[m.components,o.components]),h=(0,d.useMemo)(function(){return l()(l()({},m.scope),o.scope)},[m.scope,o.scope]),O=(0,d.useMemo)(function(){return{scope:h,components:M}},[h,M]);return(0,A.jsx)(z.SchemaOptionsContext.Provider,{value:O,children:(0,A.jsx)(z.SchemaComponentsContext.Provider,{value:M,children:(0,A.jsx)(z.ExpressionScope,{value:h,children:N})})})});K.displayName="SchemaComponentOptions"},70993:function(ze,X,e){"use strict";e.d(X,{_b:function(){return y},RV:function(){return I.R},m1:function(){return v.m},n6:function(){return S.n},G0:function(){return P.G},a$:function(){return Q},Tz:function(){return V},Bs:function(){return P.B}});var $=e(15009),l=e.n($),z=e(99289),d=e.n(z),A=e(12444),f=e.n(A),K=e(72004),o=e.n(K),N=e(31996),m=e.n(N),M=e(26037),h=e.n(M),O=e(51947),n=e(83062),r=e(15867),c=e(67294),L=e(49218),D=e(26793),b=e(40868),R=e(68230),W=e(85893),y=function(){var Z=(0,b.ngQ)(),ne=Z.designable,ee=Z.setDesignable,B=(0,D.$)(),q=B.t,re=(0,R.d)(),pe=re.token,le={};return ne?le.backgroundColor="var(--colorSettings)":le.backgroundColor="transparent",(0,L.y1)("Ctrl+Shift+U",function(){return ee(!ne)},[ne]),(0,W.jsx)(n.Z,{title:q("UI Editor"),children:(0,W.jsx)(r.ZP,{"data-testid":"ui-editor-button",icon:(0,W.jsx)(O.Z,{style:{color:pe.colorTextHeaderMenu}}),title:q("UI Editor"),style:le,onClick:function(){ee(!ne)}})})},I=e(44245),v=e(93587),S=e(93323),P=e(47844),i=e(97857),w=e.n(i),E=e(5574),C=e.n(E),u=e(86201),a=e(80844),p=e(84327),j=e(90105),F=e(61736),t=function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return"".concat(Z).concat((0,p.uid)())};a.Schema.silent(!0);var x={},k={silent:!0,compile:function(Z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee=function(){if(k.silent)try{return new Function("$root","with($root) { return (".concat(Z,"); }"))(ne)}catch(q){return"{{".concat(Z,"}}")}else return new Function("$root","with($root) { return (".concat(Z,"); }"))(ne)};return x[Z]?x[Z]:Z.trim().startsWith("t(")?(x[Z]=ee(),x[Z]):ee()}};a.Schema.registerCompiler(k.compile);var V=function(Z){var ne=Z.designable,ee=Z.onDesignableChange,B=Z.components,q=Z.children,re=(0,c.useContext)(F.D),pe=(0,P.B)(),le=(0,j.Z)(),he=(0,c.useState)((0,p.uid)()),_e=C()(he,2),Fe=_e[0],ge=_e[1],Ae=(0,c.useMemo)(function(){return Z.form||(0,u.createForm)()},[Fe]),De=(0,D.$)(),me=De.t,se=(0,c.useMemo)(function(){return w()(w()({},Z.scope),{},{t:me,randomString:t})},[Z.scope,me,pe==null?void 0:pe.scope]),Ce=(0,c.useState)(ne),oe=C()(Ce,2),fe=oe[0],xe=oe[1],be=(0,c.useMemo)(function(){return typeof ne=="boolean"?ne:fe},[ne,fe,re.designable]),je=(0,c.useMemo)(function(){return function(Oe){typeof be!="boolean"&&xe(Oe),ee==null||ee(Oe)}},[be,ee]),Re=(0,c.useCallback)(function(){ge((0,p.uid)())},[]);return(0,W.jsx)(F.D.Provider,{value:{scope:se,components:B,reset:Re,refresh:le,designable:be,setDesignable:je},children:(0,W.jsx)(a.FormProvider,{form:Ae,children:(0,W.jsx)(P.G,{inherit:!0,scope:se,components:B,children:q})})})};V.displayName="SchemaComponentProvider";var G=e(31601),Q=function(H){m()(ne,H);var Z=h()(ne);function ne(){return f()(this,ne),Z.apply(this,arguments)}return o()(ne,[{key:"load",value:function(){var ee=d()(l()().mark(function q(){return l()().wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:this.addComponents();case 1:case"end":return pe.stop()}},q,this)}));function B(){return ee.apply(this,arguments)}return B}()},{key:"addComponents",value:function(){this.app.addComponents({DesignableSwitch:y})}}]),ne}(G.S),U=null},84577:function(ze,X,e){"use strict";e.d(X,{zz:function(){return K.zz},Pl:function(){return K.Pl},oB:function(){return K.oB},lI:function(){return l},hi:function(){return b.hi},eJ:function(){return z.e},Co:function(){return f},aZ:function(){return b.aZ},ng:function(){return K.ng},et:function(){return o.e},cL:function(){return c},fd:function(){return R},Cl:function(){return M},vH:function(){return L},sR:function(){return K.sR},wN:function(){return D.w},Dm:function(){return O},fM:function(){return b.fM}});var $=e(67294),l=function(y){var I=(0,$.useRef)(null);return(0,$.useEffect)(function(){return I.current&&y!==I.current&&I.current.onUnmount(),I.current=y,y.onMount(),function(){y.onUnmount()}},[y]),y},z=e(96365),d=e(80844),A=e(96486),f=function(y,I){var v=(0,$.useContext)(d.SchemaOptionsContext),S=v.components;return y?typeof y!="string"?y:(0,A.get)(S,y)||I:I},K=e(94516),o=e(98146),N=e(97857),m=e.n(N),M=function(y){var I=(0,$.useContext)(d.SchemaOptionsContext),v=(0,$.useContext)(d.SchemaExpressionScopeContext),S=(0,$.useRef)();return S.current=v,y.toFieldProps(m()(m()({},I),{},{get scope(){return m()(m()({},I.scope),S.current)}}))},h=e(61736);function O(){return(0,$.useContext)(h.D)}var n=e(26793),r=e(6145),c=function(){var y,I=(0,r.useCollectionManager_deprecated)(),v=I.getCollectionJoinField,S=I.getCollection,P=(0,d.useFieldSchema)(),i=(0,r.useCollection_deprecated)(),w=i.getField,E=w(P.name)||v(P["x-collection-field"]),C=(0,n.$)(),u=C.t,a=((y=P["x-component-props"])===null||y===void 0?void 0:y.fieldNames)||{},p=a.label,j=(0,$.useMemo)(function(){if(!(!E||!(E!=null&&E.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m"].includes(E.interface)){var F=S(E.target);if((F==null?void 0:F.template)==="file")return[{label:u("Record picker"),value:"CollectionField"},{label:u("Select"),value:"AssociationSelect"}];switch(E.interface){case"o2m":return[{label:u("Record picker"),value:"CollectionField"},{label:u("Subtable"),value:"TableField"},{label:u("Select"),value:"AssociationSelect"}];case"m2o":case"m2m":case"linkTo":return[{label:u("Record picker"),value:"CollectionField"},{label:u("Select"),value:"AssociationSelect"}];default:return[{label:u("Record picker"),value:"CollectionField"},{label:u("Subform"),value:"FormField"},{label:u("Select"),value:"AssociationSelect"}]}}},[u,E==null?void 0:E.interface,p]);return j},L=function(){var y,I=(0,d.useField)(),v=(0,d.useFieldSchema)(),S=(0,r.useCollection_deprecated)(),P=S.getField,i=(0,r.useCollectionManager_deprecated)(),w=i.getCollectionJoinField,E=P(v.name)||w(v["x-collection-field"]),C=(0,z.e)();(0,$.useEffect)(function(){if(!(I!=null&&I.title)){var u;I.title=C(E==null||(u=E.uiSchema)===null||u===void 0?void 0:u.title)}},[E==null||(y=E.uiSchema)===null||y===void 0?void 0:y.title])},D=e(9780),b=e(18686),R=function(y){var I,v=(0,n.$)(),S=v.t,P=(0,r.useCollectionManager_deprecated)(),i=P.getCollectionJoinField,w=P.getCollection,E=(0,d.useFieldSchema)(),C=(y==null?void 0:y.fieldSchema)||E,u=(0,d.useField)(),a=(0,d.useForm)(),p=(C==null?void 0:C["x-read-pretty"])||u.readPretty||a.readPretty,j=y==null?void 0:y.fieldSchema,F=(0,r.useCollection_deprecated)(),t=F.getField,x=(y==null?void 0:y.collectionField)||t(C.name)||i(C["x-collection-field"]),k=((I=C["x-component-props"])===null||I===void 0?void 0:I.fieldNames)||{},V=k.label,G=(0,$.useMemo)(function(){if(!(!x||!(x!=null&&x.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m","updatedBy","createdBy","mbm"].includes(x.interface)){var Q=w(x.target);if((Q==null?void 0:Q.template)==="file")return p?[{label:S("Title"),value:"Select"},{label:S("File manager"),value:"FileManager"},{label:S("Tag"),value:"Tag"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},{label:S("File manager"),value:"FileManager"}];if((Q==null?void 0:Q.template)==="tree"&&["m2m","o2m","m2o"].includes(x.interface))return p?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!j&&{label:S("Sub-details"),value:"Nester"},!j&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!j&&["m2m","o2m"].includes(x.interface)&&{label:S("Sub-table"),value:"SubTable"},!j&&{label:S("Cascade Select"),value:"CascadeSelect"},!j&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];switch(x.interface){case"o2m":return p?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!j&&{label:S("Sub-table"),value:"SubTable"},!j&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!j&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"},!j&&{label:S("Sub-table"),value:"SubTable"}];case"m2m":case"mbm":return p?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!j&&{label:S("Sub-details"),value:"Nester"},!j&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!j&&{label:S("Sub-table"),value:"SubTable"},!j&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];case"m2o":case"linkTo":return p?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!j&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!j&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];default:return p?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!j&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!j&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}]}}},[S,x==null?void 0:x.interface,V]);return(G||[]).filter(Boolean)}},18686:function(ze,X,e){"use strict";e.d(X,{aZ:function(){return y},fM:function(){return v},hi:function(){return I}});var $=e(5574),l=e.n($),z=e(97857),d=e.n(z),A=e(80844),f=e(83204),K=e(9361),o=e(96486),N=e.n(o),m=e(67294),M=e(40868),h=e(21143),O=e(10097),n=e(1892),r=e(28561),c=function(i,w,E,C){return i?C.paddingContentHorizontalLG:E?w?C.controlPaddingHorizontal+3*C.controlPaddingHorizontalSM+22+C.paddingContentHorizontalLG:C.paddingContentHorizontalLG+12:w?C.paddingSM+C.controlHeight+C.marginXS+2*C.controlPaddingHorizontalSM+22+C.paddingContentHorizontalLG:C.controlHeight+C.marginXS+(C.paddingXXS+2)*2+C.paddingContentHorizontalLG},L=function(i){var w=K.Z.useToken(),E=w.token,C=(0,M.ngQ)(),u=C.designable,a=(0,O.useBlockHeightProps)(),p=a.heightProps,j=i||p||{},F=j.disablePageHeader,t=j.enablePageTabs,x=j.hidePageTitle,k=E.sizeXXL-2,V=u?E.controlHeight+2*E.paddingContentHorizontalLG:1*E.paddingContentHorizontalLG,G=c(F,t,x,E);return k+G+V},D=function(){var i=K.Z.useToken(),w=i.token,E=(0,M.ngQ)(),C=E.designable,u=w.paddingContentVerticalLG+w.margin+2*w.paddingContentVertical+24,a=C?w.controlHeight+2*w.paddingContentHorizontalLG:1*w.paddingContentHorizontalLG;return u+a},b=function(i){var w=(0,A.useFieldSchema)(),E=S(w),C=L(i),u=D();return E?u:C},R=["users_jobs","approvals","approvalRecords"],W=function(){var i,w,E=K.Z.useToken(),C=E.token,u=(0,O.useBlockHeightProps)(),a=u.heightProps,p=(0,n.Si)(),j=p.heightProps,F=(0,M.ngQ)(),t=F.designable,x=(0,A.useFieldSchema)(),k=j||a,V=b(k),G=(i=(0,h.useDataBlockRequest)())!==null&&i!==void 0?i:{},Q=G.data,U=(0,h.useCollection)(),H=U.name,Z=(Q==null?void 0:Q.meta)||{},ne=Z.count,ee=Z.pageSize,B=ne>ee,q=k.heightMode,re=k.height,pe=k.title;if(!(!(k!=null&&k.heightMode)||q===r.j.DEFAULT)){var le=Object.keys(((w=x.parent.properties.actions)===null||w===void 0?void 0:w.properties)||{}).length>0,he=B?C.controlHeight+C.padding+C.marginLG:C.marginLG,_e=le||t?C.controlHeight+2*C.marginLG:C.marginLG,Fe=(t&&!R.includes(H)?C.controlHeight:22)+2*C.padding+1,ge=pe?C.fontSizeLG*C.lineHeightLG+C.padding*2-1:0;return q===r.j.FULL_HEIGHT?window.innerHeight-V-ge-Fe-_e-he:re-ge-_e-Fe-he}},y=function(i){var w=(0,O.useBlockHeightProps)(),E=w.heightProps,C=b(),u=K.Z.useToken(),a=u.token,p=E||{},j=p.heightMode,F=p.height,t=p.title,x=t?a.fontSizeLG*a.lineHeightLG+a.padding*2-1:0;if(!(!(E!=null&&E.heightMode)||j===r.j.DEFAULT)){if(j===r.j.FULL_HEIGHT){var k=window.innerHeight-C;return i!=null&&i.removeBlockHeaderHeight&&(k=k-x),i!=null&&i.innerExtraHeight&&(k=k-i.innerExtraHeight),k}return F}},I=function(){var i=(0,A.useFieldSchema)(),w=(0,m.useMemo)(function(){return(0,O.getPageSchema)(i)},[]),E=(w==null?void 0:w["x-component-props"])||{},C=E.disablePageHeader,u=E.enablePageTabs,a=E.hidePageTitle,p=d()(d()({},i==null?void 0:i["x-component-props"]),{},{disablePageHeader:C,enablePageTabs:u,hidePageTitle:a}),j=b(p),F=p||{},t=F.heightMode,x=F.height;if(!(!(p!=null&&p.heightMode)||t===r.j.DEFAULT))return t===r.j.FULL_HEIGHT?window.innerHeight-j:x},v=function(){var i=(0,m.useState)(),w=l()(i,2),E=w[0],C=w[1],u=(0,m.useRef)(null),a=W(),p=(0,m.useCallback)((0,o.debounce)(function(){var F;if(u.current){var t=u.current.getBoundingClientRect(),x=(F=u.current.querySelector(".ant-table"))===null||F===void 0?void 0:F.getBoundingClientRect();x&&C(t.width)}},100),[a]),j=(0,m.useCallback)(function(F){u.current=F&&F.children?F.children[0]:null,p()},[p]);return(0,f.Z)("resize",p),{height:a,width:E,tableSizeRefCallback:j}},S=function P(i){return i?i["x-component"]==="Action.Container"?!0:P(i.parent):null}},96365:function(ze,X,e){"use strict";e.d(X,{e:function(){return o}});var $=e(97857),l=e.n($),z=e(52677),d=e.n(z),A=e(80844),f=e(67294),K={},o=function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{noCache:!1},M=m.noCache,h=(0,f.useContext)(A.SchemaOptionsContext),O=(0,f.useContext)(A.SchemaExpressionScopeContext);return function(n,r){var c=!1,L;if(typeof n=="string"&&n.startsWith("{{")&&(c=!0,L=n),n&&d()(n)==="object"&&!(0,f.isValidElement)(n)&&(c=!0,L=JSON.stringify(n)),Array.isArray(n)&&(c=!0),c){var D=l()(l()(l()({},h.scope),O),r);if(!L)return A.Schema.compile(n,D);try{return M?A.Schema.compile(n,D):(K[L]=K[L]||A.Schema.compile(n,D),K[L])}catch(b){return console.log("useCompile error",n,b),A.Schema.compile(n,D)}}return n}}},94516:function(ze,X,e){"use strict";e.d(X,{zz:function(){return V},Pl:function(){return p},oB:function(){return x},ng:function(){return Q},sR:function(){return G}});var $=e(5574),l=e.n($),z=e(19632),d=e.n(z),A=e(15009),f=e.n(A),K=e(99289),o=e.n(K),N=e(12444),m=e.n(N),M=e(72004),h=e.n(M),O=e(9783),n=e.n(O),r=e(97857),c=e.n(r),L=e(80844),D=e(84327),b=e(45360),R=e(50361),W=e.n(R),y=e(27361),I=e.n(y),v=e(36968),S=e.n(v),P=e(67294),i=e(26793),w=e(12174),E=e(61736);function C(U,H){if(U)return U["x-app-version"]||(U["x-app-version"]=H),Object.keys(U.properties||{}).forEach(function(Z){var ne;C((ne=U.properties)===null||ne===void 0?void 0:ne[Z],H)}),U}var u={i8:"1.3.54"},a=e(85893);function p(U){return new V(U)}var j=function U(H){H&&(H["x-uid"]||(H["x-uid"]=(0,D.uid)()),Object.keys(H.properties||{}).forEach(function(Z){U(H.properties[Z])}))},F=function(H){return H},t=function(H,Z){if(!(!H||!Z)){for(var ne in Z)if(Object.prototype.hasOwnProperty.call(Z,ne)){var ee=Z[ne];if(ee!==(H==null?void 0:H[ne]))return!1}return!0}},x=function(H,Z){if(H["x-uid"]&&H["x-uid"]===Z["x-uid"])return[null,H.toJSON()];var ne=H.toJSON(),ee=c()(c()({},ne),{},{properties:{}}),B=null,q=function re(pe,le){Object.keys(pe||{}).forEach(function(he){var _e=pe[he];if(_e["x-uid"]===Z["x-uid"]){B=pe[he];return}else le.properties[he]=c()(c()({},_e),{},{properties:{}}),re(_e==null?void 0:_e.properties,le.properties[he])})};return q(ne.properties,ee),[ee,B]},k=function(H){return H},V=function(){function U(H){m()(this,U),n()(this,"current",void 0),n()(this,"options",void 0),n()(this,"appVersion",void 0),n()(this,"events",{}),this.options=H,this.current=H.current,this.appVersion=H.appVersion}return h()(U,[{key:"model",get:function(){return this.options.model}},{key:"query",get:function(){return this.options.query}},{key:"loadAPIClientEvents",value:function(){var Z=this,ne=this.options,ee=ne.api,B=ne.t,q=B===void 0?k:B;if(ee){var re=function(le){if(!le)return[];var he=Object.values(le.properties).length,_e=[];return le.mapProperties(function(Fe){Fe["x-component-props"]=Fe["x-component-props"]||{},Fe["x-component-props"].width=100/he,Fe["x-uid"]&&_e.push({"x-uid":Fe["x-uid"],"x-component-props":Fe["x-component-props"]})}),le["x-uid"]&&_e.length?_e:[]};this.on("insertAdjacent",function(){var pe=o()(f()().mark(function le(he){var _e,Fe,ge,Ae,De,me,se,Ce,oe,fe;return f()().wrap(function(be){for(;;)switch(be.prev=be.next){case 0:if(Fe=he.onSuccess,ge=he.current,Ae=he.position,De=he.schema,me=he.wrap,se=he.wrapped,Ce=he.removed,oe=[],(se==null?void 0:se["x-component"])==="Grid.Col"&&(oe=oe.concat(re(se.parent))),(Ce==null?void 0:Ce["x-component"])==="Grid.Col"&&(oe=oe.concat(re(Ce.parent))),Z.refresh(),ge["x-uid"]){be.next=7;break}return be.abrupt("return");case 7:return be.next=9,ee.request({url:"/uiSchemas:insertAdjacent/".concat(ge["x-uid"],"?position=").concat(Ae),method:"post",data:{schema:C(De,Z.appVersion),wrap:me}});case 9:if(fe=be.sent,!oe.length){be.next=13;break}return be.next=13,ee.request({url:"/uiSchemas:batchPatch",method:"post",data:oe});case 13:if(!(Ce!=null&&Ce["x-uid"])){be.next=16;break}return be.next=16,ee.request({url:"/uiSchemas:remove/".concat(Ce["x-uid"]),method:"post"});case 16:Fe==null||Fe(fe==null||(_e=fe.data)===null||_e===void 0?void 0:_e.data),b.ZP.success(q("Saved successfully"),.2);case 18:case"end":return be.stop()}},le)}));return function(le){return pe.apply(this,arguments)}}()),this.on("patch",function(){var pe=o()(f()().mark(function le(he){var _e;return f()().wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:if(_e=he.schema,Z.refresh(),_e!=null&&_e["x-uid"]){ge.next=4;break}return ge.abrupt("return");case 4:return ge.next=6,ee.request({url:"/uiSchemas:patch",method:"post",data:c()({},_e)});case 6:b.ZP.success(q("Saved successfully"),.2);case 7:case"end":return ge.stop()}},le)}));return function(le){return pe.apply(this,arguments)}}()),this.on("initializeActionContext",function(){var pe=o()(f()().mark(function le(he){var _e;return f()().wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:if(_e=he.schema,Z.refresh(),_e!=null&&_e["x-uid"]){ge.next=4;break}return ge.abrupt("return");case 4:return ge.next=6,ee.request({url:"/uiSchemas:initializeActionContext",method:"post",data:c()({},_e)});case 6:case"end":return ge.stop()}},le)}));return function(le){return pe.apply(this,arguments)}}()),this.on("batchPatch",function(){var pe=o()(f()().mark(function le(he){var _e;return f()().wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return _e=he.schemas,Z.refresh(),ge.next=4,ee.request({url:"/uiSchemas:batchPatch",method:"post",data:_e});case 4:b.ZP.success(q("Saved successfully"),.2);case 5:case"end":return ge.stop()}},le)}));return function(le){return pe.apply(this,arguments)}}()),this.on("remove",function(){var pe=o()(f()().mark(function le(he){var _e,Fe;return f()().wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:if(_e=he.removed,Fe=[],(_e==null?void 0:_e["x-component"])==="Grid.Col"&&(Fe=re(_e.parent)),Z.refresh(),_e!=null&&_e["x-uid"]){Ae.next=6;break}return Ae.abrupt("return");case 6:return Ae.next=8,ee.request({url:"/uiSchemas:remove/".concat(_e["x-uid"]),method:"post"});case 8:if(!Fe.length){Ae.next=11;break}return Ae.next=11,ee.request({url:"/uiSchemas:batchPatch",method:"post",data:Fe});case 11:b.ZP.success(q("Saved successfully"),.2);case 12:case"end":return Ae.stop()}},le)}));return function(le){return pe.apply(this,arguments)}}())}}},{key:"prepareProperty",value:function(Z){Z.type||(Z.type="void"),Z.name||(Z.name=(0,D.uid)()),this.current["x-uid"]&&j(Z)}},{key:"on",value:function(Z,ne){this.events[Z]||(this.events[Z]=[]),this.events[Z].push(ne)}},{key:"emit",value:function(){var H=o()(f()().mark(function ne(ee){var B=this,q,re,pe,le,he,_e=arguments;return f()().wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:if(this.events[ee]){ge.next=2;break}return ge.abrupt("return");case 2:for(q=_e.length,re=new Array(q>1?q-1:0),pe=1;pe<q;pe++)re[pe-1]=_e[pe];return le=re[0],he=re.slice(1),ge.abrupt("return",Promise.all(this.events[ee].map(function(Ae){return Ae.bind(B).apply(void 0,[c()({current:B.current},le)].concat(d()(he)))})));case 5:case"end":return ge.stop()}},ne,this)}));function Z(ne){return H.apply(this,arguments)}return Z}()},{key:"parentsIn",value:function(Z){if(!Z||!L.Schema.isSchemaInstance(Z))return!1;for(var ne=this.current;(ee=ne)!==null&&ee!==void 0&&ee.parent;){var ee;if(ne.parent===Z)return!0;ne=ne.parent}return!1}},{key:"refresh",value:function(){var Z=this.options.refresh;return Z==null?void 0:Z()}},{key:"deepMerge",value:function(Z){var ne=this,ee={title:"title",description:"description",default:"initialValue",readOnly:"readOnly",writeOnly:"editable",enum:"dataSource","x-pattern":"pattern","x-display":"display","x-validator":"validator","x-decorator":"decorator","x-component":"component","x-reactions":"reactions","x-content":"content","x-visible":"visible","x-hidden":"hidden","x-disabled":"disabled","x-editable":"editable","x-read-only":"readOnly"},B={"x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(Z).forEach(function(q){ee[q]?(ne.current[q]=Z[q],ne.updateModel(ee[q],Z[q])):B[q]?Object.keys(Z[q]).forEach(function(re){S()(ne.current,[q,re],Z[q][re]),ne.updateModel([B[q],re],Z[q][re])}):ne.current[q]=Z[q]}),this.emit("patch",{schema:Z})}},{key:"getSchemaAttribute",value:function(Z,ne){return I()(this.current,Z,ne)}},{key:"shallowMerge",value:function(Z){var ne=this,ee={title:"title",description:"description",default:"initialValue",readOnly:"readOnly",writeOnly:"editable",enum:"dataSource","x-pattern":"pattern","x-display":"display","x-validator":"validator","x-decorator":"decorator","x-component":"component","x-reactions":"reactions","x-content":"content","x-visible":"visible","x-hidden":"hidden","x-disabled":"disabled","x-editable":"editable","x-read-only":"readOnly","x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(Z).forEach(function(B){ne.current[B]=Z[B],ee[B]&&ne.updateModel(ee[B],Z[B])}),this.emit("patch",{schema:Z})}},{key:"updateModel",value:function(Z,ne){var ee=function(q){S()(q,Z,ne)};this.model&&ee(this.model),this.query&&this.query.take(ee)}},{key:"insertAdjacent",value:function(Z,ne){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};switch(Z){case"beforeBegin":return this.insertBeforeBegin(ne,ee);case"afterBegin":return this.insertAfterBegin(ne,ee);case"beforeEnd":return this.insertBeforeEnd(ne,ee);case"afterEnd":return this.insertAfterEnd(ne,ee)}}},{key:"recursiveRemoveIfNoChildren",value:function(Z,ne){if(Z){for(var ee=Z,B,q=ne==null?void 0:ne.breakRemoveOn;ee;){if(typeof q=="function"){if(q(ee))break}else if(t(ee,q))break;var re=Object.keys(ee.properties||{}).length;if(re>0)break;ee.parent&&(B=ee.parent.removeProperty(ee.name)),ee=ee.parent}return B}}},{key:"remove",value:function(Z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee=ne.breakRemoveOn,B=ne.removeParentsIfNoChildren,q=Z||this.current,re=q.parent.removeProperty(q.name);if(B){var pe=this.recursiveRemoveIfNoChildren(q.parent,{breakRemoveOn:ee});pe&&(re=pe)}return this.emit("remove",{removed:re})}},{key:"removeWithoutEmit",value:function(Z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee=ne.breakRemoveOn,B=ne.removeParentsIfNoChildren,q=Z||this.current,re=q.parent.removeProperty(q.name);if(B){var pe=this.recursiveRemoveIfNoChildren(q.parent,{breakRemoveOn:ee});pe&&(re=pe)}return re}},{key:"insertBeforeBeginOrAfterEnd",value:function(Z){var ne=this,ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(L.Schema.isSchemaInstance(this.current)&&L.Schema.isSchemaInstance(Z)&&this.current.parent===Z.parent){var B=0,q=0;return this.current.parent.mapProperties(function(re,pe,le){ne.current.name===pe&&(q=le),Z.name===pe&&(B=le)}),B>q?this.insertBeforeBegin(Z,ee):this.insertAfterEnd(Z,ee)}}},{key:"insertBeforeBegin",value:function(Z){var ne=this,ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(L.Schema.isSchemaInstance(this.current)){var B={onSuccess:ee.onSuccess},q=ee.wrap,re=q===void 0?F:q,pe=ee.breakRemoveOn,le=ee.removeParentsIfNoChildren;if(L.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),le&&(B.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:pe}))}else Z&&(Z=W()(Z));var he={},_e=!1,Fe=0,ge=0;this.current.parent.mapProperties(function(fe,xe){xe===ne.current.name&&(ge=Fe,_e=!0,++Fe),fe["x-index"]=Fe,++Fe,_e&&(he[xe]=fe,ne.current.parent.removeProperty(xe))}),this.prepareProperty(Z);var Ae=re(Z),De=this.current.parent.addProperty(Ae.name||(0,D.uid)(),Ae);De["x-index"]=ge,De.parent=this.current.parent,this.current.parent.setProperties(he);var me=x(De,Z),se=l()(me,2),Ce=se[0],oe=se[1];this.emit("insertAdjacent",c()({position:"beforeBegin",schema:oe,wrapped:Ae,wrap:Ce},B))}}},{key:"insertAfterBegin",value:function(Z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(L.Schema.isSchemaInstance(this.current)){var ee={onSuccess:ne.onSuccess},B=ne.wrap,q=B===void 0?F:B,re=ne.breakRemoveOn,pe=ne.removeParentsIfNoChildren;if(L.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),pe&&(ee.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:re}))}else Z&&(Z=W()(Z));var le={},he=1;this.current.mapProperties(function(se,Ce){se["x-index"]=he,++he,le[Ce]=se}),this.current.properties={},this.prepareProperty(Z);var _e=q(Z),Fe=this.current.addProperty(_e.name||(0,D.uid)(),_e);Fe["x-index"]=0,Fe.parent=this.current,this.current.setProperties(le);var ge=x(Fe,Z),Ae=l()(ge,2),De=Ae[0],me=Ae[1];this.emit("insertAdjacent",c()({position:"afterBegin",schema:me,wrap:De,wrapped:_e},ee))}}},{key:"insertBeforeEnd",value:function(Z){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(L.Schema.isSchemaInstance(this.current)){delete Z["x-index"];var ee={onSuccess:ne.onSuccess},B=ne.wrap,q=B===void 0?F:B,re=ne.breakRemoveOn,pe=ne.removeParentsIfNoChildren;if(L.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),pe&&(ee.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:re}))}else Z&&(Z=W()(Z));this.prepareProperty(Z);var le=q(Z),he=this.current.addProperty(le.name||(0,D.uid)(),le);he.parent=this.current;var _e=x(he,Z),Fe=l()(_e,2),ge=Fe[0],Ae=Fe[1];return this.emit("insertAdjacent",c()({position:"beforeEnd",schema:Ae,wrap:ge,wrapped:le},ee))}}},{key:"insertAfterEnd",value:function(Z){var ne=this,ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(L.Schema.isSchemaInstance(this.current)){var B={onSuccess:ee==null?void 0:ee.onSuccess},q=ee.wrap,re=q===void 0?F:q,pe=ee.breakRemoveOn,le=ee.removeParentsIfNoChildren,he=0,_e=0,Fe=!1,ge={};if(this.current.parent.mapProperties(function(fe,xe){fe["x-index"]=he,xe===ne.current.name&&(++he,_e=he,Fe=!0),++he,Fe&&xe!==ne.current.name&&(ge[xe]=fe,ne.current.parent.removeProperty(xe))}),L.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),le&&(B.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:pe})),Z.parent=null}else Z&&(Z=W()(Z));this.prepareProperty(Z);var Ae=re(Z),De=this.current.parent.addProperty(Ae.name||(0,D.uid)(),Ae);De.parent=this.current.parent,De["x-index"]=_e,this.current.parent.setProperties(ge);var me=x(De,Z),se=l()(me,2),Ce=se[0],oe=se[1];this.emit("insertAdjacent",c()({position:"afterEnd",schema:oe,wrap:Ce,wrapped:Ae},B))}}}]),U}();function G(){var U=(0,P.useContext)(L.SchemaOptionsContext),H=(0,P.useMemo)(function(){return(U==null?void 0:U.components)||{}},[U]),Z=function(ee){if(!ee)return null;if(typeof ee!="string")return ee;var B=I()(H,ee);return B||console.error('[nocobase]: Component "'.concat(ee,'" not found')),B};return Z}function Q(){var U=(0,P.useContext)(E.D),H=U.designable,Z=U.setDesignable,ne=U.refresh,ee=U.reset,B=(0,P.useContext)(L.SchemaOptionsContext),q=(0,P.useMemo)(function(){return(B==null?void 0:B.components)||{}},[B]),re=(0,P.useMemo)(function(){return function(){return(0,a.jsx)(a.Fragment,{})}},[]),pe=(0,L.useField)(),le=(0,L.useFieldSchema)(),he=(0,w.LY)(),_e=(0,i.$)(),Fe=_e.t,ge=(0,P.useMemo)(function(){return p({t:Fe,api:he,refresh:ne,current:le,model:pe,appVersion:u.i8})},[Fe,he,ne,le,pe]);return(0,P.useEffect)(function(){ge.loadAPIClientEvents()},[ge]),{dn:ge,designable:H,reset:ee,refresh:ne,setDesignable:Z,DesignableBar:re,findComponent:(0,P.useCallback)(function(Ae){return Ae?typeof Ae!="string"?Ae:I()(q,Ae):null},[I()]),on:ge.on.bind(ge),patch:(0,P.useCallback)(function(Ae,De){var me=function(oe){Object.keys(oe).forEach(function(fe){var xe=oe[fe];fe==="title"&&(pe.title=xe,le.title=xe),fe==="x-decorator-props"&&(pe.decoratorProps||(pe.decoratorProps={}),le["x-decorator-props"]||(le["x-decorator-props"]={}),Object.keys(xe).forEach(function(be){pe.decoratorProps[be]=xe[be],le["x-decorator-props"][be]=xe[be]})),fe==="x-component-props"&&(pe.componentProps||(pe.componentProps={}),le["x-component-props"]||(le["x-component-props"]={}),Object.keys(xe).forEach(function(be){pe.componentProps[be]=xe[be],le["x-component-props"][be]=xe[be]}))})};if(typeof Ae=="string"){var se={};return S()(se,Ae,De),me(se)}me(Ae),ne()},[ge]),shallowMerge:(0,P.useCallback)(function(Ae){ge.shallowMerge(Ae)},[ge]),deepMerge:(0,P.useCallback)(function(Ae){ge.deepMerge(Ae)},[ge]),remove:(0,P.useCallback)(function(Ae,De){ge.remove(Ae,De)},[ge]),insertAdjacent:(0,P.useCallback)(function(Ae,De,me){ge.insertAdjacent(Ae,De,me)},[ge]),insertBeforeBegin:(0,P.useCallback)(function(Ae){ge.insertBeforeBegin(Ae)},[ge]),insertAfterBegin:(0,P.useCallback)(function(Ae){ge.insertAfterBegin(Ae)},[ge]),insertBeforeEnd:(0,P.useCallback)(function(Ae){ge.insertBeforeEnd(Ae)},[ge]),insertAfterEnd:(0,P.useCallback)(function(Ae){ge.insertAfterEnd(Ae)},[ge])}}},98146:function(ze,X,e){"use strict";e.d(X,{e:function(){return f}});var $=e(80844),l=e(84577),z=e(67294),d=e(26386),A=function(){return null},f=function(){var o=(0,l.ng)(),N=o.designable,m=(0,$.useFieldSchema)(),M=(0,z.useMemo)(function(){return m["x-designer"]||m["x-toolbar"]?m["x-designer"]||m["x-toolbar"]:m["x-settings"]?d.Mf:A},[m]),h=(0,l.Co)(M);return N&&h||A}},9780:function(ze,X,e){"use strict";e.d(X,{w:function(){return K}});var $=e(97857),l=e.n($),z=e(13769),d=e.n(z),A=["useProps"],f=function(){return{}},K=function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=N.useProps,M=m===void 0?f:m,h=d()(N,A),O=M;typeof M!="function"&&(O=f);var n=O();return l()(l()({},h),n)}},40868:function(ze,X,e){"use strict";e.d(X,{aUM:function(){return y.aU},olz:function(){return y.ol},N0i:function(){return y.N0},fWn:function(){return y.fW},EIK:function(){return y.EI},$Lt:function(){return y.$L},$b8:function(){return y.$b},HTy:function(){return ya},lkv:function(){return wr},rDu:function(){return Ja},eYL:function(){return y.eY},Rat:function(){return Hr},oAt:function(){return Sr},E7E:function(){return br},$SD:function(){return mi},fUi:function(){return $r.fU},QcG:function(){return Hl},MLy:function(){return _o.M},gOu:function(){return _s},jYG:function(){return Na.j},C1I:function(){return y.C1},Ssf:function(){return Jl},vTp:function(){return Xl},XZJ:function(){return Xr},Tt2:function(){return ns},zH8:function(){return ls},Q5L:function(){return cs},Pok:function(){return vi},Vm0:function(){return ps},xI_:function(){return rs},Lip:function(){return os},Mtg:function(){return qr.Mt},iNu:function(){return qr.iN},zzt:function(){return jt.zz},_bl:function(){return b._b},POi:function(){return fs},AOY:function(){return he},LBT:function(){return D.DndContext},IWB:function(){return D.DragHandler},LCt:function(){return D.DraggableContext},FyH:function(){return re.Fy},Nir:function(){return re.Ni},q8U:function(){return re.q8},HGA:function(){return re.HG},QTe:function(){return re.QT},JEX:function(){return re.JE},fAH:function(){return dl},$w$:function(){return re.$w},nBj:function(){return re.nB},Oct:function(){return re.Oc},zdw:function(){return re.zd},CXR:function(){return ul},BQs:function(){return yr.BQ},Hj5:function(){return Bn.H},M0b:function(){return pi},wn$:function(){return xn.wn},GzZ:function(){return xn.Gz},tJZ:function(){return xn.tJ},fox:function(){return xn.fo},VTd:function(){return xn.VT},XsZ:function(){return xn.Xs},AsW:function(){return Zo},cLM:function(){return Wo},m__:function(){return Oo},l09:function(){return ee},D_t:function(){return Qi.D},WiK:function(){return Vn},xJW:function(){return re.xJ},RVL:function(){return b.RV},Bc8:function(){return St},hG9:function(){return hi},DCh:function(){return fi},rjZ:function(){return ea.rj},Cqo:function(){return $a},jg7:function(){return ea.jg},gsn:function(){return yr.gs},$18:function(){return Is},IIB:function(){return yr.II},RnZ:function(){return qi},mX2:function(){return yr.mX},zDC:function(){return cr.zD},Phs:function(){return yr.Ph},aVo:function(){return Va},UGj:function(){return nl},yq5:function(){return ol},v2r:function(){return ua},HIW:function(){return Du},T3C:function(){return or},d97:function(){return Qr.d9},hGv:function(){return mr},tlE:function(){return Qs},rop:function(){return Xs},gGi:function(){return qs},DBW:function(){return va.D},MBS:function(){return eu.M},pGO:function(){return nu},Y8K:function(){return Pi},iVT:function(){return yr.iV},ODP:function(){return cr.OD},lbb:function(){return cr.lb},b7w:function(){return cr.b7},sUk:function(){return cr.sU},x1j:function(){return y.x1},m1v:function(){return b.m1},glM:function(){return Vt},xZD:function(){return y.xZ},IuH:function(){return xn.Iu},MkN:function(){return y.Mk},Hof:function(){return ru},n6:function(){return b.n6},DDd:function(){return hv.D},G0E:function(){return b.G0},a$w:function(){return b.a$},TzZ:function(){return b.Tz},y00:function(){return y.y0},PhF:function(){return _t},Cqv:function(){return D.ShowFormData},cof:function(){return y.co},bts:function(){return D.Sortable},Fop:function(){return D.SortableContext},TRI:function(){return D.SortableItem},ORg:function(){return D.SortableProvider},TaI:function(){return au},qHe:function(){return kn.q},iA_:function(){return Lr},gvM:function(){return fu},SnY:function(){return ml},ASv:function(){return gu},bwk:function(){return Zr},mQc:function(){return Si},c__:function(){return ka.c},QZ3:function(){return At},L39:function(){return Na.L},jII:function(){return vl},mPs:function(){return yu},tgM:function(){return Eu},gqx:function(){return $r.gq},Qm7:function(){return $r.Qm},_wD:function(){return Pa._w},rjl:function(){return Pa.rj},Fjw:function(){return y.Fj},SLL:function(){return y.SL},sBv:function(){return y.sB},iTm:function(){return re.iT},Pls:function(){return jt.Pl},Oxq:function(){return wt},WLi:function(){return we},$9M:function(){return re.$9},nCn:function(){return za},iNG:function(){return _a},tD8:function(){return Ci},pg9:function(){return Zn},Ofb:function(){return re.Of},ibf:function(){return Xn},WyG:function(){return q},l6$:function(){return Ie.l6},WGR:function(){return An},C$H:function(){return cr.C$},cNQ:function(){return cr.cN},I9l:function(){return D.getRenderContent},XQ2:function(){return zr.XQ},ZZb:function(){return re.ZZ},elO:function(){return cr.el},CfU:function(){return Tr},SJF:function(){return Cr},_Ko:function(){return Nr},Mev:function(){return ma},i2K:function(){return qn},WmO:function(){return xn.Wm},oBi:function(){return jt.oB},hKP:function(){return zr.hK},DU1:function(){return y.DU},XCj:function(){return y.XC},Vpg:function(){return gr},lIL:function(){return jt.lI},KxP:function(){return _o.K},hi9:function(){return jt.hi},p27:function(){return y.p2},z9d:function(){return cl.z},eJW:function(){return jt.eJ},Cor:function(){return jt.Co},Zmk:function(){return Qr.Zm},aZq:function(){return jt.aZ},P1D:function(){return qr.P1},ngQ:function(){return jt.ng},ett:function(){return jt.et},ySm:function(){return Bn.y},Zd$:function(){return re.Zd},cLh:function(){return jt.cL},baz:function(){return re.b},fde:function(){return jt.fd},Xdt:function(){return cr.Xd},Cld:function(){return jt.Cl},vH8:function(){return jt.vH},PLH:function(){return xn.PL},V8t:function(){return xn.V8},tMk:function(){return xn.tM},xQm:function(){return xn.xQ},sRe:function(){return jt.sR},frb:function(){return Ro},$N2:function(){return Uo},U1u:function(){return tt},HS$:function(){return y.HS},vBu:function(){return y.vB},QYZ:function(){return y.QY},t9d:function(){return y.t9},Kgy:function(){return xn.Kg},aJ2:function(){return xn.aJ},n14:function(){return ea.n1},DiB:function(){return ea.Di},l1O:function(){return re.l1},w5o:function(){return re.w5},p3Q:function(){return re.p3},G5e:function(){return re.G5},xj2:function(){return re.xj},rxY:function(){return re.rx},Ils:function(){return cr.Il},zCB:function(){return y.zC},a4r:function(){return va.a},wNf:function(){return jt.wN},Dmu:function(){return jt.Dm},Bsl:function(){return b.Bs},yKv:function(){return Js.y},fMB:function(){return jt.fM},gCg:function(){return ka.g},eT6:function(){return re.eT},q4O:function(){return re.q4},ymE:function(){return Pa.ym},uqQ:function(){return y.uq},K5K:function(){return y.K5}});var $={};e.r($),e.d($,{Action:function(){return y.aU},ActionBar:function(){return y.ol},ActionBarProvider:function(){return y.N0},ActionContext:function(){return y.fW},ActionContextProvider:function(){return y.EI},ActionDesigner:function(){return y.$L},AfterSuccess:function(){return y.$b},AntdSchemaComponentPlugin:function(){return ya},AntdSchemaComponentProvider:function(){return wr},AppendsTreeSelect:function(){return Ja},AssignedFieldValues:function(){return y.eY},AssociationField:function(){return Hr},AssociationFieldMode:function(){return Sr},AssociationFieldModeProvider:function(){return br},AssociationSelect:function(){return mi},AttachmentList:function(){return $r.fU},AutoComplete:function(){return Hl},BackButtonUsedInSubPage:function(){return _o.M},Block:function(){return _s},BlockItem:function(){return Na.j},ButtonEditor:function(){return y.C1},CardItem:function(){return Jl},Cascader:function(){return Xl},Checkbox:function(){return Xr},CollectionSelect:function(){return ns},ColorPicker:function(){return ls},ColorSelect:function(){return cs},Cron:function(){return vi},CronSet:function(){return ps},DataSourceCollectionCascader:function(){return rs},DataSourceSelect:function(){return os},DatePicker:function(){return qr.Mt},DatePickerProvider:function(){return qr.iN},Details:function(){return fs},DetailsDesigner:function(){return he},EditComponent:function(){return re.Fy},EditDefaultValue:function(){return re.Ni},EditDescription:function(){return re.q8},EditOperator:function(){return re.HG},EditPattern:function(){return re.QT},EditRequired:function(){return re.JE},EditSortField:function(){return dl},EditTitle:function(){return re.$w},EditTitleField:function(){return re.nB},EditTooltip:function(){return re.Oc},EditValidationRules:function(){return re.zd},Editable:function(){return ul},EllipsisWithTooltip:function(){return yr.BQ},ErrorFallback:function(){return Bn.H},Expand:function(){return pi},Filter:function(){return xn.wn},FilterAction:function(){return xn.Gz},FilterActionContext:function(){return xn.tJ},FilterContext:function(){return xn.fo},FilterDynamicComponent:function(){return xn.VT},FilterLogicContext:function(){return xn.Xs},FixedBlock:function(){return Zo},FixedBlockDesignerItem:function(){return Wo},FixedBlockWrapper:function(){return Oo},Form:function(){return ee},FormDialog:function(){return Qi.D},FormField:function(){return Vn},FormItem:function(){return re.xJ},FormV2:function(){return St},G2Plot:function(){return hi},G2PlotRenderer:function(){return fi},Grid:function(){return ea.rj},GridCard:function(){return $a},GridRowContext:function(){return ea.jg},HTMLEncode:function(){return yr.gs},IconPicker:function(){return Is},Input:function(){return yr.II},InputNumber:function(){return qi},InputReadPretty:function(){return yr.mX},InputRecordPicker:function(){return cr.zD},Json:function(){return yr.Ph},List:function(){return Va},Markdown:function(){return nl},MarkdownReadPretty:function(){return ol},Menu:function(){return ua},NanoIDInput:function(){return Du},Page:function(){return or},PagePopups:function(){return Qr.d9},PageTabs:function(){return mr},Pagination:function(){return Qs},Password:function(){return Xs},Percent:function(){return qs},PopupSettingsProvider:function(){return va.D},Preview:function(){return eu.M},QuickEdit:function(){return nu},Radio:function(){return Pi},ReadPretty:function(){return yr.iV},ReadPrettyRecordPicker:function(){return cr.OD},RecordPicker:function(){return cr.lb},RecordPickerContext:function(){return cr.b7},RecordPickerProvider:function(){return cr.sU},RefreshDataBlockRequest:function(){return y.x1},RemoteSelect:function(){return Vt},RemoveButton:function(){return y.xZ},RemoveConditionContext:function(){return xn.Iu},RequestSettings:function(){return y.Mk},RichText:function(){return ru},SecondConFirm:function(){return y.y0},Select:function(){return _t},SkipValidation:function(){return y.co},Space:function(){return au},StablePopover:function(){return kn.q},Table:function(){return Lr},TableBlockDesigner:function(){return fu},TableField:function(){return ml},TableSelectorDesigner:function(){return gu},TableV2:function(){return Zr},Tabs:function(){return Si},TabsContextProvider:function(){return ka.c},Templates:function(){return At},TestDesigner:function(){return Na.L},TimePicker:function(){return vl},TreeSelect:function(){return yu},UnixTimestamp:function(){return Eu},Upload:function(){return $r.gq},Uploader:function(){return $r.Qm},Variable:function(){return Pa._w},VariableScopeProvider:function(){return Pa.rj},WorkflowConfig:function(){return y.Fj},actionSettings:function(){return y.SL},actionSettingsItems:function(){return y.sB},allowAddNew:function(){return re.iT},defaultFieldNames:function(){return wt},fetchTemplateData:function(){return we},filterFormItemSettings:function(){return re.$9},findByUid:function(){return za},findKeysByUid:function(){return _a},findMenuItem:function(){return Ci},formDetailsSettings:function(){return Zn},formItemSettings:function(){return re.Of},formSettings:function(){return Xn},formV1Settings:function(){return q},genStyleHook:function(){return Ie.l6},getCurrentOptions:function(){return An},getDatePickerLabels:function(){return cr.C$},getLabelFormatValue:function(){return cr.cN},getStoredPopupContext:function(){return zr.XQ},isFileCollection:function(){return re.ZZ},isShowFilePicker:function(){return cr.el},isTabPage:function(){return Tr},navigateToTab:function(){return Cr},pageSettings:function(){return Nr},pageTabSettings:function(){return ma},readPrettyFormSettings:function(){return qn},removeNullCondition:function(){return xn.Wm},storePopupContext:function(){return zr.hK},useActionBarContext:function(){return y.DU},useActionContext:function(){return y.XC},useAssociationFieldModeContext:function(){return gr},useBackButton:function(){return _o.K},useCloseAction:function(){return y.p2},useColumnSchema:function(){return cl.z},useCurrentPopupContext:function(){return Qr.Zm},useDatePickerContext:function(){return qr.P1},useDownloadLogs:function(){return Bn.y},useEnsureOperatorsValid:function(){return re.Zd},useFieldMode:function(){return re.b},useFieldNames:function(){return cr.Xd},useFilterActionProps:function(){return xn.PL},useFilterFieldOptions:function(){return xn.V8},useFilterFieldProps:function(){return xn.tM},useFilterOptions:function(){return xn.xQ},useFixedBlock:function(){return Ro},useFixedSchema:function(){return Uo},useFormDataTemplates:function(){return tt},useGetAriaLabelOfAction:function(){return y.HS},useGetAriaLabelOfDrawer:function(){return y.vB},useGetAriaLabelOfModal:function(){return y.QY},useGetAriaLabelOfPopover:function(){return y.t9},useGetFilterFieldOptions:function(){return xn.Kg},useGetFilterOptions:function(){return xn.aJ},useGridContext:function(){return ea.n1},useGridRowContext:function(){return ea.Di},useIsAddNewForm:function(){return re.l1},useIsAssociationField:function(){return re.w5},useIsFieldReadPretty:function(){return re.p3},useIsFileField:function(){return re.G5},useIsFormReadPretty:function(){return re.xj},useIsSelectFieldMode:function(){return re.rx},useLabelUiSchema:function(){return cr.Il},useLinkageAction:function(){return y.zC},usePopupSettings:function(){return va.a},useStyles:function(){return Js.y},useTabsContext:function(){return ka.g},useTitleFieldOptions:function(){return re.eT},useValidateSchema:function(){return re.q4},useVariableScope:function(){return Pa.ym},useZIndexContext:function(){return y.uq},zIndexContext:function(){return y.K5}});var l=e(15009),z=e.n(l),d=e(99289),A=e.n(d),f=e(12444),K=e.n(f),o=e(72004),N=e.n(o),m=e(31996),M=e.n(m),h=e(26037),O=e.n(h),n=e(97857),r=e.n(n),c=e(67294),L=e(31601),D=e(14896),b=e(70993),R=e(89127),W=function(T){return A()(z()().mark(function te(){var ue,de;return z()().wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return Ee.prev=0,Ee.next=3,this.api.request(T);case 3:return de=Ee.sent,Ee.abrupt("return",de==null||(ue=de.data)===null||ue===void 0?void 0:ue.data);case 7:return Ee.prev=7,Ee.t0=Ee.catch(0),Ee.abrupt("return",[]);case 10:case"end":return Ee.stop()}},te,this,[[0,7]])}))},y=e(76157),I=e(13769),v=e.n(I),S=e(57134),P=e(86201),i=e(80844),w=e(28459),E=e(57953),C=e(12174),u=e(6145),a=e(26386),p=e(64016),j=e(15195),F=e(23461),t=e(85893),x=["form","children"],k=["form","children","disabled"],V=["request","effects","initialValue","useValues"],G=function(T){var te=T.form,ue=T.children,de=v()(T,x),Pe=(0,i.useField)(),Ee=(0,i.useFieldSchema)(),Ve=(0,jt.lI)(te.createVoidField(r()(r()({},Pe.props),{},{basePath:""})));return(0,t.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,t.jsx)(i.FormContext.Provider,{value:te,children:(0,t.jsx)(S.FormLayout,r()(r()({layout:"vertical"},de),{},{children:(0,t.jsx)(i.RecursionField,{basePath:Ve.address,schema:Ee,onlyRenderProperties:!0})}))})})},Q=function(T){return T.children},U=function(T){var te=T.form,ue=T.children,de=T.disabled,Pe=v()(T,k),Ee=(0,i.useField)(),Ve=(0,i.useFieldSchema)(),ke=(0,jt.lI)(te.createVoidField(r()(r()({},Ee.props),{},{basePath:""}))),Qe=(0,jt.Co)(Ve["x-component"],Q);return(0,c.useEffect)(function(){te.disabled=de||Ee.disabled},[de,Ee.disabled]),(0,t.jsx)(w.ZP,{componentDisabled:de,children:(0,t.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,t.jsx)(i.FormContext.Provider,{value:te,children:(0,t.jsx)(S.FormLayout,r()(r()({layout:"vertical"},Pe),{},{children:(0,t.jsx)(i.FieldContext.Provider,{value:ke,children:(0,t.jsx)(Qe,r()(r()({},Ee.componentProps),{},{children:(0,t.jsx)(i.RecursionField,{basePath:ke.address,schema:Ve,onlyRenderProperties:!0})}))})}))})})})},H=function(T){var te=T.request,ue=T.initialValue;return te||function(){return Promise.resolve({data:ue})}},Z=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,C.QT)(H(te),T)},ne=(0,c.createContext)(null);ne.displayName="FormBlockContext";var ee=(0,i.observer)(function(J){var T=J.request,te=J.effects,ue=J.initialValue,de=J.useValues,Pe=de===void 0?Z:de,Ee=v()(J,V),Ve=(0,i.useFieldSchema)(),ke=(0,i.useField)(),Qe=(0,c.useMemo)(function(){return(0,P.createForm)({effects:te})},[]),et=Pe({uid:Ve["x-uid"],onSuccess:function(rt){return A()(z()().mark(function ft(){return z()().wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.next=2,Qe.reset();case 2:Qe.setValues(rt==null?void 0:rt.data),Qe.setInitialValues(rt==null?void 0:rt.data);case 4:case"end":return gt.stop()}},ft)}))()}},J),qe=(0,c.useContext)(ne);return(0,t.jsx)(ne.Provider,{value:{parent:qe,form:Qe,result:et,field:ke,fieldSchema:Ve},children:(0,t.jsx)(E.Z,{spinning:(et==null?void 0:et.loading)||!1,children:Ve["x-decorator"]==="Form"?(0,t.jsx)(U,r()({form:Qe},Ee)):(0,t.jsx)(G,r()({form:Qe},Ee))})})},{displayName:"Form"});ee.Designer=function(){var T=(0,u.useCollection_deprecated)(),te=T.name,ue=T.title,de=(0,j.zy)(),Pe=(0,F.rE)(),Ee=Pe.componentNamePrefix;return(0,t.jsxs)(a.aN,{template:de,title:ue||te,children:[(0,t.jsx)(p.G,{componentName:"".concat(Ee,"Form"),collectionName:te}),(0,t.jsx)(a.Z5,{}),(0,t.jsx)(a.qx,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};var B=e(5537),q=new B.F5({name:"FormV1Settings",items:[{name:"template",Component:p.G,useComponentProps:function(){var T=(0,u.useCollection_deprecated)(),te=T.name,ue=(0,F.rE)(),de=ue.componentNamePrefix;return{componentName:"".concat(de,"Form"),collectionName:te}}},{name:"divider",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),re=e(54801),pe=function(){var T=(0,u.useCollection_deprecated)(),te=T.name,ue=T.title,de=(0,j.zy)();return(0,t.jsx)(a.aN,{schemaSettings:"FormSettings",template:de,title:ue||te})},le=function(){var T=(0,u.useCollection_deprecated)(),te=T.name,ue=T.title,de=(0,j.zy)();return(0,t.jsx)(a.aN,{schemaSettings:"ReadPrettyFormSettings",template:de,title:ue||te})},he=function(){var T=(0,u.useCollection_deprecated)(),te=T.name,ue=T.title,de=(0,j.zy)();return(0,t.jsx)(a.aN,{schemaSettings:"FormDetailsSettings",template:de,title:ue||te})},_e=function(){var T=(0,u.useCollection_deprecated)(),te=T.name,ue=T.title,de=(0,j.zy)();return(0,t.jsx)(a.aN,{schemaSettings:"blockSettings:filterForm",template:de,title:ue||te})},Fe=e(7340),ge=e(15503),Ae=e(68230),De=e(68400),me=e.n(De),se=e(97133),Ce=e(84327),oe=e(9361),fe=e(31019),xe=e(22229),be=e(43321),je=e(8281),Re=e(9780),Oe=e(18686),ae=e(94804),ie=e(5574),Y=e.n(ie),g=e(68433),ve=e(42075),ye=e(34041),ce=e(96486),Be=e.n(ce),Me=e(26793),Te=e(32268),Ie=e(60094),$e=e(9783),We=e.n($e),yt=e(52677),He=e.n(yt),st=e(50888),Ue=e(66309),Mt=e(96074),Yt=e(27484),pn=e.n(Yt),Zt=e(87714),jt=e(84577),an=e(4340),Ct=e(97937),Wt=e(32983),Lt=e(58812),qt=e(96695),Rt=e.n(qt),$t=e(19632),Tt=e.n($t),wt={label:"label",value:"value",color:"color",options:"children"};function en(J,T){var te=[];if(!Array.isArray(J))return te;for(var ue=0;ue<J.length;ue++){var de=J[ue][T.options];Array.isArray(de)&&te.push.apply(te,Tt()(en(de,T))),te.push(r()({},J[ue]))}return te}function An(J,T,te){var ue=en(T,te),de=(0,ce.castArray)(J).map(function(Ee){return(0,g.isPlainObject)(Ee)?Ee[te.value]:Ee});function Pe(Ee){if(!Ee)return[];var Ve=[],ke=Rt()(de),Qe;try{var et=function(){var bt=Qe.value,rt=Ee.find(function(ft){return ft[te.value]==bt})||{value:bt,label:bt&&bt.toString()};Ve.push(rt)};for(ke.s();!(Qe=ke.n()).done;)et()}catch(qe){ke.e(qe)}finally{ke.f()}return Ve}return Pe(ue)}var Wn=e(67668),Nn=(0,i.observer)(function(J){var T,te=r()(r()({},wt),J.fieldNames),ue=(0,i.useField)(),de=(0,Wn.Hy)(),Pe=ue.dataSource||J.options||(de==null?void 0:de.uiSchema.enum)||[],Ee=An(ue.value,Pe,te);return!(0,Ce.isValid)(J.value)&&!Ee.length?(0,t.jsx)("div",{}):(0,P.isArrayField)(ue)&&(ue==null||(T=ue.value)===null||T===void 0?void 0:T.length)===0?(0,t.jsx)("div",{}):(0,t.jsx)("div",{children:(0,t.jsx)(Lt.B,{ellipsis:J.ellipsis,children:Ee.map(function(Ve,ke){return(0,t.jsx)(Ue.Z,{color:Ve[te.color],icon:Ve.icon,children:Ve[te.label]},ke)})})})},{displayName:"ReadPretty"}),oo=["value","options","onChange","fieldNames","mode","loading","rawOptions","defaultValue"],Yn=["objectValue","loading","value","rawOptions","defaultValue"],$n=function(T){return!(0,Ce.isValid)(T)||He()(T)==="object"&&Object.keys(T).length===0},Gn=function(T){var te=T.value,ue=T.options,de=T.onChange,Pe=T.fieldNames,Ee=T.mode,Ve=T.loading,ke=T.rawOptions,Qe=T.defaultValue,et=v()(T,oo),qe=function(rt){var ft;if(!$n(rt)){var ht=(0,Ce.toArr)(rt).filter(function(It){return It}).map(function(It){return(0,g.isPlainObject)(It)?It[Pe.value]:It}),gt=(ft=An(ht,ue,Pe))===null||ft===void 0?void 0:ft.map(function(It){return{label:It[Pe.label],value:It[Pe.value]}});return["tags","multiple"].includes(Ee)||T.multiple?gt:gt.shift()}};return(0,t.jsx)(ye.default,r()({role:"button","data-testid":"select-object-".concat(Ee||"single"),value:qe(te),defaultValue:qe(Qe),allowClear:{clearIcon:(0,t.jsx)(an.Z,{role:"button","aria-label":"icon-close-select"})},labelInValue:!0,notFoundContent:Ve?(0,t.jsx)(E.Z,{}):(0,t.jsx)(Wt.Z,{image:Wt.Z.PRESENTED_IMAGE_SIMPLE}),options:ue,fieldNames:Pe,showSearch:!0,popupMatchSelectWidth:!1,filterOption:function(rt,ft){var ht;return((ht=ft==null?void 0:ft[Pe.label||"label"])!==null&&ht!==void 0?ht:"").includes(rt)},filterSort:function(rt,ft){var ht,gt;return((ht=rt==null?void 0:rt[Pe.label||"label"])!==null&&ht!==void 0?ht:"").toLowerCase().localeCompare(((gt=ft==null?void 0:ft[Pe.label||"label"])!==null&>!==void 0?gt:"").toLowerCase())},onChange:function(rt){var ft=An((0,Ce.toArr)(rt).map(function(ht){return ht.value}),ke||ue,Pe);["tags","multiple"].includes(Ee)||T.multiple?de==null||de(ft):de==null||de(ft.shift()||null)},mode:Ee,tagRender:function(rt){return(0,t.jsx)(Ue.Z,r()(r()({role:"button","aria-label":rt.label,closeIcon:(0,t.jsx)(Ct.Z,{role:"button","aria-label":"icon-close-tag"})},rt),{},{children:rt.label}))}},et))},hn=function(T,te){var ue;return((ue=te==null?void 0:te.label)!==null&&ue!==void 0?ue:"").toLowerCase().includes((T||"").toLowerCase())},Ft=(0,i.connect)(function(J){var T=J.objectValue,te=J.loading,ue=J.value,de=J.rawOptions,Pe=J.defaultValue,Ee=v()(J,Yn),Ve=J.multiple?"multiple":J.mode;if(Ve&&!["multiple","tags"].includes(Ve)&&(Ve=void 0),T)return(0,t.jsx)(Gn,r()(r()({rawOptions:de},Ee),{},{defaultValue:Pe,value:ue,mode:Ve,loading:te}));var ke=function(et){return["tags","multiple"].includes(J.mode)||J.multiple?et?(0,Ce.toArr)(et):void 0:et};return(0,t.jsx)(ye.default,r()(r()({role:"button","data-testid":"select-".concat(Ve||"single"),showSearch:!0,filterOption:hn,allowClear:{clearIcon:(0,t.jsx)(an.Z,{role:"button","aria-label":"icon-close-select"})},popupMatchSelectWidth:!1,notFoundContent:te?(0,t.jsx)(E.Z,{}):(0,t.jsx)(Wt.Z,{image:Wt.Z.PRESENTED_IMAGE_SIMPLE}),value:ke(ue),defaultValue:ke(Pe),tagRender:function(et){return(0,t.jsx)(Ue.Z,r()(r()({role:"button","aria-label":et.label,closeIcon:(0,t.jsx)(Ct.Z,{role:"button","aria-label":"icon-close-tag"})},et),{},{children:et.label}))}},Ee),{},{onChange:function(et){var qe;(qe=J.onChange)===null||qe===void 0||qe.call(J,et===void 0?null:et)},mode:Ve}))},(0,i.mapProps)({dataSource:"options"},function(J,T){return r()(r()({},J),{},{fieldNames:r()(r()({},wt),J.fieldNames),suffixIcon:T!=null&&T.loading||T!=null&&T.validating?(0,t.jsx)(st.Z,{}):J.suffixIcon})}),(0,i.mapReadPretty)(Nn)),_t=Ft;_t.ReadPretty=Nn;var Pt=_t,Nt=e(36586),kt=function(T,te){return(0,ce.castArray)(T).filter(function(ue){return ue!=null}).map(function(ue){return He()(ue)==="object"?ue[te.value]:ue})},Xt=(0,i.observer)(function(J){var T=r()(r()({},wt),J.fieldNames),te=(0,i.useField)(),ue=(0,i.useFieldSchema)(),de=(0,Nt.a)(),Pe=(0,y.XC)(),Ee=Pe.snapshot,Ve=(0,C.QT)(Ee?A()(z()().mark(function Qe(){return z()().wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return qe.abrupt("return",{data:de[ue.name]});case 1:case"end":return qe.stop()}},Qe)})):r()(r()({action:"list"},J.service),{},{params:{paginate:!1,filter:We()({},T.value,{$in:kt(te.value,T)})}}),{refreshDeps:[J.service,te.value]}),ke=Ve.data;return(0,t.jsx)(_t.ReadPretty,r()(r()({},J),{},{options:ke==null?void 0:ke.data}))},{displayName:"ReadPretty"}),zt=e(8341),yn=e(44990),dn=["fieldNames","service","wait","value","defaultValue","objectValue","manual","mapOptions","targetField","CustomDropdownRender","optionFilter","dataSource"],nn="N/A",bn=(0,i.connect)(function(J){var T,te,ue=J.fieldNames,de=ue===void 0?{}:ue,Pe=J.service,Ee=Pe===void 0?{}:Pe,Ve=J.wait,ke=Ve===void 0?300:Ve,Qe=J.value,et=J.defaultValue,qe=J.objectValue,bt=J.manual,rt=bt===void 0?!0:bt,ft=J.mapOptions,ht=J.targetField,gt=J.CustomDropdownRender,It=J.optionFilter,Kt=J.dataSource,mn=v()(J,dn),Qt=(0,yn.FC)(),zn=(0,zt.FE)(Kt||Qt),jn=(0,c.useState)(!1),tn=Y()(jn,2),fn=tn[0],Ln=tn[1],In=(0,c.useRef)(!1),Dn=(0,i.useFieldSchema)(),Mn=((T=Dn["x-component-props"])===null||T===void 0?void 0:T.addMode)==="quickAdd",On=(0,u.useCollection_deprecated)(),En=On.getField,Co=(0,c.useRef)(null),Po=(0,u.useCollectionManager_deprecated)(),yo=Po.getCollectionJoinField,ro=Po.getInterface,so=Dn["x-collection-field"]||Dn.name,Un=En(so)||yo(so),Rn=ht||(Un==null?void 0:Un.target)&&(de==null?void 0:de.label)&&yo("".concat(Un.target,".").concat(de.label)),Qn=(0,c.useMemo)(function(){if(Rn!=null&&Rn.interface){var nr,Ho=ro(Rn.interface),fr=(Ho==null||(nr=Ho.filterable)===null||nr===void 0?void 0:nr.operators[0].value)||"$includes";return Rn.type==="string"?"$includes":fr}return"$includes"},[Rn]),vo=(0,jt.eJ)(),wn=(0,c.useCallback)(function(nr){try{return nr.filter(function(Ho){return["number","string"].includes(He()(Ho[de.value]))}).map(function(Ho){var fr,Pr,rr=vo(Ho[de.label]);if(Rn!=null&&(fr=Rn.uiSchema)!==null&&fr!==void 0&&fr.enum)if(Array.isArray(rr))rr=rr.map(function(Dr,Jr){var Kr=Rn.uiSchema.enum.find(function(wa){return wa.value===Dr});return Kr?(0,t.jsx)(Ue.Z,{role:"button",color:Kr.color,style:{marginRight:3},children:(Kr==null?void 0:Kr.label)||Dr},Jr):(0,t.jsx)(Ue.Z,{role:"button",children:Dr},Dr)}).reverse();else{var vr=Rn.uiSchema.enum.find(function(Dr){return Dr.value===rr});vr&&(rr=(0,t.jsx)(Ue.Z,{role:"button",color:vr.color,children:vr.label}))}if((Rn==null?void 0:Rn.type)==="date"&&(rr=pn()(rr).format("YYYY-MM-DD")),ft){var Ur;return ft((Ur={},We()(Ur,de.label,rr||nn),We()(Ur,de.value,Ho[de.value]),Ur))}return r()(r()({},Ho),{},(Pr={},We()(Pr,de.label,rr||nn),We()(Pr,de.value,Ho[de.value]),Pr))}).filter(Boolean)}catch(Ho){return console.error(Ho),nr}},[Rn==null?void 0:Rn.uiSchema,de]),no=(0,C.QT)(r()(r()({action:"list"},Ee),{},{headers:zn,params:r()(r()({pageSize:200},Ee==null?void 0:Ee.params),{},{filter:Ee==null||(te=Ee.params)===null||te===void 0?void 0:te.filter})}),{manual:rt,debounceWait:ke}),co=no.data,po=no.run,Io=no.loading,No=(0,c.useMemo)(function(){return JSON.stringify({service:Ee,fieldNames:de})},[Ee,de]),Mo=(0,c.useCallback)(function(){return Co.current&>?(0,t.jsx)(gt,{search:Co.current,callBack:function(){Co.current=null,Ln(!1)}}):null},[Co.current]);(0,c.useEffect)(function(){In.current&&po()},[No]);var $o=function(){var nr=A()(z()().mark(function Ho(fr){var Pr;return z()().wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:po({filter:(0,Zt.EO)([fr?We()({},de.label,We()({},Qn,fr)):{},Ee==null||(Pr=Ee.params)===null||Pr===void 0?void 0:Pr.filter])}),Co.current=fr;case 2:case"end":return vr.stop()}},Ho)}));return function(fr){return nr.apply(this,arguments)}}(),pr=(0,c.useMemo)(function(){var nr,Ho=Qe||et;if(!(co!=null&&(nr=co.data)!==null&&nr!==void 0&&nr.length))return Ho!=null?Array.isArray(Ho)?Ho:[Ho]:[];var fr=Ho!=null&&(Array.isArray(Ho)?Ho:[r()(r()({},Ho),{},We()({},de.value,Ho[de.value]||Ho))])||[],Pr=typeof It=="function"?co.data.filter(It):co.data;return(0,ce.uniqBy)(Pr.concat(fr!=null?fr:[]),de.value)},[Qe,et,co==null?void 0:co.data,de.value,It]),sr=function(Ho){Ln(Ho),Co.current=null,Ho&&po(),In.current=!0};return(0,t.jsx)(_t,r()(r()({open:fn,popupMatchSelectWidth:!1,autoClearSearchValue:!0,filterOption:!1,filterSort:null,fieldNames:de,onSearch:$o,onDropdownVisibleChange:sr,objectValue:qe,value:Qe,defaultValue:et},mn),{},{loading:co?Io:!0,options:wn(pr),rawOptions:pr,dropdownRender:function(Ho){var fr=pr.some(function(Pr){return Pr[de.label]===Co.current});return(0,t.jsx)(t.Fragment,{children:Mn?(0,t.jsxs)(t.Fragment,{children:[!((co==null?void 0:co.data.length)===0&&Co!==null&&Co!==void 0&&Co.current)&&Ho,(co==null?void 0:co.data.length)>0&&(Co==null?void 0:Co.current)&&!fr&&(0,t.jsx)(Mt.Z,{style:{margin:0}}),!fr&&(0,t.jsx)(Mo,{})]}):Ho})}}))},(0,i.mapProps)({dataSource:"options"},function(J,T){var te,ue=(0,i.useFieldSchema)();return r()(r()({},J),{},{fieldNames:r()(r()(r()(r()({},wt),J.fieldNames),T.componentProps.fieldNames),(te=ue["x-component-props"])===null||te===void 0?void 0:te.fieldNames),suffixIcon:T!=null&&T.loading||T!=null&&T.validating?(0,t.jsx)(st.Z,{}):J.suffixIcon})}),(0,i.mapReadPretty)(Xt)),Vt=bn;Vt.ReadPretty=Xt;var dt=null,tt=function(){var T=(0,i.useFieldSchema)(),te=(0,Me.$)(),ue=te.t,de=(0,Fe.bz)(),Pe=de.duplicateData,Ee=(0,u.useCollectionManager_deprecated)(),Ve=Ee.getCollectionJoinField;if(Pe)return Pe;var ke=Bt(T),Qe=ke.items,et=Qe===void 0?[]:Qe,qe=ke.display,bt=qe===void 0?!0:qe;et.forEach(function(ht){try{var gt;ht.fields=(gt=ht.fields)===null||gt===void 0?void 0:gt.map(function(It){var Kt=Ve("".concat(ht.collection,".").concat(It));return Kt?It:""}).filter(Boolean)}catch(It){(0,g.error)(It),ht.fields=[]}});var rt=[{key:"none",title:ue("None")}].concat(et.map(function(ht,gt){return r()(r()({key:gt},ht),{},{isLeaf:ht.dataId!==null&&ht.dataId!==void 0,titleCollectionField:(ht==null?void 0:ht.titleField)&&Ve("".concat(ht.collection,".").concat(ht.titleField))})})),ft=et.find(function(ht){return ht.default});return{templates:rt,display:bt,defaultTemplate:ft,enabled:et.length>0&&et.every(function(ht){return ht.dataId||ht.dataScope})}},At=function(T){var te=T.style,ue=te===void 0?{}:te,de=T.form,Pe=(0,Ie.dQ)(),Ee=Pe.token,Ve=tt(),ke=Ve.templates,Qe=Ve.display,et=Ve.enabled,qe=Ve.defaultTemplate,bt=(0,u.useCollectionManager_deprecated)(),rt=bt.getCollectionJoinField,ft=(0,Te.ss)(ke),ht=(0,c.useState)((qe==null?void 0:qe.key)||"none"),gt=Y()(ht,2),It=gt[0],Kt=gt[1],mn=(0,c.useState)(null),Qt=Y()(mn,2),zn=Qt[0],jn=Qt[1],tn=(0,C.LY)(),fn=(0,Me.$)(),Ln=fn.t;(0,c.useEffect)(function(){et&&qe&&de&&(de.__template=!0,qe.key==="duplicate"&&On(qe.dataId,qe))},[]),(0,c.useEffect)(function(){ft!=null&&ft.some(function(Co){return Co.key===It})||Mn("none")},[ft]);var In=(0,c.useMemo)(function(){return r()({display:"flex",alignItems:"center",backgroundColor:Ee.colorFillAlter,padding:Ee.padding},ue)},[ue,Ee.colorFillAlter]),Dn=(0,c.useMemo)(function(){return{fontSize:Ee.fontSize,fontWeight:"bold",whiteSpace:"nowrap",marginRight:Ee.marginXS}},[Ee.fontSize,Ee.marginXS]),Mn=(0,c.useCallback)(function(){var Co=A()(z()().mark(function Po(yo){return z()().wrap(function(so){for(;;)switch(so.prev=so.next){case 0:Kt(yo),jn(null),de==null||de.reset();case 3:case"end":return so.stop()}},Po)}));return function(Po){return Co.apply(this,arguments)}}(),[]),On=(0,c.useCallback)(function(){var Co=A()(z()().mark(function Po(yo,ro){var so;return z()().wrap(function(Rn){for(;;)switch(Rn.prev=Rn.next){case 0:so=r()(r()({},ro),{},{dataId:yo}),jn(ro),we(tn,so,Ln).then(function(Qn){return de&&Qn&&(de.reset(),de.__template=!0,(0,g.forEach)(Qn,function(vo,wn){if(vo){var no;de.values[wn]=vo,de==null||(no=de.setInitialValuesIn)===null||no===void 0||no.call(de,wn,vo)}})),Qn}).catch(function(Qn){console.error(Qn)});case 3:case"end":return Rn.stop()}},Po)}));return function(Po,yo){return Co.apply(this,arguments)}}(),[]);if(!et||!Qe)return null;var En=ft==null?void 0:ft.find(function(Co){return Co.key===It});return(0,t.jsx)("div",{style:In,children:(0,t.jsxs)(ve.Z,{wrap:!0,children:[(0,t.jsxs)("label",{style:Dn,children:[Ln("Data template"),": "]}),(0,t.jsx)(ye.default,{role:"button","data-testid":"select-form-data-template",popupMatchSelectWidth:!1,options:ft,fieldNames:{label:"title",value:"key"},value:It,onChange:Mn}),It!=="none"&&En&&(0,t.jsx)(Vt,{style:{width:220},fieldNames:{label:En==null?void 0:En.titleField,value:"id"},target:En==null?void 0:En.collection,value:zn,objectValue:!0,service:{resource:En==null?void 0:En.collection,params:{filter:En==null?void 0:En.dataScope}},onChange:function(Po){return On(Po==null?void 0:Po.id,r()(r()({},Po),En))},targetField:rt("".concat(En==null?void 0:En.collection,".").concat(En.titleField))})]})})};function Bt(J){var T=(0,Fe.Fi)(J);return T?Be().cloneDeep(T["x-data-templates"])||{}:{}}function we(J,T,te){return Se.apply(this,arguments)}function Se(){return Se=A()(z()().mark(function J(T,te,ue){return z()().wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if(!(te.fields.length===0||!te.dataId)){Pe.next=2;break}return Pe.abrupt("return");case 2:return Pe.abrupt("return",T.resource(te.collection).get({filterByTk:te.dataId,fields:te.fields,isTemplate:!0}).then(function(Ee){var Ve;return(Ve=Ee.data)===null||Ve===void 0?void 0:Ve.data}));case 3:case"end":return Pe.stop()}},J)})),Se.apply(this,arguments)}var Le=e(3192),Ze=function(){var T,te,ue=(0,Oe.aZ)(),de=(0,i.useFieldSchema)(),Pe=oe.Z.useToken(),Ee=Pe.token,Ve=(0,jt.ng)(),ke=Ve.designable,Qe=(0,Le.g)()||{},et=Qe.heightProps,qe=et||{},bt=qe.title,rt=tt(),ft=rt.display,ht=rt.enabled,gt=de.reduceProperties(function(On,En){return En["x-component"]==="ActionBar"?En:On}),It=Object.keys((gt==null?void 0:gt.properties)||{}).length>0,Kt=de==null||(T=de.parent)===null||T===void 0||(T=T["x-decorator"])===null||T===void 0||(te=T.includes)===null||te===void 0?void 0:te.call(T,"FormBlockProvider"),mn=It||ke?Ee.controlHeight+(Kt?1:2)*Ee.marginLG:Ee.marginLG,Qt=bt?Ee.fontSizeLG*Ee.lineHeightLG+Ee.padding*2-1:0,zn=(0,ae.hS)()||{},jn=zn.data,tn=(jn==null?void 0:jn.meta)||{},fn=tn.count,Ln=tn.pageSize,In=fn>Ln,Dn=In?Ee.controlHeightSM+1*Ee.paddingLG:0,Mn=ft&&ht?Ee.controlHeight+2*Ee.padding+Ee.margin:0;return ue-mn-Ee.paddingLG-Qt-Dn-Mn},Xe,it,ut=["form","children"],xt=["form","children","disabled"],mt=["form","disabled"],ot=function(T){var te=T.form,ue=T.children,de=v()(T,ut),Pe=(0,i.useField)(),Ee=(0,i.useFieldSchema)(),Ve=(0,jt.lI)(te.createVoidField(r()(r()({},Pe.props),{},{basePath:""}))),ke=Ze(),Qe=oe.Z.useToken(),et=Qe.token,qe=(0,jt.ng)(),bt=qe.designable;return(0,t.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,t.jsx)(i.FormContext.Provider,{value:te,children:(0,t.jsx)(S.FormLayout,r()(r()({layout:"vertical"},de),{},{children:(0,t.jsx)("div",{className:(0,se.css)(Xe||(Xe=me()([`
|
|
689
689
|
.nb-grid-container {
|
|
690
690
|
height: `,`;
|
|
691
691
|
overflow-y: auto;
|