@fox-js/fox 3.0.1-35 → 3.0.1-37
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/libs/index.cjs.js +2 -2
- package/libs/index.esm.d.ts +1 -1
- package/libs/index.esm.js +398 -382
- package/libs/index.umd.js +3 -3
- package/package.json +1 -1
package/libs/index.esm.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { ref as gr, getCurrentInstance as
|
|
1
|
+
import { ref as gr, getCurrentInstance as Mt, onUnmounted as ot, shallowRef as Gr, defineComponent as wr, inject as G, provide as se, h as he } from "vue";
|
|
2
2
|
/*!
|
|
3
|
-
* fox v3.0.0
|
|
3
|
+
* fox v3.0.0 Mon Feb 19 2024 13:54:09 GMT+0800 (中国标准时间)
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const Ce = typeof window < "u", $ = function() {
|
|
6
6
|
return window;
|
|
7
7
|
}, Ve = function() {
|
|
8
8
|
return window.document;
|
|
9
9
|
};
|
|
10
|
-
function
|
|
10
|
+
function Qr(s) {
|
|
11
11
|
let e = s, t = e.lastIndexOf("/");
|
|
12
12
|
return t > 0 && t < e.length - 1 ? e = e.substring(0, t + 1) : t === 0 && e.indexOf(".") !== -1 ? e = "/" : t === -1 && (e.indexOf(".") == -1 ? e = `/${e}/` : e = "/"), e.indexOf("/") !== 0 && (e = `/${e}`), e;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
if (!
|
|
14
|
+
function ct() {
|
|
15
|
+
if (!Ce)
|
|
16
16
|
return "/";
|
|
17
17
|
let s = $().location, e = `${s.protocol}//${s.host}`;
|
|
18
|
-
return e +=
|
|
18
|
+
return e += Qr(s.pathname), e;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function $t(s, e, t) {
|
|
21
21
|
s.addEventListener ? s.addEventListener(e, t, !1) : s.attachEvent ? s.attachEvent(`on${e}`, t) : s[`on${e}`] = t;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function qt(s, e, t) {
|
|
24
24
|
s.removeEventListener ? s.removeEventListener(e, t) : s.detachEvent ? s.detachEvent(`on${e}`, t) : s[`on${e}`] = null;
|
|
25
25
|
}
|
|
26
|
-
const
|
|
26
|
+
const un = Array.isArray, fn = (s) => Nt(s) === "[object Map]", cn = (s) => Nt(s) === "[object Set]", hn = (s) => s instanceof Date, x = (s) => typeof s == "function", yn = (s) => typeof s == "string", dn = (s) => typeof s == "symbol", Xr = (s) => s !== null && typeof s == "object", pn = (s) => Xr(s) && x(s.then) && x(s.catch), Yr = (s) => s == null, Zr = Object.prototype.toString, Nt = (s) => Zr.call(s), es = (s) => Nt(s) === "[object Object]", ts = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
|
|
27
27
|
function br(s) {
|
|
28
|
-
return s.__esModule ||
|
|
28
|
+
return s.__esModule || ts && s[Symbol.toStringTag] === "Module";
|
|
29
29
|
}
|
|
30
|
-
const
|
|
30
|
+
const rs = typeof Promise < "u" && Promise.toString().indexOf("[native code]") !== -1;
|
|
31
31
|
function q(...s) {
|
|
32
32
|
let e = s[0] !== void 0 && s[0] !== null ? s[0] : {}, t = 1, r = s.length, n = !1;
|
|
33
33
|
for (typeof e == "boolean" && (n = e, e = s[t] ?? {}, t++), typeof e != "object" && (e = {}); t < r; t++)
|
|
@@ -45,7 +45,7 @@ function q(...s) {
|
|
|
45
45
|
}
|
|
46
46
|
return e;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function It(s, e, t = !1) {
|
|
49
49
|
if (!t)
|
|
50
50
|
q(!0, s, e);
|
|
51
51
|
else {
|
|
@@ -56,9 +56,9 @@ function Nt(s, e, t = !1) {
|
|
|
56
56
|
let n = s[r], i = e[r];
|
|
57
57
|
if (n !== i)
|
|
58
58
|
if (typeof i == "object") {
|
|
59
|
-
if (!Array.isArray(i) && !
|
|
59
|
+
if (!Array.isArray(i) && !es(i))
|
|
60
60
|
continue;
|
|
61
|
-
n =
|
|
61
|
+
n = It(n, i, t), s[r] = n;
|
|
62
62
|
} else {
|
|
63
63
|
if (typeof i == "function")
|
|
64
64
|
continue;
|
|
@@ -81,21 +81,21 @@ class le {
|
|
|
81
81
|
return e >= Number.MAX_VALUE && (le.seed = 0), e;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
const
|
|
84
|
+
const ht = rs ? Promise.resolve() : null;
|
|
85
85
|
function He(s, ...e) {
|
|
86
|
-
|
|
86
|
+
ht !== null ? e && e.length > 0 ? ht.then(() => {
|
|
87
87
|
s(e);
|
|
88
|
-
}) :
|
|
88
|
+
}) : ht.then(s) : e && e.length > 0 ? setTimeout(() => {
|
|
89
89
|
s(e);
|
|
90
90
|
}) : setTimeout(s);
|
|
91
91
|
}
|
|
92
92
|
function xr(s) {
|
|
93
93
|
return s == null ? !1 : typeof s == "boolean" ? s : typeof s == "string" ? s.toLocaleLowerCase() === "true" : !!s;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function mn(s) {
|
|
96
96
|
return typeof s == "number" ? s : Number(s);
|
|
97
97
|
}
|
|
98
|
-
const
|
|
98
|
+
const ss = {
|
|
99
99
|
"[object Boolean]": "boolean",
|
|
100
100
|
"[object Number]": "number",
|
|
101
101
|
"[object String]": "string",
|
|
@@ -107,7 +107,7 @@ const es = {
|
|
|
107
107
|
};
|
|
108
108
|
function Wt(s) {
|
|
109
109
|
let t = Object.prototype.toString.call(s);
|
|
110
|
-
return s == null ? String(s) :
|
|
110
|
+
return s == null ? String(s) : ss[t] || "object";
|
|
111
111
|
}
|
|
112
112
|
function zt(s, e) {
|
|
113
113
|
if (s == e)
|
|
@@ -146,12 +146,12 @@ const Rr = (s) => {
|
|
|
146
146
|
r && !Array.isArray(r) && typeof r == "object" && (r = Rr(r)), typeof t == "symbol" ? e[String(t)] = r : e[t] = r;
|
|
147
147
|
}
|
|
148
148
|
return e;
|
|
149
|
-
},
|
|
149
|
+
}, ns = /^Symbol\((.*)\)$/, Sr = (s) => {
|
|
150
150
|
const e = {};
|
|
151
151
|
for (let t of Reflect.ownKeys(s)) {
|
|
152
152
|
let r = s[t];
|
|
153
153
|
r && !Array.isArray(r) && typeof r == "object" && (r = Sr(r));
|
|
154
|
-
const n =
|
|
154
|
+
const n = ns.exec(t);
|
|
155
155
|
if (n && n[1]) {
|
|
156
156
|
const i = Symbol.for(n[1]);
|
|
157
157
|
e[i] = r;
|
|
@@ -185,7 +185,7 @@ class Pr {
|
|
|
185
185
|
this[Jt] = e;
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
class
|
|
188
|
+
class is {
|
|
189
189
|
/**
|
|
190
190
|
* 拦截get操作
|
|
191
191
|
* @param target
|
|
@@ -200,7 +200,7 @@ class rs {
|
|
|
200
200
|
if (r)
|
|
201
201
|
return De(r);
|
|
202
202
|
if (e[Q])
|
|
203
|
-
return r =
|
|
203
|
+
return r = Dt(t), r[Q] = e[Q], e[R].set(t, r), De(r);
|
|
204
204
|
}
|
|
205
205
|
/**
|
|
206
206
|
* 拦截set操作
|
|
@@ -222,15 +222,15 @@ class rs {
|
|
|
222
222
|
return t === "value" || t == "grow" ? (console.error(`can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
const
|
|
226
|
-
function
|
|
225
|
+
const Ht = "__proxy__";
|
|
226
|
+
function Dt(s) {
|
|
227
227
|
const e = new Pr(s);
|
|
228
|
-
return Reflect.set(e,
|
|
228
|
+
return Reflect.set(e, Ht, new Proxy(e, new is())), e;
|
|
229
229
|
}
|
|
230
230
|
function De(s) {
|
|
231
|
-
return Reflect.get(s,
|
|
231
|
+
return Reflect.get(s, Ht);
|
|
232
232
|
}
|
|
233
|
-
class
|
|
233
|
+
class os {
|
|
234
234
|
/**
|
|
235
235
|
* 名称
|
|
236
236
|
*/
|
|
@@ -257,7 +257,7 @@ class ss {
|
|
|
257
257
|
* @param options
|
|
258
258
|
*/
|
|
259
259
|
constructor(e = {}) {
|
|
260
|
-
if (e.persistPolicy && e.persistPolicy !== "momery" &&
|
|
260
|
+
if (e.persistPolicy && e.persistPolicy !== "momery" && Yr(e.name))
|
|
261
261
|
throw new Error("name can not be empty, where persistPolicy is not momery.");
|
|
262
262
|
this.name = e.name ?? "", this.persistPolicy = e.persistPolicy ?? "momery", this.storage = e.storage;
|
|
263
263
|
}
|
|
@@ -278,7 +278,7 @@ class ss {
|
|
|
278
278
|
let e = null;
|
|
279
279
|
if (this.persistPolicy === "custom")
|
|
280
280
|
e = this.storage;
|
|
281
|
-
else if (
|
|
281
|
+
else if (Ce) {
|
|
282
282
|
const t = $();
|
|
283
283
|
e = this.persistPolicy === "session" ? t.sessionStorage : t.localStorage;
|
|
284
284
|
}
|
|
@@ -374,7 +374,7 @@ class Cr extends Pr {
|
|
|
374
374
|
* 默认构造函数
|
|
375
375
|
*/
|
|
376
376
|
constructor(e = {}) {
|
|
377
|
-
super("__root__"), this._persistHandler = new
|
|
377
|
+
super("__root__"), this._persistHandler = new os(e), this._persistHandler.init(this);
|
|
378
378
|
}
|
|
379
379
|
/**
|
|
380
380
|
* 加入数据
|
|
@@ -388,7 +388,7 @@ class Cr extends Pr {
|
|
|
388
388
|
let r = this;
|
|
389
389
|
for (let n = 0; n < t - 1; n++) {
|
|
390
390
|
let i = e[n], o;
|
|
391
|
-
r[R].has(i) ? o = r[R].get(i) : (o =
|
|
391
|
+
r[R].has(i) ? o = r[R].get(i) : (o = Dt(i), r[R].set(i, o)), r = o;
|
|
392
392
|
}
|
|
393
393
|
return r[pe].value = e[t - 1], this._persistHandler.put(e), !0;
|
|
394
394
|
}
|
|
@@ -458,11 +458,11 @@ class Cr extends Pr {
|
|
|
458
458
|
this[R].clear(), this._persistHandler.clear();
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
const
|
|
461
|
+
const ls = ["put", "get", "contains", "remove", "clear", "_persistHandler"];
|
|
462
462
|
function Gt(s) {
|
|
463
|
-
return
|
|
463
|
+
return ls.includes(s);
|
|
464
464
|
}
|
|
465
|
-
class
|
|
465
|
+
class as {
|
|
466
466
|
/**
|
|
467
467
|
* 拦截get操作
|
|
468
468
|
* @param target
|
|
@@ -481,7 +481,7 @@ class is {
|
|
|
481
481
|
if (n)
|
|
482
482
|
return De(n);
|
|
483
483
|
if (e[Q])
|
|
484
|
-
return n =
|
|
484
|
+
return n = Dt(r), n[Q] = e[Q], e[R].set(r, n), De(n);
|
|
485
485
|
}
|
|
486
486
|
/**
|
|
487
487
|
* 拦截set操作
|
|
@@ -503,9 +503,9 @@ class is {
|
|
|
503
503
|
return t === "value" || t == "grow" ? (console.error(`can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
|
-
function
|
|
507
|
-
const e = new Cr(s), t = new
|
|
508
|
-
return Reflect.set(e,
|
|
506
|
+
function us(s) {
|
|
507
|
+
const e = new Cr(s), t = new as(), r = new Proxy(e, t);
|
|
508
|
+
return Reflect.set(e, Ht, r), e;
|
|
509
509
|
}
|
|
510
510
|
const Qt = new Proxy(Cr, {
|
|
511
511
|
/**
|
|
@@ -515,10 +515,10 @@ const Qt = new Proxy(Cr, {
|
|
|
515
515
|
* @returns
|
|
516
516
|
*/
|
|
517
517
|
construct(s, e) {
|
|
518
|
-
const t =
|
|
518
|
+
const t = us(e[0] ?? {});
|
|
519
519
|
return De(t);
|
|
520
520
|
}
|
|
521
|
-
}), te = "default", Ar = Symbol("sync"),
|
|
521
|
+
}), te = "default", Ar = Symbol("sync"), H = Symbol("resolveRoute");
|
|
522
522
|
function Xt(s) {
|
|
523
523
|
let e = !1;
|
|
524
524
|
return function(...t) {
|
|
@@ -526,7 +526,7 @@ function Xt(s) {
|
|
|
526
526
|
return e = !0, Reflect.apply(s, {}, t);
|
|
527
527
|
};
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function fs(s) {
|
|
530
530
|
let e = s.src;
|
|
531
531
|
return new Promise((t, r) => {
|
|
532
532
|
const n = Xt((a) => {
|
|
@@ -549,7 +549,7 @@ function ls(s) {
|
|
|
549
549
|
}
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
|
-
class
|
|
552
|
+
class cs {
|
|
553
553
|
/**
|
|
554
554
|
* 插槽名称
|
|
555
555
|
*/
|
|
@@ -706,7 +706,7 @@ class S {
|
|
|
706
706
|
*/
|
|
707
707
|
static clone(e, t) {
|
|
708
708
|
let r = new S();
|
|
709
|
-
return
|
|
709
|
+
return It(r, e, t), r;
|
|
710
710
|
}
|
|
711
711
|
/**
|
|
712
712
|
* 判断路由是否相同
|
|
@@ -747,7 +747,7 @@ class S {
|
|
|
747
747
|
return t;
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
|
-
class
|
|
750
|
+
class hs {
|
|
751
751
|
/**
|
|
752
752
|
* 唯一ID(用于区分model)
|
|
753
753
|
*/
|
|
@@ -793,7 +793,7 @@ class us {
|
|
|
793
793
|
* 解析组件
|
|
794
794
|
*/
|
|
795
795
|
resolve() {
|
|
796
|
-
return
|
|
796
|
+
return fs(this);
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
799
|
class Yt {
|
|
@@ -802,7 +802,7 @@ class Yt {
|
|
|
802
802
|
*/
|
|
803
803
|
models = [];
|
|
804
804
|
}
|
|
805
|
-
class
|
|
805
|
+
class yt {
|
|
806
806
|
/**
|
|
807
807
|
* 路径
|
|
808
808
|
*/
|
|
@@ -824,7 +824,8 @@ class ht {
|
|
|
824
824
|
*/
|
|
825
825
|
layers = [];
|
|
826
826
|
}
|
|
827
|
-
|
|
827
|
+
var T = /* @__PURE__ */ ((s) => (s[s.Push = 0] = "Push", s[s.Replace = 1] = "Replace", s[s.Put = 2] = "Put", s[s.Append = 3] = "Append", s[s.Open = 4] = "Open", s))(T || {});
|
|
828
|
+
const D = Symbol("chainKey"), I = Symbol("cursorKey"), dt = Symbol("$persistentModeKey"), F = Symbol("statusKey"), Z = Symbol("argsKey"), Be = Symbol("exArgsKey"), me = Symbol("successFnsKey"), Fe = Symbol("errorFnsKey"), ae = Symbol("sessionKey"), ee = Symbol("_go");
|
|
828
829
|
class st {
|
|
829
830
|
/**
|
|
830
831
|
* 事件链路
|
|
@@ -833,11 +834,11 @@ class st {
|
|
|
833
834
|
/**
|
|
834
835
|
* 游标
|
|
835
836
|
*/
|
|
836
|
-
[
|
|
837
|
+
[I] = 0;
|
|
837
838
|
/**
|
|
838
839
|
* 是否持久模式(该状态为true的情况,已经执行的任务会继续保存在队列中)
|
|
839
840
|
*/
|
|
840
|
-
[
|
|
841
|
+
[dt] = !1;
|
|
841
842
|
/**
|
|
842
843
|
* 状态
|
|
843
844
|
*/
|
|
@@ -875,7 +876,7 @@ class st {
|
|
|
875
876
|
* @param persistentMode
|
|
876
877
|
*/
|
|
877
878
|
constructor(e, t = !1) {
|
|
878
|
-
this[ae] = e, this[
|
|
879
|
+
this[ae] = e, this[dt] = t;
|
|
879
880
|
}
|
|
880
881
|
/**
|
|
881
882
|
* 触发链路的下一个任务
|
|
@@ -884,7 +885,7 @@ class st {
|
|
|
884
885
|
*/
|
|
885
886
|
[ee](e, ...t) {
|
|
886
887
|
let r = this[F];
|
|
887
|
-
if (this[F] = "Busy", this[
|
|
888
|
+
if (this[F] = "Busy", this[I] += e, this[I] < 0 && (this[I] = 0), this[Z] = t, r === "Exception" || r === "Reject") {
|
|
888
889
|
let a = [{
|
|
889
890
|
session: this[ae]
|
|
890
891
|
}, ...this[Be]];
|
|
@@ -897,8 +898,8 @@ class st {
|
|
|
897
898
|
} catch (l) {
|
|
898
899
|
console.error(l.message, l);
|
|
899
900
|
}
|
|
900
|
-
return this[F] = r, this[D] = [], this[
|
|
901
|
-
} else if (r === "Finished" || this[
|
|
901
|
+
return this[F] = r, this[D] = [], this[I] = 0, this;
|
|
902
|
+
} else if (r === "Finished" || this[I] >= this[D].length) {
|
|
902
903
|
let a = [{
|
|
903
904
|
session: this[ae]
|
|
904
905
|
}, ...this[Z]];
|
|
@@ -910,11 +911,11 @@ class st {
|
|
|
910
911
|
}
|
|
911
912
|
return this[F] = "Free", this;
|
|
912
913
|
}
|
|
913
|
-
if (this[
|
|
914
|
+
if (this[I] >= this[D].length)
|
|
914
915
|
return this[F] = "Free", this;
|
|
915
|
-
let n = this[D][this[
|
|
916
|
-
this[
|
|
917
|
-
let i = this[
|
|
916
|
+
let n = this[D][this[I]];
|
|
917
|
+
this[dt] || (this[D].splice(0, this[I] + 1), this[I] = -1);
|
|
918
|
+
let i = this[I] + 1;
|
|
918
919
|
try {
|
|
919
920
|
let o = !1, a = {
|
|
920
921
|
//go
|
|
@@ -978,7 +979,7 @@ class st {
|
|
|
978
979
|
* @param params
|
|
979
980
|
*/
|
|
980
981
|
reset(...e) {
|
|
981
|
-
this[F] = "Busy", this[Z] = e, this[D] = [], this[
|
|
982
|
+
this[F] = "Busy", this[Z] = e, this[D] = [], this[I] = 0;
|
|
982
983
|
let r = [{
|
|
983
984
|
session: this[ae]
|
|
984
985
|
}, ...this[Z]];
|
|
@@ -1020,11 +1021,11 @@ class st {
|
|
|
1020
1021
|
* @returns {boolean}
|
|
1021
1022
|
*/
|
|
1022
1023
|
isFinish() {
|
|
1023
|
-
return this[F] == "Reject" || this[F] == "Free" && this[
|
|
1024
|
+
return this[F] == "Reject" || this[F] == "Free" && this[I] >= this[D].length;
|
|
1024
1025
|
}
|
|
1025
1026
|
}
|
|
1026
1027
|
const ve = Symbol("registerKey");
|
|
1027
|
-
class
|
|
1028
|
+
class ys {
|
|
1028
1029
|
/**
|
|
1029
1030
|
* 事件策略
|
|
1030
1031
|
*/
|
|
@@ -1062,7 +1063,7 @@ class Zt {
|
|
|
1062
1063
|
on(e, t, r = !1) {
|
|
1063
1064
|
let n = this[ve].get(e);
|
|
1064
1065
|
n || (n = new Array(), this[ve].set(e, n));
|
|
1065
|
-
let i = r === !0 ? 1 : 0, o = new
|
|
1066
|
+
let i = r === !0 ? 1 : 0, o = new ys(t, i);
|
|
1066
1067
|
return n.push(o), this;
|
|
1067
1068
|
}
|
|
1068
1069
|
/**
|
|
@@ -1163,7 +1164,7 @@ class Zt {
|
|
|
1163
1164
|
}
|
|
1164
1165
|
}
|
|
1165
1166
|
const _e = Symbol("registerKey");
|
|
1166
|
-
class
|
|
1167
|
+
class ds {
|
|
1167
1168
|
/**
|
|
1168
1169
|
* 数据列表
|
|
1169
1170
|
*/
|
|
@@ -1212,7 +1213,7 @@ function nt(s, e = !1) {
|
|
|
1212
1213
|
if (Reflect.has(t, de))
|
|
1213
1214
|
return t[de];
|
|
1214
1215
|
if (e) {
|
|
1215
|
-
const r = new
|
|
1216
|
+
const r = new ds();
|
|
1216
1217
|
return t[de] = r, r;
|
|
1217
1218
|
}
|
|
1218
1219
|
return null;
|
|
@@ -1239,10 +1240,10 @@ function Fr(s, e) {
|
|
|
1239
1240
|
}
|
|
1240
1241
|
return null;
|
|
1241
1242
|
}
|
|
1242
|
-
function
|
|
1243
|
+
function vn(s, e, t) {
|
|
1243
1244
|
Er(s, !0)?.set(e, t);
|
|
1244
1245
|
}
|
|
1245
|
-
function
|
|
1246
|
+
function gn(s, e) {
|
|
1246
1247
|
Er(s, !0)?.delete(e);
|
|
1247
1248
|
}
|
|
1248
1249
|
function er(s) {
|
|
@@ -1254,7 +1255,7 @@ function er(s) {
|
|
|
1254
1255
|
return null;
|
|
1255
1256
|
}
|
|
1256
1257
|
const it = Symbol("hooksKey");
|
|
1257
|
-
function
|
|
1258
|
+
function ps(s) {
|
|
1258
1259
|
let e = s.get(it);
|
|
1259
1260
|
e || (e = [], s.set(it, e));
|
|
1260
1261
|
}
|
|
@@ -1271,8 +1272,8 @@ function tr(s, e) {
|
|
|
1271
1272
|
}
|
|
1272
1273
|
}
|
|
1273
1274
|
}
|
|
1274
|
-
var
|
|
1275
|
-
class
|
|
1275
|
+
var jt = /* @__PURE__ */ ((s) => (s.DEACTIVATED = "da", s.ACTIVATED = "a", s))(jt || {});
|
|
1276
|
+
class ms {
|
|
1276
1277
|
/**
|
|
1277
1278
|
* 类型
|
|
1278
1279
|
*/
|
|
@@ -1295,11 +1296,11 @@ class ys {
|
|
|
1295
1296
|
this.target = r, this.hook = t, this.type = e;
|
|
1296
1297
|
}
|
|
1297
1298
|
}
|
|
1298
|
-
function
|
|
1299
|
-
let n = new
|
|
1299
|
+
function vs(s, e, t, r) {
|
|
1300
|
+
let n = new ms(e, t, r);
|
|
1300
1301
|
return s.push(n), !0;
|
|
1301
1302
|
}
|
|
1302
|
-
function
|
|
1303
|
+
function gs(s, e, t, r) {
|
|
1303
1304
|
let n = -1;
|
|
1304
1305
|
for (let i = 0; i < s.length; i++) {
|
|
1305
1306
|
let o = s[i];
|
|
@@ -1316,7 +1317,7 @@ function _r(s) {
|
|
|
1316
1317
|
if (t)
|
|
1317
1318
|
r = t;
|
|
1318
1319
|
else {
|
|
1319
|
-
const i =
|
|
1320
|
+
const i = Mt();
|
|
1320
1321
|
if (i == null || i.proxy == null) {
|
|
1321
1322
|
console.error("can not get current instance or proxy");
|
|
1322
1323
|
return;
|
|
@@ -1329,26 +1330,26 @@ function _r(s) {
|
|
|
1329
1330
|
return;
|
|
1330
1331
|
}
|
|
1331
1332
|
ot(() => {
|
|
1332
|
-
|
|
1333
|
-
}),
|
|
1333
|
+
gs(n, s, e, r);
|
|
1334
|
+
}), vs(n, s, e, r);
|
|
1334
1335
|
};
|
|
1335
1336
|
}
|
|
1336
|
-
const
|
|
1337
|
+
const wn = _r(
|
|
1337
1338
|
"a"
|
|
1338
1339
|
/* ACTIVATED */
|
|
1339
|
-
),
|
|
1340
|
+
), bn = _r(
|
|
1340
1341
|
"da"
|
|
1341
1342
|
/* DEACTIVATED */
|
|
1342
1343
|
), Kr = Symbol("routeKey");
|
|
1343
1344
|
function rr(s, e) {
|
|
1344
1345
|
s.set(Kr, e);
|
|
1345
1346
|
}
|
|
1346
|
-
function
|
|
1347
|
+
function Vt(s) {
|
|
1347
1348
|
let e = Fr(s, Kr);
|
|
1348
1349
|
return typeof e == "function" ? e() : e ?? null;
|
|
1349
1350
|
}
|
|
1350
|
-
const lt = Symbol("rk"),
|
|
1351
|
-
function
|
|
1351
|
+
const lt = Symbol("rk"), pt = Symbol("vd"), sr = Symbol("rv"), mt = Symbol("rvi"), nr = Symbol("pv"), vt = Symbol("pvi");
|
|
1352
|
+
function ws(s) {
|
|
1352
1353
|
for (var e = [], t = 0; t < s.length; ) {
|
|
1353
1354
|
var r = s[t];
|
|
1354
1355
|
if (r === "*" || r === "+" || r === "?") {
|
|
@@ -1418,15 +1419,15 @@ function ms(s) {
|
|
|
1418
1419
|
}
|
|
1419
1420
|
function Tr(s, e) {
|
|
1420
1421
|
e === void 0 && (e = {});
|
|
1421
|
-
for (var t =
|
|
1422
|
+
for (var t = ws(s), r = e.prefixes, n = r === void 0 ? "./" : r, i = "[^".concat(Re(e.delimiter || "/#?"), "]+?"), o = [], a = 0, l = 0, u = "", f = function(E) {
|
|
1422
1423
|
if (l < t.length && t[l].type === E)
|
|
1423
1424
|
return t[l++].value;
|
|
1424
1425
|
}, c = function(E) {
|
|
1425
1426
|
var P = f(E);
|
|
1426
1427
|
if (P !== void 0)
|
|
1427
1428
|
return P;
|
|
1428
|
-
var C = t[l], U = C.type,
|
|
1429
|
-
throw new TypeError("Unexpected ".concat(U, " at ").concat(
|
|
1429
|
+
var C = t[l], U = C.type, M = C.index;
|
|
1430
|
+
throw new TypeError("Unexpected ".concat(U, " at ").concat(M, ", expected ").concat(E));
|
|
1430
1431
|
}, h = function() {
|
|
1431
1432
|
for (var E = "", P; P = f("CHAR") || f("ESCAPED_CHAR"); )
|
|
1432
1433
|
E += P;
|
|
@@ -1466,12 +1467,12 @@ function Tr(s, e) {
|
|
|
1466
1467
|
}
|
|
1467
1468
|
return o;
|
|
1468
1469
|
}
|
|
1469
|
-
function
|
|
1470
|
-
return
|
|
1470
|
+
function bs(s, e) {
|
|
1471
|
+
return xs(Tr(s, e), e);
|
|
1471
1472
|
}
|
|
1472
|
-
function
|
|
1473
|
+
function xs(s, e) {
|
|
1473
1474
|
e === void 0 && (e = {});
|
|
1474
|
-
var t =
|
|
1475
|
+
var t = Bt(e), r = e.encode, n = r === void 0 ? function(l) {
|
|
1475
1476
|
return l;
|
|
1476
1477
|
} : r, i = e.validate, o = i === void 0 ? !0 : i, a = s.map(function(l) {
|
|
1477
1478
|
if (typeof l == "object")
|
|
@@ -1516,11 +1517,11 @@ function gs(s, e) {
|
|
|
1516
1517
|
return u;
|
|
1517
1518
|
};
|
|
1518
1519
|
}
|
|
1519
|
-
function
|
|
1520
|
+
function Rs(s, e) {
|
|
1520
1521
|
var t = [], r = $r(s, t, e);
|
|
1521
|
-
return
|
|
1522
|
+
return Ss(r, t, e);
|
|
1522
1523
|
}
|
|
1523
|
-
function
|
|
1524
|
+
function Ss(s, e, t) {
|
|
1524
1525
|
t === void 0 && (t = {});
|
|
1525
1526
|
var r = t.decode, n = r === void 0 ? function(i) {
|
|
1526
1527
|
return i;
|
|
@@ -1544,10 +1545,10 @@ function bs(s, e, t) {
|
|
|
1544
1545
|
function Re(s) {
|
|
1545
1546
|
return s.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
|
|
1546
1547
|
}
|
|
1547
|
-
function
|
|
1548
|
+
function Bt(s) {
|
|
1548
1549
|
return s && s.sensitive ? "" : "i";
|
|
1549
1550
|
}
|
|
1550
|
-
function
|
|
1551
|
+
function Ps(s, e) {
|
|
1551
1552
|
if (!e)
|
|
1552
1553
|
return s;
|
|
1553
1554
|
for (var t = /\((?:\?<(.*?)>)?(?!\?)/g, r = 0, n = t.exec(s.source); n; )
|
|
@@ -1561,19 +1562,19 @@ function xs(s, e) {
|
|
|
1561
1562
|
}), n = t.exec(s.source);
|
|
1562
1563
|
return s;
|
|
1563
1564
|
}
|
|
1564
|
-
function
|
|
1565
|
+
function Cs(s, e, t) {
|
|
1565
1566
|
var r = s.map(function(n) {
|
|
1566
1567
|
return $r(n, e, t).source;
|
|
1567
1568
|
});
|
|
1568
|
-
return new RegExp("(?:".concat(r.join("|"), ")"),
|
|
1569
|
+
return new RegExp("(?:".concat(r.join("|"), ")"), Bt(t));
|
|
1569
1570
|
}
|
|
1570
|
-
function
|
|
1571
|
-
return
|
|
1571
|
+
function As(s, e, t) {
|
|
1572
|
+
return Es(Tr(s, t), e, t);
|
|
1572
1573
|
}
|
|
1573
|
-
function
|
|
1574
|
+
function Es(s, e, t) {
|
|
1574
1575
|
t === void 0 && (t = {});
|
|
1575
|
-
for (var r = t.strict, n = r === void 0 ? !1 : r, i = t.start, o = i === void 0 ? !0 : i, a = t.end, l = a === void 0 ? !0 : a, u = t.encode, f = u === void 0 ? function(
|
|
1576
|
-
return
|
|
1576
|
+
for (var r = t.strict, n = r === void 0 ? !1 : r, i = t.start, o = i === void 0 ? !0 : i, a = t.end, l = a === void 0 ? !0 : a, u = t.encode, f = u === void 0 ? function(M) {
|
|
1577
|
+
return M;
|
|
1577
1578
|
} : u, c = t.delimiter, h = c === void 0 ? "/#?" : c, y = t.endsWith, d = y === void 0 ? "" : y, m = "[".concat(Re(d), "]|$"), p = "[".concat(Re(h), "]"), v = o ? "^" : "", g = 0, _ = s; g < _.length; g++) {
|
|
1578
1579
|
var b = _[g];
|
|
1579
1580
|
if (typeof b == "string")
|
|
@@ -1599,12 +1600,12 @@ function Ps(s, e, t) {
|
|
|
1599
1600
|
var C = s[s.length - 1], U = typeof C == "string" ? p.indexOf(C[C.length - 1]) > -1 : C === void 0;
|
|
1600
1601
|
n || (v += "(?:".concat(p, "(?=").concat(m, "))?")), U || (v += "(?=".concat(p, "|").concat(m, ")"));
|
|
1601
1602
|
}
|
|
1602
|
-
return new RegExp(v,
|
|
1603
|
+
return new RegExp(v, Bt(t));
|
|
1603
1604
|
}
|
|
1604
1605
|
function $r(s, e, t) {
|
|
1605
|
-
return s instanceof RegExp ?
|
|
1606
|
+
return s instanceof RegExp ? Ps(s, e) : Array.isArray(s) ? Cs(s, e, t) : As(s, e, t);
|
|
1606
1607
|
}
|
|
1607
|
-
var
|
|
1608
|
+
var Ze = /* @__PURE__ */ ((s) => (s[s.Part = 0] = "Part", s[s.All = 1] = "All", s))(Ze || {});
|
|
1608
1609
|
const J = Symbol("rootKey"), z = Symbol("rootNodeKey"), ye = Symbol("parentNodeKey"), et = Symbol("nameKey");
|
|
1609
1610
|
class ne {
|
|
1610
1611
|
/**
|
|
@@ -1647,7 +1648,7 @@ class Ke {
|
|
|
1647
1648
|
* getter for models
|
|
1648
1649
|
*/
|
|
1649
1650
|
get slots() {
|
|
1650
|
-
return this._slots == null && (this._slots =
|
|
1651
|
+
return this._slots == null && (this._slots = Gr([])), this._slots;
|
|
1651
1652
|
}
|
|
1652
1653
|
/**
|
|
1653
1654
|
* 是否为空视图
|
|
@@ -1723,19 +1724,19 @@ class V {
|
|
|
1723
1724
|
return !1;
|
|
1724
1725
|
}
|
|
1725
1726
|
}
|
|
1726
|
-
class
|
|
1727
|
+
class gt {
|
|
1727
1728
|
/**
|
|
1728
1729
|
* 节点(view集合)
|
|
1729
1730
|
*/
|
|
1730
1731
|
views = [];
|
|
1731
1732
|
}
|
|
1732
|
-
class
|
|
1733
|
+
class Fs {
|
|
1733
1734
|
/**
|
|
1734
1735
|
* 层
|
|
1735
1736
|
*/
|
|
1736
1737
|
layers = [];
|
|
1737
1738
|
}
|
|
1738
|
-
class
|
|
1739
|
+
class _s {
|
|
1739
1740
|
/**
|
|
1740
1741
|
* time
|
|
1741
1742
|
*/
|
|
@@ -1745,7 +1746,7 @@ class As {
|
|
|
1745
1746
|
*/
|
|
1746
1747
|
route;
|
|
1747
1748
|
}
|
|
1748
|
-
class
|
|
1749
|
+
class Ks {
|
|
1749
1750
|
/**
|
|
1750
1751
|
* 禁止重复提交时间间隔
|
|
1751
1752
|
*/
|
|
@@ -1753,7 +1754,7 @@ class Es {
|
|
|
1753
1754
|
/**
|
|
1754
1755
|
* 提交路由记录
|
|
1755
1756
|
*/
|
|
1756
|
-
submitRecorder = new
|
|
1757
|
+
submitRecorder = new _s();
|
|
1757
1758
|
/**
|
|
1758
1759
|
* 判断是否为同一个路由(只判断name、path和root是否一致)
|
|
1759
1760
|
* @param x
|
|
@@ -1798,7 +1799,7 @@ class ir {
|
|
|
1798
1799
|
this.currentRoute = e, this.routes = t;
|
|
1799
1800
|
}
|
|
1800
1801
|
}
|
|
1801
|
-
const ue = Symbol("historyChangeConsumerKey"), or = Symbol("_navigateFirstRoute"), ke = Symbol("_getRouteMark"),
|
|
1802
|
+
const ue = Symbol("historyChangeConsumerKey"), or = Symbol("_navigateFirstRoute"), ke = Symbol("_getRouteMark"), wt = Symbol("_getUrlSearch"), bt = Symbol("_generateLocation"), Te = Symbol("_setRouteMarkRecorder"), $e = Symbol("beforeRestoreFiltersKey"), lr = Symbol("_beforeRestore"), ar = "Symbol(_fox_restore_point)";
|
|
1802
1803
|
function qe(s, ...e) {
|
|
1803
1804
|
return typeof s == "function" ? Reflect.apply(s, null, [...e]) : s;
|
|
1804
1805
|
}
|
|
@@ -1901,7 +1902,7 @@ class qr {
|
|
|
1901
1902
|
} catch {
|
|
1902
1903
|
}
|
|
1903
1904
|
}
|
|
1904
|
-
}),
|
|
1905
|
+
}), $t(t, "popstate", this.historyChange), this.firstNavigate && e && this[or](), Promise.resolve();
|
|
1905
1906
|
}
|
|
1906
1907
|
/**
|
|
1907
1908
|
* 销毁
|
|
@@ -1909,7 +1910,7 @@ class qr {
|
|
|
1909
1910
|
destroy() {
|
|
1910
1911
|
if (this.historyChange) {
|
|
1911
1912
|
const e = $();
|
|
1912
|
-
|
|
1913
|
+
qt(e, "popstate", this.historyChange);
|
|
1913
1914
|
}
|
|
1914
1915
|
}
|
|
1915
1916
|
/**
|
|
@@ -1957,7 +1958,7 @@ class qr {
|
|
|
1957
1958
|
if (o.mark === e && Array.isArray(o.routes) && o.routes.length > 0) {
|
|
1958
1959
|
const a = o.routes.filter((l, u) => (l.params = l.params ? Sr(l.params) : {}, this[lr](l, u, e, o.routes)));
|
|
1959
1960
|
if (a.length > 0) {
|
|
1960
|
-
const l = this[
|
|
1961
|
+
const l = this[wt](), u = a.length - 1;
|
|
1961
1962
|
a[u].query = l || a[u].query, this[Se](a);
|
|
1962
1963
|
return;
|
|
1963
1964
|
}
|
|
@@ -1968,7 +1969,7 @@ class qr {
|
|
|
1968
1969
|
let n;
|
|
1969
1970
|
r != -1 ? n = e.substring(r + 1) : n = e;
|
|
1970
1971
|
const i = new S();
|
|
1971
|
-
i.path = n, i.query = this[
|
|
1972
|
+
i.path = n, i.query = this[wt](), this[Se]([i]);
|
|
1972
1973
|
}
|
|
1973
1974
|
/**
|
|
1974
1975
|
* 设置当前route mark的记录
|
|
@@ -2022,7 +2023,7 @@ class qr {
|
|
|
2022
2023
|
/**
|
|
2023
2024
|
* 获取当前search
|
|
2024
2025
|
*/
|
|
2025
|
-
[
|
|
2026
|
+
[wt]() {
|
|
2026
2027
|
let t = $().location.search;
|
|
2027
2028
|
return t.length > 0 && t.indexOf("?") === 0 && (t = t.substring(1)), t;
|
|
2028
2029
|
}
|
|
@@ -2099,7 +2100,7 @@ class qr {
|
|
|
2099
2100
|
* @param record
|
|
2100
2101
|
*/
|
|
2101
2102
|
push(e) {
|
|
2102
|
-
const t = this[
|
|
2103
|
+
const t = this[bt](e.currentRoute);
|
|
2103
2104
|
e.currentRoute.traceless !== !0 && !qe(this.traceless, e.currentRoute) && $().history.pushState(e.routes, "", t);
|
|
2104
2105
|
const r = e.currentRoute.fullPath;
|
|
2105
2106
|
this[Te](r, e.routes);
|
|
@@ -2109,7 +2110,7 @@ class qr {
|
|
|
2109
2110
|
* @param record
|
|
2110
2111
|
*/
|
|
2111
2112
|
replace(e) {
|
|
2112
|
-
const t = this[
|
|
2113
|
+
const t = this[bt](e.currentRoute);
|
|
2113
2114
|
e.currentRoute.traceless !== !0 && !qe(this.traceless, e.currentRoute) && $().history.replaceState(e.routes, "", t);
|
|
2114
2115
|
const r = e.currentRoute.fullPath;
|
|
2115
2116
|
this[Te](r, e.routes);
|
|
@@ -2118,7 +2119,7 @@ class qr {
|
|
|
2118
2119
|
* 生成Location
|
|
2119
2120
|
* @param route
|
|
2120
2121
|
*/
|
|
2121
|
-
[
|
|
2122
|
+
[bt](e) {
|
|
2122
2123
|
const t = $();
|
|
2123
2124
|
let r = "";
|
|
2124
2125
|
if (e.query) {
|
|
@@ -2139,13 +2140,13 @@ class qr {
|
|
|
2139
2140
|
return r ? this.mode == "path" ? i.indexOf("/") === 0 ? o = `${this.base}${i}${r}` : o = `${this.base}/${i}${r}` : o = `${n.pathname}${r}#${i}` : this.mode == "path" ? i.indexOf("/") === 0 ? o = `${this.base}${i}` : o = `${this.base}/${i}` : o = `${n.pathname}#${i}`, `${n.origin}${o}`;
|
|
2140
2141
|
}
|
|
2141
2142
|
}
|
|
2142
|
-
function
|
|
2143
|
+
function xn(s = !0, e = null, t = "", r = !0, n = !1, i) {
|
|
2143
2144
|
return e !== null && (e = $().location.pathname), e && e.endsWith("/") && (e = e.substring(0, e.length - 1)), new qr("path", e ?? "", t, s, r, n, i);
|
|
2144
2145
|
}
|
|
2145
|
-
function
|
|
2146
|
+
function Ts(s = !0, e = "", t = !0, r = !1, n) {
|
|
2146
2147
|
return new qr("hash", "", e, s, t, r, n);
|
|
2147
2148
|
}
|
|
2148
|
-
class
|
|
2149
|
+
class $s {
|
|
2149
2150
|
/**
|
|
2150
2151
|
* 历史最大记录
|
|
2151
2152
|
*/
|
|
@@ -2288,14 +2289,14 @@ class _s {
|
|
|
2288
2289
|
setRestorePoint(e) {
|
|
2289
2290
|
}
|
|
2290
2291
|
}
|
|
2291
|
-
function
|
|
2292
|
-
return new
|
|
2292
|
+
function qs(s = "", e = 50) {
|
|
2293
|
+
return new $s(s, e);
|
|
2293
2294
|
}
|
|
2294
|
-
const Ue = Symbol("_constructRouteModel"), We = Symbol("_findRouteModel"),
|
|
2295
|
-
function
|
|
2295
|
+
const Ue = Symbol("_constructRouteModel"), We = Symbol("_findRouteModel"), xt = Symbol("_findRootView"), fr = Symbol("_getFirstView"), fe = Symbol("_removeView"), cr = Symbol("_buildPage"), hr = Symbol("_resolveComponent"), yr = Symbol("_update"), ie = Symbol("_merge"), Rt = Symbol("_handleHistoryChange"), ze = Symbol("_handleRouteUpdated"), Je = Symbol("routeUpdatedCallback"), w = Symbol("currentRoutes"), ge = Symbol("current"), dr = Symbol("_addRouteRecorder"), je = Symbol("_removeRouteRecorder"), Ge = Symbol("_cloneRouteRecorder"), j = Symbol("_handleError"), Qe = Symbol("errorCallback"), B = Symbol("registerKey"), Xe = Symbol("notFoundKey"), St = Symbol("notFoundPathKey"), k = Symbol("forestKey"), A = Symbol("historyKey"), Le = Symbol("beforeFiltersKey"), Oe = Symbol("afterFiltersKey"), Me = Symbol("destroyFiltersKey"), Pt = Symbol("propsFilterKey"), we = Symbol("mainDispatcherKey"), Ct = Symbol("initKey"), ce = Symbol("readyKey"), At = Symbol("readyHandlersKey"), Ye = Symbol("_markReady"), pr = Symbol("_createNextFn"), Et = Symbol("_start"), Ft = Symbol("_before"), _t = Symbol("_after"), mr = Symbol("_destroy"), Kt = Symbol("_load"), Ne = Symbol("_unload"), Ie = Symbol("routerGuardKey");
|
|
2296
|
+
function js(s) {
|
|
2296
2297
|
return s.layers.length == 0 || s.layers[0].views.length == 0;
|
|
2297
2298
|
}
|
|
2298
|
-
function
|
|
2299
|
+
function Ls(s) {
|
|
2299
2300
|
let e = [];
|
|
2300
2301
|
return s.layers.forEach((t) => {
|
|
2301
2302
|
t.models == null || t.models == null || t.models.forEach((r) => {
|
|
@@ -2308,7 +2309,7 @@ function $s(s) {
|
|
|
2308
2309
|
});
|
|
2309
2310
|
}), e;
|
|
2310
2311
|
}
|
|
2311
|
-
class
|
|
2312
|
+
class Os {
|
|
2312
2313
|
/**
|
|
2313
2314
|
* 注册表
|
|
2314
2315
|
*/
|
|
@@ -2320,7 +2321,7 @@ class qs {
|
|
|
2320
2321
|
/**
|
|
2321
2322
|
* not found route path
|
|
2322
2323
|
*/
|
|
2323
|
-
[
|
|
2324
|
+
[St] = "*";
|
|
2324
2325
|
/**
|
|
2325
2326
|
* ready
|
|
2326
2327
|
*/
|
|
@@ -2328,11 +2329,11 @@ class qs {
|
|
|
2328
2329
|
/**
|
|
2329
2330
|
* ready handlers
|
|
2330
2331
|
*/
|
|
2331
|
-
[
|
|
2332
|
+
[At] = [];
|
|
2332
2333
|
/**
|
|
2333
2334
|
* 页面根节点
|
|
2334
2335
|
*/
|
|
2335
|
-
[k] = new
|
|
2336
|
+
[k] = new Fs();
|
|
2336
2337
|
/**
|
|
2337
2338
|
* 历史记录控制器
|
|
2338
2339
|
*/
|
|
@@ -2352,11 +2353,11 @@ class qs {
|
|
|
2352
2353
|
/**
|
|
2353
2354
|
* before过滤器队列
|
|
2354
2355
|
*/
|
|
2355
|
-
[
|
|
2356
|
+
[Le] = new Array();
|
|
2356
2357
|
/**
|
|
2357
2358
|
* after过滤器队列
|
|
2358
2359
|
*/
|
|
2359
|
-
[
|
|
2360
|
+
[Oe] = new Array();
|
|
2360
2361
|
/**
|
|
2361
2362
|
* destroy过滤器队列
|
|
2362
2363
|
*/
|
|
@@ -2364,7 +2365,7 @@ class qs {
|
|
|
2364
2365
|
/**
|
|
2365
2366
|
* 属性传递过滤器
|
|
2366
2367
|
*/
|
|
2367
|
-
[
|
|
2368
|
+
[Pt] = null;
|
|
2368
2369
|
/**
|
|
2369
2370
|
* 主任务分发器
|
|
2370
2371
|
*/
|
|
@@ -2372,11 +2373,11 @@ class qs {
|
|
|
2372
2373
|
/**
|
|
2373
2374
|
* 路由守护者
|
|
2374
2375
|
*/
|
|
2375
|
-
[Ie] = new
|
|
2376
|
+
[Ie] = new Ks();
|
|
2376
2377
|
/**
|
|
2377
2378
|
* 是否初始化
|
|
2378
2379
|
*/
|
|
2379
|
-
[
|
|
2380
|
+
[Ct] = !1;
|
|
2380
2381
|
/**
|
|
2381
2382
|
* 当前最新路由
|
|
2382
2383
|
*/
|
|
@@ -2396,14 +2397,14 @@ class qs {
|
|
|
2396
2397
|
constructor(e) {
|
|
2397
2398
|
this.options = e ?? {}, this.options.notFoundPath && this.setNotFoundPath(this.options.notFoundPath);
|
|
2398
2399
|
let t = this.options.routes || [];
|
|
2399
|
-
this.addRoutes(t), this.options.notFound && this.setNotFoundRoute(this.options.notFound), e.history ? this[A] = e.history : this[A] =
|
|
2400
|
+
this.addRoutes(t), this.options.notFound && this.setNotFoundRoute(this.options.notFound), e.history ? this[A] = e.history : this[A] = Ce ? Ts() : qs(), this[A]?.listen(async (r) => {
|
|
2400
2401
|
let n = !0;
|
|
2401
2402
|
try {
|
|
2402
2403
|
if (typeof r == "string") {
|
|
2403
|
-
const i = this[
|
|
2404
|
-
i && await this[
|
|
2404
|
+
const i = this[H](r);
|
|
2405
|
+
i && await this[Rt]([i]);
|
|
2405
2406
|
} else
|
|
2406
|
-
await this[
|
|
2407
|
+
await this[Rt](r);
|
|
2407
2408
|
} catch (i) {
|
|
2408
2409
|
console.error(i.message, i), n = !1;
|
|
2409
2410
|
}
|
|
@@ -2432,21 +2433,21 @@ class qs {
|
|
|
2432
2433
|
* 初始化
|
|
2433
2434
|
*/
|
|
2434
2435
|
init() {
|
|
2435
|
-
this[
|
|
2436
|
+
this[Ct] !== !0 && (this[A]?.init(!this[ce]), this[Ct] = !0);
|
|
2436
2437
|
}
|
|
2437
2438
|
/**
|
|
2438
2439
|
* 第一次导航是否完成
|
|
2439
2440
|
*/
|
|
2440
2441
|
isReady() {
|
|
2441
2442
|
return this[ce] ? Promise.resolve() : new Promise((e, t) => {
|
|
2442
|
-
this[
|
|
2443
|
+
this[At].push([e, t]);
|
|
2443
2444
|
});
|
|
2444
2445
|
}
|
|
2445
2446
|
/**
|
|
2446
2447
|
* 设置第一导航完成
|
|
2447
2448
|
*/
|
|
2448
2449
|
[Ye](e) {
|
|
2449
|
-
this[ce] = !0, this[
|
|
2450
|
+
this[ce] = !0, this[At].forEach(([t, r]) => {
|
|
2450
2451
|
try {
|
|
2451
2452
|
e ? t() : r();
|
|
2452
2453
|
} catch (n) {
|
|
@@ -2458,11 +2459,11 @@ class qs {
|
|
|
2458
2459
|
* 处理历史记录
|
|
2459
2460
|
* @param record
|
|
2460
2461
|
*/
|
|
2461
|
-
[
|
|
2462
|
+
[Rt](e) {
|
|
2462
2463
|
try {
|
|
2463
2464
|
if (!e) {
|
|
2464
2465
|
let o = [...this[w]].reverse();
|
|
2465
|
-
return this[Ne](o),
|
|
2466
|
+
return this[Ne](o), Ce && $().location.reload(), Promise.resolve();
|
|
2466
2467
|
}
|
|
2467
2468
|
let t = null, r = [], n = [], i = 0;
|
|
2468
2469
|
for (; i < e.length && i < this[w].length && S.isSame(e[i], this[w][i]); i++)
|
|
@@ -2582,13 +2583,13 @@ class qs {
|
|
|
2582
2583
|
* 设置属性传递过滤器
|
|
2583
2584
|
*/
|
|
2584
2585
|
set propsFilter(e) {
|
|
2585
|
-
this[
|
|
2586
|
+
this[Pt] = e;
|
|
2586
2587
|
}
|
|
2587
2588
|
/**
|
|
2588
2589
|
* 获取属性传递过滤器
|
|
2589
2590
|
*/
|
|
2590
2591
|
get propsFilter() {
|
|
2591
|
-
return this[
|
|
2592
|
+
return this[Pt];
|
|
2592
2593
|
}
|
|
2593
2594
|
/**
|
|
2594
2595
|
* 设置还原点
|
|
@@ -2617,22 +2618,22 @@ class qs {
|
|
|
2617
2618
|
* @param filter
|
|
2618
2619
|
*/
|
|
2619
2620
|
beforeEach(e) {
|
|
2620
|
-
this[
|
|
2621
|
+
this[Le].push(e);
|
|
2621
2622
|
}
|
|
2622
2623
|
/**
|
|
2623
2624
|
* 移除before filter
|
|
2624
2625
|
* @param filter
|
|
2625
2626
|
*/
|
|
2626
2627
|
removeBeforeEach(e) {
|
|
2627
|
-
const t = this[
|
|
2628
|
-
return t !== -1 ? (this[
|
|
2628
|
+
const t = this[Le].indexOf(e);
|
|
2629
|
+
return t !== -1 ? (this[Le].splice(t, 1), !0) : !1;
|
|
2629
2630
|
}
|
|
2630
2631
|
/**
|
|
2631
2632
|
* 添加after filter
|
|
2632
2633
|
* @param filter
|
|
2633
2634
|
*/
|
|
2634
2635
|
afterEach(e) {
|
|
2635
|
-
this[
|
|
2636
|
+
this[Oe].push(e);
|
|
2636
2637
|
}
|
|
2637
2638
|
/**
|
|
2638
2639
|
* 移除after filter
|
|
@@ -2640,8 +2641,8 @@ class qs {
|
|
|
2640
2641
|
* @returns
|
|
2641
2642
|
*/
|
|
2642
2643
|
removeAfterEach(e) {
|
|
2643
|
-
const t = this[
|
|
2644
|
-
return t !== -1 ? (this[
|
|
2644
|
+
const t = this[Oe].indexOf(e);
|
|
2645
|
+
return t !== -1 ? (this[Oe].splice(t, 1), !0) : !1;
|
|
2645
2646
|
}
|
|
2646
2647
|
/**
|
|
2647
2648
|
* 添加destroy filter
|
|
@@ -2688,7 +2689,7 @@ class qs {
|
|
|
2688
2689
|
* @param index
|
|
2689
2690
|
*/
|
|
2690
2691
|
addRoute(e, t = -1) {
|
|
2691
|
-
if (e.path === this[
|
|
2692
|
+
if (e.path === this[St]) {
|
|
2692
2693
|
this.setNotFoundRoute(e);
|
|
2693
2694
|
return;
|
|
2694
2695
|
}
|
|
@@ -2705,7 +2706,7 @@ class qs {
|
|
|
2705
2706
|
* @param route
|
|
2706
2707
|
*/
|
|
2707
2708
|
removeRoute(e) {
|
|
2708
|
-
const t = this[
|
|
2709
|
+
const t = this[H](e);
|
|
2709
2710
|
if (t === null)
|
|
2710
2711
|
return console.warn("route格式错误", e), !1;
|
|
2711
2712
|
for (let r = 0; r < this[B].length; r++) {
|
|
@@ -2723,7 +2724,7 @@ class qs {
|
|
|
2723
2724
|
* @param route
|
|
2724
2725
|
*/
|
|
2725
2726
|
hasRoute(e) {
|
|
2726
|
-
const t = this[
|
|
2727
|
+
const t = this[H](e);
|
|
2727
2728
|
return t === null ? (console.warn("route格式错误", e), !1) : this[B].findIndex((n) => {
|
|
2728
2729
|
if (t?.path && n.path === t.path || t?.name && n.name === t.name)
|
|
2729
2730
|
return !0;
|
|
@@ -2734,7 +2735,7 @@ class qs {
|
|
|
2734
2735
|
* @param path
|
|
2735
2736
|
*/
|
|
2736
2737
|
setNotFoundPath(e) {
|
|
2737
|
-
this[
|
|
2738
|
+
this[St] = e;
|
|
2738
2739
|
}
|
|
2739
2740
|
/**
|
|
2740
2741
|
* 配置not found路由配置
|
|
@@ -2760,14 +2761,14 @@ class qs {
|
|
|
2760
2761
|
t.length > 0 && t.charAt(0) !== "/" && (t = `/${t}`);
|
|
2761
2762
|
let r = e.components ?? (e.component && { "": e.component });
|
|
2762
2763
|
if (r == null) {
|
|
2763
|
-
const a = new
|
|
2764
|
+
const a = new yt();
|
|
2764
2765
|
return a.path = t, a.redirect = e.redirect, [a];
|
|
2765
2766
|
}
|
|
2766
2767
|
let n = [];
|
|
2767
2768
|
for (let a in r) {
|
|
2768
2769
|
let l = r[a];
|
|
2769
2770
|
a.length === 0 && (a = te);
|
|
2770
|
-
let u = new
|
|
2771
|
+
let u = new hs(a, l, e.props, e.meta);
|
|
2771
2772
|
n.push(u);
|
|
2772
2773
|
}
|
|
2773
2774
|
let i = !1, o = [];
|
|
@@ -2775,7 +2776,7 @@ class qs {
|
|
|
2775
2776
|
for (let a of e.children) {
|
|
2776
2777
|
let l = this[Ue](a);
|
|
2777
2778
|
for (let u of l) {
|
|
2778
|
-
let f = new
|
|
2779
|
+
let f = new yt();
|
|
2779
2780
|
f.name = u.name, u.path && u.path.length > 0 ? t !== "/" ? f.path = `${t}${u.path}` : f.path = u.path : (i = !0, f.path = t);
|
|
2780
2781
|
let c = new Yt();
|
|
2781
2782
|
c.models = [...n], f.layers = [c, ...u.layers], o.push(f);
|
|
@@ -2784,7 +2785,7 @@ class qs {
|
|
|
2784
2785
|
if (!i) {
|
|
2785
2786
|
const a = new Yt();
|
|
2786
2787
|
a.models = n;
|
|
2787
|
-
const l = new
|
|
2788
|
+
const l = new yt();
|
|
2788
2789
|
l.name = e.name, l.path = t, l.layers = [a], o.splice(0, 0, l);
|
|
2789
2790
|
}
|
|
2790
2791
|
return o;
|
|
@@ -2800,7 +2801,7 @@ class qs {
|
|
|
2800
2801
|
const n = t.template ?? t.path, i = t.template ?? t.name;
|
|
2801
2802
|
if (n && r.path) {
|
|
2802
2803
|
let o = r.match;
|
|
2803
|
-
o || (o = r.match =
|
|
2804
|
+
o || (o = r.match = Rs(r.path));
|
|
2804
2805
|
const a = o(n);
|
|
2805
2806
|
if (!a)
|
|
2806
2807
|
continue;
|
|
@@ -2831,7 +2832,7 @@ class qs {
|
|
|
2831
2832
|
return e.find = r, t.template && e.find && (e.find = { ...e.find }, e.find.path = t.path), !0;
|
|
2832
2833
|
} else if (i === r.name) {
|
|
2833
2834
|
t.params = t.params ?? {};
|
|
2834
|
-
const o =
|
|
2835
|
+
const o = bs(r.path);
|
|
2835
2836
|
return t.path = o(t.params), e.find = r, t.template && e.find && (e.find = { ...e.find }, e.find.name = t.name), !0;
|
|
2836
2837
|
}
|
|
2837
2838
|
}
|
|
@@ -2845,7 +2846,7 @@ class qs {
|
|
|
2845
2846
|
* @param args
|
|
2846
2847
|
* @returns
|
|
2847
2848
|
*/
|
|
2848
|
-
[
|
|
2849
|
+
[H](e) {
|
|
2849
2850
|
let t = null;
|
|
2850
2851
|
if (Array.isArray(e))
|
|
2851
2852
|
if (t = new S(), typeof e[0] == "object")
|
|
@@ -2869,7 +2870,7 @@ class qs {
|
|
|
2869
2870
|
* @param args
|
|
2870
2871
|
*/
|
|
2871
2872
|
push(...e) {
|
|
2872
|
-
let t = this[
|
|
2873
|
+
let t = this[H](e);
|
|
2873
2874
|
return t ? (t.opsType = t.opsType || T.Push, this.to(t)) : (this[j]("resolve route fail", t), this);
|
|
2874
2875
|
}
|
|
2875
2876
|
/**
|
|
@@ -2877,7 +2878,7 @@ class qs {
|
|
|
2877
2878
|
* @param args
|
|
2878
2879
|
*/
|
|
2879
2880
|
put(...e) {
|
|
2880
|
-
let t = this[
|
|
2881
|
+
let t = this[H](e);
|
|
2881
2882
|
return t ? (t.opsType = T.Put, t.traceless = !0, this.to(t)) : (this[j]("resolve route fail", t), this);
|
|
2882
2883
|
}
|
|
2883
2884
|
/**
|
|
@@ -2885,7 +2886,7 @@ class qs {
|
|
|
2885
2886
|
* @param args
|
|
2886
2887
|
*/
|
|
2887
2888
|
replace(...e) {
|
|
2888
|
-
let t = this[
|
|
2889
|
+
let t = this[H](e);
|
|
2889
2890
|
return t ? (t.opsType = T.Replace, this.to(t)) : (this[j]("resolve route fail", t), this);
|
|
2890
2891
|
}
|
|
2891
2892
|
/**
|
|
@@ -2893,7 +2894,7 @@ class qs {
|
|
|
2893
2894
|
* @param args
|
|
2894
2895
|
*/
|
|
2895
2896
|
append(...e) {
|
|
2896
|
-
let t = this[
|
|
2897
|
+
let t = this[H](e);
|
|
2897
2898
|
return t ? (t.opsType = T.Append, this.to(t)) : (this[j]("resolve route fail", t), this);
|
|
2898
2899
|
}
|
|
2899
2900
|
/**
|
|
@@ -2969,7 +2970,7 @@ class qs {
|
|
|
2969
2970
|
* @param args
|
|
2970
2971
|
*/
|
|
2971
2972
|
open(...e) {
|
|
2972
|
-
let t = this[
|
|
2973
|
+
let t = this[H](e);
|
|
2973
2974
|
return t ? (t.opsType = T.Open, this.to(t)) : (this[j]("resolve route fail", t), this);
|
|
2974
2975
|
}
|
|
2975
2976
|
/**
|
|
@@ -2979,7 +2980,7 @@ class qs {
|
|
|
2979
2980
|
close(e) {
|
|
2980
2981
|
return this[we].post((t) => {
|
|
2981
2982
|
try {
|
|
2982
|
-
let r = this[
|
|
2983
|
+
let r = this[H](e);
|
|
2983
2984
|
if (!r) {
|
|
2984
2985
|
t.reject("resolve route fail");
|
|
2985
2986
|
return;
|
|
@@ -3016,14 +3017,14 @@ class qs {
|
|
|
3016
3017
|
* @param args
|
|
3017
3018
|
*/
|
|
3018
3019
|
to(...e) {
|
|
3019
|
-
let t = this[
|
|
3020
|
+
let t = this[H](e);
|
|
3020
3021
|
if (!t)
|
|
3021
3022
|
return this[j]("resolve route fail", t), this;
|
|
3022
3023
|
let r = this[Ie].acquire(t);
|
|
3023
3024
|
return r == null ? (this[j]("route forbid", t), this) : (this[we].post((n) => {
|
|
3024
3025
|
try {
|
|
3025
|
-
let i = this[
|
|
3026
|
-
this[
|
|
3026
|
+
let i = this[Et](t);
|
|
3027
|
+
this[Ft](i), this[Kt](i), this[_t](i), i.wait(
|
|
3027
3028
|
(o, a) => {
|
|
3028
3029
|
const l = o.session.to;
|
|
3029
3030
|
if (o.session.updateResult && o.session.updateResult.status === "success")
|
|
@@ -3066,7 +3067,7 @@ class qs {
|
|
|
3066
3067
|
if (typeof t == "boolean")
|
|
3067
3068
|
e.session.redirect = !1, t ? e.resolve() : e.reject(r ?? null);
|
|
3068
3069
|
else if (t) {
|
|
3069
|
-
const n = this[
|
|
3070
|
+
const n = this[H](t);
|
|
3070
3071
|
if (n) {
|
|
3071
3072
|
const i = e.session.to;
|
|
3072
3073
|
n.success = i.success, n.error = i.error, e.session.to = n, e.session.redirect = !0, e.session.routeModel = null, e.resolve();
|
|
@@ -3081,21 +3082,21 @@ class qs {
|
|
|
3081
3082
|
* @param route
|
|
3082
3083
|
* @returns {EventChain}
|
|
3083
3084
|
*/
|
|
3084
|
-
[
|
|
3085
|
+
[Et](e) {
|
|
3085
3086
|
let t = this[w].length > 0 ? this[w][0] : void 0, r = new rt(e, t), n = {
|
|
3086
3087
|
//路由
|
|
3087
3088
|
route: e,
|
|
3088
3089
|
//查找结果
|
|
3089
3090
|
find: null
|
|
3090
3091
|
};
|
|
3091
|
-
return this[We](n), n.find && (r.routeModel = n.find, e.matched =
|
|
3092
|
+
return this[We](n), n.find && (r.routeModel = n.find, e.matched = Ls(n.find), Array.isArray(e.matched) && e.matched.length > 0 && (e.meta = n.find.layers[0].models[0].meta)), new st(r);
|
|
3092
3093
|
}
|
|
3093
3094
|
/**
|
|
3094
3095
|
* 执行before事件
|
|
3095
3096
|
* @param chain
|
|
3096
3097
|
*/
|
|
3097
|
-
[
|
|
3098
|
-
for (let t of this[
|
|
3098
|
+
[Ft](e) {
|
|
3099
|
+
for (let t of this[Le])
|
|
3099
3100
|
e.post((r) => {
|
|
3100
3101
|
const n = this[pr](r);
|
|
3101
3102
|
Reflect.apply(t, {}, [r.session.to, r.session.from, n, r.session]);
|
|
@@ -3105,9 +3106,9 @@ class qs {
|
|
|
3105
3106
|
* 执行after事件
|
|
3106
3107
|
* @param chain
|
|
3107
3108
|
*/
|
|
3108
|
-
[
|
|
3109
|
+
[_t](e) {
|
|
3109
3110
|
e.post((t) => {
|
|
3110
|
-
for (let r of this[
|
|
3111
|
+
for (let r of this[Oe])
|
|
3111
3112
|
try {
|
|
3112
3113
|
Reflect.apply(r, {}, [t.session.to, t.session.from, t.session]);
|
|
3113
3114
|
} catch (n) {
|
|
@@ -3134,7 +3135,7 @@ class qs {
|
|
|
3134
3135
|
* 加载路由
|
|
3135
3136
|
* @param chain
|
|
3136
3137
|
*/
|
|
3137
|
-
[
|
|
3138
|
+
[Kt](e) {
|
|
3138
3139
|
e.post((t) => {
|
|
3139
3140
|
let r = t.session.to, n = t.session.routeModel;
|
|
3140
3141
|
if (n == null) {
|
|
@@ -3177,7 +3178,7 @@ class qs {
|
|
|
3177
3178
|
return !0;
|
|
3178
3179
|
let t = this[k], r = [];
|
|
3179
3180
|
for (let n of e) {
|
|
3180
|
-
let i = this[
|
|
3181
|
+
let i = this[xt](t, n);
|
|
3181
3182
|
i != null && r.push({
|
|
3182
3183
|
...i,
|
|
3183
3184
|
route: n
|
|
@@ -3196,7 +3197,7 @@ class qs {
|
|
|
3196
3197
|
* @param page
|
|
3197
3198
|
* @param route
|
|
3198
3199
|
*/
|
|
3199
|
-
[
|
|
3200
|
+
[xt](e, t) {
|
|
3200
3201
|
const r = t.root ?? te;
|
|
3201
3202
|
let n;
|
|
3202
3203
|
for (let i = 0; i < e.layers.length; i++) {
|
|
@@ -3278,8 +3279,8 @@ class qs {
|
|
|
3278
3279
|
for (let a = 0; a < e.length; a++) {
|
|
3279
3280
|
const l = e[a];
|
|
3280
3281
|
this[we].post((u) => {
|
|
3281
|
-
const f = this[
|
|
3282
|
-
this[
|
|
3282
|
+
const f = this[Et](l);
|
|
3283
|
+
this[Ft](f), this[Kt](f), this[_t](f), f.wait(
|
|
3283
3284
|
(c, h) => {
|
|
3284
3285
|
i = c.session.to, o = c.session.redirect, u.resolve();
|
|
3285
3286
|
},
|
|
@@ -3342,12 +3343,12 @@ class qs {
|
|
|
3342
3343
|
message: "illegal route structure(multi root node)"
|
|
3343
3344
|
};
|
|
3344
3345
|
const i = e.layers[0].models[0];
|
|
3345
|
-
let o = this[k], a =
|
|
3346
|
-
!a && n == Ze.Part && (u = this[
|
|
3346
|
+
let o = this[k], a = js(o), l = t.root ?? te, u;
|
|
3347
|
+
!a && n == Ze.Part && (u = this[xt](o, t));
|
|
3347
3348
|
let f, c = 0;
|
|
3348
3349
|
if (u == null || u == null)
|
|
3349
3350
|
if (a || n === Ze.All) {
|
|
3350
|
-
if (o.layers.length == 0 && (o.layers[0] = new
|
|
3351
|
+
if (o.layers.length == 0 && (o.layers[0] = new gt()), o.layers[0].views.length == 0) {
|
|
3351
3352
|
let h = t.root ?? te;
|
|
3352
3353
|
f = new Ke(h, !0, null), o.layers[0].views = [f];
|
|
3353
3354
|
} else
|
|
@@ -3454,32 +3455,32 @@ class qs {
|
|
|
3454
3455
|
}
|
|
3455
3456
|
let E = [];
|
|
3456
3457
|
for (let P of K) {
|
|
3457
|
-
let C = o.layers[g].views[P], U = e.layers[_].models,
|
|
3458
|
-
for (let
|
|
3459
|
-
if (C.name === U[
|
|
3460
|
-
|
|
3458
|
+
let C = o.layers[g].views[P], U = e.layers[_].models, M;
|
|
3459
|
+
for (let N = 0; N < U.length; N++)
|
|
3460
|
+
if (C.name === U[N].name) {
|
|
3461
|
+
M = U[N];
|
|
3461
3462
|
break;
|
|
3462
3463
|
}
|
|
3463
|
-
if (!
|
|
3464
|
+
if (!M)
|
|
3464
3465
|
this[fe](o, { x: P, y: g }, null, !1);
|
|
3465
3466
|
else {
|
|
3466
|
-
let
|
|
3467
|
-
if (
|
|
3467
|
+
let N = C.slots.value;
|
|
3468
|
+
if (N.length == 0) {
|
|
3468
3469
|
let X = 0;
|
|
3469
|
-
C.slots.value = [new ne(null,
|
|
3470
|
+
C.slots.value = [new ne(null, M, X)];
|
|
3470
3471
|
let W = g + 1, re = _ + 1;
|
|
3471
3472
|
this[ie](o, W, e, re, b);
|
|
3472
3473
|
} else {
|
|
3473
|
-
let X =
|
|
3474
|
-
if (X.model !==
|
|
3475
|
-
this[fe](o, { x: P, y: g }, null, !0), C.slots.value = [new ne(null,
|
|
3474
|
+
let X = N[0];
|
|
3475
|
+
if (X.model !== M) {
|
|
3476
|
+
this[fe](o, { x: P, y: g }, null, !0), C.slots.value = [new ne(null, M, 0)];
|
|
3476
3477
|
let W = g + 1, re = _ + 1;
|
|
3477
3478
|
this[ie](o, W, e, re, b);
|
|
3478
3479
|
} else {
|
|
3479
3480
|
C[J] && X.route !== null && this[je](X.route);
|
|
3480
3481
|
let W = [];
|
|
3481
|
-
for (let re = 1; re <
|
|
3482
|
-
W.push(
|
|
3482
|
+
for (let re = 1; re < N.length; re++)
|
|
3483
|
+
W.push(N[re].index);
|
|
3483
3484
|
W.length > 0 && this[fe](o, { x: P, y: g }, W, !0), E.push(new V(C, X.index, g));
|
|
3484
3485
|
}
|
|
3485
3486
|
}
|
|
@@ -3494,7 +3495,7 @@ class qs {
|
|
|
3494
3495
|
}
|
|
3495
3496
|
if (f && f[z]) {
|
|
3496
3497
|
let h = f[z];
|
|
3497
|
-
h && (t.slot = new
|
|
3498
|
+
h && (t.slot = new cs(l, c, h?.view.name, h?.index ?? 0));
|
|
3498
3499
|
}
|
|
3499
3500
|
return r.to = void 0, r.routeModel = void 0, t.session = r, this[dr](t), {
|
|
3500
3501
|
status: "success",
|
|
@@ -3519,7 +3520,7 @@ class qs {
|
|
|
3519
3520
|
}
|
|
3520
3521
|
}
|
|
3521
3522
|
for (; o < r.layers.length; o++) {
|
|
3522
|
-
let l = new
|
|
3523
|
+
let l = new gt();
|
|
3523
3524
|
l.views = [];
|
|
3524
3525
|
for (let u of r.layers[o].models) {
|
|
3525
3526
|
let f = new Ke(u.name, !1, i), c = new ne(null, u);
|
|
@@ -3569,67 +3570,71 @@ class qs {
|
|
|
3569
3570
|
});
|
|
3570
3571
|
let u = new Ke(e, !0, a);
|
|
3571
3572
|
if (u[ye] = l, t == this[k].layers.length) {
|
|
3572
|
-
let f = new
|
|
3573
|
+
let f = new gt();
|
|
3573
3574
|
f.views = [u], this[k].layers.push(f);
|
|
3574
3575
|
} else
|
|
3575
3576
|
this[k].layers[t].views.push(u);
|
|
3576
3577
|
return u;
|
|
3577
3578
|
}
|
|
3578
3579
|
}
|
|
3579
|
-
const
|
|
3580
|
+
const Ms = "fox-router-view", Ns = "fox-router-link";
|
|
3580
3581
|
function jr(s, e = !1) {
|
|
3581
3582
|
let t = null;
|
|
3582
3583
|
return e ? t = s.showFromClass ?? s.enterFromClass : t = s.enterFromClass, t || (t = s.transitionName, t ? e ? `${t}-show-from` : `${t}-enter-from` : null);
|
|
3583
3584
|
}
|
|
3584
|
-
function
|
|
3585
|
+
function Lr(s, e = !1) {
|
|
3585
3586
|
let t = null;
|
|
3586
3587
|
return e ? t = s.showActiveClass ?? s.enterActiveClass : t = s.enterActiveClass, t || (t = s.transitionName, t ? e ? `${t}-show-active` : `${t}-enter-active` : null);
|
|
3587
3588
|
}
|
|
3588
|
-
function
|
|
3589
|
+
function Is(s, e = !1) {
|
|
3589
3590
|
let t = null;
|
|
3590
3591
|
return e ? t = s.showToClass ?? s.enterToClass : t = s.enterToClass, t || (t = s.transitionName, t ? e ? `${t}-show-to` : `${t}-enter-to` : null);
|
|
3591
3592
|
}
|
|
3592
|
-
function
|
|
3593
|
+
function Or(s, e = !1) {
|
|
3593
3594
|
let t = null;
|
|
3594
3595
|
return e ? t = s.hideFromClass ?? s.leaveFromClass : t = s.leaveFromClass, t || (t = s.transitionName, t ? e ? `${t}-hide-from` : `${t}-leave-from` : null);
|
|
3595
3596
|
}
|
|
3596
|
-
function
|
|
3597
|
+
function Mr(s, e = !1) {
|
|
3597
3598
|
let t = null;
|
|
3598
3599
|
return e ? t = s.hideActiveClass ?? s.leaveActiveClass : t = s.leaveActiveClass, t || (t = s.transitionName, t ? e ? `${t}-hide-active` : `${t}-leave-active` : null);
|
|
3599
3600
|
}
|
|
3600
|
-
function
|
|
3601
|
+
function Hs(s, e = !1) {
|
|
3601
3602
|
let t = null;
|
|
3602
3603
|
return e ? t = s.hideToClass ?? s.leaveToClass : t = s.leaveToClass, t || (t = s.transitionName, t ? e ? `${t}-hide-to` : `${t}-leave-to` : null);
|
|
3603
3604
|
}
|
|
3604
|
-
function
|
|
3605
|
+
function Ds(s, e = !1) {
|
|
3605
3606
|
let t = null;
|
|
3606
3607
|
return e ? t = s.beforeShow ?? s.beforeEnter : t = s.beforeEnter, t;
|
|
3607
3608
|
}
|
|
3608
|
-
function
|
|
3609
|
+
function Vs(s, e = !1) {
|
|
3609
3610
|
let t = null;
|
|
3610
3611
|
return e ? t = s.show ?? s.enter : t = s.enter, t;
|
|
3611
3612
|
}
|
|
3612
|
-
function
|
|
3613
|
+
function Bs(s, e = !1) {
|
|
3613
3614
|
let t = null;
|
|
3614
3615
|
return e ? t = s.afterShow ?? s.afterEnter : t = s.afterEnter, t;
|
|
3615
3616
|
}
|
|
3616
|
-
function
|
|
3617
|
+
function ks(s, e = !1) {
|
|
3617
3618
|
let t = null;
|
|
3618
3619
|
return e ? t = s.showCancelled ?? s.enterCancelled : t = s.enterCancelled, t;
|
|
3619
3620
|
}
|
|
3620
|
-
function
|
|
3621
|
+
function Us(s, e = !1) {
|
|
3622
|
+
let t = null;
|
|
3623
|
+
return e ? t = s.beforeHide ?? s.beforeLeave : t = s.beforeLeave, t;
|
|
3624
|
+
}
|
|
3625
|
+
function Ws(s, e = !1) {
|
|
3621
3626
|
let t = null;
|
|
3622
3627
|
return e ? t = s.hide ?? s.leave : t = s.leave, t;
|
|
3623
3628
|
}
|
|
3624
|
-
function
|
|
3629
|
+
function zs(s, e = !1) {
|
|
3625
3630
|
let t = null;
|
|
3626
3631
|
return e ? t = s.afterHide ?? s.afterLeave : t = s.afterLeave, t;
|
|
3627
3632
|
}
|
|
3628
|
-
function
|
|
3633
|
+
function Js(s, e = !1) {
|
|
3629
3634
|
let t = null;
|
|
3630
3635
|
return e ? t = s.hideCancelled ?? s.leaveCancelled : t = s.leaveCancelled, t;
|
|
3631
3636
|
}
|
|
3632
|
-
function
|
|
3637
|
+
function kt(s) {
|
|
3633
3638
|
let e, t = s.duration;
|
|
3634
3639
|
return typeof t == "object" ? e = {
|
|
3635
3640
|
enter: t.enter ?? -1,
|
|
@@ -3643,20 +3648,20 @@ function Bt(s) {
|
|
|
3643
3648
|
hide: t
|
|
3644
3649
|
}), e;
|
|
3645
3650
|
}
|
|
3646
|
-
function
|
|
3651
|
+
function Ae(s, e) {
|
|
3647
3652
|
s.classList.contains(e) || s.classList.add(e);
|
|
3648
3653
|
}
|
|
3649
|
-
function
|
|
3654
|
+
function Pe(s, e) {
|
|
3650
3655
|
s.classList.remove(e);
|
|
3651
3656
|
}
|
|
3652
|
-
const
|
|
3653
|
-
function
|
|
3654
|
-
|
|
3657
|
+
const Gs = Ce && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout;
|
|
3658
|
+
function Ut(s) {
|
|
3659
|
+
Gs(s);
|
|
3655
3660
|
}
|
|
3656
|
-
function
|
|
3661
|
+
function O(s, e, t) {
|
|
3657
3662
|
x(e) && (s == null && (s = {}), Reflect.apply(e, s, t));
|
|
3658
3663
|
}
|
|
3659
|
-
function
|
|
3664
|
+
function Nr(s, e, t, r = -1, n, i, o, a) {
|
|
3660
3665
|
if (x(i)) {
|
|
3661
3666
|
if (n !== void 0 && n >= 0) {
|
|
3662
3667
|
setTimeout(() => {
|
|
@@ -3666,71 +3671,81 @@ function Lr(s, e, t, r = -1, n, i, o, a) {
|
|
|
3666
3671
|
}
|
|
3667
3672
|
const l = ["animationend", "transitionend"], u = (f) => {
|
|
3668
3673
|
l.forEach((c) => {
|
|
3669
|
-
|
|
3674
|
+
qt(e, c, u);
|
|
3670
3675
|
}), Reflect.apply(i, s, [e, t, r]), a && Reflect.apply(a, s, []);
|
|
3671
3676
|
};
|
|
3672
3677
|
l.forEach((f) => {
|
|
3673
|
-
|
|
3678
|
+
$t(e, f, u);
|
|
3674
3679
|
});
|
|
3675
3680
|
}
|
|
3676
3681
|
if (x(o)) {
|
|
3677
3682
|
const l = "animationcancel", u = (f) => {
|
|
3678
|
-
Reflect.apply(o, s, [e, t, r]),
|
|
3683
|
+
Reflect.apply(o, s, [e, t, r]), qt(e, l, u);
|
|
3679
3684
|
};
|
|
3680
|
-
|
|
3685
|
+
$t(e, l, u);
|
|
3681
3686
|
}
|
|
3682
3687
|
}
|
|
3683
|
-
function
|
|
3684
|
-
return !
|
|
3688
|
+
function at(s) {
|
|
3689
|
+
return !Ce || s === null ? !1 : s.opsType === T.Append || s.opsType === T.Open;
|
|
3685
3690
|
}
|
|
3686
|
-
function
|
|
3687
|
-
if (e ||
|
|
3691
|
+
function Ir(s, e, t, r = {}, n, i = -1) {
|
|
3692
|
+
if (e || at(n)) {
|
|
3688
3693
|
const o = jr(r, e);
|
|
3689
|
-
o &&
|
|
3690
|
-
const a =
|
|
3691
|
-
a &&
|
|
3692
|
-
const l =
|
|
3693
|
-
|
|
3694
|
+
o && Ae(t, o);
|
|
3695
|
+
const a = Lr(r, e);
|
|
3696
|
+
a && Ae(t, a);
|
|
3697
|
+
const l = Ds(r, e);
|
|
3698
|
+
O(s, l, [t, e, n, i]);
|
|
3694
3699
|
}
|
|
3695
3700
|
}
|
|
3696
|
-
function
|
|
3697
|
-
if (!
|
|
3701
|
+
function Hr(s, e, t, r = {}, n, i, o, a) {
|
|
3702
|
+
if (!at(i) && !e) {
|
|
3698
3703
|
x(a) && a(s, a, [t]);
|
|
3699
3704
|
return;
|
|
3700
3705
|
}
|
|
3701
|
-
const l = jr(r, e), u =
|
|
3706
|
+
const l = jr(r, e), u = Lr(r, e), f = Is(r, e), c = Vs(r, e), h = Bs(r, e), y = ks(r, e);
|
|
3702
3707
|
if (!l && !u && !f && !c) {
|
|
3703
3708
|
x(a) && a(s, a, [t]);
|
|
3704
3709
|
return;
|
|
3705
3710
|
}
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
u &&
|
|
3711
|
+
Ut(() => {
|
|
3712
|
+
Nr(s, t, i, o, n, () => {
|
|
3713
|
+
u && Pe(t, u), f && Pe(t, f), x(h) && O(s, h, [t, e, i, o]), x(a) && a(s, a, [t]);
|
|
3709
3714
|
}, () => {
|
|
3710
|
-
x(y) &&
|
|
3711
|
-
}), l &&
|
|
3715
|
+
x(y) && O(s, y, [t, e, i, o]);
|
|
3716
|
+
}), l && Pe(t, l), f && Ae(t, f), x(c) && O(s, c, [t, e, i, o]);
|
|
3712
3717
|
});
|
|
3713
3718
|
}
|
|
3714
|
-
function
|
|
3715
|
-
if (
|
|
3719
|
+
function Dr(s, e, t, r = {}, n, i = -1) {
|
|
3720
|
+
if (e || at(n)) {
|
|
3721
|
+
const o = Or(r, e);
|
|
3722
|
+
o && Ae(t, o);
|
|
3723
|
+
const a = Mr(r, e);
|
|
3724
|
+
a && Ae(t, a);
|
|
3725
|
+
const l = Us(r, e);
|
|
3726
|
+
O(s, l, [t, e, n, i]);
|
|
3727
|
+
}
|
|
3728
|
+
}
|
|
3729
|
+
function Vr(s, e, t, r = {}, n, i, o, a, l) {
|
|
3730
|
+
if (!at(o) && !e) {
|
|
3716
3731
|
!e && x(i) && i();
|
|
3717
3732
|
return;
|
|
3718
3733
|
}
|
|
3719
|
-
const u =
|
|
3734
|
+
const u = Or(r, e), f = Mr(r, e), c = Hs(r, e), h = Ws(r, e), y = zs(r, e), d = Js(r, e);
|
|
3720
3735
|
if (!u && !f && !c && !h) {
|
|
3721
3736
|
!e && x(i) && i();
|
|
3722
3737
|
return;
|
|
3723
3738
|
}
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
f &&
|
|
3739
|
+
x(h) && O(s, h, [t, e, o, a]), Ut(() => {
|
|
3740
|
+
Nr(s, t, o, a, n, () => {
|
|
3741
|
+
f && Pe(t, f), c && Pe(t, c), x(y) && O(s, y, [t, e, o, a]), x(l) && O(s, l, [t]), !e && x(i) && i();
|
|
3727
3742
|
}, () => {
|
|
3728
|
-
x(d) &&
|
|
3729
|
-
}), u &&
|
|
3743
|
+
x(d) && O(s, d, [t, e, o, a]), x(l) && O(s, l, [t]), !e && x(i) && i();
|
|
3744
|
+
}), u && Pe(t, u), c && Ae(t, c);
|
|
3730
3745
|
});
|
|
3731
3746
|
}
|
|
3732
|
-
function
|
|
3733
|
-
const n = e.mode ?? "default", i =
|
|
3747
|
+
function Lt(s, e = {}, t, r = -1) {
|
|
3748
|
+
const n = e.mode ?? "default", i = kt(e);
|
|
3734
3749
|
return {
|
|
3735
3750
|
//mode
|
|
3736
3751
|
mode: n,
|
|
@@ -3738,49 +3753,49 @@ function jt(s, e = {}, t, r = -1) {
|
|
|
3738
3753
|
persisted: !1,
|
|
3739
3754
|
//before enter
|
|
3740
3755
|
beforeEnter: (a) => {
|
|
3741
|
-
|
|
3756
|
+
Ir(s, !1, a, e, t, r);
|
|
3742
3757
|
},
|
|
3743
3758
|
//enter
|
|
3744
3759
|
enter: (a) => {
|
|
3745
|
-
|
|
3760
|
+
Hr(s, !1, a, e, i.enter, t, r);
|
|
3746
3761
|
},
|
|
3747
3762
|
//leave
|
|
3748
3763
|
leave: (a, l) => {
|
|
3749
|
-
|
|
3764
|
+
Dr(s, !1, a, e, t, r), Vr(s, !1, a, e, i.leave, l, t, r);
|
|
3750
3765
|
},
|
|
3751
3766
|
//clone
|
|
3752
|
-
clone: (a) =>
|
|
3767
|
+
clone: (a) => Lt(s, e, t, r)
|
|
3753
3768
|
};
|
|
3754
3769
|
}
|
|
3755
|
-
function
|
|
3770
|
+
function Br(s) {
|
|
3756
3771
|
return s.el;
|
|
3757
3772
|
}
|
|
3758
|
-
function
|
|
3773
|
+
function Qs(s, e, t = {}, r, n, i, o) {
|
|
3759
3774
|
if (i) {
|
|
3760
|
-
const a =
|
|
3775
|
+
const a = Br(e);
|
|
3761
3776
|
if (a == null)
|
|
3762
3777
|
return;
|
|
3763
|
-
const l =
|
|
3764
|
-
|
|
3765
|
-
x(o) &&
|
|
3778
|
+
const l = kt(t);
|
|
3779
|
+
Ir(s, !0, a, t, r, n), Hr(s, !0, a, t, l.show, r, n, (u) => {
|
|
3780
|
+
x(o) && O(s, o, [u]);
|
|
3766
3781
|
});
|
|
3767
3782
|
} else
|
|
3768
|
-
x(o) &&
|
|
3783
|
+
x(o) && O(s, o, []);
|
|
3769
3784
|
}
|
|
3770
|
-
function
|
|
3785
|
+
function Xs(s, e, t = {}, r, n, i, o) {
|
|
3771
3786
|
if (i) {
|
|
3772
|
-
const a =
|
|
3787
|
+
const a = Br(e);
|
|
3773
3788
|
if (a == null)
|
|
3774
3789
|
return;
|
|
3775
|
-
const l =
|
|
3776
|
-
|
|
3777
|
-
x(o) &&
|
|
3790
|
+
const l = kt(t);
|
|
3791
|
+
Dr(s, !0, a, t, r, n), Vr(s, !0, a, t, l.hide, null, r, n, (u) => {
|
|
3792
|
+
x(o) && O(s, o, [u]);
|
|
3778
3793
|
});
|
|
3779
3794
|
} else
|
|
3780
|
-
x(o) &&
|
|
3795
|
+
x(o) && O(s, o, []);
|
|
3781
3796
|
}
|
|
3782
|
-
function
|
|
3783
|
-
|
|
3797
|
+
function Ys(s, e = {}) {
|
|
3798
|
+
Ut(() => {
|
|
3784
3799
|
for (let t = 0; t < s.length; t++)
|
|
3785
3800
|
Reflect.apply(s[t], e, []);
|
|
3786
3801
|
});
|
|
@@ -3788,7 +3803,7 @@ function Qs(s, e = {}) {
|
|
|
3788
3803
|
function oe(s, e, t) {
|
|
3789
3804
|
return typeof s == "function" ? Reflect.apply(s, {}, [e, t]) : s;
|
|
3790
3805
|
}
|
|
3791
|
-
function
|
|
3806
|
+
function Tt(s, e) {
|
|
3792
3807
|
if (!s)
|
|
3793
3808
|
return null;
|
|
3794
3809
|
const t = s(e);
|
|
@@ -3797,7 +3812,7 @@ function Kt(s, e) {
|
|
|
3797
3812
|
function be(s, e) {
|
|
3798
3813
|
return typeof e == "function" ? e(s) : s;
|
|
3799
3814
|
}
|
|
3800
|
-
class
|
|
3815
|
+
class Zs {
|
|
3801
3816
|
/**
|
|
3802
3817
|
* vue node
|
|
3803
3818
|
*/
|
|
@@ -4026,32 +4041,32 @@ const Ot = wr({
|
|
|
4026
4041
|
},
|
|
4027
4042
|
//setup
|
|
4028
4043
|
setup(s, e) {
|
|
4029
|
-
const t =
|
|
4044
|
+
const t = Mt();
|
|
4030
4045
|
if (t === null || t.proxy === null) {
|
|
4031
4046
|
console.error("instance or instance.proxy not exist");
|
|
4032
4047
|
return;
|
|
4033
4048
|
}
|
|
4034
|
-
const r = s.multi === !0, n = G(lt, null), i = G(
|
|
4049
|
+
const r = s.multi === !0, n = G(lt, null), i = G(pt, 0), o = G(sr, null), a = G(mt, -1);
|
|
4035
4050
|
let l = null;
|
|
4036
4051
|
const u = s.modelSlot;
|
|
4037
4052
|
if (u) {
|
|
4038
|
-
if (se(
|
|
4053
|
+
if (se(pt, i + 1), se(mt, u.index), se(vt, u.index), !u.route) {
|
|
4039
4054
|
console.warn("child view render error, route not exist");
|
|
4040
4055
|
return;
|
|
4041
4056
|
}
|
|
4042
4057
|
const h = nt(t.proxy, !0);
|
|
4043
|
-
|
|
4058
|
+
ps(h), rr(h, () => u.route ?? null);
|
|
4044
4059
|
} else {
|
|
4045
4060
|
if (n == null) {
|
|
4046
4061
|
console.error("router is not been injected");
|
|
4047
4062
|
return;
|
|
4048
4063
|
}
|
|
4049
|
-
const c = s.name, h = G(nr, null), y = G(
|
|
4064
|
+
const c = s.name, h = G(nr, null), y = G(vt, 0);
|
|
4050
4065
|
if (l = n[Ar](c, i, o, a, h, y), l === null)
|
|
4051
4066
|
return;
|
|
4052
4067
|
se(nr, l);
|
|
4053
4068
|
const d = l[J] === !0;
|
|
4054
|
-
if (d && se(sr, l), !r && (se(
|
|
4069
|
+
if (d && se(sr, l), !r && (se(mt, -1), se(pt, i + 1), se(vt, -1), d)) {
|
|
4055
4070
|
const m = nt(t.proxy, !0);
|
|
4056
4071
|
rr(m, () => {
|
|
4057
4072
|
const p = l.slots.value;
|
|
@@ -4071,21 +4086,21 @@ const Ot = wr({
|
|
|
4071
4086
|
e.slots.default ? E = he(Ot, K, { default: e.slots.default }) : E = he(Ot, K);
|
|
4072
4087
|
const P = {}, C = oe(s.viewClass, g.route, v);
|
|
4073
4088
|
typeof C == "string" && C.length > 0 && (P[C] = !0);
|
|
4074
|
-
const U = oe(s.viewActiveClass, g.route, v),
|
|
4075
|
-
if (typeof U == "string" && U.length > 0 && (P[U] = g.active), typeof
|
|
4076
|
-
const Y =
|
|
4089
|
+
const U = oe(s.viewActiveClass, g.route, v), M = oe(s.viewInactiveClass, g.route, v), N = f.value.get(_);
|
|
4090
|
+
if (typeof U == "string" && U.length > 0 && (P[U] = g.active), typeof M == "string" && M.length > 0 && (P[M] = !g.active), N && g.active !== N.state) {
|
|
4091
|
+
const Y = N.node;
|
|
4077
4092
|
g.active ? d.unshift(() => {
|
|
4078
|
-
const
|
|
4093
|
+
const ft = () => {
|
|
4079
4094
|
let Ee = er(Y);
|
|
4080
|
-
Ee != null && tr(Ee,
|
|
4095
|
+
Ee != null && tr(Ee, jt.ACTIVATED);
|
|
4081
4096
|
};
|
|
4082
|
-
|
|
4097
|
+
Qs(t, Y, s, g.route, v, b, ft);
|
|
4083
4098
|
}) : d.push(() => {
|
|
4084
|
-
const
|
|
4099
|
+
const ft = () => {
|
|
4085
4100
|
const Ee = er(Y);
|
|
4086
|
-
Ee != null && tr(Ee,
|
|
4101
|
+
Ee != null && tr(Ee, jt.DEACTIVATED);
|
|
4087
4102
|
};
|
|
4088
|
-
|
|
4103
|
+
Xs(t, Y, s, g.route, v, b, ft);
|
|
4089
4104
|
});
|
|
4090
4105
|
}
|
|
4091
4106
|
const X = {
|
|
@@ -4100,14 +4115,14 @@ const Ot = wr({
|
|
|
4100
4115
|
const Y = be(g.route.viewTagAttrs, n?.propsFilter);
|
|
4101
4116
|
q(!0, X, Y);
|
|
4102
4117
|
}
|
|
4103
|
-
const re = oe(s.viewTag, g.route, v),
|
|
4104
|
-
if (c.set(_, new
|
|
4105
|
-
const Y =
|
|
4106
|
-
|
|
4118
|
+
const re = oe(s.viewTag, g.route, v), ut = he(re, X, { default: () => [E] });
|
|
4119
|
+
if (c.set(_, new Zs(ut, g.active)), f.value.delete(_), b) {
|
|
4120
|
+
const Y = Lt(t, s, g.route, v);
|
|
4121
|
+
ut.transition = Y;
|
|
4107
4122
|
}
|
|
4108
|
-
h.push(
|
|
4123
|
+
h.push(ut);
|
|
4109
4124
|
}
|
|
4110
|
-
f.value = c,
|
|
4125
|
+
f.value = c, Ys(d, t);
|
|
4111
4126
|
const m = oe(s.tag, null, -1), p = {};
|
|
4112
4127
|
return Object.assign(p, e.attrs), he(m, p, { default: () => h });
|
|
4113
4128
|
} else if (u != null) {
|
|
@@ -4122,11 +4137,11 @@ const Ot = wr({
|
|
|
4122
4137
|
}
|
|
4123
4138
|
}
|
|
4124
4139
|
const y = he(c.component, h);
|
|
4125
|
-
return
|
|
4140
|
+
return Tt(e.slots.default, { Component: y, route: u.route }) ?? y;
|
|
4126
4141
|
} else {
|
|
4127
4142
|
const c = l.slots.value;
|
|
4128
4143
|
if (c.length > 0) {
|
|
4129
|
-
const h = c[0], y = h.route ?? (t.proxy &&
|
|
4144
|
+
const h = c[0], y = h.route ?? (t.proxy && Vt(t.proxy)) ?? null, d = h.model, m = {};
|
|
4130
4145
|
if (d.props) {
|
|
4131
4146
|
if (typeof d.props == "object") {
|
|
4132
4147
|
const g = be(d.props, n?.propsFilter);
|
|
@@ -4138,17 +4153,17 @@ const Ot = wr({
|
|
|
4138
4153
|
}
|
|
4139
4154
|
const p = he(d.component, m);
|
|
4140
4155
|
if (oe(s.transition, y, -1) ?? !0) {
|
|
4141
|
-
const g =
|
|
4156
|
+
const g = Lt(t, s, y, -1);
|
|
4142
4157
|
p.transition = g;
|
|
4143
4158
|
}
|
|
4144
|
-
return
|
|
4159
|
+
return Tt(e.slots.default, { Component: p, route: y }) ?? p;
|
|
4145
4160
|
} else
|
|
4146
|
-
return
|
|
4161
|
+
return Tt(e.slots.fallback, {});
|
|
4147
4162
|
}
|
|
4148
4163
|
};
|
|
4149
4164
|
}
|
|
4150
4165
|
});
|
|
4151
|
-
function
|
|
4166
|
+
function en(s) {
|
|
4152
4167
|
if (!(s.metaKey || s.altKey || s.ctrlKey || s.shiftKey) && !s.defaultPrevented && !(s.button != null && s.button !== 0)) {
|
|
4153
4168
|
if (s.currentTarget && s.currentTarget.getAttribute) {
|
|
4154
4169
|
const e = s.currentTarget.getAttribute("target");
|
|
@@ -4158,16 +4173,16 @@ function Ys(s) {
|
|
|
4158
4173
|
return s.preventDefault && s.preventDefault(), !0;
|
|
4159
4174
|
}
|
|
4160
4175
|
}
|
|
4161
|
-
function
|
|
4176
|
+
function tn(s, e) {
|
|
4162
4177
|
return s == null || e == null ? !1 : !!(s === e || s.path && s.path === e.path || s.name && s.name === e.name);
|
|
4163
4178
|
}
|
|
4164
|
-
function
|
|
4179
|
+
function rn(s, e) {
|
|
4165
4180
|
return s == null || e == null ? !1 : !!(s.path && e.path && e.path.startsWith(s.path) || s.name && s.name == e.name);
|
|
4166
4181
|
}
|
|
4167
4182
|
function xe(s, e) {
|
|
4168
4183
|
return typeof s == "function" ? Reflect.apply(s, {}, [e]) : s;
|
|
4169
4184
|
}
|
|
4170
|
-
let
|
|
4185
|
+
let sn = wr({
|
|
4171
4186
|
//名称
|
|
4172
4187
|
name: "RouterLink",
|
|
4173
4188
|
//继承特性
|
|
@@ -4223,11 +4238,11 @@ let tn = wr({
|
|
|
4223
4238
|
return;
|
|
4224
4239
|
}
|
|
4225
4240
|
let i = null, o = null;
|
|
4226
|
-
t !== null && (i = t[
|
|
4241
|
+
t !== null && (i = t[H](r), s.root && (i.root = s.root), o = t.current);
|
|
4227
4242
|
let a = {}, l = xe(s.activeClass, i);
|
|
4228
|
-
if (typeof l == "string" && l.length > 0 && (a[l] =
|
|
4243
|
+
if (typeof l == "string" && l.length > 0 && (a[l] = rn(i, o)), xe(s.exact, i) === !0) {
|
|
4229
4244
|
let h = xe(s.exactActiveClass, i);
|
|
4230
|
-
typeof h == "string" && h.length > 0 && (a[h] =
|
|
4245
|
+
typeof h == "string" && h.length > 0 && (a[h] = tn(i, o));
|
|
4231
4246
|
}
|
|
4232
4247
|
let f = {
|
|
4233
4248
|
class: a
|
|
@@ -4244,7 +4259,7 @@ let tn = wr({
|
|
|
4244
4259
|
console.warn("route is not been resolved");
|
|
4245
4260
|
return;
|
|
4246
4261
|
}
|
|
4247
|
-
|
|
4262
|
+
en(y) && t.to(i);
|
|
4248
4263
|
};
|
|
4249
4264
|
f[c] = h;
|
|
4250
4265
|
}
|
|
@@ -4252,8 +4267,8 @@ let tn = wr({
|
|
|
4252
4267
|
};
|
|
4253
4268
|
}
|
|
4254
4269
|
});
|
|
4255
|
-
var
|
|
4256
|
-
class
|
|
4270
|
+
var L = /* @__PURE__ */ ((s) => (s[s.Loading = 0] = "Loading", s[s.Loaded = 1] = "Loaded", s[s.Defining = 2] = "Defining", s[s.Defined = 3] = "Defined", s))(L || {}), tt = /* @__PURE__ */ ((s) => (s[s.normal = 0] = "normal", s[s.factory = 1] = "factory", s))(tt || {});
|
|
4271
|
+
class nn {
|
|
4257
4272
|
/**
|
|
4258
4273
|
* 注册表
|
|
4259
4274
|
*/
|
|
@@ -4306,7 +4321,7 @@ class vr {
|
|
|
4306
4321
|
/**
|
|
4307
4322
|
* module manager
|
|
4308
4323
|
*/
|
|
4309
|
-
moduleManager = new
|
|
4324
|
+
moduleManager = new nn();
|
|
4310
4325
|
/**
|
|
4311
4326
|
* 参数配置
|
|
4312
4327
|
*/
|
|
@@ -4394,7 +4409,7 @@ class vr {
|
|
|
4394
4409
|
const r = {
|
|
4395
4410
|
id: e,
|
|
4396
4411
|
src: "",
|
|
4397
|
-
status:
|
|
4412
|
+
status: L.Defined
|
|
4398
4413
|
};
|
|
4399
4414
|
typeof t == "function" ? (r.exports = t, r.type = tt.factory) : r.exports = t, this.moduleManager.set(e, r);
|
|
4400
4415
|
}
|
|
@@ -4425,7 +4440,7 @@ class vr {
|
|
|
4425
4440
|
for (let f = 0; f < u.length; f++)
|
|
4426
4441
|
u[f] && t.push(this.resolvePath(u[f]));
|
|
4427
4442
|
}
|
|
4428
|
-
const o = new
|
|
4443
|
+
const o = new on(t.length, (l, u) => {
|
|
4429
4444
|
if (o.isOK())
|
|
4430
4445
|
try {
|
|
4431
4446
|
typeof i == "function" && Reflect.apply(i, {}, u);
|
|
@@ -4440,7 +4455,7 @@ class vr {
|
|
|
4440
4455
|
}
|
|
4441
4456
|
}), a = new st();
|
|
4442
4457
|
for (let l = 0; l < t.length; l++) {
|
|
4443
|
-
const u = new
|
|
4458
|
+
const u = new ln(l, t[l], n, o);
|
|
4444
4459
|
this.mount(a, u);
|
|
4445
4460
|
}
|
|
4446
4461
|
return this;
|
|
@@ -4514,7 +4529,7 @@ class vr {
|
|
|
4514
4529
|
mountCSS(e, t, r) {
|
|
4515
4530
|
e.post((n) => {
|
|
4516
4531
|
const i = t.src, o = this.moduleManager.get(i);
|
|
4517
|
-
if (o && (o.status ==
|
|
4532
|
+
if (o && (o.status == L.Defined || o.status == L.Loaded) && o.exports) {
|
|
4518
4533
|
o.type === tt.factory && typeof o.exports == "function" ? t.progress.work(!0, t.index, o.exports()) : t.progress.work(!0, t.index, o.exports), n.resolve();
|
|
4519
4534
|
return;
|
|
4520
4535
|
}
|
|
@@ -4551,7 +4566,7 @@ class vr {
|
|
|
4551
4566
|
}
|
|
4552
4567
|
};
|
|
4553
4568
|
setTimeout(() => {
|
|
4554
|
-
|
|
4569
|
+
kr(l, c);
|
|
4555
4570
|
}, 1);
|
|
4556
4571
|
}
|
|
4557
4572
|
let f = a.getElementById(i);
|
|
@@ -4569,7 +4584,7 @@ class vr {
|
|
|
4569
4584
|
e.post((n) => {
|
|
4570
4585
|
const i = t.src;
|
|
4571
4586
|
let o = this.moduleManager.get(i);
|
|
4572
|
-
if (o && (o.status ==
|
|
4587
|
+
if (o && (o.status == L.Defined || o.status == L.Loaded)) {
|
|
4573
4588
|
if (o.exports) {
|
|
4574
4589
|
o.type === tt.factory && typeof o.exports == "function" ? t.progress.work(!0, t.index, o.exports()) : t.progress.work(!0, t.index, o.exports), n.resolve();
|
|
4575
4590
|
return;
|
|
@@ -4584,13 +4599,13 @@ class vr {
|
|
|
4584
4599
|
// ID
|
|
4585
4600
|
src: i,
|
|
4586
4601
|
// resource path
|
|
4587
|
-
status:
|
|
4602
|
+
status: L.Loading
|
|
4588
4603
|
// 状态
|
|
4589
4604
|
}, this.moduleManager.set(i, o);
|
|
4590
4605
|
const l = Ve().createElement("script");
|
|
4591
4606
|
if ("onload" in l)
|
|
4592
4607
|
l.onload = () => {
|
|
4593
|
-
l.onload = null, l.onerror = null, o.status ===
|
|
4608
|
+
l.onload = null, l.onerror = null, o.status === L.Loading && (o.status = L.Loaded, t.progress.work(!0, t.index, i)), n.resolve();
|
|
4594
4609
|
}, l.onerror = () => {
|
|
4595
4610
|
try {
|
|
4596
4611
|
r.removeChild(l);
|
|
@@ -4602,7 +4617,7 @@ class vr {
|
|
|
4602
4617
|
else {
|
|
4603
4618
|
const c = l;
|
|
4604
4619
|
c.onreadystatechange = () => {
|
|
4605
|
-
/loaded|complete/.test(c.readyState) && (c.onreadystatechange = null, o.status ==
|
|
4620
|
+
/loaded|complete/.test(c.readyState) && (c.onreadystatechange = null, o.status == L.Loading && (o.status = L.Loaded, t.progress.work(!0, t.index, i)), n.resolve());
|
|
4606
4621
|
};
|
|
4607
4622
|
}
|
|
4608
4623
|
l.defer = !0, l.src = i;
|
|
@@ -4646,7 +4661,7 @@ class vr {
|
|
|
4646
4661
|
*/
|
|
4647
4662
|
createDefine(e, t) {
|
|
4648
4663
|
const r = this, n = function(...i) {
|
|
4649
|
-
e.status =
|
|
4664
|
+
e.status = L.Defining;
|
|
4650
4665
|
let o, a, l, u = i.length;
|
|
4651
4666
|
u === 1 ? (l = i[0], o = void 0) : u === 2 ? (l = i[1], Array.isArray(i[0]) ? (a = r.trimEmptyElement(i[0]), o = void 0) : a = void 0) : (o = i[0], a = r.trimEmptyElement(i[1]), l = i[2]), o && (e.id = o, r.options.alias[o] = e.src), a && a.length > 0 ? r.ensure(a, (...f) => {
|
|
4652
4667
|
const c = f.map((h) => h === "exports" ? ((!e.exports || typeof e.exports != "object") && (e.exports = {}), e.exports) : h === "module" ? e : h);
|
|
@@ -4655,8 +4670,8 @@ class vr {
|
|
|
4655
4670
|
h && typeof h == "object" && (e.exports = h);
|
|
4656
4671
|
} else
|
|
4657
4672
|
e.exports = l;
|
|
4658
|
-
e.status =
|
|
4659
|
-
}) : (typeof l == "function" ? e.exports = Reflect.apply(l, e, []) : e.exports = l, e.status =
|
|
4673
|
+
e.status = L.Defined, t.progress.work(!0, t.index, e.exports);
|
|
4674
|
+
}) : (typeof l == "function" ? e.exports = Reflect.apply(l, e, []) : e.exports = l, e.status = L.Defined, t.progress.work(!0, t.index, e.exports));
|
|
4660
4675
|
};
|
|
4661
4676
|
return n.amd = !0, n;
|
|
4662
4677
|
}
|
|
@@ -4731,9 +4746,9 @@ class vr {
|
|
|
4731
4746
|
if (e.indexOf("http://") == 0 || e.indexOf("https://") == 0 || e.indexOf("file:///") == 0)
|
|
4732
4747
|
return e;
|
|
4733
4748
|
if (e.indexOf("/") == 0)
|
|
4734
|
-
return `${
|
|
4749
|
+
return `${ct()}${e.slice(1)}`;
|
|
4735
4750
|
if (e.indexOf("./") == 0)
|
|
4736
|
-
return `${
|
|
4751
|
+
return `${ct()}${e.slice(2)}`;
|
|
4737
4752
|
if (e.indexOf("//") == 0)
|
|
4738
4753
|
return `${$().location.protocol}${e}`;
|
|
4739
4754
|
if (t) {
|
|
@@ -4749,10 +4764,10 @@ class vr {
|
|
|
4749
4764
|
}
|
|
4750
4765
|
return this.parserPath(n, !1);
|
|
4751
4766
|
}
|
|
4752
|
-
return `${
|
|
4767
|
+
return `${ct()}${e}`;
|
|
4753
4768
|
}
|
|
4754
4769
|
}
|
|
4755
|
-
function
|
|
4770
|
+
function kr(s, e) {
|
|
4756
4771
|
let t = s.sheet, r = !1;
|
|
4757
4772
|
if (e.isOldWebKit)
|
|
4758
4773
|
t && (r = !0);
|
|
@@ -4763,10 +4778,10 @@ function Dr(s, e) {
|
|
|
4763
4778
|
n.name === "NS_ERROR_DOM_SECURITY_ERR" && (r = !0);
|
|
4764
4779
|
}
|
|
4765
4780
|
setTimeout(() => {
|
|
4766
|
-
e.time += 20, r ? e.success() : e.timeout > e.timeout ? e.error() :
|
|
4781
|
+
e.time += 20, r ? e.success() : e.timeout > e.timeout ? e.error() : kr(s, e);
|
|
4767
4782
|
}, 20);
|
|
4768
4783
|
}
|
|
4769
|
-
class
|
|
4784
|
+
class on {
|
|
4770
4785
|
/**
|
|
4771
4786
|
* 回调函数
|
|
4772
4787
|
*/
|
|
@@ -4814,7 +4829,7 @@ class sn {
|
|
|
4814
4829
|
return this.status;
|
|
4815
4830
|
}
|
|
4816
4831
|
}
|
|
4817
|
-
class
|
|
4832
|
+
class ln {
|
|
4818
4833
|
/**
|
|
4819
4834
|
* 索引
|
|
4820
4835
|
*/
|
|
@@ -4842,9 +4857,9 @@ class nn {
|
|
|
4842
4857
|
this.index = e, this.src = t, this.params = r, this.progress = n;
|
|
4843
4858
|
}
|
|
4844
4859
|
}
|
|
4845
|
-
const
|
|
4846
|
-
function
|
|
4847
|
-
const e = new
|
|
4860
|
+
const Ur = Symbol("fk"), Wr = Symbol("fbk"), zr = Symbol("fepk");
|
|
4861
|
+
function Rn(s = {}) {
|
|
4862
|
+
const e = new Os(s), t = new Qt(), r = new Zt(), n = new vr(), i = {
|
|
4848
4863
|
/**
|
|
4849
4864
|
* 返回router
|
|
4850
4865
|
*/
|
|
@@ -4903,7 +4918,7 @@ function bn(s = {}) {
|
|
|
4903
4918
|
* 返回clone
|
|
4904
4919
|
*/
|
|
4905
4920
|
get clone() {
|
|
4906
|
-
return
|
|
4921
|
+
return It;
|
|
4907
4922
|
},
|
|
4908
4923
|
/**
|
|
4909
4924
|
* 判断是否为es模块
|
|
@@ -4915,7 +4930,7 @@ function bn(s = {}) {
|
|
|
4915
4930
|
* 安装
|
|
4916
4931
|
*/
|
|
4917
4932
|
install(o) {
|
|
4918
|
-
o.provide(lt, e), o.provide(
|
|
4933
|
+
o.provide(lt, e), o.provide(Ur, i), o.provide(Wr, t), o.provide(zr, r), o.component(Ms, Ot), o.component(Ns, sn), Reflect.defineProperty(o.config.globalProperties, "$fox", {
|
|
4919
4934
|
get() {
|
|
4920
4935
|
return i;
|
|
4921
4936
|
}
|
|
@@ -4955,7 +4970,7 @@ function bn(s = {}) {
|
|
|
4955
4970
|
computed: {
|
|
4956
4971
|
//获取当前route
|
|
4957
4972
|
$route() {
|
|
4958
|
-
return
|
|
4973
|
+
return Vt(this);
|
|
4959
4974
|
}
|
|
4960
4975
|
}
|
|
4961
4976
|
}), e.init();
|
|
@@ -4963,23 +4978,23 @@ function bn(s = {}) {
|
|
|
4963
4978
|
};
|
|
4964
4979
|
return i;
|
|
4965
4980
|
}
|
|
4966
|
-
function
|
|
4981
|
+
function Jr(s) {
|
|
4967
4982
|
return s ? s.$router : G(lt);
|
|
4968
4983
|
}
|
|
4969
|
-
function xn(s) {
|
|
4970
|
-
return s || (s = Lt()?.proxy ?? void 0), s ? Dt(s) : null;
|
|
4971
|
-
}
|
|
4972
|
-
function Rn(s) {
|
|
4973
|
-
return s ? s.$fox : G(Vr);
|
|
4974
|
-
}
|
|
4975
4984
|
function Sn(s) {
|
|
4976
|
-
return s ? s
|
|
4985
|
+
return s || (s = Mt()?.proxy ?? void 0), s ? Vt(s) : null;
|
|
4977
4986
|
}
|
|
4978
4987
|
function Pn(s) {
|
|
4979
|
-
return s ? s.$
|
|
4988
|
+
return s ? s.$fox : G(Ur);
|
|
4980
4989
|
}
|
|
4981
4990
|
function Cn(s) {
|
|
4982
|
-
|
|
4991
|
+
return s ? s.$bus : G(Wr);
|
|
4992
|
+
}
|
|
4993
|
+
function An(s) {
|
|
4994
|
+
return s ? s.$eventProxy : G(zr);
|
|
4995
|
+
}
|
|
4996
|
+
function En(s) {
|
|
4997
|
+
const e = Jr(), t = (r, n, i) => {
|
|
4983
4998
|
try {
|
|
4984
4999
|
Reflect.apply(s, {}, [r, n]);
|
|
4985
5000
|
} catch (o) {
|
|
@@ -4991,8 +5006,8 @@ function Cn(s) {
|
|
|
4991
5006
|
e.removeBeforeEach(t);
|
|
4992
5007
|
});
|
|
4993
5008
|
}
|
|
4994
|
-
function
|
|
4995
|
-
const e =
|
|
5009
|
+
function Fn(s) {
|
|
5010
|
+
const e = Jr(), t = (r, n, i) => {
|
|
4996
5011
|
try {
|
|
4997
5012
|
Reflect.apply(s, {}, [r, n]);
|
|
4998
5013
|
} catch (o) {
|
|
@@ -5008,44 +5023,45 @@ export {
|
|
|
5008
5023
|
Qt as Bus,
|
|
5009
5024
|
st as EventChain,
|
|
5010
5025
|
Zt as EventProxy,
|
|
5026
|
+
T as OperationType,
|
|
5011
5027
|
S as Route,
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5028
|
+
It as clone,
|
|
5029
|
+
Rn as createFox,
|
|
5030
|
+
qs as createMemoryHistory,
|
|
5031
|
+
Ts as createWebHashHistory,
|
|
5032
|
+
xn as createWebHistory,
|
|
5033
|
+
gn as deleteContextValue,
|
|
5018
5034
|
q as extend,
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5035
|
+
Wr as foxBusKey,
|
|
5036
|
+
zr as foxEventProxyKey,
|
|
5037
|
+
Ur as foxKey,
|
|
5022
5038
|
Fr as injectContextValue,
|
|
5023
|
-
|
|
5024
|
-
|
|
5039
|
+
un as isArray,
|
|
5040
|
+
hn as isDate,
|
|
5025
5041
|
br as isESModule,
|
|
5026
5042
|
zt as isEqual,
|
|
5027
5043
|
x as isFunction,
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5044
|
+
fn as isMap,
|
|
5045
|
+
Yr as isNil,
|
|
5046
|
+
Xr as isObject,
|
|
5047
|
+
es as isPlainObject,
|
|
5048
|
+
pn as isPromise,
|
|
5049
|
+
cn as isSet,
|
|
5050
|
+
yn as isString,
|
|
5051
|
+
dn as isSymbol,
|
|
5052
|
+
Fn as onAfterRouteUpdate,
|
|
5053
|
+
En as onBeforeRouteUpdate,
|
|
5054
|
+
wn as onFoxActivated,
|
|
5055
|
+
bn as onFoxInactivated,
|
|
5056
|
+
vn as provideContextValue,
|
|
5041
5057
|
ae as sessionKey,
|
|
5042
5058
|
xr as toBoolean,
|
|
5043
|
-
|
|
5044
|
-
|
|
5059
|
+
mn as toNumber,
|
|
5060
|
+
Nt as toTypeString,
|
|
5045
5061
|
Wt as typeOf,
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5062
|
+
Cn as useBus,
|
|
5063
|
+
An as useEventProxy,
|
|
5064
|
+
Pn as useFox,
|
|
5065
|
+
Sn as useRoute,
|
|
5066
|
+
Jr as useRouter
|
|
5051
5067
|
};
|