@argon-router/core 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { createEffect as R, createStore as A, createEvent as x, sample as w, split as ue, attach as z, scopeBind as le, withFactory as de } from "effector";
2
- import { spread as pe } from "patronum";
3
- function K(e, t) {
1
+ import { createEffect as K, createStore as B, createEvent as E, sample as S, split as we, attach as J, scopeBind as xe, withFactory as Oe } from "effector";
2
+ import { spread as Fe } from "patronum";
3
+ function Z(e, t) {
4
4
  var r = Object.keys(e);
5
5
  if (Object.getOwnPropertySymbols) {
6
6
  var n = Object.getOwnPropertySymbols(e);
@@ -10,29 +10,29 @@ function K(e, t) {
10
10
  }
11
11
  return r;
12
12
  }
13
- function T(e) {
13
+ function H(e) {
14
14
  for (var t = 1; t < arguments.length; t++) {
15
15
  var r = arguments[t] != null ? arguments[t] : {};
16
- t % 2 ? K(Object(r), !0).forEach(function(n) {
17
- me(e, n, r[n]);
18
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : K(Object(r)).forEach(function(n) {
16
+ t % 2 ? Z(Object(r), !0).forEach(function(n) {
17
+ $e(e, n, r[n]);
18
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Z(Object(r)).forEach(function(n) {
19
19
  Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
20
20
  });
21
21
  }
22
22
  return e;
23
23
  }
24
- function me(e, t, r) {
25
- return (t = ye(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
24
+ function $e(e, t, r) {
25
+ return (t = je(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
26
26
  }
27
- function ye(e) {
28
- var t = ge(e, "string");
27
+ function je(e) {
28
+ var t = Se(e, "string");
29
29
  return typeof t == "symbol" ? t : t + "";
30
30
  }
31
- function ge(e, t) {
31
+ function Se(e, t) {
32
32
  if (typeof e != "object" || !e) return e;
33
33
  var r = e[Symbol.toPrimitive];
34
34
  if (r !== void 0) {
35
- var n = r.call(e, t || "default");
35
+ var n = r.call(e, t);
36
36
  if (typeof n != "object") return n;
37
37
  throw new TypeError("@@toPrimitive must return a primitive value.");
38
38
  }
@@ -40,461 +40,473 @@ function ge(e, t) {
40
40
  }
41
41
  function We(e) {
42
42
  let t;
43
- const r = R(() => {
44
- var d;
45
- return (d = t) === null || d === void 0 ? void 0 : d();
43
+ const r = K(() => {
44
+ var y;
45
+ return (y = t) === null || y === void 0 ? void 0 : y();
46
46
  }, {
47
47
  name: "waitForAsyncBundleFx",
48
48
  sid: "tw7mq7"
49
- }), n = R(async () => {
50
- for (const O of (d = e.beforeOpen) !== null && d !== void 0 ? d : []) {
51
- var d;
52
- await O();
49
+ }), n = K(async () => {
50
+ for (const k of (y = e.beforeOpen) !== null && y !== void 0 ? y : []) {
51
+ var y;
52
+ await k();
53
53
  }
54
54
  }, {
55
55
  name: "beforeOpenFx",
56
56
  sid: "ls74w9"
57
- }), a = R(async (d) => {
57
+ }), a = K(async (y) => {
58
58
  await r(), await n();
59
- const O = e.parent;
60
- return O && await O.internal.openFx(T(T({}, d ?? {
59
+ const k = e.parent;
60
+ return k && await k.internal.openFx(H(H({}, y ?? {
61
61
  params: {}
62
62
  }), {}, {
63
63
  historyIgnore: !0
64
- })), d;
64
+ })), y;
65
65
  }, {
66
66
  name: "openFx",
67
67
  sid: "-hz9h5i"
68
- }), s = A({}, {
68
+ }), f = B({}, {
69
69
  name: "$params",
70
- sid: "gwsfoy"
71
- }), o = A(!1, {
70
+ sid: "rstqrf"
71
+ }), c = B(!1, {
72
72
  name: "$isOpened",
73
- sid: "ym3mgh"
74
- }), i = a.pending, c = x({
73
+ sid: "-zgx6q9"
74
+ }), u = a.pending, F = E({
75
75
  name: "open",
76
- sid: "-da1fdx"
77
- }), u = x({
76
+ sid: "-cby6lj"
77
+ }), D = E({
78
78
  name: "close",
79
- sid: "6wt8sn"
80
- }), m = x({
79
+ sid: "7uwhl1"
80
+ }), v = E({
81
81
  name: "opened",
82
- sid: "36opn9"
83
- }), y = x({
82
+ sid: "44ryfn"
83
+ }), P = E({
84
84
  name: "openedOnServer",
85
- sid: "-qpnfqf"
86
- }), h = x({
85
+ sid: "-prk6y1"
86
+ }), A = E({
87
87
  name: "openedOnClient",
88
- sid: "-qs3xog"
89
- }), F = x({
88
+ sid: "-fw2mlz"
89
+ }), $ = E({
90
90
  name: "closed",
91
- sid: "2gopr"
91
+ sid: "10jxi5"
92
92
  });
93
- return w({
93
+ S({
94
94
  and: [{
95
- clock: c,
95
+ clock: F,
96
96
  target: a
97
97
  }],
98
98
  or: {
99
- sid: "t6sc35"
99
+ sid: "t7vx9v"
100
100
  }
101
- }), ue({
101
+ });
102
+ const j = {};
103
+ return S({
104
+ and: [{
105
+ clock: a.doneData,
106
+ fn: (y) => y && "params" in y ? H({}, y.params) : j,
107
+ target: f
108
+ }],
109
+ or: {
110
+ sid: "tna5vz"
111
+ }
112
+ }), we({
102
113
  and: [{
103
114
  source: a.doneData,
104
115
  match: () => typeof window > "u" ? "server" : "client",
105
116
  cases: {
106
- server: y,
107
- client: h
117
+ server: P,
118
+ client: A
108
119
  }
109
120
  }],
110
121
  or: {
111
- sid: "t9jb1y"
122
+ sid: "u5fdgw"
112
123
  }
113
- }), w({
124
+ }), S({
114
125
  and: [{
115
- clock: [h, y],
116
- target: m
126
+ clock: [A, P],
127
+ target: v
117
128
  }],
118
129
  or: {
119
- sid: "tqkxg5"
130
+ sid: "ylqojg"
120
131
  }
121
- }), w({
132
+ }), S({
122
133
  and: [{
123
- clock: m,
134
+ clock: v,
124
135
  fn: () => !0,
125
- target: o
136
+ target: c
126
137
  }],
127
138
  or: {
128
- sid: "u4vkvj"
139
+ sid: "yohni9"
129
140
  }
130
- }), w({
141
+ }), S({
131
142
  and: [{
132
- clock: u,
133
- target: F
143
+ clock: D,
144
+ target: $
134
145
  }],
135
146
  or: {
136
- sid: "u86cfp"
147
+ sid: "z3c3j0"
137
148
  }
138
- }), w({
149
+ }), S({
139
150
  and: [{
140
- clock: F,
151
+ clock: $,
141
152
  fn: () => !1,
142
- target: o
153
+ target: c
143
154
  }],
144
155
  or: {
145
- sid: "ylqojg"
156
+ sid: "z632ht"
146
157
  }
147
158
  }), {
148
- $params: s,
149
- $isOpened: o,
150
- $isPending: i,
151
- open: c,
152
- closed: F,
153
- opened: m,
154
- openedOnClient: h,
155
- openedOnServer: y,
156
- internal: T({
157
- close: u,
159
+ $params: f,
160
+ $isOpened: c,
161
+ $isPending: u,
162
+ open: F,
163
+ closed: $,
164
+ opened: v,
165
+ openedOnClient: A,
166
+ openedOnServer: P,
167
+ internal: H({
168
+ close: D,
158
169
  openFx: a,
159
- setAsyncImport: (d) => t = d
170
+ setAsyncImport: (y) => t = y
160
171
  }, e),
161
172
  "@@unitShape": () => ({
162
- params: s,
163
- isPending: i,
164
- isOpened: o,
165
- onOpen: c
173
+ params: f,
174
+ isPending: u,
175
+ isOpened: c,
176
+ onOpen: F
166
177
  })
167
178
  };
168
179
  }
169
- var E = {};
170
- Object.defineProperty(E, "__esModule", {
171
- value: !0
172
- });
173
- E.TokenData = void 0;
174
- E.parse = M;
175
- var he = E.compile = Se, be = E.match = je;
176
- E.pathToRegexp = ee;
177
- E.stringify = Ne;
178
- const _ = "/", q = (e) => e, Y = /^[$_\p{ID_Start}]$/u, L = /^[$\u200c\u200d\p{ID_Continue}]$/u, k = "https://git.new/pathToRegexpError", we = {
179
- // Groups.
180
- "{": "{",
181
- "}": "}",
182
- // Reserved.
183
- "(": "(",
184
- ")": ")",
185
- "[": "[",
186
- "]": "]",
187
- "+": "+",
188
- "?": "?",
189
- "!": "!"
190
- };
191
- function xe(e) {
192
- return e.replace(/[{}()\[\]+?!:*]/g, "\\$&");
193
- }
194
- function $(e) {
195
- return e.replace(/[.+*?^${}()[\]|/\\]/g, "\\$&");
196
- }
197
- function* Fe(e) {
198
- const t = [...e];
199
- let r = 0;
200
- function n() {
201
- let a = "";
202
- if (Y.test(t[++r]))
203
- for (a += t[r]; L.test(t[++r]); )
204
- a += t[r];
205
- else if (t[r] === '"') {
206
- let s = r;
207
- for (; r < t.length; ) {
208
- if (t[++r] === '"') {
209
- r++, s = 0;
210
- break;
180
+ var C = {}, ee;
181
+ function Ee() {
182
+ if (ee) return C;
183
+ ee = 1, Object.defineProperty(C, "__esModule", {
184
+ value: !0
185
+ }), C.TokenData = void 0, C.parse = P, C.compile = A, C.match = y, C.pathToRegexp = k, C.stringify = x;
186
+ const e = "/", t = (i) => i, r = /^[$_\p{ID_Start}]$/u, n = /^[$\u200c\u200d\p{ID_Continue}]$/u, a = "https://git.new/pathToRegexpError", f = {
187
+ // Groups.
188
+ "{": "{",
189
+ "}": "}",
190
+ // Reserved.
191
+ "(": "(",
192
+ ")": ")",
193
+ "[": "[",
194
+ "]": "]",
195
+ "+": "+",
196
+ "?": "?",
197
+ "!": "!"
198
+ };
199
+ function c(i) {
200
+ return i.replace(/[{}()\[\]+?!:*]/g, "\\$&");
201
+ }
202
+ function u(i) {
203
+ return i.replace(/[.+*?^${}()[\]|/\\]/g, "\\$&");
204
+ }
205
+ function* F(i) {
206
+ const o = [...i];
207
+ let s = 0;
208
+ function p() {
209
+ let l = "";
210
+ if (r.test(o[++s]))
211
+ for (l += o[s]; n.test(o[++s]); )
212
+ l += o[s];
213
+ else if (o[s] === '"') {
214
+ let d = s;
215
+ for (; s < o.length; ) {
216
+ if (o[++s] === '"') {
217
+ s++, d = 0;
218
+ break;
219
+ }
220
+ o[s] === "\\" ? l += o[++s] : l += o[s];
211
221
  }
212
- t[r] === "\\" ? a += t[++r] : a += t[r];
222
+ if (d)
223
+ throw new TypeError(`Unterminated quote at ${d}: ${a}`);
213
224
  }
214
- if (s)
215
- throw new TypeError(`Unterminated quote at ${s}: ${k}`);
225
+ if (!l)
226
+ throw new TypeError(`Missing parameter name at ${s}: ${a}`);
227
+ return l;
216
228
  }
217
- if (!a)
218
- throw new TypeError(`Missing parameter name at ${r}: ${k}`);
219
- return a;
220
- }
221
- for (; r < t.length; ) {
222
- const a = t[r], s = we[a];
223
- if (s)
224
- yield {
225
- type: s,
226
- index: r++,
227
- value: a
228
- };
229
- else if (a === "\\")
230
- yield {
231
- type: "ESCAPED",
232
- index: r++,
233
- value: t[r++]
234
- };
235
- else if (a === ":") {
236
- const o = n();
237
- yield {
238
- type: "PARAM",
239
- index: r,
240
- value: o
241
- };
242
- } else if (a === "*") {
243
- const o = n();
244
- yield {
245
- type: "WILDCARD",
246
- index: r,
247
- value: o
248
- };
249
- } else
250
- yield {
251
- type: "CHAR",
252
- index: r,
253
- value: t[r++]
254
- };
229
+ for (; s < o.length; ) {
230
+ const l = o[s], d = f[l];
231
+ if (d)
232
+ yield {
233
+ type: d,
234
+ index: s++,
235
+ value: l
236
+ };
237
+ else if (l === "\\")
238
+ yield {
239
+ type: "ESCAPED",
240
+ index: s++,
241
+ value: o[s++]
242
+ };
243
+ else if (l === ":") {
244
+ const w = p();
245
+ yield {
246
+ type: "PARAM",
247
+ index: s,
248
+ value: w
249
+ };
250
+ } else if (l === "*") {
251
+ const w = p();
252
+ yield {
253
+ type: "WILDCARD",
254
+ index: s,
255
+ value: w
256
+ };
257
+ } else
258
+ yield {
259
+ type: "CHAR",
260
+ index: s,
261
+ value: o[s++]
262
+ };
263
+ }
264
+ return {
265
+ type: "END",
266
+ index: s,
267
+ value: ""
268
+ };
255
269
  }
256
- return {
257
- type: "END",
258
- index: r,
259
- value: ""
260
- };
261
- }
262
- class $e {
263
- constructor(t) {
264
- this.tokens = t;
270
+ class D {
271
+ constructor(o) {
272
+ this.tokens = o;
273
+ }
274
+ peek() {
275
+ if (!this._peek) {
276
+ const o = this.tokens.next();
277
+ this._peek = o.value;
278
+ }
279
+ return this._peek;
280
+ }
281
+ tryConsume(o) {
282
+ const s = this.peek();
283
+ if (s.type === o)
284
+ return this._peek = void 0, s.value;
285
+ }
286
+ consume(o) {
287
+ const s = this.tryConsume(o);
288
+ if (s !== void 0) return s;
289
+ const {
290
+ type: p,
291
+ index: l
292
+ } = this.peek();
293
+ throw new TypeError(`Unexpected ${p} at ${l}, expected ${o}: ${a}`);
294
+ }
295
+ text() {
296
+ let o = "", s;
297
+ for (; s = this.tryConsume("CHAR") || this.tryConsume("ESCAPED"); )
298
+ o += s;
299
+ return o;
300
+ }
265
301
  }
266
- peek() {
267
- if (!this._peek) {
268
- const t = this.tokens.next();
269
- this._peek = t.value;
302
+ class v {
303
+ constructor(o) {
304
+ this.tokens = o;
270
305
  }
271
- return this._peek;
272
306
  }
273
- tryConsume(t) {
274
- const r = this.peek();
275
- if (r.type === t)
276
- return this._peek = void 0, r.value;
307
+ C.TokenData = v;
308
+ function P(i, o = {}) {
309
+ const {
310
+ encodePath: s = t
311
+ } = o, p = new D(F(i));
312
+ function l(w) {
313
+ const h = [];
314
+ for (; ; ) {
315
+ const N = p.text();
316
+ N && h.push({
317
+ type: "text",
318
+ value: s(N)
319
+ });
320
+ const R = p.tryConsume("PARAM");
321
+ if (R) {
322
+ h.push({
323
+ type: "param",
324
+ name: R
325
+ });
326
+ continue;
327
+ }
328
+ const z = p.tryConsume("WILDCARD");
329
+ if (z) {
330
+ h.push({
331
+ type: "wildcard",
332
+ name: z
333
+ });
334
+ continue;
335
+ }
336
+ if (p.tryConsume("{")) {
337
+ h.push({
338
+ type: "group",
339
+ tokens: l("}")
340
+ });
341
+ continue;
342
+ }
343
+ return p.consume(w), h;
344
+ }
345
+ }
346
+ const d = l("END");
347
+ return new v(d);
277
348
  }
278
- consume(t) {
279
- const r = this.tryConsume(t);
280
- if (r !== void 0) return r;
349
+ function A(i, o = {}) {
281
350
  const {
282
- type: n,
283
- index: a
284
- } = this.peek();
285
- throw new TypeError(`Unexpected ${n} at ${a}, expected ${t}: ${k}`);
351
+ encode: s = encodeURIComponent,
352
+ delimiter: p = e
353
+ } = o, l = i instanceof v ? i : P(i, o), d = $(l.tokens, p, s);
354
+ return function(h = {}) {
355
+ const [N, ...R] = d(h);
356
+ if (R.length)
357
+ throw new TypeError(`Missing parameters: ${R.join(", ")}`);
358
+ return N;
359
+ };
286
360
  }
287
- text() {
288
- let t = "", r;
289
- for (; r = this.tryConsume("CHAR") || this.tryConsume("ESCAPED"); )
290
- t += r;
291
- return t;
361
+ function $(i, o, s) {
362
+ const p = i.map((l) => j(l, o, s));
363
+ return (l) => {
364
+ const d = [""];
365
+ for (const w of p) {
366
+ const [h, ...N] = w(l);
367
+ d[0] += h, d.push(...N);
368
+ }
369
+ return d;
370
+ };
292
371
  }
293
- }
294
- class P {
295
- constructor(t) {
296
- this.tokens = t;
372
+ function j(i, o, s) {
373
+ if (i.type === "text") return () => [i.value];
374
+ if (i.type === "group") {
375
+ const l = $(i.tokens, o, s);
376
+ return (d) => {
377
+ const [w, ...h] = l(d);
378
+ return h.length ? [""] : [w];
379
+ };
380
+ }
381
+ const p = s || t;
382
+ return i.type === "wildcard" && s !== !1 ? (l) => {
383
+ const d = l[i.name];
384
+ if (d == null) return ["", i.name];
385
+ if (!Array.isArray(d) || d.length === 0)
386
+ throw new TypeError(`Expected "${i.name}" to be a non-empty array`);
387
+ return [d.map((w, h) => {
388
+ if (typeof w != "string")
389
+ throw new TypeError(`Expected "${i.name}/${h}" to be a string`);
390
+ return p(w);
391
+ }).join(o)];
392
+ } : (l) => {
393
+ const d = l[i.name];
394
+ if (d == null) return ["", i.name];
395
+ if (typeof d != "string")
396
+ throw new TypeError(`Expected "${i.name}" to be a string`);
397
+ return [p(d)];
398
+ };
297
399
  }
298
- }
299
- E.TokenData = P;
300
- function M(e, t = {}) {
301
- const {
302
- encodePath: r = q
303
- } = t, n = new $e(Fe(e));
304
- function a(o) {
305
- const i = [];
306
- for (; ; ) {
307
- const c = n.text();
308
- c && i.push({
309
- type: "text",
310
- value: r(c)
311
- });
312
- const u = n.tryConsume("PARAM");
313
- if (u) {
314
- i.push({
315
- type: "param",
316
- name: u
317
- });
318
- continue;
400
+ function y(i, o = {}) {
401
+ const {
402
+ decode: s = decodeURIComponent,
403
+ delimiter: p = e
404
+ } = o, {
405
+ regexp: l,
406
+ keys: d
407
+ } = k(i, o), w = d.map((h) => s === !1 ? t : h.type === "param" ? s : (N) => N.split(p).map(s));
408
+ return function(N) {
409
+ const R = l.exec(N);
410
+ if (!R) return !1;
411
+ const z = R[0], q = /* @__PURE__ */ Object.create(null);
412
+ for (let L = 1; L < R.length; L++) {
413
+ if (R[L] === void 0) continue;
414
+ const M = d[L - 1], V = w[L - 1];
415
+ q[M.name] = V(R[L]);
319
416
  }
320
- const m = n.tryConsume("WILDCARD");
321
- if (m) {
322
- i.push({
323
- type: "wildcard",
324
- name: m
325
- });
417
+ return {
418
+ path: z,
419
+ params: q
420
+ };
421
+ };
422
+ }
423
+ function k(i, o = {}) {
424
+ const {
425
+ delimiter: s = e,
426
+ end: p = !0,
427
+ sensitive: l = !1,
428
+ trailing: d = !0
429
+ } = o, w = [], h = [], N = l ? "" : "i", z = (Array.isArray(i) ? i : [i]).map((M) => M instanceof v ? M : P(M, o));
430
+ for (const {
431
+ tokens: M
432
+ } of z)
433
+ for (const V of g(M, 0, [])) {
434
+ const be = b(V, s, w);
435
+ h.push(be);
436
+ }
437
+ let q = `^(?:${h.join("|")})`;
438
+ return d && (q += `(?:${u(s)}$)?`), q += p ? "$" : `(?=${u(s)}|$)`, {
439
+ regexp: new RegExp(q, N),
440
+ keys: w
441
+ };
442
+ }
443
+ function* g(i, o, s) {
444
+ if (o === i.length)
445
+ return yield s;
446
+ const p = i[o];
447
+ if (p.type === "group") {
448
+ const l = s.slice();
449
+ for (const d of g(p.tokens, 0, l))
450
+ yield* g(i, o + 1, d);
451
+ } else
452
+ s.push(p);
453
+ yield* g(i, o + 1, s);
454
+ }
455
+ function b(i, o, s) {
456
+ let p = "", l = "", d = !0;
457
+ for (let w = 0; w < i.length; w++) {
458
+ const h = i[w];
459
+ if (h.type === "text") {
460
+ p += u(h.value), l += h.value, d || (d = h.value.includes(o));
326
461
  continue;
327
462
  }
328
- if (n.tryConsume("{")) {
329
- i.push({
330
- type: "group",
331
- tokens: a("}")
332
- });
463
+ if (h.type === "param" || h.type === "wildcard") {
464
+ if (!d && !l)
465
+ throw new TypeError(`Missing text after "${h.name}": ${a}`);
466
+ h.type === "param" ? p += `(${m(o, d ? "" : l)}+)` : p += "([\\s\\S]+)", s.push(h), l = "", d = !1;
333
467
  continue;
334
468
  }
335
- return n.consume(o), i;
336
469
  }
470
+ return p;
337
471
  }
338
- const s = a("END");
339
- return new P(s);
340
- }
341
- function Se(e, t = {}) {
342
- const {
343
- encode: r = encodeURIComponent,
344
- delimiter: n = _
345
- } = t, a = e instanceof P ? e : M(e, t), s = Z(a.tokens, n, r);
346
- return function(i = {}) {
347
- const [c, ...u] = s(i);
348
- if (u.length)
349
- throw new TypeError(`Missing parameters: ${u.join(", ")}`);
350
- return c;
351
- };
352
- }
353
- function Z(e, t, r) {
354
- const n = e.map((a) => Oe(a, t, r));
355
- return (a) => {
356
- const s = [""];
357
- for (const o of n) {
358
- const [i, ...c] = o(a);
359
- s[0] += i, s.push(...c);
360
- }
361
- return s;
362
- };
363
- }
364
- function Oe(e, t, r) {
365
- if (e.type === "text") return () => [e.value];
366
- if (e.type === "group") {
367
- const a = Z(e.tokens, t, r);
368
- return (s) => {
369
- const [o, ...i] = a(s);
370
- return i.length ? [""] : [o];
371
- };
472
+ function m(i, o) {
473
+ return o.length < 2 ? i.length < 2 ? `[^${u(i + o)}]` : `(?:(?!${u(i)})[^${u(o)}])` : i.length < 2 ? `(?:(?!${u(o)})[^${u(i)}])` : `(?:(?!${u(o)}|${u(i)})[\\s\\S])`;
372
474
  }
373
- const n = r || q;
374
- return e.type === "wildcard" && r !== !1 ? (a) => {
375
- const s = a[e.name];
376
- if (s == null) return ["", e.name];
377
- if (!Array.isArray(s) || s.length === 0)
378
- throw new TypeError(`Expected "${e.name}" to be a non-empty array`);
379
- return [s.map((o, i) => {
380
- if (typeof o != "string")
381
- throw new TypeError(`Expected "${e.name}/${i}" to be a string`);
382
- return n(o);
383
- }).join(t)];
384
- } : (a) => {
385
- const s = a[e.name];
386
- if (s == null) return ["", e.name];
387
- if (typeof s != "string")
388
- throw new TypeError(`Expected "${e.name}" to be a string`);
389
- return [n(s)];
390
- };
391
- }
392
- function je(e, t = {}) {
393
- const {
394
- decode: r = decodeURIComponent,
395
- delimiter: n = _
396
- } = t, {
397
- regexp: a,
398
- keys: s
399
- } = ee(e, t), o = s.map((i) => r === !1 ? q : i.type === "param" ? r : (c) => c.split(n).map(r));
400
- return function(c) {
401
- const u = a.exec(c);
402
- if (!u) return !1;
403
- const m = u[0], y = /* @__PURE__ */ Object.create(null);
404
- for (let h = 1; h < u.length; h++) {
405
- if (u[h] === void 0) continue;
406
- const F = s[h - 1], d = o[h - 1];
407
- y[F.name] = d(u[h]);
408
- }
409
- return {
410
- path: m,
411
- params: y
412
- };
413
- };
414
- }
415
- function ee(e, t = {}) {
416
- const {
417
- delimiter: r = _,
418
- end: n = !0,
419
- sensitive: a = !1,
420
- trailing: s = !0
421
- } = t, o = [], i = [], c = a ? "" : "i", m = (Array.isArray(e) ? e : [e]).map((F) => F instanceof P ? F : M(F, t));
422
- for (const {
423
- tokens: F
424
- } of m)
425
- for (const d of I(F, 0, [])) {
426
- const O = Ee(d, r, o);
427
- i.push(O);
428
- }
429
- let y = `^(?:${i.join("|")})`;
430
- return s && (y += `(?:${$(r)}$)?`), y += n ? "$" : `(?=${$(r)}|$)`, {
431
- regexp: new RegExp(y, c),
432
- keys: o
433
- };
434
- }
435
- function* I(e, t, r) {
436
- if (t === e.length)
437
- return yield r;
438
- const n = e[t];
439
- if (n.type === "group") {
440
- const a = r.slice();
441
- for (const s of I(n.tokens, 0, a))
442
- yield* I(e, t + 1, s);
443
- } else
444
- r.push(n);
445
- yield* I(e, t + 1, r);
446
- }
447
- function Ee(e, t, r) {
448
- let n = "", a = "", s = !0;
449
- for (let o = 0; o < e.length; o++) {
450
- const i = e[o];
451
- if (i.type === "text") {
452
- n += $(i.value), a += i.value, s || (s = i.value.includes(t));
453
- continue;
454
- }
455
- if (i.type === "param" || i.type === "wildcard") {
456
- if (!s && !a)
457
- throw new TypeError(`Missing text after "${i.name}": ${k}`);
458
- i.type === "param" ? n += `(${Ae(t, s ? "" : a)}+)` : n += "([\\s\\S]+)", r.push(i), a = "", s = !1;
459
- continue;
460
- }
475
+ function x(i) {
476
+ return i.tokens.map(function o(s, p, l) {
477
+ if (s.type === "text") return c(s.value);
478
+ if (s.type === "group")
479
+ return `{${s.tokens.map(o).join("")}}`;
480
+ const w = _(s.name) && I(l[p + 1]) ? s.name : JSON.stringify(s.name);
481
+ if (s.type === "param") return `:${w}`;
482
+ if (s.type === "wildcard") return `*${w}`;
483
+ throw new TypeError(`Unexpected token: ${s}`);
484
+ }).join("");
461
485
  }
462
- return n;
463
- }
464
- function Ae(e, t) {
465
- return t.length < 2 ? e.length < 2 ? `[^${$(e + t)}]` : `(?:(?!${$(e)})[^${$(t)}])` : e.length < 2 ? `(?:(?!${$(t)})[^${$(e)}])` : `(?:(?!${$(t)}|${$(e)})[\\s\\S])`;
466
- }
467
- function Ne(e) {
468
- return e.tokens.map(function t(r, n, a) {
469
- if (r.type === "text") return xe(r.value);
470
- if (r.type === "group")
471
- return `{${r.tokens.map(t).join("")}}`;
472
- const o = Re(r.name) && Ie(a[n + 1]) ? r.name : JSON.stringify(r.name);
473
- if (r.type === "param") return `:${o}`;
474
- if (r.type === "wildcard") return `*${o}`;
475
- throw new TypeError(`Unexpected token: ${r}`);
476
- }).join("");
477
- }
478
- function Re(e) {
479
- const [t, ...r] = e;
480
- return Y.test(t) ? r.every((n) => L.test(n)) : !1;
481
- }
482
- function Ie(e) {
483
- return (e == null ? void 0 : e.type) !== "text" ? !0 : !L.test(e.value[0]);
486
+ function _(i) {
487
+ const [o, ...s] = i;
488
+ return r.test(o) ? s.every((p) => n.test(p)) : !1;
489
+ }
490
+ function I(i) {
491
+ return (i == null ? void 0 : i.type) !== "text" ? !0 : !n.test(i.value[0]);
492
+ }
493
+ return C;
484
494
  }
485
- const ke = Symbol("any"), Pe = Symbol("number"), Ce = Symbol("string"), Te = Symbol("array"), j = {
486
- any: ke,
495
+ var re = Ee();
496
+ const ve = Symbol("any"), Pe = Symbol("number"), Ae = Symbol("string"), ke = Symbol("array"), Ne = Symbol("boolean"), T = {
497
+ any: ve,
487
498
  number: Pe,
488
- string: Ce,
489
- array: Te
499
+ string: Ae,
500
+ array: ke,
501
+ boolean: Ne
490
502
  };
491
- function J(e, t) {
503
+ function te(e, t) {
492
504
  for (const r of e)
493
- if (!t.includes(r))
494
- return !1;
495
- return !0;
505
+ if (t.includes(r))
506
+ return !0;
507
+ return !1;
496
508
  }
497
- function Q(e, t) {
509
+ function ne(e, t) {
498
510
  for (const r in t) {
499
511
  const n = t[r];
500
512
  if (Array.isArray(n) && (!e[r] || JSON.stringify(n) !== e[r]))
@@ -522,141 +534,201 @@ function Q(e, t) {
522
534
  }
523
535
  }
524
536
  switch (n) {
525
- case j.any: {
537
+ case T.any: {
526
538
  if (!e[r])
527
539
  return !1;
528
540
  break;
529
541
  }
530
- case j.string: {
542
+ case T.string: {
531
543
  if (!e[r] || Array.isArray(e[r]))
532
544
  return !1;
533
545
  break;
534
546
  }
535
- case j.array: {
547
+ case T.array: {
536
548
  if (!e[r] || !Array.isArray(e[r]))
537
549
  return !1;
538
550
  break;
539
551
  }
540
- case j.number: {
552
+ case T.number: {
541
553
  if (!e[r] || Array.isArray(e[r]) || isNaN(parseInt(e[r])) && isNaN(parseFloat(e[r])))
542
554
  return !1;
543
555
  break;
544
556
  }
557
+ case T.boolean: {
558
+ if (!e[r] || Array.isArray(e[r]) || !["0", "1", "false", "true"].includes(e[r]))
559
+ return !1;
560
+ break;
561
+ }
545
562
  }
546
563
  }
547
564
  return !0;
548
565
  }
549
- function ve(e, t) {
566
+ function Re(e, t) {
550
567
  const r = {};
551
568
  for (const n in t) {
552
- const a = t[n], s = e[n];
569
+ const a = t[n], f = e[n];
553
570
  if (Array.isArray(a)) {
554
- r[n] = s === "1" || s === "true";
571
+ const c = e[n];
572
+ r[n] = c;
555
573
  continue;
556
574
  }
557
575
  switch (typeof a) {
558
576
  case "number": {
559
- const o = e[n];
560
- r[n] = isNaN(parseInt(o)) ? parseFloat(o) : parseInt(o);
577
+ r[n] = isNaN(parseInt(f)) ? parseFloat(f) : parseInt(f);
561
578
  break;
562
579
  }
563
580
  case "object": {
564
- r[n] = JSON.parse(s);
581
+ r[n] = JSON.parse(f);
565
582
  break;
566
583
  }
567
584
  case "string":
568
- r[n] = e[n];
585
+ r[n] = f;
569
586
  case "boolean": {
570
- const o = e[n];
571
- r[n] = o === "0" ? parseFloat(o) : parseInt(o);
587
+ r[n] = f === "1" || f === "true";
572
588
  break;
573
589
  }
574
590
  }
575
591
  switch (a) {
576
- case j.any:
577
- case j.string:
578
- case j.array: {
592
+ case T.any:
593
+ case T.string:
594
+ case T.array: {
579
595
  r[n] = e[n];
580
596
  break;
581
597
  }
582
- case j.number: {
583
- const o = e[n];
584
- r[n] = isNaN(parseInt(o)) ? parseFloat(o) : parseInt(o);
598
+ case T.number: {
599
+ const c = e[n];
600
+ r[n] = isNaN(parseInt(c)) ? parseFloat(c) : parseInt(c);
601
+ break;
602
+ }
603
+ case T.boolean: {
604
+ const c = e[n];
605
+ r[n] = c === "1" || c === "true";
585
606
  break;
586
607
  }
587
608
  }
588
609
  }
589
610
  return r;
590
611
  }
591
- function De(e, t) {
592
- return (r) => {
612
+ function De(e) {
613
+ let {
614
+ $activeRoutes: t,
615
+ $path: r,
616
+ $query: n,
617
+ navigateFx: a
618
+ } = e;
619
+ return (f) => {
593
620
  const {
594
- parameters: n,
595
- forRoutes: a
596
- } = r, s = x({
621
+ parameters: c,
622
+ forRoutes: u
623
+ } = f, F = B(!1, {
624
+ name: "$entered",
625
+ sid: "jh7pkx"
626
+ }), D = E({
597
627
  name: "entered",
598
- sid: "-d3obu6"
599
- }), o = x({
628
+ sid: "-savym4"
629
+ }), v = E({
600
630
  name: "exited",
601
- sid: "-xofyk3"
602
- }), i = x({
631
+ sid: "m5ggn3"
632
+ }), P = E({
603
633
  name: "exit",
604
- sid: "-673d76"
634
+ sid: "-bgcxp1"
635
+ }), A = E({
636
+ name: "changeEntered",
637
+ sid: "-2ei1v0"
605
638
  });
606
- return w({
639
+ return S({
640
+ and: [{
641
+ clock: A,
642
+ target: F
643
+ }],
644
+ or: {
645
+ sid: "-hckvl5"
646
+ }
647
+ }), S({
607
648
  and: [{
608
649
  source: {
609
- activeRoutes: e,
610
- query: t
650
+ activeRoutes: t,
651
+ query: n
611
652
  },
612
- filter: (c) => {
653
+ filter: ($) => {
613
654
  let {
614
- activeRoutes: u,
615
- query: m
616
- } = c;
617
- return (!a || J(a, u)) && Q(m, n);
655
+ activeRoutes: j,
656
+ query: y
657
+ } = $;
658
+ return (!u || te(u, j)) && ne(y, c);
618
659
  },
619
- fn: (c) => {
660
+ fn: ($) => {
620
661
  let {
621
- query: u
622
- } = c;
623
- return ve(u, n);
624
- }
662
+ query: j
663
+ } = $;
664
+ return Re(j, c);
665
+ },
666
+ target: [D, A.prepend(() => !0)]
625
667
  }],
626
668
  or: {
627
- sid: "-so0f9q"
669
+ sid: "-h9twmc"
628
670
  }
629
- }), w({
671
+ }), S({
630
672
  and: [{
631
673
  source: {
632
- activeRoutes: e,
633
- query: t
674
+ activeRoutes: t,
675
+ query: n,
676
+ entered: F
634
677
  },
635
- filter: (c) => {
678
+ filter: ($) => {
636
679
  let {
637
- activeRoutes: u,
638
- query: m
639
- } = c;
640
- return !((!a || J(a, u)) && Q(m, n));
680
+ activeRoutes: j,
681
+ query: y,
682
+ entered: k
683
+ } = $;
684
+ return k && !((!u || te(u, j)) && ne(y, c));
685
+ },
686
+ target: [v.prepend(() => {
687
+ }), A.prepend(() => !1)]
688
+ }],
689
+ or: {
690
+ sid: "-gtc2ti"
691
+ }
692
+ }), S({
693
+ and: [{
694
+ clock: P,
695
+ source: {
696
+ path: r,
697
+ query: n
698
+ },
699
+ fn: ($, j) => {
700
+ let {
701
+ path: y,
702
+ query: k
703
+ } = $;
704
+ if (j && j.ignoreParams) {
705
+ const g = {};
706
+ for (const b of j.ignoreParams)
707
+ k[b] && (g[b] = k[b]);
708
+ return {
709
+ query: g,
710
+ path: y
711
+ };
712
+ }
713
+ return {
714
+ query: {},
715
+ path: y
716
+ };
641
717
  },
642
- target: o
718
+ target: a
643
719
  }],
644
720
  or: {
645
- sid: "-s82e29"
721
+ sid: "-fyjlla"
646
722
  }
647
723
  }), {
648
- entered: s,
649
- exited: o,
650
- exit: i,
651
- getPayload: (c) => Object.entries(c).reduce((u, m) => {
652
- let [y, h] = m;
653
- return typeof n[y] == "symbol" ? u[y] = h : u[y] = n[y], u;
654
- }, {})
724
+ entered: D,
725
+ exited: v,
726
+ exit: P
655
727
  };
656
728
  };
657
729
  }
658
- const re = "%[a-f0-9]{2}", W = new RegExp("(" + re + ")|([^%]+?)", "gi"), G = new RegExp("(" + re + ")+", "gi");
659
- function D(e, t) {
730
+ const fe = "%[a-f0-9]{2}", ae = new RegExp("(" + fe + ")|([^%]+?)", "gi"), se = new RegExp("(" + fe + ")+", "gi");
731
+ function W(e, t) {
660
732
  try {
661
733
  return [decodeURIComponent(e.join(""))];
662
734
  } catch {
@@ -665,32 +737,32 @@ function D(e, t) {
665
737
  return e;
666
738
  t = t || 1;
667
739
  const r = e.slice(0, t), n = e.slice(t);
668
- return Array.prototype.concat.call([], D(r), D(n));
740
+ return Array.prototype.concat.call([], W(r), W(n));
669
741
  }
670
- function Ue(e) {
742
+ function Ie(e) {
671
743
  try {
672
744
  return decodeURIComponent(e);
673
745
  } catch {
674
- let t = e.match(W) || [];
746
+ let t = e.match(ae) || [];
675
747
  for (let r = 1; r < t.length; r++)
676
- e = D(t, r).join(""), t = e.match(W) || [];
748
+ e = W(t, r).join(""), t = e.match(ae) || [];
677
749
  return e;
678
750
  }
679
751
  }
680
- function _e(e) {
752
+ function Ce(e) {
681
753
  const t = {
682
754
  "%FE%FF": "��",
683
755
  "%FF%FE": "��"
684
756
  };
685
- let r = G.exec(e);
757
+ let r = se.exec(e);
686
758
  for (; r; ) {
687
759
  try {
688
760
  t[r[0]] = decodeURIComponent(r[0]);
689
761
  } catch {
690
- const a = Ue(r[0]);
762
+ const a = Ie(r[0]);
691
763
  a !== r[0] && (t[r[0]] = a);
692
764
  }
693
- r = G.exec(e);
765
+ r = se.exec(e);
694
766
  }
695
767
  t["%C2"] = "�";
696
768
  const n = Object.keys(t);
@@ -698,16 +770,16 @@ function _e(e) {
698
770
  e = e.replace(new RegExp(a, "g"), t[a]);
699
771
  return e;
700
772
  }
701
- function qe(e) {
773
+ function Te(e) {
702
774
  if (typeof e != "string")
703
775
  throw new TypeError("Expected `encodedURI` to be of type `string`, got `" + typeof e + "`");
704
776
  try {
705
777
  return decodeURIComponent(e);
706
778
  } catch {
707
- return _e(e);
779
+ return Ce(e);
708
780
  }
709
781
  }
710
- function Le(e, t) {
782
+ function Ue(e, t) {
711
783
  const r = {};
712
784
  if (Array.isArray(t))
713
785
  for (const n of t) {
@@ -718,13 +790,13 @@ function Le(e, t) {
718
790
  for (const n of Reflect.ownKeys(e)) {
719
791
  const a = Object.getOwnPropertyDescriptor(e, n);
720
792
  if (a.enumerable) {
721
- const s = e[n];
722
- t(n, s, e) && Object.defineProperty(r, n, a);
793
+ const f = e[n];
794
+ t(n, f, e) && Object.defineProperty(r, n, a);
723
795
  }
724
796
  }
725
797
  return r;
726
798
  }
727
- function te(e, t) {
799
+ function ue(e, t) {
728
800
  if (!(typeof e == "string" && typeof t == "string"))
729
801
  throw new TypeError("Expected the arguments to be of type `string`");
730
802
  if (e === "" || t === "")
@@ -732,29 +804,29 @@ function te(e, t) {
732
804
  const r = e.indexOf(t);
733
805
  return r === -1 ? [] : [e.slice(0, r), e.slice(r + t.length)];
734
806
  }
735
- const Me = (e) => e == null, Be = (e) => encodeURIComponent(e).replaceAll(/[!'()*]/g, (t) => `%${t.charCodeAt(0).toString(16).toUpperCase()}`), U = Symbol("encodeFragmentIdentifier");
736
- function He(e) {
807
+ const _e = (e) => e == null, qe = (e) => encodeURIComponent(e).replaceAll(/[!'()*]/g, (t) => `%${t.charCodeAt(0).toString(16).toUpperCase()}`), G = Symbol("encodeFragmentIdentifier");
808
+ function Le(e) {
737
809
  switch (e.arrayFormat) {
738
810
  case "index":
739
811
  return (t) => (r, n) => {
740
812
  const a = r.length;
741
- return n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [p(t, e), "[", a, "]"].join("")] : [...r, [p(t, e), "[", p(a, e), "]=", p(n, e)].join("")];
813
+ return n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [O(t, e), "[", a, "]"].join("")] : [...r, [O(t, e), "[", O(a, e), "]=", O(n, e)].join("")];
742
814
  };
743
815
  case "bracket":
744
- return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [p(t, e), "[]"].join("")] : [...r, [p(t, e), "[]=", p(n, e)].join("")];
816
+ return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [O(t, e), "[]"].join("")] : [...r, [O(t, e), "[]=", O(n, e)].join("")];
745
817
  case "colon-list-separator":
746
- return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [p(t, e), ":list="].join("")] : [...r, [p(t, e), ":list=", p(n, e)].join("")];
818
+ return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, [O(t, e), ":list="].join("")] : [...r, [O(t, e), ":list=", O(n, e)].join("")];
747
819
  case "comma":
748
820
  case "separator":
749
821
  case "bracket-separator": {
750
822
  const t = e.arrayFormat === "bracket-separator" ? "[]=" : "=";
751
- return (r) => (n, a) => a === void 0 || e.skipNull && a === null || e.skipEmptyString && a === "" ? n : (a = a === null ? "" : a, n.length === 0 ? [[p(r, e), t, p(a, e)].join("")] : [[n, p(a, e)].join(e.arrayFormatSeparator)]);
823
+ return (r) => (n, a) => a === void 0 || e.skipNull && a === null || e.skipEmptyString && a === "" ? n : (a = a === null ? "" : a, n.length === 0 ? [[O(r, e), t, O(a, e)].join("")] : [[n, O(a, e)].join(e.arrayFormatSeparator)]);
752
824
  }
753
825
  default:
754
- return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, p(t, e)] : [...r, [p(t, e), "=", p(n, e)].join("")];
826
+ return (t) => (r, n) => n === void 0 || e.skipNull && n === null || e.skipEmptyString && n === "" ? r : n === null ? [...r, O(t, e)] : [...r, [O(t, e), "=", O(n, e)].join("")];
755
827
  }
756
828
  }
757
- function Ve(e) {
829
+ function Me(e) {
758
830
  let t;
759
831
  switch (e.arrayFormat) {
760
832
  case "index":
@@ -792,24 +864,24 @@ function Ve(e) {
792
864
  case "comma":
793
865
  case "separator":
794
866
  return (r, n, a) => {
795
- const s = typeof n == "string" && n.includes(e.arrayFormatSeparator), o = typeof n == "string" && !s && S(n, e).includes(e.arrayFormatSeparator);
796
- n = o ? S(n, e) : n;
797
- const i = s || o ? n.split(e.arrayFormatSeparator).map((c) => S(c, e)) : n === null ? n : S(n, e);
798
- a[r] = i;
867
+ const f = typeof n == "string" && n.includes(e.arrayFormatSeparator), c = typeof n == "string" && !f && U(n, e).includes(e.arrayFormatSeparator);
868
+ n = c ? U(n, e) : n;
869
+ const u = f || c ? n.split(e.arrayFormatSeparator).map((F) => U(F, e)) : n === null ? n : U(n, e);
870
+ a[r] = u;
799
871
  };
800
872
  case "bracket-separator":
801
873
  return (r, n, a) => {
802
- const s = /(\[])$/.test(r);
803
- if (r = r.replace(/\[]$/, ""), !s) {
804
- a[r] = n && S(n, e);
874
+ const f = /(\[])$/.test(r);
875
+ if (r = r.replace(/\[]$/, ""), !f) {
876
+ a[r] = n && U(n, e);
805
877
  return;
806
878
  }
807
- const o = n === null ? [] : S(n, e).split(e.arrayFormatSeparator);
879
+ const c = n === null ? [] : U(n, e).split(e.arrayFormatSeparator);
808
880
  if (a[r] === void 0) {
809
- a[r] = o;
881
+ a[r] = c;
810
882
  return;
811
883
  }
812
- a[r] = [...a[r], ...o];
884
+ a[r] = [...a[r], ...c];
813
885
  };
814
886
  default:
815
887
  return (r, n, a) => {
@@ -821,37 +893,37 @@ function Ve(e) {
821
893
  };
822
894
  }
823
895
  }
824
- function ne(e) {
896
+ function le(e) {
825
897
  if (typeof e != "string" || e.length !== 1)
826
898
  throw new TypeError("arrayFormatSeparator must be single character string");
827
899
  }
828
- function p(e, t) {
829
- return t.encode ? t.strict ? Be(e) : encodeURIComponent(e) : e;
900
+ function O(e, t) {
901
+ return t.encode ? t.strict ? qe(e) : encodeURIComponent(e) : e;
830
902
  }
831
- function S(e, t) {
832
- return t.decode ? qe(e) : e;
903
+ function U(e, t) {
904
+ return t.decode ? Te(e) : e;
833
905
  }
834
- function ae(e) {
835
- return Array.isArray(e) ? e.sort() : typeof e == "object" ? ae(Object.keys(e)).sort((t, r) => Number(t) - Number(r)).map((t) => e[t]) : e;
906
+ function de(e) {
907
+ return Array.isArray(e) ? e.sort() : typeof e == "object" ? de(Object.keys(e)).sort((t, r) => Number(t) - Number(r)).map((t) => e[t]) : e;
836
908
  }
837
- function se(e) {
909
+ function pe(e) {
838
910
  const t = e.indexOf("#");
839
911
  return t !== -1 && (e = e.slice(0, t)), e;
840
912
  }
841
- function ze(e) {
913
+ function Be(e) {
842
914
  let t = "";
843
915
  const r = e.indexOf("#");
844
916
  return r !== -1 && (t = e.slice(r)), t;
845
917
  }
846
- function X(e, t, r) {
918
+ function oe(e, t, r) {
847
919
  return r === "string" && typeof e == "string" ? e : typeof r == "function" && typeof e == "string" ? r(e) : t.parseBooleans && e !== null && (e.toLowerCase() === "true" || e.toLowerCase() === "false") ? e.toLowerCase() === "true" : r === "number" && !Number.isNaN(Number(e)) && typeof e == "string" && e.trim() !== "" || t.parseNumbers && !Number.isNaN(Number(e)) && typeof e == "string" && e.trim() !== "" ? Number(e) : e;
848
920
  }
849
- function B(e) {
850
- e = se(e);
921
+ function X(e) {
922
+ e = pe(e);
851
923
  const t = e.indexOf("?");
852
924
  return t === -1 ? "" : e.slice(t + 1);
853
925
  }
854
- function H(e, t) {
926
+ function Y(e, t) {
855
927
  t = {
856
928
  decode: !0,
857
929
  sort: !0,
@@ -861,30 +933,30 @@ function H(e, t) {
861
933
  parseBooleans: !1,
862
934
  types: /* @__PURE__ */ Object.create(null),
863
935
  ...t
864
- }, ne(t.arrayFormatSeparator);
865
- const r = Ve(t), n = /* @__PURE__ */ Object.create(null);
936
+ }, le(t.arrayFormatSeparator);
937
+ const r = Me(t), n = /* @__PURE__ */ Object.create(null);
866
938
  if (typeof e != "string" || (e = e.trim().replace(/^[?#&]/, ""), !e))
867
939
  return n;
868
940
  for (const a of e.split("&")) {
869
941
  if (a === "")
870
942
  continue;
871
- const s = t.decode ? a.replaceAll("+", " ") : a;
872
- let [o, i] = te(s, "=");
873
- o === void 0 && (o = s), i = i === void 0 ? null : ["comma", "separator", "bracket-separator"].includes(t.arrayFormat) ? i : S(i, t), r(S(o, t), i, n);
943
+ const f = t.decode ? a.replaceAll("+", " ") : a;
944
+ let [c, u] = ue(f, "=");
945
+ c === void 0 && (c = f), u = u === void 0 ? null : ["comma", "separator", "bracket-separator"].includes(t.arrayFormat) ? u : U(u, t), r(U(c, t), u, n);
874
946
  }
875
- for (const [a, s] of Object.entries(n))
876
- if (typeof s == "object" && s !== null && t.types[a] !== "string")
877
- for (const [o, i] of Object.entries(s)) {
878
- const c = t.types[a] ? t.types[a].replace("[]", "") : void 0;
879
- s[o] = X(i, t, c);
947
+ for (const [a, f] of Object.entries(n))
948
+ if (typeof f == "object" && f !== null && t.types[a] !== "string")
949
+ for (const [c, u] of Object.entries(f)) {
950
+ const F = t.types[a] ? t.types[a].replace("[]", "") : void 0;
951
+ f[c] = oe(u, t, F);
880
952
  }
881
- else typeof s == "object" && s !== null && t.types[a] === "string" ? n[a] = Object.values(s).join(t.arrayFormatSeparator) : n[a] = X(s, t, t.types[a]);
882
- return t.sort === !1 ? n : (t.sort === !0 ? Object.keys(n).sort() : Object.keys(n).sort(t.sort)).reduce((a, s) => {
883
- const o = n[s];
884
- return a[s] = o && typeof o == "object" && !Array.isArray(o) ? ae(o) : o, a;
953
+ else typeof f == "object" && f !== null && t.types[a] === "string" ? n[a] = Object.values(f).join(t.arrayFormatSeparator) : n[a] = oe(f, t, t.types[a]);
954
+ return t.sort === !1 ? n : (t.sort === !0 ? Object.keys(n).sort() : Object.keys(n).sort(t.sort)).reduce((a, f) => {
955
+ const c = n[f];
956
+ return a[f] = c && typeof c == "object" && !Array.isArray(c) ? de(c) : c, a;
885
957
  }, /* @__PURE__ */ Object.create(null));
886
958
  }
887
- function oe(e, t) {
959
+ function me(e, t) {
888
960
  if (!e)
889
961
  return "";
890
962
  t = {
@@ -893,202 +965,266 @@ function oe(e, t) {
893
965
  arrayFormat: "none",
894
966
  arrayFormatSeparator: ",",
895
967
  ...t
896
- }, ne(t.arrayFormatSeparator);
897
- const r = (o) => t.skipNull && Me(e[o]) || t.skipEmptyString && e[o] === "", n = He(t), a = {};
898
- for (const [o, i] of Object.entries(e))
899
- r(o) || (a[o] = i);
900
- const s = Object.keys(a);
901
- return t.sort !== !1 && s.sort(t.sort), s.map((o) => {
902
- const i = e[o];
903
- return i === void 0 ? "" : i === null ? p(o, t) : Array.isArray(i) ? i.length === 0 && t.arrayFormat === "bracket-separator" ? p(o, t) + "[]" : i.reduce(n(o), []).join("&") : p(o, t) + "=" + p(i, t);
904
- }).filter((o) => o.length > 0).join("&");
968
+ }, le(t.arrayFormatSeparator);
969
+ const r = (c) => t.skipNull && _e(e[c]) || t.skipEmptyString && e[c] === "", n = Le(t), a = {};
970
+ for (const [c, u] of Object.entries(e))
971
+ r(c) || (a[c] = u);
972
+ const f = Object.keys(a);
973
+ return t.sort !== !1 && f.sort(t.sort), f.map((c) => {
974
+ const u = e[c];
975
+ return u === void 0 ? "" : u === null ? O(c, t) : Array.isArray(u) ? u.length === 0 && t.arrayFormat === "bracket-separator" ? O(c, t) + "[]" : u.reduce(n(c), []).join("&") : O(c, t) + "=" + O(u, t);
976
+ }).filter((c) => c.length > 0).join("&");
905
977
  }
906
- function ie(e, t) {
978
+ function ye(e, t) {
907
979
  var a;
908
980
  t = {
909
981
  decode: !0,
910
982
  ...t
911
983
  };
912
- let [r, n] = te(e, "#");
984
+ let [r, n] = ue(e, "#");
913
985
  return r === void 0 && (r = e), {
914
986
  url: ((a = r == null ? void 0 : r.split("?")) == null ? void 0 : a[0]) ?? "",
915
- query: H(B(e), t),
987
+ query: Y(X(e), t),
916
988
  ...t && t.parseFragmentIdentifier && n ? {
917
- fragmentIdentifier: S(n, t)
989
+ fragmentIdentifier: U(n, t)
918
990
  } : {}
919
991
  };
920
992
  }
921
- function ce(e, t) {
993
+ function he(e, t) {
922
994
  t = {
923
995
  encode: !0,
924
996
  strict: !0,
925
- [U]: !0,
997
+ [G]: !0,
926
998
  ...t
927
999
  };
928
- const r = se(e.url).split("?")[0] || "", n = B(e.url), a = {
929
- ...H(n, {
1000
+ const r = pe(e.url).split("?")[0] || "", n = X(e.url), a = {
1001
+ ...Y(n, {
930
1002
  sort: !1
931
1003
  }),
932
1004
  ...e.query
933
1005
  };
934
- let s = oe(a, t);
935
- s && (s = `?${s}`);
936
- let o = ze(e.url);
1006
+ let f = me(a, t);
1007
+ f && (f = `?${f}`);
1008
+ let c = Be(e.url);
937
1009
  if (typeof e.fragmentIdentifier == "string") {
938
- const i = new URL(r);
939
- i.hash = e.fragmentIdentifier, o = t[U] ? i.hash : `#${e.fragmentIdentifier}`;
1010
+ const u = new URL(r);
1011
+ u.hash = e.fragmentIdentifier, c = t[G] ? u.hash : `#${e.fragmentIdentifier}`;
940
1012
  }
941
- return `${r}${s}${o}`;
1013
+ return `${r}${f}${c}`;
942
1014
  }
943
- function fe(e, t, r) {
1015
+ function ge(e, t, r) {
944
1016
  r = {
945
1017
  parseFragmentIdentifier: !0,
946
- [U]: !1,
1018
+ [G]: !1,
947
1019
  ...r
948
1020
  };
949
1021
  const {
950
1022
  url: n,
951
1023
  query: a,
952
- fragmentIdentifier: s
953
- } = ie(e, r);
954
- return ce({
1024
+ fragmentIdentifier: f
1025
+ } = ye(e, r);
1026
+ return he({
955
1027
  url: n,
956
- query: Le(a, t),
957
- fragmentIdentifier: s
1028
+ query: Ue(a, t),
1029
+ fragmentIdentifier: f
958
1030
  }, r);
959
1031
  }
960
- function Ke(e, t, r) {
961
- const n = Array.isArray(t) ? (a) => !t.includes(a) : (a, s) => !t(a, s);
962
- return fe(e, n, r);
1032
+ function ze(e, t, r) {
1033
+ const n = Array.isArray(t) ? (a) => !t.includes(a) : (a, f) => !t(a, f);
1034
+ return ge(e, n, r);
963
1035
  }
964
- const v = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1036
+ const Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
965
1037
  __proto__: null,
966
- exclude: Ke,
967
- extract: B,
968
- parse: H,
969
- parseUrl: ie,
970
- pick: fe,
971
- stringify: oe,
972
- stringifyUrl: ce
1038
+ exclude: ze,
1039
+ extract: X,
1040
+ parse: Y,
1041
+ parseUrl: ye,
1042
+ pick: ge,
1043
+ stringify: me,
1044
+ stringifyUrl: he
973
1045
  }, Symbol.toStringTag, { value: "Module" }));
1046
+ function ie(e, t) {
1047
+ var r = Object.keys(e);
1048
+ if (Object.getOwnPropertySymbols) {
1049
+ var n = Object.getOwnPropertySymbols(e);
1050
+ t && (n = n.filter(function(a) {
1051
+ return Object.getOwnPropertyDescriptor(e, a).enumerable;
1052
+ })), r.push.apply(r, n);
1053
+ }
1054
+ return r;
1055
+ }
1056
+ function ce(e) {
1057
+ for (var t = 1; t < arguments.length; t++) {
1058
+ var r = arguments[t] != null ? arguments[t] : {};
1059
+ t % 2 ? ie(Object(r), !0).forEach(function(n) {
1060
+ He(e, n, r[n]);
1061
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : ie(Object(r)).forEach(function(n) {
1062
+ Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
1063
+ });
1064
+ }
1065
+ return e;
1066
+ }
1067
+ function He(e, t, r) {
1068
+ return (t = Ve(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
1069
+ }
1070
+ function Ve(e) {
1071
+ var t = Ke(e, "string");
1072
+ return typeof t == "symbol" ? t : t + "";
1073
+ }
1074
+ function Ke(e, t) {
1075
+ if (typeof e != "object" || !e) return e;
1076
+ var r = e[Symbol.toPrimitive];
1077
+ if (r !== void 0) {
1078
+ var n = r.call(e, t);
1079
+ if (typeof n != "object") return n;
1080
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1081
+ }
1082
+ return (t === "string" ? String : Number)(e);
1083
+ }
974
1084
  function Ge(e) {
975
1085
  const {
976
1086
  base: t = "/",
977
1087
  routes: r
978
- } = e, n = A(null, {
1088
+ } = e, n = B({
1089
+ skipUpdate: !1
1090
+ }, {
1091
+ name: "$meta",
1092
+ sid: "ku65ys"
1093
+ }), a = B(null, {
979
1094
  and: {
980
1095
  serialize: "ignore"
981
1096
  },
982
1097
  name: "$history",
983
- sid: "31majq"
984
- }), a = A([], {
985
- and: {
986
- serialize: "ignore"
987
- },
988
- name: "$activeRoutes",
989
- sid: "mastmv"
990
- }), s = A({}, {
1098
+ sid: "23j1rc"
1099
+ }), f = B({}, {
991
1100
  name: "$query",
992
- sid: "4sjpht"
993
- }), o = A(null, {
1101
+ sid: "3deub8"
1102
+ }), c = B(null, {
994
1103
  name: "$path",
995
- sid: "wq6kyf"
996
- }), i = x({
1104
+ sid: "ld3nhr"
1105
+ }), u = E({
997
1106
  name: "setHistory",
998
- sid: "tco5ea"
999
- }), c = x({
1107
+ sid: "hzl7xm"
1108
+ }), F = E({
1000
1109
  name: "navigate",
1001
- sid: "-6nqgd3"
1002
- }), u = x({
1110
+ sid: "-82vbjo"
1111
+ }), D = E({
1003
1112
  name: "back",
1004
- sid: "-gxisi3"
1005
- }), m = x({
1113
+ sid: "-icnnoo"
1114
+ }), v = E({
1006
1115
  name: "forward",
1007
- sid: "-5nj6gd"
1008
- }), y = x({
1116
+ sid: "-72o1my"
1117
+ }), P = E({
1009
1118
  name: "locationUpdated",
1010
- sid: "enqpbn"
1011
- }), h = r.map((l) => {
1012
- let g = l;
1013
- const f = [];
1014
- for (f.unshift(g.internal.path); g.internal.parent; )
1015
- g = g.internal.parent, g.internal.path !== "/" && f.unshift(g.internal.path);
1016
- const b = t === "/" ? f.join("") : [t, ...f].join("");
1119
+ sid: "d8lu52"
1120
+ }), A = r.map((g) => {
1121
+ let b = g;
1122
+ const m = [];
1123
+ for (m.unshift(b.internal.path); b.internal.parent; )
1124
+ b = b.internal.parent, b.internal.path !== "/" && m.unshift(b.internal.path);
1125
+ const x = t === "/" ? m.join("") : [t, ...m].join("");
1017
1126
  return {
1018
- route: l,
1019
- path: b,
1020
- toPath: he(b),
1021
- fromPath: be(b)
1127
+ route: g,
1128
+ path: x,
1129
+ toPath: re.compile(x),
1130
+ fromPath: re.match(x)
1022
1131
  };
1023
- }), F = z({
1132
+ }), $ = c.map((g) => {
1133
+ const b = [];
1134
+ for (const {
1135
+ route: m,
1136
+ fromPath: x
1137
+ } of A)
1138
+ x(g) && b.push(m);
1139
+ return b;
1140
+ }), j = J({
1024
1141
  and: {
1025
1142
  source: {
1026
- history: n
1143
+ history: a,
1144
+ meta: n
1027
1145
  },
1028
- effect: async (l, g) => {
1146
+ effect: async (g, b) => {
1029
1147
  let {
1030
- history: f
1031
- } = l, {
1032
- path: b,
1033
- query: C,
1034
- replace: N
1035
- } = g;
1036
- if (!f)
1148
+ history: m,
1149
+ meta: x
1150
+ } = g, {
1151
+ path: _,
1152
+ query: I,
1153
+ replace: i
1154
+ } = b;
1155
+ if (!m)
1037
1156
  throw new Error("history not found");
1038
- const V = {
1039
- pathname: b,
1040
- search: "?".concat(v.stringify(C))
1157
+ if (x.skipUpdate) {
1158
+ x.skipUpdate = !1;
1159
+ return;
1160
+ }
1161
+ const o = {
1162
+ pathname: _,
1163
+ search: "?".concat(Q.stringify(I))
1041
1164
  };
1042
- N ? f.replace(V) : f.push(V);
1165
+ i ? m.replace(o) : m.push(o, {
1166
+ skipUpdate: !0
1167
+ });
1043
1168
  }
1044
1169
  },
1045
1170
  or: {
1046
1171
  name: "navigateFx",
1047
- sid: "e3jr9b"
1172
+ sid: "sry1hc"
1048
1173
  }
1049
- }), d = R((l) => {
1050
- const g = le(y);
1051
- if (g({
1052
- pathname: l.location.pathname,
1053
- query: v.parse(l.location.search)
1054
- }), !l)
1055
- throw new Error();
1056
- l.listen((f) => {
1057
- let {
1058
- location: b
1059
- } = f;
1060
- g({
1061
- pathname: b.pathname,
1062
- query: v.parse(b.search)
1063
- });
1064
- });
1065
- }, {
1066
- name: "subscribeHistoryFx",
1067
- sid: "2h2oyo"
1068
- }), O = z({
1174
+ }), y = J({
1175
+ and: {
1176
+ source: n,
1177
+ effect: (g, b) => {
1178
+ var m;
1179
+ const x = xe(P);
1180
+ if (x({
1181
+ pathname: b.location.pathname,
1182
+ query: ce({}, Q.parse(b.location.search)),
1183
+ state: (m = b.location.state) !== null && m !== void 0 ? m : {}
1184
+ }), !b)
1185
+ throw new Error();
1186
+ b.listen((_) => {
1187
+ var I;
1188
+ let {
1189
+ location: i
1190
+ } = _;
1191
+ const o = (I = i.state) !== null && I !== void 0 ? I : {};
1192
+ o.skipUpdate && (g.skipUpdate = !0), x({
1193
+ pathname: i.pathname,
1194
+ query: ce({}, Q.parse(i.search)),
1195
+ state: o
1196
+ });
1197
+ });
1198
+ }
1199
+ },
1200
+ or: {
1201
+ name: "subscribeHistoryFx",
1202
+ sid: "-9srjw2"
1203
+ }
1204
+ }), k = J({
1069
1205
  and: {
1070
1206
  source: {
1071
- query: s,
1072
- path: o
1207
+ query: f,
1208
+ path: c
1073
1209
  },
1074
- effect: async (l) => {
1210
+ effect: async (g) => {
1075
1211
  let {
1076
- query: g,
1077
- path: f
1078
- } = l;
1212
+ query: b,
1213
+ path: m
1214
+ } = g;
1079
1215
  for (const {
1080
- route: b,
1081
- fromPath: C
1082
- } of h) {
1083
- const N = C(f);
1084
- if (N)
1085
- await b.internal.openFx({
1086
- query: g,
1087
- params: N.params,
1216
+ route: x,
1217
+ fromPath: _
1218
+ } of A) {
1219
+ const I = _(m);
1220
+ if (I)
1221
+ await x.internal.openFx({
1222
+ query: b,
1223
+ params: I.params,
1088
1224
  historyIgnore: !0
1089
1225
  });
1090
1226
  else {
1091
- b.internal.close();
1227
+ x.internal.close();
1092
1228
  continue;
1093
1229
  }
1094
1230
  }
@@ -1096,138 +1232,131 @@ function Ge(e) {
1096
1232
  },
1097
1233
  or: {
1098
1234
  name: "openRoutesByPathFx",
1099
- sid: "-o9v4d"
1235
+ sid: "-ro72fe"
1100
1236
  }
1101
1237
  });
1102
1238
  for (const {
1103
- route: l,
1104
- toPath: g
1105
- } of h)
1106
- w({
1239
+ route: g,
1240
+ toPath: b
1241
+ } of A)
1242
+ S({
1107
1243
  and: [{
1108
- clock: l.opened,
1109
- source: a,
1110
- filter: (f) => !f.includes(l),
1111
- fn: (f) => [...f, l],
1112
- target: a
1113
- }],
1114
- or: {
1115
- sid: "f0qyp9"
1116
- }
1117
- }), w({
1118
- and: [{
1119
- clock: l.opened,
1120
- filter: (f) => !(f != null && f.historyIgnore),
1121
- fn: (f) => {
1122
- var b;
1244
+ clock: g.opened,
1245
+ filter: (m) => !(m != null && m.historyIgnore),
1246
+ fn: (m) => {
1247
+ var x;
1123
1248
  return {
1124
- path: g(f && "params" in f ? f.params : void 0),
1125
- query: (b = f == null ? void 0 : f.query) !== null && b !== void 0 ? b : {},
1126
- replace: f == null ? void 0 : f.replace
1249
+ path: b(m && "params" in m ? m.params : void 0),
1250
+ query: (x = m == null ? void 0 : m.query) !== null && x !== void 0 ? x : {},
1251
+ replace: m == null ? void 0 : m.replace
1127
1252
  };
1128
1253
  },
1129
- target: c
1130
- }],
1131
- or: {
1132
- sid: "fgozwq"
1133
- }
1134
- }), w({
1135
- and: [{
1136
- clock: l.closed,
1137
- source: a,
1138
- fn: (f) => f.filter((b) => b !== l),
1139
- target: a
1254
+ target: F
1140
1255
  }],
1141
1256
  or: {
1142
- sid: "gc19qb"
1257
+ sid: "gfvtvu"
1143
1258
  }
1144
1259
  });
1145
- return w({
1260
+ return S({
1146
1261
  and: [{
1147
- clock: i,
1148
- target: n
1262
+ clock: u,
1263
+ target: a
1149
1264
  }],
1150
1265
  or: {
1151
- sid: "ggfmfh"
1266
+ sid: "hbrw92"
1152
1267
  }
1153
- }), w({
1268
+ }), S({
1154
1269
  and: [{
1155
- clock: n,
1270
+ clock: a,
1156
1271
  filter: Boolean,
1157
- target: d
1272
+ target: y
1158
1273
  }],
1159
1274
  or: {
1160
- sid: "guq9uv"
1275
+ sid: "heiv7v"
1161
1276
  }
1162
- }), w({
1277
+ }), S({
1163
1278
  and: [{
1164
- clock: y,
1165
- fn: (l) => {
1166
- var g;
1167
- return {
1168
- path: l.pathname,
1169
- query: (g = l.query) !== null && g !== void 0 ? g : {}
1170
- };
1171
- },
1172
- target: [de({
1173
- sid: "-3mx9rg",
1174
- fn: () => pe({
1279
+ clock: P,
1280
+ fn: (g) => ({
1281
+ path: g.pathname,
1282
+ query: g.query
1283
+ }),
1284
+ target: Oe({
1285
+ sid: "-f70n8p",
1286
+ fn: () => Fe({
1175
1287
  targets: {
1176
- path: o,
1177
- query: s
1288
+ path: c,
1289
+ query: f
1178
1290
  }
1179
1291
  }),
1180
1292
  name: "target",
1181
1293
  method: "spread"
1182
- }), O]
1294
+ })
1183
1295
  }],
1184
1296
  or: {
1185
- sid: "h9kpvm"
1297
+ sid: "htdb8m"
1186
1298
  }
1187
- }), w({
1299
+ }), S({
1188
1300
  and: [{
1189
- clock: c,
1190
- target: F
1301
+ clock: P,
1302
+ fn: (g) => ({
1303
+ path: g.pathname,
1304
+ query: g.query
1305
+ }),
1306
+ target: k
1191
1307
  }],
1192
1308
  or: {
1193
- sid: "hugwfc"
1309
+ sid: "icm409"
1194
1310
  }
1195
- }), w({
1311
+ }), S({
1196
1312
  and: [{
1197
- clock: [s, o],
1313
+ clock: F,
1314
+ target: j
1315
+ }],
1316
+ or: {
1317
+ sid: "sr2036"
1318
+ }
1319
+ }), S({
1320
+ and: [{
1321
+ clock: [f, c],
1198
1322
  source: {
1199
- query: s,
1200
- path: o
1323
+ query: f,
1324
+ path: c
1201
1325
  },
1202
- fn: (l) => l,
1203
- target: c
1326
+ fn: (g) => g,
1327
+ target: F
1204
1328
  }],
1205
1329
  or: {
1206
- sid: "i8rjuq"
1330
+ sid: "t5cnik"
1207
1331
  }
1208
1332
  }), {
1209
- $query: s,
1210
- $path: o,
1211
- $activeRoutes: a,
1212
- back: u,
1213
- forward: m,
1214
- navigate: c,
1333
+ $query: f,
1334
+ $path: c,
1335
+ $activeRoutes: $,
1336
+ back: D,
1337
+ forward: v,
1338
+ navigate: F,
1215
1339
  routes: r,
1216
- setHistory: i,
1217
- mappedRoutes: h,
1218
- trackQuery: De(a, s),
1340
+ setHistory: u,
1341
+ mappedRoutes: A,
1342
+ trackQuery: De({
1343
+ $activeRoutes: $,
1344
+ $path: c,
1345
+ $query: f,
1346
+ navigateFx: j
1347
+ }),
1219
1348
  "@@unitShape": () => ({
1220
- query: s,
1221
- path: o,
1222
- activeRoutes: a,
1223
- onBack: u,
1224
- onForward: m,
1225
- onNavigate: c
1349
+ query: f,
1350
+ path: c,
1351
+ activeRoutes: $,
1352
+ onBack: D,
1353
+ onForward: v,
1354
+ onNavigate: F
1226
1355
  })
1227
1356
  };
1228
1357
  }
1229
1358
  export {
1230
1359
  We as createRoute,
1231
1360
  Ge as createRouter,
1232
- j as parameters
1361
+ T as parameters
1233
1362
  };