@vtj/pro 0.10.0 → 0.10.1-alpha.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.
- package/dist/@vtj/materials/assets/antdv/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/charts/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/element/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/ui/index.umd.js +2 -2
- package/dist/@vtj/materials/assets/uni-h5/index.umd.js +3 -3
- package/dist/@vtj/materials/assets/uni-ui/index.umd.js +7 -0
- package/dist/@vtj/materials/assets/vant/index.umd.js +5 -5
- package/dist/@vtj/materials/deps/@vtj/charts/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/icons/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/ui/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/@vtj/uni/index.umd.js +3 -3
- package/dist/@vtj/materials/deps/@vtj/utils/index.umd.js +2 -2
- package/dist/@vtj/materials/deps/uni-ui/index.umd.js +1 -0
- package/dist/@vtj/materials/deps/uni-ui/style.css +1 -0
- package/dist/assets/{auth-BGXpoaj0.js → auth-Dm4VSrWL.js} +1 -1
- package/dist/assets/extension-BdA8H1Cf.js +167 -0
- package/dist/assets/{index-Cpqt6Feh.js → index-CjCB3fdP.js} +1 -1
- package/dist/assets/{index-BWm5uHJM.js → index-D_jXIdCI.js} +17 -14
- package/dist/assets/{page-CQqoEMgm.js → page-Ds_VZDL0.js} +1 -1
- package/dist/assets/{preview-CzAOOAIK.js → preview-D0HVXEab.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/uni/assets/{index-BRO0nyGw.js → index-CMOAndcI.js} +37 -34
- package/dist/uni/index.html +1 -1
- package/package.json +11 -11
- package/src/vtj/materials/@vtj/pro.json +12 -11100
- package/src/vtj/projects/@vtj/pro.json +4 -122
- package/dist/assets/extension-DFMcLxog.js +0 -167
- package/src/App.vue +0 -2
- package/src/manifest.json +0 -72
- package/src/vtj/files/45t8zpljt.json +0 -28
- package/src/vtj/files/45t98u7le.json +0 -19
- package/src/vtj/histories/45t8zpljt/45t8zrek0.json +0 -28
- package/src/vtj/histories/45t8zpljt/45t90beoh.json +0 -28
- package/src/vtj/histories/45t8zpljt/45t90fn02.json +0 -28
- package/src/vtj/histories/45t8zpljt/45t923wpf.json +0 -32
- package/src/vtj/histories/45t8zpljt/7pf6pkqbb.json +0 -28
- package/src/vtj/histories/45t8zpljt/7pf6rxqsj.json +0 -32
- package/src/vtj/histories/45t8zpljt/b914fe2oe.json +0 -28
- package/src/vtj/histories/45t8zpljt/b914g2z9c.json +0 -40
- package/src/vtj/histories/45t8zpljt/esn260aw6.json +0 -28
- package/src/vtj/histories/45t8zpljt.json +0 -41
|
@@ -1 +1 @@
|
|
|
1
|
-
var F=Object.defineProperty,I=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var E=(o,e,t)=>e in o?F(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,w=(o,e)=>{for(var t in e||(e={}))O.call(e,t)&&E(o,t,e[t]);if(y)for(var t of y(e))q.call(e,t)&&E(o,t,e[t]);return o},v=(o,e)=>I(o,N(e));var P=(o,e,t)=>new Promise((u,i)=>{var m=n=>{try{r(t.next(n))}catch(a){i(a)}},l=n=>{try{r(t.throw(n))}catch(a){i(a)}},r=n=>n.done?u(n.value):Promise.resolve(n.value).then(m,l);r((t=t.apply(o,e)).next())});import{useRoute as D}from"./vue-router-D8EXeL0F.js";import{I as K,N as W,H as j,T as G,A as J}from"./index-
|
|
1
|
+
var F=Object.defineProperty,I=Object.defineProperties;var N=Object.getOwnPropertyDescriptors;var y=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var E=(o,e,t)=>e in o?F(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,w=(o,e)=>{for(var t in e||(e={}))O.call(e,t)&&E(o,t,e[t]);if(y)for(var t of y(e))q.call(e,t)&&E(o,t,e[t]);return o},v=(o,e)=>I(o,N(e));var P=(o,e,t)=>new Promise((u,i)=>{var m=n=>{try{r(t.next(n))}catch(a){i(a)}},l=n=>{try{r(t.throw(n))}catch(a){i(a)}},r=n=>n.done?u(n.value):Promise.resolve(n.value).then(m,l);r((t=t.apply(o,e)).next())});import{useRoute as D}from"./vue-router-D8EXeL0F.js";import{I as K,N as W,H as j,T as G,A as J}from"./index-D_jXIdCI.js";import{a as M}from"./element-plus-DQ6lwucB.js";import"./vxe-DAcKvQ6r.js";import{u as A,D as U,E as V}from"./extension-BdA8H1Cf.js";import{n as B,l as Y}from"./utils-QKipar_R.js";import{d as z,e as L,aB as C,f as Q,c as X,o as Z}from"./vue-DnfbZNhx.js";import{_ as ee}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./mockjs-DPQI6pPj.js";import"./dayjs-DO-COJPZ.js";import"./monaco-editor-BfuwkNVi.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-PLVskUkm.js";import"./@element-plus-icons-vue-CKT2Xck5.js";import"./shared-CFJLz5mK.js";import"./html2canvas-CIV5arX1.js";const te=z({__name:"index",setup(o){return P(this,null,function*(){let e,t;const u=K({loading:Y,notify:B}),i=D(),m=L(),l=new W(j(B)),r=([e,t]=C(()=>l.getExtension().catch(()=>null)),e=yield e,t(),e),{options:n,adapters:a}=r?([e,t]=C(()=>new V(r).load()),e=yield e,t(),e):{},{__BASE_PATH__:d="/",history:S="hash",base:g="/",pageRouteName:T="page"}=r||{},$=a==null?void 0:a.access,b=a==null?void 0:a.remote,H=$?new G(w({alert:M.alert,storageKey:J},$)):void 0,R=()=>S==="hash",k=s=>s==="/"?"":(s.startsWith("/")&&(s=s.substring(1)),s.endsWith("/")||(s=s+"/"),s);A.set("Switcher",{props:{onClick:s=>{const _=s.platform==="uniapp",c=location.pathname;let p=c===`${d}__vtj__/`?d:c;const f=s.currentFile;if(f&&f.type==="page"&&s.homepage!==f.id){const x=`${k(g)}${_?"pages":T}/${f.id}`;p=R()?`${p}#/${x}`:`${p}${x}`}window.open(p,"VTJProject")}}}),A.set("Previewer",{props:{path:(s,_)=>{const c=location.pathname;return _.platform==="uniapp"?`${c}uni/#/pages/${s.id}`:`${c}#/preview/${s.id}`}}});const h=new U(v(w({container:m,service:l,materialPath:d,pageBasePath:g==="/"?"":g},n),{adapter:Object.assign(u,{access:H,remote:b},(n==null?void 0:n.adapter)||{})}));return h.ready(()=>{h.openFile(i.query.id)}),Q(()=>i.query.id,s=>{h.openFile(s)}),(s,_)=>(Z(),X("div",{class:"designer",ref_key:"container",ref:m},null,512))})}}),$e=ee(te,[["__scopeId","data-v-fbbd9127"]]);export{$e as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CjCB3fdP.js","./vue-router-D8EXeL0F.js","./vue-DnfbZNhx.js","./element-plus-DQ6lwucB.js","./lodash-es-BL-d_OSa.js","./@vueuse-PLVskUkm.js","./@element-plus-icons-vue-CKT2Xck5.js","./shared-CFJLz5mK.js","./dayjs-DO-COJPZ.js","./element-plus-l5LgIwv6.css","./vxe-DAcKvQ6r.js","./vxe-BAb1d5vW.css","./extension-BdA8H1Cf.js","./monaco-editor-BfuwkNVi.js","./monaco-editor-Cpw7ccEV.css","./html2canvas-CIV5arX1.js","./mockjs-DPQI6pPj.js","./extension-Al38NjBF.css","./utils-QKipar_R.js","./_plugin-vue_export-helper-DlAUqK2U.js","./index-qxxdDj8s.css","./preview-D0HVXEab.js","./page-Ds_VZDL0.js","./uni-page-Bjgk97mC.js","./uni-page-Diqmj53r.css","./auth-Dm4VSrWL.js","./auth-rAe8S_7e.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
var xl=Object.defineProperty,Tl=Object.defineProperties;var $l=Object.getOwnPropertyDescriptors;var yr=Object.getOwnPropertySymbols;var ws=Object.prototype.hasOwnProperty,Es=Object.prototype.propertyIsEnumerable;var ge=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Ol=e=>{throw TypeError(e)};var Tn=(e,t,r)=>t in e?xl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z=(e,t)=>{for(var r in t||(t={}))ws.call(t,r)&&Tn(e,r,t[r]);if(yr)for(var r of yr(t))Es.call(t,r)&&Tn(e,r,t[r]);return e},st=(e,t)=>Tl(e,$l(t));var $n=(e,t)=>{var r={};for(var n in e)ws.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&yr)for(var n of yr(e))t.indexOf(n)<0&&Es.call(e,n)&&(r[n]=e[n]);return r};var A=(e,t,r)=>Tn(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},On=(e,t,r)=>{var n=(o,a,u,c)=>{try{var l=r[o](a),f=(a=l.value)instanceof Gt,h=l.done;Promise.resolve(f?a[0]:a).then(p=>f?n(o==="return"?o:"next",a[1]?{done:p.done,value:p.value}:p,u,c):u({value:p,done:h})).catch(p=>n("throw",p,u,c))}catch(p){c(p)}},i=o=>s[o]=a=>new Promise((u,c)=>n(o,a,u,c)),s={};return r=r.apply(e,t),s[ge("asyncIterator")]=()=>s,i("next"),i("throw"),i("return"),s},An=e=>{var t=e[ge("asyncIterator")],r=!1,n,i={};return t==null?(t=e[ge("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||Ol("Object expected"),a(u)}),1)}}),i[ge("iterator")]=()=>i,n("next"),"throw"in t?n("throw"):i.throw=s=>{throw s},"return"in t&&n("return"),i},Ss=(e,t,r)=>(t=e[ge("asyncIterator")])?t.call(e):(e=e[ge("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 en,ay as rn,az as xs,c as Al,o as Yn,a as Zt,R as jn,v as Xo,e as er,w as jl,ah as Gn,f as ta,p as Rl,r as Dl,j as Cl,k as ea,m as Ci,Z as Pl,g as kl,b as Nl,h as ra,i as Bl,K as Ts,u as $s,ai as Il,L as Os,aA as Ml,T as Fl,av as Ll}from"./vue-DnfbZNhx.js";import{c as ce}from"./mockjs-DPQI6pPj.js";import{useRoute as na,createRouter as Vl,createWebHashHistory as Hl}from"./vue-router-D8EXeL0F.js";import{z as Ul,E as zl}from"./element-plus-DQ6lwucB.js";import{_ as He}from"./monaco-editor-BfuwkNVi.js";import"./dayjs-DO-COJPZ.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-PLVskUkm.js";import"./@element-plus-icons-vue-CKT2Xck5.js";import"./shared-CFJLz5mK.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 ql={ENV_TYPE:"live",NODE_ENV:"production"},Kl=typeof global=="object"&&global&&global.Object===Object&&global;const ia=Kl;var Jl=typeof self=="object"&&self&&self.Object===Object&&self,Wl=ia||Jl||Function("return this")();const At=Wl;var Yl=At.Symbol;const Ct=Yl;var sa=Object.prototype,Gl=sa.hasOwnProperty,Zl=sa.toString,Ue=Ct?Ct.toStringTag:void 0;function Ql(e){var t=Gl.call(e,Ue),r=e[Ue];try{e[Ue]=void 0;var n=!0}catch(s){}var i=Zl.call(e);return n&&(t?e[Ue]=r:delete e[Ue]),i}var Xl=Object.prototype,tf=Xl.toString;function ef(e){return tf.call(e)}var rf="[object Null]",nf="[object Undefined]",As=Ct?Ct.toStringTag:void 0;function Et(e){return e==null?e===void 0?nf:rf:As&&As in Object(e)?Ql(e):ef(e)}function at(e){return e!=null&&typeof e=="object"}var sf="[object Symbol]";function lr(e){return typeof e=="symbol"||at(e)&&Et(e)==sf}function oa(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 of=Array.isArray;const pt=of;var js=Ct?Ct.prototype:void 0,Rs=js?js.toString:void 0;function aa(e){if(typeof e=="string")return e;if(pt(e))return oa(e,aa)+"";if(lr(e))return Rs?Rs.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var af=/\s/;function cf(e){for(var t=e.length;t--&&af.test(e.charAt(t)););return t}var uf=/^\s+/;function lf(e){return e&&e.slice(0,cf(e)+1).replace(uf,"")}function ct(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ds=NaN,ff=/^[-+]0x[0-9a-f]+$/i,hf=/^0b[01]+$/i,pf=/^0o[0-7]+$/i,df=parseInt;function Cs(e){if(typeof e=="number")return e;if(lr(e))return Ds;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=lf(e);var r=hf.test(e);return r||pf.test(e)?df(e.slice(2),r?2:8):ff.test(e)?Ds:+e}function Pi(e){return e}var mf="[object AsyncFunction]",gf="[object Function]",vf="[object GeneratorFunction]",yf="[object Proxy]";function ue(e){if(!ct(e))return!1;var t=Et(e);return t==gf||t==vf||t==mf||t==yf}var bf=At["__core-js_shared__"];const Rn=bf;var Ps=function(){var e=/[^.]+$/.exec(Rn&&Rn.keys&&Rn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function _f(e){return!!Ps&&Ps in e}var wf=Function.prototype,Ef=wf.toString;function he(e){if(e!=null){try{return Ef.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Sf=/[\\^$.*+?()[\]{}|]/g,xf=/^\[object .+?Constructor\]$/,Tf=Function.prototype,$f=Object.prototype,Of=Tf.toString,Af=$f.hasOwnProperty,jf=RegExp("^"+Of.call(Af).replace(Sf,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Rf(e){if(!ct(e)||_f(e))return!1;var t=ue(e)?jf:xf;return t.test(he(e))}function Df(e,t){return e==null?void 0:e[t]}function pe(e,t){var r=Df(e,t);return Rf(r)?r:void 0}var Cf=pe(At,"WeakMap");const Zn=Cf;var ks=Object.create,Pf=function(){function e(){}return function(t){if(!ct(t))return{};if(ks)return ks(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();const kf=Pf;function ca(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 Nf(){}function Bf(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var If=800,Mf=16,Ff=Date.now;function Lf(e){var t=0,r=0;return function(){var n=Ff(),i=Mf-(n-r);if(r=n,i>0){if(++t>=If)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Vf(e){return function(){return e}}var Hf=function(){try{var e=pe(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();const zr=Hf;var Uf=zr?function(e,t){return zr(e,"toString",{configurable:!0,enumerable:!1,value:Vf(t),writable:!0})}:Pi;const zf=Uf;var qf=Lf(zf);const Kf=qf;function Jf(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Wf=9007199254740991,Yf=/^(?:0|[1-9]\d*)$/;function nn(e,t){var r=typeof e;return t=t!=null?t:Wf,!!t&&(r=="number"||r!="symbol"&&Yf.test(e))&&e>-1&&e%1==0&&e<t}function sn(e,t,r){t=="__proto__"&&zr?zr(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 Gf=Object.prototype,Zf=Gf.hasOwnProperty;function ki(e,t,r){var n=e[t];(!(Zf.call(e,t)&&Ne(n,r))||r===void 0&&!(t in e))&&sn(e,t,r)}function ua(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?sn(r,a,u):ki(r,a,u)}return r}var Ns=Math.max;function Qf(e,t,r){return t=Ns(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=Ns(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),ca(e,this,a)}}function la(e,t){return Kf(Qf(e,t,Pi),e+"")}var Xf=9007199254740991;function Ni(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Xf}function fr(e){return e!=null&&Ni(e.length)&&!ue(e)}function fa(e,t,r){if(!ct(r))return!1;var n=typeof t;return(n=="number"?fr(r)&&nn(t,r.length):n=="string"&&t in r)?Ne(r[t],e):!1}function ha(e){return la(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&&fa(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 th=Object.prototype;function Bi(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||th;return e===r}function eh(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var rh="[object Arguments]";function Bs(e){return at(e)&&Et(e)==rh}var pa=Object.prototype,nh=pa.hasOwnProperty,ih=pa.propertyIsEnumerable,sh=Bs(function(){return arguments}())?Bs:function(e){return at(e)&&nh.call(e,"callee")&&!ih.call(e,"callee")};const qr=sh;function oh(){return!1}var da=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Is=da&&typeof module=="object"&&module&&!module.nodeType&&module,ah=Is&&Is.exports===da,Ms=ah?At.Buffer:void 0,ch=Ms?Ms.isBuffer:void 0,uh=ch||oh;const Re=uh;var lh="[object Arguments]",fh="[object Array]",hh="[object Boolean]",ph="[object Date]",dh="[object Error]",mh="[object Function]",gh="[object Map]",vh="[object Number]",yh="[object Object]",bh="[object RegExp]",_h="[object Set]",wh="[object String]",Eh="[object WeakMap]",Sh="[object ArrayBuffer]",xh="[object DataView]",Th="[object Float32Array]",$h="[object Float64Array]",Oh="[object Int8Array]",Ah="[object Int16Array]",jh="[object Int32Array]",Rh="[object Uint8Array]",Dh="[object Uint8ClampedArray]",Ch="[object Uint16Array]",Ph="[object Uint32Array]",X={};X[Th]=X[$h]=X[Oh]=X[Ah]=X[jh]=X[Rh]=X[Dh]=X[Ch]=X[Ph]=!0,X[lh]=X[fh]=X[Sh]=X[hh]=X[xh]=X[ph]=X[dh]=X[mh]=X[gh]=X[vh]=X[yh]=X[bh]=X[_h]=X[wh]=X[Eh]=!1;function kh(e){return at(e)&&Ni(e.length)&&!!X[Et(e)]}function hr(e){return function(t){return e(t)}}var ma=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ze=ma&&typeof module=="object"&&module&&!module.nodeType&&module,Nh=Ze&&Ze.exports===ma,Dn=Nh&&ia.process,Bh=function(){try{var e=Ze&&Ze.require&&Ze.require("util").types;return e||Dn&&Dn.binding&&Dn.binding("util")}catch(t){}}();const Pt=Bh;var Fs=Pt&&Pt.isTypedArray,Ih=Fs?hr(Fs):kh;const Ii=Ih;var Mh=Object.prototype,Fh=Mh.hasOwnProperty;function ga(e,t){var r=pt(e),n=!r&&qr(e),i=!r&&!n&&Re(e),s=!r&&!n&&!i&&Ii(e),o=r||n||i||s,a=o?eh(e.length,String):[],u=a.length;for(var c in e)(t||Fh.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||nn(c,u)))&&a.push(c);return a}function va(e,t){return function(r){return e(t(r))}}var Lh=va(Object.keys,Object);const Vh=Lh;var Hh=Object.prototype,Uh=Hh.hasOwnProperty;function zh(e){if(!Bi(e))return Vh(e);var t=[];for(var r in Object(e))Uh.call(e,r)&&r!="constructor"&&t.push(r);return t}function on(e){return fr(e)?ga(e):zh(e)}function qh(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Kh=Object.prototype,Jh=Kh.hasOwnProperty;function Wh(e){if(!ct(e))return qh(e);var t=Bi(e),r=[];for(var n in e)n=="constructor"&&(t||!Jh.call(e,n))||r.push(n);return r}function Mi(e){return fr(e)?ga(e,!0):Wh(e)}var Yh=ha(function(e,t,r,n){ua(t,Mi(t),e,n)});const Ls=Yh;var Gh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zh=/^\w*$/;function Fi(e,t){if(pt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||lr(e)?!0:Zh.test(e)||!Gh.test(e)||t!=null&&e in Object(t)}var Qh=pe(Object,"create");const rr=Qh;function Xh(){this.__data__=rr?rr(null):{},this.size=0}function tp(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ep="__lodash_hash_undefined__",rp=Object.prototype,np=rp.hasOwnProperty;function ip(e){var t=this.__data__;if(rr){var r=t[e];return r===ep?void 0:r}return np.call(t,e)?t[e]:void 0}var sp=Object.prototype,op=sp.hasOwnProperty;function ap(e){var t=this.__data__;return rr?t[e]!==void 0:op.call(t,e)}var cp="__lodash_hash_undefined__";function up(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=rr&&t===void 0?cp:t,this}function ee(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])}}ee.prototype.clear=Xh,ee.prototype.delete=tp,ee.prototype.get=ip,ee.prototype.has=ap,ee.prototype.set=up;function lp(){this.__data__=[],this.size=0}function an(e,t){for(var r=e.length;r--;)if(Ne(e[r][0],t))return r;return-1}var fp=Array.prototype,hp=fp.splice;function pp(e){var t=this.__data__,r=an(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():hp.call(t,r,1),--this.size,!0}function dp(e){var t=this.__data__,r=an(t,e);return r<0?void 0:t[r][1]}function mp(e){return an(this.__data__,e)>-1}function gp(e,t){var r=this.__data__,n=an(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=lp,It.prototype.delete=pp,It.prototype.get=dp,It.prototype.has=mp,It.prototype.set=gp;var vp=pe(At,"Map");const nr=vp;function yp(){this.size=0,this.__data__={hash:new ee,map:new(nr||It),string:new ee}}function bp(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function cn(e,t){var r=e.__data__;return bp(t)?r[typeof t=="string"?"string":"hash"]:r.map}function _p(e){var t=cn(this,e).delete(e);return this.size-=t?1:0,t}function wp(e){return cn(this,e).get(e)}function Ep(e){return cn(this,e).has(e)}function Sp(e,t){var r=cn(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=yp,Mt.prototype.delete=_p,Mt.prototype.get=wp,Mt.prototype.has=Ep,Mt.prototype.set=Sp;var xp="Expected a function";function Li(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(xp);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(Li.Cache||Mt),r}Li.Cache=Mt;var Tp=500;function $p(e){var t=Li(e,function(n){return r.size===Tp&&r.clear(),n}),r=t.cache;return t}var Op=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ap=/\\(\\)?/g,jp=$p(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Op,function(r,n,i,s){t.push(i?s.replace(Ap,"$1"):n||r)}),t});const Rp=jp;function de(e){return e==null?"":aa(e)}function Vi(e,t){return pt(e)?e:Fi(e,t)?[e]:Rp(de(e))}function pr(e){if(typeof e=="string"||lr(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function ya(e,t){t=Vi(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[pr(t[r++])];return r&&r==n?e:void 0}function ba(e,t,r){var n=e==null?void 0:ya(e,t);return n===void 0?r:n}function Dp(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Cp=va(Object.getPrototypeOf,Object);const _a=Cp;var Pp="[object Object]",kp=Function.prototype,Np=Object.prototype,wa=kp.toString,Bp=Np.hasOwnProperty,Ip=wa.call(Object);function Hi(e){if(!at(e)||Et(e)!=Pp)return!1;var t=_a(e);if(t===null)return!0;var r=Bp.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&wa.call(r)==Ip}var Mp="[object DOMException]",Fp="[object Error]";function Ea(e){if(!at(e))return!1;var t=Et(e);return t==Fp||t==Mp||typeof e.message=="string"&&typeof e.name=="string"&&!Hi(e)}var Lp=la(function(e,t){try{return ca(e,void 0,t)}catch(r){return Ea(r)?r:new Error(r)}});const Vp=Lp;function Hp(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 Up(e,t,r){var n=e.length;return r=r===void 0?n:r,Hp(e,t,r)}var zp="\\ud800-\\udfff",qp="\\u0300-\\u036f",Kp="\\ufe20-\\ufe2f",Jp="\\u20d0-\\u20ff",Wp=qp+Kp+Jp,Yp="\\ufe0e\\ufe0f",Gp="\\u200d",Zp=RegExp("["+Gp+zp+Wp+Yp+"]");function Sa(e){return Zp.test(e)}function Qp(e){return e.split("")}var xa="\\ud800-\\udfff",Xp="\\u0300-\\u036f",td="\\ufe20-\\ufe2f",ed="\\u20d0-\\u20ff",rd=Xp+td+ed,nd="\\ufe0e\\ufe0f",id="["+xa+"]",Qn="["+rd+"]",Xn="\\ud83c[\\udffb-\\udfff]",sd="(?:"+Qn+"|"+Xn+")",Ta="[^"+xa+"]",$a="(?:\\ud83c[\\udde6-\\uddff]){2}",Oa="[\\ud800-\\udbff][\\udc00-\\udfff]",od="\\u200d",Aa=sd+"?",ja="["+nd+"]?",ad="(?:"+od+"(?:"+[Ta,$a,Oa].join("|")+")"+ja+Aa+")*",cd=ja+Aa+ad,ud="(?:"+[Ta+Qn+"?",Qn,$a,Oa,id].join("|")+")",ld=RegExp(Xn+"(?="+Xn+")|"+ud+cd,"g");function fd(e){return e.match(ld)||[]}function hd(e){return Sa(e)?fd(e):Qp(e)}function Ra(e){return function(t){t=de(t);var r=Sa(t)?hd(t):void 0,n=r?r[0]:t.charAt(0),i=r?Up(r,1).join(""):t.slice(1);return n[e]()+i}}var pd=Ra("toUpperCase");const un=pd;function dd(e){return un(de(e).toLowerCase())}function md(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 Da(e){return function(t){return e==null?void 0:e[t]}}var gd={À:"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"},vd=Da(gd);const yd=vd;var bd=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_d="\\u0300-\\u036f",wd="\\ufe20-\\ufe2f",Ed="\\u20d0-\\u20ff",Sd=_d+wd+Ed,xd="["+Sd+"]",Td=RegExp(xd,"g");function $d(e){return e=de(e),e&&e.replace(bd,yd).replace(Td,"")}var Od=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Ad(e){return e.match(Od)||[]}var jd=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Rd(e){return jd.test(e)}var Ca="\\ud800-\\udfff",Dd="\\u0300-\\u036f",Cd="\\ufe20-\\ufe2f",Pd="\\u20d0-\\u20ff",kd=Dd+Cd+Pd,Pa="\\u2700-\\u27bf",ka="a-z\\xdf-\\xf6\\xf8-\\xff",Nd="\\xac\\xb1\\xd7\\xf7",Bd="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Id="\\u2000-\\u206f",Md=" \\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",Na="A-Z\\xc0-\\xd6\\xd8-\\xde",Fd="\\ufe0e\\ufe0f",Ba=Nd+Bd+Id+Md,Ia="['’]",Vs="["+Ba+"]",Ld="["+kd+"]",Ma="\\d+",Vd="["+Pa+"]",Fa="["+ka+"]",La="[^"+Ca+Ba+Ma+Pa+ka+Na+"]",Hd="\\ud83c[\\udffb-\\udfff]",Ud="(?:"+Ld+"|"+Hd+")",zd="[^"+Ca+"]",Va="(?:\\ud83c[\\udde6-\\uddff]){2}",Ha="[\\ud800-\\udbff][\\udc00-\\udfff]",_e="["+Na+"]",qd="\\u200d",Hs="(?:"+Fa+"|"+La+")",Kd="(?:"+_e+"|"+La+")",Us="(?:"+Ia+"(?:d|ll|m|re|s|t|ve))?",zs="(?:"+Ia+"(?:D|LL|M|RE|S|T|VE))?",Ua=Ud+"?",za="["+Fd+"]?",Jd="(?:"+qd+"(?:"+[zd,Va,Ha].join("|")+")"+za+Ua+")*",Wd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Yd="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Gd=za+Ua+Jd,Zd="(?:"+[Vd,Va,Ha].join("|")+")"+Gd,Qd=RegExp([_e+"?"+Fa+"+"+Us+"(?="+[Vs,_e,"$"].join("|")+")",Kd+"+"+zs+"(?="+[Vs,_e+Hs,"$"].join("|")+")",_e+"?"+Hs+"+"+Us,_e+"+"+zs,Yd,Wd,Ma,Zd].join("|"),"g");function Xd(e){return e.match(Qd)||[]}function tm(e,t,r){return e=de(e),t=t,t===void 0?Rd(e)?Xd(e):Ad(e):e.match(t)||[]}var em="['’]",rm=RegExp(em,"g");function Ui(e){return function(t){return md(tm($d(t).replace(rm,"")),e,"")}}var nm=Ui(function(e,t,r){return t=t.toLowerCase(),e+(r?dd(t):t)});const Nt=nm;function im(){this.__data__=new It,this.size=0}function sm(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function om(e){return this.__data__.get(e)}function am(e){return this.__data__.has(e)}var cm=200;function um(e,t){var r=this.__data__;if(r instanceof It){var n=r.__data__;if(!nr||n.length<cm-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 Ot(e){var t=this.__data__=new It(e);this.size=t.size}Ot.prototype.clear=im,Ot.prototype.delete=sm,Ot.prototype.get=om,Ot.prototype.has=am,Ot.prototype.set=um;var qa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,qs=qa&&typeof module=="object"&&module&&!module.nodeType&&module,lm=qs&&qs.exports===qa,Ks=lm?At.Buffer:void 0,Js=Ks?Ks.allocUnsafe:void 0;function Ka(e,t){if(t)return e.slice();var r=e.length,n=Js?Js(r):new e.constructor(r);return e.copy(n),n}function fm(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 hm(){return[]}var pm=Object.prototype,dm=pm.propertyIsEnumerable,Ws=Object.getOwnPropertySymbols,mm=Ws?function(e){return e==null?[]:(e=Object(e),fm(Ws(e),function(t){return dm.call(e,t)}))}:hm;const gm=mm;function vm(e,t,r){var n=t(e);return pt(e)?n:Dp(n,r(e))}function ti(e){return vm(e,on,gm)}var ym=pe(At,"DataView");const ei=ym;var bm=pe(At,"Promise");const ri=bm;var _m=pe(At,"Set");const ni=_m;var Ys="[object Map]",wm="[object Object]",Gs="[object Promise]",Zs="[object Set]",Qs="[object WeakMap]",Xs="[object DataView]",Em=he(ei),Sm=he(nr),xm=he(ri),Tm=he(ni),$m=he(Zn),Xt=Et;(ei&&Xt(new ei(new ArrayBuffer(1)))!=Xs||nr&&Xt(new nr)!=Ys||ri&&Xt(ri.resolve())!=Gs||ni&&Xt(new ni)!=Zs||Zn&&Xt(new Zn)!=Qs)&&(Xt=function(e){var t=Et(e),r=t==wm?e.constructor:void 0,n=r?he(r):"";if(n)switch(n){case Em:return Xs;case Sm:return Ys;case xm:return Gs;case Tm:return Zs;case $m:return Qs}return t});const ir=Xt;var Om=Object.prototype,Am=Om.hasOwnProperty;function jm(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Am.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Rm=At.Uint8Array;const Kr=Rm;function zi(e){var t=new e.constructor(e.byteLength);return new Kr(t).set(new Kr(e)),t}function Dm(e,t){var r=zi(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var Cm=/\w*$/;function Pm(e){var t=new e.constructor(e.source,Cm.exec(e));return t.lastIndex=e.lastIndex,t}var to=Ct?Ct.prototype:void 0,eo=to?to.valueOf:void 0;function km(e){return eo?Object(eo.call(e)):{}}function Ja(e,t){var r=t?zi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Nm="[object Boolean]",Bm="[object Date]",Im="[object Map]",Mm="[object Number]",Fm="[object RegExp]",Lm="[object Set]",Vm="[object String]",Hm="[object Symbol]",Um="[object ArrayBuffer]",zm="[object DataView]",qm="[object Float32Array]",Km="[object Float64Array]",Jm="[object Int8Array]",Wm="[object Int16Array]",Ym="[object Int32Array]",Gm="[object Uint8Array]",Zm="[object Uint8ClampedArray]",Qm="[object Uint16Array]",Xm="[object Uint32Array]";function tg(e,t,r){var n=e.constructor;switch(t){case Um:return zi(e);case Nm:case Bm:return new n(+e);case zm:return Dm(e);case qm:case Km:case Jm:case Wm:case Ym:case Gm:case Zm:case Qm:case Xm:return Ja(e,r);case Im:return new n;case Mm:case Vm:return new n(e);case Fm:return Pm(e);case Lm:return new n;case Hm:return km(e)}}function Wa(e){return typeof e.constructor=="function"&&!Bi(e)?kf(_a(e)):{}}var eg="[object Map]";function rg(e){return at(e)&&ir(e)==eg}var ro=Pt&&Pt.isMap,ng=ro?hr(ro):rg;const ig=ng;var sg="[object Set]";function og(e){return at(e)&&ir(e)==sg}var no=Pt&&Pt.isSet,ag=no?hr(no):og;const cg=ag;var ug=1,Ya="[object Arguments]",lg="[object Array]",fg="[object Boolean]",hg="[object Date]",pg="[object Error]",Ga="[object Function]",dg="[object GeneratorFunction]",mg="[object Map]",gg="[object Number]",Za="[object Object]",vg="[object RegExp]",yg="[object Set]",bg="[object String]",_g="[object Symbol]",wg="[object WeakMap]",Eg="[object ArrayBuffer]",Sg="[object DataView]",xg="[object Float32Array]",Tg="[object Float64Array]",$g="[object Int8Array]",Og="[object Int16Array]",Ag="[object Int32Array]",jg="[object Uint8Array]",Rg="[object Uint8ClampedArray]",Dg="[object Uint16Array]",Cg="[object Uint32Array]",Q={};Q[Ya]=Q[lg]=Q[Eg]=Q[Sg]=Q[fg]=Q[hg]=Q[xg]=Q[Tg]=Q[$g]=Q[Og]=Q[Ag]=Q[mg]=Q[gg]=Q[Za]=Q[vg]=Q[yg]=Q[bg]=Q[_g]=Q[jg]=Q[Rg]=Q[Dg]=Q[Cg]=!0,Q[pg]=Q[Ga]=Q[wg]=!1;function Rr(e,t,r,n,i,s){var o,a=t&ug;if(o!==void 0)return o;if(!ct(e))return e;var u=pt(e);if(u)o=jm(e);else{var c=ir(e),l=c==Ga||c==dg;if(Re(e))return Ka(e,a);if(c==Za||c==Ya||l&&!i)o=l?{}:Wa(e);else{if(!Q[c])return i?e:{};o=tg(e,c,a)}}s||(s=new Ot);var f=s.get(e);if(f)return f;s.set(e,o),cg(e)?e.forEach(function(d){o.add(Rr(d,t,r,d,e,s))}):ig(e)&&e.forEach(function(d,m){o.set(m,Rr(d,t,r,m,e,s))});var h=ti,p=u?void 0:h(e);return Jf(p||e,function(d,m){p&&(m=d,d=e[m]),ki(o,m,Rr(d,t,r,m,e,s))}),o}var Pg=1,kg=4;function sr(e){return Rr(e,Pg|kg)}var Ng="__lodash_hash_undefined__";function Bg(e){return this.__data__.set(e,Ng),this}function Ig(e){return this.__data__.has(e)}function Dr(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Mt;++t<r;)this.add(e[t])}Dr.prototype.add=Dr.prototype.push=Bg,Dr.prototype.has=Ig;function Mg(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 Fg(e,t){return e.has(t)}var Lg=1,Vg=2;function Qa(e,t,r,n,i,s){var o=r&Lg,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,h=!0,p=r&Vg?new Dr:void 0;for(s.set(e,t),s.set(t,e);++f<a;){var d=e[f],m=t[f];if(n)var b=o?n(m,d,f,t,e,s):n(d,m,f,e,t,s);if(b!==void 0){if(b)continue;h=!1;break}if(p){if(!Mg(t,function(E,g){if(!Fg(p,g)&&(d===E||i(d,E,r,n,s)))return p.push(g)})){h=!1;break}}else if(!(d===m||i(d,m,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function Hg(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Ug(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var zg=1,qg=2,Kg="[object Boolean]",Jg="[object Date]",Wg="[object Error]",Yg="[object Map]",Gg="[object Number]",Zg="[object RegExp]",Qg="[object Set]",Xg="[object String]",tv="[object Symbol]",ev="[object ArrayBuffer]",rv="[object DataView]",io=Ct?Ct.prototype:void 0,Cn=io?io.valueOf:void 0;function nv(e,t,r,n,i,s,o){switch(r){case rv:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case ev:return!(e.byteLength!=t.byteLength||!s(new Kr(e),new Kr(t)));case Kg:case Jg:case Gg:return Ne(+e,+t);case Wg:return e.name==t.name&&e.message==t.message;case Zg:case Xg:return e==t+"";case Yg:var a=Hg;case Qg:var u=n&zg;if(a||(a=Ug),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;n|=qg,o.set(e,t);var l=Qa(a(e),a(t),n,i,s,o);return o.delete(e),l;case tv:if(Cn)return Cn.call(e)==Cn.call(t)}return!1}var iv=1,sv=Object.prototype,ov=sv.hasOwnProperty;function av(e,t,r,n,i,s){var o=r&iv,a=ti(e),u=a.length,c=ti(t),l=c.length;if(u!=l&&!o)return!1;for(var f=u;f--;){var h=a[f];if(!(o?h in t:ov.call(t,h)))return!1}var p=s.get(e),d=s.get(t);if(p&&d)return p==t&&d==e;var m=!0;s.set(e,t),s.set(t,e);for(var b=o;++f<u;){h=a[f];var E=e[h],g=t[h];if(n)var y=o?n(g,E,h,t,e,s):n(E,g,h,e,t,s);if(!(y===void 0?E===g||i(E,g,r,n,s):y)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var _=e.constructor,S=t.constructor;_!=S&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof S=="function"&&S instanceof S)&&(m=!1)}return s.delete(e),s.delete(t),m}var cv=1,so="[object Arguments]",oo="[object Array]",br="[object Object]",uv=Object.prototype,ao=uv.hasOwnProperty;function lv(e,t,r,n,i,s){var o=pt(e),a=pt(t),u=o?oo:ir(e),c=a?oo:ir(t);u=u==so?br:u,c=c==so?br:c;var l=u==br,f=c==br,h=u==c;if(h&&Re(e)){if(!Re(t))return!1;o=!0,l=!1}if(h&&!l)return s||(s=new Ot),o||Ii(e)?Qa(e,t,r,n,i,s):nv(e,t,u,r,n,i,s);if(!(r&cv)){var p=l&&ao.call(e,"__wrapped__"),d=f&&ao.call(t,"__wrapped__");if(p||d){var m=p?e.value():e,b=d?t.value():t;return s||(s=new Ot),i(m,b,r,n,s)}}return h?(s||(s=new Ot),av(e,t,r,n,i,s)):!1}function ln(e,t,r,n,i){return e===t?!0:e==null||t==null||!at(e)&&!at(t)?e!==e&&t!==t:lv(e,t,r,n,ln,i)}var fv=1,hv=2;function pv(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 Ot,f;if(!(f===void 0?ln(c,u,fv|hv,n,l):f))return!1}}return!0}function Xa(e){return e===e&&!ct(e)}function dv(e){for(var t=on(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Xa(i)]}return t}function tc(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function mv(e){var t=dv(e);return t.length==1&&t[0][2]?tc(t[0][0],t[0][1]):function(r){return r===e||pv(r,e,t)}}function gv(e,t){return e!=null&&t in Object(e)}function vv(e,t,r){t=Vi(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var o=pr(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&&Ni(i)&&nn(o,i)&&(pt(e)||qr(e)))}function yv(e,t){return e!=null&&vv(e,t,gv)}var bv=1,_v=2;function wv(e,t){return Fi(e)&&Xa(t)?tc(pr(e),t):function(r){var n=ba(r,e);return n===void 0&&n===t?yv(r,e):ln(t,n,bv|_v)}}function Ev(e){return function(t){return t==null?void 0:t[e]}}function Sv(e){return function(t){return ya(t,e)}}function xv(e){return Fi(e)?Ev(pr(e)):Sv(e)}function Tv(e){return typeof e=="function"?e:e==null?Pi:typeof e=="object"?pt(e)?wv(e[0],e[1]):mv(e):xv(e)}function $v(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 Ov(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 Av=Ov();const ec=Av;function jv(e,t){return e&&ec(e,t,on)}function Rv(e,t){return function(r,n){if(r==null)return r;if(!fr(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 Dv=Rv(jv);const Cv=Dv;function Pv(e,t,r,n){return Cv(e,function(i,s,o){t(n,i,r(i),o)}),n}function kv(e,t){return function(r,n){var i=pt(r)?$v:Pv,s={};return i(r,e,Tv(n),s)}}var Nv=function(){return At.Date.now()};const Pn=Nv;var Bv="Expected a function",Iv=Math.max,Mv=Math.min;function qi(e,t,r){var n,i,s,o,a,u,c=0,l=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(Bv);t=Cs(t)||0,ct(r)&&(l=!!r.leading,f="maxWait"in r,s=f?Iv(Cs(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h);function p(v){var x=n,O=i;return n=i=void 0,c=v,o=e.apply(O,x),o}function d(v){return c=v,a=setTimeout(E,t),l?p(v):o}function m(v){var x=v-u,O=v-c,V=t-x;return f?Mv(V,s-O):V}function b(v){var x=v-u,O=v-c;return u===void 0||x>=t||x<0||f&&O>=s}function E(){var v=Pn();if(b(v))return g(v);a=setTimeout(E,m(v))}function g(v){return a=void 0,h&&n?p(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(Pn())}function S(){var v=Pn(),x=b(v);if(n=arguments,i=this,u=v,x){if(a===void 0)return d(u);if(f)return clearTimeout(a),a=setTimeout(E,t),p(u)}return a===void 0&&(a=setTimeout(E,t)),o}return S.cancel=y,S.flush=_,S}function ii(e,t,r){(r!==void 0&&!Ne(e[t],r)||r===void 0&&!(t in e))&&sn(e,t,r)}function Fv(e){return at(e)&&fr(e)}function si(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Lv(e){return ua(e,Mi(e))}function Vv(e,t,r,n,i,s,o){var a=si(e,r),u=si(t,r),c=o.get(u);if(c){ii(e,r,c);return}var l=s?s(a,u,r+"",e,t,o):void 0,f=l===void 0;if(f){var h=pt(u),p=!h&&Re(u),d=!h&&!p&&Ii(u);l=u,h||p||d?pt(a)?l=a:Fv(a)?l=Bf(a):p?(f=!1,l=Ka(u,!0)):d?(f=!1,l=Ja(u,!0)):l=[]:Hi(u)||qr(u)?(l=a,qr(a)?l=Lv(a):(!ct(a)||ue(a))&&(l=Wa(u))):f=!1}f&&(o.set(u,l),i(l,u,n,s,o),o.delete(u)),ii(e,r,l)}function rc(e,t,r,n,i){e!==t&&ec(t,function(s,o){if(i||(i=new Ot),ct(s))Vv(e,t,o,r,rc,n,i);else{var a=n?n(si(e,o),s,o+"",e,t,i):void 0;a===void 0&&(a=s),ii(e,o,a)}},Mi)}var Hv={"&":"&","<":"<",">":">",'"':""","'":"'"},Uv=Da(Hv);const zv=Uv;var nc=/[&<>"']/g,qv=RegExp(nc.source);function Kv(e){return e=de(e),e&&qv.test(e)?e.replace(nc,zv):e}var Jv=Object.prototype,Wv=Jv.hasOwnProperty,Yv=kv(function(e,t,r){Wv.call(e,r)?e[r].push(t):sn(e,r,[t])});const ic=Yv;var Gv="[object String]";function bt(e){return typeof e=="string"||!pt(e)&&at(e)&&Et(e)==Gv}function Zv(e,t){return oa(t,function(r){return e[r]})}var Qv="[object ArrayBuffer]";function Xv(e){return at(e)&&Et(e)==Qv}var co=Pt&&Pt.isArrayBuffer,ty=co?hr(co):Xv;const ey=ty;var ry="[object Boolean]";function ny(e){return e===!0||e===!1||at(e)&&Et(e)==ry}var iy="[object Date]";function sy(e){return at(e)&&Et(e)==iy}var uo=Pt&&Pt.isDate,oy=uo?hr(uo):sy;const ay=oy;function cy(e,t){return ln(e,t)}var uy="[object Number]";function sc(e){return typeof e=="number"||at(e)&&Et(e)==uy}function ly(e){return sc(e)&&e!=+e}function fy(e){return e===null}function hy(e){return e===void 0}var py=Ui(function(e,t,r){return e+(r?"-":"")+t.toLowerCase()});const dy=py;var my=Ra("toLowerCase");const gy=my;var vy=ha(function(e,t,r){rc(e,t,r)});const Dt=vy;function yy(e,t,r,n){if(!ct(e))return e;t=Vi(t,e);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++i<s;){var u=pr(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:nn(t[i+1])?[]:{})}ki(a,u,c),a=a[u]}return e}function by(e,t,r){return e==null?e:yy(e,t,r)}var _y=Ui(function(e,t,r){return e+(r?"_":"")+t.toLowerCase()});const wy=_y;var oc=Object.prototype,Ey=oc.hasOwnProperty;function lo(e,t,r,n){return e===void 0||Ne(e,oc[r])&&!Ey.call(n,r)?t:e}var Sy={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function xy(e){return"\\"+Sy[e]}var Ty=/<%=([\s\S]+?)%>/g;const ac=Ty;var $y=/<%-([\s\S]+?)%>/g;const Oy=$y;var Ay=/<%([\s\S]+?)%>/g;const jy=Ay;var Ry={escape:Oy,evaluate:jy,interpolate:ac,variable:"",imports:{_:{escape:Kv}}};const fo=Ry;var Dy="Invalid `variable` option passed into `_.template`",Cy=/\b__p \+= '';/g,Py=/\b(__p \+=) '' \+/g,ky=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ny=/[()=,{}\[\]\/\s]/,By=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_r=/($^)/,Iy=/['\n\r\u2028\u2029\\]/g,My=Object.prototype,ho=My.hasOwnProperty;function cc(e,t,r){var n=fo.imports._.templateSettings||fo;r&&fa(e,t,r)&&(t=void 0),e=de(e),t=Ls({},t,n,lo);var i=Ls({},t.imports,n.imports,lo),s=on(i),o=Zv(i,s),a,u,c=0,l=t.interpolate||_r,f="__p += '",h=RegExp((t.escape||_r).source+"|"+l.source+"|"+(l===ac?By:_r).source+"|"+(t.evaluate||_r).source+"|$","g"),p=ho.call(t,"sourceURL")?"//# sourceURL="+(t.sourceURL+"").replace(/\s/g," ")+`
|
|
3
3
|
`:"";e.replace(h,function(b,E,g,y,_,S){return g||(g=y),f+=e.slice(c,S).replace(Iy,xy),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.10.
|
|
54
|
+
* @version 0.10.1-alpha.1
|
|
55
55
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
56
|
-
*/const t1="0.10.0",e1="BuiltIn",Zi="VueMaterial",Qi="VueRouterMaterial",r1=[Zi,Qi],n1={vue:"Vue","vue-router":"VueRouter"},qc={[Zi]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[Qi]:["RouterView","RouterLink"]},i1=["slot","template","component","img","div","p","h1","h2","h3","span","a"];let s1=class{},Kc=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}},kr=class Jc{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 Jc(n,i),r),{})}},Nr=class Wc{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 Wc(i),r),{})}},Je=class Yc{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 Yc(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 Wr=(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=kr.parse(a),this.events=Nr.parse(u),this.directives=Je.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 kr(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 Nr(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 Je?t:new Je(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(h=>h.toDsl()):a;return{id:t,name:r,from:n,invisible:i,locked:s,slot:o,children:f,props:kr.toDsl(u),directives:Je.toDsl(c),events:Nr.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 re=(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 Wr(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||Pc().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=ts(t.toDsl()),i=new Wr(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",hi="EVENT_PROJECT_ACTIVED",pi="EVENT_PROJECT_DEPS_CHANGE",We="EVENT_PROJECT_PAGES_CHANGE",Se="EVENT_PROJECT_BLOCKS_CHANGE",di="EVENT_PROJECT_APIS_CHANGE",mi="EVENT_PROJECT_META_CHANGE",Gc="EVENT_PROJECT_PUBLISH",Zc="EVENT_PROJECT_FILE_PUBLISH",Qc="EVENT_PROJECT_GEN_SOURCE",tr=class tr{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 tr.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=tr.attrs.reduce((i,s)=>(i[s]=this[s],i),{});return n.pages&&(n.pages=n.pages.map(i=>sr(st(z({},i),{dsl:void 0}))),this.cleanPagesDsl(n.pages)),n.blocks&&(n.blocks=n.blocks.map(i=>sr(st(z({},i),{dsl:void 0})))),z({__VTJ_PROJECT__:!0,id:r},n)}active(t,r=!1){this.currentFile=t,r||M.emit(hi,{model:this,type:"update",data:t})}deactivate(t=!1){this.currentFile=null,t||M.emit(hi,{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(pi,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(pi,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 re({id:t.id,name:oi(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(We,i),M.emit(it,i)}!this.currentFile&&!t.dir&&(yield Te(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(We,i),M.emit(it,i)}}clonePage(t,r,n=!1){var f;const i=gt(),s=`${t.name}Copy`,o=`${t.title}_副本`,a=new re({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(h=>h.id===t.id);if(c.splice(l+1,0,u),!n){const h={model:this,type:"clone",data:{source:t,target:u}};M.emit(We,h),M.emit(it,h)}}saveToBlock(t,r=!1){return L(this,null,function*(){this.active(t,r),yield Te(1e3);const n=gt(),i=t.name,s=t.title,o=new re({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(Se,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(We,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=oi(t.name);t.id=n,t.type="block",t.dsl=new re({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(Se,o),M.emit(it,o)}!this.currentFile&&s==="Schema"&&(yield Te(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(Se,i),M.emit(it,i)}}cloneBlock(t,r=!1){const n=gt(),i=`${t.name}Copy`,s=`${t.title}_副本`,o=new re({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(Se,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(Se,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(di,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(di,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(mi,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(mi,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(Gc,r)}genSource(){const t={model:this,type:"gen",data:null};M.emit(Qc,t)}};A(tr,"attrs",["platform","name","homepage","description","dependencies","pages","blocks","apis","meta","config","uniConfig","__BASE_PATH__"]);let le=tr;const Ye="EVENT_HISTORY_CHANGE",Br="EVENT_HISTORY_LOAD";let Xi=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:sr(t)};if(this.items.unshift(i),this.items.length>n){const s=this.items.splice(n);r||M.emit(Ye,{model:this,type:"delete",data:s.map(o=>o.id)})}this.index=-1,r||M.emit(Ye,{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(Ye,{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(Br,{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(Br,{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(Br,{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(Ye,{model:this,type:"clear",data:r})}};const M=Hc();function o1(e){return e instanceof re}function a1(e){return e instanceof Wr}function c1(e){return!!e.__VTJ_BLOCK__}function ts(e){const t=sr(e);return delete t.id,Array.isArray(t.children)&&(t.children=t.children.map(r=>ts(r))),t}function u1(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 b2=Object.freeze(Object.defineProperty({__proto__:null,BUILT_IN_COMPONENTS:qc,BUILT_IN_LIBRARAY_MAP:n1,BUILT_IN_MATERIALS:r1,BUILT_IN_NAME:e1,BUILT_IN_TAGS:i1,BUILT_IN_VUE:Zi,BUILT_IN_VUE_ROUTER:Qi,Base:Kc,BlockModel:re,DirectiveModel:Je,EVENT_BLOCK_CHANGE:G,EVENT_HISTORY_CHANGE:Ye,EVENT_HISTORY_LOAD:Br,EVENT_NODE_CHANGE:nt,EVENT_PROJECT_ACTIVED:hi,EVENT_PROJECT_APIS_CHANGE:di,EVENT_PROJECT_BLOCKS_CHANGE:Se,EVENT_PROJECT_CHANGE:it,EVENT_PROJECT_DEPS_CHANGE:pi,EVENT_PROJECT_FILE_PUBLISH:Zc,EVENT_PROJECT_GEN_SOURCE:Qc,EVENT_PROJECT_META_CHANGE:mi,EVENT_PROJECT_PAGES_CHANGE:We,EVENT_PROJECT_PUBLISH:Gc,EventModel:Nr,HistoryModel:Xi,NodeModel:Wr,ProjectModel:le,PropModel:kr,Service:s1,VTJ_CORE_VERSION:t1,cloneDsl:ts,createNodeFrom:u1,emitter:M,isBlock:o1,isBlockSchema:c1,isNode:a1},Symbol.toStringTag,{value:"Module"}));var l1=Object.defineProperty,f1=(e,t,r)=>t in e?l1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xt=(e,t,r)=>f1(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 t1="0.10.1-alpha.1",e1="BuiltIn",Zi="VueMaterial",Qi="VueRouterMaterial",r1=[Zi,Qi],n1={vue:"Vue","vue-router":"VueRouter"},qc={[Zi]:["Transition","TransitionGroup","KeepAlive","Teleport","Suspense"],[Qi]:["RouterView","RouterLink"]},i1=["slot","template","component","img","div","p","h1","h2","h3","span","a"];let s1=class{},Kc=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}},kr=class Jc{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 Jc(n,i),r),{})}},Nr=class Wc{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 Wc(i),r),{})}},Je=class Yc{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 Yc(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 Wr=(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=kr.parse(a),this.events=Nr.parse(u),this.directives=Je.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 kr(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 Nr(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 Je?t:new Je(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(h=>h.toDsl()):a;return{id:t,name:r,from:n,invisible:i,locked:s,slot:o,children:f,props:kr.toDsl(u),directives:Je.toDsl(c),events:Nr.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 re=(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 Wr(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||Pc().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=ts(t.toDsl()),i=new Wr(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",hi="EVENT_PROJECT_ACTIVED",pi="EVENT_PROJECT_DEPS_CHANGE",We="EVENT_PROJECT_PAGES_CHANGE",Se="EVENT_PROJECT_BLOCKS_CHANGE",di="EVENT_PROJECT_APIS_CHANGE",mi="EVENT_PROJECT_META_CHANGE",Gc="EVENT_PROJECT_PUBLISH",Zc="EVENT_PROJECT_FILE_PUBLISH",Qc="EVENT_PROJECT_GEN_SOURCE",tr=class tr{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 tr.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=tr.attrs.reduce((i,s)=>(i[s]=this[s],i),{});return n.pages&&(n.pages=n.pages.map(i=>sr(st(z({},i),{dsl:void 0}))),this.cleanPagesDsl(n.pages)),n.blocks&&(n.blocks=n.blocks.map(i=>sr(st(z({},i),{dsl:void 0})))),z({__VTJ_PROJECT__:!0,id:r},n)}active(t,r=!1){this.currentFile=t,r||M.emit(hi,{model:this,type:"update",data:t})}deactivate(t=!1){this.currentFile=null,t||M.emit(hi,{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(pi,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(pi,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 re({id:t.id,name:oi(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(We,i),M.emit(it,i)}!this.currentFile&&!t.dir&&(yield Te(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(We,i),M.emit(it,i)}}clonePage(t,r,n=!1){var f;const i=gt(),s=`${t.name}Copy`,o=`${t.title}_副本`,a=new re({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(h=>h.id===t.id);if(c.splice(l+1,0,u),!n){const h={model:this,type:"clone",data:{source:t,target:u}};M.emit(We,h),M.emit(it,h)}}saveToBlock(t,r=!1){return L(this,null,function*(){this.active(t,r),yield Te(1e3);const n=gt(),i=t.name,s=t.title,o=new re({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(Se,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(We,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=oi(t.name);t.id=n,t.type="block",t.dsl=new re({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(Se,o),M.emit(it,o)}!this.currentFile&&s==="Schema"&&(yield Te(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(Se,i),M.emit(it,i)}}cloneBlock(t,r=!1){const n=gt(),i=`${t.name}Copy`,s=`${t.title}_副本`,o=new re({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(Se,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(Se,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(di,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(di,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(mi,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(mi,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(Gc,r)}genSource(){const t={model:this,type:"gen",data:null};M.emit(Qc,t)}};A(tr,"attrs",["platform","name","homepage","description","dependencies","pages","blocks","apis","meta","config","uniConfig","__BASE_PATH__"]);let le=tr;const Ye="EVENT_HISTORY_CHANGE",Br="EVENT_HISTORY_LOAD";let Xi=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:sr(t)};if(this.items.unshift(i),this.items.length>n){const s=this.items.splice(n);r||M.emit(Ye,{model:this,type:"delete",data:s.map(o=>o.id)})}this.index=-1,r||M.emit(Ye,{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(Ye,{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(Br,{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(Br,{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(Br,{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(Ye,{model:this,type:"clear",data:r})}};const M=Hc();function o1(e){return e instanceof re}function a1(e){return e instanceof Wr}function c1(e){return!!e.__VTJ_BLOCK__}function ts(e){const t=sr(e);return delete t.id,Array.isArray(t.children)&&(t.children=t.children.map(r=>ts(r))),t}function u1(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 b2=Object.freeze(Object.defineProperty({__proto__:null,BUILT_IN_COMPONENTS:qc,BUILT_IN_LIBRARAY_MAP:n1,BUILT_IN_MATERIALS:r1,BUILT_IN_NAME:e1,BUILT_IN_TAGS:i1,BUILT_IN_VUE:Zi,BUILT_IN_VUE_ROUTER:Qi,Base:Kc,BlockModel:re,DirectiveModel:Je,EVENT_BLOCK_CHANGE:G,EVENT_HISTORY_CHANGE:Ye,EVENT_HISTORY_LOAD:Br,EVENT_NODE_CHANGE:nt,EVENT_PROJECT_ACTIVED:hi,EVENT_PROJECT_APIS_CHANGE:di,EVENT_PROJECT_BLOCKS_CHANGE:Se,EVENT_PROJECT_CHANGE:it,EVENT_PROJECT_DEPS_CHANGE:pi,EVENT_PROJECT_FILE_PUBLISH:Zc,EVENT_PROJECT_GEN_SOURCE:Qc,EVENT_PROJECT_META_CHANGE:mi,EVENT_PROJECT_PAGES_CHANGE:We,EVENT_PROJECT_PUBLISH:Gc,EventModel:Nr,HistoryModel:Xi,NodeModel:Wr,ProjectModel:le,PropModel:kr,Service:s1,VTJ_CORE_VERSION:t1,cloneDsl:ts,createNodeFrom:u1,emitter:M,isBlock:o1,isBlockSchema:c1,isNode:a1},Symbol.toStringTag,{value:"Module"}));var l1=Object.defineProperty,f1=(e,t,r)=>t in e?l1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xt=(e,t,r)=>f1(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.10.
|
|
60
|
+
* @version 0.10.1-alpha.1
|
|
61
61
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
62
|
-
*/const h1="0.10.
|
|
62
|
+
*/const h1="0.10.1-alpha.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.10.
|
|
75
|
+
* @version 0.10.1-alpha.1
|
|
76
76
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
77
|
-
*/const Ae="0.10.
|
|
77
|
+
*/const Ae="0.10.1-alpha.1";var ht=(e=>(e.Runtime="Runtime",e.Design="Design",e.Raw="Raw",e.VNode="VNode",e))(ht||{});const Ri=["$el","$emit","$nextTick","$parent","$root","$attrs","$slots","$watch","$props","$options","$forceUpdate"],Y_=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeUnmount","unmounted","errorCaptured","renderTracked","renderTriggered","activated","deactivated"],zu=["vIf","vShow","vModel","vFor","vBind","vHtml"],qu={String,Number,Boolean,Array,Object,Function,Date},je="VtjPage",Xe="VtjHomepage",Ku="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(","),Ju="component,slot".split(",");function Ge(e,t){return e.map(r=>Oc(r)||r.startsWith("/")?r:`${t}${r}`)}function En(e){return/\.css$/.test(e)}function Sn(e){return/\.js$/.test(e)}function Wu(e){return/\.json$/.test(e)}function G_(e){return e.map(t=>`<script src="${oe.append(t,{v:Ae})}"><\/script>`).join("")}function Z_(e=[]){return e.map(t=>`<link rel="stylesheet" href="${oe.append(t,{v:Ae})}" />`).join("")}function Yu(e,t=!1){return t&&e.endsWith(".prod.js")?e.replace(".prod.js",".js"):e}function Gu(e,t,r=!1){const n=e.filter(h=>!!h.enabled),i=[],s=[],o=[],a=[],u={},c={},l=[],f={};return n.forEach(({urls:h,assetsUrl:p,library:d,assetsLibrary:m,localeLibrary:b})=>{h==null||h.forEach(E=>{Sn(E)&&i.push(Yu(E,r)),En(E)&&s.push(E)}),d&&(a.push(d),u[d]=Ge(h||[],t),b&&(c[d]=b)),p&&o.push(p),m&&l.push(m),d&&m&&(f[m]=d)}),{scripts:Ge(i,t),css:Ge(s,t),materials:Ge(o,t),libraryExports:a,materialExports:Bc(l),materialMapLibrary:f,libraryMap:u,libraryLocaleMap:c}}function Zu(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 hs(e){return bt(e)?e:JSON.stringify(e)}function ps(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 Qu(e,t){return L(this,null,function*(){const r=yield window.fetch(t).then(n=>n.text()).catch(()=>"");r&&ps(window,e,r)})}function Xu(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 tl(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=h=>{c(h)},o.appendChild(f)}})})}function el(e){return ue(e)||ue(e==null?void 0:e.install)}function rl(e){return Ju.includes(e)}function nl(e){return Ku.includes(e)}function ke(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(ae.error("parseExpression.error",s,e,(i=t==null?void 0:t.__self)!=null?i:t),n)throw s}}function Qr(e,t,r=!1,n=!1){var s;const i=ke(e,t,r,n);if(typeof i!="function"&&(ae.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 Fe(e){return typeof e=="object"&&e&&e.type==="JSFunction"}function il(e){return wt(e)||Fe(e)}function Q_(e){return il(e)?e.value:JSON.stringify(e)}const X_={session:!1,authKey:"Authorization",storageKey:"ACCESS_STORAGE",storagePrefix:"__VTJ_",unauthorized:void 0,auth:"/#/login",redirectParam:"r",unauthorizedCode:401,unauthorizedMessage:"登录已经失效,请重新登录!",noPermissionMessage:"无权限访问该页面",appName:""},ds=Symbol("access");class sl{constructor(t){A(this,"options");A(this,"data",null);A(this,"mode",ht.Raw);this.options=Object.assign({},X_,t),this.loadData()}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&&(Vr.save(r,t,{type:"local",prefix:n}),i&&Ur.set(s,this.data.token))}clear(){const{storageKey:t,storagePrefix:r,session:n,authKey:i}=this.options;this.data=null,Vr.remove(t,{type:"local",prefix:r}),n&&Ur.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):li(t).every(i=>n[i]||n[r+"."+i])}some(t){const{appName:r}=this.options,{permissions:n={}}=this.data||{};return li(t).some(i=>n[i]||n[r+"."+i])}install(t){t.config.globalProperties.$access||(t.config.globalProperties.$access=this),t.provide(ds,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=>ui(i,r));this.data=JSON.parse(n.join(""));return}if(typeof t=="string")try{const n=r?ui(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=Vr.get(t,{type:"local",prefix:r});this.setData(n||null)}isLogined(){const{session:t,authKey:r}=this.options;return t&&r?!!Ur.get(r):!!this.getToken()}hasRoutePermission(t){if(t.name===je){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),ue(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){const{unauthorizedCode:r=401}=this.options;return t.status===r||t.data.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 Te(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 yield this.showUnauthorizedAlert(r),r}),r=>L(this,null,function*(){const n=r.response||r||{};return yield this.showUnauthorizedAlert(n),Promise.reject(r)}))}}function ol(){return Xo(ds,null)}function tw(e={}){const{notify:t,loading:r,settings:n={}}=e;let i=null;return{request:wn({settings:z({type:"form",validSuccess:!0,originResponse:!1,loading:!0,validate:s=>{var o,a;return((o=s.data)==null?void 0:o.code)===0||!!((a=s.data)!=null&&a.success)},failMessage:!0,showError:s=>{t&&t(s||"未知错误")},showLoading:()=>{i&&i.close(),r&&(i=r())},hideLoading:()=>{i&&(i.close(),i=null)}},n)}),jsonp:us,notify:t,loading:r}}function al(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?ke(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 cl(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 ul(e=[],t=[],r){const n={};for(const i of e)n[i.id]=al(i,r);for(const i of t)n[i.id]=cl(i,r);return n}function ll(){return L(this,arguments,function*(e=[]){ce&&(ms(),e.forEach(t=>hl(ce,t)))})}function fl(e){const t=Fe(e.mockTemplate)&&e.mockTemplate.value?Qr(e.mockTemplate,{},!0):void 0;return(...r)=>L(this,null,function*(){let n={};if(t)try{n=yield t.apply(t,r)}catch(i){ae.warn("模拟数据模版异常",i)}return ce.mock(n)})}function hl(e,t){if(!t.mock)return;const{url:r,mockTemplate:n}=t;if(r&&n){const i=pn(`${r}(.*)`),s=zc(r,{decode:decodeURIComponent}),o=ke(n,{},!0);e.mock(i,a=>{var f;const u=oe.parse(a.url)||{},c=a.body instanceof FormData?Mu(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 ms(){ce&&(ce._mocked={})}class pl{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=rn){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&&Ri.forEach(t=>{var r;this[t]=(r=this.__instance)==null?void 0:r[t]})}__cleanup(){Ri.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 Qr({type:i,value:s},this)}else return Qr(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 ke({type:i,value:s},this)}else return ke(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 Te(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 Xr(e){var f,h;const{Vue:t=rn,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 pl({mode:r,dsl:a.value,attrs:u}),l=t.defineComponent(z({name:a.value.name,props:z({},rw((f=a.value.props)!=null?f:[],c)),setup(p){var y,_,S,v;c.$props=p,c.props=p,a.value.id&&ps(e.window||window,a.value.id,a.value.css||""),c.state=nw(t,(y=a.value.state)!=null?y:{},c);const d=iw(t,(_=a.value.computed)!=null?_:{},c),m=sw((S=a.value.methods)!=null?S:{},c),b=ow(t,a.value.inject,c),E=dl(a.value.dataSources||{},c),g=z(z(z(z({},b),d),m),E);return c.setup(g,t),aw(t,(v=a.value.watch)!=null?v:[],c),{vtj:c}},emits:ew(a.value.emits),expose:["vtj"],render(){if(!a.value.nodes)return null;const p=a.value.nodes||[];return p.length===1?ur(p[0],c,t,o):p.map(d=>ur(d,c,t,o))}},cw((h=a.value.lifeCycles)!=null?h:{},c)));return{renderer:t.markRaw(l),context:c}}function ew(e=[]){return e.map(t=>bt(t)?t:t.name)}function rw(e=[],t){const r=n=>n?(Array.isArray(n)?n:[n]).map(i=>qu[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 nw(e,t,r){return e.reactive(Object.keys(t||{}).reduce((n,i)=>{let s=t[i];return wt(s)?s=r.__parseExpression(s):Fe(s)&&(s=r.__parseFunction(s)),n[i]=s,n},{}))}function iw(e,t,r){return Object.entries(t!=null?t:{}).reduce((n,[i,s])=>(n[i]=e.computed(r.__parseFunction(s)),n),{})}function sw(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>(r[n]=t.__parseFunction(i),r),{})}function ow(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 dl(e,t){return Object.keys(e).reduce((r,n)=>{const i=e[n];if(i.type==="mock")r[n]=fl(i);else if(i.ref){const s=t.$apis[i.ref],o=Fe(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 aw(e,t=[],r){t.forEach(n=>{e.watch(r.__parseExpression(n.source),r.__parseFunction(n.handler),{deep:n.deep,immediate:n.immediate})})}function cw(e,t){return Object.entries(e!=null?e:{}).reduce((r,[n,i])=>(r[n]=t.__parseFunction(i),r),{})}let Jn=[],te={};const ml=e=>e;function gs(r){return L(this,arguments,function*(e,t=window){const{urls:n=[],library:i}=e,s=n.filter(a=>Sn(a));if(s.length===0||!i)return null;const o=n.filter(a=>En(a));return o.length&&Xu(o,t),yield tl(s,i,t).catch(a=>(console.warn("loadScriptUrl error",s,i,a),null))})}function tn(e){const{getDsl:t,getDslByUrl:r,options:n}=e;return n.window&&(Jn.forEach(i=>{delete n.window[i]}),Jn=[]),(i,s,o=rn)=>{if(!s||typeof s=="string")return i;if(s.type==="Schema"&&s.id){let a=te[s.id];return a||(a=te[s.id]=o.defineAsyncComponent(()=>L(this,null,function*(){const u=yield t(s.id);return u&&(u.name=i),u?Xr(st(z({},n),{Vue:o,dsl:u,mode:ht.Runtime,loader:tn(e)})).renderer:null})),a)}if(s.type==="UrlSchema"&&s.url){let a=te[s.url];return a||(a=te[s.url]=o.defineAsyncComponent(()=>L(this,null,function*(){const u=yield r(s.url);return u&&(u.name=i),u?Xr(st(z({},n),{Vue:o,dsl:u,mode:ht.Runtime,loader:tn(e)})).renderer:null})),a)}if(s.type==="Plugin"){let a=s.library?te[s.library]:null;return a||(s.library&&Jn.push(s.library),a=te[s.library||Symbol()]=o.defineAsyncComponent(()=>L(this,null,function*(){return(yield gs(s,n.window))||(console.warn("getPlugin result is null",s),null)})),a)}return i}}function uw(){te={}}function ur(e,t,r=rn,n=ml){var m;if(!e||!e.name||e.invisible)return null;const i=(m=r.getCurrentInstance())==null?void 0:m.appContext,{id:s=null,directives:o=[]}=e,{vIf:a,vFor:u,vShow:c,vModels:l,vBind:f,vHtml:h,others:p}=fw(o);if(a&&!hw(a,t))return null;const d=b=>{var O,V,w,T;const E=b.$components,g=(()=>{var C,I,D,k;if(e.name==="component")return pw(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)?rl(F)||nl(F)?F:(k=(D=E[F])!=null?D:(I=i==null?void 0:i.app)==null?void 0:I.component(F))!=null?k:F:F})(),y=dw(s,(O=e.props)!=null?O:{},b),_=mw(r,(V=e.events)!=null?V:{},b);if(e.name==="slot")return gw(r,e,y,b,n);f&&Object.assign(y,b.__parseExpression(f.value)),c&&(y.style=Object.assign((w=y.style)!=null?w:{},yw(c,b))),h&&Object.assign(y,bw(h,b)),l.forEach(F=>{Object.assign(y,_w(r,F,b))});const S=ww(r,(T=e.children)!=null?T:[],b,n,e);let v=r.createVNode(g,z(z({},y),_),S);const x=i?lw(i,p,b):[];return x.length&&(v=r.withDirectives(v,x)),v};return u?xw(u,d,t):d(t)}function lw(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 fw(e=[]){const t=e.find(u=>Nt(u.name)==="vIf"),r=e.find(u=>Nt(u.name)==="vFor"),n=e.find(u=>Nt(u.name)==="vShow"),i=e.find(u=>Nt(u.name)==="vBind"),s=e.find(u=>Nt(u.name)==="vHtml"),o=e.filter(u=>Nt(u.name)==="vModel"),a=e.filter(u=>!zu.includes(Nt(u.name)));return{vIf:t,vFor:r,vShow:n,vModels:o,vBind:i,others:a,vHtml:s}}function hw(e,t){return!!t.__parseExpression(e.value)}function pw(e,t){return t?wt(t)?e.__parseExpression(t):t:"div"}function dw(e,t,r){const n=Di(t,r);return n.ref=r.__ref(e,n.ref),n}function Di(e,t){return wt(e)?t.__parseExpression(e):Fe(e)?t.__parseFunction(e):Array.isArray(e)?e.map(r=>Di(r,t)):typeof e=="object"?Object.keys(e||{}).reduce((r,n)=>{let i=e[n];return r[n]=Di(i,t),r},{}):e}function mw(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=vs(a.modifiers),c=u.find(h=>n.includes(h)),l="on"+un(o)+(c&&i[c]||""),f=r.__parseFunction(a.handler);return f&&(s[l]=e.withModifiers(f,u)),s},{})}function vs(e={},t=!1){const r=Object.keys(e);return t?r.map(n=>"."+n):r}function gw(e,t,r,n,i){var u;const{children:s}=t,o=vw(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(hs(n.__parseExpression(s))):Array.isArray(s)?s.map(c=>ur(c,n,e,i)):null:null}function vw(e,t){const{props:r}=e,n=(r==null?void 0:r.name)||"default";return{name:wt(n)?t.__parseExpression(n):n,params:[]}}function yw(e,t){return t.__parseExpression(e.value)?{}:{display:"none"}}function bw(e,t){return{innerHTML:t.__parseExpression(e.value)||""}}function _w(e,t,r){var a;const n={type:"JSFunction",value:(a=t.value)!=null&&a.value?`(v) => {
|
|
79
79
|
${t.value.value} = v;
|
|
80
80
|
}`:"(v) => {}"},i=r.__parseFunction(n),s=vs(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 ww(e,t,r,n,i){if(!t)return null;if(bt(t))return{default:()=>t};if(wt(t))return{default:()=>hs(r.__parseExpression(t))};if(Array.isArray(t)&&t.length>0){const s=Ew(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 h=l.length?Ic(f!=null?f:{},l):o(f);return c.map(p=>ur(p,r.__clone(h),e,n))},a),{})}return null}function Ew(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 xw(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`),[])}function Tw(e){return kl()?(Nl(e),!0):!1}const gl=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const $w=e=>e!=null,Ow=()=>{};function Aw(e){return ra()}function jw(e){return Array.isArray(e)?e:[e]}function Rw(...e){if(e.length!==1)return Rl(...e);const t=e[0];return typeof t=="function"?Dl(Cl(()=>({get:t,set:Ow}))):er(t)}function Dw(e,t){Aw()&&Pl(e,t)}const Cw=gl?window:void 0,Pw=gl?window.document:void 0;function kw(e){var t;const r=Ci(e);return(t=r==null?void 0:r.$el)!=null?t:r}function Nw(){const e=er(!1),t=ra();return t&&Bl(()=>{e.value=!0},t),e}function Bw(e){const t=Nw();return ea(()=>(t.value,!!e()))}function Iw(e,t,r={}){const h=r,{window:n=Cw}=h,i=$n(h,["window"]);let s;const o=Bw(()=>n&&"MutationObserver"in n),a=()=>{s&&(s.disconnect(),s=void 0)},u=ea(()=>{const p=Ci(e),d=jw(p).map(kw).filter($w);return new Set(d)}),c=ta(()=>u.value,p=>{a(),o.value&&p.size&&(s=new MutationObserver(t),p.forEach(d=>s.observe(d,i)))},{immediate:!0,flush:"post"}),l=()=>s==null?void 0:s.takeRecords(),f=()=>{c(),a()};return Tw(f),{isSupported:o,stop:f,takeRecords:l}}function Mw(e=null,t={}){var r,n,i;const{document:s=Pw,restoreOnUnmount:o=f=>f}=t,a=(r=s==null?void 0:s.title)!=null?r:"",u=Rw((n=e!=null?e:s==null?void 0:s.title)!=null?n:null),c=!!(e&&typeof e=="function");function l(f){if(!("titleTemplate"in t))return f;const h=t.titleTemplate||"%s";return typeof h=="function"?h(f):Ci(h).replace(/%s/g,f)}return ta(u,(f,h)=>{f!==h&&s&&(s.title=l(f!=null?f:""))},{immediate:!0}),t.observe&&!t.titleTemplate&&s&&!c&&Iw((i=s.head)==null?void 0:i.querySelector("title"),()=>{s&&s.title!==u.value&&(u.value=l(s.title))},{childList:!0}),Dw(()=>{if(o){const f=o(a,u.value||"");f!=null&&s&&(s.title=f)}}),u}const Qo=en({name:"VtjPageContainer",setup(){return L(this,null,function*(){const e=bs(),t=na(),r=t.params.id,n=r?e.getPage(r):e.getHomepage(),i=n?yield e.getRenderComponent(n.id):null,s=er(Symbol());return n&&(Object.assign(t.meta,n.meta||{},{cache:n.cache}),Mw(n.title||"VTJ")),{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?Gn(e,st(z({},t),{key:r})):Gn("div","页面不存在")},activated(){this.meta.cache===!1&&(this.sid=Symbol())}}),Fw={"data-l-h6o7ki7":"",class:"vtj-startup__wrapper"},Lw={"data-l-h6o7ki7":"",class:"vtj-startup"},Vw={"data-l-h6o7ki7":"",class:"vtj-startup__name"},Hw={"data-l-h6o7ki7":""},Uw={"data-l-h6o7ki7":"",class:"vtj-startup__tagline"},zw={"data-l-h6o7ki7":"",class:"vtj-startup__actions"},vl=en({__name:"Startup",props:{name:{default:"VTJ.PRO"},tagline:{default:"基于 Vue3 + TypeScript 快速打造高生产力的低代码研发平台"},actionText:{default:"开始设计"},link:{}},setup(e){((n,i)=>{let s=document.getElementById("h6o7ki7");s||(s=document.createElement("style"),s.id="h6o7ki7",document.head.appendChild(s),s.innerHTML=i)})("h6o7ki7",`
|
|
@@ -103,7 +103,7 @@ version: 2.9.0
|
|
|
103
103
|
font-weight: 700;
|
|
104
104
|
white-space: pre-wrap;
|
|
105
105
|
}
|
|
106
|
-
.vtj-startup__name span[data-l-h6o7ki7]{
|
|
106
|
+
.vtj-startup__name .span[data-l-h6o7ki7]{
|
|
107
107
|
background: -webkit-linear-gradient(120deg, #bd34fe 30%, #41d1ff);
|
|
108
108
|
-webkit-background-clip: text;
|
|
109
109
|
background-clip: text;
|
|
@@ -126,17 +126,18 @@ version: 2.9.0
|
|
|
126
126
|
padding: 20px 0 0 0;
|
|
127
127
|
margin-top: 20px;
|
|
128
128
|
}
|
|
129
|
-
.vtj-startup__actions span[data-l-h6o7ki7]{
|
|
129
|
+
.vtj-startup__actions .span[data-l-h6o7ki7]{
|
|
130
130
|
color: #e6a23c;
|
|
131
131
|
}@media (max-width: 768px){
|
|
132
132
|
|
|
133
|
-
.vtj-startup__actions span[data-l-h6o7ki7]{
|
|
133
|
+
.vtj-startup__actions .span[data-l-h6o7ki7]{
|
|
134
134
|
display: block;
|
|
135
135
|
text-align: center;
|
|
136
136
|
width: 100%;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
.vtj-startup__actions button[data-l-h6o7ki7]{
|
|
139
|
+
.vtj-startup__actions .button[data-l-h6o7ki7]{
|
|
140
|
+
height: 40px;
|
|
140
141
|
padding: 0 20px;
|
|
141
142
|
border-radius: 20px;
|
|
142
143
|
background-color: #409eff;
|
|
@@ -144,13 +145,15 @@ version: 2.9.0
|
|
|
144
145
|
color: #fff;
|
|
145
146
|
font-weight: 600;
|
|
146
147
|
cursor: pointer;
|
|
148
|
+
display: inline-block;
|
|
149
|
+
line-height: 40px;
|
|
147
150
|
}@media (max-width: 768px){
|
|
148
151
|
|
|
149
|
-
.vtj-startup__actions button[data-l-h6o7ki7]{
|
|
152
|
+
.vtj-startup__actions .button[data-l-h6o7ki7]{
|
|
150
153
|
width: 100%;
|
|
151
154
|
margin-top: 20px;
|
|
152
155
|
}
|
|
153
156
|
}
|
|
154
|
-
.vtj-startup__actions button[data-l-h6o7ki7]:hover{
|
|
157
|
+
.vtj-startup__actions .button[data-l-h6o7ki7]:hover{
|
|
155
158
|
opacity: 0.7;
|
|
156
|
-
}`);const t=e,r=()=>{if(typeof window<"u"){if(t.link){typeof t.link=="function"?t.link():window.location.href=t.link;return}let n=(window.__VTJ_LINK__||{}).href||window.location.pathname+"__vtj__/#/";window.location.href=n}};return(n,i)=>(Yn(),Al("div",Fw,[Zt("div",Lw,[Zt("h1",Vw,[Zt("span",Hw,jn(t.name),1)]),Zt("div",Uw,jn(t.tagline),1),Zt("div",zw,[i[0]||(i[0]=Zt("span",{"data-l-h6o7ki7":""},"设置项目主页后,将替换此页面显示",-1)),Zt("button",{"data-l-h6o7ki7":"",onClick:r},jn(t.actionText),1)])])]))}}),qw=en({name:"VtjStartupContainer",render(){return Gn(vl)}}),ys=Symbol("Provider");var yl=(e=>(e.Production="production",e.Development="development",e))(yl||{});class bl extends Kc{constructor(r){super();A(this,"mode");A(this,"globals",{});A(this,"modules",{});A(this,"adapter",{request:cr,jsonp:us});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:h="./",nodeEnv:p="development"}=r;this.mode=i,this.modules=l,this.service=n,this.router=f,this.materialPath=h,this.nodeEnv=p,s&&(this.dependencies=s),o&&(this.materials=o),Object.assign(this.globals,c),Object.assign(this.adapter,u);const{access:d,request:m}=this.adapter;d&&d.connect({mode:i,router:f,request:m}),a&&i!==ht.Design?this.load(a):this.project=a,ce.setup({timeout:"50-500"})}createMock(r){return(...n)=>L(this,null,function*(){let i={};if(r)try{i=yield r.apply(r,n)}catch(s){ae.warn("模拟数据模版异常",s)}return ce.mock(i)})}load(r){return L(this,null,function*(){const n=this.modules[`.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.CKEDITOR_VERSION=void 0,this.mode===ht.Raw?yield this.loadDependencies(o):yield this.loadAssets(o),this.apis=ul(i,s,this.adapter),ms(),ll(i),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}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:h,materialMapLibrary:p}=Gu(n,a,u==="development");for(const d of c){const m=i[d],b=r[d];if(b)s[d]=b;else if(m)r[d]=s[d]=yield m();else{const E=l[d]||[];for(const g of E)En(g)&&(yield Qu(d,oe.append(g,{v:Ae}))),Sn(g)&&(yield Ai(oe.append(g,{v:Ae})));s[d]=r[d]}}if(u==="development"){for(const m of f)yield Ai(oe.append(m,{v:Ae}));const d=this.materials||{};for(const m of h){const b=r[p[m]],E=qc[m];if(E)b&&E.forEach(g=>{o[g]=b[g]});else{const g=d[m]?(yield d[m]()).default:r[m];g&&b&&(g.components||[]).forEach(y=>{o[y.name]=Zu(y,b)})}}}})}initRouter(){const{router:r,project:n,options:i,adapter:s}=this;if(!r)return;const{routeAppendTo:o,pageRouteName:a="page",routeMeta:u}=i,c=o?"":"/",l={path:`${c}${a}/:id`,name:je,component:Qo},f={path:c,name:Xe,component:n!=null&&n.homepage?Qo:s.startupComponent||qw,meta:u};r.hasRoute(je)&&r.removeRoute(je),r.hasRoute(Xe)&&r.removeRoute(Xe),o?(r.addRoute(o,l),r.addRoute(o,f)):(r.addRoute(l),r.addRoute(f))}install(r){const n=r.config.globalProperties.installed||{};for(const[i,s]of Object.entries(this.library))!n[i]&&el(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(ys,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`];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.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>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=tn({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 Xr(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 ae.warn(`Can not find file: ${r}`),null;n&&n(i);const s=`.vtj/vue/${r}.vue`,o=this.modules[s];if(o)return(u=yield o())==null?void 0:u.default;const a=yield this.getDsl(i.id);return a?this.createDslRenderer(a).renderer:(ae.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return xs(()=>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 xs(()=>L(this,null,function*(){return yield gs(r,window)}))}}function Kw(e){const t=new bl(e);return{provider:t,onReady:r=>t.ready(r)}}function bs(e={}){const t=Xo(ys);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 _l={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var t;return((t=e.data)==null?void 0:t.code)===0}},Jw=(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:_l}),Ww=(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({},_l),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function Yw(e){return wn({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 xn{constructor(t=cr){A(this,"api");A(this,"pluginCaches",{});A(this,"uploader");this.api=Jw(t),this.uploader=Ww(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=>Wu(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=cr.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 cs({type:"local",expired:0,prefix:"__VTJ_"});class Gw extends xn{init(t){const r=new le(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 le(t);return mt.save(`project_${r.id}`,r.toDsl()),Promise.resolve(!0)}saveMaterials(t,r){return mt.save(`materials_${t.id}`,hn(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 Xi(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 wl extends xn{constructor(){super(...arguments);A(this,"projects",{});A(this,"materials",{});A(this,"files",{});A(this,"histories",{});A(this,"historyItems",{})}init(r){const n=new le(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 le(r);return this.projects[n.id]=n.toDsl(),Promise.resolve(!0)}saveMaterials(r,n){return r.id&&(this.materials[r.id]=hn(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 Xi(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 Wn=null;function Zw(){return Wn||(Wn=new wl,Wn)}class Qw extends xn{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:hn(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 El(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?El(e,t,a):void 0}})}function Sl(e,t){if(!t)return e;let r=[];for(const n of e)if(n.children&&n.children.length){const i=Sl(n.children,t);i.length&&(n.children=i,r.push(n))}else t.can(n.id.toString())&&r.push(n);return r}function Xw(e){const{menuPathPrefix:t="",pageRouteName:r="page",disableMenusFilter:n=!1}=e||{},i=bs(),s=na(),o=ol(),a=er(!1),u=er(!1),c=i.project;jl(()=>{const{name:h,params:p,meta:d}=s;if(h===je){const m=i.getPage(p.id);a.value=!(m!=null&&m.mask),u.value=!!(m!=null&&m.pure)}else if(h===Xe){const m=i.getHomepage();a.value=!(m!=null&&m.mask),u.value=!!(m!=null&&m.pure)}else a.value=!d.mask,u.value=!!d.pure});const l=El(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:Sl(l,o),pure:u}}const U2=Object.freeze(Object.defineProperty({__proto__:null,ACCESS_KEY:ds,Access:sl,BUILD_IN_TAGS:Ju,BUILT_IN_DIRECTIVES:zu,BaseService:xn,CONTEXT_HOST:Ri,Context:pl,ContextMode:ht,DATA_TYPES:qu,HOMEPAGE_ROUTE_NAME:Xe,HTML_TAGS:Ku,JSCodeToString:Q_,LIFE_CYCLES_LIST:Y_,LocalService:Qw,MemoryService:wl,NodeEnv:yl,PAGE_ROUTE_NAME:je,Provider:bl,Startup:vl,StorageService:Gw,VTJ_RENDERER_VERSION:Ae,adoptedStyleSheets:ps,clearLoaderCache:uw,createAdapter:tw,createAssetScripts:G_,createAssetsCss:Z_,createDataSources:dl,createLoader:tn,createMemoryService:Zw,createMetaApi:cl,createMock:fl,createProvider:Kw,createRenderer:Xr,createSchemaApi:al,createSchemaApis:ul,createServiceRequest:Yw,defaultLoader:ml,fillBasePath:Ge,getModifiers:vs,getPlugin:gs,getRawComponent:Zu,isBuiltInTag:rl,isCSSUrl:En,isJSCode:il,isJSExpression:wt,isJSFunction:Fe,isJSON:Wu,isJSUrl:Sn,isNativeTag:nl,isVuePlugin:el,loadCss:Qu,loadCssUrl:Xu,loadScriptUrl:tl,mockApi:hl,mockApis:ll,mockCleanup:ms,nodeRender:ur,parseDeps:Gu,parseExpression:ke,parseFunction:Qr,providerKey:ys,removeProdFlag:Yu,toString:hs,useAccess:ol,useMask:Xw,useProvider:bs},Symbol.toStringTag,{value:"Module"})),t2=en({__name:"app",setup(e){return(t,r)=>{const n=Il("router-view");return Yn(),Ts($s(zl),{locale:$s(Ul)},{default:Os(()=>[(Yn(),Ts(Ml,null,{default:Os(()=>[Fl(n)]),_:1}))]),_:1},8,["locale"])}}}),e2=[{path:"/",name:"home",component:()=>He(()=>import("./index-Cpqt6Feh.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:()=>He(()=>import("./preview-CzAOOAIK.js"),__vite__mapDeps([21,13,14,1,2,3,4,5,6,7,8,9,10,11,12,15,16,17,18]),import.meta.url)},{path:"/page/:id",name:"page",component:()=>He(()=>import("./page-CQqoEMgm.js"),__vite__mapDeps([22,13,14,1,2,3,4,5,6,7,8,9,10,11,12,15,16,17,18]),import.meta.url),meta:{pure:!0}},{path:"/pages/:id",name:"page",component:()=>He(()=>import("./uni-page-Bjgk97mC.js"),__vite__mapDeps([23,1,2,19,24]),import.meta.url),meta:{pure:!0}},{path:"/auth",name:"auth",component:()=>He(()=>import("./auth-BGXpoaj0.js"),__vite__mapDeps([25,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,26]),import.meta.url)}],r2=Vl({history:Hl(),routes:e2}),n2="RRO_IDE_ACCESS_STORAGE__",_s=Ll(t2),i2=new sl({storageKey:n2});_s.use(i2);_s.use(r2);_s.mount("#app");export{Qc as $,n2 as A,Gc as B,Zc as C,Kw as D,G as E,J_ as F,nt as G,Yw as H,tw as I,ue as J,j0 as K,ba as L,Ye as M,Qw as N,Dt as O,us as P,re as Q,by as R,dy as S,sl as T,Xi as U,Br as V,Zi as W,oi as X,R0 as Y,ct as Z,Qi as _,Vr as a,e1 as a0,ic as a1,o1 as a2,Gu as a3,Z_ as a4,G_ as a5,n1 as a6,Zu as a7,ul as a8,ms as a9,ll as aa,Wr as ab,qi as ac,uw as ad,wt as ae,Fe as af,x_ as ag,ke as ah,Qr as ai,Je as aj,zu as ak,u1 as al,Q_ as am,Y_ as an,qu as ao,fl as ap,T_ as aq,k0 as ar,Hi as as,U2 as at,b2 as au,H2 as av,En as aw,Sn as ax,Xu as ay,tl as az,K_ as b,Bc as c,O_ as d,gt as e,sr as f,ps as g,ae as h,Kc as i,Oc as j,le as k,M as l,cy as m,Te as n,bt as o,it as p,Se as q,We as r,pi as s,hi as t,li as u,Nt as v,bl as w,A_ as x,ht as y,Nc as z};
|
|
159
|
+
}`);const t=e,r=()=>{if(typeof window<"u"){if(t.link){typeof t.link=="function"?t.link():window.location.href=t.link;return}let n=(window.__VTJ_LINK__||{}).href||window.location.pathname+"__vtj__/#/";window.location.href=n}};return(n,i)=>(Yn(),Al("div",Fw,[Zt("div",Lw,[Zt("h1",Vw,[Zt("span",Hw,jn(t.name),1)]),Zt("div",Uw,jn(t.tagline),1),Zt("div",zw,[i[0]||(i[0]=Zt("span",{"data-l-h6o7ki7":"",class:"span"},"设置项目主页后,将替换此页面显示",-1)),Zt("span",{"data-l-h6o7ki7":"",class:"button",onClick:r},jn(t.actionText),1)])])]))}}),qw=en({name:"VtjStartupContainer",render(){return Gn(vl)}}),ys=Symbol("Provider");var yl=(e=>(e.Production="production",e.Development="development",e))(yl||{});class bl extends Kc{constructor(r){super();A(this,"mode");A(this,"globals",{});A(this,"modules",{});A(this,"adapter",{request:cr,jsonp:us});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:h="./",nodeEnv:p="development"}=r;this.mode=i,this.modules=l,this.service=n,this.router=f,this.materialPath=h,this.nodeEnv=p,s&&(this.dependencies=s),o&&(this.materials=o),Object.assign(this.globals,c),Object.assign(this.adapter,u);const{access:d,request:m}=this.adapter;d&&d.connect({mode:i,router:f,request:m}),a&&i!==ht.Design?this.load(a):this.project=a,ce.setup({timeout:"50-500"})}createMock(r){return(...n)=>L(this,null,function*(){let i={};if(r)try{i=yield r.apply(r,n)}catch(s){ae.warn("模拟数据模版异常",s)}return ce.mock(i)})}load(r){return L(this,null,function*(){const n=this.modules[`.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.CKEDITOR_VERSION=void 0,this.mode===ht.Raw?yield this.loadDependencies(o):yield this.loadAssets(o),this.apis=ul(i,s,this.adapter),ms(),ll(i),r.platform!=="uniapp"&&this.initRouter(),this.triggerReady()})}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:h,materialMapLibrary:p}=Gu(n,a,u==="development");for(const d of c){const m=i[d],b=r[d];if(b)s[d]=b;else if(m)r[d]=s[d]=yield m();else{const E=l[d]||[];for(const g of E)En(g)&&(yield Qu(d,oe.append(g,{v:Ae}))),Sn(g)&&(yield Ai(oe.append(g,{v:Ae})));s[d]=r[d]}}if(u==="development"){for(const m of f)yield Ai(oe.append(m,{v:Ae}));const d=this.materials||{};for(const m of h){const b=r[p[m]],E=qc[m];if(E)b&&E.forEach(g=>{o[g]=b[g]});else{const g=d[m]?(yield d[m]()).default:r[m];g&&b&&(g.components||[]).forEach(y=>{o[y.name]=Zu(y,b)})}}}})}initRouter(){const{router:r,project:n,options:i,adapter:s}=this;if(!r)return;const{routeAppendTo:o,pageRouteName:a="page",routeMeta:u}=i,c=o?"":"/",l={path:`${c}${a}/:id`,name:je,component:Qo},f={path:c,name:Xe,component:n!=null&&n.homepage?Qo:s.startupComponent||qw,meta:u};r.hasRoute(je)&&r.removeRoute(je),r.hasRoute(Xe)&&r.removeRoute(Xe),o?(r.addRoute(o,l),r.addRoute(o,f)):(r.addRoute(l),r.addRoute(f))}install(r){const n=r.config.globalProperties.installed||{};for(const[i,s]of Object.entries(this.library))!n[i]&&el(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(ys,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`];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.urlDslCaches[r]=this.adapter.request.send({url:r,method:"get",settings:{validSuccess:!1,originResponse:!0}}).then(i=>i.data).catch(()=>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=tn({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 Xr(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 ae.warn(`Can not find file: ${r}`),null;n&&n(i);const s=`.vtj/vue/${r}.vue`,o=this.modules[s];if(o)return(u=yield o())==null?void 0:u.default;const a=yield this.getDsl(i.id);return a?this.createDslRenderer(a).renderer:(ae.warn(`Can not find dsl: ${r}`),null)})}defineUrlSchemaComponent(r,n){return xs(()=>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 xs(()=>L(this,null,function*(){return yield gs(r,window)}))}}function Kw(e){const t=new bl(e);return{provider:t,onReady:r=>t.ready(r)}}function bs(e={}){const t=Xo(ys);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 _l={type:"json",validSuccess:!0,originResponse:!1,failMessage:!0,validate:e=>{var t;return((t=e.data)==null?void 0:t.code)===0}},Jw=(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:_l}),Ww=(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({},_l),{type:"data"})}).then(i=>i&&i[0]?i[0]:null).catch(()=>null)});function Yw(e){return wn({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 xn{constructor(t=cr){A(this,"api");A(this,"pluginCaches",{});A(this,"uploader");this.api=Jw(t),this.uploader=Ww(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=>Wu(s))[0];return n?this.pluginCaches[n]||(this.pluginCaches[n]=cr.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 cs({type:"local",expired:0,prefix:"__VTJ_"});class Gw extends xn{init(t){const r=new le(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 le(t);return mt.save(`project_${r.id}`,r.toDsl()),Promise.resolve(!0)}saveMaterials(t,r){return mt.save(`materials_${t.id}`,hn(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 Xi(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 wl extends xn{constructor(){super(...arguments);A(this,"projects",{});A(this,"materials",{});A(this,"files",{});A(this,"histories",{});A(this,"historyItems",{})}init(r){const n=new le(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 le(r);return this.projects[n.id]=n.toDsl(),Promise.resolve(!0)}saveMaterials(r,n){return r.id&&(this.materials[r.id]=hn(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 Xi(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 Wn=null;function Zw(){return Wn||(Wn=new wl,Wn)}class Qw extends xn{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:hn(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 El(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?El(e,t,a):void 0}})}function Sl(e,t){if(!t)return e;let r=[];for(const n of e)if(n.children&&n.children.length){const i=Sl(n.children,t);i.length&&(n.children=i,r.push(n))}else t.can(n.id.toString())&&r.push(n);return r}function Xw(e){const{menuPathPrefix:t="",pageRouteName:r="page",disableMenusFilter:n=!1}=e||{},i=bs(),s=na(),o=ol(),a=er(!1),u=er(!1),c=i.project;jl(()=>{const{name:h,params:p,meta:d}=s;if(h===je){const m=i.getPage(p.id);a.value=!(m!=null&&m.mask),u.value=!!(m!=null&&m.pure)}else if(h===Xe){const m=i.getHomepage();a.value=!(m!=null&&m.mask),u.value=!!(m!=null&&m.pure)}else a.value=!d.mask,u.value=!!d.pure});const l=El(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:Sl(l,o),pure:u}}const U2=Object.freeze(Object.defineProperty({__proto__:null,ACCESS_KEY:ds,Access:sl,BUILD_IN_TAGS:Ju,BUILT_IN_DIRECTIVES:zu,BaseService:xn,CONTEXT_HOST:Ri,Context:pl,ContextMode:ht,DATA_TYPES:qu,HOMEPAGE_ROUTE_NAME:Xe,HTML_TAGS:Ku,JSCodeToString:Q_,LIFE_CYCLES_LIST:Y_,LocalService:Qw,MemoryService:wl,NodeEnv:yl,PAGE_ROUTE_NAME:je,Provider:bl,Startup:vl,StorageService:Gw,VTJ_RENDERER_VERSION:Ae,adoptedStyleSheets:ps,clearLoaderCache:uw,createAdapter:tw,createAssetScripts:G_,createAssetsCss:Z_,createDataSources:dl,createLoader:tn,createMemoryService:Zw,createMetaApi:cl,createMock:fl,createProvider:Kw,createRenderer:Xr,createSchemaApi:al,createSchemaApis:ul,createServiceRequest:Yw,defaultLoader:ml,fillBasePath:Ge,getModifiers:vs,getPlugin:gs,getRawComponent:Zu,isBuiltInTag:rl,isCSSUrl:En,isJSCode:il,isJSExpression:wt,isJSFunction:Fe,isJSON:Wu,isJSUrl:Sn,isNativeTag:nl,isVuePlugin:el,loadCss:Qu,loadCssUrl:Xu,loadScriptUrl:tl,mockApi:hl,mockApis:ll,mockCleanup:ms,nodeRender:ur,parseDeps:Gu,parseExpression:ke,parseFunction:Qr,providerKey:ys,removeProdFlag:Yu,toString:hs,useAccess:ol,useMask:Xw,useProvider:bs},Symbol.toStringTag,{value:"Module"})),t2=en({__name:"app",setup(e){return(t,r)=>{const n=Il("router-view");return Yn(),Ts($s(zl),{locale:$s(Ul)},{default:Os(()=>[(Yn(),Ts(Ml,null,{default:Os(()=>[Fl(n)]),_:1}))]),_:1},8,["locale"])}}}),e2=[{path:"/",name:"home",component:()=>He(()=>import("./index-CjCB3fdP.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:()=>He(()=>import("./preview-D0HVXEab.js"),__vite__mapDeps([21,13,14,1,2,3,4,5,6,7,8,9,10,11,12,15,16,17,18]),import.meta.url)},{path:"/page/:id",name:"page",component:()=>He(()=>import("./page-Ds_VZDL0.js"),__vite__mapDeps([22,13,14,1,2,3,4,5,6,7,8,9,10,11,12,15,16,17,18]),import.meta.url),meta:{pure:!0}},{path:"/pages/:id",name:"page",component:()=>He(()=>import("./uni-page-Bjgk97mC.js"),__vite__mapDeps([23,1,2,19,24]),import.meta.url),meta:{pure:!0}},{path:"/auth",name:"auth",component:()=>He(()=>import("./auth-Dm4VSrWL.js"),__vite__mapDeps([25,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,26]),import.meta.url)}],r2=Vl({history:Hl(),routes:e2}),n2="RRO_IDE_ACCESS_STORAGE__",_s=Ll(t2),i2=new sl({storageKey:n2});_s.use(i2);_s.use(r2);_s.mount("#app");export{Qc as $,n2 as A,Gc as B,Zc as C,Kw as D,G as E,J_ as F,nt as G,Yw as H,tw as I,ue as J,j0 as K,ba as L,Ye as M,Qw as N,Dt as O,us as P,re as Q,by as R,dy as S,sl as T,Xi as U,Br as V,Zi as W,oi as X,R0 as Y,ct as Z,Qi as _,Vr as a,e1 as a0,ic as a1,o1 as a2,Gu as a3,Z_ as a4,G_ as a5,n1 as a6,Zu as a7,ul as a8,ms as a9,ll as aa,Wr as ab,qi as ac,uw as ad,wt as ae,Fe as af,x_ as ag,ke as ah,Qr as ai,Je as aj,zu as ak,u1 as al,Q_ as am,Y_ as an,qu as ao,fl as ap,T_ as aq,k0 as ar,Hi as as,U2 as at,b2 as au,H2 as av,En as aw,Sn as ax,Xu as ay,tl as az,K_ as b,Bc as c,O_ as d,gt as e,sr as f,ps as g,ae as h,Kc as i,Oc as j,le as k,M as l,cy as m,Te as n,bt as o,it as p,Se as q,We as r,pi as s,hi as t,li as u,Nt as v,bl as w,A_ as x,ht as y,Nc as z};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-D8EXeL0F.js","./vue-DnfbZNhx.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var h=Object.defineProperty,T=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var P=(o,t,e)=>t in o?h(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,g=(o,t)=>{for(var e in t||(t={}))I.call(t,e)&&P(o,e,t[e]);if(A)for(var e of A(t))S.call(t,e)&&P(o,e,t[e]);return o},l=(o,t)=>T(o,D(t));var E=(o,t,e)=>new Promise((_,i)=>{var p=a=>{try{s(e.next(a))}catch(m){i(m)}},c=a=>{try{s(e.throw(a))}catch(m){i(m)}},s=a=>a.done?_(a.value):Promise.resolve(a.value).then(p,c);s((e=e.apply(o,t)).next())});import{_ as R}from"./monaco-editor-BfuwkNVi.js";import{useRoute as V}from"./vue-router-D8EXeL0F.js";import{I as L,N as k,H,T as K,A as N,D as b,y as j}from"./index-
|
|
2
|
+
var h=Object.defineProperty,T=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var P=(o,t,e)=>t in o?h(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,g=(o,t)=>{for(var e in t||(t={}))I.call(t,e)&&P(o,e,t[e]);if(A)for(var e of A(t))S.call(t,e)&&P(o,e,t[e]);return o},l=(o,t)=>T(o,D(t));var E=(o,t,e)=>new Promise((_,i)=>{var p=a=>{try{s(e.next(a))}catch(m){i(m)}},c=a=>{try{s(e.throw(a))}catch(m){i(m)}},s=a=>a.done?_(a.value):Promise.resolve(a.value).then(p,c);s((e=e.apply(o,t)).next())});import{_ as R}from"./monaco-editor-BfuwkNVi.js";import{useRoute as V}from"./vue-router-D8EXeL0F.js";import{I as L,N as k,H,T as K,A as N,D as b,y as j}from"./index-D_jXIdCI.js";import{a as G}from"./element-plus-DQ6lwucB.js";import"./vxe-DAcKvQ6r.js";import{E as M,B as Y}from"./extension-BdA8H1Cf.js";import{n as w,l as q}from"./utils-QKipar_R.js";import{d as z,aB as x,e as F,h as J,K as Q,O as U,P as W,o as X}from"./vue-DnfbZNhx.js";import"./mockjs-DPQI6pPj.js";import"./dayjs-DO-COJPZ.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-PLVskUkm.js";import"./@element-plus-icons-vue-CKT2Xck5.js";import"./shared-CFJLz5mK.js";import"./html2canvas-CIV5arX1.js";const lt=z({__name:"page",setup(o){return E(this,null,function*(){let t,e;const _=L({loading:q,notify:w}),i=new k(H(w)),p=([t,e]=x(()=>i.getExtension().catch(()=>null)),t=yield t,e(),t),{options:c,adapters:s}=p?([t,e]=x(()=>new M(p).load()),t=yield t,e(),t):{},{__BASE_PATH__:a="/"}=p||{},m=s==null?void 0:s.access,B=s==null?void 0:s.remote,O=m?new K(l(g({},m),{alert:G.alert,storageKey:N})):void 0,{provider:y,onReady:f}=b(l(g({mode:j.Runtime,service:i,materialPath:a,adapter:Object.assign(_,{access:O,remote:B},(c==null?void 0:c.adapter)||{})},c||{}),{dependencies:{Vue:()=>R(()=>import("./vue-DnfbZNhx.js").then(r=>r.ay),[],import.meta.url),VueRouter:()=>R(()=>import("./vue-router-D8EXeL0F.js"),__vite__mapDeps([0,1]),import.meta.url)}})),v=V(),u=F(),d=J();return f(()=>E(this,null,function*(){const r=d==null?void 0:d.appContext.app;r&&(r.use(Y),r.use(y)),u.value=yield y.getRenderComponent(v.params.id.toString(),n=>{Object.assign(v.meta,n.meta);const C=r==null?void 0:r._container;(n==null?void 0:n.type)==="page"&&C.classList.add("is-page"),(n==null?void 0:n.pure)&&C.classList.add("is-pure")})})),(r,n)=>u.value?(X(),Q(W(u.value),{key:0})):U("",!0)})}});export{lt as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vue-router-D8EXeL0F.js","./vue-DnfbZNhx.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var h=Object.defineProperty,T=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var w=(o,t,e)=>t in o?h(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,l=(o,t)=>{for(var e in t||(t={}))I.call(t,e)&&w(o,e,t[e]);if(C)for(var e of C(t))S.call(t,e)&&w(o,e,t[e]);return o},A=(o,t)=>T(o,D(t));var g=(o,t,e)=>new Promise((_,i)=>{var p=a=>{try{s(e.next(a))}catch(m){i(m)}},c=a=>{try{s(e.throw(a))}catch(m){i(m)}},s=a=>a.done?_(a.value):Promise.resolve(a.value).then(p,c);s((e=e.apply(o,t)).next())});import{_ as P}from"./monaco-editor-BfuwkNVi.js";import{useRoute as V}from"./vue-router-D8EXeL0F.js";import{a as L}from"./element-plus-DQ6lwucB.js";import"./vxe-DAcKvQ6r.js";import{E as k,B as H}from"./extension-
|
|
2
|
+
var h=Object.defineProperty,T=Object.defineProperties;var D=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var w=(o,t,e)=>t in o?h(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e,l=(o,t)=>{for(var e in t||(t={}))I.call(t,e)&&w(o,e,t[e]);if(C)for(var e of C(t))S.call(t,e)&&w(o,e,t[e]);return o},A=(o,t)=>T(o,D(t));var g=(o,t,e)=>new Promise((_,i)=>{var p=a=>{try{s(e.next(a))}catch(m){i(m)}},c=a=>{try{s(e.throw(a))}catch(m){i(m)}},s=a=>a.done?_(a.value):Promise.resolve(a.value).then(p,c);s((e=e.apply(o,t)).next())});import{_ as P}from"./monaco-editor-BfuwkNVi.js";import{useRoute as V}from"./vue-router-D8EXeL0F.js";import{a as L}from"./element-plus-DQ6lwucB.js";import"./vxe-DAcKvQ6r.js";import{E as k,B as H}from"./extension-BdA8H1Cf.js";import{I as K,N,H as b,T as j,A as G,D as M,y as Y}from"./index-D_jXIdCI.js";import{n as R,l as q}from"./utils-QKipar_R.js";import{d as z,aB as x,e as F,h as J,K as Q,O as U,P as W,o as X}from"./vue-DnfbZNhx.js";import"./lodash-es-BL-d_OSa.js";import"./@vueuse-PLVskUkm.js";import"./@element-plus-icons-vue-CKT2Xck5.js";import"./shared-CFJLz5mK.js";import"./dayjs-DO-COJPZ.js";import"./html2canvas-CIV5arX1.js";import"./mockjs-DPQI6pPj.js";const gt=z({__name:"preview",setup(o){return g(this,null,function*(){let t,e;const _=K({loading:q,notify:R}),i=new N(b(R)),p=([t,e]=x(()=>i.getExtension().catch(()=>null)),t=yield t,e(),t),{options:c,adapters:s}=p?([t,e]=x(()=>new k(p).load()),t=yield t,e(),t):{},{__BASE_PATH__:a="/"}=p||{},m=s==null?void 0:s.access,B=s==null?void 0:s.remote,O=m?new j(l({alert:L.alert,storageKey:G},m)):void 0,{provider:E,onReady:f}=M(A(l({mode:Y.Runtime,service:i,materialPath:a},c||{}),{adapter:Object.assign(_,{access:O,remote:B},(c==null?void 0:c.adapter)||{}),dependencies:{Vue:()=>P(()=>import("./vue-DnfbZNhx.js").then(r=>r.ay),[],import.meta.url),VueRouter:()=>P(()=>import("./vue-router-D8EXeL0F.js"),__vite__mapDeps([0,1]),import.meta.url)}})),v=V(),u=F(),d=J();return f(()=>g(this,null,function*(){const r=d==null?void 0:d.appContext.app;r&&(r.use(H),r.use(E)),u.value=yield E.getRenderComponent(v.params.id.toString(),n=>{Object.assign(v.meta,n.meta);const y=r==null?void 0:r._container;(n==null?void 0:n.type)==="page"&&y.classList.add("is-page"),(n==null?void 0:n.pure)&&y.classList.add("is-pure")})})),(r,n)=>u.value?(X(),Q(W(u.value),{key:0})):U("",!0)})}});export{gt as default};
|
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__ = '
|
|
12
|
+
var __BUILD_TIME__ = '1740012610657';
|
|
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
|
-
<!--{{
|
|
28
|
+
<!--{{1740012610657}}-->
|
|
29
29
|
|
|
30
|
-
<script type="module" crossorigin src="./assets/index-
|
|
30
|
+
<script type="module" crossorigin src="./assets/index-D_jXIdCI.js"></script>
|
|
31
31
|
<link rel="modulepreload" crossorigin href="./assets/vue-DnfbZNhx.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="./assets/dayjs-DO-COJPZ.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="./assets/mockjs-DPQI6pPj.js">
|