@vtj/renderer 0.16.12 → 0.16.14

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,5 +1,5 @@
1
1
  import { Base as Ke, BUILT_IN_COMPONENTS as ze, ProjectModel as U, HistoryModel as $e } from "@vtj/core";
2
- import { url as k, isUrl as se, dedupArray as Ge, isFunction as q, isString as I, logger as O, storage as X, cookie as Y, toArray as ge, unRSA as ve, delay as J, createRequest as be, jsonp as Ee, merge as Ve, pathToRegexp as We, pathToRegexpMatch as Qe, formDataToJson as Xe, Queue as Ye, cloneDeep as ye, camelCase as C, upperFirst as Ze, pick as et, request as ne, loadScript as _e, debounce as tt, Storage as st, mapToObject as ue } from "@vtj/utils";
2
+ import { url as k, isUrl as se, dedupArray as Ge, isFunction as q, isString as I, logger as O, storage as X, cookie as Y, toArray as ge, unRSA as ve, delay as J, createRequest as Ee, jsonp as be, merge as Ve, pathToRegexp as We, pathToRegexpMatch as Qe, formDataToJson as Xe, Queue as Ye, cloneDeep as ye, camelCase as C, upperFirst as Ze, pick as et, request as ne, loadScript as _e, debounce as tt, Storage as st, mapToObject as ue } from "@vtj/utils";
3
3
  import * as z from "vue";
4
4
  import { inject as je, defineComponent as Re, h as re, ref as oe, watchEffect as nt, defineAsyncComponent as we } from "vue";
5
5
  import { useRoute as Pe } from "vue-router";
@@ -7,10 +7,10 @@ import { useRoute as Pe } from "vue-router";
7
7
  * Copyright (c) 2026, VTJ.PRO All rights reserved.
8
8
  * @name @vtj/renderer
9
9
  * @author CHC chenhuachun1549@dingtalk.com
10
- * @version 0.16.12
10
+ * @version 0.16.14
11
11
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
12
12
  */
13
- const T = "0.16.12";
13
+ const T = "0.16.14";
14
14
  var w = /* @__PURE__ */ ((n) => (n.Runtime = "Runtime", n.Design = "Design", n.Raw = "Raw", n.VNode = "VNode", n))(w || {});
15
15
  const Se = [
16
16
  "$el",
@@ -149,12 +149,12 @@ function V(n) {
149
149
  function at(n) {
150
150
  return /\.json$/.test(n);
151
151
  }
152
- function bs(n) {
152
+ function Es(n) {
153
153
  return n.map(
154
154
  (e) => `<script src="${k.append(e, { v: T })}"><\/script>`
155
155
  ).join("");
156
156
  }
157
- function Es(n = []) {
157
+ function bs(n = []) {
158
158
  return n.map(
159
159
  (e) => `<link rel="stylesheet" href="${k.append(e, { v: T })}" />`
160
160
  ).join("");
@@ -163,21 +163,21 @@ function ct(n, e = !1) {
163
163
  return e && n.endsWith(".prod.js") ? n.replace(".prod.js", ".js") : n;
164
164
  }
165
165
  function lt(n, e, t = !1) {
166
- const s = n.filter((p) => !!p.enabled), r = [], o = [], a = [], i = [], l = {}, c = {}, f = [], u = {};
166
+ const s = n.filter((p) => !!p.enabled), r = [], o = [], a = [], i = [], f = {}, c = {}, l = [], u = {};
167
167
  return s.forEach(
168
- ({ urls: p, assetsUrl: h, library: d, assetsLibrary: m, localeLibrary: g }) => {
168
+ ({ urls: p, assetsUrl: d, library: h, assetsLibrary: m, localeLibrary: g }) => {
169
169
  p?.forEach((v) => {
170
170
  V(v) && r.push(ct(v, t)), G(v) && o.push(v);
171
- }), d && (i.push(d), l[d] = B(p || [], e), g && (c[d] = g)), h && a.push(h), m && f.push(m), d && m && (u[m] = d);
171
+ }), h && (i.push(h), f[h] = B(p || [], e), g && (c[h] = g)), d && a.push(d), m && l.push(m), h && m && (u[m] = h);
172
172
  }
173
173
  ), {
174
174
  scripts: B(r, e),
175
175
  css: B(o, e),
176
176
  materials: B(a, e),
177
177
  libraryExports: i,
178
- materialExports: Ge(f),
178
+ materialExports: Ge(l),
179
179
  materialMapLibrary: u,
180
- libraryMap: l,
180
+ libraryMap: f,
181
181
  libraryLocaleMap: c
182
182
  };
183
183
  }
@@ -194,7 +194,7 @@ function ft(n = []) {
194
194
  }
195
195
  function pt(n, e) {
196
196
  const t = (c) => {
197
- const f = [];
197
+ const l = [];
198
198
  let u = 0;
199
199
  for (; u < c.length; ) {
200
200
  if (/\s/.test(c[u])) {
@@ -214,7 +214,7 @@ function pt(n, e) {
214
214
  u++;
215
215
  const _ = c.substring(v, u).trim(), y = _.includes("@keyframes");
216
216
  if (c[u] === ";")
217
- f.push({
217
+ l.push({
218
218
  type: "simple-at-rule",
219
219
  content: c.substring(v, u + 1)
220
220
  }), u++;
@@ -224,7 +224,7 @@ function pt(n, e) {
224
224
  for (u++; u < c.length && A > 0; )
225
225
  c[u] === "{" ? A++ : c[u] === "}" && A--, u++;
226
226
  const W = c.substring(v, u), P = c.substring(S, u - 1);
227
- f.push({
227
+ l.push({
228
228
  type: y ? "keyframes" : "at-rule",
229
229
  rule: _,
230
230
  content: W,
@@ -237,72 +237,72 @@ function pt(n, e) {
237
237
  for (; u < c.length && c[u] !== "{"; )
238
238
  u++;
239
239
  if (u >= c.length) break;
240
- const h = c.substring(p, u).trim();
241
- if (!h) {
240
+ const d = c.substring(p, u).trim();
241
+ if (!d) {
242
242
  u++;
243
243
  continue;
244
244
  }
245
- const d = u + 1;
245
+ const h = u + 1;
246
246
  let m = 1;
247
247
  for (u++; u < c.length && m > 0; )
248
248
  c[u] === "{" ? m++ : c[u] === "}" && m--, u++;
249
- const g = c.substring(d, u - 1);
250
- f.push({
249
+ const g = c.substring(h, u - 1);
250
+ l.push({
251
251
  type: "rule",
252
- selector: h,
252
+ selector: d,
253
253
  content: g.trim()
254
254
  });
255
255
  }
256
- return f;
256
+ return l;
257
257
  }, s = (c) => {
258
- const f = c.trim();
259
- return /^(from|to|\d+(\.\d+)?%)$/.test(f);
260
- }, 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) => {
261
- const h = u.trim(), d = p.trim();
262
- return h ? `${h}[${e}] ${d}` : d;
258
+ const l = c.trim();
259
+ return /^(from|to|\d+(\.\d+)?%)$/.test(l);
260
+ }, r = (c) => c.replace(/::v-deep\(/g, ":deep(").replace(/::v-deep\s+/g, ":deep(").replace(/\/deep\//g, " ").replace(/>>>/g, " ").replace(/(.*?):deep\(([^)]+)\)/g, (l, u, p) => {
261
+ const d = u.trim(), h = p.trim();
262
+ return d ? `${d}[${e}] ${h}` : h;
263
263
  }), o = (c) => {
264
- const f = c.trim();
265
- if (!f || f.includes(`[${e}]`) || /^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(f) || s(f))
266
- return f;
267
- const u = f.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);
264
+ const l = c.trim();
265
+ if (!l || l.includes(`[${e}]`) || /^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(l) || s(l))
266
+ return l;
267
+ const u = l.match(/^(.+?)((?:::?[\w-]+(?:\([^)]*\))?)*)\s*$/);
268
268
  if (u) {
269
- const [, p, h = ""] = u, d = p.trim();
270
- return d ? `${d}[${e}]${h}` : f;
269
+ const [, p, d = ""] = u, h = p.trim();
270
+ return h ? `${h}[${e}]${d}` : l;
271
271
  }
272
- return `${f}[${e}]`;
273
- }, a = (c) => r(c).split(",").map((u) => o(u)).filter((u) => u.trim()).join(", "), i = (c) => c.map((f) => {
274
- switch (f.type) {
272
+ return `${l}[${e}]`;
273
+ }, a = (c) => r(c).split(",").map((u) => o(u)).filter((u) => u.trim()).join(", "), i = (c) => c.map((l) => {
274
+ switch (l.type) {
275
275
  case "simple-at-rule":
276
- return f.content;
276
+ return l.content;
277
277
  case "keyframes":
278
- return f.content;
278
+ return l.content;
279
279
  case "at-rule":
280
280
  try {
281
- const p = t(f.inner), h = i(p);
282
- return `${f.rule} { ${h} }`;
281
+ const p = t(l.inner), d = i(p);
282
+ return `${l.rule} { ${d} }`;
283
283
  } catch {
284
- return f.content;
284
+ return l.content;
285
285
  }
286
286
  case "rule":
287
- if (!f.selector || !f.content)
287
+ if (!l.selector || !l.content)
288
288
  return "";
289
- const u = a(f.selector);
290
- return u.trim() ? `${u} { ${f.content} }` : "";
289
+ const u = a(l.selector);
290
+ return u.trim() ? `${u} { ${l.content} }` : "";
291
291
  default:
292
292
  return "";
293
293
  }
294
- }).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();
294
+ }).filter((l) => l.trim()).join(" "), f = (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();
295
295
  try {
296
296
  const c = n.replace(/\/\*(?!\s*!)[\s\S]*?\*\//g, "").replace(/^\s+|\s+$/gm, "").replace(/\n\s*\n/g, `
297
- `), f = t(c), u = i(f);
298
- return l(u);
297
+ `), l = t(c), u = i(l);
298
+ return f(u);
299
299
  } catch (c) {
300
300
  return console.error("CSS scoping failed:", c), console.error("Input CSS:", n), n.replace(/\/\*[\s\S]*?\*\//g, "").replace(
301
301
  /(@keyframes\s+[^{]+\s*{[^{}]*(?:{[^}]*}[^{}]*)*})/g,
302
- (f) => f
303
- ).replace(/([^{}@]+)(?=\s*{)/g, (f) => {
304
- const u = f.trim();
305
- return !u || u.startsWith("@") || u.includes(`[${e}]`) || s(u) ? f : `${u}[${e}]`;
302
+ (l) => l
303
+ ).replace(/([^{}@]+)(?=\s*{)/g, (l) => {
304
+ const u = l.trim();
305
+ return !u || u.startsWith("@") || u.includes(`[${e}]`) || s(u) ? l : `${u}[${e}]`;
306
306
  });
307
307
  }
308
308
  }
@@ -318,10 +318,10 @@ function mt(n, e) {
318
318
  for (let a = 0; a < e.length; a++) {
319
319
  const i = e[a];
320
320
  if (i === "'" && !s && !r ? t = !t : i === '"' && !t && !r ? s = !s : e.substr(a, 4).toLowerCase() === "url(" && !t && !s ? r = !0 : i === ")" && r && (r = !1), !t && !s && !r) {
321
- const l = e.substr(a).match(/^(-?\d+(?:\.\d+)?)\s*rpx/);
322
- if (l) {
323
- const c = l[1], f = parseFloat(c), p = `${ht(n, f).toFixed(6).replace(/\.?0+$/, "")}px`;
324
- o += p, a += l[0].length - 1;
321
+ const f = e.substr(a).match(/^(-?\d+(?:\.\d+)?)\s*rpx/);
322
+ if (f) {
323
+ const c = f[1], l = parseFloat(c), p = `${ht(n, l).toFixed(6).replace(/\.?0+$/, "")}px`;
324
+ o += p, a += f[0].length - 1;
325
325
  continue;
326
326
  }
327
327
  }
@@ -333,18 +333,18 @@ function Ae(n) {
333
333
  return I(n) ? n : JSON.stringify(n);
334
334
  }
335
335
  function fe(n, e, t, s = !1) {
336
- const r = n.CSSStyleSheet, o = s ? `data-v-${e}` : e, a = n.__uniConfig ? mt(n, t) : t, i = s ? pt(a, o) : a;
337
- if (r.prototype.replaceSync) {
338
- const l = new r();
339
- l.id = e, l.replaceSync(i);
340
- const c = n.document, f = c.adoptedStyleSheets, u = Array.from(f).filter(
341
- (p) => p.id !== e
336
+ const r = n.CSSStyleSheet, o = s ? `data-v-${e}` : e, a = n.__uniConfig ? mt(n, t) : t, i = s ? pt(a, o) : a, f = !!n.__uniConfig;
337
+ if (r.prototype.replaceSync && !f) {
338
+ const c = new r();
339
+ c.id = e, c.replaceSync(i);
340
+ const l = n.document, u = l.adoptedStyleSheets, p = Array.from(u).filter(
341
+ (d) => d.id !== e
342
342
  );
343
- c.adoptedStyleSheets = [...u, l];
343
+ l.adoptedStyleSheets = [...p, c];
344
344
  } else {
345
- const l = n.document;
346
- let c = l.getElementById(e);
347
- c ? c.innerHTML = i : (c = l.createElement("style"), c.id = e, c.innerHTML = i, l.head.appendChild(c));
345
+ const c = n.document;
346
+ let l = c.getElementById(e);
347
+ l ? l.innerHTML = i : (l = c.createElement("style"), l.id = e, l.innerHTML = i, c.head.appendChild(l));
348
348
  }
349
349
  }
350
350
  function js(n) {
@@ -379,12 +379,12 @@ async function Fe(n, e, t = window) {
379
379
  const s = t.document, r = t.document.head;
380
380
  let o = t[e];
381
381
  return o ? o.default || o : new Promise((a, i) => {
382
- for (const l of n) {
382
+ for (const f of n) {
383
383
  const c = s.createElement("script");
384
- c.src = l, c.onload = () => {
384
+ c.src = f, c.onload = () => {
385
385
  o = t[e], o ? a(o.default || o) : i(null);
386
- }, c.onerror = (f) => {
387
- i(f);
386
+ }, c.onerror = (l) => {
387
+ i(l);
388
388
  }, r.appendChild(c);
389
389
  }
390
390
  });
@@ -415,7 +415,7 @@ function H(n, e, t = !1, s = !1, r = !1) {
415
415
  const o = ['"use strict";', "var __self = arguments[0];"];
416
416
  o.push("return ");
417
417
  let a = (n.value || "").trim();
418
- r || (a = a.replace(/this(\W|$)/g, (l, c) => `__self${c}`)), a = o.join(`
418
+ r || (a = a.replace(/this(\W|$)/g, (f, c) => `__self${c}`)), a = o.join(`
419
419
  `) + a;
420
420
  const i = r ? `
421
421
  ${a}
@@ -437,14 +437,14 @@ function R(n, e, t = !1, s = !1, r = !1) {
437
437
  throw new Error(`"${n.value}" not a function`);
438
438
  return o;
439
439
  }
440
- function E(n) {
440
+ function b(n) {
441
441
  return n && n.type === "JSExpression";
442
442
  }
443
- function b(n) {
443
+ function E(n) {
444
444
  return typeof n == "object" && n && n.type === "JSFunction";
445
445
  }
446
446
  function wt(n) {
447
- return E(n) || b(n);
447
+ return b(n) || E(n);
448
448
  }
449
449
  function Ps(n) {
450
450
  return wt(n) ? n.value : JSON.stringify(n);
@@ -632,29 +632,29 @@ function Cs(n = {}) {
632
632
  useTitle: a,
633
633
  alert: i
634
634
  } = n;
635
- let l = null;
635
+ let f = null;
636
636
  return {
637
- request: be({
637
+ request: Ee({
638
638
  settings: {
639
639
  type: "form",
640
640
  validSuccess: !0,
641
641
  originResponse: !1,
642
642
  loading: !0,
643
- validate: (f) => f.data?.code === 0 || !!f.data?.success,
643
+ validate: (l) => l.data?.code === 0 || !!l.data?.success,
644
644
  failMessage: !0,
645
- showError: (f) => {
646
- e && e(f || "未知错误");
645
+ showError: (l) => {
646
+ e && e(l || "未知错误");
647
647
  },
648
648
  showLoading: () => {
649
- l && l.close(), t && (l = t());
649
+ f && f.close(), t && (f = t());
650
650
  },
651
651
  hideLoading: () => {
652
- l && (l.close(), l = null);
652
+ f && (f.close(), f = null);
653
653
  },
654
654
  ...s
655
655
  }
656
656
  }),
657
- jsonp: Ee,
657
+ jsonp: be,
658
658
  notify: e,
659
659
  loading: t,
660
660
  useTitle: a,
@@ -666,7 +666,7 @@ function Cs(n = {}) {
666
666
  function As(n = {}) {
667
667
  return new pe(n);
668
668
  }
669
- function bt(n, e) {
669
+ function Et(n, e) {
670
670
  const { jsonp: t, request: s } = e;
671
671
  if (n.method === "jsonp")
672
672
  return (r = {}) => t(n.url, {
@@ -685,7 +685,7 @@ function bt(n, e) {
685
685
  return (a, i) => (delete o.data, s.send(Ve(o, i || {}, { data: a })));
686
686
  }
687
687
  }
688
- function Et(n, e) {
688
+ function bt(n, e) {
689
689
  const { metaQuery: t } = e;
690
690
  if (!t) return;
691
691
  const { code: s, queryCode: r } = n;
@@ -700,11 +700,11 @@ function Et(n, e) {
700
700
  function jt(n = [], e = [], t) {
701
701
  const s = {};
702
702
  for (const r of n) {
703
- const o = bt(r, t);
703
+ const o = Et(r, t);
704
704
  s[r.id] = o, s[r.name] = o;
705
705
  }
706
706
  for (const r of e)
707
- s[r.id] = Et(r, t);
707
+ s[r.id] = bt(r, t);
708
708
  return s;
709
709
  }
710
710
  async function Rt(n = [], e = window) {
@@ -712,7 +712,7 @@ async function Rt(n = [], e = window) {
712
712
  t && (Oe(e), n.forEach((s) => Ct(t, s)));
713
713
  }
714
714
  function Pt(n, e = window) {
715
- const t = b(n.mockTemplate) && n.mockTemplate.value ? R(n.mockTemplate, {}, !0) : void 0, s = D(e);
715
+ const t = E(n.mockTemplate) && n.mockTemplate.value ? R(n.mockTemplate, {}, !0) : void 0, s = D(e);
716
716
  return async (...r) => {
717
717
  let o = {};
718
718
  if (t)
@@ -730,13 +730,13 @@ function Ct(n, e) {
730
730
  if (t && s)
731
731
  try {
732
732
  const r = se(t) ? new URL(t).pathname : t, o = We(`(.*)${r}(.*)`), a = Qe(r, { decode: decodeURIComponent }), i = H(s, {}, !0);
733
- n.mock(o, (l) => {
734
- const c = k.parse(l.url) || {}, f = l.body instanceof FormData ? Xe(l.body) : l.body, u = se(l.url) ? new URL(l.url).pathname : l.url.split("?")[0], p = a(u)?.params;
735
- Object.assign(l, { data: f, params: p, query: c });
733
+ n.mock(o, (f) => {
734
+ const c = k.parse(f.url) || {}, l = f.body instanceof FormData ? Xe(f.body) : f.body, u = se(f.url) ? new URL(f.url).pathname : f.url.split("?")[0], p = a(u)?.params;
735
+ Object.assign(f, { data: l, params: p, query: c });
736
736
  try {
737
- return n.mock(i(l));
738
- } catch (h) {
739
- return console.warn("[mockApi]", o, l, h), null;
737
+ return n.mock(i(f));
738
+ } catch (d) {
739
+ return console.warn("[mockApi]", o, f, d), null;
740
740
  }
741
741
  });
742
742
  } catch (r) {
@@ -855,15 +855,15 @@ function ie(n) {
855
855
  libs: r = {},
856
856
  apis: o = {},
857
857
  loader: a
858
- } = n, i = e.computed(() => n.dsl), l = {
858
+ } = n, i = e.computed(() => n.dsl), f = {
859
859
  $components: s,
860
860
  $libs: r,
861
861
  $apis: o
862
862
  }, c = new At({
863
863
  mode: t,
864
864
  dsl: i.value,
865
- attrs: l
866
- }), f = e.defineComponent({
865
+ attrs: f
866
+ }), l = e.defineComponent({
867
867
  name: i.value.name,
868
868
  __scopeId: i.value.id ? `data-v-${i.value.id}` : void 0,
869
869
  props: {
@@ -876,23 +876,23 @@ function ie(n) {
876
876
  i.value.css || "",
877
877
  !0
878
878
  ), c.state = kt(e, i.value.state ?? {}, c);
879
- const p = Ot(e, i.value.computed ?? {}, c), h = Mt(i.value.methods ?? {}, c), d = Tt(e, i.value.inject, c);
880
- for (const [v, _] of Object.entries(d || {}))
881
- d[v] = e.inject(v, _);
879
+ const p = Ot(e, i.value.computed ?? {}, c), d = Mt(i.value.methods ?? {}, c), h = Tt(e, i.value.inject, c);
880
+ for (const [v, _] of Object.entries(h || {}))
881
+ h[v] = e.inject(v, _);
882
882
  const m = xt(
883
883
  i.value.dataSources || {},
884
884
  c
885
885
  ), g = {
886
- ...d,
887
- ...p,
888
886
  ...h,
887
+ ...p,
888
+ ...d,
889
889
  ...m
890
890
  };
891
891
  return c.setup(g, e), Dt(e, i.value.watch ?? [], c), {
892
892
  vtj: c,
893
893
  state: c.state,
894
894
  ...p,
895
- ...h
895
+ ...d
896
896
  };
897
897
  },
898
898
  emits: It(i.value.emits),
@@ -907,7 +907,7 @@ function ie(n) {
907
907
  ...Ht(i.value.lifeCycles ?? {}, c)
908
908
  });
909
909
  return {
910
- renderer: e.markRaw(f),
910
+ renderer: e.markRaw(l),
911
911
  context: c
912
912
  };
913
913
  }
@@ -922,7 +922,7 @@ function Ft(n = [], e) {
922
922
  name: s.name,
923
923
  type: s.type,
924
924
  required: s.required,
925
- default: E(s.default) ? e.__parseExpression(s.default) : s.default
925
+ default: b(s.default) ? e.__parseExpression(s.default) : s.default
926
926
  }).reduce(
927
927
  (s, r) => (s[r.name] = {
928
928
  type: t(r.type),
@@ -937,7 +937,7 @@ function kt(n, e, t) {
937
937
  Object.keys(e || {}).reduce(
938
938
  (s, r) => {
939
939
  let o = e[r];
940
- return E(o) ? o = t.__parseExpression(o) : b(o) && (o = t.__parseFunction(o)), s[r] = o, s;
940
+ return b(o) ? o = t.__parseExpression(o) : E(o) && (o = t.__parseFunction(o)), s[r] = o, s;
941
941
  },
942
942
  {}
943
943
  )
@@ -960,8 +960,8 @@ function Tt(n, e = [], t) {
960
960
  (s, r) => {
961
961
  const { name: o, from: a } = r || {};
962
962
  r.default;
963
- const i = E(a) ? t.__parseExpression(a) || o : a ?? o, l = E(r.default) ? t.__parseExpression(r.default) : r.default ?? null;
964
- return s[o] = n.inject(i, l), s;
963
+ const i = b(a) ? t.__parseExpression(a) || o : a ?? o, f = b(r.default) ? t.__parseExpression(r.default) : r.default ?? null;
964
+ return s[o] = n.inject(i, f), s;
965
965
  },
966
966
  {}
967
967
  );
@@ -973,10 +973,10 @@ function xt(n, e) {
973
973
  if (r.type === "mock")
974
974
  t[s] = Pt(r);
975
975
  else if (r.ref) {
976
- const o = e.$apis[r.ref], a = b(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
976
+ const o = e.$apis[r.ref], a = E(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
977
977
  t[s] = async (...i) => {
978
- const l = await o.apply(e, i);
979
- return a ? a(l) : l;
978
+ const f = await o.apply(e, i);
979
+ return a ? a(f) : f;
980
980
  };
981
981
  }
982
982
  return t;
@@ -1053,8 +1053,8 @@ function ae(n) {
1053
1053
  let i = o.library ? F[o.library] : null;
1054
1054
  return i || (o.library && Z.push(o.library), i = F[o.library || Symbol()] = a.defineAsyncComponent(
1055
1055
  async () => {
1056
- const l = await Te(o, s.window);
1057
- return l || (console.warn("getPlugin result is null", o), null);
1056
+ const f = await Te(o, s.window);
1057
+ return f || (console.warn("getPlugin result is null", o), null);
1058
1058
  }
1059
1059
  ), i);
1060
1060
  }
@@ -1066,8 +1066,8 @@ function Is() {
1066
1066
  }
1067
1067
  function M(n, e, t = z, s = Bt, r = [], o = !1) {
1068
1068
  if (!n || !n.name || n.invisible) return null;
1069
- const a = t.getCurrentInstance()?.appContext, { id: i = null, directives: l = [] } = n, { vIf: c, vElseIf: f, vElse: u, vFor: p, vShow: h, vModels: d, vBind: m, vHtml: g, others: v } = xe(l);
1070
- if (!o && (f || u))
1069
+ const a = t.getCurrentInstance()?.appContext, { id: i = null, directives: f = [] } = n, { vIf: c, vElseIf: l, vElse: u, vFor: p, vShow: d, vModels: h, vBind: m, vHtml: g, others: v } = xe(f);
1070
+ if (!o && (l || u))
1071
1071
  return null;
1072
1072
  if (c && !Nt(c, e))
1073
1073
  return zt(n, e, t, s, r);
@@ -1081,10 +1081,10 @@ function M(n, e, t = z, s = Bt, r = [], o = !1) {
1081
1081
  })(), P = qt(i, n.props ?? {}, y), Ue = Kt(t, n.events ?? {}, y);
1082
1082
  if (n.name === "slot")
1083
1083
  return Gt(t, n, P, y, s);
1084
- m && Object.assign(P, y.__parseExpression(m.value)), h && (P.style = Object.assign(
1084
+ m && Object.assign(P, y.__parseExpression(m.value)), d && (P.style = Object.assign(
1085
1085
  P.style ?? {},
1086
- Wt(h, y)
1087
- )), g && Object.assign(P, Qt(g, y)), d.forEach((j) => {
1086
+ Wt(d, y)
1087
+ )), g && Object.assign(P, Qt(g, y)), h.forEach((j) => {
1088
1088
  Ce.includes(n.name) ? Object.assign(P, Xt(j, y)) : Object.assign(P, Yt(t, j, y));
1089
1089
  });
1090
1090
  const qe = Zt(
@@ -1114,12 +1114,12 @@ function Lt(n, e, t) {
1114
1114
  }).filter((r) => !!r);
1115
1115
  }
1116
1116
  function xe(n = []) {
1117
- const e = n.find((f) => C(f.name) === "vIf"), t = n.find(
1118
- (f) => C(f.name) === "vElseIf"
1119
- ), s = n.find((f) => C(f.name) === "vElse"), r = n.find((f) => C(f.name) === "vFor"), o = n.find((f) => C(f.name) === "vShow"), a = n.find((f) => C(f.name) === "vBind"), i = n.find((f) => C(f.name) === "vHtml"), l = n.filter(
1120
- (f) => C(f.name) === "vModel"
1117
+ const e = n.find((l) => C(l.name) === "vIf"), t = n.find(
1118
+ (l) => C(l.name) === "vElseIf"
1119
+ ), s = n.find((l) => C(l.name) === "vElse"), r = n.find((l) => C(l.name) === "vFor"), o = n.find((l) => C(l.name) === "vShow"), a = n.find((l) => C(l.name) === "vBind"), i = n.find((l) => C(l.name) === "vHtml"), f = n.filter(
1120
+ (l) => C(l.name) === "vModel"
1121
1121
  ), c = n.filter(
1122
- (f) => !rt.includes(C(f.name))
1122
+ (l) => !rt.includes(C(l.name))
1123
1123
  );
1124
1124
  return {
1125
1125
  vIf: e,
@@ -1127,7 +1127,7 @@ function xe(n = []) {
1127
1127
  vElse: s,
1128
1128
  vFor: r,
1129
1129
  vShow: o,
1130
- vModels: l,
1130
+ vModels: f,
1131
1131
  vBind: a,
1132
1132
  others: c,
1133
1133
  vHtml: i
@@ -1137,14 +1137,14 @@ function Nt(n, e) {
1137
1137
  return !!e.__parseExpression(n.value);
1138
1138
  }
1139
1139
  function Ut(n, e) {
1140
- return e ? E(e) ? n.__parseExpression(e) : e : "div";
1140
+ return e ? b(e) ? n.__parseExpression(e) : e : "div";
1141
1141
  }
1142
1142
  function qt(n, e, t) {
1143
1143
  const s = ce(e, t);
1144
1144
  return s.ref = t.__ref(n, s.ref), s;
1145
1145
  }
1146
1146
  function ce(n, e) {
1147
- 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(
1147
+ return b(n) ? e.__parseExpression(n) : E(n) ? e.__parseFunction(n) : Array.isArray(n) ? n.map((t) => ce(t, e)) : typeof n == "object" ? Object.keys(n || {}).reduce(
1148
1148
  (t, s) => {
1149
1149
  let r = n[s];
1150
1150
  return t[s] = ce(r, e), t;
@@ -1165,10 +1165,10 @@ function Kt(n, e, t) {
1165
1165
  };
1166
1166
  return Object.keys(e || {}).reduce(
1167
1167
  (o, a) => {
1168
- const i = e[a], l = De(i.modifiers), c = l.find((p) => s.includes(p)), f = "on" + Ze(a) + (c && r[c] || ""), u = t.__parseFunction(i.handler);
1169
- return u && (o[f] = n.withModifiers(
1170
- l.includes("enter") ? Jt(u, "enter") : u,
1171
- l
1168
+ const i = e[a], f = De(i.modifiers), c = f.find((p) => s.includes(p)), l = "on" + Ze(a) + (c && r[c] || ""), u = t.__parseFunction(i.handler);
1169
+ return u && (o[l] = n.withModifiers(
1170
+ f.includes("enter") ? Jt(u, "enter") : u,
1171
+ f
1172
1172
  )), o;
1173
1173
  },
1174
1174
  {}
@@ -1177,9 +1177,9 @@ function Kt(n, e, t) {
1177
1177
  function zt(n, e, t, s, r = []) {
1178
1178
  let o = r.findIndex((a) => a.id === n.id);
1179
1179
  for (let a = ++o; a < r.length; a++) {
1180
- const { directives: i = [] } = r[a], { vElseIf: l, vElse: c } = xe(i);
1181
- if (l) {
1182
- if (e.__parseExpression(l.value))
1180
+ const { directives: i = [] } = r[a], { vElseIf: f, vElse: c } = xe(i);
1181
+ if (f) {
1182
+ if (e.__parseExpression(f.value))
1183
1183
  return M(r[a], e, t, s, r, !0);
1184
1184
  continue;
1185
1185
  }
@@ -1194,16 +1194,16 @@ function De(n = {}, e = !1) {
1194
1194
  }
1195
1195
  function Gt(n, e, t, s, r) {
1196
1196
  const { children: o } = e, a = Vt(e, s), i = s.$slots?.[a.name];
1197
- return i ? i(t) : o ? I(o) ? n.createTextVNode(o) : E(o) ? n.createTextVNode(
1197
+ return i ? i(t) : o ? I(o) ? n.createTextVNode(o) : b(o) ? n.createTextVNode(
1198
1198
  Ae(s.__parseExpression(o))
1199
1199
  ) : Array.isArray(o) ? o.map(
1200
- (l) => M(l, s, n, r, o)
1200
+ (f) => M(f, s, n, r, o)
1201
1201
  ) : null : null;
1202
1202
  }
1203
1203
  function Vt(n, e) {
1204
1204
  const { props: t } = n, s = t?.name || "default";
1205
1205
  return {
1206
- name: E(s) ? e.__parseExpression(s) : s,
1206
+ name: b(s) ? e.__parseExpression(s) : s,
1207
1207
  params: []
1208
1208
  };
1209
1209
  }
@@ -1225,7 +1225,7 @@ function Xt(n, e) {
1225
1225
  }` : "(v) => {}"
1226
1226
  };
1227
1227
  return {
1228
- [E(n.arg) ? e.__parseExpression(n.arg) : n.arg || "value"]: e.__parseExpression(n.value),
1228
+ [b(n.arg) ? e.__parseExpression(n.arg) : n.arg || "value"]: e.__parseExpression(n.value),
1229
1229
  onInput: e.__parseFunction(t)
1230
1230
  };
1231
1231
  }
@@ -1236,8 +1236,8 @@ function Yt(n, e, t) {
1236
1236
  ${e.value.value} = v;
1237
1237
  }` : "(v) => {}"
1238
1238
  }, r = t.__parseFunction(s), o = De(
1239
- E(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
1240
- ), a = E(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
1239
+ b(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
1240
+ ), a = b(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
1241
1241
  return {
1242
1242
  [a]: t.__parseExpression(e.value),
1243
1243
  [`onUpdate:${a}`]: o.length && r ? n.withModifiers(r, o) : r
@@ -1247,21 +1247,21 @@ function Zt(n, e, t, s, r) {
1247
1247
  if (!e) return null;
1248
1248
  if (I(e))
1249
1249
  return { default: () => e };
1250
- if (E(e))
1250
+ if (b(e))
1251
1251
  return {
1252
1252
  default: () => Ae(t.__parseExpression(e))
1253
1253
  };
1254
1254
  if (Array.isArray(e) && e.length > 0) {
1255
- const o = es(e), a = (i, l) => !i || !r ? {} : r?.id && Object.keys(i).length ? l ? {
1256
- [l]: i
1255
+ const o = es(e), a = (i, f) => !i || !r ? {} : r?.id && Object.keys(i).length ? f ? {
1256
+ [f]: i
1257
1257
  } : {
1258
1258
  [`scope_${r.id}`]: i
1259
- } : l ? { [l]: /* @__PURE__ */ Object.create(null) } : {};
1259
+ } : f ? { [f]: /* @__PURE__ */ Object.create(null) } : {};
1260
1260
  return Object.entries(o).reduce(
1261
- (i, [l, { nodes: c, params: f, scope: u }]) => (i[l] = (p) => {
1262
- const h = f.length ? et(p ?? {}, f) : a(p, u);
1261
+ (i, [f, { nodes: c, params: l, scope: u }]) => (i[f] = (p) => {
1262
+ const d = l.length ? et(p ?? {}, l) : a(p, u);
1263
1263
  return c.map(
1264
- (d) => M(d, t.__clone(h), n, s, c)
1264
+ (h) => M(h, t.__clone(d), n, s, c)
1265
1265
  );
1266
1266
  }, i),
1267
1267
  {}
@@ -1287,7 +1287,7 @@ function ts(n = "default") {
1287
1287
  function ss(n, e, t) {
1288
1288
  const { value: s, iterator: r } = n, { item: o = "item", index: a = "index" } = r || {};
1289
1289
  let i = t.__parseExpression(s) || [];
1290
- return Number.isInteger(i) && (i = new Array(i).fill(!0).map((l, c) => c + 1)), Array.isArray(i) ? i.map((l, c) => e(t.__clone({ [o]: l, [a]: c }), c)) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
1290
+ return Number.isInteger(i) && (i = new Array(i).fill(!0).map((f, c) => c + 1)), Array.isArray(i) ? i.map((f, c) => e(t.__clone({ [o]: f, [a]: c }), c)) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
1291
1291
  }
1292
1292
  const ee = Re({
1293
1293
  name: "VtjPageContainer",
@@ -1327,9 +1327,9 @@ const ee = Re({
1327
1327
  function K(n, e, t = []) {
1328
1328
  const s = [];
1329
1329
  for (const r of t) {
1330
- const { id: o, title: a, icon: i, children: l, hidden: c, layout: f } = r;
1331
- if (f) {
1332
- const u = K(n, e, l || []);
1330
+ const { id: o, title: a, icon: i, children: f, hidden: c, layout: l } = r;
1331
+ if (l) {
1332
+ const u = K(n, e, f || []);
1333
1333
  s.push(...u);
1334
1334
  } else {
1335
1335
  const u = {
@@ -1338,7 +1338,7 @@ function K(n, e, t = []) {
1338
1338
  icon: i,
1339
1339
  hidden: c,
1340
1340
  url: `${n}/${e}/${o}`,
1341
- children: l && l.length ? K(n, e, l) : void 0
1341
+ children: f && f.length ? K(n, e, f) : void 0
1342
1342
  };
1343
1343
  s.push(u);
1344
1344
  }
@@ -1361,24 +1361,24 @@ function Fs(n) {
1361
1361
  menuPathPrefix: e = "",
1362
1362
  pageRouteName: t = "page",
1363
1363
  disableMenusFilter: s = !1
1364
- } = n || {}, r = Le(), o = Pe(), a = $t(), i = oe(!1), l = oe(!1), c = r.project, f = (h, d) => {
1365
- i.value = !h?.mask, l.value = d?.pure ?? !!h?.pure;
1364
+ } = n || {}, r = Le(), o = Pe(), a = $t(), i = oe(!1), f = oe(!1), c = r.project, l = (d, h) => {
1365
+ i.value = !d?.mask, f.value = h?.pure ?? !!d?.pure;
1366
1366
  };
1367
1367
  nt(() => {
1368
- const { name: h, params: d, meta: m } = o;
1369
- if (h === x) {
1370
- const g = r.getPage(d.id);
1371
- f(g, m);
1372
- } else if (h === N) {
1368
+ const { name: d, params: h, meta: m } = o;
1369
+ if (d === x) {
1370
+ const g = r.getPage(h.id);
1371
+ l(g, m);
1372
+ } else if (d === N) {
1373
1373
  const g = r.getHomepage();
1374
- f(g, m);
1374
+ l(g, m);
1375
1375
  } else {
1376
1376
  const g = m.__vtj__;
1377
1377
  if (g) {
1378
1378
  const v = r.getPage(g);
1379
- f(v, m);
1379
+ l(v, m);
1380
1380
  } else
1381
- i.value = !m.mask, l.value = !!m.pure;
1381
+ i.value = !m.mask, f.value = !!m.pure;
1382
1382
  }
1383
1383
  });
1384
1384
  const u = K(
@@ -1392,18 +1392,18 @@ function Fs(n) {
1392
1392
  themeSwitchable: p?.themeSwitchable,
1393
1393
  title: p?.title || c?.description || c?.name || "VTJ App",
1394
1394
  menus: s ? u : He(u, a),
1395
- pure: l
1395
+ pure: f
1396
1396
  };
1397
1397
  }
1398
1398
  function te(n, e) {
1399
- const { id: t, title: s, meta: r } = n, { name: o = "page", prefix: a = "", component: i, routeMeta: l } = e;
1399
+ const { id: t, title: s, meta: r } = n, { name: o = "page", prefix: a = "", component: i, routeMeta: f } = e;
1400
1400
  return {
1401
1401
  name: t,
1402
1402
  path: `${a}${o}/${t}`,
1403
1403
  component: i,
1404
1404
  meta: {
1405
1405
  title: s,
1406
- ...l,
1406
+ ...f,
1407
1407
  ...r,
1408
1408
  __vtj__: t
1409
1409
  }
@@ -1418,9 +1418,9 @@ function le(n) {
1418
1418
  loader: o,
1419
1419
  routeMeta: a,
1420
1420
  homepage: i
1421
- } = n, l = [];
1421
+ } = n, f = [];
1422
1422
  for (const c of s) {
1423
- const { id: f, title: u, dir: p, layout: h, children: d, meta: m } = c;
1423
+ const { id: l, title: u, dir: p, layout: d, children: h, meta: m } = c;
1424
1424
  if (p) {
1425
1425
  const g = le({
1426
1426
  name: e,
@@ -1429,10 +1429,10 @@ function le(n) {
1429
1429
  routeMeta: a,
1430
1430
  homepage: i,
1431
1431
  loader: o,
1432
- pages: d || []
1432
+ pages: h || []
1433
1433
  });
1434
- l.push(...g);
1435
- } else if (h) {
1434
+ f.push(...g);
1435
+ } else if (d) {
1436
1436
  const g = le({
1437
1437
  name: e,
1438
1438
  prefix: t,
@@ -1440,77 +1440,77 @@ function le(n) {
1440
1440
  routeMeta: a,
1441
1441
  homepage: i,
1442
1442
  loader: o,
1443
- pages: d || []
1443
+ pages: h || []
1444
1444
  }), v = {
1445
- name: `layout_${f}`,
1445
+ name: `layout_${l}`,
1446
1446
  path: t,
1447
- component: () => o(f),
1447
+ component: () => o(l),
1448
1448
  meta: {
1449
1449
  title: u,
1450
1450
  ...a,
1451
1451
  ...m,
1452
- __vtj__: f
1452
+ __vtj__: l
1453
1453
  },
1454
1454
  children: g
1455
1455
  };
1456
- l.push(v), l.push(te(c, n));
1457
- } else if (l.push(te(c, n)), i === f) {
1456
+ f.push(v), f.push(te(c, n));
1457
+ } else if (f.push(te(c, n)), i === l) {
1458
1458
  const g = te(c, n);
1459
- g.path = "", g.name = `home_${f}`, l.push(g);
1459
+ g.path = "", g.name = `home_${l}`, f.push(g);
1460
1460
  }
1461
1461
  }
1462
- return l;
1462
+ return f;
1463
1463
  }
1464
1464
  function rs(n = {}, e) {
1465
- const { css: t, store: s, enhance: r } = n, { window: o, app: a, library: i = {}, adapter: l, mode: c } = e, { Pinia: f } = i;
1466
- a.config.globalProperties.$libs = i, fe(o, "global-css", t || ""), f && s && os(s, a, f), as(a, l, n), !l.access && n.access && is(n.access, a, c, l), cs(a, n), r && ls(r, a, i);
1465
+ const { css: t, store: s, enhance: r } = n, { window: o, app: a, library: i = {}, adapter: f, mode: c } = e, { Pinia: l } = i;
1466
+ a.config.globalProperties.$libs = i, fe(o, "global-css", t || ""), l && s && os(s, a, l), as(a, f, n), !f.access && n.access && is(n.access, a, c, f), cs(a, n), r && ls(r, a, i);
1467
1467
  }
1468
1468
  function os(n, e, t) {
1469
1469
  const s = t.createPinia();
1470
- if (e.use(s), b(n) && n.value) {
1470
+ if (e.use(s), E(n) && n.value) {
1471
1471
  const r = R(n, {}, !1, !1, !0), o = t.defineStore("$store", r(e) || {});
1472
1472
  e.config.globalProperties.$store = o();
1473
1473
  }
1474
1474
  }
1475
1475
  function is(n, e, t, s) {
1476
- if (b(n) && n.value) {
1476
+ if (E(n) && n.value) {
1477
1477
  const r = R(n, {}, !1, !1, !0), { alert: o, request: a } = s, i = new pe({
1478
1478
  alert: o,
1479
1479
  storagePrefix: "__VTJ_APP_",
1480
1480
  ...r(e)
1481
- }), l = e.config.globalProperties.$router;
1482
- i.connect({ mode: t, router: l, request: a }), e.use(i);
1481
+ }), f = e.config.globalProperties.$router;
1482
+ i.connect({ mode: t, router: f, request: a }), e.use(i);
1483
1483
  }
1484
1484
  }
1485
1485
  function as(n, e, t) {
1486
1486
  if (!e.request) return;
1487
1487
  const { axios: s, request: r, response: o } = t;
1488
- if (s && b(s) && s.value) {
1488
+ if (s && E(s) && s.value) {
1489
1489
  const a = R(s, {}, !1, !1, !0);
1490
1490
  e.request.setConfig(a(n));
1491
1491
  }
1492
- if (r && b(r) && r.value) {
1492
+ if (r && E(r) && r.value) {
1493
1493
  const a = R(r, {}, !1, !1, !0), i = e.request;
1494
- i.__unReq && i.__unReq(), i.__unReq = e.request.useRequest((l) => a(l, n));
1494
+ i.__unReq && i.__unReq(), i.__unReq = e.request.useRequest((f) => a(f, n));
1495
1495
  }
1496
- if (o && b(o) && o.value) {
1496
+ if (o && E(o) && o.value) {
1497
1497
  const a = R(o, {}, !1, !1, !0), i = e.request;
1498
- i.__unRes && i.__unRes(), i.__unRes = e.request.useResponse((l) => a(l, n));
1498
+ i.__unRes && i.__unRes(), i.__unRes = e.request.useResponse((f) => a(f, n));
1499
1499
  }
1500
1500
  }
1501
1501
  function cs(n, e) {
1502
1502
  const { beforeEach: t, afterEach: s } = e, r = n.config.globalProperties.$router;
1503
- if (t && b(t) && t.value) {
1503
+ if (t && E(t) && t.value) {
1504
1504
  const o = R(t, {}, !1, !1, !0);
1505
- r && r.beforeEach((a, i, l) => o(a, i, l, n));
1505
+ r && r.beforeEach((a, i, f) => o(a, i, f, n));
1506
1506
  }
1507
- if (s && b(s) && s.value) {
1507
+ if (s && E(s) && s.value) {
1508
1508
  const o = R(s, {}, !1, !1, !0);
1509
- r && r.afterEach((a, i, l) => o(a, i, l, n));
1509
+ r && r.afterEach((a, i, f) => o(a, i, f, n));
1510
1510
  }
1511
1511
  }
1512
1512
  function ls(n, e, t = {}) {
1513
- b(n) && n.value && R(n, {}, !1, !1, !0)(e, t);
1513
+ E(n) && n.value && R(n, {}, !1, !1, !0)(e, t);
1514
1514
  }
1515
1515
  function us(n, e, t) {
1516
1516
  if (!n || !e || !t) return;
@@ -1518,17 +1518,17 @@ function us(n, e, t) {
1518
1518
  if (s) {
1519
1519
  const { locale: r, fallbackLocale: o, messages: a = [] } = t, i = {};
1520
1520
  for (let c of a) {
1521
- const f = Object.keys(c).filter((u) => u !== "key");
1522
- for (const u of f)
1521
+ const l = Object.keys(c).filter((u) => u !== "key");
1522
+ for (const u of l)
1523
1523
  i[u] || (i[u] = {}), i[u][c.key] = c[u];
1524
1524
  }
1525
- const l = s.createI18n({
1525
+ const f = s.createI18n({
1526
1526
  legacy: !1,
1527
1527
  locale: r,
1528
1528
  fallbackLocale: o,
1529
1529
  messages: i
1530
1530
  });
1531
- n.use(l);
1531
+ n.use(f);
1532
1532
  }
1533
1533
  }
1534
1534
  const Be = Symbol("Provider");
@@ -1547,16 +1547,16 @@ class ps extends Ke {
1547
1547
  materials: o,
1548
1548
  project: a = {},
1549
1549
  adapter: i = {},
1550
- globals: l = {},
1550
+ globals: f = {},
1551
1551
  modules: c = {},
1552
- router: f = null,
1552
+ router: l = null,
1553
1553
  materialPath: u = "./",
1554
1554
  nodeEnv: p = "development"
1555
1555
  /* Development */
1556
1556
  } = e;
1557
- this.mode = s, this.modules = c, this.service = t, this.router = f, this.materialPath = u, this.nodeEnv = p, r && (this.dependencies = r), o && (this.materials = o), Object.assign(this.globals, l), Object.assign(this.adapter, i);
1558
- const { access: h, request: d } = this.adapter;
1559
- h && h.connect({ mode: s, router: f, request: d }), a && s !== w.Design ? this.load(a) : this.project = a;
1557
+ this.mode = s, this.modules = c, this.service = t, this.router = l, this.materialPath = u, this.nodeEnv = p, r && (this.dependencies = r), o && (this.materials = o), Object.assign(this.globals, f), Object.assign(this.adapter, i);
1558
+ const { access: d, request: h } = this.adapter;
1559
+ d && d.connect({ mode: s, router: l, request: h }), a && s !== w.Design ? this.load(a) : this.project = a;
1560
1560
  }
1561
1561
  mode;
1562
1562
  // 当前运行模式(设计/源码/预览等)
@@ -1564,7 +1564,7 @@ class ps extends Ke {
1564
1564
  // 全局变量
1565
1565
  modules = {};
1566
1566
  // 异步模块加载器
1567
- adapter = { request: ne, jsonp: Ee };
1567
+ adapter = { request: ne, jsonp: be };
1568
1568
  // 适配器接口
1569
1569
  apis = {};
1570
1570
  // API集合
@@ -1641,21 +1641,21 @@ class ps extends Ke {
1641
1641
  components: o,
1642
1642
  materialPath: a,
1643
1643
  nodeEnv: i,
1644
- libraryLocales: l
1644
+ libraryLocales: f
1645
1645
  } = this, {
1646
1646
  libraryExports: c,
1647
- libraryMap: f,
1647
+ libraryMap: l,
1648
1648
  materials: u,
1649
1649
  materialExports: p,
1650
- materialMapLibrary: h,
1651
- libraryLocaleMap: d
1650
+ materialMapLibrary: d,
1651
+ libraryLocaleMap: h
1652
1652
  } = lt(
1653
1653
  t,
1654
1654
  a,
1655
1655
  i === "development"
1656
1656
  /* Development */
1657
1657
  );
1658
- Object.assign(this.libraryLocaleMap, d);
1658
+ Object.assign(this.libraryLocaleMap, h);
1659
1659
  for (const m of c) {
1660
1660
  const g = s[m], v = e[m];
1661
1661
  if (v)
@@ -1663,15 +1663,15 @@ class ps extends Ke {
1663
1663
  else if (g)
1664
1664
  e[m] = r[m] = await g();
1665
1665
  else {
1666
- const y = f[m] || [];
1666
+ const y = l[m] || [];
1667
1667
  for (const S of y)
1668
1668
  G(S) && await gt(S, k.append(S, { v: T })), V(S) && await _e(k.append(S, { v: T }));
1669
1669
  r[m] = e[m];
1670
1670
  }
1671
- const _ = d[m];
1671
+ const _ = h[m];
1672
1672
  if (_) {
1673
1673
  const y = s[_];
1674
- l[_] = y ? await y() : e[_];
1674
+ f[_] = y ? await y() : e[_];
1675
1675
  }
1676
1676
  }
1677
1677
  if (i === "development") {
@@ -1679,7 +1679,7 @@ class ps extends Ke {
1679
1679
  await _e(k.append(g, { v: T }));
1680
1680
  const m = this.materials || {};
1681
1681
  for (const g of p) {
1682
- const v = e[h[g]], _ = v?.default || v, y = ze[g];
1682
+ const v = e[d[g]], _ = v?.default || v, y = ze[g];
1683
1683
  if (y)
1684
1684
  _ && y.forEach((S) => {
1685
1685
  o[S] = _[S];
@@ -1699,8 +1699,8 @@ class ps extends Ke {
1699
1699
  const o = t?.platform === "uniapp" ? "pages" : "page", {
1700
1700
  routeAppendTo: a,
1701
1701
  pageRouteName: i = o,
1702
- routeMeta: l
1703
- } = s, c = a ? "" : "/", f = {
1702
+ routeMeta: f
1703
+ } = s, c = a ? "" : "/", l = {
1704
1704
  path: `${c}${i}/:id`,
1705
1705
  name: x,
1706
1706
  component: ee
@@ -1708,7 +1708,7 @@ class ps extends Ke {
1708
1708
  path: c,
1709
1709
  name: N,
1710
1710
  component: t?.homepage ? ee : r.startupComponent || ns,
1711
- meta: l
1711
+ meta: f
1712
1712
  };
1713
1713
  if (e.hasRoute(x) && e.removeRoute(x), e.hasRoute(N) && e.removeRoute(N), s.enableStaticRoute) {
1714
1714
  const p = t?.pages || [];
@@ -1719,11 +1719,11 @@ class ps extends Ke {
1719
1719
  component: ee,
1720
1720
  loader: this.getRenderComponent.bind(this),
1721
1721
  homepage: t?.homepage
1722
- }).forEach((d) => {
1723
- a ? e.addRoute(a, d) : e.addRoute(d);
1722
+ }).forEach((h) => {
1723
+ a ? e.addRoute(a, h) : e.addRoute(h);
1724
1724
  }), t?.homepage || (a ? e.addRoute(a, u) : e.addRoute(u));
1725
1725
  } else
1726
- a ? (e.addRoute(a, f), e.addRoute(a, u)) : (e.addRoute(f), e.addRoute(u));
1726
+ a ? (e.addRoute(a, l), e.addRoute(a, u)) : (e.addRoute(l), e.addRoute(u));
1727
1727
  }
1728
1728
  setErrorHandler(e) {
1729
1729
  e.config.errorHandler = tt((t, s, r) => {
@@ -1753,7 +1753,7 @@ class ps extends Ke {
1753
1753
  const { libraryLocaleMap: t, libraryLocales: s } = this, { libraryOptions: r = {} } = this.options, o = e.config.globalProperties.installed || {};
1754
1754
  for (const [a, i] of Object.entries(this.library))
1755
1755
  if (!o[a] && vt(i)) {
1756
- const c = { locale: s[t[a]] }, f = r[a] || {}, u = { ...c, ...f };
1756
+ const c = { locale: s[t[a]] }, l = r[a] || {}, u = { ...c, ...l };
1757
1757
  e.use(i, u), o[a] = !0;
1758
1758
  }
1759
1759
  e.provide(Be, 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 || {}, {
@@ -1822,7 +1822,7 @@ class ps extends Ke {
1822
1822
  apis: a,
1823
1823
  window,
1824
1824
  ...t
1825
- }, l = ae({
1825
+ }, f = ae({
1826
1826
  getDsl: async (c) => await this.getDsl(c) || null,
1827
1827
  getDslByUrl: async (c) => await this.getDslByUrl(c) || null,
1828
1828
  options: i
@@ -1830,7 +1830,7 @@ class ps extends Ke {
1830
1830
  return ie({
1831
1831
  ...i,
1832
1832
  dsl: e,
1833
- loader: l
1833
+ loader: f
1834
1834
  });
1835
1835
  }
1836
1836
  /**
@@ -1965,7 +1965,7 @@ const Ne = {
1965
1965
  }
1966
1966
  }).then((r) => r && r[0] ? r[0] : null).catch(() => null);
1967
1967
  function Ms(n) {
1968
- return be({
1968
+ return Ee({
1969
1969
  settings: {
1970
1970
  type: "json",
1971
1971
  validSuccess: !0,
@@ -2283,17 +2283,17 @@ export {
2283
2283
  mt as convertCssRpx,
2284
2284
  As as createAccess,
2285
2285
  Cs as createAdapter,
2286
- bs as createAssetScripts,
2287
- Es as createAssetsCss,
2286
+ Es as createAssetScripts,
2287
+ bs as createAssetsCss,
2288
2288
  xt as createDataSources,
2289
2289
  ae as createLoader,
2290
2290
  xs as createMemoryService,
2291
2291
  K as createMenus,
2292
- Et as createMetaApi,
2292
+ bt as createMetaApi,
2293
2293
  Pt as createMock,
2294
2294
  ks as createProvider,
2295
2295
  ie as createRenderer,
2296
- bt as createSchemaApi,
2296
+ Et as createSchemaApi,
2297
2297
  jt as createSchemaApis,
2298
2298
  Ms as createServiceRequest,
2299
2299
  Bt as defaultLoader,
@@ -2305,8 +2305,8 @@ export {
2305
2305
  yt as isBuiltInTag,
2306
2306
  G as isCSSUrl,
2307
2307
  wt as isJSCode,
2308
- E as isJSExpression,
2309
- b as isJSFunction,
2308
+ b as isJSExpression,
2309
+ E as isJSFunction,
2310
2310
  at as isJSON,
2311
2311
  V as isJSUrl,
2312
2312
  _t as isNativeTag,