@vtj/renderer 0.15.2 → 0.16.0
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.cjs +6 -6
- package/dist/index.mjs +431 -427
- package/package.json +5 -5
- package/types/provider/provider.d.ts +2 -0
- package/types/version.d.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Base as Je, BUILT_IN_COMPONENTS as Ke, ProjectModel as U, HistoryModel as $e } from "@vtj/core";
|
|
2
|
-
import { url as k, isUrl as se, dedupArray as
|
|
3
|
-
import * as
|
|
4
|
-
import { inject as je, defineComponent as Re, h as re, ref as
|
|
2
|
+
import { url as k, isUrl as se, dedupArray as ze, isFunction as q, isString as I, logger as O, storage as X, cookie as Y, toArray as ge, unRSA as ye, delay as J, createRequest as be, jsonp as Ee, merge as Ge, pathToRegexp as Ve, pathToRegexpMatch as We, formDataToJson as Qe, Queue as Xe, cloneDeep as ve, camelCase as C, upperFirst as Ye, pick as Ze, request as ne, loadScript as _e, debounce as et, Storage as tt, mapToObject as ue } from "@vtj/utils";
|
|
3
|
+
import * as z from "vue";
|
|
4
|
+
import { inject as je, defineComponent as Re, h as re, ref as oe, watchEffect as st, defineAsyncComponent as we } from "vue";
|
|
5
5
|
import { useRoute as Pe } from "vue-router";
|
|
6
6
|
/**!
|
|
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.
|
|
10
|
+
* @version 0.16.0
|
|
11
11
|
* @license <a href="https://vtj.pro/license.html">MIT License</a>
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const M = "0.16.0";
|
|
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",
|
|
@@ -24,7 +24,7 @@ const Se = [
|
|
|
24
24
|
"$props",
|
|
25
25
|
"$options",
|
|
26
26
|
"$forceUpdate"
|
|
27
|
-
],
|
|
27
|
+
], vs = [
|
|
28
28
|
"beforeCreate",
|
|
29
29
|
"created",
|
|
30
30
|
"beforeMount",
|
|
@@ -38,7 +38,7 @@ const Se = [
|
|
|
38
38
|
"renderTriggered",
|
|
39
39
|
"activated",
|
|
40
40
|
"deactivated"
|
|
41
|
-
],
|
|
41
|
+
], nt = [
|
|
42
42
|
"vIf",
|
|
43
43
|
"vElseIf",
|
|
44
44
|
"vElse",
|
|
@@ -47,7 +47,7 @@ const Se = [
|
|
|
47
47
|
"vFor",
|
|
48
48
|
"vBind",
|
|
49
49
|
"vHtml"
|
|
50
|
-
],
|
|
50
|
+
], rt = {
|
|
51
51
|
String,
|
|
52
52
|
Number,
|
|
53
53
|
Boolean,
|
|
@@ -55,9 +55,9 @@ const Se = [
|
|
|
55
55
|
Object,
|
|
56
56
|
Function,
|
|
57
57
|
Date
|
|
58
|
-
},
|
|
58
|
+
}, T = "VtjPage", N = "VtjHomepage", ot = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot,svg".split(
|
|
59
59
|
","
|
|
60
|
-
), it = "component,slot".split(","),
|
|
60
|
+
), it = "component,slot".split(","), _s = [
|
|
61
61
|
"h",
|
|
62
62
|
"t",
|
|
63
63
|
"t",
|
|
@@ -77,7 +77,7 @@ const Se = [
|
|
|
77
77
|
"p",
|
|
78
78
|
"r",
|
|
79
79
|
"o"
|
|
80
|
-
].join(""),
|
|
80
|
+
].join(""), ws = {
|
|
81
81
|
auth: [
|
|
82
82
|
"h",
|
|
83
83
|
"t",
|
|
@@ -140,59 +140,59 @@ const Se = [
|
|
|
140
140
|
function B(n, e) {
|
|
141
141
|
return n.map((t) => se(t) || t.startsWith("/") ? t : `${e}${t}`);
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function G(n) {
|
|
144
144
|
return /\.css$/.test(n);
|
|
145
145
|
}
|
|
146
146
|
function V(n) {
|
|
147
147
|
return /\.js$/.test(n);
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function at(n) {
|
|
150
150
|
return /\.json$/.test(n);
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function Ss(n) {
|
|
153
153
|
return n.map(
|
|
154
|
-
(e) => `<script src="${k.append(e, { v:
|
|
154
|
+
(e) => `<script src="${k.append(e, { v: M })}"><\/script>`
|
|
155
155
|
).join("");
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function $s(n = []) {
|
|
158
158
|
return n.map(
|
|
159
|
-
(e) => `<link rel="stylesheet" href="${k.append(e, { v:
|
|
159
|
+
(e) => `<link rel="stylesheet" href="${k.append(e, { v: M })}" />`
|
|
160
160
|
).join("");
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function ct(n, e = !1) {
|
|
163
163
|
return e && n.endsWith(".prod.js") ? n.replace(".prod.js", ".js") : n;
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
const s = n.filter((p) => !!p.enabled), r = [],
|
|
165
|
+
function lt(n, e, t = !1) {
|
|
166
|
+
const s = n.filter((p) => !!p.enabled), r = [], o = [], a = [], i = [], l = {}, c = {}, f = [], u = {};
|
|
167
167
|
return s.forEach(
|
|
168
168
|
({ urls: p, assetsUrl: h, library: d, assetsLibrary: m, localeLibrary: g }) => {
|
|
169
169
|
p?.forEach((y) => {
|
|
170
|
-
V(y) && r.push(
|
|
171
|
-
}), d && (
|
|
170
|
+
V(y) && r.push(ct(y, t)), G(y) && o.push(y);
|
|
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);
|
|
172
172
|
}
|
|
173
173
|
), {
|
|
174
174
|
scripts: B(r, e),
|
|
175
|
-
css: B(
|
|
175
|
+
css: B(o, e),
|
|
176
176
|
materials: B(a, e),
|
|
177
|
-
libraryExports:
|
|
178
|
-
materialExports:
|
|
177
|
+
libraryExports: i,
|
|
178
|
+
materialExports: ze(f),
|
|
179
179
|
materialMapLibrary: u,
|
|
180
180
|
libraryMap: l,
|
|
181
181
|
libraryLocaleMap: c
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function ut(n, e) {
|
|
185
185
|
const { name: t, parent: s, alias: r } = n;
|
|
186
186
|
return s ? e[s]?.[r || t] : e[r || t];
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
const e = n.filter((s) =>
|
|
188
|
+
function ft(n = []) {
|
|
189
|
+
const e = n.filter((s) => G(s)), t = n.filter((s) => V(s));
|
|
190
190
|
return {
|
|
191
191
|
css: e,
|
|
192
192
|
js: t
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function pt(n, e) {
|
|
196
196
|
const t = (c) => {
|
|
197
197
|
const f = [];
|
|
198
198
|
let u = 0;
|
|
@@ -260,7 +260,7 @@ function ft(n, e) {
|
|
|
260
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
261
|
const h = u.trim(), d = p.trim();
|
|
262
262
|
return h ? `${h}[${e}] ${d}` : d;
|
|
263
|
-
}),
|
|
263
|
+
}), o = (c) => {
|
|
264
264
|
const f = c.trim();
|
|
265
265
|
if (!f || f.includes(`[${e}]`) || /^(:root|:host|html|body)(\s|$|:|\.|\#|\[)/.test(f) || s(f))
|
|
266
266
|
return f;
|
|
@@ -270,7 +270,7 @@ function ft(n, e) {
|
|
|
270
270
|
return d ? `${d}[${e}]${h}` : f;
|
|
271
271
|
}
|
|
272
272
|
return `${f}[${e}]`;
|
|
273
|
-
}, a = (c) => r(c).split(",").map((u) =>
|
|
273
|
+
}, a = (c) => r(c).split(",").map((u) => o(u)).filter((u) => u.trim()).join(", "), i = (c) => c.map((f) => {
|
|
274
274
|
switch (f.type) {
|
|
275
275
|
case "simple-at-rule":
|
|
276
276
|
return f.content;
|
|
@@ -278,7 +278,7 @@ function ft(n, e) {
|
|
|
278
278
|
return f.content;
|
|
279
279
|
case "at-rule":
|
|
280
280
|
try {
|
|
281
|
-
const p = t(f.inner), h =
|
|
281
|
+
const p = t(f.inner), h = i(p);
|
|
282
282
|
return `${f.rule} { ${h} }`;
|
|
283
283
|
} catch {
|
|
284
284
|
return f.content;
|
|
@@ -294,7 +294,7 @@ function ft(n, e) {
|
|
|
294
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();
|
|
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 =
|
|
297
|
+
`), f = t(c), u = i(f);
|
|
298
298
|
return l(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(
|
|
@@ -306,37 +306,37 @@ function ft(n, e) {
|
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
const
|
|
310
|
-
function
|
|
309
|
+
const dt = 750;
|
|
310
|
+
function ht(n, e, t) {
|
|
311
311
|
let s;
|
|
312
312
|
typeof n < "u" ? s = n.innerWidth || n.document.documentElement.clientWidth : (console.warn("无法获取屏幕宽度,使用默认值375"), s = 375);
|
|
313
|
-
const r = t ||
|
|
313
|
+
const r = t || dt;
|
|
314
314
|
return e * s / r;
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
let t = !1, s = !1, r = !1,
|
|
316
|
+
function mt(n, e) {
|
|
317
|
+
let t = !1, s = !1, r = !1, o = "";
|
|
318
318
|
for (let a = 0; a < e.length; a++) {
|
|
319
|
-
const
|
|
320
|
-
if (
|
|
319
|
+
const i = e[a];
|
|
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
321
|
const l = e.substr(a).match(/^(-?\d+(?:\.\d+)?)\s*rpx/);
|
|
322
322
|
if (l) {
|
|
323
|
-
const c = l[1], f = parseFloat(c), p = `${
|
|
324
|
-
|
|
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;
|
|
325
325
|
continue;
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
|
|
328
|
+
o += i;
|
|
329
329
|
}
|
|
330
|
-
return
|
|
330
|
+
return o;
|
|
331
331
|
}
|
|
332
332
|
function Ce(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,
|
|
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
337
|
if (r.prototype.replaceSync) {
|
|
338
338
|
const l = new r();
|
|
339
|
-
l.id = e, l.replaceSync(
|
|
339
|
+
l.id = e, l.replaceSync(i);
|
|
340
340
|
const c = n.document, f = c.adoptedStyleSheets, u = Array.from(f).filter(
|
|
341
341
|
(p) => p.id !== e
|
|
342
342
|
);
|
|
@@ -344,10 +344,10 @@ function fe(n, e, t, s = !1) {
|
|
|
344
344
|
} else {
|
|
345
345
|
const l = n.document;
|
|
346
346
|
let c = l.getElementById(e);
|
|
347
|
-
c ? c.innerHTML =
|
|
347
|
+
c ? c.innerHTML = i : (c = l.createElement("style"), c.id = e, c.innerHTML = i, l.head.appendChild(c));
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function bs(n) {
|
|
351
351
|
const e = n.adoptedStyleSheets || [];
|
|
352
352
|
let t = "";
|
|
353
353
|
if (e.forEach((s) => {
|
|
@@ -363,7 +363,7 @@ function $s(n) {
|
|
|
363
363
|
s.textContent = t, n.head.appendChild(s);
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
async function
|
|
366
|
+
async function gt(n, e) {
|
|
367
367
|
const t = await window.fetch(e).then((s) => s.text()).catch(() => "");
|
|
368
368
|
t && fe(window, n, t);
|
|
369
369
|
}
|
|
@@ -377,26 +377,26 @@ function Ae(n, e = window) {
|
|
|
377
377
|
}
|
|
378
378
|
async function Ie(n, e, t = window) {
|
|
379
379
|
const s = t.document, r = t.document.head;
|
|
380
|
-
let
|
|
381
|
-
return
|
|
380
|
+
let o = t[e];
|
|
381
|
+
return o ? o.default || o : new Promise((a, i) => {
|
|
382
382
|
for (const l of n) {
|
|
383
383
|
const c = s.createElement("script");
|
|
384
384
|
c.src = l, c.onload = () => {
|
|
385
|
-
|
|
385
|
+
o = t[e], o ? a(o.default || o) : i(null);
|
|
386
386
|
}, c.onerror = (f) => {
|
|
387
|
-
|
|
387
|
+
i(f);
|
|
388
388
|
}, r.appendChild(c);
|
|
389
389
|
}
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function yt(n) {
|
|
393
393
|
return q(n) && Object.getOwnPropertyNames(n.prototype || {}).length === 0 || q(n?.install);
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function vt(n) {
|
|
396
396
|
return it.includes(n);
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
return
|
|
398
|
+
function _t(n) {
|
|
399
|
+
return ot.includes(n);
|
|
400
400
|
}
|
|
401
401
|
function D(n = window) {
|
|
402
402
|
const e = window?.Mock;
|
|
@@ -405,37 +405,37 @@ function D(n = window) {
|
|
|
405
405
|
if (t && window)
|
|
406
406
|
return window.Mock = t, t;
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function Es(n, e, t) {
|
|
409
409
|
Object.assign(e.meta, t.meta);
|
|
410
410
|
const s = n?._container;
|
|
411
411
|
t?.type === "page" && s.classList.add("is-page"), t?.pure && s.classList.add("is-pure");
|
|
412
412
|
}
|
|
413
413
|
function H(n, e, t = !1, s = !1, r = !1) {
|
|
414
414
|
try {
|
|
415
|
-
const
|
|
416
|
-
|
|
415
|
+
const o = ['"use strict";', "var __self = arguments[0];"];
|
|
416
|
+
o.push("return ");
|
|
417
417
|
let a = (n.value || "").trim();
|
|
418
|
-
r || (a = a.replace(/this(\W|$)/g, (l, c) => `__self${c}`)), a =
|
|
418
|
+
r || (a = a.replace(/this(\W|$)/g, (l, c) => `__self${c}`)), a = o.join(`
|
|
419
419
|
`) + a;
|
|
420
|
-
const
|
|
420
|
+
const i = r ? `
|
|
421
421
|
${a}
|
|
422
422
|
` : `with(${t ? "{}" : "$scope || {}"}) { ${a} }`;
|
|
423
|
-
return new Function("$scope",
|
|
424
|
-
} catch (
|
|
425
|
-
if (O.error("parseExpression.error",
|
|
426
|
-
throw
|
|
423
|
+
return new Function("$scope", i)(e);
|
|
424
|
+
} catch (o) {
|
|
425
|
+
if (O.error("parseExpression.error", o, n, e?.__self ?? e), s)
|
|
426
|
+
throw o;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
429
|
function j(n, e, t = !1, s = !1, r = !1) {
|
|
430
|
-
const
|
|
431
|
-
if (typeof
|
|
430
|
+
const o = H(n, e, t, s, r);
|
|
431
|
+
if (typeof o != "function" && (O.error(
|
|
432
432
|
"parseFunction.error",
|
|
433
433
|
"not a function",
|
|
434
434
|
n,
|
|
435
435
|
e?.__self ?? e
|
|
436
436
|
), s))
|
|
437
437
|
throw new Error(`"${n.value}" not a function`);
|
|
438
|
-
return
|
|
438
|
+
return o;
|
|
439
439
|
}
|
|
440
440
|
function E(n) {
|
|
441
441
|
return n && n.type === "JSExpression";
|
|
@@ -443,13 +443,13 @@ function E(n) {
|
|
|
443
443
|
function b(n) {
|
|
444
444
|
return typeof n == "object" && n && n.type === "JSFunction";
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function wt(n) {
|
|
447
447
|
return E(n) || b(n);
|
|
448
448
|
}
|
|
449
|
-
function
|
|
450
|
-
return
|
|
449
|
+
function js(n) {
|
|
450
|
+
return wt(n) ? n.value : JSON.stringify(n);
|
|
451
451
|
}
|
|
452
|
-
const
|
|
452
|
+
const St = {
|
|
453
453
|
session: !1,
|
|
454
454
|
authKey: "Authorization",
|
|
455
455
|
storageKey: "ACCESS_STORAGE",
|
|
@@ -470,7 +470,7 @@ class pe {
|
|
|
470
470
|
interceptResponse = !0;
|
|
471
471
|
isTipShowing = !1;
|
|
472
472
|
constructor(e) {
|
|
473
|
-
this.options = Object.assign({},
|
|
473
|
+
this.options = Object.assign({}, St, e), this.loadData();
|
|
474
474
|
}
|
|
475
475
|
enableIntercept() {
|
|
476
476
|
this.interceptResponse = !0;
|
|
@@ -483,11 +483,11 @@ class pe {
|
|
|
483
483
|
this.mode = t, s && this.mode !== w.Design && this.setGuard(s), r && this.setRequest(r);
|
|
484
484
|
}
|
|
485
485
|
login(e) {
|
|
486
|
-
const { storageKey: t, storagePrefix: s, session: r, authKey:
|
|
486
|
+
const { storageKey: t, storagePrefix: s, session: r, authKey: o } = this.options;
|
|
487
487
|
this.setData(e), this.data && (X.save(t, e, {
|
|
488
488
|
type: "local",
|
|
489
489
|
prefix: s
|
|
490
|
-
}), r && Y.set(
|
|
490
|
+
}), r && Y.set(o, this.data.token));
|
|
491
491
|
}
|
|
492
492
|
clear() {
|
|
493
493
|
const { storageKey: e, storagePrefix: t, session: s, authKey: r } = this.options;
|
|
@@ -507,11 +507,11 @@ class pe {
|
|
|
507
507
|
}
|
|
508
508
|
can(e) {
|
|
509
509
|
const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
|
|
510
|
-
return typeof e == "function" ? e(s) : ge(e).every((
|
|
510
|
+
return typeof e == "function" ? e(s) : ge(e).every((o) => s[o] || s[t + "." + o]);
|
|
511
511
|
}
|
|
512
512
|
some(e) {
|
|
513
513
|
const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
|
|
514
|
-
return ge(e).some((
|
|
514
|
+
return ge(e).some((o) => s[o] || s[t + "." + o]);
|
|
515
515
|
}
|
|
516
516
|
install(e) {
|
|
517
517
|
e.config.globalProperties.$access = this, e.provide(Fe, this);
|
|
@@ -565,7 +565,7 @@ class pe {
|
|
|
565
565
|
return e && t ? !!Y.get(t) : !!this.getToken();
|
|
566
566
|
}
|
|
567
567
|
hasRoutePermission(e) {
|
|
568
|
-
if (e.name ===
|
|
568
|
+
if (e.name === T) {
|
|
569
569
|
const t = e.params.id;
|
|
570
570
|
return t && this.can(t);
|
|
571
571
|
}
|
|
@@ -619,18 +619,18 @@ class pe {
|
|
|
619
619
|
);
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function $t() {
|
|
623
623
|
return je(Fe, null);
|
|
624
624
|
}
|
|
625
|
-
function
|
|
625
|
+
function Rs(n = {}) {
|
|
626
626
|
const {
|
|
627
627
|
notify: e,
|
|
628
628
|
loading: t,
|
|
629
629
|
settings: s = {},
|
|
630
630
|
Startup: r,
|
|
631
|
-
access:
|
|
631
|
+
access: o,
|
|
632
632
|
useTitle: a,
|
|
633
|
-
alert:
|
|
633
|
+
alert: i
|
|
634
634
|
} = n;
|
|
635
635
|
let l = null;
|
|
636
636
|
return {
|
|
@@ -658,15 +658,15 @@ function js(n = {}) {
|
|
|
658
658
|
notify: e,
|
|
659
659
|
loading: t,
|
|
660
660
|
useTitle: a,
|
|
661
|
-
alert:
|
|
661
|
+
alert: i,
|
|
662
662
|
startupComponent: r,
|
|
663
|
-
access:
|
|
663
|
+
access: o ? new pe({ alert: i, ...o }) : void 0
|
|
664
664
|
};
|
|
665
665
|
}
|
|
666
|
-
function
|
|
666
|
+
function Ps(n = {}) {
|
|
667
667
|
return new pe(n);
|
|
668
668
|
}
|
|
669
|
-
function
|
|
669
|
+
function bt(n, e) {
|
|
670
670
|
const { jsonp: t, request: s } = e;
|
|
671
671
|
if (n.method === "jsonp")
|
|
672
672
|
return (r = {}) => t(n.url, {
|
|
@@ -674,7 +674,7 @@ function $t(n, e) {
|
|
|
674
674
|
query: r
|
|
675
675
|
});
|
|
676
676
|
{
|
|
677
|
-
const r = n.headers ? H(n.headers, {}, !0) : void 0,
|
|
677
|
+
const r = n.headers ? H(n.headers, {}, !0) : void 0, o = {
|
|
678
678
|
url: n.url,
|
|
679
679
|
method: n.method,
|
|
680
680
|
settings: {
|
|
@@ -682,61 +682,61 @@ function $t(n, e) {
|
|
|
682
682
|
headers: r
|
|
683
683
|
}
|
|
684
684
|
};
|
|
685
|
-
return (a,
|
|
685
|
+
return (a, i) => (delete o.data, s.send(Ge(o, i || {}, { data: a })));
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function Et(n, e) {
|
|
689
689
|
const { metaQuery: t } = e;
|
|
690
690
|
if (!t) return;
|
|
691
691
|
const { code: s, queryCode: r } = n;
|
|
692
|
-
return (
|
|
692
|
+
return (o, a) => {
|
|
693
693
|
if (!t) {
|
|
694
694
|
console.warn("adapter.metaQuery is not defined!");
|
|
695
695
|
return;
|
|
696
696
|
}
|
|
697
|
-
return t(s, r,
|
|
697
|
+
return t(s, r, o, a);
|
|
698
698
|
};
|
|
699
699
|
}
|
|
700
|
-
function
|
|
700
|
+
function jt(n = [], e = [], t) {
|
|
701
701
|
const s = {};
|
|
702
702
|
for (const r of n) {
|
|
703
|
-
const
|
|
704
|
-
s[r.id] =
|
|
703
|
+
const o = bt(r, t);
|
|
704
|
+
s[r.id] = o, s[r.name] = o;
|
|
705
705
|
}
|
|
706
706
|
for (const r of e)
|
|
707
|
-
s[r.id] =
|
|
707
|
+
s[r.id] = Et(r, t);
|
|
708
708
|
return s;
|
|
709
709
|
}
|
|
710
|
-
async function
|
|
710
|
+
async function Rt(n = [], e = window) {
|
|
711
711
|
const t = D(e);
|
|
712
|
-
t && (ke(e), n.forEach((s) =>
|
|
712
|
+
t && (ke(e), n.forEach((s) => Ct(t, s)));
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function Pt(n, e = window) {
|
|
715
715
|
const t = b(n.mockTemplate) && n.mockTemplate.value ? j(n.mockTemplate, {}, !0) : void 0, s = D(e);
|
|
716
716
|
return async (...r) => {
|
|
717
|
-
let
|
|
717
|
+
let o = {};
|
|
718
718
|
if (t)
|
|
719
719
|
try {
|
|
720
|
-
|
|
720
|
+
o = await t.apply(t, r);
|
|
721
721
|
} catch (a) {
|
|
722
722
|
O.warn("模拟数据模版异常", a);
|
|
723
723
|
}
|
|
724
|
-
return s?.mock(
|
|
724
|
+
return s?.mock(o);
|
|
725
725
|
};
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function Ct(n, e) {
|
|
728
728
|
if (!e.mock) return;
|
|
729
729
|
const { url: t, mockTemplate: s } = e;
|
|
730
730
|
if (t && s)
|
|
731
731
|
try {
|
|
732
|
-
const r = se(t) ? new URL(t).pathname : t,
|
|
733
|
-
n.mock(
|
|
732
|
+
const r = se(t) ? new URL(t).pathname : t, o = Ve(`(.*)${r}(.*)`), a = We(r, { decode: decodeURIComponent }), i = H(s, {}, !0);
|
|
733
|
+
n.mock(o, (l) => {
|
|
734
734
|
const c = k.parse(l.url) || {}, f = l.body instanceof FormData ? Qe(l.body) : l.body, u = se(l.url) ? new URL(l.url).pathname : l.url.split("?")[0], p = a(u)?.params;
|
|
735
735
|
Object.assign(l, { data: f, params: p, query: c });
|
|
736
736
|
try {
|
|
737
|
-
return n.mock(
|
|
737
|
+
return n.mock(i(l));
|
|
738
738
|
} catch (h) {
|
|
739
|
-
return console.warn("[mockApi]",
|
|
739
|
+
return console.warn("[mockApi]", o, l, h), null;
|
|
740
740
|
}
|
|
741
741
|
});
|
|
742
742
|
} catch (r) {
|
|
@@ -747,7 +747,7 @@ function ke(n = window) {
|
|
|
747
747
|
const e = D(n);
|
|
748
748
|
e && (e._mocked = {});
|
|
749
749
|
}
|
|
750
|
-
class
|
|
750
|
+
class At {
|
|
751
751
|
__id = null;
|
|
752
752
|
__mode;
|
|
753
753
|
__instance = null;
|
|
@@ -777,7 +777,7 @@ class Ct {
|
|
|
777
777
|
const { mode: t, dsl: s, attrs: r } = e;
|
|
778
778
|
this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), r && Object.assign(this, r);
|
|
779
779
|
}
|
|
780
|
-
setup(e, t =
|
|
780
|
+
setup(e, t = z) {
|
|
781
781
|
const s = t.getCurrentInstance();
|
|
782
782
|
if (!s) return;
|
|
783
783
|
this.__refs = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = s.proxy;
|
|
@@ -834,8 +834,8 @@ class Ct {
|
|
|
834
834
|
__getRefEl(e, t, s) {
|
|
835
835
|
const r = e[t];
|
|
836
836
|
if (r && s !== r) {
|
|
837
|
-
const
|
|
838
|
-
return Array.from(
|
|
837
|
+
const o = new Set([].concat(r, s));
|
|
838
|
+
return Array.from(o);
|
|
839
839
|
} else
|
|
840
840
|
return s;
|
|
841
841
|
}
|
|
@@ -847,40 +847,40 @@ class Ct {
|
|
|
847
847
|
return s.context.__proto__ = this.context, s.__proto__ = this, s;
|
|
848
848
|
}
|
|
849
849
|
}
|
|
850
|
-
function
|
|
850
|
+
function ie(n) {
|
|
851
851
|
const {
|
|
852
|
-
Vue: e =
|
|
852
|
+
Vue: e = z,
|
|
853
853
|
mode: t = w.Runtime,
|
|
854
854
|
components: s = {},
|
|
855
855
|
libs: r = {},
|
|
856
|
-
apis:
|
|
856
|
+
apis: o = {},
|
|
857
857
|
loader: a
|
|
858
|
-
} = n,
|
|
858
|
+
} = n, i = e.computed(() => n.dsl), l = {
|
|
859
859
|
$components: s,
|
|
860
860
|
$libs: r,
|
|
861
|
-
$apis:
|
|
862
|
-
}, c = new
|
|
861
|
+
$apis: o
|
|
862
|
+
}, c = new At({
|
|
863
863
|
mode: t,
|
|
864
|
-
dsl:
|
|
864
|
+
dsl: i.value,
|
|
865
865
|
attrs: l
|
|
866
866
|
}), f = e.defineComponent({
|
|
867
|
-
name:
|
|
868
|
-
__scopeId:
|
|
867
|
+
name: i.value.name,
|
|
868
|
+
__scopeId: i.value.id ? `data-v-${i.value.id}` : void 0,
|
|
869
869
|
props: {
|
|
870
|
-
...
|
|
870
|
+
...Ft(i.value.props ?? [], c)
|
|
871
871
|
},
|
|
872
872
|
async setup(u) {
|
|
873
|
-
c.$props = u, c.props = u,
|
|
873
|
+
c.$props = u, c.props = u, i.value.id && fe(
|
|
874
874
|
n.window || window,
|
|
875
|
-
|
|
876
|
-
|
|
875
|
+
i.value.id,
|
|
876
|
+
i.value.css || "",
|
|
877
877
|
!0
|
|
878
|
-
), c.state =
|
|
879
|
-
const p =
|
|
878
|
+
), c.state = kt(e, i.value.state ?? {}, c);
|
|
879
|
+
const p = Ot(e, i.value.computed ?? {}, c), h = xt(i.value.methods ?? {}, c), d = Mt(e, i.value.inject, c);
|
|
880
880
|
for (const [y, _] of Object.entries(d || {}))
|
|
881
881
|
d[y] = e.inject(y, _);
|
|
882
882
|
const m = Tt(
|
|
883
|
-
|
|
883
|
+
i.value.dataSources || {},
|
|
884
884
|
c
|
|
885
885
|
), g = {
|
|
886
886
|
...d,
|
|
@@ -888,34 +888,34 @@ function oe(n) {
|
|
|
888
888
|
...h,
|
|
889
889
|
...m
|
|
890
890
|
};
|
|
891
|
-
return c.setup(g, e),
|
|
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
895
|
...h
|
|
896
896
|
};
|
|
897
897
|
},
|
|
898
|
-
emits:
|
|
899
|
-
expose: ["vtj", ...
|
|
898
|
+
emits: It(i.value.emits),
|
|
899
|
+
expose: ["vtj", ...i.value.expose || []],
|
|
900
900
|
render() {
|
|
901
|
-
if (!
|
|
902
|
-
const u =
|
|
903
|
-
return u.length === 1 ?
|
|
904
|
-
(p) =>
|
|
901
|
+
if (!i.value.nodes) return null;
|
|
902
|
+
const u = i.value.nodes || [];
|
|
903
|
+
return u.length === 1 ? x(u[0], c, e, a, u) : u.map(
|
|
904
|
+
(p) => x(p, c, e, a, u)
|
|
905
905
|
);
|
|
906
906
|
},
|
|
907
|
-
...
|
|
907
|
+
...Ht(i.value.lifeCycles ?? {}, c)
|
|
908
908
|
});
|
|
909
909
|
return {
|
|
910
910
|
renderer: e.markRaw(f),
|
|
911
911
|
context: c
|
|
912
912
|
};
|
|
913
913
|
}
|
|
914
|
-
function
|
|
914
|
+
function It(n = []) {
|
|
915
915
|
return n.map((e) => I(e) ? e : e.name);
|
|
916
916
|
}
|
|
917
|
-
function
|
|
918
|
-
const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((
|
|
917
|
+
function Ft(n = [], e) {
|
|
918
|
+
const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((o) => rt[o]) : void 0;
|
|
919
919
|
return n.map((s) => I(s) ? {
|
|
920
920
|
name: s
|
|
921
921
|
} : {
|
|
@@ -932,24 +932,24 @@ function It(n = [], e) {
|
|
|
932
932
|
{}
|
|
933
933
|
);
|
|
934
934
|
}
|
|
935
|
-
function
|
|
935
|
+
function kt(n, e, t) {
|
|
936
936
|
return n.reactive(
|
|
937
937
|
Object.keys(e || {}).reduce(
|
|
938
938
|
(s, r) => {
|
|
939
|
-
let
|
|
940
|
-
return E(
|
|
939
|
+
let o = e[r];
|
|
940
|
+
return E(o) ? o = t.__parseExpression(o) : b(o) && (o = t.__parseFunction(o)), s[r] = o, s;
|
|
941
941
|
},
|
|
942
942
|
{}
|
|
943
943
|
)
|
|
944
944
|
);
|
|
945
945
|
}
|
|
946
|
-
function
|
|
946
|
+
function Ot(n, e, t) {
|
|
947
947
|
return Object.entries(e ?? {}).reduce(
|
|
948
|
-
(s, [r,
|
|
948
|
+
(s, [r, o]) => (s[r] = n.computed(t.__parseFunction(o)), s),
|
|
949
949
|
{}
|
|
950
950
|
);
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function xt(n, e) {
|
|
953
953
|
return Object.entries(n ?? {}).reduce(
|
|
954
954
|
(t, [s, r]) => (t[s] = e.__parseFunction(r), t),
|
|
955
955
|
{}
|
|
@@ -958,10 +958,10 @@ function Ot(n, e) {
|
|
|
958
958
|
function Mt(n, e = [], t) {
|
|
959
959
|
return e.reduce(
|
|
960
960
|
(s, r) => {
|
|
961
|
-
const { name:
|
|
961
|
+
const { name: o, from: a } = r || {};
|
|
962
962
|
r.default;
|
|
963
|
-
const
|
|
964
|
-
return s[
|
|
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;
|
|
965
965
|
},
|
|
966
966
|
{}
|
|
967
967
|
);
|
|
@@ -971,11 +971,11 @@ function Tt(n, e) {
|
|
|
971
971
|
(t, s) => {
|
|
972
972
|
const r = n[s];
|
|
973
973
|
if (r.type === "mock")
|
|
974
|
-
t[s] =
|
|
974
|
+
t[s] = Pt(r);
|
|
975
975
|
else if (r.ref) {
|
|
976
|
-
const
|
|
977
|
-
t[s] = async (...
|
|
978
|
-
const l = await
|
|
976
|
+
const o = e.$apis[r.ref], a = b(r.transform) ? r.transform.value ? e.__parseFunction(r.transform) : void 0 : r.transform;
|
|
977
|
+
t[s] = async (...i) => {
|
|
978
|
+
const l = await o.apply(e, i);
|
|
979
979
|
return a ? a(l) : l;
|
|
980
980
|
};
|
|
981
981
|
}
|
|
@@ -984,7 +984,7 @@ function Tt(n, e) {
|
|
|
984
984
|
{}
|
|
985
985
|
);
|
|
986
986
|
}
|
|
987
|
-
function
|
|
987
|
+
function Dt(n, e = [], t) {
|
|
988
988
|
e.forEach((s) => {
|
|
989
989
|
n.watch(
|
|
990
990
|
t.__parseExpression(s.source),
|
|
@@ -996,12 +996,12 @@ function xt(n, e = [], t) {
|
|
|
996
996
|
);
|
|
997
997
|
});
|
|
998
998
|
}
|
|
999
|
-
function
|
|
999
|
+
function Ht(n, e) {
|
|
1000
1000
|
return Object.entries(n ?? {}).reduce(
|
|
1001
1001
|
(t, [s, r]) => {
|
|
1002
|
-
const
|
|
1002
|
+
const o = e.__parseFunction(r);
|
|
1003
1003
|
return t[s] = async () => {
|
|
1004
|
-
q(
|
|
1004
|
+
q(o) && (await J(0), await o());
|
|
1005
1005
|
}, t;
|
|
1006
1006
|
},
|
|
1007
1007
|
{}
|
|
@@ -1009,85 +1009,85 @@ function Dt(n, e) {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
const Oe = new Xe();
|
|
1011
1011
|
let Z = [], F = {};
|
|
1012
|
-
const
|
|
1013
|
-
async function
|
|
1014
|
-
const { urls: t = [], library: s } = n, r = t.filter((
|
|
1012
|
+
const Bt = (n) => n;
|
|
1013
|
+
async function xe(n, e = window) {
|
|
1014
|
+
const { urls: t = [], library: s } = n, r = t.filter((i) => V(i));
|
|
1015
1015
|
if (r.length === 0 || !s) return null;
|
|
1016
|
-
const
|
|
1017
|
-
return
|
|
1018
|
-
(
|
|
1016
|
+
const o = t.filter((i) => G(i));
|
|
1017
|
+
return o.length && Ae(o, e), await Ie(r, s, e).catch(
|
|
1018
|
+
(i) => (console.warn("loadScriptUrl error", r, s, i), null)
|
|
1019
1019
|
);
|
|
1020
1020
|
}
|
|
1021
1021
|
function ae(n) {
|
|
1022
1022
|
const { getDsl: e, getDslByUrl: t, options: s } = n;
|
|
1023
1023
|
return s.window && (Z.forEach((r) => {
|
|
1024
1024
|
delete s.window[r];
|
|
1025
|
-
}), Z = []), (r,
|
|
1026
|
-
if (!
|
|
1027
|
-
if (
|
|
1025
|
+
}), Z = []), (r, o, a = z) => {
|
|
1026
|
+
if (!o || typeof o == "string") return r;
|
|
1027
|
+
if (o.type === "Schema" && o.id)
|
|
1028
1028
|
return a.defineAsyncComponent(async () => {
|
|
1029
|
-
const
|
|
1030
|
-
|
|
1031
|
-
() => e(
|
|
1029
|
+
const i = F[o.id] || await Oe.add(
|
|
1030
|
+
o.id,
|
|
1031
|
+
() => e(o.id)
|
|
1032
1032
|
);
|
|
1033
|
-
return
|
|
1033
|
+
return i && (i.name = r, F[o.id] = i), i ? ie({
|
|
1034
1034
|
...s,
|
|
1035
1035
|
Vue: a,
|
|
1036
|
-
dsl: ve(
|
|
1036
|
+
dsl: ve(i),
|
|
1037
1037
|
mode: w.Runtime,
|
|
1038
1038
|
loader: ae(n)
|
|
1039
1039
|
}).renderer : null;
|
|
1040
1040
|
});
|
|
1041
|
-
if (
|
|
1041
|
+
if (o.type === "UrlSchema" && o.url)
|
|
1042
1042
|
return a.defineAsyncComponent(async () => {
|
|
1043
|
-
const
|
|
1044
|
-
return
|
|
1043
|
+
const i = F[o.url] || await t(o.url);
|
|
1044
|
+
return i && (i.name = r, F[o.url] = i), i ? ie({
|
|
1045
1045
|
...s,
|
|
1046
1046
|
Vue: a,
|
|
1047
|
-
dsl: ve(
|
|
1047
|
+
dsl: ve(i),
|
|
1048
1048
|
mode: w.Runtime,
|
|
1049
1049
|
loader: ae(n)
|
|
1050
1050
|
}).renderer : null;
|
|
1051
1051
|
});
|
|
1052
|
-
if (
|
|
1053
|
-
let
|
|
1054
|
-
return
|
|
1052
|
+
if (o.type === "Plugin") {
|
|
1053
|
+
let i = o.library ? F[o.library] : null;
|
|
1054
|
+
return i || (o.library && Z.push(o.library), i = F[o.library || Symbol()] = a.defineAsyncComponent(
|
|
1055
1055
|
async () => {
|
|
1056
|
-
const l = await
|
|
1057
|
-
return l || (console.warn("getPlugin result is null",
|
|
1056
|
+
const l = await xe(o, s.window);
|
|
1057
|
+
return l || (console.warn("getPlugin result is null", o), null);
|
|
1058
1058
|
}
|
|
1059
|
-
),
|
|
1059
|
+
), i);
|
|
1060
1060
|
}
|
|
1061
1061
|
return r;
|
|
1062
1062
|
};
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function Cs() {
|
|
1065
1065
|
F = {}, Oe.clearAllCache();
|
|
1066
1066
|
}
|
|
1067
|
-
function
|
|
1067
|
+
function x(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:
|
|
1070
|
-
if (!
|
|
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: y } = Me(l);
|
|
1070
|
+
if (!o && (f || u))
|
|
1071
1071
|
return null;
|
|
1072
|
-
if (c && !
|
|
1073
|
-
return
|
|
1072
|
+
if (c && !Nt(c, e))
|
|
1073
|
+
return Kt(n, e, t, s, r);
|
|
1074
1074
|
const _ = (v, S = 0) => {
|
|
1075
1075
|
const A = v.$components, W = (() => {
|
|
1076
1076
|
if (n.name === "component")
|
|
1077
|
-
return
|
|
1077
|
+
return Ut(v, n.props?.is);
|
|
1078
1078
|
if (n.name === "slot") return n.name;
|
|
1079
1079
|
const R = s(n.name, n.from, t);
|
|
1080
|
-
return I(R) ?
|
|
1081
|
-
})(), P =
|
|
1080
|
+
return I(R) ? vt(R) || _t(R) ? R : A[R] ?? a?.app?.component(R) ?? R : R;
|
|
1081
|
+
})(), P = qt(i, n.props ?? {}, v), Ne = Jt(t, n.events ?? {}, v);
|
|
1082
1082
|
if (n.name === "slot")
|
|
1083
|
-
return
|
|
1083
|
+
return zt(t, n, P, v, s);
|
|
1084
1084
|
m && Object.assign(P, v.__parseExpression(m.value)), h && (P.style = Object.assign(
|
|
1085
1085
|
P.style ?? {},
|
|
1086
|
-
|
|
1087
|
-
)), g && Object.assign(P,
|
|
1088
|
-
Object.assign(P,
|
|
1086
|
+
Vt(h, v)
|
|
1087
|
+
)), g && Object.assign(P, Wt(g, v)), d.forEach((R) => {
|
|
1088
|
+
Object.assign(P, Qt(t, R, v));
|
|
1089
1089
|
});
|
|
1090
|
-
const Ue =
|
|
1090
|
+
const Ue = Xt(
|
|
1091
1091
|
t,
|
|
1092
1092
|
n.children ?? [],
|
|
1093
1093
|
v,
|
|
@@ -1096,50 +1096,50 @@ function M(n, e, t = G, s = Ht, r = [], i = !1) {
|
|
|
1096
1096
|
), he = v?.__id ? `data-v-${v.__id}` : void 0, qe = he ? { [he]: "" } : {};
|
|
1097
1097
|
let Q = t.createVNode(
|
|
1098
1098
|
W,
|
|
1099
|
-
{ key: `${
|
|
1099
|
+
{ key: `${i}_${S}`, ...qe, ...P, ...Ne },
|
|
1100
1100
|
Ue
|
|
1101
1101
|
);
|
|
1102
|
-
const me = a ?
|
|
1102
|
+
const me = a ? Lt(a, y, v) : [];
|
|
1103
1103
|
return me.length && (Q = t.withDirectives(Q, me)), Q;
|
|
1104
1104
|
};
|
|
1105
|
-
return p ?
|
|
1105
|
+
return p ? es(p, _, e) : _(e);
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function Lt(n, e, t) {
|
|
1108
1108
|
const s = n.app;
|
|
1109
1109
|
return e.map((r) => {
|
|
1110
|
-
const
|
|
1111
|
-
if (!
|
|
1112
|
-
const a = [
|
|
1110
|
+
const o = typeof r.name == "string" ? s.directive(r.name) : t.__parseExpression(r.name);
|
|
1111
|
+
if (!o) return null;
|
|
1112
|
+
const a = [o];
|
|
1113
1113
|
return r.value && a.push(t.__parseExpression(r.value)), r.arg && a.push(r.arg), r.modifiers && a.push(r.modifiers), a;
|
|
1114
1114
|
}).filter((r) => !!r);
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1116
|
+
function Me(n = []) {
|
|
1117
1117
|
const e = n.find((f) => C(f.name) === "vIf"), t = n.find(
|
|
1118
1118
|
(f) => C(f.name) === "vElseIf"
|
|
1119
|
-
), s = n.find((f) => C(f.name) === "vElse"), r = n.find((f) => C(f.name) === "vFor"),
|
|
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
1120
|
(f) => C(f.name) === "vModel"
|
|
1121
1121
|
), c = n.filter(
|
|
1122
|
-
(f) => !
|
|
1122
|
+
(f) => !nt.includes(C(f.name))
|
|
1123
1123
|
);
|
|
1124
1124
|
return {
|
|
1125
1125
|
vIf: e,
|
|
1126
1126
|
vElseIf: t,
|
|
1127
1127
|
vElse: s,
|
|
1128
1128
|
vFor: r,
|
|
1129
|
-
vShow:
|
|
1129
|
+
vShow: o,
|
|
1130
1130
|
vModels: l,
|
|
1131
1131
|
vBind: a,
|
|
1132
1132
|
others: c,
|
|
1133
|
-
vHtml:
|
|
1133
|
+
vHtml: i
|
|
1134
1134
|
};
|
|
1135
1135
|
}
|
|
1136
|
-
function
|
|
1136
|
+
function Nt(n, e) {
|
|
1137
1137
|
return !!e.__parseExpression(n.value);
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1139
|
+
function Ut(n, e) {
|
|
1140
1140
|
return e ? E(e) ? n.__parseExpression(e) : e : "div";
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
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
|
}
|
|
@@ -1152,44 +1152,44 @@ function ce(n, e) {
|
|
|
1152
1152
|
{}
|
|
1153
1153
|
) : n;
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function Jt(n, e, t) {
|
|
1156
1156
|
const s = ["passive", "capture", "once"], r = {
|
|
1157
1157
|
capture: "Capture",
|
|
1158
1158
|
once: "Once",
|
|
1159
1159
|
passive: "OnceCapture"
|
|
1160
1160
|
};
|
|
1161
1161
|
return Object.keys(e || {}).reduce(
|
|
1162
|
-
(
|
|
1163
|
-
const
|
|
1164
|
-
return u && (
|
|
1162
|
+
(o, a) => {
|
|
1163
|
+
const i = e[a], l = Te(i.modifiers), c = l.find((p) => s.includes(p)), f = "on" + Ye(a) + (c && r[c] || ""), u = t.__parseFunction(i.handler);
|
|
1164
|
+
return u && (o[f] = n.withModifiers(u, l)), o;
|
|
1165
1165
|
},
|
|
1166
1166
|
{}
|
|
1167
1167
|
);
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1170
|
-
let
|
|
1171
|
-
for (let a = ++
|
|
1172
|
-
const { directives:
|
|
1169
|
+
function Kt(n, e, t, s, r = []) {
|
|
1170
|
+
let o = r.findIndex((a) => a.id === n.id);
|
|
1171
|
+
for (let a = ++o; a < r.length; a++) {
|
|
1172
|
+
const { directives: i = [] } = r[a], { vElseIf: l, vElse: c } = Me(i);
|
|
1173
1173
|
if (l) {
|
|
1174
1174
|
if (e.__parseExpression(l.value))
|
|
1175
|
-
return
|
|
1175
|
+
return x(r[a], e, t, s, r, !0);
|
|
1176
1176
|
continue;
|
|
1177
1177
|
}
|
|
1178
1178
|
if (c)
|
|
1179
|
-
return
|
|
1179
|
+
return x(r[a], e, t, s, r, !0);
|
|
1180
1180
|
}
|
|
1181
1181
|
return null;
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1183
|
+
function Te(n = {}, e = !1) {
|
|
1184
1184
|
const t = Object.keys(n);
|
|
1185
1185
|
return e ? t.map((s) => "." + s) : t;
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1188
|
-
const { children:
|
|
1189
|
-
return
|
|
1190
|
-
Ce(s.__parseExpression(
|
|
1191
|
-
) : Array.isArray(
|
|
1192
|
-
(l) =>
|
|
1187
|
+
function zt(n, e, t, s, r) {
|
|
1188
|
+
const { children: o } = e, a = Gt(e, s), i = s.$slots?.[a.name];
|
|
1189
|
+
return i ? i(t) : o ? I(o) ? n.createTextVNode(o) : E(o) ? n.createTextVNode(
|
|
1190
|
+
Ce(s.__parseExpression(o))
|
|
1191
|
+
) : Array.isArray(o) ? o.map(
|
|
1192
|
+
(l) => x(l, s, n, r, o)
|
|
1193
1193
|
) : null : null;
|
|
1194
1194
|
}
|
|
1195
1195
|
function Gt(n, e) {
|
|
@@ -1199,31 +1199,31 @@ function Gt(n, e) {
|
|
|
1199
1199
|
params: []
|
|
1200
1200
|
};
|
|
1201
1201
|
}
|
|
1202
|
-
function
|
|
1202
|
+
function Vt(n, e) {
|
|
1203
1203
|
return e.__parseExpression(n.value) ? {} : {
|
|
1204
1204
|
display: "none"
|
|
1205
1205
|
};
|
|
1206
1206
|
}
|
|
1207
|
-
function
|
|
1207
|
+
function Wt(n, e) {
|
|
1208
1208
|
return {
|
|
1209
1209
|
innerHTML: e.__parseExpression(n.value) || ""
|
|
1210
1210
|
};
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1212
|
+
function Qt(n, e, t) {
|
|
1213
1213
|
const s = {
|
|
1214
1214
|
type: "JSFunction",
|
|
1215
1215
|
value: e.value?.value ? `(v) => {
|
|
1216
1216
|
${e.value.value} = v;
|
|
1217
1217
|
}` : "(v) => {}"
|
|
1218
|
-
}, r = t.__parseFunction(s),
|
|
1218
|
+
}, r = t.__parseFunction(s), o = Te(
|
|
1219
1219
|
E(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
|
|
1220
1220
|
), a = E(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
|
|
1221
1221
|
return {
|
|
1222
1222
|
[a]: t.__parseExpression(e.value),
|
|
1223
|
-
[`onUpdate:${a}`]:
|
|
1223
|
+
[`onUpdate:${a}`]: o.length && r ? n.withModifiers(r, o) : r
|
|
1224
1224
|
};
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function Xt(n, e, t, s, r) {
|
|
1227
1227
|
if (!e) return null;
|
|
1228
1228
|
if (I(e))
|
|
1229
1229
|
return { default: () => e };
|
|
@@ -1232,27 +1232,27 @@ function Qt(n, e, t, s, r) {
|
|
|
1232
1232
|
default: () => Ce(t.__parseExpression(e))
|
|
1233
1233
|
};
|
|
1234
1234
|
if (Array.isArray(e) && e.length > 0) {
|
|
1235
|
-
const
|
|
1236
|
-
[l]:
|
|
1235
|
+
const o = Yt(e), a = (i, l) => !i || !r ? {} : r?.id && Object.keys(i).length ? l ? {
|
|
1236
|
+
[l]: i
|
|
1237
1237
|
} : {
|
|
1238
|
-
[`scope_${r.id}`]:
|
|
1238
|
+
[`scope_${r.id}`]: i
|
|
1239
1239
|
} : l ? { [l]: /* @__PURE__ */ Object.create(null) } : {};
|
|
1240
|
-
return Object.entries(
|
|
1241
|
-
(
|
|
1240
|
+
return Object.entries(o).reduce(
|
|
1241
|
+
(i, [l, { nodes: c, params: f, scope: u }]) => (i[l] = (p) => {
|
|
1242
1242
|
const h = f.length ? Ze(p ?? {}, f) : a(p, u);
|
|
1243
1243
|
return c.map(
|
|
1244
|
-
(d) =>
|
|
1244
|
+
(d) => x(d, t.__clone(h), n, s, c)
|
|
1245
1245
|
);
|
|
1246
|
-
},
|
|
1246
|
+
}, i),
|
|
1247
1247
|
{}
|
|
1248
1248
|
);
|
|
1249
1249
|
}
|
|
1250
1250
|
return null;
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1252
|
+
function Yt(n) {
|
|
1253
1253
|
const e = {};
|
|
1254
1254
|
for (const t of n) {
|
|
1255
|
-
const s =
|
|
1255
|
+
const s = Zt(t.slot), r = s.name;
|
|
1256
1256
|
e[r] ? (e[r].nodes.push(t), e[r].params = e[r].params.concat(s.params), e[r].scope = s.scope || "") : e[r] = {
|
|
1257
1257
|
nodes: [t],
|
|
1258
1258
|
params: s.params,
|
|
@@ -1261,24 +1261,24 @@ function Xt(n) {
|
|
|
1261
1261
|
}
|
|
1262
1262
|
return e;
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1264
|
+
function Zt(n = "default") {
|
|
1265
1265
|
return I(n) ? { name: n, params: [], scope: "" } : { params: [], scope: "", ...n };
|
|
1266
1266
|
}
|
|
1267
|
-
function
|
|
1268
|
-
const { value: s, iterator: r } = n, { item:
|
|
1269
|
-
let
|
|
1270
|
-
return Number.isInteger(
|
|
1267
|
+
function es(n, e, t) {
|
|
1268
|
+
const { value: s, iterator: r } = n, { item: o = "item", index: a = "index" } = r || {};
|
|
1269
|
+
let i = t.__parseExpression(s) || [];
|
|
1270
|
+
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`), []);
|
|
1271
1271
|
}
|
|
1272
1272
|
const ee = Re({
|
|
1273
1273
|
name: "VtjPageContainer",
|
|
1274
1274
|
async setup() {
|
|
1275
|
-
const n = Be(), e = Pe(), t = e.meta.__vtj__ || e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null,
|
|
1275
|
+
const n = Be(), e = Pe(), t = e.meta.__vtj__ || e.params.id, s = t ? n.getPage(t) : n.getHomepage(), r = s ? await n.getRenderComponent(s.id) : null, o = oe(Symbol());
|
|
1276
1276
|
if (s) {
|
|
1277
1277
|
Object.assign(e.meta, s.meta || {}, { cache: s.cache });
|
|
1278
1278
|
const { useTitle: a } = n?.adapter;
|
|
1279
1279
|
if (a) {
|
|
1280
|
-
const
|
|
1281
|
-
a(
|
|
1280
|
+
const i = e.meta.title || s.title || "VTJ.PRO";
|
|
1281
|
+
a(i);
|
|
1282
1282
|
}
|
|
1283
1283
|
}
|
|
1284
1284
|
return {
|
|
@@ -1287,7 +1287,7 @@ const ee = Re({
|
|
|
1287
1287
|
file: s,
|
|
1288
1288
|
query: e.query,
|
|
1289
1289
|
meta: e.meta,
|
|
1290
|
-
sid:
|
|
1290
|
+
sid: o,
|
|
1291
1291
|
route: e
|
|
1292
1292
|
};
|
|
1293
1293
|
},
|
|
@@ -1298,7 +1298,7 @@ const ee = Re({
|
|
|
1298
1298
|
activated() {
|
|
1299
1299
|
this.meta.cache === !1 && (this.sid = Symbol());
|
|
1300
1300
|
}
|
|
1301
|
-
}),
|
|
1301
|
+
}), ts = Re({
|
|
1302
1302
|
name: "VtjStartupContainer",
|
|
1303
1303
|
render() {
|
|
1304
1304
|
return re("div", "page not found!");
|
|
@@ -1307,17 +1307,17 @@ const ee = Re({
|
|
|
1307
1307
|
function K(n, e, t = []) {
|
|
1308
1308
|
const s = [];
|
|
1309
1309
|
for (const r of t) {
|
|
1310
|
-
const { id:
|
|
1310
|
+
const { id: o, title: a, icon: i, children: l, hidden: c, layout: f } = r;
|
|
1311
1311
|
if (f) {
|
|
1312
1312
|
const u = K(n, e, l || []);
|
|
1313
1313
|
s.push(...u);
|
|
1314
1314
|
} else {
|
|
1315
1315
|
const u = {
|
|
1316
|
-
id:
|
|
1316
|
+
id: o,
|
|
1317
1317
|
title: a,
|
|
1318
|
-
icon:
|
|
1318
|
+
icon: i,
|
|
1319
1319
|
hidden: c,
|
|
1320
|
-
url: `${n}/${e}/${
|
|
1320
|
+
url: `${n}/${e}/${o}`,
|
|
1321
1321
|
children: l && l.length ? K(n, e, l) : void 0
|
|
1322
1322
|
};
|
|
1323
1323
|
s.push(u);
|
|
@@ -1336,17 +1336,17 @@ function De(n, e) {
|
|
|
1336
1336
|
e.can(s.id.toString()) && t.push(s);
|
|
1337
1337
|
return t;
|
|
1338
1338
|
}
|
|
1339
|
-
function
|
|
1339
|
+
function As(n) {
|
|
1340
1340
|
const {
|
|
1341
1341
|
menuPathPrefix: e = "",
|
|
1342
1342
|
pageRouteName: t = "page",
|
|
1343
1343
|
disableMenusFilter: s = !1
|
|
1344
|
-
} = n || {}, r = Be(),
|
|
1345
|
-
|
|
1344
|
+
} = n || {}, r = Be(), o = Pe(), a = $t(), i = oe(!1), l = oe(!1), c = r.project, f = (h, d) => {
|
|
1345
|
+
i.value = !h?.mask, l.value = d?.pure ?? !!h?.pure;
|
|
1346
1346
|
};
|
|
1347
|
-
|
|
1348
|
-
const { name: h, params: d, meta: m } =
|
|
1349
|
-
if (h ===
|
|
1347
|
+
st(() => {
|
|
1348
|
+
const { name: h, params: d, meta: m } = o;
|
|
1349
|
+
if (h === T) {
|
|
1350
1350
|
const g = r.getPage(d.id);
|
|
1351
1351
|
f(g, m);
|
|
1352
1352
|
} else if (h === N) {
|
|
@@ -1358,7 +1358,7 @@ function Cs(n) {
|
|
|
1358
1358
|
const y = r.getPage(g);
|
|
1359
1359
|
f(y, m);
|
|
1360
1360
|
} else
|
|
1361
|
-
|
|
1361
|
+
i.value = !m.mask, l.value = !!m.pure;
|
|
1362
1362
|
}
|
|
1363
1363
|
});
|
|
1364
1364
|
const u = K(
|
|
@@ -1367,7 +1367,7 @@ function Cs(n) {
|
|
|
1367
1367
|
c?.pages
|
|
1368
1368
|
), p = c?.config;
|
|
1369
1369
|
return {
|
|
1370
|
-
disabled:
|
|
1370
|
+
disabled: i,
|
|
1371
1371
|
logo: p?.logo,
|
|
1372
1372
|
themeSwitchable: p?.themeSwitchable,
|
|
1373
1373
|
title: p?.title || c?.description || c?.name || "VTJ App",
|
|
@@ -1376,11 +1376,11 @@ function Cs(n) {
|
|
|
1376
1376
|
};
|
|
1377
1377
|
}
|
|
1378
1378
|
function te(n, e) {
|
|
1379
|
-
const { id: t, title: s, meta: r } = n, { name:
|
|
1379
|
+
const { id: t, title: s, meta: r } = n, { name: o = "page", prefix: a = "", component: i, routeMeta: l } = e;
|
|
1380
1380
|
return {
|
|
1381
1381
|
name: t,
|
|
1382
|
-
path: `${a}${
|
|
1383
|
-
component:
|
|
1382
|
+
path: `${a}${o}/${t}`,
|
|
1383
|
+
component: i,
|
|
1384
1384
|
meta: {
|
|
1385
1385
|
title: s,
|
|
1386
1386
|
...l,
|
|
@@ -1395,9 +1395,9 @@ function le(n) {
|
|
|
1395
1395
|
prefix: t = "",
|
|
1396
1396
|
pages: s = [],
|
|
1397
1397
|
component: r,
|
|
1398
|
-
loader:
|
|
1398
|
+
loader: o,
|
|
1399
1399
|
routeMeta: a,
|
|
1400
|
-
homepage:
|
|
1400
|
+
homepage: i
|
|
1401
1401
|
} = n, l = [];
|
|
1402
1402
|
for (const c of s) {
|
|
1403
1403
|
const { id: f, title: u, dir: p, layout: h, children: d, meta: m } = c;
|
|
@@ -1407,8 +1407,8 @@ function le(n) {
|
|
|
1407
1407
|
prefix: t,
|
|
1408
1408
|
component: r,
|
|
1409
1409
|
routeMeta: a,
|
|
1410
|
-
homepage:
|
|
1411
|
-
loader:
|
|
1410
|
+
homepage: i,
|
|
1411
|
+
loader: o,
|
|
1412
1412
|
pages: d || []
|
|
1413
1413
|
});
|
|
1414
1414
|
l.push(...g);
|
|
@@ -1418,13 +1418,13 @@ function le(n) {
|
|
|
1418
1418
|
prefix: t,
|
|
1419
1419
|
component: r,
|
|
1420
1420
|
routeMeta: a,
|
|
1421
|
-
homepage:
|
|
1422
|
-
loader:
|
|
1421
|
+
homepage: i,
|
|
1422
|
+
loader: o,
|
|
1423
1423
|
pages: d || []
|
|
1424
1424
|
}), y = {
|
|
1425
1425
|
name: `layout_${f}`,
|
|
1426
1426
|
path: t,
|
|
1427
|
-
component: () =>
|
|
1427
|
+
component: () => o(f),
|
|
1428
1428
|
meta: {
|
|
1429
1429
|
title: u,
|
|
1430
1430
|
...a,
|
|
@@ -1434,87 +1434,86 @@ function le(n) {
|
|
|
1434
1434
|
children: g
|
|
1435
1435
|
};
|
|
1436
1436
|
l.push(y), l.push(te(c, n));
|
|
1437
|
-
} else if (l.push(te(c, n)),
|
|
1437
|
+
} else if (l.push(te(c, n)), i === f) {
|
|
1438
1438
|
const g = te(c, n);
|
|
1439
1439
|
g.path = "", g.name = `home_${f}`, l.push(g);
|
|
1440
1440
|
}
|
|
1441
1441
|
}
|
|
1442
1442
|
return l;
|
|
1443
1443
|
}
|
|
1444
|
-
function
|
|
1445
|
-
const { css: t, store: s, enhance: r } = n, { window:
|
|
1446
|
-
a.config.globalProperties.$libs =
|
|
1444
|
+
function ss(n = {}, e) {
|
|
1445
|
+
const { css: t, store: s, enhance: r } = n, { window: o, app: a, library: i = {}, adapter: l, mode: c } = e, { Pinia: f } = i;
|
|
1446
|
+
a.config.globalProperties.$libs = i, fe(o, "global-css", t || ""), f && s && ns(s, a, f), os(a, l, n), !l.access && n.access && rs(n.access, a, c, l), is(a, n), r && as(r, a, i);
|
|
1447
1447
|
}
|
|
1448
|
-
function
|
|
1448
|
+
function ns(n, e, t) {
|
|
1449
1449
|
const s = t.createPinia();
|
|
1450
1450
|
if (e.use(s), b(n) && n.value) {
|
|
1451
|
-
const r = j(n, {}, !1, !1, !0),
|
|
1452
|
-
e.config.globalProperties.$store =
|
|
1451
|
+
const r = j(n, {}, !1, !1, !0), o = t.defineStore("$store", r(e) || {});
|
|
1452
|
+
e.config.globalProperties.$store = o();
|
|
1453
1453
|
}
|
|
1454
1454
|
}
|
|
1455
|
-
function
|
|
1455
|
+
function rs(n, e, t, s) {
|
|
1456
1456
|
if (b(n) && n.value) {
|
|
1457
|
-
const r = j(n, {}, !1, !1, !0), { alert:
|
|
1458
|
-
alert:
|
|
1457
|
+
const r = j(n, {}, !1, !1, !0), { alert: o, request: a } = s, i = new pe({
|
|
1458
|
+
alert: o,
|
|
1459
1459
|
storagePrefix: "__VTJ_APP_",
|
|
1460
1460
|
...r(e)
|
|
1461
1461
|
}), l = e.config.globalProperties.$router;
|
|
1462
|
-
|
|
1462
|
+
i.connect({ mode: t, router: l, request: a }), e.use(i);
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1465
|
+
function os(n, e, t) {
|
|
1466
1466
|
if (!e.request) return;
|
|
1467
|
-
const { axios: s, request: r, response:
|
|
1467
|
+
const { axios: s, request: r, response: o } = t;
|
|
1468
1468
|
if (s && b(s) && s.value) {
|
|
1469
1469
|
const a = j(s, {}, !1, !1, !0);
|
|
1470
1470
|
e.request.setConfig(a(n));
|
|
1471
1471
|
}
|
|
1472
1472
|
if (r && b(r) && r.value) {
|
|
1473
|
-
const a = j(r, {}, !1, !1, !0),
|
|
1474
|
-
|
|
1473
|
+
const a = j(r, {}, !1, !1, !0), i = e.request;
|
|
1474
|
+
i.__unReq && i.__unReq(), i.__unReq = e.request.useRequest((l) => a(l, n));
|
|
1475
1475
|
}
|
|
1476
|
-
if (
|
|
1477
|
-
const a = j(
|
|
1478
|
-
|
|
1476
|
+
if (o && b(o) && o.value) {
|
|
1477
|
+
const a = j(o, {}, !1, !1, !0), i = e.request;
|
|
1478
|
+
i.__unRes && i.__unRes(), i.__unRes = e.request.useResponse((l) => a(l, n));
|
|
1479
1479
|
}
|
|
1480
1480
|
}
|
|
1481
1481
|
function is(n, e) {
|
|
1482
1482
|
const { beforeEach: t, afterEach: s } = e, r = n.config.globalProperties.$router;
|
|
1483
1483
|
if (t && b(t) && t.value) {
|
|
1484
|
-
const
|
|
1485
|
-
r && r.beforeEach((a,
|
|
1484
|
+
const o = j(t, {}, !1, !1, !0);
|
|
1485
|
+
r && r.beforeEach((a, i, l) => o(a, i, l, n));
|
|
1486
1486
|
}
|
|
1487
1487
|
if (s && b(s) && s.value) {
|
|
1488
|
-
const
|
|
1489
|
-
r && r.afterEach((a,
|
|
1488
|
+
const o = j(s, {}, !1, !1, !0);
|
|
1489
|
+
r && r.afterEach((a, i, l) => o(a, i, l, n));
|
|
1490
1490
|
}
|
|
1491
1491
|
}
|
|
1492
|
-
function
|
|
1492
|
+
function as(n, e, t = {}) {
|
|
1493
1493
|
b(n) && n.value && j(n, {}, !1, !1, !0)(e, t);
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function cs(n, e, t) {
|
|
1496
1496
|
if (!n || !e || !t) return;
|
|
1497
1497
|
const { VueI18n: s } = e;
|
|
1498
1498
|
if (s) {
|
|
1499
|
-
const { locale: r, fallbackLocale:
|
|
1499
|
+
const { locale: r, fallbackLocale: o, messages: a = [] } = t, i = {};
|
|
1500
1500
|
for (let c of a) {
|
|
1501
1501
|
const f = Object.keys(c).filter((u) => u !== "key");
|
|
1502
1502
|
for (const u of f)
|
|
1503
|
-
|
|
1503
|
+
i[u] || (i[u] = {}), i[u][c.key] = c[u];
|
|
1504
1504
|
}
|
|
1505
1505
|
const l = s.createI18n({
|
|
1506
1506
|
legacy: !1,
|
|
1507
1507
|
locale: r,
|
|
1508
|
-
fallbackLocale:
|
|
1509
|
-
messages:
|
|
1508
|
+
fallbackLocale: o,
|
|
1509
|
+
messages: i
|
|
1510
1510
|
});
|
|
1511
1511
|
n.use(l);
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
1514
|
const He = Symbol("Provider");
|
|
1515
|
-
var
|
|
1516
|
-
class
|
|
1517
|
-
// DSL缓存
|
|
1515
|
+
var ls = /* @__PURE__ */ ((n) => (n.Production = "production", n.Development = "development", n))(ls || {});
|
|
1516
|
+
class us extends Je {
|
|
1518
1517
|
/**
|
|
1519
1518
|
* 创建Provider实例
|
|
1520
1519
|
* @param options 配置选项
|
|
@@ -1525,9 +1524,9 @@ class ls extends Je {
|
|
|
1525
1524
|
service: t,
|
|
1526
1525
|
mode: s = w.Raw,
|
|
1527
1526
|
dependencies: r,
|
|
1528
|
-
materials:
|
|
1527
|
+
materials: o,
|
|
1529
1528
|
project: a = {},
|
|
1530
|
-
adapter:
|
|
1529
|
+
adapter: i = {},
|
|
1531
1530
|
globals: l = {},
|
|
1532
1531
|
modules: c = {},
|
|
1533
1532
|
router: f = null,
|
|
@@ -1535,7 +1534,7 @@ class ls extends Je {
|
|
|
1535
1534
|
nodeEnv: p = "development"
|
|
1536
1535
|
/* Development */
|
|
1537
1536
|
} = e;
|
|
1538
|
-
this.mode = s, this.modules = c, this.service = t, this.router = f, this.materialPath = u, this.nodeEnv = p, r && (this.dependencies = r),
|
|
1537
|
+
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);
|
|
1539
1538
|
const { access: h, request: d } = this.adapter;
|
|
1540
1539
|
h && h.connect({ mode: s, router: f, request: d }), a && s !== w.Design ? this.load(a) : this.project = a;
|
|
1541
1540
|
}
|
|
@@ -1574,14 +1573,16 @@ class ls extends Je {
|
|
|
1574
1573
|
materialPath = "./";
|
|
1575
1574
|
// 物料路径
|
|
1576
1575
|
urlDslCaches = {};
|
|
1576
|
+
// DSL缓存
|
|
1577
|
+
errorHandler = null;
|
|
1577
1578
|
createMock(e) {
|
|
1578
1579
|
return async (...t) => {
|
|
1579
1580
|
let s = {};
|
|
1580
1581
|
if (e)
|
|
1581
1582
|
try {
|
|
1582
1583
|
s = await e.apply(e, t);
|
|
1583
|
-
} catch (
|
|
1584
|
-
O.warn("模拟数据模版异常",
|
|
1584
|
+
} catch (o) {
|
|
1585
|
+
O.warn("模拟数据模版异常", o);
|
|
1585
1586
|
}
|
|
1586
1587
|
return D()?.mock(s);
|
|
1587
1588
|
};
|
|
@@ -1599,8 +1600,8 @@ class ls extends Je {
|
|
|
1599
1600
|
const { vtjDir: t = ".vtj" } = this.options, s = this.modules[`${t}/projects/${e.id}.json`] || this.modules[`/src/${t}/projects/${e.id}.json`];
|
|
1600
1601
|
if (this.project = s ? await s() : await this.service.init(e), !this.project)
|
|
1601
1602
|
throw new Error("project is null");
|
|
1602
|
-
const { apis: r = [], meta:
|
|
1603
|
-
|
|
1603
|
+
const { apis: r = [], meta: o = [], env: a = [] } = this.project, i = window;
|
|
1604
|
+
i && (i.CKEDITOR_VERSION = void 0), this.initEnv(a), this.mode === w.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.initMock(i), this.apis = jt(r, o, this.adapter), ke(i), Rt(r, i), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
|
|
1604
1605
|
}
|
|
1605
1606
|
initMock(e) {
|
|
1606
1607
|
const t = D(e);
|
|
@@ -1617,9 +1618,9 @@ class ls extends Je {
|
|
|
1617
1618
|
const { dependencies: t = [] } = this.project, {
|
|
1618
1619
|
dependencies: s,
|
|
1619
1620
|
library: r,
|
|
1620
|
-
components:
|
|
1621
|
+
components: o,
|
|
1621
1622
|
materialPath: a,
|
|
1622
|
-
nodeEnv:
|
|
1623
|
+
nodeEnv: i,
|
|
1623
1624
|
libraryLocales: l
|
|
1624
1625
|
} = this, {
|
|
1625
1626
|
libraryExports: c,
|
|
@@ -1628,10 +1629,10 @@ class ls extends Je {
|
|
|
1628
1629
|
materialExports: p,
|
|
1629
1630
|
materialMapLibrary: h,
|
|
1630
1631
|
libraryLocaleMap: d
|
|
1631
|
-
} =
|
|
1632
|
+
} = lt(
|
|
1632
1633
|
t,
|
|
1633
1634
|
a,
|
|
1634
|
-
|
|
1635
|
+
i === "development"
|
|
1635
1636
|
/* Development */
|
|
1636
1637
|
);
|
|
1637
1638
|
Object.assign(this.libraryLocaleMap, d);
|
|
@@ -1644,7 +1645,7 @@ class ls extends Je {
|
|
|
1644
1645
|
else {
|
|
1645
1646
|
const v = f[m] || [];
|
|
1646
1647
|
for (const S of v)
|
|
1647
|
-
|
|
1648
|
+
G(S) && await gt(S, k.append(S, { v: M })), V(S) && await _e(k.append(S, { v: M }));
|
|
1648
1649
|
r[m] = e[m];
|
|
1649
1650
|
}
|
|
1650
1651
|
const _ = d[m];
|
|
@@ -1653,20 +1654,20 @@ class ls extends Je {
|
|
|
1653
1654
|
l[_] = v ? await v() : e[_];
|
|
1654
1655
|
}
|
|
1655
1656
|
}
|
|
1656
|
-
if (
|
|
1657
|
+
if (i === "development") {
|
|
1657
1658
|
for (const g of u)
|
|
1658
|
-
await _e(k.append(g, { v:
|
|
1659
|
+
await _e(k.append(g, { v: M }));
|
|
1659
1660
|
const m = this.materials || {};
|
|
1660
1661
|
for (const g of p) {
|
|
1661
1662
|
const y = e[h[g]], _ = y?.default || y, v = Ke[g];
|
|
1662
1663
|
if (v)
|
|
1663
1664
|
_ && v.forEach((S) => {
|
|
1664
|
-
|
|
1665
|
+
o[S] = _[S];
|
|
1665
1666
|
});
|
|
1666
1667
|
else {
|
|
1667
1668
|
const S = m[g] ? (await m[g]()).default : e[g];
|
|
1668
1669
|
S && _ && (S.components || []).forEach((A) => {
|
|
1669
|
-
|
|
1670
|
+
o[A.name] = ut(A, _);
|
|
1670
1671
|
});
|
|
1671
1672
|
}
|
|
1672
1673
|
}
|
|
@@ -1675,24 +1676,24 @@ class ls extends Je {
|
|
|
1675
1676
|
initRouter() {
|
|
1676
1677
|
const { router: e, project: t, options: s, adapter: r } = this;
|
|
1677
1678
|
if (!e) return;
|
|
1678
|
-
const
|
|
1679
|
+
const o = t?.platform === "uniapp" ? "pages" : "page", {
|
|
1679
1680
|
routeAppendTo: a,
|
|
1680
|
-
pageRouteName:
|
|
1681
|
+
pageRouteName: i = o,
|
|
1681
1682
|
routeMeta: l
|
|
1682
1683
|
} = s, c = a ? "" : "/", f = {
|
|
1683
|
-
path: `${c}${
|
|
1684
|
-
name:
|
|
1684
|
+
path: `${c}${i}/:id`,
|
|
1685
|
+
name: T,
|
|
1685
1686
|
component: ee
|
|
1686
1687
|
}, u = {
|
|
1687
1688
|
path: c,
|
|
1688
1689
|
name: N,
|
|
1689
|
-
component: t?.homepage ? ee : r.startupComponent ||
|
|
1690
|
+
component: t?.homepage ? ee : r.startupComponent || ts,
|
|
1690
1691
|
meta: l
|
|
1691
1692
|
};
|
|
1692
|
-
if (e.hasRoute(
|
|
1693
|
+
if (e.hasRoute(T) && e.removeRoute(T), e.hasRoute(N) && e.removeRoute(N), s.enableStaticRoute) {
|
|
1693
1694
|
const p = t?.pages || [];
|
|
1694
1695
|
le({
|
|
1695
|
-
name:
|
|
1696
|
+
name: i,
|
|
1696
1697
|
prefix: c,
|
|
1697
1698
|
pages: p,
|
|
1698
1699
|
component: ee,
|
|
@@ -1704,6 +1705,20 @@ class ls extends Je {
|
|
|
1704
1705
|
} else
|
|
1705
1706
|
a ? (e.addRoute(a, f), e.addRoute(a, u)) : (e.addRoute(f), e.addRoute(u));
|
|
1706
1707
|
}
|
|
1708
|
+
setErrorHandler(e) {
|
|
1709
|
+
e.config.errorHandler = et((t, s, r) => {
|
|
1710
|
+
const o = s?.$options.name, a = typeof t == "string" ? t : t?.message || t?.msg || "未知错误", i = `[ ${o} ] ${a} ${r}`;
|
|
1711
|
+
["getComputedStyle", "ResizeObserver"].some((c) => i.includes(c)) || (console.error(
|
|
1712
|
+
"[VTJ Error]:",
|
|
1713
|
+
{
|
|
1714
|
+
err: t,
|
|
1715
|
+
instance: s,
|
|
1716
|
+
info: r
|
|
1717
|
+
},
|
|
1718
|
+
t?.stack
|
|
1719
|
+
), this.errorHandler && this.errorHandler(t), this.adapter.notify && this.adapter.notify(i, "组件渲染错误", "error"));
|
|
1720
|
+
}, 300);
|
|
1721
|
+
}
|
|
1707
1722
|
/**
|
|
1708
1723
|
* Vue 插件安装方法
|
|
1709
1724
|
* 1. 安装所有第三方库插件
|
|
@@ -1715,11 +1730,11 @@ class ls extends Je {
|
|
|
1715
1730
|
* @param app Vue 应用实例
|
|
1716
1731
|
*/
|
|
1717
1732
|
install(e) {
|
|
1718
|
-
const { libraryLocaleMap: t, libraryLocales: s } = this, { libraryOptions: r = {} } = this.options,
|
|
1719
|
-
for (const [a,
|
|
1720
|
-
if (!
|
|
1733
|
+
const { libraryLocaleMap: t, libraryLocales: s } = this, { libraryOptions: r = {} } = this.options, o = e.config.globalProperties.installed || {};
|
|
1734
|
+
for (const [a, i] of Object.entries(this.library))
|
|
1735
|
+
if (!o[a] && yt(i)) {
|
|
1721
1736
|
const c = { locale: s[t[a]] }, f = r[a] || {}, u = { ...c, ...f };
|
|
1722
|
-
e.use(
|
|
1737
|
+
e.use(i, u), o[a] = !0;
|
|
1723
1738
|
}
|
|
1724
1739
|
e.provide(He, 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 || {}, {
|
|
1725
1740
|
app: e,
|
|
@@ -1727,32 +1742,21 @@ class ls extends Je {
|
|
|
1727
1742
|
adapter: this.adapter,
|
|
1728
1743
|
library: this.library,
|
|
1729
1744
|
mode: this.mode
|
|
1730
|
-
}), 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.
|
|
1731
|
-
const c = o?.$options.name, f = typeof a == "string" ? a : a?.message || a?.msg || "未知错误", u = `[ ${c} ] ${f} ${l}`;
|
|
1732
|
-
console.error(
|
|
1733
|
-
"[VTJ Error]:",
|
|
1734
|
-
{
|
|
1735
|
-
err: a,
|
|
1736
|
-
instance: o,
|
|
1737
|
-
info: l
|
|
1738
|
-
},
|
|
1739
|
-
a?.stack
|
|
1740
|
-
), this.adapter.notify && this.adapter.notify(u, "组件渲染错误", "error");
|
|
1741
|
-
}), e.config.globalProperties.installed = i;
|
|
1745
|
+
}), 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 && this.setErrorHandler(e), e.config.globalProperties.installed = o;
|
|
1742
1746
|
}
|
|
1743
1747
|
getFile(e) {
|
|
1744
1748
|
const { blocks: t = [] } = this.project || {};
|
|
1745
1749
|
return this.getPage(e) || t.find((s) => s.id === e) || null;
|
|
1746
1750
|
}
|
|
1747
1751
|
getPage(e) {
|
|
1748
|
-
const { pages: t = [] } = this.project || {}, s = (r,
|
|
1749
|
-
for (const a of
|
|
1752
|
+
const { pages: t = [] } = this.project || {}, s = (r, o = []) => {
|
|
1753
|
+
for (const a of o) {
|
|
1750
1754
|
if (a.id === r)
|
|
1751
1755
|
return a;
|
|
1752
1756
|
if (a.children && a.children.length) {
|
|
1753
|
-
const
|
|
1754
|
-
if (
|
|
1755
|
-
return
|
|
1757
|
+
const i = s(r, a.children);
|
|
1758
|
+
if (i)
|
|
1759
|
+
return i;
|
|
1756
1760
|
}
|
|
1757
1761
|
}
|
|
1758
1762
|
};
|
|
@@ -1790,8 +1794,8 @@ class ls extends Je {
|
|
|
1790
1794
|
* @returns 渲染器实例
|
|
1791
1795
|
*/
|
|
1792
1796
|
createDslRenderer(e, t = {}) {
|
|
1793
|
-
const { library: s, components: r, mode:
|
|
1794
|
-
mode:
|
|
1797
|
+
const { library: s, components: r, mode: o, apis: a } = this, i = {
|
|
1798
|
+
mode: o,
|
|
1795
1799
|
Vue: s.Vue,
|
|
1796
1800
|
components: r,
|
|
1797
1801
|
libs: s,
|
|
@@ -1801,10 +1805,10 @@ class ls extends Je {
|
|
|
1801
1805
|
}, l = ae({
|
|
1802
1806
|
getDsl: async (c) => await this.getDsl(c) || null,
|
|
1803
1807
|
getDslByUrl: async (c) => await this.getDslByUrl(c) || null,
|
|
1804
|
-
options:
|
|
1808
|
+
options: i
|
|
1805
1809
|
});
|
|
1806
|
-
return
|
|
1807
|
-
...
|
|
1810
|
+
return ie({
|
|
1811
|
+
...i,
|
|
1808
1812
|
dsl: e,
|
|
1809
1813
|
loader: l
|
|
1810
1814
|
});
|
|
@@ -1824,8 +1828,8 @@ class ls extends Je {
|
|
|
1824
1828
|
if (!s)
|
|
1825
1829
|
return O.warn(`Can not find file: ${e}`), null;
|
|
1826
1830
|
if (t && t(s), this.mode === w.Raw) {
|
|
1827
|
-
const { vtjRawDir:
|
|
1828
|
-
return
|
|
1831
|
+
const { vtjRawDir: o = ".vtj/vue" } = this.options, a = `${o}/${e}.vue`, i = this.modules[a] || this.modules[`/src/pages/${e}.vue`];
|
|
1832
|
+
return i ? (await i())?.default : this.nodeEnv === "development" && this.adapter.startupComponent || null;
|
|
1829
1833
|
}
|
|
1830
1834
|
const r = await this.getDsl(s.id);
|
|
1831
1835
|
return r ? this.createDslRenderer(r).renderer : (O.warn(`Can not find dsl: ${e}`), null);
|
|
@@ -1853,7 +1857,7 @@ class ls extends Je {
|
|
|
1853
1857
|
* @returns Vue异步组件
|
|
1854
1858
|
*/
|
|
1855
1859
|
definePluginComponent(e) {
|
|
1856
|
-
return we(async () => await
|
|
1860
|
+
return we(async () => await xe(e, window));
|
|
1857
1861
|
}
|
|
1858
1862
|
/**
|
|
1859
1863
|
* 设置应用全局
|
|
@@ -1868,10 +1872,10 @@ class ls extends Je {
|
|
|
1868
1872
|
},
|
|
1869
1873
|
t
|
|
1870
1874
|
);
|
|
1871
|
-
|
|
1875
|
+
ss(e, s);
|
|
1872
1876
|
}
|
|
1873
1877
|
initI18n(e, t, s) {
|
|
1874
|
-
|
|
1878
|
+
cs(e, t, s);
|
|
1875
1879
|
}
|
|
1876
1880
|
initEnv(e = []) {
|
|
1877
1881
|
this.env = e.reduce(
|
|
@@ -1880,8 +1884,8 @@ class ls extends Je {
|
|
|
1880
1884
|
);
|
|
1881
1885
|
}
|
|
1882
1886
|
}
|
|
1883
|
-
function
|
|
1884
|
-
const e = new
|
|
1887
|
+
function Is(n) {
|
|
1888
|
+
const e = new us(n);
|
|
1885
1889
|
return {
|
|
1886
1890
|
provider: e,
|
|
1887
1891
|
onReady: (s) => e.ready(s)
|
|
@@ -1904,9 +1908,9 @@ function Be(n = {}) {
|
|
|
1904
1908
|
}
|
|
1905
1909
|
return e;
|
|
1906
1910
|
}
|
|
1907
|
-
async function
|
|
1908
|
-
const { name: t, urls: s = [] } = n || {}, r = s.map((
|
|
1909
|
-
if (
|
|
1911
|
+
async function Fs(n, e = "") {
|
|
1912
|
+
const { name: t, urls: s = [] } = n || {}, r = s.map((i) => e + i), { css: o, js: a } = ft(r);
|
|
1913
|
+
if (o.length && Ae(o), a.length)
|
|
1910
1914
|
return await Ie(a, t).catch(
|
|
1911
1915
|
() => {
|
|
1912
1916
|
}
|
|
@@ -1918,7 +1922,7 @@ const Le = {
|
|
|
1918
1922
|
originResponse: !1,
|
|
1919
1923
|
failMessage: !0,
|
|
1920
1924
|
validate: (n) => n.data?.code === 0
|
|
1921
|
-
},
|
|
1925
|
+
}, fs = (n, e = "/__vtj__/api/:type.json") => (t, s, r) => n.send({
|
|
1922
1926
|
url: e,
|
|
1923
1927
|
method: "post",
|
|
1924
1928
|
params: { type: t },
|
|
@@ -1928,7 +1932,7 @@ const Le = {
|
|
|
1928
1932
|
data: s
|
|
1929
1933
|
},
|
|
1930
1934
|
settings: Le
|
|
1931
|
-
}),
|
|
1935
|
+
}), ps = (n, e = "/__vtj__/api/uploader.json") => async (t, s) => await n.send({
|
|
1932
1936
|
url: e,
|
|
1933
1937
|
method: "post",
|
|
1934
1938
|
data: {
|
|
@@ -1940,7 +1944,7 @@ const Le = {
|
|
|
1940
1944
|
type: "data"
|
|
1941
1945
|
}
|
|
1942
1946
|
}).then((r) => r && r[0] ? r[0] : null).catch(() => null);
|
|
1943
|
-
function
|
|
1947
|
+
function ks(n) {
|
|
1944
1948
|
return be({
|
|
1945
1949
|
settings: {
|
|
1946
1950
|
type: "json",
|
|
@@ -1956,7 +1960,7 @@ function Fs(n) {
|
|
|
1956
1960
|
}
|
|
1957
1961
|
class de {
|
|
1958
1962
|
constructor(e = ne) {
|
|
1959
|
-
this.req = e, this.api =
|
|
1963
|
+
this.req = e, this.api = fs(e), this.uploader = ps(e);
|
|
1960
1964
|
}
|
|
1961
1965
|
api;
|
|
1962
1966
|
pluginCaches = {};
|
|
@@ -2040,7 +2044,7 @@ class de {
|
|
|
2040
2044
|
return await this.api("clearStaticFiles", e).catch(() => "");
|
|
2041
2045
|
}
|
|
2042
2046
|
async getPluginMaterial(e) {
|
|
2043
|
-
const { urls: t = [] } = e, s = t.filter((
|
|
2047
|
+
const { urls: t = [] } = e, s = t.filter((o) => at(o))[0];
|
|
2044
2048
|
if (!s) return null;
|
|
2045
2049
|
const r = this.pluginCaches[s];
|
|
2046
2050
|
return r || (this.pluginCaches[s] = ne.send({
|
|
@@ -2050,18 +2054,18 @@ class de {
|
|
|
2050
2054
|
validSuccess: !1,
|
|
2051
2055
|
originResponse: !0
|
|
2052
2056
|
}
|
|
2053
|
-
}).then((
|
|
2057
|
+
}).then((o) => o.data).catch(() => null));
|
|
2054
2058
|
}
|
|
2055
2059
|
async genSource(e) {
|
|
2056
2060
|
return console.log("BaseService.genSource", e), "";
|
|
2057
2061
|
}
|
|
2058
2062
|
}
|
|
2059
|
-
const $ = new
|
|
2063
|
+
const $ = new tt({
|
|
2060
2064
|
type: "local",
|
|
2061
2065
|
expired: 0,
|
|
2062
2066
|
prefix: "__VTJ_"
|
|
2063
2067
|
});
|
|
2064
|
-
class
|
|
2068
|
+
class Os extends de {
|
|
2065
2069
|
init(e) {
|
|
2066
2070
|
const t = new U(e), s = $.get(`project_${t.id}`), r = Object.assign(t.toDsl(), s || {});
|
|
2067
2071
|
return $.save(`project_${t.id}`, r), Promise.resolve(r);
|
|
@@ -2089,7 +2093,7 @@ class ks extends de {
|
|
|
2089
2093
|
removeHistory(e) {
|
|
2090
2094
|
const t = $.get(`history_${e}`);
|
|
2091
2095
|
if (t) {
|
|
2092
|
-
const r = (t.items || []).map((
|
|
2096
|
+
const r = (t.items || []).map((o) => o.id);
|
|
2093
2097
|
this.removeHistoryItem(e, r), $.remove(`history_${e}`);
|
|
2094
2098
|
}
|
|
2095
2099
|
return Promise.resolve(!0);
|
|
@@ -2111,7 +2115,7 @@ class ks extends de {
|
|
|
2111
2115
|
}), Promise.resolve(!0);
|
|
2112
2116
|
}
|
|
2113
2117
|
}
|
|
2114
|
-
class
|
|
2118
|
+
class ds extends de {
|
|
2115
2119
|
projects = {};
|
|
2116
2120
|
materials = {};
|
|
2117
2121
|
files = {};
|
|
@@ -2144,7 +2148,7 @@ class ps extends de {
|
|
|
2144
2148
|
removeHistory(e) {
|
|
2145
2149
|
const t = this.histories[e];
|
|
2146
2150
|
if (t) {
|
|
2147
|
-
const r = (t.items || []).map((
|
|
2151
|
+
const r = (t.items || []).map((o) => o.id);
|
|
2148
2152
|
this.removeHistoryItem(e, r), delete this.historyItems[e];
|
|
2149
2153
|
}
|
|
2150
2154
|
return Promise.resolve(!0);
|
|
@@ -2169,8 +2173,8 @@ class ps extends de {
|
|
|
2169
2173
|
}
|
|
2170
2174
|
}
|
|
2171
2175
|
let L = null;
|
|
2172
|
-
function
|
|
2173
|
-
return L || (L = new
|
|
2176
|
+
function xs() {
|
|
2177
|
+
return L || (L = new ds(), L);
|
|
2174
2178
|
}
|
|
2175
2179
|
class Ms extends de {
|
|
2176
2180
|
getFileCaches = {};
|
|
@@ -2230,82 +2234,82 @@ class Ms extends de {
|
|
|
2230
2234
|
}
|
|
2231
2235
|
}
|
|
2232
2236
|
export {
|
|
2233
|
-
|
|
2237
|
+
ws as ACCESS,
|
|
2234
2238
|
Fe as ACCESS_KEY,
|
|
2235
2239
|
pe as Access,
|
|
2236
2240
|
it as BUILD_IN_TAGS,
|
|
2237
|
-
|
|
2241
|
+
nt as BUILT_IN_DIRECTIVES,
|
|
2238
2242
|
de as BaseService,
|
|
2239
2243
|
Se as CONTEXT_HOST,
|
|
2240
|
-
|
|
2244
|
+
At as Context,
|
|
2241
2245
|
w as ContextMode,
|
|
2242
|
-
|
|
2246
|
+
rt as DATA_TYPES,
|
|
2243
2247
|
N as HOMEPAGE_ROUTE_NAME,
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2248
|
+
ot as HTML_TAGS,
|
|
2249
|
+
js as JSCodeToString,
|
|
2250
|
+
vs as LIFE_CYCLES_LIST,
|
|
2247
2251
|
Ms as LocalService,
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2252
|
+
ds as MemoryService,
|
|
2253
|
+
ls as NodeEnv,
|
|
2254
|
+
T as PAGE_ROUTE_NAME,
|
|
2255
|
+
us as Provider,
|
|
2256
|
+
_s as REMOTE,
|
|
2257
|
+
Os as StorageService,
|
|
2258
|
+
M as VTJ_RENDERER_VERSION,
|
|
2259
|
+
bs as adoptStylesToInline,
|
|
2256
2260
|
fe as adoptedStyleSheets,
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2261
|
+
Cs as clearLoaderCache,
|
|
2262
|
+
pt as compileScopedCSS,
|
|
2263
|
+
mt as convertCssRpx,
|
|
2264
|
+
Ps as createAccess,
|
|
2265
|
+
Rs as createAdapter,
|
|
2266
|
+
Ss as createAssetScripts,
|
|
2267
|
+
$s as createAssetsCss,
|
|
2264
2268
|
Tt as createDataSources,
|
|
2265
2269
|
ae as createLoader,
|
|
2266
|
-
|
|
2270
|
+
xs as createMemoryService,
|
|
2267
2271
|
K as createMenus,
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2272
|
+
Et as createMetaApi,
|
|
2273
|
+
Pt as createMock,
|
|
2274
|
+
Is as createProvider,
|
|
2275
|
+
ie as createRenderer,
|
|
2276
|
+
bt as createSchemaApi,
|
|
2277
|
+
jt as createSchemaApis,
|
|
2278
|
+
ks as createServiceRequest,
|
|
2279
|
+
Bt as defaultLoader,
|
|
2276
2280
|
B as fillBasePath,
|
|
2277
2281
|
D as getMock,
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2282
|
+
Te as getModifiers,
|
|
2283
|
+
xe as getPlugin,
|
|
2284
|
+
ut as getRawComponent,
|
|
2285
|
+
vt as isBuiltInTag,
|
|
2286
|
+
G as isCSSUrl,
|
|
2287
|
+
wt as isJSCode,
|
|
2284
2288
|
E as isJSExpression,
|
|
2285
2289
|
b as isJSFunction,
|
|
2286
|
-
|
|
2290
|
+
at as isJSON,
|
|
2287
2291
|
V as isJSUrl,
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2292
|
+
_t as isNativeTag,
|
|
2293
|
+
yt as isVuePlugin,
|
|
2294
|
+
gt as loadCss,
|
|
2291
2295
|
Ae as loadCssUrl,
|
|
2292
|
-
|
|
2296
|
+
Fs as loadEnhance,
|
|
2293
2297
|
Ie as loadScriptUrl,
|
|
2294
2298
|
De as menusFilter,
|
|
2295
|
-
|
|
2296
|
-
|
|
2299
|
+
Ct as mockApi,
|
|
2300
|
+
Rt as mockApis,
|
|
2297
2301
|
ke as mockCleanup,
|
|
2298
|
-
|
|
2299
|
-
|
|
2302
|
+
x as nodeRender,
|
|
2303
|
+
lt as parseDeps,
|
|
2300
2304
|
H as parseExpression,
|
|
2301
2305
|
j as parseFunction,
|
|
2302
|
-
|
|
2306
|
+
ft as parseUrls,
|
|
2303
2307
|
He as providerKey,
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2308
|
+
ct as removeProdFlag,
|
|
2309
|
+
ht as rpxToPx,
|
|
2310
|
+
Es as setupPageSetting,
|
|
2307
2311
|
Ce as toString,
|
|
2308
|
-
|
|
2309
|
-
|
|
2312
|
+
$t as useAccess,
|
|
2313
|
+
As as useMask,
|
|
2310
2314
|
Be as useProvider
|
|
2311
2315
|
};
|