@react-motion-router/core 2.0.0-beta.sha-352239f → 2.0.0-beta.sha-44fbfa2
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 +271 -268
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as it, Component as st, createRef as K, lazy as le, cloneElement as Ht, Suspense as
|
|
1
|
+
import { jsx as b, jsxs as Gt, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as it, Component as st, createRef as K, lazy as le, cloneElement as Ht, Suspense as bt, isValidElement as Xt, Children as jt, useContext as vt, useDebugValue as ce, useRef as he, useEffect as ue, useCallback as de } from "react";
|
|
3
3
|
const Zt = it(null);
|
|
4
|
-
class
|
|
4
|
+
class ze extends st {
|
|
5
5
|
ref = K();
|
|
6
6
|
static contextType = Zt;
|
|
7
7
|
componentDidMount() {
|
|
@@ -44,7 +44,7 @@ class Be extends st {
|
|
|
44
44
|
this.ref.current && (this.ref.current.style.visibility = "visible");
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ b(
|
|
48
48
|
"div",
|
|
49
49
|
{
|
|
50
50
|
ref: this.ref,
|
|
@@ -55,7 +55,7 @@ class Be extends st {
|
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Tt(s, t) {
|
|
59
59
|
s.endsWith("**") || (s += "**");
|
|
60
60
|
const e = window.location.origin, n = new URLPattern(s, e).exec(t, e);
|
|
61
61
|
if (!n)
|
|
@@ -65,7 +65,7 @@ function bt(s, t) {
|
|
|
65
65
|
}
|
|
66
66
|
function Yt(s, t, e = `${window.location.origin}/`, n = !0) {
|
|
67
67
|
n || (s = s.toLowerCase(), t = t.toLowerCase());
|
|
68
|
-
const r =
|
|
68
|
+
const r = Tt(e, t)?.href;
|
|
69
69
|
if (!r)
|
|
70
70
|
return null;
|
|
71
71
|
const a = new URLPattern({ baseURL: r, pathname: s }).exec({ pathname: t, baseURL: r }), o = a?.pathname.groups ?? {};
|
|
@@ -74,34 +74,34 @@ function Yt(s, t, e = `${window.location.origin}/`, n = !0) {
|
|
|
74
74
|
caseSensitive: n
|
|
75
75
|
} : null;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function Ge(s, t, e = window.location.origin) {
|
|
78
78
|
return s.some(({ pattern: n, caseSensitive: r }) => Yt(n, t, e, r));
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function pe(s, t = window) {
|
|
81
81
|
return new Promise((e) => {
|
|
82
82
|
queueMicrotask(() => e(
|
|
83
83
|
t.dispatchEvent(s)
|
|
84
84
|
));
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function He(s) {
|
|
88
88
|
const t = le(s);
|
|
89
89
|
return t.load = async () => (t.module ??= await s(), t.module), t;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function Xe() {
|
|
92
92
|
return !!window.navigation;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function Ze() {
|
|
95
95
|
return !!globalThis.URLPattern;
|
|
96
96
|
}
|
|
97
|
-
async function
|
|
97
|
+
async function Ye() {
|
|
98
98
|
const { URLPattern: s } = await import(
|
|
99
99
|
/*webpackIgnore: true*/
|
|
100
100
|
"urlpattern-polyfill"
|
|
101
101
|
);
|
|
102
102
|
globalThis.URLPattern = s;
|
|
103
103
|
}
|
|
104
|
-
async function
|
|
104
|
+
async function _e() {
|
|
105
105
|
const { applyPolyfill: s } = await import(
|
|
106
106
|
/*webpackIgnore: true*/
|
|
107
107
|
"@virtualstate/navigation"
|
|
@@ -114,50 +114,50 @@ async function Xe() {
|
|
|
114
114
|
persistState: !0
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
-
async function
|
|
117
|
+
async function fe(s) {
|
|
118
118
|
const t = [];
|
|
119
119
|
for (const e of s)
|
|
120
120
|
t.push(await e);
|
|
121
121
|
return t;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function me(s) {
|
|
124
124
|
return s.replace(/-([a-z])/g, (t) => t[1].toUpperCase());
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Je(s, t) {
|
|
127
127
|
return Ht(s, t);
|
|
128
128
|
}
|
|
129
|
-
class
|
|
129
|
+
class ge extends Event {
|
|
130
130
|
constructor() {
|
|
131
131
|
super("transition-start");
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
class
|
|
134
|
+
class ye extends Event {
|
|
135
135
|
constructor() {
|
|
136
136
|
super("transition-cancel");
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
class
|
|
139
|
+
class ve extends Event {
|
|
140
140
|
constructor() {
|
|
141
141
|
super("transition-end");
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
class
|
|
144
|
+
class Qe extends Event {
|
|
145
145
|
constructor() {
|
|
146
146
|
super("motion-progress-start");
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
class
|
|
149
|
+
class we extends Event {
|
|
150
150
|
progress;
|
|
151
151
|
constructor(t) {
|
|
152
152
|
super("motion-progress"), this.progress = t;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
class
|
|
155
|
+
class tn extends Event {
|
|
156
156
|
constructor() {
|
|
157
157
|
super("motion-progress-end");
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
class
|
|
160
|
+
class Ee extends Event {
|
|
161
161
|
#t = "load";
|
|
162
162
|
#e = !1;
|
|
163
163
|
#c = !0;
|
|
@@ -200,7 +200,7 @@ class ye extends Event {
|
|
|
200
200
|
navigationType: "load"
|
|
201
201
|
});
|
|
202
202
|
const n = t?.handler?.();
|
|
203
|
-
n && this.#n.push(n), this.#n.length === 1 &&
|
|
203
|
+
n && this.#n.push(n), this.#n.length === 1 && fe(this.#n).then(() => {
|
|
204
204
|
this.#l = !0, window.removeEventListener("navigate", this.#r), e?.();
|
|
205
205
|
});
|
|
206
206
|
}
|
|
@@ -236,7 +236,7 @@ class ye extends Event {
|
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
const _t = it(null);
|
|
239
|
-
class
|
|
239
|
+
class be extends st {
|
|
240
240
|
ref = K();
|
|
241
241
|
static contextType = _t;
|
|
242
242
|
index = 0;
|
|
@@ -257,11 +257,11 @@ class ve extends st {
|
|
|
257
257
|
this.props.navigation.removeEventListener("transition-start", this.onAnimationStart), this.props.navigation.removeEventListener("transition-end", this.onAnimationEnd), this.props.navigation.removeEventListener("transition-cancel", this.onAnimationEnd);
|
|
258
258
|
}
|
|
259
259
|
get animationEffect() {
|
|
260
|
-
const t = this.props.animation, { animation: e, direction: n, hasUAVisualTransition: r } = this.context, { timeline: a, playbackRate: o } = e, { index:
|
|
260
|
+
const t = this.props.animation, { animation: e, direction: n, hasUAVisualTransition: r } = this.context, { timeline: a, playbackRate: o } = e, { index: l, exiting: m, ref: p } = this;
|
|
261
261
|
return t?.({
|
|
262
|
-
ref:
|
|
263
|
-
index:
|
|
264
|
-
exiting:
|
|
262
|
+
ref: p.current,
|
|
263
|
+
index: l,
|
|
264
|
+
exiting: m,
|
|
265
265
|
timeline: a,
|
|
266
266
|
direction: n,
|
|
267
267
|
playbackRate: o,
|
|
@@ -273,7 +273,7 @@ class ve extends st {
|
|
|
273
273
|
}
|
|
274
274
|
render() {
|
|
275
275
|
const t = this.props.renderAs, e = this.props.focused ? void 0 : "";
|
|
276
|
-
return /* @__PURE__ */
|
|
276
|
+
return /* @__PURE__ */ b(
|
|
277
277
|
t,
|
|
278
278
|
{
|
|
279
279
|
id: this.props.id,
|
|
@@ -293,7 +293,7 @@ class ve extends st {
|
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
const Jt = it(null), wt = it(null), Qt = it(null);
|
|
296
|
-
class
|
|
296
|
+
class Te {
|
|
297
297
|
id;
|
|
298
298
|
nodes = /* @__PURE__ */ new Map();
|
|
299
299
|
getScreenRect = () => new DOMRect();
|
|
@@ -328,7 +328,7 @@ class we {
|
|
|
328
328
|
return !this.nodes.size;
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
|
-
class
|
|
331
|
+
class Se extends st {
|
|
332
332
|
sharedElementScene;
|
|
333
333
|
#t = K();
|
|
334
334
|
ref = K();
|
|
@@ -341,7 +341,7 @@ class Ee extends st {
|
|
|
341
341
|
elementType: "div"
|
|
342
342
|
};
|
|
343
343
|
constructor(t, e) {
|
|
344
|
-
super(t), this.sharedElementScene = new
|
|
344
|
+
super(t), this.sharedElementScene = new Te(`${this.name}-shared-element-scene`), this.sharedElementScene.getScreenRect = () => this.ref.current?.getBoundingClientRect() || new DOMRect(), this.nestedRouterData = { parentScreen: this, parentRouter: e };
|
|
345
345
|
}
|
|
346
346
|
setParams(t) {
|
|
347
347
|
this.setState(({ params: e }) => ({ params: { ...e, ...t } }));
|
|
@@ -364,8 +364,8 @@ class Ee extends st {
|
|
|
364
364
|
async load(t) {
|
|
365
365
|
let e = this.props.component, n = this.props.config?.header?.component, r = this.props.config?.footer?.component, a;
|
|
366
366
|
F(e) ? a = await e.load() : a = { default: e }, F(n) && await n.load(), F(r) && await r.load();
|
|
367
|
-
const o = this.context.navigation,
|
|
368
|
-
return await this.props.config?.onLoad?.({ navigation: o, route:
|
|
367
|
+
const o = this.context.navigation, l = this.routeProp, m = !1;
|
|
368
|
+
return await this.props.config?.onLoad?.({ navigation: o, route: l, signal: t, preloading: m }), a;
|
|
369
369
|
}
|
|
370
370
|
async onExited(t) {
|
|
371
371
|
await this.routeProp.config.onExited?.({
|
|
@@ -407,8 +407,8 @@ class Ee extends st {
|
|
|
407
407
|
}
|
|
408
408
|
render() {
|
|
409
409
|
const t = this.context.navigation, e = this.routeProp, n = this.props.component, r = e.config.header?.component, a = e.config.footer?.component;
|
|
410
|
-
return /* @__PURE__ */
|
|
411
|
-
|
|
410
|
+
return /* @__PURE__ */ b(
|
|
411
|
+
be,
|
|
412
412
|
{
|
|
413
413
|
ref: this.#t,
|
|
414
414
|
renderAs: this.state.elementType,
|
|
@@ -416,7 +416,7 @@ class Ee extends st {
|
|
|
416
416
|
animation: e.config.animation,
|
|
417
417
|
navigation: t,
|
|
418
418
|
focused: this.state.focused,
|
|
419
|
-
children: /* @__PURE__ */
|
|
419
|
+
children: /* @__PURE__ */ b(
|
|
420
420
|
"div",
|
|
421
421
|
{
|
|
422
422
|
id: `${this.context.id}-${this.name}`,
|
|
@@ -429,10 +429,10 @@ class Ee extends st {
|
|
|
429
429
|
flexDirection: "column",
|
|
430
430
|
pointerEvents: "inherit"
|
|
431
431
|
},
|
|
432
|
-
children: /* @__PURE__ */
|
|
433
|
-
/* @__PURE__ */
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
-
/* @__PURE__ */
|
|
432
|
+
children: /* @__PURE__ */ b(Zt.Provider, { value: this.sharedElementScene, children: /* @__PURE__ */ b(Qt.Provider, { value: e, children: /* @__PURE__ */ Gt(Jt.Provider, { value: this.nestedRouterData, children: [
|
|
433
|
+
/* @__PURE__ */ b(bt, { fallback: /* @__PURE__ */ b(Z, { component: e.config.header?.fallback, route: e, navigation: t }), children: /* @__PURE__ */ b(Z, { component: r, route: e, navigation: t }) }),
|
|
434
|
+
/* @__PURE__ */ b(bt, { fallback: /* @__PURE__ */ b(Z, { component: this.props.fallback, route: e, navigation: t }), children: /* @__PURE__ */ b(Z, { component: n, route: e, navigation: t }) }),
|
|
435
|
+
/* @__PURE__ */ b(bt, { fallback: /* @__PURE__ */ b(Z, { component: e.config.footer?.fallback, route: e, navigation: t }), children: /* @__PURE__ */ b(Z, { component: a, route: e, navigation: t }) })
|
|
436
436
|
] }) }) })
|
|
437
437
|
}
|
|
438
438
|
)
|
|
@@ -443,7 +443,7 @@ class Ee extends st {
|
|
|
443
443
|
function Z({ component: s, route: t, navigation: e }) {
|
|
444
444
|
F(s) && s.module?.default && (s = s.module.default);
|
|
445
445
|
const n = s ?? null;
|
|
446
|
-
return typeof n == "function" || te(n) ? /* @__PURE__ */
|
|
446
|
+
return typeof n == "function" || te(n) ? /* @__PURE__ */ b(
|
|
447
447
|
n,
|
|
448
448
|
{
|
|
449
449
|
navigation: e,
|
|
@@ -452,10 +452,10 @@ function Z({ component: s, route: t, navigation: e }) {
|
|
|
452
452
|
) : Xt(n) ? Ht(n, {
|
|
453
453
|
navigation: e,
|
|
454
454
|
route: t
|
|
455
|
-
}) : /* @__PURE__ */
|
|
455
|
+
}) : /* @__PURE__ */ b(oe, { children: n });
|
|
456
456
|
}
|
|
457
|
-
function
|
|
458
|
-
return Xt(s) ? Object.getPrototypeOf(s.type) ===
|
|
457
|
+
function Re(s) {
|
|
458
|
+
return Xt(s) ? Object.getPrototypeOf(s.type) === Se : !1;
|
|
459
459
|
}
|
|
460
460
|
function te(s) {
|
|
461
461
|
return typeof s == "object" && s !== null && s.$$typeof === Symbol.for("react.lazy");
|
|
@@ -463,17 +463,17 @@ function te(s) {
|
|
|
463
463
|
function F(s) {
|
|
464
464
|
return te(s) && "load" in s;
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function ke(s) {
|
|
467
467
|
return "style" in s && s.style instanceof CSSStyleDeclaration;
|
|
468
468
|
}
|
|
469
|
-
var
|
|
469
|
+
var xe = Object.defineProperty, Ce = (s, t, e) => t in s ? xe(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, j = (s, t, e) => (Ce(s, typeof t != "symbol" ? t + "" : t, e), e), Wt = (s, t, e) => {
|
|
470
470
|
if (!t.has(s))
|
|
471
471
|
throw TypeError("Cannot " + e);
|
|
472
|
-
}, i = (s, t, e) => (Wt(s, t, "read from private field"), e ? e.call(s) : t.get(s)),
|
|
472
|
+
}, i = (s, t, e) => (Wt(s, t, "read from private field"), e ? e.call(s) : t.get(s)), g = (s, t, e) => {
|
|
473
473
|
if (t.has(s))
|
|
474
474
|
throw TypeError("Cannot add the same private member more than once");
|
|
475
475
|
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
476
|
-
},
|
|
476
|
+
}, c = (s, t, e, n) => (Wt(s, t, "write to private field"), n ? n.call(s, e) : t.set(s, e), e), f = (s, t, e) => (Wt(s, t, "access private method"), e);
|
|
477
477
|
const ut = {
|
|
478
478
|
delay: 0,
|
|
479
479
|
direction: "normal",
|
|
@@ -483,7 +483,7 @@ const ut = {
|
|
|
483
483
|
fill: "auto",
|
|
484
484
|
iterationStart: 0,
|
|
485
485
|
iterations: 1
|
|
486
|
-
}, It = 1e3,
|
|
486
|
+
}, It = 1e3, Me = window.Animation, dt = window.KeyframeEffect;
|
|
487
487
|
function Ft(s) {
|
|
488
488
|
return Array.isArray(s);
|
|
489
489
|
}
|
|
@@ -493,7 +493,7 @@ function H(s) {
|
|
|
493
493
|
function h(s, t) {
|
|
494
494
|
return H(s) || typeof s == "number" ? s : (t || ([t] = Object.keys(s.type())), s.to(t).value);
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function Le(s, t = ut) {
|
|
497
497
|
let { duration: e = "auto", iterations: n = 1, playbackRate: r = 1 } = t;
|
|
498
498
|
if (H(s))
|
|
499
499
|
return s;
|
|
@@ -508,11 +508,11 @@ function xe(s, t = ut) {
|
|
|
508
508
|
e = e.to("ms").value;
|
|
509
509
|
else if (typeof e == "string")
|
|
510
510
|
throw new TypeError("Unknown effect duration keyword.");
|
|
511
|
-
const { delay: a = 0, endDelay: o = 0 } = t,
|
|
511
|
+
const { delay: a = 0, endDelay: o = 0 } = t, l = e / n * n / Math.abs(r), m = a + l + o;
|
|
512
512
|
return rt(
|
|
513
513
|
s.to("percent").value,
|
|
514
514
|
[0, 100],
|
|
515
|
-
[0,
|
|
515
|
+
[0, m]
|
|
516
516
|
);
|
|
517
517
|
}
|
|
518
518
|
function Et(s) {
|
|
@@ -529,31 +529,31 @@ function Bt(s, t) {
|
|
|
529
529
|
const e = t.length - 1, n = Math.floor(s * e), r = t[n], a = t[Math.min(n + 1, e)], o = s * e - n;
|
|
530
530
|
return r + o * (a - r);
|
|
531
531
|
}
|
|
532
|
-
function
|
|
532
|
+
function Pe(s, t, e) {
|
|
533
533
|
let n = 0, r = 0;
|
|
534
534
|
for (const [a, o] of Object.entries(s)) {
|
|
535
|
-
const { min:
|
|
536
|
-
n += w, r +=
|
|
535
|
+
const { min: l, max: m } = t, p = e[a] ?? 1, w = (o - l[a]) / (m[a] - l[a]) * p;
|
|
536
|
+
n += w, r += p;
|
|
537
537
|
}
|
|
538
538
|
return n / r;
|
|
539
539
|
}
|
|
540
540
|
function rt(s, t, e, n = {}) {
|
|
541
541
|
let r;
|
|
542
542
|
if (typeof s == "number" && Ft(t)) {
|
|
543
|
-
const o = { x: t[0] },
|
|
544
|
-
t = { min: o, max:
|
|
543
|
+
const o = { x: t[0] }, l = { x: t[1] };
|
|
544
|
+
t = { min: o, max: l }, s = { x: s };
|
|
545
545
|
} else
|
|
546
546
|
throw new TypeError("Input and input range must have the same dimensions.");
|
|
547
|
-
if (r =
|
|
547
|
+
if (r = Pe(s, t, n), r = De(r, 0, 1), Ft(e))
|
|
548
548
|
return Bt(r, e);
|
|
549
549
|
const a = {};
|
|
550
550
|
for (const o of Object.keys(e.min)) {
|
|
551
|
-
const
|
|
552
|
-
a[o] = Bt(r,
|
|
551
|
+
const l = e.min[o], m = e.max[o], p = [l, m];
|
|
552
|
+
a[o] = Bt(r, p);
|
|
553
553
|
}
|
|
554
554
|
return a;
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function De(s, t, e) {
|
|
557
557
|
return s < t ? t : e && s > e ? e : s;
|
|
558
558
|
}
|
|
559
559
|
function $t(s) {
|
|
@@ -564,37 +564,37 @@ function $t(s) {
|
|
|
564
564
|
delay: r = 0,
|
|
565
565
|
endDelay: a = 0,
|
|
566
566
|
localTime: o = null,
|
|
567
|
-
progress:
|
|
567
|
+
progress: l = null
|
|
568
568
|
} = s;
|
|
569
|
-
const
|
|
569
|
+
const m = new CSSUnitValue(100, "percent");
|
|
570
570
|
if (t === "auto")
|
|
571
571
|
t = It, r = 0, a = 0;
|
|
572
572
|
else if (t instanceof CSSNumericValue)
|
|
573
573
|
t = t.to("ms").value;
|
|
574
574
|
else if (typeof t == "string")
|
|
575
575
|
throw TypeError("Unknown effect duration keyword.");
|
|
576
|
-
const
|
|
577
|
-
t = new CSSUnitValue(
|
|
578
|
-
const
|
|
579
|
-
return o !== null && (
|
|
576
|
+
const p = t / e, w = p * e / Math.abs(n), k = r + w + a;
|
|
577
|
+
t = new CSSUnitValue(p / k * 100, "percent");
|
|
578
|
+
const T = CSS.percent(t.to("percent").value * e / Math.abs(n));
|
|
579
|
+
return o !== null && (l = h(o, "percent") / m.value), {
|
|
580
580
|
...s,
|
|
581
|
-
progress:
|
|
582
|
-
activeDuration:
|
|
581
|
+
progress: l,
|
|
582
|
+
activeDuration: T,
|
|
583
583
|
duration: t,
|
|
584
584
|
iterations: e,
|
|
585
585
|
delay: r,
|
|
586
586
|
endDelay: a,
|
|
587
|
-
endTime:
|
|
587
|
+
endTime: m
|
|
588
588
|
};
|
|
589
589
|
}
|
|
590
590
|
function ee(s, t) {
|
|
591
591
|
let { activeDuration: e = 0, localTime: n = null, endTime: r = 1 / 0, delay: a = 0 } = s;
|
|
592
592
|
if (r = h(r), e = h(e), n = h(n), n == null || n === void 0)
|
|
593
593
|
return "idle";
|
|
594
|
-
const o = Math.max(Math.min(a, r), 0),
|
|
595
|
-
return n < o || t === "backwards" && n === o ? "before" : n >
|
|
594
|
+
const o = Math.max(Math.min(a, r), 0), l = Math.max(Math.min(a + e, r), 0);
|
|
595
|
+
return n < o || t === "backwards" && n === o ? "before" : n > l || t === "forwards" && n === l ? "after" : "active";
|
|
596
596
|
}
|
|
597
|
-
function
|
|
597
|
+
function Ae(s, t) {
|
|
598
598
|
let { localTime: e = null, delay: n = 0, activeDuration: r = 0, fill: a } = s;
|
|
599
599
|
if (r = h(r), e = h(e), e == null || e === void 0)
|
|
600
600
|
return null;
|
|
@@ -609,30 +609,30 @@ function Le(s, t) {
|
|
|
609
609
|
return null;
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function Ne(s, t, e) {
|
|
613
613
|
const { duration: n = 0, iterations: r = 1, iterationStart: a = 0 } = s;
|
|
614
614
|
if (typeof n != "number")
|
|
615
615
|
throw new TypeError("Duration cannot be unresolved");
|
|
616
616
|
let o = 0;
|
|
617
617
|
return n === 0 ? t === "before" ? o = 0 : o = r : o = e / Et(n), o + a;
|
|
618
618
|
}
|
|
619
|
-
function
|
|
619
|
+
function Ue(s, t, e, n) {
|
|
620
620
|
const { iterations: r = 1, iterationStart: a = 0, activeDuration: o = 0 } = s;
|
|
621
621
|
if (H(e))
|
|
622
622
|
return null;
|
|
623
|
-
let
|
|
624
|
-
return e === 1 / 0 && (
|
|
623
|
+
let l = 0;
|
|
624
|
+
return e === 1 / 0 && (l = a % 1), l === 0 && (t === "active" || t === "after") && o === n && r !== 0 && (l = 1), l;
|
|
625
625
|
}
|
|
626
626
|
function ne(s, t) {
|
|
627
|
-
const { iterations: e = 1 } = s, n =
|
|
627
|
+
const { iterations: e = 1 } = s, n = Ae(s, t);
|
|
628
628
|
if (H(n))
|
|
629
629
|
return null;
|
|
630
630
|
if (t === "after" && e === 1 / 0)
|
|
631
631
|
return 1 / 0;
|
|
632
|
-
const r =
|
|
633
|
-
return
|
|
632
|
+
const r = Ne(s, t, n);
|
|
633
|
+
return Ue(s, t, r, n) === 1 ? Math.floor(r) - 1 : Math.floor(r);
|
|
634
634
|
}
|
|
635
|
-
class
|
|
635
|
+
class We extends Event {
|
|
636
636
|
constructor(t) {
|
|
637
637
|
super("update", { bubbles: !1, cancelable: !1, composed: !1 }), j(this, "currentTime"), this.currentTime = t;
|
|
638
638
|
}
|
|
@@ -640,7 +640,7 @@ class Ae extends Event {
|
|
|
640
640
|
var N, Y;
|
|
641
641
|
class E extends EventTarget {
|
|
642
642
|
constructor(t = { type: "swipe", axis: "x", rangeStart: 0, rangeEnd: window.screen.availWidth, source: document.body }) {
|
|
643
|
-
super(),
|
|
643
|
+
super(), g(this, N, void 0), g(this, Y, void 0), t.source.addEventListener(t.type, this.onGesture.bind(this)), c(this, Y, CSS.percent(0)), c(this, N, t);
|
|
644
644
|
}
|
|
645
645
|
onGesture(t) {
|
|
646
646
|
const e = i(this, N).source.getBoundingClientRect();
|
|
@@ -651,18 +651,18 @@ class E extends EventTarget {
|
|
|
651
651
|
};
|
|
652
652
|
switch (i(this, N).type) {
|
|
653
653
|
case "swipe": {
|
|
654
|
-
const { rangeStart: a, rangeEnd: o } = i(this, N),
|
|
654
|
+
const { rangeStart: a, rangeEnd: o } = i(this, N), l = i(this, N).axis;
|
|
655
655
|
n = rt(
|
|
656
|
-
r[
|
|
656
|
+
r[l],
|
|
657
657
|
[h(a, "px"), h(o, "px")],
|
|
658
658
|
[0, 100]
|
|
659
659
|
);
|
|
660
660
|
break;
|
|
661
661
|
}
|
|
662
662
|
case "pan": {
|
|
663
|
-
const { rangeStart: a, rangeEnd: o } = i(this, N), { x:
|
|
663
|
+
const { rangeStart: a, rangeEnd: o } = i(this, N), { x: l, y: m } = r;
|
|
664
664
|
n = rt(
|
|
665
|
-
{ x:
|
|
665
|
+
{ x: l, y: m },
|
|
666
666
|
{
|
|
667
667
|
min: { x: h(a.x, "px"), y: h(a.y, "px") },
|
|
668
668
|
max: { x: h(o.x, "px"), y: h(o.y, "px") }
|
|
@@ -673,9 +673,9 @@ class E extends EventTarget {
|
|
|
673
673
|
break;
|
|
674
674
|
}
|
|
675
675
|
case "pinch": {
|
|
676
|
-
const { rangeStart: a, rangeEnd: o } = i(this, N), { scale:
|
|
676
|
+
const { rangeStart: a, rangeEnd: o } = i(this, N), { scale: l } = t;
|
|
677
677
|
n = rt(
|
|
678
|
-
|
|
678
|
+
l,
|
|
679
679
|
[h(a, ""), h(o, "")],
|
|
680
680
|
// figure out which unit
|
|
681
681
|
[0, 100]
|
|
@@ -683,15 +683,15 @@ class E extends EventTarget {
|
|
|
683
683
|
break;
|
|
684
684
|
}
|
|
685
685
|
case "rotate": {
|
|
686
|
-
const { rangeStart: a, rangeEnd: o } = i(this, N), { rotation:
|
|
686
|
+
const { rangeStart: a, rangeEnd: o } = i(this, N), { rotation: l } = t;
|
|
687
687
|
n = rt(
|
|
688
|
-
|
|
688
|
+
l,
|
|
689
689
|
[h(a, "deg"), h(o, "deg")],
|
|
690
690
|
[0, 100]
|
|
691
691
|
);
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
|
-
|
|
694
|
+
c(this, Y, CSS.percent(n)), this.dispatchEvent(new We(i(this, Y)));
|
|
695
695
|
}
|
|
696
696
|
addEventListener(t, e, n) {
|
|
697
697
|
super.addEventListener(t, e, n);
|
|
@@ -711,7 +711,7 @@ const A = /* @__PURE__ */ new WeakMap();
|
|
|
711
711
|
var at;
|
|
712
712
|
class pt extends dt {
|
|
713
713
|
constructor(t, e = null) {
|
|
714
|
-
super(t),
|
|
714
|
+
super(t), g(this, at, null), c(this, at, e);
|
|
715
715
|
}
|
|
716
716
|
get parent() {
|
|
717
717
|
return i(this, at);
|
|
@@ -763,9 +763,9 @@ class pt extends dt {
|
|
|
763
763
|
}
|
|
764
764
|
at = /* @__PURE__ */ new WeakMap();
|
|
765
765
|
var U, _;
|
|
766
|
-
const
|
|
766
|
+
const Ie = class ft {
|
|
767
767
|
constructor(t) {
|
|
768
|
-
|
|
768
|
+
g(this, U, []), g(this, _, null), c(this, U, t.map((e) => (e instanceof ft ? c(e, _, this) : e instanceof dt && (e = new pt(e, this)), e)));
|
|
769
769
|
}
|
|
770
770
|
get parent() {
|
|
771
771
|
return i(this, _);
|
|
@@ -790,17 +790,17 @@ const Ne = class ft {
|
|
|
790
790
|
}
|
|
791
791
|
append(...t) {
|
|
792
792
|
t.forEach((e) => {
|
|
793
|
-
i(this, U).includes(e) || (e instanceof ft ?
|
|
793
|
+
i(this, U).includes(e) || (e instanceof ft ? c(e, _, this) : e instanceof dt && (e = new pt(e, this)), i(this, U).push(e));
|
|
794
794
|
});
|
|
795
795
|
}
|
|
796
796
|
prepend(...t) {
|
|
797
797
|
t.forEach((e) => {
|
|
798
|
-
i(this, U).includes(e) || (e instanceof ft ?
|
|
798
|
+
i(this, U).includes(e) || (e instanceof ft ? c(e, _, this) : e instanceof dt && (e = new pt(e, this)), i(this, U).unshift(e));
|
|
799
799
|
});
|
|
800
800
|
}
|
|
801
801
|
};
|
|
802
802
|
U = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap();
|
|
803
|
-
let Ot =
|
|
803
|
+
let Ot = Ie;
|
|
804
804
|
class nt {
|
|
805
805
|
constructor() {
|
|
806
806
|
j(this, "promise"), j(this, "state"), j(this, "nativeResolve"), j(this, "nativeReject"), this.state = "pending", this.nativeResolve = this.nativeReject = null, this.promise = new Promise((t, e) => {
|
|
@@ -818,9 +818,9 @@ class nt {
|
|
|
818
818
|
}
|
|
819
819
|
}
|
|
820
820
|
var J, St, ie;
|
|
821
|
-
class
|
|
821
|
+
class $e extends Ot {
|
|
822
822
|
constructor(t, e = ut) {
|
|
823
|
-
super(t),
|
|
823
|
+
super(t), g(this, St), g(this, J, void 0), c(this, J, {
|
|
824
824
|
...ut,
|
|
825
825
|
...e
|
|
826
826
|
});
|
|
@@ -836,8 +836,8 @@ class Ue extends Ot {
|
|
|
836
836
|
}
|
|
837
837
|
getComputedTiming() {
|
|
838
838
|
var t, e;
|
|
839
|
-
const n = this.getTiming(), r = { ...n }, { delay: a = 0 } = ((t = this.children.item(0)) == null ? void 0 : t.getComputedTiming()) ?? {}, { endDelay: o = 0, endTime:
|
|
840
|
-
n.delay = n.delay ? n.delay + a : a, n.endDelay = n.endDelay ? n.endDelay + o : o, r.endTime =
|
|
839
|
+
const n = this.getTiming(), r = { ...n }, { delay: a = 0 } = ((t = this.children.item(0)) == null ? void 0 : t.getComputedTiming()) ?? {}, { endDelay: o = 0, endTime: l = 0 } = ((e = this.children.item(this.children.length - 1)) == null ? void 0 : e.getComputedTiming()) ?? {};
|
|
840
|
+
n.delay = n.delay ? n.delay + a : a, n.endDelay = n.endDelay ? n.endDelay + o : o, r.endTime = l;
|
|
841
841
|
for (let C = 0; C < this.children.length; C++) {
|
|
842
842
|
const M = this.children.item(C);
|
|
843
843
|
if (!M)
|
|
@@ -848,14 +848,14 @@ class Ue extends Ot {
|
|
|
848
848
|
} = M.getComputedTiming();
|
|
849
849
|
r.activeDuration = r.activeDuration ? h(r.activeDuration, "ms") + h(Vt, "ms") : Vt, n.duration = n.duration instanceof CSSNumericValue ? n.duration.to("ms").value : n.duration, L = L instanceof CSSNumericValue ? L.to("ms").value : L, typeof L != "string" && (n.duration === "auto" ? n.duration = h(L, "ms") : typeof n.duration != "string" && (n.duration = n.duration ? n.duration + L : L));
|
|
850
850
|
}
|
|
851
|
-
const { timeline:
|
|
852
|
-
let { duration:
|
|
853
|
-
if (
|
|
851
|
+
const { timeline: m, startTime: p, currentTime: w } = A.get(this) ?? {}, k = m instanceof E ? "percent" : "ms";
|
|
852
|
+
let { duration: T = 0, iterations: X = 1 } = r;
|
|
853
|
+
if (T === "auto" && (T = 0), typeof T == "string")
|
|
854
854
|
throw new TypeError("Unknown effect duration keyword.");
|
|
855
|
-
return r.duration =
|
|
855
|
+
return r.duration = T, r.activeDuration = Et(T) * X, r.startTime = p ?? void 0, r.localTime = w, r.currentIteration = ne(r, ee(r, i(this, St, ie))), m instanceof E ? $t(r) : (m instanceof DocumentTimeline && (r.progress = w && h(w, k) / h(l, k)), r);
|
|
856
856
|
}
|
|
857
857
|
updateTiming(t) {
|
|
858
|
-
|
|
858
|
+
c(this, J, {
|
|
859
859
|
...i(this, J),
|
|
860
860
|
...t
|
|
861
861
|
});
|
|
@@ -872,12 +872,12 @@ J = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakSet(), ie = func
|
|
|
872
872
|
var d, x, ht, v, S, P, u, y, R, z, O, ot, W, mt, Rt, Q, lt, q, tt, kt, Kt, xt, qt, Ct, zt, B, G, ct, gt, Mt, I, V, D, $, yt, Lt, Pt;
|
|
873
873
|
const se = class extends EventTarget {
|
|
874
874
|
constructor(t, e) {
|
|
875
|
-
super(),
|
|
875
|
+
super(), g(this, mt), g(this, Q), g(this, q), g(this, kt), g(this, xt), g(this, Ct), g(this, B), g(this, gt), g(this, I), g(this, D), j(this, "id", ""), j(this, "oncancel", null), j(this, "onfinish", null), j(this, "onremove", null), g(this, d, void 0), g(this, x, void 0), g(this, ht, "active"), g(this, v, {
|
|
876
876
|
task: null,
|
|
877
877
|
playbackRate: null
|
|
878
|
-
}),
|
|
879
|
-
|
|
880
|
-
}),
|
|
878
|
+
}), g(this, S, new nt()), g(this, P, new nt()), g(this, u, null), g(this, y, null), g(this, R, []), g(this, z, null), g(this, O, !1), g(this, ot, 0), g(this, W, 1), g(this, ct, () => {
|
|
879
|
+
f(this, B, G).call(this);
|
|
880
|
+
}), g(this, yt, () => {
|
|
881
881
|
var n;
|
|
882
882
|
if (i(this, P).state !== "pending" || this.playState !== "finished")
|
|
883
883
|
return;
|
|
@@ -894,12 +894,12 @@ const se = class extends EventTarget {
|
|
|
894
894
|
}
|
|
895
895
|
);
|
|
896
896
|
requestAnimationFrame(() => {
|
|
897
|
-
var
|
|
898
|
-
this.dispatchEvent(o), (
|
|
897
|
+
var l;
|
|
898
|
+
this.dispatchEvent(o), (l = this.onfinish) == null || l.call(this, o);
|
|
899
899
|
});
|
|
900
|
-
}),
|
|
900
|
+
}), g(this, Lt, () => {
|
|
901
901
|
var n, r;
|
|
902
|
-
const a = this.currentTime, o = (n = this.timeline) == null ? void 0 : n.currentTime,
|
|
902
|
+
const a = this.currentTime, o = (n = this.timeline) == null ? void 0 : n.currentTime, l = new AnimationPlaybackEvent(
|
|
903
903
|
"cancel",
|
|
904
904
|
{
|
|
905
905
|
get currentTime() {
|
|
@@ -910,12 +910,12 @@ const se = class extends EventTarget {
|
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
912
|
);
|
|
913
|
-
this.dispatchEvent(
|
|
914
|
-
}),
|
|
913
|
+
this.dispatchEvent(l), (r = this.oncancel) == null || r.call(this, l);
|
|
914
|
+
}), g(this, Pt, () => {
|
|
915
915
|
var n;
|
|
916
916
|
const r = new Event("remove");
|
|
917
917
|
this.dispatchEvent(r), (n = this.onremove) == null || n.call(this, r);
|
|
918
|
-
}), i(this, S).resolve(this),
|
|
918
|
+
}), i(this, S).resolve(this), c(this, x, t ?? null), c(this, d, e ?? document.timeline), i(this, x) && A.set(i(this, x), this), f(this, gt, Mt).call(this), e instanceof E && e.addEventListener("update", i(this, ct));
|
|
919
919
|
}
|
|
920
920
|
reverse() {
|
|
921
921
|
var t;
|
|
@@ -934,28 +934,28 @@ const se = class extends EventTarget {
|
|
|
934
934
|
play() {
|
|
935
935
|
const t = this.playState === "paused" && this.pending;
|
|
936
936
|
let e = this.currentTime;
|
|
937
|
-
(i(this, v).playbackRate ?? this.playbackRate) === 0 && e === null &&
|
|
937
|
+
(i(this, v).playbackRate ?? this.playbackRate) === 0 && e === null && c(this, y, 0), e === null && c(this, O, !0), (this.playState === "finished" || t) && (c(this, u, null), c(this, y, null), c(this, O, !0)), i(this, y) && c(this, u, null), i(this, v).task && (i(this, v).task = null), !(i(this, u) !== null && i(this, y) === null && !t && i(this, v).playbackRate === null) && (f(this, B, G).call(this), f(this, Q, lt).call(this), i(this, v).task = "play", f(this, I, V).call(this, !1));
|
|
938
938
|
}
|
|
939
939
|
pause() {
|
|
940
|
-
this.playState !== "paused" && (this.currentTime === null &&
|
|
940
|
+
this.playState !== "paused" && (this.currentTime === null && c(this, O, !0), i(this, v).task && (i(this, v).task = null), f(this, Q, lt).call(this), i(this, v).task = "pause");
|
|
941
941
|
}
|
|
942
942
|
persist() {
|
|
943
|
-
i(this, R).forEach((t) => t.persist()),
|
|
943
|
+
i(this, R).forEach((t) => t.persist()), c(this, ht, "persisted");
|
|
944
944
|
}
|
|
945
945
|
finish() {
|
|
946
946
|
var t;
|
|
947
947
|
const { endTime: e = 0 } = ((t = this.effect) == null ? void 0 : t.getComputedTiming()) ?? {}, n = i(this, v).playbackRate ?? i(this, W);
|
|
948
948
|
if (n === 0 || n > 0 && e === 1 / 0)
|
|
949
949
|
throw new DOMException("InvalidStateError");
|
|
950
|
-
|
|
950
|
+
f(this, D, $).call(this);
|
|
951
951
|
let r;
|
|
952
|
-
if (n > 0 ? r = e : r = 0,
|
|
952
|
+
if (n > 0 ? r = e : r = 0, f(this, mt, Rt).call(this, r), this.startTime === null && i(this, d) !== null && i(this, d).currentTime !== null && r !== null) {
|
|
953
953
|
const a = i(this, d) instanceof E ? "percent" : "ms";
|
|
954
954
|
r = h(r, a);
|
|
955
955
|
const o = h(i(this, d).currentTime, a);
|
|
956
|
-
|
|
956
|
+
c(this, u, o - r / n);
|
|
957
957
|
}
|
|
958
|
-
i(this, v).task === "pause" && i(this, u) !== null && (
|
|
958
|
+
i(this, v).task === "pause" && i(this, u) !== null && (c(this, y, null), f(this, q, tt).call(this), i(this, S).resolve(this)), i(this, v).task === "play" && i(this, u) !== null && (f(this, q, tt).call(this), i(this, S).resolve(this)), f(this, I, V).call(this, !0), i(this, R).forEach((a) => a.finish());
|
|
959
959
|
}
|
|
960
960
|
commitStyles() {
|
|
961
961
|
i(this, R).forEach((t) => {
|
|
@@ -963,7 +963,7 @@ const se = class extends EventTarget {
|
|
|
963
963
|
});
|
|
964
964
|
}
|
|
965
965
|
cancel() {
|
|
966
|
-
this.playState !== "idle" && (
|
|
966
|
+
this.playState !== "idle" && (f(this, D, $).call(this), i(this, S).reject(new DOMException("The user aborted a request", "AbortError")), f(this, q, tt).call(this), c(this, S, new nt()), i(this, P).state === "pending" && i(this, P).reject(new DOMException("The user aborted a request", "AbortError")), c(this, P, new nt()), i(this, R).forEach((t) => t.cancel())), c(this, u, null), c(this, y, null);
|
|
967
967
|
}
|
|
968
968
|
updatePlaybackRate(t) {
|
|
969
969
|
var e;
|
|
@@ -973,17 +973,17 @@ const se = class extends EventTarget {
|
|
|
973
973
|
switch (n) {
|
|
974
974
|
case "idle":
|
|
975
975
|
case "paused":
|
|
976
|
-
|
|
976
|
+
f(this, D, $).call(this);
|
|
977
977
|
break;
|
|
978
978
|
case "finished": {
|
|
979
979
|
const r = i(this, d) instanceof E ? "percent" : "ms", a = ((e = i(this, d)) == null ? void 0 : e.currentTime) ?? null;
|
|
980
980
|
if (t === 0)
|
|
981
|
-
|
|
981
|
+
c(this, u, h(a, r));
|
|
982
982
|
else if (a !== null) {
|
|
983
983
|
let o = null;
|
|
984
|
-
o = (h(a, r) - (i(this, u) ?? 0)) * this.playbackRate, i(this, u) !== null && o !== null &&
|
|
984
|
+
o = (h(a, r) - (i(this, u) ?? 0)) * this.playbackRate, i(this, u) !== null && o !== null && c(this, u, (h(a, r) - o) / t);
|
|
985
985
|
}
|
|
986
|
-
|
|
986
|
+
f(this, D, $).call(this), f(this, I, V).call(this, !1), f(this, B, G).call(this);
|
|
987
987
|
break;
|
|
988
988
|
}
|
|
989
989
|
default:
|
|
@@ -997,19 +997,19 @@ const se = class extends EventTarget {
|
|
|
997
997
|
super.removeEventListener(t, e, n);
|
|
998
998
|
}
|
|
999
999
|
set playbackRate(t) {
|
|
1000
|
-
|
|
1000
|
+
c(this, W, t), i(this, R).forEach((e) => {
|
|
1001
1001
|
e.playbackRate *= t;
|
|
1002
1002
|
});
|
|
1003
1003
|
}
|
|
1004
1004
|
set startTime(t) {
|
|
1005
|
-
|
|
1005
|
+
c(this, u, h(t)), i(this, R).forEach((e) => e.startTime = t);
|
|
1006
1006
|
}
|
|
1007
1007
|
set currentTime(t) {
|
|
1008
1008
|
var e;
|
|
1009
1009
|
const n = i(this, d) instanceof E ? "percent" : "ms", r = h(((e = i(this, d)) == null ? void 0 : e.currentTime) ?? null, n);
|
|
1010
1010
|
if (H(t) && !H(r))
|
|
1011
1011
|
throw new TypeError("currentTime may not be changed from resolved to unresolved.");
|
|
1012
|
-
|
|
1012
|
+
c(this, O, !1), i(this, y) !== null || i(this, u) === null || r === null || this.playbackRate === 0 ? c(this, y, h(t, n)) : c(this, u, r - h(t, n) / this.playbackRate), (i(this, d) === null || r === null) && c(this, u, null), c(this, z, null), f(this, mt, Rt).call(this, t), i(this, v).task === "pause" && (c(this, y, h(t, n)), f(this, D, $).call(this), c(this, u, null), f(this, q, tt).call(this), i(this, S).resolve(this)), f(this, I, V).call(this, !0);
|
|
1013
1013
|
}
|
|
1014
1014
|
set timeline(t) {
|
|
1015
1015
|
var e, n;
|
|
@@ -1017,14 +1017,14 @@ const se = class extends EventTarget {
|
|
|
1017
1017
|
if (r === t)
|
|
1018
1018
|
return;
|
|
1019
1019
|
i(this, d) instanceof E && i(this, d).removeEventListener("update", i(this, ct));
|
|
1020
|
-
const a = this.playState, o = r instanceof E ? "percent" : "ms",
|
|
1021
|
-
if (
|
|
1022
|
-
|
|
1020
|
+
const a = this.playState, o = r instanceof E ? "percent" : "ms", l = h(this.currentTime, o), { progress: m = null, endTime: p = 0 } = ((e = i(this, x)) == null ? void 0 : e.getComputedTiming()) ?? {}, w = h(p, o), k = r instanceof E, T = t instanceof E, X = t instanceof DocumentTimeline, C = this.pending;
|
|
1021
|
+
if (T)
|
|
1022
|
+
c(this, d, t), t.addEventListener("update", i(this, ct)), f(this, D, $).call(this), c(this, O, !0), c(this, u, null), c(this, y, null), (a === "running" || a === "finished") && ((!i(this, S) || i(this, S).state === "resolved") && f(this, Q, lt).call(this), i(this, v).task = "play", i(this, R).forEach((M) => M.pause())), a === "paused" && m !== null && c(this, y, m * w), C && ((!i(this, S) || i(this, S).state === "resolved") && f(this, Q, lt).call(this), a === "paused" ? i(this, v).task = "pause" : i(this, v).task = "play"), i(this, u) !== null && c(this, y, null), f(this, I, V).call(this, !1);
|
|
1023
1023
|
else if (X) {
|
|
1024
|
-
if (
|
|
1025
|
-
if (
|
|
1024
|
+
if (c(this, d, t), k) {
|
|
1025
|
+
if (l !== null && m !== null) {
|
|
1026
1026
|
const { endTime: M = 0 } = ((n = i(this, x)) == null ? void 0 : n.getComputedTiming()) ?? {}, L = h(M, "ms");
|
|
1027
|
-
this.currentTime =
|
|
1027
|
+
this.currentTime = m * L;
|
|
1028
1028
|
}
|
|
1029
1029
|
switch (a) {
|
|
1030
1030
|
case "paused":
|
|
@@ -1040,11 +1040,11 @@ const se = class extends EventTarget {
|
|
|
1040
1040
|
}
|
|
1041
1041
|
set effect(t) {
|
|
1042
1042
|
if (t !== i(this, x)) {
|
|
1043
|
-
if (this.pending &&
|
|
1043
|
+
if (this.pending && f(this, q, tt).call(this), i(this, x) && A.delete(i(this, x)), t) {
|
|
1044
1044
|
const e = A.get(t);
|
|
1045
1045
|
e && (e.effect = null), A.set(t, this);
|
|
1046
1046
|
}
|
|
1047
|
-
|
|
1047
|
+
c(this, x, t), f(this, gt, Mt).call(this), f(this, I, V).call(this, !1);
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
1050
|
get ready() {
|
|
@@ -1104,11 +1104,11 @@ d = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), ht = /* @_
|
|
|
1104
1104
|
const e = h(((t = i(this, d)) == null ? void 0 : t.currentTime) ?? null);
|
|
1105
1105
|
if (s === null && e !== null)
|
|
1106
1106
|
throw new TypeError();
|
|
1107
|
-
s === null || e === null || (s = h(s),
|
|
1107
|
+
s === null || e === null || (s = h(s), c(this, O, !1), i(this, y) !== null || i(this, u) === null || i(this, d) instanceof E && i(this, d).phase === "inactive" || i(this, W) === 0 ? c(this, y, s) : c(this, u, e - s / i(this, W)), i(this, d) instanceof E && i(this, d).phase === "inactive" && c(this, u, null), c(this, z, null));
|
|
1108
1108
|
}, Q = /* @__PURE__ */ new WeakSet(), lt = function() {
|
|
1109
|
-
i(this, S).state !== "pending" &&
|
|
1109
|
+
i(this, S).state !== "pending" && c(this, S, new nt()), cancelAnimationFrame(i(this, ot)), c(this, ot, requestAnimationFrame(() => {
|
|
1110
1110
|
var s;
|
|
1111
|
-
(((s = i(this, d)) == null ? void 0 : s.currentTime) ?? null) !== null && (
|
|
1111
|
+
(((s = i(this, d)) == null ? void 0 : s.currentTime) ?? null) !== null && (f(this, Ct, zt).call(this), i(this, v).task === "play" && (i(this, u) !== null || i(this, y) !== null) ? f(this, kt, Kt).call(this) : i(this, v).task === "pause" && f(this, xt, qt).call(this), Promise.all(i(this, R).map((t) => t.finished)).then(i(this, yt)), Promise.all(i(this, R).map((t) => new Promise((e) => t.onremove = e))).then(i(this, Pt)), Promise.all(i(this, R).map((t) => new Promise((e) => t.oncancel = e))).then(i(this, Lt)).then(() => c(this, ht, "removed")));
|
|
1112
1112
|
}));
|
|
1113
1113
|
}, q = /* @__PURE__ */ new WeakSet(), tt = function() {
|
|
1114
1114
|
cancelAnimationFrame(i(this, ot)), i(this, v).task = null;
|
|
@@ -1119,36 +1119,36 @@ d = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), ht = /* @_
|
|
|
1119
1119
|
return;
|
|
1120
1120
|
const e = i(this, d) instanceof E ? "percent" : "ms";
|
|
1121
1121
|
if (i(this, y) !== null)
|
|
1122
|
-
|
|
1122
|
+
f(this, D, $).call(this), this.playbackRate === 0 ? c(this, u, h(t, e)) : (c(this, u, h(t, e) - i(this, y) / this.playbackRate), c(this, y, null));
|
|
1123
1123
|
else if (i(this, u) !== null && i(this, v).playbackRate !== null) {
|
|
1124
1124
|
const n = (h(t, e) - i(this, u)) * this.playbackRate;
|
|
1125
|
-
|
|
1125
|
+
f(this, D, $).call(this);
|
|
1126
1126
|
const r = this.playbackRate;
|
|
1127
|
-
r === 0 ? (
|
|
1127
|
+
r === 0 ? (c(this, y, null), c(this, u, h(t, e))) : c(this, u, h(t, e) - n / r);
|
|
1128
1128
|
}
|
|
1129
|
-
i(this, S).state === "pending" && i(this, S).resolve(this),
|
|
1129
|
+
i(this, S).state === "pending" && i(this, S).resolve(this), f(this, I, V).call(this, !1), f(this, B, G).call(this), i(this, v).task = null, this.timeline instanceof DocumentTimeline && i(this, R).forEach((n) => n.play());
|
|
1130
1130
|
}, xt = /* @__PURE__ */ new WeakSet(), qt = function() {
|
|
1131
1131
|
var s;
|
|
1132
1132
|
const t = ((s = this.timeline) == null ? void 0 : s.currentTime) ?? null;
|
|
1133
1133
|
if (t === null)
|
|
1134
1134
|
return;
|
|
1135
1135
|
const e = i(this, d) instanceof E ? "percent" : "ms", n = t;
|
|
1136
|
-
i(this, u) !== null && i(this, y) === null &&
|
|
1136
|
+
i(this, u) !== null && i(this, y) === null && c(this, y, (h(n, e) - i(this, u)) * this.playbackRate), f(this, D, $).call(this), c(this, u, null), i(this, S).resolve(this), f(this, I, V).call(this, !1), f(this, B, G).call(this), i(this, v).task = null, i(this, R).forEach((r) => r.pause());
|
|
1137
1137
|
}, Ct = /* @__PURE__ */ new WeakSet(), zt = function() {
|
|
1138
1138
|
if (i(this, O) && !(!i(this, d) || !i(this, d).currentTime) && !(this.playState === "idle" || this.playState === "paused" && i(this, y) !== null)) {
|
|
1139
1139
|
if (i(this, d) instanceof E) {
|
|
1140
1140
|
const s = i(this, v).playbackRate ?? this.playbackRate;
|
|
1141
|
-
|
|
1141
|
+
c(this, u, s >= 0 ? 0 : 100);
|
|
1142
1142
|
} else
|
|
1143
|
-
|
|
1144
|
-
|
|
1143
|
+
c(this, u, h(i(this, d).currentTime, "ms"));
|
|
1144
|
+
c(this, y, null);
|
|
1145
1145
|
}
|
|
1146
1146
|
}, B = /* @__PURE__ */ new WeakSet(), G = function() {
|
|
1147
1147
|
var s;
|
|
1148
1148
|
const t = ((s = i(this, d)) == null ? void 0 : s.currentTime) ?? null;
|
|
1149
1149
|
if (t === null)
|
|
1150
1150
|
return;
|
|
1151
|
-
const e = i(this, x), n = i(this, d) instanceof E ?
|
|
1151
|
+
const e = i(this, x), n = i(this, d) instanceof E ? Le(t, e?.getTiming()) : Et(t);
|
|
1152
1152
|
let r = null;
|
|
1153
1153
|
if (i(this, u) !== null) {
|
|
1154
1154
|
const a = h(t, "percent") === (this.playbackRate < 0 ? 0 : 100) ? this.playbackRate < 0 ? 1e-3 : -1e-3 : 0;
|
|
@@ -1165,7 +1165,7 @@ d = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), ht = /* @_
|
|
|
1165
1165
|
if (t instanceof Ot)
|
|
1166
1166
|
for (let n = 0; n < t.children.length; n++) {
|
|
1167
1167
|
const r = new se(t.children.item(n));
|
|
1168
|
-
if (t instanceof
|
|
1168
|
+
if (t instanceof $e && n > 0) {
|
|
1169
1169
|
const { endTime: a = null } = ((s = e[n - 1].effect) == null ? void 0 : s.getComputedTiming()) ?? {};
|
|
1170
1170
|
r.startTime = h(a, "ms");
|
|
1171
1171
|
}
|
|
@@ -1173,35 +1173,35 @@ d = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), ht = /* @_
|
|
|
1173
1173
|
}
|
|
1174
1174
|
else {
|
|
1175
1175
|
const n = i(this, d) instanceof E ? document.timeline : i(this, d);
|
|
1176
|
-
e.push(new
|
|
1176
|
+
e.push(new Me(t, n));
|
|
1177
1177
|
}
|
|
1178
|
-
|
|
1178
|
+
c(this, R, e);
|
|
1179
1179
|
}, I = /* @__PURE__ */ new WeakSet(), V = function(s) {
|
|
1180
1180
|
var t, e;
|
|
1181
1181
|
const n = ((t = i(this, d)) == null ? void 0 : t.currentTime) ?? null, r = i(this, d) instanceof E ? "percent" : "ms";
|
|
1182
1182
|
let a = h(this.currentTime, r);
|
|
1183
1183
|
if (a && i(this, u) !== null && !this.pending) {
|
|
1184
|
-
let { delay: o = 0, endDelay:
|
|
1184
|
+
let { delay: o = 0, endDelay: l = 0, iterations: m = 1, duration: p = "auto" } = ((e = i(this, x)) == null ? void 0 : e.getTiming()) ?? {};
|
|
1185
1185
|
const w = i(this, v).playbackRate ?? this.playbackRate;
|
|
1186
|
-
if (
|
|
1187
|
-
|
|
1188
|
-
else if (
|
|
1189
|
-
|
|
1190
|
-
else if (typeof
|
|
1186
|
+
if (p === "auto")
|
|
1187
|
+
p = i(this, d) instanceof E ? It : 0;
|
|
1188
|
+
else if (p instanceof CSSNumericValue)
|
|
1189
|
+
p = p.to("ms").value;
|
|
1190
|
+
else if (typeof p == "string")
|
|
1191
1191
|
throw new TypeError("Unknown effect duration keyword.");
|
|
1192
|
-
const k = o +
|
|
1193
|
-
let
|
|
1194
|
-
w > 0 && a >= k && i(this, z) !== null ? ((
|
|
1192
|
+
const k = o + p * m + l;
|
|
1193
|
+
let T = h(i(this, z), r);
|
|
1194
|
+
w > 0 && a >= k && i(this, z) !== null ? ((T === null || T < k) && (T = k), c(this, y, s ? a : T)) : w < 0 && a <= 0 ? ((T === null || T > 0) && (T = 0), c(this, y, s ? a : T)) : w !== 0 && (s && i(this, y) !== null && (n !== null ? c(this, u, h(n, r) - i(this, y) / w) : c(this, u, null)), c(this, y, null));
|
|
1195
1195
|
}
|
|
1196
|
-
|
|
1196
|
+
f(this, B, G).call(this), c(this, z, this.currentTime), this.playState === "finished" ? i(this, P).state === "pending" && i(this, yt).call(this) : i(this, P).state === "resolved" && c(this, P, new nt());
|
|
1197
1197
|
}, D = /* @__PURE__ */ new WeakSet(), $ = function() {
|
|
1198
1198
|
i(this, v).playbackRate && (this.playbackRate = i(this, v).playbackRate), i(this, v).playbackRate = null;
|
|
1199
1199
|
}, yt = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Pt = /* @__PURE__ */ new WeakMap();
|
|
1200
|
-
let
|
|
1200
|
+
let Oe = se;
|
|
1201
1201
|
var et, Dt, re;
|
|
1202
1202
|
class At extends Ot {
|
|
1203
1203
|
constructor(t, e = ut) {
|
|
1204
|
-
super(t),
|
|
1204
|
+
super(t), g(this, Dt), g(this, et, void 0), c(this, et, {
|
|
1205
1205
|
...ut,
|
|
1206
1206
|
...e
|
|
1207
1207
|
}), t.forEach((n) => n.updateTiming());
|
|
@@ -1222,22 +1222,22 @@ class At extends Ot {
|
|
|
1222
1222
|
if (!k)
|
|
1223
1223
|
continue;
|
|
1224
1224
|
let {
|
|
1225
|
-
delay:
|
|
1225
|
+
delay: T = 0,
|
|
1226
1226
|
endDelay: X = 0,
|
|
1227
1227
|
duration: C = "auto",
|
|
1228
1228
|
activeDuration: M = 0,
|
|
1229
1229
|
endTime: L = 0
|
|
1230
1230
|
} = k.getComputedTiming();
|
|
1231
|
-
t.delay = t.delay ? Math.min(t.delay,
|
|
1231
|
+
t.delay = t.delay ? Math.min(t.delay, T) : T, t.endDelay = t.endDelay ? Math.max(t.endDelay, X) : X, e.endTime = e.endTime ? Math.max(h(e.endTime, "ms"), h(L, "ms")) : L, e.activeDuration = e.activeDuration ? Math.max(h(e.activeDuration, "ms"), h(M, "ms")) : M, t.duration = t.duration instanceof CSSNumericValue ? t.duration.to("ms").value : t.duration, C = C instanceof CSSNumericValue ? C.to("ms").value : C, typeof C != "string" && (t.duration === "auto" ? t.duration = h(C, "ms") : typeof t.duration != "string" && (t.duration = t.duration ? Math.max(t.duration, C) : C));
|
|
1232
1232
|
}
|
|
1233
1233
|
const { timeline: n, startTime: r, currentTime: a } = A.get(this) ?? {}, o = n instanceof E ? "percent" : "ms";
|
|
1234
|
-
let { duration:
|
|
1235
|
-
if (
|
|
1234
|
+
let { duration: l = 0, iterations: m = 1, endTime: p = 0 } = e;
|
|
1235
|
+
if (l === "auto" && (l = 0), typeof l == "string")
|
|
1236
1236
|
throw new TypeError("Unknown effect duration keyword.");
|
|
1237
|
-
return e.duration =
|
|
1237
|
+
return e.duration = l, e.activeDuration = Et(l) * m, e.startTime = r ?? void 0, e.localTime = a, e.currentIteration = ne(e, ee(e, i(this, Dt, re))), n instanceof E ? $t(e) : (n instanceof DocumentTimeline && (e.progress = a && h(a, o) / h(p, o)), e);
|
|
1238
1238
|
}
|
|
1239
1239
|
updateTiming(t) {
|
|
1240
|
-
|
|
1240
|
+
c(this, et, {
|
|
1241
1241
|
...i(this, et),
|
|
1242
1242
|
...t
|
|
1243
1243
|
});
|
|
@@ -1251,7 +1251,7 @@ et = /* @__PURE__ */ new WeakMap(), Dt = /* @__PURE__ */ new WeakSet(), re = fun
|
|
|
1251
1251
|
const { playbackRate: s = 1 } = A.get(this) ?? {};
|
|
1252
1252
|
return s < 0 ? "backwards" : "forwards";
|
|
1253
1253
|
};
|
|
1254
|
-
class
|
|
1254
|
+
class Ve extends st {
|
|
1255
1255
|
ref = K();
|
|
1256
1256
|
#t = null;
|
|
1257
1257
|
#e = null;
|
|
@@ -1274,17 +1274,17 @@ class Ie extends st {
|
|
|
1274
1274
|
const n = {}, r = window.getComputedStyle(t);
|
|
1275
1275
|
for (const a of e) {
|
|
1276
1276
|
let o;
|
|
1277
|
-
a === "offset" ? o = "cssOffset" : a === "float" ? o = "cssFloat" : o =
|
|
1277
|
+
a === "offset" ? o = "cssOffset" : a === "float" ? o = "cssFloat" : o = me(a), n[o] = r.getPropertyValue(a);
|
|
1278
1278
|
}
|
|
1279
1279
|
return n;
|
|
1280
1280
|
}
|
|
1281
1281
|
copyStyles(t, e, n) {
|
|
1282
|
-
if (!
|
|
1282
|
+
if (!ke(t))
|
|
1283
1283
|
return;
|
|
1284
1284
|
const r = window.getComputedStyle(t);
|
|
1285
1285
|
for (const a of n) {
|
|
1286
|
-
const o = r.getPropertyValue(a),
|
|
1287
|
-
e.style.setProperty(a, o,
|
|
1286
|
+
const o = r.getPropertyValue(a), l = r.getPropertyPriority(a);
|
|
1287
|
+
e.style.setProperty(a, o, l);
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
1290
|
getAnimationEffect(t, e) {
|
|
@@ -1292,7 +1292,7 @@ class Ie extends st {
|
|
|
1292
1292
|
fill: "both",
|
|
1293
1293
|
duration: "auto",
|
|
1294
1294
|
easing: "ease"
|
|
1295
|
-
}, a = e.instance.transitionType, o = `translate(${t.rect.x}px, ${t.rect.y}px)`,
|
|
1295
|
+
}, a = e.instance.transitionType, o = `translate(${t.rect.x}px, ${t.rect.y}px)`, l = `translate(${e.rect.x}px, ${e.rect.y}px)`;
|
|
1296
1296
|
switch (a) {
|
|
1297
1297
|
case "fade":
|
|
1298
1298
|
n.push(
|
|
@@ -1300,7 +1300,7 @@ class Ie extends st {
|
|
|
1300
1300
|
t.clone,
|
|
1301
1301
|
[
|
|
1302
1302
|
{ transform: o, opacity: 1 },
|
|
1303
|
-
{ transform:
|
|
1303
|
+
{ transform: l, opacity: 0 }
|
|
1304
1304
|
],
|
|
1305
1305
|
r
|
|
1306
1306
|
)
|
|
@@ -1309,7 +1309,7 @@ class Ie extends st {
|
|
|
1309
1309
|
e.clone,
|
|
1310
1310
|
[
|
|
1311
1311
|
{ transform: o },
|
|
1312
|
-
{ transform:
|
|
1312
|
+
{ transform: l }
|
|
1313
1313
|
],
|
|
1314
1314
|
r
|
|
1315
1315
|
)
|
|
@@ -1322,7 +1322,7 @@ class Ie extends st {
|
|
|
1322
1322
|
[
|
|
1323
1323
|
{ transform: o, opacity: 1 },
|
|
1324
1324
|
{ opacity: 0, offset: 0.5 },
|
|
1325
|
-
{ transform:
|
|
1325
|
+
{ transform: l, opacity: 0 }
|
|
1326
1326
|
],
|
|
1327
1327
|
r
|
|
1328
1328
|
)
|
|
@@ -1332,7 +1332,7 @@ class Ie extends st {
|
|
|
1332
1332
|
[
|
|
1333
1333
|
{ transform: o, opacity: 0 },
|
|
1334
1334
|
{ opacity: 0, offset: 0.5 },
|
|
1335
|
-
{ transform:
|
|
1335
|
+
{ transform: l, opacity: 1 }
|
|
1336
1336
|
],
|
|
1337
1337
|
r
|
|
1338
1338
|
)
|
|
@@ -1344,7 +1344,7 @@ class Ie extends st {
|
|
|
1344
1344
|
t.clone,
|
|
1345
1345
|
[
|
|
1346
1346
|
{ transform: o, opacity: 1 },
|
|
1347
|
-
{ transform:
|
|
1347
|
+
{ transform: l, opacity: 0 }
|
|
1348
1348
|
],
|
|
1349
1349
|
r
|
|
1350
1350
|
)
|
|
@@ -1353,14 +1353,14 @@ class Ie extends st {
|
|
|
1353
1353
|
e.clone,
|
|
1354
1354
|
[
|
|
1355
1355
|
{ transform: o },
|
|
1356
|
-
{ transform:
|
|
1356
|
+
{ transform: l }
|
|
1357
1357
|
],
|
|
1358
1358
|
r
|
|
1359
1359
|
)
|
|
1360
1360
|
);
|
|
1361
1361
|
break;
|
|
1362
1362
|
case "morph": {
|
|
1363
|
-
const
|
|
1363
|
+
const m = Array.from(/* @__PURE__ */ new Set([...t.instance.styles, ...e.instance.styles]));
|
|
1364
1364
|
n.push(
|
|
1365
1365
|
new KeyframeEffect(
|
|
1366
1366
|
e.clone,
|
|
@@ -1373,8 +1373,8 @@ class Ie extends st {
|
|
|
1373
1373
|
},
|
|
1374
1374
|
{
|
|
1375
1375
|
...Object.fromEntries((e.instance.ref.current?.firstElementChild).attributeStyleMap),
|
|
1376
|
-
...this.getKeyframeProperties(e.instance.ref.current?.firstElementChild,
|
|
1377
|
-
transform:
|
|
1376
|
+
...this.getKeyframeProperties(e.instance.ref.current?.firstElementChild, m),
|
|
1377
|
+
transform: l,
|
|
1378
1378
|
width: `${e.rect.width}px`,
|
|
1379
1379
|
height: `${e.rect.height}px`
|
|
1380
1380
|
}
|
|
@@ -1394,26 +1394,26 @@ class Ie extends st {
|
|
|
1394
1394
|
t.previousScene = null, e.previousScene = t;
|
|
1395
1395
|
const n = new Array();
|
|
1396
1396
|
for (const [r, a] of Array.from(e.nodes.entries())) {
|
|
1397
|
-
const o = a.getBoundingClientRect(),
|
|
1398
|
-
if (!
|
|
1397
|
+
const o = a.getBoundingClientRect(), l = t.nodes.get(r);
|
|
1398
|
+
if (!l?.canTransition || !a.canTransition)
|
|
1399
1399
|
continue;
|
|
1400
|
-
const
|
|
1401
|
-
if (!w || !
|
|
1400
|
+
const m = l.getBoundingClientRect(), p = a.clone(), w = l.clone();
|
|
1401
|
+
if (!w || !p)
|
|
1402
1402
|
continue;
|
|
1403
|
-
const k = Array.from(/* @__PURE__ */ new Set([...
|
|
1404
|
-
a.transitionType !== "morph" ? (w.id = `${r}-start`, w.style.position = "absolute", w.style.gridArea = "1 / 1", w.style.margin = "0", this.copyStyles(
|
|
1405
|
-
const
|
|
1406
|
-
this.props.direction === "forwards" ? a.unhide() :
|
|
1403
|
+
const k = Array.from(/* @__PURE__ */ new Set([...l.styles, ...a.styles]));
|
|
1404
|
+
a.transitionType !== "morph" ? (w.id = `${r}-start`, w.style.position = "absolute", w.style.gridArea = "1 / 1", w.style.margin = "0", this.copyStyles(l.ref.current?.firstElementChild, w, k), this.copyStyles(a.ref.current?.firstElementChild, p, k), w.style.width = `${m.width}px`, w.style.height = `${m.height}px`, p.style.width = `${o.width}px`, p.style.height = `${o.height}px`, this.ref.current?.prepend(w)) : (this.copyStyles(l.ref.current?.firstElementChild, p, k), p.style.width = `${m.width}px`, p.style.height = `${m.height}px`), p.id = `${r}${a.transitionType === "morph" ? "" : "-end"}`, p.style.position = "absolute", p.style.gridArea = "1 / 1", p.style.margin = "0", this.ref.current?.prepend(p), l.hide(), a.hide();
|
|
1405
|
+
const T = async () => {
|
|
1406
|
+
this.props.direction === "forwards" ? a.unhide() : l.unhide(), p.remove(), w.remove();
|
|
1407
1407
|
};
|
|
1408
|
-
this.props.navigation.addEventListener("transition-end",
|
|
1409
|
-
{ instance:
|
|
1410
|
-
{ instance: a, clone:
|
|
1408
|
+
this.props.navigation.addEventListener("transition-end", T, { once: !0 }), this.props.navigation.addEventListener("transition-cancel", T, { once: !0 }), n.push(this.getAnimationEffect(
|
|
1409
|
+
{ instance: l, clone: w, rect: m },
|
|
1410
|
+
{ instance: a, clone: p, rect: o }
|
|
1411
1411
|
));
|
|
1412
1412
|
}
|
|
1413
1413
|
return new At(n);
|
|
1414
1414
|
}
|
|
1415
1415
|
render() {
|
|
1416
|
-
return /* @__PURE__ */
|
|
1416
|
+
return /* @__PURE__ */ b("dialog", { className: "shared-element-layer", ref: this.ref, style: {
|
|
1417
1417
|
maxWidth: "unset",
|
|
1418
1418
|
maxHeight: "unset",
|
|
1419
1419
|
width: "100vw",
|
|
@@ -1423,16 +1423,16 @@ class Ie extends st {
|
|
|
1423
1423
|
border: "none",
|
|
1424
1424
|
backgroundColor: "transparent",
|
|
1425
1425
|
isolation: "isolate"
|
|
1426
|
-
}, children: /* @__PURE__ */
|
|
1426
|
+
}, children: /* @__PURE__ */ b("style", { children: `
|
|
1427
1427
|
.shared-element-layer::backdrop {display: none}
|
|
1428
1428
|
.shared-element-layer[open] {display:grid}
|
|
1429
1429
|
` }) });
|
|
1430
1430
|
}
|
|
1431
1431
|
}
|
|
1432
1432
|
const ae = it(0);
|
|
1433
|
-
class
|
|
1433
|
+
class je extends st {
|
|
1434
1434
|
sharedElementTransitionLayer = K();
|
|
1435
|
-
animation = new
|
|
1435
|
+
animation = new Oe();
|
|
1436
1436
|
#t = "normal";
|
|
1437
1437
|
#e = new Array();
|
|
1438
1438
|
state = {
|
|
@@ -1444,16 +1444,16 @@ class $e extends st {
|
|
|
1444
1444
|
t && this.onProgress(t), this.animation.playState === "running" && requestAnimationFrame(this.onAnimationFrame.bind(this));
|
|
1445
1445
|
}
|
|
1446
1446
|
onTransitionCancel() {
|
|
1447
|
-
this.props.navigation.dispatchEvent(new
|
|
1447
|
+
this.props.navigation.dispatchEvent(new ye());
|
|
1448
1448
|
}
|
|
1449
1449
|
onTransitionStart() {
|
|
1450
|
-
this.props.navigation.dispatchEvent(new
|
|
1450
|
+
this.props.navigation.dispatchEvent(new ge()), this.onAnimationFrame();
|
|
1451
1451
|
}
|
|
1452
1452
|
onTransitionEnd() {
|
|
1453
|
-
this.props.navigation.dispatchEvent(new
|
|
1453
|
+
this.props.navigation.dispatchEvent(new ve());
|
|
1454
1454
|
}
|
|
1455
1455
|
onProgress(t) {
|
|
1456
|
-
this.setState({ progress: t }), this.props.navigation.dispatchEvent(new
|
|
1456
|
+
this.setState({ progress: t }), this.props.navigation.dispatchEvent(new we(t));
|
|
1457
1457
|
}
|
|
1458
1458
|
get screens() {
|
|
1459
1459
|
return this.#e;
|
|
@@ -1484,15 +1484,15 @@ class $e extends st {
|
|
|
1484
1484
|
}
|
|
1485
1485
|
render() {
|
|
1486
1486
|
return /* @__PURE__ */ Gt(_t.Provider, { value: this, children: [
|
|
1487
|
-
/* @__PURE__ */
|
|
1488
|
-
|
|
1487
|
+
/* @__PURE__ */ b(
|
|
1488
|
+
Ve,
|
|
1489
1489
|
{
|
|
1490
1490
|
ref: this.sharedElementTransitionLayer,
|
|
1491
1491
|
navigation: this.props.navigation,
|
|
1492
1492
|
direction: this.animation.playbackRate > 0 ? "forwards" : "backwards"
|
|
1493
1493
|
}
|
|
1494
1494
|
),
|
|
1495
|
-
/* @__PURE__ */
|
|
1495
|
+
/* @__PURE__ */ b(
|
|
1496
1496
|
"div",
|
|
1497
1497
|
{
|
|
1498
1498
|
className: "screen-transition-layer",
|
|
@@ -1504,7 +1504,7 @@ class $e extends st {
|
|
|
1504
1504
|
isolation: "isolate",
|
|
1505
1505
|
"--motion-progress": this.state.progress
|
|
1506
1506
|
},
|
|
1507
|
-
children: /* @__PURE__ */
|
|
1507
|
+
children: /* @__PURE__ */ b(ae.Provider, { value: this.state.progress, children: this.props.children })
|
|
1508
1508
|
}
|
|
1509
1509
|
)
|
|
1510
1510
|
] });
|
|
@@ -1524,7 +1524,7 @@ class Nt extends st {
|
|
|
1524
1524
|
super(t), this.parentScreen = e?.parentScreen ?? null, this.parent = e?.parentRouter ?? null, this.parent && (this.parent.child = this), this.isRoot && (Nt.rootRouterRef = new WeakRef(this));
|
|
1525
1525
|
}
|
|
1526
1526
|
componentDidMount() {
|
|
1527
|
-
this.isRoot && window.navigation.addEventListener("navigate", this.handleNavigationDispatch), this.loadDispatched || (window.navigation.dispatchEvent(new
|
|
1527
|
+
this.isRoot && window.navigation.addEventListener("navigate", this.handleNavigationDispatch), this.loadDispatched || (window.navigation.dispatchEvent(new Ee()), this.loadDispatched = !0);
|
|
1528
1528
|
}
|
|
1529
1529
|
componentWillUnmount() {
|
|
1530
1530
|
this.isRoot && window.navigation.removeEventListener("navigate", this.handleNavigationDispatch);
|
|
@@ -1544,7 +1544,7 @@ class Nt extends st {
|
|
|
1544
1544
|
}
|
|
1545
1545
|
dispatchEvent(t) {
|
|
1546
1546
|
const e = this.ref.current ?? void 0;
|
|
1547
|
-
return
|
|
1547
|
+
return pe(t, e);
|
|
1548
1548
|
}
|
|
1549
1549
|
addEventListener(t, e, n) {
|
|
1550
1550
|
return this.ref.current?.addEventListener(t, e, n);
|
|
@@ -1554,7 +1554,7 @@ class Nt extends st {
|
|
|
1554
1554
|
}
|
|
1555
1555
|
screenChildFromPathname(t) {
|
|
1556
1556
|
for (const e of jt.toArray(this.props.children)) {
|
|
1557
|
-
if (!
|
|
1557
|
+
if (!Re(e))
|
|
1558
1558
|
continue;
|
|
1559
1559
|
const n = Yt(
|
|
1560
1560
|
e.props.path,
|
|
@@ -1586,13 +1586,13 @@ class Nt extends st {
|
|
|
1586
1586
|
}
|
|
1587
1587
|
get baseURL() {
|
|
1588
1588
|
const t = this.isRoot ? window.location.pathname : this.parentScreen?.resolvedPathname, e = this.baseURLPattern.pathname;
|
|
1589
|
-
return
|
|
1589
|
+
return Tt(e, t);
|
|
1590
1590
|
}
|
|
1591
1591
|
get baseURLPattern() {
|
|
1592
1592
|
let t = window.location.origin + "/", e = this.props.config?.basePath;
|
|
1593
1593
|
if (e || (this.isRoot ? e = "/" : e = "."), this.parent && this.parentScreen) {
|
|
1594
1594
|
const { resolvedPathname: n = window.location.pathname, path: r } = this.parentScreen, a = this.parent.baseURL?.href, o = new URLPattern({ baseURL: a, pathname: r });
|
|
1595
|
-
t =
|
|
1595
|
+
t = Tt(
|
|
1596
1596
|
o.pathname,
|
|
1597
1597
|
n
|
|
1598
1598
|
).href;
|
|
@@ -1616,15 +1616,15 @@ class Nt extends st {
|
|
|
1616
1616
|
}
|
|
1617
1617
|
render() {
|
|
1618
1618
|
if (this.navigation)
|
|
1619
|
-
return /* @__PURE__ */
|
|
1619
|
+
return /* @__PURE__ */ b(
|
|
1620
1620
|
"div",
|
|
1621
1621
|
{
|
|
1622
1622
|
id: this.id,
|
|
1623
1623
|
className: "react-motion-router",
|
|
1624
1624
|
style: { width: "100%", height: "100%" },
|
|
1625
1625
|
ref: this.ref,
|
|
1626
|
-
children: /* @__PURE__ */
|
|
1627
|
-
|
|
1626
|
+
children: /* @__PURE__ */ b(wt.Provider, { value: this, children: /* @__PURE__ */ b(
|
|
1627
|
+
je,
|
|
1628
1628
|
{
|
|
1629
1629
|
ref: this.screenTransitionLayer,
|
|
1630
1630
|
navigation: this.navigation,
|
|
@@ -1636,7 +1636,7 @@ class Nt extends st {
|
|
|
1636
1636
|
);
|
|
1637
1637
|
}
|
|
1638
1638
|
}
|
|
1639
|
-
class
|
|
1639
|
+
class Fe {
|
|
1640
1640
|
#t = /* @__PURE__ */ new Map();
|
|
1641
1641
|
mutationObserver;
|
|
1642
1642
|
constructor() {
|
|
@@ -1691,7 +1691,7 @@ class Oe {
|
|
|
1691
1691
|
return;
|
|
1692
1692
|
e.removedNodes.forEach((n) => {
|
|
1693
1693
|
if (n.nodeName === "META") {
|
|
1694
|
-
const [r] = Array.from(n.attributes).filter((
|
|
1694
|
+
const [r] = Array.from(n.attributes).filter((l) => l.nodeName !== "content"), o = [r.nodeName, r.value].join("=");
|
|
1695
1695
|
this.#t.has(o) && this.#t.delete(o);
|
|
1696
1696
|
}
|
|
1697
1697
|
}), e.addedNodes.forEach((n) => {
|
|
@@ -1720,7 +1720,7 @@ class Oe {
|
|
|
1720
1720
|
}
|
|
1721
1721
|
class Ut {
|
|
1722
1722
|
static rootNavigatorRef = null;
|
|
1723
|
-
metaData = new
|
|
1723
|
+
metaData = new Fe();
|
|
1724
1724
|
constructor() {
|
|
1725
1725
|
const t = Ut.rootNavigatorRef?.deref();
|
|
1726
1726
|
(!t || !t.isInDocument) && (Ut.rootNavigatorRef = new WeakRef(this));
|
|
@@ -1753,73 +1753,76 @@ class Ut {
|
|
|
1753
1753
|
return !!document.getElementById(`${this.routerId}`);
|
|
1754
1754
|
}
|
|
1755
1755
|
}
|
|
1756
|
-
function
|
|
1756
|
+
function nn() {
|
|
1757
1757
|
const s = vt(wt);
|
|
1758
1758
|
if (s)
|
|
1759
1759
|
return s.navigation;
|
|
1760
1760
|
throw new Error("Router is null. You may be trying to call useNavigation outside a Router.");
|
|
1761
1761
|
}
|
|
1762
|
-
function
|
|
1762
|
+
function sn() {
|
|
1763
1763
|
return vt(wt);
|
|
1764
1764
|
}
|
|
1765
|
-
function
|
|
1765
|
+
function rn() {
|
|
1766
1766
|
return ce("Motion"), vt(ae);
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1768
|
+
function Be() {
|
|
1769
1769
|
const s = vt(Qt);
|
|
1770
1770
|
if (s)
|
|
1771
1771
|
return s;
|
|
1772
1772
|
throw new Error("Router is null. You may be trying to call useRoute outside a Router.");
|
|
1773
1773
|
}
|
|
1774
|
-
function
|
|
1775
|
-
const e =
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1774
|
+
function an(s, t) {
|
|
1775
|
+
const e = Be(), n = t instanceof Function ? t() : t, r = he(e);
|
|
1776
|
+
ue(() => {
|
|
1777
|
+
r.current = e;
|
|
1778
|
+
}, [e]);
|
|
1779
|
+
const a = de((l) => {
|
|
1780
|
+
const { params: m, setParams: p } = r.current;
|
|
1781
|
+
l instanceof Function && (l = l(m[s] ?? n)), p({ [s]: l });
|
|
1782
|
+
}, [n, s]);
|
|
1783
|
+
return [e.params[s] ?? n, a];
|
|
1781
1784
|
}
|
|
1782
|
-
const
|
|
1785
|
+
const on = 2147483647, ln = 100, cn = 0, hn = 0, un = 1;
|
|
1783
1786
|
export {
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1787
|
+
Ee as LoadEvent,
|
|
1788
|
+
un as MAX_NORM_PROGRESS,
|
|
1789
|
+
ln as MAX_PROGRESS,
|
|
1790
|
+
on as MAX_Z_INDEX,
|
|
1791
|
+
hn as MIN_NORM_PROGRESS,
|
|
1792
|
+
cn as MIN_PROGRESS,
|
|
1790
1793
|
ae as MotionContext,
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
+
tn as MotionProgressEndEvent,
|
|
1795
|
+
we as MotionProgressEvent,
|
|
1796
|
+
Qe as MotionProgressStartEvent,
|
|
1794
1797
|
Ut as NavigationBase,
|
|
1795
1798
|
Jt as NestedRouterContext,
|
|
1796
|
-
|
|
1799
|
+
fe as PromiseAllDynamic,
|
|
1797
1800
|
Nt as RouterBase,
|
|
1798
1801
|
wt as RouterContext,
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1802
|
+
Se as ScreenBase,
|
|
1803
|
+
ze as SharedElement,
|
|
1804
|
+
ye as TransitionCancelEvent,
|
|
1805
|
+
ve as TransitionEndEvent,
|
|
1806
|
+
ge as TransitionStartEvent,
|
|
1807
|
+
Je as cloneAndInject,
|
|
1808
|
+
pe as dispatchEvent,
|
|
1809
|
+
Ge as includesRoute,
|
|
1807
1810
|
F as isLazyExoticComponent,
|
|
1808
1811
|
te as isNativeLazyExoticComponent,
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1812
|
+
Xe as isNavigationSupported,
|
|
1813
|
+
ke as isStylableElement,
|
|
1814
|
+
Ze as isURLPatternSupported,
|
|
1815
|
+
Re as isValidScreenChild,
|
|
1816
|
+
He as lazy,
|
|
1814
1817
|
Yt as matchRoute,
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1818
|
+
_e as polyfillNavigation,
|
|
1819
|
+
Ye as polyfillURLPattern,
|
|
1820
|
+
Tt as resolveBaseURLFromPattern,
|
|
1821
|
+
me as toCamelCase,
|
|
1822
|
+
rn as useMotion,
|
|
1823
|
+
nn as useNavigationBase,
|
|
1824
|
+
an as useParamsBase,
|
|
1825
|
+
Be as useRouteBase,
|
|
1826
|
+
sn as useRouterBase
|
|
1824
1827
|
};
|
|
1825
1828
|
//# sourceMappingURL=index.js.map
|