@vtj/renderer 0.9.23 → 0.9.25

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/index.mjs CHANGED
@@ -1,18 +1,18 @@
1
1
  import { Base as Ie, BUILT_IN_COMPONENTS as Me, ProjectModel as O, HistoryModel as de } from "@vtj/core";
2
2
  import { isUrl as De, url as x, dedupArray as He, isString as j, isFunction as z, logger as P, storage as L, cookie as q, toArray as ie, unRSA as oe, delay as pe, createRequest as fe, jsonp as he, merge as Oe, pathToRegexp as Be, pathToRegexpMatch as Ne, formDataToJson as Ue, camelCase as $, upperFirst as Le, pick as qe, request as K, loadScript as ae, Storage as Je, mapToObject as X } from "@vtj/utils";
3
3
  import * as N from "vue";
4
- import { inject as me, toRef as Ve, readonly as ze, customRef as Ke, ref as T, onBeforeUnmount as We, getCurrentScope as Ge, onScopeDispose as Ye, unref as Qe, getCurrentInstance as ge, watch as ve, computed as ye, onMounted as Xe, defineComponent as Z, h as W, openBlock as Ze, createElementBlock as et, createElementVNode as E, toDisplayString as J, defineAsyncComponent as ce, watchEffect as tt } from "vue";
5
- import k from "mockjs";
4
+ import { inject as me, toRef as Ve, readonly as ze, customRef as Ke, ref as F, onBeforeUnmount as We, getCurrentScope as Ge, onScopeDispose as Ye, getCurrentInstance as ge, watch as ye, computed as ve, toValue as Z, onMounted as Qe, defineComponent as ee, h as W, openBlock as Xe, createElementBlock as Ze, createElementVNode as E, toDisplayString as J, defineAsyncComponent as ce, watchEffect as et } from "vue";
5
+ import R from "mockjs";
6
6
  import { useRoute as _e } from "vue-router";
7
7
  /**!
8
8
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
9
9
  * @name @vtj/renderer
10
10
  * @author CHC chenhuachun1549@dingtalk.com
11
- * @version 0.9.23
11
+ * @version 0.9.25
12
12
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
13
13
  */
14
- const C = "0.9.23";
15
- var y = /* @__PURE__ */ ((s) => (s.Runtime = "Runtime", s.Design = "Design", s.Raw = "Raw", s.VNode = "VNode", s))(y || {});
14
+ const C = "0.9.25";
15
+ var v = /* @__PURE__ */ ((s) => (s.Runtime = "Runtime", s.Design = "Design", s.Raw = "Raw", s.VNode = "VNode", s))(v || {});
16
16
  const le = [
17
17
  "$el",
18
18
  "$emit",
@@ -39,14 +39,14 @@ const le = [
39
39
  "renderTriggered",
40
40
  "activated",
41
41
  "deactivated"
42
- ], nt = [
42
+ ], tt = [
43
43
  "vIf",
44
44
  "vShow",
45
45
  "vModel",
46
46
  "vFor",
47
47
  "vBind",
48
48
  "vHtml"
49
- ], st = {
49
+ ], nt = {
50
50
  String,
51
51
  Number,
52
52
  Boolean,
@@ -54,19 +54,19 @@ const le = [
54
54
  Object,
55
55
  Function,
56
56
  Date
57
- }, F = "VtjPage", H = "VtjHomepage", rt = "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(
57
+ }, A = "VtjPage", H = "VtjHomepage", st = "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(
58
58
  ","
59
- ), it = "component,slot".split(",");
59
+ ), rt = "component,slot".split(",");
60
60
  function M(s, e) {
61
61
  return s.map((t) => De(t) || t.startsWith("/") ? t : `${e}${t}`);
62
62
  }
63
- function ee(s) {
63
+ function te(s) {
64
64
  return /\.css$/.test(s);
65
65
  }
66
- function te(s) {
66
+ function ne(s) {
67
67
  return /\.js$/.test(s);
68
68
  }
69
- function ot(s) {
69
+ function it(s) {
70
70
  return /\.json$/.test(s);
71
71
  }
72
72
  function Cn(s) {
@@ -74,20 +74,20 @@ function Cn(s) {
74
74
  (e) => `<script src="${x.append(e, { v: C })}"><\/script>`
75
75
  ).join("");
76
76
  }
77
- function Fn(s = []) {
77
+ function An(s = []) {
78
78
  return s.map(
79
79
  (e) => `<link rel="stylesheet" href="${x.append(e, { v: C })}" />`
80
80
  ).join("");
81
81
  }
82
- function at(s, e = !1) {
82
+ function ot(s, e = !1) {
83
83
  return e && s.endsWith(".prod.js") ? s.replace(".prod.js", ".js") : s;
84
84
  }
85
- function ct(s, e, t = !1) {
85
+ function at(s, e, t = !1) {
86
86
  const n = s.filter((d) => !!d.enabled), r = [], i = [], a = [], o = [], c = {}, l = {}, f = [], u = {};
87
87
  return n.forEach(
88
88
  ({ urls: d, assetsUrl: h, library: m, assetsLibrary: p, localeLibrary: w }) => {
89
89
  d?.forEach((g) => {
90
- te(g) && r.push(at(g, t)), ee(g) && i.push(g);
90
+ ne(g) && r.push(ot(g, t)), te(g) && i.push(g);
91
91
  }), m && (o.push(m), c[m] = M(d || [], e), w && (l[m] = w)), h && a.push(h), p && f.push(p), m && p && (u[p] = m);
92
92
  }
93
93
  ), {
@@ -101,7 +101,7 @@ function ct(s, e, t = !1) {
101
101
  libraryLocaleMap: l
102
102
  };
103
103
  }
104
- function lt(s, e) {
104
+ function ct(s, e) {
105
105
  const { name: t, parent: n, alias: r } = s;
106
106
  return n ? e[n]?.[r || t] : e[r || t];
107
107
  }
@@ -123,11 +123,11 @@ function Se(s, e, t) {
123
123
  i ? i.innerHTML = t : (i = r.createElement("style"), i.id = e, i.innerHTML = t, r.head.appendChild(i));
124
124
  }
125
125
  }
126
- async function ut(s, e) {
126
+ async function lt(s, e) {
127
127
  const t = await window.fetch(e).then((n) => n.text()).catch(() => "");
128
128
  t && Se(window, s, t);
129
129
  }
130
- function dt(s, e = window) {
130
+ function ut(s, e = window) {
131
131
  const t = e.document, n = e.document.head;
132
132
  for (const r of s)
133
133
  if (!t.getElementById(r)) {
@@ -135,7 +135,7 @@ function dt(s, e = window) {
135
135
  a.rel = "stylesheet", a.id = r, a.href = r, n.appendChild(a);
136
136
  }
137
137
  }
138
- async function pt(s, e, t = window) {
138
+ async function dt(s, e, t = window) {
139
139
  const n = t.document, r = t.document.head;
140
140
  let i = t[e];
141
141
  return i ? i.default || i : new Promise((a, o) => {
@@ -149,16 +149,16 @@ async function pt(s, e, t = window) {
149
149
  }
150
150
  });
151
151
  }
152
- function ft(s) {
152
+ function pt(s) {
153
153
  return z(s) || z(s?.install);
154
154
  }
155
- function ht(s) {
156
- return it.includes(s);
157
- }
158
- function mt(s) {
155
+ function ft(s) {
159
156
  return rt.includes(s);
160
157
  }
161
- function A(s, e, t = !1, n = !1) {
158
+ function ht(s) {
159
+ return st.includes(s);
160
+ }
161
+ function T(s, e, t = !1, n = !1) {
162
162
  try {
163
163
  const r = ['"use strict";', "var __self = arguments[0];"];
164
164
  r.push("return ");
@@ -173,7 +173,7 @@ function A(s, e, t = !1, n = !1) {
173
173
  }
174
174
  }
175
175
  function G(s, e, t = !1, n = !1) {
176
- const r = A(s, e, t, n);
176
+ const r = T(s, e, t, n);
177
177
  if (typeof r != "function" && (P.error(
178
178
  "parseFunction.error",
179
179
  "not a function",
@@ -189,13 +189,13 @@ function _(s) {
189
189
  function I(s) {
190
190
  return typeof s == "object" && s && s.type === "JSFunction";
191
191
  }
192
- function gt(s) {
192
+ function mt(s) {
193
193
  return _(s) || I(s);
194
194
  }
195
- function Tn(s) {
196
- return gt(s) ? s.value : JSON.stringify(s);
195
+ function Fn(s) {
196
+ return mt(s) ? s.value : JSON.stringify(s);
197
197
  }
198
- const vt = {
198
+ const gt = {
199
199
  session: !1,
200
200
  authKey: "Authorization",
201
201
  storageKey: "ACCESS_STORAGE",
@@ -208,16 +208,16 @@ const vt = {
208
208
  noPermissionMessage: "无权限访问该页面",
209
209
  appName: ""
210
210
  }, be = Symbol("access");
211
- class An {
211
+ class Tn {
212
212
  options;
213
213
  data = null;
214
- mode = y.Raw;
214
+ mode = v.Raw;
215
215
  constructor(e) {
216
- this.options = Object.assign({}, vt, e), this.loadData();
216
+ this.options = Object.assign({}, gt, e), this.loadData();
217
217
  }
218
218
  connect(e) {
219
219
  const { mode: t, router: n, request: r } = e;
220
- this.mode = t, n && this.mode === y.Raw && this.setGuard(n), r && this.setRequest(r);
220
+ this.mode = t, n && this.mode === v.Raw && this.setGuard(n), r && this.setRequest(r);
221
221
  }
222
222
  login(e) {
223
223
  const { storageKey: t, storagePrefix: n, session: r, authKey: i } = this.options;
@@ -298,7 +298,7 @@ class An {
298
298
  return e && t ? !!q.get(t) : !!this.getToken();
299
299
  }
300
300
  hasRoutePermission(e) {
301
- if (e.name === F) {
301
+ if (e.name === A) {
302
302
  const t = e.params.id;
303
303
  return t && this.can(t);
304
304
  }
@@ -381,7 +381,7 @@ function In(s = {}) {
381
381
  loading: t
382
382
  };
383
383
  }
384
- function _t(s, e) {
384
+ function vt(s, e) {
385
385
  const { jsonp: t, request: n } = e;
386
386
  if (s.method === "jsonp")
387
387
  return (r = {}) => t(s.url, {
@@ -389,7 +389,7 @@ function _t(s, e) {
389
389
  query: r
390
390
  });
391
391
  {
392
- const r = s.headers ? A(s.headers, {}, !0) : void 0, i = {
392
+ const r = s.headers ? T(s.headers, {}, !0) : void 0, i = {
393
393
  url: s.url,
394
394
  method: s.method,
395
395
  settings: {
@@ -400,7 +400,7 @@ function _t(s, e) {
400
400
  return (a, o) => (delete i.data, n.send(Oe(i, o || {}, { data: a })));
401
401
  }
402
402
  }
403
- function wt(s, e) {
403
+ function _t(s, e) {
404
404
  const { metaQuery: t } = e;
405
405
  if (!t) return;
406
406
  const { code: n, queryCode: r } = s;
@@ -412,18 +412,18 @@ function wt(s, e) {
412
412
  return t(n, r, i, a);
413
413
  };
414
414
  }
415
- function St(s = [], e = [], t) {
415
+ function wt(s = [], e = [], t) {
416
416
  const n = {};
417
417
  for (const r of s)
418
- n[r.id] = _t(r, t);
418
+ n[r.id] = vt(r, t);
419
419
  for (const r of e)
420
- n[r.id] = wt(r, t);
420
+ n[r.id] = _t(r, t);
421
421
  return n;
422
422
  }
423
- async function bt(s = []) {
424
- k && (je(), s.forEach((e) => $t(k, e)));
423
+ async function St(s = []) {
424
+ R && (je(), s.forEach((e) => jt(R, e)));
425
425
  }
426
- function jt(s) {
426
+ function bt(s) {
427
427
  const e = I(s.mockTemplate) && s.mockTemplate.value ? G(s.mockTemplate, {}, !0) : void 0;
428
428
  return async (...t) => {
429
429
  let n = {};
@@ -433,14 +433,14 @@ function jt(s) {
433
433
  } catch (r) {
434
434
  P.warn("模拟数据模版异常", r);
435
435
  }
436
- return k.mock(n);
436
+ return R.mock(n);
437
437
  };
438
438
  }
439
- function $t(s, e) {
439
+ function jt(s, e) {
440
440
  if (!e.mock) return;
441
441
  const { url: t, mockTemplate: n } = e;
442
442
  if (t && n) {
443
- const r = Be(`${t}(.*)`), i = Ne(t, { decode: decodeURIComponent }), a = A(n, {}, !0);
443
+ const r = Be(`${t}(.*)`), i = Ne(t, { decode: decodeURIComponent }), a = T(n, {}, !0);
444
444
  s.mock(r, (o) => {
445
445
  const c = x.parse(o.url) || {}, l = o.body instanceof FormData ? Ue(o.body) : o.body, f = i(o.url)?.params;
446
446
  return Object.assign(o, { data: l, params: c, query: f }), s.mock(a(o));
@@ -448,9 +448,9 @@ function $t(s, e) {
448
448
  }
449
449
  }
450
450
  function je() {
451
- k && (k._mocked = {});
451
+ R && (R._mocked = {});
452
452
  }
453
- class Et {
453
+ class $t {
454
454
  __id = null;
455
455
  __mode;
456
456
  __instance = null;
@@ -507,7 +507,7 @@ class Et {
507
507
  }
508
508
  __parseFunction(e) {
509
509
  if (e)
510
- if (this.__mode === y.Runtime) {
510
+ if (this.__mode === v.Runtime) {
511
511
  const { id: t, type: n } = e, r = t ? this.__transform[t] ?? e.value : e.value;
512
512
  return G({ type: n, value: r }, this);
513
513
  } else
@@ -515,14 +515,14 @@ class Et {
515
515
  }
516
516
  __parseExpression(e) {
517
517
  if (e)
518
- if (this.__mode === y.Runtime) {
518
+ if (this.__mode === v.Runtime) {
519
519
  const { id: t, type: n } = e, r = t ? this.__transform[t] ?? e.value : e.value;
520
- return A({ type: n, value: r }, this);
520
+ return T({ type: n, value: r }, this);
521
521
  } else
522
- return A(e, this);
522
+ return T(e, this);
523
523
  }
524
524
  __ref(e = null, t) {
525
- if (this.__mode !== y.VNode)
525
+ if (this.__mode !== v.VNode)
526
526
  return e && e !== this.__id && (this.__contextRefs[e] = this), async (n) => {
527
527
  await pe(0);
528
528
  let r = n?.$vtjEl || n?.$el || n?._?.vnode?.el || n;
@@ -530,7 +530,7 @@ class Et {
530
530
  typeof t == "string" && (delete this.$refs[t], e && delete this.__refs[e]);
531
531
  return;
532
532
  }
533
- return r.nodeType === 3 && r.nextSibling && (r = r.nextSibling), r.__vtj__ = e, y.Design === this.__mode && (r.__context__ = this, r.draggable = !0), e && (this.__refs[e] = this.__getRefEl(this.__refs, e, n)), typeof t == "function" ? t(n) : t && (this.$refs[t] = this.__getRefEl(this.$refs, t, n)), n;
533
+ return r.nodeType === 3 && r.nextSibling && (r = r.nextSibling), r.__vtj__ = e, v.Design === this.__mode && (r.__context__ = this, r.draggable = !0), e && (this.__refs[e] = this.__getRefEl(this.__refs, e, n)), typeof t == "function" ? t(n) : t && (this.$refs[t] = this.__getRefEl(this.$refs, t, n)), n;
534
534
  };
535
535
  }
536
536
  __getRefEl(e, t, n) {
@@ -552,7 +552,7 @@ class Et {
552
552
  function Y(s) {
553
553
  const {
554
554
  Vue: e = N,
555
- mode: t = y.Runtime,
555
+ mode: t = v.Runtime,
556
556
  components: n = {},
557
557
  libs: r = {},
558
558
  apis: i = {},
@@ -561,22 +561,22 @@ function Y(s) {
561
561
  $components: n,
562
562
  $libs: r,
563
563
  $apis: i
564
- }, l = new Et({
564
+ }, l = new $t({
565
565
  mode: t,
566
566
  dsl: o.value,
567
567
  attrs: c
568
568
  }), f = e.defineComponent({
569
569
  name: o.value.name,
570
570
  props: {
571
- ...Rt(o.value.props ?? [], l)
571
+ ...kt(o.value.props ?? [], l)
572
572
  },
573
573
  setup(u) {
574
574
  l.$props = u, l.props = u, o.value.id && Se(
575
575
  s.window || window,
576
576
  o.value.id,
577
577
  o.value.css || ""
578
- ), l.state = xt(e, o.value.state ?? {}, l);
579
- const d = Pt(e, o.value.computed ?? {}, l), h = Ct(o.value.methods ?? {}, l), m = Ft(e, o.value.inject, l), p = Tt(
578
+ ), l.state = Rt(e, o.value.state ?? {}, l);
579
+ const d = xt(e, o.value.computed ?? {}, l), h = Pt(o.value.methods ?? {}, l), m = Ct(e, o.value.inject, l), p = At(
580
580
  o.value.dataSources || {},
581
581
  l
582
582
  ), w = {
@@ -585,29 +585,29 @@ function Y(s) {
585
585
  ...h,
586
586
  ...p
587
587
  };
588
- return l.setup(w, e), At(e, o.value.watch ?? [], l), {
588
+ return l.setup(w, e), Ft(e, o.value.watch ?? [], l), {
589
589
  vtj: l
590
590
  };
591
591
  },
592
- emits: kt(o.value.emits),
592
+ emits: Et(o.value.emits),
593
593
  expose: ["vtj"],
594
594
  render() {
595
595
  if (!o.value.nodes) return null;
596
596
  const u = o.value.nodes || [];
597
597
  return u.length === 1 ? B(u[0], l, e, a) : u.map((d) => B(d, l, e, a));
598
598
  },
599
- ...It(o.value.lifeCycles ?? {}, l)
599
+ ...Tt(o.value.lifeCycles ?? {}, l)
600
600
  });
601
601
  return {
602
602
  renderer: e.markRaw(f),
603
603
  context: l
604
604
  };
605
605
  }
606
- function kt(s = []) {
606
+ function Et(s = []) {
607
607
  return s.map((e) => j(e) ? e : e.name);
608
608
  }
609
- function Rt(s = [], e) {
610
- const t = (n) => n ? (Array.isArray(n) ? n : [n]).map((i) => st[i]) : void 0;
609
+ function kt(s = [], e) {
610
+ const t = (n) => n ? (Array.isArray(n) ? n : [n]).map((i) => nt[i]) : void 0;
611
611
  return s.map((n) => j(n) ? {
612
612
  name: n
613
613
  } : {
@@ -624,7 +624,7 @@ function Rt(s = [], e) {
624
624
  {}
625
625
  );
626
626
  }
627
- function xt(s, e, t) {
627
+ function Rt(s, e, t) {
628
628
  return s.reactive(
629
629
  Object.keys(e || {}).reduce(
630
630
  (n, r) => {
@@ -635,19 +635,19 @@ function xt(s, e, t) {
635
635
  )
636
636
  );
637
637
  }
638
- function Pt(s, e, t) {
638
+ function xt(s, e, t) {
639
639
  return Object.entries(e ?? {}).reduce(
640
640
  (n, [r, i]) => (n[r] = s.computed(t.__parseFunction(i)), n),
641
641
  {}
642
642
  );
643
643
  }
644
- function Ct(s, e) {
644
+ function Pt(s, e) {
645
645
  return Object.entries(s ?? {}).reduce(
646
646
  (t, [n, r]) => (t[n] = e.__parseFunction(r), t),
647
647
  {}
648
648
  );
649
649
  }
650
- function Ft(s, e = [], t) {
650
+ function Ct(s, e = [], t) {
651
651
  return e.reduce(
652
652
  (n, r) => {
653
653
  const { name: i, from: a } = r || {};
@@ -658,12 +658,12 @@ function Ft(s, e = [], t) {
658
658
  {}
659
659
  );
660
660
  }
661
- function Tt(s, e) {
661
+ function At(s, e) {
662
662
  return Object.keys(s).reduce(
663
663
  (t, n) => {
664
664
  const r = s[n];
665
665
  if (r.type === "mock")
666
- t[n] = jt(r);
666
+ t[n] = bt(r);
667
667
  else if (r.ref) {
668
668
  const i = e.$apis[r.ref], a = I(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
669
669
  t[n] = async (...o) => {
@@ -676,7 +676,7 @@ function Tt(s, e) {
676
676
  {}
677
677
  );
678
678
  }
679
- function At(s, e = [], t) {
679
+ function Ft(s, e = [], t) {
680
680
  e.forEach((n) => {
681
681
  s.watch(
682
682
  t.__parseExpression(n.source),
@@ -688,19 +688,19 @@ function At(s, e = [], t) {
688
688
  );
689
689
  });
690
690
  }
691
- function It(s, e) {
691
+ function Tt(s, e) {
692
692
  return Object.entries(s ?? {}).reduce(
693
693
  (t, [n, r]) => (t[n] = e.__parseFunction(r), t),
694
694
  {}
695
695
  );
696
696
  }
697
- let V = [], R = {};
698
- const Mt = (s) => s;
697
+ let V = [], k = {};
698
+ const It = (s) => s;
699
699
  async function $e(s, e = window) {
700
- const { urls: t = [], library: n } = s, r = t.filter((o) => te(o));
700
+ const { urls: t = [], library: n } = s, r = t.filter((o) => ne(o));
701
701
  if (r.length === 0 || !n) return null;
702
- const i = t.filter((o) => ee(o));
703
- return i.length && dt(i, e), await pt(r, n, e).catch(
702
+ const i = t.filter((o) => te(o));
703
+ return i.length && ut(i, e), await dt(r, n, e).catch(
704
704
  (o) => (console.warn("loadScriptUrl error", r, n, o), null)
705
705
  );
706
706
  }
@@ -711,34 +711,34 @@ function Q(s) {
711
711
  }), V = []), (r, i, a = N) => {
712
712
  if (!i || typeof i == "string") return r;
713
713
  if (i.type === "Schema" && i.id) {
714
- let o = R[i.id];
715
- return o || (o = R[i.id] = a.defineAsyncComponent(async () => {
714
+ let o = k[i.id];
715
+ return o || (o = k[i.id] = a.defineAsyncComponent(async () => {
716
716
  const c = await e(i.id);
717
717
  return c && (c.name = r), c ? Y({
718
718
  ...n,
719
719
  Vue: a,
720
720
  dsl: c,
721
- mode: y.Runtime,
721
+ mode: v.Runtime,
722
722
  loader: Q(s)
723
723
  }).renderer : null;
724
724
  }), o);
725
725
  }
726
726
  if (i.type === "UrlSchema" && i.url) {
727
- let o = R[i.url];
728
- return o || (o = R[i.url] = a.defineAsyncComponent(async () => {
727
+ let o = k[i.url];
728
+ return o || (o = k[i.url] = a.defineAsyncComponent(async () => {
729
729
  const c = await t(i.url);
730
730
  return c && (c.name = r), c ? Y({
731
731
  ...n,
732
732
  Vue: a,
733
733
  dsl: c,
734
- mode: y.Runtime,
734
+ mode: v.Runtime,
735
735
  loader: Q(s)
736
736
  }).renderer : null;
737
737
  }), o);
738
738
  }
739
739
  if (i.type === "Plugin") {
740
- let o = i.library ? R[i.library] : null;
741
- return o || (i.library && V.push(i.library), o = R[i.library || Symbol()] = a.defineAsyncComponent(
740
+ let o = i.library ? k[i.library] : null;
741
+ return o || (i.library && V.push(i.library), o = k[i.library || Symbol()] = a.defineAsyncComponent(
742
742
  async () => {
743
743
  const c = await $e(i, n.window);
744
744
  return c || (console.warn("getPlugin result is null", i), null);
@@ -748,41 +748,44 @@ function Q(s) {
748
748
  return r;
749
749
  };
750
750
  }
751
- function B(s, e, t = N, n = Mt) {
751
+ function Mn() {
752
+ k = {};
753
+ }
754
+ function B(s, e, t = N, n = It) {
752
755
  if (!s || !s.name || s.invisible) return null;
753
- const r = t.getCurrentInstance()?.appContext, { id: i = null, directives: a = [] } = s, { vIf: o, vFor: c, vShow: l, vModels: f, vBind: u, vHtml: d, others: h } = Ht(a);
754
- if (o && !Ot(o, e))
756
+ const r = t.getCurrentInstance()?.appContext, { id: i = null, directives: a = [] } = s, { vIf: o, vFor: c, vShow: l, vModels: f, vBind: u, vHtml: d, others: h } = Dt(a);
757
+ if (o && !Ht(o, e))
755
758
  return null;
756
759
  const m = (p) => {
757
760
  const w = p.$components, g = (() => {
758
761
  if (s.name === "component")
759
- return Bt(p, s.props?.is);
762
+ return Ot(p, s.props?.is);
760
763
  if (s.name === "slot") return s.name;
761
764
  const b = n(s.name, s.from, t);
762
- return j(b) ? ht(b) || mt(b) ? b : w[b] ?? r?.app?.component(b) ?? b : b;
763
- })(), S = Nt(i, s.props ?? {}, p), Te = Ut(t, s.events ?? {}, p);
765
+ return j(b) ? ft(b) || ht(b) ? b : w[b] ?? r?.app?.component(b) ?? b : b;
766
+ })(), S = Bt(i, s.props ?? {}, p), Fe = Nt(t, s.events ?? {}, p);
764
767
  if (s.name === "slot")
765
- return Lt(t, s, S, p, n);
768
+ return Ut(t, s, S, p, n);
766
769
  u && Object.assign(S, p.__parseExpression(u.value)), l && (S.style = Object.assign(
767
770
  S.style ?? {},
768
- Jt(l, p)
769
- )), d && Object.assign(S, Vt(d, p)), f.forEach((b) => {
770
- Object.assign(S, zt(t, b, p));
771
+ qt(l, p)
772
+ )), d && Object.assign(S, Jt(d, p)), f.forEach((b) => {
773
+ Object.assign(S, Vt(t, b, p));
771
774
  });
772
- const Ae = Kt(
775
+ const Te = zt(
773
776
  t,
774
777
  s.children ?? [],
775
778
  p,
776
779
  n,
777
780
  s
778
781
  );
779
- let U = t.createVNode(g, { ...S, ...Te }, Ae);
780
- const re = r ? Dt(r, h, p) : [];
782
+ let U = t.createVNode(g, { ...S, ...Fe }, Te);
783
+ const re = r ? Mt(r, h, p) : [];
781
784
  return re.length && (U = t.withDirectives(U, re)), U;
782
785
  };
783
- return c ? Yt(c, m, e) : m(e);
786
+ return c ? Gt(c, m, e) : m(e);
784
787
  }
785
- function Dt(s, e, t) {
788
+ function Mt(s, e, t) {
786
789
  const n = s.app;
787
790
  return e.map((r) => {
788
791
  const i = typeof r.name == "string" ? n.directive(r.name) : t.__parseExpression(r.name);
@@ -791,11 +794,11 @@ function Dt(s, e, t) {
791
794
  return r.value && a.push(t.__parseExpression(r.value)), r.arg && a.push(r.arg), r.modifiers && a.push(r.modifiers), a;
792
795
  }).filter((r) => !!r);
793
796
  }
794
- function Ht(s = []) {
797
+ function Dt(s = []) {
795
798
  const e = s.find((c) => $(c.name) === "vIf"), t = s.find((c) => $(c.name) === "vFor"), n = s.find((c) => $(c.name) === "vShow"), r = s.find((c) => $(c.name) === "vBind"), i = s.find((c) => $(c.name) === "vHtml"), a = s.filter(
796
799
  (c) => $(c.name) === "vModel"
797
800
  ), o = s.filter(
798
- (c) => !nt.includes($(c.name))
801
+ (c) => !tt.includes($(c.name))
799
802
  );
800
803
  return {
801
804
  vIf: e,
@@ -807,13 +810,13 @@ function Ht(s = []) {
807
810
  vHtml: i
808
811
  };
809
812
  }
810
- function Ot(s, e) {
813
+ function Ht(s, e) {
811
814
  return !!e.__parseExpression(s.value);
812
815
  }
813
- function Bt(s, e) {
816
+ function Ot(s, e) {
814
817
  return e ? _(e) ? s.__parseExpression(e) : e : "div";
815
818
  }
816
- function Nt(s, e, t) {
819
+ function Bt(s, e, t) {
817
820
  const n = Object.keys(e || {}).reduce(
818
821
  (r, i) => {
819
822
  let a = e[i];
@@ -823,7 +826,7 @@ function Nt(s, e, t) {
823
826
  );
824
827
  return n.ref = t.__ref(s, n.ref), n;
825
828
  }
826
- function Ut(s, e, t) {
829
+ function Nt(s, e, t) {
827
830
  const n = ["passive", "capture", "once"], r = {
828
831
  capture: "Capture",
829
832
  once: "Once",
@@ -841,32 +844,32 @@ function Ee(s = {}, e = !1) {
841
844
  const t = Object.keys(s);
842
845
  return e ? t.map((n) => "." + n) : t;
843
846
  }
844
- function Lt(s, e, t, n, r) {
845
- const { children: i } = e, a = qt(e, n), o = n.$slots?.[a.name];
847
+ function Ut(s, e, t, n, r) {
848
+ const { children: i } = e, a = Lt(e, n), o = n.$slots?.[a.name];
846
849
  return o ? o(t) : i ? j(i) ? s.createTextVNode(i) : _(i) ? s.createTextVNode(
847
850
  we(n.__parseExpression(i))
848
851
  ) : Array.isArray(i) ? i.map(
849
852
  (c) => B(c, n, s, r)
850
853
  ) : null : null;
851
854
  }
852
- function qt(s, e) {
855
+ function Lt(s, e) {
853
856
  const { props: t } = s, n = t?.name || "default";
854
857
  return {
855
858
  name: _(n) ? e.__parseExpression(n) : n,
856
859
  params: []
857
860
  };
858
861
  }
859
- function Jt(s, e) {
862
+ function qt(s, e) {
860
863
  return e.__parseExpression(s.value) ? {} : {
861
864
  display: "none"
862
865
  };
863
866
  }
864
- function Vt(s, e) {
867
+ function Jt(s, e) {
865
868
  return {
866
869
  innerHTML: e.__parseExpression(s.value) || ""
867
870
  };
868
871
  }
869
- function zt(s, e, t) {
872
+ function Vt(s, e, t) {
870
873
  const n = {
871
874
  type: "JSFunction",
872
875
  value: e.value?.value ? `(v) => {
@@ -880,7 +883,7 @@ function zt(s, e, t) {
880
883
  [`onUpdate:${a}`]: i.length && r ? s.withModifiers(r, i) : r
881
884
  };
882
885
  }
883
- function Kt(s, e, t, n, r) {
886
+ function zt(s, e, t, n, r) {
884
887
  if (!e) return null;
885
888
  if (j(e))
886
889
  return { default: () => e };
@@ -889,7 +892,7 @@ function Kt(s, e, t, n, r) {
889
892
  default: () => we(t.__parseExpression(e))
890
893
  };
891
894
  if (Array.isArray(e) && e.length > 0) {
892
- const i = Wt(e), a = (o) => !o || !r ? {} : r?.id && Object.keys(o).length ? {
895
+ const i = Kt(e), a = (o) => !o || !r ? {} : r?.id && Object.keys(o).length ? {
893
896
  [`scope_${r.id}`]: o
894
897
  } : {};
895
898
  return Object.entries(i).reduce((o, [c, { nodes: l, params: f }]) => (o[c] = (u) => {
@@ -901,7 +904,7 @@ function Kt(s, e, t, n, r) {
901
904
  }
902
905
  return null;
903
906
  }
904
- function Wt(s) {
907
+ function Kt(s) {
905
908
  const e = {
906
909
  default: {
907
910
  params: [],
@@ -909,7 +912,7 @@ function Wt(s) {
909
912
  }
910
913
  };
911
914
  for (const t of s) {
912
- const n = Gt(t.slot), r = n.name;
915
+ const n = Wt(t.slot), r = n.name;
913
916
  e[r] ? (e[r].nodes.push(t), e[r].params = e[r].params.concat(n.params)) : e[r] = {
914
917
  nodes: [t],
915
918
  params: n.params
@@ -917,61 +920,61 @@ function Wt(s) {
917
920
  }
918
921
  return e;
919
922
  }
920
- function Gt(s = "default") {
923
+ function Wt(s = "default") {
921
924
  return j(s) ? { name: s, params: [] } : { params: [], ...s };
922
925
  }
923
- function Yt(s, e, t) {
926
+ function Gt(s, e, t) {
924
927
  const { value: n, iterator: r } = s, { item: i = "item", index: a = "index" } = r || {};
925
928
  let o = t.__parseExpression(n) || [];
926
929
  return Number.isInteger(o) && (o = new Array(o).fill(!0).map((c, l) => l + 1)), Array.isArray(o) ? o.map((c, l) => e(t.__clone({ [i]: c, [a]: l }))) : (console.warn("[vForRender]:", `${n?.value} is not a Arrary`), []);
927
930
  }
928
- function Qt(s) {
931
+ function Yt(s) {
929
932
  return Ge() ? (Ye(s), !0) : !1;
930
933
  }
931
- function ne(s) {
932
- return typeof s == "function" ? s() : Qe(s);
933
- }
934
934
  const ke = typeof window < "u" && typeof document < "u";
935
935
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
936
- const Xt = (s) => s != null, Zt = () => {
936
+ const Qt = (s) => s != null, Xt = () => {
937
937
  };
938
- function en(s) {
938
+ function Zt(s) {
939
939
  return ge();
940
940
  }
941
+ function en(s) {
942
+ return Array.isArray(s) ? s : [s];
943
+ }
941
944
  function tn(...s) {
942
945
  if (s.length !== 1)
943
946
  return Ve(...s);
944
947
  const e = s[0];
945
- return typeof e == "function" ? ze(Ke(() => ({ get: e, set: Zt }))) : T(e);
948
+ return typeof e == "function" ? ze(Ke(() => ({ get: e, set: Xt }))) : F(e);
946
949
  }
947
950
  function nn(s, e) {
948
- en() && We(s, e);
951
+ Zt() && We(s, e);
949
952
  }
950
953
  const sn = ke ? window : void 0, rn = ke ? window.document : void 0;
951
954
  function on(s) {
952
955
  var e;
953
- const t = ne(s);
956
+ const t = Z(s);
954
957
  return (e = t?.$el) != null ? e : t;
955
958
  }
956
959
  function an() {
957
- const s = T(!1), e = ge();
958
- return e && Xe(() => {
960
+ const s = F(!1), e = ge();
961
+ return e && Qe(() => {
959
962
  s.value = !0;
960
963
  }, e), s;
961
964
  }
962
965
  function cn(s) {
963
966
  const e = an();
964
- return ye(() => (e.value, !!s()));
967
+ return ve(() => (e.value, !!s()));
965
968
  }
966
969
  function ln(s, e, t = {}) {
967
970
  const { window: n = sn, ...r } = t;
968
971
  let i;
969
972
  const a = cn(() => n && "MutationObserver" in n), o = () => {
970
973
  i && (i.disconnect(), i = void 0);
971
- }, c = ye(() => {
972
- const d = ne(s), h = (Array.isArray(d) ? d : [d]).map(on).filter(Xt);
974
+ }, c = ve(() => {
975
+ const d = Z(s), h = en(d).map(on).filter(Qt);
973
976
  return new Set(h);
974
- }), l = ve(
977
+ }), l = ye(
975
978
  () => c.value,
976
979
  (d) => {
977
980
  o(), a.value && d.size && (i = new MutationObserver(e), d.forEach((h) => i.observe(h, r)));
@@ -980,7 +983,7 @@ function ln(s, e, t = {}) {
980
983
  ), f = () => i?.takeRecords(), u = () => {
981
984
  l(), o();
982
985
  };
983
- return Qt(u), {
986
+ return Yt(u), {
984
987
  isSupported: a,
985
988
  stop: u,
986
989
  takeRecords: f
@@ -996,9 +999,9 @@ function un(s = null, e = {}) {
996
999
  if (!("titleTemplate" in e))
997
1000
  return u;
998
1001
  const d = e.titleTemplate || "%s";
999
- return typeof d == "function" ? d(u) : ne(d).replace(/%s/g, u);
1002
+ return typeof d == "function" ? d(u) : Z(d).replace(/%s/g, u);
1000
1003
  }
1001
- return ve(
1004
+ return ye(
1002
1005
  c,
1003
1006
  (u, d) => {
1004
1007
  u !== d && i && (i.title = f(typeof u == "string" ? u : ""));
@@ -1017,10 +1020,10 @@ function un(s = null, e = {}) {
1017
1020
  }
1018
1021
  }), c;
1019
1022
  }
1020
- const ue = Z({
1023
+ const ue = ee({
1021
1024
  name: "VtjPageContainer",
1022
1025
  async setup() {
1023
- const s = xe(), e = _e(), t = e.params.id, n = t ? s.getPage(t) : s.getHomepage(), r = n ? await s.getRenderComponent(n.id) : null, i = T(Symbol());
1026
+ const s = xe(), e = _e(), t = e.params.id, n = t ? s.getPage(t) : s.getHomepage(), r = n ? await s.getRenderComponent(n.id) : null, i = F(Symbol());
1024
1027
  return n && (Object.assign(e.meta, n.meta || {}, { cache: n.cache }), un(n.title || "VTJ")), {
1025
1028
  provider: s,
1026
1029
  component: r,
@@ -1053,7 +1056,7 @@ const ue = Z({
1053
1056
  }, gn = {
1054
1057
  "data-l-h6o7ki7": "",
1055
1058
  class: "vtj-startup__actions"
1056
- }, vn = /* @__PURE__ */ Z({
1059
+ }, yn = /* @__PURE__ */ ee({
1057
1060
  __name: "Startup",
1058
1061
  props: {
1059
1062
  name: { default: "VTJ.PRO" },
@@ -1153,7 +1156,7 @@ const ue = Z({
1153
1156
  window.location.href = i;
1154
1157
  }
1155
1158
  };
1156
- return (r, i) => (Ze(), et("div", dn, [
1159
+ return (r, i) => (Xe(), Ze("div", dn, [
1157
1160
  E("div", pn, [
1158
1161
  E("h1", fn, [
1159
1162
  E("span", hn, J(t.name), 1)
@@ -1169,10 +1172,10 @@ const ue = Z({
1169
1172
  ])
1170
1173
  ]));
1171
1174
  }
1172
- }), yn = Z({
1175
+ }), vn = ee({
1173
1176
  name: "VtjStartupContainer",
1174
1177
  render() {
1175
- return W(vn);
1178
+ return W(yn);
1176
1179
  }
1177
1180
  }), Re = Symbol("Provider");
1178
1181
  var _n = /* @__PURE__ */ ((s) => (s.Production = "production", s.Development = "development", s))(_n || {});
@@ -1181,7 +1184,7 @@ class wn extends Ie {
1181
1184
  super(), this.options = e;
1182
1185
  const {
1183
1186
  service: t,
1184
- mode: n = y.Raw,
1187
+ mode: n = v.Raw,
1185
1188
  dependencies: r,
1186
1189
  materials: i,
1187
1190
  project: a = {},
@@ -1195,7 +1198,7 @@ class wn extends Ie {
1195
1198
  } = e;
1196
1199
  this.mode = n, this.modules = l, this.service = t, this.router = f, this.materialPath = u, this.nodeEnv = d, r && (this.dependencies = r), i && (this.materials = i), Object.assign(this.globals, c), Object.assign(this.adapter, o);
1197
1200
  const { access: h, request: m } = this.adapter;
1198
- h && h.connect({ mode: n, router: f, request: m }), a && n !== y.Design ? this.load(a) : this.project = a, k.setup({
1201
+ h && h.connect({ mode: n, router: f, request: m }), a && n !== v.Design ? this.load(a) : this.project = a, R.setup({
1199
1202
  timeout: "50-500"
1200
1203
  });
1201
1204
  }
@@ -1223,7 +1226,7 @@ class wn extends Ie {
1223
1226
  } catch (r) {
1224
1227
  P.warn("模拟数据模版异常", r);
1225
1228
  }
1226
- return k.mock(n);
1229
+ return R.mock(n);
1227
1230
  };
1228
1231
  }
1229
1232
  async load(e) {
@@ -1231,7 +1234,7 @@ class wn extends Ie {
1231
1234
  if (this.project = t ? await t() : await this.service.init(e), !this.project)
1232
1235
  throw new Error("project is null");
1233
1236
  const { apis: n = [], meta: r = [] } = this.project, i = window;
1234
- i.CKEDITOR_VERSION = void 0, this.mode === y.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.apis = St(n, r, this.adapter), je(), bt(n), this.initRouter(), this.triggerReady();
1237
+ i.CKEDITOR_VERSION = void 0, this.mode === v.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.apis = wt(n, r, this.adapter), je(), St(n), this.initRouter(), this.triggerReady();
1235
1238
  }
1236
1239
  async loadDependencies(e) {
1237
1240
  const t = Object.entries(this.dependencies);
@@ -1245,7 +1248,7 @@ class wn extends Ie {
1245
1248
  materials: f,
1246
1249
  materialExports: u,
1247
1250
  materialMapLibrary: d
1248
- } = ct(
1251
+ } = at(
1249
1252
  t,
1250
1253
  a,
1251
1254
  o === "development"
@@ -1260,7 +1263,7 @@ class wn extends Ie {
1260
1263
  else {
1261
1264
  const w = l[h] || [];
1262
1265
  for (const g of w)
1263
- ee(g) && await ut(h, x.append(g, { v: C })), te(g) && await ae(x.append(g, { v: C }));
1266
+ te(g) && await lt(h, x.append(g, { v: C })), ne(g) && await ae(x.append(g, { v: C }));
1264
1267
  r[h] = e[h];
1265
1268
  }
1266
1269
  }
@@ -1277,7 +1280,7 @@ class wn extends Ie {
1277
1280
  else {
1278
1281
  const g = h[m] ? (await h[m]()).default : e[m];
1279
1282
  g && p && (g.components || []).forEach((S) => {
1280
- i[S.name] = lt(S, p);
1283
+ i[S.name] = ct(S, p);
1281
1284
  });
1282
1285
  }
1283
1286
  }
@@ -1288,21 +1291,21 @@ class wn extends Ie {
1288
1291
  if (!e) return;
1289
1292
  const { routeAppendTo: i, pageRouteName: a = "page", routeMeta: o } = n, c = i ? "" : "/", l = {
1290
1293
  path: `${c}${a}/:id`,
1291
- name: F,
1294
+ name: A,
1292
1295
  component: ue
1293
1296
  }, f = {
1294
1297
  path: c,
1295
1298
  name: H,
1296
- component: t?.homepage ? ue : r.startupComponent || yn,
1299
+ component: t?.homepage ? ue : r.startupComponent || vn,
1297
1300
  meta: o
1298
1301
  };
1299
- e.hasRoute(F) && e.removeRoute(F), e.hasRoute(H) && e.removeRoute(H), i ? (e.addRoute(i, l), e.addRoute(i, f)) : (e.addRoute(l), e.addRoute(f));
1302
+ e.hasRoute(A) && e.removeRoute(A), e.hasRoute(H) && e.removeRoute(H), i ? (e.addRoute(i, l), e.addRoute(i, f)) : (e.addRoute(l), e.addRoute(f));
1300
1303
  }
1301
1304
  install(e) {
1302
1305
  const t = e.config.globalProperties.installed || {};
1303
1306
  for (const [n, r] of Object.entries(this.library))
1304
- !t[n] && ft(r) && (e.use(r), t[n] = !0);
1305
- this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(Re, this), e.config.globalProperties.installed = t, this.mode === y.Design && (e.config.errorHandler = (n, r, i) => {
1307
+ !t[n] && pt(r) && (e.use(r), t[n] = !0);
1308
+ this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(Re, this), e.config.globalProperties.installed = t, this.mode === v.Design && (e.config.errorHandler = (n, r, i) => {
1306
1309
  const a = r?.$options.name, o = typeof n == "string" ? n : n?.message || n?.msg || "未知错误", c = `[ ${a} ] ${o} ${i}`;
1307
1310
  console.error(
1308
1311
  "[VTJ Error]:",
@@ -1393,7 +1396,7 @@ class wn extends Ie {
1393
1396
  return ce(async () => await $e(e, window));
1394
1397
  }
1395
1398
  }
1396
- function Mn(s) {
1399
+ function Dn(s) {
1397
1400
  const e = new wn(s);
1398
1401
  return {
1399
1402
  provider: e,
@@ -1444,7 +1447,7 @@ const Pe = {
1444
1447
  type: "data"
1445
1448
  }
1446
1449
  }).then((r) => r && r[0] ? r[0] : null).catch(() => null);
1447
- function Dn(s) {
1450
+ function Hn(s) {
1448
1451
  return fe({
1449
1452
  settings: {
1450
1453
  type: "json",
@@ -1536,7 +1539,7 @@ class se {
1536
1539
  return await this.api("clearStaticFiles", e).catch(() => "");
1537
1540
  }
1538
1541
  async getPluginMaterial(e) {
1539
- const { urls: t = [] } = e, n = t.filter((i) => ot(i))[0];
1542
+ const { urls: t = [] } = e, n = t.filter((i) => it(i))[0];
1540
1543
  if (!n) return null;
1541
1544
  const r = this.pluginCaches[n];
1542
1545
  return r || (this.pluginCaches[n] = K.send({
@@ -1552,58 +1555,58 @@ class se {
1552
1555
  return console.log("BaseService.genSource", e), "";
1553
1556
  }
1554
1557
  }
1555
- const v = new Je({
1558
+ const y = new Je({
1556
1559
  type: "local",
1557
1560
  expired: 0,
1558
1561
  prefix: "__VTJ_"
1559
1562
  });
1560
- class Hn extends se {
1563
+ class On extends se {
1561
1564
  init(e) {
1562
- const t = new O(e), n = v.get(`project_${t.id}`), r = Object.assign(t.toDsl(), n || {});
1563
- return v.save(`project_${t.id}`, r), Promise.resolve(r);
1565
+ const t = new O(e), n = y.get(`project_${t.id}`), r = Object.assign(t.toDsl(), n || {});
1566
+ return y.save(`project_${t.id}`, r), Promise.resolve(r);
1564
1567
  }
1565
1568
  saveProject(e) {
1566
1569
  const t = new O(e);
1567
- return v.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
1570
+ return y.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
1568
1571
  }
1569
1572
  saveMaterials(e, t) {
1570
- return v.save(`materials_${e.id}`, X(t)), Promise.resolve(!0);
1573
+ return y.save(`materials_${e.id}`, X(t)), Promise.resolve(!0);
1571
1574
  }
1572
1575
  saveFile(e) {
1573
- return v.save(`file_${e.id}`, e), Promise.resolve(!0);
1576
+ return y.save(`file_${e.id}`, e), Promise.resolve(!0);
1574
1577
  }
1575
1578
  getFile(e) {
1576
- const t = v.get(`file_${e}`);
1579
+ const t = y.get(`file_${e}`);
1577
1580
  return t ? Promise.resolve(t) : Promise.reject(null);
1578
1581
  }
1579
1582
  removeFile(e) {
1580
- return v.remove(`file_${e}`), Promise.resolve(!0);
1583
+ return y.remove(`file_${e}`), Promise.resolve(!0);
1581
1584
  }
1582
1585
  saveHistory(e) {
1583
- return v.save(`history_${e.id}`, e), Promise.resolve(!0);
1586
+ return y.save(`history_${e.id}`, e), Promise.resolve(!0);
1584
1587
  }
1585
1588
  removeHistory(e) {
1586
- const t = v.get(`history_${e}`);
1589
+ const t = y.get(`history_${e}`);
1587
1590
  if (t) {
1588
1591
  const r = (t.items || []).map((i) => i.id);
1589
- this.removeHistoryItem(e, r), v.remove(`history_${e}`);
1592
+ this.removeHistoryItem(e, r), y.remove(`history_${e}`);
1590
1593
  }
1591
1594
  return Promise.resolve(!0);
1592
1595
  }
1593
1596
  getHistory(e) {
1594
- const t = v.get(`history_${e}`), n = new de(t || { id: e });
1597
+ const t = y.get(`history_${e}`), n = new de(t || { id: e });
1595
1598
  return Promise.resolve(n.toDsl());
1596
1599
  }
1597
1600
  getHistoryItem(e, t) {
1598
- const n = v.get(`history_${e}_${t}`);
1601
+ const n = y.get(`history_${e}_${t}`);
1599
1602
  return Promise.resolve(n);
1600
1603
  }
1601
1604
  saveHistoryItem(e, t) {
1602
- return v.save(`history_${e}_${t.id}`, t), Promise.resolve(!0);
1605
+ return y.save(`history_${e}_${t.id}`, t), Promise.resolve(!0);
1603
1606
  }
1604
1607
  removeHistoryItem(e, t) {
1605
1608
  return t.forEach((n) => {
1606
- v.remove(`history_${e}_${n}`);
1609
+ y.remove(`history_${e}_${n}`);
1607
1610
  }), Promise.resolve(!0);
1608
1611
  }
1609
1612
  }
@@ -1665,10 +1668,10 @@ class jn extends se {
1665
1668
  }
1666
1669
  }
1667
1670
  let D = null;
1668
- function On() {
1671
+ function Bn() {
1669
1672
  return D || (D = new jn(), D);
1670
1673
  }
1671
- class Bn extends se {
1674
+ class Nn extends se {
1672
1675
  getFileCaches = {};
1673
1676
  async getExtension() {
1674
1677
  return await this.api("getExtension", {}).catch(() => {
@@ -1736,26 +1739,26 @@ function Ce(s, e, t = []) {
1736
1739
  };
1737
1740
  });
1738
1741
  }
1739
- function Fe(s, e) {
1742
+ function Ae(s, e) {
1740
1743
  if (!e) return s;
1741
1744
  let t = [];
1742
1745
  for (const n of s)
1743
1746
  if (n.children && n.children.length) {
1744
- const r = Fe(n.children, e);
1747
+ const r = Ae(n.children, e);
1745
1748
  r.length && (n.children = r, t.push(n));
1746
1749
  } else
1747
1750
  e.can(n.id.toString()) && t.push(n);
1748
1751
  return t;
1749
1752
  }
1750
- function Nn(s) {
1753
+ function Un(s) {
1751
1754
  const {
1752
1755
  menuPathPrefix: e = "",
1753
1756
  pageRouteName: t = "page",
1754
1757
  disableMenusFilter: n = !1
1755
- } = s || {}, r = xe(), i = _e(), a = yt(), o = T(!1), c = T(!1), l = r.project;
1756
- tt(() => {
1758
+ } = s || {}, r = xe(), i = _e(), a = yt(), o = F(!1), c = F(!1), l = r.project;
1759
+ et(() => {
1757
1760
  const { name: d, params: h, meta: m } = i;
1758
- if (d === F) {
1761
+ if (d === A) {
1759
1762
  const p = r.getPage(h.id);
1760
1763
  o.value = !p?.mask, c.value = !!p?.pure;
1761
1764
  } else if (d === H) {
@@ -1774,74 +1777,75 @@ function Nn(s) {
1774
1777
  logo: u?.logo,
1775
1778
  themeSwitchable: u?.themeSwitchable,
1776
1779
  title: u?.title || l?.description || l?.name || "VTJ App",
1777
- menus: n ? f : Fe(f, a),
1780
+ menus: n ? f : Ae(f, a),
1778
1781
  pure: c
1779
1782
  };
1780
1783
  }
1781
1784
  export {
1782
1785
  be as ACCESS_KEY,
1783
- An as Access,
1784
- it as BUILD_IN_TAGS,
1785
- nt as BUILT_IN_DIRECTIVES,
1786
+ Tn as Access,
1787
+ rt as BUILD_IN_TAGS,
1788
+ tt as BUILT_IN_DIRECTIVES,
1786
1789
  se as BaseService,
1787
1790
  le as CONTEXT_HOST,
1788
- Et as Context,
1789
- y as ContextMode,
1790
- st as DATA_TYPES,
1791
+ $t as Context,
1792
+ v as ContextMode,
1793
+ nt as DATA_TYPES,
1791
1794
  H as HOMEPAGE_ROUTE_NAME,
1792
- rt as HTML_TAGS,
1793
- Tn as JSCodeToString,
1795
+ st as HTML_TAGS,
1796
+ Fn as JSCodeToString,
1794
1797
  Pn as LIFE_CYCLES_LIST,
1795
- Bn as LocalService,
1798
+ Nn as LocalService,
1796
1799
  jn as MemoryService,
1797
1800
  _n as NodeEnv,
1798
- F as PAGE_ROUTE_NAME,
1801
+ A as PAGE_ROUTE_NAME,
1799
1802
  wn as Provider,
1800
- vn as Startup,
1801
- Hn as StorageService,
1803
+ yn as Startup,
1804
+ On as StorageService,
1802
1805
  C as VTJ_RENDERER_VERSION,
1803
1806
  Se as adoptedStyleSheets,
1807
+ Mn as clearLoaderCache,
1804
1808
  In as createAdapter,
1805
1809
  Cn as createAssetScripts,
1806
- Fn as createAssetsCss,
1807
- Tt as createDataSources,
1810
+ An as createAssetsCss,
1811
+ At as createDataSources,
1808
1812
  Q as createLoader,
1809
- On as createMemoryService,
1810
- wt as createMetaApi,
1811
- jt as createMock,
1812
- Mn as createProvider,
1813
+ Bn as createMemoryService,
1814
+ _t as createMetaApi,
1815
+ bt as createMock,
1816
+ Dn as createProvider,
1813
1817
  Y as createRenderer,
1814
- _t as createSchemaApi,
1815
- St as createSchemaApis,
1816
- Dn as createServiceRequest,
1817
- Mt as defaultLoader,
1818
+ vt as createSchemaApi,
1819
+ wt as createSchemaApis,
1820
+ Hn as createServiceRequest,
1821
+ It as defaultLoader,
1818
1822
  M as fillBasePath,
1819
1823
  Ee as getModifiers,
1820
1824
  $e as getPlugin,
1821
- lt as getRawComponent,
1822
- ht as isBuiltInTag,
1823
- ee as isCSSUrl,
1824
- gt as isJSCode,
1825
+ ct as getRawComponent,
1826
+ ft as isBuiltInTag,
1827
+ te as isCSSUrl,
1828
+ mt as isJSCode,
1825
1829
  _ as isJSExpression,
1826
1830
  I as isJSFunction,
1827
- ot as isJSON,
1828
- te as isJSUrl,
1829
- mt as isNativeTag,
1830
- ft as isVuePlugin,
1831
- ut as loadCss,
1832
- dt as loadCssUrl,
1833
- pt as loadScriptUrl,
1834
- $t as mockApi,
1835
- bt as mockApis,
1831
+ it as isJSON,
1832
+ ne as isJSUrl,
1833
+ ht as isNativeTag,
1834
+ pt as isVuePlugin,
1835
+ lt as loadCss,
1836
+ ut as loadCssUrl,
1837
+ dt as loadScriptUrl,
1838
+ jt as mockApi,
1839
+ St as mockApis,
1836
1840
  je as mockCleanup,
1837
1841
  B as nodeRender,
1838
- ct as parseDeps,
1839
- A as parseExpression,
1842
+ at as parseDeps,
1843
+ T as parseExpression,
1840
1844
  G as parseFunction,
1841
1845
  Re as providerKey,
1842
- at as removeProdFlag,
1846
+ ot as removeProdFlag,
1843
1847
  we as toString,
1844
1848
  yt as useAccess,
1845
- Nn as useMask,
1849
+ Un as useMask,
1846
1850
  xe as useProvider
1847
1851
  };