@nocobase/app 1.2.25-alpha → 1.2.26-alpha

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