@vtj/renderer 0.13.38 → 0.13.39

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 ze, BUILT_IN_COMPONENTS as Ge, ProjectModel as U, HistoryModel as je } from "@vtj/core";
2
- import { isUrl as se, url as F, dedupArray as Ve, isString as I, isFunction as q, logger as M, storage as X, cookie as Y, toArray as ye, unRSA as _e, delay as J, createRequest as Ee, jsonp as Re, merge as Qe, pathToRegexp as We, pathToRegexpMatch as Xe, formDataToJson as Ye, Queue as Ze, cloneDeep as we, camelCase as A, isObject as et, upperFirst as tt, pick as st, request as ne, loadScript as Se, Storage as nt, mapToObject as ue } from "@vtj/utils";
3
- import * as z from "vue";
1
+ import { Base as Ge, BUILT_IN_COMPONENTS as ze, ProjectModel as U, HistoryModel as Ee } from "@vtj/core";
2
+ import { isUrl as se, url as F, dedupArray as Ve, isString as I, isFunction as q, logger as O, storage as X, cookie as Y, toArray as ve, unRSA as _e, delay as J, createRequest as je, jsonp as Re, merge as We, pathToRegexp as Qe, pathToRegexpMatch as Xe, formDataToJson as Ye, Queue as Ze, cloneDeep as we, camelCase as A, isObject as et, upperFirst as tt, pick as st, request as ne, loadScript as Se, Storage as nt, mapToObject as ue } from "@vtj/utils";
3
+ import * as G from "vue";
4
4
  import { inject as Pe, defineComponent as Ce, h as re, ref as ie, watchEffect as rt, defineAsyncComponent as $e } from "vue";
5
5
  import { useRoute as Ae } 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.13.38
10
+ * @version 0.13.39
11
11
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
12
12
  */
13
- const T = "0.13.38";
13
+ const T = "0.13.39";
14
14
  var w = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(w || {});
15
15
  const be = [
16
16
  "$el",
@@ -24,7 +24,7 @@ const be = [
24
24
  "$props",
25
25
  "$options",
26
26
  "$forceUpdate"
27
- ], vs = [
27
+ ], ws = [
28
28
  "beforeCreate",
29
29
  "created",
30
30
  "beforeMount",
@@ -55,9 +55,9 @@ const be = [
55
55
  Object,
56
56
  Function,
57
57
  Date
58
- }, D = "VtjPage", N = "VtjHomepage", at = "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,svg".split(
58
+ }, x = "VtjPage", N = "VtjHomepage", at = "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,svg".split(
59
59
  ","
60
- ), ct = "component,slot".split(","), ys = [
60
+ ), ct = "component,slot".split(","), Ss = [
61
61
  "h",
62
62
  "t",
63
63
  "t",
@@ -78,7 +78,7 @@ const be = [
78
78
  "p",
79
79
  "r",
80
80
  "o"
81
- ].join(""), _s = {
81
+ ].join(""), $s = {
82
82
  auth: [
83
83
  "h",
84
84
  "t",
@@ -142,7 +142,7 @@ const be = [
142
142
  function B(n, e) {
143
143
  return n.map((t) => se(t) || t.startsWith("/") ? t : `${e}${t}`);
144
144
  }
145
- function G(n) {
145
+ function z(n) {
146
146
  return /\.css$/.test(n);
147
147
  }
148
148
  function V(n) {
@@ -151,12 +151,12 @@ function V(n) {
151
151
  function lt(n) {
152
152
  return /\.json$/.test(n);
153
153
  }
154
- function ws(n) {
154
+ function bs(n) {
155
155
  return n.map(
156
156
  (e) => `<script src="${F.append(e, { v: T })}"><\/script>`
157
157
  ).join("");
158
158
  }
159
- function Ss(n = []) {
159
+ function Es(n = []) {
160
160
  return n.map(
161
161
  (e) => `<link rel="stylesheet" href="${F.append(e, { v: T })}" />`
162
162
  ).join("");
@@ -165,20 +165,20 @@ function ut(n, e = !1) {
165
165
  return e && n.endsWith(".prod.js") ? n.replace(".prod.js", ".js") : n;
166
166
  }
167
167
  function ft(n, e, t = !1) {
168
- const s = n.filter((p) => !!p.enabled), r = [], i = [], a = [], o = [], l = {}, c = {}, u = [], f = {};
168
+ const s = n.filter((p) => !!p.enabled), r = [], i = [], a = [], o = [], l = {}, c = {}, f = [], u = {};
169
169
  return s.forEach(
170
170
  ({ urls: p, assetsUrl: h, library: d, assetsLibrary: m, localeLibrary: g }) => {
171
- p?.forEach((v) => {
172
- V(v) && r.push(ut(v, t)), G(v) && i.push(v);
173
- }), d && (o.push(d), l[d] = B(p || [], e), g && (c[d] = g)), h && a.push(h), m && u.push(m), d && m && (f[m] = d);
171
+ p?.forEach((y) => {
172
+ V(y) && r.push(ut(y, t)), z(y) && i.push(y);
173
+ }), d && (o.push(d), l[d] = B(p || [], e), g && (c[d] = g)), h && a.push(h), m && f.push(m), d && m && (u[m] = d);
174
174
  }
175
175
  ), {
176
176
  scripts: B(r, e),
177
177
  css: B(i, e),
178
178
  materials: B(a, e),
179
179
  libraryExports: o,
180
- materialExports: Ve(u),
181
- materialMapLibrary: f,
180
+ materialExports: Ve(f),
181
+ materialMapLibrary: u,
182
182
  libraryMap: l,
183
183
  libraryLocaleMap: c
184
184
  };
@@ -188,7 +188,7 @@ function pt(n, e) {
188
188
  return s ? e[s]?.[r || t] : e[r || t];
189
189
  }
190
190
  function dt(n = []) {
191
- const e = n.filter((s) => G(s)), t = n.filter((s) => V(s));
191
+ const e = n.filter((s) => z(s)), t = n.filter((s) => V(s));
192
192
  return {
193
193
  css: e,
194
194
  js: t
@@ -196,137 +196,160 @@ function dt(n = []) {
196
196
  }
197
197
  function ht(n, e) {
198
198
  const t = (c) => {
199
- const u = [];
200
- let f = 0;
201
- for (; f < c.length; ) {
202
- if (/\s/.test(c[f])) {
203
- f++;
199
+ const f = [];
200
+ let u = 0;
201
+ for (; u < c.length; ) {
202
+ if (/\s/.test(c[u])) {
203
+ u++;
204
204
  continue;
205
205
  }
206
- if (c.substring(f, f + 2) === "/*") {
207
- const v = c.indexOf("*/", f + 2);
208
- if (v !== -1) {
209
- f = v + 2;
206
+ if (c.substring(u, u + 2) === "/*") {
207
+ const y = c.indexOf("*/", u + 2);
208
+ if (y !== -1) {
209
+ u = y + 2;
210
210
  continue;
211
211
  }
212
212
  }
213
- if (c[f] === "@") {
214
- const v = f;
215
- for (; f < c.length && c[f] !== "{" && c[f] !== ";"; )
216
- f++;
217
- const _ = c.substring(v, f).trim(), y = _.includes("@keyframes");
218
- if (c[f] === ";")
219
- u.push({
213
+ if (c[u] === "@") {
214
+ const y = u;
215
+ for (; u < c.length && c[u] !== "{" && c[u] !== ";"; )
216
+ u++;
217
+ const _ = c.substring(y, u).trim(), v = _.includes("@keyframes");
218
+ if (c[u] === ";")
219
+ f.push({
220
220
  type: "simple-at-rule",
221
- content: c.substring(v, f + 1)
222
- }), f++;
223
- else if (c[f] === "{") {
224
- const S = f + 1;
221
+ content: c.substring(y, u + 1)
222
+ }), u++;
223
+ else if (c[u] === "{") {
224
+ const S = u + 1;
225
225
  let P = 1;
226
- for (f++; f < c.length && P > 0; )
227
- c[f] === "{" ? P++ : c[f] === "}" && P--, f++;
228
- const Q = c.substring(v, f), C = c.substring(S, f - 1);
229
- u.push({
230
- type: y ? "keyframes" : "at-rule",
226
+ for (u++; u < c.length && P > 0; )
227
+ c[u] === "{" ? P++ : c[u] === "}" && P--, u++;
228
+ const W = c.substring(y, u), C = c.substring(S, u - 1);
229
+ f.push({
230
+ type: v ? "keyframes" : "at-rule",
231
231
  rule: _,
232
- content: Q,
232
+ content: W,
233
233
  inner: C
234
234
  });
235
235
  }
236
236
  continue;
237
237
  }
238
- const p = f;
239
- for (; f < c.length && c[f] !== "{"; )
240
- f++;
241
- if (f >= c.length) break;
242
- const h = c.substring(p, f).trim();
238
+ const p = u;
239
+ for (; u < c.length && c[u] !== "{"; )
240
+ u++;
241
+ if (u >= c.length) break;
242
+ const h = c.substring(p, u).trim();
243
243
  if (!h) {
244
- f++;
244
+ u++;
245
245
  continue;
246
246
  }
247
- const d = f + 1;
247
+ const d = u + 1;
248
248
  let m = 1;
249
- for (f++; f < c.length && m > 0; )
250
- c[f] === "{" ? m++ : c[f] === "}" && m--, f++;
251
- const g = c.substring(d, f - 1);
252
- u.push({
249
+ for (u++; u < c.length && m > 0; )
250
+ c[u] === "{" ? m++ : c[u] === "}" && m--, u++;
251
+ const g = c.substring(d, u - 1);
252
+ f.push({
253
253
  type: "rule",
254
254
  selector: h,
255
255
  content: g.trim()
256
256
  });
257
257
  }
258
- return u;
258
+ return f;
259
259
  }, s = (c) => {
260
- const u = c.trim();
261
- return /^(from|to|\d+(\.\d+)?%)$/.test(u);
262
- }, r = (c) => c.replace(/::v-deep\(/g, ":deep(").replace(/::v-deep\s+/g, ":deep(").replace(/\/deep\//g, " ").replace(/>>>/g, " ").replace(/(.*?):deep\(([^)]+)\)/g, (u, f, p) => {
263
- const h = f.trim(), d = p.trim();
260
+ const f = c.trim();
261
+ return /^(from|to|\d+(\.\d+)?%)$/.test(f);
262
+ }, r = (c) => c.replace(/::v-deep\(/g, ":deep(").replace(/::v-deep\s+/g, ":deep(").replace(/\/deep\//g, " ").replace(/>>>/g, " ").replace(/(.*?):deep\(([^)]+)\)/g, (f, u, p) => {
263
+ const h = u.trim(), d = p.trim();
264
264
  return h ? `${h}[${e}] ${d}` : d;
265
265
  }), i = (c) => {
266
- const u = c.trim();
267
- if (!u || u.includes(`[${e}]`) || /^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(u) || s(u))
268
- return u;
269
- const f = u.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);
270
- if (f) {
271
- const [, p, h = ""] = f, d = p.trim();
272
- return d ? `${d}[${e}]${h}` : u;
266
+ const f = c.trim();
267
+ if (!f || f.includes(`[${e}]`) || /^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(f) || s(f))
268
+ return f;
269
+ const u = f.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);
270
+ if (u) {
271
+ const [, p, h = ""] = u, d = p.trim();
272
+ return d ? `${d}[${e}]${h}` : f;
273
273
  }
274
- return `${u}[${e}]`;
275
- }, a = (c) => r(c).split(",").map((f) => i(f)).filter((f) => f.trim()).join(", "), o = (c) => c.map((u) => {
276
- switch (u.type) {
274
+ return `${f}[${e}]`;
275
+ }, a = (c) => r(c).split(",").map((u) => i(u)).filter((u) => u.trim()).join(", "), o = (c) => c.map((f) => {
276
+ switch (f.type) {
277
277
  case "simple-at-rule":
278
- return u.content;
278
+ return f.content;
279
279
  case "keyframes":
280
- return u.content;
280
+ return f.content;
281
281
  case "at-rule":
282
282
  try {
283
- const p = t(u.inner), h = o(p);
284
- return `${u.rule} { ${h} }`;
283
+ const p = t(f.inner), h = o(p);
284
+ return `${f.rule} { ${h} }`;
285
285
  } catch {
286
- return u.content;
286
+ return f.content;
287
287
  }
288
288
  case "rule":
289
- if (!u.selector || !u.content)
289
+ if (!f.selector || !f.content)
290
290
  return "";
291
- const f = a(u.selector);
292
- return f.trim() ? `${f} { ${u.content} }` : "";
291
+ const u = a(f.selector);
292
+ return u.trim() ? `${u} { ${f.content} }` : "";
293
293
  default:
294
294
  return "";
295
295
  }
296
- }).filter((u) => u.trim()).join(" "), l = (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();
296
+ }).filter((f) => f.trim()).join(" "), l = (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();
297
297
  try {
298
298
  const c = n.replace(/\/\*(?!\s*!)[\s\S]*?\*\//g, "").replace(/^\s+|\s+$/gm, "").replace(/\n\s*\n/g, `
299
- `), u = t(c), f = o(u);
300
- return l(f);
299
+ `), f = t(c), u = o(f);
300
+ return l(u);
301
301
  } catch (c) {
302
302
  return console.error("CSS scoping failed:", c), console.error("Input CSS:", n), n.replace(/\/\*[\s\S]*?\*\//g, "").replace(
303
303
  /(@keyframes\s+[^{]+\s*{[^{}]*(?:{[^}]*}[^{}]*)*})/g,
304
- (u) => u
305
- ).replace(/([^{}@]+)(?=\s*{)/g, (u) => {
306
- const f = u.trim();
307
- return !f || f.startsWith("@") || f.includes(`[${e}]`) || s(f) ? u : `${f}[${e}]`;
304
+ (f) => f
305
+ ).replace(/([^{}@]+)(?=\s*{)/g, (f) => {
306
+ const u = f.trim();
307
+ return !u || u.startsWith("@") || u.includes(`[${e}]`) || s(u) ? f : `${u}[${e}]`;
308
308
  });
309
309
  }
310
310
  }
311
+ const mt = 750;
312
+ function gt(n, e, t) {
313
+ let s;
314
+ typeof n < "u" ? s = n.innerWidth || n.document.documentElement.clientWidth : (console.warn("无法获取屏幕宽度,使用默认值375"), s = 375);
315
+ const r = t || mt;
316
+ return e * s / r;
317
+ }
318
+ function yt(n, e) {
319
+ let t = !1, s = !1, r = !1, i = "";
320
+ for (let a = 0; a < e.length; a++) {
321
+ const o = e[a];
322
+ if (o === "'" && !s && !r ? t = !t : o === '"' && !t && !r ? s = !s : e.substr(a, 4).toLowerCase() === "url(" && !t && !s ? r = !0 : o === ")" && r && (r = !1), !t && !s && !r) {
323
+ const l = e.substr(a).match(/^(-?\d+(?:\.\d+)?)\s*rpx/);
324
+ if (l) {
325
+ const c = l[1], f = parseFloat(c), p = `${gt(n, f).toFixed(6).replace(/\.?0+$/, "")}px`;
326
+ i += p, a += l[0].length - 1;
327
+ continue;
328
+ }
329
+ }
330
+ i += o;
331
+ }
332
+ return i;
333
+ }
311
334
  function Ie(n) {
312
335
  return I(n) ? n : JSON.stringify(n);
313
336
  }
314
337
  function fe(n, e, t, s = !1) {
315
- const r = n.CSSStyleSheet, i = s ? `data-v-${e}` : e, a = s ? ht(t, i) : t;
338
+ const r = n.CSSStyleSheet, i = s ? `data-v-${e}` : e, a = n.__uniConfig ? yt(n, t) : t, o = s ? ht(a, i) : a;
316
339
  if (r.prototype.replaceSync) {
317
- const o = new r();
318
- o.id = e, o.replaceSync(a);
319
- const l = n.document, c = l.adoptedStyleSheets, u = Array.from(c).filter(
320
- (f) => f.id !== e
340
+ const l = new r();
341
+ l.id = e, l.replaceSync(o);
342
+ const c = n.document, f = c.adoptedStyleSheets, u = Array.from(f).filter(
343
+ (p) => p.id !== e
321
344
  );
322
- l.adoptedStyleSheets = [...u, o];
345
+ c.adoptedStyleSheets = [...u, l];
323
346
  } else {
324
- const o = n.document;
325
- let l = o.getElementById(e);
326
- l ? l.innerHTML = a : (l = o.createElement("style"), l.id = e, l.innerHTML = a, o.head.appendChild(l));
347
+ const l = n.document;
348
+ let c = l.getElementById(e);
349
+ c ? c.innerHTML = o : (c = l.createElement("style"), c.id = e, c.innerHTML = o, l.head.appendChild(c));
327
350
  }
328
351
  }
329
- function $s(n) {
352
+ function js(n) {
330
353
  const e = n.adoptedStyleSheets || [];
331
354
  let t = "";
332
355
  if (e.forEach((s) => {
@@ -342,7 +365,7 @@ function $s(n) {
342
365
  s.textContent = t, n.head.appendChild(s);
343
366
  }
344
367
  }
345
- async function mt(n, e) {
368
+ async function vt(n, e) {
346
369
  const t = await window.fetch(e).then((s) => s.text()).catch(() => "");
347
370
  t && fe(window, n, t);
348
371
  }
@@ -362,34 +385,34 @@ async function Fe(n, e, t = window) {
362
385
  const c = s.createElement("script");
363
386
  c.src = l, c.onload = () => {
364
387
  i = t[e], i ? a(i.default || i) : o(null);
365
- }, c.onerror = (u) => {
366
- o(u);
388
+ }, c.onerror = (f) => {
389
+ o(f);
367
390
  }, r.appendChild(c);
368
391
  }
369
392
  });
370
393
  }
371
- function gt(n) {
394
+ function _t(n) {
372
395
  return q(n) && Object.getOwnPropertyNames(n.prototype || {}).length === 0 || q(n?.install);
373
396
  }
374
- function vt(n) {
397
+ function wt(n) {
375
398
  return ct.includes(n);
376
399
  }
377
- function yt(n) {
400
+ function St(n) {
378
401
  return at.includes(n);
379
402
  }
380
- function H(n = window) {
403
+ function D(n = window) {
381
404
  const e = window?.Mock;
382
405
  if (e) return e;
383
406
  const t = n?.Mock;
384
407
  if (t && window)
385
408
  return window.Mock = t, t;
386
409
  }
387
- function bs(n, e, t) {
410
+ function Rs(n, e, t) {
388
411
  Object.assign(e.meta, t.meta);
389
412
  const s = n?._container;
390
413
  t?.type === "page" && s.classList.add("is-page"), t?.pure && s.classList.add("is-pure");
391
414
  }
392
- function x(n, e, t = !1, s = !1, r = !1) {
415
+ function H(n, e, t = !1, s = !1, r = !1) {
393
416
  try {
394
417
  const i = ['"use strict";', "var __self = arguments[0];"];
395
418
  i.push("return ");
@@ -401,13 +424,13 @@ ${a}
401
424
  ` : `with(${t ? "{}" : "$scope || {}"}) { ${a} }`;
402
425
  return new Function("$scope", o)(e);
403
426
  } catch (i) {
404
- if (M.error("parseExpression.error", i, n, e?.__self ?? e), s)
427
+ if (O.error("parseExpression.error", i, n, e?.__self ?? e), s)
405
428
  throw i;
406
429
  }
407
430
  }
408
431
  function R(n, e, t = !1, s = !1, r = !1) {
409
- const i = x(n, e, t, s, r);
410
- if (typeof i != "function" && (M.error(
432
+ const i = H(n, e, t, s, r);
433
+ if (typeof i != "function" && (O.error(
411
434
  "parseFunction.error",
412
435
  "not a function",
413
436
  n,
@@ -416,19 +439,19 @@ function R(n, e, t = !1, s = !1, r = !1) {
416
439
  throw new Error(`"${n.value}" not a function`);
417
440
  return i;
418
441
  }
419
- function E(n) {
442
+ function j(n) {
420
443
  return n && n.type === "JSExpression";
421
444
  }
422
445
  function b(n) {
423
446
  return typeof n == "object" && n && n.type === "JSFunction";
424
447
  }
425
- function _t(n) {
426
- return E(n) || b(n);
448
+ function $t(n) {
449
+ return j(n) || b(n);
427
450
  }
428
- function js(n) {
429
- return _t(n) ? n.value : JSON.stringify(n);
451
+ function Ps(n) {
452
+ return $t(n) ? n.value : JSON.stringify(n);
430
453
  }
431
- const wt = {
454
+ const bt = {
432
455
  session: !1,
433
456
  authKey: "Authorization",
434
457
  storageKey: "ACCESS_STORAGE",
@@ -441,7 +464,7 @@ const wt = {
441
464
  noPermissionMessage: "无权限访问该页面",
442
465
  appName: "",
443
466
  statusKey: "code"
444
- }, Me = Symbol("access");
467
+ }, Oe = Symbol("access");
445
468
  class pe {
446
469
  options;
447
470
  data = null;
@@ -449,7 +472,7 @@ class pe {
449
472
  interceptResponse = !0;
450
473
  isTipShowing = !1;
451
474
  constructor(e) {
452
- this.options = Object.assign({}, wt, e), this.loadData();
475
+ this.options = Object.assign({}, bt, e), this.loadData();
453
476
  }
454
477
  enableIntercept() {
455
478
  this.interceptResponse = !0;
@@ -486,14 +509,14 @@ class pe {
486
509
  }
487
510
  can(e) {
488
511
  const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
489
- return typeof e == "function" ? e(s) : ye(e).every((i) => s[i] || s[t + "." + i]);
512
+ return typeof e == "function" ? e(s) : ve(e).every((i) => s[i] || s[t + "." + i]);
490
513
  }
491
514
  some(e) {
492
515
  const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
493
- return ye(e).some((i) => s[i] || s[t + "." + i]);
516
+ return ve(e).some((i) => s[i] || s[t + "." + i]);
494
517
  }
495
518
  install(e) {
496
- e.config.globalProperties.$access = this, e.provide(Me, this);
519
+ e.config.globalProperties.$access = this, e.provide(Oe, this);
497
520
  }
498
521
  isAuthPath(e) {
499
522
  const { auth: t, isAuth: s } = this.options;
@@ -544,7 +567,7 @@ class pe {
544
567
  return e && t ? !!Y.get(t) : !!this.getToken();
545
568
  }
546
569
  hasRoutePermission(e) {
547
- if (e.name === D) {
570
+ if (e.name === x) {
548
571
  const t = e.params.id;
549
572
  return t && this.can(t);
550
573
  }
@@ -598,10 +621,10 @@ class pe {
598
621
  );
599
622
  }
600
623
  }
601
- function St() {
602
- return Pe(Me, null);
624
+ function Et() {
625
+ return Pe(Oe, null);
603
626
  }
604
- function Es(n = {}) {
627
+ function Cs(n = {}) {
605
628
  const {
606
629
  notify: e,
607
630
  loading: t,
@@ -613,16 +636,16 @@ function Es(n = {}) {
613
636
  } = n;
614
637
  let l = null;
615
638
  return {
616
- request: Ee({
639
+ request: je({
617
640
  settings: {
618
641
  type: "form",
619
642
  validSuccess: !0,
620
643
  originResponse: !1,
621
644
  loading: !0,
622
- validate: (u) => u.data?.code === 0 || !!u.data?.success,
645
+ validate: (f) => f.data?.code === 0 || !!f.data?.success,
623
646
  failMessage: !0,
624
- showError: (u) => {
625
- e && e(u || "未知错误");
647
+ showError: (f) => {
648
+ e && e(f || "未知错误");
626
649
  },
627
650
  showLoading: () => {
628
651
  l && l.close(), t && (l = t());
@@ -642,10 +665,10 @@ function Es(n = {}) {
642
665
  access: i ? new pe({ alert: o, ...i }) : void 0
643
666
  };
644
667
  }
645
- function Rs(n = {}) {
668
+ function As(n = {}) {
646
669
  return new pe(n);
647
670
  }
648
- function $t(n, e) {
671
+ function jt(n, e) {
649
672
  const { jsonp: t, request: s } = e;
650
673
  if (n.method === "jsonp")
651
674
  return (r = {}) => t(n.url, {
@@ -653,7 +676,7 @@ function $t(n, e) {
653
676
  query: r
654
677
  });
655
678
  {
656
- const r = n.headers ? x(n.headers, {}, !0) : void 0, i = {
679
+ const r = n.headers ? H(n.headers, {}, !0) : void 0, i = {
657
680
  url: n.url,
658
681
  method: n.method,
659
682
  settings: {
@@ -661,10 +684,10 @@ function $t(n, e) {
661
684
  headers: r
662
685
  }
663
686
  };
664
- return (a, o) => (delete i.data, s.send(Qe(i, o || {}, { data: a })));
687
+ return (a, o) => (delete i.data, s.send(We(i, o || {}, { data: a })));
665
688
  }
666
689
  }
667
- function bt(n, e) {
690
+ function Rt(n, e) {
668
691
  const { metaQuery: t } = e;
669
692
  if (!t) return;
670
693
  const { code: s, queryCode: r } = n;
@@ -676,42 +699,42 @@ function bt(n, e) {
676
699
  return t(s, r, i, a);
677
700
  };
678
701
  }
679
- function jt(n = [], e = [], t) {
702
+ function Pt(n = [], e = [], t) {
680
703
  const s = {};
681
704
  for (const r of n) {
682
- const i = $t(r, t);
705
+ const i = jt(r, t);
683
706
  s[r.id] = i, s[r.name] = i;
684
707
  }
685
708
  for (const r of e)
686
- s[r.id] = bt(r, t);
709
+ s[r.id] = Rt(r, t);
687
710
  return s;
688
711
  }
689
- async function Et(n = [], e = window) {
690
- const t = H(e);
691
- t && (Oe(e), n.forEach((s) => Pt(t, s)));
712
+ async function Ct(n = [], e = window) {
713
+ const t = D(e);
714
+ t && (Me(e), n.forEach((s) => It(t, s)));
692
715
  }
693
- function Rt(n, e = window) {
694
- const t = b(n.mockTemplate) && n.mockTemplate.value ? R(n.mockTemplate, {}, !0) : void 0, s = H(e);
716
+ function At(n, e = window) {
717
+ const t = b(n.mockTemplate) && n.mockTemplate.value ? R(n.mockTemplate, {}, !0) : void 0, s = D(e);
695
718
  return async (...r) => {
696
719
  let i = {};
697
720
  if (t)
698
721
  try {
699
722
  i = await t.apply(t, r);
700
723
  } catch (a) {
701
- M.warn("模拟数据模版异常", a);
724
+ O.warn("模拟数据模版异常", a);
702
725
  }
703
726
  return s?.mock(i);
704
727
  };
705
728
  }
706
- function Pt(n, e) {
729
+ function It(n, e) {
707
730
  if (!e.mock) return;
708
731
  const { url: t, mockTemplate: s } = e;
709
732
  if (t && s)
710
733
  try {
711
- const r = se(t) ? new URL(t).pathname : t, i = We(`(.*)${r}(.*)`), a = Xe(r, { decode: decodeURIComponent }), o = x(s, {}, !0);
734
+ const r = se(t) ? new URL(t).pathname : t, i = Qe(`(.*)${r}(.*)`), a = Xe(r, { decode: decodeURIComponent }), o = H(s, {}, !0);
712
735
  n.mock(i, (l) => {
713
- const c = F.parse(l.url) || {}, u = l.body instanceof FormData ? Ye(l.body) : l.body, f = se(l.url) ? new URL(l.url).pathname : l.url.split("?")[0], p = a(f)?.params;
714
- Object.assign(l, { data: u, params: p, query: c });
736
+ const c = F.parse(l.url) || {}, f = l.body instanceof FormData ? Ye(l.body) : l.body, u = se(l.url) ? new URL(l.url).pathname : l.url.split("?")[0], p = a(u)?.params;
737
+ Object.assign(l, { data: f, params: p, query: c });
715
738
  try {
716
739
  return n.mock(o(l));
717
740
  } catch (h) {
@@ -722,11 +745,11 @@ function Pt(n, e) {
722
745
  console.warn("mockApi", r);
723
746
  }
724
747
  }
725
- function Oe(n = window) {
726
- const e = H(n);
748
+ function Me(n = window) {
749
+ const e = D(n);
727
750
  e && (e._mocked = {});
728
751
  }
729
- class Ct {
752
+ class kt {
730
753
  __id = null;
731
754
  __mode;
732
755
  __instance = null;
@@ -756,7 +779,7 @@ class Ct {
756
779
  const { mode: t, dsl: s, attrs: r } = e;
757
780
  this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), r && Object.assign(this, r);
758
781
  }
759
- setup(e, t = z) {
782
+ setup(e, t = G) {
760
783
  const s = t.getCurrentInstance();
761
784
  if (!s) return;
762
785
  this.__refs = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = s.proxy;
@@ -794,9 +817,9 @@ class Ct {
794
817
  if (e)
795
818
  if (this.__mode === w.Runtime) {
796
819
  const { id: t, type: s } = e, r = t ? this.__transform[t] ?? e.value : e.value;
797
- return x({ type: s, value: r }, this);
820
+ return H({ type: s, value: r }, this);
798
821
  } else
799
- return x(e, this);
822
+ return H(e, this);
800
823
  }
801
824
  __ref(e = null, t) {
802
825
  if (this.__mode !== w.VNode)
@@ -828,7 +851,7 @@ class Ct {
828
851
  }
829
852
  function oe(n) {
830
853
  const {
831
- Vue: e = z,
854
+ Vue: e = G,
832
855
  mode: t = w.Runtime,
833
856
  components: s = {},
834
857
  libs: r = {},
@@ -838,27 +861,27 @@ function oe(n) {
838
861
  $components: s,
839
862
  $libs: r,
840
863
  $apis: i
841
- }, c = new Ct({
864
+ }, c = new kt({
842
865
  mode: t,
843
866
  dsl: o.value,
844
867
  attrs: l
845
- }), u = e.defineComponent({
868
+ }), f = e.defineComponent({
846
869
  name: o.value.name,
847
870
  __scopeId: o.value.id ? `data-v-${o.value.id}` : void 0,
848
871
  props: {
849
- ...It(o.value.props ?? [], c)
872
+ ...Ot(o.value.props ?? [], c)
850
873
  },
851
- setup(f) {
852
- c.$props = f, c.props = f, o.value.id && fe(
874
+ setup(u) {
875
+ c.$props = u, c.props = u, o.value.id && fe(
853
876
  n.window || window,
854
877
  o.value.id,
855
878
  o.value.css || "",
856
879
  !0
857
- ), c.state = kt(e, o.value.state ?? {}, c);
858
- const p = Ft(e, o.value.computed ?? {}, c), h = Mt(o.value.methods ?? {}, c), d = Ot(e, o.value.inject, c);
859
- for (const [v, _] of Object.entries(d || {}))
860
- d[v] = e.inject(v, _);
861
- const m = Tt(
880
+ ), c.state = Mt(e, o.value.state ?? {}, c);
881
+ const p = Tt(e, o.value.computed ?? {}, c), h = xt(o.value.methods ?? {}, c), d = Dt(e, o.value.inject, c);
882
+ for (const [y, _] of Object.entries(d || {}))
883
+ d[y] = e.inject(y, _);
884
+ const m = Ht(
862
885
  o.value.dataSources || {},
863
886
  c
864
887
  ), g = {
@@ -867,33 +890,33 @@ function oe(n) {
867
890
  ...h,
868
891
  ...m
869
892
  };
870
- return c.setup(g, e), Dt(e, o.value.watch ?? [], c), {
893
+ return c.setup(g, e), Bt(e, o.value.watch ?? [], c), {
871
894
  vtj: c,
872
895
  state: c.state,
873
896
  ...p,
874
897
  ...h
875
898
  };
876
899
  },
877
- emits: At(o.value.emits),
900
+ emits: Ft(o.value.emits),
878
901
  expose: ["vtj", ...o.value.expose || []],
879
902
  render() {
880
903
  if (!o.value.nodes) return null;
881
- const f = o.value.nodes || [];
882
- return f.length === 1 ? O(f[0], c, e, a, f) : f.map(
883
- (p) => O(p, c, e, a, f)
904
+ const u = o.value.nodes || [];
905
+ return u.length === 1 ? M(u[0], c, e, a, u) : u.map(
906
+ (p) => M(p, c, e, a, u)
884
907
  );
885
908
  },
886
- ...Ht(o.value.lifeCycles ?? {}, c)
909
+ ...Lt(o.value.lifeCycles ?? {}, c)
887
910
  });
888
911
  return {
889
- renderer: e.markRaw(u),
912
+ renderer: e.markRaw(f),
890
913
  context: c
891
914
  };
892
915
  }
893
- function At(n = []) {
916
+ function Ft(n = []) {
894
917
  return n.map((e) => I(e) ? e : e.name);
895
918
  }
896
- function It(n = [], e) {
919
+ function Ot(n = [], e) {
897
920
  const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) => ot[i]) : void 0;
898
921
  return n.map((s) => I(s) ? {
899
922
  name: s
@@ -901,7 +924,7 @@ function It(n = [], e) {
901
924
  name: s.name,
902
925
  type: s.type,
903
926
  required: s.required,
904
- default: E(s.default) ? e.__parseExpression(s.default) : s.default
927
+ default: j(s.default) ? e.__parseExpression(s.default) : s.default
905
928
  }).reduce(
906
929
  (s, r) => (s[r.name] = {
907
930
  type: t(r.type),
@@ -911,46 +934,46 @@ function It(n = [], e) {
911
934
  {}
912
935
  );
913
936
  }
914
- function kt(n, e, t) {
937
+ function Mt(n, e, t) {
915
938
  return n.reactive(
916
939
  Object.keys(e || {}).reduce(
917
940
  (s, r) => {
918
941
  let i = e[r];
919
- return E(i) ? i = t.__parseExpression(i) : b(i) && (i = t.__parseFunction(i)), s[r] = i, s;
942
+ return j(i) ? i = t.__parseExpression(i) : b(i) && (i = t.__parseFunction(i)), s[r] = i, s;
920
943
  },
921
944
  {}
922
945
  )
923
946
  );
924
947
  }
925
- function Ft(n, e, t) {
948
+ function Tt(n, e, t) {
926
949
  return Object.entries(e ?? {}).reduce(
927
950
  (s, [r, i]) => (s[r] = n.computed(t.__parseFunction(i)), s),
928
951
  {}
929
952
  );
930
953
  }
931
- function Mt(n, e) {
954
+ function xt(n, e) {
932
955
  return Object.entries(n ?? {}).reduce(
933
956
  (t, [s, r]) => (t[s] = e.__parseFunction(r), t),
934
957
  {}
935
958
  );
936
959
  }
937
- function Ot(n, e = [], t) {
960
+ function Dt(n, e = [], t) {
938
961
  return e.reduce(
939
962
  (s, r) => {
940
963
  const { name: i, from: a } = r || {};
941
964
  r.default;
942
- const o = E(a) ? t.__parseExpression(a) || i : a ?? i, l = E(r.default) ? t.__parseExpression(r.default) : r.default ?? null;
965
+ const o = j(a) ? t.__parseExpression(a) || i : a ?? i, l = j(r.default) ? t.__parseExpression(r.default) : r.default ?? null;
943
966
  return s[i] = n.inject(o, l), s;
944
967
  },
945
968
  {}
946
969
  );
947
970
  }
948
- function Tt(n, e) {
971
+ function Ht(n, e) {
949
972
  return Object.keys(n).reduce(
950
973
  (t, s) => {
951
974
  const r = n[s];
952
975
  if (r.type === "mock")
953
- t[s] = Rt(r);
976
+ t[s] = At(r);
954
977
  else if (r.ref) {
955
978
  const i = e.$apis[r.ref], a = b(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
956
979
  t[s] = async (...o) => {
@@ -963,7 +986,7 @@ function Tt(n, e) {
963
986
  {}
964
987
  );
965
988
  }
966
- function Dt(n, e = [], t) {
989
+ function Bt(n, e = [], t) {
967
990
  e.forEach((s) => {
968
991
  n.watch(
969
992
  t.__parseExpression(s.source),
@@ -975,7 +998,7 @@ function Dt(n, e = [], t) {
975
998
  );
976
999
  });
977
1000
  }
978
- function Ht(n, e) {
1001
+ function Lt(n, e) {
979
1002
  return Object.entries(n ?? {}).reduce(
980
1003
  (t, [s, r]) => {
981
1004
  const i = e.__parseFunction(r);
@@ -988,11 +1011,11 @@ function Ht(n, e) {
988
1011
  }
989
1012
  const Te = new Ze();
990
1013
  let Z = [], k = {};
991
- const xt = (n) => n;
992
- async function De(n, e = window) {
1014
+ const Nt = (n) => n;
1015
+ async function xe(n, e = window) {
993
1016
  const { urls: t = [], library: s } = n, r = t.filter((o) => V(o));
994
1017
  if (r.length === 0 || !s) return null;
995
- const i = t.filter((o) => G(o));
1018
+ const i = t.filter((o) => z(o));
996
1019
  return i.length && ke(i, e), await Fe(r, s, e).catch(
997
1020
  (o) => (console.warn("loadScriptUrl error", r, s, o), null)
998
1021
  );
@@ -1001,7 +1024,7 @@ function ae(n) {
1001
1024
  const { getDsl: e, getDslByUrl: t, options: s } = n;
1002
1025
  return s.window && (Z.forEach((r) => {
1003
1026
  delete s.window[r];
1004
- }), Z = []), (r, i, a = z) => {
1027
+ }), Z = []), (r, i, a = G) => {
1005
1028
  if (!i || typeof i == "string") return r;
1006
1029
  if (i.type === "Schema" && i.id)
1007
1030
  return a.defineAsyncComponent(async () => {
@@ -1032,7 +1055,7 @@ function ae(n) {
1032
1055
  let o = i.library ? k[i.library] : null;
1033
1056
  return o || (i.library && Z.push(i.library), o = k[i.library || Symbol()] = a.defineAsyncComponent(
1034
1057
  async () => {
1035
- const l = await De(i, s.window);
1058
+ const l = await xe(i, s.window);
1036
1059
  return l || (console.warn("getPlugin result is null", i), null);
1037
1060
  }
1038
1061
  ), o);
@@ -1040,56 +1063,56 @@ function ae(n) {
1040
1063
  return r;
1041
1064
  };
1042
1065
  }
1043
- function Ps() {
1066
+ function Is() {
1044
1067
  k = {}, Te.clearAllCache();
1045
1068
  }
1046
- function O(n, e, t = z, s = xt, r = [], i = !1) {
1069
+ function M(n, e, t = G, s = Nt, r = [], i = !1) {
1047
1070
  if (!n || !n.name || n.invisible) return null;
1048
- const a = t.getCurrentInstance()?.appContext, { id: o = null, directives: l = [] } = n, { vIf: c, vElseIf: u, vElse: f, vFor: p, vShow: h, vModels: d, vBind: m, vHtml: g, others: v } = He(l);
1049
- if (!i && (u || f))
1071
+ const a = t.getCurrentInstance()?.appContext, { id: o = null, directives: l = [] } = n, { vIf: c, vElseIf: f, vElse: u, vFor: p, vShow: h, vModels: d, vBind: m, vHtml: g, others: y } = De(l);
1072
+ if (!i && (f || u))
1050
1073
  return null;
1051
- if (c && !Lt(c, e))
1052
- return Jt(n, e, t, s, r);
1053
- const _ = (y, S = 0) => {
1054
- const P = y.$components, Q = (() => {
1074
+ if (c && !qt(c, e))
1075
+ return zt(n, e, t, s, r);
1076
+ const _ = (v, S = 0) => {
1077
+ const P = v.$components, W = (() => {
1055
1078
  if (n.name === "component")
1056
- return Nt(y, n.props?.is);
1079
+ return Jt(v, n.props?.is);
1057
1080
  if (n.name === "slot") return n.name;
1058
- const j = s(n.name, n.from, t);
1059
- if (I(j))
1060
- return vt(j) || yt(j) ? j : P[j] ?? a?.app?.component(j) ?? j;
1061
- if (et(j) && n.id) {
1062
- const ge = `Loader${n.id}_${S}`, ve = P[ge];
1063
- return ve || (P[ge] = j);
1081
+ const E = s(n.name, n.from, t);
1082
+ if (I(E))
1083
+ return wt(E) || St(E) ? E : P[E] ?? a?.app?.component(E) ?? E;
1084
+ if (et(E) && n.id) {
1085
+ const ge = `Loader${n.id}_${S}`, ye = P[ge];
1086
+ return ye || (P[ge] = E);
1064
1087
  }
1065
- return j;
1066
- })(), C = Ut(o, n.props ?? {}, y), qe = qt(t, n.events ?? {}, y);
1088
+ return E;
1089
+ })(), C = Kt(o, n.props ?? {}, v), qe = Gt(t, n.events ?? {}, v);
1067
1090
  if (n.name === "slot")
1068
- return Kt(t, n, C, y, s);
1069
- m && Object.assign(C, y.__parseExpression(m.value)), h && (C.style = Object.assign(
1091
+ return Vt(t, n, C, v, s);
1092
+ m && Object.assign(C, v.__parseExpression(m.value)), h && (C.style = Object.assign(
1070
1093
  C.style ?? {},
1071
- Gt(h, y)
1072
- )), g && Object.assign(C, Vt(g, y)), d.forEach((j) => {
1073
- Object.assign(C, Qt(t, j, y));
1094
+ Qt(h, v)
1095
+ )), g && Object.assign(C, Xt(g, v)), d.forEach((E) => {
1096
+ Object.assign(C, Yt(t, E, v));
1074
1097
  });
1075
- const Je = Wt(
1098
+ const Je = Zt(
1076
1099
  t,
1077
1100
  n.children ?? [],
1078
- y,
1101
+ v,
1079
1102
  s,
1080
1103
  n
1081
- ), he = y?.__id ? `data-v-${y.__id}` : void 0, Ke = he ? { [he]: "" } : {};
1082
- let W = t.createVNode(
1083
- Q,
1104
+ ), he = v?.__id ? `data-v-${v.__id}` : void 0, Ke = he ? { [he]: "" } : {};
1105
+ let Q = t.createVNode(
1106
+ W,
1084
1107
  { key: `${o}_${S}`, ...Ke, ...C, ...qe },
1085
1108
  Je
1086
1109
  );
1087
- const me = a ? Bt(a, v, y) : [];
1088
- return me.length && (W = t.withDirectives(W, me)), W;
1110
+ const me = a ? Ut(a, y, v) : [];
1111
+ return me.length && (Q = t.withDirectives(Q, me)), Q;
1089
1112
  };
1090
- return p ? Zt(p, _, e) : _(e);
1113
+ return p ? ss(p, _, e) : _(e);
1091
1114
  }
1092
- function Bt(n, e, t) {
1115
+ function Ut(n, e, t) {
1093
1116
  const s = n.app;
1094
1117
  return e.map((r) => {
1095
1118
  const i = typeof r.name == "string" ? s.directive(r.name) : t.__parseExpression(r.name);
@@ -1098,13 +1121,13 @@ function Bt(n, e, t) {
1098
1121
  return r.value && a.push(t.__parseExpression(r.value)), r.arg && a.push(r.arg), r.modifiers && a.push(r.modifiers), a;
1099
1122
  }).filter((r) => !!r);
1100
1123
  }
1101
- function He(n = []) {
1102
- const e = n.find((u) => A(u.name) === "vIf"), t = n.find(
1103
- (u) => A(u.name) === "vElseIf"
1104
- ), s = n.find((u) => A(u.name) === "vElse"), r = n.find((u) => A(u.name) === "vFor"), i = n.find((u) => A(u.name) === "vShow"), a = n.find((u) => A(u.name) === "vBind"), o = n.find((u) => A(u.name) === "vHtml"), l = n.filter(
1105
- (u) => A(u.name) === "vModel"
1124
+ function De(n = []) {
1125
+ const e = n.find((f) => A(f.name) === "vIf"), t = n.find(
1126
+ (f) => A(f.name) === "vElseIf"
1127
+ ), s = n.find((f) => A(f.name) === "vElse"), r = n.find((f) => A(f.name) === "vFor"), i = n.find((f) => A(f.name) === "vShow"), a = n.find((f) => A(f.name) === "vBind"), o = n.find((f) => A(f.name) === "vHtml"), l = n.filter(
1128
+ (f) => A(f.name) === "vModel"
1106
1129
  ), c = n.filter(
1107
- (u) => !it.includes(A(u.name))
1130
+ (f) => !it.includes(A(f.name))
1108
1131
  );
1109
1132
  return {
1110
1133
  vIf: e,
@@ -1118,18 +1141,18 @@ function He(n = []) {
1118
1141
  vHtml: o
1119
1142
  };
1120
1143
  }
1121
- function Lt(n, e) {
1144
+ function qt(n, e) {
1122
1145
  return !!e.__parseExpression(n.value);
1123
1146
  }
1124
- function Nt(n, e) {
1125
- return e ? E(e) ? n.__parseExpression(e) : e : "div";
1147
+ function Jt(n, e) {
1148
+ return e ? j(e) ? n.__parseExpression(e) : e : "div";
1126
1149
  }
1127
- function Ut(n, e, t) {
1150
+ function Kt(n, e, t) {
1128
1151
  const s = ce(e, t);
1129
1152
  return s.ref = t.__ref(n, s.ref), s;
1130
1153
  }
1131
1154
  function ce(n, e) {
1132
- return E(n) ? e.__parseExpression(n) : b(n) ? e.__parseFunction(n) : Array.isArray(n) ? n.map((t) => ce(t, e)) : typeof n == "object" ? Object.keys(n || {}).reduce(
1155
+ return j(n) ? e.__parseExpression(n) : b(n) ? e.__parseFunction(n) : Array.isArray(n) ? n.map((t) => ce(t, e)) : typeof n == "object" ? Object.keys(n || {}).reduce(
1133
1156
  (t, s) => {
1134
1157
  let r = n[s];
1135
1158
  return t[s] = ce(r, e), t;
@@ -1137,7 +1160,7 @@ function ce(n, e) {
1137
1160
  {}
1138
1161
  ) : n;
1139
1162
  }
1140
- function qt(n, e, t) {
1163
+ function Gt(n, e, t) {
1141
1164
  const s = ["passive", "capture", "once"], r = {
1142
1165
  capture: "Capture",
1143
1166
  once: "Once",
@@ -1145,88 +1168,88 @@ function qt(n, e, t) {
1145
1168
  };
1146
1169
  return Object.keys(e || {}).reduce(
1147
1170
  (i, a) => {
1148
- const o = e[a], l = xe(o.modifiers), c = l.find((p) => s.includes(p)), u = "on" + tt(a) + (c && r[c] || ""), f = t.__parseFunction(o.handler);
1149
- return f && (i[u] = n.withModifiers(f, l)), i;
1171
+ const o = e[a], l = He(o.modifiers), c = l.find((p) => s.includes(p)), f = "on" + tt(a) + (c && r[c] || ""), u = t.__parseFunction(o.handler);
1172
+ return u && (i[f] = n.withModifiers(u, l)), i;
1150
1173
  },
1151
1174
  {}
1152
1175
  );
1153
1176
  }
1154
- function Jt(n, e, t, s, r = []) {
1177
+ function zt(n, e, t, s, r = []) {
1155
1178
  let i = r.findIndex((a) => a.id === n.id);
1156
1179
  for (let a = ++i; a < r.length; a++) {
1157
- const { directives: o = [] } = r[a], { vElseIf: l, vElse: c } = He(o);
1180
+ const { directives: o = [] } = r[a], { vElseIf: l, vElse: c } = De(o);
1158
1181
  if (l) {
1159
1182
  if (e.__parseExpression(l.value))
1160
- return O(r[a], e, t, s, r, !0);
1183
+ return M(r[a], e, t, s, r, !0);
1161
1184
  continue;
1162
1185
  }
1163
1186
  if (c)
1164
- return O(r[a], e, t, s, r, !0);
1187
+ return M(r[a], e, t, s, r, !0);
1165
1188
  }
1166
1189
  return null;
1167
1190
  }
1168
- function xe(n = {}, e = !1) {
1191
+ function He(n = {}, e = !1) {
1169
1192
  const t = Object.keys(n);
1170
1193
  return e ? t.map((s) => "." + s) : t;
1171
1194
  }
1172
- function Kt(n, e, t, s, r) {
1173
- const { children: i } = e, a = zt(e, s), o = s.$slots?.[a.name];
1174
- return o ? o(t) : i ? I(i) ? n.createTextVNode(i) : E(i) ? n.createTextVNode(
1195
+ function Vt(n, e, t, s, r) {
1196
+ const { children: i } = e, a = Wt(e, s), o = s.$slots?.[a.name];
1197
+ return o ? o(t) : i ? I(i) ? n.createTextVNode(i) : j(i) ? n.createTextVNode(
1175
1198
  Ie(s.__parseExpression(i))
1176
1199
  ) : Array.isArray(i) ? i.map(
1177
- (l) => O(l, s, n, r, i)
1200
+ (l) => M(l, s, n, r, i)
1178
1201
  ) : null : null;
1179
1202
  }
1180
- function zt(n, e) {
1203
+ function Wt(n, e) {
1181
1204
  const { props: t } = n, s = t?.name || "default";
1182
1205
  return {
1183
- name: E(s) ? e.__parseExpression(s) : s,
1206
+ name: j(s) ? e.__parseExpression(s) : s,
1184
1207
  params: []
1185
1208
  };
1186
1209
  }
1187
- function Gt(n, e) {
1210
+ function Qt(n, e) {
1188
1211
  return e.__parseExpression(n.value) ? {} : {
1189
1212
  display: "none"
1190
1213
  };
1191
1214
  }
1192
- function Vt(n, e) {
1215
+ function Xt(n, e) {
1193
1216
  return {
1194
1217
  innerHTML: e.__parseExpression(n.value) || ""
1195
1218
  };
1196
1219
  }
1197
- function Qt(n, e, t) {
1220
+ function Yt(n, e, t) {
1198
1221
  const s = {
1199
1222
  type: "JSFunction",
1200
1223
  value: e.value?.value ? `(v) => {
1201
1224
  ${e.value.value} = v;
1202
1225
  }` : "(v) => {}"
1203
- }, r = t.__parseFunction(s), i = xe(
1204
- E(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
1205
- ), a = E(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
1226
+ }, r = t.__parseFunction(s), i = He(
1227
+ j(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
1228
+ ), a = j(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
1206
1229
  return {
1207
1230
  [a]: t.__parseExpression(e.value),
1208
1231
  [`onUpdate:${a}`]: i.length && r ? n.withModifiers(r, i) : r
1209
1232
  };
1210
1233
  }
1211
- function Wt(n, e, t, s, r) {
1234
+ function Zt(n, e, t, s, r) {
1212
1235
  if (!e) return null;
1213
1236
  if (I(e))
1214
1237
  return { default: () => e };
1215
- if (E(e))
1238
+ if (j(e))
1216
1239
  return {
1217
1240
  default: () => Ie(t.__parseExpression(e))
1218
1241
  };
1219
1242
  if (Array.isArray(e) && e.length > 0) {
1220
- const i = Xt(e), a = (o, l) => !o || !r ? {} : r?.id && Object.keys(o).length ? l ? {
1243
+ const i = es(e), a = (o, l) => !o || !r ? {} : r?.id && Object.keys(o).length ? l ? {
1221
1244
  [l]: o
1222
1245
  } : {
1223
1246
  [`scope_${r.id}`]: o
1224
1247
  } : l ? { [l]: /* @__PURE__ */ Object.create(null) } : {};
1225
1248
  return Object.entries(i).reduce(
1226
- (o, [l, { nodes: c, params: u, scope: f }]) => (o[l] = (p) => {
1227
- const h = u.length ? st(p ?? {}, u) : a(p, f);
1249
+ (o, [l, { nodes: c, params: f, scope: u }]) => (o[l] = (p) => {
1250
+ const h = f.length ? st(p ?? {}, f) : a(p, u);
1228
1251
  return c.map(
1229
- (d) => O(d, t.__clone(h), n, s, c)
1252
+ (d) => M(d, t.__clone(h), n, s, c)
1230
1253
  );
1231
1254
  }, o),
1232
1255
  {}
@@ -1234,10 +1257,10 @@ function Wt(n, e, t, s, r) {
1234
1257
  }
1235
1258
  return null;
1236
1259
  }
1237
- function Xt(n) {
1260
+ function es(n) {
1238
1261
  const e = {};
1239
1262
  for (const t of n) {
1240
- const s = Yt(t.slot), r = s.name;
1263
+ const s = ts(t.slot), r = s.name;
1241
1264
  e[r] ? (e[r].nodes.push(t), e[r].params = e[r].params.concat(s.params), e[r].scope = s.scope || "") : e[r] = {
1242
1265
  nodes: [t],
1243
1266
  params: s.params,
@@ -1246,10 +1269,10 @@ function Xt(n) {
1246
1269
  }
1247
1270
  return e;
1248
1271
  }
1249
- function Yt(n = "default") {
1272
+ function ts(n = "default") {
1250
1273
  return I(n) ? { name: n, params: [], scope: "" } : { params: [], scope: "", ...n };
1251
1274
  }
1252
- function Zt(n, e, t) {
1275
+ function ss(n, e, t) {
1253
1276
  const { value: s, iterator: r } = n, { item: i = "item", index: a = "index" } = r || {};
1254
1277
  let o = t.__parseExpression(s) || [];
1255
1278
  return Number.isInteger(o) && (o = new Array(o).fill(!0).map((l, c) => c + 1)), Array.isArray(o) ? o.map((l, c) => e(t.__clone({ [i]: l, [a]: c }), c)) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
@@ -1283,7 +1306,7 @@ const ee = Ce({
1283
1306
  activated() {
1284
1307
  this.meta.cache === !1 && (this.sid = Symbol());
1285
1308
  }
1286
- }), es = Ce({
1309
+ }), ns = Ce({
1287
1310
  name: "VtjStartupContainer",
1288
1311
  render() {
1289
1312
  return re("div", "page not found!");
@@ -1292,12 +1315,12 @@ const ee = Ce({
1292
1315
  function K(n, e, t = []) {
1293
1316
  const s = [];
1294
1317
  for (const r of t) {
1295
- const { id: i, title: a, icon: o, children: l, hidden: c, layout: u } = r;
1296
- if (u) {
1297
- const f = K(n, e, l || []);
1298
- s.push(...f);
1318
+ const { id: i, title: a, icon: o, children: l, hidden: c, layout: f } = r;
1319
+ if (f) {
1320
+ const u = K(n, e, l || []);
1321
+ s.push(...u);
1299
1322
  } else {
1300
- const f = {
1323
+ const u = {
1301
1324
  id: i,
1302
1325
  title: a,
1303
1326
  icon: o,
@@ -1305,7 +1328,7 @@ function K(n, e, t = []) {
1305
1328
  url: `${n}/${e}/${i}`,
1306
1329
  children: l && l.length ? K(n, e, l) : void 0
1307
1330
  };
1308
- s.push(f);
1331
+ s.push(u);
1309
1332
  }
1310
1333
  }
1311
1334
  return s;
@@ -1321,32 +1344,32 @@ function Be(n, e) {
1321
1344
  e.can(s.id.toString()) && t.push(s);
1322
1345
  return t;
1323
1346
  }
1324
- function Cs(n) {
1347
+ function ks(n) {
1325
1348
  const {
1326
1349
  menuPathPrefix: e = "",
1327
1350
  pageRouteName: t = "page",
1328
1351
  disableMenusFilter: s = !1
1329
- } = n || {}, r = Ne(), i = Ae(), a = St(), o = ie(!1), l = ie(!1), c = r.project, u = (h, d) => {
1352
+ } = n || {}, r = Ne(), i = Ae(), a = Et(), o = ie(!1), l = ie(!1), c = r.project, f = (h, d) => {
1330
1353
  o.value = !h?.mask, l.value = d?.pure ?? !!h?.pure;
1331
1354
  };
1332
1355
  rt(() => {
1333
1356
  const { name: h, params: d, meta: m } = i;
1334
- if (h === D) {
1357
+ if (h === x) {
1335
1358
  const g = r.getPage(d.id);
1336
- u(g, m);
1359
+ f(g, m);
1337
1360
  } else if (h === N) {
1338
1361
  const g = r.getHomepage();
1339
- u(g, m);
1362
+ f(g, m);
1340
1363
  } else {
1341
1364
  const g = m.__vtj__;
1342
1365
  if (g) {
1343
- const v = r.getPage(g);
1344
- u(v, m);
1366
+ const y = r.getPage(g);
1367
+ f(y, m);
1345
1368
  } else
1346
1369
  o.value = !m.mask, l.value = !!m.pure;
1347
1370
  }
1348
1371
  });
1349
- const f = K(
1372
+ const u = K(
1350
1373
  e,
1351
1374
  t,
1352
1375
  c?.pages
@@ -1356,7 +1379,7 @@ function Cs(n) {
1356
1379
  logo: p?.logo,
1357
1380
  themeSwitchable: p?.themeSwitchable,
1358
1381
  title: p?.title || c?.description || c?.name || "VTJ App",
1359
- menus: s ? f : Be(f, a),
1382
+ menus: s ? u : Be(u, a),
1360
1383
  pure: l
1361
1384
  };
1362
1385
  }
@@ -1385,7 +1408,7 @@ function le(n) {
1385
1408
  homepage: o
1386
1409
  } = n, l = [];
1387
1410
  for (const c of s) {
1388
- const { id: u, title: f, dir: p, layout: h, children: d, meta: m } = c;
1411
+ const { id: f, title: u, dir: p, layout: h, children: d, meta: m } = c;
1389
1412
  if (p) {
1390
1413
  const g = le({
1391
1414
  name: e,
@@ -1406,38 +1429,38 @@ function le(n) {
1406
1429
  homepage: o,
1407
1430
  loader: i,
1408
1431
  pages: d || []
1409
- }), v = {
1410
- name: `layout_${u}`,
1432
+ }), y = {
1433
+ name: `layout_${f}`,
1411
1434
  path: t,
1412
- component: () => i(u),
1435
+ component: () => i(f),
1413
1436
  meta: {
1414
- title: f,
1437
+ title: u,
1415
1438
  ...a,
1416
1439
  ...m,
1417
- __vtj__: u
1440
+ __vtj__: f
1418
1441
  },
1419
1442
  children: g
1420
1443
  };
1421
- l.push(v), l.push(te(c, n));
1422
- } else if (l.push(te(c, n)), o === u) {
1444
+ l.push(y), l.push(te(c, n));
1445
+ } else if (l.push(te(c, n)), o === f) {
1423
1446
  const g = te(c, n);
1424
- g.path = "", g.name = `home_${u}`, l.push(g);
1447
+ g.path = "", g.name = `home_${f}`, l.push(g);
1425
1448
  }
1426
1449
  }
1427
1450
  return l;
1428
1451
  }
1429
- function ts(n = {}, e) {
1430
- const { css: t, store: s, enhance: r } = n, { window: i, app: a, library: o = {}, adapter: l, mode: c } = e, { Pinia: u } = o;
1431
- a.config.globalProperties.$libs = o, fe(i, "global-css", t || ""), u && s && ss(s, a, u), rs(a, l, n), !l.access && n.access && ns(n.access, a, c, l), is(a, n), r && os(r, a, o);
1452
+ function rs(n = {}, e) {
1453
+ const { css: t, store: s, enhance: r } = n, { window: i, app: a, library: o = {}, adapter: l, mode: c } = e, { Pinia: f } = o;
1454
+ a.config.globalProperties.$libs = o, fe(i, "global-css", t || ""), f && s && is(s, a, f), as(a, l, n), !l.access && n.access && os(n.access, a, c, l), cs(a, n), r && ls(r, a, o);
1432
1455
  }
1433
- function ss(n, e, t) {
1456
+ function is(n, e, t) {
1434
1457
  const s = t.createPinia();
1435
1458
  if (e.use(s), b(n) && n.value) {
1436
1459
  const r = R(n, {}, !1, !1, !0), i = t.defineStore("$store", r(e) || {});
1437
1460
  e.config.globalProperties.$store = i();
1438
1461
  }
1439
1462
  }
1440
- function ns(n, e, t, s) {
1463
+ function os(n, e, t, s) {
1441
1464
  if (b(n) && n.value) {
1442
1465
  const r = R(n, {}, !1, !1, !0), { alert: i, request: a } = s, o = new pe({
1443
1466
  alert: i,
@@ -1447,7 +1470,7 @@ function ns(n, e, t, s) {
1447
1470
  o.connect({ mode: t, router: l, request: a }), e.use(o);
1448
1471
  }
1449
1472
  }
1450
- function rs(n, e, t) {
1473
+ function as(n, e, t) {
1451
1474
  if (!e.request) return;
1452
1475
  const { axios: s, request: r, response: i } = t;
1453
1476
  if (s && b(s) && s.value) {
@@ -1463,7 +1486,7 @@ function rs(n, e, t) {
1463
1486
  o.__unRes && o.__unRes(), o.__unRes = e.request.useResponse((l) => a(l, n));
1464
1487
  }
1465
1488
  }
1466
- function is(n, e) {
1489
+ function cs(n, e) {
1467
1490
  const { beforeEach: t, afterEach: s } = e, r = n.config.globalProperties.$router;
1468
1491
  if (t && b(t) && t.value) {
1469
1492
  const i = R(t, {}, !1, !1, !0);
@@ -1474,18 +1497,18 @@ function is(n, e) {
1474
1497
  r && r.afterEach((a, o, l) => i(a, o, l, n));
1475
1498
  }
1476
1499
  }
1477
- function os(n, e, t = {}) {
1500
+ function ls(n, e, t = {}) {
1478
1501
  b(n) && n.value && R(n, {}, !1, !1, !0)(e, t);
1479
1502
  }
1480
- function as(n, e, t) {
1503
+ function us(n, e, t) {
1481
1504
  if (!n || !e || !t) return;
1482
1505
  const { VueI18n: s } = e;
1483
1506
  if (s) {
1484
1507
  const { locale: r, fallbackLocale: i, messages: a = [] } = t, o = {};
1485
1508
  for (let c of a) {
1486
- const u = Object.keys(c).filter((f) => f !== "key");
1487
- for (const f of u)
1488
- o[f] || (o[f] = {}), o[f][c.key] = c[f];
1509
+ const f = Object.keys(c).filter((u) => u !== "key");
1510
+ for (const u of f)
1511
+ o[u] || (o[u] = {}), o[u][c.key] = c[u];
1489
1512
  }
1490
1513
  const l = s.createI18n({
1491
1514
  legacy: !1,
@@ -1497,8 +1520,8 @@ function as(n, e, t) {
1497
1520
  }
1498
1521
  }
1499
1522
  const Le = Symbol("Provider");
1500
- var cs = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(cs || {});
1501
- class ls extends ze {
1523
+ var fs = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(fs || {});
1524
+ class ps extends Ge {
1502
1525
  // DSL缓存
1503
1526
  /**
1504
1527
  * 创建Provider实例
@@ -1515,14 +1538,14 @@ class ls extends ze {
1515
1538
  adapter: o = {},
1516
1539
  globals: l = {},
1517
1540
  modules: c = {},
1518
- router: u = null,
1519
- materialPath: f = "./",
1541
+ router: f = null,
1542
+ materialPath: u = "./",
1520
1543
  nodeEnv: p = "development"
1521
1544
  /* Development */
1522
1545
  } = e;
1523
- this.mode = s, this.modules = c, this.service = t, this.router = u, this.materialPath = f, this.nodeEnv = p, r && (this.dependencies = r), i && (this.materials = i), Object.assign(this.globals, l), Object.assign(this.adapter, o);
1546
+ this.mode = s, this.modules = c, this.service = t, this.router = f, this.materialPath = u, this.nodeEnv = p, r && (this.dependencies = r), i && (this.materials = i), Object.assign(this.globals, l), Object.assign(this.adapter, o);
1524
1547
  const { access: h, request: d } = this.adapter;
1525
- h && h.connect({ mode: s, router: u, request: d }), a && s !== w.Design ? this.load(a) : this.project = a;
1548
+ h && h.connect({ mode: s, router: f, request: d }), a && s !== w.Design ? this.load(a) : this.project = a;
1526
1549
  }
1527
1550
  mode;
1528
1551
  // 当前运行模式(设计/源码/预览等)
@@ -1566,9 +1589,9 @@ class ls extends ze {
1566
1589
  try {
1567
1590
  s = await e.apply(e, t);
1568
1591
  } catch (i) {
1569
- M.warn("模拟数据模版异常", i);
1592
+ O.warn("模拟数据模版异常", i);
1570
1593
  }
1571
- return H()?.mock(s);
1594
+ return D()?.mock(s);
1572
1595
  };
1573
1596
  }
1574
1597
  /**
@@ -1585,10 +1608,10 @@ class ls extends ze {
1585
1608
  if (this.project = s ? await s() : await this.service.init(e), !this.project)
1586
1609
  throw new Error("project is null");
1587
1610
  const { apis: r = [], meta: i = [], env: a = [] } = this.project, o = window;
1588
- o && (o.CKEDITOR_VERSION = void 0), this.initEnv(a), this.mode === w.Raw ? await this.loadDependencies(o) : await this.loadAssets(o), this.initMock(o), this.apis = jt(r, i, this.adapter), Oe(o), Et(r, o), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1611
+ o && (o.CKEDITOR_VERSION = void 0), this.initEnv(a), this.mode === w.Raw ? await this.loadDependencies(o) : await this.loadAssets(o), this.initMock(o), this.apis = Pt(r, i, this.adapter), Me(o), Ct(r, o), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
1589
1612
  }
1590
1613
  initMock(e) {
1591
- const t = H(e);
1614
+ const t = D(e);
1592
1615
  t && t.setup({
1593
1616
  timeout: "50-500"
1594
1617
  });
@@ -1608,8 +1631,8 @@ class ls extends ze {
1608
1631
  libraryLocales: l
1609
1632
  } = this, {
1610
1633
  libraryExports: c,
1611
- libraryMap: u,
1612
- materials: f,
1634
+ libraryMap: f,
1635
+ materials: u,
1613
1636
  materialExports: p,
1614
1637
  materialMapLibrary: h,
1615
1638
  libraryLocaleMap: d
@@ -1621,31 +1644,31 @@ class ls extends ze {
1621
1644
  );
1622
1645
  Object.assign(this.libraryLocaleMap, d);
1623
1646
  for (const m of c) {
1624
- const g = s[m], v = e[m];
1625
- if (v)
1626
- r[m] = v;
1647
+ const g = s[m], y = e[m];
1648
+ if (y)
1649
+ r[m] = y;
1627
1650
  else if (g)
1628
1651
  e[m] = r[m] = await g();
1629
1652
  else {
1630
- const y = u[m] || [];
1631
- for (const S of y)
1632
- G(S) && await mt(S, F.append(S, { v: T })), V(S) && await Se(F.append(S, { v: T }));
1653
+ const v = f[m] || [];
1654
+ for (const S of v)
1655
+ z(S) && await vt(S, F.append(S, { v: T })), V(S) && await Se(F.append(S, { v: T }));
1633
1656
  r[m] = e[m];
1634
1657
  }
1635
1658
  const _ = d[m];
1636
1659
  if (_) {
1637
- const y = s[_];
1638
- l[_] = y ? await y() : e[_];
1660
+ const v = s[_];
1661
+ l[_] = v ? await v() : e[_];
1639
1662
  }
1640
1663
  }
1641
1664
  if (o === "development") {
1642
- for (const g of f)
1665
+ for (const g of u)
1643
1666
  await Se(F.append(g, { v: T }));
1644
1667
  const m = this.materials || {};
1645
1668
  for (const g of p) {
1646
- const v = e[h[g]], _ = v?.default || v, y = Ge[g];
1647
- if (y)
1648
- _ && y.forEach((S) => {
1669
+ const y = e[h[g]], _ = y?.default || y, v = ze[g];
1670
+ if (v)
1671
+ _ && v.forEach((S) => {
1649
1672
  i[S] = _[S];
1650
1673
  });
1651
1674
  else {
@@ -1664,17 +1687,17 @@ class ls extends ze {
1664
1687
  routeAppendTo: a,
1665
1688
  pageRouteName: o = i,
1666
1689
  routeMeta: l
1667
- } = s, c = a ? "" : "/", u = {
1690
+ } = s, c = a ? "" : "/", f = {
1668
1691
  path: `${c}${o}/:id`,
1669
- name: D,
1692
+ name: x,
1670
1693
  component: ee
1671
- }, f = {
1694
+ }, u = {
1672
1695
  path: c,
1673
1696
  name: N,
1674
- component: t?.homepage ? ee : r.startupComponent || es,
1697
+ component: t?.homepage ? ee : r.startupComponent || ns,
1675
1698
  meta: l
1676
1699
  };
1677
- if (e.hasRoute(D) && e.removeRoute(D), e.hasRoute(N) && e.removeRoute(N), s.enableStaticRoute) {
1700
+ if (e.hasRoute(x) && e.removeRoute(x), e.hasRoute(N) && e.removeRoute(N), s.enableStaticRoute) {
1678
1701
  const p = t?.pages || [];
1679
1702
  le({
1680
1703
  name: o,
@@ -1685,9 +1708,9 @@ class ls extends ze {
1685
1708
  homepage: t?.homepage
1686
1709
  }).forEach((d) => {
1687
1710
  a ? e.addRoute(a, d) : e.addRoute(d);
1688
- }), t?.homepage || (a ? e.addRoute(a, f) : e.addRoute(f));
1711
+ }), t?.homepage || (a ? e.addRoute(a, u) : e.addRoute(u));
1689
1712
  } else
1690
- a ? (e.addRoute(a, u), e.addRoute(a, f)) : (e.addRoute(u), e.addRoute(f));
1713
+ a ? (e.addRoute(a, f), e.addRoute(a, u)) : (e.addRoute(f), e.addRoute(u));
1691
1714
  }
1692
1715
  /**
1693
1716
  * Vue 插件安装方法
@@ -1700,11 +1723,11 @@ class ls extends ze {
1700
1723
  * @param app Vue 应用实例
1701
1724
  */
1702
1725
  install(e) {
1703
- const { libraryLocaleMap: t, libraryLocales: s } = this, r = e.config.globalProperties.installed || {};
1704
- for (const [i, a] of Object.entries(this.library))
1705
- if (!r[i] && gt(a)) {
1706
- const o = s[t[i]];
1707
- e.use(a, { locale: o }), r[i] = !0;
1726
+ const { libraryLocaleMap: t, libraryLocales: s } = this, { libraryOptions: r = {} } = this.options, i = e.config.globalProperties.installed || {};
1727
+ for (const [a, o] of Object.entries(this.library))
1728
+ if (!i[a] && _t(o)) {
1729
+ const c = { locale: s[t[a]] }, f = r[a] || {}, u = { ...c, ...f };
1730
+ e.use(o, u), i[a] = !0;
1708
1731
  }
1709
1732
  e.provide(Le, this), e.config.globalProperties.$provider = this, e.config.globalProperties.$request = this.adapter?.request, this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), this.project?.platform !== "uniapp" && this.mode !== w.Design && this.initGlobals(this.project?.globals || {}, {
1710
1733
  app: e,
@@ -1712,18 +1735,18 @@ class ls extends ze {
1712
1735
  adapter: this.adapter,
1713
1736
  library: this.library,
1714
1737
  mode: this.mode
1715
- }), this.mode !== w.Design && this.project?.i18n && this.initI18n(e, this.library, this.project.i18n), this.options.enhance && e.use(this.options.enhance, this), this.mode === w.Design && (e.config.errorHandler = (i, a, o) => {
1716
- const l = a?.$options.name, c = typeof i == "string" ? i : i?.message || i?.msg || "未知错误", u = `[ ${l} ] ${c} ${o}`;
1738
+ }), this.mode !== w.Design && this.project?.i18n && this.initI18n(e, this.library, this.project.i18n), this.options.enhance && e.use(this.options.enhance, this), this.mode === w.Design && (e.config.errorHandler = (a, o, l) => {
1739
+ const c = o?.$options.name, f = typeof a == "string" ? a : a?.message || a?.msg || "未知错误", u = `[ ${c} ] ${f} ${l}`;
1717
1740
  console.error(
1718
1741
  "[VTJ Error]:",
1719
1742
  {
1720
- err: i,
1721
- instance: a,
1722
- info: o
1743
+ err: a,
1744
+ instance: o,
1745
+ info: l
1723
1746
  },
1724
- i?.stack
1747
+ a?.stack
1725
1748
  ), this.adapter.notify && this.adapter.notify(u, "组件渲染错误", "error");
1726
- }), e.config.globalProperties.installed = r;
1749
+ }), e.config.globalProperties.installed = i;
1727
1750
  }
1728
1751
  getFile(e) {
1729
1752
  const { blocks: t = [] } = this.project || {};
@@ -1807,13 +1830,13 @@ class ls extends ze {
1807
1830
  async getRenderComponent(e, t) {
1808
1831
  const s = this.getFile(e);
1809
1832
  if (!s)
1810
- return M.warn(`Can not find file: ${e}`), null;
1833
+ return O.warn(`Can not find file: ${e}`), null;
1811
1834
  if (t && t(s), this.mode === w.Raw) {
1812
1835
  const { vtjRawDir: i = ".vtj/vue" } = this.options, a = `${i}/${e}.vue`, o = this.modules[a] || this.modules[`/src/pages/${e}.vue`];
1813
1836
  return o ? (await o())?.default : this.nodeEnv === "development" && this.adapter.startupComponent || null;
1814
1837
  }
1815
1838
  const r = await this.getDsl(s.id);
1816
- return r ? this.createDslRenderer(r).renderer : (M.warn(`Can not find dsl: ${e}`), null);
1839
+ return r ? this.createDslRenderer(r).renderer : (O.warn(`Can not find dsl: ${e}`), null);
1817
1840
  }
1818
1841
  /**
1819
1842
  * 定义基于URL的异步组件
@@ -1838,7 +1861,7 @@ class ls extends ze {
1838
1861
  * @returns Vue异步组件
1839
1862
  */
1840
1863
  definePluginComponent(e) {
1841
- return $e(async () => await De(e, window));
1864
+ return $e(async () => await xe(e, window));
1842
1865
  }
1843
1866
  /**
1844
1867
  * 设置应用全局
@@ -1853,10 +1876,10 @@ class ls extends ze {
1853
1876
  },
1854
1877
  t
1855
1878
  );
1856
- ts(e, s);
1879
+ rs(e, s);
1857
1880
  }
1858
1881
  initI18n(e, t, s) {
1859
- as(e, t, s);
1882
+ us(e, t, s);
1860
1883
  }
1861
1884
  initEnv(e = []) {
1862
1885
  this.env = e.reduce(
@@ -1865,8 +1888,8 @@ class ls extends ze {
1865
1888
  );
1866
1889
  }
1867
1890
  }
1868
- function As(n) {
1869
- const e = new ls(n);
1891
+ function Fs(n) {
1892
+ const e = new ps(n);
1870
1893
  return {
1871
1894
  provider: e,
1872
1895
  onReady: (s) => e.ready(s)
@@ -1889,7 +1912,7 @@ function Ne(n = {}) {
1889
1912
  }
1890
1913
  return e;
1891
1914
  }
1892
- async function Is(n, e = "") {
1915
+ async function Os(n, e = "") {
1893
1916
  const { name: t, urls: s = [] } = n || {}, r = s.map((o) => e + o), { css: i, js: a } = dt(r);
1894
1917
  if (i.length && ke(i), a.length)
1895
1918
  return await Fe(a, t).catch(
@@ -1903,7 +1926,7 @@ const Ue = {
1903
1926
  originResponse: !1,
1904
1927
  failMessage: !0,
1905
1928
  validate: (n) => n.data?.code === 0
1906
- }, us = (n, e = "/__vtj__/api/:type.json") => (t, s, r) => n.send({
1929
+ }, ds = (n, e = "/__vtj__/api/:type.json") => (t, s, r) => n.send({
1907
1930
  url: e,
1908
1931
  method: "post",
1909
1932
  params: { type: t },
@@ -1913,7 +1936,7 @@ const Ue = {
1913
1936
  data: s
1914
1937
  },
1915
1938
  settings: Ue
1916
- }), fs = (n, e = "/__vtj__/api/uploader.json") => async (t, s) => await n.send({
1939
+ }), hs = (n, e = "/__vtj__/api/uploader.json") => async (t, s) => await n.send({
1917
1940
  url: e,
1918
1941
  method: "post",
1919
1942
  data: {
@@ -1925,8 +1948,8 @@ const Ue = {
1925
1948
  type: "data"
1926
1949
  }
1927
1950
  }).then((r) => r && r[0] ? r[0] : null).catch(() => null);
1928
- function ks(n) {
1929
- return Ee({
1951
+ function Ms(n) {
1952
+ return je({
1930
1953
  settings: {
1931
1954
  type: "json",
1932
1955
  validSuccess: !0,
@@ -1941,7 +1964,7 @@ function ks(n) {
1941
1964
  }
1942
1965
  class de {
1943
1966
  constructor(e = ne) {
1944
- this.req = e, this.api = us(e), this.uploader = fs(e);
1967
+ this.req = e, this.api = ds(e), this.uploader = hs(e);
1945
1968
  }
1946
1969
  api;
1947
1970
  pluginCaches = {};
@@ -2046,7 +2069,7 @@ const $ = new nt({
2046
2069
  expired: 0,
2047
2070
  prefix: "__VTJ_"
2048
2071
  });
2049
- class Fs extends de {
2072
+ class Ts extends de {
2050
2073
  init(e) {
2051
2074
  const t = new U(e), s = $.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
2052
2075
  return $.save(`project_${t.id}`, r), Promise.resolve(r);
@@ -2080,7 +2103,7 @@ class Fs extends de {
2080
2103
  return Promise.resolve(!0);
2081
2104
  }
2082
2105
  getHistory(e) {
2083
- const t = $.get(`history_${e}`), s = new je(t || { id: e });
2106
+ const t = $.get(`history_${e}`), s = new Ee(t || { id: e });
2084
2107
  return Promise.resolve(s.toDsl());
2085
2108
  }
2086
2109
  getHistoryItem(e, t) {
@@ -2096,7 +2119,7 @@ class Fs extends de {
2096
2119
  }), Promise.resolve(!0);
2097
2120
  }
2098
2121
  }
2099
- class ps extends de {
2122
+ class ms extends de {
2100
2123
  projects = {};
2101
2124
  materials = {};
2102
2125
  files = {};
@@ -2135,7 +2158,7 @@ class ps extends de {
2135
2158
  return Promise.resolve(!0);
2136
2159
  }
2137
2160
  getHistory(e) {
2138
- const t = this.histories[e], s = new je(t || { id: e });
2161
+ const t = this.histories[e], s = new Ee(t || { id: e });
2139
2162
  return Promise.resolve(s);
2140
2163
  }
2141
2164
  getHistoryItem(e, t) {
@@ -2154,10 +2177,10 @@ class ps extends de {
2154
2177
  }
2155
2178
  }
2156
2179
  let L = null;
2157
- function Ms() {
2158
- return L || (L = new ps(), L);
2180
+ function xs() {
2181
+ return L || (L = new ms(), L);
2159
2182
  }
2160
- class Os extends de {
2183
+ class Ds extends de {
2161
2184
  getFileCaches = {};
2162
2185
  async getExtension() {
2163
2186
  return await this.api("getExtension", {}).catch(() => {
@@ -2215,80 +2238,82 @@ class Os extends de {
2215
2238
  }
2216
2239
  }
2217
2240
  export {
2218
- _s as ACCESS,
2219
- Me as ACCESS_KEY,
2241
+ $s as ACCESS,
2242
+ Oe as ACCESS_KEY,
2220
2243
  pe as Access,
2221
2244
  ct as BUILD_IN_TAGS,
2222
2245
  it as BUILT_IN_DIRECTIVES,
2223
2246
  de as BaseService,
2224
2247
  be as CONTEXT_HOST,
2225
- Ct as Context,
2248
+ kt as Context,
2226
2249
  w as ContextMode,
2227
2250
  ot as DATA_TYPES,
2228
2251
  N as HOMEPAGE_ROUTE_NAME,
2229
2252
  at as HTML_TAGS,
2230
- js as JSCodeToString,
2231
- vs as LIFE_CYCLES_LIST,
2232
- Os as LocalService,
2233
- ps as MemoryService,
2234
- cs as NodeEnv,
2235
- D as PAGE_ROUTE_NAME,
2236
- ls as Provider,
2237
- ys as REMOTE,
2238
- Fs as StorageService,
2253
+ Ps as JSCodeToString,
2254
+ ws as LIFE_CYCLES_LIST,
2255
+ Ds as LocalService,
2256
+ ms as MemoryService,
2257
+ fs as NodeEnv,
2258
+ x as PAGE_ROUTE_NAME,
2259
+ ps as Provider,
2260
+ Ss as REMOTE,
2261
+ Ts as StorageService,
2239
2262
  T as VTJ_RENDERER_VERSION,
2240
- $s as adoptStylesToInline,
2263
+ js as adoptStylesToInline,
2241
2264
  fe as adoptedStyleSheets,
2242
- Ps as clearLoaderCache,
2265
+ Is as clearLoaderCache,
2243
2266
  ht as compileScopedCSS,
2244
- Rs as createAccess,
2245
- Es as createAdapter,
2246
- ws as createAssetScripts,
2247
- Ss as createAssetsCss,
2248
- Tt as createDataSources,
2267
+ yt as convertCssRpx,
2268
+ As as createAccess,
2269
+ Cs as createAdapter,
2270
+ bs as createAssetScripts,
2271
+ Es as createAssetsCss,
2272
+ Ht as createDataSources,
2249
2273
  ae as createLoader,
2250
- Ms as createMemoryService,
2274
+ xs as createMemoryService,
2251
2275
  K as createMenus,
2252
- bt as createMetaApi,
2253
- Rt as createMock,
2254
- As as createProvider,
2276
+ Rt as createMetaApi,
2277
+ At as createMock,
2278
+ Fs as createProvider,
2255
2279
  oe as createRenderer,
2256
- $t as createSchemaApi,
2257
- jt as createSchemaApis,
2258
- ks as createServiceRequest,
2259
- xt as defaultLoader,
2280
+ jt as createSchemaApi,
2281
+ Pt as createSchemaApis,
2282
+ Ms as createServiceRequest,
2283
+ Nt as defaultLoader,
2260
2284
  B as fillBasePath,
2261
- H as getMock,
2262
- xe as getModifiers,
2263
- De as getPlugin,
2285
+ D as getMock,
2286
+ He as getModifiers,
2287
+ xe as getPlugin,
2264
2288
  pt as getRawComponent,
2265
- vt as isBuiltInTag,
2266
- G as isCSSUrl,
2267
- _t as isJSCode,
2268
- E as isJSExpression,
2289
+ wt as isBuiltInTag,
2290
+ z as isCSSUrl,
2291
+ $t as isJSCode,
2292
+ j as isJSExpression,
2269
2293
  b as isJSFunction,
2270
2294
  lt as isJSON,
2271
2295
  V as isJSUrl,
2272
- yt as isNativeTag,
2273
- gt as isVuePlugin,
2274
- mt as loadCss,
2296
+ St as isNativeTag,
2297
+ _t as isVuePlugin,
2298
+ vt as loadCss,
2275
2299
  ke as loadCssUrl,
2276
- Is as loadEnhance,
2300
+ Os as loadEnhance,
2277
2301
  Fe as loadScriptUrl,
2278
2302
  Be as menusFilter,
2279
- Pt as mockApi,
2280
- Et as mockApis,
2281
- Oe as mockCleanup,
2282
- O as nodeRender,
2303
+ It as mockApi,
2304
+ Ct as mockApis,
2305
+ Me as mockCleanup,
2306
+ M as nodeRender,
2283
2307
  ft as parseDeps,
2284
- x as parseExpression,
2308
+ H as parseExpression,
2285
2309
  R as parseFunction,
2286
2310
  dt as parseUrls,
2287
2311
  Le as providerKey,
2288
2312
  ut as removeProdFlag,
2289
- bs as setupPageSetting,
2313
+ gt as rpxToPx,
2314
+ Rs as setupPageSetting,
2290
2315
  Ie as toString,
2291
- St as useAccess,
2292
- Cs as useMask,
2316
+ Et as useAccess,
2317
+ ks as useMask,
2293
2318
  Ne as useProvider
2294
2319
  };