@fox-js/fox 3.1.1-26 → 3.1.1-27
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 +1 -1
- package/libs/index.esm.d.ts +2 -2
- package/libs/index.esm.js +652 -644
- package/libs/index.umd.js +1 -1
- package/package.json +1 -1
package/libs/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as jr, effectScope as fs, getCurrentScope as Kr, h as he, hasInjectionContext as _e, inject as N, onActivated as cs, onDeactivated as hs, onScopeDispose as Fe, provide as te, reactive as ys, readonly as ds, ref as ms, shallowReactive as vs, shallowRef as Lr, toRaw as Ht, watch as ps } from "vue";
|
|
2
2
|
var Ee = typeof window < "u", C = function() {
|
|
3
3
|
return window;
|
|
4
4
|
}, Je = function() {
|
|
@@ -7,7 +7,7 @@ var Ee = typeof window < "u", C = function() {
|
|
|
7
7
|
function ft(e, t, r, s = !1) {
|
|
8
8
|
e.addEventListener ? e.addEventListener(t, r, s) : e.attachEvent ? e.attachEvent(`on${t}`, r) : e[`on${t}`] = r;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function Zt(e, t, r) {
|
|
11
11
|
e.removeEventListener ? e.removeEventListener(t, r) : e.detachEvent ? e.detachEvent(`on${t}`, r) : e[`on${t}`] = null;
|
|
12
12
|
}
|
|
13
13
|
var ze = (e, t, r) => {
|
|
@@ -20,22 +20,22 @@ var ze = (e, t, r) => {
|
|
|
20
20
|
let i = !0, n = !0;
|
|
21
21
|
for (let o in t) o === "bubbles" ? i = !!t[o] : o === "cancelable" ? n = !!t[o] : s[o] = t[o];
|
|
22
22
|
s.initEvent(e, i, n), (r ?? document).dispatchEvent(s);
|
|
23
|
-
},
|
|
24
|
-
function
|
|
23
|
+
}, or = Array.isArray, Ki = (e) => Yt(e) === "[object Map]", Li = (e) => Yt(e) === "[object Set]", Mi = (e) => e instanceof Date, w = (e) => typeof e == "function", ki = (e) => typeof e == "string", Ti = (e) => typeof e == "symbol", gs = (e) => e !== null && typeof e == "object", Ii = (e) => gs(e) && w(e.then) && w(e.catch), We = (e) => e == null, bs = Object.prototype.toString, Yt = (e) => bs.call(e), ws = (e) => Yt(e) === "[object Object]", Rs = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
|
|
24
|
+
function er(e) {
|
|
25
25
|
return e.__esModule || Rs && e[Symbol.toStringTag] === "Module";
|
|
26
26
|
}
|
|
27
27
|
var xs = typeof Promise < "u" && Promise.toString().indexOf("[native code]") !== -1;
|
|
28
|
-
function
|
|
28
|
+
function j(...e) {
|
|
29
29
|
let t = e[0] !== void 0 && e[0] !== null ? e[0] : {}, r = 1, s = e.length, i = !1;
|
|
30
30
|
for (typeof t == "boolean" && (i = t, t = e[r] ?? {}, r++), typeof t != "object" && (t = {}); r < s; r++) if (e[r] !== null && e[r] !== void 0) {
|
|
31
31
|
let n = e[r];
|
|
32
32
|
for (let o in n) {
|
|
33
|
-
let
|
|
34
|
-
if (
|
|
35
|
-
if (i === !0 &&
|
|
36
|
-
let
|
|
37
|
-
Array.isArray(
|
|
38
|
-
} else
|
|
33
|
+
let l = t[o], a = n[o];
|
|
34
|
+
if (l !== a)
|
|
35
|
+
if (i === !0 && a && typeof a == "object") {
|
|
36
|
+
let u;
|
|
37
|
+
Array.isArray(a) ? u = l && Array.isArray(l) ? l : [] : u = l && typeof l == "object" ? l : {}, t[o] = j(i, u, a);
|
|
38
|
+
} else a !== void 0 && (t[o] = a);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
return t;
|
|
@@ -47,7 +47,7 @@ function Mr(e, t, r = !1) {
|
|
|
47
47
|
let i = e[s], n = t[s];
|
|
48
48
|
if (i !== n)
|
|
49
49
|
if (typeof n == "object") {
|
|
50
|
-
if (!Array.isArray(n) && !
|
|
50
|
+
if (!Array.isArray(n) && !ws(n)) continue;
|
|
51
51
|
i = Mr(i, n, r), e[s] = i;
|
|
52
52
|
} else {
|
|
53
53
|
if (typeof n == "function") continue;
|
|
@@ -56,11 +56,11 @@ function Mr(e, t, r = !1) {
|
|
|
56
56
|
}
|
|
57
57
|
return e;
|
|
58
58
|
}
|
|
59
|
-
var De = class
|
|
59
|
+
var De = class Nt {
|
|
60
60
|
static seed = (/* @__PURE__ */ new Date()).getTime();
|
|
61
61
|
static get() {
|
|
62
|
-
let t = ++
|
|
63
|
-
return t >= Number.MAX_VALUE && (
|
|
62
|
+
let t = ++Nt.seed;
|
|
63
|
+
return t >= Number.MAX_VALUE && (Nt.seed = 0), t;
|
|
64
64
|
}
|
|
65
65
|
}, gt = xs ? Promise.resolve() : null;
|
|
66
66
|
function He(e, ...t) {
|
|
@@ -70,7 +70,7 @@ function He(e, ...t) {
|
|
|
70
70
|
e(t);
|
|
71
71
|
}) : setTimeout(e);
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function kr(e) {
|
|
74
74
|
return e == null ? !1 : typeof e == "boolean" ? e : typeof e == "string" ? e.toLocaleLowerCase() === "true" : !!e;
|
|
75
75
|
}
|
|
76
76
|
function Oi(e) {
|
|
@@ -86,38 +86,38 @@ var Ss = {
|
|
|
86
86
|
"[object RegExp]": "regExp",
|
|
87
87
|
"[object Object]": "object"
|
|
88
88
|
};
|
|
89
|
-
function
|
|
89
|
+
function lr(e) {
|
|
90
90
|
let t = Object.prototype.toString.call(e);
|
|
91
91
|
return e == null ? String(e) : Ss[t] || "object";
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function ar(e, t) {
|
|
94
94
|
if (e == t) return !0;
|
|
95
95
|
if (e === void 0 || t === void 0) return !1;
|
|
96
|
-
let r =
|
|
97
|
-
if (r !==
|
|
96
|
+
let r = lr(e);
|
|
97
|
+
if (r !== lr(t)) return !1;
|
|
98
98
|
if (r === "object") {
|
|
99
99
|
let s = Object.keys(e), i = Object.keys(t);
|
|
100
100
|
if (s.length !== i.length) return !1;
|
|
101
101
|
for (let n = 0; n < s.length; n++) {
|
|
102
|
-
let o = s[n],
|
|
103
|
-
if (!
|
|
102
|
+
let o = s[n], l = e[o], a = t[o];
|
|
103
|
+
if (!ar(l, a)) return !1;
|
|
104
104
|
}
|
|
105
105
|
return !0;
|
|
106
106
|
} else if (r === "array") {
|
|
107
107
|
if (e.length !== t.length) return !1;
|
|
108
108
|
for (let s = 0; s < e.length; s++) {
|
|
109
109
|
let i = e[s], n = t[s];
|
|
110
|
-
if (!
|
|
110
|
+
if (!ar(i, n)) return !1;
|
|
111
111
|
}
|
|
112
112
|
return !0;
|
|
113
113
|
}
|
|
114
114
|
return !1;
|
|
115
115
|
}
|
|
116
|
-
var
|
|
116
|
+
var Tr = (e) => {
|
|
117
117
|
const t = {};
|
|
118
118
|
for (let r of Reflect.ownKeys(e)) {
|
|
119
119
|
let s = e[r];
|
|
120
|
-
s && !Array.isArray(s) && typeof s == "object" && (s =
|
|
120
|
+
s && !Array.isArray(s) && typeof s == "object" && (s = Tr(s)), typeof r == "symbol" ? t[String(r)] = s : t[r] = s;
|
|
121
121
|
}
|
|
122
122
|
return t;
|
|
123
123
|
}, Es = /^Symbol\((.*)\)$/, Ir = (e) => {
|
|
@@ -141,13 +141,13 @@ function Or(e, t) {
|
|
|
141
141
|
}, t);
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
var
|
|
144
|
+
var ur = /* @__PURE__ */ Symbol("idKey"), me = /* @__PURE__ */ Symbol("valueKey"), R = /* @__PURE__ */ Symbol("childrenKey"), X = /* @__PURE__ */ Symbol("growKey"), Br = class {
|
|
145
145
|
[X] = !0;
|
|
146
|
-
[
|
|
146
|
+
[ur];
|
|
147
147
|
[me] = ms();
|
|
148
148
|
[R] = /* @__PURE__ */ new Map();
|
|
149
149
|
constructor(e) {
|
|
150
|
-
this[
|
|
150
|
+
this[ur] = e;
|
|
151
151
|
}
|
|
152
152
|
}, Ps = class {
|
|
153
153
|
get(e, t) {
|
|
@@ -156,21 +156,21 @@ var ar = /* @__PURE__ */ Symbol("idKey"), me = /* @__PURE__ */ Symbol("valueKey"
|
|
|
156
156
|
let r = e[R].get(t);
|
|
157
157
|
if (r) return Ue(r);
|
|
158
158
|
if (e[X])
|
|
159
|
-
return r =
|
|
159
|
+
return r = rr(t), r[X] = e[X], e[R].set(t, r), Ue(r);
|
|
160
160
|
}
|
|
161
161
|
set(e, t, r) {
|
|
162
|
-
return t == "value" ? (e[me].value = r, !0) : t === "grow" ? (e[X] =
|
|
162
|
+
return t == "value" ? (e[me].value = r, !0) : t === "grow" ? (e[X] = kr(r), !0) : r == null ? (e[R].delete(t), !0) : (console.error(`[Fox]illegal property:${t}`), !1);
|
|
163
163
|
}
|
|
164
164
|
deleteProperty(e, t) {
|
|
165
165
|
return t === "value" || t == "grow" ? (console.error(`[Fox]can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
|
|
166
166
|
}
|
|
167
|
-
},
|
|
168
|
-
function
|
|
167
|
+
}, tr = "__proxy__";
|
|
168
|
+
function rr(e) {
|
|
169
169
|
const t = new Br(e);
|
|
170
|
-
return Reflect.set(t,
|
|
170
|
+
return Reflect.set(t, tr, new Proxy(t, new Ps())), t;
|
|
171
171
|
}
|
|
172
172
|
function Ue(e) {
|
|
173
|
-
return Reflect.get(e,
|
|
173
|
+
return Reflect.get(e, tr);
|
|
174
174
|
}
|
|
175
175
|
var _s = class {
|
|
176
176
|
name = "";
|
|
@@ -218,8 +218,8 @@ var _s = class {
|
|
|
218
218
|
const i = JSON.parse(s);
|
|
219
219
|
Object.assign(this.state, i), Reflect.ownKeys(this.state).forEach((n) => {
|
|
220
220
|
if (typeof n != "string") return;
|
|
221
|
-
const o = this.state[n],
|
|
222
|
-
|
|
221
|
+
const o = this.state[n], l = n.split(/\//g);
|
|
222
|
+
l.push(o), Reflect.apply(e.put, e, l);
|
|
223
223
|
});
|
|
224
224
|
}
|
|
225
225
|
}
|
|
@@ -263,7 +263,7 @@ var _s = class {
|
|
|
263
263
|
let r = this;
|
|
264
264
|
for (let s = 0; s < t - 1; s++) {
|
|
265
265
|
let i = e[s], n;
|
|
266
|
-
r[R].has(i) ? n = r[R].get(i) : (n =
|
|
266
|
+
r[R].has(i) ? n = r[R].get(i) : (n = rr(i), r[R].set(i, n)), r = n;
|
|
267
267
|
}
|
|
268
268
|
return r[me].value = e[t - 1], this._persistHandler.put(e), !0;
|
|
269
269
|
}
|
|
@@ -313,7 +313,7 @@ var _s = class {
|
|
|
313
313
|
"clear",
|
|
314
314
|
"_persistHandler"
|
|
315
315
|
];
|
|
316
|
-
function
|
|
316
|
+
function fr(e) {
|
|
317
317
|
return Fs.includes(e);
|
|
318
318
|
}
|
|
319
319
|
var Cs = class {
|
|
@@ -321,15 +321,15 @@ var Cs = class {
|
|
|
321
321
|
if (t == "value") return e[me].value;
|
|
322
322
|
if (t === "grow") return e[X];
|
|
323
323
|
if (t === R) return e[R];
|
|
324
|
-
if (typeof t == "string" &&
|
|
324
|
+
if (typeof t == "string" && fr(t)) return e[t];
|
|
325
325
|
const r = String(t);
|
|
326
326
|
let s = e[R].get(r);
|
|
327
327
|
if (s) return Ue(s);
|
|
328
328
|
if (e[X])
|
|
329
|
-
return s =
|
|
329
|
+
return s = rr(r), s[X] = e[X], e[R].set(r, s), Ue(s);
|
|
330
330
|
}
|
|
331
331
|
set(e, t, r) {
|
|
332
|
-
return t == "value" ? (e[me].value = r, !0) : t === "grow" ? (e[X] =
|
|
332
|
+
return t == "value" ? (e[me].value = r, !0) : t === "grow" ? (e[X] = kr(r), !0) : fr(t) ? !1 : r == null ? (e[R].delete(t), !0) : (console.error(`[Fox]illegal property:${t}`), !1);
|
|
333
333
|
}
|
|
334
334
|
deleteProperty(e, t) {
|
|
335
335
|
return t === "value" || t == "grow" ? (console.error(`[Fox]can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
|
|
@@ -337,12 +337,12 @@ var Cs = class {
|
|
|
337
337
|
};
|
|
338
338
|
function As(e, t) {
|
|
339
339
|
const r = new Dr(e, t), s = new Cs(), i = new Proxy(r, s);
|
|
340
|
-
return Reflect.set(r,
|
|
340
|
+
return Reflect.set(r, tr, i), r;
|
|
341
341
|
}
|
|
342
|
-
var
|
|
342
|
+
var cr = new Proxy(Dr, { construct(e, t) {
|
|
343
343
|
const r = t[0] ?? {}, s = t[1];
|
|
344
344
|
return Ue(As(r, s));
|
|
345
|
-
} }),
|
|
345
|
+
} }), sr = (e) => !e || typeof e != "object" ? !0 : Reflect.ownKeys(e).length === 0, Hr = class {
|
|
346
346
|
name = "";
|
|
347
347
|
persistPolicy = "memory";
|
|
348
348
|
storage;
|
|
@@ -363,7 +363,7 @@ var fr = new Proxy(Dr, { construct(e, t) {
|
|
|
363
363
|
saveState(e) {
|
|
364
364
|
if (!this.persistPolicy || this.persistPolicy === "memory") return;
|
|
365
365
|
let t = this.getStorage();
|
|
366
|
-
if (t === null ||
|
|
366
|
+
if (t === null || sr(e)) return;
|
|
367
367
|
const r = `_state_${this.name}`, s = JSON.stringify(e ?? {});
|
|
368
368
|
t.setItem(r, s);
|
|
369
369
|
}
|
|
@@ -388,21 +388,21 @@ var fr = new Proxy(Dr, { construct(e, t) {
|
|
|
388
388
|
function Nr(e, t, r) {
|
|
389
389
|
const s = new Hr(r);
|
|
390
390
|
s.restore(t);
|
|
391
|
-
const i = (
|
|
392
|
-
const
|
|
393
|
-
for (let f in
|
|
394
|
-
const c =
|
|
395
|
-
We(c) || (
|
|
391
|
+
const i = (l) => {
|
|
392
|
+
const a = Ht(l), u = {};
|
|
393
|
+
for (let f in a) {
|
|
394
|
+
const c = a[f];
|
|
395
|
+
We(c) || (u[f] = c);
|
|
396
396
|
}
|
|
397
|
-
|
|
397
|
+
sr(u) ? s.removeState() : s.saveState(u);
|
|
398
398
|
};
|
|
399
399
|
let n = null;
|
|
400
400
|
r && r.debounce === !1 ? n = i : n = Or(i, r && r.debounceDelay ? r.debounceDelay : 250);
|
|
401
401
|
const o = e ? vs(t) : ys(t);
|
|
402
402
|
return fs(!0).run(() => {
|
|
403
|
-
ps(o, (
|
|
404
|
-
const
|
|
405
|
-
n(
|
|
403
|
+
ps(o, (l) => {
|
|
404
|
+
const a = Ht(l);
|
|
405
|
+
n(a);
|
|
406
406
|
});
|
|
407
407
|
}), o;
|
|
408
408
|
}
|
|
@@ -416,20 +416,20 @@ function qs(e, t) {
|
|
|
416
416
|
const r = new Hr(t);
|
|
417
417
|
r.restore(e);
|
|
418
418
|
const s = (n) => {
|
|
419
|
-
const o =
|
|
420
|
-
for (let
|
|
421
|
-
const
|
|
422
|
-
We(
|
|
419
|
+
const o = Ht(n), l = {};
|
|
420
|
+
for (let a in o) {
|
|
421
|
+
const u = o[a];
|
|
422
|
+
We(u) || (l[a] = u);
|
|
423
423
|
}
|
|
424
|
-
|
|
424
|
+
sr(l) ? r.removeState() : r.saveState(l);
|
|
425
425
|
};
|
|
426
426
|
let i = null;
|
|
427
427
|
return t && t.debounce === !1 ? i = s : i = Or(s, t && t.debounceDelay ? t.debounceDelay : 250), new Proxy(e, {
|
|
428
428
|
get(n, o) {
|
|
429
429
|
return n[o];
|
|
430
430
|
},
|
|
431
|
-
set(n, o,
|
|
432
|
-
return n[o] =
|
|
431
|
+
set(n, o, l) {
|
|
432
|
+
return n[o] = l, i(n), !0;
|
|
433
433
|
}
|
|
434
434
|
});
|
|
435
435
|
}
|
|
@@ -443,13 +443,13 @@ var de = /* @__PURE__ */ (function(e) {
|
|
|
443
443
|
})(P || {}), $s = {
|
|
444
444
|
type: de.Static,
|
|
445
445
|
value: ""
|
|
446
|
-
},
|
|
447
|
-
function
|
|
446
|
+
}, js = /[a-zA-Z0-9_]/;
|
|
447
|
+
function Ks(e) {
|
|
448
448
|
if (!e) return [[]];
|
|
449
449
|
if (e === "/") return [[$s]];
|
|
450
450
|
if (!e.startsWith("/")) throw new Error(`Invalid path "${e}"`);
|
|
451
451
|
function t(y) {
|
|
452
|
-
throw new Error(`ERR (${r})/"${
|
|
452
|
+
throw new Error(`ERR (${r})/"${u}": ${y}`);
|
|
453
453
|
}
|
|
454
454
|
let r = P.Static, s = r;
|
|
455
455
|
const i = [];
|
|
@@ -457,51 +457,51 @@ function js(e) {
|
|
|
457
457
|
function o() {
|
|
458
458
|
n && i.push(n), n = [];
|
|
459
459
|
}
|
|
460
|
-
let
|
|
460
|
+
let l = 0, a, u = "", f = "";
|
|
461
461
|
function c() {
|
|
462
|
-
|
|
462
|
+
u && (r === P.Static ? n.push({
|
|
463
463
|
type: de.Static,
|
|
464
|
-
value:
|
|
465
|
-
}) : r === P.Param || r === P.ParamRegExp || r === P.ParamRegExpEnd ? (n.length > 1 && (
|
|
464
|
+
value: u
|
|
465
|
+
}) : r === P.Param || r === P.ParamRegExp || r === P.ParamRegExpEnd ? (n.length > 1 && (a === "*" || a === "+") && t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`), n.push({
|
|
466
466
|
type: de.Param,
|
|
467
|
-
value:
|
|
467
|
+
value: u,
|
|
468
468
|
regexp: f,
|
|
469
|
-
repeatable:
|
|
470
|
-
optional:
|
|
471
|
-
})) : t("Invalid state to consume buffer"),
|
|
469
|
+
repeatable: a === "*" || a === "+",
|
|
470
|
+
optional: a === "*" || a === "?"
|
|
471
|
+
})) : t("Invalid state to consume buffer"), u = "");
|
|
472
472
|
}
|
|
473
473
|
function h() {
|
|
474
|
-
|
|
474
|
+
u += a;
|
|
475
475
|
}
|
|
476
|
-
for (;
|
|
477
|
-
if (
|
|
476
|
+
for (; l < e.length; ) {
|
|
477
|
+
if (a = e[l++], a === "\\" && r !== P.ParamRegExp) {
|
|
478
478
|
s = r, r = P.EscapeNext;
|
|
479
479
|
continue;
|
|
480
480
|
}
|
|
481
481
|
switch (r) {
|
|
482
482
|
case P.Static:
|
|
483
|
-
|
|
483
|
+
a === "/" ? (u && c(), o()) : a === ":" ? (c(), r = P.Param) : h();
|
|
484
484
|
break;
|
|
485
485
|
case P.EscapeNext:
|
|
486
486
|
h(), r = s;
|
|
487
487
|
break;
|
|
488
488
|
case P.Param:
|
|
489
|
-
|
|
489
|
+
a === "(" ? r = P.ParamRegExp : js.test(a) ? h() : (c(), r = P.Static, a !== "*" && a !== "?" && a !== "+" && l--);
|
|
490
490
|
break;
|
|
491
491
|
case P.ParamRegExp:
|
|
492
|
-
|
|
492
|
+
a === ")" ? f[f.length - 1] == "\\" ? f = f.slice(0, -1) + a : r = P.ParamRegExpEnd : f += a;
|
|
493
493
|
break;
|
|
494
494
|
case P.ParamRegExpEnd:
|
|
495
|
-
c(), r = P.Static,
|
|
495
|
+
c(), r = P.Static, a !== "*" && a !== "?" && a !== "+" && l--, f = "";
|
|
496
496
|
break;
|
|
497
497
|
default:
|
|
498
498
|
t("Unknown state");
|
|
499
499
|
break;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
return r === P.ParamRegExp && t(`Unfinished custom RegExp for param "${
|
|
502
|
+
return r === P.ParamRegExp && t(`Unfinished custom RegExp for param "${u}"`), c(), o(), i;
|
|
503
503
|
}
|
|
504
|
-
var
|
|
504
|
+
var hr = "[^/]+?", Ls = {
|
|
505
505
|
sensitive: !1,
|
|
506
506
|
strict: !1,
|
|
507
507
|
start: !0,
|
|
@@ -509,27 +509,27 @@ var cr = "[^/]+?", Ls = {
|
|
|
509
509
|
}, J = /* @__PURE__ */ (function(e) {
|
|
510
510
|
return e[e._multiplier = 10] = "_multiplier", e[e.Root = 9 * e._multiplier] = "Root", e[e.Segment = 4 * e._multiplier] = "Segment", e[e.SubSegment = 3 * e._multiplier] = "SubSegment", e[e.Static = 4 * e._multiplier] = "Static", e[e.Dynamic = 2 * e._multiplier] = "Dynamic", e[e.BonusCustomRegExp = 1 * e._multiplier] = "BonusCustomRegExp", e[e.BonusWildcard = -4 * e._multiplier - e.BonusCustomRegExp] = "BonusWildcard", e[e.BonusRepeatable = -2 * e._multiplier] = "BonusRepeatable", e[e.BonusOptional = -0.8 * e._multiplier] = "BonusOptional", e[e.BonusStrict = 0.07 * e._multiplier] = "BonusStrict", e[e.BonusCaseSensitive = 0.025 * e._multiplier] = "BonusCaseSensitive", e;
|
|
511
511
|
})(J || {}), Ms = /[.+*?^${}()[\]/\\]/g;
|
|
512
|
-
function
|
|
513
|
-
const r =
|
|
512
|
+
function ks(e, t) {
|
|
513
|
+
const r = j(!0, {}, Ls, t), s = [];
|
|
514
514
|
let i = r.start ? "^" : "";
|
|
515
515
|
const n = [];
|
|
516
|
-
for (const
|
|
517
|
-
const f =
|
|
518
|
-
r.strict && !
|
|
519
|
-
for (let c = 0; c <
|
|
520
|
-
const h =
|
|
516
|
+
for (const u of e) {
|
|
517
|
+
const f = u.length ? [] : [J.Root];
|
|
518
|
+
r.strict && !u.length && (i += "/");
|
|
519
|
+
for (let c = 0; c < u.length; c++) {
|
|
520
|
+
const h = u[c];
|
|
521
521
|
let y = J.Segment + (r.sensitive ? J.BonusCaseSensitive : 0);
|
|
522
522
|
if (h.type === de.Static)
|
|
523
523
|
c || (i += "/"), i += h.value.replace(Ms, "\\$&"), y += J.Static;
|
|
524
524
|
else if (h.type === de.Param) {
|
|
525
|
-
const { value: d, repeatable: m, optional:
|
|
525
|
+
const { value: d, repeatable: m, optional: b, regexp: g } = h;
|
|
526
526
|
n.push({
|
|
527
527
|
name: d,
|
|
528
528
|
repeatable: m,
|
|
529
|
-
optional:
|
|
529
|
+
optional: b
|
|
530
530
|
});
|
|
531
|
-
const v = g ||
|
|
532
|
-
if (v !==
|
|
531
|
+
const v = g || hr;
|
|
532
|
+
if (v !== hr) {
|
|
533
533
|
y += J.BonusCustomRegExp;
|
|
534
534
|
try {
|
|
535
535
|
new RegExp(`(${v})`);
|
|
@@ -537,21 +537,21 @@ function Ts(e, t) {
|
|
|
537
537
|
throw new Error(`Invalid custom RegExp for param "${d}" (${v}): ` + L.message);
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
|
-
let
|
|
541
|
-
c || (
|
|
540
|
+
let K = m ? `((?:${v})(?:/(?:${v}))*)` : `(${v})`;
|
|
541
|
+
c || (K = b && u.length < 2 ? `(?:/${K})` : "/" + K), b && (K += "?"), i += K, y += J.Dynamic, b && (y += J.BonusOptional), m && (y += J.BonusRepeatable), v === ".*" && (y += J.BonusWildcard);
|
|
542
542
|
}
|
|
543
543
|
f.push(y);
|
|
544
544
|
}
|
|
545
545
|
s.push(f);
|
|
546
546
|
}
|
|
547
547
|
if (r.strict && r.end) {
|
|
548
|
-
const
|
|
549
|
-
s[
|
|
548
|
+
const u = s.length - 1;
|
|
549
|
+
s[u][s[u].length - 1] += J.BonusStrict;
|
|
550
550
|
}
|
|
551
551
|
r.strict || (i += "/?"), r.end ? i += "$" : r.strict && !i.endsWith("/") && (i += "(?:/|$)");
|
|
552
552
|
const o = new RegExp(i, r.sensitive ? "" : "i");
|
|
553
|
-
function u
|
|
554
|
-
const f =
|
|
553
|
+
function l(u) {
|
|
554
|
+
const f = u.match(o), c = {};
|
|
555
555
|
if (!f) return null;
|
|
556
556
|
for (let h = 1; h < f.length; h++) {
|
|
557
557
|
const y = f[h] || "", d = n[h - 1];
|
|
@@ -559,16 +559,16 @@ function Ts(e, t) {
|
|
|
559
559
|
}
|
|
560
560
|
return c;
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function a(u) {
|
|
563
563
|
let f = "", c = !1;
|
|
564
564
|
for (const h of e) {
|
|
565
565
|
(!c || !f.endsWith("/")) && (f += "/"), c = !1;
|
|
566
566
|
for (const y of h) if (y.type === de.Static) f += y.value;
|
|
567
567
|
else if (y.type === de.Param) {
|
|
568
|
-
const { value: d, repeatable: m, optional:
|
|
569
|
-
if (
|
|
570
|
-
const v =
|
|
571
|
-
if (!v) if (
|
|
568
|
+
const { value: d, repeatable: m, optional: b } = y, g = d in u ? u[d] : "";
|
|
569
|
+
if (or(g) && !m) throw new Error(`Provided param "${d}" is an array but it is not repeatable (* or + modifiers)`);
|
|
570
|
+
const v = or(g) ? g.join("/") : g;
|
|
571
|
+
if (!v) if (b)
|
|
572
572
|
h.length < 2 && (f.endsWith("/") ? f = f.slice(0, -1) : c = !0);
|
|
573
573
|
else throw new Error(`Missing required param "${d}"`);
|
|
574
574
|
f += v;
|
|
@@ -580,12 +580,12 @@ function Ts(e, t) {
|
|
|
580
580
|
re: o,
|
|
581
581
|
score: s,
|
|
582
582
|
keys: n,
|
|
583
|
-
parse:
|
|
584
|
-
stringify:
|
|
583
|
+
parse: l,
|
|
584
|
+
stringify: a
|
|
585
585
|
};
|
|
586
586
|
}
|
|
587
|
-
function
|
|
588
|
-
const r =
|
|
587
|
+
function Ts(e, t) {
|
|
588
|
+
const r = ks(Ks(e), t);
|
|
589
589
|
return function(s) {
|
|
590
590
|
const i = r.parse(s);
|
|
591
591
|
return i ? {
|
|
@@ -595,7 +595,7 @@ function ks(e, t) {
|
|
|
595
595
|
};
|
|
596
596
|
}
|
|
597
597
|
var Ur = "default", Vr = /* @__PURE__ */ Symbol("sync"), I = /* @__PURE__ */ Symbol("normalizeRoute");
|
|
598
|
-
function
|
|
598
|
+
function yr(e) {
|
|
599
599
|
let t = !1;
|
|
600
600
|
return function(...r) {
|
|
601
601
|
if (!t)
|
|
@@ -605,21 +605,21 @@ function hr(e) {
|
|
|
605
605
|
function Is(e) {
|
|
606
606
|
let t = e.src;
|
|
607
607
|
return new Promise((r, s) => {
|
|
608
|
-
const i =
|
|
609
|
-
|
|
610
|
-
}), n =
|
|
611
|
-
`${
|
|
608
|
+
const i = yr((l) => {
|
|
609
|
+
er(l) && (l = l.default), e.component = l, console.debug("success load async module"), r();
|
|
610
|
+
}), n = yr((l) => {
|
|
611
|
+
`${l}`, console.debug("reject load async module"), s(l);
|
|
612
612
|
});
|
|
613
613
|
let o;
|
|
614
614
|
try {
|
|
615
615
|
o = t(i, n);
|
|
616
|
-
} catch (
|
|
617
|
-
n(
|
|
616
|
+
} catch (l) {
|
|
617
|
+
n(l);
|
|
618
618
|
}
|
|
619
619
|
if (o) if (typeof o.then == "function") o.then(i, n);
|
|
620
620
|
else {
|
|
621
|
-
const
|
|
622
|
-
|
|
621
|
+
const l = o.component;
|
|
622
|
+
l && typeof l.then == "function" && l.then(i, n);
|
|
623
623
|
}
|
|
624
624
|
});
|
|
625
625
|
}
|
|
@@ -641,12 +641,12 @@ var Os = class {
|
|
|
641
641
|
}
|
|
642
642
|
static from(t) {
|
|
643
643
|
const r = new Wr(t.to, t.from), s = t.data ?? {};
|
|
644
|
-
return
|
|
644
|
+
return j(!0, r.data, s), r;
|
|
645
645
|
}
|
|
646
646
|
static clear(t) {
|
|
647
647
|
for (let r in t) t[r] = void 0;
|
|
648
648
|
}
|
|
649
|
-
},
|
|
649
|
+
}, x = class Ut {
|
|
650
650
|
path;
|
|
651
651
|
get fullPath() {
|
|
652
652
|
const t = this.path ?? `${this.name}`;
|
|
@@ -672,7 +672,7 @@ var Os = class {
|
|
|
672
672
|
active;
|
|
673
673
|
slot;
|
|
674
674
|
static clone(t, r) {
|
|
675
|
-
let s = new
|
|
675
|
+
let s = new Ut();
|
|
676
676
|
return Mr(s, t, r), s;
|
|
677
677
|
}
|
|
678
678
|
static isSame(t, r) {
|
|
@@ -682,7 +682,7 @@ var Os = class {
|
|
|
682
682
|
return !t || !r ? !1 : t === r || t.path && r.path && t.path === r.path ? !0 : !!(t.name && r.name && t.name === r.name);
|
|
683
683
|
}
|
|
684
684
|
static from(t) {
|
|
685
|
-
let r = new
|
|
685
|
+
let r = new Ut();
|
|
686
686
|
if (t == null) return r;
|
|
687
687
|
let s = r;
|
|
688
688
|
for (let n in t) s[n] = t[n];
|
|
@@ -705,9 +705,9 @@ var Os = class {
|
|
|
705
705
|
resolve() {
|
|
706
706
|
return Is(this);
|
|
707
707
|
}
|
|
708
|
-
},
|
|
708
|
+
}, dr = class {
|
|
709
709
|
models = [];
|
|
710
|
-
},
|
|
710
|
+
}, bt = class {
|
|
711
711
|
path;
|
|
712
712
|
match;
|
|
713
713
|
redirect;
|
|
@@ -717,7 +717,7 @@ var Os = class {
|
|
|
717
717
|
layers = [];
|
|
718
718
|
}, F = /* @__PURE__ */ (function(e) {
|
|
719
719
|
return e[e.Push = 0] = "Push", e[e.Replace = 1] = "Replace", e[e.Put = 2] = "Put", e[e.Append = 3] = "Append", e[e.Open = 4] = "Open", e;
|
|
720
|
-
})({}),
|
|
720
|
+
})({}), wt = /* @__PURE__ */ (function(e) {
|
|
721
721
|
return e[e.Part = 0] = "Part", e[e.All = 1] = "All", e;
|
|
722
722
|
})({}), G = /* @__PURE__ */ Symbol("rootKey"), z = /* @__PURE__ */ Symbol("rootNodeKey"), ye = /* @__PURE__ */ Symbol("parentNodeKey"), at = /* @__PURE__ */ Symbol("nameKey"), re = class {
|
|
723
723
|
model;
|
|
@@ -785,9 +785,9 @@ var Os = class {
|
|
|
785
785
|
}
|
|
786
786
|
}, E = /* @__PURE__ */ (function(e) {
|
|
787
787
|
return e.Busy = "Busy", e.Free = "Free", e.Reject = "Reject", e.Exception = "Exception", e.Finished = "Finished", e;
|
|
788
|
-
})(E || {}), B = /* @__PURE__ */ Symbol("chainKey"),
|
|
788
|
+
})(E || {}), B = /* @__PURE__ */ Symbol("chainKey"), T = /* @__PURE__ */ Symbol("cursorKey"), xt = /* @__PURE__ */ Symbol("$persistentModeKey"), _ = /* @__PURE__ */ Symbol("statusKey"), Z = /* @__PURE__ */ Symbol("argsKey"), Xe = /* @__PURE__ */ Symbol("exArgsKey"), pe = /* @__PURE__ */ Symbol("successFnsKey"), $e = /* @__PURE__ */ Symbol("errorFnsKey"), le = /* @__PURE__ */ Symbol("sessionKey"), Y = /* @__PURE__ */ Symbol("_go"), ct = class {
|
|
789
789
|
[B] = [];
|
|
790
|
-
[
|
|
790
|
+
[T] = 0;
|
|
791
791
|
[xt] = !1;
|
|
792
792
|
[_] = E.Free;
|
|
793
793
|
[Z] = [];
|
|
@@ -803,7 +803,7 @@ var Os = class {
|
|
|
803
803
|
}
|
|
804
804
|
[Y](e, ...t) {
|
|
805
805
|
let r = this[_];
|
|
806
|
-
if (this[_] = E.Busy, this[
|
|
806
|
+
if (this[_] = E.Busy, this[T] += e, this[T] < 0 && (this[T] = 0), this[Z] = t, r === E.Exception || r === E.Reject) {
|
|
807
807
|
let n = [{ session: this[le] }, ...this[Xe]];
|
|
808
808
|
for (; this[$e].length > 0; ) try {
|
|
809
809
|
let o = this[$e].shift();
|
|
@@ -813,8 +813,8 @@ var Os = class {
|
|
|
813
813
|
} catch (o) {
|
|
814
814
|
console.error(o.message, o);
|
|
815
815
|
}
|
|
816
|
-
return this[_] = r, this[B] = [], this[
|
|
817
|
-
} else if (r === E.Finished || this[
|
|
816
|
+
return this[_] = r, this[B] = [], this[T] = 0, this;
|
|
817
|
+
} else if (r === E.Finished || this[T] >= this[B].length) {
|
|
818
818
|
let n = [{ session: this[le] }, ...this[Z]];
|
|
819
819
|
for (; this[pe].length > 0; ) {
|
|
820
820
|
let o = this[pe].shift();
|
|
@@ -824,24 +824,24 @@ var Os = class {
|
|
|
824
824
|
}
|
|
825
825
|
return this[_] = E.Free, this;
|
|
826
826
|
}
|
|
827
|
-
if (this[
|
|
827
|
+
if (this[T] >= this[B].length)
|
|
828
828
|
return this[_] = E.Free, this;
|
|
829
|
-
let s = this[B][this[
|
|
830
|
-
this[xt] || (this[B].splice(0, this[
|
|
831
|
-
let i = this[
|
|
829
|
+
let s = this[B][this[T]];
|
|
830
|
+
this[xt] || (this[B].splice(0, this[T] + 1), this[T] = -1);
|
|
831
|
+
let i = this[T] + 1;
|
|
832
832
|
try {
|
|
833
833
|
let n = !1, o = {
|
|
834
|
-
go: (
|
|
835
|
-
n || (n = !0, Reflect.apply(this[Y], this, [
|
|
834
|
+
go: (l, ...a) => {
|
|
835
|
+
n || (n = !0, Reflect.apply(this[Y], this, [l, ...a]));
|
|
836
836
|
},
|
|
837
|
-
resolve: (...
|
|
838
|
-
n || (n = !0, Reflect.apply(this[Y], this, [1, ...
|
|
837
|
+
resolve: (...l) => {
|
|
838
|
+
n || (n = !0, Reflect.apply(this[Y], this, [1, ...l]));
|
|
839
839
|
},
|
|
840
|
-
reject: (...
|
|
841
|
-
n || (n = !0, Reflect.apply(this.reject, this, [...
|
|
840
|
+
reject: (...l) => {
|
|
841
|
+
n || (n = !0, Reflect.apply(this.reject, this, [...l]));
|
|
842
842
|
},
|
|
843
|
-
insert: (
|
|
844
|
-
n || (this[B].splice(i, 0,
|
|
843
|
+
insert: (l) => {
|
|
844
|
+
n || (this[B].splice(i, 0, l), i++);
|
|
845
845
|
},
|
|
846
846
|
session: this[le]
|
|
847
847
|
};
|
|
@@ -866,7 +866,7 @@ var Os = class {
|
|
|
866
866
|
return this[_] = E.Exception, this[Xe] = e, Reflect.apply(this[Y], this, [0]);
|
|
867
867
|
}
|
|
868
868
|
reset(...e) {
|
|
869
|
-
this[_] = E.Busy, this[Z] = e, this[B] = [], this[
|
|
869
|
+
this[_] = E.Busy, this[Z] = e, this[B] = [], this[T] = 0;
|
|
870
870
|
let t = [{ session: this[le] }, ...this[Z]];
|
|
871
871
|
for (; this[pe].length > 0; ) {
|
|
872
872
|
let r = this[pe].shift();
|
|
@@ -886,23 +886,23 @@ var Os = class {
|
|
|
886
886
|
return e && typeof e == "function" && this[$e].push(e), this[_] === E.Busy ? this : Reflect.apply(this[Y], this, [0, ...this[Z]]);
|
|
887
887
|
}
|
|
888
888
|
isFinish() {
|
|
889
|
-
return this[_] == E.Reject || this[_] == E.Free && this[
|
|
889
|
+
return this[_] == E.Reject || this[_] == E.Free && this[T] >= this[B].length;
|
|
890
890
|
}
|
|
891
|
-
}, xe = /* @__PURE__ */ Symbol("_notifyChange"),
|
|
891
|
+
}, xe = /* @__PURE__ */ Symbol("_notifyChange"), St = class {
|
|
892
892
|
currentRoute;
|
|
893
893
|
routes;
|
|
894
894
|
constructor(e, t) {
|
|
895
895
|
this.currentRoute = e, this.routes = t;
|
|
896
896
|
}
|
|
897
|
-
}, ae = /* @__PURE__ */ Symbol("historyChangeConsumerKey"), mr = /* @__PURE__ */ Symbol("_navigateFirstRoute"), Qe = /* @__PURE__ */ Symbol("_getRouteMark"),
|
|
898
|
-
function
|
|
897
|
+
}, ae = /* @__PURE__ */ Symbol("historyChangeConsumerKey"), mr = /* @__PURE__ */ Symbol("_navigateFirstRoute"), Qe = /* @__PURE__ */ Symbol("_getRouteMark"), Et = /* @__PURE__ */ Symbol("_getUrlSearch"), Pt = /* @__PURE__ */ Symbol("_generateLocation"), Ze = /* @__PURE__ */ Symbol("_setRouteMarkRecorder"), je = /* @__PURE__ */ Symbol("beforeRestoreFiltersKey"), vr = /* @__PURE__ */ Symbol("_beforeRestore"), pr = "Symbol(_fox_restore_point)";
|
|
898
|
+
function Ye(e, ...t) {
|
|
899
899
|
return typeof e == "function" ? Reflect.apply(e, null, [...t]) : e;
|
|
900
900
|
}
|
|
901
901
|
function gr(e) {
|
|
902
902
|
if (!Array.isArray(e)) return !1;
|
|
903
903
|
if (e.length === 0) return !0;
|
|
904
904
|
const t = e[0];
|
|
905
|
-
return !!(Reflect.has(t, "path") && Reflect.has(t, "root"));
|
|
905
|
+
return !!((Reflect.has(t, "path") || Reflect.has(t, "name")) && Reflect.has(t, "root"));
|
|
906
906
|
}
|
|
907
907
|
var Jr = class {
|
|
908
908
|
base;
|
|
@@ -915,10 +915,10 @@ var Jr = class {
|
|
|
915
915
|
changeHandler;
|
|
916
916
|
historyChange;
|
|
917
917
|
[ae] = !1;
|
|
918
|
-
[
|
|
918
|
+
[je] = new Array();
|
|
919
919
|
backTimeout = 320;
|
|
920
|
-
constructor(e = "hash", t = "", r = "", s = !0, i = !0, n = !1, o,
|
|
921
|
-
this.mode = e, this.base = t, this.query = r, this.firstNavigate = s, this.historyMonitor = i, this.traceless = n, this.storage = o ?? C().sessionStorage, this.backTimeout =
|
|
920
|
+
constructor(e = "hash", t = "", r = "", s = !0, i = !0, n = !1, o, l) {
|
|
921
|
+
this.mode = e, this.base = t, this.query = r, this.firstNavigate = s, this.historyMonitor = i, this.traceless = n, this.storage = o ?? C().sessionStorage, this.backTimeout = l ?? 320;
|
|
922
922
|
}
|
|
923
923
|
init(e = !0) {
|
|
924
924
|
const t = C();
|
|
@@ -930,7 +930,7 @@ var Jr = class {
|
|
|
930
930
|
this[ae] = !1;
|
|
931
931
|
return;
|
|
932
932
|
}
|
|
933
|
-
if (
|
|
933
|
+
if (Ye(this.historyMonitor)) {
|
|
934
934
|
const r = t.history.state;
|
|
935
935
|
this[xe](r);
|
|
936
936
|
try {
|
|
@@ -945,10 +945,10 @@ var Jr = class {
|
|
|
945
945
|
}), ft(t, "popstate", this.historyChange), this.firstNavigate && e && this[mr](), Promise.resolve();
|
|
946
946
|
}
|
|
947
947
|
destroy() {
|
|
948
|
-
this.historyChange &&
|
|
948
|
+
this.historyChange && Zt(C(), "popstate", this.historyChange);
|
|
949
949
|
}
|
|
950
950
|
[vr](e, t, r, s) {
|
|
951
|
-
for (let i of this[
|
|
951
|
+
for (let i of this[je]) try {
|
|
952
952
|
const n = Reflect.apply(i, {}, [
|
|
953
953
|
e,
|
|
954
954
|
t,
|
|
@@ -962,21 +962,21 @@ var Jr = class {
|
|
|
962
962
|
return !0;
|
|
963
963
|
}
|
|
964
964
|
beforeRestoreEach(e) {
|
|
965
|
-
this[
|
|
965
|
+
this[je].push(e);
|
|
966
966
|
}
|
|
967
967
|
removeBeforeRestoreEach(e) {
|
|
968
|
-
const t = this[
|
|
969
|
-
return t !== -1 ? (this[
|
|
968
|
+
const t = this[je].indexOf(e);
|
|
969
|
+
return t !== -1 ? (this[je].splice(t, 1), !0) : !1;
|
|
970
970
|
}
|
|
971
971
|
[mr]() {
|
|
972
972
|
const e = this[Qe]() ?? "/", t = this.storage.getItem(pr);
|
|
973
973
|
if (t) try {
|
|
974
974
|
const n = JSON.parse(t);
|
|
975
975
|
if (n.mark === e && Array.isArray(n.routes) && n.routes.length > 0) {
|
|
976
|
-
const o = n.routes.filter((
|
|
976
|
+
const o = n.routes.filter((l, a) => (l.params = l.params ? Ir(l.params) : {}, this[vr](l, a, e, n.routes)));
|
|
977
977
|
if (o.length > 0) {
|
|
978
|
-
const
|
|
979
|
-
o[
|
|
978
|
+
const l = this[Et](), a = o.length - 1;
|
|
979
|
+
o[a].query = l || o[a].query, this[xe](o);
|
|
980
980
|
return;
|
|
981
981
|
}
|
|
982
982
|
}
|
|
@@ -985,13 +985,13 @@ var Jr = class {
|
|
|
985
985
|
const r = e.indexOf("!");
|
|
986
986
|
let s;
|
|
987
987
|
r != -1 ? s = e.substring(r + 1) : s = e;
|
|
988
|
-
const i = new
|
|
989
|
-
i.path = s, i.query = this[
|
|
988
|
+
const i = new x();
|
|
989
|
+
i.path = s, i.query = this[Et](), this[xe]([i]);
|
|
990
990
|
}
|
|
991
991
|
[Ze](e, t) {
|
|
992
992
|
try {
|
|
993
993
|
t.forEach((s) => {
|
|
994
|
-
s.params = s.params ?
|
|
994
|
+
s.params = s.params ? Tr(s.params) : {};
|
|
995
995
|
});
|
|
996
996
|
const r = JSON.stringify({
|
|
997
997
|
mark: e,
|
|
@@ -1020,7 +1020,7 @@ var Jr = class {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
return null;
|
|
1022
1022
|
}
|
|
1023
|
-
[
|
|
1023
|
+
[Et]() {
|
|
1024
1024
|
let e = C().location.search;
|
|
1025
1025
|
return e.length > 0 && e.indexOf("?") === 0 && (e = e.substring(1)), e;
|
|
1026
1026
|
}
|
|
@@ -1035,9 +1035,9 @@ var Jr = class {
|
|
|
1035
1035
|
const r = C(), s = r.history.state;
|
|
1036
1036
|
if (gr(s) && s.length > 0) {
|
|
1037
1037
|
let i = !1;
|
|
1038
|
-
for (let
|
|
1039
|
-
const f =
|
|
1040
|
-
if (
|
|
1038
|
+
for (let u = s.length - 1; u >= 0; u--) {
|
|
1039
|
+
const f = x.from(s[u]);
|
|
1040
|
+
if (x.isSame(f, e)) {
|
|
1041
1041
|
i = !0;
|
|
1042
1042
|
break;
|
|
1043
1043
|
}
|
|
@@ -1048,33 +1048,33 @@ var Jr = class {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
const n = this.backTimeout;
|
|
1050
1050
|
let o = null;
|
|
1051
|
-
const
|
|
1052
|
-
r.history.go(-1), o = setTimeout(
|
|
1053
|
-
},
|
|
1051
|
+
const l = () => {
|
|
1052
|
+
r.history.go(-1), o = setTimeout(l, n);
|
|
1053
|
+
}, a = () => {
|
|
1054
1054
|
clearTimeout(o);
|
|
1055
|
-
const
|
|
1056
|
-
if (gr(
|
|
1057
|
-
let f =
|
|
1058
|
-
const c =
|
|
1059
|
-
if (
|
|
1055
|
+
const u = C().history.state;
|
|
1056
|
+
if (gr(u) && u.length > 0) {
|
|
1057
|
+
let f = u.length;
|
|
1058
|
+
const c = u[f - 1], h = x.from(c);
|
|
1059
|
+
if (x.isSame(h, e))
|
|
1060
1060
|
return t(), !0;
|
|
1061
1061
|
if (f > 0) {
|
|
1062
1062
|
let y = !1;
|
|
1063
1063
|
for (let d = f - 1; d >= 0; d--) {
|
|
1064
|
-
const m =
|
|
1065
|
-
if (!(m.traceless === !0 ||
|
|
1064
|
+
const m = x.from(u[d]);
|
|
1065
|
+
if (!(m.traceless === !0 || Ye(this.traceless, m)) && x.isSame(m, e)) {
|
|
1066
1066
|
y = !0;
|
|
1067
1067
|
break;
|
|
1068
1068
|
}
|
|
1069
1069
|
}
|
|
1070
1070
|
return y ? (setTimeout(() => {
|
|
1071
|
-
o = setTimeout(
|
|
1071
|
+
o = setTimeout(l, n), this.go(-1, a);
|
|
1072
1072
|
}, 0), !0) : (t(), !0);
|
|
1073
1073
|
}
|
|
1074
1074
|
}
|
|
1075
1075
|
return t(), !0;
|
|
1076
1076
|
};
|
|
1077
|
-
o = setTimeout(
|
|
1077
|
+
o = setTimeout(l, n), this.go(-1, a);
|
|
1078
1078
|
} else t();
|
|
1079
1079
|
}
|
|
1080
1080
|
setRouteMark(e) {
|
|
@@ -1082,21 +1082,21 @@ var Jr = class {
|
|
|
1082
1082
|
this[Ze](t, e.routes);
|
|
1083
1083
|
}
|
|
1084
1084
|
push(e) {
|
|
1085
|
-
const t = this[
|
|
1086
|
-
e.currentRoute.historyUpdatePolicy !== "traceless" && !
|
|
1085
|
+
const t = this[Pt](e.currentRoute);
|
|
1086
|
+
e.currentRoute.historyUpdatePolicy !== "traceless" && !Ye(this.traceless, e.currentRoute) && C().history.pushState(e.routes, "", t), this.setRouteMark(e);
|
|
1087
1087
|
}
|
|
1088
1088
|
replace(e) {
|
|
1089
|
-
const t = this[
|
|
1090
|
-
(e.currentRoute.historyUpdatePolicy !== "traceless" || !
|
|
1089
|
+
const t = this[Pt](e.currentRoute);
|
|
1090
|
+
(e.currentRoute.historyUpdatePolicy !== "traceless" || !Ye(this.traceless, e.currentRoute)) && C().history.replaceState(e.routes, "", t), this.setRouteMark(e);
|
|
1091
1091
|
}
|
|
1092
|
-
[
|
|
1092
|
+
[Pt](e) {
|
|
1093
1093
|
const t = C();
|
|
1094
1094
|
let r = "";
|
|
1095
1095
|
if (e.query) {
|
|
1096
1096
|
let o = "";
|
|
1097
|
-
if (typeof e.query == "object") for (let
|
|
1098
|
-
let
|
|
1099
|
-
o.length > 0 && (o += "&"), o +=
|
|
1097
|
+
if (typeof e.query == "object") for (let l of Reflect.ownKeys(e.query)) {
|
|
1098
|
+
let a = encodeURIComponent(e.query[l]), u = `${encodeURIComponent(String(l))}=${a}`;
|
|
1099
|
+
o.length > 0 && (o += "&"), o += u;
|
|
1100
1100
|
}
|
|
1101
1101
|
else o = e.query;
|
|
1102
1102
|
this.query ? (r = o.length > 0 ? `${this.query}&${o}` : this.query, r.length > 0 && r.charAt(0) !== "?" && (r = `?${r}`)) : o.length > 0 && (r = `?${o}`);
|
|
@@ -1160,7 +1160,7 @@ var Vs = class {
|
|
|
1160
1160
|
if (e === null) r = this.cursor + 1;
|
|
1161
1161
|
else for (let s = this.cursor; s >= 0; s--) {
|
|
1162
1162
|
const i = this.queue[s];
|
|
1163
|
-
if (
|
|
1163
|
+
if (x.isSame(i.currentRoute, e)) break;
|
|
1164
1164
|
r++;
|
|
1165
1165
|
}
|
|
1166
1166
|
if (r === 0) {
|
|
@@ -1184,44 +1184,44 @@ var Vs = class {
|
|
|
1184
1184
|
function Ws(e = "", t = 50) {
|
|
1185
1185
|
return new Vs(e, t);
|
|
1186
1186
|
}
|
|
1187
|
-
var
|
|
1187
|
+
var et = /* @__PURE__ */ Symbol("_constructRouteModel"), tt = /* @__PURE__ */ Symbol("_findRouteModel"), _t = /* @__PURE__ */ Symbol("_findRootView"), Js = /* @__PURE__ */ Symbol("_getFirstView"), ue = /* @__PURE__ */ Symbol("_removeView"), br = /* @__PURE__ */ Symbol("_buildPage"), wr = /* @__PURE__ */ Symbol("_resolveComponent"), Rr = /* @__PURE__ */ Symbol("_update"), se = /* @__PURE__ */ Symbol("_merge"), Ft = /* @__PURE__ */ Symbol("_handleHistoryChange"), fe = /* @__PURE__ */ Symbol("_handleRouteUpdated"), rt = /* @__PURE__ */ Symbol("routeUpdatedCallback"), Ct = /* @__PURE__ */ Symbol("currentRoute"), p = /* @__PURE__ */ Symbol("currentRoutes"), st = /* @__PURE__ */ Symbol("routeSessionCacheKey"), xr = /* @__PURE__ */ Symbol("_addRouteRecorder"), Ke = /* @__PURE__ */ Symbol("_removeRouteRecorder"), Le = /* @__PURE__ */ Symbol("_cloneRouteRecorder"), $ = /* @__PURE__ */ Symbol("_handleError"), it = /* @__PURE__ */ Symbol("errorCallback"), D = /* @__PURE__ */ Symbol("registerKey"), nt = /* @__PURE__ */ Symbol("notFoundKey"), At = /* @__PURE__ */ Symbol("notFoundPathKey"), W = /* @__PURE__ */ Symbol("forestKey"), S = /* @__PURE__ */ Symbol("historyKey"), Me = /* @__PURE__ */ Symbol("beforeFiltersKey"), ke = /* @__PURE__ */ Symbol("afterFiltersKey"), Te = /* @__PURE__ */ Symbol("destroyFiltersKey"), qt = /* @__PURE__ */ Symbol("propsFilterKey"), ge = /* @__PURE__ */ Symbol("mainDispatcherKey"), $t = /* @__PURE__ */ Symbol("initKey"), ce = /* @__PURE__ */ Symbol("readyKey"), jt = /* @__PURE__ */ Symbol("readyHandlersKey"), ot = /* @__PURE__ */ Symbol("_markReady"), Sr = /* @__PURE__ */ Symbol("_createNextFn"), Kt = /* @__PURE__ */ Symbol("_start"), Lt = /* @__PURE__ */ Symbol("_before"), Mt = /* @__PURE__ */ Symbol("_after"), Er = /* @__PURE__ */ Symbol("_destroy"), kt = /* @__PURE__ */ Symbol("_load"), Ie = /* @__PURE__ */ Symbol("_unload"), Oe = /* @__PURE__ */ Symbol("routerGuardKey");
|
|
1188
1188
|
function zs(e) {
|
|
1189
1189
|
return e.layers.length == 0 || e.layers[0].views.length == 0;
|
|
1190
1190
|
}
|
|
1191
1191
|
var Gs = class {
|
|
1192
1192
|
[D] = new Array();
|
|
1193
1193
|
[nt];
|
|
1194
|
-
[
|
|
1194
|
+
[At] = "*";
|
|
1195
1195
|
[ce] = !1;
|
|
1196
|
-
[
|
|
1196
|
+
[jt] = [];
|
|
1197
1197
|
[W] = new Ds();
|
|
1198
|
-
[
|
|
1198
|
+
[S];
|
|
1199
1199
|
[p] = new Array();
|
|
1200
|
-
[
|
|
1201
|
-
[
|
|
1200
|
+
[Ct] = Lr(null);
|
|
1201
|
+
[st] = /* @__PURE__ */ new WeakMap();
|
|
1202
1202
|
[it] = null;
|
|
1203
|
-
[
|
|
1203
|
+
[rt] = null;
|
|
1204
1204
|
[Me] = new Array();
|
|
1205
|
-
[Te] = new Array();
|
|
1206
1205
|
[ke] = new Array();
|
|
1207
|
-
[
|
|
1206
|
+
[Te] = new Array();
|
|
1207
|
+
[qt] = null;
|
|
1208
1208
|
[ge] = new ct();
|
|
1209
1209
|
[Oe] = new Ns();
|
|
1210
|
-
[
|
|
1210
|
+
[$t] = !1;
|
|
1211
1211
|
get currentRoute() {
|
|
1212
|
-
return ds(this[
|
|
1212
|
+
return ds(this[Ct]);
|
|
1213
1213
|
}
|
|
1214
1214
|
options;
|
|
1215
1215
|
constructor(e) {
|
|
1216
1216
|
this.options = e ?? {}, this.options.notFoundPath && this.setNotFoundPath(this.options.notFoundPath);
|
|
1217
1217
|
let t = this.options.routes || [];
|
|
1218
|
-
this.addRoutes(t), this.options.notFound && this.setNotFoundRoute(this.options.notFound), e.history ? this[
|
|
1218
|
+
this.addRoutes(t), this.options.notFound && this.setNotFoundRoute(this.options.notFound), e.history ? this[S] = e.history : this[S] = Ee ? Us() : Ws(), this[S]?.listen(async (r) => {
|
|
1219
1219
|
let s = !0;
|
|
1220
1220
|
try {
|
|
1221
1221
|
if (typeof r == "string") {
|
|
1222
1222
|
const i = this[I](r);
|
|
1223
|
-
i && await this[
|
|
1224
|
-
} else await this[
|
|
1223
|
+
i && await this[Ft]([i]);
|
|
1224
|
+
} else await this[Ft](r);
|
|
1225
1225
|
} catch (i) {
|
|
1226
1226
|
console.error(i.message, i), s = !1;
|
|
1227
1227
|
}
|
|
@@ -1240,15 +1240,15 @@ var Gs = class {
|
|
|
1240
1240
|
console.error(e);
|
|
1241
1241
|
}
|
|
1242
1242
|
init() {
|
|
1243
|
-
this[
|
|
1243
|
+
this[$t] !== !0 && (this[S]?.init(!this[ce]), this[$t] = !0);
|
|
1244
1244
|
}
|
|
1245
1245
|
isReady() {
|
|
1246
1246
|
return this[ce] ? Promise.resolve() : new Promise((e, t) => {
|
|
1247
|
-
this[
|
|
1247
|
+
this[jt].push([e, t]);
|
|
1248
1248
|
});
|
|
1249
1249
|
}
|
|
1250
1250
|
[ot](e) {
|
|
1251
|
-
this[ce] = !0, this[
|
|
1251
|
+
this[ce] = !0, this[jt].forEach(([t, r]) => {
|
|
1252
1252
|
try {
|
|
1253
1253
|
e ? t() : r();
|
|
1254
1254
|
} catch (s) {
|
|
@@ -1256,16 +1256,19 @@ var Gs = class {
|
|
|
1256
1256
|
}
|
|
1257
1257
|
});
|
|
1258
1258
|
}
|
|
1259
|
-
[
|
|
1259
|
+
[Ft](e) {
|
|
1260
1260
|
try {
|
|
1261
1261
|
if (!e) {
|
|
1262
1262
|
let n = [...this[p]].reverse();
|
|
1263
1263
|
return this[Ie](n), Ee && C().location.reload(), Promise.resolve();
|
|
1264
1264
|
}
|
|
1265
1265
|
let t = null, r = [], s = [], i = 0;
|
|
1266
|
-
for (; i < e.length && i < this[p].length &&
|
|
1266
|
+
for (; i < e.length && i < this[p].length && x.isSame(e[i], this[p][i]); i++)
|
|
1267
1267
|
e[i].active === !0 && e[i].active !== this[p][i].active && (t = e[i]);
|
|
1268
|
-
if (i < e.length
|
|
1268
|
+
if (i < e.length) r = e.slice(i);
|
|
1269
|
+
else if (i === e.length) for (; i < this[p].length && this[p][i].historyUpdatePolicy === "traceless"; i++)
|
|
1270
|
+
r.push(this[p][i]), t = e[i];
|
|
1271
|
+
if (i < this[p].length && (s = this[p].slice(i).reverse()), s.length === 0 && r.length === 0) {
|
|
1269
1272
|
if (t !== null) return this.restore([t]);
|
|
1270
1273
|
} else if (s.length > 0) {
|
|
1271
1274
|
if (this[Ie](s)) {
|
|
@@ -1279,8 +1282,8 @@ var Gs = class {
|
|
|
1279
1282
|
return Promise.resolve();
|
|
1280
1283
|
}
|
|
1281
1284
|
[fe](e = null) {
|
|
1282
|
-
if (this[
|
|
1283
|
-
this[
|
|
1285
|
+
if (this[Ct].value = e, typeof this[rt] == "function") try {
|
|
1286
|
+
this[rt](e);
|
|
1284
1287
|
} catch {
|
|
1285
1288
|
}
|
|
1286
1289
|
}
|
|
@@ -1300,60 +1303,60 @@ var Gs = class {
|
|
|
1300
1303
|
}
|
|
1301
1304
|
r || this[p].push(e);
|
|
1302
1305
|
} else this[p].push(e);
|
|
1303
|
-
this[
|
|
1306
|
+
this[st].set(e, t), this[fe](e);
|
|
1304
1307
|
}
|
|
1305
|
-
[
|
|
1308
|
+
[Le]() {
|
|
1306
1309
|
let e = [];
|
|
1307
1310
|
for (let t of this[p]) {
|
|
1308
|
-
let r =
|
|
1311
|
+
let r = x.clone(t, !0);
|
|
1309
1312
|
e.push(r);
|
|
1310
1313
|
}
|
|
1311
1314
|
return e;
|
|
1312
1315
|
}
|
|
1313
|
-
[
|
|
1316
|
+
[Ke](e) {
|
|
1314
1317
|
if (!this[p]) {
|
|
1315
1318
|
this[fe](null);
|
|
1316
1319
|
return;
|
|
1317
1320
|
}
|
|
1318
1321
|
let t = -1;
|
|
1319
|
-
for (let r = 0; r < this[p].length; r++) if (
|
|
1322
|
+
for (let r = 0; r < this[p].length; r++) if (x.isSame(this[p][r], e)) {
|
|
1320
1323
|
t = r;
|
|
1321
1324
|
break;
|
|
1322
1325
|
}
|
|
1323
1326
|
if (t != -1) {
|
|
1324
1327
|
const r = this[p][t];
|
|
1325
1328
|
this[p].splice(t, 1);
|
|
1326
|
-
const s = this[
|
|
1327
|
-
if (this[
|
|
1329
|
+
const s = this[st].get(r);
|
|
1330
|
+
if (this[st].delete(r), this[Er](r, s), r.opsType === F.Append) {
|
|
1328
1331
|
const i = this[p].length - 1;
|
|
1329
1332
|
this[fe](this[p][i] ?? null);
|
|
1330
1333
|
} else this[fe](null);
|
|
1331
1334
|
} else this[fe](null);
|
|
1332
1335
|
}
|
|
1333
1336
|
set historyMonitor(e) {
|
|
1334
|
-
this[
|
|
1337
|
+
this[S] && (this[S].historyMonitor = e);
|
|
1335
1338
|
}
|
|
1336
1339
|
get historyMonitor() {
|
|
1337
|
-
return this[
|
|
1340
|
+
return this[S] ? this[S].historyMonitor : !1;
|
|
1338
1341
|
}
|
|
1339
1342
|
set traceless(e) {
|
|
1340
|
-
this[
|
|
1343
|
+
this[S] && (this[S].traceless = e);
|
|
1341
1344
|
}
|
|
1342
1345
|
get traceless() {
|
|
1343
|
-
return this[
|
|
1346
|
+
return this[S]?.traceless ?? !1;
|
|
1344
1347
|
}
|
|
1345
1348
|
set propsFilter(e) {
|
|
1346
|
-
this[
|
|
1349
|
+
this[qt] = e;
|
|
1347
1350
|
}
|
|
1348
1351
|
get propsFilter() {
|
|
1349
|
-
return this[
|
|
1352
|
+
return this[qt];
|
|
1350
1353
|
}
|
|
1351
1354
|
setRestorePoint() {
|
|
1352
|
-
const e = this[
|
|
1353
|
-
this[
|
|
1355
|
+
const e = this[Le]();
|
|
1356
|
+
this[S]?.setRestorePoint(e);
|
|
1354
1357
|
}
|
|
1355
1358
|
onRouteUpdated(e) {
|
|
1356
|
-
this[
|
|
1359
|
+
this[rt] = e;
|
|
1357
1360
|
}
|
|
1358
1361
|
onError(e) {
|
|
1359
1362
|
this[it] = e;
|
|
@@ -1366,41 +1369,41 @@ var Gs = class {
|
|
|
1366
1369
|
return t !== -1 ? (this[Me].splice(t, 1), !0) : !1;
|
|
1367
1370
|
}
|
|
1368
1371
|
afterEach(e) {
|
|
1369
|
-
this[
|
|
1372
|
+
this[ke].push(e);
|
|
1370
1373
|
}
|
|
1371
1374
|
removeAfterEach(e) {
|
|
1372
|
-
const t = this[
|
|
1373
|
-
return t !== -1 ? (this[
|
|
1375
|
+
const t = this[ke].indexOf(e);
|
|
1376
|
+
return t !== -1 ? (this[ke].splice(t, 1), !0) : !1;
|
|
1374
1377
|
}
|
|
1375
1378
|
destroyEach(e) {
|
|
1376
|
-
this[
|
|
1379
|
+
this[Te].push(e);
|
|
1377
1380
|
}
|
|
1378
1381
|
removeDestroyEach(e) {
|
|
1379
|
-
const t = this[
|
|
1380
|
-
return t !== -1 ? (this[
|
|
1382
|
+
const t = this[Te].indexOf(e);
|
|
1383
|
+
return t !== -1 ? (this[Te].splice(t, 1), !0) : !1;
|
|
1381
1384
|
}
|
|
1382
1385
|
beforeRestoreEach(e) {
|
|
1383
|
-
this[
|
|
1386
|
+
this[S]?.beforeRestoreEach(e);
|
|
1384
1387
|
}
|
|
1385
1388
|
removeBeforeRestoreEach(e) {
|
|
1386
|
-
return this[
|
|
1389
|
+
return this[S]?.removeBeforeRestoreEach(e) ?? !1;
|
|
1387
1390
|
}
|
|
1388
1391
|
addRoutes(e) {
|
|
1389
1392
|
for (let t of e) this.addRoute(t);
|
|
1390
1393
|
}
|
|
1391
1394
|
addRoute(e, t = -1) {
|
|
1392
|
-
if (e.path === this[
|
|
1395
|
+
if (e.path === this[At]) {
|
|
1393
1396
|
this.setNotFoundRoute(e);
|
|
1394
1397
|
return;
|
|
1395
1398
|
}
|
|
1396
|
-
const r = this[
|
|
1399
|
+
const r = this[et](e);
|
|
1397
1400
|
if (t == -1) this[D] = [...this[D], ...r];
|
|
1398
1401
|
else for (let s = r.length - 1; s >= 0; s--) this[D].splice(t, 0, r[s]);
|
|
1399
1402
|
}
|
|
1400
1403
|
removeRoute(e) {
|
|
1401
1404
|
const t = this[I](e);
|
|
1402
1405
|
if (t === null)
|
|
1403
|
-
return console.warn("[Fox]
|
|
1406
|
+
return console.warn("[Fox]Illegal routing format", e), !1;
|
|
1404
1407
|
for (let r = 0; r < this[D].length; r++) {
|
|
1405
1408
|
const s = this[D][r];
|
|
1406
1409
|
if (t?.path && s.path === t.path)
|
|
@@ -1412,86 +1415,86 @@ var Gs = class {
|
|
|
1412
1415
|
}
|
|
1413
1416
|
hasRoute(e) {
|
|
1414
1417
|
const t = this[I](e);
|
|
1415
|
-
return t === null ? (console.warn("[Fox]
|
|
1418
|
+
return t === null ? (console.warn("[Fox]Illegal routing format", e), !1) : this[D].findIndex((r) => {
|
|
1416
1419
|
if (t?.path && r.path === t.path || t?.name && r.name === t.name) return !0;
|
|
1417
1420
|
}) !== -1;
|
|
1418
1421
|
}
|
|
1419
1422
|
setNotFoundPath(e) {
|
|
1420
|
-
this[
|
|
1423
|
+
this[At] = e;
|
|
1421
1424
|
}
|
|
1422
1425
|
setNotFoundRoute(e) {
|
|
1423
|
-
const t = this[
|
|
1426
|
+
const t = this[et](e);
|
|
1424
1427
|
this[nt] = t[0];
|
|
1425
1428
|
}
|
|
1426
1429
|
getRoutes() {
|
|
1427
1430
|
return [...this[D]];
|
|
1428
1431
|
}
|
|
1429
|
-
[
|
|
1432
|
+
[et](e) {
|
|
1430
1433
|
let t = e.path ?? "";
|
|
1431
1434
|
t.length > 0 && t.charAt(0) !== "/" && (t = `/${t}`);
|
|
1432
1435
|
let r = e.components ?? (e.component && { "": e.component });
|
|
1433
1436
|
if (!r) {
|
|
1434
|
-
const
|
|
1435
|
-
return
|
|
1437
|
+
const l = new bt();
|
|
1438
|
+
return l.path = t, l.redirect = e.redirect, [l];
|
|
1436
1439
|
}
|
|
1437
|
-
const s = new
|
|
1440
|
+
const s = new x();
|
|
1438
1441
|
s.path = t, s.name = e.name, s.meta = e.meta;
|
|
1439
1442
|
let i = [];
|
|
1440
|
-
for (let
|
|
1441
|
-
const
|
|
1442
|
-
|
|
1443
|
-
const
|
|
1444
|
-
i.push(
|
|
1443
|
+
for (let l in r) {
|
|
1444
|
+
const a = r[l];
|
|
1445
|
+
l.length === 0 && (l = Ur);
|
|
1446
|
+
const u = new Bs(l, a, e.props);
|
|
1447
|
+
i.push(u);
|
|
1445
1448
|
}
|
|
1446
1449
|
let n = !1, o = [];
|
|
1447
|
-
if (e.children) for (let
|
|
1448
|
-
const
|
|
1449
|
-
for (let
|
|
1450
|
-
let f = new
|
|
1451
|
-
f.name =
|
|
1452
|
-
let c = new
|
|
1453
|
-
c.models = [...i], f.layers = [c, ...
|
|
1450
|
+
if (e.children) for (let l of e.children) {
|
|
1451
|
+
const a = this[et](l);
|
|
1452
|
+
for (let u of a) {
|
|
1453
|
+
let f = new bt();
|
|
1454
|
+
f.name = u.name, u.path && u.path.length > 0 ? t !== "/" ? f.path = `${t}${u.path}` : f.path = u.path : (n = !0, f.path = t);
|
|
1455
|
+
let c = new dr();
|
|
1456
|
+
c.models = [...i], f.layers = [c, ...u.layers], f.matchedRoutes = [s, ...u.matchedRoutes ?? []], o.push(f);
|
|
1454
1457
|
}
|
|
1455
1458
|
}
|
|
1456
1459
|
if (!n) {
|
|
1457
|
-
const
|
|
1458
|
-
|
|
1459
|
-
const
|
|
1460
|
-
|
|
1460
|
+
const l = new dr();
|
|
1461
|
+
l.models = i;
|
|
1462
|
+
const a = new bt();
|
|
1463
|
+
a.name = e.name, a.path = t, a.matchedRoutes = [s], a.layers = [l], o.splice(0, 0, a);
|
|
1461
1464
|
}
|
|
1462
1465
|
return o;
|
|
1463
1466
|
}
|
|
1464
|
-
[
|
|
1467
|
+
[tt](e) {
|
|
1465
1468
|
const t = e.route;
|
|
1466
1469
|
try {
|
|
1467
1470
|
for (let r of this[D]) {
|
|
1468
1471
|
const s = t.path ? t.template ?? t.path : null, i = t.name ? t.template ?? t.name : null;
|
|
1469
1472
|
if (s && r.path) {
|
|
1470
1473
|
let n = r.match;
|
|
1471
|
-
n || (n = r.match =
|
|
1474
|
+
n || (n = r.match = Ts(r.path));
|
|
1472
1475
|
const o = n(s);
|
|
1473
1476
|
if (!o) continue;
|
|
1474
1477
|
if (r.redirect) {
|
|
1475
|
-
const
|
|
1476
|
-
|
|
1477
|
-
const
|
|
1478
|
-
route:
|
|
1478
|
+
const l = new x();
|
|
1479
|
+
j(!0, l, t), l.path = r.redirect;
|
|
1480
|
+
const a = {
|
|
1481
|
+
route: l,
|
|
1479
1482
|
find: void 0
|
|
1480
1483
|
};
|
|
1481
|
-
return this[
|
|
1484
|
+
return this[tt](a) ? (e.route = a.route, e.find = a.find, t.template && e.find && (e.find = { ...e.find }, e.find.path = t.path), !0) : !1;
|
|
1482
1485
|
}
|
|
1483
|
-
if (t.params = t.params ?? {},
|
|
1484
|
-
const
|
|
1485
|
-
if (typeof
|
|
1486
|
-
const
|
|
1487
|
-
for (let f of
|
|
1486
|
+
if (t.params = t.params ?? {}, j(!0, t.params, o.params), t.query) {
|
|
1487
|
+
const l = t.query;
|
|
1488
|
+
if (typeof l == "string") {
|
|
1489
|
+
const a = {}, u = l.split("&");
|
|
1490
|
+
for (let f of u) {
|
|
1488
1491
|
const c = f.split("=");
|
|
1489
1492
|
if (c.length !== 2) continue;
|
|
1490
1493
|
const h = decodeURIComponent(c[0].trim());
|
|
1491
|
-
|
|
1494
|
+
a[h] = decodeURIComponent(c[1].trim());
|
|
1492
1495
|
}
|
|
1493
|
-
|
|
1494
|
-
} else typeof
|
|
1496
|
+
j(!0, t.params, a);
|
|
1497
|
+
} else typeof l == "object" && j(!0, t.params, l);
|
|
1495
1498
|
}
|
|
1496
1499
|
return e.find = r, t.template && e.find && (e.find = { ...e.find }, e.find.path = t.path), !0;
|
|
1497
1500
|
} else if (i === r.name)
|
|
@@ -1505,9 +1508,9 @@ var Gs = class {
|
|
|
1505
1508
|
[I](e) {
|
|
1506
1509
|
let t = null;
|
|
1507
1510
|
if (Array.isArray(e))
|
|
1508
|
-
if (t = new
|
|
1509
|
-
else for (let r = 0; r < e.length; r++) r === 0 ? e[r].charAt(0) === "/" ? t.path = e[r] : t.name = e[r] : r === 1 ? t.params = e[r] : r === 2 ? t.root = e[r] : r === 3 &&
|
|
1510
|
-
else typeof e == "object" ? t =
|
|
1511
|
+
if (t = new x(), typeof e[0] == "object") t = x.from(e[0]);
|
|
1512
|
+
else for (let r = 0; r < e.length; r++) r === 0 ? e[r].charAt(0) === "/" ? t.path = e[r] : t.name = e[r] : r === 1 ? t.params = e[r] : r === 2 ? t.root = e[r] : r === 3 && j(!1, t, e[r]);
|
|
1513
|
+
else typeof e == "object" ? t = x.from(e) : typeof e == "string" && (t = new x(), e.charAt(0) == "/" ? t.path = e : t.name = e);
|
|
1511
1514
|
if (t) {
|
|
1512
1515
|
if (t.path) {
|
|
1513
1516
|
let r = t.path.indexOf("?");
|
|
@@ -1541,65 +1544,68 @@ var Gs = class {
|
|
|
1541
1544
|
s.resolve(), r(!1);
|
|
1542
1545
|
return;
|
|
1543
1546
|
}
|
|
1544
|
-
let i = -1, n = null, o = [];
|
|
1547
|
+
let i = -1, n = null, o = [], l = this[p].length - 1, a = l !== -1 ? this[p][l] : null;
|
|
1545
1548
|
if (e) {
|
|
1546
|
-
if (n = e.root ?? "default", e.all) for (let
|
|
1547
|
-
const
|
|
1548
|
-
if (
|
|
1549
|
-
const
|
|
1550
|
-
if (n && n !==
|
|
1551
|
-
o.splice(0, 0,
|
|
1549
|
+
if (n = e.root ?? "default", e.all) for (let f = l; f > 0; f--) {
|
|
1550
|
+
const c = this[p][f];
|
|
1551
|
+
if (c.opsType === F.Append) {
|
|
1552
|
+
const h = c.root ?? "default";
|
|
1553
|
+
if (n && n !== h) continue;
|
|
1554
|
+
o.splice(0, 0, c), i = f - 1;
|
|
1552
1555
|
}
|
|
1553
1556
|
}
|
|
1554
|
-
else if (e.until) for (let
|
|
1555
|
-
let
|
|
1556
|
-
if (
|
|
1557
|
-
if (e.until.charAt(0) === "/" && e.until ===
|
|
1558
|
-
i =
|
|
1557
|
+
else if (e.until) for (let f = l; f > 0; f--) {
|
|
1558
|
+
let c = this[p][f];
|
|
1559
|
+
if (c.opsType === F.Append && c.root === n) {
|
|
1560
|
+
if (e.until.charAt(0) === "/" && e.until === c.path) {
|
|
1561
|
+
i = f;
|
|
1559
1562
|
break;
|
|
1560
|
-
} else if (e.until ===
|
|
1561
|
-
i =
|
|
1563
|
+
} else if (e.until === c.name) {
|
|
1564
|
+
i = f;
|
|
1562
1565
|
break;
|
|
1563
1566
|
}
|
|
1564
|
-
o.splice(0, 0,
|
|
1567
|
+
o.splice(0, 0, c);
|
|
1565
1568
|
}
|
|
1566
1569
|
}
|
|
1567
|
-
else if (e.to) for (let
|
|
1568
|
-
const
|
|
1569
|
-
if (
|
|
1570
|
-
const
|
|
1571
|
-
if (n && n !==
|
|
1572
|
-
if (o.splice(0, 0,
|
|
1573
|
-
i =
|
|
1570
|
+
else if (e.to) for (let f = l; f > 0; f--) {
|
|
1571
|
+
const c = this[p][f];
|
|
1572
|
+
if (c.opsType === F.Append) {
|
|
1573
|
+
const h = c.root ?? "default";
|
|
1574
|
+
if (n && n !== h) continue;
|
|
1575
|
+
if (o.splice(0, 0, c), e.to.charAt(0) === "/" && e.to === c.path) {
|
|
1576
|
+
i = f - 1;
|
|
1574
1577
|
break;
|
|
1575
|
-
} else if (e.to ===
|
|
1576
|
-
i =
|
|
1578
|
+
} else if (e.to === c.name) {
|
|
1579
|
+
i = f - 1;
|
|
1577
1580
|
break;
|
|
1578
1581
|
}
|
|
1579
1582
|
}
|
|
1580
1583
|
}
|
|
1581
|
-
} else for (let
|
|
1582
|
-
let
|
|
1583
|
-
if (
|
|
1584
|
-
o.push(
|
|
1584
|
+
} else for (let f = l; f > 0; f--) {
|
|
1585
|
+
let c = this[p][f];
|
|
1586
|
+
if (c.opsType === F.Append) {
|
|
1587
|
+
o.push(c), i = f - 1;
|
|
1585
1588
|
break;
|
|
1586
1589
|
}
|
|
1587
1590
|
}
|
|
1588
1591
|
if (i === -1 || o.length === 0) {
|
|
1589
|
-
const
|
|
1590
|
-
console.warn(
|
|
1592
|
+
const f = "[Fox]can not find route";
|
|
1593
|
+
console.warn(f), s.resolve(f), r(!1);
|
|
1591
1594
|
return;
|
|
1592
1595
|
}
|
|
1593
|
-
|
|
1594
|
-
if (
|
|
1596
|
+
const u = i !== -1 ? this[p][i] : null;
|
|
1597
|
+
if (this[Ie](o)) {
|
|
1595
1598
|
if (t === !1)
|
|
1596
1599
|
return s.resolve(), r(!0), !0;
|
|
1597
|
-
const
|
|
1598
|
-
if (u &&
|
|
1599
|
-
|
|
1600
|
+
const f = () => (s.resolve(), r(!0), !0), c = this[p].length;
|
|
1601
|
+
if (u && x.isSame(u, this[p][c - 1])) {
|
|
1602
|
+
if (a?.historyUpdatePolicy === "traceless") {
|
|
1603
|
+
const h = new St(x.clone(u, !0), this[Le]());
|
|
1604
|
+
this[S]?.replace(h), f();
|
|
1605
|
+
} else this[S]?.goBack(u, f);
|
|
1600
1606
|
return;
|
|
1601
1607
|
}
|
|
1602
|
-
|
|
1608
|
+
f();
|
|
1603
1609
|
}
|
|
1604
1610
|
} catch (i) {
|
|
1605
1611
|
this[$](i), s.resolve(), r(!1);
|
|
@@ -1654,18 +1660,18 @@ var Gs = class {
|
|
|
1654
1660
|
return r == null ? (this[$]("route forbid", t), this) : (this[ge].post((s) => {
|
|
1655
1661
|
try {
|
|
1656
1662
|
let i = this[Kt](t);
|
|
1657
|
-
this[
|
|
1658
|
-
const
|
|
1663
|
+
this[Lt](i), this[kt](i), this[Mt](i), i.wait((n, o) => {
|
|
1664
|
+
const l = n.session.to;
|
|
1659
1665
|
if (n.session.updateResult && n.session.updateResult.status === "success") try {
|
|
1660
|
-
const
|
|
1661
|
-
|
|
1662
|
-
} catch (
|
|
1663
|
-
console.error(
|
|
1666
|
+
const a = new St(x.clone(l, !0), this[Le]());
|
|
1667
|
+
l.historyUpdatePolicy === "replace" ? this[S]?.replace(a) : l.historyUpdatePolicy === "traceless" ? this[S]?.setRouteMark(a) : this[S]?.push(a);
|
|
1668
|
+
} catch (a) {
|
|
1669
|
+
console.error(a.message, a);
|
|
1664
1670
|
}
|
|
1665
1671
|
if (Ge.clear(n.session), this[Oe].release(r), typeof t.success == "function") try {
|
|
1666
1672
|
Reflect.apply(t.success, {}, []);
|
|
1667
|
-
} catch (
|
|
1668
|
-
console.error(
|
|
1673
|
+
} catch (a) {
|
|
1674
|
+
console.error(a.message, a);
|
|
1669
1675
|
}
|
|
1670
1676
|
this[ce] === !1 && this[ot](!0), i = null, s.resolve();
|
|
1671
1677
|
}, (n, o) => {
|
|
@@ -1677,7 +1683,7 @@ var Gs = class {
|
|
|
1677
1683
|
}), this);
|
|
1678
1684
|
}
|
|
1679
1685
|
back(e = 1) {
|
|
1680
|
-
this[
|
|
1686
|
+
this[S]?.go(-e, !1);
|
|
1681
1687
|
}
|
|
1682
1688
|
[Sr](e) {
|
|
1683
1689
|
return (t, r) => {
|
|
@@ -1699,7 +1705,7 @@ var Gs = class {
|
|
|
1699
1705
|
route: e,
|
|
1700
1706
|
find: null
|
|
1701
1707
|
};
|
|
1702
|
-
if (this[
|
|
1708
|
+
if (this[tt](r), r.find) {
|
|
1703
1709
|
t.routeModel = r.find, e.matched = r.find.matchedRoutes ?? [];
|
|
1704
1710
|
const s = {};
|
|
1705
1711
|
if (Array.isArray(r.find?.matchedRoutes)) for (let i = 0; i < r.find.matchedRoutes.length; i++) {
|
|
@@ -1710,7 +1716,7 @@ var Gs = class {
|
|
|
1710
1716
|
}
|
|
1711
1717
|
return new ct(t);
|
|
1712
1718
|
}
|
|
1713
|
-
[
|
|
1719
|
+
[Lt](e) {
|
|
1714
1720
|
for (let t of this[Me]) e.post((r) => {
|
|
1715
1721
|
const s = this[Sr](r);
|
|
1716
1722
|
Reflect.apply(t, {}, [
|
|
@@ -1721,9 +1727,9 @@ var Gs = class {
|
|
|
1721
1727
|
]);
|
|
1722
1728
|
});
|
|
1723
1729
|
}
|
|
1724
|
-
[
|
|
1730
|
+
[Mt](e) {
|
|
1725
1731
|
e.post((t) => {
|
|
1726
|
-
for (let r of this[
|
|
1732
|
+
for (let r of this[ke]) try {
|
|
1727
1733
|
Reflect.apply(r, {}, [
|
|
1728
1734
|
t.session.to,
|
|
1729
1735
|
t.session.from,
|
|
@@ -1736,14 +1742,14 @@ var Gs = class {
|
|
|
1736
1742
|
});
|
|
1737
1743
|
}
|
|
1738
1744
|
[Er](e, t) {
|
|
1739
|
-
for (let r of this[
|
|
1745
|
+
for (let r of this[Te]) try {
|
|
1740
1746
|
Reflect.apply(r, {}, [e, t]);
|
|
1741
1747
|
} catch (s) {
|
|
1742
1748
|
console.error(s.message, s);
|
|
1743
1749
|
}
|
|
1744
1750
|
typeof e.destroy == "function" && Reflect.apply(e.destroy, e, []);
|
|
1745
1751
|
}
|
|
1746
|
-
[
|
|
1752
|
+
[kt](e) {
|
|
1747
1753
|
e.post((t) => {
|
|
1748
1754
|
const r = t.session.to;
|
|
1749
1755
|
let s = t.session.routeModel;
|
|
@@ -1752,7 +1758,7 @@ var Gs = class {
|
|
|
1752
1758
|
route: r,
|
|
1753
1759
|
find: null
|
|
1754
1760
|
};
|
|
1755
|
-
if (this[
|
|
1761
|
+
if (this[tt](n)) s = n.find, t.session.routeModel = s;
|
|
1756
1762
|
else if (this[nt]) s = this[nt];
|
|
1757
1763
|
else {
|
|
1758
1764
|
t.reject(`not find route model, path:${r.path ?? r.name}`);
|
|
@@ -1760,7 +1766,7 @@ var Gs = class {
|
|
|
1760
1766
|
}
|
|
1761
1767
|
}
|
|
1762
1768
|
const i = Ge.from(t.session);
|
|
1763
|
-
this[
|
|
1769
|
+
this[br](r, s, i).then((n) => {
|
|
1764
1770
|
this[W], t.session.updateResult = n ?? {
|
|
1765
1771
|
status: "success",
|
|
1766
1772
|
message: ""
|
|
@@ -1774,7 +1780,7 @@ var Gs = class {
|
|
|
1774
1780
|
if (e.length == 0) return !0;
|
|
1775
1781
|
let t = this[W], r = [];
|
|
1776
1782
|
for (let s of e) {
|
|
1777
|
-
let i = this[
|
|
1783
|
+
let i = this[_t](t, s);
|
|
1778
1784
|
i != null && r.push({
|
|
1779
1785
|
...i,
|
|
1780
1786
|
route: s
|
|
@@ -1788,14 +1794,14 @@ var Gs = class {
|
|
|
1788
1794
|
}, [s.route.index ?? 0], !0);
|
|
1789
1795
|
return !0;
|
|
1790
1796
|
}
|
|
1791
|
-
[
|
|
1797
|
+
[_t](e, t) {
|
|
1792
1798
|
const r = t.root ?? "default";
|
|
1793
1799
|
let s;
|
|
1794
1800
|
for (let i = 0; i < e.layers.length; i++) {
|
|
1795
1801
|
const n = e.layers[i];
|
|
1796
1802
|
for (let o = n.views.length - 1; o >= 0; o--) {
|
|
1797
|
-
const
|
|
1798
|
-
if (
|
|
1803
|
+
const l = n.views[o];
|
|
1804
|
+
if (l[G] && l[at] === r)
|
|
1799
1805
|
return s = {
|
|
1800
1806
|
x: o,
|
|
1801
1807
|
y: i
|
|
@@ -1809,35 +1815,35 @@ var Gs = class {
|
|
|
1809
1815
|
}
|
|
1810
1816
|
[ue](e, t, r = null, s = !0) {
|
|
1811
1817
|
if (t.y >= e.layers.length || t.x >= e.layers[t.y].views.length) return;
|
|
1812
|
-
let i = e.layers[t.y].views[t.x], n = !1, o = [],
|
|
1813
|
-
for (let f =
|
|
1814
|
-
let c =
|
|
1815
|
-
(!r || r.indexOf(c.index) != -1) && (c.route && i[G] && (this[
|
|
1818
|
+
let i = e.layers[t.y].views[t.x], n = !1, o = [], l = !1, a = [...i.slots.value];
|
|
1819
|
+
for (let f = a.length - 1; f >= 0; f--) {
|
|
1820
|
+
let c = a[f];
|
|
1821
|
+
(!r || r.indexOf(c.index) != -1) && (c.route && i[G] && (this[Ke](c.route), c.active === !0 && c.route.opsType == F.Append && (l = !0)), o.push(new O(i, c.index, t.y)), a.splice(f, 1));
|
|
1816
1822
|
}
|
|
1817
|
-
if (
|
|
1823
|
+
if (a.length == 0) s ? i.slots.value = a : e.layers[t.y].views.splice(t.x, 1);
|
|
1818
1824
|
else {
|
|
1819
|
-
if (
|
|
1820
|
-
let f =
|
|
1825
|
+
if (l) {
|
|
1826
|
+
let f = a[a.length - 1];
|
|
1821
1827
|
f.active = !0, f.route && (f.route.active = f.active);
|
|
1822
1828
|
}
|
|
1823
|
-
i.slots.value =
|
|
1829
|
+
i.slots.value = a;
|
|
1824
1830
|
}
|
|
1825
1831
|
e.layers[t.y].views.length == 0 && (n = !0);
|
|
1826
|
-
let
|
|
1827
|
-
for (;
|
|
1828
|
-
let f = e.layers[
|
|
1832
|
+
let u = t.y + 1;
|
|
1833
|
+
for (; u < e.layers.length; u++) {
|
|
1834
|
+
let f = e.layers[u].views, c = [];
|
|
1829
1835
|
for (let h = f.length - 1; (n || o.length > 0) && h >= 0; h--) {
|
|
1830
1836
|
let y = f[h];
|
|
1831
1837
|
if (y[ye] && (n || O.include(o, y[ye]))) {
|
|
1832
1838
|
let d = y.slots.value;
|
|
1833
1839
|
for (let m = d.length - 1; m >= 0; m--) {
|
|
1834
|
-
let
|
|
1835
|
-
|
|
1840
|
+
let b = d[m];
|
|
1841
|
+
b.route && y[G] && this[Ke](b.route), c.push(new O(y, b.index, u)), d.splice(m, 1);
|
|
1836
1842
|
}
|
|
1837
|
-
e.layers[
|
|
1843
|
+
e.layers[u].views.splice(h, 1);
|
|
1838
1844
|
}
|
|
1839
1845
|
}
|
|
1840
|
-
o = c, e.layers[
|
|
1846
|
+
o = c, e.layers[u].views.length == 0 && (n = !0);
|
|
1841
1847
|
}
|
|
1842
1848
|
}
|
|
1843
1849
|
restore(e) {
|
|
@@ -1852,32 +1858,32 @@ var Gs = class {
|
|
|
1852
1858
|
let s = null, i = !1;
|
|
1853
1859
|
for (let n = 0; n < e.length; n++) {
|
|
1854
1860
|
const o = e[n];
|
|
1855
|
-
this[ge].post((
|
|
1856
|
-
const
|
|
1857
|
-
this[
|
|
1858
|
-
s =
|
|
1859
|
-
}, (
|
|
1860
|
-
s = null, f !== null && this[$](f),
|
|
1861
|
+
this[ge].post((l) => {
|
|
1862
|
+
const a = this[Kt](o);
|
|
1863
|
+
this[Lt](a), this[kt](a), this[Mt](a), a.wait((u, f) => {
|
|
1864
|
+
s = u.session.to, i = u.session.redirect, l.resolve();
|
|
1865
|
+
}, (u, f) => {
|
|
1866
|
+
s = null, f !== null && this[$](f), l.resolve();
|
|
1861
1867
|
});
|
|
1862
1868
|
});
|
|
1863
1869
|
}
|
|
1864
1870
|
this[ge].post((n) => {
|
|
1865
1871
|
if (s && i === !0) {
|
|
1866
|
-
const o = new
|
|
1867
|
-
this[
|
|
1872
|
+
const o = new St(x.clone(s, !0), this[Le]());
|
|
1873
|
+
this[S]?.replace(o);
|
|
1868
1874
|
}
|
|
1869
1875
|
n.resolve(), t();
|
|
1870
1876
|
});
|
|
1871
1877
|
});
|
|
1872
1878
|
}
|
|
1873
|
-
async [
|
|
1874
|
-
const s = e.updateType ??
|
|
1875
|
-
await this[
|
|
1879
|
+
async [br](e, t, r) {
|
|
1880
|
+
const s = e.updateType ?? wt.Part;
|
|
1881
|
+
await this[wr](t);
|
|
1876
1882
|
const i = this[Rr](t, e, r, s);
|
|
1877
1883
|
if (i.status === "error") throw Error(i.message);
|
|
1878
1884
|
return i;
|
|
1879
1885
|
}
|
|
1880
|
-
[
|
|
1886
|
+
[wr](e) {
|
|
1881
1887
|
let t = [];
|
|
1882
1888
|
for (let r = 0; r < e.layers.length; r++) {
|
|
1883
1889
|
let s = e.layers[r];
|
|
@@ -1894,11 +1900,11 @@ var Gs = class {
|
|
|
1894
1900
|
message: "illegal route structure(multi root node)"
|
|
1895
1901
|
};
|
|
1896
1902
|
const i = e.layers[0].models[0];
|
|
1897
|
-
let n = this[W], o = zs(n),
|
|
1898
|
-
!o && s ==
|
|
1899
|
-
let
|
|
1900
|
-
if (
|
|
1901
|
-
n.layers.length == 0 && (n.layers[0] = new Rt()), n.layers[0].views.length == 0 ? (
|
|
1903
|
+
let n = this[W], o = zs(n), l = t.root ?? "default", a;
|
|
1904
|
+
!o && s == wt.Part && (a = this[_t](n, t));
|
|
1905
|
+
let u, f = 0;
|
|
1906
|
+
if (a == null || a == null) if (o || s === wt.All)
|
|
1907
|
+
n.layers.length == 0 && (n.layers[0] = new Rt()), n.layers[0].views.length == 0 ? (u = new qe(t.root ?? "default", !0, null), n.layers[0].views = [u]) : u = n.layers[0].views[0], a = {
|
|
1902
1908
|
x: 0,
|
|
1903
1909
|
y: 0
|
|
1904
1910
|
};
|
|
@@ -1931,29 +1937,29 @@ var Gs = class {
|
|
|
1931
1937
|
status: "error",
|
|
1932
1938
|
message: "can not insert view(not find root node ref)"
|
|
1933
1939
|
};
|
|
1934
|
-
|
|
1940
|
+
u = new qe(l, !0, y), n.layers[h].views.push(u), a = {
|
|
1935
1941
|
x: n.layers[h].views.length - 1,
|
|
1936
1942
|
y: h
|
|
1937
1943
|
};
|
|
1938
1944
|
}
|
|
1939
|
-
else
|
|
1940
|
-
if (f =
|
|
1945
|
+
else u = n.layers[a.y].views[a.x];
|
|
1946
|
+
if (f = a.y, u[G] = !0, t.opsType === F.Append) {
|
|
1941
1947
|
t.index = t.index ?? De.get(), t.active = !0;
|
|
1942
|
-
let c =
|
|
1948
|
+
let c = u.slots.value;
|
|
1943
1949
|
if (c.length > 0) {
|
|
1944
|
-
let
|
|
1945
|
-
|
|
1950
|
+
let b = c[c.length - 1];
|
|
1951
|
+
b.active = !1, b.route && (b.route.active = b.active);
|
|
1946
1952
|
}
|
|
1947
1953
|
let h = new re(t, i, t.index, !0);
|
|
1948
|
-
|
|
1949
|
-
let y = f + 1, d = 1, m = new O(
|
|
1954
|
+
u.slots.value = [...c, h];
|
|
1955
|
+
let y = f + 1, d = 1, m = new O(u, t.index, f);
|
|
1950
1956
|
this[se](n, y, e, d, m);
|
|
1951
1957
|
} else if (t.opsType === F.Open) {
|
|
1952
|
-
let c =
|
|
1958
|
+
let c = u.slots.value;
|
|
1953
1959
|
const h = t.active ?? !0;
|
|
1954
1960
|
let y = !1;
|
|
1955
1961
|
for (let d of c) {
|
|
1956
|
-
if (d.route !== null &&
|
|
1962
|
+
if (d.route !== null && x.isSamePathForRoute(d.route, t)) {
|
|
1957
1963
|
if (d.active === h)
|
|
1958
1964
|
return t.index = d.index, t.active = h, d.route = t, {
|
|
1959
1965
|
status: "noChange",
|
|
@@ -1967,42 +1973,42 @@ var Gs = class {
|
|
|
1967
1973
|
t.index = t.index ?? De.get(), t.active = h;
|
|
1968
1974
|
let d = new re(t, i, t.index, h);
|
|
1969
1975
|
c.push(d);
|
|
1970
|
-
let m = f + 1,
|
|
1971
|
-
this[se](n, m, e,
|
|
1976
|
+
let m = f + 1, b = 1, g = new O(u, t.index, f);
|
|
1977
|
+
this[se](n, m, e, b, g);
|
|
1972
1978
|
}
|
|
1973
|
-
|
|
1979
|
+
u.slots.value = [...c];
|
|
1974
1980
|
} else {
|
|
1975
|
-
let c =
|
|
1981
|
+
let c = u.slots.value;
|
|
1976
1982
|
if (c.length == 0) {
|
|
1977
|
-
t.index = t.index ?? De.get(), t.active = !0,
|
|
1978
|
-
let h = f + 1, y = 1, d = new O(
|
|
1983
|
+
t.index = t.index ?? De.get(), t.active = !0, u.slots.value = [new re(t, i, t.index)];
|
|
1984
|
+
let h = f + 1, y = 1, d = new O(u, t.index, f);
|
|
1979
1985
|
this[se](n, h, e, y, d);
|
|
1980
1986
|
} else {
|
|
1981
1987
|
let h = c[0];
|
|
1982
1988
|
if (h.model !== i) {
|
|
1983
|
-
this[ue](n,
|
|
1984
|
-
let y = f + 1, d = 1, m = new O(
|
|
1989
|
+
this[ue](n, a, null, !0), t.index = t.index ?? De.get(), t.active = !0, u.slots.value = [new re(t, i, t.index)];
|
|
1990
|
+
let y = f + 1, d = 1, m = new O(u, t.index, f);
|
|
1985
1991
|
this[se](n, y, e, d, m);
|
|
1986
1992
|
} else {
|
|
1987
|
-
h.route !== null && this[
|
|
1993
|
+
h.route !== null && this[Ke](h.route);
|
|
1988
1994
|
let y = !1;
|
|
1989
1995
|
const d = t.active ?? !0;
|
|
1990
1996
|
h.active !== d && (h.active = d, y = !0), t.active = d, t.index = h.index, h.route = t;
|
|
1991
1997
|
let m = [];
|
|
1992
1998
|
for (let L = 1; L < c.length; L++) m.push(c[L].index);
|
|
1993
|
-
m.length > 0 ? this[ue](n,
|
|
1994
|
-
let
|
|
1995
|
-
for (;
|
|
1999
|
+
m.length > 0 ? this[ue](n, a, m, !0) : y && (u.slots.value = [...c]);
|
|
2000
|
+
let b = [new O(u, t.index, f)], g = f + 1, v = 1, K = new O(u, t.index, f);
|
|
2001
|
+
for (; b.length > 0 && g < n.layers.length && v < e.layers.length; g++, v++) {
|
|
1996
2002
|
let L = [];
|
|
1997
2003
|
for (let M = 0; M < n.layers[g].views.length; M++) {
|
|
1998
2004
|
let q = n.layers[g].views[M];
|
|
1999
|
-
q[ye] && O.include(
|
|
2005
|
+
q[ye] && O.include(b, q[ye]) && L.unshift(M);
|
|
2000
2006
|
}
|
|
2001
2007
|
let Ce = [];
|
|
2002
2008
|
for (let M of L) {
|
|
2003
2009
|
let q = n.layers[g].views[M], oe = e.layers[v].models, ee;
|
|
2004
|
-
for (let
|
|
2005
|
-
ee = oe[
|
|
2010
|
+
for (let k = 0; k < oe.length; k++) if (q.name === oe[k].name) {
|
|
2011
|
+
ee = oe[k];
|
|
2006
2012
|
break;
|
|
2007
2013
|
}
|
|
2008
2014
|
if (!ee) this[ue](n, {
|
|
@@ -2010,25 +2016,25 @@ var Gs = class {
|
|
|
2010
2016
|
y: g
|
|
2011
2017
|
}, null, !1);
|
|
2012
2018
|
else {
|
|
2013
|
-
let
|
|
2014
|
-
if (
|
|
2019
|
+
let k = q.slots.value;
|
|
2020
|
+
if (k.length == 0) {
|
|
2015
2021
|
let Q = 0;
|
|
2016
2022
|
q.slots.value = [new re(null, ee, Q)];
|
|
2017
2023
|
let U = g + 1, V = v + 1;
|
|
2018
|
-
this[se](n, U, e, V,
|
|
2024
|
+
this[se](n, U, e, V, K);
|
|
2019
2025
|
} else {
|
|
2020
|
-
let Q =
|
|
2026
|
+
let Q = k[0];
|
|
2021
2027
|
if (Q.model !== ee) {
|
|
2022
2028
|
this[ue](n, {
|
|
2023
2029
|
x: M,
|
|
2024
2030
|
y: g
|
|
2025
2031
|
}, null, !0), q.slots.value = [new re(null, ee, 0)];
|
|
2026
2032
|
let U = g + 1, V = v + 1;
|
|
2027
|
-
this[se](n, U, e, V,
|
|
2033
|
+
this[se](n, U, e, V, K);
|
|
2028
2034
|
} else {
|
|
2029
|
-
q[G] && Q.route !== null && this[
|
|
2035
|
+
q[G] && Q.route !== null && this[Ke](Q.route);
|
|
2030
2036
|
let U = [];
|
|
2031
|
-
for (let V = 1; V <
|
|
2037
|
+
for (let V = 1; V < k.length; V++) U.push(k[V].index);
|
|
2032
2038
|
U.length > 0 && this[ue](n, {
|
|
2033
2039
|
x: M,
|
|
2034
2040
|
y: g
|
|
@@ -2038,15 +2044,15 @@ var Gs = class {
|
|
|
2038
2044
|
q[G] = !1;
|
|
2039
2045
|
}
|
|
2040
2046
|
}
|
|
2041
|
-
|
|
2047
|
+
b = Ce;
|
|
2042
2048
|
}
|
|
2043
|
-
this[se](n, g, e, v,
|
|
2049
|
+
this[se](n, g, e, v, K);
|
|
2044
2050
|
}
|
|
2045
2051
|
}
|
|
2046
2052
|
}
|
|
2047
|
-
if (
|
|
2048
|
-
let c =
|
|
2049
|
-
c && (t.slot = new Os(
|
|
2053
|
+
if (u && u[z]) {
|
|
2054
|
+
let c = u[z];
|
|
2055
|
+
c && (t.slot = new Os(l, f, c?.view.name, c?.index ?? 0));
|
|
2050
2056
|
}
|
|
2051
2057
|
return r.to = void 0, r.routeModel = void 0, this[xr](t, r), {
|
|
2052
2058
|
status: "success",
|
|
@@ -2056,27 +2062,27 @@ var Gs = class {
|
|
|
2056
2062
|
[se](e, t, r, s, i) {
|
|
2057
2063
|
let n = s, o = t;
|
|
2058
2064
|
for (; o < e.layers.length && n < r.layers.length; o++, n++) {
|
|
2059
|
-
let
|
|
2060
|
-
for (let
|
|
2061
|
-
let
|
|
2062
|
-
|
|
2065
|
+
let l = e.layers[o].views;
|
|
2066
|
+
for (let a of r.layers[n].models) {
|
|
2067
|
+
let u = new qe(a.name, !1, i), f = new re(null, a);
|
|
2068
|
+
u.slots.value = [f], l.push(u);
|
|
2063
2069
|
}
|
|
2064
2070
|
}
|
|
2065
2071
|
for (; n < r.layers.length; n++) {
|
|
2066
|
-
let
|
|
2067
|
-
|
|
2068
|
-
for (let
|
|
2069
|
-
let
|
|
2070
|
-
|
|
2072
|
+
let l = new Rt();
|
|
2073
|
+
l.views = [];
|
|
2074
|
+
for (let a of r.layers[n].models) {
|
|
2075
|
+
let u = new qe(a.name, !1, i), f = new re(null, a);
|
|
2076
|
+
u.slots.value = [f], l.views.push(u);
|
|
2071
2077
|
}
|
|
2072
|
-
e.layers.push(
|
|
2078
|
+
e.layers.push(l);
|
|
2073
2079
|
}
|
|
2074
2080
|
}
|
|
2075
2081
|
[Vr](e, t, r, s, i, n) {
|
|
2076
2082
|
if (t < 0 || t > this[W].layers.length) return null;
|
|
2077
2083
|
if (t < this[W].layers.length) {
|
|
2078
|
-
let
|
|
2079
|
-
for (let c of
|
|
2084
|
+
let u = this[W].layers[t], f = null;
|
|
2085
|
+
for (let c of u.views) {
|
|
2080
2086
|
let h = !1;
|
|
2081
2087
|
if (r !== null ? (h = c.name === e && c[z]?.view === r, h && s !== -1 && (h = c[z]?.index === s)) : h = c.name === e, !!h) {
|
|
2082
2088
|
i !== null && (c[ye] = {
|
|
@@ -2089,24 +2095,24 @@ var Gs = class {
|
|
|
2089
2095
|
}
|
|
2090
2096
|
if (f !== null) return f;
|
|
2091
2097
|
}
|
|
2092
|
-
let o = null,
|
|
2098
|
+
let o = null, l = null;
|
|
2093
2099
|
i !== null && (i[G] ? o = {
|
|
2094
2100
|
view: i,
|
|
2095
2101
|
index: n,
|
|
2096
2102
|
level: t - 1
|
|
2097
|
-
} : o = i[z],
|
|
2103
|
+
} : o = i[z], l = {
|
|
2098
2104
|
view: i,
|
|
2099
2105
|
index: n,
|
|
2100
2106
|
level: t - 1
|
|
2101
2107
|
});
|
|
2102
|
-
let
|
|
2103
|
-
if (
|
|
2104
|
-
let
|
|
2105
|
-
|
|
2106
|
-
} else this[W].layers[t].views.push(
|
|
2107
|
-
return
|
|
2108
|
-
}
|
|
2109
|
-
}, Ve = /* @__PURE__ */ Symbol("rk"), Tt = /* @__PURE__ */ Symbol("vd"), Pr = /* @__PURE__ */ Symbol("rv"),
|
|
2108
|
+
let a = new qe(e, !0, o);
|
|
2109
|
+
if (a[ye] = l, t == this[W].layers.length) {
|
|
2110
|
+
let u = new Rt();
|
|
2111
|
+
u.views = [a], this[W].layers.push(u);
|
|
2112
|
+
} else this[W].layers[t].views.push(a);
|
|
2113
|
+
return a;
|
|
2114
|
+
}
|
|
2115
|
+
}, Ve = /* @__PURE__ */ Symbol("rk"), Tt = /* @__PURE__ */ Symbol("vd"), Pr = /* @__PURE__ */ Symbol("rv"), It = /* @__PURE__ */ Symbol("rvi"), _r = /* @__PURE__ */ Symbol("pv"), Ot = /* @__PURE__ */ Symbol("pvi"), Be = /* @__PURE__ */ Symbol("registerKey"), zr = /* @__PURE__ */ Symbol("lc"), Xs = class {
|
|
2110
2116
|
[Be] = /* @__PURE__ */ new Map();
|
|
2111
2117
|
constructor() {
|
|
2112
2118
|
}
|
|
@@ -2142,13 +2148,15 @@ async function Qs(e, t) {
|
|
|
2142
2148
|
}
|
|
2143
2149
|
}
|
|
2144
2150
|
function Ui(e) {
|
|
2145
|
-
const t =
|
|
2151
|
+
const t = Kr();
|
|
2146
2152
|
if (!t) return !1;
|
|
2147
2153
|
const r = dt();
|
|
2148
2154
|
if (!r) return !1;
|
|
2149
|
-
if (ne.set(t, r), Array.isArray(e))
|
|
2155
|
+
if (ne.set(t, r), Array.isArray(e))
|
|
2156
|
+
for (let s = 0; s < e.length; s++) e[s] && typeof e[s] == "object" && ne.set(e[s], r);
|
|
2150
2157
|
return Fe(() => {
|
|
2151
|
-
if (ne.delete(t), Array.isArray(e))
|
|
2158
|
+
if (ne.delete(t), Array.isArray(e))
|
|
2159
|
+
for (let s = 0; s < e.length; s++) e[s] && typeof e[s] == "object" && ne.delete(e[s]);
|
|
2152
2160
|
}), !0;
|
|
2153
2161
|
}
|
|
2154
2162
|
function Gr(e, t) {
|
|
@@ -2223,11 +2231,11 @@ var Ji = function(e) {
|
|
|
2223
2231
|
function Cr(e, t) {
|
|
2224
2232
|
e.set(Qr, t);
|
|
2225
2233
|
}
|
|
2226
|
-
function
|
|
2234
|
+
function Vt(e) {
|
|
2227
2235
|
const t = Gr(e ?? null, Qr);
|
|
2228
2236
|
return typeof t == "function" ? t() : t;
|
|
2229
2237
|
}
|
|
2230
|
-
var ri = "FoxBeforeEnter", si = "FoxEnter", ii = "FoxLeave", ni = "FoxLeave",
|
|
2238
|
+
var ri = "FoxBeforeEnter", si = "FoxEnter", ii = "FoxLeave", ni = "FoxLeave", Wt = "FoxLeaveEnd";
|
|
2231
2239
|
function Zr(e, t = !1) {
|
|
2232
2240
|
let r = null;
|
|
2233
2241
|
return t ? r = e.showFromClass ?? e.enterFromClass : r = e.enterFromClass, r || (r = e.transitionName, r ? t ? `${r}-show-from` : `${r}-enter-from` : null);
|
|
@@ -2284,7 +2292,7 @@ function mi(e, t = !1) {
|
|
|
2284
2292
|
let r = null;
|
|
2285
2293
|
return t ? r = e.hideCancelled ?? e.leaveCancelled : r = e.leaveCancelled, r;
|
|
2286
2294
|
}
|
|
2287
|
-
function
|
|
2295
|
+
function ir(e) {
|
|
2288
2296
|
let t, r = e.transitionDuration;
|
|
2289
2297
|
return typeof r == "object" ? t = {
|
|
2290
2298
|
enter: r.enter ?? -1,
|
|
@@ -2309,15 +2317,15 @@ function mt(e) {
|
|
|
2309
2317
|
vi(e);
|
|
2310
2318
|
}
|
|
2311
2319
|
function A(e, t) {
|
|
2312
|
-
|
|
2320
|
+
w(e) && Reflect.apply(e, null, t);
|
|
2313
2321
|
}
|
|
2314
2322
|
function rs(e, t, r = -1, s, i, n) {
|
|
2315
2323
|
let o = [];
|
|
2316
|
-
const
|
|
2317
|
-
for (let
|
|
2324
|
+
const l = () => {
|
|
2325
|
+
for (let a of o) Zt(e, a.type, a.listener);
|
|
2318
2326
|
o = [];
|
|
2319
2327
|
};
|
|
2320
|
-
if (
|
|
2328
|
+
if (w(i)) {
|
|
2321
2329
|
if (s !== void 0 && s >= 0) {
|
|
2322
2330
|
setTimeout(() => {
|
|
2323
2331
|
Reflect.apply(i, null, [
|
|
@@ -2328,35 +2336,35 @@ function rs(e, t, r = -1, s, i, n) {
|
|
|
2328
2336
|
}, s);
|
|
2329
2337
|
return;
|
|
2330
2338
|
}
|
|
2331
|
-
const
|
|
2339
|
+
const a = [
|
|
2332
2340
|
"animationend",
|
|
2333
2341
|
"transitionend",
|
|
2334
|
-
|
|
2335
|
-
],
|
|
2336
|
-
(f.target || f.srcElement) === f.currentTarget && (
|
|
2342
|
+
Wt
|
|
2343
|
+
], u = (f) => {
|
|
2344
|
+
(f.target || f.srcElement) === f.currentTarget && (l(), Reflect.apply(i, null, [
|
|
2337
2345
|
e,
|
|
2338
2346
|
t,
|
|
2339
2347
|
r
|
|
2340
2348
|
]));
|
|
2341
2349
|
};
|
|
2342
|
-
|
|
2343
|
-
ft(e, f,
|
|
2350
|
+
a.forEach((f) => {
|
|
2351
|
+
ft(e, f, u), o.push({
|
|
2344
2352
|
type: f,
|
|
2345
|
-
listener:
|
|
2353
|
+
listener: u
|
|
2346
2354
|
});
|
|
2347
2355
|
});
|
|
2348
2356
|
}
|
|
2349
|
-
if (
|
|
2350
|
-
const
|
|
2351
|
-
(f.target || f.srcElement) === f.currentTarget && (
|
|
2357
|
+
if (w(n)) {
|
|
2358
|
+
const a = "animationcancel", u = (f) => {
|
|
2359
|
+
(f.target || f.srcElement) === f.currentTarget && (l(), Reflect.apply(n, null, [
|
|
2352
2360
|
e,
|
|
2353
2361
|
t,
|
|
2354
2362
|
r
|
|
2355
2363
|
]));
|
|
2356
2364
|
};
|
|
2357
|
-
ft(e,
|
|
2358
|
-
type:
|
|
2359
|
-
listener:
|
|
2365
|
+
ft(e, a, u), o.push({
|
|
2366
|
+
type: a,
|
|
2367
|
+
listener: u
|
|
2360
2368
|
});
|
|
2361
2369
|
}
|
|
2362
2370
|
}
|
|
@@ -2378,30 +2386,30 @@ function ss(e, t, r = {}, s, i = -1) {
|
|
|
2378
2386
|
}
|
|
2379
2387
|
function is(e, t, r = {}, s, i, n, o) {
|
|
2380
2388
|
if (!vt(i) && !e) {
|
|
2381
|
-
|
|
2389
|
+
w(o) && o(o, [t]);
|
|
2382
2390
|
return;
|
|
2383
2391
|
}
|
|
2384
|
-
const
|
|
2385
|
-
if (!
|
|
2386
|
-
|
|
2392
|
+
const l = Zr(r, e), a = Yr(r, e), u = oi(r, e), f = ui(r, e), c = fi(r, e), h = ci(r, e);
|
|
2393
|
+
if (!l && !a && !u && !f) {
|
|
2394
|
+
w(o) && o(o, [t]);
|
|
2387
2395
|
return;
|
|
2388
2396
|
}
|
|
2389
2397
|
mt(() => {
|
|
2390
2398
|
rs(t, i, n, s, () => {
|
|
2391
|
-
|
|
2399
|
+
a && Se(t, a), u && Se(t, u), w(c) && A(c, [
|
|
2392
2400
|
t,
|
|
2393
2401
|
e,
|
|
2394
2402
|
i,
|
|
2395
2403
|
n
|
|
2396
|
-
]),
|
|
2404
|
+
]), w(o) && o(o, [t]);
|
|
2397
2405
|
}, () => {
|
|
2398
|
-
|
|
2406
|
+
w(h) && A(h, [
|
|
2399
2407
|
t,
|
|
2400
2408
|
e,
|
|
2401
2409
|
i,
|
|
2402
2410
|
n
|
|
2403
2411
|
]);
|
|
2404
|
-
}),
|
|
2412
|
+
}), l && Se(t, l), u && Pe(t, u), w(f) && A(f, [
|
|
2405
2413
|
t,
|
|
2406
2414
|
e,
|
|
2407
2415
|
i,
|
|
@@ -2422,40 +2430,40 @@ function ns(e, t, r = {}, s, i = -1) {
|
|
|
2422
2430
|
]);
|
|
2423
2431
|
}
|
|
2424
2432
|
}
|
|
2425
|
-
function os(e, t, r = {}, s, i, n, o,
|
|
2433
|
+
function os(e, t, r = {}, s, i, n, o, l) {
|
|
2426
2434
|
if (!vt(n) && !e) {
|
|
2427
|
-
|
|
2435
|
+
w(l) && A(l, [t]), !e && w(i) && i();
|
|
2428
2436
|
return;
|
|
2429
2437
|
}
|
|
2430
|
-
const
|
|
2431
|
-
if (!
|
|
2432
|
-
|
|
2438
|
+
const a = es(r, e), u = ts(r, e), f = li(r, e), c = yi(r, e), h = di(r, e), y = mi(r, e);
|
|
2439
|
+
if (!a && !u && !f && !c) {
|
|
2440
|
+
w(l) && A(l, [t]), !e && w(i) && i();
|
|
2433
2441
|
return;
|
|
2434
2442
|
}
|
|
2435
2443
|
mt(() => {
|
|
2436
2444
|
rs(t, n, o, s, () => {
|
|
2437
2445
|
try {
|
|
2438
|
-
|
|
2446
|
+
u && Se(t, u), f && Se(t, f), w(h) && A(h, [
|
|
2439
2447
|
t,
|
|
2440
2448
|
e,
|
|
2441
2449
|
n,
|
|
2442
2450
|
o
|
|
2443
|
-
]),
|
|
2451
|
+
]), w(l) && A(l, [t]);
|
|
2444
2452
|
} finally {
|
|
2445
|
-
!e &&
|
|
2453
|
+
!e && w(i) && i();
|
|
2446
2454
|
}
|
|
2447
2455
|
}, () => {
|
|
2448
2456
|
try {
|
|
2449
|
-
|
|
2457
|
+
w(y) && A(y, [
|
|
2450
2458
|
t,
|
|
2451
2459
|
e,
|
|
2452
2460
|
n,
|
|
2453
2461
|
o
|
|
2454
|
-
]),
|
|
2462
|
+
]), w(l) && A(l, [t]);
|
|
2455
2463
|
} finally {
|
|
2456
|
-
!e &&
|
|
2464
|
+
!e && w(i) && i();
|
|
2457
2465
|
}
|
|
2458
|
-
}),
|
|
2466
|
+
}), a && Se(t, a), f && Pe(t, f), w(c) && A(c, [
|
|
2459
2467
|
t,
|
|
2460
2468
|
e,
|
|
2461
2469
|
n,
|
|
@@ -2463,8 +2471,8 @@ function os(e, t, r = {}, s, i, n, o, u) {
|
|
|
2463
2471
|
]);
|
|
2464
2472
|
});
|
|
2465
2473
|
}
|
|
2466
|
-
function
|
|
2467
|
-
const i = t.mode ?? "default", n =
|
|
2474
|
+
function Jt(e, t = {}, r, s = -1) {
|
|
2475
|
+
const i = t.mode ?? "default", n = ir(t);
|
|
2468
2476
|
return {
|
|
2469
2477
|
mode: i,
|
|
2470
2478
|
persisted: !1,
|
|
@@ -2474,12 +2482,12 @@ function Wt(e, t = {}, r, s = -1) {
|
|
|
2474
2482
|
enter: (o) => {
|
|
2475
2483
|
is(!1, o, t, n.enter, r, s);
|
|
2476
2484
|
},
|
|
2477
|
-
leave: (o,
|
|
2478
|
-
ns(!1, o, t, r, s), os(!1, o, t, n.leave,
|
|
2485
|
+
leave: (o, l) => {
|
|
2486
|
+
ns(!1, o, t, r, s), os(!1, o, t, n.leave, l, r, s, () => {
|
|
2479
2487
|
e.transition = null;
|
|
2480
2488
|
});
|
|
2481
2489
|
},
|
|
2482
|
-
clone: (o) =>
|
|
2490
|
+
clone: (o) => Jt(e, t, r, s)
|
|
2483
2491
|
};
|
|
2484
2492
|
}
|
|
2485
2493
|
function ls(e) {
|
|
@@ -2489,23 +2497,23 @@ function pi(e, t = {}, r, s, i, n) {
|
|
|
2489
2497
|
if (i === !0) {
|
|
2490
2498
|
const o = ls(e);
|
|
2491
2499
|
if (o == null) return;
|
|
2492
|
-
const
|
|
2493
|
-
ss(!0, o, t, r, s), is(!0, o, t,
|
|
2494
|
-
|
|
2500
|
+
const l = ir(t);
|
|
2501
|
+
ss(!0, o, t, r, s), is(!0, o, t, l.show, r, s, (a) => {
|
|
2502
|
+
w(n) && A(n, [a]);
|
|
2495
2503
|
});
|
|
2496
|
-
} else
|
|
2504
|
+
} else w(n) && A(n, []);
|
|
2497
2505
|
}
|
|
2498
2506
|
function gi(e, t = {}, r, s, i, n) {
|
|
2499
2507
|
if (i === !0) {
|
|
2500
2508
|
const o = ls(e);
|
|
2501
2509
|
if (o == null) return;
|
|
2502
|
-
const
|
|
2503
|
-
ns(!0, o, t, r, s), os(!0, o, t,
|
|
2504
|
-
|
|
2510
|
+
const l = ir(t);
|
|
2511
|
+
ns(!0, o, t, r, s), os(!0, o, t, l.hide, null, r, s, (a) => {
|
|
2512
|
+
w(n) && A(n, [a]);
|
|
2505
2513
|
});
|
|
2506
|
-
} else
|
|
2514
|
+
} else w(n) && A(n, []);
|
|
2507
2515
|
}
|
|
2508
|
-
function
|
|
2516
|
+
function bi(e) {
|
|
2509
2517
|
mt(() => {
|
|
2510
2518
|
for (let t = 0; t < e.length; t++) Reflect.apply(e[t], null, []);
|
|
2511
2519
|
});
|
|
@@ -2522,10 +2530,10 @@ function as(e, t = {}, r, s = -1) {
|
|
|
2522
2530
|
},
|
|
2523
2531
|
leave: (i, n) => {
|
|
2524
2532
|
ze(ii, {}, i), mt(() => {
|
|
2525
|
-
const o = (
|
|
2526
|
-
(
|
|
2533
|
+
const o = (l) => {
|
|
2534
|
+
(l.target || l.srcElement) === l.currentTarget && (Zt(i, Wt, o), n && Reflect.apply(n, null, []), e.transition = null);
|
|
2527
2535
|
};
|
|
2528
|
-
ft(i,
|
|
2536
|
+
ft(i, Wt, o), ze(ni, {}, i);
|
|
2529
2537
|
});
|
|
2530
2538
|
},
|
|
2531
2539
|
clone: (i) => as(e, t, r, s)
|
|
@@ -2534,21 +2542,21 @@ function as(e, t = {}, r, s = -1) {
|
|
|
2534
2542
|
function ie(e, t, r) {
|
|
2535
2543
|
return typeof e == "function" ? Reflect.apply(e, {}, [t, r]) : e;
|
|
2536
2544
|
}
|
|
2537
|
-
function
|
|
2545
|
+
function Bt(e, t) {
|
|
2538
2546
|
if (!e) return null;
|
|
2539
2547
|
const r = e(t);
|
|
2540
2548
|
return r.length === 1 ? r[0] : r;
|
|
2541
2549
|
}
|
|
2542
|
-
function
|
|
2550
|
+
function be(e, t) {
|
|
2543
2551
|
return typeof t == "function" ? t(e) : e;
|
|
2544
2552
|
}
|
|
2545
|
-
var
|
|
2553
|
+
var wi = class {
|
|
2546
2554
|
node;
|
|
2547
2555
|
state;
|
|
2548
2556
|
constructor(e, t) {
|
|
2549
2557
|
this.node = e, this.state = t;
|
|
2550
2558
|
}
|
|
2551
|
-
},
|
|
2559
|
+
}, zt = jr({
|
|
2552
2560
|
name: "RouterView",
|
|
2553
2561
|
inheritAttrs: !1,
|
|
2554
2562
|
props: {
|
|
@@ -2738,94 +2746,94 @@ var bi = class {
|
|
|
2738
2746
|
}
|
|
2739
2747
|
},
|
|
2740
2748
|
setup(e, t) {
|
|
2741
|
-
const r =
|
|
2742
|
-
let
|
|
2743
|
-
if (
|
|
2744
|
-
if (te(Tt, n + 1), te(
|
|
2749
|
+
const r = Kr(), s = e.multi === !0, i = N(Ve, null), n = N(Tt, 0), o = N(Pr, null), l = N(It, -1);
|
|
2750
|
+
let a = null, u = e.modelSlot ?? null;
|
|
2751
|
+
if (u) {
|
|
2752
|
+
if (te(Tt, n + 1), te(It, u.index), te(Ot, u.index), !u.route) {
|
|
2745
2753
|
console.warn("[Fox]child view render error, route not exist");
|
|
2746
2754
|
return;
|
|
2747
2755
|
}
|
|
2748
|
-
const c = lt(
|
|
2749
|
-
c && (Zs(c), Cr(c, () =>
|
|
2756
|
+
const c = lt(u, !0);
|
|
2757
|
+
c && (Zs(c), Cr(c, () => u?.route ?? null));
|
|
2750
2758
|
} else {
|
|
2751
2759
|
if (i == null) {
|
|
2752
2760
|
console.error("[Fox]router is not been injected");
|
|
2753
2761
|
return;
|
|
2754
2762
|
}
|
|
2755
|
-
const c = e.name, h = N(_r, null), y = N(
|
|
2756
|
-
if (
|
|
2757
|
-
te(_r,
|
|
2758
|
-
const d =
|
|
2759
|
-
if (d && te(Pr,
|
|
2763
|
+
const c = e.name, h = N(_r, null), y = N(Ot, 0);
|
|
2764
|
+
if (a = i[Vr](c, n, o, l, h, y), a === null) return;
|
|
2765
|
+
te(_r, a);
|
|
2766
|
+
const d = a[G] === !0;
|
|
2767
|
+
if (d && te(Pr, a), !s && (te(It, -1), te(Tt, n + 1), te(Ot, -1), d && r)) {
|
|
2760
2768
|
const m = lt(r, !0);
|
|
2761
2769
|
m && Cr(m, () => {
|
|
2762
|
-
const
|
|
2763
|
-
return
|
|
2770
|
+
const b = a?.slots.value ?? [];
|
|
2771
|
+
return b.length > 0 ? b[0].route : null;
|
|
2764
2772
|
});
|
|
2765
2773
|
}
|
|
2766
2774
|
}
|
|
2767
2775
|
const f = { value: /* @__PURE__ */ new Map() };
|
|
2768
2776
|
return Fe(() => {
|
|
2769
|
-
if (f.value && f.value.clear(),
|
|
2770
|
-
const c =
|
|
2771
|
-
c.route = null, c.model = null, c.instance = null,
|
|
2777
|
+
if (f.value && f.value.clear(), u) {
|
|
2778
|
+
const c = u;
|
|
2779
|
+
c.route = null, c.model = null, c.instance = null, u = null;
|
|
2772
2780
|
}
|
|
2773
2781
|
}), () => {
|
|
2774
2782
|
if (s) {
|
|
2775
|
-
const c = /* @__PURE__ */ new Map(), h = [], y =
|
|
2783
|
+
const c = /* @__PURE__ */ new Map(), h = [], y = a?.slots.value, d = [];
|
|
2776
2784
|
for (let g = 0; g < y.length; g++) {
|
|
2777
|
-
const v = y[g],
|
|
2785
|
+
const v = y[g], K = `${e.name}_${v.index}`, L = ie(e.transition, v.route, g) ?? !0, Ce = { modelSlot: v };
|
|
2778
2786
|
let M;
|
|
2779
|
-
t.slots.default ? M = he(
|
|
2787
|
+
t.slots.default ? M = he(zt, Ce, { default: t.slots.default }) : M = he(zt, Ce);
|
|
2780
2788
|
const q = {}, oe = ie(e.viewClass, v.route, g);
|
|
2781
2789
|
typeof oe == "string" && oe.length > 0 && (q[oe] = !0);
|
|
2782
|
-
const ee = ie(e.viewActiveClass, v.route, g),
|
|
2783
|
-
if (typeof ee == "string" && ee.length > 0 && (q[ee] = v.active), typeof
|
|
2784
|
-
const
|
|
2790
|
+
const ee = ie(e.viewActiveClass, v.route, g), k = ie(e.viewInactiveClass, v.route, g), Q = f.value.get(K);
|
|
2791
|
+
if (typeof ee == "string" && ee.length > 0 && (q[ee] = v.active), typeof k == "string" && k.length > 0 && (q[k] = !v.active), Q && v.active !== Q.state) {
|
|
2792
|
+
const nr = Q.node;
|
|
2785
2793
|
v.active ? d.unshift(() => {
|
|
2786
2794
|
const pt = () => {
|
|
2787
2795
|
const Ae = lt(v);
|
|
2788
2796
|
Ae != null && Fr(Ae, yt.ACTIVATED);
|
|
2789
2797
|
};
|
|
2790
|
-
pi(
|
|
2798
|
+
pi(nr, e, v.route, g, L, pt);
|
|
2791
2799
|
}) : d.push(() => {
|
|
2792
2800
|
const pt = () => {
|
|
2793
2801
|
const Ae = lt(v);
|
|
2794
2802
|
Ae != null && Fr(Ae, yt.INACTIVATED);
|
|
2795
2803
|
};
|
|
2796
|
-
gi(
|
|
2804
|
+
gi(nr, e, v.route, g, L, pt);
|
|
2797
2805
|
});
|
|
2798
2806
|
}
|
|
2799
2807
|
const U = {
|
|
2800
2808
|
class: q,
|
|
2801
|
-
key:
|
|
2809
|
+
key: K
|
|
2802
2810
|
}, V = ie(e.viewTagProps, v.route, g);
|
|
2803
|
-
V !== null && typeof V == "object" &&
|
|
2811
|
+
V !== null && typeof V == "object" && j(!0, U, be(V, i?.propsFilter)), v.route?.viewTagAttrs && typeof v.route?.viewTagAttrs == "object" && j(!0, U, be(v.route.viewTagAttrs, i?.propsFilter));
|
|
2804
2812
|
const ve = he(ie(e.viewTag, v.route, g), U, { default: () => [M] });
|
|
2805
|
-
c.set(
|
|
2813
|
+
c.set(K, new wi(ve, v.active)), f.value.delete(K), L === !0 ? ve.transition = Jt(ve, e, v.route, g) : L === "custom" && (ve.transition = as(ve, e, v.route, g)), h.push(ve);
|
|
2806
2814
|
}
|
|
2807
|
-
f.value = c,
|
|
2808
|
-
const m = ie(e.tag, null, -1),
|
|
2809
|
-
return Object.assign(
|
|
2810
|
-
} else if (
|
|
2811
|
-
const c =
|
|
2812
|
-
c.props && (typeof c.props == "object" ?
|
|
2815
|
+
f.value = c, bi(d);
|
|
2816
|
+
const m = ie(e.tag, null, -1), b = {};
|
|
2817
|
+
return Object.assign(b, t.attrs), he(m, b, { default: () => h });
|
|
2818
|
+
} else if (u != null) {
|
|
2819
|
+
const c = u.model, h = {};
|
|
2820
|
+
c.props && (typeof c.props == "object" ? j(!1, h, be(c.props, i?.propsFilter)) : c.props === !0 && typeof u.route?.params == "object" && j(!1, h, be(u.route.params, i?.propsFilter)));
|
|
2813
2821
|
const y = he(c.component, h);
|
|
2814
|
-
return
|
|
2822
|
+
return Bt(t.slots.default, {
|
|
2815
2823
|
Component: y,
|
|
2816
|
-
route:
|
|
2824
|
+
route: u.route
|
|
2817
2825
|
}) ?? y;
|
|
2818
2826
|
} else {
|
|
2819
|
-
const c =
|
|
2827
|
+
const c = a?.slots.value ?? [];
|
|
2820
2828
|
if (c.length > 0) {
|
|
2821
2829
|
const h = c[0], y = h.route, d = h.model, m = {};
|
|
2822
|
-
d.props && (typeof d.props == "object" ?
|
|
2823
|
-
const
|
|
2824
|
-
return (ie(e.transition, y, -1) ?? !0) && (
|
|
2825
|
-
Component:
|
|
2830
|
+
d.props && (typeof d.props == "object" ? j(!1, m, be(d.props, i?.propsFilter)) : d.props === !0 && typeof y?.params == "object" && j(!1, m, be(y.params, i?.propsFilter)));
|
|
2831
|
+
const b = he(d.component, m);
|
|
2832
|
+
return (ie(e.transition, y, -1) ?? !0) && (b.transition = Jt(b, e, y, -1)), Bt(t.slots.default, {
|
|
2833
|
+
Component: b,
|
|
2826
2834
|
route: y
|
|
2827
|
-
}) ??
|
|
2828
|
-
} else return
|
|
2835
|
+
}) ?? b;
|
|
2836
|
+
} else return Bt(t.slots.fallback, {});
|
|
2829
2837
|
}
|
|
2830
2838
|
};
|
|
2831
2839
|
}
|
|
@@ -2842,10 +2850,10 @@ function Ri(e) {
|
|
|
2842
2850
|
function xi(e, t) {
|
|
2843
2851
|
return e == null || t == null ? !1 : !!(e.path && t.path && t.path.startsWith(e.path) || e.name && e.name == t.name);
|
|
2844
2852
|
}
|
|
2845
|
-
function
|
|
2853
|
+
function we(e, t) {
|
|
2846
2854
|
return typeof e == "function" ? Reflect.apply(e, {}, [t]) : e;
|
|
2847
2855
|
}
|
|
2848
|
-
var Si =
|
|
2856
|
+
var Si = jr({
|
|
2849
2857
|
name: "RouterLink",
|
|
2850
2858
|
inheritAttrs: !1,
|
|
2851
2859
|
props: {
|
|
@@ -2894,21 +2902,21 @@ var Si = Kr({
|
|
|
2894
2902
|
setup(e, t) {
|
|
2895
2903
|
const r = N(Ve, null);
|
|
2896
2904
|
return () => {
|
|
2897
|
-
let s =
|
|
2905
|
+
let s = we(e.to, null), i = we(e.tag, s);
|
|
2898
2906
|
if (i == null) {
|
|
2899
2907
|
console.warn("[Fox]can not resolve link tag");
|
|
2900
2908
|
return;
|
|
2901
2909
|
}
|
|
2902
2910
|
let n = null, o = null;
|
|
2903
2911
|
r !== null && (n = r[I](s), e.root && (n.root = e.root), o = r.currentRoute.value);
|
|
2904
|
-
let
|
|
2905
|
-
if (typeof
|
|
2906
|
-
let c =
|
|
2907
|
-
typeof c == "string" && c.length > 0 && (
|
|
2908
|
-
}
|
|
2909
|
-
let
|
|
2910
|
-
(i === "a" || i === "A") && (
|
|
2911
|
-
const f =
|
|
2912
|
+
let l = {}, a = we(e.activeClass, n);
|
|
2913
|
+
if (typeof a == "string" && a.length > 0 && (l[a] = xi(n, o)), we(e.exact, n) === !0) {
|
|
2914
|
+
let c = we(e.exactActiveClass, n);
|
|
2915
|
+
typeof c == "string" && c.length > 0 && (l[c] = x.isSamePathForRoute(n, o));
|
|
2916
|
+
}
|
|
2917
|
+
let u = { class: l };
|
|
2918
|
+
(i === "a" || i === "A") && (u.href = n?.path ?? n?.name ?? "#"), j(!0, u, t.attrs);
|
|
2919
|
+
const f = we(e.event, n);
|
|
2912
2920
|
if (typeof f == "string") {
|
|
2913
2921
|
const c = (h) => {
|
|
2914
2922
|
if (r == null) {
|
|
@@ -2921,9 +2929,9 @@ var Si = Kr({
|
|
|
2921
2929
|
}
|
|
2922
2930
|
Ri(h) && r.to(n);
|
|
2923
2931
|
};
|
|
2924
|
-
|
|
2932
|
+
u[f] = c;
|
|
2925
2933
|
}
|
|
2926
|
-
return he(i,
|
|
2934
|
+
return he(i, u, t.slots);
|
|
2927
2935
|
};
|
|
2928
2936
|
}
|
|
2929
2937
|
}), ut = /* @__PURE__ */ (function(e) {
|
|
@@ -2972,8 +2980,8 @@ var Si = Kr({
|
|
|
2972
2980
|
if (typeof r != "function")
|
|
2973
2981
|
return console.error("[Fox]callback can not be empty"), this;
|
|
2974
2982
|
let s = t - 1, i = new Array(s), n = [].splice.call(e, 0, s);
|
|
2975
|
-
for (let o = 0; o < n.length; o++) this.once(n[o], (
|
|
2976
|
-
i[o] =
|
|
2983
|
+
for (let o = 0; o < n.length; o++) this.once(n[o], (l) => {
|
|
2984
|
+
i[o] = l, s -= 1, s == 0 && Reflect.apply(r, {}, i);
|
|
2977
2985
|
});
|
|
2978
2986
|
return this;
|
|
2979
2987
|
}
|
|
@@ -3041,7 +3049,7 @@ var qr = /* @__PURE__ */ (function(e) {
|
|
|
3041
3049
|
clear() {
|
|
3042
3050
|
this.register.clear(), this.regExpRegisters = [];
|
|
3043
3051
|
}
|
|
3044
|
-
},
|
|
3052
|
+
}, Dt = [
|
|
3045
3053
|
"require",
|
|
3046
3054
|
"exports",
|
|
3047
3055
|
"module"
|
|
@@ -3120,7 +3128,7 @@ var $r = class {
|
|
|
3120
3128
|
}
|
|
3121
3129
|
resloveResource(e) {
|
|
3122
3130
|
if (typeof e == "string") {
|
|
3123
|
-
if (
|
|
3131
|
+
if (Dt.includes(e)) return e;
|
|
3124
3132
|
if (e = this.alias?.[e] ?? e, typeof this.resourceParser == "function") {
|
|
3125
3133
|
const r = this.resloveResource(e);
|
|
3126
3134
|
if (!r) return r;
|
|
@@ -3152,31 +3160,31 @@ var $r = class {
|
|
|
3152
3160
|
const s = [];
|
|
3153
3161
|
let i = e.length - 1, n = null;
|
|
3154
3162
|
typeof e[i] == "function" && (n = e[i], i--);
|
|
3155
|
-
for (let
|
|
3156
|
-
const
|
|
3157
|
-
for (let f = 0; f <
|
|
3158
|
-
const c = this.resloveResource(
|
|
3163
|
+
for (let a = 0; a <= i; a++) if (Array.isArray(e[a])) {
|
|
3164
|
+
const u = e[a];
|
|
3165
|
+
for (let f = 0; f < u.length; f++) {
|
|
3166
|
+
const c = this.resloveResource(u[f]);
|
|
3159
3167
|
s.push(c);
|
|
3160
3168
|
}
|
|
3161
|
-
} else if (typeof e[
|
|
3162
|
-
const
|
|
3163
|
-
s.push(
|
|
3169
|
+
} else if (typeof e[a] == "string") {
|
|
3170
|
+
const u = this.resloveResource(e[a]);
|
|
3171
|
+
s.push(u);
|
|
3164
3172
|
}
|
|
3165
|
-
const o = new qi(s.length, (
|
|
3173
|
+
const o = new qi(s.length, (a, u) => {
|
|
3166
3174
|
if (o.isOK()) try {
|
|
3167
|
-
typeof n == "function" && Reflect.apply(n, {},
|
|
3175
|
+
typeof n == "function" && Reflect.apply(n, {}, u), t(u);
|
|
3168
3176
|
} catch (f) {
|
|
3169
3177
|
console.error(f), r(f);
|
|
3170
3178
|
}
|
|
3171
3179
|
else try {
|
|
3172
|
-
console.error(
|
|
3180
|
+
console.error(a), typeof n == "function" && Reflect.apply(n, {}, []), r(a);
|
|
3173
3181
|
} catch (f) {
|
|
3174
3182
|
console.error(f), r(f);
|
|
3175
3183
|
}
|
|
3176
|
-
}),
|
|
3177
|
-
for (let
|
|
3178
|
-
const
|
|
3179
|
-
this.mount(
|
|
3184
|
+
}), l = new ct();
|
|
3185
|
+
for (let a = 0; a < s.length; a++) {
|
|
3186
|
+
const u = new $i(a, s[a], o);
|
|
3187
|
+
this.mount(l, u);
|
|
3180
3188
|
}
|
|
3181
3189
|
return this;
|
|
3182
3190
|
});
|
|
@@ -3191,19 +3199,19 @@ var $r = class {
|
|
|
3191
3199
|
let i = e.length - 1, n = null;
|
|
3192
3200
|
typeof e[i] == "function" && (n = e[i], i--);
|
|
3193
3201
|
for (let o = 0; o <= i; o++) if (Array.isArray(e[o])) {
|
|
3194
|
-
const
|
|
3195
|
-
for (let
|
|
3196
|
-
const
|
|
3197
|
-
s.push(
|
|
3202
|
+
const l = e[o];
|
|
3203
|
+
for (let a = 0; a < l.length; a++) {
|
|
3204
|
+
const u = this.resloveResource(l[a]);
|
|
3205
|
+
s.push(u);
|
|
3198
3206
|
}
|
|
3199
3207
|
} else if (typeof e[o] == "string") {
|
|
3200
|
-
const
|
|
3201
|
-
s.push(
|
|
3208
|
+
const l = this.resloveResource(e[o]);
|
|
3209
|
+
s.push(l);
|
|
3202
3210
|
}
|
|
3203
3211
|
for (let o = 0; o < s.length; o++) try {
|
|
3204
3212
|
this.unmount(s[o]);
|
|
3205
|
-
} catch (
|
|
3206
|
-
console.error(
|
|
3213
|
+
} catch (l) {
|
|
3214
|
+
console.error(l);
|
|
3207
3215
|
}
|
|
3208
3216
|
typeof n == "function" && Reflect.apply(n, {}, [!0]), t(!0);
|
|
3209
3217
|
});
|
|
@@ -3216,7 +3224,7 @@ var $r = class {
|
|
|
3216
3224
|
return;
|
|
3217
3225
|
}
|
|
3218
3226
|
if (typeof t.resource == "string") {
|
|
3219
|
-
if (
|
|
3227
|
+
if (Dt.includes(t.resource)) {
|
|
3220
3228
|
e.post((i) => {
|
|
3221
3229
|
t.progress.work(!0, t.index, t.resource), i.resolve();
|
|
3222
3230
|
});
|
|
@@ -3248,19 +3256,19 @@ var $r = class {
|
|
|
3248
3256
|
t.progress.work(!0, t.index, n), s.resolve();
|
|
3249
3257
|
return;
|
|
3250
3258
|
}
|
|
3251
|
-
const o = Je(),
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
},
|
|
3259
|
+
const o = Je(), l = o.createElement("link"), a = "onload" in l;
|
|
3260
|
+
a && (l.onload = () => {
|
|
3261
|
+
l.onload = null, l.onerror = null, t.progress.work(!0, t.index, i.path), s.resolve();
|
|
3262
|
+
}, l.onerror = () => {
|
|
3255
3263
|
try {
|
|
3256
|
-
r.removeChild(
|
|
3264
|
+
r.removeChild(l);
|
|
3257
3265
|
} catch (c) {
|
|
3258
3266
|
console.error(c);
|
|
3259
3267
|
}
|
|
3260
|
-
|
|
3268
|
+
l.onload = null, l.onerror = null, t.progress.work(!1, t.index, null), s.reject();
|
|
3261
3269
|
});
|
|
3262
|
-
const
|
|
3263
|
-
f && f.parentNode && f.parentNode.removeChild(f),
|
|
3270
|
+
const u = this.constructResourceUri(i.path), f = o.getElementById(i.path);
|
|
3271
|
+
f && f.parentNode && f.parentNode.removeChild(f), l.rel = "stylesheet", l.type = "text/css", l.id = i.path, l.href = u, r.appendChild(l), a || (t.progress.work(!0, t.index, i.path), s.resolve());
|
|
3264
3272
|
});
|
|
3265
3273
|
}
|
|
3266
3274
|
mountJS(e, t, r) {
|
|
@@ -3276,32 +3284,32 @@ var $r = class {
|
|
|
3276
3284
|
status: H.Loading
|
|
3277
3285
|
};
|
|
3278
3286
|
this.moduleManager.set(i.path, o);
|
|
3279
|
-
const
|
|
3280
|
-
if ("onload" in
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
},
|
|
3287
|
+
const l = Je().createElement("script");
|
|
3288
|
+
if ("onload" in l)
|
|
3289
|
+
l.onload = () => {
|
|
3290
|
+
l.onload = null, l.onerror = null, o.status === H.Loading && (o.status = H.Loaded, t.progress.work(!0, t.index, i.path)), s.resolve();
|
|
3291
|
+
}, l.onerror = () => {
|
|
3284
3292
|
try {
|
|
3285
|
-
r.removeChild(
|
|
3293
|
+
r.removeChild(l);
|
|
3286
3294
|
} catch (h) {
|
|
3287
3295
|
console.error(h);
|
|
3288
3296
|
}
|
|
3289
|
-
|
|
3297
|
+
l.onload = null, l.onerror = null, this.moduleManager.remove(i.path), t.progress.work(!1, t.index, null), s.resolve();
|
|
3290
3298
|
};
|
|
3291
3299
|
else {
|
|
3292
|
-
const h =
|
|
3300
|
+
const h = l;
|
|
3293
3301
|
h.onreadystatechange = () => {
|
|
3294
3302
|
/loaded|complete/.test(h.readyState) && (h.onreadystatechange = null, o.status == H.Loading && (o.status = H.Loaded, t.progress.work(!0, t.index, i.path)), s.resolve());
|
|
3295
3303
|
};
|
|
3296
3304
|
}
|
|
3297
|
-
const
|
|
3298
|
-
|
|
3299
|
-
const
|
|
3300
|
-
|
|
3305
|
+
const a = this.constructResourceUri(i.path);
|
|
3306
|
+
l.defer = !0, l.src = a;
|
|
3307
|
+
const u = C(), f = this.createRequireLoad();
|
|
3308
|
+
u.__require = u.__require ?? u.require, u.require = f;
|
|
3301
3309
|
const c = this.createDefine(o, f, t);
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
}), r.appendChild(
|
|
3310
|
+
u.__define = u.__define ?? u.define, u.define = c, typeof t.progress.finalCallback != "function" && (t.progress.finalCallback = function() {
|
|
3311
|
+
u.require = u.__require, u.__require = void 0, u.define = u.__define, u.__define = void 0;
|
|
3312
|
+
}), r.appendChild(l);
|
|
3305
3313
|
});
|
|
3306
3314
|
}
|
|
3307
3315
|
mountCJS(e, t) {
|
|
@@ -3313,7 +3321,7 @@ var $r = class {
|
|
|
3313
3321
|
}
|
|
3314
3322
|
try {
|
|
3315
3323
|
let n = await Ai(s.path);
|
|
3316
|
-
if (
|
|
3324
|
+
if (er(n) && (n = n.default ?? n), We(n)) {
|
|
3317
3325
|
t.progress.work(!1, t.index, n), r.resolve();
|
|
3318
3326
|
return;
|
|
3319
3327
|
}
|
|
@@ -3356,24 +3364,24 @@ var $r = class {
|
|
|
3356
3364
|
createDefine(e, t, r) {
|
|
3357
3365
|
const s = this, i = function(...n) {
|
|
3358
3366
|
e.status = H.Defining;
|
|
3359
|
-
let o,
|
|
3360
|
-
if (
|
|
3367
|
+
let o, l, a, u = n.length;
|
|
3368
|
+
if (u === 1 ? (a = n[0], o = void 0) : u === 2 ? (a = n[1], Array.isArray(n[0]) ? (l = s.trimEmptyElement(n[0]), o = void 0) : l = void 0) : (o = n[0], l = s.trimEmptyElement(n[1]), a = n[2]), o && (e.id = o, typeof s._alias == "object" && (s._alias[o] = e.src)), l && l.length > 0) s.ensure(l, (...f) => {
|
|
3361
3369
|
try {
|
|
3362
3370
|
const c = f.map((h) => h === "exports" ? ((!e.exports || typeof e.exports != "object") && (e.exports = {}), e.exports) : h === "module" ? e : h === "require" ? t : h);
|
|
3363
|
-
if (typeof
|
|
3364
|
-
const h = Reflect.apply(
|
|
3371
|
+
if (typeof a == "function") {
|
|
3372
|
+
const h = Reflect.apply(a, e, c);
|
|
3365
3373
|
h && typeof h == "object" && (e.exports = h);
|
|
3366
|
-
} else e.exports =
|
|
3374
|
+
} else e.exports = a;
|
|
3367
3375
|
e.status = H.Defined, r.progress.work(!0, r.index, e.exports);
|
|
3368
3376
|
} catch (c) {
|
|
3369
3377
|
console.error(c), r.progress.work(!1, r.index, []);
|
|
3370
3378
|
}
|
|
3371
3379
|
});
|
|
3372
3380
|
else {
|
|
3373
|
-
if (typeof
|
|
3374
|
-
const f = Reflect.apply(
|
|
3381
|
+
if (typeof a == "function") {
|
|
3382
|
+
const f = Reflect.apply(a, e, []);
|
|
3375
3383
|
f && typeof f == "object" && (e.exports = e.exports ?? {}, Object.assign(e.exports, f));
|
|
3376
|
-
} else e.exports =
|
|
3384
|
+
} else e.exports = a;
|
|
3377
3385
|
e.status = H.Defined, r.progress.work(!0, r.index, e.exports);
|
|
3378
3386
|
}
|
|
3379
3387
|
};
|
|
@@ -3384,7 +3392,7 @@ var $r = class {
|
|
|
3384
3392
|
}
|
|
3385
3393
|
constructResourceUri(e) {
|
|
3386
3394
|
try {
|
|
3387
|
-
if (
|
|
3395
|
+
if (Dt.includes(e) || !this.query) return e;
|
|
3388
3396
|
const t = this.createSearch(this.query);
|
|
3389
3397
|
return e.indexOf("?") == -1 ? e += `?${t}` : t.length > 0 && (e += `&${t}`), e;
|
|
3390
3398
|
} catch (t) {
|
|
@@ -3437,9 +3445,9 @@ var $r = class {
|
|
|
3437
3445
|
constructor(e, t, r) {
|
|
3438
3446
|
this.index = e, this.resource = t, this.progress = r;
|
|
3439
3447
|
}
|
|
3440
|
-
},
|
|
3448
|
+
}, Gt = /* @__PURE__ */ Symbol("fk"), Xt = /* @__PURE__ */ Symbol("fbk"), Qt = /* @__PURE__ */ Symbol("fepk");
|
|
3441
3449
|
function Gi(e = {}) {
|
|
3442
|
-
const t = new Gs(e), r = new
|
|
3450
|
+
const t = new Gs(e), r = new cr(), s = new Ar(), i = new $r(), n = {
|
|
3443
3451
|
get router() {
|
|
3444
3452
|
return t;
|
|
3445
3453
|
},
|
|
@@ -3447,7 +3455,7 @@ function Gi(e = {}) {
|
|
|
3447
3455
|
return r;
|
|
3448
3456
|
},
|
|
3449
3457
|
get Bus() {
|
|
3450
|
-
return
|
|
3458
|
+
return cr;
|
|
3451
3459
|
},
|
|
3452
3460
|
get EventProxy() {
|
|
3453
3461
|
return Ar;
|
|
@@ -3465,10 +3473,10 @@ function Gi(e = {}) {
|
|
|
3465
3473
|
return i;
|
|
3466
3474
|
},
|
|
3467
3475
|
get isESModule() {
|
|
3468
|
-
return
|
|
3476
|
+
return er;
|
|
3469
3477
|
},
|
|
3470
|
-
install(o,
|
|
3471
|
-
o.provide(Ve, t), o.provide(
|
|
3478
|
+
install(o, l = {}) {
|
|
3479
|
+
o.provide(Ve, t), o.provide(Gt, n), o.provide(Xt, r), o.provide(Qt, s), l.install !== !1 && (o.component(Pi, zt), o.component(_i, Si)), l.optionsApi !== !1 && (Reflect.defineProperty(o.config.globalProperties, "$fox", { get() {
|
|
3472
3480
|
return n;
|
|
3473
3481
|
} }), Reflect.defineProperty(o.config.globalProperties, "$router", { get() {
|
|
3474
3482
|
return t;
|
|
@@ -3478,23 +3486,23 @@ function Gi(e = {}) {
|
|
|
3478
3486
|
return r;
|
|
3479
3487
|
} }), Reflect.defineProperty(o.config.globalProperties, "$eventProxy", { get() {
|
|
3480
3488
|
return s;
|
|
3481
|
-
} }), o.config.globalProperties.$fox_on = function(
|
|
3482
|
-
s.on(
|
|
3483
|
-
}, o.config.globalProperties.$fox_off = function(
|
|
3484
|
-
s.off(
|
|
3485
|
-
}, o.config.globalProperties.$fox_once = function(
|
|
3486
|
-
s.once(
|
|
3487
|
-
}, o.config.globalProperties.$fox_all = function(...
|
|
3488
|
-
let
|
|
3489
|
-
Reflect.apply(
|
|
3490
|
-
}, o.config.globalProperties.$fox_trigger = function(
|
|
3489
|
+
} }), o.config.globalProperties.$fox_on = function(a, u, f = !1) {
|
|
3490
|
+
s.on(a, u, f);
|
|
3491
|
+
}, o.config.globalProperties.$fox_off = function(a, u) {
|
|
3492
|
+
s.off(a, u);
|
|
3493
|
+
}, o.config.globalProperties.$fox_once = function(a, u) {
|
|
3494
|
+
s.once(a, u);
|
|
3495
|
+
}, o.config.globalProperties.$fox_all = function(...a) {
|
|
3496
|
+
let u = s;
|
|
3497
|
+
Reflect.apply(u.all, u, a);
|
|
3498
|
+
}, o.config.globalProperties.$fox_trigger = function(a, ...u) {
|
|
3491
3499
|
let f = s;
|
|
3492
|
-
Reflect.apply(f.trigger, f, [
|
|
3493
|
-
}, o.config.globalProperties.$fox_emit = function(
|
|
3500
|
+
Reflect.apply(f.trigger, f, [a, ...u]);
|
|
3501
|
+
}, o.config.globalProperties.$fox_emit = function(a, ...u) {
|
|
3494
3502
|
let f = s;
|
|
3495
|
-
Reflect.apply(f.trigger, f, [
|
|
3503
|
+
Reflect.apply(f.trigger, f, [a, ...u]);
|
|
3496
3504
|
}, o.mixin({ setup() {
|
|
3497
|
-
return { $route:
|
|
3505
|
+
return { $route: Vt() };
|
|
3498
3506
|
} })), t.init();
|
|
3499
3507
|
}
|
|
3500
3508
|
};
|
|
@@ -3504,22 +3512,22 @@ function us(e) {
|
|
|
3504
3512
|
return _e() ? N(Ve, null) : e ? e.$?.appContext?.provides?.[Ve] ?? null : null;
|
|
3505
3513
|
}
|
|
3506
3514
|
function Xi(e) {
|
|
3507
|
-
let t =
|
|
3515
|
+
let t = Vt(e);
|
|
3508
3516
|
if (!t && e && !_e()) {
|
|
3509
3517
|
let r = e;
|
|
3510
|
-
for (r = r.$parent; r && (t =
|
|
3518
|
+
for (r = r.$parent; r && (t = Vt(r), !t); )
|
|
3511
3519
|
r = r.$parent;
|
|
3512
3520
|
}
|
|
3513
3521
|
return t;
|
|
3514
3522
|
}
|
|
3515
3523
|
function Qi(e) {
|
|
3516
|
-
return _e() ? N(
|
|
3524
|
+
return _e() ? N(Gt, null) : e ? e.$?.appContext?.provides?.[Gt] ?? null : null;
|
|
3517
3525
|
}
|
|
3518
3526
|
function Zi(e) {
|
|
3519
|
-
return _e() ? N(
|
|
3527
|
+
return _e() ? N(Xt, null) : e ? e.$?.appContext?.provides?.[Xt] ?? null : null;
|
|
3520
3528
|
}
|
|
3521
3529
|
function Yi(e) {
|
|
3522
|
-
return _e() ? N(
|
|
3530
|
+
return _e() ? N(Qt, null) : e ? e.$?.appContext?.provides?.[Qt] ?? null : null;
|
|
3523
3531
|
}
|
|
3524
3532
|
function en(e) {
|
|
3525
3533
|
const t = us();
|
|
@@ -3558,41 +3566,41 @@ function tn(e) {
|
|
|
3558
3566
|
});
|
|
3559
3567
|
}
|
|
3560
3568
|
export {
|
|
3561
|
-
|
|
3569
|
+
cr as Bus,
|
|
3562
3570
|
ct as EventChain,
|
|
3563
3571
|
Ar as EventProxy,
|
|
3564
3572
|
ri as FoxBeforeEnter,
|
|
3565
3573
|
ii as FoxBeforeLeave,
|
|
3566
3574
|
si as FoxEnter,
|
|
3567
3575
|
ni as FoxLeave,
|
|
3568
|
-
|
|
3576
|
+
Wt as FoxLeaveEnd,
|
|
3569
3577
|
F as OperationType,
|
|
3570
|
-
|
|
3578
|
+
x as Route,
|
|
3571
3579
|
Gs as Router,
|
|
3572
3580
|
Si as RouterLink,
|
|
3573
|
-
|
|
3581
|
+
zt as RouterView,
|
|
3574
3582
|
Ui as bindLifecycleContextToCurrentScope,
|
|
3575
3583
|
Gi as createFox,
|
|
3576
3584
|
Ws as createMemoryHistory,
|
|
3577
3585
|
Us as createWebHashHistory,
|
|
3578
3586
|
Ni as createWebHistory,
|
|
3579
3587
|
Wi as deleteContextValue,
|
|
3580
|
-
|
|
3588
|
+
j as extend,
|
|
3581
3589
|
Gr as injectContextValue,
|
|
3582
3590
|
dt as injectLifecycleContext,
|
|
3583
|
-
|
|
3591
|
+
or as isArray,
|
|
3584
3592
|
Mi as isDate,
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3593
|
+
er as isESModule,
|
|
3594
|
+
ar as isEqual,
|
|
3595
|
+
w as isFunction,
|
|
3596
|
+
Ki as isMap,
|
|
3589
3597
|
We as isNil,
|
|
3590
3598
|
gs as isObject,
|
|
3591
|
-
|
|
3599
|
+
ws as isPlainObject,
|
|
3592
3600
|
Ii as isPromise,
|
|
3593
3601
|
Li as isSet,
|
|
3594
|
-
|
|
3595
|
-
|
|
3602
|
+
ki as isString,
|
|
3603
|
+
Ti as isSymbol,
|
|
3596
3604
|
tn as onAfterRouteUpdate,
|
|
3597
3605
|
en as onBeforeRouteUpdate,
|
|
3598
3606
|
Ji as onFoxActivated,
|
|
@@ -3601,10 +3609,10 @@ export {
|
|
|
3601
3609
|
Hi as rawState,
|
|
3602
3610
|
Bi as reactiveState,
|
|
3603
3611
|
Di as shallowReactiveState,
|
|
3604
|
-
|
|
3612
|
+
kr as toBoolean,
|
|
3605
3613
|
Oi as toNumber,
|
|
3606
|
-
|
|
3607
|
-
|
|
3614
|
+
Yt as toTypeString,
|
|
3615
|
+
lr as typeOf,
|
|
3608
3616
|
Zi as useBus,
|
|
3609
3617
|
Yi as useEventProxy,
|
|
3610
3618
|
Qi as useFox,
|