@vtj/renderer 0.10.1-alpha.2 → 0.10.1-alpha.4

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,16 +1,16 @@
1
- import { Base as Ie, BUILT_IN_COMPONENTS as De, ProjectModel as O, HistoryModel as pe } from "@vtj/core";
2
- import { isUrl as He, url as R, dedupArray as Oe, isString as j, isFunction as V, logger as P, storage as L, cookie as q, toArray as ie, unRSA as ae, delay as fe, createRequest as he, jsonp as me, merge as Be, pathToRegexp as Ne, pathToRegexpMatch as Ue, formDataToJson as Le, camelCase as $, upperFirst as qe, pick as Je, request as K, loadScript as ce, Storage as ze, mapToObject as Z } from "@vtj/utils";
3
- import * as N from "vue";
4
- import { inject as ge, toRef as Ve, readonly as Ke, ref as M, customRef as We, onBeforeUnmount as Ge, getCurrentScope as Ye, onScopeDispose as Qe, getCurrentInstance as ve, watch as ye, toValue as ee, computed as _e, onMounted as Xe, defineComponent as te, h as W, createElementBlock as Ze, openBlock as et, createElementVNode as k, toDisplayString as J, defineAsyncComponent as le, watchEffect as tt } from "vue";
1
+ import { Base as De, BUILT_IN_COMPONENTS as He, ProjectModel as H, HistoryModel as pe } from "@vtj/core";
2
+ import { isUrl as Oe, url as R, dedupArray as Be, isString as j, isFunction as V, logger as P, storage as U, cookie as L, toArray as ie, unRSA as ae, delay as fe, createRequest as he, jsonp as me, merge as Ne, pathToRegexp as Ue, pathToRegexpMatch as Le, formDataToJson as qe, camelCase as $, upperFirst as Je, pick as ze, request as K, loadScript as ce, Storage as Ve, mapToObject as Z } from "@vtj/utils";
3
+ import * as B from "vue";
4
+ import { inject as ge, toRef as Ke, readonly as We, ref as C, customRef as Ge, onBeforeUnmount as Ye, getCurrentScope as Qe, onScopeDispose as Xe, getCurrentInstance as ve, watch as ye, toValue as ee, computed as _e, onMounted as Ze, defineComponent as te, h as W, createElementBlock as et, openBlock as tt, createElementVNode as k, toDisplayString as q, version as J, defineAsyncComponent as le, watchEffect as nt } from "vue";
5
5
  import { useRoute as we } from "vue-router";
6
6
  /**!
7
7
  * Copyright (c) 2025, VTJ.PRO All rights reserved.
8
8
  * @name @vtj/renderer
9
9
  * @author CHC chenhuachun1549@dingtalk.com
10
- * @version 0.10.1-alpha.2
10
+ * @version 0.10.1-alpha.4
11
11
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
12
12
  */
13
- const x = "0.10.1-alpha.2";
13
+ const Se = "0.10.1-alpha.4";
14
14
  var y = /* @__PURE__ */ ((s) => (s.Runtime = "Runtime", s.Design = "Design", s.Raw = "Raw", s.VNode = "VNode", s))(y || {});
15
15
  const ue = [
16
16
  "$el",
@@ -24,7 +24,7 @@ const ue = [
24
24
  "$props",
25
25
  "$options",
26
26
  "$forceUpdate"
27
- ], xn = [
27
+ ], Cn = [
28
28
  "beforeCreate",
29
29
  "created",
30
30
  "beforeMount",
@@ -38,14 +38,14 @@ const ue = [
38
38
  "renderTriggered",
39
39
  "activated",
40
40
  "deactivated"
41
- ], nt = [
41
+ ], st = [
42
42
  "vIf",
43
43
  "vShow",
44
44
  "vModel",
45
45
  "vFor",
46
46
  "vBind",
47
47
  "vHtml"
48
- ], st = {
48
+ ], rt = {
49
49
  String,
50
50
  Number,
51
51
  Boolean,
@@ -53,11 +53,11 @@ const ue = [
53
53
  Object,
54
54
  Function,
55
55
  Date
56
- }, C = "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(
56
+ }, x = "VtjPage", D = "VtjHomepage", ot = "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
57
  ","
58
- ), ot = "component,slot".split(",");
59
- function I(s, e) {
60
- return s.map((t) => He(t) || t.startsWith("/") ? t : `${e}${t}`);
58
+ ), it = "component,slot".split(",");
59
+ function T(s, e) {
60
+ return s.map((t) => Oe(t) || t.startsWith("/") ? t : `${e}${t}`);
61
61
  }
62
62
  function ne(s) {
63
63
  return /\.css$/.test(s);
@@ -65,49 +65,49 @@ function ne(s) {
65
65
  function se(s) {
66
66
  return /\.js$/.test(s);
67
67
  }
68
- function it(s) {
68
+ function at(s) {
69
69
  return /\.json$/.test(s);
70
70
  }
71
- function Cn(s) {
71
+ function Mn(s) {
72
72
  return s.map(
73
- (e) => `<script src="${R.append(e, { v: x })}"><\/script>`
73
+ (e) => `<script src="${R.append(e, { v: Se })}"><\/script>`
74
74
  ).join("");
75
75
  }
76
- function Mn(s = []) {
76
+ function An(s = []) {
77
77
  return s.map(
78
- (e) => `<link rel="stylesheet" href="${R.append(e, { v: x })}" />`
78
+ (e) => `<link rel="stylesheet" href="${R.append(e, { v: Se })}" />`
79
79
  ).join("");
80
80
  }
81
- function at(s, e = !1) {
81
+ function ct(s, e = !1) {
82
82
  return e && s.endsWith(".prod.js") ? s.replace(".prod.js", ".js") : s;
83
83
  }
84
- function ct(s, e, t = !1) {
84
+ function lt(s, e, t = !1) {
85
85
  const n = s.filter((d) => !!d.enabled), r = [], o = [], a = [], i = [], c = {}, l = {}, f = [], u = {};
86
86
  return n.forEach(
87
87
  ({ urls: d, assetsUrl: h, library: m, assetsLibrary: p, localeLibrary: w }) => {
88
88
  d?.forEach((g) => {
89
- se(g) && r.push(at(g, t)), ne(g) && o.push(g);
90
- }), m && (i.push(m), c[m] = I(d || [], e), w && (l[m] = w)), h && a.push(h), p && f.push(p), m && p && (u[p] = m);
89
+ se(g) && r.push(ct(g, t)), ne(g) && o.push(g);
90
+ }), m && (i.push(m), c[m] = T(d || [], e), w && (l[m] = w)), h && a.push(h), p && f.push(p), m && p && (u[p] = m);
91
91
  }
92
92
  ), {
93
- scripts: I(r, e),
94
- css: I(o, e),
95
- materials: I(a, e),
93
+ scripts: T(r, e),
94
+ css: T(o, e),
95
+ materials: T(a, e),
96
96
  libraryExports: i,
97
- materialExports: Oe(f),
97
+ materialExports: Be(f),
98
98
  materialMapLibrary: u,
99
99
  libraryMap: c,
100
100
  libraryLocaleMap: l
101
101
  };
102
102
  }
103
- function lt(s, e) {
103
+ function ut(s, e) {
104
104
  const { name: t, parent: n, alias: r } = s;
105
105
  return n ? e[n]?.[r || t] : e[r || t];
106
106
  }
107
- function Se(s) {
107
+ function be(s) {
108
108
  return j(s) ? s : JSON.stringify(s);
109
109
  }
110
- function be(s, e, t) {
110
+ function je(s, e, t) {
111
111
  const n = s.CSSStyleSheet;
112
112
  if (n.prototype.replaceSync) {
113
113
  const r = new n();
@@ -122,11 +122,11 @@ function be(s, e, t) {
122
122
  o ? o.innerHTML = t : (o = r.createElement("style"), o.id = e, o.innerHTML = t, r.head.appendChild(o));
123
123
  }
124
124
  }
125
- async function ut(s, e) {
125
+ async function dt(s, e) {
126
126
  const t = await window.fetch(e).then((n) => n.text()).catch(() => "");
127
- t && be(window, s, t);
127
+ t && je(window, s, t);
128
128
  }
129
- function dt(s, e = window) {
129
+ function pt(s, e = window) {
130
130
  const t = e.document, n = e.document.head;
131
131
  for (const r of s)
132
132
  if (!t.getElementById(r)) {
@@ -134,7 +134,7 @@ function dt(s, e = window) {
134
134
  a.rel = "stylesheet", a.id = r, a.href = r, n.appendChild(a);
135
135
  }
136
136
  }
137
- async function pt(s, e, t = window) {
137
+ async function ft(s, e, t = window) {
138
138
  const n = t.document, r = t.document.head;
139
139
  let o = t[e];
140
140
  return o ? o.default || o : new Promise((a, i) => {
@@ -148,23 +148,23 @@ async function pt(s, e, t = window) {
148
148
  }
149
149
  });
150
150
  }
151
- function ft(s) {
152
- return V(s) || V(s?.install);
153
- }
154
151
  function ht(s) {
155
- return ot.includes(s);
152
+ return V(s) || V(s?.install);
156
153
  }
157
154
  function mt(s) {
158
- return rt.includes(s);
155
+ return it.includes(s);
159
156
  }
160
- function A(s = window) {
157
+ function gt(s) {
158
+ return ot.includes(s);
159
+ }
160
+ function M(s = window) {
161
161
  const e = window.Mock;
162
162
  if (e) return e;
163
163
  const t = s.Mock;
164
164
  if (t)
165
165
  return window.Mock = t, t;
166
166
  }
167
- function F(s, e, t = !1, n = !1) {
167
+ function A(s, e, t = !1, n = !1) {
168
168
  try {
169
169
  const r = ['"use strict";', "var __self = arguments[0];"];
170
170
  r.push("return ");
@@ -179,7 +179,7 @@ function F(s, e, t = !1, n = !1) {
179
179
  }
180
180
  }
181
181
  function G(s, e, t = !1, n = !1) {
182
- const r = F(s, e, t, n);
182
+ const r = A(s, e, t, n);
183
183
  if (typeof r != "function" && (P.error(
184
184
  "parseFunction.error",
185
185
  "not a function",
@@ -192,16 +192,16 @@ function G(s, e, t = !1, n = !1) {
192
192
  function _(s) {
193
193
  return s && s.type === "JSExpression";
194
194
  }
195
- function T(s) {
195
+ function F(s) {
196
196
  return typeof s == "object" && s && s.type === "JSFunction";
197
197
  }
198
- function gt(s) {
199
- return _(s) || T(s);
198
+ function vt(s) {
199
+ return _(s) || F(s);
200
200
  }
201
- function An(s) {
202
- return gt(s) ? s.value : JSON.stringify(s);
201
+ function Fn(s) {
202
+ return vt(s) ? s.value : JSON.stringify(s);
203
203
  }
204
- const vt = {
204
+ const yt = {
205
205
  session: !1,
206
206
  authKey: "Authorization",
207
207
  storageKey: "ACCESS_STORAGE",
@@ -213,13 +213,13 @@ const vt = {
213
213
  unauthorizedMessage: "登录已经失效,请重新登录!",
214
214
  noPermissionMessage: "无权限访问该页面",
215
215
  appName: ""
216
- }, je = Symbol("access");
217
- class Fn {
216
+ }, $e = Symbol("access");
217
+ class Tn {
218
218
  options;
219
219
  data = null;
220
220
  mode = y.Raw;
221
221
  constructor(e) {
222
- this.options = Object.assign({}, vt, e), this.loadData();
222
+ this.options = Object.assign({}, yt, e), this.loadData();
223
223
  }
224
224
  connect(e) {
225
225
  const { mode: t, router: n, request: r } = e;
@@ -227,17 +227,17 @@ class Fn {
227
227
  }
228
228
  login(e) {
229
229
  const { storageKey: t, storagePrefix: n, session: r, authKey: o } = this.options;
230
- this.setData(e), this.data && (L.save(t, e, {
230
+ this.setData(e), this.data && (U.save(t, e, {
231
231
  type: "local",
232
232
  prefix: n
233
- }), r && q.set(o, this.data.token));
233
+ }), r && L.set(o, this.data.token));
234
234
  }
235
235
  clear() {
236
236
  const { storageKey: e, storagePrefix: t, session: n, authKey: r } = this.options;
237
- this.data = null, L.remove(e, {
237
+ this.data = null, U.remove(e, {
238
238
  type: "local",
239
239
  prefix: t
240
- }), n && q.remove(r);
240
+ }), n && L.remove(r);
241
241
  }
242
242
  logout() {
243
243
  this.clear(), this.toLogin();
@@ -257,7 +257,7 @@ class Fn {
257
257
  return ie(e).some((o) => n[o] || n[t + "." + o]);
258
258
  }
259
259
  install(e) {
260
- e.config.globalProperties.$access || (e.config.globalProperties.$access = this, e.provide(je, this));
260
+ e.config.globalProperties.$access || (e.config.globalProperties.$access = this, e.provide($e, this));
261
261
  }
262
262
  isAuthPath(e) {
263
263
  const { auth: t, isAuth: n } = this.options;
@@ -293,7 +293,7 @@ class Fn {
293
293
  this.data = e;
294
294
  }
295
295
  loadData() {
296
- const { storageKey: e, storagePrefix: t } = this.options, n = L.get(e, {
296
+ const { storageKey: e, storagePrefix: t } = this.options, n = U.get(e, {
297
297
  type: "local",
298
298
  prefix: t
299
299
  });
@@ -301,10 +301,10 @@ class Fn {
301
301
  }
302
302
  isLogined() {
303
303
  const { session: e, authKey: t } = this.options;
304
- return e && t ? !!q.get(t) : !!this.getToken();
304
+ return e && t ? !!L.get(t) : !!this.getToken();
305
305
  }
306
306
  hasRoutePermission(e) {
307
- if (e.name === C) {
307
+ if (e.name === x) {
308
308
  const t = e.params.id;
309
309
  return t && this.can(t);
310
310
  }
@@ -355,10 +355,10 @@ class Fn {
355
355
  );
356
356
  }
357
357
  }
358
- function yt() {
359
- return ge(je, null);
358
+ function _t() {
359
+ return ge($e, null);
360
360
  }
361
- function Tn(s = {}) {
361
+ function In(s = {}) {
362
362
  const { notify: e, loading: t, settings: n = {} } = s;
363
363
  let r = null;
364
364
  return {
@@ -387,7 +387,7 @@ function Tn(s = {}) {
387
387
  loading: t
388
388
  };
389
389
  }
390
- function _t(s, e) {
390
+ function wt(s, e) {
391
391
  const { jsonp: t, request: n } = e;
392
392
  if (s.method === "jsonp")
393
393
  return (r = {}) => t(s.url, {
@@ -395,7 +395,7 @@ function _t(s, e) {
395
395
  query: r
396
396
  });
397
397
  {
398
- const r = s.headers ? F(s.headers, {}, !0) : void 0, o = {
398
+ const r = s.headers ? A(s.headers, {}, !0) : void 0, o = {
399
399
  url: s.url,
400
400
  method: s.method,
401
401
  settings: {
@@ -403,10 +403,10 @@ function _t(s, e) {
403
403
  headers: r
404
404
  }
405
405
  };
406
- return (a, i) => (delete o.data, n.send(Be(o, i || {}, { data: a })));
406
+ return (a, i) => (delete o.data, n.send(Ne(o, i || {}, { data: a })));
407
407
  }
408
408
  }
409
- function wt(s, e) {
409
+ function St(s, e) {
410
410
  const { metaQuery: t } = e;
411
411
  if (!t) return;
412
412
  const { code: n, queryCode: r } = s;
@@ -418,47 +418,47 @@ function wt(s, e) {
418
418
  return t(n, r, o, a);
419
419
  };
420
420
  }
421
- function St(s = [], e = [], t) {
421
+ function bt(s = [], e = [], t) {
422
422
  const n = {};
423
423
  for (const r of s)
424
- n[r.id] = _t(r, t);
425
- for (const r of e)
426
424
  n[r.id] = wt(r, t);
425
+ for (const r of e)
426
+ n[r.id] = St(r, t);
427
427
  return n;
428
428
  }
429
- async function bt(s = []) {
430
- const e = A();
431
- e && ($e(), s.forEach((t) => $t(e, t)));
429
+ async function jt(s = [], e = window) {
430
+ const t = M(e);
431
+ t && (ke(e), s.forEach((n) => kt(t, n)));
432
432
  }
433
- function jt(s) {
434
- const e = T(s.mockTemplate) && s.mockTemplate.value ? G(s.mockTemplate, {}, !0) : void 0, t = A();
435
- return async (...n) => {
436
- let r = {};
437
- if (e)
433
+ function $t(s, e = window) {
434
+ const t = F(s.mockTemplate) && s.mockTemplate.value ? G(s.mockTemplate, {}, !0) : void 0, n = M(e);
435
+ return async (...r) => {
436
+ let o = {};
437
+ if (t)
438
438
  try {
439
- r = await e.apply(e, n);
440
- } catch (o) {
441
- P.warn("模拟数据模版异常", o);
439
+ o = await t.apply(t, r);
440
+ } catch (a) {
441
+ P.warn("模拟数据模版异常", a);
442
442
  }
443
- return t?.mock(r);
443
+ return n?.mock(o);
444
444
  };
445
445
  }
446
- function $t(s, e) {
446
+ function kt(s, e) {
447
447
  if (!e.mock) return;
448
448
  const { url: t, mockTemplate: n } = e;
449
449
  if (t && n) {
450
- const r = Ne(`${t}(.*)`), o = Ue(t, { decode: decodeURIComponent }), a = F(n, {}, !0);
450
+ const r = Ue(`${t}(.*)`), o = Le(t, { decode: decodeURIComponent }), a = A(n, {}, !0);
451
451
  s.mock(r, (i) => {
452
- const c = R.parse(i.url) || {}, l = i.body instanceof FormData ? Le(i.body) : i.body, f = o(i.url)?.params;
452
+ const c = R.parse(i.url) || {}, l = i.body instanceof FormData ? qe(i.body) : i.body, f = o(i.url)?.params;
453
453
  return Object.assign(i, { data: l, params: c, query: f }), s.mock(a(i));
454
454
  });
455
455
  }
456
456
  }
457
- function $e() {
458
- const s = A();
459
- s && (s._mocked = {});
457
+ function ke(s = window) {
458
+ const e = M(s);
459
+ e && (e._mocked = {});
460
460
  }
461
- class kt {
461
+ class Et {
462
462
  __id = null;
463
463
  __mode;
464
464
  __instance = null;
@@ -487,7 +487,7 @@ class kt {
487
487
  const { mode: t, dsl: n, attrs: r } = e;
488
488
  this.__mode = t, n && (this.__id = n.id || null, this.__transform = n.transform || {}), r && Object.assign(this, r);
489
489
  }
490
- setup(e, t = N) {
490
+ setup(e, t = B) {
491
491
  const n = t.getCurrentInstance();
492
492
  if (!n) return;
493
493
  this.__refs = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = n.proxy;
@@ -525,9 +525,9 @@ class kt {
525
525
  if (e)
526
526
  if (this.__mode === y.Runtime) {
527
527
  const { id: t, type: n } = e, r = t ? this.__transform[t] ?? e.value : e.value;
528
- return F({ type: n, value: r }, this);
528
+ return A({ type: n, value: r }, this);
529
529
  } else
530
- return F(e, this);
530
+ return A(e, this);
531
531
  }
532
532
  __ref(e = null, t) {
533
533
  if (this.__mode !== y.VNode)
@@ -559,7 +559,7 @@ class kt {
559
559
  }
560
560
  function Y(s) {
561
561
  const {
562
- Vue: e = N,
562
+ Vue: e = B,
563
563
  mode: t = y.Runtime,
564
564
  components: n = {},
565
565
  libs: r = {},
@@ -569,22 +569,22 @@ function Y(s) {
569
569
  $components: n,
570
570
  $libs: r,
571
571
  $apis: o
572
- }, l = new kt({
572
+ }, l = new Et({
573
573
  mode: t,
574
574
  dsl: i.value,
575
575
  attrs: c
576
576
  }), f = e.defineComponent({
577
577
  name: i.value.name,
578
578
  props: {
579
- ...Rt(i.value.props ?? [], l)
579
+ ...Pt(i.value.props ?? [], l)
580
580
  },
581
581
  setup(u) {
582
- l.$props = u, l.props = u, i.value.id && be(
582
+ l.$props = u, l.props = u, i.value.id && je(
583
583
  s.window || window,
584
584
  i.value.id,
585
585
  i.value.css || ""
586
- ), l.state = Pt(e, i.value.state ?? {}, l);
587
- const d = xt(e, i.value.computed ?? {}, l), h = Ct(i.value.methods ?? {}, l), m = Mt(e, i.value.inject, l), p = At(
586
+ ), l.state = xt(e, i.value.state ?? {}, l);
587
+ const d = Ct(e, i.value.computed ?? {}, l), h = Mt(i.value.methods ?? {}, l), m = At(e, i.value.inject, l), p = Ft(
588
588
  i.value.dataSources || {},
589
589
  l
590
590
  ), w = {
@@ -593,29 +593,29 @@ function Y(s) {
593
593
  ...h,
594
594
  ...p
595
595
  };
596
- return l.setup(w, e), Ft(e, i.value.watch ?? [], l), {
596
+ return l.setup(w, e), Tt(e, i.value.watch ?? [], l), {
597
597
  vtj: l
598
598
  };
599
599
  },
600
- emits: Et(i.value.emits),
600
+ emits: Rt(i.value.emits),
601
601
  expose: ["vtj"],
602
602
  render() {
603
603
  if (!i.value.nodes) return null;
604
604
  const u = i.value.nodes || [];
605
- return u.length === 1 ? B(u[0], l, e, a) : u.map((d) => B(d, l, e, a));
605
+ return u.length === 1 ? O(u[0], l, e, a) : u.map((d) => O(d, l, e, a));
606
606
  },
607
- ...Tt(i.value.lifeCycles ?? {}, l)
607
+ ...It(i.value.lifeCycles ?? {}, l)
608
608
  });
609
609
  return {
610
610
  renderer: e.markRaw(f),
611
611
  context: l
612
612
  };
613
613
  }
614
- function Et(s = []) {
614
+ function Rt(s = []) {
615
615
  return s.map((e) => j(e) ? e : e.name);
616
616
  }
617
- function Rt(s = [], e) {
618
- const t = (n) => n ? (Array.isArray(n) ? n : [n]).map((o) => st[o]) : void 0;
617
+ function Pt(s = [], e) {
618
+ const t = (n) => n ? (Array.isArray(n) ? n : [n]).map((o) => rt[o]) : void 0;
619
619
  return s.map((n) => j(n) ? {
620
620
  name: n
621
621
  } : {
@@ -632,30 +632,30 @@ function Rt(s = [], e) {
632
632
  {}
633
633
  );
634
634
  }
635
- function Pt(s, e, t) {
635
+ function xt(s, e, t) {
636
636
  return s.reactive(
637
637
  Object.keys(e || {}).reduce(
638
638
  (n, r) => {
639
639
  let o = e[r];
640
- return _(o) ? o = t.__parseExpression(o) : T(o) && (o = t.__parseFunction(o)), n[r] = o, n;
640
+ return _(o) ? o = t.__parseExpression(o) : F(o) && (o = t.__parseFunction(o)), n[r] = o, n;
641
641
  },
642
642
  {}
643
643
  )
644
644
  );
645
645
  }
646
- function xt(s, e, t) {
646
+ function Ct(s, e, t) {
647
647
  return Object.entries(e ?? {}).reduce(
648
648
  (n, [r, o]) => (n[r] = s.computed(t.__parseFunction(o)), n),
649
649
  {}
650
650
  );
651
651
  }
652
- function Ct(s, e) {
652
+ function Mt(s, e) {
653
653
  return Object.entries(s ?? {}).reduce(
654
654
  (t, [n, r]) => (t[n] = e.__parseFunction(r), t),
655
655
  {}
656
656
  );
657
657
  }
658
- function Mt(s, e = [], t) {
658
+ function At(s, e = [], t) {
659
659
  return e.reduce(
660
660
  (n, r) => {
661
661
  const { name: o, from: a } = r || {};
@@ -666,14 +666,14 @@ function Mt(s, e = [], t) {
666
666
  {}
667
667
  );
668
668
  }
669
- function At(s, e) {
669
+ function Ft(s, e) {
670
670
  return Object.keys(s).reduce(
671
671
  (t, n) => {
672
672
  const r = s[n];
673
673
  if (r.type === "mock")
674
- t[n] = jt(r);
674
+ t[n] = $t(r);
675
675
  else if (r.ref) {
676
- const o = e.$apis[r.ref], a = T(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
676
+ const o = e.$apis[r.ref], a = F(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
677
677
  t[n] = async (...i) => {
678
678
  const c = await o.apply(e, i);
679
679
  return a ? a(c) : c;
@@ -684,7 +684,7 @@ function At(s, e) {
684
684
  {}
685
685
  );
686
686
  }
687
- function Ft(s, e = [], t) {
687
+ function Tt(s, e = [], t) {
688
688
  e.forEach((n) => {
689
689
  s.watch(
690
690
  t.__parseExpression(n.source),
@@ -696,19 +696,19 @@ function Ft(s, e = [], t) {
696
696
  );
697
697
  });
698
698
  }
699
- function Tt(s, e) {
699
+ function It(s, e) {
700
700
  return Object.entries(s ?? {}).reduce(
701
701
  (t, [n, r]) => (t[n] = e.__parseFunction(r), t),
702
702
  {}
703
703
  );
704
704
  }
705
705
  let z = [], E = {};
706
- const It = (s) => s;
707
- async function ke(s, e = window) {
706
+ const Dt = (s) => s;
707
+ async function Ee(s, e = window) {
708
708
  const { urls: t = [], library: n } = s, r = t.filter((i) => se(i));
709
709
  if (r.length === 0 || !n) return null;
710
710
  const o = t.filter((i) => ne(i));
711
- return o.length && dt(o, e), await pt(r, n, e).catch(
711
+ return o.length && pt(o, e), await ft(r, n, e).catch(
712
712
  (i) => (console.warn("loadScriptUrl error", r, n, i), null)
713
713
  );
714
714
  }
@@ -716,7 +716,7 @@ function Q(s) {
716
716
  const { getDsl: e, getDslByUrl: t, options: n } = s;
717
717
  return n.window && (z.forEach((r) => {
718
718
  delete n.window[r];
719
- }), z = []), (r, o, a = N) => {
719
+ }), z = []), (r, o, a = B) => {
720
720
  if (!o || typeof o == "string") return r;
721
721
  if (o.type === "Schema" && o.id) {
722
722
  let i = E[o.id];
@@ -748,7 +748,7 @@ function Q(s) {
748
748
  let i = o.library ? E[o.library] : null;
749
749
  return i || (o.library && z.push(o.library), i = E[o.library || Symbol()] = a.defineAsyncComponent(
750
750
  async () => {
751
- const c = await ke(o, n.window);
751
+ const c = await Ee(o, n.window);
752
752
  return c || (console.warn("getPlugin result is null", o), null);
753
753
  }
754
754
  ), i);
@@ -756,44 +756,44 @@ function Q(s) {
756
756
  return r;
757
757
  };
758
758
  }
759
- function In() {
759
+ function Dn() {
760
760
  E = {};
761
761
  }
762
- function B(s, e, t = N, n = It) {
762
+ function O(s, e, t = B, n = Dt) {
763
763
  if (!s || !s.name || s.invisible) return null;
764
- const r = t.getCurrentInstance()?.appContext, { id: o = null, directives: a = [] } = s, { vIf: i, vFor: c, vShow: l, vModels: f, vBind: u, vHtml: d, others: h } = Ht(a);
765
- if (i && !Ot(i, e))
764
+ const r = t.getCurrentInstance()?.appContext, { id: o = null, directives: a = [] } = s, { vIf: i, vFor: c, vShow: l, vModels: f, vBind: u, vHtml: d, others: h } = Ot(a);
765
+ if (i && !Bt(i, e))
766
766
  return null;
767
767
  const m = (p) => {
768
768
  const w = p.$components, g = (() => {
769
769
  if (s.name === "component")
770
- return Bt(p, s.props?.is);
770
+ return Nt(p, s.props?.is);
771
771
  if (s.name === "slot") return s.name;
772
772
  const b = n(s.name, s.from, t);
773
- return j(b) ? ht(b) || mt(b) ? b : w[b] ?? r?.app?.component(b) ?? b : b;
774
- })(), S = Nt(o, s.props ?? {}, p), Fe = Ut(t, s.events ?? {}, p);
773
+ return j(b) ? mt(b) || gt(b) ? b : w[b] ?? r?.app?.component(b) ?? b : b;
774
+ })(), S = Ut(o, s.props ?? {}, p), Te = Lt(t, s.events ?? {}, p);
775
775
  if (s.name === "slot")
776
- return Lt(t, s, S, p, n);
776
+ return qt(t, s, S, p, n);
777
777
  u && Object.assign(S, p.__parseExpression(u.value)), l && (S.style = Object.assign(
778
778
  S.style ?? {},
779
- Jt(l, p)
780
- )), d && Object.assign(S, zt(d, p)), f.forEach((b) => {
781
- Object.assign(S, Vt(t, b, p));
779
+ zt(l, p)
780
+ )), d && Object.assign(S, Vt(d, p)), f.forEach((b) => {
781
+ Object.assign(S, Kt(t, b, p));
782
782
  });
783
- const Te = Kt(
783
+ const Ie = Wt(
784
784
  t,
785
785
  s.children ?? [],
786
786
  p,
787
787
  n,
788
788
  s
789
789
  );
790
- let U = t.createVNode(g, { ...S, ...Fe }, Te);
791
- const oe = r ? Dt(r, h, p) : [];
792
- return oe.length && (U = t.withDirectives(U, oe)), U;
790
+ let N = t.createVNode(g, { ...S, ...Te }, Ie);
791
+ const oe = r ? Ht(r, h, p) : [];
792
+ return oe.length && (N = t.withDirectives(N, oe)), N;
793
793
  };
794
- return c ? Yt(c, m, e) : m(e);
794
+ return c ? Qt(c, m, e) : m(e);
795
795
  }
796
- function Dt(s, e, t) {
796
+ function Ht(s, e, t) {
797
797
  const n = s.app;
798
798
  return e.map((r) => {
799
799
  const o = typeof r.name == "string" ? n.directive(r.name) : t.__parseExpression(r.name);
@@ -802,11 +802,11 @@ function Dt(s, e, t) {
802
802
  return r.value && a.push(t.__parseExpression(r.value)), r.arg && a.push(r.arg), r.modifiers && a.push(r.modifiers), a;
803
803
  }).filter((r) => !!r);
804
804
  }
805
- function Ht(s = []) {
805
+ function Ot(s = []) {
806
806
  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"), o = s.find((c) => $(c.name) === "vHtml"), a = s.filter(
807
807
  (c) => $(c.name) === "vModel"
808
808
  ), i = s.filter(
809
- (c) => !nt.includes($(c.name))
809
+ (c) => !st.includes($(c.name))
810
810
  );
811
811
  return {
812
812
  vIf: e,
@@ -818,18 +818,18 @@ function Ht(s = []) {
818
818
  vHtml: o
819
819
  };
820
820
  }
821
- function Ot(s, e) {
821
+ function Bt(s, e) {
822
822
  return !!e.__parseExpression(s.value);
823
823
  }
824
- function Bt(s, e) {
824
+ function Nt(s, e) {
825
825
  return e ? _(e) ? s.__parseExpression(e) : e : "div";
826
826
  }
827
- function Nt(s, e, t) {
827
+ function Ut(s, e, t) {
828
828
  const n = X(e, t);
829
829
  return n.ref = t.__ref(s, n.ref), n;
830
830
  }
831
831
  function X(s, e) {
832
- return _(s) ? e.__parseExpression(s) : T(s) ? e.__parseFunction(s) : Array.isArray(s) ? s.map((t) => X(t, e)) : typeof s == "object" ? Object.keys(s || {}).reduce(
832
+ return _(s) ? e.__parseExpression(s) : F(s) ? e.__parseFunction(s) : Array.isArray(s) ? s.map((t) => X(t, e)) : typeof s == "object" ? Object.keys(s || {}).reduce(
833
833
  (t, n) => {
834
834
  let r = s[n];
835
835
  return t[n] = X(r, e), t;
@@ -837,7 +837,7 @@ function X(s, e) {
837
837
  {}
838
838
  ) : s;
839
839
  }
840
- function Ut(s, e, t) {
840
+ function Lt(s, e, t) {
841
841
  const n = ["passive", "capture", "once"], r = {
842
842
  capture: "Capture",
843
843
  once: "Once",
@@ -845,48 +845,48 @@ function Ut(s, e, t) {
845
845
  };
846
846
  return Object.keys(e || {}).reduce(
847
847
  (o, a) => {
848
- const i = e[a], c = Ee(i.modifiers), l = c.find((d) => n.includes(d)), f = "on" + qe(a) + (l && r[l] || ""), u = t.__parseFunction(i.handler);
848
+ const i = e[a], c = Re(i.modifiers), l = c.find((d) => n.includes(d)), f = "on" + Je(a) + (l && r[l] || ""), u = t.__parseFunction(i.handler);
849
849
  return u && (o[f] = s.withModifiers(u, c)), o;
850
850
  },
851
851
  {}
852
852
  );
853
853
  }
854
- function Ee(s = {}, e = !1) {
854
+ function Re(s = {}, e = !1) {
855
855
  const t = Object.keys(s);
856
856
  return e ? t.map((n) => "." + n) : t;
857
857
  }
858
- function Lt(s, e, t, n, r) {
859
- const { children: o } = e, a = qt(e, n), i = n.$slots?.[a.name];
858
+ function qt(s, e, t, n, r) {
859
+ const { children: o } = e, a = Jt(e, n), i = n.$slots?.[a.name];
860
860
  return i ? i(t) : o ? j(o) ? s.createTextVNode(o) : _(o) ? s.createTextVNode(
861
- Se(n.__parseExpression(o))
861
+ be(n.__parseExpression(o))
862
862
  ) : Array.isArray(o) ? o.map(
863
- (c) => B(c, n, s, r)
863
+ (c) => O(c, n, s, r)
864
864
  ) : null : null;
865
865
  }
866
- function qt(s, e) {
866
+ function Jt(s, e) {
867
867
  const { props: t } = s, n = t?.name || "default";
868
868
  return {
869
869
  name: _(n) ? e.__parseExpression(n) : n,
870
870
  params: []
871
871
  };
872
872
  }
873
- function Jt(s, e) {
873
+ function zt(s, e) {
874
874
  return e.__parseExpression(s.value) ? {} : {
875
875
  display: "none"
876
876
  };
877
877
  }
878
- function zt(s, e) {
878
+ function Vt(s, e) {
879
879
  return {
880
880
  innerHTML: e.__parseExpression(s.value) || ""
881
881
  };
882
882
  }
883
- function Vt(s, e, t) {
883
+ function Kt(s, e, t) {
884
884
  const n = {
885
885
  type: "JSFunction",
886
886
  value: e.value?.value ? `(v) => {
887
887
  ${e.value.value} = v;
888
888
  }` : "(v) => {}"
889
- }, r = t.__parseFunction(n), o = Ee(
889
+ }, r = t.__parseFunction(n), o = Re(
890
890
  _(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
891
891
  ), a = _(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
892
892
  return {
@@ -894,28 +894,28 @@ function Vt(s, e, t) {
894
894
  [`onUpdate:${a}`]: o.length && r ? s.withModifiers(r, o) : r
895
895
  };
896
896
  }
897
- function Kt(s, e, t, n, r) {
897
+ function Wt(s, e, t, n, r) {
898
898
  if (!e) return null;
899
899
  if (j(e))
900
900
  return { default: () => e };
901
901
  if (_(e))
902
902
  return {
903
- default: () => Se(t.__parseExpression(e))
903
+ default: () => be(t.__parseExpression(e))
904
904
  };
905
905
  if (Array.isArray(e) && e.length > 0) {
906
- const o = Wt(e), a = (i) => !i || !r ? {} : r?.id && Object.keys(i).length ? {
906
+ const o = Gt(e), a = (i) => !i || !r ? {} : r?.id && Object.keys(i).length ? {
907
907
  [`scope_${r.id}`]: i
908
908
  } : {};
909
909
  return Object.entries(o).reduce((i, [c, { nodes: l, params: f }]) => (i[c] = (u) => {
910
- const d = f.length ? Je(u ?? {}, f) : a(u);
910
+ const d = f.length ? ze(u ?? {}, f) : a(u);
911
911
  return l.map(
912
- (h) => B(h, t.__clone(d), s, n)
912
+ (h) => O(h, t.__clone(d), s, n)
913
913
  );
914
914
  }, i), {});
915
915
  }
916
916
  return null;
917
917
  }
918
- function Wt(s) {
918
+ function Gt(s) {
919
919
  const e = {
920
920
  default: {
921
921
  params: [],
@@ -923,7 +923,7 @@ function Wt(s) {
923
923
  }
924
924
  };
925
925
  for (const t of s) {
926
- const n = Gt(t.slot), r = n.name;
926
+ const n = Yt(t.slot), r = n.name;
927
927
  e[r] ? (e[r].nodes.push(t), e[r].params = e[r].params.concat(n.params)) : e[r] = {
928
928
  nodes: [t],
929
929
  params: n.params
@@ -931,59 +931,59 @@ function Wt(s) {
931
931
  }
932
932
  return e;
933
933
  }
934
- function Gt(s = "default") {
934
+ function Yt(s = "default") {
935
935
  return j(s) ? { name: s, params: [] } : { params: [], ...s };
936
936
  }
937
- function Yt(s, e, t) {
937
+ function Qt(s, e, t) {
938
938
  const { value: n, iterator: r } = s, { item: o = "item", index: a = "index" } = r || {};
939
939
  let i = t.__parseExpression(n) || [];
940
940
  return Number.isInteger(i) && (i = new Array(i).fill(!0).map((c, l) => l + 1)), Array.isArray(i) ? i.map((c, l) => e(t.__clone({ [o]: c, [a]: l }))) : (console.warn("[vForRender]:", `${n?.value} is not a Arrary`), []);
941
941
  }
942
- function Qt(s) {
943
- return Ye() ? (Qe(s), !0) : !1;
942
+ function Xt(s) {
943
+ return Qe() ? (Xe(s), !0) : !1;
944
944
  }
945
- const Re = typeof window < "u" && typeof document < "u";
945
+ const Pe = typeof window < "u" && typeof document < "u";
946
946
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
947
- const Xt = (s) => s != null, Zt = () => {
947
+ const Zt = (s) => s != null, en = () => {
948
948
  };
949
- function en(s) {
949
+ function tn(s) {
950
950
  return ve();
951
951
  }
952
- function tn(s) {
952
+ function nn(s) {
953
953
  return Array.isArray(s) ? s : [s];
954
954
  }
955
- function nn(...s) {
955
+ function sn(...s) {
956
956
  if (s.length !== 1)
957
- return Ve(...s);
957
+ return Ke(...s);
958
958
  const e = s[0];
959
- return typeof e == "function" ? Ke(We(() => ({ get: e, set: Zt }))) : M(e);
959
+ return typeof e == "function" ? We(Ge(() => ({ get: e, set: en }))) : C(e);
960
960
  }
961
- function sn(s, e) {
962
- en() && Ge(s, e);
961
+ function rn(s, e) {
962
+ tn() && Ye(s, e);
963
963
  }
964
- const rn = Re ? window : void 0, on = Re ? window.document : void 0;
965
- function an(s) {
964
+ const on = Pe ? window : void 0, an = Pe ? window.document : void 0;
965
+ function cn(s) {
966
966
  var e;
967
967
  const t = ee(s);
968
968
  return (e = t?.$el) != null ? e : t;
969
969
  }
970
- function cn() {
971
- const s = M(!1), e = ve();
972
- return e && Xe(() => {
970
+ function ln() {
971
+ const s = C(!1), e = ve();
972
+ return e && Ze(() => {
973
973
  s.value = !0;
974
974
  }, e), s;
975
975
  }
976
- function ln(s) {
977
- const e = cn();
976
+ function un(s) {
977
+ const e = ln();
978
978
  return _e(() => (e.value, !!s()));
979
979
  }
980
- function un(s, e, t = {}) {
981
- const { window: n = rn, ...r } = t;
980
+ function dn(s, e, t = {}) {
981
+ const { window: n = on, ...r } = t;
982
982
  let o;
983
- const a = ln(() => n && "MutationObserver" in n), i = () => {
983
+ const a = un(() => n && "MutationObserver" in n), i = () => {
984
984
  o && (o.disconnect(), o = void 0);
985
985
  }, c = _e(() => {
986
- const d = ee(s), h = tn(d).map(an).filter(Xt);
986
+ const d = ee(s), h = nn(d).map(cn).filter(Zt);
987
987
  return new Set(h);
988
988
  }), l = ye(
989
989
  () => c.value,
@@ -994,18 +994,18 @@ function un(s, e, t = {}) {
994
994
  ), f = () => o?.takeRecords(), u = () => {
995
995
  l(), i();
996
996
  };
997
- return Qt(u), {
997
+ return Xt(u), {
998
998
  isSupported: a,
999
999
  stop: u,
1000
1000
  takeRecords: f
1001
1001
  };
1002
1002
  }
1003
- function dn(s = null, e = {}) {
1003
+ function pn(s = null, e = {}) {
1004
1004
  var t, n, r;
1005
1005
  const {
1006
- document: o = on,
1006
+ document: o = an,
1007
1007
  restoreOnUnmount: a = (u) => u
1008
- } = e, i = (t = o?.title) != null ? t : "", c = nn((n = s ?? o?.title) != null ? n : null), l = !!(s && typeof s == "function");
1008
+ } = e, i = (t = o?.title) != null ? t : "", c = sn((n = s ?? o?.title) != null ? n : null), l = !!(s && typeof s == "function");
1009
1009
  function f(u) {
1010
1010
  if (!("titleTemplate" in e))
1011
1011
  return u;
@@ -1018,13 +1018,13 @@ function dn(s = null, e = {}) {
1018
1018
  u !== d && o && (o.title = f(u ?? ""));
1019
1019
  },
1020
1020
  { immediate: !0 }
1021
- ), e.observe && !e.titleTemplate && o && !l && un(
1021
+ ), e.observe && !e.titleTemplate && o && !l && dn(
1022
1022
  (r = o.head) == null ? void 0 : r.querySelector("title"),
1023
1023
  () => {
1024
1024
  o && o.title !== c.value && (c.value = f(o.title));
1025
1025
  },
1026
1026
  { childList: !0 }
1027
- ), sn(() => {
1027
+ ), rn(() => {
1028
1028
  if (a) {
1029
1029
  const u = a(i, c.value || "");
1030
1030
  u != null && o && (o.title = u);
@@ -1034,8 +1034,8 @@ function dn(s = null, e = {}) {
1034
1034
  const de = te({
1035
1035
  name: "VtjPageContainer",
1036
1036
  async setup() {
1037
- const s = xe(), e = we(), t = e.params.id, n = t ? s.getPage(t) : s.getHomepage(), r = n ? await s.getRenderComponent(n.id) : null, o = M(Symbol());
1038
- return n && (Object.assign(e.meta, n.meta || {}, { cache: n.cache }), dn(n.title || "VTJ")), {
1037
+ const s = Ce(), e = we(), t = e.params.id, n = t ? s.getPage(t) : s.getHomepage(), r = n ? await s.getRenderComponent(n.id) : null, o = C(Symbol());
1038
+ return n && (Object.assign(e.meta, n.meta || {}, { cache: n.cache }), pn(n.title || "VTJ")), {
1039
1039
  provider: s,
1040
1040
  component: r,
1041
1041
  file: n,
@@ -1052,22 +1052,25 @@ const de = te({
1052
1052
  activated() {
1053
1053
  this.meta.cache === !1 && (this.sid = Symbol());
1054
1054
  }
1055
- }), pn = {
1055
+ }), fn = {
1056
1056
  "data-l-h6o7ki7": "",
1057
1057
  class: "vtj-startup__wrapper"
1058
- }, fn = {
1058
+ }, hn = {
1059
1059
  "data-l-h6o7ki7": "",
1060
1060
  class: "vtj-startup"
1061
- }, hn = {
1061
+ }, mn = {
1062
1062
  "data-l-h6o7ki7": "",
1063
1063
  class: "vtj-startup__name"
1064
- }, mn = { "data-l-h6o7ki7": "" }, gn = {
1064
+ }, gn = {
1065
1065
  "data-l-h6o7ki7": "",
1066
- class: "vtj-startup__tagline"
1066
+ class: "span"
1067
1067
  }, vn = {
1068
+ "data-l-h6o7ki7": "",
1069
+ class: "vtj-startup__tagline"
1070
+ }, yn = {
1068
1071
  "data-l-h6o7ki7": "",
1069
1072
  class: "vtj-startup__actions"
1070
- }, yn = /* @__PURE__ */ te({
1073
+ }, _n = /* @__PURE__ */ te({
1071
1074
  __name: "Startup",
1072
1075
  props: {
1073
1076
  name: { default: "VTJ.PRO" },
@@ -1088,6 +1091,7 @@ const de = te({
1088
1091
  grid-row: 1;
1089
1092
  width: 100%;
1090
1093
  max-width: 800px;
1094
+ margin: 0 10px;
1091
1095
  }
1092
1096
  .vtj-startup__wrapper[data-l-h6o7ki7]{
1093
1097
  height: 100%;
@@ -1149,6 +1153,7 @@ const de = te({
1149
1153
  cursor: pointer;
1150
1154
  display: inline-block;
1151
1155
  line-height: 40px;
1156
+ text-align: center;
1152
1157
  }@media (max-width: 768px){
1153
1158
 
1154
1159
  .vtj-startup__actions .button[data-l-h6o7ki7]{
@@ -1169,13 +1174,13 @@ const de = te({
1169
1174
  window.location.href = o;
1170
1175
  }
1171
1176
  };
1172
- return (r, o) => (et(), Ze("div", pn, [
1173
- k("div", fn, [
1174
- k("h1", hn, [
1175
- k("span", mn, J(t.name), 1)
1177
+ return (r, o) => (tt(), et("div", fn, [
1178
+ k("div", hn, [
1179
+ k("h1", mn, [
1180
+ k("span", gn, q(t.name), 1)
1176
1181
  ]),
1177
- k("div", gn, J(t.tagline), 1),
1178
- k("div", vn, [
1182
+ k("div", vn, q(t.tagline), 1),
1183
+ k("div", yn, [
1179
1184
  o[0] || (o[0] = k("span", {
1180
1185
  "data-l-h6o7ki7": "",
1181
1186
  class: "span"
@@ -1184,19 +1189,19 @@ const de = te({
1184
1189
  "data-l-h6o7ki7": "",
1185
1190
  class: "button",
1186
1191
  onClick: n
1187
- }, J(t.actionText), 1)
1192
+ }, q(t.actionText), 1)
1188
1193
  ])
1189
1194
  ])
1190
1195
  ]));
1191
1196
  }
1192
- }), _n = te({
1197
+ }), wn = te({
1193
1198
  name: "VtjStartupContainer",
1194
1199
  render() {
1195
- return W(yn);
1200
+ return W(_n);
1196
1201
  }
1197
- }), Pe = Symbol("Provider");
1198
- var wn = /* @__PURE__ */ ((s) => (s.Production = "production", s.Development = "development", s))(wn || {});
1199
- class Sn extends Ie {
1202
+ }), xe = Symbol("Provider");
1203
+ var Sn = /* @__PURE__ */ ((s) => (s.Production = "production", s.Development = "development", s))(Sn || {});
1204
+ class bn extends De {
1200
1205
  constructor(e) {
1201
1206
  super(), this.options = e;
1202
1207
  const {
@@ -1241,18 +1246,18 @@ class Sn extends Ie {
1241
1246
  } catch (o) {
1242
1247
  P.warn("模拟数据模版异常", o);
1243
1248
  }
1244
- return A()?.mock(n);
1249
+ return M()?.mock(n);
1245
1250
  };
1246
1251
  }
1247
1252
  async load(e) {
1248
1253
  const t = this.modules[`.vtj/projects/${e.id}.json`];
1249
- if (this.project = t ? await t() : await this.service.init(e), !this.project)
1254
+ if (console.log("load", this.modules, t), this.project = t ? await t() : await this.service.init(e), !this.project)
1250
1255
  throw new Error("project is null");
1251
1256
  const { apis: n = [], meta: r = [] } = this.project, o = window;
1252
- o.CKEDITOR_VERSION = void 0, this.mode === y.Raw ? await this.loadDependencies(o) : await this.loadAssets(o), this.initMock(o), this.apis = St(n, r, this.adapter), $e(), bt(n), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1257
+ o.CKEDITOR_VERSION = void 0, this.mode === y.Raw ? await this.loadDependencies(o) : await this.loadAssets(o), this.initMock(o), this.apis = bt(n, r, this.adapter), ke(o), jt(n, o), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1253
1258
  }
1254
1259
  initMock(e) {
1255
- const t = A(e);
1260
+ const t = M(e);
1256
1261
  t && t.setup({
1257
1262
  timeout: "50-500"
1258
1263
  });
@@ -1269,7 +1274,7 @@ class Sn extends Ie {
1269
1274
  materials: f,
1270
1275
  materialExports: u,
1271
1276
  materialMapLibrary: d
1272
- } = ct(
1277
+ } = lt(
1273
1278
  t,
1274
1279
  a,
1275
1280
  i === "development"
@@ -1284,16 +1289,16 @@ class Sn extends Ie {
1284
1289
  else {
1285
1290
  const w = l[h] || [];
1286
1291
  for (const g of w)
1287
- ne(g) && await ut(h, R.append(g, { v: x })), se(g) && await ce(R.append(g, { v: x }));
1292
+ ne(g) && await dt(h, R.append(g, { v: J })), se(g) && await ce(R.append(g, { v: J }));
1288
1293
  r[h] = e[h];
1289
1294
  }
1290
1295
  }
1291
1296
  if (i === "development") {
1292
1297
  for (const m of f)
1293
- await ce(R.append(m, { v: x }));
1298
+ await ce(R.append(m, { v: J }));
1294
1299
  const h = this.materials || {};
1295
1300
  for (const m of u) {
1296
- const p = e[d[m]], w = De[m];
1301
+ const p = e[d[m]], w = He[m];
1297
1302
  if (w)
1298
1303
  p && w.forEach((g) => {
1299
1304
  o[g] = p[g];
@@ -1301,7 +1306,7 @@ class Sn extends Ie {
1301
1306
  else {
1302
1307
  const g = h[m] ? (await h[m]()).default : e[m];
1303
1308
  g && p && (g.components || []).forEach((S) => {
1304
- o[S.name] = lt(S, p);
1309
+ o[S.name] = ut(S, p);
1305
1310
  });
1306
1311
  }
1307
1312
  }
@@ -1310,23 +1315,27 @@ class Sn extends Ie {
1310
1315
  initRouter() {
1311
1316
  const { router: e, project: t, options: n, adapter: r } = this;
1312
1317
  if (!e) return;
1313
- const { routeAppendTo: o, pageRouteName: a = "page", routeMeta: i } = n, c = o ? "" : "/", l = {
1314
- path: `${c}${a}/:id`,
1315
- name: C,
1318
+ const o = t?.platform === "uniapp" ? "pages" : "page", {
1319
+ routeAppendTo: a,
1320
+ pageRouteName: i = o,
1321
+ routeMeta: c
1322
+ } = n, l = a ? "" : "/", f = {
1323
+ path: `${l}${i}/:id`,
1324
+ name: x,
1316
1325
  component: de
1317
- }, f = {
1318
- path: c,
1319
- name: H,
1320
- component: t?.homepage ? de : r.startupComponent || _n,
1321
- meta: i
1326
+ }, u = {
1327
+ path: l,
1328
+ name: D,
1329
+ component: t?.homepage ? de : r.startupComponent || wn,
1330
+ meta: c
1322
1331
  };
1323
- e.hasRoute(C) && e.removeRoute(C), e.hasRoute(H) && e.removeRoute(H), o ? (e.addRoute(o, l), e.addRoute(o, f)) : (e.addRoute(l), e.addRoute(f));
1332
+ e.hasRoute(x) && e.removeRoute(x), e.hasRoute(D) && e.removeRoute(D), a ? (e.addRoute(a, f), e.addRoute(a, u)) : (e.addRoute(f), e.addRoute(u));
1324
1333
  }
1325
1334
  install(e) {
1326
1335
  const t = e.config.globalProperties.installed || {};
1327
1336
  for (const [n, r] of Object.entries(this.library))
1328
- !t[n] && ft(r) && (e.use(r), t[n] = !0);
1329
- this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(Pe, this), e.config.globalProperties.installed = t, this.mode === y.Design && (e.config.errorHandler = (n, r, o) => {
1337
+ !t[n] && ht(r) && (e.use(r), t[n] = !0);
1338
+ this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(xe, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === y.Design && (e.config.errorHandler = (n, r, o) => {
1330
1339
  const a = r?.$options.name, i = typeof n == "string" ? n : n?.message || n?.msg || "未知错误", c = `[ ${a} ] ${i} ${o}`;
1331
1340
  console.error(
1332
1341
  "[VTJ Error]:",
@@ -1414,18 +1423,18 @@ class Sn extends Ie {
1414
1423
  });
1415
1424
  }
1416
1425
  definePluginComponent(e) {
1417
- return le(async () => await ke(e, window));
1426
+ return le(async () => await Ee(e, window));
1418
1427
  }
1419
1428
  }
1420
- function Dn(s) {
1421
- const e = new Sn(s);
1429
+ function Hn(s) {
1430
+ const e = new bn(s);
1422
1431
  return {
1423
1432
  provider: e,
1424
1433
  onReady: (n) => e.ready(n)
1425
1434
  };
1426
1435
  }
1427
- function xe(s = {}) {
1428
- const e = ge(Pe);
1436
+ function Ce(s = {}) {
1437
+ const e = ge(xe, null);
1429
1438
  if (!e)
1430
1439
  throw new Error("Can not find provider");
1431
1440
  if (e.nodeEnv === "development") {
@@ -1441,13 +1450,13 @@ function xe(s = {}) {
1441
1450
  }
1442
1451
  return e;
1443
1452
  }
1444
- const Ce = {
1453
+ const Me = {
1445
1454
  type: "json",
1446
1455
  validSuccess: !0,
1447
1456
  originResponse: !1,
1448
1457
  failMessage: !0,
1449
1458
  validate: (s) => s.data?.code === 0
1450
- }, bn = (s, e = "/__vtj__/api/:type.json") => (t, n, r) => s.send({
1459
+ }, jn = (s, e = "/__vtj__/api/:type.json") => (t, n, r) => s.send({
1451
1460
  url: e,
1452
1461
  method: "post",
1453
1462
  params: { type: t },
@@ -1456,8 +1465,8 @@ const Ce = {
1456
1465
  type: t,
1457
1466
  data: n
1458
1467
  },
1459
- settings: Ce
1460
- }), jn = (s, e = "/__vtj__/api/uploader.json") => async (t, n) => await s.send({
1468
+ settings: Me
1469
+ }), $n = (s, e = "/__vtj__/api/uploader.json") => async (t, n) => await s.send({
1461
1470
  url: e,
1462
1471
  method: "post",
1463
1472
  data: {
@@ -1465,11 +1474,11 @@ const Ce = {
1465
1474
  projectId: n
1466
1475
  },
1467
1476
  settings: {
1468
- ...Ce,
1477
+ ...Me,
1469
1478
  type: "data"
1470
1479
  }
1471
1480
  }).then((r) => r && r[0] ? r[0] : null).catch(() => null);
1472
- function Hn(s) {
1481
+ function On(s) {
1473
1482
  return he({
1474
1483
  settings: {
1475
1484
  type: "json",
@@ -1488,7 +1497,7 @@ class re {
1488
1497
  pluginCaches = {};
1489
1498
  uploader;
1490
1499
  constructor(e = K) {
1491
- this.api = bn(e), this.uploader = jn(e);
1500
+ this.api = jn(e), this.uploader = $n(e);
1492
1501
  }
1493
1502
  async getExtension() {
1494
1503
  console.log("BaseService.getExtension");
@@ -1563,7 +1572,7 @@ class re {
1563
1572
  return await this.api("clearStaticFiles", e).catch(() => "");
1564
1573
  }
1565
1574
  async getPluginMaterial(e) {
1566
- const { urls: t = [] } = e, n = t.filter((o) => it(o))[0];
1575
+ const { urls: t = [] } = e, n = t.filter((o) => at(o))[0];
1567
1576
  if (!n) return null;
1568
1577
  const r = this.pluginCaches[n];
1569
1578
  return r || (this.pluginCaches[n] = K.send({
@@ -1579,18 +1588,18 @@ class re {
1579
1588
  return console.log("BaseService.genSource", e), "";
1580
1589
  }
1581
1590
  }
1582
- const v = new ze({
1591
+ const v = new Ve({
1583
1592
  type: "local",
1584
1593
  expired: 0,
1585
1594
  prefix: "__VTJ_"
1586
1595
  });
1587
- class On extends re {
1596
+ class Bn extends re {
1588
1597
  init(e) {
1589
- const t = new O(e), n = v.get(`project_${t.id}`), r = Object.assign(t.toDsl(), n || {});
1598
+ const t = new H(e), n = v.get(`project_${t.id}`), r = Object.assign(t.toDsl(), n || {});
1590
1599
  return v.save(`project_${t.id}`, r), Promise.resolve(r);
1591
1600
  }
1592
1601
  saveProject(e) {
1593
- const t = new O(e);
1602
+ const t = new H(e);
1594
1603
  return v.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
1595
1604
  }
1596
1605
  saveMaterials(e, t) {
@@ -1634,18 +1643,18 @@ class On extends re {
1634
1643
  }), Promise.resolve(!0);
1635
1644
  }
1636
1645
  }
1637
- class $n extends re {
1646
+ class kn extends re {
1638
1647
  projects = {};
1639
1648
  materials = {};
1640
1649
  files = {};
1641
1650
  histories = {};
1642
1651
  historyItems = {};
1643
1652
  init(e) {
1644
- const t = new O(e), n = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), n);
1653
+ const t = new H(e), n = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), n);
1645
1654
  return this.projects[r.id] = r, Promise.resolve(r);
1646
1655
  }
1647
1656
  saveProject(e) {
1648
- const t = new O(e);
1657
+ const t = new H(e);
1649
1658
  return this.projects[t.id] = t.toDsl(), Promise.resolve(!0);
1650
1659
  }
1651
1660
  saveMaterials(e, t) {
@@ -1691,11 +1700,11 @@ class $n extends re {
1691
1700
  }), Promise.resolve(!0);
1692
1701
  }
1693
1702
  }
1694
- let D = null;
1695
- function Bn() {
1696
- return D || (D = new $n(), D);
1703
+ let I = null;
1704
+ function Nn() {
1705
+ return I || (I = new kn(), I);
1697
1706
  }
1698
- class Nn extends re {
1707
+ class Un extends re {
1699
1708
  getFileCaches = {};
1700
1709
  async getExtension() {
1701
1710
  return await this.api("getExtension", {}).catch(() => {
@@ -1752,7 +1761,7 @@ class Nn extends re {
1752
1761
  );
1753
1762
  }
1754
1763
  }
1755
- function Me(s, e, t = []) {
1764
+ function Ae(s, e, t = []) {
1756
1765
  return t.map((n) => {
1757
1766
  const { id: r, title: o, icon: a, children: i, hidden: c } = n;
1758
1767
  return {
@@ -1761,39 +1770,39 @@ function Me(s, e, t = []) {
1761
1770
  icon: a,
1762
1771
  hidden: c,
1763
1772
  url: `${s}/${e}/${r}`,
1764
- children: i && i.length ? Me(s, e, i) : void 0
1773
+ children: i && i.length ? Ae(s, e, i) : void 0
1765
1774
  };
1766
1775
  });
1767
1776
  }
1768
- function Ae(s, e) {
1777
+ function Fe(s, e) {
1769
1778
  if (!e) return s;
1770
1779
  let t = [];
1771
1780
  for (const n of s)
1772
1781
  if (n.children && n.children.length) {
1773
- const r = Ae(n.children, e);
1782
+ const r = Fe(n.children, e);
1774
1783
  r.length && (n.children = r, t.push(n));
1775
1784
  } else
1776
1785
  e.can(n.id.toString()) && t.push(n);
1777
1786
  return t;
1778
1787
  }
1779
- function Un(s) {
1788
+ function Ln(s) {
1780
1789
  const {
1781
1790
  menuPathPrefix: e = "",
1782
1791
  pageRouteName: t = "page",
1783
1792
  disableMenusFilter: n = !1
1784
- } = s || {}, r = xe(), o = we(), a = yt(), i = M(!1), c = M(!1), l = r.project;
1785
- tt(() => {
1793
+ } = s || {}, r = Ce(), o = we(), a = _t(), i = C(!1), c = C(!1), l = r.project;
1794
+ nt(() => {
1786
1795
  const { name: d, params: h, meta: m } = o;
1787
- if (d === C) {
1796
+ if (d === x) {
1788
1797
  const p = r.getPage(h.id);
1789
1798
  i.value = !p?.mask, c.value = !!p?.pure;
1790
- } else if (d === H) {
1799
+ } else if (d === D) {
1791
1800
  const p = r.getHomepage();
1792
1801
  i.value = !p?.mask, c.value = !!p?.pure;
1793
1802
  } else
1794
1803
  i.value = !m.mask, c.value = !!m.pure;
1795
1804
  });
1796
- const f = Me(
1805
+ const f = Ae(
1797
1806
  e,
1798
1807
  t,
1799
1808
  l?.pages
@@ -1803,76 +1812,76 @@ function Un(s) {
1803
1812
  logo: u?.logo,
1804
1813
  themeSwitchable: u?.themeSwitchable,
1805
1814
  title: u?.title || l?.description || l?.name || "VTJ App",
1806
- menus: n ? f : Ae(f, a),
1815
+ menus: n ? f : Fe(f, a),
1807
1816
  pure: c
1808
1817
  };
1809
1818
  }
1810
1819
  export {
1811
- je as ACCESS_KEY,
1812
- Fn as Access,
1813
- ot as BUILD_IN_TAGS,
1814
- nt as BUILT_IN_DIRECTIVES,
1820
+ $e as ACCESS_KEY,
1821
+ Tn as Access,
1822
+ it as BUILD_IN_TAGS,
1823
+ st as BUILT_IN_DIRECTIVES,
1815
1824
  re as BaseService,
1816
1825
  ue as CONTEXT_HOST,
1817
- kt as Context,
1826
+ Et as Context,
1818
1827
  y as ContextMode,
1819
- st as DATA_TYPES,
1820
- H as HOMEPAGE_ROUTE_NAME,
1821
- rt as HTML_TAGS,
1822
- An as JSCodeToString,
1823
- xn as LIFE_CYCLES_LIST,
1824
- Nn as LocalService,
1825
- $n as MemoryService,
1826
- wn as NodeEnv,
1827
- C as PAGE_ROUTE_NAME,
1828
- Sn as Provider,
1829
- yn as Startup,
1830
- On as StorageService,
1831
- x as VTJ_RENDERER_VERSION,
1832
- be as adoptedStyleSheets,
1833
- In as clearLoaderCache,
1834
- Tn as createAdapter,
1835
- Cn as createAssetScripts,
1836
- Mn as createAssetsCss,
1837
- At as createDataSources,
1828
+ rt as DATA_TYPES,
1829
+ D as HOMEPAGE_ROUTE_NAME,
1830
+ ot as HTML_TAGS,
1831
+ Fn as JSCodeToString,
1832
+ Cn as LIFE_CYCLES_LIST,
1833
+ Un as LocalService,
1834
+ kn as MemoryService,
1835
+ Sn as NodeEnv,
1836
+ x as PAGE_ROUTE_NAME,
1837
+ bn as Provider,
1838
+ _n as Startup,
1839
+ Bn as StorageService,
1840
+ Se as VTJ_RENDERER_VERSION,
1841
+ je as adoptedStyleSheets,
1842
+ Dn as clearLoaderCache,
1843
+ In as createAdapter,
1844
+ Mn as createAssetScripts,
1845
+ An as createAssetsCss,
1846
+ Ft as createDataSources,
1838
1847
  Q as createLoader,
1839
- Bn as createMemoryService,
1840
- wt as createMetaApi,
1841
- jt as createMock,
1842
- Dn as createProvider,
1848
+ Nn as createMemoryService,
1849
+ St as createMetaApi,
1850
+ $t as createMock,
1851
+ Hn as createProvider,
1843
1852
  Y as createRenderer,
1844
- _t as createSchemaApi,
1845
- St as createSchemaApis,
1846
- Hn as createServiceRequest,
1847
- It as defaultLoader,
1848
- I as fillBasePath,
1849
- A as getMock,
1850
- Ee as getModifiers,
1851
- ke as getPlugin,
1852
- lt as getRawComponent,
1853
- ht as isBuiltInTag,
1853
+ wt as createSchemaApi,
1854
+ bt as createSchemaApis,
1855
+ On as createServiceRequest,
1856
+ Dt as defaultLoader,
1857
+ T as fillBasePath,
1858
+ M as getMock,
1859
+ Re as getModifiers,
1860
+ Ee as getPlugin,
1861
+ ut as getRawComponent,
1862
+ mt as isBuiltInTag,
1854
1863
  ne as isCSSUrl,
1855
- gt as isJSCode,
1864
+ vt as isJSCode,
1856
1865
  _ as isJSExpression,
1857
- T as isJSFunction,
1858
- it as isJSON,
1866
+ F as isJSFunction,
1867
+ at as isJSON,
1859
1868
  se as isJSUrl,
1860
- mt as isNativeTag,
1861
- ft as isVuePlugin,
1862
- ut as loadCss,
1863
- dt as loadCssUrl,
1864
- pt as loadScriptUrl,
1865
- $t as mockApi,
1866
- bt as mockApis,
1867
- $e as mockCleanup,
1868
- B as nodeRender,
1869
- ct as parseDeps,
1870
- F as parseExpression,
1869
+ gt as isNativeTag,
1870
+ ht as isVuePlugin,
1871
+ dt as loadCss,
1872
+ pt as loadCssUrl,
1873
+ ft as loadScriptUrl,
1874
+ kt as mockApi,
1875
+ jt as mockApis,
1876
+ ke as mockCleanup,
1877
+ O as nodeRender,
1878
+ lt as parseDeps,
1879
+ A as parseExpression,
1871
1880
  G as parseFunction,
1872
- Pe as providerKey,
1873
- at as removeProdFlag,
1874
- Se as toString,
1875
- yt as useAccess,
1876
- Un as useMask,
1877
- xe as useProvider
1881
+ xe as providerKey,
1882
+ ct as removeProdFlag,
1883
+ be as toString,
1884
+ _t as useAccess,
1885
+ Ln as useMask,
1886
+ Ce as useProvider
1878
1887
  };