@das-fed/upf-web 6.4.0-dev.202 → 6.4.0-dev.203
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/es5.js +80 -80
- package/esm-map.json +11 -12
- package/{index-DvcXHpcr.js → index-4gY_dDQ-.js} +1 -1
- package/index-4gY_dDQ-.js.gz +0 -0
- package/{index-L0ZWbpXA.js → index-DBJqJe-a.js} +1764 -1729
- package/index-DBJqJe-a.js.gz +0 -0
- package/{index-B3QSTHl8.js → index-DC6Eay0b.js} +1 -1
- package/index.js +13 -14
- package/package.json +6 -6
- package/packages/create-das-web-app/es5.js +295 -82
- package/packages/create-das-web-app/index.js +127 -49
- package/packages/create-das-web-app/index.js.gz +0 -0
- package/packages/i18n/es5.js +112 -187
- package/packages/i18n/index.js +56 -86
- package/packages/i18n/index.js.gz +0 -0
- package/packages/layout/index.js.gz +0 -0
- package/packages/micro-frontend/index.js.gz +0 -0
- package/types/i18n/index.d.ts +1 -2
- package/types/i18n/microI18n.d.ts +13 -0
- package/index-DvcXHpcr.js.gz +0 -0
- package/index-L0ZWbpXA.js.gz +0 -0
- package/types/i18n/register.d.ts +0 -3
|
@@ -1,59 +1,137 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { initTheme as
|
|
3
|
-
import { DasWebLayout as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { reactive as L, ref as j, createApp as B } from "vue";
|
|
2
|
+
import { initTheme as I } from "@das-fed/upf-web/packages/theme/index";
|
|
3
|
+
import { DasWebLayout as N } from "@das-fed/upf-web/packages/layout/index";
|
|
4
|
+
import { createPinia as D } from "pinia";
|
|
5
|
+
import W from "pinia-plugin-persistedstate";
|
|
6
|
+
import { createRouter as C, createWebHistory as M } from "vue-router";
|
|
7
|
+
import { getUrlParams as O, handleI18nData as S } from "@das-fed/upf-utils/common-tools";
|
|
8
|
+
import { getConfig as z } from "@das-fed/upf-utils/config";
|
|
9
|
+
const H = {
|
|
10
|
+
install: (e, n) => {
|
|
11
|
+
var a;
|
|
12
|
+
const r = (a = n == null ? void 0 : n.plugins) == null ? void 0 : a.glob;
|
|
13
|
+
r && Object.values(r).sort((t, s) => (t.index ?? 0) - (s.index ?? 0)).filter((t) => t ? !!(t.default && t.default.install || t.install) : !1).forEach((t) => {
|
|
14
|
+
t.default && t.default.install && e.use(t.default, n), t.install && e.use(t, n);
|
|
14
15
|
});
|
|
15
16
|
}
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
17
|
+
}, E = D();
|
|
18
|
+
E.use(W);
|
|
19
|
+
const P = "language", A = L({});
|
|
20
|
+
L({});
|
|
21
|
+
L({});
|
|
22
|
+
const K = O(location.href, "uiCulture") || "", F = K || window.localStorage.getItem(P) || window.navigator.language || "zh-CN", $ = j(F), G = () => {
|
|
23
|
+
const e = document.documentElement;
|
|
24
|
+
e && e.setAttribute("lang", $.value);
|
|
25
|
+
}, R = (e = {}, n) => {
|
|
26
|
+
const r = {};
|
|
27
|
+
for (const a in e)
|
|
28
|
+
for (const t in e[a])
|
|
29
|
+
r[t] || (r[t] = {}), r[t][a] = e[a][t] ?? "", A[t] || (A[t] = {}), A[t][a] = r[t][a];
|
|
30
|
+
}, T = (e) => {
|
|
31
|
+
$.value = e, G();
|
|
32
|
+
}, q = {
|
|
33
|
+
loaded: {},
|
|
34
|
+
isLoaded(e) {
|
|
35
|
+
return !!this.loaded[e];
|
|
36
|
+
},
|
|
37
|
+
markLoaded(e) {
|
|
38
|
+
this.loaded[e] = !0;
|
|
39
|
+
},
|
|
40
|
+
markUnloaded(e) {
|
|
41
|
+
delete this.loaded[e];
|
|
42
|
+
}
|
|
43
|
+
}, J = async (e, n) => {
|
|
44
|
+
var d, g, l;
|
|
45
|
+
const r = z() || {}, a = ((d = r.i18n) == null ? void 0 : d.fromOss) ?? !0, t = ((g = r.i18n) == null ? void 0 : g.isPullBack) ?? !1, s = ((l = r.i18n) == null ? void 0 : l.isDasUI) ?? !0;
|
|
46
|
+
let i = "/oss/resource/";
|
|
47
|
+
try {
|
|
48
|
+
const f = await S({
|
|
49
|
+
baseUrl: a ? i : "/",
|
|
50
|
+
currentLang: n,
|
|
51
|
+
appName: e,
|
|
52
|
+
isPullBack: t,
|
|
53
|
+
fallbackBaseUrl: "/",
|
|
54
|
+
isDasUI: s
|
|
55
|
+
});
|
|
56
|
+
if (!f || !(f != null && f.frontEnd))
|
|
57
|
+
throw new Error("Failed to fetch i18n data");
|
|
58
|
+
return f;
|
|
59
|
+
} catch (h) {
|
|
60
|
+
throw new Error(`registerResources error: ${h}`);
|
|
61
|
+
}
|
|
62
|
+
}, Q = async (e = []) => {
|
|
63
|
+
const n = O(location.href, "uiCulture") || window.localStorage.getItem(P) || window.navigator.language || "zh-CN";
|
|
64
|
+
try {
|
|
65
|
+
const r = await J(e, n);
|
|
66
|
+
r != null && r.frontEnd && typeof r.frontEnd == "object" && Object.keys(r.frontEnd).length && e.forEach((a) => {
|
|
67
|
+
r.frontEnd[a] && typeof r.frontEnd[a] == "object" && Object.keys(r.frontEnd[a]).length && R({ [n]: r.frontEnd[a] });
|
|
68
|
+
}), r != null && r.dasUiEnd && typeof r.dasUiEnd == "object" && Object.keys(r.dasUiEnd).length && R({ [n]: r.dasUiEnd }), T(n);
|
|
69
|
+
} catch {
|
|
70
|
+
}
|
|
71
|
+
}, V = (e) => {
|
|
72
|
+
var h, p, f, U, v;
|
|
73
|
+
const n = ((h = e == null ? void 0 : e.router) == null ? void 0 : h.routerBase) ?? "/", r = ((p = e == null ? void 0 : e.router) == null ? void 0 : p.options) || {};
|
|
74
|
+
let a = Object.assign(((f = e == null ? void 0 : e.router) == null ? void 0 : f.glob) || {});
|
|
75
|
+
const t = Object.values(a).filter((u) => !!u).flat().sort((u, o) => (u.index ?? 0) - (o.index ?? 0)), s = [];
|
|
76
|
+
(U = e == null ? void 0 : e.microApps) == null || U.map((u) => {
|
|
77
|
+
var w;
|
|
78
|
+
const o = Object.values(((w = u.router) == null ? void 0 : w.glob) || {}).filter((c) => !!c).flat().sort((c, y) => (c.index ?? 0) - (y.index ?? 0));
|
|
79
|
+
s.push(
|
|
80
|
+
...o.map((c) => ({ ...c, path: `/${u.microAppName}${c.path}` }))
|
|
81
|
+
), s.push(
|
|
82
|
+
...o.filter((c) => !!c.path).filter((c) => c.path !== "").filter((c) => c.path !== "/").filter((c) => !c.path.startsWith(`/${c.microAppName}`)).map((c) => ({
|
|
83
|
+
path: c.path,
|
|
84
|
+
redirect: `/${u.microAppName}${c.path}`,
|
|
85
|
+
meta: { ...c.meta || {}, isMicroAppRouteRedirect: !0 }
|
|
33
86
|
}))
|
|
34
87
|
);
|
|
35
88
|
});
|
|
36
|
-
const
|
|
37
|
-
...
|
|
38
|
-
...i
|
|
39
|
-
...
|
|
40
|
-
];
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
89
|
+
const i = ((v = e == null ? void 0 : e.router) == null ? void 0 : v.routers) || [], d = [
|
|
90
|
+
...k(t, e),
|
|
91
|
+
...k(i, e),
|
|
92
|
+
...k(s, e)
|
|
93
|
+
], g = C({ history: M(n), routes: d, ...r }), l = q;
|
|
94
|
+
if (Array.isArray(e == null ? void 0 : e.microApps) && e.microApps.length && l) {
|
|
95
|
+
const u = /* @__PURE__ */ new Map();
|
|
96
|
+
for (const o of e.microApps)
|
|
97
|
+
o != null && o.microAppName && (o != null && o.i18n) && u.set(o.microAppName, o.i18n);
|
|
98
|
+
g.beforeEach(async (o, w, c) => {
|
|
99
|
+
try {
|
|
100
|
+
const y = o.path || "";
|
|
101
|
+
for (const [b, m] of u.entries()) {
|
|
102
|
+
if (!b || !y.toLowerCase().startsWith(`/${b.toLowerCase()}`)) continue;
|
|
103
|
+
if (typeof l.isLoaded == "function" && l.isLoaded(b) || !m || !(m != null && m.length)) break;
|
|
104
|
+
const x = typeof m == "string" ? [m] : m;
|
|
105
|
+
typeof l.markLoaded == "function" && l.markLoaded(b);
|
|
106
|
+
try {
|
|
107
|
+
await Q(x);
|
|
108
|
+
} catch {
|
|
109
|
+
typeof l.markUnloaded == "function" && l.markUnloaded(b);
|
|
110
|
+
}
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
} catch {
|
|
114
|
+
} finally {
|
|
115
|
+
c();
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return { router: g };
|
|
120
|
+
}, k = (e, n) => e.map((r) => {
|
|
121
|
+
const a = r.meta || {};
|
|
122
|
+
return a.keepAlive = a.keepAlive ?? (n == null ? void 0 : n.keepAlive) ?? !0, { ...r, meta: a };
|
|
123
|
+
}), ce = (e) => {
|
|
124
|
+
var d;
|
|
47
125
|
e || (e = {});
|
|
48
|
-
const
|
|
49
|
-
Promise.all([
|
|
50
|
-
|
|
126
|
+
const n = j(!0);
|
|
127
|
+
Promise.all([I(e)]).then(() => {
|
|
128
|
+
n.value = !1;
|
|
51
129
|
});
|
|
52
|
-
const { container:
|
|
53
|
-
|
|
54
|
-
const { router:
|
|
55
|
-
return
|
|
130
|
+
const { container: r, component: a, props: t } = (e == null ? void 0 : e.root) || {}, s = B(a || N, t);
|
|
131
|
+
s.use(H, e), s.use(E);
|
|
132
|
+
const { router: i } = V(e);
|
|
133
|
+
return s.use(i), s.mount(r || "#app"), (d = window.top) != null && d.vueRouter || window.top && (window.top.vueRouter = i), { app: s, router: i, loading: n, store: E };
|
|
56
134
|
};
|
|
57
135
|
export {
|
|
58
|
-
|
|
136
|
+
ce as createDasWebApp
|
|
59
137
|
};
|
|
Binary file
|
package/packages/i18n/es5.js
CHANGED
|
@@ -1,150 +1,105 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
5
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
3
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
7
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var
|
|
4
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
|
|
8
5
|
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
9
6
|
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
|
|
10
7
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
11
8
|
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
12
9
|
var vue = require('vue');
|
|
13
10
|
var commonTools = require('@das-fed/upf-utils/common-tools');
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(t, n) {
|
|
17
|
-
var _ref2, _ref3, _ref4;
|
|
18
|
-
var m, u, b, a, o, s, e, r, l, _t;
|
|
19
|
-
return _regenerator().w(function (_context) {
|
|
20
|
-
while (1) switch (_context.p = _context.n) {
|
|
21
|
-
case 0:
|
|
22
|
-
a = config.getConfig() || {}, o = (_ref2 = (m = a.i18n) == null ? undefined : m.fromOss) !== null && _ref2 !== void 0 ? _ref2 : true, s = (_ref3 = (u = a.i18n) == null ? undefined : u.isPullBack) !== null && _ref3 !== void 0 ? _ref3 : true, e = (_ref4 = (b = a.i18n) == null ? undefined : b.isDasUI) !== null && _ref4 !== void 0 ? _ref4 : true;
|
|
23
|
-
r = "/oss/resource/";
|
|
24
|
-
_context.p = 1;
|
|
25
|
-
_context.n = 2;
|
|
26
|
-
return commonTools.handleI18nData({
|
|
27
|
-
baseUrl: o ? r : "/",
|
|
28
|
-
currentLang: n,
|
|
29
|
-
appName: t,
|
|
30
|
-
isPullBack: s,
|
|
31
|
-
fallbackBaseUrl: "/",
|
|
32
|
-
isDasUI: e
|
|
33
|
-
});
|
|
34
|
-
case 2:
|
|
35
|
-
l = _context.v;
|
|
36
|
-
if (!(!l || !(l != null && l.frontEnd))) {
|
|
37
|
-
_context.n = 3;
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
throw new Error("Failed to fetch i18n data");
|
|
41
|
-
case 3:
|
|
42
|
-
return _context.a(2, l);
|
|
43
|
-
case 4:
|
|
44
|
-
_context.p = 4;
|
|
45
|
-
_t = _context.v;
|
|
46
|
-
throw new Error("registerResources error: ".concat(_t));
|
|
47
|
-
case 5:
|
|
48
|
-
return _context.a(2);
|
|
49
|
-
}
|
|
50
|
-
}, _callee, null, [[1, 4]]);
|
|
51
|
-
}));
|
|
52
|
-
return function k(_x, _x2) {
|
|
53
|
-
return _ref.apply(this, arguments);
|
|
54
|
-
};
|
|
55
|
-
}(),
|
|
56
|
-
j = "language",
|
|
11
|
+
var h = "language",
|
|
12
|
+
s = vue.reactive({}),
|
|
57
13
|
c = vue.reactive({}),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
E = function E() {
|
|
14
|
+
l = vue.reactive({}),
|
|
15
|
+
j = commonTools.getUrlParams(location.href, "uiCulture") || "",
|
|
16
|
+
y = j || window.localStorage.getItem(h) || window.navigator.language || "zh-CN",
|
|
17
|
+
m = vue.ref(y),
|
|
18
|
+
D = "dasI18n",
|
|
19
|
+
g = function g() {
|
|
65
20
|
var t = document.documentElement;
|
|
66
|
-
t && t.setAttribute("lang",
|
|
21
|
+
t && t.setAttribute("lang", m.value);
|
|
67
22
|
},
|
|
68
|
-
|
|
23
|
+
v = function v() {
|
|
69
24
|
var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
70
|
-
var
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
for (var
|
|
75
|
-
var _t$
|
|
76
|
-
|
|
25
|
+
var a = arguments.length > 1 ? arguments[1] : undefined;
|
|
26
|
+
var r = a === "global",
|
|
27
|
+
e = !r,
|
|
28
|
+
i = {};
|
|
29
|
+
for (var o in t) for (var n in t[o]) {
|
|
30
|
+
var _t$o$n;
|
|
31
|
+
i[n] || (i[n] = {}), i[n][o] = (_t$o$n = t[o][n]) !== null && _t$o$n !== void 0 ? _t$o$n : "", r && (c[n] || (c[n] = {}), c[n][o] = i[n][o]), e && (s[n] || (s[n] = {}), s[n][o] = i[n][o]);
|
|
77
32
|
}
|
|
78
33
|
},
|
|
79
|
-
|
|
34
|
+
b = function b() {
|
|
80
35
|
var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
81
|
-
var
|
|
82
|
-
var
|
|
83
|
-
var
|
|
84
|
-
|
|
85
|
-
for (var
|
|
86
|
-
var
|
|
87
|
-
|
|
36
|
+
var a = arguments.length > 1 ? arguments[1] : undefined;
|
|
37
|
+
var i;
|
|
38
|
+
var r = a === "global",
|
|
39
|
+
e = !r;
|
|
40
|
+
for (var o in t) if (r && !c[o] && (c[o] = t[o]), e) {
|
|
41
|
+
var n = (i = t[o]) != null && i._appCode ? t[o]._appCode.toLowerCase() : "";
|
|
42
|
+
n && (l[n] || (l[n] = {}), l[n][o] = t[o]), s[o] || (s[o] = t[o]);
|
|
88
43
|
}
|
|
89
44
|
},
|
|
90
|
-
|
|
91
|
-
var
|
|
92
|
-
var
|
|
93
|
-
return _regenerator().w(function (
|
|
94
|
-
while (1) switch (
|
|
45
|
+
R = /*#__PURE__*/function () {
|
|
46
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(t) {
|
|
47
|
+
var a;
|
|
48
|
+
return _regenerator().w(function (_context) {
|
|
49
|
+
while (1) switch (_context.n) {
|
|
95
50
|
case 0:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
51
|
+
g();
|
|
52
|
+
a = window[D];
|
|
53
|
+
a && b(a, "global");
|
|
99
54
|
case 1:
|
|
100
|
-
return
|
|
55
|
+
return _context.a(2);
|
|
101
56
|
}
|
|
102
|
-
},
|
|
57
|
+
}, _callee);
|
|
103
58
|
}));
|
|
104
|
-
return function
|
|
105
|
-
return
|
|
59
|
+
return function R(_x) {
|
|
60
|
+
return _ref.apply(this, arguments);
|
|
106
61
|
};
|
|
107
62
|
}(),
|
|
108
63
|
A = function A(t) {
|
|
109
|
-
var
|
|
110
|
-
var
|
|
111
|
-
|
|
112
|
-
return
|
|
64
|
+
var a = "";
|
|
65
|
+
var r = /\/([^\/]+)\/([^\/]+)\//,
|
|
66
|
+
e = t.match(r);
|
|
67
|
+
return e && e.length >= 3 && (a = e[1] + "/" + e[2]), a ? a.toLowerCase() : "";
|
|
113
68
|
},
|
|
114
|
-
|
|
115
|
-
for (var _len = arguments.length,
|
|
116
|
-
|
|
69
|
+
I = function I(t) {
|
|
70
|
+
for (var _len = arguments.length, a = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
71
|
+
a[_key - 1] = arguments[_key];
|
|
117
72
|
}
|
|
118
73
|
return vue.computed(function () {
|
|
119
|
-
var
|
|
120
|
-
var
|
|
121
|
-
var
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
if (
|
|
125
|
-
typeof
|
|
126
|
-
"zh-CN":
|
|
74
|
+
var _l$framework, _l$r;
|
|
75
|
+
var r = A(location.pathname);
|
|
76
|
+
var e = (_l$framework = l.framework) !== null && _l$framework !== void 0 ? _l$framework : {},
|
|
77
|
+
i = (_l$r = l[r]) !== null && _l$r !== void 0 ? _l$r : {},
|
|
78
|
+
o = s[t] || c[t] || e[t] || i[t] || t;
|
|
79
|
+
if (o === t) return t;
|
|
80
|
+
typeof o == "string" && (o = {
|
|
81
|
+
"zh-CN": o
|
|
127
82
|
});
|
|
128
|
-
var
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
}),
|
|
83
|
+
var n = o[m.value];
|
|
84
|
+
return m.value === "zh-CN" && o["zh-cn"] && !o["zh-CN"] && (n = o["zh-cn"]), a.map(function (f, d) {
|
|
85
|
+
n && (n = n.replace("$".concat(d), f));
|
|
86
|
+
}), n;
|
|
132
87
|
});
|
|
133
88
|
},
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
for (var _len2 = arguments.length,
|
|
137
|
-
|
|
89
|
+
z = I,
|
|
90
|
+
N = function N(t) {
|
|
91
|
+
for (var _len2 = arguments.length, a = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
92
|
+
a[_key2 - 1] = arguments[_key2];
|
|
138
93
|
}
|
|
139
|
-
return
|
|
94
|
+
return z.apply(void 0, [t].concat(a)).value;
|
|
140
95
|
},
|
|
141
|
-
|
|
142
|
-
|
|
96
|
+
T = function T(t) {
|
|
97
|
+
m.value = t, g();
|
|
143
98
|
},
|
|
144
|
-
|
|
145
|
-
return
|
|
99
|
+
_ = function _() {
|
|
100
|
+
return m;
|
|
146
101
|
},
|
|
147
|
-
|
|
102
|
+
u = {
|
|
148
103
|
"en-US": {
|
|
149
104
|
ant: function ant() {
|
|
150
105
|
return Promise.resolve().then(function () {
|
|
@@ -302,79 +257,49 @@ var k = /*#__PURE__*/function () {
|
|
|
302
257
|
}
|
|
303
258
|
}
|
|
304
259
|
};
|
|
305
|
-
function
|
|
306
|
-
var
|
|
307
|
-
var
|
|
308
|
-
return
|
|
260
|
+
function x(t, a) {
|
|
261
|
+
var e;
|
|
262
|
+
var r = window.DATE_FORMAT_MAP;
|
|
263
|
+
return r && r[t] && r[t][a] ? r[t][a] : ((e = window.DATE_FORMAT_MAP[t]) == null ? undefined : e[a]) || "YYYY-MM-DD";
|
|
309
264
|
}
|
|
310
|
-
var
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
o.frontEnd[s] && _typeof(o.frontEnd[s]) == "object" && Object.keys(o.frontEnd[s]).length && d(_defineProperty({}, n, o.frontEnd[s]));
|
|
352
|
-
}), o != null && o.backMsg && _typeof(o.backMsg) == "object" && Object.keys(o.backMsg).length && o.backMsg.aiot && _typeof(o.backMsg.aiot) == "object" && Object.keys(o.backMsg.aiot).length && d(_defineProperty({}, n, o.backMsg.aiot)), o != null && o.dasUiEnd && _typeof(o.dasUiEnd) == "object" && Object.keys(o.dasUiEnd).length && d(_defineProperty({}, n, o.dasUiEnd)), R(n);
|
|
353
|
-
_context4.n = 4;
|
|
354
|
-
break;
|
|
355
|
-
case 3:
|
|
356
|
-
_context4.p = 3;
|
|
357
|
-
_t3 = _context4.v;
|
|
358
|
-
case 4:
|
|
359
|
-
return _context4.a(2);
|
|
360
|
-
}
|
|
361
|
-
}, _callee4, null, [[1, 3]]);
|
|
362
|
-
}));
|
|
363
|
-
return function K(_x5) {
|
|
364
|
-
return _ref7.apply(this, arguments);
|
|
365
|
-
};
|
|
366
|
-
}();
|
|
367
|
-
exports.currentLang = g;
|
|
368
|
-
exports.customLangeData = c;
|
|
369
|
-
exports.getDateFormat = G;
|
|
370
|
-
exports.getI18nRule = v;
|
|
371
|
-
exports.getLang = F;
|
|
372
|
-
exports.i18n = N;
|
|
373
|
-
exports.initI18n = x;
|
|
374
|
-
exports.languageKey = j;
|
|
375
|
-
exports.loadLocale = Y;
|
|
376
|
-
exports.registerMicroI18nData = K;
|
|
377
|
-
exports.setI18nRule = z;
|
|
378
|
-
exports.setLang = R;
|
|
379
|
-
exports.setLangRule = d;
|
|
380
|
-
exports.t = B;
|
|
265
|
+
var O = /*#__PURE__*/function () {
|
|
266
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(t) {
|
|
267
|
+
var a, r, _t;
|
|
268
|
+
return _regenerator().w(function (_context2) {
|
|
269
|
+
while (1) switch (_context2.p = _context2.n) {
|
|
270
|
+
case 0:
|
|
271
|
+
a = u[t] || u["zh-CN"];
|
|
272
|
+
_context2.p = 1;
|
|
273
|
+
_context2.n = 2;
|
|
274
|
+
return a.ant();
|
|
275
|
+
case 2:
|
|
276
|
+
r = _context2.v;
|
|
277
|
+
_context2.n = 3;
|
|
278
|
+
return a.dayjs();
|
|
279
|
+
case 3:
|
|
280
|
+
return _context2.a(2, r["default"]);
|
|
281
|
+
case 4:
|
|
282
|
+
_context2.p = 4;
|
|
283
|
+
_t = _context2.v;
|
|
284
|
+
case 5:
|
|
285
|
+
return _context2.a(2);
|
|
286
|
+
}
|
|
287
|
+
}, _callee2, null, [[1, 4]]);
|
|
288
|
+
}));
|
|
289
|
+
return function O(_x2) {
|
|
290
|
+
return _ref2.apply(this, arguments);
|
|
291
|
+
};
|
|
292
|
+
}();
|
|
293
|
+
exports.currentLang = m;
|
|
294
|
+
exports.customLangeData = s;
|
|
295
|
+
exports.getDateFormat = x;
|
|
296
|
+
exports.getI18nRule = I;
|
|
297
|
+
exports.getLang = _;
|
|
298
|
+
exports.i18n = z;
|
|
299
|
+
exports.initI18n = R;
|
|
300
|
+
exports.languageKey = h;
|
|
301
|
+
exports.loadLocale = O;
|
|
302
|
+
exports.setI18nRule = b;
|
|
303
|
+
exports.setLang = T;
|
|
304
|
+
exports.setLangRule = v;
|
|
305
|
+
exports.t = N;
|