@vtj/renderer 0.9.0-alpha.43 → 0.9.0-alpha.44

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,19 +1,19 @@
1
- import { Base as Re, BUILT_IN_COMPONENTS as xe, ProjectModel as M, HistoryModel as le } from "@vtj/core";
2
- import { isUrl as ke, url as R, dedupArray as Ce, isString as j, isFunction as V, logger as T, createRequest as Fe, merge as Ae, pathToRegexp as Ie, pathToRegexpMatch as Oe, formDataToJson as Me, storage as U, cookie as L, toArray as se, unRSA as ne, delay as ue, camelCase as $, upperFirst as Te, pick as De, jsonp as He, loadScript as re, Request as Be, Storage as Ne, mapToObject as G } from "@vtj/utils";
3
- import * as H from "vue";
4
- import { inject as de, toRef as Ue, readonly as Le, customRef as qe, ref as C, onBeforeUnmount as Je, getCurrentScope as Ve, onScopeDispose as ze, unref as Ke, getCurrentInstance as pe, watch as fe, computed as he, onMounted as We, defineComponent as Y, h as z, openBlock as Ge, createElementBlock as Ye, createElementVNode as b, toDisplayString as q, defineAsyncComponent as oe, watchEffect as Qe } from "vue";
5
- import { ElNotification as B, ElLoading as Xe } from "element-plus";
6
- import { useRoute as me } from "vue-router";
1
+ import { Base as xe, BUILT_IN_COMPONENTS as ke, ProjectModel as T, HistoryModel as ue } from "@vtj/core";
2
+ import { isUrl as Ce, url as P, dedupArray as Fe, isString as S, isFunction as z, logger as D, createRequest as Ae, merge as Ie, pathToRegexp as Oe, pathToRegexpMatch as Me, formDataToJson as Te, storage as L, cookie as q, toArray as ne, unRSA as re, delay as de, camelCase as $, upperFirst as De, pick as He, jsonp as Be, loadScript as oe, Request as Ne, Storage as Ue, mapToObject as Y } from "@vtj/utils";
3
+ import * as B from "vue";
4
+ import { inject as pe, toRef as Le, readonly as qe, customRef as Je, ref as C, onBeforeUnmount as Ve, getCurrentScope as ze, onScopeDispose as Ke, unref as We, getCurrentInstance as fe, watch as he, computed as me, onMounted as Ge, defineComponent as Q, h as K, openBlock as Ye, createElementBlock as Qe, createElementVNode as b, toDisplayString as J, defineAsyncComponent as ie, watchEffect as Xe } from "vue";
5
+ import { ElNotification as N, ElLoading as Ze } from "element-plus";
6
+ import { useRoute as ge } from "vue-router";
7
7
  /**!
8
8
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
9
9
  * @name @vtj/renderer
10
10
  * @author CHC chenhuachun1549@dingtalk.com
11
- * @version 0.9.0-alpha.43
11
+ * @version 0.9.0-alpha.44
12
12
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
13
13
  */
14
- const x = "0.9.0-alpha.43";
15
- var y = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(y || {});
16
- const ie = [
14
+ const x = "0.9.0-alpha.44";
15
+ var _ = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(_ || {});
16
+ const ae = [
17
17
  "$el",
18
18
  "$emit",
19
19
  "$nextTick",
@@ -25,7 +25,7 @@ const ie = [
25
25
  "$props",
26
26
  "$options",
27
27
  "$forceUpdate"
28
- ], _s = [
28
+ ], ws = [
29
29
  "beforeCreate",
30
30
  "created",
31
31
  "beforeMount",
@@ -39,7 +39,7 @@ const ie = [
39
39
  "renderTriggered",
40
40
  "activated",
41
41
  "deactivated"
42
- ], Ze = ["vIf", "vShow", "vModel", "vFor", "vBind"], et = {
42
+ ], et = ["vIf", "vShow", "vModel", "vFor", "vBind"], tt = {
43
43
  String,
44
44
  Number,
45
45
  Boolean,
@@ -47,59 +47,59 @@ const ie = [
47
47
  Object,
48
48
  Function,
49
49
  Date
50
- }, k = "VtjPage", O = "VtjHomepage";
51
- function A(n, e) {
52
- return n.map((t) => ke(t) || t.startsWith("/") ? t : `${e}${t}`);
50
+ }, k = "VtjPage", M = "VtjHomepage";
51
+ function I(n, e) {
52
+ return n.map((t) => Ce(t) || t.startsWith("/") ? t : `${e}${t}`);
53
53
  }
54
- function Q(n) {
54
+ function X(n) {
55
55
  return /\.css$/.test(n);
56
56
  }
57
- function X(n) {
57
+ function Z(n) {
58
58
  return /\.js$/.test(n);
59
59
  }
60
- function tt(n) {
60
+ function st(n) {
61
61
  return /\.json$/.test(n);
62
62
  }
63
- function ws(n) {
63
+ function Ss(n) {
64
64
  return n.map(
65
- (e) => `<script src="${R.append(e, { v: x })}"><\/script>`
65
+ (e) => `<script src="${P.append(e, { v: x })}"><\/script>`
66
66
  ).join("");
67
67
  }
68
- function Ss(n = []) {
68
+ function js(n = []) {
69
69
  return n.map(
70
- (e) => `<link rel="stylesheet" href="${R.append(e, { v: x })}" />`
70
+ (e) => `<link rel="stylesheet" href="${P.append(e, { v: x })}" />`
71
71
  ).join("");
72
72
  }
73
- function st(n, e = !1) {
73
+ function nt(n, e = !1) {
74
74
  return e && n.endsWith(".prod.js") ? n.replace(".prod.js", ".js") : n;
75
75
  }
76
- function nt(n, e, t = !1) {
77
- const s = n.filter((d) => !!d.enabled), r = [], o = [], a = [], i = [], l = {}, c = {}, p = [], u = {};
76
+ function rt(n, e, t = !1) {
77
+ const s = n.filter((p) => !!p.enabled), r = [], o = [], a = [], i = [], l = {}, c = {}, f = [], u = {};
78
78
  return s.forEach(
79
- ({ urls: d, assetsUrl: f, library: m, assetsLibrary: h, localeLibrary: _ }) => {
80
- d?.forEach((g) => {
81
- X(g) && r.push(st(g, t)), Q(g) && o.push(g);
82
- }), m && (i.push(m), l[m] = A(d || [], e), _ && (c[m] = _)), f && a.push(f), h && p.push(h), m && h && (u[h] = m);
79
+ ({ urls: p, assetsUrl: d, library: h, assetsLibrary: m, localeLibrary: v }) => {
80
+ p?.forEach((g) => {
81
+ Z(g) && r.push(nt(g, t)), X(g) && o.push(g);
82
+ }), h && (i.push(h), l[h] = I(p || [], e), v && (c[h] = v)), d && a.push(d), m && f.push(m), h && m && (u[m] = h);
83
83
  }
84
84
  ), {
85
- scripts: A(r, e),
86
- css: A(o, e),
87
- materials: A(a, e),
85
+ scripts: I(r, e),
86
+ css: I(o, e),
87
+ materials: I(a, e),
88
88
  libraryExports: i,
89
- materialExports: Ce(p),
89
+ materialExports: Fe(f),
90
90
  materialMapLibrary: u,
91
91
  libraryMap: l,
92
92
  libraryLocaleMap: c
93
93
  };
94
94
  }
95
- function rt(n, e) {
95
+ function ot(n, e) {
96
96
  const { name: t, parent: s, alias: r } = n;
97
97
  return s ? e[s]?.[r || t] : e[r || t];
98
98
  }
99
- function ge(n) {
100
- return j(n) ? n : JSON.stringify(n);
99
+ function ve(n) {
100
+ return S(n) ? n : JSON.stringify(n);
101
101
  }
102
- function ve(n, e, t) {
102
+ function ye(n, e, t) {
103
103
  const s = n.CSSStyleSheet;
104
104
  if (s.prototype.replaceSync) {
105
105
  const r = new s();
@@ -114,11 +114,11 @@ function ve(n, e, t) {
114
114
  o ? o.innerHTML = t : (o = r.createElement("style"), o.id = e, o.innerHTML = t, r.head.appendChild(o));
115
115
  }
116
116
  }
117
- async function ot(n, e) {
117
+ async function it(n, e) {
118
118
  const t = await window.fetch(e).then((s) => s.text()).catch(() => "");
119
- t && ve(window, n, t);
119
+ t && ye(window, n, t);
120
120
  }
121
- function it(n, e = window) {
121
+ function at(n, e = window) {
122
122
  const t = e.document, s = e.document.head;
123
123
  for (const r of n)
124
124
  if (!t.getElementById(r)) {
@@ -126,7 +126,7 @@ function it(n, e = window) {
126
126
  a.rel = "stylesheet", a.id = r, a.href = r, s.appendChild(a);
127
127
  }
128
128
  }
129
- async function at(n, e, t = window) {
129
+ async function ct(n, e, t = window) {
130
130
  const s = t.document, r = t.document.head;
131
131
  let o = t[e];
132
132
  return o ? o.default || o : new Promise((a, i) => {
@@ -134,14 +134,14 @@ async function at(n, e, t = window) {
134
134
  const c = s.createElement("script");
135
135
  c.src = l, c.onload = () => {
136
136
  o = t[e], o ? a(o.default || o) : i(null);
137
- }, c.onerror = (p) => {
138
- i(p);
137
+ }, c.onerror = (f) => {
138
+ i(f);
139
139
  }, r.appendChild(c);
140
140
  }
141
141
  });
142
142
  }
143
- function ct(n) {
144
- return V(n) || V(n?.install);
143
+ function lt(n) {
144
+ return z(n) || z(n?.install);
145
145
  }
146
146
  function F(n, e, t = !1, s = !1) {
147
147
  try {
@@ -153,13 +153,13 @@ function F(n, e, t = !1, s = !1) {
153
153
  const a = `with(${t ? "{}" : "$scope || {}"}) { ${o} }`;
154
154
  return new Function("$scope", a)(e);
155
155
  } catch (r) {
156
- if (T.error("parseExpression.error", r, n, e?.__self ?? e), s)
156
+ if (D.error("parseExpression.error", r, n, e?.__self ?? e), s)
157
157
  throw r;
158
158
  }
159
159
  }
160
- function ae(n, e, t = !1, s = !1) {
160
+ function ce(n, e, t = !1, s = !1) {
161
161
  const r = F(n, e, t, s);
162
- if (typeof r != "function" && (T.error(
162
+ if (typeof r != "function" && (D.error(
163
163
  "parseFunction.error",
164
164
  "not a function",
165
165
  n,
@@ -171,17 +171,17 @@ function ae(n, e, t = !1, s = !1) {
171
171
  function w(n) {
172
172
  return n && n.type === "JSExpression";
173
173
  }
174
- function N(n) {
174
+ function U(n) {
175
175
  return typeof n == "object" && n && n.type === "JSFunction";
176
176
  }
177
- function lt(n) {
178
- return w(n) || N(n);
177
+ function ut(n) {
178
+ return w(n) || U(n);
179
179
  }
180
- function js(n) {
181
- return lt(n) ? n.value : JSON.stringify(n);
180
+ function $s(n) {
181
+ return ut(n) ? n.value : JSON.stringify(n);
182
182
  }
183
183
  let E = null;
184
- const ut = Fe({
184
+ const dt = Ae({
185
185
  settings: {
186
186
  type: "form",
187
187
  validSuccess: !0,
@@ -190,12 +190,12 @@ const ut = Fe({
190
190
  validate: (n) => n.data?.code === 0 || !!n.data?.success,
191
191
  failMessage: !0,
192
192
  showError: (n) => {
193
- B.error({
193
+ N.error({
194
194
  message: n || "未知错误"
195
195
  });
196
196
  },
197
197
  showLoading: () => {
198
- E && E.close(), E = Xe.service({
198
+ E && E.close(), E = Ze.service({
199
199
  lock: !0,
200
200
  text: "Loading",
201
201
  background: "rgba(0, 0, 0, 0.05)"
@@ -206,8 +206,8 @@ const ut = Fe({
206
206
  }
207
207
  }
208
208
  });
209
- let P;
210
- function dt(n, e) {
209
+ let R;
210
+ function pt(n, e) {
211
211
  const { jsonp: t, request: s } = e;
212
212
  if (n.method === "jsonp")
213
213
  return (r = {}) => t(n.url, {
@@ -223,10 +223,10 @@ function dt(n, e) {
223
223
  headers: r
224
224
  }
225
225
  };
226
- return (a, i) => (delete o.data, s.send(Ae(o, i || {}, { data: a })));
226
+ return (a, i) => (delete o.data, s.send(Ie(o, i || {}, { data: a })));
227
227
  }
228
228
  }
229
- function pt(n, e) {
229
+ function ft(n, e) {
230
230
  const { metaQuery: t } = e;
231
231
  if (!t) return;
232
232
  const { code: s, queryCode: r } = n;
@@ -238,34 +238,34 @@ function pt(n, e) {
238
238
  return t(s, r, o, a);
239
239
  };
240
240
  }
241
- function ft(n = [], e = [], t) {
241
+ function ht(n = [], e = [], t) {
242
242
  const s = {};
243
243
  for (const r of n)
244
- s[r.id] = dt(r, t);
245
- for (const r of e)
246
244
  s[r.id] = pt(r, t);
245
+ for (const r of e)
246
+ s[r.id] = ft(r, t);
247
247
  return s;
248
248
  }
249
- async function ht(n = []) {
250
- P = await import("mockjs").then((e) => e.default || e), P && (P.setup({
249
+ async function mt(n = []) {
250
+ R = await import("mockjs").then((e) => e.default || e), R && (R.setup({
251
251
  timeout: "50-500"
252
- }), ye(), n.forEach((e) => mt(P, e)));
252
+ }), _e(), n.forEach((e) => gt(R, e)));
253
253
  }
254
- function mt(n, e) {
254
+ function gt(n, e) {
255
255
  if (!e.mock) return;
256
256
  const { url: t, mockTemplate: s } = e;
257
257
  if (t && s) {
258
- const r = Ie(`${t}(.*)`), o = Oe(t, { decode: decodeURIComponent }), a = F(s, {}, !0);
258
+ const r = Oe(`${t}(.*)`), o = Me(t, { decode: decodeURIComponent }), a = F(s, {}, !0);
259
259
  n.mock(r, (i) => {
260
- const l = R.parse(i.url) || {}, c = i.body instanceof FormData ? Me(i.body) : i.body, p = o(i.url)?.params;
261
- return Object.assign(i, { data: c, params: l, query: p }), n.mock(a(i));
260
+ const l = P.parse(i.url) || {}, c = i.body instanceof FormData ? Te(i.body) : i.body, f = o(i.url)?.params;
261
+ return Object.assign(i, { data: c, params: l, query: f }), n.mock(a(i));
262
262
  });
263
263
  }
264
264
  }
265
- function ye() {
266
- P && (P._mocked = {});
265
+ function _e() {
266
+ R && (R._mocked = {});
267
267
  }
268
- const gt = {
268
+ const vt = {
269
269
  session: !1,
270
270
  authKey: "Authorization",
271
271
  storageKey: "ACCESS_STORAGE",
@@ -277,31 +277,31 @@ const gt = {
277
277
  unauthorizedMessage: "登录已经失效,请重新登录!",
278
278
  noPermissionMessage: "无权限访问该页面",
279
279
  appName: ""
280
- }, _e = Symbol("access");
281
- class $s {
280
+ }, we = Symbol("access");
281
+ class bs {
282
282
  options;
283
283
  data = null;
284
- mode = y.Raw;
284
+ mode = _.Raw;
285
285
  constructor(e) {
286
- this.options = Object.assign({}, gt, e), this.loadData();
286
+ this.options = Object.assign({}, vt, e), this.loadData();
287
287
  }
288
288
  connect(e) {
289
289
  const { mode: t, router: s, request: r } = e;
290
- this.mode = t, s && this.mode === y.Raw && this.setGuard(s), r && this.setRequest(r);
290
+ this.mode = t, s && this.mode === _.Raw && this.setGuard(s), r && this.setRequest(r);
291
291
  }
292
292
  login(e) {
293
293
  const { storageKey: t, storagePrefix: s, session: r, authKey: o } = this.options;
294
- this.setData(e), this.data && (U.save(t, e, {
294
+ this.setData(e), this.data && (L.save(t, e, {
295
295
  type: "local",
296
296
  prefix: s
297
- }), r && L.set(o, this.data.token));
297
+ }), r && q.set(o, this.data.token));
298
298
  }
299
299
  clear() {
300
300
  const { storageKey: e, storagePrefix: t, session: s, authKey: r } = this.options;
301
- this.data = null, U.remove(e, {
301
+ this.data = null, L.remove(e, {
302
302
  type: "local",
303
303
  prefix: t
304
- }), s && L.remove(r);
304
+ }), s && q.remove(r);
305
305
  }
306
306
  logout() {
307
307
  this.clear(), this.toLogin();
@@ -314,14 +314,14 @@ class $s {
314
314
  }
315
315
  can(e) {
316
316
  const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
317
- return typeof e == "function" ? e(s) : se(e).every((o) => s[o] || s[t + "." + o]);
317
+ return typeof e == "function" ? e(s) : ne(e).every((o) => s[o] || s[t + "." + o]);
318
318
  }
319
319
  some(e) {
320
320
  const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
321
- return se(e).some((o) => s[o] || s[t + "." + o]);
321
+ return ne(e).some((o) => s[o] || s[t + "." + o]);
322
322
  }
323
323
  install(e) {
324
- e.config.globalProperties.$access || (e.config.globalProperties.$access = this), e.provide(_e, this);
324
+ e.config.globalProperties.$access || (e.config.globalProperties.$access = this), e.provide(we, this);
325
325
  }
326
326
  isAuthPath(e) {
327
327
  const { auth: t, isAuth: s } = this.options;
@@ -342,13 +342,13 @@ class $s {
342
342
  setData(e) {
343
343
  const { privateKey: t } = this.options;
344
344
  if (Array.isArray(e) && t) {
345
- const s = e.map((r) => ne(r, t));
345
+ const s = e.map((r) => re(r, t));
346
346
  this.data = JSON.parse(s.join(""));
347
347
  return;
348
348
  }
349
349
  if (typeof e == "string")
350
350
  try {
351
- const s = t ? ne(e, t) : e;
351
+ const s = t ? re(e, t) : e;
352
352
  s ? this.data = JSON.parse(s) : console.warn("RSA解密失败或登录信息缺失");
353
353
  } catch (s) {
354
354
  console.warn(s);
@@ -357,7 +357,7 @@ class $s {
357
357
  this.data = e;
358
358
  }
359
359
  loadData() {
360
- const { storageKey: e, storagePrefix: t } = this.options, s = U.get(e, {
360
+ const { storageKey: e, storagePrefix: t } = this.options, s = L.get(e, {
361
361
  type: "local",
362
362
  prefix: t
363
363
  });
@@ -365,7 +365,7 @@ class $s {
365
365
  }
366
366
  isLogined() {
367
367
  const { session: e, authKey: t } = this.options;
368
- return e && t ? !!L.get(t) : !!this.getToken();
368
+ return e && t ? !!q.get(t) : !!this.getToken();
369
369
  }
370
370
  hasRoutePermission(e) {
371
371
  if (e.name === k) {
@@ -385,7 +385,7 @@ class $s {
385
385
  return t();
386
386
  {
387
387
  const { noPermissionMessage: s = "无权限访问", unauthorized: r = !1 } = this.options;
388
- return await this.showTip(s), V(r) ? (r(), t(!1)) : j(r) ? t(r) : t(!1);
388
+ return await this.showTip(s), z(r) ? (r(), t(!1)) : S(r) ? t(r) : t(!1);
389
389
  }
390
390
  }
391
391
  t(!1), this.toLogin();
@@ -404,7 +404,7 @@ class $s {
404
404
  }
405
405
  async showTip(e) {
406
406
  const { alert: t } = this.options;
407
- return t ? (await ue(150), await t(e, {
407
+ return t ? (await de(150), await t(e, {
408
408
  title: "提示",
409
409
  type: "warning"
410
410
  }).catch(() => !1)) : !1;
@@ -419,10 +419,10 @@ class $s {
419
419
  );
420
420
  }
421
421
  }
422
- function vt() {
423
- return de(_e, null);
422
+ function yt() {
423
+ return pe(we, null);
424
424
  }
425
- class yt {
425
+ class _t {
426
426
  __id = null;
427
427
  __mode;
428
428
  __instance = null;
@@ -451,7 +451,7 @@ class yt {
451
451
  const { mode: t, dsl: s, attrs: r } = e;
452
452
  this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), r && Object.assign(this, r);
453
453
  }
454
- setup(e, t = H) {
454
+ setup(e, t = B) {
455
455
  const s = t.getCurrentInstance();
456
456
  if (!s) return;
457
457
  this.__refs = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = s.proxy;
@@ -465,41 +465,41 @@ class yt {
465
465
  });
466
466
  }
467
467
  __proxy() {
468
- this.__instance && ie.forEach((e) => {
468
+ this.__instance && ae.forEach((e) => {
469
469
  this[e] = this.__instance?.[e];
470
470
  });
471
471
  }
472
472
  __cleanup() {
473
- ie.forEach((e) => {
473
+ ae.forEach((e) => {
474
474
  this[e] = null;
475
475
  });
476
476
  }
477
477
  __parseFunction(e) {
478
478
  if (e)
479
- if (this.__mode === y.Runtime) {
479
+ if (this.__mode === _.Runtime) {
480
480
  const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
481
- return ae({ type: s, value: r }, this);
481
+ return ce({ type: s, value: r }, this);
482
482
  } else
483
- return ae(e, this);
483
+ return ce(e, this);
484
484
  }
485
485
  __parseExpression(e) {
486
486
  if (e)
487
- if (this.__mode === y.Runtime) {
487
+ if (this.__mode === _.Runtime) {
488
488
  const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
489
489
  return F({ type: s, value: r }, this);
490
490
  } else
491
491
  return F(e, this);
492
492
  }
493
493
  __ref(e = null, t) {
494
- if (this.__mode !== y.VNode)
494
+ if (this.__mode !== _.VNode)
495
495
  return e && e !== this.__id && (this.__contextRefs[e] = this), async (s) => {
496
- await ue(0);
496
+ await de(0);
497
497
  let r = s?.$vtjEl || s?.$el || s?._?.vnode?.el || s;
498
498
  if (!r) {
499
499
  typeof t == "string" && (delete this.$refs[t], e && delete this.__refs[e]);
500
500
  return;
501
501
  }
502
- if (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] = s), typeof t == "function")
502
+ if (r.nodeType === 3 && r.nextSibling && (r = r.nextSibling), r.__vtj__ = e, _.Design === this.__mode && (r.__context__ = this, r.draggable = !0), e && (this.__refs[e] = s), typeof t == "function")
503
503
  t(s);
504
504
  else if (t) {
505
505
  const o = this.$refs[t];
@@ -520,10 +520,10 @@ class yt {
520
520
  return s.context.__proto__ = this.context, s.__proto__ = this, s;
521
521
  }
522
522
  }
523
- function K(n) {
523
+ function W(n) {
524
524
  const {
525
- Vue: e = H,
526
- mode: t = y.Runtime,
525
+ Vue: e = B,
526
+ mode: t = _.Runtime,
527
527
  components: s = {},
528
528
  libs: r = {},
529
529
  apis: o = {},
@@ -532,54 +532,54 @@ function K(n) {
532
532
  $components: s,
533
533
  $libs: r,
534
534
  $apis: o
535
- }, c = new yt({
535
+ }, c = new _t({
536
536
  mode: t,
537
537
  dsl: i.value,
538
538
  attrs: l
539
- }), p = e.defineComponent({
539
+ }), f = e.defineComponent({
540
540
  name: i.value.name,
541
541
  props: {
542
- ...wt(i.value.props ?? [], c)
542
+ ...St(i.value.props ?? [], c)
543
543
  },
544
544
  setup(u) {
545
- c.$props = u, c.props = u, i.value.id && ve(
545
+ c.$props = u, c.props = u, i.value.id && ye(
546
546
  n.window || window,
547
547
  i.value.id,
548
548
  i.value.css || ""
549
- ), c.state = St(e, i.value.state ?? {}, c);
550
- const d = jt(e, i.value.computed ?? {}, c), f = $t(i.value.methods ?? {}, c), m = bt(e, i.value.inject, c), h = Et(
549
+ ), c.state = jt(e, i.value.state ?? {}, c);
550
+ const p = $t(e, i.value.computed ?? {}, c), d = bt(i.value.methods ?? {}, c), h = Et(e, i.value.inject, c), m = Rt(
551
551
  i.value.dataSources || {},
552
552
  c
553
- ), _ = {
554
- ...m,
553
+ ), v = {
554
+ ...h,
555
+ ...p,
555
556
  ...d,
556
- ...f,
557
- ...h
557
+ ...m
558
558
  };
559
- return c.setup(_, e), Pt(e, i.value.watch ?? [], c), {
559
+ return c.setup(v, e), Pt(e, i.value.watch ?? [], c), {
560
560
  vtj: c
561
561
  };
562
562
  },
563
- emits: _t(i.value.emits),
563
+ emits: wt(i.value.emits),
564
564
  expose: ["vtj"],
565
565
  render() {
566
566
  if (!i.value.nodes) return null;
567
567
  const u = i.value.nodes || [];
568
- return u.length === 1 ? D(u[0], c, e, a) : u.map((d) => D(d, c, e, a));
568
+ return u.length === 1 ? H(u[0], c, e, a) : u.map((p) => H(p, c, e, a));
569
569
  },
570
- ...Rt(i.value.lifeCycles ?? {}, c)
570
+ ...xt(i.value.lifeCycles ?? {}, c)
571
571
  });
572
572
  return {
573
- renderer: e.markRaw(p),
573
+ renderer: e.markRaw(f),
574
574
  context: c
575
575
  };
576
576
  }
577
- function _t(n = []) {
578
- return n.map((e) => j(e) ? e : e.name);
577
+ function wt(n = []) {
578
+ return n.map((e) => S(e) ? e : e.name);
579
579
  }
580
- function wt(n = [], e) {
581
- const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((o) => et[o]) : void 0;
582
- return n.map((s) => j(s) ? {
580
+ function St(n = [], e) {
581
+ const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((o) => tt[o]) : void 0;
582
+ return n.map((s) => S(s) ? {
583
583
  name: s
584
584
  } : {
585
585
  name: s.name,
@@ -595,30 +595,30 @@ function wt(n = [], e) {
595
595
  {}
596
596
  );
597
597
  }
598
- function St(n, e, t) {
598
+ function jt(n, e, t) {
599
599
  return n.reactive(
600
600
  Object.keys(e || {}).reduce(
601
601
  (s, r) => {
602
602
  let o = e[r];
603
- return w(o) ? o = t.__parseExpression(o) : N(o) && (o = t.__parseFunction(o)), s[r] = o, s;
603
+ return w(o) ? o = t.__parseExpression(o) : U(o) && (o = t.__parseFunction(o)), s[r] = o, s;
604
604
  },
605
605
  {}
606
606
  )
607
607
  );
608
608
  }
609
- function jt(n, e, t) {
609
+ function $t(n, e, t) {
610
610
  return Object.entries(e ?? {}).reduce(
611
611
  (s, [r, o]) => (s[r] = n.computed(t.__parseFunction(o)), s),
612
612
  {}
613
613
  );
614
614
  }
615
- function $t(n, e) {
615
+ function bt(n, e) {
616
616
  return Object.entries(n ?? {}).reduce(
617
617
  (t, [s, r]) => (t[s] = e.__parseFunction(r), t),
618
618
  {}
619
619
  );
620
620
  }
621
- function bt(n, e = [], t) {
621
+ function Et(n, e = [], t) {
622
622
  return e.reduce(
623
623
  (s, r) => {
624
624
  const { name: o, from: a } = r || {};
@@ -629,10 +629,10 @@ function bt(n, e = [], t) {
629
629
  {}
630
630
  );
631
631
  }
632
- function Et(n, e) {
632
+ function Rt(n, e) {
633
633
  return Object.keys(n).reduce(
634
634
  (t, s) => {
635
- const r = n[s], o = e.$apis[r.ref], a = N(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
635
+ const r = n[s], o = e.$apis[r.ref], a = U(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
636
636
  return t[s] = async (...i) => {
637
637
  const l = await o.apply(e, i);
638
638
  return a ? a(l) : l;
@@ -653,84 +653,84 @@ function Pt(n, e = [], t) {
653
653
  );
654
654
  });
655
655
  }
656
- function Rt(n, e) {
656
+ function xt(n, e) {
657
657
  return Object.entries(n ?? {}).reduce(
658
658
  (t, [s, r]) => (t[s] = e.__parseFunction(r), t),
659
659
  {}
660
660
  );
661
661
  }
662
- let J = [];
663
- const xt = (n) => n;
664
- async function we(n, e = window) {
665
- const { urls: t = [], library: s } = n, r = t.filter((i) => X(i));
662
+ let V = [];
663
+ const kt = (n) => n;
664
+ async function Se(n, e = window) {
665
+ const { urls: t = [], library: s } = n, r = t.filter((i) => Z(i));
666
666
  if (r.length === 0 || !s) return null;
667
- const o = t.filter((i) => Q(i));
668
- return o.length && it(o, e), await at(r, s, e).catch(
667
+ const o = t.filter((i) => X(i));
668
+ return o.length && at(o, e), await ct(r, s, e).catch(
669
669
  (i) => (console.warn("loadScriptUrl error", r, s, i), null)
670
670
  );
671
671
  }
672
- function W(n) {
672
+ function G(n) {
673
673
  const { getDsl: e, getDslByUrl: t, options: s } = n;
674
- return s.window && (J.forEach((r) => {
674
+ return s.window && (V.forEach((r) => {
675
675
  delete s.window[r];
676
- }), J = []), (r, o, a = H) => !o || typeof o == "string" ? r : o.type === "Schema" && o.id ? a.defineAsyncComponent(async () => {
676
+ }), V = []), (r, o, a = B) => !o || typeof o == "string" ? r : o.type === "Schema" && o.id ? a.defineAsyncComponent(async () => {
677
677
  const i = await e(o.id);
678
- return i && (i.name = r), i ? K({
678
+ return i && (i.name = r), i ? W({
679
679
  ...s,
680
680
  Vue: a,
681
681
  dsl: i,
682
- mode: y.Runtime,
683
- loader: W(n)
682
+ mode: _.Runtime,
683
+ loader: G(n)
684
684
  }).renderer : null;
685
685
  }) : o.type === "UrlSchema" && o.url ? a.defineAsyncComponent(async () => {
686
686
  const i = await t(o.url);
687
- return i && (i.name = r), i ? K({
687
+ return i && (i.name = r), i ? W({
688
688
  ...s,
689
689
  Vue: a,
690
690
  dsl: i,
691
- mode: y.Runtime,
692
- loader: W(n)
691
+ mode: _.Runtime,
692
+ loader: G(n)
693
693
  }).renderer : null;
694
- }) : o.type === "Plugin" ? (o.library && J.push(o.library), a.defineAsyncComponent(async () => {
695
- const i = await we(o, s.window);
694
+ }) : o.type === "Plugin" ? (o.library && V.push(o.library), a.defineAsyncComponent(async () => {
695
+ const i = await Se(o, s.window);
696
696
  return i || (console.warn("getPlugin result is null", o), null);
697
697
  })) : r;
698
698
  }
699
- function D(n, e, t = H, s = xt) {
699
+ function H(n, e, t = B, s = kt) {
700
700
  if (!n || !n.name || n.invisible) return null;
701
- const { id: r = null, directives: o = [] } = n, { vIf: a, vFor: i, vShow: l, vModels: c, vBind: p } = kt(o);
702
- if (a && !Ct(a, e))
701
+ const r = t.getCurrentInstance()?.appContext, { id: o = null, directives: a = [] } = n, { vIf: i, vFor: l, vShow: c, vModels: f, vBind: u } = Ct(a);
702
+ if (i && !Ft(i, e))
703
703
  return null;
704
- const u = (d) => {
705
- const f = d.$components, m = (() => {
704
+ const p = (d) => {
705
+ const h = d.$components, m = (() => {
706
706
  if (n.name === "component")
707
- return Ft(d, n.props?.is);
707
+ return At(d, n.props?.is);
708
708
  if (n.name === "slot") return n.name;
709
- const S = s(n.name, n.from, t);
710
- return j(S) ? f[S] ?? S : S;
711
- })(), h = At(r, n.props ?? {}, d), _ = It(t, n.events ?? {}, d);
709
+ const j = s(n.name, n.from, t);
710
+ return S(j) ? h[j] ?? r?.app?.component(j) ?? j : j;
711
+ })(), v = It(o, n.props ?? {}, d), g = Ot(t, n.events ?? {}, d);
712
712
  if (n.name === "slot")
713
- return Ot(t, n, h, d, s);
714
- p && Object.assign(h, d.__parseExpression(p.value)), l && (h.style = Object.assign(
715
- h.style ?? {},
716
- Tt(l, d)
717
- )), c.forEach((S) => {
718
- Object.assign(h, Dt(t, S, d));
713
+ return Mt(t, n, v, d, s);
714
+ u && Object.assign(v, d.__parseExpression(u.value)), c && (v.style = Object.assign(
715
+ v.style ?? {},
716
+ Dt(c, d)
717
+ )), f.forEach((j) => {
718
+ Object.assign(v, Ht(t, j, d));
719
719
  });
720
- const g = Ht(
720
+ const A = Bt(
721
721
  t,
722
722
  n.children ?? [],
723
723
  d,
724
724
  s,
725
725
  n
726
726
  );
727
- return t.createVNode(m, { ...h, ..._ }, g);
727
+ return t.createVNode(m, { ...v, ...g }, A);
728
728
  };
729
- return i ? Ut(i, u, e) : u(e);
729
+ return l ? Lt(l, p, e) : p(e);
730
730
  }
731
- function kt(n = []) {
731
+ function Ct(n = []) {
732
732
  const e = n.find((i) => $(i.name) === "vIf"), t = n.find((i) => $(i.name) === "vFor"), s = n.find((i) => $(i.name) === "vShow"), r = n.find((i) => $(i.name) === "vBind"), o = n.filter((i) => $(i.name) === "vModel"), a = n.filter(
733
- (i) => !Ze.includes($(i.name))
733
+ (i) => !et.includes($(i.name))
734
734
  );
735
735
  return {
736
736
  vIf: e,
@@ -741,23 +741,23 @@ function kt(n = []) {
741
741
  others: a
742
742
  };
743
743
  }
744
- function Ct(n, e) {
744
+ function Ft(n, e) {
745
745
  return !!e.__parseExpression(n.value);
746
746
  }
747
- function Ft(n, e) {
747
+ function At(n, e) {
748
748
  return e ? w(e) ? n.__parseExpression(e) : e : "div";
749
749
  }
750
- function At(n, e, t) {
750
+ function It(n, e, t) {
751
751
  const s = Object.keys(e || {}).reduce(
752
752
  (r, o) => {
753
753
  let a = e[o];
754
- return w(a) ? a = t.__parseExpression(a) : N(a) && (a = t.__parseFunction(a)), r[o] = a, r;
754
+ return w(a) ? a = t.__parseExpression(a) : U(a) && (a = t.__parseFunction(a)), r[o] = a, r;
755
755
  },
756
756
  {}
757
757
  );
758
758
  return s.ref = t.__ref(n, s.ref), s;
759
759
  }
760
- function It(n, e, t) {
760
+ function Ot(n, e, t) {
761
761
  const s = ["passive", "capture", "once"], r = {
762
762
  capture: "Capture",
763
763
  once: "Once",
@@ -765,70 +765,70 @@ function It(n, e, t) {
765
765
  };
766
766
  return Object.keys(e || {}).reduce(
767
767
  (o, a) => {
768
- const i = e[a], l = Se(i.modifiers), c = l.find((d) => s.includes(d)), p = "on" + Te(a) + (c && r[c] || ""), u = t.__parseFunction(i.handler);
769
- return u && (o[p] = n.withModifiers(u, l)), o;
768
+ const i = e[a], l = je(i.modifiers), c = l.find((p) => s.includes(p)), f = "on" + De(a) + (c && r[c] || ""), u = t.__parseFunction(i.handler);
769
+ return u && (o[f] = n.withModifiers(u, l)), o;
770
770
  },
771
771
  {}
772
772
  );
773
773
  }
774
- function Se(n = {}, e = !1) {
774
+ function je(n = {}, e = !1) {
775
775
  const t = Object.keys(n);
776
776
  return e ? t.map((s) => "." + s) : t;
777
777
  }
778
- function Ot(n, e, t, s, r) {
779
- const { children: o } = e, a = Mt(e, s), i = s.$slots?.[a.name];
780
- return i ? i(t) : o ? j(o) ? n.createTextVNode(o) : w(o) ? n.createTextVNode(
781
- ge(s.__parseExpression(o))
778
+ function Mt(n, e, t, s, r) {
779
+ const { children: o } = e, a = Tt(e, s), i = s.$slots?.[a.name];
780
+ return i ? i(t) : o ? S(o) ? n.createTextVNode(o) : w(o) ? n.createTextVNode(
781
+ ve(s.__parseExpression(o))
782
782
  ) : Array.isArray(o) ? o.map(
783
- (l) => D(l, s, n, r)
783
+ (l) => H(l, s, n, r)
784
784
  ) : null : null;
785
785
  }
786
- function Mt(n, e) {
786
+ function Tt(n, e) {
787
787
  const { props: t } = n, s = t?.name || "default";
788
788
  return {
789
789
  name: w(s) ? e.__parseExpression(s) : s,
790
790
  params: []
791
791
  };
792
792
  }
793
- function Tt(n, e) {
793
+ function Dt(n, e) {
794
794
  return e.__parseExpression(n.value) ? {} : {
795
795
  display: "none"
796
796
  };
797
797
  }
798
- function Dt(n, e, t) {
798
+ function Ht(n, e, t) {
799
799
  const s = {
800
800
  type: "JSFunction",
801
801
  value: e.value?.value ? `(v) => {
802
802
  ${e.value.value} = v;
803
803
  }` : "(v) => {}"
804
- }, r = t.__parseFunction(s), o = Se(e.modifiers), a = w(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
804
+ }, r = t.__parseFunction(s), o = je(e.modifiers), a = w(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
805
805
  return {
806
806
  [a]: t.__parseExpression(e.value),
807
807
  [`onUpdate:${a}`]: o.length && r ? n.withModifiers(r, o) : r
808
808
  };
809
809
  }
810
- function Ht(n, e, t, s, r) {
810
+ function Bt(n, e, t, s, r) {
811
811
  if (!e) return null;
812
- if (j(e))
812
+ if (S(e))
813
813
  return { default: () => e };
814
814
  if (w(e))
815
815
  return {
816
- default: () => ge(t.__parseExpression(e))
816
+ default: () => ve(t.__parseExpression(e))
817
817
  };
818
818
  if (Array.isArray(e) && e.length > 0) {
819
- const o = Bt(e), a = (i) => !i || !r ? {} : r?.id && Object.keys(i).length ? {
819
+ const o = Nt(e), a = (i) => !i || !r ? {} : r?.id && Object.keys(i).length ? {
820
820
  [`scope_${r.id}`]: i
821
821
  } : {};
822
- return Object.entries(o).reduce((i, [l, { nodes: c, params: p }]) => (i[l] = (u) => {
823
- const d = p.length ? De(u ?? {}, p) : a(u);
822
+ return Object.entries(o).reduce((i, [l, { nodes: c, params: f }]) => (i[l] = (u) => {
823
+ const p = f.length ? He(u ?? {}, f) : a(u);
824
824
  return c.map(
825
- (f) => D(f, t.__clone(d), n, s)
825
+ (d) => H(d, t.__clone(p), n, s)
826
826
  );
827
827
  }, i), {});
828
828
  }
829
829
  return null;
830
830
  }
831
- function Bt(n) {
831
+ function Nt(n) {
832
832
  const e = {
833
833
  default: {
834
834
  params: [],
@@ -836,7 +836,7 @@ function Bt(n) {
836
836
  }
837
837
  };
838
838
  for (const t of n) {
839
- const s = Nt(t.slot), r = s.name;
839
+ const s = Ut(t.slot), r = s.name;
840
840
  e[r] ? (e[r].nodes.push(t), e[r].params = e[r].params.concat(s.params)) : e[r] = {
841
841
  nodes: [t],
842
842
  params: s.params
@@ -844,111 +844,111 @@ function Bt(n) {
844
844
  }
845
845
  return e;
846
846
  }
847
- function Nt(n = "default") {
848
- return j(n) ? { name: n, params: [] } : { params: [], ...n };
847
+ function Ut(n = "default") {
848
+ return S(n) ? { name: n, params: [] } : { params: [], ...n };
849
849
  }
850
- function Ut(n, e, t) {
850
+ function Lt(n, e, t) {
851
851
  const { value: s, iterator: r } = n, { item: o = "item", index: a = "index" } = r || {};
852
852
  let i = t.__parseExpression(s) || [];
853
853
  return Number.isInteger(i) && (i = new Array(i).fill(!0).map((l, c) => c + 1)), Array.isArray(i) ? i.map((l, c) => e(t.__clone({ [o]: l, [a]: c }))) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
854
854
  }
855
- function Lt(n) {
856
- return Ve() ? (ze(n), !0) : !1;
855
+ function qt(n) {
856
+ return ze() ? (Ke(n), !0) : !1;
857
857
  }
858
- function Z(n) {
859
- return typeof n == "function" ? n() : Ke(n);
858
+ function ee(n) {
859
+ return typeof n == "function" ? n() : We(n);
860
860
  }
861
- const je = typeof window < "u" && typeof document < "u";
861
+ const $e = typeof window < "u" && typeof document < "u";
862
862
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
863
- const qt = (n) => n != null, Jt = () => {
863
+ const Jt = (n) => n != null, Vt = () => {
864
864
  };
865
- function Vt(n) {
866
- return pe();
865
+ function zt(n) {
866
+ return fe();
867
867
  }
868
- function zt(...n) {
868
+ function Kt(...n) {
869
869
  if (n.length !== 1)
870
- return Ue(...n);
870
+ return Le(...n);
871
871
  const e = n[0];
872
- return typeof e == "function" ? Le(qe(() => ({ get: e, set: Jt }))) : C(e);
872
+ return typeof e == "function" ? qe(Je(() => ({ get: e, set: Vt }))) : C(e);
873
873
  }
874
- function Kt(n, e) {
875
- Vt() && Je(n, e);
874
+ function Wt(n, e) {
875
+ zt() && Ve(n, e);
876
876
  }
877
- const Wt = je ? window : void 0, Gt = je ? window.document : void 0;
878
- function Yt(n) {
877
+ const Gt = $e ? window : void 0, Yt = $e ? window.document : void 0;
878
+ function Qt(n) {
879
879
  var e;
880
- const t = Z(n);
880
+ const t = ee(n);
881
881
  return (e = t?.$el) != null ? e : t;
882
882
  }
883
- function Qt() {
884
- const n = C(!1), e = pe();
885
- return e && We(() => {
883
+ function Xt() {
884
+ const n = C(!1), e = fe();
885
+ return e && Ge(() => {
886
886
  n.value = !0;
887
887
  }, e), n;
888
888
  }
889
- function Xt(n) {
890
- const e = Qt();
891
- return he(() => (e.value, !!n()));
889
+ function Zt(n) {
890
+ const e = Xt();
891
+ return me(() => (e.value, !!n()));
892
892
  }
893
- function Zt(n, e, t = {}) {
894
- const { window: s = Wt, ...r } = t;
893
+ function es(n, e, t = {}) {
894
+ const { window: s = Gt, ...r } = t;
895
895
  let o;
896
- const a = Xt(() => s && "MutationObserver" in s), i = () => {
896
+ const a = Zt(() => s && "MutationObserver" in s), i = () => {
897
897
  o && (o.disconnect(), o = void 0);
898
- }, l = he(() => {
899
- const d = Z(n), f = (Array.isArray(d) ? d : [d]).map(Yt).filter(qt);
900
- return new Set(f);
901
- }), c = fe(
898
+ }, l = me(() => {
899
+ const p = ee(n), d = (Array.isArray(p) ? p : [p]).map(Qt).filter(Jt);
900
+ return new Set(d);
901
+ }), c = he(
902
902
  () => l.value,
903
- (d) => {
904
- i(), a.value && d.size && (o = new MutationObserver(e), d.forEach((f) => o.observe(f, r)));
903
+ (p) => {
904
+ i(), a.value && p.size && (o = new MutationObserver(e), p.forEach((d) => o.observe(d, r)));
905
905
  },
906
906
  { immediate: !0, flush: "post" }
907
- ), p = () => o?.takeRecords(), u = () => {
907
+ ), f = () => o?.takeRecords(), u = () => {
908
908
  c(), i();
909
909
  };
910
- return Lt(u), {
910
+ return qt(u), {
911
911
  isSupported: a,
912
912
  stop: u,
913
- takeRecords: p
913
+ takeRecords: f
914
914
  };
915
915
  }
916
- function es(n = null, e = {}) {
916
+ function ts(n = null, e = {}) {
917
917
  var t, s, r;
918
918
  const {
919
- document: o = Gt,
919
+ document: o = Yt,
920
920
  restoreOnUnmount: a = (u) => u
921
- } = e, i = (t = o?.title) != null ? t : "", l = zt((s = n ?? o?.title) != null ? s : null), c = n && typeof n == "function";
922
- function p(u) {
921
+ } = e, i = (t = o?.title) != null ? t : "", l = Kt((s = n ?? o?.title) != null ? s : null), c = n && typeof n == "function";
922
+ function f(u) {
923
923
  if (!("titleTemplate" in e))
924
924
  return u;
925
- const d = e.titleTemplate || "%s";
926
- return typeof d == "function" ? d(u) : Z(d).replace(/%s/g, u);
925
+ const p = e.titleTemplate || "%s";
926
+ return typeof p == "function" ? p(u) : ee(p).replace(/%s/g, u);
927
927
  }
928
- return fe(
928
+ return he(
929
929
  l,
930
- (u, d) => {
931
- u !== d && o && (o.title = p(typeof u == "string" ? u : ""));
930
+ (u, p) => {
931
+ u !== p && o && (o.title = f(typeof u == "string" ? u : ""));
932
932
  },
933
933
  { immediate: !0 }
934
- ), e.observe && !e.titleTemplate && o && !c && Zt(
934
+ ), e.observe && !e.titleTemplate && o && !c && es(
935
935
  (r = o.head) == null ? void 0 : r.querySelector("title"),
936
936
  () => {
937
- o && o.title !== l.value && (l.value = p(o.title));
937
+ o && o.title !== l.value && (l.value = f(o.title));
938
938
  },
939
939
  { childList: !0 }
940
- ), Kt(() => {
940
+ ), Wt(() => {
941
941
  if (a) {
942
942
  const u = a(i, l.value || "");
943
943
  u != null && o && (o.title = u);
944
944
  }
945
945
  }), l;
946
946
  }
947
- const ce = Y({
947
+ const le = Q({
948
948
  name: "VtjPageContainer",
949
949
  async setup() {
950
- const n = be(), e = me(), t = e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null, o = C(Symbol());
951
- return s && (Object.assign(e.meta, s.meta || {}, { cache: s.cache }), es(s.title || "VTJ")), {
950
+ const n = Ee(), e = ge(), t = e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null, o = C(Symbol());
951
+ return s && (Object.assign(e.meta, s.meta || {}, { cache: s.cache }), ts(s.title || "VTJ")), {
952
952
  provider: n,
953
953
  component: r,
954
954
  file: s,
@@ -960,27 +960,27 @@ const ce = Y({
960
960
  },
961
961
  render() {
962
962
  const { component: n, query: e, sid: t } = this;
963
- return n ? z(n, { ...e, key: t }) : z("div", "页面不存在");
963
+ return n ? K(n, { ...e, key: t }) : K("div", "页面不存在");
964
964
  },
965
965
  activated() {
966
966
  this.meta.cache === !1 && (this.sid = Symbol());
967
967
  }
968
- }), ts = {
968
+ }), ss = {
969
969
  "data-l-h6o7ki7": "",
970
970
  class: "vtj-startup__wrapper"
971
- }, ss = {
971
+ }, ns = {
972
972
  "data-l-h6o7ki7": "",
973
973
  class: "vtj-startup"
974
- }, ns = {
974
+ }, rs = {
975
975
  "data-l-h6o7ki7": "",
976
976
  class: "vtj-startup__name"
977
- }, rs = { "data-l-h6o7ki7": "" }, os = {
977
+ }, os = { "data-l-h6o7ki7": "" }, is = {
978
978
  "data-l-h6o7ki7": "",
979
979
  class: "vtj-startup__tagline"
980
- }, is = {
980
+ }, as = {
981
981
  "data-l-h6o7ki7": "",
982
982
  class: "vtj-startup__actions"
983
- }, as = /* @__PURE__ */ Y({
983
+ }, cs = /* @__PURE__ */ Q({
984
984
  __name: "Startup",
985
985
  props: {
986
986
  name: { default: "VTJ.PRO" },
@@ -1068,53 +1068,53 @@ const ce = Y({
1068
1068
  window.location.href = o;
1069
1069
  }
1070
1070
  };
1071
- return (r, o) => (Ge(), Ye("div", ts, [
1072
- b("div", ss, [
1073
- b("h1", ns, [
1074
- b("span", rs, q(t.name), 1)
1071
+ return (r, o) => (Ye(), Qe("div", ss, [
1072
+ b("div", ns, [
1073
+ b("h1", rs, [
1074
+ b("span", os, J(t.name), 1)
1075
1075
  ]),
1076
- b("div", os, q(t.tagline), 1),
1077
- b("div", is, [
1076
+ b("div", is, J(t.tagline), 1),
1077
+ b("div", as, [
1078
1078
  b("button", {
1079
1079
  "data-l-h6o7ki7": "",
1080
1080
  onClick: s
1081
- }, q(t.actionText), 1)
1081
+ }, J(t.actionText), 1)
1082
1082
  ])
1083
1083
  ])
1084
1084
  ]));
1085
1085
  }
1086
- }), cs = Y({
1086
+ }), ls = Q({
1087
1087
  name: "VtjStartupContainer",
1088
1088
  render() {
1089
- return z(as);
1089
+ return K(cs);
1090
1090
  }
1091
- }), $e = Symbol("Provider");
1092
- var ls = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(ls || {});
1093
- class us extends Re {
1091
+ }), be = Symbol("Provider");
1092
+ var us = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(us || {});
1093
+ class ds extends xe {
1094
1094
  constructor(e) {
1095
1095
  super(), this.options = e;
1096
1096
  const {
1097
1097
  service: t,
1098
- mode: s = y.Raw,
1098
+ mode: s = _.Raw,
1099
1099
  dependencies: r,
1100
1100
  materials: o,
1101
1101
  project: a = {},
1102
1102
  adapter: i = {},
1103
1103
  globals: l = {},
1104
1104
  modules: c = {},
1105
- router: p = null,
1105
+ router: f = null,
1106
1106
  materialPath: u = "./",
1107
- nodeEnv: d = "development"
1107
+ nodeEnv: p = "development"
1108
1108
  /* Development */
1109
1109
  } = e;
1110
- this.mode = s, this.modules = c, this.service = t, this.router = p, this.materialPath = u, this.nodeEnv = d, r && (this.dependencies = r), o && (this.materials = o), Object.assign(this.globals, l), Object.assign(this.adapter, i);
1111
- const { access: f, request: m } = this.adapter;
1112
- f && f.connect({ mode: s, router: p, request: m }), a && s !== y.Design ? this.load(a) : this.project = a;
1110
+ this.mode = s, this.modules = c, this.service = t, this.router = f, this.materialPath = u, this.nodeEnv = p, r && (this.dependencies = r), o && (this.materials = o), Object.assign(this.globals, l), Object.assign(this.adapter, i);
1111
+ const { access: d, request: h } = this.adapter;
1112
+ d && d.connect({ mode: s, router: f, request: h }), a && s !== _.Design ? this.load(a) : this.project = a;
1113
1113
  }
1114
1114
  mode;
1115
1115
  globals = {};
1116
1116
  modules = {};
1117
- adapter = { request: ut, jsonp: He };
1117
+ adapter = { request: dt, jsonp: Be };
1118
1118
  apis = {};
1119
1119
  dependencies = {};
1120
1120
  materials = {};
@@ -1131,53 +1131,53 @@ class us extends Re {
1131
1131
  if (this.project = t ? await t() : await this.service.init(e), !this.project)
1132
1132
  throw new Error("project is null");
1133
1133
  const { apis: s = [], meta: r = [] } = this.project, o = window;
1134
- o.CKEDITOR_VERSION = void 0, await this.loadDependencies(o), await this.loadAssets(o), this.apis = ft(s, r, this.adapter), ye(), this.project.config?.mock && ht(s), this.initRouter(), this.triggerReady();
1134
+ o.CKEDITOR_VERSION = void 0, this.mode === _.Raw ? await this.loadDependencies(o) : await this.loadAssets(o), this.apis = ht(s, r, this.adapter), _e(), this.project.config?.mock && mt(s), this.initRouter(), this.triggerReady();
1135
1135
  }
1136
1136
  async loadDependencies(e) {
1137
1137
  const t = Object.entries(this.dependencies);
1138
1138
  for (const [s, r] of t)
1139
- e[s] || (e[s] = await r());
1139
+ e[s] || (e[s] = this.library[s] = await r());
1140
1140
  }
1141
1141
  async loadAssets(e) {
1142
1142
  const { dependencies: t = [] } = this.project, { dependencies: s, library: r, components: o, materialPath: a, nodeEnv: i } = this, {
1143
1143
  libraryExports: l,
1144
1144
  libraryMap: c,
1145
- materials: p,
1145
+ materials: f,
1146
1146
  materialExports: u,
1147
- materialMapLibrary: d
1148
- } = nt(
1147
+ materialMapLibrary: p
1148
+ } = rt(
1149
1149
  t,
1150
1150
  a,
1151
1151
  i === "development"
1152
1152
  /* Development */
1153
1153
  );
1154
- for (const f of l) {
1155
- const m = s[f], h = e[f];
1156
- if (h)
1157
- r[f] = h;
1158
- else if (m)
1159
- e[f] = r[f] = await m();
1154
+ for (const d of l) {
1155
+ const h = s[d], m = e[d];
1156
+ if (m)
1157
+ r[d] = m;
1158
+ else if (h)
1159
+ e[d] = r[d] = await h();
1160
1160
  else {
1161
- const _ = c[f] || [];
1162
- for (const g of _)
1163
- Q(g) && await ot(f, R.append(g, { v: x })), X(g) && await re(R.append(g, { v: x }));
1164
- r[f] = e[f];
1161
+ const v = c[d] || [];
1162
+ for (const g of v)
1163
+ X(g) && await it(d, P.append(g, { v: x })), Z(g) && await oe(P.append(g, { v: x }));
1164
+ r[d] = e[d];
1165
1165
  }
1166
1166
  }
1167
1167
  if (i === "development") {
1168
- for (const m of p)
1169
- await re(R.append(m, { v: x }));
1170
- const f = this.materials || {};
1171
- for (const m of u) {
1172
- const h = e[d[m]], _ = xe[m];
1173
- if (_)
1174
- h && _.forEach((g) => {
1175
- o[g] = h[g];
1168
+ for (const h of f)
1169
+ await oe(P.append(h, { v: x }));
1170
+ const d = this.materials || {};
1171
+ for (const h of u) {
1172
+ const m = e[p[h]], v = ke[h];
1173
+ if (v)
1174
+ m && v.forEach((g) => {
1175
+ o[g] = m[g];
1176
1176
  });
1177
1177
  else {
1178
- const g = f[m] ? (await f[m]()).default : e[m];
1179
- g && h && (g.components || []).forEach((S) => {
1180
- o[S.name] = rt(S, h);
1178
+ const g = d[h] ? (await d[h]()).default : e[h];
1179
+ g && m && (g.components || []).forEach((A) => {
1180
+ o[A.name] = ot(A, m);
1181
1181
  });
1182
1182
  }
1183
1183
  }
@@ -1189,20 +1189,20 @@ class us extends Re {
1189
1189
  const { routeAppendTo: o, pageRouteName: a = "page", routeMeta: i } = s, l = o ? "" : "/", c = {
1190
1190
  path: `${l}${a}/:id`,
1191
1191
  name: k,
1192
- component: ce
1193
- }, p = {
1192
+ component: le
1193
+ }, f = {
1194
1194
  path: l,
1195
- name: O,
1196
- component: t?.homepage ? ce : r.startupComponent || cs,
1195
+ name: M,
1196
+ component: t?.homepage ? le : r.startupComponent || ls,
1197
1197
  meta: i
1198
1198
  };
1199
- e.hasRoute(k) && e.removeRoute(k), e.hasRoute(O) && e.removeRoute(O), o ? (e.addRoute(o, c), e.addRoute(o, p)) : (e.addRoute(c), e.addRoute(p));
1199
+ e.hasRoute(k) && e.removeRoute(k), e.hasRoute(M) && e.removeRoute(M), o ? (e.addRoute(o, c), e.addRoute(o, f)) : (e.addRoute(c), e.addRoute(f));
1200
1200
  }
1201
1201
  install(e) {
1202
1202
  const t = e.config.globalProperties.installed || {};
1203
1203
  for (const [s, r] of Object.entries(this.library))
1204
- !t[s] && ct(r) && (e.use(r), t[s] = !0);
1205
- this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide($e, this), e.config.globalProperties.installed = t, this.mode === y.Design && (e.config.errorHandler = (s, r, o) => {
1204
+ !t[s] && lt(r) && (e.use(r), t[s] = !0);
1205
+ this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(be, this), e.config.globalProperties.installed = t, this.mode === _.Design && (e.config.errorHandler = (s, r, o) => {
1206
1206
  const a = r?.$options.name, i = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", l = `[ ${a} ] ${i} ${o}`;
1207
1207
  console.error(
1208
1208
  "[VTJ Error]:",
@@ -1212,7 +1212,7 @@ class us extends Re {
1212
1212
  info: o
1213
1213
  },
1214
1214
  s?.stack
1215
- ), B.error({
1215
+ ), N.error({
1216
1216
  title: "未处理的异常:请在控制台查看详情",
1217
1217
  message: l
1218
1218
  });
@@ -1264,12 +1264,12 @@ class us extends Re {
1264
1264
  apis: a,
1265
1265
  window,
1266
1266
  ...t
1267
- }, l = W({
1267
+ }, l = G({
1268
1268
  getDsl: async (c) => await this.getDsl(c) || null,
1269
1269
  getDslByUrl: async (c) => await this.getDslByUrl(c) || null,
1270
1270
  options: i
1271
1271
  });
1272
- return K({
1272
+ return W({
1273
1273
  ...i,
1274
1274
  dsl: e,
1275
1275
  loader: l
@@ -1278,40 +1278,40 @@ class us extends Re {
1278
1278
  async getRenderComponent(e, t) {
1279
1279
  const s = this.getFile(e);
1280
1280
  if (!s)
1281
- return T.warn(`Can not find file: ${e}`), null;
1281
+ return D.warn(`Can not find file: ${e}`), null;
1282
1282
  t && t(s);
1283
1283
  const r = `.vtj/vue/${e}.vue`, o = this.modules[r];
1284
1284
  if (o)
1285
1285
  return (await o())?.default;
1286
1286
  const a = await this.getDsl(s.id);
1287
- return a ? this.createDslRenderer(a).renderer : (T.warn(`Can not find dsl: ${e}`), null);
1287
+ return a ? this.createDslRenderer(a).renderer : (D.warn(`Can not find dsl: ${e}`), null);
1288
1288
  }
1289
1289
  defineUrlSchemaComponent(e, t) {
1290
- return oe(async () => {
1290
+ return ie(async () => {
1291
1291
  const s = await this.getDslByUrl(e);
1292
1292
  return s ? (s.name = t || s.name, this.createDslRenderer(s).renderer) : null;
1293
1293
  });
1294
1294
  }
1295
1295
  definePluginComponent(e) {
1296
- return oe(async () => await we(e, window));
1296
+ return ie(async () => await Se(e, window));
1297
1297
  }
1298
1298
  }
1299
- function bs(n) {
1300
- const e = new us(n);
1299
+ function Es(n) {
1300
+ const e = new ds(n);
1301
1301
  return {
1302
1302
  provider: e,
1303
1303
  onReady: (s) => e.ready(s)
1304
1304
  };
1305
1305
  }
1306
- function be(n = {}) {
1307
- const e = de($e);
1306
+ function Ee(n = {}) {
1307
+ const e = pe(be);
1308
1308
  if (!e)
1309
1309
  throw new Error("Can not find provider");
1310
1310
  if (e.nodeEnv === "development") {
1311
1311
  const { id: t, version: s } = n;
1312
1312
  t && s && (async () => {
1313
1313
  const r = await e.getDsl(t);
1314
- r?.__VERSION__ !== s && B.warning({
1314
+ r?.__VERSION__ !== s && N.warning({
1315
1315
  title: r?.name,
1316
1316
  message: "当前组件源码版本与运行时版本不一致,请重新发布组件"
1317
1317
  });
@@ -1319,7 +1319,7 @@ function be(n = {}) {
1319
1319
  }
1320
1320
  return e;
1321
1321
  }
1322
- const ee = new Be({
1322
+ const te = new Ne({
1323
1323
  settings: {
1324
1324
  type: "json",
1325
1325
  validSuccess: !0,
@@ -1327,12 +1327,12 @@ const ee = new Be({
1327
1327
  failMessage: !0,
1328
1328
  validate: (n) => n.data?.code === 0,
1329
1329
  showError: (n) => {
1330
- B.error({
1330
+ N.error({
1331
1331
  message: n || "未知错误"
1332
1332
  });
1333
1333
  }
1334
1334
  }
1335
- }), ds = (n = "/__vtj__/api/:type.json") => (e, t) => ee.send({
1335
+ }), ps = (n = "/__vtj__/api/:type.json") => (e, t) => te.send({
1336
1336
  url: n,
1337
1337
  method: "post",
1338
1338
  params: { type: e },
@@ -1340,7 +1340,7 @@ const ee = new Be({
1340
1340
  type: e,
1341
1341
  data: t
1342
1342
  }
1343
- }), ps = (n = "/__vtj__/api/uploader.json") => async (e, t) => await ee.send({
1343
+ }), fs = (n = "/__vtj__/api/uploader.json") => async (e, t) => await te.send({
1344
1344
  url: n,
1345
1345
  method: "post",
1346
1346
  data: {
@@ -1351,12 +1351,12 @@ const ee = new Be({
1351
1351
  type: "data"
1352
1352
  }
1353
1353
  }).then((s) => s && s[0] ? s[0] : null).catch(() => null);
1354
- class te {
1354
+ class se {
1355
1355
  api;
1356
1356
  pluginCaches = {};
1357
1357
  uploader;
1358
1358
  constructor() {
1359
- this.api = ds(), this.uploader = ps();
1359
+ this.api = ps(), this.uploader = fs();
1360
1360
  }
1361
1361
  async getExtension() {
1362
1362
  console.log("BaseService.getExtension");
@@ -1429,10 +1429,10 @@ class te {
1429
1429
  return await this.api("clearStaticFiles", e).catch(() => "");
1430
1430
  }
1431
1431
  async getPluginMaterial(e) {
1432
- const { urls: t = [] } = e, s = t.filter((o) => tt(o))[0];
1432
+ const { urls: t = [] } = e, s = t.filter((o) => st(o))[0];
1433
1433
  if (!s) return null;
1434
1434
  const r = this.pluginCaches[s];
1435
- return r || (this.pluginCaches[s] = ee.send({
1435
+ return r || (this.pluginCaches[s] = te.send({
1436
1436
  url: s,
1437
1437
  method: "get",
1438
1438
  settings: {
@@ -1445,77 +1445,77 @@ class te {
1445
1445
  return console.log("BaseService.genSource", e), "";
1446
1446
  }
1447
1447
  }
1448
- const v = new Ne({
1448
+ const y = new Ue({
1449
1449
  type: "local",
1450
1450
  expired: 0,
1451
1451
  prefix: "__VTJ_"
1452
1452
  });
1453
- class Es extends te {
1453
+ class Rs extends se {
1454
1454
  init(e) {
1455
- const t = new M(e), s = v.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
1456
- return v.save(`project_${t.id}`, r), Promise.resolve(r);
1455
+ const t = new T(e), s = y.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
1456
+ return y.save(`project_${t.id}`, r), Promise.resolve(r);
1457
1457
  }
1458
1458
  saveProject(e) {
1459
- const t = new M(e);
1460
- return v.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
1459
+ const t = new T(e);
1460
+ return y.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
1461
1461
  }
1462
1462
  saveMaterials(e, t) {
1463
- return v.save(`materials_${e.id}`, G(t)), Promise.resolve(!0);
1463
+ return y.save(`materials_${e.id}`, Y(t)), Promise.resolve(!0);
1464
1464
  }
1465
1465
  saveFile(e) {
1466
- return v.save(`file_${e.id}`, e), Promise.resolve(!0);
1466
+ return y.save(`file_${e.id}`, e), Promise.resolve(!0);
1467
1467
  }
1468
1468
  getFile(e) {
1469
- const t = v.get(`file_${e}`);
1469
+ const t = y.get(`file_${e}`);
1470
1470
  return t ? Promise.resolve(t) : Promise.reject(null);
1471
1471
  }
1472
1472
  removeFile(e) {
1473
- return v.remove(`file_${e}`), Promise.resolve(!0);
1473
+ return y.remove(`file_${e}`), Promise.resolve(!0);
1474
1474
  }
1475
1475
  saveHistory(e) {
1476
- return v.save(`history_${e.id}`, e), Promise.resolve(!0);
1476
+ return y.save(`history_${e.id}`, e), Promise.resolve(!0);
1477
1477
  }
1478
1478
  removeHistory(e) {
1479
- const t = v.get(`history_${e}`);
1479
+ const t = y.get(`history_${e}`);
1480
1480
  if (t) {
1481
1481
  const r = (t.items || []).map((o) => o.id);
1482
- this.removeHistoryItem(e, r), v.remove(`history_${e}`);
1482
+ this.removeHistoryItem(e, r), y.remove(`history_${e}`);
1483
1483
  }
1484
1484
  return Promise.resolve(!0);
1485
1485
  }
1486
1486
  getHistory(e) {
1487
- const t = v.get(`history_${e}`), s = new le(t || { id: e });
1487
+ const t = y.get(`history_${e}`), s = new ue(t || { id: e });
1488
1488
  return Promise.resolve(s.toDsl());
1489
1489
  }
1490
1490
  getHistoryItem(e, t) {
1491
- const s = v.get(`history_${e}_${t}`);
1491
+ const s = y.get(`history_${e}_${t}`);
1492
1492
  return Promise.resolve(s);
1493
1493
  }
1494
1494
  saveHistoryItem(e, t) {
1495
- return v.save(`history_${e}_${t.id}`, t), Promise.resolve(!0);
1495
+ return y.save(`history_${e}_${t.id}`, t), Promise.resolve(!0);
1496
1496
  }
1497
1497
  removeHistoryItem(e, t) {
1498
1498
  return t.forEach((s) => {
1499
- v.remove(`history_${e}_${s}`);
1499
+ y.remove(`history_${e}_${s}`);
1500
1500
  }), Promise.resolve(!0);
1501
1501
  }
1502
1502
  }
1503
- class fs extends te {
1503
+ class hs extends se {
1504
1504
  projects = {};
1505
1505
  materials = {};
1506
1506
  files = {};
1507
1507
  histories = {};
1508
1508
  historyItems = {};
1509
1509
  init(e) {
1510
- const t = new M(e), s = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), s);
1510
+ const t = new T(e), s = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), s);
1511
1511
  return this.projects[r.id] = r, Promise.resolve(r);
1512
1512
  }
1513
1513
  saveProject(e) {
1514
- const t = new M(e);
1514
+ const t = new T(e);
1515
1515
  return this.projects[t.id] = t.toDsl(), Promise.resolve(!0);
1516
1516
  }
1517
1517
  saveMaterials(e, t) {
1518
- return e.id && (this.materials[e.id] = G(t)), Promise.resolve(!0);
1518
+ return e.id && (this.materials[e.id] = Y(t)), Promise.resolve(!0);
1519
1519
  }
1520
1520
  saveFile(e) {
1521
1521
  return this.files[e.id] = e, Promise.resolve(!0);
@@ -1539,7 +1539,7 @@ class fs extends te {
1539
1539
  return Promise.resolve(!0);
1540
1540
  }
1541
1541
  getHistory(e) {
1542
- const t = this.histories[e], s = new le(t || { id: e });
1542
+ const t = this.histories[e], s = new ue(t || { id: e });
1543
1543
  return Promise.resolve(s);
1544
1544
  }
1545
1545
  getHistoryItem(e, t) {
@@ -1557,11 +1557,11 @@ class fs extends te {
1557
1557
  }), Promise.resolve(!0);
1558
1558
  }
1559
1559
  }
1560
- let I = null;
1560
+ let O = null;
1561
1561
  function Ps() {
1562
- return I || (I = new fs(), I);
1562
+ return O || (O = new hs(), O);
1563
1563
  }
1564
- class Rs extends te {
1564
+ class xs extends se {
1565
1565
  getFileCaches = {};
1566
1566
  async getExtension() {
1567
1567
  return await this.api("getExtension", {}).catch(() => {
@@ -1576,7 +1576,7 @@ class Rs extends te {
1576
1576
  async saveMaterials(e, t) {
1577
1577
  return !!await this.api("saveMaterials", {
1578
1578
  project: e,
1579
- materials: G(t)
1579
+ materials: Y(t)
1580
1580
  }).catch(() => !1);
1581
1581
  }
1582
1582
  async saveFile(e) {
@@ -1616,7 +1616,7 @@ class Rs extends te {
1616
1616
  );
1617
1617
  }
1618
1618
  }
1619
- function Ee(n, e, t = []) {
1619
+ function Re(n, e, t = []) {
1620
1620
  return t.map((s) => {
1621
1621
  const { id: r, title: o, icon: a, children: i, hidden: l } = s;
1622
1622
  return {
@@ -1625,7 +1625,7 @@ function Ee(n, e, t = []) {
1625
1625
  icon: a,
1626
1626
  hidden: l,
1627
1627
  url: `${n}/${e}/${r}`,
1628
- children: i && i.length ? Ee(n, e, i) : void 0
1628
+ children: i && i.length ? Re(n, e, i) : void 0
1629
1629
  };
1630
1630
  });
1631
1631
  }
@@ -1640,24 +1640,24 @@ function Pe(n, e) {
1640
1640
  e.can(s.id.toString()) && t.push(s);
1641
1641
  return t;
1642
1642
  }
1643
- function xs(n) {
1643
+ function ks(n) {
1644
1644
  const {
1645
1645
  menuPathPrefix: e = "",
1646
1646
  pageRouteName: t = "page",
1647
1647
  disableMenusFilter: s = !1
1648
- } = n || {}, r = be(), o = me(), a = vt(), i = C(!1), l = C(!1), c = r.project;
1649
- Qe(() => {
1650
- const { name: d, params: f, meta: m } = o;
1651
- if (d === k) {
1652
- const h = r.getPage(f.id);
1653
- i.value = !h?.mask, l.value = !!h?.pure;
1654
- } else if (d === O) {
1655
- const h = r.getHomepage();
1656
- i.value = !h?.mask, l.value = !!h?.pure;
1648
+ } = n || {}, r = Ee(), o = ge(), a = yt(), i = C(!1), l = C(!1), c = r.project;
1649
+ Xe(() => {
1650
+ const { name: p, params: d, meta: h } = o;
1651
+ if (p === k) {
1652
+ const m = r.getPage(d.id);
1653
+ i.value = !m?.mask, l.value = !!m?.pure;
1654
+ } else if (p === M) {
1655
+ const m = r.getHomepage();
1656
+ i.value = !m?.mask, l.value = !!m?.pure;
1657
1657
  } else
1658
- i.value = !m.mask, l.value = !!m.pure;
1658
+ i.value = !h.mask, l.value = !!h.pure;
1659
1659
  });
1660
- const p = Ee(
1660
+ const f = Re(
1661
1661
  e,
1662
1662
  t,
1663
1663
  c?.pages
@@ -1667,67 +1667,67 @@ function xs(n) {
1667
1667
  logo: u?.logo,
1668
1668
  themeSwitchable: u?.themeSwitchable,
1669
1669
  title: u?.title || c?.description || c?.name || "VTJ App",
1670
- menus: s ? p : Pe(p, a),
1670
+ menus: s ? f : Pe(f, a),
1671
1671
  pure: l
1672
1672
  };
1673
1673
  }
1674
1674
  export {
1675
- _e as ACCESS_KEY,
1676
- $s as Access,
1677
- Ze as BUILT_IN_DIRECTIVES,
1678
- te as BaseService,
1679
- ie as CONTEXT_HOST,
1680
- yt as Context,
1681
- y as ContextMode,
1682
- et as DATA_TYPES,
1683
- O as HOMEPAGE_ROUTE_NAME,
1684
- js as JSCodeToString,
1685
- _s as LIFE_CYCLES_LIST,
1686
- Rs as LocalService,
1687
- fs as MemoryService,
1688
- ls as NodeEnv,
1675
+ we as ACCESS_KEY,
1676
+ bs as Access,
1677
+ et as BUILT_IN_DIRECTIVES,
1678
+ se as BaseService,
1679
+ ae as CONTEXT_HOST,
1680
+ _t as Context,
1681
+ _ as ContextMode,
1682
+ tt as DATA_TYPES,
1683
+ M as HOMEPAGE_ROUTE_NAME,
1684
+ $s as JSCodeToString,
1685
+ ws as LIFE_CYCLES_LIST,
1686
+ xs as LocalService,
1687
+ hs as MemoryService,
1688
+ us as NodeEnv,
1689
1689
  k as PAGE_ROUTE_NAME,
1690
- us as Provider,
1691
- as as Startup,
1692
- Es as StorageService,
1690
+ ds as Provider,
1691
+ cs as Startup,
1692
+ Rs as StorageService,
1693
1693
  x as VTJ_RENDERER_VERSION,
1694
- ve as adoptedStyleSheets,
1695
- ws as createAssetScripts,
1696
- Ss as createAssetsCss,
1697
- Et as createDataSources,
1698
- W as createLoader,
1694
+ ye as adoptedStyleSheets,
1695
+ Ss as createAssetScripts,
1696
+ js as createAssetsCss,
1697
+ Rt as createDataSources,
1698
+ G as createLoader,
1699
1699
  Ps as createMemoryService,
1700
- pt as createMetaApi,
1701
- bs as createProvider,
1702
- K as createRenderer,
1703
- dt as createSchemaApi,
1704
- ft as createSchemaApis,
1705
- xt as defaultLoader,
1706
- A as fillBasePath,
1707
- Se as getModifiers,
1708
- we as getPlugin,
1709
- rt as getRawComponent,
1710
- Q as isCSSUrl,
1711
- lt as isJSCode,
1700
+ ft as createMetaApi,
1701
+ Es as createProvider,
1702
+ W as createRenderer,
1703
+ pt as createSchemaApi,
1704
+ ht as createSchemaApis,
1705
+ kt as defaultLoader,
1706
+ I as fillBasePath,
1707
+ je as getModifiers,
1708
+ Se as getPlugin,
1709
+ ot as getRawComponent,
1710
+ X as isCSSUrl,
1711
+ ut as isJSCode,
1712
1712
  w as isJSExpression,
1713
- N as isJSFunction,
1714
- tt as isJSON,
1715
- X as isJSUrl,
1716
- ct as isVuePlugin,
1717
- ot as loadCss,
1718
- it as loadCssUrl,
1719
- at as loadScriptUrl,
1720
- mt as mockApi,
1721
- ht as mockApis,
1722
- ye as mockCleanup,
1723
- D as nodeRender,
1724
- nt as parseDeps,
1713
+ U as isJSFunction,
1714
+ st as isJSON,
1715
+ Z as isJSUrl,
1716
+ lt as isVuePlugin,
1717
+ it as loadCss,
1718
+ at as loadCssUrl,
1719
+ ct as loadScriptUrl,
1720
+ gt as mockApi,
1721
+ mt as mockApis,
1722
+ _e as mockCleanup,
1723
+ H as nodeRender,
1724
+ rt as parseDeps,
1725
1725
  F as parseExpression,
1726
- ae as parseFunction,
1727
- $e as providerKey,
1728
- st as removeProdFlag,
1729
- ge as toString,
1730
- vt as useAccess,
1731
- xs as useMask,
1732
- be as useProvider
1726
+ ce as parseFunction,
1727
+ be as providerKey,
1728
+ nt as removeProdFlag,
1729
+ ve as toString,
1730
+ yt as useAccess,
1731
+ ks as useMask,
1732
+ Ee as useProvider
1733
1733
  };