@vtj/renderer 0.12.34 → 0.12.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,18 +1,18 @@
1
- import { Base as Oe, BUILT_IN_COMPONENTS as xe, ProjectModel as N, HistoryModel as pe } from "@vtj/core";
2
- import { isUrl as Ne, url as C, dedupArray as Ue, isString as R, isFunction as V, logger as A, storage as J, cookie as K, toArray as re, unRSA as ie, delay as de, createRequest as fe, jsonp as he, merge as Be, pathToRegexp as Le, pathToRegexpMatch as qe, formDataToJson as Je, cloneDeep as oe, camelCase as j, upperFirst as Ke, pick as ze, request as W, loadScript as ae, Storage as Ve, mapToObject as te } from "@vtj/utils";
1
+ import { Base as xe, BUILT_IN_COMPONENTS as Ne, ProjectModel as B, HistoryModel as he } from "@vtj/core";
2
+ import { isUrl as Be, url as C, dedupArray as Ue, isString as P, isFunction as Y, logger as k, storage as V, cookie as W, toArray as ae, unRSA as ce, delay as me, createRequest as ge, jsonp as ve, merge as Le, pathToRegexp as qe, pathToRegexpMatch as Je, formDataToJson as Ke, cloneDeep as le, camelCase as b, upperFirst as ze, pick as Ve, request as Q, loadScript as ue, Storage as We, mapToObject as ne } from "@vtj/utils";
3
3
  import * as U from "vue";
4
- import { inject as me, defineComponent as ge, h as G, ref as Y, defineAsyncComponent as ce, watchEffect as We } from "vue";
5
- import { useRoute as ve } from "vue-router";
4
+ import { inject as ye, defineComponent as _e, h as X, ref as Z, defineAsyncComponent as pe, watchEffect as Ge } from "vue";
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.12.34
10
+ * @version 0.12.36
11
11
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
12
12
  */
13
- const F = "0.12.34";
14
- var _ = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(_ || {});
15
- const le = [
13
+ const I = "0.12.36";
14
+ var _ = /* @__PURE__ */ ((r) => (r.Runtime = "Runtime", r.Design = "Design", r.Raw = "Raw", r.VNode = "VNode", r))(_ || {});
15
+ const fe = [
16
16
  "$el",
17
17
  "$emit",
18
18
  "$nextTick",
@@ -24,7 +24,7 @@ const le = [
24
24
  "$props",
25
25
  "$options",
26
26
  "$forceUpdate"
27
- ], es = [
27
+ ], ts = [
28
28
  "beforeCreate",
29
29
  "created",
30
30
  "beforeMount",
@@ -38,7 +38,7 @@ const le = [
38
38
  "renderTriggered",
39
39
  "activated",
40
40
  "deactivated"
41
- ], Ge = [
41
+ ], Ye = [
42
42
  "vIf",
43
43
  "vElseIf",
44
44
  "vElse",
@@ -47,7 +47,7 @@ const le = [
47
47
  "vFor",
48
48
  "vBind",
49
49
  "vHtml"
50
- ], Ye = {
50
+ ], Qe = {
51
51
  String,
52
52
  Number,
53
53
  Boolean,
@@ -55,199 +55,281 @@ const le = [
55
55
  Object,
56
56
  Function,
57
57
  Date
58
- }, M = "VtjPage", x = "VtjHomepage", Qe = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot".split(
58
+ }, M = "VtjPage", N = "VtjHomepage", Xe = "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(
59
59
  ","
60
- ), Xe = "component,slot".split(",");
61
- function D(n, e) {
62
- return n.map((t) => Ne(t) || t.startsWith("/") ? t : `${e}${t}`);
60
+ ), Ze = "component,slot".split(",");
61
+ function O(r, e) {
62
+ return r.map((t) => Be(t) || t.startsWith("/") ? t : `${e}${t}`);
63
63
  }
64
- function B(n) {
65
- return /\.css$/.test(n);
64
+ function L(r) {
65
+ return /\.css$/.test(r);
66
66
  }
67
- function L(n) {
68
- return /\.js$/.test(n);
67
+ function q(r) {
68
+ return /\.js$/.test(r);
69
69
  }
70
- function Ze(n) {
71
- return /\.json$/.test(n);
70
+ function et(r) {
71
+ return /\.json$/.test(r);
72
72
  }
73
- function ts(n) {
74
- return n.map(
75
- (e) => `<script src="${C.append(e, { v: F })}"><\/script>`
73
+ function ss(r) {
74
+ return r.map(
75
+ (e) => `<script src="${C.append(e, { v: I })}"><\/script>`
76
76
  ).join("");
77
77
  }
78
- function ss(n = []) {
79
- return n.map(
80
- (e) => `<link rel="stylesheet" href="${C.append(e, { v: F })}" />`
78
+ function rs(r = []) {
79
+ return r.map(
80
+ (e) => `<link rel="stylesheet" href="${C.append(e, { v: I })}" />`
81
81
  ).join("");
82
82
  }
83
- function et(n, e = !1) {
84
- return e && n.endsWith(".prod.js") ? n.replace(".prod.js", ".js") : n;
83
+ function tt(r, e = !1) {
84
+ return e && r.endsWith(".prod.js") ? r.replace(".prod.js", ".js") : r;
85
85
  }
86
- function tt(n, e, t = !1) {
87
- const s = n.filter((h) => !!h.enabled), r = [], i = [], a = [], o = [], c = {}, l = {}, u = [], p = {};
86
+ function st(r, e, t = !1) {
87
+ const s = r.filter((h) => !!h.enabled), n = [], i = [], a = [], o = [], p = {}, c = {}, u = [], l = {};
88
88
  return s.forEach(
89
89
  ({ urls: h, assetsUrl: f, library: d, assetsLibrary: m, localeLibrary: v }) => {
90
90
  h?.forEach((g) => {
91
- L(g) && r.push(et(g, t)), B(g) && i.push(g);
92
- }), d && (o.push(d), c[d] = D(h || [], e), v && (l[d] = v)), f && a.push(f), m && u.push(m), d && m && (p[m] = d);
91
+ q(g) && n.push(tt(g, t)), L(g) && i.push(g);
92
+ }), d && (o.push(d), p[d] = O(h || [], e), v && (c[d] = v)), f && a.push(f), m && u.push(m), d && m && (l[m] = d);
93
93
  }
94
94
  ), {
95
- scripts: D(r, e),
96
- css: D(i, e),
97
- materials: D(a, e),
95
+ scripts: O(n, e),
96
+ css: O(i, e),
97
+ materials: O(a, e),
98
98
  libraryExports: o,
99
99
  materialExports: Ue(u),
100
- materialMapLibrary: p,
101
- libraryMap: c,
102
- libraryLocaleMap: l
100
+ materialMapLibrary: l,
101
+ libraryMap: p,
102
+ libraryLocaleMap: c
103
103
  };
104
104
  }
105
- function st(n, e) {
106
- const { name: t, parent: s, alias: r } = n;
107
- return s ? e[s]?.[r || t] : e[r || t];
105
+ function rt(r, e) {
106
+ const { name: t, parent: s, alias: n } = r;
107
+ return s ? e[s]?.[n || t] : e[n || t];
108
108
  }
109
- function nt(n = []) {
110
- const e = n.filter((s) => B(s)), t = n.filter((s) => L(s));
109
+ function nt(r = []) {
110
+ const e = r.filter((s) => L(s)), t = r.filter((s) => q(s));
111
111
  return {
112
112
  css: e,
113
113
  js: t
114
114
  };
115
115
  }
116
- function rt(n, e) {
117
- const t = /(@(keyframes|media)\s*([^{]*)){([\s\S]*?}\s*})/g, s = [];
118
- let o = n.replace(
119
- t,
120
- (c, l, u, p, h) => (s.push({ type: u, name: p.trim(), conditions: p, content: h }), "/* AT_RULE_PLACEHOLDER */")
121
- ).replace(/::v-deep\(/g, ":deep(").replace(/(\s*)>>>(\s*)/g, "$1:deep($2)").replace(
122
- /([\w-.:\s[\]>+~]+?):deep\(([^)]+)\)/g,
123
- (c, l, u) => `${l.replace(/(\s*)$/, `[${e}]$1`)} ${u}`
124
- ).replace(/([^{}]+)(?=\s*{)/g, (c) => c.split(",").map((l) => {
125
- const u = l.trim();
126
- return u.includes(`[${e}]`) ? u : u.replace(
127
- /(.*?)((?::[^:\s(]+(?:\([^)]*\))?)*)(\s*)$/,
128
- (p, h, f, d) => `${h}[${e}]${f}${d}`
129
- );
130
- }).join(", "));
131
- return s.forEach(({ type: c, conditions: l, content: u }) => {
132
- let p = u;
133
- c === "media" && (p = p.replace(
134
- /([^{}]+)(?=\s*{)/g,
135
- (h) => h.split(",").map((f) => {
136
- const d = f.trim();
137
- return d.includes(`[${e}]`) ? d : d.replace(
138
- /(.*?)((?::[^:\s(]+(?:\([^)]*\))?)*)(\s*)$/,
139
- (m, v, g, E) => `${v}[${e}]${g}${E}`
140
- );
141
- }).join(", ")
142
- )), o = o.replace(
143
- "/* AT_RULE_PLACEHOLDER */",
144
- `@${c} ${l}{${p}}`
145
- );
146
- }), o.replace(/}}/g, "}");
116
+ function it(r, e) {
117
+ const t = (c) => {
118
+ const u = [];
119
+ let l = 0;
120
+ for (; l < c.length; ) {
121
+ if (/\s/.test(c[l])) {
122
+ l++;
123
+ continue;
124
+ }
125
+ if (c.substring(l, l + 2) === "/*") {
126
+ const g = c.indexOf("*/", l + 2);
127
+ if (g !== -1) {
128
+ l = g + 2;
129
+ continue;
130
+ }
131
+ }
132
+ if (c[l] === "@") {
133
+ const g = l;
134
+ for (; l < c.length && c[l] !== "{" && c[l] !== ";"; )
135
+ l++;
136
+ const $ = c.substring(g, l).trim(), w = $.includes("@keyframes");
137
+ if (c[l] === ";")
138
+ u.push({
139
+ type: "simple-at-rule",
140
+ content: c.substring(g, l + 1)
141
+ }), l++;
142
+ else if (c[l] === "{") {
143
+ const J = l + 1;
144
+ let A = 1;
145
+ for (l++; l < c.length && A > 0; )
146
+ c[l] === "{" ? A++ : c[l] === "}" && A--, l++;
147
+ const K = c.substring(g, l), E = c.substring(J, l - 1);
148
+ u.push({
149
+ type: w ? "keyframes" : "at-rule",
150
+ rule: $,
151
+ content: K,
152
+ inner: E
153
+ });
154
+ }
155
+ continue;
156
+ }
157
+ const h = l;
158
+ for (; l < c.length && c[l] !== "{"; )
159
+ l++;
160
+ if (l >= c.length) break;
161
+ const f = c.substring(h, l).trim();
162
+ if (!f) {
163
+ l++;
164
+ continue;
165
+ }
166
+ const d = l + 1;
167
+ let m = 1;
168
+ for (l++; l < c.length && m > 0; )
169
+ c[l] === "{" ? m++ : c[l] === "}" && m--, l++;
170
+ const v = c.substring(d, l - 1);
171
+ u.push({
172
+ type: "rule",
173
+ selector: f,
174
+ content: v.trim()
175
+ });
176
+ }
177
+ return u;
178
+ }, s = (c) => {
179
+ const u = c.trim();
180
+ return /^(from|to|\d+(\.\d+)?%)$/.test(u);
181
+ }, n = (c) => c.replace(/::v-deep\(/g, ":deep(").replace(/::v-deep\s+/g, ":deep(").replace(/\/deep\//g, " ").replace(/>>>/g, " ").replace(/(.*?):deep\(([^)]+)\)/g, (u, l, h) => {
182
+ const f = l.trim(), d = h.trim();
183
+ return f ? `${f}[${e}] ${d}` : d;
184
+ }), i = (c) => {
185
+ const u = c.trim();
186
+ if (!u || u.includes(`[${e}]`) || /^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(u) || s(u))
187
+ return u;
188
+ const l = u.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);
189
+ if (l) {
190
+ const [, h, f = ""] = l, d = h.trim();
191
+ return d ? `${d}[${e}]${f}` : u;
192
+ }
193
+ return `${u}[${e}]`;
194
+ }, a = (c) => n(c).split(",").map((l) => i(l)).filter((l) => l.trim()).join(", "), o = (c) => c.map((u) => {
195
+ switch (u.type) {
196
+ case "simple-at-rule":
197
+ return u.content;
198
+ case "keyframes":
199
+ return u.content;
200
+ case "at-rule":
201
+ try {
202
+ const h = t(u.inner), f = o(h);
203
+ return `${u.rule} { ${f} }`;
204
+ } catch {
205
+ return u.content;
206
+ }
207
+ case "rule":
208
+ if (!u.selector || !u.content)
209
+ return "";
210
+ const l = a(u.selector);
211
+ return l.trim() ? `${l} { ${u.content} }` : "";
212
+ default:
213
+ return "";
214
+ }
215
+ }).filter((u) => u.trim()).join(" "), p = (c) => c.replace(/\s*{\s*/g, " { ").replace(/\s*}\s*/g, " } ").replace(/\s*;\s*/g, "; ").replace(/\s*,\s*/g, ", ").replace(/\s+/g, " ").replace(/^\s+|\s+$/g, "").replace(/\s*}\s*}/g, " } }").trim();
216
+ try {
217
+ const c = r.replace(/\/\*(?!\s*!)[\s\S]*?\*\//g, "").replace(/^\s+|\s+$/gm, "").replace(/\n\s*\n/g, `
218
+ `), u = t(c), l = o(u);
219
+ return p(l);
220
+ } catch (c) {
221
+ return console.error("CSS scoping failed:", c), console.error("Input CSS:", r), r.replace(/\/\*[\s\S]*?\*\//g, "").replace(
222
+ /(@keyframes\s+[^{]+\s*{[^{}]*(?:{[^}]*}[^{}]*)*})/g,
223
+ (u) => u
224
+ ).replace(/([^{}@]+)(?=\s*{)/g, (u) => {
225
+ const l = u.trim();
226
+ return !l || l.startsWith("@") || l.includes(`[${e}]`) || s(l) ? u : `${l}[${e}]`;
227
+ });
228
+ }
147
229
  }
148
- function ye(n) {
149
- return R(n) ? n : JSON.stringify(n);
230
+ function Se(r) {
231
+ return P(r) ? r : JSON.stringify(r);
150
232
  }
151
- function _e(n, e, t, s = !1) {
152
- const r = n.CSSStyleSheet, i = s ? `data-v-${e}` : e, a = s ? rt(t, i) : t;
153
- if (r.prototype.replaceSync) {
154
- const o = new r();
233
+ function $e(r, e, t, s = !1) {
234
+ const n = r.CSSStyleSheet, i = s ? `data-v-${e}` : e, a = s ? it(t, i) : t;
235
+ if (n.prototype.replaceSync) {
236
+ const o = new n();
155
237
  o.id = e, o.replaceSync(a);
156
- const c = n.document, l = c.adoptedStyleSheets, u = Array.from(l).filter(
157
- (p) => p.id !== e
238
+ const p = r.document, c = p.adoptedStyleSheets, u = Array.from(c).filter(
239
+ (l) => l.id !== e
158
240
  );
159
- c.adoptedStyleSheets = [...u, o];
241
+ p.adoptedStyleSheets = [...u, o];
160
242
  } else {
161
- const o = n.document;
162
- let c = o.getElementById(e);
163
- c ? c.innerHTML = a : (c = o.createElement("style"), c.id = e, c.innerHTML = a, o.head.appendChild(c));
243
+ const o = r.document;
244
+ let p = o.getElementById(e);
245
+ p ? p.innerHTML = a : (p = o.createElement("style"), p.id = e, p.innerHTML = a, o.head.appendChild(p));
164
246
  }
165
247
  }
166
- async function it(n, e) {
248
+ async function ot(r, e) {
167
249
  const t = await window.fetch(e).then((s) => s.text()).catch(() => "");
168
- t && _e(window, n, t);
250
+ t && $e(window, r, t);
169
251
  }
170
- function we(n, e = window) {
252
+ function je(r, e = window) {
171
253
  const t = e.document, s = e.document.head;
172
- for (const r of n)
173
- if (!t.getElementById(r)) {
254
+ for (const n of r)
255
+ if (!t.getElementById(n)) {
174
256
  const a = t.createElement("link");
175
- a.rel = "stylesheet", a.id = r, a.href = r, s.appendChild(a);
257
+ a.rel = "stylesheet", a.id = n, a.href = n, s.appendChild(a);
176
258
  }
177
259
  }
178
- async function Se(n, e, t = window) {
179
- const s = t.document, r = t.document.head;
260
+ async function Ee(r, e, t = window) {
261
+ const s = t.document, n = t.document.head;
180
262
  let i = t[e];
181
263
  return i ? i.default || i : new Promise((a, o) => {
182
- for (const c of n) {
183
- const l = s.createElement("script");
184
- l.src = c, l.onload = () => {
264
+ for (const p of r) {
265
+ const c = s.createElement("script");
266
+ c.src = p, c.onload = () => {
185
267
  i = t[e], i ? a(i.default || i) : o(null);
186
- }, l.onerror = (u) => {
268
+ }, c.onerror = (u) => {
187
269
  o(u);
188
- }, r.appendChild(l);
270
+ }, n.appendChild(c);
189
271
  }
190
272
  });
191
273
  }
192
- function ot(n) {
193
- return V(n) || V(n?.install);
274
+ function at(r) {
275
+ return Y(r) || Y(r?.install);
194
276
  }
195
- function at(n) {
196
- return Xe.includes(n);
277
+ function ct(r) {
278
+ return Ze.includes(r);
197
279
  }
198
- function ct(n) {
199
- return Qe.includes(n);
280
+ function lt(r) {
281
+ return Xe.includes(r);
200
282
  }
201
- function I(n = window) {
283
+ function D(r = window) {
202
284
  const e = window?.Mock;
203
285
  if (e) return e;
204
- const t = n?.Mock;
286
+ const t = r?.Mock;
205
287
  if (t && window)
206
288
  return window.Mock = t, t;
207
289
  }
208
- function ns(n, e, t) {
290
+ function ns(r, e, t) {
209
291
  Object.assign(e.meta, t.meta);
210
- const s = n?._container;
292
+ const s = r?._container;
211
293
  t?.type === "page" && s.classList.add("is-page"), t?.pure && s.classList.add("is-pure");
212
294
  }
213
- function H(n, e, t = !1, s = !1) {
295
+ function T(r, e, t = !1, s = !1) {
214
296
  try {
215
- const r = ['"use strict";', "var __self = arguments[0];"];
216
- r.push("return ");
217
- let i = (n.value || "").trim();
218
- i = i.replace(/this(\W|$)/g, (o, c) => `__self${c}`), i = r.join(`
297
+ const n = ['"use strict";', "var __self = arguments[0];"];
298
+ n.push("return ");
299
+ let i = (r.value || "").trim();
300
+ i = i.replace(/this(\W|$)/g, (o, p) => `__self${p}`), i = n.join(`
219
301
  `) + i;
220
302
  const a = `with(${t ? "{}" : "$scope || {}"}) { ${i} }`;
221
303
  return new Function("$scope", a)(e);
222
- } catch (r) {
223
- if (A.error("parseExpression.error", r, n, e?.__self ?? e), s)
224
- throw r;
304
+ } catch (n) {
305
+ if (k.error("parseExpression.error", n, r, e?.__self ?? e), s)
306
+ throw n;
225
307
  }
226
308
  }
227
- function Q(n, e, t = !1, s = !1) {
228
- const r = H(n, e, t, s);
229
- if (typeof r != "function" && (A.error(
309
+ function ee(r, e, t = !1, s = !1) {
310
+ const n = T(r, e, t, s);
311
+ if (typeof n != "function" && (k.error(
230
312
  "parseFunction.error",
231
313
  "not a function",
232
- n,
314
+ r,
233
315
  e?.__self ?? e
234
316
  ), s))
235
- throw new Error(`"${n.value}" not a function`);
236
- return r;
317
+ throw new Error(`"${r.value}" not a function`);
318
+ return n;
237
319
  }
238
- function w(n) {
239
- return n && n.type === "JSExpression";
320
+ function S(r) {
321
+ return r && r.type === "JSExpression";
240
322
  }
241
- function T(n) {
242
- return typeof n == "object" && n && n.type === "JSFunction";
323
+ function H(r) {
324
+ return typeof r == "object" && r && r.type === "JSFunction";
243
325
  }
244
- function lt(n) {
245
- return w(n) || T(n);
326
+ function ut(r) {
327
+ return S(r) || H(r);
246
328
  }
247
- function rs(n) {
248
- return lt(n) ? n.value : JSON.stringify(n);
329
+ function is(r) {
330
+ return ut(r) ? r.value : JSON.stringify(r);
249
331
  }
250
- const ut = {
332
+ const pt = {
251
333
  session: !1,
252
334
  authKey: "Authorization",
253
335
  storageKey: "ACCESS_STORAGE",
@@ -260,14 +342,14 @@ const ut = {
260
342
  noPermissionMessage: "无权限访问该页面",
261
343
  appName: "",
262
344
  statusKey: "code"
263
- }, $e = Symbol("access");
264
- class Ee {
345
+ }, be = Symbol("access");
346
+ class Pe {
265
347
  options;
266
348
  data = null;
267
349
  mode = _.Raw;
268
350
  interceptResponse = !0;
269
351
  constructor(e) {
270
- this.options = Object.assign({}, ut, e), this.loadData();
352
+ this.options = Object.assign({}, pt, e), this.loadData();
271
353
  }
272
354
  enableIntercept() {
273
355
  this.interceptResponse = !0;
@@ -276,22 +358,22 @@ class Ee {
276
358
  this.interceptResponse = !1;
277
359
  }
278
360
  connect(e) {
279
- const { mode: t, router: s, request: r } = e;
280
- this.mode = t, s && this.mode === _.Raw && this.setGuard(s), r && this.setRequest(r);
361
+ const { mode: t, router: s, request: n } = e;
362
+ this.mode = t, s && this.mode === _.Raw && this.setGuard(s), n && this.setRequest(n);
281
363
  }
282
364
  login(e) {
283
- const { storageKey: t, storagePrefix: s, session: r, authKey: i } = this.options;
284
- this.setData(e), this.data && (J.save(t, e, {
365
+ const { storageKey: t, storagePrefix: s, session: n, authKey: i } = this.options;
366
+ this.setData(e), this.data && (V.save(t, e, {
285
367
  type: "local",
286
368
  prefix: s
287
- }), r && K.set(i, this.data.token));
369
+ }), n && W.set(i, this.data.token));
288
370
  }
289
371
  clear() {
290
- const { storageKey: e, storagePrefix: t, session: s, authKey: r } = this.options;
291
- this.data = null, J.remove(e, {
372
+ const { storageKey: e, storagePrefix: t, session: s, authKey: n } = this.options;
373
+ this.data = null, V.remove(e, {
292
374
  type: "local",
293
375
  prefix: t
294
- }), s && K.remove(r);
376
+ }), s && W.remove(n);
295
377
  }
296
378
  logout() {
297
379
  this.clear(), this.toLogin();
@@ -304,22 +386,22 @@ class Ee {
304
386
  }
305
387
  can(e) {
306
388
  const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
307
- return typeof e == "function" ? e(s) : re(e).every((i) => s[i] || s[t + "." + i]);
389
+ return typeof e == "function" ? e(s) : ae(e).every((i) => s[i] || s[t + "." + i]);
308
390
  }
309
391
  some(e) {
310
392
  const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
311
- return re(e).some((i) => s[i] || s[t + "." + i]);
393
+ return ae(e).some((i) => s[i] || s[t + "." + i]);
312
394
  }
313
395
  install(e) {
314
- e.config.globalProperties.$access = this, e.provide($e, this);
396
+ e.config.globalProperties.$access = this, e.provide(be, this);
315
397
  }
316
398
  isAuthPath(e) {
317
399
  const { auth: t, isAuth: s } = this.options;
318
400
  if (s)
319
401
  return s(e);
320
402
  if (e.path && typeof t == "string") {
321
- const r = t.split("#")[1] || t;
322
- return e.path === r;
403
+ const n = t.split("#")[1] || t;
404
+ return e.path === n;
323
405
  }
324
406
  return !1;
325
407
  }
@@ -332,17 +414,17 @@ class Ee {
332
414
  setData(e) {
333
415
  const { privateKey: t } = this.options;
334
416
  if (Array.isArray(e) && t) {
335
- const s = e.map((r) => ie(r, t));
417
+ const s = e.map((n) => ce(n, t));
336
418
  try {
337
419
  this.data = JSON.parse(s.join(""));
338
- } catch (r) {
339
- console.warn(r);
420
+ } catch (n) {
421
+ console.warn(n);
340
422
  }
341
423
  return;
342
424
  }
343
425
  if (typeof e == "string")
344
426
  try {
345
- const s = t ? ie(e, t) : e;
427
+ const s = t ? ce(e, t) : e;
346
428
  s ? this.data = JSON.parse(s) : console.warn("RSA解密失败或登录信息缺失");
347
429
  } catch (s) {
348
430
  console.warn(s);
@@ -351,7 +433,7 @@ class Ee {
351
433
  this.data = e;
352
434
  }
353
435
  loadData() {
354
- const { storageKey: e, storagePrefix: t } = this.options, s = J.get(e, {
436
+ const { storageKey: e, storagePrefix: t } = this.options, s = V.get(e, {
355
437
  type: "local",
356
438
  prefix: t
357
439
  });
@@ -359,7 +441,7 @@ class Ee {
359
441
  }
360
442
  isLogined() {
361
443
  const { session: e, authKey: t } = this.options;
362
- return e && t ? !!K.get(t) : !!this.getToken();
444
+ return e && t ? !!W.get(t) : !!this.getToken();
363
445
  }
364
446
  hasRoutePermission(e) {
365
447
  if (e.name === M) {
@@ -369,7 +451,7 @@ class Ee {
369
451
  return !0;
370
452
  }
371
453
  setGuard(e) {
372
- e.beforeEach((t, s, r) => this.guard(t, r));
454
+ e.beforeEach((t, s, n) => this.guard(t, n));
373
455
  }
374
456
  async guard(e, t) {
375
457
  if (this.isWhiteList(e) || this.isAuthPath(e))
@@ -378,8 +460,8 @@ class Ee {
378
460
  if (this.hasRoutePermission(e))
379
461
  return t();
380
462
  {
381
- const { noPermissionMessage: s = "无权限访问", unauthorized: r = !1 } = this.options;
382
- return await this.showTip(s), V(r) ? (r(), t(!1)) : R(r) ? t(r) : t(!1);
463
+ const { noPermissionMessage: s = "无权限访问", unauthorized: n = !1 } = this.options;
464
+ return await this.showTip(s), Y(n) ? (n(), t(!1)) : P(n) ? t(n) : t(!1);
383
465
  }
384
466
  }
385
467
  t(!1), this.toLogin();
@@ -398,7 +480,7 @@ class Ee {
398
480
  }
399
481
  async showTip(e) {
400
482
  const { alert: t } = this.options;
401
- return t ? (await de(150), await t(e, {
483
+ return t ? (await me(150), await t(e, {
402
484
  title: "提示",
403
485
  type: "warning"
404
486
  }).catch(() => !1)) : !1;
@@ -414,22 +496,22 @@ class Ee {
414
496
  );
415
497
  }
416
498
  }
417
- function pt() {
418
- return me($e, null);
499
+ function ft() {
500
+ return ye(be, null);
419
501
  }
420
- function is(n = {}) {
502
+ function os(r = {}) {
421
503
  const {
422
504
  notify: e,
423
505
  loading: t,
424
506
  settings: s = {},
425
- Startup: r,
507
+ Startup: n,
426
508
  access: i,
427
509
  useTitle: a,
428
510
  alert: o
429
- } = n;
430
- let c = null;
511
+ } = r;
512
+ let p = null;
431
513
  return {
432
- request: fe({
514
+ request: ge({
433
515
  settings: {
434
516
  type: "form",
435
517
  validSuccess: !0,
@@ -441,97 +523,97 @@ function is(n = {}) {
441
523
  e && e(u || "未知错误");
442
524
  },
443
525
  showLoading: () => {
444
- c && c.close(), t && (c = t());
526
+ p && p.close(), t && (p = t());
445
527
  },
446
528
  hideLoading: () => {
447
- c && (c.close(), c = null);
529
+ p && (p.close(), p = null);
448
530
  },
449
531
  ...s
450
532
  }
451
533
  }),
452
- jsonp: he,
534
+ jsonp: ve,
453
535
  notify: e,
454
536
  loading: t,
455
537
  useTitle: a,
456
- startupComponent: r,
457
- access: i ? new Ee({ alert: o, ...i }) : void 0
538
+ startupComponent: n,
539
+ access: i ? new Pe({ alert: o, ...i }) : void 0
458
540
  };
459
541
  }
460
- function os(n = {}) {
461
- return new Ee(n);
542
+ function as(r = {}) {
543
+ return new Pe(r);
462
544
  }
463
- function dt(n, e) {
545
+ function dt(r, e) {
464
546
  const { jsonp: t, request: s } = e;
465
- if (n.method === "jsonp")
466
- return (r = {}) => t(n.url, {
467
- ...n.jsonpOptions,
468
- query: r
547
+ if (r.method === "jsonp")
548
+ return (n = {}) => t(r.url, {
549
+ ...r.jsonpOptions,
550
+ query: n
469
551
  });
470
552
  {
471
- const r = n.headers ? H(n.headers, {}, !0) : void 0, i = {
472
- url: n.url,
473
- method: n.method,
553
+ const n = r.headers ? T(r.headers, {}, !0) : void 0, i = {
554
+ url: r.url,
555
+ method: r.method,
474
556
  settings: {
475
- ...n.settings,
476
- headers: r
557
+ ...r.settings,
558
+ headers: n
477
559
  }
478
560
  };
479
- return (a, o) => (delete i.data, s.send(Be(i, o || {}, { data: a })));
561
+ return (a, o) => (delete i.data, s.send(Le(i, o || {}, { data: a })));
480
562
  }
481
563
  }
482
- function ft(n, e) {
564
+ function ht(r, e) {
483
565
  const { metaQuery: t } = e;
484
566
  if (!t) return;
485
- const { code: s, queryCode: r } = n;
567
+ const { code: s, queryCode: n } = r;
486
568
  return (i, a) => {
487
569
  if (!t) {
488
570
  console.warn("adapter.metaQuery is not defined!");
489
571
  return;
490
572
  }
491
- return t(s, r, i, a);
573
+ return t(s, n, i, a);
492
574
  };
493
575
  }
494
- function ht(n = [], e = [], t) {
576
+ function mt(r = [], e = [], t) {
495
577
  const s = {};
496
- for (const r of n)
497
- s[r.id] = dt(r, t);
498
- for (const r of e)
499
- s[r.id] = ft(r, t);
578
+ for (const n of r)
579
+ s[n.id] = dt(n, t);
580
+ for (const n of e)
581
+ s[n.id] = ht(n, t);
500
582
  return s;
501
583
  }
502
- async function mt(n = [], e = window) {
503
- const t = I(e);
504
- t && (je(e), n.forEach((s) => vt(t, s)));
584
+ async function gt(r = [], e = window) {
585
+ const t = D(e);
586
+ t && (Re(e), r.forEach((s) => yt(t, s)));
505
587
  }
506
- function gt(n, e = window) {
507
- const t = T(n.mockTemplate) && n.mockTemplate.value ? Q(n.mockTemplate, {}, !0) : void 0, s = I(e);
508
- return async (...r) => {
588
+ function vt(r, e = window) {
589
+ const t = H(r.mockTemplate) && r.mockTemplate.value ? ee(r.mockTemplate, {}, !0) : void 0, s = D(e);
590
+ return async (...n) => {
509
591
  let i = {};
510
592
  if (t)
511
593
  try {
512
- i = await t.apply(t, r);
594
+ i = await t.apply(t, n);
513
595
  } catch (a) {
514
- A.warn("模拟数据模版异常", a);
596
+ k.warn("模拟数据模版异常", a);
515
597
  }
516
598
  return s?.mock(i);
517
599
  };
518
600
  }
519
- function vt(n, e) {
601
+ function yt(r, e) {
520
602
  if (!e.mock) return;
521
603
  const { url: t, mockTemplate: s } = e;
522
604
  if (t && s) {
523
- const r = Le(`${t}(.*)`), i = qe(t, { decode: decodeURIComponent }), a = H(s, {}, !0);
524
- n.mock(r, (o) => {
525
- const c = C.parse(o.url) || {}, l = o.body instanceof FormData ? Je(o.body) : o.body, u = i(o.url)?.params;
526
- return Object.assign(o, { data: l, params: c, query: u }), n.mock(a(o));
605
+ const n = qe(`${t}(.*)`), i = Je(t, { decode: decodeURIComponent }), a = T(s, {}, !0);
606
+ r.mock(n, (o) => {
607
+ const p = C.parse(o.url) || {}, c = o.body instanceof FormData ? Ke(o.body) : o.body, u = i(o.url)?.params;
608
+ return Object.assign(o, { data: c, params: p, query: u }), r.mock(a(o));
527
609
  });
528
610
  }
529
611
  }
530
- function je(n = window) {
531
- const e = I(n);
612
+ function Re(r = window) {
613
+ const e = D(r);
532
614
  e && (e._mocked = {});
533
615
  }
534
- class yt {
616
+ class _t {
535
617
  __id = null;
536
618
  __mode;
537
619
  __instance = null;
@@ -557,15 +639,15 @@ class yt {
557
639
  $apis = {};
558
640
  __transform = {};
559
641
  constructor(e) {
560
- const { mode: t, dsl: s, attrs: r } = e;
561
- this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), r && Object.assign(this, r);
642
+ const { mode: t, dsl: s, attrs: n } = e;
643
+ this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), n && Object.assign(this, n);
562
644
  }
563
645
  setup(e, t = U) {
564
646
  const s = t.getCurrentInstance();
565
647
  if (!s) return;
566
648
  this.__refs = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = s.proxy;
567
- const r = s.appContext.config.globalProperties;
568
- Object.assign(this, r), Object.assign(this, e || {}), this.__proxy(), t.onMounted(() => {
649
+ const n = s.appContext.config.globalProperties;
650
+ Object.assign(this, n), Object.assign(this, e || {}), this.__proxy(), t.onMounted(() => {
569
651
  this.__proxy();
570
652
  }), t.onUnmounted(() => {
571
653
  this.__cleanup();
@@ -574,12 +656,12 @@ class yt {
574
656
  });
575
657
  }
576
658
  __proxy() {
577
- this.__instance && le.forEach((e) => {
659
+ this.__instance && fe.forEach((e) => {
578
660
  this[e] = this.__instance?.[e];
579
661
  });
580
662
  }
581
663
  __cleanup() {
582
- le.forEach((e) => {
664
+ fe.forEach((e) => {
583
665
  this[e] = null;
584
666
  }), this.__reset();
585
667
  }
@@ -589,35 +671,35 @@ class yt {
589
671
  __parseFunction(e) {
590
672
  if (e)
591
673
  if (this.__mode === _.Runtime) {
592
- const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
593
- return Q({ type: s, value: r }, this);
674
+ const { id: t, type: s } = e, n = t ? this.__transform[t] ?? e.value : e.value;
675
+ return ee({ type: s, value: n }, this);
594
676
  } else
595
- return Q(e, this);
677
+ return ee(e, this);
596
678
  }
597
679
  __parseExpression(e) {
598
680
  if (e)
599
681
  if (this.__mode === _.Runtime) {
600
- const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
601
- return H({ type: s, value: r }, this);
682
+ const { id: t, type: s } = e, n = t ? this.__transform[t] ?? e.value : e.value;
683
+ return T({ type: s, value: n }, this);
602
684
  } else
603
- return H(e, this);
685
+ return T(e, this);
604
686
  }
605
687
  __ref(e = null, t) {
606
688
  if (this.__mode !== _.VNode)
607
689
  return e && e !== this.__id && (this.__contextRefs[e] = this), async (s) => {
608
- await de(0);
609
- let r = s?.$vtjEl || s?.$el || s?._?.vnode?.el || s;
610
- if (!r) {
690
+ await me(0);
691
+ let n = s?.$vtjEl || s?.$el || s?._?.vnode?.el || s;
692
+ if (!n) {
611
693
  typeof t == "string" && (delete this.$refs[t], e && delete this.__refs[e]);
612
694
  return;
613
695
  }
614
- return r.nodeType === 3 && r.nextSibling && (r = r.nextSibling), r.__vtj__ = e, _.Design === this.__mode && (r.__context__ = this, r.draggable = !0), e && (this.__refs[e] = this.__getRefEl(this.__refs, e, s)), typeof t == "function" ? t(s) : t && (this.$refs[t] = this.__getRefEl(this.$refs, t, s)), s;
696
+ return n.nodeType === 3 && n.nextSibling && (n = n.nextSibling), n.__vtj__ = e, _.Design === this.__mode && (n.__context__ = this, n.draggable = !0), e && (this.__refs[e] = this.__getRefEl(this.__refs, e, s)), typeof t == "function" ? t(s) : t && (this.$refs[t] = this.__getRefEl(this.$refs, t, s)), s;
615
697
  };
616
698
  }
617
699
  __getRefEl(e, t, s) {
618
- const r = e[t];
619
- if (r && s !== r) {
620
- const i = new Set([].concat(r, s));
700
+ const n = e[t];
701
+ if (n && s !== n) {
702
+ const i = new Set([].concat(n, s));
621
703
  return Array.from(i);
622
704
  } else
623
705
  return s;
@@ -630,133 +712,133 @@ class yt {
630
712
  return s.context.__proto__ = this.context, s.__proto__ = this, s;
631
713
  }
632
714
  }
633
- function X(n) {
715
+ function te(r) {
634
716
  const {
635
717
  Vue: e = U,
636
718
  mode: t = _.Runtime,
637
719
  components: s = {},
638
- libs: r = {},
720
+ libs: n = {},
639
721
  apis: i = {},
640
722
  loader: a
641
- } = n, o = e.computed(() => n.dsl), c = {
723
+ } = r, o = e.computed(() => r.dsl), p = {
642
724
  $components: s,
643
- $libs: r,
725
+ $libs: n,
644
726
  $apis: i
645
- }, l = new yt({
727
+ }, c = new _t({
646
728
  mode: t,
647
729
  dsl: o.value,
648
- attrs: c
730
+ attrs: p
649
731
  }), u = e.defineComponent({
650
732
  name: o.value.name,
651
733
  __scopeId: o.value.id ? `data-v-${o.value.id}` : void 0,
652
734
  props: {
653
- ...wt(o.value.props ?? [], l)
735
+ ...St(o.value.props ?? [], c)
654
736
  },
655
- setup(p) {
656
- l.$props = p, l.props = p, o.value.id && _e(
657
- n.window || window,
737
+ setup(l) {
738
+ c.$props = l, c.props = l, o.value.id && $e(
739
+ r.window || window,
658
740
  o.value.id,
659
741
  o.value.css || "",
660
742
  !0
661
- ), l.state = St(e, o.value.state ?? {}, l);
662
- const h = $t(e, o.value.computed ?? {}, l), f = Et(o.value.methods ?? {}, l), d = jt(e, o.value.inject, l);
663
- for (const [g, E] of Object.entries(d || {}))
664
- d[g] = e.inject(g, E);
665
- const m = Rt(
743
+ ), c.state = $t(e, o.value.state ?? {}, c);
744
+ const h = jt(e, o.value.computed ?? {}, c), f = Et(o.value.methods ?? {}, c), d = bt(e, o.value.inject, c);
745
+ for (const [g, $] of Object.entries(d || {}))
746
+ d[g] = e.inject(g, $);
747
+ const m = Pt(
666
748
  o.value.dataSources || {},
667
- l
749
+ c
668
750
  ), v = {
669
751
  ...d,
670
752
  ...h,
671
753
  ...f,
672
754
  ...m
673
755
  };
674
- return l.setup(v, e), Pt(e, o.value.watch ?? [], l), {
675
- vtj: l
756
+ return c.setup(v, e), Rt(e, o.value.watch ?? [], c), {
757
+ vtj: c
676
758
  };
677
759
  },
678
- emits: _t(o.value.emits),
760
+ emits: wt(o.value.emits),
679
761
  expose: ["vtj"],
680
762
  render() {
681
763
  if (!o.value.nodes) return null;
682
- const p = o.value.nodes || [];
683
- return p.length === 1 ? k(p[0], l, e, a, p) : p.map(
684
- (h) => k(h, l, e, a, p)
764
+ const l = o.value.nodes || [];
765
+ return l.length === 1 ? F(l[0], c, e, a, l) : l.map(
766
+ (h) => F(h, c, e, a, l)
685
767
  );
686
768
  },
687
- ...bt(o.value.lifeCycles ?? {}, l)
769
+ ...Ct(o.value.lifeCycles ?? {}, c)
688
770
  });
689
771
  return {
690
772
  renderer: e.markRaw(u),
691
- context: l
773
+ context: c
692
774
  };
693
775
  }
694
- function _t(n = []) {
695
- return n.map((e) => R(e) ? e : e.name);
776
+ function wt(r = []) {
777
+ return r.map((e) => P(e) ? e : e.name);
696
778
  }
697
- function wt(n = [], e) {
698
- const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) => Ye[i]) : void 0;
699
- return n.map((s) => R(s) ? {
779
+ function St(r = [], e) {
780
+ const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) => Qe[i]) : void 0;
781
+ return r.map((s) => P(s) ? {
700
782
  name: s
701
783
  } : {
702
784
  name: s.name,
703
785
  type: s.type,
704
786
  required: s.required,
705
- default: w(s.default) ? e.__parseExpression(s.default) : s.default
787
+ default: S(s.default) ? e.__parseExpression(s.default) : s.default
706
788
  }).reduce(
707
- (s, r) => (s[r.name] = {
708
- type: t(r.type),
709
- required: r.required,
710
- default: r.default
789
+ (s, n) => (s[n.name] = {
790
+ type: t(n.type),
791
+ required: n.required,
792
+ default: n.default
711
793
  }, s),
712
794
  {}
713
795
  );
714
796
  }
715
- function St(n, e, t) {
716
- return n.reactive(
797
+ function $t(r, e, t) {
798
+ return r.reactive(
717
799
  Object.keys(e || {}).reduce(
718
- (s, r) => {
719
- let i = e[r];
720
- return w(i) ? i = t.__parseExpression(i) : T(i) && (i = t.__parseFunction(i)), s[r] = i, s;
800
+ (s, n) => {
801
+ let i = e[n];
802
+ return S(i) ? i = t.__parseExpression(i) : H(i) && (i = t.__parseFunction(i)), s[n] = i, s;
721
803
  },
722
804
  {}
723
805
  )
724
806
  );
725
807
  }
726
- function $t(n, e, t) {
808
+ function jt(r, e, t) {
727
809
  return Object.entries(e ?? {}).reduce(
728
- (s, [r, i]) => (s[r] = n.computed(t.__parseFunction(i)), s),
810
+ (s, [n, i]) => (s[n] = r.computed(t.__parseFunction(i)), s),
729
811
  {}
730
812
  );
731
813
  }
732
- function Et(n, e) {
733
- return Object.entries(n ?? {}).reduce(
734
- (t, [s, r]) => (t[s] = e.__parseFunction(r), t),
814
+ function Et(r, e) {
815
+ return Object.entries(r ?? {}).reduce(
816
+ (t, [s, n]) => (t[s] = e.__parseFunction(n), t),
735
817
  {}
736
818
  );
737
819
  }
738
- function jt(n, e = [], t) {
820
+ function bt(r, e = [], t) {
739
821
  return e.reduce(
740
- (s, r) => {
741
- const { name: i, from: a } = r || {};
742
- r.default;
743
- const o = w(a) ? t.__parseExpression(a) || i : a ?? i, c = w(r.default) ? t.__parseExpression(r.default) : r.default ?? null;
744
- return s[i] = n.inject(o, c), s;
822
+ (s, n) => {
823
+ const { name: i, from: a } = n || {};
824
+ n.default;
825
+ const o = S(a) ? t.__parseExpression(a) || i : a ?? i, p = S(n.default) ? t.__parseExpression(n.default) : n.default ?? null;
826
+ return s[i] = r.inject(o, p), s;
745
827
  },
746
828
  {}
747
829
  );
748
830
  }
749
- function Rt(n, e) {
750
- return Object.keys(n).reduce(
831
+ function Pt(r, e) {
832
+ return Object.keys(r).reduce(
751
833
  (t, s) => {
752
- const r = n[s];
753
- if (r.type === "mock")
754
- t[s] = gt(r);
755
- else if (r.ref) {
756
- const i = e.$apis[r.ref], a = T(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
834
+ const n = r[s];
835
+ if (n.type === "mock")
836
+ t[s] = vt(n);
837
+ else if (n.ref) {
838
+ const i = e.$apis[n.ref], a = H(n.transform) ? n.transform.value ? e.__parseFunction(n.transform) : void 0 : n.transform;
757
839
  t[s] = async (...o) => {
758
- const c = await i.apply(e, o);
759
- return a ? a(c) : c;
840
+ const p = await i.apply(e, o);
841
+ return a ? a(p) : p;
760
842
  };
761
843
  }
762
844
  return t;
@@ -764,9 +846,9 @@ function Rt(n, e) {
764
846
  {}
765
847
  );
766
848
  }
767
- function Pt(n, e = [], t) {
849
+ function Rt(r, e = [], t) {
768
850
  e.forEach((s) => {
769
- n.watch(
851
+ r.watch(
770
852
  t.__parseExpression(s.source),
771
853
  t.__parseFunction(s.handler),
772
854
  {
@@ -776,277 +858,276 @@ function Pt(n, e = [], t) {
776
858
  );
777
859
  });
778
860
  }
779
- function bt(n, e) {
780
- return Object.entries(n ?? {}).reduce(
781
- (t, [s, r]) => (t[s] = e.__parseFunction(r), t),
861
+ function Ct(r, e) {
862
+ return Object.entries(r ?? {}).reduce(
863
+ (t, [s, n]) => (t[s] = e.__parseFunction(n), t),
782
864
  {}
783
865
  );
784
866
  }
785
- let z = [], b = {};
786
- const Ct = (n) => n;
787
- async function Re(n, e = window) {
788
- const { urls: t = [], library: s } = n, r = t.filter((o) => L(o));
789
- if (r.length === 0 || !s) return null;
790
- const i = t.filter((o) => B(o));
791
- return i.length && we(i, e), await Se(r, s, e).catch(
792
- (o) => (console.warn("loadScriptUrl error", r, s, o), null)
867
+ let G = [], R = {};
868
+ const kt = (r) => r;
869
+ async function Ce(r, e = window) {
870
+ const { urls: t = [], library: s } = r, n = t.filter((o) => q(o));
871
+ if (n.length === 0 || !s) return null;
872
+ const i = t.filter((o) => L(o));
873
+ return i.length && je(i, e), await Ee(n, s, e).catch(
874
+ (o) => (console.warn("loadScriptUrl error", n, s, o), null)
793
875
  );
794
876
  }
795
- function Z(n) {
796
- const { getDsl: e, getDslByUrl: t, options: s } = n;
797
- return s.window && (z.forEach((r) => {
798
- delete s.window[r];
799
- }), z = []), (r, i, a = U) => {
800
- if (!i || typeof i == "string") return r;
877
+ function se(r) {
878
+ const { getDsl: e, getDslByUrl: t, options: s } = r;
879
+ return s.window && (G.forEach((n) => {
880
+ delete s.window[n];
881
+ }), G = []), (n, i, a = U) => {
882
+ if (!i || typeof i == "string") return n;
801
883
  if (i.type === "Schema" && i.id)
802
884
  return a.defineAsyncComponent(async () => {
803
- const o = b[i.id] || await e(i.id);
804
- return o && (o.name = r, b[i.id] = o), o ? X({
885
+ const o = R[i.id] || await e(i.id);
886
+ return o && (o.name = n, R[i.id] = o), o ? te({
805
887
  ...s,
806
888
  Vue: a,
807
- dsl: oe(o),
889
+ dsl: le(o),
808
890
  mode: _.Runtime,
809
- loader: Z(n)
891
+ loader: se(r)
810
892
  }).renderer : null;
811
893
  });
812
894
  if (i.type === "UrlSchema" && i.url)
813
895
  return a.defineAsyncComponent(async () => {
814
- const o = b[i.url] || await t(i.url);
815
- return o && (o.name = r, b[i.url] = o), o ? X({
896
+ const o = R[i.url] || await t(i.url);
897
+ return o && (o.name = n, R[i.url] = o), o ? te({
816
898
  ...s,
817
899
  Vue: a,
818
- dsl: oe(o),
900
+ dsl: le(o),
819
901
  mode: _.Runtime,
820
- loader: Z(n)
902
+ loader: se(r)
821
903
  }).renderer : null;
822
904
  });
823
905
  if (i.type === "Plugin") {
824
- let o = i.library ? b[i.library] : null;
825
- return o || (i.library && z.push(i.library), o = b[i.library || Symbol()] = a.defineAsyncComponent(
906
+ let o = i.library ? R[i.library] : null;
907
+ return o || (i.library && G.push(i.library), o = R[i.library || Symbol()] = a.defineAsyncComponent(
826
908
  async () => {
827
- const c = await Re(i, s.window);
828
- return c || (console.warn("getPlugin result is null", i), null);
909
+ const p = await Ce(i, s.window);
910
+ return p || (console.warn("getPlugin result is null", i), null);
829
911
  }
830
912
  ), o);
831
913
  }
832
- return r;
914
+ return n;
833
915
  };
834
916
  }
835
- function as() {
836
- b = {};
917
+ function cs() {
918
+ R = {};
837
919
  }
838
- function k(n, e, t = U, s = Ct, r = [], i = !1) {
839
- if (!n || !n.name || n.invisible) return null;
840
- const a = t.getCurrentInstance()?.appContext, { id: o = null, directives: c = [] } = n, { vIf: l, vElseIf: u, vElse: p, vFor: h, vShow: f, vModels: d, vBind: m, vHtml: v, others: g } = Pe(c);
841
- if (!i && (u || p))
920
+ function F(r, e, t = U, s = kt, n = [], i = !1) {
921
+ if (!r || !r.name || r.invisible) return null;
922
+ const a = t.getCurrentInstance()?.appContext, { id: o = null, directives: p = [] } = r, { vIf: c, vElseIf: u, vElse: l, vFor: h, vShow: f, vModels: d, vBind: m, vHtml: v, others: g } = ke(p);
923
+ if (!i && (u || l))
842
924
  return null;
843
- if (l && !kt(l, e))
844
- return Ht(n, e, t, s, r);
845
- const E = (S) => {
846
- const Ie = S.$components, He = (() => {
847
- if (n.name === "component")
848
- return Ft(S, n.props?.is);
849
- if (n.name === "slot") return n.name;
850
- const $ = s(n.name, n.from, t);
851
- return R($) ? at($) || ct($) ? $ : Ie[$] ?? a?.app?.component($) ?? $ : $;
852
- })(), P = Mt(o, n.props ?? {}, S), Te = It(t, n.events ?? {}, S);
853
- if (n.name === "slot")
854
- return Tt(t, n, P, S, s);
855
- m && Object.assign(P, S.__parseExpression(m.value)), f && (P.style = Object.assign(
856
- P.style ?? {},
857
- Ot(f, S)
858
- )), v && Object.assign(P, xt(v, S)), d.forEach(($) => {
859
- Object.assign(P, Nt(t, $, S));
925
+ if (c && !At(c, e))
926
+ return Tt(r, e, t, s, n);
927
+ const $ = (w, J = 0) => {
928
+ const A = w.$components, K = (() => {
929
+ if (r.name === "component")
930
+ return It(w, r.props?.is);
931
+ if (r.name === "slot") return r.name;
932
+ const j = s(r.name, r.from, t);
933
+ return P(j) ? ct(j) || lt(j) ? j : A[j] ?? a?.app?.component(j) ?? j : j;
934
+ })(), E = Mt(o, r.props ?? {}, w), He = Dt(t, r.events ?? {}, w);
935
+ if (r.name === "slot")
936
+ return Ht(t, r, E, w, s);
937
+ m && Object.assign(E, w.__parseExpression(m.value)), f && (E.style = Object.assign(
938
+ E.style ?? {},
939
+ xt(f, w)
940
+ )), v && Object.assign(E, Nt(v, w)), d.forEach((j) => {
941
+ Object.assign(E, Bt(t, j, w));
860
942
  });
861
- const De = Ut(
943
+ const Oe = Ut(
862
944
  t,
863
- n.children ?? [],
864
- S,
945
+ r.children ?? [],
946
+ w,
865
947
  s,
866
- n
948
+ r
949
+ );
950
+ let z = t.createVNode(
951
+ K,
952
+ { key: `${o}_${J}`, ...E, ...He },
953
+ Oe
867
954
  );
868
- let q = t.createVNode(He, { ...P, ...Te }, De);
869
- const ne = a ? At(a, g, S) : [];
870
- return ne.length && (q = t.withDirectives(q, ne)), q;
955
+ const oe = a ? Ft(a, g, w) : [];
956
+ return oe.length && (z = t.withDirectives(z, oe)), z;
871
957
  };
872
- return h ? qt(h, E, e) : E(e);
958
+ return h ? Jt(h, $, e) : $(e);
873
959
  }
874
- function At(n, e, t) {
875
- const s = n.app;
876
- return e.map((r) => {
877
- const i = typeof r.name == "string" ? s.directive(r.name) : t.__parseExpression(r.name);
960
+ function Ft(r, e, t) {
961
+ const s = r.app;
962
+ return e.map((n) => {
963
+ const i = typeof n.name == "string" ? s.directive(n.name) : t.__parseExpression(n.name);
878
964
  if (!i) return null;
879
965
  const a = [i];
880
- return r.value && a.push(t.__parseExpression(r.value)), r.arg && a.push(r.arg), r.modifiers && a.push(r.modifiers), a;
881
- }).filter((r) => !!r);
882
- }
883
- function Pe(n = []) {
884
- const e = n.find((u) => j(u.name) === "vIf"), t = n.find(
885
- (u) => j(u.name) === "vElseIf"
886
- ), s = n.find((u) => j(u.name) === "vElse"), r = n.find((u) => j(u.name) === "vFor"), i = n.find((u) => j(u.name) === "vShow"), a = n.find((u) => j(u.name) === "vBind"), o = n.find((u) => j(u.name) === "vHtml"), c = n.filter(
887
- (u) => j(u.name) === "vModel"
888
- ), l = n.filter(
889
- (u) => !Ge.includes(j(u.name))
966
+ return n.value && a.push(t.__parseExpression(n.value)), n.arg && a.push(n.arg), n.modifiers && a.push(n.modifiers), a;
967
+ }).filter((n) => !!n);
968
+ }
969
+ function ke(r = []) {
970
+ const e = r.find((u) => b(u.name) === "vIf"), t = r.find(
971
+ (u) => b(u.name) === "vElseIf"
972
+ ), s = r.find((u) => b(u.name) === "vElse"), n = r.find((u) => b(u.name) === "vFor"), i = r.find((u) => b(u.name) === "vShow"), a = r.find((u) => b(u.name) === "vBind"), o = r.find((u) => b(u.name) === "vHtml"), p = r.filter(
973
+ (u) => b(u.name) === "vModel"
974
+ ), c = r.filter(
975
+ (u) => !Ye.includes(b(u.name))
890
976
  );
891
977
  return {
892
978
  vIf: e,
893
979
  vElseIf: t,
894
980
  vElse: s,
895
- vFor: r,
981
+ vFor: n,
896
982
  vShow: i,
897
- vModels: c,
983
+ vModels: p,
898
984
  vBind: a,
899
- others: l,
985
+ others: c,
900
986
  vHtml: o
901
987
  };
902
988
  }
903
- function kt(n, e) {
904
- return !!e.__parseExpression(n.value);
989
+ function At(r, e) {
990
+ return !!e.__parseExpression(r.value);
905
991
  }
906
- function Ft(n, e) {
907
- return e ? w(e) ? n.__parseExpression(e) : e : "div";
992
+ function It(r, e) {
993
+ return e ? S(e) ? r.__parseExpression(e) : e : "div";
908
994
  }
909
- function Mt(n, e, t) {
910
- const s = ee(e, t);
911
- return s.ref = t.__ref(n, s.ref), s;
995
+ function Mt(r, e, t) {
996
+ const s = re(e, t);
997
+ return s.ref = t.__ref(r, s.ref), s;
912
998
  }
913
- function ee(n, e) {
914
- return w(n) ? e.__parseExpression(n) : T(n) ? e.__parseFunction(n) : Array.isArray(n) ? n.map((t) => ee(t, e)) : typeof n == "object" ? Object.keys(n || {}).reduce(
999
+ function re(r, e) {
1000
+ return S(r) ? e.__parseExpression(r) : H(r) ? e.__parseFunction(r) : Array.isArray(r) ? r.map((t) => re(t, e)) : typeof r == "object" ? Object.keys(r || {}).reduce(
915
1001
  (t, s) => {
916
- let r = n[s];
917
- return t[s] = ee(r, e), t;
1002
+ let n = r[s];
1003
+ return t[s] = re(n, e), t;
918
1004
  },
919
1005
  {}
920
- ) : n;
1006
+ ) : r;
921
1007
  }
922
- function It(n, e, t) {
923
- const s = ["passive", "capture", "once"], r = {
1008
+ function Dt(r, e, t) {
1009
+ const s = ["passive", "capture", "once"], n = {
924
1010
  capture: "Capture",
925
1011
  once: "Once",
926
1012
  passive: "OnceCapture"
927
1013
  };
928
1014
  return Object.keys(e || {}).reduce(
929
1015
  (i, a) => {
930
- const o = e[a], c = be(o.modifiers), l = c.find((h) => s.includes(h)), u = "on" + Ke(a) + (l && r[l] || ""), p = t.__parseFunction(o.handler);
931
- return p && (i[u] = n.withModifiers(p, c)), i;
1016
+ const o = e[a], p = Fe(o.modifiers), c = p.find((h) => s.includes(h)), u = "on" + ze(a) + (c && n[c] || ""), l = t.__parseFunction(o.handler);
1017
+ return l && (i[u] = r.withModifiers(l, p)), i;
932
1018
  },
933
1019
  {}
934
1020
  );
935
1021
  }
936
- function Ht(n, e, t, s, r = []) {
937
- let i = r.findIndex((a) => a.id === n.id);
938
- for (let a = ++i; a < r.length; a++) {
939
- const { directives: o = [] } = r[a], { vElseIf: c, vElse: l } = Pe(o);
940
- if (c) {
941
- if (e.__parseExpression(c.value))
942
- return k(r[a], e, t, s, r, !0);
1022
+ function Tt(r, e, t, s, n = []) {
1023
+ let i = n.findIndex((a) => a.id === r.id);
1024
+ for (let a = ++i; a < n.length; a++) {
1025
+ const { directives: o = [] } = n[a], { vElseIf: p, vElse: c } = ke(o);
1026
+ if (p) {
1027
+ if (e.__parseExpression(p.value))
1028
+ return F(n[a], e, t, s, n, !0);
943
1029
  continue;
944
1030
  }
945
- if (l)
946
- return k(r[a], e, t, s, r, !0);
1031
+ if (c)
1032
+ return F(n[a], e, t, s, n, !0);
947
1033
  }
948
1034
  return null;
949
1035
  }
950
- function be(n = {}, e = !1) {
951
- const t = Object.keys(n);
1036
+ function Fe(r = {}, e = !1) {
1037
+ const t = Object.keys(r);
952
1038
  return e ? t.map((s) => "." + s) : t;
953
1039
  }
954
- function Tt(n, e, t, s, r) {
955
- const { children: i } = e, a = Dt(e, s), o = s.$slots?.[a.name];
956
- return o ? o(t) : i ? R(i) ? n.createTextVNode(i) : w(i) ? n.createTextVNode(
957
- ye(s.__parseExpression(i))
1040
+ function Ht(r, e, t, s, n) {
1041
+ const { children: i } = e, a = Ot(e, s), o = s.$slots?.[a.name];
1042
+ return o ? o(t) : i ? P(i) ? r.createTextVNode(i) : S(i) ? r.createTextVNode(
1043
+ Se(s.__parseExpression(i))
958
1044
  ) : Array.isArray(i) ? i.map(
959
- (c) => k(c, s, n, r, i)
1045
+ (p) => F(p, s, r, n, i)
960
1046
  ) : null : null;
961
1047
  }
962
- function Dt(n, e) {
963
- const { props: t } = n, s = t?.name || "default";
1048
+ function Ot(r, e) {
1049
+ const { props: t } = r, s = t?.name || "default";
964
1050
  return {
965
- name: w(s) ? e.__parseExpression(s) : s,
1051
+ name: S(s) ? e.__parseExpression(s) : s,
966
1052
  params: []
967
1053
  };
968
1054
  }
969
- function Ot(n, e) {
970
- return e.__parseExpression(n.value) ? {} : {
1055
+ function xt(r, e) {
1056
+ return e.__parseExpression(r.value) ? {} : {
971
1057
  display: "none"
972
1058
  };
973
1059
  }
974
- function xt(n, e) {
1060
+ function Nt(r, e) {
975
1061
  return {
976
- innerHTML: e.__parseExpression(n.value) || ""
1062
+ innerHTML: e.__parseExpression(r.value) || ""
977
1063
  };
978
1064
  }
979
- function Nt(n, e, t) {
1065
+ function Bt(r, e, t) {
980
1066
  const s = {
981
1067
  type: "JSFunction",
982
1068
  value: e.value?.value ? `(v) => {
983
1069
  ${e.value.value} = v;
984
1070
  }` : "(v) => {}"
985
- }, r = t.__parseFunction(s), i = be(
986
- w(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
987
- ), a = w(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
1071
+ }, n = t.__parseFunction(s), i = Fe(
1072
+ S(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
1073
+ ), a = S(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
988
1074
  return {
989
1075
  [a]: t.__parseExpression(e.value),
990
- [`onUpdate:${a}`]: i.length && r ? n.withModifiers(r, i) : r
1076
+ [`onUpdate:${a}`]: i.length && n ? r.withModifiers(n, i) : n
991
1077
  };
992
1078
  }
993
- function Ut(n, e, t, s, r) {
1079
+ function Ut(r, e, t, s, n) {
994
1080
  if (!e) return null;
995
- if (R(e))
1081
+ if (P(e))
996
1082
  return { default: () => e };
997
- if (w(e))
1083
+ if (S(e))
998
1084
  return {
999
- default: () => ye(t.__parseExpression(e))
1085
+ default: () => Se(t.__parseExpression(e))
1000
1086
  };
1001
1087
  if (Array.isArray(e) && e.length > 0) {
1002
- const i = Bt(e), a = (o) => !o || !r ? {} : r?.id && Object.keys(o).length ? {
1003
- [`scope_${r.id}`]: o
1088
+ const i = Lt(e), a = (o) => !o || !n ? {} : n?.id && Object.keys(o).length ? {
1089
+ [`scope_${n.id}`]: o
1004
1090
  } : {};
1005
- return Object.entries(i).reduce((o, [c, { nodes: l, params: u }]) => (o[c] = (p) => {
1006
- const h = u.length ? ze(p ?? {}, u) : a(p);
1007
- return l.map(
1008
- (f) => k(f, t.__clone(h), n, s, l)
1091
+ return Object.entries(i).reduce((o, [p, { nodes: c, params: u }]) => (o[p] = (l) => {
1092
+ const h = u.length ? Ve(l ?? {}, u) : a(l);
1093
+ return c.map(
1094
+ (f) => F(f, t.__clone(h), r, s, c)
1009
1095
  );
1010
1096
  }, o), {});
1011
1097
  }
1012
1098
  return null;
1013
1099
  }
1014
- function Bt(n) {
1015
- const e = {
1016
- default: {
1017
- params: [],
1018
- nodes: []
1019
- }
1020
- };
1021
- for (const t of n) {
1022
- const s = Lt(t.slot), r = s.name;
1023
- e[r] ? (e[r].nodes.push(t), e[r].params = e[r].params.concat(s.params)) : e[r] = {
1100
+ function Lt(r) {
1101
+ const e = {};
1102
+ for (const t of r) {
1103
+ const s = qt(t.slot), n = s.name;
1104
+ e[n] ? (e[n].nodes.push(t), e[n].params = e[n].params.concat(s.params)) : e[n] = {
1024
1105
  nodes: [t],
1025
1106
  params: s.params
1026
1107
  };
1027
1108
  }
1028
1109
  return e;
1029
1110
  }
1030
- function Lt(n = "default") {
1031
- return R(n) ? { name: n, params: [] } : { params: [], ...n };
1111
+ function qt(r = "default") {
1112
+ return P(r) ? { name: r, params: [] } : { params: [], ...r };
1032
1113
  }
1033
- function qt(n, e, t) {
1034
- const { value: s, iterator: r } = n, { item: i = "item", index: a = "index" } = r || {};
1114
+ function Jt(r, e, t) {
1115
+ const { value: s, iterator: n } = r, { item: i = "item", index: a = "index" } = n || {};
1035
1116
  let o = t.__parseExpression(s) || [];
1036
- return Number.isInteger(o) && (o = new Array(o).fill(!0).map((c, l) => l + 1)), Array.isArray(o) ? o.map((c, l) => e(t.__clone({ [i]: c, [a]: l }))) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
1117
+ return Number.isInteger(o) && (o = new Array(o).fill(!0).map((p, c) => c + 1)), Array.isArray(o) ? o.map((p, c) => e(t.__clone({ [i]: p, [a]: c }), c)) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
1037
1118
  }
1038
- const ue = ge({
1119
+ const de = _e({
1039
1120
  name: "VtjPageContainer",
1040
1121
  async setup() {
1041
- const n = Ae(), e = ve(), t = e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null, i = Y(Symbol());
1122
+ const r = Ie(), e = we(), t = e.params.id, s = t ? r.getPage(t) : r.getHomepage(), n = s ? await r.getRenderComponent(s.id) : null, i = Z(Symbol());
1042
1123
  if (s) {
1043
1124
  Object.assign(e.meta, s.meta || {}, { cache: s.cache });
1044
- const { useTitle: a } = n?.adapter;
1125
+ const { useTitle: a } = r?.adapter;
1045
1126
  a && a(s.title || "VTJ");
1046
1127
  }
1047
1128
  return {
1048
- provider: n,
1049
- component: r,
1129
+ provider: r,
1130
+ component: n,
1050
1131
  file: s,
1051
1132
  query: e.query,
1052
1133
  meta: e.meta,
@@ -1055,20 +1136,20 @@ const ue = ge({
1055
1136
  };
1056
1137
  },
1057
1138
  render() {
1058
- const { component: n, query: e, sid: t } = this;
1059
- return n ? G(n, { ...e, key: t }) : G("div", "页面不存在");
1139
+ const { component: r, query: e, sid: t } = this;
1140
+ return r ? X(r, { ...e, key: t }) : X("div", "页面不存在");
1060
1141
  },
1061
1142
  activated() {
1062
1143
  this.meta.cache === !1 && (this.sid = Symbol());
1063
1144
  }
1064
- }), Jt = ge({
1145
+ }), Kt = _e({
1065
1146
  name: "VtjStartupContainer",
1066
1147
  render() {
1067
- return G("div", "page not found!");
1148
+ return X("div", "page not found!");
1068
1149
  }
1069
- }), Ce = Symbol("Provider");
1070
- var Kt = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(Kt || {});
1071
- class zt extends Oe {
1150
+ }), Ae = Symbol("Provider");
1151
+ var zt = /* @__PURE__ */ ((r) => (r.Production = "production", r.Development = "development", r))(zt || {});
1152
+ class Vt extends xe {
1072
1153
  // DSL缓存
1073
1154
  /**
1074
1155
  * 创建Provider实例
@@ -1079,18 +1160,18 @@ class zt extends Oe {
1079
1160
  const {
1080
1161
  service: t,
1081
1162
  mode: s = _.Raw,
1082
- dependencies: r,
1163
+ dependencies: n,
1083
1164
  materials: i,
1084
1165
  project: a = {},
1085
1166
  adapter: o = {},
1086
- globals: c = {},
1087
- modules: l = {},
1167
+ globals: p = {},
1168
+ modules: c = {},
1088
1169
  router: u = null,
1089
- materialPath: p = "./",
1170
+ materialPath: l = "./",
1090
1171
  nodeEnv: h = "development"
1091
1172
  /* Development */
1092
1173
  } = e;
1093
- this.mode = s, this.modules = l, this.service = t, this.router = u, this.materialPath = p, this.nodeEnv = h, r && (this.dependencies = r), i && (this.materials = i), Object.assign(this.globals, c), Object.assign(this.adapter, o);
1174
+ this.mode = s, this.modules = c, this.service = t, this.router = u, this.materialPath = l, this.nodeEnv = h, n && (this.dependencies = n), i && (this.materials = i), Object.assign(this.globals, p), Object.assign(this.adapter, o);
1094
1175
  const { access: f, request: d } = this.adapter;
1095
1176
  f && f.connect({ mode: s, router: u, request: d }), a && s !== _.Design ? this.load(a) : this.project = a;
1096
1177
  }
@@ -1100,7 +1181,7 @@ class zt extends Oe {
1100
1181
  // 全局变量
1101
1182
  modules = {};
1102
1183
  // 异步模块加载器
1103
- adapter = { request: W, jsonp: he };
1184
+ adapter = { request: Q, jsonp: ve };
1104
1185
  // 适配器接口
1105
1186
  apis = {};
1106
1187
  // API集合
@@ -1130,9 +1211,9 @@ class zt extends Oe {
1130
1211
  try {
1131
1212
  s = await e.apply(e, t);
1132
1213
  } catch (i) {
1133
- A.warn("模拟数据模版异常", i);
1214
+ k.warn("模拟数据模版异常", i);
1134
1215
  }
1135
- return I()?.mock(s);
1216
+ return D()?.mock(s);
1136
1217
  };
1137
1218
  }
1138
1219
  /**
@@ -1148,83 +1229,83 @@ class zt extends Oe {
1148
1229
  const t = this.modules[`.vtj/projects/${e.id}.json`] || this.modules[`/src/.vtj/projects/${e.id}.json`];
1149
1230
  if (this.project = t ? await t() : await this.service.init(e), !this.project)
1150
1231
  throw new Error("project is null");
1151
- const { apis: s = [], meta: r = [] } = this.project, i = window;
1152
- i && (i.CKEDITOR_VERSION = void 0), this.mode === _.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.initMock(i), this.apis = ht(s, r, this.adapter), je(i), mt(s, i), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1232
+ const { apis: s = [], meta: n = [] } = this.project, i = window;
1233
+ i && (i.CKEDITOR_VERSION = void 0), this.mode === _.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.initMock(i), this.apis = mt(s, n, this.adapter), Re(i), gt(s, i), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1153
1234
  }
1154
1235
  initMock(e) {
1155
- const t = I(e);
1236
+ const t = D(e);
1156
1237
  t && t.setup({
1157
1238
  timeout: "50-500"
1158
1239
  });
1159
1240
  }
1160
1241
  async loadDependencies(e) {
1161
1242
  const t = Object.entries(this.dependencies);
1162
- for (const [s, r] of t)
1163
- e[s] || (e[s] = this.library[s] = await r());
1243
+ for (const [s, n] of t)
1244
+ e[s] || (e[s] = this.library[s] = await n());
1164
1245
  }
1165
1246
  async loadAssets(e) {
1166
- const { dependencies: t = [] } = this.project, { dependencies: s, library: r, components: i, materialPath: a, nodeEnv: o } = this, {
1167
- libraryExports: c,
1168
- libraryMap: l,
1247
+ const { dependencies: t = [] } = this.project, { dependencies: s, library: n, components: i, materialPath: a, nodeEnv: o } = this, {
1248
+ libraryExports: p,
1249
+ libraryMap: c,
1169
1250
  materials: u,
1170
- materialExports: p,
1251
+ materialExports: l,
1171
1252
  materialMapLibrary: h
1172
- } = tt(
1253
+ } = st(
1173
1254
  t,
1174
1255
  a,
1175
1256
  o === "development"
1176
1257
  /* Development */
1177
1258
  );
1178
- for (const f of c) {
1259
+ for (const f of p) {
1179
1260
  const d = s[f], m = e[f];
1180
1261
  if (m)
1181
- r[f] = m;
1262
+ n[f] = m;
1182
1263
  else if (d)
1183
- e[f] = r[f] = await d();
1264
+ e[f] = n[f] = await d();
1184
1265
  else {
1185
- const v = l[f] || [];
1266
+ const v = c[f] || [];
1186
1267
  for (const g of v)
1187
- B(g) && await it(f, C.append(g, { v: F })), L(g) && await ae(C.append(g, { v: F }));
1188
- r[f] = e[f];
1268
+ L(g) && await ot(f, C.append(g, { v: I })), q(g) && await ue(C.append(g, { v: I }));
1269
+ n[f] = e[f];
1189
1270
  }
1190
1271
  }
1191
1272
  if (o === "development") {
1192
1273
  for (const d of u)
1193
- await ae(C.append(d, { v: F }));
1274
+ await ue(C.append(d, { v: I }));
1194
1275
  const f = this.materials || {};
1195
- for (const d of p) {
1196
- const m = e[h[d]], v = xe[d];
1276
+ for (const d of l) {
1277
+ const m = e[h[d]], v = Ne[d];
1197
1278
  if (v)
1198
1279
  m && v.forEach((g) => {
1199
1280
  i[g] = m[g];
1200
1281
  });
1201
1282
  else {
1202
1283
  const g = f[d] ? (await f[d]()).default : e[d];
1203
- g && m && (g.components || []).forEach((E) => {
1204
- i[E.name] = st(E, m);
1284
+ g && m && (g.components || []).forEach(($) => {
1285
+ i[$.name] = rt($, m);
1205
1286
  });
1206
1287
  }
1207
1288
  }
1208
1289
  }
1209
1290
  }
1210
1291
  initRouter() {
1211
- const { router: e, project: t, options: s, adapter: r } = this;
1292
+ const { router: e, project: t, options: s, adapter: n } = this;
1212
1293
  if (!e) return;
1213
1294
  const i = t?.platform === "uniapp" ? "pages" : "page", {
1214
1295
  routeAppendTo: a,
1215
1296
  pageRouteName: o = i,
1216
- routeMeta: c
1217
- } = s, l = a ? "" : "/", u = {
1218
- path: `${l}${o}/:id`,
1297
+ routeMeta: p
1298
+ } = s, c = a ? "" : "/", u = {
1299
+ path: `${c}${o}/:id`,
1219
1300
  name: M,
1220
- component: ue
1221
- }, p = {
1222
- path: l,
1223
- name: x,
1224
- component: t?.homepage ? ue : r.startupComponent || Jt,
1225
- meta: c
1301
+ component: de
1302
+ }, l = {
1303
+ path: c,
1304
+ name: N,
1305
+ component: t?.homepage ? de : n.startupComponent || Kt,
1306
+ meta: p
1226
1307
  };
1227
- e.hasRoute(M) && e.removeRoute(M), e.hasRoute(x) && e.removeRoute(x), a ? (e.addRoute(a, u), e.addRoute(a, p)) : (e.addRoute(u), e.addRoute(p));
1308
+ e.hasRoute(M) && e.removeRoute(M), e.hasRoute(N) && e.removeRoute(N), a ? (e.addRoute(a, u), e.addRoute(a, l)) : (e.addRoute(u), e.addRoute(l));
1228
1309
  }
1229
1310
  /**
1230
1311
  * Vue 插件安装方法
@@ -1238,19 +1319,19 @@ class zt extends Oe {
1238
1319
  */
1239
1320
  install(e) {
1240
1321
  const t = e.config.globalProperties.installed || {};
1241
- for (const [s, r] of Object.entries(this.library))
1242
- !t[s] && ot(r) && (e.use(r), t[s] = !0);
1243
- this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(Ce, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === _.Design && (e.config.errorHandler = (s, r, i) => {
1244
- const a = r?.$options.name, o = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", c = `[ ${a} ] ${o} ${i}`;
1322
+ for (const [s, n] of Object.entries(this.library))
1323
+ !t[s] && at(n) && (e.use(n), t[s] = !0);
1324
+ this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(Ae, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === _.Design && (e.config.errorHandler = (s, n, i) => {
1325
+ const a = n?.$options.name, o = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", p = `[ ${a} ] ${o} ${i}`;
1245
1326
  console.error(
1246
1327
  "[VTJ Error]:",
1247
1328
  {
1248
1329
  err: s,
1249
- instance: r,
1330
+ instance: n,
1250
1331
  info: i
1251
1332
  },
1252
1333
  s?.stack
1253
- ), this.adapter.notify && this.adapter.notify(c, "组件渲染错误", "error");
1334
+ ), this.adapter.notify && this.adapter.notify(p, "组件渲染错误", "error");
1254
1335
  }), this.options.enhance && e.use(this.options.enhance, this);
1255
1336
  }
1256
1337
  getFile(e) {
@@ -1258,12 +1339,12 @@ class zt extends Oe {
1258
1339
  return this.getPage(e) || t.find((s) => s.id === e) || null;
1259
1340
  }
1260
1341
  getPage(e) {
1261
- const { pages: t = [] } = this.project || {}, s = (r, i = []) => {
1342
+ const { pages: t = [] } = this.project || {}, s = (n, i = []) => {
1262
1343
  for (const a of i) {
1263
- if (a.id === r)
1344
+ if (a.id === n)
1264
1345
  return a;
1265
1346
  if (a.children && a.children.length) {
1266
- const o = s(r, a.children);
1347
+ const o = s(n, a.children);
1267
1348
  if (o)
1268
1349
  return o;
1269
1350
  }
@@ -1300,23 +1381,23 @@ class zt extends Oe {
1300
1381
  * @returns 渲染器实例
1301
1382
  */
1302
1383
  createDslRenderer(e, t = {}) {
1303
- const { library: s, components: r, mode: i, apis: a } = this, o = {
1384
+ const { library: s, components: n, mode: i, apis: a } = this, o = {
1304
1385
  mode: i,
1305
1386
  Vue: s.Vue,
1306
- components: r,
1387
+ components: n,
1307
1388
  libs: s,
1308
1389
  apis: a,
1309
1390
  window,
1310
1391
  ...t
1311
- }, c = Z({
1312
- getDsl: async (l) => await this.getDsl(l) || null,
1313
- getDslByUrl: async (l) => await this.getDslByUrl(l) || null,
1392
+ }, p = se({
1393
+ getDsl: async (c) => await this.getDsl(c) || null,
1394
+ getDslByUrl: async (c) => await this.getDslByUrl(c) || null,
1314
1395
  options: o
1315
1396
  });
1316
- return X({
1397
+ return te({
1317
1398
  ...o,
1318
1399
  dsl: e,
1319
- loader: c
1400
+ loader: p
1320
1401
  });
1321
1402
  }
1322
1403
  /**
@@ -1332,13 +1413,13 @@ class zt extends Oe {
1332
1413
  async getRenderComponent(e, t) {
1333
1414
  const s = this.getFile(e);
1334
1415
  if (!s)
1335
- return A.warn(`Can not find file: ${e}`), null;
1416
+ return k.warn(`Can not find file: ${e}`), null;
1336
1417
  t && t(s);
1337
- const r = `.vtj/vue/${e}.vue`, i = this.modules[r] || this.modules[`/src/pages/${e}.vue`];
1418
+ const n = `.vtj/vue/${e}.vue`, i = this.modules[n] || this.modules[`/src/pages/${e}.vue`];
1338
1419
  if (i)
1339
1420
  return (await i())?.default;
1340
1421
  const a = await this.getDsl(s.id);
1341
- return a ? this.createDslRenderer(a).renderer : (A.warn(`Can not find dsl: ${e}`), null);
1422
+ return a ? this.createDslRenderer(a).renderer : (k.warn(`Can not find dsl: ${e}`), null);
1342
1423
  }
1343
1424
  /**
1344
1425
  * 定义基于URL的异步组件
@@ -1350,7 +1431,7 @@ class zt extends Oe {
1350
1431
  * @returns Vue异步组件
1351
1432
  */
1352
1433
  defineUrlSchemaComponent(e, t) {
1353
- return ce(async () => {
1434
+ return pe(async () => {
1354
1435
  const s = await this.getDslByUrl(e);
1355
1436
  return s ? (s.name = t || s.name, this.createDslRenderer(s).renderer) : null;
1356
1437
  });
@@ -1363,26 +1444,26 @@ class zt extends Oe {
1363
1444
  * @returns Vue异步组件
1364
1445
  */
1365
1446
  definePluginComponent(e) {
1366
- return ce(async () => await Re(e, window));
1447
+ return pe(async () => await Ce(e, window));
1367
1448
  }
1368
1449
  }
1369
- function cs(n) {
1370
- const e = new zt(n);
1450
+ function ls(r) {
1451
+ const e = new Vt(r);
1371
1452
  return {
1372
1453
  provider: e,
1373
1454
  onReady: (s) => e.ready(s)
1374
1455
  };
1375
1456
  }
1376
- function Ae(n = {}) {
1377
- const e = me(Ce, null);
1457
+ function Ie(r = {}) {
1458
+ const e = ye(Ae, null);
1378
1459
  if (!e)
1379
1460
  throw new Error("Can not find provider");
1380
1461
  if (e.nodeEnv === "development") {
1381
- const { id: t, version: s } = n;
1462
+ const { id: t, version: s } = r;
1382
1463
  t && s && (async () => {
1383
- const r = await e.getDsl(t);
1384
- r?.__VERSION__ !== s && e.adapter.notify && e.adapter.notify(
1385
- `[ ${r?.name} ] 组件源码版本与运行时版本不一致,请重新发布组件`,
1464
+ const n = await e.getDsl(t);
1465
+ n?.__VERSION__ !== s && e.adapter.notify && e.adapter.notify(
1466
+ `[ ${n?.name} ] 组件源码版本与运行时版本不一致,请重新发布组件`,
1386
1467
  "版本不一致",
1387
1468
  "warning"
1388
1469
  );
@@ -1390,31 +1471,31 @@ function Ae(n = {}) {
1390
1471
  }
1391
1472
  return e;
1392
1473
  }
1393
- async function ls(n, e = "") {
1394
- const { name: t, urls: s = [] } = n || {}, r = s.map((o) => e + o), { css: i, js: a } = nt(r);
1395
- if (i.length && we(i), a.length)
1396
- return await Se(a, t).catch(
1474
+ async function us(r, e = "") {
1475
+ const { name: t, urls: s = [] } = r || {}, n = s.map((o) => e + o), { css: i, js: a } = nt(n);
1476
+ if (i.length && je(i), a.length)
1477
+ return await Ee(a, t).catch(
1397
1478
  () => {
1398
1479
  }
1399
1480
  );
1400
1481
  }
1401
- const ke = {
1482
+ const Me = {
1402
1483
  type: "json",
1403
1484
  validSuccess: !0,
1404
1485
  originResponse: !1,
1405
1486
  failMessage: !0,
1406
- validate: (n) => n.data?.code === 0
1407
- }, Vt = (n, e = "/__vtj__/api/:type.json") => (t, s, r) => n.send({
1487
+ validate: (r) => r.data?.code === 0
1488
+ }, Wt = (r, e = "/__vtj__/api/:type.json") => (t, s, n) => r.send({
1408
1489
  url: e,
1409
1490
  method: "post",
1410
1491
  params: { type: t },
1411
- query: r,
1492
+ query: n,
1412
1493
  data: {
1413
1494
  type: t,
1414
1495
  data: s
1415
1496
  },
1416
- settings: ke
1417
- }), Wt = (n, e = "/__vtj__/api/uploader.json") => async (t, s) => await n.send({
1497
+ settings: Me
1498
+ }), Gt = (r, e = "/__vtj__/api/uploader.json") => async (t, s) => await r.send({
1418
1499
  url: e,
1419
1500
  method: "post",
1420
1501
  data: {
@@ -1422,12 +1503,12 @@ const ke = {
1422
1503
  projectId: s
1423
1504
  },
1424
1505
  settings: {
1425
- ...ke,
1506
+ ...Me,
1426
1507
  type: "data"
1427
1508
  }
1428
- }).then((r) => r && r[0] ? r[0] : null).catch(() => null);
1429
- function us(n) {
1430
- return fe({
1509
+ }).then((n) => n && n[0] ? n[0] : null).catch(() => null);
1510
+ function ps(r) {
1511
+ return ge({
1431
1512
  settings: {
1432
1513
  type: "json",
1433
1514
  validSuccess: !0,
@@ -1435,14 +1516,14 @@ function us(n) {
1435
1516
  failMessage: !0,
1436
1517
  validate: (e) => e.data?.code === 0,
1437
1518
  showError: (e) => {
1438
- n && n(e || "未知错误");
1519
+ r && r(e || "未知错误");
1439
1520
  }
1440
1521
  }
1441
1522
  });
1442
1523
  }
1443
- class se {
1444
- constructor(e = W) {
1445
- this.req = e, this.api = Vt(e), this.uploader = Wt(e);
1524
+ class ie {
1525
+ constructor(e = Q) {
1526
+ this.req = e, this.api = Wt(e), this.uploader = Gt(e);
1446
1527
  }
1447
1528
  api;
1448
1529
  pluginCaches = {};
@@ -1526,10 +1607,10 @@ class se {
1526
1607
  return await this.api("clearStaticFiles", e).catch(() => "");
1527
1608
  }
1528
1609
  async getPluginMaterial(e) {
1529
- const { urls: t = [] } = e, s = t.filter((i) => Ze(i))[0];
1610
+ const { urls: t = [] } = e, s = t.filter((i) => et(i))[0];
1530
1611
  if (!s) return null;
1531
- const r = this.pluginCaches[s];
1532
- return r || (this.pluginCaches[s] = W.send({
1612
+ const n = this.pluginCaches[s];
1613
+ return n || (this.pluginCaches[s] = Q.send({
1533
1614
  url: s,
1534
1615
  method: "get",
1535
1616
  settings: {
@@ -1542,22 +1623,22 @@ class se {
1542
1623
  return console.log("BaseService.genSource", e), "";
1543
1624
  }
1544
1625
  }
1545
- const y = new Ve({
1626
+ const y = new We({
1546
1627
  type: "local",
1547
1628
  expired: 0,
1548
1629
  prefix: "__VTJ_"
1549
1630
  });
1550
- class ps extends se {
1631
+ class fs extends ie {
1551
1632
  init(e) {
1552
- const t = new N(e), s = y.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
1553
- return y.save(`project_${t.id}`, r), Promise.resolve(r);
1633
+ const t = new B(e), s = y.get(`project_${t.id}`), n = Object.assign(t.toDsl(), s || {});
1634
+ return y.save(`project_${t.id}`, n), Promise.resolve(n);
1554
1635
  }
1555
1636
  saveProject(e) {
1556
- const t = new N(e);
1637
+ const t = new B(e);
1557
1638
  return y.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
1558
1639
  }
1559
1640
  saveMaterials(e, t) {
1560
- return y.save(`materials_${e.id}`, te(t)), Promise.resolve(!0);
1641
+ return y.save(`materials_${e.id}`, ne(t)), Promise.resolve(!0);
1561
1642
  }
1562
1643
  saveFile(e) {
1563
1644
  return y.save(`file_${e.id}`, e), Promise.resolve(!0);
@@ -1575,13 +1656,13 @@ class ps extends se {
1575
1656
  removeHistory(e) {
1576
1657
  const t = y.get(`history_${e}`);
1577
1658
  if (t) {
1578
- const r = (t.items || []).map((i) => i.id);
1579
- this.removeHistoryItem(e, r), y.remove(`history_${e}`);
1659
+ const n = (t.items || []).map((i) => i.id);
1660
+ this.removeHistoryItem(e, n), y.remove(`history_${e}`);
1580
1661
  }
1581
1662
  return Promise.resolve(!0);
1582
1663
  }
1583
1664
  getHistory(e) {
1584
- const t = y.get(`history_${e}`), s = new pe(t || { id: e });
1665
+ const t = y.get(`history_${e}`), s = new he(t || { id: e });
1585
1666
  return Promise.resolve(s.toDsl());
1586
1667
  }
1587
1668
  getHistoryItem(e, t) {
@@ -1597,22 +1678,22 @@ class ps extends se {
1597
1678
  }), Promise.resolve(!0);
1598
1679
  }
1599
1680
  }
1600
- class Gt extends se {
1681
+ class Yt extends ie {
1601
1682
  projects = {};
1602
1683
  materials = {};
1603
1684
  files = {};
1604
1685
  histories = {};
1605
1686
  historyItems = {};
1606
1687
  init(e) {
1607
- const t = new N(e), s = this.projects[t.id] || {}, r = Object.assign(t.toDsl(), s);
1608
- return this.projects[r.id] = r, Promise.resolve(r);
1688
+ const t = new B(e), s = this.projects[t.id] || {}, n = Object.assign(t.toDsl(), s);
1689
+ return this.projects[n.id] = n, Promise.resolve(n);
1609
1690
  }
1610
1691
  saveProject(e) {
1611
- const t = new N(e);
1692
+ const t = new B(e);
1612
1693
  return this.projects[t.id] = t.toDsl(), Promise.resolve(!0);
1613
1694
  }
1614
1695
  saveMaterials(e, t) {
1615
- return e.id && (this.materials[e.id] = te(t)), Promise.resolve(!0);
1696
+ return e.id && (this.materials[e.id] = ne(t)), Promise.resolve(!0);
1616
1697
  }
1617
1698
  saveFile(e) {
1618
1699
  return this.files[e.id] = e, Promise.resolve(!0);
@@ -1630,18 +1711,18 @@ class Gt extends se {
1630
1711
  removeHistory(e) {
1631
1712
  const t = this.histories[e];
1632
1713
  if (t) {
1633
- const r = (t.items || []).map((i) => i.id);
1634
- this.removeHistoryItem(e, r), delete this.historyItems[e];
1714
+ const n = (t.items || []).map((i) => i.id);
1715
+ this.removeHistoryItem(e, n), delete this.historyItems[e];
1635
1716
  }
1636
1717
  return Promise.resolve(!0);
1637
1718
  }
1638
1719
  getHistory(e) {
1639
- const t = this.histories[e], s = new pe(t || { id: e });
1720
+ const t = this.histories[e], s = new he(t || { id: e });
1640
1721
  return Promise.resolve(s);
1641
1722
  }
1642
1723
  getHistoryItem(e, t) {
1643
- const s = `${e}_${t}`, r = this.historyItems[s] || {};
1644
- return Promise.resolve(r);
1724
+ const s = `${e}_${t}`, n = this.historyItems[s] || {};
1725
+ return Promise.resolve(n);
1645
1726
  }
1646
1727
  saveHistoryItem(e, t) {
1647
1728
  const s = `${e}_${t.id}`;
@@ -1649,16 +1730,16 @@ class Gt extends se {
1649
1730
  }
1650
1731
  removeHistoryItem(e, t) {
1651
1732
  return t.forEach((s) => {
1652
- const r = `${e}_${s}`;
1653
- delete this.historyItems[r];
1733
+ const n = `${e}_${s}`;
1734
+ delete this.historyItems[n];
1654
1735
  }), Promise.resolve(!0);
1655
1736
  }
1656
1737
  }
1657
- let O = null;
1738
+ let x = null;
1658
1739
  function ds() {
1659
- return O || (O = new Gt(), O);
1740
+ return x || (x = new Yt(), x);
1660
1741
  }
1661
- class fs extends se {
1742
+ class hs extends ie {
1662
1743
  getFileCaches = {};
1663
1744
  async getExtension() {
1664
1745
  return await this.api("getExtension", {}).catch(() => {
@@ -1675,7 +1756,7 @@ class fs extends se {
1675
1756
  async saveMaterials(e, t) {
1676
1757
  return !!await this.api("saveMaterials", {
1677
1758
  project: e,
1678
- materials: te(t)
1759
+ materials: ne(t)
1679
1760
  }).catch(() => !1);
1680
1761
  }
1681
1762
  async saveFile(e) {
@@ -1715,130 +1796,131 @@ class fs extends se {
1715
1796
  );
1716
1797
  }
1717
1798
  }
1718
- function Fe(n, e, t = []) {
1799
+ function De(r, e, t = []) {
1719
1800
  return t.map((s) => {
1720
- const { id: r, title: i, icon: a, children: o, hidden: c } = s;
1801
+ const { id: n, title: i, icon: a, children: o, hidden: p } = s;
1721
1802
  return {
1722
- id: r,
1803
+ id: n,
1723
1804
  title: i,
1724
1805
  icon: a,
1725
- hidden: c,
1726
- url: `${n}/${e}/${r}`,
1727
- children: o && o.length ? Fe(n, e, o) : void 0
1806
+ hidden: p,
1807
+ url: `${r}/${e}/${n}`,
1808
+ children: o && o.length ? De(r, e, o) : void 0
1728
1809
  };
1729
1810
  });
1730
1811
  }
1731
- function Me(n, e) {
1732
- if (!e) return n;
1812
+ function Te(r, e) {
1813
+ if (!e) return r;
1733
1814
  let t = [];
1734
- for (const s of n)
1815
+ for (const s of r)
1735
1816
  if (s.children && s.children.length) {
1736
- const r = Me(s.children, e);
1737
- r.length && (s.children = r, t.push(s));
1817
+ const n = Te(s.children, e);
1818
+ n.length && (s.children = n, t.push(s));
1738
1819
  } else
1739
1820
  e.can(s.id.toString()) && t.push(s);
1740
1821
  return t;
1741
1822
  }
1742
- function hs(n) {
1823
+ function ms(r) {
1743
1824
  const {
1744
1825
  menuPathPrefix: e = "",
1745
1826
  pageRouteName: t = "page",
1746
1827
  disableMenusFilter: s = !1
1747
- } = n || {}, r = Ae(), i = ve(), a = pt(), o = Y(!1), c = Y(!1), l = r.project;
1748
- We(() => {
1828
+ } = r || {}, n = Ie(), i = we(), a = ft(), o = Z(!1), p = Z(!1), c = n.project;
1829
+ Ge(() => {
1749
1830
  const { name: h, params: f, meta: d } = i;
1750
1831
  if (h === M) {
1751
- const m = r.getPage(f.id);
1752
- o.value = !m?.mask, c.value = !!m?.pure;
1753
- } else if (h === x) {
1754
- const m = r.getHomepage();
1755
- o.value = !m?.mask, c.value = !!m?.pure;
1832
+ const m = n.getPage(f.id);
1833
+ o.value = !m?.mask, p.value = !!m?.pure;
1834
+ } else if (h === N) {
1835
+ const m = n.getHomepage();
1836
+ o.value = !m?.mask, p.value = !!m?.pure;
1756
1837
  } else
1757
- o.value = !d.mask, c.value = !!d.pure;
1838
+ o.value = !d.mask, p.value = !!d.pure;
1758
1839
  });
1759
- const u = Fe(
1840
+ const u = De(
1760
1841
  e,
1761
1842
  t,
1762
- l?.pages
1763
- ), p = l?.config;
1843
+ c?.pages
1844
+ ), l = c?.config;
1764
1845
  return {
1765
1846
  disabled: o,
1766
- logo: p?.logo,
1767
- themeSwitchable: p?.themeSwitchable,
1768
- title: p?.title || l?.description || l?.name || "VTJ App",
1769
- menus: s ? u : Me(u, a),
1770
- pure: c
1847
+ logo: l?.logo,
1848
+ themeSwitchable: l?.themeSwitchable,
1849
+ title: l?.title || c?.description || c?.name || "VTJ App",
1850
+ menus: s ? u : Te(u, a),
1851
+ pure: p
1771
1852
  };
1772
1853
  }
1773
1854
  export {
1774
- $e as ACCESS_KEY,
1775
- Ee as Access,
1776
- Xe as BUILD_IN_TAGS,
1777
- Ge as BUILT_IN_DIRECTIVES,
1778
- se as BaseService,
1779
- le as CONTEXT_HOST,
1780
- yt as Context,
1855
+ be as ACCESS_KEY,
1856
+ Pe as Access,
1857
+ Ze as BUILD_IN_TAGS,
1858
+ Ye as BUILT_IN_DIRECTIVES,
1859
+ ie as BaseService,
1860
+ fe as CONTEXT_HOST,
1861
+ _t as Context,
1781
1862
  _ as ContextMode,
1782
- Ye as DATA_TYPES,
1783
- x as HOMEPAGE_ROUTE_NAME,
1784
- Qe as HTML_TAGS,
1785
- rs as JSCodeToString,
1786
- es as LIFE_CYCLES_LIST,
1787
- fs as LocalService,
1788
- Gt as MemoryService,
1789
- Kt as NodeEnv,
1863
+ Qe as DATA_TYPES,
1864
+ N as HOMEPAGE_ROUTE_NAME,
1865
+ Xe as HTML_TAGS,
1866
+ is as JSCodeToString,
1867
+ ts as LIFE_CYCLES_LIST,
1868
+ hs as LocalService,
1869
+ Yt as MemoryService,
1870
+ zt as NodeEnv,
1790
1871
  M as PAGE_ROUTE_NAME,
1791
- zt as Provider,
1792
- ps as StorageService,
1793
- F as VTJ_RENDERER_VERSION,
1794
- _e as adoptedStyleSheets,
1795
- as as clearLoaderCache,
1796
- os as createAccess,
1797
- is as createAdapter,
1798
- ts as createAssetScripts,
1799
- ss as createAssetsCss,
1800
- Rt as createDataSources,
1801
- Z as createLoader,
1872
+ Vt as Provider,
1873
+ fs as StorageService,
1874
+ I as VTJ_RENDERER_VERSION,
1875
+ $e as adoptedStyleSheets,
1876
+ cs as clearLoaderCache,
1877
+ it as compileScopedCSS,
1878
+ as as createAccess,
1879
+ os as createAdapter,
1880
+ ss as createAssetScripts,
1881
+ rs as createAssetsCss,
1882
+ Pt as createDataSources,
1883
+ se as createLoader,
1802
1884
  ds as createMemoryService,
1803
- ft as createMetaApi,
1804
- gt as createMock,
1805
- cs as createProvider,
1806
- X as createRenderer,
1885
+ ht as createMetaApi,
1886
+ vt as createMock,
1887
+ ls as createProvider,
1888
+ te as createRenderer,
1807
1889
  dt as createSchemaApi,
1808
- ht as createSchemaApis,
1809
- us as createServiceRequest,
1810
- Ct as defaultLoader,
1811
- D as fillBasePath,
1812
- I as getMock,
1813
- be as getModifiers,
1814
- Re as getPlugin,
1815
- st as getRawComponent,
1816
- at as isBuiltInTag,
1817
- B as isCSSUrl,
1818
- lt as isJSCode,
1819
- w as isJSExpression,
1820
- T as isJSFunction,
1821
- Ze as isJSON,
1822
- L as isJSUrl,
1823
- ct as isNativeTag,
1824
- ot as isVuePlugin,
1825
- it as loadCss,
1826
- we as loadCssUrl,
1827
- ls as loadEnhance,
1828
- Se as loadScriptUrl,
1829
- vt as mockApi,
1830
- mt as mockApis,
1831
- je as mockCleanup,
1832
- k as nodeRender,
1833
- tt as parseDeps,
1834
- H as parseExpression,
1835
- Q as parseFunction,
1890
+ mt as createSchemaApis,
1891
+ ps as createServiceRequest,
1892
+ kt as defaultLoader,
1893
+ O as fillBasePath,
1894
+ D as getMock,
1895
+ Fe as getModifiers,
1896
+ Ce as getPlugin,
1897
+ rt as getRawComponent,
1898
+ ct as isBuiltInTag,
1899
+ L as isCSSUrl,
1900
+ ut as isJSCode,
1901
+ S as isJSExpression,
1902
+ H as isJSFunction,
1903
+ et as isJSON,
1904
+ q as isJSUrl,
1905
+ lt as isNativeTag,
1906
+ at as isVuePlugin,
1907
+ ot as loadCss,
1908
+ je as loadCssUrl,
1909
+ us as loadEnhance,
1910
+ Ee as loadScriptUrl,
1911
+ yt as mockApi,
1912
+ gt as mockApis,
1913
+ Re as mockCleanup,
1914
+ F as nodeRender,
1915
+ st as parseDeps,
1916
+ T as parseExpression,
1917
+ ee as parseFunction,
1836
1918
  nt as parseUrls,
1837
- Ce as providerKey,
1838
- et as removeProdFlag,
1919
+ Ae as providerKey,
1920
+ tt as removeProdFlag,
1839
1921
  ns as setupPageSetting,
1840
- ye as toString,
1841
- pt as useAccess,
1842
- hs as useMask,
1843
- Ae as useProvider
1922
+ Se as toString,
1923
+ ft as useAccess,
1924
+ ms as useMask,
1925
+ Ie as useProvider
1844
1926
  };