@fox-js/fox 3.1.6 → 3.1.7

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,4 +1,4 @@
1
- import { defineComponent as $r, effectScope as us, getCurrentScope as Kr, h as ue, hasInjectionContext as Pe, inject as L, onActivated as fs, onDeactivated as cs, onScopeDispose as Ce, provide as Z, reactive as hs, readonly as ys, ref as ds, shallowReactive as ms, shallowRef as jr, toRaw as Ot, watch as vs } from "vue";
1
+ import { defineComponent as $r, effectScope as us, getCurrentScope as Kr, h as fe, hasInjectionContext as Pe, inject as L, onActivated as fs, onDeactivated as cs, onScopeDispose as Ce, provide as Z, reactive as hs, readonly as ys, ref as ds, shallowReactive as ms, shallowRef as jr, toRaw as Ot, watch as vs } from "vue";
2
2
  var Se = typeof window < "u", C = function() {
3
3
  return window;
4
4
  }, Be = function() {
@@ -20,7 +20,7 @@ var Ve = (e, t, r) => {
20
20
  let i = !0, n = !0;
21
21
  for (let o in t) o === "bubbles" ? i = !!t[o] : o === "cancelable" ? n = !!t[o] : s[o] = t[o];
22
22
  s.initEvent(e, i, n), (r ?? document).dispatchEvent(s);
23
- }, sr = Array.isArray, ji = (e) => Qt(e) === "[object Map]", ki = (e) => Qt(e) === "[object Set]", Ti = (e) => e instanceof Date, b = (e) => typeof e == "function", Mi = (e) => typeof e == "string", Li = (e) => typeof e == "symbol", ps = (e) => e !== null && typeof e == "object", Ii = (e) => ps(e) && b(e.then) && b(e.catch), Ue = (e) => e == null, gs = Object.prototype.toString, Qt = (e) => gs.call(e), ws = (e) => Qt(e) === "[object Object]", bs = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
23
+ }, sr = Array.isArray, Ki = (e) => Qt(e) === "[object Map]", ji = (e) => Qt(e) === "[object Set]", ki = (e) => e instanceof Date, b = (e) => typeof e == "function", Ti = (e) => typeof e == "string", Mi = (e) => typeof e == "symbol", ps = (e) => e !== null && typeof e == "object", Li = (e) => ps(e) && b(e.then) && b(e.catch), Ue = (e) => e == null, gs = Object.prototype.toString, Qt = (e) => gs.call(e), ws = (e) => Qt(e) === "[object Object]", bs = typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol";
24
24
  function Zt(e) {
25
25
  return e.__esModule || bs && e[Symbol.toStringTag] === "Module";
26
26
  }
@@ -73,7 +73,7 @@ function Oe(e, ...t) {
73
73
  function Tr(e) {
74
74
  return e == null ? !1 : typeof e == "boolean" ? e : typeof e == "string" ? e.toLocaleLowerCase() === "true" : !!e;
75
75
  }
76
- function Oi(e) {
76
+ function Ii(e) {
77
77
  return typeof e == "number" ? e : Number(e);
78
78
  }
79
79
  var Ss = {
@@ -141,17 +141,17 @@ function Ir(e, t) {
141
141
  }, t);
142
142
  };
143
143
  }
144
- var or = /* @__PURE__ */ Symbol("idKey"), ce = /* @__PURE__ */ Symbol("valueKey"), R = /* @__PURE__ */ Symbol("childrenKey"), W = /* @__PURE__ */ Symbol("growKey"), Or = class {
144
+ var or = /* @__PURE__ */ Symbol("idKey"), he = /* @__PURE__ */ Symbol("valueKey"), R = /* @__PURE__ */ Symbol("childrenKey"), W = /* @__PURE__ */ Symbol("growKey"), Or = class {
145
145
  [W] = !0;
146
146
  [or];
147
- [ce] = ds();
147
+ [he] = ds();
148
148
  [R] = /* @__PURE__ */ new Map();
149
149
  constructor(e) {
150
150
  this[or] = e;
151
151
  }
152
152
  }, Ps = class {
153
153
  get(e, t) {
154
- if (t == "value") return e[ce].value;
154
+ if (t == "value") return e[he].value;
155
155
  if (t === "grow") return e[W];
156
156
  let r = e[R].get(t);
157
157
  if (r) return De(r);
@@ -159,7 +159,7 @@ var or = /* @__PURE__ */ Symbol("idKey"), ce = /* @__PURE__ */ Symbol("valueKey"
159
159
  return r = er(t), r[W] = e[W], e[R].set(t, r), De(r);
160
160
  }
161
161
  set(e, t, r) {
162
- return t == "value" ? (e[ce].value = r, !0) : t === "grow" ? (e[W] = Tr(r), !0) : r == null ? (e[R].delete(t), !0) : (console.error(`[Fox]illegal property:${t}`), !1);
162
+ return t == "value" ? (e[he].value = r, !0) : t === "grow" ? (e[W] = Tr(r), !0) : r == null ? (e[R].delete(t), !0) : (console.error(`[Fox]illegal property:${t}`), !1);
163
163
  }
164
164
  deleteProperty(e, t) {
165
165
  return t === "value" || t == "grow" ? (console.error(`[Fox]can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
@@ -265,7 +265,7 @@ var Cs = class {
265
265
  let i = e[s], n;
266
266
  r[R].has(i) ? n = r[R].get(i) : (n = er(i), r[R].set(i, n)), r = n;
267
267
  }
268
- return r[ce].value = e[t - 1], this._persistHandler.put(e), !0;
268
+ return r[he].value = e[t - 1], this._persistHandler.put(e), !0;
269
269
  }
270
270
  get(...e) {
271
271
  let t = e.length;
@@ -276,7 +276,7 @@ var Cs = class {
276
276
  if (r[R].has(i)) r = r[R].get(i);
277
277
  else return;
278
278
  }
279
- return r[ce].value;
279
+ return r[he].value;
280
280
  }
281
281
  remove(...e) {
282
282
  let t = e.length;
@@ -318,7 +318,7 @@ function lr(e) {
318
318
  }
319
319
  var Fs = class {
320
320
  get(e, t) {
321
- if (t == "value") return e[ce].value;
321
+ if (t == "value") return e[he].value;
322
322
  if (t === "grow") return e[W];
323
323
  if (t === R) return e[R];
324
324
  if (typeof t == "string" && lr(t)) return e[t];
@@ -329,7 +329,7 @@ var Fs = class {
329
329
  return s = er(r), s[W] = e[W], e[R].set(r, s), De(s);
330
330
  }
331
331
  set(e, t, r) {
332
- return t == "value" ? (e[ce].value = r, !0) : t === "grow" ? (e[W] = Tr(r), !0) : lr(t) ? !1 : r == null ? (e[R].delete(t), !0) : (console.error(`[Fox]illegal property:${t}`), !1);
332
+ return t == "value" ? (e[he].value = r, !0) : t === "grow" ? (e[W] = Tr(r), !0) : lr(t) ? !1 : r == null ? (e[R].delete(t), !0) : (console.error(`[Fox]illegal property:${t}`), !1);
333
333
  }
334
334
  deleteProperty(e, t) {
335
335
  return t === "value" || t == "grow" ? (console.error(`[Fox]can not delete property:${String(t)}`), !1) : (e[R].delete(t), !0);
@@ -410,10 +410,10 @@ function Nr(e, t, r) {
410
410
  });
411
411
  }), Dt.set(o, l), o;
412
412
  }
413
- function Hi(e, t) {
413
+ function Oi(e, t) {
414
414
  return Nr(!1, e, t);
415
415
  }
416
- function Di(e, t) {
416
+ function Hi(e, t) {
417
417
  return Nr(!0, e, t);
418
418
  }
419
419
  function As(e, t) {
@@ -442,10 +442,10 @@ function As(e, t) {
442
442
  }
443
443
  });
444
444
  }
445
- function Ni(e, t) {
445
+ function Di(e, t) {
446
446
  return As(e, t);
447
447
  }
448
- function Ui(e) {
448
+ function Ni(e) {
449
449
  const t = Dt.get(e);
450
450
  t && (Dt.delete(e), t.stop());
451
451
  }
@@ -459,8 +459,8 @@ function Ks(e) {
459
459
  if (!e) return [[]];
460
460
  if (e === "/") return [[qs]];
461
461
  if (!e.startsWith("/")) throw new Error(`Invalid path "${e}"`);
462
- function t(y) {
463
- throw new Error(`ERR (${r})/"${u}": ${y}`);
462
+ function t(d) {
463
+ throw new Error(`ERR (${r})/"${u}": ${d}`);
464
464
  }
465
465
  let r = 0, s = r;
466
466
  const i = [];
@@ -526,29 +526,29 @@ function Ts(e, t) {
526
526
  r.strict && !u.length && (i += "/");
527
527
  for (let c = 0; c < u.length; c++) {
528
528
  const h = u[c];
529
- let y = 40 + (r.sensitive ? 0.25 : 0);
529
+ let d = 40 + (r.sensitive ? 0.25 : 0);
530
530
  if (h.type === We.Static)
531
- c || (i += "/"), i += h.value.replace(ks, "\\$&"), y += 40;
531
+ c || (i += "/"), i += h.value.replace(ks, "\\$&"), d += 40;
532
532
  else if (h.type === We.Param) {
533
- const { value: d, repeatable: m, optional: w, regexp: v } = h;
533
+ const { value: y, repeatable: m, optional: w, regexp: p } = h;
534
534
  n.push({
535
- name: d,
535
+ name: y,
536
536
  repeatable: m,
537
537
  optional: w
538
538
  });
539
- const p = v || ur;
540
- if (p !== ur) {
541
- y += 10;
539
+ const g = p || ur;
540
+ if (g !== ur) {
541
+ d += 10;
542
542
  try {
543
- new RegExp(`(${p})`);
543
+ new RegExp(`(${g})`);
544
544
  } catch (K) {
545
- throw new Error(`Invalid custom RegExp for param "${d}" (${p}): ` + K.message);
545
+ throw new Error(`Invalid custom RegExp for param "${y}" (${g}): ` + K.message);
546
546
  }
547
547
  }
548
- let $ = m ? `((?:${p})(?:/(?:${p}))*)` : `(${p})`;
549
- c || ($ = w && u.length < 2 ? `(?:/${$})` : "/" + $), w && ($ += "?"), i += $, y += 20, w && (y += -8), m && (y += -20), p === ".*" && (y += -50);
548
+ let $ = m ? `((?:${g})(?:/(?:${g}))*)` : `(${g})`;
549
+ c || ($ = w && u.length < 2 ? `(?:/${$})` : "/" + $), w && ($ += "?"), i += $, d += 20, w && (d += -8), m && (d += -20), g === ".*" && (d += -50);
550
550
  }
551
- f.push(y);
551
+ f.push(d);
552
552
  }
553
553
  s.push(f);
554
554
  }
@@ -562,8 +562,8 @@ function Ts(e, t) {
562
562
  const f = u.match(o), c = {};
563
563
  if (!f) return null;
564
564
  for (let h = 1; h < f.length; h++) {
565
- const y = f[h] || "", d = n[h - 1];
566
- c[d.name] = y && d.repeatable ? y.split("/") : y;
565
+ const d = f[h] || "", y = n[h - 1];
566
+ c[y.name] = d && y.repeatable ? d.split("/") : d;
567
567
  }
568
568
  return c;
569
569
  }
@@ -571,16 +571,16 @@ function Ts(e, t) {
571
571
  let f = "", c = !1;
572
572
  for (const h of e) {
573
573
  (!c || !f.endsWith("/")) && (f += "/"), c = !1;
574
- for (const y of h) if (y.type === We.Static) f += y.value;
575
- else if (y.type === We.Param) {
576
- const { value: d, repeatable: m, optional: w } = y, v = d in u ? u[d] : "";
577
- if (sr(v) && !m) throw new Error(`Provided param "${d}" is an array but it is not repeatable (* or + modifiers)`);
578
- const p = sr(v) ? v.join("/") : v;
579
- if (!p)
574
+ for (const d of h) if (d.type === We.Static) f += d.value;
575
+ else if (d.type === We.Param) {
576
+ const { value: y, repeatable: m, optional: w } = d, p = y in u ? u[y] : "";
577
+ if (sr(p) && !m) throw new Error(`Provided param "${y}" is an array but it is not repeatable (* or + modifiers)`);
578
+ const g = sr(p) ? p.join("/") : p;
579
+ if (!g)
580
580
  if (w)
581
581
  h.length < 2 && (f.endsWith("/") ? f = f.slice(0, -1) : c = !0);
582
- else throw new Error(`Missing required param "${d}"`);
583
- f += p;
582
+ else throw new Error(`Missing required param "${y}"`);
583
+ f += g;
584
584
  }
585
585
  }
586
586
  return f || "/";
@@ -729,7 +729,7 @@ var Is = class {
729
729
  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;
730
730
  })({}), gt = /* @__PURE__ */ (function(e) {
731
731
  return e[e.Part = 0] = "Part", e[e.All = 1] = "All", e;
732
- })({}), V = /* @__PURE__ */ Symbol("rootKey"), B = /* @__PURE__ */ Symbol("rootNodeKey"), fe = /* @__PURE__ */ Symbol("parentNodeKey"), at = /* @__PURE__ */ Symbol("nameKey"), Y = class {
732
+ })({}), V = /* @__PURE__ */ Symbol("rootKey"), B = /* @__PURE__ */ Symbol("rootNodeKey"), ce = /* @__PURE__ */ Symbol("parentNodeKey"), at = /* @__PURE__ */ Symbol("nameKey"), Y = class {
733
733
  model;
734
734
  route;
735
735
  active = !0;
@@ -748,7 +748,7 @@ var Is = class {
748
748
  [at];
749
749
  [V];
750
750
  [B] = null;
751
- [fe] = null;
751
+ [ce] = null;
752
752
  get name() {
753
753
  return this[at];
754
754
  }
@@ -789,14 +789,14 @@ var Is = class {
789
789
  release(e) {
790
790
  this.submitRecorder.time === e && (this.submitRecorder.route = void 0);
791
791
  }
792
- }, O = /* @__PURE__ */ Symbol("chainKey"), T = /* @__PURE__ */ Symbol("cursorKey"), bt = /* @__PURE__ */ Symbol("$persistentModeKey"), P = /* @__PURE__ */ Symbol("statusKey"), J = /* @__PURE__ */ Symbol("argsKey"), Je = /* @__PURE__ */ Symbol("exArgsKey"), de = /* @__PURE__ */ Symbol("successFnsKey"), Ae = /* @__PURE__ */ Symbol("errorFnsKey"), ne = /* @__PURE__ */ Symbol("sessionKey"), G = /* @__PURE__ */ Symbol("_go"), ft = class {
792
+ }, O = /* @__PURE__ */ Symbol("chainKey"), T = /* @__PURE__ */ Symbol("cursorKey"), bt = /* @__PURE__ */ Symbol("$persistentModeKey"), P = /* @__PURE__ */ Symbol("statusKey"), J = /* @__PURE__ */ Symbol("argsKey"), Je = /* @__PURE__ */ Symbol("exArgsKey"), me = /* @__PURE__ */ Symbol("successFnsKey"), Ae = /* @__PURE__ */ Symbol("errorFnsKey"), ne = /* @__PURE__ */ Symbol("sessionKey"), G = /* @__PURE__ */ Symbol("_go"), ft = class {
793
793
  [O] = [];
794
794
  [T] = 0;
795
795
  [bt] = !1;
796
796
  [P] = "Free";
797
797
  [J] = [];
798
798
  [Je] = [];
799
- [de] = [];
799
+ [me] = [];
800
800
  [Ae] = [];
801
801
  [ne];
802
802
  get session() {
@@ -820,8 +820,8 @@ var Is = class {
820
820
  return this[P] = r, this[O] = [], this[T] = 0, this;
821
821
  } else if (r === "Finished" || this[T] >= this[O].length) {
822
822
  let n = [{ session: this[ne] }, ...this[J]];
823
- for (; this[de].length > 0; ) {
824
- let o = this[de].shift();
823
+ for (; this[me].length > 0; ) {
824
+ let o = this[me].shift();
825
825
  typeof o == "function" && Oe(() => {
826
826
  Reflect.apply(o, {}, n);
827
827
  });
@@ -872,8 +872,8 @@ var Is = class {
872
872
  reset(...e) {
873
873
  this[P] = "Busy", this[J] = e, this[O] = [], this[T] = 0;
874
874
  let t = [{ session: this[ne] }, ...this[J]];
875
- for (; this[de].length > 0; ) {
876
- let r = this[de].shift();
875
+ for (; this[me].length > 0; ) {
876
+ let r = this[me].shift();
877
877
  Oe(() => {
878
878
  Reflect.apply(r, this, t);
879
879
  });
@@ -884,7 +884,7 @@ var Is = class {
884
884
  return this[P] === "Reject" || this[P] === "Exception" ? this : (Array.isArray(e) ? this[O] = [...this[O], ...e] : this[O].push(e), this[P] === "Busy" ? this : (Reflect.apply(this[G], this, [0, ...this[J]]), this));
885
885
  }
886
886
  wait(e, t) {
887
- return e && typeof e == "function" && this[de].push(e), t && typeof t == "function" && this[Ae].push(t), this[P] === "Busy" ? this : (Reflect.apply(this[G], this, [0, ...this[J]]), this);
887
+ return e && typeof e == "function" && this[me].push(e), t && typeof t == "function" && this[Ae].push(t), this[P] === "Busy" ? this : (Reflect.apply(this[G], this, [0, ...this[J]]), this);
888
888
  }
889
889
  exception(e) {
890
890
  return e && typeof e == "function" && this[Ae].push(e), this[P] === "Busy" ? this : Reflect.apply(this[G], this, [0, ...this[J]]);
@@ -1066,15 +1066,15 @@ var Wr = class {
1066
1066
  if (x.isSame(h, e))
1067
1067
  return t(), !0;
1068
1068
  if (f > 0) {
1069
- let y = !1;
1070
- for (let d = f - 1; d >= 0; d--) {
1071
- const m = x.from(u[d]);
1069
+ let d = !1;
1070
+ for (let y = f - 1; y >= 0; y--) {
1071
+ const m = x.from(u[y]);
1072
1072
  if (!(m.traceless === !0 || Qe(this.traceless, m)) && x.isSame(m, e)) {
1073
- y = !0;
1073
+ d = !0;
1074
1074
  break;
1075
1075
  }
1076
1076
  }
1077
- return y ? (setTimeout(() => {
1077
+ return d ? (setTimeout(() => {
1078
1078
  o = setTimeout(l, n), this.go(-1, a);
1079
1079
  }, 0), !0) : (t(), !0);
1080
1080
  }
@@ -1115,7 +1115,7 @@ var Wr = class {
1115
1115
  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}`;
1116
1116
  }
1117
1117
  };
1118
- function Bi(e = !0, t = null, r = "", s = !0, i = !1, n) {
1118
+ function Ui(e = !0, t = null, r = "", s = !0, i = !1, n) {
1119
1119
  return t !== null && (t = C().location.pathname), t && t.endsWith("/") && (t = t.substring(0, t.length - 1)), new Wr("path", t ?? "", r, e, s, i, n);
1120
1120
  }
1121
1121
  function Us(e = !0, t = "", r = !0, s = !1, i) {
@@ -1191,19 +1191,19 @@ var Bs = class {
1191
1191
  function Vs(e = "", t = 50) {
1192
1192
  return new Bs(e, t);
1193
1193
  }
1194
- var Ze = /* @__PURE__ */ Symbol("_constructRouteModel"), Ye = /* @__PURE__ */ Symbol("_findRouteModel"), Pt = /* @__PURE__ */ Symbol("_findRootView"), Ws = /* @__PURE__ */ Symbol("_getFirstView"), le = /* @__PURE__ */ Symbol("_removeView"), vr = /* @__PURE__ */ Symbol("_buildPage"), pr = /* @__PURE__ */ Symbol("_resolveComponent"), gr = /* @__PURE__ */ Symbol("_update"), ee = /* @__PURE__ */ Symbol("_merge"), Ct = /* @__PURE__ */ Symbol("_handleHistoryChange"), me = /* @__PURE__ */ Symbol("_handleRouteUpdated"), et = /* @__PURE__ */ Symbol("routeUpdatedCallback"), _t = /* @__PURE__ */ Symbol("currentRoute"), g = /* @__PURE__ */ Symbol("currentRoutes"), tt = /* @__PURE__ */ Symbol("routeSessionCacheKey"), wr = /* @__PURE__ */ Symbol("_addRouteRecorder"), $e = /* @__PURE__ */ Symbol("_removeRouteRecorder"), Ke = /* @__PURE__ */ Symbol("_cloneRouteRecorder"), A = /* @__PURE__ */ Symbol("_handleError"), rt = /* @__PURE__ */ Symbol("errorCallback"), H = /* @__PURE__ */ Symbol("registerKey"), st = /* @__PURE__ */ Symbol("notFoundKey"), Ft = /* @__PURE__ */ Symbol("notFoundPathKey"), U = /* @__PURE__ */ Symbol("forestKey"), S = /* @__PURE__ */ Symbol("historyKey"), je = /* @__PURE__ */ Symbol("beforeFiltersKey"), ke = /* @__PURE__ */ Symbol("afterFiltersKey"), Te = /* @__PURE__ */ Symbol("destroyFiltersKey"), Et = /* @__PURE__ */ Symbol("propsFilterKey"), ve = /* @__PURE__ */ Symbol("mainDispatcherKey"), it = /* @__PURE__ */ Symbol("initKey"), ae = /* @__PURE__ */ Symbol("readyKey"), nt = /* @__PURE__ */ Symbol("readyHandlersKey"), ot = /* @__PURE__ */ Symbol("_markReady"), br = /* @__PURE__ */ Symbol("_createNextFn"), At = /* @__PURE__ */ Symbol("_start"), qt = /* @__PURE__ */ Symbol("_before"), $t = /* @__PURE__ */ Symbol("_after"), Rr = /* @__PURE__ */ Symbol("_destroy"), Kt = /* @__PURE__ */ Symbol("_load"), Me = /* @__PURE__ */ Symbol("_unload"), te = /* @__PURE__ */ Symbol("routerGuardKey");
1195
- function zs(e) {
1196
- return e.layers.length == 0 || e.layers[0].views.length == 0;
1194
+ var Ze = /* @__PURE__ */ Symbol("_constructRouteModel"), Ye = /* @__PURE__ */ Symbol("_findRouteModel"), Pt = /* @__PURE__ */ Symbol("_findRootView"), le = /* @__PURE__ */ Symbol("_removeView"), vr = /* @__PURE__ */ Symbol("_buildPage"), pr = /* @__PURE__ */ Symbol("_resolveComponent"), gr = /* @__PURE__ */ Symbol("_update"), ee = /* @__PURE__ */ Symbol("_merge"), Ct = /* @__PURE__ */ Symbol("_handleHistoryChange"), ae = /* @__PURE__ */ Symbol("_handleRouteUpdated"), et = /* @__PURE__ */ Symbol("routeUpdatedCallback"), _t = /* @__PURE__ */ Symbol("currentRoute"), v = /* @__PURE__ */ Symbol("currentRoutes"), tt = /* @__PURE__ */ Symbol("routeSessionCacheKey"), wr = /* @__PURE__ */ Symbol("_addRouteRecorder"), $e = /* @__PURE__ */ Symbol("_removeRouteRecorder"), Ke = /* @__PURE__ */ Symbol("_cloneRouteRecorder"), A = /* @__PURE__ */ Symbol("_handleError"), rt = /* @__PURE__ */ Symbol("errorCallback"), H = /* @__PURE__ */ Symbol("registerKey"), st = /* @__PURE__ */ Symbol("notFoundKey"), Ft = /* @__PURE__ */ Symbol("notFoundPathKey"), U = /* @__PURE__ */ Symbol("forestKey"), S = /* @__PURE__ */ Symbol("historyKey"), je = /* @__PURE__ */ Symbol("beforeFiltersKey"), ke = /* @__PURE__ */ Symbol("afterFiltersKey"), Te = /* @__PURE__ */ Symbol("destroyFiltersKey"), Et = /* @__PURE__ */ Symbol("propsFilterKey"), ve = /* @__PURE__ */ Symbol("mainDispatcherKey"), it = /* @__PURE__ */ Symbol("initKey"), ue = /* @__PURE__ */ Symbol("readyKey"), nt = /* @__PURE__ */ Symbol("readyHandlersKey"), ot = /* @__PURE__ */ Symbol("_markReady"), br = /* @__PURE__ */ Symbol("_createNextFn"), At = /* @__PURE__ */ Symbol("_start"), qt = /* @__PURE__ */ Symbol("_before"), $t = /* @__PURE__ */ Symbol("_after"), Rr = /* @__PURE__ */ Symbol("_destroy"), Kt = /* @__PURE__ */ Symbol("_load"), Me = /* @__PURE__ */ Symbol("_unload"), te = /* @__PURE__ */ Symbol("routerGuardKey");
1195
+ function Ws(e) {
1196
+ return e.layers.length === 0 || e.layers[0].views.length === 0;
1197
1197
  }
1198
- var Js = class {
1198
+ var zs = class {
1199
1199
  [H] = new Array();
1200
1200
  [st];
1201
1201
  [Ft] = "*";
1202
- [ae] = !1;
1202
+ [ue] = !1;
1203
1203
  [nt] = [];
1204
1204
  [U] = new Hs();
1205
1205
  [S];
1206
- [g] = new Array();
1206
+ [v] = new Array();
1207
1207
  [_t] = jr(null);
1208
1208
  [tt] = /* @__PURE__ */ new WeakMap();
1209
1209
  [rt] = null;
@@ -1232,7 +1232,7 @@ var Js = class {
1232
1232
  } catch (i) {
1233
1233
  console.error(i.message, i), s = !1;
1234
1234
  }
1235
- this[ae] === !1 && this[ot](s);
1235
+ this[ue] === !1 && this[ot](s);
1236
1236
  });
1237
1237
  }
1238
1238
  [A](e = "error", t) {
@@ -1247,18 +1247,18 @@ var Js = class {
1247
1247
  console.error(e);
1248
1248
  }
1249
1249
  init() {
1250
- this[it] !== !0 && (this[S]?.init(!this[ae]), this[it] = !0);
1250
+ this[it] !== !0 && (this[S]?.init(!this[ue]), this[it] = !0);
1251
1251
  }
1252
1252
  destroy() {
1253
1253
  this[S]?.destroy(), this[it] = !1;
1254
1254
  }
1255
1255
  isReady() {
1256
- return this[ae] ? Promise.resolve() : new Promise((e, t) => {
1256
+ return this[ue] ? Promise.resolve() : new Promise((e, t) => {
1257
1257
  this[nt].push([e, t]);
1258
1258
  });
1259
1259
  }
1260
1260
  [ot](e) {
1261
- this[ae] = !0, this[nt].forEach(([t, r]) => {
1261
+ this[ue] = !0, this[nt].forEach(([t, r]) => {
1262
1262
  try {
1263
1263
  e ? t() : r();
1264
1264
  } catch (s) {
@@ -1269,16 +1269,16 @@ var Js = class {
1269
1269
  [Ct](e) {
1270
1270
  try {
1271
1271
  if (!e) {
1272
- let n = [...this[g]].reverse();
1272
+ let n = [...this[v]].reverse();
1273
1273
  return this[Me](n), Se && C().location.reload(), Promise.resolve();
1274
1274
  }
1275
1275
  let t = null, r = [], s = [], i = 0;
1276
- for (; i < e.length && i < this[g].length && x.isSame(e[i], this[g][i]); i++)
1277
- e[i].active === !0 && e[i].active !== this[g][i].active && (t = e[i]);
1276
+ for (; i < e.length && i < this[v].length && x.isSame(e[i], this[v][i]); i++)
1277
+ e[i].active === !0 && e[i].active !== this[v][i].active && (t = e[i]);
1278
1278
  if (i < e.length) r = e.slice(i);
1279
- else if (i === e.length) for (; i < this[g].length && this[g][i].historyUpdatePolicy === "traceless"; i++)
1280
- r.push(this[g][i]), t = e[i];
1281
- if (i < this[g].length && (s = this[g].slice(i).reverse()), s.length === 0 && r.length === 0) {
1279
+ else if (i === e.length) for (; i < this[v].length && this[v][i].historyUpdatePolicy === "traceless"; i++)
1280
+ r.push(this[v][i]), t = e[i];
1281
+ if (i < this[v].length && (s = this[v].slice(i).reverse()), s.length === 0 && r.length === 0) {
1282
1282
  if (t !== null) return this.restore([t]);
1283
1283
  } else if (s.length > 0) {
1284
1284
  if (this[Me](s)) {
@@ -1291,7 +1291,7 @@ var Js = class {
1291
1291
  }
1292
1292
  return Promise.resolve();
1293
1293
  }
1294
- [me](e = null) {
1294
+ [ae](e = null) {
1295
1295
  if (this[_t].value = e, typeof this[et] == "function") try {
1296
1296
  this[et](e);
1297
1297
  } catch {
@@ -1300,51 +1300,39 @@ var Js = class {
1300
1300
  [wr](e, t) {
1301
1301
  if (e.opsType === _.Open) {
1302
1302
  let r = !1;
1303
- const s = this[g].length - 1;
1303
+ const s = this[v].length - 1;
1304
1304
  for (let i = s; i >= 0; i--) {
1305
- const n = this[g][i];
1306
- if (e.root == n.root) {
1307
- if (e.path === n.path) {
1308
- this[g].splice(i, 1, e), r = !0;
1309
- continue;
1310
- }
1311
- e.active && (n.active = !1);
1305
+ const n = this[v][i];
1306
+ if (e.root == n.root && e.path === n.path) {
1307
+ this[v].splice(i, 1, e), r = !0;
1308
+ continue;
1312
1309
  }
1313
1310
  }
1314
- r || this[g].push(e);
1315
- } else this[g].push(e);
1316
- this[tt].set(e, t), this[me](e);
1311
+ r || this[v].push(e);
1312
+ } else this[v].push(e);
1313
+ this[tt].set(e, t);
1317
1314
  }
1318
1315
  [Ke]() {
1319
1316
  let e = [];
1320
- for (let t of this[g]) {
1317
+ for (let t of this[v]) {
1321
1318
  let r = x.clone(t, !0);
1322
1319
  e.push(r);
1323
1320
  }
1324
1321
  return e;
1325
1322
  }
1326
1323
  [$e](e) {
1327
- if (!this[g]) {
1328
- this[me](null);
1329
- return;
1330
- }
1324
+ if (!this[v]) return;
1331
1325
  let t = -1;
1332
- for (let s = 0; s < this[g].length; s++) if (x.isSame(this[g][s], e)) {
1333
- t = s;
1326
+ for (let r = 0; r < this[v].length; r++) if (x.isSame(this[v][r], e)) {
1327
+ t = r;
1334
1328
  break;
1335
1329
  }
1336
1330
  if (t != -1) {
1337
- const s = this[g][t];
1338
- this[g].splice(t, 1);
1339
- const i = this[tt].get(s);
1340
- this[tt].delete(s), this[Rr](s, i);
1341
- }
1342
- let r = -1;
1343
- for (let s = this[g].length - 1; s >= 0; s--) if (this[g][s].active === !0) {
1344
- r = s;
1345
- break;
1331
+ const r = this[v][t];
1332
+ this[v].splice(t, 1);
1333
+ const s = this[tt].get(r);
1334
+ this[tt].delete(r), this[Rr](r, s);
1346
1335
  }
1347
- r !== -1 ? this[me](this[g][r]) : this[me](null);
1348
1336
  }
1349
1337
  set historyMonitor(e) {
1350
1338
  this[S] && (this[S].historyMonitor = e);
@@ -1559,14 +1547,14 @@ var Js = class {
1559
1547
  return new Promise((r) => {
1560
1548
  this[ve].post((s) => {
1561
1549
  try {
1562
- if (this[g].length === 0) {
1550
+ if (this[v].length === 0) {
1563
1551
  s.resolve(), r(!1);
1564
1552
  return;
1565
1553
  }
1566
- let i = -1, n = null, o = [], l = this[g].length - 1, a = l !== -1 ? this[g][l] : null;
1554
+ let i = -1, n = null, o = [], l = this[v].length - 1, a = l !== -1 ? this[v][l] : null;
1567
1555
  if (e) {
1568
1556
  if (n = e.root ?? "default", e.all) for (let f = l; f > 0; f--) {
1569
- const c = this[g][f];
1557
+ const c = this[v][f];
1570
1558
  if (c.opsType === _.Append) {
1571
1559
  const h = c.root ?? "default";
1572
1560
  if (n && n !== h) continue;
@@ -1574,7 +1562,7 @@ var Js = class {
1574
1562
  }
1575
1563
  }
1576
1564
  else if (e.until) for (let f = l; f > 0; f--) {
1577
- let c = this[g][f];
1565
+ let c = this[v][f];
1578
1566
  if (c.opsType === _.Append && c.root === n) {
1579
1567
  if (e.until.charAt(0) === "/" && e.until === c.path) {
1580
1568
  i = f;
@@ -1587,7 +1575,7 @@ var Js = class {
1587
1575
  }
1588
1576
  }
1589
1577
  else if (e.to) for (let f = l; f > 0; f--) {
1590
- const c = this[g][f];
1578
+ const c = this[v][f];
1591
1579
  if (c.opsType === _.Append) {
1592
1580
  const h = c.root ?? "default";
1593
1581
  if (n && n !== h) continue;
@@ -1601,7 +1589,7 @@ var Js = class {
1601
1589
  }
1602
1590
  }
1603
1591
  } else for (let f = l; f > 0; f--) {
1604
- let c = this[g][f];
1592
+ let c = this[v][f];
1605
1593
  if (c.opsType === _.Append) {
1606
1594
  o.push(c), i = f - 1;
1607
1595
  break;
@@ -1612,20 +1600,32 @@ var Js = class {
1612
1600
  console.warn(f), s.resolve(f), r(!1);
1613
1601
  return;
1614
1602
  }
1615
- const u = i !== -1 ? this[g][i] : null;
1603
+ const u = i !== -1 ? this[v][i] : null;
1616
1604
  if (this[Me](o)) {
1617
- if (t === !1)
1618
- return s.resolve(), r(!0), !0;
1619
- const f = () => (s.resolve(), r(!0), !0), c = this[g].length;
1620
- if (u && x.isSame(u, this[g][c - 1])) {
1621
- if (a?.historyUpdatePolicy === "traceless") {
1622
- let h = x.clone(u, !0);
1623
- const y = new Rt(h, this[Ke]());
1624
- this[S]?.replace(y), f();
1625
- } else this[S]?.goBack(u, f);
1626
- return;
1605
+ let f = null, c = null;
1606
+ const h = this[v].length;
1607
+ if (u && x.isSame(u, this[v][h - 1]) && (f = u, c = u), !c && h > 0) {
1608
+ for (let y = h - 1; y >= 0; y--) {
1609
+ const m = this[v][y];
1610
+ if (m?.active === !0) {
1611
+ c = m;
1612
+ break;
1613
+ }
1614
+ }
1615
+ c = c ?? this[v][h - 1] ?? null;
1627
1616
  }
1628
- f();
1617
+ const d = () => (s.resolve(), r(!0), !0);
1618
+ if (t === !1)
1619
+ return this[ae](c), d(), !0;
1620
+ if (f)
1621
+ if (this[ae](c), a?.historyUpdatePolicy === "traceless") {
1622
+ let y = x.clone(f, !0);
1623
+ const m = new Rt(y, this[Ke]());
1624
+ this[S]?.replace(m), d();
1625
+ } else this[S]?.goBack(f, d);
1626
+ else
1627
+ this[ae](c), d();
1628
+ return !0;
1629
1629
  }
1630
1630
  } catch (i) {
1631
1631
  this[A](i), s.resolve(), r(!1);
@@ -1646,8 +1646,8 @@ var Js = class {
1646
1646
  return;
1647
1647
  }
1648
1648
  let s = [];
1649
- for (let i = 0; i < this[g].length; i++) {
1650
- let n = this[g][i];
1649
+ for (let i = 0; i < this[v].length; i++) {
1650
+ let n = this[v][i];
1651
1651
  if (n.root === r.root) {
1652
1652
  if (!r.path && !r.name) {
1653
1653
  s.push(n);
@@ -1666,7 +1666,19 @@ var Js = class {
1666
1666
  t.resolve();
1667
1667
  return;
1668
1668
  }
1669
- this[Me](s), t.resolve();
1669
+ if (this[Me](s)) {
1670
+ const i = this[v].length;
1671
+ let n = null;
1672
+ for (let o = i - 1; o >= 0; o--) {
1673
+ const l = this[v][o];
1674
+ if (l?.active === !0) {
1675
+ n = l;
1676
+ break;
1677
+ }
1678
+ }
1679
+ n = n ?? this[v][i - 1] ?? null, this[ae](n);
1680
+ }
1681
+ t.resolve();
1670
1682
  } catch (r) {
1671
1683
  this[A](r), t.resolve();
1672
1684
  }
@@ -1694,9 +1706,9 @@ var Js = class {
1694
1706
  } catch (a) {
1695
1707
  console.error(a.message, a);
1696
1708
  }
1697
- this[ae] === !1 && this[ot](!0), i = null, s.resolve();
1709
+ this[ue] === !1 && this[ot](!0), i = null, s.resolve();
1698
1710
  }, (n, o) => {
1699
- this[te].release(r), o !== null && this[A](o, t), this[ae] === !1 && this[ot](!1), ze.clear(n.session), i = null, s.resolve();
1711
+ this[te].release(r), o !== null && this[A](o, t), this[ue] === !1 && this[ot](!1), ze.clear(n.session), i = null, s.resolve();
1700
1712
  });
1701
1713
  } catch (i) {
1702
1714
  this[te].release(r), this[A](i, t), s.resolve();
@@ -1722,7 +1734,7 @@ var Js = class {
1722
1734
  };
1723
1735
  }
1724
1736
  [At](e) {
1725
- const t = this[g].length > 0 ? this[g][this[g].length - 1] : void 0, r = new ze(e, t), s = {
1737
+ const t = this[v].length > 0 ? this[v][this[v].length - 1] : void 0, r = new ze(e, t), s = {
1726
1738
  route: e,
1727
1739
  find: null
1728
1740
  };
@@ -1799,7 +1811,7 @@ var Js = class {
1799
1811
  });
1800
1812
  }
1801
1813
  [Me](e) {
1802
- if (e.length == 0) return !0;
1814
+ if (e.length === 0) return !0;
1803
1815
  let t = this[U], r = [];
1804
1816
  for (let s of e) {
1805
1817
  let i = this[Pt](t, s);
@@ -1808,7 +1820,7 @@ var Js = class {
1808
1820
  route: s
1809
1821
  });
1810
1822
  }
1811
- if (r.length == 0)
1823
+ if (r.length === 0)
1812
1824
  return this[A]("can not find view index"), !1;
1813
1825
  for (let s of r.reverse()) this[le](t, {
1814
1826
  x: s.x,
@@ -1832,9 +1844,6 @@ var Js = class {
1832
1844
  }
1833
1845
  return null;
1834
1846
  }
1835
- [Ws](e) {
1836
- return e.layers.length > 0 && e.layers[0].views.length > 0 ? e.layers[0].views[0] : null;
1837
- }
1838
1847
  [le](e, t, r = null, s = !0) {
1839
1848
  if (t.y >= e.layers.length || t.x >= e.layers[t.y].views.length) return;
1840
1849
  let i = e.layers[t.y].views[t.x], n = !1, o = [], l = !1, a = [...i.slots.value];
@@ -1842,7 +1851,7 @@ var Js = class {
1842
1851
  let c = a[f];
1843
1852
  (!r || r.indexOf(c.index) != -1) && (c.route && i[V] && (this[$e](c.route), c.active === !0 && c.route.opsType == _.Append && (l = !0)), o.push(new I(i, c.index, t.y)), a.splice(f, 1));
1844
1853
  }
1845
- if (a.length == 0)
1854
+ if (a.length === 0)
1846
1855
  s ? i.slots.value = a : e.layers[t.y].views.splice(t.x, 1);
1847
1856
  else {
1848
1857
  if (l) {
@@ -1851,32 +1860,32 @@ var Js = class {
1851
1860
  }
1852
1861
  i.slots.value = a;
1853
1862
  }
1854
- e.layers[t.y].views.length == 0 && (n = !0);
1863
+ e.layers[t.y].views.length === 0 && (n = !0);
1855
1864
  let u = t.y + 1;
1856
1865
  for (; u < e.layers.length; u++) {
1857
1866
  let f = e.layers[u].views, c = [];
1858
1867
  for (let h = f.length - 1; (n || o.length > 0) && h >= 0; h--) {
1859
- let y = f[h];
1860
- if (y[fe] && (n || I.include(o, y[fe]))) {
1861
- let d = y.slots.value;
1862
- for (let m = d.length - 1; m >= 0; m--) {
1863
- let w = d[m];
1864
- w.route && y[V] && this[$e](w.route), c.push(new I(y, w.index, u)), d.splice(m, 1);
1868
+ let d = f[h];
1869
+ if (d[ce] && (n || I.include(o, d[ce]))) {
1870
+ let y = d.slots.value;
1871
+ for (let m = y.length - 1; m >= 0; m--) {
1872
+ let w = y[m];
1873
+ w.route && d[V] && this[$e](w.route), c.push(new I(d, w.index, u)), y.splice(m, 1);
1865
1874
  }
1866
1875
  e.layers[u].views.splice(h, 1);
1867
1876
  }
1868
1877
  }
1869
- o = c, e.layers[u].views.length == 0 && (n = !0);
1878
+ o = c, e.layers[u].views.length === 0 && (n = !0);
1870
1879
  }
1871
1880
  }
1872
1881
  restore(e) {
1873
- if (!e || this[H].length == 0) {
1882
+ if (!e || this[H].length === 0) {
1874
1883
  let t = this[U];
1875
1884
  if (t.layers.length > 0) {
1876
1885
  let r = t.layers[0].views;
1877
1886
  r.length > 0 && (r[0].slots.value = []);
1878
1887
  }
1879
- return this[g] = [], this[me](null), Promise.resolve();
1888
+ return this[v] = [], this[ae](null), Promise.resolve();
1880
1889
  } else return new Promise((t, r) => {
1881
1890
  let s = null, i = !1;
1882
1891
  for (let n = 0; n < e.length; n++) {
@@ -1923,12 +1932,12 @@ var Js = class {
1923
1932
  message: "illegal route structure(multi root node)"
1924
1933
  };
1925
1934
  const i = e.layers[0].models[0];
1926
- let n = this[U], o = zs(n), l = t.root ?? "default", a;
1935
+ let n = this[U], o = Ws(n), l = t.root ?? "default", a;
1927
1936
  !o && s == gt.Part && (a = this[Pt](n, t));
1928
1937
  let u, f = 0;
1929
- if (a == null || a == null)
1938
+ if (a == null)
1930
1939
  if (o || s === gt.All) {
1931
- if (n.layers.length == 0 && (n.layers[0] = new wt()), n.layers[0].views.length == 0) {
1940
+ if (n.layers.length === 0 && (n.layers[0] = new wt()), n.layers[0].views.length === 0) {
1932
1941
  let c = t.root ?? "default";
1933
1942
  u = new Ee(c, !0, null), n.layers[0].views = [u];
1934
1943
  } else u = n.layers[0].views[0];
@@ -1947,25 +1956,25 @@ var Js = class {
1947
1956
  status: "error",
1948
1957
  message: "can not insert view(override level)"
1949
1958
  };
1950
- let y;
1959
+ let d;
1951
1960
  if (c.rootName) {
1952
- let d = n.layers[h - 1];
1953
- for (let m of d.views) {
1961
+ let y = n.layers[h - 1];
1962
+ for (let m of y.views) {
1954
1963
  if (m[V] && m.name === c.rootName) {
1955
- y = new I(m, c.rootIndex ?? 0, h - 1);
1964
+ d = new I(m, c.rootIndex ?? 0, h - 1);
1956
1965
  break;
1957
1966
  }
1958
1967
  if (m[B] && m[B].view.name === c.rootName && m[B].index === c.rootIndex) {
1959
- y = m[B];
1968
+ d = m[B];
1960
1969
  break;
1961
1970
  }
1962
1971
  }
1963
1972
  }
1964
- if (!y) return {
1973
+ if (!d) return {
1965
1974
  status: "error",
1966
1975
  message: "can not insert view(not find root node ref)"
1967
1976
  };
1968
- u = new Ee(l, !0, y), n.layers[h].views.push(u), a = {
1977
+ u = new Ee(l, !0, d), n.layers[h].views.push(u), a = {
1969
1978
  x: n.layers[h].views.length - 1,
1970
1979
  y: h
1971
1980
  };
@@ -1980,84 +1989,84 @@ var Js = class {
1980
1989
  }
1981
1990
  let h = new Y(t, i, t.index, !0);
1982
1991
  u.slots.value = [...c, h];
1983
- let y = f + 1, d = 1, m = new I(u, t.index, f);
1984
- this[ee](n, y, e, d, m);
1992
+ let d = f + 1, y = 1, m = new I(u, t.index, f);
1993
+ this[ee](n, d, e, y, m);
1985
1994
  } else if (t.opsType === _.Open) {
1986
1995
  let c = u.slots.value;
1987
1996
  const h = t.active ?? !0;
1988
- let y = !1;
1989
- for (let d of c) {
1990
- if (d.route !== null && x.isSamePathForRoute(d.route, t)) {
1991
- if (d.active === h)
1992
- return t.index = d.index, t.active = h, d.route = t, {
1997
+ let d = !1;
1998
+ for (let y of c) {
1999
+ if (y.route !== null && x.isSamePathForRoute(y.route, t)) {
2000
+ if (y.active === h)
2001
+ return t.index = y.index, t.active = h, y.route = t, {
1993
2002
  status: "noChange",
1994
2003
  message: ""
1995
2004
  };
1996
- d.active = h, y = !0, t.index = d.index, t.active = h, d.route = t;
1997
- } else h && (d.active = !1);
1998
- d.route && (d.route.active = d.active);
2005
+ y.active = h, d = !0, t.index = y.index, t.active = h, y.route = t;
2006
+ } else h && (y.active = !1);
2007
+ y.route && (y.route.active = y.active);
1999
2008
  }
2000
- if (!y) {
2009
+ if (!d) {
2001
2010
  t.index = t.index ?? Ie.get(), t.active = h;
2002
- let d = new Y(t, i, t.index, h);
2003
- c.push(d);
2004
- let m = f + 1, w = 1, v = new I(u, t.index, f);
2005
- this[ee](n, m, e, w, v);
2011
+ let y = new Y(t, i, t.index, h);
2012
+ c.push(y);
2013
+ let m = f + 1, w = 1, p = new I(u, t.index, f);
2014
+ this[ee](n, m, e, w, p);
2006
2015
  }
2007
2016
  u.slots.value = [...c];
2008
2017
  } else {
2009
2018
  let c = u.slots.value;
2010
- if (c.length == 0) {
2019
+ if (c.length === 0) {
2011
2020
  t.index = t.index ?? Ie.get(), t.active = !0, u.slots.value = [new Y(t, i, t.index)];
2012
- let h = f + 1, y = 1, d = new I(u, t.index, f);
2013
- this[ee](n, h, e, y, d);
2021
+ let h = f + 1, d = 1, y = new I(u, t.index, f);
2022
+ this[ee](n, h, e, d, y);
2014
2023
  } else {
2015
2024
  let h = c[0];
2016
2025
  if (h.model !== i) {
2017
2026
  this[le](n, a, null, !0), t.index = t.index ?? Ie.get(), t.active = !0, u.slots.value = [new Y(t, i, t.index)];
2018
- let y = f + 1, d = 1, m = new I(u, t.index, f);
2019
- this[ee](n, y, e, d, m);
2027
+ let d = f + 1, y = 1, m = new I(u, t.index, f);
2028
+ this[ee](n, d, e, y, m);
2020
2029
  } else {
2021
2030
  h.route !== null && this[$e](h.route);
2022
- let y = !1;
2023
- const d = t.active ?? !0;
2024
- h.active !== d && (h.active = d, y = !0), t.active = d, t.index = h.index, h.route = t;
2031
+ let d = !1;
2032
+ const y = t.active ?? !0;
2033
+ h.active !== y && (h.active = y, d = !0), t.active = y, t.index = h.index, h.route = t;
2025
2034
  let m = [];
2026
2035
  for (let K = 1; K < c.length; K++) m.push(c[K].index);
2027
- m.length > 0 ? this[le](n, a, m, !0) : y && (u.slots.value = [...c]);
2028
- let w = [new I(u, t.index, f)], v = f + 1, p = 1, $ = new I(u, t.index, f);
2029
- for (; w.length > 0 && v < n.layers.length && p < e.layers.length; v++, p++) {
2036
+ m.length > 0 ? this[le](n, a, m, !0) : d && (u.slots.value = [...c]);
2037
+ let w = [new I(u, t.index, f)], p = f + 1, g = 1, $ = new I(u, t.index, f);
2038
+ for (; w.length > 0 && p < n.layers.length && g < e.layers.length; p++, g++) {
2030
2039
  let K = [];
2031
- for (let j = 0; j < n.layers[v].views.length; j++) {
2032
- let E = n.layers[v].views[j];
2033
- E[fe] && I.include(w, E[fe]) && K.unshift(j);
2040
+ for (let j = 0; j < n.layers[p].views.length; j++) {
2041
+ let E = n.layers[p].views[j];
2042
+ E[ce] && I.include(w, E[ce]) && K.unshift(j);
2034
2043
  }
2035
2044
  let _e = [];
2036
2045
  for (let j of K) {
2037
- let E = n.layers[v].views[j], ie = e.layers[p].models, Q;
2046
+ let E = n.layers[p].views[j], ie = e.layers[g].models, Q;
2038
2047
  for (let k = 0; k < ie.length; k++) if (E.name === ie[k].name) {
2039
2048
  Q = ie[k];
2040
2049
  break;
2041
2050
  }
2042
2051
  if (!Q) this[le](n, {
2043
2052
  x: j,
2044
- y: v
2053
+ y: p
2045
2054
  }, null, !1);
2046
2055
  else {
2047
2056
  let k = E.slots.value;
2048
- if (k.length == 0) {
2057
+ if (k.length === 0) {
2049
2058
  let z = 0;
2050
2059
  E.slots.value = [new Y(null, Q, z)];
2051
- let D = v + 1, N = p + 1;
2060
+ let D = p + 1, N = g + 1;
2052
2061
  this[ee](n, D, e, N, $);
2053
2062
  } else {
2054
2063
  let z = k[0];
2055
2064
  if (z.model !== Q) {
2056
2065
  this[le](n, {
2057
2066
  x: j,
2058
- y: v
2067
+ y: p
2059
2068
  }, null, !0), E.slots.value = [new Y(null, Q, 0)];
2060
- let D = v + 1, N = p + 1;
2069
+ let D = p + 1, N = g + 1;
2061
2070
  this[ee](n, D, e, N, $);
2062
2071
  } else {
2063
2072
  E[V] && z.route !== null && this[$e](z.route);
@@ -2065,8 +2074,8 @@ var Js = class {
2065
2074
  for (let N = 1; N < k.length; N++) D.push(k[N].index);
2066
2075
  D.length > 0 && this[le](n, {
2067
2076
  x: j,
2068
- y: v
2069
- }, D, !0), _e.push(new I(E, z.index, v));
2077
+ y: p
2078
+ }, D, !0), _e.push(new I(E, z.index, p));
2070
2079
  }
2071
2080
  }
2072
2081
  E[V] = !1;
@@ -2074,7 +2083,7 @@ var Js = class {
2074
2083
  }
2075
2084
  w = _e;
2076
2085
  }
2077
- this[ee](n, v, e, p, $);
2086
+ this[ee](n, p, e, g, $);
2078
2087
  }
2079
2088
  }
2080
2089
  }
@@ -2082,7 +2091,7 @@ var Js = class {
2082
2091
  let c = u[B];
2083
2092
  c && (t.slot = new Is(l, f, c?.view.name, c?.index ?? 0));
2084
2093
  }
2085
- return r.to = void 0, r.routeModel = void 0, this[wr](t, r), {
2094
+ return r.to = void 0, r.routeModel = void 0, this[wr](t, r), this[ae](t), {
2086
2095
  status: "success",
2087
2096
  message: ""
2088
2097
  };
@@ -2113,7 +2122,7 @@ var Js = class {
2113
2122
  for (let c of u.views) {
2114
2123
  let h = !1;
2115
2124
  if (r !== null ? (h = c.name === e && c[B]?.view === r, h && s !== -1 && (h = c[B]?.index === s)) : h = c.name === e, !!h) {
2116
- i !== null && (c[fe] = {
2125
+ i !== null && (c[ce] = {
2117
2126
  view: i,
2118
2127
  index: n,
2119
2128
  level: t - 1
@@ -2134,13 +2143,13 @@ var Js = class {
2134
2143
  level: t - 1
2135
2144
  });
2136
2145
  let a = new Ee(e, !0, o);
2137
- if (a[fe] = l, t == this[U].layers.length) {
2146
+ if (a[ce] = l, t == this[U].layers.length) {
2138
2147
  let u = new wt();
2139
2148
  u.views = [a], this[U].layers.push(u);
2140
2149
  } else this[U].layers[t].views.push(a);
2141
2150
  return a;
2142
2151
  }
2143
- }, Ne = /* @__PURE__ */ Symbol("rk"), jt = /* @__PURE__ */ Symbol("vd"), Sr = /* @__PURE__ */ Symbol("rv"), kt = /* @__PURE__ */ Symbol("rvi"), xr = /* @__PURE__ */ Symbol("pv"), Tt = /* @__PURE__ */ Symbol("pvi"), Le = /* @__PURE__ */ Symbol("registerKey"), Mt = /* @__PURE__ */ Symbol("parentKey"), Ut = /* @__PURE__ */ Symbol("lc"), Gs = class {
2152
+ }, Ne = /* @__PURE__ */ Symbol("rk"), jt = /* @__PURE__ */ Symbol("vd"), Sr = /* @__PURE__ */ Symbol("rv"), kt = /* @__PURE__ */ Symbol("rvi"), xr = /* @__PURE__ */ Symbol("pv"), Tt = /* @__PURE__ */ Symbol("pvi"), Le = /* @__PURE__ */ Symbol("registerKey"), Mt = /* @__PURE__ */ Symbol("parentKey"), Ut = /* @__PURE__ */ Symbol("lc"), Js = class {
2144
2153
  [Le] = /* @__PURE__ */ new Map();
2145
2154
  [Mt] = null;
2146
2155
  get parent() {
@@ -2167,7 +2176,7 @@ var Js = class {
2167
2176
  function lt(e, t = !1) {
2168
2177
  let r = e ? se.get(e) ?? null : null;
2169
2178
  if (t && !r) {
2170
- r = new Gs(), e && se.set(e, r), Ce(() => {
2179
+ r = new Js(), e && se.set(e, r), Ce(() => {
2171
2180
  e && se.delete(e);
2172
2181
  });
2173
2182
  const s = L(Ut, null);
@@ -2183,7 +2192,7 @@ function ht(e) {
2183
2192
  }
2184
2193
  return t;
2185
2194
  }
2186
- async function Xs(e, t) {
2195
+ async function Gs(e, t) {
2187
2196
  He.push(e);
2188
2197
  try {
2189
2198
  return await t();
@@ -2191,7 +2200,7 @@ async function Xs(e, t) {
2191
2200
  He.pop();
2192
2201
  }
2193
2202
  }
2194
- function Vi(e) {
2203
+ function Bi(e) {
2195
2204
  const t = Kr();
2196
2205
  if (!t) return !1;
2197
2206
  const r = ht();
@@ -2210,20 +2219,20 @@ function zr(e, t) {
2210
2219
  for (; s && !s.has(t); ) s = s.parent;
2211
2220
  return s?.get(t) ?? null;
2212
2221
  }
2213
- function Wi(e, t, r) {
2222
+ function Vi(e, t, r) {
2214
2223
  ht(e)?.set(t, r);
2215
2224
  }
2216
- function zi(e, t, r) {
2225
+ function Wi(e, t, r) {
2217
2226
  ht(e)?.delete(t);
2218
2227
  }
2219
2228
  var ct = /* @__PURE__ */ Symbol("hooksKey");
2220
- function Qs(e) {
2229
+ function Xs(e) {
2221
2230
  let t = e.get(ct);
2222
2231
  t || (t = [], e.set(ct, t));
2223
2232
  }
2224
2233
  function Pr(e, t) {
2225
2234
  const r = e.get(ct);
2226
- r != null && Xs(e, async () => {
2235
+ r != null && Gs(e, async () => {
2227
2236
  for (let s = r.length - 1; s >= 0; s--) {
2228
2237
  let i = r[s];
2229
2238
  if (i.type === t)
@@ -2237,18 +2246,18 @@ function Pr(e, t) {
2237
2246
  }
2238
2247
  var Cr = /* @__PURE__ */ (function(e) {
2239
2248
  return e.INACTIVATED = "ia", e.ACTIVATED = "a", e;
2240
- })({}), Zs = class {
2249
+ })({}), Qs = class {
2241
2250
  type;
2242
2251
  hook;
2243
2252
  constructor(e, t) {
2244
2253
  this.hook = t, this.type = e;
2245
2254
  }
2246
2255
  };
2247
- function Ys(e, t, r) {
2248
- const s = new Zs(t, r);
2256
+ function Zs(e, t, r) {
2257
+ const s = new Qs(t, r);
2249
2258
  return e.push(s), !0;
2250
2259
  }
2251
- function ei(e, t, r) {
2260
+ function Ys(e, t, r) {
2252
2261
  let s = -1;
2253
2262
  for (let i = 0; i < e.length; i++) {
2254
2263
  const n = e[i];
@@ -2263,13 +2272,13 @@ function Jr(e) {
2263
2272
  return (t) => {
2264
2273
  const r = zr(null, ct);
2265
2274
  r && (Ce(() => {
2266
- ei(r, e, t);
2267
- }), Ys(r, e, t));
2275
+ Ys(r, e, t);
2276
+ }), Zs(r, e, t));
2268
2277
  };
2269
2278
  }
2270
- var Ji = function(e) {
2279
+ var zi = function(e) {
2271
2280
  fs(e), Jr("a")(e);
2272
- }, Gi = function(e) {
2281
+ }, Ji = function(e) {
2273
2282
  cs(e), Jr("ia")(e);
2274
2283
  }, Gr = /* @__PURE__ */ Symbol("routeKey");
2275
2284
  function _r(e, t) {
@@ -2279,7 +2288,7 @@ function Fr(e) {
2279
2288
  const t = zr(e ?? null, Gr);
2280
2289
  return typeof t == "function" ? t() : t;
2281
2290
  }
2282
- var ti = "FoxBeforeEnter", ri = "FoxEnter", si = "FoxLeave", ii = "FoxLeave", Bt = "FoxLeaveEnd";
2291
+ var ei = "FoxBeforeEnter", ti = "FoxEnter", ri = "FoxLeave", si = "FoxLeave", Bt = "FoxLeaveEnd";
2283
2292
  function Xr(e, t = !1) {
2284
2293
  let r = null;
2285
2294
  return t ? r = e.showFromClass ?? e.enterFromClass : r = e.enterFromClass, r || (r = e.transitionName, r ? t ? `${r}-show-from` : `${r}-enter-from` : null);
@@ -2288,7 +2297,7 @@ function Qr(e, t = !1) {
2288
2297
  let r = null;
2289
2298
  return t ? r = e.showActiveClass ?? e.enterActiveClass : r = e.enterActiveClass, r || (r = e.transitionName, r ? t ? `${r}-show-active` : `${r}-enter-active` : null);
2290
2299
  }
2291
- function ni(e, t = !1) {
2300
+ function ii(e, t = !1) {
2292
2301
  let r = null;
2293
2302
  return t ? r = e.showToClass ?? e.enterToClass : r = e.enterToClass, r || (r = e.transitionName, r ? t ? `${r}-show-to` : `${r}-enter-to` : null);
2294
2303
  }
@@ -2300,39 +2309,39 @@ function Yr(e, t = !1) {
2300
2309
  let r = null;
2301
2310
  return t ? r = e.hideActiveClass ?? e.leaveActiveClass : r = e.leaveActiveClass, r || (r = e.transitionName, r ? t ? `${r}-hide-active` : `${r}-leave-active` : null);
2302
2311
  }
2303
- function oi(e, t = !1) {
2312
+ function ni(e, t = !1) {
2304
2313
  let r = null;
2305
2314
  return t ? r = e.hideToClass ?? e.leaveToClass : r = e.leaveToClass, r || (r = e.transitionName, r ? t ? `${r}-hide-to` : `${r}-leave-to` : null);
2306
2315
  }
2307
- function li(e, t = !1) {
2316
+ function oi(e, t = !1) {
2308
2317
  let r = null;
2309
2318
  return t ? r = e.beforeShow ?? e.beforeEnter : r = e.beforeEnter, r;
2310
2319
  }
2311
- function ai(e, t = !1) {
2320
+ function li(e, t = !1) {
2312
2321
  let r = null;
2313
2322
  return t ? r = e.show ?? e.enter : r = e.enter, r;
2314
2323
  }
2315
- function ui(e, t = !1) {
2324
+ function ai(e, t = !1) {
2316
2325
  let r = null;
2317
2326
  return t ? r = e.afterShow ?? e.afterEnter : r = e.afterEnter, r;
2318
2327
  }
2319
- function fi(e, t = !1) {
2328
+ function ui(e, t = !1) {
2320
2329
  let r = null;
2321
2330
  return t ? r = e.showCancelled ?? e.enterCancelled : r = e.enterCancelled, r;
2322
2331
  }
2323
- function ci(e, t = !1) {
2332
+ function fi(e, t = !1) {
2324
2333
  let r = null;
2325
2334
  return t ? r = e.beforeHide ?? e.beforeLeave : r = e.beforeLeave, r;
2326
2335
  }
2327
- function hi(e, t = !1) {
2336
+ function ci(e, t = !1) {
2328
2337
  let r = null;
2329
2338
  return t ? r = e.hide ?? e.leave : r = e.leave, r;
2330
2339
  }
2331
- function yi(e, t = !1) {
2340
+ function hi(e, t = !1) {
2332
2341
  let r = null;
2333
2342
  return t ? r = e.afterHide ?? e.afterLeave : r = e.afterLeave, r;
2334
2343
  }
2335
- function di(e, t = !1) {
2344
+ function yi(e, t = !1) {
2336
2345
  let r = null;
2337
2346
  return t ? r = e.hideCancelled ?? e.leaveCancelled : r = e.leaveCancelled, r;
2338
2347
  }
@@ -2356,9 +2365,9 @@ function xe(e, t) {
2356
2365
  function Re(e, t) {
2357
2366
  e.classList.remove(t);
2358
2367
  }
2359
- var mi = Se && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout;
2368
+ var di = Se && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout;
2360
2369
  function yt(e) {
2361
- mi(e);
2370
+ di(e);
2362
2371
  }
2363
2372
  function F(e, t) {
2364
2373
  b(e) && Reflect.apply(e, null, t);
@@ -2420,7 +2429,7 @@ function ts(e, t, r = {}, s, i = -1) {
2420
2429
  const n = Xr(r, e);
2421
2430
  n && xe(t, n);
2422
2431
  const o = Qr(r, e);
2423
- o && xe(t, o), F(li(r, e), [
2432
+ o && xe(t, o), F(oi(r, e), [
2424
2433
  t,
2425
2434
  e,
2426
2435
  s,
@@ -2433,7 +2442,7 @@ function rs(e, t, r = {}, s, i, n, o) {
2433
2442
  b(o) && o(o, [t]);
2434
2443
  return;
2435
2444
  }
2436
- const l = Xr(r, e), a = Qr(r, e), u = ni(r, e), f = ai(r, e), c = ui(r, e), h = fi(r, e);
2445
+ const l = Xr(r, e), a = Qr(r, e), u = ii(r, e), f = li(r, e), c = ai(r, e), h = ui(r, e);
2437
2446
  if (!l && !a && !u && !f) {
2438
2447
  b(o) && o(o, [t]);
2439
2448
  return;
@@ -2466,7 +2475,7 @@ function ss(e, t, r = {}, s, i = -1) {
2466
2475
  const n = Zr(r, e);
2467
2476
  n && xe(t, n);
2468
2477
  const o = Yr(r, e);
2469
- o && xe(t, o), F(ci(r, e), [
2478
+ o && xe(t, o), F(fi(r, e), [
2470
2479
  t,
2471
2480
  e,
2472
2481
  s,
@@ -2479,7 +2488,7 @@ function is(e, t, r = {}, s, i, n, o, l) {
2479
2488
  b(l) && F(l, [t]), !e && b(i) && i();
2480
2489
  return;
2481
2490
  }
2482
- const a = Zr(r, e), u = Yr(r, e), f = oi(r, e), c = hi(r, e), h = yi(r, e), y = di(r, e);
2491
+ const a = Zr(r, e), u = Yr(r, e), f = ni(r, e), c = ci(r, e), h = hi(r, e), d = yi(r, e);
2483
2492
  if (!a && !u && !f && !c) {
2484
2493
  b(l) && F(l, [t]), !e && b(i) && i();
2485
2494
  return;
@@ -2498,7 +2507,7 @@ function is(e, t, r = {}, s, i, n, o, l) {
2498
2507
  }
2499
2508
  }, () => {
2500
2509
  try {
2501
- b(y) && F(y, [
2510
+ b(d) && F(d, [
2502
2511
  t,
2503
2512
  e,
2504
2513
  n,
@@ -2537,7 +2546,7 @@ function Vt(e, t = {}, r, s = -1) {
2537
2546
  function ns(e) {
2538
2547
  return e.el;
2539
2548
  }
2540
- function vi(e, t = {}, r, s, i, n) {
2549
+ function mi(e, t = {}, r, s, i, n) {
2541
2550
  if (i === !0) {
2542
2551
  const o = ns(e);
2543
2552
  if (o == null) return;
@@ -2547,7 +2556,7 @@ function vi(e, t = {}, r, s, i, n) {
2547
2556
  });
2548
2557
  } else b(n) && F(n, []);
2549
2558
  }
2550
- function pi(e, t = {}, r, s, i, n) {
2559
+ function vi(e, t = {}, r, s, i, n) {
2551
2560
  if (i === !0) {
2552
2561
  const o = ns(e);
2553
2562
  if (o == null) return;
@@ -2557,7 +2566,7 @@ function pi(e, t = {}, r, s, i, n) {
2557
2566
  });
2558
2567
  } else b(n) && F(n, []);
2559
2568
  }
2560
- function gi(e) {
2569
+ function pi(e) {
2561
2570
  yt(() => {
2562
2571
  for (let t = 0; t < e.length; t++) Reflect.apply(e[t], null, []);
2563
2572
  });
@@ -2567,17 +2576,17 @@ function os(e, t = {}, r, s = -1) {
2567
2576
  mode: t.mode ?? "default",
2568
2577
  persisted: !1,
2569
2578
  beforeEnter: (i) => {
2570
- Ve(ti, {}, i);
2579
+ Ve(ei, {}, i);
2571
2580
  },
2572
2581
  enter: (i) => {
2573
- Ve(ri, {}, i);
2582
+ Ve(ti, {}, i);
2574
2583
  },
2575
2584
  leave: (i, n) => {
2576
- Ve(si, {}, i), yt(() => {
2585
+ Ve(ri, {}, i), yt(() => {
2577
2586
  const o = (l) => {
2578
2587
  (l.target || l.srcElement) === l.currentTarget && (Xt(i, Bt, o), n && Reflect.apply(n, null, []), e.transition = null);
2579
2588
  };
2580
- ut(i, Bt, o), Ve(ii, {}, i);
2589
+ ut(i, Bt, o), Ve(si, {}, i);
2581
2590
  });
2582
2591
  },
2583
2592
  clone: (i) => os(e, t, r, s)
@@ -2594,7 +2603,7 @@ function Lt(e, t) {
2594
2603
  function pe(e, t) {
2595
2604
  return typeof t == "function" ? t(e) : e;
2596
2605
  }
2597
- var wi = class {
2606
+ var gi = class {
2598
2607
  node;
2599
2608
  state;
2600
2609
  constructor(e, t) {
@@ -2798,17 +2807,17 @@ var wi = class {
2798
2807
  return;
2799
2808
  }
2800
2809
  const c = lt(u, !0);
2801
- c && (Qs(c), _r(c, () => u?.route ?? null));
2810
+ c && (Xs(c), _r(c, () => u?.route ?? null));
2802
2811
  } else {
2803
2812
  if (i == null) {
2804
2813
  console.error("[Fox]router is not been injected");
2805
2814
  return;
2806
2815
  }
2807
- const c = e.name, h = L(xr, null), y = L(Tt, 0);
2808
- if (a = i[Br](c, n, o, l, h, y), a === null) return;
2816
+ const c = e.name, h = L(xr, null), d = L(Tt, 0);
2817
+ if (a = i[Br](c, n, o, l, h, d), a === null) return;
2809
2818
  Z(xr, a);
2810
- const d = a[V] === !0;
2811
- if (d && Z(Sr, a), !s && (Z(kt, -1), Z(jt, n + 1), Z(Tt, -1), d && r)) {
2819
+ const y = a[V] === !0;
2820
+ if (y && Z(Sr, a), !s && (Z(kt, -1), Z(jt, n + 1), Z(Tt, -1), y && r)) {
2812
2821
  const m = lt(r, !0);
2813
2822
  m && _r(m, () => {
2814
2823
  const w = a?.slots.value ?? [];
@@ -2824,88 +2833,88 @@ var wi = class {
2824
2833
  }
2825
2834
  }), () => {
2826
2835
  if (s) {
2827
- const c = /* @__PURE__ */ new Map(), h = [], y = a?.slots.value, d = [];
2828
- for (let v = 0; v < y.length; v++) {
2829
- const p = y[v], $ = `${e.name}_${p.index}`, K = re(e.transition, p.route, v) ?? !0, _e = { modelSlot: p };
2836
+ const c = /* @__PURE__ */ new Map(), h = [], d = a?.slots.value, y = [];
2837
+ for (let p = 0; p < d.length; p++) {
2838
+ const g = d[p], $ = `${e.name}_${g.index}`, K = re(e.transition, g.route, p) ?? !0, _e = { modelSlot: g };
2830
2839
  let j;
2831
- t.slots.default ? j = ue(Wt, _e, { default: t.slots.default }) : j = ue(Wt, _e);
2832
- const E = {}, ie = re(e.viewClass, p.route, v);
2840
+ t.slots.default ? j = fe(Wt, _e, { default: t.slots.default }) : j = fe(Wt, _e);
2841
+ const E = {}, ie = re(e.viewClass, g.route, p);
2833
2842
  typeof ie == "string" && ie.length > 0 && (E[ie] = !0);
2834
- const Q = re(e.viewActiveClass, p.route, v), k = re(e.viewInactiveClass, p.route, v), z = f.value.get($);
2835
- if (typeof Q == "string" && Q.length > 0 && (E[Q] = p.active), typeof k == "string" && k.length > 0 && (E[k] = !p.active), z && p.active !== z.state) {
2836
- const ye = z.node;
2837
- p.active ? d.unshift(() => {
2843
+ const Q = re(e.viewActiveClass, g.route, p), k = re(e.viewInactiveClass, g.route, p), z = f.value.get($);
2844
+ if (typeof Q == "string" && Q.length > 0 && (E[Q] = g.active), typeof k == "string" && k.length > 0 && (E[k] = !g.active), z && g.active !== z.state) {
2845
+ const de = z.node;
2846
+ g.active ? y.unshift(() => {
2838
2847
  const mt = () => {
2839
- const Fe = lt(p);
2848
+ const Fe = lt(g);
2840
2849
  Fe != null && Pr(Fe, Cr.ACTIVATED);
2841
2850
  };
2842
- vi(ye, e, p.route, v, K, mt);
2843
- }) : d.push(() => {
2851
+ mi(de, e, g.route, p, K, mt);
2852
+ }) : y.push(() => {
2844
2853
  const mt = () => {
2845
- const Fe = lt(p);
2854
+ const Fe = lt(g);
2846
2855
  Fe != null && Pr(Fe, Cr.INACTIVATED);
2847
2856
  };
2848
- pi(ye, e, p.route, v, K, mt);
2857
+ vi(de, e, g.route, p, K, mt);
2849
2858
  });
2850
2859
  }
2851
2860
  const D = {
2852
2861
  class: E,
2853
2862
  key: $
2854
- }, N = re(e.viewTagProps, p.route, v);
2863
+ }, N = re(e.viewTagProps, g.route, p);
2855
2864
  if (N !== null && typeof N == "object") {
2856
- const ye = pe(N, i?.propsFilter);
2857
- q(!0, D, ye);
2865
+ const de = pe(N, i?.propsFilter);
2866
+ q(!0, D, de);
2858
2867
  }
2859
- if (p.route?.viewTagAttrs && typeof p.route?.viewTagAttrs == "object") {
2860
- const ye = pe(p.route.viewTagAttrs, i?.propsFilter);
2861
- q(!0, D, ye);
2868
+ if (g.route?.viewTagAttrs && typeof g.route?.viewTagAttrs == "object") {
2869
+ const de = pe(g.route.viewTagAttrs, i?.propsFilter);
2870
+ q(!0, D, de);
2862
2871
  }
2863
- const as = re(e.viewTag, p.route, v), he = ue(as, D, { default: () => [j] });
2864
- c.set($, new wi(he, p.active)), f.value.delete($), K === !0 ? he.transition = Vt(he, e, p.route, v) : K === "custom" && (he.transition = os(he, e, p.route, v)), h.push(he);
2872
+ const as = re(e.viewTag, g.route, p), ye = fe(as, D, { default: () => [j] });
2873
+ c.set($, new gi(ye, g.active)), f.value.delete($), K === !0 ? ye.transition = Vt(ye, e, g.route, p) : K === "custom" && (ye.transition = os(ye, e, g.route, p)), h.push(ye);
2865
2874
  }
2866
- f.value = c, gi(d);
2875
+ f.value = c, pi(y);
2867
2876
  const m = re(e.tag, null, -1), w = {};
2868
- return Object.assign(w, t.attrs), ue(m, w, { default: () => h });
2877
+ return Object.assign(w, t.attrs), fe(m, w, { default: () => h });
2869
2878
  } else if (u != null) {
2870
2879
  const c = u.model, h = {};
2871
2880
  if (c.props) {
2872
2881
  if (typeof c.props == "object") {
2873
- const d = pe(c.props, i?.propsFilter);
2874
- q(!1, h, d);
2882
+ const y = pe(c.props, i?.propsFilter);
2883
+ q(!1, h, y);
2875
2884
  } else if (c.props === !0 && typeof u.route?.params == "object") {
2876
- const d = pe(u.route.params, i?.propsFilter);
2877
- q(!1, h, d);
2885
+ const y = pe(u.route.params, i?.propsFilter);
2886
+ q(!1, h, y);
2878
2887
  }
2879
2888
  }
2880
- const y = ue(c.component, h);
2889
+ const d = fe(c.component, h);
2881
2890
  return Lt(t.slots.default, {
2882
- Component: y,
2891
+ Component: d,
2883
2892
  route: u.route
2884
- }) ?? y;
2893
+ }) ?? d;
2885
2894
  } else {
2886
2895
  const c = a?.slots.value ?? [];
2887
2896
  if (c.length > 0) {
2888
- const h = c[0], y = h.route, d = h.model, m = {};
2889
- if (d.props) {
2890
- if (typeof d.props == "object") {
2891
- const v = pe(d.props, i?.propsFilter);
2892
- q(!1, m, v);
2893
- } else if (d.props === !0 && typeof y?.params == "object") {
2894
- const v = pe(y.params, i?.propsFilter);
2895
- q(!1, m, v);
2897
+ const h = c[0], d = h.route, y = h.model, m = {};
2898
+ if (y.props) {
2899
+ if (typeof y.props == "object") {
2900
+ const p = pe(y.props, i?.propsFilter);
2901
+ q(!1, m, p);
2902
+ } else if (y.props === !0 && typeof d?.params == "object") {
2903
+ const p = pe(d.params, i?.propsFilter);
2904
+ q(!1, m, p);
2896
2905
  }
2897
2906
  }
2898
- const w = ue(d.component, m);
2899
- return (re(e.transition, y, -1) ?? !0) && (w.transition = Vt(w, e, y, -1)), Lt(t.slots.default, {
2907
+ const w = fe(y.component, m);
2908
+ return (re(e.transition, d, -1) ?? !0) && (w.transition = Vt(w, e, d, -1)), Lt(t.slots.default, {
2900
2909
  Component: w,
2901
- route: y
2910
+ route: d
2902
2911
  }) ?? w;
2903
2912
  } else return Lt(t.slots.fallback, {});
2904
2913
  }
2905
2914
  };
2906
2915
  }
2907
2916
  });
2908
- function bi(e) {
2917
+ function wi(e) {
2909
2918
  if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && !(e.button != null && e.button !== 0)) {
2910
2919
  if (e.currentTarget && e.currentTarget.getAttribute) {
2911
2920
  const t = e.currentTarget.getAttribute("target");
@@ -2914,13 +2923,13 @@ function bi(e) {
2914
2923
  return e.preventDefault && e.preventDefault(), !0;
2915
2924
  }
2916
2925
  }
2917
- function Ri(e, t) {
2926
+ function bi(e, t) {
2918
2927
  return e == null || t == null ? !1 : !!(e.path && t.path && t.path.startsWith(e.path) || e.name && e.name == t.name);
2919
2928
  }
2920
2929
  function ge(e, t) {
2921
2930
  return typeof e == "function" ? Reflect.apply(e, {}, [t]) : e;
2922
2931
  }
2923
- var Si = $r({
2932
+ var Ri = $r({
2924
2933
  name: "RouterLink",
2925
2934
  inheritAttrs: !1,
2926
2935
  props: {
@@ -2977,7 +2986,7 @@ var Si = $r({
2977
2986
  let n = null, o = null;
2978
2987
  r !== null && (n = r[M](s), e.root && (n.root = e.root), o = r.currentRoute.value);
2979
2988
  let l = {}, a = ge(e.activeClass, n);
2980
- if (typeof a == "string" && a.length > 0 && (l[a] = Ri(n, o)), ge(e.exact, n) === !0) {
2989
+ if (typeof a == "string" && a.length > 0 && (l[a] = bi(n, o)), ge(e.exact, n) === !0) {
2981
2990
  let c = ge(e.exactActiveClass, n);
2982
2991
  typeof c == "string" && c.length > 0 && (l[c] = x.isSamePathForRoute(n, o));
2983
2992
  }
@@ -2994,14 +3003,14 @@ var Si = $r({
2994
3003
  console.warn("[Fox]route is not been resolved");
2995
3004
  return;
2996
3005
  }
2997
- bi(h) && r.to(n);
3006
+ wi(h) && r.to(n);
2998
3007
  };
2999
3008
  u[f] = c;
3000
3009
  }
3001
- return ue(i, u, t.slots);
3010
+ return fe(i, u, t.slots);
3002
3011
  };
3003
3012
  }
3004
- }), we = /* @__PURE__ */ Symbol("registerKey"), xi = class {
3013
+ }), we = /* @__PURE__ */ Symbol("registerKey"), Si = class {
3005
3014
  policy;
3006
3015
  callback;
3007
3016
  constructor(e, t) {
@@ -3014,7 +3023,7 @@ var Si = $r({
3014
3023
  on(e, t, r = !1) {
3015
3024
  let s = this[we].get(e);
3016
3025
  s || (s = new Array(), this[we].set(e, s));
3017
- let i = new xi(t, r === !0 ? 1 : 0);
3026
+ let i = new Si(t, r === !0 ? 1 : 0);
3018
3027
  return s.push(i), this;
3019
3028
  }
3020
3029
  off(e, t) {
@@ -3068,15 +3077,15 @@ var Si = $r({
3068
3077
  trigger(e, ...t) {
3069
3078
  return Reflect.apply(this.emit, this, [e, ...t]);
3070
3079
  }
3071
- }, Pi = "FoxRouterView", Ci = "FoxRouterLink", X = /* @__PURE__ */ (function(e) {
3080
+ }, xi = "FoxRouterView", Pi = "FoxRouterLink", X = /* @__PURE__ */ (function(e) {
3072
3081
  return e[e.Loading = 0] = "Loading", e[e.Loaded = 1] = "Loaded", e[e.Defining = 2] = "Defining", e[e.Defined = 3] = "Defined", e;
3073
3082
  })({});
3074
- function _i(e) {
3083
+ function Ci(e) {
3075
3084
  return e == 1 || e === 3;
3076
3085
  }
3077
3086
  var Ar = /* @__PURE__ */ (function(e) {
3078
3087
  return e[e.normal = 0] = "normal", e[e.factory = 1] = "factory", e;
3079
- })({}), Fi = class {
3088
+ })({}), _i = class {
3080
3089
  register = /* @__PURE__ */ new Map();
3081
3090
  regExpRegisters = [];
3082
3091
  constructor() {
@@ -3119,11 +3128,11 @@ var Ar = /* @__PURE__ */ (function(e) {
3119
3128
  "exports",
3120
3129
  "module"
3121
3130
  ];
3122
- async function Ei(e) {
3131
+ async function Fi(e) {
3123
3132
  return await new Function("url", "return import(url)")(e);
3124
3133
  }
3125
3134
  var qr = class {
3126
- moduleManager = new Fi();
3135
+ moduleManager = new _i();
3127
3136
  _alias = {};
3128
3137
  set alias(e) {
3129
3138
  this._alias = e;
@@ -3182,7 +3191,7 @@ var qr = class {
3182
3191
  }
3183
3192
  getModuleExports(e) {
3184
3193
  const t = this.moduleManager.get(e);
3185
- return t && _i(t.status) ? t.type === Ar.factory && typeof t.exports == "function" ? t.exports() : t.exports : null;
3194
+ return t && Ci(t.status) ? t.type === Ar.factory && typeof t.exports == "function" ? t.exports() : t.exports : null;
3186
3195
  }
3187
3196
  exposeRequire(e = "__foxRequire", t, r) {
3188
3197
  const s = t ?? C();
@@ -3235,7 +3244,7 @@ var qr = class {
3235
3244
  const u = this.resloveResource(e[a]);
3236
3245
  s.push(u);
3237
3246
  }
3238
- const o = new Ai(s.length, (a, u) => {
3247
+ const o = new Ei(s.length, (a, u) => {
3239
3248
  if (o.isOK()) try {
3240
3249
  typeof n == "function" && Reflect.apply(n, {}, u), t(u);
3241
3250
  } catch (f) {
@@ -3248,7 +3257,7 @@ var qr = class {
3248
3257
  }
3249
3258
  }), l = new ft();
3250
3259
  for (let a = 0; a < s.length; a++) {
3251
- const u = new qi(a, s[a], o);
3260
+ const u = new Ai(a, s[a], o);
3252
3261
  this.mount(l, u);
3253
3262
  }
3254
3263
  return this;
@@ -3386,7 +3395,7 @@ var qr = class {
3386
3395
  return;
3387
3396
  }
3388
3397
  try {
3389
- let n = await Ei(s.path);
3398
+ let n = await Fi(s.path);
3390
3399
  if (Zt(n) && (n = n.default ?? n), Ue(n)) {
3391
3400
  t.progress.work(!1, t.index, n), r.resolve();
3392
3401
  return;
@@ -3482,7 +3491,7 @@ var qr = class {
3482
3491
  let r = e.lastIndexOf(".", t);
3483
3492
  return r == -1 ? "" : e.substring(r + 1, t);
3484
3493
  }
3485
- }, Ai = class {
3494
+ }, Ei = class {
3486
3495
  finalCallback;
3487
3496
  callback;
3488
3497
  values;
@@ -3504,7 +3513,7 @@ var qr = class {
3504
3513
  isOK() {
3505
3514
  return this.status;
3506
3515
  }
3507
- }, qi = class {
3516
+ }, Ai = class {
3508
3517
  index;
3509
3518
  resource;
3510
3519
  progress;
@@ -3512,8 +3521,8 @@ var qr = class {
3512
3521
  this.index = e, this.resource = t, this.progress = r;
3513
3522
  }
3514
3523
  }, zt = /* @__PURE__ */ Symbol("fk"), Jt = /* @__PURE__ */ Symbol("fbk"), Gt = /* @__PURE__ */ Symbol("fepk");
3515
- function Xi(e = {}) {
3516
- const t = new Js(e), r = new ar(), s = new Er(), i = new qr(), n = {
3524
+ function Gi(e = {}) {
3525
+ const t = new zs(e), r = new ar(), s = new Er(), i = new qr(), n = {
3517
3526
  get router() {
3518
3527
  return t;
3519
3528
  },
@@ -3542,7 +3551,7 @@ function Xi(e = {}) {
3542
3551
  return Zt;
3543
3552
  },
3544
3553
  install(o, l = {}) {
3545
- o.provide(Ne, t), o.provide(zt, n), o.provide(Jt, r), o.provide(Gt, s), l.install !== !1 && (o.component(Pi, Wt), o.component(Ci, Si)), l.optionsApi !== !1 && (Reflect.defineProperty(o.config.globalProperties, "$fox", { get() {
3554
+ o.provide(Ne, t), o.provide(zt, n), o.provide(Jt, r), o.provide(Gt, s), l.install !== !1 && (o.component(xi, Wt), o.component(Pi, Ri)), l.optionsApi !== !1 && (Reflect.defineProperty(o.config.globalProperties, "$fox", { get() {
3546
3555
  return n;
3547
3556
  } }), Reflect.defineProperty(o.config.globalProperties, "$router", { get() {
3548
3557
  return t;
@@ -3568,7 +3577,7 @@ function Xi(e = {}) {
3568
3577
  let f = s;
3569
3578
  Reflect.apply(f.trigger, f, [a, ...u]);
3570
3579
  }, o.mixin({ computed: { $route() {
3571
- return $i(this);
3580
+ return qi(this);
3572
3581
  } } })), t.init();
3573
3582
  }
3574
3583
  };
@@ -3577,7 +3586,7 @@ function Xi(e = {}) {
3577
3586
  function ls(e) {
3578
3587
  return Pe() ? L(Ne, null) : e ? e.$?.appContext?.provides?.[Ne] ?? null : null;
3579
3588
  }
3580
- function $i(e) {
3589
+ function qi(e) {
3581
3590
  let t = Fr(e);
3582
3591
  if (!t && e && !Pe()) {
3583
3592
  let r = e;
@@ -3586,16 +3595,16 @@ function $i(e) {
3586
3595
  }
3587
3596
  return t;
3588
3597
  }
3589
- function Qi(e) {
3598
+ function Xi(e) {
3590
3599
  return Pe() ? L(zt, null) : e ? e.$?.appContext?.provides?.[zt] ?? null : null;
3591
3600
  }
3592
- function Zi(e) {
3601
+ function Qi(e) {
3593
3602
  return Pe() ? L(Jt, null) : e ? e.$?.appContext?.provides?.[Jt] ?? null : null;
3594
3603
  }
3595
- function Yi(e) {
3604
+ function Zi(e) {
3596
3605
  return Pe() ? L(Gt, null) : e ? e.$?.appContext?.provides?.[Gt] ?? null : null;
3597
3606
  }
3598
- function en(e) {
3607
+ function Yi(e) {
3599
3608
  const t = ls();
3600
3609
  if (!t) {
3601
3610
  console.error("[Fox]router is not exist.");
@@ -3613,7 +3622,7 @@ function en(e) {
3613
3622
  t?.removeBeforeEach(r);
3614
3623
  });
3615
3624
  }
3616
- function tn(e) {
3625
+ function en(e) {
3617
3626
  const t = ls();
3618
3627
  if (!t) {
3619
3628
  console.error("[Fox]router is not exist.");
@@ -3635,55 +3644,55 @@ export {
3635
3644
  ar as Bus,
3636
3645
  ft as EventChain,
3637
3646
  Er as EventProxy,
3638
- ti as FoxBeforeEnter,
3639
- si as FoxBeforeLeave,
3640
- ri as FoxEnter,
3641
- ii as FoxLeave,
3647
+ ei as FoxBeforeEnter,
3648
+ ri as FoxBeforeLeave,
3649
+ ti as FoxEnter,
3650
+ si as FoxLeave,
3642
3651
  Bt as FoxLeaveEnd,
3643
3652
  _ as OperationType,
3644
3653
  x as Route,
3645
- Js as Router,
3646
- Si as RouterLink,
3654
+ zs as Router,
3655
+ Ri as RouterLink,
3647
3656
  Wt as RouterView,
3648
- Vi as bindLifecycleContextToCurrentScope,
3649
- Xi as createFox,
3657
+ Bi as bindLifecycleContextToCurrentScope,
3658
+ Gi as createFox,
3650
3659
  Vs as createMemoryHistory,
3651
3660
  Us as createWebHashHistory,
3652
- Bi as createWebHistory,
3653
- zi as deleteContextValue,
3654
- Ui as destroyState,
3661
+ Ui as createWebHistory,
3662
+ Wi as deleteContextValue,
3663
+ Ni as destroyState,
3655
3664
  q as extend,
3656
3665
  zr as injectContextValue,
3657
3666
  ht as injectLifecycleContext,
3658
3667
  sr as isArray,
3659
- Ti as isDate,
3668
+ ki as isDate,
3660
3669
  Zt as isESModule,
3661
3670
  nr as isEqual,
3662
3671
  b as isFunction,
3663
- ji as isMap,
3672
+ Ki as isMap,
3664
3673
  Ue as isNil,
3665
3674
  ps as isObject,
3666
3675
  ws as isPlainObject,
3667
- Ii as isPromise,
3668
- ki as isSet,
3669
- Mi as isString,
3670
- Li as isSymbol,
3671
- tn as onAfterRouteUpdate,
3672
- en as onBeforeRouteUpdate,
3673
- Ji as onFoxActivated,
3674
- Gi as onFoxInactivated,
3675
- Wi as provideContextValue,
3676
- Ni as rawState,
3677
- Hi as reactiveState,
3678
- Di as shallowReactiveState,
3676
+ Li as isPromise,
3677
+ ji as isSet,
3678
+ Ti as isString,
3679
+ Mi as isSymbol,
3680
+ en as onAfterRouteUpdate,
3681
+ Yi as onBeforeRouteUpdate,
3682
+ zi as onFoxActivated,
3683
+ Ji as onFoxInactivated,
3684
+ Vi as provideContextValue,
3685
+ Di as rawState,
3686
+ Oi as reactiveState,
3687
+ Hi as shallowReactiveState,
3679
3688
  Tr as toBoolean,
3680
- Oi as toNumber,
3689
+ Ii as toNumber,
3681
3690
  Qt as toTypeString,
3682
3691
  ir as typeOf,
3683
- Zi as useBus,
3684
- Yi as useEventProxy,
3685
- Qi as useFox,
3686
- $i as useRoute,
3692
+ Qi as useBus,
3693
+ Zi as useEventProxy,
3694
+ Xi as useFox,
3695
+ qi as useRoute,
3687
3696
  ls as useRouter,
3688
- Xs as withLifecycleContext
3697
+ Gs as withLifecycleContext
3689
3698
  };