@nocobase/app 1.3.51 → 1.3.52
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)(Y.BQs,{ellipsis:!0,popoverContent:$n,children:$n})};var Yt=(0,l.createContext)([]);Yt.displayName="VariableScopeContext";function pn(Ct){var Kt=Ct.scope,Lt=Kt===void 0?[]:Kt,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,N.connect)(Ce),jt.TextArea=(0,N.connect)(st,(0,N.mapReadPretty)(st.ReadPretty)),jt.RawTextArea=(0,N.connect)(ye),jt.JSON=(0,N.connect)(Be);var an=null},88969:function(ze,te,e){"use strict";e.d(te,{m:function(){return O}});var N=e(15009),l=e.n(N),$=e(19632),d=e.n($),M=e(99289),f=e.n(M),L=e(5574),o=e.n(L),W=e(97133),v=e(38089),D=e(67294),h=e(26793),I=e(60094),t=e(9783),r=e.n(t),u=(0,I.l6)("nb-variable-select",function(K){var P=K.componentCls;return r()({},P,{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}}})}),B=u,y=e(2876),g=e(85893);function O(K){var P=K.options,A=K.setOptions,p=K.onInsert,S=K.changeOnSelect,b=S===void 0?!1:S,i=K.fieldNames,w=i===void 0?{}:i,E=K.className,x=(0,h.$)(),c=x.t,a=(0,D.useState)([]),m=o()(a,2),R=m[0],T=m[1],n=B(),C=n.wrapSSR,z=n.componentCls,V=n.hashId,G=(0,I.dQ)(),X=G.token;function U(Z){return H.apply(this,arguments)}function H(){return H=f()(l()().mark(function Z(re){var ne,J;return l()().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(J=re[re.length-1],!(!((ne=J.children)!==null&&ne!==void 0&&ne.length)&&!J.isLeaf&&J.loadChildren)){q.next=5;break}return q.next=4,J.loadChildren(J);case 4:A(function(Se){return d()(Se)});case 5:case"end":return q.stop()}},Z)})),H.apply(this,arguments)}return C((0,g.jsx)(y.R,{className:(0,W.cx)("x-button",z,V,E),children:(0,g.jsx)(v.Z,{placeholder:c("Select a variable"),value:[],options:P,fieldNames:w,loadData:U,onChange:function(){var re,ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(T(ne),!!ne.length){var k=J[J.length-1];(!(k!=null&&(re=k.children)!==null&&re!==void 0&&re.length)&&!(k!=null&&k.loadChildren)||k!=null&&k.isLeaf)&&p(ne)}},changeOnSelect:b,onClick:function(re){if(!(re.detail!==2||!b))for(var ne=re.target;ne&&ne!==re.currentTarget;ne=ne.parentNode){var J;Array.from((J=ne.classList)!==null&&J!==void 0?J:[]).includes("ant-cascader-menu-item")&&p(R)}},popupClassName:"Cascader-popupClassName",dropdownRender:b?function(Z){return(0,g.jsxs)(g.Fragment,{children:[Z,(0,g.jsx)("div",{style:{padding:"0.5em",borderTop:"1px solid ".concat(X.colorBorder),color:X.colorTextDescription},children:c("Double click to choose entire object")})]})}:null})}))}},2876:function(ze,te,e){"use strict";e.d(te,{R:function(){return f}});var N=e(97857),l=e.n(N),$=e(15867),d=e(67294),M=e(85893),f=(0,d.forwardRef)(function(L,o){var W=(0,d.useMemo)(function(){return{fontStyle:"italic",fontFamily:"New York, Times New Roman, Times, serif"}},[]);return(0,M.jsxs)($.ZP,l()(l()({"aria-label":"variable-button",ref:o,style:W},L),{},{children:["x",L.children]}))});f.displayName="XButton"},72724:function(ze,te,e){"use strict";e.d(te,{L:function(){return I}});var N=e(97857),l=e.n(N),$=e(5574),d=e.n($),M=e(94697),f=e(80844),L=e(67294),o=e(26793),W=e(21143),v=e(84577),D=e(85893),h=function(r){var u=(0,v.ng)(),B=u.refresh,y=(0,W.useAPIClient)(),g=(0,o.$)(),O=g.t;return(0,L.useCallback)(function(K){var P,A,p,S,b,i,w,E,x=K.active,c=K.over,a=x==null||(P=x.data)===null||P===void 0||(P=P.current)===null||P===void 0?void 0:P.schema,m=c==null||(A=c.data)===null||A===void 0||(A=A.current)===null||A===void 0?void 0:A.schema,R=c==null||(p=c.data)===null||p===void 0||(p=p.current)===null||p===void 0?void 0:p.insertAdjacent,T=c==null||(S=c.data)===null||S===void 0||(S=S.current)===null||S===void 0?void 0:S.breakRemoveOn,n=c==null||(b=c.data)===null||b===void 0||(b=b.current)===null||b===void 0?void 0:b.wrapSchema,C=c==null||(i=c.data)===null||i===void 0||(i=i.current)===null||i===void 0?void 0:i.onSuccess,z=(w=c==null||(E=c.data)===null||E===void 0||(E=E.current)===null||E===void 0?void 0:E.removeParentsIfNoChildren)!==null&&w!==void 0?w:!0;if(!a||!m){r==null||r(K);return}if(a===m){r==null||r(K);return}if(a.parent===m&&R==="beforeEnd"){r==null||r(K);return}var V=(0,v.Pl)({t:O,api:y,refresh:B,current:m});if(V.loadAPIClientEvents(),a.parent===m.parent){V.insertBeforeBeginOrAfterEnd(a),r==null||r(K);return}if(R){V.insertAdjacent(R,a,{wrap:n,breakRemoveOn:T,removeParentsIfNoChildren:z,onSuccess:C}),r==null||r(K);return}},[r])},I=(0,f.observer)(function(t){var r=(0,o.$)(),u=r.t,B=(0,L.useState)(!0),y=d()(B,2),g=y[0],O=y[1],K=(0,L.useCallback)(function(A){var p,S=A.active,b=S==null||(p=S.data)===null||p===void 0||(p=p.current)===null||p===void 0?void 0:p.schema;if(O(!!b),t!=null&&t.onDragStart){var i;t==null||(i=t.onDragStart)===null||i===void 0||i.call(t,A)}},[t==null?void 0:t.onDragStart]),P=h(t==null?void 0:t.onDragEnd);return(0,D.jsxs)(M.DndContext,l()(l()({collisionDetection:M.rectIntersection},t),{},{onDragStart:K,onDragEnd:P,children:[(0,D.jsx)(M.DragOverlay,{dropAnimation:{duration:10,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:g&&(0,D.jsx)("span",{style:{whiteSpace:"nowrap"},children:u("Dragging")})}),t.children]}))},{displayName:"DndContext"})},14896:function(ze,te,e){"use strict";e.r(te),e.d(te,{DndContext:function(){return N.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 L.I9}});var N=e(72724),l=e(20493),$=e(67294),d=e(80844),M=e(85893),f=(0,d.observer)(function(o){var W=o.children,v=(0,d.useForm)();return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("pre",{style:{marginBottom:20},"data-testid":"form-data",children:JSON.stringify(v.values,null,2)}),W]})}),L=e(34588)},20493:function(ze,te,e){"use strict";e.d(te,{IW:function(){return K},LC:function(){return t},bt:function(){return B},Fo:function(){return r},TR:function(){return O},OR:function(){return u}});var N=e(97857),l=e.n(N),$=e(13769),d=e.n($),M=e(10274),f=e(94697),L=e(97133),o=e(80844),W=e(67294),v=e(60094),D=e(85893),h=["component","overStyle","style","children","openMode"],I=["schema","id","eid","removeParentsIfNoChildren"],t=(0,W.createContext)(null);t.displayName="DraggableContext";var r=(0,W.createContext)(null);r.displayName="SortableContext";var u=function(A){var p=A.id,S=A.data,b=A.children,i=(0,f.useDraggable)({id:p,data:S}),w=(0,f.useDroppable)({id:p,data:S});return(0,D.jsx)(r.Provider,{value:{draggable:i,droppable:w},children:b})},B=function(A){var p,S,b=A.component,i=A.overStyle,w=A.style,E=A.children,x=A.openMode,c=d()(A,h),a=(0,v.dQ)(),m=a.token,R=(0,W.useContext)(r),T=R.draggable,n=R.droppable,C=n.isOver,z=n.setNodeRef,V=l()({},w);return C&&(T==null||(p=T.active)===null||p===void 0?void 0:p.id)!==(n==null||(S=n.over)===null||S===void 0?void 0:S.id)&&(V[b==="a"?"color":"background"]=new M.C(m.colorSettings).setAlpha(.15).toHex8String(),Object.assign(V,i)),W.createElement(b||"div",l()(l()({role:"none"},c),{},{className:(0,L.cx)("nb-sortable-designer",A.className),ref:z,style:V}),E)},y=function(A){var p=g(A),S=(0,o.useFieldSchema)();return A.schema?l()(l()({},A),{},{id:p}):l()(l()({},A),{},{id:p,schema:S})},g=function(A){var p=(0,o.useField)();return A.id?A.id:p.address.toString()},O=(0,o.observer)(function(P){var A=y(P),p=A.schema,S=A.id,b=A.eid,i=A.removeParentsIfNoChildren,w=d()(A,I),E=(0,W.useMemo)(function(){return{insertAdjacent:"afterEnd",schema:p,removeParentsIfNoChildren:i!=null?i:!0}},[p,i]);return(0,D.jsx)(u,{id:S,data:E,children:(0,D.jsx)(B,l()(l()({id:b},w),{},{children:P.children}))})},{displayName:"SortableItem"}),K=function(A){var p=(0,W.useContext)(r),S=p.draggable,b=S.attributes,i=S.listeners,w=S.setNodeRef;return(0,D.jsx)("div",{style:{display:"inline-block",width:14,height:14,lineHeight:"14px",textAlign:"left"},children:(0,D.jsx)("div",l()(l()(l()({ref:w,style:{position:"relative",zIndex:1,lineHeight:0,fontSize:0,display:"inline-block"}},i),b),{},{role:"none",children:(0,D.jsx)("span",{style:{cursor:"move",fontSize:14},children:A.children})}))})}},34588:function(ze,te,e){"use strict";e.d(te,{jC:function(){return i},od:function(){return p},I9:function(){return x},Rq:function(){return S},e7:function(){return A}});var N=e(97857),l=e.n(N),$=e(15009),d=e.n($),M=e(9783),f=e.n(M),L=e(5574),o=e.n(L),W=e(99289),v=e.n(W),D=e(52677),h=e.n(D),I=e(96750),t=e.n(I),r=e(96486),u=e.n(r),B=e(10097),y=e(76690),g=e(65565),O=e(27484),K=e.n(O);function P(){"use strict";Array.isArray||(Array.isArray=function(n){return Object.prototype.toString.call(n)==="[object Array]"});function a(n){for(var C=[],z=0,V=n.length;z<V;z++)C.indexOf(n[z])===-1&&C.push(n[z]);return C}function m(n,C){return JSON.stringify(n)===JSON.stringify(C)}var R={},T={$is:function(C,z){return C===z},$match:function(C,z){return Array.isArray(C)&&Array.isArray(z)&&C.some(function(V){return Array.isArray(V)})?C.some(function(V){return(V==null?void 0:V.length)===z.length&&(V==null?void 0:V.every(function(G,X){return G===z[X]}))}):JSON.stringify(C)===JSON.stringify(z)},$eq:function(C,z){return Array.isArray(C)&&Array.isArray(z)?m(C,z):Array.isArray(C)?C.includes(z):C==z},$ne:function(C,z){return C!=z},"!==":function(C,z){return C!==z},$gt:function(C,z){return Array.isArray(C)?C.some(function(V){return V>z}):C>z},$gte:function(C,z){return C>=z},$lt:function(C,z,V){return Array.isArray(C)?C.some(function(G){return G<z}):V===void 0?C<z:C<z&&z<V},$lte:function(C,z,V){return V===void 0?C<=z:C<=z&&z<=V},$exists:function(C){return R.truthy(C)},$notEmpty:function(C){return R.truthy(C)},$empty:function(C){return Array.isArray(C)?C.some(function(z){return!R.truthy(z)}):!R.truthy(C)},$notExists:function(C){return!R.truthy(C)},"%":function(C,z){return C%z},log:function(C){return console.log(C),C},$in:function(C,z){return!z||typeof z.indexOf=="undefined"?!1:Array.isArray(C)&&Array.isArray(z)?z.some(function(V){return C.includes(V)}):z.indexOf(C)!==-1},$notIn:function(C,z){return!z||typeof z.indexOf=="undefined"?!1:z.indexOf(C)===-1},$includes:function(C,z){return!C||typeof C.indexOf=="undefined"?!1:Array.isArray(C)?C.some(function(V){return V==null?void 0:V.includes(z)}):C.indexOf(z)!==-1},$notIncludes:function(C,z){return Array.isArray(C)?!C.some(function(V){return(V||"").includes(z)}):(C=C||"",!C.includes(z))},$anyOf:function(C,z){return C.length===0?!1:Array.isArray(C)&&Array.isArray(z)&&C.some(function(V){return Array.isArray(V)})?C.some(function(V){return V.some(function(G){return z.includes(G)})}):C.some(function(V){return z.includes(V)})},$noneOf:function(C,z){return!C||(C==null?void 0:C.length)===0?!0:Array.isArray(C)&&Array.isArray(z)&&C.some(function(V){return Array.isArray(V)})?C.some(function(V){return V.every(function(G){return!z.some(function(X){return G.includes(X)})})}):z.some(function(V){return!C.includes(V)})},$notMatch:function(C,z){if(C.length!==z.length)return!0;for(var V=0;V<C.length;V++)if(C[V]!==z[V])return!0;return!1},$dateOn:function(C,z){return!C||!z?!1:(Array.isArray(C)||(C=[C,C]),Array.isArray(z)||(z=[z,z]),C=C.map(function(V){return K()(V)}),z=z.map(function(V){return K()(V)}),C[0].isBetween(z[0],z[1],null,"[]")&&C[1].isBetween(z[0],z[1],null,"[]"))},$dateBefore:function(C,z){return!C||!z?!1:(Array.isArray(C)||(C=[C,C]),Array.isArray(z)||(z=[z,z]),C=C.map(function(V){return K()(V)}),z=z.map(function(V){return K()(V)}),C[0].isBefore(z[0])&&C[1].isBefore(z[0]))},$dateNotBefore:function(C,z){return!T.$dateBefore(C,z)},$dateAfter:function(C,z){return!C||!z?!1:(Array.isArray(C)||(C=[C,C]),Array.isArray(z)||(z=[z,z]),C=C.map(function(V){return K()(V)}),z=z.map(function(V){return K()(V)}),C[0].isAfter(z[1])&&C[1].isAfter(z[1]))},$dateNotAfter:function(C,z){return!T.$dateAfter(C,z)},$dateBetween:function(C,z){return T.$dateOn(C,z)},$dateNotOn:function(C,z){return!T.$dateOn(C,z)},$isTruly:function(C){return Array.isArray(C)?C.some(function(z){return z===!0||z===1}):C===!0||C===1},$isFalsy:function(C){return Array.isArray(C)?C.some(function(z){return!R.truthy(z)}):!R.truthy(C)},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(C,z,V){if(V<0){var G=String(C).substr(z);return G.substr(0,G.length+V)}return String(C).substr(z,V)},"+":function(){return Array.prototype.reduce.call(arguments,function(C,z){return parseFloat(C,10)+parseFloat(z,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(C,z){return parseFloat(C,10)*parseFloat(z,10)})},"-":function(C,z){return z===void 0?-C:C-z},"/":function(C,z){return C/z},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(C,z){return C.concat(z)},[])},var:function(C,z){var V=z===void 0?null:z,G=this;if(typeof C=="undefined"||C===""||C===null)return G;for(var X=String(C).split("."),U=0;U<X.length;U++)if(G==null||(G=G[X[U]],G===void 0))return V;return G},missing:function(){for(var C=[],z=Array.isArray(arguments[0])?arguments[0]:arguments,V=0;V<z.length;V++){var G=z[V],X=R.apply({var:G},this);(X===null||X==="")&&C.push(G)}return C},missing_some:function(C,z){var V=R.apply({missing:z},this);return z.length-V.length>=C?[]:V}};return R.is_logic=function(n){return h()(n)==="object"&&n!==null&&!Array.isArray(n)&&Object.keys(n).length===1},R.truthy=function(n){return Array.isArray(n)&&n.length===0?!1:!!n},R.get_operator=function(n){return Object.keys(n)[0]},R.get_values=function(n){return n[R.get_operator(n)]},R.apply=function(n,C){if(Array.isArray(n))return n.map(function(J){return R.apply(J,C)});if(!R.is_logic(n))return n;var z=R.get_operator(n),V=n[z],G,X,U,H,Z;if(Array.isArray(V)||(V=[V]),z==="if"||z=="?:"){for(G=0;G<V.length-1;G+=2)if(R.truthy(R.apply(V[G],C)))return R.apply(V[G+1],C);return V.length===G+1?R.apply(V[G],C):null}else if(z==="$and"){for(G=0;G<V.length;G+=1)if(X=R.apply(V[G],C),!R.truthy(X))return X;return X}else if(z==="or"){for(G=0;G<V.length;G+=1)if(X=R.apply(V[G],C),R.truthy(X))return X;return X}else{if(z==="filter")return H=R.apply(V[0],C),U=V[1],Array.isArray(H)?H.filter(function(J){return R.truthy(R.apply(U,J))}):[];if(z==="map")return H=R.apply(V[0],C),U=V[1],Array.isArray(H)?H.map(function(J){return R.apply(U,J)}):[];if(z==="reduce")return H=R.apply(V[0],C),U=V[1],Z=typeof V[2]!="undefined"?V[2]:null,Array.isArray(H)?H.reduce(function(J,k){return R.apply(U,{current:k,accumulator:J})},Z):Z;if(z==="all"){if(H=R.apply(V[0],C),U=V[1],!Array.isArray(H)||!H.length)return!1;for(G=0;G<H.length;G+=1)if(!R.truthy(R.apply(U,H[G])))return!1;return!0}else if(z==="none"){if(H=R.apply(V[0],C),U=V[1],!Array.isArray(H)||!H.length)return!0;for(G=0;G<H.length;G+=1)if(R.truthy(R.apply(U,H[G])))return!1;return!0}else if(z==="some"){if(H=R.apply(V[0],C),U=V[1],!Array.isArray(H)||!H.length)return!1;for(G=0;G<H.length;G+=1)if(R.truthy(R.apply(U,H[G])))return!0;return!1}}if(V=V.map(function(J){return R.apply(J,C)}),T.hasOwnProperty(z)&&typeof T[z]=="function")return T[z].apply(C,V);if(z.indexOf(".")>0){var re=String(z).split("."),ne=T;for(G=0;G<re.length;G++){if(!ne.hasOwnProperty(re[G]))throw new Error("Unrecognized operation "+z+" (failed at "+re.slice(0,G+1).join(".")+")");ne=ne[re[G]]}return ne.apply(C,V)}throw new Error("Unrecognized operation "+z)},R.uses_data=function(n){var C=[];if(R.is_logic(n)){var z=R.get_operator(n),V=n[z];Array.isArray(V)||(V=[V]),z==="var"?C.push(V[0]):V.forEach(function(G){C.push.apply(C,R.uses_data(G))})}return a(C)},R.add_operation=function(n,C){T[n]=C},R.rm_operation=function(n){delete T[n]},R.rule_like=function(n,C){if(C===n||C==="@")return!0;if(C==="number")return typeof n=="number";if(C==="string")return typeof n=="string";if(C==="array")return Array.isArray(n)&&!R.is_logic(n);if(R.is_logic(C)){if(R.is_logic(n)){var z=R.get_operator(C),V=R.get_operator(n);if(z==="@"||z===V)return R.rule_like(R.get_values(n,!1),R.get_values(C,!1))}return!1}if(Array.isArray(C))if(Array.isArray(n)){if(C.length!==n.length)return!1;for(var G=0;G<C.length;G+=1)if(!R.rule_like(n[G],C[G]))return!1;return!0}else return!1;return!1},R}var A=function(m,R){var T,n=/{{(.*?)}}/,C=m==null||(T=m.match)===null||T===void 0?void 0:T.call(m,n);if(C){var z=u().get(R,C[1]);return u().isFunction(z)?z():z}else return m};function p(a){if(h()(a)!=="object"||a===null)return null;for(var m in a)if(Object.prototype.hasOwnProperty.call(a,m))return Object.prototype.toString.call(a[m])==="[object Object]"&&a[m]!==null?p(a[m]):{key:m,value:a[m]};return null}var S=function(m){var R=b(m),T=(0,r.findIndex)(R,function(C,z,V){if(C.includes("$")&&z>0)return!0}),n=R.slice(0,T);return n};function b(a){var m=[];function R(T){Object.keys(T).sort().forEach(function(n){m.push(n),T[n]&&h()(T[n])==="object"&&R(T[n])})}return R(a),m}var i=function(){var a=v()(d()().mark(function m(R){var T,n,C,z,V,G,X;return d()().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return T=R.ruleGroup,n=R.variables,C=R.localVariables,z=R.variableNameOfLeftCondition,V=Object.keys(T)[0]||"$and",G=T[V],X=G.map(function(){var Z=v()(d()().mark(function re(ne){var J,k,q,Se,ee,pe,xe,je,Ce,Oe,De;return d()().wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(!("$and"in ne||"$or"in ne)){ae.next=4;break}return ae.next=3,i({ruleGroup:ne,variables:n,localVariables:C});case 3:return ae.abrupt("return",ae.sent);case 4:if(J=p(ne),k=J==null?void 0:J.key,k){ae.next=8;break}return ae.abrupt("return",!0);case 8:return q=w(S(ne),z),Se=n.parseVariable(q,C,{doNotRequest:!0}).then(function(ge){var ue=ge.value;return ue}),ee=(0,y.cG)(J==null?void 0:J.value)?[n.parseVariable(J==null?void 0:J.value,C).then(function(ge){var ue=ge.value;return ue}),Se]:[J==null?void 0:J.value,Se],ae.prev=11,pe=P(),ae.next=15,Promise.all(ee);case 15:return xe=ae.sent,je=o()(xe,2),Ce=je[0],Oe=je[1],ae.next=21,n.getCollectionField(q,C);case 21:return De=ae.sent,ae.abrupt("return",pe.apply(f()({},k,[(0,g.J)(Oe,{targetCollectionField:De}),(0,g.J)(Ce,{targetCollectionField:De})])));case 25:throw ae.prev=25,ae.t0=ae.catch(11),ae.t0;case 28:case"end":return ae.stop()}},re,null,[[11,25]])}));return function(re){return Z.apply(this,arguments)}}()),H.next=6,Promise.all(X);case 6:if(X=H.sent,V!=="$and"){H.next=11;break}return H.abrupt("return",(0,r.every)(X,function(Z){return Z}));case 11:return H.abrupt("return",(0,r.some)(X,function(Z){return Z}));case 12:case"end":return H.stop()}},m)}));return function(R){return a.apply(this,arguments)}}();function w(a){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$nForm";return"{{ ".concat(m,".").concat(a.join(".")," }}")}var E=function(m){var R={};return m.map(function(T){R[T.name]=T.ctx}),R};function x(a,m,R,T,n){return c.apply(this,arguments)}function c(){return c=v()(d()().mark(function a(m,R,T,n,C){var z,V,G,X,U,H;return d()().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(!(R&&m==="handlebars")){re.next=19;break}return re.prev=1,z=t().compile(R),V=E(n),G=T.ctxRef.current.$nDate,X={},Object.keys(G).map(function(ne){X[ne]=G[ne]()}),U=z(l()(l()(l()({},T.ctxRef.current),V),{},{$nDate:X})),re.next=10,C(U);case 10:return re.abrupt("return",re.sent);case 13:return re.prev=13,re.t0=re.catch(1),console.log(re.t0),re.abrupt("return",R);case 17:re.next=31;break;case 19:return re.prev=19,re.next=22,(0,B.replaceVariableValue)(R,T,n);case 22:return H=re.sent,re.next=25,C(H);case 25:return re.abrupt("return",re.sent);case 28:return re.prev=28,re.t1=re.catch(19),re.abrupt("return",R);case 31:case"end":return re.stop()}},a,null,[[1,13],[19,28]])})),c.apply(this,arguments)}},61736:function(ze,te,e){"use strict";e.d(te,{D:function(){return l}});var N=e(67294),l=(0,N.createContext)({});l.displayName="SchemaComponentContext.Provider"},44245:function(ze,te,e){"use strict";e.d(te,{R:function(){return t}});var N=e(97857),l=e.n(N),$=e(13769),d=e.n($),M=e(86201),f=e(80844),L=e(67294),o=e(47844),W=e(85893),v=["children","form"],D=["children"],h=function(u){var B=u.children,y=u.form,g=d()(u,v),O=(0,L.useContext)(f.SchemaOptionsContext),K=(0,L.useContext)(f.SchemaExpressionScopeContext),P=l()(l()({},O==null?void 0:O.scope),K),A=l()({},O==null?void 0:O.components);return(0,W.jsx)(f.FormProvider,l()(l()({},g),{},{form:y,children:(0,W.jsx)(o.G,{components:A,scope:P,children:B})}))},I=function(u){var B=u.children,y=d()(u,D),g=(0,L.useContext)(f.SchemaOptionsContext),O=(0,L.useContext)(f.SchemaExpressionScopeContext),K=l()(l()({},g==null?void 0:g.scope),O),P=l()({},g==null?void 0:g.components),A=(0,L.useMemo)(function(){return(0,M.createForm)()},[]);return(0,W.jsx)(f.FormProvider,l()(l()({},y),{},{form:A,children:(0,W.jsx)(o.G,{components:P,scope:K,children:B})}))},t=function(u){return u.form?(0,W.jsx)(h,l()({},u)):(0,W.jsx)(I,l()({},u))}},93587:function(ze,te,e){"use strict";e.d(te,{m:function(){return t}});var N=e(97857),l=e.n(N),$=e(86201),d=e(57953),M=e(67294),f=e(84577),L=e(44245),o=e(93323),W=e(12174),v=function(u){var B=u.uid,y=u.type,g=y===void 0?"getJsonSchema":y,O=u.onSuccess,K={url:"/uiSchemas:".concat(g,"/").concat(B)},P=(0,W.QT)(K,{refreshDeps:[B],onSuccess:function(b){O&&O(b)}}),A=P.data,p=P.loading;return{schema:A==null?void 0:A.data,loading:p}},D=e(85893),h=function(u){return u},I=function(u){var B=u.noForm,y=u.onlyRenderProperties,g=u.hidden,O=u.scope,K=u.uid,P=u.memoized,A=P===void 0?!0:P,p=u.components,S=u.onSuccess,b=u.NotFoundPage,i=u.schemaTransform,w=i===void 0?h:i,E=u.onPageNotFind,x=(0,f.Dm)(),c=x.reset,a=y?"getProperties":"getJsonSchema",m={url:"/uiSchemas:".concat(a,"/").concat(K)},R=(0,M.useMemo)(function(){return(0,$.createForm)()},[K]),T=v({uid:K,type:a,onSuccess:function(G){S&&S(G),c&&c()}}),n=T.schema,C=T.loading,z=(0,f.Co)(b);return C||g?(0,D.jsx)("div",{style:{textAlign:"center",marginTop:20},children:(0,D.jsx)(d.Z,{})}):!n||Object.keys(n).length===0?(E&&E(),z?(0,D.jsx)(z,{}):null):B?(0,D.jsx)(o.n,{components:p,scope:O,schema:w(n||{})}):(0,D.jsx)(L.R,{form:R,children:(0,D.jsx)(o.n,{components:p,scope:O,schema:w(n||{})})})},t=(0,M.memo)(function(r){return r.uid?(0,D.jsx)(I,l()({},r)):null});t.displayName="RemoteSchemaComponent"},93323:function(ze,te,e){"use strict";e.d(te,{n:function(){return O}});var N=e(97857),l=e.n(N),$=e(13769),d=e.n($),M=e(9783),f=e.n(M),L=e(80844),o=e(90105),W=e(67294),v=e(61736),D=e(47844),h=e(85893),I=["components","scope","schema","distributed"],t=["schema"],r=["memoized"];function u(K){return L.Schema.isSchemaInstance(K)?K:K!=null&&K.name?new L.Schema({type:"object",properties:f()({},K.name,K)}):new L.Schema(K)}var B=function(P){return(0,W.useMemo)(function(){return u(P)},[])},y=(0,W.memo)(function(K){var P=K.components,A=K.scope,p=K.schema,S=K.distributed,b=d()(K,I),i=(0,W.useContext)(v.D),w=(0,W.useMemo)(function(){return u(p)},[p]),E=(0,o.Z)();return(0,h.jsx)(v.D.Provider,{value:l()(l()({},i),{},{distributed:i.distributed==!1?!1:S,refresh:function(){var c;if(E(),i.distributed===!1||S===!1){var a;(a=i.refresh)===null||a===void 0||a.call(i)}(c=K.onChange)===null||c===void 0||c.call(K,w)}}),children:(0,h.jsx)(D.G,{inherit:!0,components:P,scope:A,children:(0,h.jsx)(L.RecursionField,l()(l()({},b),{},{schema:w}))})})}),g=(0,W.memo)(function(K){var P=K.schema,A=d()(K,t),p=B(P);return(0,h.jsx)(y,l()(l()({},A),{},{schema:p}))}),O=(0,W.memo)(function(K){var P=K.memoized,A=d()(K,r);return P?(0,h.jsx)(g,l()({},A)):(0,h.jsx)(y,l()({},A))})},47844:function(ze,te,e){"use strict";e.d(te,{B:function(){return f},G:function(){return L}});var N=e(97857),l=e.n(N),$=e(80844),d=e(67294),M=e(85893),f=function(){var W=(0,d.useContext)($.SchemaOptionsContext);return W||{}},L=(0,d.memo)(function(o){var W=o.children,v=f(),D=(0,d.useMemo)(function(){return l()(l()({},v.components),o.components)},[v.components,o.components]),h=(0,d.useMemo)(function(){return l()(l()({},v.scope),o.scope)},[v.scope,o.scope]),I=(0,d.useMemo)(function(){return{scope:h,components:D}},[h,D]);return(0,M.jsx)($.SchemaOptionsContext.Provider,{value:I,children:(0,M.jsx)($.SchemaComponentsContext.Provider,{value:D,children:(0,M.jsx)($.ExpressionScope,{value:h,children:W})})})});L.displayName="SchemaComponentOptions"},70993:function(ze,te,e){"use strict";e.d(te,{_b:function(){return P},RV:function(){return A.R},m1:function(){return p.m},n6:function(){return S.n},G0:function(){return b.G},a$:function(){return X},Tz:function(){return V},Bs:function(){return b.B}});var N=e(15009),l=e.n(N),$=e(99289),d=e.n($),M=e(12444),f=e.n(M),L=e(72004),o=e.n(L),W=e(31996),v=e.n(W),D=e(26037),h=e.n(D),I=e(51947),t=e(83062),r=e(15867),u=e(67294),B=e(49218),y=e(26793),g=e(40868),O=e(68230),K=e(85893),P=function(){var Z=(0,g.ngQ)(),re=Z.designable,ne=Z.setDesignable,J=(0,y.$)(),k=J.t,q=(0,O.d)(),Se=q.token,ee={};return re?ee.backgroundColor="var(--colorSettings)":ee.backgroundColor="transparent",(0,B.y1)("Ctrl+Shift+U",function(){return ne(!re)},[re]),(0,K.jsx)(t.Z,{title:k("UI Editor"),children:(0,K.jsx)(r.ZP,{"data-testid":"ui-editor-button",icon:(0,K.jsx)(I.Z,{style:{color:Se.colorTextHeaderMenu}}),title:k("UI Editor"),style:ee,onClick:function(){ne(!re)}})})},A=e(44245),p=e(93587),S=e(93323),b=e(47844),i=e(97857),w=e.n(i),E=e(5574),x=e.n(E),c=e(86201),a=e(80844),m=e(84327),R=e(90105),T=e(61736),n=function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return"".concat(Z).concat((0,m.uid)())};a.Schema.silent(!0);var C={},z={silent:!0,compile:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=function(){if(z.silent)try{return new Function("$root","with($root) { return (".concat(Z,"); }"))(re)}catch(k){return"{{".concat(Z,"}}")}else return new Function("$root","with($root) { return (".concat(Z,"); }"))(re)};return C[Z]?C[Z]:Z.trim().startsWith("t(")?(C[Z]=ne(),C[Z]):ne()}};a.Schema.registerCompiler(z.compile);var V=function(Z){var re=Z.designable,ne=Z.onDesignableChange,J=Z.components,k=Z.children,q=(0,u.useContext)(T.D),Se=(0,b.B)(),ee=(0,R.Z)(),pe=(0,u.useState)((0,m.uid)()),xe=x()(pe,2),je=xe[0],Ce=xe[1],Oe=(0,u.useMemo)(function(){return Z.form||(0,c.createForm)()},[je]),De=(0,y.$)(),ce=De.t,ae=(0,u.useMemo)(function(){return w()(w()({},Z.scope),{},{t:ce,randomString:n})},[Z.scope,ce,Se==null?void 0:Se.scope]),ge=(0,u.useState)(re),ue=x()(ge,2),fe=ue[0],_e=ue[1],ye=(0,u.useMemo)(function(){return typeof re=="boolean"?re:fe},[re,fe,q.designable]),Re=(0,u.useMemo)(function(){return function(Te){typeof ye!="boolean"&&_e(Te),ne==null||ne(Te)}},[ye,ne]),Be=(0,u.useCallback)(function(){Ce((0,m.uid)())},[]);return(0,K.jsx)(T.D.Provider,{value:{scope:ae,components:J,reset:Be,refresh:ee,designable:ye,setDesignable:Re},children:(0,K.jsx)(a.FormProvider,{form:Oe,children:(0,K.jsx)(b.G,{inherit:!0,scope:ae,components:J,children:k})})})};V.displayName="SchemaComponentProvider";var G=e(31601),X=function(H){v()(re,H);var Z=h()(re);function re(){return f()(this,re),Z.apply(this,arguments)}return o()(re,[{key:"load",value:function(){var ne=d()(l()().mark(function k(){return l()().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:this.addComponents();case 1:case"end":return Se.stop()}},k,this)}));function J(){return ne.apply(this,arguments)}return J}()},{key:"addComponents",value:function(){this.app.addComponents({DesignableSwitch:P})}}]),re}(G.S),U=null},84577:function(ze,te,e){"use strict";e.d(te,{zz:function(){return L.zz},Pl:function(){return L.Pl},oB:function(){return L.oB},lI:function(){return l},hi:function(){return g.hi},eJ:function(){return $.e},Co:function(){return f},aZ:function(){return g.aZ},ng:function(){return L.ng},et:function(){return o.e},cL:function(){return u},fd:function(){return O},Cl:function(){return D},vH:function(){return B},sR:function(){return L.sR},wN:function(){return y.w},Dm:function(){return I},fM:function(){return g.fM}});var N=e(67294),l=function(P){var A=(0,N.useRef)(null);return(0,N.useEffect)(function(){return A.current&&P!==A.current&&A.current.onUnmount(),A.current=P,P.onMount(),function(){P.onUnmount()}},[P]),P},$=e(96365),d=e(80844),M=e(96486),f=function(P,A){var p=(0,N.useContext)(d.SchemaOptionsContext),S=p.components;return P?typeof P!="string"?P:(0,M.get)(S,P)||A:A},L=e(94516),o=e(98146),W=e(97857),v=e.n(W),D=function(P){var A=(0,N.useContext)(d.SchemaOptionsContext),p=(0,N.useContext)(d.SchemaExpressionScopeContext),S=(0,N.useRef)();return S.current=p,P.toFieldProps(v()(v()({},A),{},{get scope(){return v()(v()({},A.scope),S.current)}}))},h=e(61736);function I(){return(0,N.useContext)(h.D)}var t=e(26793),r=e(6145),u=function(){var P,A=(0,r.useCollectionManager_deprecated)(),p=A.getCollectionJoinField,S=A.getCollection,b=(0,d.useFieldSchema)(),i=(0,r.useCollection_deprecated)(),w=i.getField,E=w(b.name)||p(b["x-collection-field"]),x=(0,t.$)(),c=x.t,a=((P=b["x-component-props"])===null||P===void 0?void 0:P.fieldNames)||{},m=a.label,R=(0,N.useMemo)(function(){if(!(!E||!(E!=null&&E.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m"].includes(E.interface)){var T=S(E.target);if((T==null?void 0:T.template)==="file")return[{label:c("Record picker"),value:"CollectionField"},{label:c("Select"),value:"AssociationSelect"}];switch(E.interface){case"o2m":return[{label:c("Record picker"),value:"CollectionField"},{label:c("Subtable"),value:"TableField"},{label:c("Select"),value:"AssociationSelect"}];case"m2o":case"m2m":case"linkTo":return[{label:c("Record picker"),value:"CollectionField"},{label:c("Select"),value:"AssociationSelect"}];default:return[{label:c("Record picker"),value:"CollectionField"},{label:c("Subform"),value:"FormField"},{label:c("Select"),value:"AssociationSelect"}]}}},[c,E==null?void 0:E.interface,m]);return R},B=function(){var P,A=(0,d.useField)(),p=(0,d.useFieldSchema)(),S=(0,r.useCollection_deprecated)(),b=S.getField,i=(0,r.useCollectionManager_deprecated)(),w=i.getCollectionJoinField,E=b(p.name)||w(p["x-collection-field"]),x=(0,$.e)();(0,N.useEffect)(function(){if(!(A!=null&&A.title)){var c;A.title=x(E==null||(c=E.uiSchema)===null||c===void 0?void 0:c.title)}},[E==null||(P=E.uiSchema)===null||P===void 0?void 0:P.title])},y=e(9780),g=e(18686),O=function(P){var A,p=(0,t.$)(),S=p.t,b=(0,r.useCollectionManager_deprecated)(),i=b.getCollectionJoinField,w=b.getCollection,E=(0,d.useFieldSchema)(),x=(P==null?void 0:P.fieldSchema)||E,c=(0,d.useField)(),a=(0,d.useForm)(),m=(x==null?void 0:x["x-read-pretty"])||c.readPretty||a.readPretty,R=P==null?void 0:P.fieldSchema,T=(0,r.useCollection_deprecated)(),n=T.getField,C=(P==null?void 0:P.collectionField)||n(x.name)||i(x["x-collection-field"]),z=((A=x["x-component-props"])===null||A===void 0?void 0:A.fieldNames)||{},V=z.label,G=(0,N.useMemo)(function(){if(!(!C||!(C!=null&&C.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m","updatedBy","createdBy","mbm"].includes(C.interface)){var X=w(C.target);if((X==null?void 0:X.template)==="file")return m?[{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((X==null?void 0:X.template)==="tree"&&["m2m","o2m","m2o"].includes(C.interface))return m?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!R&&{label:S("Sub-details"),value:"Nester"},!R&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!R&&["m2m","o2m"].includes(C.interface)&&{label:S("Sub-table"),value:"SubTable"},!R&&{label:S("Cascade Select"),value:"CascadeSelect"},!R&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];switch(C.interface){case"o2m":return m?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!R&&{label:S("Sub-table"),value:"SubTable"},!R&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!R&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"},!R&&{label:S("Sub-table"),value:"SubTable"}];case"m2m":case"mbm":return m?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!R&&{label:S("Sub-details"),value:"Nester"},!R&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!R&&{label:S("Sub-table"),value:"SubTable"},!R&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];case"m2o":case"linkTo":return m?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!R&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!R&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];default:return m?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!R&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!R&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}]}}},[S,C==null?void 0:C.interface,V]);return(G||[]).filter(Boolean)}},18686:function(ze,te,e){"use strict";e.d(te,{aZ:function(){return P},fM:function(){return p},hi:function(){return A}});var N=e(5574),l=e.n(N),$=e(97857),d=e.n($),M=e(80844),f=e(83204),L=e(9361),o=e(96486),W=e.n(o),v=e(67294),D=e(40868),h=e(21143),I=e(10097),t=e(1892),r=e(28561),u=function(i,w,E,x){return i?x.paddingContentHorizontalLG:E?w?x.controlPaddingHorizontal+3*x.controlPaddingHorizontalSM+22+x.paddingContentHorizontalLG:x.paddingContentHorizontalLG+12:w?x.paddingSM+x.controlHeight+x.marginXS+2*x.controlPaddingHorizontalSM+22+x.paddingContentHorizontalLG:x.controlHeight+x.marginXS+(x.paddingXXS+2)*2+x.paddingContentHorizontalLG},B=function(i){var w=L.Z.useToken(),E=w.token,x=(0,D.ngQ)(),c=x.designable,a=(0,I.useBlockHeightProps)(),m=a.heightProps,R=i||m||{},T=R.disablePageHeader,n=R.enablePageTabs,C=R.hidePageTitle,z=E.sizeXXL-2,V=c?E.controlHeight+2*E.paddingContentHorizontalLG:1*E.paddingContentHorizontalLG,G=u(T,n,C,E);return z+G+V},y=function(){var i=L.Z.useToken(),w=i.token,E=(0,D.ngQ)(),x=E.designable,c=w.paddingContentVerticalLG+w.margin+2*w.paddingContentVertical+24,a=x?w.controlHeight+2*w.paddingContentHorizontalLG:1*w.paddingContentHorizontalLG;return c+a},g=function(i){var w=(0,M.useFieldSchema)(),E=S(w),x=B(i),c=y();return E?c:x},O=["users_jobs","approvals","approvalRecords"],K=function(){var i,w,E=L.Z.useToken(),x=E.token,c=(0,I.useBlockHeightProps)(),a=c.heightProps,m=(0,t.Si)(),R=m.heightProps,T=(0,D.ngQ)(),n=T.designable,C=(0,M.useFieldSchema)(),z=R||a,V=g(z),G=(i=(0,h.useDataBlockRequest)())!==null&&i!==void 0?i:{},X=G.data,U=(0,h.useCollection)(),H=U.name,Z=(X==null?void 0:X.meta)||{},re=Z.count,ne=Z.pageSize,J=re>ne,k=z.heightMode,q=z.height,Se=z.title;if(!(!(z!=null&&z.heightMode)||k===r.j.DEFAULT)){var ee=Object.keys(((w=C.parent.properties.actions)===null||w===void 0?void 0:w.properties)||{}).length>0,pe=J?x.controlHeight+x.padding+x.marginLG:x.marginLG,xe=ee||n?x.controlHeight+2*x.marginLG:x.marginLG,je=(n&&!O.includes(H)?x.controlHeight:22)+2*x.padding+1,Ce=Se?x.fontSizeLG*x.lineHeightLG+x.padding*2-1:0;return k===r.j.FULL_HEIGHT?window.innerHeight-V-Ce-je-xe-pe:q-Ce-xe-je-pe}},P=function(i){var w=(0,I.useBlockHeightProps)(),E=w.heightProps,x=g(),c=L.Z.useToken(),a=c.token,m=E||{},R=m.heightMode,T=m.height,n=m.title,C=n?a.fontSizeLG*a.lineHeightLG+a.padding*2-1:0;if(!(!(E!=null&&E.heightMode)||R===r.j.DEFAULT)){if(R===r.j.FULL_HEIGHT){var z=window.innerHeight-x;return i!=null&&i.removeBlockHeaderHeight&&(z=z-C),i!=null&&i.innerExtraHeight&&(z=z-i.innerExtraHeight),z}return T}},A=function(){var i=(0,M.useFieldSchema)(),w=(0,v.useMemo)(function(){return(0,I.getPageSchema)(i)},[]),E=(w==null?void 0:w["x-component-props"])||{},x=E.disablePageHeader,c=E.enablePageTabs,a=E.hidePageTitle,m=d()(d()({},i==null?void 0:i["x-component-props"]),{},{disablePageHeader:x,enablePageTabs:c,hidePageTitle:a}),R=g(m),T=m||{},n=T.heightMode,C=T.height;if(!(!(m!=null&&m.heightMode)||n===r.j.DEFAULT))return n===r.j.FULL_HEIGHT?window.innerHeight-R:C},p=function(){var i=(0,v.useState)(),w=l()(i,2),E=w[0],x=w[1],c=(0,v.useRef)(null),a=K(),m=(0,v.useCallback)((0,o.debounce)(function(){var T;if(c.current){var n=c.current.getBoundingClientRect(),C=(T=c.current.querySelector(".ant-table"))===null||T===void 0?void 0:T.getBoundingClientRect();C&&x(n.width)}},100),[a]),R=(0,v.useCallback)(function(T){c.current=T&&T.children?T.children[0]:null,m()},[m]);return(0,f.Z)("resize",m),{height:a,width:E,tableSizeRefCallback:R}},S=function b(i){return i?i["x-component"]==="Action.Container"?!0:b(i.parent):null}},96365:function(ze,te,e){"use strict";e.d(te,{e:function(){return o}});var N=e(97857),l=e.n(N),$=e(52677),d=e.n($),M=e(80844),f=e(67294),L={},o=function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{noCache:!1},D=v.noCache,h=(0,f.useContext)(M.SchemaOptionsContext),I=(0,f.useContext)(M.SchemaExpressionScopeContext);return function(t,r){var u=!1,B;if(typeof t=="string"&&t.startsWith("{{")&&(u=!0,B=t),t&&d()(t)==="object"&&!(0,f.isValidElement)(t)&&(u=!0,B=JSON.stringify(t)),Array.isArray(t)&&(u=!0),u){var y=l()(l()(l()({},h.scope),I),r);if(!B)return M.Schema.compile(t,y);try{return D?M.Schema.compile(t,y):(L[B]=L[B]||M.Schema.compile(t,y),L[B])}catch(g){return console.log("useCompile error",t,g),M.Schema.compile(t,y)}}return t}}},94516:function(ze,te,e){"use strict";e.d(te,{zz:function(){return V},Pl:function(){return m},oB:function(){return C},ng:function(){return X},sR:function(){return G}});var N=e(5574),l=e.n(N),$=e(19632),d=e.n($),M=e(15009),f=e.n(M),L=e(99289),o=e.n(L),W=e(12444),v=e.n(W),D=e(72004),h=e.n(D),I=e(9783),t=e.n(I),r=e(97857),u=e.n(r),B=e(80844),y=e(84327),g=e(45360),O=e(50361),K=e.n(O),P=e(27361),A=e.n(P),p=e(36968),S=e.n(p),b=e(67294),i=e(26793),w=e(12174),E=e(61736);function x(U,H){if(U)return U["x-app-version"]||(U["x-app-version"]=H),Object.keys(U.properties||{}).forEach(function(Z){var re;x((re=U.properties)===null||re===void 0?void 0:re[Z],H)}),U}var c={i8:"1.3.51"},a=e(85893);function m(U){return new V(U)}var R=function U(H){H&&(H["x-uid"]||(H["x-uid"]=(0,y.uid)()),Object.keys(H.properties||{}).forEach(function(Z){U(H.properties[Z])}))},T=function(H){return H},n=function(H,Z){if(!(!H||!Z)){for(var re in Z)if(Object.prototype.hasOwnProperty.call(Z,re)){var ne=Z[re];if(ne!==(H==null?void 0:H[re]))return!1}return!0}},C=function(H,Z){if(H["x-uid"]&&H["x-uid"]===Z["x-uid"])return[null,H.toJSON()];var re=H.toJSON(),ne=u()(u()({},re),{},{properties:{}}),J=null,k=function q(Se,ee){Object.keys(Se||{}).forEach(function(pe){var xe=Se[pe];if(xe["x-uid"]===Z["x-uid"]){J=Se[pe];return}else ee.properties[pe]=u()(u()({},xe),{},{properties:{}}),q(xe==null?void 0:xe.properties,ee.properties[pe])})};return k(re.properties,ne),[ne,J]},z=function(H){return H},V=function(){function U(H){v()(this,U),t()(this,"current",void 0),t()(this,"options",void 0),t()(this,"appVersion",void 0),t()(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,re=this.options,ne=re.api,J=re.t,k=J===void 0?z:J;if(ne){var q=function(ee){if(!ee)return[];var pe=Object.values(ee.properties).length,xe=[];return ee.mapProperties(function(je){je["x-component-props"]=je["x-component-props"]||{},je["x-component-props"].width=100/pe,je["x-uid"]&&xe.push({"x-uid":je["x-uid"],"x-component-props":je["x-component-props"]})}),ee["x-uid"]&&xe.length?xe:[]};this.on("insertAdjacent",function(){var Se=o()(f()().mark(function ee(pe){var xe,je,Ce,Oe,De,ce,ae,ge,ue,fe;return f()().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(je=pe.onSuccess,Ce=pe.current,Oe=pe.position,De=pe.schema,ce=pe.wrap,ae=pe.wrapped,ge=pe.removed,ue=[],(ae==null?void 0:ae["x-component"])==="Grid.Col"&&(ue=ue.concat(q(ae.parent))),(ge==null?void 0:ge["x-component"])==="Grid.Col"&&(ue=ue.concat(q(ge.parent))),Z.refresh(),Ce["x-uid"]){ye.next=7;break}return ye.abrupt("return");case 7:return ye.next=9,ne.request({url:"/uiSchemas:insertAdjacent/".concat(Ce["x-uid"],"?position=").concat(Oe),method:"post",data:{schema:x(De,Z.appVersion),wrap:ce}});case 9:if(fe=ye.sent,!ue.length){ye.next=13;break}return ye.next=13,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:ue});case 13:if(!(ge!=null&&ge["x-uid"])){ye.next=16;break}return ye.next=16,ne.request({url:"/uiSchemas:remove/".concat(ge["x-uid"]),method:"post"});case 16:je==null||je(fe==null||(xe=fe.data)===null||xe===void 0?void 0:xe.data),g.ZP.success(k("Saved successfully"),.2);case 18:case"end":return ye.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}()),this.on("patch",function(){var Se=o()(f()().mark(function ee(pe){var xe;return f()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(xe=pe.schema,Z.refresh(),xe!=null&&xe["x-uid"]){Ce.next=4;break}return Ce.abrupt("return");case 4:return Ce.next=6,ne.request({url:"/uiSchemas:patch",method:"post",data:u()({},xe)});case 6:g.ZP.success(k("Saved successfully"),.2);case 7:case"end":return Ce.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}()),this.on("initializeActionContext",function(){var Se=o()(f()().mark(function ee(pe){var xe;return f()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(xe=pe.schema,Z.refresh(),xe!=null&&xe["x-uid"]){Ce.next=4;break}return Ce.abrupt("return");case 4:return Ce.next=6,ne.request({url:"/uiSchemas:initializeActionContext",method:"post",data:u()({},xe)});case 6:case"end":return Ce.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}()),this.on("batchPatch",function(){var Se=o()(f()().mark(function ee(pe){var xe;return f()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return xe=pe.schemas,Z.refresh(),Ce.next=4,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:xe});case 4:g.ZP.success(k("Saved successfully"),.2);case 5:case"end":return Ce.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}()),this.on("remove",function(){var Se=o()(f()().mark(function ee(pe){var xe,je;return f()().wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:if(xe=pe.removed,je=[],(xe==null?void 0:xe["x-component"])==="Grid.Col"&&(je=q(xe.parent)),Z.refresh(),xe!=null&&xe["x-uid"]){Oe.next=6;break}return Oe.abrupt("return");case 6:return Oe.next=8,ne.request({url:"/uiSchemas:remove/".concat(xe["x-uid"]),method:"post"});case 8:if(!je.length){Oe.next=11;break}return Oe.next=11,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:je});case 11:g.ZP.success(k("Saved successfully"),.2);case 12:case"end":return Oe.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}())}}},{key:"prepareProperty",value:function(Z){Z.type||(Z.type="void"),Z.name||(Z.name=(0,y.uid)()),this.current["x-uid"]&&R(Z)}},{key:"on",value:function(Z,re){this.events[Z]||(this.events[Z]=[]),this.events[Z].push(re)}},{key:"emit",value:function(){var H=o()(f()().mark(function re(ne){var J=this,k,q,Se,ee,pe,xe=arguments;return f()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(this.events[ne]){Ce.next=2;break}return Ce.abrupt("return");case 2:for(k=xe.length,q=new Array(k>1?k-1:0),Se=1;Se<k;Se++)q[Se-1]=xe[Se];return ee=q[0],pe=q.slice(1),Ce.abrupt("return",Promise.all(this.events[ne].map(function(Oe){return Oe.bind(J).apply(void 0,[u()({current:J.current},ee)].concat(d()(pe)))})));case 5:case"end":return Ce.stop()}},re,this)}));function Z(re){return H.apply(this,arguments)}return Z}()},{key:"parentsIn",value:function(Z){if(!Z||!B.Schema.isSchemaInstance(Z))return!1;for(var re=this.current;(ne=re)!==null&&ne!==void 0&&ne.parent;){var ne;if(re.parent===Z)return!0;re=re.parent}return!1}},{key:"refresh",value:function(){var Z=this.options.refresh;return Z==null?void 0:Z()}},{key:"deepMerge",value:function(Z){var re=this,ne={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"},J={"x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(Z).forEach(function(k){ne[k]?(re.current[k]=Z[k],re.updateModel(ne[k],Z[k])):J[k]?Object.keys(Z[k]).forEach(function(q){S()(re.current,[k,q],Z[k][q]),re.updateModel([J[k],q],Z[k][q])}):re.current[k]=Z[k]}),this.emit("patch",{schema:Z})}},{key:"getSchemaAttribute",value:function(Z,re){return A()(this.current,Z,re)}},{key:"shallowMerge",value:function(Z){var re=this,ne={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(J){re.current[J]=Z[J],ne[J]&&re.updateModel(ne[J],Z[J])}),this.emit("patch",{schema:Z})}},{key:"updateModel",value:function(Z,re){var ne=function(k){S()(k,Z,re)};this.model&&ne(this.model),this.query&&this.query.take(ne)}},{key:"insertAdjacent",value:function(Z,re){var ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};switch(Z){case"beforeBegin":return this.insertBeforeBegin(re,ne);case"afterBegin":return this.insertAfterBegin(re,ne);case"beforeEnd":return this.insertBeforeEnd(re,ne);case"afterEnd":return this.insertAfterEnd(re,ne)}}},{key:"recursiveRemoveIfNoChildren",value:function(Z,re){if(Z){for(var ne=Z,J,k=re==null?void 0:re.breakRemoveOn;ne;){if(typeof k=="function"){if(k(ne))break}else if(n(ne,k))break;var q=Object.keys(ne.properties||{}).length;if(q>0)break;ne.parent&&(J=ne.parent.removeProperty(ne.name)),ne=ne.parent}return J}}},{key:"remove",value:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=re.breakRemoveOn,J=re.removeParentsIfNoChildren,k=Z||this.current,q=k.parent.removeProperty(k.name);if(J){var Se=this.recursiveRemoveIfNoChildren(k.parent,{breakRemoveOn:ne});Se&&(q=Se)}return this.emit("remove",{removed:q})}},{key:"removeWithoutEmit",value:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=re.breakRemoveOn,J=re.removeParentsIfNoChildren,k=Z||this.current,q=k.parent.removeProperty(k.name);if(J){var Se=this.recursiveRemoveIfNoChildren(k.parent,{breakRemoveOn:ne});Se&&(q=Se)}return q}},{key:"insertBeforeBeginOrAfterEnd",value:function(Z){var re=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)&&B.Schema.isSchemaInstance(Z)&&this.current.parent===Z.parent){var J=0,k=0;return this.current.parent.mapProperties(function(q,Se,ee){re.current.name===Se&&(k=ee),Z.name===Se&&(J=ee)}),J>k?this.insertBeforeBegin(Z,ne):this.insertAfterEnd(Z,ne)}}},{key:"insertBeforeBegin",value:function(Z){var re=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var J={onSuccess:ne.onSuccess},k=ne.wrap,q=k===void 0?T:k,Se=ne.breakRemoveOn,ee=ne.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),ee&&(J.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:Se}))}else Z&&(Z=K()(Z));var pe={},xe=!1,je=0,Ce=0;this.current.parent.mapProperties(function(fe,_e){_e===re.current.name&&(Ce=je,xe=!0,++je),fe["x-index"]=je,++je,xe&&(pe[_e]=fe,re.current.parent.removeProperty(_e))}),this.prepareProperty(Z);var Oe=q(Z),De=this.current.parent.addProperty(Oe.name||(0,y.uid)(),Oe);De["x-index"]=Ce,De.parent=this.current.parent,this.current.parent.setProperties(pe);var ce=C(De,Z),ae=l()(ce,2),ge=ae[0],ue=ae[1];this.emit("insertAdjacent",u()({position:"beforeBegin",schema:ue,wrapped:Oe,wrap:ge},J))}}},{key:"insertAfterBegin",value:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var ne={onSuccess:re.onSuccess},J=re.wrap,k=J===void 0?T:J,q=re.breakRemoveOn,Se=re.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),Se&&(ne.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:q}))}else Z&&(Z=K()(Z));var ee={},pe=1;this.current.mapProperties(function(ae,ge){ae["x-index"]=pe,++pe,ee[ge]=ae}),this.current.properties={},this.prepareProperty(Z);var xe=k(Z),je=this.current.addProperty(xe.name||(0,y.uid)(),xe);je["x-index"]=0,je.parent=this.current,this.current.setProperties(ee);var Ce=C(je,Z),Oe=l()(Ce,2),De=Oe[0],ce=Oe[1];this.emit("insertAdjacent",u()({position:"afterBegin",schema:ce,wrap:De,wrapped:xe},ne))}}},{key:"insertBeforeEnd",value:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){delete Z["x-index"];var ne={onSuccess:re.onSuccess},J=re.wrap,k=J===void 0?T:J,q=re.breakRemoveOn,Se=re.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),Se&&(ne.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:q}))}else Z&&(Z=K()(Z));this.prepareProperty(Z);var ee=k(Z),pe=this.current.addProperty(ee.name||(0,y.uid)(),ee);pe.parent=this.current;var xe=C(pe,Z),je=l()(xe,2),Ce=je[0],Oe=je[1];return this.emit("insertAdjacent",u()({position:"beforeEnd",schema:Oe,wrap:Ce,wrapped:ee},ne))}}},{key:"insertAfterEnd",value:function(Z){var re=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var J={onSuccess:ne==null?void 0:ne.onSuccess},k=ne.wrap,q=k===void 0?T:k,Se=ne.breakRemoveOn,ee=ne.removeParentsIfNoChildren,pe=0,xe=0,je=!1,Ce={};if(this.current.parent.mapProperties(function(fe,_e){fe["x-index"]=pe,_e===re.current.name&&(++pe,xe=pe,je=!0),++pe,je&&_e!==re.current.name&&(Ce[_e]=fe,re.current.parent.removeProperty(_e))}),B.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),ee&&(J.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:Se})),Z.parent=null}else Z&&(Z=K()(Z));this.prepareProperty(Z);var Oe=q(Z),De=this.current.parent.addProperty(Oe.name||(0,y.uid)(),Oe);De.parent=this.current.parent,De["x-index"]=xe,this.current.parent.setProperties(Ce);var ce=C(De,Z),ae=l()(ce,2),ge=ae[0],ue=ae[1];this.emit("insertAdjacent",u()({position:"afterEnd",schema:ue,wrap:ge,wrapped:Oe},J))}}}]),U}();function G(){var U=(0,b.useContext)(B.SchemaOptionsContext),H=(0,b.useMemo)(function(){return(U==null?void 0:U.components)||{}},[U]),Z=function(ne){if(!ne)return null;if(typeof ne!="string")return ne;var J=A()(H,ne);return J||console.error('[nocobase]: Component "'.concat(ne,'" not found')),J};return Z}function X(){var U=(0,b.useContext)(E.D),H=U.designable,Z=U.setDesignable,re=U.refresh,ne=U.reset,J=(0,b.useContext)(B.SchemaOptionsContext),k=(0,b.useMemo)(function(){return(J==null?void 0:J.components)||{}},[J]),q=(0,b.useMemo)(function(){return function(){return(0,a.jsx)(a.Fragment,{})}},[]),Se=(0,B.useField)(),ee=(0,B.useFieldSchema)(),pe=(0,w.LY)(),xe=(0,i.$)(),je=xe.t,Ce=(0,b.useMemo)(function(){return m({t:je,api:pe,refresh:re,current:ee,model:Se,appVersion:c.i8})},[je,pe,re,ee,Se]);return(0,b.useEffect)(function(){Ce.loadAPIClientEvents()},[Ce]),{dn:Ce,designable:H,reset:ne,refresh:re,setDesignable:Z,DesignableBar:q,findComponent:(0,b.useCallback)(function(Oe){return Oe?typeof Oe!="string"?Oe:A()(k,Oe):null},[A()]),on:Ce.on.bind(Ce),patch:(0,b.useCallback)(function(Oe,De){var ce=function(ue){Object.keys(ue).forEach(function(fe){var _e=ue[fe];fe==="title"&&(Se.title=_e,ee.title=_e),fe==="x-decorator-props"&&(Se.decoratorProps||(Se.decoratorProps={}),ee["x-decorator-props"]||(ee["x-decorator-props"]={}),Object.keys(_e).forEach(function(ye){Se.decoratorProps[ye]=_e[ye],ee["x-decorator-props"][ye]=_e[ye]})),fe==="x-component-props"&&(Se.componentProps||(Se.componentProps={}),ee["x-component-props"]||(ee["x-component-props"]={}),Object.keys(_e).forEach(function(ye){Se.componentProps[ye]=_e[ye],ee["x-component-props"][ye]=_e[ye]}))})};if(typeof Oe=="string"){var ae={};return S()(ae,Oe,De),ce(ae)}ce(Oe),re()},[Ce]),shallowMerge:(0,b.useCallback)(function(Oe){Ce.shallowMerge(Oe)},[Ce]),deepMerge:(0,b.useCallback)(function(Oe){Ce.deepMerge(Oe)},[Ce]),remove:(0,b.useCallback)(function(Oe,De){Ce.remove(Oe,De)},[Ce]),insertAdjacent:(0,b.useCallback)(function(Oe,De,ce){Ce.insertAdjacent(Oe,De,ce)},[Ce]),insertBeforeBegin:(0,b.useCallback)(function(Oe){Ce.insertBeforeBegin(Oe)},[Ce]),insertAfterBegin:(0,b.useCallback)(function(Oe){Ce.insertAfterBegin(Oe)},[Ce]),insertBeforeEnd:(0,b.useCallback)(function(Oe){Ce.insertBeforeEnd(Oe)},[Ce]),insertAfterEnd:(0,b.useCallback)(function(Oe){Ce.insertAfterEnd(Oe)},[Ce])}}},98146:function(ze,te,e){"use strict";e.d(te,{e:function(){return f}});var N=e(80844),l=e(84577),$=e(67294),d=e(26386),M=function(){return null},f=function(){var o=(0,l.ng)(),W=o.designable,v=(0,N.useFieldSchema)(),D=(0,$.useMemo)(function(){return v["x-designer"]||v["x-toolbar"]?v["x-designer"]||v["x-toolbar"]:v["x-settings"]?d.Mf:M},[v]),h=(0,l.Co)(D);return W&&h||M}},9780:function(ze,te,e){"use strict";e.d(te,{w:function(){return L}});var N=e(97857),l=e.n(N),$=e(13769),d=e.n($),M=["useProps"],f=function(){return{}},L=function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v=W.useProps,D=v===void 0?f:v,h=d()(W,M),I=D;typeof D!="function"&&(I=f);var t=I();return l()(l()({},h),t)}},40868:function(ze,te,e){"use strict";e.d(te,{aUM:function(){return P.aU},olz:function(){return P.ol},N0i:function(){return P.N0},fWn:function(){return P.fW},EIK:function(){return P.EI},$Lt:function(){return P.$L},$b8:function(){return P.$b},HTy:function(){return ya},lkv:function(){return wr},rDu:function(){return Ja},eYL:function(){return P.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 P.C1},Ssf:function(){return Jl},vTp:function(){return Xl},XZJ:function(){return Yr},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 Xr.Mt},iNu:function(){return Xr.iN},zzt:function(){return jt.zz},_bl:function(){return g._b},POi:function(){return fs},AOY:function(){return pe},LBT:function(){return y.DndContext},IWB:function(){return y.DragHandler},LCt:function(){return y.DraggableContext},FyH:function(){return q.Fy},Nir:function(){return q.Ni},q8U:function(){return q.q8},HGA:function(){return q.HG},QTe:function(){return q.QT},JEX:function(){return q.JE},fAH:function(){return dl},$w$:function(){return q.$w},nBj:function(){return q.nB},Oct:function(){return q.Oc},zdw:function(){return q.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 ne},D_t:function(){return Qi.D},WiK:function(){return Vn},xJW:function(){return q.xJ},RVL:function(){return g.RV},Bc8:function(){return St},hG9:function(){return hi},DCh:function(){return fi},rjZ:function(){return qr.rj},Cqo:function(){return $a},jg7:function(){return qr.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 sa},HIW:function(){return Du},T3C:function(){return or},d97:function(){return da.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 P.x1},m1v:function(){return g.m1},glM:function(){return Vt},xZD:function(){return P.xZ},IuH:function(){return xn.Iu},MkN:function(){return P.Mk},Hof:function(){return ru},n6:function(){return g.n6},DDd:function(){return hv.D},G0E:function(){return g.G0},a$w:function(){return g.a$},TzZ:function(){return g.Tz},y00:function(){return P.y0},PhF:function(){return _t},Cqv:function(){return y.ShowFormData},cof:function(){return P.co},bts:function(){return y.Sortable},Fop:function(){return y.SortableContext},TRI:function(){return y.SortableItem},ORg:function(){return y.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 P.Fj},SLL:function(){return P.SL},sBv:function(){return P.sB},iTm:function(){return q.iT},Pls:function(){return jt.Pl},Oxq:function(){return wt},WLi:function(){return we},$9M:function(){return q.$9},nCn:function(){return za},iNG:function(){return _a},tD8:function(){return Ci},pg9:function(){return Zn},Ofb:function(){return q.Of},ibf:function(){return Xn},WyG:function(){return k},l6$:function(){return Fe.l6},WGR:function(){return An},C$H:function(){return cr.C$},cNQ:function(){return cr.cN},I9l:function(){return y.getRenderContent},XQ2:function(){return zr.XQ},ZZb:function(){return q.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 P.DU},XCj:function(){return P.XC},Vpg:function(){return gr},lIL:function(){return jt.lI},KxP:function(){return _o.K},hi9:function(){return jt.hi},p27:function(){return P.p2},z9d:function(){return cl.z},eJW:function(){return jt.eJ},Cor:function(){return jt.Co},aZq:function(){return jt.aZ},P1D:function(){return Xr.P1},ngQ:function(){return jt.ng},ett:function(){return jt.et},ySm:function(){return Bn.y},Zd$:function(){return q.Zd},cLh:function(){return jt.cL},baz:function(){return q.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 P.HS},vBu:function(){return P.vB},QYZ:function(){return P.QY},t9d:function(){return P.t9},Kgy:function(){return xn.Kg},aJ2:function(){return xn.aJ},n14:function(){return qr.n1},DiB:function(){return qr.Di},l1O:function(){return q.l1},w5o:function(){return q.w5},p3Q:function(){return q.p3},G5e:function(){return q.G5},xj2:function(){return q.xj},rxY:function(){return q.rx},Ils:function(){return cr.Il},zCB:function(){return P.zC},a4r:function(){return va.a},wNf:function(){return jt.wN},Dmu:function(){return jt.Dm},Bsl:function(){return g.Bs},yKv:function(){return Js.y},fMB:function(){return jt.fM},gCg:function(){return ka.g},eT6:function(){return q.eT},q4O:function(){return q.q4},ymE:function(){return Pa.ym},uqQ:function(){return P.uq},K5K:function(){return P.K5}});var N={};e.r(N),e.d(N,{Action:function(){return P.aU},ActionBar:function(){return P.ol},ActionBarProvider:function(){return P.N0},ActionContext:function(){return P.fW},ActionContextProvider:function(){return P.EI},ActionDesigner:function(){return P.$L},AfterSuccess:function(){return P.$b},AntdSchemaComponentPlugin:function(){return ya},AntdSchemaComponentProvider:function(){return wr},AppendsTreeSelect:function(){return Ja},AssignedFieldValues:function(){return P.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 P.C1},CardItem:function(){return Jl},Cascader:function(){return Xl},Checkbox:function(){return Yr},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 Xr.Mt},DatePickerProvider:function(){return Xr.iN},Details:function(){return fs},DetailsDesigner:function(){return pe},EditComponent:function(){return q.Fy},EditDefaultValue:function(){return q.Ni},EditDescription:function(){return q.q8},EditOperator:function(){return q.HG},EditPattern:function(){return q.QT},EditRequired:function(){return q.JE},EditSortField:function(){return dl},EditTitle:function(){return q.$w},EditTitleField:function(){return q.nB},EditTooltip:function(){return q.Oc},EditValidationRules:function(){return q.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 ne},FormDialog:function(){return Qi.D},FormField:function(){return Vn},FormItem:function(){return q.xJ},FormV2:function(){return St},G2Plot:function(){return hi},G2PlotRenderer:function(){return fi},Grid:function(){return qr.rj},GridCard:function(){return $a},GridRowContext:function(){return qr.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 sa},NanoIDInput:function(){return Du},Page:function(){return or},PagePopups:function(){return da.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 P.x1},RemoteSelect:function(){return Vt},RemoveButton:function(){return P.xZ},RemoveConditionContext:function(){return xn.Iu},RequestSettings:function(){return P.Mk},RichText:function(){return ru},SecondConFirm:function(){return P.y0},Select:function(){return _t},SkipValidation:function(){return P.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 P.Fj},actionSettings:function(){return P.SL},actionSettingsItems:function(){return P.sB},allowAddNew:function(){return q.iT},defaultFieldNames:function(){return wt},fetchTemplateData:function(){return we},filterFormItemSettings:function(){return q.$9},findByUid:function(){return za},findKeysByUid:function(){return _a},findMenuItem:function(){return Ci},formDetailsSettings:function(){return Zn},formItemSettings:function(){return q.Of},formSettings:function(){return Xn},formV1Settings:function(){return k},genStyleHook:function(){return Fe.l6},getCurrentOptions:function(){return An},getDatePickerLabels:function(){return cr.C$},getLabelFormatValue:function(){return cr.cN},getStoredPopupContext:function(){return zr.XQ},isFileCollection:function(){return q.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 P.DU},useActionContext:function(){return P.XC},useAssociationFieldModeContext:function(){return gr},useBackButton:function(){return _o.K},useCloseAction:function(){return P.p2},useColumnSchema:function(){return cl.z},useDatePickerContext:function(){return Xr.P1},useDownloadLogs:function(){return Bn.y},useEnsureOperatorsValid:function(){return q.Zd},useFieldMode:function(){return q.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 P.HS},useGetAriaLabelOfDrawer:function(){return P.vB},useGetAriaLabelOfModal:function(){return P.QY},useGetAriaLabelOfPopover:function(){return P.t9},useGetFilterFieldOptions:function(){return xn.Kg},useGetFilterOptions:function(){return xn.aJ},useGridContext:function(){return qr.n1},useGridRowContext:function(){return qr.Di},useIsAddNewForm:function(){return q.l1},useIsAssociationField:function(){return q.w5},useIsFieldReadPretty:function(){return q.p3},useIsFileField:function(){return q.G5},useIsFormReadPretty:function(){return q.xj},useIsSelectFieldMode:function(){return q.rx},useLabelUiSchema:function(){return cr.Il},useLinkageAction:function(){return P.zC},usePopupSettings:function(){return va.a},useStyles:function(){return Js.y},useTabsContext:function(){return ka.g},useTitleFieldOptions:function(){return q.eT},useValidateSchema:function(){return q.q4},useVariableScope:function(){return Pa.ym},useZIndexContext:function(){return P.uq},zIndexContext:function(){return P.K5}});var l=e(15009),$=e.n(l),d=e(99289),M=e.n(d),f=e(12444),L=e.n(f),o=e(72004),W=e.n(o),v=e(31996),D=e.n(v),h=e(26037),I=e.n(h),t=e(97857),r=e.n(t),u=e(67294),B=e(31601),y=e(14896),g=e(70993),O=e(89127),K=function(F){return M()($()().mark(function oe(){var le,se;return $()().wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return Ae.prev=0,Ae.next=3,this.api.request(F);case 3:return se=Ae.sent,Ae.abrupt("return",se==null||(le=se.data)===null||le===void 0?void 0:le.data);case 7:return Ae.prev=7,Ae.t0=Ae.catch(0),Ae.abrupt("return",[]);case 10:case"end":return Ae.stop()}},oe,this,[[0,7]])}))},P=e(76157),A=e(13769),p=e.n(A),S=e(57134),b=e(86201),i=e(80844),w=e(28459),E=e(57953),x=e(12174),c=e(6145),a=e(26386),m=e(64016),R=e(15195),T=e(23461),n=e(85893),C=["form","children"],z=["form","children","disabled"],V=["request","effects","initialValue","useValues"],G=function(F){var oe=F.form,le=F.children,se=p()(F,C),Pe=(0,i.useField)(),Ae=(0,i.useFieldSchema)(),Ve=(0,jt.lI)(oe.createVoidField(r()(r()({},Pe.props),{},{basePath:""})));return(0,n.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(i.FormContext.Provider,{value:oe,children:(0,n.jsx)(S.FormLayout,r()(r()({layout:"vertical"},se),{},{children:(0,n.jsx)(i.RecursionField,{basePath:Ve.address,schema:Ae,onlyRenderProperties:!0})}))})})},X=function(F){return F.children},U=function(F){var oe=F.form,le=F.children,se=F.disabled,Pe=p()(F,z),Ae=(0,i.useField)(),Ve=(0,i.useFieldSchema)(),ke=(0,jt.lI)(oe.createVoidField(r()(r()({},Ae.props),{},{basePath:""}))),Ye=(0,jt.Co)(Ve["x-component"],X);return(0,u.useEffect)(function(){oe.disabled=se||Ae.disabled},[se,Ae.disabled]),(0,n.jsx)(w.ZP,{componentDisabled:se,children:(0,n.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(i.FormContext.Provider,{value:oe,children:(0,n.jsx)(S.FormLayout,r()(r()({layout:"vertical"},Pe),{},{children:(0,n.jsx)(i.FieldContext.Provider,{value:ke,children:(0,n.jsx)(Ye,r()(r()({},Ae.componentProps),{},{children:(0,n.jsx)(i.RecursionField,{basePath:ke.address,schema:Ve,onlyRenderProperties:!0})}))})}))})})})},H=function(F){var oe=F.request,le=F.initialValue;return oe||function(){return Promise.resolve({data:le})}},Z=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,x.QT)(H(oe),F)},re=(0,u.createContext)(null);re.displayName="FormBlockContext";var ne=(0,i.observer)(function(Q){var F=Q.request,oe=Q.effects,le=Q.initialValue,se=Q.useValues,Pe=se===void 0?Z:se,Ae=p()(Q,V),Ve=(0,i.useFieldSchema)(),ke=(0,i.useField)(),Ye=(0,u.useMemo)(function(){return(0,b.createForm)({effects:oe})},[]),et=Pe({uid:Ve["x-uid"],onSuccess:function(rt){return M()($()().mark(function ft(){return $()().wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.next=2,Ye.reset();case 2:Ye.setValues(rt==null?void 0:rt.data),Ye.setInitialValues(rt==null?void 0:rt.data);case 4:case"end":return gt.stop()}},ft)}))()}},Q),qe=(0,u.useContext)(re);return(0,n.jsx)(re.Provider,{value:{parent:qe,form:Ye,result:et,field:ke,fieldSchema:Ve},children:(0,n.jsx)(E.Z,{spinning:(et==null?void 0:et.loading)||!1,children:Ve["x-decorator"]==="Form"?(0,n.jsx)(U,r()({form:Ye},Ae)):(0,n.jsx)(G,r()({form:Ye},Ae))})})},{displayName:"Form"});ne.Designer=function(){var F=(0,c.useCollection_deprecated)(),oe=F.name,le=F.title,se=(0,R.zy)(),Pe=(0,T.rE)(),Ae=Pe.componentNamePrefix;return(0,n.jsxs)(a.aN,{template:se,title:le||oe,children:[(0,n.jsx)(m.G,{componentName:"".concat(Ae,"Form"),collectionName:oe}),(0,n.jsx)(a.Z5,{}),(0,n.jsx)(a.qx,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};var J=e(5537),k=new J.F5({name:"FormV1Settings",items:[{name:"template",Component:m.G,useComponentProps:function(){var F=(0,c.useCollection_deprecated)(),oe=F.name,le=(0,T.rE)(),se=le.componentNamePrefix;return{componentName:"".concat(se,"Form"),collectionName:oe}}},{name:"divider",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),q=e(54801),Se=function(){var F=(0,c.useCollection_deprecated)(),oe=F.name,le=F.title,se=(0,R.zy)();return(0,n.jsx)(a.aN,{schemaSettings:"FormSettings",template:se,title:le||oe})},ee=function(){var F=(0,c.useCollection_deprecated)(),oe=F.name,le=F.title,se=(0,R.zy)();return(0,n.jsx)(a.aN,{schemaSettings:"ReadPrettyFormSettings",template:se,title:le||oe})},pe=function(){var F=(0,c.useCollection_deprecated)(),oe=F.name,le=F.title,se=(0,R.zy)();return(0,n.jsx)(a.aN,{schemaSettings:"FormDetailsSettings",template:se,title:le||oe})},xe=function(){var F=(0,c.useCollection_deprecated)(),oe=F.name,le=F.title,se=(0,R.zy)();return(0,n.jsx)(a.aN,{schemaSettings:"blockSettings:filterForm",template:se,title:le||oe})},je=e(7340),Ce=e(15503),Oe=e(68230),De=e(68400),ce=e.n(De),ae=e(97133),ge=e(84327),ue=e(9361),fe=e(31019),_e=e(22229),ye=e(43321),Re=e(8281),Be=e(9780),Te=e(18686),be=e(94804),ve=e(5574),de=e.n(ve),Y=e(68433),j=e(42075),me=e(34041),he=e(96486),ie=e.n(he),Ee=e(26793),Ie=e(32268),Fe=e(60094),Ne=e(9783),Ke=e.n(Ne),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),Kt=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(Q,F){var oe=[];if(!Array.isArray(Q))return oe;for(var le=0;le<Q.length;le++){var se=Q[le][F.options];Array.isArray(se)&&oe.push.apply(oe,Tt()(en(se,F))),oe.push(r()({},Q[le]))}return oe}function An(Q,F,oe){var le=en(F,oe),se=(0,he.castArray)(Q).map(function(Ae){return(0,Y.isPlainObject)(Ae)?Ae[oe.value]:Ae});function Pe(Ae){if(!Ae)return[];var Ve=[],ke=Rt()(se),Ye;try{var et=function(){var bt=Ye.value,rt=Ae.find(function(ft){return ft[oe.value]==bt})||{value:bt,label:bt&&bt.toString()};Ve.push(rt)};for(ke.s();!(Ye=ke.n()).done;)et()}catch(qe){ke.e(qe)}finally{ke.f()}return Ve}return Pe(le)}var Wn=e(67668),Nn=(0,i.observer)(function(Q){var F,oe=r()(r()({},wt),Q.fieldNames),le=(0,i.useField)(),se=(0,Wn.Hy)(),Pe=le.dataSource||Q.options||(se==null?void 0:se.uiSchema.enum)||[],Ae=An(le.value,Pe,oe);return!(0,ge.isValid)(Q.value)&&!Ae.length?(0,n.jsx)("div",{}):(0,b.isArrayField)(le)&&(le==null||(F=le.value)===null||F===void 0?void 0:F.length)===0?(0,n.jsx)("div",{}):(0,n.jsx)("div",{children:(0,n.jsx)(Lt.B,{ellipsis:Q.ellipsis,children:Ae.map(function(Ve,ke){return(0,n.jsx)(Ue.Z,{color:Ve[oe.color],icon:Ve.icon,children:Ve[oe.label]},ke)})})})},{displayName:"ReadPretty"}),oo=["value","options","onChange","fieldNames","mode","loading","rawOptions","defaultValue"],Yn=["objectValue","loading","value","rawOptions","defaultValue"],$n=function(F){return!(0,ge.isValid)(F)||He()(F)==="object"&&Object.keys(F).length===0},Gn=function(F){var oe=F.value,le=F.options,se=F.onChange,Pe=F.fieldNames,Ae=F.mode,Ve=F.loading,ke=F.rawOptions,Ye=F.defaultValue,et=p()(F,oo),qe=function(rt){var ft;if(!$n(rt)){var ht=(0,ge.toArr)(rt).filter(function(It){return It}).map(function(It){return(0,Y.isPlainObject)(It)?It[Pe.value]:It}),gt=(ft=An(ht,le,Pe))===null||ft===void 0?void 0:ft.map(function(It){return{label:It[Pe.label],value:It[Pe.value]}});return["tags","multiple"].includes(Ae)||F.multiple?gt:gt.shift()}};return(0,n.jsx)(me.default,r()({role:"button","data-testid":"select-object-".concat(Ae||"single"),value:qe(oe),defaultValue:qe(Ye),allowClear:{clearIcon:(0,n.jsx)(an.Z,{role:"button","aria-label":"icon-close-select"})},labelInValue:!0,notFoundContent:Ve?(0,n.jsx)(E.Z,{}):(0,n.jsx)(Kt.Z,{image:Kt.Z.PRESENTED_IMAGE_SIMPLE}),options:le,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,ge.toArr)(rt).map(function(ht){return ht.value}),ke||le,Pe);["tags","multiple"].includes(Ae)||F.multiple?se==null||se(ft):se==null||se(ft.shift()||null)},mode:Ae,tagRender:function(rt){return(0,n.jsx)(Ue.Z,r()(r()({role:"button","aria-label":rt.label,closeIcon:(0,n.jsx)(Ct.Z,{role:"button","aria-label":"icon-close-tag"})},rt),{},{children:rt.label}))}},et))},hn=function(F,oe){var le;return((le=oe==null?void 0:oe.label)!==null&&le!==void 0?le:"").toLowerCase().includes((F||"").toLowerCase())},Ft=(0,i.connect)(function(Q){var F=Q.objectValue,oe=Q.loading,le=Q.value,se=Q.rawOptions,Pe=Q.defaultValue,Ae=p()(Q,Yn),Ve=Q.multiple?"multiple":Q.mode;if(Ve&&!["multiple","tags"].includes(Ve)&&(Ve=void 0),F)return(0,n.jsx)(Gn,r()(r()({rawOptions:se},Ae),{},{defaultValue:Pe,value:le,mode:Ve,loading:oe}));var ke=function(et){return["tags","multiple"].includes(Q.mode)||Q.multiple?et?(0,ge.toArr)(et):void 0:et};return(0,n.jsx)(me.default,r()(r()({role:"button","data-testid":"select-".concat(Ve||"single"),showSearch:!0,filterOption:hn,allowClear:{clearIcon:(0,n.jsx)(an.Z,{role:"button","aria-label":"icon-close-select"})},popupMatchSelectWidth:!1,notFoundContent:oe?(0,n.jsx)(E.Z,{}):(0,n.jsx)(Kt.Z,{image:Kt.Z.PRESENTED_IMAGE_SIMPLE}),value:ke(le),defaultValue:ke(Pe),tagRender:function(et){return(0,n.jsx)(Ue.Z,r()(r()({role:"button","aria-label":et.label,closeIcon:(0,n.jsx)(Ct.Z,{role:"button","aria-label":"icon-close-tag"})},et),{},{children:et.label}))}},Ae),{},{onChange:function(et){var qe;(qe=Q.onChange)===null||qe===void 0||qe.call(Q,et===void 0?null:et)},mode:Ve}))},(0,i.mapProps)({dataSource:"options"},function(Q,F){return r()(r()({},Q),{},{fieldNames:r()(r()({},wt),Q.fieldNames),suffixIcon:F!=null&&F.loading||F!=null&&F.validating?(0,n.jsx)(st.Z,{}):Q.suffixIcon})}),(0,i.mapReadPretty)(Nn)),_t=Ft;_t.ReadPretty=Nn;var Pt=_t,Nt=e(36586),kt=function(F,oe){return(0,he.castArray)(F).filter(function(le){return le!=null}).map(function(le){return He()(le)==="object"?le[oe.value]:le})},Xt=(0,i.observer)(function(Q){var F=r()(r()({},wt),Q.fieldNames),oe=(0,i.useField)(),le=(0,i.useFieldSchema)(),se=(0,Nt.a)(),Pe=(0,P.XC)(),Ae=Pe.snapshot,Ve=(0,x.QT)(Ae?M()($()().mark(function Ye(){return $()().wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return qe.abrupt("return",{data:se[le.name]});case 1:case"end":return qe.stop()}},Ye)})):r()(r()({action:"list"},Q.service),{},{params:{paginate:!1,filter:Ke()({},F.value,{$in:kt(oe.value,F)})}}),{refreshDeps:[Q.service,oe.value]}),ke=Ve.data;return(0,n.jsx)(_t.ReadPretty,r()(r()({},Q),{},{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(Q){var F,oe,le=Q.fieldNames,se=le===void 0?{}:le,Pe=Q.service,Ae=Pe===void 0?{}:Pe,Ve=Q.wait,ke=Ve===void 0?300:Ve,Ye=Q.value,et=Q.defaultValue,qe=Q.objectValue,bt=Q.manual,rt=bt===void 0?!0:bt,ft=Q.mapOptions,ht=Q.targetField,gt=Q.CustomDropdownRender,It=Q.optionFilter,Wt=Q.dataSource,mn=p()(Q,dn),Qt=(0,yn.FC)(),zn=(0,zt.FE)(Wt||Qt),jn=(0,u.useState)(!1),tn=de()(jn,2),fn=tn[0],Ln=tn[1],In=(0,u.useRef)(!1),Dn=(0,i.useFieldSchema)(),Mn=((F=Dn["x-component-props"])===null||F===void 0?void 0:F.addMode)==="quickAdd",On=(0,c.useCollection_deprecated)(),En=On.getField,Co=(0,u.useRef)(null),Po=(0,c.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)&&(se==null?void 0:se.label)&&yo("".concat(Un.target,".").concat(se.label)),Qn=(0,u.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,u.useCallback)(function(nr){try{return nr.filter(function(Ho){return["number","string"].includes(He()(Ho[se.value]))}).map(function(Ho){var fr,Pr,rr=vo(Ho[se.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,n.jsx)(Ue.Z,{role:"button",color:Kr.color,style:{marginRight:3},children:(Kr==null?void 0:Kr.label)||Dr},Jr):(0,n.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,n.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={},Ke()(Ur,se.label,rr||nn),Ke()(Ur,se.value,Ho[se.value]),Ur))}return r()(r()({},Ho),{},(Pr={},Ke()(Pr,se.label,rr||nn),Ke()(Pr,se.value,Ho[se.value]),Pr))}).filter(Boolean)}catch(Ho){return console.error(Ho),nr}},[Rn==null?void 0:Rn.uiSchema,se]),no=(0,x.QT)(r()(r()({action:"list"},Ae),{},{headers:zn,params:r()(r()({pageSize:200},Ae==null?void 0:Ae.params),{},{filter:Ae==null||(oe=Ae.params)===null||oe===void 0?void 0:oe.filter})}),{manual:rt,debounceWait:ke}),co=no.data,po=no.run,Io=no.loading,No=(0,u.useMemo)(function(){return JSON.stringify({service:Ae,fieldNames:se})},[Ae,se]),Mo=(0,u.useCallback)(function(){return Co.current&>?(0,n.jsx)(gt,{search:Co.current,callBack:function(){Co.current=null,Ln(!1)}}):null},[Co.current]);(0,u.useEffect)(function(){In.current&&po()},[No]);var $o=function(){var nr=M()($()().mark(function Ho(fr){var Pr;return $()().wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:po({filter:(0,Zt.EO)([fr?Ke()({},se.label,Ke()({},Qn,fr)):{},Ae==null||(Pr=Ae.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,u.useMemo)(function(){var nr,Ho=Ye||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),{},Ke()({},se.value,Ho[se.value]||Ho))])||[],Pr=typeof It=="function"?co.data.filter(It):co.data;return(0,he.uniqBy)(Pr.concat(fr!=null?fr:[]),se.value)},[Ye,et,co==null?void 0:co.data,se.value,It]),sr=function(Ho){Ln(Ho),Co.current=null,Ho&&po(),In.current=!0};return(0,n.jsx)(_t,r()(r()({open:fn,popupMatchSelectWidth:!1,autoClearSearchValue:!0,filterOption:!1,filterSort:null,fieldNames:se,onSearch:$o,onDropdownVisibleChange:sr,objectValue:qe,value:Ye,defaultValue:et},mn),{},{loading:co?Io:!0,options:wn(pr),rawOptions:pr,dropdownRender:function(Ho){var fr=pr.some(function(Pr){return Pr[se.label]===Co.current});return(0,n.jsx)(n.Fragment,{children:Mn?(0,n.jsxs)(n.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,n.jsx)(Mt.Z,{style:{margin:0}}),!fr&&(0,n.jsx)(Mo,{})]}):Ho})}}))},(0,i.mapProps)({dataSource:"options"},function(Q,F){var oe,le=(0,i.useFieldSchema)();return r()(r()({},Q),{},{fieldNames:r()(r()(r()(r()({},wt),Q.fieldNames),F.componentProps.fieldNames),(oe=le["x-component-props"])===null||oe===void 0?void 0:oe.fieldNames),suffixIcon:F!=null&&F.loading||F!=null&&F.validating?(0,n.jsx)(st.Z,{}):Q.suffixIcon})}),(0,i.mapReadPretty)(Xt)),Vt=bn;Vt.ReadPretty=Xt;var dt=null,tt=function(){var F=(0,i.useFieldSchema)(),oe=(0,Ee.$)(),le=oe.t,se=(0,je.bz)(),Pe=se.duplicateData,Ae=(0,c.useCollectionManager_deprecated)(),Ve=Ae.getCollectionJoinField;if(Pe)return Pe;var ke=Bt(F),Ye=ke.items,et=Ye===void 0?[]:Ye,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 Wt=Ve("".concat(ht.collection,".").concat(It));return Wt?It:""}).filter(Boolean)}catch(It){(0,Y.error)(It),ht.fields=[]}});var rt=[{key:"none",title:le("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(F){var oe=F.style,le=oe===void 0?{}:oe,se=F.form,Pe=(0,Fe.dQ)(),Ae=Pe.token,Ve=tt(),ke=Ve.templates,Ye=Ve.display,et=Ve.enabled,qe=Ve.defaultTemplate,bt=(0,c.useCollectionManager_deprecated)(),rt=bt.getCollectionJoinField,ft=(0,Ie.ss)(ke),ht=(0,u.useState)((qe==null?void 0:qe.key)||"none"),gt=de()(ht,2),It=gt[0],Wt=gt[1],mn=(0,u.useState)(null),Qt=de()(mn,2),zn=Qt[0],jn=Qt[1],tn=(0,x.LY)(),fn=(0,Ee.$)(),Ln=fn.t;(0,u.useEffect)(function(){et&&qe&&se&&(se.__template=!0,qe.key==="duplicate"&&On(qe.dataId,qe))},[]),(0,u.useEffect)(function(){ft!=null&&ft.some(function(Co){return Co.key===It})||Mn("none")},[ft]);var In=(0,u.useMemo)(function(){return r()({display:"flex",alignItems:"center",backgroundColor:Ae.colorFillAlter,padding:Ae.padding},le)},[le,Ae.colorFillAlter]),Dn=(0,u.useMemo)(function(){return{fontSize:Ae.fontSize,fontWeight:"bold",whiteSpace:"nowrap",marginRight:Ae.marginXS}},[Ae.fontSize,Ae.marginXS]),Mn=(0,u.useCallback)(function(){var Co=M()($()().mark(function Po(yo){return $()().wrap(function(so){for(;;)switch(so.prev=so.next){case 0:Wt(yo),jn(null),se==null||se.reset();case 3:case"end":return so.stop()}},Po)}));return function(Po){return Co.apply(this,arguments)}}(),[]),On=(0,u.useCallback)(function(){var Co=M()($()().mark(function Po(yo,ro){var so;return $()().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 se&&Qn&&(se.reset(),se.__template=!0,(0,Y.forEach)(Qn,function(vo,wn){if(vo){var no;se.values[wn]=vo,se==null||(no=se.setInitialValuesIn)===null||no===void 0||no.call(se,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||!Ye)return null;var En=ft==null?void 0:ft.find(function(Co){return Co.key===It});return(0,n.jsx)("div",{style:In,children:(0,n.jsxs)(j.Z,{wrap:!0,children:[(0,n.jsxs)("label",{style:Dn,children:[Ln("Data template"),": "]}),(0,n.jsx)(me.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,n.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(Q){var F=(0,je.Fi)(Q);return F?ie().cloneDeep(F["x-data-templates"])||{}:{}}function we(Q,F,oe){return Me.apply(this,arguments)}function Me(){return Me=M()($()().mark(function Q(F,oe,le){return $()().wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if(!(oe.fields.length===0||!oe.dataId)){Pe.next=2;break}return Pe.abrupt("return");case 2:return Pe.abrupt("return",F.resource(oe.collection).get({filterByTk:oe.dataId,fields:oe.fields,isTemplate:!0}).then(function(Ae){var Ve;return(Ve=Ae.data)===null||Ve===void 0?void 0:Ve.data}));case 3:case"end":return Pe.stop()}},Q)})),Me.apply(this,arguments)}var Le=e(3192),Ze=function(){var F,oe,le=(0,Te.aZ)(),se=(0,i.useFieldSchema)(),Pe=ue.Z.useToken(),Ae=Pe.token,Ve=(0,jt.ng)(),ke=Ve.designable,Ye=(0,Le.g)()||{},et=Ye.heightProps,qe=et||{},bt=qe.title,rt=tt(),ft=rt.display,ht=rt.enabled,gt=se.reduceProperties(function(On,En){return En["x-component"]==="ActionBar"?En:On}),It=Object.keys((gt==null?void 0:gt.properties)||{}).length>0,Wt=se==null||(F=se.parent)===null||F===void 0||(F=F["x-decorator"])===null||F===void 0||(oe=F.includes)===null||oe===void 0?void 0:oe.call(F,"FormBlockProvider"),mn=It||ke?Ae.controlHeight+(Wt?1:2)*Ae.marginLG:Ae.marginLG,Qt=bt?Ae.fontSizeLG*Ae.lineHeightLG+Ae.padding*2-1:0,zn=(0,be.hS)()||{},jn=zn.data,tn=(jn==null?void 0:jn.meta)||{},fn=tn.count,Ln=tn.pageSize,In=fn>Ln,Dn=In?Ae.controlHeightSM+1*Ae.paddingLG:0,Mn=ft&&ht?Ae.controlHeight+2*Ae.padding+Ae.margin:0;return le-mn-Ae.paddingLG-Qt-Dn-Mn},Xe,it,ut=["form","children"],xt=["form","children","disabled"],mt=["form","disabled"],ot=function(F){var oe=F.form,le=F.children,se=p()(F,ut),Pe=(0,i.useField)(),Ae=(0,i.useFieldSchema)(),Ve=(0,jt.lI)(oe.createVoidField(r()(r()({},Pe.props),{},{basePath:""}))),ke=Ze(),Ye=ue.Z.useToken(),et=Ye.token,qe=(0,jt.ng)(),bt=qe.designable;return(0,n.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(i.FormContext.Provider,{value:oe,children:(0,n.jsx)(S.FormLayout,r()(r()({layout:"vertical"},se),{},{children:(0,n.jsx)("div",{className:(0,ae.css)(Xe||(Xe=ce()([`
|
|
688
|
+
`]))))}));return(0,H.jsx)(Y.BQs,{ellipsis:!0,popoverContent:$n,children:$n})};var Yt=(0,l.createContext)([]);Yt.displayName="VariableScopeContext";function pn(Ct){var Kt=Ct.scope,Lt=Kt===void 0?[]:Kt,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,N.connect)(Ce),jt.TextArea=(0,N.connect)(st,(0,N.mapReadPretty)(st.ReadPretty)),jt.RawTextArea=(0,N.connect)(ye),jt.JSON=(0,N.connect)(Be);var an=null},88969:function(ze,te,e){"use strict";e.d(te,{m:function(){return O}});var N=e(15009),l=e.n(N),$=e(19632),d=e.n($),M=e(99289),f=e.n(M),L=e(5574),o=e.n(L),W=e(97133),v=e(38089),D=e(67294),h=e(26793),I=e(60094),t=e(9783),r=e.n(t),u=(0,I.l6)("nb-variable-select",function(K){var P=K.componentCls;return r()({},P,{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}}})}),B=u,y=e(2876),g=e(85893);function O(K){var P=K.options,A=K.setOptions,p=K.onInsert,S=K.changeOnSelect,b=S===void 0?!1:S,i=K.fieldNames,w=i===void 0?{}:i,E=K.className,x=(0,h.$)(),c=x.t,a=(0,D.useState)([]),m=o()(a,2),R=m[0],T=m[1],n=B(),C=n.wrapSSR,z=n.componentCls,V=n.hashId,G=(0,I.dQ)(),X=G.token;function U(Z){return H.apply(this,arguments)}function H(){return H=f()(l()().mark(function Z(re){var ne,J;return l()().wrap(function(q){for(;;)switch(q.prev=q.next){case 0:if(J=re[re.length-1],!(!((ne=J.children)!==null&&ne!==void 0&&ne.length)&&!J.isLeaf&&J.loadChildren)){q.next=5;break}return q.next=4,J.loadChildren(J);case 4:A(function(Se){return d()(Se)});case 5:case"end":return q.stop()}},Z)})),H.apply(this,arguments)}return C((0,g.jsx)(y.R,{className:(0,W.cx)("x-button",z,V,E),children:(0,g.jsx)(v.Z,{placeholder:c("Select a variable"),value:[],options:P,fieldNames:w,loadData:U,onChange:function(){var re,ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];if(T(ne),!!ne.length){var k=J[J.length-1];(!(k!=null&&(re=k.children)!==null&&re!==void 0&&re.length)&&!(k!=null&&k.loadChildren)||k!=null&&k.isLeaf)&&p(ne)}},changeOnSelect:b,onClick:function(re){if(!(re.detail!==2||!b))for(var ne=re.target;ne&&ne!==re.currentTarget;ne=ne.parentNode){var J;Array.from((J=ne.classList)!==null&&J!==void 0?J:[]).includes("ant-cascader-menu-item")&&p(R)}},popupClassName:"Cascader-popupClassName",dropdownRender:b?function(Z){return(0,g.jsxs)(g.Fragment,{children:[Z,(0,g.jsx)("div",{style:{padding:"0.5em",borderTop:"1px solid ".concat(X.colorBorder),color:X.colorTextDescription},children:c("Double click to choose entire object")})]})}:null})}))}},2876:function(ze,te,e){"use strict";e.d(te,{R:function(){return f}});var N=e(97857),l=e.n(N),$=e(15867),d=e(67294),M=e(85893),f=(0,d.forwardRef)(function(L,o){var W=(0,d.useMemo)(function(){return{fontStyle:"italic",fontFamily:"New York, Times New Roman, Times, serif"}},[]);return(0,M.jsxs)($.ZP,l()(l()({"aria-label":"variable-button",ref:o,style:W},L),{},{children:["x",L.children]}))});f.displayName="XButton"},72724:function(ze,te,e){"use strict";e.d(te,{L:function(){return I}});var N=e(97857),l=e.n(N),$=e(5574),d=e.n($),M=e(94697),f=e(80844),L=e(67294),o=e(26793),W=e(21143),v=e(84577),D=e(85893),h=function(r){var u=(0,v.ng)(),B=u.refresh,y=(0,W.useAPIClient)(),g=(0,o.$)(),O=g.t;return(0,L.useCallback)(function(K){var P,A,p,S,b,i,w,E,x=K.active,c=K.over,a=x==null||(P=x.data)===null||P===void 0||(P=P.current)===null||P===void 0?void 0:P.schema,m=c==null||(A=c.data)===null||A===void 0||(A=A.current)===null||A===void 0?void 0:A.schema,R=c==null||(p=c.data)===null||p===void 0||(p=p.current)===null||p===void 0?void 0:p.insertAdjacent,T=c==null||(S=c.data)===null||S===void 0||(S=S.current)===null||S===void 0?void 0:S.breakRemoveOn,n=c==null||(b=c.data)===null||b===void 0||(b=b.current)===null||b===void 0?void 0:b.wrapSchema,C=c==null||(i=c.data)===null||i===void 0||(i=i.current)===null||i===void 0?void 0:i.onSuccess,z=(w=c==null||(E=c.data)===null||E===void 0||(E=E.current)===null||E===void 0?void 0:E.removeParentsIfNoChildren)!==null&&w!==void 0?w:!0;if(!a||!m){r==null||r(K);return}if(a===m){r==null||r(K);return}if(a.parent===m&&R==="beforeEnd"){r==null||r(K);return}var V=(0,v.Pl)({t:O,api:y,refresh:B,current:m});if(V.loadAPIClientEvents(),a.parent===m.parent){V.insertBeforeBeginOrAfterEnd(a),r==null||r(K);return}if(R){V.insertAdjacent(R,a,{wrap:n,breakRemoveOn:T,removeParentsIfNoChildren:z,onSuccess:C}),r==null||r(K);return}},[r])},I=(0,f.observer)(function(t){var r=(0,o.$)(),u=r.t,B=(0,L.useState)(!0),y=d()(B,2),g=y[0],O=y[1],K=(0,L.useCallback)(function(A){var p,S=A.active,b=S==null||(p=S.data)===null||p===void 0||(p=p.current)===null||p===void 0?void 0:p.schema;if(O(!!b),t!=null&&t.onDragStart){var i;t==null||(i=t.onDragStart)===null||i===void 0||i.call(t,A)}},[t==null?void 0:t.onDragStart]),P=h(t==null?void 0:t.onDragEnd);return(0,D.jsxs)(M.DndContext,l()(l()({collisionDetection:M.rectIntersection},t),{},{onDragStart:K,onDragEnd:P,children:[(0,D.jsx)(M.DragOverlay,{dropAnimation:{duration:10,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:g&&(0,D.jsx)("span",{style:{whiteSpace:"nowrap"},children:u("Dragging")})}),t.children]}))},{displayName:"DndContext"})},14896:function(ze,te,e){"use strict";e.r(te),e.d(te,{DndContext:function(){return N.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 L.I9}});var N=e(72724),l=e(20493),$=e(67294),d=e(80844),M=e(85893),f=(0,d.observer)(function(o){var W=o.children,v=(0,d.useForm)();return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)("pre",{style:{marginBottom:20},"data-testid":"form-data",children:JSON.stringify(v.values,null,2)}),W]})}),L=e(34588)},20493:function(ze,te,e){"use strict";e.d(te,{IW:function(){return K},LC:function(){return t},bt:function(){return B},Fo:function(){return r},TR:function(){return O},OR:function(){return u}});var N=e(97857),l=e.n(N),$=e(13769),d=e.n($),M=e(10274),f=e(94697),L=e(97133),o=e(80844),W=e(67294),v=e(60094),D=e(85893),h=["component","overStyle","style","children","openMode"],I=["schema","id","eid","removeParentsIfNoChildren"],t=(0,W.createContext)(null);t.displayName="DraggableContext";var r=(0,W.createContext)(null);r.displayName="SortableContext";var u=function(A){var p=A.id,S=A.data,b=A.children,i=(0,f.useDraggable)({id:p,data:S}),w=(0,f.useDroppable)({id:p,data:S});return(0,D.jsx)(r.Provider,{value:{draggable:i,droppable:w},children:b})},B=function(A){var p,S,b=A.component,i=A.overStyle,w=A.style,E=A.children,x=A.openMode,c=d()(A,h),a=(0,v.dQ)(),m=a.token,R=(0,W.useContext)(r),T=R.draggable,n=R.droppable,C=n.isOver,z=n.setNodeRef,V=l()({},w);return C&&(T==null||(p=T.active)===null||p===void 0?void 0:p.id)!==(n==null||(S=n.over)===null||S===void 0?void 0:S.id)&&(V[b==="a"?"color":"background"]=new M.C(m.colorSettings).setAlpha(.15).toHex8String(),Object.assign(V,i)),W.createElement(b||"div",l()(l()({role:"none"},c),{},{className:(0,L.cx)("nb-sortable-designer",A.className),ref:z,style:V}),E)},y=function(A){var p=g(A),S=(0,o.useFieldSchema)();return A.schema?l()(l()({},A),{},{id:p}):l()(l()({},A),{},{id:p,schema:S})},g=function(A){var p=(0,o.useField)();return A.id?A.id:p.address.toString()},O=(0,o.observer)(function(P){var A=y(P),p=A.schema,S=A.id,b=A.eid,i=A.removeParentsIfNoChildren,w=d()(A,I),E=(0,W.useMemo)(function(){return{insertAdjacent:"afterEnd",schema:p,removeParentsIfNoChildren:i!=null?i:!0}},[p,i]);return(0,D.jsx)(u,{id:S,data:E,children:(0,D.jsx)(B,l()(l()({id:b},w),{},{children:P.children}))})},{displayName:"SortableItem"}),K=function(A){var p=(0,W.useContext)(r),S=p.draggable,b=S.attributes,i=S.listeners,w=S.setNodeRef;return(0,D.jsx)("div",{style:{display:"inline-block",width:14,height:14,lineHeight:"14px",textAlign:"left"},children:(0,D.jsx)("div",l()(l()(l()({ref:w,style:{position:"relative",zIndex:1,lineHeight:0,fontSize:0,display:"inline-block"}},i),b),{},{role:"none",children:(0,D.jsx)("span",{style:{cursor:"move",fontSize:14},children:A.children})}))})}},34588:function(ze,te,e){"use strict";e.d(te,{jC:function(){return i},od:function(){return p},I9:function(){return x},Rq:function(){return S},e7:function(){return A}});var N=e(97857),l=e.n(N),$=e(15009),d=e.n($),M=e(9783),f=e.n(M),L=e(5574),o=e.n(L),W=e(99289),v=e.n(W),D=e(52677),h=e.n(D),I=e(96750),t=e.n(I),r=e(96486),u=e.n(r),B=e(10097),y=e(76690),g=e(65565),O=e(27484),K=e.n(O);function P(){"use strict";Array.isArray||(Array.isArray=function(n){return Object.prototype.toString.call(n)==="[object Array]"});function a(n){for(var C=[],z=0,V=n.length;z<V;z++)C.indexOf(n[z])===-1&&C.push(n[z]);return C}function m(n,C){return JSON.stringify(n)===JSON.stringify(C)}var R={},T={$is:function(C,z){return C===z},$match:function(C,z){return Array.isArray(C)&&Array.isArray(z)&&C.some(function(V){return Array.isArray(V)})?C.some(function(V){return(V==null?void 0:V.length)===z.length&&(V==null?void 0:V.every(function(G,X){return G===z[X]}))}):JSON.stringify(C)===JSON.stringify(z)},$eq:function(C,z){return Array.isArray(C)&&Array.isArray(z)?m(C,z):Array.isArray(C)?C.includes(z):C==z},$ne:function(C,z){return C!=z},"!==":function(C,z){return C!==z},$gt:function(C,z){return Array.isArray(C)?C.some(function(V){return V>z}):C>z},$gte:function(C,z){return C>=z},$lt:function(C,z,V){return Array.isArray(C)?C.some(function(G){return G<z}):V===void 0?C<z:C<z&&z<V},$lte:function(C,z,V){return V===void 0?C<=z:C<=z&&z<=V},$exists:function(C){return R.truthy(C)},$notEmpty:function(C){return R.truthy(C)},$empty:function(C){return Array.isArray(C)?C.some(function(z){return!R.truthy(z)}):!R.truthy(C)},$notExists:function(C){return!R.truthy(C)},"%":function(C,z){return C%z},log:function(C){return console.log(C),C},$in:function(C,z){return!z||typeof z.indexOf=="undefined"?!1:Array.isArray(C)&&Array.isArray(z)?z.some(function(V){return C.includes(V)}):z.indexOf(C)!==-1},$notIn:function(C,z){return!z||typeof z.indexOf=="undefined"?!1:z.indexOf(C)===-1},$includes:function(C,z){return!C||typeof C.indexOf=="undefined"?!1:Array.isArray(C)?C.some(function(V){return V==null?void 0:V.includes(z)}):C.indexOf(z)!==-1},$notIncludes:function(C,z){return Array.isArray(C)?!C.some(function(V){return(V||"").includes(z)}):(C=C||"",!C.includes(z))},$anyOf:function(C,z){return C.length===0?!1:Array.isArray(C)&&Array.isArray(z)&&C.some(function(V){return Array.isArray(V)})?C.some(function(V){return V.some(function(G){return z.includes(G)})}):C.some(function(V){return z.includes(V)})},$noneOf:function(C,z){return!C||(C==null?void 0:C.length)===0?!0:Array.isArray(C)&&Array.isArray(z)&&C.some(function(V){return Array.isArray(V)})?C.some(function(V){return V.every(function(G){return!z.some(function(X){return G.includes(X)})})}):z.some(function(V){return!C.includes(V)})},$notMatch:function(C,z){if(C.length!==z.length)return!0;for(var V=0;V<C.length;V++)if(C[V]!==z[V])return!0;return!1},$dateOn:function(C,z){return!C||!z?!1:(Array.isArray(C)||(C=[C,C]),Array.isArray(z)||(z=[z,z]),C=C.map(function(V){return K()(V)}),z=z.map(function(V){return K()(V)}),C[0].isBetween(z[0],z[1],null,"[]")&&C[1].isBetween(z[0],z[1],null,"[]"))},$dateBefore:function(C,z){return!C||!z?!1:(Array.isArray(C)||(C=[C,C]),Array.isArray(z)||(z=[z,z]),C=C.map(function(V){return K()(V)}),z=z.map(function(V){return K()(V)}),C[0].isBefore(z[0])&&C[1].isBefore(z[0]))},$dateNotBefore:function(C,z){return!T.$dateBefore(C,z)},$dateAfter:function(C,z){return!C||!z?!1:(Array.isArray(C)||(C=[C,C]),Array.isArray(z)||(z=[z,z]),C=C.map(function(V){return K()(V)}),z=z.map(function(V){return K()(V)}),C[0].isAfter(z[1])&&C[1].isAfter(z[1]))},$dateNotAfter:function(C,z){return!T.$dateAfter(C,z)},$dateBetween:function(C,z){return T.$dateOn(C,z)},$dateNotOn:function(C,z){return!T.$dateOn(C,z)},$isTruly:function(C){return Array.isArray(C)?C.some(function(z){return z===!0||z===1}):C===!0||C===1},$isFalsy:function(C){return Array.isArray(C)?C.some(function(z){return!R.truthy(z)}):!R.truthy(C)},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(C,z,V){if(V<0){var G=String(C).substr(z);return G.substr(0,G.length+V)}return String(C).substr(z,V)},"+":function(){return Array.prototype.reduce.call(arguments,function(C,z){return parseFloat(C,10)+parseFloat(z,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(C,z){return parseFloat(C,10)*parseFloat(z,10)})},"-":function(C,z){return z===void 0?-C:C-z},"/":function(C,z){return C/z},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(C,z){return C.concat(z)},[])},var:function(C,z){var V=z===void 0?null:z,G=this;if(typeof C=="undefined"||C===""||C===null)return G;for(var X=String(C).split("."),U=0;U<X.length;U++)if(G==null||(G=G[X[U]],G===void 0))return V;return G},missing:function(){for(var C=[],z=Array.isArray(arguments[0])?arguments[0]:arguments,V=0;V<z.length;V++){var G=z[V],X=R.apply({var:G},this);(X===null||X==="")&&C.push(G)}return C},missing_some:function(C,z){var V=R.apply({missing:z},this);return z.length-V.length>=C?[]:V}};return R.is_logic=function(n){return h()(n)==="object"&&n!==null&&!Array.isArray(n)&&Object.keys(n).length===1},R.truthy=function(n){return Array.isArray(n)&&n.length===0?!1:!!n},R.get_operator=function(n){return Object.keys(n)[0]},R.get_values=function(n){return n[R.get_operator(n)]},R.apply=function(n,C){if(Array.isArray(n))return n.map(function(J){return R.apply(J,C)});if(!R.is_logic(n))return n;var z=R.get_operator(n),V=n[z],G,X,U,H,Z;if(Array.isArray(V)||(V=[V]),z==="if"||z=="?:"){for(G=0;G<V.length-1;G+=2)if(R.truthy(R.apply(V[G],C)))return R.apply(V[G+1],C);return V.length===G+1?R.apply(V[G],C):null}else if(z==="$and"){for(G=0;G<V.length;G+=1)if(X=R.apply(V[G],C),!R.truthy(X))return X;return X}else if(z==="or"){for(G=0;G<V.length;G+=1)if(X=R.apply(V[G],C),R.truthy(X))return X;return X}else{if(z==="filter")return H=R.apply(V[0],C),U=V[1],Array.isArray(H)?H.filter(function(J){return R.truthy(R.apply(U,J))}):[];if(z==="map")return H=R.apply(V[0],C),U=V[1],Array.isArray(H)?H.map(function(J){return R.apply(U,J)}):[];if(z==="reduce")return H=R.apply(V[0],C),U=V[1],Z=typeof V[2]!="undefined"?V[2]:null,Array.isArray(H)?H.reduce(function(J,k){return R.apply(U,{current:k,accumulator:J})},Z):Z;if(z==="all"){if(H=R.apply(V[0],C),U=V[1],!Array.isArray(H)||!H.length)return!1;for(G=0;G<H.length;G+=1)if(!R.truthy(R.apply(U,H[G])))return!1;return!0}else if(z==="none"){if(H=R.apply(V[0],C),U=V[1],!Array.isArray(H)||!H.length)return!0;for(G=0;G<H.length;G+=1)if(R.truthy(R.apply(U,H[G])))return!1;return!0}else if(z==="some"){if(H=R.apply(V[0],C),U=V[1],!Array.isArray(H)||!H.length)return!1;for(G=0;G<H.length;G+=1)if(R.truthy(R.apply(U,H[G])))return!0;return!1}}if(V=V.map(function(J){return R.apply(J,C)}),T.hasOwnProperty(z)&&typeof T[z]=="function")return T[z].apply(C,V);if(z.indexOf(".")>0){var re=String(z).split("."),ne=T;for(G=0;G<re.length;G++){if(!ne.hasOwnProperty(re[G]))throw new Error("Unrecognized operation "+z+" (failed at "+re.slice(0,G+1).join(".")+")");ne=ne[re[G]]}return ne.apply(C,V)}throw new Error("Unrecognized operation "+z)},R.uses_data=function(n){var C=[];if(R.is_logic(n)){var z=R.get_operator(n),V=n[z];Array.isArray(V)||(V=[V]),z==="var"?C.push(V[0]):V.forEach(function(G){C.push.apply(C,R.uses_data(G))})}return a(C)},R.add_operation=function(n,C){T[n]=C},R.rm_operation=function(n){delete T[n]},R.rule_like=function(n,C){if(C===n||C==="@")return!0;if(C==="number")return typeof n=="number";if(C==="string")return typeof n=="string";if(C==="array")return Array.isArray(n)&&!R.is_logic(n);if(R.is_logic(C)){if(R.is_logic(n)){var z=R.get_operator(C),V=R.get_operator(n);if(z==="@"||z===V)return R.rule_like(R.get_values(n,!1),R.get_values(C,!1))}return!1}if(Array.isArray(C))if(Array.isArray(n)){if(C.length!==n.length)return!1;for(var G=0;G<C.length;G+=1)if(!R.rule_like(n[G],C[G]))return!1;return!0}else return!1;return!1},R}var A=function(m,R){var T,n=/{{(.*?)}}/,C=m==null||(T=m.match)===null||T===void 0?void 0:T.call(m,n);if(C){var z=u().get(R,C[1]);return u().isFunction(z)?z():z}else return m};function p(a){if(h()(a)!=="object"||a===null)return null;for(var m in a)if(Object.prototype.hasOwnProperty.call(a,m))return Object.prototype.toString.call(a[m])==="[object Object]"&&a[m]!==null?p(a[m]):{key:m,value:a[m]};return null}var S=function(m){var R=b(m),T=(0,r.findIndex)(R,function(C,z,V){if(C.includes("$")&&z>0)return!0}),n=R.slice(0,T);return n};function b(a){var m=[];function R(T){Object.keys(T).sort().forEach(function(n){m.push(n),T[n]&&h()(T[n])==="object"&&R(T[n])})}return R(a),m}var i=function(){var a=v()(d()().mark(function m(R){var T,n,C,z,V,G,X;return d()().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return T=R.ruleGroup,n=R.variables,C=R.localVariables,z=R.variableNameOfLeftCondition,V=Object.keys(T)[0]||"$and",G=T[V],X=G.map(function(){var Z=v()(d()().mark(function re(ne){var J,k,q,Se,ee,pe,xe,je,Ce,Oe,De;return d()().wrap(function(ae){for(;;)switch(ae.prev=ae.next){case 0:if(!("$and"in ne||"$or"in ne)){ae.next=4;break}return ae.next=3,i({ruleGroup:ne,variables:n,localVariables:C});case 3:return ae.abrupt("return",ae.sent);case 4:if(J=p(ne),k=J==null?void 0:J.key,k){ae.next=8;break}return ae.abrupt("return",!0);case 8:return q=w(S(ne),z),Se=n.parseVariable(q,C,{doNotRequest:!0}).then(function(ge){var ue=ge.value;return ue}),ee=(0,y.cG)(J==null?void 0:J.value)?[n.parseVariable(J==null?void 0:J.value,C).then(function(ge){var ue=ge.value;return ue}),Se]:[J==null?void 0:J.value,Se],ae.prev=11,pe=P(),ae.next=15,Promise.all(ee);case 15:return xe=ae.sent,je=o()(xe,2),Ce=je[0],Oe=je[1],ae.next=21,n.getCollectionField(q,C);case 21:return De=ae.sent,ae.abrupt("return",pe.apply(f()({},k,[(0,g.J)(Oe,{targetCollectionField:De}),(0,g.J)(Ce,{targetCollectionField:De})])));case 25:throw ae.prev=25,ae.t0=ae.catch(11),ae.t0;case 28:case"end":return ae.stop()}},re,null,[[11,25]])}));return function(re){return Z.apply(this,arguments)}}()),H.next=6,Promise.all(X);case 6:if(X=H.sent,V!=="$and"){H.next=11;break}return H.abrupt("return",(0,r.every)(X,function(Z){return Z}));case 11:return H.abrupt("return",(0,r.some)(X,function(Z){return Z}));case 12:case"end":return H.stop()}},m)}));return function(R){return a.apply(this,arguments)}}();function w(a){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$nForm";return"{{ ".concat(m,".").concat(a.join(".")," }}")}var E=function(m){var R={};return m.map(function(T){R[T.name]=T.ctx}),R};function x(a,m,R,T,n){return c.apply(this,arguments)}function c(){return c=v()(d()().mark(function a(m,R,T,n,C){var z,V,G,X,U,H;return d()().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:if(!(R&&m==="handlebars")){re.next=19;break}return re.prev=1,z=t().compile(R),V=E(n),G=T.ctxRef.current.$nDate,X={},Object.keys(G).map(function(ne){X[ne]=G[ne]()}),U=z(l()(l()(l()({},T.ctxRef.current),V),{},{$nDate:X})),re.next=10,C(U);case 10:return re.abrupt("return",re.sent);case 13:return re.prev=13,re.t0=re.catch(1),console.log(re.t0),re.abrupt("return",R);case 17:re.next=31;break;case 19:return re.prev=19,re.next=22,(0,B.replaceVariableValue)(R,T,n);case 22:return H=re.sent,re.next=25,C(H);case 25:return re.abrupt("return",re.sent);case 28:return re.prev=28,re.t1=re.catch(19),re.abrupt("return",R);case 31:case"end":return re.stop()}},a,null,[[1,13],[19,28]])})),c.apply(this,arguments)}},61736:function(ze,te,e){"use strict";e.d(te,{D:function(){return l}});var N=e(67294),l=(0,N.createContext)({});l.displayName="SchemaComponentContext.Provider"},44245:function(ze,te,e){"use strict";e.d(te,{R:function(){return t}});var N=e(97857),l=e.n(N),$=e(13769),d=e.n($),M=e(86201),f=e(80844),L=e(67294),o=e(47844),W=e(85893),v=["children","form"],D=["children"],h=function(u){var B=u.children,y=u.form,g=d()(u,v),O=(0,L.useContext)(f.SchemaOptionsContext),K=(0,L.useContext)(f.SchemaExpressionScopeContext),P=l()(l()({},O==null?void 0:O.scope),K),A=l()({},O==null?void 0:O.components);return(0,W.jsx)(f.FormProvider,l()(l()({},g),{},{form:y,children:(0,W.jsx)(o.G,{components:A,scope:P,children:B})}))},I=function(u){var B=u.children,y=d()(u,D),g=(0,L.useContext)(f.SchemaOptionsContext),O=(0,L.useContext)(f.SchemaExpressionScopeContext),K=l()(l()({},g==null?void 0:g.scope),O),P=l()({},g==null?void 0:g.components),A=(0,L.useMemo)(function(){return(0,M.createForm)()},[]);return(0,W.jsx)(f.FormProvider,l()(l()({},y),{},{form:A,children:(0,W.jsx)(o.G,{components:P,scope:K,children:B})}))},t=function(u){return u.form?(0,W.jsx)(h,l()({},u)):(0,W.jsx)(I,l()({},u))}},93587:function(ze,te,e){"use strict";e.d(te,{m:function(){return t}});var N=e(97857),l=e.n(N),$=e(86201),d=e(57953),M=e(67294),f=e(84577),L=e(44245),o=e(93323),W=e(12174),v=function(u){var B=u.uid,y=u.type,g=y===void 0?"getJsonSchema":y,O=u.onSuccess,K={url:"/uiSchemas:".concat(g,"/").concat(B)},P=(0,W.QT)(K,{refreshDeps:[B],onSuccess:function(b){O&&O(b)}}),A=P.data,p=P.loading;return{schema:A==null?void 0:A.data,loading:p}},D=e(85893),h=function(u){return u},I=function(u){var B=u.noForm,y=u.onlyRenderProperties,g=u.hidden,O=u.scope,K=u.uid,P=u.memoized,A=P===void 0?!0:P,p=u.components,S=u.onSuccess,b=u.NotFoundPage,i=u.schemaTransform,w=i===void 0?h:i,E=u.onPageNotFind,x=(0,f.Dm)(),c=x.reset,a=y?"getProperties":"getJsonSchema",m={url:"/uiSchemas:".concat(a,"/").concat(K)},R=(0,M.useMemo)(function(){return(0,$.createForm)()},[K]),T=v({uid:K,type:a,onSuccess:function(G){S&&S(G),c&&c()}}),n=T.schema,C=T.loading,z=(0,f.Co)(b);return C||g?(0,D.jsx)("div",{style:{textAlign:"center",marginTop:20},children:(0,D.jsx)(d.Z,{})}):!n||Object.keys(n).length===0?(E&&E(),z?(0,D.jsx)(z,{}):null):B?(0,D.jsx)(o.n,{components:p,scope:O,schema:w(n||{})}):(0,D.jsx)(L.R,{form:R,children:(0,D.jsx)(o.n,{components:p,scope:O,schema:w(n||{})})})},t=(0,M.memo)(function(r){return r.uid?(0,D.jsx)(I,l()({},r)):null});t.displayName="RemoteSchemaComponent"},93323:function(ze,te,e){"use strict";e.d(te,{n:function(){return O}});var N=e(97857),l=e.n(N),$=e(13769),d=e.n($),M=e(9783),f=e.n(M),L=e(80844),o=e(90105),W=e(67294),v=e(61736),D=e(47844),h=e(85893),I=["components","scope","schema","distributed"],t=["schema"],r=["memoized"];function u(K){return L.Schema.isSchemaInstance(K)?K:K!=null&&K.name?new L.Schema({type:"object",properties:f()({},K.name,K)}):new L.Schema(K)}var B=function(P){return(0,W.useMemo)(function(){return u(P)},[])},y=(0,W.memo)(function(K){var P=K.components,A=K.scope,p=K.schema,S=K.distributed,b=d()(K,I),i=(0,W.useContext)(v.D),w=(0,W.useMemo)(function(){return u(p)},[p]),E=(0,o.Z)();return(0,h.jsx)(v.D.Provider,{value:l()(l()({},i),{},{distributed:i.distributed==!1?!1:S,refresh:function(){var c;if(E(),i.distributed===!1||S===!1){var a;(a=i.refresh)===null||a===void 0||a.call(i)}(c=K.onChange)===null||c===void 0||c.call(K,w)}}),children:(0,h.jsx)(D.G,{inherit:!0,components:P,scope:A,children:(0,h.jsx)(L.RecursionField,l()(l()({},b),{},{schema:w}))})})}),g=(0,W.memo)(function(K){var P=K.schema,A=d()(K,t),p=B(P);return(0,h.jsx)(y,l()(l()({},A),{},{schema:p}))}),O=(0,W.memo)(function(K){var P=K.memoized,A=d()(K,r);return P?(0,h.jsx)(g,l()({},A)):(0,h.jsx)(y,l()({},A))})},47844:function(ze,te,e){"use strict";e.d(te,{B:function(){return f},G:function(){return L}});var N=e(97857),l=e.n(N),$=e(80844),d=e(67294),M=e(85893),f=function(){var W=(0,d.useContext)($.SchemaOptionsContext);return W||{}},L=(0,d.memo)(function(o){var W=o.children,v=f(),D=(0,d.useMemo)(function(){return l()(l()({},v.components),o.components)},[v.components,o.components]),h=(0,d.useMemo)(function(){return l()(l()({},v.scope),o.scope)},[v.scope,o.scope]),I=(0,d.useMemo)(function(){return{scope:h,components:D}},[h,D]);return(0,M.jsx)($.SchemaOptionsContext.Provider,{value:I,children:(0,M.jsx)($.SchemaComponentsContext.Provider,{value:D,children:(0,M.jsx)($.ExpressionScope,{value:h,children:W})})})});L.displayName="SchemaComponentOptions"},70993:function(ze,te,e){"use strict";e.d(te,{_b:function(){return P},RV:function(){return A.R},m1:function(){return p.m},n6:function(){return S.n},G0:function(){return b.G},a$:function(){return X},Tz:function(){return V},Bs:function(){return b.B}});var N=e(15009),l=e.n(N),$=e(99289),d=e.n($),M=e(12444),f=e.n(M),L=e(72004),o=e.n(L),W=e(31996),v=e.n(W),D=e(26037),h=e.n(D),I=e(51947),t=e(83062),r=e(15867),u=e(67294),B=e(49218),y=e(26793),g=e(40868),O=e(68230),K=e(85893),P=function(){var Z=(0,g.ngQ)(),re=Z.designable,ne=Z.setDesignable,J=(0,y.$)(),k=J.t,q=(0,O.d)(),Se=q.token,ee={};return re?ee.backgroundColor="var(--colorSettings)":ee.backgroundColor="transparent",(0,B.y1)("Ctrl+Shift+U",function(){return ne(!re)},[re]),(0,K.jsx)(t.Z,{title:k("UI Editor"),children:(0,K.jsx)(r.ZP,{"data-testid":"ui-editor-button",icon:(0,K.jsx)(I.Z,{style:{color:Se.colorTextHeaderMenu}}),title:k("UI Editor"),style:ee,onClick:function(){ne(!re)}})})},A=e(44245),p=e(93587),S=e(93323),b=e(47844),i=e(97857),w=e.n(i),E=e(5574),x=e.n(E),c=e(86201),a=e(80844),m=e(84327),R=e(90105),T=e(61736),n=function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return"".concat(Z).concat((0,m.uid)())};a.Schema.silent(!0);var C={},z={silent:!0,compile:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=function(){if(z.silent)try{return new Function("$root","with($root) { return (".concat(Z,"); }"))(re)}catch(k){return"{{".concat(Z,"}}")}else return new Function("$root","with($root) { return (".concat(Z,"); }"))(re)};return C[Z]?C[Z]:Z.trim().startsWith("t(")?(C[Z]=ne(),C[Z]):ne()}};a.Schema.registerCompiler(z.compile);var V=function(Z){var re=Z.designable,ne=Z.onDesignableChange,J=Z.components,k=Z.children,q=(0,u.useContext)(T.D),Se=(0,b.B)(),ee=(0,R.Z)(),pe=(0,u.useState)((0,m.uid)()),xe=x()(pe,2),je=xe[0],Ce=xe[1],Oe=(0,u.useMemo)(function(){return Z.form||(0,c.createForm)()},[je]),De=(0,y.$)(),ce=De.t,ae=(0,u.useMemo)(function(){return w()(w()({},Z.scope),{},{t:ce,randomString:n})},[Z.scope,ce,Se==null?void 0:Se.scope]),ge=(0,u.useState)(re),ue=x()(ge,2),fe=ue[0],_e=ue[1],ye=(0,u.useMemo)(function(){return typeof re=="boolean"?re:fe},[re,fe,q.designable]),Re=(0,u.useMemo)(function(){return function(Te){typeof ye!="boolean"&&_e(Te),ne==null||ne(Te)}},[ye,ne]),Be=(0,u.useCallback)(function(){Ce((0,m.uid)())},[]);return(0,K.jsx)(T.D.Provider,{value:{scope:ae,components:J,reset:Be,refresh:ee,designable:ye,setDesignable:Re},children:(0,K.jsx)(a.FormProvider,{form:Oe,children:(0,K.jsx)(b.G,{inherit:!0,scope:ae,components:J,children:k})})})};V.displayName="SchemaComponentProvider";var G=e(31601),X=function(H){v()(re,H);var Z=h()(re);function re(){return f()(this,re),Z.apply(this,arguments)}return o()(re,[{key:"load",value:function(){var ne=d()(l()().mark(function k(){return l()().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:this.addComponents();case 1:case"end":return Se.stop()}},k,this)}));function J(){return ne.apply(this,arguments)}return J}()},{key:"addComponents",value:function(){this.app.addComponents({DesignableSwitch:P})}}]),re}(G.S),U=null},84577:function(ze,te,e){"use strict";e.d(te,{zz:function(){return L.zz},Pl:function(){return L.Pl},oB:function(){return L.oB},lI:function(){return l},hi:function(){return g.hi},eJ:function(){return $.e},Co:function(){return f},aZ:function(){return g.aZ},ng:function(){return L.ng},et:function(){return o.e},cL:function(){return u},fd:function(){return O},Cl:function(){return D},vH:function(){return B},sR:function(){return L.sR},wN:function(){return y.w},Dm:function(){return I},fM:function(){return g.fM}});var N=e(67294),l=function(P){var A=(0,N.useRef)(null);return(0,N.useEffect)(function(){return A.current&&P!==A.current&&A.current.onUnmount(),A.current=P,P.onMount(),function(){P.onUnmount()}},[P]),P},$=e(96365),d=e(80844),M=e(96486),f=function(P,A){var p=(0,N.useContext)(d.SchemaOptionsContext),S=p.components;return P?typeof P!="string"?P:(0,M.get)(S,P)||A:A},L=e(94516),o=e(98146),W=e(97857),v=e.n(W),D=function(P){var A=(0,N.useContext)(d.SchemaOptionsContext),p=(0,N.useContext)(d.SchemaExpressionScopeContext),S=(0,N.useRef)();return S.current=p,P.toFieldProps(v()(v()({},A),{},{get scope(){return v()(v()({},A.scope),S.current)}}))},h=e(61736);function I(){return(0,N.useContext)(h.D)}var t=e(26793),r=e(6145),u=function(){var P,A=(0,r.useCollectionManager_deprecated)(),p=A.getCollectionJoinField,S=A.getCollection,b=(0,d.useFieldSchema)(),i=(0,r.useCollection_deprecated)(),w=i.getField,E=w(b.name)||p(b["x-collection-field"]),x=(0,t.$)(),c=x.t,a=((P=b["x-component-props"])===null||P===void 0?void 0:P.fieldNames)||{},m=a.label,R=(0,N.useMemo)(function(){if(!(!E||!(E!=null&&E.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m"].includes(E.interface)){var T=S(E.target);if((T==null?void 0:T.template)==="file")return[{label:c("Record picker"),value:"CollectionField"},{label:c("Select"),value:"AssociationSelect"}];switch(E.interface){case"o2m":return[{label:c("Record picker"),value:"CollectionField"},{label:c("Subtable"),value:"TableField"},{label:c("Select"),value:"AssociationSelect"}];case"m2o":case"m2m":case"linkTo":return[{label:c("Record picker"),value:"CollectionField"},{label:c("Select"),value:"AssociationSelect"}];default:return[{label:c("Record picker"),value:"CollectionField"},{label:c("Subform"),value:"FormField"},{label:c("Select"),value:"AssociationSelect"}]}}},[c,E==null?void 0:E.interface,m]);return R},B=function(){var P,A=(0,d.useField)(),p=(0,d.useFieldSchema)(),S=(0,r.useCollection_deprecated)(),b=S.getField,i=(0,r.useCollectionManager_deprecated)(),w=i.getCollectionJoinField,E=b(p.name)||w(p["x-collection-field"]),x=(0,$.e)();(0,N.useEffect)(function(){if(!(A!=null&&A.title)){var c;A.title=x(E==null||(c=E.uiSchema)===null||c===void 0?void 0:c.title)}},[E==null||(P=E.uiSchema)===null||P===void 0?void 0:P.title])},y=e(9780),g=e(18686),O=function(P){var A,p=(0,t.$)(),S=p.t,b=(0,r.useCollectionManager_deprecated)(),i=b.getCollectionJoinField,w=b.getCollection,E=(0,d.useFieldSchema)(),x=(P==null?void 0:P.fieldSchema)||E,c=(0,d.useField)(),a=(0,d.useForm)(),m=(x==null?void 0:x["x-read-pretty"])||c.readPretty||a.readPretty,R=P==null?void 0:P.fieldSchema,T=(0,r.useCollection_deprecated)(),n=T.getField,C=(P==null?void 0:P.collectionField)||n(x.name)||i(x["x-collection-field"]),z=((A=x["x-component-props"])===null||A===void 0?void 0:A.fieldNames)||{},V=z.label,G=(0,N.useMemo)(function(){if(!(!C||!(C!=null&&C.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m","updatedBy","createdBy","mbm"].includes(C.interface)){var X=w(C.target);if((X==null?void 0:X.template)==="file")return m?[{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((X==null?void 0:X.template)==="tree"&&["m2m","o2m","m2o"].includes(C.interface))return m?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!R&&{label:S("Sub-details"),value:"Nester"},!R&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!R&&["m2m","o2m"].includes(C.interface)&&{label:S("Sub-table"),value:"SubTable"},!R&&{label:S("Cascade Select"),value:"CascadeSelect"},!R&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];switch(C.interface){case"o2m":return m?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!R&&{label:S("Sub-table"),value:"SubTable"},!R&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!R&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"},!R&&{label:S("Sub-table"),value:"SubTable"}];case"m2m":case"mbm":return m?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!R&&{label:S("Sub-details"),value:"Nester"},!R&&{label:S("Sub-table"),value:"SubTable"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!R&&{label:S("Sub-table"),value:"SubTable"},!R&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];case"m2o":case"linkTo":return m?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!R&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!R&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}];default:return m?[{label:S("Title"),value:"Select"},{label:S("Tag"),value:"Tag"},!R&&{label:S("Sub-details"),value:"Nester"}]:[{label:S("Select"),value:"Select"},{label:S("Record picker"),value:"Picker"},!R&&{label:S("Sub-form"),value:"Nester"},{label:S("Sub-form(Popover)"),value:"PopoverNester"}]}}},[S,C==null?void 0:C.interface,V]);return(G||[]).filter(Boolean)}},18686:function(ze,te,e){"use strict";e.d(te,{aZ:function(){return P},fM:function(){return p},hi:function(){return A}});var N=e(5574),l=e.n(N),$=e(97857),d=e.n($),M=e(80844),f=e(83204),L=e(9361),o=e(96486),W=e.n(o),v=e(67294),D=e(40868),h=e(21143),I=e(10097),t=e(1892),r=e(28561),u=function(i,w,E,x){return i?x.paddingContentHorizontalLG:E?w?x.controlPaddingHorizontal+3*x.controlPaddingHorizontalSM+22+x.paddingContentHorizontalLG:x.paddingContentHorizontalLG+12:w?x.paddingSM+x.controlHeight+x.marginXS+2*x.controlPaddingHorizontalSM+22+x.paddingContentHorizontalLG:x.controlHeight+x.marginXS+(x.paddingXXS+2)*2+x.paddingContentHorizontalLG},B=function(i){var w=L.Z.useToken(),E=w.token,x=(0,D.ngQ)(),c=x.designable,a=(0,I.useBlockHeightProps)(),m=a.heightProps,R=i||m||{},T=R.disablePageHeader,n=R.enablePageTabs,C=R.hidePageTitle,z=E.sizeXXL-2,V=c?E.controlHeight+2*E.paddingContentHorizontalLG:1*E.paddingContentHorizontalLG,G=u(T,n,C,E);return z+G+V},y=function(){var i=L.Z.useToken(),w=i.token,E=(0,D.ngQ)(),x=E.designable,c=w.paddingContentVerticalLG+w.margin+2*w.paddingContentVertical+24,a=x?w.controlHeight+2*w.paddingContentHorizontalLG:1*w.paddingContentHorizontalLG;return c+a},g=function(i){var w=(0,M.useFieldSchema)(),E=S(w),x=B(i),c=y();return E?c:x},O=["users_jobs","approvals","approvalRecords"],K=function(){var i,w,E=L.Z.useToken(),x=E.token,c=(0,I.useBlockHeightProps)(),a=c.heightProps,m=(0,t.Si)(),R=m.heightProps,T=(0,D.ngQ)(),n=T.designable,C=(0,M.useFieldSchema)(),z=R||a,V=g(z),G=(i=(0,h.useDataBlockRequest)())!==null&&i!==void 0?i:{},X=G.data,U=(0,h.useCollection)(),H=U.name,Z=(X==null?void 0:X.meta)||{},re=Z.count,ne=Z.pageSize,J=re>ne,k=z.heightMode,q=z.height,Se=z.title;if(!(!(z!=null&&z.heightMode)||k===r.j.DEFAULT)){var ee=Object.keys(((w=C.parent.properties.actions)===null||w===void 0?void 0:w.properties)||{}).length>0,pe=J?x.controlHeight+x.padding+x.marginLG:x.marginLG,xe=ee||n?x.controlHeight+2*x.marginLG:x.marginLG,je=(n&&!O.includes(H)?x.controlHeight:22)+2*x.padding+1,Ce=Se?x.fontSizeLG*x.lineHeightLG+x.padding*2-1:0;return k===r.j.FULL_HEIGHT?window.innerHeight-V-Ce-je-xe-pe:q-Ce-xe-je-pe}},P=function(i){var w=(0,I.useBlockHeightProps)(),E=w.heightProps,x=g(),c=L.Z.useToken(),a=c.token,m=E||{},R=m.heightMode,T=m.height,n=m.title,C=n?a.fontSizeLG*a.lineHeightLG+a.padding*2-1:0;if(!(!(E!=null&&E.heightMode)||R===r.j.DEFAULT)){if(R===r.j.FULL_HEIGHT){var z=window.innerHeight-x;return i!=null&&i.removeBlockHeaderHeight&&(z=z-C),i!=null&&i.innerExtraHeight&&(z=z-i.innerExtraHeight),z}return T}},A=function(){var i=(0,M.useFieldSchema)(),w=(0,v.useMemo)(function(){return(0,I.getPageSchema)(i)},[]),E=(w==null?void 0:w["x-component-props"])||{},x=E.disablePageHeader,c=E.enablePageTabs,a=E.hidePageTitle,m=d()(d()({},i==null?void 0:i["x-component-props"]),{},{disablePageHeader:x,enablePageTabs:c,hidePageTitle:a}),R=g(m),T=m||{},n=T.heightMode,C=T.height;if(!(!(m!=null&&m.heightMode)||n===r.j.DEFAULT))return n===r.j.FULL_HEIGHT?window.innerHeight-R:C},p=function(){var i=(0,v.useState)(),w=l()(i,2),E=w[0],x=w[1],c=(0,v.useRef)(null),a=K(),m=(0,v.useCallback)((0,o.debounce)(function(){var T;if(c.current){var n=c.current.getBoundingClientRect(),C=(T=c.current.querySelector(".ant-table"))===null||T===void 0?void 0:T.getBoundingClientRect();C&&x(n.width)}},100),[a]),R=(0,v.useCallback)(function(T){c.current=T&&T.children?T.children[0]:null,m()},[m]);return(0,f.Z)("resize",m),{height:a,width:E,tableSizeRefCallback:R}},S=function b(i){return i?i["x-component"]==="Action.Container"?!0:b(i.parent):null}},96365:function(ze,te,e){"use strict";e.d(te,{e:function(){return o}});var N=e(97857),l=e.n(N),$=e(52677),d=e.n($),M=e(80844),f=e(67294),L={},o=function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{noCache:!1},D=v.noCache,h=(0,f.useContext)(M.SchemaOptionsContext),I=(0,f.useContext)(M.SchemaExpressionScopeContext);return function(t,r){var u=!1,B;if(typeof t=="string"&&t.startsWith("{{")&&(u=!0,B=t),t&&d()(t)==="object"&&!(0,f.isValidElement)(t)&&(u=!0,B=JSON.stringify(t)),Array.isArray(t)&&(u=!0),u){var y=l()(l()(l()({},h.scope),I),r);if(!B)return M.Schema.compile(t,y);try{return D?M.Schema.compile(t,y):(L[B]=L[B]||M.Schema.compile(t,y),L[B])}catch(g){return console.log("useCompile error",t,g),M.Schema.compile(t,y)}}return t}}},94516:function(ze,te,e){"use strict";e.d(te,{zz:function(){return V},Pl:function(){return m},oB:function(){return C},ng:function(){return X},sR:function(){return G}});var N=e(5574),l=e.n(N),$=e(19632),d=e.n($),M=e(15009),f=e.n(M),L=e(99289),o=e.n(L),W=e(12444),v=e.n(W),D=e(72004),h=e.n(D),I=e(9783),t=e.n(I),r=e(97857),u=e.n(r),B=e(80844),y=e(84327),g=e(45360),O=e(50361),K=e.n(O),P=e(27361),A=e.n(P),p=e(36968),S=e.n(p),b=e(67294),i=e(26793),w=e(12174),E=e(61736);function x(U,H){if(U)return U["x-app-version"]||(U["x-app-version"]=H),Object.keys(U.properties||{}).forEach(function(Z){var re;x((re=U.properties)===null||re===void 0?void 0:re[Z],H)}),U}var c={i8:"1.3.52"},a=e(85893);function m(U){return new V(U)}var R=function U(H){H&&(H["x-uid"]||(H["x-uid"]=(0,y.uid)()),Object.keys(H.properties||{}).forEach(function(Z){U(H.properties[Z])}))},T=function(H){return H},n=function(H,Z){if(!(!H||!Z)){for(var re in Z)if(Object.prototype.hasOwnProperty.call(Z,re)){var ne=Z[re];if(ne!==(H==null?void 0:H[re]))return!1}return!0}},C=function(H,Z){if(H["x-uid"]&&H["x-uid"]===Z["x-uid"])return[null,H.toJSON()];var re=H.toJSON(),ne=u()(u()({},re),{},{properties:{}}),J=null,k=function q(Se,ee){Object.keys(Se||{}).forEach(function(pe){var xe=Se[pe];if(xe["x-uid"]===Z["x-uid"]){J=Se[pe];return}else ee.properties[pe]=u()(u()({},xe),{},{properties:{}}),q(xe==null?void 0:xe.properties,ee.properties[pe])})};return k(re.properties,ne),[ne,J]},z=function(H){return H},V=function(){function U(H){v()(this,U),t()(this,"current",void 0),t()(this,"options",void 0),t()(this,"appVersion",void 0),t()(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,re=this.options,ne=re.api,J=re.t,k=J===void 0?z:J;if(ne){var q=function(ee){if(!ee)return[];var pe=Object.values(ee.properties).length,xe=[];return ee.mapProperties(function(je){je["x-component-props"]=je["x-component-props"]||{},je["x-component-props"].width=100/pe,je["x-uid"]&&xe.push({"x-uid":je["x-uid"],"x-component-props":je["x-component-props"]})}),ee["x-uid"]&&xe.length?xe:[]};this.on("insertAdjacent",function(){var Se=o()(f()().mark(function ee(pe){var xe,je,Ce,Oe,De,ce,ae,ge,ue,fe;return f()().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(je=pe.onSuccess,Ce=pe.current,Oe=pe.position,De=pe.schema,ce=pe.wrap,ae=pe.wrapped,ge=pe.removed,ue=[],(ae==null?void 0:ae["x-component"])==="Grid.Col"&&(ue=ue.concat(q(ae.parent))),(ge==null?void 0:ge["x-component"])==="Grid.Col"&&(ue=ue.concat(q(ge.parent))),Z.refresh(),Ce["x-uid"]){ye.next=7;break}return ye.abrupt("return");case 7:return ye.next=9,ne.request({url:"/uiSchemas:insertAdjacent/".concat(Ce["x-uid"],"?position=").concat(Oe),method:"post",data:{schema:x(De,Z.appVersion),wrap:ce}});case 9:if(fe=ye.sent,!ue.length){ye.next=13;break}return ye.next=13,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:ue});case 13:if(!(ge!=null&&ge["x-uid"])){ye.next=16;break}return ye.next=16,ne.request({url:"/uiSchemas:remove/".concat(ge["x-uid"]),method:"post"});case 16:je==null||je(fe==null||(xe=fe.data)===null||xe===void 0?void 0:xe.data),g.ZP.success(k("Saved successfully"),.2);case 18:case"end":return ye.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}()),this.on("patch",function(){var Se=o()(f()().mark(function ee(pe){var xe;return f()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(xe=pe.schema,Z.refresh(),xe!=null&&xe["x-uid"]){Ce.next=4;break}return Ce.abrupt("return");case 4:return Ce.next=6,ne.request({url:"/uiSchemas:patch",method:"post",data:u()({},xe)});case 6:g.ZP.success(k("Saved successfully"),.2);case 7:case"end":return Ce.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}()),this.on("initializeActionContext",function(){var Se=o()(f()().mark(function ee(pe){var xe;return f()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(xe=pe.schema,Z.refresh(),xe!=null&&xe["x-uid"]){Ce.next=4;break}return Ce.abrupt("return");case 4:return Ce.next=6,ne.request({url:"/uiSchemas:initializeActionContext",method:"post",data:u()({},xe)});case 6:case"end":return Ce.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}()),this.on("batchPatch",function(){var Se=o()(f()().mark(function ee(pe){var xe;return f()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return xe=pe.schemas,Z.refresh(),Ce.next=4,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:xe});case 4:g.ZP.success(k("Saved successfully"),.2);case 5:case"end":return Ce.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}()),this.on("remove",function(){var Se=o()(f()().mark(function ee(pe){var xe,je;return f()().wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:if(xe=pe.removed,je=[],(xe==null?void 0:xe["x-component"])==="Grid.Col"&&(je=q(xe.parent)),Z.refresh(),xe!=null&&xe["x-uid"]){Oe.next=6;break}return Oe.abrupt("return");case 6:return Oe.next=8,ne.request({url:"/uiSchemas:remove/".concat(xe["x-uid"]),method:"post"});case 8:if(!je.length){Oe.next=11;break}return Oe.next=11,ne.request({url:"/uiSchemas:batchPatch",method:"post",data:je});case 11:g.ZP.success(k("Saved successfully"),.2);case 12:case"end":return Oe.stop()}},ee)}));return function(ee){return Se.apply(this,arguments)}}())}}},{key:"prepareProperty",value:function(Z){Z.type||(Z.type="void"),Z.name||(Z.name=(0,y.uid)()),this.current["x-uid"]&&R(Z)}},{key:"on",value:function(Z,re){this.events[Z]||(this.events[Z]=[]),this.events[Z].push(re)}},{key:"emit",value:function(){var H=o()(f()().mark(function re(ne){var J=this,k,q,Se,ee,pe,xe=arguments;return f()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(this.events[ne]){Ce.next=2;break}return Ce.abrupt("return");case 2:for(k=xe.length,q=new Array(k>1?k-1:0),Se=1;Se<k;Se++)q[Se-1]=xe[Se];return ee=q[0],pe=q.slice(1),Ce.abrupt("return",Promise.all(this.events[ne].map(function(Oe){return Oe.bind(J).apply(void 0,[u()({current:J.current},ee)].concat(d()(pe)))})));case 5:case"end":return Ce.stop()}},re,this)}));function Z(re){return H.apply(this,arguments)}return Z}()},{key:"parentsIn",value:function(Z){if(!Z||!B.Schema.isSchemaInstance(Z))return!1;for(var re=this.current;(ne=re)!==null&&ne!==void 0&&ne.parent;){var ne;if(re.parent===Z)return!0;re=re.parent}return!1}},{key:"refresh",value:function(){var Z=this.options.refresh;return Z==null?void 0:Z()}},{key:"deepMerge",value:function(Z){var re=this,ne={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"},J={"x-decorator-props":"decoratorProps","x-component-props":"componentProps","x-data":"data"};Object.keys(Z).forEach(function(k){ne[k]?(re.current[k]=Z[k],re.updateModel(ne[k],Z[k])):J[k]?Object.keys(Z[k]).forEach(function(q){S()(re.current,[k,q],Z[k][q]),re.updateModel([J[k],q],Z[k][q])}):re.current[k]=Z[k]}),this.emit("patch",{schema:Z})}},{key:"getSchemaAttribute",value:function(Z,re){return A()(this.current,Z,re)}},{key:"shallowMerge",value:function(Z){var re=this,ne={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(J){re.current[J]=Z[J],ne[J]&&re.updateModel(ne[J],Z[J])}),this.emit("patch",{schema:Z})}},{key:"updateModel",value:function(Z,re){var ne=function(k){S()(k,Z,re)};this.model&&ne(this.model),this.query&&this.query.take(ne)}},{key:"insertAdjacent",value:function(Z,re){var ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};switch(Z){case"beforeBegin":return this.insertBeforeBegin(re,ne);case"afterBegin":return this.insertAfterBegin(re,ne);case"beforeEnd":return this.insertBeforeEnd(re,ne);case"afterEnd":return this.insertAfterEnd(re,ne)}}},{key:"recursiveRemoveIfNoChildren",value:function(Z,re){if(Z){for(var ne=Z,J,k=re==null?void 0:re.breakRemoveOn;ne;){if(typeof k=="function"){if(k(ne))break}else if(n(ne,k))break;var q=Object.keys(ne.properties||{}).length;if(q>0)break;ne.parent&&(J=ne.parent.removeProperty(ne.name)),ne=ne.parent}return J}}},{key:"remove",value:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=re.breakRemoveOn,J=re.removeParentsIfNoChildren,k=Z||this.current,q=k.parent.removeProperty(k.name);if(J){var Se=this.recursiveRemoveIfNoChildren(k.parent,{breakRemoveOn:ne});Se&&(q=Se)}return this.emit("remove",{removed:q})}},{key:"removeWithoutEmit",value:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne=re.breakRemoveOn,J=re.removeParentsIfNoChildren,k=Z||this.current,q=k.parent.removeProperty(k.name);if(J){var Se=this.recursiveRemoveIfNoChildren(k.parent,{breakRemoveOn:ne});Se&&(q=Se)}return q}},{key:"insertBeforeBeginOrAfterEnd",value:function(Z){var re=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)&&B.Schema.isSchemaInstance(Z)&&this.current.parent===Z.parent){var J=0,k=0;return this.current.parent.mapProperties(function(q,Se,ee){re.current.name===Se&&(k=ee),Z.name===Se&&(J=ee)}),J>k?this.insertBeforeBegin(Z,ne):this.insertAfterEnd(Z,ne)}}},{key:"insertBeforeBegin",value:function(Z){var re=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var J={onSuccess:ne.onSuccess},k=ne.wrap,q=k===void 0?T:k,Se=ne.breakRemoveOn,ee=ne.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),ee&&(J.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:Se}))}else Z&&(Z=K()(Z));var pe={},xe=!1,je=0,Ce=0;this.current.parent.mapProperties(function(fe,_e){_e===re.current.name&&(Ce=je,xe=!0,++je),fe["x-index"]=je,++je,xe&&(pe[_e]=fe,re.current.parent.removeProperty(_e))}),this.prepareProperty(Z);var Oe=q(Z),De=this.current.parent.addProperty(Oe.name||(0,y.uid)(),Oe);De["x-index"]=Ce,De.parent=this.current.parent,this.current.parent.setProperties(pe);var ce=C(De,Z),ae=l()(ce,2),ge=ae[0],ue=ae[1];this.emit("insertAdjacent",u()({position:"beforeBegin",schema:ue,wrapped:Oe,wrap:ge},J))}}},{key:"insertAfterBegin",value:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var ne={onSuccess:re.onSuccess},J=re.wrap,k=J===void 0?T:J,q=re.breakRemoveOn,Se=re.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),Se&&(ne.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:q}))}else Z&&(Z=K()(Z));var ee={},pe=1;this.current.mapProperties(function(ae,ge){ae["x-index"]=pe,++pe,ee[ge]=ae}),this.current.properties={},this.prepareProperty(Z);var xe=k(Z),je=this.current.addProperty(xe.name||(0,y.uid)(),xe);je["x-index"]=0,je.parent=this.current,this.current.setProperties(ee);var Ce=C(je,Z),Oe=l()(Ce,2),De=Oe[0],ce=Oe[1];this.emit("insertAdjacent",u()({position:"afterBegin",schema:ce,wrap:De,wrapped:xe},ne))}}},{key:"insertBeforeEnd",value:function(Z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){delete Z["x-index"];var ne={onSuccess:re.onSuccess},J=re.wrap,k=J===void 0?T:J,q=re.breakRemoveOn,Se=re.removeParentsIfNoChildren;if(B.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),Se&&(ne.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:q}))}else Z&&(Z=K()(Z));this.prepareProperty(Z);var ee=k(Z),pe=this.current.addProperty(ee.name||(0,y.uid)(),ee);pe.parent=this.current;var xe=C(pe,Z),je=l()(xe,2),Ce=je[0],Oe=je[1];return this.emit("insertAdjacent",u()({position:"beforeEnd",schema:Oe,wrap:Ce,wrapped:ee},ne))}}},{key:"insertAfterEnd",value:function(Z){var re=this,ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(B.Schema.isSchemaInstance(this.current)){var J={onSuccess:ne==null?void 0:ne.onSuccess},k=ne.wrap,q=k===void 0?T:k,Se=ne.breakRemoveOn,ee=ne.removeParentsIfNoChildren,pe=0,xe=0,je=!1,Ce={};if(this.current.parent.mapProperties(function(fe,_e){fe["x-index"]=pe,_e===re.current.name&&(++pe,xe=pe,je=!0),++pe,je&&_e!==re.current.name&&(Ce[_e]=fe,re.current.parent.removeProperty(_e))}),B.Schema.isSchemaInstance(Z)){if(this.parentsIn(Z)){this.emit("error",{code:"parent_is_not_allowed",schema:Z});return}Z.parent.removeProperty(Z.name),ee&&(J.removed=this.recursiveRemoveIfNoChildren(Z.parent,{breakRemoveOn:Se})),Z.parent=null}else Z&&(Z=K()(Z));this.prepareProperty(Z);var Oe=q(Z),De=this.current.parent.addProperty(Oe.name||(0,y.uid)(),Oe);De.parent=this.current.parent,De["x-index"]=xe,this.current.parent.setProperties(Ce);var ce=C(De,Z),ae=l()(ce,2),ge=ae[0],ue=ae[1];this.emit("insertAdjacent",u()({position:"afterEnd",schema:ue,wrap:ge,wrapped:Oe},J))}}}]),U}();function G(){var U=(0,b.useContext)(B.SchemaOptionsContext),H=(0,b.useMemo)(function(){return(U==null?void 0:U.components)||{}},[U]),Z=function(ne){if(!ne)return null;if(typeof ne!="string")return ne;var J=A()(H,ne);return J||console.error('[nocobase]: Component "'.concat(ne,'" not found')),J};return Z}function X(){var U=(0,b.useContext)(E.D),H=U.designable,Z=U.setDesignable,re=U.refresh,ne=U.reset,J=(0,b.useContext)(B.SchemaOptionsContext),k=(0,b.useMemo)(function(){return(J==null?void 0:J.components)||{}},[J]),q=(0,b.useMemo)(function(){return function(){return(0,a.jsx)(a.Fragment,{})}},[]),Se=(0,B.useField)(),ee=(0,B.useFieldSchema)(),pe=(0,w.LY)(),xe=(0,i.$)(),je=xe.t,Ce=(0,b.useMemo)(function(){return m({t:je,api:pe,refresh:re,current:ee,model:Se,appVersion:c.i8})},[je,pe,re,ee,Se]);return(0,b.useEffect)(function(){Ce.loadAPIClientEvents()},[Ce]),{dn:Ce,designable:H,reset:ne,refresh:re,setDesignable:Z,DesignableBar:q,findComponent:(0,b.useCallback)(function(Oe){return Oe?typeof Oe!="string"?Oe:A()(k,Oe):null},[A()]),on:Ce.on.bind(Ce),patch:(0,b.useCallback)(function(Oe,De){var ce=function(ue){Object.keys(ue).forEach(function(fe){var _e=ue[fe];fe==="title"&&(Se.title=_e,ee.title=_e),fe==="x-decorator-props"&&(Se.decoratorProps||(Se.decoratorProps={}),ee["x-decorator-props"]||(ee["x-decorator-props"]={}),Object.keys(_e).forEach(function(ye){Se.decoratorProps[ye]=_e[ye],ee["x-decorator-props"][ye]=_e[ye]})),fe==="x-component-props"&&(Se.componentProps||(Se.componentProps={}),ee["x-component-props"]||(ee["x-component-props"]={}),Object.keys(_e).forEach(function(ye){Se.componentProps[ye]=_e[ye],ee["x-component-props"][ye]=_e[ye]}))})};if(typeof Oe=="string"){var ae={};return S()(ae,Oe,De),ce(ae)}ce(Oe),re()},[Ce]),shallowMerge:(0,b.useCallback)(function(Oe){Ce.shallowMerge(Oe)},[Ce]),deepMerge:(0,b.useCallback)(function(Oe){Ce.deepMerge(Oe)},[Ce]),remove:(0,b.useCallback)(function(Oe,De){Ce.remove(Oe,De)},[Ce]),insertAdjacent:(0,b.useCallback)(function(Oe,De,ce){Ce.insertAdjacent(Oe,De,ce)},[Ce]),insertBeforeBegin:(0,b.useCallback)(function(Oe){Ce.insertBeforeBegin(Oe)},[Ce]),insertAfterBegin:(0,b.useCallback)(function(Oe){Ce.insertAfterBegin(Oe)},[Ce]),insertBeforeEnd:(0,b.useCallback)(function(Oe){Ce.insertBeforeEnd(Oe)},[Ce]),insertAfterEnd:(0,b.useCallback)(function(Oe){Ce.insertAfterEnd(Oe)},[Ce])}}},98146:function(ze,te,e){"use strict";e.d(te,{e:function(){return f}});var N=e(80844),l=e(84577),$=e(67294),d=e(26386),M=function(){return null},f=function(){var o=(0,l.ng)(),W=o.designable,v=(0,N.useFieldSchema)(),D=(0,$.useMemo)(function(){return v["x-designer"]||v["x-toolbar"]?v["x-designer"]||v["x-toolbar"]:v["x-settings"]?d.Mf:M},[v]),h=(0,l.Co)(D);return W&&h||M}},9780:function(ze,te,e){"use strict";e.d(te,{w:function(){return L}});var N=e(97857),l=e.n(N),$=e(13769),d=e.n($),M=["useProps"],f=function(){return{}},L=function(){var W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v=W.useProps,D=v===void 0?f:v,h=d()(W,M),I=D;typeof D!="function"&&(I=f);var t=I();return l()(l()({},h),t)}},40868:function(ze,te,e){"use strict";e.d(te,{aUM:function(){return P.aU},olz:function(){return P.ol},N0i:function(){return P.N0},fWn:function(){return P.fW},EIK:function(){return P.EI},$Lt:function(){return P.$L},$b8:function(){return P.$b},HTy:function(){return ya},lkv:function(){return wr},rDu:function(){return Ja},eYL:function(){return P.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 P.C1},Ssf:function(){return Jl},vTp:function(){return Xl},XZJ:function(){return Yr},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 Xr.Mt},iNu:function(){return Xr.iN},zzt:function(){return jt.zz},_bl:function(){return g._b},POi:function(){return fs},AOY:function(){return pe},LBT:function(){return y.DndContext},IWB:function(){return y.DragHandler},LCt:function(){return y.DraggableContext},FyH:function(){return q.Fy},Nir:function(){return q.Ni},q8U:function(){return q.q8},HGA:function(){return q.HG},QTe:function(){return q.QT},JEX:function(){return q.JE},fAH:function(){return dl},$w$:function(){return q.$w},nBj:function(){return q.nB},Oct:function(){return q.Oc},zdw:function(){return q.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 ne},D_t:function(){return Qi.D},WiK:function(){return Vn},xJW:function(){return q.xJ},RVL:function(){return g.RV},Bc8:function(){return St},hG9:function(){return hi},DCh:function(){return fi},rjZ:function(){return qr.rj},Cqo:function(){return $a},jg7:function(){return qr.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 sa},HIW:function(){return Du},T3C:function(){return or},d97:function(){return da.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 P.x1},m1v:function(){return g.m1},glM:function(){return Vt},xZD:function(){return P.xZ},IuH:function(){return xn.Iu},MkN:function(){return P.Mk},Hof:function(){return ru},n6:function(){return g.n6},DDd:function(){return hv.D},G0E:function(){return g.G0},a$w:function(){return g.a$},TzZ:function(){return g.Tz},y00:function(){return P.y0},PhF:function(){return _t},Cqv:function(){return y.ShowFormData},cof:function(){return P.co},bts:function(){return y.Sortable},Fop:function(){return y.SortableContext},TRI:function(){return y.SortableItem},ORg:function(){return y.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 P.Fj},SLL:function(){return P.SL},sBv:function(){return P.sB},iTm:function(){return q.iT},Pls:function(){return jt.Pl},Oxq:function(){return wt},WLi:function(){return we},$9M:function(){return q.$9},nCn:function(){return za},iNG:function(){return _a},tD8:function(){return Ci},pg9:function(){return Zn},Ofb:function(){return q.Of},ibf:function(){return Xn},WyG:function(){return k},l6$:function(){return Fe.l6},WGR:function(){return An},C$H:function(){return cr.C$},cNQ:function(){return cr.cN},I9l:function(){return y.getRenderContent},XQ2:function(){return zr.XQ},ZZb:function(){return q.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 P.DU},XCj:function(){return P.XC},Vpg:function(){return gr},lIL:function(){return jt.lI},KxP:function(){return _o.K},hi9:function(){return jt.hi},p27:function(){return P.p2},z9d:function(){return cl.z},eJW:function(){return jt.eJ},Cor:function(){return jt.Co},aZq:function(){return jt.aZ},P1D:function(){return Xr.P1},ngQ:function(){return jt.ng},ett:function(){return jt.et},ySm:function(){return Bn.y},Zd$:function(){return q.Zd},cLh:function(){return jt.cL},baz:function(){return q.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 P.HS},vBu:function(){return P.vB},QYZ:function(){return P.QY},t9d:function(){return P.t9},Kgy:function(){return xn.Kg},aJ2:function(){return xn.aJ},n14:function(){return qr.n1},DiB:function(){return qr.Di},l1O:function(){return q.l1},w5o:function(){return q.w5},p3Q:function(){return q.p3},G5e:function(){return q.G5},xj2:function(){return q.xj},rxY:function(){return q.rx},Ils:function(){return cr.Il},zCB:function(){return P.zC},a4r:function(){return va.a},wNf:function(){return jt.wN},Dmu:function(){return jt.Dm},Bsl:function(){return g.Bs},yKv:function(){return Js.y},fMB:function(){return jt.fM},gCg:function(){return ka.g},eT6:function(){return q.eT},q4O:function(){return q.q4},ymE:function(){return Pa.ym},uqQ:function(){return P.uq},K5K:function(){return P.K5}});var N={};e.r(N),e.d(N,{Action:function(){return P.aU},ActionBar:function(){return P.ol},ActionBarProvider:function(){return P.N0},ActionContext:function(){return P.fW},ActionContextProvider:function(){return P.EI},ActionDesigner:function(){return P.$L},AfterSuccess:function(){return P.$b},AntdSchemaComponentPlugin:function(){return ya},AntdSchemaComponentProvider:function(){return wr},AppendsTreeSelect:function(){return Ja},AssignedFieldValues:function(){return P.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 P.C1},CardItem:function(){return Jl},Cascader:function(){return Xl},Checkbox:function(){return Yr},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 Xr.Mt},DatePickerProvider:function(){return Xr.iN},Details:function(){return fs},DetailsDesigner:function(){return pe},EditComponent:function(){return q.Fy},EditDefaultValue:function(){return q.Ni},EditDescription:function(){return q.q8},EditOperator:function(){return q.HG},EditPattern:function(){return q.QT},EditRequired:function(){return q.JE},EditSortField:function(){return dl},EditTitle:function(){return q.$w},EditTitleField:function(){return q.nB},EditTooltip:function(){return q.Oc},EditValidationRules:function(){return q.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 ne},FormDialog:function(){return Qi.D},FormField:function(){return Vn},FormItem:function(){return q.xJ},FormV2:function(){return St},G2Plot:function(){return hi},G2PlotRenderer:function(){return fi},Grid:function(){return qr.rj},GridCard:function(){return $a},GridRowContext:function(){return qr.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 sa},NanoIDInput:function(){return Du},Page:function(){return or},PagePopups:function(){return da.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 P.x1},RemoteSelect:function(){return Vt},RemoveButton:function(){return P.xZ},RemoveConditionContext:function(){return xn.Iu},RequestSettings:function(){return P.Mk},RichText:function(){return ru},SecondConFirm:function(){return P.y0},Select:function(){return _t},SkipValidation:function(){return P.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 P.Fj},actionSettings:function(){return P.SL},actionSettingsItems:function(){return P.sB},allowAddNew:function(){return q.iT},defaultFieldNames:function(){return wt},fetchTemplateData:function(){return we},filterFormItemSettings:function(){return q.$9},findByUid:function(){return za},findKeysByUid:function(){return _a},findMenuItem:function(){return Ci},formDetailsSettings:function(){return Zn},formItemSettings:function(){return q.Of},formSettings:function(){return Xn},formV1Settings:function(){return k},genStyleHook:function(){return Fe.l6},getCurrentOptions:function(){return An},getDatePickerLabels:function(){return cr.C$},getLabelFormatValue:function(){return cr.cN},getStoredPopupContext:function(){return zr.XQ},isFileCollection:function(){return q.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 P.DU},useActionContext:function(){return P.XC},useAssociationFieldModeContext:function(){return gr},useBackButton:function(){return _o.K},useCloseAction:function(){return P.p2},useColumnSchema:function(){return cl.z},useDatePickerContext:function(){return Xr.P1},useDownloadLogs:function(){return Bn.y},useEnsureOperatorsValid:function(){return q.Zd},useFieldMode:function(){return q.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 P.HS},useGetAriaLabelOfDrawer:function(){return P.vB},useGetAriaLabelOfModal:function(){return P.QY},useGetAriaLabelOfPopover:function(){return P.t9},useGetFilterFieldOptions:function(){return xn.Kg},useGetFilterOptions:function(){return xn.aJ},useGridContext:function(){return qr.n1},useGridRowContext:function(){return qr.Di},useIsAddNewForm:function(){return q.l1},useIsAssociationField:function(){return q.w5},useIsFieldReadPretty:function(){return q.p3},useIsFileField:function(){return q.G5},useIsFormReadPretty:function(){return q.xj},useIsSelectFieldMode:function(){return q.rx},useLabelUiSchema:function(){return cr.Il},useLinkageAction:function(){return P.zC},usePopupSettings:function(){return va.a},useStyles:function(){return Js.y},useTabsContext:function(){return ka.g},useTitleFieldOptions:function(){return q.eT},useValidateSchema:function(){return q.q4},useVariableScope:function(){return Pa.ym},useZIndexContext:function(){return P.uq},zIndexContext:function(){return P.K5}});var l=e(15009),$=e.n(l),d=e(99289),M=e.n(d),f=e(12444),L=e.n(f),o=e(72004),W=e.n(o),v=e(31996),D=e.n(v),h=e(26037),I=e.n(h),t=e(97857),r=e.n(t),u=e(67294),B=e(31601),y=e(14896),g=e(70993),O=e(89127),K=function(F){return M()($()().mark(function oe(){var le,se;return $()().wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return Ae.prev=0,Ae.next=3,this.api.request(F);case 3:return se=Ae.sent,Ae.abrupt("return",se==null||(le=se.data)===null||le===void 0?void 0:le.data);case 7:return Ae.prev=7,Ae.t0=Ae.catch(0),Ae.abrupt("return",[]);case 10:case"end":return Ae.stop()}},oe,this,[[0,7]])}))},P=e(76157),A=e(13769),p=e.n(A),S=e(57134),b=e(86201),i=e(80844),w=e(28459),E=e(57953),x=e(12174),c=e(6145),a=e(26386),m=e(64016),R=e(15195),T=e(23461),n=e(85893),C=["form","children"],z=["form","children","disabled"],V=["request","effects","initialValue","useValues"],G=function(F){var oe=F.form,le=F.children,se=p()(F,C),Pe=(0,i.useField)(),Ae=(0,i.useFieldSchema)(),Ve=(0,jt.lI)(oe.createVoidField(r()(r()({},Pe.props),{},{basePath:""})));return(0,n.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(i.FormContext.Provider,{value:oe,children:(0,n.jsx)(S.FormLayout,r()(r()({layout:"vertical"},se),{},{children:(0,n.jsx)(i.RecursionField,{basePath:Ve.address,schema:Ae,onlyRenderProperties:!0})}))})})},X=function(F){return F.children},U=function(F){var oe=F.form,le=F.children,se=F.disabled,Pe=p()(F,z),Ae=(0,i.useField)(),Ve=(0,i.useFieldSchema)(),ke=(0,jt.lI)(oe.createVoidField(r()(r()({},Ae.props),{},{basePath:""}))),Ye=(0,jt.Co)(Ve["x-component"],X);return(0,u.useEffect)(function(){oe.disabled=se||Ae.disabled},[se,Ae.disabled]),(0,n.jsx)(w.ZP,{componentDisabled:se,children:(0,n.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(i.FormContext.Provider,{value:oe,children:(0,n.jsx)(S.FormLayout,r()(r()({layout:"vertical"},Pe),{},{children:(0,n.jsx)(i.FieldContext.Provider,{value:ke,children:(0,n.jsx)(Ye,r()(r()({},Ae.componentProps),{},{children:(0,n.jsx)(i.RecursionField,{basePath:ke.address,schema:Ve,onlyRenderProperties:!0})}))})}))})})})},H=function(F){var oe=F.request,le=F.initialValue;return oe||function(){return Promise.resolve({data:le})}},Z=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,x.QT)(H(oe),F)},re=(0,u.createContext)(null);re.displayName="FormBlockContext";var ne=(0,i.observer)(function(Q){var F=Q.request,oe=Q.effects,le=Q.initialValue,se=Q.useValues,Pe=se===void 0?Z:se,Ae=p()(Q,V),Ve=(0,i.useFieldSchema)(),ke=(0,i.useField)(),Ye=(0,u.useMemo)(function(){return(0,b.createForm)({effects:oe})},[]),et=Pe({uid:Ve["x-uid"],onSuccess:function(rt){return M()($()().mark(function ft(){return $()().wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.next=2,Ye.reset();case 2:Ye.setValues(rt==null?void 0:rt.data),Ye.setInitialValues(rt==null?void 0:rt.data);case 4:case"end":return gt.stop()}},ft)}))()}},Q),qe=(0,u.useContext)(re);return(0,n.jsx)(re.Provider,{value:{parent:qe,form:Ye,result:et,field:ke,fieldSchema:Ve},children:(0,n.jsx)(E.Z,{spinning:(et==null?void 0:et.loading)||!1,children:Ve["x-decorator"]==="Form"?(0,n.jsx)(U,r()({form:Ye},Ae)):(0,n.jsx)(G,r()({form:Ye},Ae))})})},{displayName:"Form"});ne.Designer=function(){var F=(0,c.useCollection_deprecated)(),oe=F.name,le=F.title,se=(0,R.zy)(),Pe=(0,T.rE)(),Ae=Pe.componentNamePrefix;return(0,n.jsxs)(a.aN,{template:se,title:le||oe,children:[(0,n.jsx)(m.G,{componentName:"".concat(Ae,"Form"),collectionName:oe}),(0,n.jsx)(a.Z5,{}),(0,n.jsx)(a.qx,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};var J=e(5537),k=new J.F5({name:"FormV1Settings",items:[{name:"template",Component:m.G,useComponentProps:function(){var F=(0,c.useCollection_deprecated)(),oe=F.name,le=(0,T.rE)(),se=le.componentNamePrefix;return{componentName:"".concat(se,"Form"),collectionName:oe}}},{name:"divider",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),q=e(54801),Se=function(){var F=(0,c.useCollection_deprecated)(),oe=F.name,le=F.title,se=(0,R.zy)();return(0,n.jsx)(a.aN,{schemaSettings:"FormSettings",template:se,title:le||oe})},ee=function(){var F=(0,c.useCollection_deprecated)(),oe=F.name,le=F.title,se=(0,R.zy)();return(0,n.jsx)(a.aN,{schemaSettings:"ReadPrettyFormSettings",template:se,title:le||oe})},pe=function(){var F=(0,c.useCollection_deprecated)(),oe=F.name,le=F.title,se=(0,R.zy)();return(0,n.jsx)(a.aN,{schemaSettings:"FormDetailsSettings",template:se,title:le||oe})},xe=function(){var F=(0,c.useCollection_deprecated)(),oe=F.name,le=F.title,se=(0,R.zy)();return(0,n.jsx)(a.aN,{schemaSettings:"blockSettings:filterForm",template:se,title:le||oe})},je=e(7340),Ce=e(15503),Oe=e(68230),De=e(68400),ce=e.n(De),ae=e(97133),ge=e(84327),ue=e(9361),fe=e(31019),_e=e(22229),ye=e(43321),Re=e(8281),Be=e(9780),Te=e(18686),be=e(94804),ve=e(5574),de=e.n(ve),Y=e(68433),j=e(42075),me=e(34041),he=e(96486),ie=e.n(he),Ee=e(26793),Ie=e(32268),Fe=e(60094),Ne=e(9783),Ke=e.n(Ne),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),Kt=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(Q,F){var oe=[];if(!Array.isArray(Q))return oe;for(var le=0;le<Q.length;le++){var se=Q[le][F.options];Array.isArray(se)&&oe.push.apply(oe,Tt()(en(se,F))),oe.push(r()({},Q[le]))}return oe}function An(Q,F,oe){var le=en(F,oe),se=(0,he.castArray)(Q).map(function(Ae){return(0,Y.isPlainObject)(Ae)?Ae[oe.value]:Ae});function Pe(Ae){if(!Ae)return[];var Ve=[],ke=Rt()(se),Ye;try{var et=function(){var bt=Ye.value,rt=Ae.find(function(ft){return ft[oe.value]==bt})||{value:bt,label:bt&&bt.toString()};Ve.push(rt)};for(ke.s();!(Ye=ke.n()).done;)et()}catch(qe){ke.e(qe)}finally{ke.f()}return Ve}return Pe(le)}var Wn=e(67668),Nn=(0,i.observer)(function(Q){var F,oe=r()(r()({},wt),Q.fieldNames),le=(0,i.useField)(),se=(0,Wn.Hy)(),Pe=le.dataSource||Q.options||(se==null?void 0:se.uiSchema.enum)||[],Ae=An(le.value,Pe,oe);return!(0,ge.isValid)(Q.value)&&!Ae.length?(0,n.jsx)("div",{}):(0,b.isArrayField)(le)&&(le==null||(F=le.value)===null||F===void 0?void 0:F.length)===0?(0,n.jsx)("div",{}):(0,n.jsx)("div",{children:(0,n.jsx)(Lt.B,{ellipsis:Q.ellipsis,children:Ae.map(function(Ve,ke){return(0,n.jsx)(Ue.Z,{color:Ve[oe.color],icon:Ve.icon,children:Ve[oe.label]},ke)})})})},{displayName:"ReadPretty"}),oo=["value","options","onChange","fieldNames","mode","loading","rawOptions","defaultValue"],Yn=["objectValue","loading","value","rawOptions","defaultValue"],$n=function(F){return!(0,ge.isValid)(F)||He()(F)==="object"&&Object.keys(F).length===0},Gn=function(F){var oe=F.value,le=F.options,se=F.onChange,Pe=F.fieldNames,Ae=F.mode,Ve=F.loading,ke=F.rawOptions,Ye=F.defaultValue,et=p()(F,oo),qe=function(rt){var ft;if(!$n(rt)){var ht=(0,ge.toArr)(rt).filter(function(It){return It}).map(function(It){return(0,Y.isPlainObject)(It)?It[Pe.value]:It}),gt=(ft=An(ht,le,Pe))===null||ft===void 0?void 0:ft.map(function(It){return{label:It[Pe.label],value:It[Pe.value]}});return["tags","multiple"].includes(Ae)||F.multiple?gt:gt.shift()}};return(0,n.jsx)(me.default,r()({role:"button","data-testid":"select-object-".concat(Ae||"single"),value:qe(oe),defaultValue:qe(Ye),allowClear:{clearIcon:(0,n.jsx)(an.Z,{role:"button","aria-label":"icon-close-select"})},labelInValue:!0,notFoundContent:Ve?(0,n.jsx)(E.Z,{}):(0,n.jsx)(Kt.Z,{image:Kt.Z.PRESENTED_IMAGE_SIMPLE}),options:le,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,ge.toArr)(rt).map(function(ht){return ht.value}),ke||le,Pe);["tags","multiple"].includes(Ae)||F.multiple?se==null||se(ft):se==null||se(ft.shift()||null)},mode:Ae,tagRender:function(rt){return(0,n.jsx)(Ue.Z,r()(r()({role:"button","aria-label":rt.label,closeIcon:(0,n.jsx)(Ct.Z,{role:"button","aria-label":"icon-close-tag"})},rt),{},{children:rt.label}))}},et))},hn=function(F,oe){var le;return((le=oe==null?void 0:oe.label)!==null&&le!==void 0?le:"").toLowerCase().includes((F||"").toLowerCase())},Ft=(0,i.connect)(function(Q){var F=Q.objectValue,oe=Q.loading,le=Q.value,se=Q.rawOptions,Pe=Q.defaultValue,Ae=p()(Q,Yn),Ve=Q.multiple?"multiple":Q.mode;if(Ve&&!["multiple","tags"].includes(Ve)&&(Ve=void 0),F)return(0,n.jsx)(Gn,r()(r()({rawOptions:se},Ae),{},{defaultValue:Pe,value:le,mode:Ve,loading:oe}));var ke=function(et){return["tags","multiple"].includes(Q.mode)||Q.multiple?et?(0,ge.toArr)(et):void 0:et};return(0,n.jsx)(me.default,r()(r()({role:"button","data-testid":"select-".concat(Ve||"single"),showSearch:!0,filterOption:hn,allowClear:{clearIcon:(0,n.jsx)(an.Z,{role:"button","aria-label":"icon-close-select"})},popupMatchSelectWidth:!1,notFoundContent:oe?(0,n.jsx)(E.Z,{}):(0,n.jsx)(Kt.Z,{image:Kt.Z.PRESENTED_IMAGE_SIMPLE}),value:ke(le),defaultValue:ke(Pe),tagRender:function(et){return(0,n.jsx)(Ue.Z,r()(r()({role:"button","aria-label":et.label,closeIcon:(0,n.jsx)(Ct.Z,{role:"button","aria-label":"icon-close-tag"})},et),{},{children:et.label}))}},Ae),{},{onChange:function(et){var qe;(qe=Q.onChange)===null||qe===void 0||qe.call(Q,et===void 0?null:et)},mode:Ve}))},(0,i.mapProps)({dataSource:"options"},function(Q,F){return r()(r()({},Q),{},{fieldNames:r()(r()({},wt),Q.fieldNames),suffixIcon:F!=null&&F.loading||F!=null&&F.validating?(0,n.jsx)(st.Z,{}):Q.suffixIcon})}),(0,i.mapReadPretty)(Nn)),_t=Ft;_t.ReadPretty=Nn;var Pt=_t,Nt=e(36586),kt=function(F,oe){return(0,he.castArray)(F).filter(function(le){return le!=null}).map(function(le){return He()(le)==="object"?le[oe.value]:le})},Xt=(0,i.observer)(function(Q){var F=r()(r()({},wt),Q.fieldNames),oe=(0,i.useField)(),le=(0,i.useFieldSchema)(),se=(0,Nt.a)(),Pe=(0,P.XC)(),Ae=Pe.snapshot,Ve=(0,x.QT)(Ae?M()($()().mark(function Ye(){return $()().wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return qe.abrupt("return",{data:se[le.name]});case 1:case"end":return qe.stop()}},Ye)})):r()(r()({action:"list"},Q.service),{},{params:{paginate:!1,filter:Ke()({},F.value,{$in:kt(oe.value,F)})}}),{refreshDeps:[Q.service,oe.value]}),ke=Ve.data;return(0,n.jsx)(_t.ReadPretty,r()(r()({},Q),{},{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(Q){var F,oe,le=Q.fieldNames,se=le===void 0?{}:le,Pe=Q.service,Ae=Pe===void 0?{}:Pe,Ve=Q.wait,ke=Ve===void 0?300:Ve,Ye=Q.value,et=Q.defaultValue,qe=Q.objectValue,bt=Q.manual,rt=bt===void 0?!0:bt,ft=Q.mapOptions,ht=Q.targetField,gt=Q.CustomDropdownRender,It=Q.optionFilter,Wt=Q.dataSource,mn=p()(Q,dn),Qt=(0,yn.FC)(),zn=(0,zt.FE)(Wt||Qt),jn=(0,u.useState)(!1),tn=de()(jn,2),fn=tn[0],Ln=tn[1],In=(0,u.useRef)(!1),Dn=(0,i.useFieldSchema)(),Mn=((F=Dn["x-component-props"])===null||F===void 0?void 0:F.addMode)==="quickAdd",On=(0,c.useCollection_deprecated)(),En=On.getField,Co=(0,u.useRef)(null),Po=(0,c.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)&&(se==null?void 0:se.label)&&yo("".concat(Un.target,".").concat(se.label)),Qn=(0,u.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,u.useCallback)(function(nr){try{return nr.filter(function(Ho){return["number","string"].includes(He()(Ho[se.value]))}).map(function(Ho){var fr,Pr,rr=vo(Ho[se.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,n.jsx)(Ue.Z,{role:"button",color:Kr.color,style:{marginRight:3},children:(Kr==null?void 0:Kr.label)||Dr},Jr):(0,n.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,n.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={},Ke()(Ur,se.label,rr||nn),Ke()(Ur,se.value,Ho[se.value]),Ur))}return r()(r()({},Ho),{},(Pr={},Ke()(Pr,se.label,rr||nn),Ke()(Pr,se.value,Ho[se.value]),Pr))}).filter(Boolean)}catch(Ho){return console.error(Ho),nr}},[Rn==null?void 0:Rn.uiSchema,se]),no=(0,x.QT)(r()(r()({action:"list"},Ae),{},{headers:zn,params:r()(r()({pageSize:200},Ae==null?void 0:Ae.params),{},{filter:Ae==null||(oe=Ae.params)===null||oe===void 0?void 0:oe.filter})}),{manual:rt,debounceWait:ke}),co=no.data,po=no.run,Io=no.loading,No=(0,u.useMemo)(function(){return JSON.stringify({service:Ae,fieldNames:se})},[Ae,se]),Mo=(0,u.useCallback)(function(){return Co.current&>?(0,n.jsx)(gt,{search:Co.current,callBack:function(){Co.current=null,Ln(!1)}}):null},[Co.current]);(0,u.useEffect)(function(){In.current&&po()},[No]);var $o=function(){var nr=M()($()().mark(function Ho(fr){var Pr;return $()().wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:po({filter:(0,Zt.EO)([fr?Ke()({},se.label,Ke()({},Qn,fr)):{},Ae==null||(Pr=Ae.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,u.useMemo)(function(){var nr,Ho=Ye||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),{},Ke()({},se.value,Ho[se.value]||Ho))])||[],Pr=typeof It=="function"?co.data.filter(It):co.data;return(0,he.uniqBy)(Pr.concat(fr!=null?fr:[]),se.value)},[Ye,et,co==null?void 0:co.data,se.value,It]),sr=function(Ho){Ln(Ho),Co.current=null,Ho&&po(),In.current=!0};return(0,n.jsx)(_t,r()(r()({open:fn,popupMatchSelectWidth:!1,autoClearSearchValue:!0,filterOption:!1,filterSort:null,fieldNames:se,onSearch:$o,onDropdownVisibleChange:sr,objectValue:qe,value:Ye,defaultValue:et},mn),{},{loading:co?Io:!0,options:wn(pr),rawOptions:pr,dropdownRender:function(Ho){var fr=pr.some(function(Pr){return Pr[se.label]===Co.current});return(0,n.jsx)(n.Fragment,{children:Mn?(0,n.jsxs)(n.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,n.jsx)(Mt.Z,{style:{margin:0}}),!fr&&(0,n.jsx)(Mo,{})]}):Ho})}}))},(0,i.mapProps)({dataSource:"options"},function(Q,F){var oe,le=(0,i.useFieldSchema)();return r()(r()({},Q),{},{fieldNames:r()(r()(r()(r()({},wt),Q.fieldNames),F.componentProps.fieldNames),(oe=le["x-component-props"])===null||oe===void 0?void 0:oe.fieldNames),suffixIcon:F!=null&&F.loading||F!=null&&F.validating?(0,n.jsx)(st.Z,{}):Q.suffixIcon})}),(0,i.mapReadPretty)(Xt)),Vt=bn;Vt.ReadPretty=Xt;var dt=null,tt=function(){var F=(0,i.useFieldSchema)(),oe=(0,Ee.$)(),le=oe.t,se=(0,je.bz)(),Pe=se.duplicateData,Ae=(0,c.useCollectionManager_deprecated)(),Ve=Ae.getCollectionJoinField;if(Pe)return Pe;var ke=Bt(F),Ye=ke.items,et=Ye===void 0?[]:Ye,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 Wt=Ve("".concat(ht.collection,".").concat(It));return Wt?It:""}).filter(Boolean)}catch(It){(0,Y.error)(It),ht.fields=[]}});var rt=[{key:"none",title:le("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(F){var oe=F.style,le=oe===void 0?{}:oe,se=F.form,Pe=(0,Fe.dQ)(),Ae=Pe.token,Ve=tt(),ke=Ve.templates,Ye=Ve.display,et=Ve.enabled,qe=Ve.defaultTemplate,bt=(0,c.useCollectionManager_deprecated)(),rt=bt.getCollectionJoinField,ft=(0,Ie.ss)(ke),ht=(0,u.useState)((qe==null?void 0:qe.key)||"none"),gt=de()(ht,2),It=gt[0],Wt=gt[1],mn=(0,u.useState)(null),Qt=de()(mn,2),zn=Qt[0],jn=Qt[1],tn=(0,x.LY)(),fn=(0,Ee.$)(),Ln=fn.t;(0,u.useEffect)(function(){et&&qe&&se&&(se.__template=!0,qe.key==="duplicate"&&On(qe.dataId,qe))},[]),(0,u.useEffect)(function(){ft!=null&&ft.some(function(Co){return Co.key===It})||Mn("none")},[ft]);var In=(0,u.useMemo)(function(){return r()({display:"flex",alignItems:"center",backgroundColor:Ae.colorFillAlter,padding:Ae.padding},le)},[le,Ae.colorFillAlter]),Dn=(0,u.useMemo)(function(){return{fontSize:Ae.fontSize,fontWeight:"bold",whiteSpace:"nowrap",marginRight:Ae.marginXS}},[Ae.fontSize,Ae.marginXS]),Mn=(0,u.useCallback)(function(){var Co=M()($()().mark(function Po(yo){return $()().wrap(function(so){for(;;)switch(so.prev=so.next){case 0:Wt(yo),jn(null),se==null||se.reset();case 3:case"end":return so.stop()}},Po)}));return function(Po){return Co.apply(this,arguments)}}(),[]),On=(0,u.useCallback)(function(){var Co=M()($()().mark(function Po(yo,ro){var so;return $()().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 se&&Qn&&(se.reset(),se.__template=!0,(0,Y.forEach)(Qn,function(vo,wn){if(vo){var no;se.values[wn]=vo,se==null||(no=se.setInitialValuesIn)===null||no===void 0||no.call(se,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||!Ye)return null;var En=ft==null?void 0:ft.find(function(Co){return Co.key===It});return(0,n.jsx)("div",{style:In,children:(0,n.jsxs)(j.Z,{wrap:!0,children:[(0,n.jsxs)("label",{style:Dn,children:[Ln("Data template"),": "]}),(0,n.jsx)(me.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,n.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(Q){var F=(0,je.Fi)(Q);return F?ie().cloneDeep(F["x-data-templates"])||{}:{}}function we(Q,F,oe){return Me.apply(this,arguments)}function Me(){return Me=M()($()().mark(function Q(F,oe,le){return $()().wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:if(!(oe.fields.length===0||!oe.dataId)){Pe.next=2;break}return Pe.abrupt("return");case 2:return Pe.abrupt("return",F.resource(oe.collection).get({filterByTk:oe.dataId,fields:oe.fields,isTemplate:!0}).then(function(Ae){var Ve;return(Ve=Ae.data)===null||Ve===void 0?void 0:Ve.data}));case 3:case"end":return Pe.stop()}},Q)})),Me.apply(this,arguments)}var Le=e(3192),Ze=function(){var F,oe,le=(0,Te.aZ)(),se=(0,i.useFieldSchema)(),Pe=ue.Z.useToken(),Ae=Pe.token,Ve=(0,jt.ng)(),ke=Ve.designable,Ye=(0,Le.g)()||{},et=Ye.heightProps,qe=et||{},bt=qe.title,rt=tt(),ft=rt.display,ht=rt.enabled,gt=se.reduceProperties(function(On,En){return En["x-component"]==="ActionBar"?En:On}),It=Object.keys((gt==null?void 0:gt.properties)||{}).length>0,Wt=se==null||(F=se.parent)===null||F===void 0||(F=F["x-decorator"])===null||F===void 0||(oe=F.includes)===null||oe===void 0?void 0:oe.call(F,"FormBlockProvider"),mn=It||ke?Ae.controlHeight+(Wt?1:2)*Ae.marginLG:Ae.marginLG,Qt=bt?Ae.fontSizeLG*Ae.lineHeightLG+Ae.padding*2-1:0,zn=(0,be.hS)()||{},jn=zn.data,tn=(jn==null?void 0:jn.meta)||{},fn=tn.count,Ln=tn.pageSize,In=fn>Ln,Dn=In?Ae.controlHeightSM+1*Ae.paddingLG:0,Mn=ft&&ht?Ae.controlHeight+2*Ae.padding+Ae.margin:0;return le-mn-Ae.paddingLG-Qt-Dn-Mn},Xe,it,ut=["form","children"],xt=["form","children","disabled"],mt=["form","disabled"],ot=function(F){var oe=F.form,le=F.children,se=p()(F,ut),Pe=(0,i.useField)(),Ae=(0,i.useFieldSchema)(),Ve=(0,jt.lI)(oe.createVoidField(r()(r()({},Pe.props),{},{basePath:""}))),ke=Ze(),Ye=ue.Z.useToken(),et=Ye.token,qe=(0,jt.ng)(),bt=qe.designable;return(0,n.jsx)(i.FieldContext.Provider,{value:void 0,children:(0,n.jsx)(i.FormContext.Provider,{value:oe,children:(0,n.jsx)(S.FormLayout,r()(r()({layout:"vertical"},se),{},{children:(0,n.jsx)("div",{className:(0,ae.css)(Xe||(Xe=ce()([`
|
|
689
689
|
.nb-grid-container {
|
|
690
690
|
height: `,`;
|
|
691
691
|
overflow-y: auto;
|