@react-motion-router/stack 2.0.0-beta.sha-112968d → 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.
- package/build/index.js +833 -832
- package/build/index.js.map +1 -1
- package/build/stack/src/Anchor.d.ts +29 -0
- package/build/stack/src/GestureRegion.d.ts +10 -0
- package/build/{Navigation.d.ts → stack/src/Navigation.d.ts} +4 -5
- package/build/{Router.d.ts → stack/src/Router.d.ts} +11 -9
- package/build/{Screen.d.ts → stack/src/Screen.d.ts} +14 -12
- package/build/{__tests__ → stack/src/__tests__}/Navigation/common/constants.d.ts +1 -0
- package/build/stack/src/__tests__/Screen/set-params.test.d.ts +1 -0
- package/build/{common → stack/src/common}/hooks.d.ts +0 -4
- package/build/{common → stack/src/common}/types.d.ts +10 -12
- package/build/{common → stack/src/common}/utils.d.ts +5 -0
- package/package.json +2 -2
- package/build/Anchor.d.ts +0 -34
- package/build/GestureRegion.d.ts +0 -5
- /package/build/{common → core/src/common}/promise-wrapper.d.ts +0 -0
- /package/build/{HistoryEntry.d.ts → stack/src/HistoryEntry.d.ts} +0 -0
- /package/build/{__tests__ → stack/src/__tests__}/Navigation/entries.test.d.ts +0 -0
- /package/build/{__tests__ → stack/src/__tests__}/Navigation/index.test.d.ts +0 -0
- /package/build/{__tests__/Navigation/preload.test.d.ts → stack/src/__tests__/Navigation/navigation.index.test.d.ts} +0 -0
- /package/build/{__tests__/Screen/set-config.test.d.ts → stack/src/__tests__/Navigation/preload.test.d.ts} +0 -0
- /package/build/{__tests__/Screen/set-params.test.d.ts → stack/src/__tests__/Screen/set-config.test.d.ts} +0 -0
- /package/build/{animation-configs → stack/src/animation-configs}/animation-presets.d.ts +0 -0
- /package/build/{animation-configs → stack/src/animation-configs}/keyframe-options-presets.d.ts +0 -0
- /package/build/{animation-configs → stack/src/animation-configs}/keyframe-presets.d.ts +0 -0
- /package/build/{common → stack/src/common}/constants.d.ts +0 -0
- /package/build/{common → stack/src/common}/events.d.ts +0 -0
- /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
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
var
|
|
6
|
-
Object.defineProperty(
|
|
7
|
-
var
|
|
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
|
-
})(
|
|
11
|
-
class
|
|
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,108 +27,108 @@ class It 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
|
-
|
|
31
|
-
var
|
|
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(
|
|
35
|
-
const
|
|
36
|
-
class
|
|
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
|
-
|
|
42
|
-
var
|
|
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(
|
|
46
|
-
const
|
|
47
|
-
class
|
|
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
|
-
|
|
53
|
-
var
|
|
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(
|
|
57
|
-
const
|
|
58
|
-
class
|
|
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
|
-
|
|
64
|
-
var
|
|
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(
|
|
68
|
-
|
|
69
|
-
const
|
|
70
|
-
var
|
|
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
|
-
})(
|
|
74
|
-
class
|
|
75
|
-
constructor(t, e,
|
|
76
|
-
let
|
|
77
|
-
switch (
|
|
73
|
+
})(ut || (ut = {}));
|
|
74
|
+
class Q extends qt.default {
|
|
75
|
+
constructor(t, e, r) {
|
|
76
|
+
let s;
|
|
77
|
+
switch (r) {
|
|
78
78
|
case "start":
|
|
79
|
-
|
|
79
|
+
s = "swipestart";
|
|
80
80
|
break;
|
|
81
81
|
case "end":
|
|
82
|
-
|
|
82
|
+
s = "swipeend";
|
|
83
83
|
break;
|
|
84
84
|
default:
|
|
85
|
-
|
|
85
|
+
s = "swipe";
|
|
86
86
|
}
|
|
87
|
-
super(
|
|
87
|
+
super(s, t), this.velocity = e.velocity, this.direction = e.direction;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
class
|
|
90
|
+
class zt extends Q {
|
|
91
91
|
constructor(t, e) {
|
|
92
92
|
super(t, e);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
|
|
96
|
-
class
|
|
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
|
-
|
|
102
|
-
class
|
|
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
|
-
|
|
108
|
-
var
|
|
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(
|
|
112
|
-
|
|
113
|
-
const
|
|
114
|
-
var
|
|
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
|
-
})(
|
|
118
|
-
class
|
|
119
|
-
constructor(t, e,
|
|
120
|
-
let
|
|
121
|
-
switch (
|
|
117
|
+
})(ht || (ht = {}));
|
|
118
|
+
class tt extends te.default {
|
|
119
|
+
constructor(t, e, r) {
|
|
120
|
+
let s;
|
|
121
|
+
switch (r) {
|
|
122
122
|
case "start":
|
|
123
|
-
|
|
123
|
+
s = "panstart";
|
|
124
124
|
break;
|
|
125
125
|
case "end":
|
|
126
|
-
|
|
126
|
+
s = "panend";
|
|
127
127
|
break;
|
|
128
128
|
default:
|
|
129
|
-
|
|
129
|
+
s = "pan";
|
|
130
130
|
}
|
|
131
|
-
super(
|
|
131
|
+
super(s, t), this.velocity = e.velocity, this.translation = {
|
|
132
132
|
x: e.translation.x,
|
|
133
133
|
y: e.translation.y,
|
|
134
134
|
magnitude: e.translation.magnitude,
|
|
@@ -138,95 +138,95 @@ class et extends Vt.default {
|
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
-
class
|
|
141
|
+
class ee extends tt {
|
|
142
142
|
constructor(t, e) {
|
|
143
143
|
super(t, e);
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
|
|
147
|
-
class
|
|
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
|
-
|
|
153
|
-
class
|
|
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
|
-
|
|
159
|
-
var
|
|
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(
|
|
163
|
-
|
|
164
|
-
const
|
|
162
|
+
Object.defineProperty(O, "__esModule", { value: !0 });
|
|
163
|
+
O.PinchEndEvent = O.PinchStartEvent = void 0;
|
|
164
|
+
const ie = se(_);
|
|
165
165
|
var lt;
|
|
166
166
|
(function(n) {
|
|
167
167
|
n[n.start = 0] = "start", n[n.end = 1] = "end";
|
|
168
168
|
})(lt || (lt = {}));
|
|
169
|
-
class
|
|
170
|
-
constructor(t, e,
|
|
171
|
-
let
|
|
172
|
-
switch (
|
|
169
|
+
class et extends ie.default {
|
|
170
|
+
constructor(t, e, r) {
|
|
171
|
+
let s;
|
|
172
|
+
switch (r) {
|
|
173
173
|
case "start":
|
|
174
|
-
|
|
174
|
+
s = "pinchstart";
|
|
175
175
|
break;
|
|
176
176
|
case "end":
|
|
177
|
-
|
|
177
|
+
s = "pinchend";
|
|
178
178
|
break;
|
|
179
179
|
default:
|
|
180
|
-
|
|
180
|
+
s = "pinch";
|
|
181
181
|
}
|
|
182
|
-
super(
|
|
182
|
+
super(s, t), Object.defineProperty(this, "scale", {
|
|
183
183
|
value: e.scale,
|
|
184
184
|
writable: !1
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
-
class
|
|
188
|
+
class ae extends et {
|
|
189
189
|
constructor(t, e) {
|
|
190
190
|
super(t, e);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
|
|
194
|
-
class
|
|
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
|
-
|
|
200
|
-
class
|
|
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
|
-
|
|
206
|
-
var
|
|
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
|
-
Object.defineProperty(
|
|
210
|
-
|
|
211
|
-
const
|
|
212
|
-
var
|
|
209
|
+
Object.defineProperty(M, "__esModule", { value: !0 });
|
|
210
|
+
M.RotateEndEvent = M.RotateStartEvent = void 0;
|
|
211
|
+
const he = ue(_);
|
|
212
|
+
var dt;
|
|
213
213
|
(function(n) {
|
|
214
214
|
n[n.start = 0] = "start", n[n.end = 1] = "end";
|
|
215
|
-
})(
|
|
216
|
-
class
|
|
217
|
-
constructor(t, e,
|
|
218
|
-
let
|
|
219
|
-
switch (
|
|
215
|
+
})(dt || (dt = {}));
|
|
216
|
+
class nt extends he.default {
|
|
217
|
+
constructor(t, e, r) {
|
|
218
|
+
let s;
|
|
219
|
+
switch (r) {
|
|
220
220
|
case "start":
|
|
221
|
-
|
|
221
|
+
s = "rotatestart";
|
|
222
222
|
break;
|
|
223
223
|
case "end":
|
|
224
|
-
|
|
224
|
+
s = "rotateend";
|
|
225
225
|
break;
|
|
226
226
|
default:
|
|
227
|
-
|
|
227
|
+
s = "rotate";
|
|
228
228
|
}
|
|
229
|
-
super(
|
|
229
|
+
super(s, t), this.anchor = {
|
|
230
230
|
x: e.anchor.x,
|
|
231
231
|
y: e.anchor.y,
|
|
232
232
|
clientX: e.anchor.clientX,
|
|
@@ -237,33 +237,33 @@ class st extends ee.default {
|
|
|
237
237
|
}), this.rotationDeg = e.rotationDeg;
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
class
|
|
240
|
+
class le extends nt {
|
|
241
241
|
constructor(t, e) {
|
|
242
242
|
super(t, e);
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
|
|
246
|
-
class
|
|
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
|
-
|
|
252
|
-
class
|
|
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
|
-
|
|
258
|
-
var
|
|
259
|
-
Object.defineProperty(
|
|
260
|
-
|
|
261
|
-
function
|
|
257
|
+
M.RotateEndEvent = fe;
|
|
258
|
+
var k = {};
|
|
259
|
+
Object.defineProperty(k, "__esModule", { value: !0 });
|
|
260
|
+
k.closest = k.Vec2 = k.assert = void 0;
|
|
261
|
+
function ve(n, t) {
|
|
262
262
|
if (!n)
|
|
263
263
|
throw new Error(t);
|
|
264
264
|
}
|
|
265
|
-
|
|
266
|
-
class
|
|
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,118 +307,118 @@ class ae {
|
|
|
307
307
|
return Math.sqrt(Math.pow(this._clientX, 2) + Math.pow(this._clientY, 2));
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
-
|
|
311
|
-
function
|
|
312
|
-
return t.reduce((e,
|
|
313
|
-
let
|
|
314
|
-
return
|
|
310
|
+
k.Vec2 = ge;
|
|
311
|
+
function pe(n, t) {
|
|
312
|
+
return t.reduce((e, r) => {
|
|
313
|
+
let s = Math.abs(e - n), i = Math.abs(r - n);
|
|
314
|
+
return s === i ? e > r ? e : r : i < s ? r : e;
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
|
-
|
|
317
|
+
k.closest = pe;
|
|
318
318
|
(function(n) {
|
|
319
|
-
var t =
|
|
320
|
-
P === void 0 && (P = f), Object.defineProperty(
|
|
321
|
-
return
|
|
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(
|
|
324
|
-
P === void 0 && (P = f),
|
|
325
|
-
}), e =
|
|
326
|
-
Object.defineProperty(
|
|
327
|
-
} : function(
|
|
328
|
-
|
|
329
|
-
}),
|
|
330
|
-
if (
|
|
331
|
-
return
|
|
332
|
-
var
|
|
333
|
-
if (
|
|
334
|
-
for (var f in
|
|
335
|
-
f !== "default" && Object.prototype.hasOwnProperty.call(
|
|
336
|
-
return e(
|
|
337
|
-
},
|
|
338
|
-
return
|
|
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 =
|
|
341
|
+
const i = s(_);
|
|
342
342
|
n.GestureEvent = i.default;
|
|
343
|
-
const
|
|
344
|
-
n.LongPressEvent =
|
|
345
|
-
const c =
|
|
343
|
+
const a = s(z);
|
|
344
|
+
n.LongPressEvent = a.default;
|
|
345
|
+
const c = s(Z);
|
|
346
346
|
n.TapEvent = c.default;
|
|
347
|
-
const u =
|
|
347
|
+
const u = s(J);
|
|
348
348
|
n.DoubleTapEvent = u.default;
|
|
349
|
-
const
|
|
350
|
-
n.SwipeEvent =
|
|
351
|
-
return
|
|
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
|
|
353
|
+
return l.SwipeStartEvent;
|
|
354
354
|
} });
|
|
355
|
-
const
|
|
356
|
-
n.PanEvent =
|
|
357
|
-
return
|
|
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
|
|
359
|
+
return v.PanStartEvent;
|
|
360
360
|
} });
|
|
361
|
-
const
|
|
362
|
-
n.PinchEvent =
|
|
363
|
-
return
|
|
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
|
|
365
|
+
return d.PinchStartEvent;
|
|
366
366
|
} });
|
|
367
|
-
const
|
|
368
|
-
n.RotateEvent =
|
|
369
|
-
return
|
|
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
|
|
371
|
+
return m.RotateStartEvent;
|
|
372
372
|
} });
|
|
373
|
-
const
|
|
373
|
+
const g = k;
|
|
374
374
|
var p;
|
|
375
|
-
(function(
|
|
376
|
-
|
|
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
|
|
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
|
|
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
|
-
},
|
|
385
|
+
}, w.listening || (TouchEvent && window.addEventListener("touchstart", this.touchStartListener, !0), w.listening = !0);
|
|
386
386
|
}
|
|
387
|
-
bind(
|
|
388
|
-
this.unbind(this.currentTarget),
|
|
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(
|
|
391
|
-
|
|
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(
|
|
397
|
-
if (!
|
|
396
|
+
onPointerLeave(o) {
|
|
397
|
+
if (!o.touches.length) {
|
|
398
398
|
if (this.isSwiping) {
|
|
399
|
-
const f = new
|
|
399
|
+
const f = new l.SwipeEndEvent(o, {
|
|
400
400
|
velocity: this.velocity,
|
|
401
|
-
direction: p[(0,
|
|
401
|
+
direction: p[(0, g.closest)(this.octant, [0, 1, 2, 3])]
|
|
402
402
|
});
|
|
403
403
|
this.dispatchEvent(f), this.isSwiping = !1;
|
|
404
404
|
}
|
|
405
405
|
if (this.isPanning) {
|
|
406
|
-
const f = new
|
|
406
|
+
const f = new v.PanEndEvent(o, {
|
|
407
407
|
translation: this.dxDy,
|
|
408
408
|
velocity: this.velocity
|
|
409
409
|
});
|
|
410
410
|
this.dispatchEvent(f), this.isPanning = !1;
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
|
-
if (
|
|
413
|
+
if (o.touches.length === 1) {
|
|
414
414
|
if (this.scaleBase = 0, this.isPinching) {
|
|
415
|
-
const f = new
|
|
415
|
+
const f = new d.PinchEndEvent(o, {
|
|
416
416
|
scale: this.scale
|
|
417
417
|
});
|
|
418
418
|
this.dispatchEvent(f), this.isPinching = !1;
|
|
419
419
|
}
|
|
420
420
|
if (this.isRotating) {
|
|
421
|
-
const f = new
|
|
421
|
+
const f = new m.RotateEndEvent(o, {
|
|
422
422
|
rotation: this.rotation,
|
|
423
423
|
rotationDeg: this.rotationDeg,
|
|
424
424
|
anchor: this.anchor
|
|
@@ -427,126 +427,126 @@ I.closest = oe;
|
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
|
-
dispatchEvent(
|
|
430
|
+
dispatchEvent(o) {
|
|
431
431
|
queueMicrotask(() => {
|
|
432
|
-
this.currentTarget.dispatchEvent(
|
|
432
|
+
this.currentTarget.dispatchEvent(o);
|
|
433
433
|
});
|
|
434
434
|
}
|
|
435
|
-
onTouchStart(
|
|
436
|
-
this.currentTarget !==
|
|
437
|
-
const f = parseInt(
|
|
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
438
|
if (this.touchStart.touches.length < f) {
|
|
439
439
|
this.shouldFire = !1;
|
|
440
440
|
return;
|
|
441
441
|
}
|
|
442
|
-
this.shouldFire = !0, this.touchStartTime =
|
|
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
|
|
447
|
-
this.dispatchEvent(
|
|
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
|
|
451
|
-
this.scaleBase =
|
|
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(
|
|
455
|
+
onTouchMove(o) {
|
|
456
456
|
if (!this.shouldFire)
|
|
457
457
|
return;
|
|
458
|
-
if (this.touchMoved = !0, this.touchMove =
|
|
459
|
-
const
|
|
460
|
-
if (this.scaleBase && Math.abs(this.scaleBase -
|
|
461
|
-
const
|
|
462
|
-
if (this.scale =
|
|
463
|
-
const
|
|
464
|
-
scale:
|
|
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
|
+
if (this.scale = I, this.isPinching) {
|
|
463
|
+
const j = new d.default(o, {
|
|
464
|
+
scale: I
|
|
465
465
|
});
|
|
466
|
-
this.dispatchEvent(
|
|
466
|
+
this.dispatchEvent(j);
|
|
467
467
|
} else {
|
|
468
|
-
const
|
|
469
|
-
scale:
|
|
468
|
+
const j = new d.PinchStartEvent(o, {
|
|
469
|
+
scale: I
|
|
470
470
|
});
|
|
471
|
-
this.dispatchEvent(
|
|
471
|
+
this.dispatchEvent(j), this.isPinching = !0;
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
this.anchor =
|
|
475
|
-
let
|
|
476
|
-
if (
|
|
477
|
-
const
|
|
474
|
+
this.anchor = b;
|
|
475
|
+
let B = Math.atan2(at.clientY - A.clientY, at.clientX - A.clientX);
|
|
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 m.default(o, {
|
|
478
478
|
anchor: this.anchor,
|
|
479
479
|
rotation: this.rotation,
|
|
480
480
|
rotationDeg: this.rotationDeg
|
|
481
481
|
});
|
|
482
|
-
this.dispatchEvent(
|
|
482
|
+
this.dispatchEvent(I);
|
|
483
483
|
} else {
|
|
484
|
-
const
|
|
484
|
+
const I = new m.RotateStartEvent(o, {
|
|
485
485
|
anchor: this.anchor,
|
|
486
486
|
rotation: this.rotation,
|
|
487
487
|
rotationDeg: this.rotationDeg
|
|
488
488
|
});
|
|
489
|
-
this.dispatchEvent(
|
|
489
|
+
this.dispatchEvent(I), this.isRotating = !0;
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
|
-
const f = new
|
|
493
|
-
x:
|
|
494
|
-
y:
|
|
495
|
-
},
|
|
496
|
-
this.octant = Math.round(4 *
|
|
497
|
-
const
|
|
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
|
|
500
|
-
direction: p[(0,
|
|
501
|
-
velocity:
|
|
499
|
+
const b = new l.default(o, {
|
|
500
|
+
direction: p[(0, g.closest)(this.octant, [0, 1, 2, 3])],
|
|
501
|
+
velocity: K
|
|
502
502
|
});
|
|
503
|
-
this.dispatchEvent(
|
|
503
|
+
this.dispatchEvent(b);
|
|
504
504
|
} else {
|
|
505
|
-
const
|
|
506
|
-
direction: p[(0,
|
|
507
|
-
velocity:
|
|
505
|
+
const b = new l.SwipeStartEvent(o, {
|
|
506
|
+
direction: p[(0, g.closest)(this.octant, [0, 1, 2, 3])],
|
|
507
|
+
velocity: K
|
|
508
508
|
});
|
|
509
|
-
this.dispatchEvent(
|
|
509
|
+
this.dispatchEvent(b), this.isSwiping = !0;
|
|
510
510
|
}
|
|
511
|
-
if (this.dxDy =
|
|
512
|
-
const
|
|
513
|
-
translation:
|
|
514
|
-
velocity:
|
|
511
|
+
if (this.dxDy = E, this.velocity = K, this.isPanning) {
|
|
512
|
+
const b = new v.default(o, {
|
|
513
|
+
translation: E,
|
|
514
|
+
velocity: K
|
|
515
515
|
});
|
|
516
|
-
this.dispatchEvent(
|
|
516
|
+
this.dispatchEvent(b);
|
|
517
517
|
} else {
|
|
518
|
-
const
|
|
519
|
-
translation:
|
|
520
|
-
velocity:
|
|
518
|
+
const b = new v.PanStartEvent(o, {
|
|
519
|
+
translation: E,
|
|
520
|
+
velocity: K
|
|
521
521
|
});
|
|
522
|
-
this.dispatchEvent(
|
|
522
|
+
this.dispatchEvent(b), this.isPanning = !0;
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
onTouchEnd(
|
|
525
|
+
onTouchEnd(o) {
|
|
526
526
|
const f = parseInt(this.currentTarget.dataset.numberoftaps || "0") || this.config.numberOfTaps;
|
|
527
527
|
if (this.taps++, this.shouldFire = this.taps > f, this.shouldFire) {
|
|
528
|
-
this.touchEnd =
|
|
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
532
|
if (this.taps % 2 === f) {
|
|
533
|
-
const
|
|
534
|
-
this.dispatchEvent(
|
|
533
|
+
const R = new u.default(o);
|
|
534
|
+
this.dispatchEvent(R), this.taps = 0;
|
|
535
535
|
}
|
|
536
|
-
const
|
|
537
|
-
this.dispatchEvent(
|
|
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(
|
|
541
|
+
this.pointers = this.touchEnd.touches.length, this.lastTouchTime = this.touchEndTime, this.onPointerLeave(o), this.unbind(this.currentTarget), this.clean();
|
|
542
542
|
}
|
|
543
|
-
onTouchCancel(
|
|
544
|
-
this.shouldFire && (this.touchCancel =
|
|
543
|
+
onTouchCancel(o) {
|
|
544
|
+
this.shouldFire && (this.touchCancel = o, this.unbind(this.currentTarget), this.clean());
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
n.default =
|
|
548
|
-
})(
|
|
549
|
-
class
|
|
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,51 +554,51 @@ class ce extends Event {
|
|
|
554
554
|
signal;
|
|
555
555
|
committed;
|
|
556
556
|
transition;
|
|
557
|
-
constructor(t, e,
|
|
558
|
-
super("navigate"), this.routerId = t, this.route = e, this.props =
|
|
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
|
|
561
|
+
class ye extends Event {
|
|
562
562
|
routerId;
|
|
563
563
|
signal;
|
|
564
564
|
committed;
|
|
565
565
|
transition;
|
|
566
|
-
constructor(t, e,
|
|
567
|
-
super("back"), this.routerId = t, this.signal = e, this.committed =
|
|
566
|
+
constructor(t, e, r, s) {
|
|
567
|
+
super("back"), this.routerId = t, this.signal = e, this.committed = r, this.transition = s;
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
class
|
|
570
|
+
class we extends Event {
|
|
571
571
|
routerId;
|
|
572
572
|
signal;
|
|
573
573
|
committed;
|
|
574
574
|
transition;
|
|
575
|
-
constructor(t, e,
|
|
576
|
-
super("forward"), this.routerId = t, this.signal = e, this.committed =
|
|
575
|
+
constructor(t, e, r, s) {
|
|
576
|
+
super("forward"), this.routerId = t, this.signal = e, this.committed = r, this.transition = s;
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
|
-
class
|
|
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
|
|
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
|
|
591
|
+
class be extends Event {
|
|
592
592
|
constructor() {
|
|
593
593
|
super("gesture-cancel");
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
class
|
|
596
|
+
class vt {
|
|
597
597
|
routerId;
|
|
598
598
|
#t;
|
|
599
599
|
index;
|
|
600
|
-
constructor(t, e,
|
|
601
|
-
this.#t = t, this.routerId = e, this.index =
|
|
600
|
+
constructor(t, e, r) {
|
|
601
|
+
this.#t = t, this.routerId = e, this.index = r;
|
|
602
602
|
}
|
|
603
603
|
set ondispose(t) {
|
|
604
604
|
this.#t.ondispose = t;
|
|
@@ -621,11 +621,11 @@ class ve {
|
|
|
621
621
|
get sameDocument() {
|
|
622
622
|
return this.#t.sameDocument;
|
|
623
623
|
}
|
|
624
|
-
addEventListener(t, e,
|
|
625
|
-
return this.#t.addEventListener(t, e,
|
|
624
|
+
addEventListener(t, e, r) {
|
|
625
|
+
return this.#t.addEventListener(t, e, r), () => this.#t.removeEventListener(t, e, r);
|
|
626
626
|
}
|
|
627
|
-
removeEventListener(t, e,
|
|
628
|
-
this.#t.addEventListener(t, e,
|
|
627
|
+
removeEventListener(t, e, r) {
|
|
628
|
+
this.#t.addEventListener(t, e, r);
|
|
629
629
|
}
|
|
630
630
|
dispatchEvent(t) {
|
|
631
631
|
return this.#t.dispatchEvent(t);
|
|
@@ -634,100 +634,99 @@ class ve {
|
|
|
634
634
|
return this.#t.getState();
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
|
-
class
|
|
637
|
+
class Se extends yt {
|
|
638
638
|
config;
|
|
639
639
|
constructor(t) {
|
|
640
640
|
super(t), this.config = t;
|
|
641
641
|
}
|
|
642
|
-
preload(t, e = {}
|
|
643
|
-
|
|
644
|
-
return this.config.preload(r, e, s);
|
|
642
|
+
preload(t, e = {}) {
|
|
643
|
+
return super.preload(t, e);
|
|
645
644
|
}
|
|
646
|
-
replace(t, e = {},
|
|
647
|
-
return this.navigate(t, e, { ...
|
|
645
|
+
replace(t, e = {}, r = {}) {
|
|
646
|
+
return this.navigate(t, e, { ...r, type: "replace" });
|
|
648
647
|
}
|
|
649
|
-
push(t, e = {},
|
|
650
|
-
return this.navigate(t, e, { ...
|
|
648
|
+
push(t, e = {}, r = {}) {
|
|
649
|
+
return this.navigate(t, e, { ...r, type: "push" });
|
|
651
650
|
}
|
|
652
651
|
reload(t = {}) {
|
|
653
652
|
return window.navigation.reload({ state: t });
|
|
654
653
|
}
|
|
655
654
|
traverseTo(t, e = {}) {
|
|
656
|
-
const
|
|
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();
|
|
657
656
|
c.signal.addEventListener(
|
|
658
657
|
"abort",
|
|
659
|
-
() => this.traverseTo(
|
|
658
|
+
() => this.traverseTo(s.from.key),
|
|
660
659
|
{ once: !0 }
|
|
661
660
|
), e.signal?.addEventListener("abort", c.abort, { once: !0 });
|
|
662
661
|
let u;
|
|
663
|
-
return i >
|
|
662
|
+
return i > a ? u = this.createBackEvent(
|
|
664
663
|
c.signal,
|
|
665
|
-
|
|
666
|
-
|
|
664
|
+
r.committed,
|
|
665
|
+
s
|
|
667
666
|
) : u = this.createForwardEvent(
|
|
668
667
|
c.signal,
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
), this.dispatchEvent?.(u),
|
|
668
|
+
r.committed,
|
|
669
|
+
s
|
|
670
|
+
), this.dispatchEvent?.(u), r;
|
|
672
671
|
}
|
|
673
|
-
navigate(t, e = {},
|
|
674
|
-
const { type:
|
|
675
|
-
u.signal.addEventListener("abort", () => this.goBack(), { once: !0 }),
|
|
676
|
-
const
|
|
672
|
+
navigate(t, e = {}, r = {}) {
|
|
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(
|
|
677
676
|
t,
|
|
678
677
|
e,
|
|
679
|
-
|
|
678
|
+
s,
|
|
680
679
|
u.signal,
|
|
681
|
-
|
|
680
|
+
a.committed,
|
|
682
681
|
c
|
|
683
682
|
);
|
|
684
|
-
return this.dispatchEvent?.(
|
|
683
|
+
return this.dispatchEvent?.(l), a;
|
|
685
684
|
}
|
|
686
685
|
goBack(t = {}) {
|
|
687
686
|
if (!this.canGoBack())
|
|
688
687
|
return;
|
|
689
|
-
const e = window.navigation.traverseTo(this.previous.key),
|
|
690
|
-
|
|
688
|
+
const e = window.navigation.traverseTo(this.previous.key), r = window.navigation.transition, s = new AbortController();
|
|
689
|
+
s.signal.addEventListener("abort", () => this.goForward(), { once: !0 }), t.signal?.addEventListener("abort", s.abort, { once: !0 });
|
|
691
690
|
const i = this.createBackEvent(
|
|
692
|
-
|
|
691
|
+
s.signal,
|
|
693
692
|
e.committed,
|
|
694
|
-
|
|
693
|
+
r
|
|
695
694
|
);
|
|
696
695
|
return this.dispatchEvent?.(i), e;
|
|
697
696
|
}
|
|
698
697
|
goForward(t = {}) {
|
|
699
698
|
if (!this.canGoForward())
|
|
700
699
|
return;
|
|
701
|
-
const e = window.navigation.traverseTo(this.next.key),
|
|
702
|
-
|
|
700
|
+
const e = window.navigation.traverseTo(this.next.key), r = window.navigation.transition, s = new AbortController();
|
|
701
|
+
s.signal.addEventListener("abort", () => this.goBack(), { once: !0 }), t.signal?.addEventListener("abort", s.abort, { once: !0 });
|
|
703
702
|
const i = this.createForwardEvent(
|
|
704
|
-
|
|
703
|
+
s.signal,
|
|
705
704
|
e.committed,
|
|
706
|
-
|
|
705
|
+
r
|
|
707
706
|
);
|
|
708
707
|
return this.dispatchEvent?.(i), e;
|
|
709
708
|
}
|
|
710
|
-
createBackEvent(t, e,
|
|
709
|
+
createBackEvent(t, e, r) {
|
|
711
710
|
if (!this.routerId)
|
|
712
711
|
throw new Error("Router ID is not set");
|
|
713
|
-
return new
|
|
712
|
+
return new ye(this.routerId, t, e, r);
|
|
714
713
|
}
|
|
715
|
-
createForwardEvent(t, e,
|
|
714
|
+
createForwardEvent(t, e, r) {
|
|
716
715
|
if (!this.routerId)
|
|
717
716
|
throw new Error("Router ID is not set");
|
|
718
|
-
return new
|
|
717
|
+
return new we(this.routerId, t, e, r);
|
|
719
718
|
}
|
|
720
|
-
createNavigateEvent(t, e,
|
|
719
|
+
createNavigateEvent(t, e, r, s, i, a) {
|
|
721
720
|
if (!this.routerId)
|
|
722
721
|
throw new Error("Router ID is not set");
|
|
723
|
-
return new
|
|
722
|
+
return new me(
|
|
724
723
|
this.routerId,
|
|
725
724
|
t,
|
|
726
725
|
e,
|
|
727
|
-
s,
|
|
728
726
|
r,
|
|
727
|
+
s,
|
|
729
728
|
i,
|
|
730
|
-
|
|
729
|
+
a
|
|
731
730
|
);
|
|
732
731
|
}
|
|
733
732
|
get committed() {
|
|
@@ -819,38 +818,38 @@ class ge extends gt {
|
|
|
819
818
|
*/
|
|
820
819
|
get entries() {
|
|
821
820
|
const t = this.config.getPathPatterns().filter(({ pattern: i }) => i.endsWith("**"));
|
|
822
|
-
let e = null,
|
|
823
|
-
return this.globalEntries.filter((i,
|
|
824
|
-
if (!i.url ||
|
|
821
|
+
let e = null, r = L, s = !1;
|
|
822
|
+
return this.globalEntries.filter((i, a) => {
|
|
823
|
+
if (!i.url || s)
|
|
825
824
|
return !1;
|
|
826
|
-
const c = new URL(i.url), u =
|
|
825
|
+
const c = new URL(i.url), u = wt(
|
|
827
826
|
this.baseURLPattern.pathname,
|
|
828
827
|
c.pathname
|
|
829
828
|
);
|
|
830
829
|
if (!u)
|
|
831
|
-
return
|
|
830
|
+
return r !== L && (s = !0), !1;
|
|
832
831
|
if (e) {
|
|
833
|
-
const
|
|
832
|
+
const l = new URLPattern(
|
|
834
833
|
e.pattern,
|
|
835
834
|
u.href
|
|
836
835
|
);
|
|
837
836
|
if (X(
|
|
838
837
|
c.pathname,
|
|
839
838
|
c.pathname,
|
|
840
|
-
|
|
839
|
+
l.pathname,
|
|
841
840
|
e.caseSensitive
|
|
842
841
|
))
|
|
843
842
|
return !1;
|
|
844
843
|
}
|
|
845
844
|
return e = t.find(
|
|
846
|
-
({ pattern:
|
|
847
|
-
|
|
845
|
+
({ pattern: l, caseSensitive: v }) => X(
|
|
846
|
+
l,
|
|
848
847
|
c.pathname,
|
|
849
848
|
this.baseURLPattern.pathname,
|
|
850
|
-
|
|
849
|
+
v
|
|
851
850
|
)
|
|
852
|
-
) ?? null,
|
|
853
|
-
}).map((i,
|
|
851
|
+
) ?? null, r = a, !0;
|
|
852
|
+
}).map((i, a) => new vt(i, this.routerId, a));
|
|
854
853
|
}
|
|
855
854
|
/**
|
|
856
855
|
* Returns the **local history index** for this router, derived from the
|
|
@@ -950,26 +949,26 @@ class ge extends gt {
|
|
|
950
949
|
* ```
|
|
951
950
|
*/
|
|
952
951
|
get index() {
|
|
953
|
-
const t = window.navigation.currentEntry?.index ??
|
|
952
|
+
const t = window.navigation.currentEntry?.index ?? L, e = this.entries.at(C)?.globalIndex ?? L, r = this.entries.at(L)?.globalIndex ?? L;
|
|
954
953
|
if (t <= e)
|
|
955
|
-
return
|
|
956
|
-
if (t >=
|
|
957
|
-
return this.entries.length -
|
|
954
|
+
return C;
|
|
955
|
+
if (t >= r)
|
|
956
|
+
return this.entries.length - T;
|
|
958
957
|
{
|
|
959
|
-
const
|
|
958
|
+
const s = this.globalEntries.slice(
|
|
960
959
|
e,
|
|
961
|
-
t +
|
|
960
|
+
t + T
|
|
962
961
|
);
|
|
963
|
-
return this.entries.findLastIndex((i) =>
|
|
964
|
-
(
|
|
965
|
-
) >
|
|
962
|
+
return this.entries.findLastIndex((i) => s.findLastIndex(
|
|
963
|
+
(a) => i.key === a.key
|
|
964
|
+
) > L);
|
|
966
965
|
}
|
|
967
966
|
}
|
|
968
967
|
get previous() {
|
|
969
|
-
return this.entries[this.index -
|
|
968
|
+
return this.entries[this.index - T] ?? null;
|
|
970
969
|
}
|
|
971
970
|
get next() {
|
|
972
|
-
return this.entries[this.index +
|
|
971
|
+
return this.entries[this.index + T] ?? null;
|
|
973
972
|
}
|
|
974
973
|
get current() {
|
|
975
974
|
return this.entries[this.index];
|
|
@@ -981,16 +980,16 @@ class ge extends gt {
|
|
|
981
980
|
return this.next?.url?.origin === globalThis.location.origin;
|
|
982
981
|
}
|
|
983
982
|
}
|
|
984
|
-
function
|
|
983
|
+
function _e(n) {
|
|
985
984
|
return Object.fromEntries(n.entries());
|
|
986
985
|
}
|
|
987
|
-
function
|
|
986
|
+
function Le(n) {
|
|
988
987
|
return new URLSearchParams(n).toString();
|
|
989
988
|
}
|
|
990
|
-
function
|
|
989
|
+
function Te(n) {
|
|
991
990
|
return n && typeof n == "object" && "gesture" in n ? !!n.gesture : !1;
|
|
992
991
|
}
|
|
993
|
-
function
|
|
992
|
+
function Re(n) {
|
|
994
993
|
return n && typeof n == "object" && "rollback" in n ? !!n.rollback : !1;
|
|
995
994
|
}
|
|
996
995
|
function W(n, t) {
|
|
@@ -998,26 +997,49 @@ function W(n, t) {
|
|
|
998
997
|
return !0;
|
|
999
998
|
if (n === null || t === null || typeof n != "object" || typeof t != "object")
|
|
1000
999
|
return !1;
|
|
1001
|
-
const e = Object.keys(n),
|
|
1002
|
-
if (e.length !==
|
|
1000
|
+
const e = Object.keys(n), r = Object.keys(t);
|
|
1001
|
+
if (e.length !== r.length)
|
|
1003
1002
|
return !1;
|
|
1004
|
-
for (const
|
|
1005
|
-
if (!
|
|
1003
|
+
for (const s of e)
|
|
1004
|
+
if (!r.includes(s) || !W(n[s], t[s]))
|
|
1006
1005
|
return !1;
|
|
1007
1006
|
return !0;
|
|
1008
1007
|
}
|
|
1009
|
-
|
|
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 {
|
|
1010
1021
|
#t;
|
|
1011
1022
|
constructor(t, e) {
|
|
1012
1023
|
super(t, e);
|
|
1013
|
-
const
|
|
1014
|
-
if (!
|
|
1015
|
-
throw new Error(`No history entry found for: ${
|
|
1016
|
-
this.#t =
|
|
1024
|
+
const r = this.internalProps.id, s = e.navigation.entries.find((i) => i.key === r);
|
|
1025
|
+
if (!s)
|
|
1026
|
+
throw new Error(`No history entry found for: ${r}`);
|
|
1027
|
+
this.#t = s;
|
|
1017
1028
|
}
|
|
1018
1029
|
static getDerivedStateFromProps(t) {
|
|
1019
1030
|
return t.config?.presentation === "dialog" || t.config?.presentation === "modal" ? { elementType: "dialog" } : { elementType: "div" };
|
|
1020
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
|
+
}
|
|
1021
1043
|
setParams(t) {
|
|
1022
1044
|
super.setParams(t), this.setHistoryState(
|
|
1023
1045
|
({ params: e }) => ({ params: { ...e, ...t } })
|
|
@@ -1025,7 +1047,7 @@ class en extends mt {
|
|
|
1025
1047
|
}
|
|
1026
1048
|
setConfig(t) {
|
|
1027
1049
|
super.setConfig(t), this.setHistoryState(({ config: e }) => {
|
|
1028
|
-
const
|
|
1050
|
+
const r = /* @__PURE__ */ new Set([
|
|
1029
1051
|
"footer",
|
|
1030
1052
|
"header",
|
|
1031
1053
|
"onEnter",
|
|
@@ -1039,7 +1061,7 @@ class en extends mt {
|
|
|
1039
1061
|
config: {
|
|
1040
1062
|
...e,
|
|
1041
1063
|
...Object.fromEntries(
|
|
1042
|
-
Object.entries(t).filter(([
|
|
1064
|
+
Object.entries(t).filter(([s]) => !r.has(s))
|
|
1043
1065
|
)
|
|
1044
1066
|
}
|
|
1045
1067
|
};
|
|
@@ -1056,20 +1078,15 @@ class en extends mt {
|
|
|
1056
1078
|
}
|
|
1057
1079
|
get historyEntryState() {
|
|
1058
1080
|
const t = this.#t;
|
|
1059
|
-
if (t
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
...s,
|
|
1069
|
-
...r
|
|
1070
|
-
}, e;
|
|
1071
|
-
}
|
|
1072
|
-
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);
|
|
1073
1090
|
}
|
|
1074
1091
|
get id() {
|
|
1075
1092
|
return this.internalProps.id.toString();
|
|
@@ -1089,15 +1106,15 @@ class en extends mt {
|
|
|
1089
1106
|
};
|
|
1090
1107
|
}
|
|
1091
1108
|
get routeProp() {
|
|
1092
|
-
const t = this.setParams.bind(this), e = this.setConfig.bind(this), { path:
|
|
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;
|
|
1093
1110
|
return {
|
|
1094
1111
|
setParams: t,
|
|
1095
1112
|
setConfig: e,
|
|
1096
|
-
path:
|
|
1113
|
+
path: r,
|
|
1097
1114
|
resolvedPathname: c,
|
|
1098
|
-
focused:
|
|
1115
|
+
focused: s,
|
|
1099
1116
|
params: i,
|
|
1100
|
-
config:
|
|
1117
|
+
config: a
|
|
1101
1118
|
};
|
|
1102
1119
|
}
|
|
1103
1120
|
setHistoryState(t) {
|
|
@@ -1105,11 +1122,11 @@ class en extends mt {
|
|
|
1105
1122
|
return;
|
|
1106
1123
|
const e = this.#t.getState() ?? {};
|
|
1107
1124
|
t instanceof Function && (t = t(e));
|
|
1108
|
-
const
|
|
1125
|
+
const r = {
|
|
1109
1126
|
...e ?? {},
|
|
1110
1127
|
...t
|
|
1111
1128
|
};
|
|
1112
|
-
window.navigation.updateCurrentEntry({ state:
|
|
1129
|
+
window.navigation.updateCurrentEntry({ state: r });
|
|
1113
1130
|
}
|
|
1114
1131
|
onClickOutside(t) {
|
|
1115
1132
|
if (!this.transitionProvider.current?.ref.current)
|
|
@@ -1120,12 +1137,12 @@ class en extends mt {
|
|
|
1120
1137
|
onEnter(t) {
|
|
1121
1138
|
const e = this.transitionProvider.current?.ref;
|
|
1122
1139
|
if (e?.current instanceof HTMLDialogElement && e.current.open === !1) {
|
|
1123
|
-
const
|
|
1140
|
+
const r = this.context?.navigation;
|
|
1124
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";
|
|
1125
|
-
const
|
|
1142
|
+
const s = this.onClickOutside.bind(this);
|
|
1126
1143
|
e.current.addEventListener("close", function() {
|
|
1127
|
-
this.returnValue !== "screen-exit" && (this.style.display = "block",
|
|
1128
|
-
}, { once: !0 }),
|
|
1144
|
+
this.returnValue !== "screen-exit" && (this.style.display = "block", r?.goBack()), r?.removeEventListener("click", s);
|
|
1145
|
+
}, { once: !0 }), r?.addEventListener("click", s);
|
|
1129
1146
|
}
|
|
1130
1147
|
return super.onEnter(t);
|
|
1131
1148
|
}
|
|
@@ -1134,10 +1151,10 @@ class en extends mt {
|
|
|
1134
1151
|
return e?.current instanceof HTMLDialogElement && e.current.close("screen-exit"), super.onExited(t);
|
|
1135
1152
|
}
|
|
1136
1153
|
}
|
|
1137
|
-
function
|
|
1154
|
+
function F(n) {
|
|
1138
1155
|
return !!(n !== null && typeof n == "object" && Object.hasOwn(n, "current"));
|
|
1139
1156
|
}
|
|
1140
|
-
const
|
|
1157
|
+
const ke = {
|
|
1141
1158
|
horizontal: ["left", "right"],
|
|
1142
1159
|
vertical: ["up", "down"],
|
|
1143
1160
|
up: ["up"],
|
|
@@ -1145,46 +1162,63 @@ const Ee = {
|
|
|
1145
1162
|
left: ["left"],
|
|
1146
1163
|
right: ["right"]
|
|
1147
1164
|
};
|
|
1148
|
-
function
|
|
1149
|
-
return
|
|
1150
|
-
}
|
|
1151
|
-
function Se(n, { x: t, y: e }, s, r) {
|
|
1152
|
-
if (n === "right" && Math.abs(t - s.left) >= r || n === "left" && Math.abs(t - s.right) >= r || n === "down" && Math.abs(e - s.top) >= r || n === "up" && Math.abs(e - s.bottom) >= r)
|
|
1153
|
-
return !1;
|
|
1165
|
+
function Ie(n, t) {
|
|
1166
|
+
return ke[t].includes(n);
|
|
1154
1167
|
}
|
|
1155
|
-
function
|
|
1168
|
+
function Fe(n) {
|
|
1156
1169
|
return n === "left" || n === "right" || n === "horizontal";
|
|
1157
1170
|
}
|
|
1158
|
-
const
|
|
1171
|
+
const S = {
|
|
1159
1172
|
gestureHysteresis: 0.5,
|
|
1160
1173
|
gestureMinFlingVelocity: 400,
|
|
1161
1174
|
gestureAreaWidth: 100,
|
|
1162
1175
|
gestureDirection: "right",
|
|
1163
1176
|
gestureDisabled: !1
|
|
1164
|
-
},
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
state;
|
|
1168
|
-
#t;
|
|
1169
|
-
#e;
|
|
1170
|
-
constructor() {
|
|
1171
|
-
this.state = "pending", this.#t = this.#e = null, this.promise = new Promise((t, e) => {
|
|
1172
|
-
this.#t = t, this.#e = e;
|
|
1173
|
-
});
|
|
1174
|
-
}
|
|
1175
|
-
resolve(t) {
|
|
1176
|
-
this.state = "resolved", this.#t?.(t);
|
|
1177
|
-
}
|
|
1178
|
-
reject(t) {
|
|
1179
|
-
this.state = "rejected", this.promise.catch(() => {
|
|
1180
|
-
}), this.#e?.(t);
|
|
1181
|
-
}
|
|
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);
|
|
1182
1180
|
}
|
|
1183
|
-
|
|
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 {
|
|
1184
1218
|
navigation;
|
|
1185
1219
|
#t = null;
|
|
1186
1220
|
constructor(t, e) {
|
|
1187
|
-
super(t, e), this.navigation = new
|
|
1221
|
+
super(t, e), this.navigation = new Se({
|
|
1188
1222
|
addEventListener: this.addEventListener.bind(this),
|
|
1189
1223
|
removeEventListener: this.removeEventListener.bind(this),
|
|
1190
1224
|
dispatchEvent: this.dispatchEvent.bind(this),
|
|
@@ -1195,21 +1229,20 @@ class nn extends yt {
|
|
|
1195
1229
|
getCommitted: () => this.committed,
|
|
1196
1230
|
getTransition: () => this.state.transition,
|
|
1197
1231
|
getPathPatterns: () => this.pathPatterns,
|
|
1198
|
-
preload: this.preload.bind(this),
|
|
1199
1232
|
getNavigatorById: (u) => this.getRouterById(u)?.navigation ?? null
|
|
1200
1233
|
});
|
|
1201
1234
|
const {
|
|
1202
|
-
gestureAreaWidth:
|
|
1203
|
-
gestureDirection:
|
|
1204
|
-
gestureDisabled: i =
|
|
1205
|
-
gestureHysteresis:
|
|
1206
|
-
gestureMinFlingVelocity: c =
|
|
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
|
|
1207
1240
|
} = t.config?.screenConfig ?? {};
|
|
1208
1241
|
this.state = {
|
|
1209
1242
|
screenStack: [],
|
|
1210
|
-
gestureDirection:
|
|
1211
|
-
gestureAreaWidth:
|
|
1212
|
-
gestureHysteresis:
|
|
1243
|
+
gestureDirection: s,
|
|
1244
|
+
gestureAreaWidth: r,
|
|
1245
|
+
gestureHysteresis: a,
|
|
1213
1246
|
gestureDisabled: i,
|
|
1214
1247
|
gestureMinFlingVelocity: c,
|
|
1215
1248
|
transition: null,
|
|
@@ -1220,55 +1253,41 @@ class nn extends yt {
|
|
|
1220
1253
|
};
|
|
1221
1254
|
}
|
|
1222
1255
|
static getDerivedStateFromProps(t, e) {
|
|
1223
|
-
const
|
|
1224
|
-
(
|
|
1256
|
+
const r = e.screenStack.find(
|
|
1257
|
+
(s) => F(s.ref) && s.ref.current?.focused
|
|
1225
1258
|
)?.props.config;
|
|
1226
|
-
return document.title =
|
|
1227
|
-
gestureDirection:
|
|
1228
|
-
gestureAreaWidth:
|
|
1229
|
-
gestureMinFlingVelocity:
|
|
1230
|
-
gestureHysteresis:
|
|
1231
|
-
gestureDisabled:
|
|
1232
|
-
documentTitle:
|
|
1259
|
+
return document.title = r?.title ?? document.title, {
|
|
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,
|
|
1265
|
+
documentTitle: r?.title
|
|
1233
1266
|
};
|
|
1234
1267
|
}
|
|
1235
1268
|
componentDidMount() {
|
|
1236
|
-
super.componentDidMount(), this.
|
|
1237
|
-
"currententrychange",
|
|
1238
|
-
this.onCurrentEntryChange
|
|
1239
|
-
), window.navigation.addEventListener("navigate", this.onNavigate), window.navigation.addEventListener(
|
|
1240
|
-
"navigatesuccess",
|
|
1241
|
-
this.onNavigateSuccess
|
|
1242
|
-
), 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);
|
|
1243
1270
|
}
|
|
1244
1271
|
// TODO: figure out how to remove this
|
|
1245
1272
|
shouldComponentUpdate(t, e) {
|
|
1246
1273
|
return !W(this.props.config, t.config) || !W(this.state, e) || this.props.id !== t.id;
|
|
1247
1274
|
}
|
|
1248
1275
|
componentWillUnmount() {
|
|
1249
|
-
this.
|
|
1250
|
-
"currententrychange",
|
|
1251
|
-
this.onCurrentEntryChange
|
|
1252
|
-
), window.navigation.removeEventListener("navigate", this.onNavigate), window.navigation.removeEventListener(
|
|
1253
|
-
"navigatesuccess",
|
|
1254
|
-
this.onNavigateSuccess
|
|
1255
|
-
), window.navigation.removeEventListener(
|
|
1256
|
-
"navigateerror",
|
|
1257
|
-
this.onNavigateError
|
|
1258
|
-
);
|
|
1276
|
+
window.navigation.removeEventListener("currententrychange", this), window.navigation.removeEventListener("navigate", this), window.navigation.removeEventListener("navigatesuccess", this), window.navigation.removeEventListener("navigateerror", this);
|
|
1259
1277
|
}
|
|
1260
|
-
|
|
1261
|
-
this.#t = new
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1278
|
+
onnavigate(t) {
|
|
1279
|
+
super.onnavigate(t), this.#t = new St();
|
|
1280
|
+
}
|
|
1281
|
+
oncurrententrychange() {
|
|
1264
1282
|
this.#t?.resolve?.(window.navigation.currentEntry);
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1283
|
+
}
|
|
1284
|
+
onnavigatesuccess() {
|
|
1267
1285
|
this.#t = null;
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1286
|
+
}
|
|
1287
|
+
onnavigateerror({ error: t }) {
|
|
1270
1288
|
this.#t?.state === "pending" && this.#t.reject?.(t), this.#t = null;
|
|
1271
|
-
}
|
|
1289
|
+
}
|
|
1290
|
+
// TODO: change to use handleEvent paradigm
|
|
1272
1291
|
onGestureCancel = () => {
|
|
1273
1292
|
if (!this.state.transition)
|
|
1274
1293
|
throw new Error("Rollback failed, transition is null");
|
|
@@ -1279,132 +1298,111 @@ class nn extends yt {
|
|
|
1279
1298
|
canGestureNavigate(t) {
|
|
1280
1299
|
if (!this.ref.current || this.state.gestureDisabled)
|
|
1281
1300
|
return !1;
|
|
1282
|
-
const e = this.ref.current.getBoundingClientRect(), { direction:
|
|
1283
|
-
return (
|
|
1301
|
+
const e = this.ref.current.getBoundingClientRect(), { direction: r } = t;
|
|
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);
|
|
1284
1308
|
}
|
|
1285
|
-
|
|
1309
|
+
onswipestart(t) {
|
|
1286
1310
|
if (!this.canGestureNavigate(t) || !this.ref.current || !this.screenTransitionLayer.current)
|
|
1287
1311
|
return;
|
|
1288
|
-
const { direction: e } = t,
|
|
1289
|
-
let
|
|
1312
|
+
const { direction: e } = t, r = Fe(e) ? "x" : "y";
|
|
1313
|
+
let s, i;
|
|
1290
1314
|
switch (e) {
|
|
1291
1315
|
case "right":
|
|
1292
|
-
|
|
1316
|
+
s = 0, i = this.ref.current.clientWidth;
|
|
1293
1317
|
break;
|
|
1294
1318
|
case "left":
|
|
1295
|
-
|
|
1319
|
+
s = this.ref.current.clientWidth, i = 0;
|
|
1296
1320
|
break;
|
|
1297
1321
|
case "down":
|
|
1298
|
-
|
|
1322
|
+
s = 0, i = this.ref.current.clientHeight;
|
|
1299
1323
|
break;
|
|
1300
1324
|
case "up":
|
|
1301
|
-
|
|
1325
|
+
s = this.ref.current.clientHeight, i = 0;
|
|
1302
1326
|
break;
|
|
1303
1327
|
}
|
|
1304
|
-
this.screenTransitionLayer.current.animation.timeline = new
|
|
1328
|
+
this.screenTransitionLayer.current.animation.timeline = new Kt(
|
|
1305
1329
|
{
|
|
1306
1330
|
source: this.ref.current,
|
|
1307
1331
|
type: "swipe",
|
|
1308
|
-
axis:
|
|
1309
|
-
rangeStart:
|
|
1332
|
+
axis: r,
|
|
1333
|
+
rangeStart: s,
|
|
1310
1334
|
rangeEnd: i
|
|
1311
1335
|
}
|
|
1312
1336
|
);
|
|
1313
|
-
const
|
|
1337
|
+
const a = !0;
|
|
1314
1338
|
e === "down" || e === "right" ? window.navigation.traverseTo(this.navigation.previous.key, {
|
|
1315
|
-
info: { gesture:
|
|
1339
|
+
info: { gesture: a }
|
|
1316
1340
|
}) : window.navigation.traverseTo(this.navigation.next.key, {
|
|
1317
|
-
info: { gesture:
|
|
1318
|
-
}), this.dispatchEvent(new
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1341
|
+
info: { gesture: a }
|
|
1342
|
+
}), this.dispatchEvent(new Ee(t));
|
|
1343
|
+
}
|
|
1344
|
+
onswipeend(t) {
|
|
1321
1345
|
if (!this.screenTransitionLayer.current)
|
|
1322
1346
|
return;
|
|
1323
|
-
const e = this.screenTransitionLayer.current.animation.effect?.getComputedTiming().progress ?? 0,
|
|
1347
|
+
const e = this.screenTransitionLayer.current.animation.effect?.getComputedTiming().progress ?? 0, r = this.screenTransitionLayer.current.animation.playbackRate;
|
|
1324
1348
|
this.screenTransitionLayer.current.animation.timeline = document.timeline;
|
|
1325
|
-
const
|
|
1349
|
+
const s = r > 0 ? e > this.state.gestureHysteresis : e < this.state.gestureHysteresis;
|
|
1326
1350
|
let i = !1;
|
|
1327
|
-
t.velocity < this.state.gestureMinFlingVelocity && !
|
|
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(() => {
|
|
1328
1352
|
this.state.controller?.abort("gesture-cancel");
|
|
1329
1353
|
});
|
|
1330
|
-
}
|
|
1354
|
+
}
|
|
1331
1355
|
get committed() {
|
|
1332
1356
|
return this.#t?.promise ?? null;
|
|
1333
1357
|
}
|
|
1334
1358
|
get backNavigating() {
|
|
1335
1359
|
const t = this.state.screenStack.findIndex(
|
|
1336
|
-
(
|
|
1360
|
+
(r) => r.key === this.state.fromKey
|
|
1337
1361
|
), e = this.state.screenStack.findIndex(
|
|
1338
|
-
(
|
|
1362
|
+
(r) => r.key === this.state.destinationKey
|
|
1339
1363
|
);
|
|
1340
|
-
return e >=
|
|
1364
|
+
return e >= C && e < t;
|
|
1341
1365
|
}
|
|
1342
1366
|
get screens() {
|
|
1343
1367
|
const t = this.state.screenStack;
|
|
1344
|
-
return t.filter((e,
|
|
1345
|
-
const
|
|
1346
|
-
return
|
|
1368
|
+
return t.filter((e, r) => {
|
|
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;
|
|
1347
1371
|
});
|
|
1348
1372
|
}
|
|
1349
|
-
async preload(t, e = {}, s = {}) {
|
|
1350
|
-
const { child: r, matchInfo: i } = this.screenChildFromPathname(t) ?? {};
|
|
1351
|
-
if (!r)
|
|
1352
|
-
return Promise.resolve(!1);
|
|
1353
|
-
const { navigation: o } = this, { signal: c } = s, { path: u } = r.props;
|
|
1354
|
-
return await Promise.all([
|
|
1355
|
-
this.preloadScreen(r),
|
|
1356
|
-
r.props.config?.onLoad?.({
|
|
1357
|
-
navigation: o,
|
|
1358
|
-
signal: c,
|
|
1359
|
-
preloading: !0,
|
|
1360
|
-
route: {
|
|
1361
|
-
focused: !1,
|
|
1362
|
-
path: u,
|
|
1363
|
-
resolvedPathname: t,
|
|
1364
|
-
config: {
|
|
1365
|
-
...this.props.config?.screenConfig,
|
|
1366
|
-
...r.props.config,
|
|
1367
|
-
...e.config
|
|
1368
|
-
},
|
|
1369
|
-
params: {
|
|
1370
|
-
...r.props.defaultParams,
|
|
1371
|
-
...i?.params,
|
|
1372
|
-
...e.params
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
1375
|
-
})
|
|
1376
|
-
]), !0;
|
|
1377
|
-
}
|
|
1378
1373
|
cloneScreenChildFromPathname(t, e) {
|
|
1379
|
-
const { child:
|
|
1380
|
-
return
|
|
1374
|
+
const { child: r } = this.screenChildFromPathname(t) ?? {};
|
|
1375
|
+
return r ? (e ??= crypto.randomUUID(), _t(r, {
|
|
1381
1376
|
config: {
|
|
1382
1377
|
title: document.title,
|
|
1383
1378
|
...this.props.config?.screenConfig,
|
|
1384
|
-
...
|
|
1379
|
+
...r.props.config
|
|
1385
1380
|
},
|
|
1386
1381
|
id: e,
|
|
1387
1382
|
resolvedPathname: t,
|
|
1388
1383
|
key: e,
|
|
1389
|
-
ref:
|
|
1384
|
+
ref: Ot()
|
|
1390
1385
|
})) : null;
|
|
1391
1386
|
}
|
|
1392
1387
|
getScreenRefByKey(t) {
|
|
1393
1388
|
const e = this.state.screenStack.find(
|
|
1394
|
-
(
|
|
1389
|
+
(r) => r.key === t
|
|
1395
1390
|
)?.ref;
|
|
1396
|
-
return
|
|
1391
|
+
return F(e) ? e : null;
|
|
1397
1392
|
}
|
|
1398
1393
|
canIntercept(t) {
|
|
1399
|
-
const e = new URL(t.destination.url).pathname,
|
|
1400
|
-
return this.mounted && this.shouldIntercept(t) && this.includesRoute(e,
|
|
1394
|
+
const e = new URL(t.destination.url).pathname, r = this.baseURLPattern.pathname;
|
|
1395
|
+
return this.mounted && this.shouldIntercept(t) && this.includesRoute(e, r);
|
|
1401
1396
|
}
|
|
1402
1397
|
shouldIntercept(t) {
|
|
1403
1398
|
return t.canIntercept && !t.formData && !t.hashChange && !t.downloadRequest || !!this.props.config?.shouldIntercept?.(t);
|
|
1404
1399
|
}
|
|
1405
1400
|
intercept(t) {
|
|
1406
|
-
if (t
|
|
1401
|
+
if (t instanceof Lt || this.props.config?.onIntercept?.(t), !t.defaultPrevented)
|
|
1407
1402
|
switch (t.navigationType) {
|
|
1403
|
+
case "preload":
|
|
1404
|
+
this.handlePreload(t);
|
|
1405
|
+
break;
|
|
1408
1406
|
case "load":
|
|
1409
1407
|
this.handleLoad(t);
|
|
1410
1408
|
break;
|
|
@@ -1417,46 +1415,93 @@ class nn extends yt {
|
|
|
1417
1415
|
break;
|
|
1418
1416
|
}
|
|
1419
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
|
+
}
|
|
1420
1465
|
handleLoad(t) {
|
|
1421
1466
|
const e = () => {
|
|
1422
|
-
const
|
|
1467
|
+
const r = t.transition?.from?.key ?? null, s = t.destination.key, i = t.transition, a = [], c = this.navigation.entries;
|
|
1423
1468
|
return c.forEach((u) => {
|
|
1424
1469
|
if (!u.url)
|
|
1425
1470
|
return null;
|
|
1426
|
-
const
|
|
1471
|
+
const l = this.cloneScreenChildFromPathname(
|
|
1427
1472
|
u.url.pathname,
|
|
1428
1473
|
u.key
|
|
1429
1474
|
);
|
|
1430
|
-
if (!
|
|
1475
|
+
if (!l)
|
|
1431
1476
|
return null;
|
|
1432
|
-
|
|
1477
|
+
a.push(l);
|
|
1433
1478
|
}), new Promise(
|
|
1434
|
-
(u,
|
|
1479
|
+
(u, l) => $(() => {
|
|
1435
1480
|
this.setState(
|
|
1436
|
-
{ screenStack:
|
|
1481
|
+
{ screenStack: a, fromKey: r, transition: i, destinationKey: s },
|
|
1437
1482
|
async () => {
|
|
1438
|
-
const { initialPathname:
|
|
1439
|
-
if (
|
|
1440
|
-
|
|
1441
|
-
|
|
1483
|
+
const { initialPathname: v } = this.props.config ?? {}, [d] = c;
|
|
1484
|
+
if (v && c.length === T && d.url && !X(
|
|
1485
|
+
v,
|
|
1486
|
+
d.url.pathname,
|
|
1442
1487
|
this.baseURLPattern.pathname
|
|
1443
1488
|
))
|
|
1444
1489
|
return (window.navigation.transition?.finished ?? Promise.resolve()).then(() => {
|
|
1445
|
-
this.navigation.replace(
|
|
1446
|
-
const
|
|
1447
|
-
this.navigation.push(t.destination.url,
|
|
1490
|
+
this.navigation.replace(v).finished.then(() => {
|
|
1491
|
+
const w = t.destination.getState() ?? {};
|
|
1492
|
+
this.navigation.push(t.destination.url, w);
|
|
1448
1493
|
});
|
|
1449
1494
|
}), u();
|
|
1450
|
-
const
|
|
1451
|
-
this.navigation.current?.key === void 0 &&
|
|
1452
|
-
const
|
|
1495
|
+
const m = t.signal;
|
|
1496
|
+
this.navigation.current?.key === void 0 && l(new Error("Current key is undefined"));
|
|
1497
|
+
const g = this.getScreenRefByKey(
|
|
1453
1498
|
this.navigation.current.key
|
|
1454
1499
|
);
|
|
1455
1500
|
await this.dispatchLifecycleHandlers(
|
|
1456
|
-
|
|
1501
|
+
g,
|
|
1457
1502
|
null,
|
|
1458
|
-
|
|
1459
|
-
).catch(
|
|
1503
|
+
m
|
|
1504
|
+
).catch(l), this.setState(
|
|
1460
1505
|
{ destinationKey: null, fromKey: null, transition: null },
|
|
1461
1506
|
u
|
|
1462
1507
|
);
|
|
@@ -1468,35 +1513,35 @@ class nn extends yt {
|
|
|
1468
1513
|
t.intercept({ handler: e });
|
|
1469
1514
|
}
|
|
1470
1515
|
handleReplace(t) {
|
|
1471
|
-
const e = this.state.screenStack,
|
|
1472
|
-
|
|
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(
|
|
1517
|
+
s,
|
|
1473
1518
|
i
|
|
1474
1519
|
);
|
|
1475
|
-
if (!
|
|
1520
|
+
if (!a)
|
|
1476
1521
|
return t.preventDefault();
|
|
1477
1522
|
const c = () => {
|
|
1478
|
-
const u = this.state.transition ?? window.navigation.transition,
|
|
1479
|
-
(
|
|
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
|
|
1480
1525
|
);
|
|
1481
1526
|
return e.splice(
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1527
|
+
v,
|
|
1528
|
+
T,
|
|
1529
|
+
a
|
|
1485
1530
|
), new Promise(
|
|
1486
|
-
(
|
|
1531
|
+
(d, m) => $(() => {
|
|
1487
1532
|
this.setState(
|
|
1488
|
-
{ destinationKey: i, fromKey:
|
|
1533
|
+
{ destinationKey: i, fromKey: l, transition: u, screenStack: e },
|
|
1489
1534
|
async () => {
|
|
1490
|
-
const
|
|
1535
|
+
const g = t.signal, p = this.getScreenRefByKey(
|
|
1491
1536
|
String(i)
|
|
1492
1537
|
);
|
|
1493
1538
|
await this.dispatchLifecycleHandlers(
|
|
1494
1539
|
p,
|
|
1495
1540
|
null,
|
|
1496
|
-
|
|
1497
|
-
).catch(
|
|
1541
|
+
g
|
|
1542
|
+
).catch(m), this.setState(
|
|
1498
1543
|
{ destinationKey: null, fromKey: null, transition: null },
|
|
1499
|
-
|
|
1544
|
+
d
|
|
1500
1545
|
);
|
|
1501
1546
|
}
|
|
1502
1547
|
);
|
|
@@ -1506,57 +1551,57 @@ class nn extends yt {
|
|
|
1506
1551
|
t.intercept({ handler: c });
|
|
1507
1552
|
}
|
|
1508
1553
|
handleDefault(t) {
|
|
1509
|
-
const e = this.state.screenStack,
|
|
1510
|
-
if (!this.screenChildFromPathname(
|
|
1554
|
+
const e = this.state.screenStack, r = t.destination, s = new URL(r.url).pathname;
|
|
1555
|
+
if (!this.screenChildFromPathname(s))
|
|
1511
1556
|
return t.preventDefault();
|
|
1512
1557
|
const i = () => {
|
|
1513
|
-
if (
|
|
1558
|
+
if (Re(t.info))
|
|
1514
1559
|
return Promise.resolve();
|
|
1515
1560
|
const u = window.navigation.transition;
|
|
1516
|
-
let
|
|
1561
|
+
let l = e.findIndex(
|
|
1517
1562
|
(p) => p.key === u?.from.key
|
|
1518
1563
|
);
|
|
1519
|
-
|
|
1564
|
+
l === L && t.navigationType === "traverse" && (l = e.findIndex((p) => u?.from.url ? X(
|
|
1520
1565
|
p.props.path,
|
|
1521
1566
|
new URL(u.from.url).pathname,
|
|
1522
1567
|
this.baseURLPattern.pathname,
|
|
1523
1568
|
p.props.caseSensitive
|
|
1524
1569
|
) : !1));
|
|
1525
|
-
const
|
|
1570
|
+
const v = (e[l]?.key || u?.from.key) ?? null, d = e.findIndex(
|
|
1526
1571
|
(p) => p.key === t.destination.key
|
|
1527
|
-
),
|
|
1572
|
+
), m = (e[d]?.key || window.navigation.currentEntry?.key) ?? null;
|
|
1528
1573
|
if (t.navigationType === "push") {
|
|
1529
|
-
const p = new URL(
|
|
1574
|
+
const p = new URL(r.url).pathname, w = this.cloneScreenChildFromPathname(
|
|
1530
1575
|
p,
|
|
1531
|
-
|
|
1576
|
+
m
|
|
1532
1577
|
);
|
|
1533
|
-
if (!
|
|
1578
|
+
if (!w)
|
|
1534
1579
|
return Promise.resolve();
|
|
1535
1580
|
e.splice(
|
|
1536
|
-
|
|
1581
|
+
l + T,
|
|
1537
1582
|
1 / 0,
|
|
1538
1583
|
// Remove all screens after current
|
|
1539
|
-
|
|
1584
|
+
w
|
|
1540
1585
|
);
|
|
1541
1586
|
}
|
|
1542
|
-
const
|
|
1587
|
+
const g = new AbortController();
|
|
1543
1588
|
return new Promise(
|
|
1544
|
-
(p,
|
|
1589
|
+
(p, w) => $(() => {
|
|
1545
1590
|
this.setState(
|
|
1546
|
-
{ controller:
|
|
1591
|
+
{ controller: g, destinationKey: m, fromKey: v, transition: u, screenStack: e },
|
|
1547
1592
|
async () => {
|
|
1548
|
-
|
|
1549
|
-
const
|
|
1550
|
-
String(
|
|
1593
|
+
g.signal.onabort = w;
|
|
1594
|
+
const h = t.signal, o = this.getScreenRefByKey(String(v)), f = this.getScreenRefByKey(
|
|
1595
|
+
String(m)
|
|
1551
1596
|
), P = this.dispatchLifecycleHandlers(
|
|
1552
1597
|
f,
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
).catch(
|
|
1598
|
+
o,
|
|
1599
|
+
h
|
|
1600
|
+
).catch(w), E = this.screenTransition(
|
|
1556
1601
|
f,
|
|
1557
|
-
|
|
1602
|
+
o
|
|
1558
1603
|
);
|
|
1559
|
-
|
|
1604
|
+
E?.updatePlaybackRate(De), E?.finished.catch(w), await P, this.setState(
|
|
1560
1605
|
{
|
|
1561
1606
|
destinationKey: null,
|
|
1562
1607
|
fromKey: null,
|
|
@@ -1570,245 +1615,222 @@ class nn extends yt {
|
|
|
1570
1615
|
})
|
|
1571
1616
|
);
|
|
1572
1617
|
};
|
|
1573
|
-
let
|
|
1574
|
-
|
|
1618
|
+
let a;
|
|
1619
|
+
Te(t.info) ? (a = "after-transition", this.addEventListener("gesture-end", () => t.commit?.(), { once: !0 }), this.addEventListener("gesture-cancel", this.onGestureCancel, {
|
|
1575
1620
|
once: !0
|
|
1576
|
-
})) :
|
|
1577
|
-
const c = { handler: i, commit:
|
|
1621
|
+
})) : a = "immediate";
|
|
1622
|
+
const c = { handler: i, commit: a };
|
|
1578
1623
|
t.intercept(c);
|
|
1579
1624
|
}
|
|
1580
|
-
async dispatchLifecycleHandlers(t, e,
|
|
1581
|
-
let
|
|
1582
|
-
this.addEventListener(
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
(
|
|
1625
|
+
async dispatchLifecycleHandlers(t, e, r) {
|
|
1626
|
+
let s = !1;
|
|
1627
|
+
this.addEventListener(
|
|
1628
|
+
"routertransitionstart",
|
|
1629
|
+
() => s = !0,
|
|
1630
|
+
{ once: !0 }
|
|
1631
|
+
), await Promise.all([
|
|
1632
|
+
e?.current?.onExit(r),
|
|
1633
|
+
t?.current?.onEnter(r),
|
|
1634
|
+
t?.current?.load(r)
|
|
1635
|
+
]), s && await new Promise(
|
|
1636
|
+
(i) => this.addEventListener("routertransitionend", i, { once: !0 })
|
|
1590
1637
|
), !this.state.controller?.signal.aborted && await Promise.all([
|
|
1591
|
-
e?.current?.onExited(
|
|
1592
|
-
t?.current?.onEntered(
|
|
1638
|
+
e?.current?.onExited(r).then(() => e.current?.blur()),
|
|
1639
|
+
t?.current?.onEntered(r).then(() => t.current?.focus())
|
|
1593
1640
|
]);
|
|
1594
1641
|
}
|
|
1595
1642
|
screenTransition(t, e) {
|
|
1596
|
-
const { backNavigating:
|
|
1597
|
-
if (
|
|
1598
|
-
|
|
1599
|
-
const i =
|
|
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;
|
|
1600
1647
|
i && (i.outgoingScreen = e, i.incomingScreen = t);
|
|
1601
|
-
const
|
|
1602
|
-
(c) => c.ref === (
|
|
1648
|
+
const a = this.screens.findIndex(
|
|
1649
|
+
(c) => c.ref === (r ? e : t)
|
|
1603
1650
|
);
|
|
1604
|
-
return
|
|
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();
|
|
1605
1652
|
}
|
|
1606
1653
|
}
|
|
1654
|
+
render() {
|
|
1655
|
+
return /* @__PURE__ */ G(Ke.div, { style: { display: "contents" }, children: super.render() });
|
|
1656
|
+
}
|
|
1607
1657
|
}
|
|
1608
|
-
function
|
|
1609
|
-
return H("Stack.Navigation"),
|
|
1610
|
-
}
|
|
1611
|
-
function sn() {
|
|
1612
|
-
return H("Stack.Router"), Pt();
|
|
1613
|
-
}
|
|
1614
|
-
function rn() {
|
|
1615
|
-
return H("Stack.Route"), St();
|
|
1658
|
+
function Be() {
|
|
1659
|
+
return H("Stack.Navigation"), Rt();
|
|
1616
1660
|
}
|
|
1617
|
-
function
|
|
1618
|
-
return H("Stack.
|
|
1661
|
+
function ln() {
|
|
1662
|
+
return H("Stack.Router"), kt();
|
|
1619
1663
|
}
|
|
1620
|
-
function
|
|
1621
|
-
|
|
1622
|
-
const r = n.current;
|
|
1623
|
-
if (r)
|
|
1624
|
-
return r.addEventListener(t, e, s), () => {
|
|
1625
|
-
r.removeEventListener(t, e, s);
|
|
1626
|
-
};
|
|
1627
|
-
}, [n, t, e, s]);
|
|
1664
|
+
function dn() {
|
|
1665
|
+
return H("Stack.Route"), It();
|
|
1628
1666
|
}
|
|
1629
|
-
function
|
|
1630
|
-
|
|
1631
|
-
return n ?? t;
|
|
1667
|
+
function fn(n, t) {
|
|
1668
|
+
return H("Stack.Params"), Ft(n, t);
|
|
1632
1669
|
}
|
|
1633
|
-
function
|
|
1634
|
-
const
|
|
1635
|
-
(
|
|
1636
|
-
|
|
1637
|
-
i.isIntersecting &&
|
|
1670
|
+
function Ye(n, t, e = {}) {
|
|
1671
|
+
const r = V(
|
|
1672
|
+
(s) => {
|
|
1673
|
+
s.forEach((i) => {
|
|
1674
|
+
i.isIntersecting && t(i);
|
|
1638
1675
|
});
|
|
1639
1676
|
},
|
|
1640
|
-
[
|
|
1677
|
+
[t]
|
|
1641
1678
|
);
|
|
1642
|
-
return
|
|
1643
|
-
const
|
|
1644
|
-
return i &&
|
|
1645
|
-
i &&
|
|
1679
|
+
return U(() => {
|
|
1680
|
+
const s = new IntersectionObserver(r, e), i = n.current;
|
|
1681
|
+
return i && s.observe(i), () => {
|
|
1682
|
+
i && s.unobserve(i);
|
|
1646
1683
|
};
|
|
1647
|
-
}, [
|
|
1684
|
+
}, [r, n, e]), n;
|
|
1648
1685
|
}
|
|
1649
|
-
function
|
|
1650
|
-
const
|
|
1651
|
-
const
|
|
1652
|
-
|
|
1653
|
-
};
|
|
1654
|
-
return
|
|
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;
|
|
1655
1698
|
}
|
|
1656
|
-
function
|
|
1699
|
+
function vn({
|
|
1657
1700
|
preload: n,
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
navigation: i,
|
|
1663
|
-
onClick: o,
|
|
1664
|
-
preloadBehaviour: c = {
|
|
1701
|
+
params: t,
|
|
1702
|
+
searchParams: e = t,
|
|
1703
|
+
config: r,
|
|
1704
|
+
preloadBehaviour: s = {
|
|
1665
1705
|
type: "onsight"
|
|
1666
1706
|
},
|
|
1667
|
-
children:
|
|
1668
|
-
...
|
|
1707
|
+
children: i,
|
|
1708
|
+
...a
|
|
1669
1709
|
}) {
|
|
1670
|
-
const
|
|
1671
|
-
|
|
1672
|
-
|
|
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 });
|
|
1673
1715
|
},
|
|
1674
|
-
|
|
1675
|
-
),
|
|
1676
|
-
|
|
1677
|
-
|
|
1716
|
+
u ? s : {}
|
|
1717
|
+
), Xe(
|
|
1718
|
+
d,
|
|
1719
|
+
() => {
|
|
1720
|
+
!l || !d.current || c.preload(d.current.href, { params: t, config: r });
|
|
1678
1721
|
},
|
|
1679
|
-
|
|
1680
|
-
)
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
if (t && d.canGoBack())
|
|
1687
|
-
a(d.previous.url?.href);
|
|
1688
|
-
else if (r) {
|
|
1689
|
-
const S = me(e), N = new URL(r, d.baseURL);
|
|
1690
|
-
N.search = S, a(N.href);
|
|
1691
|
-
}
|
|
1692
|
-
}, [r, e, d, t]);
|
|
1693
|
-
const b = (S) => {
|
|
1694
|
-
t ? (S.preventDefault(), d.goBack()) : s === "replace" && r && (S.preventDefault(), d.replace(r)), o?.(S);
|
|
1695
|
-
};
|
|
1696
|
-
let x;
|
|
1697
|
-
switch (c?.type) {
|
|
1698
|
-
case "onhover":
|
|
1699
|
-
x = m;
|
|
1700
|
-
break;
|
|
1701
|
-
case "onsight":
|
|
1702
|
-
x = p;
|
|
1703
|
-
break;
|
|
1704
|
-
default:
|
|
1705
|
-
x = null;
|
|
1706
|
-
}
|
|
1707
|
-
return /* @__PURE__ */ ft(
|
|
1708
|
-
"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,
|
|
1709
1729
|
{
|
|
1710
|
-
|
|
1711
|
-
"data-router-id":
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
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
|
|
1717
1739
|
}
|
|
1718
1740
|
);
|
|
1719
1741
|
}
|
|
1720
|
-
const
|
|
1742
|
+
const gn = [
|
|
1721
1743
|
{
|
|
1722
1744
|
transform: "translateX(100vw)"
|
|
1723
1745
|
},
|
|
1724
1746
|
{
|
|
1725
1747
|
transform: "translateX(0vw)"
|
|
1726
1748
|
}
|
|
1727
|
-
],
|
|
1749
|
+
], Ce = [
|
|
1728
1750
|
{
|
|
1729
1751
|
transform: "translateX(100vw)"
|
|
1730
1752
|
},
|
|
1731
1753
|
{
|
|
1732
1754
|
transform: "translateX(0vw)"
|
|
1733
1755
|
}
|
|
1734
|
-
],
|
|
1756
|
+
], pn = [
|
|
1735
1757
|
{
|
|
1736
1758
|
transform: "translateX(0vw)"
|
|
1737
1759
|
},
|
|
1738
1760
|
{
|
|
1739
1761
|
transform: "translateX(-50vw)"
|
|
1740
1762
|
}
|
|
1741
|
-
],
|
|
1763
|
+
], Ue = [
|
|
1742
1764
|
{
|
|
1743
1765
|
transform: "translateX(0vw)"
|
|
1744
1766
|
},
|
|
1745
1767
|
{
|
|
1746
1768
|
transform: "translateX(calc(100vw * -0.3))"
|
|
1747
1769
|
}
|
|
1748
|
-
],
|
|
1770
|
+
], mn = [
|
|
1749
1771
|
{
|
|
1750
1772
|
transform: "translateX(-100vw)"
|
|
1751
1773
|
},
|
|
1752
1774
|
{
|
|
1753
1775
|
transform: "translateX(0vw)"
|
|
1754
1776
|
}
|
|
1755
|
-
],
|
|
1777
|
+
], He = [
|
|
1756
1778
|
{
|
|
1757
1779
|
transform: "translateX(-100vw)"
|
|
1758
1780
|
},
|
|
1759
1781
|
{
|
|
1760
1782
|
transform: "translateX(0vw)"
|
|
1761
1783
|
}
|
|
1762
|
-
],
|
|
1784
|
+
], yn = [
|
|
1763
1785
|
{
|
|
1764
1786
|
transform: "translateX(0vw)"
|
|
1765
1787
|
},
|
|
1766
1788
|
{
|
|
1767
1789
|
transform: "translateX(50vw)"
|
|
1768
1790
|
}
|
|
1769
|
-
],
|
|
1791
|
+
], Ae = [
|
|
1770
1792
|
{
|
|
1771
1793
|
transform: "translateX(0vw)"
|
|
1772
1794
|
},
|
|
1773
1795
|
{
|
|
1774
1796
|
transform: "translateX(calc(100vw * 0.3))"
|
|
1775
1797
|
}
|
|
1776
|
-
],
|
|
1798
|
+
], wn = [
|
|
1777
1799
|
{
|
|
1778
1800
|
transform: "translateY(100vh)"
|
|
1779
1801
|
},
|
|
1780
1802
|
{
|
|
1781
1803
|
transform: "translateY(0vh)"
|
|
1782
1804
|
}
|
|
1783
|
-
],
|
|
1805
|
+
], je = [
|
|
1784
1806
|
{
|
|
1785
1807
|
transform: "translateY(100vh)"
|
|
1786
1808
|
},
|
|
1787
1809
|
{
|
|
1788
1810
|
transform: "translateY(0vh)"
|
|
1789
1811
|
}
|
|
1790
|
-
],
|
|
1812
|
+
], En = [
|
|
1791
1813
|
{
|
|
1792
1814
|
transform: "translateY(0vh)"
|
|
1793
1815
|
},
|
|
1794
1816
|
{
|
|
1795
1817
|
transform: "translateY(-50vh)"
|
|
1796
1818
|
}
|
|
1797
|
-
],
|
|
1819
|
+
], Pn = [
|
|
1798
1820
|
{
|
|
1799
1821
|
transform: "translateY(-100vh)"
|
|
1800
1822
|
},
|
|
1801
1823
|
{
|
|
1802
1824
|
transform: "translateY(0vh)"
|
|
1803
1825
|
}
|
|
1804
|
-
],
|
|
1826
|
+
], bn = [
|
|
1805
1827
|
{
|
|
1806
1828
|
transform: "translateY(0vh)"
|
|
1807
1829
|
},
|
|
1808
1830
|
{
|
|
1809
1831
|
transform: "translateY(50vh)"
|
|
1810
1832
|
}
|
|
1811
|
-
],
|
|
1833
|
+
], Sn = [
|
|
1812
1834
|
{
|
|
1813
1835
|
transform: "scale(0.85)",
|
|
1814
1836
|
opacity: 0
|
|
@@ -1817,7 +1839,7 @@ const cn = [
|
|
|
1817
1839
|
transform: "scale(1)",
|
|
1818
1840
|
opacity: 1
|
|
1819
1841
|
}
|
|
1820
|
-
],
|
|
1842
|
+
], _n = [
|
|
1821
1843
|
{
|
|
1822
1844
|
transform: "scale(1)",
|
|
1823
1845
|
opacity: 1
|
|
@@ -1826,21 +1848,21 @@ const cn = [
|
|
|
1826
1848
|
transform: "scale(1.15)",
|
|
1827
1849
|
opacity: 0
|
|
1828
1850
|
}
|
|
1829
|
-
],
|
|
1851
|
+
], Ln = [
|
|
1830
1852
|
{
|
|
1831
1853
|
opacity: 0
|
|
1832
1854
|
},
|
|
1833
1855
|
{
|
|
1834
1856
|
opacity: 1
|
|
1835
1857
|
}
|
|
1836
|
-
],
|
|
1858
|
+
], Tn = [
|
|
1837
1859
|
{
|
|
1838
1860
|
opacity: 1
|
|
1839
1861
|
},
|
|
1840
1862
|
{
|
|
1841
1863
|
opacity: 0
|
|
1842
1864
|
}
|
|
1843
|
-
],
|
|
1865
|
+
], Ne = [
|
|
1844
1866
|
{
|
|
1845
1867
|
opacity: 0,
|
|
1846
1868
|
transform: "translateY(calc(100vh * 0.08))"
|
|
@@ -1857,7 +1879,7 @@ const cn = [
|
|
|
1857
1879
|
opacity: 1,
|
|
1858
1880
|
transform: "translateY(0vh)"
|
|
1859
1881
|
}
|
|
1860
|
-
],
|
|
1882
|
+
], $e = [
|
|
1861
1883
|
{
|
|
1862
1884
|
opacity: 0,
|
|
1863
1885
|
transform: "translateY(96vw)"
|
|
@@ -1866,7 +1888,7 @@ const cn = [
|
|
|
1866
1888
|
opacity: 1,
|
|
1867
1889
|
transform: "translateY(0vw)"
|
|
1868
1890
|
}
|
|
1869
|
-
],
|
|
1891
|
+
], Ve = [
|
|
1870
1892
|
{
|
|
1871
1893
|
opacity: 0,
|
|
1872
1894
|
transform: "translateY(0vw)"
|
|
@@ -1875,21 +1897,21 @@ const cn = [
|
|
|
1875
1897
|
opacity: 1,
|
|
1876
1898
|
transform: "translateY(-96vw)"
|
|
1877
1899
|
}
|
|
1878
|
-
],
|
|
1900
|
+
], We = [
|
|
1879
1901
|
{
|
|
1880
1902
|
transform: "translateY(100vh)"
|
|
1881
1903
|
},
|
|
1882
1904
|
{
|
|
1883
1905
|
transform: "translateY(0vh)"
|
|
1884
1906
|
}
|
|
1885
|
-
],
|
|
1907
|
+
], Ge = [
|
|
1886
1908
|
{
|
|
1887
1909
|
transform: "translateY(0vh)"
|
|
1888
1910
|
},
|
|
1889
1911
|
{
|
|
1890
1912
|
transform: "translateY(-2vh)"
|
|
1891
1913
|
}
|
|
1892
|
-
],
|
|
1914
|
+
], qe = [
|
|
1893
1915
|
{
|
|
1894
1916
|
transform: "scale(0.85)",
|
|
1895
1917
|
opacity: 0
|
|
@@ -1906,7 +1928,7 @@ const cn = [
|
|
|
1906
1928
|
transform: "scale(1)",
|
|
1907
1929
|
opacity: 1
|
|
1908
1930
|
}
|
|
1909
|
-
],
|
|
1931
|
+
], ze = [
|
|
1910
1932
|
{
|
|
1911
1933
|
transform: "scale(1)",
|
|
1912
1934
|
opacity: 1
|
|
@@ -1923,7 +1945,7 @@ const cn = [
|
|
|
1923
1945
|
transform: "scale(1.075)",
|
|
1924
1946
|
opacity: 0
|
|
1925
1947
|
}
|
|
1926
|
-
],
|
|
1948
|
+
], Ze = [
|
|
1927
1949
|
{
|
|
1928
1950
|
transform: "translateY(calc(100vh * 0.8))",
|
|
1929
1951
|
opacity: 0
|
|
@@ -1933,205 +1955,184 @@ const cn = [
|
|
|
1933
1955
|
opacity: 1
|
|
1934
1956
|
}
|
|
1935
1957
|
];
|
|
1936
|
-
function
|
|
1958
|
+
function Je(n) {
|
|
1937
1959
|
return (t) => 1 - n(1 - t);
|
|
1938
1960
|
}
|
|
1939
|
-
function
|
|
1961
|
+
function Qe(n) {
|
|
1940
1962
|
return (t) => Math.pow(t, n);
|
|
1941
1963
|
}
|
|
1942
|
-
const
|
|
1943
|
-
...
|
|
1964
|
+
const st = {
|
|
1965
|
+
...Bt({
|
|
1944
1966
|
mass: 3,
|
|
1945
1967
|
stiffness: 1e3,
|
|
1946
1968
|
damping: 500,
|
|
1947
1969
|
velocity: 0,
|
|
1948
1970
|
steps: 200
|
|
1949
1971
|
})
|
|
1950
|
-
},
|
|
1972
|
+
}, gt = {
|
|
1951
1973
|
duration: 350,
|
|
1952
|
-
easing:
|
|
1953
|
-
},
|
|
1974
|
+
easing: q(Je(Qe(5)))
|
|
1975
|
+
}, tn = {
|
|
1954
1976
|
duration: 150,
|
|
1955
1977
|
easing: "linear"
|
|
1956
|
-
},
|
|
1978
|
+
}, en = {
|
|
1957
1979
|
duration: 425,
|
|
1958
1980
|
easing: "cubic-bezier(0.35, 0.45, 0, 1)"
|
|
1959
|
-
},
|
|
1981
|
+
}, nn = {
|
|
1960
1982
|
duration: 400,
|
|
1961
1983
|
easing: "cubic-bezier(0.35, 0.45, 0, 1)"
|
|
1962
|
-
},
|
|
1984
|
+
}, rn = {
|
|
1963
1985
|
duration: 250,
|
|
1964
|
-
easing:
|
|
1965
|
-
},
|
|
1986
|
+
easing: q((n) => Math.cos((n + 1) * Math.PI) / 2 + 0.5)
|
|
1987
|
+
}, sn = {
|
|
1966
1988
|
duration: 200,
|
|
1967
|
-
easing:
|
|
1989
|
+
easing: q((n) => n === 1 ? 1 : Math.pow(n, 2))
|
|
1968
1990
|
};
|
|
1969
|
-
function
|
|
1991
|
+
function Rn({ ref: n, direction: t, playbackRate: e, index: r }) {
|
|
1970
1992
|
let i = [
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
][
|
|
1974
|
-
const
|
|
1993
|
+
Ue,
|
|
1994
|
+
Ce
|
|
1995
|
+
][r];
|
|
1996
|
+
const a = {
|
|
1975
1997
|
playbackRate: e,
|
|
1976
1998
|
fill: "forwards",
|
|
1977
|
-
...
|
|
1999
|
+
...st
|
|
1978
2000
|
};
|
|
1979
|
-
return t === "reverse" && (i = i.toReversed()), new KeyframeEffect(n, i,
|
|
2001
|
+
return t === "reverse" && (i = i.toReversed()), new KeyframeEffect(n, i, a);
|
|
1980
2002
|
}
|
|
1981
|
-
function
|
|
2003
|
+
function kn({ ref: n, direction: t, playbackRate: e, index: r }) {
|
|
1982
2004
|
let i = [
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
][
|
|
1986
|
-
const
|
|
2005
|
+
Ae,
|
|
2006
|
+
He
|
|
2007
|
+
][r];
|
|
2008
|
+
const a = {
|
|
1987
2009
|
playbackRate: e,
|
|
1988
2010
|
fill: "forwards",
|
|
1989
|
-
...
|
|
2011
|
+
...st
|
|
1990
2012
|
};
|
|
1991
|
-
return t === "reverse" && (i = i.toReversed()), new KeyframeEffect(n, i,
|
|
2013
|
+
return t === "reverse" && (i = i.toReversed()), new KeyframeEffect(n, i, a);
|
|
1992
2014
|
}
|
|
1993
|
-
function
|
|
1994
|
-
let
|
|
1995
|
-
const
|
|
2015
|
+
function In({ ref: n, direction: t, playbackRate: e }) {
|
|
2016
|
+
let r = je;
|
|
2017
|
+
const s = {
|
|
1996
2018
|
playbackRate: e,
|
|
1997
2019
|
fill: "forwards",
|
|
1998
|
-
...
|
|
2020
|
+
...st
|
|
1999
2021
|
};
|
|
2000
|
-
return t === "reverse" && (
|
|
2022
|
+
return t === "reverse" && (r = r.toReversed()), new KeyframeEffect(n, r, s);
|
|
2001
2023
|
}
|
|
2002
|
-
function
|
|
2003
|
-
let
|
|
2004
|
-
const
|
|
2024
|
+
function Fn({ ref: n, direction: t, playbackRate: e }) {
|
|
2025
|
+
let r = Ne;
|
|
2026
|
+
const s = {
|
|
2005
2027
|
playbackRate: e,
|
|
2006
2028
|
fill: "forwards",
|
|
2007
|
-
...
|
|
2029
|
+
...gt
|
|
2008
2030
|
};
|
|
2009
|
-
return t === "reverse" && (
|
|
2031
|
+
return t === "reverse" && (r = r.toReversed()), new KeyframeEffect(n, r, s);
|
|
2010
2032
|
}
|
|
2011
|
-
function
|
|
2012
|
-
let
|
|
2013
|
-
e ===
|
|
2014
|
-
const
|
|
2015
|
-
playbackRate:
|
|
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 = {
|
|
2037
|
+
playbackRate: r,
|
|
2016
2038
|
fill: "forwards",
|
|
2017
2039
|
...i
|
|
2018
2040
|
};
|
|
2019
|
-
return t === "reverse" && (
|
|
2041
|
+
return t === "reverse" && (s = s.toReversed()), new KeyframeEffect(n, s, a);
|
|
2020
2042
|
}
|
|
2021
|
-
function
|
|
2043
|
+
function Dn({ ref: n, direction: t, index: e, playbackRate: r }) {
|
|
2022
2044
|
const i = [
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
][e],
|
|
2045
|
+
Ge,
|
|
2046
|
+
We
|
|
2047
|
+
][e], a = {
|
|
2026
2048
|
direction: t,
|
|
2027
|
-
playbackRate:
|
|
2049
|
+
playbackRate: r,
|
|
2028
2050
|
fill: "forwards",
|
|
2029
|
-
...
|
|
2051
|
+
...en
|
|
2030
2052
|
};
|
|
2031
|
-
return new KeyframeEffect(n, i,
|
|
2053
|
+
return new KeyframeEffect(n, i, a);
|
|
2032
2054
|
}
|
|
2033
|
-
function
|
|
2034
|
-
const
|
|
2035
|
-
|
|
2036
|
-
|
|
2055
|
+
function On({ ref: n, direction: t, index: e, playbackRate: r }) {
|
|
2056
|
+
const s = [
|
|
2057
|
+
Ve,
|
|
2058
|
+
$e
|
|
2037
2059
|
];
|
|
2038
2060
|
let i;
|
|
2039
|
-
e ===
|
|
2040
|
-
let
|
|
2061
|
+
e === C ? i = tn : i = gt;
|
|
2062
|
+
let a = s[e];
|
|
2041
2063
|
const c = {
|
|
2042
|
-
playbackRate:
|
|
2064
|
+
playbackRate: r,
|
|
2043
2065
|
fill: "forwards",
|
|
2044
2066
|
...i
|
|
2045
2067
|
};
|
|
2046
|
-
return t === "reverse" && (
|
|
2068
|
+
return t === "reverse" && (a = a.toReversed()), new KeyframeEffect(n, a, c);
|
|
2047
2069
|
}
|
|
2048
|
-
function
|
|
2070
|
+
function Mn({ ref: n, direction: t, index: e, playbackRate: r }) {
|
|
2049
2071
|
const i = [
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
][e],
|
|
2072
|
+
ze,
|
|
2073
|
+
qe
|
|
2074
|
+
][e], a = {
|
|
2053
2075
|
direction: t,
|
|
2054
|
-
playbackRate:
|
|
2076
|
+
playbackRate: r,
|
|
2055
2077
|
fill: "forwards",
|
|
2056
|
-
...
|
|
2078
|
+
...nn
|
|
2057
2079
|
};
|
|
2058
|
-
return new KeyframeEffect(n, i,
|
|
2059
|
-
}
|
|
2060
|
-
function kn({ disabled: n, children: t, ...e }) {
|
|
2061
|
-
const s = q(null), r = dt((i) => {
|
|
2062
|
-
n || (i.stopPropagation(), i.preventDefault());
|
|
2063
|
-
}, [n]);
|
|
2064
|
-
return G(
|
|
2065
|
-
s,
|
|
2066
|
-
"swipestart",
|
|
2067
|
-
r
|
|
2068
|
-
), /* @__PURE__ */ ft(
|
|
2069
|
-
"div",
|
|
2070
|
-
{
|
|
2071
|
-
ref: s,
|
|
2072
|
-
className: "gesture-region",
|
|
2073
|
-
"data-disabled": n,
|
|
2074
|
-
style: { display: "contents" },
|
|
2075
|
-
...e,
|
|
2076
|
-
children: t
|
|
2077
|
-
}
|
|
2078
|
-
);
|
|
2080
|
+
return new KeyframeEffect(n, i, a);
|
|
2079
2081
|
}
|
|
2080
2082
|
export {
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
sn 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
|
|
2136
2137
|
};
|
|
2137
2138
|
//# sourceMappingURL=index.js.map
|