@nocobase/app 2.0.0 → 2.0.1

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.
@@ -1421,7 +1421,7 @@ ctx.render(<JsItem />);
1421
1421
  &:hover {
1422
1422
  background-color: `,`;
1423
1423
  }
1424
- `])),v.colorFillSecondary);return(0,p.jsxs)("div",{style:{maxHeight:300,overflowY:"auto"},children:[de.map(function(oe){return(0,p.jsx)("div",{role:"option",onClick:function(){return ye(oe.value)},className:me,children:E(oe.label)},oe.value)}),(0,p.jsx)(g.Z,{style:{margin:"4px 0"}}),be.map(function(oe){return(0,p.jsx)("div",{role:"option",className:me,onClick:function(){return ye(oe.value)},title:E(oe.label),children:E(oe.label)},oe.value)})]})};return(0,p.jsxs)(a.Z.Compact,{style:w()(w()({},I.style),{},{width:"100%"}),children:[(0,p.jsx)(H.default,w()(w()({options:te,open:re,onDropdownVisibleChange:q},I),{},{allowClear:!1,style:{width:"100%",minWidth:100,maxWidth:["past","next","exact",void 0].includes(N==null?void 0:N.type)?100:null},value:(N==null?void 0:N.type)||"exact",onChange:ye,dropdownRender:Pe})),["past","next"].includes(N==null?void 0:N.type)&&[(0,p.jsx)(z.Z,{value:N==null?void 0:N.number,onChange:function(de){var be=w()(w()({},N),{},{number:de});K(be)}},"number"),(0,p.jsx)(H.default,{value:N==null?void 0:N.unit,style:{minWidth:130,maxWidth:140},onChange:function(de){var be=w()(w()({},N),{},{unit:de});K(be)},options:[{value:"day",label:L("Day")},{value:"week",label:L("Calendar week")},{value:"month",label:L("Calendar Month")},{value:"year",label:L("Calendar Year")}],popupMatchSelectWidth:!0},"unit")],((N==null?void 0:N.type)==="exact"||!(N!=null&&N.type))&&(0,p.jsx)(b,w()({},I))]})}},20493:function(Zt,Oe,e){"use strict";e.d(Oe,{IW:function(){return M},LC:function(){return a},bt:function(){return Q},Fo:function(){return H},TR:function(){return $},OR:function(){return z}});var ue=e(97857),S=e.n(ue),le=e(13769),P=e.n(le),p=e(10274),U=e(60887),J=e(97133),C=e(94350),j=e(96486),A=e.n(j),O=e(67294),R=e(46917),w=e(84577),f=e(85893),B=["component","overStyle","style","children","openMode"],T=["schema","id","eid","removeParentsIfNoChildren"],g=["component"],a=(0,O.createContext)(null);a.displayName="DraggableContext";var H=(0,O.createContext)(null);H.displayName="SortableContext";var z=function(u){var V=u.id,I=u.data,N=u.children,K=(0,U.useDraggable)({id:V,data:I}),E=(0,U.useDroppable)({id:V,data:I}),F=(0,O.useMemo)(function(){return{draggable:K,droppable:E}},[K,E]);return(0,f.jsx)(H.Provider,{value:F,children:N})},X=function(u){return new p.C(u).setAlpha(.15).toHex8String()},Q=function(u){var V,I,N=u.component,K=u.overStyle,E=u.style,F=u.children,L=u.openMode,x=P()(u,B),v=(0,R.dQ)(),W=v.token,G=(0,O.useContext)(H),re=G.draggable,q=G.droppable,te=q.isOver,ye=q.setNodeRef,Pe=S()({},E),Ee=(0,C.useFieldSchema)(),de=(Ee==null?void 0:Ee["x-component"])==="Action.Link"||N==="a";return te&&(re==null||(V=re.active)===null||V===void 0?void 0:V.id)!==(q==null||(I=q.over)===null||I===void 0?void 0:I.id)&&(Pe[de?"color":"background"]=X(W.colorSettings),Object.assign(Pe,K)),O.createElement(N||"div",S()(S()({role:"none"},x),{},{className:(0,J.cx)("nb-sortable-designer",u.className),ref:ye,style:Pe}),F)},ce=function(u){var V=m(u),I=(0,C.useFieldSchema)();return u.schema?S()(S()({},u),{},{id:V}):S()(S()({},u),{},{id:V,schema:I})},m=function(u){var V,I=(0,C.useField)();return u.id?u.id:(V=I.address)===null||V===void 0?void 0:V.toString()},y=(0,C.observer)(function(b){var u=ce(b),V=u.schema,I=u.id,N=u.eid,K=u.removeParentsIfNoChildren,E=P()(u,T),F=(0,O.useMemo)(function(){var L,x;return{insertAdjacent:"afterEnd",schema:((L=V.parent)===null||L===void 0||(L=L.parent)===null||L===void 0?void 0:L["x-component"])==="BlockTemplate"?(x=V.parent)===null||x===void 0?void 0:x.parent:V,removeParentsIfNoChildren:K??!0}},[V,K]);return(0,f.jsx)(z,{id:I,data:F,children:(0,f.jsx)(Q,S()(S()({id:N},E),{},{children:b.children}))})},{displayName:"InternalSortableItem"}),$=O.memo(function(b){var u=b.component,V=P()(b,g),I=(0,w.ng)(),N=I.designable;return N?(0,f.jsx)(y,S()({},b)):O.createElement(u||"div",A().omit(V,["children","schema","overStyle","openMode","id","eid","removeParentsIfNoChildren"]),b.children)});$.displayName="SortableItem";var M=function(u){var V=(0,O.useContext)(H)||{},I=V.draggable;if(!I)return null;var N=I.attributes,K=I.listeners,E=I.setNodeRef;return(0,f.jsx)("div",{style:{display:"inline-block",width:14,height:14,lineHeight:"14px",textAlign:"left"},children:(0,f.jsx)("div",S()(S()(S()({ref:E,style:{position:"relative",zIndex:1,lineHeight:0,fontSize:0,display:"inline-block"}},K),N),{},{role:"none",children:(0,f.jsx)("span",{style:{cursor:"move",fontSize:14},children:u.children})}))})}},7840:function(Zt,Oe,e){"use strict";e.d(Oe,{I9:function(){return K},Rq:function(){return ce},e7:function(){return X},jC:function(){return $},od:function(){return Q}});var ue=e(97857),S=e.n(ue),le=e(9783),P=e.n(le),p=e(15009),U=e.n(p),J=e(5574),C=e.n(J),j=e(99289),A=e.n(j),O=e(52677),R=e.n(O),w=e(10110),f=e(96486),B=e.n(f),T=e(10097),g=e(63179),a=e(76690),H=e(65565),z=e(61341),X=function(L,x){var v,W=/{{(.*?)}}/,G=L==null||(v=L.match)===null||v===void 0?void 0:v.call(L,W);if(G){var re=B().get(x,G[1]);return B().isFunction(re)?re():re}else return L};function Q(F){if(R()(F)!=="object"||F===null)return null;for(var L in F)if(Object.prototype.hasOwnProperty.call(F,L))return Object.prototype.toString.call(F[L])==="[object Object]"&&F[L]!==null?Q(F[L]):{key:L,value:F[L]};return null}var ce=function(L){var x=m(L),v=(0,f.findIndex)(x,function(G,re,q){if(G.includes("$")&&re>0)return!0}),W=x.slice(0,v);return W};function m(F){var L=[];function x(v){Object.keys(v).sort().forEach(function(W){L.push(W),v[W]&&R()(v[W])==="object"&&x(v[W])})}return x(F),L}var y=function(){var F=A()(U()().mark(function L(x,v,W){var G,re,q,te;return U()().wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return G=(0,a.cG)(x)?[v.parseVariable(x,W).then(function(Ee){var de=Ee.value;return de})]:[x],Pe.prev=1,Pe.next=4,Promise.all(G);case 4:return re=Pe.sent,q=C()(re,1),te=q[0],Pe.abrupt("return",te);case 10:throw Pe.prev=10,Pe.t0=Pe.catch(1),console.error("Error in parseVariableValue:",Pe.t0),Pe.t0;case 14:case"end":return Pe.stop()}},L,null,[[1,10]])}));return function(x,v,W){return F.apply(this,arguments)}}(),$=function(){var F=A()(U()().mark(function L(x,v){var W,G,re,q,te,ye,Pe,Ee;return U()().wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return W=x.ruleGroup,G=x.variables,re=x.localVariables,q=x.variableNameOfLeftCondition,te=x.conditionType,ye=Object.keys(W)[0]||"$and",Pe=W[ye]||[],be.next=5,Promise.all(Pe.filter(Boolean).map(function(me){return M(me,G,re,q,te,v)}));case 5:if(Ee=be.sent,ye!=="$and"){be.next=10;break}return be.abrupt("return",(0,f.every)(Ee,function(me){return me}));case 10:if(!Ee.length){be.next=12;break}return be.abrupt("return",(0,f.some)(Ee,function(me){return me}));case 12:return be.abrupt("return",!0);case 13:case"end":return be.stop()}},L)}));return function(x,v){return F.apply(this,arguments)}}(),M=function(){var F=A()(U()().mark(function L(x,v,W,G,re,q){return U()().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(!("$and"in x||"$or"in x)){ye.next=4;break}return ye.next=3,$({ruleGroup:x,variables:v,localVariables:W,conditionType:re},q);case 3:return ye.abrupt("return",ye.sent);case 4:return ye.abrupt("return",re==="advanced"?b(x,v,W,q):u(x,v,W,G,q));case 5:case"end":return ye.stop()}},L)}));return function(x,v,W,G,re,q){return F.apply(this,arguments)}}(),b=function(){var F=A()(U()().mark(function L(x,v,W,G){var re,q,te;return U()().wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return re=x.op,Pe.next=3,y(x.rightVar,v,W);case 3:return q=Pe.sent,Pe.next=6,y(x.leftVar,v,W);case 6:if(te=Pe.sent,!re){Pe.next=9;break}return Pe.abrupt("return",G.apply(P()({},re,[te,q])));case 9:return Pe.abrupt("return",!0);case 10:case"end":return Pe.stop()}},L)}));return function(x,v,W,G){return F.apply(this,arguments)}}(),u=function(){var F=A()(U()().mark(function L(x,v,W,G,re){var q,te,ye,Pe,Ee,de,be,me,oe,ee,xe,ve,he,pe;return U()().wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(q=Q(x),te=q==null?void 0:q.key,te){se.next=4;break}return se.abrupt("return",!0);case 4:return ye=V(ce(x),G),Pe=v.parseVariable(ye,W,{doNotRequest:!0}).then(function(Ce){var Se=Ce.value;return Se}),Ee=(0,a.cG)(q==null?void 0:q.value)?[v.parseVariable(q==null?void 0:q.value,W).then(function(Ce){var Se=Ce.value;return Se}),Pe]:[q==null?void 0:q.value,Pe],se.prev=7,se.next=10,Promise.all(Ee);case 10:return de=se.sent,be=C()(de,2),me=be[0],oe=be[1],se.next=16,v.getCollectionField(ye,W);case 16:return ee=se.sent,xe=(0,H.J)(oe,{targetCollectionField:ee}),ve=(0,H.J)(me,{targetCollectionField:ee}),ee!=null&&ee.type&&["datetime","date","datetimeNoTz","dateOnly","unixTimestamp"].includes(ee.type)&&xe&&(he=(0,z.CE)(ve),pe=(0,w.getPickerFormat)(he),xe=(0,w.dayjs)(xe).format(pe)),se.abrupt("return",re.apply(P()({},te,[xe,ve])));case 23:throw se.prev=23,se.t0=se.catch(7),se.t0;case 26:case"end":return se.stop()}},L,null,[[7,23]])}));return function(x,v,W,G,re){return F.apply(this,arguments)}}();function V(F){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$nForm";return"{{ ".concat(L,".").concat(F.join(".")," }}")}var I=function(L){var x={};return L.map(function(v){x[v.name]=v.ctx}),x};function N(F){return F.replace(/{{\s*}}/g,'{{"{{}}"}}')}function K(F,L,x,v,W,G){return E.apply(this,arguments)}function E(){return E=A()(U()().mark(function F(L,x,v,W,G,re){var q,te,ye,Pe,Ee,de,be,me,oe,ee;return U()().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:if(!(x&&L==="handlebars")){ve.next=23;break}return w.Handlebars.registerHelper("t",function(he){if(typeof he=="string")return re(he,{ns:g.g})}),ve.prev=2,ye=N(x),Pe=w.Handlebars.compile(ye),Ee=I(W),de=(v==null||(q=v.ctxRef)===null||q===void 0?void 0:q.current)||{},be=de.$nDate,me={},Object.keys(be||{}).map(function(he){me[he]=be[he]()}),oe=Pe(S()(S()(S()({},v==null||(te=v.ctxRef)===null||te===void 0?void 0:te.current),Ee),{},{$nDate:me})),console.log(oe),ve.next=13,G(oe);case 13:return ve.abrupt("return",ve.sent);case 16:return ve.prev=16,ve.t0=ve.catch(2),/VariablesProvider: .* is not found/.test(ve.t0.message)||console.log(ve.t0),console.log(x),ve.abrupt("return",x);case 21:ve.next=36;break;case 23:return ve.prev=23,ve.next=26,(0,T.replaceVariableValue)(x,v,W);case 26:return ee=ve.sent,ve.next=29,G(ee);case 29:return ve.abrupt("return",ve.sent);case 32:return ve.prev=32,ve.t1=ve.catch(23),/VariablesProvider: .* is not found/.test(ve.t1.message)||console.log(ve.t1),ve.abrupt("return",x);case 36:case"end":return ve.stop()}},F,null,[[2,16],[23,32]])})),E.apply(this,arguments)}},25145:function(Zt,Oe,e){"use strict";e.d(Oe,{u:function(){return Q}});var ue=e(5574),S=e.n(ue),le=e(97857),P=e.n(le),p=e(13769),U=e.n(p),J=e(94350),C=e(96486),j=e(67294),A=e(96726),O=e(75585),R=e(22891),w={type:"void","x-component":"Action.Container","x-action":"view",title:'{{ t("View record") }}',"x-component-props":{className:"nb-action-popup"},properties:{tabs:{type:"void","x-component":"Tabs","x-component-props":{},"x-initializer":"popup:addTab",properties:{tab1:{type:"void",title:'{{t("Details")}}',"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"popup:common:addBlock",properties:{}}}}}}}},f=e(94804),B=e(57105),T=e(68304),g=e(85893),a=["WrappedComponent"],H=function(){var m=(0,J.useFieldSchema)(),y=(0,A.ngQ)(),$=y.insertAfterBegin,M=(0,j.useCallback)(function(b){var u=m.reduceProperties(function(V,I){return I["x-component"]==="Action.Container"?I:V},null);u||$((0,C.cloneDeep)(b))},[m,$]);return M},z=function(m){return m["x-component"]==="Action.Container"},X=function(m){var y=m.WrappedComponent,$=U()(m,a),M=(0,J.useFieldSchema)(),b=(0,R.ES)(),u=b.openPopup,V=(0,j.useRef)(!1),I=H(),N=(0,j.useRef)(M);N.current=M;var K=(0,j.useRef)(I);K.current=I;var E=(0,j.useRef)(u);E.current=u;var F=(0,j.useCallback)(function(){return N.current},[]),L=(0,j.useCallback)(function(){N.current.properties||(K.current(w),V.current=!0),V.current?(setTimeout(function(){E.current({customActionSchema:F()})}),V.current=!1):N.current.properties&&E.current()},[F]),x=(0,j.useMemo)(function(){return(0,C.debounce)(L,600,{leading:!0,trailing:!1})},[L]);return(0,j.useEffect)(function(){return function(){x.cancel()}},[x]),(0,g.jsx)("a",{onClick:x,children:(0,g.jsx)(y,P()({},$))})};function Q(ce){return function(m){var y=(0,j.useState)(!1),$=S()(y,2),M=$[0],b=$[1],u=(0,j.useState)(!1),V=S()(u,2),I=V[0],N=V[1],K=(0,f.Kx)(),E=(0,A.XCj)(),F=(0,J.useField)(),L=(0,J.useFieldSchema)(),x=(L==null?void 0:L["x-component-props"])||{},v=x.enableLink,W=x.openMode,G=x.openSize,re=(0,R.ES)(),q=re.visibleWithURL,te=re.setVisibleWithURL,ye=(0,j.useCallback)(function(de){b==null||b(de),te==null||te(de)},[te]),Pe=(0,j.useRef)(L);Pe.current=L;var Ee=E.setSubmitted;return v?(0,g.jsx)(O.OA,{visible:!1,children:(0,g.jsxs)(A.EIK,{button:(0,g.jsx)(ce,P()({},m)),visible:M||q,setVisible:ye,formValueChanged:I,setFormValueChanged:N,openMode:W,openSize:G,containerRefKey:"field-popup",fieldSchema:L,setSubmitted:Ee,children:[(0,g.jsx)(f.YQ,{name:K.name,children:(0,g.jsx)(A.G0E,{children:(0,g.jsx)(T.Rm,{children:(0,g.jsx)(B.sq,{onlyRenderProperties:!0,basePath:F==null?void 0:F.address,schema:L,filterProperties:z})})})}),(0,g.jsx)(X,P()(P()({},m),{},{WrappedComponent:ce}))]})}):(0,g.jsx)(ce,P()({},m))}}},61736:function(Zt,Oe,e){"use strict";e.d(Oe,{D:function(){return S}});var ue=e(67294),S=(0,ue.createContext)({});S.displayName="SchemaComponentContext.Provider"},44245:function(Zt,Oe,e){"use strict";e.d(Oe,{R:function(){return f}});var ue=e(97857),S=e.n(ue),le=e(13769),P=e.n(le),p=e(86201),U=e(94350),J=e(67294),C=e(47844),j=e(85893),A=["children","form"],O=["children"],R=function(T){var g=T.children,a=T.form,H=P()(T,A),z=(0,J.useContext)(U.SchemaOptionsContext),X=(0,J.useContext)(U.SchemaExpressionScopeContext),Q=S()(S()({},z==null?void 0:z.scope),X),ce=S()({},z==null?void 0:z.components);return(0,j.jsx)(U.FormProvider,S()(S()({},H),{},{form:a,children:(0,j.jsx)(C.G,{components:ce,scope:Q,children:g})}))},w=function(T){var g=T.children,a=P()(T,O),H=(0,J.useContext)(U.SchemaOptionsContext),z=(0,J.useContext)(U.SchemaExpressionScopeContext),X=S()(S()({},H==null?void 0:H.scope),z),Q=S()({},H==null?void 0:H.components),ce=(0,J.useMemo)(function(){return(0,p.createForm)()},[]);return(0,j.jsx)(U.FormProvider,S()(S()({},a),{},{form:ce,children:(0,j.jsx)(C.G,{components:Q,scope:X,children:g})}))},f=function(T){return T.form?(0,j.jsx)(R,S()({},T)):(0,j.jsx)(w,S()({},T))}},93587:function(Zt,Oe,e){"use strict";e.d(Oe,{m:function(){return g}});var ue=e(97857),S=e.n(ue),le=e(86201),P=e(94350),p=e(74330),U=e(67294),J=e(54195),C=e(21044),j=e(84577),A=e(44245),O=e(93323),R=e(12174),w=function(H){var z=H.uid,X=H.type,Q=X===void 0?"getJsonSchema":X,ce=H.onSuccess,m={url:"/uiSchemas:".concat(Q,"/").concat(z)},y=(0,R.QT)(m,{refreshDeps:[z],onSuccess:function(u){ce&&ce(u)}}),$=y.data,M=y.loading;return{schema:$==null?void 0:$.data,loading:M}},f=e(85893),B=function(H){return H},T=function(H){var z=H.noForm,X=H.onlyRenderProperties,Q=H.hidden,ce=H.scope,m=H.uid,y=H.components,$=H.onSuccess,M=H.NotFoundPage,b=H.schemaTransform,u=b===void 0?B:b,V=H.onPageNotFind,I=X?"getProperties":"getJsonSchema",N=(0,U.useMemo)(function(){return(0,le.createForm)()},[m]),K=w({uid:m,type:I,onSuccess:function(re){$&&$(re)}}),E=K.schema,F=K.loading,L=(0,j.Co)(M),x=(0,J.Kk)(),v=(0,P.useFieldSchema)(),W=(0,U.useMemo)(function(){return u(E||{})},[E,u]);return x||F||Q?(0,f.jsx)(p.Z,{style:{width:"100%",marginTop:20},delay:C.fw}):!E||Object.keys(E).length===0?(V&&V(),L?(0,f.jsx)(L,{}):null):z?(0,f.jsx)(O.n,{components:y,scope:ce,schema:W,parentSchema:v}):(0,f.jsx)(A.R,{form:N,children:(0,f.jsx)(O.n,{components:y,scope:ce,schema:W,parentSchema:v})})},g=(0,U.memo)(function(a){return a.uid?(0,f.jsx)(T,S()({},a)):null});g.displayName="RemoteSchemaComponent"},93323:function(Zt,Oe,e){"use strict";e.d(Oe,{A:function(){return z},n:function(){return ce}});var ue=e(97857),S=e.n(ue),le=e(13769),P=e.n(le),p=e(9783),U=e.n(p),J=e(94350),C=e(96486),j=e.n(C),A=e(67294),O=e(57105),R=e(61736),w=e(47844),f=e(85893),B=["components","scope","schema","distributed","onChange","parentSchema"],T=["schema","parentSchema"],g=["memoized"];function a(m){return J.Schema.isSchemaInstance(m)?m:m!=null&&m.name?new J.Schema({type:"object",properties:U()({},m.name,m),name:"p_".concat(m.name)}):new J.Schema(m)}var H=function(y){return(0,A.useMemo)(function(){return a(y)},[])},z=(0,A.createContext)({onChange:j().noop}),X=(0,A.memo)(function(m){var y=m.components,$=m.scope,M=m.schema,b=m.distributed,u=m.onChange,V=m.parentSchema,I=P()(m,B),N=(0,A.useContext)(R.D),K=(0,A.useMemo)(function(){return a(M)},[M]),E=(0,A.useMemo)(function(){return S()(S()({},N),{},{distributed:N.distributed==!1?!1:b,refresh:N.refresh||j().noop})},[N,b]),F=(0,A.useContext)(z),L=F.onChange,x=(0,A.useMemo)(function(){return{onChange:function(){u==null||u(K),L==null||L()}}},[u,L,K]);return(0,f.jsx)(z.Provider,{value:x,children:(0,f.jsx)(R.D.Provider,{value:E,children:(0,f.jsx)(w.G,{inherit:!0,components:y,scope:$,children:(0,f.jsx)(O.sq,S()(S()({},I),{},{schema:K,isUseFormilyField:!0,parentSchema:V}))})})})});X.displayName="RecursionSchemaComponent";var Q=(0,A.memo)(function(m){var y=m.schema,$=m.parentSchema,M=P()(m,T),b=H(y);return(0,f.jsx)(X,S()(S()({},M),{},{schema:b,parentSchema:$}))});Q.displayName="MemoizedSchemaComponent";var ce=(0,A.memo)(function(m){var y=m.memoized,$=P()(m,g);return y?(0,f.jsx)(Q,S()({},$)):(0,f.jsx)(X,S()({},$))});ce.displayName="SchemaComponent"},47844:function(Zt,Oe,e){"use strict";e.d(Oe,{B:function(){return U},G:function(){return J}});var ue=e(97857),S=e.n(ue),le=e(94350),P=e(67294),p=e(85893),U=function(){var j=(0,P.useContext)(le.SchemaOptionsContext);return j||{}},J=(0,P.memo)(function(C){var j=C.children,A=U(),O=(0,P.useMemo)(function(){return S()(S()({},A.components),C.components)},[A.components,C.components]),R=(0,P.useMemo)(function(){return S()(S()({},A.scope),C.scope)},[A.scope,C.scope]),w=(0,P.useMemo)(function(){return{scope:R,components:O}},[R,O]);return(0,p.jsx)(le.SchemaOptionsContext.Provider,{value:w,children:(0,p.jsx)(le.SchemaComponentsContext.Provider,{value:O,children:(0,p.jsx)(le.ExpressionScope,{value:R,children:j})})})});J.displayName="SchemaComponentOptions"},70993:function(Zt,Oe,e){"use strict";e.d(Oe,{_b:function(){return M},RV:function(){return b.R},m1:function(){return u.m},n6:function(){return V.n},AT:function(){return V.A},G0:function(){return I.G},a$:function(){return Ee},Tz:function(){return ye},Bs:function(){return I.B}});var ue=e(15009),S=e.n(ue),le=e(99289),P=e.n(le),p=e(12444),U=e.n(p),J=e(72004),C=e.n(J),j=e(31996),A=e.n(j),O=e(26037),R=e.n(O),w=e(97857),f=e.n(w),B=e(18205),T=e(83062),g=e(83622),a=e(67294),H=e(49218),z=e(26793),X=e(96726),Q=e(68230),ce=e(80940),m=e(85893),y={backgroundColor:"var(--colorSettings) !important"},$={backgroundColor:"transparent"},M=function(me){var oe=(0,X.ngQ)(),ee=oe.designable,xe=oe.setDesignable,ve=(0,z.$)(),he=ve.t,pe=(0,Q.d)(),De=pe.token,se=ee?y:$,Ce=(0,ce.wd)(),Se=Ce.isMobileLayout;return(0,H.y1)("Ctrl+Shift+U",function(){return xe(!ee)},[ee]),Se?null:(0,m.jsx)(T.Z,{title:he("UI Editor"),children:(0,m.jsx)(g.ZP,{"data-testid":"ui-editor-button",icon:(0,m.jsx)(B.Z,{style:{color:De.colorTextHeaderMenu}}),title:he("UI Editor"),style:f()(f()({},se),me.style),onClick:function(){xe(!ee)}})})},b=e(44245),u=e(93587),V=e(93323),I=e(47844),N=e(5574),K=e.n(N),E=e(86201),F=e(94350),L=e(84327),x=e(96486),v=e.n(x),W=e(61736),G=e(2483),re=function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return"".concat(me).concat((0,L.uid)())};F.Schema.silent(!0);var q={},te={silent:!0,compile:function(me){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee=function(){if(te.silent)try{return new Function("$root","with($root) { return (".concat(me,"); }"))(oe)}catch{return"{{".concat(me,"}}")}else return new Function("$root","with($root) { return (".concat(me,"); }"))(oe)};return q[me]?q[me]:me.trim().startsWith("t(")?(q[me]=ee(),q[me]):ee()}};F.Schema.registerCompiler(te.compile);var ye=function(me){var oe=me.designable,ee=me.onDesignableChange,xe=me.components,ve=me.children,he=(0,a.useContext)(W.D),pe=(0,I.B)(),De=(0,a.useState)(function(){return(0,L.uid)()}),se=K()(De,2),Ce=se[0],Se=se[1],Te=(0,a.useMemo)(function(){return me.form||(0,E.createForm)()},[Ce]),Ie=(0,z.$)(),Fe=Ie.t,_e=(0,G.qD)(),we=(0,a.useMemo)(function(){return f()(f()({},me.scope),{},{t:Fe,randomString:re})},[me.scope,Fe,pe==null?void 0:pe.scope]),We=(0,a.useState)(oe),tt=K()(We,2),ze=tt[0],je=tt[1],Ve=(0,a.useMemo)(function(){return typeof oe=="boolean"?oe:ze},[oe,ze,he.designable]),Ae=(0,a.useMemo)(function(){return function(ae){typeof Ve!="boolean"&&je(ae),ee==null||ee(ae)}},[Ve,ee]);(0,a.useEffect)(function(){var ae,Me;Ve?(ae=_e.flowEngine)===null||ae===void 0||(ae=ae.flowSettings)===null||ae===void 0||ae.enable():(Me=_e.flowEngine)===null||Me===void 0||(Me=Me.flowSettings)===null||Me===void 0||Me.disable()},[_e,Ve]);var Re=(0,a.useCallback)(function(){Se((0,L.uid)())},[]),Be=(0,a.useMemo)(function(){return{scope:we,components:xe,reset:Re,refresh:v().noop,designable:Ve,setDesignable:Ae}},[xe,Ve,Re,we,Ae]);return(0,m.jsx)(W.D.Provider,{value:Be,children:(0,m.jsx)(F.FormProvider,{form:Te,children:(0,m.jsx)(I.G,{inherit:!0,scope:we,components:xe,children:ve})})})};ye.displayName="SchemaComponentProvider";var Pe=e(31601),Ee=function(be){A()(oe,be);var me=R()(oe);function oe(){return U()(this,oe),me.apply(this,arguments)}return C()(oe,[{key:"load",value:function(){var ee=P()(S()().mark(function ve(){return S()().wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:this.addComponents();case 1:case"end":return pe.stop()}},ve,this)}));function xe(){return ee.apply(this,arguments)}return xe}()},{key:"addComponents",value:function(){this.app.addComponents({DesignableSwitch:M})}}]),oe}(Pe.S),de=null},84577:function(Zt,Oe,e){"use strict";e.d(Oe,{zz:function(){return J.zz},Pl:function(){return J.Pl},oB:function(){return J.oB},lI:function(){return S},hi:function(){return X.hi},eJ:function(){return le.e},Co:function(){return U},aZ:function(){return X.aZ},ng:function(){return J.ng},et:function(){return C.e},cL:function(){return T},fd:function(){return Q},Cl:function(){return O},vH:function(){return H},sR:function(){return J.sR},wN:function(){return z.w},Dm:function(){return w},fM:function(){return X.fM}});var ue=e(67294),S=function(m){var y=(0,ue.useRef)(null);return(0,ue.useEffect)(function(){return y.current&&m!==y.current&&y.current.onUnmount(),y.current=m,m.onMount(),function(){m.onUnmount()}},[m]),m},le=e(96365),P=e(94350),p=e(96486),U=function(m,y){var $=(0,ue.useContext)(P.SchemaOptionsContext),M=$.components;return m?typeof m!="string"?m:(0,p.get)(M,m)||y:y},J=e(94516),C=e(98146),j=e(97857),A=e.n(j),O=function(m){var y=(0,ue.useContext)(P.SchemaOptionsContext),$=(0,ue.useContext)(P.SchemaExpressionScopeContext),M=(0,ue.useRef)();return M.current=$,m.toFieldProps(A()(A()({},y),{},{get scope(){return A()(A()({},y.scope),M.current)}}))},R=e(61736);function w(){return(0,ue.useContext)(R.D)}var f=e(26793),B=e(6145),T=function(){var m,y=(0,B.useCollectionManager_deprecated)(),$=y.getCollectionJoinField,M=y.getCollection,b=(0,P.useFieldSchema)(),u=(0,B.useCollection_deprecated)(),V=u.getField,I=V(b.name)||$(b["x-collection-field"]),N=(0,f.$)(),K=N.t,E=((m=b["x-component-props"])===null||m===void 0?void 0:m.fieldNames)||{},F=E.label,L=(0,ue.useMemo)(function(){if(!(!I||!(I!=null&&I.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m"].includes(I.interface)){var x=M(I.target);if((x==null?void 0:x.template)==="file")return[{label:K("Record picker"),value:"CollectionField"},{label:K("Select"),value:"AssociationSelect"}];switch(I.interface){case"o2m":return[{label:K("Record picker"),value:"CollectionField"},{label:K("Subtable"),value:"TableField"},{label:K("Select"),value:"AssociationSelect"}];case"m2o":case"m2m":case"linkTo":return[{label:K("Record picker"),value:"CollectionField"},{label:K("Select"),value:"AssociationSelect"}];default:return[{label:K("Record picker"),value:"CollectionField"},{label:K("Subform"),value:"FormField"},{label:K("Select"),value:"AssociationSelect"}]}}},[K,I==null?void 0:I.interface,F]);return L},g=e(35746),a=e(58837),H=function(){var m,y=(0,P.useField)(),$=(0,P.useFieldSchema)(),M=(0,a.Kx)(),b=(0,g.d9)(),u=(M==null?void 0:M.getField($.name))||(b==null?void 0:b.getCollectionField($["x-collection-field"])),V=(0,le.e)();(0,ue.useEffect)(function(){if(!(y!=null&&y.title)){var I;y.title=V(u==null||(I=u.uiSchema)===null||I===void 0?void 0:I.title)}},[u==null||(m=u.uiSchema)===null||m===void 0?void 0:m.title])},z=e(9780),X=e(18686),Q=function(m){var y,$=(0,f.$)(),M=$.t,b=(0,B.useCollectionManager_deprecated)(),u=b.getCollectionJoinField,V=b.getCollection,I=(0,P.useFieldSchema)(),N=(m==null?void 0:m.fieldSchema)||I,K=(0,P.useField)(),E=(0,P.useForm)(),F=(N==null?void 0:N["x-read-pretty"])||K.readPretty||E.readPretty,L=m==null?void 0:m.fieldSchema,x=(0,B.useCollection_deprecated)(),v=x.getField,W=(m==null?void 0:m.collectionField)||v(N.name)||u(N["x-collection-field"]),G=((y=N["x-component-props"])===null||y===void 0?void 0:y.fieldNames)||{},re=G.label,q=(0,ue.useMemo)(function(){if(!(!W||!(W!=null&&W.interface))&&["hasOne","hasMany","belongsTo","belongsToMany","belongsToArray"].includes(W.type)){var te=V(W.target);if((te==null?void 0:te.template)==="file")return F?[{label:M("Title"),value:"Select"},{label:M("File manager"),value:"FileManager"},{label:M("Tag"),value:"Tag"}]:[{label:M("Select"),value:"Select"},{label:M("Record picker"),value:"Picker"},{label:M("File manager"),value:"FileManager"}];if((te==null?void 0:te.template)==="tree"&&["m2m","o2m","m2o"].includes(W.interface))return F?[{label:M("Title"),value:"Select"},{label:M("Tag"),value:"Tag"},!L&&{label:M("Sub-details"),value:"Nester"},!L&&{label:M("Sub-table"),value:"SubTable"}]:[{label:M("Select"),value:"Select"},{label:M("Record picker"),value:"Picker"},!L&&["m2m","o2m"].includes(W.interface)&&{label:M("Sub-table"),value:"SubTable"},!L&&{label:M("Cascader Select"),value:"CascadeSelect"},!L&&{label:M("Sub-form"),value:"Nester"},{label:M("Sub-form(Popover)"),value:"PopoverNester"}];switch(W.interface){case"o2m":return F?[{label:M("Title"),value:"Select"},{label:M("Tag"),value:"Tag"},!L&&{label:M("Sub-table"),value:"SubTable"},!L&&{label:M("Sub-details"),value:"Nester"}]:[{label:M("Select"),value:"Select"},{label:M("Record picker"),value:"Picker"},!L&&{label:M("Sub-form"),value:"Nester"},{label:M("Sub-form(Popover)"),value:"PopoverNester"},!L&&{label:M("Sub-table"),value:"SubTable"}];case"m2m":case"mbm":return F?[{label:M("Title"),value:"Select"},{label:M("Tag"),value:"Tag"},!L&&{label:M("Sub-details"),value:"Nester"},!L&&{label:M("Sub-table"),value:"SubTable"}]:[{label:M("Select"),value:"Select"},{label:M("Record picker"),value:"Picker"},!L&&{label:M("Sub-table"),value:"SubTable"},!L&&{label:M("Sub-form"),value:"Nester"},{label:M("Sub-form(Popover)"),value:"PopoverNester"}];case"m2o":case"linkTo":return F?[{label:M("Title"),value:"Select"},{label:M("Tag"),value:"Tag"},!L&&{label:M("Sub-details"),value:"Nester"}]:[{label:M("Select"),value:"Select"},{label:M("Record picker"),value:"Picker"},!L&&{label:M("Sub-form"),value:"Nester"},{label:M("Sub-form(Popover)"),value:"PopoverNester"}];default:return F?[{label:M("Title"),value:"Select"},{label:M("Tag"),value:"Tag"},!L&&{label:M("Sub-details"),value:"Nester"}]:[{label:M("Select"),value:"Select"},{label:M("Record picker"),value:"Picker"},!L&&{label:M("Sub-form"),value:"Nester"},{label:M("Sub-form(Popover)"),value:"PopoverNester"}]}}},[M,W==null?void 0:W.interface,re,F,L]);return(q||[]).filter(Boolean)}},18686:function(Zt,Oe,e){"use strict";e.d(Oe,{aZ:function(){return ce},fM:function(){return y},hi:function(){return m}});var ue=e(5574),S=e.n(ue),le=e(97857),P=e.n(le),p=e(94350),U=e(83204),J=e(9361),C=e(96486),j=e.n(C),A=e(67294),O=e(89250),R=e(96726),w=e(21143),f=e(10097),B=e(1892),T=e(28561),g=function(b,u,V,I,N){return N.includes("/popups/")?2*I.paddingContentVertical+22+I.paddingPageVertical:b?I.paddingContentHorizontalLG:V?u?I.controlPaddingHorizontal+3*I.controlPaddingHorizontalSM+22+I.paddingContentHorizontalLG:I.paddingContentHorizontalLG+12:u?I.paddingSM+I.controlHeight+I.marginXS+2*I.controlPaddingHorizontalSM+22+I.paddingContentHorizontalLG:I.controlHeight+I.marginXS+(I.paddingContentVertical+2)*2+I.paddingContentHorizontalLG},a=function(b){var u=J.Z.useToken(),V=u.token,I=(0,R.ngQ)(),N=I.designable,K=(0,f.useBlockHeightProps)(),E=K.heightProps,F=(0,O.useLocation)(),L=b||E||{},x=L.disablePageHeader,v=L.enablePageTabs,W=L.hidePageTitle,G=V.sizeXXL-2,re=N?V.controlHeight+2*V.paddingContentHorizontalLG:1*V.paddingContentHorizontalLG,q=g(x,v,W,V,F.pathname);return G+q+re},H=function(){var b=J.Z.useToken(),u=b.token,V=(0,R.ngQ)(),I=V.designable,N=u.paddingContentVerticalLG+u.margin+2*u.paddingContentVertical+24,K=I?u.controlHeight+2*u.paddingContentHorizontalLG:1*u.paddingContentHorizontalLG;return N+K},z=function(b){var u=(0,p.useFieldSchema)(),V=$(u),I=a(b),N=H();return V?N:I},X=["workflowManualTasks","approvals","approvalRecords"],Q=function(){var b,u=J.Z.useToken(),V=u.token,I=(0,f.useBlockHeightProps)(),N=I.heightProps,K=(0,B.Si)(),E=K.heightProps,F=(0,R.ngQ)(),L=F.designable,x=(0,p.useFieldSchema)(),v=E||N,W=N.titleHeight,G=z(v),re=(0,w.useCollection)(),q=re.name,te=v.heightMode,ye=v.height,Pe=v.title;if(!(!(v!=null&&v.heightMode)||te===T.j.DEFAULT)){var Ee=Object.keys(((b=x.parent.properties.actions)===null||b===void 0?void 0:b.properties)||{}).length>0,de=V.controlHeight+V.padding+V.marginLG,be=Ee||L?V.controlHeight+2*V.marginLG:V.marginLG,me=(L&&!X.includes(q)?V.controlHeight:22)+2*V.padding+1,oe=Pe?W:0;return te===T.j.FULL_HEIGHT?window.innerHeight-G-oe-me-be-de:ye-oe-be-me-de}},ce=function(b){var u=(0,f.useBlockHeightProps)(),V=u.heightProps,I=z(),N=V||{},K=N.heightMode,E=N.height,F=N.title,L=N.titleHeight,x=F?L:0;if(!(!(V!=null&&V.heightMode)||K===T.j.DEFAULT)){if(K===T.j.FULL_HEIGHT){var v=window.innerHeight-I;return b!=null&&b.removeBlockHeaderHeight&&(v=v-x),b!=null&&b.innerExtraHeight&&(v=v-b.innerExtraHeight),v}return E}},m=function(){var b=(0,p.useFieldSchema)(),u=(0,A.useMemo)(function(){return(0,f.getPageSchema)(b)},[]),V=(u==null?void 0:u["x-component-props"])||{},I=V.disablePageHeader,N=V.enablePageTabs,K=V.hidePageTitle,E=P()(P()({},b==null?void 0:b["x-component-props"]),{},{disablePageHeader:I,enablePageTabs:N,hidePageTitle:K}),F=z(E),L=E||{},x=L.heightMode,v=L.height;if(!(!(E!=null&&E.heightMode)||x===T.j.DEFAULT))return x===T.j.FULL_HEIGHT?window.innerHeight-F:v},y=function(){var b=(0,A.useState)(),u=S()(b,2),V=u[0],I=u[1],N=(0,A.useRef)(null),K=Q(),E=(0,A.useCallback)((0,C.debounce)(function(){var L;if(N.current){var x=N.current.getBoundingClientRect(),v=(L=N.current.querySelector(".ant-table"))===null||L===void 0?void 0:L.getBoundingClientRect();v&&I(x.width)}},100),[K]),F=(0,A.useCallback)(function(L){N.current=L&&L.children?L.children[0]:null,E()},[E]);return(0,U.Z)("resize",E),{height:K,width:V,tableSizeRefCallback:F}},$=function M(b){if(!b)return null;if(b["x-component"]==="Action.Container"){var u;return(b==null||(u=b.parent)===null||u===void 0||(u=u["x-component-props"])===null||u===void 0?void 0:u.openMode)!=="page"}return M(b.parent)}},96365:function(Zt,Oe,e){"use strict";e.d(Oe,{e:function(){return j}});var ue=e(97857),S=e.n(ue),le=e(52677),P=e.n(le),p=e(94350),U=e(67294),J={},C=function(O){var R=/{{.*?}}/g;return R.test(O)},j=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{noCache:!1},R=O.noCache,w=(0,U.useContext)(p.SchemaOptionsContext),f=(0,U.useContext)(p.SchemaExpressionScopeContext);return function(B,T){var g=!1,a;if(typeof B=="string"&&B.startsWith("{{")&&(g=!0,a=B),B&&P()(B)==="object"&&!(0,U.isValidElement)(B)){try{a=JSON.stringify(B)}catch(z){return console.warn("Failed to stringify:",z),B}if(J[a])return J[a];g=C(a)}if(Array.isArray(B)){try{a=JSON.stringify(B)}catch(z){return console.warn("Failed to stringify:",z),B}if(J[a])return J[a];g=C(a)}if(g){var H=S()(S()(S()({},w==null?void 0:w.scope),f),T);if(!a)return p.Schema.compile(B,H);try{return R?p.Schema.compile(B,H):(J[a]=J[a]||p.Schema.compile(B,H),J[a])}catch(z){return console.log("useCompile error",B,z),p.Schema.compile(B,H)}}return B}}},94516:function(Zt,Oe,e){"use strict";e.d(Oe,{zz:function(){return te},Pl:function(){return x},oB:function(){return re},ng:function(){return Pe},sR:function(){return ye}});var ue=e(5574),S=e.n(ue),le=e(19632),P=e.n(le),p=e(15009),U=e.n(p),J=e(99289),C=e.n(J),j=e(12444),A=e.n(j),O=e(72004),R=e.n(O),w=e(9783),f=e.n(w),B=e(97857),T=e.n(B),g=e(94350),a=e(84327),H=e(90105),z=e(45360),X=e(50361),Q=e.n(X),ce=e(27361),m=e.n(ce),y=e(36968),$=e.n(y),M=e(67294),b=e(26793),u=e(12174),V=e(57105),I=e(98902),N=e(61736);function K(Ee,de){if(Ee)return Ee["x-app-version"]||(Ee["x-app-version"]=de),Object.keys(Ee.properties||{}).forEach(function(be){var me;K((me=Ee.properties)===null||me===void 0?void 0:me[be],de)}),Ee}var E={i8:"2.0.0"},F=e(80940),L=e(85893);function x(Ee){return new te(Ee)}var v=function Ee(de){de&&(de["x-uid"]||(de["x-uid"]=(0,a.uid)()),Object.keys(de.properties||{}).forEach(function(be){Ee(de.properties[be])}))},W=function(de){return de},G=function(de,be){if(!(!de||!be)){for(var me in be)if(Object.prototype.hasOwnProperty.call(be,me)){var oe=be[me];if(oe!==(de==null?void 0:de[me]))return!1}return!0}},re=function(de,be){if(de["x-uid"]&&de["x-uid"]===be["x-uid"])return[null,de.toJSON()];var me=de.toJSON(),oe=T()(T()({},me),{},{properties:{}}),ee=null,xe=function ve(he,pe){Object.keys(he||{}).forEach(function(De){var se=he[De];if(se["x-uid"]===be["x-uid"]){ee=he[De];return}else pe.properties[De]=T()(T()({},se),{},{properties:{}}),ve(se==null?void 0:se.properties,pe.properties[De])})};return xe(me.properties,oe),[oe,ee]},q=function(de){return de},te=function(){function Ee(de){A()(this,Ee),f()(this,"current",void 0),f()(this,"options",void 0),f()(this,"appVersion",void 0),f()(this,"events",{}),this.options=de,this.current=de.current,this.appVersion=de.appVersion}return R()(Ee,[{key:"model",get:function(){return this.options.model}},{key:"query",get:function(){return this.options.query}},{key:"loadAPIClientEvents",value:function(){var be=this,me=this.options,oe=me.api,ee=me.t,xe=ee===void 0?q:ee;if(oe){var ve=function(pe){if(!pe)return[];var De=Object.values(pe.properties).length,se=[];return pe.mapProperties(function(Ce){Ce["x-component-props"]=Ce["x-component-props"]||{},Ce["x-component-props"].width=100/De,Ce["x-uid"]&&se.push({"x-uid":Ce["x-uid"],"x-component-props":Ce["x-component-props"]})}),pe["x-uid"]&&se.length?se:[]};this.on("insertAdjacent",function(){var he=C()(U()().mark(function pe(De){var se,Ce,Se,Te,Ie,Fe,_e,we,We,tt;return U()().wrap(function(je){for(;;)switch(je.prev=je.next){case 0:if(Ce=De.onSuccess,Se=De.current,Te=De.position,Ie=De.schema,Fe=De.wrap,_e=De.wrapped,we=De.removed,We=[],(_e==null?void 0:_e["x-component"])==="Grid.Col"&&(We=We.concat(ve(_e.parent))),(we==null?void 0:we["x-component"])==="Grid.Col"&&(We=We.concat(ve(we.parent))),be.refresh(),Se["x-uid"]){je.next=7;break}return je.abrupt("return");case 7:return je.next=9,oe.request({url:"/uiSchemas:insertAdjacent/".concat(Se["x-uid"],"?position=").concat(Te),method:"post",data:{schema:K(Ie,be.appVersion),wrap:Fe}});case 9:if(tt=je.sent,!We.length){je.next=13;break}return je.next=13,oe.request({url:"/uiSchemas:batchPatch",method:"post",data:We});case 13:if(!(we!=null&&we["x-uid"])){je.next=16;break}return je.next=16,oe.request({url:"/uiSchemas:remove/".concat(we["x-uid"]),method:"post"});case 16:Ce==null||Ce(tt==null||(se=tt.data)===null||se===void 0?void 0:se.data),z.ZP.success(xe("Saved successfully"),.2);case 18:case"end":return je.stop()}},pe)}));return function(pe){return he.apply(this,arguments)}}()),this.on("patch",function(){var he=C()(U()().mark(function pe(De){var se;return U()().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(se=De.schema,be.refresh(),se!=null&&se["x-uid"]){Se.next=4;break}return Se.abrupt("return");case 4:return Se.next=6,oe.request({url:"/uiSchemas:patch",method:"post",data:T()({},se)});case 6:z.ZP.success(xe("Saved successfully"),.2);case 7:case"end":return Se.stop()}},pe)}));return function(pe){return he.apply(this,arguments)}}()),this.on("initializeActionContext",function(){var he=C()(U()().mark(function pe(De){var se;return U()().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(se=De.schema,se!=null&&se["x-uid"]){Se.next=3;break}return Se.abrupt("return");case 3:return Se.next=5,oe.request({url:"/uiSchemas:initializeActionContext",method:"post",data:T()({},se)});case 5:case"end":return Se.stop()}},pe)}));return function(pe){return he.apply(this,arguments)}}()),this.on("batchPatch",function(){var he=C()(U()().mark(function pe(De){var se;return U()().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return se=De.schemas,be.refresh(),Se.next=4,oe.request({url:"/uiSchemas:batchPatch",method:"post",data:se});case 4:z.ZP.success(xe("Saved successfully"),.2);case 5:case"end":return Se.stop()}},pe)}));return function(pe){return he.apply(this,arguments)}}()),this.on("remove",function(){var he=C()(U()().mark(function pe(De){var se,Ce;return U()().wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:if(se=De.removed,Ce=[],(se==null?void 0:se["x-component"])==="Grid.Col"&&(Ce=ve(se.parent)),be.refresh(),se!=null&&se["x-uid"]){Te.next=6;break}return Te.abrupt("return");case 6:return Te.next=8,oe.request({url:"/uiSchemas:remove/".concat(se["x-uid"]),method:"post"});case 8:if(!Ce.length){Te.next=11;break}return Te.next=11,oe.request({url:"/uiSchemas:batchPatch",method:"post",data:Ce});case 11:z.ZP.success(xe("Saved successfully"),.2);case 12:case"end":return Te.stop()}},pe)}));return function(pe){return he.apply(this,arguments)}}())}}},{key:"prepareProperty",value:function(be){be.type||(be.type="void"),be.name||(be.name=(0,a.uid)()),this.current["x-uid"]&&v(be)}},{key:"on",value:function(be,me){this.events[be]||(this.events[be]=[]),this.events[be].push(me)}},{key:"emit",value:function(){var de=C()(U()().mark(function me(oe){var ee=this,xe,ve,he,pe,De,se=arguments;return U()().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(this.events[oe]){Se.next=2;break}return Se.abrupt("return");case 2:for(xe=se.length,ve=new Array(xe>1?xe-1:0),he=1;he<xe;he++)ve[he-1]=se[he];return pe=ve[0],De=ve.slice(1),Se.abrupt("return",Promise.all(this.events[oe].map(function(Te){return Te.bind(ee).apply(void 0,[T()({current:ee.current},pe)].concat(P()(De)))})));case 5:case"end":return Se.stop()}},me,this)}));function be(me){return de.apply(this,arguments)}return be}()},{key:"parentsIn",value:function(be){if(!be||!g.Schema.isSchemaInstance(be))return!1;for(var me=this.current;(oe=me)!==null&&oe!==void 0&&oe.parent;){var oe;if(me.parent===be)return!0;me=me.parent}return!1}},{key:"refresh",value:function(be){var me=this.options.refresh;return me==null?void 0:me(be)}},{key:"deepMerge",value:function(be){var me=this,oe={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(be).forEach(function(xe){oe[xe]?(me.current[xe]=be[xe],me.updateModel(oe[xe],be[xe])):ee[xe]?Object.keys(be[xe]).forEach(function(ve){$()(me.current,[xe,ve],be[xe][ve]),me.updateModel([ee[xe],ve],be[xe][ve])}):me.current[xe]=be[xe]}),this.emit("patch",{schema:be})}},{key:"getSchemaAttribute",value:function(be,me){return m()(this.current,be,me)}},{key:"shallowMerge",value:function(be){var me=this,oe={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(be).forEach(function(ee){me.current[ee]=be[ee],oe[ee]&&me.updateModel(oe[ee],be[ee])}),this.emit("patch",{schema:be})}},{key:"updateModel",value:function(be,me){var oe=function(xe){$()(xe,be,me)};this.model&&oe(this.model),this.query&&this.query.take(oe)}},{key:"insertAdjacent",value:function(be,me){var oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};switch(be){case"beforeBegin":return this.insertBeforeBegin(me,oe);case"afterBegin":return this.insertAfterBegin(me,oe);case"beforeEnd":return this.insertBeforeEnd(me,oe);case"afterEnd":return this.insertAfterEnd(me,oe)}}},{key:"recursiveRemoveIfNoChildren",value:function(be,me){if(be){for(var oe=be,ee,xe=me==null?void 0:me.breakRemoveOn;oe;){if(typeof xe=="function"){if(xe(oe))break}else if(G(oe,xe))break;var ve=Object.keys(oe.properties||{}).length;if(ve>0)break;oe.parent&&(ee=oe.parent.removeProperty(oe.name)),oe=oe.parent}return ee}}},{key:"remove",value:function(be){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},oe=me.breakRemoveOn,ee=me.removeParentsIfNoChildren,xe=be||this.current,ve=xe.parent.removeProperty(xe.name);if(ee){var he=this.recursiveRemoveIfNoChildren(xe.parent,{breakRemoveOn:oe});he&&(ve=he)}return this.emit("remove",{removed:ve})}},{key:"removeWithoutEmit",value:function(be){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},oe=me.breakRemoveOn,ee=me.removeParentsIfNoChildren,xe=be||this.current,ve=xe.parent.removeProperty(xe.name);if(ee){var he=this.recursiveRemoveIfNoChildren(xe.parent,{breakRemoveOn:oe});he&&(ve=he)}return ve}},{key:"insertBeforeBeginOrAfterEnd",value:function(be){var me=this,oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(g.Schema.isSchemaInstance(this.current)&&g.Schema.isSchemaInstance(be)&&this.current.parent===be.parent){var ee=0,xe=0;return this.current.parent.mapProperties(function(ve,he,pe){me.current.name===he&&(xe=pe),be.name===he&&(ee=pe)}),ee>xe?this.insertBeforeBegin(be,oe):this.insertAfterEnd(be,oe)}}},{key:"insertBeforeBegin",value:function(be){var me=this,oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(g.Schema.isSchemaInstance(this.current)){var ee={onSuccess:oe.onSuccess},xe=oe.wrap,ve=xe===void 0?W:xe,he=oe.breakRemoveOn,pe=oe.removeParentsIfNoChildren;if(g.Schema.isSchemaInstance(be)){if(this.parentsIn(be)){this.emit("error",{code:"parent_is_not_allowed",schema:be});return}be.parent.removeProperty(be.name),pe&&(ee.removed=this.recursiveRemoveIfNoChildren(be.parent,{breakRemoveOn:he}))}else be&&(be=Q()(be));var De={},se=!1,Ce=0,Se=0;this.current.parent.mapProperties(function(tt,ze){ze===me.current.name&&(Se=Ce,se=!0,++Ce),tt["x-index"]=Ce,++Ce,se&&(De[ze]=tt,me.current.parent.removeProperty(ze))}),this.prepareProperty(be);var Te=ve(be),Ie=this.current.parent.addProperty(Te.name||(0,a.uid)(),Te);Ie["x-index"]=Se,Ie.parent=this.current.parent,this.current.parent.setProperties(De);var Fe=re(Ie,be),_e=S()(Fe,2),we=_e[0],We=_e[1];this.emit("insertAdjacent",T()({position:"beforeBegin",schema:We,wrapped:Te,wrap:we},ee))}}},{key:"insertAfterBegin",value:function(be){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(g.Schema.isSchemaInstance(this.current)){var oe={onSuccess:me.onSuccess},ee=me.wrap,xe=ee===void 0?W:ee,ve=me.breakRemoveOn,he=me.removeParentsIfNoChildren;if(g.Schema.isSchemaInstance(be)){if(this.parentsIn(be)){this.emit("error",{code:"parent_is_not_allowed",schema:be});return}be.parent.removeProperty(be.name),he&&(oe.removed=this.recursiveRemoveIfNoChildren(be.parent,{breakRemoveOn:ve}))}else be&&(be=Q()(be));var pe={},De=1;this.current.mapProperties(function(_e,we){_e["x-index"]=De,++De,pe[we]=_e}),this.current.properties={},this.prepareProperty(be);var se=xe(be),Ce=this.current.addProperty(se.name||(0,a.uid)(),se);Ce["x-index"]=0,Ce.parent=this.current,this.current.setProperties(pe);var Se=re(Ce,be),Te=S()(Se,2),Ie=Te[0],Fe=Te[1];this.emit("insertAdjacent",T()({position:"afterBegin",schema:Fe,wrap:Ie,wrapped:se},oe))}}},{key:"insertBeforeEnd",value:function(be){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(g.Schema.isSchemaInstance(this.current)){delete be["x-index"];var oe={onSuccess:me.onSuccess},ee=me.wrap,xe=ee===void 0?W:ee,ve=me.breakRemoveOn,he=me.removeParentsIfNoChildren;if(g.Schema.isSchemaInstance(be)){if(this.parentsIn(be)){this.emit("error",{code:"parent_is_not_allowed",schema:be});return}be.parent.removeProperty(be.name),he&&(oe.removed=this.recursiveRemoveIfNoChildren(be.parent,{breakRemoveOn:ve}))}else be&&(be=Q()(be));this.prepareProperty(be);var pe=xe(be),De=this.current.addProperty(pe.name||(0,a.uid)(),pe);De.parent=this.current;var se=re(De,be),Ce=S()(se,2),Se=Ce[0],Te=Ce[1];return this.emit("insertAdjacent",T()({position:"beforeEnd",schema:Te,wrap:Se,wrapped:pe},oe))}}},{key:"insertAfterEnd",value:function(be){var me=this,oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(g.Schema.isSchemaInstance(this.current)){var ee={onSuccess:oe==null?void 0:oe.onSuccess},xe=oe.wrap,ve=xe===void 0?W:xe,he=oe.breakRemoveOn,pe=oe.removeParentsIfNoChildren,De=0,se=0,Ce=!1,Se={};if(this.current.parent.mapProperties(function(tt,ze){tt["x-index"]=De,ze===me.current.name&&(++De,se=De,Ce=!0),++De,Ce&&ze!==me.current.name&&(Se[ze]=tt,me.current.parent.removeProperty(ze))}),g.Schema.isSchemaInstance(be)){if(this.parentsIn(be)){this.emit("error",{code:"parent_is_not_allowed",schema:be});return}be.parent.removeProperty(be.name),pe&&(ee.removed=this.recursiveRemoveIfNoChildren(be.parent,{breakRemoveOn:he})),be.parent=null}else be&&(be=Q()(be));this.prepareProperty(be);var Te=ve(be),Ie=this.current.parent.addProperty(Te.name||(0,a.uid)(),Te);Ie.parent=this.current.parent,Ie["x-index"]=se,this.current.parent.setProperties(Se);var Fe=re(Ie,be),_e=S()(Fe,2),we=_e[0],We=_e[1];this.emit("insertAdjacent",T()({position:"afterEnd",schema:We,wrap:we,wrapped:Te},ee))}}}]),Ee}();function ye(){var Ee=(0,M.useContext)(g.SchemaOptionsContext),de=(0,M.useMemo)(function(){return(Ee==null?void 0:Ee.components)||{}},[Ee]),be=function(oe){if(!oe)return null;if(typeof oe!="string")return oe;var ee=m()(de,oe);return ee||console.error('[nocobase]: Component "'.concat(oe,'" not found')),ee};return be}function Pe(){var Ee=(0,M.useContext)(N.D),de=Ee.designable,be=Ee.setDesignable,me=Ee.refresh,oe=Ee.reset,ee=(0,M.useContext)(g.SchemaOptionsContext),xe=(0,M.useMemo)(function(){return(ee==null?void 0:ee.components)||{}},[ee]),ve=(0,M.useMemo)(function(){return function(){return(0,L.jsx)(L.Fragment,{})}},[]),he=(0,H.Z)(),pe=(0,V.gR)(),De=(0,V.QJ)(),se=(0,M.useCallback)(function(tt){me==null||me(),he(),pe==null||pe(tt),De==null||De()},[me,he,pe,De]),Ce=(0,g.useField)(),Se=(0,g.useFieldSchema)(),Te=(0,u.LY)(),Ie=(0,b.$)(),Fe=Ie.t,_e=(0,M.useMemo)(function(){return x({t:Fe,api:Te,refresh:se,current:Se,model:Ce,appVersion:E.i8})},[Fe,Te,se,Se,Ce]);(0,M.useEffect)(function(){_e.loadAPIClientEvents()},[_e]);var we=(0,F.wd)(),We=we.isMobileLayout;return{dn:_e,designable:We?!1:de,reset:oe,refresh:se,setDesignable:be,DesignableBar:ve,findComponent:(0,M.useCallback)(function(tt){var ze;if(!tt)return null;if(typeof tt!="string")return tt;var je=m()(xe,tt);return(ze=je==null?void 0:je[I.XI])!==null&&ze!==void 0?ze:je},[m()]),on:_e.on.bind(_e),patch:(0,M.useCallback)(function(tt,ze){var je=function(Re){Object.keys(Re).forEach(function(Be){var ae=Re[Be];Be==="title"&&(Ce.title=ae,Se.title=ae),Be==="x-decorator-props"&&(Ce.decoratorProps||(Ce.decoratorProps={}),Se["x-decorator-props"]||(Se["x-decorator-props"]={}),Object.keys(ae).forEach(function(Me){Ce.decoratorProps[Me]=ae[Me],Se["x-decorator-props"][Me]=ae[Me]})),Be==="x-component-props"&&(Ce.componentProps||(Ce.componentProps={}),Se["x-component-props"]||(Se["x-component-props"]={}),Object.keys(ae).forEach(function(Me){Ce.componentProps[Me]=ae[Me],Se["x-component-props"][Me]=ae[Me]}))})};if(typeof tt=="string"){var Ve={};return $()(Ve,tt,ze),je(Ve)}je(tt),se()},[_e]),shallowMerge:(0,M.useCallback)(function(tt){_e.shallowMerge(tt)},[_e]),deepMerge:(0,M.useCallback)(function(tt){_e.deepMerge(tt)},[_e]),remove:(0,M.useCallback)(function(tt,ze){_e.remove(tt,ze)},[_e]),insertAdjacent:(0,M.useCallback)(function(tt,ze,je){_e.insertAdjacent(tt,ze,je)},[_e]),insertBeforeBegin:(0,M.useCallback)(function(tt){_e.insertBeforeBegin(tt)},[_e]),insertAfterBegin:(0,M.useCallback)(function(tt){_e.insertAfterBegin(tt)},[_e]),insertBeforeEnd:(0,M.useCallback)(function(tt){_e.insertBeforeEnd(tt)},[_e]),insertAfterEnd:(0,M.useCallback)(function(tt){_e.insertAfterEnd(tt)},[_e])}}},98146:function(Zt,Oe,e){"use strict";e.d(Oe,{e:function(){return U}});var ue=e(94350),S=e(84577),le=e(67294),P=e(97970),p=function(){return null};p.isNullComponent=!0;var U=function(){var C=(0,S.ng)(),j=C.designable,A=(0,ue.useFieldSchema)(),O=(0,le.useMemo)(function(){return A["x-designer"]||A["x-toolbar"]?A["x-designer"]||A["x-toolbar"]:A["x-settings"]?P.Mf:p},[A]),R=(0,S.Co)(O);return j&&R||p}},9780:function(Zt,Oe,e){"use strict";e.d(Oe,{w:function(){return J}});var ue=e(97857),S=e.n(ue),le=e(13769),P=e.n(le),p=["useProps"],U=function(){return{}},J=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=j.useProps,O=A===void 0?U:A,R=P()(j,p),w=O;typeof O!="function"&&(w=U);var f=w();return S()(S()({},R),f)}},96726:function(Zt,Oe,e){"use strict";e.d(Oe,{aUM:function(){return le.aU},olz:function(){return le.ol},N0i:function(){return le.N0},fWn:function(){return le.fW},mlL:function(){return le.ml},EIK:function(){return le.EI},$Lt:function(){return le.$L},$b8:function(){return le.$b},s8w:function(){return yl.s8},Nm$:function(){return yl.Nm},HTy:function(){return qt},lkv:function(){return En},rDu:function(){return Co},eYL:function(){return le.eY},Rat:function(){return Xl},oAt:function(){return xc},E7E:function(){return Dc},$SD:function(){return Dd},fUi:function(){return Qa.fU},QcG:function(){return _d},MLy:function(){return Mr.M},gOu:function(){return nf},jYG:function(){return Hu.jY},PuU:function(){return Hu.Pu},smG:function(){return Hu.sm},mx3:function(){return le.mx},C1I:function(){return le.C1},Ssf:function(){return Zs},vTp:function(){return ym},XZJ:function(){return Uu},Tt2:function(){return Cm},zH8:function(){return Sm.z},Q5L:function(){return Js},Pok:function(){return Od},Vm0:function(){return Lc},xI_:function(){return Md},Lip:function(){return hu},vLv:function(){return z.DateFilterDynamicComponent},WN4:function(){return Ls.W},Mtg:function(){return jl.Mt},iNu:function(){return jl.iN},zzt:function(){return Kt.zz},_bl:function(){return X._b},POi:function(){return _m},AOY:function(){return he},izJ:function(){return Qs},LBT:function(){return z.DndContext},IWB:function(){return z.DragHandler},LCt:function(){return z.DraggableContext},FyH:function(){return ee.Fy},Nir:function(){return ee.Ni},q8U:function(){return ee.q8},HGA:function(){return ee.HG},QTe:function(){return ee.QT},JEX:function(){return ee.JE},fAH:function(){return Pf},ORZ:function(){return Qv},xKb:function(){return Wc},P8E:function(){return $c},$w$:function(){return ee.$w},nBj:function(){return ee.nB},Oct:function(){return ee.Oc},zdw:function(){return ee.zd},CXR:function(){return _s},BQs:function(){return lu.BQ},Hj5:function(){return Di.H},M0b:function(){return $d},Dnz:function(){return Ls.D},DQE:function(){return Io},pgx:function(){return Wd},wn$:function(){return Zr.wn},GzZ:function(){return Zr.Gz},tJZ:function(){return Zr.tJ},fox:function(){return Zr.fo},VTd:function(){return Zr.VT},XsZ:function(){return Zr.Xs},l09:function(){return be},D_t:function(){return Vd.D},_80:function(){return vc},WiK:function(){return $o},xJW:function(){return ee.xJ},RVL:function(){return X.RV},Bc8:function(){return ur},hG9:function(){return zc},DCh:function(){return oc},rjZ:function(){return Ds.rj},Cqo:function(){return Au},jg7:function(){return Ds.jg},gsn:function(){return lu.gs},z1L:function(){return Wu.z},$18:function(){return sf.$},IIB:function(){return lu.II},RnZ:function(){return ff},mX2:function(){return lu.mX},zDC:function(){return ul.zD},Phs:function(){return lu.Ph},hiD:function(){return $p},aVo:function(){return ed},UGj:function(){return Xd.U},yq5:function(){return Xd.y},v2r:function(){return ki},HIW:function(){return mf},T3C:function(){return Wa},d97:function(){return mo.d9},hGv:function(){return Ol},tlE:function(){return pf},irr:function(){return bl},rop:function(){return hf.r},gGi:function(){return fp},DBW:function(){return Vt.D},MBS:function(){return mp.M},pGO:function(){return td},Y8K:function(){return ju},iVT:function(){return lu.iV},ODP:function(){return ul.OD},lbb:function(){return ul.lb},b7w:function(){return ul.b7},sUk:function(){return ul.sU},x1j:function(){return le.x1},m1v:function(){return X.m1},glM:function(){return sr},xZD:function(){return le.xZ},IuH:function(){return Zr.Iu},MkN:function(){return le.Mk},Hof:function(){return ev},n6:function(){return X.n6},DDd:function(){return vs.D},ATq:function(){return X.AT},G0E:function(){return X.G0},a$w:function(){return X.a$},TzZ:function(){return X.Tz},y00:function(){return le.y0},PhF:function(){return Sr},Cqv:function(){return z.ShowFormData},cof:function(){return le.co},bts:function(){return z.Sortable},Fop:function(){return z.SortableContext},TRI:function(){return z.SortableItem},ORg:function(){return z.SortableProvider},TaI:function(){return rd},qHe:function(){return Wu.q},iA_:function(){return _u},gvM:function(){return iv},SnY:function(){return xf},ASv:function(){return uv},bwk:function(){return ds},mQc:function(){return $s},c__:function(){return As.c},QZ3:function(){return Xt},L39:function(){return Hu.L3},feF:function(){return Op},jII:function(){return vv},mPs:function(){return Mf},tgM:function(){return Tp},gqx:function(){return Qa.gq},Qm7:function(){return Qa.Qm},_wD:function(){return ts._w},rjl:function(){return ts.rj},mfA:function(){return Rp.m},SLL:function(){return le.SL},sBv:function(){return le.sB},iTm:function(){return ee.iT},BDK:function(){return Qa.BD},Pls:function(){return Kt.Pl},Oxq:function(){return rn},WLi:function(){return cr},$9M:function(){return ee.$9},nCn:function(){return un},iNG:function(){return br},tD8:function(){return vn},pg9:function(){return jo},Ofb:function(){return ee.Of},ibf:function(){return so},WyG:function(){return oe},l6$:function(){return S.l6},WGR:function(){return rt},tl0:function(){return jl.tl},C$H:function(){return ul.C$},SET:function(){return jl.SE},cNQ:function(){return ul.cN},NCb:function(){return ot.NC},I9l:function(){return z.getRenderContent},XQ2:function(){return ot.XQ},Fxc:function(){return xl},KKi:function(){return le.KK},MDU:function(){return jl.MD},CEH:function(){return jl.CE},vUN:function(){return le.vU},ZZb:function(){return ee.ZZ},tqC:function(){return jl.tq},elO:function(){return ul.el},CfU:function(){return iu},VPR:function(){return le.VP},LPx:function(){return jl.LP},fY6:function(){return jl.fY},Vm:function(){return dv},tP3:function(){return Qa.tP},w_o:function(){return jl.w_},SJF:function(){return vu},_Ko:function(){return tu},Mev:function(){return Jt},i2K:function(){return Xr},WmO:function(){return Zr.Wm},oBi:function(){return Kt.oB},hKP:function(){return ot.hK},DU1:function(){return le.DU},XCj:function(){return le.XC},EM:function(){return le.EM},kRO:function(){return yl.kR},KyD:function(){return ko.Ky},Vpg:function(){return hs},lIL:function(){return Kt.lI},KxP:function(){return Mr.K},hi9:function(){return Kt.hi},p27:function(){return le.p2},z9d:function(){return ld.z9},x_5:function(){return is.x},eJW:function(){return Kt.eJ},Cor:function(){return Kt.Co},Zmk:function(){return mo.Zm},aZq:function(){return Kt.aZ},P1D:function(){return jl.P1},ngQ:function(){return Kt.ng},ett:function(){return Kt.et},ySm:function(){return Di.y},Zd$:function(){return ee.Zd},cLh:function(){return Kt.cL},baz:function(){return ee.b},fde:function(){return Kt.fd},Xdt:function(){return ul.Xd},Cld:function(){return Kt.Cl},vH8:function(){return Kt.vH},PLH:function(){return Zr.PL},V8t:function(){return Zr.V8},tMk:function(){return Zr.tM},xQm:function(){return Zr.xQ},sRe:function(){return Kt.sR},U1u:function(){return Qn},HS$:function(){return le.HS},vBu:function(){return le.vB},QYZ:function(){return le.QY},t9d:function(){return le.t9},Kgy:function(){return Zr.Kg},aJ2:function(){return Zr.aJ},n14:function(){return Ds.n1},DiB:function(){return Ds.Di},l1O:function(){return ee.l1},w5o:function(){return ee.w5},p3Q:function(){return ee.p3},G5e:function(){return ee.G5},xj2:function(){return ee.xj},rxY:function(){return ee.rx},Ils:function(){return ul.Il},zCB:function(){return le.zC},yrJ:function(){return Jd},CMh:function(){return Fl},v$P:function(){return La.v},FMn:function(){return Zi},T0O:function(){return $i},a4r:function(){return Vt.a},wNf:function(){return Kt.wN},Dmu:function(){return Kt.Dm},Bsl:function(){return X.Bs},yKv:function(){return Gt.y},pkQ:function(){return Vm.p},fMB:function(){return Kt.fM},gCg:function(){return As.g},eT6:function(){return ee.eT},$SN:function(){return Qa.$S},q4O:function(){return ee.q4},ymE:function(){return ts.ym},uqQ:function(){return le.uq},Q3P:function(){return ot.Q3},K5K:function(){return le.K5}});var ue={};e.r(ue),e.d(ue,{Action:function(){return le.aU},ActionBar:function(){return le.ol},ActionBarProvider:function(){return le.N0},ActionContext:function(){return le.fW},ActionContextNoRerender:function(){return le.ml},ActionContextProvider:function(){return le.EI},ActionDesigner:function(){return le.$L},AfterSuccess:function(){return le.$b},AllDataBlocksContext:function(){return yl.s8},AllDataBlocksProvider:function(){return yl.Nm},AntdSchemaComponentPlugin:function(){return qt},AntdSchemaComponentProvider:function(){return En},AppendsTreeSelect:function(){return Co},AssignedFieldValues:function(){return le.eY},AssociationField:function(){return Xl},AssociationFieldMode:function(){return xc},AssociationFieldModeProvider:function(){return Dc},AssociationSelect:function(){return Dd},AttachmentList:function(){return Qa.fU},AutoComplete:function(){return _d},BackButtonUsedInSubPage:function(){return Mr.M},Block:function(){return nf},BlockItem:function(){return Hu.jY},BlockItemCard:function(){return Hu.Pu},BlockItemCardContext:function(){return Hu.sm},BlocksSelector:function(){return le.mx},ButtonEditor:function(){return le.C1},CardItem:function(){return Zs},Cascader:function(){return ym},Checkbox:function(){return Uu},CollectionSelect:function(){return Cm},ColorPicker:function(){return Sm.z},ColorSelect:function(){return Js},Cron:function(){return Od},CronSet:function(){return Lc},DataSourceCollectionCascader:function(){return Md},DataSourceSelect:function(){return hu},DateFormatCom:function(){return Ls.W},DatePicker:function(){return jl.Mt},DatePickerProvider:function(){return jl.iN},Details:function(){return _m},DetailsDesigner:function(){return he},Divider:function(){return Qs},EditComponent:function(){return ee.Fy},EditDefaultValue:function(){return ee.Ni},EditDescription:function(){return ee.q8},EditOperator:function(){return ee.HG},EditPattern:function(){return ee.QT},EditRequired:function(){return ee.JE},EditSortField:function(){return Pf},EditTable:function(){return Qv},EditTableAction:function(){return Wc},EditTableActionContext:function(){return $c},EditTitle:function(){return ee.$w},EditTitleField:function(){return ee.nB},EditTooltip:function(){return ee.Oc},EditValidationRules:function(){return ee.zd},Editable:function(){return _s},EllipsisWithTooltip:function(){return lu.BQ},ErrorFallback:function(){return Di.H},Expand:function(){return $d},ExpiresRadio:function(){return Ls.D},FieldsTreeSelect:function(){return Io},Fieldset:function(){return Wd},Filter:function(){return Zr.wn},FilterAction:function(){return Zr.Gz},FilterActionContext:function(){return Zr.tJ},FilterContext:function(){return Zr.fo},FilterDynamicComponent:function(){return Zr.VT},FilterLogicContext:function(){return Zr.Xs},Form:function(){return be},FormDialog:function(){return Vd.D},FormDrawer:function(){return vc},FormField:function(){return $o},FormItem:function(){return ee.xJ},FormV2:function(){return ur},G2Plot:function(){return zc},G2PlotRenderer:function(){return oc},Grid:function(){return Ds.rj},GridCard:function(){return Au},GridRowContext:function(){return Ds.jg},HTMLEncode:function(){return lu.gs},ICON_POPUP_Z_INDEX:function(){return Wu.z},IconPicker:function(){return sf.$},Input:function(){return lu.II},InputNumber:function(){return ff},InputReadPretty:function(){return lu.mX},InputRecordPicker:function(){return ul.zD},Json:function(){return lu.Ph},LinkageFilter:function(){return $p},List:function(){return ed},Markdown:function(){return Xd.U},MarkdownReadPretty:function(){return Xd.y},Menu:function(){return ki},NanoIDInput:function(){return mf},Page:function(){return Wa},PagePopups:function(){return mo.d9},PageTabs:function(){return Ol},Pagination:function(){return pf},ParentRouteContext:function(){return bl},Password:function(){return hf.r},Percent:function(){return fp},PopupSettingsProvider:function(){return Vt.D},Preview:function(){return mp.M},QuickEdit:function(){return td},Radio:function(){return ju},ReadPretty:function(){return lu.iV},ReadPrettyRecordPicker:function(){return ul.OD},RecordPicker:function(){return ul.lb},RecordPickerContext:function(){return ul.b7},RecordPickerProvider:function(){return ul.sU},RefreshDataBlockRequest:function(){return le.x1},RemoteSelect:function(){return sr},RemoveButton:function(){return le.xZ},RemoveConditionContext:function(){return Zr.Iu},RequestSettings:function(){return le.Mk},RichText:function(){return ev},SecondConFirm:function(){return le.y0},Select:function(){return Sr},SkipValidation:function(){return le.co},Space:function(){return rd},StablePopover:function(){return Wu.q},Table:function(){return _u},TableBlockDesigner:function(){return iv},TableField:function(){return xf},TableSelectorDesigner:function(){return uv},TableV2:function(){return ds},Tabs:function(){return $s},TabsContextProvider:function(){return As.c},Templates:function(){return Xt},TestDesigner:function(){return Hu.L3},TextAreaWithGlobalScope:function(){return Op},TimePicker:function(){return vv},TreeSelect:function(){return Mf},UnixTimestamp:function(){return Tp},Upload:function(){return Qa.gq},Uploader:function(){return Qa.Qm},Variable:function(){return ts._w},VariableScopeProvider:function(){return ts.rj},VariableSelect:function(){return Rp.m},actionSettings:function(){return le.SL},actionSettingsItems:function(){return le.sB},allowAddNew:function(){return ee.iT},attachmentFileTypes:function(){return Qa.BD},defaultFieldNames:function(){return rn},fetchTemplateData:function(){return cr},filterFormItemSettings:function(){return ee.$9},findByUid:function(){return un},findKeysByUid:function(){return br},findMenuItem:function(){return vn},formDetailsSettings:function(){return jo},formItemSettings:function(){return ee.Of},formSettings:function(){return so},formV1Settings:function(){return oe},genStyleHook:function(){return S.l6},getCurrentOptions:function(){return rt},getDateExact:function(){return jl.tl},getDatePickerLabels:function(){return ul.C$},getDateRanges:function(){return jl.SE},getLabelFormatValue:function(){return ul.cN},getPopupPathFromParams:function(){return ot.NC},getStoredPopupContext:function(){return ot.XQ},getTabSchema:function(){return xl},getZIndex:function(){return le.KK},handleDateChangeOnForm:function(){return jl.MD},inferPickerType:function(){return jl.CE},isBulkEditAction:function(){return le.vU},isFileCollection:function(){return ee.ZZ},isMobile:function(){return jl.tq},isShowFilePicker:function(){return ul.el},isTabPage:function(){return iu},isWriteEmailAction:function(){return le.VP},mapDatePicker:function(){return jl.LP},mapRangePicker:function(){return jl.fY},mapTimeFormat:function(){return dv},matchMimetype:function(){return Qa.tP},moment2str:function(){return jl.w_},navigateToTab:function(){return vu},pageSettings:function(){return tu},pageTabSettings:function(){return Jt},readPrettyFormSettings:function(){return Xr},removeNullCondition:function(){return Zr.Wm},storePopupContext:function(){return ot.hK},useActionBarContext:function(){return le.DU},useActionContext:function(){return le.XC},useAfterSuccessOptions:function(){return le.EM},useAllDataBlocks:function(){return yl.kR},useAssociationFieldContext:function(){return ko.Ky},useAssociationFieldModeContext:function(){return hs},useBackButton:function(){return Mr.K},useCloseAction:function(){return le.p2},useColumnSchema:function(){return ld.z9},useColumnSettings:function(){return is.x},useCurrentPopupContext:function(){return mo.Zm},useDatePickerContext:function(){return jl.P1},useDownloadLogs:function(){return Di.y},useEnsureOperatorsValid:function(){return ee.Zd},useFieldMode:function(){return ee.b},useFieldNames:function(){return ul.Xd},useFilterActionProps:function(){return Zr.PL},useFilterFieldOptions:function(){return Zr.V8},useFilterFieldProps:function(){return Zr.tM},useFilterOptions:function(){return Zr.xQ},useFormDataTemplates:function(){return Qn},useGetAriaLabelOfAction:function(){return le.HS},useGetAriaLabelOfDrawer:function(){return le.vB},useGetAriaLabelOfModal:function(){return le.QY},useGetAriaLabelOfPopover:function(){return le.t9},useGetFilterFieldOptions:function(){return Zr.Kg},useGetFilterOptions:function(){return Zr.aJ},useGridContext:function(){return Ds.n1},useGridRowContext:function(){return Ds.Di},useIsAddNewForm:function(){return ee.l1},useIsAssociationField:function(){return ee.w5},useIsFieldReadPretty:function(){return ee.p3},useIsFileField:function(){return ee.G5},useIsFormReadPretty:function(){return ee.xj},useIsSelectFieldMode:function(){return ee.rx},useLabelUiSchema:function(){return ul.Il},useLinkageAction:function(){return le.zC},useListBlockContext:function(){return Jd},useMenuDragEnd:function(){return Fl},useMenuTranslation:function(){return La.v},useNocoBaseRoutes:function(){return Zi},useParentRoute:function(){return $i},usePopupSettings:function(){return Vt.a},useStyles:function(){return Gt.y},useTableColumnIntegration:function(){return Vm.p},useTabsContext:function(){return As.g},useTitleFieldOptions:function(){return ee.eT},useUploadStyles:function(){return Qa.$S},useValidateSchema:function(){return ee.q4},useVariableScope:function(){return ts.ym},useZIndexContext:function(){return le.uq},withSearchParams:function(){return ot.Q3},zIndexContext:function(){return le.K5}});var S=e(46917),le=e(76157),P=e(15009),p=e.n(P),U=e(99289),J=e.n(U),C=e(12444),j=e.n(C),A=e(72004),O=e.n(A),R=e(31996),w=e.n(R),f=e(26037),B=e.n(f),T=e(97857),g=e.n(T),a=e(67294),H=e(31601),z=e(99687),X=e(70993),Q=e(89127),ce=function(fe){return J()(p()().mark(function $e(){var Qe,qe;return p()().wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return ct.prev=0,ct.next=3,this.api.request(fe);case 3:return qe=ct.sent,ct.abrupt("return",qe==null||(Qe=qe.data)===null||Qe===void 0?void 0:Qe.data);case 7:return ct.prev=7,ct.t0=ct.catch(0),ct.abrupt("return",[]);case 10:case"end":return ct.stop()}},$e,this,[[0,7]])}))},m=e(13769),y=e.n(m),$=e(5552),M=e(86201),b=e(94350),u=e(31282),V=e(74330),I=e(12174),N=e(6145),K=e(57105),E=e(97970),F=e(64016),L=e(15195),x=e(23911),v=e(85893),W=["form","children"],G=["form","children","disabled"],re=["request","effects","initialValue","useValues"],q=function(fe){var $e=fe.form,Qe=fe.children,qe=y()(fe,W),ft=(0,b.useField)(),ct=(0,b.useFieldSchema)(),zt=(0,Kt.lI)($e.createVoidField(g()(g()({},ft.props),{},{basePath:""})));return(0,v.jsx)(b.FieldContext.Provider,{value:void 0,children:(0,v.jsx)(b.FormContext.Provider,{value:$e,children:(0,v.jsx)($.FormLayout,g()(g()({layout:"vertical"},qe),{},{children:(0,v.jsx)(K.sq,{basePath:zt.address,schema:ct,onlyRenderProperties:!0})}))})})},te=function(fe){return fe.children},ye=function(fe){var $e=fe.form,Qe=fe.children,qe=fe.disabled,ft=y()(fe,G),ct=(0,b.useField)(),zt=(0,b.useFieldSchema)(),ln=(0,Kt.lI)($e.createVoidField(g()(g()({},ct.props),{},{basePath:""}))),sn=(0,Kt.Co)(zt["x-component"],te);return(0,a.useEffect)(function(){$e.disabled=qe||ct.disabled},[qe,ct.disabled]),(0,v.jsx)(u.ZP,{componentDisabled:qe,children:(0,v.jsx)(b.FieldContext.Provider,{value:void 0,children:(0,v.jsx)(b.FormContext.Provider,{value:$e,children:(0,v.jsx)($.FormLayout,g()(g()({layout:"vertical"},ft),{},{children:(0,v.jsx)(b.FieldContext.Provider,{value:ln,children:(0,v.jsx)(sn,g()(g()({},ct.componentProps),{},{children:(0,v.jsx)(K.sq,{basePath:ln.address,schema:zt,onlyRenderProperties:!0})}))})}))})})})},Pe=function(fe){var $e=fe.request,Qe=fe.initialValue;return $e||function(){return Promise.resolve({data:Qe})}},Ee=function(){var fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},$e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,I.QT)(Pe($e),fe)},de=(0,a.createContext)(null);de.displayName="FormBlockContext";var be=(0,b.observer)(function(ke){var fe=ke.request,$e=ke.effects,Qe=ke.initialValue,qe=ke.useValues,ft=qe===void 0?Ee:qe,ct=y()(ke,re),zt=(0,b.useFieldSchema)(),ln=(0,b.useField)(),sn=(0,a.useMemo)(function(){return(0,M.createForm)({effects:$e})},[]),pn=ft({uid:zt["x-uid"],onSuccess:function(xn){return J()(p()().mark(function Gn(){return p()().wrap(function(qn){for(;;)switch(qn.prev=qn.next){case 0:return qn.next=2,sn.reset();case 2:sn.setValues(xn==null?void 0:xn.data),sn.setInitialValues(xn==null?void 0:xn.data);case 4:case"end":return qn.stop()}},Gn)}))()}},ke),In=(0,a.useContext)(de);return(0,v.jsx)(de.Provider,{value:{parent:In,form:sn,result:pn,field:ln,fieldSchema:zt},children:(0,v.jsx)(V.Z,{spinning:(pn==null?void 0:pn.loading)||!1,children:zt["x-decorator"]==="Form"?(0,v.jsx)(ye,g()({form:sn},ct)):(0,v.jsx)(q,g()({form:sn},ct))})})},{displayName:"Form"});be.Designer=function(){var fe=(0,N.useCollection_deprecated)(),$e=fe.name,Qe=fe.title,qe=(0,L.zy)(),ft=(0,x.rE)(),ct=ft.componentNamePrefix;return(0,v.jsxs)(E.aN,{template:qe,title:Qe||$e,children:[(0,v.jsx)(F.G,{componentName:"".concat(ct,"Form"),collectionName:$e}),(0,v.jsx)(E.Z5,{}),(0,v.jsx)(E.qx,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};var me=e(5537),oe=new me.F5({name:"FormV1Settings",items:[{name:"template",Component:F.G,useComponentProps:function(){var fe=(0,N.useCollection_deprecated)(),$e=fe.name,Qe=(0,x.rE)(),qe=Qe.componentNamePrefix;return{componentName:"".concat(qe,"Form"),collectionName:$e}}},{name:"divider",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),ee=e(54801),xe=function(){var fe=(0,N.useCollection_deprecated)(),$e=fe.name,Qe=fe.title,qe=(0,L.zy)();return(0,v.jsx)(E.aN,{schemaSettings:"FormSettings",template:qe,title:Qe||$e})},ve=function(){var fe=(0,N.useCollection_deprecated)(),$e=fe.name,Qe=fe.title,qe=(0,L.zy)();return(0,v.jsx)(E.aN,{schemaSettings:"ReadPrettyFormSettings",template:qe,title:Qe||$e})},he=function(){var fe=(0,N.useCollection_deprecated)(),$e=fe.name,Qe=fe.title,qe=(0,L.zy)();return(0,v.jsx)(E.aN,{schemaSettings:"FormDetailsSettings",template:qe,title:Qe||$e})},pe=function(){var fe=(0,N.useCollection_deprecated)(),$e=fe.name,Qe=fe.title,qe=(0,L.zy)();return(0,v.jsx)(E.aN,{schemaSettings:"blockSettings:filterForm",template:qe,title:Qe||$e})},De=e(7340),se=e(15503),Ce=e(83335),Se=e(68230),Te=e(68400),Ie=e.n(Te),Fe=e(97133),_e=e(84327),we=e(9361),We=e(96486),tt=e.n(We),ze=e(2483),je=e(415),Ve=e(31019),Ae=e(94804),Re=e(39742),Be=e(7686),ae=e(22229),Me=e(43321),He=e(3078),Le=e(9780),Xe=e(3192),ht=e(18686),St=e(5574),Ye=e.n(St),pt=e(10110),bt=e(42075),en=e(34041),Rn=e(26793),Bn=e(53285),hn=e(32268),Lt=e(9783),Je=e.n(Lt),xt=e(52677),lt=e.n(xt),_t=e(3407),Et=e(66309),Yt=e(96074),Pn=e(27484),Tn=e.n(Pn),gn=e(44990),fn=e(8341),on=e(87714),Kt=e(84577),vr=e(16646),Gr=e(73475),er=e(32983),nr=e(83062),kr=e(85518),Yr=e(67668),Nr=e(58812),Dr=e(96695),Wn=e.n(Dr),an=e(19632),_n=e.n(an),rn={label:"label",value:"value",color:"color",options:"children"};function yn(ke,fe){var $e=[];if(!Array.isArray(ke))return $e;for(var Qe=0;Qe<ke.length;Qe++){var qe=ke[Qe][fe.options];Array.isArray(qe)&&$e.push.apply($e,_n()(yn(qe,fe))),$e.push(g()({},ke[Qe]))}return $e}function At(ke,fe,$e){if(!ke)return[];var Qe=[],qe=Wn()($e),ft;try{var ct=function(){var ln=ft.value,sn=ke.find(function(pn){return pn[fe.value]==ln})||{value:ln,label:ln&&ln.toString()};Qe.push(sn)};for(qe.s();!(ft=qe.n()).done;)ct()}catch(zt){qe.e(zt)}finally{qe.f()}return Qe}function rt(ke,fe,$e){var Qe=yn(fe,$e),qe=(0,We.castArray)(ke).map(function(ft){return(0,pt.isPlainObject)(ft)?ft[$e.value]:ft});return At(Qe,$e,qe)}var Ot=e(25145),It=e(61933),Mt=(0,b.observer)(function(ke){var fe=(0,a.useState)(!0),$e=Ye()(fe,2),Qe=$e[0],qe=$e[1],ft=(0,a.useState)([]),ct=Ye()(ft,2),zt=ct[0],ln=ct[1],sn=(0,b.useField)(),pn=(0,Yr.Hy)();return(0,a.useEffect)(function(){var In,Xn=g()(g()({},rn),ke.fieldNames),xn=sn.dataSource||ke.options||(pn==null?void 0:pn.uiSchema.enum)||[],Gn=rt(sn.value,xn,Xn);if(!(!(0,_e.isValid)(ke.value)&&!Gn.length)&&!((0,M.isArrayField)(sn)&&(sn==null||(In=sn.value)===null||In===void 0?void 0:In.length)===0)){var Zn=sn.value!==null&&Gn.map(function(qn,mr){return(0,v.jsx)(Et.Z,{color:qn[Xn.color],icon:typeof qn.icon=="string"?(0,v.jsx)(It.JO,{type:qn.icon}):qn.icon,children:qn[Xn.label]},mr)});ln(Zn),qe(!1)}},[pn==null?void 0:pn.uiSchema.enum,sn,sn.dataSource,sn.value,ke.fieldNames,ke.options,ke.value]),Qe?null:(0,v.jsx)(Nr.B,{ellipsis:ke.ellipsis,children:zt})},{displayName:"SelectReadPretty"}),Ut=(0,Ot.u)(Mt),Qt,Nn=["value","options","onChange","fieldNames","mode","loading","rawOptions","defaultValue"],Mn=["objectValue","loading","value","rawOptions","defaultValue"],wn=function(fe){return!(0,_e.isValid)(fe)||lt()(fe)==="object"&&Object.keys(fe).length===0},Kn=function(fe){var $e=fe.value,Qe=fe.options,qe=fe.onChange,ft=fe.fieldNames,ct=fe.mode,zt=fe.loading,ln=fe.rawOptions,sn=fe.defaultValue,pn=y()(fe,Nn),In=kr.nI?"":Ir,Xn=kr.nI?void 0:"topLeft",xn=function(Zn){var qn;if(!wn(Zn)){var mr=(0,_e.toArr)(Zn).filter(function(ro){return ro}).map(function(ro){return(0,pt.isPlainObject)(ro)?ro[ft.value]:ro}),xr=(qn=rt(mr,Qe,ft))===null||qn===void 0?void 0:qn.map(function(ro){return{label:ro[ft.label],value:ro[ft.value]}});return["tags","multiple"].includes(ct)||fe.multiple?xr:xr.shift()}};return(0,v.jsx)(en.default,g()({rootClassName:In,placement:Xn,role:"button","data-testid":"select-object-".concat(ct||"single"),value:xn($e),defaultValue:xn(sn),allowClear:{clearIcon:(0,v.jsx)(vr.Z,{role:"button","aria-label":"icon-close-select"})},labelInValue:!0,notFoundContent:zt?(0,v.jsx)(V.Z,{}):(0,v.jsx)(er.Z,{image:er.Z.PRESENTED_IMAGE_SIMPLE}),options:Qe,fieldNames:ft,showSearch:!0,popupMatchSelectWidth:!1,filterOption:function(Zn,qn){var mr;return((mr=qn==null?void 0:qn[ft.label||"label"])!==null&&mr!==void 0?mr:"").includes(Zn)},filterSort:function(Zn,qn){var mr,xr;return((mr=Zn==null?void 0:Zn[ft.label||"label"])!==null&&mr!==void 0?mr:"").toLowerCase().localeCompare(((xr=qn==null?void 0:qn[ft.label||"label"])!==null&&xr!==void 0?xr:"").toLowerCase())},onChange:function(Zn){var qn=rt((0,_e.toArr)(Zn).map(function(mr){return mr.value}),ln||Qe,ft);["tags","multiple"].includes(ct)||fe.multiple?qe==null||qe(qn):qe==null||qe(qn.shift()||null)},mode:ct,tagRender:function(Zn){return(0,v.jsx)(Et.Z,g()(g()({role:"button","aria-label":Zn.label,closeIcon:(0,v.jsx)(Gr.Z,{role:"button","aria-label":"icon-close-tag"})},Zn),{},{children:Zn.label}))},maxTagCount:"responsive",maxTagPlaceholder:function(Zn){return(0,v.jsxs)(nr.Z,{title:(0,v.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6,maxWidth:"100%"},children:Zn.map(function(qn){return(0,v.jsx)(Et.Z,{style:{margin:0,background:"#fafafa",border:"1px solid #d9d9d9",whiteSpace:"normal",wordBreak:"break-word",maxWidth:"100%"},children:qn.label},qn.value)})}),overlayInnerStyle:{background:"#fff",color:"#000",padding:8,maxWidth:"100%"},color:"#fff",overlayStyle:{pointerEvents:"auto",maxWidth:300},children:["+",Zn.length,"..."]})}},pn))},gr=function(fe,$e){var Qe;return((Qe=$e==null?void 0:$e.label)!==null&&Qe!==void 0?Qe:"").toLowerCase().includes((fe||"").toLowerCase())},Ir=(0,Fe.css)(Qt||(Qt=Ie()([`
1424
+ `])),v.colorFillSecondary);return(0,p.jsxs)("div",{style:{maxHeight:300,overflowY:"auto"},children:[de.map(function(oe){return(0,p.jsx)("div",{role:"option",onClick:function(){return ye(oe.value)},className:me,children:E(oe.label)},oe.value)}),(0,p.jsx)(g.Z,{style:{margin:"4px 0"}}),be.map(function(oe){return(0,p.jsx)("div",{role:"option",className:me,onClick:function(){return ye(oe.value)},title:E(oe.label),children:E(oe.label)},oe.value)})]})};return(0,p.jsxs)(a.Z.Compact,{style:w()(w()({},I.style),{},{width:"100%"}),children:[(0,p.jsx)(H.default,w()(w()({options:te,open:re,onDropdownVisibleChange:q},I),{},{allowClear:!1,style:{width:"100%",minWidth:100,maxWidth:["past","next","exact",void 0].includes(N==null?void 0:N.type)?100:null},value:(N==null?void 0:N.type)||"exact",onChange:ye,dropdownRender:Pe})),["past","next"].includes(N==null?void 0:N.type)&&[(0,p.jsx)(z.Z,{value:N==null?void 0:N.number,onChange:function(de){var be=w()(w()({},N),{},{number:de});K(be)}},"number"),(0,p.jsx)(H.default,{value:N==null?void 0:N.unit,style:{minWidth:130,maxWidth:140},onChange:function(de){var be=w()(w()({},N),{},{unit:de});K(be)},options:[{value:"day",label:L("Day")},{value:"week",label:L("Calendar week")},{value:"month",label:L("Calendar Month")},{value:"year",label:L("Calendar Year")}],popupMatchSelectWidth:!0},"unit")],((N==null?void 0:N.type)==="exact"||!(N!=null&&N.type))&&(0,p.jsx)(b,w()({},I))]})}},20493:function(Zt,Oe,e){"use strict";e.d(Oe,{IW:function(){return M},LC:function(){return a},bt:function(){return Q},Fo:function(){return H},TR:function(){return $},OR:function(){return z}});var ue=e(97857),S=e.n(ue),le=e(13769),P=e.n(le),p=e(10274),U=e(60887),J=e(97133),C=e(94350),j=e(96486),A=e.n(j),O=e(67294),R=e(46917),w=e(84577),f=e(85893),B=["component","overStyle","style","children","openMode"],T=["schema","id","eid","removeParentsIfNoChildren"],g=["component"],a=(0,O.createContext)(null);a.displayName="DraggableContext";var H=(0,O.createContext)(null);H.displayName="SortableContext";var z=function(u){var V=u.id,I=u.data,N=u.children,K=(0,U.useDraggable)({id:V,data:I}),E=(0,U.useDroppable)({id:V,data:I}),F=(0,O.useMemo)(function(){return{draggable:K,droppable:E}},[K,E]);return(0,f.jsx)(H.Provider,{value:F,children:N})},X=function(u){return new p.C(u).setAlpha(.15).toHex8String()},Q=function(u){var V,I,N=u.component,K=u.overStyle,E=u.style,F=u.children,L=u.openMode,x=P()(u,B),v=(0,R.dQ)(),W=v.token,G=(0,O.useContext)(H),re=G.draggable,q=G.droppable,te=q.isOver,ye=q.setNodeRef,Pe=S()({},E),Ee=(0,C.useFieldSchema)(),de=(Ee==null?void 0:Ee["x-component"])==="Action.Link"||N==="a";return te&&(re==null||(V=re.active)===null||V===void 0?void 0:V.id)!==(q==null||(I=q.over)===null||I===void 0?void 0:I.id)&&(Pe[de?"color":"background"]=X(W.colorSettings),Object.assign(Pe,K)),O.createElement(N||"div",S()(S()({role:"none"},x),{},{className:(0,J.cx)("nb-sortable-designer",u.className),ref:ye,style:Pe}),F)},ce=function(u){var V=m(u),I=(0,C.useFieldSchema)();return u.schema?S()(S()({},u),{},{id:V}):S()(S()({},u),{},{id:V,schema:I})},m=function(u){var V,I=(0,C.useField)();return u.id?u.id:(V=I.address)===null||V===void 0?void 0:V.toString()},y=(0,C.observer)(function(b){var u=ce(b),V=u.schema,I=u.id,N=u.eid,K=u.removeParentsIfNoChildren,E=P()(u,T),F=(0,O.useMemo)(function(){var L,x;return{insertAdjacent:"afterEnd",schema:((L=V.parent)===null||L===void 0||(L=L.parent)===null||L===void 0?void 0:L["x-component"])==="BlockTemplate"?(x=V.parent)===null||x===void 0?void 0:x.parent:V,removeParentsIfNoChildren:K??!0}},[V,K]);return(0,f.jsx)(z,{id:I,data:F,children:(0,f.jsx)(Q,S()(S()({id:N},E),{},{children:b.children}))})},{displayName:"InternalSortableItem"}),$=O.memo(function(b){var u=b.component,V=P()(b,g),I=(0,w.ng)(),N=I.designable;return N?(0,f.jsx)(y,S()({},b)):O.createElement(u||"div",A().omit(V,["children","schema","overStyle","openMode","id","eid","removeParentsIfNoChildren"]),b.children)});$.displayName="SortableItem";var M=function(u){var V=(0,O.useContext)(H)||{},I=V.draggable;if(!I)return null;var N=I.attributes,K=I.listeners,E=I.setNodeRef;return(0,f.jsx)("div",{style:{display:"inline-block",width:14,height:14,lineHeight:"14px",textAlign:"left"},children:(0,f.jsx)("div",S()(S()(S()({ref:E,style:{position:"relative",zIndex:1,lineHeight:0,fontSize:0,display:"inline-block"}},K),N),{},{role:"none",children:(0,f.jsx)("span",{style:{cursor:"move",fontSize:14},children:u.children})}))})}},7840:function(Zt,Oe,e){"use strict";e.d(Oe,{I9:function(){return K},Rq:function(){return ce},e7:function(){return X},jC:function(){return $},od:function(){return Q}});var ue=e(97857),S=e.n(ue),le=e(9783),P=e.n(le),p=e(15009),U=e.n(p),J=e(5574),C=e.n(J),j=e(99289),A=e.n(j),O=e(52677),R=e.n(O),w=e(10110),f=e(96486),B=e.n(f),T=e(10097),g=e(63179),a=e(76690),H=e(65565),z=e(61341),X=function(L,x){var v,W=/{{(.*?)}}/,G=L==null||(v=L.match)===null||v===void 0?void 0:v.call(L,W);if(G){var re=B().get(x,G[1]);return B().isFunction(re)?re():re}else return L};function Q(F){if(R()(F)!=="object"||F===null)return null;for(var L in F)if(Object.prototype.hasOwnProperty.call(F,L))return Object.prototype.toString.call(F[L])==="[object Object]"&&F[L]!==null?Q(F[L]):{key:L,value:F[L]};return null}var ce=function(L){var x=m(L),v=(0,f.findIndex)(x,function(G,re,q){if(G.includes("$")&&re>0)return!0}),W=x.slice(0,v);return W};function m(F){var L=[];function x(v){Object.keys(v).sort().forEach(function(W){L.push(W),v[W]&&R()(v[W])==="object"&&x(v[W])})}return x(F),L}var y=function(){var F=A()(U()().mark(function L(x,v,W){var G,re,q,te;return U()().wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return G=(0,a.cG)(x)?[v.parseVariable(x,W).then(function(Ee){var de=Ee.value;return de})]:[x],Pe.prev=1,Pe.next=4,Promise.all(G);case 4:return re=Pe.sent,q=C()(re,1),te=q[0],Pe.abrupt("return",te);case 10:throw Pe.prev=10,Pe.t0=Pe.catch(1),console.error("Error in parseVariableValue:",Pe.t0),Pe.t0;case 14:case"end":return Pe.stop()}},L,null,[[1,10]])}));return function(x,v,W){return F.apply(this,arguments)}}(),$=function(){var F=A()(U()().mark(function L(x,v){var W,G,re,q,te,ye,Pe,Ee;return U()().wrap(function(be){for(;;)switch(be.prev=be.next){case 0:return W=x.ruleGroup,G=x.variables,re=x.localVariables,q=x.variableNameOfLeftCondition,te=x.conditionType,ye=Object.keys(W)[0]||"$and",Pe=W[ye]||[],be.next=5,Promise.all(Pe.filter(Boolean).map(function(me){return M(me,G,re,q,te,v)}));case 5:if(Ee=be.sent,ye!=="$and"){be.next=10;break}return be.abrupt("return",(0,f.every)(Ee,function(me){return me}));case 10:if(!Ee.length){be.next=12;break}return be.abrupt("return",(0,f.some)(Ee,function(me){return me}));case 12:return be.abrupt("return",!0);case 13:case"end":return be.stop()}},L)}));return function(x,v){return F.apply(this,arguments)}}(),M=function(){var F=A()(U()().mark(function L(x,v,W,G,re,q){return U()().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:if(!("$and"in x||"$or"in x)){ye.next=4;break}return ye.next=3,$({ruleGroup:x,variables:v,localVariables:W,conditionType:re},q);case 3:return ye.abrupt("return",ye.sent);case 4:return ye.abrupt("return",re==="advanced"?b(x,v,W,q):u(x,v,W,G,q));case 5:case"end":return ye.stop()}},L)}));return function(x,v,W,G,re,q){return F.apply(this,arguments)}}(),b=function(){var F=A()(U()().mark(function L(x,v,W,G){var re,q,te;return U()().wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return re=x.op,Pe.next=3,y(x.rightVar,v,W);case 3:return q=Pe.sent,Pe.next=6,y(x.leftVar,v,W);case 6:if(te=Pe.sent,!re){Pe.next=9;break}return Pe.abrupt("return",G.apply(P()({},re,[te,q])));case 9:return Pe.abrupt("return",!0);case 10:case"end":return Pe.stop()}},L)}));return function(x,v,W,G){return F.apply(this,arguments)}}(),u=function(){var F=A()(U()().mark(function L(x,v,W,G,re){var q,te,ye,Pe,Ee,de,be,me,oe,ee,xe,ve,he,pe;return U()().wrap(function(se){for(;;)switch(se.prev=se.next){case 0:if(q=Q(x),te=q==null?void 0:q.key,te){se.next=4;break}return se.abrupt("return",!0);case 4:return ye=V(ce(x),G),Pe=v.parseVariable(ye,W,{doNotRequest:!0}).then(function(Ce){var Se=Ce.value;return Se}),Ee=(0,a.cG)(q==null?void 0:q.value)?[v.parseVariable(q==null?void 0:q.value,W).then(function(Ce){var Se=Ce.value;return Se}),Pe]:[q==null?void 0:q.value,Pe],se.prev=7,se.next=10,Promise.all(Ee);case 10:return de=se.sent,be=C()(de,2),me=be[0],oe=be[1],se.next=16,v.getCollectionField(ye,W);case 16:return ee=se.sent,xe=(0,H.J)(oe,{targetCollectionField:ee}),ve=(0,H.J)(me,{targetCollectionField:ee}),ee!=null&&ee.type&&["datetime","date","datetimeNoTz","dateOnly","unixTimestamp"].includes(ee.type)&&xe&&(he=(0,z.CE)(ve),pe=(0,w.getPickerFormat)(he),xe=(0,w.dayjs)(xe).format(pe)),se.abrupt("return",re.apply(P()({},te,[xe,ve])));case 23:throw se.prev=23,se.t0=se.catch(7),se.t0;case 26:case"end":return se.stop()}},L,null,[[7,23]])}));return function(x,v,W,G,re){return F.apply(this,arguments)}}();function V(F){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"$nForm";return"{{ ".concat(L,".").concat(F.join(".")," }}")}var I=function(L){var x={};return L.map(function(v){x[v.name]=v.ctx}),x};function N(F){return F.replace(/{{\s*}}/g,'{{"{{}}"}}')}function K(F,L,x,v,W,G){return E.apply(this,arguments)}function E(){return E=A()(U()().mark(function F(L,x,v,W,G,re){var q,te,ye,Pe,Ee,de,be,me,oe,ee;return U()().wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:if(!(x&&L==="handlebars")){ve.next=23;break}return w.Handlebars.registerHelper("t",function(he){if(typeof he=="string")return re(he,{ns:g.g})}),ve.prev=2,ye=N(x),Pe=w.Handlebars.compile(ye),Ee=I(W),de=(v==null||(q=v.ctxRef)===null||q===void 0?void 0:q.current)||{},be=de.$nDate,me={},Object.keys(be||{}).map(function(he){me[he]=be[he]()}),oe=Pe(S()(S()(S()({},v==null||(te=v.ctxRef)===null||te===void 0?void 0:te.current),Ee),{},{$nDate:me})),console.log(oe),ve.next=13,G(oe);case 13:return ve.abrupt("return",ve.sent);case 16:return ve.prev=16,ve.t0=ve.catch(2),/VariablesProvider: .* is not found/.test(ve.t0.message)||console.log(ve.t0),console.log(x),ve.abrupt("return",x);case 21:ve.next=36;break;case 23:return ve.prev=23,ve.next=26,(0,T.replaceVariableValue)(x,v,W);case 26:return ee=ve.sent,ve.next=29,G(ee);case 29:return ve.abrupt("return",ve.sent);case 32:return ve.prev=32,ve.t1=ve.catch(23),/VariablesProvider: .* is not found/.test(ve.t1.message)||console.log(ve.t1),ve.abrupt("return",x);case 36:case"end":return ve.stop()}},F,null,[[2,16],[23,32]])})),E.apply(this,arguments)}},25145:function(Zt,Oe,e){"use strict";e.d(Oe,{u:function(){return Q}});var ue=e(5574),S=e.n(ue),le=e(97857),P=e.n(le),p=e(13769),U=e.n(p),J=e(94350),C=e(96486),j=e(67294),A=e(96726),O=e(75585),R=e(22891),w={type:"void","x-component":"Action.Container","x-action":"view",title:'{{ t("View record") }}',"x-component-props":{className:"nb-action-popup"},properties:{tabs:{type:"void","x-component":"Tabs","x-component-props":{},"x-initializer":"popup:addTab",properties:{tab1:{type:"void",title:'{{t("Details")}}',"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"popup:common:addBlock",properties:{}}}}}}}},f=e(94804),B=e(57105),T=e(68304),g=e(85893),a=["WrappedComponent"],H=function(){var m=(0,J.useFieldSchema)(),y=(0,A.ngQ)(),$=y.insertAfterBegin,M=(0,j.useCallback)(function(b){var u=m.reduceProperties(function(V,I){return I["x-component"]==="Action.Container"?I:V},null);u||$((0,C.cloneDeep)(b))},[m,$]);return M},z=function(m){return m["x-component"]==="Action.Container"},X=function(m){var y=m.WrappedComponent,$=U()(m,a),M=(0,J.useFieldSchema)(),b=(0,R.ES)(),u=b.openPopup,V=(0,j.useRef)(!1),I=H(),N=(0,j.useRef)(M);N.current=M;var K=(0,j.useRef)(I);K.current=I;var E=(0,j.useRef)(u);E.current=u;var F=(0,j.useCallback)(function(){return N.current},[]),L=(0,j.useCallback)(function(){N.current.properties||(K.current(w),V.current=!0),V.current?(setTimeout(function(){E.current({customActionSchema:F()})}),V.current=!1):N.current.properties&&E.current()},[F]),x=(0,j.useMemo)(function(){return(0,C.debounce)(L,600,{leading:!0,trailing:!1})},[L]);return(0,j.useEffect)(function(){return function(){x.cancel()}},[x]),(0,g.jsx)("a",{onClick:x,children:(0,g.jsx)(y,P()({},$))})};function Q(ce){return function(m){var y=(0,j.useState)(!1),$=S()(y,2),M=$[0],b=$[1],u=(0,j.useState)(!1),V=S()(u,2),I=V[0],N=V[1],K=(0,f.Kx)(),E=(0,A.XCj)(),F=(0,J.useField)(),L=(0,J.useFieldSchema)(),x=(L==null?void 0:L["x-component-props"])||{},v=x.enableLink,W=x.openMode,G=x.openSize,re=(0,R.ES)(),q=re.visibleWithURL,te=re.setVisibleWithURL,ye=(0,j.useCallback)(function(de){b==null||b(de),te==null||te(de)},[te]),Pe=(0,j.useRef)(L);Pe.current=L;var Ee=E.setSubmitted;return v?(0,g.jsx)(O.OA,{visible:!1,children:(0,g.jsxs)(A.EIK,{button:(0,g.jsx)(ce,P()({},m)),visible:M||q,setVisible:ye,formValueChanged:I,setFormValueChanged:N,openMode:W,openSize:G,containerRefKey:"field-popup",fieldSchema:L,setSubmitted:Ee,children:[(0,g.jsx)(f.YQ,{name:K.name,children:(0,g.jsx)(A.G0E,{children:(0,g.jsx)(T.Rm,{children:(0,g.jsx)(B.sq,{onlyRenderProperties:!0,basePath:F==null?void 0:F.address,schema:L,filterProperties:z})})})}),(0,g.jsx)(X,P()(P()({},m),{},{WrappedComponent:ce}))]})}):(0,g.jsx)(ce,P()({},m))}}},61736:function(Zt,Oe,e){"use strict";e.d(Oe,{D:function(){return S}});var ue=e(67294),S=(0,ue.createContext)({});S.displayName="SchemaComponentContext.Provider"},44245:function(Zt,Oe,e){"use strict";e.d(Oe,{R:function(){return f}});var ue=e(97857),S=e.n(ue),le=e(13769),P=e.n(le),p=e(86201),U=e(94350),J=e(67294),C=e(47844),j=e(85893),A=["children","form"],O=["children"],R=function(T){var g=T.children,a=T.form,H=P()(T,A),z=(0,J.useContext)(U.SchemaOptionsContext),X=(0,J.useContext)(U.SchemaExpressionScopeContext),Q=S()(S()({},z==null?void 0:z.scope),X),ce=S()({},z==null?void 0:z.components);return(0,j.jsx)(U.FormProvider,S()(S()({},H),{},{form:a,children:(0,j.jsx)(C.G,{components:ce,scope:Q,children:g})}))},w=function(T){var g=T.children,a=P()(T,O),H=(0,J.useContext)(U.SchemaOptionsContext),z=(0,J.useContext)(U.SchemaExpressionScopeContext),X=S()(S()({},H==null?void 0:H.scope),z),Q=S()({},H==null?void 0:H.components),ce=(0,J.useMemo)(function(){return(0,p.createForm)()},[]);return(0,j.jsx)(U.FormProvider,S()(S()({},a),{},{form:ce,children:(0,j.jsx)(C.G,{components:Q,scope:X,children:g})}))},f=function(T){return T.form?(0,j.jsx)(R,S()({},T)):(0,j.jsx)(w,S()({},T))}},93587:function(Zt,Oe,e){"use strict";e.d(Oe,{m:function(){return g}});var ue=e(97857),S=e.n(ue),le=e(86201),P=e(94350),p=e(74330),U=e(67294),J=e(54195),C=e(21044),j=e(84577),A=e(44245),O=e(93323),R=e(12174),w=function(H){var z=H.uid,X=H.type,Q=X===void 0?"getJsonSchema":X,ce=H.onSuccess,m={url:"/uiSchemas:".concat(Q,"/").concat(z)},y=(0,R.QT)(m,{refreshDeps:[z],onSuccess:function(u){ce&&ce(u)}}),$=y.data,M=y.loading;return{schema:$==null?void 0:$.data,loading:M}},f=e(85893),B=function(H){return H},T=function(H){var z=H.noForm,X=H.onlyRenderProperties,Q=H.hidden,ce=H.scope,m=H.uid,y=H.components,$=H.onSuccess,M=H.NotFoundPage,b=H.schemaTransform,u=b===void 0?B:b,V=H.onPageNotFind,I=X?"getProperties":"getJsonSchema",N=(0,U.useMemo)(function(){return(0,le.createForm)()},[m]),K=w({uid:m,type:I,onSuccess:function(re){$&&$(re)}}),E=K.schema,F=K.loading,L=(0,j.Co)(M),x=(0,J.Kk)(),v=(0,P.useFieldSchema)(),W=(0,U.useMemo)(function(){return u(E||{})},[E,u]);return x||F||Q?(0,f.jsx)(p.Z,{style:{width:"100%",marginTop:20},delay:C.fw}):!E||Object.keys(E).length===0?(V&&V(),L?(0,f.jsx)(L,{}):null):z?(0,f.jsx)(O.n,{components:y,scope:ce,schema:W,parentSchema:v}):(0,f.jsx)(A.R,{form:N,children:(0,f.jsx)(O.n,{components:y,scope:ce,schema:W,parentSchema:v})})},g=(0,U.memo)(function(a){return a.uid?(0,f.jsx)(T,S()({},a)):null});g.displayName="RemoteSchemaComponent"},93323:function(Zt,Oe,e){"use strict";e.d(Oe,{A:function(){return z},n:function(){return ce}});var ue=e(97857),S=e.n(ue),le=e(13769),P=e.n(le),p=e(9783),U=e.n(p),J=e(94350),C=e(96486),j=e.n(C),A=e(67294),O=e(57105),R=e(61736),w=e(47844),f=e(85893),B=["components","scope","schema","distributed","onChange","parentSchema"],T=["schema","parentSchema"],g=["memoized"];function a(m){return J.Schema.isSchemaInstance(m)?m:m!=null&&m.name?new J.Schema({type:"object",properties:U()({},m.name,m),name:"p_".concat(m.name)}):new J.Schema(m)}var H=function(y){return(0,A.useMemo)(function(){return a(y)},[])},z=(0,A.createContext)({onChange:j().noop}),X=(0,A.memo)(function(m){var y=m.components,$=m.scope,M=m.schema,b=m.distributed,u=m.onChange,V=m.parentSchema,I=P()(m,B),N=(0,A.useContext)(R.D),K=(0,A.useMemo)(function(){return a(M)},[M]),E=(0,A.useMemo)(function(){return S()(S()({},N),{},{distributed:N.distributed==!1?!1:b,refresh:N.refresh||j().noop})},[N,b]),F=(0,A.useContext)(z),L=F.onChange,x=(0,A.useMemo)(function(){return{onChange:function(){u==null||u(K),L==null||L()}}},[u,L,K]);return(0,f.jsx)(z.Provider,{value:x,children:(0,f.jsx)(R.D.Provider,{value:E,children:(0,f.jsx)(w.G,{inherit:!0,components:y,scope:$,children:(0,f.jsx)(O.sq,S()(S()({},I),{},{schema:K,isUseFormilyField:!0,parentSchema:V}))})})})});X.displayName="RecursionSchemaComponent";var Q=(0,A.memo)(function(m){var y=m.schema,$=m.parentSchema,M=P()(m,T),b=H(y);return(0,f.jsx)(X,S()(S()({},M),{},{schema:b,parentSchema:$}))});Q.displayName="MemoizedSchemaComponent";var ce=(0,A.memo)(function(m){var y=m.memoized,$=P()(m,g);return y?(0,f.jsx)(Q,S()({},$)):(0,f.jsx)(X,S()({},$))});ce.displayName="SchemaComponent"},47844:function(Zt,Oe,e){"use strict";e.d(Oe,{B:function(){return U},G:function(){return J}});var ue=e(97857),S=e.n(ue),le=e(94350),P=e(67294),p=e(85893),U=function(){var j=(0,P.useContext)(le.SchemaOptionsContext);return j||{}},J=(0,P.memo)(function(C){var j=C.children,A=U(),O=(0,P.useMemo)(function(){return S()(S()({},A.components),C.components)},[A.components,C.components]),R=(0,P.useMemo)(function(){return S()(S()({},A.scope),C.scope)},[A.scope,C.scope]),w=(0,P.useMemo)(function(){return{scope:R,components:O}},[R,O]);return(0,p.jsx)(le.SchemaOptionsContext.Provider,{value:w,children:(0,p.jsx)(le.SchemaComponentsContext.Provider,{value:O,children:(0,p.jsx)(le.ExpressionScope,{value:R,children:j})})})});J.displayName="SchemaComponentOptions"},70993:function(Zt,Oe,e){"use strict";e.d(Oe,{_b:function(){return M},RV:function(){return b.R},m1:function(){return u.m},n6:function(){return V.n},AT:function(){return V.A},G0:function(){return I.G},a$:function(){return Ee},Tz:function(){return ye},Bs:function(){return I.B}});var ue=e(15009),S=e.n(ue),le=e(99289),P=e.n(le),p=e(12444),U=e.n(p),J=e(72004),C=e.n(J),j=e(31996),A=e.n(j),O=e(26037),R=e.n(O),w=e(97857),f=e.n(w),B=e(18205),T=e(83062),g=e(83622),a=e(67294),H=e(49218),z=e(26793),X=e(96726),Q=e(68230),ce=e(80940),m=e(85893),y={backgroundColor:"var(--colorSettings) !important"},$={backgroundColor:"transparent"},M=function(me){var oe=(0,X.ngQ)(),ee=oe.designable,xe=oe.setDesignable,ve=(0,z.$)(),he=ve.t,pe=(0,Q.d)(),De=pe.token,se=ee?y:$,Ce=(0,ce.wd)(),Se=Ce.isMobileLayout;return(0,H.y1)("Ctrl+Shift+U",function(){return xe(!ee)},[ee]),Se?null:(0,m.jsx)(T.Z,{title:he("UI Editor"),children:(0,m.jsx)(g.ZP,{"data-testid":"ui-editor-button",icon:(0,m.jsx)(B.Z,{style:{color:De.colorTextHeaderMenu}}),title:he("UI Editor"),style:f()(f()({},se),me.style),onClick:function(){xe(!ee)}})})},b=e(44245),u=e(93587),V=e(93323),I=e(47844),N=e(5574),K=e.n(N),E=e(86201),F=e(94350),L=e(84327),x=e(96486),v=e.n(x),W=e(61736),G=e(2483),re=function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return"".concat(me).concat((0,L.uid)())};F.Schema.silent(!0);var q={},te={silent:!0,compile:function(me){var oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ee=function(){if(te.silent)try{return new Function("$root","with($root) { return (".concat(me,"); }"))(oe)}catch{return"{{".concat(me,"}}")}else return new Function("$root","with($root) { return (".concat(me,"); }"))(oe)};return q[me]?q[me]:me.trim().startsWith("t(")?(q[me]=ee(),q[me]):ee()}};F.Schema.registerCompiler(te.compile);var ye=function(me){var oe=me.designable,ee=me.onDesignableChange,xe=me.components,ve=me.children,he=(0,a.useContext)(W.D),pe=(0,I.B)(),De=(0,a.useState)(function(){return(0,L.uid)()}),se=K()(De,2),Ce=se[0],Se=se[1],Te=(0,a.useMemo)(function(){return me.form||(0,E.createForm)()},[Ce]),Ie=(0,z.$)(),Fe=Ie.t,_e=(0,G.qD)(),we=(0,a.useMemo)(function(){return f()(f()({},me.scope),{},{t:Fe,randomString:re})},[me.scope,Fe,pe==null?void 0:pe.scope]),We=(0,a.useState)(oe),tt=K()(We,2),ze=tt[0],je=tt[1],Ve=(0,a.useMemo)(function(){return typeof oe=="boolean"?oe:ze},[oe,ze,he.designable]),Ae=(0,a.useMemo)(function(){return function(ae){typeof Ve!="boolean"&&je(ae),ee==null||ee(ae)}},[Ve,ee]);(0,a.useEffect)(function(){var ae,Me;Ve?(ae=_e.flowEngine)===null||ae===void 0||(ae=ae.flowSettings)===null||ae===void 0||ae.enable():(Me=_e.flowEngine)===null||Me===void 0||(Me=Me.flowSettings)===null||Me===void 0||Me.disable()},[_e,Ve]);var Re=(0,a.useCallback)(function(){Se((0,L.uid)())},[]),Be=(0,a.useMemo)(function(){return{scope:we,components:xe,reset:Re,refresh:v().noop,designable:Ve,setDesignable:Ae}},[xe,Ve,Re,we,Ae]);return(0,m.jsx)(W.D.Provider,{value:Be,children:(0,m.jsx)(F.FormProvider,{form:Te,children:(0,m.jsx)(I.G,{inherit:!0,scope:we,components:xe,children:ve})})})};ye.displayName="SchemaComponentProvider";var Pe=e(31601),Ee=function(be){A()(oe,be);var me=R()(oe);function oe(){return U()(this,oe),me.apply(this,arguments)}return C()(oe,[{key:"load",value:function(){var ee=P()(S()().mark(function ve(){return S()().wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:this.addComponents();case 1:case"end":return pe.stop()}},ve,this)}));function xe(){return ee.apply(this,arguments)}return xe}()},{key:"addComponents",value:function(){this.app.addComponents({DesignableSwitch:M})}}]),oe}(Pe.S),de=null},84577:function(Zt,Oe,e){"use strict";e.d(Oe,{zz:function(){return J.zz},Pl:function(){return J.Pl},oB:function(){return J.oB},lI:function(){return S},hi:function(){return X.hi},eJ:function(){return le.e},Co:function(){return U},aZ:function(){return X.aZ},ng:function(){return J.ng},et:function(){return C.e},cL:function(){return T},fd:function(){return Q},Cl:function(){return O},vH:function(){return H},sR:function(){return J.sR},wN:function(){return z.w},Dm:function(){return w},fM:function(){return X.fM}});var ue=e(67294),S=function(m){var y=(0,ue.useRef)(null);return(0,ue.useEffect)(function(){return y.current&&m!==y.current&&y.current.onUnmount(),y.current=m,m.onMount(),function(){m.onUnmount()}},[m]),m},le=e(96365),P=e(94350),p=e(96486),U=function(m,y){var $=(0,ue.useContext)(P.SchemaOptionsContext),M=$.components;return m?typeof m!="string"?m:(0,p.get)(M,m)||y:y},J=e(94516),C=e(98146),j=e(97857),A=e.n(j),O=function(m){var y=(0,ue.useContext)(P.SchemaOptionsContext),$=(0,ue.useContext)(P.SchemaExpressionScopeContext),M=(0,ue.useRef)();return M.current=$,m.toFieldProps(A()(A()({},y),{},{get scope(){return A()(A()({},y.scope),M.current)}}))},R=e(61736);function w(){return(0,ue.useContext)(R.D)}var f=e(26793),B=e(6145),T=function(){var m,y=(0,B.useCollectionManager_deprecated)(),$=y.getCollectionJoinField,M=y.getCollection,b=(0,P.useFieldSchema)(),u=(0,B.useCollection_deprecated)(),V=u.getField,I=V(b.name)||$(b["x-collection-field"]),N=(0,f.$)(),K=N.t,E=((m=b["x-component-props"])===null||m===void 0?void 0:m.fieldNames)||{},F=E.label,L=(0,ue.useMemo)(function(){if(!(!I||!(I!=null&&I.interface))&&["o2o","oho","obo","o2m","linkTo","m2o","m2m"].includes(I.interface)){var x=M(I.target);if((x==null?void 0:x.template)==="file")return[{label:K("Record picker"),value:"CollectionField"},{label:K("Select"),value:"AssociationSelect"}];switch(I.interface){case"o2m":return[{label:K("Record picker"),value:"CollectionField"},{label:K("Subtable"),value:"TableField"},{label:K("Select"),value:"AssociationSelect"}];case"m2o":case"m2m":case"linkTo":return[{label:K("Record picker"),value:"CollectionField"},{label:K("Select"),value:"AssociationSelect"}];default:return[{label:K("Record picker"),value:"CollectionField"},{label:K("Subform"),value:"FormField"},{label:K("Select"),value:"AssociationSelect"}]}}},[K,I==null?void 0:I.interface,F]);return L},g=e(35746),a=e(58837),H=function(){var m,y=(0,P.useField)(),$=(0,P.useFieldSchema)(),M=(0,a.Kx)(),b=(0,g.d9)(),u=(M==null?void 0:M.getField($.name))||(b==null?void 0:b.getCollectionField($["x-collection-field"])),V=(0,le.e)();(0,ue.useEffect)(function(){if(!(y!=null&&y.title)){var I;y.title=V(u==null||(I=u.uiSchema)===null||I===void 0?void 0:I.title)}},[u==null||(m=u.uiSchema)===null||m===void 0?void 0:m.title])},z=e(9780),X=e(18686),Q=function(m){var y,$=(0,f.$)(),M=$.t,b=(0,B.useCollectionManager_deprecated)(),u=b.getCollectionJoinField,V=b.getCollection,I=(0,P.useFieldSchema)(),N=(m==null?void 0:m.fieldSchema)||I,K=(0,P.useField)(),E=(0,P.useForm)(),F=(N==null?void 0:N["x-read-pretty"])||K.readPretty||E.readPretty,L=m==null?void 0:m.fieldSchema,x=(0,B.useCollection_deprecated)(),v=x.getField,W=(m==null?void 0:m.collectionField)||v(N.name)||u(N["x-collection-field"]),G=((y=N["x-component-props"])===null||y===void 0?void 0:y.fieldNames)||{},re=G.label,q=(0,ue.useMemo)(function(){if(!(!W||!(W!=null&&W.interface))&&["hasOne","hasMany","belongsTo","belongsToMany","belongsToArray"].includes(W.type)){var te=V(W.target);if((te==null?void 0:te.template)==="file")return F?[{label:M("Title"),value:"Select"},{label:M("File manager"),value:"FileManager"},{label:M("Tag"),value:"Tag"}]:[{label:M("Select"),value:"Select"},{label:M("Record picker"),value:"Picker"},{label:M("File manager"),value:"FileManager"}];if((te==null?void 0:te.template)==="tree"&&["m2m","o2m","m2o"].includes(W.interface))return F?[{label:M("Title"),value:"Select"},{label:M("Tag"),value:"Tag"},!L&&{label:M("Sub-details"),value:"Nester"},!L&&{label:M("Sub-table"),value:"SubTable"}]:[{label:M("Select"),value:"Select"},{label:M("Record picker"),value:"Picker"},!L&&["m2m","o2m"].includes(W.interface)&&{label:M("Sub-table"),value:"SubTable"},!L&&{label:M("Cascader Select"),value:"CascadeSelect"},!L&&{label:M("Sub-form"),value:"Nester"},{label:M("Sub-form(Popover)"),value:"PopoverNester"}];switch(W.interface){case"o2m":return F?[{label:M("Title"),value:"Select"},{label:M("Tag"),value:"Tag"},!L&&{label:M("Sub-table"),value:"SubTable"},!L&&{label:M("Sub-details"),value:"Nester"}]:[{label:M("Select"),value:"Select"},{label:M("Record picker"),value:"Picker"},!L&&{label:M("Sub-form"),value:"Nester"},{label:M("Sub-form(Popover)"),value:"PopoverNester"},!L&&{label:M("Sub-table"),value:"SubTable"}];case"m2m":case"mbm":return F?[{label:M("Title"),value:"Select"},{label:M("Tag"),value:"Tag"},!L&&{label:M("Sub-details"),value:"Nester"},!L&&{label:M("Sub-table"),value:"SubTable"}]:[{label:M("Select"),value:"Select"},{label:M("Record picker"),value:"Picker"},!L&&{label:M("Sub-table"),value:"SubTable"},!L&&{label:M("Sub-form"),value:"Nester"},{label:M("Sub-form(Popover)"),value:"PopoverNester"}];case"m2o":case"linkTo":return F?[{label:M("Title"),value:"Select"},{label:M("Tag"),value:"Tag"},!L&&{label:M("Sub-details"),value:"Nester"}]:[{label:M("Select"),value:"Select"},{label:M("Record picker"),value:"Picker"},!L&&{label:M("Sub-form"),value:"Nester"},{label:M("Sub-form(Popover)"),value:"PopoverNester"}];default:return F?[{label:M("Title"),value:"Select"},{label:M("Tag"),value:"Tag"},!L&&{label:M("Sub-details"),value:"Nester"}]:[{label:M("Select"),value:"Select"},{label:M("Record picker"),value:"Picker"},!L&&{label:M("Sub-form"),value:"Nester"},{label:M("Sub-form(Popover)"),value:"PopoverNester"}]}}},[M,W==null?void 0:W.interface,re,F,L]);return(q||[]).filter(Boolean)}},18686:function(Zt,Oe,e){"use strict";e.d(Oe,{aZ:function(){return ce},fM:function(){return y},hi:function(){return m}});var ue=e(5574),S=e.n(ue),le=e(97857),P=e.n(le),p=e(94350),U=e(83204),J=e(9361),C=e(96486),j=e.n(C),A=e(67294),O=e(89250),R=e(96726),w=e(21143),f=e(10097),B=e(1892),T=e(28561),g=function(b,u,V,I,N){return N.includes("/popups/")?2*I.paddingContentVertical+22+I.paddingPageVertical:b?I.paddingContentHorizontalLG:V?u?I.controlPaddingHorizontal+3*I.controlPaddingHorizontalSM+22+I.paddingContentHorizontalLG:I.paddingContentHorizontalLG+12:u?I.paddingSM+I.controlHeight+I.marginXS+2*I.controlPaddingHorizontalSM+22+I.paddingContentHorizontalLG:I.controlHeight+I.marginXS+(I.paddingContentVertical+2)*2+I.paddingContentHorizontalLG},a=function(b){var u=J.Z.useToken(),V=u.token,I=(0,R.ngQ)(),N=I.designable,K=(0,f.useBlockHeightProps)(),E=K.heightProps,F=(0,O.useLocation)(),L=b||E||{},x=L.disablePageHeader,v=L.enablePageTabs,W=L.hidePageTitle,G=V.sizeXXL-2,re=N?V.controlHeight+2*V.paddingContentHorizontalLG:1*V.paddingContentHorizontalLG,q=g(x,v,W,V,F.pathname);return G+q+re},H=function(){var b=J.Z.useToken(),u=b.token,V=(0,R.ngQ)(),I=V.designable,N=u.paddingContentVerticalLG+u.margin+2*u.paddingContentVertical+24,K=I?u.controlHeight+2*u.paddingContentHorizontalLG:1*u.paddingContentHorizontalLG;return N+K},z=function(b){var u=(0,p.useFieldSchema)(),V=$(u),I=a(b),N=H();return V?N:I},X=["workflowManualTasks","approvals","approvalRecords"],Q=function(){var b,u=J.Z.useToken(),V=u.token,I=(0,f.useBlockHeightProps)(),N=I.heightProps,K=(0,B.Si)(),E=K.heightProps,F=(0,R.ngQ)(),L=F.designable,x=(0,p.useFieldSchema)(),v=E||N,W=N.titleHeight,G=z(v),re=(0,w.useCollection)(),q=re.name,te=v.heightMode,ye=v.height,Pe=v.title;if(!(!(v!=null&&v.heightMode)||te===T.j.DEFAULT)){var Ee=Object.keys(((b=x.parent.properties.actions)===null||b===void 0?void 0:b.properties)||{}).length>0,de=V.controlHeight+V.padding+V.marginLG,be=Ee||L?V.controlHeight+2*V.marginLG:V.marginLG,me=(L&&!X.includes(q)?V.controlHeight:22)+2*V.padding+1,oe=Pe?W:0;return te===T.j.FULL_HEIGHT?window.innerHeight-G-oe-me-be-de:ye-oe-be-me-de}},ce=function(b){var u=(0,f.useBlockHeightProps)(),V=u.heightProps,I=z(),N=V||{},K=N.heightMode,E=N.height,F=N.title,L=N.titleHeight,x=F?L:0;if(!(!(V!=null&&V.heightMode)||K===T.j.DEFAULT)){if(K===T.j.FULL_HEIGHT){var v=window.innerHeight-I;return b!=null&&b.removeBlockHeaderHeight&&(v=v-x),b!=null&&b.innerExtraHeight&&(v=v-b.innerExtraHeight),v}return E}},m=function(){var b=(0,p.useFieldSchema)(),u=(0,A.useMemo)(function(){return(0,f.getPageSchema)(b)},[]),V=(u==null?void 0:u["x-component-props"])||{},I=V.disablePageHeader,N=V.enablePageTabs,K=V.hidePageTitle,E=P()(P()({},b==null?void 0:b["x-component-props"]),{},{disablePageHeader:I,enablePageTabs:N,hidePageTitle:K}),F=z(E),L=E||{},x=L.heightMode,v=L.height;if(!(!(E!=null&&E.heightMode)||x===T.j.DEFAULT))return x===T.j.FULL_HEIGHT?window.innerHeight-F:v},y=function(){var b=(0,A.useState)(),u=S()(b,2),V=u[0],I=u[1],N=(0,A.useRef)(null),K=Q(),E=(0,A.useCallback)((0,C.debounce)(function(){var L;if(N.current){var x=N.current.getBoundingClientRect(),v=(L=N.current.querySelector(".ant-table"))===null||L===void 0?void 0:L.getBoundingClientRect();v&&I(x.width)}},100),[K]),F=(0,A.useCallback)(function(L){N.current=L&&L.children?L.children[0]:null,E()},[E]);return(0,U.Z)("resize",E),{height:K,width:V,tableSizeRefCallback:F}},$=function M(b){if(!b)return null;if(b["x-component"]==="Action.Container"){var u;return(b==null||(u=b.parent)===null||u===void 0||(u=u["x-component-props"])===null||u===void 0?void 0:u.openMode)!=="page"}return M(b.parent)}},96365:function(Zt,Oe,e){"use strict";e.d(Oe,{e:function(){return j}});var ue=e(97857),S=e.n(ue),le=e(52677),P=e.n(le),p=e(94350),U=e(67294),J={},C=function(O){var R=/{{.*?}}/g;return R.test(O)},j=function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{noCache:!1},R=O.noCache,w=(0,U.useContext)(p.SchemaOptionsContext),f=(0,U.useContext)(p.SchemaExpressionScopeContext);return function(B,T){var g=!1,a;if(typeof B=="string"&&B.startsWith("{{")&&(g=!0,a=B),B&&P()(B)==="object"&&!(0,U.isValidElement)(B)){try{a=JSON.stringify(B)}catch(z){return console.warn("Failed to stringify:",z),B}if(J[a])return J[a];g=C(a)}if(Array.isArray(B)){try{a=JSON.stringify(B)}catch(z){return console.warn("Failed to stringify:",z),B}if(J[a])return J[a];g=C(a)}if(g){var H=S()(S()(S()({},w==null?void 0:w.scope),f),T);if(!a)return p.Schema.compile(B,H);try{return R?p.Schema.compile(B,H):(J[a]=J[a]||p.Schema.compile(B,H),J[a])}catch(z){return console.log("useCompile error",B,z),p.Schema.compile(B,H)}}return B}}},94516:function(Zt,Oe,e){"use strict";e.d(Oe,{zz:function(){return te},Pl:function(){return x},oB:function(){return re},ng:function(){return Pe},sR:function(){return ye}});var ue=e(5574),S=e.n(ue),le=e(19632),P=e.n(le),p=e(15009),U=e.n(p),J=e(99289),C=e.n(J),j=e(12444),A=e.n(j),O=e(72004),R=e.n(O),w=e(9783),f=e.n(w),B=e(97857),T=e.n(B),g=e(94350),a=e(84327),H=e(90105),z=e(45360),X=e(50361),Q=e.n(X),ce=e(27361),m=e.n(ce),y=e(36968),$=e.n(y),M=e(67294),b=e(26793),u=e(12174),V=e(57105),I=e(98902),N=e(61736);function K(Ee,de){if(Ee)return Ee["x-app-version"]||(Ee["x-app-version"]=de),Object.keys(Ee.properties||{}).forEach(function(be){var me;K((me=Ee.properties)===null||me===void 0?void 0:me[be],de)}),Ee}var E={i8:"2.0.1"},F=e(80940),L=e(85893);function x(Ee){return new te(Ee)}var v=function Ee(de){de&&(de["x-uid"]||(de["x-uid"]=(0,a.uid)()),Object.keys(de.properties||{}).forEach(function(be){Ee(de.properties[be])}))},W=function(de){return de},G=function(de,be){if(!(!de||!be)){for(var me in be)if(Object.prototype.hasOwnProperty.call(be,me)){var oe=be[me];if(oe!==(de==null?void 0:de[me]))return!1}return!0}},re=function(de,be){if(de["x-uid"]&&de["x-uid"]===be["x-uid"])return[null,de.toJSON()];var me=de.toJSON(),oe=T()(T()({},me),{},{properties:{}}),ee=null,xe=function ve(he,pe){Object.keys(he||{}).forEach(function(De){var se=he[De];if(se["x-uid"]===be["x-uid"]){ee=he[De];return}else pe.properties[De]=T()(T()({},se),{},{properties:{}}),ve(se==null?void 0:se.properties,pe.properties[De])})};return xe(me.properties,oe),[oe,ee]},q=function(de){return de},te=function(){function Ee(de){A()(this,Ee),f()(this,"current",void 0),f()(this,"options",void 0),f()(this,"appVersion",void 0),f()(this,"events",{}),this.options=de,this.current=de.current,this.appVersion=de.appVersion}return R()(Ee,[{key:"model",get:function(){return this.options.model}},{key:"query",get:function(){return this.options.query}},{key:"loadAPIClientEvents",value:function(){var be=this,me=this.options,oe=me.api,ee=me.t,xe=ee===void 0?q:ee;if(oe){var ve=function(pe){if(!pe)return[];var De=Object.values(pe.properties).length,se=[];return pe.mapProperties(function(Ce){Ce["x-component-props"]=Ce["x-component-props"]||{},Ce["x-component-props"].width=100/De,Ce["x-uid"]&&se.push({"x-uid":Ce["x-uid"],"x-component-props":Ce["x-component-props"]})}),pe["x-uid"]&&se.length?se:[]};this.on("insertAdjacent",function(){var he=C()(U()().mark(function pe(De){var se,Ce,Se,Te,Ie,Fe,_e,we,We,tt;return U()().wrap(function(je){for(;;)switch(je.prev=je.next){case 0:if(Ce=De.onSuccess,Se=De.current,Te=De.position,Ie=De.schema,Fe=De.wrap,_e=De.wrapped,we=De.removed,We=[],(_e==null?void 0:_e["x-component"])==="Grid.Col"&&(We=We.concat(ve(_e.parent))),(we==null?void 0:we["x-component"])==="Grid.Col"&&(We=We.concat(ve(we.parent))),be.refresh(),Se["x-uid"]){je.next=7;break}return je.abrupt("return");case 7:return je.next=9,oe.request({url:"/uiSchemas:insertAdjacent/".concat(Se["x-uid"],"?position=").concat(Te),method:"post",data:{schema:K(Ie,be.appVersion),wrap:Fe}});case 9:if(tt=je.sent,!We.length){je.next=13;break}return je.next=13,oe.request({url:"/uiSchemas:batchPatch",method:"post",data:We});case 13:if(!(we!=null&&we["x-uid"])){je.next=16;break}return je.next=16,oe.request({url:"/uiSchemas:remove/".concat(we["x-uid"]),method:"post"});case 16:Ce==null||Ce(tt==null||(se=tt.data)===null||se===void 0?void 0:se.data),z.ZP.success(xe("Saved successfully"),.2);case 18:case"end":return je.stop()}},pe)}));return function(pe){return he.apply(this,arguments)}}()),this.on("patch",function(){var he=C()(U()().mark(function pe(De){var se;return U()().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(se=De.schema,be.refresh(),se!=null&&se["x-uid"]){Se.next=4;break}return Se.abrupt("return");case 4:return Se.next=6,oe.request({url:"/uiSchemas:patch",method:"post",data:T()({},se)});case 6:z.ZP.success(xe("Saved successfully"),.2);case 7:case"end":return Se.stop()}},pe)}));return function(pe){return he.apply(this,arguments)}}()),this.on("initializeActionContext",function(){var he=C()(U()().mark(function pe(De){var se;return U()().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(se=De.schema,se!=null&&se["x-uid"]){Se.next=3;break}return Se.abrupt("return");case 3:return Se.next=5,oe.request({url:"/uiSchemas:initializeActionContext",method:"post",data:T()({},se)});case 5:case"end":return Se.stop()}},pe)}));return function(pe){return he.apply(this,arguments)}}()),this.on("batchPatch",function(){var he=C()(U()().mark(function pe(De){var se;return U()().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return se=De.schemas,be.refresh(),Se.next=4,oe.request({url:"/uiSchemas:batchPatch",method:"post",data:se});case 4:z.ZP.success(xe("Saved successfully"),.2);case 5:case"end":return Se.stop()}},pe)}));return function(pe){return he.apply(this,arguments)}}()),this.on("remove",function(){var he=C()(U()().mark(function pe(De){var se,Ce;return U()().wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:if(se=De.removed,Ce=[],(se==null?void 0:se["x-component"])==="Grid.Col"&&(Ce=ve(se.parent)),be.refresh(),se!=null&&se["x-uid"]){Te.next=6;break}return Te.abrupt("return");case 6:return Te.next=8,oe.request({url:"/uiSchemas:remove/".concat(se["x-uid"]),method:"post"});case 8:if(!Ce.length){Te.next=11;break}return Te.next=11,oe.request({url:"/uiSchemas:batchPatch",method:"post",data:Ce});case 11:z.ZP.success(xe("Saved successfully"),.2);case 12:case"end":return Te.stop()}},pe)}));return function(pe){return he.apply(this,arguments)}}())}}},{key:"prepareProperty",value:function(be){be.type||(be.type="void"),be.name||(be.name=(0,a.uid)()),this.current["x-uid"]&&v(be)}},{key:"on",value:function(be,me){this.events[be]||(this.events[be]=[]),this.events[be].push(me)}},{key:"emit",value:function(){var de=C()(U()().mark(function me(oe){var ee=this,xe,ve,he,pe,De,se=arguments;return U()().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(this.events[oe]){Se.next=2;break}return Se.abrupt("return");case 2:for(xe=se.length,ve=new Array(xe>1?xe-1:0),he=1;he<xe;he++)ve[he-1]=se[he];return pe=ve[0],De=ve.slice(1),Se.abrupt("return",Promise.all(this.events[oe].map(function(Te){return Te.bind(ee).apply(void 0,[T()({current:ee.current},pe)].concat(P()(De)))})));case 5:case"end":return Se.stop()}},me,this)}));function be(me){return de.apply(this,arguments)}return be}()},{key:"parentsIn",value:function(be){if(!be||!g.Schema.isSchemaInstance(be))return!1;for(var me=this.current;(oe=me)!==null&&oe!==void 0&&oe.parent;){var oe;if(me.parent===be)return!0;me=me.parent}return!1}},{key:"refresh",value:function(be){var me=this.options.refresh;return me==null?void 0:me(be)}},{key:"deepMerge",value:function(be){var me=this,oe={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(be).forEach(function(xe){oe[xe]?(me.current[xe]=be[xe],me.updateModel(oe[xe],be[xe])):ee[xe]?Object.keys(be[xe]).forEach(function(ve){$()(me.current,[xe,ve],be[xe][ve]),me.updateModel([ee[xe],ve],be[xe][ve])}):me.current[xe]=be[xe]}),this.emit("patch",{schema:be})}},{key:"getSchemaAttribute",value:function(be,me){return m()(this.current,be,me)}},{key:"shallowMerge",value:function(be){var me=this,oe={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(be).forEach(function(ee){me.current[ee]=be[ee],oe[ee]&&me.updateModel(oe[ee],be[ee])}),this.emit("patch",{schema:be})}},{key:"updateModel",value:function(be,me){var oe=function(xe){$()(xe,be,me)};this.model&&oe(this.model),this.query&&this.query.take(oe)}},{key:"insertAdjacent",value:function(be,me){var oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};switch(be){case"beforeBegin":return this.insertBeforeBegin(me,oe);case"afterBegin":return this.insertAfterBegin(me,oe);case"beforeEnd":return this.insertBeforeEnd(me,oe);case"afterEnd":return this.insertAfterEnd(me,oe)}}},{key:"recursiveRemoveIfNoChildren",value:function(be,me){if(be){for(var oe=be,ee,xe=me==null?void 0:me.breakRemoveOn;oe;){if(typeof xe=="function"){if(xe(oe))break}else if(G(oe,xe))break;var ve=Object.keys(oe.properties||{}).length;if(ve>0)break;oe.parent&&(ee=oe.parent.removeProperty(oe.name)),oe=oe.parent}return ee}}},{key:"remove",value:function(be){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},oe=me.breakRemoveOn,ee=me.removeParentsIfNoChildren,xe=be||this.current,ve=xe.parent.removeProperty(xe.name);if(ee){var he=this.recursiveRemoveIfNoChildren(xe.parent,{breakRemoveOn:oe});he&&(ve=he)}return this.emit("remove",{removed:ve})}},{key:"removeWithoutEmit",value:function(be){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},oe=me.breakRemoveOn,ee=me.removeParentsIfNoChildren,xe=be||this.current,ve=xe.parent.removeProperty(xe.name);if(ee){var he=this.recursiveRemoveIfNoChildren(xe.parent,{breakRemoveOn:oe});he&&(ve=he)}return ve}},{key:"insertBeforeBeginOrAfterEnd",value:function(be){var me=this,oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(g.Schema.isSchemaInstance(this.current)&&g.Schema.isSchemaInstance(be)&&this.current.parent===be.parent){var ee=0,xe=0;return this.current.parent.mapProperties(function(ve,he,pe){me.current.name===he&&(xe=pe),be.name===he&&(ee=pe)}),ee>xe?this.insertBeforeBegin(be,oe):this.insertAfterEnd(be,oe)}}},{key:"insertBeforeBegin",value:function(be){var me=this,oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(g.Schema.isSchemaInstance(this.current)){var ee={onSuccess:oe.onSuccess},xe=oe.wrap,ve=xe===void 0?W:xe,he=oe.breakRemoveOn,pe=oe.removeParentsIfNoChildren;if(g.Schema.isSchemaInstance(be)){if(this.parentsIn(be)){this.emit("error",{code:"parent_is_not_allowed",schema:be});return}be.parent.removeProperty(be.name),pe&&(ee.removed=this.recursiveRemoveIfNoChildren(be.parent,{breakRemoveOn:he}))}else be&&(be=Q()(be));var De={},se=!1,Ce=0,Se=0;this.current.parent.mapProperties(function(tt,ze){ze===me.current.name&&(Se=Ce,se=!0,++Ce),tt["x-index"]=Ce,++Ce,se&&(De[ze]=tt,me.current.parent.removeProperty(ze))}),this.prepareProperty(be);var Te=ve(be),Ie=this.current.parent.addProperty(Te.name||(0,a.uid)(),Te);Ie["x-index"]=Se,Ie.parent=this.current.parent,this.current.parent.setProperties(De);var Fe=re(Ie,be),_e=S()(Fe,2),we=_e[0],We=_e[1];this.emit("insertAdjacent",T()({position:"beforeBegin",schema:We,wrapped:Te,wrap:we},ee))}}},{key:"insertAfterBegin",value:function(be){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(g.Schema.isSchemaInstance(this.current)){var oe={onSuccess:me.onSuccess},ee=me.wrap,xe=ee===void 0?W:ee,ve=me.breakRemoveOn,he=me.removeParentsIfNoChildren;if(g.Schema.isSchemaInstance(be)){if(this.parentsIn(be)){this.emit("error",{code:"parent_is_not_allowed",schema:be});return}be.parent.removeProperty(be.name),he&&(oe.removed=this.recursiveRemoveIfNoChildren(be.parent,{breakRemoveOn:ve}))}else be&&(be=Q()(be));var pe={},De=1;this.current.mapProperties(function(_e,we){_e["x-index"]=De,++De,pe[we]=_e}),this.current.properties={},this.prepareProperty(be);var se=xe(be),Ce=this.current.addProperty(se.name||(0,a.uid)(),se);Ce["x-index"]=0,Ce.parent=this.current,this.current.setProperties(pe);var Se=re(Ce,be),Te=S()(Se,2),Ie=Te[0],Fe=Te[1];this.emit("insertAdjacent",T()({position:"afterBegin",schema:Fe,wrap:Ie,wrapped:se},oe))}}},{key:"insertBeforeEnd",value:function(be){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(g.Schema.isSchemaInstance(this.current)){delete be["x-index"];var oe={onSuccess:me.onSuccess},ee=me.wrap,xe=ee===void 0?W:ee,ve=me.breakRemoveOn,he=me.removeParentsIfNoChildren;if(g.Schema.isSchemaInstance(be)){if(this.parentsIn(be)){this.emit("error",{code:"parent_is_not_allowed",schema:be});return}be.parent.removeProperty(be.name),he&&(oe.removed=this.recursiveRemoveIfNoChildren(be.parent,{breakRemoveOn:ve}))}else be&&(be=Q()(be));this.prepareProperty(be);var pe=xe(be),De=this.current.addProperty(pe.name||(0,a.uid)(),pe);De.parent=this.current;var se=re(De,be),Ce=S()(se,2),Se=Ce[0],Te=Ce[1];return this.emit("insertAdjacent",T()({position:"beforeEnd",schema:Te,wrap:Se,wrapped:pe},oe))}}},{key:"insertAfterEnd",value:function(be){var me=this,oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(g.Schema.isSchemaInstance(this.current)){var ee={onSuccess:oe==null?void 0:oe.onSuccess},xe=oe.wrap,ve=xe===void 0?W:xe,he=oe.breakRemoveOn,pe=oe.removeParentsIfNoChildren,De=0,se=0,Ce=!1,Se={};if(this.current.parent.mapProperties(function(tt,ze){tt["x-index"]=De,ze===me.current.name&&(++De,se=De,Ce=!0),++De,Ce&&ze!==me.current.name&&(Se[ze]=tt,me.current.parent.removeProperty(ze))}),g.Schema.isSchemaInstance(be)){if(this.parentsIn(be)){this.emit("error",{code:"parent_is_not_allowed",schema:be});return}be.parent.removeProperty(be.name),pe&&(ee.removed=this.recursiveRemoveIfNoChildren(be.parent,{breakRemoveOn:he})),be.parent=null}else be&&(be=Q()(be));this.prepareProperty(be);var Te=ve(be),Ie=this.current.parent.addProperty(Te.name||(0,a.uid)(),Te);Ie.parent=this.current.parent,Ie["x-index"]=se,this.current.parent.setProperties(Se);var Fe=re(Ie,be),_e=S()(Fe,2),we=_e[0],We=_e[1];this.emit("insertAdjacent",T()({position:"afterEnd",schema:We,wrap:we,wrapped:Te},ee))}}}]),Ee}();function ye(){var Ee=(0,M.useContext)(g.SchemaOptionsContext),de=(0,M.useMemo)(function(){return(Ee==null?void 0:Ee.components)||{}},[Ee]),be=function(oe){if(!oe)return null;if(typeof oe!="string")return oe;var ee=m()(de,oe);return ee||console.error('[nocobase]: Component "'.concat(oe,'" not found')),ee};return be}function Pe(){var Ee=(0,M.useContext)(N.D),de=Ee.designable,be=Ee.setDesignable,me=Ee.refresh,oe=Ee.reset,ee=(0,M.useContext)(g.SchemaOptionsContext),xe=(0,M.useMemo)(function(){return(ee==null?void 0:ee.components)||{}},[ee]),ve=(0,M.useMemo)(function(){return function(){return(0,L.jsx)(L.Fragment,{})}},[]),he=(0,H.Z)(),pe=(0,V.gR)(),De=(0,V.QJ)(),se=(0,M.useCallback)(function(tt){me==null||me(),he(),pe==null||pe(tt),De==null||De()},[me,he,pe,De]),Ce=(0,g.useField)(),Se=(0,g.useFieldSchema)(),Te=(0,u.LY)(),Ie=(0,b.$)(),Fe=Ie.t,_e=(0,M.useMemo)(function(){return x({t:Fe,api:Te,refresh:se,current:Se,model:Ce,appVersion:E.i8})},[Fe,Te,se,Se,Ce]);(0,M.useEffect)(function(){_e.loadAPIClientEvents()},[_e]);var we=(0,F.wd)(),We=we.isMobileLayout;return{dn:_e,designable:We?!1:de,reset:oe,refresh:se,setDesignable:be,DesignableBar:ve,findComponent:(0,M.useCallback)(function(tt){var ze;if(!tt)return null;if(typeof tt!="string")return tt;var je=m()(xe,tt);return(ze=je==null?void 0:je[I.XI])!==null&&ze!==void 0?ze:je},[m()]),on:_e.on.bind(_e),patch:(0,M.useCallback)(function(tt,ze){var je=function(Re){Object.keys(Re).forEach(function(Be){var ae=Re[Be];Be==="title"&&(Ce.title=ae,Se.title=ae),Be==="x-decorator-props"&&(Ce.decoratorProps||(Ce.decoratorProps={}),Se["x-decorator-props"]||(Se["x-decorator-props"]={}),Object.keys(ae).forEach(function(Me){Ce.decoratorProps[Me]=ae[Me],Se["x-decorator-props"][Me]=ae[Me]})),Be==="x-component-props"&&(Ce.componentProps||(Ce.componentProps={}),Se["x-component-props"]||(Se["x-component-props"]={}),Object.keys(ae).forEach(function(Me){Ce.componentProps[Me]=ae[Me],Se["x-component-props"][Me]=ae[Me]}))})};if(typeof tt=="string"){var Ve={};return $()(Ve,tt,ze),je(Ve)}je(tt),se()},[_e]),shallowMerge:(0,M.useCallback)(function(tt){_e.shallowMerge(tt)},[_e]),deepMerge:(0,M.useCallback)(function(tt){_e.deepMerge(tt)},[_e]),remove:(0,M.useCallback)(function(tt,ze){_e.remove(tt,ze)},[_e]),insertAdjacent:(0,M.useCallback)(function(tt,ze,je){_e.insertAdjacent(tt,ze,je)},[_e]),insertBeforeBegin:(0,M.useCallback)(function(tt){_e.insertBeforeBegin(tt)},[_e]),insertAfterBegin:(0,M.useCallback)(function(tt){_e.insertAfterBegin(tt)},[_e]),insertBeforeEnd:(0,M.useCallback)(function(tt){_e.insertBeforeEnd(tt)},[_e]),insertAfterEnd:(0,M.useCallback)(function(tt){_e.insertAfterEnd(tt)},[_e])}}},98146:function(Zt,Oe,e){"use strict";e.d(Oe,{e:function(){return U}});var ue=e(94350),S=e(84577),le=e(67294),P=e(97970),p=function(){return null};p.isNullComponent=!0;var U=function(){var C=(0,S.ng)(),j=C.designable,A=(0,ue.useFieldSchema)(),O=(0,le.useMemo)(function(){return A["x-designer"]||A["x-toolbar"]?A["x-designer"]||A["x-toolbar"]:A["x-settings"]?P.Mf:p},[A]),R=(0,S.Co)(O);return j&&R||p}},9780:function(Zt,Oe,e){"use strict";e.d(Oe,{w:function(){return J}});var ue=e(97857),S=e.n(ue),le=e(13769),P=e.n(le),p=["useProps"],U=function(){return{}},J=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},A=j.useProps,O=A===void 0?U:A,R=P()(j,p),w=O;typeof O!="function"&&(w=U);var f=w();return S()(S()({},R),f)}},96726:function(Zt,Oe,e){"use strict";e.d(Oe,{aUM:function(){return le.aU},olz:function(){return le.ol},N0i:function(){return le.N0},fWn:function(){return le.fW},mlL:function(){return le.ml},EIK:function(){return le.EI},$Lt:function(){return le.$L},$b8:function(){return le.$b},s8w:function(){return yl.s8},Nm$:function(){return yl.Nm},HTy:function(){return qt},lkv:function(){return En},rDu:function(){return Co},eYL:function(){return le.eY},Rat:function(){return Xl},oAt:function(){return xc},E7E:function(){return Dc},$SD:function(){return Dd},fUi:function(){return Qa.fU},QcG:function(){return _d},MLy:function(){return Mr.M},gOu:function(){return nf},jYG:function(){return Hu.jY},PuU:function(){return Hu.Pu},smG:function(){return Hu.sm},mx3:function(){return le.mx},C1I:function(){return le.C1},Ssf:function(){return Zs},vTp:function(){return ym},XZJ:function(){return Uu},Tt2:function(){return Cm},zH8:function(){return Sm.z},Q5L:function(){return Js},Pok:function(){return Od},Vm0:function(){return Lc},xI_:function(){return Md},Lip:function(){return hu},vLv:function(){return z.DateFilterDynamicComponent},WN4:function(){return Ls.W},Mtg:function(){return jl.Mt},iNu:function(){return jl.iN},zzt:function(){return Kt.zz},_bl:function(){return X._b},POi:function(){return _m},AOY:function(){return he},izJ:function(){return Qs},LBT:function(){return z.DndContext},IWB:function(){return z.DragHandler},LCt:function(){return z.DraggableContext},FyH:function(){return ee.Fy},Nir:function(){return ee.Ni},q8U:function(){return ee.q8},HGA:function(){return ee.HG},QTe:function(){return ee.QT},JEX:function(){return ee.JE},fAH:function(){return Pf},ORZ:function(){return Qv},xKb:function(){return Wc},P8E:function(){return $c},$w$:function(){return ee.$w},nBj:function(){return ee.nB},Oct:function(){return ee.Oc},zdw:function(){return ee.zd},CXR:function(){return _s},BQs:function(){return lu.BQ},Hj5:function(){return Di.H},M0b:function(){return $d},Dnz:function(){return Ls.D},DQE:function(){return Io},pgx:function(){return Wd},wn$:function(){return Zr.wn},GzZ:function(){return Zr.Gz},tJZ:function(){return Zr.tJ},fox:function(){return Zr.fo},VTd:function(){return Zr.VT},XsZ:function(){return Zr.Xs},l09:function(){return be},D_t:function(){return Vd.D},_80:function(){return vc},WiK:function(){return $o},xJW:function(){return ee.xJ},RVL:function(){return X.RV},Bc8:function(){return ur},hG9:function(){return zc},DCh:function(){return oc},rjZ:function(){return Ds.rj},Cqo:function(){return Au},jg7:function(){return Ds.jg},gsn:function(){return lu.gs},z1L:function(){return Wu.z},$18:function(){return sf.$},IIB:function(){return lu.II},RnZ:function(){return ff},mX2:function(){return lu.mX},zDC:function(){return ul.zD},Phs:function(){return lu.Ph},hiD:function(){return $p},aVo:function(){return ed},UGj:function(){return Xd.U},yq5:function(){return Xd.y},v2r:function(){return ki},HIW:function(){return mf},T3C:function(){return Wa},d97:function(){return mo.d9},hGv:function(){return Ol},tlE:function(){return pf},irr:function(){return bl},rop:function(){return hf.r},gGi:function(){return fp},DBW:function(){return Vt.D},MBS:function(){return mp.M},pGO:function(){return td},Y8K:function(){return ju},iVT:function(){return lu.iV},ODP:function(){return ul.OD},lbb:function(){return ul.lb},b7w:function(){return ul.b7},sUk:function(){return ul.sU},x1j:function(){return le.x1},m1v:function(){return X.m1},glM:function(){return sr},xZD:function(){return le.xZ},IuH:function(){return Zr.Iu},MkN:function(){return le.Mk},Hof:function(){return ev},n6:function(){return X.n6},DDd:function(){return vs.D},ATq:function(){return X.AT},G0E:function(){return X.G0},a$w:function(){return X.a$},TzZ:function(){return X.Tz},y00:function(){return le.y0},PhF:function(){return Sr},Cqv:function(){return z.ShowFormData},cof:function(){return le.co},bts:function(){return z.Sortable},Fop:function(){return z.SortableContext},TRI:function(){return z.SortableItem},ORg:function(){return z.SortableProvider},TaI:function(){return rd},qHe:function(){return Wu.q},iA_:function(){return _u},gvM:function(){return iv},SnY:function(){return xf},ASv:function(){return uv},bwk:function(){return ds},mQc:function(){return $s},c__:function(){return As.c},QZ3:function(){return Xt},L39:function(){return Hu.L3},feF:function(){return Op},jII:function(){return vv},mPs:function(){return Mf},tgM:function(){return Tp},gqx:function(){return Qa.gq},Qm7:function(){return Qa.Qm},_wD:function(){return ts._w},rjl:function(){return ts.rj},mfA:function(){return Rp.m},SLL:function(){return le.SL},sBv:function(){return le.sB},iTm:function(){return ee.iT},BDK:function(){return Qa.BD},Pls:function(){return Kt.Pl},Oxq:function(){return rn},WLi:function(){return cr},$9M:function(){return ee.$9},nCn:function(){return un},iNG:function(){return br},tD8:function(){return vn},pg9:function(){return jo},Ofb:function(){return ee.Of},ibf:function(){return so},WyG:function(){return oe},l6$:function(){return S.l6},WGR:function(){return rt},tl0:function(){return jl.tl},C$H:function(){return ul.C$},SET:function(){return jl.SE},cNQ:function(){return ul.cN},NCb:function(){return ot.NC},I9l:function(){return z.getRenderContent},XQ2:function(){return ot.XQ},Fxc:function(){return xl},KKi:function(){return le.KK},MDU:function(){return jl.MD},CEH:function(){return jl.CE},vUN:function(){return le.vU},ZZb:function(){return ee.ZZ},tqC:function(){return jl.tq},elO:function(){return ul.el},CfU:function(){return iu},VPR:function(){return le.VP},LPx:function(){return jl.LP},fY6:function(){return jl.fY},Vm:function(){return dv},tP3:function(){return Qa.tP},w_o:function(){return jl.w_},SJF:function(){return vu},_Ko:function(){return tu},Mev:function(){return Jt},i2K:function(){return Xr},WmO:function(){return Zr.Wm},oBi:function(){return Kt.oB},hKP:function(){return ot.hK},DU1:function(){return le.DU},XCj:function(){return le.XC},EM:function(){return le.EM},kRO:function(){return yl.kR},KyD:function(){return ko.Ky},Vpg:function(){return hs},lIL:function(){return Kt.lI},KxP:function(){return Mr.K},hi9:function(){return Kt.hi},p27:function(){return le.p2},z9d:function(){return ld.z9},x_5:function(){return is.x},eJW:function(){return Kt.eJ},Cor:function(){return Kt.Co},Zmk:function(){return mo.Zm},aZq:function(){return Kt.aZ},P1D:function(){return jl.P1},ngQ:function(){return Kt.ng},ett:function(){return Kt.et},ySm:function(){return Di.y},Zd$:function(){return ee.Zd},cLh:function(){return Kt.cL},baz:function(){return ee.b},fde:function(){return Kt.fd},Xdt:function(){return ul.Xd},Cld:function(){return Kt.Cl},vH8:function(){return Kt.vH},PLH:function(){return Zr.PL},V8t:function(){return Zr.V8},tMk:function(){return Zr.tM},xQm:function(){return Zr.xQ},sRe:function(){return Kt.sR},U1u:function(){return Qn},HS$:function(){return le.HS},vBu:function(){return le.vB},QYZ:function(){return le.QY},t9d:function(){return le.t9},Kgy:function(){return Zr.Kg},aJ2:function(){return Zr.aJ},n14:function(){return Ds.n1},DiB:function(){return Ds.Di},l1O:function(){return ee.l1},w5o:function(){return ee.w5},p3Q:function(){return ee.p3},G5e:function(){return ee.G5},xj2:function(){return ee.xj},rxY:function(){return ee.rx},Ils:function(){return ul.Il},zCB:function(){return le.zC},yrJ:function(){return Jd},CMh:function(){return Fl},v$P:function(){return La.v},FMn:function(){return Zi},T0O:function(){return $i},a4r:function(){return Vt.a},wNf:function(){return Kt.wN},Dmu:function(){return Kt.Dm},Bsl:function(){return X.Bs},yKv:function(){return Gt.y},pkQ:function(){return Vm.p},fMB:function(){return Kt.fM},gCg:function(){return As.g},eT6:function(){return ee.eT},$SN:function(){return Qa.$S},q4O:function(){return ee.q4},ymE:function(){return ts.ym},uqQ:function(){return le.uq},Q3P:function(){return ot.Q3},K5K:function(){return le.K5}});var ue={};e.r(ue),e.d(ue,{Action:function(){return le.aU},ActionBar:function(){return le.ol},ActionBarProvider:function(){return le.N0},ActionContext:function(){return le.fW},ActionContextNoRerender:function(){return le.ml},ActionContextProvider:function(){return le.EI},ActionDesigner:function(){return le.$L},AfterSuccess:function(){return le.$b},AllDataBlocksContext:function(){return yl.s8},AllDataBlocksProvider:function(){return yl.Nm},AntdSchemaComponentPlugin:function(){return qt},AntdSchemaComponentProvider:function(){return En},AppendsTreeSelect:function(){return Co},AssignedFieldValues:function(){return le.eY},AssociationField:function(){return Xl},AssociationFieldMode:function(){return xc},AssociationFieldModeProvider:function(){return Dc},AssociationSelect:function(){return Dd},AttachmentList:function(){return Qa.fU},AutoComplete:function(){return _d},BackButtonUsedInSubPage:function(){return Mr.M},Block:function(){return nf},BlockItem:function(){return Hu.jY},BlockItemCard:function(){return Hu.Pu},BlockItemCardContext:function(){return Hu.sm},BlocksSelector:function(){return le.mx},ButtonEditor:function(){return le.C1},CardItem:function(){return Zs},Cascader:function(){return ym},Checkbox:function(){return Uu},CollectionSelect:function(){return Cm},ColorPicker:function(){return Sm.z},ColorSelect:function(){return Js},Cron:function(){return Od},CronSet:function(){return Lc},DataSourceCollectionCascader:function(){return Md},DataSourceSelect:function(){return hu},DateFormatCom:function(){return Ls.W},DatePicker:function(){return jl.Mt},DatePickerProvider:function(){return jl.iN},Details:function(){return _m},DetailsDesigner:function(){return he},Divider:function(){return Qs},EditComponent:function(){return ee.Fy},EditDefaultValue:function(){return ee.Ni},EditDescription:function(){return ee.q8},EditOperator:function(){return ee.HG},EditPattern:function(){return ee.QT},EditRequired:function(){return ee.JE},EditSortField:function(){return Pf},EditTable:function(){return Qv},EditTableAction:function(){return Wc},EditTableActionContext:function(){return $c},EditTitle:function(){return ee.$w},EditTitleField:function(){return ee.nB},EditTooltip:function(){return ee.Oc},EditValidationRules:function(){return ee.zd},Editable:function(){return _s},EllipsisWithTooltip:function(){return lu.BQ},ErrorFallback:function(){return Di.H},Expand:function(){return $d},ExpiresRadio:function(){return Ls.D},FieldsTreeSelect:function(){return Io},Fieldset:function(){return Wd},Filter:function(){return Zr.wn},FilterAction:function(){return Zr.Gz},FilterActionContext:function(){return Zr.tJ},FilterContext:function(){return Zr.fo},FilterDynamicComponent:function(){return Zr.VT},FilterLogicContext:function(){return Zr.Xs},Form:function(){return be},FormDialog:function(){return Vd.D},FormDrawer:function(){return vc},FormField:function(){return $o},FormItem:function(){return ee.xJ},FormV2:function(){return ur},G2Plot:function(){return zc},G2PlotRenderer:function(){return oc},Grid:function(){return Ds.rj},GridCard:function(){return Au},GridRowContext:function(){return Ds.jg},HTMLEncode:function(){return lu.gs},ICON_POPUP_Z_INDEX:function(){return Wu.z},IconPicker:function(){return sf.$},Input:function(){return lu.II},InputNumber:function(){return ff},InputReadPretty:function(){return lu.mX},InputRecordPicker:function(){return ul.zD},Json:function(){return lu.Ph},LinkageFilter:function(){return $p},List:function(){return ed},Markdown:function(){return Xd.U},MarkdownReadPretty:function(){return Xd.y},Menu:function(){return ki},NanoIDInput:function(){return mf},Page:function(){return Wa},PagePopups:function(){return mo.d9},PageTabs:function(){return Ol},Pagination:function(){return pf},ParentRouteContext:function(){return bl},Password:function(){return hf.r},Percent:function(){return fp},PopupSettingsProvider:function(){return Vt.D},Preview:function(){return mp.M},QuickEdit:function(){return td},Radio:function(){return ju},ReadPretty:function(){return lu.iV},ReadPrettyRecordPicker:function(){return ul.OD},RecordPicker:function(){return ul.lb},RecordPickerContext:function(){return ul.b7},RecordPickerProvider:function(){return ul.sU},RefreshDataBlockRequest:function(){return le.x1},RemoteSelect:function(){return sr},RemoveButton:function(){return le.xZ},RemoveConditionContext:function(){return Zr.Iu},RequestSettings:function(){return le.Mk},RichText:function(){return ev},SecondConFirm:function(){return le.y0},Select:function(){return Sr},SkipValidation:function(){return le.co},Space:function(){return rd},StablePopover:function(){return Wu.q},Table:function(){return _u},TableBlockDesigner:function(){return iv},TableField:function(){return xf},TableSelectorDesigner:function(){return uv},TableV2:function(){return ds},Tabs:function(){return $s},TabsContextProvider:function(){return As.c},Templates:function(){return Xt},TestDesigner:function(){return Hu.L3},TextAreaWithGlobalScope:function(){return Op},TimePicker:function(){return vv},TreeSelect:function(){return Mf},UnixTimestamp:function(){return Tp},Upload:function(){return Qa.gq},Uploader:function(){return Qa.Qm},Variable:function(){return ts._w},VariableScopeProvider:function(){return ts.rj},VariableSelect:function(){return Rp.m},actionSettings:function(){return le.SL},actionSettingsItems:function(){return le.sB},allowAddNew:function(){return ee.iT},attachmentFileTypes:function(){return Qa.BD},defaultFieldNames:function(){return rn},fetchTemplateData:function(){return cr},filterFormItemSettings:function(){return ee.$9},findByUid:function(){return un},findKeysByUid:function(){return br},findMenuItem:function(){return vn},formDetailsSettings:function(){return jo},formItemSettings:function(){return ee.Of},formSettings:function(){return so},formV1Settings:function(){return oe},genStyleHook:function(){return S.l6},getCurrentOptions:function(){return rt},getDateExact:function(){return jl.tl},getDatePickerLabels:function(){return ul.C$},getDateRanges:function(){return jl.SE},getLabelFormatValue:function(){return ul.cN},getPopupPathFromParams:function(){return ot.NC},getStoredPopupContext:function(){return ot.XQ},getTabSchema:function(){return xl},getZIndex:function(){return le.KK},handleDateChangeOnForm:function(){return jl.MD},inferPickerType:function(){return jl.CE},isBulkEditAction:function(){return le.vU},isFileCollection:function(){return ee.ZZ},isMobile:function(){return jl.tq},isShowFilePicker:function(){return ul.el},isTabPage:function(){return iu},isWriteEmailAction:function(){return le.VP},mapDatePicker:function(){return jl.LP},mapRangePicker:function(){return jl.fY},mapTimeFormat:function(){return dv},matchMimetype:function(){return Qa.tP},moment2str:function(){return jl.w_},navigateToTab:function(){return vu},pageSettings:function(){return tu},pageTabSettings:function(){return Jt},readPrettyFormSettings:function(){return Xr},removeNullCondition:function(){return Zr.Wm},storePopupContext:function(){return ot.hK},useActionBarContext:function(){return le.DU},useActionContext:function(){return le.XC},useAfterSuccessOptions:function(){return le.EM},useAllDataBlocks:function(){return yl.kR},useAssociationFieldContext:function(){return ko.Ky},useAssociationFieldModeContext:function(){return hs},useBackButton:function(){return Mr.K},useCloseAction:function(){return le.p2},useColumnSchema:function(){return ld.z9},useColumnSettings:function(){return is.x},useCurrentPopupContext:function(){return mo.Zm},useDatePickerContext:function(){return jl.P1},useDownloadLogs:function(){return Di.y},useEnsureOperatorsValid:function(){return ee.Zd},useFieldMode:function(){return ee.b},useFieldNames:function(){return ul.Xd},useFilterActionProps:function(){return Zr.PL},useFilterFieldOptions:function(){return Zr.V8},useFilterFieldProps:function(){return Zr.tM},useFilterOptions:function(){return Zr.xQ},useFormDataTemplates:function(){return Qn},useGetAriaLabelOfAction:function(){return le.HS},useGetAriaLabelOfDrawer:function(){return le.vB},useGetAriaLabelOfModal:function(){return le.QY},useGetAriaLabelOfPopover:function(){return le.t9},useGetFilterFieldOptions:function(){return Zr.Kg},useGetFilterOptions:function(){return Zr.aJ},useGridContext:function(){return Ds.n1},useGridRowContext:function(){return Ds.Di},useIsAddNewForm:function(){return ee.l1},useIsAssociationField:function(){return ee.w5},useIsFieldReadPretty:function(){return ee.p3},useIsFileField:function(){return ee.G5},useIsFormReadPretty:function(){return ee.xj},useIsSelectFieldMode:function(){return ee.rx},useLabelUiSchema:function(){return ul.Il},useLinkageAction:function(){return le.zC},useListBlockContext:function(){return Jd},useMenuDragEnd:function(){return Fl},useMenuTranslation:function(){return La.v},useNocoBaseRoutes:function(){return Zi},useParentRoute:function(){return $i},usePopupSettings:function(){return Vt.a},useStyles:function(){return Gt.y},useTableColumnIntegration:function(){return Vm.p},useTabsContext:function(){return As.g},useTitleFieldOptions:function(){return ee.eT},useUploadStyles:function(){return Qa.$S},useValidateSchema:function(){return ee.q4},useVariableScope:function(){return ts.ym},useZIndexContext:function(){return le.uq},withSearchParams:function(){return ot.Q3},zIndexContext:function(){return le.K5}});var S=e(46917),le=e(76157),P=e(15009),p=e.n(P),U=e(99289),J=e.n(U),C=e(12444),j=e.n(C),A=e(72004),O=e.n(A),R=e(31996),w=e.n(R),f=e(26037),B=e.n(f),T=e(97857),g=e.n(T),a=e(67294),H=e(31601),z=e(99687),X=e(70993),Q=e(89127),ce=function(fe){return J()(p()().mark(function $e(){var Qe,qe;return p()().wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return ct.prev=0,ct.next=3,this.api.request(fe);case 3:return qe=ct.sent,ct.abrupt("return",qe==null||(Qe=qe.data)===null||Qe===void 0?void 0:Qe.data);case 7:return ct.prev=7,ct.t0=ct.catch(0),ct.abrupt("return",[]);case 10:case"end":return ct.stop()}},$e,this,[[0,7]])}))},m=e(13769),y=e.n(m),$=e(5552),M=e(86201),b=e(94350),u=e(31282),V=e(74330),I=e(12174),N=e(6145),K=e(57105),E=e(97970),F=e(64016),L=e(15195),x=e(23911),v=e(85893),W=["form","children"],G=["form","children","disabled"],re=["request","effects","initialValue","useValues"],q=function(fe){var $e=fe.form,Qe=fe.children,qe=y()(fe,W),ft=(0,b.useField)(),ct=(0,b.useFieldSchema)(),zt=(0,Kt.lI)($e.createVoidField(g()(g()({},ft.props),{},{basePath:""})));return(0,v.jsx)(b.FieldContext.Provider,{value:void 0,children:(0,v.jsx)(b.FormContext.Provider,{value:$e,children:(0,v.jsx)($.FormLayout,g()(g()({layout:"vertical"},qe),{},{children:(0,v.jsx)(K.sq,{basePath:zt.address,schema:ct,onlyRenderProperties:!0})}))})})},te=function(fe){return fe.children},ye=function(fe){var $e=fe.form,Qe=fe.children,qe=fe.disabled,ft=y()(fe,G),ct=(0,b.useField)(),zt=(0,b.useFieldSchema)(),ln=(0,Kt.lI)($e.createVoidField(g()(g()({},ct.props),{},{basePath:""}))),sn=(0,Kt.Co)(zt["x-component"],te);return(0,a.useEffect)(function(){$e.disabled=qe||ct.disabled},[qe,ct.disabled]),(0,v.jsx)(u.ZP,{componentDisabled:qe,children:(0,v.jsx)(b.FieldContext.Provider,{value:void 0,children:(0,v.jsx)(b.FormContext.Provider,{value:$e,children:(0,v.jsx)($.FormLayout,g()(g()({layout:"vertical"},ft),{},{children:(0,v.jsx)(b.FieldContext.Provider,{value:ln,children:(0,v.jsx)(sn,g()(g()({},ct.componentProps),{},{children:(0,v.jsx)(K.sq,{basePath:ln.address,schema:zt,onlyRenderProperties:!0})}))})}))})})})},Pe=function(fe){var $e=fe.request,Qe=fe.initialValue;return $e||function(){return Promise.resolve({data:Qe})}},Ee=function(){var fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},$e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(0,I.QT)(Pe($e),fe)},de=(0,a.createContext)(null);de.displayName="FormBlockContext";var be=(0,b.observer)(function(ke){var fe=ke.request,$e=ke.effects,Qe=ke.initialValue,qe=ke.useValues,ft=qe===void 0?Ee:qe,ct=y()(ke,re),zt=(0,b.useFieldSchema)(),ln=(0,b.useField)(),sn=(0,a.useMemo)(function(){return(0,M.createForm)({effects:$e})},[]),pn=ft({uid:zt["x-uid"],onSuccess:function(xn){return J()(p()().mark(function Gn(){return p()().wrap(function(qn){for(;;)switch(qn.prev=qn.next){case 0:return qn.next=2,sn.reset();case 2:sn.setValues(xn==null?void 0:xn.data),sn.setInitialValues(xn==null?void 0:xn.data);case 4:case"end":return qn.stop()}},Gn)}))()}},ke),In=(0,a.useContext)(de);return(0,v.jsx)(de.Provider,{value:{parent:In,form:sn,result:pn,field:ln,fieldSchema:zt},children:(0,v.jsx)(V.Z,{spinning:(pn==null?void 0:pn.loading)||!1,children:zt["x-decorator"]==="Form"?(0,v.jsx)(ye,g()({form:sn},ct)):(0,v.jsx)(q,g()({form:sn},ct))})})},{displayName:"Form"});be.Designer=function(){var fe=(0,N.useCollection_deprecated)(),$e=fe.name,Qe=fe.title,qe=(0,L.zy)(),ft=(0,x.rE)(),ct=ft.componentNamePrefix;return(0,v.jsxs)(E.aN,{template:qe,title:Qe||$e,children:[(0,v.jsx)(F.G,{componentName:"".concat(ct,"Form"),collectionName:$e}),(0,v.jsx)(E.Z5,{}),(0,v.jsx)(E.qx,{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}})]})};var me=e(5537),oe=new me.F5({name:"FormV1Settings",items:[{name:"template",Component:F.G,useComponentProps:function(){var fe=(0,N.useCollection_deprecated)(),$e=fe.name,Qe=(0,x.rE)(),qe=Qe.componentNamePrefix;return{componentName:"".concat(qe,"Form"),collectionName:$e}}},{name:"divider",type:"divider"},{name:"remove",type:"remove",componentProps:{removeParentsIfNoChildren:!0,breakRemoveOn:{"x-component":"Grid"}}}]}),ee=e(54801),xe=function(){var fe=(0,N.useCollection_deprecated)(),$e=fe.name,Qe=fe.title,qe=(0,L.zy)();return(0,v.jsx)(E.aN,{schemaSettings:"FormSettings",template:qe,title:Qe||$e})},ve=function(){var fe=(0,N.useCollection_deprecated)(),$e=fe.name,Qe=fe.title,qe=(0,L.zy)();return(0,v.jsx)(E.aN,{schemaSettings:"ReadPrettyFormSettings",template:qe,title:Qe||$e})},he=function(){var fe=(0,N.useCollection_deprecated)(),$e=fe.name,Qe=fe.title,qe=(0,L.zy)();return(0,v.jsx)(E.aN,{schemaSettings:"FormDetailsSettings",template:qe,title:Qe||$e})},pe=function(){var fe=(0,N.useCollection_deprecated)(),$e=fe.name,Qe=fe.title,qe=(0,L.zy)();return(0,v.jsx)(E.aN,{schemaSettings:"blockSettings:filterForm",template:qe,title:Qe||$e})},De=e(7340),se=e(15503),Ce=e(83335),Se=e(68230),Te=e(68400),Ie=e.n(Te),Fe=e(97133),_e=e(84327),we=e(9361),We=e(96486),tt=e.n(We),ze=e(2483),je=e(415),Ve=e(31019),Ae=e(94804),Re=e(39742),Be=e(7686),ae=e(22229),Me=e(43321),He=e(3078),Le=e(9780),Xe=e(3192),ht=e(18686),St=e(5574),Ye=e.n(St),pt=e(10110),bt=e(42075),en=e(34041),Rn=e(26793),Bn=e(53285),hn=e(32268),Lt=e(9783),Je=e.n(Lt),xt=e(52677),lt=e.n(xt),_t=e(3407),Et=e(66309),Yt=e(96074),Pn=e(27484),Tn=e.n(Pn),gn=e(44990),fn=e(8341),on=e(87714),Kt=e(84577),vr=e(16646),Gr=e(73475),er=e(32983),nr=e(83062),kr=e(85518),Yr=e(67668),Nr=e(58812),Dr=e(96695),Wn=e.n(Dr),an=e(19632),_n=e.n(an),rn={label:"label",value:"value",color:"color",options:"children"};function yn(ke,fe){var $e=[];if(!Array.isArray(ke))return $e;for(var Qe=0;Qe<ke.length;Qe++){var qe=ke[Qe][fe.options];Array.isArray(qe)&&$e.push.apply($e,_n()(yn(qe,fe))),$e.push(g()({},ke[Qe]))}return $e}function At(ke,fe,$e){if(!ke)return[];var Qe=[],qe=Wn()($e),ft;try{var ct=function(){var ln=ft.value,sn=ke.find(function(pn){return pn[fe.value]==ln})||{value:ln,label:ln&&ln.toString()};Qe.push(sn)};for(qe.s();!(ft=qe.n()).done;)ct()}catch(zt){qe.e(zt)}finally{qe.f()}return Qe}function rt(ke,fe,$e){var Qe=yn(fe,$e),qe=(0,We.castArray)(ke).map(function(ft){return(0,pt.isPlainObject)(ft)?ft[$e.value]:ft});return At(Qe,$e,qe)}var Ot=e(25145),It=e(61933),Mt=(0,b.observer)(function(ke){var fe=(0,a.useState)(!0),$e=Ye()(fe,2),Qe=$e[0],qe=$e[1],ft=(0,a.useState)([]),ct=Ye()(ft,2),zt=ct[0],ln=ct[1],sn=(0,b.useField)(),pn=(0,Yr.Hy)();return(0,a.useEffect)(function(){var In,Xn=g()(g()({},rn),ke.fieldNames),xn=sn.dataSource||ke.options||(pn==null?void 0:pn.uiSchema.enum)||[],Gn=rt(sn.value,xn,Xn);if(!(!(0,_e.isValid)(ke.value)&&!Gn.length)&&!((0,M.isArrayField)(sn)&&(sn==null||(In=sn.value)===null||In===void 0?void 0:In.length)===0)){var Zn=sn.value!==null&&Gn.map(function(qn,mr){return(0,v.jsx)(Et.Z,{color:qn[Xn.color],icon:typeof qn.icon=="string"?(0,v.jsx)(It.JO,{type:qn.icon}):qn.icon,children:qn[Xn.label]},mr)});ln(Zn),qe(!1)}},[pn==null?void 0:pn.uiSchema.enum,sn,sn.dataSource,sn.value,ke.fieldNames,ke.options,ke.value]),Qe?null:(0,v.jsx)(Nr.B,{ellipsis:ke.ellipsis,children:zt})},{displayName:"SelectReadPretty"}),Ut=(0,Ot.u)(Mt),Qt,Nn=["value","options","onChange","fieldNames","mode","loading","rawOptions","defaultValue"],Mn=["objectValue","loading","value","rawOptions","defaultValue"],wn=function(fe){return!(0,_e.isValid)(fe)||lt()(fe)==="object"&&Object.keys(fe).length===0},Kn=function(fe){var $e=fe.value,Qe=fe.options,qe=fe.onChange,ft=fe.fieldNames,ct=fe.mode,zt=fe.loading,ln=fe.rawOptions,sn=fe.defaultValue,pn=y()(fe,Nn),In=kr.nI?"":Ir,Xn=kr.nI?void 0:"topLeft",xn=function(Zn){var qn;if(!wn(Zn)){var mr=(0,_e.toArr)(Zn).filter(function(ro){return ro}).map(function(ro){return(0,pt.isPlainObject)(ro)?ro[ft.value]:ro}),xr=(qn=rt(mr,Qe,ft))===null||qn===void 0?void 0:qn.map(function(ro){return{label:ro[ft.label],value:ro[ft.value]}});return["tags","multiple"].includes(ct)||fe.multiple?xr:xr.shift()}};return(0,v.jsx)(en.default,g()({rootClassName:In,placement:Xn,role:"button","data-testid":"select-object-".concat(ct||"single"),value:xn($e),defaultValue:xn(sn),allowClear:{clearIcon:(0,v.jsx)(vr.Z,{role:"button","aria-label":"icon-close-select"})},labelInValue:!0,notFoundContent:zt?(0,v.jsx)(V.Z,{}):(0,v.jsx)(er.Z,{image:er.Z.PRESENTED_IMAGE_SIMPLE}),options:Qe,fieldNames:ft,showSearch:!0,popupMatchSelectWidth:!1,filterOption:function(Zn,qn){var mr;return((mr=qn==null?void 0:qn[ft.label||"label"])!==null&&mr!==void 0?mr:"").includes(Zn)},filterSort:function(Zn,qn){var mr,xr;return((mr=Zn==null?void 0:Zn[ft.label||"label"])!==null&&mr!==void 0?mr:"").toLowerCase().localeCompare(((xr=qn==null?void 0:qn[ft.label||"label"])!==null&&xr!==void 0?xr:"").toLowerCase())},onChange:function(Zn){var qn=rt((0,_e.toArr)(Zn).map(function(mr){return mr.value}),ln||Qe,ft);["tags","multiple"].includes(ct)||fe.multiple?qe==null||qe(qn):qe==null||qe(qn.shift()||null)},mode:ct,tagRender:function(Zn){return(0,v.jsx)(Et.Z,g()(g()({role:"button","aria-label":Zn.label,closeIcon:(0,v.jsx)(Gr.Z,{role:"button","aria-label":"icon-close-tag"})},Zn),{},{children:Zn.label}))},maxTagCount:"responsive",maxTagPlaceholder:function(Zn){return(0,v.jsxs)(nr.Z,{title:(0,v.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:6,maxWidth:"100%"},children:Zn.map(function(qn){return(0,v.jsx)(Et.Z,{style:{margin:0,background:"#fafafa",border:"1px solid #d9d9d9",whiteSpace:"normal",wordBreak:"break-word",maxWidth:"100%"},children:qn.label},qn.value)})}),overlayInnerStyle:{background:"#fff",color:"#000",padding:8,maxWidth:"100%"},color:"#fff",overlayStyle:{pointerEvents:"auto",maxWidth:300},children:["+",Zn.length,"..."]})}},pn))},gr=function(fe,$e){var Qe;return((Qe=$e==null?void 0:$e.label)!==null&&Qe!==void 0?Qe:"").toLowerCase().includes((fe||"").toLowerCase())},Ir=(0,Fe.css)(Qt||(Qt=Ie()([`
1425
1425
  & .ant-select-selection-search-input {
1426
1426
  opacity: 0.1 !important;
1427
1427
  }
@@ -2694,4 +2694,4 @@ Please run: await ctx.importAsync("`.concat(ir,'") to ensure ctx.render uses a m
2694
2694
  await ctx.__ensureLibs(`.concat(JSON.stringify(dt),`);
2695
2695
  `).concat(gt):gt}function Qt(gt,dt,Ht){var mn=Wn(gt,Ht);if(gt[mn]!==":")return!1;var bn=an(gt,dt-1),Cn=bn>=0?gt[bn]:"";return Cn==="{"||Cn===","}function Nn(gt,dt,Ht,mn){var bn=Array.from(new Set(dt));if(!bn.length)return gt;for(var Cn=gt,Sn=0,sr=bn;Sn<sr.length;Sn++){var cn=sr[Sn],Qn=Ht(cn);Cn="(".concat(Cn,").split(").concat(JSON.stringify(cn),").join(").concat(mn,"(").concat(Qn,", ").concat(JSON.stringify(cn),"))")}return Cn}function Mn(gt){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!xt.test(gt))return gt;var Ht=dt.processBarePlaceholders!==!1,mn=dt.processStringLiterals!==!1;if(Ht&&mn&&Pn.test(gt)||Ht&&!mn&&Et.test(gt)||!Ht&&mn&&Yt.test(gt))return gt;for(var bn=new Map,Cn=[],Sn=!1,sr=new Set,cn=function(lr){if(!gt.includes(lr)&&!sr.has(lr))return sr.add(lr),lr;for(var dr=1;gt.includes("".concat(lr,"_").concat(dr))||sr.has("".concat(lr,"_").concat(dr));)dr+=1;var ir="".concat(lr,"_").concat(dr);return sr.add(ir),ir},Qn=cn(_t),Xt=0,An=function(){for(;;){var lr="__runjs_ctx_tpl_".concat(Xt);if(Xt+=1,!(gt.includes(lr)||sr.has(lr)))return sr.add(lr),lr}},cr=function(lr){var dr=bn.get(lr);if(dr)return dr;var ir=An();return bn.set(lr,ir),Cn.push("const ".concat(ir," = await ctx.resolveJsonTemplate(").concat(JSON.stringify(lr),");")),ir},Un="",mt=0,Tt=!1,kt=0;mt<gt.length;){var Nt=gt[mt],Dt=gt[mt+1];if(Nt==="/"&&Dt==="/"){var Ue=nr(gt,mt);Un+=gt.slice(mt,Ue),mt=Ue;continue}if(Nt==="/"&&Dt==="*"){var Ke=kr(gt,mt);Un+=gt.slice(mt,Ke),mt=Ke;continue}if(Nt==="'"||Nt==='"'){var at=Yr(gt,mt,Nt),st=gt.slice(mt,at);if(mn&&kt===0){var et=Dr(st);if(et.length){Sn=!0;var it=Nn(st,et,cr,Qn);Un+=Qt(gt,mt,at)?"[".concat(it,"]"):it}else Un+=st}else Un+=st;mt=at;continue}if(Nt==="`"){var Ft=Nr(gt,mt),Wt=gt.slice(mt,Ft);if(mn&&kt===0){var Hn=Dr(Wt);if(Hn.length){Sn=!0;var Er=Nn(Wt,Hn,cr,Qn);Un+=Qt(gt,mt,Ft)?"[".concat(Er,"]"):Er}else Un+=Wt}else Un+=Wt;mt=Ft;continue}if(kt===0&&!Tt&&er(gt,mt)){Un+=Je,mt+=Je.length,Tt=!0;continue}if(Tt){if(/\s/.test(Nt)){Un+=Nt,mt+=1;continue}if(Nt==="("){Un+=Nt,mt+=1,Tt=!1,kt=1;continue}Tt=!1;continue}if(kt>0){Nt==="("?kt+=1:Nt===")"&&(kt-=1),Un+=Nt,mt+=1;continue}if(Ht&&Nt==="{"&&Dt==="{"){var ur=gt.indexOf("}}",mt+2);if(ur!==-1){var jr=gt.slice(mt,ur+2);if(Gr(jr)){Un+=cr(jr),mt=ur+2;continue}}}Un+=Nt,mt+=1}if(!Cn.length)return Un;var fr=[];return Sn&&fr.push("const ".concat(Qn," = (value, placeholder) => {")," if (typeof value === 'undefined') return placeholder;"," if (typeof value === 'object' && value !== null) {"," try {"," return JSON.stringify(value);"," } catch (e) {"," return String(value);"," }"," }"," return String(value);","};"),fr.push.apply(fr,Cn),"".concat(fr.join(`
2696
2696
  `),`
2697
- `).concat(Un)}function wn(gt){return Kn.apply(this,arguments)}function Kn(){return Kn=Q()(T()().mark(function gt(dt){var Ht,mn,bn,Cn,Sn,sr,cn=arguments;return T()().wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:if(Ht=cn.length>1&&cn[1]!==void 0?cn[1]:{},mn=typeof dt=="string"?dt:String(dt??""),bn=!!Ht.preprocessTemplates,Cn=bn?fn.withTemplates:fn.withoutTemplates,Sn=on(Cn,mn),!Sn){Xt.next=9;break}return Xt.next=8,Sn;case 8:return Xt.abrupt("return",Xt.sent);case 9:return sr=Q()(T()().mark(function An(){var cr,Un,mt;return T()().wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:if(bn){kt.next=6;break}return kt.t0=Ut,kt.next=4,(0,Lt.n)(mn);case 4:return kt.t1=kt.sent,kt.abrupt("return",(0,kt.t0)(kt.t1));case 6:return cr=Mn(mn,{processStringLiterals:!1}),kt.next=9,(0,Lt.n)(cr);case 9:return Un=kt.sent,mt=Mn(Un,{processBarePlaceholders:!1}),kt.abrupt("return",Ut(mt));case 12:case"end":return kt.stop()}},An)}))(),Kt(Cn,mn,sr,gn),Xt.prev=11,Xt.next=14,sr;case 14:return Xt.abrupt("return",Xt.sent);case 17:throw Xt.prev=17,Xt.t0=Xt.catch(11),Cn.delete(mn),Xt.t0;case 21:case"end":return Xt.stop()}},gt,null,[[11,17]])})),Kn.apply(this,arguments)}var gr=e(65452);function Ir(gt){if(Array.isArray(gt)){var dt=gt.map(function(mn){return Ir(mn)}).filter(function(mn){return mn!==void 0});return dt.length?dt:void 0}if(gt&&z()(gt)==="object"){var Ht={};return Object.keys(gt).forEach(function(mn){var bn=Ir(gt[mn]);bn!==void 0&&(Ht[mn]=bn)}),Object.keys(Ht).length?Ht:void 0}return gt==null||typeof gt=="string"&&gt===""?void 0:gt}var _r=function(dt){return typeof dt.on=="string"?dt.on==="beforeRender":z()(dt.on)==="object"?dt.on.eventName==="beforeRender":!dt.on&&dt.manual!==!0},Sr=e(42554)},47608:function(Zt,Oe,e){"use strict";e.d(Oe,{n:function(){return U}});var ue=e(15009),S=e.n(ue),le=e(99289),P=e.n(le),p=e(57930);function U(C){return J.apply(this,arguments)}function J(){return J=P()(S()().mark(function C(j){var A,O,R,w,f,B;return S()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(A=/<[A-Za-z]|<\//.test(j),A){g.next=3;break}return g.abrupt("return",j);case 3:return g.prev=3,g.next=6,p("imported_1q7hsm5_component",Promise.all([e.e(4326),e.e(8977),e.e(5505)]).then(e.bind(e,75572)));case 6:if(w=g.sent,f=(w==null?void 0:w.transform)||(w==null||(O=w.default)===null||O===void 0?void 0:O.transform),typeof f=="function"){g.next=10;break}return g.abrupt("return",j);case 10:return B=f(j,{transforms:["jsx"],jsxPragma:"ctx.React.createElement",jsxFragmentPragma:"ctx.React.Fragment",disableESTransforms:!0,production:!0}),g.abrupt("return",(R=B&&(B.code||(B==null?void 0:B.output)))!==null&&R!==void 0?R:j);case 14:return g.prev=14,g.t0=g.catch(3),g.abrupt("return",j);case 17:case"end":return g.stop()}},C,null,[[3,14]])})),J.apply(this,arguments)}},26233:function(Zt,Oe,e){"use strict";e.d(Oe,{HA:function(){return y},cO:function(){return a},nw:function(){return T},rz:function(){return m}});var ue=e(19632),S=e.n(ue),le=e(52677),P=e.n(le),p=e(15009),U=e.n(p),J=e(96695),C=e.n(J),j=e(5574),A=e.n(j),O=e(99289),R=e.n(O),w=e(80770),f=e(96486),B=e.n(f);function T(K,E){return g.apply(this,arguments)}function g(){return g=R()(U()().mark(function K(E,F){var L;return U()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(E){v.next=2;break}return v.abrupt("return",{});case 2:if(typeof E!="function"){v.next=14;break}return v.prev=3,v.next=6,E(F);case 6:return L=v.sent,v.abrupt("return",L||{});case 10:return v.prev=10,v.t0=v.catch(3),console.error("Error resolving defaultParams function:",v.t0),v.abrupt("return",{});case 14:return v.abrupt("return",E);case 15:case"end":return v.stop()}},K,null,[[3,10]])})),g.apply(this,arguments)}function a(K,E,F){return H.apply(this,arguments)}function H(){return H=R()(U()().mark(function K(E,F,L){var x;return U()().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(E){W.next=2;break}return W.abrupt("return",{});case 2:if(typeof E!="function"){W.next=14;break}return W.prev=3,W.next=6,E(F,L);case 6:return x=W.sent,W.abrupt("return",x||{});case 10:return W.prev=10,W.t0=W.catch(3),console.error("Error resolving createModelOptions function:",W.t0),W.abrupt("return",{});case 14:return W.abrupt("return",E);case 15:case"end":return W.stop()}},K,null,[[3,10]])})),H.apply(this,arguments)}var z={queue:[],timer:null,inflightByRun:new Map},X=10;function Q(K){if(Array.isArray(K))return K.map(Q);if(B().isPlainObject(K)){var E=Object.entries(K).map(function(L){var x=A()(L,2),v=x[0],W=x[1];return[v,Q(W)]}),F=B().sortBy(E,function(L){var x=A()(L,1),v=x[0];return v});return Object.fromEntries(F)}return K}function ce(K){try{return JSON.stringify(Q(K))}catch{try{return JSON.stringify(K)}catch{return String(K)}}}function m(K,E){var F=z,L=K.runId||"GLOBAL",x=ce(E),v=F.inflightByRun.get(L);v||(v=new Map,F.inflightByRun.set(L,v));var W=v.get(x);if(W)return W;var G,re,q=new Promise(function(Ee,de){G=Ee,re=de});v.set(x,q);var te="".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2)),ye={id:te,ctx:K,payload:E,resolve:G,reject:re,runId:L,dedupKey:x};F.queue.push(ye);var Pe=function(){var Ee=R()(U()().mark(function de(){var be,me,oe,ee,xe,ve,he,pe,De,se,Ce,Se,Te,Ie,Fe,_e,we,We,tt,ze,je,Ve,Ae,Re,Be,ae,Me,He,Le,Xe,ht,St,Ye;return U()().wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:if(me=F.queue.splice(0,F.queue.length),F.timer=null,me.length){bt.next=4;break}return bt.abrupt("return");case 4:if(oe=(be=me[0].ctx)===null||be===void 0?void 0:be.api,oe){bt.next=9;break}ee=C()(me);try{for(ee.s();!(xe=ee.n()).done;){ve=xe.value;try{ve.resolve(ve.payload.template)}catch(en){ve.reject(en)}finally{(he=F.inflightByRun.get(ve.runId))===null||he===void 0||he.delete(ve.dedupKey)}}}catch(en){ee.e(en)}finally{ee.f()}return bt.abrupt("return");case 9:return bt.prev=9,se=me.map(function(en){return{id:en.id,template:en.payload.template,contextParams:en.payload.contextParams||{}}}),bt.next=13,oe.request({method:"POST",url:"variables:resolve",data:{values:{batch:se}}});case 13:Ce=bt.sent,Se=(pe=Ce.data)!==null&&pe!==void 0?pe:Ce,Te=(De=Se.data)!==null&&De!==void 0?De:Se,Ie=Te==null?void 0:Te.results,Fe=Array.isArray(Ie)?Ie:Array.isArray(Te)?Te:[],_e=new Map,we=C()(Fe);try{for(we.s();!(We=we.n()).done;)tt=We.value,ze=(tt==null?void 0:tt.id)!=null?String(tt.id):"",ze&&_e.set(ze,tt==null?void 0:tt.data)}catch(en){we.e(en)}finally{we.f()}je=C()(me);try{for(je.s();!(Ve=je.n()).done;){Ae=Ve.value;try{Re=String(Ae.id),Be=_e.has(Re)?_e.get(Re):Ae.payload.template,Ae.resolve(Be)}catch(en){Ae.reject(en)}finally{(ae=F.inflightByRun.get(Ae.runId))===null||ae===void 0||ae.delete(Ae.dedupKey)}}}catch(en){je.e(en)}finally{je.f()}bt.next=29;break;case 25:bt.prev=25,bt.t0=bt.catch(9),Me=C()(me);try{for(Me.s();!(He=Me.n()).done;){Le=He.value;try{K==null||(Xe=K.logger)===null||Xe===void 0||(ht=(St=Xe).warn)===null||ht===void 0||ht.call(St,{err:bt.t0},"variables:resolve(batch) failed, fallback"),Le.resolve(Le.payload.template)}catch(en){Le.reject(en)}finally{(Ye=F.inflightByRun.get(Le.runId))===null||Ye===void 0||Ye.delete(Le.dedupKey)}}}catch(en){Me.e(en)}finally{Me.f()}case 29:case"end":return bt.stop()}},de,null,[[9,25]])}));return function(){return Ee.apply(this,arguments)}}();return F.timer||(F.timer=setTimeout(Pe,X)),q}function y(K,E){return $.apply(this,arguments)}function $(){return $=R()(U()().mark(function K(E,F){var L;return U()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return L=function(){var W=R()(U()().mark(function G(re){var q,te,ye,Pe,Ee,de;return U()().wrap(function(me){for(;;)switch(me.prev=me.next){case 0:if(!(typeof re=="string"&&/\{\{.*?\}\}/.test(re))){me.next=4;break}return me.next=3,I(re,F);case 3:return me.abrupt("return",me.sent);case 4:if(!Array.isArray(re)){me.next=6;break}return me.abrupt("return",Promise.all(re.map(L)));case 6:if(!(re&&P()(re)==="object")){me.next=18;break}q={},te=0,ye=Object.entries(re);case 9:if(!(te<ye.length)){me.next=17;break}return Pe=A()(ye[te],2),Ee=Pe[0],de=Pe[1],me.next=13,L(de);case 13:q[Ee]=me.sent;case 14:te++,me.next=9;break;case 17:return me.abrupt("return",q);case 18:return me.abrupt("return",re);case 19:case"end":return me.stop()}},G)}));return function(re){return W.apply(this,arguments)}}(),v.abrupt("return",L(E));case 2:case"end":return v.stop()}},K)})),$.apply(this,arguments)}function M(K,E){return b.apply(this,arguments)}function b(){return b=R()(U()().mark(function K(E,F){var L,x;return U()().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:return W.next=2,u(E.trim(),F);case 2:return L=W.sent,W.next=5,F.runjs("return ".concat(L),{t:F.t});case 5:return x=W.sent,W.abrupt("return",x!=null&&x.success?x.value:void 0);case 7:case"end":return W.stop()}},K)})),b.apply(this,arguments)}function u(K,E){return V.apply(this,arguments)}function V(){return V=R()(U()().mark(function K(E,F){var L,x,v,W,G,re,q,te,ye,Pe,Ee,de,be,me,oe,ee,xe,ve,he,pe,De,se,Ce,Se,Te,Ie;return U()().wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:for(L=/ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*(?:(?:\.[a-zA-Z_$][a-zA-Z0-9_$]*)|(?:\[[^\]]+\]))*)(?!\s*\()/g,x=[],v=new Set;(W=L.exec(E))!==null;)G=W[0],re=W[1],q=re.match(/^([a-zA-Z_$][a-zA-Z0-9_$]*)/),q&&(te=q[1],ye=re.substring(te.length),x.push({fullPath:G,firstKey:te,restPath:ye}),v.add(te));if(x.length!==0){_e.next=6;break}return _e.abrupt("return",E);case 6:Pe=new Map,Ee=C()(v),_e.prev=8,Ee.s();case 10:if((de=Ee.n()).done){_e.next=25;break}return be=de.value,_e.prev=12,_e.next=15,F[be];case 15:me=_e.sent,oe=me&&me.__isRecordProxy__===!0,Pe.set(be,oe),_e.next=23;break;case 20:_e.prev=20,_e.t0=_e.catch(12),Pe.set(be,!1);case 23:_e.next=10;break;case 25:_e.next=30;break;case 27:_e.prev=27,_e.t1=_e.catch(8),Ee.e(_e.t1);case 30:return _e.prev=30,Ee.f(),_e.finish(30);case 33:for(x.sort(function(we,We){return We.fullPath.length-we.fullPath.length}),ee=E,xe=0,ve=x;xe<ve.length;xe++)he=ve[xe],pe=he.fullPath,De=he.firstKey,se=he.restPath,Ce=Pe.get(De)||!1,Se=void 0,se===""?Se="await ctx.".concat(De):Se=Ce?"await (await ctx.".concat(De,")").concat(se):"(await ctx.".concat(De,")").concat(se),Te=pe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ie=new RegExp("\\b".concat(Te,"\\b"),"g"),ee=ee.replace(Ie,Se);return _e.abrupt("return",ee);case 37:case"end":return _e.stop()}},K,null,[[8,27,30,33],[12,20]])})),V.apply(this,arguments)}function I(K,E){return N.apply(this,arguments)}function N(){return N=R()(U()().mark(function K(E,F){var L,x,v,W,G,re,q,te,ye,Pe,Ee,de,be,me;return U()().wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(L=function(ve){var he=ve.trim().match(/^ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*)(?:\.([a-zA-Z_$][a-zA-Z0-9_$-]*(?:\.[a-zA-Z_$][a-zA-Z0-9_$-]*)*))?$/);return he?he[2]?"".concat(he[1],".").concat(he[2]):he[1]:null},x=function(){var xe=R()(U()().mark(function ve(he){var pe,De,se;return U()().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(pe=he.split("."),De=pe.shift(),De){Se.next=4;break}return Se.abrupt("return",void 0);case 4:return Se.next=6,F[De];case 6:if(se=Se.sent,pe.length!==0){Se.next=9;break}return Se.abrupt("return",se);case 9:return Se.abrupt("return",(0,w.Bb)(se,pe.join(".")));case 10:case"end":return Se.stop()}},ve)}));return function(he){return xe.apply(this,arguments)}}(),v=function(){var xe=R()(U()().mark(function ve(he){var pe,De;return U()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(pe=L(he),!pe){Ce.next=10;break}return Ce.next=4,x(pe);case 4:if(De=Ce.sent,!(De===void 0&&pe.includes("-"))){Ce.next=9;break}return Ce.next=8,M(he,F);case 8:return Ce.abrupt("return",Ce.sent);case 9:return Ce.abrupt("return",De);case 10:return Ce.next=12,M(he,F);case 12:return Ce.abrupt("return",Ce.sent);case 13:case"end":return Ce.stop()}},ve)}));return function(he){return xe.apply(this,arguments)}}(),W=E.match(/^\s*\{\{\s*([^{}]+?)\s*\}\}\s*$/),!W){ee.next=9;break}return G=W[1],ee.next=8,v(G);case 8:return ee.abrupt("return",ee.sent);case 9:re=S()(E.matchAll(/\{\{\s*(.+?)\s*\}\}/g)),q=E,te=C()(re),ee.prev=12,te.s();case 14:if((ye=te.n()).done){ee.next=22;break}return Pe=A()(ye.value,2),Ee=Pe[0],de=Pe[1],ee.next=18,v(de);case 18:be=ee.sent,be!==void 0&&(me=P()(be)==="object"&&be!==null?JSON.stringify(be):String(be),q=q.replace(Ee,me));case 20:ee.next=14;break;case 22:ee.next=27;break;case 24:ee.prev=24,ee.t0=ee.catch(12),te.e(ee.t0);case 27:return ee.prev=27,te.f(),ee.finish(27);case 30:return ee.abrupt("return",q);case 31:case"end":return ee.stop()}},K,null,[[12,24,27,30]])})),N.apply(this,arguments)}},42554:function(Zt,Oe,e){"use strict";e.d(Oe,{O:function(){return ue},P:function(){return S}});function ue(le,P){if(!le||typeof le!="string")throw new Error("invalid url");var p=le.trim();if(p.startsWith("http://")||p.startsWith("https://"))return p;var U=window.__esm_cdn_base_url__||"https://esm.sh",J=P!=null&&P.addSuffix&&window.__esm_cdn_suffix__||"",C=U.replace(/\/$/,""),j=p.replace(/^\//,"");if(P!=null&&P.raw){var A=j.includes("?")?"&":"?";return"".concat(C,"/").concat(j).concat(A,"raw")}return"".concat(C,"/").concat(j).concat(J)}function S(le){if(!le||typeof le!="string")return!1;var P=le.split("?")[0].split("#")[0];return P.endsWith(".css")}},24342:function(Zt,Oe,e){"use strict";e.d(Oe,{IA:function(){return X},T:function(){return H},YB:function(){return ce},cI:function(){return f},q3:function(){return B},sF:function(){return Q},uh:function(){return z}});var ue=e(15009),S=e.n(ue),le=e(52677),P=e.n(le),p=e(99289),U=e.n(p),J=e(19632),C=e.n(J),j=e(97857),A=e.n(j),O=e(96695),R=e.n(O);function w(){var y,$,M=globalThis;if((y=M.__nocobaseRunJSSafeGlobalsRegistry)!==null&&y!==void 0&&y.windowAllow&&($=M.__nocobaseRunJSSafeGlobalsRegistry)!==null&&$!==void 0&&$.documentAllow)return M.__nocobaseRunJSSafeGlobalsRegistry;var b={windowAllow:new Set,documentAllow:new Set};return M.__nocobaseRunJSSafeGlobalsRegistry=b,b}function f(y){if(y){var $=w(),M=R()(y),b;try{for(M.s();!(b=M.n()).done;){var u=b.value;if(typeof u=="string"){var V=u.trim();V&&$.windowAllow.add(V)}}}catch(I){M.e(I)}finally{M.f()}}}function B(y){if(y){var $=w(),M=R()(y),b;try{for(M.s();!(b=M.n()).done;){var u=b.value;if(typeof u=="string"){var V=u.trim();V&&$.documentAllow.add(V)}}}catch(I){M.e(I)}finally{M.f()}}}function T(){var y=globalThis;if(y.__nocobaseRunJSSafeGlobalsRegistry)try{var $,M,b,u;($=y.__nocobaseRunJSSafeGlobalsRegistry.windowAllow)===null||$===void 0||(M=$.clear)===null||M===void 0||M.call($),(b=y.__nocobaseRunJSSafeGlobalsRegistry.documentAllow)===null||b===void 0||(u=b.clear)===null||u===void 0||u.call(b)}catch{}}function g(y){return w().windowAllow.has(y)}function a(y){return w().documentAllow.has(y)}function H(y){var $=function(){return"".concat(window.location.origin).concat(window.location.pathname)},M=function(K,E,F){var L=function(q){try{var te=new URL(q,$()),ye=te.protocol.toLowerCase();return ye==="about:"?te.href==="about:blank":ye==="http:"||ye==="https:"}catch{return!1}};if(!L(K))throw new Error("Unsafe URL: window.open only allows http/https/about:blank.");var x="_blank",v=function(q){var te=new Set;return q&&q.split(",").map(function(ye){return ye.trim()}).filter(Boolean).forEach(function(ye){var Pe=ye.split("=")[0].trim().toLowerCase();Pe!=="noopener"&&Pe!=="noreferrer"&&te.add(ye)}),te.add("noopener"),te.add("noreferrer"),Array.from(te).join(",")},W=v(F),G=window.open.call(window,K,x,W);if(G&&"opener"in G)try{G.opener=null}catch{}return G},b=function(K,E){var F=new URL(K,$()),L=F.protocol.toLowerCase(),x=L==="about:"&&F.href==="about:blank",v=L==="http:"||L==="https:";if(!v&&!x)throw new Error("Unsafe URL: only http/https/about:blank are allowed.");if(x)return E!=null&&E.replace?window.location.replace("about:blank"):window.location.assign("about:blank");var W=F.protocol===window.location.protocol&&F.hostname===window.location.hostname&&F.port===window.location.port;if(W)return E!=null&&E.replace?window.location.replace(F.href):window.location.assign(F.href);var G=M(F.href);if(!G)throw new Error("Popup blocked: cross-origin navigation is opened in a new tab.")},u=new Proxy({},{get:function(K,E){switch(E){case"origin":return window.location.origin;case"protocol":return window.location.protocol;case"host":return window.location.host;case"hostname":return window.location.hostname;case"port":return window.location.port;case"pathname":return window.location.pathname;case"assign":return function(F){return b(F,{replace:!1})};case"replace":return function(F){return b(F,{replace:!0})};case"reload":return window.location.reload.bind(window.location);case"href":throw new Error("Reading location.href is not allowed.");default:throw new Error('Access to location property "'.concat(E,'" is not allowed.'))}},set:function(K,E,F){if(E==="href")return b(String(F),{replace:!1}),!0;throw new Error("Mutation on location is not allowed.")}}),V=A()(A()(A()({setTimeout:window.setTimeout.bind(window),clearTimeout:window.clearTimeout.bind(window),setInterval:window.setInterval.bind(window),clearInterval:window.clearInterval.bind(window),console,Math,Date,FormData},typeof Blob<"u"?{Blob}:{}),typeof URL<"u"?{URL}:{}),{},{addEventListener:addEventListener.bind(window),open:M,location:u},y||{}),I=Object.create(null);return new Proxy(I,{get:function(K,E){if(typeof E!="string")return Reflect.get(K,E);if(E in V)return V[E];if(Object.prototype.hasOwnProperty.call(K,E))return K[E];if(g(E)){var F=window[E];return typeof F=="function"?F.bind(window):F}throw new Error('Access to global property "'.concat(E,'" is not allowed.'))},set:function(K,E,F){if(typeof E!="string")return Reflect.set(K,E,F),!0;if(E in V)throw new Error('Mutation of global property "'.concat(E,'" is not allowed.'));return K[E]=F,!0},has:function(K,E){return typeof E!="string"?Reflect.has(K,E):!!(E in V||Object.prototype.hasOwnProperty.call(K,E)||g(E))}})}function z(y){var $=A()({createElement:document.createElement.bind(document),querySelector:document.querySelector.bind(document),querySelectorAll:document.querySelectorAll.bind(document)},y||{}),M=Object.create(null);return new Proxy(M,{get:function(u,V){if(typeof V!="string")return Reflect.get(u,V);if(V in $)return $[V];if(Object.prototype.hasOwnProperty.call(u,V))return u[V];if(a(V)){var I=document[V];return typeof I=="function"?I.bind(document):I}throw new Error('Access to document property "'.concat(V,'" is not allowed.'))},set:function(u,V,I){if(typeof V!="string")return Reflect.set(u,V,I),!0;if(V in $)throw new Error('Mutation of document property "'.concat(V,'" is not allowed.'));return u[V]=I,!0},has:function(u,V){return typeof V!="string"?Reflect.has(u,V):!!(V in $||Object.prototype.hasOwnProperty.call(u,V)||a(V))}})}function X(y){var $,M=typeof window<"u"&&window.navigator||void 0,b={},u=M==null||($=M.clipboard)===null||$===void 0?void 0:$.writeText;typeof u=="function"&&(b.writeText=u.bind(M.clipboard));var V={clipboard:b};return Object.defineProperty(V,"onLine",{get:function(){return!!(M!=null&&M.onLine)},enumerable:!0,configurable:!1}),Object.defineProperty(V,"language",{get:function(){return M==null?void 0:M.language},enumerable:!0,configurable:!1}),Object.defineProperty(V,"languages",{get:function(){return M!=null&&M.languages?C()(M.languages):void 0},enumerable:!0,configurable:!1}),Object.assign(V,y||{}),new Proxy({},{get:function(N,K){if(K in V)return V[K];throw new Error('Access to navigator property "'.concat(String(K),'" is not allowed.'))}})}function Q(y){var $={};try{var M=X();$.navigator=M;try{$.window=H({navigator:M})}catch{}}catch{}try{$.document=z()}catch{}return y?A()(A()({},$),y):$}function ce(y,$,M,b){return m.apply(this,arguments)}function m(){return m=U()(S()().mark(function y($,M,b,u){var V;return S()().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(!(!$||P()($)!=="object"&&typeof $!="function")){N.next=2;break}return N.abrupt("return",void 0);case 2:if(V=$.runjs,typeof V=="function"){N.next=5;break}return N.abrupt("return",void 0);case 5:return N.abrupt("return",$.runjs(M,Q(u),b));case 6:case"end":return N.stop()}},y)})),m.apply(this,arguments)}},19433:function(Zt,Oe,e){"use strict";e.d(Oe,{A:function(){return A}});var ue=e(19632),S=e.n(ue),le=e(52677),P=e.n(le),p=e(5574),U=e.n(p);function J(O){var R={};return Object.entries(O||{}).forEach(function(w){var f=U()(w,2),B=f[0],T=f[1];typeof T<"u"&&T!==null&&(R[B]=T)}),R}function C(O,R,w){try{var f,B,T,g,a,H=(f=O.dataSourceManager)===null||f===void 0||(B=f.getDataSource)===null||B===void 0?void 0:B.call(f,R||"main"),z=H==null||(T=H.collectionManager)===null||T===void 0||(g=T.getCollection)===null||g===void 0?void 0:g.call(T,w),X=z==null||(a=z.getPrimaryKey)===null||a===void 0?void 0:a.call(z);return X||"id"}catch{return"id"}}function j(O,R){var w,f;if(R){var B=R.dataSourceKey||"main",T=R.collection||((w=R.record)===null||w===void 0?void 0:w.__collectionName);if(T){var g=C(O,B,T)||"id",a=typeof R.filterByTk<"u"?R.filterByTk:typeof R.id<"u"?R.id:(f=R.record)===null||f===void 0?void 0:f[g];if(!(typeof a>"u"))return J({collection:T,filterByTk:a,dataSourceKey:B,associationName:R.associationName,sourceId:R.sourceId,fields:R.fields,appends:R.appends})}}}function A(O){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=function(g){return!g||P()(g)!=="object"?!1:typeof g.collection=="string"&&(typeof g.filterByTk<"u"||typeof g.id<"u"||g.record)},f={},B=function T(g,a){if(w(g)){var H=j(O,g);if(H){var z=a.join(".");f[z]=H}return}if(Array.isArray(g)){for(var X=0;X<g.length;X++)T(g[X],[].concat(S()(a),[String(X)]));return}if(g&&P()(g)==="object"){for(var Q=0,ce=Object.entries(g);Q<ce.length;Q++){var m=U()(ce[Q],2),y=m[0],$=m[1];T($,[].concat(S()(a),[y]))}return}};return B(R,[]),Object.keys(f).length?f:void 0}},2991:function(Zt,Oe,e){"use strict";e.d(Oe,{Z:function(){return p}});var ue=e(5574),S=e.n(ue),le=e(52677),P=e.n(le);function p(U,J,C,j){var A={},O={},R=function(B){if(Object.prototype.hasOwnProperty.call(J,B)){var T=J[B],g={};if(T.uiSchema&&P()(T.uiSchema)==="object")for(var a=0,H=Object.entries(T.uiSchema);a<H.length;a++){var z=S()(H[a],2),X=z[0],Q=z[1];if(Q&&P()(Q)==="object"){var ce,m=Q;g[X]={type:m.type||"any",title:m.title||((ce=m["x-decorator-props"])===null||ce===void 0?void 0:ce.label)||X,interface:m["x-component"],uiSchema:m}}}var y=Object.keys(g).length>0;O[B]={type:"object",title:U.t(T.title)||B,display:y?"default":"none",properties:y?{params:{type:"object",title:"Parameters",display:"flatten",properties:g}}:void 0},A[B]={get params(){return C.getStepParams(j,B)||{}},get uiSchema(){return T.uiSchema},result:void 0}}};for(var w in J)R(w);U.defineProperty("steps",{get:function(){return A}})}},16184:function(Zt,Oe,e){"use strict";e.d(Oe,{D8:function(){return g},N3:function(){return y},RB:function(){return Q},Yp:function(){return H},_6:function(){return ce},a9:function(){return X},gn:function(){return m},lP:function(){return B},o3:function(){return T},p7:function(){return f},sg:function(){return w}});var ue=e(97857),S=e.n(ue),le=e(15009),P=e.n(le),p=e(99289),U=e.n(p),J=e(80770),C=e(19433),j=e(81886),A=e(54393),O=e(96486),R=e.n(O);function w(M){var b,u,V,I,N,K=M.resource,E=M.collection,F=M.record,L=(E==null?void 0:E.name)||(K==null||(b=K.getResourceName)===null||b===void 0?void 0:b.call(K)),x=(E==null?void 0:E.dataSourceKey)||(K==null||(u=K.getDataSourceKey)===null||u===void 0?void 0:u.call(K)),v=(V=K==null||(I=K.getFilterByTk)===null||I===void 0?void 0:I.call(K))!==null&&V!==void 0?V:E==null||(N=E.getFilterByTK)===null||N===void 0?void 0:N.call(E,F);if(!(!L||typeof v>"u"||v===null)){var W=String(L).split("."),G=W[W.length-1];return{collection:G,dataSourceKey:x,filterByTk:v}}}function f(M){var b,u,V,I=M.view;if(I){var N=(I==null?void 0:I.inputArgs)||{},K=(N==null?void 0:N.collectionName)||(I==null||(b=I.record)===null||b===void 0?void 0:b.collection),E=(N==null?void 0:N.dataSourceKey)||(I==null||(u=I.record)===null||u===void 0?void 0:u.dataSourceKey)||"main",F=(N==null?void 0:N.filterByTk)||(I==null||(V=I.record)===null||V===void 0?void 0:V.filterByTk),L=N==null?void 0:N.associationName,x=N==null?void 0:N.sourceId;if(!(!K||typeof F>"u"||F===null))return{collection:K,dataSourceKey:E,filterByTk:F,sourceId:x,associationName:L}}}function B(M,b){var u,V,I,N=(u=M.inputArgs)===null||u===void 0?void 0:u.record,K=(V=M.collection)===null||V===void 0?void 0:V.filterTargetKey;if(!(!N||!K)){var E=b.view,F=E==null||(I=E.inputArgs)===null||I===void 0?void 0:I.filterByTk,L=N[K];if(!(F==null||L==null)&&F===L)return R().cloneDeep(N)}}function T(M,b){return function(u){var V,I,N,K;if(!(u==="record"||u.startsWith("record.")))return!1;var E=b();if(!E)return!0;if(u==="record")return!1;var F=f(M),L=F==null?void 0:F.collection,x=(F==null?void 0:F.dataSourceKey)||"main";if(!L)return!0;var v=(V=M.dataSourceManager)===null||V===void 0||(I=V.getDataSource)===null||I===void 0?void 0:I.call(V,x),W=v==null||(N=v.collectionManager)===null||N===void 0||(K=N.getCollection)===null||K===void 0?void 0:K.call(N,L);if(!W)return!0;var G=(0,A.V)(function(){return W},function(){return E}),re=u.startsWith("record.")?u.slice(7):"";return re?G(re):!1}}function g(M,b){var u=(0,A.V)(M,function(){return b()});return function(V){var I=b();if(!I)return!0;if(!V)return!1;var N=M();if(!V.includes(".")){var K,E,F=V,L;if(N&&(typeof N.getField=="function"&&(L=N.getField(F)),!L&&typeof N.getFields=="function")){var x=N.getFields()||[];L=x.find(function(G){return(G==null?void 0:G.name)===F})}var v=!!((K=L)!==null&&K!==void 0&&(E=K.isAssociationField)!==null&&E!==void 0&&E.call(K));if(!v)return!1;var W=I==null?void 0:I[F];return W==null}return u(V)}}function a(M){var b,u,V,I,N=M.resource,K=((b=M.collection)===null||b===void 0?void 0:b.dataSourceKey)||(N==null||(u=N.getDataSourceKey)===null||u===void 0?void 0:u.call(N)),E=N==null||(V=N.getResourceName)===null||V===void 0?void 0:V.call(N),F=N==null||(I=N.getSourceId)===null||I===void 0?void 0:I.call(N);if(!(!E||typeof F>"u"||F===null)){var L=String(E).split(".");if(!(L.length<2))return{collection:L[0],dataSourceKey:K,filterByTk:F}}}function H(M,b,u){return z.apply(this,arguments)}function z(){return z=U()(P()().mark(function M(b,u,V){var I;return P()().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,(0,j.L)(b,u,!0)();case 2:if(I=K.sent,I){K.next=5;break}return K.abrupt("return",null);case 5:return K.abrupt("return",S()(S()({},I),{},{buildVariablesParams:function(F){return V?V(F):w(F)}}));case 6:case"end":return K.stop()}},M)})),z.apply(this,arguments)}function X(M,b,u){var V=function(){var I=U()(P()().mark(function N(){return P()().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.abrupt("return",H(M,b,u));case 1:case"end":return E.stop()}},N)}));return function(){return I.apply(this,arguments)}}();return V.title=b,V}function Q(M,b,u){var V,I,N=u!=null&&u.title?((V=M.t)===null||V===void 0?void 0:V.call(M,u.title))||u.title:((I=M.t)===null||I===void 0?void 0:I.call(M,"Current record"))||"Current record";return X(b,N,function(K){return w(K)})}var ce=J._6,m=J.gn;function y(M,b){return $.apply(this,arguments)}function $(){return $=U()(P()().mark(function M(b,u){var V,I,N,K,E,F,L,x,v,W,G,re;return P()().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:if(V=(0,J.gn)(u)||{},I=Object.keys(V),I.length){te.next=4;break}return te.abrupt("return",void 0);case 4:N={},K=0,E=I;case 6:if(!(K<E.length)){te.next=37;break}if(L=E[K],x=(F=b.getPropertyOptions)===null||F===void 0?void 0:F.call(b,L),v=x==null?void 0:x.meta,v){te.next=12;break}return te.abrupt("continue",34);case 12:if(W=void 0,te.prev=13,typeof v!="function"){te.next=20;break}return te.next=17,v();case 17:te.t0=te.sent,te.next=21;break;case 20:te.t0=v;case 21:if(G=te.t0,re=G==null?void 0:G.buildVariablesParams,typeof re!="function"){te.next=27;break}return te.next=26,re(b);case 26:W=te.sent;case 27:te.next=33;break;case 29:return te.prev=29,te.t1=te.catch(13),te.t1,te.abrupt("continue",34);case 33:W&&(N[L]=W);case 34:K++,te.next=6;break;case 37:return te.abrupt("return",(0,C.A)(b,N));case 38:case"end":return te.stop()}},M,null,[[13,29]])})),$.apply(this,arguments)}},50476:function(Zt,Oe,e){"use strict";e.d(Oe,{QO:function(){return ee},K8:function(){return oe},k9:function(){return Ve},Rh:function(){return x},yT:function(){return te},qt:function(){return ve},Sv:function(){return Se}});var ue=e(5574),S=e.n(ue),le=e(97857),P=e.n(le),p=e(67294),U=e(22424),J=e(74655),C=e(67946),j=e(43992),A=e(15009),O=e.n(A),R=e(99289),w=e.n(R),f=e(52677),B=e.n(f),T=e(16184);function g(Ae){if(Ae===null||_typeof(Ae)!=="object")return!1;var Re=Object.getPrototypeOf(Ae);return Re===Object.prototype||Re===null}function a(Ae,Re,Be){var ae=_typeof(Ae);return Ae==null?{type:"any",title:Re}:Array.isArray(Ae)?{type:"array",title:Re,properties:function(){var Me=_asyncToGenerator(_regeneratorRuntime().mark(function Le(){var Xe,ht,St,Ye;return _regeneratorRuntime().wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:for(Xe=Math.min(Ae.length||0,10),ht={},St=Be??new WeakSet,Ye=0;Ye<Xe;Ye++)ht[String(Ye)]=a(Ae[Ye],"#".concat(Ye),St);return bt.abrupt("return",ht);case 5:case"end":return bt.stop()}},Le)}));function He(){return Me.apply(this,arguments)}return He}()}:ae==="string"?{type:"string",title:Re}:ae==="number"?{type:"number",title:Re}:ae==="boolean"?{type:"boolean",title:Re}:ae==="object"&&g(Ae)?{type:"object",title:Re,properties:function(){var Me=_asyncToGenerator(_regeneratorRuntime().mark(function Le(){var Xe,ht;return _regeneratorRuntime().wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(Xe=Be??new WeakSet,!Xe.has(Ae)){Ye.next=3;break}return Ye.abrupt("return",{});case 3:return Xe.add(Ae),ht={},Object.keys(Ae||{}).forEach(function(pt){ht[pt]=a(Ae[pt],pt,Xe)}),Ye.abrupt("return",ht);case 7:case"end":return Ye.stop()}},Le)}));function He(){return Me.apply(this,arguments)}return He}()}:{type:"any",title:Re}}function H(Ae,Re){var Be=function(bt){return Ae.t(bt)},ae=function(bt){var en,Rn;if(!bt)return!1;var Bn=Array.isArray((en=bt.navigation)===null||en===void 0?void 0:en.viewStack)?bt.navigation.viewStack:[],hn=bt==null||(Rn=bt.inputArgs)===null||Rn===void 0?void 0:Rn.openerUids,Lt=Array.isArray(hn)&&hn.length>0;return Bn.length>=2||Lt},Me=function(){return ae(Re??Ae.view)},He=function(){var pt=w()(O()().mark(function bt(en){var Rn,Bn,hn;return O()().wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:if(Rn=Re??en.view,!(!Rn||!ae(Rn))){Je.next=3;break}return Je.abrupt("return",void 0);case 3:return Je.next=5,z(en,Rn);case 5:if(Bn=Je.sent,hn=Bn==null?void 0:Bn.resource,!(hn!=null&&hn.collectionName&&hn.filterByTk!=null)){Je.next=9;break}return Je.abrupt("return",{collection:hn.collectionName,dataSourceKey:hn.dataSourceKey||"main",filterByTk:hn.filterByTk,associationName:hn.associationName,sourceId:hn.sourceId});case 9:return Je.abrupt("return",(0,T.p7)(en));case 10:case"end":return Je.stop()}},bt)}));return function(en){return pt.apply(this,arguments)}}(),Le=function(){var pt=w()(O()().mark(function bt(){var en,Rn,Bn,hn,Lt,Je;return O()().wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return lt.next=2,He(Ae);case 2:if(Lt=lt.sent,Lt!=null&&Lt.collection){lt.next=5;break}return lt.abrupt("return",null);case 5:return Je=(en=Ae.dataSourceManager)===null||en===void 0||(Rn=en.getDataSource)===null||Rn===void 0?void 0:Rn.call(en,Lt.dataSourceKey||"main"),lt.abrupt("return",(Je==null||(Bn=Je.collectionManager)===null||Bn===void 0||(hn=Bn.getCollection)===null||hn===void 0?void 0:hn.call(Bn,Lt.collection))||null);case 7:case"end":return lt.stop()}},bt)}));return function(){return pt.apply(this,arguments)}}(),Xe=function(){var pt=w()(O()().mark(function bt(en,Rn){var Bn,hn,Lt,Je,xt,lt,_t,Et,Yt,Pn,Tn,gn,fn,on,Kt,vr,Gr,er,nr,kr;return O()().wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:if(Nr.prev=0,lt=Rn||Ae,_t=(Bn=lt.view)===null||Bn===void 0?void 0:Bn.navigation,Et=Array.isArray(_t==null?void 0:_t.viewStack)?_t.viewStack:[],!(Et.length<2||en<1)){Nr.next=6;break}return Nr.abrupt("return",void 0);case 6:if(Yt=Et.length-1-en,!(Yt<0)){Nr.next=9;break}return Nr.abrupt("return",void 0);case 9:if(Pn=Et[Yt],Pn!=null&&Pn.viewUid){Nr.next=12;break}return Nr.abrupt("return",void 0);case 12:if(Tn=(hn=lt.engine)===null||hn===void 0?void 0:hn.getModel(Pn.viewUid,!0),Tn){Nr.next=23;break}return Nr.prev=14,Nr.next=17,lt.engine.loadModel({uid:Pn.viewUid});case 17:Tn=Nr.sent,Nr.next=23;break;case 20:Nr.prev=20,Nr.t0=Nr.catch(14),(gn=lt.logger||Ae.logger)===null||gn===void 0||(fn=gn.warn)===null||fn===void 0||fn.call(gn,{err:Nr.t0},"[FlowEngine] popup.getParentRecordRef loadModel failed");case 23:if(on=((Lt=Tn)===null||Lt===void 0||(Je=Lt.getStepParams)===null||Je===void 0?void 0:Je.call(Lt,"popupSettings","openView"))||{},Kt=on==null?void 0:on.collectionName,vr=(on==null?void 0:on.dataSourceKey)||"main",Gr=(xt=Pn==null?void 0:Pn.filterByTk)!==null&&xt!==void 0?xt:Pn==null?void 0:Pn.sourceId,!(!Kt||typeof Gr>"u"||Gr===null)){Nr.next=29;break}return Nr.abrupt("return",void 0);case 29:return er={collection:Kt,dataSourceKey:vr,filterByTk:Gr,sourceId:Pn==null?void 0:Pn.sourceId,associationName:on==null?void 0:on.associationName},Nr.abrupt("return",er);case 33:return Nr.prev=33,Nr.t1=Nr.catch(0),(nr=(Rn==null?void 0:Rn.logger)||Ae.logger)===null||nr===void 0||(kr=nr.warn)===null||kr===void 0||kr.call(nr,{err:Nr.t1},"[FlowEngine] popup.getParentRecordRef failed"),Nr.abrupt("return",void 0);case 37:case"end":return Nr.stop()}},bt,null,[[0,33],[14,20]])}));return function(en,Rn){return pt.apply(this,arguments)}}(),ht=function(bt){try{var en,Rn=(en=Re??Ae.view)===null||en===void 0?void 0:en.navigation,Bn=Array.isArray(Rn==null?void 0:Rn.viewStack)?Rn.viewStack:[];return Bn.length>=bt+1}catch{return!1}},St=function(bt){var en=function(){var Bn={type:"object",title:Be("Parent popup"),disabled:function(){return!ht(bt)},disabledReason:function(){return ht(bt)?void 0:Be("No parent popup")},hidden:function(){return!ht(bt)},properties:function(){var hn=w()(O()().mark(function Je(){var xt,lt,_t,Et,Yt;return O()().wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:return Tn.next=2,Xe(bt);case 2:if(xt=Tn.sent,lt={},lt.uid={type:"string",title:Be("Popup uid")},!xt){Tn.next=13;break}return _t=function(){try{var gn,fn,on,Kt,vr=(gn=Ae.dataSourceManager)===null||gn===void 0||(fn=gn.getDataSource)===null||fn===void 0?void 0:fn.call(gn,xt.dataSourceKey||"main");return(vr==null||(on=vr.collectionManager)===null||on===void 0||(Kt=on.getCollection)===null||Kt===void 0?void 0:Kt.call(on,xt.collection||""))||null}catch{return null}}(),Tn.next=9,(0,T.Yp)(function(){return _t},Be("Popup record"),function(){return xt});case 9:Et=Tn.sent,lt.record=Et||{type:"object",title:Be("Popup record")},Tn.next=14;break;case 13:lt.record={type:"object",title:Be("Popup record")};case 14:return Yt={type:"object",title:Be("Data source"),properties:function(){var gn=w()(O()().mark(function on(){return O()().wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.abrupt("return",{dataSourceKey:{type:"string",title:Be("Data source key")},collectionName:{type:"string",title:Be("Collection name")},associationName:{type:"string",title:Be("Association name")},filterByTk:{type:"string",title:Be("filterByTk")},sourceId:{type:"string",title:Be("sourceId")}});case 1:case"end":return vr.stop()}},on)}));function fn(){return gn.apply(this,arguments)}return fn}()},lt.resource=Yt,Tn.abrupt("return",lt);case 17:case"end":return Tn.stop()}},Je)}));function Lt(){return hn.apply(this,arguments)}return Lt}()};return Bn};return en.title=Be("Parent popup"),en},Ye=function(){var bt={type:"object",title:Be("Current popup"),disabled:function(){return!Me()},hidden:function(){return!Me()},buildVariablesParams:function(){var en=w()(O()().mark(function Bn(hn){var Lt,Je,xt,lt,_t,Et,Yt,Pn,Tn,gn,fn,on,Kt,vr,Gr,er,nr,kr,Yr;return O()().wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:if(Me()){Dr.next=2;break}return Dr.abrupt("return",void 0);case 2:return Dr.next=4,He(hn);case 4:if(Je=Dr.sent,xt=(Lt=hn.view)===null||Lt===void 0?void 0:Lt.inputArgs,lt={},Je&&(_t=P()({},Je),!_t.associationName&&xt!==null&&xt!==void 0&&xt.associationName&&(_t.associationName=xt.associationName),typeof _t.sourceId>"u"&&typeof(xt==null?void 0:xt.sourceId)<"u"&&(_t.sourceId=xt==null?void 0:xt.sourceId),lt.record=_t),Dr.prev=8,Yt=(Et=hn.view)===null||Et===void 0?void 0:Et.navigation,Pn=Array.isArray(Yt==null?void 0:Yt.viewStack)?Yt.viewStack:[],!(Pn.length>=2)){Dr.next=27;break}return Tn=lt,gn=1,Dr.next=16,Xe(gn,hn);case 16:fn=Dr.sent;case 17:if(!fn){Dr.next=27;break}return Tn.parent||(Tn.parent={}),Tn.parent.record=fn,Tn=Tn.parent,gn+=1,Dr.next=24,Xe(gn,hn);case 24:fn=Dr.sent,Dr.next=17;break;case 27:Dr.next=32;break;case 29:Dr.prev=29,Dr.t0=Dr.catch(8),(on=hn.logger)===null||on===void 0||(Kt=on.debug)===null||Kt===void 0||Kt.call(on,{err:Dr.t0},"[FlowEngine] buildVariablesParams: build parent-chain failed");case 32:try{vr=xt==null?void 0:xt.sourceId,Gr=xt==null?void 0:xt.associationName,er=(xt==null?void 0:xt.dataSourceKey)||"main",vr!=null&&vr!==""&&Gr&&typeof Gr=="string"&&(nr=String(Gr).split(".")[0],nr&&(lt.sourceRecord={collection:nr,dataSourceKey:er,filterByTk:vr}))}catch(Wn){(kr=hn.logger)===null||kr===void 0||(Yr=kr.debug)===null||Yr===void 0||Yr.call(kr,{err:Wn},"[FlowEngine] buildVariablesParams: infer sourceRecord failed")}return Dr.abrupt("return",lt);case 34:case"end":return Dr.stop()}},Bn,null,[[8,29]])}));function Rn(Bn){return en.apply(this,arguments)}return Rn}(),properties:function(){var en=w()(O()().mark(function Bn(){var hn,Lt,Je,xt,lt,_t,Et,Yt,Pn,Tn,gn,fn,on,Kt,vr,Gr,er,nr,kr,Yr,Nr,Dr,Wn,an;return O()().wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:return hn={},hn.uid={type:"string",title:Be("Popup uid")},rn.next=4,He(Ae);case 4:if(Lt=rn.sent,Lt&&(Je=function(){var yn=w()(O()().mark(function At(){var rt;return O()().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:return It.next=2,Le();case 2:if(rt=It.sent,rt){It.next=5;break}return It.abrupt("return",null);case 5:return It.next=7,(0,T.Yp)(function(){return rt},Be("Current popup record"),function(Mt){return He(Mt)});case 7:return It.abrupt("return",It.sent);case 8:case"end":return It.stop()}},At)}));return function(){return yn.apply(this,arguments)}}(),Je.title=Be("Current popup record"),Je.hasChildren=!0,hn.record=Je),rn.prev=6,lt=(xt=Ae.view)===null||xt===void 0?void 0:xt.inputArgs,_t=lt==null?void 0:lt.sourceId,Et=lt==null?void 0:lt.associationName,Yt=(lt==null?void 0:lt.dataSourceKey)||"main",!(!Et||typeof Et!="string"||!Et.includes("."))){rn.next=24;break}if(Tn=(Pn=Ae.view)===null||Pn===void 0?void 0:Pn.navigation,gn=Array.isArray(Tn==null?void 0:Tn.viewStack)?Tn.viewStack:[],fn=gn==null?void 0:gn[gn.length-1],!(fn!=null&&fn.viewUid)){rn.next=24;break}if(Gr=Ae==null||(on=Ae.engine)===null||on===void 0?void 0:on.getModel(fn.viewUid,!0),Gr){rn.next=21;break}return rn.next=20,Ae.engine.loadModel({uid:fn.viewUid});case 20:Gr=rn.sent;case 21:er=((Kt=Gr)===null||Kt===void 0||(vr=Kt.getStepParams)===null||vr===void 0?void 0:vr.call(Kt,"popupSettings","openView"))||{},Et=(er==null?void 0:er.associationName)||Et,Yt=(er==null?void 0:er.dataSourceKey)||Yt;case 24:if(!(_t!=null&&_t!==""&&Et&&typeof Et=="string")){rn.next=32;break}if(nr=String(Et).includes(".")?String(Et).split(".")[0]:void 0,!nr){rn.next=32;break}return kr=function(){try{var At,rt,Ot,It,Mt=(At=Ae.dataSourceManager)===null||At===void 0||(rt=At.getDataSource)===null||rt===void 0?void 0:rt.call(At,Yt);return(Mt==null||(Ot=Mt.collectionManager)===null||Ot===void 0||(It=Ot.getCollection)===null||It===void 0?void 0:It.call(Ot,nr))||null}catch{return null}},rn.next=30,(0,T.Yp)(kr,Be("Current popup parent record"),function(){return{collection:nr,dataSourceKey:Yt,filterByTk:_t}});case 30:Yr=rn.sent,Yr&&(hn.sourceRecord=Yr);case 32:rn.next=37;break;case 34:rn.prev=34,rn.t0=rn.catch(6),(Nr=Ae.logger)===null||Nr===void 0||(Dr=Nr.debug)===null||Dr===void 0||Dr.call(Nr,{err:rn.t0},"[FlowEngine] popup.properties: build sourceRecord failed");case 37:return Wn={type:"object",title:Be("Data source"),properties:function(){var yn=w()(O()().mark(function rt(){return O()().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:return It.abrupt("return",{dataSourceKey:{type:"string",title:Be("Data source key")},collectionName:{type:"string",title:Be("Collection name")},associationName:{type:"string",title:Be("Association name")},filterByTk:{type:"string",title:Be("filterByTk")},sourceId:{type:"string",title:Be("sourceId")}});case 1:case"end":return It.stop()}},rt)}));function At(){return yn.apply(this,arguments)}return At}()},hn.resource=Wn,rn.next=41,Xe(1);case 41:return an=rn.sent,an&&(hn.parent=St(1)),rn.abrupt("return",hn);case 44:case"end":return rn.stop()}},Bn,null,[[6,34]])}));function Rn(){return en.apply(this,arguments)}return Rn}()};return bt};return Ye.title=Be("Current popup"),Ye.sort=975,Ye}function z(Ae,Re){return X.apply(this,arguments)}function X(){return X=w()(O()().mark(function Ae(Re,Be){var ae,Me,He,Le,Xe,ht,St,Ye,pt,bt,en,Rn;return O()().wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:if(He=Be==null?void 0:Be.navigation,Le=Array.isArray(He==null?void 0:He.viewStack)?He.viewStack:[],Xe=Be==null||(ae=Be.inputArgs)===null||ae===void 0?void 0:ae.openerUids,ht=Array.isArray(Xe)&&Xe.length>0,St=Le.length>=2,Ye=St||ht,Ye){hn.next=8;break}return hn.abrupt("return",void 0);case 8:if(Le.length){hn.next=14;break}if(pt=(Be==null?void 0:Be.inputArgs)||{},bt=pt.collectionName||pt.filterByTk!=null||pt.sourceId!=null||pt.associationName||pt.viewUid,bt){hn.next=13;break}return hn.abrupt("return",void 0);case 13:return hn.abrupt("return",{uid:pt.viewUid,resource:{dataSourceKey:pt.dataSourceKey||"main",collectionName:pt.collectionName,associationName:pt.associationName,filterByTk:pt.filterByTk,sourceId:pt.sourceId}});case 14:return en=function(){var Lt=w()(O()().mark(function Je(xt){var lt,_t,Et,Yt,Pn,Tn,gn,fn,on,Kt,vr,Gr,er,nr;return O()().wrap(function(Yr){for(;;)switch(Yr.prev=Yr.next){case 0:if(!(xt<0||!((lt=Le[xt])!==null&&lt!==void 0&&lt.viewUid))){Yr.next=2;break}return Yr.abrupt("return",void 0);case 2:if(gn=Le[xt].viewUid,fn=(_t=Re.engine)===null||_t===void 0?void 0:_t.getModel(gn,!0),fn){Yr.next=8;break}return Yr.next=7,(on=Re.engine)===null||on===void 0?void 0:on.loadModel({uid:gn});case 7:fn=Yr.sent;case 8:return Kt=((Et=fn)===null||Et===void 0||(Yt=Et.getStepParams)===null||Yt===void 0?void 0:Yt.call(Et,"popupSettings","openView"))||{},vr=Kt==null?void 0:Kt.collectionName,Gr=(Kt==null?void 0:Kt.dataSourceKey)||"main",er={uid:gn,resource:{dataSourceKey:Gr,collectionName:vr,associationName:Kt==null?void 0:Kt.associationName,filterByTk:(Pn=Le[xt])===null||Pn===void 0?void 0:Pn.filterByTk,sourceId:(Tn=Le[xt])===null||Tn===void 0?void 0:Tn.sourceId}},Yr.next=14,en(xt-1);case 14:return nr=Yr.sent,nr&&(er.parent=nr),Yr.abrupt("return",er);case 17:case"end":return Yr.stop()}},Je)}));return function(xt){return Lt.apply(this,arguments)}}(),hn.next=17,en(((Be==null||(Me=Be.navigation)===null||Me===void 0||(Me=Me.viewStack)===null||Me===void 0?void 0:Me.length)||1)-1);case 17:return Rn=hn.sent,hn.abrupt("return",Rn);case 19:case"end":return hn.stop()}},Ae)})),X.apply(this,arguments)}function Q(Ae,Re){var Be=/^(?:record|sourceRecord)(?:\.|$)|^parent(?:\.parent)*(?:\.(?:record|sourceRecord))(?:\.|$)/;Ae.defineProperty("popup",{get:function(){var ae=w()(O()().mark(function He(){return O()().wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Xe.abrupt("return",z(Ae,Re));case 1:case"end":return Xe.stop()}},He)}));function Me(){return ae.apply(this,arguments)}return Me}(),meta:H(Ae,Re),resolveOnServer:function(Me){try{return!!Me&&Be.test(Me)}catch{return!1}}})}var ce=e(13769),m=e.n(ce),y=e(5914),$=e(85893),M=["afterClose","footer","header","hidden"],b=(0,p.forwardRef)(function(Ae,Re){var Be,ae=Ae.afterClose,Me=Ae.footer,He=Ae.header,Le=Ae.hidden,Xe=m()(Ae,M),ht=(0,p.useState)(!0),St=S()(ht,2),Ye=St[0],pt=St[1],bt=(0,p.useState)(Xe),en=S()(bt,2),Rn=en[0],Bn=en[1],hn=(0,p.useState)(function(){return Me}),Lt=S()(hn,2),Je=Lt[0],xt=Lt[1],lt=(0,p.useState)(He),_t=S()(lt,2),Et=_t[0],Yt=_t[1];(0,p.useImperativeHandle)(Re,function(){return{destroy:function(){pt(!1),ae==null||ae()},update:function(fn){return Bn(function(on){return P()(P()({},on),fn)})},setFooter:function(fn){xt(fn)},setHeader:function(fn){Object.values(fn||{}).length===0?Yt(null):Yt(fn)}}});var Pn=P()(P()({},Rn),{},{title:(Et==null?void 0:Et.title)||Rn.title,extra:Et==null?void 0:Et.extra,footer:Je!==void 0?Je:(Be=Rn.footer)!==null&&Be!==void 0?Be:null}),Tn=p.useMemo(function(){return document.querySelector("#nocobase-app-container")},[]);return(0,$.jsx)(y.Z,P()(P()({closable:!1,rootClassName:Le?"nb-hidden":"",getContainer:Tn},Pn),{},{open:Ye,onCancel:Rn.onCancel,afterClose:function(){ae==null||ae()},children:Rn.children}))}),u=b,V=e(19632),I=e.n(V);function N(){var Ae=p.useState([]),Re=S()(Ae,2),Be=Re[0],ae=Re[1],Me=p.useCallback(function(He){return ae(function(Le){return[].concat(I()(Le),[He])}),function(){ae(function(Le){return Le.filter(function(Xe){return Xe!==He})})}},[]);return[Be,Me]}var K=e(84995),E=e(24084),F=e(67940),L=0;function x(){var Ae=p.useRef(null),Re=function(He,Le){var Xe,ht,St,Ye=Le==null?void 0:Le.engine;L+=1;var pt=p.createRef(),bt,en,Rn=new Promise(function(gn){en=gn}),Bn=null,hn=null,Lt=function(fn){var on=fn.children;return p.useEffect(function(){var Kt;return Bn=on,(Kt=pt.current)===null||Kt===void 0||Kt.setFooter(on),function(){var vr;Bn=null,(vr=pt.current)===null||vr===void 0||vr.setFooter(null)}},[on]),null},Je=function(fn){return p.useEffect(function(){var on;return hn=fn,(on=pt.current)===null||on===void 0||on.setHeader(fn),function(){var Kt;hn=null,(Kt=pt.current)===null||Kt===void 0||Kt.setHeader(null)}},[fn]),null},xt=new C.iT,lt=(0,F.$)(Le.engine),_t=(0,K.GA)(Ye,lt);xt.defineProperty("engine",{value:lt}),xt.addDelegate(lt.context),He.inheritContext!==!1?xt.addDelegate(Le):xt.addDelegate(Le.engine.context);var Et={type:"dialog",inputArgs:He.inputArgs||{},preventClose:!!He.preventClose,destroy:function(fn){var on,Kt,vr,Gr,er,nr;(on=He.onClose)===null||on===void 0||on.call(He),(Kt=pt.current)===null||Kt===void 0||Kt.destroy(),(vr=bt)===null||vr===void 0||vr(),(Gr=en)===null||Gr===void 0||Gr(fn);var kr=_t==null?void 0:_t.emitter;(0,K.YB)(kr),kr==null||(er=kr.emit)===null||er===void 0||er.call(kr,K.cn,{type:"dialog",viewUid:Et==null||(nr=Et.inputArgs)===null||nr===void 0?void 0:nr.viewUid}),lt.unlinkFromStack()},update:function(fn){var on;return(on=pt.current)===null||on===void 0?void 0:on.update(fn)},close:function(fn,on){var Kt;if(!(He.preventClose&&!on)){if(He.triggerByRouter&&(Kt=He.inputArgs)!==null&&Kt!==void 0&&(Kt=Kt.navigation)!==null&&Kt!==void 0&&Kt.back){He.inputArgs.navigation.back();return}Et.destroy(fn)}},Footer:Lt,Header:Je,setFooter:function(fn){var on;Bn=fn,(on=pt.current)===null||on===void 0||on.setFooter(fn)},setHeader:function(fn){var on;hn=fn,(on=pt.current)===null||on===void 0||on.setHeader(fn)},navigation:(Xe=He.inputArgs)===null||Xe===void 0?void 0:Xe.navigation,get record(){return(0,T.lP)(Le,xt)}};xt.defineProperty("view",{get:function(){return Et},resolveOnServer:(0,T.o3)(xt,function(){return(0,T.lP)(Le,xt)})}),Q(xt,Et);var Yt=(0,J.observer)(function(){var gn,fn,on=p.useRef(!1),Kt=typeof He.content=="function"?He.content(Et,xt):He.content,vr=typeof Kt=="string"?(0,$.jsx)("div",{dangerouslySetInnerHTML:{__html:U.Z.sanitize(Kt)}}):Kt;return p.useEffect(function(){var Gr;(Gr=He.onOpen)===null||Gr===void 0||Gr.call(He,Et,xt)},[]),(gn=He.inputArgs)!==null&&gn!==void 0&&(gn=gn.hidden)!==null&&gn!==void 0&&gn.value&&!on.current?null:(on.current=!0,(0,$.jsx)(u,P()(P()({className:"nb-dialog-overflow-hidden",ref:pt,hidden:(fn=He.inputArgs)===null||fn===void 0||(fn=fn.hidden)===null||fn===void 0?void 0:fn.value,footer:Bn,header:hn},He),{},{onCancel:function(){Et.close(He.result)},children:vr})))},{displayName:"DialogWithContext"}),Pn=(He==null||(ht=He.inputArgs)===null||ht===void 0?void 0:ht.viewUid)||"page-".concat(L),Tn=(0,$.jsx)(E.r6,{engine:lt,children:(0,$.jsx)(j.Y5,{context:xt,children:(0,$.jsx)(Yt,{})})},Pn);return bt=(St=Ae.current)===null||St===void 0?void 0:St.patchElement(Tn),Object.assign(Rn,Et)},Be=p.useMemo(function(){return{open:Re}},[]),ae=p.memo(p.forwardRef(function(Me,He){var Le=N(),Xe=S()(Le,2),ht=Xe[0],St=Xe[1];return p.useImperativeHandle(He,function(){return{patchElement:St}},[St]),(0,$.jsx)($.Fragment,{children:ht})}));return[Be,(0,$.jsx)(ae,{ref:Ae},"dialog-holder")]}var v=e(95012),W=e(54182),G=["children","footer","title","extra","hidden","isMobile"],re=p.forwardRef(function(Ae,Re){var Be,ae=Ae.children,Me=Ae.footer,He=Ae.title,Le=Ae.extra,Xe=Ae.hidden,ht=Ae.isMobile,St=m()(Ae,G),Ye=p.useState(!0),pt=S()(Ye,2),bt=pt[0],en=pt[1],Rn=p.useState(function(){return Me}),Bn=S()(Rn,2),hn=Bn[0],Lt=Bn[1],Je=p.useState(P()({title:He,extra:Le},St.header)),xt=S()(Je,2),lt=xt[0],_t=xt[1];p.useImperativeHandle(Re,function(){return{destroy:function(){en(!1)},update:function(Pn){Object.assign(St,Pn)},setFooter:function(Pn){Lt(Pn)},setHeader:function(Pn){Object.values(Pn||{}).length===0?_t(null):_t(Pn)}}},[]);var Et=p.useMemo(function(){return document.querySelector("#nocobase-app-container")},[]);return ht?(0,$.jsx)(W.E,P()(P()(P()({className:Xe?"nb-hidden":"",visible:bt},St),{},{footer:hn},lt),{},{onClose:St.onClose,children:ae})):(0,$.jsx)(v.Z,P()(P()(P()({rootClassName:Xe?"nb-hidden":"",closable:!1,getContainer:Et},St),{},{open:bt,footer:hn,styles:P()(P()({},St.styles),{},{footer:P()({display:"flex",justifyContent:"flex-end"},(Be=St.styles)===null||Be===void 0?void 0:Be.footer)})},lt),{},{onClose:St.onClose,children:ae}))}),q=re;function te(){var Ae=p.useRef(null),Re=p.useMemo(function(){return J.observable.shallow({value:[]})},[]),Be=p.memo(function(Le){var Xe=Le.index,ht=p.useState(null),St=S()(ht,2),Ye=St[0],pt=St[1];return p.useEffect(function(){(0,J.autorun)(function(){var bt=Re.value;bt[Xe]&&Ye!==bt[Xe]&&pt(bt[Xe]),bt[Xe]||pt(null)})},[Ye,Xe]),Ye?(0,$.jsx)(Ye,{children:(0,$.jsx)(Be,{index:Xe+1})}):null});Be.displayName="RenderNestedDrawer";var ae=function(Xe,ht){var St,Ye,pt=ht.engine,bt=p.createRef(),en,Rn,Bn=new Promise(function(gn){Rn=gn}),hn=null,Lt=null,Je=function(fn){var on=fn.children;return p.useEffect(function(){var Kt;return hn=on,(Kt=bt.current)===null||Kt===void 0||Kt.setFooter(on),function(){var vr;hn=null,(vr=bt.current)===null||vr===void 0||vr.setFooter(null)}},[on]),null},xt=function(fn){return p.useEffect(function(){var on;return Lt=fn,(on=bt.current)===null||on===void 0||on.setHeader(fn),function(){var Kt;Lt=null,(Kt=bt.current)===null||Kt===void 0||Kt.setHeader(null)}},[fn]),null},lt=new C.iT,_t=(0,F.$)(ht.engine),Et=(0,K.GA)(pt,_t);lt.defineProperty("engine",{value:_t}),lt.addDelegate(_t.context),Xe.inheritContext!==!1?lt.addDelegate(ht):lt.addDelegate(ht.engine.context);var Yt={type:"drawer",inputArgs:Xe.inputArgs||{},preventClose:!!Xe.preventClose,destroy:function(fn){var on,Kt,vr,Gr,er,nr;(on=Xe.onClose)===null||on===void 0||on.call(Xe),(Kt=bt.current)===null||Kt===void 0||Kt.destroy(),(vr=en)===null||vr===void 0||vr(),(Gr=Rn)===null||Gr===void 0||Gr(fn);var kr=Et==null?void 0:Et.emitter;(0,K.YB)(kr),kr==null||(er=kr.emit)===null||er===void 0||er.call(kr,K.cn,{type:"drawer",viewUid:Yt==null||(nr=Yt.inputArgs)===null||nr===void 0?void 0:nr.viewUid}),_t.unlinkFromStack()},update:function(fn){var on;return(on=bt.current)===null||on===void 0?void 0:on.update(fn)},close:function(fn,on){var Kt;if(!(Xe.preventClose&&!on)){if(Xe.triggerByRouter&&(Kt=Xe.inputArgs)!==null&&Kt!==void 0&&(Kt=Kt.navigation)!==null&&Kt!==void 0&&Kt.back){Xe.inputArgs.navigation.back();return}Yt.destroy(fn)}},Footer:Je,Header:xt,setFooter:function(fn){var on;hn=fn,(on=bt.current)===null||on===void 0||on.setFooter(fn)},setHeader:function(fn){var on;Lt=fn,(on=bt.current)===null||on===void 0||on.setHeader(fn)},navigation:(St=Xe.inputArgs)===null||St===void 0?void 0:St.navigation,get record(){return(0,T.lP)(ht,lt)}};lt.defineProperty("view",{get:function(){return Yt},resolveOnServer:(0,T.o3)(lt,function(){return(0,T.lP)(ht,lt)})}),Q(lt,Yt);var Pn=p.memo((0,J.observer)(function(gn){var fn,on,Kt=p.useRef(!1),vr=typeof Xe.content=="function"?Xe.content(Yt,lt):Xe.content,Gr=typeof vr=="string"?(0,$.jsx)("div",{dangerouslySetInnerHTML:{__html:U.Z.sanitize(vr)}}):vr;return p.useEffect(function(){var er;(er=Xe.onOpen)===null||er===void 0||er.call(Xe,Yt,lt)},[]),(fn=Xe.inputArgs)!==null&&fn!==void 0&&(fn=fn.hidden)!==null&&fn!==void 0&&fn.value&&!Kt.current?(0,$.jsx)($.Fragment,{children:gn.children}):(Kt.current=!0,(0,$.jsxs)(q,P()(P()({ref:bt},Xe),{},{footer:hn,header:Xe.header||Lt,hidden:(on=Xe.inputArgs)===null||on===void 0||(on=on.hidden)===null||on===void 0?void 0:on.value,onClose:function(){Yt.close(Xe.result)},isMobile:lt.isMobileLayout,children:[Gr,gn.children]})))}));Pn.displayName="DrawerWithContext";var Tn=p.memo(function(gn){var fn=gn.children;return(0,$.jsx)(E.r6,{engine:_t,children:(0,$.jsx)(j.Y5,{context:lt,children:(0,$.jsx)(Pn,{children:fn})})})});return Tn.displayName="RenderDrawer",en=(Ye=Ae.current)===null||Ye===void 0?void 0:Ye.patchElement(Tn),Object.assign(Bn,Yt)},Me=p.useMemo(function(){return{open:ae}},[]),He=p.memo(p.forwardRef(function(Le,Xe){var ht=N(),St=S()(ht,2),Ye=St[0],pt=St[1];return p.useImperativeHandle(Xe,function(){return{patchElement:pt}},[pt]),p.useEffect(function(){Re.value=Ye},[Ye]),(0,$.jsx)(Be,{index:0})}));return[Me,(0,$.jsx)(He,{ref:Ae},"drawer-holder")]}var ye=e(73935),Pe=e(73475),Ee=e(83622),de=(0,p.forwardRef)(function(Ae,Re){var Be=p.useState({}),ae=S()(Be,2),Me=ae[0],He=ae[1],Le=P()(P()({},Ae),Me),Xe=Le.visible,ht=Xe===void 0?!0:Xe,St=Le.footer,Ye=St===void 0?null:St,pt=Le.header,bt=pt===void 0?null:pt,en=Le.children,Rn=Le.hidden,Bn=Le.title,hn=Le.styles,Lt=hn===void 0?{}:hn,Je=Le.zIndex,xt=Je===void 0?4:Je,lt=(0,p.useRef)(!1),_t=(0,E.Zr)(),Et=(0,p.useState)(function(){return Ye}),Yt=S()(Et,2),Pn=Yt[0],Tn=Yt[1],gn=(0,p.useState)(bt),fn=S()(gn,2),on=fn[0],Kt=fn[1];(0,p.useImperativeHandle)(Re,function(){return{destroy:function(){lt.current||(lt.current=!0)},update:function(kr){He(kr)},setFooter:function(kr){Tn(kr)},setHeader:function(kr){Object.values(kr||{}).length===0?Kt(null):Kt(kr)}}});var vr=(0,p.useMemo)(function(){return{display:Rn?"none":"flex",flexDirection:"column",height:"100%",zIndex:xt}},[Rn,xt]),Gr=(0,p.useMemo)(function(){if(!on&&!Bn)return null;var nr=on||{},kr=nr.title,Yr=kr===void 0?Bn:kr,Nr=nr.extra,Dr=_t.context.themeToken;return(0,$.jsxs)("div",{style:P()({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"".concat(Dr.paddingSM,"px ").concat(Dr.padding,"px"),borderBottom:"1px solid ".concat(Dr.colorSplit),backgroundColor:Dr.colorBgContainer},Lt.header),children:[(0,$.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:Dr.marginXS},children:[(0,$.jsx)(Ee.ZP,{type:"text",size:"small",icon:(0,$.jsx)(Pe.Z,{}),onClick:function(){if(!lt.current){var an;lt.current=!0,(an=Ae.onClose)===null||an===void 0||an.call(Ae)}},style:{color:Dr.colorTextTertiary}}),Yr&&(0,$.jsx)("div",{style:{fontSize:Dr.fontSizeLG,fontWeight:Dr.fontWeightStrong,color:Dr.colorText},children:Yr})]}),Nr&&(0,$.jsx)("div",{children:Nr})]})},[on,Bn,_t.context.themeToken,Lt.header,Ae.onClose]),er=(0,p.useMemo)(function(){if(!Pn)return null;var nr=_t.context.themeToken;return(0,$.jsx)("div",{style:P()({display:"flex",justifyContent:"flex-end",alignItems:"center",padding:"".concat(nr.paddingXS,"px ").concat(nr.padding,"px"),borderTop:"1px solid ".concat(nr.colorSplit),backgroundColor:nr.colorBgContainer},Lt.footer),children:Pn})},[Pn,_t.context.themeToken,Lt.footer]);return ht?(0,$.jsxs)("div",{style:P()(P()({},vr),Lt.content),children:[Gr,(0,$.jsx)("div",{style:P()({flex:1,overflowY:"auto"},Lt.body),children:en}),er]}):null}),be=["target","content","preventClose","inheritContext","inputArgs"],me=0,oe="nocobase-embed-container",ee="nocobaseEmbedReplacing",xe=p.memo(p.forwardRef(function(Ae,Re){var Be=N(),ae=S()(Be,2),Me=ae[0],He=ae[1];return p.useImperativeHandle(Re,function(){return{patchElement:He}},[He]),(0,$.jsx)($.Fragment,{children:Me})}));function ve(){var Ae=p.useRef(null),Re=p.useRef(null),Be=function(He,Le){var Xe,ht=Le==null?void 0:Le.engine;me+=1;var St=p.createRef(),Ye,pt,bt=new Promise(function(nr){pt=nr}),en=function(kr){var Yr=kr.children;return p.useEffect(function(){var Nr;return(Nr=St.current)===null||Nr===void 0||Nr.setFooter(Yr),function(){var Dr;(Dr=St.current)===null||Dr===void 0||Dr.setFooter(null)}},[Yr]),null},Rn=function(kr){return p.useEffect(function(){var Yr;return(Yr=St.current)===null||Yr===void 0||Yr.setHeader(kr),function(){var Nr;(Nr=St.current)===null||Nr===void 0||Nr.setHeader(null)}},[kr]),null},Bn=He.target,hn=He.content,Lt=He.preventClose,Je=He.inheritContext,xt=Je===void 0?!0:Je,lt=He.inputArgs,_t=lt===void 0?{}:lt,Et=m()(He,be),Yt=Bn instanceof HTMLElement&&Bn.id===oe;if(Yt&&Re.current)try{Bn.dataset[ee]="1",Re.current.destroy()}finally{delete Bn.dataset[ee],Re.current=null}var Pn=new C.iT,Tn=(0,F.$)(Le.engine),gn=(0,K.GA)(ht,Tn);Pn.defineProperty("engine",{value:Tn}),Pn.addDelegate(Tn.context),xt?Pn.addDelegate(Le):Pn.addDelegate(Le.engine.context);var fn={type:"embed",inputArgs:_t,preventClose:!!He.preventClose,destroy:function(kr){var Yr,Nr,Dr,Wn,an;(Yr=He.onClose)===null||Yr===void 0||Yr.call(He),(Nr=pt)===null||Nr===void 0||Nr(kr),(Dr=St.current)===null||Dr===void 0||Dr.destroy(),(Wn=Ye)===null||Wn===void 0||Wn(),Yt&&(Re.current=null);var _n=Yt&&Bn instanceof HTMLElement&&((an=Bn.dataset)===null||an===void 0?void 0:an[ee])==="1";if(!_n){var rn,yn,At=gn==null?void 0:gn.emitter;(0,K.YB)(At),At==null||(rn=At.emit)===null||rn===void 0||rn.call(At,K.cn,{type:"embed",viewUid:fn==null||(yn=fn.inputArgs)===null||yn===void 0?void 0:yn.viewUid})}Tn.unlinkFromStack()},update:function(kr){var Yr;return(Yr=St.current)===null||Yr===void 0?void 0:Yr.update(kr)},close:function(kr,Yr){var Nr;if(!(Lt&&!Yr)){if(He.triggerByRouter&&(Nr=He.inputArgs)!==null&&Nr!==void 0&&(Nr=Nr.navigation)!==null&&Nr!==void 0&&Nr.back){He.inputArgs.navigation.back();return}fn.destroy(kr)}},Header:Rn,Footer:en,setFooter:function(kr){var Yr;(Yr=St.current)===null||Yr===void 0||Yr.setFooter(kr)},setHeader:function(kr){var Yr;(Yr=St.current)===null||Yr===void 0||Yr.setHeader(kr)},navigation:(Xe=He.inputArgs)===null||Xe===void 0?void 0:Xe.navigation,get record(){return(0,T.lP)(Le,Pn)}};Pn.defineProperty("view",{get:function(){return fn},resolveOnServer:(0,T.o3)(Pn,function(){return(0,T.lP)(Le,Pn)})}),Q(Pn,fn);var on=(0,J.observer)(function(){var nr,kr,Yr=p.useRef(!1),Nr=p.useMemo(function(){return typeof hn=="function"?hn(fn,Pn):hn},[]);return Pn.themeToken,p.useEffect(function(){var Dr;(Dr=He.onOpen)===null||Dr===void 0||Dr.call(He,fn,Pn)},[]),(nr=He.inputArgs)!==null&&nr!==void 0&&(nr=nr.hidden)!==null&&nr!==void 0&&nr.value&&!Yr.current?null:(Yr.current=!0,(0,$.jsx)(de,P()(P()({ref:St,hidden:(kr=He.inputArgs)===null||kr===void 0||(kr=kr.hidden)===null||kr===void 0?void 0:kr.value},Et),{},{onClose:function(){fn.close(He.result)},children:Nr})))},{displayName:"PageWithContext"}),Kt=(_t==null?void 0:_t.viewUid)||"page-".concat(me),vr=(0,$.jsx)(E.r6,{engine:Tn,children:(0,$.jsx)(j.Y5,{context:Pn,children:(0,$.jsx)(on,{})})},Kt);if(Bn&&Bn instanceof HTMLElement){var Gr;Ye=(Gr=Ae.current)===null||Gr===void 0?void 0:Gr.patchElement(ye.createPortal(vr,Bn,Kt))}else{var er;Ye=(er=Ae.current)===null||er===void 0?void 0:er.patchElement(vr)}return Yt&&(Re.current={destroy:fn.destroy}),Object.assign(bt,fn)},ae=p.useMemo(function(){return{open:Be}},[]);return[ae,(0,$.jsx)(xe,{ref:Ae},"page-holder")]}var he=e(55241),pe=["afterClose","content","placement","rect"],De=["target","placement","content"],se=0,Ce=p.forwardRef(function(Ae,Re){var Be,ae,Me,He,Le=Ae.afterClose,Xe=Ae.content,ht=Ae.placement,St=Ae.rect,Ye=m()(Ae,pe),pt=p.useState(!0),bt=S()(pt,2),en=bt[0],Rn=bt[1],Bn=p.useState(P()({content:Xe,placement:ht,rect:St},Ye)),hn=S()(Bn,2),Lt=hn[0],Je=hn[1];return p.useImperativeHandle(Re,function(){return{destroy:function(){return Rn(!1)},update:function(lt){return Je(function(_t){return P()(P()({},_t),lt)})},close:function(lt,_t){return Rn(!1)}}}),p.useEffect(function(){en||Le==null||Le()},[en,Le]),(0,$.jsx)(he.Z,P()(P()({arrow:!1,open:en,trigger:["click"],destroyTooltipOnHide:!0,content:Lt.content,placement:Lt.placement,getPopupContainer:function(){return document.querySelector("#nocobase-app-container")||document.body},onOpenChange:function(lt){!lt&&Lt.preventClose||(Rn(lt),lt||Le==null||Le())}},Lt),{},{children:(0,$.jsx)("span",{style:{position:"absolute",top:((Be=(ae=Lt.rect)===null||ae===void 0?void 0:ae.top)!==null&&Be!==void 0?Be:0)+window.scrollY,left:((Me=(He=Lt.rect)===null||He===void 0?void 0:He.left)!==null&&Me!==void 0?Me:0)+window.scrollX,width:0,height:0}})}))});function Se(){var Ae=p.useRef(null),Re=function(He){var Le,Xe,ht;se+=1;var St=He.target,Ye=He.placement,pt=Ye===void 0?"rightTop":Ye,bt=He.content,en=m()(He,De),Rn=p.createRef(),Bn=(Le=St==null||(Xe=St.getBoundingClientRect)===null||Xe===void 0?void 0:Xe.call(St))!==null&&Le!==void 0?Le:{top:0,left:0},hn,Lt,Je=new Promise(function(Yt){Lt=Yt}),xt={type:"popover",destroy:function(){var Pn;return(Pn=Rn.current)===null||Pn===void 0?void 0:Pn.destroy()},update:function(Pn){var Tn;return(Tn=Rn.current)===null||Tn===void 0?void 0:Tn.update(Pn)},close:function(Pn){var Tn,gn;(Tn=Lt)===null||Tn===void 0||Tn(Pn),(gn=Rn.current)===null||gn===void 0||gn.close(Pn)}},lt=typeof bt=="function"?bt(xt):bt,_t=typeof lt=="string"?(0,$.jsx)("div",{dangerouslySetInnerHTML:{__html:U.Z.sanitize(lt)}}):lt,Et=(0,$.jsx)(Ce,P()({ref:Rn,content:_t,placement:pt,rect:Bn,afterClose:function(){var Pn,Tn,gn;(Pn=hn)===null||Pn===void 0||Pn(),(Tn=He.onClose)===null||Tn===void 0||Tn.call(He),(gn=Lt)===null||gn===void 0||gn(He.result)}},en),"popover-".concat(se));return hn=(ht=Ae.current)===null||ht===void 0?void 0:ht.patchElement(Et),Object.assign(Je,xt)},Be=p.useMemo(function(){return{open:Re}},[]),ae=p.memo(p.forwardRef(function(Me,He){var Le=N(),Xe=S()(Le,2),ht=Xe[0],St=Xe[1];return p.useImperativeHandle(He,function(){return{patchElement:St}},[]),(0,$.jsx)($.Fragment,{children:ht})}));return[Be,(0,$.jsx)(ae,{ref:Ae},"popover-holder")]}var Te=e(12444),Ie=e.n(Te),Fe=e(72004),_e=e.n(Fe),we=e(9783),We=e.n(we),tt=e(90850);function ze(Ae){if(Ae==null)return"";if(Ae&&B()(Ae)==="object"&&!Array.isArray(Ae)){var Re=Object.entries(Ae).map(function(Be){var ae=S()(Be,2),Me=ae[0],He=ae[1];return"".concat(encodeURIComponent(String(Me)),"=").concat(encodeURIComponent(String(He)))});return encodeURIComponent(Re.join("&"))}return encodeURIComponent(String(Ae))}function je(Ae){if(!Ae||Ae.length===0)return"/admin";var Re=["admin"];return Ae.forEach(function(Be,ae){if(ae>0&&Re.push("view"),Re.push(Be.viewUid),Be.tabUid&&Re.push("tab",Be.tabUid),Be.filterByTk!=null){var Me=ze(Be.filterByTk);Me&&Re.push("filterbytk",Me)}Be.sourceId&&Re.push("sourceid",Be.sourceId)}),"/"+Re.join("/")}var Ve=function(){function Ae(Re,Be){Ie()(this,Ae),We()(this,"viewStack",void 0),We()(this,"ctx",void 0),We()(this,"viewParams",void 0),this.setViewStack(Be),this.ctx=Re,(0,tt.Ou)(this,{viewParams:tt.LO})}return _e()(Ae,[{key:"setViewStack",value:function(Be){this.viewStack=Object.freeze(I()(Be)),this.viewParams=this.viewStack[this.viewStack.length-1]||{}}},{key:"changeTo",value:function(Be){var ae=this,Me=this.viewStack.map(function(Le,Xe){return Xe===ae.viewStack.length-1?P()(P()({},Le),Be):P()({},Le)}),He=je(Me);this.ctx.router.navigate(He,{replace:!0})}},{key:"navigateTo",value:function(Be,ae){var Me=je([].concat(I()(this.viewStack),[Be])),He=Me;this.ctx.router.navigate(He,ae)}},{key:"back",value:function(){var Be=this.viewStack.slice(0,-1),ae=je(Be);this.ctx.router.navigate(ae,{replace:!0})}}]),Ae}()},84995:function(Zt,Oe,e){"use strict";e.d(Oe,{Bq:function(){return P},GA:function(){return A},YB:function(){return J},_L:function(){return U},b$:function(){return le},cn:function(){return S},tC:function(){return p},v6:function(){return ue}});var ue=Symbol.for("__NOCOBASE_VIEW_ACTIVATED_VERSION__"),S="view:activated",le="dataSource:dirty",P="__NOCOBASE_ENGINE_SCOPE__",p="view";function U(O){var R=Reflect.get(O,ue),w=typeof R=="number"?R:Number(R);return Number.isFinite(w)&&w>0?w:0}function J(O){var R=U(O);if(!Object.isExtensible(O))return R;var w=R+1;return Reflect.set(O,ue,w),w}function C(O){return Reflect.get(O,P)===p}function j(O){for(var R=O,w=0;R&&w++<50;){if(C(R))return R;R=R.previousEngine}}function A(O,R){if(O){var w=j(O);if(w)return w;var f=R==null?void 0:R.previousEngine;return j(f)||O}}},59112:function(Zt,Oe,e){"use strict";e.r(Oe),e.d(Oe,{APIClient:function(){return I},Auth:function(){return a},BaseStorage:function(){return y},LocalStorage:function(){return M},MemoryStorage:function(){return $},SessionStorage:function(){return b},getSubAppName:function(){return K}});var ue=e(15009),S=e.n(ue),le=e(97857),P=e.n(le),p=e(99289),U=e.n(p),J=e(13769),C=e.n(J),j=e(12444),A=e.n(j),O=e(72004),R=e.n(O),w=e(9783),f=e.n(w),B=e(87066),T=e(80129),g=e.n(T),a=function(){function E(F){A()(this,E),f()(this,"api",void 0),f()(this,"options",{locale:null,role:null,authenticator:null,token:null}),this.api=F,this.api.axios.interceptors.request.use(this.middleware.bind(this))}return R()(E,[{key:"storagePrefix",get:function(){return this.api.storagePrefix}},{key:"locale",get:function(){return this.getLocale()},set:function(L){this.setLocale(L)}},{key:"role",get:function(){return this.getRole()},set:function(L){this.setRole(L)}},{key:"token",get:function(){return this.getToken()},set:function(L){this.setToken(L)}},{key:"authenticator",get:function(){return this.getAuthenticator()},set:function(L){this.setAuthenticator(L)}},{key:"getOption",value:function(L){return this.api.storage.getItem(L)}},{key:"setOption",value:function(L,x){return this.options[L]=x,this.api.storage.setItem(L,x||"")}},{key:"getLocale",value:function(){return this.getOption("locale")}},{key:"setLocale",value:function(L){this.setOption("locale",L)}},{key:"getRole",value:function(){return this.getOption("role")}},{key:"setRole",value:function(L){this.setOption("role",L)}},{key:"getToken",value:function(){return this.getOption("token")}},{key:"setToken",value:function(L){this.setOption("token",L),this.api.app&&this.api.app.eventBus.dispatchEvent(new CustomEvent("auth:tokenChanged",{detail:{token:L,authenticator:this.authenticator}}))}},{key:"getAuthenticator",value:function(){return this.getOption("auth")}},{key:"setAuthenticator",value:function(L){this.setOption("auth",L)}},{key:"middleware",value:function(L){return this.locale&&(L.headers["X-Locale"]=this.locale),this.role&&(L.headers["X-Role"]=this.role),this.authenticator&&!L.headers["X-Authenticator"]&&(L.headers["X-Authenticator"]=this.authenticator),this.token&&(L.headers.Authorization="Bearer ".concat(this.token)),L}},{key:"signIn",value:function(){var F=U()(S()().mark(function x(v,W){var G,re,q;return S()().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return ye.next=2,this.api.request({method:"post",url:"auth:signIn",data:v,headers:{"X-Authenticator":W}});case 2:return re=ye.sent,q=re==null||(G=re.data)===null||G===void 0?void 0:G.data,this.setAuthenticator(W),this.setToken(q==null?void 0:q.token),ye.abrupt("return",re);case 7:case"end":return ye.stop()}},x,this)}));function L(x,v){return F.apply(this,arguments)}return L}()},{key:"signUp",value:function(){var F=U()(S()().mark(function x(v,W){return S()().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return re.next=2,this.api.request({method:"post",url:"auth:signUp",data:v,headers:{"X-Authenticator":W}});case 2:return re.abrupt("return",re.sent);case 3:case"end":return re.stop()}},x,this)}));function L(x,v){return F.apply(this,arguments)}return L}()},{key:"signOut",value:function(){var F=U()(S()().mark(function x(){var v;return S()().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return G.next=2,this.api.request({method:"post",url:"auth:signOut"});case 2:return v=G.sent,this.setToken(null),this.setRole(null),this.setAuthenticator(null),G.abrupt("return",v);case 7:case"end":return G.stop()}},x,this)}));function L(){return F.apply(this,arguments)}return L}()},{key:"lostPassword",value:function(){var F=U()(S()().mark(function x(v){var W,G,re;return S()().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return W=new URLSearchParams(window.location.search),G=Object.fromEntries(W.entries()),te.next=4,this.api.request({method:"post",url:"auth:lostPassword",data:P()(P()({},v),{},{baseURL:window.location.href.split("/forgot-password")[0]}),headers:{"X-Authenticator":G.name}});case 4:return re=te.sent,te.abrupt("return",re);case 6:case"end":return te.stop()}},x,this)}));function L(x){return F.apply(this,arguments)}return L}()},{key:"resetPassword",value:function(){var F=U()(S()().mark(function x(v){var W;return S()().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return re.next=2,this.api.request({method:"post",url:"auth:resetPassword",data:v});case 2:return W=re.sent,re.abrupt("return",W);case 4:case"end":return re.stop()}},x,this)}));function L(x){return F.apply(this,arguments)}return L}()},{key:"checkResetToken",value:function(){var F=U()(S()().mark(function x(v){var W;return S()().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return re.next=2,this.api.request({method:"post",url:"auth:checkResetToken",data:v});case 2:return W=re.sent,re.abrupt("return",W);case 4:case"end":return re.stop()}},x,this)}));function L(x){return F.apply(this,arguments)}return L}()}]),E}(),H=e(25098),z=e.n(H),X=e(31996),Q=e.n(X),ce=e(26037),m=e.n(ce),y=function(){function E(){A()(this,E),f()(this,"storagePrefix",void 0)}return R()(E,[{key:"toUpperCase",value:function(){for(var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",x=arguments.length,v=new Array(x>1?x-1:0),W=1;W<x;W++)v[W-1]=arguments[W];return L.toUpperCase()+v.map(function(G){return G.toUpperCase()}).join("_")}}]),E}(),$=function(E){Q()(L,E);var F=m()(L);function L(){var x;A()(this,L);for(var v=arguments.length,W=new Array(v),G=0;G<v;G++)W[G]=arguments[G];return x=F.call.apply(F,[this].concat(W)),f()(z()(x),"items",new Map),x}return R()(L,[{key:"clear",value:function(){this.items.clear()}},{key:"getItem",value:function(v){return this.items.get(v)}},{key:"setItem",value:function(v,W){return this.items.set(v,W)}},{key:"removeItem",value:function(v){return this.items.delete(v)}}]),L}(y),M=function(E){Q()(L,E);var F=m()(L);function L(x){var v,W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return A()(this,L),v=F.call(this),f()(z()(v),"items",void 0),v.storagePrefix=x,v.baseStoragePrefix=W,v.shareToken=G,v.items=window.localStorage,v}return R()(L,[{key:"clear",value:function(){return this.items.clear()}},{key:"getItem",value:function(v){return this.shareToken&&v==="token"&&this.baseStoragePrefix?this.items.getItem(this.toUpperCase(this.baseStoragePrefix,v)):this.items.getItem(this.toUpperCase(this.storagePrefix,v))}},{key:"setItem",value:function(v,W){return this.shareToken&&v==="token"&&this.baseStoragePrefix?this.items.setItem(this.toUpperCase(this.baseStoragePrefix,v),W):this.items.setItem(this.toUpperCase(this.storagePrefix,v),W)}},{key:"removeItem",value:function(v){return this.shareToken&&v==="token"&&this.baseStoragePrefix?this.items.removeItem(this.toUpperCase(this.baseStoragePrefix,v)):this.items.removeItem(this.toUpperCase(this.storagePrefix,v))}}]),L}(y),b=function(E){Q()(L,E);var F=m()(L);function L(x){var v,W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return A()(this,L),v=F.call(this,x,W,G),v.storagePrefix=x,v.baseStoragePrefix=W,v.shareToken=G,v.items=window.sessionStorage,v}return R()(L)}(M),u=["appName","authClass","storageType","storageClass","storagePrefix","shareToken"],V=["values","filter"],I=function(){function E(F){if(A()(this,E),f()(this,"options",void 0),f()(this,"axios",void 0),f()(this,"auth",void 0),f()(this,"storage",void 0),f()(this,"storagePrefix","NOCOBASE_"),f()(this,"baseStoragePrefix","NOCOBASE_"),f()(this,"shareToken",!1),this.options=F,typeof F=="function")this.axios=F;else{var L=F||{},x=L.appName,v=L.authClass,W=L.storageType,G=L.storageClass,re=L.storagePrefix,q=re===void 0?"NOCOBASE_":re,te=L.shareToken,ye=te===void 0?!1:te,Pe=C()(L,u);this.shareToken=ye,this.baseStoragePrefix=q,this.storagePrefix=x?"".concat(q).concat(x.toUpperCase(),"_"):q,this.axios=B.Z.create(Pe),this.initStorage(G,W),v&&(this.auth=new v(this))}this.storage||this.initStorage(),this.auth||(this.auth=new a(this)),this.interceptors()}return R()(E,[{key:"toErrMessages",value:function(L){var x,v,W,G,re;if(typeof document<"u"&&typeof(L==null||(x=L.response)===null||x===void 0?void 0:x.data)=="string"){var q,te=document.createElement("div");te.innerHTML=L==null||(q=L.response)===null||q===void 0?void 0:q.data;var ye=te.textContent||te.innerText;return ye.includes("Error occurred while trying")?(ye="The application may be starting up. Please try again later.",[{code:"APP_WARNING",message:ye}]):ye.includes("502 Bad Gateway")?(ye="The application may be starting up. Please try again later.",[{code:"APP_WARNING",message:ye}]):[{message:ye}]}if(L!=null&&(v=L.response)!==null&&v!==void 0&&(v=v.data)!==null&&v!==void 0&&v.error){var Pe;return[L==null||(Pe=L.response)===null||Pe===void 0||(Pe=Pe.data)===null||Pe===void 0?void 0:Pe.error]}return(L==null||(W=L.response)===null||W===void 0||(W=W.data)===null||W===void 0?void 0:W.errors)||(L==null||(G=L.response)===null||G===void 0||(G=G.data)===null||G===void 0?void 0:G.messages)||(L==null||(re=L.response)===null||re===void 0?void 0:re.error)||[{message:L.message||"Server error"}]}},{key:"getHeaders",value:function(){var L={};return this.auth.locale&&(L["X-Locale"]=this.auth.locale),this.auth.role&&(L["X-Role"]=this.auth.role),this.auth.authenticator&&(L["X-Authenticator"]=this.auth.authenticator),this.auth.token&&(L.Authorization="Bearer ".concat(this.auth.token)),L}},{key:"createStorage",value:function(L){return L==="localStorage"&&typeof localStorage<"u"?new M(this.storagePrefix,this.baseStoragePrefix,this.shareToken):L==="sessionStorage"&&typeof sessionStorage<"u"?new b(this.storagePrefix,this.baseStoragePrefix,this.shareToken):new $}},{key:"initStorage",value:function(L){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"localStorage";if(L){this.storage=new L(this);return}this.storage=this.createStorage(x)}},{key:"interceptors",value:function(){this.axios.interceptors.request.use(function(L){return L.paramsSerializer=function(x){return g().stringify(x,{strictNullHandling:!0,arrayFormat:"brackets"})},L})}},{key:"request",value:function(L){var x=L,v=x.resource,W=x.resourceOf,G=x.action,re=x.params,q=x.headers;return v?this.resource(v,W,q)[G](re):this.axios.request(L)}},{key:"resource",value:function(L,x,v,W){var G=this,re={},q={get:function(ye,Pe){if(!W){var Ee=L.split(".").join("/".concat(encodeURIComponent(x)||"_","/"));Ee+=":".concat(Pe.toString());var de={url:Ee};return["get","list"].includes(Pe)?de.method="get":de.method="post",function(){var be=U()(S()().mark(function me(oe,ee){var xe,ve,he,pe;return S()().wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return xe=oe||{},ve=xe.values,he=xe.filter,pe=C()(xe,V),de.params=pe,he&&(typeof he=="string"?de.params.filter=he:(he["*"]&&delete he["*"],de.params.filter=JSON.stringify(he))),de.method!=="get"&&(de.data=ve||{}),se.next=6,G.request(P()(P()(P()({},de),ee),{},{headers:v}));case 6:return se.abrupt("return",se.sent);case 7:case"end":return se.stop()}},me)}));return function(me,oe){return be.apply(this,arguments)}}()}}};return new Proxy(re,q)}}]),E}(),N=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"/";if(!(typeof window>"u")&&window.location.pathname){var L="".concat(F,"apps/");if(window.location.pathname.startsWith(L)){var x=window.location.pathname.substring(L.length),v=x.split("/",1);return v[0]||""}}},K=N},80770:function(Zt,Oe,e){"use strict";e.d(Oe,{_6:function(){return U},gn:function(){return J},Bb:function(){return le}});var ue=e(96695),S=e.n(ue),le=function C(j,A,O){if(!j)return O;for(var R=A.split("."),w=[],f=j,B=!1,T=0;T<R.length;T++){var g,a=R[T];if(Array.isArray(f)){B=!0;var H=S()(f),z;try{for(H.s();!(z=H.n()).done;){var X=z.value,Q=C(X,R.slice(T).join("."),O);w=w.concat(Q)}}catch(ce){H.e(ce)}finally{H.f()}break}if(((g=f)===null||g===void 0?void 0:g[a])===void 0)break;f=f[a],T===R.length-1&&w.push(f)}return w=w.filter(function(ce){return ce!==void 0}),w.length===0?O:B?w.filter(function(ce){return ce!==null}):w[0]},P=e(52677),p=e.n(P);function U(C){var j=new Set,A=function O(R){if(typeof R=="string")for(var w=/\{\{\s*([^}]+?)\s*\}\}/g,f;(f=w.exec(R))!==null;){for(var B=f[1],T=/ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*)/g,g=void 0;(g=T.exec(B))!==null;)j.add(g[1]);for(var a=/ctx\[\s*(["'])\s*([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\1\s*\]/g,H=void 0;(H=a.exec(B))!==null;)j.add(H[2])}else Array.isArray(R)?R.forEach(O):R&&p()(R)==="object"&&Object.values(R).forEach(O)};return A(C),j}function J(C){var j={},A=function O(R){if(typeof R=="string")for(var w=/\{\{\s*([^}]+?)\s*\}\}/g,f;(f=w.exec(R))!==null;){for(var B=f[1],T=/ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*)([^\s)]*)/g,g=void 0;(g=T.exec(B))!==null;){var a=g[1],H=g[2]||"";if(j[a]=j[a]||[],H.startsWith("."))j[a].push(H.slice(1));else if(H.startsWith("[")){var z=H.match(/^\[\s*(["'])\s*([^'"\]]+)\s*\1\s*\](.*)$/);if(z){var X=z[2],Q=z[3]||"";j[a].push("".concat(X).concat(Q))}else{var ce=H.match(/^\[(\d+)\](.*)$/);if(ce){var m=ce[1],y=ce[2]||"";j[a].push("[".concat(m,"]").concat(y))}}}else H.startsWith("(")&&(j[a].length||j[a].push(""))}for(var $=/ctx\[\s*(["'])\s*([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\1\s*\]([^\s)]*)/g,M=void 0;(M=$.exec(B))!==null;){var b=M[2],u=M[3]||"";if(j[b]=j[b]||[],u.startsWith("."))j[b].push(u.slice(1));else if(u.startsWith("[")){var V=u.match(/^\[\s*(["'])\s*([^'"\]]+)\s*\1\s*\](.*)$/);if(V){var I=V[2],N=V[3]||"";j[b].push("".concat(I).concat(N))}else{var K=u.match(/^\[(\d+)\](.*)$/);if(K){var E=K[1],F=K[2]||"";j[b].push("[".concat(E,"]").concat(F))}}}else u.startsWith("(")&&(j[b].length||j[b].push(""))}}else Array.isArray(R)?R.forEach(O):R&&p()(R)==="object"&&Object.values(R).forEach(O)};return A(C),j}},10110:function(Zt,Oe,e){"use strict";e.r(Oe),e.d(Oe,{BASE_BLOCKED_IDENTIFIERS:function(){return st},CollectionsGraph:function(){return be},Handlebars:function(){return on()},Registry:function(){return Nt},dayjs:function(){return P()},error:function(){return _n},evaluateConditions:function(){return ze},extractUsedVariableNames:function(){return $r},extractUsedVariablePaths:function(){return Zr},flatten:function(){return mn},forEach:function(){return Pn},getDateTimeFormat:function(){return Et},getDateVars:function(){return Tt},getDayRange:function(){return Xt},getDayRangeByParams:function(){return G},getDefaultFormat:function(){return St},getFormatFromDateStr:function(){return Yt},getLiquidContext:function(){return $o},getOffsetRangeByParams:function(){return L},getPickerFormat:function(){return _t},getValuesByPath:function(){return Tn},hasEmptyValue:function(){return Be},isArray:function(){return Ve},isEmpty:function(){return Ae},isEmptyFilter:function(){return Xe},isPlainObject:function(){return Re},isPortalInBody:function(){return Hn},isString:function(){return je},isURL:function(){return Ar},isValidFilter:function(){return er},lockdownSes:function(){return Ft},lodash:function(){return S()},merge:function(){return rt},moment2str:function(){return Lt},nextTick:function(){return ae},offsetFromString:function(){return Je},parse:function(){return Nr},parseFilter:function(){return Qn},parseHTML:function(){return Er},parseLiquidContext:function(){return zo},parseSQLBindParams:function(){return fa},removeInvalidFilterItems:function(){return we},removeNullCondition:function(){return ht},showToast:function(){return It},sleep:function(){return Le},sortTree:function(){return He},splitPathToTwoParts:function(){return kt},str2moment:function(){return Rn},toFixedByStep:function(){return Qt},toGmt:function(){return Ye},toLocal:function(){return pt},toUnit:function(){return Un},transformFilter:function(){return _e},transformLiquidContext:function(){return jo},transformMultiColumnToSingleColumn:function(){return ir},transformSQL:function(){return Ho},treeFind:function(){return Me},tval:function(){return Wt},uid:function(){return fr},unflatten:function(){return bn},utc2unit:function(){return cr}});var ue=e(96486),S=e.n(ue),le=e(27484),P=e.n(le),p=e(28734),U=e.n(p),J=e(10285),C=e.n(J),j=e(1646),A=e.n(j),O=e(66607),R=e.n(O),w=e(79212),f=e.n(w),B=e(37412),T=e.n(B),g=e(59542),a=e.n(g),H=e(96036),z=e.n(H),X=e(96671),Q=e.n(X),ce=e(29387),m=e.n(ce),y=e(70178),$=e.n(y),M=e(55183),b=e.n(M),u=e(172),V=e.n(u),I=e(72540),N=e.n(I);P().extend(N()),P().extend(z()),P().extend(m()),P().extend($()),P().extend(Q()),P().extend(a()),P().extend(R()),P().extend(f()),P().extend(T()),P().extend(b()),P().extend(V()),P().extend(C()),P().extend(U()),P().extend(A());var K=e(5574),E=e.n(K),F=function(jt){if(!jt)return P()();if(/^[+-]\d{2}:\d{2}$/.test(jt)){var or=jt.match(/([+-])(\d{2}):(\d{2})/).slice(1),Jr=E()(or,3),to=Jr[0],vo=Jr[1],Lo=Jr[2],na=(parseInt(vo)*60+parseInt(Lo))*(to==="+"?1:-1);return P()().utcOffset(na)}return P()().tz(jt)},L=function(jt){var or=jt.type,Jr=jt.unit,to=Jr===void 0?"day":Jr,vo=jt.number,Lo=vo===void 0?1:vo,na=jt.timezone,Ma=F(na),Ua=to==="week"?"isoWeek":to,Ia,$a;if(or==="past"){var Xa=Ma.startOf(Ua);Ia=Xa.subtract(Lo,to).startOf(Ua),$a=Xa.subtract(1,to).endOf(Ua)}else if(or==="next"){var si=Ma.startOf(Ua);Ia=si.add(1,to).startOf(Ua),$a=Ia.add(Lo-1,to).endOf(Ua)}else throw new Error("Unsupported type: ".concat(or));return[Ia.format("YYYY-MM-DD HH:mm:ss"),$a.format("YYYY-MM-DD HH:mm:ss")]},x=function(jt,or,Jr){var to=or==="isoWeek"?"week":or;return F(Jr).add(jt,to).startOf(or)},v=function(jt,or,Jr){var to=or==="isoWeek"?"week":or;return F(Jr).add(jt,to).endOf(or)},W={today:function(jt){return[x(0,"day",jt==null?void 0:jt.timezone),v(0,"day",jt==null?void 0:jt.timezone)]},yesterday:function(jt){return[x(-1,"day",jt==null?void 0:jt.timezone),v(-1,"day",jt==null?void 0:jt.timezone)]},tomorrow:function(jt){return[x(1,"day",jt==null?void 0:jt.timezone),v(1,"day",jt==null?void 0:jt.timezone)]},thisWeek:function(jt){return[x(0,"isoWeek",jt==null?void 0:jt.timezone),v(0,"isoWeek",jt==null?void 0:jt.timezone)]},lastWeek:function(jt){return[x(-1,"isoWeek",jt==null?void 0:jt.timezone),v(-1,"isoWeek",jt==null?void 0:jt.timezone)]},nextWeek:function(jt){return[x(1,"isoWeek",jt==null?void 0:jt.timezone),v(1,"isoWeek",jt==null?void 0:jt.timezone)]},thisMonth:function(jt){return[x(0,"month",jt==null?void 0:jt.timezone),v(0,"month",jt==null?void 0:jt.timezone)]},lastMonth:function(jt){return[x(-1,"month",jt==null?void 0:jt.timezone),v(-1,"month",jt==null?void 0:jt.timezone)]},nextMonth:function(jt){return[x(1,"month",jt==null?void 0:jt.timezone),v(1,"month",jt==null?void 0:jt.timezone)]},thisQuarter:function(jt){return[x(0,"quarter",jt==null?void 0:jt.timezone),v(0,"quarter",jt==null?void 0:jt.timezone)]},lastQuarter:function(jt){return[x(-1,"quarter",jt==null?void 0:jt.timezone),v(-1,"quarter",jt==null?void 0:jt.timezone)]},nextQuarter:function(jt){return[x(1,"quarter",jt==null?void 0:jt.timezone),v(1,"quarter",jt==null?void 0:jt.timezone)]},thisYear:function(jt){return[x(0,"year",jt==null?void 0:jt.timezone),v(0,"year",jt==null?void 0:jt.timezone)]},lastYear:function(jt){return[x(-1,"year",jt==null?void 0:jt.timezone),v(-1,"year",jt==null?void 0:jt.timezone)]},nextYear:function(jt){return[x(1,"year",jt==null?void 0:jt.timezone),v(1,"year",jt==null?void 0:jt.timezone)]}},G=function(jt){if(jt.type==="past"||jt.type==="next")return L(jt);var or=W[jt.type];if(!or)throw new Error("Unsupported type: ".concat(jt.type));var Jr=or(jt),to=E()(Jr,2),vo=to[0],Lo=to[1];return[vo.format("YYYY-MM-DD HH:mm:ss"),Lo.format("YYYY-MM-DD HH:mm:ss")]},re=e(96695),q=e.n(re),te=e(12444),ye=e.n(te),Pe=e(72004),Ee=e.n(Pe),de=e(28282),be=function(){function rr(){ye()(this,rr)}return Ee()(rr,null,[{key:"graphlib",value:function(){return de}},{key:"connectedNodes",value:function(or){var Jr=(0,ue.castArray)(or.nodes),to=(0,ue.castArray)(or.excludes||[]),vo=rr.build(or),Lo=new Set,na=q()(Jr),Ma;try{for(na.s();!(Ma=na.n()).done;){var Ua=Ma.value,Ia=de.alg.preorder(vo,Ua),$a=q()(Ia),Xa;try{for($a.s();!(Xa=$a.n()).done;){var si=Xa.value;to.includes(si)||Lo.add(si)}}catch(yi){$a.e(yi)}finally{$a.f()}}}catch(yi){na.e(yi)}finally{na.f()}return Array.from(Lo)}},{key:"preOrder",value:function(or){return rr.graphlib().alg.preorder(rr.build(or),or.node)}},{key:"build",value:function(or){var Jr=or.collections,to=(or==null?void 0:or.direction)||"forward",vo=to==="forward",Lo=new de.Graph,na=q()(Jr),Ma;try{for(na.s();!(Ma=na.n()).done;){var Ua=Ma.value;Lo.setNode(Ua.name)}}catch(La){na.e(La)}finally{na.f()}var Ia=q()(Jr),$a;try{for(Ia.s();!($a=Ia.n()).done;){var Xa=$a.value,si=Xa.inherits||[],yi=q()(si),Ha;try{for(yi.s();!(Ha=yi.n()).done;){var Di=Ha.value;vo?Lo.setEdge(Xa.name,Di):Lo.setEdge(Di,Xa.name)}}catch(La){yi.e(La)}finally{yi.f()}var Ga=q()(Xa.fields||[]),ka;try{for(Ga.s();!(ka=Ga.n()).done;){var Jo=ka.value;if((Jo.type==="hasMany"||Jo.type==="belongsTo"||Jo.type==="hasOne")&&(vo?Lo.setEdge(Xa.name,Jo.target):Lo.setEdge(Jo.target,Xa.name)),Jo.type==="belongsToMany"){var Ya=Jo.through;vo?(Lo.setEdge(Xa.name,Ya),Lo.setEdge(Ya,Jo.target)):(Lo.setEdge(Jo.target,Ya),Lo.setEdge(Ya,Xa.name))}}}catch(La){Ga.e(La)}finally{Ga.f()}}}catch(La){Ia.e(La)}finally{Ia.f()}return Lo}}]),rr}(),me=e(9783),oe=e.n(me),ee=e(97857),xe=e.n(ee),ve=e(19632),he=e.n(ve),pe=e(34444),De=e.n(pe),se=e(52677),Ce=e.n(se);function Se(rr){return"path"in rr&&"operator"in rr}function Te(rr){return"logic"in rr&&"items"in rr}function Ie(rr){var jt=rr.path,or=rr.operator,Jr=rr.value;return oe()({},jt,oe()({},or,Jr))}function Fe(rr){var jt=rr.logic,or=rr.items,Jr=or.map(function(to){if(Se(to))return Ie(to);if(Te(to))return Fe(to);throw new Error("Invalid filter item type")});return oe()({},jt,Jr)}function _e(rr){if(!rr||Ce()(rr)!=="object")throw new Error("Invalid filter: filter must be an object");if(!Te(rr))throw new Error("Invalid filter: filter must have logic and items properties");if(!Array.isArray(rr.items))throw new Error("Invalid filter: items must be an array");return ht(Fe(rr))}function we(rr){if(!rr||Ce()(rr)!=="object")throw new Error("Invalid filter: filter must be an object");if(!Te(rr))throw new Error("Invalid filter: filter must have logic and items properties");if(!Array.isArray(rr.items))throw new Error("Invalid filter: items must be an array");return rr.items=rr.items.filter(function(jt){return Se(jt)?!!jt.operator:Te(jt)?we(jt):!1}),xe()({},rr)}function We(rr,jt){var or=rr.path,Jr=rr.operator,to=rr.value;return jt(or,Jr,to)}function tt(rr,jt){var or=rr.logic,Jr=rr.items;if(!Jr||Jr.length===0)return!0;var to=Jr.map(function(vo){if(Se(vo))return We(vo,jt);if(Te(vo))return tt(vo,jt);throw new Error("Invalid filter item type")});if(or==="$and")return to.every(function(vo){return vo===!0});if(or==="$or")return to.some(function(vo){return vo===!0});throw new Error("Unsupported logic operator: ".concat(or))}function ze(rr,jt){if(!rr||Ce()(rr)!=="object")throw new Error("Invalid conditions: conditions must be an object");if(!Te(rr))throw new Error("Invalid conditions: conditions must have logic and items properties");if(!Array.isArray(rr.items))throw new Error("Invalid conditions: items must be an array");if(typeof jt!="function")throw new Error("Invalid evaluator: evaluator must be a function");return tt(rr,jt)}var je=function(jt){return typeof jt=="string"},Ve=function(jt){return Array.isArray(jt)},Ae=function(jt){return Re(jt)?Object.keys(jt).length===0:Array.isArray(jt)?jt.length===0:!1},Re=function(jt){if(Object.prototype.toString.call(jt)!=="[object Object]")return!1;var or=Object.getPrototypeOf(jt);return or===null||or===Object.prototype},Be=function rr(jt){var or=!0;for(var Jr in jt){if(or=!1,Ve(jt[Jr])&&jt[Jr].length===0||!jt[Jr])return!0;if(Re(jt[Jr])||Ve(jt[Jr]))return rr(jt[Jr])}return or},ae=function(jt){setTimeout(jt)};function Me(rr,jt){var or=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(rr){var Jr=or.childrenKey,to=Jr===void 0?"children":Jr,vo=Array.isArray(rr)?he()(rr):[rr],Lo=q()(vo),na;try{for(Lo.s();!(na=Lo.n()).done;){var Ma=na.value;if(jt(Ma))return Ma;var Ua=typeof to=="function"?to(Ma):Ma[to];if(Array.isArray(Ua)&&Ua.length>0){var Ia=Me(Ua,jt,or);if(Ia!==void 0)return Ia}}}catch($a){Lo.e($a)}finally{Lo.f()}}}function He(rr,jt){var or=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"children",Jr=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;if(!rr||!Array.isArray(rr)||rr.length===0)return rr;var to=S().orderBy(rr,jt,Jr?"asc":"desc");return to.map(function(vo){return vo[or]&&vo[or].length>0?xe()(xe()({},vo),{},oe()({},or,He(vo[or],jt,or,Jr))):vo})}function Le(rr){return new Promise(function(jt){setTimeout(jt,rr)})}function Xe(rr){return!!(!rr||"$and"in rr&&S().isEmpty(rr.$and)||"$or"in rr&&S().isEmpty(rr.$or))}var ht=function(jt){var or=arguments.length>1&&arguments[1]!==void 0?arguments[1]:De(),Jr=or(jt||{}),to={};for(var vo in Jr){var Lo=Jr[vo];Lo!=null&&!Ae(Lo)&&Lo!==""&&(to[vo]=Lo)}var na=or.unflatten(to);for(var Ma in na)Array.isArray(na[Ma])&&(na[Ma]=na[Ma].filter(function(Ua){return Ua!=null}));return S().isEmpty(na)?void 0:na},St=function(jt){return jt.format?jt.format:jt.dateFormat?jt.showTime?"".concat(jt.dateFormat," ").concat(jt.timeFormat||"HH:mm:ss"):jt.dateFormat:jt.picker==="month"?"YYYY-MM":jt.picker==="quarter"?"YYYY-\\QQ":jt.picker==="year"?"YYYY":jt.picker==="week"?"YYYY[W]W":jt.showTime?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"},Ye=function(jt){return!jt||!P().isDayjs(jt)?jt:"".concat(jt.format("YYYY-MM-DD"),"T").concat(jt.format("HH:mm:ss.SSS"),"Z")},pt=function(jt){if(!jt)return jt;if(Array.isArray(jt))return jt.map(function(or){return or.startOf("second").toISOString()});if(P().isDayjs(jt))return jt.startOf("second").toISOString()},bt=function(jt){try{var or=parseInt(jt.slice(0,4)),Jr=parseInt(jt.slice(-1));return P()().quarter(Jr).year(or)}catch{return null}},en=function(jt,or){if(jt){var Jr=or.utcOffset,to=or.gmt,vo=or.picker,Lo=or.utc,na=Lo===void 0?!0:Lo,Ma=or.dateOnly;if(P()(jt).isValid()){if(Ma){var Ua=P()(jt);if(!Ua.isValid())return jt;var Ia=Ua.format("YYYY-MM-DD");return P().utc(Ia,"YYYY-MM-DD")}return na?P().isDayjs(jt)?Jr?jt.utcOffset(Je(Jr)):jt:to?P()(jt).utcOffset(0):Jr?P()(jt).utcOffset(Je(Jr)):P()(jt):P()(jt)}else return bt(jt)}},Rn=function(jt){var or=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Array.isArray(jt)?jt.map(function(Jr){return en(Jr,or)}):jt&&en(jt,or)},Bn=function(jt,or){return or==="year"?jt.format("YYYY")+"-01-01T00:00:00.000Z":or==="month"||or==="quarter"?jt.format("YYYY-MM")+"-01T00:00:00.000Z":jt.format("YYYY-MM-DD")+"T00:00:00.000Z"},hn=function(jt,or){if(!jt)return jt;if(Array.isArray(jt))return jt.map(function(Jr){return Bn(Jr,or)});if(P().isDayjs(jt))return Bn(jt,or)},Lt=function(jt){var or=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Jr=or.showTime,to=or.gmt,vo=or.picker;return jt&&(Jr?to?Ye(jt):pt(jt):hn(jt,vo))};function Je(rr){if(!S().isString(rr))return rr;var jt=/([+-]|\d\d)/gi,or=/Z|[+-]\d\d(?::?\d\d)?/gi,Jr=/[+-]?\d+(\.\d{1,3})?/,to=(rr||"").match(or);if(to===null&&(to=(rr||"").match(Jr)),to===null)return null;var vo=to[to.length-1]||[],Lo=(vo+"").match(jt)||["-",0,0],na=+(Number(Lo[1])*60)+xt(Lo[2]);return na===0?0:Lo[0]==="+"?na:-na}function xt(rr){var jt=+rr,or=0;return jt!==0&&isFinite(jt)&&(or=lt(jt)),or}function lt(rr){return rr<0?Math.ceil(rr)||0:Math.floor(rr)}var _t=function(jt){switch(jt){case"week":return"YYYY[W]W";case"month":return"YYYY-MM";case"quarter":return"YYYY[Q]Q";case"year":return"YYYY";default:return"YYYY-MM-DD"}},Et=function(jt,or,Jr,to){return jt==="date"&&Jr?"".concat(or," ").concat(to||"HH:mm:ss"):or};function Yt(rr){return/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(rr)?"YYYY-MM-DD HH:mm:ss":/^\d{4}-\d{2}-\d{2}$/.test(rr)?"YYYY-MM-DD":/^\d{4}-\d{2}$/.test(rr)?"YYYY-MM":/^\d{4}$/.test(rr)?"YYYY":/^\d{4}Q[1-4]$/.test(rr)?"YYYY[Q]Q":/^\d{4}-\d{2}-\d{2}T/.test(rr)?"YYYY-MM-DDTHH:mm:ss.SSSZ":null}var Pn=function(jt,or){Array.isArray(jt)?jt.forEach(or):Object.keys(jt).forEach(function(Jr){or(jt[Jr],Jr)})},Tn=function rr(jt,or,Jr){if(!jt)return Jr;for(var to=or.split("."),vo=[],Lo=jt,na=!1,Ma=0;Ma<to.length;Ma++){var Ua,Ia=to[Ma];if(Array.isArray(Lo)){na=!0;var $a=q()(Lo),Xa;try{for($a.s();!(Xa=$a.n()).done;){var si=Xa.value,yi=rr(si,to.slice(Ma).join("."),Jr);vo=vo.concat(yi)}}catch(Ha){$a.e(Ha)}finally{$a.f()}break}if(((Ua=Lo)===null||Ua===void 0?void 0:Ua[Ia])===void 0)break;Lo=Lo[Ia],Ma===to.length-1&&vo.push(Lo)}return vo=vo.filter(function(Ha){return Ha!==void 0}),vo.length===0?Jr:na?vo.filter(function(Ha){return Ha!==null}):vo[0]},gn=e(8575),fn=e(96750),on=e.n(fn),Kt=e(11700),vr=e.n(Kt),Gr=vr()();Object.keys(Gr).forEach(function(rr){on().registerHelper(rr,Gr[rr])}),on().registerHelper("json",function(rr){return JSON.stringify(rr)}),on().registerHelper("urlParse",function(rr){try{return JSON.stringify(gn.parse(rr))}catch{return"Invalid URL: ".concat(rr)}}),on().registerHelper("dateFormat",function(rr,jt,or){return typeof or=="string"?P()(rr).tz(or).format(jt):P()(rr).format(jt)}),on().registerHelper("isNull",function(rr){return S().isNull(rr)});function er(rr){if(!rr)return!1;var jt=[rr.$and,rr.$or].filter(Boolean);return jt.length==0?Object.keys(rr).length>0:jt.some(function(or){if(Array.isArray(or))return or.some(er);if(or.$and||or.$or)return er(or);var Jr=Object.keys(or),to=E()(Jr,1),vo=to[0];if(!vo||!or[vo])return!1;var Lo=Object.keys(or[vo]),na=E()(Lo,1),Ma=na[0];return!(!Ma||typeof or[vo][Ma]>"u")})}function nr(rr){var jt=Ce()(rr);return Array.isArray(rr)?jt="array":rr instanceof Date?jt="date":rr===null&&(jt="null"),jt}function kr(rr){var jt,or=rr.substr(2,rr.length-4).trim(),Jr=or.indexOf(":");return Jr!==-1?jt={key:or.substr(0,Jr),defaultValue:or.substr(Jr+1)}:jt={key:or},jt}function Yr(rr,jt){return rr.parameters=Array.from(new Map(jt.map(function(or){return[or.key,or]})).values()),rr}function Nr(rr){switch(nr(rr)){case"string":return Dr(rr);case"object":return Wn(rr);case"array":return an(rr);default:return Yr(function(){return rr},[])}}var Dr=function(){var rr=/{{(\w|:|[\s-+.,@/()?=*_$])+}}/g;return function(jt){var or=[],Jr=function(Lo){return jt},to=jt.match(rr);return to&&(or=to.map(kr),Jr=function(Lo){return Lo=Lo||{},to.reduce(function(na,Ma,Ua){var Ia=or[Ua],$a=(0,ue.get)(Lo,Ia.key);return typeof $a>"u"&&($a=Ia.defaultValue),typeof $a=="function"&&($a=$a()),to.length===1&&jt.startsWith("{{")&&jt.endsWith("}}")?$a:($a instanceof Date&&($a=$a.toISOString()),na.replace(Ma,$a??""))},jt)}),Yr(Jr,or)}}();function Wn(rr){var jt=Object.keys(rr).map(function(to){return{keyTemplate:Dr(to),valueTemplate:Nr(rr[to])}}),or=jt.reduce(function(to,vo){return to.concat(vo.valueTemplate.parameters,vo.keyTemplate.parameters)},[]),Jr=function(vo){return jt.reduce(function(Lo,na){return Lo[na.keyTemplate(vo)]=na.valueTemplate(vo),Lo},{})};return Yr(Jr,or)}function an(rr){var jt=rr.map(Nr),or=jt.reduce(function(to,vo){return to.concat(vo.parameters)},[]),Jr=function(vo){return jt.map(function(Lo){return Lo(vo)})};return Yr(Jr,or)}var _n=function(jt){for(var or,Jr=arguments.length,to=new Array(Jr>1?Jr-1:0),vo=1;vo<Jr;vo++)to[vo-1]=arguments[vo];(or=console).error.apply(or,[jt].concat(to))},rn=e(9996),yn=e.n(rn),At=function(jt,or,Jr){return or};function rt(rr,jt,or){return yn()(rr,jt,xe()({arrayMerge:At},or))}var Ot=e(26855),It=function(jt){var or=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"info",Jr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:5e3;Ot.ZP[or]({message:jt,duration:Jr})},Mt=e(55252),Ut=e(8150);function Qt(rr,jt){if(typeof rr>"u"||rr===null||rr==="")return"";var or=(0,Mt.NX)(jt);return(0,Ut.FH)(String(rr),".",or)}var Nn=e(15009),Mn=e.n(Nn),wn=e(99289),Kn=e.n(wn),gr=e(36968),Ir=e.n(gr),_r=e(30381),Sr=e.n(_r),gt=/^\s*\{\{([\s\S]*)\}\}\s*$/;function dt(rr){return rr&&rr.constructor&&typeof rr.constructor.isBuffer=="function"&&rr.constructor.isBuffer(rr)}function Ht(rr){return rr}function mn(rr,jt){jt=jt||{};var or=jt.delimiter||".",Jr=jt.maxDepth,to=jt.transformKey||Ht,vo=jt.transformValue||Ht,Lo={};function na(Ma,Ua,Ia){Ia=Ia||1,S().isObjectLike(Ma)&&Object.keys(Ma).forEach(function($a){var Xa,si,yi=Ma[$a],Ha=jt.safe&&Array.isArray(yi),Di=Object.prototype.toString.call(yi),Ga=dt(yi),ka=Di==="[object Object]"||Di==="[object Array]",Jo=Ua?Ua+or+to($a):to($a);if((Xa=(si=jt).breakOn)!==null&&Xa!==void 0&&Xa.call(si,{key:$a,value:yi,path:Jo})){Lo[Jo]=vo(yi,Jo);return}if(!Ha&&!Ga&&ka&&Object.keys(yi).length&&(!jt.maxDepth||Ia<Jr))return na(yi,Jo,Ia+1);Lo[Jo]=vo(yi,Jo)})}return na(rr),Lo}function bn(rr){for(var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},or={},Jr=jt.transformValue||Ht,to=0,vo=Object.keys(rr);to<vo.length;to++){var Lo=vo[to];Ir()(or,Lo,Jr(rr[Lo],Lo))}return or}var Cn=function(jt){var or=jt.split(".").pop()||"";return or.startsWith("$")||(or=""),{operator:or}},Sn=function(jt){return["$dateOn","$dateNotOn","$dateBefore","$dateAfter","$dateNotBefore","$dateNotAfter","$dateBetween"].includes(jt)};function sr(rr){return rr instanceof Date||Object.prototype.toString.call(rr)==="[object Date]"}var cn=function(jt,or){if(!jt)return null;if(jt.type&&(jt=G(xe()(xe()({},jt),{},{timezone:or}))),Array.isArray(jt))return jt.length===2?jt.push("[]",or):jt.length===3&&jt.push(or),jt;if(typeof jt=="string")return!or||/(\+|-)\d\d:\d\d$/.test(jt)?jt:jt+or;if(sr(jt))return jt.toISOString()},Qn=function(){var rr=Kn()(Mn()().mark(function jt(or){var Jr,to,vo,Lo,na,Ma,Ua,Ia,$a=arguments;return Mn()().wrap(function(si){for(;;)switch(si.prev=si.next){case 0:if(Jr=$a.length>1&&$a[1]!==void 0?$a[1]:{},to=new Set,vo=Jr.vars||{},Lo=Jr.timezone,na=Jr.now,Ma=Jr.getField,Ua=mn(or,{breakOn:function(Ha){var Di=Ha.key;return Di.startsWith("$")&&Di!=="$and"&&Di!=="$or"},transformValue:function(Ha){if(typeof Ha!="string")return Ha;var Di=gt.exec(Ha);if(Di){var Ga=Di[1].trim();Ga.startsWith("$user")&&to.add(Ga.substring(6))}return Ha}}),!(to.size>0)){si.next=12;break}return si.next=10,vo.$user({fields:he()(to.values())});case 10:Ia=si.sent,Object.assign(vo,{$user:Ia});case 12:return si.abrupt("return",bn(Ua,{transformValue:function(Ha,Di){var Ga=Cn(Di),ka=Ga.operator;if(typeof Ha=="string"){var Jo=gt.exec(Ha);if(Jo){var Ya=Jo[1].trim(),La=Tn(vo,Ya,null),Kr=Ma==null?void 0:Ma(Di);Ha=typeof La=="function"?La==null?void 0:La({field:Kr,operator:ka,timezone:Lo,now:na}):La}}if(Sn(ka)){var wt=Ma==null?void 0:Ma(Di);return(wt==null?void 0:wt.constructor.name)==="DateOnlyField"||(wt==null?void 0:wt.constructor.name)==="DatetimeNoTzField"?Ha.type?G(xe()(xe()({},Ha),{},{timezone:(wt==null?void 0:wt.timezone)||Lo})):Ha:cn(Ha,(wt==null?void 0:wt.timezone)||Lo)}return Ha}}));case 13:case"end":return si.stop()}},jt)}));return function(or){return rr.apply(this,arguments)}}();function Xt(rr){var jt=rr.now,or=rr.timezone,Jr=or===void 0?"+00:00":or,to=rr.offset,vo=An(jt).utcOffset(Je(Jr));return to>0?[(vo=vo.add(1,"day").startOf("day")).format("YYYY-MM-DD"),vo.clone().add(to,"day").startOf("day").format("YYYY-MM-DD"),"[)",Jr]:[vo.clone().subtract(-1*to-1,"day").startOf("day").format("YYYY-MM-DD"),vo.clone().add(1,"day").startOf("day").format("YYYY-MM-DD"),"[)",Jr]}function An(rr){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return rr?P().isDayjs(rr)?rr:jt?Sr()(rr):P()(rr):jt?Sr()():P()()}function cr(rr){var jt,or=rr.now,Jr=rr.unit,to=rr.timezone,vo=to===void 0?"+00:00":to,Lo=rr.offset,na=An(or,Jr==="isoWeek");na=na.utcOffset(Je(vo)),na=na.startOf(Jr),Lo>0?na=na.add(Lo,Jr):Lo<0&&(na=na.subtract(-1*Lo,Jr));var Ma={year:function(){return na.format("YYYY")},quarter:function(){return na.format("YYYY[Q]Q")},month:function(){return na.format("YYYY-MM")},week:function(){return na.format("gggg[w]ww")},isoWeek:function(){return na.format("GGGG[W]WW")},day:function(){return na.format("YYYY-MM-DD")}},Ua=(jt=Ma[Jr])===null||jt===void 0?void 0:jt.call(Ma);return vo?Ua+vo:Ua}var Un=function(jt,or){return function(Jr){var to=Jr.now,vo=Jr.timezone,Lo=Jr.field;return Lo!=null&&Lo.timezone&&(vo=Lo==null?void 0:Lo.timezone),cr({now:to,timezone:vo,unit:jt,offset:or})}},mt=function(jt){return function(or){var Jr=or.now,to=or.timezone,vo=or.field;return vo!=null&&vo.timezone&&(to=vo==null?void 0:vo.timezone),Xt({now:Jr,timezone:to,offset:jt})}};function Tt(){return{now:new Date().toISOString(),today:Un("day"),yesterday:Un("day",-1),tomorrow:Un("day",1),thisWeek:Un("week"),lastWeek:Un("week",-1),nextWeek:Un("week",1),thisIsoWeek:Un("isoWeek"),lastIsoWeek:Un("isoWeek",-1),nextIsoWeek:Un("isoWeek",1),thisMonth:Un("month"),lastMonth:Un("month",-1),nextMonth:Un("month",1),thisQuarter:Un("quarter"),lastQuarter:Un("quarter",-1),nextQuarter:Un("quarter",1),thisYear:Un("year"),lastYear:Un("year",-1),nextYear:Un("year",1),last7Days:mt(-7),next7Days:mt(7),last30Days:mt(-30),next30Days:mt(30),last90Days:mt(-90),next90Days:mt(90)}}function kt(rr){var jt=rr.split(".");return[jt.shift(),jt.join(".")]}var Nt=function(){function rr(){var jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{override:!1};ye()(this,rr),oe()(this,"map",new Map),oe()(this,"options",void 0),this.options=jt}return Ee()(rr,[{key:"register",value:function(or,Jr){if(!this.options.override&&this.map.has(or))throw new Error('this registry does not allow to override existing keys: "'.concat(or,'"'));this.map.set(or,Jr)}},{key:"get",value:function(or){return this.map.get(or)}},{key:"getKeys",value:function(){return this.map.keys()}},{key:"getValues",value:function(){return this.map.values()}},{key:"getEntities",value:function(){return this.map.entries()}}]),rr}(),Dt=null,Ue=e(28627),Ke=Symbol.for("nocobase.utils.sesLockdown"),at=Symbol.for("nocobase.utils.bufferOverrides"),st=["globalThis","global","self","Function","AsyncFunction","GeneratorFunction","eval","Compartment","lockdown","harden","assert"];function et(rr){if(!rr||Ce()(rr)!=="object")return!1;var jt=rr.message||"";return jt.includes("(SES_ALREADY_LOCKED_DOWN)")}function it(){var rr=globalThis;if(!rr[at]){var jt=rr.Buffer;if(!(!jt||!jt.prototype)){var or=jt.prototype,Jr=q()(Reflect.ownKeys(or)),to;try{var vo=function(){var na=to.value,Ma=Object.getOwnPropertyDescriptor(or,na);if(!Ma||typeof Ma.value!="function"||!Ma.configurable)return 1;var Ua=Ma.value,Ia=function(){return Ua},$a=function(si){if(this===or)throw new TypeError("Cannot assign to read only property '".concat(String(na),"' of object 'Buffer.prototype'"));Object.defineProperty(this,na,{configurable:!0,enumerable:!0,writable:!0,value:si})};Object.defineProperty(Ia,"originalValue",{configurable:!1,enumerable:!1,writable:!1,value:Ua}),Object.defineProperty(or,na,{configurable:Ma.configurable,enumerable:Ma.enumerable,get:Ia,set:$a})};for(Jr.s();!(to=Jr.n()).done;)vo()}catch(Lo){Jr.e(Lo)}finally{Jr.f()}rr[at]=!0}}}function Ft(rr){it();var jt=globalThis;if(!jt[Ke]){if(typeof lockdown!="function")throw new Error("SES lockdown is unavailable in the current runtime environment.");try{lockdown(rr)}catch(or){if(!et(or))throw or}jt[Ke]=!0}}function Wt(rr,jt){return jt?"{{t(".concat(JSON.stringify(rr),", ").concat(JSON.stringify(jt),")}}"):"{{t(".concat(JSON.stringify(rr),")}}")}var Hn=function(jt){for(;jt;){var or;if(jt.id==="root"||(or=jt.classList)!==null&&or!==void 0&&or.contains("nb-action"))return!1;jt=jt.parentNode}return!{NODE_ENV:"production",PUBLIC_PATH:"auto"}.__TEST__};function Er(rr,jt){return rr.replace(/\{\{(\w+)\}\}/g,function(or,Jr){return typeof jt[Jr]<"u"?jt[Jr]:or})}for(var ur=36,jr="";ur--;)jr+=ur.toString(36);function fr(rr){for(var jt="",or=rr||11;or--;)jt+=jr[Math.random()*36|0];return jt}function Ar(rr){var jt;try{jt=new URL(rr)}catch{return!1}return jt.protocol==="http:"||jt.protocol==="https:"}var lr=e(33833),dr={i8:"2.0.0"},ir=function rr(jt,or){if(!jt)return jt;if(jt["x-component"]!=="Grid")return Object.keys(jt.properties||{}).forEach(function(Ia){jt.properties[Ia]=rr(jt.properties[Ia],or)}),jt;var Jr=jt.parent;jt.toJSON?jt=jt.toJSON():jt=S().cloneDeep(jt);var to={},vo=jt,Lo=vo.properties,na=Lo===void 0?{}:Lo,Ma=0;if(Object.keys(na).forEach(function(Ia,$a){var Xa=na[Ia];if(Xa["x-component"]!=="Grid.Row"){Xa["x-index"]=++Ma,to[Ia]=Xa;return}if(Xa.properties){if(Object.keys(Xa.properties).length===1){Xa["x-index"]=++Ma,to[Ia]=Xa;return}Object.keys(Xa.properties).forEach(function(si,yi){var Ha=Xa.properties[si];if(S().set(Ha,"x-component-props.width",100),yi===0){Xa["x-index"]=++Ma,to[Ia]=Xa;return}or!=null&&or(Ha)||(delete Xa.properties[si],to["".concat(fr(),"_").concat(si)]=Cr(Ha,si,++Ma))})}}),jt.properties=to,Jr){var Ua=new lr.Schema(jt,Jr);return Jr.properties&&Object.keys(Jr.properties).forEach(function(Ia){Ia===jt.name&&(Jr.properties[Ia]=Ua)}),Ua}return jt};function Cr(rr,jt,or){return{type:"void",version:"2.0","x-component":"Grid.Row","x-app-version":dr.i8,"x-uid":fr(),"x-async":!1,"x-index":or,_isJSONSchemaObject:!0,properties:oe()({},jt,rr)}}function $r(rr){var jt=new Set,or=function Jr(to){if(typeof to=="string")for(var vo=/\{\{\s*([^}]+?)\s*\}\}/g,Lo;(Lo=vo.exec(to))!==null;){for(var na=Lo[1],Ma=/ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*)/g,Ua=void 0;(Ua=Ma.exec(na))!==null;)jt.add(Ua[1]);for(var Ia=/ctx\[\s*(["'])\s*([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\1\s*\]/g,$a=void 0;($a=Ia.exec(na))!==null;)jt.add($a[2])}else Array.isArray(to)?to.forEach(Jr):to&&Ce()(to)==="object"&&Object.values(to).forEach(Jr)};return or(rr),jt}function Zr(rr){var jt={},or=function Jr(to){if(typeof to=="string")for(var vo=/\{\{\s*([^}]+?)\s*\}\}/g,Lo;(Lo=vo.exec(to))!==null;){for(var na=Lo[1],Ma=/ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*)([^\s)]*)/g,Ua=void 0;(Ua=Ma.exec(na))!==null;){var Ia=Ua[1],$a=Ua[2]||"";if(jt[Ia]=jt[Ia]||[],$a.startsWith("."))jt[Ia].push($a.slice(1));else if($a.startsWith("[")){var Xa=$a.match(/^\[\s*(["'])\s*([^'"\]]+)\s*\1\s*\](.*)$/);if(Xa){var si=Xa[2],yi=Xa[3]||"";jt[Ia].push("".concat(si).concat(yi))}else{var Ha=$a.match(/^\[(\d+)\](.*)$/);if(Ha){var Di=Ha[1],Ga=Ha[2]||"";jt[Ia].push("[".concat(Di,"]").concat(Ga))}}}else $a.startsWith("(")&&(jt[Ia].length||jt[Ia].push(""))}for(var ka=/ctx\[\s*(["'])\s*([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\1\s*\]([^\s)]*)/g,Jo=void 0;(Jo=ka.exec(na))!==null;){var Ya=Jo[2],La=Jo[3]||"";if(jt[Ya]=jt[Ya]||[],La.startsWith("."))jt[Ya].push(La.slice(1));else if(La.startsWith("[")){var Kr=La.match(/^\[\s*(["'])\s*([^'"\]]+)\s*\1\s*\](.*)$/);if(Kr){var wt=Kr[2],Gt=Kr[3]||"";jt[Ya].push("".concat(wt).concat(Gt))}else{var un=La.match(/^\[(\d+)\](.*)$/);if(un){var vn=un[1],Ln=un[2]||"";jt[Ya].push("[".concat(vn,"]").concat(Ln))}}}else La.startsWith("(")&&(jt[Ya].length||jt[Ya].push(""))}}else Array.isArray(to)?to.forEach(Jr):to&&Ce()(to)==="object"&&Object.values(to).forEach(Jr)};return or(rr),jt}var so=e(6829),Xr=new so.Kj;function jo(){var rr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],jt={},or=q()(rr),Jr;try{for(or.s();!(Jr=or.n()).done;)for(var to=Jr.value,vo=to.replace(/^ctx\./,""),Lo=vo.split("."),na=jt,Ma=0;Ma<Lo.length;Ma++){var Ua=Lo[Ma],Ia=Ma===Lo.length-1;Ia?na[Ua]="{{".concat(to,"}}"):(na[Ua]=na[Ua]||{},na=na[Ua])}}catch($a){or.e($a)}finally{or.f()}return jt}function $o(rr){return Mr.apply(this,arguments)}function Mr(){return Mr=Kn()(Mn()().mark(function rr(jt){var or;return Mn()().wrap(function(to){for(;;)switch(to.prev=to.next){case 0:return to.next=2,Xr.fullVariables(jt);case 2:return or=to.sent,to.abrupt("return",jo(or));case 4:case"end":return to.stop()}},rr)})),Mr.apply(this,arguments)}function zo(rr,jt){return bo.apply(this,arguments)}function bo(){return bo=Kn()(Mn()().mark(function rr(jt,or){return Mn()().wrap(function(to){for(;;)switch(to.prev=to.next){case 0:return to.next=2,Xr.parseAndRender(jt,{ctx:or});case 2:return to.abrupt("return",to.sent);case 3:case"end":return to.stop()}},rr)})),bo.apply(this,arguments)}function fa(rr){var jt=1,or={},Jr=rr.replace(/{{\s*([^}]+)\s*}}/g,function(to,vo){var Lo="__var".concat(jt);return or[Lo]="{{".concat(vo.trim(),"}}"),jt++,"$".concat(Lo)});return{sql:Jr,bind:or}}function Ho(rr){return ti.apply(this,arguments)}function ti(){return ti=Kn()(Mn()().mark(function rr(jt){var or,Jr,to,vo;return Mn()().wrap(function(na){for(;;)switch(na.prev=na.next){case 0:return or=fa(jt),Jr=or.sql,to=or.bind,na.next=3,$o(Jr);case 3:return vo=na.sent,na.abrupt("return",{sql:Jr,bind:to,liquidContext:vo});case 5:case"end":return na.stop()}},rr)})),ti.apply(this,arguments)}},14994:function(){"use strict"},40408:function(Zt,Oe,e){var ue={"./af":[15903,4920],"./af.js":[15903,4920],"./am":[29911,4920],"./am.js":[29911,4920],"./ar":[63939,4920],"./ar-dz":[47200,4920],"./ar-dz.js":[47200,4920],"./ar-iq":[87719,4920],"./ar-iq.js":[87719,4920],"./ar-kw":[62376,4920],"./ar-kw.js":[62376,4920],"./ar-ly":[48540,4920],"./ar-ly.js":[48540,4920],"./ar-ma":[96817,4920],"./ar-ma.js":[96817,4920],"./ar-sa":[11573,4920],"./ar-sa.js":[11573,4920],"./ar-tn":[99339,4920],"./ar-tn.js":[99339,4920],"./ar.js":[63939,4920],"./az":[88092,4920],"./az.js":[88092,4920],"./be":[60504,4920],"./be.js":[60504,4920],"./bg":[19091,4920],"./bg.js":[19091,4920],"./bi":[19149,4920],"./bi.js":[19149,4920],"./bm":[15287,4920],"./bm.js":[15287,4920],"./bn":[35254,4920],"./bn-bd":[61177,4920],"./bn-bd.js":[61177,4920],"./bn.js":[35254,4920],"./bo":[52502,4920],"./bo.js":[52502,4920],"./br":[8864,4920],"./br.js":[8864,4920],"./bs":[4502,4920],"./bs.js":[4502,4920],"./ca":[33646,4920],"./ca.js":[33646,4920],"./cs":[98507,4920],"./cs.js":[98507,4920],"./cv":[16636,4920],"./cv.js":[16636,4920],"./cy":[28792,4920],"./cy.js":[28792,4920],"./da":[17427,4920],"./da.js":[17427,4920],"./de":[80790,4920],"./de-at":[73237,4920],"./de-at.js":[73237,4920],"./de-ch":[16148,4920],"./de-ch.js":[16148,4920],"./de.js":[80790,4920],"./dv":[11794,4920],"./dv.js":[11794,4920],"./el":[65423,4920],"./el.js":[65423,4920],"./en":[25054,4920],"./en-au":[85109,4920],"./en-au.js":[85109,4920],"./en-ca":[55105,4920],"./en-ca.js":[55105,4920],"./en-gb":[99517,4920],"./en-gb.js":[99517,4920],"./en-ie":[30758,4920],"./en-ie.js":[30758,4920],"./en-il":[95805,4920],"./en-il.js":[95805,4920],"./en-in":[88529,4920],"./en-in.js":[88529,4920],"./en-nz":[50302,4920],"./en-nz.js":[50302,4920],"./en-sg":[35941,4920],"./en-sg.js":[35941,4920],"./en-tt":[46183,4920],"./en-tt.js":[46183,4920],"./en.js":[25054,4920],"./eo":[74990,4920],"./eo.js":[74990,4920],"./es":[67763,4920],"./es-do":[3864,4920],"./es-do.js":[3864,4920],"./es-mx":[37118,4920],"./es-mx.js":[37118,4920],"./es-pr":[23521,4920],"./es-pr.js":[23521,4920],"./es-us":[36165,4920],"./es-us.js":[36165,4920],"./es.js":[67763,4920],"./et":[99670,4920],"./et.js":[99670,4920],"./eu":[20837,4920],"./eu.js":[20837,4920],"./fa":[81379,4920],"./fa.js":[81379,4920],"./fi":[47822,4920],"./fi.js":[47822,4920],"./fo":[69197,4920],"./fo.js":[69197,4920],"./fr":[96023,4920],"./fr-ca":[77989,4920],"./fr-ca.js":[77989,4920],"./fr-ch":[54254,4920],"./fr-ch.js":[54254,4920],"./fr.js":[96023,4920],"./fy":[93220,4920],"./fy.js":[93220,4920],"./ga":[47467,4920],"./ga.js":[47467,4920],"./gd":[54855,4920],"./gd.js":[54855,4920],"./gl":[90229,4920],"./gl.js":[90229,4920],"./gom-latn":[46312,4920],"./gom-latn.js":[46312,4920],"./gu":[87632,4920],"./gu.js":[87632,4920],"./he":[76875,4920],"./he.js":[76875,4920],"./hi":[77573,4920],"./hi.js":[77573,4920],"./hr":[96257,4920],"./hr.js":[96257,4920],"./ht":[98889,4920],"./ht.js":[98889,4920],"./hu":[68562,4920],"./hu.js":[68562,4920],"./hy-am":[38242,4920],"./hy-am.js":[38242,4920],"./id":[83783,4920],"./id.js":[83783,4920],"./index.d":[46990,4920],"./index.d.ts":[46990,4920],"./is":[98980,4920],"./is.js":[98980,4920],"./it":[15551,4920],"./it-ch":[83706,4920],"./it-ch.js":[83706,4920],"./it.js":[15551,4920],"./ja":[76831,4920],"./ja.js":[76831,4920],"./jv":[42641,4920],"./jv.js":[42641,4920],"./ka":[46622,4920],"./ka.js":[46622,4920],"./kk":[32921,4920],"./kk.js":[32921,4920],"./km":[45567,4920],"./km.js":[45567,4920],"./kn":[21113,4920],"./kn.js":[21113,4920],"./ko":[19132,4920],"./ko.js":[19132,4920],"./ku":[94888,4920],"./ku.js":[94888,4920],"./ky":[60466,4920],"./ky.js":[60466,4920],"./lb":[91796,4920],"./lb.js":[91796,4920],"./lo":[68894,4920],"./lo.js":[68894,4920],"./lt":[78768,4920],"./lt.js":[78768,4920],"./lv":[30953,4920],"./lv.js":[30953,4920],"./me":[18066,4920],"./me.js":[18066,4920],"./mi":[68602,4920],"./mi.js":[68602,4920],"./mk":[51560,4920],"./mk.js":[51560,4920],"./ml":[4017,4920],"./ml.js":[4017,4920],"./mn":[94717,4920],"./mn.js":[94717,4920],"./mr":[15473,4920],"./mr.js":[15473,4920],"./ms":[43986,4920],"./ms-my":[77387,4920],"./ms-my.js":[77387,4920],"./ms.js":[43986,4920],"./mt":[28477,4920],"./mt.js":[28477,4920],"./my":[62966,4920],"./my.js":[62966,4920],"./nb":[19682,4920],"./nb.js":[19682,4920],"./ne":[14149,4920],"./ne.js":[14149,4920],"./nl":[99182,4920],"./nl-be":[37496,4920],"./nl-be.js":[37496,4920],"./nl.js":[99182,4920],"./nn":[92722,4920],"./nn.js":[92722,4920],"./oc-lnc":[76159,4920],"./oc-lnc.js":[76159,4920],"./pa-in":[35914,4920],"./pa-in.js":[35914,4920],"./pl":[81987,4920],"./pl.js":[81987,4920],"./pt":[15001,4920],"./pt-br":[57548,4920],"./pt-br.js":[57548,4920],"./pt.js":[15001,4920],"./rn":[123,4920],"./rn.js":[123,4920],"./ro":[18146,4920],"./ro.js":[18146,4920],"./ru":[70600,4920],"./ru.js":[70600,4920],"./rw":[6509,4920],"./rw.js":[6509,4920],"./sd":[65437,4920],"./sd.js":[65437,4920],"./se":[772,4920],"./se.js":[772,4920],"./si":[77109,4920],"./si.js":[77109,4920],"./sk":[35627,4920],"./sk.js":[35627,4920],"./sl":[82544,4920],"./sl.js":[82544,4920],"./sq":[88341,4920],"./sq.js":[88341,4920],"./sr":[50617,4920],"./sr-cyrl":[37101,4920],"./sr-cyrl.js":[37101,4920],"./sr.js":[50617,4920],"./ss":[64127,4920],"./ss.js":[64127,4920],"./sv":[91876,4920],"./sv-fi":[19911,4920],"./sv-fi.js":[19911,4920],"./sv.js":[91876,4920],"./sw":[46148,4920],"./sw.js":[46148,4920],"./ta":[55596,4920],"./ta.js":[55596,4920],"./te":[45159,4920],"./te.js":[45159,4920],"./tet":[99157,4920],"./tet.js":[99157,4920],"./tg":[9928,4920],"./tg.js":[9928,4920],"./th":[62019,4920],"./th.js":[62019,4920],"./tk":[75817,4920],"./tk.js":[75817,4920],"./tl-ph":[46513,4920],"./tl-ph.js":[46513,4920],"./tlh":[97296,4920],"./tlh.js":[97296,4920],"./tr":[73035,4920],"./tr.js":[73035,4920],"./types.d":[63799,4920],"./types.d.ts":[63799,4920],"./tzl":[57797,4920],"./tzl.js":[57797,4920],"./tzm":[84722,4920],"./tzm-latn":[30261,4920],"./tzm-latn.js":[30261,4920],"./tzm.js":[84722,4920],"./ug-cn":[80313,4920],"./ug-cn.js":[80313,4920],"./uk":[64144,4920],"./uk.js":[64144,4920],"./ur":[92957,4920],"./ur.js":[92957,4920],"./uz":[7486,4920],"./uz-latn":[98727,4920],"./uz-latn.js":[98727,4920],"./uz.js":[7486,4920],"./vi":[37553,4920],"./vi.js":[37553,4920],"./x-pseudo":[55321,4920],"./x-pseudo.js":[55321,4920],"./yo":[14724,4920],"./yo.js":[14724,4920],"./zh":[32009,4920],"./zh-cn":[33852],"./zh-cn.js":[33852],"./zh-hk":[2390,4920],"./zh-hk.js":[2390,4920],"./zh-tw":[43901,4920],"./zh-tw.js":[43901,4920],"./zh.js":[32009,4920]};function S(le){if(!e.o(ue,le))return Promise.resolve().then(function(){var U=new Error("Cannot find module '"+le+"'");throw U.code="MODULE_NOT_FOUND",U});var P=ue[le],p=P[0];return Promise.all(P.slice(1).map(e.e)).then(function(){return e.t(p,23)})}S.keys=function(){return Object.keys(ue)},S.id=40408,Zt.exports=S},95475:function(Zt){function Oe(e){return Promise.resolve().then(function(){var ue=new Error("Cannot find module '"+e+"'");throw ue.code="MODULE_NOT_FOUND",ue})}Oe.keys=function(){return[]},Oe.resolve=Oe,Oe.id=95475,Zt.exports=Oe},59816:function(){},24654:function(){},95506:function(){},75347:function(){},31777:function(){},34017:function(){},59905:function(){},64604:function(){},75042:function(){}}]);
2697
+ `).concat(Un)}function wn(gt){return Kn.apply(this,arguments)}function Kn(){return Kn=Q()(T()().mark(function gt(dt){var Ht,mn,bn,Cn,Sn,sr,cn=arguments;return T()().wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:if(Ht=cn.length>1&&cn[1]!==void 0?cn[1]:{},mn=typeof dt=="string"?dt:String(dt??""),bn=!!Ht.preprocessTemplates,Cn=bn?fn.withTemplates:fn.withoutTemplates,Sn=on(Cn,mn),!Sn){Xt.next=9;break}return Xt.next=8,Sn;case 8:return Xt.abrupt("return",Xt.sent);case 9:return sr=Q()(T()().mark(function An(){var cr,Un,mt;return T()().wrap(function(kt){for(;;)switch(kt.prev=kt.next){case 0:if(bn){kt.next=6;break}return kt.t0=Ut,kt.next=4,(0,Lt.n)(mn);case 4:return kt.t1=kt.sent,kt.abrupt("return",(0,kt.t0)(kt.t1));case 6:return cr=Mn(mn,{processStringLiterals:!1}),kt.next=9,(0,Lt.n)(cr);case 9:return Un=kt.sent,mt=Mn(Un,{processBarePlaceholders:!1}),kt.abrupt("return",Ut(mt));case 12:case"end":return kt.stop()}},An)}))(),Kt(Cn,mn,sr,gn),Xt.prev=11,Xt.next=14,sr;case 14:return Xt.abrupt("return",Xt.sent);case 17:throw Xt.prev=17,Xt.t0=Xt.catch(11),Cn.delete(mn),Xt.t0;case 21:case"end":return Xt.stop()}},gt,null,[[11,17]])})),Kn.apply(this,arguments)}var gr=e(65452);function Ir(gt){if(Array.isArray(gt)){var dt=gt.map(function(mn){return Ir(mn)}).filter(function(mn){return mn!==void 0});return dt.length?dt:void 0}if(gt&&z()(gt)==="object"){var Ht={};return Object.keys(gt).forEach(function(mn){var bn=Ir(gt[mn]);bn!==void 0&&(Ht[mn]=bn)}),Object.keys(Ht).length?Ht:void 0}return gt==null||typeof gt=="string"&&gt===""?void 0:gt}var _r=function(dt){return typeof dt.on=="string"?dt.on==="beforeRender":z()(dt.on)==="object"?dt.on.eventName==="beforeRender":!dt.on&&dt.manual!==!0},Sr=e(42554)},47608:function(Zt,Oe,e){"use strict";e.d(Oe,{n:function(){return U}});var ue=e(15009),S=e.n(ue),le=e(99289),P=e.n(le),p=e(57930);function U(C){return J.apply(this,arguments)}function J(){return J=P()(S()().mark(function C(j){var A,O,R,w,f,B;return S()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(A=/<[A-Za-z]|<\//.test(j),A){g.next=3;break}return g.abrupt("return",j);case 3:return g.prev=3,g.next=6,p("imported_1q7hsm5_component",Promise.all([e.e(4326),e.e(8977),e.e(5505)]).then(e.bind(e,75572)));case 6:if(w=g.sent,f=(w==null?void 0:w.transform)||(w==null||(O=w.default)===null||O===void 0?void 0:O.transform),typeof f=="function"){g.next=10;break}return g.abrupt("return",j);case 10:return B=f(j,{transforms:["jsx"],jsxPragma:"ctx.React.createElement",jsxFragmentPragma:"ctx.React.Fragment",disableESTransforms:!0,production:!0}),g.abrupt("return",(R=B&&(B.code||(B==null?void 0:B.output)))!==null&&R!==void 0?R:j);case 14:return g.prev=14,g.t0=g.catch(3),g.abrupt("return",j);case 17:case"end":return g.stop()}},C,null,[[3,14]])})),J.apply(this,arguments)}},26233:function(Zt,Oe,e){"use strict";e.d(Oe,{HA:function(){return y},cO:function(){return a},nw:function(){return T},rz:function(){return m}});var ue=e(19632),S=e.n(ue),le=e(52677),P=e.n(le),p=e(15009),U=e.n(p),J=e(96695),C=e.n(J),j=e(5574),A=e.n(j),O=e(99289),R=e.n(O),w=e(80770),f=e(96486),B=e.n(f);function T(K,E){return g.apply(this,arguments)}function g(){return g=R()(U()().mark(function K(E,F){var L;return U()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(E){v.next=2;break}return v.abrupt("return",{});case 2:if(typeof E!="function"){v.next=14;break}return v.prev=3,v.next=6,E(F);case 6:return L=v.sent,v.abrupt("return",L||{});case 10:return v.prev=10,v.t0=v.catch(3),console.error("Error resolving defaultParams function:",v.t0),v.abrupt("return",{});case 14:return v.abrupt("return",E);case 15:case"end":return v.stop()}},K,null,[[3,10]])})),g.apply(this,arguments)}function a(K,E,F){return H.apply(this,arguments)}function H(){return H=R()(U()().mark(function K(E,F,L){var x;return U()().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(E){W.next=2;break}return W.abrupt("return",{});case 2:if(typeof E!="function"){W.next=14;break}return W.prev=3,W.next=6,E(F,L);case 6:return x=W.sent,W.abrupt("return",x||{});case 10:return W.prev=10,W.t0=W.catch(3),console.error("Error resolving createModelOptions function:",W.t0),W.abrupt("return",{});case 14:return W.abrupt("return",E);case 15:case"end":return W.stop()}},K,null,[[3,10]])})),H.apply(this,arguments)}var z={queue:[],timer:null,inflightByRun:new Map},X=10;function Q(K){if(Array.isArray(K))return K.map(Q);if(B().isPlainObject(K)){var E=Object.entries(K).map(function(L){var x=A()(L,2),v=x[0],W=x[1];return[v,Q(W)]}),F=B().sortBy(E,function(L){var x=A()(L,1),v=x[0];return v});return Object.fromEntries(F)}return K}function ce(K){try{return JSON.stringify(Q(K))}catch{try{return JSON.stringify(K)}catch{return String(K)}}}function m(K,E){var F=z,L=K.runId||"GLOBAL",x=ce(E),v=F.inflightByRun.get(L);v||(v=new Map,F.inflightByRun.set(L,v));var W=v.get(x);if(W)return W;var G,re,q=new Promise(function(Ee,de){G=Ee,re=de});v.set(x,q);var te="".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2)),ye={id:te,ctx:K,payload:E,resolve:G,reject:re,runId:L,dedupKey:x};F.queue.push(ye);var Pe=function(){var Ee=R()(U()().mark(function de(){var be,me,oe,ee,xe,ve,he,pe,De,se,Ce,Se,Te,Ie,Fe,_e,we,We,tt,ze,je,Ve,Ae,Re,Be,ae,Me,He,Le,Xe,ht,St,Ye;return U()().wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:if(me=F.queue.splice(0,F.queue.length),F.timer=null,me.length){bt.next=4;break}return bt.abrupt("return");case 4:if(oe=(be=me[0].ctx)===null||be===void 0?void 0:be.api,oe){bt.next=9;break}ee=C()(me);try{for(ee.s();!(xe=ee.n()).done;){ve=xe.value;try{ve.resolve(ve.payload.template)}catch(en){ve.reject(en)}finally{(he=F.inflightByRun.get(ve.runId))===null||he===void 0||he.delete(ve.dedupKey)}}}catch(en){ee.e(en)}finally{ee.f()}return bt.abrupt("return");case 9:return bt.prev=9,se=me.map(function(en){return{id:en.id,template:en.payload.template,contextParams:en.payload.contextParams||{}}}),bt.next=13,oe.request({method:"POST",url:"variables:resolve",data:{values:{batch:se}}});case 13:Ce=bt.sent,Se=(pe=Ce.data)!==null&&pe!==void 0?pe:Ce,Te=(De=Se.data)!==null&&De!==void 0?De:Se,Ie=Te==null?void 0:Te.results,Fe=Array.isArray(Ie)?Ie:Array.isArray(Te)?Te:[],_e=new Map,we=C()(Fe);try{for(we.s();!(We=we.n()).done;)tt=We.value,ze=(tt==null?void 0:tt.id)!=null?String(tt.id):"",ze&&_e.set(ze,tt==null?void 0:tt.data)}catch(en){we.e(en)}finally{we.f()}je=C()(me);try{for(je.s();!(Ve=je.n()).done;){Ae=Ve.value;try{Re=String(Ae.id),Be=_e.has(Re)?_e.get(Re):Ae.payload.template,Ae.resolve(Be)}catch(en){Ae.reject(en)}finally{(ae=F.inflightByRun.get(Ae.runId))===null||ae===void 0||ae.delete(Ae.dedupKey)}}}catch(en){je.e(en)}finally{je.f()}bt.next=29;break;case 25:bt.prev=25,bt.t0=bt.catch(9),Me=C()(me);try{for(Me.s();!(He=Me.n()).done;){Le=He.value;try{K==null||(Xe=K.logger)===null||Xe===void 0||(ht=(St=Xe).warn)===null||ht===void 0||ht.call(St,{err:bt.t0},"variables:resolve(batch) failed, fallback"),Le.resolve(Le.payload.template)}catch(en){Le.reject(en)}finally{(Ye=F.inflightByRun.get(Le.runId))===null||Ye===void 0||Ye.delete(Le.dedupKey)}}}catch(en){Me.e(en)}finally{Me.f()}case 29:case"end":return bt.stop()}},de,null,[[9,25]])}));return function(){return Ee.apply(this,arguments)}}();return F.timer||(F.timer=setTimeout(Pe,X)),q}function y(K,E){return $.apply(this,arguments)}function $(){return $=R()(U()().mark(function K(E,F){var L;return U()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return L=function(){var W=R()(U()().mark(function G(re){var q,te,ye,Pe,Ee,de;return U()().wrap(function(me){for(;;)switch(me.prev=me.next){case 0:if(!(typeof re=="string"&&/\{\{.*?\}\}/.test(re))){me.next=4;break}return me.next=3,I(re,F);case 3:return me.abrupt("return",me.sent);case 4:if(!Array.isArray(re)){me.next=6;break}return me.abrupt("return",Promise.all(re.map(L)));case 6:if(!(re&&P()(re)==="object")){me.next=18;break}q={},te=0,ye=Object.entries(re);case 9:if(!(te<ye.length)){me.next=17;break}return Pe=A()(ye[te],2),Ee=Pe[0],de=Pe[1],me.next=13,L(de);case 13:q[Ee]=me.sent;case 14:te++,me.next=9;break;case 17:return me.abrupt("return",q);case 18:return me.abrupt("return",re);case 19:case"end":return me.stop()}},G)}));return function(re){return W.apply(this,arguments)}}(),v.abrupt("return",L(E));case 2:case"end":return v.stop()}},K)})),$.apply(this,arguments)}function M(K,E){return b.apply(this,arguments)}function b(){return b=R()(U()().mark(function K(E,F){var L,x;return U()().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:return W.next=2,u(E.trim(),F);case 2:return L=W.sent,W.next=5,F.runjs("return ".concat(L),{t:F.t});case 5:return x=W.sent,W.abrupt("return",x!=null&&x.success?x.value:void 0);case 7:case"end":return W.stop()}},K)})),b.apply(this,arguments)}function u(K,E){return V.apply(this,arguments)}function V(){return V=R()(U()().mark(function K(E,F){var L,x,v,W,G,re,q,te,ye,Pe,Ee,de,be,me,oe,ee,xe,ve,he,pe,De,se,Ce,Se,Te,Ie;return U()().wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:for(L=/ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*(?:(?:\.[a-zA-Z_$][a-zA-Z0-9_$]*)|(?:\[[^\]]+\]))*)(?!\s*\()/g,x=[],v=new Set;(W=L.exec(E))!==null;)G=W[0],re=W[1],q=re.match(/^([a-zA-Z_$][a-zA-Z0-9_$]*)/),q&&(te=q[1],ye=re.substring(te.length),x.push({fullPath:G,firstKey:te,restPath:ye}),v.add(te));if(x.length!==0){_e.next=6;break}return _e.abrupt("return",E);case 6:Pe=new Map,Ee=C()(v),_e.prev=8,Ee.s();case 10:if((de=Ee.n()).done){_e.next=25;break}return be=de.value,_e.prev=12,_e.next=15,F[be];case 15:me=_e.sent,oe=me&&me.__isRecordProxy__===!0,Pe.set(be,oe),_e.next=23;break;case 20:_e.prev=20,_e.t0=_e.catch(12),Pe.set(be,!1);case 23:_e.next=10;break;case 25:_e.next=30;break;case 27:_e.prev=27,_e.t1=_e.catch(8),Ee.e(_e.t1);case 30:return _e.prev=30,Ee.f(),_e.finish(30);case 33:for(x.sort(function(we,We){return We.fullPath.length-we.fullPath.length}),ee=E,xe=0,ve=x;xe<ve.length;xe++)he=ve[xe],pe=he.fullPath,De=he.firstKey,se=he.restPath,Ce=Pe.get(De)||!1,Se=void 0,se===""?Se="await ctx.".concat(De):Se=Ce?"await (await ctx.".concat(De,")").concat(se):"(await ctx.".concat(De,")").concat(se),Te=pe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ie=new RegExp("\\b".concat(Te,"\\b"),"g"),ee=ee.replace(Ie,Se);return _e.abrupt("return",ee);case 37:case"end":return _e.stop()}},K,null,[[8,27,30,33],[12,20]])})),V.apply(this,arguments)}function I(K,E){return N.apply(this,arguments)}function N(){return N=R()(U()().mark(function K(E,F){var L,x,v,W,G,re,q,te,ye,Pe,Ee,de,be,me;return U()().wrap(function(ee){for(;;)switch(ee.prev=ee.next){case 0:if(L=function(ve){var he=ve.trim().match(/^ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*)(?:\.([a-zA-Z_$][a-zA-Z0-9_$-]*(?:\.[a-zA-Z_$][a-zA-Z0-9_$-]*)*))?$/);return he?he[2]?"".concat(he[1],".").concat(he[2]):he[1]:null},x=function(){var xe=R()(U()().mark(function ve(he){var pe,De,se;return U()().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(pe=he.split("."),De=pe.shift(),De){Se.next=4;break}return Se.abrupt("return",void 0);case 4:return Se.next=6,F[De];case 6:if(se=Se.sent,pe.length!==0){Se.next=9;break}return Se.abrupt("return",se);case 9:return Se.abrupt("return",(0,w.Bb)(se,pe.join(".")));case 10:case"end":return Se.stop()}},ve)}));return function(he){return xe.apply(this,arguments)}}(),v=function(){var xe=R()(U()().mark(function ve(he){var pe,De;return U()().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(pe=L(he),!pe){Ce.next=10;break}return Ce.next=4,x(pe);case 4:if(De=Ce.sent,!(De===void 0&&pe.includes("-"))){Ce.next=9;break}return Ce.next=8,M(he,F);case 8:return Ce.abrupt("return",Ce.sent);case 9:return Ce.abrupt("return",De);case 10:return Ce.next=12,M(he,F);case 12:return Ce.abrupt("return",Ce.sent);case 13:case"end":return Ce.stop()}},ve)}));return function(he){return xe.apply(this,arguments)}}(),W=E.match(/^\s*\{\{\s*([^{}]+?)\s*\}\}\s*$/),!W){ee.next=9;break}return G=W[1],ee.next=8,v(G);case 8:return ee.abrupt("return",ee.sent);case 9:re=S()(E.matchAll(/\{\{\s*(.+?)\s*\}\}/g)),q=E,te=C()(re),ee.prev=12,te.s();case 14:if((ye=te.n()).done){ee.next=22;break}return Pe=A()(ye.value,2),Ee=Pe[0],de=Pe[1],ee.next=18,v(de);case 18:be=ee.sent,be!==void 0&&(me=P()(be)==="object"&&be!==null?JSON.stringify(be):String(be),q=q.replace(Ee,me));case 20:ee.next=14;break;case 22:ee.next=27;break;case 24:ee.prev=24,ee.t0=ee.catch(12),te.e(ee.t0);case 27:return ee.prev=27,te.f(),ee.finish(27);case 30:return ee.abrupt("return",q);case 31:case"end":return ee.stop()}},K,null,[[12,24,27,30]])})),N.apply(this,arguments)}},42554:function(Zt,Oe,e){"use strict";e.d(Oe,{O:function(){return ue},P:function(){return S}});function ue(le,P){if(!le||typeof le!="string")throw new Error("invalid url");var p=le.trim();if(p.startsWith("http://")||p.startsWith("https://"))return p;var U=window.__esm_cdn_base_url__||"https://esm.sh",J=P!=null&&P.addSuffix&&window.__esm_cdn_suffix__||"",C=U.replace(/\/$/,""),j=p.replace(/^\//,"");if(P!=null&&P.raw){var A=j.includes("?")?"&":"?";return"".concat(C,"/").concat(j).concat(A,"raw")}return"".concat(C,"/").concat(j).concat(J)}function S(le){if(!le||typeof le!="string")return!1;var P=le.split("?")[0].split("#")[0];return P.endsWith(".css")}},24342:function(Zt,Oe,e){"use strict";e.d(Oe,{IA:function(){return X},T:function(){return H},YB:function(){return ce},cI:function(){return f},q3:function(){return B},sF:function(){return Q},uh:function(){return z}});var ue=e(15009),S=e.n(ue),le=e(52677),P=e.n(le),p=e(99289),U=e.n(p),J=e(19632),C=e.n(J),j=e(97857),A=e.n(j),O=e(96695),R=e.n(O);function w(){var y,$,M=globalThis;if((y=M.__nocobaseRunJSSafeGlobalsRegistry)!==null&&y!==void 0&&y.windowAllow&&($=M.__nocobaseRunJSSafeGlobalsRegistry)!==null&&$!==void 0&&$.documentAllow)return M.__nocobaseRunJSSafeGlobalsRegistry;var b={windowAllow:new Set,documentAllow:new Set};return M.__nocobaseRunJSSafeGlobalsRegistry=b,b}function f(y){if(y){var $=w(),M=R()(y),b;try{for(M.s();!(b=M.n()).done;){var u=b.value;if(typeof u=="string"){var V=u.trim();V&&$.windowAllow.add(V)}}}catch(I){M.e(I)}finally{M.f()}}}function B(y){if(y){var $=w(),M=R()(y),b;try{for(M.s();!(b=M.n()).done;){var u=b.value;if(typeof u=="string"){var V=u.trim();V&&$.documentAllow.add(V)}}}catch(I){M.e(I)}finally{M.f()}}}function T(){var y=globalThis;if(y.__nocobaseRunJSSafeGlobalsRegistry)try{var $,M,b,u;($=y.__nocobaseRunJSSafeGlobalsRegistry.windowAllow)===null||$===void 0||(M=$.clear)===null||M===void 0||M.call($),(b=y.__nocobaseRunJSSafeGlobalsRegistry.documentAllow)===null||b===void 0||(u=b.clear)===null||u===void 0||u.call(b)}catch{}}function g(y){return w().windowAllow.has(y)}function a(y){return w().documentAllow.has(y)}function H(y){var $=function(){return"".concat(window.location.origin).concat(window.location.pathname)},M=function(K,E,F){var L=function(q){try{var te=new URL(q,$()),ye=te.protocol.toLowerCase();return ye==="about:"?te.href==="about:blank":ye==="http:"||ye==="https:"}catch{return!1}};if(!L(K))throw new Error("Unsafe URL: window.open only allows http/https/about:blank.");var x="_blank",v=function(q){var te=new Set;return q&&q.split(",").map(function(ye){return ye.trim()}).filter(Boolean).forEach(function(ye){var Pe=ye.split("=")[0].trim().toLowerCase();Pe!=="noopener"&&Pe!=="noreferrer"&&te.add(ye)}),te.add("noopener"),te.add("noreferrer"),Array.from(te).join(",")},W=v(F),G=window.open.call(window,K,x,W);if(G&&"opener"in G)try{G.opener=null}catch{}return G},b=function(K,E){var F=new URL(K,$()),L=F.protocol.toLowerCase(),x=L==="about:"&&F.href==="about:blank",v=L==="http:"||L==="https:";if(!v&&!x)throw new Error("Unsafe URL: only http/https/about:blank are allowed.");if(x)return E!=null&&E.replace?window.location.replace("about:blank"):window.location.assign("about:blank");var W=F.protocol===window.location.protocol&&F.hostname===window.location.hostname&&F.port===window.location.port;if(W)return E!=null&&E.replace?window.location.replace(F.href):window.location.assign(F.href);var G=M(F.href);if(!G)throw new Error("Popup blocked: cross-origin navigation is opened in a new tab.")},u=new Proxy({},{get:function(K,E){switch(E){case"origin":return window.location.origin;case"protocol":return window.location.protocol;case"host":return window.location.host;case"hostname":return window.location.hostname;case"port":return window.location.port;case"pathname":return window.location.pathname;case"assign":return function(F){return b(F,{replace:!1})};case"replace":return function(F){return b(F,{replace:!0})};case"reload":return window.location.reload.bind(window.location);case"href":throw new Error("Reading location.href is not allowed.");default:throw new Error('Access to location property "'.concat(E,'" is not allowed.'))}},set:function(K,E,F){if(E==="href")return b(String(F),{replace:!1}),!0;throw new Error("Mutation on location is not allowed.")}}),V=A()(A()(A()({setTimeout:window.setTimeout.bind(window),clearTimeout:window.clearTimeout.bind(window),setInterval:window.setInterval.bind(window),clearInterval:window.clearInterval.bind(window),console,Math,Date,FormData},typeof Blob<"u"?{Blob}:{}),typeof URL<"u"?{URL}:{}),{},{addEventListener:addEventListener.bind(window),open:M,location:u},y||{}),I=Object.create(null);return new Proxy(I,{get:function(K,E){if(typeof E!="string")return Reflect.get(K,E);if(E in V)return V[E];if(Object.prototype.hasOwnProperty.call(K,E))return K[E];if(g(E)){var F=window[E];return typeof F=="function"?F.bind(window):F}throw new Error('Access to global property "'.concat(E,'" is not allowed.'))},set:function(K,E,F){if(typeof E!="string")return Reflect.set(K,E,F),!0;if(E in V)throw new Error('Mutation of global property "'.concat(E,'" is not allowed.'));return K[E]=F,!0},has:function(K,E){return typeof E!="string"?Reflect.has(K,E):!!(E in V||Object.prototype.hasOwnProperty.call(K,E)||g(E))}})}function z(y){var $=A()({createElement:document.createElement.bind(document),querySelector:document.querySelector.bind(document),querySelectorAll:document.querySelectorAll.bind(document)},y||{}),M=Object.create(null);return new Proxy(M,{get:function(u,V){if(typeof V!="string")return Reflect.get(u,V);if(V in $)return $[V];if(Object.prototype.hasOwnProperty.call(u,V))return u[V];if(a(V)){var I=document[V];return typeof I=="function"?I.bind(document):I}throw new Error('Access to document property "'.concat(V,'" is not allowed.'))},set:function(u,V,I){if(typeof V!="string")return Reflect.set(u,V,I),!0;if(V in $)throw new Error('Mutation of document property "'.concat(V,'" is not allowed.'));return u[V]=I,!0},has:function(u,V){return typeof V!="string"?Reflect.has(u,V):!!(V in $||Object.prototype.hasOwnProperty.call(u,V)||a(V))}})}function X(y){var $,M=typeof window<"u"&&window.navigator||void 0,b={},u=M==null||($=M.clipboard)===null||$===void 0?void 0:$.writeText;typeof u=="function"&&(b.writeText=u.bind(M.clipboard));var V={clipboard:b};return Object.defineProperty(V,"onLine",{get:function(){return!!(M!=null&&M.onLine)},enumerable:!0,configurable:!1}),Object.defineProperty(V,"language",{get:function(){return M==null?void 0:M.language},enumerable:!0,configurable:!1}),Object.defineProperty(V,"languages",{get:function(){return M!=null&&M.languages?C()(M.languages):void 0},enumerable:!0,configurable:!1}),Object.assign(V,y||{}),new Proxy({},{get:function(N,K){if(K in V)return V[K];throw new Error('Access to navigator property "'.concat(String(K),'" is not allowed.'))}})}function Q(y){var $={};try{var M=X();$.navigator=M;try{$.window=H({navigator:M})}catch{}}catch{}try{$.document=z()}catch{}return y?A()(A()({},$),y):$}function ce(y,$,M,b){return m.apply(this,arguments)}function m(){return m=U()(S()().mark(function y($,M,b,u){var V;return S()().wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(!(!$||P()($)!=="object"&&typeof $!="function")){N.next=2;break}return N.abrupt("return",void 0);case 2:if(V=$.runjs,typeof V=="function"){N.next=5;break}return N.abrupt("return",void 0);case 5:return N.abrupt("return",$.runjs(M,Q(u),b));case 6:case"end":return N.stop()}},y)})),m.apply(this,arguments)}},19433:function(Zt,Oe,e){"use strict";e.d(Oe,{A:function(){return A}});var ue=e(19632),S=e.n(ue),le=e(52677),P=e.n(le),p=e(5574),U=e.n(p);function J(O){var R={};return Object.entries(O||{}).forEach(function(w){var f=U()(w,2),B=f[0],T=f[1];typeof T<"u"&&T!==null&&(R[B]=T)}),R}function C(O,R,w){try{var f,B,T,g,a,H=(f=O.dataSourceManager)===null||f===void 0||(B=f.getDataSource)===null||B===void 0?void 0:B.call(f,R||"main"),z=H==null||(T=H.collectionManager)===null||T===void 0||(g=T.getCollection)===null||g===void 0?void 0:g.call(T,w),X=z==null||(a=z.getPrimaryKey)===null||a===void 0?void 0:a.call(z);return X||"id"}catch{return"id"}}function j(O,R){var w,f;if(R){var B=R.dataSourceKey||"main",T=R.collection||((w=R.record)===null||w===void 0?void 0:w.__collectionName);if(T){var g=C(O,B,T)||"id",a=typeof R.filterByTk<"u"?R.filterByTk:typeof R.id<"u"?R.id:(f=R.record)===null||f===void 0?void 0:f[g];if(!(typeof a>"u"))return J({collection:T,filterByTk:a,dataSourceKey:B,associationName:R.associationName,sourceId:R.sourceId,fields:R.fields,appends:R.appends})}}}function A(O){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=function(g){return!g||P()(g)!=="object"?!1:typeof g.collection=="string"&&(typeof g.filterByTk<"u"||typeof g.id<"u"||g.record)},f={},B=function T(g,a){if(w(g)){var H=j(O,g);if(H){var z=a.join(".");f[z]=H}return}if(Array.isArray(g)){for(var X=0;X<g.length;X++)T(g[X],[].concat(S()(a),[String(X)]));return}if(g&&P()(g)==="object"){for(var Q=0,ce=Object.entries(g);Q<ce.length;Q++){var m=U()(ce[Q],2),y=m[0],$=m[1];T($,[].concat(S()(a),[y]))}return}};return B(R,[]),Object.keys(f).length?f:void 0}},2991:function(Zt,Oe,e){"use strict";e.d(Oe,{Z:function(){return p}});var ue=e(5574),S=e.n(ue),le=e(52677),P=e.n(le);function p(U,J,C,j){var A={},O={},R=function(B){if(Object.prototype.hasOwnProperty.call(J,B)){var T=J[B],g={};if(T.uiSchema&&P()(T.uiSchema)==="object")for(var a=0,H=Object.entries(T.uiSchema);a<H.length;a++){var z=S()(H[a],2),X=z[0],Q=z[1];if(Q&&P()(Q)==="object"){var ce,m=Q;g[X]={type:m.type||"any",title:m.title||((ce=m["x-decorator-props"])===null||ce===void 0?void 0:ce.label)||X,interface:m["x-component"],uiSchema:m}}}var y=Object.keys(g).length>0;O[B]={type:"object",title:U.t(T.title)||B,display:y?"default":"none",properties:y?{params:{type:"object",title:"Parameters",display:"flatten",properties:g}}:void 0},A[B]={get params(){return C.getStepParams(j,B)||{}},get uiSchema(){return T.uiSchema},result:void 0}}};for(var w in J)R(w);U.defineProperty("steps",{get:function(){return A}})}},16184:function(Zt,Oe,e){"use strict";e.d(Oe,{D8:function(){return g},N3:function(){return y},RB:function(){return Q},Yp:function(){return H},_6:function(){return ce},a9:function(){return X},gn:function(){return m},lP:function(){return B},o3:function(){return T},p7:function(){return f},sg:function(){return w}});var ue=e(97857),S=e.n(ue),le=e(15009),P=e.n(le),p=e(99289),U=e.n(p),J=e(80770),C=e(19433),j=e(81886),A=e(54393),O=e(96486),R=e.n(O);function w(M){var b,u,V,I,N,K=M.resource,E=M.collection,F=M.record,L=(E==null?void 0:E.name)||(K==null||(b=K.getResourceName)===null||b===void 0?void 0:b.call(K)),x=(E==null?void 0:E.dataSourceKey)||(K==null||(u=K.getDataSourceKey)===null||u===void 0?void 0:u.call(K)),v=(V=K==null||(I=K.getFilterByTk)===null||I===void 0?void 0:I.call(K))!==null&&V!==void 0?V:E==null||(N=E.getFilterByTK)===null||N===void 0?void 0:N.call(E,F);if(!(!L||typeof v>"u"||v===null)){var W=String(L).split("."),G=W[W.length-1];return{collection:G,dataSourceKey:x,filterByTk:v}}}function f(M){var b,u,V,I=M.view;if(I){var N=(I==null?void 0:I.inputArgs)||{},K=(N==null?void 0:N.collectionName)||(I==null||(b=I.record)===null||b===void 0?void 0:b.collection),E=(N==null?void 0:N.dataSourceKey)||(I==null||(u=I.record)===null||u===void 0?void 0:u.dataSourceKey)||"main",F=(N==null?void 0:N.filterByTk)||(I==null||(V=I.record)===null||V===void 0?void 0:V.filterByTk),L=N==null?void 0:N.associationName,x=N==null?void 0:N.sourceId;if(!(!K||typeof F>"u"||F===null))return{collection:K,dataSourceKey:E,filterByTk:F,sourceId:x,associationName:L}}}function B(M,b){var u,V,I,N=(u=M.inputArgs)===null||u===void 0?void 0:u.record,K=(V=M.collection)===null||V===void 0?void 0:V.filterTargetKey;if(!(!N||!K)){var E=b.view,F=E==null||(I=E.inputArgs)===null||I===void 0?void 0:I.filterByTk,L=N[K];if(!(F==null||L==null)&&F===L)return R().cloneDeep(N)}}function T(M,b){return function(u){var V,I,N,K;if(!(u==="record"||u.startsWith("record.")))return!1;var E=b();if(!E)return!0;if(u==="record")return!1;var F=f(M),L=F==null?void 0:F.collection,x=(F==null?void 0:F.dataSourceKey)||"main";if(!L)return!0;var v=(V=M.dataSourceManager)===null||V===void 0||(I=V.getDataSource)===null||I===void 0?void 0:I.call(V,x),W=v==null||(N=v.collectionManager)===null||N===void 0||(K=N.getCollection)===null||K===void 0?void 0:K.call(N,L);if(!W)return!0;var G=(0,A.V)(function(){return W},function(){return E}),re=u.startsWith("record.")?u.slice(7):"";return re?G(re):!1}}function g(M,b){var u=(0,A.V)(M,function(){return b()});return function(V){var I=b();if(!I)return!0;if(!V)return!1;var N=M();if(!V.includes(".")){var K,E,F=V,L;if(N&&(typeof N.getField=="function"&&(L=N.getField(F)),!L&&typeof N.getFields=="function")){var x=N.getFields()||[];L=x.find(function(G){return(G==null?void 0:G.name)===F})}var v=!!((K=L)!==null&&K!==void 0&&(E=K.isAssociationField)!==null&&E!==void 0&&E.call(K));if(!v)return!1;var W=I==null?void 0:I[F];return W==null}return u(V)}}function a(M){var b,u,V,I,N=M.resource,K=((b=M.collection)===null||b===void 0?void 0:b.dataSourceKey)||(N==null||(u=N.getDataSourceKey)===null||u===void 0?void 0:u.call(N)),E=N==null||(V=N.getResourceName)===null||V===void 0?void 0:V.call(N),F=N==null||(I=N.getSourceId)===null||I===void 0?void 0:I.call(N);if(!(!E||typeof F>"u"||F===null)){var L=String(E).split(".");if(!(L.length<2))return{collection:L[0],dataSourceKey:K,filterByTk:F}}}function H(M,b,u){return z.apply(this,arguments)}function z(){return z=U()(P()().mark(function M(b,u,V){var I;return P()().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return K.next=2,(0,j.L)(b,u,!0)();case 2:if(I=K.sent,I){K.next=5;break}return K.abrupt("return",null);case 5:return K.abrupt("return",S()(S()({},I),{},{buildVariablesParams:function(F){return V?V(F):w(F)}}));case 6:case"end":return K.stop()}},M)})),z.apply(this,arguments)}function X(M,b,u){var V=function(){var I=U()(P()().mark(function N(){return P()().wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.abrupt("return",H(M,b,u));case 1:case"end":return E.stop()}},N)}));return function(){return I.apply(this,arguments)}}();return V.title=b,V}function Q(M,b,u){var V,I,N=u!=null&&u.title?((V=M.t)===null||V===void 0?void 0:V.call(M,u.title))||u.title:((I=M.t)===null||I===void 0?void 0:I.call(M,"Current record"))||"Current record";return X(b,N,function(K){return w(K)})}var ce=J._6,m=J.gn;function y(M,b){return $.apply(this,arguments)}function $(){return $=U()(P()().mark(function M(b,u){var V,I,N,K,E,F,L,x,v,W,G,re;return P()().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:if(V=(0,J.gn)(u)||{},I=Object.keys(V),I.length){te.next=4;break}return te.abrupt("return",void 0);case 4:N={},K=0,E=I;case 6:if(!(K<E.length)){te.next=37;break}if(L=E[K],x=(F=b.getPropertyOptions)===null||F===void 0?void 0:F.call(b,L),v=x==null?void 0:x.meta,v){te.next=12;break}return te.abrupt("continue",34);case 12:if(W=void 0,te.prev=13,typeof v!="function"){te.next=20;break}return te.next=17,v();case 17:te.t0=te.sent,te.next=21;break;case 20:te.t0=v;case 21:if(G=te.t0,re=G==null?void 0:G.buildVariablesParams,typeof re!="function"){te.next=27;break}return te.next=26,re(b);case 26:W=te.sent;case 27:te.next=33;break;case 29:return te.prev=29,te.t1=te.catch(13),te.t1,te.abrupt("continue",34);case 33:W&&(N[L]=W);case 34:K++,te.next=6;break;case 37:return te.abrupt("return",(0,C.A)(b,N));case 38:case"end":return te.stop()}},M,null,[[13,29]])})),$.apply(this,arguments)}},50476:function(Zt,Oe,e){"use strict";e.d(Oe,{QO:function(){return ee},K8:function(){return oe},k9:function(){return Ve},Rh:function(){return x},yT:function(){return te},qt:function(){return ve},Sv:function(){return Se}});var ue=e(5574),S=e.n(ue),le=e(97857),P=e.n(le),p=e(67294),U=e(22424),J=e(74655),C=e(67946),j=e(43992),A=e(15009),O=e.n(A),R=e(99289),w=e.n(R),f=e(52677),B=e.n(f),T=e(16184);function g(Ae){if(Ae===null||_typeof(Ae)!=="object")return!1;var Re=Object.getPrototypeOf(Ae);return Re===Object.prototype||Re===null}function a(Ae,Re,Be){var ae=_typeof(Ae);return Ae==null?{type:"any",title:Re}:Array.isArray(Ae)?{type:"array",title:Re,properties:function(){var Me=_asyncToGenerator(_regeneratorRuntime().mark(function Le(){var Xe,ht,St,Ye;return _regeneratorRuntime().wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:for(Xe=Math.min(Ae.length||0,10),ht={},St=Be??new WeakSet,Ye=0;Ye<Xe;Ye++)ht[String(Ye)]=a(Ae[Ye],"#".concat(Ye),St);return bt.abrupt("return",ht);case 5:case"end":return bt.stop()}},Le)}));function He(){return Me.apply(this,arguments)}return He}()}:ae==="string"?{type:"string",title:Re}:ae==="number"?{type:"number",title:Re}:ae==="boolean"?{type:"boolean",title:Re}:ae==="object"&&g(Ae)?{type:"object",title:Re,properties:function(){var Me=_asyncToGenerator(_regeneratorRuntime().mark(function Le(){var Xe,ht;return _regeneratorRuntime().wrap(function(Ye){for(;;)switch(Ye.prev=Ye.next){case 0:if(Xe=Be??new WeakSet,!Xe.has(Ae)){Ye.next=3;break}return Ye.abrupt("return",{});case 3:return Xe.add(Ae),ht={},Object.keys(Ae||{}).forEach(function(pt){ht[pt]=a(Ae[pt],pt,Xe)}),Ye.abrupt("return",ht);case 7:case"end":return Ye.stop()}},Le)}));function He(){return Me.apply(this,arguments)}return He}()}:{type:"any",title:Re}}function H(Ae,Re){var Be=function(bt){return Ae.t(bt)},ae=function(bt){var en,Rn;if(!bt)return!1;var Bn=Array.isArray((en=bt.navigation)===null||en===void 0?void 0:en.viewStack)?bt.navigation.viewStack:[],hn=bt==null||(Rn=bt.inputArgs)===null||Rn===void 0?void 0:Rn.openerUids,Lt=Array.isArray(hn)&&hn.length>0;return Bn.length>=2||Lt},Me=function(){return ae(Re??Ae.view)},He=function(){var pt=w()(O()().mark(function bt(en){var Rn,Bn,hn;return O()().wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:if(Rn=Re??en.view,!(!Rn||!ae(Rn))){Je.next=3;break}return Je.abrupt("return",void 0);case 3:return Je.next=5,z(en,Rn);case 5:if(Bn=Je.sent,hn=Bn==null?void 0:Bn.resource,!(hn!=null&&hn.collectionName&&hn.filterByTk!=null)){Je.next=9;break}return Je.abrupt("return",{collection:hn.collectionName,dataSourceKey:hn.dataSourceKey||"main",filterByTk:hn.filterByTk,associationName:hn.associationName,sourceId:hn.sourceId});case 9:return Je.abrupt("return",(0,T.p7)(en));case 10:case"end":return Je.stop()}},bt)}));return function(en){return pt.apply(this,arguments)}}(),Le=function(){var pt=w()(O()().mark(function bt(){var en,Rn,Bn,hn,Lt,Je;return O()().wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return lt.next=2,He(Ae);case 2:if(Lt=lt.sent,Lt!=null&&Lt.collection){lt.next=5;break}return lt.abrupt("return",null);case 5:return Je=(en=Ae.dataSourceManager)===null||en===void 0||(Rn=en.getDataSource)===null||Rn===void 0?void 0:Rn.call(en,Lt.dataSourceKey||"main"),lt.abrupt("return",(Je==null||(Bn=Je.collectionManager)===null||Bn===void 0||(hn=Bn.getCollection)===null||hn===void 0?void 0:hn.call(Bn,Lt.collection))||null);case 7:case"end":return lt.stop()}},bt)}));return function(){return pt.apply(this,arguments)}}(),Xe=function(){var pt=w()(O()().mark(function bt(en,Rn){var Bn,hn,Lt,Je,xt,lt,_t,Et,Yt,Pn,Tn,gn,fn,on,Kt,vr,Gr,er,nr,kr;return O()().wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:if(Nr.prev=0,lt=Rn||Ae,_t=(Bn=lt.view)===null||Bn===void 0?void 0:Bn.navigation,Et=Array.isArray(_t==null?void 0:_t.viewStack)?_t.viewStack:[],!(Et.length<2||en<1)){Nr.next=6;break}return Nr.abrupt("return",void 0);case 6:if(Yt=Et.length-1-en,!(Yt<0)){Nr.next=9;break}return Nr.abrupt("return",void 0);case 9:if(Pn=Et[Yt],Pn!=null&&Pn.viewUid){Nr.next=12;break}return Nr.abrupt("return",void 0);case 12:if(Tn=(hn=lt.engine)===null||hn===void 0?void 0:hn.getModel(Pn.viewUid,!0),Tn){Nr.next=23;break}return Nr.prev=14,Nr.next=17,lt.engine.loadModel({uid:Pn.viewUid});case 17:Tn=Nr.sent,Nr.next=23;break;case 20:Nr.prev=20,Nr.t0=Nr.catch(14),(gn=lt.logger||Ae.logger)===null||gn===void 0||(fn=gn.warn)===null||fn===void 0||fn.call(gn,{err:Nr.t0},"[FlowEngine] popup.getParentRecordRef loadModel failed");case 23:if(on=((Lt=Tn)===null||Lt===void 0||(Je=Lt.getStepParams)===null||Je===void 0?void 0:Je.call(Lt,"popupSettings","openView"))||{},Kt=on==null?void 0:on.collectionName,vr=(on==null?void 0:on.dataSourceKey)||"main",Gr=(xt=Pn==null?void 0:Pn.filterByTk)!==null&&xt!==void 0?xt:Pn==null?void 0:Pn.sourceId,!(!Kt||typeof Gr>"u"||Gr===null)){Nr.next=29;break}return Nr.abrupt("return",void 0);case 29:return er={collection:Kt,dataSourceKey:vr,filterByTk:Gr,sourceId:Pn==null?void 0:Pn.sourceId,associationName:on==null?void 0:on.associationName},Nr.abrupt("return",er);case 33:return Nr.prev=33,Nr.t1=Nr.catch(0),(nr=(Rn==null?void 0:Rn.logger)||Ae.logger)===null||nr===void 0||(kr=nr.warn)===null||kr===void 0||kr.call(nr,{err:Nr.t1},"[FlowEngine] popup.getParentRecordRef failed"),Nr.abrupt("return",void 0);case 37:case"end":return Nr.stop()}},bt,null,[[0,33],[14,20]])}));return function(en,Rn){return pt.apply(this,arguments)}}(),ht=function(bt){try{var en,Rn=(en=Re??Ae.view)===null||en===void 0?void 0:en.navigation,Bn=Array.isArray(Rn==null?void 0:Rn.viewStack)?Rn.viewStack:[];return Bn.length>=bt+1}catch{return!1}},St=function(bt){var en=function(){var Bn={type:"object",title:Be("Parent popup"),disabled:function(){return!ht(bt)},disabledReason:function(){return ht(bt)?void 0:Be("No parent popup")},hidden:function(){return!ht(bt)},properties:function(){var hn=w()(O()().mark(function Je(){var xt,lt,_t,Et,Yt;return O()().wrap(function(Tn){for(;;)switch(Tn.prev=Tn.next){case 0:return Tn.next=2,Xe(bt);case 2:if(xt=Tn.sent,lt={},lt.uid={type:"string",title:Be("Popup uid")},!xt){Tn.next=13;break}return _t=function(){try{var gn,fn,on,Kt,vr=(gn=Ae.dataSourceManager)===null||gn===void 0||(fn=gn.getDataSource)===null||fn===void 0?void 0:fn.call(gn,xt.dataSourceKey||"main");return(vr==null||(on=vr.collectionManager)===null||on===void 0||(Kt=on.getCollection)===null||Kt===void 0?void 0:Kt.call(on,xt.collection||""))||null}catch{return null}}(),Tn.next=9,(0,T.Yp)(function(){return _t},Be("Popup record"),function(){return xt});case 9:Et=Tn.sent,lt.record=Et||{type:"object",title:Be("Popup record")},Tn.next=14;break;case 13:lt.record={type:"object",title:Be("Popup record")};case 14:return Yt={type:"object",title:Be("Data source"),properties:function(){var gn=w()(O()().mark(function on(){return O()().wrap(function(vr){for(;;)switch(vr.prev=vr.next){case 0:return vr.abrupt("return",{dataSourceKey:{type:"string",title:Be("Data source key")},collectionName:{type:"string",title:Be("Collection name")},associationName:{type:"string",title:Be("Association name")},filterByTk:{type:"string",title:Be("filterByTk")},sourceId:{type:"string",title:Be("sourceId")}});case 1:case"end":return vr.stop()}},on)}));function fn(){return gn.apply(this,arguments)}return fn}()},lt.resource=Yt,Tn.abrupt("return",lt);case 17:case"end":return Tn.stop()}},Je)}));function Lt(){return hn.apply(this,arguments)}return Lt}()};return Bn};return en.title=Be("Parent popup"),en},Ye=function(){var bt={type:"object",title:Be("Current popup"),disabled:function(){return!Me()},hidden:function(){return!Me()},buildVariablesParams:function(){var en=w()(O()().mark(function Bn(hn){var Lt,Je,xt,lt,_t,Et,Yt,Pn,Tn,gn,fn,on,Kt,vr,Gr,er,nr,kr,Yr;return O()().wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:if(Me()){Dr.next=2;break}return Dr.abrupt("return",void 0);case 2:return Dr.next=4,He(hn);case 4:if(Je=Dr.sent,xt=(Lt=hn.view)===null||Lt===void 0?void 0:Lt.inputArgs,lt={},Je&&(_t=P()({},Je),!_t.associationName&&xt!==null&&xt!==void 0&&xt.associationName&&(_t.associationName=xt.associationName),typeof _t.sourceId>"u"&&typeof(xt==null?void 0:xt.sourceId)<"u"&&(_t.sourceId=xt==null?void 0:xt.sourceId),lt.record=_t),Dr.prev=8,Yt=(Et=hn.view)===null||Et===void 0?void 0:Et.navigation,Pn=Array.isArray(Yt==null?void 0:Yt.viewStack)?Yt.viewStack:[],!(Pn.length>=2)){Dr.next=27;break}return Tn=lt,gn=1,Dr.next=16,Xe(gn,hn);case 16:fn=Dr.sent;case 17:if(!fn){Dr.next=27;break}return Tn.parent||(Tn.parent={}),Tn.parent.record=fn,Tn=Tn.parent,gn+=1,Dr.next=24,Xe(gn,hn);case 24:fn=Dr.sent,Dr.next=17;break;case 27:Dr.next=32;break;case 29:Dr.prev=29,Dr.t0=Dr.catch(8),(on=hn.logger)===null||on===void 0||(Kt=on.debug)===null||Kt===void 0||Kt.call(on,{err:Dr.t0},"[FlowEngine] buildVariablesParams: build parent-chain failed");case 32:try{vr=xt==null?void 0:xt.sourceId,Gr=xt==null?void 0:xt.associationName,er=(xt==null?void 0:xt.dataSourceKey)||"main",vr!=null&&vr!==""&&Gr&&typeof Gr=="string"&&(nr=String(Gr).split(".")[0],nr&&(lt.sourceRecord={collection:nr,dataSourceKey:er,filterByTk:vr}))}catch(Wn){(kr=hn.logger)===null||kr===void 0||(Yr=kr.debug)===null||Yr===void 0||Yr.call(kr,{err:Wn},"[FlowEngine] buildVariablesParams: infer sourceRecord failed")}return Dr.abrupt("return",lt);case 34:case"end":return Dr.stop()}},Bn,null,[[8,29]])}));function Rn(Bn){return en.apply(this,arguments)}return Rn}(),properties:function(){var en=w()(O()().mark(function Bn(){var hn,Lt,Je,xt,lt,_t,Et,Yt,Pn,Tn,gn,fn,on,Kt,vr,Gr,er,nr,kr,Yr,Nr,Dr,Wn,an;return O()().wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:return hn={},hn.uid={type:"string",title:Be("Popup uid")},rn.next=4,He(Ae);case 4:if(Lt=rn.sent,Lt&&(Je=function(){var yn=w()(O()().mark(function At(){var rt;return O()().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:return It.next=2,Le();case 2:if(rt=It.sent,rt){It.next=5;break}return It.abrupt("return",null);case 5:return It.next=7,(0,T.Yp)(function(){return rt},Be("Current popup record"),function(Mt){return He(Mt)});case 7:return It.abrupt("return",It.sent);case 8:case"end":return It.stop()}},At)}));return function(){return yn.apply(this,arguments)}}(),Je.title=Be("Current popup record"),Je.hasChildren=!0,hn.record=Je),rn.prev=6,lt=(xt=Ae.view)===null||xt===void 0?void 0:xt.inputArgs,_t=lt==null?void 0:lt.sourceId,Et=lt==null?void 0:lt.associationName,Yt=(lt==null?void 0:lt.dataSourceKey)||"main",!(!Et||typeof Et!="string"||!Et.includes("."))){rn.next=24;break}if(Tn=(Pn=Ae.view)===null||Pn===void 0?void 0:Pn.navigation,gn=Array.isArray(Tn==null?void 0:Tn.viewStack)?Tn.viewStack:[],fn=gn==null?void 0:gn[gn.length-1],!(fn!=null&&fn.viewUid)){rn.next=24;break}if(Gr=Ae==null||(on=Ae.engine)===null||on===void 0?void 0:on.getModel(fn.viewUid,!0),Gr){rn.next=21;break}return rn.next=20,Ae.engine.loadModel({uid:fn.viewUid});case 20:Gr=rn.sent;case 21:er=((Kt=Gr)===null||Kt===void 0||(vr=Kt.getStepParams)===null||vr===void 0?void 0:vr.call(Kt,"popupSettings","openView"))||{},Et=(er==null?void 0:er.associationName)||Et,Yt=(er==null?void 0:er.dataSourceKey)||Yt;case 24:if(!(_t!=null&&_t!==""&&Et&&typeof Et=="string")){rn.next=32;break}if(nr=String(Et).includes(".")?String(Et).split(".")[0]:void 0,!nr){rn.next=32;break}return kr=function(){try{var At,rt,Ot,It,Mt=(At=Ae.dataSourceManager)===null||At===void 0||(rt=At.getDataSource)===null||rt===void 0?void 0:rt.call(At,Yt);return(Mt==null||(Ot=Mt.collectionManager)===null||Ot===void 0||(It=Ot.getCollection)===null||It===void 0?void 0:It.call(Ot,nr))||null}catch{return null}},rn.next=30,(0,T.Yp)(kr,Be("Current popup parent record"),function(){return{collection:nr,dataSourceKey:Yt,filterByTk:_t}});case 30:Yr=rn.sent,Yr&&(hn.sourceRecord=Yr);case 32:rn.next=37;break;case 34:rn.prev=34,rn.t0=rn.catch(6),(Nr=Ae.logger)===null||Nr===void 0||(Dr=Nr.debug)===null||Dr===void 0||Dr.call(Nr,{err:rn.t0},"[FlowEngine] popup.properties: build sourceRecord failed");case 37:return Wn={type:"object",title:Be("Data source"),properties:function(){var yn=w()(O()().mark(function rt(){return O()().wrap(function(It){for(;;)switch(It.prev=It.next){case 0:return It.abrupt("return",{dataSourceKey:{type:"string",title:Be("Data source key")},collectionName:{type:"string",title:Be("Collection name")},associationName:{type:"string",title:Be("Association name")},filterByTk:{type:"string",title:Be("filterByTk")},sourceId:{type:"string",title:Be("sourceId")}});case 1:case"end":return It.stop()}},rt)}));function At(){return yn.apply(this,arguments)}return At}()},hn.resource=Wn,rn.next=41,Xe(1);case 41:return an=rn.sent,an&&(hn.parent=St(1)),rn.abrupt("return",hn);case 44:case"end":return rn.stop()}},Bn,null,[[6,34]])}));function Rn(){return en.apply(this,arguments)}return Rn}()};return bt};return Ye.title=Be("Current popup"),Ye.sort=975,Ye}function z(Ae,Re){return X.apply(this,arguments)}function X(){return X=w()(O()().mark(function Ae(Re,Be){var ae,Me,He,Le,Xe,ht,St,Ye,pt,bt,en,Rn;return O()().wrap(function(hn){for(;;)switch(hn.prev=hn.next){case 0:if(He=Be==null?void 0:Be.navigation,Le=Array.isArray(He==null?void 0:He.viewStack)?He.viewStack:[],Xe=Be==null||(ae=Be.inputArgs)===null||ae===void 0?void 0:ae.openerUids,ht=Array.isArray(Xe)&&Xe.length>0,St=Le.length>=2,Ye=St||ht,Ye){hn.next=8;break}return hn.abrupt("return",void 0);case 8:if(Le.length){hn.next=14;break}if(pt=(Be==null?void 0:Be.inputArgs)||{},bt=pt.collectionName||pt.filterByTk!=null||pt.sourceId!=null||pt.associationName||pt.viewUid,bt){hn.next=13;break}return hn.abrupt("return",void 0);case 13:return hn.abrupt("return",{uid:pt.viewUid,resource:{dataSourceKey:pt.dataSourceKey||"main",collectionName:pt.collectionName,associationName:pt.associationName,filterByTk:pt.filterByTk,sourceId:pt.sourceId}});case 14:return en=function(){var Lt=w()(O()().mark(function Je(xt){var lt,_t,Et,Yt,Pn,Tn,gn,fn,on,Kt,vr,Gr,er,nr;return O()().wrap(function(Yr){for(;;)switch(Yr.prev=Yr.next){case 0:if(!(xt<0||!((lt=Le[xt])!==null&&lt!==void 0&&lt.viewUid))){Yr.next=2;break}return Yr.abrupt("return",void 0);case 2:if(gn=Le[xt].viewUid,fn=(_t=Re.engine)===null||_t===void 0?void 0:_t.getModel(gn,!0),fn){Yr.next=8;break}return Yr.next=7,(on=Re.engine)===null||on===void 0?void 0:on.loadModel({uid:gn});case 7:fn=Yr.sent;case 8:return Kt=((Et=fn)===null||Et===void 0||(Yt=Et.getStepParams)===null||Yt===void 0?void 0:Yt.call(Et,"popupSettings","openView"))||{},vr=Kt==null?void 0:Kt.collectionName,Gr=(Kt==null?void 0:Kt.dataSourceKey)||"main",er={uid:gn,resource:{dataSourceKey:Gr,collectionName:vr,associationName:Kt==null?void 0:Kt.associationName,filterByTk:(Pn=Le[xt])===null||Pn===void 0?void 0:Pn.filterByTk,sourceId:(Tn=Le[xt])===null||Tn===void 0?void 0:Tn.sourceId}},Yr.next=14,en(xt-1);case 14:return nr=Yr.sent,nr&&(er.parent=nr),Yr.abrupt("return",er);case 17:case"end":return Yr.stop()}},Je)}));return function(xt){return Lt.apply(this,arguments)}}(),hn.next=17,en(((Be==null||(Me=Be.navigation)===null||Me===void 0||(Me=Me.viewStack)===null||Me===void 0?void 0:Me.length)||1)-1);case 17:return Rn=hn.sent,hn.abrupt("return",Rn);case 19:case"end":return hn.stop()}},Ae)})),X.apply(this,arguments)}function Q(Ae,Re){var Be=/^(?:record|sourceRecord)(?:\.|$)|^parent(?:\.parent)*(?:\.(?:record|sourceRecord))(?:\.|$)/;Ae.defineProperty("popup",{get:function(){var ae=w()(O()().mark(function He(){return O()().wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return Xe.abrupt("return",z(Ae,Re));case 1:case"end":return Xe.stop()}},He)}));function Me(){return ae.apply(this,arguments)}return Me}(),meta:H(Ae,Re),resolveOnServer:function(Me){try{return!!Me&&Be.test(Me)}catch{return!1}}})}var ce=e(13769),m=e.n(ce),y=e(5914),$=e(85893),M=["afterClose","footer","header","hidden"],b=(0,p.forwardRef)(function(Ae,Re){var Be,ae=Ae.afterClose,Me=Ae.footer,He=Ae.header,Le=Ae.hidden,Xe=m()(Ae,M),ht=(0,p.useState)(!0),St=S()(ht,2),Ye=St[0],pt=St[1],bt=(0,p.useState)(Xe),en=S()(bt,2),Rn=en[0],Bn=en[1],hn=(0,p.useState)(function(){return Me}),Lt=S()(hn,2),Je=Lt[0],xt=Lt[1],lt=(0,p.useState)(He),_t=S()(lt,2),Et=_t[0],Yt=_t[1];(0,p.useImperativeHandle)(Re,function(){return{destroy:function(){pt(!1),ae==null||ae()},update:function(fn){return Bn(function(on){return P()(P()({},on),fn)})},setFooter:function(fn){xt(fn)},setHeader:function(fn){Object.values(fn||{}).length===0?Yt(null):Yt(fn)}}});var Pn=P()(P()({},Rn),{},{title:(Et==null?void 0:Et.title)||Rn.title,extra:Et==null?void 0:Et.extra,footer:Je!==void 0?Je:(Be=Rn.footer)!==null&&Be!==void 0?Be:null}),Tn=p.useMemo(function(){return document.querySelector("#nocobase-app-container")},[]);return(0,$.jsx)(y.Z,P()(P()({closable:!1,rootClassName:Le?"nb-hidden":"",getContainer:Tn},Pn),{},{open:Ye,onCancel:Rn.onCancel,afterClose:function(){ae==null||ae()},children:Rn.children}))}),u=b,V=e(19632),I=e.n(V);function N(){var Ae=p.useState([]),Re=S()(Ae,2),Be=Re[0],ae=Re[1],Me=p.useCallback(function(He){return ae(function(Le){return[].concat(I()(Le),[He])}),function(){ae(function(Le){return Le.filter(function(Xe){return Xe!==He})})}},[]);return[Be,Me]}var K=e(84995),E=e(24084),F=e(67940),L=0;function x(){var Ae=p.useRef(null),Re=function(He,Le){var Xe,ht,St,Ye=Le==null?void 0:Le.engine;L+=1;var pt=p.createRef(),bt,en,Rn=new Promise(function(gn){en=gn}),Bn=null,hn=null,Lt=function(fn){var on=fn.children;return p.useEffect(function(){var Kt;return Bn=on,(Kt=pt.current)===null||Kt===void 0||Kt.setFooter(on),function(){var vr;Bn=null,(vr=pt.current)===null||vr===void 0||vr.setFooter(null)}},[on]),null},Je=function(fn){return p.useEffect(function(){var on;return hn=fn,(on=pt.current)===null||on===void 0||on.setHeader(fn),function(){var Kt;hn=null,(Kt=pt.current)===null||Kt===void 0||Kt.setHeader(null)}},[fn]),null},xt=new C.iT,lt=(0,F.$)(Le.engine),_t=(0,K.GA)(Ye,lt);xt.defineProperty("engine",{value:lt}),xt.addDelegate(lt.context),He.inheritContext!==!1?xt.addDelegate(Le):xt.addDelegate(Le.engine.context);var Et={type:"dialog",inputArgs:He.inputArgs||{},preventClose:!!He.preventClose,destroy:function(fn){var on,Kt,vr,Gr,er,nr;(on=He.onClose)===null||on===void 0||on.call(He),(Kt=pt.current)===null||Kt===void 0||Kt.destroy(),(vr=bt)===null||vr===void 0||vr(),(Gr=en)===null||Gr===void 0||Gr(fn);var kr=_t==null?void 0:_t.emitter;(0,K.YB)(kr),kr==null||(er=kr.emit)===null||er===void 0||er.call(kr,K.cn,{type:"dialog",viewUid:Et==null||(nr=Et.inputArgs)===null||nr===void 0?void 0:nr.viewUid}),lt.unlinkFromStack()},update:function(fn){var on;return(on=pt.current)===null||on===void 0?void 0:on.update(fn)},close:function(fn,on){var Kt;if(!(He.preventClose&&!on)){if(He.triggerByRouter&&(Kt=He.inputArgs)!==null&&Kt!==void 0&&(Kt=Kt.navigation)!==null&&Kt!==void 0&&Kt.back){He.inputArgs.navigation.back();return}Et.destroy(fn)}},Footer:Lt,Header:Je,setFooter:function(fn){var on;Bn=fn,(on=pt.current)===null||on===void 0||on.setFooter(fn)},setHeader:function(fn){var on;hn=fn,(on=pt.current)===null||on===void 0||on.setHeader(fn)},navigation:(Xe=He.inputArgs)===null||Xe===void 0?void 0:Xe.navigation,get record(){return(0,T.lP)(Le,xt)}};xt.defineProperty("view",{get:function(){return Et},resolveOnServer:(0,T.o3)(xt,function(){return(0,T.lP)(Le,xt)})}),Q(xt,Et);var Yt=(0,J.observer)(function(){var gn,fn,on=p.useRef(!1),Kt=typeof He.content=="function"?He.content(Et,xt):He.content,vr=typeof Kt=="string"?(0,$.jsx)("div",{dangerouslySetInnerHTML:{__html:U.Z.sanitize(Kt)}}):Kt;return p.useEffect(function(){var Gr;(Gr=He.onOpen)===null||Gr===void 0||Gr.call(He,Et,xt)},[]),(gn=He.inputArgs)!==null&&gn!==void 0&&(gn=gn.hidden)!==null&&gn!==void 0&&gn.value&&!on.current?null:(on.current=!0,(0,$.jsx)(u,P()(P()({className:"nb-dialog-overflow-hidden",ref:pt,hidden:(fn=He.inputArgs)===null||fn===void 0||(fn=fn.hidden)===null||fn===void 0?void 0:fn.value,footer:Bn,header:hn},He),{},{onCancel:function(){Et.close(He.result)},children:vr})))},{displayName:"DialogWithContext"}),Pn=(He==null||(ht=He.inputArgs)===null||ht===void 0?void 0:ht.viewUid)||"page-".concat(L),Tn=(0,$.jsx)(E.r6,{engine:lt,children:(0,$.jsx)(j.Y5,{context:xt,children:(0,$.jsx)(Yt,{})})},Pn);return bt=(St=Ae.current)===null||St===void 0?void 0:St.patchElement(Tn),Object.assign(Rn,Et)},Be=p.useMemo(function(){return{open:Re}},[]),ae=p.memo(p.forwardRef(function(Me,He){var Le=N(),Xe=S()(Le,2),ht=Xe[0],St=Xe[1];return p.useImperativeHandle(He,function(){return{patchElement:St}},[St]),(0,$.jsx)($.Fragment,{children:ht})}));return[Be,(0,$.jsx)(ae,{ref:Ae},"dialog-holder")]}var v=e(95012),W=e(54182),G=["children","footer","title","extra","hidden","isMobile"],re=p.forwardRef(function(Ae,Re){var Be,ae=Ae.children,Me=Ae.footer,He=Ae.title,Le=Ae.extra,Xe=Ae.hidden,ht=Ae.isMobile,St=m()(Ae,G),Ye=p.useState(!0),pt=S()(Ye,2),bt=pt[0],en=pt[1],Rn=p.useState(function(){return Me}),Bn=S()(Rn,2),hn=Bn[0],Lt=Bn[1],Je=p.useState(P()({title:He,extra:Le},St.header)),xt=S()(Je,2),lt=xt[0],_t=xt[1];p.useImperativeHandle(Re,function(){return{destroy:function(){en(!1)},update:function(Pn){Object.assign(St,Pn)},setFooter:function(Pn){Lt(Pn)},setHeader:function(Pn){Object.values(Pn||{}).length===0?_t(null):_t(Pn)}}},[]);var Et=p.useMemo(function(){return document.querySelector("#nocobase-app-container")},[]);return ht?(0,$.jsx)(W.E,P()(P()(P()({className:Xe?"nb-hidden":"",visible:bt},St),{},{footer:hn},lt),{},{onClose:St.onClose,children:ae})):(0,$.jsx)(v.Z,P()(P()(P()({rootClassName:Xe?"nb-hidden":"",closable:!1,getContainer:Et},St),{},{open:bt,footer:hn,styles:P()(P()({},St.styles),{},{footer:P()({display:"flex",justifyContent:"flex-end"},(Be=St.styles)===null||Be===void 0?void 0:Be.footer)})},lt),{},{onClose:St.onClose,children:ae}))}),q=re;function te(){var Ae=p.useRef(null),Re=p.useMemo(function(){return J.observable.shallow({value:[]})},[]),Be=p.memo(function(Le){var Xe=Le.index,ht=p.useState(null),St=S()(ht,2),Ye=St[0],pt=St[1];return p.useEffect(function(){(0,J.autorun)(function(){var bt=Re.value;bt[Xe]&&Ye!==bt[Xe]&&pt(bt[Xe]),bt[Xe]||pt(null)})},[Ye,Xe]),Ye?(0,$.jsx)(Ye,{children:(0,$.jsx)(Be,{index:Xe+1})}):null});Be.displayName="RenderNestedDrawer";var ae=function(Xe,ht){var St,Ye,pt=ht.engine,bt=p.createRef(),en,Rn,Bn=new Promise(function(gn){Rn=gn}),hn=null,Lt=null,Je=function(fn){var on=fn.children;return p.useEffect(function(){var Kt;return hn=on,(Kt=bt.current)===null||Kt===void 0||Kt.setFooter(on),function(){var vr;hn=null,(vr=bt.current)===null||vr===void 0||vr.setFooter(null)}},[on]),null},xt=function(fn){return p.useEffect(function(){var on;return Lt=fn,(on=bt.current)===null||on===void 0||on.setHeader(fn),function(){var Kt;Lt=null,(Kt=bt.current)===null||Kt===void 0||Kt.setHeader(null)}},[fn]),null},lt=new C.iT,_t=(0,F.$)(ht.engine),Et=(0,K.GA)(pt,_t);lt.defineProperty("engine",{value:_t}),lt.addDelegate(_t.context),Xe.inheritContext!==!1?lt.addDelegate(ht):lt.addDelegate(ht.engine.context);var Yt={type:"drawer",inputArgs:Xe.inputArgs||{},preventClose:!!Xe.preventClose,destroy:function(fn){var on,Kt,vr,Gr,er,nr;(on=Xe.onClose)===null||on===void 0||on.call(Xe),(Kt=bt.current)===null||Kt===void 0||Kt.destroy(),(vr=en)===null||vr===void 0||vr(),(Gr=Rn)===null||Gr===void 0||Gr(fn);var kr=Et==null?void 0:Et.emitter;(0,K.YB)(kr),kr==null||(er=kr.emit)===null||er===void 0||er.call(kr,K.cn,{type:"drawer",viewUid:Yt==null||(nr=Yt.inputArgs)===null||nr===void 0?void 0:nr.viewUid}),_t.unlinkFromStack()},update:function(fn){var on;return(on=bt.current)===null||on===void 0?void 0:on.update(fn)},close:function(fn,on){var Kt;if(!(Xe.preventClose&&!on)){if(Xe.triggerByRouter&&(Kt=Xe.inputArgs)!==null&&Kt!==void 0&&(Kt=Kt.navigation)!==null&&Kt!==void 0&&Kt.back){Xe.inputArgs.navigation.back();return}Yt.destroy(fn)}},Footer:Je,Header:xt,setFooter:function(fn){var on;hn=fn,(on=bt.current)===null||on===void 0||on.setFooter(fn)},setHeader:function(fn){var on;Lt=fn,(on=bt.current)===null||on===void 0||on.setHeader(fn)},navigation:(St=Xe.inputArgs)===null||St===void 0?void 0:St.navigation,get record(){return(0,T.lP)(ht,lt)}};lt.defineProperty("view",{get:function(){return Yt},resolveOnServer:(0,T.o3)(lt,function(){return(0,T.lP)(ht,lt)})}),Q(lt,Yt);var Pn=p.memo((0,J.observer)(function(gn){var fn,on,Kt=p.useRef(!1),vr=typeof Xe.content=="function"?Xe.content(Yt,lt):Xe.content,Gr=typeof vr=="string"?(0,$.jsx)("div",{dangerouslySetInnerHTML:{__html:U.Z.sanitize(vr)}}):vr;return p.useEffect(function(){var er;(er=Xe.onOpen)===null||er===void 0||er.call(Xe,Yt,lt)},[]),(fn=Xe.inputArgs)!==null&&fn!==void 0&&(fn=fn.hidden)!==null&&fn!==void 0&&fn.value&&!Kt.current?(0,$.jsx)($.Fragment,{children:gn.children}):(Kt.current=!0,(0,$.jsxs)(q,P()(P()({ref:bt},Xe),{},{footer:hn,header:Xe.header||Lt,hidden:(on=Xe.inputArgs)===null||on===void 0||(on=on.hidden)===null||on===void 0?void 0:on.value,onClose:function(){Yt.close(Xe.result)},isMobile:lt.isMobileLayout,children:[Gr,gn.children]})))}));Pn.displayName="DrawerWithContext";var Tn=p.memo(function(gn){var fn=gn.children;return(0,$.jsx)(E.r6,{engine:_t,children:(0,$.jsx)(j.Y5,{context:lt,children:(0,$.jsx)(Pn,{children:fn})})})});return Tn.displayName="RenderDrawer",en=(Ye=Ae.current)===null||Ye===void 0?void 0:Ye.patchElement(Tn),Object.assign(Bn,Yt)},Me=p.useMemo(function(){return{open:ae}},[]),He=p.memo(p.forwardRef(function(Le,Xe){var ht=N(),St=S()(ht,2),Ye=St[0],pt=St[1];return p.useImperativeHandle(Xe,function(){return{patchElement:pt}},[pt]),p.useEffect(function(){Re.value=Ye},[Ye]),(0,$.jsx)(Be,{index:0})}));return[Me,(0,$.jsx)(He,{ref:Ae},"drawer-holder")]}var ye=e(73935),Pe=e(73475),Ee=e(83622),de=(0,p.forwardRef)(function(Ae,Re){var Be=p.useState({}),ae=S()(Be,2),Me=ae[0],He=ae[1],Le=P()(P()({},Ae),Me),Xe=Le.visible,ht=Xe===void 0?!0:Xe,St=Le.footer,Ye=St===void 0?null:St,pt=Le.header,bt=pt===void 0?null:pt,en=Le.children,Rn=Le.hidden,Bn=Le.title,hn=Le.styles,Lt=hn===void 0?{}:hn,Je=Le.zIndex,xt=Je===void 0?4:Je,lt=(0,p.useRef)(!1),_t=(0,E.Zr)(),Et=(0,p.useState)(function(){return Ye}),Yt=S()(Et,2),Pn=Yt[0],Tn=Yt[1],gn=(0,p.useState)(bt),fn=S()(gn,2),on=fn[0],Kt=fn[1];(0,p.useImperativeHandle)(Re,function(){return{destroy:function(){lt.current||(lt.current=!0)},update:function(kr){He(kr)},setFooter:function(kr){Tn(kr)},setHeader:function(kr){Object.values(kr||{}).length===0?Kt(null):Kt(kr)}}});var vr=(0,p.useMemo)(function(){return{display:Rn?"none":"flex",flexDirection:"column",height:"100%",zIndex:xt}},[Rn,xt]),Gr=(0,p.useMemo)(function(){if(!on&&!Bn)return null;var nr=on||{},kr=nr.title,Yr=kr===void 0?Bn:kr,Nr=nr.extra,Dr=_t.context.themeToken;return(0,$.jsxs)("div",{style:P()({display:"flex",alignItems:"center",justifyContent:"space-between",padding:"".concat(Dr.paddingSM,"px ").concat(Dr.padding,"px"),borderBottom:"1px solid ".concat(Dr.colorSplit),backgroundColor:Dr.colorBgContainer},Lt.header),children:[(0,$.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:Dr.marginXS},children:[(0,$.jsx)(Ee.ZP,{type:"text",size:"small",icon:(0,$.jsx)(Pe.Z,{}),onClick:function(){if(!lt.current){var an;lt.current=!0,(an=Ae.onClose)===null||an===void 0||an.call(Ae)}},style:{color:Dr.colorTextTertiary}}),Yr&&(0,$.jsx)("div",{style:{fontSize:Dr.fontSizeLG,fontWeight:Dr.fontWeightStrong,color:Dr.colorText},children:Yr})]}),Nr&&(0,$.jsx)("div",{children:Nr})]})},[on,Bn,_t.context.themeToken,Lt.header,Ae.onClose]),er=(0,p.useMemo)(function(){if(!Pn)return null;var nr=_t.context.themeToken;return(0,$.jsx)("div",{style:P()({display:"flex",justifyContent:"flex-end",alignItems:"center",padding:"".concat(nr.paddingXS,"px ").concat(nr.padding,"px"),borderTop:"1px solid ".concat(nr.colorSplit),backgroundColor:nr.colorBgContainer},Lt.footer),children:Pn})},[Pn,_t.context.themeToken,Lt.footer]);return ht?(0,$.jsxs)("div",{style:P()(P()({},vr),Lt.content),children:[Gr,(0,$.jsx)("div",{style:P()({flex:1,overflowY:"auto"},Lt.body),children:en}),er]}):null}),be=["target","content","preventClose","inheritContext","inputArgs"],me=0,oe="nocobase-embed-container",ee="nocobaseEmbedReplacing",xe=p.memo(p.forwardRef(function(Ae,Re){var Be=N(),ae=S()(Be,2),Me=ae[0],He=ae[1];return p.useImperativeHandle(Re,function(){return{patchElement:He}},[He]),(0,$.jsx)($.Fragment,{children:Me})}));function ve(){var Ae=p.useRef(null),Re=p.useRef(null),Be=function(He,Le){var Xe,ht=Le==null?void 0:Le.engine;me+=1;var St=p.createRef(),Ye,pt,bt=new Promise(function(nr){pt=nr}),en=function(kr){var Yr=kr.children;return p.useEffect(function(){var Nr;return(Nr=St.current)===null||Nr===void 0||Nr.setFooter(Yr),function(){var Dr;(Dr=St.current)===null||Dr===void 0||Dr.setFooter(null)}},[Yr]),null},Rn=function(kr){return p.useEffect(function(){var Yr;return(Yr=St.current)===null||Yr===void 0||Yr.setHeader(kr),function(){var Nr;(Nr=St.current)===null||Nr===void 0||Nr.setHeader(null)}},[kr]),null},Bn=He.target,hn=He.content,Lt=He.preventClose,Je=He.inheritContext,xt=Je===void 0?!0:Je,lt=He.inputArgs,_t=lt===void 0?{}:lt,Et=m()(He,be),Yt=Bn instanceof HTMLElement&&Bn.id===oe;if(Yt&&Re.current)try{Bn.dataset[ee]="1",Re.current.destroy()}finally{delete Bn.dataset[ee],Re.current=null}var Pn=new C.iT,Tn=(0,F.$)(Le.engine),gn=(0,K.GA)(ht,Tn);Pn.defineProperty("engine",{value:Tn}),Pn.addDelegate(Tn.context),xt?Pn.addDelegate(Le):Pn.addDelegate(Le.engine.context);var fn={type:"embed",inputArgs:_t,preventClose:!!He.preventClose,destroy:function(kr){var Yr,Nr,Dr,Wn,an;(Yr=He.onClose)===null||Yr===void 0||Yr.call(He),(Nr=pt)===null||Nr===void 0||Nr(kr),(Dr=St.current)===null||Dr===void 0||Dr.destroy(),(Wn=Ye)===null||Wn===void 0||Wn(),Yt&&(Re.current=null);var _n=Yt&&Bn instanceof HTMLElement&&((an=Bn.dataset)===null||an===void 0?void 0:an[ee])==="1";if(!_n){var rn,yn,At=gn==null?void 0:gn.emitter;(0,K.YB)(At),At==null||(rn=At.emit)===null||rn===void 0||rn.call(At,K.cn,{type:"embed",viewUid:fn==null||(yn=fn.inputArgs)===null||yn===void 0?void 0:yn.viewUid})}Tn.unlinkFromStack()},update:function(kr){var Yr;return(Yr=St.current)===null||Yr===void 0?void 0:Yr.update(kr)},close:function(kr,Yr){var Nr;if(!(Lt&&!Yr)){if(He.triggerByRouter&&(Nr=He.inputArgs)!==null&&Nr!==void 0&&(Nr=Nr.navigation)!==null&&Nr!==void 0&&Nr.back){He.inputArgs.navigation.back();return}fn.destroy(kr)}},Header:Rn,Footer:en,setFooter:function(kr){var Yr;(Yr=St.current)===null||Yr===void 0||Yr.setFooter(kr)},setHeader:function(kr){var Yr;(Yr=St.current)===null||Yr===void 0||Yr.setHeader(kr)},navigation:(Xe=He.inputArgs)===null||Xe===void 0?void 0:Xe.navigation,get record(){return(0,T.lP)(Le,Pn)}};Pn.defineProperty("view",{get:function(){return fn},resolveOnServer:(0,T.o3)(Pn,function(){return(0,T.lP)(Le,Pn)})}),Q(Pn,fn);var on=(0,J.observer)(function(){var nr,kr,Yr=p.useRef(!1),Nr=p.useMemo(function(){return typeof hn=="function"?hn(fn,Pn):hn},[]);return Pn.themeToken,p.useEffect(function(){var Dr;(Dr=He.onOpen)===null||Dr===void 0||Dr.call(He,fn,Pn)},[]),(nr=He.inputArgs)!==null&&nr!==void 0&&(nr=nr.hidden)!==null&&nr!==void 0&&nr.value&&!Yr.current?null:(Yr.current=!0,(0,$.jsx)(de,P()(P()({ref:St,hidden:(kr=He.inputArgs)===null||kr===void 0||(kr=kr.hidden)===null||kr===void 0?void 0:kr.value},Et),{},{onClose:function(){fn.close(He.result)},children:Nr})))},{displayName:"PageWithContext"}),Kt=(_t==null?void 0:_t.viewUid)||"page-".concat(me),vr=(0,$.jsx)(E.r6,{engine:Tn,children:(0,$.jsx)(j.Y5,{context:Pn,children:(0,$.jsx)(on,{})})},Kt);if(Bn&&Bn instanceof HTMLElement){var Gr;Ye=(Gr=Ae.current)===null||Gr===void 0?void 0:Gr.patchElement(ye.createPortal(vr,Bn,Kt))}else{var er;Ye=(er=Ae.current)===null||er===void 0?void 0:er.patchElement(vr)}return Yt&&(Re.current={destroy:fn.destroy}),Object.assign(bt,fn)},ae=p.useMemo(function(){return{open:Be}},[]);return[ae,(0,$.jsx)(xe,{ref:Ae},"page-holder")]}var he=e(55241),pe=["afterClose","content","placement","rect"],De=["target","placement","content"],se=0,Ce=p.forwardRef(function(Ae,Re){var Be,ae,Me,He,Le=Ae.afterClose,Xe=Ae.content,ht=Ae.placement,St=Ae.rect,Ye=m()(Ae,pe),pt=p.useState(!0),bt=S()(pt,2),en=bt[0],Rn=bt[1],Bn=p.useState(P()({content:Xe,placement:ht,rect:St},Ye)),hn=S()(Bn,2),Lt=hn[0],Je=hn[1];return p.useImperativeHandle(Re,function(){return{destroy:function(){return Rn(!1)},update:function(lt){return Je(function(_t){return P()(P()({},_t),lt)})},close:function(lt,_t){return Rn(!1)}}}),p.useEffect(function(){en||Le==null||Le()},[en,Le]),(0,$.jsx)(he.Z,P()(P()({arrow:!1,open:en,trigger:["click"],destroyTooltipOnHide:!0,content:Lt.content,placement:Lt.placement,getPopupContainer:function(){return document.querySelector("#nocobase-app-container")||document.body},onOpenChange:function(lt){!lt&&Lt.preventClose||(Rn(lt),lt||Le==null||Le())}},Lt),{},{children:(0,$.jsx)("span",{style:{position:"absolute",top:((Be=(ae=Lt.rect)===null||ae===void 0?void 0:ae.top)!==null&&Be!==void 0?Be:0)+window.scrollY,left:((Me=(He=Lt.rect)===null||He===void 0?void 0:He.left)!==null&&Me!==void 0?Me:0)+window.scrollX,width:0,height:0}})}))});function Se(){var Ae=p.useRef(null),Re=function(He){var Le,Xe,ht;se+=1;var St=He.target,Ye=He.placement,pt=Ye===void 0?"rightTop":Ye,bt=He.content,en=m()(He,De),Rn=p.createRef(),Bn=(Le=St==null||(Xe=St.getBoundingClientRect)===null||Xe===void 0?void 0:Xe.call(St))!==null&&Le!==void 0?Le:{top:0,left:0},hn,Lt,Je=new Promise(function(Yt){Lt=Yt}),xt={type:"popover",destroy:function(){var Pn;return(Pn=Rn.current)===null||Pn===void 0?void 0:Pn.destroy()},update:function(Pn){var Tn;return(Tn=Rn.current)===null||Tn===void 0?void 0:Tn.update(Pn)},close:function(Pn){var Tn,gn;(Tn=Lt)===null||Tn===void 0||Tn(Pn),(gn=Rn.current)===null||gn===void 0||gn.close(Pn)}},lt=typeof bt=="function"?bt(xt):bt,_t=typeof lt=="string"?(0,$.jsx)("div",{dangerouslySetInnerHTML:{__html:U.Z.sanitize(lt)}}):lt,Et=(0,$.jsx)(Ce,P()({ref:Rn,content:_t,placement:pt,rect:Bn,afterClose:function(){var Pn,Tn,gn;(Pn=hn)===null||Pn===void 0||Pn(),(Tn=He.onClose)===null||Tn===void 0||Tn.call(He),(gn=Lt)===null||gn===void 0||gn(He.result)}},en),"popover-".concat(se));return hn=(ht=Ae.current)===null||ht===void 0?void 0:ht.patchElement(Et),Object.assign(Je,xt)},Be=p.useMemo(function(){return{open:Re}},[]),ae=p.memo(p.forwardRef(function(Me,He){var Le=N(),Xe=S()(Le,2),ht=Xe[0],St=Xe[1];return p.useImperativeHandle(He,function(){return{patchElement:St}},[]),(0,$.jsx)($.Fragment,{children:ht})}));return[Be,(0,$.jsx)(ae,{ref:Ae},"popover-holder")]}var Te=e(12444),Ie=e.n(Te),Fe=e(72004),_e=e.n(Fe),we=e(9783),We=e.n(we),tt=e(90850);function ze(Ae){if(Ae==null)return"";if(Ae&&B()(Ae)==="object"&&!Array.isArray(Ae)){var Re=Object.entries(Ae).map(function(Be){var ae=S()(Be,2),Me=ae[0],He=ae[1];return"".concat(encodeURIComponent(String(Me)),"=").concat(encodeURIComponent(String(He)))});return encodeURIComponent(Re.join("&"))}return encodeURIComponent(String(Ae))}function je(Ae){if(!Ae||Ae.length===0)return"/admin";var Re=["admin"];return Ae.forEach(function(Be,ae){if(ae>0&&Re.push("view"),Re.push(Be.viewUid),Be.tabUid&&Re.push("tab",Be.tabUid),Be.filterByTk!=null){var Me=ze(Be.filterByTk);Me&&Re.push("filterbytk",Me)}Be.sourceId&&Re.push("sourceid",Be.sourceId)}),"/"+Re.join("/")}var Ve=function(){function Ae(Re,Be){Ie()(this,Ae),We()(this,"viewStack",void 0),We()(this,"ctx",void 0),We()(this,"viewParams",void 0),this.setViewStack(Be),this.ctx=Re,(0,tt.Ou)(this,{viewParams:tt.LO})}return _e()(Ae,[{key:"setViewStack",value:function(Be){this.viewStack=Object.freeze(I()(Be)),this.viewParams=this.viewStack[this.viewStack.length-1]||{}}},{key:"changeTo",value:function(Be){var ae=this,Me=this.viewStack.map(function(Le,Xe){return Xe===ae.viewStack.length-1?P()(P()({},Le),Be):P()({},Le)}),He=je(Me);this.ctx.router.navigate(He,{replace:!0})}},{key:"navigateTo",value:function(Be,ae){var Me=je([].concat(I()(this.viewStack),[Be])),He=Me;this.ctx.router.navigate(He,ae)}},{key:"back",value:function(){var Be=this.viewStack.slice(0,-1),ae=je(Be);this.ctx.router.navigate(ae,{replace:!0})}}]),Ae}()},84995:function(Zt,Oe,e){"use strict";e.d(Oe,{Bq:function(){return P},GA:function(){return A},YB:function(){return J},_L:function(){return U},b$:function(){return le},cn:function(){return S},tC:function(){return p},v6:function(){return ue}});var ue=Symbol.for("__NOCOBASE_VIEW_ACTIVATED_VERSION__"),S="view:activated",le="dataSource:dirty",P="__NOCOBASE_ENGINE_SCOPE__",p="view";function U(O){var R=Reflect.get(O,ue),w=typeof R=="number"?R:Number(R);return Number.isFinite(w)&&w>0?w:0}function J(O){var R=U(O);if(!Object.isExtensible(O))return R;var w=R+1;return Reflect.set(O,ue,w),w}function C(O){return Reflect.get(O,P)===p}function j(O){for(var R=O,w=0;R&&w++<50;){if(C(R))return R;R=R.previousEngine}}function A(O,R){if(O){var w=j(O);if(w)return w;var f=R==null?void 0:R.previousEngine;return j(f)||O}}},59112:function(Zt,Oe,e){"use strict";e.r(Oe),e.d(Oe,{APIClient:function(){return I},Auth:function(){return a},BaseStorage:function(){return y},LocalStorage:function(){return M},MemoryStorage:function(){return $},SessionStorage:function(){return b},getSubAppName:function(){return K}});var ue=e(15009),S=e.n(ue),le=e(97857),P=e.n(le),p=e(99289),U=e.n(p),J=e(13769),C=e.n(J),j=e(12444),A=e.n(j),O=e(72004),R=e.n(O),w=e(9783),f=e.n(w),B=e(87066),T=e(80129),g=e.n(T),a=function(){function E(F){A()(this,E),f()(this,"api",void 0),f()(this,"options",{locale:null,role:null,authenticator:null,token:null}),this.api=F,this.api.axios.interceptors.request.use(this.middleware.bind(this))}return R()(E,[{key:"storagePrefix",get:function(){return this.api.storagePrefix}},{key:"locale",get:function(){return this.getLocale()},set:function(L){this.setLocale(L)}},{key:"role",get:function(){return this.getRole()},set:function(L){this.setRole(L)}},{key:"token",get:function(){return this.getToken()},set:function(L){this.setToken(L)}},{key:"authenticator",get:function(){return this.getAuthenticator()},set:function(L){this.setAuthenticator(L)}},{key:"getOption",value:function(L){return this.api.storage.getItem(L)}},{key:"setOption",value:function(L,x){return this.options[L]=x,this.api.storage.setItem(L,x||"")}},{key:"getLocale",value:function(){return this.getOption("locale")}},{key:"setLocale",value:function(L){this.setOption("locale",L)}},{key:"getRole",value:function(){return this.getOption("role")}},{key:"setRole",value:function(L){this.setOption("role",L)}},{key:"getToken",value:function(){return this.getOption("token")}},{key:"setToken",value:function(L){this.setOption("token",L),this.api.app&&this.api.app.eventBus.dispatchEvent(new CustomEvent("auth:tokenChanged",{detail:{token:L,authenticator:this.authenticator}}))}},{key:"getAuthenticator",value:function(){return this.getOption("auth")}},{key:"setAuthenticator",value:function(L){this.setOption("auth",L)}},{key:"middleware",value:function(L){return this.locale&&(L.headers["X-Locale"]=this.locale),this.role&&(L.headers["X-Role"]=this.role),this.authenticator&&!L.headers["X-Authenticator"]&&(L.headers["X-Authenticator"]=this.authenticator),this.token&&(L.headers.Authorization="Bearer ".concat(this.token)),L}},{key:"signIn",value:function(){var F=U()(S()().mark(function x(v,W){var G,re,q;return S()().wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return ye.next=2,this.api.request({method:"post",url:"auth:signIn",data:v,headers:{"X-Authenticator":W}});case 2:return re=ye.sent,q=re==null||(G=re.data)===null||G===void 0?void 0:G.data,this.setAuthenticator(W),this.setToken(q==null?void 0:q.token),ye.abrupt("return",re);case 7:case"end":return ye.stop()}},x,this)}));function L(x,v){return F.apply(this,arguments)}return L}()},{key:"signUp",value:function(){var F=U()(S()().mark(function x(v,W){return S()().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return re.next=2,this.api.request({method:"post",url:"auth:signUp",data:v,headers:{"X-Authenticator":W}});case 2:return re.abrupt("return",re.sent);case 3:case"end":return re.stop()}},x,this)}));function L(x,v){return F.apply(this,arguments)}return L}()},{key:"signOut",value:function(){var F=U()(S()().mark(function x(){var v;return S()().wrap(function(G){for(;;)switch(G.prev=G.next){case 0:return G.next=2,this.api.request({method:"post",url:"auth:signOut"});case 2:return v=G.sent,this.setToken(null),this.setRole(null),this.setAuthenticator(null),G.abrupt("return",v);case 7:case"end":return G.stop()}},x,this)}));function L(){return F.apply(this,arguments)}return L}()},{key:"lostPassword",value:function(){var F=U()(S()().mark(function x(v){var W,G,re;return S()().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return W=new URLSearchParams(window.location.search),G=Object.fromEntries(W.entries()),te.next=4,this.api.request({method:"post",url:"auth:lostPassword",data:P()(P()({},v),{},{baseURL:window.location.href.split("/forgot-password")[0]}),headers:{"X-Authenticator":G.name}});case 4:return re=te.sent,te.abrupt("return",re);case 6:case"end":return te.stop()}},x,this)}));function L(x){return F.apply(this,arguments)}return L}()},{key:"resetPassword",value:function(){var F=U()(S()().mark(function x(v){var W;return S()().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return re.next=2,this.api.request({method:"post",url:"auth:resetPassword",data:v});case 2:return W=re.sent,re.abrupt("return",W);case 4:case"end":return re.stop()}},x,this)}));function L(x){return F.apply(this,arguments)}return L}()},{key:"checkResetToken",value:function(){var F=U()(S()().mark(function x(v){var W;return S()().wrap(function(re){for(;;)switch(re.prev=re.next){case 0:return re.next=2,this.api.request({method:"post",url:"auth:checkResetToken",data:v});case 2:return W=re.sent,re.abrupt("return",W);case 4:case"end":return re.stop()}},x,this)}));function L(x){return F.apply(this,arguments)}return L}()}]),E}(),H=e(25098),z=e.n(H),X=e(31996),Q=e.n(X),ce=e(26037),m=e.n(ce),y=function(){function E(){A()(this,E),f()(this,"storagePrefix",void 0)}return R()(E,[{key:"toUpperCase",value:function(){for(var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",x=arguments.length,v=new Array(x>1?x-1:0),W=1;W<x;W++)v[W-1]=arguments[W];return L.toUpperCase()+v.map(function(G){return G.toUpperCase()}).join("_")}}]),E}(),$=function(E){Q()(L,E);var F=m()(L);function L(){var x;A()(this,L);for(var v=arguments.length,W=new Array(v),G=0;G<v;G++)W[G]=arguments[G];return x=F.call.apply(F,[this].concat(W)),f()(z()(x),"items",new Map),x}return R()(L,[{key:"clear",value:function(){this.items.clear()}},{key:"getItem",value:function(v){return this.items.get(v)}},{key:"setItem",value:function(v,W){return this.items.set(v,W)}},{key:"removeItem",value:function(v){return this.items.delete(v)}}]),L}(y),M=function(E){Q()(L,E);var F=m()(L);function L(x){var v,W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return A()(this,L),v=F.call(this),f()(z()(v),"items",void 0),v.storagePrefix=x,v.baseStoragePrefix=W,v.shareToken=G,v.items=window.localStorage,v}return R()(L,[{key:"clear",value:function(){return this.items.clear()}},{key:"getItem",value:function(v){return this.shareToken&&v==="token"&&this.baseStoragePrefix?this.items.getItem(this.toUpperCase(this.baseStoragePrefix,v)):this.items.getItem(this.toUpperCase(this.storagePrefix,v))}},{key:"setItem",value:function(v,W){return this.shareToken&&v==="token"&&this.baseStoragePrefix?this.items.setItem(this.toUpperCase(this.baseStoragePrefix,v),W):this.items.setItem(this.toUpperCase(this.storagePrefix,v),W)}},{key:"removeItem",value:function(v){return this.shareToken&&v==="token"&&this.baseStoragePrefix?this.items.removeItem(this.toUpperCase(this.baseStoragePrefix,v)):this.items.removeItem(this.toUpperCase(this.storagePrefix,v))}}]),L}(y),b=function(E){Q()(L,E);var F=m()(L);function L(x){var v,W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return A()(this,L),v=F.call(this,x,W,G),v.storagePrefix=x,v.baseStoragePrefix=W,v.shareToken=G,v.items=window.sessionStorage,v}return R()(L)}(M),u=["appName","authClass","storageType","storageClass","storagePrefix","shareToken"],V=["values","filter"],I=function(){function E(F){if(A()(this,E),f()(this,"options",void 0),f()(this,"axios",void 0),f()(this,"auth",void 0),f()(this,"storage",void 0),f()(this,"storagePrefix","NOCOBASE_"),f()(this,"baseStoragePrefix","NOCOBASE_"),f()(this,"shareToken",!1),this.options=F,typeof F=="function")this.axios=F;else{var L=F||{},x=L.appName,v=L.authClass,W=L.storageType,G=L.storageClass,re=L.storagePrefix,q=re===void 0?"NOCOBASE_":re,te=L.shareToken,ye=te===void 0?!1:te,Pe=C()(L,u);this.shareToken=ye,this.baseStoragePrefix=q,this.storagePrefix=x?"".concat(q).concat(x.toUpperCase(),"_"):q,this.axios=B.Z.create(Pe),this.initStorage(G,W),v&&(this.auth=new v(this))}this.storage||this.initStorage(),this.auth||(this.auth=new a(this)),this.interceptors()}return R()(E,[{key:"toErrMessages",value:function(L){var x,v,W,G,re;if(typeof document<"u"&&typeof(L==null||(x=L.response)===null||x===void 0?void 0:x.data)=="string"){var q,te=document.createElement("div");te.innerHTML=L==null||(q=L.response)===null||q===void 0?void 0:q.data;var ye=te.textContent||te.innerText;return ye.includes("Error occurred while trying")?(ye="The application may be starting up. Please try again later.",[{code:"APP_WARNING",message:ye}]):ye.includes("502 Bad Gateway")?(ye="The application may be starting up. Please try again later.",[{code:"APP_WARNING",message:ye}]):[{message:ye}]}if(L!=null&&(v=L.response)!==null&&v!==void 0&&(v=v.data)!==null&&v!==void 0&&v.error){var Pe;return[L==null||(Pe=L.response)===null||Pe===void 0||(Pe=Pe.data)===null||Pe===void 0?void 0:Pe.error]}return(L==null||(W=L.response)===null||W===void 0||(W=W.data)===null||W===void 0?void 0:W.errors)||(L==null||(G=L.response)===null||G===void 0||(G=G.data)===null||G===void 0?void 0:G.messages)||(L==null||(re=L.response)===null||re===void 0?void 0:re.error)||[{message:L.message||"Server error"}]}},{key:"getHeaders",value:function(){var L={};return this.auth.locale&&(L["X-Locale"]=this.auth.locale),this.auth.role&&(L["X-Role"]=this.auth.role),this.auth.authenticator&&(L["X-Authenticator"]=this.auth.authenticator),this.auth.token&&(L.Authorization="Bearer ".concat(this.auth.token)),L}},{key:"createStorage",value:function(L){return L==="localStorage"&&typeof localStorage<"u"?new M(this.storagePrefix,this.baseStoragePrefix,this.shareToken):L==="sessionStorage"&&typeof sessionStorage<"u"?new b(this.storagePrefix,this.baseStoragePrefix,this.shareToken):new $}},{key:"initStorage",value:function(L){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"localStorage";if(L){this.storage=new L(this);return}this.storage=this.createStorage(x)}},{key:"interceptors",value:function(){this.axios.interceptors.request.use(function(L){return L.paramsSerializer=function(x){return g().stringify(x,{strictNullHandling:!0,arrayFormat:"brackets"})},L})}},{key:"request",value:function(L){var x=L,v=x.resource,W=x.resourceOf,G=x.action,re=x.params,q=x.headers;return v?this.resource(v,W,q)[G](re):this.axios.request(L)}},{key:"resource",value:function(L,x,v,W){var G=this,re={},q={get:function(ye,Pe){if(!W){var Ee=L.split(".").join("/".concat(encodeURIComponent(x)||"_","/"));Ee+=":".concat(Pe.toString());var de={url:Ee};return["get","list"].includes(Pe)?de.method="get":de.method="post",function(){var be=U()(S()().mark(function me(oe,ee){var xe,ve,he,pe;return S()().wrap(function(se){for(;;)switch(se.prev=se.next){case 0:return xe=oe||{},ve=xe.values,he=xe.filter,pe=C()(xe,V),de.params=pe,he&&(typeof he=="string"?de.params.filter=he:(he["*"]&&delete he["*"],de.params.filter=JSON.stringify(he))),de.method!=="get"&&(de.data=ve||{}),se.next=6,G.request(P()(P()(P()({},de),ee),{},{headers:v}));case 6:return se.abrupt("return",se.sent);case 7:case"end":return se.stop()}},me)}));return function(me,oe){return be.apply(this,arguments)}}()}}};return new Proxy(re,q)}}]),E}(),N=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"/";if(!(typeof window>"u")&&window.location.pathname){var L="".concat(F,"apps/");if(window.location.pathname.startsWith(L)){var x=window.location.pathname.substring(L.length),v=x.split("/",1);return v[0]||""}}},K=N},80770:function(Zt,Oe,e){"use strict";e.d(Oe,{_6:function(){return U},gn:function(){return J},Bb:function(){return le}});var ue=e(96695),S=e.n(ue),le=function C(j,A,O){if(!j)return O;for(var R=A.split("."),w=[],f=j,B=!1,T=0;T<R.length;T++){var g,a=R[T];if(Array.isArray(f)){B=!0;var H=S()(f),z;try{for(H.s();!(z=H.n()).done;){var X=z.value,Q=C(X,R.slice(T).join("."),O);w=w.concat(Q)}}catch(ce){H.e(ce)}finally{H.f()}break}if(((g=f)===null||g===void 0?void 0:g[a])===void 0)break;f=f[a],T===R.length-1&&w.push(f)}return w=w.filter(function(ce){return ce!==void 0}),w.length===0?O:B?w.filter(function(ce){return ce!==null}):w[0]},P=e(52677),p=e.n(P);function U(C){var j=new Set,A=function O(R){if(typeof R=="string")for(var w=/\{\{\s*([^}]+?)\s*\}\}/g,f;(f=w.exec(R))!==null;){for(var B=f[1],T=/ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*)/g,g=void 0;(g=T.exec(B))!==null;)j.add(g[1]);for(var a=/ctx\[\s*(["'])\s*([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\1\s*\]/g,H=void 0;(H=a.exec(B))!==null;)j.add(H[2])}else Array.isArray(R)?R.forEach(O):R&&p()(R)==="object"&&Object.values(R).forEach(O)};return A(C),j}function J(C){var j={},A=function O(R){if(typeof R=="string")for(var w=/\{\{\s*([^}]+?)\s*\}\}/g,f;(f=w.exec(R))!==null;){for(var B=f[1],T=/ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*)([^\s)]*)/g,g=void 0;(g=T.exec(B))!==null;){var a=g[1],H=g[2]||"";if(j[a]=j[a]||[],H.startsWith("."))j[a].push(H.slice(1));else if(H.startsWith("[")){var z=H.match(/^\[\s*(["'])\s*([^'"\]]+)\s*\1\s*\](.*)$/);if(z){var X=z[2],Q=z[3]||"";j[a].push("".concat(X).concat(Q))}else{var ce=H.match(/^\[(\d+)\](.*)$/);if(ce){var m=ce[1],y=ce[2]||"";j[a].push("[".concat(m,"]").concat(y))}}}else H.startsWith("(")&&(j[a].length||j[a].push(""))}for(var $=/ctx\[\s*(["'])\s*([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\1\s*\]([^\s)]*)/g,M=void 0;(M=$.exec(B))!==null;){var b=M[2],u=M[3]||"";if(j[b]=j[b]||[],u.startsWith("."))j[b].push(u.slice(1));else if(u.startsWith("[")){var V=u.match(/^\[\s*(["'])\s*([^'"\]]+)\s*\1\s*\](.*)$/);if(V){var I=V[2],N=V[3]||"";j[b].push("".concat(I).concat(N))}else{var K=u.match(/^\[(\d+)\](.*)$/);if(K){var E=K[1],F=K[2]||"";j[b].push("[".concat(E,"]").concat(F))}}}else u.startsWith("(")&&(j[b].length||j[b].push(""))}}else Array.isArray(R)?R.forEach(O):R&&p()(R)==="object"&&Object.values(R).forEach(O)};return A(C),j}},10110:function(Zt,Oe,e){"use strict";e.r(Oe),e.d(Oe,{BASE_BLOCKED_IDENTIFIERS:function(){return st},CollectionsGraph:function(){return be},Handlebars:function(){return on()},Registry:function(){return Nt},dayjs:function(){return P()},error:function(){return _n},evaluateConditions:function(){return ze},extractUsedVariableNames:function(){return $r},extractUsedVariablePaths:function(){return Zr},flatten:function(){return mn},forEach:function(){return Pn},getDateTimeFormat:function(){return Et},getDateVars:function(){return Tt},getDayRange:function(){return Xt},getDayRangeByParams:function(){return G},getDefaultFormat:function(){return St},getFormatFromDateStr:function(){return Yt},getLiquidContext:function(){return $o},getOffsetRangeByParams:function(){return L},getPickerFormat:function(){return _t},getValuesByPath:function(){return Tn},hasEmptyValue:function(){return Be},isArray:function(){return Ve},isEmpty:function(){return Ae},isEmptyFilter:function(){return Xe},isPlainObject:function(){return Re},isPortalInBody:function(){return Hn},isString:function(){return je},isURL:function(){return Ar},isValidFilter:function(){return er},lockdownSes:function(){return Ft},lodash:function(){return S()},merge:function(){return rt},moment2str:function(){return Lt},nextTick:function(){return ae},offsetFromString:function(){return Je},parse:function(){return Nr},parseFilter:function(){return Qn},parseHTML:function(){return Er},parseLiquidContext:function(){return zo},parseSQLBindParams:function(){return fa},removeInvalidFilterItems:function(){return we},removeNullCondition:function(){return ht},showToast:function(){return It},sleep:function(){return Le},sortTree:function(){return He},splitPathToTwoParts:function(){return kt},str2moment:function(){return Rn},toFixedByStep:function(){return Qt},toGmt:function(){return Ye},toLocal:function(){return pt},toUnit:function(){return Un},transformFilter:function(){return _e},transformLiquidContext:function(){return jo},transformMultiColumnToSingleColumn:function(){return ir},transformSQL:function(){return Ho},treeFind:function(){return Me},tval:function(){return Wt},uid:function(){return fr},unflatten:function(){return bn},utc2unit:function(){return cr}});var ue=e(96486),S=e.n(ue),le=e(27484),P=e.n(le),p=e(28734),U=e.n(p),J=e(10285),C=e.n(J),j=e(1646),A=e.n(j),O=e(66607),R=e.n(O),w=e(79212),f=e.n(w),B=e(37412),T=e.n(B),g=e(59542),a=e.n(g),H=e(96036),z=e.n(H),X=e(96671),Q=e.n(X),ce=e(29387),m=e.n(ce),y=e(70178),$=e.n(y),M=e(55183),b=e.n(M),u=e(172),V=e.n(u),I=e(72540),N=e.n(I);P().extend(N()),P().extend(z()),P().extend(m()),P().extend($()),P().extend(Q()),P().extend(a()),P().extend(R()),P().extend(f()),P().extend(T()),P().extend(b()),P().extend(V()),P().extend(C()),P().extend(U()),P().extend(A());var K=e(5574),E=e.n(K),F=function(jt){if(!jt)return P()();if(/^[+-]\d{2}:\d{2}$/.test(jt)){var or=jt.match(/([+-])(\d{2}):(\d{2})/).slice(1),Jr=E()(or,3),to=Jr[0],vo=Jr[1],Lo=Jr[2],na=(parseInt(vo)*60+parseInt(Lo))*(to==="+"?1:-1);return P()().utcOffset(na)}return P()().tz(jt)},L=function(jt){var or=jt.type,Jr=jt.unit,to=Jr===void 0?"day":Jr,vo=jt.number,Lo=vo===void 0?1:vo,na=jt.timezone,Ma=F(na),Ua=to==="week"?"isoWeek":to,Ia,$a;if(or==="past"){var Xa=Ma.startOf(Ua);Ia=Xa.subtract(Lo,to).startOf(Ua),$a=Xa.subtract(1,to).endOf(Ua)}else if(or==="next"){var si=Ma.startOf(Ua);Ia=si.add(1,to).startOf(Ua),$a=Ia.add(Lo-1,to).endOf(Ua)}else throw new Error("Unsupported type: ".concat(or));return[Ia.format("YYYY-MM-DD HH:mm:ss"),$a.format("YYYY-MM-DD HH:mm:ss")]},x=function(jt,or,Jr){var to=or==="isoWeek"?"week":or;return F(Jr).add(jt,to).startOf(or)},v=function(jt,or,Jr){var to=or==="isoWeek"?"week":or;return F(Jr).add(jt,to).endOf(or)},W={today:function(jt){return[x(0,"day",jt==null?void 0:jt.timezone),v(0,"day",jt==null?void 0:jt.timezone)]},yesterday:function(jt){return[x(-1,"day",jt==null?void 0:jt.timezone),v(-1,"day",jt==null?void 0:jt.timezone)]},tomorrow:function(jt){return[x(1,"day",jt==null?void 0:jt.timezone),v(1,"day",jt==null?void 0:jt.timezone)]},thisWeek:function(jt){return[x(0,"isoWeek",jt==null?void 0:jt.timezone),v(0,"isoWeek",jt==null?void 0:jt.timezone)]},lastWeek:function(jt){return[x(-1,"isoWeek",jt==null?void 0:jt.timezone),v(-1,"isoWeek",jt==null?void 0:jt.timezone)]},nextWeek:function(jt){return[x(1,"isoWeek",jt==null?void 0:jt.timezone),v(1,"isoWeek",jt==null?void 0:jt.timezone)]},thisMonth:function(jt){return[x(0,"month",jt==null?void 0:jt.timezone),v(0,"month",jt==null?void 0:jt.timezone)]},lastMonth:function(jt){return[x(-1,"month",jt==null?void 0:jt.timezone),v(-1,"month",jt==null?void 0:jt.timezone)]},nextMonth:function(jt){return[x(1,"month",jt==null?void 0:jt.timezone),v(1,"month",jt==null?void 0:jt.timezone)]},thisQuarter:function(jt){return[x(0,"quarter",jt==null?void 0:jt.timezone),v(0,"quarter",jt==null?void 0:jt.timezone)]},lastQuarter:function(jt){return[x(-1,"quarter",jt==null?void 0:jt.timezone),v(-1,"quarter",jt==null?void 0:jt.timezone)]},nextQuarter:function(jt){return[x(1,"quarter",jt==null?void 0:jt.timezone),v(1,"quarter",jt==null?void 0:jt.timezone)]},thisYear:function(jt){return[x(0,"year",jt==null?void 0:jt.timezone),v(0,"year",jt==null?void 0:jt.timezone)]},lastYear:function(jt){return[x(-1,"year",jt==null?void 0:jt.timezone),v(-1,"year",jt==null?void 0:jt.timezone)]},nextYear:function(jt){return[x(1,"year",jt==null?void 0:jt.timezone),v(1,"year",jt==null?void 0:jt.timezone)]}},G=function(jt){if(jt.type==="past"||jt.type==="next")return L(jt);var or=W[jt.type];if(!or)throw new Error("Unsupported type: ".concat(jt.type));var Jr=or(jt),to=E()(Jr,2),vo=to[0],Lo=to[1];return[vo.format("YYYY-MM-DD HH:mm:ss"),Lo.format("YYYY-MM-DD HH:mm:ss")]},re=e(96695),q=e.n(re),te=e(12444),ye=e.n(te),Pe=e(72004),Ee=e.n(Pe),de=e(28282),be=function(){function rr(){ye()(this,rr)}return Ee()(rr,null,[{key:"graphlib",value:function(){return de}},{key:"connectedNodes",value:function(or){var Jr=(0,ue.castArray)(or.nodes),to=(0,ue.castArray)(or.excludes||[]),vo=rr.build(or),Lo=new Set,na=q()(Jr),Ma;try{for(na.s();!(Ma=na.n()).done;){var Ua=Ma.value,Ia=de.alg.preorder(vo,Ua),$a=q()(Ia),Xa;try{for($a.s();!(Xa=$a.n()).done;){var si=Xa.value;to.includes(si)||Lo.add(si)}}catch(yi){$a.e(yi)}finally{$a.f()}}}catch(yi){na.e(yi)}finally{na.f()}return Array.from(Lo)}},{key:"preOrder",value:function(or){return rr.graphlib().alg.preorder(rr.build(or),or.node)}},{key:"build",value:function(or){var Jr=or.collections,to=(or==null?void 0:or.direction)||"forward",vo=to==="forward",Lo=new de.Graph,na=q()(Jr),Ma;try{for(na.s();!(Ma=na.n()).done;){var Ua=Ma.value;Lo.setNode(Ua.name)}}catch(La){na.e(La)}finally{na.f()}var Ia=q()(Jr),$a;try{for(Ia.s();!($a=Ia.n()).done;){var Xa=$a.value,si=Xa.inherits||[],yi=q()(si),Ha;try{for(yi.s();!(Ha=yi.n()).done;){var Di=Ha.value;vo?Lo.setEdge(Xa.name,Di):Lo.setEdge(Di,Xa.name)}}catch(La){yi.e(La)}finally{yi.f()}var Ga=q()(Xa.fields||[]),ka;try{for(Ga.s();!(ka=Ga.n()).done;){var Jo=ka.value;if((Jo.type==="hasMany"||Jo.type==="belongsTo"||Jo.type==="hasOne")&&(vo?Lo.setEdge(Xa.name,Jo.target):Lo.setEdge(Jo.target,Xa.name)),Jo.type==="belongsToMany"){var Ya=Jo.through;vo?(Lo.setEdge(Xa.name,Ya),Lo.setEdge(Ya,Jo.target)):(Lo.setEdge(Jo.target,Ya),Lo.setEdge(Ya,Xa.name))}}}catch(La){Ga.e(La)}finally{Ga.f()}}}catch(La){Ia.e(La)}finally{Ia.f()}return Lo}}]),rr}(),me=e(9783),oe=e.n(me),ee=e(97857),xe=e.n(ee),ve=e(19632),he=e.n(ve),pe=e(34444),De=e.n(pe),se=e(52677),Ce=e.n(se);function Se(rr){return"path"in rr&&"operator"in rr}function Te(rr){return"logic"in rr&&"items"in rr}function Ie(rr){var jt=rr.path,or=rr.operator,Jr=rr.value;return oe()({},jt,oe()({},or,Jr))}function Fe(rr){var jt=rr.logic,or=rr.items,Jr=or.map(function(to){if(Se(to))return Ie(to);if(Te(to))return Fe(to);throw new Error("Invalid filter item type")});return oe()({},jt,Jr)}function _e(rr){if(!rr||Ce()(rr)!=="object")throw new Error("Invalid filter: filter must be an object");if(!Te(rr))throw new Error("Invalid filter: filter must have logic and items properties");if(!Array.isArray(rr.items))throw new Error("Invalid filter: items must be an array");return ht(Fe(rr))}function we(rr){if(!rr||Ce()(rr)!=="object")throw new Error("Invalid filter: filter must be an object");if(!Te(rr))throw new Error("Invalid filter: filter must have logic and items properties");if(!Array.isArray(rr.items))throw new Error("Invalid filter: items must be an array");return rr.items=rr.items.filter(function(jt){return Se(jt)?!!jt.operator:Te(jt)?we(jt):!1}),xe()({},rr)}function We(rr,jt){var or=rr.path,Jr=rr.operator,to=rr.value;return jt(or,Jr,to)}function tt(rr,jt){var or=rr.logic,Jr=rr.items;if(!Jr||Jr.length===0)return!0;var to=Jr.map(function(vo){if(Se(vo))return We(vo,jt);if(Te(vo))return tt(vo,jt);throw new Error("Invalid filter item type")});if(or==="$and")return to.every(function(vo){return vo===!0});if(or==="$or")return to.some(function(vo){return vo===!0});throw new Error("Unsupported logic operator: ".concat(or))}function ze(rr,jt){if(!rr||Ce()(rr)!=="object")throw new Error("Invalid conditions: conditions must be an object");if(!Te(rr))throw new Error("Invalid conditions: conditions must have logic and items properties");if(!Array.isArray(rr.items))throw new Error("Invalid conditions: items must be an array");if(typeof jt!="function")throw new Error("Invalid evaluator: evaluator must be a function");return tt(rr,jt)}var je=function(jt){return typeof jt=="string"},Ve=function(jt){return Array.isArray(jt)},Ae=function(jt){return Re(jt)?Object.keys(jt).length===0:Array.isArray(jt)?jt.length===0:!1},Re=function(jt){if(Object.prototype.toString.call(jt)!=="[object Object]")return!1;var or=Object.getPrototypeOf(jt);return or===null||or===Object.prototype},Be=function rr(jt){var or=!0;for(var Jr in jt){if(or=!1,Ve(jt[Jr])&&jt[Jr].length===0||!jt[Jr])return!0;if(Re(jt[Jr])||Ve(jt[Jr]))return rr(jt[Jr])}return or},ae=function(jt){setTimeout(jt)};function Me(rr,jt){var or=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(rr){var Jr=or.childrenKey,to=Jr===void 0?"children":Jr,vo=Array.isArray(rr)?he()(rr):[rr],Lo=q()(vo),na;try{for(Lo.s();!(na=Lo.n()).done;){var Ma=na.value;if(jt(Ma))return Ma;var Ua=typeof to=="function"?to(Ma):Ma[to];if(Array.isArray(Ua)&&Ua.length>0){var Ia=Me(Ua,jt,or);if(Ia!==void 0)return Ia}}}catch($a){Lo.e($a)}finally{Lo.f()}}}function He(rr,jt){var or=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"children",Jr=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;if(!rr||!Array.isArray(rr)||rr.length===0)return rr;var to=S().orderBy(rr,jt,Jr?"asc":"desc");return to.map(function(vo){return vo[or]&&vo[or].length>0?xe()(xe()({},vo),{},oe()({},or,He(vo[or],jt,or,Jr))):vo})}function Le(rr){return new Promise(function(jt){setTimeout(jt,rr)})}function Xe(rr){return!!(!rr||"$and"in rr&&S().isEmpty(rr.$and)||"$or"in rr&&S().isEmpty(rr.$or))}var ht=function(jt){var or=arguments.length>1&&arguments[1]!==void 0?arguments[1]:De(),Jr=or(jt||{}),to={};for(var vo in Jr){var Lo=Jr[vo];Lo!=null&&!Ae(Lo)&&Lo!==""&&(to[vo]=Lo)}var na=or.unflatten(to);for(var Ma in na)Array.isArray(na[Ma])&&(na[Ma]=na[Ma].filter(function(Ua){return Ua!=null}));return S().isEmpty(na)?void 0:na},St=function(jt){return jt.format?jt.format:jt.dateFormat?jt.showTime?"".concat(jt.dateFormat," ").concat(jt.timeFormat||"HH:mm:ss"):jt.dateFormat:jt.picker==="month"?"YYYY-MM":jt.picker==="quarter"?"YYYY-\\QQ":jt.picker==="year"?"YYYY":jt.picker==="week"?"YYYY[W]W":jt.showTime?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"},Ye=function(jt){return!jt||!P().isDayjs(jt)?jt:"".concat(jt.format("YYYY-MM-DD"),"T").concat(jt.format("HH:mm:ss.SSS"),"Z")},pt=function(jt){if(!jt)return jt;if(Array.isArray(jt))return jt.map(function(or){return or.startOf("second").toISOString()});if(P().isDayjs(jt))return jt.startOf("second").toISOString()},bt=function(jt){try{var or=parseInt(jt.slice(0,4)),Jr=parseInt(jt.slice(-1));return P()().quarter(Jr).year(or)}catch{return null}},en=function(jt,or){if(jt){var Jr=or.utcOffset,to=or.gmt,vo=or.picker,Lo=or.utc,na=Lo===void 0?!0:Lo,Ma=or.dateOnly;if(P()(jt).isValid()){if(Ma){var Ua=P()(jt);if(!Ua.isValid())return jt;var Ia=Ua.format("YYYY-MM-DD");return P().utc(Ia,"YYYY-MM-DD")}return na?P().isDayjs(jt)?Jr?jt.utcOffset(Je(Jr)):jt:to?P()(jt).utcOffset(0):Jr?P()(jt).utcOffset(Je(Jr)):P()(jt):P()(jt)}else return bt(jt)}},Rn=function(jt){var or=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Array.isArray(jt)?jt.map(function(Jr){return en(Jr,or)}):jt&&en(jt,or)},Bn=function(jt,or){return or==="year"?jt.format("YYYY")+"-01-01T00:00:00.000Z":or==="month"||or==="quarter"?jt.format("YYYY-MM")+"-01T00:00:00.000Z":jt.format("YYYY-MM-DD")+"T00:00:00.000Z"},hn=function(jt,or){if(!jt)return jt;if(Array.isArray(jt))return jt.map(function(Jr){return Bn(Jr,or)});if(P().isDayjs(jt))return Bn(jt,or)},Lt=function(jt){var or=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Jr=or.showTime,to=or.gmt,vo=or.picker;return jt&&(Jr?to?Ye(jt):pt(jt):hn(jt,vo))};function Je(rr){if(!S().isString(rr))return rr;var jt=/([+-]|\d\d)/gi,or=/Z|[+-]\d\d(?::?\d\d)?/gi,Jr=/[+-]?\d+(\.\d{1,3})?/,to=(rr||"").match(or);if(to===null&&(to=(rr||"").match(Jr)),to===null)return null;var vo=to[to.length-1]||[],Lo=(vo+"").match(jt)||["-",0,0],na=+(Number(Lo[1])*60)+xt(Lo[2]);return na===0?0:Lo[0]==="+"?na:-na}function xt(rr){var jt=+rr,or=0;return jt!==0&&isFinite(jt)&&(or=lt(jt)),or}function lt(rr){return rr<0?Math.ceil(rr)||0:Math.floor(rr)}var _t=function(jt){switch(jt){case"week":return"YYYY[W]W";case"month":return"YYYY-MM";case"quarter":return"YYYY[Q]Q";case"year":return"YYYY";default:return"YYYY-MM-DD"}},Et=function(jt,or,Jr,to){return jt==="date"&&Jr?"".concat(or," ").concat(to||"HH:mm:ss"):or};function Yt(rr){return/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(rr)?"YYYY-MM-DD HH:mm:ss":/^\d{4}-\d{2}-\d{2}$/.test(rr)?"YYYY-MM-DD":/^\d{4}-\d{2}$/.test(rr)?"YYYY-MM":/^\d{4}$/.test(rr)?"YYYY":/^\d{4}Q[1-4]$/.test(rr)?"YYYY[Q]Q":/^\d{4}-\d{2}-\d{2}T/.test(rr)?"YYYY-MM-DDTHH:mm:ss.SSSZ":null}var Pn=function(jt,or){Array.isArray(jt)?jt.forEach(or):Object.keys(jt).forEach(function(Jr){or(jt[Jr],Jr)})},Tn=function rr(jt,or,Jr){if(!jt)return Jr;for(var to=or.split("."),vo=[],Lo=jt,na=!1,Ma=0;Ma<to.length;Ma++){var Ua,Ia=to[Ma];if(Array.isArray(Lo)){na=!0;var $a=q()(Lo),Xa;try{for($a.s();!(Xa=$a.n()).done;){var si=Xa.value,yi=rr(si,to.slice(Ma).join("."),Jr);vo=vo.concat(yi)}}catch(Ha){$a.e(Ha)}finally{$a.f()}break}if(((Ua=Lo)===null||Ua===void 0?void 0:Ua[Ia])===void 0)break;Lo=Lo[Ia],Ma===to.length-1&&vo.push(Lo)}return vo=vo.filter(function(Ha){return Ha!==void 0}),vo.length===0?Jr:na?vo.filter(function(Ha){return Ha!==null}):vo[0]},gn=e(8575),fn=e(96750),on=e.n(fn),Kt=e(11700),vr=e.n(Kt),Gr=vr()();Object.keys(Gr).forEach(function(rr){on().registerHelper(rr,Gr[rr])}),on().registerHelper("json",function(rr){return JSON.stringify(rr)}),on().registerHelper("urlParse",function(rr){try{return JSON.stringify(gn.parse(rr))}catch{return"Invalid URL: ".concat(rr)}}),on().registerHelper("dateFormat",function(rr,jt,or){return typeof or=="string"?P()(rr).tz(or).format(jt):P()(rr).format(jt)}),on().registerHelper("isNull",function(rr){return S().isNull(rr)});function er(rr){if(!rr)return!1;var jt=[rr.$and,rr.$or].filter(Boolean);return jt.length==0?Object.keys(rr).length>0:jt.some(function(or){if(Array.isArray(or))return or.some(er);if(or.$and||or.$or)return er(or);var Jr=Object.keys(or),to=E()(Jr,1),vo=to[0];if(!vo||!or[vo])return!1;var Lo=Object.keys(or[vo]),na=E()(Lo,1),Ma=na[0];return!(!Ma||typeof or[vo][Ma]>"u")})}function nr(rr){var jt=Ce()(rr);return Array.isArray(rr)?jt="array":rr instanceof Date?jt="date":rr===null&&(jt="null"),jt}function kr(rr){var jt,or=rr.substr(2,rr.length-4).trim(),Jr=or.indexOf(":");return Jr!==-1?jt={key:or.substr(0,Jr),defaultValue:or.substr(Jr+1)}:jt={key:or},jt}function Yr(rr,jt){return rr.parameters=Array.from(new Map(jt.map(function(or){return[or.key,or]})).values()),rr}function Nr(rr){switch(nr(rr)){case"string":return Dr(rr);case"object":return Wn(rr);case"array":return an(rr);default:return Yr(function(){return rr},[])}}var Dr=function(){var rr=/{{(\w|:|[\s-+.,@/()?=*_$])+}}/g;return function(jt){var or=[],Jr=function(Lo){return jt},to=jt.match(rr);return to&&(or=to.map(kr),Jr=function(Lo){return Lo=Lo||{},to.reduce(function(na,Ma,Ua){var Ia=or[Ua],$a=(0,ue.get)(Lo,Ia.key);return typeof $a>"u"&&($a=Ia.defaultValue),typeof $a=="function"&&($a=$a()),to.length===1&&jt.startsWith("{{")&&jt.endsWith("}}")?$a:($a instanceof Date&&($a=$a.toISOString()),na.replace(Ma,$a??""))},jt)}),Yr(Jr,or)}}();function Wn(rr){var jt=Object.keys(rr).map(function(to){return{keyTemplate:Dr(to),valueTemplate:Nr(rr[to])}}),or=jt.reduce(function(to,vo){return to.concat(vo.valueTemplate.parameters,vo.keyTemplate.parameters)},[]),Jr=function(vo){return jt.reduce(function(Lo,na){return Lo[na.keyTemplate(vo)]=na.valueTemplate(vo),Lo},{})};return Yr(Jr,or)}function an(rr){var jt=rr.map(Nr),or=jt.reduce(function(to,vo){return to.concat(vo.parameters)},[]),Jr=function(vo){return jt.map(function(Lo){return Lo(vo)})};return Yr(Jr,or)}var _n=function(jt){for(var or,Jr=arguments.length,to=new Array(Jr>1?Jr-1:0),vo=1;vo<Jr;vo++)to[vo-1]=arguments[vo];(or=console).error.apply(or,[jt].concat(to))},rn=e(9996),yn=e.n(rn),At=function(jt,or,Jr){return or};function rt(rr,jt,or){return yn()(rr,jt,xe()({arrayMerge:At},or))}var Ot=e(26855),It=function(jt){var or=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"info",Jr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:5e3;Ot.ZP[or]({message:jt,duration:Jr})},Mt=e(55252),Ut=e(8150);function Qt(rr,jt){if(typeof rr>"u"||rr===null||rr==="")return"";var or=(0,Mt.NX)(jt);return(0,Ut.FH)(String(rr),".",or)}var Nn=e(15009),Mn=e.n(Nn),wn=e(99289),Kn=e.n(wn),gr=e(36968),Ir=e.n(gr),_r=e(30381),Sr=e.n(_r),gt=/^\s*\{\{([\s\S]*)\}\}\s*$/;function dt(rr){return rr&&rr.constructor&&typeof rr.constructor.isBuffer=="function"&&rr.constructor.isBuffer(rr)}function Ht(rr){return rr}function mn(rr,jt){jt=jt||{};var or=jt.delimiter||".",Jr=jt.maxDepth,to=jt.transformKey||Ht,vo=jt.transformValue||Ht,Lo={};function na(Ma,Ua,Ia){Ia=Ia||1,S().isObjectLike(Ma)&&Object.keys(Ma).forEach(function($a){var Xa,si,yi=Ma[$a],Ha=jt.safe&&Array.isArray(yi),Di=Object.prototype.toString.call(yi),Ga=dt(yi),ka=Di==="[object Object]"||Di==="[object Array]",Jo=Ua?Ua+or+to($a):to($a);if((Xa=(si=jt).breakOn)!==null&&Xa!==void 0&&Xa.call(si,{key:$a,value:yi,path:Jo})){Lo[Jo]=vo(yi,Jo);return}if(!Ha&&!Ga&&ka&&Object.keys(yi).length&&(!jt.maxDepth||Ia<Jr))return na(yi,Jo,Ia+1);Lo[Jo]=vo(yi,Jo)})}return na(rr),Lo}function bn(rr){for(var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},or={},Jr=jt.transformValue||Ht,to=0,vo=Object.keys(rr);to<vo.length;to++){var Lo=vo[to];Ir()(or,Lo,Jr(rr[Lo],Lo))}return or}var Cn=function(jt){var or=jt.split(".").pop()||"";return or.startsWith("$")||(or=""),{operator:or}},Sn=function(jt){return["$dateOn","$dateNotOn","$dateBefore","$dateAfter","$dateNotBefore","$dateNotAfter","$dateBetween"].includes(jt)};function sr(rr){return rr instanceof Date||Object.prototype.toString.call(rr)==="[object Date]"}var cn=function(jt,or){if(!jt)return null;if(jt.type&&(jt=G(xe()(xe()({},jt),{},{timezone:or}))),Array.isArray(jt))return jt.length===2?jt.push("[]",or):jt.length===3&&jt.push(or),jt;if(typeof jt=="string")return!or||/(\+|-)\d\d:\d\d$/.test(jt)?jt:jt+or;if(sr(jt))return jt.toISOString()},Qn=function(){var rr=Kn()(Mn()().mark(function jt(or){var Jr,to,vo,Lo,na,Ma,Ua,Ia,$a=arguments;return Mn()().wrap(function(si){for(;;)switch(si.prev=si.next){case 0:if(Jr=$a.length>1&&$a[1]!==void 0?$a[1]:{},to=new Set,vo=Jr.vars||{},Lo=Jr.timezone,na=Jr.now,Ma=Jr.getField,Ua=mn(or,{breakOn:function(Ha){var Di=Ha.key;return Di.startsWith("$")&&Di!=="$and"&&Di!=="$or"},transformValue:function(Ha){if(typeof Ha!="string")return Ha;var Di=gt.exec(Ha);if(Di){var Ga=Di[1].trim();Ga.startsWith("$user")&&to.add(Ga.substring(6))}return Ha}}),!(to.size>0)){si.next=12;break}return si.next=10,vo.$user({fields:he()(to.values())});case 10:Ia=si.sent,Object.assign(vo,{$user:Ia});case 12:return si.abrupt("return",bn(Ua,{transformValue:function(Ha,Di){var Ga=Cn(Di),ka=Ga.operator;if(typeof Ha=="string"){var Jo=gt.exec(Ha);if(Jo){var Ya=Jo[1].trim(),La=Tn(vo,Ya,null),Kr=Ma==null?void 0:Ma(Di);Ha=typeof La=="function"?La==null?void 0:La({field:Kr,operator:ka,timezone:Lo,now:na}):La}}if(Sn(ka)){var wt=Ma==null?void 0:Ma(Di);return(wt==null?void 0:wt.constructor.name)==="DateOnlyField"||(wt==null?void 0:wt.constructor.name)==="DatetimeNoTzField"?Ha.type?G(xe()(xe()({},Ha),{},{timezone:(wt==null?void 0:wt.timezone)||Lo})):Ha:cn(Ha,(wt==null?void 0:wt.timezone)||Lo)}return Ha}}));case 13:case"end":return si.stop()}},jt)}));return function(or){return rr.apply(this,arguments)}}();function Xt(rr){var jt=rr.now,or=rr.timezone,Jr=or===void 0?"+00:00":or,to=rr.offset,vo=An(jt).utcOffset(Je(Jr));return to>0?[(vo=vo.add(1,"day").startOf("day")).format("YYYY-MM-DD"),vo.clone().add(to,"day").startOf("day").format("YYYY-MM-DD"),"[)",Jr]:[vo.clone().subtract(-1*to-1,"day").startOf("day").format("YYYY-MM-DD"),vo.clone().add(1,"day").startOf("day").format("YYYY-MM-DD"),"[)",Jr]}function An(rr){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return rr?P().isDayjs(rr)?rr:jt?Sr()(rr):P()(rr):jt?Sr()():P()()}function cr(rr){var jt,or=rr.now,Jr=rr.unit,to=rr.timezone,vo=to===void 0?"+00:00":to,Lo=rr.offset,na=An(or,Jr==="isoWeek");na=na.utcOffset(Je(vo)),na=na.startOf(Jr),Lo>0?na=na.add(Lo,Jr):Lo<0&&(na=na.subtract(-1*Lo,Jr));var Ma={year:function(){return na.format("YYYY")},quarter:function(){return na.format("YYYY[Q]Q")},month:function(){return na.format("YYYY-MM")},week:function(){return na.format("gggg[w]ww")},isoWeek:function(){return na.format("GGGG[W]WW")},day:function(){return na.format("YYYY-MM-DD")}},Ua=(jt=Ma[Jr])===null||jt===void 0?void 0:jt.call(Ma);return vo?Ua+vo:Ua}var Un=function(jt,or){return function(Jr){var to=Jr.now,vo=Jr.timezone,Lo=Jr.field;return Lo!=null&&Lo.timezone&&(vo=Lo==null?void 0:Lo.timezone),cr({now:to,timezone:vo,unit:jt,offset:or})}},mt=function(jt){return function(or){var Jr=or.now,to=or.timezone,vo=or.field;return vo!=null&&vo.timezone&&(to=vo==null?void 0:vo.timezone),Xt({now:Jr,timezone:to,offset:jt})}};function Tt(){return{now:new Date().toISOString(),today:Un("day"),yesterday:Un("day",-1),tomorrow:Un("day",1),thisWeek:Un("week"),lastWeek:Un("week",-1),nextWeek:Un("week",1),thisIsoWeek:Un("isoWeek"),lastIsoWeek:Un("isoWeek",-1),nextIsoWeek:Un("isoWeek",1),thisMonth:Un("month"),lastMonth:Un("month",-1),nextMonth:Un("month",1),thisQuarter:Un("quarter"),lastQuarter:Un("quarter",-1),nextQuarter:Un("quarter",1),thisYear:Un("year"),lastYear:Un("year",-1),nextYear:Un("year",1),last7Days:mt(-7),next7Days:mt(7),last30Days:mt(-30),next30Days:mt(30),last90Days:mt(-90),next90Days:mt(90)}}function kt(rr){var jt=rr.split(".");return[jt.shift(),jt.join(".")]}var Nt=function(){function rr(){var jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{override:!1};ye()(this,rr),oe()(this,"map",new Map),oe()(this,"options",void 0),this.options=jt}return Ee()(rr,[{key:"register",value:function(or,Jr){if(!this.options.override&&this.map.has(or))throw new Error('this registry does not allow to override existing keys: "'.concat(or,'"'));this.map.set(or,Jr)}},{key:"get",value:function(or){return this.map.get(or)}},{key:"getKeys",value:function(){return this.map.keys()}},{key:"getValues",value:function(){return this.map.values()}},{key:"getEntities",value:function(){return this.map.entries()}}]),rr}(),Dt=null,Ue=e(28627),Ke=Symbol.for("nocobase.utils.sesLockdown"),at=Symbol.for("nocobase.utils.bufferOverrides"),st=["globalThis","global","self","Function","AsyncFunction","GeneratorFunction","eval","Compartment","lockdown","harden","assert"];function et(rr){if(!rr||Ce()(rr)!=="object")return!1;var jt=rr.message||"";return jt.includes("(SES_ALREADY_LOCKED_DOWN)")}function it(){var rr=globalThis;if(!rr[at]){var jt=rr.Buffer;if(!(!jt||!jt.prototype)){var or=jt.prototype,Jr=q()(Reflect.ownKeys(or)),to;try{var vo=function(){var na=to.value,Ma=Object.getOwnPropertyDescriptor(or,na);if(!Ma||typeof Ma.value!="function"||!Ma.configurable)return 1;var Ua=Ma.value,Ia=function(){return Ua},$a=function(si){if(this===or)throw new TypeError("Cannot assign to read only property '".concat(String(na),"' of object 'Buffer.prototype'"));Object.defineProperty(this,na,{configurable:!0,enumerable:!0,writable:!0,value:si})};Object.defineProperty(Ia,"originalValue",{configurable:!1,enumerable:!1,writable:!1,value:Ua}),Object.defineProperty(or,na,{configurable:Ma.configurable,enumerable:Ma.enumerable,get:Ia,set:$a})};for(Jr.s();!(to=Jr.n()).done;)vo()}catch(Lo){Jr.e(Lo)}finally{Jr.f()}rr[at]=!0}}}function Ft(rr){it();var jt=globalThis;if(!jt[Ke]){if(typeof lockdown!="function")throw new Error("SES lockdown is unavailable in the current runtime environment.");try{lockdown(rr)}catch(or){if(!et(or))throw or}jt[Ke]=!0}}function Wt(rr,jt){return jt?"{{t(".concat(JSON.stringify(rr),", ").concat(JSON.stringify(jt),")}}"):"{{t(".concat(JSON.stringify(rr),")}}")}var Hn=function(jt){for(;jt;){var or;if(jt.id==="root"||(or=jt.classList)!==null&&or!==void 0&&or.contains("nb-action"))return!1;jt=jt.parentNode}return!{NODE_ENV:"production",PUBLIC_PATH:"auto"}.__TEST__};function Er(rr,jt){return rr.replace(/\{\{(\w+)\}\}/g,function(or,Jr){return typeof jt[Jr]<"u"?jt[Jr]:or})}for(var ur=36,jr="";ur--;)jr+=ur.toString(36);function fr(rr){for(var jt="",or=rr||11;or--;)jt+=jr[Math.random()*36|0];return jt}function Ar(rr){var jt;try{jt=new URL(rr)}catch{return!1}return jt.protocol==="http:"||jt.protocol==="https:"}var lr=e(33833),dr={i8:"2.0.1"},ir=function rr(jt,or){if(!jt)return jt;if(jt["x-component"]!=="Grid")return Object.keys(jt.properties||{}).forEach(function(Ia){jt.properties[Ia]=rr(jt.properties[Ia],or)}),jt;var Jr=jt.parent;jt.toJSON?jt=jt.toJSON():jt=S().cloneDeep(jt);var to={},vo=jt,Lo=vo.properties,na=Lo===void 0?{}:Lo,Ma=0;if(Object.keys(na).forEach(function(Ia,$a){var Xa=na[Ia];if(Xa["x-component"]!=="Grid.Row"){Xa["x-index"]=++Ma,to[Ia]=Xa;return}if(Xa.properties){if(Object.keys(Xa.properties).length===1){Xa["x-index"]=++Ma,to[Ia]=Xa;return}Object.keys(Xa.properties).forEach(function(si,yi){var Ha=Xa.properties[si];if(S().set(Ha,"x-component-props.width",100),yi===0){Xa["x-index"]=++Ma,to[Ia]=Xa;return}or!=null&&or(Ha)||(delete Xa.properties[si],to["".concat(fr(),"_").concat(si)]=Cr(Ha,si,++Ma))})}}),jt.properties=to,Jr){var Ua=new lr.Schema(jt,Jr);return Jr.properties&&Object.keys(Jr.properties).forEach(function(Ia){Ia===jt.name&&(Jr.properties[Ia]=Ua)}),Ua}return jt};function Cr(rr,jt,or){return{type:"void",version:"2.0","x-component":"Grid.Row","x-app-version":dr.i8,"x-uid":fr(),"x-async":!1,"x-index":or,_isJSONSchemaObject:!0,properties:oe()({},jt,rr)}}function $r(rr){var jt=new Set,or=function Jr(to){if(typeof to=="string")for(var vo=/\{\{\s*([^}]+?)\s*\}\}/g,Lo;(Lo=vo.exec(to))!==null;){for(var na=Lo[1],Ma=/ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*)/g,Ua=void 0;(Ua=Ma.exec(na))!==null;)jt.add(Ua[1]);for(var Ia=/ctx\[\s*(["'])\s*([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\1\s*\]/g,$a=void 0;($a=Ia.exec(na))!==null;)jt.add($a[2])}else Array.isArray(to)?to.forEach(Jr):to&&Ce()(to)==="object"&&Object.values(to).forEach(Jr)};return or(rr),jt}function Zr(rr){var jt={},or=function Jr(to){if(typeof to=="string")for(var vo=/\{\{\s*([^}]+?)\s*\}\}/g,Lo;(Lo=vo.exec(to))!==null;){for(var na=Lo[1],Ma=/ctx\.([a-zA-Z_$][a-zA-Z0-9_$]*)([^\s)]*)/g,Ua=void 0;(Ua=Ma.exec(na))!==null;){var Ia=Ua[1],$a=Ua[2]||"";if(jt[Ia]=jt[Ia]||[],$a.startsWith("."))jt[Ia].push($a.slice(1));else if($a.startsWith("[")){var Xa=$a.match(/^\[\s*(["'])\s*([^'"\]]+)\s*\1\s*\](.*)$/);if(Xa){var si=Xa[2],yi=Xa[3]||"";jt[Ia].push("".concat(si).concat(yi))}else{var Ha=$a.match(/^\[(\d+)\](.*)$/);if(Ha){var Di=Ha[1],Ga=Ha[2]||"";jt[Ia].push("[".concat(Di,"]").concat(Ga))}}}else $a.startsWith("(")&&(jt[Ia].length||jt[Ia].push(""))}for(var ka=/ctx\[\s*(["'])\s*([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\1\s*\]([^\s)]*)/g,Jo=void 0;(Jo=ka.exec(na))!==null;){var Ya=Jo[2],La=Jo[3]||"";if(jt[Ya]=jt[Ya]||[],La.startsWith("."))jt[Ya].push(La.slice(1));else if(La.startsWith("[")){var Kr=La.match(/^\[\s*(["'])\s*([^'"\]]+)\s*\1\s*\](.*)$/);if(Kr){var wt=Kr[2],Gt=Kr[3]||"";jt[Ya].push("".concat(wt).concat(Gt))}else{var un=La.match(/^\[(\d+)\](.*)$/);if(un){var vn=un[1],Ln=un[2]||"";jt[Ya].push("[".concat(vn,"]").concat(Ln))}}}else La.startsWith("(")&&(jt[Ya].length||jt[Ya].push(""))}}else Array.isArray(to)?to.forEach(Jr):to&&Ce()(to)==="object"&&Object.values(to).forEach(Jr)};return or(rr),jt}var so=e(6829),Xr=new so.Kj;function jo(){var rr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],jt={},or=q()(rr),Jr;try{for(or.s();!(Jr=or.n()).done;)for(var to=Jr.value,vo=to.replace(/^ctx\./,""),Lo=vo.split("."),na=jt,Ma=0;Ma<Lo.length;Ma++){var Ua=Lo[Ma],Ia=Ma===Lo.length-1;Ia?na[Ua]="{{".concat(to,"}}"):(na[Ua]=na[Ua]||{},na=na[Ua])}}catch($a){or.e($a)}finally{or.f()}return jt}function $o(rr){return Mr.apply(this,arguments)}function Mr(){return Mr=Kn()(Mn()().mark(function rr(jt){var or;return Mn()().wrap(function(to){for(;;)switch(to.prev=to.next){case 0:return to.next=2,Xr.fullVariables(jt);case 2:return or=to.sent,to.abrupt("return",jo(or));case 4:case"end":return to.stop()}},rr)})),Mr.apply(this,arguments)}function zo(rr,jt){return bo.apply(this,arguments)}function bo(){return bo=Kn()(Mn()().mark(function rr(jt,or){return Mn()().wrap(function(to){for(;;)switch(to.prev=to.next){case 0:return to.next=2,Xr.parseAndRender(jt,{ctx:or});case 2:return to.abrupt("return",to.sent);case 3:case"end":return to.stop()}},rr)})),bo.apply(this,arguments)}function fa(rr){var jt=1,or={},Jr=rr.replace(/{{\s*([^}]+)\s*}}/g,function(to,vo){var Lo="__var".concat(jt);return or[Lo]="{{".concat(vo.trim(),"}}"),jt++,"$".concat(Lo)});return{sql:Jr,bind:or}}function Ho(rr){return ti.apply(this,arguments)}function ti(){return ti=Kn()(Mn()().mark(function rr(jt){var or,Jr,to,vo;return Mn()().wrap(function(na){for(;;)switch(na.prev=na.next){case 0:return or=fa(jt),Jr=or.sql,to=or.bind,na.next=3,$o(Jr);case 3:return vo=na.sent,na.abrupt("return",{sql:Jr,bind:to,liquidContext:vo});case 5:case"end":return na.stop()}},rr)})),ti.apply(this,arguments)}},14994:function(){"use strict"},40408:function(Zt,Oe,e){var ue={"./af":[15903,4920],"./af.js":[15903,4920],"./am":[29911,4920],"./am.js":[29911,4920],"./ar":[63939,4920],"./ar-dz":[47200,4920],"./ar-dz.js":[47200,4920],"./ar-iq":[87719,4920],"./ar-iq.js":[87719,4920],"./ar-kw":[62376,4920],"./ar-kw.js":[62376,4920],"./ar-ly":[48540,4920],"./ar-ly.js":[48540,4920],"./ar-ma":[96817,4920],"./ar-ma.js":[96817,4920],"./ar-sa":[11573,4920],"./ar-sa.js":[11573,4920],"./ar-tn":[99339,4920],"./ar-tn.js":[99339,4920],"./ar.js":[63939,4920],"./az":[88092,4920],"./az.js":[88092,4920],"./be":[60504,4920],"./be.js":[60504,4920],"./bg":[19091,4920],"./bg.js":[19091,4920],"./bi":[19149,4920],"./bi.js":[19149,4920],"./bm":[15287,4920],"./bm.js":[15287,4920],"./bn":[35254,4920],"./bn-bd":[61177,4920],"./bn-bd.js":[61177,4920],"./bn.js":[35254,4920],"./bo":[52502,4920],"./bo.js":[52502,4920],"./br":[8864,4920],"./br.js":[8864,4920],"./bs":[4502,4920],"./bs.js":[4502,4920],"./ca":[33646,4920],"./ca.js":[33646,4920],"./cs":[98507,4920],"./cs.js":[98507,4920],"./cv":[16636,4920],"./cv.js":[16636,4920],"./cy":[28792,4920],"./cy.js":[28792,4920],"./da":[17427,4920],"./da.js":[17427,4920],"./de":[80790,4920],"./de-at":[73237,4920],"./de-at.js":[73237,4920],"./de-ch":[16148,4920],"./de-ch.js":[16148,4920],"./de.js":[80790,4920],"./dv":[11794,4920],"./dv.js":[11794,4920],"./el":[65423,4920],"./el.js":[65423,4920],"./en":[25054,4920],"./en-au":[85109,4920],"./en-au.js":[85109,4920],"./en-ca":[55105,4920],"./en-ca.js":[55105,4920],"./en-gb":[99517,4920],"./en-gb.js":[99517,4920],"./en-ie":[30758,4920],"./en-ie.js":[30758,4920],"./en-il":[95805,4920],"./en-il.js":[95805,4920],"./en-in":[88529,4920],"./en-in.js":[88529,4920],"./en-nz":[50302,4920],"./en-nz.js":[50302,4920],"./en-sg":[35941,4920],"./en-sg.js":[35941,4920],"./en-tt":[46183,4920],"./en-tt.js":[46183,4920],"./en.js":[25054,4920],"./eo":[74990,4920],"./eo.js":[74990,4920],"./es":[67763,4920],"./es-do":[3864,4920],"./es-do.js":[3864,4920],"./es-mx":[37118,4920],"./es-mx.js":[37118,4920],"./es-pr":[23521,4920],"./es-pr.js":[23521,4920],"./es-us":[36165,4920],"./es-us.js":[36165,4920],"./es.js":[67763,4920],"./et":[99670,4920],"./et.js":[99670,4920],"./eu":[20837,4920],"./eu.js":[20837,4920],"./fa":[81379,4920],"./fa.js":[81379,4920],"./fi":[47822,4920],"./fi.js":[47822,4920],"./fo":[69197,4920],"./fo.js":[69197,4920],"./fr":[96023,4920],"./fr-ca":[77989,4920],"./fr-ca.js":[77989,4920],"./fr-ch":[54254,4920],"./fr-ch.js":[54254,4920],"./fr.js":[96023,4920],"./fy":[93220,4920],"./fy.js":[93220,4920],"./ga":[47467,4920],"./ga.js":[47467,4920],"./gd":[54855,4920],"./gd.js":[54855,4920],"./gl":[90229,4920],"./gl.js":[90229,4920],"./gom-latn":[46312,4920],"./gom-latn.js":[46312,4920],"./gu":[87632,4920],"./gu.js":[87632,4920],"./he":[76875,4920],"./he.js":[76875,4920],"./hi":[77573,4920],"./hi.js":[77573,4920],"./hr":[96257,4920],"./hr.js":[96257,4920],"./ht":[98889,4920],"./ht.js":[98889,4920],"./hu":[68562,4920],"./hu.js":[68562,4920],"./hy-am":[38242,4920],"./hy-am.js":[38242,4920],"./id":[83783,4920],"./id.js":[83783,4920],"./index.d":[46990,4920],"./index.d.ts":[46990,4920],"./is":[98980,4920],"./is.js":[98980,4920],"./it":[15551,4920],"./it-ch":[83706,4920],"./it-ch.js":[83706,4920],"./it.js":[15551,4920],"./ja":[76831,4920],"./ja.js":[76831,4920],"./jv":[42641,4920],"./jv.js":[42641,4920],"./ka":[46622,4920],"./ka.js":[46622,4920],"./kk":[32921,4920],"./kk.js":[32921,4920],"./km":[45567,4920],"./km.js":[45567,4920],"./kn":[21113,4920],"./kn.js":[21113,4920],"./ko":[19132,4920],"./ko.js":[19132,4920],"./ku":[94888,4920],"./ku.js":[94888,4920],"./ky":[60466,4920],"./ky.js":[60466,4920],"./lb":[91796,4920],"./lb.js":[91796,4920],"./lo":[68894,4920],"./lo.js":[68894,4920],"./lt":[78768,4920],"./lt.js":[78768,4920],"./lv":[30953,4920],"./lv.js":[30953,4920],"./me":[18066,4920],"./me.js":[18066,4920],"./mi":[68602,4920],"./mi.js":[68602,4920],"./mk":[51560,4920],"./mk.js":[51560,4920],"./ml":[4017,4920],"./ml.js":[4017,4920],"./mn":[94717,4920],"./mn.js":[94717,4920],"./mr":[15473,4920],"./mr.js":[15473,4920],"./ms":[43986,4920],"./ms-my":[77387,4920],"./ms-my.js":[77387,4920],"./ms.js":[43986,4920],"./mt":[28477,4920],"./mt.js":[28477,4920],"./my":[62966,4920],"./my.js":[62966,4920],"./nb":[19682,4920],"./nb.js":[19682,4920],"./ne":[14149,4920],"./ne.js":[14149,4920],"./nl":[99182,4920],"./nl-be":[37496,4920],"./nl-be.js":[37496,4920],"./nl.js":[99182,4920],"./nn":[92722,4920],"./nn.js":[92722,4920],"./oc-lnc":[76159,4920],"./oc-lnc.js":[76159,4920],"./pa-in":[35914,4920],"./pa-in.js":[35914,4920],"./pl":[81987,4920],"./pl.js":[81987,4920],"./pt":[15001,4920],"./pt-br":[57548,4920],"./pt-br.js":[57548,4920],"./pt.js":[15001,4920],"./rn":[123,4920],"./rn.js":[123,4920],"./ro":[18146,4920],"./ro.js":[18146,4920],"./ru":[70600,4920],"./ru.js":[70600,4920],"./rw":[6509,4920],"./rw.js":[6509,4920],"./sd":[65437,4920],"./sd.js":[65437,4920],"./se":[772,4920],"./se.js":[772,4920],"./si":[77109,4920],"./si.js":[77109,4920],"./sk":[35627,4920],"./sk.js":[35627,4920],"./sl":[82544,4920],"./sl.js":[82544,4920],"./sq":[88341,4920],"./sq.js":[88341,4920],"./sr":[50617,4920],"./sr-cyrl":[37101,4920],"./sr-cyrl.js":[37101,4920],"./sr.js":[50617,4920],"./ss":[64127,4920],"./ss.js":[64127,4920],"./sv":[91876,4920],"./sv-fi":[19911,4920],"./sv-fi.js":[19911,4920],"./sv.js":[91876,4920],"./sw":[46148,4920],"./sw.js":[46148,4920],"./ta":[55596,4920],"./ta.js":[55596,4920],"./te":[45159,4920],"./te.js":[45159,4920],"./tet":[99157,4920],"./tet.js":[99157,4920],"./tg":[9928,4920],"./tg.js":[9928,4920],"./th":[62019,4920],"./th.js":[62019,4920],"./tk":[75817,4920],"./tk.js":[75817,4920],"./tl-ph":[46513,4920],"./tl-ph.js":[46513,4920],"./tlh":[97296,4920],"./tlh.js":[97296,4920],"./tr":[73035,4920],"./tr.js":[73035,4920],"./types.d":[63799,4920],"./types.d.ts":[63799,4920],"./tzl":[57797,4920],"./tzl.js":[57797,4920],"./tzm":[84722,4920],"./tzm-latn":[30261,4920],"./tzm-latn.js":[30261,4920],"./tzm.js":[84722,4920],"./ug-cn":[80313,4920],"./ug-cn.js":[80313,4920],"./uk":[64144,4920],"./uk.js":[64144,4920],"./ur":[92957,4920],"./ur.js":[92957,4920],"./uz":[7486,4920],"./uz-latn":[98727,4920],"./uz-latn.js":[98727,4920],"./uz.js":[7486,4920],"./vi":[37553,4920],"./vi.js":[37553,4920],"./x-pseudo":[55321,4920],"./x-pseudo.js":[55321,4920],"./yo":[14724,4920],"./yo.js":[14724,4920],"./zh":[32009,4920],"./zh-cn":[33852],"./zh-cn.js":[33852],"./zh-hk":[2390,4920],"./zh-hk.js":[2390,4920],"./zh-tw":[43901,4920],"./zh-tw.js":[43901,4920],"./zh.js":[32009,4920]};function S(le){if(!e.o(ue,le))return Promise.resolve().then(function(){var U=new Error("Cannot find module '"+le+"'");throw U.code="MODULE_NOT_FOUND",U});var P=ue[le],p=P[0];return Promise.all(P.slice(1).map(e.e)).then(function(){return e.t(p,23)})}S.keys=function(){return Object.keys(ue)},S.id=40408,Zt.exports=S},95475:function(Zt){function Oe(e){return Promise.resolve().then(function(){var ue=new Error("Cannot find module '"+e+"'");throw ue.code="MODULE_NOT_FOUND",ue})}Oe.keys=function(){return[]},Oe.resolve=Oe,Oe.id=95475,Zt.exports=Oe},59816:function(){},24654:function(){},95506:function(){},75347:function(){},31777:function(){},34017:function(){},59905:function(){},64604:function(){},75042:function(){}}]);