@vtj/pro 0.11.1-alpha.0 → 0.11.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.
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CHHzKN8A.js","./vue-router-5AKQpGpA.js","./vue-CK7CG2oW.js","./@vueuse-CceCMEgA.js","./element-plus-CQpgC9_i.js","./lodash-es-BL-d_OSa.js","./@element-plus-icons-vue-CiUy_FB_.js","./shared-CFJLz5mK.js","./dayjs-DO-COJPZ.js","./element-plus-CfFwvTok.css","./vxe-N9ALOqba.js","./vxe-BAb1d5vW.css","./index-B_zphvit.js","./monaco-editor-B8dwQNlP.js","./monaco-editor-Cpw7ccEV.css","./html2canvas-CIV5arX1.js","./mockjs-BSD1DCM1.js","./index-DYYKpooH.css","./utils-CcFAXsq_.js","./_plugin-vue_export-helper-DlAUqK2U.js","./index-5RBG6XMh.css","./preview-DVuR05zM.js","./page-Js5n0MUh.js","./uni-page-Cjqcu6iY.js","./uni-page-Diqmj53r.css","./auth-Bopfg0NN.js","./auth-DR7VTCAL.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-w-1vXpgK.js","./vue-router-5AKQpGpA.js","./vue-CK7CG2oW.js","./@vueuse-CceCMEgA.js","./element-plus-CQpgC9_i.js","./lodash-es-BL-d_OSa.js","./@element-plus-icons-vue-CiUy_FB_.js","./shared-CFJLz5mK.js","./dayjs-DO-COJPZ.js","./element-plus-CfFwvTok.css","./vxe-N9ALOqba.js","./vxe-BAb1d5vW.css","./index-7okJykr2.js","./monaco-editor-B8dwQNlP.js","./monaco-editor-Cpw7ccEV.css","./html2canvas-CIV5arX1.js","./mockjs-BSD1DCM1.js","./index-DYYKpooH.css","./utils-C2_Z0OAf.js","./_plugin-vue_export-helper-DlAUqK2U.js","./index-5RBG6XMh.css","./preview-BS9P_K7B.js","./page-BPgL95Xv.js","./uni-page-Cjqcu6iY.js","./uni-page-Diqmj53r.css","./auth-ChXm6jsl.js","./auth-DR7VTCAL.css"])))=>i.map(i=>d[i]);
2
2
  var pl=Object.defineProperty,dl=Object.defineProperties;var ml=Object.getOwnPropertyDescriptors;var gr=Object.getOwnPropertySymbols;var vs=Object.prototype.hasOwnProperty,ys=Object.prototype.propertyIsEnumerable;var de=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),gl=e=>{throw TypeError(e)};var Sn=(e,t,r)=>t in e?pl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z=(e,t)=>{for(var r in t||(t={}))vs.call(t,r)&&Sn(e,r,t[r]);if(gr)for(var r of gr(t))ys.call(t,r)&&Sn(e,r,t[r]);return e},st=(e,t)=>dl(e,ml(t));var bs=(e,t)=>{var r={};for(var n in e)vs.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&gr)for(var n of gr(e))t.indexOf(n)<0&&ys.call(e,n)&&(r[n]=e[n]);return r};var A=(e,t,r)=>Sn(e,typeof t!="symbol"?t+"":t,r);var L=(e,t,r)=>new Promise((n,i)=>{var s=u=>{try{a(r.next(u))}catch(c){i(c)}},o=u=>{try{a(r.throw(u))}catch(c){i(c)}},a=u=>u.done?n(u.value):Promise.resolve(u.value).then(s,o);a((r=r.apply(e,t)).next())}),Gt=function(e,t){this[0]=e,this[1]=t},xn=(e,t,r)=>{var n=(o,a,u,c)=>{try{var l=r[o](a),f=(a=l.value)instanceof Gt,p=l.done;Promise.resolve(f?a[0]:a).then(h=>f?n(o==="return"?o:"next",a[1]?{done:h.done,value:h.value}:h,u,c):u({value:h,done:p})).catch(h=>n("throw",h,u,c))}catch(h){c(h)}},i=o=>s[o]=a=>new Promise((u,c)=>n(o,a,u,c)),s={};return r=r.apply(e,t),s[de("asyncIterator")]=()=>s,i("next"),i("throw"),i("return"),s},Tn=e=>{var t=e[de("asyncIterator")],r=!1,n,i={};return t==null?(t=e[de("iterator")](),n=s=>i[s]=o=>t[s](o)):(t=t.call(e),n=s=>i[s]=o=>{if(r){if(r=!1,s==="throw")throw o;return o}return r=!0,{done:!1,value:new Gt(new Promise(a=>{var u=t[s](o);u instanceof Object||gl("Object expected"),a(u)}),1)}}),i[de("iterator")]=()=>i,n("next"),"throw"in t?n("throw"):i.throw=s=>{throw s},"return"in t&&n("return"),i},_s=(e,t,r)=>(t=e[de("asyncIterator")])?t.call(e):(e=e[de("iterator")](),t={},r=(n,i)=>(i=e[n])&&(t[n]=s=>new Promise((o,a,u)=>(s=i.call(e,s),u=s.done,Promise.resolve(s.value).then(c=>o({value:c,done:u}),a)))),r("next"),r("return"),t);import{d as $i,ay as ws,az as Qr,ah as zn,e as qn,v as Go,w as vl,K as Es,u as Ss,ai as yl,o as xs,L as Ts,aA as bl,T as _l,av as wl}from"./vue-CK7CG2oW.js";import{useRoute as Zo,createRouter as El,createWebHashHistory as Sl}from"./vue-router-5AKQpGpA.js";import{z as xl,E as Tl}from"./element-plus-CQpgC9_i.js";import{_ as Ve}from"./monaco-editor-B8dwQNlP.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-CceCMEgA.js";import"./@element-plus-icons-vue-CiUy_FB_.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=r(i);fetch(i.href,s)}})();var Ol={ENV_TYPE:"live",NODE_ENV:"production"},$l=typeof global=="object"&&global&&global.Object===Object&&global;const Xo=$l;var Al=typeof self=="object"&&self&&self.Object===Object&&self,Rl=Xo||Al||Function("return this")();const At=Rl;var jl=At.Symbol;const Ct=jl;var Qo=Object.prototype,Dl=Qo.hasOwnProperty,Cl=Qo.toString,Ue=Ct?Ct.toStringTag:void 0;function Pl(e){var t=Dl.call(e,Ue),r=e[Ue];try{e[Ue]=void 0;var n=!0}catch(s){}var i=Cl.call(e);return n&&(t?e[Ue]=r:delete e[Ue]),i}var Nl=Object.prototype,Bl=Nl.toString;function kl(e){return Bl.call(e)}var Il="[object Null]",Ml="[object Undefined]",Os=Ct?Ct.toStringTag:void 0;function Et(e){return e==null?e===void 0?Ml:Il:Os&&Os in Object(e)?Pl(e):kl(e)}function at(e){return e!=null&&typeof e=="object"}var Fl="[object Symbol]";function cr(e){return typeof e=="symbol"||at(e)&&Et(e)==Fl}function ta(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Ll=Array.isArray;const pt=Ll;var $s=Ct?Ct.prototype:void 0,As=$s?$s.toString:void 0;function ea(e){if(typeof e=="string")return e;if(pt(e))return ta(e,ea)+"";if(cr(e))return As?As.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var Vl=/\s/;function Ul(e){for(var t=e.length;t--&&Vl.test(e.charAt(t)););return t}var Hl=/^\s+/;function zl(e){return e&&e.slice(0,Ul(e)+1).replace(Hl,"")}function ct(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Rs=NaN,ql=/^[-+]0x[0-9a-f]+$/i,Kl=/^0b[01]+$/i,Jl=/^0o[0-7]+$/i,Wl=parseInt;function js(e){if(typeof e=="number")return e;if(cr(e))return Rs;if(ct(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ct(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=zl(e);var r=Kl.test(e);return r||Jl.test(e)?Wl(e.slice(2),r?2:8):ql.test(e)?Rs:+e}function Ai(e){return e}var Yl="[object AsyncFunction]",Gl="[object Function]",Zl="[object GeneratorFunction]",Xl="[object Proxy]";function ae(e){if(!ct(e))return!1;var t=Et(e);return t==Gl||t==Zl||t==Yl||t==Xl}var Ql=At["__core-js_shared__"];const On=Ql;var Ds=function(){var e=/[^.]+$/.exec(On&&On.keys&&On.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function tf(e){return!!Ds&&Ds in e}var ef=Function.prototype,rf=ef.toString;function le(e){if(e!=null){try{return rf.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var nf=/[\\^$.*+?()[\]{}|]/g,sf=/^\[object .+?Constructor\]$/,of=Function.prototype,af=Object.prototype,cf=of.toString,uf=af.hasOwnProperty,lf=RegExp("^"+cf.call(uf).replace(nf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ff(e){if(!ct(e)||tf(e))return!1;var t=ae(e)?lf:sf;return t.test(le(e))}function hf(e,t){return e==null?void 0:e[t]}function fe(e,t){var r=hf(e,t);return ff(r)?r:void 0}var pf=fe(At,"WeakMap");const Kn=pf;var Cs=Object.create,df=function(){function e(){}return function(t){if(!ct(t))return{};if(Cs)return Cs(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();const mf=df;function ra(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function gf(){}function vf(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var yf=800,bf=16,_f=Date.now;function wf(e){var t=0,r=0;return function(){var n=_f(),i=bf-(n-r);if(r=n,i>0){if(++t>=yf)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ef(e){return function(){return e}}var Sf=function(){try{var e=fe(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();const Ur=Sf;var xf=Ur?function(e,t){return Ur(e,"toString",{configurable:!0,enumerable:!1,value:Ef(t),writable:!0})}:Ai;const Tf=xf;var Of=wf(Tf);const $f=Of;function Af(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Rf=9007199254740991,jf=/^(?:0|[1-9]\d*)$/;function tn(e,t){var r=typeof e;return t=t!=null?t:Rf,!!t&&(r=="number"||r!="symbol"&&jf.test(e))&&e>-1&&e%1==0&&e<t}function en(e,t,r){t=="__proto__"&&Ur?Ur(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Ne(e,t){return e===t||e!==e&&t!==t}var Df=Object.prototype,Cf=Df.hasOwnProperty;function Ri(e,t,r){var n=e[t];(!(Cf.call(e,t)&&Ne(n,r))||r===void 0&&!(t in e))&&en(e,t,r)}function na(e,t,r,n){var i=!r;r||(r={});for(var s=-1,o=t.length;++s<o;){var a=t[s],u=n?n(r[a],e[a],a,r,e):void 0;u===void 0&&(u=e[a]),i?en(r,a,u):Ri(r,a,u)}return r}var Ps=Math.max;function Pf(e,t,r){return t=Ps(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=Ps(n.length-t,0),o=Array(s);++i<s;)o[i]=n[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=n[i];return a[t]=r(o),ra(e,this,a)}}function ia(e,t){return $f(Pf(e,t,Ai),e+"")}var Nf=9007199254740991;function ji(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Nf}function ur(e){return e!=null&&ji(e.length)&&!ae(e)}function sa(e,t,r){if(!ct(r))return!1;var n=typeof t;return(n=="number"?ur(r)&&tn(t,r.length):n=="string"&&t in r)?Ne(r[t],e):!1}function oa(e){return ia(function(t,r){var n=-1,i=r.length,s=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(s=e.length>3&&typeof s=="function"?(i--,s):void 0,o&&sa(r[0],r[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++n<i;){var a=r[n];a&&e(t,a,n,s)}return t})}var Bf=Object.prototype;function Di(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Bf;return e===r}function kf(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var If="[object Arguments]";function Ns(e){return at(e)&&Et(e)==If}var aa=Object.prototype,Mf=aa.hasOwnProperty,Ff=aa.propertyIsEnumerable,Lf=Ns(function(){return arguments}())?Ns:function(e){return at(e)&&Mf.call(e,"callee")&&!Ff.call(e,"callee")};const Hr=Lf;function Vf(){return!1}var ca=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Bs=ca&&typeof module=="object"&&module&&!module.nodeType&&module,Uf=Bs&&Bs.exports===ca,ks=Uf?At.Buffer:void 0,Hf=ks?ks.isBuffer:void 0,zf=Hf||Vf;const Ae=zf;var qf="[object Arguments]",Kf="[object Array]",Jf="[object Boolean]",Wf="[object Date]",Yf="[object Error]",Gf="[object Function]",Zf="[object Map]",Xf="[object Number]",Qf="[object Object]",th="[object RegExp]",eh="[object Set]",rh="[object String]",nh="[object WeakMap]",ih="[object ArrayBuffer]",sh="[object DataView]",oh="[object Float32Array]",ah="[object Float64Array]",ch="[object Int8Array]",uh="[object Int16Array]",lh="[object Int32Array]",fh="[object Uint8Array]",hh="[object Uint8ClampedArray]",ph="[object Uint16Array]",dh="[object Uint32Array]",Q={};Q[oh]=Q[ah]=Q[ch]=Q[uh]=Q[lh]=Q[fh]=Q[hh]=Q[ph]=Q[dh]=!0,Q[qf]=Q[Kf]=Q[ih]=Q[Jf]=Q[sh]=Q[Wf]=Q[Yf]=Q[Gf]=Q[Zf]=Q[Xf]=Q[Qf]=Q[th]=Q[eh]=Q[rh]=Q[nh]=!1;function mh(e){return at(e)&&ji(e.length)&&!!Q[Et(e)]}function lr(e){return function(t){return e(t)}}var ua=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ge=ua&&typeof module=="object"&&module&&!module.nodeType&&module,gh=Ge&&Ge.exports===ua,$n=gh&&Xo.process,vh=function(){try{var e=Ge&&Ge.require&&Ge.require("util").types;return e||$n&&$n.binding&&$n.binding("util")}catch(t){}}();const Pt=vh;var Is=Pt&&Pt.isTypedArray,yh=Is?lr(Is):mh;const Ci=yh;var bh=Object.prototype,_h=bh.hasOwnProperty;function la(e,t){var r=pt(e),n=!r&&Hr(e),i=!r&&!n&&Ae(e),s=!r&&!n&&!i&&Ci(e),o=r||n||i||s,a=o?kf(e.length,String):[],u=a.length;for(var c in e)(t||_h.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||tn(c,u)))&&a.push(c);return a}function fa(e,t){return function(r){return e(t(r))}}var wh=fa(Object.keys,Object);const Eh=wh;var Sh=Object.prototype,xh=Sh.hasOwnProperty;function Th(e){if(!Di(e))return Eh(e);var t=[];for(var r in Object(e))xh.call(e,r)&&r!="constructor"&&t.push(r);return t}function rn(e){return ur(e)?la(e):Th(e)}function Oh(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var $h=Object.prototype,Ah=$h.hasOwnProperty;function Rh(e){if(!ct(e))return Oh(e);var t=Di(e),r=[];for(var n in e)n=="constructor"&&(t||!Ah.call(e,n))||r.push(n);return r}function Pi(e){return ur(e)?la(e,!0):Rh(e)}var jh=oa(function(e,t,r,n){na(t,Pi(t),e,n)});const Ms=jh;var Dh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ch=/^\w*$/;function Ni(e,t){if(pt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||cr(e)?!0:Ch.test(e)||!Dh.test(e)||t!=null&&e in Object(t)}var Ph=fe(Object,"create");const tr=Ph;function Nh(){this.__data__=tr?tr(null):{},this.size=0}function Bh(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var kh="__lodash_hash_undefined__",Ih=Object.prototype,Mh=Ih.hasOwnProperty;function Fh(e){var t=this.__data__;if(tr){var r=t[e];return r===kh?void 0:r}return Mh.call(t,e)?t[e]:void 0}var Lh=Object.prototype,Vh=Lh.hasOwnProperty;function Uh(e){var t=this.__data__;return tr?t[e]!==void 0:Vh.call(t,e)}var Hh="__lodash_hash_undefined__";function zh(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=tr&&t===void 0?Hh:t,this}function te(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}te.prototype.clear=Nh,te.prototype.delete=Bh,te.prototype.get=Fh,te.prototype.has=Uh,te.prototype.set=zh;function qh(){this.__data__=[],this.size=0}function nn(e,t){for(var r=e.length;r--;)if(Ne(e[r][0],t))return r;return-1}var Kh=Array.prototype,Jh=Kh.splice;function Wh(e){var t=this.__data__,r=nn(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Jh.call(t,r,1),--this.size,!0}function Yh(e){var t=this.__data__,r=nn(t,e);return r<0?void 0:t[r][1]}function Gh(e){return nn(this.__data__,e)>-1}function Zh(e,t){var r=this.__data__,n=nn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function It(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}It.prototype.clear=qh,It.prototype.delete=Wh,It.prototype.get=Yh,It.prototype.has=Gh,It.prototype.set=Zh;var Xh=fe(At,"Map");const er=Xh;function Qh(){this.size=0,this.__data__={hash:new te,map:new(er||It),string:new te}}function tp(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function sn(e,t){var r=e.__data__;return tp(t)?r[typeof t=="string"?"string":"hash"]:r.map}function ep(e){var t=sn(this,e).delete(e);return this.size-=t?1:0,t}function rp(e){return sn(this,e).get(e)}function np(e){return sn(this,e).has(e)}function ip(e,t){var r=sn(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Mt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mt.prototype.clear=Qh,Mt.prototype.delete=ep,Mt.prototype.get=rp,Mt.prototype.has=np,Mt.prototype.set=ip;var sp="Expected a function";function Bi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(sp);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(Bi.Cache||Mt),r}Bi.Cache=Mt;var op=500;function ap(e){var t=Bi(e,function(n){return r.size===op&&r.clear(),n}),r=t.cache;return t}var cp=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,up=/\\(\\)?/g,lp=ap(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(cp,function(r,n,i,s){t.push(i?s.replace(up,"$1"):n||r)}),t});const fp=lp;function he(e){return e==null?"":ea(e)}function ki(e,t){return pt(e)?e:Ni(e,t)?[e]:fp(he(e))}function fr(e){if(typeof e=="string"||cr(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function ha(e,t){t=ki(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[fr(t[r++])];return r&&r==n?e:void 0}function pa(e,t,r){var n=e==null?void 0:ha(e,t);return n===void 0?r:n}function hp(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var pp=fa(Object.getPrototypeOf,Object);const da=pp;var dp="[object Object]",mp=Function.prototype,gp=Object.prototype,ma=mp.toString,vp=gp.hasOwnProperty,yp=ma.call(Object);function Ii(e){if(!at(e)||Et(e)!=dp)return!1;var t=da(e);if(t===null)return!0;var r=vp.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ma.call(r)==yp}var bp="[object DOMException]",_p="[object Error]";function ga(e){if(!at(e))return!1;var t=Et(e);return t==_p||t==bp||typeof e.message=="string"&&typeof e.name=="string"&&!Ii(e)}var wp=ia(function(e,t){try{return ra(e,void 0,t)}catch(r){return ga(r)?r:new Error(r)}});const Ep=wp;function Sp(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(i);++n<i;)s[n]=e[n+t];return s}function xp(e,t,r){var n=e.length;return r=r===void 0?n:r,Sp(e,t,r)}var Tp="\\ud800-\\udfff",Op="\\u0300-\\u036f",$p="\\ufe20-\\ufe2f",Ap="\\u20d0-\\u20ff",Rp=Op+$p+Ap,jp="\\ufe0e\\ufe0f",Dp="\\u200d",Cp=RegExp("["+Dp+Tp+Rp+jp+"]");function va(e){return Cp.test(e)}function Pp(e){return e.split("")}var ya="\\ud800-\\udfff",Np="\\u0300-\\u036f",Bp="\\ufe20-\\ufe2f",kp="\\u20d0-\\u20ff",Ip=Np+Bp+kp,Mp="\\ufe0e\\ufe0f",Fp="["+ya+"]",Jn="["+Ip+"]",Wn="\\ud83c[\\udffb-\\udfff]",Lp="(?:"+Jn+"|"+Wn+")",ba="[^"+ya+"]",_a="(?:\\ud83c[\\udde6-\\uddff]){2}",wa="[\\ud800-\\udbff][\\udc00-\\udfff]",Vp="\\u200d",Ea=Lp+"?",Sa="["+Mp+"]?",Up="(?:"+Vp+"(?:"+[ba,_a,wa].join("|")+")"+Sa+Ea+")*",Hp=Sa+Ea+Up,zp="(?:"+[ba+Jn+"?",Jn,_a,wa,Fp].join("|")+")",qp=RegExp(Wn+"(?="+Wn+")|"+zp+Hp,"g");function Kp(e){return e.match(qp)||[]}function Jp(e){return va(e)?Kp(e):Pp(e)}function xa(e){return function(t){t=he(t);var r=va(t)?Jp(t):void 0,n=r?r[0]:t.charAt(0),i=r?xp(r,1).join(""):t.slice(1);return n[e]()+i}}var Wp=xa("toUpperCase");const on=Wp;function Yp(e){return on(he(e).toLowerCase())}function Gp(e,t,r,n){var i=-1,s=e==null?0:e.length;for(n;++i<s;)r=t(r,e[i],i,e);return r}function Ta(e){return function(t){return e==null?void 0:e[t]}}var Zp={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Xp=Ta(Zp);const Qp=Xp;var td=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ed="\\u0300-\\u036f",rd="\\ufe20-\\ufe2f",nd="\\u20d0-\\u20ff",id=ed+rd+nd,sd="["+id+"]",od=RegExp(sd,"g");function ad(e){return e=he(e),e&&e.replace(td,Qp).replace(od,"")}var cd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function ud(e){return e.match(cd)||[]}var ld=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function fd(e){return ld.test(e)}var Oa="\\ud800-\\udfff",hd="\\u0300-\\u036f",pd="\\ufe20-\\ufe2f",dd="\\u20d0-\\u20ff",md=hd+pd+dd,$a="\\u2700-\\u27bf",Aa="a-z\\xdf-\\xf6\\xf8-\\xff",gd="\\xac\\xb1\\xd7\\xf7",vd="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",yd="\\u2000-\\u206f",bd=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ra="A-Z\\xc0-\\xd6\\xd8-\\xde",_d="\\ufe0e\\ufe0f",ja=gd+vd+yd+bd,Da="['’]",Fs="["+ja+"]",wd="["+md+"]",Ca="\\d+",Ed="["+$a+"]",Pa="["+Aa+"]",Na="[^"+Oa+ja+Ca+$a+Aa+Ra+"]",Sd="\\ud83c[\\udffb-\\udfff]",xd="(?:"+wd+"|"+Sd+")",Td="[^"+Oa+"]",Ba="(?:\\ud83c[\\udde6-\\uddff]){2}",ka="[\\ud800-\\udbff][\\udc00-\\udfff]",ye="["+Ra+"]",Od="\\u200d",Ls="(?:"+Pa+"|"+Na+")",$d="(?:"+ye+"|"+Na+")",Vs="(?:"+Da+"(?:d|ll|m|re|s|t|ve))?",Us="(?:"+Da+"(?:D|LL|M|RE|S|T|VE))?",Ia=xd+"?",Ma="["+_d+"]?",Ad="(?:"+Od+"(?:"+[Td,Ba,ka].join("|")+")"+Ma+Ia+")*",Rd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jd="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Dd=Ma+Ia+Ad,Cd="(?:"+[Ed,Ba,ka].join("|")+")"+Dd,Pd=RegExp([ye+"?"+Pa+"+"+Vs+"(?="+[Fs,ye,"$"].join("|")+")",$d+"+"+Us+"(?="+[Fs,ye+Ls,"$"].join("|")+")",ye+"?"+Ls+"+"+Vs,ye+"+"+Us,jd,Rd,Ca,Cd].join("|"),"g");function Nd(e){return e.match(Pd)||[]}function Bd(e,t,r){return e=he(e),t=t,t===void 0?fd(e)?Nd(e):ud(e):e.match(t)||[]}var kd="['’]",Id=RegExp(kd,"g");function Mi(e){return function(t){return Gp(Bd(ad(t).replace(Id,"")),e,"")}}var Md=Mi(function(e,t,r){return t=t.toLowerCase(),e+(r?Yp(t):t)});const Bt=Md;function Fd(){this.__data__=new It,this.size=0}function Ld(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Vd(e){return this.__data__.get(e)}function Ud(e){return this.__data__.has(e)}var Hd=200;function zd(e,t){var r=this.__data__;if(r instanceof It){var n=r.__data__;if(!er||n.length<Hd-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Mt(n)}return r.set(e,t),this.size=r.size,this}function $t(e){var t=this.__data__=new It(e);this.size=t.size}$t.prototype.clear=Fd,$t.prototype.delete=Ld,$t.prototype.get=Vd,$t.prototype.has=Ud,$t.prototype.set=zd;var Fa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hs=Fa&&typeof module=="object"&&module&&!module.nodeType&&module,qd=Hs&&Hs.exports===Fa,zs=qd?At.Buffer:void 0,qs=zs?zs.allocUnsafe:void 0;function La(e,t){if(t)return e.slice();var r=e.length,n=qs?qs(r):new e.constructor(r);return e.copy(n),n}function Kd(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[i++]=o)}return s}function Jd(){return[]}var Wd=Object.prototype,Yd=Wd.propertyIsEnumerable,Ks=Object.getOwnPropertySymbols,Gd=Ks?function(e){return e==null?[]:(e=Object(e),Kd(Ks(e),function(t){return Yd.call(e,t)}))}:Jd;const Zd=Gd;function Xd(e,t,r){var n=t(e);return pt(e)?n:hp(n,r(e))}function Yn(e){return Xd(e,rn,Zd)}var Qd=fe(At,"DataView");const Gn=Qd;var tm=fe(At,"Promise");const Zn=tm;var em=fe(At,"Set");const Xn=em;var Js="[object Map]",rm="[object Object]",Ws="[object Promise]",Ys="[object Set]",Gs="[object WeakMap]",Zs="[object DataView]",nm=le(Gn),im=le(er),sm=le(Zn),om=le(Xn),am=le(Kn),Xt=Et;(Gn&&Xt(new Gn(new ArrayBuffer(1)))!=Zs||er&&Xt(new er)!=Js||Zn&&Xt(Zn.resolve())!=Ws||Xn&&Xt(new Xn)!=Ys||Kn&&Xt(new Kn)!=Gs)&&(Xt=function(e){var t=Et(e),r=t==rm?e.constructor:void 0,n=r?le(r):"";if(n)switch(n){case nm:return Zs;case im:return Js;case sm:return Ws;case om:return Ys;case am:return Gs}return t});const rr=Xt;var cm=Object.prototype,um=cm.hasOwnProperty;function lm(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&um.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var fm=At.Uint8Array;const zr=fm;function Fi(e){var t=new e.constructor(e.byteLength);return new zr(t).set(new zr(e)),t}function hm(e,t){var r=Fi(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var pm=/\w*$/;function dm(e){var t=new e.constructor(e.source,pm.exec(e));return t.lastIndex=e.lastIndex,t}var Xs=Ct?Ct.prototype:void 0,Qs=Xs?Xs.valueOf:void 0;function mm(e){return Qs?Object(Qs.call(e)):{}}function Va(e,t){var r=t?Fi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var gm="[object Boolean]",vm="[object Date]",ym="[object Map]",bm="[object Number]",_m="[object RegExp]",wm="[object Set]",Em="[object String]",Sm="[object Symbol]",xm="[object ArrayBuffer]",Tm="[object DataView]",Om="[object Float32Array]",$m="[object Float64Array]",Am="[object Int8Array]",Rm="[object Int16Array]",jm="[object Int32Array]",Dm="[object Uint8Array]",Cm="[object Uint8ClampedArray]",Pm="[object Uint16Array]",Nm="[object Uint32Array]";function Bm(e,t,r){var n=e.constructor;switch(t){case xm:return Fi(e);case gm:case vm:return new n(+e);case Tm:return hm(e);case Om:case $m:case Am:case Rm:case jm:case Dm:case Cm:case Pm:case Nm:return Va(e,r);case ym:return new n;case bm:case Em:return new n(e);case _m:return dm(e);case wm:return new n;case Sm:return mm(e)}}function Ua(e){return typeof e.constructor=="function"&&!Di(e)?mf(da(e)):{}}var km="[object Map]";function Im(e){return at(e)&&rr(e)==km}var to=Pt&&Pt.isMap,Mm=to?lr(to):Im;const Fm=Mm;var Lm="[object Set]";function Vm(e){return at(e)&&rr(e)==Lm}var eo=Pt&&Pt.isSet,Um=eo?lr(eo):Vm;const Hm=Um;var zm=1,Ha="[object Arguments]",qm="[object Array]",Km="[object Boolean]",Jm="[object Date]",Wm="[object Error]",za="[object Function]",Ym="[object GeneratorFunction]",Gm="[object Map]",Zm="[object Number]",qa="[object Object]",Xm="[object RegExp]",Qm="[object Set]",tg="[object String]",eg="[object Symbol]",rg="[object WeakMap]",ng="[object ArrayBuffer]",ig="[object DataView]",sg="[object Float32Array]",og="[object Float64Array]",ag="[object Int8Array]",cg="[object Int16Array]",ug="[object Int32Array]",lg="[object Uint8Array]",fg="[object Uint8ClampedArray]",hg="[object Uint16Array]",pg="[object Uint32Array]",X={};X[Ha]=X[qm]=X[ng]=X[ig]=X[Km]=X[Jm]=X[sg]=X[og]=X[ag]=X[cg]=X[ug]=X[Gm]=X[Zm]=X[qa]=X[Xm]=X[Qm]=X[tg]=X[eg]=X[lg]=X[fg]=X[hg]=X[pg]=!0,X[Wm]=X[za]=X[rg]=!1;function Ar(e,t,r,n,i,s){var o,a=t&zm;if(o!==void 0)return o;if(!ct(e))return e;var u=pt(e);if(u)o=lm(e);else{var c=rr(e),l=c==za||c==Ym;if(Ae(e))return La(e,a);if(c==qa||c==Ha||l&&!i)o=l?{}:Ua(e);else{if(!X[c])return i?e:{};o=Bm(e,c,a)}}s||(s=new $t);var f=s.get(e);if(f)return f;s.set(e,o),Hm(e)?e.forEach(function(m){o.add(Ar(m,t,r,m,e,s))}):Fm(e)&&e.forEach(function(m,d){o.set(d,Ar(m,t,r,d,e,s))});var p=Yn,h=u?void 0:p(e);return Af(h||e,function(m,d){h&&(d=m,m=e[d]),Ri(o,d,Ar(m,t,r,d,e,s))}),o}var dg=1,mg=4;function nr(e){return Ar(e,dg|mg)}var gg="__lodash_hash_undefined__";function vg(e){return this.__data__.set(e,gg),this}function yg(e){return this.__data__.has(e)}function Rr(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Mt;++t<r;)this.add(e[t])}Rr.prototype.add=Rr.prototype.push=vg,Rr.prototype.has=yg;function bg(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function _g(e,t){return e.has(t)}var wg=1,Eg=2;function Ka(e,t,r,n,i,s){var o=r&wg,a=e.length,u=t.length;if(a!=u&&!(o&&u>a))return!1;var c=s.get(e),l=s.get(t);if(c&&l)return c==t&&l==e;var f=-1,p=!0,h=r&Eg?new Rr:void 0;for(s.set(e,t),s.set(t,e);++f<a;){var m=e[f],d=t[f];if(n)var b=o?n(d,m,f,t,e,s):n(m,d,f,e,t,s);if(b!==void 0){if(b)continue;p=!1;break}if(h){if(!bg(t,function(E,g){if(!_g(h,g)&&(m===E||i(m,E,r,n,s)))return h.push(g)})){p=!1;break}}else if(!(m===d||i(m,d,r,n,s))){p=!1;break}}return s.delete(e),s.delete(t),p}function Sg(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function xg(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Tg=1,Og=2,$g="[object Boolean]",Ag="[object Date]",Rg="[object Error]",jg="[object Map]",Dg="[object Number]",Cg="[object RegExp]",Pg="[object Set]",Ng="[object String]",Bg="[object Symbol]",kg="[object ArrayBuffer]",Ig="[object DataView]",ro=Ct?Ct.prototype:void 0,An=ro?ro.valueOf:void 0;function Mg(e,t,r,n,i,s,o){switch(r){case Ig:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case kg:return!(e.byteLength!=t.byteLength||!s(new zr(e),new zr(t)));case $g:case Ag:case Dg:return Ne(+e,+t);case Rg:return e.name==t.name&&e.message==t.message;case Cg:case Ng:return e==t+"";case jg:var a=Sg;case Pg:var u=n&Tg;if(a||(a=xg),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;n|=Og,o.set(e,t);var l=Ka(a(e),a(t),n,i,s,o);return o.delete(e),l;case Bg:if(An)return An.call(e)==An.call(t)}return!1}var Fg=1,Lg=Object.prototype,Vg=Lg.hasOwnProperty;function Ug(e,t,r,n,i,s){var o=r&Fg,a=Yn(e),u=a.length,c=Yn(t),l=c.length;if(u!=l&&!o)return!1;for(var f=u;f--;){var p=a[f];if(!(o?p in t:Vg.call(t,p)))return!1}var h=s.get(e),m=s.get(t);if(h&&m)return h==t&&m==e;var d=!0;s.set(e,t),s.set(t,e);for(var b=o;++f<u;){p=a[f];var E=e[p],g=t[p];if(n)var y=o?n(g,E,p,t,e,s):n(E,g,p,e,t,s);if(!(y===void 0?E===g||i(E,g,r,n,s):y)){d=!1;break}b||(b=p=="constructor")}if(d&&!b){var _=e.constructor,S=t.constructor;_!=S&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof S=="function"&&S instanceof S)&&(d=!1)}return s.delete(e),s.delete(t),d}var Hg=1,no="[object Arguments]",io="[object Array]",vr="[object Object]",zg=Object.prototype,so=zg.hasOwnProperty;function qg(e,t,r,n,i,s){var o=pt(e),a=pt(t),u=o?io:rr(e),c=a?io:rr(t);u=u==no?vr:u,c=c==no?vr:c;var l=u==vr,f=c==vr,p=u==c;if(p&&Ae(e)){if(!Ae(t))return!1;o=!0,l=!1}if(p&&!l)return s||(s=new $t),o||Ci(e)?Ka(e,t,r,n,i,s):Mg(e,t,u,r,n,i,s);if(!(r&Hg)){var h=l&&so.call(e,"__wrapped__"),m=f&&so.call(t,"__wrapped__");if(h||m){var d=h?e.value():e,b=m?t.value():t;return s||(s=new $t),i(d,b,r,n,s)}}return p?(s||(s=new $t),Ug(e,t,r,n,i,s)):!1}function an(e,t,r,n,i){return e===t?!0:e==null||t==null||!at(e)&&!at(t)?e!==e&&t!==t:qg(e,t,r,n,an,i)}var Kg=1,Jg=2;function Wg(e,t,r,n){var i=r.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var o=r[i];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<s;){o=r[i];var a=o[0],u=e[a],c=o[1];if(o[2]){if(u===void 0&&!(a in e))return!1}else{var l=new $t,f;if(!(f===void 0?an(c,u,Kg|Jg,n,l):f))return!1}}return!0}function Ja(e){return e===e&&!ct(e)}function Yg(e){for(var t=rn(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Ja(i)]}return t}function Wa(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Gg(e){var t=Yg(e);return t.length==1&&t[0][2]?Wa(t[0][0],t[0][1]):function(r){return r===e||Wg(r,e,t)}}function Zg(e,t){return e!=null&&t in Object(e)}function Xg(e,t,r){t=ki(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var o=fr(t[n]);if(!(s=e!=null&&r(e,o)))break;e=e[o]}return s||++n!=i?s:(i=e==null?0:e.length,!!i&&ji(i)&&tn(o,i)&&(pt(e)||Hr(e)))}function Qg(e,t){return e!=null&&Xg(e,t,Zg)}var tv=1,ev=2;function rv(e,t){return Ni(e)&&Ja(t)?Wa(fr(e),t):function(r){var n=pa(r,e);return n===void 0&&n===t?Qg(r,e):an(t,n,tv|ev)}}function nv(e){return function(t){return t==null?void 0:t[e]}}function iv(e){return function(t){return ha(t,e)}}function sv(e){return Ni(e)?nv(fr(e)):iv(e)}function ov(e){return typeof e=="function"?e:e==null?Ai:typeof e=="object"?pt(e)?rv(e[0],e[1]):Gg(e):sv(e)}function av(e,t,r,n){for(var i=-1,s=e==null?0:e.length;++i<s;){var o=e[i];t(n,o,r(o),e)}return n}function cv(e){return function(t,r,n){for(var i=-1,s=Object(t),o=n(t),a=o.length;a--;){var u=o[++i];if(r(s[u],u,s)===!1)break}return t}}var uv=cv();const Ya=uv;function lv(e,t){return e&&Ya(e,t,rn)}function fv(e,t){return function(r,n){if(r==null)return r;if(!ur(r))return e(r,n);for(var i=r.length,s=-1,o=Object(r);++s<i&&n(o[s],s,o)!==!1;);return r}}var hv=fv(lv);const pv=hv;function dv(e,t,r,n){return pv(e,function(i,s,o){t(n,i,r(i),o)}),n}function mv(e,t){return function(r,n){var i=pt(r)?av:dv,s={};return i(r,e,ov(n),s)}}var gv=function(){return At.Date.now()};const Rn=gv;var vv="Expected a function",yv=Math.max,bv=Math.min;function Li(e,t,r){var n,i,s,o,a,u,c=0,l=!1,f=!1,p=!0;if(typeof e!="function")throw new TypeError(vv);t=js(t)||0,ct(r)&&(l=!!r.leading,f="maxWait"in r,s=f?yv(js(r.maxWait)||0,t):s,p="trailing"in r?!!r.trailing:p);function h(v){var x=n,$=i;return n=i=void 0,c=v,o=e.apply($,x),o}function m(v){return c=v,a=setTimeout(E,t),l?h(v):o}function d(v){var x=v-u,$=v-c,V=t-x;return f?bv(V,s-$):V}function b(v){var x=v-u,$=v-c;return u===void 0||x>=t||x<0||f&&$>=s}function E(){var v=Rn();if(b(v))return g(v);a=setTimeout(E,d(v))}function g(v){return a=void 0,p&&n?h(v):(n=i=void 0,o)}function y(){a!==void 0&&clearTimeout(a),c=0,n=u=i=a=void 0}function _(){return a===void 0?o:g(Rn())}function S(){var v=Rn(),x=b(v);if(n=arguments,i=this,u=v,x){if(a===void 0)return m(u);if(f)return clearTimeout(a),a=setTimeout(E,t),h(u)}return a===void 0&&(a=setTimeout(E,t)),o}return S.cancel=y,S.flush=_,S}function Qn(e,t,r){(r!==void 0&&!Ne(e[t],r)||r===void 0&&!(t in e))&&en(e,t,r)}function _v(e){return at(e)&&ur(e)}function ti(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function wv(e){return na(e,Pi(e))}function Ev(e,t,r,n,i,s,o){var a=ti(e,r),u=ti(t,r),c=o.get(u);if(c){Qn(e,r,c);return}var l=s?s(a,u,r+"",e,t,o):void 0,f=l===void 0;if(f){var p=pt(u),h=!p&&Ae(u),m=!p&&!h&&Ci(u);l=u,p||h||m?pt(a)?l=a:_v(a)?l=vf(a):h?(f=!1,l=La(u,!0)):m?(f=!1,l=Va(u,!0)):l=[]:Ii(u)||Hr(u)?(l=a,Hr(a)?l=wv(a):(!ct(a)||ae(a))&&(l=Ua(u))):f=!1}f&&(o.set(u,l),i(l,u,n,s,o),o.delete(u)),Qn(e,r,l)}function Ga(e,t,r,n,i){e!==t&&Ya(t,function(s,o){if(i||(i=new $t),ct(s))Ev(e,t,o,r,Ga,n,i);else{var a=n?n(ti(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),Qn(e,o,a)}},Pi)}var Sv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},xv=Ta(Sv);const Tv=xv;var Za=/[&<>"']/g,Ov=RegExp(Za.source);function $v(e){return e=he(e),e&&Ov.test(e)?e.replace(Za,Tv):e}var Av=Object.prototype,Rv=Av.hasOwnProperty,jv=mv(function(e,t,r){Rv.call(e,r)?e[r].push(t):en(e,r,[t])});const Xa=jv;var Dv="[object String]";function bt(e){return typeof e=="string"||!pt(e)&&at(e)&&Et(e)==Dv}function Cv(e,t){return ta(t,function(r){return e[r]})}var Pv="[object ArrayBuffer]";function Nv(e){return at(e)&&Et(e)==Pv}var oo=Pt&&Pt.isArrayBuffer,Bv=oo?lr(oo):Nv;const kv=Bv;var Iv="[object Boolean]";function Mv(e){return e===!0||e===!1||at(e)&&Et(e)==Iv}var Fv="[object Date]";function Lv(e){return at(e)&&Et(e)==Fv}var ao=Pt&&Pt.isDate,Vv=ao?lr(ao):Lv;const Uv=Vv;function Hv(e,t){return an(e,t)}var zv="[object Number]";function Qa(e){return typeof e=="number"||at(e)&&Et(e)==zv}function qv(e){return Qa(e)&&e!=+e}function Kv(e){return e===null}function Jv(e){return e===void 0}var Wv=Mi(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()});const Yv=Wv;var Gv=xa("toLowerCase");const Zv=Gv;var Xv=oa(function(e,t,r){Ga(e,t,r)});const Dt=Xv;function Qv(e,t,r,n){if(!ct(e))return e;t=ki(t,e);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++i<s;){var u=fr(t[i]),c=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=o){var l=a[u];c=void 0,c===void 0&&(c=ct(l)?l:tn(t[i+1])?[]:{})}Ri(a,u,c),a=a[u]}return e}function ty(e,t,r){return e==null?e:Qv(e,t,r)}var ey=Mi(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()});const ry=ey;var tc=Object.prototype,ny=tc.hasOwnProperty;function co(e,t,r,n){return e===void 0||Ne(e,tc[r])&&!ny.call(n,r)?t:e}var iy={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function sy(e){return"\\"+iy[e]}var oy=/<%=([\s\S]+?)%>/g;const ec=oy;var ay=/<%-([\s\S]+?)%>/g;const cy=ay;var uy=/<%([\s\S]+?)%>/g;const ly=uy;var fy={escape:cy,evaluate:ly,interpolate:ec,variable:"",imports:{_:{escape:$v}}};const uo=fy;var hy="Invalid `variable` option passed into `_.template`",py=/\b__p \+= '';/g,dy=/\b(__p \+=) '' \+/g,my=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gy=/[()=,{}\[\]\/\s]/,vy=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yr=/($^)/,yy=/['\n\r\u2028\u2029\\]/g,by=Object.prototype,lo=by.hasOwnProperty;function rc(e,t,r){var n=uo.imports._.templateSettings||uo;r&&sa(e,t,r)&&(t=void 0),e=he(e),t=Ms({},t,n,co);var i=Ms({},t.imports,n.imports,co),s=rn(i),o=Cv(i,s),a,u,c=0,l=t.interpolate||yr,f="__p += '",p=RegExp((t.escape||yr).source+"|"+l.source+"|"+(l===ec?vy:yr).source+"|"+(t.evaluate||yr).source+"|$","g"),h=lo.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/\s/g," ")+`
3
3
  `:"";e.replace(p,function(b,E,g,y,_,S){return g||(g=y),f+=e.slice(c,S).replace(yy,sy),E&&(a=!0,f+=`' +
4
4
  __e(`+E+`) +
@@ -51,15 +51,15 @@ version: 2.9.0
51
51
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
52
52
  * @name @vtj/core
53
53
  * @author CHC chenhuachun1549@dingtalk.com
54
- * @version 0.11.1-alpha.0
54
+ * @version 0.11.1
55
55
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
56
- */const B1="0.11.1-alpha.0",k1="BuiltIn",Ji="VueMaterial",Wi="VueRouterMaterial",I1=[Ji,Wi],M1={vue:"Vue","vue-router":"VueRouter"},Mc={[Ji]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[Wi]:["RouterView","RouterLink"]},F1=["slot","template","component","img","div","p","h1","h2","h3","span","a"];let L1=class{},Fc=class{constructor(){A(this,"listeners",[]);A(this,"isReady",!1)}triggerReady(){this.isReady=!0;for(const t of this.listeners)t();this.listeners=[]}ready(t){this.isReady?t():this.listeners.push(t)}resetReady(){this.isReady=!1}},Cr=class Lc{constructor(t,r,n){A(this,"isUnset",!1);this.name=t,this.value=r,this.defaultValue=n,this.setValue(r)}setValue(t){this.value=t,this.isUnset=this.value===this.defaultValue}getValue(){var t;return(t=this.value)!=null?t:this.defaultValue}static toDsl(t={}){return Object.entries(t).reduce((r,[n,i])=>(i.isUnset||(r[n]=i.getValue()),r),{})}static parse(t={}){return Object.entries(t).reduce((r,[n,i])=>(r[n]=new Lc(n,i),r),{})}},Pr=class Vc{constructor(t){A(this,"name");A(this,"handler");A(this,"modifiers",{});this.schema=t;const{name:r,handler:n}=this.schema;this.name=r,this.handler=n,this.update(t)}update(t){Object.assign(this.schema,t);const{handler:r,modifiers:n={}}=this.schema;this.handler=r,this.modifiers=n}static toDsl(t){return Object.entries(t).reduce((r,[n,i])=>{const{handler:s,modifiers:o}=i;return r[n]={name:n,handler:s,modifiers:o},r},{})}static parse(t={}){return Object.entries(t).reduce((r,[n,i])=>(r[n]=new Vc(i),r),{})}},Ke=class Uc{constructor(t){A(this,"id");A(this,"name","");A(this,"arg");A(this,"modifiers");A(this,"value");A(this,"iterator");this.schema=t,this.id=t.id||gt(),this.update(t)}update(t){Object.assign(this.schema,t);const{name:r,arg:n,modifiers:i,value:s,iterator:o}=this.schema;this.name=r,this.arg=n,this.modifiers=i,this.value=s,this.iterator=o}static parse(t=[]){return t.map(r=>new Uc(r))}static toDsl(t=[]){return t.map(r=>{const{name:n,arg:i,modifiers:s,value:o,iterator:a,id:u}=r;return{id:u,name:n,arg:i,modifiers:s,value:o,iterator:a}})}};const nt="EVENT_NODE_CHANGE";var Ft;let Kr=(Ft=class{constructor(t,r=null){A(this,"__VTJ_NODE__",!0);A(this,"locked",!1);A(this,"id");A(this,"name");A(this,"from");A(this,"invisible",!1);A(this,"children","");A(this,"slot");A(this,"props",{});A(this,"events",{});A(this,"directives",[]);A(this,"disposed",!1);this.parent=r;const{id:n=gt(),name:i,from:s=""}=t;this.id=n,this.name=i,this.from=s,this.update(t,!0),Ft.nodes[this.id]=this}update(t,r=!1){const{invisible:n=!1,locked:i=!1,children:s=[],slot:o,props:a={},events:u={},directives:c=[]}=t;this.invisible=n,this.locked=i,this.setChildren(s,!0),this.setSlot(o,!0),this.props=Cr.parse(a),this.events=Pr.parse(u),this.directives=Ke.parse(c),r||M.emit(nt,this)}setChildren(t="",r=!1){Array.isArray(t)?this.children=t.map(n=>new Ft(n,this)):this.children=t,r||M.emit(nt,this)}setSlot(t,r=!1){this.slot=typeof t=="string"?{name:t,params:[]}:t,r||M.emit(nt,this)}setProp(t,r,n,i=!1){const s=this.props[t];s?s.setValue(r):this.props[t]=new Cr(t,r,n),i||M.emit(nt,this)}removeProp(t,r=!1){delete this.props[t],r||M.emit(nt,this)}getPropValue(t){const r=this.props[t];if(r)return r.getValue()}setEvent(t,r=!1){const n=this.events[t.name];n?n.update(t):this.events[t.name]=new Pr(t),r||M.emit(nt,this)}removeEvent(t,r=!1){delete this.events[t],r||M.emit(nt,this)}setDirective(t,r=!1){const n=t instanceof Ke?t:new Ke(t),i=this.directives.findIndex(s=>s.id===t.id);i>=0?this.directives.splice(i,1,n):this.directives.push(n),r||M.emit(nt,this)}removeDirective(t,r=!1){const n=this.directives.findIndex(i=>i===t||i.id===t.id);n>=0&&this.directives.splice(n,1),r||M.emit(nt,this)}removeChild(t,r=!1){const{children:n,disposed:i}=this;if(i||!Array.isArray(n))return;const s=n.findIndex(o=>o===t);t.parent=null,n.splice(s,1),r||M.emit(nt,this)}appendChild(t,r=!1){const{children:n,disposed:i}=this;i||(t.parent=this,Array.isArray(n)?n.push(t):this.children=[t],r||M.emit(nt,this))}insertAfter(t,r=!1){if(!this.parent)return;const n=this.parent.children;if(Array.isArray(n)){t.parent=this.parent;const i=n.indexOf(this);n.splice(i+1,0,t),r||M.emit(nt,this.parent)}}insertBefore(t,r=!1){if(!this.parent)return;const n=this.parent.children;if(Array.isArray(n)){t.parent=this.parent;const i=n.indexOf(this);n.splice(i,0,t),r||M.emit(nt,this.parent)}}movePrev(t=!1){const r=this.parent;if(!r)return;const n=r.children;if(Array.isArray(n)){const i=n.indexOf(this);i>0&&(n.splice(i,1),n.splice(i-1,0,this),t||M.emit(nt,r))}}moveNext(t=!1){const r=this.parent;if(!r)return;const n=r.children;if(Array.isArray(n)){const i=n.indexOf(this);i>-1&&i<n.length-1&&(n.splice(i,1),n.splice(i+1,0,this),t||M.emit(nt,r))}}toDsl(){const{id:t,name:r,from:n,invisible:i,locked:s,slot:o,children:a,props:u,directives:c,events:l}=this,f=Array.isArray(a)?a.map(p=>p.toDsl()):a;return{id:t,name:r,from:n,invisible:i,locked:s,slot:o,children:f,props:Cr.toDsl(u),directives:Ke.toDsl(c),events:Pr.toDsl(l)}}dispose(t=!1){const{children:r,disposed:n}=this;n||(Array.isArray(r)&&r.forEach(i=>i.dispose(!0)),this.parent?this.parent.removeChild(this,t):t||M.emit(nt,this),this.parent=null,this.disposed=!0,delete Ft.nodes[this.id])}lock(t=!1){if(this.locked=!0,Array.isArray(this.children))for(const r of this.children)r.lock(!0);t||M.emit(nt,this)}unlock(t=!1){if(this.locked=!1,Array.isArray(this.children))for(const r of this.children)r.unlock(!0);t||M.emit(nt,this)}setVisible(t,r=!1){if(this.invisible=!t,Array.isArray(this.children))for(const n of this.children)n.setVisible(t,!0);r||M.emit(nt,this)}isChild(t){let r=!1;if(Array.isArray(this.children)){for(const n of this.children)if(t===n||t.id===n.id){r=!0;break}else if(r=n.isChild(t),r)break}return r}},A(Ft,"nodes",{}),Ft);const G="EVENT_BLOCK_CHANGE";var qt;let ee=(qt=class{constructor(t){A(this,"__VTJ_BLOCK__",!0);A(this,"id");A(this,"name","");A(this,"inject",[]);A(this,"state",{});A(this,"lifeCycles",{});A(this,"methods",{});A(this,"computed",{});A(this,"watch",[]);A(this,"css","");A(this,"props",[]);A(this,"emits",[]);A(this,"slots",[]);A(this,"dataSources",{});A(this,"nodes",[]);A(this,"locked",!1);A(this,"disposed",!1);const{id:r}=t;this.id=r||gt(),this.update(t,!0)}update(t,r=!1){for(const i of qt.normalAttrs){const s=t[i];s&&(this[i]=s)}const{nodes:n=[]}=t;n.length&&(this.nodes=n.map(i=>new Kr(i))),r||M.emit(G,this)}toDsl(t){const{__VTJ_BLOCK__:r,id:n,nodes:i}=this;return st(z({},qt.normalAttrs.reduce((s,o)=>(s[o]=this[o],s),{})),{__VTJ_BLOCK__:r,__VERSION__:t||Oc().toString(),id:n,nodes:i.map(s=>s.toDsl())})}dispose(){this.nodes.map(t=>t.dispose(!0)),this.nodes=[],this.disposed=!0}setFunction(t,r,n,i=!1){this[t][r]=n,i||M.emit(G,this)}removeFunction(t,r,n=!1){delete this[t][r],n||M.emit(G,this)}setState(t,r,n=!1){this.state[t]=r,n||M.emit(G,this)}removeState(t,r=!1){delete this.state[t],r||M.emit(G,this)}setCss(t,r=!1){this.css=t,r||M.emit(G,this)}setWatch(t,r=!1){t.id=t.id||gt();const n=this.watch.findIndex(i=>i.id&&i.id===t.id||i===t);n>-1?this.watch.splice(n,1,t):this.watch.push(t),r||M.emit(G,this)}removeWatch(t,r=!1){const n=this.watch.findIndex(i=>i.id&&i.id===t.id||i===t);n>-1&&(this.watch.splice(n,1),r||M.emit(G,this))}setProp(t,r=!1){const n=this.props.findIndex(i=>typeof i=="string"?i===t.name:i.name===t.name);n>-1?this.props.splice(n,1,t):this.props.push(t),r||M.emit(G,this)}removeProp(t,r=!1){const n=this.props.findIndex(i=>typeof i=="string"?i===t.name:i.name===t.name);n>-1&&(this.props.splice(n,1),r||M.emit(G,this))}setEmit(t,r=!1){const n=bt(t)?{name:t,params:[]}:t,i=this.emits.findIndex(s=>s===n.name||s===n);i>-1?this.emits.splice(i,1,n):this.emits.push(n),r||M.emit(G,this)}removeEmit(t,r=!1){const n=this.emits.findIndex(i=>bt(i)?i===t:i.name===t);n>-1&&(this.emits.splice(n,1),r||M.emit(G,this))}setSlot(t,r=!1){const n=bt(t)?{name:t,params:[]}:t,i=this.slots.findIndex(s=>s===n.name||s===n);i>-1?this.slots.splice(i,1,n):this.slots.push(n),r||M.emit(G,this)}removeSlot(t,r=!1){const n=this.slots.findIndex(i=>bt(i)?i===t:i.name===t);n>-1&&(this.slots.splice(n,1),r||M.emit(G,this))}setInject(t,r=!1){const n=this.inject.findIndex(i=>i.name===t.name);n>-1?this.inject.splice(n,1,t):this.inject.push(t),r||M.emit(G,this)}removeInject(t,r=!1){const n=this.inject.findIndex(i=>i.name===t.name);n>-1&&(this.inject.splice(n,1),r||M.emit(G,this))}setDataSource(t,r=!1){this.dataSources[t.name]=t,r||M.emit(G,this)}removeDataSource(t,r=!1){delete this.dataSources[t],r||M.emit(G,this)}insertAfter(t,r,n=!1){t.parent=null;const i=this.nodes.indexOf(r);this.nodes.splice(i+1,0,t),n||M.emit(G,this)}insertBefore(t,r,n=!1){t.parent=null;const i=this.nodes.indexOf(r);this.nodes.splice(i,0,t),n||M.emit(G,this)}appendNode(t,r=!1){t.parent=null,this.nodes.push(t),r||M.emit(G,this)}addNode(t,r,n="inner",i=!1){r?["left","top"].includes(n)?r.parent?r.insertAfter(t,i):this.insertBefore(t,r,i):["right","bottom"].includes(n)?r.parent?r.insertAfter(t,i):this.insertAfter(t,r,i):r.appendChild(t,i):this.appendNode(t,i)}__removeNode(t,r=!1){const n=this.nodes.findIndex(i=>i.id===t.id);n>-1&&(this.nodes.splice(n,1),r||M.emit(G,this))}removeNode(t,r=!1){t.parent?t.dispose(r):(t.dispose(!0),this.__removeNode(t,r))}move(t,r,n="inner",i=!1){t.parent?t.parent.removeChild(t,!0):this.__removeNode(t,!0),this.addNode(t,r,n,i)}movePrev(t,r=!1){if(t.parent)t.movePrev(r);else{const n=this.nodes,i=n.indexOf(t);i>0&&(n.splice(i,1),n.splice(i-1,0,t),r||M.emit(G,this))}}moveNext(t,r=!1){if(t.parent)t.moveNext(r);else{const n=this.nodes,i=n.indexOf(t);i>-1&&i<n.length-1&&(n.splice(i,1),n.splice(i+1,0,t),r||M.emit(G,this))}}cloneNode(t,r=!1){const n=Gi(t.toDsl()),i=new Kr(n);return this.addNode(i,t,"bottom",r),i}lock(t=!1){this.locked=!0;for(const r of this.nodes)r.lock(!0);t||M.emit(G,this)}unlock(t=!1){this.locked=!1;for(const r of this.nodes)r.unlock(!0);t||M.emit(G,this)}isChild(t){let r=!1;for(const n of this.nodes)if(t===n||t.id===n.id){r=!0;break}else if(r=n.isChild(t),r)break;return r}},A(qt,"normalAttrs",["name","locked","inject","state","lifeCycles","methods","computed","watch","css","props","emits","slots","dataSources","__TEMPLATE_ID__"]),qt);const it="EVENT_PROJECT_CHANGE",ai="EVENT_PROJECT_ACTIVED",ci="EVENT_PROJECT_DEPS_CHANGE",Je="EVENT_PROJECT_PAGES_CHANGE",we="EVENT_PROJECT_BLOCKS_CHANGE",ui="EVENT_PROJECT_APIS_CHANGE",li="EVENT_PROJECT_META_CHANGE",Hc="EVENT_PROJECT_PUBLISH",zc="EVENT_PROJECT_FILE_PUBLISH",qc="EVENT_PROJECT_GEN_SOURCE",Qe=class Qe{constructor(t){A(this,"id","");A(this,"platform","web");A(this,"name","");A(this,"description","");A(this,"homepage","");A(this,"dependencies",[]);A(this,"pages",[]);A(this,"blocks",[]);A(this,"apis",[]);A(this,"meta",[]);A(this,"currentFile",null);A(this,"config",{});A(this,"uniConfig",{});A(this,"__BASE_PATH__","/");const{id:r}=t;this.id=r||gt(),this.update(t,!0)}update(t,r=!1){for(const n of Qe.attrs){const i=t[n];i&&(this[n]=i)}r||M.emit(it,{model:this,type:"update",data:t})}isPageFile(t){return t.type==="page"}cleanPagesDsl(t){for(const r of t)delete r.dsl,r.children&&r.children.length&&this.cleanPagesDsl(r.children)}toDsl(t){const{id:r}=this,n=Qe.attrs.reduce((i,s)=>(i[s]=this[s],i),{});return n.pages&&(n.pages=n.pages.map(i=>nr(st(z({},i),{dsl:void 0}))),this.cleanPagesDsl(n.pages)),n.blocks&&(n.blocks=n.blocks.map(i=>nr(st(z({},i),{dsl:void 0})))),z({__VTJ_PROJECT__:!0,id:r},n)}active(t,r=!1){this.currentFile=t,r||M.emit(ai,{model:this,type:"update",data:t})}deactivate(t=!1){this.currentFile=null,t||M.emit(ai,{model:this,type:"update",data:null})}setDeps(t,r=!1){const n=this.dependencies,i=n.findIndex(o=>o.package===t.package);let s;if(i>-1?(s="update",n.splice(i,1,z(z({},n[i]),t))):(s="create",n.push(t)),!r){const o={model:this,type:s,data:t};M.emit(ci,o),M.emit(it,o)}}removeDeps(t,r=!1){const n=this.dependencies,i=n.findIndex(s=>s.package===t.package);if(i>-1&&n.splice(i,1),!r){const s={model:this,type:"delete",data:t};M.emit(ci,s),M.emit(it,s)}}getPage(t){const r=(n,i=[])=>{for(const s of i){if(s.id===n)return s;if(s.children&&s.children.length){const o=r(n,s.children);if(o)return o}}};return r(t,this.pages)}getPages(){const t=(r=[])=>{let n=[];for(const i of r)i.dir?i.children&&i.children.length&&(n=n.concat(t(i.children))):n.push(i);return n};return t(this.pages)}createPage(t,r,n=!1){return L(this,null,function*(){if(t.id=t.raw?t.name:t.id||gt(),t.type="page",t.dir?t.children=[]:t.dsl=t.dsl||new ee({id:t.id,name:ei(t.name)}).toDsl(),r){const i=this.getPage(r);i?i.children?i.children.push(t):i.children=[t]:console.warn(`not found PageFile for id: ${r} `)}else this.pages.push(t);if(!n){const i={model:this,type:"create",data:t};M.emit(Je,i),M.emit(it,i)}!this.currentFile&&!t.dir&&(yield Se(1e3),this.active(t,n))})}updatePage(t,r=!1){const n=this.getPage(t.id);if(n?Object.assign(n,t):console.warn(`not found PageFile for id: ${t.id} `),!r){const i={model:this,type:"update",data:t};M.emit(Je,i),M.emit(it,i)}}clonePage(t,r,n=!1){var f;const i=gt(),s=`${t.name}Copy`,o=`${t.title}_副本`,a=new ee({id:i,name:s}).toDsl(),u=Dt({},t,{id:i,name:s,title:o,dsl:a}),c=r?((f=this.getPage(r))==null?void 0:f.children)||[]:this.pages,l=c.findIndex(p=>p.id===t.id);if(c.splice(l+1,0,u),!n){const p={model:this,type:"clone",data:{source:t,target:u}};M.emit(Je,p),M.emit(it,p)}}saveToBlock(t,r=!1){return L(this,null,function*(){this.active(t,r),yield Se(1e3);const n=gt(),i=t.name,s=t.title,o=new ee({id:n,name:i}).toDsl(),a=Dt({},t,{id:n,name:i,title:s,dsl:o,type:"block",fromType:"Schema"});if(this.blocks.push(a),!r){const u={model:this,type:"create",data:a};M.emit(we,u),M.emit(it,u)}})}removePage(t,r=!1){var s;const n=this.getPage(t),i=(o,a)=>{const u=a.findIndex(c=>c.id===o);if(u>=0){a.splice(u,1);return}for(const c of a)c.children&&c.children.length&&i(o,c.children)};if(i(t,this.pages),t===this.homepage&&(this.homepage=""),((s=this.currentFile)==null?void 0:s.id)===t&&this.deactivate(r),!r){const o={model:this,type:"delete",data:n};M.emit(Je,o),M.emit(it,o)}}getBlock(t){return this.blocks.find(r=>r.id===t)}createBlock(t,r=!1){return L(this,null,function*(){const n=t.id||gt(),i=ei(t.name);t.id=n,t.type="block",t.dsl=new ee({id:n,name:i}).toDsl(),this.blocks.push(t);const s=t.fromType||"Schema";if(!r){const o={model:this,type:"create",data:t};M.emit(we,o),M.emit(it,o)}!this.currentFile&&s==="Schema"&&(yield Se(1e3),this.active(t,r))})}updateBlock(t,r=!1){const n=this.getBlock(t.id);if(n?(Object.assign(n,t),n.dsl&&(n.dsl.name=t.name)):console.warn(`not found PageFile for id: ${t.id} `),!r){const i={model:this,type:"update",data:t};M.emit(we,i),M.emit(it,i)}}cloneBlock(t,r=!1){const n=gt(),i=`${t.name}Copy`,s=`${t.title}_副本`,o=new ee({id:n,name:i}).toDsl(),a=Dt({},t,{id:n,name:i,title:s,dsl:o}),u=this.blocks.findIndex(c=>c.id===t.id);if(this.blocks.splice(u+1,0,a),!r){const c={model:this,type:"clone",data:{source:t,target:a}};M.emit(we,c),M.emit(it,c)}}removeBlock(t,r=!1){var o;const n=this.getBlock(t),i=this.blocks,s=i.findIndex(a=>a.id===t);if(s>-1?(i.splice(s,1),((o=this.currentFile)==null?void 0:o.id)===t&&this.deactivate(r)):console.warn(`not found PageFile for id: ${t} `),!r){const a={model:this,type:"delete",data:n};M.emit(we,a),M.emit(it,a)}}existBlockName(t,r=[]){return this.blocks.some(n=>n.name===t&&!r.includes(n.id))}existPageName(t,r=[]){return this.getPages().some(n=>n.name===t&&!r.includes(n.id))}setApi(t,r=!1){const n=this.apis.find(s=>s.name===t.name||s.id===t.id);let i;if(n?(i="update",Object.assign(n,t)):(i="create",t.id=gt(),this.apis.push(t)),!r){const s={model:this,type:i,data:t};M.emit(ui,s),M.emit(it,s)}}removeApi(t,r=!1){const n=this.apis.findIndex(i=>i.name===t||i.id===t);if(n>-1?this.apis.splice(n,1):console.warn(`not found Api for name: ${t} `),!r){const i={model:this,type:"delete",data:t};M.emit(ui,i),M.emit(it,i)}}existApiName(t,r=[]){return this.apis.some(n=>n.name===t&&!r.includes(n.id))}setMeta(t,r=!1){const n=this.meta.find(s=>s.code===t.code||s.id===t.id);let i;if(n?(i="update",Object.assign(n,t)):(i="create",t.id=gt(),this.meta.push(t)),!r){const s={model:this,type:i,data:t};M.emit(li,s),M.emit(it,s)}}removeMeta(t,r=!1){const n=this.meta.findIndex(i=>i.code===t||i.id===t);if(n>-1?this.meta.splice(n,1):console.warn(`not found meta for name: ${name} `),!r){const i={model:this,type:"delete",data:t};M.emit(li,i),M.emit(it,i)}}existMetaCode(t,r=[]){return this.meta.some(n=>n.code===t&&!r.includes(n.id))}setHomepage(t,r=!1){if(this.homepage=t,!r){const n={model:this,type:"update",data:t};M.emit(it,n)}}setConfig(t,r=!1){if(this.config=Object.assign(this.config,t),!r){const n={model:this,type:"update",data:t};M.emit(it,n)}}setUniConfig(t,r,n=!1){if(this.uniConfig=Object.assign(this.uniConfig,{[t]:r}),!n){const i={model:this,type:"update",data:this.uniConfig};M.emit(it,i)}}publish(t){const r={model:this,type:"publish",data:t||this};t?M.emit(zc,r):M.emit(Hc,r)}genSource(){const t={model:this,type:"gen",data:null};M.emit(qc,t)}};A(Qe,"attrs",["platform","name","homepage","description","dependencies","pages","blocks","apis","meta","config","uniConfig","__BASE_PATH__"]);let ce=Qe;const We="EVENT_HISTORY_CHANGE",Nr="EVENT_HISTORY_LOAD";let Yi=class{constructor(t,r={}){A(this,"options",{max:50});A(this,"index",-1);A(this,"id");A(this,"items");Object.assign(this.options,r);const{id:n,items:i=[]}=t;this.id=n,this.items=i}toDsl(){const{id:t,items:r}=this;return{id:t,items:r.map(n=>({id:n.id,label:n.label}))}}get(t){return this.items.find(r=>r.id===t)}add(t,r=!1){const{max:n}=this.options,i={id:gt(),label:new Date().toLocaleString(),dsl:nr(t)};if(this.items.unshift(i),this.items.length>n){const s=this.items.splice(n);r||M.emit(We,{model:this,type:"delete",data:s.map(o=>o.id)})}this.index=-1,r||M.emit(We,{model:this,type:"create",data:i})}remove(t,r=!1){const n=this.items.findIndex(i=>i.id===t);n>-1?(this.items.splice(n,1),n===this.index?this.index=-1:this.index>=this.items.length&&(this.index=this.items.length-1)):console.warn(`not found HistoryItem for id: ${t} `),r||M.emit(We,{model:this,type:"delete",data:[t]})}forward(t=!1){const{index:r,items:n}=this;if(r<0)return;--this.index;const i=n[this.index];i&&!t&&M.emit(Nr,{model:this,type:"load",data:i})}backward(t=!1){const{index:r,items:n}=this;if(r>=n.length-1)return;r<0&&(this.index=0),++this.index;const i=n[this.index];i&&!t&&M.emit(Nr,{model:this,type:"load",data:i})}load(t,r=!1){const n=this.items.findIndex(i=>i.id===t);n>=0&&(this.index=n,r||M.emit(Nr,{model:this,type:"load",data:this.items[n]}))}clear(t=!1){this.index=-1;const r=this.items.map(n=>n.id);this.items=[],t||M.emit(We,{model:this,type:"clear",data:r})}};const M=Bc();function V1(e){return e instanceof ee}function U1(e){return e instanceof Kr}function H1(e){return!!e.__VTJ_BLOCK__}function Gi(e){const t=nr(e);return delete t.id,Array.isArray(t.children)&&(t.children=t.children.map(r=>Gi(r))),t}function z1(e){const t=e.fromType||"Schema";return t==="Schema"?{type:"Schema",id:e.id}:t==="UrlSchema"?{type:"UrlSchema",url:(e.urls||"").split(",")[0]||""}:t==="Plugin"?{type:"Plugin",urls:(e.urls||"").split(","),library:e.library}:""}const Nw=Object.freeze(Object.defineProperty({__proto__:null,BUILT_IN_COMPONENTS:Mc,BUILT_IN_LIBRARAY_MAP:M1,BUILT_IN_MATERIALS:I1,BUILT_IN_NAME:k1,BUILT_IN_TAGS:F1,BUILT_IN_VUE:Ji,BUILT_IN_VUE_ROUTER:Wi,Base:Fc,BlockModel:ee,DirectiveModel:Ke,EVENT_BLOCK_CHANGE:G,EVENT_HISTORY_CHANGE:We,EVENT_HISTORY_LOAD:Nr,EVENT_NODE_CHANGE:nt,EVENT_PROJECT_ACTIVED:ai,EVENT_PROJECT_APIS_CHANGE:ui,EVENT_PROJECT_BLOCKS_CHANGE:we,EVENT_PROJECT_CHANGE:it,EVENT_PROJECT_DEPS_CHANGE:ci,EVENT_PROJECT_FILE_PUBLISH:zc,EVENT_PROJECT_GEN_SOURCE:qc,EVENT_PROJECT_META_CHANGE:li,EVENT_PROJECT_PAGES_CHANGE:Je,EVENT_PROJECT_PUBLISH:Hc,EventModel:Pr,HistoryModel:Yi,NodeModel:Kr,ProjectModel:ce,PropModel:Cr,Service:L1,VTJ_CORE_VERSION:B1,cloneDsl:Gi,createNodeFrom:z1,emitter:M,isBlock:V1,isBlockSchema:H1,isNode:U1},Symbol.toStringTag,{value:"Module"}));var q1=Object.defineProperty,K1=(e,t,r)=>t in e?q1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xt=(e,t,r)=>K1(e,typeof t!="symbol"?t+"":t,r);(function(){if(typeof window>"u"||typeof EventTarget>"u")return;const e=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(t,r,n){typeof n!="boolean"&&(n=n||{},n.passive=!1),e.call(this,t,r,n)}})();/**!
56
+ */const B1="0.11.1",k1="BuiltIn",Ji="VueMaterial",Wi="VueRouterMaterial",I1=[Ji,Wi],M1={vue:"Vue","vue-router":"VueRouter"},Mc={[Ji]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[Wi]:["RouterView","RouterLink"]},F1=["slot","template","component","img","div","p","h1","h2","h3","span","a"];let L1=class{},Fc=class{constructor(){A(this,"listeners",[]);A(this,"isReady",!1)}triggerReady(){this.isReady=!0;for(const t of this.listeners)t();this.listeners=[]}ready(t){this.isReady?t():this.listeners.push(t)}resetReady(){this.isReady=!1}},Cr=class Lc{constructor(t,r,n){A(this,"isUnset",!1);this.name=t,this.value=r,this.defaultValue=n,this.setValue(r)}setValue(t){this.value=t,this.isUnset=this.value===this.defaultValue}getValue(){var t;return(t=this.value)!=null?t:this.defaultValue}static toDsl(t={}){return Object.entries(t).reduce((r,[n,i])=>(i.isUnset||(r[n]=i.getValue()),r),{})}static parse(t={}){return Object.entries(t).reduce((r,[n,i])=>(r[n]=new Lc(n,i),r),{})}},Pr=class Vc{constructor(t){A(this,"name");A(this,"handler");A(this,"modifiers",{});this.schema=t;const{name:r,handler:n}=this.schema;this.name=r,this.handler=n,this.update(t)}update(t){Object.assign(this.schema,t);const{handler:r,modifiers:n={}}=this.schema;this.handler=r,this.modifiers=n}static toDsl(t){return Object.entries(t).reduce((r,[n,i])=>{const{handler:s,modifiers:o}=i;return r[n]={name:n,handler:s,modifiers:o},r},{})}static parse(t={}){return Object.entries(t).reduce((r,[n,i])=>(r[n]=new Vc(i),r),{})}},Ke=class Uc{constructor(t){A(this,"id");A(this,"name","");A(this,"arg");A(this,"modifiers");A(this,"value");A(this,"iterator");this.schema=t,this.id=t.id||gt(),this.update(t)}update(t){Object.assign(this.schema,t);const{name:r,arg:n,modifiers:i,value:s,iterator:o}=this.schema;this.name=r,this.arg=n,this.modifiers=i,this.value=s,this.iterator=o}static parse(t=[]){return t.map(r=>new Uc(r))}static toDsl(t=[]){return t.map(r=>{const{name:n,arg:i,modifiers:s,value:o,iterator:a,id:u}=r;return{id:u,name:n,arg:i,modifiers:s,value:o,iterator:a}})}};const nt="EVENT_NODE_CHANGE";var Ft;let Kr=(Ft=class{constructor(t,r=null){A(this,"__VTJ_NODE__",!0);A(this,"locked",!1);A(this,"id");A(this,"name");A(this,"from");A(this,"invisible",!1);A(this,"children","");A(this,"slot");A(this,"props",{});A(this,"events",{});A(this,"directives",[]);A(this,"disposed",!1);this.parent=r;const{id:n=gt(),name:i,from:s=""}=t;this.id=n,this.name=i,this.from=s,this.update(t,!0),Ft.nodes[this.id]=this}update(t,r=!1){const{invisible:n=!1,locked:i=!1,children:s=[],slot:o,props:a={},events:u={},directives:c=[]}=t;this.invisible=n,this.locked=i,this.setChildren(s,!0),this.setSlot(o,!0),this.props=Cr.parse(a),this.events=Pr.parse(u),this.directives=Ke.parse(c),r||M.emit(nt,this)}setChildren(t="",r=!1){Array.isArray(t)?this.children=t.map(n=>new Ft(n,this)):this.children=t,r||M.emit(nt,this)}setSlot(t,r=!1){this.slot=typeof t=="string"?{name:t,params:[]}:t,r||M.emit(nt,this)}setProp(t,r,n,i=!1){const s=this.props[t];s?s.setValue(r):this.props[t]=new Cr(t,r,n),i||M.emit(nt,this)}removeProp(t,r=!1){delete this.props[t],r||M.emit(nt,this)}getPropValue(t){const r=this.props[t];if(r)return r.getValue()}setEvent(t,r=!1){const n=this.events[t.name];n?n.update(t):this.events[t.name]=new Pr(t),r||M.emit(nt,this)}removeEvent(t,r=!1){delete this.events[t],r||M.emit(nt,this)}setDirective(t,r=!1){const n=t instanceof Ke?t:new Ke(t),i=this.directives.findIndex(s=>s.id===t.id);i>=0?this.directives.splice(i,1,n):this.directives.push(n),r||M.emit(nt,this)}removeDirective(t,r=!1){const n=this.directives.findIndex(i=>i===t||i.id===t.id);n>=0&&this.directives.splice(n,1),r||M.emit(nt,this)}removeChild(t,r=!1){const{children:n,disposed:i}=this;if(i||!Array.isArray(n))return;const s=n.findIndex(o=>o===t);t.parent=null,n.splice(s,1),r||M.emit(nt,this)}appendChild(t,r=!1){const{children:n,disposed:i}=this;i||(t.parent=this,Array.isArray(n)?n.push(t):this.children=[t],r||M.emit(nt,this))}insertAfter(t,r=!1){if(!this.parent)return;const n=this.parent.children;if(Array.isArray(n)){t.parent=this.parent;const i=n.indexOf(this);n.splice(i+1,0,t),r||M.emit(nt,this.parent)}}insertBefore(t,r=!1){if(!this.parent)return;const n=this.parent.children;if(Array.isArray(n)){t.parent=this.parent;const i=n.indexOf(this);n.splice(i,0,t),r||M.emit(nt,this.parent)}}movePrev(t=!1){const r=this.parent;if(!r)return;const n=r.children;if(Array.isArray(n)){const i=n.indexOf(this);i>0&&(n.splice(i,1),n.splice(i-1,0,this),t||M.emit(nt,r))}}moveNext(t=!1){const r=this.parent;if(!r)return;const n=r.children;if(Array.isArray(n)){const i=n.indexOf(this);i>-1&&i<n.length-1&&(n.splice(i,1),n.splice(i+1,0,this),t||M.emit(nt,r))}}toDsl(){const{id:t,name:r,from:n,invisible:i,locked:s,slot:o,children:a,props:u,directives:c,events:l}=this,f=Array.isArray(a)?a.map(p=>p.toDsl()):a;return{id:t,name:r,from:n,invisible:i,locked:s,slot:o,children:f,props:Cr.toDsl(u),directives:Ke.toDsl(c),events:Pr.toDsl(l)}}dispose(t=!1){const{children:r,disposed:n}=this;n||(Array.isArray(r)&&r.forEach(i=>i.dispose(!0)),this.parent?this.parent.removeChild(this,t):t||M.emit(nt,this),this.parent=null,this.disposed=!0,delete Ft.nodes[this.id])}lock(t=!1){if(this.locked=!0,Array.isArray(this.children))for(const r of this.children)r.lock(!0);t||M.emit(nt,this)}unlock(t=!1){if(this.locked=!1,Array.isArray(this.children))for(const r of this.children)r.unlock(!0);t||M.emit(nt,this)}setVisible(t,r=!1){if(this.invisible=!t,Array.isArray(this.children))for(const n of this.children)n.setVisible(t,!0);r||M.emit(nt,this)}isChild(t){let r=!1;if(Array.isArray(this.children)){for(const n of this.children)if(t===n||t.id===n.id){r=!0;break}else if(r=n.isChild(t),r)break}return r}},A(Ft,"nodes",{}),Ft);const G="EVENT_BLOCK_CHANGE";var qt;let ee=(qt=class{constructor(t){A(this,"__VTJ_BLOCK__",!0);A(this,"id");A(this,"name","");A(this,"inject",[]);A(this,"state",{});A(this,"lifeCycles",{});A(this,"methods",{});A(this,"computed",{});A(this,"watch",[]);A(this,"css","");A(this,"props",[]);A(this,"emits",[]);A(this,"slots",[]);A(this,"dataSources",{});A(this,"nodes",[]);A(this,"locked",!1);A(this,"disposed",!1);const{id:r}=t;this.id=r||gt(),this.update(t,!0)}update(t,r=!1){for(const i of qt.normalAttrs){const s=t[i];s&&(this[i]=s)}const{nodes:n=[]}=t;n.length&&(this.nodes=n.map(i=>new Kr(i))),r||M.emit(G,this)}toDsl(t){const{__VTJ_BLOCK__:r,id:n,nodes:i}=this;return st(z({},qt.normalAttrs.reduce((s,o)=>(s[o]=this[o],s),{})),{__VTJ_BLOCK__:r,__VERSION__:t||Oc().toString(),id:n,nodes:i.map(s=>s.toDsl())})}dispose(){this.nodes.map(t=>t.dispose(!0)),this.nodes=[],this.disposed=!0}setFunction(t,r,n,i=!1){this[t][r]=n,i||M.emit(G,this)}removeFunction(t,r,n=!1){delete this[t][r],n||M.emit(G,this)}setState(t,r,n=!1){this.state[t]=r,n||M.emit(G,this)}removeState(t,r=!1){delete this.state[t],r||M.emit(G,this)}setCss(t,r=!1){this.css=t,r||M.emit(G,this)}setWatch(t,r=!1){t.id=t.id||gt();const n=this.watch.findIndex(i=>i.id&&i.id===t.id||i===t);n>-1?this.watch.splice(n,1,t):this.watch.push(t),r||M.emit(G,this)}removeWatch(t,r=!1){const n=this.watch.findIndex(i=>i.id&&i.id===t.id||i===t);n>-1&&(this.watch.splice(n,1),r||M.emit(G,this))}setProp(t,r=!1){const n=this.props.findIndex(i=>typeof i=="string"?i===t.name:i.name===t.name);n>-1?this.props.splice(n,1,t):this.props.push(t),r||M.emit(G,this)}removeProp(t,r=!1){const n=this.props.findIndex(i=>typeof i=="string"?i===t.name:i.name===t.name);n>-1&&(this.props.splice(n,1),r||M.emit(G,this))}setEmit(t,r=!1){const n=bt(t)?{name:t,params:[]}:t,i=this.emits.findIndex(s=>s===n.name||s===n);i>-1?this.emits.splice(i,1,n):this.emits.push(n),r||M.emit(G,this)}removeEmit(t,r=!1){const n=this.emits.findIndex(i=>bt(i)?i===t:i.name===t);n>-1&&(this.emits.splice(n,1),r||M.emit(G,this))}setSlot(t,r=!1){const n=bt(t)?{name:t,params:[]}:t,i=this.slots.findIndex(s=>s===n.name||s===n);i>-1?this.slots.splice(i,1,n):this.slots.push(n),r||M.emit(G,this)}removeSlot(t,r=!1){const n=this.slots.findIndex(i=>bt(i)?i===t:i.name===t);n>-1&&(this.slots.splice(n,1),r||M.emit(G,this))}setInject(t,r=!1){const n=this.inject.findIndex(i=>i.name===t.name);n>-1?this.inject.splice(n,1,t):this.inject.push(t),r||M.emit(G,this)}removeInject(t,r=!1){const n=this.inject.findIndex(i=>i.name===t.name);n>-1&&(this.inject.splice(n,1),r||M.emit(G,this))}setDataSource(t,r=!1){this.dataSources[t.name]=t,r||M.emit(G,this)}removeDataSource(t,r=!1){delete this.dataSources[t],r||M.emit(G,this)}insertAfter(t,r,n=!1){t.parent=null;const i=this.nodes.indexOf(r);this.nodes.splice(i+1,0,t),n||M.emit(G,this)}insertBefore(t,r,n=!1){t.parent=null;const i=this.nodes.indexOf(r);this.nodes.splice(i,0,t),n||M.emit(G,this)}appendNode(t,r=!1){t.parent=null,this.nodes.push(t),r||M.emit(G,this)}addNode(t,r,n="inner",i=!1){r?["left","top"].includes(n)?r.parent?r.insertAfter(t,i):this.insertBefore(t,r,i):["right","bottom"].includes(n)?r.parent?r.insertAfter(t,i):this.insertAfter(t,r,i):r.appendChild(t,i):this.appendNode(t,i)}__removeNode(t,r=!1){const n=this.nodes.findIndex(i=>i.id===t.id);n>-1&&(this.nodes.splice(n,1),r||M.emit(G,this))}removeNode(t,r=!1){t.parent?t.dispose(r):(t.dispose(!0),this.__removeNode(t,r))}move(t,r,n="inner",i=!1){t.parent?t.parent.removeChild(t,!0):this.__removeNode(t,!0),this.addNode(t,r,n,i)}movePrev(t,r=!1){if(t.parent)t.movePrev(r);else{const n=this.nodes,i=n.indexOf(t);i>0&&(n.splice(i,1),n.splice(i-1,0,t),r||M.emit(G,this))}}moveNext(t,r=!1){if(t.parent)t.moveNext(r);else{const n=this.nodes,i=n.indexOf(t);i>-1&&i<n.length-1&&(n.splice(i,1),n.splice(i+1,0,t),r||M.emit(G,this))}}cloneNode(t,r=!1){const n=Gi(t.toDsl()),i=new Kr(n);return this.addNode(i,t,"bottom",r),i}lock(t=!1){this.locked=!0;for(const r of this.nodes)r.lock(!0);t||M.emit(G,this)}unlock(t=!1){this.locked=!1;for(const r of this.nodes)r.unlock(!0);t||M.emit(G,this)}isChild(t){let r=!1;for(const n of this.nodes)if(t===n||t.id===n.id){r=!0;break}else if(r=n.isChild(t),r)break;return r}},A(qt,"normalAttrs",["name","locked","inject","state","lifeCycles","methods","computed","watch","css","props","emits","slots","dataSources","__TEMPLATE_ID__"]),qt);const it="EVENT_PROJECT_CHANGE",ai="EVENT_PROJECT_ACTIVED",ci="EVENT_PROJECT_DEPS_CHANGE",Je="EVENT_PROJECT_PAGES_CHANGE",we="EVENT_PROJECT_BLOCKS_CHANGE",ui="EVENT_PROJECT_APIS_CHANGE",li="EVENT_PROJECT_META_CHANGE",Hc="EVENT_PROJECT_PUBLISH",zc="EVENT_PROJECT_FILE_PUBLISH",qc="EVENT_PROJECT_GEN_SOURCE",Qe=class Qe{constructor(t){A(this,"id","");A(this,"platform","web");A(this,"name","");A(this,"description","");A(this,"homepage","");A(this,"dependencies",[]);A(this,"pages",[]);A(this,"blocks",[]);A(this,"apis",[]);A(this,"meta",[]);A(this,"currentFile",null);A(this,"config",{});A(this,"uniConfig",{});A(this,"__BASE_PATH__","/");const{id:r}=t;this.id=r||gt(),this.update(t,!0)}update(t,r=!1){for(const n of Qe.attrs){const i=t[n];i&&(this[n]=i)}r||M.emit(it,{model:this,type:"update",data:t})}isPageFile(t){return t.type==="page"}cleanPagesDsl(t){for(const r of t)delete r.dsl,r.children&&r.children.length&&this.cleanPagesDsl(r.children)}toDsl(t){const{id:r}=this,n=Qe.attrs.reduce((i,s)=>(i[s]=this[s],i),{});return n.pages&&(n.pages=n.pages.map(i=>nr(st(z({},i),{dsl:void 0}))),this.cleanPagesDsl(n.pages)),n.blocks&&(n.blocks=n.blocks.map(i=>nr(st(z({},i),{dsl:void 0})))),z({__VTJ_PROJECT__:!0,id:r},n)}active(t,r=!1){this.currentFile=t,r||M.emit(ai,{model:this,type:"update",data:t})}deactivate(t=!1){this.currentFile=null,t||M.emit(ai,{model:this,type:"update",data:null})}setDeps(t,r=!1){const n=this.dependencies,i=n.findIndex(o=>o.package===t.package);let s;if(i>-1?(s="update",n.splice(i,1,z(z({},n[i]),t))):(s="create",n.push(t)),!r){const o={model:this,type:s,data:t};M.emit(ci,o),M.emit(it,o)}}removeDeps(t,r=!1){const n=this.dependencies,i=n.findIndex(s=>s.package===t.package);if(i>-1&&n.splice(i,1),!r){const s={model:this,type:"delete",data:t};M.emit(ci,s),M.emit(it,s)}}getPage(t){const r=(n,i=[])=>{for(const s of i){if(s.id===n)return s;if(s.children&&s.children.length){const o=r(n,s.children);if(o)return o}}};return r(t,this.pages)}getPages(){const t=(r=[])=>{let n=[];for(const i of r)i.dir?i.children&&i.children.length&&(n=n.concat(t(i.children))):n.push(i);return n};return t(this.pages)}createPage(t,r,n=!1){return L(this,null,function*(){if(t.id=t.raw?t.name:t.id||gt(),t.type="page",t.dir?t.children=[]:t.dsl=t.dsl||new ee({id:t.id,name:ei(t.name)}).toDsl(),r){const i=this.getPage(r);i?i.children?i.children.push(t):i.children=[t]:console.warn(`not found PageFile for id: ${r} `)}else this.pages.push(t);if(!n){const i={model:this,type:"create",data:t};M.emit(Je,i),M.emit(it,i)}!this.currentFile&&!t.dir&&(yield Se(1e3),this.active(t,n))})}updatePage(t,r=!1){const n=this.getPage(t.id);if(n?Object.assign(n,t):console.warn(`not found PageFile for id: ${t.id} `),!r){const i={model:this,type:"update",data:t};M.emit(Je,i),M.emit(it,i)}}clonePage(t,r,n=!1){var f;const i=gt(),s=`${t.name}Copy`,o=`${t.title}_副本`,a=new ee({id:i,name:s}).toDsl(),u=Dt({},t,{id:i,name:s,title:o,dsl:a}),c=r?((f=this.getPage(r))==null?void 0:f.children)||[]:this.pages,l=c.findIndex(p=>p.id===t.id);if(c.splice(l+1,0,u),!n){const p={model:this,type:"clone",data:{source:t,target:u}};M.emit(Je,p),M.emit(it,p)}}saveToBlock(t,r=!1){return L(this,null,function*(){this.active(t,r),yield Se(1e3);const n=gt(),i=t.name,s=t.title,o=new ee({id:n,name:i}).toDsl(),a=Dt({},t,{id:n,name:i,title:s,dsl:o,type:"block",fromType:"Schema"});if(this.blocks.push(a),!r){const u={model:this,type:"create",data:a};M.emit(we,u),M.emit(it,u)}})}removePage(t,r=!1){var s;const n=this.getPage(t),i=(o,a)=>{const u=a.findIndex(c=>c.id===o);if(u>=0){a.splice(u,1);return}for(const c of a)c.children&&c.children.length&&i(o,c.children)};if(i(t,this.pages),t===this.homepage&&(this.homepage=""),((s=this.currentFile)==null?void 0:s.id)===t&&this.deactivate(r),!r){const o={model:this,type:"delete",data:n};M.emit(Je,o),M.emit(it,o)}}getBlock(t){return this.blocks.find(r=>r.id===t)}createBlock(t,r=!1){return L(this,null,function*(){const n=t.id||gt(),i=ei(t.name);t.id=n,t.type="block",t.dsl=new ee({id:n,name:i}).toDsl(),this.blocks.push(t);const s=t.fromType||"Schema";if(!r){const o={model:this,type:"create",data:t};M.emit(we,o),M.emit(it,o)}!this.currentFile&&s==="Schema"&&(yield Se(1e3),this.active(t,r))})}updateBlock(t,r=!1){const n=this.getBlock(t.id);if(n?(Object.assign(n,t),n.dsl&&(n.dsl.name=t.name)):console.warn(`not found PageFile for id: ${t.id} `),!r){const i={model:this,type:"update",data:t};M.emit(we,i),M.emit(it,i)}}cloneBlock(t,r=!1){const n=gt(),i=`${t.name}Copy`,s=`${t.title}_副本`,o=new ee({id:n,name:i}).toDsl(),a=Dt({},t,{id:n,name:i,title:s,dsl:o}),u=this.blocks.findIndex(c=>c.id===t.id);if(this.blocks.splice(u+1,0,a),!r){const c={model:this,type:"clone",data:{source:t,target:a}};M.emit(we,c),M.emit(it,c)}}removeBlock(t,r=!1){var o;const n=this.getBlock(t),i=this.blocks,s=i.findIndex(a=>a.id===t);if(s>-1?(i.splice(s,1),((o=this.currentFile)==null?void 0:o.id)===t&&this.deactivate(r)):console.warn(`not found PageFile for id: ${t} `),!r){const a={model:this,type:"delete",data:n};M.emit(we,a),M.emit(it,a)}}existBlockName(t,r=[]){return this.blocks.some(n=>n.name===t&&!r.includes(n.id))}existPageName(t,r=[]){return this.getPages().some(n=>n.name===t&&!r.includes(n.id))}setApi(t,r=!1){const n=this.apis.find(s=>s.name===t.name||s.id===t.id);let i;if(n?(i="update",Object.assign(n,t)):(i="create",t.id=gt(),this.apis.push(t)),!r){const s={model:this,type:i,data:t};M.emit(ui,s),M.emit(it,s)}}removeApi(t,r=!1){const n=this.apis.findIndex(i=>i.name===t||i.id===t);if(n>-1?this.apis.splice(n,1):console.warn(`not found Api for name: ${t} `),!r){const i={model:this,type:"delete",data:t};M.emit(ui,i),M.emit(it,i)}}existApiName(t,r=[]){return this.apis.some(n=>n.name===t&&!r.includes(n.id))}setMeta(t,r=!1){const n=this.meta.find(s=>s.code===t.code||s.id===t.id);let i;if(n?(i="update",Object.assign(n,t)):(i="create",t.id=gt(),this.meta.push(t)),!r){const s={model:this,type:i,data:t};M.emit(li,s),M.emit(it,s)}}removeMeta(t,r=!1){const n=this.meta.findIndex(i=>i.code===t||i.id===t);if(n>-1?this.meta.splice(n,1):console.warn(`not found meta for name: ${name} `),!r){const i={model:this,type:"delete",data:t};M.emit(li,i),M.emit(it,i)}}existMetaCode(t,r=[]){return this.meta.some(n=>n.code===t&&!r.includes(n.id))}setHomepage(t,r=!1){if(this.homepage=t,!r){const n={model:this,type:"update",data:t};M.emit(it,n)}}setConfig(t,r=!1){if(this.config=Object.assign(this.config,t),!r){const n={model:this,type:"update",data:t};M.emit(it,n)}}setUniConfig(t,r,n=!1){if(this.uniConfig=Object.assign(this.uniConfig,{[t]:r}),!n){const i={model:this,type:"update",data:this.uniConfig};M.emit(it,i)}}publish(t){const r={model:this,type:"publish",data:t||this};t?M.emit(zc,r):M.emit(Hc,r)}genSource(){const t={model:this,type:"gen",data:null};M.emit(qc,t)}};A(Qe,"attrs",["platform","name","homepage","description","dependencies","pages","blocks","apis","meta","config","uniConfig","__BASE_PATH__"]);let ce=Qe;const We="EVENT_HISTORY_CHANGE",Nr="EVENT_HISTORY_LOAD";let Yi=class{constructor(t,r={}){A(this,"options",{max:50});A(this,"index",-1);A(this,"id");A(this,"items");Object.assign(this.options,r);const{id:n,items:i=[]}=t;this.id=n,this.items=i}toDsl(){const{id:t,items:r}=this;return{id:t,items:r.map(n=>({id:n.id,label:n.label}))}}get(t){return this.items.find(r=>r.id===t)}add(t,r=!1){const{max:n}=this.options,i={id:gt(),label:new Date().toLocaleString(),dsl:nr(t)};if(this.items.unshift(i),this.items.length>n){const s=this.items.splice(n);r||M.emit(We,{model:this,type:"delete",data:s.map(o=>o.id)})}this.index=-1,r||M.emit(We,{model:this,type:"create",data:i})}remove(t,r=!1){const n=this.items.findIndex(i=>i.id===t);n>-1?(this.items.splice(n,1),n===this.index?this.index=-1:this.index>=this.items.length&&(this.index=this.items.length-1)):console.warn(`not found HistoryItem for id: ${t} `),r||M.emit(We,{model:this,type:"delete",data:[t]})}forward(t=!1){const{index:r,items:n}=this;if(r<0)return;--this.index;const i=n[this.index];i&&!t&&M.emit(Nr,{model:this,type:"load",data:i})}backward(t=!1){const{index:r,items:n}=this;if(r>=n.length-1)return;r<0&&(this.index=0),++this.index;const i=n[this.index];i&&!t&&M.emit(Nr,{model:this,type:"load",data:i})}load(t,r=!1){const n=this.items.findIndex(i=>i.id===t);n>=0&&(this.index=n,r||M.emit(Nr,{model:this,type:"load",data:this.items[n]}))}clear(t=!1){this.index=-1;const r=this.items.map(n=>n.id);this.items=[],t||M.emit(We,{model:this,type:"clear",data:r})}};const M=Bc();function V1(e){return e instanceof ee}function U1(e){return e instanceof Kr}function H1(e){return!!e.__VTJ_BLOCK__}function Gi(e){const t=nr(e);return delete t.id,Array.isArray(t.children)&&(t.children=t.children.map(r=>Gi(r))),t}function z1(e){const t=e.fromType||"Schema";return t==="Schema"?{type:"Schema",id:e.id}:t==="UrlSchema"?{type:"UrlSchema",url:(e.urls||"").split(",")[0]||""}:t==="Plugin"?{type:"Plugin",urls:(e.urls||"").split(","),library:e.library}:""}const Nw=Object.freeze(Object.defineProperty({__proto__:null,BUILT_IN_COMPONENTS:Mc,BUILT_IN_LIBRARAY_MAP:M1,BUILT_IN_MATERIALS:I1,BUILT_IN_NAME:k1,BUILT_IN_TAGS:F1,BUILT_IN_VUE:Ji,BUILT_IN_VUE_ROUTER:Wi,Base:Fc,BlockModel:ee,DirectiveModel:Ke,EVENT_BLOCK_CHANGE:G,EVENT_HISTORY_CHANGE:We,EVENT_HISTORY_LOAD:Nr,EVENT_NODE_CHANGE:nt,EVENT_PROJECT_ACTIVED:ai,EVENT_PROJECT_APIS_CHANGE:ui,EVENT_PROJECT_BLOCKS_CHANGE:we,EVENT_PROJECT_CHANGE:it,EVENT_PROJECT_DEPS_CHANGE:ci,EVENT_PROJECT_FILE_PUBLISH:zc,EVENT_PROJECT_GEN_SOURCE:qc,EVENT_PROJECT_META_CHANGE:li,EVENT_PROJECT_PAGES_CHANGE:Je,EVENT_PROJECT_PUBLISH:Hc,EventModel:Pr,HistoryModel:Yi,NodeModel:Kr,ProjectModel:ce,PropModel:Cr,Service:L1,VTJ_CORE_VERSION:B1,cloneDsl:Gi,createNodeFrom:z1,emitter:M,isBlock:V1,isBlockSchema:H1,isNode:U1},Symbol.toStringTag,{value:"Module"}));var q1=Object.defineProperty,K1=(e,t,r)=>t in e?q1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xt=(e,t,r)=>K1(e,typeof t!="symbol"?t+"":t,r);(function(){if(typeof window>"u"||typeof EventTarget>"u")return;const e=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(t,r,n){typeof n!="boolean"&&(n=n||{},n.passive=!1),e.call(this,t,r,n)}})();/**!
57
57
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
58
58
  * @name @vtj/utils
59
59
  * @author CHC chenhuachun1549@dingtalk.com
60
- * @version 0.11.1-alpha.0
60
+ * @version 0.11.1
61
61
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
62
- */const J1="0.11.1-alpha.0";/**
62
+ */const J1="0.11.1";/**
63
63
  * @vue/shared v3.5.13
64
64
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
65
65
  * @license MIT
@@ -72,9 +72,9 @@ version: 2.9.0
72
72
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
73
73
  * @name @vtj/renderer
74
74
  * @author CHC chenhuachun1549@dingtalk.com
75
- * @version 0.11.1-alpha.0
75
+ * @version 0.11.1
76
76
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
77
- */const Oe="0.11.1-alpha.0";var ht=(e=>(e.Runtime="Runtime",e.Design="Design",e.Raw="Raw",e.VNode="VNode",e))(ht||{});const Ti=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],R_=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],ku=["vIf","vShow","vModel","vFor","vBind","vHtml"],Iu={String,Number,Boolean,Array,Object,Function,Date},$e="VtjPage",Xe="VtjHomepage",Mu="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot".split(","),Fu="component,slot".split(",");function Ye(e,t){return e.map(r=>Hi(r)||r.startsWith("/")?r:`${t}${r}`)}function bn(e){return/\.css$/.test(e)}function _n(e){return/\.js$/.test(e)}function Lu(e){return/\.json$/.test(e)}function j_(e){return e.map(t=>`<script src="${se.append(t,{v:Oe})}"><\/script>`).join("")}function D_(e=[]){return e.map(t=>`<link rel="stylesheet" href="${se.append(t,{v:Oe})}" />`).join("")}function Vu(e,t=!1){return t&&e.endsWith(".prod.js")?e.replace(".prod.js",".js"):e}function Uu(e,t,r=!1){const n=e.filter(p=>!!p.enabled),i=[],s=[],o=[],a=[],u={},c={},l=[],f={};return n.forEach(({urls:p,assetsUrl:h,library:m,assetsLibrary:d,localeLibrary:b})=>{p==null||p.forEach(E=>{_n(E)&&i.push(Vu(E,r)),bn(E)&&s.push(E)}),m&&(a.push(m),u[m]=Ye(p||[],t),b&&(c[m]=b)),h&&o.push(h),d&&l.push(d),m&&d&&(f[d]=m)}),{scripts:Ye(i,t),css:Ye(s,t),materials:Ye(o,t),libraryExports:a,materialExports:Rc(l),materialMapLibrary:f,libraryMap:u,libraryLocaleMap:c}}function Hu(e,t){var s;const{name:r,parent:n,alias:i}=e;return n?(s=t[n])==null?void 0:s[i||r]:t[i||r]}function cs(e){return bt(e)?e:JSON.stringify(e)}function us(e,t,r){const n=e.CSSStyleSheet;if(n.prototype.replaceSync){const i=new n;i.id=t,i.replaceSync(r);const s=e.document,o=s.adoptedStyleSheets,a=Array.from(o).filter(u=>u.id!==t);s.adoptedStyleSheets=[...a,i]}else{const i=e.document;let s=i.getElementById(t);s?s.innerHTML=r:(s=i.createElement("style"),s.id=t,s.innerHTML=r,i.head.appendChild(s))}}function zu(e,t){return L(this,null,function*(){const r=yield window.fetch(t).then(n=>n.text()).catch(()=>"");r&&us(window,e,r)})}function qu(e,t=window){const r=t.document,n=t.document.head;for(const i of e)if(!r.getElementById(i)){const s=r.createElement("link");s.rel="stylesheet",s.id=i,s.href=i,n.appendChild(s)}}function Ku(n,i){return L(this,arguments,function*(e,t,r=window){const s=r.document,o=r.document.head;let a=r[t];return a?a.default||a:new Promise((u,c)=>{for(const l of e){const f=s.createElement("script");f.src=l,f.onload=()=>{a=r[t],a?u(a.default||a):c(null)},f.onerror=p=>{c(p)},o.appendChild(f)}})})}function Ju(e){return ae(e)||ae(e==null?void 0:e.install)}function Wu(e){return Fu.includes(e)}function Yu(e){return Mu.includes(e)}function Ce(e=window){const t=window==null?void 0:window.Mock;if(t)return t;const r=e==null?void 0:e.Mock;if(r&&window)return window.Mock=r,r}function C_(e,t,r){Object.assign(t.meta,r.meta);const n=e==null?void 0:e._container;(r==null?void 0:r.type)==="page"&&n.classList.add("is-page"),r!=null&&r.pure&&n.classList.add("is-pure")}function Pe(e,t,r=!1,n=!1){var i;try{const s=['"use strict";',"var __self = arguments[0];"];s.push("return ");let o=(e.value||"").trim();o=o.replace(/this(\W|$)/g,(u,c)=>`__self${c}`),o=s.join(`
77
+ */const Oe="0.11.1";var ht=(e=>(e.Runtime="Runtime",e.Design="Design",e.Raw="Raw",e.VNode="VNode",e))(ht||{});const Ti=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],R_=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],ku=["vIf","vShow","vModel","vFor","vBind","vHtml"],Iu={String,Number,Boolean,Array,Object,Function,Date},$e="VtjPage",Xe="VtjHomepage",Mu="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot".split(","),Fu="component,slot".split(",");function Ye(e,t){return e.map(r=>Hi(r)||r.startsWith("/")?r:`${t}${r}`)}function bn(e){return/\.css$/.test(e)}function _n(e){return/\.js$/.test(e)}function Lu(e){return/\.json$/.test(e)}function j_(e){return e.map(t=>`<script src="${se.append(t,{v:Oe})}"><\/script>`).join("")}function D_(e=[]){return e.map(t=>`<link rel="stylesheet" href="${se.append(t,{v:Oe})}" />`).join("")}function Vu(e,t=!1){return t&&e.endsWith(".prod.js")?e.replace(".prod.js",".js"):e}function Uu(e,t,r=!1){const n=e.filter(p=>!!p.enabled),i=[],s=[],o=[],a=[],u={},c={},l=[],f={};return n.forEach(({urls:p,assetsUrl:h,library:m,assetsLibrary:d,localeLibrary:b})=>{p==null||p.forEach(E=>{_n(E)&&i.push(Vu(E,r)),bn(E)&&s.push(E)}),m&&(a.push(m),u[m]=Ye(p||[],t),b&&(c[m]=b)),h&&o.push(h),d&&l.push(d),m&&d&&(f[d]=m)}),{scripts:Ye(i,t),css:Ye(s,t),materials:Ye(o,t),libraryExports:a,materialExports:Rc(l),materialMapLibrary:f,libraryMap:u,libraryLocaleMap:c}}function Hu(e,t){var s;const{name:r,parent:n,alias:i}=e;return n?(s=t[n])==null?void 0:s[i||r]:t[i||r]}function cs(e){return bt(e)?e:JSON.stringify(e)}function us(e,t,r){const n=e.CSSStyleSheet;if(n.prototype.replaceSync){const i=new n;i.id=t,i.replaceSync(r);const s=e.document,o=s.adoptedStyleSheets,a=Array.from(o).filter(u=>u.id!==t);s.adoptedStyleSheets=[...a,i]}else{const i=e.document;let s=i.getElementById(t);s?s.innerHTML=r:(s=i.createElement("style"),s.id=t,s.innerHTML=r,i.head.appendChild(s))}}function zu(e,t){return L(this,null,function*(){const r=yield window.fetch(t).then(n=>n.text()).catch(()=>"");r&&us(window,e,r)})}function qu(e,t=window){const r=t.document,n=t.document.head;for(const i of e)if(!r.getElementById(i)){const s=r.createElement("link");s.rel="stylesheet",s.id=i,s.href=i,n.appendChild(s)}}function Ku(n,i){return L(this,arguments,function*(e,t,r=window){const s=r.document,o=r.document.head;let a=r[t];return a?a.default||a:new Promise((u,c)=>{for(const l of e){const f=s.createElement("script");f.src=l,f.onload=()=>{a=r[t],a?u(a.default||a):c(null)},f.onerror=p=>{c(p)},o.appendChild(f)}})})}function Ju(e){return ae(e)||ae(e==null?void 0:e.install)}function Wu(e){return Fu.includes(e)}function Yu(e){return Mu.includes(e)}function Ce(e=window){const t=window==null?void 0:window.Mock;if(t)return t;const r=e==null?void 0:e.Mock;if(r&&window)return window.Mock=r,r}function C_(e,t,r){Object.assign(t.meta,r.meta);const n=e==null?void 0:e._container;(r==null?void 0:r.type)==="page"&&n.classList.add("is-page"),r!=null&&r.pure&&n.classList.add("is-pure")}function Pe(e,t,r=!1,n=!1){var i;try{const s=['"use strict";',"var __self = arguments[0];"];s.push("return ");let o=(e.value||"").trim();o=o.replace(/this(\W|$)/g,(u,c)=>`__self${c}`),o=s.join(`
78
78
  `)+o;const a=`with(${r?"{}":"$scope || {}"}) { ${o} }`;return new Function("$scope",a)(t)}catch(s){if(oe.error("parseExpression.error",s,e,(i=t==null?void 0:t.__self)!=null?i:t),n)throw s}}function Gr(e,t,r=!1,n=!1){var s;const i=Pe(e,t,r,n);if(typeof i!="function"&&(oe.error("parseFunction.error","not a function",e,(s=t==null?void 0:t.__self)!=null?s:t),n))throw new Error(`"${e.value}" not a function`);return i}function wt(e){return e&&e.type==="JSExpression"}function Me(e){return typeof e=="object"&&e&&e.type==="JSFunction"}function Gu(e){return wt(e)||Me(e)}function P_(e){return Gu(e)?e.value:JSON.stringify(e)}const N_={session:!1,authKey:"Authorization",storageKey:"ACCESS_STORAGE",storagePrefix:"__VTJ_",unauthorized:void 0,auth:"/#/login",redirectParam:"r",unauthorizedCode:401,unauthorizedMessage:"登录已经失效,请重新登录!",noPermissionMessage:"无权限访问该页面",appName:""},ls=Symbol("access");class wn{constructor(t){A(this,"options");A(this,"data",null);A(this,"mode",ht.Raw);A(this,"interceptResponse",!0);this.options=Object.assign({},N_,t),this.loadData()}enableIntercept(){this.interceptResponse=!0}disableIntercept(){this.interceptResponse=!1}connect(t){const{mode:r,router:n,request:i}=t;this.mode=r,n&&this.mode===ht.Raw&&this.setGuard(n),i&&this.setRequest(i)}login(t){const{storageKey:r,storagePrefix:n,session:i,authKey:s}=this.options;this.setData(t),this.data&&(Fr.save(r,t,{type:"local",prefix:n}),i&&Vr.set(s,this.data.token))}clear(){const{storageKey:t,storagePrefix:r,session:n,authKey:i}=this.options;this.data=null,Fr.remove(t,{type:"local",prefix:r}),n&&Vr.remove(i)}logout(){this.clear(),this.toLogin()}getData(){return this.data?this.data:(this.loadData(),this.data)}getToken(){var t;return this.data||this.loadData(),(t=this.data)==null?void 0:t.token}can(t){const{appName:r}=this.options,{permissions:n={}}=this.data||{};return typeof t=="function"?t(n):si(t).every(i=>n[i]||n[r+"."+i])}some(t){const{appName:r}=this.options,{permissions:n={}}=this.data||{};return si(t).some(i=>n[i]||n[r+"."+i])}install(t){t.config.globalProperties.$access||(t.config.globalProperties.$access=this,t.provide(ls,this))}isAuthPath(t){const{auth:r,isAuth:n}=this.options;if(n)return n(t);if(t.path&&typeof r=="string"){const i=r.split("#")[1]||r;return t.path===i}return!1}toLogin(){const{auth:t,redirectParam:r}=this.options;if(!t)return;const n=r?`?${r}=${encodeURIComponent(location.href)}`:"";typeof t=="function"?t(n):location.href=r?`${t}${n}`:t}setData(t){const{privateKey:r}=this.options;if(Array.isArray(t)&&r){const n=t.map(i=>ii(i,r));try{this.data=JSON.parse(n.join(""))}catch(i){console.warn(i)}return}if(typeof t=="string")try{const n=r?ii(t,r):t;n?this.data=JSON.parse(n):console.warn("RSA解密失败或登录信息缺失")}catch(n){console.warn(n)}else this.data=t}loadData(){const{storageKey:t,storagePrefix:r}=this.options,n=Fr.get(t,{type:"local",prefix:r});this.setData(n||null)}isLogined(){const{session:t,authKey:r}=this.options;return t&&r?!!Vr.get(r):!!this.getToken()}hasRoutePermission(t){if(t.name===$e){const r=t.params.id;return r&&this.can(r)}return!0}setGuard(t){t.beforeEach((r,n,i)=>this.guard(r,i))}guard(t,r){return L(this,null,function*(){if(this.isWhiteList(t)||this.isAuthPath(t))return r();if(this.isLogined()){if(this.hasRoutePermission(t))return r();{const{noPermissionMessage:n="无权限访问",unauthorized:i=!1}=this.options;return yield this.showTip(n),ae(i)?(i(),r(!1)):bt(i)?r(i):r(!1)}}r(!1),this.toLogin()})}isWhiteList(t){const{whiteList:r}=this.options;return r?Array.isArray(r)?r.some(n=>t.fullPath.startsWith(n)):r(t):!1}isUnauthorized(t){var n;const{unauthorizedCode:r=401}=this.options;return t.status===r||((n=t.data)==null?void 0:n.code)===r}showUnauthorizedAlert(t){return L(this,null,function*(){const{unauthorizedMessage:r="登录已失效"}=this.options;this.isUnauthorized(t)&&(yield this.showTip(r),this.toLogin())})}showTip(t){return L(this,null,function*(){const{alert:r}=this.options;return r?(yield Se(150),yield r(t,{title:"提示",type:"warning"}).catch(()=>!1)):!1})}setRequest(t){t.useRequest(r=>{var n,i;return(n=this.data)!=null&&n.token&&(r.headers[this.options.authKey]=(i=this.data)==null?void 0:i.token),r}),t.useResponse(r=>L(this,null,function*(){return this.interceptResponse&&(yield this.showUnauthorizedAlert(r)),r}),r=>L(this,null,function*(){if(!this.interceptResponse)return Promise.reject(r);const n=r.response||r||{};return yield this.showUnauthorizedAlert(n),Promise.reject(r)}))}}function Zu(){return Go(ls,null)}function B_(e={}){const{notify:t,loading:r,settings:n={},Startup:i,access:s,useTitle:o,alert:a}=e;let u=null;return{request:yn({settings:z({type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:c=>{var l,f;return((l=c.data)==null?void 0:l.code)===0||!!((f=c.data)!=null&&f.success)},failMessage:!0,showError:c=>{t&&t(c||"未知错误")},showLoading:()=>{u&&u.close(),r&&(u=r())},hideLoading:()=>{u&&(u.close(),u=null)}},n)}),jsonp:ss,notify:t,loading:r,useTitle:o,startupComponent:i,access:s?new wn(z({alert:a},s)):void 0}}function k_(e={}){return new wn(e)}function Xu(e,t){const{jsonp:r,request:n}=t;if(e.method==="jsonp")return(i={})=>r(e.url,st(z({},e.jsonpOptions),{query:i}));{const i=e.headers?Pe(e.headers,{},!0):void 0,s={url:e.url,method:e.method,settings:st(z({},e.settings),{headers:i})};return(o,a)=>(delete s.data,n.send(Dt(s,a||{},{data:o})))}}function Qu(e,t){const{metaQuery:r}=t;if(!r)return;const{code:n,queryCode:i}=e;return(s,o)=>{if(!r){console.warn("adapter.metaQuery is not defined!");return}return r(n,i,s,o)}}function tl(e=[],t=[],r){const n={};for(const i of e)n[i.id]=Xu(i,r);for(const i of t)n[i.id]=Qu(i,r);return n}function el(){return L(this,arguments,function*(e=[],t=window){const r=Ce(t);r&&(fs(t),e.forEach(n=>nl(r,n)))})}function rl(e,t=window){const r=Me(e.mockTemplate)&&e.mockTemplate.value?Gr(e.mockTemplate,{},!0):void 0,n=Ce(t);return(...i)=>L(this,null,function*(){let s={};if(r)try{s=yield r.apply(r,i)}catch(o){oe.warn("模拟数据模版异常",o)}return n==null?void 0:n.mock(s)})}function nl(e,t){if(!t.mock)return;const{url:r,mockTemplate:n}=t;if(r&&n){const i=ln(`${r}(.*)`),s=Ic(r,{decode:decodeURIComponent}),o=Pe(n,{},!0);e.mock(i,a=>{var f;const u=se.parse(a.url)||{},c=a.body instanceof FormData?ju(a.body):a.body,l=(f=s(a.url))==null?void 0:f.params;return Object.assign(a,{data:c,params:u,query:l}),e.mock(o(a))})}}function fs(e=window){const t=Ce(e);t&&(t._mocked={})}class il{constructor(t){A(this,"__id",null);A(this,"__mode");A(this,"__instance",null);A(this,"__contextRefs",{});A(this,"__refs",{});A(this,"context",{});A(this,"state",{});A(this,"props",{});A(this,"$props",{});A(this,"$refs",{});A(this,"$el",null);A(this,"$emit",null);A(this,"$nextTick",null);A(this,"$parent",null);A(this,"$root",null);A(this,"$attrs",null);A(this,"$slots",null);A(this,"$watch",null);A(this,"$options",null);A(this,"$forceUpdate",null);A(this,"$components",{});A(this,"$libs",{});A(this,"$apis",{});A(this,"__transform",{});const{mode:r,dsl:n,attrs:i}=t;this.__mode=r,n&&(this.__id=n.id||null,this.__transform=n.transform||{}),i&&Object.assign(this,i)}setup(t,r=Qr){const n=r.getCurrentInstance();if(!n)return;this.__refs={},this.$refs={},this.context={},this.__contextRefs={},this.__instance=n.proxy;const i=n.appContext.config.globalProperties;Object.assign(this,i),Object.assign(this,t||{}),this.__proxy(),r.onMounted(()=>{this.__proxy()}),r.onUnmounted(()=>{this.__cleanup()}),r.onBeforeUpdate(()=>{this.__reset()})}__proxy(){this.__instance&&Ti.forEach(t=>{var r;this[t]=(r=this.__instance)==null?void 0:r[t]})}__cleanup(){Ti.forEach(t=>{this[t]=null}),this.__reset()}__reset(){this.__refs={},this.$refs={},this.__contextRefs={},this.context={}}__parseFunction(t){var r;if(t)if(this.__mode===ht.Runtime){const{id:n,type:i}=t,s=n&&(r=this.__transform[n])!=null?r:t.value;return Gr({type:i,value:s},this)}else return Gr(t,this)}__parseExpression(t){var r;if(t)if(this.__mode===ht.Runtime){const{id:n,type:i}=t,s=n&&(r=this.__transform[n])!=null?r:t.value;return Pe({type:i,value:s},this)}else return Pe(t,this)}__ref(t=null,r){if(this.__mode!==ht.VNode)return t&&t!==this.__id&&(this.__contextRefs[t]=this),n=>L(this,null,function*(){var s,o;yield Se(0);let i=(n==null?void 0:n.$vtjEl)||(n==null?void 0:n.$el)||((o=(s=n==null?void 0:n._)==null?void 0:s.vnode)==null?void 0:o.el)||n;if(!i){typeof r=="string"&&(delete this.$refs[r],t&&delete this.__refs[t]);return}return i.nodeType===3&&i.nextSibling&&(i=i.nextSibling),i.__vtj__=t,ht.Design===this.__mode&&(i.__context__=this,i.draggable=!0),t&&(this.__refs[t]=this.__getRefEl(this.__refs,t,n)),typeof r=="function"?r(n):r&&(this.$refs[r]=this.__getRefEl(this.$refs,r,n)),n})}__getRefEl(t,r,n){const i=t[r];if(i&&n!==i){const s=new Set([].concat(i,n));return Array.from(s)}else return n}__clone(t={}){const r=z(z({},this.context),t),n=st(z({},r),{context:r});return n.context.__proto__=this.context,n.__proto__=this,n}}function Zr(e){var f,p;const{Vue:t=Qr,mode:r=ht.Runtime,components:n={},libs:i={},apis:s={},loader:o}=e,a=t.computed(()=>e.dsl),u={$components:n,$libs:i,$apis:s},c=new il({mode:r,dsl:a.value,attrs:u}),l=t.defineComponent(z({name:a.value.name,props:z({},M_((f=a.value.props)!=null?f:[],c)),setup(h){var y,_,S,v;c.$props=h,c.props=h,a.value.id&&us(e.window||window,a.value.id,a.value.css||""),c.state=F_(t,(y=a.value.state)!=null?y:{},c);const m=L_(t,(_=a.value.computed)!=null?_:{},c),d=V_((S=a.value.methods)!=null?S:{},c),b=U_(t,a.value.inject,c),E=sl(a.value.dataSources||{},c),g=z(z(z(z({},b),m),d),E);return c.setup(g,t),H_(t,(v=a.value.watch)!=null?v:[],c),{vtj:c}},emits:I_(a.value.emits),expose:["vtj"],render(){if(!a.value.nodes)return null;const h=a.value.nodes||[];return h.length===1?ar(h[0],c,t,o):h.map(m=>ar(m,c,t,o))}},z_((p=a.value.lifeCycles)!=null?p:{},c)));return{renderer:t.markRaw(l),context:c}}function I_(e=[]){return e.map(t=>bt(t)?t:t.name)}function M_(e=[],t){const r=n=>n?(Array.isArray(n)?n:[n]).map(i=>Iu[i]):void 0;return e.map(n=>bt(n)?{name:n}:{name:n.name,type:n.type,required:n.required,default:wt(n.default)?t.__parseExpression(n.default):n.default}).reduce((n,i)=>(n[i.name]={type:r(i.type),required:i.required,default:i.default},n),{})}function F_(e,t,r){return e.reactive(Object.keys(t||{}).reduce((n,i)=>{let s=t[i];return wt(s)?s=r.__parseExpression(s):Me(s)&&(s=r.__parseFunction(s)),n[i]=s,n},{}))}function L_(e,t,r){return Object.entries(t!=null?t:{}).reduce((n,[i,s])=>(n[i]=e.computed(r.__parseFunction(s)),n),{})}function V_(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>(r[n]=t.__parseFunction(i),r),{})}function U_(e,t=[],r){return t.reduce((n,i)=>{var c;const{name:s,from:o}=i||{};i.default;const a=wt(o)?r.__parseExpression(o)||s:o!=null?o:s,u=wt(i.default)?r.__parseExpression(i.default):(c=i.default)!=null?c:null;return n[s]=e.inject(a,u),n},{})}function sl(e,t){return Object.keys(e).reduce((r,n)=>{const i=e[n];if(i.type==="mock")r[n]=rl(i);else if(i.ref){const s=t.$apis[i.ref],o=Me(i.transform)?i.transform.value?t.__parseFunction(i.transform):void 0:i.transform;r[n]=(...a)=>L(this,null,function*(){const u=yield s.apply(t,a);return o?o(u):u})}return r},{})}function H_(e,t=[],r){t.forEach(n=>{e.watch(r.__parseExpression(n.source),r.__parseFunction(n.handler),{deep:n.deep,immediate:n.immediate})})}function z_(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>(r[n]=t.__parseFunction(i),r),{})}let Un=[],Qt={};const ol=e=>e;function hs(r){return L(this,arguments,function*(e,t=window){const{urls:n=[],library:i}=e,s=n.filter(a=>_n(a));if(s.length===0||!i)return null;const o=n.filter(a=>bn(a));return o.length&&qu(o,t),yield Ku(s,i,t).catch(a=>(console.warn("loadScriptUrl error",s,i,a),null))})}function Xr(e){const{getDsl:t,getDslByUrl:r,options:n}=e;return n.window&&(Un.forEach(i=>{delete n.window[i]}),Un=[]),(i,s,o=Qr)=>{if(!s||typeof s=="string")return i;if(s.type==="Schema"&&s.id){let a=Qt[s.id];return a||(a=Qt[s.id]=o.defineAsyncComponent(()=>L(this,null,function*(){const u=yield t(s.id);return u&&(u.name=i),u?Zr(st(z({},n),{Vue:o,dsl:u,mode:ht.Runtime,loader:Xr(e)})).renderer:null})),a)}if(s.type==="UrlSchema"&&s.url){let a=Qt[s.url];return a||(a=Qt[s.url]=o.defineAsyncComponent(()=>L(this,null,function*(){const u=yield r(s.url);return u&&(u.name=i),u?Zr(st(z({},n),{Vue:o,dsl:u,mode:ht.Runtime,loader:Xr(e)})).renderer:null})),a)}if(s.type==="Plugin"){let a=s.library?Qt[s.library]:null;return a||(s.library&&Un.push(s.library),a=Qt[s.library||Symbol()]=o.defineAsyncComponent(()=>L(this,null,function*(){return(yield hs(s,n.window))||(console.warn("getPlugin result is null",s),null)})),a)}return i}}function q_(){Qt={}}function ar(e,t,r=Qr,n=ol){var d;if(!e||!e.name||e.invisible)return null;const i=(d=r.getCurrentInstance())==null?void 0:d.appContext,{id:s=null,directives:o=[]}=e,{vIf:a,vFor:u,vShow:c,vModels:l,vBind:f,vHtml:p,others:h}=J_(o);if(a&&!W_(a,t))return null;const m=b=>{var $,V,w,T;const E=b.$components,g=(()=>{var C,I,D,N;if(e.name==="component")return Y_(b,(C=e.props)==null?void 0:C.is);if(e.name==="slot")return e.name;const F=n(e.name,e.from,r);return bt(F)?Wu(F)||Yu(F)?F:(N=(D=E[F])!=null?D:(I=i==null?void 0:i.app)==null?void 0:I.component(F))!=null?N:F:F})(),y=G_(s,($=e.props)!=null?$:{},b),_=Z_(r,(V=e.events)!=null?V:{},b);if(e.name==="slot")return X_(r,e,y,b,n);f&&Object.assign(y,b.__parseExpression(f.value)),c&&(y.style=Object.assign((w=y.style)!=null?w:{},tw(c,b))),p&&Object.assign(y,ew(p,b)),l.forEach(F=>{Object.assign(y,rw(r,F,b))});const S=nw(r,(T=e.children)!=null?T:[],b,n,e);let v=r.createVNode(g,z(z({},y),_),S);const x=i?K_(i,h,b):[];return x.length&&(v=r.withDirectives(v,x)),v};return u?ow(u,m,t):m(t)}function K_(e,t,r){const n=e.app;return t.map(i=>{const s=typeof i.name=="string"?n.directive(i.name):r.__parseExpression(i.name);if(!s)return null;const o=[s];return i.value&&o.push(r.__parseExpression(i.value)),i.arg&&o.push(i.arg),i.modifiers&&o.push(i.modifiers),o}).filter(i=>!!i)}function J_(e=[]){const t=e.find(u=>Bt(u.name)==="vIf"),r=e.find(u=>Bt(u.name)==="vFor"),n=e.find(u=>Bt(u.name)==="vShow"),i=e.find(u=>Bt(u.name)==="vBind"),s=e.find(u=>Bt(u.name)==="vHtml"),o=e.filter(u=>Bt(u.name)==="vModel"),a=e.filter(u=>!ku.includes(Bt(u.name)));return{vIf:t,vFor:r,vShow:n,vModels:o,vBind:i,others:a,vHtml:s}}function W_(e,t){return!!t.__parseExpression(e.value)}function Y_(e,t){return t?wt(t)?e.__parseExpression(t):t:"div"}function G_(e,t,r){const n=Oi(t,r);return n.ref=r.__ref(e,n.ref),n}function Oi(e,t){return wt(e)?t.__parseExpression(e):Me(e)?t.__parseFunction(e):Array.isArray(e)?e.map(r=>Oi(r,t)):typeof e=="object"?Object.keys(e||{}).reduce((r,n)=>{let i=e[n];return r[n]=Oi(i,t),r},{}):e}function Z_(e,t,r){const n=["passive","capture","once"],i={capture:"Capture",once:"Once",passive:"OnceCapture"};return Object.keys(t||{}).reduce((s,o)=>{const a=t[o],u=ps(a.modifiers),c=u.find(p=>n.includes(p)),l="on"+on(o)+(c&&i[c]||""),f=r.__parseFunction(a.handler);return f&&(s[l]=e.withModifiers(f,u)),s},{})}function ps(e={},t=!1){const r=Object.keys(e);return t?r.map(n=>"."+n):r}function X_(e,t,r,n,i){var u;const{children:s}=t,o=Q_(t,n),a=(u=n.$slots)==null?void 0:u[o.name];return a?a(r):s?bt(s)?e.createTextVNode(s):wt(s)?e.createTextVNode(cs(n.__parseExpression(s))):Array.isArray(s)?s.map(c=>ar(c,n,e,i)):null:null}function Q_(e,t){const{props:r}=e,n=(r==null?void 0:r.name)||"default";return{name:wt(n)?t.__parseExpression(n):n,params:[]}}function tw(e,t){return t.__parseExpression(e.value)?{}:{display:"none"}}function ew(e,t){return{innerHTML:t.__parseExpression(e.value)||""}}function rw(e,t,r){var a;const n={type:"JSFunction",value:(a=t.value)!=null&&a.value?`(v) => {
79
79
  ${t.value.value} = v;
80
- }`:"(v) => {}"},i=r.__parseFunction(n),s=ps(wt(t.modifiers)?r.__parseExpression(t.modifiers):t.modifiers),o=wt(t.arg)?r.__parseExpression(t.arg):t.arg||"modelValue";return{[o]:r.__parseExpression(t.value),[`onUpdate:${o}`]:s.length&&i?e.withModifiers(i,s):i}}function nw(e,t,r,n,i){if(!t)return null;if(bt(t))return{default:()=>t};if(wt(t))return{default:()=>cs(r.__parseExpression(t))};if(Array.isArray(t)&&t.length>0){const s=iw(t),o=a=>!a||!i?{}:i!=null&&i.id&&Object.keys(a).length?{[`scope_${i.id}`]:a}:{};return Object.entries(s).reduce((a,[u,{nodes:c,params:l}])=>(a[u]=f=>{const p=l.length?jc(f!=null?f:{},l):o(f);return c.map(h=>ar(h,r.__clone(p),e,n))},a),{})}return null}function iw(e){const t={default:{params:[],nodes:[]}};for(const r of e){const n=sw(r.slot),i=n.name;t[i]?(t[i].nodes.push(r),t[i].params=t[i].params.concat(n.params)):t[i]={nodes:[r],params:n.params}}return t}function sw(e="default"){return bt(e)?{name:e,params:[]}:z({params:[]},e)}function ow(e,t,r){const{value:n,iterator:i}=e,{item:s="item",index:o="index"}=i||{};let a=r.__parseExpression(n)||[];return Number.isInteger(a)&&(a=new Array(a).fill(!0).map((u,c)=>c+1)),Array.isArray(a)?a.map((u,c)=>t(r.__clone({[s]:u,[o]:c}))):(console.warn("[vForRender]:",`${n==null?void 0:n.value} is not a Arrary`),[])}const Yo=$i({name:"VtjPageContainer",setup(){return L(this,null,function*(){const e=ms(),t=Zo(),r=t.params.id,n=r?e.getPage(r):e.getHomepage(),i=n?yield e.getRenderComponent(n.id):null,s=qn(Symbol());if(n){Object.assign(t.meta,n.meta||{},{cache:n.cache});const{useTitle:o}=e==null?void 0:e.adapter;o&&o(n.title||"VTJ")}return{provider:e,component:i,file:n,query:t.query,meta:t.meta,sid:s,route:t}})},render(){const{component:e,query:t,sid:r}=this;return e?zn(e,st(z({},t),{key:r})):zn("div","页面不存在")},activated(){this.meta.cache===!1&&(this.sid=Symbol())}}),aw=$i({name:"VtjStartupContainer",render(){return zn("div","page not found!")}}),ds=Symbol("Provider");var al=(e=>(e.Production="production",e.Development="development",e))(al||{});class cl extends Fc{constructor(r){super();A(this,"mode");A(this,"globals",{});A(this,"modules",{});A(this,"adapter",{request:or,jsonp:ss});A(this,"apis",{});A(this,"dependencies",{});A(this,"materials",{});A(this,"library",{});A(this,"service");A(this,"project",null);A(this,"components",{});A(this,"nodeEnv","development");A(this,"router",null);A(this,"materialPath","./");A(this,"urlDslCaches",{});this.options=r;const{service:n,mode:i=ht.Raw,dependencies:s,materials:o,project:a={},adapter:u={},globals:c={},modules:l={},router:f=null,materialPath:p="./",nodeEnv:h="development"}=r;this.mode=i,this.modules=l,this.service=n,this.router=f,this.materialPath=p,this.nodeEnv=h,s&&(this.dependencies=s),o&&(this.materials=o),Object.assign(this.globals,c),Object.assign(this.adapter,u);const{access:m,request:d}=this.adapter;m&&m.connect({mode:i,router:f,request:d}),a&&i!==ht.Design?this.load(a):this.project=a}createMock(r){return(...n)=>L(this,null,function*(){var s;let i={};if(r)try{i=yield r.apply(r,n)}catch(o){oe.warn("模拟数据模版异常",o)}return(s=Ce())==null?void 0:s.mock(i)})}load(r){return L(this,null,function*(){const n=this.modules[`.vtj/projects/${r.id}.json`]||this.modules[`/src/.vtj/projects/${r.id}.json`];if(this.project=n?yield n():yield this.service.init(r),!this.project)throw new Error("project is null");const{apis:i=[],meta:s=[]}=this.project,o=window;o&&(o.CKEDITOR_VERSION=void 0),this.mode===ht.Raw?yield this.loadDependencies(o):yield this.loadAssets(o),this.initMock(o),this.apis=tl(i,s,this.adapter),fs(o),el(i,o),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}initMock(r){const n=Ce(r);n&&n.setup({timeout:"50-500"})}loadDependencies(r){return L(this,null,function*(){const n=Object.entries(this.dependencies);for(const[i,s]of n)r[i]||(r[i]=this.library[i]=yield s())})}loadAssets(r){return L(this,null,function*(){const{dependencies:n=[]}=this.project,{dependencies:i,library:s,components:o,materialPath:a,nodeEnv:u}=this,{libraryExports:c,libraryMap:l,materials:f,materialExports:p,materialMapLibrary:h}=Uu(n,a,u==="development");for(const m of c){const d=i[m],b=r[m];if(b)s[m]=b;else if(d)r[m]=s[m]=yield d();else{const E=l[m]||[];for(const g of E)bn(g)&&(yield zu(m,se.append(g,{v:Oe}))),_n(g)&&(yield Si(se.append(g,{v:Oe})));s[m]=r[m]}}if(u==="development"){for(const d of f)yield Si(se.append(d,{v:Oe}));const m=this.materials||{};for(const d of p){const b=r[h[d]],E=Mc[d];if(E)b&&E.forEach(g=>{o[g]=b[g]});else{const g=m[d]?(yield m[d]()).default:r[d];g&&b&&(g.components||[]).forEach(y=>{o[y.name]=Hu(y,b)})}}}})}initRouter(){const{router:r,project:n,options:i,adapter:s}=this;if(!r)return;const o=(n==null?void 0:n.platform)==="uniapp"?"pages":"page",{routeAppendTo:a,pageRouteName:u=o,routeMeta:c}=i,l=a?"":"/",f={path:`${l}${u}/:id`,name:$e,component:Yo},p={path:l,name:Xe,component:n!=null&&n.homepage?Yo:s.startupComponent||aw,meta:c};r.hasRoute($e)&&r.removeRoute($e),r.hasRoute(Xe)&&r.removeRoute(Xe),a?(r.addRoute(a,f),r.addRoute(a,p)):(r.addRoute(f),r.addRoute(p))}install(r){const n=r.config.globalProperties.installed||{};for(const[i,s]of Object.entries(this.library))!n[i]&&Ju(s)&&(r.use(s),n[i]=!0);this.options.install&&r.use(this.options.install),this.adapter.access&&r.use(this.adapter.access),r.provide(ds,this),r.config.globalProperties.$provider=this,r.config.globalProperties.installed=n,this.mode===ht.Design&&(r.config.errorHandler=(i,s,o)=>{const a=s==null?void 0:s.$options.name,u=typeof i=="string"?i:(i==null?void 0:i.message)||(i==null?void 0:i.msg)||"未知错误",c=`[ ${a} ] ${u} ${o}`;console.error("[VTJ Error]:",{err:i,instance:s,info:o},i==null?void 0:i.stack),this.adapter.notify&&this.adapter.notify(c,"组件渲染错误","error")})}getFile(r){const{blocks:n=[]}=this.project||{};return this.getPage(r)||n.find(i=>i.id===r)||null}getPage(r){const{pages:n=[]}=this.project||{},i=(s,o=[])=>{for(const a of o){if(a.id===s)return a;if(a.children&&a.children.length){const u=i(s,a.children);if(u)return u}}};return i(r,n)||null}getHomepage(){const{homepage:r}=this.project||{};return r?this.getPage(r):null}getDsl(r){return L(this,null,function*(){const n=this.modules[`.vtj/files/${r}.json`]||this.modules[`/src/.vtj/files/${r}.json`];return n?yield n():this.service.getFile(r,this.project||void 0).catch(()=>null)})}getDslByUrl(r){return L(this,null,function*(){return this.urlDslCaches[r]||(this.adapter.request?this.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>null):null)})}createDslRenderer(r,n={}){const{library:i,components:s,mode:o,apis:a}=this,u=z({mode:o,Vue:i.Vue,components:s,libs:i,apis:a,window},n),c=Xr({getDsl:l=>L(this,null,function*(){return(yield this.getDsl(l))||null}),getDslByUrl:l=>L(this,null,function*(){return(yield this.getDslByUrl(l))||null}),options:u});return Zr(st(z({},u),{dsl:r,loader:c}))}getRenderComponent(r,n){return L(this,null,function*(){var u;const i=this.getFile(r);if(!i)return oe.warn(`Can not find file: ${r}`),null;n&&n(i);const s=`.vtj/vue/${r}.vue`,o=this.modules[s]||this.modules[`/src/pages/${r}.vue`];if(o)return(u=yield o())==null?void 0:u.default;const a=yield this.getDsl(i.id);return a?this.createDslRenderer(a).renderer:(oe.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return ws(()=>L(this,null,function*(){const i=yield this.getDslByUrl(r);return i?(i.name=n||i.name,this.createDslRenderer(i).renderer):null}))}definePluginComponent(r){return ws(()=>L(this,null,function*(){return yield hs(r,window)}))}}function cw(e){const t=new cl(e);return{provider:t,onReady:r=>t.ready(r)}}function ms(e={}){const t=Go(ds,null);if(!t)throw new Error("Can not find provider");if(t.nodeEnv==="development"){const{id:r,version:n}=e;r&&n&&L(this,null,function*(){const i=yield t.getDsl(r);(i==null?void 0:i.__VERSION__)!==n&&t.adapter.notify&&t.adapter.notify(`[ ${i==null?void 0:i.name} ] 组件源码版本与运行时版本不一致,请重新发布组件`,"版本不一致","warning")})}return t}const ul={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var t;return((t=e.data)==null?void 0:t.code)===0}},uw=(e,t="/__vtj__/api/:type.json")=>(r,n,i)=>e.send({url:t,method:"post",params:{type:r},query:i,data:{type:r,data:n},settings:ul}),lw=(e,t="/__vtj__/api/uploader.json")=>(r,n)=>L(void 0,null,function*(){return yield e.send({url:t,method:"post",data:{files:r,projectId:n},settings:st(z({},ul),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function fw(e){return yn({settings:{type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:t=>{var r;return((r=t.data)==null?void 0:r.code)===0},showError:t=>{e&&e(t||"未知错误")}}})}class En{constructor(t=or){A(this,"api");A(this,"pluginCaches",{});A(this,"uploader");this.api=uw(t),this.uploader=lw(t)}getExtension(){return L(this,null,function*(){console.log("BaseService.getExtension")})}init(t){return L(this,null,function*(){return console.log("BaseService.init",t),{}})}saveProject(t,r){return L(this,null,function*(){return!!(yield this.api("saveProject",t,{type:r}).catch(()=>!1))})}saveMaterials(t,r){return L(this,null,function*(){return console.log("BaseService.saveMaterials",t,r),!1})}saveFile(t){return L(this,null,function*(){return console.log("BaseService.saveFile",t),!1})}getFile(t){return L(this,null,function*(){return console.log("BaseService.getFile",t),{}})}removeFile(t){return L(this,null,function*(){return console.log("BaseService.removeFile",t),!1})}saveHistory(t){return L(this,null,function*(){return console.log("BaseService.saveHistory",t),!1})}removeHistory(t){return L(this,null,function*(){return console.log("BaseService.removeHistory",t),!1})}getHistory(t){return L(this,null,function*(){return console.log("BaseService.getHistory",t),{}})}getHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.getHistoryItem",t,r),{}})}saveHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.saveHistoryItem",t,r),!1})}removeHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.removeHistoryItem",t,r),!1})}publish(t){return L(this,null,function*(){return!!(yield this.api("publish",t).catch(()=>!1))})}publishFile(t,r){return L(this,null,function*(){return!!(yield this.api("publishFile",{project:t,file:r}).catch(()=>!1))})}genVueContent(t,r){return L(this,null,function*(){return yield this.api("genVueContent",{project:t,dsl:r}).catch(()=>"")})}createRawPage(t){return L(this,null,function*(){return yield this.api("createRawPage",t).catch(()=>"")})}removeRawPage(t){return L(this,null,function*(){return yield this.api("removeRawPage",t).catch(()=>"")})}uploadStaticFile(t,r){return L(this,null,function*(){return yield this.uploader(t,r).catch(()=>null)})}getStaticFiles(t){return L(this,null,function*(){return yield this.api("getStaticFiles",t).catch(()=>[])})}removeStaticFile(t,r){return L(this,null,function*(){return yield this.api("removeStaticFile",{name:t,projectId:r}).catch(()=>"")})}clearStaticFiles(t){return L(this,null,function*(){return yield this.api("clearStaticFiles",t).catch(()=>"")})}getPluginMaterial(t){return L(this,null,function*(){const{urls:r=[]}=t,n=r.filter(s=>Lu(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=or.send({url:n,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(s=>s.data).catch(()=>null)):null})}genSource(t){return L(this,null,function*(){return console.log("BaseService.genSource",t),""})}}const mt=new is({type:"local",expired:0,prefix:"__VTJ_"});class hw extends En{init(t){const r=new ce(t),n=mt.get(`project_${r.id}`),i=Object.assign(r.toDsl(),n||{});return mt.save(`project_${r.id}`,i),Promise.resolve(i)}saveProject(t){const r=new ce(t);return mt.save(`project_${r.id}`,r.toDsl()),Promise.resolve(!0)}saveMaterials(t,r){return mt.save(`materials_${t.id}`,un(r)),Promise.resolve(!0)}saveFile(t){return mt.save(`file_${t.id}`,t),Promise.resolve(!0)}getFile(t){const r=mt.get(`file_${t}`);return r?Promise.resolve(r):Promise.reject(null)}removeFile(t){return mt.remove(`file_${t}`),Promise.resolve(!0)}saveHistory(t){return mt.save(`history_${t.id}`,t),Promise.resolve(!0)}removeHistory(t){const r=mt.get(`history_${t}`);if(r){const n=(r.items||[]).map(i=>i.id);this.removeHistoryItem(t,n),mt.remove(`history_${t}`)}return Promise.resolve(!0)}getHistory(t){const r=mt.get(`history_${t}`),n=new Yi(r||{id:t});return Promise.resolve(n.toDsl())}getHistoryItem(t,r){const n=mt.get(`history_${t}_${r}`);return Promise.resolve(n)}saveHistoryItem(t,r){return mt.save(`history_${t}_${r.id}`,r),Promise.resolve(!0)}removeHistoryItem(t,r){return r.forEach(n=>{mt.remove(`history_${t}_${n}`)}),Promise.resolve(!0)}}class ll extends En{constructor(){super(...arguments);A(this,"projects",{});A(this,"materials",{});A(this,"files",{});A(this,"histories",{});A(this,"historyItems",{})}init(r){const n=new ce(r),i=this.projects[n.id]||{},s=Object.assign(n.toDsl(),i);return this.projects[s.id]=s,Promise.resolve(s)}saveProject(r){const n=new ce(r);return this.projects[n.id]=n.toDsl(),Promise.resolve(!0)}saveMaterials(r,n){return r.id&&(this.materials[r.id]=un(n)),Promise.resolve(!0)}saveFile(r){return this.files[r.id]=r,Promise.resolve(!0)}getFile(r){const n=this.files[r];return n?Promise.resolve(n):Promise.reject(null)}removeFile(r){return delete this.files[r],Promise.resolve(!0)}saveHistory(r){return this.histories[r.id]=r,Promise.resolve(!0)}removeHistory(r){const n=this.histories[r];if(n){const i=(n.items||[]).map(s=>s.id);this.removeHistoryItem(r,i),delete this.historyItems[r]}return Promise.resolve(!0)}getHistory(r){const n=this.histories[r],i=new Yi(n||{id:r});return Promise.resolve(i)}getHistoryItem(r,n){const i=`${r}_${n}`,s=this.historyItems[i]||{};return Promise.resolve(s)}saveHistoryItem(r,n){const i=`${r}_${n.id}`;return this.historyItems[i]=n,Promise.resolve(!0)}removeHistoryItem(r,n){return n.forEach(i=>{const s=`${r}_${i}`;delete this.historyItems[s]}),Promise.resolve(!0)}}let Hn=null;function pw(){return Hn||(Hn=new ll,Hn)}class dw extends En{constructor(){super(...arguments);A(this,"getFileCaches",{})}getExtension(){return L(this,null,function*(){return yield this.api("getExtension",{}).catch(()=>{})})}init(r){return L(this,null,function*(){return(yield this.api("init",r).catch(()=>null))||{}})}saveProject(r,n){return L(this,null,function*(){return!!(yield this.api("saveProject",r,{type:n}).catch(()=>!1))})}saveMaterials(r,n){return L(this,null,function*(){return!!(yield this.api("saveMaterials",{project:r,materials:un(n)}).catch(()=>!1))})}saveFile(r){return L(this,null,function*(){return!!(yield this.api("saveFile",r).catch(()=>!1))})}getFile(r){return L(this,null,function*(){return this.getFileCaches[r]||(this.getFileCaches[r]=this.api("getFile",r).catch(()=>null)).finally(()=>{delete this.getFileCaches[r]})})}removeFile(r){return L(this,null,function*(){return!!(yield this.api("removeFile",r).catch(()=>!1))})}saveHistory(r){return L(this,null,function*(){return!!(yield this.api("saveHistory",r).catch(()=>!1))})}removeHistory(r){return L(this,null,function*(){return!!(yield this.api("removeHistory",r).catch(()=>!1))})}getHistory(r){return L(this,null,function*(){return(yield this.api("getHistory",r).catch(()=>null))||{}})}getHistoryItem(r,n){return L(this,null,function*(){return(yield this.api("getHistoryItem",{fId:r,id:n}).catch(()=>null))||{}})}saveHistoryItem(r,n){return L(this,null,function*(){return!!(yield this.api("saveHistoryItem",{fId:r,item:n}).catch(()=>!1))})}removeHistoryItem(r,n){return L(this,null,function*(){return!!(yield this.api("removeHistoryItem",{fId:r,ids:n}).catch(()=>!1))})}}function fl(e,t,r=[]){return r.map(n=>{const{id:i,title:s,icon:o,children:a,hidden:u}=n;return{id:i,title:s,icon:o,hidden:u,url:`${e}/${t}/${i}`,children:a&&a.length?fl(e,t,a):void 0}})}function hl(e,t){if(!t)return e;let r=[];for(const n of e)if(n.children&&n.children.length){const i=hl(n.children,t);i.length&&(n.children=i,r.push(n))}else t.can(n.id.toString())&&r.push(n);return r}function mw(e){const{menuPathPrefix:t="",pageRouteName:r="page",disableMenusFilter:n=!1}=e||{},i=ms(),s=Zo(),o=Zu(),a=qn(!1),u=qn(!1),c=i.project;vl(()=>{const{name:p,params:h,meta:m}=s;if(p===$e){const d=i.getPage(h.id);a.value=!(d!=null&&d.mask),u.value=!!(d!=null&&d.pure)}else if(p===Xe){const d=i.getHomepage();a.value=!(d!=null&&d.mask),u.value=!!(d!=null&&d.pure)}else a.value=!m.mask,u.value=!!m.pure});const l=fl(t,r,c==null?void 0:c.pages),f=c==null?void 0:c.config;return{disabled:a,logo:f==null?void 0:f.logo,themeSwitchable:f==null?void 0:f.themeSwitchable,title:(f==null?void 0:f.title)||(c==null?void 0:c.description)||(c==null?void 0:c.name)||"VTJ App",menus:n?l:hl(l,o),pure:u}}const rE=Object.freeze(Object.defineProperty({__proto__:null,ACCESS_KEY:ls,Access:wn,BUILD_IN_TAGS:Fu,BUILT_IN_DIRECTIVES:ku,BaseService:En,CONTEXT_HOST:Ti,Context:il,ContextMode:ht,DATA_TYPES:Iu,HOMEPAGE_ROUTE_NAME:Xe,HTML_TAGS:Mu,JSCodeToString:P_,LIFE_CYCLES_LIST:R_,LocalService:dw,MemoryService:ll,NodeEnv:al,PAGE_ROUTE_NAME:$e,Provider:cl,StorageService:hw,VTJ_RENDERER_VERSION:Oe,adoptedStyleSheets:us,clearLoaderCache:q_,createAccess:k_,createAdapter:B_,createAssetScripts:j_,createAssetsCss:D_,createDataSources:sl,createLoader:Xr,createMemoryService:pw,createMetaApi:Qu,createMock:rl,createProvider:cw,createRenderer:Zr,createSchemaApi:Xu,createSchemaApis:tl,createServiceRequest:fw,defaultLoader:ol,fillBasePath:Ye,getMock:Ce,getModifiers:ps,getPlugin:hs,getRawComponent:Hu,isBuiltInTag:Wu,isCSSUrl:bn,isJSCode:Gu,isJSExpression:wt,isJSFunction:Me,isJSON:Lu,isJSUrl:_n,isNativeTag:Yu,isVuePlugin:Ju,loadCss:zu,loadCssUrl:qu,loadScriptUrl:Ku,mockApi:nl,mockApis:el,mockCleanup:fs,nodeRender:ar,parseDeps:Uu,parseExpression:Pe,parseFunction:Gr,providerKey:ds,removeProdFlag:Vu,setupPageSetting:C_,toString:cs,useAccess:Zu,useMask:mw,useProvider:ms},Symbol.toStringTag,{value:"Module"})),gw=$i({__name:"app",setup(e){return(t,r)=>{const n=yl("router-view");return xs(),Es(Ss(Tl),{locale:Ss(xl)},{default:Ts(()=>[(xs(),Es(bl,null,{default:Ts(()=>[_l(n)]),_:1}))]),_:1},8,["locale"])}}}),vw=[{path:"/",name:"home",component:()=>Ve(()=>import("./index-CHHzKN8A.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url)},{path:"/preview/:id",name:"preview",component:()=>Ve(()=>import("./preview-DVuR05zM.js"),__vite__mapDeps([21,13,14,1,2,4,5,3,6,7,8,9,10,11,12,15,16,17,18]),import.meta.url)},{path:"/page/:id",name:"page",component:()=>Ve(()=>import("./page-Js5n0MUh.js"),__vite__mapDeps([22,13,14,1,2,4,5,3,6,7,8,9,10,11,12,15,16,17,18]),import.meta.url),meta:{pure:!0}},{path:"/pages/:id",name:"page",component:()=>Ve(()=>import("./uni-page-Cjqcu6iY.js"),__vite__mapDeps([23,1,2,19,24]),import.meta.url),meta:{pure:!0}},{path:"/auth",name:"auth",component:()=>Ve(()=>import("./auth-Bopfg0NN.js"),__vite__mapDeps([25,4,2,5,3,6,7,8,9,10,11,12,13,14,1,15,16,17,19,26]),import.meta.url)}],yw=El({history:Sl(),routes:vw}),bw="RRO_IDE_ACCESS_STORAGE__",gs=wl(gw),_w=new wn({storageKey:bw});gs.use(_w);gs.use(yw);gs.mount("#app");export{nt as $,us as A,Fc as B,oe as C,cl as D,ce as E,M as F,C_ as G,it as H,we as I,ae as J,l1 as K,pa as L,Je as M,ci as N,Fr as O,ai as P,B_ as Q,ty as R,a_ as S,Hc as T,zc as U,eE as V,G as W,k_ as X,qu as Y,_n as Z,c_ as _,bn as a,We as a0,Nr as a1,qc as a2,ee as a3,Yi as a4,Xa as a5,V1 as a6,k1 as a7,Uu as a8,D_ as a9,j_ as aa,Hu as ab,tl as ac,fs as ad,el as ae,Ji as af,Wi as ag,Ke as ah,M1 as ai,Li as aj,q_ as ak,Kr as al,wt as am,Me as an,i_ as ao,Pe as ap,Gr as aq,ku as ar,z1 as as,P_ as at,R_ as au,Iu as av,rl as aw,s_ as ax,m1 as ay,Ii as az,Ku as b,Nw as c,ct as d,cw as e,Rc as f,Dt as g,gt as h,Hi as i,O_ as j,Se as k,ei as l,Hv as m,dw as n,bt as o,Bt as p,Yv as q,rE as r,f1 as s,fw as t,si as u,$_ as v,nr as w,ss as x,ht as y,Ac as z};
80
+ }`:"(v) => {}"},i=r.__parseFunction(n),s=ps(wt(t.modifiers)?r.__parseExpression(t.modifiers):t.modifiers),o=wt(t.arg)?r.__parseExpression(t.arg):t.arg||"modelValue";return{[o]:r.__parseExpression(t.value),[`onUpdate:${o}`]:s.length&&i?e.withModifiers(i,s):i}}function nw(e,t,r,n,i){if(!t)return null;if(bt(t))return{default:()=>t};if(wt(t))return{default:()=>cs(r.__parseExpression(t))};if(Array.isArray(t)&&t.length>0){const s=iw(t),o=a=>!a||!i?{}:i!=null&&i.id&&Object.keys(a).length?{[`scope_${i.id}`]:a}:{};return Object.entries(s).reduce((a,[u,{nodes:c,params:l}])=>(a[u]=f=>{const p=l.length?jc(f!=null?f:{},l):o(f);return c.map(h=>ar(h,r.__clone(p),e,n))},a),{})}return null}function iw(e){const t={default:{params:[],nodes:[]}};for(const r of e){const n=sw(r.slot),i=n.name;t[i]?(t[i].nodes.push(r),t[i].params=t[i].params.concat(n.params)):t[i]={nodes:[r],params:n.params}}return t}function sw(e="default"){return bt(e)?{name:e,params:[]}:z({params:[]},e)}function ow(e,t,r){const{value:n,iterator:i}=e,{item:s="item",index:o="index"}=i||{};let a=r.__parseExpression(n)||[];return Number.isInteger(a)&&(a=new Array(a).fill(!0).map((u,c)=>c+1)),Array.isArray(a)?a.map((u,c)=>t(r.__clone({[s]:u,[o]:c}))):(console.warn("[vForRender]:",`${n==null?void 0:n.value} is not a Arrary`),[])}const Yo=$i({name:"VtjPageContainer",setup(){return L(this,null,function*(){const e=ms(),t=Zo(),r=t.params.id,n=r?e.getPage(r):e.getHomepage(),i=n?yield e.getRenderComponent(n.id):null,s=qn(Symbol());if(n){Object.assign(t.meta,n.meta||{},{cache:n.cache});const{useTitle:o}=e==null?void 0:e.adapter;o&&o(n.title||"VTJ")}return{provider:e,component:i,file:n,query:t.query,meta:t.meta,sid:s,route:t}})},render(){const{component:e,query:t,sid:r}=this;return e?zn(e,st(z({},t),{key:r})):zn("div","页面不存在")},activated(){this.meta.cache===!1&&(this.sid=Symbol())}}),aw=$i({name:"VtjStartupContainer",render(){return zn("div","page not found!")}}),ds=Symbol("Provider");var al=(e=>(e.Production="production",e.Development="development",e))(al||{});class cl extends Fc{constructor(r){super();A(this,"mode");A(this,"globals",{});A(this,"modules",{});A(this,"adapter",{request:or,jsonp:ss});A(this,"apis",{});A(this,"dependencies",{});A(this,"materials",{});A(this,"library",{});A(this,"service");A(this,"project",null);A(this,"components",{});A(this,"nodeEnv","development");A(this,"router",null);A(this,"materialPath","./");A(this,"urlDslCaches",{});this.options=r;const{service:n,mode:i=ht.Raw,dependencies:s,materials:o,project:a={},adapter:u={},globals:c={},modules:l={},router:f=null,materialPath:p="./",nodeEnv:h="development"}=r;this.mode=i,this.modules=l,this.service=n,this.router=f,this.materialPath=p,this.nodeEnv=h,s&&(this.dependencies=s),o&&(this.materials=o),Object.assign(this.globals,c),Object.assign(this.adapter,u);const{access:m,request:d}=this.adapter;m&&m.connect({mode:i,router:f,request:d}),a&&i!==ht.Design?this.load(a):this.project=a}createMock(r){return(...n)=>L(this,null,function*(){var s;let i={};if(r)try{i=yield r.apply(r,n)}catch(o){oe.warn("模拟数据模版异常",o)}return(s=Ce())==null?void 0:s.mock(i)})}load(r){return L(this,null,function*(){const n=this.modules[`.vtj/projects/${r.id}.json`]||this.modules[`/src/.vtj/projects/${r.id}.json`];if(this.project=n?yield n():yield this.service.init(r),!this.project)throw new Error("project is null");const{apis:i=[],meta:s=[]}=this.project,o=window;o&&(o.CKEDITOR_VERSION=void 0),this.mode===ht.Raw?yield this.loadDependencies(o):yield this.loadAssets(o),this.initMock(o),this.apis=tl(i,s,this.adapter),fs(o),el(i,o),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}initMock(r){const n=Ce(r);n&&n.setup({timeout:"50-500"})}loadDependencies(r){return L(this,null,function*(){const n=Object.entries(this.dependencies);for(const[i,s]of n)r[i]||(r[i]=this.library[i]=yield s())})}loadAssets(r){return L(this,null,function*(){const{dependencies:n=[]}=this.project,{dependencies:i,library:s,components:o,materialPath:a,nodeEnv:u}=this,{libraryExports:c,libraryMap:l,materials:f,materialExports:p,materialMapLibrary:h}=Uu(n,a,u==="development");for(const m of c){const d=i[m],b=r[m];if(b)s[m]=b;else if(d)r[m]=s[m]=yield d();else{const E=l[m]||[];for(const g of E)bn(g)&&(yield zu(m,se.append(g,{v:Oe}))),_n(g)&&(yield Si(se.append(g,{v:Oe})));s[m]=r[m]}}if(u==="development"){for(const d of f)yield Si(se.append(d,{v:Oe}));const m=this.materials||{};for(const d of p){const b=r[h[d]],E=Mc[d];if(E)b&&E.forEach(g=>{o[g]=b[g]});else{const g=m[d]?(yield m[d]()).default:r[d];g&&b&&(g.components||[]).forEach(y=>{o[y.name]=Hu(y,b)})}}}})}initRouter(){const{router:r,project:n,options:i,adapter:s}=this;if(!r)return;const o=(n==null?void 0:n.platform)==="uniapp"?"pages":"page",{routeAppendTo:a,pageRouteName:u=o,routeMeta:c}=i,l=a?"":"/",f={path:`${l}${u}/:id`,name:$e,component:Yo},p={path:l,name:Xe,component:n!=null&&n.homepage?Yo:s.startupComponent||aw,meta:c};r.hasRoute($e)&&r.removeRoute($e),r.hasRoute(Xe)&&r.removeRoute(Xe),a?(r.addRoute(a,f),r.addRoute(a,p)):(r.addRoute(f),r.addRoute(p))}install(r){const n=r.config.globalProperties.installed||{};for(const[i,s]of Object.entries(this.library))!n[i]&&Ju(s)&&(r.use(s),n[i]=!0);this.options.install&&r.use(this.options.install),this.adapter.access&&r.use(this.adapter.access),r.provide(ds,this),r.config.globalProperties.$provider=this,r.config.globalProperties.installed=n,this.mode===ht.Design&&(r.config.errorHandler=(i,s,o)=>{const a=s==null?void 0:s.$options.name,u=typeof i=="string"?i:(i==null?void 0:i.message)||(i==null?void 0:i.msg)||"未知错误",c=`[ ${a} ] ${u} ${o}`;console.error("[VTJ Error]:",{err:i,instance:s,info:o},i==null?void 0:i.stack),this.adapter.notify&&this.adapter.notify(c,"组件渲染错误","error")})}getFile(r){const{blocks:n=[]}=this.project||{};return this.getPage(r)||n.find(i=>i.id===r)||null}getPage(r){const{pages:n=[]}=this.project||{},i=(s,o=[])=>{for(const a of o){if(a.id===s)return a;if(a.children&&a.children.length){const u=i(s,a.children);if(u)return u}}};return i(r,n)||null}getHomepage(){const{homepage:r}=this.project||{};return r?this.getPage(r):null}getDsl(r){return L(this,null,function*(){const n=this.modules[`.vtj/files/${r}.json`]||this.modules[`/src/.vtj/files/${r}.json`];return n?yield n():this.service.getFile(r,this.project||void 0).catch(()=>null)})}getDslByUrl(r){return L(this,null,function*(){return this.urlDslCaches[r]||(this.adapter.request?this.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>null):null)})}createDslRenderer(r,n={}){const{library:i,components:s,mode:o,apis:a}=this,u=z({mode:o,Vue:i.Vue,components:s,libs:i,apis:a,window},n),c=Xr({getDsl:l=>L(this,null,function*(){return(yield this.getDsl(l))||null}),getDslByUrl:l=>L(this,null,function*(){return(yield this.getDslByUrl(l))||null}),options:u});return Zr(st(z({},u),{dsl:r,loader:c}))}getRenderComponent(r,n){return L(this,null,function*(){var u;const i=this.getFile(r);if(!i)return oe.warn(`Can not find file: ${r}`),null;n&&n(i);const s=`.vtj/vue/${r}.vue`,o=this.modules[s]||this.modules[`/src/pages/${r}.vue`];if(o)return(u=yield o())==null?void 0:u.default;const a=yield this.getDsl(i.id);return a?this.createDslRenderer(a).renderer:(oe.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return ws(()=>L(this,null,function*(){const i=yield this.getDslByUrl(r);return i?(i.name=n||i.name,this.createDslRenderer(i).renderer):null}))}definePluginComponent(r){return ws(()=>L(this,null,function*(){return yield hs(r,window)}))}}function cw(e){const t=new cl(e);return{provider:t,onReady:r=>t.ready(r)}}function ms(e={}){const t=Go(ds,null);if(!t)throw new Error("Can not find provider");if(t.nodeEnv==="development"){const{id:r,version:n}=e;r&&n&&L(this,null,function*(){const i=yield t.getDsl(r);(i==null?void 0:i.__VERSION__)!==n&&t.adapter.notify&&t.adapter.notify(`[ ${i==null?void 0:i.name} ] 组件源码版本与运行时版本不一致,请重新发布组件`,"版本不一致","warning")})}return t}const ul={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var t;return((t=e.data)==null?void 0:t.code)===0}},uw=(e,t="/__vtj__/api/:type.json")=>(r,n,i)=>e.send({url:t,method:"post",params:{type:r},query:i,data:{type:r,data:n},settings:ul}),lw=(e,t="/__vtj__/api/uploader.json")=>(r,n)=>L(void 0,null,function*(){return yield e.send({url:t,method:"post",data:{files:r,projectId:n},settings:st(z({},ul),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function fw(e){return yn({settings:{type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:t=>{var r;return((r=t.data)==null?void 0:r.code)===0},showError:t=>{e&&e(t||"未知错误")}}})}class En{constructor(t=or){A(this,"api");A(this,"pluginCaches",{});A(this,"uploader");this.api=uw(t),this.uploader=lw(t)}getExtension(){return L(this,null,function*(){console.log("BaseService.getExtension")})}init(t){return L(this,null,function*(){return console.log("BaseService.init",t),{}})}saveProject(t,r){return L(this,null,function*(){return!!(yield this.api("saveProject",t,{type:r}).catch(()=>!1))})}saveMaterials(t,r){return L(this,null,function*(){return console.log("BaseService.saveMaterials",t,r),!1})}saveFile(t){return L(this,null,function*(){return console.log("BaseService.saveFile",t),!1})}getFile(t){return L(this,null,function*(){return console.log("BaseService.getFile",t),{}})}removeFile(t){return L(this,null,function*(){return console.log("BaseService.removeFile",t),!1})}saveHistory(t){return L(this,null,function*(){return console.log("BaseService.saveHistory",t),!1})}removeHistory(t){return L(this,null,function*(){return console.log("BaseService.removeHistory",t),!1})}getHistory(t){return L(this,null,function*(){return console.log("BaseService.getHistory",t),{}})}getHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.getHistoryItem",t,r),{}})}saveHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.saveHistoryItem",t,r),!1})}removeHistoryItem(t,r){return L(this,null,function*(){return console.log("BaseService.removeHistoryItem",t,r),!1})}publish(t){return L(this,null,function*(){return!!(yield this.api("publish",t).catch(()=>!1))})}publishFile(t,r){return L(this,null,function*(){return!!(yield this.api("publishFile",{project:t,file:r}).catch(()=>!1))})}genVueContent(t,r){return L(this,null,function*(){return yield this.api("genVueContent",{project:t,dsl:r}).catch(()=>"")})}createRawPage(t){return L(this,null,function*(){return yield this.api("createRawPage",t).catch(()=>"")})}removeRawPage(t){return L(this,null,function*(){return yield this.api("removeRawPage",t).catch(()=>"")})}uploadStaticFile(t,r){return L(this,null,function*(){return yield this.uploader(t,r).catch(()=>null)})}getStaticFiles(t){return L(this,null,function*(){return yield this.api("getStaticFiles",t).catch(()=>[])})}removeStaticFile(t,r){return L(this,null,function*(){return yield this.api("removeStaticFile",{name:t,projectId:r}).catch(()=>"")})}clearStaticFiles(t){return L(this,null,function*(){return yield this.api("clearStaticFiles",t).catch(()=>"")})}getPluginMaterial(t){return L(this,null,function*(){const{urls:r=[]}=t,n=r.filter(s=>Lu(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=or.send({url:n,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(s=>s.data).catch(()=>null)):null})}genSource(t){return L(this,null,function*(){return console.log("BaseService.genSource",t),""})}}const mt=new is({type:"local",expired:0,prefix:"__VTJ_"});class hw extends En{init(t){const r=new ce(t),n=mt.get(`project_${r.id}`),i=Object.assign(r.toDsl(),n||{});return mt.save(`project_${r.id}`,i),Promise.resolve(i)}saveProject(t){const r=new ce(t);return mt.save(`project_${r.id}`,r.toDsl()),Promise.resolve(!0)}saveMaterials(t,r){return mt.save(`materials_${t.id}`,un(r)),Promise.resolve(!0)}saveFile(t){return mt.save(`file_${t.id}`,t),Promise.resolve(!0)}getFile(t){const r=mt.get(`file_${t}`);return r?Promise.resolve(r):Promise.reject(null)}removeFile(t){return mt.remove(`file_${t}`),Promise.resolve(!0)}saveHistory(t){return mt.save(`history_${t.id}`,t),Promise.resolve(!0)}removeHistory(t){const r=mt.get(`history_${t}`);if(r){const n=(r.items||[]).map(i=>i.id);this.removeHistoryItem(t,n),mt.remove(`history_${t}`)}return Promise.resolve(!0)}getHistory(t){const r=mt.get(`history_${t}`),n=new Yi(r||{id:t});return Promise.resolve(n.toDsl())}getHistoryItem(t,r){const n=mt.get(`history_${t}_${r}`);return Promise.resolve(n)}saveHistoryItem(t,r){return mt.save(`history_${t}_${r.id}`,r),Promise.resolve(!0)}removeHistoryItem(t,r){return r.forEach(n=>{mt.remove(`history_${t}_${n}`)}),Promise.resolve(!0)}}class ll extends En{constructor(){super(...arguments);A(this,"projects",{});A(this,"materials",{});A(this,"files",{});A(this,"histories",{});A(this,"historyItems",{})}init(r){const n=new ce(r),i=this.projects[n.id]||{},s=Object.assign(n.toDsl(),i);return this.projects[s.id]=s,Promise.resolve(s)}saveProject(r){const n=new ce(r);return this.projects[n.id]=n.toDsl(),Promise.resolve(!0)}saveMaterials(r,n){return r.id&&(this.materials[r.id]=un(n)),Promise.resolve(!0)}saveFile(r){return this.files[r.id]=r,Promise.resolve(!0)}getFile(r){const n=this.files[r];return n?Promise.resolve(n):Promise.reject(null)}removeFile(r){return delete this.files[r],Promise.resolve(!0)}saveHistory(r){return this.histories[r.id]=r,Promise.resolve(!0)}removeHistory(r){const n=this.histories[r];if(n){const i=(n.items||[]).map(s=>s.id);this.removeHistoryItem(r,i),delete this.historyItems[r]}return Promise.resolve(!0)}getHistory(r){const n=this.histories[r],i=new Yi(n||{id:r});return Promise.resolve(i)}getHistoryItem(r,n){const i=`${r}_${n}`,s=this.historyItems[i]||{};return Promise.resolve(s)}saveHistoryItem(r,n){const i=`${r}_${n.id}`;return this.historyItems[i]=n,Promise.resolve(!0)}removeHistoryItem(r,n){return n.forEach(i=>{const s=`${r}_${i}`;delete this.historyItems[s]}),Promise.resolve(!0)}}let Hn=null;function pw(){return Hn||(Hn=new ll,Hn)}class dw extends En{constructor(){super(...arguments);A(this,"getFileCaches",{})}getExtension(){return L(this,null,function*(){return yield this.api("getExtension",{}).catch(()=>{})})}init(r){return L(this,null,function*(){return(yield this.api("init",r).catch(()=>null))||{}})}saveProject(r,n){return L(this,null,function*(){return!!(yield this.api("saveProject",r,{type:n}).catch(()=>!1))})}saveMaterials(r,n){return L(this,null,function*(){return!!(yield this.api("saveMaterials",{project:r,materials:un(n)}).catch(()=>!1))})}saveFile(r){return L(this,null,function*(){return!!(yield this.api("saveFile",r).catch(()=>!1))})}getFile(r){return L(this,null,function*(){return this.getFileCaches[r]||(this.getFileCaches[r]=this.api("getFile",r).catch(()=>null)).finally(()=>{delete this.getFileCaches[r]})})}removeFile(r){return L(this,null,function*(){return!!(yield this.api("removeFile",r).catch(()=>!1))})}saveHistory(r){return L(this,null,function*(){return!!(yield this.api("saveHistory",r).catch(()=>!1))})}removeHistory(r){return L(this,null,function*(){return!!(yield this.api("removeHistory",r).catch(()=>!1))})}getHistory(r){return L(this,null,function*(){return(yield this.api("getHistory",r).catch(()=>null))||{}})}getHistoryItem(r,n){return L(this,null,function*(){return(yield this.api("getHistoryItem",{fId:r,id:n}).catch(()=>null))||{}})}saveHistoryItem(r,n){return L(this,null,function*(){return!!(yield this.api("saveHistoryItem",{fId:r,item:n}).catch(()=>!1))})}removeHistoryItem(r,n){return L(this,null,function*(){return!!(yield this.api("removeHistoryItem",{fId:r,ids:n}).catch(()=>!1))})}}function fl(e,t,r=[]){return r.map(n=>{const{id:i,title:s,icon:o,children:a,hidden:u}=n;return{id:i,title:s,icon:o,hidden:u,url:`${e}/${t}/${i}`,children:a&&a.length?fl(e,t,a):void 0}})}function hl(e,t){if(!t)return e;let r=[];for(const n of e)if(n.children&&n.children.length){const i=hl(n.children,t);i.length&&(n.children=i,r.push(n))}else t.can(n.id.toString())&&r.push(n);return r}function mw(e){const{menuPathPrefix:t="",pageRouteName:r="page",disableMenusFilter:n=!1}=e||{},i=ms(),s=Zo(),o=Zu(),a=qn(!1),u=qn(!1),c=i.project;vl(()=>{const{name:p,params:h,meta:m}=s;if(p===$e){const d=i.getPage(h.id);a.value=!(d!=null&&d.mask),u.value=!!(d!=null&&d.pure)}else if(p===Xe){const d=i.getHomepage();a.value=!(d!=null&&d.mask),u.value=!!(d!=null&&d.pure)}else a.value=!m.mask,u.value=!!m.pure});const l=fl(t,r,c==null?void 0:c.pages),f=c==null?void 0:c.config;return{disabled:a,logo:f==null?void 0:f.logo,themeSwitchable:f==null?void 0:f.themeSwitchable,title:(f==null?void 0:f.title)||(c==null?void 0:c.description)||(c==null?void 0:c.name)||"VTJ App",menus:n?l:hl(l,o),pure:u}}const rE=Object.freeze(Object.defineProperty({__proto__:null,ACCESS_KEY:ls,Access:wn,BUILD_IN_TAGS:Fu,BUILT_IN_DIRECTIVES:ku,BaseService:En,CONTEXT_HOST:Ti,Context:il,ContextMode:ht,DATA_TYPES:Iu,HOMEPAGE_ROUTE_NAME:Xe,HTML_TAGS:Mu,JSCodeToString:P_,LIFE_CYCLES_LIST:R_,LocalService:dw,MemoryService:ll,NodeEnv:al,PAGE_ROUTE_NAME:$e,Provider:cl,StorageService:hw,VTJ_RENDERER_VERSION:Oe,adoptedStyleSheets:us,clearLoaderCache:q_,createAccess:k_,createAdapter:B_,createAssetScripts:j_,createAssetsCss:D_,createDataSources:sl,createLoader:Xr,createMemoryService:pw,createMetaApi:Qu,createMock:rl,createProvider:cw,createRenderer:Zr,createSchemaApi:Xu,createSchemaApis:tl,createServiceRequest:fw,defaultLoader:ol,fillBasePath:Ye,getMock:Ce,getModifiers:ps,getPlugin:hs,getRawComponent:Hu,isBuiltInTag:Wu,isCSSUrl:bn,isJSCode:Gu,isJSExpression:wt,isJSFunction:Me,isJSON:Lu,isJSUrl:_n,isNativeTag:Yu,isVuePlugin:Ju,loadCss:zu,loadCssUrl:qu,loadScriptUrl:Ku,mockApi:nl,mockApis:el,mockCleanup:fs,nodeRender:ar,parseDeps:Uu,parseExpression:Pe,parseFunction:Gr,providerKey:ds,removeProdFlag:Vu,setupPageSetting:C_,toString:cs,useAccess:Zu,useMask:mw,useProvider:ms},Symbol.toStringTag,{value:"Module"})),gw=$i({__name:"app",setup(e){return(t,r)=>{const n=yl("router-view");return xs(),Es(Ss(Tl),{locale:Ss(xl)},{default:Ts(()=>[(xs(),Es(bl,null,{default:Ts(()=>[_l(n)]),_:1}))]),_:1},8,["locale"])}}}),vw=[{path:"/",name:"home",component:()=>Ve(()=>import("./index-w-1vXpgK.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]),import.meta.url)},{path:"/preview/:id",name:"preview",component:()=>Ve(()=>import("./preview-BS9P_K7B.js"),__vite__mapDeps([21,13,14,1,2,4,5,3,6,7,8,9,10,11,12,15,16,17,18]),import.meta.url)},{path:"/page/:id",name:"page",component:()=>Ve(()=>import("./page-BPgL95Xv.js"),__vite__mapDeps([22,13,14,1,2,4,5,3,6,7,8,9,10,11,12,15,16,17,18]),import.meta.url),meta:{pure:!0}},{path:"/pages/:id",name:"page",component:()=>Ve(()=>import("./uni-page-Cjqcu6iY.js"),__vite__mapDeps([23,1,2,19,24]),import.meta.url),meta:{pure:!0}},{path:"/auth",name:"auth",component:()=>Ve(()=>import("./auth-ChXm6jsl.js"),__vite__mapDeps([25,4,2,5,3,6,7,8,9,10,11,12,13,14,1,15,16,17,19,26]),import.meta.url)}],yw=El({history:Sl(),routes:vw}),bw="RRO_IDE_ACCESS_STORAGE__",gs=wl(gw),_w=new wn({storageKey:bw});gs.use(_w);gs.use(yw);gs.mount("#app");export{nt as $,us as A,Fc as B,oe as C,cl as D,ce as E,M as F,C_ as G,it as H,we as I,ae as J,l1 as K,pa as L,Je as M,ci as N,Fr as O,ai as P,B_ as Q,ty as R,a_ as S,Hc as T,zc as U,eE as V,G as W,k_ as X,qu as Y,_n as Z,c_ as _,bn as a,We as a0,Nr as a1,qc as a2,ee as a3,Yi as a4,Xa as a5,V1 as a6,k1 as a7,Uu as a8,D_ as a9,j_ as aa,Hu as ab,tl as ac,fs as ad,el as ae,Ji as af,Wi as ag,Ke as ah,M1 as ai,Li as aj,q_ as ak,Kr as al,wt as am,Me as an,i_ as ao,Pe as ap,Gr as aq,ku as ar,z1 as as,P_ as at,R_ as au,Iu as av,rl as aw,s_ as ax,m1 as ay,Ii as az,Ku as b,Nw as c,ct as d,cw as e,Rc as f,Dt as g,gt as h,Hi as i,O_ as j,Se as k,ei as l,Hv as m,dw as n,bt as o,Bt as p,Yv as q,rE as r,f1 as s,fw as t,si as u,$_ as v,nr as w,ss as x,ht as y,Ac as z};
@@ -1 +1 @@
1
- var R=Object.defineProperty;var x=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var y=(a,e,t)=>e in a?R(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,w=(a,e)=>{for(var t in e||(e={}))T.call(e,t)&&y(a,t,e[t]);if(x)for(var t of x(e))H.call(e,t)&&y(a,t,e[t]);return a};var P=(a,e,t)=>new Promise((_,r)=>{var l=n=>{try{i(t.next(n))}catch(c){r(c)}},o=n=>{try{i(t.throw(n))}catch(c){r(c)}},i=n=>n.done?_(n.value):Promise.resolve(n.value).then(l,o);i((t=t.apply(a,e)).next())});import{useRoute as Q}from"./vue-router-5AKQpGpA.js";import{q as W}from"./@vueuse-CceCMEgA.js";import"./element-plus-CQpgC9_i.js";import"./vxe-N9ALOqba.js";import{c as C,P as X}from"./index-B_zphvit.js";import{n as b,t as I,Q as J,X as N}from"./index-CatsnIBd.js";import{E as U,a as E,n as v,l as V}from"./utils-CcFAXsq_.js";import{d as j,e as z,aB as S,f as D,c as G,o as K}from"./vue-CK7CG2oW.js";import{_ as L}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./lodash-es-BL-d_OSa.js";import"./@element-plus-icons-vue-CiUy_FB_.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";import"./monaco-editor-B8dwQNlP.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BSD1DCM1.js";const M=j({__name:"index",setup(a){return P(this,null,function*(){let e,t;const _=Q(),r=z(),l=new b(I(v)),o=([e,t]=S(()=>l.getExtension().catch(()=>null)),e=yield e,t(),e),i=J({loading:V,notify:v,useTitle:W,alert:E,access:o==null?void 0:o.access}),n=N(w({alert:E},o==null?void 0:o.__ACCESS__)),c=o?([e,t]=S(()=>new U(o).load()),e=yield e,t(),e):{},{__BASE_PATH__:f="/",history:A="hash",base:h="/",pageRouteName:B="page",remote:k}=o||{},q=()=>A==="hash",F=s=>s==="/"?"":(s.startsWith("/")&&(s=s.substring(1)),s.endsWith("/")||(s=s+"/"),s);C.set("Switcher",{props:{onClick:s=>{const u=s.platform==="uniapp",p=location.pathname;let m=p===`${f}__vtj__/`?f:p;const d=s.currentFile;if(d&&d.type==="page"&&s.homepage!==d.id){const g=`${F(h)}${u?"pages":B}/${d.id}`;m=q()?`${m}#/${g}`:`${m}${g}`}window.open(m,"VTJProject")}}}),C.set("Previewer",{props:{path:(s,u)=>{const p=location.pathname;return u.platform==="uniapp"?`${p}uni/#/pages/${s.id}`:`${p}#/preview/${s.id}`}}});const $=new X(w({container:r,service:l,materialPath:f,pageBasePath:h==="/"?"":h,adapter:i,access:n,remote:k},c));return $.ready(()=>{$.openFile(_.query.id)}),D(()=>_.query.id,s=>{$.openFile(s)}),(s,u)=>(K(),G("div",{class:"designer",ref_key:"container",ref:r},null,512))})}}),de=L(M,[["__scopeId","data-v-7c661cdc"]]);export{de as default};
1
+ var R=Object.defineProperty;var x=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var y=(a,e,t)=>e in a?R(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t,w=(a,e)=>{for(var t in e||(e={}))T.call(e,t)&&y(a,t,e[t]);if(x)for(var t of x(e))H.call(e,t)&&y(a,t,e[t]);return a};var P=(a,e,t)=>new Promise((_,r)=>{var l=n=>{try{i(t.next(n))}catch(c){r(c)}},o=n=>{try{i(t.throw(n))}catch(c){r(c)}},i=n=>n.done?_(n.value):Promise.resolve(n.value).then(l,o);i((t=t.apply(a,e)).next())});import{useRoute as Q}from"./vue-router-5AKQpGpA.js";import{q as W}from"./@vueuse-CceCMEgA.js";import"./element-plus-CQpgC9_i.js";import"./vxe-N9ALOqba.js";import{c as C,P as X}from"./index-7okJykr2.js";import{n as b,t as I,Q as J,X as N}from"./index-CVK55JqC.js";import{E as U,a as E,n as v,l as V}from"./utils-C2_Z0OAf.js";import{d as j,e as z,aB as S,f as D,c as G,o as K}from"./vue-CK7CG2oW.js";import{_ as L}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./lodash-es-BL-d_OSa.js";import"./@element-plus-icons-vue-CiUy_FB_.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";import"./monaco-editor-B8dwQNlP.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BSD1DCM1.js";const M=j({__name:"index",setup(a){return P(this,null,function*(){let e,t;const _=Q(),r=z(),l=new b(I(v)),o=([e,t]=S(()=>l.getExtension().catch(()=>null)),e=yield e,t(),e),i=J({loading:V,notify:v,useTitle:W,alert:E,access:o==null?void 0:o.access}),n=N(w({alert:E},o==null?void 0:o.__ACCESS__)),c=o?([e,t]=S(()=>new U(o).load()),e=yield e,t(),e):{},{__BASE_PATH__:f="/",history:A="hash",base:h="/",pageRouteName:B="page",remote:k}=o||{},q=()=>A==="hash",F=s=>s==="/"?"":(s.startsWith("/")&&(s=s.substring(1)),s.endsWith("/")||(s=s+"/"),s);C.set("Switcher",{props:{onClick:s=>{const u=s.platform==="uniapp",p=location.pathname;let m=p===`${f}__vtj__/`?f:p;const d=s.currentFile;if(d&&d.type==="page"&&s.homepage!==d.id){const g=`${F(h)}${u?"pages":B}/${d.id}`;m=q()?`${m}#/${g}`:`${m}${g}`}window.open(m,"VTJProject")}}}),C.set("Previewer",{props:{path:(s,u)=>{const p=location.pathname;return u.platform==="uniapp"?`${p}uni/#/pages/${s.id}`:`${p}#/preview/${s.id}`}}});const $=new X(w({container:r,service:l,materialPath:f,pageBasePath:h==="/"?"":h,adapter:i,access:n,remote:k},c));return $.ready(()=>{$.openFile(_.query.id)}),D(()=>_.query.id,s=>{$.openFile(s)}),(s,u)=>(K(),G("div",{class:"designer",ref_key:"container",ref:r},null,512))})}}),de=L(M,[["__scopeId","data-v-7c661cdc"]]);export{de as default};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-5AKQpGpA.js","./vue-CK7CG2oW.js"])))=>i.map(i=>d[i]);
2
- var w=Object.defineProperty;var y=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var E=(o,t,e)=>t in o?w(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,d=(o,t)=>{for(var e in t||(t={}))x.call(t,e)&&E(o,e,t[e]);if(y)for(var e of y(t))B.call(t,e)&&E(o,e,t[e]);return o};var l=(o,t,e)=>new Promise((i,r)=>{var m=a=>{try{n(e.next(a))}catch(p){r(p)}},c=a=>{try{n(e.throw(a))}catch(p){r(p)}},n=a=>a.done?i(a.value):Promise.resolve(a.value).then(m,c);n((e=e.apply(o,t)).next())});import{_ as C}from"./monaco-editor-B8dwQNlP.js";import{useRoute as P}from"./vue-router-5AKQpGpA.js";import"./element-plus-CQpgC9_i.js";import"./vxe-N9ALOqba.js";import{B as g}from"./index-B_zphvit.js";import{n as A,t as V,Q as T,e as k,y as D,G as I}from"./index-CatsnIBd.js";import{n as R,a as O,l as G,E as L}from"./utils-CcFAXsq_.js";import{q as Q}from"./@vueuse-CceCMEgA.js";import{d as S,aB as h,e as q,K as z,O as H,P as K,o as N,h as b}from"./vue-CK7CG2oW.js";import"./lodash-es-BL-d_OSa.js";import"./@element-plus-icons-vue-CiUy_FB_.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BSD1DCM1.js";const nt=S({__name:"page",setup(o){return l(this,null,function*(){let t,e;const i=new A(V(R)),r=([t,e]=h(()=>i.getExtension().catch(()=>null)),t=yield t,e(),t),m=T({loading:G,notify:R,useTitle:Q,alert:O,access:r==null?void 0:r.access}),c=r?([t,e]=h(()=>new L(r).load()),t=yield t,e(),t):{},{__BASE_PATH__:n="/"}=r||{},{provider:a,onReady:p}=k({mode:D.Runtime,service:i,materialPath:n,adapter:d(d({},m),c.adapter),dependencies:{Vue:()=>C(()=>import("./vue-CK7CG2oW.js").then(s=>s.az),[],import.meta.url),VueRouter:()=>C(()=>import("./vue-router-5AKQpGpA.js"),__vite__mapDeps([0,1]),import.meta.url)}}),f=P(),_=q(),u=b();return p(()=>l(this,null,function*(){const s=u==null?void 0:u.appContext.app;s&&(s.use(g),s.use(a),_.value=yield a.getRenderComponent(f.params.id.toString(),v=>{I(s,f,v)}))})),(s,v)=>_.value?(N(),z(K(_.value),{key:0})):H("",!0)})}});export{nt as default};
2
+ var w=Object.defineProperty;var y=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var E=(o,t,e)=>t in o?w(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,d=(o,t)=>{for(var e in t||(t={}))x.call(t,e)&&E(o,e,t[e]);if(y)for(var e of y(t))B.call(t,e)&&E(o,e,t[e]);return o};var l=(o,t,e)=>new Promise((i,r)=>{var m=a=>{try{n(e.next(a))}catch(p){r(p)}},c=a=>{try{n(e.throw(a))}catch(p){r(p)}},n=a=>a.done?i(a.value):Promise.resolve(a.value).then(m,c);n((e=e.apply(o,t)).next())});import{_ as C}from"./monaco-editor-B8dwQNlP.js";import{useRoute as P}from"./vue-router-5AKQpGpA.js";import"./element-plus-CQpgC9_i.js";import"./vxe-N9ALOqba.js";import{B as g}from"./index-7okJykr2.js";import{n as A,t as V,Q as T,e as k,y as D,G as I}from"./index-CVK55JqC.js";import{n as R,a as O,l as G,E as L}from"./utils-C2_Z0OAf.js";import{q as Q}from"./@vueuse-CceCMEgA.js";import{d as S,aB as h,e as q,K as z,O as H,P as K,o as N,h as b}from"./vue-CK7CG2oW.js";import"./lodash-es-BL-d_OSa.js";import"./@element-plus-icons-vue-CiUy_FB_.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BSD1DCM1.js";const nt=S({__name:"page",setup(o){return l(this,null,function*(){let t,e;const i=new A(V(R)),r=([t,e]=h(()=>i.getExtension().catch(()=>null)),t=yield t,e(),t),m=T({loading:G,notify:R,useTitle:Q,alert:O,access:r==null?void 0:r.access}),c=r?([t,e]=h(()=>new L(r).load()),t=yield t,e(),t):{},{__BASE_PATH__:n="/"}=r||{},{provider:a,onReady:p}=k({mode:D.Runtime,service:i,materialPath:n,adapter:d(d({},m),c.adapter),dependencies:{Vue:()=>C(()=>import("./vue-CK7CG2oW.js").then(s=>s.az),[],import.meta.url),VueRouter:()=>C(()=>import("./vue-router-5AKQpGpA.js"),__vite__mapDeps([0,1]),import.meta.url)}}),f=P(),_=q(),u=b();return p(()=>l(this,null,function*(){const s=u==null?void 0:u.appContext.app;s&&(s.use(g),s.use(a),_.value=yield a.getRenderComponent(f.params.id.toString(),v=>{I(s,f,v)}))})),(s,v)=>_.value?(N(),z(K(_.value),{key:0})):H("",!0)})}});export{nt as default};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-5AKQpGpA.js","./vue-CK7CG2oW.js"])))=>i.map(i=>d[i]);
2
- var h=Object.defineProperty;var y=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var E=(o,t,e)=>t in o?h(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,d=(o,t)=>{for(var e in t||(t={}))x.call(t,e)&&E(o,e,t[e]);if(y)for(var e of y(t))B.call(t,e)&&E(o,e,t[e]);return o};var l=(o,t,e)=>new Promise((p,r)=>{var m=a=>{try{n(e.next(a))}catch(i){r(i)}},c=a=>{try{n(e.throw(a))}catch(i){r(i)}},n=a=>a.done?p(a.value):Promise.resolve(a.value).then(m,c);n((e=e.apply(o,t)).next())});import{_ as w}from"./monaco-editor-B8dwQNlP.js";import{useRoute as P}from"./vue-router-5AKQpGpA.js";import"./element-plus-CQpgC9_i.js";import"./vxe-N9ALOqba.js";import{B as A}from"./index-B_zphvit.js";import{n as V,t as g,Q as T,e as k,y as D,G as I}from"./index-CatsnIBd.js";import{n as C,a as O,l as G,E as L}from"./utils-CcFAXsq_.js";import{q as Q}from"./@vueuse-CceCMEgA.js";import{d as S,aB as R,e as q,K as z,O as H,P as K,o as N,h as b}from"./vue-CK7CG2oW.js";import"./lodash-es-BL-d_OSa.js";import"./@element-plus-icons-vue-CiUy_FB_.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BSD1DCM1.js";const nt=S({__name:"preview",setup(o){return l(this,null,function*(){let t,e;const p=new V(g(C)),r=([t,e]=R(()=>p.getExtension().catch(()=>null)),t=yield t,e(),t),m=T({loading:G,notify:C,useTitle:Q,alert:O,access:r==null?void 0:r.access}),c=r?([t,e]=R(()=>new L(r).load()),t=yield t,e(),t):{},{__BASE_PATH__:n="/"}=r||{},{provider:a,onReady:i}=k({mode:D.Runtime,service:p,materialPath:n,adapter:d(d({},m),c.adapter),dependencies:{Vue:()=>w(()=>import("./vue-CK7CG2oW.js").then(s=>s.az),[],import.meta.url),VueRouter:()=>w(()=>import("./vue-router-5AKQpGpA.js"),__vite__mapDeps([0,1]),import.meta.url)}}),f=P(),_=q(),u=b();return i(()=>l(this,null,function*(){const s=u==null?void 0:u.appContext.app;s&&(s.use(A),s.use(a),_.value=yield a.getRenderComponent(f.params.id.toString(),v=>{I(s,f,v)}))})),(s,v)=>_.value?(N(),z(K(_.value),{key:0})):H("",!0)})}});export{nt as default};
2
+ var h=Object.defineProperty;var y=Object.getOwnPropertySymbols;var x=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var E=(o,t,e)=>t in o?h(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,d=(o,t)=>{for(var e in t||(t={}))x.call(t,e)&&E(o,e,t[e]);if(y)for(var e of y(t))B.call(t,e)&&E(o,e,t[e]);return o};var l=(o,t,e)=>new Promise((p,r)=>{var m=a=>{try{n(e.next(a))}catch(i){r(i)}},c=a=>{try{n(e.throw(a))}catch(i){r(i)}},n=a=>a.done?p(a.value):Promise.resolve(a.value).then(m,c);n((e=e.apply(o,t)).next())});import{_ as w}from"./monaco-editor-B8dwQNlP.js";import{useRoute as P}from"./vue-router-5AKQpGpA.js";import"./element-plus-CQpgC9_i.js";import"./vxe-N9ALOqba.js";import{B as A}from"./index-7okJykr2.js";import{n as V,t as g,Q as T,e as k,y as D,G as I}from"./index-CVK55JqC.js";import{n as C,a as O,l as G,E as L}from"./utils-C2_Z0OAf.js";import{q as Q}from"./@vueuse-CceCMEgA.js";import{d as S,aB as R,e as q,K as z,O as H,P as K,o as N,h as b}from"./vue-CK7CG2oW.js";import"./lodash-es-BL-d_OSa.js";import"./@element-plus-icons-vue-CiUy_FB_.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-BSD1DCM1.js";const nt=S({__name:"preview",setup(o){return l(this,null,function*(){let t,e;const p=new V(g(C)),r=([t,e]=R(()=>p.getExtension().catch(()=>null)),t=yield t,e(),t),m=T({loading:G,notify:C,useTitle:Q,alert:O,access:r==null?void 0:r.access}),c=r?([t,e]=R(()=>new L(r).load()),t=yield t,e(),t):{},{__BASE_PATH__:n="/"}=r||{},{provider:a,onReady:i}=k({mode:D.Runtime,service:p,materialPath:n,adapter:d(d({},m),c.adapter),dependencies:{Vue:()=>w(()=>import("./vue-CK7CG2oW.js").then(s=>s.az),[],import.meta.url),VueRouter:()=>w(()=>import("./vue-router-5AKQpGpA.js"),__vite__mapDeps([0,1]),import.meta.url)}}),f=P(),_=q(),u=b();return i(()=>l(this,null,function*(){const s=u==null?void 0:u.appContext.app;s&&(s.use(A),s.use(a),_.value=yield a.getRenderComponent(f.params.id.toString(),v=>{I(s,f,v)}))})),(s,v)=>_.value?(N(),z(K(_.value),{key:0})):H("",!0)})}});export{nt as default};
@@ -1 +1 @@
1
- var b=Object.defineProperty;var m=Object.getOwnPropertySymbols;var g=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable;var f=(r,s,t)=>s in r?b(r,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[s]=t,_=(r,s)=>{for(var t in s||(s={}))g.call(s,t)&&f(r,t,s[t]);if(m)for(var t of m(s))d.call(s,t)&&f(r,t,s[t]);return r};var c=(r,s,t)=>f(r,typeof s!="symbol"?s+"":s,t);var p=(r,s,t)=>new Promise((n,o)=>{var a=i=>{try{e(t.next(i))}catch(l){o(l)}},u=i=>{try{e(t.throw(i))}catch(l){o(l)}},e=i=>i.done?n(i.value):Promise.resolve(i.value).then(a,u);e((t=t.apply(r,s)).next())});import{az as E}from"./vue-CK7CG2oW.js";import{V as y,r as A,c as V,a as P,Z as x,Y as B,b as T}from"./index-CatsnIBd.js";import{V as j,a as w,d as H}from"./index-B_zphvit.js";import{a as S,b as $,c as k,d as v}from"./element-plus-CQpgC9_i.js";class z{constructor(s){c(this,"urls",[]);c(this,"library","");c(this,"params",[]);c(this,"__BASE_PATH__","/");this.config=s;const t=_(_(_({},V),H),A),n={Vue:E,__VTJ_PRO__:t,VtjUtils:y,VtjIcons:w,VtjUI:j,ElementPlus:S};for(const[l,h]of Object.entries(n))window[l]=h;const{extension:o,__BASE_PATH__:a="/"}=s||{},{urls:u=[],library:e,params:i=[]}=o||{};this.urls=u,this.library=e,this.params=i,this.__BASE_PATH__=a}load(){return p(this,null,function*(){let s={};if(this.library){const t=this.__BASE_PATH__,n=this.urls.filter(a=>P(a)).map(a=>`${t}${a}`),o=this.urls.filter(a=>x(a)).map(a=>`${t}${a}`);if(B(n),o.length){const a=yield T(o,this.library).catch(()=>null);a&&typeof a=="function"?s=a.call(a,this.config,...this.params):s=a||{}}}return s})}}function J(){return v.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"})}function M(r,s="",t="warning"){k({title:s,message:r,type:t})}function N(r,s){return $.alert(r,s)}export{z as E,N as a,J as l,M as n};
1
+ var b=Object.defineProperty;var m=Object.getOwnPropertySymbols;var g=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable;var f=(r,s,t)=>s in r?b(r,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[s]=t,_=(r,s)=>{for(var t in s||(s={}))g.call(s,t)&&f(r,t,s[t]);if(m)for(var t of m(s))d.call(s,t)&&f(r,t,s[t]);return r};var c=(r,s,t)=>f(r,typeof s!="symbol"?s+"":s,t);var p=(r,s,t)=>new Promise((n,o)=>{var a=i=>{try{e(t.next(i))}catch(l){o(l)}},u=i=>{try{e(t.throw(i))}catch(l){o(l)}},e=i=>i.done?n(i.value):Promise.resolve(i.value).then(a,u);e((t=t.apply(r,s)).next())});import{az as E}from"./vue-CK7CG2oW.js";import{V as y,r as A,c as V,a as P,Z as x,Y as B,b as T}from"./index-CVK55JqC.js";import{V as j,a as w,d as H}from"./index-7okJykr2.js";import{a as S,b as $,c as k,d as v}from"./element-plus-CQpgC9_i.js";class z{constructor(s){c(this,"urls",[]);c(this,"library","");c(this,"params",[]);c(this,"__BASE_PATH__","/");this.config=s;const t=_(_(_({},V),H),A),n={Vue:E,__VTJ_PRO__:t,VtjUtils:y,VtjIcons:w,VtjUI:j,ElementPlus:S};for(const[l,h]of Object.entries(n))window[l]=h;const{extension:o,__BASE_PATH__:a="/"}=s||{},{urls:u=[],library:e,params:i=[]}=o||{};this.urls=u,this.library=e,this.params=i,this.__BASE_PATH__=a}load(){return p(this,null,function*(){let s={};if(this.library){const t=this.__BASE_PATH__,n=this.urls.filter(a=>P(a)).map(a=>`${t}${a}`),o=this.urls.filter(a=>x(a)).map(a=>`${t}${a}`);if(B(n),o.length){const a=yield T(o,this.library).catch(()=>null);a&&typeof a=="function"?s=a.call(a,this.config,...this.params):s=a||{}}}return s})}}function J(){return v.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"})}function M(r,s="",t="warning"){k({title:s,message:r,type:t})}function N(r,s){return $.alert(r,s)}export{z as E,N as a,J as l,M as n};
package/dist/index.html CHANGED
@@ -9,7 +9,7 @@
9
9
  <meta http-equiv="Expires" content="0"/>
10
10
  <title>低代码设计器 - VTJ.PRO</title>
11
11
  <script>
12
- var __BUILD_TIME__ = '1742262219982';
12
+ var __BUILD_TIME__ = '1742272601631';
13
13
  (function () {
14
14
  const regex = /<!--{{(\d*)}}-->/;
15
15
  window.fetch('?t=' + Date.now()).then(async (res) => {
@@ -25,9 +25,9 @@
25
25
  });
26
26
  })();
27
27
  </script>
28
- <!--{{1742262219982}}-->
28
+ <!--{{1742272601631}}-->
29
29
 
30
- <script type="module" crossorigin src="./assets/index-CatsnIBd.js"></script>
30
+ <script type="module" crossorigin src="./assets/index-CVK55JqC.js"></script>
31
31
  <link rel="modulepreload" crossorigin href="./assets/vue-CK7CG2oW.js">
32
32
  <link rel="modulepreload" crossorigin href="./assets/vue-router-5AKQpGpA.js">
33
33
  <link rel="modulepreload" crossorigin href="./assets/lodash-es-BL-d_OSa.js">