System.register(["./index-legacy-BM7x0TDi.js"],(function(t,e){"use strict";var r,n,a,o;return{setters:[t=>{r=t.E,n=t.e,a=t.s,o=t.c}],execute:function(){t("u",(function(t=""){let e,r,n;return"string"==typeof t?e=t:({componentType:e,app:r}=t),e&&""!==e||(e="container"),r||(r=VueDemi.inject("app")),n=r?.resolveComponent(e),n||e.startsWith("magic-ui-")||(e=`magic-ui-${Ne(e)}`,n=r?.resolveComponent(e)),n??e}));var i="object"==typeof global&&global&&global.Object===Object&&global,s="object"==typeof self&&self&&self.Object===Object&&self,c=i||s||Function("return this")(),u=c.Symbol,d=Object.prototype,h=d.hasOwnProperty,l=d.toString,p=u?u.toStringTag:void 0,f=Object.prototype.toString,y=u?u.toStringTag:void 0;function g(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":y&&y in Object(t)?function(t){var e=h.call(t,p),r=t[p];try{t[p]=void 0;var n=!0}catch(o){}var a=l.call(t);return n&&(e?t[p]=r:delete t[p]),a}(t):function(t){return f.call(t)}(t)}function b(t){return null!=t&&"object"==typeof t}var m=Array.isArray;function v(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function j(t){return t}function _(t){if(!v(t))return!1;var e=g(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var D,A=c["__core-js_shared__"],O=(D=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+D:"",w=Function.prototype.toString;function S(t){if(null!=t){try{return w.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var T=/^\[object .+?Constructor\]$/,E=Function.prototype,I=Object.prototype,k=E.toString,C=I.hasOwnProperty,$=RegExp("^"+k.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function P(t){return!(!v(t)||(e=t,O&&O in e))&&(_(t)?$:T).test(S(t));var e}function M(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return P(r)?r:void 0}var x,L,U,F=M(c,"WeakMap"),R=Object.create,B=function(){function t(){}return function(e){if(!v(e))return{};if(R)return R(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),V=Date.now,z=function(){try{var t=M(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),q=z?function(t,e){return z(t,"toString",{configurable:!0,enumerable:!1,value:(r=e,function(){return r}),writable:!0});var r}:j,N=(x=q,L=0,U=0,function(){var t=V(),e=16-(t-U);if(U=t,e>0){if(++L>=800)return arguments[0]}else L=0;return x.apply(void 0,arguments)});function W(t){return t!=t}function G(t,e){return!(null==t||!t.length)&&function(t,e,r){return e==e?function(t,e,r){for(var n=r-1,a=t.length;++n-1}var J=/^(?:0|[1-9]\d*)$/;function H(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&J.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991}function tt(t){return null!=t&&Y(t.length)&&!_(t)}var et=Object.prototype;function rt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||et)}function nt(t){return b(t)&&"[object Arguments]"==g(t)}var at=Object.prototype,ot=at.hasOwnProperty,it=at.propertyIsEnumerable,st=nt(function(){return arguments}())?nt:function(t){return b(t)&&ot.call(t,"callee")&&!it.call(t,"callee")},ct="object"==typeof t&&t&&!t.nodeType&&t,ut=ct&&"object"==typeof e&&e&&!e.nodeType&&e,dt=ut&&ut.exports===ct?c.Buffer:void 0,ht=(dt?dt.isBuffer:void 0)||function(){return!1},lt={};function pt(t){return function(e){return t(e)}}lt["[object Float32Array]"]=lt["[object Float64Array]"]=lt["[object Int8Array]"]=lt["[object Int16Array]"]=lt["[object Int32Array]"]=lt["[object Uint8Array]"]=lt["[object Uint8ClampedArray]"]=lt["[object Uint16Array]"]=lt["[object Uint32Array]"]=!0,lt["[object Arguments]"]=lt["[object Array]"]=lt["[object ArrayBuffer]"]=lt["[object Boolean]"]=lt["[object DataView]"]=lt["[object Date]"]=lt["[object Error]"]=lt["[object Function]"]=lt["[object Map]"]=lt["[object Number]"]=lt["[object Object]"]=lt["[object RegExp]"]=lt["[object Set]"]=lt["[object String]"]=lt["[object WeakMap]"]=!1;var ft="object"==typeof t&&t&&!t.nodeType&&t,yt=ft&&"object"==typeof e&&e&&!e.nodeType&&e,gt=yt&&yt.exports===ft&&i.process,bt=function(){try{var t=yt&&yt.require&&yt.require("util").types;return t||gt&>.binding&>.binding("util")}catch(e){}}(),mt=bt&&bt.isTypedArray,vt=mt?pt(mt):function(t){return b(t)&&Y(t.length)&&!!lt[g(t)]},jt=Object.prototype.hasOwnProperty;function _t(t,e){var r=m(t),n=!r&&st(t),a=!r&&!n&&ht(t),o=!r&&!n&&!a&&vt(t),i=r||n||a||o,s=i?function(t,e){for(var r=-1,n=Array(t);++r-1},$t.prototype.set=function(t,e){var r=this.__data__,n=kt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};var Pt=M(c,"Map");function Mt(t,e){var r,n,a=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?a["string"==typeof e?"string":"hash"]:a.map}function xt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e=200){var u=Ie(t);if(u)return Te(u);i=!1,a=Se,c=new we}else c=s;t:for(;++nnew n.EventEmitter)();constructor(t){super(),this.data=t}update(t,e){e?He(e,t,this.data):this.data=t;const r={updateData:t,path:e??""};e&&this.event.emit(e,r),this.event.emit("",r)}on(t,e){this.event.on(t,e)}off(t,e){this.event.off(t,e)}getData(t){return t?Je(t,this.data):this.data}destroy(){}}class $e extends r{isInit=!1;app;mockData;#t="base";#e;#r;#n;#a=[];#o=[];constructor(t){super(),this.#e=t.schema.id,this.#r=t.schema,this.app=t.app,this.setFields(t.schema.fields),this.setMethods(t.schema.methods||[]);let e=t.initialData;const r=t.ObservedDataClass||Ce;if("editor"===this.app.platform)this.mockData=t.schema.mocks?.find((t=>t.useInEditor))?.data||this.getDefaultData(),e=Oe(this.mockData);else if("boolean"==typeof t.useMock&&t.useMock)this.mockData=t.schema.mocks?.find((t=>t.enable))?.data,e=this.mockData||this.getDefaultData();else{if(t.initialData)return this.#n=new r(t.initialData??{}),void(this.isInit=!0);e=this.getDefaultData()}this.#n=new r(e??{})}get id(){return this.#e}get type(){return this.#t}get schema(){return this.#r}get fields(){return this.#a}get methods(){return this.#o}setFields(t){this.#a=t}setMethods(t){this.#o=t}get data(){return this.#n.getData("")}setData(t,e){this.#n.update(t,e);const r={updateData:t,path:e};this.emit("change",r)}setValue(t,e){return this.setData(e,t)}onDataChange(t,e){this.#n.on(t,e)}offDataChange(t,e){this.#n.off(t,e)}getDefaultData(){return Ye(this.#a)}async init(){this.isInit=!0}destroy(){this.#a=[],this.removeAllListeners(),this.#n.destroy()}}const Pe=t=>Object.entries(t).reduce(((t,[e,r])=>{let n=r;return"object"==typeof r&&(n=JSON.stringify(r)),void 0!==r?`${t}${t?"&":""}${globalThis.encodeURIComponent(e)}=${globalThis.encodeURIComponent(`${n}`)}`:t}),""),Me=async t=>{const{url:e,method:r="GET",headers:n={},params:a={},data:o={},...i}=t,s=Pe(a);let c=JSON.stringify(o);return n["Content-Type"]?.includes("application/x-www-form-urlencoded")&&(c=Pe(o)),(await globalThis.fetch(s?`${e}?${s}`:e,{method:r,headers:n,body:"GET"===r?void 0:c,...i})).json()},xe=new Map,Le=(t,e)=>{let r=!0;for(const{op:a,value:o,range:i,field:s}of t){const[t,...c]=s,u=e[t];if(!u||!c.length)break;try{const t=Je(c.join("."),u);if(!Xe(a,t,o,i)){r=!1;break}}catch(n){console.warn(n)}}return r},Ue=(t,e)=>{if(!t[qe]||!Array.isArray(t[qe])||!t[qe].length)return!0;for(const{cond:r}of t[qe])if(r&&Le(r,e))return!0;return!1},Fe=(t,e,r=[],n={})=>{const a={...n,[e]:{}};let o=Oe(n[e]),i=a[e];return r.forEach(((e,n)=>{Object.assign(i,o),n!==r.length-1?(Array.isArray(o[e])&&(o[e]={},i[e]={}),o=o[e],i=i[e]):i[e]=t})),a},Re=(t,e)=>t.replaceAll(er,((t,r)=>{try{return Je(r,e)}catch(n){return t}})),Be=(t,e)=>"string"==typeof t?Re(t,e):t?.isBindDataSource&&t.dataSourceId?e[t.dataSourceId]:t?.isBindDataSourceField&&t.dataSourceId&&"string"==typeof t.template?Re(t.template,e[t.dataSourceId]):Array.isArray(t)&&"string"==typeof t[0]?((t,e)=>{const[r,...n]=t,a=r.indexOf(tr);if(a>-1){const i=e[r.substring(a+tr.length)];if(!i)return t;try{return Je(n.join("."),i)}catch(o){return t}}return t})(t,e):t,Ve=({compile:t,dsId:e,item:r,deps:n,condDeps:a,inEditor:o,ctxData:i})=>{const{items:s,...c}=r,u=Oe(c);return a[c.id]?.keys.length&&!o&&(u.condResult=Ue(c,i)),Array.isArray(s)&&s.length?u.items=s.map((r=>Ve({compile:t,dsId:e,item:r,deps:n,condDeps:a,inEditor:o,ctxData:i}))):s&&(u.items=s),n[u.id]?.keys.length?Qe(t,u,{[e]:n},e):u};class ze extends r{static dataSourceClassMap=(()=>new Map)();static ObservedDataClass=(()=>Ce)();static register(t,e){ze.dataSourceClassMap.set(t,e)}static getDataSourceClass(t){return ze.dataSourceClassMap.get(t)}static registerObservedData(t){ze.ObservedDataClass=t}app;dataSourceMap=(()=>new Map)();data={};useMock=!1;constructor({app:t,useMock:e,initialData:r}){super(),this.app=t,this.useMock=e,r&&(this.data=r),t.dsl?.dataSources?.forEach((t=>{this.addDataSource(t)}));const n=Array.from(this.dataSourceMap);"function"==typeof Promise.allSettled?Promise.allSettled(n.map((([,t])=>this.init(t)))).then((t=>{const e={},r={};t.forEach(((t,a)=>{const o=n[a][0];"fulfilled"===t.status?this.data[o]?e[o]=this.data[o]:delete e[o]:"rejected"===t.status&&(delete e[o],r[o]=t.reason)})),this.emit("init",e,r)})):Promise.all(n.map((([,t])=>this.init(t)))).then((()=>{this.emit("init",this.data)})).catch((()=>{this.emit("init",this.data)}))}async init(t){if(!(t.isInit||this.app.jsEngine&&t.schema.disabledInitInJsEngine?.includes(this.app.jsEngine))){for(const e of t.methods){if("function"!=typeof e.content)return;"beforeInit"===e.timing&&await e.content({params:{},dataSource:t,app:this.app})}await t.init();for(const e of t.methods){if("function"!=typeof e.content)return;"afterInit"===e.timing&&await e.content({params:{},dataSource:t,app:this.app})}}}get(t){return this.dataSourceMap.get(t)}async addDataSource(t){if(!t)return;const e=new(ze.dataSourceClassMap.get(t.type)||$e)({app:this.app,schema:t,request:this.app.request,useMock:this.useMock,initialData:this.data[t.id],ObservedDataClass:ze.ObservedDataClass});this.dataSourceMap.set(t.id,e),this.data[e.id]=e.data,e.on("change",(t=>{this.setData(e,t)}))}setData(t,e){this.data[t.id]=t.data,this.emit("change",t.id,e)}removeDataSource(t){this.get(t)?.destroy(),delete this.data[t],this.dataSourceMap.delete(t)}updateSchema(t){t.forEach((t=>{if(!this.get(t.id))return;this.removeDataSource(t.id),this.addDataSource(t);const e=this.get(t.id);e&&this.init(e)}))}compiledNode({items:t,...e},r,n=!1){const a=Oe(e);return t&&(a.items=Array.isArray(t)&&n?t.map((t=>this.compiledNode(t,r,n))):t),!1===e.condResult||!1===e.visible?a:Qe((t=>Be(t,this.data)),a,this.app.dsl?.dataSourceDeps||{},r)}compliedConds(t){return Ue(t,this.data)}compliedIteratorItemConds(t,e,r=[]){const[n,...a]=r,o=this.get(n);if(!o)return!0;const i=Fe(t,o.id,a,this.data);return Ue(e,i)}compliedIteratorItems(t,e,r=[]){const[n,...a]=r,o=this.get(n);if(!o)return e;const i="editor"===this.app.platform,s=Fe(t,o.id,a,this.data),{deps:c={},condDeps:u={}}=((t,e,r)=>{let n;if(r){const r=[];e.forEach((t=>{rr(t,(t=>{r.push(t.id)}))})),n=`${t.id}:${r.join(":")}`}else n=`${t.id}:${e.map((t=>t.id)).join(":")}`;if(xe.has(n))return xe.get(n);const a=new ur;a.addTarget(new ar({id:t.id,type:"data-source",isTarget:(e,r)=>!`${e}`.includes(Ke)&&ir(t,e,r,!0)})),a.addTarget(new ar({id:t.id,type:"cond",isTarget:(e,r)=>sr(t,e,r,!0)})),a.collect(e,{},!0);const{deps:o}=a.getTarget(t.id,"data-source"),{deps:i}=a.getTarget(t.id,"cond"),s={deps:o,condDeps:i};return xe.set(n,s),s})(o.schema,e,i);return Object.keys(c).length||Object.keys(u).length?e.map((t=>Ve({compile:t=>Be(t,s),dsId:o.id,item:t,deps:c,condDeps:u,inEditor:i,ctxData:s}))):e}destroy(){this.removeAllListeners(),this.data={},this.dataSourceMap.forEach((t=>{t.destroy()})),this.dataSourceMap.clear()}onDataChange(t,e,r){return this.get(t)?.onDataChange(e,r)}offDataChange(t,e,r){return this.get(t)?.offDataChange(e,r)}}ze.register("http",class extends $e{isLoading=!1;error;httpOptions;#i;#s=[];#c=[];#t="http";constructor(t){const{options:e}=t.schema;super(t),this.httpOptions=e,"function"==typeof t.request?this.#i=t.request:"function"==typeof globalThis.fetch&&(this.#i=Me),this.methods.forEach((t=>{"function"==typeof t.content&&("beforeRequest"===t.timing&&this.#s.push(t.content),"afterRequest"===t.timing&&this.#c.push(t.content))}))}get type(){return this.#t}async init(){this.schema.autoFetch&&await this.request(),super.init()}async request(t={}){this.isLoading=!0;const{url:e,params:r,data:n,headers:a,...o}=this.httpOptions;let i={url:"function"==typeof e?e({app:this.app,dataSource:this}):e,params:"function"==typeof r?r({app:this.app,dataSource:this}):r,data:"function"==typeof n?n({app:this.app,dataSource:this}):n,headers:"function"==typeof a?a({app:this.app,dataSource:this}):a,...o,...t};try{for(const t of this.#s)await t({options:i,params:{},dataSource:this,app:this.app});if("function"==typeof this.schema.beforeRequest&&(i=await this.schema.beforeRequest(i,{app:this.app,dataSource:this})),this.mockData)this.setData(this.mockData);else{let t=await(this.#i?.(i));for(const e of this.#c)await e({res:t,options:i,params:{},dataSource:this,app:this.app});if("function"==typeof this.schema.afterResponse&&(t=await this.schema.afterResponse(t,{app:this.app,dataSource:this,options:i})),this.schema.responseOptions?.dataPath){const e=Je(this.schema.responseOptions.dataPath,t);this.setData(e)}else this.setData(t)}this.error=void 0}catch(s){this.error={msg:s.message},this.emit("error",s)}this.isLoading=!1}get(t){return this.request({...t,method:"GET"})}post(t){return this.request({...t,method:"POST"})}});const qe="displayConds",Ne=(t="")=>t.replace(/\B([A-Z])/g,"-$1").toLowerCase(),We=t=>"[object Object]"===Object.prototype.toString.call(t),Ge=t=>`${t}`.replaceAll(/\[(\d+)\]/g,".$1").split("."),Je=(t="",e={})=>(Array.isArray(t)?t:Ge(t)).reduce(((r,n)=>{if(We(r))return r[n];if(Array.isArray(r)&&/^\d*$/.test(`${n}`))return r[n];throw new Error(`${e}中不存在${t}`)}),e),He=(t,e,r={})=>a(r,t,e),Ke="__tmagic__",Ze="__tmagic__dslNode",Qe=(t,e,r={},n)=>{let a=[];if(n){const t=r[n];a=t?.[e.id].keys||[]}else a=((t={},e)=>Array.from(Object.values(t).reduce(((t,r)=>((r[e]?.keys||[]).forEach((e=>t.add(e))),t)),new Set)))(r,e.id);return a.forEach((r=>{const n=Ge(r),a=n.map(((t,e)=>e{switch("string"==typeof e&&void 0===r&&(r=""),t){case"is":case"=":return e===r;case"not":case"!=":return e!==r;case">":return e>r;case">=":return e>=r;case"<":return e1&&e>=n[0]&&e<=n[1];case"not_between":return n.length<2||en[1];case"include":return e?.includes?.(r);case"not_include":return void 0===e||!e.includes?.(r)}return!1},Ye=t=>{const e={},r={string:void 0,object:{},array:[],boolean:void 0,number:void 0,null:null,any:void 0};return t.forEach((t=>{if(void 0===t.defaultValue)"object"!==t.type?t.type?e[t.name]=r[t.type]:e[t.name]=void 0:e[t.name]=t.fields?Ye(t.fields):r.object;else{if("array"===t.type&&!Array.isArray(t.defaultValue))return void(e[t.name]=r.array);if("object"===t.type&&!We(t.defaultValue)){if("string"==typeof t.defaultValue){try{e[t.name]=JSON.parse(t.defaultValue)}catch(n){e[t.name]=r.object}return}return void(e[t.name]=r.object)}e[t.name]=o(t.defaultValue)}})),e},tr="ds-field::",er=/\$\{([\s\S]+?)\}/g,rr=(t,e,r=[],n=!1)=>{n||e(t,r),Array.isArray(t.items)&&t.items.length&&(r.push(t),t.items.forEach((t=>{rr(t,e,[...r],n)}))),n&&e(t,r)};var nr=(t=>(t.DEFAULT="default",t.CODE_BLOCK="code-block",t.DATA_SOURCE="data-source",t.DATA_SOURCE_METHOD="data-source-method",t.DATA_SOURCE_COND="data-source-cond",t))(nr||{});class ar{isTarget;id;name;type=(()=>nr.DEFAULT)();deps={};isCollectByDefault;constructor(t){this.isTarget=t.isTarget,this.id=t.id,this.name=t.name,this.isCollectByDefault=t.isCollectByDefault??!0,t.type&&(this.type=t.type),t.initialDeps&&(this.deps=t.initialDeps)}updateDep({id:t,name:e,key:r,data:n}){const a=this.deps[t]||{name:e,keys:[]};a.name=e,a.data=n,this.deps[t]=a,-1===a.keys.indexOf(r)&&a.keys.push(r)}removeDep(t,e){if(void 0===t)return void Object.keys(this.deps).forEach((t=>{delete this.deps[t]}));const r=this.deps[t];if(r)if(e){const n=r.keys.indexOf(e);r.keys.splice(n,1),0===r.keys.length&&delete this.deps[t]}else delete this.deps[t]}hasDep(t,e){const r=this.deps[t];return Boolean(r?.keys.find((t=>t===e)))}destroy(){this.deps={}}}const or=(t,e)=>{let r=e;return t.some(((e,n)=>{const a=r.find((({name:t})=>t===e));return r=a?.fields||[],a&&"array"===a.type&&/^(?!\d+$).*$/.test(`${t[n+1]}`)&&n{if(!r||!["string","object"].includes(typeof r))return!1;if(`${e}`.startsWith(qe))return!1;if("string"==typeof r)return((t,e,r=!1)=>{const n=t.match(er)||[];if(n.length<=0)return!1;const a=[],o=[];return n.forEach((t=>{const r=t.substring(2,t.length-1),n=Ge(r),i=n.shift();i&&i===e.id&&(or(n,e.fields)?a.push(t):o.push(t))})),r?a.length>0:o.length>0})(r,t,n);if(We(r)&&r?.isBindDataSource&&r.dataSourceId&&r.dataSourceId===t.id)return!0;if(((t,e)=>t?.isBindDataSourceField&&t.dataSourceId&&t.dataSourceId===e&&"string"==typeof t.template)(r,t.id))return!0;if(((t,e)=>{if(!Array.isArray(t)||"string"!=typeof t[0])return!1;const[r]=t,n=r.indexOf(tr);return-1!==n&&r.substring(n+tr.length)===e})(r,t.id)){const[,...e]=r,a=or(e,t.fields);return n?a:!a}return!1},sr=(t,e,r,n=!1)=>{if(!Array.isArray(r)||!t)return!1;const[a,...o]=r;if(a!==t.id||!`${e}`.startsWith(qe))return!1;if(t.fields?.find((t=>t.name===o[0]))){const e=or(o,t.fields);return n?e:!e}return!1},cr=(t,e,r)=>{for(const n of Object.values(t))for(const t of Object.values(n))r&&t.type!==r||e(t)};class ur{targetsList={};childrenProp="items";idProp="id";nameProp="name";constructor(t){t?.initialTargets&&(this.targetsList=t.initialTargets),t?.childrenProp&&(this.childrenProp=t.childrenProp)}getTargetsList(){return this.targetsList}getTargets(t=nr.DEFAULT){return this.targetsList[t]||{}}addTarget(t){const e=this.getTargets(t.type)||{};this.targetsList[t.type]=e,e[t.id]=t}getTarget(t,e=nr.DEFAULT){return this.getTargets(e)[t]}hasTarget(t,e=nr.DEFAULT){return Boolean(this.getTarget(t,e))}hasSpecifiedTypeTarget(t=nr.DEFAULT){return Object.keys(this.getTargets(t)).length>0}removeTarget(t,e=nr.DEFAULT){const r=this.getTargets(e);r[t]&&(r[t].destroy(),delete r[t])}removeTargets(t=nr.DEFAULT){const e=this.targetsList[t];if(e){for(const t of Object.values(e))t.destroy();delete this.targetsList[t]}}clearTargets(){for(const t of Object.keys(this.targetsList))delete this.targetsList[t]}collect(t,e={},r=!1,n){this.collectByCallback(t,n,(({node:t,target:n})=>{this.removeTargetDep(n,t),this.collectItem(t,n,e,r)}))}collectByCallback(t,e,r){cr(this.targetsList,(n=>{if(e||n.isCollectByDefault)for(const e of t)r({node:e,target:n})}),e)}clear(t,e){let{targetsList:r}=this;e&&(r={[e]:this.getTargets(e)});const n=[];cr(r,(e=>{if(t)for(const r of t)e.removeDep(r[this.idProp]),Array.isArray(r[this.childrenProp])&&r[this.childrenProp].length&&!n.includes(r[this.idProp])&&(n.push(r[this.idProp]),this.clear(r[this.childrenProp]));else e.removeDep()}))}clearByType(t,e){this.clear(e,t)}collectItem(t,e,r={},n=!1){const a=(o,i="")=>{const s=(o,s)=>{const c=o===this.childrenProp,u=i?`${i}.${o}`:o;if(e.isTarget(u,s))e.updateDep({id:t[this.idProp],name:`${t[this.nameProp]||t[this.idProp]}`,data:r,key:u});else if(!c&&Array.isArray(s))for(let t=0,e=s.length;t{if((void 0===(r=t.config)[Ze]||!0===r[Ze])&&t.config.id)return e?.getNode(t.config.id,t.iteratorContainerId,t.iteratorIndex);var r})),hr=t("r",((t,e={})=>{if(!t)return;const r={config:t.data,...e};t.emit("created",r),VueDemi.onMounted((()=>{t.emit("mounted",r)})),VueDemi.onBeforeUnmount((()=>{t.emit("destroy",r)}))}));t("c",(({methods:t,config:e,iteratorContainerId:r,iteratorIndex:n})=>{const a=VueDemi.inject("app");if(!a)throw new Error(`component ${e.type}: app is not injected`);const o=dr({config:e,iteratorContainerId:r,iteratorIndex:n},a);return o&&t&&hr(o,t),{app:a,node:o}})),t("a",(t=>{const e=VueDemi.inject("app"),r=VueDemi.ref("default"),n=new Map,a=new Map,o=new Map,i=(t,{style:e,className:r,...i})=>{e&&n.set(t,e),r&&a.set(t,r),o.set(t,VueDemi.shallowReactive(i))};return VueDemi.watchEffect((()=>{i("default",{style:t.config.style,className:t.config.className})})),VueDemi.onScopeDispose((()=>{o.clear()})),{status:VueDemi.computed((()=>r.value)),style:VueDemi.computed((()=>{const a=r.value||"default",o=n.get("default")||{},i=n.get(a);let s=e?.transformStyle(o)||{};return"default"!==a&&i&&(s=Object.keys(i).reduce(((t,e)=>{const r=i[e];return null==r||isNaN(r)||""===r?{...t,[e]:i[e]}:{...t}}),s)),t.config.displayHidden&&(s.display="none"),void 0!==t.config.condResult&&"mount"===t.config.displayRenderModel&&!1===t.config.condResult&&(s.display="none"),s})),className:VueDemi.computed((()=>{const e=r.value||"default",n=a.get(e)??"",o=[];return t.config.type&&o.push(`magic-ui-${Ne(t.config.type)}`),t.config.layout&&o.push(`magic-layout-${t.config.layout}`),n&&o.push(n),o.join(" ")})),setStatus:t=>{r.value=t},registerStatus:i}})),t("_",((t,e)=>{const r=t.__vccOpts||t;for(const[n,a]of e)r[n]=a;return r}))}}})); //# sourceMappingURL=plugin-vueexport-helper-legacy-CB9-iFmV.js.map