@react-motion-router/stack 2.0.0-beta.sha-679879e → 2.0.0-beta.sha-4c84f16

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.
Files changed (29) hide show
  1. package/build/{common → core/src/common}/promise-wrapper.d.ts +2 -3
  2. package/build/index.js +975 -739
  3. package/build/index.js.map +1 -1
  4. package/build/stack/src/Anchor.d.ts +29 -0
  5. package/build/stack/src/GestureRegion.d.ts +10 -0
  6. package/build/{HistoryEntry.d.ts → stack/src/HistoryEntry.d.ts} +4 -4
  7. package/build/stack/src/Navigation.d.ts +212 -0
  8. package/build/{Router.d.ts → stack/src/Router.d.ts} +11 -9
  9. package/build/{Screen.d.ts → stack/src/Screen.d.ts} +14 -12
  10. package/build/stack/src/__tests__/Navigation/common/constants.d.ts +5 -0
  11. package/build/stack/src/__tests__/Navigation/navigation.index.test.d.ts +1 -0
  12. package/build/stack/src/__tests__/Navigation/preload.test.d.ts +1 -0
  13. package/build/stack/src/__tests__/Screen/set-config.test.d.ts +1 -0
  14. package/build/stack/src/__tests__/Screen/set-params.test.d.ts +1 -0
  15. package/build/{common → stack/src/common}/constants.d.ts +1 -0
  16. package/build/{common → stack/src/common}/events.d.ts +2 -2
  17. package/build/{common → stack/src/common}/types.d.ts +10 -12
  18. package/build/{common → stack/src/common}/utils.d.ts +5 -0
  19. package/package.json +5 -3
  20. package/build/Anchor.d.ts +0 -34
  21. package/build/GestureRegion.d.ts +0 -5
  22. package/build/Navigation.d.ts +0 -33
  23. /package/build/{__tests__/navigation.test.d.ts → stack/src/__tests__/Navigation/entries.test.d.ts} +0 -0
  24. /package/build/{__tests__/screen.test.d.ts → stack/src/__tests__/Navigation/index.test.d.ts} +0 -0
  25. /package/build/{animation-configs → stack/src/animation-configs}/animation-presets.d.ts +0 -0
  26. /package/build/{animation-configs → stack/src/animation-configs}/keyframe-options-presets.d.ts +0 -0
  27. /package/build/{animation-configs → stack/src/animation-configs}/keyframe-presets.d.ts +0 -0
  28. /package/build/{common → stack/src/common}/hooks.d.ts +0 -0
  29. /package/build/{index.d.ts → stack/src/index.d.ts} +0 -0
package/build/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { NavigationBase as ht, resolveBaseURLFromPattern as dt, matchRoute as Y, ScreenBase as ft, RouterBase as vt, cloneAndInject as gt, includesRoute as pt, useNavigationBase as mt, useRouterBase as yt, useRouteBase as wt, useParamsBase as Et } from "@react-motion-router/core";
2
- import { createRef as Pt, startTransition as N, useDebugValue as j, useEffect as C, useState as St, useRef as $, useCallback as bt } from "react";
3
- import { GestureTimeline as _t, springToLinear as Lt, easingToLinear as A } from "web-animations-extension";
4
- import { jsx as ut } from "react/jsx-runtime";
5
- var g = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Rt = {}, R = {};
6
- Object.defineProperty(R, "__esModule", { value: !0 });
7
- var rt;
1
+ import { NavigationBase as yt, resolveBaseURLFromPattern as wt, matchRoute as X, LAST_INDEX as L, FIRST_INDEX as C, SINGLE_ELEMENT_LENGTH as T, ScreenBase as Et, RoutePropContext as Pt, RouterBase as bt, PromiseWrapper as St, cloneAndInject as _t, LoadEvent as Lt, historyEntryFromDestination as Tt, useNavigationBase as Rt, useRouterBase as kt, useRouteBase as It, useParamsBase as Ft, Anchor as xt } from "@react-motion-router/core";
2
+ import { jsx as G } from "react/jsx-runtime";
3
+ import N, { useContext as Dt, createRef as Ot, startTransition as $, useDebugValue as H, useRef as Mt, useEffect as U, useCallback as V } from "react";
4
+ import { GestureTimeline as Kt, springToLinear as Bt, easingToLinear as q } from "web-animations-extension";
5
+ var y = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Yt = {}, _ = {};
6
+ Object.defineProperty(_, "__esModule", { value: !0 });
7
+ var ct;
8
8
  (function(n) {
9
9
  n[n.tap = 0] = "tap", n[n.longpress = 1] = "longpress", n[n.pinchstart = 2] = "pinchstart", n[n.pinch = 3] = "pinch", n[n.pinchend = 4] = "pinchend", n[n.rotatestart = 5] = "rotatestart", n[n.rotate = 6] = "rotate", n[n.rotateend = 7] = "rotateend", n[n.swipestart = 8] = "swipestart", n[n.swipe = 9] = "swipe", n[n.swipeend = 10] = "swipeend", n[n.panstart = 11] = "panstart", n[n.pan = 12] = "pan", n[n.panend = 13] = "panend", n[n.doubletap = 14] = "doubletap";
10
- })(rt || (rt = {}));
11
- class kt extends TouchEvent {
10
+ })(ct || (ct = {}));
11
+ class Xt extends TouchEvent {
12
12
  constructor(t, e) {
13
13
  if (super(t, {
14
14
  touches: Array.from(e.touches),
@@ -27,51 +27,51 @@ class kt extends TouchEvent {
27
27
  this.gestureTarget = e.touches[0].target, this.x = e.touches[0].clientX, this.y = e.touches[0].clientY;
28
28
  }
29
29
  }
30
- R.default = kt;
31
- var W = {}, Tt = g && g.__importDefault || function(n) {
30
+ _.default = Xt;
31
+ var z = {}, Ct = y && y.__importDefault || function(n) {
32
32
  return n && n.__esModule ? n : { default: n };
33
33
  };
34
- Object.defineProperty(W, "__esModule", { value: !0 });
35
- const It = Tt(R);
36
- class xt extends It.default {
34
+ Object.defineProperty(z, "__esModule", { value: !0 });
35
+ const Ut = Ct(_);
36
+ class Ht extends Ut.default {
37
37
  constructor(t, e) {
38
38
  super("longpress", t), this.duration = 0, this.duration = e;
39
39
  }
40
40
  }
41
- W.default = xt;
42
- var q = {}, Ft = g && g.__importDefault || function(n) {
41
+ z.default = Ht;
42
+ var Z = {}, At = y && y.__importDefault || function(n) {
43
43
  return n && n.__esModule ? n : { default: n };
44
44
  };
45
- Object.defineProperty(q, "__esModule", { value: !0 });
46
- const Ot = Ft(R);
47
- class Dt extends Ot.default {
45
+ Object.defineProperty(Z, "__esModule", { value: !0 });
46
+ const jt = At(_);
47
+ class Nt extends jt.default {
48
48
  constructor(t) {
49
49
  super("tap", t), this.duration = 0;
50
50
  }
51
51
  }
52
- q.default = Dt;
53
- var G = {}, Mt = g && g.__importDefault || function(n) {
52
+ Z.default = Nt;
53
+ var J = {}, $t = y && y.__importDefault || function(n) {
54
54
  return n && n.__esModule ? n : { default: n };
55
55
  };
56
- Object.defineProperty(G, "__esModule", { value: !0 });
57
- const Kt = Mt(R);
58
- class Bt extends Kt.default {
56
+ Object.defineProperty(J, "__esModule", { value: !0 });
57
+ const Vt = $t(_);
58
+ class Wt extends Vt.default {
59
59
  constructor(t) {
60
60
  super("doubletap", t);
61
61
  }
62
62
  }
63
- G.default = Bt;
64
- var F = {}, Yt = g && g.__importDefault || function(n) {
63
+ J.default = Wt;
64
+ var x = {}, Gt = y && y.__importDefault || function(n) {
65
65
  return n && n.__esModule ? n : { default: n };
66
66
  };
67
- Object.defineProperty(F, "__esModule", { value: !0 });
68
- F.SwipeEndEvent = F.SwipeStartEvent = void 0;
69
- const Ct = Yt(R);
70
- var st;
67
+ Object.defineProperty(x, "__esModule", { value: !0 });
68
+ x.SwipeEndEvent = x.SwipeStartEvent = void 0;
69
+ const qt = Gt(_);
70
+ var ut;
71
71
  (function(n) {
72
72
  n[n.start = 0] = "start", n[n.end = 1] = "end";
73
- })(st || (st = {}));
74
- class z extends Ct.default {
73
+ })(ut || (ut = {}));
74
+ class Q extends qt.default {
75
75
  constructor(t, e, r) {
76
76
  let s;
77
77
  switch (r) {
@@ -87,35 +87,35 @@ class z extends Ct.default {
87
87
  super(s, t), this.velocity = e.velocity, this.direction = e.direction;
88
88
  }
89
89
  }
90
- class Xt extends z {
90
+ class zt extends Q {
91
91
  constructor(t, e) {
92
92
  super(t, e);
93
93
  }
94
94
  }
95
- F.default = Xt;
96
- class jt extends z {
95
+ x.default = zt;
96
+ class Zt extends Q {
97
97
  constructor(t, e) {
98
98
  super(t, e, "start");
99
99
  }
100
100
  }
101
- F.SwipeStartEvent = jt;
102
- class Ut extends z {
101
+ x.SwipeStartEvent = Zt;
102
+ class Jt extends Q {
103
103
  constructor(t, e) {
104
104
  super(t, e, "end");
105
105
  }
106
106
  }
107
- F.SwipeEndEvent = Ut;
108
- var O = {}, Ht = g && g.__importDefault || function(n) {
107
+ x.SwipeEndEvent = Jt;
108
+ var D = {}, Qt = y && y.__importDefault || function(n) {
109
109
  return n && n.__esModule ? n : { default: n };
110
110
  };
111
- Object.defineProperty(O, "__esModule", { value: !0 });
112
- O.PanEndEvent = O.PanStartEvent = void 0;
113
- const Nt = Ht(R);
114
- var it;
111
+ Object.defineProperty(D, "__esModule", { value: !0 });
112
+ D.PanEndEvent = D.PanStartEvent = void 0;
113
+ const te = Qt(_);
114
+ var ht;
115
115
  (function(n) {
116
116
  n[n.start = 0] = "start", n[n.end = 1] = "end";
117
- })(it || (it = {}));
118
- class Z extends Nt.default {
117
+ })(ht || (ht = {}));
118
+ class tt extends te.default {
119
119
  constructor(t, e, r) {
120
120
  let s;
121
121
  switch (r) {
@@ -138,35 +138,35 @@ class Z extends Nt.default {
138
138
  };
139
139
  }
140
140
  }
141
- class Vt extends Z {
141
+ class ee extends tt {
142
142
  constructor(t, e) {
143
143
  super(t, e);
144
144
  }
145
145
  }
146
- O.default = Vt;
147
- class $t extends Z {
146
+ D.default = ee;
147
+ class ne extends tt {
148
148
  constructor(t, e) {
149
149
  super(t, e, "start");
150
150
  }
151
151
  }
152
- O.PanStartEvent = $t;
153
- class At extends Z {
152
+ D.PanStartEvent = ne;
153
+ class re extends tt {
154
154
  constructor(t, e) {
155
155
  super(t, e, "end");
156
156
  }
157
157
  }
158
- O.PanEndEvent = At;
159
- var D = {}, Wt = g && g.__importDefault || function(n) {
158
+ D.PanEndEvent = re;
159
+ var O = {}, se = y && y.__importDefault || function(n) {
160
160
  return n && n.__esModule ? n : { default: n };
161
161
  };
162
- Object.defineProperty(D, "__esModule", { value: !0 });
163
- D.PinchEndEvent = D.PinchStartEvent = void 0;
164
- const qt = Wt(R);
165
- var at;
162
+ Object.defineProperty(O, "__esModule", { value: !0 });
163
+ O.PinchEndEvent = O.PinchStartEvent = void 0;
164
+ const ie = se(_);
165
+ var lt;
166
166
  (function(n) {
167
167
  n[n.start = 0] = "start", n[n.end = 1] = "end";
168
- })(at || (at = {}));
169
- class J extends qt.default {
168
+ })(lt || (lt = {}));
169
+ class et extends ie.default {
170
170
  constructor(t, e, r) {
171
171
  let s;
172
172
  switch (r) {
@@ -185,35 +185,35 @@ class J extends qt.default {
185
185
  });
186
186
  }
187
187
  }
188
- class Gt extends J {
188
+ class ae extends et {
189
189
  constructor(t, e) {
190
190
  super(t, e);
191
191
  }
192
192
  }
193
- D.default = Gt;
194
- class zt extends J {
193
+ O.default = ae;
194
+ class oe extends et {
195
195
  constructor(t, e) {
196
196
  super(t, e, "start");
197
197
  }
198
198
  }
199
- D.PinchStartEvent = zt;
200
- class Zt extends J {
199
+ O.PinchStartEvent = oe;
200
+ class ce extends et {
201
201
  constructor(t, e) {
202
202
  super(t, e, "end");
203
203
  }
204
204
  }
205
- D.PinchEndEvent = Zt;
206
- var M = {}, Jt = g && g.__importDefault || function(n) {
205
+ O.PinchEndEvent = ce;
206
+ var M = {}, ue = y && y.__importDefault || function(n) {
207
207
  return n && n.__esModule ? n : { default: n };
208
208
  };
209
209
  Object.defineProperty(M, "__esModule", { value: !0 });
210
210
  M.RotateEndEvent = M.RotateStartEvent = void 0;
211
- const Qt = Jt(R);
212
- var ot;
211
+ const he = ue(_);
212
+ var dt;
213
213
  (function(n) {
214
214
  n[n.start = 0] = "start", n[n.end = 1] = "end";
215
- })(ot || (ot = {}));
216
- class Q extends Qt.default {
215
+ })(dt || (dt = {}));
216
+ class nt extends he.default {
217
217
  constructor(t, e, r) {
218
218
  let s;
219
219
  switch (r) {
@@ -237,33 +237,33 @@ class Q extends Qt.default {
237
237
  }), this.rotationDeg = e.rotationDeg;
238
238
  }
239
239
  }
240
- class te extends Q {
240
+ class le extends nt {
241
241
  constructor(t, e) {
242
242
  super(t, e);
243
243
  }
244
244
  }
245
- M.default = te;
246
- class ee extends Q {
245
+ M.default = le;
246
+ class de extends nt {
247
247
  constructor(t, e) {
248
248
  super(t, e, "start");
249
249
  }
250
250
  }
251
- M.RotateStartEvent = ee;
252
- class ne extends Q {
251
+ M.RotateStartEvent = de;
252
+ class fe extends nt {
253
253
  constructor(t, e) {
254
254
  super(t, e, "end");
255
255
  }
256
256
  }
257
- M.RotateEndEvent = ne;
257
+ M.RotateEndEvent = fe;
258
258
  var k = {};
259
259
  Object.defineProperty(k, "__esModule", { value: !0 });
260
260
  k.closest = k.Vec2 = k.assert = void 0;
261
- function re(n, t) {
261
+ function ve(n, t) {
262
262
  if (!n)
263
263
  throw new Error(t);
264
264
  }
265
- k.assert = re;
266
- class se {
265
+ k.assert = ve;
266
+ class ge {
267
267
  constructor(t, e) {
268
268
  this._x = 0, this._y = 0, this._clientX = 0, this._clientY = 0, this._clientX = t, this._clientY = e, this._x = this.translateX(t), this._y = this.translateY(e);
269
269
  }
@@ -307,181 +307,181 @@ class se {
307
307
  return Math.sqrt(Math.pow(this._clientX, 2) + Math.pow(this._clientY, 2));
308
308
  }
309
309
  }
310
- k.Vec2 = se;
311
- function ie(n, t) {
310
+ k.Vec2 = ge;
311
+ function pe(n, t) {
312
312
  return t.reduce((e, r) => {
313
313
  let s = Math.abs(e - n), i = Math.abs(r - n);
314
314
  return s === i ? e > r ? e : r : i < s ? r : e;
315
315
  });
316
316
  }
317
- k.closest = ie;
317
+ k.closest = pe;
318
318
  (function(n) {
319
- var t = g && g.__createBinding || (Object.create ? function(u, a, h, P) {
320
- P === void 0 && (P = h), Object.defineProperty(u, P, { enumerable: !0, get: function() {
321
- return a[h];
319
+ var t = y && y.__createBinding || (Object.create ? function(h, o, f, P) {
320
+ P === void 0 && (P = f), Object.defineProperty(h, P, { enumerable: !0, get: function() {
321
+ return o[f];
322
322
  } });
323
- } : function(u, a, h, P) {
324
- P === void 0 && (P = h), u[P] = a[h];
325
- }), e = g && g.__setModuleDefault || (Object.create ? function(u, a) {
326
- Object.defineProperty(u, "default", { enumerable: !0, value: a });
327
- } : function(u, a) {
328
- u.default = a;
329
- }), r = g && g.__importStar || function(u) {
330
- if (u && u.__esModule)
331
- return u;
332
- var a = {};
333
- if (u != null)
334
- for (var h in u)
335
- h !== "default" && Object.prototype.hasOwnProperty.call(u, h) && t(a, u, h);
336
- return e(a, u), a;
337
- }, s = g && g.__importDefault || function(u) {
338
- return u && u.__esModule ? u : { default: u };
323
+ } : function(h, o, f, P) {
324
+ P === void 0 && (P = f), h[P] = o[f];
325
+ }), e = y && y.__setModuleDefault || (Object.create ? function(h, o) {
326
+ Object.defineProperty(h, "default", { enumerable: !0, value: o });
327
+ } : function(h, o) {
328
+ h.default = o;
329
+ }), r = y && y.__importStar || function(h) {
330
+ if (h && h.__esModule)
331
+ return h;
332
+ var o = {};
333
+ if (h != null)
334
+ for (var f in h)
335
+ f !== "default" && Object.prototype.hasOwnProperty.call(h, f) && t(o, h, f);
336
+ return e(o, h), o;
337
+ }, s = y && y.__importDefault || function(h) {
338
+ return h && h.__esModule ? h : { default: h };
339
339
  };
340
340
  Object.defineProperty(n, "__esModule", { value: !0 }), n.RotateEndEvent = n.RotateEvent = n.RotateStartEvent = n.PinchEndEvent = n.PinchEvent = n.PinchStartEvent = n.PanEndEvent = n.PanEvent = n.PanStartEvent = n.SwipeEndEvent = n.SwipeEvent = n.SwipeStartEvent = n.DoubleTapEvent = n.LongPressEvent = n.GestureEvent = n.TapEvent = void 0;
341
- const i = s(R);
341
+ const i = s(_);
342
342
  n.GestureEvent = i.default;
343
- const o = s(W);
344
- n.LongPressEvent = o.default;
345
- const c = s(q);
343
+ const a = s(z);
344
+ n.LongPressEvent = a.default;
345
+ const c = s(Z);
346
346
  n.TapEvent = c.default;
347
- const l = s(G);
348
- n.DoubleTapEvent = l.default;
349
- const f = r(F);
350
- n.SwipeEvent = f.default, Object.defineProperty(n, "SwipeEndEvent", { enumerable: !0, get: function() {
351
- return f.SwipeEndEvent;
347
+ const u = s(J);
348
+ n.DoubleTapEvent = u.default;
349
+ const l = r(x);
350
+ n.SwipeEvent = l.default, Object.defineProperty(n, "SwipeEndEvent", { enumerable: !0, get: function() {
351
+ return l.SwipeEndEvent;
352
352
  } }), Object.defineProperty(n, "SwipeStartEvent", { enumerable: !0, get: function() {
353
- return f.SwipeStartEvent;
353
+ return l.SwipeStartEvent;
354
354
  } });
355
- const d = r(O);
356
- n.PanEvent = d.default, Object.defineProperty(n, "PanEndEvent", { enumerable: !0, get: function() {
357
- return d.PanEndEvent;
355
+ const v = r(D);
356
+ n.PanEvent = v.default, Object.defineProperty(n, "PanEndEvent", { enumerable: !0, get: function() {
357
+ return v.PanEndEvent;
358
358
  } }), Object.defineProperty(n, "PanStartEvent", { enumerable: !0, get: function() {
359
- return d.PanStartEvent;
359
+ return v.PanStartEvent;
360
360
  } });
361
- const w = r(D);
362
- n.PinchEvent = w.default, Object.defineProperty(n, "PinchEndEvent", { enumerable: !0, get: function() {
363
- return w.PinchEndEvent;
361
+ const d = r(O);
362
+ n.PinchEvent = d.default, Object.defineProperty(n, "PinchEndEvent", { enumerable: !0, get: function() {
363
+ return d.PinchEndEvent;
364
364
  } }), Object.defineProperty(n, "PinchStartEvent", { enumerable: !0, get: function() {
365
- return w.PinchStartEvent;
365
+ return d.PinchStartEvent;
366
366
  } });
367
- const E = r(M);
368
- n.RotateEvent = E.default, Object.defineProperty(n, "RotateEndEvent", { enumerable: !0, get: function() {
369
- return E.RotateEndEvent;
367
+ const m = r(M);
368
+ n.RotateEvent = m.default, Object.defineProperty(n, "RotateEndEvent", { enumerable: !0, get: function() {
369
+ return m.RotateEndEvent;
370
370
  } }), Object.defineProperty(n, "RotateStartEvent", { enumerable: !0, get: function() {
371
- return E.RotateStartEvent;
371
+ return m.RotateStartEvent;
372
372
  } });
373
- const v = k;
373
+ const g = k;
374
374
  var p;
375
- (function(u) {
376
- u[u.right = 0] = "right", u[u.up = 1] = "up", u[u.left = 2] = "left", u[u.down = 3] = "down";
375
+ (function(h) {
376
+ h[h.right = 0] = "right", h[h.up = 1] = "up", h[h.left = 2] = "left", h[h.down = 3] = "down";
377
377
  })(p || (p = {}));
378
- class m {
378
+ class w {
379
379
  constructor() {
380
- this.touchStart = new TouchEvent("touchstart") || {}, this.touchMove = new TouchEvent("touchmove") || {}, this.touchEnd = new TouchEvent("touchend") || {}, this.touchCancel = new TouchEvent("touchcancel") || {}, this.velocity = 0, this.dxDy = new v.Vec2(0, 0), this.scale = 1, this.rotation = 0, this.rotationDeg = 0, this.anchor = new v.Vec2(0, 0), this.octant = 0, this.isPanning = !1, this.isPinching = !1, this.isSwiping = !1, this.isRotating = !1, this.touchStartTime = 0, this.touchEndTime = 0, this.lastTouchTime = 0, this.taps = 0, this.scaleBase = 0, this.touchMoved = !1, this.touchDown = !1, this.shouldFire = !1, this.pointers = 0, this.isLongPress = !1, this.longPressTimeout = 0, this.touchStartListener = this.onTouchStart.bind(this), this.touchMoveListener = this.onTouchMove.bind(this), this.touchEndListener = this.onTouchEnd.bind(this), this.touchCancelListener = this.onTouchCancel.bind(this), this.currentTarget = window, this.config = {
380
+ this.touchStart = new TouchEvent("touchstart") || {}, this.touchMove = new TouchEvent("touchmove") || {}, this.touchEnd = new TouchEvent("touchend") || {}, this.touchCancel = new TouchEvent("touchcancel") || {}, this.velocity = 0, this.dxDy = new g.Vec2(0, 0), this.scale = 1, this.rotation = 0, this.rotationDeg = 0, this.anchor = new g.Vec2(0, 0), this.octant = 0, this.isPanning = !1, this.isPinching = !1, this.isSwiping = !1, this.isRotating = !1, this.touchStartTime = 0, this.touchEndTime = 0, this.lastTouchTime = 0, this.taps = 0, this.scaleBase = 0, this.touchMoved = !1, this.touchDown = !1, this.shouldFire = !1, this.pointers = 0, this.isLongPress = !1, this.longPressTimeout = 0, this.touchStartListener = this.onTouchStart.bind(this), this.touchMoveListener = this.onTouchMove.bind(this), this.touchEndListener = this.onTouchEnd.bind(this), this.touchCancelListener = this.onTouchCancel.bind(this), this.currentTarget = window, this.config = {
381
381
  longPressDuration: 500,
382
382
  tapDelay: 500,
383
383
  minPointers: 1,
384
384
  numberOfTaps: 0
385
- }, m.listening || (TouchEvent && window.addEventListener("touchstart", this.touchStartListener, !0), m.listening = !0);
385
+ }, w.listening || (TouchEvent && window.addEventListener("touchstart", this.touchStartListener, !0), w.listening = !0);
386
386
  }
387
- bind(a) {
388
- this.unbind(this.currentTarget), a.addEventListener("touchmove", this.touchMoveListener, !0), a.addEventListener("touchend", this.touchEndListener, !0), a.addEventListener("touchcancel", this.touchCancelListener, !0), this.currentTarget = a;
387
+ bind(o) {
388
+ this.unbind(this.currentTarget), o.addEventListener("touchmove", this.touchMoveListener, !0), o.addEventListener("touchend", this.touchEndListener, !0), o.addEventListener("touchcancel", this.touchCancelListener, !0), this.currentTarget = o;
389
389
  }
390
- unbind(a) {
391
- a.removeEventListener("touchmove", this.touchMoveListener), a.removeEventListener("touchend", this.touchEndListener), a.removeEventListener("touchcancel", this.touchCancelListener);
390
+ unbind(o) {
391
+ o.removeEventListener("touchmove", this.touchMoveListener), o.removeEventListener("touchend", this.touchEndListener), o.removeEventListener("touchcancel", this.touchCancelListener);
392
392
  }
393
393
  clean() {
394
394
  this.touchMoved = !1, this.touchStartTime = 0, this.touchDown = !1, this.scaleBase = 0, this.longPressTimeout && !this.isLongPress && (clearTimeout(this.longPressTimeout), this.longPressTimeout = 0), this.isLongPress = !1;
395
395
  }
396
- onPointerLeave(a) {
397
- if (!a.touches.length) {
396
+ onPointerLeave(o) {
397
+ if (!o.touches.length) {
398
398
  if (this.isSwiping) {
399
- const h = new f.SwipeEndEvent(a, {
399
+ const f = new l.SwipeEndEvent(o, {
400
400
  velocity: this.velocity,
401
- direction: p[(0, v.closest)(this.octant, [0, 1, 2, 3])]
401
+ direction: p[(0, g.closest)(this.octant, [0, 1, 2, 3])]
402
402
  });
403
- this.dispatchEvent(h), this.isSwiping = !1;
403
+ this.dispatchEvent(f), this.isSwiping = !1;
404
404
  }
405
405
  if (this.isPanning) {
406
- const h = new d.PanEndEvent(a, {
406
+ const f = new v.PanEndEvent(o, {
407
407
  translation: this.dxDy,
408
408
  velocity: this.velocity
409
409
  });
410
- this.dispatchEvent(h), this.isPanning = !1;
410
+ this.dispatchEvent(f), this.isPanning = !1;
411
411
  }
412
412
  }
413
- if (a.touches.length === 1) {
413
+ if (o.touches.length === 1) {
414
414
  if (this.scaleBase = 0, this.isPinching) {
415
- const h = new w.PinchEndEvent(a, {
415
+ const f = new d.PinchEndEvent(o, {
416
416
  scale: this.scale
417
417
  });
418
- this.dispatchEvent(h), this.isPinching = !1;
418
+ this.dispatchEvent(f), this.isPinching = !1;
419
419
  }
420
420
  if (this.isRotating) {
421
- const h = new E.RotateEndEvent(a, {
421
+ const f = new m.RotateEndEvent(o, {
422
422
  rotation: this.rotation,
423
423
  rotationDeg: this.rotationDeg,
424
424
  anchor: this.anchor
425
425
  });
426
- this.dispatchEvent(h), this.isRotating = !1;
426
+ this.dispatchEvent(f), this.isRotating = !1;
427
427
  }
428
428
  }
429
429
  }
430
- dispatchEvent(a) {
430
+ dispatchEvent(o) {
431
431
  queueMicrotask(() => {
432
- this.currentTarget.dispatchEvent(a);
432
+ this.currentTarget.dispatchEvent(o);
433
433
  });
434
434
  }
435
- onTouchStart(a) {
436
- this.currentTarget !== a.touches[0].target && (this.clean(), this.unbind(this.currentTarget), this.pointers = this.touchEnd.touches.length, this.taps = 0), this.touchStart = a;
437
- const h = parseInt(a.touches[0].target.dataset.minpointers || "0") || this.config.minPointers;
438
- if (this.touchStart.touches.length < h) {
435
+ onTouchStart(o) {
436
+ this.currentTarget !== o.touches[0].target && (this.clean(), this.unbind(this.currentTarget), this.pointers = this.touchEnd.touches.length, this.taps = 0), this.touchStart = o;
437
+ const f = parseInt(o.touches[0].target.dataset.minpointers || "0") || this.config.minPointers;
438
+ if (this.touchStart.touches.length < f) {
439
439
  this.shouldFire = !1;
440
440
  return;
441
441
  }
442
- this.shouldFire = !0, this.touchStartTime = a.timeStamp, this.touchDown = !0, this.pointers || this.bind(a.touches[0].target), this.pointers = this.touchStart.touches.length;
442
+ this.shouldFire = !0, this.touchStartTime = o.timeStamp, this.touchDown = !0, this.pointers || this.bind(o.touches[0].target), this.pointers = this.touchStart.touches.length;
443
443
  const P = parseFloat(this.currentTarget.dataset.longpressduration || "0") || this.config.longPressDuration;
444
444
  if (this.longPressTimeout || (this.longPressTimeout = setTimeout(() => {
445
445
  if (!this.touchMoved && this.touchDown) {
446
- const y = Date.now() - this.touchStartTime, b = new o.default(this.touchStart, y);
447
- this.dispatchEvent(b), this.isLongPress = !0, this.longPressTimeout = 0;
446
+ const E = Date.now() - this.touchStartTime, R = new a.default(this.touchStart, E);
447
+ this.dispatchEvent(R), this.isLongPress = !0, this.longPressTimeout = 0;
448
448
  }
449
449
  }, P)), this.touchStart.touches.length > 1) {
450
- const y = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), b = new v.Vec2(this.touchStart.touches[1].clientX, this.touchStart.touches[1].clientY);
451
- this.scaleBase = y.substract(b).magnitude;
450
+ const E = new g.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), R = new g.Vec2(this.touchStart.touches[1].clientX, this.touchStart.touches[1].clientY);
451
+ this.scaleBase = E.substract(R).magnitude;
452
452
  } else
453
453
  this.scaleBase = 0;
454
454
  }
455
- onTouchMove(a) {
455
+ onTouchMove(o) {
456
456
  if (!this.shouldFire)
457
457
  return;
458
- if (this.touchMoved = !0, this.touchMove = a, a.touches.length > 1 && this.touchStart.touches.length > 1 && (a.touches[1].clientX !== this.touchStart.touches[1].clientX || a.touches[1].clientY !== this.touchStart.touches[1].clientY)) {
459
- const _ = new v.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY), U = new v.Vec2(this.touchMove.touches[1].clientX, this.touchMove.touches[1].clientY), et = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), nt = _.substract(U);
460
- if (this.scaleBase && Math.abs(this.scaleBase - nt.magnitude) > 10) {
461
- const I = nt.magnitude / this.scaleBase;
458
+ if (this.touchMoved = !0, this.touchMove = o, o.touches.length > 1 && this.touchStart.touches.length > 1 && (o.touches[1].clientX !== this.touchStart.touches[1].clientX || o.touches[1].clientY !== this.touchStart.touches[1].clientY)) {
459
+ const b = new g.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY), A = new g.Vec2(this.touchMove.touches[1].clientX, this.touchMove.touches[1].clientY), at = new g.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), ot = b.substract(A);
460
+ if (this.scaleBase && Math.abs(this.scaleBase - ot.magnitude) > 10) {
461
+ const I = ot.magnitude / this.scaleBase;
462
462
  if (this.scale = I, this.isPinching) {
463
- const H = new w.default(a, {
463
+ const j = new d.default(o, {
464
464
  scale: I
465
465
  });
466
- this.dispatchEvent(H);
466
+ this.dispatchEvent(j);
467
467
  } else {
468
- const H = new w.PinchStartEvent(a, {
468
+ const j = new d.PinchStartEvent(o, {
469
469
  scale: I
470
470
  });
471
- this.dispatchEvent(H), this.isPinching = !0;
471
+ this.dispatchEvent(j), this.isPinching = !0;
472
472
  }
473
473
  }
474
- this.anchor = _;
475
- let B = Math.atan2(et.clientY - U.clientY, et.clientX - U.clientX);
474
+ this.anchor = b;
475
+ let B = Math.atan2(at.clientY - A.clientY, at.clientX - A.clientX);
476
476
  if (B < 0 ? B += 1.5708 : B -= 1.5708, this.rotation = B, this.rotationDeg = B * 180 / Math.PI, this.anchor = this.anchor, this.isRotating) {
477
- const I = new E.default(a, {
477
+ const I = new m.default(o, {
478
478
  anchor: this.anchor,
479
479
  rotation: this.rotation,
480
480
  rotationDeg: this.rotationDeg
481
481
  });
482
482
  this.dispatchEvent(I);
483
483
  } else {
484
- const I = new E.RotateStartEvent(a, {
484
+ const I = new m.RotateStartEvent(o, {
485
485
  anchor: this.anchor,
486
486
  rotation: this.rotation,
487
487
  rotationDeg: this.rotationDeg
@@ -489,64 +489,64 @@ k.closest = ie;
489
489
  this.dispatchEvent(I), this.isRotating = !0;
490
490
  }
491
491
  }
492
- const h = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), y = new v.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY).substract(h), b = y.magnitude, T = {
493
- x: y.x / b,
494
- y: y.y / b
495
- }, S = Math.atan2(T.y, T.x);
496
- this.octant = Math.round(4 * S / (2 * Math.PI) + 4) % 4;
497
- const X = (a.timeStamp - this.touchStart.timeStamp) / 1e3, K = y.magnitude / X;
492
+ const f = new g.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), E = new g.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY).substract(f), R = E.magnitude, it = {
493
+ x: E.x / R,
494
+ y: E.y / R
495
+ }, pt = Math.atan2(it.y, it.x);
496
+ this.octant = Math.round(4 * pt / (2 * Math.PI) + 4) % 4;
497
+ const mt = (o.timeStamp - this.touchStart.timeStamp) / 1e3, K = E.magnitude / mt;
498
498
  if (this.isSwiping) {
499
- const _ = new f.default(a, {
500
- direction: p[(0, v.closest)(this.octant, [0, 1, 2, 3])],
499
+ const b = new l.default(o, {
500
+ direction: p[(0, g.closest)(this.octant, [0, 1, 2, 3])],
501
501
  velocity: K
502
502
  });
503
- this.dispatchEvent(_);
503
+ this.dispatchEvent(b);
504
504
  } else {
505
- const _ = new f.SwipeStartEvent(a, {
506
- direction: p[(0, v.closest)(this.octant, [0, 1, 2, 3])],
505
+ const b = new l.SwipeStartEvent(o, {
506
+ direction: p[(0, g.closest)(this.octant, [0, 1, 2, 3])],
507
507
  velocity: K
508
508
  });
509
- this.dispatchEvent(_), this.isSwiping = !0;
509
+ this.dispatchEvent(b), this.isSwiping = !0;
510
510
  }
511
- if (this.dxDy = y, this.velocity = K, this.isPanning) {
512
- const _ = new d.default(a, {
513
- translation: y,
511
+ if (this.dxDy = E, this.velocity = K, this.isPanning) {
512
+ const b = new v.default(o, {
513
+ translation: E,
514
514
  velocity: K
515
515
  });
516
- this.dispatchEvent(_);
516
+ this.dispatchEvent(b);
517
517
  } else {
518
- const _ = new d.PanStartEvent(a, {
519
- translation: y,
518
+ const b = new v.PanStartEvent(o, {
519
+ translation: E,
520
520
  velocity: K
521
521
  });
522
- this.dispatchEvent(_), this.isPanning = !0;
522
+ this.dispatchEvent(b), this.isPanning = !0;
523
523
  }
524
524
  }
525
- onTouchEnd(a) {
526
- const h = parseInt(this.currentTarget.dataset.numberoftaps || "0") || this.config.numberOfTaps;
527
- if (this.taps++, this.shouldFire = this.taps > h, this.shouldFire) {
528
- this.touchEnd = a, this.touchEndTime = a.timeStamp;
525
+ onTouchEnd(o) {
526
+ const f = parseInt(this.currentTarget.dataset.numberoftaps || "0") || this.config.numberOfTaps;
527
+ if (this.taps++, this.shouldFire = this.taps > f, this.shouldFire) {
528
+ this.touchEnd = o, this.touchEndTime = o.timeStamp;
529
529
  const P = parseFloat(this.currentTarget.dataset.tapdelay || "0") || this.config.tapDelay;
530
530
  if (!this.touchMoved && !this.isLongPress)
531
531
  if (this.taps === 1 || this.touchEndTime - this.lastTouchTime < P) {
532
- if (this.taps % 2 === h) {
533
- const b = new l.default(a);
534
- this.dispatchEvent(b), this.taps = 0;
532
+ if (this.taps % 2 === f) {
533
+ const R = new u.default(o);
534
+ this.dispatchEvent(R), this.taps = 0;
535
535
  }
536
- const y = new c.default(a);
537
- this.dispatchEvent(y);
536
+ const E = new c.default(o);
537
+ this.dispatchEvent(E);
538
538
  } else
539
539
  this.taps = 0;
540
540
  }
541
- this.pointers = this.touchEnd.touches.length, this.lastTouchTime = this.touchEndTime, this.onPointerLeave(a), this.unbind(this.currentTarget), this.clean();
541
+ this.pointers = this.touchEnd.touches.length, this.lastTouchTime = this.touchEndTime, this.onPointerLeave(o), this.unbind(this.currentTarget), this.clean();
542
542
  }
543
- onTouchCancel(a) {
544
- this.shouldFire && (this.touchCancel = a, this.unbind(this.currentTarget), this.clean());
543
+ onTouchCancel(o) {
544
+ this.shouldFire && (this.touchCancel = o, this.unbind(this.currentTarget), this.clean());
545
545
  }
546
546
  }
547
- n.default = m, m.listening = !1, TouchEvent && (window.gestureProvider = new m());
548
- })(Rt);
549
- class ae extends Event {
547
+ n.default = w, w.listening = !1, TouchEvent && (window.gestureProvider = new w());
548
+ })(Yt);
549
+ class me extends Event {
550
550
  routerId;
551
551
  route;
552
552
  props;
@@ -554,11 +554,11 @@ class ae extends Event {
554
554
  signal;
555
555
  committed;
556
556
  transition;
557
- constructor(t, e, r, s, i, o, c) {
558
- super("navigate"), this.routerId = t, this.route = e, this.props = r, this.navigationType = s ?? "push", this.signal = i, this.committed = o, this.transition = c;
557
+ constructor(t, e, r, s, i, a, c) {
558
+ super("navigate"), this.routerId = t, this.route = e, this.props = r, this.navigationType = s ?? "push", this.signal = i, this.committed = a, this.transition = c;
559
559
  }
560
560
  }
561
- class oe extends Event {
561
+ class ye extends Event {
562
562
  routerId;
563
563
  signal;
564
564
  committed;
@@ -567,7 +567,7 @@ class oe extends Event {
567
567
  super("back"), this.routerId = t, this.signal = e, this.committed = r, this.transition = s;
568
568
  }
569
569
  }
570
- class ce extends Event {
570
+ class we extends Event {
571
571
  routerId;
572
572
  signal;
573
573
  committed;
@@ -576,24 +576,24 @@ class ce extends Event {
576
576
  super("forward"), this.routerId = t, this.signal = e, this.committed = r, this.transition = s;
577
577
  }
578
578
  }
579
- class ue extends Event {
579
+ class Ee extends Event {
580
580
  source;
581
581
  constructor(t) {
582
582
  super("gesture-start"), this.source = t;
583
583
  }
584
584
  }
585
- class le extends Event {
585
+ class Pe extends Event {
586
586
  source;
587
587
  constructor(t) {
588
588
  super("gesture-end"), this.source = t;
589
589
  }
590
590
  }
591
- class he extends Event {
591
+ class be extends Event {
592
592
  constructor() {
593
593
  super("gesture-cancel");
594
594
  }
595
595
  }
596
- class de {
596
+ class vt {
597
597
  routerId;
598
598
  #t;
599
599
  index;
@@ -634,14 +634,13 @@ class de {
634
634
  return this.#t.getState();
635
635
  }
636
636
  }
637
- class fe extends ht {
638
- router;
637
+ class Se extends yt {
638
+ config;
639
639
  constructor(t) {
640
- super(), this.router = t;
640
+ super(t), this.config = t;
641
641
  }
642
- preload(t, e = {}, r = {}) {
643
- const { pathname: s } = new URL(t, this.baseURL);
644
- return this.router.preload(s, e, r);
642
+ preload(t, e = {}) {
643
+ return super.preload(t, e);
645
644
  }
646
645
  replace(t, e = {}, r = {}) {
647
646
  return this.navigate(t, e, { ...r, type: "replace" });
@@ -653,23 +652,46 @@ class fe extends ht {
653
652
  return window.navigation.reload({ state: t });
654
653
  }
655
654
  traverseTo(t, e = {}) {
656
- const r = window.navigation.traverseTo(t), s = window.navigation.transition, i = s.from.index, o = window.navigation.entries().findIndex((f) => f.key === t), c = new AbortController();
657
- c.signal.addEventListener("abort", () => this.traverseTo(s.from.key), { once: !0 }), e.signal?.addEventListener("abort", c.abort, { once: !0 });
658
- let l;
659
- return i > o ? l = this.createBackEvent(c.signal, r.committed, s) : l = this.createForwardEvent(c.signal, r.committed, s), this.dispatchEvent?.(l), r;
655
+ const r = window.navigation.traverseTo(t), s = window.navigation.transition, i = s.from.index, a = window.navigation.entries().findIndex((l) => l.key === t), c = new AbortController();
656
+ c.signal.addEventListener(
657
+ "abort",
658
+ () => this.traverseTo(s.from.key),
659
+ { once: !0 }
660
+ ), e.signal?.addEventListener("abort", c.abort, { once: !0 });
661
+ let u;
662
+ return i > a ? u = this.createBackEvent(
663
+ c.signal,
664
+ r.committed,
665
+ s
666
+ ) : u = this.createForwardEvent(
667
+ c.signal,
668
+ r.committed,
669
+ s
670
+ ), this.dispatchEvent?.(u), r;
660
671
  }
661
672
  navigate(t, e = {}, r = {}) {
662
- const { type: s = "push" } = r, i = new URL(t, this.baseURL), o = window.navigation.navigate(i.href, { history: s, state: e }), c = window.navigation.transition, l = new AbortController();
663
- l.signal.addEventListener("abort", () => this.goBack(), { once: !0 }), r.signal?.addEventListener("abort", l.abort, { once: !0 });
664
- const f = this.createNavigateEvent(t, e, s, l.signal, o.committed, c);
665
- return this.dispatchEvent?.(f), o;
673
+ const { type: s = "push" } = r, i = new URL(t, this.baseURL), a = window.navigation.navigate(i.href, { history: s, state: e }), c = window.navigation.transition, u = new AbortController();
674
+ u.signal.addEventListener("abort", () => this.goBack(), { once: !0 }), r.signal?.addEventListener("abort", u.abort, { once: !0 });
675
+ const l = this.createNavigateEvent(
676
+ t,
677
+ e,
678
+ s,
679
+ u.signal,
680
+ a.committed,
681
+ c
682
+ );
683
+ return this.dispatchEvent?.(l), a;
666
684
  }
667
685
  goBack(t = {}) {
668
686
  if (!this.canGoBack())
669
687
  return;
670
688
  const e = window.navigation.traverseTo(this.previous.key), r = window.navigation.transition, s = new AbortController();
671
689
  s.signal.addEventListener("abort", () => this.goForward(), { once: !0 }), t.signal?.addEventListener("abort", s.abort, { once: !0 });
672
- const i = this.createBackEvent(s.signal, e.committed, r);
690
+ const i = this.createBackEvent(
691
+ s.signal,
692
+ e.committed,
693
+ r
694
+ );
673
695
  return this.dispatchEvent?.(i), e;
674
696
  }
675
697
  goForward(t = {}) {
@@ -677,110 +699,300 @@ class fe extends ht {
677
699
  return;
678
700
  const e = window.navigation.traverseTo(this.next.key), r = window.navigation.transition, s = new AbortController();
679
701
  s.signal.addEventListener("abort", () => this.goBack(), { once: !0 }), t.signal?.addEventListener("abort", s.abort, { once: !0 });
680
- const i = this.createForwardEvent(s.signal, e.committed, r);
702
+ const i = this.createForwardEvent(
703
+ s.signal,
704
+ e.committed,
705
+ r
706
+ );
681
707
  return this.dispatchEvent?.(i), e;
682
708
  }
683
709
  createBackEvent(t, e, r) {
684
710
  if (!this.routerId)
685
711
  throw new Error("Router ID is not set");
686
- return new oe(this.routerId, t, e, r);
712
+ return new ye(this.routerId, t, e, r);
687
713
  }
688
714
  createForwardEvent(t, e, r) {
689
715
  if (!this.routerId)
690
716
  throw new Error("Router ID is not set");
691
- return new ce(this.routerId, t, e, r);
717
+ return new we(this.routerId, t, e, r);
692
718
  }
693
- createNavigateEvent(t, e, r, s, i, o) {
719
+ createNavigateEvent(t, e, r, s, i, a) {
694
720
  if (!this.routerId)
695
721
  throw new Error("Router ID is not set");
696
- return new ae(
722
+ return new me(
697
723
  this.routerId,
698
724
  t,
699
725
  e,
700
726
  r,
701
727
  s,
702
728
  i,
703
- o
729
+ a
704
730
  );
705
731
  }
706
732
  get committed() {
707
- return this.router.committed;
733
+ return this.config.getCommitted();
708
734
  }
709
735
  get transition() {
710
- return this.router.state.transition;
736
+ return this.config.getTransition();
711
737
  }
712
738
  get globalEntries() {
713
739
  return window.navigation.entries();
714
740
  }
741
+ /**
742
+ * Returns the list of history entries **owned by this router**, derived from the
743
+ * browser’s global navigation history.
744
+ *
745
+ * ---
746
+ *
747
+ * ### Mental model
748
+ *
749
+ * The Web Navigation API exposes a **single, flat history list**.
750
+ * This router projects a **scoped, ordered view** of that list ensuring the
751
+ * router can only see entries it created.
752
+ *
753
+ * Each global entry is classified as one of:
754
+ *
755
+ * - **Owned by this router**
756
+ * - **Owned by a nested router**
757
+ * - **Owned by a different (foreign) router**
758
+ *
759
+ * The resulting entry list is built by iterating global history **from the
760
+ * beginning**, applying ownership rules, and stopping when ownership is lost.
761
+ *
762
+ * ---
763
+ *
764
+ * ### Ownership & contiguity rules
765
+ *
766
+ * 1. **Entries owned by this router**
767
+ * - Are included
768
+ * - Preserve global ordering
769
+ *
770
+ * 2. **Entries owned by nested routers**
771
+ * - Exactly **one entry is included** (the nested router’s mount point),
772
+ * because it must be rendered by the parent router
773
+ * - All subsequent entries belonging to that same nested scope are excluded
774
+ *
775
+ * 3. **Entries owned by a foreign router**
776
+ * - Are excluded
777
+ * - **Terminate entry collection** once at least one entry has been matched
778
+ *
779
+ * This means contiguity is enforced **only across routers that cannot be
780
+ * matched by this router at all**.
781
+ *
782
+ * ---
783
+ *
784
+ * ### Important invariants
785
+ *
786
+ * - Returned entries are always in **global history order**
787
+ * - Local indices are **stable and monotonic**
788
+ * - Nested router entries never leak into the parent router
789
+ * - Entry collection stops once navigation leaves this router’s ownership
790
+ * after it has begun
791
+ *
792
+ * ---
793
+ *
794
+ * ### Example
795
+ *
796
+ * Global history:
797
+ * ```
798
+ * 0: / (parent)
799
+ * 1: /world (parent)
800
+ * 2: /world/1 (nested mount point)
801
+ * 3: /world/2 (nested)
802
+ * 4: /about (parent)
803
+ * 5: /other-router/page (foreign)
804
+ * 6: / (parent)
805
+ * ```
806
+ *
807
+ * Parent router entries:
808
+ * ```
809
+ * /, /world, /world/1, /about
810
+ * ```
811
+ *
812
+ * Collection stops at index 5 because ownership is transferred to a
813
+ * foreign router.
814
+ *
815
+ *
816
+ * This approach balances correctness, simplicity, and predictable behavior
817
+ * without requiring global history rewriting or fragile index arithmetic.
818
+ */
715
819
  get entries() {
716
- const t = this.router.pathPatterns.filter(({ pattern: s }) => s.endsWith("**"));
717
- let e = null, r = !1;
718
- return this.globalEntries.filter((s) => {
719
- if (!s.url)
720
- return !1;
721
- const i = new URL(s.url), o = dt(this.baseURLPattern.pathname, i.pathname);
722
- if (!o)
820
+ const t = this.config.getPathPatterns().filter(({ pattern: i }) => i.endsWith("**"));
821
+ let e = null, r = L, s = !1;
822
+ return this.globalEntries.filter((i, a) => {
823
+ if (!i.url || s)
723
824
  return !1;
825
+ const c = new URL(i.url), u = wt(
826
+ this.baseURLPattern.pathname,
827
+ c.pathname
828
+ );
829
+ if (!u)
830
+ return r !== L && (s = !0), !1;
724
831
  if (e) {
725
- const c = new URLPattern(e.pattern, o.href);
726
- if (Y(
727
- i.pathname,
728
- i.pathname,
832
+ const l = new URLPattern(
833
+ e.pattern,
834
+ u.href
835
+ );
836
+ if (X(
729
837
  c.pathname,
838
+ c.pathname,
839
+ l.pathname,
730
840
  e.caseSensitive
731
- ) || r)
732
- return r = !0, !1;
841
+ ))
842
+ return !1;
733
843
  }
734
844
  return e = t.find(
735
- ({ pattern: c, caseSensitive: l }) => Y(
736
- c,
737
- i.pathname,
845
+ ({ pattern: l, caseSensitive: v }) => X(
846
+ l,
847
+ c.pathname,
738
848
  this.baseURLPattern.pathname,
739
- l
849
+ v
740
850
  )
741
- ) ?? null, !0;
742
- }).map((s, i) => new de(s, this.routerId, i));
743
- }
851
+ ) ?? null, r = a, !0;
852
+ }).map((i, a) => new vt(i, this.routerId, a));
853
+ }
854
+ /**
855
+ * Returns the **local history index** for this router, derived from the
856
+ * browser’s global navigation state.
857
+ *
858
+ * ---
859
+ *
860
+ * ### Problem this solves
861
+ *
862
+ * The Web Navigation API exposes a **single, flat history list**.
863
+ * This router exposes a **scoped history view** that:
864
+ *
865
+ * - filters out entries owned by nested routers
866
+ * - preserves global ordering
867
+ * - reindexes entries locally
868
+ *
869
+ * As a result, there is **no arithmetic relationship** between:
870
+ *
871
+ * - `window.navigation.currentEntry.index` (global)
872
+ * - this router’s local `index`
873
+ *
874
+ * This getter computes the local index **by identity**, not position.
875
+ *
876
+ * ---
877
+ *
878
+ * ### High-level behavior
879
+ *
880
+ * The returned index is:
881
+ *
882
+ * > the index of the **most recent local entry** that appears in the
883
+ * > browser’s global history **at or before** the current global entry.
884
+ *
885
+ * ---
886
+ *
887
+ * ### Resolution strategy
888
+ *
889
+ * 1. If the current global index is **before** this router’s first entry,
890
+ * the index resolves to `0`.
891
+ *
892
+ * 2. If the current global index is **after** this router’s last entry,
893
+ * the index resolves to `entries.length - 1`.
894
+ *
895
+ * 3. Otherwise:
896
+ * - A window of global history is sliced from the first local entry
897
+ * up to and including the current global entry.
898
+ * - Local entries are scanned **from newest to oldest**.
899
+ * - The first local entry whose `key` appears in that global slice
900
+ * determines the local index.
901
+ *
902
+ * Entry identity is determined by **history entry keys**, not URLs or
903
+ * global indices.
904
+ *
905
+ * ---
906
+ *
907
+ * ### Why key-based matching is required
908
+ *
909
+ * - Global indices are sparse once nested routers are involved
910
+ * - URLs may repeat or be replaced
911
+ * - History entries can be inserted between parent entries
912
+ *
913
+ * Keys provide the only stable identity that survives these cases.
914
+ *
915
+ * ---
916
+ *
917
+ * ### Invariant
918
+ *
919
+ * The returned index always satisfies:
920
+ *
921
+ * ```
922
+ * 0 ≤ index < entries.length
923
+ * ```
924
+ *
925
+ * and monotonically tracks navigation through global history.
926
+ *
927
+ * ---
928
+ *
929
+ * ### Example
930
+ *
931
+ * Global history:
932
+ * ```
933
+ * 0: /
934
+ * 1: /world
935
+ * 2: /world/1 (nested)
936
+ * 3: /about ← current
937
+ * ```
938
+ *
939
+ * Local router entries:
940
+ * ```
941
+ * / (index 0)
942
+ * /world (index 1)
943
+ * /about (index 2)
944
+ * ```
945
+ *
946
+ * Result:
947
+ * ```
948
+ * index === 2
949
+ * ```
950
+ */
744
951
  get index() {
745
- const t = window.navigation.currentEntry?.index ?? -1, e = this.entries.at(0)?.globalIndex ?? -1, r = this.entries.at(-1)?.globalIndex ?? -1;
952
+ const t = window.navigation.currentEntry?.index ?? L, e = this.entries.at(C)?.globalIndex ?? L, r = this.entries.at(L)?.globalIndex ?? L;
746
953
  if (t <= e)
747
- return 0;
954
+ return C;
748
955
  if (t >= r)
749
- return this.entries.length - 1;
956
+ return this.entries.length - T;
750
957
  {
751
- const s = this.globalEntries.slice(e, t + 1);
752
- return this.entries.findLastIndex((i) => s.findLastIndex((o) => i.key === o.key) > -1);
958
+ const s = this.globalEntries.slice(
959
+ e,
960
+ t + T
961
+ );
962
+ return this.entries.findLastIndex((i) => s.findLastIndex(
963
+ (a) => i.key === a.key
964
+ ) > L);
753
965
  }
754
966
  }
755
967
  get previous() {
756
- return this.entries[this.index - 1] ?? null;
968
+ return this.entries[this.index - T] ?? null;
757
969
  }
758
970
  get next() {
759
- return this.entries[this.index + 1] ?? null;
971
+ return this.entries[this.index + T] ?? null;
760
972
  }
761
973
  get current() {
762
974
  return this.entries[this.index];
763
975
  }
764
976
  canGoBack() {
765
- return !!this.previous?.sameDocument;
977
+ return this.previous?.url?.origin === globalThis.location.origin;
766
978
  }
767
979
  canGoForward() {
768
- return !!this.next?.sameDocument;
980
+ return this.next?.url?.origin === globalThis.location.origin;
769
981
  }
770
982
  }
771
- function ve(n) {
983
+ function _e(n) {
772
984
  return Object.fromEntries(n.entries());
773
985
  }
774
- function ge(n) {
986
+ function Le(n) {
775
987
  return new URLSearchParams(n).toString();
776
988
  }
777
- function pe(n) {
989
+ function Te(n) {
778
990
  return n && typeof n == "object" && "gesture" in n ? !!n.gesture : !1;
779
991
  }
780
- function me(n) {
992
+ function Re(n) {
781
993
  return n && typeof n == "object" && "rollback" in n ? !!n.rollback : !1;
782
994
  }
783
- function V(n, t) {
995
+ function W(n, t) {
784
996
  if (n === t)
785
997
  return !0;
786
998
  if (n === null || t === null || typeof n != "object" || typeof t != "object")
@@ -788,12 +1000,24 @@ function V(n, t) {
788
1000
  const e = Object.keys(n), r = Object.keys(t);
789
1001
  if (e.length !== r.length)
790
1002
  return !1;
791
- for (let s of e)
792
- if (!r.includes(s) || !V(n[s], t[s]))
1003
+ for (const s of e)
1004
+ if (!r.includes(s) || !W(n[s], t[s]))
793
1005
  return !1;
794
1006
  return !0;
795
1007
  }
796
- class Je extends ft {
1008
+ function Y(n, { x: t, y: e }, r, s) {
1009
+ switch (n) {
1010
+ case "right":
1011
+ return Math.abs(t - r.left) < s;
1012
+ case "left":
1013
+ return Math.abs(t - r.right) < s;
1014
+ case "down":
1015
+ return Math.abs(e - r.top) < s;
1016
+ case "up":
1017
+ return Math.abs(e - r.bottom) < s;
1018
+ }
1019
+ }
1020
+ class rt extends Et {
797
1021
  #t;
798
1022
  constructor(t, e) {
799
1023
  super(t, e);
@@ -805,8 +1029,21 @@ class Je extends ft {
805
1029
  static getDerivedStateFromProps(t) {
806
1030
  return t.config?.presentation === "dialog" || t.config?.presentation === "modal" ? { elementType: "dialog" } : { elementType: "div" };
807
1031
  }
1032
+ static historyEntryStateFromEntry(t, e) {
1033
+ if (t?.url) {
1034
+ const r = t.getState() ?? {}, s = _e(t.url.searchParams), { params: i = {} } = e ?? {};
1035
+ return r.params = {
1036
+ ...r.params,
1037
+ ...s,
1038
+ ...i
1039
+ }, r;
1040
+ }
1041
+ return {};
1042
+ }
808
1043
  setParams(t) {
809
- super.setParams(t), this.setHistoryState(({ params: e }) => ({ params: { ...e, ...t } }));
1044
+ super.setParams(t), this.setHistoryState(
1045
+ ({ params: e }) => ({ params: { ...e, ...t } })
1046
+ );
810
1047
  }
811
1048
  setConfig(t) {
812
1049
  super.setConfig(t), this.setHistoryState(({ config: e }) => {
@@ -841,20 +1078,15 @@ class Je extends ft {
841
1078
  }
842
1079
  get historyEntryState() {
843
1080
  const t = this.#t;
844
- if (t?.url) {
845
- const e = t.getState() ?? {}, r = ve(t.url.searchParams), s = Y(
846
- this.props.path,
847
- t.url.pathname,
848
- this.context.baseURLPattern.pathname,
849
- this.props.caseSensitive
850
- )?.params;
851
- return e.params = {
852
- ...e.params,
853
- ...r,
854
- ...s
855
- }, e;
856
- }
857
- return {};
1081
+ if (!t.url)
1082
+ return {};
1083
+ const e = X(
1084
+ this.props.path,
1085
+ t.url.pathname,
1086
+ this.context.baseURLPattern.pathname,
1087
+ this.props.caseSensitive
1088
+ );
1089
+ return rt.historyEntryStateFromEntry(t, e);
858
1090
  }
859
1091
  get id() {
860
1092
  return this.internalProps.id.toString();
@@ -874,7 +1106,7 @@ class Je extends ft {
874
1106
  };
875
1107
  }
876
1108
  get routeProp() {
877
- const t = this.setParams.bind(this), e = this.setConfig.bind(this), { path: r } = this.props, { focused: s } = this.state, { params: i, config: o, resolvedPathname: c } = this;
1109
+ const t = this.setParams.bind(this), e = this.setConfig.bind(this), { path: r } = this.props, { focused: s } = this.state, { params: i, config: a, resolvedPathname: c } = this;
878
1110
  return {
879
1111
  setParams: t,
880
1112
  setConfig: e,
@@ -882,7 +1114,7 @@ class Je extends ft {
882
1114
  resolvedPathname: c,
883
1115
  focused: s,
884
1116
  params: i,
885
- config: o
1117
+ config: a
886
1118
  };
887
1119
  }
888
1120
  setHistoryState(t) {
@@ -899,28 +1131,30 @@ class Je extends ft {
899
1131
  onClickOutside(t) {
900
1132
  if (!this.transitionProvider.current?.ref.current)
901
1133
  return;
902
- const e = this.context?.navigation, r = this.transitionProvider.current.ref.current.getBoundingClientRect();
903
- r.top <= t.clientY && t.clientY <= r.top + r.height && r.left <= t.clientX && t.clientX <= r.left + r.width || e?.goBack();
1134
+ const e = this.context?.navigation;
1135
+ t.composedPath().includes(this.transitionProvider.current.ref.current) || e?.goBack();
904
1136
  }
905
1137
  onEnter(t) {
906
- if (this.transitionProvider.current?.ref.current instanceof HTMLDialogElement && this.transitionProvider.current.ref.current.open === !1) {
907
- const e = this.context?.navigation;
908
- this.props.config?.presentation === "modal" ? this.transitionProvider.current.ref.current.showModal() : this.transitionProvider.current.ref.current.show(), this.transitionProvider.current.ref.current.style.maxHeight = "unset", this.transitionProvider.current.ref.current.style.maxWidth = "unset", this.transitionProvider.current.ref.current.style.width = "max-content", this.transitionProvider.current.ref.current.style.height = "max-content";
909
- const r = this.onClickOutside.bind(this);
910
- this.transitionProvider.current?.ref.current.addEventListener("close", function() {
911
- this.returnValue !== "screen-exit" && (this.style.display = "block", e?.goBack()), e?.removeEventListener("click", r);
912
- }, { once: !0 }), e?.addEventListener("click", r);
1138
+ const e = this.transitionProvider.current?.ref;
1139
+ if (e?.current instanceof HTMLDialogElement && e.current.open === !1) {
1140
+ const r = this.context?.navigation;
1141
+ this.props.config?.presentation === "modal" ? e.current.showModal() : e.current.show(), e.current.style.maxHeight = "unset", e.current.style.maxWidth = "unset", e.current.style.width = "max-content", e.current.style.height = "max-content";
1142
+ const s = this.onClickOutside.bind(this);
1143
+ e.current.addEventListener("close", function() {
1144
+ this.returnValue !== "screen-exit" && (this.style.display = "block", r?.goBack()), r?.removeEventListener("click", s);
1145
+ }, { once: !0 }), r?.addEventListener("click", s);
913
1146
  }
914
1147
  return super.onEnter(t);
915
1148
  }
916
1149
  onExited(t) {
917
- return this.transitionProvider.current?.ref.current instanceof HTMLDialogElement && this.transitionProvider.current.ref.current.close("screen-exit"), super.onExited(t);
1150
+ const e = this.transitionProvider.current?.ref;
1151
+ return e?.current instanceof HTMLDialogElement && e.current.close("screen-exit"), super.onExited(t);
918
1152
  }
919
1153
  }
920
- function x(n) {
921
- return !!(n !== null && typeof n == "object" && n.hasOwnProperty("current"));
1154
+ function F(n) {
1155
+ return !!(n !== null && typeof n == "object" && Object.hasOwn(n, "current"));
922
1156
  }
923
- const ye = {
1157
+ const ke = {
924
1158
  horizontal: ["left", "right"],
925
1159
  vertical: ["up", "down"],
926
1160
  up: ["up"],
@@ -928,58 +1162,87 @@ const ye = {
928
1162
  left: ["left"],
929
1163
  right: ["right"]
930
1164
  };
931
- function we(n, t) {
932
- return ye[t].includes(n);
1165
+ function Ie(n, t) {
1166
+ return ke[t].includes(n);
933
1167
  }
934
- function Ee(n, { x: t, y: e }, r, s) {
935
- if (n === "right" && Math.abs(t - r.left) >= s || n === "left" && Math.abs(t - r.right) >= s || n === "down" && Math.abs(e - r.top) >= s || n === "up" && Math.abs(e - r.bottom) >= s)
936
- return !1;
937
- }
938
- function Pe(n) {
1168
+ function Fe(n) {
939
1169
  return n === "left" || n === "right" || n === "horizontal";
940
1170
  }
941
- const L = {
1171
+ const S = {
942
1172
  gestureHysteresis: 0.5,
943
1173
  gestureMinFlingVelocity: 400,
944
1174
  gestureAreaWidth: 100,
945
1175
  gestureDirection: "right",
946
1176
  gestureDisabled: !1
947
- }, Se = 0.5;
948
- class be {
949
- promise;
950
- state;
951
- nativeResolve;
952
- nativeReject;
953
- constructor() {
954
- this.state = "pending", this.nativeResolve = this.nativeReject = null, this.promise = new Promise((t, e) => {
955
- this.nativeResolve = t, this.nativeReject = e;
956
- });
957
- }
958
- resolve(t) {
959
- this.state = "resolved", this.nativeResolve?.(t);
960
- }
961
- reject(t) {
962
- this.state = "rejected", this.promise.catch(() => {
963
- }), this.nativeReject?.(t);
964
- }
1177
+ }, xe = 0.5, De = 1, Oe = 24;
1178
+ function ft({ clientX: n, clientY: t }, e, r) {
1179
+ return Y("left", { x: n, y: t }, e, r) && Y("right", { x: n, y: t }, e, r) && Y("down", { x: n, y: t }, e, r) && Y("up", { x: n, y: t }, e, r);
965
1180
  }
966
- class Qe extends vt {
967
- navigation = new fe(this);
1181
+ const Me = (n) => function({
1182
+ ref: e,
1183
+ gestureBehaviour: r = "contain",
1184
+ uaGestureAreaWidth: s = Oe,
1185
+ ...i
1186
+ }) {
1187
+ const a = N.useRef(null), c = Dt(
1188
+ Pt
1189
+ ) ?? null, { gestureAreaWidth: u = 0 } = c?.config ?? {};
1190
+ return N.useImperativeHandle(
1191
+ e,
1192
+ () => a.current
1193
+ ), N.useEffect(() => {
1194
+ if (!a.current)
1195
+ return;
1196
+ const v = a.current, d = (m) => {
1197
+ if (!(m instanceof TouchEvent) || r === "none")
1198
+ return;
1199
+ const g = v.getBoundingClientRect();
1200
+ Array.from(m.touches).map((h) => ft(h, g, u)).some(Boolean) && m.stopPropagation(), Array.from(m.touches).map((h) => ft(h, g, s)).some(Boolean) && m.preventDefault();
1201
+ };
1202
+ return v.addEventListener("touchstart", d), () => {
1203
+ v.removeEventListener(
1204
+ "touchstart",
1205
+ d
1206
+ );
1207
+ };
1208
+ }, [s, u, r]), /* @__PURE__ */ G(n, { ref: a, ...i });
1209
+ }, Ke = new Proxy(
1210
+ {},
1211
+ {
1212
+ get(n, t) {
1213
+ return n[t] ??= Me(t), n[t];
1214
+ }
1215
+ }
1216
+ );
1217
+ class hn extends bt {
1218
+ navigation;
968
1219
  #t = null;
969
1220
  constructor(t, e) {
970
- super(t, e);
1221
+ super(t, e), this.navigation = new Se({
1222
+ addEventListener: this.addEventListener.bind(this),
1223
+ removeEventListener: this.removeEventListener.bind(this),
1224
+ dispatchEvent: this.dispatchEvent.bind(this),
1225
+ parent: this.parent?.navigation ?? null,
1226
+ routerId: this.id,
1227
+ baseURL: this.baseURL,
1228
+ baseURLPattern: this.baseURLPattern,
1229
+ getCommitted: () => this.committed,
1230
+ getTransition: () => this.state.transition,
1231
+ getPathPatterns: () => this.pathPatterns,
1232
+ getNavigatorById: (u) => this.getRouterById(u)?.navigation ?? null
1233
+ });
971
1234
  const {
972
- gestureAreaWidth: r = L.gestureAreaWidth,
973
- gestureDirection: s = L.gestureDirection,
974
- gestureDisabled: i = L.gestureDisabled,
975
- gestureHysteresis: o = L.gestureHysteresis,
976
- gestureMinFlingVelocity: c = L.gestureMinFlingVelocity
1235
+ gestureAreaWidth: r = S.gestureAreaWidth,
1236
+ gestureDirection: s = S.gestureDirection,
1237
+ gestureDisabled: i = S.gestureDisabled,
1238
+ gestureHysteresis: a = S.gestureHysteresis,
1239
+ gestureMinFlingVelocity: c = S.gestureMinFlingVelocity
977
1240
  } = t.config?.screenConfig ?? {};
978
1241
  this.state = {
979
1242
  screenStack: [],
980
1243
  gestureDirection: s,
981
1244
  gestureAreaWidth: r,
982
- gestureHysteresis: o,
1245
+ gestureHysteresis: a,
983
1246
  gestureDisabled: i,
984
1247
  gestureMinFlingVelocity: c,
985
1248
  transition: null,
@@ -991,53 +1254,40 @@ class Qe extends vt {
991
1254
  }
992
1255
  static getDerivedStateFromProps(t, e) {
993
1256
  const r = e.screenStack.find(
994
- (s) => x(s.ref) && s.ref.current?.focused
1257
+ (s) => F(s.ref) && s.ref.current?.focused
995
1258
  )?.props.config;
996
1259
  return document.title = r?.title ?? document.title, {
997
- gestureDirection: r?.gestureDirection ?? L.gestureDirection,
998
- gestureAreaWidth: r?.gestureAreaWidth ?? L.gestureAreaWidth,
999
- gestureMinFlingVelocity: r?.gestureMinFlingVelocity ?? L.gestureMinFlingVelocity,
1000
- gestureHysteresis: r?.gestureHysteresis ?? L.gestureHysteresis,
1001
- gestureDisabled: r?.gestureDisabled ?? L.gestureDisabled,
1260
+ gestureDirection: r?.gestureDirection ?? S.gestureDirection,
1261
+ gestureAreaWidth: r?.gestureAreaWidth ?? S.gestureAreaWidth,
1262
+ gestureMinFlingVelocity: r?.gestureMinFlingVelocity ?? S.gestureMinFlingVelocity,
1263
+ gestureHysteresis: r?.gestureHysteresis ?? S.gestureHysteresis,
1264
+ gestureDisabled: r?.gestureDisabled ?? S.gestureDisabled,
1002
1265
  documentTitle: r?.title
1003
1266
  };
1004
1267
  }
1005
1268
  componentDidMount() {
1006
- super.componentDidMount(), this.ref.current?.addEventListener("swipestart", this.onSwipeStart), this.ref.current?.addEventListener("swipeend", this.onSwipeEnd), window.navigation.addEventListener(
1007
- "currententrychange",
1008
- this.onCurrentEntryChange
1009
- ), window.navigation.addEventListener("navigate", this.onNavigate), window.navigation.addEventListener(
1010
- "navigatesuccess",
1011
- this.onNavigateSuccess
1012
- ), window.navigation.addEventListener("navigateerror", this.onNavigateError);
1269
+ super.componentDidMount(), window.navigation.addEventListener("currententrychange", this), window.navigation.addEventListener("navigate", this), window.navigation.addEventListener("navigatesuccess", this), window.navigation.addEventListener("navigateerror", this);
1013
1270
  }
1271
+ // TODO: figure out how to remove this
1014
1272
  shouldComponentUpdate(t, e) {
1015
- return !V(this.props.config, t.config) || !V(this.state, e) || this.props.id !== t.id;
1273
+ return !W(this.props.config, t.config) || !W(this.state, e) || this.props.id !== t.id;
1016
1274
  }
1017
1275
  componentWillUnmount() {
1018
- this.ref.current?.removeEventListener("swipestart", this.onSwipeStart), this.ref.current?.removeEventListener("swipeend", this.onSwipeEnd), window.navigation.removeEventListener(
1019
- "currententrychange",
1020
- this.onCurrentEntryChange
1021
- ), window.navigation.removeEventListener("navigate", this.onNavigate), window.navigation.removeEventListener(
1022
- "navigatesuccess",
1023
- this.onNavigateSuccess
1024
- ), window.navigation.removeEventListener(
1025
- "navigateerror",
1026
- this.onNavigateError
1027
- );
1276
+ window.navigation.removeEventListener("currententrychange", this), window.navigation.removeEventListener("navigate", this), window.navigation.removeEventListener("navigatesuccess", this), window.navigation.removeEventListener("navigateerror", this);
1028
1277
  }
1029
- onNavigate = () => {
1030
- this.#t = new be();
1031
- };
1032
- onCurrentEntryChange = () => {
1033
- this.#t?.nativeResolve?.(window.navigation.currentEntry);
1034
- };
1035
- onNavigateSuccess = () => {
1278
+ onnavigate(t) {
1279
+ super.onnavigate(t), this.#t = new St();
1280
+ }
1281
+ oncurrententrychange() {
1282
+ this.#t?.resolve?.(window.navigation.currentEntry);
1283
+ }
1284
+ onnavigatesuccess() {
1036
1285
  this.#t = null;
1037
- };
1038
- onNavigateError = ({ error: t }) => {
1039
- this.#t?.state === "pending" && this.#t.nativeReject?.(t), this.#t = null;
1040
- };
1286
+ }
1287
+ onnavigateerror({ error: t }) {
1288
+ this.#t?.state === "pending" && this.#t.reject?.(t), this.#t = null;
1289
+ }
1290
+ // TODO: change to use handleEvent paradigm
1041
1291
  onGestureCancel = () => {
1042
1292
  if (!this.state.transition)
1043
1293
  throw new Error("Rollback failed, transition is null");
@@ -1049,12 +1299,17 @@ class Qe extends vt {
1049
1299
  if (!this.ref.current || this.state.gestureDisabled)
1050
1300
  return !1;
1051
1301
  const e = this.ref.current.getBoundingClientRect(), { direction: r } = t;
1052
- return (r === "down" || r === "right") && !this.navigation.canGoBack() || (r === "up" || r === "left") && !this.navigation.canGoForward() || Ee(r, t, e, this.state.gestureAreaWidth) ? !1 : we(r, this.state.gestureDirection);
1302
+ return (r === "down" || r === "right") && !this.navigation.canGoBack() || (r === "up" || r === "left") && !this.navigation.canGoForward() || Y(
1303
+ r,
1304
+ t,
1305
+ e,
1306
+ this.state.gestureAreaWidth
1307
+ ) ? !1 : Ie(r, this.state.gestureDirection);
1053
1308
  }
1054
- onSwipeStart = (t) => {
1309
+ onswipestart(t) {
1055
1310
  if (!this.canGestureNavigate(t) || !this.ref.current || !this.screenTransitionLayer.current)
1056
1311
  return;
1057
- const { direction: e } = t, r = Pe(e) ? "x" : "y";
1312
+ const { direction: e } = t, r = Fe(e) ? "x" : "y";
1058
1313
  let s, i;
1059
1314
  switch (e) {
1060
1315
  case "right":
@@ -1070,7 +1325,7 @@ class Qe extends vt {
1070
1325
  s = this.ref.current.clientHeight, i = 0;
1071
1326
  break;
1072
1327
  }
1073
- this.screenTransitionLayer.current.animation.timeline = new _t(
1328
+ this.screenTransitionLayer.current.animation.timeline = new Kt(
1074
1329
  {
1075
1330
  source: this.ref.current,
1076
1331
  type: "swipe",
@@ -1079,24 +1334,24 @@ class Qe extends vt {
1079
1334
  rangeEnd: i
1080
1335
  }
1081
1336
  );
1082
- const o = !0;
1337
+ const a = !0;
1083
1338
  e === "down" || e === "right" ? window.navigation.traverseTo(this.navigation.previous.key, {
1084
- info: { gesture: o }
1339
+ info: { gesture: a }
1085
1340
  }) : window.navigation.traverseTo(this.navigation.next.key, {
1086
- info: { gesture: o }
1087
- }), this.dispatchEvent(new ue(t));
1088
- };
1089
- onSwipeEnd = (t) => {
1341
+ info: { gesture: a }
1342
+ }), this.dispatchEvent(new Ee(t));
1343
+ }
1344
+ onswipeend(t) {
1090
1345
  if (!this.screenTransitionLayer.current)
1091
1346
  return;
1092
1347
  const e = this.screenTransitionLayer.current.animation.effect?.getComputedTiming().progress ?? 0, r = this.screenTransitionLayer.current.animation.playbackRate;
1093
1348
  this.screenTransitionLayer.current.animation.timeline = document.timeline;
1094
1349
  const s = r > 0 ? e > this.state.gestureHysteresis : e < this.state.gestureHysteresis;
1095
1350
  let i = !1;
1096
- t.velocity < this.state.gestureMinFlingVelocity && !s ? (i = !0, this.screenTransitionLayer.current.animation.reverse(), this.dispatchEvent(new he())) : this.dispatchEvent(new le(t)), i && this.screenTransitionLayer.current.animation.finished.then(() => {
1351
+ t.velocity < this.state.gestureMinFlingVelocity && !s ? (i = !0, this.screenTransitionLayer.current.animation.reverse(), this.dispatchEvent(new be())) : this.dispatchEvent(new Pe(t)), i && this.screenTransitionLayer.current.animation.finished.then(() => {
1097
1352
  this.state.controller?.abort("gesture-cancel");
1098
1353
  });
1099
- };
1354
+ }
1100
1355
  get committed() {
1101
1356
  return this.#t?.promise ?? null;
1102
1357
  }
@@ -1106,47 +1361,18 @@ class Qe extends vt {
1106
1361
  ), e = this.state.screenStack.findIndex(
1107
1362
  (r) => r.key === this.state.destinationKey
1108
1363
  );
1109
- return e >= 0 && e < t;
1364
+ return e >= C && e < t;
1110
1365
  }
1111
1366
  get screens() {
1112
1367
  const t = this.state.screenStack;
1113
1368
  return t.filter((e, r) => {
1114
- const s = e.ref ?? null, i = t.at(r + 1)?.ref;
1115
- return x(s) && s.current?.config.keepAlive || x(i) && i.current?.config.presentation === "modal" || x(i) && i.current?.config.presentation === "dialog" || e.key === this.navigation.current?.key || e.key === this.state.fromKey || e.key === this.state.destinationKey;
1369
+ const s = e.ref ?? null, i = t.at(r + T)?.ref;
1370
+ return F(s) && s.current?.config.keepAlive || F(i) && i.current?.config.presentation === "modal" || F(i) && i.current?.config.presentation === "dialog" || e.key === this.navigation.current?.key || e.key === this.state.fromKey || e.key === this.state.destinationKey;
1116
1371
  });
1117
1372
  }
1118
- async preload(t, e = {}, r = {}) {
1119
- const { child: s, matchInfo: i } = this.screenChildFromPathname(t) ?? {};
1120
- if (!s)
1121
- return Promise.resolve(!1);
1122
- const { navigation: o } = this, { signal: c } = r, { path: l } = s.props;
1123
- return await Promise.all([
1124
- this.preloadScreen(s),
1125
- s.props.config?.onLoad?.({
1126
- navigation: o,
1127
- signal: c,
1128
- preloading: !0,
1129
- route: {
1130
- focused: !1,
1131
- path: l,
1132
- resolvedPathname: t,
1133
- config: {
1134
- ...this.props.config?.screenConfig,
1135
- ...s.props.config,
1136
- ...e.config
1137
- },
1138
- params: {
1139
- ...s.props.defaultParams,
1140
- ...i?.params,
1141
- ...e.params
1142
- }
1143
- }
1144
- })
1145
- ]), !0;
1146
- }
1147
1373
  cloneScreenChildFromPathname(t, e) {
1148
1374
  const { child: r } = this.screenChildFromPathname(t) ?? {};
1149
- return r ? (e ??= crypto.randomUUID(), gt(r, {
1375
+ return r ? (e ??= crypto.randomUUID(), _t(r, {
1150
1376
  config: {
1151
1377
  title: document.title,
1152
1378
  ...this.props.config?.screenConfig,
@@ -1155,25 +1381,28 @@ class Qe extends vt {
1155
1381
  id: e,
1156
1382
  resolvedPathname: t,
1157
1383
  key: e,
1158
- ref: Pt()
1384
+ ref: Ot()
1159
1385
  })) : null;
1160
1386
  }
1161
1387
  getScreenRefByKey(t) {
1162
1388
  const e = this.state.screenStack.find(
1163
1389
  (r) => r.key === t
1164
1390
  )?.ref;
1165
- return x(e) ? e : null;
1391
+ return F(e) ? e : null;
1166
1392
  }
1167
1393
  canIntercept(t) {
1168
1394
  const e = new URL(t.destination.url).pathname, r = this.baseURLPattern.pathname;
1169
- return this.mounted && this.shouldIntercept(t) && pt(this.pathPatterns, e, r);
1395
+ return this.mounted && this.shouldIntercept(t) && this.includesRoute(e, r);
1170
1396
  }
1171
1397
  shouldIntercept(t) {
1172
1398
  return t.canIntercept && !t.formData && !t.hashChange && !t.downloadRequest || !!this.props.config?.shouldIntercept?.(t);
1173
1399
  }
1174
1400
  intercept(t) {
1175
- if (t.navigationType !== "load" && this.props.config?.onIntercept?.(t), !t.defaultPrevented)
1401
+ if (t instanceof Lt || this.props.config?.onIntercept?.(t), !t.defaultPrevented)
1176
1402
  switch (t.navigationType) {
1403
+ case "preload":
1404
+ this.handlePreload(t);
1405
+ break;
1177
1406
  case "load":
1178
1407
  this.handleLoad(t);
1179
1408
  break;
@@ -1186,48 +1415,95 @@ class Qe extends vt {
1186
1415
  break;
1187
1416
  }
1188
1417
  }
1418
+ handlePreload(t) {
1419
+ const e = () => {
1420
+ const { pathname: r } = new URL(t.destination.url), {
1421
+ child: s,
1422
+ matchInfo: i = null
1423
+ } = this.screenChildFromPathname(r) ?? {};
1424
+ if (!s)
1425
+ return Promise.resolve();
1426
+ const { navigation: a } = this, { signal: c } = t, { path: u } = s.props, { transition: l } = t;
1427
+ return new Promise((v) => {
1428
+ this.setState({ transition: l }, async () => {
1429
+ const d = rt.historyEntryStateFromEntry(
1430
+ new vt(
1431
+ Tt(t.destination),
1432
+ this.id,
1433
+ L
1434
+ ),
1435
+ i
1436
+ );
1437
+ await Promise.all([
1438
+ this.preloadScreen(s),
1439
+ s.props.config?.onLoad?.({
1440
+ navigation: a,
1441
+ signal: c,
1442
+ preloading: !0,
1443
+ route: {
1444
+ focused: !1,
1445
+ path: u,
1446
+ resolvedPathname: r,
1447
+ config: {
1448
+ ...this.props.config?.screenConfig,
1449
+ ...s.props.config,
1450
+ ...d.config
1451
+ },
1452
+ params: {
1453
+ ...s.props.defaultParams,
1454
+ ...i?.params,
1455
+ ...d.params
1456
+ }
1457
+ }
1458
+ })
1459
+ ]), this.setState({ transition: null }, v);
1460
+ });
1461
+ });
1462
+ };
1463
+ t.intercept({ handler: e });
1464
+ }
1189
1465
  handleLoad(t) {
1190
1466
  const e = () => {
1191
- const r = t.transition?.from?.key ?? null, s = t.destination.key, i = t.transition, o = [], c = this.navigation.entries;
1192
- return c.forEach((l) => {
1193
- if (!l.url)
1467
+ const r = t.transition?.from?.key ?? null, s = t.destination.key, i = t.transition, a = [], c = this.navigation.entries;
1468
+ return c.forEach((u) => {
1469
+ if (!u.url)
1194
1470
  return null;
1195
- const f = this.cloneScreenChildFromPathname(
1196
- l.url.pathname,
1197
- l.key
1471
+ const l = this.cloneScreenChildFromPathname(
1472
+ u.url.pathname,
1473
+ u.key
1198
1474
  );
1199
- if (!f)
1475
+ if (!l)
1200
1476
  return null;
1201
- o.push(f);
1477
+ a.push(l);
1202
1478
  }), new Promise(
1203
- (l, f) => N(() => {
1479
+ (u, l) => $(() => {
1204
1480
  this.setState(
1205
- { screenStack: o, fromKey: r, transition: i, destinationKey: s },
1481
+ { screenStack: a, fromKey: r, transition: i, destinationKey: s },
1206
1482
  async () => {
1207
- const { initialPathname: d } = this.props.config ?? {}, [w] = c;
1208
- if (d && c.length === 1 && w.url && !Y(
1209
- d,
1210
- w.url.pathname,
1483
+ const { initialPathname: v } = this.props.config ?? {}, [d] = c;
1484
+ if (v && c.length === T && d.url && !X(
1485
+ v,
1486
+ d.url.pathname,
1211
1487
  this.baseURLPattern.pathname
1212
1488
  ))
1213
1489
  return (window.navigation.transition?.finished ?? Promise.resolve()).then(() => {
1214
- this.navigation.replace(d).finished.then(() => {
1215
- const m = t.destination.getState() ?? {};
1216
- this.navigation.push(t.destination.url, m);
1490
+ this.navigation.replace(v).finished.then(() => {
1491
+ const w = t.destination.getState() ?? {};
1492
+ this.navigation.push(t.destination.url, w);
1217
1493
  });
1218
- }), l();
1219
- const E = t.signal;
1220
- this.navigation.current?.key === void 0 && f(new Error("Current key is undefined"));
1221
- const v = this.getScreenRefByKey(
1494
+ }), u();
1495
+ const m = t.signal;
1496
+ this.navigation.current?.key === void 0 && l(new Error("Current key is undefined"));
1497
+ const g = this.getScreenRefByKey(
1222
1498
  this.navigation.current.key
1223
1499
  );
1224
1500
  await this.dispatchLifecycleHandlers(
1225
- v,
1501
+ g,
1226
1502
  null,
1227
- E
1228
- ).catch(f), this.setState(
1503
+ m
1504
+ ).catch(l), this.setState(
1229
1505
  { destinationKey: null, fromKey: null, transition: null },
1230
- l
1506
+ u
1231
1507
  );
1232
1508
  }
1233
1509
  );
@@ -1237,31 +1513,35 @@ class Qe extends vt {
1237
1513
  t.intercept({ handler: e });
1238
1514
  }
1239
1515
  handleReplace(t) {
1240
- const e = this.state.screenStack, r = t.destination, s = new URL(r.url).pathname, i = window.navigation.currentEntry?.key ?? r.key, o = this.cloneScreenChildFromPathname(
1516
+ const e = this.state.screenStack, r = t.destination, s = new URL(r.url).pathname, i = window.navigation.currentEntry?.key ?? r.key, a = this.cloneScreenChildFromPathname(
1241
1517
  s,
1242
1518
  i
1243
1519
  );
1244
- if (!o)
1520
+ if (!a)
1245
1521
  return t.preventDefault();
1246
1522
  const c = () => {
1247
- const l = this.state.transition ?? window.navigation.transition, f = l?.from?.key ?? null, d = e.findIndex(
1248
- (w) => w.key === this.navigation.current?.key
1523
+ const u = this.state.transition ?? window.navigation.transition, l = u?.from?.key ?? null, v = e.findIndex(
1524
+ (d) => d.key === this.navigation.current?.key
1249
1525
  );
1250
- return e.splice(d, 1, o), new Promise(
1251
- (w, E) => N(() => {
1526
+ return e.splice(
1527
+ v,
1528
+ T,
1529
+ a
1530
+ ), new Promise(
1531
+ (d, m) => $(() => {
1252
1532
  this.setState(
1253
- { destinationKey: i, fromKey: f, transition: l, screenStack: e },
1533
+ { destinationKey: i, fromKey: l, transition: u, screenStack: e },
1254
1534
  async () => {
1255
- const v = t.signal, p = this.getScreenRefByKey(
1535
+ const g = t.signal, p = this.getScreenRefByKey(
1256
1536
  String(i)
1257
1537
  );
1258
1538
  await this.dispatchLifecycleHandlers(
1259
1539
  p,
1260
1540
  null,
1261
- v
1262
- ).catch(E), this.setState(
1541
+ g
1542
+ ).catch(m), this.setState(
1263
1543
  { destinationKey: null, fromKey: null, transition: null },
1264
- w
1544
+ d
1265
1545
  );
1266
1546
  }
1267
1547
  );
@@ -1275,53 +1555,53 @@ class Qe extends vt {
1275
1555
  if (!this.screenChildFromPathname(s))
1276
1556
  return t.preventDefault();
1277
1557
  const i = () => {
1278
- if (me(t.info))
1558
+ if (Re(t.info))
1279
1559
  return Promise.resolve();
1280
- const l = window.navigation.transition;
1281
- let f = e.findIndex(
1282
- (p) => p.key === l?.from.key
1560
+ const u = window.navigation.transition;
1561
+ let l = e.findIndex(
1562
+ (p) => p.key === u?.from.key
1283
1563
  );
1284
- f === -1 && t.navigationType === "traverse" && (f = e.findIndex((p) => l?.from.url ? Y(
1564
+ l === L && t.navigationType === "traverse" && (l = e.findIndex((p) => u?.from.url ? X(
1285
1565
  p.props.path,
1286
- new URL(l.from.url).pathname,
1566
+ new URL(u.from.url).pathname,
1287
1567
  this.baseURLPattern.pathname,
1288
1568
  p.props.caseSensitive
1289
1569
  ) : !1));
1290
- const d = (e[f]?.key || l?.from.key) ?? null, w = e.findIndex(
1570
+ const v = (e[l]?.key || u?.from.key) ?? null, d = e.findIndex(
1291
1571
  (p) => p.key === t.destination.key
1292
- ), E = (e[w]?.key || window.navigation.currentEntry?.key) ?? null;
1572
+ ), m = (e[d]?.key || window.navigation.currentEntry?.key) ?? null;
1293
1573
  if (t.navigationType === "push") {
1294
- const p = new URL(r.url).pathname, m = this.cloneScreenChildFromPathname(
1574
+ const p = new URL(r.url).pathname, w = this.cloneScreenChildFromPathname(
1295
1575
  p,
1296
- E
1576
+ m
1297
1577
  );
1298
- if (!m)
1578
+ if (!w)
1299
1579
  return Promise.resolve();
1300
1580
  e.splice(
1301
- f + 1,
1581
+ l + T,
1302
1582
  1 / 0,
1303
1583
  // Remove all screens after current
1304
- m
1584
+ w
1305
1585
  );
1306
1586
  }
1307
- const v = new AbortController();
1587
+ const g = new AbortController();
1308
1588
  return new Promise(
1309
- (p, m) => N(() => {
1589
+ (p, w) => $(() => {
1310
1590
  this.setState(
1311
- { controller: v, destinationKey: E, fromKey: d, transition: l, screenStack: e },
1591
+ { controller: g, destinationKey: m, fromKey: v, transition: u, screenStack: e },
1312
1592
  async () => {
1313
- v.signal.onabort = m;
1314
- const u = t.signal, a = this.getScreenRefByKey(String(d)), h = this.getScreenRefByKey(
1315
- String(E)
1593
+ g.signal.onabort = w;
1594
+ const h = t.signal, o = this.getScreenRefByKey(String(v)), f = this.getScreenRefByKey(
1595
+ String(m)
1316
1596
  ), P = this.dispatchLifecycleHandlers(
1317
- h,
1318
- a,
1319
- u
1320
- ).catch(m), y = this.screenTransition(
1321
- h,
1322
- a
1597
+ f,
1598
+ o,
1599
+ h
1600
+ ).catch(w), E = this.screenTransition(
1601
+ f,
1602
+ o
1323
1603
  );
1324
- y?.updatePlaybackRate(1), y?.finished.catch(m), await P, this.setState(
1604
+ E?.updatePlaybackRate(De), E?.finished.catch(w), await P, this.setState(
1325
1605
  {
1326
1606
  destinationKey: null,
1327
1607
  fromKey: null,
@@ -1335,243 +1615,222 @@ class Qe extends vt {
1335
1615
  })
1336
1616
  );
1337
1617
  };
1338
- let o;
1339
- pe(t.info) ? (o = "after-transition", this.addEventListener("gesture-end", () => t.commit?.(), { once: !0 }), this.addEventListener("gesture-cancel", this.onGestureCancel, {
1618
+ let a;
1619
+ Te(t.info) ? (a = "after-transition", this.addEventListener("gesture-end", () => t.commit?.(), { once: !0 }), this.addEventListener("gesture-cancel", this.onGestureCancel, {
1340
1620
  once: !0
1341
- })) : o = "immediate";
1342
- const c = { handler: i, commit: o };
1621
+ })) : a = "immediate";
1622
+ const c = { handler: i, commit: a };
1343
1623
  t.intercept(c);
1344
1624
  }
1345
1625
  async dispatchLifecycleHandlers(t, e, r) {
1346
1626
  let s = !1;
1347
- this.addEventListener("transition-start", () => s = !0, {
1348
- once: !0
1349
- }), await Promise.all([
1627
+ this.addEventListener(
1628
+ "routertransitionstart",
1629
+ () => s = !0,
1630
+ { once: !0 }
1631
+ ), await Promise.all([
1350
1632
  e?.current?.onExit(r),
1351
1633
  t?.current?.onEnter(r),
1352
1634
  t?.current?.load(r)
1353
1635
  ]), s && await new Promise(
1354
- (i) => this.addEventListener("transition-end", i, { once: !0 })
1636
+ (i) => this.addEventListener("routertransitionend", i, { once: !0 })
1355
1637
  ), !this.state.controller?.signal.aborted && await Promise.all([
1356
1638
  e?.current?.onExited(r).then(() => e.current?.blur()),
1357
1639
  t?.current?.onEntered(r).then(() => t.current?.focus())
1358
1640
  ]);
1359
1641
  }
1360
1642
  screenTransition(t, e) {
1361
- const { backNavigating: r } = this;
1362
- if (this.screenTransitionLayer.current && t && e) {
1363
- this.screenTransitionLayer.current.direction = r ? "reverse" : "normal", t.current?.transitionProvider.current && (t.current.transitionProvider.current.exiting = !1), e.current?.transitionProvider.current && (e.current.transitionProvider.current.exiting = !0), this.screenTransitionLayer.current.sharedElementTransitionLayer.current && (this.screenTransitionLayer.current.sharedElementTransitionLayer.current.outgoingScreen = e, this.screenTransitionLayer.current.sharedElementTransitionLayer.current.incomingScreen = t);
1364
- const s = this.screens.findIndex(
1365
- (i) => i.ref === (r ? e : t)
1643
+ const { backNavigating: r } = this, s = this.screenTransitionLayer.current;
1644
+ if (s && t && e) {
1645
+ s.direction = r ? "reverse" : "normal", t.current?.transitionProvider.current && (t.current.transitionProvider.current.exiting = !1), e.current?.transitionProvider.current && (e.current.transitionProvider.current.exiting = !0);
1646
+ const i = s.sharedElementTransitionLayer.current;
1647
+ i && (i.outgoingScreen = e, i.incomingScreen = t);
1648
+ const a = this.screens.findIndex(
1649
+ (c) => c.ref === (r ? e : t)
1366
1650
  );
1367
- return this.screenTransitionLayer.current.screens = this.screens.map((i, o) => (o = o - s + 1, x(i.ref) && i.ref.current?.transitionProvider.current ? (i.ref.current.transitionProvider.current.index = o, i.ref) : null)).filter(x), this.screenTransitionLayer.current.transition();
1651
+ return s.screens = this.screens.map((c, u) => (u = u - a + T, F(c.ref) && c.ref.current?.transitionProvider.current ? (c.ref.current.transitionProvider.current.index = u, c.ref) : null)).filter(F), s.transition();
1368
1652
  }
1369
1653
  }
1654
+ render() {
1655
+ return /* @__PURE__ */ G(Ke.div, { style: { display: "contents" }, children: super.render() });
1656
+ }
1370
1657
  }
1371
- function _e() {
1372
- return j("Stack.Navigation"), mt();
1373
- }
1374
- function tn() {
1375
- return j("Stack.Router"), yt();
1658
+ function Be() {
1659
+ return H("Stack.Navigation"), Rt();
1376
1660
  }
1377
- function en() {
1378
- return j("Stack.Route"), wt();
1661
+ function ln() {
1662
+ return H("Stack.Router"), kt();
1379
1663
  }
1380
- function nn(n, t) {
1381
- return j("Stack.Params"), Et(n, t);
1664
+ function dn() {
1665
+ return H("Stack.Route"), It();
1382
1666
  }
1383
- function Le(n) {
1384
- const t = _e();
1385
- return n ?? t;
1667
+ function fn(n, t) {
1668
+ return H("Stack.Params"), Ft(n, t);
1386
1669
  }
1387
- function Re(n, t = {}) {
1388
- const e = $(null), r = bt(
1670
+ function Ye(n, t, e = {}) {
1671
+ const r = V(
1389
1672
  (s) => {
1390
1673
  s.forEach((i) => {
1391
- i.isIntersecting && n(i);
1674
+ i.isIntersecting && t(i);
1392
1675
  });
1393
1676
  },
1394
- [n]
1677
+ [t]
1395
1678
  );
1396
- return C(() => {
1397
- const s = new IntersectionObserver(r, t), i = e.current;
1679
+ return U(() => {
1680
+ const s = new IntersectionObserver(r, e), i = n.current;
1398
1681
  return i && s.observe(i), () => {
1399
1682
  i && s.unobserve(i);
1400
1683
  };
1401
- }, [r, t]), e;
1402
- }
1403
- function ct(n, t, e, r) {
1404
- C(() => {
1405
- const s = n.current;
1406
- if (s)
1407
- return s.addEventListener(t, e, r), () => {
1408
- s.removeEventListener(t, e, r);
1409
- };
1410
- }, [n, t, e, r]);
1684
+ }, [r, n, e]), n;
1411
1685
  }
1412
- function ke(n, { forceThreshold: t = Se } = {}) {
1413
- const e = $(null), r = () => n(!0), s = (i) => {
1414
- const o = i.touches[0];
1415
- o && o.force >= t && n(!0);
1416
- };
1417
- return ct(e, "mouseenter", r), ct(e, "touchstart", s), e;
1686
+ function Xe(n, t, { forceThreshold: e = xe } = {}) {
1687
+ const r = V(() => t(), [t]), s = V((i) => {
1688
+ const a = i.touches[0];
1689
+ a && a.force >= e && t();
1690
+ }, [e, t]);
1691
+ return U(() => {
1692
+ const i = n.current;
1693
+ return i?.addEventListener("mouseenter", r), () => i?.removeEventListener("mouseenter", r);
1694
+ }), U(() => {
1695
+ const i = n.current;
1696
+ return i?.addEventListener("touchstart", s), () => i?.removeEventListener("touchstart", s);
1697
+ }), n;
1418
1698
  }
1419
- function rn({
1699
+ function vn({
1420
1700
  preload: n,
1421
- goBack: t,
1422
- params: e = {},
1423
- type: r = "push",
1424
- href: s,
1425
- navigation: i,
1426
- onClick: o,
1427
- preloadBehaviour: c = {
1701
+ params: t,
1702
+ searchParams: e = t,
1703
+ config: r,
1704
+ preloadBehaviour: s = {
1428
1705
  type: "onsight"
1429
1706
  },
1430
- children: l,
1431
- ...f
1707
+ children: i,
1708
+ ...a
1432
1709
  }) {
1433
- const d = Le(i), w = c?.type === "onsight", E = c?.type === "onhover", v = c?.type === "force", p = Re(
1434
- (S) => {
1435
- !S.isIntersecting || !n || d.preload(s, { params: e });
1710
+ const c = Be(), u = s?.type === "onsight" && n, l = s?.type === "onhover" && n, v = s?.type === "force" && n, d = Mt(null);
1711
+ Ye(
1712
+ d,
1713
+ (p) => {
1714
+ !u || !p.isIntersecting || !(p.target instanceof HTMLAnchorElement) || c.preload(p.target.href, { params: t, config: r });
1436
1715
  },
1437
- w ? c : {}
1438
- ), m = ke(
1439
- (S) => {
1440
- !S || !n || d.preload(s, { params: e });
1716
+ u ? s : {}
1717
+ ), Xe(
1718
+ d,
1719
+ () => {
1720
+ !l || !d.current || c.preload(d.current.href, { params: t, config: r });
1441
1721
  },
1442
- E ? c : {}
1443
- );
1444
- C(() => {
1445
- !n || !v || d.preload(s, { params: e });
1446
- }, [n, s, d, v, e]);
1447
- const [u, a] = St(void 0), h = d?.routerId, y = !u?.includes(window.location.origin) ? "noopener noreferrer" : t ? "prev" : "next";
1448
- C(() => {
1449
- if (t && d.canGoBack())
1450
- a(d.previous.url?.href);
1451
- else if (s) {
1452
- const S = ge(e), X = new URL(s, d.baseURL);
1453
- X.search = S, a(X.href);
1454
- }
1455
- }, [s, e, d, t]);
1456
- const b = (S) => {
1457
- t ? (S.preventDefault(), d.goBack()) : r === "replace" && s && (S.preventDefault(), d.replace(s)), o?.(S);
1458
- };
1459
- let T;
1460
- switch (c?.type) {
1461
- case "onhover":
1462
- T = m;
1463
- break;
1464
- case "onsight":
1465
- T = p;
1466
- break;
1467
- default:
1468
- T = null;
1469
- }
1470
- return /* @__PURE__ */ ut(
1471
- "a",
1722
+ l ? s : {}
1723
+ ), U(() => {
1724
+ !v || !d.current || c.preload(d.current.href, { params: t, config: r });
1725
+ }, [n, c, r, v, t]);
1726
+ const m = c?.routerId, g = e ? Le(e) : void 0;
1727
+ return /* @__PURE__ */ G(
1728
+ xt,
1472
1729
  {
1473
- href: u,
1474
- "data-router-id": h,
1475
- onClick: b,
1476
- rel: y,
1477
- ref: T,
1478
- ...f,
1479
- children: l
1730
+ ...a,
1731
+ "data-router-id": m,
1732
+ ref: d,
1733
+ search: g,
1734
+ navigateState: {
1735
+ config: r,
1736
+ params: t
1737
+ },
1738
+ children: i
1480
1739
  }
1481
1740
  );
1482
1741
  }
1483
- const sn = [
1742
+ const gn = [
1484
1743
  {
1485
1744
  transform: "translateX(100vw)"
1486
1745
  },
1487
1746
  {
1488
1747
  transform: "translateX(0vw)"
1489
1748
  }
1490
- ], Te = [
1749
+ ], Ce = [
1491
1750
  {
1492
1751
  transform: "translateX(100vw)"
1493
1752
  },
1494
1753
  {
1495
1754
  transform: "translateX(0vw)"
1496
1755
  }
1497
- ], an = [
1756
+ ], pn = [
1498
1757
  {
1499
1758
  transform: "translateX(0vw)"
1500
1759
  },
1501
1760
  {
1502
1761
  transform: "translateX(-50vw)"
1503
1762
  }
1504
- ], Ie = [
1763
+ ], Ue = [
1505
1764
  {
1506
1765
  transform: "translateX(0vw)"
1507
1766
  },
1508
1767
  {
1509
1768
  transform: "translateX(calc(100vw * -0.3))"
1510
1769
  }
1511
- ], on = [
1770
+ ], mn = [
1512
1771
  {
1513
1772
  transform: "translateX(-100vw)"
1514
1773
  },
1515
1774
  {
1516
1775
  transform: "translateX(0vw)"
1517
1776
  }
1518
- ], xe = [
1777
+ ], He = [
1519
1778
  {
1520
1779
  transform: "translateX(-100vw)"
1521
1780
  },
1522
1781
  {
1523
1782
  transform: "translateX(0vw)"
1524
1783
  }
1525
- ], cn = [
1784
+ ], yn = [
1526
1785
  {
1527
1786
  transform: "translateX(0vw)"
1528
1787
  },
1529
1788
  {
1530
1789
  transform: "translateX(50vw)"
1531
1790
  }
1532
- ], Fe = [
1791
+ ], Ae = [
1533
1792
  {
1534
1793
  transform: "translateX(0vw)"
1535
1794
  },
1536
1795
  {
1537
1796
  transform: "translateX(calc(100vw * 0.3))"
1538
1797
  }
1539
- ], un = [
1798
+ ], wn = [
1540
1799
  {
1541
1800
  transform: "translateY(100vh)"
1542
1801
  },
1543
1802
  {
1544
1803
  transform: "translateY(0vh)"
1545
1804
  }
1546
- ], Oe = [
1805
+ ], je = [
1547
1806
  {
1548
1807
  transform: "translateY(100vh)"
1549
1808
  },
1550
1809
  {
1551
1810
  transform: "translateY(0vh)"
1552
1811
  }
1553
- ], ln = [
1812
+ ], En = [
1554
1813
  {
1555
1814
  transform: "translateY(0vh)"
1556
1815
  },
1557
1816
  {
1558
1817
  transform: "translateY(-50vh)"
1559
1818
  }
1560
- ], hn = [
1819
+ ], Pn = [
1561
1820
  {
1562
1821
  transform: "translateY(-100vh)"
1563
1822
  },
1564
1823
  {
1565
1824
  transform: "translateY(0vh)"
1566
1825
  }
1567
- ], dn = [
1826
+ ], bn = [
1568
1827
  {
1569
1828
  transform: "translateY(0vh)"
1570
1829
  },
1571
1830
  {
1572
1831
  transform: "translateY(50vh)"
1573
1832
  }
1574
- ], fn = [
1833
+ ], Sn = [
1575
1834
  {
1576
1835
  transform: "scale(0.85)",
1577
1836
  opacity: 0
@@ -1580,7 +1839,7 @@ const sn = [
1580
1839
  transform: "scale(1)",
1581
1840
  opacity: 1
1582
1841
  }
1583
- ], vn = [
1842
+ ], _n = [
1584
1843
  {
1585
1844
  transform: "scale(1)",
1586
1845
  opacity: 1
@@ -1589,21 +1848,21 @@ const sn = [
1589
1848
  transform: "scale(1.15)",
1590
1849
  opacity: 0
1591
1850
  }
1592
- ], gn = [
1851
+ ], Ln = [
1593
1852
  {
1594
1853
  opacity: 0
1595
1854
  },
1596
1855
  {
1597
1856
  opacity: 1
1598
1857
  }
1599
- ], pn = [
1858
+ ], Tn = [
1600
1859
  {
1601
1860
  opacity: 1
1602
1861
  },
1603
1862
  {
1604
1863
  opacity: 0
1605
1864
  }
1606
- ], De = [
1865
+ ], Ne = [
1607
1866
  {
1608
1867
  opacity: 0,
1609
1868
  transform: "translateY(calc(100vh * 0.08))"
@@ -1620,7 +1879,7 @@ const sn = [
1620
1879
  opacity: 1,
1621
1880
  transform: "translateY(0vh)"
1622
1881
  }
1623
- ], Me = [
1882
+ ], $e = [
1624
1883
  {
1625
1884
  opacity: 0,
1626
1885
  transform: "translateY(96vw)"
@@ -1629,7 +1888,7 @@ const sn = [
1629
1888
  opacity: 1,
1630
1889
  transform: "translateY(0vw)"
1631
1890
  }
1632
- ], Ke = [
1891
+ ], Ve = [
1633
1892
  {
1634
1893
  opacity: 0,
1635
1894
  transform: "translateY(0vw)"
@@ -1638,21 +1897,21 @@ const sn = [
1638
1897
  opacity: 1,
1639
1898
  transform: "translateY(-96vw)"
1640
1899
  }
1641
- ], Be = [
1900
+ ], We = [
1642
1901
  {
1643
1902
  transform: "translateY(100vh)"
1644
1903
  },
1645
1904
  {
1646
1905
  transform: "translateY(0vh)"
1647
1906
  }
1648
- ], Ye = [
1907
+ ], Ge = [
1649
1908
  {
1650
1909
  transform: "translateY(0vh)"
1651
1910
  },
1652
1911
  {
1653
1912
  transform: "translateY(-2vh)"
1654
1913
  }
1655
- ], Ce = [
1914
+ ], qe = [
1656
1915
  {
1657
1916
  transform: "scale(0.85)",
1658
1917
  opacity: 0
@@ -1669,7 +1928,7 @@ const sn = [
1669
1928
  transform: "scale(1)",
1670
1929
  opacity: 1
1671
1930
  }
1672
- ], Xe = [
1931
+ ], ze = [
1673
1932
  {
1674
1933
  transform: "scale(1)",
1675
1934
  opacity: 1
@@ -1686,7 +1945,7 @@ const sn = [
1686
1945
  transform: "scale(1.075)",
1687
1946
  opacity: 0
1688
1947
  }
1689
- ], je = [
1948
+ ], Ze = [
1690
1949
  {
1691
1950
  transform: "translateY(calc(100vh * 0.8))",
1692
1951
  opacity: 0
@@ -1696,207 +1955,184 @@ const sn = [
1696
1955
  opacity: 1
1697
1956
  }
1698
1957
  ];
1699
- function Ue(n) {
1958
+ function Je(n) {
1700
1959
  return (t) => 1 - n(1 - t);
1701
1960
  }
1702
- function He(n) {
1961
+ function Qe(n) {
1703
1962
  return (t) => Math.pow(t, n);
1704
1963
  }
1705
- const tt = {
1706
- ...Lt({
1964
+ const st = {
1965
+ ...Bt({
1707
1966
  mass: 3,
1708
1967
  stiffness: 1e3,
1709
1968
  damping: 500,
1710
1969
  velocity: 0,
1711
1970
  steps: 200
1712
1971
  })
1713
- }, lt = {
1972
+ }, gt = {
1714
1973
  duration: 350,
1715
- easing: A(Ue(He(5)))
1716
- }, Ne = {
1974
+ easing: q(Je(Qe(5)))
1975
+ }, tn = {
1717
1976
  duration: 150,
1718
1977
  easing: "linear"
1719
- }, Ve = {
1978
+ }, en = {
1720
1979
  duration: 425,
1721
1980
  easing: "cubic-bezier(0.35, 0.45, 0, 1)"
1722
- }, $e = {
1981
+ }, nn = {
1723
1982
  duration: 400,
1724
1983
  easing: "cubic-bezier(0.35, 0.45, 0, 1)"
1725
- }, Ae = {
1984
+ }, rn = {
1726
1985
  duration: 250,
1727
- easing: A((n) => Math.cos((n + 1) * Math.PI) / 2 + 0.5)
1728
- }, We = {
1986
+ easing: q((n) => Math.cos((n + 1) * Math.PI) / 2 + 0.5)
1987
+ }, sn = {
1729
1988
  duration: 200,
1730
- easing: A((n) => n === 1 ? 1 : Math.pow(n, 2))
1989
+ easing: q((n) => n === 1 ? 1 : Math.pow(n, 2))
1731
1990
  };
1732
- function mn({ ref: n, direction: t, playbackRate: e, index: r }) {
1991
+ function Rn({ ref: n, direction: t, playbackRate: e, index: r }) {
1733
1992
  let i = [
1734
- Ie,
1735
- Te
1993
+ Ue,
1994
+ Ce
1736
1995
  ][r];
1737
- const o = {
1996
+ const a = {
1738
1997
  playbackRate: e,
1739
1998
  fill: "forwards",
1740
- ...tt
1999
+ ...st
1741
2000
  };
1742
- return t === "reverse" && (i = i.toReversed()), new KeyframeEffect(n, i, o);
2001
+ return t === "reverse" && (i = i.toReversed()), new KeyframeEffect(n, i, a);
1743
2002
  }
1744
- function yn({ ref: n, direction: t, playbackRate: e, index: r }) {
2003
+ function kn({ ref: n, direction: t, playbackRate: e, index: r }) {
1745
2004
  let i = [
1746
- Fe,
1747
- xe
2005
+ Ae,
2006
+ He
1748
2007
  ][r];
1749
- const o = {
2008
+ const a = {
1750
2009
  playbackRate: e,
1751
2010
  fill: "forwards",
1752
- ...tt
2011
+ ...st
1753
2012
  };
1754
- return t === "reverse" && (i = i.toReversed()), new KeyframeEffect(n, i, o);
2013
+ return t === "reverse" && (i = i.toReversed()), new KeyframeEffect(n, i, a);
1755
2014
  }
1756
- function wn({ ref: n, direction: t, playbackRate: e }) {
1757
- let r = Oe;
2015
+ function In({ ref: n, direction: t, playbackRate: e }) {
2016
+ let r = je;
1758
2017
  const s = {
1759
2018
  playbackRate: e,
1760
2019
  fill: "forwards",
1761
- ...tt
2020
+ ...st
1762
2021
  };
1763
2022
  return t === "reverse" && (r = r.toReversed()), new KeyframeEffect(n, r, s);
1764
2023
  }
1765
- function En({ ref: n, direction: t, playbackRate: e }) {
1766
- let r = De;
2024
+ function Fn({ ref: n, direction: t, playbackRate: e }) {
2025
+ let r = Ne;
1767
2026
  const s = {
1768
2027
  playbackRate: e,
1769
2028
  fill: "forwards",
1770
- ...lt
2029
+ ...gt
1771
2030
  };
1772
2031
  return t === "reverse" && (r = r.toReversed()), new KeyframeEffect(n, r, s);
1773
2032
  }
1774
- function Pn({ ref: n, direction: t, index: e, playbackRate: r }) {
1775
- let s = je, i;
1776
- e === 0 ? i = We : i = Ae;
1777
- const o = {
2033
+ function xn({ ref: n, direction: t, index: e, playbackRate: r }) {
2034
+ let s = Ze, i;
2035
+ e === C ? i = sn : i = rn;
2036
+ const a = {
1778
2037
  playbackRate: r,
1779
2038
  fill: "forwards",
1780
2039
  ...i
1781
2040
  };
1782
- return t === "reverse" && (s = s.toReversed()), new KeyframeEffect(n, s, o);
2041
+ return t === "reverse" && (s = s.toReversed()), new KeyframeEffect(n, s, a);
1783
2042
  }
1784
- function Sn({ ref: n, direction: t, index: e, playbackRate: r }) {
2043
+ function Dn({ ref: n, direction: t, index: e, playbackRate: r }) {
1785
2044
  const i = [
1786
- Ye,
1787
- Be
1788
- ][e], o = {
2045
+ Ge,
2046
+ We
2047
+ ][e], a = {
1789
2048
  direction: t,
1790
2049
  playbackRate: r,
1791
2050
  fill: "forwards",
1792
- ...Ve
2051
+ ...en
1793
2052
  };
1794
- return new KeyframeEffect(n, i, o);
2053
+ return new KeyframeEffect(n, i, a);
1795
2054
  }
1796
- function bn({ ref: n, direction: t, index: e, playbackRate: r }) {
2055
+ function On({ ref: n, direction: t, index: e, playbackRate: r }) {
1797
2056
  const s = [
1798
- Ke,
1799
- Me
2057
+ Ve,
2058
+ $e
1800
2059
  ];
1801
2060
  let i;
1802
- e === 0 ? i = Ne : i = lt;
1803
- let o = s[e];
2061
+ e === C ? i = tn : i = gt;
2062
+ let a = s[e];
1804
2063
  const c = {
1805
2064
  playbackRate: r,
1806
2065
  fill: "forwards",
1807
2066
  ...i
1808
2067
  };
1809
- return t === "reverse" && (o = o.toReversed()), new KeyframeEffect(n, o, c);
2068
+ return t === "reverse" && (a = a.toReversed()), new KeyframeEffect(n, a, c);
1810
2069
  }
1811
- function _n({ ref: n, direction: t, index: e, playbackRate: r }) {
2070
+ function Mn({ ref: n, direction: t, index: e, playbackRate: r }) {
1812
2071
  const i = [
1813
- Xe,
1814
- Ce
1815
- ][e], o = {
2072
+ ze,
2073
+ qe
2074
+ ][e], a = {
1816
2075
  direction: t,
1817
2076
  playbackRate: r,
1818
2077
  fill: "forwards",
1819
- ...$e
2078
+ ...nn
1820
2079
  };
1821
- return new KeyframeEffect(n, i, o);
1822
- }
1823
- function Ln({ disabled: n, children: t, ...e }) {
1824
- const r = $(null);
1825
- return C(() => {
1826
- if (n)
1827
- return;
1828
- const s = (i) => {
1829
- i.stopPropagation(), i.preventDefault();
1830
- };
1831
- return r.current?.addEventListener("swipestart", s), () => {
1832
- r.current?.removeEventListener("swipestart", s);
1833
- };
1834
- }, [r, n]), /* @__PURE__ */ ut(
1835
- "div",
1836
- {
1837
- ref: r,
1838
- className: "gesture-region",
1839
- "data-disabled": n,
1840
- style: { display: "contents" },
1841
- ...e,
1842
- children: t
1843
- }
1844
- );
2080
+ return new KeyframeEffect(n, i, a);
1845
2081
  }
1846
2082
  export {
1847
- rn as Anchor,
1848
- gn as FadeInKeyframes,
1849
- pn as FadeOutKeyframes,
1850
- Ln as GestureRegion,
1851
- de as HistoryEntry,
1852
- fe as Navigation,
1853
- Qe as Router,
1854
- Je as Screen,
1855
- un as SlideInFromBottomKeyframes,
1856
- on as SlideInFromLeftKeyframes,
1857
- sn as SlideInFromRightKeyframes,
1858
- hn as SlideInFromTopKeyframes,
1859
- dn as SlideOutToBottomKeyframes,
1860
- an as SlideOutToLeftKeyframes,
1861
- cn as SlideOutToRightKeyframes,
1862
- ln as SlideOutToTopKeyframes,
1863
- fn as ZoomInKeyframes,
1864
- vn as ZoomOutKeyframes,
1865
- Ae as androidBottomSheetSlideInOptions,
1866
- We as androidBottomSheetSlideOutOptions,
1867
- Ye as androidConcealToBottomKeyframes,
1868
- En as androidFadeInFromBottom,
1869
- De as androidFadeInFromBottomKeyframes,
1870
- lt as androidFadeInFromBottomOptions,
1871
- Pn as androidFadeInFromBottomSheet,
1872
- je as androidFadeInFromBottomSheetKeyframes,
1873
- bn as androidFadeInFromRight,
1874
- Me as androidFadeInFromRightKeyframes,
1875
- Ne as androidFadeOutToBottomOptions,
1876
- Ke as androidFadeOutToLeftKeyframes,
1877
- Sn as androidRevealFromBottom,
1878
- Be as androidRevealFromBottomKeyframes,
1879
- Ve as androidRevealFromBottomOptions,
1880
- _n as androidScaleFromCentre,
1881
- Ce as androidScaleFromCentreKeyframes,
1882
- $e as androidScaleFromCentreOptions,
1883
- Xe as androidScaleToCentreKeyframes,
1884
- tt as iOSKeyframeOptions,
1885
- wn as iOSSlideInFromBottom,
1886
- Oe as iOSSlideInFromBottomKeyframes,
1887
- yn as iOSSlideInFromLeft,
1888
- xe as iOSSlideInFromLeftKeyframes,
1889
- mn as iOSSlideInFromRight,
1890
- Te as iOSSlideInFromRightKeyframes,
1891
- Ie as iOSSlideOutToLeftKeyframes,
1892
- Fe as iOSSlideOutToRightKeyframes,
1893
- Pe as isHorizontalDirection,
1894
- Ee as isOutOfBounds,
1895
- x as isRefObject,
1896
- we as isSupportedDirection,
1897
- _e as useNavigation,
1898
- nn as useParams,
1899
- en as useRoute,
1900
- tn as useRouter
2083
+ vn as Anchor,
2084
+ Ln as FadeInKeyframes,
2085
+ Tn as FadeOutKeyframes,
2086
+ Ke as GestureRegion,
2087
+ vt as HistoryEntry,
2088
+ Se as Navigation,
2089
+ hn as Router,
2090
+ rt as Screen,
2091
+ wn as SlideInFromBottomKeyframes,
2092
+ mn as SlideInFromLeftKeyframes,
2093
+ gn as SlideInFromRightKeyframes,
2094
+ Pn as SlideInFromTopKeyframes,
2095
+ bn as SlideOutToBottomKeyframes,
2096
+ pn as SlideOutToLeftKeyframes,
2097
+ yn as SlideOutToRightKeyframes,
2098
+ En as SlideOutToTopKeyframes,
2099
+ Sn as ZoomInKeyframes,
2100
+ _n as ZoomOutKeyframes,
2101
+ rn as androidBottomSheetSlideInOptions,
2102
+ sn as androidBottomSheetSlideOutOptions,
2103
+ Ge as androidConcealToBottomKeyframes,
2104
+ Fn as androidFadeInFromBottom,
2105
+ Ne as androidFadeInFromBottomKeyframes,
2106
+ gt as androidFadeInFromBottomOptions,
2107
+ xn as androidFadeInFromBottomSheet,
2108
+ Ze as androidFadeInFromBottomSheetKeyframes,
2109
+ On as androidFadeInFromRight,
2110
+ $e as androidFadeInFromRightKeyframes,
2111
+ tn as androidFadeOutToBottomOptions,
2112
+ Ve as androidFadeOutToLeftKeyframes,
2113
+ Dn as androidRevealFromBottom,
2114
+ We as androidRevealFromBottomKeyframes,
2115
+ en as androidRevealFromBottomOptions,
2116
+ Mn as androidScaleFromCentre,
2117
+ qe as androidScaleFromCentreKeyframes,
2118
+ nn as androidScaleFromCentreOptions,
2119
+ ze as androidScaleToCentreKeyframes,
2120
+ Me as createGestureRegion,
2121
+ st as iOSKeyframeOptions,
2122
+ In as iOSSlideInFromBottom,
2123
+ je as iOSSlideInFromBottomKeyframes,
2124
+ kn as iOSSlideInFromLeft,
2125
+ He as iOSSlideInFromLeftKeyframes,
2126
+ Rn as iOSSlideInFromRight,
2127
+ Ce as iOSSlideInFromRightKeyframes,
2128
+ Ue as iOSSlideOutToLeftKeyframes,
2129
+ Ae as iOSSlideOutToRightKeyframes,
2130
+ Fe as isHorizontalDirection,
2131
+ F as isRefObject,
2132
+ Ie as isSupportedDirection,
2133
+ Be as useNavigation,
2134
+ fn as useParams,
2135
+ dn as useRoute,
2136
+ ln as useRouter
1901
2137
  };
1902
2138
  //# sourceMappingURL=index.js.map