@fox-js/fox 3.1.1-21 → 3.1.1-22

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.esm.js CHANGED
@@ -1,94 +1,82 @@
1
- import { defineComponent as Fr, effectScope as us, getCurrentInstance as Wt, h as ce, inject as G, onUnmounted as ft, provide as te, reactive as fs, readonly as cs, ref as hs, shallowReactive as ys, shallowRef as _r, toRaw as Dt, watch as ds } from "vue";
2
- var me = typeof window < "u", A = function() {
1
+ import { defineComponent as Fr, effectScope as as, getCurrentInstance as Vt, h as ce, inject as G, onUnmounted as ct, provide as te, reactive as us, readonly as fs, ref as cs, shallowReactive as hs, shallowRef as Ar, toRaw as Ot, watch as ys } from "vue";
2
+ var Pe = typeof window < "u", F = function() {
3
3
  return window;
4
- }, He = function() {
4
+ }, Ue = function() {
5
5
  return window.document;
6
6
  };
7
- function ms(e) {
8
- let t = e, r = t.lastIndexOf("/");
9
- return r > 0 && r < t.length - 1 ? t = t.substring(0, r + 1) : r === 0 && t.indexOf(".") !== -1 ? t = "/" : r === -1 && (t.indexOf(".") == -1 ? t = `/${t}/` : t = "/"), t.indexOf("/") !== 0 && (t = `/${t}`), t;
10
- }
11
- function vt() {
12
- if (!me) return "/";
13
- let e = A().location, t = `${e.protocol}//${e.host}`;
14
- return t += ms(e.pathname), t;
15
- }
16
- function nt(e, t, r, s = !1) {
7
+ function ot(e, t, r, s = !1) {
17
8
  e.addEventListener ? e.addEventListener(t, r, s) : e.attachEvent ? e.attachEvent(`on${t}`, r) : e[`on${t}`] = r;
18
9
  }
19
- function Jt(e, t, r) {
10
+ function Wt(e, t, r) {
20
11
  e.removeEventListener ? e.removeEventListener(t, r) : e.detachEvent ? e.detachEvent(`on${t}`, r) : e[`on${t}`] = null;
21
12
  }
22
- var Ue = (e, t, r) => {
13
+ var Ve = (e, t, r) => {
23
14
  t = t ?? {
24
15
  bubbles: !1,
25
16
  cancelable: !1,
26
17
  detail: void 0
27
18
  };
28
19
  const s = document.createEvent("Events");
29
- let n = !0, i = !0;
30
- for (let a in t) a === "bubbles" ? n = !!t[a] : a === "cancelable" ? i = !!t[a] : s[a] = t[a];
31
- s.initEvent(e, n, i), (r ?? document).dispatchEvent(s);
32
- }, tr = Array.isArray, _i = (e) => zt(e) === "[object Map]", $i = (e) => zt(e) === "[object Set]", Ki = (e) => e instanceof Date, w = (e) => typeof e == "function", qi = (e) => typeof e == "string", ji = (e) => typeof e == "symbol", vs = (e) => e !== null && typeof e == "object", Ti = (e) => vs(e) && w(e.then) && w(e.catch), ct = (e) => e == null, ps = Object.prototype.toString, zt = (e) => ps.call(e), gs = (e) => zt(e) === "[object Object]", bs = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
33
- function $r(e) {
34
- return e.__esModule || bs && e[Symbol.toStringTag] === "Module";
35
- }
36
- var ws = typeof Promise < "u" && Promise.toString().indexOf("[native code]") !== -1;
37
- function _(...e) {
38
- let t = e[0] !== void 0 && e[0] !== null ? e[0] : {}, r = 1, s = e.length, n = !1;
39
- for (typeof t == "boolean" && (n = t, t = e[r] ?? {}, r++), typeof t != "object" && (t = {}); r < s; r++) if (e[r] !== null && e[r] !== void 0) {
40
- let i = e[r];
41
- for (let a in i) {
42
- let o = t[a], l = i[a];
43
- if (o !== l)
44
- if (n === !0 && l && typeof l == "object") {
20
+ let i = !0, n = !0;
21
+ for (let a in t) a === "bubbles" ? i = !!t[a] : a === "cancelable" ? n = !!t[a] : s[a] = t[a];
22
+ s.initEvent(e, i, n), (r ?? document).dispatchEvent(s);
23
+ }, er = Array.isArray, Ai = (e) => Jt(e) === "[object Map]", Ki = (e) => Jt(e) === "[object Set]", $i = (e) => e instanceof Date, b = (e) => typeof e == "function", qi = (e) => typeof e == "string", ji = (e) => typeof e == "symbol", ds = (e) => e !== null && typeof e == "object", Mi = (e) => ds(e) && b(e.then) && b(e.catch), He = (e) => e == null, ms = Object.prototype.toString, Jt = (e) => ms.call(e), vs = (e) => Jt(e) === "[object Object]", ps = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
24
+ function zt(e) {
25
+ return e.__esModule || ps && e[Symbol.toStringTag] === "Module";
26
+ }
27
+ var gs = typeof Promise < "u" && Promise.toString().indexOf("[native code]") !== -1;
28
+ function q(...e) {
29
+ let t = e[0] !== void 0 && e[0] !== null ? e[0] : {}, r = 1, s = e.length, i = !1;
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
+ let n = e[r];
32
+ for (let a in n) {
33
+ let l = t[a], o = n[a];
34
+ if (l !== o)
35
+ if (i === !0 && o && typeof o == "object") {
45
36
  let u;
46
- Array.isArray(l) ? u = o && Array.isArray(o) ? o : [] : u = o && typeof o == "object" ? o : {}, t[a] = _(n, u, l);
47
- } else l !== void 0 && (t[a] = l);
37
+ Array.isArray(o) ? u = l && Array.isArray(l) ? l : [] : u = l && typeof l == "object" ? l : {}, t[a] = q(i, u, o);
38
+ } else o !== void 0 && (t[a] = o);
48
39
  }
49
40
  }
50
41
  return t;
51
42
  }
52
- function Gt(e, t, r = !1) {
53
- if (!r) _(!0, e, t);
54
- else {
55
- if (typeof t != "object") return {};
56
- typeof e != "object" && (e = {});
57
- for (let s of Reflect.ownKeys(t)) {
58
- let n = e[s], i = t[s];
59
- if (n !== i)
60
- if (typeof i == "object") {
61
- if (!Array.isArray(i) && !gs(i)) continue;
62
- n = Gt(n, i, r), e[s] = n;
63
- } else {
64
- if (typeof i == "function") continue;
65
- e[s] = i;
66
- }
67
- }
43
+ function Kr(e, t, r = !1) {
44
+ if (typeof t != "object") return {};
45
+ typeof e != "object" && (e = {});
46
+ for (let s of Reflect.ownKeys(t)) {
47
+ let i = e[s], n = t[s];
48
+ if (i !== n)
49
+ if (typeof n == "object") {
50
+ if (!Array.isArray(n) && !vs(n)) continue;
51
+ i = Kr(i, n, r), e[s] = i;
52
+ } else {
53
+ if (typeof n == "function") continue;
54
+ e[s] = n;
55
+ }
68
56
  }
69
57
  return e;
70
58
  }
71
- var Me = class Bt {
59
+ var Oe = class Bt {
72
60
  static seed = (/* @__PURE__ */ new Date()).getTime();
73
61
  static get() {
74
62
  let t = ++Bt.seed;
75
63
  return t >= Number.MAX_VALUE && (Bt.seed = 0), t;
76
64
  }
77
- }, pt = ws ? Promise.resolve() : null;
78
- function De(e, ...t) {
79
- pt !== null ? t && t.length > 0 ? pt.then(() => {
65
+ }, vt = gs ? Promise.resolve() : null;
66
+ function Be(e, ...t) {
67
+ vt !== null ? t && t.length > 0 ? vt.then(() => {
80
68
  e(t);
81
- }) : pt.then(e) : t && t.length > 0 ? setTimeout(() => {
69
+ }) : vt.then(e) : t && t.length > 0 ? setTimeout(() => {
82
70
  e(t);
83
71
  }) : setTimeout(e);
84
72
  }
85
- function Kr(e) {
73
+ function $r(e) {
86
74
  return e == null ? !1 : typeof e == "boolean" ? e : typeof e == "string" ? e.toLocaleLowerCase() === "true" : !!e;
87
75
  }
88
76
  function Li(e) {
89
77
  return typeof e == "number" ? e : Number(e);
90
78
  }
91
- var Rs = {
79
+ var ws = {
92
80
  "[object Boolean]": "boolean",
93
81
  "[object Number]": "number",
94
82
  "[object String]": "string",
@@ -98,28 +86,28 @@ var Rs = {
98
86
  "[object RegExp]": "regExp",
99
87
  "[object Object]": "object"
100
88
  };
101
- function rr(e) {
89
+ function tr(e) {
102
90
  let t = Object.prototype.toString.call(e);
103
- return e == null ? String(e) : Rs[t] || "object";
91
+ return e == null ? String(e) : ws[t] || "object";
104
92
  }
105
- function sr(e, t) {
93
+ function rr(e, t) {
106
94
  if (e == t) return !0;
107
95
  if (e === void 0 || t === void 0) return !1;
108
- let r = rr(e);
109
- if (r !== rr(t)) return !1;
96
+ let r = tr(e);
97
+ if (r !== tr(t)) return !1;
110
98
  if (r === "object") {
111
- let s = Object.keys(e), n = Object.keys(t);
112
- if (s.length !== n.length) return !1;
113
- for (let i = 0; i < s.length; i++) {
114
- let a = s[i], o = e[a], l = t[a];
115
- if (!sr(o, l)) return !1;
99
+ let s = Object.keys(e), i = Object.keys(t);
100
+ if (s.length !== i.length) return !1;
101
+ for (let n = 0; n < s.length; n++) {
102
+ let a = s[n], l = e[a], o = t[a];
103
+ if (!rr(l, o)) return !1;
116
104
  }
117
105
  return !0;
118
106
  } else if (r === "array") {
119
107
  if (e.length !== t.length) return !1;
120
108
  for (let s = 0; s < e.length; s++) {
121
- let n = e[s], i = t[s];
122
- if (!sr(n, i)) return !1;
109
+ let i = e[s], n = t[s];
110
+ if (!rr(i, n)) return !1;
123
111
  }
124
112
  return !0;
125
113
  }
@@ -132,20 +120,20 @@ var qr = (e) => {
132
120
  s && !Array.isArray(s) && typeof s == "object" && (s = qr(s)), typeof r == "symbol" ? t[String(r)] = s : t[r] = s;
133
121
  }
134
122
  return t;
135
- }, Ss = /^Symbol\((.*)\)$/, jr = (e) => {
123
+ }, bs = /^Symbol\((.*)\)$/, jr = (e) => {
136
124
  const t = {};
137
125
  for (let r of Reflect.ownKeys(e)) {
138
126
  let s = e[r];
139
127
  s && !Array.isArray(s) && typeof s == "object" && (s = jr(s));
140
- const n = Ss.exec(r);
141
- if (n && n[1]) {
142
- const i = Symbol.for(n[1]);
143
- t[i] = s;
128
+ const i = bs.exec(r);
129
+ if (i && i[1]) {
130
+ const n = Symbol.for(i[1]);
131
+ t[n] = s;
144
132
  } else t[r] = s;
145
133
  }
146
134
  return t;
147
135
  };
148
- function Tr(e, t) {
136
+ function Mr(e, t) {
149
137
  let r = null;
150
138
  return function(...s) {
151
139
  r && clearTimeout(r), r = setTimeout(() => {
@@ -153,45 +141,45 @@ function Tr(e, t) {
153
141
  }, t);
154
142
  };
155
143
  }
156
- var ir = Symbol("idKey"), ve = Symbol("valueKey"), R = Symbol("childrenKey"), X = Symbol("growKey"), Lr = class {
144
+ var sr = Symbol("idKey"), me = Symbol("valueKey"), R = Symbol("childrenKey"), X = Symbol("growKey"), Lr = class {
157
145
  [X] = !0;
158
- [ir];
159
- [ve] = hs();
146
+ [sr];
147
+ [me] = cs();
160
148
  [R] = /* @__PURE__ */ new Map();
161
149
  constructor(e) {
162
- this[ir] = e;
150
+ this[sr] = e;
163
151
  }
164
- }, xs = class {
152
+ }, Rs = class {
165
153
  get(e, t) {
166
- if (t == "value") return e[ve].value;
154
+ if (t == "value") return e[me].value;
167
155
  if (t === "grow") return e[X];
168
156
  let r = e[R].get(t);
169
- if (r) return Be(r);
157
+ if (r) return De(r);
170
158
  if (e[X])
171
- return r = Qt(t), r[X] = e[X], e[R].set(t, r), Be(r);
159
+ return r = Xt(t), r[X] = e[X], e[R].set(t, r), De(r);
172
160
  }
173
161
  set(e, t, r) {
174
- return t == "value" ? (e[ve].value = r, !0) : t === "grow" ? (e[X] = Kr(r), !0) : r == null ? (e[R].delete(t), !0) : (console.error(`illegal property:${t}`), !1);
162
+ return t == "value" ? (e[me].value = r, !0) : t === "grow" ? (e[X] = $r(r), !0) : r == null ? (e[R].delete(t), !0) : (console.error(`illegal property:${t}`), !1);
175
163
  }
176
164
  deleteProperty(e, t) {
177
165
  return t === "value" || t == "grow" ? (console.error(`can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
178
166
  }
179
- }, Xt = "__proxy__";
180
- function Qt(e) {
167
+ }, Gt = "__proxy__";
168
+ function Xt(e) {
181
169
  const t = new Lr(e);
182
- return Reflect.set(t, Xt, new Proxy(t, new xs())), t;
170
+ return Reflect.set(t, Gt, new Proxy(t, new Rs())), t;
183
171
  }
184
- function Be(e) {
185
- return Reflect.get(e, Xt);
172
+ function De(e) {
173
+ return Reflect.get(e, Gt);
186
174
  }
187
- var Ps = class {
175
+ var Ss = class {
188
176
  name = "";
189
177
  persistPolicy = "memory";
190
178
  storage;
191
179
  initFlag = !1;
192
180
  state = {};
193
181
  constructor(e = {}, t) {
194
- if (e.persistPolicy && e.persistPolicy !== "memory" && ct(e.name)) throw new Error("name can not be empty, where persistPolicy is not memory.");
182
+ if (e.persistPolicy && e.persistPolicy !== "memory" && He(e.name)) throw new Error("name can not be empty, where persistPolicy is not memory.");
195
183
  this.name = e.name ?? "", this.persistPolicy = e.persistPolicy ?? "memory", this.storage = e.storage, t && typeof t == "object" && Object.assign(this.state, t);
196
184
  }
197
185
  init(e) {
@@ -201,8 +189,8 @@ var Ps = class {
201
189
  if (!this.persistPolicy || this.persistPolicy === "memory") return null;
202
190
  let e = null;
203
191
  if (this.persistPolicy === "custom") e = this.storage;
204
- else if (me) {
205
- const t = A();
192
+ else if (Pe) {
193
+ const t = F();
206
194
  e = this.persistPolicy === "session" ? t.sessionStorage : t.localStorage;
207
195
  }
208
196
  return e;
@@ -227,11 +215,11 @@ var Ps = class {
227
215
  if (t === null) return;
228
216
  const r = `_bus_${this.name}`, s = t.getItem(r);
229
217
  if (s) {
230
- const n = JSON.parse(s);
231
- Object.assign(this.state, n), Reflect.ownKeys(this.state).forEach((i) => {
232
- if (typeof i != "string") return;
233
- const a = this.state[i], o = i.split(/\//g);
234
- o.push(a), Reflect.apply(e.put, e, o);
218
+ const i = JSON.parse(s);
219
+ Object.assign(this.state, i), Reflect.ownKeys(this.state).forEach((n) => {
220
+ if (typeof n != "string") return;
221
+ const a = this.state[n], l = n.split(/\//g);
222
+ l.push(a), Reflect.apply(e.put, e, l);
235
223
  });
236
224
  }
237
225
  }
@@ -248,8 +236,8 @@ var Ps = class {
248
236
  if (this.initFlag && this.persistPolicy !== "memory")
249
237
  try {
250
238
  const t = e.length, r = e.slice(0, t - 1).join("/"), s = {};
251
- Reflect.ownKeys(this.state).forEach((n) => {
252
- typeof n == "string" && (n === r || n.startsWith(r) || (s[n] = this.state[n]));
239
+ Reflect.ownKeys(this.state).forEach((i) => {
240
+ typeof i == "string" && (i === r || i.startsWith(r) || (s[i] = this.state[i]));
253
241
  }), this.state = s, this.saveState();
254
242
  } catch (t) {
255
243
  console.error(t);
@@ -263,10 +251,10 @@ var Ps = class {
263
251
  console.error(e);
264
252
  }
265
253
  }
266
- }, Or = class extends Lr {
254
+ }, Tr = class extends Lr {
267
255
  _persistHandler;
268
256
  constructor(e = {}, t) {
269
- super("__root__"), this._persistHandler = new Ps(e, t), this._persistHandler.init(this);
257
+ super("__root__"), this._persistHandler = new Ss(e, t), this._persistHandler.init(this);
270
258
  }
271
259
  put(...e) {
272
260
  let t = e.length;
@@ -274,29 +262,29 @@ var Ps = class {
274
262
  return console.error("参数至少包括一个(key, value)"), !1;
275
263
  let r = this;
276
264
  for (let s = 0; s < t - 1; s++) {
277
- let n = e[s], i;
278
- r[R].has(n) ? i = r[R].get(n) : (i = Qt(n), r[R].set(n, i)), r = i;
265
+ let i = e[s], n;
266
+ r[R].has(i) ? n = r[R].get(i) : (n = Xt(i), r[R].set(i, n)), r = n;
279
267
  }
280
- return r[ve].value = e[t - 1], this._persistHandler.put(e), !0;
268
+ return r[me].value = e[t - 1], this._persistHandler.put(e), !0;
281
269
  }
282
270
  get(...e) {
283
271
  let t = e.length;
284
272
  if (t === 0) return;
285
273
  let r = this;
286
274
  for (let s = 0; s < t; s++) {
287
- let n = e[s];
288
- if (r[R].has(n)) r = r[R].get(n);
275
+ let i = e[s];
276
+ if (r[R].has(i)) r = r[R].get(i);
289
277
  else return;
290
278
  }
291
- return r[ve].value;
279
+ return r[me].value;
292
280
  }
293
281
  remove(...e) {
294
282
  let t = e.length;
295
283
  if (t == 0) return !1;
296
284
  let r = this;
297
- for (let n = 0; n < t - 1; n++) {
298
- const i = e[n];
299
- if (r[R].has(i)) r = r[R].get(i);
285
+ for (let i = 0; i < t - 1; i++) {
286
+ const n = e[i];
287
+ if (r[R].has(n)) r = r[R].get(n);
300
288
  else return !1;
301
289
  }
302
290
  const s = e[t - 1];
@@ -306,9 +294,9 @@ var Ps = class {
306
294
  const t = e.length;
307
295
  if (t == 0) return !1;
308
296
  let r = this;
309
- for (let n = 0; n < t - 1; n++) {
310
- let i = e[n];
311
- if (r[R].has(i)) r = r[R].get(i);
297
+ for (let i = 0; i < t - 1; i++) {
298
+ let n = e[i];
299
+ if (r[R].has(n)) r = r[R].get(n);
312
300
  else return !1;
313
301
  }
314
302
  const s = e[t - 1];
@@ -317,7 +305,7 @@ var Ps = class {
317
305
  clear() {
318
306
  this[R].clear(), this._persistHandler.clear();
319
307
  }
320
- }, Es = [
308
+ }, xs = [
321
309
  "put",
322
310
  "get",
323
311
  "contains",
@@ -325,49 +313,49 @@ var Ps = class {
325
313
  "clear",
326
314
  "_persistHandler"
327
315
  ];
328
- function nr(e) {
329
- return Es.includes(e);
316
+ function ir(e) {
317
+ return xs.includes(e);
330
318
  }
331
- var Cs = class {
319
+ var Ps = class {
332
320
  get(e, t) {
333
- if (t == "value") return e[ve].value;
321
+ if (t == "value") return e[me].value;
334
322
  if (t === "grow") return e[X];
335
323
  if (t === R) return e[R];
336
- if (typeof t == "string" && nr(t)) return e[t];
324
+ if (typeof t == "string" && ir(t)) return e[t];
337
325
  const r = String(t);
338
326
  let s = e[R].get(r);
339
- if (s) return Be(s);
327
+ if (s) return De(s);
340
328
  if (e[X])
341
- return s = Qt(r), s[X] = e[X], e[R].set(r, s), Be(s);
329
+ return s = Xt(r), s[X] = e[X], e[R].set(r, s), De(s);
342
330
  }
343
331
  set(e, t, r) {
344
- return t == "value" ? (e[ve].value = r, !0) : t === "grow" ? (e[X] = Kr(r), !0) : nr(t) ? !1 : r == null ? (e[R].delete(t), !0) : (console.error(`illegal property:${t}`), !1);
332
+ return t == "value" ? (e[me].value = r, !0) : t === "grow" ? (e[X] = $r(r), !0) : ir(t) ? !1 : r == null ? (e[R].delete(t), !0) : (console.error(`illegal property:${t}`), !1);
345
333
  }
346
334
  deleteProperty(e, t) {
347
335
  return t === "value" || t == "grow" ? (console.error(`can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
348
336
  }
349
337
  };
350
- function As(e, t) {
351
- const r = new Or(e, t), s = new Cs(), n = new Proxy(r, s);
352
- return Reflect.set(r, Xt, n), r;
338
+ function Es(e, t) {
339
+ const r = new Tr(e, t), s = new Ps(), i = new Proxy(r, s);
340
+ return Reflect.set(r, Gt, i), r;
353
341
  }
354
- var or = new Proxy(Or, { construct(e, t) {
342
+ var nr = new Proxy(Tr, { construct(e, t) {
355
343
  const r = t[0] ?? {}, s = t[1];
356
- return Be(As(r, s));
357
- } }), Yt = (e) => !e || typeof e != "object" ? !0 : Reflect.ownKeys(e).length === 0, kr = class {
344
+ return De(Es(r, s));
345
+ } }), Qt = (e) => !e || typeof e != "object" ? !0 : Reflect.ownKeys(e).length === 0, kr = class {
358
346
  name = "";
359
347
  persistPolicy = "memory";
360
348
  storage;
361
349
  constructor(e = {}) {
362
- if (e.persistPolicy && e.persistPolicy !== "memory" && ct(e.name)) throw new Error("name can not be empty, where persistPolicy is not memory.");
350
+ if (e.persistPolicy && e.persistPolicy !== "memory" && He(e.name)) throw new Error("name can not be empty, where persistPolicy is not memory.");
363
351
  this.name = e.name ?? "", this.persistPolicy = e.persistPolicy ?? "memory", this.storage = e.storage;
364
352
  }
365
353
  getStorage() {
366
354
  if (!this.persistPolicy || this.persistPolicy === "memory") return null;
367
355
  let e = null;
368
356
  if (this.persistPolicy === "custom") e = this.storage;
369
- else if (me) {
370
- const t = A();
357
+ else if (Pe) {
358
+ const t = F();
371
359
  e = this.persistPolicy === "session" ? t.sessionStorage : t.localStorage;
372
360
  }
373
361
  return e;
@@ -375,7 +363,7 @@ var or = new Proxy(Or, { construct(e, t) {
375
363
  saveState(e) {
376
364
  if (!this.persistPolicy || this.persistPolicy === "memory") return;
377
365
  let t = this.getStorage();
378
- if (t === null || Yt(e)) return;
366
+ if (t === null || Qt(e)) return;
379
367
  const r = `_state_${this.name}`, s = JSON.stringify(e ?? {});
380
368
  t.setItem(r, s);
381
369
  }
@@ -392,92 +380,92 @@ var or = new Proxy(Or, { construct(e, t) {
392
380
  if (t === null) return;
393
381
  const r = `_state_${this.name}`, s = t.getItem(r);
394
382
  if (s) {
395
- const n = JSON.parse(s);
396
- Object.assign(e, n);
383
+ const i = JSON.parse(s);
384
+ Object.assign(e, i);
397
385
  }
398
386
  }
399
387
  };
400
388
  function Ir(e, t, r) {
401
389
  const s = new kr(r);
402
390
  s.restore(t);
403
- const n = (o) => {
404
- const l = Dt(o), u = {};
405
- for (let f in l) {
406
- const c = l[f];
407
- ct(c) || (u[f] = c);
391
+ const i = (l) => {
392
+ const o = Ot(l), u = {};
393
+ for (let f in o) {
394
+ const c = o[f];
395
+ He(c) || (u[f] = c);
408
396
  }
409
- Yt(u) ? s.removeState() : s.saveState(u);
397
+ Qt(u) ? s.removeState() : s.saveState(u);
410
398
  };
411
- let i = null;
412
- r && r.debounce === !1 ? i = n : i = Tr(n, r && r.debounceDelay ? r.debounceDelay : 250);
413
- const a = e ? ys(t) : fs(t);
414
- return us(!0).run(() => {
415
- ds(a, (o) => {
416
- const l = Dt(o);
417
- i(l);
399
+ let n = null;
400
+ r && r.debounce === !1 ? n = i : n = Mr(i, r && r.debounceDelay ? r.debounceDelay : 250);
401
+ const a = e ? hs(t) : us(t);
402
+ return as(!0).run(() => {
403
+ ys(a, (l) => {
404
+ const o = Ot(l);
405
+ n(o);
418
406
  });
419
407
  }), a;
420
408
  }
421
- function Oi(e, t) {
409
+ function Ti(e, t) {
422
410
  return Ir(!1, e, t);
423
411
  }
424
412
  function ki(e, t) {
425
413
  return Ir(!0, e, t);
426
414
  }
427
- function Fs(e, t) {
415
+ function _s(e, t) {
428
416
  const r = new kr(t);
429
417
  r.restore(e);
430
- const s = (i) => {
431
- const a = Dt(i), o = {};
432
- for (let l in a) {
433
- const u = a[l];
434
- ct(u) || (o[l] = u);
418
+ const s = (n) => {
419
+ const a = Ot(n), l = {};
420
+ for (let o in a) {
421
+ const u = a[o];
422
+ He(u) || (l[o] = u);
435
423
  }
436
- Yt(o) ? r.removeState() : r.saveState(o);
424
+ Qt(l) ? r.removeState() : r.saveState(l);
437
425
  };
438
- let n = null;
439
- return t && t.debounce === !1 ? n = s : n = Tr(s, t && t.debounceDelay ? t.debounceDelay : 250), new Proxy(e, {
440
- get(i, a) {
441
- return i[a];
426
+ let i = null;
427
+ return t && t.debounce === !1 ? i = s : i = Mr(s, t && t.debounceDelay ? t.debounceDelay : 250), new Proxy(e, {
428
+ get(n, a) {
429
+ return n[a];
442
430
  },
443
- set(i, a, o) {
444
- return i[a] = o, n(i), !0;
431
+ set(n, a, l) {
432
+ return n[a] = l, i(n), !0;
445
433
  }
446
434
  });
447
435
  }
448
436
  function Ii(e, t) {
449
- return Fs(e, t);
437
+ return _s(e, t);
450
438
  }
451
- var Mr = "default", Dr = Symbol("sync"), M = Symbol("normalizeRoute");
452
- function lr(e) {
439
+ var Or = "default", Br = Symbol("sync"), I = Symbol("normalizeRoute");
440
+ function or(e) {
453
441
  let t = !1;
454
442
  return function(...r) {
455
443
  if (!t)
456
444
  return t = !0, Reflect.apply(e, {}, r);
457
445
  };
458
446
  }
459
- function _s(e) {
447
+ function Cs(e) {
460
448
  let t = e.src;
461
449
  return new Promise((r, s) => {
462
- const n = lr((o) => {
463
- $r(o) && (o = o.default), e.component = o, console.debug("success load async module"), r();
464
- }), i = lr((o) => {
465
- `${o}`, console.debug("reject load async module"), s(o);
450
+ const i = or((l) => {
451
+ zt(l) && (l = l.default), e.component = l, console.debug("success load async module"), r();
452
+ }), n = or((l) => {
453
+ `${l}`, console.debug("reject load async module"), s(l);
466
454
  });
467
455
  let a;
468
456
  try {
469
- a = t(n, i);
470
- } catch (o) {
471
- i(o);
457
+ a = t(i, n);
458
+ } catch (l) {
459
+ n(l);
472
460
  }
473
- if (a) if (typeof a.then == "function") a.then(n, i);
461
+ if (a) if (typeof a.then == "function") a.then(i, n);
474
462
  else {
475
- const o = a.component;
476
- o && typeof o.then == "function" && o.then(n, i);
463
+ const l = a.component;
464
+ l && typeof l.then == "function" && l.then(i, n);
477
465
  }
478
466
  });
479
467
  }
480
- var $s = class {
468
+ var Fs = class {
481
469
  name;
482
470
  level;
483
471
  rootName;
@@ -485,7 +473,7 @@ var $s = class {
485
473
  constructor(e, t, r, s) {
486
474
  this.name = e, this.level = t, this.rootName = r, this.rootIndex = s;
487
475
  }
488
- }, Ve = class Br {
476
+ }, We = class Dr {
489
477
  to;
490
478
  routeModel;
491
479
  from;
@@ -494,13 +482,13 @@ var $s = class {
494
482
  this.to = t, this.from = r;
495
483
  }
496
484
  static from(t) {
497
- const r = new Br(t.to, t.from), s = t.data ?? {};
498
- return _(!0, r.data, s), r;
485
+ const r = new Dr(t.to, t.from), s = t.data ?? {};
486
+ return q(!0, r.data, s), r;
499
487
  }
500
488
  static clear(t) {
501
489
  for (let r in t) t[r] = void 0;
502
490
  }
503
- }, x = class Nt {
491
+ }, x = class Dt {
504
492
  path;
505
493
  get fullPath() {
506
494
  const t = this.path ?? `/${this.name}`;
@@ -526,8 +514,8 @@ var $s = class {
526
514
  active;
527
515
  slot;
528
516
  static clone(t, r) {
529
- let s = new Nt();
530
- return Gt(s, t, r), s;
517
+ let s = new Dt();
518
+ return Kr(s, t, r), s;
531
519
  }
532
520
  static isSame(t, r) {
533
521
  return !t || !r ? !1 : t === r ? !0 : t.root !== r.root || t.index !== r.index ? !1 : t.path && r.path && t.path === r.path ? !0 : !!(t.name && r.name && t.name === r.name);
@@ -536,32 +524,32 @@ var $s = class {
536
524
  return !t || !r ? !1 : t === r || t.path && r.path && t.path === r.path ? !0 : !!(t.name && r.name && t.name === r.name);
537
525
  }
538
526
  static from(t) {
539
- let r = new Nt();
527
+ let r = new Dt();
540
528
  if (t == null) return r;
541
529
  let s = r;
542
- for (let i in t) s[i] = t[i];
543
- const n = Object.getOwnPropertySymbols(t);
544
- if (Array.isArray(n) && n.length > 0) for (let i of n) s[i] = t[i];
530
+ for (let n in t) s[n] = t[n];
531
+ const i = Object.getOwnPropertySymbols(t);
532
+ if (Array.isArray(i) && i.length > 0) for (let n of i) s[n] = t[n];
545
533
  return r;
546
534
  }
547
- }, Ks = class {
535
+ }, As = class {
548
536
  id;
549
537
  name;
550
538
  props;
551
539
  src;
552
540
  component;
553
541
  constructor(e, t, r) {
554
- this.id = Me.get(), this.name = e, this.src = t, typeof t != "function" && (this.component = t), this.props = r;
542
+ this.id = Oe.get(), this.name = e, this.src = t, typeof t != "function" && (this.component = t), this.props = r;
555
543
  }
556
544
  get isResolved() {
557
545
  return this.component !== void 0;
558
546
  }
559
547
  resolve() {
560
- return _s(this);
548
+ return Cs(this);
561
549
  }
562
- }, ar = class {
550
+ }, lr = class {
563
551
  models = [];
564
- }, gt = class {
552
+ }, pt = class {
565
553
  path;
566
554
  match;
567
555
  redirect;
@@ -569,9 +557,9 @@ var $s = class {
569
557
  meta;
570
558
  matchedRoutes;
571
559
  layers = [];
572
- }, F = /* @__PURE__ */ (function(e) {
560
+ }, C = /* @__PURE__ */ (function(e) {
573
561
  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;
574
- })({}), qs = "FoxBeforeEnter", js = "FoxEnter", Ts = "FoxLeave", Ls = "FoxLeave", Ht = "FoxLeaveEnd", ht = Symbol("rk"), bt = Symbol("vd"), ur = Symbol("rv"), wt = Symbol("rvi"), fr = Symbol("pv"), Rt = Symbol("pvi"), Fe = Symbol("registerKey"), Os = class {
562
+ })({}), Ks = "FoxBeforeEnter", $s = "FoxEnter", qs = "FoxLeave", js = "FoxLeave", Ht = "FoxLeaveEnd", ht = Symbol("rk"), gt = Symbol("vd"), ar = Symbol("rv"), wt = Symbol("rvi"), ur = Symbol("pv"), bt = Symbol("pvi"), Fe = Symbol("registerKey"), Ms = class {
575
563
  [Fe] = /* @__PURE__ */ new Map();
576
564
  constructor() {
577
565
  }
@@ -588,26 +576,26 @@ var $s = class {
588
576
  return this[Fe].delete(e);
589
577
  }
590
578
  }, de = Symbol("lc");
591
- function ot(e, t = !1) {
579
+ function lt(e, t = !1) {
592
580
  let r = e;
593
581
  if (Reflect.has(r, de)) return r[de];
594
582
  if (t) {
595
- const s = new Os();
583
+ const s = new Ms();
596
584
  return r[de] = s, s;
597
585
  }
598
586
  return null;
599
587
  }
600
- function Nr(e, t = !1) {
588
+ function Hr(e, t = !1) {
601
589
  let r = null, s = e;
602
590
  for (; s && !(Reflect.has(s, de) && (r = s[de], r)); )
603
591
  s = s.$parent;
604
592
  if (!r && t) {
605
- const n = e;
606
- n && n.$parent && (r = ot(n.$parent, t));
593
+ const i = e;
594
+ i && i.$parent && (r = lt(i.$parent, t));
607
595
  }
608
596
  return r;
609
597
  }
610
- function Hr(e, t) {
598
+ function Nr(e, t) {
611
599
  let r = e;
612
600
  for (; r; ) {
613
601
  if (Reflect.has(r, de)) {
@@ -618,40 +606,40 @@ function Hr(e, t) {
618
606
  }
619
607
  return null;
620
608
  }
621
- function Mi(e, t, r) {
622
- Nr(e, !0)?.set(t, r);
609
+ function Oi(e, t, r) {
610
+ Hr(e, !0)?.set(t, r);
623
611
  }
624
- function Di(e, t) {
625
- Nr(e, !0)?.delete(t);
612
+ function Bi(e, t) {
613
+ Hr(e, !0)?.delete(t);
626
614
  }
627
- function cr(e) {
615
+ function fr(e) {
628
616
  if (Array.isArray(e.children) && e.children.length > 0) {
629
617
  let t = e.children[0];
630
- if (t != null && t.component != null && t.component.proxy != null) return ot(t.component.proxy, !1);
618
+ if (t != null && t.component != null && t.component.proxy != null) return lt(t.component.proxy, !1);
631
619
  }
632
620
  return null;
633
621
  }
634
- var lt = Symbol("hooksKey");
635
- function ks(e) {
636
- let t = e.get(lt);
637
- t || (t = [], e.set(lt, t));
622
+ var at = Symbol("hooksKey");
623
+ function Ls(e) {
624
+ let t = e.get(at);
625
+ t || (t = [], e.set(at, t));
638
626
  }
639
- function hr(e, t) {
640
- let r = e.get(lt);
627
+ function cr(e, t) {
628
+ let r = e.get(at);
641
629
  if (r != null)
642
630
  for (let s = r.length - 1; s >= 0; s--) {
643
- let n = r[s];
644
- if (n.type === t)
631
+ let i = r[s];
632
+ if (i.type === t)
645
633
  try {
646
- Reflect.apply(n.hook, n.target, []);
647
- } catch (i) {
648
- console.error(i.message, i);
634
+ Reflect.apply(i.hook, i.target, []);
635
+ } catch (n) {
636
+ console.error(n.message, n);
649
637
  }
650
638
  }
651
639
  }
652
- var at = /* @__PURE__ */ (function(e) {
640
+ var ut = /* @__PURE__ */ (function(e) {
653
641
  return e.DEACTIVATED = "da", e.ACTIVATED = "a", e;
654
- })({}), Is = class {
642
+ })({}), Ts = class {
655
643
  type;
656
644
  hook;
657
645
  target;
@@ -659,49 +647,49 @@ var at = /* @__PURE__ */ (function(e) {
659
647
  this.target = r, this.hook = t, this.type = e;
660
648
  }
661
649
  };
662
- function Ms(e, t, r, s) {
663
- let n = new Is(t, r, s);
664
- return e.push(n), !0;
665
- }
666
- function Ds(e, t, r, s) {
667
- let n = -1;
668
- for (let i = 0; i < e.length; i++) {
669
- let a = e[i];
650
+ function ks(e, t, r, s) {
651
+ let i = new Ts(t, r, s);
652
+ return e.push(i), !0;
653
+ }
654
+ function Is(e, t, r, s) {
655
+ let i = -1;
656
+ for (let n = 0; n < e.length; n++) {
657
+ let a = e[n];
670
658
  if (a.type === t && a.hook === r && a.target === s) {
671
- n = i;
659
+ i = n;
672
660
  break;
673
661
  }
674
662
  }
675
- return n != -1 ? (e.splice(n, 1), !0) : !1;
663
+ return i != -1 ? (e.splice(i, 1), !0) : !1;
676
664
  }
677
665
  function Ur(e) {
678
666
  return (t, r) => {
679
667
  let s;
680
668
  if (r) s = r;
681
669
  else {
682
- const i = Wt();
683
- if (i == null || i.proxy == null) {
670
+ const n = Vt();
671
+ if (n == null || n.proxy == null) {
684
672
  console.error("can not get current instance or proxy");
685
673
  return;
686
674
  }
687
- s = i.proxy;
675
+ s = n.proxy;
688
676
  }
689
- const n = Hr(s, lt);
690
- if (n == null) {
677
+ const i = Nr(s, at);
678
+ if (i == null) {
691
679
  console.warn("hooks context not found");
692
680
  return;
693
681
  }
694
- ft(() => {
695
- Ds(n, e, t, s);
696
- }), Ms(n, e, t, s);
682
+ ct(() => {
683
+ Is(i, e, t, s);
684
+ }), ks(i, e, t, s);
697
685
  };
698
686
  }
699
- var Bi = Ur(at.ACTIVATED), Ni = Ur(at.DEACTIVATED), Vr = Symbol("routeKey");
700
- function yr(e, t) {
687
+ var Di = Ur(ut.ACTIVATED), Hi = Ur(ut.DEACTIVATED), Vr = Symbol("routeKey");
688
+ function hr(e, t) {
701
689
  e.set(Vr, t);
702
690
  }
703
691
  function Zt(e) {
704
- let t = Hr(e, Vr);
692
+ let t = Nr(e, Vr);
705
693
  return typeof t == "function" ? t() : t ?? null;
706
694
  }
707
695
  function Wr(e, t = !1) {
@@ -712,7 +700,7 @@ function Jr(e, t = !1) {
712
700
  let r = null;
713
701
  return t ? r = e.showActiveClass ?? e.enterActiveClass : r = e.enterActiveClass, r || (r = e.transitionName, r ? t ? `${r}-show-active` : `${r}-enter-active` : null);
714
702
  }
715
- function Bs(e, t = !1) {
703
+ function Os(e, t = !1) {
716
704
  let r = null;
717
705
  return t ? r = e.showToClass ?? e.enterToClass : r = e.enterToClass, r || (r = e.transitionName, r ? t ? `${r}-show-to` : `${r}-enter-to` : null);
718
706
  }
@@ -724,43 +712,43 @@ function Gr(e, t = !1) {
724
712
  let r = null;
725
713
  return t ? r = e.hideActiveClass ?? e.leaveActiveClass : r = e.leaveActiveClass, r || (r = e.transitionName, r ? t ? `${r}-hide-active` : `${r}-leave-active` : null);
726
714
  }
727
- function Ns(e, t = !1) {
715
+ function Bs(e, t = !1) {
728
716
  let r = null;
729
717
  return t ? r = e.hideToClass ?? e.leaveToClass : r = e.leaveToClass, r || (r = e.transitionName, r ? t ? `${r}-hide-to` : `${r}-leave-to` : null);
730
718
  }
731
- function Hs(e, t = !1) {
719
+ function Ds(e, t = !1) {
732
720
  let r = null;
733
721
  return t ? r = e.beforeShow ?? e.beforeEnter : r = e.beforeEnter, r;
734
722
  }
735
- function Us(e, t = !1) {
723
+ function Hs(e, t = !1) {
736
724
  let r = null;
737
725
  return t ? r = e.show ?? e.enter : r = e.enter, r;
738
726
  }
739
- function Vs(e, t = !1) {
727
+ function Ns(e, t = !1) {
740
728
  let r = null;
741
729
  return t ? r = e.afterShow ?? e.afterEnter : r = e.afterEnter, r;
742
730
  }
743
- function Ws(e, t = !1) {
731
+ function Us(e, t = !1) {
744
732
  let r = null;
745
733
  return t ? r = e.showCancelled ?? e.enterCancelled : r = e.enterCancelled, r;
746
734
  }
747
- function Js(e, t = !1) {
735
+ function Vs(e, t = !1) {
748
736
  let r = null;
749
737
  return t ? r = e.beforeHide ?? e.beforeLeave : r = e.beforeLeave, r;
750
738
  }
751
- function zs(e, t = !1) {
739
+ function Ws(e, t = !1) {
752
740
  let r = null;
753
741
  return t ? r = e.hide ?? e.leave : r = e.leave, r;
754
742
  }
755
- function Gs(e, t = !1) {
743
+ function Js(e, t = !1) {
756
744
  let r = null;
757
745
  return t ? r = e.afterHide ?? e.afterLeave : r = e.afterLeave, r;
758
746
  }
759
- function Xs(e, t = !1) {
747
+ function zs(e, t = !1) {
760
748
  let r = null;
761
749
  return t ? r = e.hideCancelled ?? e.leaveCancelled : r = e.leaveCancelled, r;
762
750
  }
763
- function er(e) {
751
+ function Yt(e) {
764
752
  let t, r = e.transitionDuration;
765
753
  return typeof r == "object" ? t = {
766
754
  enter: r.enter ?? -1,
@@ -777,31 +765,31 @@ function er(e) {
777
765
  function Ee(e, t) {
778
766
  e.classList.contains(t) || e.classList.add(t);
779
767
  }
780
- function Pe(e, t) {
768
+ function xe(e, t) {
781
769
  e.classList.remove(t);
782
770
  }
783
- var Qs = me && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout;
771
+ var Gs = Pe && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout;
784
772
  function yt(e) {
785
- Qs(e);
773
+ Gs(e);
786
774
  }
787
- function $(e, t, r) {
788
- w(t) && (e == null && (e = {}), Reflect.apply(t, e, r));
775
+ function A(e, t, r) {
776
+ b(t) && (e == null && (e = {}), Reflect.apply(t, e, r));
789
777
  }
790
- function Xr(e, t, r, s = -1, n, i, a) {
791
- let o = [];
792
- const l = () => {
793
- for (let u of o) Jt(t, u.type, u.listener);
794
- o = [];
778
+ function Xr(e, t, r, s = -1, i, n, a) {
779
+ let l = [];
780
+ const o = () => {
781
+ for (let u of l) Wt(t, u.type, u.listener);
782
+ l = [];
795
783
  };
796
- if (w(i)) {
797
- if (n !== void 0 && n >= 0) {
784
+ if (b(n)) {
785
+ if (i !== void 0 && i >= 0) {
798
786
  setTimeout(() => {
799
- Reflect.apply(i, e, [
787
+ Reflect.apply(n, e, [
800
788
  t,
801
789
  r,
802
790
  s
803
791
  ]);
804
- }, n);
792
+ }, i);
805
793
  return;
806
794
  }
807
795
  const u = [
@@ -809,205 +797,205 @@ function Xr(e, t, r, s = -1, n, i, a) {
809
797
  "transitionend",
810
798
  Ht
811
799
  ], f = (c) => {
812
- (c.target || c.srcElement) === c.currentTarget && (l(), Reflect.apply(i, e, [
800
+ (c.target || c.srcElement) === c.currentTarget && (o(), Reflect.apply(n, e, [
813
801
  t,
814
802
  r,
815
803
  s
816
804
  ]));
817
805
  };
818
806
  u.forEach((c) => {
819
- nt(t, c, f), o.push({
807
+ ot(t, c, f), l.push({
820
808
  type: c,
821
809
  listener: f
822
810
  });
823
811
  });
824
812
  }
825
- if (w(a)) {
813
+ if (b(a)) {
826
814
  const u = "animationcancel", f = (c) => {
827
- (c.target || c.srcElement) === c.currentTarget && (l(), Reflect.apply(a, e, [
815
+ (c.target || c.srcElement) === c.currentTarget && (o(), Reflect.apply(a, e, [
828
816
  t,
829
817
  r,
830
818
  s
831
819
  ]));
832
820
  };
833
- nt(t, u, f), o.push({
821
+ ot(t, u, f), l.push({
834
822
  type: u,
835
823
  listener: f
836
824
  });
837
825
  }
838
826
  }
839
827
  function dt(e) {
840
- return !me || e === null ? !1 : e.opsType === F.Append || e.opsType === F.Open;
828
+ return !Pe || e === null ? !1 : e.opsType === C.Append || e.opsType === C.Open;
841
829
  }
842
- function Qr(e, t, r, s = {}, n, i = -1) {
843
- if (t || dt(n)) {
830
+ function Qr(e, t, r, s = {}, i, n = -1) {
831
+ if (t || dt(i)) {
844
832
  const a = Wr(s, t);
845
833
  a && Ee(r, a);
846
- const o = Jr(s, t);
847
- o && Ee(r, o), $(e, Hs(s, t), [
834
+ const l = Jr(s, t);
835
+ l && Ee(r, l), A(e, Ds(s, t), [
848
836
  r,
849
837
  t,
850
- n,
851
- i
838
+ i,
839
+ n
852
840
  ]);
853
841
  }
854
842
  }
855
- function Yr(e, t, r, s = {}, n, i, a, o) {
856
- if (!dt(i) && !t) {
857
- w(o) && o(e, o, [r]);
843
+ function Zr(e, t, r, s = {}, i, n, a, l) {
844
+ if (!dt(n) && !t) {
845
+ b(l) && l(e, l, [r]);
858
846
  return;
859
847
  }
860
- const l = Wr(s, t), u = Jr(s, t), f = Bs(s, t), c = Us(s, t), h = Vs(s, t), y = Ws(s, t);
861
- if (!l && !u && !f && !c) {
862
- w(o) && o(e, o, [r]);
848
+ const o = Wr(s, t), u = Jr(s, t), f = Os(s, t), c = Hs(s, t), h = Ns(s, t), y = Us(s, t);
849
+ if (!o && !u && !f && !c) {
850
+ b(l) && l(e, l, [r]);
863
851
  return;
864
852
  }
865
853
  yt(() => {
866
- Xr(e, r, i, a, n, () => {
867
- u && Pe(r, u), f && Pe(r, f), w(h) && $(e, h, [
854
+ Xr(e, r, n, a, i, () => {
855
+ u && xe(r, u), f && xe(r, f), b(h) && A(e, h, [
868
856
  r,
869
857
  t,
870
- i,
858
+ n,
871
859
  a
872
- ]), w(o) && o(e, o, [r]);
860
+ ]), b(l) && l(e, l, [r]);
873
861
  }, () => {
874
- w(y) && $(e, y, [
862
+ b(y) && A(e, y, [
875
863
  r,
876
864
  t,
877
- i,
865
+ n,
878
866
  a
879
867
  ]);
880
- }), l && Pe(r, l), f && Ee(r, f), w(c) && $(e, c, [
868
+ }), o && xe(r, o), f && Ee(r, f), b(c) && A(e, c, [
881
869
  r,
882
870
  t,
883
- i,
871
+ n,
884
872
  a
885
873
  ]);
886
874
  });
887
875
  }
888
- function Zr(e, t, r, s = {}, n, i = -1) {
889
- if (t || dt(n)) {
876
+ function Yr(e, t, r, s = {}, i, n = -1) {
877
+ if (t || dt(i)) {
890
878
  const a = zr(s, t);
891
879
  a && Ee(r, a);
892
- const o = Gr(s, t);
893
- o && Ee(r, o), $(e, Js(s, t), [
880
+ const l = Gr(s, t);
881
+ l && Ee(r, l), A(e, Vs(s, t), [
894
882
  r,
895
883
  t,
896
- n,
897
- i
884
+ i,
885
+ n
898
886
  ]);
899
887
  }
900
888
  }
901
- function es(e, t, r, s = {}, n, i, a, o, l) {
889
+ function es(e, t, r, s = {}, i, n, a, l, o) {
902
890
  if (!dt(a) && !t) {
903
- w(l) && $(e, l, [r]), !t && w(i) && i();
891
+ b(o) && A(e, o, [r]), !t && b(n) && n();
904
892
  return;
905
893
  }
906
- const u = zr(s, t), f = Gr(s, t), c = Ns(s, t), h = zs(s, t), y = Gs(s, t), d = Xs(s, t);
894
+ const u = zr(s, t), f = Gr(s, t), c = Bs(s, t), h = Ws(s, t), y = Js(s, t), d = zs(s, t);
907
895
  if (!u && !f && !c && !h) {
908
- w(l) && $(e, l, [r]), !t && w(i) && i();
896
+ b(o) && A(e, o, [r]), !t && b(n) && n();
909
897
  return;
910
898
  }
911
899
  yt(() => {
912
- Xr(e, r, a, o, n, () => {
900
+ Xr(e, r, a, l, i, () => {
913
901
  try {
914
- f && Pe(r, f), c && Pe(r, c), w(y) && $(e, y, [
902
+ f && xe(r, f), c && xe(r, c), b(y) && A(e, y, [
915
903
  r,
916
904
  t,
917
905
  a,
918
- o
919
- ]), w(l) && $(e, l, [r]);
906
+ l
907
+ ]), b(o) && A(e, o, [r]);
920
908
  } finally {
921
- !t && w(i) && i();
909
+ !t && b(n) && n();
922
910
  }
923
911
  }, () => {
924
912
  try {
925
- w(d) && $(e, d, [
913
+ b(d) && A(e, d, [
926
914
  r,
927
915
  t,
928
916
  a,
929
- o
930
- ]), w(l) && $(e, l, [r]);
917
+ l
918
+ ]), b(o) && A(e, o, [r]);
931
919
  } finally {
932
- !t && w(i) && i();
920
+ !t && b(n) && n();
933
921
  }
934
- }), u && Pe(r, u), c && Ee(r, c), w(h) && $(e, h, [
922
+ }), u && xe(r, u), c && Ee(r, c), b(h) && A(e, h, [
935
923
  r,
936
924
  t,
937
925
  a,
938
- o
926
+ l
939
927
  ]);
940
928
  });
941
929
  }
942
- function Ut(e, t, r = {}, s, n = -1) {
943
- const i = r.mode ?? "default", a = er(r);
930
+ function Nt(e, t, r = {}, s, i = -1) {
931
+ const n = r.mode ?? "default", a = Yt(r);
944
932
  return {
945
- mode: i,
933
+ mode: n,
946
934
  persisted: !1,
947
- beforeEnter: (o) => {
948
- Qr(e, !1, o, r, s, n);
935
+ beforeEnter: (l) => {
936
+ Qr(e, !1, l, r, s, i);
949
937
  },
950
- enter: (o) => {
951
- Yr(e, !1, o, r, a.enter, s, n);
938
+ enter: (l) => {
939
+ Zr(e, !1, l, r, a.enter, s, i);
952
940
  },
953
- leave: (o, l) => {
954
- Zr(e, !1, o, r, s, n), es(e, !1, o, r, a.leave, l, s, n, () => {
941
+ leave: (l, o) => {
942
+ Yr(e, !1, l, r, s, i), es(e, !1, l, r, a.leave, o, s, i, () => {
955
943
  t.transition = null, t = null;
956
944
  });
957
945
  },
958
- clone: (o) => Ut(e, t, r, s, n)
946
+ clone: (l) => Nt(e, t, r, s, i)
959
947
  };
960
948
  }
961
949
  function ts(e) {
962
950
  return e.el;
963
951
  }
964
- function Ys(e, t, r = {}, s, n, i, a) {
965
- if (i === !0) {
966
- const o = ts(t);
967
- if (o == null) return;
968
- const l = er(r);
969
- Qr(e, !0, o, r, s, n), Yr(e, !0, o, r, l.show, s, n, (u) => {
970
- w(a) && $(e, a, [u]);
952
+ function Xs(e, t, r = {}, s, i, n, a) {
953
+ if (n === !0) {
954
+ const l = ts(t);
955
+ if (l == null) return;
956
+ const o = Yt(r);
957
+ Qr(e, !0, l, r, s, i), Zr(e, !0, l, r, o.show, s, i, (u) => {
958
+ b(a) && A(e, a, [u]);
971
959
  });
972
- } else w(a) && $(e, a, []);
973
- }
974
- function Zs(e, t, r = {}, s, n, i, a) {
975
- if (i === !0) {
976
- const o = ts(t);
977
- if (o == null) return;
978
- const l = er(r);
979
- Zr(e, !0, o, r, s, n), es(e, !0, o, r, l.hide, null, s, n, (u) => {
980
- w(a) && $(e, a, [u]);
960
+ } else b(a) && A(e, a, []);
961
+ }
962
+ function Qs(e, t, r = {}, s, i, n, a) {
963
+ if (n === !0) {
964
+ const l = ts(t);
965
+ if (l == null) return;
966
+ const o = Yt(r);
967
+ Yr(e, !0, l, r, s, i), es(e, !0, l, r, o.hide, null, s, i, (u) => {
968
+ b(a) && A(e, a, [u]);
981
969
  });
982
- } else w(a) && $(e, a, []);
970
+ } else b(a) && A(e, a, []);
983
971
  }
984
- function ei(e, t = {}) {
972
+ function Zs(e, t = {}) {
985
973
  yt(() => {
986
974
  for (let r = 0; r < e.length; r++) Reflect.apply(e[r], t, []);
987
975
  });
988
976
  }
989
- function rs(e, t, r = {}, s, n = -1) {
977
+ function rs(e, t, r = {}, s, i = -1) {
990
978
  return {
991
979
  mode: r.mode ?? "default",
992
980
  persisted: !1,
993
- beforeEnter: (i) => {
994
- Ue(qs, {}, i);
981
+ beforeEnter: (n) => {
982
+ Ve(Ks, {}, n);
995
983
  },
996
- enter: (i) => {
997
- Ue(js, {}, i);
984
+ enter: (n) => {
985
+ Ve($s, {}, n);
998
986
  },
999
- leave: (i, a) => {
1000
- Ue(Ts, {}, i), yt(() => {
1001
- const o = (l) => {
1002
- (l.target || l.srcElement) === l.currentTarget && (Jt(i, Ht, o), a && Reflect.apply(a, e, []), t.transition = null, t = null);
987
+ leave: (n, a) => {
988
+ Ve(qs, {}, n), yt(() => {
989
+ const l = (o) => {
990
+ (o.target || o.srcElement) === o.currentTarget && (Wt(n, Ht, l), a && Reflect.apply(a, e, []), t.transition = null, t = null);
1003
991
  };
1004
- nt(i, Ht, o), Ue(Ls, {}, i);
992
+ ot(n, Ht, l), Ve(js, {}, n);
1005
993
  });
1006
994
  },
1007
- clone: (i) => rs(e, t, r, s, n)
995
+ clone: (n) => rs(e, t, r, s, i)
1008
996
  };
1009
997
  }
1010
- var z = Symbol("rootKey"), J = Symbol("rootNodeKey"), he = Symbol("parentNodeKey"), st = Symbol("nameKey"), re = class {
998
+ var z = Symbol("rootKey"), J = Symbol("rootNodeKey"), he = Symbol("parentNodeKey"), it = Symbol("nameKey"), re = class {
1011
999
  instance = null;
1012
1000
  model;
1013
1001
  route;
@@ -1016,25 +1004,25 @@ var z = Symbol("rootKey"), J = Symbol("rootNodeKey"), he = Symbol("parentNodeKey
1016
1004
  constructor(e, t, r = 0, s = !0) {
1017
1005
  this.route = e, this.model = t, this.index = r, this.active = s;
1018
1006
  }
1019
- }, _e = class {
1007
+ }, Ae = class {
1020
1008
  _slots;
1021
1009
  get slots() {
1022
- return this._slots == null && (this._slots = _r([])), this._slots;
1010
+ return this._slots == null && (this._slots = Ar([])), this._slots;
1023
1011
  }
1024
1012
  get empty() {
1025
1013
  return this._slots == null || this._slots.value.length == 0;
1026
1014
  }
1027
- [st];
1015
+ [it];
1028
1016
  [z];
1029
1017
  [J] = null;
1030
1018
  [he] = null;
1031
1019
  get name() {
1032
- return this[st];
1020
+ return this[it];
1033
1021
  }
1034
1022
  constructor(e, t, r) {
1035
- this[st] = e, this[z] = t, r && (this[J] = r);
1023
+ this[it] = e, this[z] = t, r && (this[J] = r);
1036
1024
  }
1037
- }, D = class {
1025
+ }, O = class {
1038
1026
  view;
1039
1027
  index;
1040
1028
  level;
@@ -1048,29 +1036,29 @@ var z = Symbol("rootKey"), J = Symbol("rootNodeKey"), he = Symbol("parentNodeKey
1048
1036
  }
1049
1037
  return !1;
1050
1038
  }
1051
- }, St = class {
1039
+ }, Rt = class {
1052
1040
  views = [];
1053
- }, ti = class {
1041
+ }, Ys = class {
1054
1042
  layers = [];
1055
1043
  };
1056
1044
  function se(e, t, r) {
1057
1045
  return typeof e == "function" ? Reflect.apply(e, {}, [t, r]) : e;
1058
1046
  }
1059
- function xt(e, t) {
1047
+ function St(e, t) {
1060
1048
  if (!e) return null;
1061
1049
  const r = e(t);
1062
1050
  return r.length === 1 ? r[0] : r;
1063
1051
  }
1064
- function ge(e, t) {
1052
+ function pe(e, t) {
1065
1053
  return typeof t == "function" ? t(e) : e;
1066
1054
  }
1067
- var ri = class {
1055
+ var ei = class {
1068
1056
  node;
1069
1057
  state;
1070
1058
  constructor(e, t) {
1071
1059
  this.node = e, this.state = t;
1072
1060
  }
1073
- }, Vt = Fr({
1061
+ }, Ut = Fr({
1074
1062
  name: "RouterView",
1075
1063
  inheritAttrs: !1,
1076
1064
  props: {
@@ -1260,101 +1248,101 @@ var ri = class {
1260
1248
  }
1261
1249
  },
1262
1250
  setup(e, t) {
1263
- const r = Wt();
1251
+ const r = Vt();
1264
1252
  if (r === null || r.proxy === null) {
1265
1253
  console.error("instance or instance.proxy not exist");
1266
1254
  return;
1267
1255
  }
1268
- const s = e.multi === !0, n = G(ht, null), i = G(bt, 0), a = G(ur, null), o = G(wt, -1);
1269
- let l = null, u = e.modelSlot;
1256
+ const s = e.multi === !0, i = G(ht, null), n = G(gt, 0), a = G(ar, null), l = G(wt, -1);
1257
+ let o = null, u = e.modelSlot;
1270
1258
  if (u) {
1271
- if (te(bt, i + 1), te(wt, u.index), te(Rt, u.index), !u.route) {
1259
+ if (te(gt, n + 1), te(wt, u.index), te(bt, u.index), !u.route) {
1272
1260
  console.warn("child view render error, route not exist");
1273
1261
  return;
1274
1262
  }
1275
- const c = ot(r.proxy, !0);
1276
- ks(c), yr(c, () => u?.route ?? null);
1263
+ const c = lt(r.proxy, !0);
1264
+ Ls(c), hr(c, () => u?.route ?? null);
1277
1265
  } else {
1278
- if (n == null) {
1266
+ if (i == null) {
1279
1267
  console.error("router is not been injected");
1280
1268
  return;
1281
1269
  }
1282
- const c = e.name, h = G(fr, null), y = G(Rt, 0);
1283
- if (l = n[Dr](c, i, a, o, h, y), l === null) return;
1284
- te(fr, l);
1285
- const d = l[z] === !0;
1286
- d && te(ur, l), s || (te(wt, -1), te(bt, i + 1), te(Rt, -1), d && yr(ot(r.proxy, !0), () => {
1287
- const m = l.slots.value;
1270
+ const c = e.name, h = G(ur, null), y = G(bt, 0);
1271
+ if (o = i[Br](c, n, a, l, h, y), o === null) return;
1272
+ te(ur, o);
1273
+ const d = o[z] === !0;
1274
+ d && te(ar, o), s || (te(wt, -1), te(gt, n + 1), te(bt, -1), d && hr(lt(r.proxy, !0), () => {
1275
+ const m = o.slots.value;
1288
1276
  return m.length > 0 ? m[0].route : null;
1289
1277
  }));
1290
1278
  }
1291
1279
  const f = { value: /* @__PURE__ */ new Map() };
1292
- return ft(() => {
1280
+ return ct(() => {
1293
1281
  if (f.value && f.value.clear(), u) {
1294
1282
  const c = u;
1295
1283
  c.route = null, c.model = null, c.instance = null, u = void 0;
1296
1284
  }
1297
1285
  }), () => {
1298
1286
  if (s) {
1299
- const c = /* @__PURE__ */ new Map(), h = [], y = l?.slots.value, d = [];
1287
+ const c = /* @__PURE__ */ new Map(), h = [], y = o?.slots.value, d = [];
1300
1288
  for (let g = 0; g < y.length; g++) {
1301
- const v = y[g], j = `${e.name}_${v.index}`, T = se(e.transition, v.route, g) ?? !0, Ce = { modelSlot: v };
1289
+ const v = y[g], j = `${e.name}_${v.index}`, M = se(e.transition, v.route, g) ?? !0, _e = { modelSlot: v };
1302
1290
  let L;
1303
- t.slots.default ? L = ce(Vt, Ce, { default: t.slots.default }) : L = ce(Vt, Ce);
1291
+ t.slots.default ? L = ce(Ut, _e, { default: t.slots.default }) : L = ce(Ut, _e);
1304
1292
  const K = {}, ne = se(e.viewClass, v.route, g);
1305
1293
  typeof ne == "string" && ne.length > 0 && (K[ne] = !0);
1306
- const ee = se(e.viewActiveClass, v.route, g), O = se(e.viewInactiveClass, v.route, g), Q = f.value.get(j);
1307
- if (typeof ee == "string" && ee.length > 0 && (K[ee] = v.active), typeof O == "string" && O.length > 0 && (K[O] = !v.active), Q && v.active !== Q.state) {
1294
+ const ee = se(e.viewActiveClass, v.route, g), T = se(e.viewInactiveClass, v.route, g), Q = f.value.get(j);
1295
+ if (typeof ee == "string" && ee.length > 0 && (K[ee] = v.active), typeof T == "string" && T.length > 0 && (K[T] = !v.active), Q && v.active !== Q.state) {
1308
1296
  const Ne = Q.node;
1309
1297
  v.active ? d.unshift(() => {
1310
1298
  const mt = () => {
1311
- let Ae = cr(Ne);
1312
- Ae != null && hr(Ae, at.ACTIVATED);
1299
+ let Ce = fr(Ne);
1300
+ Ce != null && cr(Ce, ut.ACTIVATED);
1313
1301
  };
1314
- Ys(r, Ne, e, v.route, g, T, mt);
1302
+ Xs(r, Ne, e, v.route, g, M, mt);
1315
1303
  }) : d.push(() => {
1316
1304
  const mt = () => {
1317
- const Ae = cr(Ne);
1318
- Ae != null && hr(Ae, at.DEACTIVATED);
1305
+ const Ce = fr(Ne);
1306
+ Ce != null && cr(Ce, ut.DEACTIVATED);
1319
1307
  };
1320
- Zs(r, Ne, e, v.route, g, T, mt);
1308
+ Qs(r, Ne, e, v.route, g, M, mt);
1321
1309
  });
1322
1310
  }
1323
- const H = {
1311
+ const N = {
1324
1312
  class: K,
1325
1313
  key: j
1326
1314
  }, U = se(e.viewTagProps, v.route, g);
1327
- U !== null && typeof U == "object" && _(!0, H, ge(U, n?.propsFilter)), v.route?.viewTagAttrs && typeof v.route?.viewTagAttrs == "object" && _(!0, H, ge(v.route.viewTagAttrs, n?.propsFilter));
1328
- const pe = ce(se(e.viewTag, v.route, g), H, { default: () => [L] });
1329
- c.set(j, new ri(pe, v.active)), f.value.delete(j), T === !0 ? pe.transition = Ut(r, pe, e, v.route, g) : T === "custom" && (pe.transition = rs(r, pe, e, v.route, g)), h.push(pe);
1315
+ U !== null && typeof U == "object" && q(!0, N, pe(U, i?.propsFilter)), v.route?.viewTagAttrs && typeof v.route?.viewTagAttrs == "object" && q(!0, N, pe(v.route.viewTagAttrs, i?.propsFilter));
1316
+ const ve = ce(se(e.viewTag, v.route, g), N, { default: () => [L] });
1317
+ c.set(j, new ei(ve, v.active)), f.value.delete(j), M === !0 ? ve.transition = Nt(r, ve, e, v.route, g) : M === "custom" && (ve.transition = rs(r, ve, e, v.route, g)), h.push(ve);
1330
1318
  }
1331
- f.value = c, ei(d, r);
1332
- const m = se(e.tag, null, -1), b = {};
1333
- return Object.assign(b, t.attrs), ce(m, b, { default: () => h });
1319
+ f.value = c, Zs(d, r);
1320
+ const m = se(e.tag, null, -1), w = {};
1321
+ return Object.assign(w, t.attrs), ce(m, w, { default: () => h });
1334
1322
  } else if (u != null) {
1335
1323
  const c = u.model, h = {};
1336
- c.props && (typeof c.props == "object" ? _(!1, h, ge(c.props, n?.propsFilter)) : c.props === !0 && typeof u.route?.params == "object" && _(!1, h, ge(u.route.params, n?.propsFilter)));
1324
+ c.props && (typeof c.props == "object" ? q(!1, h, pe(c.props, i?.propsFilter)) : c.props === !0 && typeof u.route?.params == "object" && q(!1, h, pe(u.route.params, i?.propsFilter)));
1337
1325
  const y = ce(c.component, h);
1338
- return xt(t.slots.default, {
1326
+ return St(t.slots.default, {
1339
1327
  Component: y,
1340
1328
  route: u.route
1341
1329
  }) ?? y;
1342
1330
  } else {
1343
- const c = l.slots.value;
1331
+ const c = o.slots.value;
1344
1332
  if (c.length > 0) {
1345
1333
  const h = c[0], y = h.route ?? (r.proxy && Zt(r.proxy)) ?? null, d = h.model, m = {};
1346
- d.props && (typeof d.props == "object" ? _(!1, m, ge(d.props, n?.propsFilter)) : d.props === !0 && typeof y?.params == "object" && _(!1, m, ge(y.params, n?.propsFilter)));
1347
- const b = ce(d.component, m);
1348
- return (se(e.transition, y, -1) ?? !0) && (b.transition = Ut(r, b, e, y, -1)), xt(t.slots.default, {
1349
- Component: b,
1334
+ d.props && (typeof d.props == "object" ? q(!1, m, pe(d.props, i?.propsFilter)) : d.props === !0 && typeof y?.params == "object" && q(!1, m, pe(y.params, i?.propsFilter)));
1335
+ const w = ce(d.component, m);
1336
+ return (se(e.transition, y, -1) ?? !0) && (w.transition = Nt(r, w, e, y, -1)), St(t.slots.default, {
1337
+ Component: w,
1350
1338
  route: y
1351
- }) ?? b;
1352
- } else return xt(t.slots.fallback, {});
1339
+ }) ?? w;
1340
+ } else return St(t.slots.fallback, {});
1353
1341
  }
1354
1342
  };
1355
1343
  }
1356
1344
  });
1357
- function si(e) {
1345
+ function ti(e) {
1358
1346
  if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && !(e.button != null && e.button !== 0)) {
1359
1347
  if (e.currentTarget && e.currentTarget.getAttribute) {
1360
1348
  const t = e.currentTarget.getAttribute("target");
@@ -1363,16 +1351,16 @@ function si(e) {
1363
1351
  return e.preventDefault && e.preventDefault(), !0;
1364
1352
  }
1365
1353
  }
1366
- function ii(e, t) {
1354
+ function ri(e, t) {
1367
1355
  return e == null || t == null ? !1 : !!(e === t || e.path && e.path === t.path || e.name && e.name === t.name);
1368
1356
  }
1369
- function ni(e, t) {
1357
+ function si(e, t) {
1370
1358
  return e == null || t == null ? !1 : !!(e.path && t.path && t.path.startsWith(e.path) || e.name && e.name == t.name);
1371
1359
  }
1372
- function be(e, t) {
1360
+ function ge(e, t) {
1373
1361
  return typeof e == "function" ? Reflect.apply(e, {}, [t]) : e;
1374
1362
  }
1375
- var oi = Fr({
1363
+ var ii = Fr({
1376
1364
  name: "RouterLink",
1377
1365
  inheritAttrs: !1,
1378
1366
  props: {
@@ -1421,165 +1409,165 @@ var oi = Fr({
1421
1409
  setup(e, t) {
1422
1410
  const r = G(ht, null);
1423
1411
  return () => {
1424
- let s = be(e.to, null), n = be(e.tag, s);
1425
- if (n == null) {
1412
+ let s = ge(e.to, null), i = ge(e.tag, s);
1413
+ if (i == null) {
1426
1414
  console.warn("can not resolve link tag");
1427
1415
  return;
1428
1416
  }
1429
- let i = null, a = null;
1430
- r !== null && (i = r[M](s), e.root && (i.root = e.root), a = r.currentRoute.value);
1431
- let o = {}, l = be(e.activeClass, i);
1432
- if (typeof l == "string" && l.length > 0 && (o[l] = ni(i, a)), be(e.exact, i) === !0) {
1433
- let c = be(e.exactActiveClass, i);
1434
- typeof c == "string" && c.length > 0 && (o[c] = ii(i, a));
1417
+ let n = null, a = null;
1418
+ r !== null && (n = r[I](s), e.root && (n.root = e.root), a = r.currentRoute.value);
1419
+ let l = {}, o = ge(e.activeClass, n);
1420
+ if (typeof o == "string" && o.length > 0 && (l[o] = si(n, a)), ge(e.exact, n) === !0) {
1421
+ let c = ge(e.exactActiveClass, n);
1422
+ typeof c == "string" && c.length > 0 && (l[c] = ri(n, a));
1435
1423
  }
1436
- let u = { class: o };
1437
- (n === "a" || n === "A") && (u.href = i?.path ?? i?.name ?? "#"), _(!0, u, t.attrs);
1438
- let f = be(e.event, i);
1424
+ let u = { class: l };
1425
+ (i === "a" || i === "A") && (u.href = n?.path ?? n?.name ?? "#"), q(!0, u, t.attrs);
1426
+ let f = ge(e.event, n);
1439
1427
  if (typeof f == "string") {
1440
1428
  const c = (h) => {
1441
1429
  if (r == null) {
1442
1430
  console.warn("router is not been injected");
1443
1431
  return;
1444
1432
  }
1445
- if (i == null) {
1433
+ if (n == null) {
1446
1434
  console.warn("route is not been resolved");
1447
1435
  return;
1448
1436
  }
1449
- si(h) && r.to(i);
1437
+ ti(h) && r.to(n);
1450
1438
  };
1451
1439
  u[f] = c;
1452
1440
  }
1453
- return ce(n, u, t.slots);
1441
+ return ce(i, u, t.slots);
1454
1442
  };
1455
1443
  }
1456
1444
  }), P = /* @__PURE__ */ (function(e) {
1457
1445
  return e.Busy = "Busy", e.Free = "Free", e.Reject = "Reject", e.Exception = "Exception", e.Finished = "Finished", e;
1458
- })(P || {}), B = Symbol("chainKey"), k = Symbol("cursorKey"), Pt = Symbol("$persistentModeKey"), C = Symbol("statusKey"), Y = Symbol("argsKey"), We = Symbol("exArgsKey"), we = Symbol("successFnsKey"), $e = Symbol("errorFnsKey"), oe = Symbol("sessionKey"), Z = Symbol("_go"), ut = class {
1446
+ })(P || {}), B = Symbol("chainKey"), k = Symbol("cursorKey"), xt = Symbol("$persistentModeKey"), _ = Symbol("statusKey"), Z = Symbol("argsKey"), Je = Symbol("exArgsKey"), we = Symbol("successFnsKey"), Ke = Symbol("errorFnsKey"), oe = Symbol("sessionKey"), Y = Symbol("_go"), ft = class {
1459
1447
  [B] = [];
1460
1448
  [k] = 0;
1461
- [Pt] = !1;
1462
- [C] = P.Free;
1463
- [Y] = [];
1464
- [We] = [];
1449
+ [xt] = !1;
1450
+ [_] = P.Free;
1451
+ [Z] = [];
1452
+ [Je] = [];
1465
1453
  [we] = [];
1466
- [$e] = [];
1454
+ [Ke] = [];
1467
1455
  [oe];
1468
1456
  get session() {
1469
1457
  return this[oe];
1470
1458
  }
1471
1459
  constructor(e, t = !1) {
1472
- this[oe] = e, this[Pt] = t;
1473
- }
1474
- [Z](e, ...t) {
1475
- let r = this[C];
1476
- if (this[C] = P.Busy, this[k] += e, this[k] < 0 && (this[k] = 0), this[Y] = t, r === P.Exception || r === P.Reject) {
1477
- let i = [{ session: this[oe] }, ...this[We]];
1478
- for (; this[$e].length > 0; ) try {
1479
- let a = this[$e].shift();
1480
- typeof a == "function" && De(() => {
1481
- Reflect.apply(a, {}, i);
1460
+ this[oe] = e, this[xt] = t;
1461
+ }
1462
+ [Y](e, ...t) {
1463
+ let r = this[_];
1464
+ if (this[_] = P.Busy, this[k] += e, this[k] < 0 && (this[k] = 0), this[Z] = t, r === P.Exception || r === P.Reject) {
1465
+ let n = [{ session: this[oe] }, ...this[Je]];
1466
+ for (; this[Ke].length > 0; ) try {
1467
+ let a = this[Ke].shift();
1468
+ typeof a == "function" && Be(() => {
1469
+ Reflect.apply(a, {}, n);
1482
1470
  });
1483
1471
  } catch (a) {
1484
1472
  console.error(a.message, a);
1485
1473
  }
1486
- return this[C] = r, this[B] = [], this[k] = 0, this;
1474
+ return this[_] = r, this[B] = [], this[k] = 0, this;
1487
1475
  } else if (r === P.Finished || this[k] >= this[B].length) {
1488
- let i = [{ session: this[oe] }, ...this[Y]];
1476
+ let n = [{ session: this[oe] }, ...this[Z]];
1489
1477
  for (; this[we].length > 0; ) {
1490
1478
  let a = this[we].shift();
1491
- typeof a == "function" && De(() => {
1492
- Reflect.apply(a, {}, i);
1479
+ typeof a == "function" && Be(() => {
1480
+ Reflect.apply(a, {}, n);
1493
1481
  });
1494
1482
  }
1495
- return this[C] = P.Free, this;
1483
+ return this[_] = P.Free, this;
1496
1484
  }
1497
1485
  if (this[k] >= this[B].length)
1498
- return this[C] = P.Free, this;
1486
+ return this[_] = P.Free, this;
1499
1487
  let s = this[B][this[k]];
1500
- this[Pt] || (this[B].splice(0, this[k] + 1), this[k] = -1);
1501
- let n = this[k] + 1;
1488
+ this[xt] || (this[B].splice(0, this[k] + 1), this[k] = -1);
1489
+ let i = this[k] + 1;
1502
1490
  try {
1503
- let i = !1, a = {
1504
- go: (o, ...l) => {
1505
- i || (i = !0, Reflect.apply(this[Z], this, [o, ...l]));
1491
+ let n = !1, a = {
1492
+ go: (l, ...o) => {
1493
+ n || (n = !0, Reflect.apply(this[Y], this, [l, ...o]));
1506
1494
  },
1507
- resolve: (...o) => {
1508
- i || (i = !0, Reflect.apply(this[Z], this, [1, ...o]));
1495
+ resolve: (...l) => {
1496
+ n || (n = !0, Reflect.apply(this[Y], this, [1, ...l]));
1509
1497
  },
1510
- reject: (...o) => {
1511
- i || (i = !0, Reflect.apply(this.reject, this, [...o]));
1498
+ reject: (...l) => {
1499
+ n || (n = !0, Reflect.apply(this.reject, this, [...l]));
1512
1500
  },
1513
- insert: (o) => {
1514
- i || (this[B].splice(n, 0, o), n++);
1501
+ insert: (l) => {
1502
+ n || (this[B].splice(i, 0, l), i++);
1515
1503
  },
1516
1504
  session: this[oe]
1517
1505
  };
1518
- De(() => {
1519
- Reflect.apply(s, {}, [a, ...this[Y]]);
1506
+ Be(() => {
1507
+ Reflect.apply(s, {}, [a, ...this[Z]]);
1520
1508
  });
1521
- } catch (i) {
1522
- this.throw(i);
1509
+ } catch (n) {
1510
+ this.throw(n);
1523
1511
  }
1524
1512
  return this;
1525
1513
  }
1526
1514
  go(e, ...t) {
1527
- return Reflect.apply(this[Z], this, [e, ...t]);
1515
+ return Reflect.apply(this[Y], this, [e, ...t]);
1528
1516
  }
1529
1517
  finish(...e) {
1530
- return this[C] = P.Finished, this[Y] = e, Reflect.apply(this[Z], this, [0]);
1518
+ return this[_] = P.Finished, this[Z] = e, Reflect.apply(this[Y], this, [0]);
1531
1519
  }
1532
1520
  reject(...e) {
1533
- return this[C] = P.Reject, this[We] = e, Reflect.apply(this[Z], this, [0]);
1521
+ return this[_] = P.Reject, this[Je] = e, Reflect.apply(this[Y], this, [0]);
1534
1522
  }
1535
1523
  throw(...e) {
1536
- return this[C] = P.Exception, this[We] = e, Reflect.apply(this[Z], this, [0]);
1524
+ return this[_] = P.Exception, this[Je] = e, Reflect.apply(this[Y], this, [0]);
1537
1525
  }
1538
1526
  reset(...e) {
1539
- this[C] = P.Busy, this[Y] = e, this[B] = [], this[k] = 0;
1540
- let t = [{ session: this[oe] }, ...this[Y]];
1527
+ this[_] = P.Busy, this[Z] = e, this[B] = [], this[k] = 0;
1528
+ let t = [{ session: this[oe] }, ...this[Z]];
1541
1529
  for (; this[we].length > 0; ) {
1542
1530
  let r = this[we].shift();
1543
- De(() => {
1531
+ Be(() => {
1544
1532
  Reflect.apply(r, this, t);
1545
1533
  });
1546
1534
  }
1547
- return this[C] = P.Free, this;
1535
+ return this[_] = P.Free, this;
1548
1536
  }
1549
1537
  post(e) {
1550
- return this[C] === P.Reject || this[C] === P.Exception ? this : (Array.isArray(e) ? this[B] = [...this[B], ...e] : this[B].push(e), this[C] === P.Busy ? this : (Reflect.apply(this[Z], this, [0, ...this[Y]]), this));
1538
+ return this[_] === P.Reject || this[_] === P.Exception ? this : (Array.isArray(e) ? this[B] = [...this[B], ...e] : this[B].push(e), this[_] === P.Busy ? this : (Reflect.apply(this[Y], this, [0, ...this[Z]]), this));
1551
1539
  }
1552
1540
  wait(e, t) {
1553
- return e && typeof e == "function" && this[we].push(e), t && typeof t == "function" && this[$e].push(t), this[C] === P.Busy ? this : (Reflect.apply(this[Z], this, [0, ...this[Y]]), this);
1541
+ return e && typeof e == "function" && this[we].push(e), t && typeof t == "function" && this[Ke].push(t), this[_] === P.Busy ? this : (Reflect.apply(this[Y], this, [0, ...this[Z]]), this);
1554
1542
  }
1555
1543
  exception(e) {
1556
- return e && typeof e == "function" && this[$e].push(e), this[C] === P.Busy ? this : Reflect.apply(this[Z], this, [0, ...this[Y]]);
1544
+ return e && typeof e == "function" && this[Ke].push(e), this[_] === P.Busy ? this : Reflect.apply(this[Y], this, [0, ...this[Z]]);
1557
1545
  }
1558
1546
  isFinish() {
1559
- return this[C] == P.Reject || this[C] == P.Free && this[k] >= this[B].length;
1547
+ return this[_] == P.Reject || this[_] == P.Free && this[k] >= this[B].length;
1560
1548
  }
1561
- }, it = /* @__PURE__ */ (function(e) {
1549
+ }, nt = /* @__PURE__ */ (function(e) {
1562
1550
  return e[e.limitless = 0] = "limitless", e[e.once = 1] = "once", e;
1563
- })(it || {}), Re = Symbol("registerKey"), li = class {
1551
+ })(nt || {}), be = Symbol("registerKey"), ni = class {
1564
1552
  policy;
1565
1553
  callback;
1566
1554
  constructor(e, t) {
1567
1555
  this.callback = e, this.policy = t;
1568
1556
  }
1569
- }, dr = class {
1570
- [Re] = /* @__PURE__ */ new Map();
1557
+ }, yr = class {
1558
+ [be] = /* @__PURE__ */ new Map();
1571
1559
  constructor() {
1572
1560
  }
1573
1561
  on(e, t, r = !1) {
1574
- let s = this[Re].get(e);
1575
- s || (s = new Array(), this[Re].set(e, s));
1576
- let n = new li(t, r === !0 ? it.once : it.limitless);
1577
- return s.push(n), this;
1562
+ let s = this[be].get(e);
1563
+ s || (s = new Array(), this[be].set(e, s));
1564
+ let i = new ni(t, r === !0 ? nt.once : nt.limitless);
1565
+ return s.push(i), this;
1578
1566
  }
1579
1567
  off(e, t) {
1580
1568
  if (!t)
1581
- return this[Re].delete(e), this;
1582
- let r = this[Re].get(e);
1569
+ return this[be].delete(e), this;
1570
+ let r = this[be].get(e);
1583
1571
  if (r) {
1584
1572
  for (let s = 0; s < r.length; s++) if (r[s].callback === t) {
1585
1573
  r.splice(s, 1);
@@ -1603,23 +1591,23 @@ var oi = Fr({
1603
1591
  let r = e[t - 1];
1604
1592
  if (typeof r != "function")
1605
1593
  return console.error("callback can not benn empty"), this;
1606
- let s = t - 1, n = new Array(s), i = [].splice.call(e, 0, s);
1607
- for (let a = 0; a < i.length; a++) this.once(i[a], (o) => {
1608
- n[a] = o, s -= 1, s == 0 && Reflect.apply(r, {}, n);
1594
+ let s = t - 1, i = new Array(s), n = [].splice.call(e, 0, s);
1595
+ for (let a = 0; a < n.length; a++) this.once(n[a], (l) => {
1596
+ i[a] = l, s -= 1, s == 0 && Reflect.apply(r, {}, i);
1609
1597
  });
1610
1598
  return this;
1611
1599
  }
1612
1600
  emit(e, ...t) {
1613
- let r = this[Re].get(e);
1601
+ let r = this[be].get(e);
1614
1602
  if (!r) return this;
1615
1603
  for (let s = 0; s < r.length; ) {
1616
- let n = r[s];
1617
- if (n.policy == it.once ? r.splice(s, 1) : s++, typeof n.callback == "function") try {
1618
- De(() => {
1619
- Reflect.apply(n.callback, {}, t);
1604
+ let i = r[s];
1605
+ if (i.policy == nt.once ? r.splice(s, 1) : s++, typeof i.callback == "function") try {
1606
+ Be(() => {
1607
+ Reflect.apply(i.callback, {}, t);
1620
1608
  });
1621
- } catch (i) {
1622
- console.error(i.message, i);
1609
+ } catch (n) {
1610
+ console.error(n.message, n);
1623
1611
  }
1624
1612
  }
1625
1613
  return this;
@@ -1631,105 +1619,105 @@ var oi = Fr({
1631
1619
  return e[e.Static = 0] = "Static", e[e.Param = 1] = "Param", e[e.Group = 2] = "Group", e;
1632
1620
  })({}), E = /* @__PURE__ */ (function(e) {
1633
1621
  return e[e.Static = 0] = "Static", e[e.Param = 1] = "Param", e[e.ParamRegExp = 2] = "ParamRegExp", e[e.ParamRegExpEnd = 3] = "ParamRegExpEnd", e[e.EscapeNext = 4] = "EscapeNext", e;
1634
- })(E || {}), ai = {
1622
+ })(E || {}), oi = {
1635
1623
  type: ye.Static,
1636
1624
  value: ""
1637
- }, ui = /[a-zA-Z0-9_]/;
1638
- function fi(e) {
1625
+ }, li = /[a-zA-Z0-9_]/;
1626
+ function ai(e) {
1639
1627
  if (!e) return [[]];
1640
- if (e === "/") return [[ai]];
1628
+ if (e === "/") return [[oi]];
1641
1629
  if (!e.startsWith("/")) throw new Error(`Invalid path "${e}"`);
1642
1630
  function t(y) {
1643
1631
  throw new Error(`ERR (${r})/"${u}": ${y}`);
1644
1632
  }
1645
1633
  let r = E.Static, s = r;
1646
- const n = [];
1647
- let i;
1634
+ const i = [];
1635
+ let n;
1648
1636
  function a() {
1649
- i && n.push(i), i = [];
1637
+ n && i.push(n), n = [];
1650
1638
  }
1651
- let o = 0, l, u = "", f = "";
1639
+ let l = 0, o, u = "", f = "";
1652
1640
  function c() {
1653
- u && (r === E.Static ? i.push({
1641
+ u && (r === E.Static ? n.push({
1654
1642
  type: ye.Static,
1655
1643
  value: u
1656
- }) : r === E.Param || r === E.ParamRegExp || r === E.ParamRegExpEnd ? (i.length > 1 && (l === "*" || l === "+") && t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`), i.push({
1644
+ }) : r === E.Param || r === E.ParamRegExp || r === E.ParamRegExpEnd ? (n.length > 1 && (o === "*" || o === "+") && t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`), n.push({
1657
1645
  type: ye.Param,
1658
1646
  value: u,
1659
1647
  regexp: f,
1660
- repeatable: l === "*" || l === "+",
1661
- optional: l === "*" || l === "?"
1648
+ repeatable: o === "*" || o === "+",
1649
+ optional: o === "*" || o === "?"
1662
1650
  })) : t("Invalid state to consume buffer"), u = "");
1663
1651
  }
1664
1652
  function h() {
1665
- u += l;
1653
+ u += o;
1666
1654
  }
1667
- for (; o < e.length; ) {
1668
- if (l = e[o++], l === "\\" && r !== E.ParamRegExp) {
1655
+ for (; l < e.length; ) {
1656
+ if (o = e[l++], o === "\\" && r !== E.ParamRegExp) {
1669
1657
  s = r, r = E.EscapeNext;
1670
1658
  continue;
1671
1659
  }
1672
1660
  switch (r) {
1673
1661
  case E.Static:
1674
- l === "/" ? (u && c(), a()) : l === ":" ? (c(), r = E.Param) : h();
1662
+ o === "/" ? (u && c(), a()) : o === ":" ? (c(), r = E.Param) : h();
1675
1663
  break;
1676
1664
  case E.EscapeNext:
1677
1665
  h(), r = s;
1678
1666
  break;
1679
1667
  case E.Param:
1680
- l === "(" ? r = E.ParamRegExp : ui.test(l) ? h() : (c(), r = E.Static, l !== "*" && l !== "?" && l !== "+" && o--);
1668
+ o === "(" ? r = E.ParamRegExp : li.test(o) ? h() : (c(), r = E.Static, o !== "*" && o !== "?" && o !== "+" && l--);
1681
1669
  break;
1682
1670
  case E.ParamRegExp:
1683
- l === ")" ? f[f.length - 1] == "\\" ? f = f.slice(0, -1) + l : r = E.ParamRegExpEnd : f += l;
1671
+ o === ")" ? f[f.length - 1] == "\\" ? f = f.slice(0, -1) + o : r = E.ParamRegExpEnd : f += o;
1684
1672
  break;
1685
1673
  case E.ParamRegExpEnd:
1686
- c(), r = E.Static, l !== "*" && l !== "?" && l !== "+" && o--, f = "";
1674
+ c(), r = E.Static, o !== "*" && o !== "?" && o !== "+" && l--, f = "";
1687
1675
  break;
1688
1676
  default:
1689
1677
  t("Unknown state");
1690
1678
  break;
1691
1679
  }
1692
1680
  }
1693
- return r === E.ParamRegExp && t(`Unfinished custom RegExp for param "${u}"`), c(), a(), n;
1681
+ return r === E.ParamRegExp && t(`Unfinished custom RegExp for param "${u}"`), c(), a(), i;
1694
1682
  }
1695
- var mr = "[^/]+?", ci = {
1683
+ var dr = "[^/]+?", ui = {
1696
1684
  sensitive: !1,
1697
1685
  strict: !1,
1698
1686
  start: !0,
1699
1687
  end: !0
1700
1688
  }, W = /* @__PURE__ */ (function(e) {
1701
1689
  return e[e._multiplier = 10] = "_multiplier", e[e.Root = 90] = "Root", e[e.Segment = 40] = "Segment", e[e.SubSegment = 30] = "SubSegment", e[e.Static = 40] = "Static", e[e.Dynamic = 20] = "Dynamic", e[e.BonusCustomRegExp = 10] = "BonusCustomRegExp", e[e.BonusWildcard = -50] = "BonusWildcard", e[e.BonusRepeatable = -20] = "BonusRepeatable", e[e.BonusOptional = -8] = "BonusOptional", e[e.BonusStrict = 0.7000000000000001] = "BonusStrict", e[e.BonusCaseSensitive = 0.25] = "BonusCaseSensitive", e;
1702
- })(W || {}), hi = /[.+*?^${}()[\]/\\]/g;
1703
- function yi(e, t) {
1704
- const r = _(!0, {}, ci, t), s = [];
1705
- let n = r.start ? "^" : "";
1706
- const i = [];
1690
+ })(W || {}), fi = /[.+*?^${}()[\]/\\]/g;
1691
+ function ci(e, t) {
1692
+ const r = q(!0, {}, ui, t), s = [];
1693
+ let i = r.start ? "^" : "";
1694
+ const n = [];
1707
1695
  for (const u of e) {
1708
1696
  const f = u.length ? [] : [W.Root];
1709
- r.strict && !u.length && (n += "/");
1697
+ r.strict && !u.length && (i += "/");
1710
1698
  for (let c = 0; c < u.length; c++) {
1711
1699
  const h = u[c];
1712
1700
  let y = W.Segment + (r.sensitive ? W.BonusCaseSensitive : 0);
1713
1701
  if (h.type === ye.Static)
1714
- c || (n += "/"), n += h.value.replace(hi, "\\$&"), y += W.Static;
1702
+ c || (i += "/"), i += h.value.replace(fi, "\\$&"), y += W.Static;
1715
1703
  else if (h.type === ye.Param) {
1716
- const { value: d, repeatable: m, optional: b, regexp: g } = h;
1717
- i.push({
1704
+ const { value: d, repeatable: m, optional: w, regexp: g } = h;
1705
+ n.push({
1718
1706
  name: d,
1719
1707
  repeatable: m,
1720
- optional: b
1708
+ optional: w
1721
1709
  });
1722
- const v = g || mr;
1723
- if (v !== mr) {
1710
+ const v = g || dr;
1711
+ if (v !== dr) {
1724
1712
  y += W.BonusCustomRegExp;
1725
1713
  try {
1726
1714
  new RegExp(`(${v})`);
1727
- } catch (T) {
1728
- throw new Error(`Invalid custom RegExp for param "${d}" (${v}): ` + T.message);
1715
+ } catch (M) {
1716
+ throw new Error(`Invalid custom RegExp for param "${d}" (${v}): ` + M.message);
1729
1717
  }
1730
1718
  }
1731
1719
  let j = m ? `((?:${v})(?:/(?:${v}))*)` : `(${v})`;
1732
- c || (j = b && u.length < 2 ? `(?:/${j})` : "/" + j), b && (j += "?"), n += j, y += W.Dynamic, b && (y += W.BonusOptional), m && (y += W.BonusRepeatable), v === ".*" && (y += W.BonusWildcard);
1720
+ c || (j = w && u.length < 2 ? `(?:/${j})` : "/" + j), w && (j += "?"), i += j, y += W.Dynamic, w && (y += W.BonusOptional), m && (y += W.BonusRepeatable), v === ".*" && (y += W.BonusWildcard);
1733
1721
  }
1734
1722
  f.push(y);
1735
1723
  }
@@ -1739,27 +1727,27 @@ function yi(e, t) {
1739
1727
  const u = s.length - 1;
1740
1728
  s[u][s[u].length - 1] += W.BonusStrict;
1741
1729
  }
1742
- r.strict || (n += "/?"), r.end ? n += "$" : r.strict && !n.endsWith("/") && (n += "(?:/|$)");
1743
- const a = new RegExp(n, r.sensitive ? "" : "i");
1744
- function o(u) {
1730
+ r.strict || (i += "/?"), r.end ? i += "$" : r.strict && !i.endsWith("/") && (i += "(?:/|$)");
1731
+ const a = new RegExp(i, r.sensitive ? "" : "i");
1732
+ function l(u) {
1745
1733
  const f = u.match(a), c = {};
1746
1734
  if (!f) return null;
1747
1735
  for (let h = 1; h < f.length; h++) {
1748
- const y = f[h] || "", d = i[h - 1];
1736
+ const y = f[h] || "", d = n[h - 1];
1749
1737
  c[d.name] = y && d.repeatable ? y.split("/") : y;
1750
1738
  }
1751
1739
  return c;
1752
1740
  }
1753
- function l(u) {
1741
+ function o(u) {
1754
1742
  let f = "", c = !1;
1755
1743
  for (const h of e) {
1756
1744
  (!c || !f.endsWith("/")) && (f += "/"), c = !1;
1757
1745
  for (const y of h) if (y.type === ye.Static) f += y.value;
1758
1746
  else if (y.type === ye.Param) {
1759
- const { value: d, repeatable: m, optional: b } = y, g = d in u ? u[d] : "";
1760
- if (tr(g) && !m) throw new Error(`Provided param "${d}" is an array but it is not repeatable (* or + modifiers)`);
1761
- const v = tr(g) ? g.join("/") : g;
1762
- if (!v) if (b)
1747
+ const { value: d, repeatable: m, optional: w } = y, g = d in u ? u[d] : "";
1748
+ if (er(g) && !m) throw new Error(`Provided param "${d}" is an array but it is not repeatable (* or + modifiers)`);
1749
+ const v = er(g) ? g.join("/") : g;
1750
+ if (!v) if (w)
1763
1751
  h.length < 2 && (f.endsWith("/") ? f = f.slice(0, -1) : c = !0);
1764
1752
  else throw new Error(`Missing required param "${d}"`);
1765
1753
  f += v;
@@ -1770,29 +1758,29 @@ function yi(e, t) {
1770
1758
  return {
1771
1759
  re: a,
1772
1760
  score: s,
1773
- keys: i,
1774
- parse: o,
1775
- stringify: l
1761
+ keys: n,
1762
+ parse: l,
1763
+ stringify: o
1776
1764
  };
1777
1765
  }
1778
- function di(e, t) {
1779
- const r = yi(fi(e), t);
1766
+ function hi(e, t) {
1767
+ const r = ci(ai(e), t);
1780
1768
  return function(s) {
1781
- const n = r.parse(s);
1782
- return n ? {
1769
+ const i = r.parse(s);
1770
+ return i ? {
1783
1771
  path: s,
1784
- params: n
1772
+ params: i
1785
1773
  } : null;
1786
1774
  };
1787
1775
  }
1788
- var Et = /* @__PURE__ */ (function(e) {
1776
+ var Pt = /* @__PURE__ */ (function(e) {
1789
1777
  return e[e.Part = 0] = "Part", e[e.All = 1] = "All", e;
1790
- })({}), mi = class {
1778
+ })({}), yi = class {
1791
1779
  time;
1792
1780
  route;
1793
- }, vi = class {
1781
+ }, di = class {
1794
1782
  forbidTime = 300;
1795
- submitRecorder = new mi();
1783
+ submitRecorder = new yi();
1796
1784
  isSameRoute(e, t) {
1797
1785
  return e == null || t == null ? !1 : e.name === t.name && e.path === t.path && e.root === t.root;
1798
1786
  }
@@ -1807,13 +1795,13 @@ var Et = /* @__PURE__ */ (function(e) {
1807
1795
  release(e) {
1808
1796
  this.submitRecorder.time === e && (this.submitRecorder.route = void 0);
1809
1797
  }
1810
- }, xe = Symbol("_notifyChange"), vr = class {
1798
+ }, Se = Symbol("_notifyChange"), mr = class {
1811
1799
  currentRoute;
1812
1800
  routes;
1813
1801
  constructor(e, t) {
1814
1802
  this.currentRoute = e, this.routes = t;
1815
1803
  }
1816
- }, le = Symbol("historyChangeConsumerKey"), pr = Symbol("_navigateFirstRoute"), Je = Symbol("_getRouteMark"), Ct = Symbol("_getUrlSearch"), At = Symbol("_generateLocation"), ze = Symbol("_setRouteMarkRecorder"), Ke = Symbol("beforeRestoreFiltersKey"), gr = Symbol("_beforeRestore"), br = "Symbol(_fox_restore_point)";
1804
+ }, le = Symbol("historyChangeConsumerKey"), vr = Symbol("_navigateFirstRoute"), ze = Symbol("_getRouteMark"), Et = Symbol("_getUrlSearch"), _t = Symbol("_generateLocation"), Ge = Symbol("_setRouteMarkRecorder"), $e = Symbol("beforeRestoreFiltersKey"), pr = Symbol("_beforeRestore"), gr = "Symbol(_fox_restore_point)";
1817
1805
  function qe(e, ...t) {
1818
1806
  return typeof e == "function" ? Reflect.apply(e, null, [...t]) : e;
1819
1807
  }
@@ -1834,13 +1822,13 @@ var ss = class {
1834
1822
  changeHandler;
1835
1823
  historyChange;
1836
1824
  [le] = !1;
1837
- [Ke] = new Array();
1825
+ [$e] = new Array();
1838
1826
  backTimeout = 320;
1839
- constructor(e = "hash", t = "", r = "", s = !0, n = !0, i = !1, a, o) {
1840
- this.mode = e, this.base = t, this.query = r, this.firstNavigate = s, this.historyMonitor = n, this.traceless = i, this.storage = a ?? A().sessionStorage, this.backTimeout = o ?? 320;
1827
+ constructor(e = "hash", t = "", r = "", s = !0, i = !0, n = !1, a, l) {
1828
+ this.mode = e, this.base = t, this.query = r, this.firstNavigate = s, this.historyMonitor = i, this.traceless = n, this.storage = a ?? F().sessionStorage, this.backTimeout = l ?? 320;
1841
1829
  }
1842
1830
  init(e = !0) {
1843
- const t = A();
1831
+ const t = F();
1844
1832
  return typeof this.historyChange != "function" && (this.historyChange = () => {
1845
1833
  if (typeof this[le] == "function") {
1846
1834
  const r = this[le]();
@@ -1851,51 +1839,51 @@ var ss = class {
1851
1839
  }
1852
1840
  if (qe(this.historyMonitor)) {
1853
1841
  const r = t.history.state;
1854
- this[xe](r);
1842
+ this[Se](r);
1855
1843
  try {
1856
1844
  let s = [];
1857
1845
  if (typeof r == "string" ? s = JSON.parse(r) : s = r, Array.isArray(s) && s.length > 0) {
1858
- const n = this[Je]() ?? "/";
1859
- this[ze](n, s);
1846
+ const i = this[ze]() ?? "/";
1847
+ this[Ge](i, s);
1860
1848
  }
1861
1849
  } catch {
1862
1850
  }
1863
1851
  }
1864
- }), nt(t, "popstate", this.historyChange), this.firstNavigate && e && this[pr](), Promise.resolve();
1852
+ }), ot(t, "popstate", this.historyChange), this.firstNavigate && e && this[vr](), Promise.resolve();
1865
1853
  }
1866
1854
  destroy() {
1867
- this.historyChange && Jt(A(), "popstate", this.historyChange);
1855
+ this.historyChange && Wt(F(), "popstate", this.historyChange);
1868
1856
  }
1869
- [gr](e, t, r, s) {
1870
- for (let n of this[Ke]) try {
1871
- const i = Reflect.apply(n, {}, [
1857
+ [pr](e, t, r, s) {
1858
+ for (let i of this[$e]) try {
1859
+ const n = Reflect.apply(i, {}, [
1872
1860
  e,
1873
1861
  t,
1874
1862
  r,
1875
1863
  s
1876
1864
  ]);
1877
- if (i === !1) return i;
1878
- } catch (i) {
1879
- console.error(i.message, i);
1865
+ if (n === !1) return n;
1866
+ } catch (n) {
1867
+ console.error(n.message, n);
1880
1868
  }
1881
1869
  return !0;
1882
1870
  }
1883
1871
  beforeRestoreEach(e) {
1884
- this[Ke].push(e);
1872
+ this[$e].push(e);
1885
1873
  }
1886
1874
  removeBeforeRestoreEach(e) {
1887
- const t = this[Ke].indexOf(e);
1888
- return t !== -1 ? (this[Ke].splice(t, 1), !0) : !1;
1875
+ const t = this[$e].indexOf(e);
1876
+ return t !== -1 ? (this[$e].splice(t, 1), !0) : !1;
1889
1877
  }
1890
- [pr]() {
1891
- const e = this[Je]() ?? "/", t = this.storage.getItem(br);
1878
+ [vr]() {
1879
+ const e = this[ze]() ?? "/", t = this.storage.getItem(gr);
1892
1880
  if (t) try {
1893
- const i = JSON.parse(t);
1894
- if (i.mark === e && Array.isArray(i.routes) && i.routes.length > 0) {
1895
- const a = i.routes.filter((o, l) => (o.params = o.params ? jr(o.params) : {}, this[gr](o, l, e, i.routes)));
1881
+ const n = JSON.parse(t);
1882
+ if (n.mark === e && Array.isArray(n.routes) && n.routes.length > 0) {
1883
+ const a = n.routes.filter((l, o) => (l.params = l.params ? jr(l.params) : {}, this[pr](l, o, e, n.routes)));
1896
1884
  if (a.length > 0) {
1897
- const o = this[Ct](), l = a.length - 1;
1898
- a[l].query = o || a[l].query, this[xe](a);
1885
+ const l = this[Et](), o = a.length - 1;
1886
+ a[o].query = l || a[o].query, this[Se](a);
1899
1887
  return;
1900
1888
  }
1901
1889
  }
@@ -1904,32 +1892,32 @@ var ss = class {
1904
1892
  const r = e.indexOf("!");
1905
1893
  let s;
1906
1894
  r != -1 ? s = e.substring(r + 1) : s = e;
1907
- const n = new x();
1908
- n.path = s, n.query = this[Ct](), this[xe]([n]);
1895
+ const i = new x();
1896
+ i.path = s, i.query = this[Et](), this[Se]([i]);
1909
1897
  }
1910
- [ze](e, t) {
1898
+ [Ge](e, t) {
1911
1899
  try {
1912
- t.forEach((n) => {
1913
- n.params = n.params ? qr(n.params) : {};
1900
+ t.forEach((i) => {
1901
+ i.params = i.params ? qr(i.params) : {};
1914
1902
  });
1915
1903
  const s = JSON.stringify({
1916
1904
  mark: e,
1917
1905
  routes: t
1918
1906
  });
1919
- this.storage.setItem(br, s);
1907
+ this.storage.setItem(gr, s);
1920
1908
  } catch (r) {
1921
1909
  console.error(r.message, r);
1922
1910
  }
1923
1911
  }
1924
1912
  setRestorePoint(e) {
1925
- const t = this[Je]() ?? "/";
1926
- this[ze](t, e);
1913
+ const t = this[ze]() ?? "/";
1914
+ this[Ge](t, e);
1927
1915
  }
1928
- [xe](e) {
1916
+ [Se](e) {
1929
1917
  typeof this.changeHandler == "function" && this.changeHandler(e);
1930
1918
  }
1931
- [Je]() {
1932
- const e = A();
1919
+ [ze]() {
1920
+ const e = F();
1933
1921
  if (this.mode === "path") {
1934
1922
  let t = e.location.pathname;
1935
1923
  return this.base && t.indexOf(this.base) === 0 && (t = t.substring(this.base.length)), t;
@@ -1939,39 +1927,39 @@ var ss = class {
1939
1927
  }
1940
1928
  return null;
1941
1929
  }
1942
- [Ct]() {
1943
- let e = A().location.search;
1930
+ [Et]() {
1931
+ let e = F().location.search;
1944
1932
  return e.length > 0 && e.indexOf("?") === 0 && (e = e.substring(1)), e;
1945
1933
  }
1946
1934
  listen(e) {
1947
1935
  this.changeHandler = e;
1948
1936
  }
1949
1937
  go(e, t = !1) {
1950
- const r = A();
1938
+ const r = F();
1951
1939
  this[le] = t, r.history.go(e);
1952
1940
  }
1953
1941
  goBack(e, t) {
1954
- const r = A(), s = r.history.state;
1942
+ const r = F(), s = r.history.state;
1955
1943
  if (wr(s) && s.length > 0) {
1956
- let n = !1;
1944
+ let i = !1;
1957
1945
  for (let u = s.length - 1; u >= 0; u--) {
1958
1946
  const f = x.from(s[u]);
1959
1947
  if (!(f.historyUpdatePolicy === "traceless" || qe(this.traceless, f)) && x.isSame(f, e)) {
1960
- n = !0;
1948
+ i = !0;
1961
1949
  break;
1962
1950
  }
1963
1951
  }
1964
- if (!n) {
1952
+ if (!i) {
1965
1953
  t();
1966
1954
  return;
1967
1955
  }
1968
- const i = this.backTimeout;
1956
+ const n = this.backTimeout;
1969
1957
  let a = null;
1970
- const o = () => {
1971
- r.history.go(-1), a = setTimeout(o, i);
1972
- }, l = () => {
1958
+ const l = () => {
1959
+ r.history.go(-1), a = setTimeout(l, n);
1960
+ }, o = () => {
1973
1961
  clearTimeout(a);
1974
- const u = A().history.state;
1962
+ const u = F().history.state;
1975
1963
  if (wr(u) && u.length > 0) {
1976
1964
  let f = u.length;
1977
1965
  const c = u[f - 1], h = x.from(c);
@@ -1987,53 +1975,53 @@ var ss = class {
1987
1975
  }
1988
1976
  }
1989
1977
  return y ? (setTimeout(() => {
1990
- a = setTimeout(o, i), this.go(-1, l);
1978
+ a = setTimeout(l, n), this.go(-1, o);
1991
1979
  }, 0), !0) : (t(), !0);
1992
1980
  }
1993
1981
  }
1994
1982
  return t(), !0;
1995
1983
  };
1996
- a = setTimeout(o, i), this.go(-1, l);
1984
+ a = setTimeout(l, n), this.go(-1, o);
1997
1985
  } else t();
1998
1986
  }
1999
1987
  setRouteMark(e) {
2000
1988
  const t = e.currentRoute.fullPath;
2001
- this[ze](t, e.routes);
1989
+ this[Ge](t, e.routes);
2002
1990
  }
2003
1991
  push(e) {
2004
- const t = this[At](e.currentRoute);
2005
- e.currentRoute.historyUpdatePolicy !== "traceless" && !qe(this.traceless, e.currentRoute) && A().history.pushState(e.routes, "", t), this.setRouteMark(e);
1992
+ const t = this[_t](e.currentRoute);
1993
+ e.currentRoute.historyUpdatePolicy !== "traceless" && !qe(this.traceless, e.currentRoute) && F().history.pushState(e.routes, "", t), this.setRouteMark(e);
2006
1994
  }
2007
1995
  replace(e) {
2008
- const t = this[At](e.currentRoute);
2009
- (e.currentRoute.historyUpdatePolicy !== "traceless" || !qe(this.traceless, e.currentRoute)) && A().history.replaceState(e.routes, "", t), this.setRouteMark(e);
1996
+ const t = this[_t](e.currentRoute);
1997
+ (e.currentRoute.historyUpdatePolicy !== "traceless" || !qe(this.traceless, e.currentRoute)) && F().history.replaceState(e.routes, "", t), this.setRouteMark(e);
2010
1998
  }
2011
- [At](e) {
2012
- const t = A();
1999
+ [_t](e) {
2000
+ const t = F();
2013
2001
  let r = "";
2014
2002
  if (e.query) {
2015
2003
  let a = "";
2016
- if (typeof e.query == "object") for (let o of Reflect.ownKeys(e.query)) {
2017
- let l = encodeURIComponent(e.query[o]), u = `${encodeURIComponent(String(o))}=${l}`;
2004
+ if (typeof e.query == "object") for (let l of Reflect.ownKeys(e.query)) {
2005
+ let o = encodeURIComponent(e.query[l]), u = `${encodeURIComponent(String(l))}=${o}`;
2018
2006
  a.length > 0 && (a += "&"), a += u;
2019
2007
  }
2020
2008
  else a = e.query;
2021
2009
  this.query ? (r = a.length > 0 ? `${this.query}&${a}` : this.query, r.length > 0 && r.charAt(0) !== "?" && (r = `?${r}`)) : a.length > 0 && (r = `?${a}`);
2022
2010
  }
2023
2011
  const s = t.location;
2024
- let n = e.alias ?? e.fullPath;
2025
- n.startsWith("default") && (n = n.substring(Mr.length + 1));
2026
- let i;
2027
- return r ? this.mode == "path" ? n.indexOf("/") === 0 ? i = `${this.base}${n}${r}` : i = `${this.base}/${n}${r}` : i = `${s.pathname}${r}#${n}` : this.mode == "path" ? n.indexOf("/") === 0 ? i = `${this.base}${n}` : i = `${this.base}/${n}` : i = `${s.pathname}#${n}`, `${s.origin}${i}`;
2012
+ let i = e.alias ?? e.fullPath;
2013
+ i.startsWith("default") && (i = i.substring(Or.length + 1));
2014
+ let n;
2015
+ return r ? this.mode == "path" ? i.indexOf("/") === 0 ? n = `${this.base}${i}${r}` : n = `${this.base}/${i}${r}` : n = `${s.pathname}${r}#${i}` : this.mode == "path" ? i.indexOf("/") === 0 ? n = `${this.base}${i}` : n = `${this.base}/${i}` : n = `${s.pathname}#${i}`, `${s.origin}${n}`;
2028
2016
  }
2029
2017
  };
2030
- function Hi(e = !0, t = null, r = "", s = !0, n = !1, i) {
2031
- return t !== null && (t = A().location.pathname), t && t.endsWith("/") && (t = t.substring(0, t.length - 1)), new ss("path", t ?? "", r, e, s, n, i);
2018
+ function Ni(e = !0, t = null, r = "", s = !0, i = !1, n) {
2019
+ return t !== null && (t = F().location.pathname), t && t.endsWith("/") && (t = t.substring(0, t.length - 1)), new ss("path", t ?? "", r, e, s, i, n);
2032
2020
  }
2033
- function pi(e = !0, t = "", r = !0, s = !1, n) {
2034
- return new ss("hash", "", t, e, r, s, n);
2021
+ function mi(e = !0, t = "", r = !0, s = !1, i) {
2022
+ return new ss("hash", "", t, e, r, s, i);
2035
2023
  }
2036
- var gi = class {
2024
+ var vi = class {
2037
2025
  maxSize = 50;
2038
2026
  cursor = -1;
2039
2027
  queue = [];
@@ -2058,7 +2046,7 @@ var gi = class {
2058
2046
  listen(e) {
2059
2047
  this.changeHandler = e;
2060
2048
  }
2061
- [xe](e) {
2049
+ [Se](e) {
2062
2050
  typeof this.changeHandler == "function" && this.changeHandler(e);
2063
2051
  }
2064
2052
  go(e, t = !1) {
@@ -2068,8 +2056,8 @@ var gi = class {
2068
2056
  this.cursor = r;
2069
2057
  let s = !1;
2070
2058
  if (typeof t == "function" ? s = t() : s = t, !s) {
2071
- const n = this.queue[r];
2072
- this[xe](n.routes);
2059
+ const i = this.queue[r];
2060
+ this[Se](i.routes);
2073
2061
  }
2074
2062
  }
2075
2063
  }
@@ -2078,8 +2066,8 @@ var gi = class {
2078
2066
  let r = 0;
2079
2067
  if (e === null) r = this.cursor + 1;
2080
2068
  else for (let s = this.cursor; s >= 0; s--) {
2081
- const n = this.queue[s];
2082
- if (x.isSame(n.currentRoute, e)) break;
2069
+ const i = this.queue[s];
2070
+ if (x.isSame(i.currentRoute, e)) break;
2083
2071
  r++;
2084
2072
  }
2085
2073
  if (r === 0) {
@@ -2100,74 +2088,74 @@ var gi = class {
2100
2088
  setRestorePoint(e) {
2101
2089
  }
2102
2090
  };
2103
- function bi(e = "", t = 50) {
2104
- return new gi(e, t);
2091
+ function pi(e = "", t = 50) {
2092
+ return new vi(e, t);
2105
2093
  }
2106
- var Ge = Symbol("_constructRouteModel"), Xe = Symbol("_findRouteModel"), Ft = Symbol("_findRootView"), wi = Symbol("_getFirstView"), ae = Symbol("_removeView"), Rr = Symbol("_buildPage"), Sr = Symbol("_resolveComponent"), xr = Symbol("_update"), ie = Symbol("_merge"), _t = Symbol("_handleHistoryChange"), ue = Symbol("_handleRouteUpdated"), Qe = Symbol("routeUpdatedCallback"), $t = Symbol("currentRoute"), p = Symbol("currentRoutes"), Ye = Symbol("routeSessionCacheKey"), Pr = Symbol("_addRouteRecorder"), je = Symbol("_removeRouteRecorder"), Ze = Symbol("_cloneRouteRecorder"), q = Symbol("_handleError"), et = Symbol("errorCallback"), N = Symbol("registerKey"), tt = Symbol("notFoundKey"), Kt = Symbol("notFoundPathKey"), V = Symbol("forestKey"), S = Symbol("historyKey"), Te = Symbol("beforeFiltersKey"), Le = Symbol("afterFiltersKey"), Oe = Symbol("destroyFiltersKey"), qt = Symbol("propsFilterKey"), Se = Symbol("mainDispatcherKey"), jt = Symbol("initKey"), fe = Symbol("readyKey"), Tt = Symbol("readyHandlersKey"), rt = Symbol("_markReady"), Er = Symbol("_createNextFn"), Lt = Symbol("_start"), Ot = Symbol("_before"), kt = Symbol("_after"), Cr = Symbol("_destroy"), It = Symbol("_load"), ke = Symbol("_unload"), Ie = Symbol("routerGuardKey"), Ui = Symbol.for("loadViewModel");
2107
- function Ri(e) {
2094
+ var Xe = Symbol("_constructRouteModel"), Qe = Symbol("_findRouteModel"), Ct = Symbol("_findRootView"), gi = Symbol("_getFirstView"), ae = Symbol("_removeView"), br = Symbol("_buildPage"), Rr = Symbol("_resolveComponent"), Sr = Symbol("_update"), ie = Symbol("_merge"), Ft = Symbol("_handleHistoryChange"), ue = Symbol("_handleRouteUpdated"), Ze = Symbol("routeUpdatedCallback"), At = Symbol("currentRoute"), p = Symbol("currentRoutes"), Ye = Symbol("routeSessionCacheKey"), xr = Symbol("_addRouteRecorder"), je = Symbol("_removeRouteRecorder"), et = Symbol("_cloneRouteRecorder"), $ = Symbol("_handleError"), tt = Symbol("errorCallback"), D = Symbol("registerKey"), rt = Symbol("notFoundKey"), Kt = Symbol("notFoundPathKey"), V = Symbol("forestKey"), S = Symbol("historyKey"), Me = Symbol("beforeFiltersKey"), Le = Symbol("afterFiltersKey"), Te = Symbol("destroyFiltersKey"), $t = Symbol("propsFilterKey"), Re = Symbol("mainDispatcherKey"), qt = Symbol("initKey"), fe = Symbol("readyKey"), jt = Symbol("readyHandlersKey"), st = Symbol("_markReady"), Pr = Symbol("_createNextFn"), Mt = Symbol("_start"), Lt = Symbol("_before"), Tt = Symbol("_after"), Er = Symbol("_destroy"), kt = Symbol("_load"), ke = Symbol("_unload"), Ie = Symbol("routerGuardKey"), Ui = Symbol.for("loadViewModel");
2095
+ function wi(e) {
2108
2096
  return e.layers.length == 0 || e.layers[0].views.length == 0;
2109
2097
  }
2110
- var Si = class {
2111
- [N] = new Array();
2112
- [tt];
2098
+ var bi = class {
2099
+ [D] = new Array();
2100
+ [rt];
2113
2101
  [Kt] = "*";
2114
2102
  [fe] = !1;
2115
- [Tt] = [];
2116
- [V] = new ti();
2103
+ [jt] = [];
2104
+ [V] = new Ys();
2117
2105
  [S];
2118
2106
  [p] = new Array();
2119
- [$t] = _r(null);
2107
+ [At] = Ar(null);
2120
2108
  [Ye] = /* @__PURE__ */ new WeakMap();
2121
- [et] = null;
2122
- [Qe] = null;
2123
- [Te] = new Array();
2109
+ [tt] = null;
2110
+ [Ze] = null;
2111
+ [Me] = new Array();
2124
2112
  [Le] = new Array();
2125
- [Oe] = new Array();
2126
- [qt] = null;
2127
- [Se] = new ut();
2128
- [Ie] = new vi();
2129
- [jt] = !1;
2113
+ [Te] = new Array();
2114
+ [$t] = null;
2115
+ [Re] = new ft();
2116
+ [Ie] = new di();
2117
+ [qt] = !1;
2130
2118
  get currentRoute() {
2131
- return cs(this[$t]);
2119
+ return fs(this[At]);
2132
2120
  }
2133
2121
  options;
2134
2122
  constructor(e) {
2135
2123
  this.options = e ?? {}, this.options.notFoundPath && this.setNotFoundPath(this.options.notFoundPath);
2136
2124
  let t = this.options.routes || [];
2137
- this.addRoutes(t), this.options.notFound && this.setNotFoundRoute(this.options.notFound), e.history ? this[S] = e.history : this[S] = me ? pi() : bi(), this[S]?.listen(async (r) => {
2125
+ this.addRoutes(t), this.options.notFound && this.setNotFoundRoute(this.options.notFound), e.history ? this[S] = e.history : this[S] = Pe ? mi() : pi(), this[S]?.listen(async (r) => {
2138
2126
  let s = !0;
2139
2127
  try {
2140
2128
  if (typeof r == "string") {
2141
- const n = this[M](r);
2142
- n && await this[_t]([n]);
2143
- } else await this[_t](r);
2144
- } catch (n) {
2145
- console.error(n.message, n), s = !1;
2129
+ const i = this[I](r);
2130
+ i && await this[Ft]([i]);
2131
+ } else await this[Ft](r);
2132
+ } catch (i) {
2133
+ console.error(i.message, i), s = !1;
2146
2134
  }
2147
- this[fe] === !1 && this[rt](s);
2135
+ this[fe] === !1 && this[st](s);
2148
2136
  });
2149
2137
  }
2150
- [q](e = "error", t) {
2138
+ [$](e = "error", t) {
2151
2139
  if (t && typeof t.error == "function") try {
2152
2140
  t.error(e);
2153
2141
  } catch {
2154
2142
  }
2155
- if (typeof this[et] == "function") try {
2156
- this[et](e, t);
2143
+ if (typeof this[tt] == "function") try {
2144
+ this[tt](e, t);
2157
2145
  } catch {
2158
2146
  }
2159
2147
  console.error(e);
2160
2148
  }
2161
2149
  init() {
2162
- this[jt] !== !0 && (this[S]?.init(!this[fe]), this[jt] = !0);
2150
+ this[qt] !== !0 && (this[S]?.init(!this[fe]), this[qt] = !0);
2163
2151
  }
2164
2152
  isReady() {
2165
2153
  return this[fe] ? Promise.resolve() : new Promise((e, t) => {
2166
- this[Tt].push([e, t]);
2154
+ this[jt].push([e, t]);
2167
2155
  });
2168
2156
  }
2169
- [rt](e) {
2170
- this[fe] = !0, this[Tt].forEach(([t, r]) => {
2157
+ [st](e) {
2158
+ this[fe] = !0, this[jt].forEach(([t, r]) => {
2171
2159
  try {
2172
2160
  e ? t() : r();
2173
2161
  } catch (s) {
@@ -2175,16 +2163,16 @@ var Si = class {
2175
2163
  }
2176
2164
  });
2177
2165
  }
2178
- [_t](e) {
2166
+ [Ft](e) {
2179
2167
  try {
2180
2168
  if (!e) {
2181
- let i = [...this[p]].reverse();
2182
- return this[ke](i), me && A().location.reload(), Promise.resolve();
2169
+ let n = [...this[p]].reverse();
2170
+ return this[ke](n), Pe && F().location.reload(), Promise.resolve();
2183
2171
  }
2184
- let t = null, r = [], s = [], n = 0;
2185
- for (; n < e.length && n < this[p].length && x.isSame(e[n], this[p][n]); n++)
2186
- e[n].active === !0 && e[n].active !== this[p][n].active && (t = e[n]);
2187
- if (n < e.length && (r = e.slice(n)), n < this[p].length && (s = this[p].slice(n).reverse()), s.length === 0 && r.length === 0) {
2172
+ let t = null, r = [], s = [], i = 0;
2173
+ for (; i < e.length && i < this[p].length && x.isSame(e[i], this[p][i]); i++)
2174
+ e[i].active === !0 && e[i].active !== this[p][i].active && (t = e[i]);
2175
+ if (i < e.length && (r = e.slice(i)), i < this[p].length && (s = this[p].slice(i).reverse()), s.length === 0 && r.length === 0) {
2188
2176
  if (t !== null) return this.restore([t]);
2189
2177
  } else if (s.length > 0) {
2190
2178
  if (this[ke](s)) {
@@ -2193,35 +2181,35 @@ var Si = class {
2193
2181
  }
2194
2182
  } else return this.restore(r);
2195
2183
  } catch (t) {
2196
- this[q](t);
2184
+ this[$](t);
2197
2185
  }
2198
2186
  return Promise.resolve();
2199
2187
  }
2200
2188
  [ue](e = null) {
2201
- if (this[$t].value = e, typeof this[Qe] == "function") try {
2202
- this[Qe](e);
2189
+ if (this[At].value = e, typeof this[Ze] == "function") try {
2190
+ this[Ze](e);
2203
2191
  } catch {
2204
2192
  }
2205
2193
  }
2206
- [Pr](e, t) {
2207
- if (e.opsType === F.Open) {
2194
+ [xr](e, t) {
2195
+ if (e.opsType === C.Open) {
2208
2196
  let r = !1;
2209
2197
  const s = this[p].length - 1;
2210
- for (let n = s; n >= 0; n--) {
2211
- const i = this[p][n];
2212
- if (e.root == i.root) {
2213
- if (e.path === i.path) {
2214
- this[p].splice(n, 1, e), r = !0;
2198
+ for (let i = s; i >= 0; i--) {
2199
+ const n = this[p][i];
2200
+ if (e.root == n.root) {
2201
+ if (e.path === n.path) {
2202
+ this[p].splice(i, 1, e), r = !0;
2215
2203
  continue;
2216
2204
  }
2217
- e.active && (i.active = !1);
2205
+ e.active && (n.active = !1);
2218
2206
  }
2219
2207
  }
2220
2208
  r || this[p].push(e);
2221
2209
  } else this[p].push(e);
2222
2210
  this[Ye].set(e, t), this[ue](e);
2223
2211
  }
2224
- [Ze]() {
2212
+ [et]() {
2225
2213
  let e = [];
2226
2214
  for (let t of this[p]) {
2227
2215
  let r = x.clone(t, !0);
@@ -2243,9 +2231,9 @@ var Si = class {
2243
2231
  const r = this[p][t];
2244
2232
  this[p].splice(t, 1);
2245
2233
  const s = this[Ye].get(r);
2246
- if (this[Ye].delete(r), this[Cr](r, s), r.opsType === F.Append) {
2247
- const n = this[p].length - 1;
2248
- this[ue](this[p][n] ?? null);
2234
+ if (this[Ye].delete(r), this[Er](r, s), r.opsType === C.Append) {
2235
+ const i = this[p].length - 1;
2236
+ this[ue](this[p][i] ?? null);
2249
2237
  } else this[ue](null);
2250
2238
  } else this[ue](null);
2251
2239
  }
@@ -2262,27 +2250,27 @@ var Si = class {
2262
2250
  return this[S] ? this[S].traceless : !1;
2263
2251
  }
2264
2252
  set propsFilter(e) {
2265
- this[qt] = e;
2253
+ this[$t] = e;
2266
2254
  }
2267
2255
  get propsFilter() {
2268
- return this[qt];
2256
+ return this[$t];
2269
2257
  }
2270
2258
  setRestorePoint() {
2271
- const e = this[Ze]();
2259
+ const e = this[et]();
2272
2260
  this[S]?.setRestorePoint(e);
2273
2261
  }
2274
2262
  onRouteUpdated(e) {
2275
- this[Qe] = e;
2263
+ this[Ze] = e;
2276
2264
  }
2277
2265
  onError(e) {
2278
- this[et] = e;
2266
+ this[tt] = e;
2279
2267
  }
2280
2268
  beforeEach(e) {
2281
- this[Te].push(e);
2269
+ this[Me].push(e);
2282
2270
  }
2283
2271
  removeBeforeEach(e) {
2284
- const t = this[Te].indexOf(e);
2285
- return t !== -1 ? (this[Te].splice(t, 1), !0) : !1;
2272
+ const t = this[Me].indexOf(e);
2273
+ return t !== -1 ? (this[Me].splice(t, 1), !0) : !1;
2286
2274
  }
2287
2275
  afterEach(e) {
2288
2276
  this[Le].push(e);
@@ -2292,11 +2280,11 @@ var Si = class {
2292
2280
  return t !== -1 ? (this[Le].splice(t, 1), !0) : !1;
2293
2281
  }
2294
2282
  destroyEach(e) {
2295
- this[Oe].push(e);
2283
+ this[Te].push(e);
2296
2284
  }
2297
2285
  removeDestroyEach(e) {
2298
- const t = this[Oe].indexOf(e);
2299
- return t !== -1 ? (this[Oe].splice(t, 1), !0) : !1;
2286
+ const t = this[Te].indexOf(e);
2287
+ return t !== -1 ? (this[Te].splice(t, 1), !0) : !1;
2300
2288
  }
2301
2289
  beforeRestoreEach(e) {
2302
2290
  this[S]?.beforeRestoreEach(e);
@@ -2312,26 +2300,26 @@ var Si = class {
2312
2300
  this.setNotFoundRoute(e);
2313
2301
  return;
2314
2302
  }
2315
- const r = this[Ge](e);
2316
- if (t == -1) this[N] = [...this[N], ...r];
2317
- else for (let s = r.length - 1; s >= 0; s--) this[N].splice(t, 0, r[s]);
2303
+ const r = this[Xe](e);
2304
+ if (t == -1) this[D] = [...this[D], ...r];
2305
+ else for (let s = r.length - 1; s >= 0; s--) this[D].splice(t, 0, r[s]);
2318
2306
  }
2319
2307
  removeRoute(e) {
2320
- const t = this[M](e);
2308
+ const t = this[I](e);
2321
2309
  if (t === null)
2322
2310
  return console.warn("route格式错误", e), !1;
2323
- for (let r = 0; r < this[N].length; r++) {
2324
- const s = this[N][r];
2311
+ for (let r = 0; r < this[D].length; r++) {
2312
+ const s = this[D][r];
2325
2313
  if (t?.path && s.path === t.path)
2326
- return this[N].splice(r, 1), !0;
2314
+ return this[D].splice(r, 1), !0;
2327
2315
  if (t?.name && s.name === t.name)
2328
- return this[N].splice(r, 1), !0;
2316
+ return this[D].splice(r, 1), !0;
2329
2317
  }
2330
2318
  return !1;
2331
2319
  }
2332
2320
  hasRoute(e) {
2333
- const t = this[M](e);
2334
- return t === null ? (console.warn("route格式错误", e), !1) : this[N].findIndex((r) => {
2321
+ const t = this[I](e);
2322
+ return t === null ? (console.warn("route格式错误", e), !1) : this[D].findIndex((r) => {
2335
2323
  if (t?.path && r.path === t.path || t?.name && r.name === t.name) return !0;
2336
2324
  }) !== -1;
2337
2325
  }
@@ -2339,80 +2327,80 @@ var Si = class {
2339
2327
  this[Kt] = e;
2340
2328
  }
2341
2329
  setNotFoundRoute(e) {
2342
- this[tt] = this[Ge](e)[0];
2330
+ this[rt] = this[Xe](e)[0];
2343
2331
  }
2344
2332
  getRoutes() {
2345
- return [...this[N]];
2333
+ return [...this[D]];
2346
2334
  }
2347
- [Ge](e) {
2335
+ [Xe](e) {
2348
2336
  let t = e.path ?? "";
2349
2337
  t.length > 0 && t.charAt(0) !== "/" && (t = `/${t}`);
2350
2338
  let r = e.components ?? (e.component && { "": e.component });
2351
2339
  if (!r) {
2352
- const o = new gt();
2353
- return o.path = t, o.redirect = e.redirect, [o];
2340
+ const l = new pt();
2341
+ return l.path = t, l.redirect = e.redirect, [l];
2354
2342
  }
2355
2343
  const s = new x();
2356
2344
  s.path = t, s.name = e.name, s.meta = e.meta;
2357
- let n = [];
2358
- for (let o in r) {
2359
- const l = r[o];
2360
- o.length === 0 && (o = Mr);
2361
- const u = new Ks(o, l, e.props);
2362
- n.push(u);
2363
- }
2364
- let i = !1, a = [];
2365
- if (e.children) for (let o of e.children) {
2366
- const l = this[Ge](o);
2367
- for (let u of l) {
2368
- let f = new gt();
2369
- f.name = u.name, u.path && u.path.length > 0 ? t !== "/" ? f.path = `${t}${u.path}` : f.path = u.path : (i = !0, f.path = t);
2370
- let c = new ar();
2371
- c.models = [...n], f.layers = [c, ...u.layers], f.matchedRoutes = [s, ...u.matchedRoutes ?? []], a.push(f);
2372
- }
2373
- }
2374
- if (!i) {
2375
- const o = new ar();
2376
- o.models = n;
2377
- const l = new gt();
2378
- l.name = e.name, l.path = t, l.matchedRoutes = [s], l.layers = [o], a.splice(0, 0, l);
2345
+ let i = [];
2346
+ for (let l in r) {
2347
+ const o = r[l];
2348
+ l.length === 0 && (l = Or);
2349
+ const u = new As(l, o, e.props);
2350
+ i.push(u);
2351
+ }
2352
+ let n = !1, a = [];
2353
+ if (e.children) for (let l of e.children) {
2354
+ const o = this[Xe](l);
2355
+ for (let u of o) {
2356
+ let f = new pt();
2357
+ 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);
2358
+ let c = new lr();
2359
+ c.models = [...i], f.layers = [c, ...u.layers], f.matchedRoutes = [s, ...u.matchedRoutes ?? []], a.push(f);
2360
+ }
2361
+ }
2362
+ if (!n) {
2363
+ const l = new lr();
2364
+ l.models = i;
2365
+ const o = new pt();
2366
+ o.name = e.name, o.path = t, o.matchedRoutes = [s], o.layers = [l], a.splice(0, 0, o);
2379
2367
  }
2380
2368
  return a;
2381
2369
  }
2382
- [Xe](e) {
2370
+ [Qe](e) {
2383
2371
  const t = e.route;
2384
2372
  try {
2385
- for (let r of this[N]) {
2386
- const s = t.path ? t.template ?? t.path : null, n = t.name ? t.template ?? t.name : null;
2373
+ for (let r of this[D]) {
2374
+ const s = t.path ? t.template ?? t.path : null, i = t.name ? t.template ?? t.name : null;
2387
2375
  if (s && r.path) {
2388
- let i = r.match;
2389
- i || (i = r.match = di(r.path));
2390
- const a = i(s);
2376
+ let n = r.match;
2377
+ n || (n = r.match = hi(r.path));
2378
+ const a = n(s);
2391
2379
  if (!a) continue;
2392
2380
  if (r.redirect) {
2393
- const o = new x();
2394
- _(!0, o, t), o.path = r.redirect;
2395
- const l = {
2396
- route: o,
2381
+ const l = new x();
2382
+ q(!0, l, t), l.path = r.redirect;
2383
+ const o = {
2384
+ route: l,
2397
2385
  find: void 0
2398
2386
  };
2399
- return this[Xe](l) ? (e.route = l.route, e.find = l.find, t.template && e.find && (e.find = { ...e.find }, e.find.path = t.path), !0) : !1;
2387
+ return this[Qe](o) ? (e.route = o.route, e.find = o.find, t.template && e.find && (e.find = { ...e.find }, e.find.path = t.path), !0) : !1;
2400
2388
  }
2401
- if (t.params = t.params ?? {}, _(!0, t.params, a.params), t.query) {
2402
- const o = t.query;
2403
- if (typeof o == "string") {
2404
- const l = {}, u = o.split("&");
2389
+ if (t.params = t.params ?? {}, q(!0, t.params, a.params), t.query) {
2390
+ const l = t.query;
2391
+ if (typeof l == "string") {
2392
+ const o = {}, u = l.split("&");
2405
2393
  for (let f of u) {
2406
2394
  const c = f.split("=");
2407
2395
  if (c.length !== 2) continue;
2408
2396
  const h = decodeURIComponent(c[0].trim());
2409
- l[h] = decodeURIComponent(c[1].trim());
2397
+ o[h] = decodeURIComponent(c[1].trim());
2410
2398
  }
2411
- _(!0, t.params, l);
2412
- } else typeof o == "object" && _(!0, t.params, o);
2399
+ q(!0, t.params, o);
2400
+ } else typeof l == "object" && q(!0, t.params, l);
2413
2401
  }
2414
2402
  return e.find = r, t.template && e.find && (e.find = { ...e.find }, e.find.path = t.path), !0;
2415
- } else if (n === r.name)
2403
+ } else if (i === r.name)
2416
2404
  return e.find = r, t.template && e.find && (e.find = { ...e.find }, e.find.name = t.name), !0;
2417
2405
  }
2418
2406
  } catch (r) {
@@ -2420,136 +2408,136 @@ var Si = class {
2420
2408
  }
2421
2409
  return !1;
2422
2410
  }
2423
- [M](e) {
2411
+ [I](e) {
2424
2412
  let t = null;
2425
2413
  if (Array.isArray(e))
2426
2414
  if (t = new x(), typeof e[0] == "object") t = x.from(e[0]);
2427
- 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 && _(!1, t, e[r]);
2415
+ 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 && q(!1, t, e[r]);
2428
2416
  else typeof e == "object" ? t = x.from(e) : typeof e == "string" && (t = new x(), e.charAt(0) == "/" ? t.path = e : t.name = e);
2429
2417
  if (t) {
2430
2418
  if (t.path) {
2431
2419
  let r = t.path.indexOf("?");
2432
2420
  r !== -1 && r < t.path.length - 1 && (t.query = t.path.substring(r + 1), t.path = t.path.substring(0, r));
2433
2421
  }
2434
- t.root = t.root ?? "default", t.opsType = t.opsType ?? this.options.defaultOperationType ?? F.Push, t.traceless && !t.historyUpdatePolicy && (t.historyUpdatePolicy = "traceless");
2422
+ t.root = t.root ?? "default", t.opsType = t.opsType ?? this.options.defaultOperationType ?? C.Push, t.traceless && !t.historyUpdatePolicy && (t.historyUpdatePolicy = "traceless");
2435
2423
  }
2436
2424
  return t;
2437
2425
  }
2438
2426
  push(...e) {
2439
- const t = this[M](e);
2440
- return t ? (t.opsType = F.Push, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "push", this.to(t)) : (this[q]("resolve route fail", t), this);
2427
+ const t = this[I](e);
2428
+ return t ? (t.opsType = C.Push, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "push", this.to(t)) : (this[$]("resolve route fail", t), this);
2441
2429
  }
2442
2430
  put(...e) {
2443
- const t = this[M](e);
2444
- return t ? (t.opsType = F.Put, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "traceless", this.to(t)) : (this[q]("resolve route fail", t), this);
2431
+ const t = this[I](e);
2432
+ return t ? (t.opsType = C.Put, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "traceless", this.to(t)) : (this[$]("resolve route fail", t), this);
2445
2433
  }
2446
2434
  replace(...e) {
2447
- const t = this[M](e);
2448
- return t ? (t.opsType = F.Replace, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "replace", this.to(t)) : (this[q]("resolve route fail", t), this);
2435
+ const t = this[I](e);
2436
+ return t ? (t.opsType = C.Replace, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "replace", this.to(t)) : (this[$]("resolve route fail", t), this);
2449
2437
  }
2450
2438
  append(...e) {
2451
- const t = this[M](e);
2452
- return t ? (t.opsType = F.Append, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "push", this.to(t)) : (this[q]("resolve route fail", t), this);
2439
+ const t = this[I](e);
2440
+ return t ? (t.opsType = C.Append, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "push", this.to(t)) : (this[$]("resolve route fail", t), this);
2453
2441
  }
2454
2442
  remove(e, t) {
2455
2443
  return new Promise((r) => {
2456
- this[Se].post((s) => {
2444
+ this[Re].post((s) => {
2457
2445
  try {
2458
2446
  if (this[p].length === 0) {
2459
2447
  s.resolve(), r(!1);
2460
2448
  return;
2461
2449
  }
2462
- let n = -1, i = null, a = [];
2450
+ let i = -1, n = null, a = [];
2463
2451
  if (e) {
2464
- if (i = e.root ?? null, e.all) for (let l = this[p].length - 1; l > 0; l--) {
2465
- const u = this[p][l];
2466
- if (u.opsType === F.Append) {
2452
+ if (n = e.root ?? null, e.all) for (let o = this[p].length - 1; o > 0; o--) {
2453
+ const u = this[p][o];
2454
+ if (u.opsType === C.Append) {
2467
2455
  const f = u.root ?? "default";
2468
- if (i && i !== f) continue;
2469
- a.splice(0, 0, u), n = l - 1;
2456
+ if (n && n !== f) continue;
2457
+ a.splice(0, 0, u), i = o - 1;
2470
2458
  }
2471
2459
  }
2472
- else if (e.until) for (let l = this[p].length - 1; l > 0; l--) {
2473
- let u = this[p][l];
2474
- if (u.opsType === F.Append && u.root === i) {
2460
+ else if (e.until) for (let o = this[p].length - 1; o > 0; o--) {
2461
+ let u = this[p][o];
2462
+ if (u.opsType === C.Append && u.root === n) {
2475
2463
  if (e.until.charAt(0) === "/" && e.until === u.path) {
2476
- n = l;
2464
+ i = o;
2477
2465
  break;
2478
2466
  } else if (e.until === u.name) {
2479
- n = l;
2467
+ i = o;
2480
2468
  break;
2481
2469
  }
2482
2470
  a.splice(0, 0, u);
2483
2471
  }
2484
2472
  }
2485
- else if (e.to) for (let l = this[p].length - 1; l > 0; l--) {
2486
- const u = this[p][l];
2487
- if (u.opsType === F.Append) {
2473
+ else if (e.to) for (let o = this[p].length - 1; o > 0; o--) {
2474
+ const u = this[p][o];
2475
+ if (u.opsType === C.Append) {
2488
2476
  const f = u.root ?? "default";
2489
- if (i && i !== f) continue;
2477
+ if (n && n !== f) continue;
2490
2478
  if (a.splice(0, 0, u), e.to.charAt(0) === "/" && e.to === u.path) {
2491
- n = l - 1;
2479
+ i = o - 1;
2492
2480
  break;
2493
2481
  } else if (e.to === u.name) {
2494
- n = l - 1;
2482
+ i = o - 1;
2495
2483
  break;
2496
2484
  }
2497
2485
  }
2498
2486
  }
2499
- } else for (let l = this[p].length - 1; l > 0; l--) {
2500
- let u = this[p][l];
2501
- if (u.opsType === F.Append) {
2502
- a.push(u), n = l - 1;
2487
+ } else for (let o = this[p].length - 1; o > 0; o--) {
2488
+ let u = this[p][o];
2489
+ if (u.opsType === C.Append) {
2490
+ a.push(u), i = o - 1;
2503
2491
  break;
2504
2492
  }
2505
2493
  }
2506
- if (n === -1 || a.length === 0) {
2507
- let l = "can not find route";
2508
- console.warn(l), s.resolve(l), r(!1);
2494
+ if (i === -1 || a.length === 0) {
2495
+ let o = "can not find route";
2496
+ console.warn(o), s.resolve(o), r(!1);
2509
2497
  return;
2510
2498
  }
2511
- let o = null;
2512
- if (n !== -1 && (o = this[p][n]), this[ke](a)) {
2499
+ let l = null;
2500
+ if (i !== -1 && (l = this[p][i]), this[ke](a)) {
2513
2501
  if (t === !1)
2514
2502
  return s.resolve(), r(!0), !0;
2515
- const l = () => (s.resolve(), r(!0), !0), u = this[p].length;
2516
- if (o && x.isSame(o, this[p][u - 1])) {
2517
- this[S]?.goBack(o, l);
2503
+ const o = () => (s.resolve(), r(!0), !0), u = this[p].length;
2504
+ if (l && x.isSame(l, this[p][u - 1])) {
2505
+ this[S]?.goBack(l, o);
2518
2506
  return;
2519
2507
  }
2520
- l();
2508
+ o();
2521
2509
  }
2522
- } catch (n) {
2523
- this[q](n), s.resolve(), r(!1);
2510
+ } catch (i) {
2511
+ this[$](i), s.resolve(), r(!1);
2524
2512
  }
2525
2513
  });
2526
2514
  });
2527
2515
  }
2528
2516
  open(...e) {
2529
- let t = this[M](e);
2530
- return t ? (t.opsType = F.Open, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "push", this.to(t)) : (this[q]("resolve route fail", t), this);
2517
+ let t = this[I](e);
2518
+ return t ? (t.opsType = C.Open, t.historyUpdatePolicy = t.historyUpdatePolicy ?? "push", this.to(t)) : (this[$]("resolve route fail", t), this);
2531
2519
  }
2532
2520
  close(e) {
2533
- return this[Se].post((t) => {
2521
+ return this[Re].post((t) => {
2534
2522
  try {
2535
- let r = this[M](e);
2523
+ let r = this[I](e);
2536
2524
  if (!r) {
2537
2525
  t.reject("resolve route fail");
2538
2526
  return;
2539
2527
  }
2540
2528
  let s = [];
2541
- for (let n = 0; n < this[p].length; n++) {
2542
- let i = this[p][n];
2543
- if (i.root === r.root) {
2529
+ for (let i = 0; i < this[p].length; i++) {
2530
+ let n = this[p][i];
2531
+ if (n.root === r.root) {
2544
2532
  if (!r.path && !r.name) {
2545
- s.push(i);
2533
+ s.push(n);
2546
2534
  continue;
2547
2535
  }
2548
- if (r.path && r.path === i.path) {
2549
- s.push(i);
2536
+ if (r.path && r.path === n.path) {
2537
+ s.push(n);
2550
2538
  break;
2551
- } else if (r.name && r.name === i.name) {
2552
- s.push(i);
2539
+ } else if (r.name && r.name === n.name) {
2540
+ s.push(n);
2553
2541
  break;
2554
2542
  }
2555
2543
  }
@@ -2560,77 +2548,77 @@ var Si = class {
2560
2548
  }
2561
2549
  this[ke](s), t.resolve();
2562
2550
  } catch (r) {
2563
- this[q](r), t.resolve();
2551
+ this[$](r), t.resolve();
2564
2552
  }
2565
2553
  }), this;
2566
2554
  }
2567
2555
  to(...e) {
2568
- let t = this[M](e);
2556
+ let t = this[I](e);
2569
2557
  if (!t)
2570
- return this[q]("resolve route fail", t), this;
2558
+ return this[$]("resolve route fail", t), this;
2571
2559
  let r = this[Ie].acquire(t);
2572
- return r == null ? (this[q]("route forbid", t), this) : (this[Se].post((s) => {
2560
+ return r == null ? (this[$]("route forbid", t), this) : (this[Re].post((s) => {
2573
2561
  try {
2574
- let n = this[Lt](t);
2575
- this[Ot](n), this[It](n), this[kt](n), n.wait((i, a) => {
2576
- const o = i.session.to;
2577
- if (i.session.updateResult && i.session.updateResult.status === "success") try {
2578
- const l = new vr(x.clone(o, !0), this[Ze]());
2579
- o.historyUpdatePolicy === "replace" ? this[S]?.replace(l) : o.historyUpdatePolicy === "traceless" ? this[S]?.setRouteMark(l) : this[S]?.push(l);
2580
- } catch (l) {
2581
- console.error(l.message, l);
2562
+ let i = this[Mt](t);
2563
+ this[Lt](i), this[kt](i), this[Tt](i), i.wait((n, a) => {
2564
+ const l = n.session.to;
2565
+ if (n.session.updateResult && n.session.updateResult.status === "success") try {
2566
+ const o = new mr(x.clone(l, !0), this[et]());
2567
+ l.historyUpdatePolicy === "replace" ? this[S]?.replace(o) : l.historyUpdatePolicy === "traceless" ? this[S]?.setRouteMark(o) : this[S]?.push(o);
2568
+ } catch (o) {
2569
+ console.error(o.message, o);
2582
2570
  }
2583
- if (Ve.clear(i.session), this[Ie].release(r), typeof t.success == "function") try {
2571
+ if (We.clear(n.session), this[Ie].release(r), typeof t.success == "function") try {
2584
2572
  Reflect.apply(t.success, {}, []);
2585
- } catch (l) {
2586
- console.error(l.message, l);
2573
+ } catch (o) {
2574
+ console.error(o.message, o);
2587
2575
  }
2588
- this[fe] === !1 && this[rt](!0), n = null, s.resolve();
2589
- }, (i, a) => {
2590
- this[Ie].release(r), a !== null && this[q](a, t), this[fe] === !1 && this[rt](!1), Ve.clear(i.session), n = null, s.resolve();
2576
+ this[fe] === !1 && this[st](!0), i = null, s.resolve();
2577
+ }, (n, a) => {
2578
+ this[Ie].release(r), a !== null && this[$](a, t), this[fe] === !1 && this[st](!1), We.clear(n.session), i = null, s.resolve();
2591
2579
  });
2592
- } catch (n) {
2593
- this[Ie].release(r), this[q](n, t), s.resolve();
2580
+ } catch (i) {
2581
+ this[Ie].release(r), this[$](i, t), s.resolve();
2594
2582
  }
2595
2583
  }), this);
2596
2584
  }
2597
2585
  back(e = 1) {
2598
2586
  this[S]?.go(-e, !1);
2599
2587
  }
2600
- [Er](e) {
2588
+ [Pr](e) {
2601
2589
  return (t, r) => {
2602
2590
  if (typeof t == "boolean")
2603
2591
  e.session.redirect = !1, t ? e.resolve() : e.reject(r ?? null);
2604
2592
  else if (t) {
2605
- const s = this[M](t);
2593
+ const s = this[I](t);
2606
2594
  if (s) {
2607
- const n = e.session.to;
2608
- s.success = n.success, s.error = n.error, e.session.to = s, e.session.redirect = !0, e.session.routeModel = null, e.resolve();
2595
+ const i = e.session.to;
2596
+ s.success = i.success, s.error = i.error, e.session.to = s, e.session.redirect = !0, e.session.routeModel = null, e.resolve();
2609
2597
  } else
2610
2598
  e.session.redirect = !1, e.reject("route resolve fail");
2611
2599
  } else
2612
2600
  e.session.redirect = !1, e.resolve();
2613
2601
  };
2614
2602
  }
2615
- [Lt](e) {
2616
- const t = new Ve(e, this[p].length > 0 ? this[p][this[p].length - 1] : void 0), r = {
2603
+ [Mt](e) {
2604
+ const t = new We(e, this[p].length > 0 ? this[p][this[p].length - 1] : void 0), r = {
2617
2605
  route: e,
2618
2606
  find: null
2619
2607
  };
2620
- if (this[Xe](r), r.find) {
2608
+ if (this[Qe](r), r.find) {
2621
2609
  t.routeModel = r.find, e.matched = r.find.matchedRoutes ?? [];
2622
2610
  const s = {};
2623
- if (Array.isArray(r.find?.matchedRoutes)) for (let n = 0; n < r.find.matchedRoutes.length; n++) {
2624
- const i = r.find.matchedRoutes[n];
2625
- i.meta && typeof i.meta == "object" && Object.assign(s, i.meta);
2611
+ if (Array.isArray(r.find?.matchedRoutes)) for (let i = 0; i < r.find.matchedRoutes.length; i++) {
2612
+ const n = r.find.matchedRoutes[i];
2613
+ n.meta && typeof n.meta == "object" && Object.assign(s, n.meta);
2626
2614
  }
2627
2615
  e.meta && typeof e.meta == "object" && Object.assign(s, e.meta), e.meta = s;
2628
2616
  }
2629
- return new ut(t);
2617
+ return new ft(t);
2630
2618
  }
2631
- [Ot](e) {
2632
- for (let t of this[Te]) e.post((r) => {
2633
- const s = this[Er](r);
2619
+ [Lt](e) {
2620
+ for (let t of this[Me]) e.post((r) => {
2621
+ const s = this[Pr](r);
2634
2622
  Reflect.apply(t, {}, [
2635
2623
  r.session.to,
2636
2624
  r.session.from,
@@ -2639,7 +2627,7 @@ var Si = class {
2639
2627
  ]);
2640
2628
  });
2641
2629
  }
2642
- [kt](e) {
2630
+ [Tt](e) {
2643
2631
  e.post((t) => {
2644
2632
  for (let r of this[Le]) try {
2645
2633
  Reflect.apply(r, {}, [
@@ -2653,38 +2641,38 @@ var Si = class {
2653
2641
  t.resolve();
2654
2642
  });
2655
2643
  }
2656
- [Cr](e, t) {
2657
- for (let r of this[Oe]) try {
2644
+ [Er](e, t) {
2645
+ for (let r of this[Te]) try {
2658
2646
  Reflect.apply(r, {}, [e, t]);
2659
2647
  } catch (s) {
2660
2648
  console.error(s.message, s);
2661
2649
  }
2662
2650
  typeof e.destroy == "function" && Reflect.apply(e.destroy, e, []);
2663
2651
  }
2664
- [It](e) {
2652
+ [kt](e) {
2665
2653
  e.post((t) => {
2666
2654
  const r = t.session.to;
2667
2655
  let s = t.session.routeModel;
2668
2656
  if (s == null) {
2669
- let i = {
2657
+ let n = {
2670
2658
  route: r,
2671
2659
  find: null
2672
2660
  };
2673
- if (this[Xe](i)) s = i.find, t.session.routeModel = s;
2674
- else if (this[tt]) s = this[tt];
2661
+ if (this[Qe](n)) s = n.find, t.session.routeModel = s;
2662
+ else if (this[rt]) s = this[rt];
2675
2663
  else {
2676
2664
  t.reject(`not find route model, path:${r.path ?? r.name}`);
2677
2665
  return;
2678
2666
  }
2679
2667
  }
2680
- const n = Ve.from(t.session);
2681
- this[Rr](r, s, n).then((i) => {
2682
- this[V], t.session.updateResult = i ?? {
2668
+ const i = We.from(t.session);
2669
+ this[br](r, s, i).then((n) => {
2670
+ this[V], t.session.updateResult = n ?? {
2683
2671
  status: "success",
2684
2672
  message: ""
2685
2673
  }, t.resolve();
2686
- }, (i) => {
2687
- t.reject(i);
2674
+ }, (n) => {
2675
+ t.reject(n);
2688
2676
  });
2689
2677
  });
2690
2678
  }
@@ -2692,74 +2680,74 @@ var Si = class {
2692
2680
  if (e.length == 0) return !0;
2693
2681
  let t = this[V], r = [];
2694
2682
  for (let s of e) {
2695
- let n = this[Ft](t, s);
2696
- n != null && r.push({
2697
- ...n,
2683
+ let i = this[Ct](t, s);
2684
+ i != null && r.push({
2685
+ ...i,
2698
2686
  route: s
2699
2687
  });
2700
2688
  }
2701
2689
  if (r.length == 0)
2702
- return this[q]("can not find view index"), !1;
2690
+ return this[$]("can not find view index"), !1;
2703
2691
  for (let s of r.reverse()) this[ae](t, {
2704
2692
  x: s.x,
2705
2693
  y: s.y
2706
2694
  }, [s.route.index ?? 0], !0);
2707
2695
  return !0;
2708
2696
  }
2709
- [Ft](e, t) {
2697
+ [Ct](e, t) {
2710
2698
  const r = t.root ?? "default";
2711
2699
  let s;
2712
- for (let n = 0; n < e.layers.length; n++) {
2713
- const i = e.layers[n];
2714
- for (let a = i.views.length - 1; a >= 0; a--) {
2715
- const o = i.views[a];
2716
- if (o[z] && o[st] === r)
2700
+ for (let i = 0; i < e.layers.length; i++) {
2701
+ const n = e.layers[i];
2702
+ for (let a = n.views.length - 1; a >= 0; a--) {
2703
+ const l = n.views[a];
2704
+ if (l[z] && l[it] === r)
2717
2705
  return s = {
2718
2706
  x: a,
2719
- y: n
2707
+ y: i
2720
2708
  }, s;
2721
2709
  }
2722
2710
  }
2723
2711
  return null;
2724
2712
  }
2725
- [wi](e) {
2713
+ [gi](e) {
2726
2714
  return e.layers.length > 0 && e.layers[0].views.length > 0 ? e.layers[0].views[0] : null;
2727
2715
  }
2728
2716
  [ae](e, t, r = null, s = !0) {
2729
2717
  if (t.y >= e.layers.length || t.x >= e.layers[t.y].views.length) return;
2730
- let n = e.layers[t.y].views[t.x], i = !1, a = [], o = !1, l = [...n.slots.value];
2731
- for (let f = l.length - 1; f >= 0; f--) {
2732
- let c = l[f];
2733
- (!r || r.indexOf(c.index) != -1) && (c.route && n[z] && (this[je](c.route), c.active === !0 && c.route.opsType == F.Append && (o = !0)), a.push(new D(n, c.index, t.y)), l.splice(f, 1));
2718
+ let i = e.layers[t.y].views[t.x], n = !1, a = [], l = !1, o = [...i.slots.value];
2719
+ for (let f = o.length - 1; f >= 0; f--) {
2720
+ let c = o[f];
2721
+ (!r || r.indexOf(c.index) != -1) && (c.route && i[z] && (this[je](c.route), c.active === !0 && c.route.opsType == C.Append && (l = !0)), a.push(new O(i, c.index, t.y)), o.splice(f, 1));
2734
2722
  }
2735
- if (l.length == 0) s ? n.slots.value = l : e.layers[t.y].views.splice(t.x, 1);
2723
+ if (o.length == 0) s ? i.slots.value = o : e.layers[t.y].views.splice(t.x, 1);
2736
2724
  else {
2737
- if (o) {
2738
- let f = l[l.length - 1];
2725
+ if (l) {
2726
+ let f = o[o.length - 1];
2739
2727
  f.active = !0, f.route && (f.route.active = f.active);
2740
2728
  }
2741
- n.slots.value = l;
2729
+ i.slots.value = o;
2742
2730
  }
2743
- e.layers[t.y].views.length == 0 && (i = !0);
2731
+ e.layers[t.y].views.length == 0 && (n = !0);
2744
2732
  let u = t.y + 1;
2745
2733
  for (; u < e.layers.length; u++) {
2746
2734
  let f = e.layers[u].views, c = [];
2747
- for (let h = f.length - 1; (i || a.length > 0) && h >= 0; h--) {
2735
+ for (let h = f.length - 1; (n || a.length > 0) && h >= 0; h--) {
2748
2736
  let y = f[h];
2749
- if (y[he] && (i || D.include(a, y[he]))) {
2737
+ if (y[he] && (n || O.include(a, y[he]))) {
2750
2738
  let d = y.slots.value;
2751
2739
  for (let m = d.length - 1; m >= 0; m--) {
2752
- let b = d[m];
2753
- b.route && y[z] && this[je](b.route), c.push(new D(y, b.index, u)), d.splice(m, 1);
2740
+ let w = d[m];
2741
+ w.route && y[z] && this[je](w.route), c.push(new O(y, w.index, u)), d.splice(m, 1);
2754
2742
  }
2755
2743
  e.layers[u].views.splice(h, 1);
2756
2744
  }
2757
2745
  }
2758
- a = c, e.layers[u].views.length == 0 && (i = !0);
2746
+ a = c, e.layers[u].views.length == 0 && (n = !0);
2759
2747
  }
2760
2748
  }
2761
2749
  restore(e) {
2762
- if (!e || this[N].length == 0) {
2750
+ if (!e || this[D].length == 0) {
2763
2751
  let t = this[V];
2764
2752
  if (t.layers.length > 0) {
2765
2753
  let r = t.layers[0].views;
@@ -2767,57 +2755,57 @@ var Si = class {
2767
2755
  }
2768
2756
  return this[p] = [], this[ue](null), Promise.resolve();
2769
2757
  } else return new Promise((t, r) => {
2770
- let s = null, n = !1;
2771
- for (let i = 0; i < e.length; i++) {
2772
- const a = e[i];
2773
- this[Se].post((o) => {
2774
- const l = this[Lt](a);
2775
- this[Ot](l), this[It](l), this[kt](l), l.wait((u, f) => {
2776
- s = u.session.to, n = u.session.redirect, o.resolve();
2758
+ let s = null, i = !1;
2759
+ for (let n = 0; n < e.length; n++) {
2760
+ const a = e[n];
2761
+ this[Re].post((l) => {
2762
+ const o = this[Mt](a);
2763
+ this[Lt](o), this[kt](o), this[Tt](o), o.wait((u, f) => {
2764
+ s = u.session.to, i = u.session.redirect, l.resolve();
2777
2765
  }, (u, f) => {
2778
- s = null, f !== null && this[q](f), o.resolve();
2766
+ s = null, f !== null && this[$](f), l.resolve();
2779
2767
  });
2780
2768
  });
2781
2769
  }
2782
- this[Se].post((i) => {
2783
- if (s && n === !0) {
2784
- const a = new vr(x.clone(s, !0), this[Ze]());
2770
+ this[Re].post((n) => {
2771
+ if (s && i === !0) {
2772
+ const a = new mr(x.clone(s, !0), this[et]());
2785
2773
  this[S]?.replace(a);
2786
2774
  }
2787
- i.resolve(), t();
2775
+ n.resolve(), t();
2788
2776
  });
2789
2777
  });
2790
2778
  }
2791
- [Rr](e, t, r) {
2792
- const s = e.updateType ?? Et.Part;
2793
- return this[Sr](t).then(() => {
2794
- const n = this[xr](t, e, r, s);
2795
- if (n.status === "error") throw Error(n.message);
2796
- return n;
2779
+ [br](e, t, r) {
2780
+ const s = e.updateType ?? Pt.Part;
2781
+ return this[Rr](t).then(() => {
2782
+ const i = this[Sr](t, e, r, s);
2783
+ if (i.status === "error") throw Error(i.message);
2784
+ return i;
2797
2785
  });
2798
2786
  }
2799
- [Sr](e) {
2787
+ [Rr](e) {
2800
2788
  let t = [];
2801
2789
  for (let r = 0; r < e.layers.length; r++) {
2802
2790
  let s = e.layers[r];
2803
- for (let n = 0; n < s.models.length; n++) {
2804
- let i = s.models[n];
2805
- i.isResolved || t.push(i.resolve());
2791
+ for (let i = 0; i < s.models.length; i++) {
2792
+ let n = s.models[i];
2793
+ n.isResolved || t.push(n.resolve());
2806
2794
  }
2807
2795
  }
2808
2796
  return t.length > 0 ? Promise.all(t) : Promise.resolve();
2809
2797
  }
2810
- [xr](e, t, r, s) {
2798
+ [Sr](e, t, r, s) {
2811
2799
  if (e.layers[0].models.length !== 1) return {
2812
2800
  status: "error",
2813
2801
  message: "illegal route structure(multi root node)"
2814
2802
  };
2815
- const n = e.layers[0].models[0];
2816
- let i = this[V], a = Ri(i), o = t.root ?? "default", l;
2817
- !a && s == Et.Part && (l = this[Ft](i, t));
2803
+ const i = e.layers[0].models[0];
2804
+ let n = this[V], a = wi(n), l = t.root ?? "default", o;
2805
+ !a && s == Pt.Part && (o = this[Ct](n, t));
2818
2806
  let u, f = 0;
2819
- if (l == null || l == null) if (a || s === Et.All)
2820
- i.layers.length == 0 && (i.layers[0] = new St()), i.layers[0].views.length == 0 ? (u = new _e(t.root ?? "default", !0, null), i.layers[0].views = [u]) : u = i.layers[0].views[0], l = {
2807
+ if (o == null || o == null) if (a || s === Pt.All)
2808
+ n.layers.length == 0 && (n.layers[0] = new Rt()), n.layers[0].views.length == 0 ? (u = new Ae(t.root ?? "default", !0, null), n.layers[0].views = [u]) : u = n.layers[0].views[0], o = {
2821
2809
  x: 0,
2822
2810
  y: 0
2823
2811
  };
@@ -2828,16 +2816,16 @@ var Si = class {
2828
2816
  message: "can not rebuild view(because not route slot)"
2829
2817
  };
2830
2818
  let h = c.level;
2831
- if (h > i.layers.length) return {
2819
+ if (h > n.layers.length) return {
2832
2820
  status: "error",
2833
2821
  message: "can not insert view(override level)"
2834
2822
  };
2835
2823
  let y;
2836
2824
  if (c.rootName) {
2837
- let d = i.layers[h - 1];
2825
+ let d = n.layers[h - 1];
2838
2826
  for (let m of d.views) {
2839
2827
  if (m[z] && m.name === c.rootName) {
2840
- y = new D(m, c.rootIndex ?? 0, h - 1);
2828
+ y = new O(m, c.rootIndex ?? 0, h - 1);
2841
2829
  break;
2842
2830
  }
2843
2831
  if (m[J] && m[J].view.name === c.rootName && m[J].index === c.rootIndex) {
@@ -2850,24 +2838,24 @@ var Si = class {
2850
2838
  status: "error",
2851
2839
  message: "can not insert view(not find root node ref)"
2852
2840
  };
2853
- u = new _e(o, !0, y), i.layers[h].views.push(u), l = {
2854
- x: i.layers[h].views.length - 1,
2841
+ u = new Ae(l, !0, y), n.layers[h].views.push(u), o = {
2842
+ x: n.layers[h].views.length - 1,
2855
2843
  y: h
2856
2844
  };
2857
2845
  }
2858
- else u = i.layers[l.y].views[l.x];
2859
- if (f = l.y, u[z] = !0, t.opsType === F.Append) {
2860
- t.index = t.index ?? Me.get(), t.active = !0;
2846
+ else u = n.layers[o.y].views[o.x];
2847
+ if (f = o.y, u[z] = !0, t.opsType === C.Append) {
2848
+ t.index = t.index ?? Oe.get(), t.active = !0;
2861
2849
  let c = u.slots.value;
2862
2850
  if (c.length > 0) {
2863
- let b = c[c.length - 1];
2864
- b.active = !1, b.route && (b.route.active = b.active);
2851
+ let w = c[c.length - 1];
2852
+ w.active = !1, w.route && (w.route.active = w.active);
2865
2853
  }
2866
- let h = new re(t, n, t.index, !0);
2854
+ let h = new re(t, i, t.index, !0);
2867
2855
  u.slots.value = [...c, h];
2868
- let y = f + 1, d = 1, m = new D(u, t.index, f);
2869
- this[ie](i, y, e, d, m);
2870
- } else if (t.opsType === F.Open) {
2856
+ let y = f + 1, d = 1, m = new O(u, t.index, f);
2857
+ this[ie](n, y, e, d, m);
2858
+ } else if (t.opsType === C.Open) {
2871
2859
  let c = u.slots.value;
2872
2860
  const h = t.active ?? !0;
2873
2861
  let y = !1;
@@ -2883,124 +2871,124 @@ var Si = class {
2883
2871
  d.route && (d.route.active = d.active);
2884
2872
  }
2885
2873
  if (!y) {
2886
- t.index = t.index ?? Me.get(), t.active = h;
2887
- let d = new re(t, n, t.index, h);
2874
+ t.index = t.index ?? Oe.get(), t.active = h;
2875
+ let d = new re(t, i, t.index, h);
2888
2876
  c.push(d);
2889
- let m = f + 1, b = 1, g = new D(u, t.index, f);
2890
- this[ie](i, m, e, b, g);
2877
+ let m = f + 1, w = 1, g = new O(u, t.index, f);
2878
+ this[ie](n, m, e, w, g);
2891
2879
  }
2892
2880
  u.slots.value = [...c];
2893
2881
  } else {
2894
2882
  let c = u.slots.value;
2895
2883
  if (c.length == 0) {
2896
- t.index = t.index ?? Me.get(), t.active = !0, u.slots.value = [new re(t, n, t.index)];
2897
- let h = f + 1, y = 1, d = new D(u, t.index, f);
2898
- this[ie](i, h, e, y, d);
2884
+ t.index = t.index ?? Oe.get(), t.active = !0, u.slots.value = [new re(t, i, t.index)];
2885
+ let h = f + 1, y = 1, d = new O(u, t.index, f);
2886
+ this[ie](n, h, e, y, d);
2899
2887
  } else {
2900
2888
  let h = c[0];
2901
- if (h.model !== n) {
2902
- this[ae](i, l, null, !0), t.index = t.index ?? Me.get(), t.active = !0, u.slots.value = [new re(t, n, t.index)];
2903
- let y = f + 1, d = 1, m = new D(u, t.index, f);
2904
- this[ie](i, y, e, d, m);
2889
+ if (h.model !== i) {
2890
+ this[ae](n, o, null, !0), t.index = t.index ?? Oe.get(), t.active = !0, u.slots.value = [new re(t, i, t.index)];
2891
+ let y = f + 1, d = 1, m = new O(u, t.index, f);
2892
+ this[ie](n, y, e, d, m);
2905
2893
  } else {
2906
2894
  h.route !== null && this[je](h.route);
2907
2895
  let y = !1;
2908
2896
  const d = t.active ?? !0;
2909
2897
  h.active !== d && (h.active = d, y = !0), t.active = d, t.index = h.index, h.route = t;
2910
2898
  let m = [];
2911
- for (let T = 1; T < c.length; T++) m.push(c[T].index);
2912
- m.length > 0 ? this[ae](i, l, m, !0) : y && (u.slots.value = [...c]);
2913
- let b = [new D(u, t.index, f)], g = f + 1, v = 1, j = new D(u, t.index, f);
2914
- for (; b.length > 0 && g < i.layers.length && v < e.layers.length; g++, v++) {
2915
- let T = [];
2916
- for (let L = 0; L < i.layers[g].views.length; L++) {
2917
- let K = i.layers[g].views[L];
2918
- K[he] && D.include(b, K[he]) && T.unshift(L);
2899
+ for (let M = 1; M < c.length; M++) m.push(c[M].index);
2900
+ m.length > 0 ? this[ae](n, o, m, !0) : y && (u.slots.value = [...c]);
2901
+ let w = [new O(u, t.index, f)], g = f + 1, v = 1, j = new O(u, t.index, f);
2902
+ for (; w.length > 0 && g < n.layers.length && v < e.layers.length; g++, v++) {
2903
+ let M = [];
2904
+ for (let L = 0; L < n.layers[g].views.length; L++) {
2905
+ let K = n.layers[g].views[L];
2906
+ K[he] && O.include(w, K[he]) && M.unshift(L);
2919
2907
  }
2920
- let Ce = [];
2921
- for (let L of T) {
2922
- let K = i.layers[g].views[L], ne = e.layers[v].models, ee;
2923
- for (let O = 0; O < ne.length; O++) if (K.name === ne[O].name) {
2924
- ee = ne[O];
2908
+ let _e = [];
2909
+ for (let L of M) {
2910
+ let K = n.layers[g].views[L], ne = e.layers[v].models, ee;
2911
+ for (let T = 0; T < ne.length; T++) if (K.name === ne[T].name) {
2912
+ ee = ne[T];
2925
2913
  break;
2926
2914
  }
2927
- if (!ee) this[ae](i, {
2915
+ if (!ee) this[ae](n, {
2928
2916
  x: L,
2929
2917
  y: g
2930
2918
  }, null, !1);
2931
2919
  else {
2932
- let O = K.slots.value;
2933
- if (O.length == 0) {
2920
+ let T = K.slots.value;
2921
+ if (T.length == 0) {
2934
2922
  let Q = 0;
2935
2923
  K.slots.value = [new re(null, ee, Q)];
2936
- let H = g + 1, U = v + 1;
2937
- this[ie](i, H, e, U, j);
2924
+ let N = g + 1, U = v + 1;
2925
+ this[ie](n, N, e, U, j);
2938
2926
  } else {
2939
- let Q = O[0];
2927
+ let Q = T[0];
2940
2928
  if (Q.model !== ee) {
2941
- this[ae](i, {
2929
+ this[ae](n, {
2942
2930
  x: L,
2943
2931
  y: g
2944
2932
  }, null, !0), K.slots.value = [new re(null, ee, 0)];
2945
- let H = g + 1, U = v + 1;
2946
- this[ie](i, H, e, U, j);
2933
+ let N = g + 1, U = v + 1;
2934
+ this[ie](n, N, e, U, j);
2947
2935
  } else {
2948
2936
  K[z] && Q.route !== null && this[je](Q.route);
2949
- let H = [];
2950
- for (let U = 1; U < O.length; U++) H.push(O[U].index);
2951
- H.length > 0 && this[ae](i, {
2937
+ let N = [];
2938
+ for (let U = 1; U < T.length; U++) N.push(T[U].index);
2939
+ N.length > 0 && this[ae](n, {
2952
2940
  x: L,
2953
2941
  y: g
2954
- }, H, !0), Ce.push(new D(K, Q.index, g));
2942
+ }, N, !0), _e.push(new O(K, Q.index, g));
2955
2943
  }
2956
2944
  }
2957
2945
  K[z] = !1;
2958
2946
  }
2959
2947
  }
2960
- b = Ce;
2948
+ w = _e;
2961
2949
  }
2962
- this[ie](i, g, e, v, j);
2950
+ this[ie](n, g, e, v, j);
2963
2951
  }
2964
2952
  }
2965
2953
  }
2966
2954
  if (u && u[J]) {
2967
2955
  let c = u[J];
2968
- c && (t.slot = new $s(o, f, c?.view.name, c?.index ?? 0));
2956
+ c && (t.slot = new Fs(l, f, c?.view.name, c?.index ?? 0));
2969
2957
  }
2970
- return r.to = void 0, r.routeModel = void 0, this[Pr](t, r), {
2958
+ return r.to = void 0, r.routeModel = void 0, this[xr](t, r), {
2971
2959
  status: "success",
2972
2960
  message: ""
2973
2961
  };
2974
2962
  }
2975
- [ie](e, t, r, s, n) {
2976
- let i = s, a = t;
2977
- for (; a < e.layers.length && i < r.layers.length; a++, i++) {
2978
- let o = e.layers[a].views;
2979
- for (let l of r.layers[i].models) {
2980
- let u = new _e(l.name, !1, n), f = new re(null, l);
2981
- u.slots.value = [f], o.push(u);
2963
+ [ie](e, t, r, s, i) {
2964
+ let n = s, a = t;
2965
+ for (; a < e.layers.length && n < r.layers.length; a++, n++) {
2966
+ let l = e.layers[a].views;
2967
+ for (let o of r.layers[n].models) {
2968
+ let u = new Ae(o.name, !1, i), f = new re(null, o);
2969
+ u.slots.value = [f], l.push(u);
2982
2970
  }
2983
2971
  }
2984
- for (; i < r.layers.length; i++) {
2985
- let o = new St();
2986
- o.views = [];
2987
- for (let l of r.layers[i].models) {
2988
- let u = new _e(l.name, !1, n), f = new re(null, l);
2989
- u.slots.value = [f], o.views.push(u);
2972
+ for (; n < r.layers.length; n++) {
2973
+ let l = new Rt();
2974
+ l.views = [];
2975
+ for (let o of r.layers[n].models) {
2976
+ let u = new Ae(o.name, !1, i), f = new re(null, o);
2977
+ u.slots.value = [f], l.views.push(u);
2990
2978
  }
2991
- e.layers.push(o);
2979
+ e.layers.push(l);
2992
2980
  }
2993
2981
  }
2994
- [Dr](e, t, r, s, n, i) {
2982
+ [Br](e, t, r, s, i, n) {
2995
2983
  if (t < 0 || t > this[V].layers.length) return null;
2996
2984
  if (t < this[V].layers.length) {
2997
2985
  let u = this[V].layers[t], f = null;
2998
2986
  for (let c of u.views) {
2999
2987
  let h = !1;
3000
2988
  if (r !== null ? (h = c.name === e && c[J]?.view === r, h && s !== -1 && (h = c[J]?.index === s)) : h = c.name === e, !!h) {
3001
- n !== null && (c[he] = {
3002
- view: n,
3003
- index: i,
2989
+ i !== null && (c[he] = {
2990
+ view: i,
2991
+ index: n,
3004
2992
  level: t - 1
3005
2993
  }), f = c;
3006
2994
  break;
@@ -3008,78 +2996,99 @@ var Si = class {
3008
2996
  }
3009
2997
  if (f !== null) return f;
3010
2998
  }
3011
- let a = null, o = null;
3012
- n !== null && (n[z] ? a = {
3013
- view: n,
3014
- index: i,
2999
+ let a = null, l = null;
3000
+ i !== null && (i[z] ? a = {
3001
+ view: i,
3002
+ index: n,
3015
3003
  level: t - 1
3016
- } : a = n[J], o = {
3017
- view: n,
3018
- index: i,
3004
+ } : a = i[J], l = {
3005
+ view: i,
3006
+ index: n,
3019
3007
  level: t - 1
3020
3008
  });
3021
- let l = new _e(e, !0, a);
3022
- if (l[he] = o, t == this[V].layers.length) {
3023
- let u = new St();
3024
- u.views = [l], this[V].layers.push(u);
3025
- } else this[V].layers[t].views.push(l);
3026
- return l;
3027
- }
3028
- }, xi = "fox-router-view", Pi = "fox-router-link", I = /* @__PURE__ */ (function(e) {
3009
+ let o = new Ae(e, !0, a);
3010
+ if (o[he] = l, t == this[V].layers.length) {
3011
+ let u = new Rt();
3012
+ u.views = [o], this[V].layers.push(u);
3013
+ } else this[V].layers[t].views.push(o);
3014
+ return o;
3015
+ }
3016
+ }, Ri = "fox-router-view", Si = "fox-router-link", H = /* @__PURE__ */ (function(e) {
3029
3017
  return e[e.Loading = 0] = "Loading", e[e.Loaded = 1] = "Loaded", e[e.Defining = 2] = "Defining", e[e.Defined = 3] = "Defined", e;
3030
- })({}), Mt = /* @__PURE__ */ (function(e) {
3018
+ })({});
3019
+ function xi(e) {
3020
+ return e == H.Loaded || e === H.Defined;
3021
+ }
3022
+ var _r = /* @__PURE__ */ (function(e) {
3031
3023
  return e[e.normal = 0] = "normal", e[e.factory = 1] = "factory", e;
3032
- })({}), Ei = class {
3024
+ })({}), Pi = class {
3033
3025
  register = /* @__PURE__ */ new Map();
3026
+ regExpRegisters = [];
3034
3027
  constructor() {
3035
3028
  }
3036
3029
  get(e) {
3037
- return this.register.get(e) ?? null;
3030
+ let t = this.register.get(e) ?? null;
3031
+ return t || (t = this.regExpRegisters.find((r) => r.pattern?.test(e))?.module ?? null), t;
3032
+ }
3033
+ has(e) {
3034
+ return !!this.get(e);
3038
3035
  }
3039
3036
  set(e, t) {
3040
- this.register.set(e, t);
3037
+ if (typeof e == "string") this.register.set(e, t);
3038
+ else if (e instanceof RegExp) {
3039
+ const r = this.regExpRegisters.find((s) => (s.pattern?.source ?? "") === (e?.source ?? ""));
3040
+ r ? r.module = t : this.regExpRegisters.push({
3041
+ pattern: e,
3042
+ module: t
3043
+ });
3044
+ }
3041
3045
  }
3042
3046
  remove(e) {
3043
- let t = this.register.get(e);
3044
- return this.register.delete(e), t ?? null;
3045
- }
3046
- has(e) {
3047
- return this.register.has(e);
3047
+ if (typeof e == "string") {
3048
+ const t = this.register.get(e);
3049
+ return this.register.delete(e), t ?? null;
3050
+ } else if (e instanceof RegExp) {
3051
+ const t = this.regExpRegisters.findIndex((r) => (r.pattern?.source ?? "") === (e?.source ?? ""));
3052
+ if (t !== -1) {
3053
+ const r = this.regExpRegisters[t].module ?? null;
3054
+ return this.regExpRegisters.splice(t, 1), r;
3055
+ }
3056
+ }
3057
+ return null;
3048
3058
  }
3049
3059
  clear() {
3050
- this.register.clear();
3051
- }
3052
- }, Ar = class {
3053
- moduleManager = new Ei();
3054
- options = {
3055
- paths: {},
3056
- alias: {},
3057
- nature: [],
3058
- timeout: 3e3
3059
- };
3060
- set paths(e) {
3061
- this.options.paths = e;
3062
- }
3063
- get paths() {
3064
- return this.options.paths;
3060
+ this.register.clear(), this.regExpRegisters = [];
3065
3061
  }
3062
+ }, It = [
3063
+ "require",
3064
+ "exports",
3065
+ "module"
3066
+ ];
3067
+ async function Ei(e) {
3068
+ return await new Function("url", "return import(url)")(e);
3069
+ }
3070
+ var Cr = class {
3071
+ moduleManager = new Pi();
3072
+ _alias = {};
3066
3073
  set alias(e) {
3067
- this.options.alias = e;
3074
+ this._alias = e;
3068
3075
  }
3069
3076
  get alias() {
3070
- return this.options.alias;
3077
+ return this._alias;
3071
3078
  }
3072
- set naturePaths(e) {
3073
- this.options.nature = e;
3079
+ _resourceParser;
3080
+ set resourceParser(e) {
3081
+ this._resourceParser = e;
3074
3082
  }
3075
- get naturePaths() {
3076
- return this.options.nature;
3083
+ get resourceParser() {
3084
+ return this._resourceParser;
3077
3085
  }
3086
+ _timeout;
3078
3087
  set timeout(e) {
3079
- this.options.timeout = e;
3088
+ this._timeout = e;
3080
3089
  }
3081
3090
  get timeout() {
3082
- return this.options.timeout;
3091
+ return this._timeout;
3083
3092
  }
3084
3093
  _query;
3085
3094
  set query(e) {
@@ -3089,250 +3098,316 @@ var Si = class {
3089
3098
  return this._query;
3090
3099
  }
3091
3100
  get head() {
3092
- return He().head;
3101
+ return Ue().head;
3093
3102
  }
3094
- constructor() {
3103
+ _cssMountPoint = null;
3104
+ set cssMountPoint(e) {
3105
+ this._cssMountPoint = e;
3106
+ }
3107
+ get cssMountPoint() {
3108
+ return this._cssMountPoint;
3109
+ }
3110
+ _jsMountPoint = null;
3111
+ set jsMountPoint(e) {
3112
+ this._jsMountPoint = e;
3113
+ }
3114
+ get jsMountPoint() {
3115
+ return this._jsMountPoint;
3095
3116
  }
3096
3117
  setModule(e, t) {
3097
3118
  const r = {
3098
- id: e,
3119
+ id: typeof e == "string" ? e : e?.source,
3099
3120
  src: "",
3100
- status: I.Defined
3121
+ status: H.Loaded
3101
3122
  };
3102
- typeof t == "function" ? (r.exports = t, r.type = Mt.factory) : r.exports = t, this.moduleManager.set(e, r);
3123
+ typeof t == "function" ? (r.exports = t, r.type = _r.factory) : r.exports = t, this.moduleManager.set(e, r);
3103
3124
  }
3104
3125
  removeModule(e) {
3105
3126
  this.moduleManager.remove(e);
3106
3127
  }
3107
- ensure(...e) {
3108
- const t = [];
3109
- let r = e.length - 1;
3110
- const s = {};
3111
- typeof e[r] == "object" && (Object.assign(s, e[r]), r--);
3112
- let n = null;
3113
- typeof e[r] == "function" && (n = e[r], r--);
3114
- for (let o = 0; o <= r; o++) if (Array.isArray(e[o])) {
3115
- let l = e[o];
3116
- for (let u = 0; u < l.length; u++)
3117
- l[u] && t.push(this.resolvePath(l[u]));
3118
- } else if (typeof e[o] == "string") {
3119
- let l = e[o].split(",");
3120
- for (let u = 0; u < l.length; u++)
3121
- l[u] && t.push(this.resolvePath(l[u]));
3122
- }
3123
- const i = new Ci(t.length, (o, l) => {
3124
- if (i.isOK()) try {
3125
- typeof n == "function" && Reflect.apply(n, {}, l);
3126
- } catch (u) {
3127
- console.error(u.message, u);
3128
- }
3129
- else try {
3130
- console.error(o), typeof n == "function" && Reflect.apply(n, {}, []);
3131
- } catch (u) {
3132
- console.error(u.message, u);
3133
- }
3134
- }), a = new ut();
3135
- for (let o = 0; o < t.length; o++) {
3136
- const l = new Ai(o, t[o], s, i);
3137
- this.mount(a, l);
3128
+ getModuleExports(e) {
3129
+ const t = this.moduleManager.get(e);
3130
+ return t && xi(t.status) ? t.type === _r.factory && typeof t.exports == "function" ? t.exports() : t.exports : null;
3131
+ }
3132
+ exposeRequire(e = "__foxRequire", t, r) {
3133
+ const s = t ?? F();
3134
+ return s && typeof s == "object" ? (s[e] = (i) => {
3135
+ const n = this.getModuleExports(i);
3136
+ return r && !n && console.error(`[Fox] module:${i}, not found!`), n;
3137
+ }, !0) : !1;
3138
+ }
3139
+ resloveResource(e) {
3140
+ if (typeof e == "string") {
3141
+ if (It.includes(e)) return e;
3142
+ if (e = this.alias?.[e] ?? e, typeof this.resourceParser == "function") {
3143
+ const r = this.resloveResource(e);
3144
+ if (!r) return r;
3145
+ }
3146
+ const t = this.getResourcePathSuffix(e);
3147
+ if (t === "mjs") return {
3148
+ path: e,
3149
+ type: "js",
3150
+ format: "es"
3151
+ };
3152
+ if (t === "js") return {
3153
+ path: e,
3154
+ type: "js",
3155
+ format: "umd"
3156
+ };
3157
+ if (t === "css") return {
3158
+ path: e,
3159
+ type: "css"
3160
+ };
3138
3161
  }
3139
- return this;
3162
+ return e;
3163
+ }
3164
+ ensure(...e) {
3165
+ return new Promise((t, r) => {
3166
+ if (e.length <= 0) {
3167
+ r("args is empty");
3168
+ return;
3169
+ }
3170
+ const s = [];
3171
+ let i = e.length - 1, n = null;
3172
+ typeof e[i] == "function" && (n = e[i], i--);
3173
+ for (let o = 0; o <= i; o++) if (Array.isArray(e[o])) {
3174
+ const u = e[o];
3175
+ for (let f = 0; f < u.length; f++) {
3176
+ const c = this.resloveResource(u[f]);
3177
+ s.push(c);
3178
+ }
3179
+ } else if (typeof e[o] == "string") {
3180
+ const u = this.resloveResource(e[o]);
3181
+ s.push(u);
3182
+ }
3183
+ const a = new _i(s.length, (o, u) => {
3184
+ if (a.isOK()) try {
3185
+ typeof n == "function" && Reflect.apply(n, {}, u), t(u);
3186
+ } catch (f) {
3187
+ console.error(f), r(f);
3188
+ }
3189
+ else try {
3190
+ console.error(o), typeof n == "function" && Reflect.apply(n, {}, []), r(o);
3191
+ } catch (f) {
3192
+ console.error(f), r(f);
3193
+ }
3194
+ }), l = new ft();
3195
+ for (let o = 0; o < s.length; o++) {
3196
+ const u = new Ci(o, s[o], a);
3197
+ this.mount(l, u);
3198
+ }
3199
+ return this;
3200
+ });
3140
3201
  }
3141
3202
  remove(...e) {
3142
- let t = [], r = e.length - 1, s = {};
3143
- typeof e[r] == "object" && (Object.assign(s, e[r]), r--);
3144
- let n = null;
3145
- typeof e[r] == "function" && (n = e[r], r--);
3146
- for (let i = 0; i <= r; i++) if (Array.isArray(e[i])) {
3147
- let a = e[i];
3148
- for (let o = 0; o < a.length; o++)
3149
- a[o] && t.push(this.resolvePath(a[o]));
3150
- } else {
3151
- let a = e[i].split(",");
3152
- for (let o = 0; o < a.length; o++)
3153
- a[o] && t.push(this.resolvePath(a[o]));
3154
- }
3155
- return t.forEach((i) => {
3156
- this.unmount(i, s);
3157
- }), typeof n == "function" && Reflect.apply(n, {}, []), this;
3203
+ return new Promise((t, r) => {
3204
+ if (e.length <= 0) {
3205
+ r("args is empty");
3206
+ return;
3207
+ }
3208
+ const s = [];
3209
+ let i = e.length - 1, n = null;
3210
+ typeof e[i] == "function" && (n = e[i], i--);
3211
+ for (let a = 0; a <= i; a++) if (Array.isArray(e[a])) {
3212
+ const l = e[a];
3213
+ for (let o = 0; o < l.length; o++) {
3214
+ const u = this.resloveResource(l[o]);
3215
+ s.push(u);
3216
+ }
3217
+ } else if (typeof e[a] == "string") {
3218
+ const l = this.resloveResource(e[a]);
3219
+ s.push(l);
3220
+ }
3221
+ for (let a = 0; a < s.length; a++) try {
3222
+ this.unmount(s[a]);
3223
+ } catch (l) {
3224
+ console.error(l);
3225
+ }
3226
+ typeof n == "function" && Reflect.apply(n, {}, [!0]), t(!0);
3227
+ });
3158
3228
  }
3159
3229
  mount(e, t) {
3160
- if (t.src === "exports") {
3161
- e.post((s) => {
3162
- t.progress.work(!0, t.index, "exports"), s.resolve();
3163
- });
3164
- return;
3165
- } else if (t.src === "module") {
3230
+ if (!t.resource) {
3166
3231
  e.post((s) => {
3167
- t.progress.work(!0, t.index, "module"), s.resolve();
3232
+ t.progress.work(!1, t.index, null), s.resolve();
3168
3233
  });
3169
3234
  return;
3170
3235
  }
3171
- if (this.isNaturePath(t.src)) {
3172
- let s = t.params.jsPoint;
3173
- s || (s = this.head), this.mountJS(e, t, s);
3174
- return;
3175
- } else if (this.isNaturePath(t.src)) {
3176
- let s = t.params.cssPoint;
3177
- s || (s = this.head), this.mountCSS(e, t, s);
3178
- return;
3236
+ if (typeof t.resource == "string") {
3237
+ if (It.includes(t.resource)) {
3238
+ e.post((i) => {
3239
+ t.progress.work(!0, t.index, t.resource), i.resolve();
3240
+ });
3241
+ return;
3242
+ }
3243
+ const s = this.getModuleExports(t.resource);
3244
+ if (s) {
3245
+ e.post((i) => {
3246
+ t.progress.work(!0, t.index, s), i.resolve();
3247
+ });
3248
+ return;
3249
+ }
3179
3250
  }
3180
- let r = this.getFileNamePostfix(t.src);
3181
- if (r === "js" || r.length === 0) {
3182
- let s = t.params.jsPoint;
3183
- s || (s = this.head), this.mountJS(e, t, s);
3184
- return;
3185
- } else if (r === "css") {
3186
- let s = t.params.cssPoint;
3187
- s || (s = this.head), this.mountCSS(e, t, s);
3188
- return;
3251
+ const r = t.resource;
3252
+ if (r.type === "js") if (r.format === "es") this.mountCJS(e, t);
3253
+ else {
3254
+ const s = this.jsMountPoint ?? this.head;
3255
+ this.mountJS(e, t, s);
3256
+ }
3257
+ else {
3258
+ const s = this.cssMountPoint ?? this.head;
3259
+ this.mountCSS(e, t, s);
3189
3260
  }
3190
3261
  }
3191
3262
  mountCSS(e, t, r) {
3192
3263
  e.post((s) => {
3193
- const n = t.src, i = this.moduleManager.get(n);
3194
- if (i && (i.status == I.Defined || i.status == I.Loaded) && i.exports) {
3195
- i.type === Mt.factory && typeof i.exports == "function" ? t.progress.work(!0, t.index, i.exports()) : t.progress.work(!0, t.index, i.exports), s.resolve();
3264
+ const i = t.resource, n = this.getModuleExports(i.path);
3265
+ if (n) {
3266
+ t.progress.work(!0, t.index, n), s.resolve();
3196
3267
  return;
3197
3268
  }
3198
- const a = He(), o = a.createElement("link");
3199
- if (Reflect.has(o, "onload"))
3200
- o.onload = () => {
3201
- o.onload = null, o.onerror = null, t.progress.work(!0, t.index, t.src), s.resolve();
3202
- }, o.onerror = () => {
3269
+ const a = Ue(), l = a.createElement("link"), o = "onload" in l;
3270
+ o && (l.onload = () => {
3271
+ l.onload = null, l.onerror = null, t.progress.work(!0, t.index, i.path), s.resolve();
3272
+ }, l.onerror = () => {
3273
+ try {
3274
+ r.removeChild(l);
3275
+ } catch (c) {
3276
+ console.error(c);
3277
+ }
3278
+ l.onload = null, l.onerror = null, t.progress.work(!1, t.index, null), s.reject();
3279
+ });
3280
+ const u = this.constructResourceUri(i.path), f = a.getElementById(i.path);
3281
+ f && f.parentNode && f.parentNode.removeChild(f), l.rel = "stylesheet", l.type = "text/css", l.id = i.path, l.href = u, r.appendChild(l), o || (t.progress.work(!0, t.index, i.path), s.resolve());
3282
+ });
3283
+ }
3284
+ mountJS(e, t, r) {
3285
+ e.post((s) => {
3286
+ const i = t.resource, n = this.getModuleExports(i.path);
3287
+ if (n) {
3288
+ t.progress.work(!0, t.index, n), s.resolve();
3289
+ return;
3290
+ }
3291
+ const a = {
3292
+ id: i.path,
3293
+ src: i.path,
3294
+ status: H.Loading
3295
+ };
3296
+ this.moduleManager.set(i.path, a);
3297
+ const l = Ue().createElement("script");
3298
+ if ("onload" in l)
3299
+ l.onload = () => {
3300
+ l.onload = null, l.onerror = null, a.status === H.Loading && (a.status = H.Loaded, t.progress.work(!0, t.index, i.path)), s.resolve();
3301
+ }, l.onerror = () => {
3203
3302
  try {
3204
- r.removeChild(o);
3205
- } catch (u) {
3206
- console.error(u.message, u);
3303
+ r.removeChild(l);
3304
+ } catch (c) {
3305
+ console.error(c);
3207
3306
  }
3208
- o.onload = null, o.onerror = null, t.progress.work(!1, t.index, null), s.reject();
3307
+ l.onload = null, l.onerror = null, this.moduleManager.remove(i.path), t.progress.work(!1, t.index, null), s.resolve();
3209
3308
  };
3210
3309
  else {
3211
- const u = {
3212
- timeout: this.options.timeout ?? 3e3,
3213
- time: 0,
3214
- success: () => {
3215
- t.progress.work(!0, t.index, t.src), s.resolve();
3216
- },
3217
- error: () => {
3218
- try {
3219
- r.removeChild(o);
3220
- } catch (f) {
3221
- console.error(f.message, f);
3222
- }
3223
- t.progress.work(!1, t.index, null), s.resolve();
3224
- }
3310
+ const c = l;
3311
+ c.onreadystatechange = () => {
3312
+ /loaded|complete/.test(c.readyState) && (c.onreadystatechange = null, a.status == H.Loading && (a.status = H.Loaded, t.progress.work(!0, t.index, i.path)), s.resolve());
3225
3313
  };
3226
- setTimeout(() => {
3227
- is(o, u);
3228
- }, 1);
3229
3314
  }
3230
- let l = a.getElementById(n);
3231
- l && l.parentNode && l.parentNode.removeChild(l), o.rel = "stylesheet", o.type = "text/css", o.id = n, o.href = n, r.appendChild(o);
3315
+ const o = this.constructResourceUri(i.path);
3316
+ l.defer = !0, l.src = o;
3317
+ const u = F(), f = this.createRequireLoad();
3318
+ u.require = f, u.define = this.createDefine(a, f, t), r.appendChild(l);
3232
3319
  });
3233
3320
  }
3234
- mountJS(e, t, r) {
3235
- e.post((s) => {
3236
- const n = t.src;
3237
- let i = this.moduleManager.get(n);
3238
- if (i && (i.status == I.Defined || i.status == I.Loaded)) {
3239
- if (i.exports) {
3240
- i.type === Mt.factory && typeof i.exports == "function" ? t.progress.work(!0, t.index, i.exports()) : t.progress.work(!0, t.index, i.exports), s.resolve();
3241
- return;
3242
- }
3243
- if (document.querySelector(`script[src='${n}`)) {
3244
- t.progress.work(!0, t.index, i.exports), s.resolve();
3321
+ mountCJS(e, t) {
3322
+ e.post(async (r) => {
3323
+ const s = t.resource, i = this.getModuleExports(s.path);
3324
+ if (i) {
3325
+ t.progress.work(!0, t.index, i), r.resolve();
3326
+ return;
3327
+ }
3328
+ try {
3329
+ let n = await Ei(s.path);
3330
+ if (zt(n) && (n = n.default ?? n), He(n)) {
3331
+ t.progress.work(!1, t.index, n), r.resolve();
3245
3332
  return;
3246
3333
  }
3247
- }
3248
- i = {
3249
- id: n,
3250
- src: n,
3251
- status: I.Loading
3252
- }, this.moduleManager.set(n, i);
3253
- const a = He().createElement("script");
3254
- if ("onload" in a)
3255
- a.onload = () => {
3256
- a.onload = null, a.onerror = null, i.status === I.Loading && (i.status = I.Loaded, t.progress.work(!0, t.index, n)), s.resolve();
3257
- }, a.onerror = () => {
3258
- try {
3259
- r.removeChild(a);
3260
- } catch (f) {
3261
- console.error(f.message, f);
3262
- }
3263
- a.onload = null, a.onerror = null, this.moduleManager.remove(n), t.progress.work(!1, t.index, null), s.resolve();
3264
- };
3265
- else {
3266
- const f = a;
3267
- f.onreadystatechange = () => {
3268
- /loaded|complete/.test(f.readyState) && (f.onreadystatechange = null, i.status == I.Loading && (i.status = I.Loaded, t.progress.work(!0, t.index, n)), s.resolve());
3334
+ const a = {
3335
+ id: s.path,
3336
+ src: s.path,
3337
+ status: H.Loaded,
3338
+ exports: n
3269
3339
  };
3340
+ this.moduleManager.set(s.path, a), t.progress.work(!0, t.index, n), r.resolve();
3341
+ } catch (n) {
3342
+ console.error(n), t.progress.work(!1, t.index, null), r.resolve();
3270
3343
  }
3271
- a.defer = !0, a.src = n;
3272
- const o = A(), l = this.createRequireLoad(), u = this.createDefine(i, l, t);
3273
- o.require = l, o.define = u, r.appendChild(a);
3274
3344
  });
3275
3345
  }
3276
- unmount(e, t = {}) {
3277
- const r = He(), s = this.getFileNamePostfix(e);
3278
- if (s === "js" || s.length === 0) {
3279
- const n = r.querySelector(`script[src="${e}"]`);
3280
- n && n.parentNode && n.parentNode.removeChild(n), this.moduleManager.remove(e);
3281
- return;
3282
- } else if (s === "css") {
3283
- const n = r.querySelector(`style[href="${e}"]`);
3284
- n && n.parentNode && n.parentNode.removeChild(n);
3285
- return;
3346
+ unmount(e) {
3347
+ let t = "", r = "";
3348
+ typeof e == "string" ? (this.moduleManager.remove(e), r = this.getResourcePathSuffix(e), t = e) : (this.moduleManager.remove(e.path), r = e.type === "css" ? "css" : e.format ?? "", t = e.path);
3349
+ const s = Ue();
3350
+ if (r === "umd") {
3351
+ let i = s.getElementById(t);
3352
+ i || (i = s.querySelector(`script[src="${t}"]`)), i && i.remove();
3353
+ } else if (r === "css") {
3354
+ let i = s.getElementById(t);
3355
+ if (!i) {
3356
+ const n = this.constructResourceUri(t);
3357
+ i = s.querySelector(`link[href="${n}"]`);
3358
+ }
3359
+ i && i.remove();
3286
3360
  }
3287
3361
  }
3288
3362
  trimEmptyElement(e) {
3289
- let t = [];
3363
+ const t = [];
3290
3364
  for (let r = 0; r < e.length; r++) {
3291
- if (e[r] === void 0 || e[r] === null) continue;
3292
- const s = e[r].trim();
3293
- s.length !== 0 && t.push(s);
3365
+ let s = e[r];
3366
+ s != null && (s = s.trim(), s.length !== 0 && t.push(s));
3294
3367
  }
3295
3368
  return t;
3296
3369
  }
3297
3370
  createDefine(e, t, r) {
3298
- const s = this, n = function(...i) {
3299
- e.status = I.Defining;
3300
- let a, o, l, u = i.length;
3301
- if (u === 1 ? (l = i[0], a = void 0) : u === 2 ? (l = i[1], Array.isArray(i[0]) ? (o = s.trimEmptyElement(i[0]), a = void 0) : o = void 0) : (a = i[0], o = s.trimEmptyElement(i[1]), l = i[2]), a && (e.id = a, s.options.alias[a] = e.src), o && o.length > 0) s.ensure(o, (...f) => {
3371
+ const s = this, i = function(...n) {
3372
+ e.status = H.Defining;
3373
+ let a, l, o, u = n.length;
3374
+ if (u === 1 ? (o = n[0], a = void 0) : u === 2 ? (o = n[1], Array.isArray(n[0]) ? (l = s.trimEmptyElement(n[0]), a = void 0) : l = void 0) : (a = n[0], l = s.trimEmptyElement(n[1]), o = n[2]), a && (e.id = a, typeof s._alias == "object" && (s._alias[a] = e.src)), l && l.length > 0) s.ensure(l, (...f) => {
3302
3375
  try {
3303
3376
  const c = f.map((h) => h === "exports" ? ((!e.exports || typeof e.exports != "object") && (e.exports = {}), e.exports) : h === "module" ? e : h === "require" ? t : h);
3304
- if (typeof l == "function") {
3305
- const h = Reflect.apply(l, e, c);
3377
+ if (typeof o == "function") {
3378
+ const h = Reflect.apply(o, e, c);
3306
3379
  h && typeof h == "object" && (e.exports = h);
3307
- } else e.exports = l;
3308
- e.status = I.Defined, r.progress.work(!0, r.index, e.exports);
3380
+ } else e.exports = o;
3381
+ e.status = H.Defined, r.progress.work(!0, r.index, e.exports);
3309
3382
  } catch (c) {
3310
3383
  console.error(c), r.progress.work(!1, r.index, []);
3311
3384
  }
3312
3385
  });
3313
3386
  else {
3314
- if (typeof l == "function") {
3315
- const f = Reflect.apply(l, e, []);
3387
+ if (typeof o == "function") {
3388
+ const f = Reflect.apply(o, e, []);
3316
3389
  f && typeof f == "object" && (e.exports = e.exports ?? {}, Object.assign(e.exports, f));
3317
- } else e.exports = l;
3318
- e.status = I.Defined, r.progress.work(!0, r.index, e.exports);
3390
+ } else e.exports = o;
3391
+ e.status = H.Defined, r.progress.work(!0, r.index, e.exports);
3319
3392
  }
3320
3393
  };
3321
- return n.amd = !0, n;
3394
+ return i.amd = !0, i;
3322
3395
  }
3323
3396
  createRequireLoad() {
3324
- return (e) => this.moduleManager.get(e)?.exports ?? null;
3397
+ return (e) => (e = this._alias?.[e] ?? e, this.getModuleExports(e));
3325
3398
  }
3326
- resolvePath(e) {
3399
+ constructResourceUri(e) {
3327
3400
  try {
3328
- return e;
3401
+ if (It.includes(e) || !this.query) return e;
3402
+ const t = this.createSearch(this.query);
3403
+ return e.indexOf("?") == -1 ? e += `?${t}` : t.length > 0 && (e += `&${t}`), e;
3329
3404
  } catch (t) {
3330
- throw console.error(`resolve path[${e}] fail`, t), t;
3405
+ throw console.error(`[Fox]resolve path[${e}] fail`, t), t;
3331
3406
  }
3332
3407
  }
3333
3408
  createSearch(e) {
3334
3409
  let t = "";
3335
- if (e) {
3410
+ if (e && typeof e == "object") {
3336
3411
  for (let r in e) {
3337
3412
  let s = `${e[r]}`;
3338
3413
  t += `${encodeURIComponent(r)}=${encodeURIComponent(s)}&`;
@@ -3341,56 +3416,13 @@ var Si = class {
3341
3416
  }
3342
3417
  return t;
3343
3418
  }
3344
- getFileNamePostfix(e) {
3419
+ getResourcePathSuffix(e) {
3345
3420
  let t = e.lastIndexOf("?");
3346
3421
  t == -1 && (t = e.length);
3347
3422
  let r = e.lastIndexOf(".", t);
3348
3423
  return r == -1 ? "" : e.substring(r + 1, t);
3349
3424
  }
3350
- isNaturePath(e) {
3351
- if (!this.options.nature) return !1;
3352
- if (typeof this.options.nature == "function") return this.options.nature(e);
3353
- const t = this.options.nature;
3354
- if (t && Array.isArray(t)) for (let r = 0; r < t.length; r++) {
3355
- const s = t[r];
3356
- if (e.indexOf(s) === 0) return !0;
3357
- }
3358
- return !1;
3359
- }
3360
- parserPath(e, t) {
3361
- if (e.indexOf("http://") == 0 || e.indexOf("https://") == 0 || e.indexOf("file:///") == 0) return e;
3362
- if (e.indexOf("/") == 0) return `${vt()}${e.slice(1)}`;
3363
- if (e.indexOf("./") == 0) return `${vt()}${e.slice(2)}`;
3364
- if (e.indexOf("//") == 0) return `${A().location.protocol}${e}`;
3365
- if (t) {
3366
- let r = this.options.alias[e];
3367
- if (!r) {
3368
- let s = e.indexOf("/");
3369
- if (s == -1) r = e;
3370
- else {
3371
- let n = e.slice(0, s), i = this.options.paths[n];
3372
- i ? r = i + e.slice(s) : r = e;
3373
- }
3374
- }
3375
- return this.parserPath(r, !1);
3376
- }
3377
- return `${vt()}${e}`;
3378
- }
3379
- };
3380
- function is(e, t) {
3381
- let r = e.sheet, s = !1;
3382
- if (t.isOldWebKit)
3383
- r && (s = !0);
3384
- else if (r) try {
3385
- r.cssRules && (s = !0);
3386
- } catch (n) {
3387
- n.name === "NS_ERROR_DOM_SECURITY_ERR" && (s = !0);
3388
- }
3389
- setTimeout(() => {
3390
- t.time += 20, s ? t.success() : t.timeout > t.timeout ? t.error() : is(e, t);
3391
- }, 20);
3392
- }
3393
- var Ci = class {
3425
+ }, _i = class {
3394
3426
  callback;
3395
3427
  values;
3396
3428
  status;
@@ -3409,17 +3441,16 @@ var Ci = class {
3409
3441
  isOK() {
3410
3442
  return this.status;
3411
3443
  }
3412
- }, Ai = class {
3444
+ }, Ci = class {
3413
3445
  index;
3414
- src;
3415
- params;
3446
+ resource;
3416
3447
  progress;
3417
- constructor(e, t, r, s) {
3418
- this.index = e, this.src = t, this.params = r, this.progress = s;
3448
+ constructor(e, t, r) {
3449
+ this.index = e, this.resource = t, this.progress = r;
3419
3450
  }
3420
- }, ns = Symbol("fk"), os = Symbol("fbk"), ls = Symbol("fepk");
3451
+ }, is = Symbol("fk"), ns = Symbol("fbk"), os = Symbol("fepk");
3421
3452
  function Vi(e = {}) {
3422
- const t = new Si(e), r = new or(), s = new dr(), n = new Ar(), i = {
3453
+ const t = new bi(e), r = new nr(), s = new yr(), i = new Cr(), n = {
3423
3454
  get router() {
3424
3455
  return t;
3425
3456
  },
@@ -3427,35 +3458,29 @@ function Vi(e = {}) {
3427
3458
  return r;
3428
3459
  },
3429
3460
  get Bus() {
3430
- return or;
3461
+ return nr;
3431
3462
  },
3432
3463
  get EventProxy() {
3433
- return dr;
3464
+ return yr;
3434
3465
  },
3435
3466
  get eventproxy() {
3436
3467
  return s;
3437
3468
  },
3438
3469
  get EventChain() {
3439
- return ut;
3470
+ return ft;
3440
3471
  },
3441
3472
  get Require() {
3442
- return Ar;
3473
+ return Cr;
3443
3474
  },
3444
3475
  get require() {
3445
- return n;
3446
- },
3447
- get extend() {
3448
- return _;
3449
- },
3450
- get clone() {
3451
- return Gt;
3476
+ return i;
3452
3477
  },
3453
3478
  get isESModule() {
3454
- return $r;
3479
+ return zt;
3455
3480
  },
3456
3481
  install(a) {
3457
- a.provide(ht, t), a.provide(ns, i), a.provide(os, r), a.provide(ls, s), a.component(xi, Vt), a.component(Pi, oi), Reflect.defineProperty(a.config.globalProperties, "$fox", { get() {
3458
- return i;
3482
+ a.provide(ht, t), a.provide(is, n), a.provide(ns, r), a.provide(os, s), a.component(Ri, Ut), a.component(Si, ii), Reflect.defineProperty(a.config.globalProperties, "$fox", { get() {
3483
+ return n;
3459
3484
  } }), Reflect.defineProperty(a.config.globalProperties, "$router", { get() {
3460
3485
  return t;
3461
3486
  } }), Reflect.defineProperty(a.config.globalProperties, "$bus", { get() {
@@ -3464,122 +3489,121 @@ function Vi(e = {}) {
3464
3489
  return r;
3465
3490
  } }), Reflect.defineProperty(a.config.globalProperties, "$eventProxy", { get() {
3466
3491
  return s;
3467
- } }), a.config.globalProperties.$fox_on = function(o, l, u = !1) {
3468
- s.on(o, l, u);
3469
- }, a.config.globalProperties.$fox_off = function(o, l) {
3470
- s.off(o, l);
3471
- }, a.config.globalProperties.$fox_once = function(o, l) {
3472
- s.once(o, l);
3473
- }, a.config.globalProperties.$fox_all = function(...o) {
3474
- let l = s;
3475
- Reflect.apply(l.all, l, o);
3476
- }, a.config.globalProperties.$fox_trigger = function(o, ...l) {
3492
+ } }), a.config.globalProperties.$fox_on = function(l, o, u = !1) {
3493
+ s.on(l, o, u);
3494
+ }, a.config.globalProperties.$fox_off = function(l, o) {
3495
+ s.off(l, o);
3496
+ }, a.config.globalProperties.$fox_once = function(l, o) {
3497
+ s.once(l, o);
3498
+ }, a.config.globalProperties.$fox_all = function(...l) {
3499
+ let o = s;
3500
+ Reflect.apply(o.all, o, l);
3501
+ }, a.config.globalProperties.$fox_trigger = function(l, ...o) {
3477
3502
  let u = s;
3478
- Reflect.apply(u.trigger, u, [o, ...l]);
3479
- }, a.config.globalProperties.$fox_emit = function(o, ...l) {
3503
+ Reflect.apply(u.trigger, u, [l, ...o]);
3504
+ }, a.config.globalProperties.$fox_emit = function(l, ...o) {
3480
3505
  let u = s;
3481
- Reflect.apply(u.trigger, u, [o, ...l]);
3506
+ Reflect.apply(u.trigger, u, [l, ...o]);
3482
3507
  }, a.mixin({ computed: { $route() {
3483
3508
  return Zt(this);
3484
3509
  } } }), t.init();
3485
3510
  }
3486
3511
  };
3487
- return i;
3512
+ return n;
3488
3513
  }
3489
- function as(e) {
3514
+ function ls(e) {
3490
3515
  return e ? e.$router : G(ht);
3491
3516
  }
3492
3517
  function Wi(e) {
3493
- return e || (e = Wt()?.proxy ?? void 0), e ? Zt(e) : null;
3518
+ return e || (e = Vt()?.proxy ?? void 0), e ? Zt(e) : null;
3494
3519
  }
3495
3520
  function Ji(e) {
3496
- return e ? e.$fox : G(ns);
3521
+ return e ? e.$fox : G(is);
3497
3522
  }
3498
3523
  function zi(e) {
3499
- return e ? e.$bus : G(os);
3524
+ return e ? e.$bus : G(ns);
3500
3525
  }
3501
3526
  function Gi(e) {
3502
- return e ? e.$eventProxy : G(ls);
3527
+ return e ? e.$eventProxy : G(os);
3503
3528
  }
3504
3529
  function Xi(e) {
3505
- const t = as(), r = (s, n, i) => {
3530
+ const t = ls(), r = (s, i, n) => {
3506
3531
  try {
3507
- Reflect.apply(e, {}, [s, n]);
3532
+ Reflect.apply(e, {}, [s, i]);
3508
3533
  } catch (a) {
3509
3534
  console.error(a);
3510
3535
  }
3511
- i();
3536
+ n();
3512
3537
  };
3513
- t.beforeEach(r), ft(() => {
3538
+ t.beforeEach(r), ct(() => {
3514
3539
  t.removeBeforeEach(r);
3515
3540
  });
3516
3541
  }
3517
3542
  function Qi(e) {
3518
- const t = as(), r = (s, n, i) => {
3543
+ const t = ls(), r = (s, i, n) => {
3519
3544
  try {
3520
- Reflect.apply(e, {}, [s, n]);
3545
+ Reflect.apply(e, {}, [s, i]);
3521
3546
  } catch (a) {
3522
3547
  console.error(a);
3523
3548
  }
3524
- i();
3549
+ n();
3525
3550
  };
3526
- t.afterEach(r), ft(() => {
3551
+ t.afterEach(r), ct(() => {
3527
3552
  t.removeAfterEach(r);
3528
3553
  });
3529
3554
  }
3530
3555
  export {
3531
- or as Bus,
3532
- ut as EventChain,
3533
- dr as EventProxy,
3534
- qs as FoxBeforeEnter,
3535
- Ts as FoxBeforeLeave,
3536
- js as FoxEnter,
3537
- Ls as FoxLeave,
3556
+ nr as Bus,
3557
+ ft as EventChain,
3558
+ yr as EventProxy,
3559
+ Ks as FoxBeforeEnter,
3560
+ qs as FoxBeforeLeave,
3561
+ $s as FoxEnter,
3562
+ js as FoxLeave,
3538
3563
  Ht as FoxLeaveEnd,
3539
- F as OperationType,
3564
+ C as OperationType,
3540
3565
  x as Route,
3541
- oi as RouterLink,
3542
- Vt as RouterView,
3543
- Gt as clone,
3566
+ ii as RouterLink,
3567
+ Ut as RouterView,
3544
3568
  Vi as createFox,
3545
- bi as createMemoryHistory,
3546
- pi as createWebHashHistory,
3547
- Hi as createWebHistory,
3548
- Di as deleteContextValue,
3549
- _ as extend,
3550
- os as foxBusKey,
3551
- ls as foxEventProxyKey,
3552
- ns as foxKey,
3553
- Hr as injectContextValue,
3554
- tr as isArray,
3555
- Ki as isDate,
3556
- $r as isESModule,
3557
- sr as isEqual,
3558
- w as isFunction,
3559
- _i as isMap,
3560
- ct as isNil,
3561
- vs as isObject,
3562
- gs as isPlainObject,
3563
- Ti as isPromise,
3564
- $i as isSet,
3569
+ pi as createMemoryHistory,
3570
+ mi as createWebHashHistory,
3571
+ Ni as createWebHistory,
3572
+ Bi as deleteContextValue,
3573
+ q as extend,
3574
+ ns as foxBusKey,
3575
+ os as foxEventProxyKey,
3576
+ is as foxKey,
3577
+ Nr as injectContextValue,
3578
+ er as isArray,
3579
+ $i as isDate,
3580
+ zt as isESModule,
3581
+ rr as isEqual,
3582
+ b as isFunction,
3583
+ Ai as isMap,
3584
+ He as isNil,
3585
+ ds as isObject,
3586
+ vs as isPlainObject,
3587
+ Mi as isPromise,
3588
+ Ki as isSet,
3565
3589
  qi as isString,
3566
3590
  ji as isSymbol,
3567
3591
  Qi as onAfterRouteUpdate,
3568
3592
  Xi as onBeforeRouteUpdate,
3569
- Bi as onFoxActivated,
3570
- Ni as onFoxInactivated,
3571
- Mi as provideContextValue,
3593
+ Di as onFoxActivated,
3594
+ Hi as onFoxInactivated,
3595
+ Oi as provideContextValue,
3572
3596
  Ii as rawState,
3573
- Oi as reactiveState,
3597
+ Ti as reactiveState,
3574
3598
  oe as sessionKey,
3575
3599
  ki as shallowReactiveState,
3576
- Kr as toBoolean,
3600
+ $r as toBoolean,
3577
3601
  Li as toNumber,
3578
- zt as toTypeString,
3579
- rr as typeOf,
3602
+ Jt as toTypeString,
3603
+ tr as typeOf,
3580
3604
  zi as useBus,
3581
3605
  Gi as useEventProxy,
3582
3606
  Ji as useFox,
3583
3607
  Wi as useRoute,
3584
- as as useRouter
3608
+ ls as useRouter
3585
3609
  };