@benjavicente/angular-router-experimental 1.142.11 → 1.142.13

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.
@@ -1,91 +1,97 @@
1
- import * as e from "@angular/core";
2
- import { ChangeDetectionStrategy as t, DestroyRef as n, ElementRef as r, EnvironmentInjector as i, InjectionToken as a, Injector as o, Renderer2 as s, ViewContainerRef as c, afterNextRender as l, assertInInjectionContext as u, computed as d, effect as f, inject as p, input as m, inputBinding as h, isDevMode as g, linkedSignal as _, signal as v, untracked as y } from "@angular/core";
3
- import { DOCUMENT as b } from "@angular/common";
1
+ import { batch as e, createAtom as t } from "@tanstack/store";
2
+ import * as n from "@angular/core";
3
+ import { ChangeDetectionStrategy as r, DestroyRef as i, ElementRef as a, EnvironmentInjector as o, InjectionToken as s, Injector as c, Renderer2 as l, ViewContainerRef as u, afterNextRender as d, assertInInjectionContext as f, computed as p, effect as m, inject as h, input as g, inputBinding as _, isDevMode as v, linkedSignal as y, runInInjectionContext as b, signal as x, untracked as S } from "@angular/core";
4
+ import { DOCUMENT as C } from "@angular/common";
4
5
  //#region ../router-core/dist/esm/utils.js
5
- function x(e) {
6
+ function w(e) {
6
7
  return e[e.length - 1];
7
8
  }
8
- function S(e) {
9
+ function ee(e) {
9
10
  return typeof e == "function";
10
11
  }
11
- function C(e, t) {
12
- return S(e) ? e(t) : e;
12
+ function T(e, t) {
13
+ return ee(e) ? e(t) : e;
13
14
  }
14
- var w = Object.prototype.hasOwnProperty, ee = Object.prototype.propertyIsEnumerable, te = () => Object.create(null), T = (e, t) => E(e, t, te);
15
- function E(e, t, n = () => ({}), r = 0) {
15
+ var te = Object.prototype.hasOwnProperty, ne = Object.prototype.propertyIsEnumerable;
16
+ function re(e) {
17
+ for (let t in e) if (te.call(e, t)) return !0;
18
+ return !1;
19
+ }
20
+ var ie = () => Object.create(null), E = (e, t) => D(e, t, ie);
21
+ function D(e, t, n = () => ({}), r = 0) {
16
22
  if (e === t) return e;
17
23
  if (r > 500) return t;
18
- let i = t, a = ie(e) && ie(i);
19
- if (!a && !(D(e) && D(i))) return i;
20
- let o = a ? e : ne(e);
24
+ let i = t, a = se(e) && se(i);
25
+ if (!a && !(O(e) && O(i))) return i;
26
+ let o = a ? e : ae(e);
21
27
  if (!o) return i;
22
- let s = a ? i : ne(i);
28
+ let s = a ? i : ae(i);
23
29
  if (!s) return i;
24
30
  let c = o.length, l = s.length, u = a ? Array(l) : n(), d = 0;
25
31
  for (let t = 0; t < l; t++) {
26
32
  let o = a ? t : s[t], l = e[o], f = i[o];
27
33
  if (l === f) {
28
- u[o] = l, (a ? t < c : w.call(e, o)) && d++;
34
+ u[o] = l, (a ? t < c : te.call(e, o)) && d++;
29
35
  continue;
30
36
  }
31
37
  if (l === null || f === null || typeof l != "object" || typeof f != "object") {
32
38
  u[o] = f;
33
39
  continue;
34
40
  }
35
- let p = E(l, f, n, r + 1);
41
+ let p = D(l, f, n, r + 1);
36
42
  u[o] = p, p === l && d++;
37
43
  }
38
44
  return c === l && d === c ? e : u;
39
45
  }
40
- function ne(e) {
46
+ function ae(e) {
41
47
  let t = Object.getOwnPropertyNames(e);
42
- for (let n of t) if (!ee.call(e, n)) return !1;
48
+ for (let n of t) if (!ne.call(e, n)) return !1;
43
49
  let n = Object.getOwnPropertySymbols(e);
44
50
  if (n.length === 0) return t;
45
51
  let r = t;
46
52
  for (let t of n) {
47
- if (!ee.call(e, t)) return !1;
53
+ if (!ne.call(e, t)) return !1;
48
54
  r.push(t);
49
55
  }
50
56
  return r;
51
57
  }
52
- function D(e) {
53
- if (!re(e)) return !1;
58
+ function O(e) {
59
+ if (!oe(e)) return !1;
54
60
  let t = e.constructor;
55
61
  if (t === void 0) return !0;
56
62
  let n = t.prototype;
57
- return !(!re(n) || !n.hasOwnProperty("isPrototypeOf"));
63
+ return !(!oe(n) || !n.hasOwnProperty("isPrototypeOf"));
58
64
  }
59
- function re(e) {
65
+ function oe(e) {
60
66
  return Object.prototype.toString.call(e) === "[object Object]";
61
67
  }
62
- function ie(e) {
68
+ function se(e) {
63
69
  return Array.isArray(e) && e.length === Object.keys(e).length;
64
70
  }
65
- function O(e, t, n) {
71
+ function k(e, t, n) {
66
72
  if (e === t) return !0;
67
73
  if (typeof e != typeof t) return !1;
68
74
  if (Array.isArray(e) && Array.isArray(t)) {
69
75
  if (e.length !== t.length) return !1;
70
- for (let r = 0, i = e.length; r < i; r++) if (!O(e[r], t[r], n)) return !1;
76
+ for (let r = 0, i = e.length; r < i; r++) if (!k(e[r], t[r], n)) return !1;
71
77
  return !0;
72
78
  }
73
- if (D(e) && D(t)) {
79
+ if (O(e) && O(t)) {
74
80
  let r = n?.ignoreUndefined ?? !0;
75
81
  if (n?.partial) {
76
- for (let i in t) if ((!r || t[i] !== void 0) && !O(e[i], t[i], n)) return !1;
82
+ for (let i in t) if ((!r || t[i] !== void 0) && !k(e[i], t[i], n)) return !1;
77
83
  return !0;
78
84
  }
79
85
  let i = 0;
80
86
  if (!r) i = Object.keys(e).length;
81
87
  else for (let t in e) e[t] !== void 0 && i++;
82
88
  let a = 0;
83
- for (let o in t) if ((!r || t[o] !== void 0) && (a++, a > i || !O(e[o], t[o], n))) return !1;
89
+ for (let o in t) if ((!r || t[o] !== void 0) && (a++, a > i || !k(e[o], t[o], n))) return !1;
84
90
  return i === a;
85
91
  }
86
92
  return !1;
87
93
  }
88
- function k(e) {
94
+ function A(e) {
89
95
  let t, n, r = new Promise((e, r) => {
90
96
  t = e, n = r;
91
97
  });
@@ -95,19 +101,19 @@ function k(e) {
95
101
  r.status = "rejected", n(e);
96
102
  }, r;
97
103
  }
98
- function A(e) {
104
+ function j(e) {
99
105
  return !!(e && typeof e == "object" && typeof e.then == "function");
100
106
  }
101
- function ae(e, t) {
107
+ function ce(e, t) {
102
108
  for (let n = e.length - 1; n >= 0; n--) {
103
109
  let r = e[n];
104
110
  if (t(r)) return r;
105
111
  }
106
112
  }
107
- function oe(e) {
113
+ function le(e) {
108
114
  return e.replace(/[\x00-\x1f\x7f]/g, "");
109
115
  }
110
- function se(e) {
116
+ function ue(e) {
111
117
  let t;
112
118
  try {
113
119
  t = decodeURI(e);
@@ -120,15 +126,15 @@ function se(e) {
120
126
  }
121
127
  });
122
128
  }
123
- return oe(t);
129
+ return le(t);
124
130
  }
125
- var ce = [
131
+ var de = [
126
132
  "http:",
127
133
  "https:",
128
134
  "mailto:",
129
135
  "tel:"
130
136
  ];
131
- function le(e, t) {
137
+ function fe(e, t) {
132
138
  if (!e) return !1;
133
139
  try {
134
140
  let n = new URL(e);
@@ -137,34 +143,34 @@ function le(e, t) {
137
143
  return !1;
138
144
  }
139
145
  }
140
- var ue = {
146
+ var pe = {
141
147
  "&": "\\u0026",
142
148
  ">": "\\u003e",
143
149
  "<": "\\u003c",
144
150
  "\u2028": "\\u2028",
145
151
  "\u2029": "\\u2029"
146
- }, de = /[&><\u2028\u2029]/g;
147
- function fe(e) {
148
- return e.replace(de, (e) => ue[e]);
152
+ }, me = /[&><\u2028\u2029]/g;
153
+ function he(e) {
154
+ return e.replace(me, (e) => pe[e]);
149
155
  }
150
- function j(e) {
156
+ function ge(e) {
151
157
  if (!e || !/[%\\\x00-\x1f\x7f]/.test(e) && !e.startsWith("//")) return {
152
158
  path: e,
153
159
  handledProtocolRelativeURL: !1
154
160
  };
155
161
  let t = /%25|%5C/gi, n = 0, r = "", i;
156
- for (; (i = t.exec(e)) !== null;) r += se(e.slice(n, i.index)) + i[0], n = t.lastIndex;
157
- r += se(n ? e.slice(n) : e);
162
+ for (; (i = t.exec(e)) !== null;) r += ue(e.slice(n, i.index)) + i[0], n = t.lastIndex;
163
+ r += ue(n ? e.slice(n) : e);
158
164
  let a = !1;
159
165
  return r.startsWith("//") && (a = !0, r = "/" + r.replace(/^\/+/, "")), {
160
166
  path: r,
161
167
  handledProtocolRelativeURL: a
162
168
  };
163
169
  }
164
- function pe(e) {
170
+ function _e(e) {
165
171
  return /\s|[^\u0000-\u007F]/.test(e) ? e.replace(/\s|[^\u0000-\u007F]/gu, encodeURIComponent) : e;
166
172
  }
167
- function me(e, t) {
173
+ function ve(e, t) {
168
174
  if (e === t) return !0;
169
175
  if (e.length !== t.length) return !1;
170
176
  for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
@@ -172,12 +178,12 @@ function me(e, t) {
172
178
  }
173
179
  //#endregion
174
180
  //#region ../router-core/dist/esm/invariant.js
175
- function he() {
181
+ function ye() {
176
182
  throw Error("Invariant failed");
177
183
  }
178
184
  //#endregion
179
185
  //#region ../router-core/dist/esm/lru-cache.js
180
- function ge(e) {
186
+ function be(e) {
181
187
  let t = /* @__PURE__ */ new Map(), n, r, i = (e) => {
182
188
  e.next && (e.prev ? (e.prev.next = e.next, e.next.prev = e.prev, e.next = void 0, r && (r.next = e, e.prev = r)) : (e.next.prev = void 0, n = e.next, e.next = void 0, r && (e.prev = r, r.next = e)), r = e);
183
189
  };
@@ -209,14 +215,14 @@ function ge(e) {
209
215
  }
210
216
  //#endregion
211
217
  //#region ../router-core/dist/esm/new-process-route-tree.js
212
- var M = 4, _e = 5;
213
- function ve(e) {
218
+ var M = 4, xe = 5;
219
+ function Se(e) {
214
220
  let t = e.indexOf("{");
215
221
  if (t === -1) return null;
216
222
  let n = e.indexOf("}", t);
217
223
  return n === -1 || t + 1 >= e.length ? null : [t, n];
218
224
  }
219
- function ye(e, t, n = new Uint16Array(6)) {
225
+ function Ce(e, t, n = new Uint16Array(6)) {
220
226
  let r = e.indexOf("/", t), i = r === -1 ? e.length : r, a = e.substring(t, i);
221
227
  if (!a || !a.includes("$")) return n[0] = 0, n[1] = t, n[2] = t, n[3] = i, n[4] = i, n[5] = i, n;
222
228
  if (a === "$") {
@@ -224,7 +230,7 @@ function ye(e, t, n = new Uint16Array(6)) {
224
230
  return n[0] = 2, n[1] = t, n[2] = t, n[3] = r, n[4] = r, n[5] = r, n;
225
231
  }
226
232
  if (a.charCodeAt(0) === 36) return n[0] = 1, n[1] = t, n[2] = t + 1, n[3] = i, n[4] = i, n[5] = i, n;
227
- let o = ve(a);
233
+ let o = Se(a);
228
234
  if (o) {
229
235
  let [r, s] = o, c = a.charCodeAt(r + 1);
230
236
  if (c === 45) {
@@ -239,13 +245,13 @@ function ye(e, t, n = new Uint16Array(6)) {
239
245
  }
240
246
  return n[0] = 0, n[1] = t, n[2] = t, n[3] = i, n[4] = i, n[5] = i, n;
241
247
  }
242
- function be(e, t, n, r, i, a, o) {
248
+ function we(e, t, n, r, i, a, o) {
243
249
  o?.(n);
244
250
  let s = r;
245
251
  {
246
- let r = n.fullPath ?? n.from, o = r.length, c = n.options?.caseSensitive ?? e, l = !!(n.options?.params?.parse && n.options?.skipRouteOnParseError?.params);
252
+ let r = n.fullPath ?? n.from, o = r.length, c = n.options?.caseSensitive ?? e, l = n.options?.params?.parse ?? n.options?.parseParams;
247
253
  for (; s < o;) {
248
- let e = ye(r, s, t), o, u = s, d = e[5];
254
+ let e = Ce(r, s, t), o, u = s, d = e[5];
249
255
  switch (s = d + 1, a++, e[0]) {
250
256
  case 0: {
251
257
  let t = r.substring(e[2], e[3]);
@@ -269,25 +275,25 @@ function be(e, t, n, r, i, a, o) {
269
275
  break;
270
276
  }
271
277
  case 1: {
272
- let t = r.substring(u, e[1]), s = r.substring(e[4], d), f = c && !!(t || s), p = t ? f ? t : t.toLowerCase() : void 0, m = s ? f ? s : s.toLowerCase() : void 0, h = !l && i.dynamic?.find((e) => !e.skipOnParamError && e.caseSensitive === f && e.prefix === p && e.suffix === m);
278
+ let t = r.substring(u, e[1]), s = r.substring(e[4], d), f = c && !!(t || s), p = t ? f ? t : t.toLowerCase() : void 0, m = s ? f ? s : s.toLowerCase() : void 0, h = !l && i.dynamic?.find((e) => !e.parse && e.caseSensitive === f && e.prefix === p && e.suffix === m);
273
279
  if (h) o = h;
274
280
  else {
275
- let e = Se(1, n.fullPath ?? n.from, f, p, m);
281
+ let e = Ee(1, n.fullPath ?? n.from, f, p, m);
276
282
  o = e, e.depth = a, e.parent = i, i.dynamic ??= [], i.dynamic.push(e);
277
283
  }
278
284
  break;
279
285
  }
280
286
  case 3: {
281
- let t = r.substring(u, e[1]), s = r.substring(e[4], d), f = c && !!(t || s), p = t ? f ? t : t.toLowerCase() : void 0, m = s ? f ? s : s.toLowerCase() : void 0, h = !l && i.optional?.find((e) => !e.skipOnParamError && e.caseSensitive === f && e.prefix === p && e.suffix === m);
287
+ let t = r.substring(u, e[1]), s = r.substring(e[4], d), f = c && !!(t || s), p = t ? f ? t : t.toLowerCase() : void 0, m = s ? f ? s : s.toLowerCase() : void 0, h = !l && i.optional?.find((e) => !e.parse && e.caseSensitive === f && e.prefix === p && e.suffix === m);
282
288
  if (h) o = h;
283
289
  else {
284
- let e = Se(3, n.fullPath ?? n.from, f, p, m);
290
+ let e = Ee(3, n.fullPath ?? n.from, f, p, m);
285
291
  o = e, e.parent = i, e.depth = a, i.optional ??= [], i.optional.push(e);
286
292
  }
287
293
  break;
288
294
  }
289
295
  case 2: {
290
- let t = r.substring(u, e[1]), s = r.substring(e[4], d), l = c && !!(t || s), f = t ? l ? t : t.toLowerCase() : void 0, p = s ? l ? s : s.toLowerCase() : void 0, m = Se(2, n.fullPath ?? n.from, l, f, p);
296
+ let t = r.substring(u, e[1]), s = r.substring(e[4], d), l = c && !!(t || s), f = t ? l ? t : t.toLowerCase() : void 0, p = s ? l ? s : s.toLowerCase() : void 0, m = Ee(2, n.fullPath ?? n.from, l, f, p);
291
297
  o = m, m.parent = i, m.depth = a, i.wildcard ??= [], i.wildcard.push(m);
292
298
  }
293
299
  }
@@ -295,21 +301,20 @@ function be(e, t, n, r, i, a, o) {
295
301
  }
296
302
  if (l && n.children && !n.isRoot && n.id && n.id.charCodeAt(n.id.lastIndexOf("/") + 1) === 95) {
297
303
  let e = P(n.fullPath ?? n.from);
298
- e.kind = _e, e.parent = i, a++, e.depth = a, i.pathless ??= [], i.pathless.push(e), i = e;
304
+ e.kind = xe, e.parent = i, a++, e.depth = a, i.pathless ??= [], i.pathless.push(e), i = e;
299
305
  }
300
306
  let u = (n.path || !n.children) && !n.isRoot;
301
307
  if (u && r.endsWith("/")) {
302
308
  let e = P(n.fullPath ?? n.from);
303
309
  e.kind = M, e.parent = i, a++, e.depth = a, i.index = e, i = e;
304
310
  }
305
- i.parse = n.options?.params?.parse ?? null, i.skipOnParamError = l, i.parsingPriority = n.options?.skipRouteOnParseError?.priority ?? 0, u && !i.route && (i.route = n, i.fullPath = n.fullPath ?? n.from);
311
+ i.parse = l ?? null, u && !i.route && (i.route = n, i.fullPath = n.fullPath ?? n.from);
306
312
  }
307
- if (n.children) for (let r of n.children) be(e, t, r, s, i, a, o);
313
+ if (n.children) for (let r of n.children) we(e, t, r, s, i, a, o);
308
314
  }
309
- function xe(e, t) {
310
- if (e.skipOnParamError && !t.skipOnParamError) return -1;
311
- if (!e.skipOnParamError && t.skipOnParamError) return 1;
312
- if (e.skipOnParamError && t.skipOnParamError && (e.parsingPriority || t.parsingPriority)) return t.parsingPriority - e.parsingPriority;
315
+ function Te(e, t) {
316
+ if (e.parse && !t.parse) return -1;
317
+ if (!e.parse && t.parse) return 1;
313
318
  if (e.prefix && t.prefix && e.prefix !== t.prefix) {
314
319
  if (e.prefix.startsWith(t.prefix)) return -1;
315
320
  if (t.prefix.startsWith(e.prefix)) return 1;
@@ -325,15 +330,15 @@ function N(e) {
325
330
  if (e.static) for (let t of e.static.values()) N(t);
326
331
  if (e.staticInsensitive) for (let t of e.staticInsensitive.values()) N(t);
327
332
  if (e.dynamic?.length) {
328
- e.dynamic.sort(xe);
333
+ e.dynamic.sort(Te);
329
334
  for (let t of e.dynamic) N(t);
330
335
  }
331
336
  if (e.optional?.length) {
332
- e.optional.sort(xe);
337
+ e.optional.sort(Te);
333
338
  for (let t of e.optional) N(t);
334
339
  }
335
340
  if (e.wildcard?.length) {
336
- e.wildcard.sort(xe);
341
+ e.wildcard.sort(Te);
337
342
  for (let t of e.wildcard) N(t);
338
343
  }
339
344
  }
@@ -351,12 +356,10 @@ function P(e) {
351
356
  route: null,
352
357
  fullPath: e,
353
358
  parent: null,
354
- parse: null,
355
- skipOnParamError: !1,
356
- parsingPriority: 0
359
+ parse: null
357
360
  };
358
361
  }
359
- function Se(e, t, n, r, i) {
362
+ function Ee(e, t, n, r, i) {
360
363
  return {
361
364
  kind: e,
362
365
  depth: 0,
@@ -371,63 +374,61 @@ function Se(e, t, n, r, i) {
371
374
  fullPath: t,
372
375
  parent: null,
373
376
  parse: null,
374
- skipOnParamError: !1,
375
- parsingPriority: 0,
376
377
  caseSensitive: n,
377
378
  prefix: r,
378
379
  suffix: i
379
380
  };
380
381
  }
381
- function Ce(e, t) {
382
+ function De(e, t) {
382
383
  let n = P("/"), r = new Uint16Array(6);
383
- for (let t of e) be(!1, r, t, 1, n, 0);
384
- N(n), t.masksTree = n, t.flatCache = ge(1e3);
384
+ for (let t of e) we(!1, r, t, 1, n, 0);
385
+ N(n), t.masksTree = n, t.flatCache = be(1e3);
385
386
  }
386
- function we(e, t) {
387
+ function Oe(e, t) {
387
388
  e ||= "/";
388
389
  let n = t.flatCache.get(e);
389
390
  if (n) return n;
390
- let r = ke(e, t.masksTree);
391
+ let r = Ne(e, t.masksTree);
391
392
  return t.flatCache.set(e, r), r;
392
393
  }
393
- function Te(e, t, n, r, i) {
394
+ function ke(e, t, n, r, i) {
394
395
  e ||= "/", r ||= "/";
395
396
  let a = t ? `case\0${e}` : e, o = i.singleCache.get(a);
396
- return o || (o = P("/"), be(t, new Uint16Array(6), { from: e }, 1, o, 0), i.singleCache.set(a, o)), ke(r, o, n);
397
+ return o || (o = P("/"), we(t, new Uint16Array(6), { from: e }, 1, o, 0), i.singleCache.set(a, o)), Ne(r, o, n);
397
398
  }
398
- function Ee(e, t, n = !1) {
399
+ function Ae(e, t, n = !1) {
399
400
  let r = n ? e : `nofuzz\0${e}`, i = t.matchCache.get(r);
400
401
  if (i !== void 0) return i;
401
402
  e ||= "/";
402
403
  let a;
403
404
  try {
404
- a = ke(e, t.segmentTree, n);
405
+ a = Ne(e, t.segmentTree, n);
405
406
  } catch (e) {
406
407
  if (e instanceof URIError) a = null;
407
408
  else throw e;
408
409
  }
409
- return a && (a.branch = je(a.route)), t.matchCache.set(r, a), a;
410
+ return a && (a.branch = Fe(a.route)), t.matchCache.set(r, a), a;
410
411
  }
411
- function De(e) {
412
+ function je(e) {
412
413
  return e === "/" ? e : e.replace(/\/{1,}$/, "");
413
414
  }
414
- function Oe(e, t = !1, n) {
415
+ function Me(e, t = !1, n) {
415
416
  let r = P(e.fullPath), i = new Uint16Array(6), a = {}, o = {}, s = 0;
416
- return be(t, i, e, 1, r, 0, (e) => {
417
+ return we(t, i, e, 1, r, 0, (e) => {
417
418
  if (n?.(e, s), e.id in a) {
418
419
  if (process.env.NODE_ENV !== "production") throw Error(`Invariant failed: Duplicate routes found with id: ${String(e.id)}`);
419
- he();
420
+ ye();
420
421
  }
421
422
  if (a[e.id] = e, s !== 0 && e.path) {
422
- let t = De(e.fullPath);
423
+ let t = je(e.fullPath);
423
424
  (!o[t] || e.fullPath.endsWith("/")) && (o[t] = e);
424
425
  }
425
426
  s++;
426
427
  }), N(r), {
427
428
  processedTree: {
428
429
  segmentTree: r,
429
- singleCache: ge(1e3),
430
- matchCache: ge(1e3),
430
+ singleCache: be(1e3),
431
+ matchCache: be(1e3),
431
432
  flatCache: null,
432
433
  masksTree: null
433
434
  },
@@ -435,22 +436,21 @@ function Oe(e, t = !1, n) {
435
436
  routesByPath: o
436
437
  };
437
438
  }
438
- function ke(e, t, n = !1) {
439
- let r = e.split("/"), i = Ne(e, r, t, n);
439
+ function Ne(e, t, n = !1) {
440
+ let r = e.split("/"), i = Le(e, r, t, n);
440
441
  if (!i) return null;
441
- let [a] = Ae(e, r, i);
442
+ let [a] = Pe(e, r, i);
442
443
  return {
443
444
  route: i.node.route,
444
- rawParams: a,
445
- parsedParams: i.parsedParams
445
+ rawParams: a
446
446
  };
447
447
  }
448
- function Ae(e, t, n) {
449
- let r = Me(n.node), i = null, a = Object.create(null), o = n.extract?.part ?? 0, s = n.extract?.node ?? 0, c = n.extract?.path ?? 0, l = n.extract?.segment ?? 0;
448
+ function Pe(e, t, n) {
449
+ let r = Ie(n.node), i = null, a = Object.create(null), o = n.extract?.part ?? 0, s = n.extract?.node ?? 0, c = n.extract?.path ?? 0, l = n.extract?.segment ?? 0;
450
450
  for (; s < r.length; o++, s++, c++, l++) {
451
451
  let u = r[s];
452
452
  if (u.kind === M) break;
453
- if (u.kind === _e) {
453
+ if (u.kind === xe) {
454
454
  l--, o--, c--;
455
455
  continue;
456
456
  }
@@ -486,239 +486,236 @@ function Ae(e, t, n) {
486
486
  segment: l
487
487
  }];
488
488
  }
489
- function je(e) {
489
+ function Fe(e) {
490
490
  let t = [e];
491
491
  for (; e.parentRoute;) e = e.parentRoute, t.push(e);
492
492
  return t.reverse(), t;
493
493
  }
494
- function Me(e) {
494
+ function Ie(e) {
495
495
  let t = Array(e.depth + 1);
496
496
  do
497
497
  t[e.depth] = e, e = e.parent;
498
498
  while (e);
499
499
  return t;
500
500
  }
501
- function Ne(e, t, n, r) {
501
+ function Le(e, t, n, r) {
502
502
  if (e === "/" && n.index) return {
503
503
  node: n.index,
504
504
  skipped: 0
505
505
  };
506
- let i = !x(t), a = i && e !== "/", o = t.length - (i ? 1 : 0), s = [{
506
+ let i = !w(t), a = i && e !== "/", o = t.length - (i ? 1 : 0), s = [{
507
507
  node: n,
508
508
  index: 1,
509
509
  skipped: 0,
510
510
  depth: 1,
511
- statics: 1,
511
+ statics: 0,
512
512
  dynamics: 0,
513
513
  optionals: 0
514
- }], c = null, l = null, u = null;
514
+ }], c = null, l = null;
515
515
  for (; s.length;) {
516
- let n = s.pop(), { node: i, index: d, skipped: f, depth: p, statics: m, dynamics: h, optionals: g } = n, { extract: _, rawParams: v, parsedParams: y } = n;
517
- if (i.skipOnParamError) {
518
- if (!Pe(e, t, n)) continue;
519
- v = n.rawParams, _ = n.extract, y = n.parsedParams;
516
+ let n = s.pop(), { node: i, index: u, skipped: d, depth: f, statics: p, dynamics: m, optionals: h } = n, { extract: g, rawParams: _ } = n;
517
+ if (i.kind === 2 && i.route && !Ve(l, n)) continue;
518
+ if (i.parse) {
519
+ if (!Be(e, t, n)) continue;
520
+ _ = n.rawParams, g = n.extract;
520
521
  }
521
- r && i.route && i.kind !== M && F(l, n) && (l = n);
522
- let b = d === o;
523
- if (b && (i.route && !a && F(u, n) && (u = n), !i.optional && !i.wildcard && !i.index && !i.pathless)) continue;
524
- let x = b ? void 0 : t[d], S;
525
- if (b && i.index) {
522
+ r && i.route && i.kind !== M && Ve(c, n) && (c = n);
523
+ let v = u === o;
524
+ if (v && (i.route && (!a || i.kind === M || i.kind === 2) && Ve(l, n) && (l = n), !i.optional && !i.wildcard && !i.index && !i.pathless)) continue;
525
+ let y = v ? void 0 : t[u], b;
526
+ if (v && i.index) {
526
527
  let n = {
527
528
  node: i.index,
528
- index: d,
529
- skipped: f,
530
- depth: p + 1,
531
- statics: m,
532
- dynamics: h,
533
- optionals: g,
534
- extract: _,
535
- rawParams: v,
536
- parsedParams: y
529
+ index: u,
530
+ skipped: d,
531
+ depth: f + 1,
532
+ statics: p,
533
+ dynamics: m,
534
+ optionals: h,
535
+ extract: g,
536
+ rawParams: _
537
537
  }, r = !0;
538
- if (i.index.skipOnParamError && (Pe(e, t, n) || (r = !1)), r) {
539
- if (m === o && !h && !g && !f) return n;
540
- F(u, n) && (u = n);
538
+ if (i.index.parse && (Be(e, t, n) || (r = !1)), r) {
539
+ if (!m && !h && !d && ze(p, o)) return n;
540
+ Ve(l, n) && (l = n);
541
541
  }
542
542
  }
543
- if (i.wildcard && F(c, n)) for (let n of i.wildcard) {
544
- let { prefix: r, suffix: i } = n;
545
- if (r && (b || !(n.caseSensitive ? x : S ??= x.toLowerCase()).startsWith(r))) continue;
546
- if (i) {
547
- if (b) continue;
548
- let e = t.slice(d).join("/").slice(-i.length);
549
- if ((n.caseSensitive ? e : e.toLowerCase()) !== i) continue;
550
- }
551
- let a = {
552
- node: n,
553
- index: o,
554
- skipped: f,
555
- depth: p,
556
- statics: m,
557
- dynamics: h,
558
- optionals: g,
559
- extract: _,
560
- rawParams: v,
561
- parsedParams: y
562
- };
563
- if (!(n.skipOnParamError && !Pe(e, t, a))) {
564
- c = a;
565
- break;
543
+ if (i.wildcard) for (let e = i.wildcard.length - 1; e >= 0; e--) {
544
+ let n = i.wildcard[e], { prefix: r, suffix: a } = n;
545
+ if (!(r && (v || !(n.caseSensitive ? y : b ??= y.toLowerCase()).startsWith(r)))) {
546
+ if (a) {
547
+ if (v) continue;
548
+ let e = t.slice(u).join("/").slice(-a.length);
549
+ if ((n.caseSensitive ? e : e.toLowerCase()) !== a) continue;
550
+ }
551
+ s.push({
552
+ node: n,
553
+ index: o,
554
+ skipped: d,
555
+ depth: f + 1,
556
+ statics: p,
557
+ dynamics: m,
558
+ optionals: h,
559
+ extract: g,
560
+ rawParams: _
561
+ });
566
562
  }
567
563
  }
568
564
  if (i.optional) {
569
- let e = f | 1 << p, t = p + 1;
565
+ let e = d | 1 << f, t = f + 1;
570
566
  for (let n = i.optional.length - 1; n >= 0; n--) {
571
567
  let r = i.optional[n];
572
568
  s.push({
573
569
  node: r,
574
- index: d,
570
+ index: u,
575
571
  skipped: e,
576
572
  depth: t,
577
- statics: m,
578
- dynamics: h,
579
- optionals: g,
580
- extract: _,
581
- rawParams: v,
582
- parsedParams: y
573
+ statics: p,
574
+ dynamics: m,
575
+ optionals: h,
576
+ extract: g,
577
+ rawParams: _
583
578
  });
584
579
  }
585
- if (!b) for (let e = i.optional.length - 1; e >= 0; e--) {
580
+ if (!v) for (let e = i.optional.length - 1; e >= 0; e--) {
586
581
  let n = i.optional[e], { prefix: r, suffix: a } = n;
587
582
  if (r || a) {
588
- let e = n.caseSensitive ? x : S ??= x.toLowerCase();
583
+ let e = n.caseSensitive ? y : b ??= y.toLowerCase();
589
584
  if (r && !e.startsWith(r) || a && !e.endsWith(a)) continue;
590
585
  }
591
586
  s.push({
592
587
  node: n,
593
- index: d + 1,
594
- skipped: f,
588
+ index: u + 1,
589
+ skipped: d,
595
590
  depth: t,
596
- statics: m,
597
- dynamics: h,
598
- optionals: g + 1,
599
- extract: _,
600
- rawParams: v,
601
- parsedParams: y
591
+ statics: p,
592
+ dynamics: m,
593
+ optionals: h + Re(o, u),
594
+ extract: g,
595
+ rawParams: _
602
596
  });
603
597
  }
604
598
  }
605
- if (!b && i.dynamic && x) for (let e = i.dynamic.length - 1; e >= 0; e--) {
599
+ if (!v && i.dynamic && y) for (let e = i.dynamic.length - 1; e >= 0; e--) {
606
600
  let t = i.dynamic[e], { prefix: n, suffix: r } = t;
607
601
  if (n || r) {
608
- let e = t.caseSensitive ? x : S ??= x.toLowerCase();
602
+ let e = t.caseSensitive ? y : b ??= y.toLowerCase();
609
603
  if (n && !e.startsWith(n) || r && !e.endsWith(r)) continue;
610
604
  }
611
605
  s.push({
612
606
  node: t,
613
- index: d + 1,
614
- skipped: f,
615
- depth: p + 1,
616
- statics: m,
617
- dynamics: h + 1,
618
- optionals: g,
619
- extract: _,
620
- rawParams: v,
621
- parsedParams: y
607
+ index: u + 1,
608
+ skipped: d,
609
+ depth: f + 1,
610
+ statics: p,
611
+ dynamics: m + Re(o, u),
612
+ optionals: h,
613
+ extract: g,
614
+ rawParams: _
622
615
  });
623
616
  }
624
- if (!b && i.staticInsensitive) {
625
- let e = i.staticInsensitive.get(S ??= x.toLowerCase());
617
+ if (!v && i.staticInsensitive) {
618
+ let e = i.staticInsensitive.get(b ??= y.toLowerCase());
626
619
  e && s.push({
627
620
  node: e,
628
- index: d + 1,
629
- skipped: f,
630
- depth: p + 1,
631
- statics: m + 1,
632
- dynamics: h,
633
- optionals: g,
634
- extract: _,
635
- rawParams: v,
636
- parsedParams: y
621
+ index: u + 1,
622
+ skipped: d,
623
+ depth: f + 1,
624
+ statics: p + Re(o, u),
625
+ dynamics: m,
626
+ optionals: h,
627
+ extract: g,
628
+ rawParams: _
637
629
  });
638
630
  }
639
- if (!b && i.static) {
640
- let e = i.static.get(x);
631
+ if (!v && i.static) {
632
+ let e = i.static.get(y);
641
633
  e && s.push({
642
634
  node: e,
643
- index: d + 1,
644
- skipped: f,
645
- depth: p + 1,
646
- statics: m + 1,
647
- dynamics: h,
648
- optionals: g,
649
- extract: _,
650
- rawParams: v,
651
- parsedParams: y
635
+ index: u + 1,
636
+ skipped: d,
637
+ depth: f + 1,
638
+ statics: p + Re(o, u),
639
+ dynamics: m,
640
+ optionals: h,
641
+ extract: g,
642
+ rawParams: _
652
643
  });
653
644
  }
654
645
  if (i.pathless) {
655
- let e = p + 1;
646
+ let e = f + 1;
656
647
  for (let t = i.pathless.length - 1; t >= 0; t--) {
657
648
  let n = i.pathless[t];
658
649
  s.push({
659
650
  node: n,
660
- index: d,
661
- skipped: f,
651
+ index: u,
652
+ skipped: d,
662
653
  depth: e,
663
- statics: m,
664
- dynamics: h,
665
- optionals: g,
666
- extract: _,
667
- rawParams: v,
668
- parsedParams: y
654
+ statics: p,
655
+ dynamics: m,
656
+ optionals: h,
657
+ extract: g,
658
+ rawParams: _
669
659
  });
670
660
  }
671
661
  }
672
662
  }
673
- if (u && c) return F(c, u) ? u : c;
674
- if (u) return u;
675
- if (c) return c;
676
- if (r && l) {
677
- let n = l.index;
678
- for (let e = 0; e < l.index; e++) n += t[e].length;
663
+ if (l) return l;
664
+ if (r && c) {
665
+ let n = c.index;
666
+ for (let e = 0; e < c.index; e++) n += t[e].length;
679
667
  let r = n === e.length ? "/" : e.slice(n);
680
- return l.rawParams ??= Object.create(null), l.rawParams["**"] = decodeURIComponent(r), l;
668
+ return c.rawParams ??= Object.create(null), c.rawParams["**"] = decodeURIComponent(r), c;
681
669
  }
682
670
  return null;
683
671
  }
684
- function Pe(e, t, n) {
672
+ function Re(e, t) {
673
+ return 2 ** (e - t - 1);
674
+ }
675
+ function ze(e, t) {
676
+ return e === 2 ** (t - 1) - 1;
677
+ }
678
+ function Be(e, t, n) {
679
+ let r, i;
685
680
  try {
686
- let [r, i] = Ae(e, t, n);
687
- n.rawParams = r, n.extract = i;
688
- let a = n.node.parse(r);
689
- return n.parsedParams = Object.assign(Object.create(null), n.parsedParams, a), !0;
681
+ [r, i] = Pe(e, t, n);
690
682
  } catch {
691
683
  return null;
692
684
  }
685
+ if (n.rawParams = r, n.extract = i, !n.node.parse) return !0;
686
+ try {
687
+ if (n.node.parse(r) === !1) return null;
688
+ } catch {}
689
+ return !0;
693
690
  }
694
- function F(e, t) {
691
+ function Ve(e, t) {
695
692
  return e ? t.statics > e.statics || t.statics === e.statics && (t.dynamics > e.dynamics || t.dynamics === e.dynamics && (t.optionals > e.optionals || t.optionals === e.optionals && ((t.node.kind === M) > (e.node.kind === M) || t.node.kind === M == (e.node.kind === M) && t.depth > e.depth))) : !0;
696
693
  }
697
694
  //#endregion
698
695
  //#region ../router-core/dist/esm/path.js
699
- function Fe(e) {
700
- return Ie(e.filter((e) => e !== void 0).join("/"));
696
+ function He(e) {
697
+ return Ue(e.filter((e) => e !== void 0).join("/"));
701
698
  }
702
- function Ie(e) {
699
+ function Ue(e) {
703
700
  return e.replace(/\/{2,}/g, "/");
704
701
  }
705
- function Le(e) {
702
+ function We(e) {
706
703
  return e === "/" ? e : e.replace(/^\/{1,}/, "");
707
704
  }
708
- function I(e) {
705
+ function F(e) {
709
706
  let t = e.length;
710
707
  return t > 1 && e[t - 1] === "/" ? e.replace(/\/{1,}$/, "") : e;
711
708
  }
712
- function Re(e) {
713
- return I(Le(e));
709
+ function Ge(e) {
710
+ return F(We(e));
714
711
  }
715
- function ze(e, t) {
712
+ function Ke(e, t) {
716
713
  return e?.endsWith("/") && e !== "/" && e !== `${t}/` ? e.slice(0, -1) : e;
717
714
  }
718
- function Be(e, t, n) {
719
- return ze(e, n) === ze(t, n);
715
+ function qe(e, t, n) {
716
+ return Ke(e, n) === Ke(t, n);
720
717
  }
721
- function Ve({ base: e, to: t, trailingSlash: n = "never", cache: r }) {
718
+ function Je({ base: e, to: t, trailingSlash: n = "never", cache: r }) {
722
719
  let i = t.startsWith("/"), a = !i && t === ".", o;
723
720
  if (r) {
724
721
  o = i ? t : a ? e : e + "\0" + t;
@@ -729,41 +726,26 @@ function Ve({ base: e, to: t, trailingSlash: n = "never", cache: r }) {
729
726
  if (a) s = e.split("/");
730
727
  else if (i) s = t.split("/");
731
728
  else {
732
- for (s = e.split("/"); s.length > 1 && x(s) === "";) s.pop();
729
+ for (s = e.split("/"); s.length > 1 && w(s) === "";) s.pop();
733
730
  let n = t.split("/");
734
731
  for (let e = 0, t = n.length; e < t; e++) {
735
732
  let r = n[e];
736
733
  r === "" ? e ? e === t - 1 && s.push(r) : s = [r] : r === ".." ? s.pop() : r === "." || s.push(r);
737
734
  }
738
735
  }
739
- s.length > 1 && (x(s) === "" ? n === "never" && s.pop() : n === "always" && s.push(""));
740
- let c, l = "";
741
- for (let e = 0; e < s.length; e++) {
742
- e > 0 && (l += "/");
743
- let t = s[e];
744
- if (!t) continue;
745
- c = ye(t, 0, c);
746
- let n = c[0];
747
- if (n === 0) {
748
- l += t;
749
- continue;
750
- }
751
- let r = c[5], i = t.substring(0, c[1]), a = t.substring(c[4], r), o = t.substring(c[2], c[3]);
752
- n === 1 ? l += i || a ? `${i}{$${o}}${a}` : `$${o}` : n === 2 ? l += i || a ? `${i}{$}${a}` : "$" : l += `${i}{-$${o}}${a}`;
753
- }
754
- l = Ie(l);
755
- let u = l || "/";
756
- return o && r && r.set(o, u), u;
736
+ s.length > 1 && (w(s) === "" ? n === "never" && s.pop() : n === "always" && s.push(""));
737
+ let c = Ue(s.join("/")) || "/";
738
+ return o && r && r.set(o, c), c;
757
739
  }
758
- function He(e) {
740
+ function Ye(e) {
759
741
  let t = new Map(e.map((e) => [encodeURIComponent(e), e])), n = Array.from(t.keys()).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|"), r = new RegExp(n, "g");
760
742
  return (e) => e.replace(r, (e) => t.get(e) ?? e);
761
743
  }
762
- function Ue(e, t, n) {
744
+ function Xe(e, t, n) {
763
745
  let r = t[e];
764
- return typeof r == "string" ? e === "_splat" ? /^[a-zA-Z0-9\-._~!/]*$/.test(r) ? r : r.split("/").map((e) => Ge(e, n)).join("/") : Ge(r, n) : r;
746
+ return typeof r == "string" ? e === "_splat" ? /^[a-zA-Z0-9\-._~!/]*$/.test(r) ? r : r.split("/").map((e) => Qe(e, n)).join("/") : Qe(r, n) : r;
765
747
  }
766
- function We({ path: e, params: t, decoder: n, ...r }) {
748
+ function Ze({ path: e, params: t, decoder: n, ...r }) {
767
749
  let i = !1, a = Object.create(null);
768
750
  if (!e || e === "/") return {
769
751
  interpolatedPath: "/",
@@ -778,7 +760,7 @@ function We({ path: e, params: t, decoder: n, ...r }) {
778
760
  let o = e.length, s = 0, c, l = "";
779
761
  for (; s < o;) {
780
762
  let r = s;
781
- c = ye(e, r, c);
763
+ c = Ce(e, r, c);
782
764
  let o = c[5];
783
765
  if (s = o + 1, r === o) continue;
784
766
  let u = c[0];
@@ -794,14 +776,14 @@ function We({ path: e, params: t, decoder: n, ...r }) {
794
776
  i = !0, (u || d) && (l += "/" + u + d);
795
777
  continue;
796
778
  }
797
- let f = Ue("_splat", t, n);
779
+ let f = Xe("_splat", t, n);
798
780
  l += "/" + u + f + d;
799
781
  continue;
800
782
  }
801
783
  if (u === 1) {
802
784
  let s = e.substring(c[2], c[3]);
803
785
  !i && !(s in t) && (i = !0), a[s] = t[s];
804
- let u = e.substring(r, c[1]), d = e.substring(c[4], o), f = Ue(s, t, n) ?? "undefined";
786
+ let u = e.substring(r, c[1]), d = e.substring(c[4], o), f = Xe(s, t, n) ?? "undefined";
805
787
  l += "/" + u + f + d;
806
788
  continue;
807
789
  }
@@ -809,7 +791,7 @@ function We({ path: e, params: t, decoder: n, ...r }) {
809
791
  let i = e.substring(c[2], c[3]), s = t[i];
810
792
  if (s == null) continue;
811
793
  a[i] = s;
812
- let u = e.substring(r, c[1]), d = e.substring(c[4], o), f = Ue(i, t, n) ?? "";
794
+ let u = e.substring(r, c[1]), d = e.substring(c[4], o), f = Xe(i, t, n) ?? "";
813
795
  l += "/" + u + f + d;
814
796
  continue;
815
797
  }
@@ -820,69 +802,69 @@ function We({ path: e, params: t, decoder: n, ...r }) {
820
802
  isMissingParams: i
821
803
  };
822
804
  }
823
- function Ge(e, t) {
805
+ function Qe(e, t) {
824
806
  let n = encodeURIComponent(e);
825
807
  return t?.(n) ?? n;
826
808
  }
827
809
  //#endregion
828
810
  //#region ../router-core/dist/esm/not-found.js
829
- function Ke(e = {}) {
811
+ function $e(e = {}) {
830
812
  if (e.isNotFound = !0, e.throw) throw e;
831
813
  return e;
832
814
  }
833
- function L(e) {
834
- return !!e?.isNotFound;
815
+ function I(e) {
816
+ return e?.isNotFound === !0;
835
817
  }
836
818
  //#endregion
837
819
  //#region ../router-core/dist/esm/scroll-restoration.js
838
- function qe() {
820
+ function et() {
839
821
  try {
840
822
  return typeof window < "u" && typeof window.sessionStorage == "object" ? window.sessionStorage : void 0;
841
823
  } catch {
842
824
  return;
843
825
  }
844
826
  }
845
- var Je = "tsr-scroll-restoration-v1_3";
846
- function Ye() {
847
- let e = qe();
827
+ var tt = "tsr-scroll-restoration-v1_3";
828
+ function nt() {
829
+ let e = et();
848
830
  if (!e) return null;
849
831
  let t = {};
850
832
  try {
851
833
  let n = JSON.parse(e.getItem("tsr-scroll-restoration-v1_3") || "{}");
852
- D(n) && (t = n);
834
+ O(n) && (t = n);
853
835
  } catch {}
854
836
  return {
855
837
  get state() {
856
838
  return t;
857
839
  },
858
840
  set: (e) => {
859
- t = C(e, t) || t;
841
+ t = T(e, t) || t;
860
842
  },
861
843
  persist: () => {
862
844
  try {
863
- e.setItem(Je, JSON.stringify(t));
845
+ e.setItem(tt, JSON.stringify(t));
864
846
  } catch {
865
847
  process.env.NODE_ENV !== "production" && console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.");
866
848
  }
867
849
  }
868
850
  };
869
851
  }
870
- var Xe = Ye(), Ze = (e) => e.state.__TSR_key || e.href;
871
- function Qe(e) {
852
+ var rt = nt(), it = (e) => e.state.__TSR_key || e.href;
853
+ function at(e) {
872
854
  let t = [], n;
873
855
  for (; n = e.parentNode;) t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children, e) + 1})`), e = n;
874
856
  return `${t.reverse().join(" > ")}`.toLowerCase();
875
857
  }
876
- var $e = !1, et = "window", tt = "data-scroll-restoration-id";
877
- function nt(e, t) {
878
- if (!Xe) return;
879
- let n = Xe;
858
+ var ot = !1, st = "window", ct = "data-scroll-restoration-id";
859
+ function lt(e, t) {
860
+ if (!rt) return;
861
+ let n = rt;
880
862
  if ((t ?? e.options.scrollRestoration ?? !1) && (e.isScrollRestoring = !0), e.isScrollRestorationSetup || !n) return;
881
- e.isScrollRestorationSetup = !0, $e = !1;
882
- let r = e.options.getScrollRestorationKey || Ze, i = /* @__PURE__ */ new Map();
863
+ e.isScrollRestorationSetup = !0, ot = !1;
864
+ let r = e.options.getScrollRestorationKey || it, i = /* @__PURE__ */ new Map();
883
865
  window.history.scrollRestoration = "manual";
884
866
  let a = (t) => {
885
- if (!($e || !e.isScrollRestoring)) if (t.target === document || t.target === window) i.set(et, {
867
+ if (!(ot || !e.isScrollRestoring)) if (t.target === document || t.target === window) i.set(st, {
886
868
  scrollX: window.scrollX || 0,
887
869
  scrollY: window.scrollY || 0
888
870
  });
@@ -898,10 +880,10 @@ function nt(e, t) {
898
880
  let r = n.state[t] ||= {};
899
881
  for (let [e, t] of i) {
900
882
  let n;
901
- if (e === et) n = et;
883
+ if (e === st) n = st;
902
884
  else if (e.isConnected) {
903
- let t = e.getAttribute(tt);
904
- n = t ? `[${tt}="${t}"]` : Qe(e);
885
+ let t = e.getAttribute(ct);
886
+ n = t ? `[${ct}="${t}"]` : at(e);
905
887
  }
906
888
  n && (r[n] = t);
907
889
  }
@@ -909,7 +891,7 @@ function nt(e, t) {
909
891
  document.addEventListener("scroll", a, !0), e.subscribe("onBeforeLoad", (e) => {
910
892
  o(e.fromLocation ? r(e.fromLocation) : void 0), i.clear();
911
893
  }), window.addEventListener("pagehide", () => {
912
- o(r(e.stores.resolvedLocation.state ?? e.stores.location.state)), n.persist();
894
+ o(r(e.stores.resolvedLocation.get() ?? e.stores.location.get())), n.persist();
913
895
  }), e.subscribe("onRendered", (t) => {
914
896
  let a = r(t.toLocation), o = e.options.scrollRestorationBehavior, s = e.options.scrollToTopSelectors;
915
897
  if (i.clear(), !e.resetNextScroll) {
@@ -917,15 +899,15 @@ function nt(e, t) {
917
899
  return;
918
900
  }
919
901
  if (!(typeof e.options.scrollRestoration == "function" && !e.options.scrollRestoration({ location: e.latestLocation }))) {
920
- $e = !0;
902
+ ot = !0;
921
903
  try {
922
904
  let t = e.isScrollRestoring ? n.state[a] : void 0, r = !1;
923
905
  if (t) for (let e in t) {
924
906
  let n = t[e];
925
- if (!D(n)) continue;
907
+ if (!O(n)) continue;
926
908
  let { scrollX: i, scrollY: a } = n;
927
909
  if (!(!Number.isFinite(i) || !Number.isFinite(a))) {
928
- if (e === et) window.scrollTo({
910
+ if (e === st) window.scrollTo({
929
911
  top: a,
930
912
  left: i,
931
913
  behavior: o
@@ -956,14 +938,14 @@ function nt(e, t) {
956
938
  behavior: o
957
939
  };
958
940
  if (window.scrollTo(e), s) for (let t of s) {
959
- if (t === et) continue;
941
+ if (t === st) continue;
960
942
  let n = typeof t == "function" ? t() : document.querySelector(t);
961
943
  n && n.scrollTo(e);
962
944
  }
963
945
  }
964
946
  }
965
947
  } finally {
966
- $e = !1;
948
+ ot = !1;
967
949
  }
968
950
  e.isScrollRestoring && n.set((e) => (e[a] ||= {}, e));
969
951
  }
@@ -971,7 +953,7 @@ function nt(e, t) {
971
953
  }
972
954
  //#endregion
973
955
  //#region ../router-core/dist/esm/qss.js
974
- function rt(e, t = String) {
956
+ function ut(e, t = String) {
975
957
  let n = new URLSearchParams();
976
958
  for (let r in e) {
977
959
  let i = e[r];
@@ -979,24 +961,24 @@ function rt(e, t = String) {
979
961
  }
980
962
  return n.toString();
981
963
  }
982
- function it(e) {
964
+ function dt(e) {
983
965
  return e ? e === "false" ? !1 : e === "true" ? !0 : e * 0 == 0 && +e + "" === e ? +e : e : "";
984
966
  }
985
- function at(e) {
967
+ function ft(e) {
986
968
  let t = new URLSearchParams(e), n = Object.create(null);
987
969
  for (let [e, r] of t.entries()) {
988
970
  let t = n[e];
989
- t == null ? n[e] = it(r) : Array.isArray(t) ? t.push(it(r)) : n[e] = [t, it(r)];
971
+ t == null ? n[e] = dt(r) : Array.isArray(t) ? t.push(dt(r)) : n[e] = [t, dt(r)];
990
972
  }
991
973
  return n;
992
974
  }
993
975
  //#endregion
994
976
  //#region ../router-core/dist/esm/searchParams.js
995
- var ot = ct(JSON.parse), st = lt(JSON.stringify, JSON.parse);
996
- function ct(e) {
977
+ var pt = ht(JSON.parse), mt = gt(JSON.stringify, JSON.parse);
978
+ function ht(e) {
997
979
  return (t) => {
998
980
  t[0] === "?" && (t = t.substring(1));
999
- let n = at(t);
981
+ let n = ft(t);
1000
982
  for (let t in n) {
1001
983
  let r = n[t];
1002
984
  if (typeof r == "string") try {
@@ -1006,7 +988,7 @@ function ct(e) {
1006
988
  return n;
1007
989
  };
1008
990
  }
1009
- function lt(e, t) {
991
+ function gt(e, t) {
1010
992
  let n = typeof t == "function";
1011
993
  function r(r) {
1012
994
  if (typeof r == "object" && r) try {
@@ -1018,16 +1000,16 @@ function lt(e, t) {
1018
1000
  return r;
1019
1001
  }
1020
1002
  return (e) => {
1021
- let t = rt(e, r);
1003
+ let t = ut(e, r);
1022
1004
  return t ? `?${t}` : "";
1023
1005
  };
1024
1006
  }
1025
1007
  //#endregion
1026
1008
  //#region ../router-core/dist/esm/root.js
1027
- var R = "__root__";
1009
+ var L = "__root__";
1028
1010
  //#endregion
1029
1011
  //#region ../router-core/dist/esm/redirect.js
1030
- function ut(e) {
1012
+ function _t(e) {
1031
1013
  if (e.statusCode = e.statusCode || e.code || 307, !e._builtLocation && !e.reloadDocument && typeof e.href == "string") try {
1032
1014
  new URL(e.href), e.reloadDocument = !0;
1033
1015
  } catch {}
@@ -1040,38 +1022,38 @@ function ut(e) {
1040
1022
  if (n.options = e, e.throw) throw n;
1041
1023
  return n;
1042
1024
  }
1043
- function z(e) {
1025
+ function R(e) {
1044
1026
  return e instanceof Response && !!e.options;
1045
1027
  }
1046
1028
  //#endregion
1047
1029
  //#region ../router-core/dist/esm/rewrite.js
1048
- function dt(e) {
1030
+ function vt(e) {
1049
1031
  return {
1050
1032
  input: ({ url: t }) => {
1051
- for (let n of e) t = pt(n, t);
1033
+ for (let n of e) t = bt(n, t);
1052
1034
  return t;
1053
1035
  },
1054
1036
  output: ({ url: t }) => {
1055
- for (let n = e.length - 1; n >= 0; n--) t = mt(e[n], t);
1037
+ for (let n = e.length - 1; n >= 0; n--) t = xt(e[n], t);
1056
1038
  return t;
1057
1039
  }
1058
1040
  };
1059
1041
  }
1060
- function ft(e) {
1061
- let t = Re(e.basepath), n = `/${t}`, r = `${n}/`, i = e.caseSensitive ? n : n.toLowerCase(), a = e.caseSensitive ? r : r.toLowerCase();
1042
+ function yt(e) {
1043
+ let t = Ge(e.basepath), n = `/${t}`, r = `${n}/`, i = e.caseSensitive ? n : n.toLowerCase(), a = e.caseSensitive ? r : r.toLowerCase();
1062
1044
  return {
1063
1045
  input: ({ url: t }) => {
1064
1046
  let r = e.caseSensitive ? t.pathname : t.pathname.toLowerCase();
1065
1047
  return r === i ? t.pathname = "/" : r.startsWith(a) && (t.pathname = t.pathname.slice(n.length)), t;
1066
1048
  },
1067
- output: ({ url: e }) => (e.pathname = Fe([
1049
+ output: ({ url: e }) => (e.pathname = He([
1068
1050
  "/",
1069
1051
  t,
1070
1052
  e.pathname
1071
1053
  ]), e)
1072
1054
  };
1073
1055
  }
1074
- function pt(e, t) {
1056
+ function bt(e, t) {
1075
1057
  let n = e?.input?.({ url: t });
1076
1058
  if (n) {
1077
1059
  if (typeof n == "string") return new URL(n);
@@ -1079,7 +1061,7 @@ function pt(e, t) {
1079
1061
  }
1080
1062
  return t;
1081
1063
  }
1082
- function mt(e, t) {
1064
+ function xt(e, t) {
1083
1065
  let n = e?.output?.({ url: t });
1084
1066
  if (n) {
1085
1067
  if (typeof n == "string") return new URL(n);
@@ -1087,33 +1069,33 @@ function mt(e, t) {
1087
1069
  }
1088
1070
  return t;
1089
1071
  }
1090
- function ht(e, t) {
1091
- let { createMutableStore: n, createReadonlyStore: r, batch: i, init: a } = t, o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = n(e.status), u = n(e.loadedAt), d = n(e.isLoading), f = n(e.isTransitioning), p = n(e.location), m = n(e.resolvedLocation), h = n(e.statusCode), g = n(e.redirect), _ = n([]), v = n([]), y = n([]), b = r(() => gt(o, _.state)), x = r(() => gt(s, v.state)), S = r(() => gt(c, y.state)), C = r(() => _.state[0]), w = r(() => _.state.some((e) => o.get(e)?.state.status === "pending")), ee = r(() => ({
1092
- locationHref: p.state.href,
1093
- resolvedLocationHref: m.state?.href,
1094
- status: l.state
1095
- })), te = r(() => ({
1096
- status: l.state,
1097
- loadedAt: u.state,
1098
- isLoading: d.state,
1099
- isTransitioning: f.state,
1100
- matches: b.state,
1101
- location: p.state,
1102
- resolvedLocation: m.state,
1103
- statusCode: h.state,
1104
- redirect: g.state
1105
- })), T = ge(64);
1106
- function E(e) {
1107
- let t = T.get(e);
1072
+ function St(e, t) {
1073
+ let { createMutableStore: n, createReadonlyStore: r, batch: i, init: a } = t, o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = n(e.status), u = n(e.loadedAt), d = n(e.isLoading), f = n(e.isTransitioning), p = n(e.location), m = n(e.resolvedLocation), h = n(e.statusCode), g = n(e.redirect), _ = n([]), v = n([]), y = n([]), b = r(() => Ct(o, _.get())), x = r(() => Ct(s, v.get())), S = r(() => Ct(c, y.get())), C = r(() => _.get()[0]), w = r(() => _.get().some((e) => o.get(e)?.get().status === "pending")), ee = r(() => ({
1074
+ locationHref: p.get().href,
1075
+ resolvedLocationHref: m.get()?.href,
1076
+ status: l.get()
1077
+ })), T = r(() => ({
1078
+ status: l.get(),
1079
+ loadedAt: u.get(),
1080
+ isLoading: d.get(),
1081
+ isTransitioning: f.get(),
1082
+ matches: b.get(),
1083
+ location: p.get(),
1084
+ resolvedLocation: m.get(),
1085
+ statusCode: h.get(),
1086
+ redirect: g.get()
1087
+ })), te = be(64);
1088
+ function ne(e) {
1089
+ let t = te.get(e);
1108
1090
  return t || (t = r(() => {
1109
- let t = _.state;
1091
+ let t = _.get();
1110
1092
  for (let n of t) {
1111
1093
  let t = o.get(n);
1112
- if (t && t.routeId === e) return t.state;
1094
+ if (t && t.routeId === e) return t.get();
1113
1095
  }
1114
- }), T.set(e, t)), t;
1096
+ }), te.set(e, t)), t;
1115
1097
  }
1116
- let ne = {
1098
+ let re = {
1117
1099
  status: l,
1118
1100
  loadedAt: u,
1119
1101
  isLoading: d,
@@ -1123,44 +1105,44 @@ function ht(e, t) {
1123
1105
  statusCode: h,
1124
1106
  redirect: g,
1125
1107
  matchesId: _,
1126
- pendingMatchesId: v,
1127
- cachedMatchesId: y,
1128
- activeMatchesSnapshot: b,
1129
- pendingMatchesSnapshot: x,
1130
- cachedMatchesSnapshot: S,
1131
- firstMatchId: C,
1132
- hasPendingMatches: w,
1133
- matchRouteReactivity: ee,
1134
- activeMatchStoresById: o,
1135
- pendingMatchStoresById: s,
1136
- cachedMatchStoresById: c,
1137
- __store: te,
1138
- getMatchStoreByRouteId: E,
1139
- setActiveMatches: D,
1140
- setPendingMatches: re,
1141
- setCachedMatches: ie
1108
+ pendingIds: v,
1109
+ cachedIds: y,
1110
+ matches: b,
1111
+ pendingMatches: x,
1112
+ cachedMatches: S,
1113
+ firstId: C,
1114
+ hasPending: w,
1115
+ matchRouteDeps: ee,
1116
+ matchStores: o,
1117
+ pendingMatchStores: s,
1118
+ cachedMatchStores: c,
1119
+ __store: T,
1120
+ getRouteMatchStore: ne,
1121
+ setMatches: ie,
1122
+ setPending: E,
1123
+ setCached: D
1142
1124
  };
1143
- D(e.matches), a?.(ne);
1144
- function D(e) {
1145
- _t(e, o, _, n, i);
1125
+ ie(e.matches), a?.(re);
1126
+ function ie(e) {
1127
+ wt(e, o, _, n, i);
1146
1128
  }
1147
- function re(e) {
1148
- _t(e, s, v, n, i);
1129
+ function E(e) {
1130
+ wt(e, s, v, n, i);
1149
1131
  }
1150
- function ie(e) {
1151
- _t(e, c, y, n, i);
1132
+ function D(e) {
1133
+ wt(e, c, y, n, i);
1152
1134
  }
1153
- return ne;
1135
+ return re;
1154
1136
  }
1155
- function gt(e, t) {
1137
+ function Ct(e, t) {
1156
1138
  let n = [];
1157
1139
  for (let r of t) {
1158
1140
  let t = e.get(r);
1159
- t && n.push(t.state);
1141
+ t && n.push(t.get());
1160
1142
  }
1161
1143
  return n;
1162
1144
  }
1163
- function _t(e, t, n, r, i) {
1145
+ function wt(e, t, n, r, i) {
1164
1146
  let a = e.map((e) => e.id), o = new Set(a);
1165
1147
  i(() => {
1166
1148
  for (let e of t.keys()) o.has(e) || t.delete(e);
@@ -1171,16 +1153,16 @@ function _t(e, t, n, r, i) {
1171
1153
  e.routeId = n.routeId, t.set(n.id, e);
1172
1154
  continue;
1173
1155
  }
1174
- e.routeId = n.routeId, e.state !== n && e.setState(() => n);
1156
+ e.routeId = n.routeId, e.get() !== n && e.set(n);
1175
1157
  }
1176
- me(n.state, a) || n.setState(() => a);
1158
+ ve(n.get(), a) || n.set(a);
1177
1159
  });
1178
1160
  }
1179
1161
  //#endregion
1180
1162
  //#region ../router-core/dist/esm/load-matches.js
1181
- var vt = (e) => {
1163
+ var Tt = (e) => {
1182
1164
  if (!e.rendered) return e.rendered = !0, e.onReady?.();
1183
- }, yt = (e) => e.stores.matchesId.state.some((t) => e.stores.activeMatchStoresById.get(t)?.state._forcePending), bt = (e, t) => !!(e.preload && !e.router.stores.activeMatchStoresById.has(t)), B = (e, t, n = !0) => {
1165
+ }, Et = (e) => e.stores.matchesId.get().some((t) => e.stores.matchStores.get(t)?.get()._forcePending), Dt = (e, t) => !!(e.preload && !e.router.stores.matchStores.has(t)), z = (e, t, n = !0) => {
1184
1166
  let r = { ...e.router.options.context ?? {} }, i = n ? t : t - 1;
1185
1167
  for (let t = 0; t <= i; t++) {
1186
1168
  let n = e.matches[t];
@@ -1189,7 +1171,7 @@ var vt = (e) => {
1189
1171
  i && Object.assign(r, i.__routeContext, i.__beforeLoadContext);
1190
1172
  }
1191
1173
  return r;
1192
- }, xt = (e, t) => {
1174
+ }, Ot = (e, t) => {
1193
1175
  if (!e.matches.length) return;
1194
1176
  let n = t.routeId, r = e.matches.findIndex((t) => t.routeId === e.router.routeTree.id), i = r >= 0 ? r : 0, a = n ? e.matches.findIndex((e) => e.routeId === n) : e.firstBadMatchIndex ?? e.matches.length - 1;
1195
1177
  a < 0 && (a = i);
@@ -1198,31 +1180,31 @@ var vt = (e) => {
1198
1180
  if (e.router.looseRoutesById[n.routeId].options.notFoundComponent) return t;
1199
1181
  }
1200
1182
  return n ? a : i;
1201
- }, V = (e, t, n) => {
1202
- if (!(!z(n) && !L(n))) throw z(n) && n.redirectHandled && !n.options.reloadDocument ? n : (t && (t._nonReactive.beforeLoadPromise?.resolve(), t._nonReactive.loaderPromise?.resolve(), t._nonReactive.beforeLoadPromise = void 0, t._nonReactive.loaderPromise = void 0, t._nonReactive.error = n, e.updateMatch(t.id, (r) => ({
1183
+ }, B = (e, t, n) => {
1184
+ if (!(!R(n) && !I(n))) throw R(n) && n.redirectHandled && !n.options.reloadDocument ? n : (t && (t._nonReactive.beforeLoadPromise?.resolve(), t._nonReactive.loaderPromise?.resolve(), t._nonReactive.beforeLoadPromise = void 0, t._nonReactive.loaderPromise = void 0, t._nonReactive.error = n, e.updateMatch(t.id, (r) => ({
1203
1185
  ...r,
1204
- status: z(n) ? "redirected" : r.status === "pending" ? "success" : r.status,
1205
- context: B(e, t.index),
1186
+ status: R(n) ? "redirected" : I(n) ? "notFound" : r.status === "pending" ? "success" : r.status,
1187
+ context: z(e, t.index),
1206
1188
  isFetching: !1,
1207
1189
  error: n
1208
- })), L(n) && !n.routeId && (n.routeId = t.routeId), t._nonReactive.loadPromise?.resolve()), z(n) && (e.rendered = !0, n.options._fromLocation = e.location, n.redirectHandled = !0, n = e.router.resolveRedirect(n)), n);
1209
- }, St = (e, t) => {
1190
+ })), I(n) && !n.routeId && (n.routeId = t.routeId), t._nonReactive.loadPromise?.resolve()), R(n) && (e.rendered = !0, n.options._fromLocation = e.location, n.redirectHandled = !0, n = e.router.resolveRedirect(n)), n);
1191
+ }, kt = (e, t) => {
1210
1192
  let n = e.router.getMatch(t);
1211
1193
  return !!(!n || n._nonReactive.dehydrated);
1212
- }, Ct = (e, t, n) => {
1213
- let r = B(e, n);
1194
+ }, At = (e, t, n) => {
1195
+ let r = z(e, n);
1214
1196
  e.updateMatch(t, (e) => ({
1215
1197
  ...e,
1216
1198
  context: r
1217
1199
  }));
1218
- }, H = (e, t, n, r) => {
1200
+ }, V = (e, t, n, r) => {
1219
1201
  let { id: i, routeId: a } = e.matches[t], o = e.router.looseRoutesById[a];
1220
1202
  if (n instanceof Promise) throw n;
1221
- n.routerCode = r, e.firstBadMatchIndex ??= t, V(e, e.router.getMatch(i), n);
1203
+ n.routerCode = r, e.firstBadMatchIndex ??= t, B(e, e.router.getMatch(i), n);
1222
1204
  try {
1223
1205
  o.options.onError?.(n);
1224
1206
  } catch (t) {
1225
- n = t, V(e, e.router.getMatch(i), n);
1207
+ n = t, B(e, e.router.getMatch(i), n);
1226
1208
  }
1227
1209
  e.updateMatch(i, (e) => (e._nonReactive.beforeLoadPromise?.resolve(), e._nonReactive.beforeLoadPromise = void 0, e._nonReactive.loadPromise?.resolve(), {
1228
1210
  ...e,
@@ -1231,32 +1213,32 @@ var vt = (e) => {
1231
1213
  isFetching: !1,
1232
1214
  updatedAt: Date.now(),
1233
1215
  abortController: new AbortController()
1234
- })), !e.preload && !z(n) && !L(n) && (e.serialError ??= n);
1235
- }, wt = (e, t, n, r) => {
1216
+ })), !e.preload && !R(n) && !I(n) && (e.serialError ??= n);
1217
+ }, jt = (e, t, n, r) => {
1236
1218
  if (r._nonReactive.pendingTimeout !== void 0) return;
1237
1219
  let i = n.options.pendingMs ?? e.router.options.defaultPendingMs;
1238
- if (e.onReady && !bt(e, t) && (n.options.loader || n.options.beforeLoad || Pt(n)) && typeof i == "number" && i !== Infinity && (n.options.pendingComponent ?? e.router.options?.defaultPendingComponent)) {
1220
+ if (e.onReady && !Dt(e, t) && (n.options.loader || n.options.beforeLoad || Vt(n)) && typeof i == "number" && i !== Infinity && (n.options.pendingComponent ?? e.router.options?.defaultPendingComponent)) {
1239
1221
  let t = setTimeout(() => {
1240
- vt(e);
1222
+ Tt(e);
1241
1223
  }, i);
1242
1224
  r._nonReactive.pendingTimeout = t;
1243
1225
  }
1244
- }, Tt = (e, t, n) => {
1226
+ }, Mt = (e, t, n) => {
1245
1227
  let r = e.router.getMatch(t);
1246
1228
  if (!r._nonReactive.beforeLoadPromise && !r._nonReactive.loaderPromise) return;
1247
- wt(e, t, n, r);
1229
+ jt(e, t, n, r);
1248
1230
  let i = () => {
1249
1231
  let n = e.router.getMatch(t);
1250
- n.preload && (n.status === "redirected" || n.status === "notFound") && V(e, n, n.error);
1232
+ n.preload && (n.status === "redirected" || n.status === "notFound") && B(e, n, n.error);
1251
1233
  };
1252
1234
  return r._nonReactive.beforeLoadPromise ? r._nonReactive.beforeLoadPromise.then(i) : i();
1253
- }, Et = (e, t, n, r) => {
1235
+ }, Nt = (e, t, n, r) => {
1254
1236
  let i = e.router.getMatch(t), a = i._nonReactive.loadPromise;
1255
- i._nonReactive.loadPromise = k(() => {
1237
+ i._nonReactive.loadPromise = A(() => {
1256
1238
  a?.resolve(), a = void 0;
1257
1239
  });
1258
1240
  let { paramsError: o, searchError: s } = i;
1259
- o && H(e, n, o, "PARSE_PARAMS"), s && H(e, n, s, "VALIDATE_SEARCH"), wt(e, t, r, i);
1241
+ o && V(e, n, o, "PARSE_PARAMS"), s && V(e, n, s, "VALIDATE_SEARCH"), jt(e, t, r, i);
1260
1242
  let c = new AbortController(), l = !1, u = () => {
1261
1243
  l || (l = !0, e.updateMatch(t, (e) => ({
1262
1244
  ...e,
@@ -1276,11 +1258,11 @@ var vt = (e) => {
1276
1258
  });
1277
1259
  return;
1278
1260
  }
1279
- i._nonReactive.beforeLoadPromise = k();
1261
+ i._nonReactive.beforeLoadPromise = A();
1280
1262
  let f = {
1281
- ...B(e, n, !1),
1263
+ ...z(e, n, !1),
1282
1264
  ...i.__routeContext
1283
- }, { search: p, params: m, cause: h } = i, g = bt(e, t), _ = {
1265
+ }, { search: p, params: m, cause: h } = i, g = Dt(e, t), _ = {
1284
1266
  search: p,
1285
1267
  abortController: c,
1286
1268
  params: m,
@@ -1303,7 +1285,7 @@ var vt = (e) => {
1303
1285
  });
1304
1286
  return;
1305
1287
  }
1306
- (z(r) || L(r)) && (u(), H(e, n, r, "BEFORE_LOAD")), e.router.batch(() => {
1288
+ (R(r) || I(r)) && (u(), V(e, n, r, "BEFORE_LOAD")), e.router.batch(() => {
1307
1289
  u(), e.updateMatch(t, (e) => ({
1308
1290
  ...e,
1309
1291
  __beforeLoadContext: r
@@ -1311,21 +1293,21 @@ var vt = (e) => {
1311
1293
  });
1312
1294
  }, y;
1313
1295
  try {
1314
- if (y = r.options.beforeLoad(_), A(y)) return u(), y.catch((t) => {
1315
- H(e, n, t, "BEFORE_LOAD");
1296
+ if (y = r.options.beforeLoad(_), j(y)) return u(), y.catch((t) => {
1297
+ V(e, n, t, "BEFORE_LOAD");
1316
1298
  }).then(v);
1317
1299
  } catch (t) {
1318
- u(), H(e, n, t, "BEFORE_LOAD");
1300
+ u(), V(e, n, t, "BEFORE_LOAD");
1319
1301
  }
1320
1302
  v(y);
1321
- }, Dt = (e, t) => {
1322
- let { id: n, routeId: r } = e.matches[t], i = e.router.looseRoutesById[r], a = () => s(), o = () => Et(e, n, t, i), s = () => {
1323
- if (St(e, n)) return;
1324
- let t = Tt(e, n, i);
1325
- return A(t) ? t.then(o) : o();
1303
+ }, Pt = (e, t) => {
1304
+ let { id: n, routeId: r } = e.matches[t], i = e.router.looseRoutesById[r], a = () => s(), o = () => Nt(e, n, t, i), s = () => {
1305
+ if (kt(e, n)) return;
1306
+ let t = Mt(e, n, i);
1307
+ return j(t) ? t.then(o) : o();
1326
1308
  };
1327
1309
  return a();
1328
- }, Ot = (e, t, n) => {
1310
+ }, Ft = (e, t, n) => {
1329
1311
  let r = e.router.getMatch(t);
1330
1312
  if (!r || !n.options.head && !n.options.scripts && !n.options.headers) return;
1331
1313
  let i = {
@@ -1347,8 +1329,8 @@ var vt = (e) => {
1347
1329
  scripts: t,
1348
1330
  styles: e?.styles
1349
1331
  }));
1350
- }, kt = (e, t, n, r, i) => {
1351
- let a = t[r - 1], { params: o, loaderDeps: s, abortController: c, cause: l } = e.router.getMatch(n), u = B(e, r), d = bt(e, n);
1332
+ }, It = (e, t, n, r, i) => {
1333
+ let a = t[r - 1], { params: o, loaderDeps: s, abortController: c, cause: l } = e.router.getMatch(n), u = z(e, r), d = Dt(e, n);
1352
1334
  return {
1353
1335
  params: o,
1354
1336
  deps: s,
@@ -1365,18 +1347,18 @@ var vt = (e) => {
1365
1347
  route: i,
1366
1348
  ...e.router.options.additionalContext
1367
1349
  };
1368
- }, At = async (e, t, n, r, i) => {
1350
+ }, Lt = async (e, t, n, r, i) => {
1369
1351
  try {
1370
1352
  let a = e.router.getMatch(n);
1371
1353
  try {
1372
- U(i);
1373
- let o = i.options.loader, s = typeof o == "function" ? o : o?.handler, c = s?.(kt(e, t, n, r, i)), l = !!s && A(c);
1354
+ H(i);
1355
+ let o = i.options.loader, s = typeof o == "function" ? o : o?.handler, c = s?.(It(e, t, n, r, i)), l = !!s && j(c);
1374
1356
  if ((l || i._lazyPromise || i._componentsPromise || i.options.head || i.options.scripts || i.options.headers || a._nonReactive.minPendingPromise) && e.updateMatch(n, (e) => ({
1375
1357
  ...e,
1376
1358
  isFetching: "loader"
1377
1359
  })), s) {
1378
1360
  let t = l ? await c : c;
1379
- V(e, e.router.getMatch(n), t), t !== void 0 && e.updateMatch(n, (e) => ({
1361
+ B(e, e.router.getMatch(n), t), t !== void 0 && e.updateMatch(n, (e) => ({
1380
1362
  ...e,
1381
1363
  loaderData: t
1382
1364
  }));
@@ -1386,7 +1368,7 @@ var vt = (e) => {
1386
1368
  u && await u, i._componentsPromise && await i._componentsPromise, e.updateMatch(n, (t) => ({
1387
1369
  ...t,
1388
1370
  error: void 0,
1389
- context: B(e, r),
1371
+ context: z(e, r),
1390
1372
  status: "success",
1391
1373
  isFetching: !1,
1392
1374
  updatedAt: Date.now()
@@ -1402,56 +1384,56 @@ var vt = (e) => {
1402
1384
  ...t,
1403
1385
  status: t.status === "pending" ? "success" : t.status,
1404
1386
  isFetching: !1,
1405
- context: B(e, r)
1387
+ context: z(e, r)
1406
1388
  }));
1407
1389
  return;
1408
1390
  }
1409
1391
  let s = a._nonReactive.minPendingPromise;
1410
- s && await s, L(t) && await i.options.notFoundComponent?.preload?.(), V(e, e.router.getMatch(n), t);
1392
+ s && await s, I(t) && await i.options.notFoundComponent?.preload?.(), B(e, e.router.getMatch(n), t);
1411
1393
  try {
1412
1394
  i.options.onError?.(t);
1413
1395
  } catch (t) {
1414
- o = t, V(e, e.router.getMatch(n), t);
1396
+ o = t, B(e, e.router.getMatch(n), t);
1415
1397
  }
1416
- !z(o) && !L(o) && await U(i, ["errorComponent"]), e.updateMatch(n, (t) => ({
1398
+ !R(o) && !I(o) && await H(i, ["errorComponent"]), e.updateMatch(n, (t) => ({
1417
1399
  ...t,
1418
1400
  error: o,
1419
- context: B(e, r),
1401
+ context: z(e, r),
1420
1402
  status: "error",
1421
1403
  isFetching: !1
1422
1404
  }));
1423
1405
  }
1424
1406
  } catch (t) {
1425
1407
  let r = e.router.getMatch(n);
1426
- r && (r._nonReactive.loaderPromise = void 0), V(e, r, t);
1408
+ r && (r._nonReactive.loaderPromise = void 0), B(e, r, t);
1427
1409
  }
1428
- }, jt = async (e, t, n) => {
1410
+ }, Rt = async (e, t, n) => {
1429
1411
  async function r(r, a, c, l, d) {
1430
- let f = Date.now() - a.updatedAt, p = r ? d.options.preloadStaleTime ?? e.router.options.defaultPreloadStaleTime ?? 3e4 : d.options.staleTime ?? e.router.options.defaultStaleTime ?? 0, m = d.options.shouldReload, h = typeof m == "function" ? m(kt(e, t, i, n, d)) : m, { status: g, invalid: _ } = l, v = f >= p && (!!e.forceStaleReload || l.cause === "enter" || c !== void 0 && c !== l.id);
1412
+ let f = Date.now() - a.updatedAt, p = r ? d.options.preloadStaleTime ?? e.router.options.defaultPreloadStaleTime ?? 3e4 : d.options.staleTime ?? e.router.options.defaultStaleTime ?? 0, m = d.options.shouldReload, h = typeof m == "function" ? m(It(e, t, i, n, d)) : m, { status: g, invalid: _ } = l, v = f >= p && (!!e.forceStaleReload || l.cause === "enter" || c !== void 0 && c !== l.id);
1431
1413
  o = g === "success" && (_ || (h ?? v)), r && d.options.preload === !1 || (o && !e.sync && u ? (s = !0, (async () => {
1432
1414
  try {
1433
- await At(e, t, i, n, d);
1415
+ await Lt(e, t, i, n, d);
1434
1416
  let r = e.router.getMatch(i);
1435
1417
  r._nonReactive.loaderPromise?.resolve(), r._nonReactive.loadPromise?.resolve(), r._nonReactive.loaderPromise = void 0, r._nonReactive.loadPromise = void 0;
1436
1418
  } catch (t) {
1437
- z(t) && await e.router.navigate(t.options);
1419
+ R(t) && await e.router.navigate(t.options);
1438
1420
  }
1439
- })()) : g !== "success" || o ? await At(e, t, i, n, d) : Ct(e, i, n));
1421
+ })()) : g !== "success" || o ? await Lt(e, t, i, n, d) : At(e, i, n));
1440
1422
  }
1441
1423
  let { id: i, routeId: a } = e.matches[n], o = !1, s = !1, c = e.router.looseRoutesById[a], l = c.options.loader, u = ((typeof l == "function" ? void 0 : l?.staleReloadMode) ?? e.router.options.defaultStaleReloadMode) !== "blocking";
1442
- if (St(e, i)) {
1424
+ if (kt(e, i)) {
1443
1425
  if (!e.router.getMatch(i)) return e.matches[n];
1444
- Ct(e, i, n);
1426
+ At(e, i, n);
1445
1427
  } else {
1446
- let t = e.router.getMatch(i), o = e.router.stores.matchesId.state[n], s = (o && e.router.stores.activeMatchStoresById.get(o) || null)?.routeId === a ? o : e.router.stores.activeMatchesSnapshot.state.find((e) => e.routeId === a)?.id, l = bt(e, i);
1428
+ let t = e.router.getMatch(i), o = e.router.stores.matchesId.get()[n], s = (o && e.router.stores.matchStores.get(o) || null)?.routeId === a ? o : e.router.stores.matches.get().find((e) => e.routeId === a)?.id, l = Dt(e, i);
1447
1429
  if (t._nonReactive.loaderPromise) {
1448
1430
  if (t.status === "success" && !e.sync && !t.preload && u) return t;
1449
1431
  await t._nonReactive.loaderPromise;
1450
1432
  let n = e.router.getMatch(i), a = n._nonReactive.error || n.error;
1451
- a && V(e, n, a), n.status === "pending" && await r(l, t, s, n, c);
1433
+ a && B(e, n, a), n.status === "pending" && await r(l, t, s, n, c);
1452
1434
  } else {
1453
- let n = l && !e.router.stores.activeMatchStoresById.has(i), a = e.router.getMatch(i);
1454
- a._nonReactive.loaderPromise = k(), n !== a.preload && e.updateMatch(i, (e) => ({
1435
+ let n = l && !e.router.stores.matchStores.has(i), a = e.router.getMatch(i);
1436
+ a._nonReactive.loaderPromise = A(), n !== a.preload && e.updateMatch(i, (e) => ({
1455
1437
  ...e,
1456
1438
  preload: n
1457
1439
  })), await r(l, t, s, a, c);
@@ -1466,24 +1448,24 @@ var vt = (e) => {
1466
1448
  invalid: !1
1467
1449
  })), e.router.getMatch(i)) : d;
1468
1450
  };
1469
- async function Mt(e) {
1451
+ async function zt(e) {
1470
1452
  let t = e, n = [];
1471
- yt(t.router) && vt(t);
1453
+ Et(t.router) && Tt(t);
1472
1454
  let r;
1473
1455
  for (let e = 0; e < t.matches.length; e++) {
1474
1456
  try {
1475
- let n = Dt(t, e);
1476
- A(n) && await n;
1457
+ let n = Pt(t, e);
1458
+ j(n) && await n;
1477
1459
  } catch (e) {
1478
- if (z(e)) throw e;
1479
- if (L(e)) r = e;
1460
+ if (R(e)) throw e;
1461
+ if (I(e)) r = e;
1480
1462
  else if (!t.preload) throw e;
1481
1463
  break;
1482
1464
  }
1483
1465
  if (t.serialError || t.firstBadMatchIndex != null) break;
1484
1466
  }
1485
- let i = t.firstBadMatchIndex ?? t.matches.length, a = r && !t.preload ? xt(t, r) : void 0, o = r && t.preload ? 0 : a === void 0 ? i : Math.min(a + 1, i), s, c;
1486
- for (let e = 0; e < o; e++) n.push(jt(t, n, e));
1467
+ let i = t.firstBadMatchIndex ?? t.matches.length, a = r && !t.preload ? Ot(t, r) : void 0, o = r && t.preload ? 0 : a === void 0 ? i : Math.min(a + 1, i), s, c;
1468
+ for (let e = 0; e < o; e++) n.push(Rt(t, n, e));
1487
1469
  try {
1488
1470
  await Promise.all(n);
1489
1471
  } catch {
@@ -1491,18 +1473,18 @@ async function Mt(e) {
1491
1473
  for (let t of e) {
1492
1474
  if (t.status !== "rejected") continue;
1493
1475
  let e = t.reason;
1494
- if (z(e)) throw e;
1495
- L(e) ? s ??= e : c ??= e;
1476
+ if (R(e)) throw e;
1477
+ I(e) ? s ??= e : c ??= e;
1496
1478
  }
1497
1479
  if (c !== void 0) throw c;
1498
1480
  }
1499
1481
  let l = s ?? (r && !t.preload ? r : void 0), u = t.firstBadMatchIndex === void 0 ? t.matches.length - 1 : t.firstBadMatchIndex;
1500
1482
  if (!l && r && t.preload) return t.matches;
1501
1483
  if (l) {
1502
- let e = xt(t, l);
1484
+ let e = Ot(t, l);
1503
1485
  if (e === void 0) {
1504
1486
  if (process.env.NODE_ENV !== "production") throw Error("Invariant failed: Could not find match for notFound boundary");
1505
- he();
1487
+ ye();
1506
1488
  }
1507
1489
  let n = t.matches[e], r = t.router.looseRoutesById[n.routeId], i = t.router.options?.defaultNotFoundComponent;
1508
1490
  !r.options.notFoundComponent && i && (r.options.notFoundComponent = i), l.routeId = n.routeId;
@@ -1518,7 +1500,7 @@ async function Mt(e) {
1518
1500
  error: l
1519
1501
  },
1520
1502
  isFetching: !1
1521
- })), u = e, await U(r, ["notFoundComponent"]);
1503
+ })), u = e, await H(r, ["notFoundComponent"]);
1522
1504
  } else if (!t.preload) {
1523
1505
  let e = t.matches[0];
1524
1506
  e.globalNotFound || t.router.getMatch(e.id)?.globalNotFound && t.updateMatch(e.id, (e) => ({
@@ -1529,12 +1511,12 @@ async function Mt(e) {
1529
1511
  }
1530
1512
  if (t.serialError && t.firstBadMatchIndex !== void 0) {
1531
1513
  let e = t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];
1532
- await U(e, ["errorComponent"]);
1514
+ await H(e, ["errorComponent"]);
1533
1515
  }
1534
1516
  for (let e = 0; e <= u; e++) {
1535
1517
  let { id: n, routeId: r } = t.matches[e], i = t.router.looseRoutesById[r];
1536
1518
  try {
1537
- let e = Ot(t, n, i);
1519
+ let e = Ft(t, n, i);
1538
1520
  if (e) {
1539
1521
  let r = await e;
1540
1522
  t.updateMatch(n, (e) => ({
@@ -1546,42 +1528,42 @@ async function Mt(e) {
1546
1528
  console.error(`Error executing head for route ${r}:`, e);
1547
1529
  }
1548
1530
  }
1549
- let d = vt(t);
1550
- if (A(d) && await d, l) throw l;
1531
+ let d = Tt(t);
1532
+ if (j(d) && await d, l) throw l;
1551
1533
  if (t.serialError && !t.preload && !t.onReady) throw t.serialError;
1552
1534
  return t.matches;
1553
1535
  }
1554
- function Nt(e, t) {
1536
+ function Bt(e, t) {
1555
1537
  let n = t.map((t) => e.options[t]?.preload?.()).filter(Boolean);
1556
1538
  if (n.length !== 0) return Promise.all(n);
1557
1539
  }
1558
- function U(e, t = Ft) {
1540
+ function H(e, t = Ht) {
1559
1541
  !e._lazyLoaded && e._lazyPromise === void 0 && (e.lazyFn ? e._lazyPromise = e.lazyFn().then((t) => {
1560
1542
  let { id: n, ...r } = t.options;
1561
1543
  Object.assign(e.options, r), e._lazyLoaded = !0, e._lazyPromise = void 0;
1562
1544
  }) : e._lazyLoaded = !0);
1563
- let n = () => e._componentsLoaded ? void 0 : t === Ft ? (() => {
1545
+ let n = () => e._componentsLoaded ? void 0 : t === Ht ? (() => {
1564
1546
  if (e._componentsPromise === void 0) {
1565
- let t = Nt(e, Ft);
1547
+ let t = Bt(e, Ht);
1566
1548
  t ? e._componentsPromise = t.then(() => {
1567
1549
  e._componentsLoaded = !0, e._componentsPromise = void 0;
1568
1550
  }) : e._componentsLoaded = !0;
1569
1551
  }
1570
1552
  return e._componentsPromise;
1571
- })() : Nt(e, t);
1553
+ })() : Bt(e, t);
1572
1554
  return e._lazyPromise ? e._lazyPromise.then(n) : n();
1573
1555
  }
1574
- function Pt(e) {
1575
- for (let t of Ft) if (e.options[t]?.preload) return !0;
1556
+ function Vt(e) {
1557
+ for (let t of Ht) if (e.options[t]?.preload) return !0;
1576
1558
  return !1;
1577
1559
  }
1578
- var Ft = [
1560
+ var Ht = [
1579
1561
  "component",
1580
1562
  "errorComponent",
1581
1563
  "pendingComponent",
1582
1564
  "notFoundComponent"
1583
- ], W = "__TSR_index", It = "popstate", Lt = "beforeunload";
1584
- function Rt(e) {
1565
+ ], U = "__TSR_index", Ut = "popstate", Wt = "beforeunload";
1566
+ function Gt(e) {
1585
1567
  let t = e.getLocation(), n = /* @__PURE__ */ new Set(), r = (r) => {
1586
1568
  t = e.getLocation(), n.forEach((e) => e({
1587
1569
  location: t,
@@ -1596,7 +1578,7 @@ function Rt(e) {
1596
1578
  }
1597
1579
  let a = e.getBlockers?.() ?? [], o = i.type === "PUSH" || i.type === "REPLACE";
1598
1580
  if (typeof document < "u" && a.length && o) for (let n of a) {
1599
- let r = G(i.path, i.state);
1581
+ let r = W(i.path, i.state);
1600
1582
  if (await n.blockerFn({
1601
1583
  currentLocation: t,
1602
1584
  nextLocation: r,
@@ -1620,8 +1602,8 @@ function Rt(e) {
1620
1602
  n.delete(e);
1621
1603
  }),
1622
1604
  push: (n, i, o) => {
1623
- let s = t.state[W];
1624
- i = zt(s + 1, i), a({
1605
+ let s = t.state[U];
1606
+ i = Kt(s + 1, i), a({
1625
1607
  task: () => {
1626
1608
  e.pushState(n, i), r({ type: "PUSH" });
1627
1609
  },
@@ -1632,8 +1614,8 @@ function Rt(e) {
1632
1614
  });
1633
1615
  },
1634
1616
  replace: (n, i, o) => {
1635
- let s = t.state[W];
1636
- i = zt(s, i), a({
1617
+ let s = t.state[U];
1618
+ i = Kt(s, i), a({
1637
1619
  task: () => {
1638
1620
  e.replaceState(n, i), r({ type: "REPLACE" });
1639
1621
  },
@@ -1673,7 +1655,7 @@ function Rt(e) {
1673
1655
  type: "FORWARD"
1674
1656
  });
1675
1657
  },
1676
- canGoBack: () => t.state[W] !== 0,
1658
+ canGoBack: () => t.state[U] !== 0,
1677
1659
  createHref: (t) => e.createHref(t),
1678
1660
  block: (t) => {
1679
1661
  if (!e.setBlockers) return () => {};
@@ -1688,22 +1670,22 @@ function Rt(e) {
1688
1670
  notify: r
1689
1671
  };
1690
1672
  }
1691
- function zt(e, t) {
1673
+ function Kt(e, t) {
1692
1674
  t ||= {};
1693
- let n = Wt();
1675
+ let n = Zt();
1694
1676
  return {
1695
1677
  ...t,
1696
1678
  key: n,
1697
1679
  __TSR_key: n,
1698
- [W]: e
1680
+ [U]: e
1699
1681
  };
1700
1682
  }
1701
- function Bt(e) {
1702
- let t = e?.window ?? (typeof window < "u" ? window : void 0), n = t.history.pushState, r = t.history.replaceState, i = [], a = () => i, o = (e) => i = e, s = e?.createHref ?? ((e) => e), c = e?.parseLocation ?? (() => G(`${t.location.pathname}${t.location.search}${t.location.hash}`, t.history.state));
1683
+ function qt(e) {
1684
+ let t = e?.window ?? (typeof window < "u" ? window : void 0), n = t.history.pushState, r = t.history.replaceState, i = [], a = () => i, o = (e) => i = e, s = e?.createHref ?? ((e) => e), c = e?.parseLocation ?? (() => W(`${t.location.pathname}${t.location.search}${t.location.hash}`, t.history.state));
1703
1685
  if (!t.history.state?.__TSR_key && !t.history.state?.key) {
1704
- let e = Wt();
1686
+ let e = Zt();
1705
1687
  t.history.replaceState({
1706
- [W]: 0,
1688
+ [U]: 0,
1707
1689
  key: e,
1708
1690
  __TSR_key: e
1709
1691
  }, "");
@@ -1712,7 +1694,7 @@ function Bt(e) {
1712
1694
  g && (C._ignoreSubscribers = !0, (g.isPush ? t.history.pushState : t.history.replaceState)(g.state, "", g.href), C._ignoreSubscribers = !1, g = void 0, _ = void 0, u = void 0);
1713
1695
  }, y = (e, t, n) => {
1714
1696
  let r = s(t);
1715
- _ || (u = l), l = G(t, n), g = {
1697
+ _ || (u = l), l = W(t, n), g = {
1716
1698
  href: r,
1717
1699
  state: n,
1718
1700
  isPush: g?.isPush || e === "push"
@@ -1724,7 +1706,7 @@ function Bt(e) {
1724
1706
  f = !1;
1725
1707
  return;
1726
1708
  }
1727
- let e = c(), n = e.state[W] - l.state[W], r = n === 1, i = n === -1, o = !r && !i || d;
1709
+ let e = c(), n = e.state[U] - l.state[U], r = n === 1, i = n === -1, o = !r && !i || d;
1728
1710
  d = !1;
1729
1711
  let s = o ? "GO" : i ? "BACK" : "FORWARD", u = o ? {
1730
1712
  type: "GO",
@@ -1763,7 +1745,7 @@ function Bt(e) {
1763
1745
  }
1764
1746
  }
1765
1747
  if (t) return e.preventDefault(), e.returnValue = "";
1766
- }, C = Rt({
1748
+ }, C = Gt({
1767
1749
  getLocation: h,
1768
1750
  getLength: () => t.history.length,
1769
1751
  pushState: (e, t) => y("push", e, t),
@@ -1778,7 +1760,7 @@ function Bt(e) {
1778
1760
  createHref: (e) => s(e),
1779
1761
  flush: v,
1780
1762
  destroy: () => {
1781
- t.history.pushState = n, t.history.replaceState = r, t.removeEventListener(Lt, S, { capture: !0 }), t.removeEventListener(It, x);
1763
+ t.history.pushState = n, t.history.replaceState = r, t.removeEventListener(Wt, S, { capture: !0 }), t.removeEventListener(Ut, x);
1782
1764
  },
1783
1765
  onBlocked: () => {
1784
1766
  u && l !== u && (l = u);
@@ -1787,7 +1769,7 @@ function Bt(e) {
1787
1769
  setBlockers: o,
1788
1770
  notifyOnIndexChange: !1
1789
1771
  });
1790
- return t.addEventListener(Lt, S, { capture: !0 }), t.addEventListener(It, x), t.history.pushState = function(...e) {
1772
+ return t.addEventListener(Wt, S, { capture: !0 }), t.addEventListener(Ut, x), t.history.pushState = function(...e) {
1791
1773
  let r = n.apply(t.history, e);
1792
1774
  return C._ignoreSubscribers || b("PUSH"), r;
1793
1775
  }, t.history.replaceState = function(...e) {
@@ -1795,20 +1777,20 @@ function Bt(e) {
1795
1777
  return C._ignoreSubscribers || b("REPLACE"), n;
1796
1778
  }, C;
1797
1779
  }
1798
- function Vt(e) {
1780
+ function Jt(e) {
1799
1781
  let t = e?.window ?? (typeof window < "u" ? window : void 0);
1800
- return Bt({
1782
+ return qt({
1801
1783
  window: t,
1802
1784
  parseLocation: () => {
1803
1785
  let e = t.location.hash.split("#").slice(1), n = e[0] ?? "/", r = t.location.search, i = e.slice(1);
1804
- return G(`${n}${r}${i.length === 0 ? "" : `#${i.join("#")}`}`, t.history.state);
1786
+ return W(`${n}${r}${i.length === 0 ? "" : `#${i.join("#")}`}`, t.history.state);
1805
1787
  },
1806
1788
  createHref: (e) => `${t.location.pathname}${t.location.search}#${e}`
1807
1789
  });
1808
1790
  }
1809
- function Ht(e = { initialEntries: ["/"] }) {
1810
- let t = e.initialEntries, n = e.initialIndex ? Math.min(Math.max(e.initialIndex, 0), t.length - 1) : t.length - 1, r = t.map((e, t) => zt(t, void 0)), i = () => G(t[n], r[n]), a = [];
1811
- return Rt({
1791
+ function Yt(e = { initialEntries: ["/"] }) {
1792
+ let t = e.initialEntries, n = e.initialIndex ? Math.min(Math.max(e.initialIndex, 0), t.length - 1) : t.length - 1, r = t.map((e, t) => Kt(t, void 0)), i = () => W(t[n], r[n]), a = [];
1793
+ return Gt({
1812
1794
  getLocation: i,
1813
1795
  getLength: () => t.length,
1814
1796
  pushState: (e, i) => {
@@ -1831,30 +1813,30 @@ function Ht(e = { initialEntries: ["/"] }) {
1831
1813
  setBlockers: (e) => a = e
1832
1814
  });
1833
1815
  }
1834
- function Ut(e) {
1816
+ function Xt(e) {
1835
1817
  let t = e.replace(/[\x00-\x1f\x7f]/g, "");
1836
1818
  return t.startsWith("//") && (t = "/" + t.replace(/^\/+/, "")), t;
1837
1819
  }
1838
- function G(e, t) {
1839
- let n = Ut(e), r = n.indexOf("#"), i = n.indexOf("?"), a = Wt();
1820
+ function W(e, t) {
1821
+ let n = Xt(e), r = n.indexOf("#"), i = n.indexOf("?"), a = Zt();
1840
1822
  return {
1841
1823
  href: n,
1842
1824
  pathname: n.substring(0, r > 0 ? i > 0 ? Math.min(r, i) : r : i > 0 ? i : n.length),
1843
1825
  hash: r > -1 ? n.substring(r) : "",
1844
1826
  search: i > -1 ? n.slice(i, r === -1 ? void 0 : r) : "",
1845
1827
  state: t || {
1846
- [W]: 0,
1828
+ [U]: 0,
1847
1829
  key: a,
1848
1830
  __TSR_key: a
1849
1831
  }
1850
1832
  };
1851
1833
  }
1852
- function Wt() {
1834
+ function Zt() {
1853
1835
  return (Math.random() + 1).toString(36).substring(7);
1854
1836
  }
1855
1837
  //#endregion
1856
1838
  //#region ../router-core/dist/esm/router.js
1857
- function K(e, t) {
1839
+ function G(e, t) {
1858
1840
  let n = t, r = e;
1859
1841
  return {
1860
1842
  fromLocation: n,
@@ -1864,41 +1846,41 @@ function K(e, t) {
1864
1846
  hashChanged: n?.hash !== r.hash
1865
1847
  };
1866
1848
  }
1867
- var Gt = class {
1849
+ var Qt = class {
1868
1850
  constructor(e, t) {
1869
- this.tempLocationKey = `${Math.round(Math.random() * 1e7)}`, this.resetNextScroll = !0, this.shouldViewTransition = void 0, this.isViewTransitionTypesSupported = void 0, this.subscribers = /* @__PURE__ */ new Set(), this.isScrollRestoring = !1, this.isScrollRestorationSetup = !1, this.startTransition = (e) => e(), this.update = (e) => {
1851
+ this.tempLocationKey = `${Math.round(Math.random() * 1e7)}`, this.resetNextScroll = !0, this.shouldViewTransition = void 0, this.isViewTransitionTypesSupported = void 0, this.subscribers = /* @__PURE__ */ new Set(), this.isScrollRestoring = !1, this.isScrollRestorationSetup = !1, this.routeBranchCache = /* @__PURE__ */ new WeakMap(), this.startTransition = (e) => e(), this.update = (e) => {
1870
1852
  process.env.NODE_ENV !== "production" && e.notFoundRoute && console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");
1871
1853
  let t = this.options, n = this.basepath ?? t?.basepath ?? "/", r = this.basepath === void 0, i = t?.rewrite;
1872
1854
  if (this.options = {
1873
1855
  ...t,
1874
1856
  ...e
1875
- }, this.isServer = this.options.isServer ?? typeof document > "u", this.protocolAllowlist = new Set(this.options.protocolAllowlist), this.options.pathParamsAllowedCharacters && (this.pathParamsDecoder = He(this.options.pathParamsAllowedCharacters)), (!this.history || this.options.history && this.options.history !== this.history) && (this.options.history ? this.history = this.options.history : typeof window < "u" && (this.history = Bt())), this.origin = this.options.origin, !this.origin) {
1857
+ }, this.isServer = this.options.isServer ?? typeof document > "u", this.protocolAllowlist = new Set(this.options.protocolAllowlist), this.options.pathParamsAllowedCharacters && (this.pathParamsDecoder = Ye(this.options.pathParamsAllowedCharacters)), (!this.history || this.options.history && this.options.history !== this.history) && (this.options.history ? this.history = this.options.history : typeof window < "u" && (this.history = qt())), this.origin = this.options.origin, !this.origin) {
1876
1858
  let e = globalThis.window;
1877
1859
  e && e.origin && e.origin !== "null" ? this.origin = e.origin : this.origin = "http://localhost";
1878
1860
  }
1879
1861
  if (this.history && this.updateLatestLocation(), this.options.routeTree !== this.routeTree) {
1880
1862
  this.routeTree = this.options.routeTree;
1881
1863
  let e;
1882
- this.resolvePathCache = ge(1e3), e = this.buildRouteTree(), this.setRoutes(e);
1864
+ this.resolvePathCache = be(1e3), e = this.buildRouteTree(), this.setRoutes(e);
1883
1865
  }
1884
1866
  if (!this.stores && this.latestLocation) {
1885
1867
  let e = this.getStoreConfig(this);
1886
- this.batch = e.batch, this.stores = ht(Zt(this.latestLocation), e), nt(this);
1868
+ this.batch = e.batch, this.stores = St(an(this.latestLocation), e), lt(this);
1887
1869
  }
1888
1870
  let a = !1, o = this.options.basepath ?? "/", s = this.options.rewrite;
1889
1871
  if (r || n !== o || i !== s) {
1890
1872
  this.basepath = o;
1891
- let e = [], t = Re(o);
1892
- t && t !== "/" && e.push(ft({ basepath: o })), s && e.push(s), this.rewrite = e.length === 0 ? void 0 : e.length === 1 ? e[0] : dt(e), this.history && this.updateLatestLocation(), a = !0;
1873
+ let e = [], t = Ge(o);
1874
+ t && t !== "/" && e.push(yt({ basepath: o })), s && e.push(s), this.rewrite = e.length === 0 ? void 0 : e.length === 1 ? e[0] : vt(e), this.history && this.updateLatestLocation(), a = !0;
1893
1875
  }
1894
- a && this.stores && this.stores.location.setState(() => this.latestLocation), typeof window < "u" && "CSS" in window && typeof window.CSS?.supports == "function" && (this.isViewTransitionTypesSupported = window.CSS.supports("selector(:active-view-transition-type(a)"));
1876
+ a && this.stores && this.stores.location.set(this.latestLocation), typeof window < "u" && "CSS" in window && typeof window.CSS?.supports == "function" && (this.isViewTransitionTypesSupported = window.CSS.supports("selector(:active-view-transition-type(a))"));
1895
1877
  }, this.updateLatestLocation = () => {
1896
1878
  this.latestLocation = this.parseLocation(this.history.location, this.latestLocation);
1897
1879
  }, this.buildRouteTree = () => {
1898
- let e = Oe(this.routeTree, this.options.caseSensitive, (e, t) => {
1880
+ let e = Me(this.routeTree, this.options.caseSensitive, (e, t) => {
1899
1881
  e.init({ originalIndex: t });
1900
1882
  });
1901
- return this.options.routeMasks && Ce(this.options.routeMasks, e.processedTree), e;
1883
+ return this.options.routeMasks && De(this.options.routeMasks, e.processedTree), e;
1902
1884
  }, this.subscribe = (e, t) => {
1903
1885
  let n = {
1904
1886
  eventType: e,
@@ -1918,24 +1900,24 @@ var Gt = class {
1918
1900
  return {
1919
1901
  href: e + o + r,
1920
1902
  publicHref: e + o + r,
1921
- pathname: j(e).path,
1903
+ pathname: ge(e).path,
1922
1904
  external: !1,
1923
1905
  searchStr: o,
1924
- search: T(t?.search, i),
1925
- hash: j(r.slice(1)).path,
1926
- state: E(t?.state, a)
1906
+ search: E(t?.search, i),
1907
+ hash: ge(r.slice(1)).path,
1908
+ state: D(t?.state, a)
1927
1909
  };
1928
1910
  }
1929
- let o = new URL(i, this.origin), s = pt(this.rewrite, o), c = this.options.parseSearch(s.search), l = this.options.stringifySearch(c);
1911
+ let o = new URL(i, this.origin), s = bt(this.rewrite, o), c = this.options.parseSearch(s.search), l = this.options.stringifySearch(c);
1930
1912
  return s.search = l, {
1931
1913
  href: s.href.replace(s.origin, ""),
1932
1914
  publicHref: i,
1933
- pathname: j(s.pathname).path,
1915
+ pathname: ge(s.pathname).path,
1934
1916
  external: !!this.rewrite && s.origin !== this.origin,
1935
1917
  searchStr: l,
1936
- search: T(t?.search, c),
1937
- hash: j(s.hash.slice(1)).path,
1938
- state: E(t?.state, a)
1918
+ search: E(t?.search, c),
1919
+ hash: ge(s.hash.slice(1)).path,
1920
+ state: D(t?.state, a)
1939
1921
  };
1940
1922
  }, r = n(e), { __tempLocation: i, __tempKey: a } = r.state;
1941
1923
  if (i && (!a || a === this.tempLocationKey)) {
@@ -1946,15 +1928,15 @@ var Gt = class {
1946
1928
  };
1947
1929
  }
1948
1930
  return r;
1949
- }, this.resolvePathWithBase = (e, t) => Ve({
1931
+ }, this.resolvePathWithBase = (e, t) => Je({
1950
1932
  base: e,
1951
- to: Ie(t),
1933
+ to: t.includes("//") ? Ue(t) : t,
1952
1934
  trailingSlash: this.options.trailingSlash,
1953
1935
  cache: this.resolvePathCache
1954
1936
  }), this.matchRoutes = (e, t, n) => typeof e == "string" ? this.matchRoutesInternal({
1955
1937
  pathname: e,
1956
1938
  search: t
1957
- }, n) : this.matchRoutesInternal(e, t), this.getMatchedRoutes = (e) => $t({
1939
+ }, n) : this.matchRoutesInternal(e, t), this.getMatchedRoutes = (e) => sn({
1958
1940
  pathname: e,
1959
1941
  routesById: this.routesById,
1960
1942
  processedTree: this.processedTree
@@ -1962,66 +1944,76 @@ var Gt = class {
1962
1944
  let t = this.getMatch(e);
1963
1945
  t && (t.abortController.abort(), clearTimeout(t._nonReactive.pendingTimeout), t._nonReactive.pendingTimeout = void 0);
1964
1946
  }, this.cancelMatches = () => {
1965
- this.stores.pendingMatchesId.state.forEach((e) => {
1947
+ this.stores.pendingIds.get().forEach((e) => {
1966
1948
  this.cancelMatch(e);
1967
- }), this.stores.matchesId.state.forEach((e) => {
1968
- if (this.stores.pendingMatchStoresById.has(e)) return;
1969
- let t = this.stores.activeMatchStoresById.get(e)?.state;
1949
+ }), this.stores.matchesId.get().forEach((e) => {
1950
+ if (this.stores.pendingMatchStores.has(e)) return;
1951
+ let t = this.stores.matchStores.get(e)?.get();
1970
1952
  t && (t.status === "pending" || t.isFetching === "loader") && this.cancelMatch(e);
1971
1953
  });
1972
1954
  }, this.buildLocation = (e) => {
1973
1955
  let t = (t = {}) => {
1974
1956
  let n = t._fromLocation || this.pendingBuiltLocation || this.latestLocation, r = this.matchRoutesLightweight(n);
1975
1957
  if (t.from && process.env.NODE_ENV !== "production" && t._isNavigate) {
1976
- let e = this.getMatchedRoutes(t.from).matchedRoutes, n = ae(r.matchedRoutes, (e) => Yt(e.fullPath, t.from)), i = ae(e, (e) => Yt(e.fullPath, r.fullPath));
1958
+ let e = this.getMatchedRoutes(t.from).matchedRoutes, n = ce(r.matchedRoutes, (e) => nn(e.fullPath, t.from)), i = ce(e, (e) => nn(e.fullPath, r.fullPath));
1977
1959
  !n && !i && console.warn(`Could not find match for from: ${t.from}`);
1978
1960
  }
1979
- let i = t.unsafeRelative === "path" ? n.pathname : t.from ?? r.fullPath, a = this.resolvePathWithBase(i, "."), o = r.search, s = Object.assign(Object.create(null), r.params), c = t.to ? this.resolvePathWithBase(a, `${t.to}`) : this.resolvePathWithBase(a, "."), l = t.params === !1 || t.params === null ? Object.create(null) : (t.params ?? !0) === !0 ? s : Object.assign(s, C(t.params, s)), u = this.getMatchedRoutes(c), d = u.matchedRoutes;
1980
- if ((!u.foundRoute || u.foundRoute.path !== "/" && u.routeParams["**"]) && this.options.notFoundRoute && (d = [...d, this.options.notFoundRoute]), Object.keys(l).length > 0) for (let e of d) {
1961
+ let i = t.unsafeRelative === "path" ? n.pathname : t.from ?? r.fullPath, a = t.to ? `${t.to}` : void 0, o = r.search, s = Object.assign(Object.create(null), r.params), c = a?.charCodeAt(0) === 47 ? "/" : this.resolvePathWithBase(i, "."), l = a ? this.resolvePathWithBase(c, a) : c, u = t.params === !1 || t.params === null ? Object.create(null) : (t.params ?? !0) === !0 ? s : Object.assign(s, T(t.params, s)), d = this.routesByPath[F(l)], f;
1962
+ if (d) f = this.getRouteBranch(d);
1963
+ else if (l.includes("$")) f = [];
1964
+ else {
1965
+ let e = this.getMatchedRoutes(l);
1966
+ f = e.matchedRoutes, this.options.notFoundRoute && (!e.foundRoute || e.foundRoute.path !== "/" && e.routeParams["**"]) && (f = [...f, this.options.notFoundRoute]);
1967
+ }
1968
+ if (f.length && re(u)) for (let e of f) {
1981
1969
  let t = e.options.params?.stringify ?? e.options.stringifyParams;
1982
1970
  if (t) try {
1983
- Object.assign(l, t(l));
1971
+ Object.assign(u, t(u));
1984
1972
  } catch {}
1985
1973
  }
1986
- let f = e.leaveParams ? c : j(We({
1987
- path: c,
1988
- params: l,
1974
+ let p = e.leaveParams ? l : ge(Ze({
1975
+ path: l,
1976
+ params: u,
1989
1977
  decoder: this.pathParamsDecoder,
1990
1978
  server: this.isServer
1991
- }).interpolatedPath).path, p = o;
1979
+ }).interpolatedPath).path;
1980
+ if (process.env.NODE_ENV !== "production" && d && !e.leaveParams) try {
1981
+ this.getMatchedRoutes(p).foundRoute?.id !== d.id && console.warn(`Generated path "${p}" for route "${d.id}" did not match the same route after params.stringify.`);
1982
+ } catch {}
1983
+ let m = o;
1992
1984
  if (e._includeValidateSearch && this.options.search?.strict) {
1993
1985
  let e = {};
1994
- d.forEach((t) => {
1986
+ f.forEach((t) => {
1995
1987
  if (t.options.validateSearch) try {
1996
- Object.assign(e, Qt(t.options.validateSearch, {
1988
+ Object.assign(e, on(t.options.validateSearch, {
1997
1989
  ...e,
1998
- ...p
1990
+ ...m
1999
1991
  }));
2000
1992
  } catch {}
2001
- }), p = e;
1993
+ }), m = e;
2002
1994
  }
2003
- p = en({
2004
- search: p,
1995
+ m = cn({
1996
+ search: m,
2005
1997
  dest: t,
2006
- destRoutes: d,
1998
+ destRoutes: f,
2007
1999
  _includeValidateSearch: e._includeValidateSearch
2008
- }), p = T(o, p);
2009
- let m = this.options.stringifySearch(p), h = t.hash === !0 ? n.hash : t.hash ? C(t.hash, n.hash) : void 0, g = h ? `#${h}` : "", _ = t.state === !0 ? n.state : t.state ? C(t.state, n.state) : {};
2010
- _ = E(n.state, _);
2011
- let v = `${f}${m}${g}`, y, b, x = !1;
2000
+ }), m = E(o, m);
2001
+ let h = this.options.stringifySearch(m), g = t.hash === !0 ? n.hash : t.hash ? T(t.hash, n.hash) : void 0, _ = g ? `#${g}` : "", v = t.state === !0 ? n.state : t.state ? T(t.state, n.state) : {};
2002
+ v = D(n.state, v);
2003
+ let y = `${p}${h}${_}`, b, x, S = !1;
2012
2004
  if (this.rewrite) {
2013
- let e = new URL(v, this.origin), t = mt(this.rewrite, e);
2014
- y = e.href.replace(e.origin, ""), t.origin === this.origin ? b = t.pathname + t.search + t.hash : (b = t.href, x = !0);
2015
- } else y = pe(v), b = y;
2005
+ let e = new URL(y, this.origin), t = xt(this.rewrite, e);
2006
+ b = e.href.replace(e.origin, ""), t.origin === this.origin ? x = t.pathname + t.search + t.hash : (x = t.href, S = !0);
2007
+ } else b = _e(y), x = b;
2016
2008
  return {
2017
- publicHref: b,
2018
- href: y,
2019
- pathname: f,
2020
- search: p,
2021
- searchStr: m,
2022
- state: _,
2023
- hash: h ?? "",
2024
- external: x,
2009
+ publicHref: x,
2010
+ href: b,
2011
+ pathname: p,
2012
+ search: m,
2013
+ searchStr: h,
2014
+ state: v,
2015
+ hash: g ?? "",
2016
+ external: S,
2025
2017
  unmaskOnReload: t.unmaskOnReload
2026
2018
  };
2027
2019
  }, n = (n = {}, r) => {
@@ -2029,10 +2021,10 @@ var Gt = class {
2029
2021
  if (!a) {
2030
2022
  let n = Object.create(null);
2031
2023
  if (this.options.routeMasks) {
2032
- let o = we(i.pathname, this.processedTree);
2024
+ let o = Oe(i.pathname, this.processedTree);
2033
2025
  if (o) {
2034
2026
  Object.assign(n, o.rawParams);
2035
- let { from: i, params: s, ...c } = o.route, l = s === !1 || s === null ? Object.create(null) : (s ?? !0) === !0 ? n : Object.assign(n, C(s, n));
2027
+ let { from: i, params: s, ...c } = o.route, l = s === !1 || s === null ? Object.create(null) : (s ?? !0) === !0 ? n : Object.assign(n, T(s, n));
2036
2028
  r = {
2037
2029
  from: e.from,
2038
2030
  ...c,
@@ -2058,12 +2050,12 @@ var Gt = class {
2058
2050
  e.forEach((e) => {
2059
2051
  n.state[e] = this.latestLocation.state[e];
2060
2052
  });
2061
- let t = O(n.state, this.latestLocation.state);
2053
+ let t = k(n.state, this.latestLocation.state);
2062
2054
  return e.forEach((e) => {
2063
2055
  delete n.state[e];
2064
2056
  }), t;
2065
- }, i = I(this.latestLocation.href) === I(n.href), a = this.commitLocationPromise;
2066
- if (this.commitLocationPromise = k(() => {
2057
+ }, i = F(this.latestLocation.href) === F(n.href), a = this.commitLocationPromise;
2058
+ if (this.commitLocationPromise = A(() => {
2067
2059
  a?.resolve(), a = void 0;
2068
2060
  }), i && r()) this.load();
2069
2061
  else {
@@ -2090,8 +2082,8 @@ var Gt = class {
2090
2082
  return this.resetNextScroll = n.resetScroll ?? !0, this.history.subscribers.size || this.load(), this.commitLocationPromise;
2091
2083
  }, this.buildAndCommitLocation = ({ replace: e, resetScroll: t, hashScrollIntoView: n, viewTransition: r, ignoreBlocker: i, href: a, ...o } = {}) => {
2092
2084
  if (a) {
2093
- let t = this.history.location.state.__TSR_index, n = G(a, { __TSR_index: e ? t : t + 1 }), r = new URL(n.pathname, this.origin);
2094
- o.to = pt(this.rewrite, r).pathname, o.search = this.options.parseSearch(n.search), o.hash = n.hash.slice(1);
2085
+ let t = this.history.location.state.__TSR_index, n = W(a, { __TSR_index: e ? t : t + 1 }), r = new URL(n.pathname, this.origin);
2086
+ o.to = bt(this.rewrite, r).pathname, o.search = this.options.parseSearch(n.search), o.hash = n.hash.slice(1);
2095
2087
  }
2096
2088
  let s = this.buildLocation({
2097
2089
  ...o,
@@ -2123,7 +2115,7 @@ var Gt = class {
2123
2115
  n ??= t.publicHref, r ??= t.publicHref;
2124
2116
  }
2125
2117
  let t = !a && r ? r : n;
2126
- if (le(t, this.protocolAllowlist)) return process.env.NODE_ENV !== "production" && console.warn(`Blocked navigation to dangerous protocol: ${t}`), Promise.resolve();
2118
+ if (fe(t, this.protocolAllowlist)) return process.env.NODE_ENV !== "production" && console.warn(`Blocked navigation to dangerous protocol: ${t}`), Promise.resolve();
2127
2119
  if (!i.ignoreBlocker) {
2128
2120
  let e = this.history.getBlockers?.() ?? [];
2129
2121
  for (let t of e) if (t?.blockerFn && await t.blockerFn({
@@ -2142,28 +2134,28 @@ var Gt = class {
2142
2134
  });
2143
2135
  }, this.beforeLoad = () => {
2144
2136
  this.cancelMatches(), this.updateLatestLocation();
2145
- let e = this.matchRoutes(this.latestLocation), t = this.stores.cachedMatchesSnapshot.state.filter((t) => !e.some((e) => e.id === t.id));
2137
+ let e = this.matchRoutes(this.latestLocation), t = this.stores.cachedMatches.get().filter((t) => !e.some((e) => e.id === t.id));
2146
2138
  this.batch(() => {
2147
- this.stores.status.setState(() => "pending"), this.stores.statusCode.setState(() => 200), this.stores.isLoading.setState(() => !0), this.stores.location.setState(() => this.latestLocation), this.stores.setPendingMatches(e), this.stores.setCachedMatches(t);
2139
+ this.stores.status.set("pending"), this.stores.statusCode.set(200), this.stores.isLoading.set(!0), this.stores.location.set(this.latestLocation), this.stores.setPending(e), this.stores.setCached(t);
2148
2140
  });
2149
2141
  }, this.load = async (e) => {
2150
- let t, n, r, i = this.stores.resolvedLocation.state ?? this.stores.location.state;
2142
+ let t, n, r, i = this.stores.resolvedLocation.get() ?? this.stores.location.get();
2151
2143
  for (r = new Promise((a) => {
2152
2144
  this.startTransition(async () => {
2153
2145
  try {
2154
2146
  this.beforeLoad();
2155
- let t = this.latestLocation, n = this.stores.resolvedLocation.state, r = K(t, n);
2156
- this.stores.redirect.state || this.emit({
2147
+ let t = this.latestLocation, n = G(t, this.stores.resolvedLocation.get());
2148
+ this.stores.redirect.get() || this.emit({
2157
2149
  type: "onBeforeNavigate",
2158
- ...r
2150
+ ...n
2159
2151
  }), this.emit({
2160
2152
  type: "onBeforeLoad",
2161
- ...r
2162
- }), await Mt({
2153
+ ...n
2154
+ }), await zt({
2163
2155
  router: this,
2164
2156
  sync: e?.sync,
2165
2157
  forceStaleReload: i.href === t.href,
2166
- matches: this.stores.pendingMatchesSnapshot.state,
2158
+ matches: this.stores.pendingMatches.get(),
2167
2159
  location: t,
2168
2160
  updateMatch: this.updateMatch,
2169
2161
  onReady: async () => {
@@ -2171,13 +2163,13 @@ var Gt = class {
2171
2163
  this.startViewTransition(async () => {
2172
2164
  let e = null, t = null, n = null, r = null;
2173
2165
  this.batch(() => {
2174
- let i = this.stores.pendingMatchesSnapshot.state, a = i.length, o = this.stores.activeMatchesSnapshot.state;
2175
- e = a ? o.filter((e) => !this.stores.pendingMatchStoresById.has(e.id)) : null;
2166
+ let i = this.stores.pendingMatches.get(), a = i.length, o = this.stores.matches.get();
2167
+ e = a ? o.filter((e) => !this.stores.pendingMatchStores.has(e.id)) : null;
2176
2168
  let s = /* @__PURE__ */ new Set();
2177
- for (let e of this.stores.pendingMatchStoresById.values()) e.routeId && s.add(e.routeId);
2169
+ for (let e of this.stores.pendingMatchStores.values()) e.routeId && s.add(e.routeId);
2178
2170
  let c = /* @__PURE__ */ new Set();
2179
- for (let e of this.stores.activeMatchStoresById.values()) e.routeId && c.add(e.routeId);
2180
- t = a ? o.filter((e) => !s.has(e.routeId)) : null, n = a ? i.filter((e) => !c.has(e.routeId)) : null, r = a ? i.filter((e) => c.has(e.routeId)) : o, this.stores.isLoading.setState(() => !1), this.stores.loadedAt.setState(() => Date.now()), a && (this.stores.setActiveMatches(i), this.stores.setPendingMatches([]), this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state, ...e.filter((e) => e.status !== "error" && e.status !== "notFound" && e.status !== "redirected")]), this.clearExpiredCache());
2171
+ for (let e of this.stores.matchStores.values()) e.routeId && c.add(e.routeId);
2172
+ t = a ? o.filter((e) => !s.has(e.routeId)) : null, n = a ? i.filter((e) => !c.has(e.routeId)) : null, r = a ? i.filter((e) => c.has(e.routeId)) : o, this.stores.isLoading.set(!1), this.stores.loadedAt.set(Date.now()), a && (this.stores.setMatches(i), this.stores.setPending([]), this.stores.setCached([...this.stores.cachedMatches.get(), ...e.filter((e) => e.status !== "error" && e.status !== "notFound" && e.status !== "redirected")]), this.clearExpiredCache());
2181
2173
  });
2182
2174
  for (let [e, i] of [
2183
2175
  [t, "onLeave"],
@@ -2189,27 +2181,27 @@ var Gt = class {
2189
2181
  }
2190
2182
  });
2191
2183
  } catch (e) {
2192
- z(e) ? (t = e, this.navigate({
2184
+ R(e) ? (t = e, this.navigate({
2193
2185
  ...t.options,
2194
2186
  replace: !0,
2195
2187
  ignoreBlocker: !0
2196
- })) : L(e) && (n = e);
2197
- let r = t ? t.status : n ? 404 : this.stores.activeMatchesSnapshot.state.some((e) => e.status === "error") ? 500 : 200;
2188
+ })) : I(e) && (n = e);
2189
+ let r = t ? t.status : n ? 404 : this.stores.matches.get().some((e) => e.status === "error") ? 500 : 200;
2198
2190
  this.batch(() => {
2199
- this.stores.statusCode.setState(() => r), this.stores.redirect.setState(() => t);
2191
+ this.stores.statusCode.set(r), this.stores.redirect.set(t);
2200
2192
  });
2201
2193
  }
2202
2194
  this.latestLoadPromise === r && (this.commitLocationPromise?.resolve(), this.latestLoadPromise = void 0, this.commitLocationPromise = void 0), a();
2203
2195
  });
2204
2196
  }), this.latestLoadPromise = r, await r; this.latestLoadPromise && r !== this.latestLoadPromise;) await this.latestLoadPromise;
2205
2197
  let a;
2206
- this.hasNotFoundMatch() ? a = 404 : this.stores.activeMatchesSnapshot.state.some((e) => e.status === "error") && (a = 500), a !== void 0 && this.stores.statusCode.setState(() => a);
2198
+ this.hasNotFoundMatch() ? a = 404 : this.stores.matches.get().some((e) => e.status === "error") && (a = 500), a !== void 0 && this.stores.statusCode.set(a);
2207
2199
  }, this.startViewTransition = (e) => {
2208
2200
  let t = this.shouldViewTransition ?? this.options.defaultViewTransition;
2209
2201
  if (this.shouldViewTransition = void 0, t && typeof document < "u" && "startViewTransition" in document && typeof document.startViewTransition == "function") {
2210
2202
  let n;
2211
2203
  if (typeof t == "object" && this.isViewTransitionTypesSupported) {
2212
- let r = this.latestLocation, i = this.stores.resolvedLocation.state, a = typeof t.types == "function" ? t.types(K(r, i)) : t.types;
2204
+ let r = this.latestLocation, i = this.stores.resolvedLocation.get(), a = typeof t.types == "function" ? t.types(G(r, i)) : t.types;
2213
2205
  if (a === !1) {
2214
2206
  e();
2215
2207
  return;
@@ -2223,23 +2215,23 @@ var Gt = class {
2223
2215
  } else e();
2224
2216
  }, this.updateMatch = (e, t) => {
2225
2217
  this.startTransition(() => {
2226
- let n = this.stores.pendingMatchStoresById.get(e);
2218
+ let n = this.stores.pendingMatchStores.get(e);
2227
2219
  if (n) {
2228
- n.setState(t);
2220
+ n.set(t);
2229
2221
  return;
2230
2222
  }
2231
- let r = this.stores.activeMatchStoresById.get(e);
2223
+ let r = this.stores.matchStores.get(e);
2232
2224
  if (r) {
2233
- r.setState(t);
2225
+ r.set(t);
2234
2226
  return;
2235
2227
  }
2236
- let i = this.stores.cachedMatchStoresById.get(e);
2228
+ let i = this.stores.cachedMatchStores.get(e);
2237
2229
  if (i) {
2238
- let n = t(i.state);
2239
- n.status === "redirected" ? this.stores.cachedMatchStoresById.delete(e) && this.stores.cachedMatchesId.setState((t) => t.filter((t) => t !== e)) : i.setState(() => n);
2230
+ let n = t(i.get());
2231
+ n.status === "redirected" ? this.stores.cachedMatchStores.delete(e) && this.stores.cachedIds.set((t) => t.filter((t) => t !== e)) : i.set(n);
2240
2232
  }
2241
2233
  });
2242
- }, this.getMatch = (e) => this.stores.cachedMatchStoresById.get(e)?.state ?? this.stores.pendingMatchStoresById.get(e)?.state ?? this.stores.activeMatchStoresById.get(e)?.state, this.invalidate = (e) => {
2234
+ }, this.getMatch = (e) => this.stores.cachedMatchStores.get(e)?.get() ?? this.stores.pendingMatchStores.get(e)?.get() ?? this.stores.matchStores.get(e)?.get(), this.invalidate = (e) => {
2243
2235
  let t = (t) => e?.filter?.(t) ?? !0 ? {
2244
2236
  ...t,
2245
2237
  invalid: !0,
@@ -2249,7 +2241,7 @@ var Gt = class {
2249
2241
  } : void 0
2250
2242
  } : t;
2251
2243
  return this.batch(() => {
2252
- this.stores.setActiveMatches(this.stores.activeMatchesSnapshot.state.map(t)), this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.map(t)), this.stores.setPendingMatches(this.stores.pendingMatchesSnapshot.state.map(t));
2244
+ this.stores.setMatches(this.stores.matches.get().map(t)), this.stores.setCached(this.stores.cachedMatches.get().map(t)), this.stores.setPending(this.stores.pendingMatches.get().map(t));
2253
2245
  }), this.shouldViewTransition = !1, this.load({ sync: e?.sync });
2254
2246
  }, this.getParsedLocationHref = (e) => e.publicHref || "/", this.resolveRedirect = (e) => {
2255
2247
  let t = e.headers.get("Location");
@@ -2263,11 +2255,11 @@ var Gt = class {
2263
2255
  e.options.href = t, e.headers.set("Location", t);
2264
2256
  }
2265
2257
  } catch {}
2266
- if (e.options.href && !e.options._builtLocation && le(e.options.href, this.protocolAllowlist)) throw Error(process.env.NODE_ENV === "production" ? "Redirect blocked: unsafe protocol" : `Redirect blocked: unsafe protocol in href "${e.options.href}". Allowed protocols: ${Array.from(this.protocolAllowlist).join(", ")}.`);
2258
+ if (e.options.href && !e.options._builtLocation && fe(e.options.href, this.protocolAllowlist)) throw Error(process.env.NODE_ENV === "production" ? "Redirect blocked: unsafe protocol" : `Redirect blocked: unsafe protocol in href "${e.options.href}". Allowed protocols: ${Array.from(this.protocolAllowlist).join(", ")}.`);
2267
2259
  return e.headers.get("Location") || e.headers.set("Location", e.options.href), e;
2268
2260
  }, this.clearCache = (e) => {
2269
2261
  let t = e?.filter;
2270
- t === void 0 ? this.stores.setCachedMatches([]) : this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.filter((e) => !t(e)));
2262
+ t === void 0 ? this.stores.setCached([]) : this.stores.setCached(this.stores.cachedMatches.get().filter((e) => !t(e)));
2271
2263
  }, this.clearExpiredCache = () => {
2272
2264
  let e = Date.now();
2273
2265
  this.clearCache({ filter: (t) => {
@@ -2276,18 +2268,18 @@ var Gt = class {
2276
2268
  let r = (t.preload ? n.options.preloadGcTime ?? this.options.defaultPreloadGcTime : n.options.gcTime ?? this.options.defaultGcTime) ?? 300 * 1e3;
2277
2269
  return t.status === "error" ? !0 : e - t.updatedAt >= r;
2278
2270
  } });
2279
- }, this.loadRouteChunk = U, this.preloadRoute = async (e) => {
2271
+ }, this.loadRouteChunk = H, this.preloadRoute = async (e) => {
2280
2272
  let t = e._builtLocation ?? this.buildLocation(e), n = this.matchRoutes(t, {
2281
2273
  throwOnError: !0,
2282
2274
  preload: !0,
2283
2275
  dest: e
2284
- }), r = new Set([...this.stores.matchesId.state, ...this.stores.pendingMatchesId.state]), i = new Set([...r, ...this.stores.cachedMatchesId.state]), a = n.filter((e) => !i.has(e.id));
2276
+ }), r = new Set([...this.stores.matchesId.get(), ...this.stores.pendingIds.get()]), i = new Set([...r, ...this.stores.cachedIds.get()]), a = n.filter((e) => !i.has(e.id));
2285
2277
  if (a.length) {
2286
- let e = this.stores.cachedMatchesSnapshot.state;
2287
- this.stores.setCachedMatches([...e, ...a]);
2278
+ let e = this.stores.cachedMatches.get();
2279
+ this.stores.setCached([...e, ...a]);
2288
2280
  }
2289
2281
  try {
2290
- return n = await Mt({
2282
+ return n = await zt({
2291
2283
  router: this,
2292
2284
  matches: n,
2293
2285
  location: t,
@@ -2297,11 +2289,11 @@ var Gt = class {
2297
2289
  }
2298
2290
  }), n;
2299
2291
  } catch (e) {
2300
- if (z(e)) return e.options.reloadDocument ? void 0 : await this.preloadRoute({
2292
+ if (R(e)) return e.options.reloadDocument ? void 0 : await this.preloadRoute({
2301
2293
  ...e.options,
2302
2294
  _fromLocation: t
2303
2295
  });
2304
- L(e) || console.error(e);
2296
+ I(e) || console.error(e);
2305
2297
  return;
2306
2298
  }
2307
2299
  }, this.matchRoute = (e, t) => {
@@ -2311,10 +2303,10 @@ var Gt = class {
2311
2303
  params: e.params || {},
2312
2304
  leaveParams: !0
2313
2305
  }, r = this.buildLocation(n);
2314
- if (t?.pending && this.stores.status.state !== "pending") return !1;
2315
- let i = (t?.pending === void 0 ? !this.stores.isLoading.state : t.pending) ? this.latestLocation : this.stores.resolvedLocation.state || this.stores.location.state, a = Te(r.pathname, t?.caseSensitive ?? !1, t?.fuzzy ?? !1, i.pathname, this.processedTree);
2316
- return !a || e.params && !O(a.rawParams, e.params, { partial: !0 }) ? !1 : t?.includeSearch ?? !0 ? O(i.search, r.search, { partial: !0 }) ? a.rawParams : !1 : a.rawParams;
2317
- }, this.hasNotFoundMatch = () => this.stores.activeMatchesSnapshot.state.some((e) => e.status === "notFound" || e.globalNotFound), this.getStoreConfig = t, this.update({
2306
+ if (t?.pending && this.stores.status.get() !== "pending") return !1;
2307
+ let i = (t?.pending === void 0 ? !this.stores.isLoading.get() : t.pending) ? this.latestLocation : this.stores.resolvedLocation.get() || this.stores.location.get(), a = ke(r.pathname, t?.caseSensitive ?? !1, t?.fuzzy ?? !1, i.pathname, this.processedTree);
2308
+ return !a || e.params && !k(a.rawParams, e.params, { partial: !0 }) ? !1 : t?.includeSearch ?? !0 ? k(i.search, r.search, { partial: !0 }) ? a.rawParams : !1 : a.rawParams;
2309
+ }, this.hasNotFoundMatch = () => this.stores.matches.get().some((e) => e.status === "notFound" || e.globalNotFound), this.getStoreConfig = t, this.update({
2318
2310
  defaultPreloadDelay: 50,
2319
2311
  defaultPendingMs: 1e3,
2320
2312
  defaultPendingMinMs: 500,
@@ -2322,9 +2314,9 @@ var Gt = class {
2322
2314
  ...e,
2323
2315
  caseSensitive: e.caseSensitive ?? !1,
2324
2316
  notFoundMode: e.notFoundMode ?? "fuzzy",
2325
- stringifySearch: e.stringifySearch ?? st,
2326
- parseSearch: e.parseSearch ?? ot,
2327
- protocolAllowlist: e.protocolAllowlist ?? ce
2317
+ stringifySearch: e.stringifySearch ?? mt,
2318
+ parseSearch: e.parseSearch ?? pt,
2319
+ protocolAllowlist: e.protocolAllowlist ?? de
2328
2320
  }), typeof document < "u" && (self.__TSR_ROUTER__ = this);
2329
2321
  }
2330
2322
  isShell() {
@@ -2334,13 +2326,17 @@ var Gt = class {
2334
2326
  return !!this.options.isPrerendering;
2335
2327
  }
2336
2328
  get state() {
2337
- return this.stores.__store.state;
2329
+ return this.stores.__store.get();
2338
2330
  }
2339
2331
  setRoutes({ routesById: e, routesByPath: t, processedTree: n }) {
2340
2332
  this.routesById = e, this.routesByPath = t, this.processedTree = n;
2341
2333
  let r = this.options.notFoundRoute;
2342
2334
  r && (r.init({ originalIndex: 99999999999 }), this.routesById[r.id] = r);
2343
2335
  }
2336
+ getRouteBranch(e) {
2337
+ let t = this.routeBranchCache.get(e);
2338
+ return t || (t = Fe(e), this.routeBranchCache.set(e, t)), t;
2339
+ }
2344
2340
  get looseRoutesById() {
2345
2341
  return this.routesById;
2346
2342
  }
@@ -2348,76 +2344,76 @@ var Gt = class {
2348
2344
  return e?.id ? e.context ?? this.options.context ?? void 0 : this.options.context ?? void 0;
2349
2345
  }
2350
2346
  matchRoutesInternal(e, t) {
2351
- let n = this.getMatchedRoutes(e.pathname), { foundRoute: r, routeParams: i, parsedParams: a } = n, { matchedRoutes: o } = n, s = !1;
2352
- (r ? r.path !== "/" && i["**"] : I(e.pathname)) && (this.options.notFoundRoute ? o = [...o, this.options.notFoundRoute] : s = !0);
2353
- let c = s ? nn(this.options.notFoundMode, o) : void 0, l = Array(o.length), u = /* @__PURE__ */ new Map();
2354
- for (let e of this.stores.activeMatchStoresById.values()) e.routeId && u.set(e.routeId, e.state);
2355
- for (let n = 0; n < o.length; n++) {
2356
- let r = o[n], s = l[n - 1], d, f, p;
2347
+ let n = this.getMatchedRoutes(e.pathname), { foundRoute: r, routeParams: i } = n, { matchedRoutes: a } = n, o = !1;
2348
+ (r ? r.path !== "/" && i["**"] : F(e.pathname)) && (this.options.notFoundRoute ? a = [...a, this.options.notFoundRoute] : o = !0);
2349
+ let s = o ? un(this.options.notFoundMode, a) : void 0, c = Array(a.length), l = /* @__PURE__ */ new Map();
2350
+ for (let e of this.stores.matchStores.values()) e.routeId && l.set(e.routeId, e.get());
2351
+ for (let n = 0; n < a.length; n++) {
2352
+ let r = a[n], o = c[n - 1], u, d, f;
2357
2353
  {
2358
- let n = s?.search ?? e.search, i = s?._strictSearch ?? void 0;
2354
+ let n = o?.search ?? e.search, i = o?._strictSearch ?? void 0;
2359
2355
  try {
2360
- let e = Qt(r.options.validateSearch, { ...n }) ?? void 0;
2361
- d = {
2356
+ let e = on(r.options.validateSearch, { ...n }) ?? void 0;
2357
+ u = {
2362
2358
  ...n,
2363
2359
  ...e
2364
- }, f = {
2360
+ }, d = {
2365
2361
  ...i,
2366
2362
  ...e
2367
- }, p = void 0;
2363
+ }, f = void 0;
2368
2364
  } catch (e) {
2369
2365
  let r = e;
2370
- if (e instanceof Kt || (r = new Kt(e.message, { cause: e })), t?.throwOnError) throw r;
2371
- d = n, f = {}, p = r;
2366
+ if (e instanceof $t || (r = new $t(e.message, { cause: e })), t?.throwOnError) throw r;
2367
+ u = n, d = {}, f = r;
2372
2368
  }
2373
2369
  }
2374
- let m = r.options.loaderDeps?.({ search: d }) ?? "", h = m ? JSON.stringify(m) : "", { interpolatedPath: g, usedParams: _ } = We({
2370
+ let p = r.options.loaderDeps?.({ search: u }) ?? "", m = p ? JSON.stringify(p) : "", { interpolatedPath: h, usedParams: g } = Ze({
2375
2371
  path: r.fullPath,
2376
2372
  params: i,
2377
2373
  decoder: this.pathParamsDecoder,
2378
2374
  server: this.isServer
2379
- }), v = r.id + g + h, y = this.getMatch(v), b = u.get(r.id), x = y?._strictParams ?? _, S;
2380
- if (!y) try {
2381
- rn(r, _, a, x);
2375
+ }), _ = r.id + h + m, v = this.getMatch(_), y = l.get(r.id), b = v?._strictParams ?? g, x;
2376
+ if (!v) try {
2377
+ dn(r, b);
2382
2378
  } catch (e) {
2383
- if (S = L(e) || z(e) ? e : new qt(e.message, { cause: e }), t?.throwOnError) throw S;
2379
+ if (x = I(e) || R(e) ? e : new en(e.message, { cause: e }), t?.throwOnError) throw x;
2384
2380
  }
2385
- Object.assign(i, x);
2386
- let C = b ? "stay" : "enter", w;
2387
- if (y) w = {
2388
- ...y,
2389
- cause: C,
2390
- params: b?.params ?? i,
2391
- _strictParams: x,
2392
- search: T(b ? b.search : y.search, d),
2393
- _strictSearch: f
2381
+ Object.assign(i, b);
2382
+ let S = y ? "stay" : "enter", C;
2383
+ if (v) C = {
2384
+ ...v,
2385
+ cause: S,
2386
+ params: y?.params ?? i,
2387
+ _strictParams: b,
2388
+ search: E(y ? y.search : v.search, u),
2389
+ _strictSearch: d
2394
2390
  };
2395
2391
  else {
2396
- let e = r.options.loader || r.options.beforeLoad || r.lazyFn || Pt(r) ? "pending" : "success";
2397
- w = {
2398
- id: v,
2392
+ let e = r.options.loader || r.options.beforeLoad || r.lazyFn || Vt(r) ? "pending" : "success";
2393
+ C = {
2394
+ id: _,
2399
2395
  ssr: r.options.ssr,
2400
2396
  index: n,
2401
2397
  routeId: r.id,
2402
- params: b?.params ?? i,
2403
- _strictParams: x,
2404
- pathname: g,
2398
+ params: y?.params ?? i,
2399
+ _strictParams: b,
2400
+ pathname: h,
2405
2401
  updatedAt: Date.now(),
2406
- search: b ? T(b.search, d) : d,
2407
- _strictSearch: f,
2402
+ search: y ? E(y.search, u) : u,
2403
+ _strictSearch: d,
2408
2404
  searchError: void 0,
2409
2405
  status: e,
2410
2406
  isFetching: !1,
2411
2407
  error: void 0,
2412
- paramsError: S,
2408
+ paramsError: x,
2413
2409
  __routeContext: void 0,
2414
- _nonReactive: { loadPromise: k() },
2410
+ _nonReactive: { loadPromise: A() },
2415
2411
  __beforeLoadContext: void 0,
2416
2412
  context: {},
2417
2413
  abortController: new AbortController(),
2418
2414
  fetchCount: 0,
2419
- cause: C,
2420
- loaderDeps: b ? E(b.loaderDeps, m) : m,
2415
+ cause: S,
2416
+ loaderDeps: y ? D(y.loaderDeps, p) : p,
2421
2417
  invalid: !1,
2422
2418
  preload: !1,
2423
2419
  links: void 0,
@@ -2428,18 +2424,18 @@ var Gt = class {
2428
2424
  fullPath: r.fullPath
2429
2425
  };
2430
2426
  }
2431
- t?.preload || (w.globalNotFound = c === r.id), w.searchError = p;
2432
- let ee = this.getParentContext(s);
2433
- w.context = {
2434
- ...ee,
2435
- ...w.__routeContext,
2436
- ...w.__beforeLoadContext
2437
- }, l[n] = w;
2427
+ t?.preload || (C.globalNotFound = s === r.id), C.searchError = f;
2428
+ let w = this.getParentContext(o);
2429
+ C.context = {
2430
+ ...w,
2431
+ ...C.__routeContext,
2432
+ ...C.__beforeLoadContext
2433
+ }, c[n] = C;
2438
2434
  }
2439
- for (let t = 0; t < l.length; t++) {
2440
- let n = l[t], r = this.looseRoutesById[n.routeId], a = this.getMatch(n.id), o = u.get(n.routeId);
2441
- if (n.params = o ? T(o.params, i) : i, !a) {
2442
- let i = l[t - 1], a = this.getParentContext(i);
2435
+ for (let t = 0; t < c.length; t++) {
2436
+ let n = c[t], r = this.looseRoutesById[n.routeId], a = this.getMatch(n.id), o = l.get(n.routeId);
2437
+ if (n.params = o ? E(o.params, i) : i, !a) {
2438
+ let i = c[t - 1], a = this.getParentContext(i);
2443
2439
  if (r.options.context) {
2444
2440
  let t = {
2445
2441
  deps: n.loaderDeps,
@@ -2454,7 +2450,7 @@ var Gt = class {
2454
2450
  cause: n.cause,
2455
2451
  abortController: n.abortController,
2456
2452
  preload: !!n.preload,
2457
- matches: l,
2453
+ matches: c,
2458
2454
  routeId: r.id
2459
2455
  };
2460
2456
  n.__routeContext = r.options.context(t) ?? void 0;
@@ -2466,37 +2462,37 @@ var Gt = class {
2466
2462
  };
2467
2463
  }
2468
2464
  }
2469
- return l;
2465
+ return c;
2470
2466
  }
2471
2467
  matchRoutesLightweight(e) {
2472
- let { matchedRoutes: t, routeParams: n, parsedParams: r } = this.getMatchedRoutes(e.pathname), i = x(t), a = { ...e.search };
2468
+ let { matchedRoutes: t, routeParams: n } = this.getMatchedRoutes(e.pathname), r = w(t), i = { ...e.search };
2473
2469
  for (let e of t) try {
2474
- Object.assign(a, Qt(e.options.validateSearch, a));
2470
+ Object.assign(i, on(e.options.validateSearch, i));
2475
2471
  } catch {}
2476
- let o = x(this.stores.matchesId.state), s = o && this.stores.activeMatchStoresById.get(o)?.state, c = s && s.routeId === i.id && s.pathname === e.pathname, l;
2477
- if (c) l = s.params;
2472
+ let a = w(this.stores.matchesId.get()), o = a && this.stores.matchStores.get(a)?.get(), s = o && o.routeId === r.id && o.pathname === e.pathname, c;
2473
+ if (s) c = o.params;
2478
2474
  else {
2479
2475
  let e = Object.assign(Object.create(null), n);
2480
- for (let i of t) try {
2481
- rn(i, n, r ?? {}, e);
2476
+ for (let n of t) try {
2477
+ dn(n, e);
2482
2478
  } catch {}
2483
- l = e;
2479
+ c = e;
2484
2480
  }
2485
2481
  return {
2486
2482
  matchedRoutes: t,
2487
- fullPath: i.fullPath,
2488
- search: a,
2489
- params: l
2483
+ fullPath: r.fullPath,
2484
+ search: i,
2485
+ params: c
2490
2486
  };
2491
2487
  }
2492
- }, Kt = class extends Error {}, qt = class extends Error {}, Jt = (e) => e.endsWith("/") && e.length > 1 ? e.slice(0, -1) : e;
2493
- function Yt(e, t) {
2494
- return Jt(e) === Jt(t);
2488
+ }, $t = class extends Error {}, en = class extends Error {}, tn = (e) => e.endsWith("/") && e.length > 1 ? e.slice(0, -1) : e;
2489
+ function nn(e, t) {
2490
+ return tn(e) === tn(t);
2495
2491
  }
2496
- function Xt(e, t) {
2492
+ function rn(e, t) {
2497
2493
  return async (...n) => (await e())[t || "default"](...n);
2498
2494
  }
2499
- function Zt(e) {
2495
+ function an(e) {
2500
2496
  return {
2501
2497
  loadedAt: 0,
2502
2498
  isLoading: !1,
@@ -2508,29 +2504,28 @@ function Zt(e) {
2508
2504
  statusCode: 200
2509
2505
  };
2510
2506
  }
2511
- function Qt(e, t) {
2507
+ function on(e, t) {
2512
2508
  if (e == null) return {};
2513
2509
  if ("~standard" in e) {
2514
2510
  let n = e["~standard"].validate(t);
2515
- if (n instanceof Promise) throw new Kt("Async validation not supported");
2516
- if (n.issues) throw new Kt(JSON.stringify(n.issues, void 0, 2), { cause: n });
2511
+ if (n instanceof Promise) throw new $t("Async validation not supported");
2512
+ if (n.issues) throw new $t(JSON.stringify(n.issues, void 0, 2), { cause: n });
2517
2513
  return n.value;
2518
2514
  }
2519
2515
  return "parse" in e ? e.parse(t) : typeof e == "function" ? e(t) : {};
2520
2516
  }
2521
- function $t({ pathname: e, routesById: t, processedTree: n }) {
2522
- let r = Object.create(null), i = I(e), a, o, s = Ee(i, n, !0);
2523
- return s && (a = s.route, Object.assign(r, s.rawParams), o = Object.assign(Object.create(null), s.parsedParams)), {
2524
- matchedRoutes: s?.branch || [t.__root__],
2517
+ function sn({ pathname: e, routesById: t, processedTree: n }) {
2518
+ let r = Object.create(null), i = F(e), a, o = Ae(i, n, !0);
2519
+ return o && (a = o.route, Object.assign(r, o.rawParams)), {
2520
+ matchedRoutes: o?.branch || [t.__root__],
2525
2521
  routeParams: r,
2526
- foundRoute: a,
2527
- parsedParams: o
2522
+ foundRoute: a
2528
2523
  };
2529
2524
  }
2530
- function en({ search: e, dest: t, destRoutes: n, _includeValidateSearch: r }) {
2531
- return tn(n)(e, t, r ?? !1);
2525
+ function cn({ search: e, dest: t, destRoutes: n, _includeValidateSearch: r }) {
2526
+ return ln(n)(e, t, r ?? !1);
2532
2527
  }
2533
- function tn(e) {
2528
+ function ln(e) {
2534
2529
  let t = {
2535
2530
  dest: null,
2536
2531
  _includeValidateSearch: !1,
@@ -2547,7 +2542,7 @@ function tn(e) {
2547
2542
  try {
2548
2543
  return {
2549
2544
  ...i,
2550
- ...Qt(n.options.validateSearch, i) ?? void 0
2545
+ ...on(n.options.validateSearch, i) ?? void 0
2551
2546
  };
2552
2547
  } catch {
2553
2548
  return i;
@@ -2555,7 +2550,7 @@ function tn(e) {
2555
2550
  });
2556
2551
  t.middlewares.push(({ search: e }) => {
2557
2552
  let n = t.dest;
2558
- return n.search ? n.search === !0 ? e : C(n.search, e) : {};
2553
+ return n.search ? n.search === !0 ? e : T(n.search, e) : {};
2559
2554
  });
2560
2555
  let n = (e, t, r) => {
2561
2556
  if (e >= r.length) return t;
@@ -2569,24 +2564,24 @@ function tn(e) {
2569
2564
  return t.dest = r, t._includeValidateSearch = i, n(0, e, t.middlewares);
2570
2565
  };
2571
2566
  }
2572
- function nn(e, t) {
2567
+ function un(e, t) {
2573
2568
  if (e !== "root") for (let e = t.length - 1; e >= 0; e--) {
2574
2569
  let n = t[e];
2575
2570
  if (n.children) return n.id;
2576
2571
  }
2577
- return R;
2572
+ return L;
2578
2573
  }
2579
- function rn(e, t, n, r) {
2580
- let i = e.options.params?.parse ?? e.options.parseParams;
2581
- if (i) if (e.options.skipRouteOnParseError) for (let e in t) e in n && (r[e] = n[e]);
2582
- else {
2583
- let e = i(r);
2584
- Object.assign(r, e);
2574
+ function dn(e, t) {
2575
+ let n = e.options.params?.parse ?? e.options.parseParams;
2576
+ if (n) {
2577
+ let e = n(t);
2578
+ if (e === !1) throw Error("Route params.parse returned false for a matched route");
2579
+ Object.assign(t, e);
2585
2580
  }
2586
2581
  }
2587
2582
  //#endregion
2588
2583
  //#region ../router-core/dist/esm/link.js
2589
- var an = "Error preloading route! ☝️", on = class {
2584
+ var fn = "Error preloading route! ☝️", pn = class {
2590
2585
  get to() {
2591
2586
  return this._to;
2592
2587
  }
@@ -2603,43 +2598,43 @@ var an = "Error preloading route! ☝️", on = class {
2603
2598
  if (this.init = (e) => {
2604
2599
  this.originalIndex = e.originalIndex;
2605
2600
  let t = this.options, n = !t?.path && !t?.id;
2606
- if (this.parentRoute = this.options.getParentRoute?.(), n) this._path = R;
2601
+ if (this.parentRoute = this.options.getParentRoute?.(), n) this._path = L;
2607
2602
  else if (!this.parentRoute) {
2608
2603
  if (process.env.NODE_ENV !== "production") throw Error("Invariant failed: Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.");
2609
- he();
2604
+ ye();
2610
2605
  }
2611
- let r = n ? R : t?.path;
2612
- r && r !== "/" && (r = Le(r));
2613
- let i = t?.id || r, a = n ? R : Fe([this.parentRoute.id === "__root__" ? "" : this.parentRoute.id, i]);
2614
- r === "__root__" && (r = "/"), a !== "__root__" && (a = Fe(["/", a]));
2615
- let o = a === "__root__" ? "/" : Fe([this.parentRoute.fullPath, r]);
2616
- this._path = r, this._id = a, this._fullPath = o, this._to = I(o);
2617
- }, this.addChildren = (e) => this._addFileChildren(e), this._addFileChildren = (e) => (Array.isArray(e) && (this.children = e), typeof e == "object" && e && (this.children = Object.values(e)), this), this._addFileTypes = () => this, this.updateLoader = (e) => (Object.assign(this.options, e), this), this.update = (e) => (Object.assign(this.options, e), this), this.lazy = (e) => (this.lazyFn = e, this), this.redirect = (e) => ut({
2606
+ let r = n ? L : t?.path;
2607
+ r && r !== "/" && (r = We(r));
2608
+ let i = t?.id || r, a = n ? L : He([this.parentRoute.id === "__root__" ? "" : this.parentRoute.id, i]);
2609
+ r === "__root__" && (r = "/"), a !== "__root__" && (a = He(["/", a]));
2610
+ let o = a === "__root__" ? "/" : He([this.parentRoute.fullPath, r]);
2611
+ this._path = r, this._id = a, this._fullPath = o, this._to = F(o);
2612
+ }, this.addChildren = (e) => this._addFileChildren(e), this._addFileChildren = (e) => (Array.isArray(e) && (this.children = e), typeof e == "object" && e && (this.children = Object.values(e)), this), this._addFileTypes = () => this, this.updateLoader = (e) => (Object.assign(this.options, e), this), this.update = (e) => (Object.assign(this.options, e), this), this.lazy = (e) => (this.lazyFn = e, this), this.redirect = (e) => _t({
2618
2613
  from: this.fullPath,
2619
2614
  ...e
2620
2615
  }), this.options = e || {}, this.isRoot = !e?.getParentRoute, e?.id && e?.path) throw Error("Route cannot have both an 'id' and a 'path' option.");
2621
2616
  }
2622
- }, sn = class {
2617
+ }, mn = class {
2623
2618
  constructor({ id: e }) {
2624
- this.notFound = (e) => Ke({
2619
+ this.notFound = (e) => $e({
2625
2620
  routeId: this.id,
2626
2621
  ...e
2627
- }), this.redirect = (e) => ut({
2622
+ }), this.redirect = (e) => _t({
2628
2623
  from: this.id,
2629
2624
  ...e
2630
2625
  }), this.id = e;
2631
2626
  }
2632
- }, cn = class extends on {
2627
+ }, hn = class extends pn {
2633
2628
  constructor(e) {
2634
2629
  super(e);
2635
2630
  }
2636
- }, ln = (e) => ({
2631
+ }, gn = (e) => ({
2637
2632
  serializationAdapters: e.serializationAdapters,
2638
2633
  defaultSsr: e.defaultSsr
2639
2634
  });
2640
2635
  //#endregion
2641
2636
  //#region ../router-core/dist/esm/searchMiddleware.js
2642
- function un(e) {
2637
+ function _n(e) {
2643
2638
  return ({ search: t, next: n }) => {
2644
2639
  let r = n(t);
2645
2640
  if (e === !0) return {
@@ -2654,9 +2649,9 @@ function un(e) {
2654
2649
  }
2655
2650
  //#endregion
2656
2651
  //#region ../router-core/dist/esm/hash-scroll.js
2657
- function dn(e) {
2652
+ function vn(e) {
2658
2653
  if (typeof document < "u" && document.querySelector) {
2659
- let t = e.stores.location.state, n = t.state.__hashScrollIntoViewOptions ?? !0;
2654
+ let t = e.stores.location.get(), n = t.state.__hashScrollIntoViewOptions ?? !0;
2660
2655
  if (n && t.hash !== "") {
2661
2656
  let e = document.getElementById(t.hash);
2662
2657
  e && e.scrollIntoView(n);
@@ -2665,114 +2660,100 @@ function dn(e) {
2665
2660
  }
2666
2661
  //#endregion
2667
2662
  //#region src/routerStores.ts
2668
- function fn(e, t) {
2663
+ function yn(e, t) {
2669
2664
  e.childMatchIdByRouteId = t(() => {
2670
- let t = e.matchesId.state, n = {};
2665
+ let t = e.matchesId.get(), n = {};
2671
2666
  for (let r = 0; r < t.length - 1; r++) {
2672
- let i = t[r], a = t[r + 1];
2673
- if (i === void 0 || a === void 0) continue;
2674
- let o = e.activeMatchStoresById.get(i);
2675
- o?.routeId && (n[o.routeId] = a);
2667
+ let i = e.matchStores.get(t[r]);
2668
+ i?.routeId && (n[i.routeId] = t[r + 1]);
2676
2669
  }
2677
2670
  return n;
2678
2671
  }), e.pendingRouteIds = t(() => {
2679
- let t = e.pendingMatchesId.state, n = {};
2672
+ let t = e.pendingIds.get(), n = {};
2680
2673
  for (let r of t) {
2681
- let t = e.pendingMatchStoresById.get(r);
2674
+ let t = e.pendingMatchStores.get(r);
2682
2675
  t?.routeId && (n[t.routeId] = !0);
2683
2676
  }
2684
2677
  return n;
2685
2678
  });
2686
2679
  }
2687
- function pn(t) {
2688
- let n = e.signal(t);
2689
- return {
2690
- get state() {
2691
- return n();
2692
- },
2693
- setState(e) {
2694
- n.update(e);
2695
- }
2696
- };
2697
- }
2698
- function mn(t) {
2699
- let n = e.computed(t);
2700
- return { get state() {
2701
- return n();
2702
- } };
2703
- }
2704
- var hn = (e) => ({
2705
- createMutableStore: pn,
2706
- createReadonlyStore: mn,
2707
- batch: (e) => e(),
2708
- init: (e) => fn(e, mn)
2709
- }), gn = (e) => new _n(e), _n = class extends Gt {
2680
+ var bn = (n) => ({
2681
+ createMutableStore: t,
2682
+ createReadonlyStore: t,
2683
+ batch: e,
2684
+ init: (e) => yn(e, t)
2685
+ }), xn = (e) => new Sn(e), Sn = class extends Qt {
2710
2686
  constructor(e) {
2711
- super(e, hn);
2687
+ super(e, bn);
2712
2688
  }
2713
- }, vn = {
2689
+ }, Cn = {
2714
2690
  matchId: () => void 0,
2715
2691
  routeId: () => void 0,
2716
2692
  match: () => void 0,
2717
2693
  hasPending: () => !1
2718
- }, q = new e.InjectionToken("MATCH_CONTEXT_INJECTOR", {
2694
+ }, K = new n.InjectionToken("MATCH_CONTEXT_INJECTOR", {
2719
2695
  providedIn: "root",
2720
- factory: () => vn
2721
- }), yn = new e.InjectionToken("ROUTER");
2722
- function bn() {
2723
- return typeof document > "u" ? yn : window.__TSR_ROUTER_INJECTION_KEY__ ? window.__TSR_ROUTER_INJECTION_KEY__ : (window.__TSR_ROUTER_INJECTION_KEY__ = yn, yn);
2696
+ factory: () => Cn
2697
+ }), wn = new n.InjectionToken("ROUTER");
2698
+ function Tn() {
2699
+ return typeof document > "u" ? wn : window.__TSR_ROUTER_INJECTION_KEY__ ? window.__TSR_ROUTER_INJECTION_KEY__ : (window.__TSR_ROUTER_INJECTION_KEY__ = wn, wn);
2724
2700
  }
2725
2701
  //#endregion
2726
2702
  //#region src/injectRouter.ts
2727
- function J(t) {
2728
- let n = e.inject(bn(), { optional: !0 });
2729
- return process.env.NODE_ENV !== "production" && (t?.warn ?? !0) && !n && console.warn("Warning: injectRouter must be used inside a <router-provider> component!"), n;
2703
+ function q(e) {
2704
+ let t = n.inject(Tn(), { optional: !0 });
2705
+ return process.env.NODE_ENV !== "production" && (e?.warn ?? !0) && !t && console.warn("Warning: injectRouter must be used inside a <router-provider> component!"), t;
2730
2706
  }
2731
2707
  //#endregion
2732
- //#region src/injectStore.ts
2733
- function Y(e, t = (e) => e, n = { equal: xn }) {
2734
- u(Y);
2735
- let r = typeof e == "function" ? e : () => e, i = _(() => t(r().state), n);
2736
- return f(() => {
2737
- i();
2738
- }), i.asReadonly();
2739
- }
2740
- function xn(e, t) {
2741
- if (Object.is(e, t)) return !0;
2742
- if (typeof e != "object" || !e || typeof t != "object" || !t) return !1;
2743
- if (e instanceof Map && t instanceof Map) {
2744
- if (e.size !== t.size) return !1;
2745
- for (let [n, r] of e) if (!t.has(n) || !Object.is(r, t.get(n))) return !1;
2746
- return !0;
2747
- }
2748
- if (e instanceof Set && t instanceof Set) {
2749
- if (e.size !== t.size) return !1;
2750
- for (let n of e) if (!t.has(n)) return !1;
2751
- return !0;
2752
- }
2753
- if (e instanceof Date && t instanceof Date) return e.getTime() === t.getTime();
2754
- let n = Object.keys(e);
2755
- if (n.length !== Object.keys(t).length) return !1;
2756
- for (let r of n) if (!Object.prototype.hasOwnProperty.call(t, r) || !Object.is(e[r], t[r])) return !1;
2757
- return !0;
2708
+ //#region src/store/injectSelector.ts
2709
+ function En(e, t) {
2710
+ return t || (f(e), h(c));
2711
+ }
2712
+ function Dn(e, t = (e) => e, n) {
2713
+ return b(En(Dn, n?.injector), () => {
2714
+ let r = typeof e == "function" ? e : () => e, i = y(() => t(r().get()), { equal: n?.compare });
2715
+ return m((e) => {
2716
+ let { unsubscribe: n } = r().subscribe((e) => {
2717
+ i.set(t(e));
2718
+ });
2719
+ e(n);
2720
+ }), i.asReadonly();
2721
+ });
2722
+ }
2723
+ //#endregion
2724
+ //#region src/store/injectStore.ts
2725
+ function J(e, t = (e) => e, n) {
2726
+ let { equal: r, injector: i, ...a } = n ?? {};
2727
+ return Dn(e, t, {
2728
+ ...a,
2729
+ compare: r,
2730
+ injector: i
2731
+ });
2758
2732
  }
2759
2733
  //#endregion
2760
2734
  //#region src/injectMatch.ts
2761
- function X(t) {
2762
- let n = J(), r = t.from ? void 0 : e.inject(q), i = Y(n.stores.pendingRouteIds, (e) => e), a = Y(n.stores.isTransitioning, (e) => e), o = () => t.from ? n.stores.getMatchStoreByRouteId(t.from).state : r?.match();
2763
- return e.computed(() => {
2764
- let e = o();
2765
- if (e !== void 0) return t.select ? t.select(e) : e;
2766
- if (!(t.from ? i()[t.from] : r?.hasPending() ?? !1) && !a() && (t.shouldThrow ?? !0)) {
2767
- if (process.env.NODE_ENV !== "production") throw Error(`Invariant failed: Could not find ${t.from ? `an active match from "${t.from}"` : "a nearest match!"}`);
2768
- he();
2735
+ var On = {
2736
+ get: () => void 0,
2737
+ subscribe: () => ({ unsubscribe: () => {} })
2738
+ };
2739
+ function Y(e) {
2740
+ let t = q(), r = e.from ? void 0 : n.inject(K), i = J(e.from ? t.stores.getRouteMatchStore(e.from) : () => {
2741
+ let e = r?.matchId();
2742
+ return e ? t.stores.matchStores.get(e) ?? On : On;
2743
+ }, (e) => e), a = J(t.stores.pendingRouteIds, (e) => e), o = J(t.stores.isTransitioning, (e) => e);
2744
+ return n.computed(() => {
2745
+ let t = i();
2746
+ if (t !== void 0) return e.select ? e.select(t) : t;
2747
+ if (!(e.from ? a()[e.from] : r?.hasPending() ?? !1) && !o() && (e.shouldThrow ?? !0)) {
2748
+ if (process.env.NODE_ENV !== "production") throw Error(`Invariant failed: Could not find ${e.from ? `an active match from "${e.from}"` : "a nearest match!"}`);
2749
+ ye();
2769
2750
  }
2770
- }, { equal: O });
2751
+ }, { equal: k });
2771
2752
  }
2772
2753
  //#endregion
2773
2754
  //#region src/injectLoaderData.ts
2774
- function Sn(e) {
2775
- return X({
2755
+ function kn(e) {
2756
+ return Y({
2776
2757
  from: e.from,
2777
2758
  strict: e.strict,
2778
2759
  select: (t) => e.select ? e.select(t.loaderData) : t.loaderData
@@ -2780,17 +2761,17 @@ function Sn(e) {
2780
2761
  }
2781
2762
  //#endregion
2782
2763
  //#region src/injectLoaderDeps.ts
2783
- function Cn(e) {
2764
+ function An(e) {
2784
2765
  let { select: t, ...n } = e;
2785
- return X({
2766
+ return Y({
2786
2767
  ...n,
2787
2768
  select: (e) => t ? t(e.loaderDeps) : e.loaderDeps
2788
2769
  });
2789
2770
  }
2790
2771
  //#endregion
2791
2772
  //#region src/injectNavigate.ts
2792
- function wn(e) {
2793
- let t = J();
2773
+ function X(e) {
2774
+ let t = q();
2794
2775
  return ((n) => t.navigate({
2795
2776
  ...n,
2796
2777
  from: n.from ?? e?.from
@@ -2798,8 +2779,8 @@ function wn(e) {
2798
2779
  }
2799
2780
  //#endregion
2800
2781
  //#region src/injectParams.ts
2801
- function Tn(e) {
2802
- return X({
2782
+ function jn(e) {
2783
+ return Y({
2803
2784
  from: e.from,
2804
2785
  strict: e.strict,
2805
2786
  shouldThrow: e.shouldThrow,
@@ -2808,16 +2789,16 @@ function Tn(e) {
2808
2789
  }
2809
2790
  //#endregion
2810
2791
  //#region src/injectRouteContext.ts
2811
- function En(e) {
2812
- return X({
2792
+ function Mn(e) {
2793
+ return Y({
2813
2794
  ...e,
2814
2795
  select: (t) => e.select ? e.select(t.context) : t.context
2815
2796
  });
2816
2797
  }
2817
2798
  //#endregion
2818
2799
  //#region src/injectSearch.ts
2819
- function Dn(e) {
2820
- return X({
2800
+ function Nn(e) {
2801
+ return Y({
2821
2802
  from: e.from,
2822
2803
  strict: e.strict,
2823
2804
  shouldThrow: e.shouldThrow,
@@ -2826,94 +2807,94 @@ function Dn(e) {
2826
2807
  }
2827
2808
  //#endregion
2828
2809
  //#region src/route.ts
2829
- function On(e) {
2830
- return new kn({ id: e });
2810
+ function Pn(e) {
2811
+ return new Fn({ id: e });
2831
2812
  }
2832
- var kn = class extends sn {
2813
+ var Fn = class extends mn {
2833
2814
  constructor({ id: e }) {
2834
- super({ id: e }), this.injectMatch = (e) => X({
2815
+ super({ id: e }), this.injectMatch = (e) => Y({
2835
2816
  select: e?.select,
2836
2817
  from: this.id
2837
- }), this.injectRouteContext = (e) => En({
2818
+ }), this.injectRouteContext = (e) => Mn({
2838
2819
  ...e,
2839
2820
  from: this.id
2840
- }), this.injectSearch = (e) => Dn({
2821
+ }), this.injectSearch = (e) => Nn({
2841
2822
  select: e?.select,
2842
2823
  from: this.id
2843
- }), this.injectParams = (e) => Tn({
2824
+ }), this.injectParams = (e) => jn({
2844
2825
  select: e?.select,
2845
2826
  from: this.id
2846
- }), this.injectLoaderDeps = (e) => Cn({
2827
+ }), this.injectLoaderDeps = (e) => An({
2847
2828
  ...e,
2848
2829
  from: this.id,
2849
2830
  strict: !1
2850
- }), this.injectLoaderData = (e) => Sn({
2831
+ }), this.injectLoaderData = (e) => kn({
2851
2832
  ...e,
2852
2833
  from: this.id,
2853
2834
  strict: !1
2854
- }), this.injectNavigate = () => wn({ from: J().routesById[this.id].fullPath }), this.notFound = (e) => Ke({
2835
+ }), this.injectNavigate = () => X({ from: q().routesById[this.id].fullPath }), this.notFound = (e) => $e({
2855
2836
  routeId: this.id,
2856
2837
  ...e
2857
2838
  });
2858
2839
  }
2859
- }, An = class extends on {
2840
+ }, In = class extends pn {
2860
2841
  constructor(e) {
2861
- super(e), this.injectMatch = (e) => X({
2842
+ super(e), this.injectMatch = (e) => Y({
2862
2843
  select: e?.select,
2863
2844
  from: this.id
2864
- }), this.injectRouteContext = (e) => X({
2845
+ }), this.injectRouteContext = (e) => Y({
2865
2846
  ...e,
2866
2847
  from: this.id,
2867
2848
  select: (t) => e?.select ? e.select(t.context) : t.context
2868
- }), this.injectSearch = (e) => Dn({
2849
+ }), this.injectSearch = (e) => Nn({
2869
2850
  select: e?.select,
2870
2851
  from: this.id
2871
- }), this.injectParams = (e) => Tn({
2852
+ }), this.injectParams = (e) => jn({
2872
2853
  select: e?.select,
2873
2854
  from: this.id
2874
- }), this.injectLoaderDeps = (e) => Cn({
2855
+ }), this.injectLoaderDeps = (e) => An({
2875
2856
  ...e,
2876
2857
  from: this.id
2877
- }), this.injectLoaderData = (e) => Sn({
2858
+ }), this.injectLoaderData = (e) => kn({
2878
2859
  ...e,
2879
2860
  from: this.id
2880
- }), this.injectNavigate = () => wn({ from: this.fullPath });
2861
+ }), this.injectNavigate = () => X({ from: this.fullPath });
2881
2862
  }
2882
2863
  };
2883
- function jn(e) {
2884
- return new An(e);
2864
+ function Ln(e) {
2865
+ return new In(e);
2885
2866
  }
2886
- function Mn() {
2887
- return (e) => In(e);
2867
+ function Rn() {
2868
+ return (e) => Hn(e);
2888
2869
  }
2889
- var Nn = class extends cn {
2870
+ var zn = class extends hn {
2890
2871
  constructor(e) {
2891
- super(e), this.injectMatch = (e) => X({
2872
+ super(e), this.injectMatch = (e) => Y({
2892
2873
  select: e?.select,
2893
2874
  from: this.id
2894
- }), this.injectRouteContext = (e) => X({
2875
+ }), this.injectRouteContext = (e) => Y({
2895
2876
  ...e,
2896
2877
  from: this.id,
2897
2878
  select: (t) => e?.select ? e.select(t.context) : t.context
2898
- }), this.injectSearch = (e) => Dn({
2879
+ }), this.injectSearch = (e) => Nn({
2899
2880
  select: e?.select,
2900
2881
  from: this.id
2901
- }), this.injectParams = (e) => Tn({
2882
+ }), this.injectParams = (e) => jn({
2902
2883
  select: e?.select,
2903
2884
  from: this.id
2904
- }), this.injectLoaderDeps = (e) => Cn({
2885
+ }), this.injectLoaderDeps = (e) => An({
2905
2886
  ...e,
2906
2887
  from: this.id
2907
- }), this.injectLoaderData = (e) => Sn({
2888
+ }), this.injectLoaderData = (e) => kn({
2908
2889
  ...e,
2909
2890
  from: this.id
2910
- }), this.injectNavigate = () => wn({ from: this.fullPath });
2891
+ }), this.injectNavigate = () => X({ from: this.fullPath });
2911
2892
  }
2912
2893
  };
2913
- function Pn(e) {
2894
+ function Bn(e) {
2914
2895
  return e;
2915
2896
  }
2916
- var Fn = class extends An {
2897
+ var Vn = class extends In {
2917
2898
  constructor(e) {
2918
2899
  super({
2919
2900
  ...e,
@@ -2921,98 +2902,98 @@ var Fn = class extends An {
2921
2902
  });
2922
2903
  }
2923
2904
  };
2924
- function In(e) {
2925
- return new Nn(e);
2905
+ function Hn(e) {
2906
+ return new zn(e);
2926
2907
  }
2927
2908
  //#endregion
2928
2909
  //#region src/fileRoute.ts
2929
- function Ln(e) {
2930
- return typeof e == "object" ? new Rn().createRoute(e) : new Rn().createRoute;
2910
+ function Un(e) {
2911
+ return typeof e == "object" ? new Wn().createRoute(e) : new Wn().createRoute;
2931
2912
  }
2932
- var Rn = class {
2913
+ var Wn = class {
2933
2914
  constructor() {
2934
2915
  this.createRoute = (e) => {
2935
- let t = jn(e);
2916
+ let t = Ln(e);
2936
2917
  return t.isRoot = !1, t;
2937
2918
  };
2938
2919
  }
2939
- }, zn = class {
2920
+ }, Gn = class {
2940
2921
  constructor(e) {
2941
- this.injectMatch = (e) => X({
2922
+ this.injectMatch = (e) => Y({
2942
2923
  select: e?.select,
2943
2924
  from: this.options.id
2944
- }), this.injectRouteContext = (e) => En({
2925
+ }), this.injectRouteContext = (e) => Mn({
2945
2926
  ...e,
2946
2927
  from: this.options.id
2947
- }), this.injectSearch = (e) => Dn({
2928
+ }), this.injectSearch = (e) => Nn({
2948
2929
  select: e?.select,
2949
2930
  from: this.options.id
2950
- }), this.injectParams = (e) => Tn({
2931
+ }), this.injectParams = (e) => jn({
2951
2932
  select: e?.select,
2952
2933
  from: this.options.id
2953
- }), this.injectLoaderDeps = (e) => Cn({
2934
+ }), this.injectLoaderDeps = (e) => An({
2954
2935
  ...e,
2955
2936
  from: this.options.id
2956
- }), this.injectLoaderData = (e) => Sn({
2937
+ }), this.injectLoaderData = (e) => kn({
2957
2938
  ...e,
2958
2939
  from: this.options.id
2959
- }), this.injectNavigate = () => wn({ from: J().routesById[this.options.id].fullPath }), this.options = e;
2940
+ }), this.injectNavigate = () => X({ from: q().routesById[this.options.id].fullPath }), this.options = e;
2960
2941
  }
2961
2942
  };
2962
- function Bn(e) {
2963
- return (t) => new zn({
2943
+ function Kn(e) {
2944
+ return (t) => new Gn({
2964
2945
  id: e,
2965
2946
  ...t
2966
2947
  });
2967
2948
  }
2968
- function Vn(e) {
2969
- return typeof e == "object" ? new zn(e) : (t) => new zn({
2949
+ function qn(e) {
2950
+ return typeof e == "object" ? new Gn(e) : (t) => new Gn({
2970
2951
  id: e,
2971
2952
  ...t
2972
2953
  });
2973
2954
  }
2974
2955
  //#endregion
2975
2956
  //#region src/renderer/injectRender.ts
2976
- function Hn(e) {
2977
- let t = p(c), r = p(o), i = [];
2978
- f(() => {
2979
- let n = e(), a = Un(n);
2980
- if (Wn(i, a)) return;
2981
- i.length > 0 && t.clear(), i = a;
2982
- let s = n?.component;
2983
- if (!s) return;
2984
- let c = n.providers ?? [], l = o.create({
2985
- providers: c,
2986
- parent: r
2987
- }), u = Object.entries(n.inputs ?? {}).map(([e, t]) => h(e, t));
2988
- t.createComponent(s, {
2957
+ function Jn(e) {
2958
+ let t = h(u), n = h(c), r = [];
2959
+ m(() => {
2960
+ let i = e(), a = Yn(i);
2961
+ if (Xn(r, a)) return;
2962
+ r.length > 0 && t.clear(), r = a;
2963
+ let o = i?.component;
2964
+ if (!o) return;
2965
+ let s = i.providers ?? [], l = c.create({
2966
+ providers: s,
2967
+ parent: n
2968
+ }), u = Object.entries(i.inputs ?? {}).map(([e, t]) => _(e, t));
2969
+ t.createComponent(o, {
2989
2970
  injector: l,
2990
2971
  bindings: u
2991
2972
  }).changeDetectorRef.markForCheck();
2992
- }), p(n).onDestroy(() => {
2973
+ }), h(i).onDestroy(() => {
2993
2974
  t.clear();
2994
2975
  });
2995
2976
  }
2996
- function Un(e) {
2977
+ function Yn(e) {
2997
2978
  let t = e?.component;
2998
- return !e || !t ? [] : [t, e.key];
2979
+ return !e || !t ? [] : Array.isArray(e.key) ? [t, ...e.key] : [t, e.key];
2999
2980
  }
3000
- function Wn(e, t) {
2981
+ function Xn(e, t) {
3001
2982
  if (e.length !== t.length) return !1;
3002
2983
  for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
3003
2984
  return !0;
3004
2985
  }
3005
2986
  //#endregion
3006
2987
  //#region src/DefaultNotFound.ts
3007
- var Gn = class n {
2988
+ var Zn = class e {
3008
2989
  static {
3009
- this.ɵfac = function(e) {
3010
- return new (e || n)();
2990
+ this.ɵfac = function(t) {
2991
+ return new (t || e)();
3011
2992
  };
3012
2993
  }
3013
2994
  static {
3014
- this.ɵcmp = /* @__PURE__ */ e.ɵɵdefineComponent({
3015
- type: n,
2995
+ this.ɵcmp = /* @__PURE__ */ n.ɵɵdefineComponent({
2996
+ type: e,
3016
2997
  selectors: [["tanstack-angular-router-default-no-found"]],
3017
2998
  hostAttrs: [
3018
2999
  2,
@@ -3021,68 +3002,93 @@ var Gn = class n {
3021
3002
  ],
3022
3003
  decls: 2,
3023
3004
  vars: 0,
3024
- template: function(t, n) {
3025
- t & 1 && (e.ɵɵelementStart(0, "p"), e.ɵɵtext(1, "Not found"), e.ɵɵelementEnd());
3005
+ template: function(e, t) {
3006
+ e & 1 && (n.ɵɵelementStart(0, "p"), n.ɵɵtext(1, "Not found"), n.ɵɵelementEnd());
3026
3007
  },
3027
3008
  encapsulation: 2,
3028
- changeDetection: t.OnPush
3009
+ changeDetection: r.OnPush
3029
3010
  });
3030
3011
  }
3031
- }, Kn = new e.InjectionToken("ERROR_STATE_INJECTOR_TOKEN");
3032
- function qn() {
3033
- let t = e.inject(Kn, { optional: !0 });
3034
- if (!t) throw Error("injectErrorState was called outside of an error component");
3035
- return t;
3012
+ }, Qn = new n.InjectionToken("ERROR_STATE_INJECTOR_TOKEN");
3013
+ function $n() {
3014
+ let e = n.inject(Qn, { optional: !0 });
3015
+ if (!e) throw Error("injectErrorState was called outside of an error component");
3016
+ return e;
3036
3017
  }
3037
3018
  //#endregion
3038
3019
  //#region src/injectRouterState.ts
3039
- function Jn(t) {
3040
- let n = J({ warn: t?.router === void 0 }), r = Y((t?.router ?? n).stores.__store, (e) => e);
3041
- return e.computed(() => t?.select ? t.select(r()) : r(), { equal: O });
3020
+ function er(e) {
3021
+ let t = q({ warn: e?.router === void 0 }), n = e?.router ?? t;
3022
+ return e?.select ? J(n.stores.__store, e.select, { equal: k }) : J(n.stores.__store);
3042
3023
  }
3043
3024
  //#endregion
3044
3025
  //#region src/renderer/injectIsCatchingError.ts
3045
- function Yn({ matchId: t }) {
3046
- let n = J(), r = Jn({ select: (e) => e.matches }), i = e.computed(() => r().findIndex((e) => e.id === t()));
3047
- return e.computed(() => {
3048
- if (n.options.defaultErrorComponent != null) return !1;
3026
+ function tr({ matchId: e }) {
3027
+ let t = q(), r = er({ select: (e) => e.matches }), i = n.computed(() => r().findIndex((t) => t.id === e()));
3028
+ return n.computed(() => {
3029
+ if (t.options.defaultErrorComponent != null) return;
3049
3030
  let e = i();
3050
- if (e === -1) return !1;
3051
- let t = r();
3052
- for (let r = e + 1; r < t.length; r++) {
3053
- let e = t[r];
3054
- if (n.routesById[e?.routeId].options.errorComponent != null) return !1;
3055
- if (e?.status === "error") return !0;
3031
+ if (e === -1) return;
3032
+ let n = r();
3033
+ for (let r = e + 1; r < n.length; r++) {
3034
+ let e = n[r];
3035
+ if (t.routesById[e?.routeId].options.errorComponent != null) return;
3036
+ if (e?.status === "error") return e;
3056
3037
  }
3057
- return !1;
3058
3038
  });
3059
3039
  }
3060
3040
  //#endregion
3061
3041
  //#region src/Match.ts
3062
- function Xn({ parentRouteIsRoot: e }) {
3063
- let t = J({ warn: !1 }), r = p(i), a = p(n), o = Y(t.stores.resolvedLocation, (e) => e?.state.__TSR_key), s = Y(t.stores.loadedAt, (e) => e), c, u = 0;
3064
- a.onDestroy(() => {
3065
- u++;
3066
- }), f(() => {
3042
+ var nr = {
3043
+ get: () => void 0,
3044
+ subscribe: () => ({ unsubscribe: () => {} })
3045
+ }, rr = class e {
3046
+ constructor() {
3047
+ this.state = h(Qn), this.message = p(() => {
3048
+ let e = this.state.error;
3049
+ return e instanceof Error ? e.stack ?? e.message : String(e);
3050
+ });
3051
+ }
3052
+ static {
3053
+ this.ɵfac = function(t) {
3054
+ return new (t || e)();
3055
+ };
3056
+ }
3057
+ static {
3058
+ this.ɵcmp = /* @__PURE__ */ n.ɵɵdefineComponent({
3059
+ type: e,
3060
+ selectors: [["tanstack-router-default-error"]],
3061
+ decls: 5,
3062
+ vars: 1,
3063
+ consts: [["role", "alert"]],
3064
+ template: function(e, t) {
3065
+ e & 1 && (n.ɵɵelementStart(0, "div", 0)(1, "p"), n.ɵɵtext(2, "Something went wrong."), n.ɵɵelementEnd(), n.ɵɵelementStart(3, "pre"), n.ɵɵtext(4), n.ɵɵelementEnd()()), e & 2 && (n.ɵɵadvance(4), n.ɵɵtextInterpolate(t.message()));
3066
+ },
3067
+ encapsulation: 2
3068
+ });
3069
+ }
3070
+ };
3071
+ function ir({ parentRouteIsRoot: e }) {
3072
+ let t = q({ warn: !1 }), n = h(o), r = h(i), a = J(t.stores.resolvedLocation, (e) => e?.state?.__TSR_key), s = J(t.stores.loadedAt, (e) => e), c, l = 0;
3073
+ r.onDestroy(() => {
3074
+ l++;
3075
+ }), m(() => {
3067
3076
  if (!e()) return;
3068
- o(), s();
3069
- let n = ++u;
3070
- l({ read: () => {
3071
- if (n !== u || !e() || t.isServer) return;
3072
- let r = t.latestLocation.href;
3073
- c !== void 0 && c === r || (c = r, t.emit({
3077
+ a(), s();
3078
+ let r = ++l;
3079
+ d({ read: () => {
3080
+ if (r !== l || !e() || t.isServer) return;
3081
+ let n = t.latestLocation.href;
3082
+ c !== void 0 && c === n || (c = n, t.emit({
3074
3083
  type: "onRendered",
3075
- ...K(t.stores.location.state, t.stores.resolvedLocation.state)
3084
+ ...G(t.stores.location.get(), t.stores.resolvedLocation.get())
3076
3085
  }));
3077
- } }, { injector: r });
3086
+ } }, { injector: n });
3078
3087
  });
3079
3088
  }
3080
- var Zn = class t {
3089
+ var ar = class e {
3081
3090
  constructor() {
3082
- this.matchId = m.required(), this.router = J(), this.match = d(() => {
3083
- let e = this.matchId();
3084
- return e ? this.router.stores.activeMatchStoresById.get(e)?.state : void 0;
3085
- }), this.matchData = d(() => {
3091
+ this.matchId = g.required(), this.router = q(), this.match = p(() => this.matchSignal()), this.matchSignal = J(() => this.router.stores.matchStores.get(this.matchId()) ?? nr, (e) => e), this.matchData = p(() => {
3086
3092
  let e = this.match();
3087
3093
  if (!e) return null;
3088
3094
  let t = e.routeId, n = this.router.routesById[t], r = n.parentRoute?.id ?? null, i = (n.options.remountDeps ?? this.router.options.defaultRemountDeps)?.({
@@ -3097,77 +3103,84 @@ var Zn = class t {
3097
3103
  match: e,
3098
3104
  parentRouteId: r
3099
3105
  };
3100
- }), this.isFistRouteInRouteTree = d(() => this.matchData()?.parentRouteId === R), this.resolvedNoSsr = d(() => {
3106
+ }), this.isFistRouteInRouteTree = p(() => this.matchData()?.parentRouteId === L), this.resolvedNoSsr = p(() => {
3101
3107
  let e = this.matchData()?.match;
3102
3108
  return e ? e.ssr === !1 || e.ssr === "data-only" : !0;
3103
- }), this.shouldClientOnly = d(() => {
3109
+ }), this.shouldClientOnly = p(() => {
3104
3110
  let e = this.matchData()?.match;
3105
3111
  return e ? this.resolvedNoSsr() || !!e._displayPending : !0;
3106
- }), this.parentRouteIdSignal = d(() => this.matchData()?.parentRouteId ?? ""), this.rootRouteIdSignal = d(() => R), this.hasPendingMatch = d(() => {
3112
+ }), this.parentRouteIdSignal = p(() => this.matchData()?.parentRouteId ?? ""), this.rootRouteIdSignal = p(() => L), this.hasPendingMatch = p(() => {
3107
3113
  let e = this.matchData()?.route.id;
3108
3114
  return e ? !!this.pendingRouteIds()[e] : !1;
3109
- }), this.pendingRouteIds = Y(this.router.stores.pendingRouteIds, (e) => e), this.nearestMatchContext = {
3115
+ }), this.pendingRouteIds = J(this.router.stores.pendingRouteIds, (e) => e), this.nearestMatchContext = {
3110
3116
  matchId: this.matchId,
3111
- routeId: d(() => this.matchData()?.route.id),
3117
+ routeId: p(() => this.matchData()?.route.id),
3112
3118
  match: this.match,
3113
3119
  hasPending: this.hasPendingMatch
3114
- }, this.isCatchingError = Yn({ matchId: this.matchId }), this.render = Hn(() => {
3120
+ }, this.catchingErrorMatch = tr({ matchId: this.matchId }), this.render = Jn(() => {
3115
3121
  let e = this.matchData();
3116
- if (!e || this.shouldClientOnly() && this.router.isServer) return null;
3122
+ if (!e) return null;
3117
3123
  let { match: t, route: n } = e;
3118
- if (t.status === "notFound") return { component: $n(this.router, n) };
3119
- if (t.status === "error" || this.isCatchingError()) return {
3120
- component: (Z(n.options.errorComponent) ?? Z(this.router.options.defaultErrorComponent)) || null,
3121
- providers: [{
3122
- provide: Kn,
3123
- useValue: {
3124
- error: t.error,
3125
- reset: () => {
3126
- this.router.invalidate();
3127
- },
3128
- info: { componentStack: "" }
3129
- }
3130
- }]
3131
- };
3132
- if (t.status === "redirected" || t.status === "pending") {
3124
+ if (this.shouldClientOnly() && this.router.isServer) {
3125
+ let e = Z(n.options.pendingComponent) ?? Z(this.router.options.defaultPendingComponent);
3126
+ return e ? { component: e } : null;
3127
+ }
3128
+ if (t.status === "notFound") return { component: sr(this.router, n) };
3129
+ if (t.status === "error" || this.catchingErrorMatch()) {
3130
+ let e = this.catchingErrorMatch();
3131
+ return {
3132
+ component: cr(this.router, n),
3133
+ providers: [{
3134
+ provide: Qn,
3135
+ useValue: {
3136
+ error: t.status === "error" ? t.error : e?.error,
3137
+ reset: () => {
3138
+ this.router.invalidate();
3139
+ },
3140
+ info: { componentStack: "" }
3141
+ }
3142
+ }]
3143
+ };
3144
+ } else if (t.status === "redirected" || t.status === "pending") {
3133
3145
  let t = n.isRoot && (Z(n.options.component) ?? Z(this.router.options.defaultComponent));
3134
- return t && t !== Qn ? {
3146
+ return t && t !== or ? {
3135
3147
  key: e.key,
3136
3148
  component: t,
3137
3149
  providers: [{
3138
- provide: q,
3150
+ provide: K,
3139
3151
  useValue: this.nearestMatchContext
3140
3152
  }]
3141
3153
  } : { component: Z(n.options.pendingComponent) ?? Z(this.router.options.defaultPendingComponent) };
3142
3154
  } else {
3143
- let t = Z(n.options.component) ?? Z(this.router.options.defaultComponent) ?? Qn;
3155
+ let t = Z(n.options.component) ?? Z(this.router.options.defaultComponent) ?? or;
3144
3156
  return {
3145
3157
  key: e.key,
3146
3158
  component: t,
3147
3159
  providers: [{
3148
- provide: q,
3160
+ provide: K,
3149
3161
  useValue: this.nearestMatchContext
3150
3162
  }]
3151
3163
  };
3152
3164
  }
3153
- }), this.onRendered = Xn({ parentRouteIsRoot: d(() => this.parentRouteIdSignal() === R) });
3165
+ }), this.onRendered = ir({ parentRouteIsRoot: p(() => this.parentRouteIdSignal() === L) });
3154
3166
  }
3155
3167
  static {
3156
- this.ɵfac = function(e) {
3157
- return new (e || t)();
3168
+ this.ɵfac = function(t) {
3169
+ return new (t || e)();
3158
3170
  };
3159
3171
  }
3160
3172
  static {
3161
- this.ɵcmp = /* @__PURE__ */ e.ɵɵdefineComponent({
3162
- type: t,
3173
+ this.ɵcmp = /* @__PURE__ */ n.ɵɵdefineComponent({
3174
+ type: e,
3163
3175
  selectors: [["router-match"], [
3164
3176
  "",
3165
3177
  "router-match",
3166
3178
  ""
3167
3179
  ]],
3180
+ hostAttrs: ["hidden", ""],
3168
3181
  hostVars: 1,
3169
- hostBindings: function(t, n) {
3170
- t & 2 && e.ɵɵattribute("data-matchId", n.matchId());
3182
+ hostBindings: function(e, t) {
3183
+ e & 2 && n.ɵɵattribute("data-matchId", t.matchId());
3171
3184
  },
3172
3185
  inputs: { matchId: [1, "matchId"] },
3173
3186
  decls: 0,
@@ -3176,32 +3189,33 @@ var Zn = class t {
3176
3189
  encapsulation: 2
3177
3190
  });
3178
3191
  }
3179
- }, Qn = class t {
3192
+ }, or = class e {
3180
3193
  constructor() {
3181
- this.router = J(), this.nearestMatch = p(q), this.currentMatch = d(() => {
3194
+ this.router = q(), this.nearestMatch = h(K), this.currentMatch = J(() => {
3182
3195
  let e = this.nearestMatch.matchId();
3183
- return e ? this.router.stores.activeMatchStoresById.get(e)?.state : void 0;
3184
- }), this.routeId = d(() => this.currentMatch()?.routeId), this.route = d(() => this.router.routesById[this.routeId()]), this.parentGlobalNotFound = d(() => this.currentMatch()?.globalNotFound ?? !1), this.childMatchIdByRouteId = Y(this.router.stores.childMatchIdByRouteId, (e) => e), this.childMatchId = d(() => {
3196
+ return e ? this.router.stores.matchStores.get(e) ?? nr : nr;
3197
+ }, (e) => e), this.routeId = p(() => this.currentMatch()?.routeId), this.route = p(() => this.router.routesById[this.routeId()]), this.parentGlobalNotFound = p(() => this.currentMatch()?.globalNotFound ?? !1), this.childMatchIdByRouteId = J(this.router.stores.childMatchIdByRouteId, (e) => e), this.childMatchId = p(() => {
3185
3198
  let e = this.routeId();
3186
3199
  return e ? this.childMatchIdByRouteId()[e] ?? null : null;
3187
- }), this.render = Hn(() => this.parentGlobalNotFound() ? { component: $n(this.router, this.route()) } : this.childMatchId() ? {
3188
- component: Zn,
3200
+ }), this.render = Jn(() => this.parentGlobalNotFound() ? { component: sr(this.router, this.route()) } : this.childMatchId() ? {
3201
+ component: ar,
3189
3202
  inputs: { matchId: () => this.childMatchId() }
3190
3203
  } : null);
3191
3204
  }
3192
3205
  static {
3193
- this.ɵfac = function(e) {
3194
- return new (e || t)();
3206
+ this.ɵfac = function(t) {
3207
+ return new (t || e)();
3195
3208
  };
3196
3209
  }
3197
3210
  static {
3198
- this.ɵcmp = /* @__PURE__ */ e.ɵɵdefineComponent({
3199
- type: t,
3211
+ this.ɵcmp = /* @__PURE__ */ n.ɵɵdefineComponent({
3212
+ type: e,
3200
3213
  selectors: [["outlet"], [
3201
3214
  "",
3202
3215
  "outlet",
3203
3216
  ""
3204
3217
  ]],
3218
+ hostAttrs: ["hidden", ""],
3205
3219
  decls: 0,
3206
3220
  vars: 0,
3207
3221
  template: function(e, t) {},
@@ -3212,181 +3226,185 @@ var Zn = class t {
3212
3226
  function Z(e) {
3213
3227
  return typeof e == "function" ? e() : e;
3214
3228
  }
3215
- function $n(e, t) {
3216
- return (Z(t.options.notFoundComponent) ?? Z(e.options.defaultNotFoundComponent)) || (g() && !t.options.notFoundComponent && console.warn(`A notFoundError was encountered on the route with ID "${t.id}", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Page not found</p>)`), Gn);
3229
+ function sr(e, t) {
3230
+ return (Z(t.options.notFoundComponent) ?? Z(e.options.defaultNotFoundComponent)) || (v() && !t.options.notFoundComponent && console.warn(`A notFoundError was encountered on the route with ID "${t.id}", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Page not found</p>)`), Zn);
3231
+ }
3232
+ function cr(e, t) {
3233
+ return (Z(t.options.errorComponent) ?? Z(e.options.defaultErrorComponent)) || (v() && !t.options.errorComponent && console.warn(`An error was encountered on the route with ID "${t.id}", but an errorComponent option was not configured, nor was a router level defaultErrorComponent configured. Consider configuring at least one of these to avoid TanStack Router's generic defaultErrorComponent.`), rr);
3217
3234
  }
3218
3235
  //#endregion
3219
3236
  //#region ../router-core/dist/esm/scroll-restoration-script/client.js
3220
- function er(e) {
3237
+ function lr(e) {
3221
3238
  return null;
3222
3239
  }
3223
3240
  //#endregion
3224
3241
  //#region src/ssr-scroll-restoration.ts
3225
- var tr = "data-tsr-scroll-restoration-inline";
3226
- function nr() {
3227
- let e = J(), t = p(b), n = p(i);
3228
- e.isServer && l(() => {
3242
+ var ur = "data-tsr-scroll-restoration-inline";
3243
+ function dr() {
3244
+ let e = q(), t = h(C), n = h(o);
3245
+ e.isServer && d(() => {
3229
3246
  let n = e.options.scrollRestoration;
3230
- if (!n || typeof n == "function" && !n({ location: e.latestLocation }) || t.querySelector(`script[${tr}]`)) return;
3231
- let r = er(e);
3247
+ if (!n || typeof n == "function" && !n({ location: e.latestLocation }) || t.querySelector(`script[${ur}]`)) return;
3248
+ let r = lr(e);
3232
3249
  if (!r) return;
3233
3250
  let i = t.createElement("script");
3234
- i.setAttribute(tr, ""), i.className = "$tsr", i.text = `${r};document.currentScript.remove()`;
3251
+ i.setAttribute(ur, ""), i.className = "$tsr", i.text = `${r};document.currentScript.remove()`;
3235
3252
  let a = e.options.ssr?.nonce;
3236
3253
  a && i.setAttribute("nonce", a), (t.head ?? t.body).appendChild(i);
3237
3254
  }, { injector: n });
3238
3255
  }
3239
3256
  //#endregion
3240
3257
  //#region src/transitioner.ts
3241
- var rr = {
3258
+ var fr = {
3242
3259
  router: null,
3243
3260
  mounted: !1
3244
3261
  };
3245
- function ir() {
3246
- let t = J(), n = e.inject(e.EnvironmentInjector);
3247
- if (t.isServer) return;
3248
- let r = e.inject(e.DestroyRef), i = !1, a = Y(t.stores.isLoading, (e) => e), o = Y(t.stores.isTransitioning, (e) => e), s = Y(t.stores.hasPendingMatches, (e) => e), c = Y(t.stores.status, (e) => e), l = Y(t.stores.location, (e) => e), u = Y(t.stores.resolvedLocation, (e) => e), d = e.computed(() => a() || o() || s()), f = e.computed(() => a() || s()), p = ar(() => a()), m = ar(() => d()), h = ar(() => f());
3249
- t.startTransition = (r) => {
3250
- t.stores.isTransitioning.setState(() => !0);
3262
+ function pr() {
3263
+ let e = q(), t = n.inject(n.EnvironmentInjector);
3264
+ if (e.isServer) return;
3265
+ let r = n.inject(n.DestroyRef), i = !1, a = J(e.stores.isLoading, (e) => e), o = J(e.stores.isTransitioning, (e) => e), s = J(e.stores.hasPending, (e) => e), c = J(e.stores.status, (e) => e), l = J(e.stores.location, (e) => e), u = J(e.stores.resolvedLocation, (e) => e), d = n.computed(() => a() || o() || s()), f = n.computed(() => a() || s()), p = mr(() => a()), m = mr(() => d()), h = mr(() => f());
3266
+ e.startTransition = (r) => {
3267
+ e.stores.isTransitioning.set(!0);
3251
3268
  let a = () => {
3252
- i || e.afterNextRender({ read: () => {
3269
+ i || n.afterNextRender({ read: () => {
3253
3270
  try {
3254
- t.stores.isTransitioning.setState(() => !1);
3271
+ e.stores.isTransitioning.set(!1);
3255
3272
  } catch {}
3256
- } }, { injector: n });
3273
+ } }, { injector: t });
3257
3274
  }, o = r();
3258
3275
  o instanceof Promise ? o.finally(() => a()) : a();
3259
3276
  };
3260
3277
  let g;
3261
- e.afterNextRender(() => {
3262
- g = t.history.subscribe(t.load);
3263
- let e = t.buildLocation({
3264
- to: t.latestLocation.pathname,
3278
+ n.afterNextRender(() => {
3279
+ g = e.history.subscribe(e.load);
3280
+ let t = e.buildLocation({
3281
+ to: e.latestLocation.pathname,
3265
3282
  search: !0,
3266
3283
  params: !0,
3267
3284
  hash: !0,
3268
3285
  state: !0,
3269
3286
  _includeValidateSearch: !0
3270
3287
  });
3271
- I(t.latestLocation.href) !== I(e.href) && t.commitLocation({
3272
- ...e,
3288
+ F(e.latestLocation.href) !== F(t.href) && e.commitLocation({
3289
+ ...t,
3273
3290
  replace: !0
3274
3291
  });
3275
3292
  });
3276
- let _ = e.signal(!1);
3277
- e.afterNextRender(() => {
3278
- _.set(!0), d() || c() === "pending" && (t.stores.status.setState(() => "idle"), t.stores.resolvedLocation.setState(() => l()));
3293
+ let _ = n.signal(!1);
3294
+ n.afterNextRender(() => {
3295
+ _.set(!0), d() || c() === "pending" && (e.stores.status.set("idle"), e.stores.resolvedLocation.set(l()));
3279
3296
  }), r.onDestroy(() => {
3280
3297
  _.set(!1), i = !0, g && g();
3281
- }), e.afterNextRender(() => {
3282
- typeof window < "u" && t.ssr || rr.router === t && rr.mounted || (rr = {
3283
- router: t,
3298
+ }), n.afterNextRender(() => {
3299
+ typeof window < "u" && e.ssr || fr.router === e && fr.mounted || (fr = {
3300
+ router: e,
3284
3301
  mounted: !0
3285
3302
  }, (async () => {
3286
3303
  try {
3287
- await t.load();
3304
+ await e.load();
3288
3305
  } catch (e) {
3289
3306
  console.error(e);
3290
3307
  }
3291
3308
  })());
3292
- }), e.effect(() => {
3309
+ }), n.effect(() => {
3293
3310
  if (_()) try {
3294
- p() && !a() && t.emit({
3311
+ p() && !a() && e.emit({
3295
3312
  type: "onLoad",
3296
- ...K(l(), u())
3313
+ ...G(l(), u())
3297
3314
  });
3298
3315
  } catch {}
3299
- }), e.effect(() => {
3316
+ }), n.effect(() => {
3300
3317
  if (_()) try {
3301
- h() && !f() && t.emit({
3318
+ h() && !f() && e.emit({
3302
3319
  type: "onBeforeRouteMount",
3303
- ...K(l(), u())
3320
+ ...G(l(), u())
3304
3321
  });
3305
3322
  } catch {}
3306
- }), e.effect(() => {
3323
+ }), n.effect(() => {
3307
3324
  if (_()) try {
3308
- if (m() && !d() && c() === "pending" && (t.stores.status.setState(() => "idle"), t.stores.resolvedLocation.setState(() => l())), m() && !d()) {
3309
- let e = K(l(), u());
3310
- t.emit({
3325
+ if (m() && !d() && c() === "pending" && (e.stores.status.set("idle"), e.stores.resolvedLocation.set(l())), m() && !d()) {
3326
+ let t = G(l(), u());
3327
+ e.emit({
3311
3328
  type: "onResolved",
3312
- ...e
3313
- }), e.hrefChanged && dn(t);
3329
+ ...t
3330
+ }), t.hrefChanged && vn(e);
3314
3331
  }
3315
3332
  } catch {}
3316
3333
  });
3317
3334
  }
3318
- function ar(t) {
3319
- let n = e.computed(t), r = null;
3320
- return e.computed(() => {
3335
+ function mr(e) {
3336
+ let t = n.computed(e), r = null;
3337
+ return n.computed(() => {
3321
3338
  let e = r;
3322
- return r = n(), e;
3339
+ return r = t(), e;
3323
3340
  });
3324
3341
  }
3325
3342
  //#endregion
3326
3343
  //#region src/Matches.ts
3327
- var or = class t {
3344
+ var hr = class e {
3328
3345
  constructor() {
3329
- this.router = J(), this.matchId = Y(this.router.stores.firstMatchId, (e) => e), this.ssrScrollRestoration = nr(), this.transitioner = ir(), this.render = Hn(() => {
3346
+ this.router = q(), this.matchId = J(this.router.stores.firstId, (e) => e), this.ssrScrollRestoration = dr(), this.transitioner = pr(), this.render = Jn(() => {
3330
3347
  let e = this.matchId();
3331
3348
  return e ? {
3332
- component: Zn,
3349
+ component: ar,
3333
3350
  inputs: { matchId: () => e }
3334
3351
  } : null;
3335
3352
  });
3336
3353
  }
3337
3354
  static {
3338
- this.ɵfac = function(e) {
3339
- return new (e || t)();
3355
+ this.ɵfac = function(t) {
3356
+ return new (t || e)();
3340
3357
  };
3341
3358
  }
3342
3359
  static {
3343
- this.ɵcmp = /* @__PURE__ */ e.ɵɵdefineComponent({
3344
- type: t,
3360
+ this.ɵcmp = /* @__PURE__ */ n.ɵɵdefineComponent({
3361
+ type: e,
3345
3362
  selectors: [["router-matches"]],
3363
+ hostAttrs: ["hidden", ""],
3346
3364
  decls: 0,
3347
3365
  vars: 0,
3348
3366
  template: function(e, t) {},
3349
3367
  encapsulation: 2
3350
3368
  });
3351
3369
  }
3352
- }, sr = new a("CONTEXT", {
3370
+ }, gr = new s("CONTEXT", {
3353
3371
  providedIn: "root",
3354
3372
  factory: () => ({})
3355
- }), cr = new a("OPTIONS", {
3373
+ }), _r = new s("OPTIONS", {
3356
3374
  providedIn: "root",
3357
3375
  factory: () => ({})
3358
3376
  });
3359
- function lr(e) {
3360
- let t = p(i);
3377
+ function vr(e) {
3378
+ let t = h(o);
3361
3379
  return {
3362
3380
  inject: t.get.bind(t),
3363
3381
  ...e
3364
3382
  };
3365
3383
  }
3366
- function ur({ router: e, context: t, options: n }) {
3384
+ function yr({ router: e, context: t, options: n }) {
3367
3385
  return [
3368
3386
  {
3369
- provide: bn(),
3387
+ provide: Tn(),
3370
3388
  useValue: e
3371
3389
  },
3372
3390
  {
3373
- provide: sr,
3374
- useFactory: () => lr(t ?? {})
3391
+ provide: gr,
3392
+ useFactory: () => vr(t ?? {})
3375
3393
  },
3376
3394
  {
3377
- provide: cr,
3395
+ provide: _r,
3378
3396
  useValue: n ?? {}
3379
3397
  }
3380
3398
  ];
3381
3399
  }
3382
- var dr = class t {
3400
+ var br = class e {
3383
3401
  constructor() {
3384
- this.injectedContext = p(sr), this.injectedOptions = p(cr), this.injectedRouter = p(bn(), { optional: !0 }), this.context = m(this.injectedContext), this.options = m(this.injectedOptions), this.routerInput = m(void 0, { alias: "router" }), this.router = d(() => {
3402
+ this.injectedContext = h(gr), this.injectedOptions = h(_r), this.injectedRouter = h(Tn(), { optional: !0 }), this.context = g(this.injectedContext), this.options = g(this.injectedOptions), this.routerInput = g(void 0, { alias: "router" }), this.router = p(() => {
3385
3403
  let e = this.routerInput();
3386
3404
  if (e) return e;
3387
3405
  if (this.injectedRouter) return this.injectedRouter;
3388
3406
  throw Error("No router provided to <router-provider>. Provide a router with provideTanstackRouter or the router input");
3389
- }), this.updateRouter = f(() => {
3407
+ }), this.updateRouter = m(() => {
3390
3408
  let e = this.router(), t = this.context(), n = this.options();
3391
3409
  e.update({
3392
3410
  ...e.options,
@@ -3396,30 +3414,31 @@ var dr = class t {
3396
3414
  ...t
3397
3415
  }
3398
3416
  });
3399
- }), this.render = Hn(() => {
3400
- let e = y(this.router);
3417
+ }), this.render = Jn(() => {
3418
+ let e = S(this.router);
3401
3419
  return {
3402
- component: or,
3420
+ component: hr,
3403
3421
  providers: [{
3404
- provide: bn(),
3422
+ provide: Tn(),
3405
3423
  useValue: e
3406
3424
  }]
3407
3425
  };
3408
3426
  });
3409
3427
  }
3410
3428
  static {
3411
- this.ɵfac = function(e) {
3412
- return new (e || t)();
3429
+ this.ɵfac = function(t) {
3430
+ return new (t || e)();
3413
3431
  };
3414
3432
  }
3415
3433
  static {
3416
- this.ɵcmp = /* @__PURE__ */ e.ɵɵdefineComponent({
3417
- type: t,
3434
+ this.ɵcmp = /* @__PURE__ */ n.ɵɵdefineComponent({
3435
+ type: e,
3418
3436
  selectors: [["router-provider"], [
3419
3437
  "",
3420
3438
  "router-provider",
3421
3439
  ""
3422
3440
  ]],
3441
+ hostAttrs: ["hidden", ""],
3423
3442
  inputs: {
3424
3443
  context: [1, "context"],
3425
3444
  options: [1, "options"],
@@ -3435,21 +3454,21 @@ var dr = class t {
3435
3454
  encapsulation: 2
3436
3455
  });
3437
3456
  }
3438
- }, Q = new e.InjectionToken("TANSTACK_DOCUMENT_ROUTER"), fr = "data-tsr-managed", pr = "data-tsr-id";
3457
+ }, Q = new n.InjectionToken("TANSTACK_DOCUMENT_ROUTER"), xr = "data-tsr-managed", Sr = "data-tsr-id";
3439
3458
  //#endregion
3440
3459
  //#region src/document/managed-dom.ts
3441
- function mr(e) {
3460
+ function Cr(e) {
3442
3461
  if (!e || e.tag === "title" || e.tag === "script" && !e.attrs?.src && typeof e.children != "string") return [];
3443
3462
  let t = {
3444
3463
  ...e,
3445
- attrs: hr(e.attrs)
3464
+ attrs: wr(e.attrs)
3446
3465
  };
3447
3466
  return [{
3448
3467
  ...t,
3449
- id: _r(t)
3468
+ id: Er(t)
3450
3469
  }];
3451
3470
  }
3452
- function hr(e) {
3471
+ function wr(e) {
3453
3472
  if (!e) return {};
3454
3473
  let t = {};
3455
3474
  for (let n of Object.keys(e).sort()) {
@@ -3460,27 +3479,27 @@ function hr(e) {
3460
3479
  }
3461
3480
  return t;
3462
3481
  }
3463
- function gr(e) {
3482
+ function Tr(e) {
3464
3483
  let t = /* @__PURE__ */ new Set();
3465
3484
  return e.filter((e) => t.has(e.id) ? !1 : (t.add(e.id), !0));
3466
3485
  }
3467
- function _r(e) {
3486
+ function Er(e) {
3468
3487
  let t = JSON.stringify(e), n = 2166136261;
3469
3488
  for (let e = 0; e < t.length; e++) n ^= t.charCodeAt(e), n = Math.imul(n, 16777619);
3470
3489
  return `tsr-${(n >>> 0).toString(36)}`;
3471
3490
  }
3472
- function vr({ root: e, bucket: t, renderer: n }) {
3491
+ function Dr({ root: e, bucket: t, renderer: n }) {
3473
3492
  let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = [];
3474
3493
  return {
3475
- mount(n = yr(e, t)) {
3494
+ mount(n = Or(e, t)) {
3476
3495
  r.clear(), i.clear(), a = [], n.forEach((e) => {
3477
- let t = e.getAttribute(pr);
3496
+ let t = e.getAttribute(Sr);
3478
3497
  t && (r.set(t, e), a.push(t));
3479
3498
  });
3480
3499
  },
3481
3500
  sync(o) {
3482
3501
  let s = o.map((e) => e.id);
3483
- if (Er(a, s)) return;
3502
+ if (Fr(a, s)) return;
3484
3503
  let c = new Map(o.map((e) => [e.id, {
3485
3504
  id: e.id,
3486
3505
  tag: e
@@ -3488,12 +3507,12 @@ function vr({ root: e, bucket: t, renderer: n }) {
3488
3507
  for (let t of a) {
3489
3508
  if (c.has(t)) continue;
3490
3509
  let a = r.get(t);
3491
- a && (Tr(a, e, n), r.delete(t), i.delete(t));
3510
+ a && (Pr(a, e, n), r.delete(t), i.delete(t));
3492
3511
  }
3493
3512
  let l = e.firstChild;
3494
3513
  for (let a of o) {
3495
3514
  let o = r.get(a.id);
3496
- o || (o = br(a, t, e.ownerDocument, n), r.set(a.id, o)), o !== l && wr(e, o, l, n), i.set(a.id, {
3515
+ o || (o = kr(a, t, e.ownerDocument, n), r.set(a.id, o)), o !== l && Nr(e, o, l, n), i.set(a.id, {
3497
3516
  id: a.id,
3498
3517
  tag: a
3499
3518
  }), l = o.nextSibling;
@@ -3507,33 +3526,33 @@ function vr({ root: e, bucket: t, renderer: n }) {
3507
3526
  }
3508
3527
  };
3509
3528
  }
3510
- function yr(e, t) {
3511
- return Array.from(e.querySelectorAll(`[${fr}="${t}"]`));
3529
+ function Or(e, t) {
3530
+ return Array.from(e.querySelectorAll(`[${xr}="${t}"]`));
3512
3531
  }
3513
- function br(e, t, n, r) {
3514
- let i = xr(n, e.tag, r);
3515
- Sr(i, fr, t, r), Sr(i, pr, e.id, r);
3516
- for (let [t, n] of Object.entries(e.attrs ?? {})) t !== "suppressHydrationWarning" && (n == null || n === !1 || Sr(i, t === "className" ? "class" : t, typeof n == "boolean" ? "" : String(n), r));
3517
- return "children" in e && typeof e.children == "string" && Cr(i, e.children, r), i;
3532
+ function kr(e, t, n, r) {
3533
+ let i = Ar(n, e.tag, r);
3534
+ jr(i, xr, t, r), jr(i, Sr, e.id, r);
3535
+ for (let [t, n] of Object.entries(e.attrs ?? {})) t !== "suppressHydrationWarning" && (n == null || n === !1 || jr(i, t === "className" ? "class" : t, typeof n == "boolean" ? "" : String(n), r));
3536
+ return "children" in e && typeof e.children == "string" && Mr(i, e.children, r), i;
3518
3537
  }
3519
- function xr(e, t, n) {
3538
+ function Ar(e, t, n) {
3520
3539
  return n ? n.createElement(t) : e.createElement(t);
3521
3540
  }
3522
- function Sr(e, t, n, r) {
3541
+ function jr(e, t, n, r) {
3523
3542
  if (r) {
3524
3543
  r.setAttribute(e, t, n);
3525
3544
  return;
3526
3545
  }
3527
3546
  e.setAttribute(t, n);
3528
3547
  }
3529
- function Cr(e, t, n) {
3548
+ function Mr(e, t, n) {
3530
3549
  if (n) {
3531
3550
  n.setProperty(e, "textContent", t);
3532
3551
  return;
3533
3552
  }
3534
3553
  e.textContent = t;
3535
3554
  }
3536
- function wr(e, t, n, r) {
3555
+ function Nr(e, t, n, r) {
3537
3556
  if (!(t.parentNode === e && t.nextSibling === n)) {
3538
3557
  if (r) {
3539
3558
  r.insertBefore(e, t, n);
@@ -3542,51 +3561,51 @@ function wr(e, t, n, r) {
3542
3561
  e.insertBefore(t, n);
3543
3562
  }
3544
3563
  }
3545
- function Tr(e, t, n) {
3564
+ function Pr(e, t, n) {
3546
3565
  if (n) {
3547
3566
  n.removeChild(t, e);
3548
3567
  return;
3549
3568
  }
3550
3569
  t.removeChild(e);
3551
3570
  }
3552
- function Er(e, t) {
3571
+ function Fr(e, t) {
3553
3572
  if (e.length !== t.length) return !1;
3554
3573
  for (let n = 0; n < e.length; n++) if (e[n] !== t[n]) return !1;
3555
3574
  return !0;
3556
3575
  }
3557
3576
  //#endregion
3558
3577
  //#region src/document/document-dehydration.ts
3559
- function Dr(e) {
3560
- return e.serverSsr ? gr(mr(e.serverSsr.takeBufferedScripts())) : [];
3578
+ function Ir(e) {
3579
+ return e.serverSsr ? Tr(Cr(e.serverSsr.takeBufferedScripts())) : [];
3561
3580
  }
3562
- function Or(e, t) {
3581
+ function Lr(e, t) {
3563
3582
  return t.length === 0 ? e : {
3564
3583
  ...e,
3565
- body: gr([...t, ...e.body])
3584
+ body: Tr([...t, ...e.body])
3566
3585
  };
3567
3586
  }
3568
3587
  //#endregion
3569
3588
  //#region src/document/build-match-managed-document.ts
3570
3589
  function $(e) {
3571
- let t = e.options.ssr?.nonce, n = e.stores.activeMatchesSnapshot.state, r = Ar(n), i = jr(n, t), a = Mr(n, t), o = Nr(e, n, t), s = Pr(e, n, t), c = Fr(n, t), l = Ir(n, t), u = Lr(n, t), d = Rr(e, n, t);
3590
+ let t = e.options.ssr?.nonce, n = e.stores.matches.get(), r = zr(n), i = Br(n, t), a = Vr(n, t), o = Hr(e, n, t), s = Ur(e, n, t), c = Wr(n, t), l = Gr(n, t), u = Kr(n, t), d = qr(e, n, t);
3572
3591
  return {
3573
3592
  title: r,
3574
- head: gr([
3593
+ head: Tr([
3575
3594
  ...i,
3576
3595
  ...s,
3577
3596
  ...a,
3578
3597
  ...o,
3579
3598
  ...c,
3580
3599
  ...l
3581
- ].flatMap((e) => mr(e))),
3582
- body: gr([...u, ...d].flatMap((e) => mr(e)))
3600
+ ].flatMap((e) => Cr(e))),
3601
+ body: Tr([...u, ...d].flatMap((e) => Cr(e)))
3583
3602
  };
3584
3603
  }
3585
- function kr(e) {
3586
- return Or($(e), Dr(e));
3604
+ function Rr(e) {
3605
+ return Lr($(e), Ir(e));
3587
3606
  }
3588
- function Ar(e) {
3589
- let t = zr(e);
3607
+ function zr(e) {
3608
+ let t = Jr(e);
3590
3609
  for (let e = t.length - 1; e >= 0; e--) {
3591
3610
  let n = t[e];
3592
3611
  for (let e = n.length - 1; e >= 0; e--) {
@@ -3595,8 +3614,8 @@ function Ar(e) {
3595
3614
  }
3596
3615
  }
3597
3616
  }
3598
- function jr(e, t) {
3599
- let n = zr(e), r = [], i = {};
3617
+ function Br(e, t) {
3618
+ let n = Jr(e), r = [], i = {};
3600
3619
  for (let e = n.length - 1; e >= 0; e--) {
3601
3620
  let a = n[e];
3602
3621
  for (let e = a.length - 1; e >= 0; e--) {
@@ -3611,7 +3630,7 @@ function jr(e, t) {
3611
3630
  type: "application/ld+json",
3612
3631
  nonce: t
3613
3632
  },
3614
- children: fe(e)
3633
+ children: he(e)
3615
3634
  });
3616
3635
  } catch {}
3617
3636
  continue;
@@ -3638,7 +3657,7 @@ function jr(e, t) {
3638
3657
  }
3639
3658
  }), r.reverse(), r;
3640
3659
  }
3641
- function Mr(e, t) {
3660
+ function Vr(e, t) {
3642
3661
  return e.map((e) => e.links).filter(Boolean).flat(1).map((e) => ({
3643
3662
  tag: "link",
3644
3663
  attrs: {
@@ -3647,7 +3666,7 @@ function Mr(e, t) {
3647
3666
  }
3648
3667
  }));
3649
3668
  }
3650
- function Nr(e, t, n) {
3669
+ function Hr(e, t, n) {
3651
3670
  return t.map((t) => e.ssr?.manifest?.routes[t.routeId]?.assets ?? []).filter(Boolean).flat(1).filter((e) => e.tag === "link").map((e) => ({
3652
3671
  tag: "link",
3653
3672
  attrs: {
@@ -3657,7 +3676,7 @@ function Nr(e, t, n) {
3657
3676
  }
3658
3677
  }));
3659
3678
  }
3660
- function Pr(e, t, n) {
3679
+ function Ur(e, t, n) {
3661
3680
  let r = [];
3662
3681
  return t.map((t) => e.looseRoutesById[t.routeId]).forEach((t) => e.ssr?.manifest?.routes[t.id]?.preloads?.filter(Boolean).forEach((e) => {
3663
3682
  r.push({
@@ -3670,7 +3689,7 @@ function Pr(e, t, n) {
3670
3689
  });
3671
3690
  })), r;
3672
3691
  }
3673
- function Fr(e, t) {
3692
+ function Wr(e, t) {
3674
3693
  return e.map((e) => e.styles).flat(1).filter(Boolean).map(({ children: e, ...n }) => ({
3675
3694
  tag: "style",
3676
3695
  attrs: {
@@ -3680,7 +3699,7 @@ function Fr(e, t) {
3680
3699
  children: typeof e == "string" ? e : void 0
3681
3700
  }));
3682
3701
  }
3683
- function Ir(e, t) {
3702
+ function Gr(e, t) {
3684
3703
  return e.map((e) => e.headScripts).flat(1).filter(Boolean).map(({ children: e, ...n }) => ({
3685
3704
  tag: "script",
3686
3705
  attrs: {
@@ -3690,7 +3709,7 @@ function Ir(e, t) {
3690
3709
  children: typeof e == "string" ? e : void 0
3691
3710
  }));
3692
3711
  }
3693
- function Lr(e, t) {
3712
+ function Kr(e, t) {
3694
3713
  return e.map((e) => e.scripts).flat(1).filter(Boolean).map(({ children: e, ...n }) => ({
3695
3714
  tag: "script",
3696
3715
  attrs: {
@@ -3701,7 +3720,7 @@ function Lr(e, t) {
3701
3720
  children: typeof e == "string" ? e : void 0
3702
3721
  }));
3703
3722
  }
3704
- function Rr(e, t, n) {
3723
+ function qr(e, t, n) {
3705
3724
  return t.map((t) => e.looseRoutesById[t.routeId]).flatMap((t) => e.ssr?.manifest?.routes[t.id]?.assets?.filter((e) => e.tag === "script").map((e) => ({
3706
3725
  tag: "script",
3707
3726
  attrs: {
@@ -3711,48 +3730,48 @@ function Rr(e, t, n) {
3711
3730
  children: e.children
3712
3731
  })) ?? []);
3713
3732
  }
3714
- function zr(e) {
3733
+ function Jr(e) {
3715
3734
  return e.reduce((e, t) => (t.meta && e.push(t.meta), e), []);
3716
3735
  }
3717
3736
  //#endregion
3718
3737
  //#region src/document/document-equality.ts
3719
- function Br(e, t) {
3720
- return e.title === t.title && Vr(e.head, t.head) && Vr(e.body, t.body);
3738
+ function Yr(e, t) {
3739
+ return e.title === t.title && Xr(e.head, t.head) && Xr(e.body, t.body);
3721
3740
  }
3722
- function Vr(e, t) {
3741
+ function Xr(e, t) {
3723
3742
  if (e.length !== t.length) return !1;
3724
3743
  for (let n = 0; n < e.length; n++) if (e[n]?.id !== t[n]?.id) return !1;
3725
3744
  return !0;
3726
3745
  }
3727
3746
  //#endregion
3728
3747
  //#region src/document/install-unified-document-sync.ts
3729
- function Hr({ document: e, initialTitle: t, headCollection: n, bodyCollection: r, nextContent: i }) {
3748
+ function Zr({ document: e, initialTitle: t, headCollection: n, bodyCollection: r, nextContent: i }) {
3730
3749
  i.title === void 0 ? e.title = t : e.title = i.title, n.sync(i.head), r.sync(i.body);
3731
3750
  }
3732
- function Ur(t) {
3733
- let n = e.inject(b), r = e.inject(e.RendererFactory2, { optional: !0 }), i = e.inject(e.DestroyRef), a = Y(t.stores.activeMatchesSnapshot, (e) => e), o = r?.createRenderer(null, null) ?? null, s = n.title, c = vr({
3734
- root: n.head,
3751
+ function Qr(e) {
3752
+ let t = n.inject(C), r = n.inject(n.RendererFactory2, { optional: !0 }), i = n.inject(n.DestroyRef), a = J(e.stores.matches, (e) => e), o = r?.createRenderer(null, null) ?? null, s = t.title, c = Dr({
3753
+ root: t.head,
3735
3754
  bucket: "head",
3736
3755
  renderer: o
3737
- }), l = vr({
3738
- root: n.body,
3756
+ }), l = Dr({
3757
+ root: t.body,
3739
3758
  bucket: "body",
3740
3759
  renderer: o
3741
- }), u = Dr(t), d = () => Or($(t), u);
3760
+ }), u = Ir(e), d = () => Lr($(e), u);
3742
3761
  c.mount(), l.mount();
3743
3762
  let f = d();
3744
- Hr({
3745
- document: n,
3763
+ Zr({
3764
+ document: t,
3746
3765
  initialTitle: s,
3747
3766
  headCollection: c,
3748
3767
  bodyCollection: l,
3749
3768
  nextContent: f
3750
3769
  });
3751
- let p = e.effect(() => {
3770
+ let p = n.effect(() => {
3752
3771
  a();
3753
3772
  let e = d();
3754
- Br(f, e) || (f = e, Hr({
3755
- document: n,
3773
+ Yr(f, e) || (f = e, Zr({
3774
+ document: t,
3756
3775
  initialTitle: s,
3757
3776
  headCollection: c,
3758
3777
  bodyCollection: l,
@@ -3760,150 +3779,148 @@ function Ur(t) {
3760
3779
  }));
3761
3780
  });
3762
3781
  i.onDestroy(() => {
3763
- p.destroy(), c.destroy(), l.destroy(), n.title = s;
3782
+ p.destroy(), c.destroy(), l.destroy(), t.title = s;
3764
3783
  });
3765
3784
  }
3766
3785
  //#endregion
3767
3786
  //#region src/document/provide-tanstack-body-managed-tags.ts
3768
- function Wr(t) {
3769
- let n = e.inject(b), r = e.inject(e.RendererFactory2, { optional: !0 }), i = e.inject(e.DestroyRef), a = Y(t.stores.activeMatchesSnapshot, (e) => e), o = Dr(t), s = () => o.length === 0 ? $(t).body : gr([...o, ...$(t).body]), c = r?.createRenderer(null, null) ?? null, l = vr({
3770
- root: n.body,
3787
+ function $r(e) {
3788
+ let t = n.inject(C), r = n.inject(n.RendererFactory2, { optional: !0 }), i = n.inject(n.DestroyRef), a = J(e.stores.matches, (e) => e), o = Ir(e), s = () => o.length === 0 ? $(e).body : Tr([...o, ...$(e).body]), c = r?.createRenderer(null, null) ?? null, l = Dr({
3789
+ root: t.body,
3771
3790
  bucket: "body",
3772
3791
  renderer: c
3773
3792
  });
3774
3793
  l.mount();
3775
3794
  let u = s();
3776
3795
  l.sync(u);
3777
- let d = e.effect(() => {
3796
+ let d = n.effect(() => {
3778
3797
  a();
3779
3798
  let e = s();
3780
- Vr(u, e) || (u = e, l.sync(e));
3799
+ Xr(u, e) || (u = e, l.sync(e));
3781
3800
  });
3782
3801
  i.onDestroy(() => {
3783
3802
  d.destroy(), l.destroy();
3784
3803
  });
3785
3804
  }
3786
- function Gr() {
3787
- Wr(e.inject(Q));
3805
+ function ei() {
3806
+ $r(n.inject(Q));
3788
3807
  }
3789
- function Kr(t) {
3790
- return e.makeEnvironmentProviders([{
3808
+ function ti(e) {
3809
+ return n.makeEnvironmentProviders([{
3791
3810
  provide: Q,
3792
- useValue: t
3793
- }, e.provideEnvironmentInitializer(Gr)]);
3811
+ useValue: e
3812
+ }, n.provideEnvironmentInitializer(ei)]);
3794
3813
  }
3795
3814
  //#endregion
3796
3815
  //#region src/document/provide-tanstack-document-title.ts
3797
- function qr(t) {
3798
- let n = e.inject(b), r = e.inject(e.DestroyRef), i = Y(t.stores.activeMatchesSnapshot, (e) => e), a = n.title, o = $(t).title, s = (e) => {
3799
- e === void 0 ? n.title = a : n.title = e;
3816
+ function ni(e) {
3817
+ let t = n.inject(C), r = n.inject(n.DestroyRef), i = J(e.stores.matches, (e) => e), a = t.title, o = $(e).title, s = (e) => {
3818
+ e === void 0 ? t.title = a : t.title = e;
3800
3819
  };
3801
3820
  s(o);
3802
- let c = e.effect(() => {
3821
+ let c = n.effect(() => {
3803
3822
  i();
3804
- let e = $(t).title;
3805
- e !== o && (o = e, s(e));
3823
+ let t = $(e).title;
3824
+ t !== o && (o = t, s(t));
3806
3825
  });
3807
3826
  r.onDestroy(() => {
3808
- c.destroy(), n.title = a;
3827
+ c.destroy(), t.title = a;
3809
3828
  });
3810
3829
  }
3811
- function Jr() {
3812
- qr(e.inject(Q));
3830
+ function ri() {
3831
+ ni(n.inject(Q));
3813
3832
  }
3814
- function Yr(t) {
3815
- return e.makeEnvironmentProviders([{
3833
+ function ii(e) {
3834
+ return n.makeEnvironmentProviders([{
3816
3835
  provide: Q,
3817
- useValue: t
3818
- }, e.provideEnvironmentInitializer(Jr)]);
3836
+ useValue: e
3837
+ }, n.provideEnvironmentInitializer(ri)]);
3819
3838
  }
3820
3839
  //#endregion
3821
3840
  //#region src/document/provide-tanstack-head-managed-tags.ts
3822
- function Xr(t) {
3823
- let n = e.inject(b), r = e.inject(e.RendererFactory2, { optional: !0 }), i = e.inject(e.DestroyRef), a = Y(t.stores.activeMatchesSnapshot, (e) => e), o = r?.createRenderer(null, null) ?? null, s = vr({
3824
- root: n.head,
3841
+ function ai(e) {
3842
+ let t = n.inject(C), r = n.inject(n.RendererFactory2, { optional: !0 }), i = n.inject(n.DestroyRef), a = J(e.stores.matches, (e) => e), o = r?.createRenderer(null, null) ?? null, s = Dr({
3843
+ root: t.head,
3825
3844
  bucket: "head",
3826
3845
  renderer: o
3827
3846
  });
3828
3847
  s.mount();
3829
- let c = $(t).head;
3848
+ let c = $(e).head;
3830
3849
  s.sync(c);
3831
- let l = e.effect(() => {
3850
+ let l = n.effect(() => {
3832
3851
  a();
3833
- let e = $(t).head;
3834
- Vr(c, e) || (c = e, s.sync(e));
3852
+ let t = $(e).head;
3853
+ Xr(c, t) || (c = t, s.sync(t));
3835
3854
  });
3836
3855
  i.onDestroy(() => {
3837
3856
  l.destroy(), s.destroy();
3838
3857
  });
3839
3858
  }
3840
- function Zr() {
3841
- Xr(e.inject(Q));
3859
+ function oi() {
3860
+ ai(n.inject(Q));
3842
3861
  }
3843
- function Qr(t) {
3844
- return e.makeEnvironmentProviders([{
3862
+ function si(e) {
3863
+ return n.makeEnvironmentProviders([{
3845
3864
  provide: Q,
3846
- useValue: t
3847
- }, e.provideEnvironmentInitializer(Zr)]);
3865
+ useValue: e
3866
+ }, n.provideEnvironmentInitializer(oi)]);
3848
3867
  }
3849
3868
  //#endregion
3850
3869
  //#region src/document/provide-tanstack-document.ts
3851
- var $r = {
3870
+ var ci = {
3852
3871
  title: !0,
3853
3872
  headTags: !0,
3854
3873
  bodyScripts: !0
3855
3874
  };
3856
- function ei(t, n = {}) {
3875
+ function li(e, t = {}) {
3857
3876
  let r = {
3858
- ...$r,
3859
- ...n
3877
+ ...ci,
3878
+ ...t
3860
3879
  }, i = r.title && r.headTags && r.bodyScripts;
3861
- return e.makeEnvironmentProviders([{
3880
+ return n.makeEnvironmentProviders([{
3862
3881
  provide: Q,
3863
- useValue: t
3864
- }, e.provideEnvironmentInitializer(() => {
3882
+ useValue: e
3883
+ }, n.provideEnvironmentInitializer(() => {
3865
3884
  if (i) {
3866
- Ur(t);
3885
+ Qr(e);
3867
3886
  return;
3868
3887
  }
3869
- r.title && qr(t), r.headTags && Xr(t), r.bodyScripts && Wr(t);
3888
+ r.title && ni(e), r.headTags && ai(e), r.bodyScripts && $r(e);
3870
3889
  })]);
3871
3890
  }
3872
- function ti(e) {
3873
- return ei(e);
3891
+ function ui(e) {
3892
+ return li(e);
3874
3893
  }
3875
3894
  //#endregion
3876
3895
  //#region src/injectMatches.ts
3877
- function ni(t) {
3878
- let n = Y(J().stores.activeMatchesSnapshot, (e) => e);
3879
- return e.computed(() => {
3880
- let e = n();
3881
- return t?.select ? t.select(e) : e;
3882
- }, { equal: O });
3883
- }
3884
- function ri(t) {
3885
- let n = e.inject(q);
3886
- return ni({ select: (e) => {
3887
- let r = e.slice(0, e.findIndex((e) => e.id === n.matchId()));
3888
- return t?.select ? t.select(r) : r;
3896
+ function di(e) {
3897
+ return J(q().stores.matches, (t) => {
3898
+ let n = t;
3899
+ return e?.select ? e.select(n) : n;
3900
+ }, { equal: k });
3901
+ }
3902
+ function fi(e) {
3903
+ let t = n.inject(K);
3904
+ return di({ select: (n) => {
3905
+ let r = n.slice(0, n.findIndex((e) => e.id === t.matchId()));
3906
+ return e?.select ? e.select(r) : r;
3889
3907
  } });
3890
3908
  }
3891
- function ii(t) {
3892
- let n = e.inject(q);
3893
- return ni({ select: (e) => {
3894
- let r = e.slice(e.findIndex((e) => e.id === n.matchId()) + 1);
3895
- return t?.select ? t.select(r) : r;
3909
+ function pi(e) {
3910
+ let t = n.inject(K);
3911
+ return di({ select: (n) => {
3912
+ let r = n.slice(n.findIndex((e) => e.id === t.matchId()) + 1);
3913
+ return e?.select ? e.select(r) : r;
3896
3914
  } });
3897
3915
  }
3898
3916
  //#endregion
3899
3917
  //#region src/injectMatchRoute.ts
3900
- function ai() {
3901
- let t = J(), n = Y(t.stores.matchRouteReactivity, (e) => e);
3902
- return (r) => e.computed(() => {
3903
- n();
3904
- let { pending: e, caseSensitive: i, fuzzy: a, includeSearch: o, ...s } = r;
3905
- return t.matchRoute(s, {
3906
- pending: e,
3918
+ function mi() {
3919
+ let e = q(), t = J(e.stores.matchRouteDeps, (e) => e);
3920
+ return (r) => n.computed(() => {
3921
+ let { pending: n, caseSensitive: i, fuzzy: a, includeSearch: o, ...s } = r;
3922
+ return t(), e.matchRoute(s, {
3923
+ pending: n,
3907
3924
  caseSensitive: i,
3908
3925
  fuzzy: a,
3909
3926
  includeSearch: o
@@ -3911,14 +3928,21 @@ function ai() {
3911
3928
  });
3912
3929
  }
3913
3930
  //#endregion
3931
+ //#region src/injectIsShell.ts
3932
+ function hi() {
3933
+ let e = q();
3934
+ return p(() => e.isShell());
3935
+ }
3936
+ //#endregion
3914
3937
  //#region src/injectLocation.ts
3915
- function oi(e) {
3916
- return Y(J().stores.location, (t) => e?.select ? e.select(t) : t, { equal: O });
3938
+ function gi(e) {
3939
+ let t = q();
3940
+ return e?.select ? J(t.stores.location, e.select, { equal: k }) : J(t.stores.location);
3917
3941
  }
3918
3942
  //#endregion
3919
3943
  //#region src/injectBlocker.ts
3920
- function si(t) {
3921
- let { shouldBlockFn: n, enableBeforeUnload: r = !0, disabled: i = !1, withResolver: a = !1 } = t, o = J(), { history: s } = o, c = e.signal({
3944
+ function _i(e) {
3945
+ let { shouldBlockFn: t, enableBeforeUnload: r = !0, disabled: i = !1, withResolver: a = !1 } = e, o = q(), { history: s } = o, c = n.signal({
3922
3946
  status: "idle",
3923
3947
  current: void 0,
3924
3948
  next: void 0,
@@ -3926,10 +3950,10 @@ function si(t) {
3926
3950
  proceed: void 0,
3927
3951
  reset: void 0
3928
3952
  });
3929
- return e.effect((e) => {
3930
- let t = (typeof i == "function" ? i() : i) ? void 0 : s.block({
3953
+ return n.effect((e) => {
3954
+ let n = (typeof i == "function" ? i() : i) ? void 0 : s.block({
3931
3955
  blockerFn: async (e) => {
3932
- function t(e) {
3956
+ function n(e) {
3933
3957
  let t = o.parseLocation(e), n = o.getMatchedRoutes(t.pathname);
3934
3958
  return n.foundRoute === void 0 ? {
3935
3959
  routeId: "__notFound__",
@@ -3945,9 +3969,9 @@ function si(t) {
3945
3969
  search: t.search
3946
3970
  };
3947
3971
  }
3948
- let r = t(e.currentLocation), i = t(e.nextLocation);
3972
+ let r = n(e.currentLocation), i = n(e.nextLocation);
3949
3973
  if (r.routeId === "__notFound__" && i.routeId !== "__notFound__") return !1;
3950
- let s = await n({
3974
+ let s = await t({
3951
3975
  action: e.action,
3952
3976
  current: r,
3953
3977
  next: i
@@ -3975,80 +3999,80 @@ function si(t) {
3975
3999
  },
3976
4000
  enableBeforeUnload: r
3977
4001
  });
3978
- e(() => t?.());
4002
+ e(() => n?.());
3979
4003
  }), c.asReadonly();
3980
4004
  }
3981
4005
  //#endregion
3982
4006
  //#region src/injectCanGoBack.ts
3983
- function ci() {
3984
- return Y(J().stores.location, (e) => e.state.__TSR_index !== 0);
4007
+ function vi() {
4008
+ return J(q().stores.location, (e) => (e.state?.__TSR_index ?? 0) !== 0);
3985
4009
  }
3986
4010
  //#endregion
3987
4011
  //#region src/injectIntersectionObserver.ts
3988
- function li(t, n, r) {
3989
- let i = e.inject(e.ElementRef);
3990
- e.afterRenderEffect((e) => {
4012
+ function yi(e, t, r) {
4013
+ let i = n.inject(n.ElementRef);
4014
+ n.afterRenderEffect((n) => {
3991
4015
  let a = typeof IntersectionObserver == "function", o = i.nativeElement;
3992
4016
  if (!o || !a || r()) return;
3993
- let s = new IntersectionObserver(([e]) => t(e), n);
3994
- s.observe(o), e(() => {
4017
+ let s = new IntersectionObserver(([t]) => e(t), t);
4018
+ s.observe(o), n(() => {
3995
4019
  s.disconnect();
3996
4020
  });
3997
4021
  });
3998
4022
  }
3999
4023
  //#endregion
4000
4024
  //#region src/Link.ts
4001
- var ui = class t {
4025
+ var bi = class e {
4002
4026
  constructor() {
4003
- this.passiveEvents = fi(() => ({ touchstart: this.handleTouchStart })), this.options = m.required({ alias: "link" }), this.router = J(), this.isTransitioning = v(!1), this.from = d(() => y(() => this.options().from)), this.disabled = d(() => this._options().disabled ?? !1), this.target = d(() => this._options().target), this._options = d(() => ({
4027
+ this.passiveEvents = Si(() => ({ touchstart: this.handleTouchStart })), this.options = g.required({ alias: "link" }), this.router = q(), this.isTransitioning = x(!1), this.from = p(() => S(() => this.options().from)), this.disabled = p(() => this._options().disabled ?? !1), this.target = p(() => this._options().target), this._options = p(() => ({
4004
4028
  ...this.options(),
4005
4029
  from: this.from()
4006
- })), this.nextLocation = d(() => {
4030
+ })), this.nextLocation = p(() => {
4007
4031
  let e = this.location();
4008
4032
  return this.router.buildLocation({
4009
4033
  _fromLocation: e,
4010
4034
  ...this._options()
4011
4035
  });
4012
- }), this.hrefOption = d(() => {
4036
+ }), this.hrefOption = p(() => {
4013
4037
  if (this._options().disabled) return;
4014
4038
  let e = this.nextLocation().maskedLocation ?? this.nextLocation(), t = e.external;
4015
4039
  return {
4016
4040
  href: t ? e.publicHref : this.router.history.createHref(e.publicHref) || "/",
4017
4041
  external: t
4018
4042
  };
4019
- }), this.externalLink = d(() => {
4043
+ }), this.externalLink = p(() => {
4020
4044
  let e = this.hrefOption();
4021
4045
  if (e?.external) return e.href;
4022
4046
  try {
4023
4047
  return new URL(this.options().to), this.options().to;
4024
4048
  } catch {}
4025
- }), this.preload = d(() => this.options().reloadDocument ? !1 : this.options().preload ?? this.router.options.defaultPreload), this.preloadDelay = d(() => this.options().preloadDelay ?? this.router.options.defaultPreloadDelay ?? 0), this.location = oi(), this.isActiveProps = d(() => {
4049
+ }), this.preload = p(() => this.options().reloadDocument ? !1 : this.options().preload ?? this.router.options.defaultPreload), this.preloadDelay = p(() => this.options().preloadDelay ?? this.router.options.defaultPreloadDelay ?? 0), this.location = gi(), this.isActiveProps = p(() => {
4026
4050
  let e = this.options(), t = this.isActive() ? e.activeProps : e.inactiveProps;
4027
4051
  if (!(!t || typeof t != "object")) return t;
4028
- }), this.isActive = d(() => {
4052
+ }), this.isActive = p(() => {
4029
4053
  if (this.externalLink()) return !1;
4030
4054
  let e = this.options().activeOptions;
4031
4055
  if (e?.exact) {
4032
- if (!Be(this.location().pathname, this.nextLocation().pathname, this.router.basepath)) return !1;
4056
+ if (!qe(this.location().pathname, this.nextLocation().pathname, this.router.basepath)) return !1;
4033
4057
  } else {
4034
- let e = ze(this.location().pathname, this.router.basepath), t = ze(this.nextLocation().pathname, this.router.basepath);
4058
+ let e = Ke(this.location().pathname, this.router.basepath), t = Ke(this.nextLocation().pathname, this.router.basepath);
4035
4059
  if (!(e.startsWith(t) && (e.length === t.length || e[t.length] === "/"))) return !1;
4036
4060
  }
4037
- return (e?.includeSearch ?? !0) && !O(this.location().search, this.nextLocation().search, {
4061
+ return (e?.includeSearch ?? !0) && !k(this.location().search, this.nextLocation().search, {
4038
4062
  partial: !e?.exact,
4039
4063
  ignoreUndefined: !e?.explicitUndefined
4040
4064
  }) ? !1 : e?.includeHash ? this.location().hash === this.nextLocation().hash : !0;
4041
4065
  }), this.doPreload = () => {
4042
4066
  this.router.preloadRoute(this.options()).catch((e) => {
4043
- console.warn(e), console.warn(an);
4067
+ console.warn(e), console.warn(fn);
4044
4068
  });
4045
4069
  }, this.preloadViewportIoCallback = (e) => {
4046
4070
  e?.isIntersecting && this.doPreload();
4047
- }, this.viewportPreloader = li(this.preloadViewportIoCallback, { rootMargin: "100px" }, () => !!this._options().disabled || this.preload() !== "viewport"), this.hasRenderFetched = !1, this.rendererPreloader = f(() => {
4071
+ }, this.viewportPreloader = yi(this.preloadViewportIoCallback, { rootMargin: "100px" }, () => !!this._options().disabled || this.preload() !== "viewport"), this.hasRenderFetched = !1, this.rendererPreloader = m(() => {
4048
4072
  this.hasRenderFetched || !this._options().disabled && this.preload() === "render" && (this.doPreload(), this.hasRenderFetched = !0);
4049
4073
  }), this.handleClick = (e) => {
4050
4074
  let t = e.currentTarget.getAttribute("target"), n = this._options().target, r = n === void 0 ? t : n;
4051
- if (!this._options().disabled && !di(e) && !e.defaultPrevented && (!r || r === "_self") && e.button === 0) {
4075
+ if (!this._options().disabled && !xi(e) && !e.defaultPrevented && (!r || r === "_self") && e.button === 0) {
4052
4076
  e.preventDefault(), this.isTransitioning.set(!0);
4053
4077
  let t = this.router.subscribe("onResolved", () => {
4054
4078
  t(), this.isTransitioning.set(!1);
@@ -4075,33 +4099,33 @@ var ui = class t {
4075
4099
  };
4076
4100
  }
4077
4101
  static {
4078
- this.ɵfac = function(e) {
4079
- return new (e || t)();
4102
+ this.ɵfac = function(t) {
4103
+ return new (t || e)();
4080
4104
  };
4081
4105
  }
4082
4106
  static {
4083
- this.ɵdir = /* @__PURE__ */ e.ɵɵdefineDirective({
4084
- type: t,
4107
+ this.ɵdir = /* @__PURE__ */ n.ɵɵdefineDirective({
4108
+ type: e,
4085
4109
  selectors: [[
4086
4110
  "a",
4087
4111
  "link",
4088
4112
  ""
4089
4113
  ]],
4090
4114
  hostVars: 11,
4091
- hostBindings: function(t, n) {
4092
- if (t & 1 && e.ɵɵlistener("click", function(e) {
4093
- return n.handleClick(e);
4115
+ hostBindings: function(e, t) {
4116
+ if (e & 1 && n.ɵɵlistener("click", function(e) {
4117
+ return t.handleClick(e);
4094
4118
  })("focus", function() {
4095
- return n.handleFocus();
4119
+ return t.handleFocus();
4096
4120
  })("mouseenter", function(e) {
4097
- return n.handleEnter(e);
4121
+ return t.handleEnter(e);
4098
4122
  })("mouseover", function(e) {
4099
- return n.handleEnter(e);
4123
+ return t.handleEnter(e);
4100
4124
  })("mouseleave", function(e) {
4101
- return n.handleLeave(e);
4102
- }), t & 2) {
4103
- let t, r, i;
4104
- e.ɵɵdomProperty("href", (t = n.hrefOption()) == null ? null : t.href), e.ɵɵattribute("target", n.target())("role", n.disabled() ? "link" : void 0)("aria-disabled", n.disabled())("data-status", n.isActive() ? "active" : void 0)("aria-current", n.isActive() ? "page" : void 0)("data-transitioning", n.isTransitioning() ? "transitioning" : void 0), e.ɵɵstyleMap((r = n.isActiveProps()) == null ? null : r.style), e.ɵɵclassMap((i = n.isActiveProps()) == null ? null : i.class);
4125
+ return t.handleLeave(e);
4126
+ }), e & 2) {
4127
+ let e, r, i;
4128
+ n.ɵɵdomProperty("href", (e = t.hrefOption()) == null ? null : e.href), n.ɵɵattribute("target", t.target())("role", t.disabled() ? "link" : void 0)("aria-disabled", t.disabled())("data-status", t.isActive() ? "active" : void 0)("aria-current", t.isActive() ? "page" : void 0)("data-transitioning", t.isTransitioning() ? "transitioning" : void 0), n.ɵɵstyleMap((r = t.isActiveProps()) == null ? null : r.style), n.ɵɵclassMap((i = t.isActiveProps()) == null ? null : i.class);
4105
4129
  }
4106
4130
  },
4107
4131
  inputs: { options: [
@@ -4113,19 +4137,19 @@ var ui = class t {
4113
4137
  });
4114
4138
  }
4115
4139
  };
4116
- function di(e) {
4140
+ function xi(e) {
4117
4141
  return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
4118
4142
  }
4119
- function fi(e) {
4120
- let t = p(r).nativeElement, i = p(n), a = p(s), o = [];
4121
- l(() => {
4122
- for (let [n, r] of Object.entries(e())) {
4123
- let e = a.listen(t, n, r, { passive: !0 });
4143
+ function Si(e) {
4144
+ let t = h(a).nativeElement, n = h(i), r = h(l), o = [];
4145
+ d(() => {
4146
+ for (let [n, i] of Object.entries(e())) {
4147
+ let e = r.listen(t, n, i, { passive: !0 });
4124
4148
  o.push(e);
4125
4149
  }
4126
- }), i.onDestroy(() => {
4150
+ }), n.onDestroy(() => {
4127
4151
  for (; o.length;) o.pop()?.();
4128
4152
  });
4129
4153
  }
4130
4154
  //#endregion
4131
- export { zn as LazyRoute, ui as Link, or as Matches, Fn as NotFoundRoute, Qn as Outlet, Nn as RootRoute, An as Route, kn as RouteApi, Zn as RouteMatch, _n as Router, dr as RouterProvider, kr as buildManagedDocumentContent, $ as buildMatchManagedDocumentContent, Bt as createBrowserHistory, Ln as createFileRoute, Vt as createHashHistory, Rt as createHistory, Vn as createLazyFileRoute, Bn as createLazyRoute, Ht as createMemoryHistory, In as createRootRoute, Mn as createRootRouteWithContext, jn as createRoute, Pn as createRouteMask, gn as createRouter, ln as createRouterConfig, On as getRouteApi, si as injectBlocker, ci as injectCanGoBack, ii as injectChildMatches, qn as injectErrorState, Sn as injectLoaderData, Cn as injectLoaderDeps, oi as injectLocation, X as injectMatch, ai as injectMatchRoute, ni as injectMatches, wn as injectNavigate, Tn as injectParams, ri as injectParentMatches, En as injectRouteContext, J as injectRouter, Jn as injectRouterState, Dn as injectSearch, nr as injectSsrScrollRestorationScript, Y as injectStore, z as isRedirect, Xt as lazyFn, Ke as notFound, ti as provideHeadContent, Kr as provideTanstackBodyManagedTags, ei as provideTanstackDocument, Yr as provideTanstackDocumentTitle, Qr as provideTanstackHeadManagedTags, ur as provideTanstackRouter, ut as redirect, un as retainSearchParams };
4155
+ export { Gn as LazyRoute, bi as Link, hr as Matches, Vn as NotFoundRoute, or as Outlet, zn as RootRoute, In as Route, Fn as RouteApi, ar as RouteMatch, Sn as Router, br as RouterProvider, Rr as buildManagedDocumentContent, $ as buildMatchManagedDocumentContent, qt as createBrowserHistory, Un as createFileRoute, Jt as createHashHistory, Gt as createHistory, qn as createLazyFileRoute, Kn as createLazyRoute, Yt as createMemoryHistory, Hn as createRootRoute, Rn as createRootRouteWithContext, Ln as createRoute, Bn as createRouteMask, xn as createRouter, gn as createRouterConfig, Pn as getRouteApi, _i as injectBlocker, vi as injectCanGoBack, pi as injectChildMatches, $n as injectErrorState, hi as injectIsShell, kn as injectLoaderData, An as injectLoaderDeps, gi as injectLocation, Y as injectMatch, mi as injectMatchRoute, di as injectMatches, X as injectNavigate, jn as injectParams, fi as injectParentMatches, Mn as injectRouteContext, q as injectRouter, er as injectRouterState, Nn as injectSearch, dr as injectSsrScrollRestorationScript, J as injectStore, R as isRedirect, rn as lazyFn, $e as notFound, ui as provideHeadContent, ti as provideTanstackBodyManagedTags, li as provideTanstackDocument, ii as provideTanstackDocumentTitle, si as provideTanstackHeadManagedTags, yr as provideTanstackRouter, _t as redirect, _n as retainSearchParams };