@react-motion-router/core 1.3.6 → 1.4.1
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/Anchor.d.ts +1 -1
- package/build/AnimationLayer.d.ts +4 -4
- package/build/AnimationLayerData.d.ts +3 -2
- package/build/AnimationProvider.d.ts +8 -3
- package/build/GestureRegion.d.ts +1 -1
- package/build/GhostLayer.d.ts +3 -3
- package/build/RouteData.d.ts +2 -2
- package/build/RouterBase.d.ts +2 -2
- package/build/RouterData.d.ts +2 -2
- package/build/ScreenBase.d.ts +14 -9
- package/build/ScrollRestoration.d.ts +2 -2
- package/build/SharedElement.d.ts +3 -3
- package/build/common/types.d.ts +2 -1
- package/build/common/utils.d.ts +2 -1
- package/build/common/utils.js +1 -1
- package/build/index.js +1 -1
- package/package.json +1 -1
package/build/Anchor.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Component } from 'react';
|
|
2
2
|
import { SwipeEndEvent, SwipeEvent, SwipeStartEvent } from 'web-gesture-events';
|
|
3
3
|
import Navigation from './NavigationBase';
|
|
4
4
|
import { ScreenChild } from './index';
|
|
5
5
|
import { AnimationLayerDataContext } from './AnimationLayerData';
|
|
6
6
|
import { SwipeDirection } from './common/types';
|
|
7
|
-
export declare const Motion:
|
|
7
|
+
export declare const Motion: import("react").Context<number>;
|
|
8
8
|
interface AnimationLayerProps {
|
|
9
9
|
children: ScreenChild | ScreenChild[];
|
|
10
10
|
currentPath: string;
|
|
@@ -38,12 +38,12 @@ interface AnimationLayerState {
|
|
|
38
38
|
hysteresis: number;
|
|
39
39
|
disableDiscovery: boolean;
|
|
40
40
|
}
|
|
41
|
-
export default class AnimationLayer extends
|
|
41
|
+
export default class AnimationLayer extends Component<AnimationLayerProps, AnimationLayerState> {
|
|
42
42
|
private onSwipeStartListener;
|
|
43
43
|
private onSwipeListener;
|
|
44
44
|
private onSwipeEndListener;
|
|
45
45
|
private ref;
|
|
46
|
-
static contextType:
|
|
46
|
+
static contextType: import("react").Context<import("./AnimationLayerData").default>;
|
|
47
47
|
context: React.ContextType<typeof AnimationLayerDataContext>;
|
|
48
48
|
state: AnimationLayerState;
|
|
49
49
|
static getDerivedStateFromProps(nextProps: AnimationLayerProps, state: AnimationLayerState): Partial<AnimationLayerState> | null;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import AnimationProvider from './AnimationProvider';
|
|
3
3
|
import { RouterEventMap } from './common/types';
|
|
4
4
|
export default class AnimationLayerData {
|
|
5
5
|
private _play;
|
|
6
6
|
private _isPlaying;
|
|
7
|
+
private _isStarted;
|
|
7
8
|
private _currentScreen;
|
|
8
9
|
private _nextScreen;
|
|
9
10
|
private _onExit;
|
|
@@ -50,4 +51,4 @@ export default class AnimationLayerData {
|
|
|
50
51
|
get finished(): Promise<void>;
|
|
51
52
|
get started(): Promise<void>;
|
|
52
53
|
}
|
|
53
|
-
export declare const AnimationLayerDataContext:
|
|
54
|
+
export declare const AnimationLayerDataContext: import("react").Context<AnimationLayerData>;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { AnimationConfigSet, AnimationKeyframeEffectConfig, EasingFunction } from './common/types';
|
|
1
|
+
import { AnimationConfigSet, AnimationKeyframeEffectConfig, CustomElementType, EasingFunction } from './common/types';
|
|
3
2
|
import AnimationKeyframePresets from './Animations';
|
|
4
3
|
import NavigationBase from './NavigationBase';
|
|
4
|
+
import { Component, ElementType } from 'react';
|
|
5
5
|
interface AnimationProviderProps {
|
|
6
|
+
onRef: (ref: HTMLElement | null) => void;
|
|
6
7
|
onExit: Function;
|
|
8
|
+
onExited: Function;
|
|
7
9
|
onEnter: Function;
|
|
10
|
+
onEntered: Function;
|
|
8
11
|
in: boolean;
|
|
9
12
|
out: boolean;
|
|
10
13
|
name: string;
|
|
@@ -18,12 +21,14 @@ interface AnimationProviderProps {
|
|
|
18
21
|
keepAlive: boolean;
|
|
19
22
|
children: React.ReactNode;
|
|
20
23
|
navigation: NavigationBase;
|
|
24
|
+
renderAs: ElementType | CustomElementType;
|
|
21
25
|
}
|
|
22
26
|
interface AnimationProviderState {
|
|
23
27
|
mounted: boolean;
|
|
24
28
|
zIndex: number;
|
|
29
|
+
tabIndex: number;
|
|
25
30
|
}
|
|
26
|
-
export default class AnimationProvider extends
|
|
31
|
+
export default class AnimationProvider extends Component<AnimationProviderProps, AnimationProviderState> {
|
|
27
32
|
private _animationLayerData;
|
|
28
33
|
private ref;
|
|
29
34
|
private onAnimationEnd;
|
package/build/GestureRegion.d.ts
CHANGED
package/build/GhostLayer.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { SharedElementScene } from './SharedElement';
|
|
3
2
|
import { MotionProgressEvent } from './MotionEvents';
|
|
4
3
|
import AnimationLayerData, { AnimationLayerDataContext } from './AnimationLayerData';
|
|
5
4
|
import NavigationBase from './NavigationBase';
|
|
5
|
+
import { Component } from 'react';
|
|
6
6
|
interface GhostLayerProps {
|
|
7
7
|
instance?: (instance: GhostLayer | null) => any;
|
|
8
8
|
backNavigating: boolean;
|
|
@@ -14,11 +14,11 @@ interface GhostLayerState {
|
|
|
14
14
|
transitioning: boolean;
|
|
15
15
|
playing: boolean;
|
|
16
16
|
}
|
|
17
|
-
export default class GhostLayer extends
|
|
17
|
+
export default class GhostLayer extends Component<GhostLayerProps, GhostLayerState> {
|
|
18
18
|
private ref;
|
|
19
19
|
private _currentScene;
|
|
20
20
|
private _nextScene;
|
|
21
|
-
static contextType:
|
|
21
|
+
static contextType: import("react").Context<AnimationLayerData>;
|
|
22
22
|
context: React.ContextType<typeof AnimationLayerDataContext>;
|
|
23
23
|
private onProgressStartListener;
|
|
24
24
|
private onProgressListener;
|
package/build/RouteData.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { PlainObject, RouteProp } from "./common/types";
|
|
3
|
-
export declare const RouteDataContext:
|
|
3
|
+
export declare const RouteDataContext: import("react").Context<RouteProp<PlainObject<any>>>;
|
package/build/RouterBase.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import NavigationBase, { NavigateEvent, BackEvent } from './NavigationBase';
|
|
3
2
|
import { AnimationConfig, AnimationKeyframeEffectConfig, ReducedAnimationConfigSet, SwipeDirection, ScreenChild, PlainObject, RouterEventMap } from './common/types';
|
|
4
3
|
import RouterData, { RoutesData } from './RouterData';
|
|
5
4
|
import AnimationLayerData from './AnimationLayerData';
|
|
6
5
|
import { PageAnimationEndEvent } from './MotionEvents';
|
|
6
|
+
import { Component } from 'react';
|
|
7
7
|
interface Config {
|
|
8
8
|
animation?: ReducedAnimationConfigSet | AnimationConfig | AnimationKeyframeEffectConfig;
|
|
9
9
|
defaultRoute?: string;
|
|
@@ -30,7 +30,7 @@ export interface RouterBaseState {
|
|
|
30
30
|
implicitBack: boolean;
|
|
31
31
|
defaultDocumentTitle: string;
|
|
32
32
|
}
|
|
33
|
-
export default abstract class RouterBase<P extends RouterBaseProps = RouterBaseProps, S extends RouterBaseState = RouterBaseState> extends
|
|
33
|
+
export default abstract class RouterBase<P extends RouterBaseProps = RouterBaseProps, S extends RouterBaseState = RouterBaseState> extends Component<P, S> {
|
|
34
34
|
private readonly _id;
|
|
35
35
|
protected readonly animationLayerData: AnimationLayerData;
|
|
36
36
|
protected ref: HTMLElement | null;
|
package/build/RouterData.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { ScreenBase } from '.';
|
|
3
3
|
import { AnimationConfigSet, PlainObject, RouterEventMap } from './common/types';
|
|
4
4
|
import GhostLayer from './GhostLayer';
|
|
@@ -61,4 +61,4 @@ export default class RouterData<N extends NavigationBase = NavigationBase> {
|
|
|
61
61
|
get paramsSerializer(): ((params: PlainObject) => string) | undefined;
|
|
62
62
|
get paramsDeserializer(): ((queryString: string) => PlainObject) | undefined;
|
|
63
63
|
}
|
|
64
|
-
export declare const RouterDataContext:
|
|
64
|
+
export declare const RouterDataContext: import("react").Context<RouterData<NavigationBase> | null>;
|
package/build/ScreenBase.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Component, ElementType } from "react";
|
|
2
2
|
import { AnimationConfig, AnimationConfigFactory, AnimationConfigSet, AnimationKeyframeEffectConfig, LazyExoticComponent, PlainObject, ReducedAnimationConfigSet, SwipeDirection } from "./common/types";
|
|
3
3
|
import { RouterDataContext } from "./RouterData";
|
|
4
|
+
import { SharedElementScene } from "./SharedElement";
|
|
4
5
|
export interface ScreenBaseProps {
|
|
5
6
|
out?: boolean;
|
|
6
7
|
in?: boolean;
|
|
@@ -31,15 +32,17 @@ export interface ScreenBaseProps {
|
|
|
31
32
|
export interface ScreenBaseState {
|
|
32
33
|
shouldKeepAlive: boolean;
|
|
33
34
|
}
|
|
34
|
-
export default abstract class ScreenBase<P extends ScreenBaseProps = ScreenBaseProps, S extends ScreenBaseState = ScreenBaseState> extends
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
export default abstract class ScreenBase<P extends ScreenBaseProps = ScreenBaseProps, S extends ScreenBaseState = ScreenBaseState> extends Component<P, S> {
|
|
36
|
+
protected name: string;
|
|
37
|
+
protected sharedElementScene: SharedElementScene;
|
|
38
|
+
protected ref: HTMLElement | null;
|
|
39
|
+
protected contextParams: any;
|
|
39
40
|
private onRef;
|
|
40
41
|
private animation;
|
|
41
42
|
private pseudoElementAnimation;
|
|
42
|
-
|
|
43
|
+
protected elementType: ElementType | string;
|
|
44
|
+
protected animationProviderRef: HTMLElement | null;
|
|
45
|
+
static contextType: import("react").Context<import("./RouterData").default<import("./NavigationBase").default> | null>;
|
|
43
46
|
context: React.ContextType<typeof RouterDataContext>;
|
|
44
47
|
static defaultProps: {
|
|
45
48
|
route: {
|
|
@@ -55,8 +58,10 @@ export default abstract class ScreenBase<P extends ScreenBaseProps = ScreenBaseP
|
|
|
55
58
|
out: (AnimationConfig | AnimationKeyframeEffectConfig | undefined) & (AnimationConfig | AnimationKeyframeEffectConfig);
|
|
56
59
|
} | null;
|
|
57
60
|
animationFactory(animation?: AnimationKeyframeEffectConfig | AnimationConfig | ReducedAnimationConfigSet | AnimationConfigFactory): AnimationConfigSet;
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
onExited(): void;
|
|
62
|
+
onExit(): void;
|
|
63
|
+
onEnter(): void;
|
|
64
|
+
onEntered(): void;
|
|
60
65
|
private setRef;
|
|
61
66
|
get resolvedPathname(): P["resolvedPathname"] | undefined;
|
|
62
67
|
render(): JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Component } from "react";
|
|
2
2
|
interface ScrollRestorationProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
id: string;
|
|
4
4
|
children: JSX.Element;
|
|
5
5
|
hashScrollConfig?: ScrollIntoViewOptions;
|
|
6
6
|
shouldRestore?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export default class ScrollRestoration extends
|
|
8
|
+
export default class ScrollRestoration extends Component<ScrollRestorationProps> {
|
|
9
9
|
private ref;
|
|
10
10
|
private scrollPos;
|
|
11
11
|
private routerData;
|
package/build/SharedElement.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Component } from 'react';
|
|
2
2
|
import { EasingFunction, PlainObject, Vec2 } from './common/types';
|
|
3
3
|
declare enum TransformOriginKeywordEnum {
|
|
4
4
|
center = 0,
|
|
@@ -79,7 +79,7 @@ export declare class SharedElementScene {
|
|
|
79
79
|
set keepAlive(_keepAlive: boolean);
|
|
80
80
|
isEmpty(): boolean;
|
|
81
81
|
}
|
|
82
|
-
export declare const SharedElementSceneContext:
|
|
82
|
+
export declare const SharedElementSceneContext: import("react").Context<SharedElementScene | null>;
|
|
83
83
|
interface SharedElementConfig {
|
|
84
84
|
type?: TransitionAnimation;
|
|
85
85
|
transformOrigin?: TransformOrigin;
|
|
@@ -106,7 +106,7 @@ interface SharedElementState {
|
|
|
106
106
|
hidden: boolean;
|
|
107
107
|
keepAlive: boolean;
|
|
108
108
|
}
|
|
109
|
-
export declare class SharedElement extends
|
|
109
|
+
export declare class SharedElement extends Component<SharedElementProps, SharedElementState> {
|
|
110
110
|
private _id;
|
|
111
111
|
private _ref;
|
|
112
112
|
private _scene;
|
package/build/common/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import NavigationBase from '../NavigationBase';
|
|
3
3
|
import ScreenBase, { ScreenBaseProps } from '../ScreenBase';
|
|
4
4
|
export type ScreenChild<P extends ScreenBaseProps = ScreenBaseProps, E extends typeof ScreenBase = typeof ScreenBase> = React.ReactElement<P, React.JSXElementConstructor<E>>;
|
|
@@ -86,4 +86,5 @@ export type NodeAppendedEvent = CustomEvent<{
|
|
|
86
86
|
export type NodeRemovedEvent = CustomEvent<{
|
|
87
87
|
node: Node;
|
|
88
88
|
}>;
|
|
89
|
+
export type CustomElementType = string;
|
|
89
90
|
export {};
|
package/build/common/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import RouterData from "../RouterData";
|
|
3
3
|
import { LazyExoticComponent, PlainObject, SearchParamsDeserializer, SearchParamsSerializer } from "./types";
|
|
4
4
|
export declare function getCSSData(styles: CSSStyleDeclaration, exclude?: string[], object?: boolean): [string, PlainObject<string>];
|
|
@@ -40,3 +40,4 @@ export declare const DEFAULT_ANIMATION: {
|
|
|
40
40
|
readonly duration: 0;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
|
+
export declare const MAX_Z_INDEX = 2147483647;
|
package/build/common/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";var t={810:(t,n,r)=>{t.exports=(e=>{var t={};return r.d(t,e),t})({
|
|
1
|
+
import*as e from"react";var t={810:(t,n,r)=>{t.exports=(e=>{var t={};return r.d(t,e),t})({Children:()=>e.Children,isValidElement:()=>e.isValidElement,lazy:()=>e.lazy})}},n={};function r(e){var a=n[e];if(void 0!==a)return a.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var a={};(()=>{r.d(a,{Nu:()=>c,PV:()=>u,Po:()=>p,QN:()=>i,V_:()=>m,Vo:()=>d,cT:()=>n,dw:()=>v,e1:()=>s,fJ:()=>f,hR:()=>t,kI:()=>h,r2:()=>w,rL:()=>l,uZ:()=>o});var e=r(810);function t(e,t=[],n=!0){let r="";const a={};let o=0;for(let i in e)if(!t.includes(i)){if(o<e.length){const t=e[i];let n=e.getPropertyValue(t);if("visibility"===t)n="visible";r+=`${t}:${n};`}else{if(!n)break;let t=i,r=e[t];if("string"==typeof r&&"cssText"!==t&&!t.includes("webkit")&&!t.includes("grid")){switch(t){case"offset":t="cssOffset";break;case"float":t="cssFloat";break;case"visibility":r="visible"}a[t]=r}}o++}return[r,a]}function n(e,t=[]){const n={};for(const r in e)if(e[r]&&e[r].length&&"function"!=typeof e[r]){if(/^\d+$/.test(r))continue;if("offset"===r)continue;if(t.includes(r))continue;n[r]=e[r]}return n}function o(e,t,n){return e<t?t:n&&e>n?n:e}function i(e,t,n=window.location.origin){if(void 0===e||void 0===t)return e===t?{exact:!0,matchedPathname:t}:null;const r=new URLPattern(e,n),a=new URL(t,n),o=r.exec(a);let i="",s="";for(let e=0;e<r.pathname.length;e++){if(r.pathname[e]!==a.pathname[e]){s=a.pathname.substring(e);break}i+=r.pathname[e]}return o?{exact:e===t,matchedPathname:i,rest:s}:null}function s(e,t,n=window.location.origin){return t.some((t=>i(t,e,n)))}function c(e,t=window){return new Promise((n=>{queueMicrotask((()=>n(t.dispatchEvent(e))))}))}function u(e,t){return"string"==typeof t&&(t=new URL(t)),"string"!=typeof e&&(e=e.pathname),e=e.replace(/^\//,""),t.pathname.endsWith("/")||(t=new URL(t.href+"/")),new URL(e,t)}function l(e){const t=new URLSearchParams(decodeURI(e)).entries(),n={};for(const[e,r]of t){let t="";try{t=JSON.parse(r)}catch(e){console.warn("Non JSON serialisable value was passed as URL route param."),t=r}n[e]=t}return Object.keys(n).length?n:void 0}function f(e,t){return(t||l)(e)||{}}function p(e,t){try{return(t||function(e){return new URLSearchParams(e).toString()})(e)}catch(e){console.error(e),console.warn("Non JSON serialisable value was passed as route param to Anchor.")}return""}function d(t){const n=(0,e.lazy)(t);return n.preload=()=>{const e=t();return e.then((e=>n.preloaded=e.default)).catch(console.error),e},n}function h(t,n){let r=n;return new Promise(((a,o)=>{let s=!1;for(;r;){const c=r.routes;if(e.Children.forEach(c,(n=>{if(s)return;if(!(0,e.isValidElement)(n))return;i(n.props.path,t)&&(s=!0,queueMicrotask((async()=>{if("preload"in n.props.component)try{await n.props.component.preload(),a(s)}catch(e){o(e)}})))})),s)break;r=n.parentRouterData}s||a(!1)}))}function m(e,t=0){var n;const r=null===(n=null==e?void 0:e.effect)||void 0===n?void 0:n.getTiming().duration;return Number(r)||t}const w={in:{type:"none",duration:0},out:{type:"none",duration:0}},v=2147483647})();var o=a.r2,i=a.dw,s=a.uZ,c=a.PV,u=a.rL,l=a.Nu,f=a.V_,p=a.hR,d=a.cT,h=a.e1,m=a.Vo,w=a.QN,v=a.kI,b=a.Po,y=a.fJ;export{o as DEFAULT_ANIMATION,i as MAX_Z_INDEX,s as clamp,c as concatenateURL,u as defaultSearchParamsToObject,l as dispatchEvent,f as getAnimationDuration,p as getCSSData,d as getStyleObject,h as includesRoute,m as lazy,w as matchRoute,v as prefetchRoute,b as searchParamsFromObject,y as searchParamsToObject};
|
package/build/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
import*as t from"react";var e={837:(t,e,n)=>{var i=n(810),s=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,r=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h={key:!0,ref:!0,__self:!0,__source:!0};function l(t,e,n){var i,o={},l=null,u=null;for(i in void 0!==n&&(l=""+n),void 0!==e.key&&(l=""+e.key),void 0!==e.ref&&(u=e.ref),e)a.call(e,i)&&!h.hasOwnProperty(i)&&(o[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===o[i]&&(o[i]=e[i]);return{$$typeof:s,type:t,key:l,ref:u,props:o,_owner:r.current}}e.Fragment=o,e.jsx=l,e.jsxs=l},322:(t,e,n)=>{t.exports=n(837)},174:(t,e,n)=>{n.d(e,{Nu:()=>l,PV:()=>u,Po:()=>p,QN:()=>r,V_:()=>f,Vo:()=>m,cT:()=>o,e1:()=>h,fJ:()=>d,hR:()=>s,kI:()=>v,r2:()=>g,rL:()=>c,uZ:()=>a});var i=n(810);function s(t,e=[],n=!0){let i="";const s={};let o=0;for(let a in t)if(!e.includes(a)){if(o<t.length){const e=t[a];let n=t.getPropertyValue(e);if("visibility"===e)n="visible";i+=`${e}:${n};`}else{if(!n)break;let e=a,i=t[e];if("string"==typeof i&&"cssText"!==e&&!e.includes("webkit")&&!e.includes("grid")){switch(e){case"offset":e="cssOffset";break;case"float":e="cssFloat";break;case"visibility":i="visible"}s[e]=i}}o++}return[i,s]}function o(t,e=[]){const n={};for(const i in t)if(t[i]&&t[i].length&&"function"!=typeof t[i]){if(/^\d+$/.test(i))continue;if("offset"===i)continue;if(e.includes(i))continue;n[i]=t[i]}return n}function a(t,e,n){return t<e?e:n&&t>n?n:t}function r(t,e,n=window.location.origin){if(void 0===t||void 0===e)return t===e?{exact:!0,matchedPathname:e}:null;const i=new URLPattern(t,n),s=new URL(e,n),o=i.exec(s);let a="",r="";for(let t=0;t<i.pathname.length;t++){if(i.pathname[t]!==s.pathname[t]){r=s.pathname.substring(t);break}a+=i.pathname[t]}return o?{exact:t===e,matchedPathname:a,rest:r}:null}function h(t,e,n=window.location.origin){return e.some((e=>r(e,t,n)))}function l(t,e=window){return new Promise((n=>{queueMicrotask((()=>n(e.dispatchEvent(t))))}))}function u(t,e){return"string"==typeof e&&(e=new URL(e)),"string"!=typeof t&&(t=t.pathname),t=t.replace(/^\//,""),e.pathname.endsWith("/")||(e=new URL(e.href+"/")),new URL(t,e)}function c(t){const e=new URLSearchParams(decodeURI(t)).entries(),n={};for(const[t,i]of e){let e="";try{e=JSON.parse(i)}catch(t){console.warn("Non JSON serialisable value was passed as URL route param."),e=i}n[t]=e}return Object.keys(n).length?n:void 0}function d(t,e){return(e||c)(t)||{}}function p(t,e){try{return(e||function(t){return new URLSearchParams(t).toString()})(t)}catch(t){console.error(t),console.warn("Non JSON serialisable value was passed as route param to Anchor.")}return""}function m(t){const e=i.default.lazy(t);return e.preload=()=>{const n=t();return n.then((t=>e.preloaded=t.default)).catch(console.error),n},e}function v(t,e){let n=e;return new Promise(((s,o)=>{let a=!1;for(;n;){const h=n.routes;if(i.default.Children.forEach(h,(e=>{if(a)return;if(!i.default.isValidElement(e))return;r(e.props.path,t)&&(a=!0,queueMicrotask((async()=>{if("preload"in e.props.component)try{await e.props.component.preload(),s(a)}catch(t){o(t)}})))})),a)break;n=e.parentRouterData}a||s(!1)}))}function f(t,e=0){var n;const i=null===(n=null==t?void 0:t.effect)||void 0===n?void 0:n.getTiming().duration;return Number(i)||e}const g={in:{type:"none",duration:0},out:{type:"none",duration:0}}},623:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=i(n(813));class o extends s.default{constructor(t){super("doubletap",t)}}e.default=o},813:(t,e)=>{var n;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.tap=0]="tap",t[t.longpress=1]="longpress",t[t.pinchstart=2]="pinchstart",t[t.pinch=3]="pinch",t[t.pinchend=4]="pinchend",t[t.rotatestart=5]="rotatestart",t[t.rotate=6]="rotate",t[t.rotateend=7]="rotateend",t[t.swipestart=8]="swipestart",t[t.swipe=9]="swipe",t[t.swipeend=10]="swipeend",t[t.panstart=11]="panstart",t[t.pan=12]="pan",t[t.panend=13]="panend",t[t.doubletap=14]="doubletap"}(n||(n={})),void 0===window.TouchEvent&&(window.TouchEvent=PointerEvent);class i extends TouchEvent{constructor(t,e){if(super(t,{touches:Array.from(e.touches),targetTouches:Array.from(e.targetTouches),changedTouches:Array.from(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,bubbles:!0,cancelable:!0}),t.includes("end")||e.type.includes("end"))return this.gestureTarget=e.changedTouches[0].target,this.x=e.changedTouches[0].clientX,void(this.y=e.changedTouches[0].clientY);this.gestureTarget=e.touches[0].target,this.x=e.touches[0].clientX,this.y=e.touches[0].clientY}}e.default=i},646:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=i(n(813));class o extends s.default{constructor(t,e){super("longpress",t),this.duration=0,this.duration=e}}e.default=o},577:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PanEndEvent=e.PanStartEvent=void 0;const s=i(n(813));var o;!function(t){t[t.start=0]="start",t[t.end=1]="end"}(o||(o={}));class a extends s.default{constructor(t,e,n){let i;switch(n){case"start":i="panstart";break;case"end":i="panend";break;default:i="pan"}super(i,t),this.velocity=e.velocity,this.translation={x:e.translation.x,y:e.translation.y,magnitude:e.translation.magnitude,clientX:e.translation.clientX,clientY:e.translation.clientY,clientMagnitude:e.translation.clientMagnitude}}}e.default=class extends a{constructor(t,e){super(t,e)}};e.PanStartEvent=class extends a{constructor(t,e){super(t,e,"start")}};e.PanEndEvent=class extends a{constructor(t,e){super(t,e,"end")}}},630:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PinchEndEvent=e.PinchStartEvent=void 0;const s=i(n(813));var o;!function(t){t[t.start=0]="start",t[t.end=1]="end"}(o||(o={}));class a extends s.default{constructor(t,e,n){let i;switch(n){case"start":i="pinchstart";break;case"end":i="pinchend";break;default:i="pinch"}super(i,t),Object.defineProperty(this,"scale",{value:e.scale,writable:!1})}}e.default=class extends a{constructor(t,e){super(t,e)}};e.PinchStartEvent=class extends a{constructor(t,e){super(t,e,"start")}};e.PinchEndEvent=class extends a{constructor(t,e){super(t,e,"end")}}},859:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RotateEndEvent=e.RotateStartEvent=void 0;const s=i(n(813));var o;!function(t){t[t.start=0]="start",t[t.end=1]="end"}(o||(o={}));class a extends s.default{constructor(t,e,n){let i;switch(n){case"start":i="rotatestart";break;case"end":i="rotateend";break;default:i="rotate"}super(i,t),this.anchor={x:e.anchor.x,y:e.anchor.y,clientX:e.anchor.clientX,clientY:e.anchor.clientY},Object.defineProperty(this,"rotation",{value:e.rotation,writable:!1}),this.rotationDeg=e.rotationDeg}}e.default=class extends a{constructor(t,e){super(t,e)}};e.RotateStartEvent=class extends a{constructor(t,e){super(t,e,"start")}};e.RotateEndEvent=class extends a{constructor(t,e){super(t,e,"end")}}},224:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SwipeEndEvent=e.SwipeStartEvent=void 0;const s=i(n(813));var o;!function(t){t[t.start=0]="start",t[t.end=1]="end"}(o||(o={}));class a extends s.default{constructor(t,e,n){let i;switch(n){case"start":i="swipestart";break;case"end":i="swipeend";break;default:i="swipe"}super(i,t),this.velocity=e.velocity,this.direction=e.direction}}e.default=class extends a{constructor(t,e){super(t,e)}};e.SwipeStartEvent=class extends a{constructor(t,e){super(t,e,"start")}};e.SwipeEndEvent=class extends a{constructor(t,e){super(t,e,"end")}}},884:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=i(n(813));class o extends s.default{constructor(t){super("tap",t)}}e.default=o},878:function(t,e,n){var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(e,n);s&&!("get"in s?!e.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,s)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return s(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RotateEndEvent=e.RotateEvent=e.RotateStartEvent=e.PinchEndEvent=e.PinchEvent=e.PinchStartEvent=e.PanEndEvent=e.PanEvent=e.PanStartEvent=e.SwipeEndEvent=e.SwipeEvent=e.SwipeStartEvent=e.DoubleTapEvent=e.LongPressEvent=e.GestureEvent=e.TapEvent=void 0;const r=a(n(813));e.GestureEvent=r.default;const h=a(n(646));e.LongPressEvent=h.default;const l=a(n(884));e.TapEvent=l.default;const u=a(n(623));e.DoubleTapEvent=u.default;const c=o(n(224));e.SwipeEvent=c.default,Object.defineProperty(e,"SwipeEndEvent",{enumerable:!0,get:function(){return c.SwipeEndEvent}}),Object.defineProperty(e,"SwipeStartEvent",{enumerable:!0,get:function(){return c.SwipeStartEvent}});const d=o(n(577));e.PanEvent=d.default,Object.defineProperty(e,"PanEndEvent",{enumerable:!0,get:function(){return d.PanEndEvent}}),Object.defineProperty(e,"PanStartEvent",{enumerable:!0,get:function(){return d.PanStartEvent}});const p=o(n(630));e.PinchEvent=p.default,Object.defineProperty(e,"PinchEndEvent",{enumerable:!0,get:function(){return p.PinchEndEvent}}),Object.defineProperty(e,"PinchStartEvent",{enumerable:!0,get:function(){return p.PinchStartEvent}});const m=o(n(859));e.RotateEvent=m.default,Object.defineProperty(e,"RotateEndEvent",{enumerable:!0,get:function(){return m.RotateEndEvent}}),Object.defineProperty(e,"RotateStartEvent",{enumerable:!0,get:function(){return m.RotateStartEvent}});const v=n(47);var f;!function(t){t[t.right=0]="right",t[t.up=1]="up",t[t.left=2]="left",t[t.down=3]="down"}(f||(f={}));class g{constructor(){this.touchStart=new TouchEvent("touchstart")||{},this.touchMove=new TouchEvent("touchmove")||{},this.touchEnd=new TouchEvent("touchend")||{},this.touchCancel=new TouchEvent("touchcancel")||{},this.velocity=0,this.dxDy=new v.Vec2(0,0),this.scale=1,this.rotation=0,this.rotationDeg=0,this.anchor=new v.Vec2(0,0),this.octant=0,this.isPanning=!1,this.isPinching=!1,this.isSwiping=!1,this.isRotating=!1,this.touchStartTime=0,this.touchEndTime=0,this.lastTouchTime=0,this.taps=0,this.scaleBase=0,this.touchMoved=!1,this.touchDown=!1,this.shouldFire=!1,this.pointers=0,this.isLongPress=!1,this.longPressTimeout=0,this.touchStartListener=this.onTouchStart.bind(this),this.touchMoveListener=this.onTouchMove.bind(this),this.touchEndListener=this.onTouchEnd.bind(this),this.touchCancelListener=this.onTouchCancel.bind(this),this.currentTarget=window,this.config={longPressDuration:500,tapDelay:500,minPointers:1,numberOfTaps:0},g.listening||(TouchEvent&&window.addEventListener("touchstart",this.touchStartListener,!0),g.listening=!0)}bind(t){this.unbind(this.currentTarget),t.addEventListener("touchmove",this.touchMoveListener,!0),t.addEventListener("touchend",this.touchEndListener,!0),t.addEventListener("touchcancel",this.touchCancelListener,!0),this.currentTarget=t}unbind(t){t.removeEventListener("touchmove",this.touchMoveListener),t.removeEventListener("touchend",this.touchEndListener),t.removeEventListener("touchcancel",this.touchCancelListener)}clean(){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}onPointerLeave(t){if(!t.touches.length){if(this.isSwiping){const e=new c.SwipeEndEvent(t,{velocity:this.velocity,direction:f[(0,v.closest)(this.octant,[0,1,2,3])]});this.dispatchEvent(e),this.isSwiping=!1}if(this.isPanning){const e=new d.PanEndEvent(t,{translation:this.dxDy,velocity:this.velocity});this.dispatchEvent(e),this.isPanning=!1}}if(1===t.touches.length){if(this.scaleBase=0,this.isPinching){const e=new p.PinchEndEvent(t,{scale:this.scale});this.dispatchEvent(e),this.isPinching=!1}if(this.isRotating){const e=new m.RotateEndEvent(t,{rotation:this.rotation,rotationDeg:this.rotationDeg,anchor:this.anchor});this.dispatchEvent(e),this.isRotating=!1}}}dispatchEvent(t){queueMicrotask((()=>{this.currentTarget.dispatchEvent(t)}))}onTouchStart(t){this.currentTarget!==t.touches[0].target&&(this.clean(),this.unbind(this.currentTarget),this.pointers=this.touchEnd.touches.length,this.taps=0),this.touchStart=t;const e=parseInt(t.touches[0].target.dataset.minpointers||"0")||this.config.minPointers;if(this.touchStart.touches.length<e)return void(this.shouldFire=!1);this.shouldFire=!0,this.touchStartTime=t.timeStamp,this.touchDown=!0,this.pointers||this.bind(t.touches[0].target),this.pointers=this.touchStart.touches.length;const n=parseFloat(this.currentTarget.dataset.longpressduration||"0")||this.config.longPressDuration;if(this.longPressTimeout||(this.longPressTimeout=setTimeout((()=>{if(!this.touchMoved&&this.touchDown){const t=Date.now()-this.touchStartTime,e=new h.default(this.touchStart,t);this.dispatchEvent(e),this.isLongPress=!0,this.longPressTimeout=0}}),n)),this.touchStart.touches.length>1){const t=new v.Vec2(this.touchStart.touches[0].clientX,this.touchStart.touches[0].clientY),e=new v.Vec2(this.touchStart.touches[1].clientX,this.touchStart.touches[1].clientY);this.scaleBase=t.substract(e).magnitude}else this.scaleBase=0}onTouchMove(t){if(!this.shouldFire)return;if(this.touchMoved=!0,this.touchMove=t,t.touches.length>1&&this.touchStart.touches.length>1&&(t.touches[1].clientX!==this.touchStart.touches[1].clientX||t.touches[1].clientY!==this.touchStart.touches[1].clientY)){const e=new v.Vec2(this.touchMove.touches[0].clientX,this.touchMove.touches[0].clientY),n=new v.Vec2(this.touchMove.touches[1].clientX,this.touchMove.touches[1].clientY),i=new v.Vec2(this.touchStart.touches[0].clientX,this.touchStart.touches[0].clientY),s=e.substract(n);if(this.scaleBase&&Math.abs(this.scaleBase-s.magnitude)>10){const e=s.magnitude/this.scaleBase;if(this.scale=e,this.isPinching){const n=new p.default(t,{scale:e});this.dispatchEvent(n)}else{const n=new p.PinchStartEvent(t,{scale:e});this.dispatchEvent(n),this.isPinching=!0}}this.anchor=e;let o=Math.atan2(i.clientY-n.clientY,i.clientX-n.clientX);if(o<0?o+=1.5708:o-=1.5708,this.rotation=o,this.rotationDeg=180*o/Math.PI,this.anchor=this.anchor,this.isRotating){const e=new m.default(t,{anchor:this.anchor,rotation:this.rotation,rotationDeg:this.rotationDeg});this.dispatchEvent(e)}else{const e=new m.RotateStartEvent(t,{anchor:this.anchor,rotation:this.rotation,rotationDeg:this.rotationDeg});this.dispatchEvent(e),this.isRotating=!0}}const e=new v.Vec2(this.touchStart.touches[0].clientX,this.touchStart.touches[0].clientY),n=new v.Vec2(this.touchMove.touches[0].clientX,this.touchMove.touches[0].clientY).substract(e),i=n.magnitude,s={x:n.x/i,y:n.y/i},o=Math.atan2(s.y,s.x);this.octant=Math.round(4*o/(2*Math.PI)+4)%4;const a=(t.timeStamp-this.touchStart.timeStamp)/1e3,r=n.magnitude/a;if(this.isSwiping){const e=new c.default(t,{direction:f[(0,v.closest)(this.octant,[0,1,2,3])],velocity:r});this.dispatchEvent(e)}else{const e=new c.SwipeStartEvent(t,{direction:f[(0,v.closest)(this.octant,[0,1,2,3])],velocity:r});this.dispatchEvent(e),this.isSwiping=!0}if(this.dxDy=n,this.velocity=r,this.isPanning){const e=new d.default(t,{translation:n,velocity:r});this.dispatchEvent(e)}else{const e=new d.PanStartEvent(t,{translation:n,velocity:r});this.dispatchEvent(e),this.isPanning=!0}}onTouchEnd(t){const e=parseInt(this.currentTarget.dataset.numberoftaps||"0")||this.config.numberOfTaps;if(this.taps++,this.shouldFire=Boolean(this.taps>e),this.shouldFire){this.touchEnd=t,this.touchEndTime=t.timeStamp;const n=parseFloat(this.currentTarget.dataset.tapdelay||"0")||this.config.tapDelay;if(!this.touchMoved&&!this.isLongPress)if(1===this.taps||this.touchEndTime-this.lastTouchTime<n){if(this.taps%2===e){const e=new u.default(t);this.dispatchEvent(e),this.taps=0}const n=new l.default(t);this.dispatchEvent(n)}else this.taps=0}this.pointers=this.touchEnd.touches.length,this.lastTouchTime=this.touchEndTime,this.onPointerLeave(t),this.unbind(this.currentTarget),this.clean()}onTouchCancel(t){this.shouldFire&&(this.touchCancel=t,this.unbind(this.currentTarget),this.clean())}}function y(t){const e=t.type;t.composedPath().forEach((n=>{if(n instanceof HTMLElement){const i=n[_[e]];if("function"!=typeof i)return;i.apply(n,[t])}}))}g.listening=!1,e.default=g,window.GLOBAL_EVENT_DISPATCHER||(window.addEventListener("tap",y,{passive:!0}),window.addEventListener("longpress",y,{passive:!0}),window.addEventListener("doubletap",y,{passive:!0}),window.addEventListener("swipestart",y,{passive:!0}),window.addEventListener("swipe",y,{passive:!0}),window.addEventListener("swipeend",y,{passive:!0}),window.addEventListener("panstart",y,{passive:!0}),window.addEventListener("pan",y,{passive:!0}),window.addEventListener("panend",y,{passive:!0}),window.addEventListener("pinchstart",y,{passive:!0}),window.addEventListener("pinch",y,{passive:!0}),window.addEventListener("pinchend",y,{passive:!0}),window.addEventListener("rotatestart",y,{passive:!0}),window.addEventListener("rotate",y,{passive:!0}),window.addEventListener("rotateend",y,{passive:!0}));const _={tap:"ontap",doubletap:"ondoubletap",longpress:"onlongpress",swipestart:"onswipestart",swipe:"onswipe",swipeend:"onswipeend",panstart:"onpanstart",pan:"onpan",panend:"onpanend",pinchstart:"onpinchstart",pinch:"onpinch",pinchend:"onpinchend",rotatestart:"onrotatestart",rotate:"onrotate",rotateend:"onrotateend"};TouchEvent&&(window.gestureProvider=new g),window.GLOBAL_EVENT_DISPATCHER||(window.GLOBAL_EVENT_DISPATCHER=y)},47:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.closest=e.Vec2=e.assert=void 0,e.assert=function(t,e){if(!t)throw new Error(e)};e.Vec2=class{constructor(t,e){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)}translateY(t){return-(t-window.innerHeight/2)}translateX(t){return t-window.innerWidth/2}get x(){return this._x}get y(){return this._y}get clientX(){return this._clientX}get clientY(){return this._clientY}set x(t){this._clientX=t,this._x=this.translateX(t)}set y(t){this._clientY=t,this._y=this.translateY(t)}add(t){return this._x+=t.x,this._y+=t.y,this._clientX+=t.clientX,this._clientY+=t.clientY,this}substract(t){return this._x-=t.x,this._y-=t.y,this._clientX-=t.clientX,this._clientY-=t.clientY,this}dot(t){return this._x*t.x+this._y*t.y}get magnitude(){return Math.sqrt(Math.pow(this._x,2)+Math.pow(this._y,2))}get clientMagnitude(){return Math.sqrt(Math.pow(this._clientX,2)+Math.pow(this._clientY,2))}},e.closest=function(t,e){return e.reduce(((e,n)=>{let i=Math.abs(e-t),s=Math.abs(n-t);return i===s?e>n?e:n:s<i?n:e}))}},810:e=>{e.exports=t}},n={};function i(t){var s=n[t];if(void 0!==s)return s.exports;var o=n[t]={exports:{}};return e[t].call(o.exports,o,o.exports,i),o.exports}i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s={};(()=>{i.d(s,{ee:()=>z,r2:()=>h.r2,rN:()=>B,PM:()=>j,y_:()=>d,DC:()=>a,GW:()=>f,sV:()=>e,RG:()=>T,GI:()=>W,rJ:()=>N,uZ:()=>h.uZ,PV:()=>h.PV,rL:()=>h.rL,Nu:()=>h.Nu,V_:()=>h.V_,hR:()=>h.hR,cT:()=>h.cT,e1:()=>h.e1,Ef:()=>L,Vo:()=>h.Vo,QN:()=>h.QN,kI:()=>h.kI,Po:()=>h.Po,fJ:()=>h.fJ,nc:()=>U,HJ:()=>M,JZ:()=>$,yj:()=>F});var t=i(810);class e{constructor(t,e){this._parentRouterData=null,this._childRouterData=null,this._dispatchEvent=null,this._addEventListener=null,this._removeEventListener=null,this._currentPath="",this._routesData=new Map,this._backNavigating=!1,this._gestureNavigating=!1,this._mountedScreen=null,this._animation=h.r2,this._ghostLayer=null,this.routerInstance=t,e&&(this.navigation=e)}destructor(){this.parentRouterData&&(this.parentRouterData.childRouterData=null)}prefetchRoute(t){return(0,h.kI)(t,this)}set parentRouterData(t){this._parentRouterData=t,this._parentRouterData&&(this._parentRouterData.childRouterData=this)}set childRouterData(t){var e;const n=null===(e=this._childRouterData)||void 0===e?void 0:e.deref();if(void 0!==n&&t&&t.routerId!==n.routerId)throw new Error("It looks like you have two navigators at the same level. Try simplifying your navigation structure by using a nested router instead.");this._childRouterData=t?new WeakRef(t):null}set dispatchEvent(t){this._dispatchEvent=t}set addEventListener(t){this._addEventListener=t}set removeEventListener(t){this._removeEventListener=t}set currentPath(t){this._currentPath=t}set routesData(t){this._routesData=t}set navigation(t){this._navigation=t}set animation(t){this._animation=t}set ghostLayer(t){this._ghostLayer=t}set backNavigating(t){this._backNavigating=t}set gestureNavigating(t){this._gestureNavigating=t}set paramsSerializer(t){this._paramsSerializer=t}set paramsDeserializer(t){this._paramsDeserializer=t}set mountedScreen(t){this._mountedScreen=t}get mountedScreen(){return this._mountedScreen}get routerId(){return this.routerInstance.id}get routes(){return this.routerInstance.props.children}get parentRouterData(){return this._parentRouterData}get childRouterData(){var t,e;return null!==(e=null===(t=this._childRouterData)||void 0===t?void 0:t.deref())&&void 0!==e?e:null}get dispatchEvent(){return this._dispatchEvent}get addEventListener(){return this._addEventListener}get removeEventListener(){return this._removeEventListener}get currentPath(){return this._currentPath}get routesData(){return this._routesData}get scrollRestorationData(){return e._scrollRestorationData}get navigation(){return this._navigation}get animation(){return this._animation}get ghostLayer(){return this._ghostLayer}get backNavigating(){return this._backNavigating}get gestureNavigating(){return this._gestureNavigating}get paramsSerializer(){return this._paramsSerializer}get paramsDeserializer(){return this._paramsDeserializer}}e._scrollRestorationData=new class{constructor(){this._map=new Map}set(t,e={x:0,y:0}){this._map.set(t,e)}get(t){return this._map.get(t)}};const n=(0,t.createContext)(null);class o{constructor(){this._map=new Map,this.mutationObserver=new MutationObserver(this.observeMutations.bind(this));const{head:t}=document;this.mutationObserver.observe(t,{childList:!0}),Array.from(t.querySelectorAll("meta")).forEach((t=>{this.mutationObserver.observe(t,{attributes:!0})})),Array.from(t.querySelectorAll("meta")).forEach(this.metaDataFromNode.bind(this))}get(t){const e=this.getMetaKey(t),n=this._map.get(e);if(!n)return;let i;return i=n.includes(",")&&n.includes("=")?n.split(/,\s*/).map((t=>t.split("="))):n,i}set(t,e){const n=this.getMetaKey(t),i=this.getMetaContent(e);this._map.set(n,i),this.updateMetaElement(n,i)}has(t){const e=this.getMetaKey(t);return this._map.has(e)}delete(t){var e;const n=this.getMetaKey(t);this._map.delete(n),null===(e=document.head.querySelector(`meta[${n}]`))||void 0===e||e.remove()}clear(){document.head.querySelectorAll("meta").forEach((t=>t.remove()))}entries(){return this._map.entries()}[Symbol.iterator](){return this.entries()}get size(){return this._map.size}observeMutations(t){for(const e of t){if("attributes"===e.type){const t=e.target;this.metaDataFromNode(t)}if("childList"!==e.type)return;e.removedNodes.forEach((t=>{if("META"===t.nodeName){const[e]=Array.from(t.attributes).filter((t=>"content"!==t.nodeName)),n=[e.nodeName,e.value].join("=");this._map.has(n)&&this._map.delete(n)}})),e.addedNodes.forEach((t=>{"META"===t.nodeName&&this.metaDataFromNode(t)}))}}metaDataFromNode(t){const[e]=Array.from(t.attributes).filter((t=>"content"!==t.nodeName)),[n]=Array.from(t.attributes).filter((t=>"content"===t.nodeName)),i=[e.nodeName,e.value].join("=");this._map.set(i,null==n?void 0:n.value)}getMetaKey(t){let e;return e="string"==typeof t?`name=${t}`:t.join("="),e}getMetaContent(t){if(!t)return;let e;return e="string"==typeof t?t:t.map((t=>t.join("="))).join(", "),e}updateMetaElement(t,e){const n=document.querySelector(`meta[${t}]`)||document.createElement("meta"),i=t.split("=");n.setAttribute(...i),e?n.setAttribute("content",e):n.removeAttribute("content"),n.parentElement||document.head.appendChild(n)}}class a{constructor(t,e,n=!1,i=null){var s;this._metaData=new o,this._currentParams={},this.popStateListener=t=>{var e;this._routerId,this.history.state.get("routerId");const n=null===(e=a.rootNavigatorRef)||void 0===e?void 0:e.deref(),i=(null==n?void 0:n.routerId)===this.routerId;(null===this.history.state.get("routerId")&&i||this.history.state.get("routerId")===this._routerId)&&this.onPopState(t)},this.routerData=e,this._disableBrowserRouting=n,this._routerId=t;const r=null===(s=a.rootNavigatorRef)||void 0===s?void 0:s.deref();r&&r.isInDocument||(a.rootNavigatorRef=new WeakRef(this)),window.addEventListener("popstate",this.popStateListener)}destructor(){var t;const e=null===(t=a.rootNavigatorRef)||void 0===t?void 0:t.deref();(null==e?void 0:e.routerId)===this.routerId&&(a.rootNavigatorRef=null),window.removeEventListener("popstate",this.popStateListener)}addEventListener(t,e,n){var i,s;null===(s=(i=this.routerData).addEventListener)||void 0===s||s.call(i,t,e,n)}removeEventListener(t,e,n){var i,s;return null===(s=(i=this.routerData).removeEventListener)||void 0===s?void 0:s.call(i,t,e,n)}get disableBrowserRouting(){return this._disableBrowserRouting}get routerId(){return this._routerId}canGoBack(){return this.history.canGoBack()}getNavigatorById(t,e){var n;const i=null!=e?e:null===(n=a.rootNavigatorRef)||void 0===n?void 0:n.deref();return i.routerId===t?i:i.routerData.childRouterData?void this.getNavigatorById(t,i.routerData.childRouterData.navigation):null}prefetchRoute(t){return this.routerData.prefetchRoute(t)}get dispatchEvent(){return this.routerData.dispatchEvent}get paramsDeserializer(){return this.routerData.paramsDeserializer}get paramsSerializer(){return this.routerData.paramsSerializer}get history(){return this._history}get metaData(){return this._metaData}get isInDocument(){return Boolean(document.getElementById(`${this.routerId}`))}}a.rootNavigatorRef=null;var r=i(322),h=i(174);class l{constructor(){this._play=!0,this._isPlaying=!1,this._currentScreen=null,this._nextScreen=null,this._progressUpdateID=0,this._pseudoElementInAnimation=null,this._pseudoElementOutAnimation=null,this._inAnimation=null,this._outAnimation=null,this._playbackRate=1,this._gestureNavigating=!1,this._backNavigating=!1,this._onEnd=null,this._onProgress=null,this._shouldAnimate=!0,this._dispatchEvent=null,this._addEventListener=null}updateProgress(){var t,e,n,i;if(this._gestureNavigating&&!this._play)return void window.cancelAnimationFrame(this._progressUpdateID);(()=>{this._onProgress&&this._onProgress(this.progress)})(),this._progressUpdateID=window.requestAnimationFrame(this.updateProgress.bind(this));const s=()=>{window.cancelAnimationFrame(this._progressUpdateID);const t=this._gestureNavigating?0:100;this.progress!==t&&this._onProgress&&this._onProgress(t)};Promise.all([null===(t=this._inAnimation)||void 0===t?void 0:t.finished,null===(e=this._outAnimation)||void 0===e?void 0:e.finished,null===(n=this._pseudoElementInAnimation)||void 0===n?void 0:n.finished,null===(i=this._pseudoElementOutAnimation)||void 0===i?void 0:i.finished]).then(s).catch(s)}reset(){this._onEnd=null,this._playbackRate=1,this._play=!0,this._gestureNavigating=!1}finish(){var t,e,n,i;null===(t=this._inAnimation)||void 0===t||t.finish(),null===(e=this._outAnimation)||void 0===e||e.finish(),null===(n=this._pseudoElementInAnimation)||void 0===n||n.finish(),null===(i=this._pseudoElementOutAnimation)||void 0===i||i.finish()}cancel(){var t,e,n,i,s;null===(t=this._inAnimation)||void 0===t||t.cancel(),null===(e=this._outAnimation)||void 0===e||e.cancel(),null===(n=this._pseudoElementInAnimation)||void 0===n||n.cancel(),null===(i=this._pseudoElementOutAnimation)||void 0===i||i.cancel(),this.reset();const o=new CustomEvent("page-animation-cancel",{bubbles:!0});null===(s=this.dispatchEvent)||void 0===s||s.call(this,o)}cleanUpAnimation(t){t&&(t.commitStyles(),t.cancel())}async animate(){var t,e,n,i,s,o,a,r,l,u;if(this._isPlaying&&(this.cancel(),this._onEnd&&this._onEnd(),this.reset()),this._currentScreen&&this._nextScreen&&this._shouldAnimate){if(this._gestureNavigating&&await this._currentScreen.mounted(!0),this._backNavigating?(this._currentScreen.zIndex=1,this._nextScreen.zIndex=0):(this._currentScreen.zIndex=0,this._nextScreen.zIndex=1),this._onProgress&&this._onProgress(this.progress),this._onExit&&this._shouldAnimate&&this._onExit(),await this._nextScreen.mounted(!0),this._outAnimation=this._currentScreen.animation,this._pseudoElementOutAnimation=this._currentScreen.pseudoElementAnimation,this._inAnimation=this._nextScreen.animation,this._pseudoElementInAnimation=this._nextScreen.pseudoElementAnimation,this._isPlaying=!0,this._inAnimation&&this._outAnimation){if(!this._shouldAnimate)return this.finish(),this._isPlaying=!1,void(this._shouldAnimate=!0);if(this._inAnimation.playbackRate=this._playbackRate,this._outAnimation.playbackRate=this._playbackRate,this._pseudoElementInAnimation&&(this._pseudoElementInAnimation.playbackRate=this._playbackRate),this._pseudoElementOutAnimation&&(this._pseudoElementOutAnimation.playbackRate=this._playbackRate),this._gestureNavigating){const t=(0,h.V_)(this._inAnimation,this.duration),e=(0,h.V_)(this._outAnimation,this.duration);if(this._inAnimation.currentTime=t,this._outAnimation.currentTime=e,this._pseudoElementInAnimation){const t=(0,h.V_)(this._pseudoElementInAnimation,this.duration);this._pseudoElementInAnimation.currentTime=t}if(this._pseudoElementOutAnimation){const t=(0,h.V_)(this._pseudoElementOutAnimation,this.duration);this._pseudoElementOutAnimation.currentTime=t}}await Promise.all([this._inAnimation.ready,this._outAnimation.ready,null===(t=this._pseudoElementInAnimation)||void 0===t?void 0:t.ready,null===(e=this._pseudoElementOutAnimation)||void 0===e?void 0:e.ready]),this._play?(this._outAnimation.play(),this._inAnimation.play(),null===(s=this._pseudoElementInAnimation)||void 0===s||s.play(),null===(o=this._pseudoElementOutAnimation)||void 0===o||o.play()):(this._inAnimation.pause(),this._outAnimation.pause(),null===(n=this._pseudoElementInAnimation)||void 0===n||n.pause(),null===(i=this._pseudoElementOutAnimation)||void 0===i||i.pause(),this._isPlaying=!1);const c=new CustomEvent("page-animation-start",{bubbles:!0});null===(a=this.dispatchEvent)||void 0===a||a.call(this,c),this.updateProgress(),await Promise.all([this._outAnimation.finished,this._inAnimation.finished,null===(r=this._pseudoElementInAnimation)||void 0===r?void 0:r.finished,null===(l=this._pseudoElementOutAnimation)||void 0===l?void 0:l.finished]),this.cleanUpAnimation(this._inAnimation),this.cleanUpAnimation(this._outAnimation),this._inAnimation=null,this._outAnimation=null,this._isPlaying=!1;const d=new CustomEvent("page-animation-end",{bubbles:!0});null===(u=this.dispatchEvent)||void 0===u||u.call(this,d),this._gestureNavigating&&.5!==this._playbackRate?(this._nextScreen.zIndex=0,this._currentScreen.zIndex=1,await this._nextScreen.mounted(!1)):(this._currentScreen.zIndex=0,this._nextScreen.zIndex=1,this._currentScreen.mounted(!1)),this._onEnd&&this._onEnd()}}else this._shouldAnimate=!0}set onProgress(t){this._onProgress=t}set onEnd(t){this._onEnd=t}set shouldAnimate(t){this._shouldAnimate=t}set playbackRate(t){this._playbackRate=t,this._inAnimation&&this._outAnimation&&(this._inAnimation.playbackRate=this._playbackRate,this._outAnimation.playbackRate=this._playbackRate),this._pseudoElementInAnimation&&(this._pseudoElementInAnimation.playbackRate=this._playbackRate),this._pseudoElementOutAnimation&&(this._pseudoElementOutAnimation.playbackRate=this._playbackRate)}set gestureNavigating(t){this._gestureNavigating=t}set backNavigating(t){this._backNavigating=t}set play(t){var e,n,i,s,o,a,r,h;this._play!==t&&(this._play=t,this._play&&this._gestureNavigating&&this.updateProgress(),t?(null===(e=this._inAnimation)||void 0===e||e.play(),null===(n=this._outAnimation)||void 0===n||n.play(),null===(i=this._pseudoElementInAnimation)||void 0===i||i.play(),null===(s=this._pseudoElementOutAnimation)||void 0===s||s.play()):(null===(o=this._inAnimation)||void 0===o||o.pause(),null===(a=this._outAnimation)||void 0===a||a.pause(),null===(r=this._pseudoElementInAnimation)||void 0===r||r.pause(),null===(h=this._pseudoElementOutAnimation)||void 0===h||h.pause()))}set progress(t){this._onProgress&&this._onProgress(t);{let e=(0,h.V_)(this._inAnimation,this.duration);const n=t/100*Number(e);let i=(0,h.V_)(this._outAnimation,this.duration);const s=t/100*Number(i);this._inAnimation&&this._outAnimation&&(this._inAnimation.currentTime=n,this._outAnimation.currentTime=s)}{let e=(0,h.V_)(this._pseudoElementInAnimation,this.duration);const n=t/100*Number(e);let i=(0,h.V_)(this._pseudoElementOutAnimation,this.duration);const s=t/100*Number(i);this._pseudoElementInAnimation&&(this._pseudoElementInAnimation.currentTime=n),this._pseudoElementOutAnimation&&(this._pseudoElementOutAnimation.currentTime=s)}}set currentScreen(t){this._currentScreen=t}set nextScreen(t){this._nextScreen=t,this._currentScreen||(t.mounted(!0,!1),this._nextScreen=null)}set onExit(t){this._onExit=t}set addEventListener(t){this._addEventListener=t}set dispatchEvent(t){this._dispatchEvent=t}get addEventListener(){return this._addEventListener}get dispatchEvent(){return this._dispatchEvent}get duration(){var t,e,n,i;const s=null===(t=this._currentScreen)||void 0===t?void 0:t.duration,o=null===(e=this._nextScreen)||void 0===e?void 0:e.duration,a=null===(n=this._currentScreen)||void 0===n?void 0:n.pseudoElementDuration,r=null===(i=this._nextScreen)||void 0===i?void 0:i.pseudoElementDuration;return Math.max(Number(s),Number(o),Number(a),Number(r))||0}get progress(){var t,e,n,i,s,o,a,r,h,l,u,c,d,p,m,v;const f=null===(e=null===(t=this._outAnimation)||void 0===t?void 0:t.effect)||void 0===e?void 0:e.getComputedTiming().duration,g=null===(i=null===(n=this._inAnimation)||void 0===n?void 0:n.effect)||void 0===i?void 0:i.getComputedTiming().duration,y=null===(o=null===(s=this._pseudoElementOutAnimation)||void 0===s?void 0:s.effect)||void 0===o?void 0:o.getComputedTiming().duration,_=null===(r=null===(a=this._pseudoElementInAnimation)||void 0===a?void 0:a.effect)||void 0===r?void 0:r.getComputedTiming().duration,E=[Number(f),Number(g),Number(_),Number(y)],w=Math.max(...E.filter((t=>!isNaN(t))));let b;return w===Number(f)?b=null===(l=null===(h=this._outAnimation)||void 0===h?void 0:h.effect)||void 0===l?void 0:l.getComputedTiming().progress:w===Number(g)?b=null===(c=null===(u=this._inAnimation)||void 0===u?void 0:u.effect)||void 0===c?void 0:c.getComputedTiming().progress:w===Number(_)?b=null===(p=null===(d=this._pseudoElementInAnimation)||void 0===d?void 0:d.effect)||void 0===p?void 0:p.getComputedTiming().progress:w===Number(y)&&(b=null===(v=null===(m=this._pseudoElementOutAnimation)||void 0===m?void 0:m.effect)||void 0===v?void 0:v.getComputedTiming().progress),100*(Number(b)||0)}get gestureNavigating(){return this._gestureNavigating}get backNavigating(){return this._backNavigating}get isPlaying(){return this._isPlaying}get ready(){return new Promise((async(t,e)=>{var n,i,s,o;try{await Promise.all([null===(n=this._outAnimation)||void 0===n?void 0:n.ready,null===(i=this._inAnimation)||void 0===i?void 0:i.ready,null===(s=this._pseudoElementInAnimation)||void 0===s?void 0:s.ready,null===(o=this._pseudoElementOutAnimation)||void 0===o?void 0:o.ready]),t()}catch(t){e(t)}}))}get finished(){return new Promise((async(t,e)=>{var n,i,s,o;try{await Promise.all([null===(n=this._outAnimation)||void 0===n?void 0:n.finished,null===(i=this._inAnimation)||void 0===i?void 0:i.finished,null===(s=this._pseudoElementInAnimation)||void 0===s?void 0:s.finished,null===(o=this._pseudoElementOutAnimation)||void 0===o?void 0:o.finished]),t()}catch(t){e(t)}}))}get started(){return new Promise((async t=>{var e;null===(e=this.addEventListener)||void 0===e||e.call(this,"page-animation-start",(()=>{t()}),{once:!0})}))}}const u=(0,t.createContext)(new l);var c=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};const d=(0,t.createContext)(0);function p(e,n,i,s){const{paths:o}=n;let a,r,l,u,c,d=!1,p=!1,m=null;n.paths.length&&(!(0,h.e1)(s,o)&&n.paths.includes(void 0)&&(s=void 0),""!==i&&!(0,h.e1)(i,o)&&n.paths.includes(void 0)&&(i=void 0));const v=[];let f;if(t.default.Children.forEach(n.children,(o=>{var a;if(!t.default.isValidElement(o))return;(0,h.QN)(o.props.resolvedPathname,s)&&(e.backNavigating||n.gestureNavigating)&&(null===(a=o.props.config)||void 0===a?void 0:a.keepAlive)&&(f=o.key||void 0);const r=(0,h.QN)(o.props.resolvedPathname,i);if(r&&!p){let e={out:!0,in:!1};n.gestureNavigating&&(e={in:!0,out:!1}),p=!0,v.push(t.default.cloneElement(o,Object.assign(Object.assign({},e),{resolvedPathname:r.matchedPathname})))}})),t.default.Children.forEach(e.children,(e=>{if(!t.default.isValidElement(e))return;n.paths.length||o.push(e.props.path);const i=(0,h.QN)(e.props.path,s);if(i&&!d){d=!0;const{config:s}=e.props;a=null==s?void 0:s.swipeDirection,r=null==s?void 0:s.swipeAreaWidth,u=null==s?void 0:s.hysteresis,c=null==s?void 0:s.disableDiscovery,l=null==s?void 0:s.minFlingVelocity,m=e.props.name||null;let o={in:!0,out:!1};n.gestureNavigating&&(o={out:!0,in:!1});const h=f||Math.random();v.push(t.default.cloneElement(e,Object.assign(Object.assign({},o),{resolvedPathname:i.matchedPathname,key:h})))}})),!t.default.Children.count(v)){return{children:t.default.Children.map(e.children,(e=>{var n;if(t.default.isValidElement(e)&&(0,h.QN)(e.props.path,void 0)){const{config:i}=e.props;return a=null==i?void 0:i.swipeDirection,r=null==i?void 0:i.swipeAreaWidth,u=null==i?void 0:i.hysteresis,c=null==i?void 0:i.disableDiscovery,l=null==i?void 0:i.minFlingVelocity,m=null!==(n=e.props.name)&&void 0!==n?n:null,t.default.cloneElement(e,{in:!0,out:!1})}})),name:m,swipeDirection:a||e.swipeDirection,swipeAreaWidth:r||e.swipeAreaWidth,hysteresis:u||e.hysteresis,disableDiscovery:void 0===c?e.disableDiscovery:c,minFlingVelocity:l||e.minFlingVelocity}}return{paths:o,children:v,name:m,currentPath:e.currentPath,swipeDirection:a||e.swipeDirection,swipeAreaWidth:r||e.swipeAreaWidth,hysteresis:u||e.hysteresis,disableDiscovery:void 0===c?e.disableDiscovery:c,minFlingVelocity:l||e.minFlingVelocity}}class m extends t.default.Component{constructor(){super(...arguments),this.onSwipeStartListener=this.onSwipeStart.bind(this),this.onSwipeListener=this.onSwipe.bind(this),this.onSwipeEndListener=this.onSwipeEnd.bind(this),this.ref=null,this.state={currentPath:"",children:this.props.children,progress:100,shouldPlay:!0,gestureNavigating:!1,shouldAnimate:!0,startX:0,startY:0,paths:[],swipeDirection:this.props.swipeDirection,swipeAreaWidth:this.props.swipeAreaWidth,minFlingVelocity:this.props.minFlingVelocity,hysteresis:this.props.hysteresis,disableDiscovery:!1},this.setRef=t=>{this.ref&&this.ref.removeEventListener("swipestart",this.onSwipeStartListener),this.ref=t,t&&t.addEventListener("swipestart",this.onSwipeStartListener)}}static getDerivedStateFromProps(t,e){if(t.currentPath!==e.currentPath){if(!e.shouldAnimate)return{currentPath:t.currentPath,shouldAnimate:!0};let n=t.currentPath;const i=p(t,e,e.currentPath,t.currentPath),{name:s}=i,o=c(i,["name"]);return o.children.sort(((t,e)=>(0,h.QN)(t.props.path,n)?1:-1)),t.onDocumentTitleChange(s),o}return null}componentDidMount(){this.context.onProgress=t=>{const e=this.props.backNavigating&&!this.state.gestureNavigating?99-t:t,n=(0,h.uZ)(e,0,100);this.setState({progress:n});const i=new CustomEvent("motion-progress",{detail:{progress:n}});this.props.dispatchEvent&&this.props.dispatchEvent(i)}}componentDidUpdate(t,e){t.currentPath!==this.state.currentPath&&!this.state.gestureNavigating&&e.shouldAnimate&&(this.context.play=!0,this.context.backNavigating=this.props.backNavigating,this.context.animate())}onGestureSuccess(t,e){this.props.onDocumentTitleChange(e),this.setState(t)}onSwipeStart(t){if(t.touches.length>1)return;if(this.state.disableDiscovery)return;if(this.context.isPlaying)return;if(0===this.context.duration)return;let e;switch(this.state.swipeDirection){case"left":case"right":e=t.x;break;case"up":case"down":e=t.y}if(t.direction===this.state.swipeDirection&&e<this.state.swipeAreaWidth){if(!this.props.lastPath)return;t.stopPropagation();for(let e of t.composedPath().reverse())if("classList"in e&&e.classList.length){if(e.classList.contains("gesture-region")&&"true"===e.dataset.disabled)return;if(e===t.gestureTarget)break}const e=p(this.props,Object.assign(Object.assign({},this.state),{gestureNavigating:!0}),this.props.currentPath,this.props.lastPath),{children:n,currentPath:i,paths:s,name:o}=e,a=c(e,["children","currentPath","paths","name"]);this.onGestureSuccess=this.onGestureSuccess.bind(this,a,o),this.props.navigation.addEventListener("go-back",this.onGestureSuccess,{once:!0}),this.props.onGestureNavigationStart(),this.setState({shouldPlay:!1,gestureNavigating:!0,children:n.sort((t=>(0,h.QN)(t.props.path,i)?-1:1)),startX:t.x,startY:t.y},(()=>{var t,e;const n=new CustomEvent("motion-progress-start");this.context.gestureNavigating=!0,this.context.playbackRate=-1,this.context.play=!1,this.context.backNavigating=this.props.backNavigating,this.context.animate(),this.props.dispatchEvent&&this.props.dispatchEvent(n),null===(t=this.ref)||void 0===t||t.addEventListener("swipe",this.onSwipeListener),null===(e=this.ref)||void 0===e||e.addEventListener("swipeend",this.onSwipeEndListener)}))}}onSwipe(t){if(this.state.shouldPlay)return;let e;switch(this.state.swipeDirection){case"left":case"right":{const n=window.innerWidth;e=-((0,h.uZ)(t.x-this.state.startX,10)-n)/n*100,"left"===this.state.swipeDirection&&(e=100-e);break}case"up":case"down":{const n=window.innerHeight;e=-((0,h.uZ)(t.y-this.state.startY,10)-n)/n*100,"up"===this.state.swipeDirection&&(e=100-e);break}}this.context.progress=(0,h.uZ)(e,.1,100)}onSwipeEnd(t){var e,n;if(this.state.shouldPlay)return;let i=null;const s=new CustomEvent("motion-progress-end");100-this.state.progress>this.state.hysteresis||t.velocity>this.state.minFlingVelocity?(t.velocity>=this.state.minFlingVelocity?this.context.playbackRate=-5:this.context.playbackRate=-1,i=()=>{this.context.reset(),this.props.onGestureNavigationEnd(),this.setState({gestureNavigating:!1}),this.props.dispatchEvent&&this.props.dispatchEvent(s)},this.setState({shouldPlay:!0,shouldAnimate:!1})):(this.context.playbackRate=.5,i=()=>{this.props.navigation.removeEventListener("go-back",this.onGestureSuccess),this.context.reset(),this.props.dispatchEvent&&this.props.dispatchEvent(s)},this.setState({shouldPlay:!0,gestureNavigating:!1})),this.setState({startX:0,startY:0}),this.context.onEnd=i,this.context.play=!0,null===(e=this.ref)||void 0===e||e.removeEventListener("swipe",this.onSwipeListener),null===(n=this.ref)||void 0===n||n.removeEventListener("swipeend",this.onSwipeEndListener)}render(){return(0,r.jsx)("div",Object.assign({className:"animation-layer",ref:this.setRef,style:{width:"100%",height:"100%",position:"relative",[`--${this.props.navigation.routerId}-motion-progress`]:this.state.progress}},{children:(0,r.jsx)(d.Provider,Object.assign({value:this.state.progress},{children:this.state.children}))}))}}m.contextType=u;class v extends t.default.Component{constructor(){super(...arguments),this.ref=null,this._currentScene=null,this._nextScene=null,this.onProgressStartListener=this.onProgressStart.bind(this),this.onProgressListener=this.onProgress.bind(this),this.onProgressEndListener=this.onProgressEnd.bind(this),this.state={transitioning:!1,playing:!0}}set currentScene(t){this._currentScene=t}set nextScene(t){this._nextScene=t,!this._currentScene||this._currentScene.isEmpty()||this._nextScene.isEmpty()?(this._currentScene=null,this._nextScene=null):this.sharedElementTransition(this._currentScene,this._nextScene)}finish(){var t;const e=(null===(t=this.ref)||void 0===t?void 0:t.getAnimations({subtree:!0}))||[];for(const t of e)t.finish()}sharedElementTransition(t,e){if(0===this.context.duration)return;if(this.state.transitioning)return void this.finish();const n=()=>{this.setState({transitioning:!1}),this._nextScene=null,this._currentScene=null},i=()=>{var t;const e=(null===(t=this.ref)||void 0===t?void 0:t.getAnimations({subtree:!0}))||[];for(const t of e)t.cancel();n()},s=queueMicrotask.bind(null,(async()=>{var s,o,a,r,l,u,c,d,p,m,v,f,g,y,_,E,w,b,x,S,P,A,L,R,D,k,O,N,I,T,C,j,$,M,U,F,V,z,Y,X,B,H,W,G,K,q;for(const[n,i]of t.nodes)if(e.nodes.has(n)){const J=e.nodes.get(n).instance,Q=i.instance,Z=J.transitionType||Q.transitionType||"morph",tt=i.instance.node,et=e.nodes.get(n).instance.node;if(!tt||!et)continue;const nt=tt.firstElementChild,it=et.firstElementChild;if(!nt||!it)continue;const st=Q.clientRect,ot=J.clientRect;let at,rt,ht={},lt={};"morph"===Z&&([at,ht]=Q.CSSData,[rt,lt]=J.CSSData),at=Q.CSSText,rt=J.CSSText,nt.style.cssText=at,"morph"!==Z&&(it.style.cssText=rt,et.style.position="absolute",it.style.position="absolute",et.style.zIndex=it.style.zIndex,et.style.top="0",et.style.left="0"),tt.style.position="absolute",nt.style.position="absolute",tt.style.zIndex=nt.style.zIndex,tt.style.top="0",tt.style.left="0";const ut={id:Q.id,start:{x:{node:tt,delay:null!==(l=null!==(a=null===(o=null===(s=Q.props.config)||void 0===s?void 0:s.x)||void 0===o?void 0:o.delay)&&void 0!==a?a:null===(r=J.props.config)||void 0===r?void 0:r.delay)&&void 0!==l?l:0,duration:(null===(c=null===(u=Q.props.config)||void 0===u?void 0:u.x)||void 0===c?void 0:c.duration)||(null===(d=J.props.config)||void 0===d?void 0:d.duration)||this.context.duration,easingFunction:(null===(m=null===(p=Q.props.config)||void 0===p?void 0:p.x)||void 0===m?void 0:m.easingFunction)||(null===(v=Q.props.config)||void 0===v?void 0:v.easingFunction)||"ease",position:st.x-(this.state.playing?0:t.x)},y:{node:nt,delay:null!==(E=null!==(y=null===(g=null===(f=Q.props.config)||void 0===f?void 0:f.y)||void 0===g?void 0:g.delay)&&void 0!==y?y:null===(_=J.props.config)||void 0===_?void 0:_.delay)&&void 0!==E?E:0,duration:(null===(b=null===(w=Q.props.config)||void 0===w?void 0:w.y)||void 0===b?void 0:b.duration)||(null===(x=J.props.config)||void 0===x?void 0:x.duration)||this.context.duration,easingFunction:(null===(P=null===(S=Q.props.config)||void 0===S?void 0:S.y)||void 0===P?void 0:P.easingFunction)||(null===(A=Q.props.config)||void 0===A?void 0:A.easingFunction)||"ease",position:st.y-(this.state.playing?0:t.y)}},end:{x:{node:et,delay:null!==(O=null!==(D=null===(R=null===(L=J.props.config)||void 0===L?void 0:L.x)||void 0===R?void 0:R.delay)&&void 0!==D?D:null===(k=J.props.config)||void 0===k?void 0:k.delay)&&void 0!==O?O:0,duration:(null===(I=null===(N=J.props.config)||void 0===N?void 0:N.x)||void 0===I?void 0:I.duration)||(null===(T=J.props.config)||void 0===T?void 0:T.duration)||this.context.duration,easingFunction:(null===(j=null===(C=J.props.config)||void 0===C?void 0:C.x)||void 0===j?void 0:j.easingFunction)||(null===($=J.props.config)||void 0===$?void 0:$.easingFunction)||"ease",position:ot.x-(this.state.playing?e.x:0)},y:{node:it,delay:null!==(z=null!==(F=null===(U=null===(M=J.props.config)||void 0===M?void 0:M.y)||void 0===U?void 0:U.delay)&&void 0!==F?F:null===(V=J.props.config)||void 0===V?void 0:V.delay)&&void 0!==z?z:0,duration:(null===(X=null===(Y=J.props.config)||void 0===Y?void 0:Y.y)||void 0===X?void 0:X.duration)||(null===(B=J.props.config)||void 0===B?void 0:B.duration)||this.context.duration,easingFunction:(null===(W=null===(H=J.props.config)||void 0===H?void 0:H.x)||void 0===W?void 0:W.easingFunction)||(null===(G=J.props.config)||void 0===G?void 0:G.easingFunction)||"ease",position:ot.y-(this.state.playing?e.y:0)}}};if(this.state.playing?(ut.end.x.position=ut.end.x.position/e.xRatio,ut.end.y.position=ut.end.y.position/e.yRatio):(ut.start.x.position=ut.start.x.position/t.xRatio,ut.start.y.position=ut.start.y.position/t.yRatio),tt.style.display="unset",null===(K=this.ref)||void 0===K||K.appendChild(tt),Q.onCloneAppended(tt),"morph"!==Z){const t=parseInt(tt.style.zIndex)||0,e=parseInt(et.style.zIndex)||0;et.style.zIndex=`${(0,h.uZ)(e,0,t-1)}`,et.style.display="unset",null===(q=this.ref)||void 0===q||q.appendChild(et),J.onCloneAppended(et)}else J.onCloneAppended(tt);let ct,dt,pt,mt;Q.hidden(!0),J.hidden(!0),tt.style.willChange="contents, transform, opacity","morph"!==Z&&(et.style.willChange="contents, transform, opacity"),"morph"===Z?(ct=ut.start.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`},{transform:`translate(${ut.end.x.position}px, 0px)`}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-start`}),dt=ut.start.y.node.animate([Object.assign(Object.assign({},ht),{transform:`translate(0px, ${ut.start.y.position}px)`}),Object.assign(Object.assign({},lt),{transform:`translate(0px, ${ut.end.y.position}px)`})],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-start`})):"fade"===Z?(ct=ut.start.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:1},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:0}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-start`}),dt=ut.start.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-start`}),pt=ut.end.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`},{transform:`translate(${ut.end.x.position}px, 0px)`}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-end`}),mt=ut.end.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-end`})):"fade-through"===Z?(ct=ut.start.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:1},{opacity:0,offset:.5},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:0}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-start`}),dt=ut.start.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-start`}),pt=ut.end.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:0},{opacity:0,offset:.5},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:1}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-end`}),mt=ut.end.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-end`})):(ct=ut.start.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:1},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:0}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-start`}),dt=ut.start.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-start`}),pt=ut.end.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:0},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:1}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-end`}),mt=ut.end.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-end`}));const vt=[ct,dt,pt,mt];this.state.playing||vt.forEach((t=>{var e;if(!t)return;const n=this.context.duration;let i=null===(e=t.effect)||void 0===e?void 0:e.getComputedTiming().duration;"string"==typeof i&&(i=parseFloat(i)),i=i||n,t.currentTime=i,t.pause()}));const ft=async()=>{console.assert(n===J.id,"Not sure what happened here."),console.assert(n===Q.id,"Not sure what happened here."),tt.style.willChange="auto","morph"!==Z&&(et.style.willChange="auto"),await J.hidden(!1),t.keepAlive&&this.state.playing?Q.keepAlive(!0):(Q.keepAlive(!1),await Q.hidden(!1)),this.state.playing&&(Q.onCloneRemove(tt),"morph"!==Z?(J.onCloneRemove(et),et.remove()):J.onCloneRemove(tt),tt.remove())},gt=async()=>{tt.style.willChange="auto","morph"!==Z&&(et.style.willChange="auto"),await Q.hidden(!1),await J.hidden(!1)};Promise.all(vt.map((t=>null==t?void 0:t.finished))).then(ft).catch(gt)}this.ref&&Promise.all(this.ref.getAnimations({subtree:!0}).map((t=>t.finished))).then(n).catch(i)}));this.setState({transitioning:!0},s),this.props.navigation.addEventListener("page-animation-cancel",i,{once:!0})}componentDidMount(){this.props.instance&&this.props.instance(this),this.props.navigation.addEventListener("motion-progress-start",this.onProgressStartListener,{capture:!0}),this.props.navigation.addEventListener("motion-progress",this.onProgressListener,{capture:!0}),this.props.navigation.addEventListener("motion-progress-end",this.onProgressEndListener,{capture:!0})}componentWillUnmount(){this.props.navigation.removeEventListener("motion-progress-start",this.onProgressStartListener,{capture:!0}),this.props.navigation.removeEventListener("motion-progress",this.onProgressListener,{capture:!0}),this.props.navigation.removeEventListener("motion-progress-end",this.onProgressEndListener,{capture:!0})}onProgressStart(){this.setState({playing:!1})}onProgress(t){var e,n;if(!this.state.playing){const i=(null===(e=this.ref)||void 0===e?void 0:e.getAnimations({subtree:!0}))||[];for(const e of i){const i=t.detail.progress,s=this.context.duration;let o=null===(n=e.effect)||void 0===n?void 0:n.getComputedTiming().duration;"string"==typeof o&&(o=parseFloat(o)),o=o||s;const a=i/100*Number(o);e.currentTime=a}}}onProgressEnd(){this.state.playing||this.finish(),this.setState({playing:!0,transitioning:!1})}render(){return this.state.transitioning?(0,r.jsx)("div",{id:"ghost-layer",ref:t=>this.ref=t,style:{position:"absolute",zIndex:1e3,width:"100vw",height:"100vh",contain:"strict"}}):(0,r.jsx)(r.Fragment,{})}}v.contextType=u;class f extends t.default.Component{constructor(t){var e;super(t),this.animationLayerData=new l,this.ref=null,this.dispatchEvent=null,this.addEventListener=null,this.removeEventListener=null,this.state={currentPath:"",backNavigating:!1,gestureNavigating:!1,routesData:new Map,implicitBack:!1,defaultDocumentTitle:document.title},this.onDocumentTitleChange=t=>{document.title=t||this.state.defaultDocumentTitle},this.setRef=t=>{this.ref&&(this.dispatchEvent=null,this.addEventListener=null,this.removeEventListener=null,this.animationLayerData.dispatchEvent=this.dispatchEvent,this._routerData.dispatchEvent=this.dispatchEvent,this._routerData.addEventListener=this.addEventListener,this._routerData.removeEventListener=this.removeEventListener,this.removeNavigationEventListeners(this.ref)),t&&(this.dispatchEvent=e=>(0,h.Nu)(e,t),this.addEventListener=(e,n,i)=>t.addEventListener(e,n,i),this.removeEventListener=(e,n,i)=>t.removeEventListener(e,n,i),this.animationLayerData.dispatchEvent=this.dispatchEvent,this.animationLayerData.addEventListener=this.addEventListener,this._routerData.dispatchEvent=this.dispatchEvent,this._routerData.addEventListener=this.addEventListener,this._routerData.removeEventListener=this.removeEventListener,this.addNavigationEventListeners(t))},this._id=null!==(e=t.id)&&void 0!==e?e:Math.random().toString().replace(".","-"),t.config?this.config=t.config:this.config={animation:h.r2}}componentDidMount(){this._routerData.paramsDeserializer=this.props.config.paramsDeserializer,this._routerData.paramsSerializer=this.props.config.paramsSerializer,window.addEventListener("popstate",this.onPopStateListener)}componentWillUnmount(){this.navigation.destructor(),this._routerData.destructor(),this.ref&&this.removeNavigationEventListeners(this.ref),window.removeEventListener("popstate",this.onPopStateListener)}initialise(t){let e=t.location.pathname;const n=this._routerData.paramsDeserializer||null,i=(0,h.fJ)(window.location.search,n),s=this.state.routesData;this._routerData.routesData=this.state.routesData,i&&s.set(e,Object.assign(Object.assign({},this.state.routesData.get(e)),{params:i})),this.setState({currentPath:e,routesData:s}),this._routerData.currentPath=e}get id(){return this._id}get parentRouterData(){return this._routerData.parentRouterData}get baseURL(){var t;const e=window.location.origin,n=this.props.config.basePathname||"";if(this.parentRouterData){const e=this.parentRouterData.navigation.history.baseURL,i=(null===(t=this.parentRouterData.mountedScreen)||void 0===t?void 0:t.resolvedPathname)||"";return(0,h.PV)(n,(0,h.PV)(i,e))}return new URL(n,e)}addNavigationEventListeners(t){t.addEventListener("go-back",this.onBackListener),t.addEventListener("navigate",this.onNavigateListener)}removeNavigationEventListeners(t){t.removeEventListener("go-back",this.onBackListener),t.removeEventListener("navigate",this.onNavigateListener)}render(){return(0,r.jsx)("div",Object.assign({id:this._id.toString(),className:"react-motion-router",style:{width:"100%",height:"100%"},ref:this.setRef},{children:(0,r.jsx)(n.Consumer,{children:t=>(this._routerData.parentRouterData=t,(0,r.jsx)(n.Provider,Object.assign({value:this._routerData},{children:(0,r.jsxs)(u.Provider,Object.assign({value:this.animationLayerData},{children:[Boolean(this.navigation)&&(0,r.jsx)(v,{instance:t=>{this._routerData.ghostLayer=t},backNavigating:this.state.backNavigating,gestureNavigating:this.state.gestureNavigating,navigation:this._routerData.navigation,animationLayerData:this.animationLayerData}),Boolean(this.navigation)&&(0,r.jsx)(m,Object.assign({disableBrowserRouting:this.props.config.disableBrowserRouting||!1,disableDiscovery:this.props.config.disableDiscovery||!1,hysteresis:this.props.config.hysteresis||50,minFlingVelocity:this.props.config.minFlingVelocity||400,swipeAreaWidth:this.props.config.swipeAreaWidth||100,swipeDirection:this.props.config.swipeDirection||"right",navigation:this._routerData.navigation,backNavigating:this.state.backNavigating,currentPath:this.navigation.history.current,lastPath:this.navigation.history.previous,onGestureNavigationStart:this.onGestureNavigationStart,onGestureNavigationEnd:this.onGestureNavigationEnd,onDocumentTitleChange:this.onDocumentTitleChange,dispatchEvent:this.dispatchEvent},{children:this.props.children}))]}))})))})}))}}f.defaultProps={config:{animation:h.r2}};const g={"slide-right-in":[{transform:"translateX(100vw)"},{transform:"translateX(0vw)"}],"slide-back-right-in":[{transform:"translateX(50vw)"},{transform:"translateX(0vw)"}],"slide-right-out":[{transform:"translateX(0vw)"},{transform:"translateX(-50vw)"}],"slide-back-right-out":[{transform:"translateX(0vw)"},{transform:"translateX(-100vw)"}],"slide-left-in":[{transform:"translateX(-100vw)"},{transform:"translateX(0vw)"}],"slide-back-left-in":[{transform:"translateX(-50vw)"},{transform:"translateX(0vw)"}],"slide-left-out":[{transform:"translateX(0vw)"},{transform:"translateX(50vw)"}],"slide-back-left-out":[{transform:"translateX(0vw)"},{transform:"translateX(100vw)"}],"slide-up-in":[{transform:"translateY(100vh)"},{transform:"translateY(0vh)"}],"slide-back-up-in":[{transform:"translateY(50vh)"},{transform:"translateY(0vh)"}],"slide-up-out":[{transform:"translateY(0vh)"},{transform:"translateY(-50vh)"}],"slide-back-up-out":[{transform:"translateY(0vh)"},{transform:"translateY(-100vh)"}],"slide-down-in":[{transform:"translateY(-100vh)"},{transform:"translateY(0vh)"}],"slide-back-down-in":[{transform:"translateY(-50vh)"},{transform:"translateY(0vh)"}],"slide-down-out":[{transform:"translateY(0vh)"},{transform:"translateY(50vh)"}],"slide-back-down-out":[{transform:"translateY(0vh)"},{transform:"translateY(100vh)"}],"zoom-in-in":[{transform:"scale(0.85)",opacity:0},{transform:"scale(1)",opacity:1}],"zoom-in-out":[{transform:"scale(1)",opacity:1},{transform:"scale(1.15)",opacity:0}],"zoom-out-in":[{transform:"scale(1.15)",opacity:0},{transform:"scale(1)",opacity:1}],"zoom-out-out":[{transform:"scale(1)",opacity:1},{transform:"scale(0.85)",opacity:0}],"fade-in":[{opacity:0},{opacity:1}],"fade-out":[{opacity:1},{opacity:0}],none:[]},y={left:"right",right:"left",up:"down",down:"up",in:"out",out:"in"};class _ extends t.default.Component{constructor(){super(...arguments),this._animationLayerData=null,this.ref=null,this.onAnimationEnd=this.animationEnd.bind(this),this.onNavigate=this.navigate.bind(this),this.setRef=this.onRef.bind(this),this.state={mounted:!1,zIndex:0}}onRef(t){this.ref=t}animationEnd(){this.ref&&(this.ref.style.willChange="auto",this.ref.style.pointerEvents="auto")}navigate(){this.ref&&(this.ref.style.willChange="transform, opacity",this.ref.style.pointerEvents="none")}componentDidMount(){this.props.navigation.addEventListener("page-animation-start",this.onNavigate),this.props.navigation.addEventListener("motion-progress-start",this.onNavigate),this.props.navigation.addEventListener("page-animation-end",this.onAnimationEnd),this.props.navigation.addEventListener("motion-progress-end",this.onAnimationEnd),this._animationLayerData&&(this.props.in&&(this._animationLayerData.nextScreen=this),this.props.out&&(this._animationLayerData.onExit=this.props.onExit,this._animationLayerData.currentScreen=this))}componentDidUpdate(t){this._animationLayerData&&(this.props.out===t.out&&this.props.in===t.in||(this.props.out?(this._animationLayerData.onExit=this.props.onExit,this._animationLayerData.currentScreen=this):this.props.in&&(this._animationLayerData.nextScreen=this)))}componentWillUnmount(){this.props.navigation.removeEventListener("page-animation-start",this.onNavigate),this.props.navigation.removeEventListener("motion-progress-start",this.onNavigate),this.props.navigation.removeEventListener("page-animation-end",this.onAnimationEnd),this.props.navigation.removeEventListener("motion-progress-end",this.onAnimationEnd)}getAnimationConfig(t,e){"function"==typeof e&&(e=e());const n=e[t];if(!("type"in n))return n;{let e=n.direction,i="";switch(this.props.backNavigating&&e&&("zoom"!==n.type&&"slide"!==n.type||(e=y[e],i="back-")),n.type){case"slide":return"in"!==e&&"out"!==e||(e="left"),[`slide-${i}${e||"left"}-${t}`,n.duration,n.easingFunction];case"zoom":return"in"!==e&&"out"!==e&&(e="in"),[`zoom-${e||"in"}-${t}`,n.duration,n.easingFunction];case"fade":return[`fade-${t}`,n.duration,n.easingFunction];default:return["none",n.duration,void 0]}}}get pseudoElementInAnimation(){return this.props.pseudoElement?this.getAnimationConfig("in",this.props.pseudoElement.animation):null}get pseudoElementOutAnimation(){return this.props.pseudoElement?this.getAnimationConfig("out",this.props.pseudoElement.animation):null}get inAnimation(){return this.getAnimationConfig("in",this.props.animation)}get outAnimation(){return this.getAnimationConfig("out",this.props.animation)}get pseudoElementDuration(){var t;const e=this.props.in?this.pseudoElementInAnimation:this.pseudoElementOutAnimation;if(!e)return null;if(Array.isArray(e)){const[t,n]=e;return n}return"number"==typeof e.options?e.options:null===(t=e.options)||void 0===t?void 0:t.duration}get duration(){var t;const e=this.props.in?this.inAnimation:this.outAnimation;if(Array.isArray(e)){const[t,n]=e;return n}return"number"==typeof e.options?e.options:null===(t=e.options)||void 0===t?void 0:t.duration}get pseudoElementAnimation(){var t,e,n;if(!this.ref||!this.props.pseudoElement)return null;const i=this.props.pseudoElement.selector;let s=(null===(t=this._animationLayerData)||void 0===t?void 0:t.gestureNavigating)?"linear":"ease-out";if(this.props.in){if(Array.isArray(this.pseudoElementInAnimation)){const[t,e,n]=this.pseudoElementInAnimation;return new Animation(new KeyframeEffect(this.ref,g[t],{fill:"both",duration:e,easing:n||s,pseudoElement:i}))}{let{keyframes:t,options:n}=this.pseudoElementInAnimation;return n="number"==typeof n?{duration:n,easing:s,fill:"both",pseudoElement:i}:Object.assign(Object.assign({},n),{fill:(null==n?void 0:n.fill)||"both",duration:(null==n?void 0:n.duration)||(null===(e=this._animationLayerData)||void 0===e?void 0:e.duration),easing:(null==n?void 0:n.easing)||s,pseudoElement:i}),new Animation(new KeyframeEffect(this.ref,t,n))}}if(Array.isArray(this.pseudoElementOutAnimation)){const[t,e,n]=this.pseudoElementOutAnimation;return new Animation(new KeyframeEffect(this.ref,g[t],{fill:"both",duration:e,easing:n||s,pseudoElement:i}))}{let{keyframes:t,options:e}=this.pseudoElementOutAnimation;return e="number"==typeof e?{duration:e,easing:s,fill:"both",pseudoElement:i}:Object.assign(Object.assign({},e),{easing:(null==e?void 0:e.easing)||s,duration:(null==e?void 0:e.duration)||(null===(n=this._animationLayerData)||void 0===n?void 0:n.duration),fill:(null==e?void 0:e.fill)||"both",pseudoElement:i}),new Animation(new KeyframeEffect(this.ref,t,e))}}get animation(){var t,e,n;if(!this.ref)return null;let i=(null===(t=this._animationLayerData)||void 0===t?void 0:t.gestureNavigating)?"linear":"ease-out";if(this.props.in){if(Array.isArray(this.inAnimation)){const[t,e,n]=this.inAnimation;return new Animation(new KeyframeEffect(this.ref,g[t],{fill:"both",duration:e,easing:n||i}))}{let{keyframes:t,options:n}=this.inAnimation;return n="number"==typeof n?{duration:n,easing:i,fill:"both"}:Object.assign(Object.assign({},n),{fill:(null==n?void 0:n.fill)||"both",duration:(null==n?void 0:n.duration)||(null===(e=this._animationLayerData)||void 0===e?void 0:e.duration),easing:(null==n?void 0:n.easing)||i}),new Animation(new KeyframeEffect(this.ref,t,n))}}if(Array.isArray(this.outAnimation)){const[t,e,n]=this.outAnimation;return new Animation(new KeyframeEffect(this.ref,g[t],{fill:"both",duration:e,easing:n||i}))}{let{keyframes:t,options:e}=this.outAnimation;return e="number"==typeof e?{duration:e,easing:i,fill:"both"}:Object.assign(Object.assign({},e),{easing:(null==e?void 0:e.easing)||i,duration:(null==e?void 0:e.duration)||(null===(n=this._animationLayerData)||void 0===n?void 0:n.duration),fill:(null==e?void 0:e.fill)||"both"}),new Animation(new KeyframeEffect(this.ref,t,e))}}set zIndex(t){this.setState({zIndex:t})}mounted(t,e=!0){return new Promise((n=>{const i=()=>{var i,s;if(t){e&&this.ref&&(this.ref.style.willChange="transform, opacity");const t=Boolean(this.props.in&&!(null===(i=this._animationLayerData)||void 0===i?void 0:i.gestureNavigating)||this.props.out&&(null===(s=this._animationLayerData)||void 0===s?void 0:s.gestureNavigating));this.props.onEnter&&this.props.onEnter(t)}n()};this.props.keepAlive&&!t?n():this.setState({mounted:t},i)}))}render(){return(0,r.jsx)("div",Object.assign({id:`${this.props.name}-animation-provider`,className:"animation-provider",ref:this.setRef,style:{position:"absolute",width:"100%",height:"100%",contain:"strict",transformOrigin:"center center",zIndex:this.state.zIndex}},{children:(0,r.jsx)(u.Consumer,{children:t=>(this._animationLayerData=t,this.state.mounted?this.props.children:(0,r.jsx)(r.Fragment,{}))})}))}}var E,w,b,x,S,P,A;function L(t){return null!==t&&("function"==typeof t||"object"==typeof t&&t.$$typeof===Symbol.for("react.lazy"))}!function(t){t[t.up=0]="up",t[t.down=1]="down",t[t.left=2]="left",t[t.right=3]="right",t[t.in=4]="in",t[t.out=5]="out"}(E||(E={})),function(t){t[t.slide=0]="slide",t[t.fade=1]="fade",t[t.zoom=2]="zoom",t[t.none=3]="none"}(w||(w={})),function(t){t[t.ease=0]="ease",t[t["ease-in"]=1]="ease-in",t[t["ease-in-out"]=2]="ease-in-out",t[t["ease-out"]=3]="ease-out",t[t.linear=4]="linear"}(b||(b={})),function(t){t[t.center=0]="center",t[t.top=1]="top",t[t.bottom=2]="bottom",t[t.left=3]="left",t[t.right=4]="right"}(x||(x={})),function(t){t[t.cap=0]="cap",t[t.ch=1]="ch",t[t.em=2]="em",t[t.ex=3]="ex",t[t.ic=4]="ic",t[t.lh=5]="lh",t[t.rem=6]="rem",t[t.rlh=7]="rlh",t[t.vh=8]="vh",t[t.vw=9]="vw",t[t.vi=10]="vi",t[t.vb=11]="vb",t[t.vmin=12]="vmin",t[t.vmax=13]="vmax",t[t.px=14]="px",t[t.cm=15]="cm",t[t.mm=16]="mm",t[t.Q=17]="Q",t[t.in=18]="in",t[t.pc=19]="pc",t[t.pt=20]="pt",t[t["%"]=21]="%"}(S||(S={})),function(t){t[t.inital=0]="inital",t[t.inherit=1]="inherit",t[t.revert=2]="revert",t[t.unset=3]="unset"}(P||(P={})),function(t){t[t.morph=0]="morph",t[t["fade-through"]=1]="fade-through",t[t.fade=2]="fade",t[t["cross-fade"]=3]="cross-fade"}(A||(A={}));class R{constructor(t){this._nodes=new Map,this._name="",this._scrollPos=null,this._getScreenRect=()=>new DOMRect,this._keepAlive=!1,this._name=t}addNode(t){t&&(console.assert(!this.nodes.has(t.id),`Duplicate Shared Element ID: ${t.id} in ${this._name}`),this._nodes.set(t.id,t))}removeNode(t){this._nodes.delete(t)}get xRatio(){const t=(this._getScreenRect().width/window.innerWidth).toFixed(2);return parseFloat(t)}get yRatio(){const t=(this._getScreenRect().height/window.innerHeight).toFixed(2);return parseFloat(t)}get nodes(){return this._nodes}get name(){return this._name}get scrollPos(){return this._scrollPos||{x:0,y:0}}get x(){return this._getScreenRect().x}get y(){return this._getScreenRect().y}get keepAlive(){return this._keepAlive}set scrollPos(t){this._scrollPos=t}set getScreenRect(t){this._getScreenRect=t}set keepAlive(t){this._keepAlive=t}isEmpty(){return!Boolean(this._nodes.size)}}const D=(0,t.createContext)(null);function k(t,e,n){const i=e.firstElementChild;return i?(n.props.config&&n.props.config.transformOrigin&&(i.style.transformOrigin=n.props.config.transformOrigin),{id:t,instance:n}):null}const O=["transform","top","left","right","bottom"];class N extends t.default.Component{constructor(){super(...arguments),this._id=this.props.id.toString(),this._ref=null,this._scene=null,this._mutationObserver=new MutationObserver(this.updateScene.bind(this)),this._callbackID=0,this._computedStyle=null,this._isMounted=!1,this.onRef=this.setRef.bind(this),this.state={hidden:!1,keepAlive:!1},this.onCloneAppended=t=>{},this.onCloneRemove=t=>{var e;if((null===(e=this._ref)||void 0===e?void 0:e.firstElementChild)instanceof HTMLVideoElement){const e=t.firstElementChild;this._ref.firstElementChild.currentTime=e.currentTime,e.paused||e.pause()}}}get scene(){return this._scene}get node(){var t;return this._ref?this._ref.firstElementChild instanceof HTMLVideoElement&&"morph"===(null!==(t=this.transitionType)&&void 0!==t?t:"morph")?this._ref:this._ref.cloneNode(!0):null}get clientRect(){if(this._ref&&this._ref.firstElementChild){return this._ref.firstElementChild.getBoundingClientRect()}return new DOMRect}get CSSData(){const t=this._computedStyle;return t?(0,h.hR)(t,O):["",{}]}get CSSText(){const t=this._computedStyle;if(t){const[e]=(0,h.hR)(t,O,!1);return e}return""}get id(){return this._id}get transitionType(){var t;return null===(t=this.props.config)||void 0===t?void 0:t.type}keepAlive(t){return new Promise((e=>{this.setState({keepAlive:t},(()=>e()))}))}hidden(t){return new Promise(((e,n)=>{this._isMounted?this.setState({hidden:t},(()=>{e()})):e()}))}setRef(t){var e,n;this._ref!==t&&(this._ref&&(null===(e=this.scene)||void 0===e||e.removeNode(this._id),this._mutationObserver.disconnect(),this._computedStyle=null),this._ref=t,t&&(null===(n=this.scene)||void 0===n||n.addNode(k(this._id,t,this)),t.firstElementChild&&(this._computedStyle=window.getComputedStyle(t.firstElementChild),this._mutationObserver.observe(t.firstElementChild,{attributes:!0,childList:!0,subtree:!0}))))}updateScene(){const t=window.cancelIdleCallback?window.cancelIdleCallback:window.clearTimeout,e=window.requestIdleCallback?window.requestIdleCallback:window.setTimeout;t(this._callbackID),this._callbackID=e((()=>{var t,e;this._ref&&(null===(t=this.scene)||void 0===t||t.removeNode(this._id),null===(e=this.scene)||void 0===e||e.addNode(k(this._id,this._ref,this))),this._callbackID=0}))}componentDidMount(){this._isMounted=!0}componentDidUpdate(){var t,e;this._id!==this.props.id.toString()&&this._ref&&(null===(t=this.scene)||void 0===t||t.removeNode(this._id),this._id=this.props.id.toString(),null===(e=this.scene)||void 0===e||e.addNode(k(this._id,this._ref,this)))}componentWillUnmount(){this._isMounted=!1}render(){return(0,r.jsx)(D.Consumer,{children:t=>(this._scene=t,(0,r.jsx)("div",Object.assign({ref:this.onRef,id:`shared-element-${this._id}`,style:{display:this.state.hidden&&!this.keepAlive?"block":"contents",visibility:this.state.hidden?"hidden":"visible"}},{children:this.props.children})))})}}const I=t.default.createContext({preloaded:!1,params:{},path:void 0});class T extends t.default.Component{constructor(){var t,e,n;super(...arguments),this.name=void 0===this.props.path?"not-found":(null===(t=this.props.path)||void 0===t?void 0:t.toString().slice(1).replace("/","-"))||"index",this.sharedElementScene=new R(this.name),this.ref=null,this.contextParams=null===(n=null===(e=this.context)||void 0===e?void 0:e.routesData.get(this.props.path))||void 0===n?void 0:n.params,this.onRef=this.setRef.bind(this),this.animation=h.r2,this.pseudoElementAnimation=h.r2,this.state={shouldKeepAlive:!1},this.onExit=()=>{this.context.backNavigating?this.setState({shouldKeepAlive:!1}):this.setState({shouldKeepAlive:!0}),this.context.ghostLayer&&(this.context.ghostLayer.currentScene=this.sharedElementScene)},this.onEnter=()=>{this.context.ghostLayer&&(this.context.ghostLayer.nextScene=this.sharedElementScene)}}componentDidMount(){var t,e,n,i,s,o,a;this.sharedElementScene.getScreenRect=()=>{var t;return(null===(t=this.ref)||void 0===t?void 0:t.getBoundingClientRect())||new DOMRect},this.sharedElementScene.keepAlive=(null===(t=this.props.config)||void 0===t?void 0:t.keepAlive)||!1,this.animation=null!==(n=this.setupAnimation(null===(e=this.props.config)||void 0===e?void 0:e.animation))&&void 0!==n?n:this.context.animation,this.pseudoElementAnimation=null!==(o=this.setupAnimation(null===(s=null===(i=this.props.config)||void 0===i?void 0:i.pseudoElement)||void 0===s?void 0:s.animation))&&void 0!==o?o:h.r2,this.contextParams=null===(a=this.context.routesData.get(this.props.path))||void 0===a?void 0:a.params,this.context.mountedScreen=this,this.forceUpdate()}shouldComponentUpdate(t){var e,n;return(null===(e=this.context.routesData.get(this.props.path))||void 0===e?void 0:e.params)!==this.contextParams?(this.contextParams=null===(n=this.context.routesData.get(this.props.path))||void 0===n?void 0:n.params,!0):!(!t.out||t.in)||(!(!t.in||t.out)||(t.in!==this.props.in||t.out!==this.props.out))}componentDidUpdate(t){var e,n,i;(null===(e=t.config)||void 0===e?void 0:e.keepAlive)!==(null===(n=this.props.config)||void 0===n?void 0:n.keepAlive)&&(this.sharedElementScene.keepAlive=(null===(i=this.props.config)||void 0===i?void 0:i.keepAlive)||!1)}setupAnimation(t){return t?"function"==typeof t?this.animationFactory.bind(this,t):"in"in t?{in:t.in,out:t.out||t.in}:{in:t,out:t}:null}animationFactory(t){if("function"==typeof t){let e=this.context.navigation.history.next;this.context.backNavigating||(e=this.context.navigation.history.previous);const n=t(e||"",this.context.navigation.history.current,this.context.gestureNavigating);return"in"in n?{in:n.in,out:n.out||n.in}:{in:n,out:n}}return this.context.animation}setRef(t){this.ref!==t&&(this.ref=t)}get resolvedPathname(){return this.props.resolvedPathname}render(){var e,n,i,s,o,a,h,l,u;let c,d=this.props.component,p=null===(n=null===(e=this.props.config)||void 0===e?void 0:e.header)||void 0===n?void 0:n.component,m=!1,v=!1;"preloaded"in d&&d.preloaded&&(d=d.preloaded,m=!0),p&&"preloaded"in p&&p.preloaded&&(p=p.preloaded,v=!0),(null===(i=this.props.config)||void 0===i?void 0:i.pseudoElement)&&(c={selector:null===(s=this.props.config)||void 0===s?void 0:s.pseudoElement.selector,animation:this.pseudoElementAnimation});const f=Object.assign(Object.assign({},this.props.defaultParams),this.contextParams);return(0,r.jsx)(_,Object.assign({onExit:this.onExit,onEnter:this.onEnter,in:this.props.in||!1,out:this.props.out||!1,name:null!==(a=null===(o=this.props.name)||void 0===o?void 0:o.toLowerCase().replace(" ","-"))&&void 0!==a?a:this.name,resolvedPathname:this.props.resolvedPathname,animation:this.animation,pseudoElement:c,backNavigating:this.context.backNavigating,keepAlive:this.state.shouldKeepAlive&&(null===(h=this.props.config)||void 0===h?void 0:h.keepAlive)||!1,navigation:this.context.navigation},{children:(0,r.jsx)("div",Object.assign({id:this.name,ref:this.onRef,className:"screen",style:{height:"100%",width:"100%",display:"flex",flexDirection:"column",pointerEvents:"inherit"}},{children:(0,r.jsx)(D.Provider,Object.assign({value:this.sharedElementScene},{children:(0,r.jsxs)(I.Provider,Object.assign({value:{preloaded:m,path:this.props.path,params:f}},{children:[(0,r.jsx)(t.Suspense,Object.assign({fallback:(0,r.jsx)(C,{component:null===(u=null===(l=this.props.config)||void 0===l?void 0:l.header)||void 0===u?void 0:u.fallback})},{children:(0,r.jsx)(C,{component:p})})),(0,r.jsx)(t.Suspense,Object.assign({fallback:(0,r.jsx)(C,{component:this.props.fallback})},{children:(0,r.jsx)(C,{component:d})}))]}))}))}))}))}}function C({component:e}){const n=M(),i=F(),s=null!=e?e:null;return t.default.isValidElement(s)?t.default.cloneElement(s,{orientation:screen.orientation,navigation:n,route:i}):L(s)?(0,r.jsx)(s,{orientation:screen.orientation,navigation:n,route:i}):(0,r.jsx)(r.Fragment,{children:s})}T.contextType=n,T.defaultProps={route:{params:{}}};class j{constructor(t,e,n){var i;this._stack=[],this._routerId=t,window.history.replaceState(Object.assign(Object.assign({},history.state),{routerId:this._routerId}),"",window.location.toString()),n=n||new URL(window.location.toString()),n=new URL(n.href.replace(/\/$/,"")),this._baseURL=n,this._defaultRoute=e,this.state.has(this.baseURL.pathname)||this.state.set(this.baseURL.pathname,{});const s=null===(i=this.state.get(this.baseURL.pathname))||void 0===i?void 0:i.stack;s?this._stack=[...s.filter((t=>Boolean(t)))]:this.state.has(this.baseURL.pathname)&&(this.state.get(this.baseURL.pathname).stack=[...this._stack])}set defaultRoute(t){this._defaultRoute=t}get length(){return this._stack.length}get defaultRoute(){return this._defaultRoute||"/"}get isEmpty(){return!this._stack.length}get baseURL(){return this._baseURL}get state(){return{set:(t,e)=>!!window.history.state&&(window.history.state[t]=e,!0),get:t=>window.history.state&&window.history.state[t]||null,has:t=>!!window.history.state&&t in window.history.state,delete:t=>!!window.history.state&&delete window.history.state[t],keys:()=>Object.keys(window.history.state||{}),values:()=>Object.values(window.history.state||{}),clear(){return this.keys().forEach((t=>delete window.history.state[t]))},get length(){return this.keys().length}}}pushState(t,e,n){t=Object.assign(Object.assign({},window.history.state),{[this.baseURL.pathname]:Object.assign(Object.assign({},window.history.state[this.baseURL.pathname]),t),routerId:this._routerId}),window.history.pushState(t,e,n)}replaceState(t,e,n){t=Object.assign(Object.assign({},window.history.state),{[this.baseURL.pathname]:Object.assign(Object.assign({},window.history.state[this.baseURL.pathname]),t),routerId:this._routerId}),window.history.replaceState(t,e,n)}static getURL(t,e,n=""){e.pathname.match(/\/$/)||(e=new URL(e.href+"/")),t.match(/^\//)&&(t=t.slice(1));const i=new URL(t,e);return i.search=n,i}}function $(){const e=window.matchMedia("(prefers-reduced-motion: reduce)"),[n,i]=(0,t.useState)(e.matches);return e.onchange=()=>{i(e.matches)},n}function M(){const e=t.default.useContext(n);if(e)return e.navigation;throw new Error("RouterData is null. You may be trying to call useNavigation outside a Router.")}function U(){const[e,n]=(0,t.useState)(t.default.useContext(d)),i=M();return(0,t.useEffect)((()=>{const t=({detail:t})=>{n(t.progress)};return i.addEventListener("motion-progress",t),()=>i.removeEventListener("motion-progress",t)}),[]),e}function F(){const e=t.default.useContext(I);if(e)return e;throw new Error("RouterData is null. You may be trying to call useRoute outside a Router.")}var V=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};function z(e){const i=t.default.useContext(n),s=M(),[o,a]=(0,t.useState)(""),[l,u]=(0,t.useState)(!1);(0,t.useEffect)((()=>{if(!s)return;let t,n;if("goBack"in e)t=Y(s),n="";else{const s=(null==i?void 0:i.paramsSerializer)||null;t=e.href,n=(0,h.Po)(e.params||{},s)||""}const o=new URL(t,s.location.origin);o.hash=e.hash||"",o.search=n,o.origin===s.location.origin?(u(!1),a(o.href.replace(s.location.origin,""))):(u(!0),a(o.href))}),[e.href,e.params]);const{href:c,goBack:d,hash:p,onClick:m,replace:v,params:f}=e,g=V(e,["href","goBack","hash","onClick","replace","params"]);return s?(0,r.jsx)("a",Object.assign({href:o,onClick:t=>{t.stopPropagation(),s&&(l||(t.preventDefault(),m&&m(t),d&&s.goBack(),c&&s.navigate(c,f,{hash:p,replace:v})))}},g,{children:e.children})):(0,r.jsx)(r.Fragment,{})}function Y(t){return t.canGoBack()?t.history.previous:t.parent?Y(t.parent):document.referrer}var X=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};function B(t){var{disabled:e,children:n}=t,i=X(t,["disabled","children"]);return(0,r.jsx)("div",Object.assign({className:"gesture-region","data-disabled":e,style:{display:"contents"}},i,{children:n}))}i(878);var H=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};class W extends t.default.Component{constructor(t){super(t),this.ref=null,this.scrollPos={x:0,y:0},this.routerData=null,this._mounted=!1,this.onPageAnimationEnd=()=>{window.location.hash&&requestAnimationFrame(this.onHashChange.bind(this))},this.onHashChange=()=>{var t;if(this.ref){const e=location.hash;try{null===(t=this.ref.querySelector(e))||void 0===t||t.scrollIntoView(this.props.hashScrollConfig)}catch(t){}}},this.setRef=t=>{t&&(this.scrollPos={x:t.scrollLeft,y:t.scrollTop},this.ref=t,location.hash&&!this._mounted&&this.onHashChange(),this._mounted=!0)},this.onHashChange=this.onHashChange.bind(this)}componentDidMount(){var t,e;const n=null===(t=this.routerData)||void 0===t?void 0:t.scrollRestorationData.get(this.props.id);n&&(this.scrollPos=n),this.ref&&this.props.shouldRestore&&this.ref.scrollTo({left:this.scrollPos.x,top:this.scrollPos.y}),null===(e=this.routerData)||void 0===e||e.navigation.addEventListener("page-animation-end",this.onPageAnimationEnd),window.addEventListener("hashchange",this.onHashChange)}componentWillUnmount(){var t,e,n,i;const s={x:(null===(t=this.ref)||void 0===t?void 0:t.scrollLeft)||0,y:(null===(e=this.ref)||void 0===e?void 0:e.scrollTop)||0};null===(n=this.routerData)||void 0===n||n.scrollRestorationData.set(this.props.id,s),null===(i=this.routerData)||void 0===i||i.navigation.removeEventListener("page-animation-end",this.onPageAnimationEnd),window.removeEventListener("hashchange",this.onHashChange)}get scrollTop(){var t,e;return null!==(e=null===(t=this.ref)||void 0===t?void 0:t.scrollTop)&&void 0!==e?e:0}get scrollLeft(){var t,e;return null!==(e=null===(t=this.ref)||void 0===t?void 0:t.scrollLeft)&&void 0!==e?e:0}get scrollWidth(){var t,e;return null!==(e=null===(t=this.ref)||void 0===t?void 0:t.scrollWidth)&&void 0!==e?e:0}get scrollHeight(){var t,e;return null!==(e=null===(t=this.ref)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}render(){return(0,r.jsx)(n.Consumer,{children:t=>{this.routerData=t;const e=this.props,{style:n,shouldRestore:i,hashScrollConfig:s}=e,o=H(e,["style","shouldRestore","hashScrollConfig"]);return(0,r.jsx)("div",Object.assign({},o,{ref:this.setRef,style:Object.assign(Object.assign({},n),{overflow:"scroll"})},{children:this.props.children}))}})}}var G=/[$_\p{ID_Start}]/u,K=/[$_\u200C\u200D\p{ID_Continue}]/u;function q(t,e){return(e?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(t)}function J(t,e=!1){const n=[];let i=0;for(;i<t.length;){const s=t[i],o=function(s){if(!e)throw new TypeError(s);n.push({type:"INVALID_CHAR",index:i,value:t[i++]})};if("*"!==s)if("+"!==s&&"?"!==s)if("\\"!==s)if("{"!==s)if("}"!==s)if(":"!==s)if("("!==s)n.push({type:"CHAR",index:i,value:t[i++]});else{let e=1,s="",a=i+1,r=!1;if("?"===t[a]){o(`Pattern cannot start with "?" at ${a}`);continue}for(;a<t.length;){if(!q(t[a],!1)){o(`Invalid character '${t[a]}' at ${a}.`),r=!0;break}if("\\"!==t[a]){if(")"===t[a]){if(e--,0===e){a++;break}}else if("("===t[a]&&(e++,"?"!==t[a+1])){o(`Capturing groups are not allowed at ${a}`),r=!0;break}s+=t[a++]}else s+=t[a++]+t[a++]}if(r)continue;if(e){o(`Unbalanced pattern at ${i}`);continue}if(!s){o(`Missing pattern at ${i}`);continue}n.push({type:"PATTERN",index:i,value:s}),i=a}else{let e="",s=i+1;for(;s<t.length;){const n=t.substr(s,1);if(!(s===i+1&&G.test(n)||s!==i+1&&K.test(n)))break;e+=t[s++]}if(!e){o(`Missing parameter name at ${i}`);continue}n.push({type:"NAME",index:i,value:e}),i=s}else n.push({type:"CLOSE",index:i,value:t[i++]});else n.push({type:"OPEN",index:i,value:t[i++]});else n.push({type:"ESCAPED_CHAR",index:i++,value:t[i++]});else n.push({type:"MODIFIER",index:i,value:t[i++]});else n.push({type:"ASTERISK",index:i,value:t[i++]})}return n.push({type:"END",index:i,value:""}),n}function Q(t,e={}){const n=J(t),{prefixes:i="./"}=e,s=`[^${Z(void 0===e.delimiter?"/#?":e.delimiter)}]+?`,o=[];let a=0,r=0,h="",l=new Set;const u=t=>{if(r<n.length&&n[r].type===t)return n[r++].value},c=()=>{const t=u("MODIFIER");return t||u("ASTERISK")},d=t=>{const e=u(t);if(void 0!==e)return e;const{type:i,index:s}=n[r];throw new TypeError(`Unexpected ${i} at ${s}, expected ${t}`)},p=()=>{let t,e="";for(;t=u("CHAR")||u("ESCAPED_CHAR");)e+=t;return e},m=e.encodePart||(t=>t);for(;r<n.length;){const t=u("CHAR"),e=u("NAME");let n=u("PATTERN");if(e||n||!u("ASTERISK")||(n=".*"),e||n){let r=t||"";-1===i.indexOf(r)&&(h+=r,r=""),h&&(o.push(m(h)),h="");const u=e||a++;if(l.has(u))throw new TypeError(`Duplicate name '${u}'.`);l.add(u),o.push({name:u,prefix:m(r),suffix:"",pattern:n||s,modifier:c()||""});continue}const r=t||u("ESCAPED_CHAR");if(r){h+=r;continue}if(u("OPEN")){const t=p(),e=u("NAME")||"";let n=u("PATTERN")||"";e||n||!u("ASTERISK")||(n=".*");const i=p();d("CLOSE");const r=c()||"";if(!e&&!n&&!r){h+=t;continue}if(!e&&!n&&!t)continue;h&&(o.push(m(h)),h=""),o.push({name:e||(n?a++:""),pattern:e&&!n?s:n,prefix:m(t),suffix:m(i),modifier:r})}else h&&(o.push(m(h)),h=""),d("END")}return o}function Z(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function tt(t){return t&&t.ignoreCase?"ui":"u"}function et(t,e,n={}){const{strict:i=!1,start:s=!0,end:o=!0,encode:a=(t=>t)}=n,r=`[${Z(void 0===n.endsWith?"":n.endsWith)}]|$`,h=`[${Z(void 0===n.delimiter?"/#?":n.delimiter)}]`;let l=s?"^":"";for(const n of t)if("string"==typeof n)l+=Z(a(n));else{const t=Z(a(n.prefix)),i=Z(a(n.suffix));if(n.pattern)if(e&&e.push(n),t||i)if("+"===n.modifier||"*"===n.modifier){const e="*"===n.modifier?"?":"";l+=`(?:${t}((?:${n.pattern})(?:${i}${t}(?:${n.pattern}))*)${i})${e}`}else l+=`(?:${t}(${n.pattern})${i})${n.modifier}`;else"+"===n.modifier||"*"===n.modifier?l+=`((?:${n.pattern})${n.modifier})`:l+=`(${n.pattern})${n.modifier}`;else l+=`(?:${t}${i})${n.modifier}`}if(o)i||(l+=`${h}?`),l+=n.endsWith?`(?=${r})`:"$";else{const e=t[t.length-1],n="string"==typeof e?h.indexOf(e[e.length-1])>-1:void 0===e;i||(l+=`(?:${h}(?=${r}))?`),n||(l+=`(?=${h}|${r})`)}return new RegExp(l,tt(n))}function nt(t,e,n){return t instanceof RegExp?function(t,e){if(!e)return t;const n=/\((?:\?<(.*?)>)?(?!\?)/g;let i=0,s=n.exec(t.source);for(;s;)e.push({name:s[1]||i++,prefix:"",suffix:"",modifier:"",pattern:""}),s=n.exec(t.source);return t}(t,e):Array.isArray(t)?function(t,e,n){const i=t.map((t=>nt(t,e,n).source));return new RegExp(`(?:${i.join("|")})`,tt(n))}(t,e,n):function(t,e,n){return et(Q(t,n),e,n)}(t,e,n)}var it={delimiter:"",prefixes:"",sensitive:!0,strict:!0},st={delimiter:".",prefixes:"",sensitive:!0,strict:!0},ot={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function at(t,e){return t.startsWith(e)?t.substring(e.length,t.length):t}function rt(t){return!(!t||t.length<2)&&("["===t[0]||("\\"===t[0]||"{"===t[0])&&"["===t[1])}var ht=["ftp","file","http","https","ws","wss"];function lt(t){if(!t)return!0;for(const e of ht)if(t.test(e))return!0;return!1}function ut(t){switch(t){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function ct(t){if(""===t)return t;if(/^[-+.A-Za-z0-9]*$/.test(t))return t.toLowerCase();throw new TypeError(`Invalid protocol '${t}'.`)}function dt(t){if(""===t)return t;const e=new URL("https://example.com");return e.username=t,e.username}function pt(t){if(""===t)return t;const e=new URL("https://example.com");return e.password=t,e.password}function mt(t){if(""===t)return t;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(t))throw new TypeError(`Invalid hostname '${t}'`);const e=new URL("https://example.com");return e.hostname=t,e.hostname}function vt(t){if(""===t)return t;if(/[^0-9a-fA-F[\]:]/g.test(t))throw new TypeError(`Invalid IPv6 hostname '${t}'`);return t.toLowerCase()}function ft(t){if(""===t)return t;if(/^[0-9]*$/.test(t)&&parseInt(t)<=65535)return t;throw new TypeError(`Invalid port '${t}'.`)}function gt(t){if(""===t)return t;const e=new URL("https://example.com");return e.pathname="/"!==t[0]?"/-"+t:t,"/"!==t[0]?e.pathname.substring(2,e.pathname.length):e.pathname}function yt(t){if(""===t)return t;return new URL(`data:${t}`).pathname}function _t(t){if(""===t)return t;const e=new URL("https://example.com");return e.search=t,e.search.substring(1,e.search.length)}function Et(t){if(""===t)return t;const e=new URL("https://example.com");return e.hash=t,e.hash.substring(1,e.hash.length)}var wt=["protocol","username","password","hostname","port","pathname","search","hash"],bt="*";function xt(t,e){if("string"!=typeof t)throw new TypeError("parameter 1 is not of type 'string'.");const n=new URL(t,e);return{protocol:n.protocol.substring(0,n.protocol.length-1),username:n.username,password:n.password,hostname:n.hostname,port:n.port,pathname:n.pathname,search:""!=n.search?n.search.substring(1,n.search.length):void 0,hash:""!=n.hash?n.hash.substring(1,n.hash.length):void 0}}function St(t,e){return e?At(t):t}function Pt(t,e,n){let i;if("string"==typeof e.baseURL)try{i=new URL(e.baseURL),t.protocol=St(i.protocol.substring(0,i.protocol.length-1),n),t.username=St(i.username,n),t.password=St(i.password,n),t.hostname=St(i.hostname,n),t.port=St(i.port,n),t.pathname=St(i.pathname,n),t.search=St(i.search.substring(1,i.search.length),n),t.hash=St(i.hash.substring(1,i.hash.length),n)}catch{throw new TypeError(`invalid baseURL '${e.baseURL}'.`)}if("string"==typeof e.protocol&&(t.protocol=function(t,e){var n,i;return i=":",t=(n=t).endsWith(i)?n.substr(0,n.length-i.length):n,e||""===t?t:ct(t)}(e.protocol,n)),"string"==typeof e.username&&(t.username=function(t,e){if(e||""===t)return t;const n=new URL("https://example.com");return n.username=t,n.username}(e.username,n)),"string"==typeof e.password&&(t.password=function(t,e){if(e||""===t)return t;const n=new URL("https://example.com");return n.password=t,n.password}(e.password,n)),"string"==typeof e.hostname&&(t.hostname=function(t,e){return e||""===t?t:rt(t)?vt(t):mt(t)}(e.hostname,n)),"string"==typeof e.port&&(t.port=function(t,e,n){return ut(e)===t&&(t=""),n||""===t?t:ft(t)}(e.port,t.protocol,n)),"string"==typeof e.pathname){if(t.pathname=e.pathname,i&&!function(t,e){return!(!t.length||"/"!==t[0]&&(!e||t.length<2||"\\"!=t[0]&&"{"!=t[0]||"/"!=t[1]))}(t.pathname,n)){const e=i.pathname.lastIndexOf("/");e>=0&&(t.pathname=St(i.pathname.substring(0,e+1),n)+t.pathname)}t.pathname=function(t,e,n){if(n||""===t)return t;if(e&&!ht.includes(e))return new URL(`${e}:${t}`).pathname;const i="/"==t[0];return t=new URL(i?t:"/-"+t,"https://example.com").pathname,i||(t=t.substring(2,t.length)),t}(t.pathname,t.protocol,n)}return"string"==typeof e.search&&(t.search=function(t,e){if(t=at(t,"?"),e||""===t)return t;const n=new URL("https://example.com");return n.search=t,n.search?n.search.substring(1,n.search.length):""}(e.search,n)),"string"==typeof e.hash&&(t.hash=function(t,e){if(t=at(t,"#"),e||""===t)return t;const n=new URL("https://example.com");return n.hash=t,n.hash?n.hash.substring(1,n.hash.length):""}(e.hash,n)),t}function At(t){return t.replace(/([+*?:{}()\\])/g,"\\$1")}function Lt(t,e){const n=`[^${i=void 0===e.delimiter?"/#?":e.delimiter,i.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}]+?`;var i;const s=/[$_\u200C\u200D\p{ID_Continue}]/u;let o="";for(let i=0;i<t.length;++i){const a=t[i],r=i>0?t[i-1]:null,h=i<t.length-1?t[i+1]:null;if("string"==typeof a){o+=At(a);continue}if(""===a.pattern){if(""===a.modifier){o+=At(a.prefix);continue}o+=`{${At(a.prefix)}}${a.modifier}`;continue}const l="number"!=typeof a.name,u=void 0!==e.prefixes?e.prefixes:"./";let c=""!==a.suffix||""!==a.prefix&&(1!==a.prefix.length||!u.includes(a.prefix));if(!c&&l&&a.pattern===n&&""===a.modifier&&h&&!h.prefix&&!h.suffix)if("string"==typeof h){const t=h.length>0?h[0]:"";c=s.test(t)}else c="number"==typeof h.name;if(!c&&""===a.prefix&&r&&"string"==typeof r&&r.length>0){const t=r[r.length-1];c=u.includes(t)}c&&(o+="{"),o+=At(a.prefix),l&&(o+=`:${a.name}`),".*"===a.pattern?l||r&&"string"!=typeof r&&!r.modifier&&!c&&""===a.prefix?o+="(.*)":o+="*":a.pattern===n?l||(o+=`(${n})`):o+=`(${a.pattern})`,a.pattern===n&&l&&""!==a.suffix&&s.test(a.suffix[0])&&(o+="\\"),o+=At(a.suffix),c&&(o+="}"),o+=a.modifier}return o}var Rt=class{constructor(t={},e,n){this.regexp={},this.keys={},this.component_pattern={};try{let i;if("string"==typeof e?i=e:n=e,"string"==typeof t){const e=new class{constructor(t){this.tokenList=[],this.internalResult={},this.tokenIndex=0,this.tokenIncrement=1,this.componentStart=0,this.state=0,this.groupDepth=0,this.hostnameIPv6BracketDepth=0,this.shouldTreatAsStandardURL=!1,this.input=t}get result(){return this.internalResult}parse(){for(this.tokenList=J(this.input,!0);this.tokenIndex<this.tokenList.length;this.tokenIndex+=this.tokenIncrement){if(this.tokenIncrement=1,"END"===this.tokenList[this.tokenIndex].type){if(0===this.state){this.rewind(),this.isHashPrefix()?this.changeState(9,1):this.isSearchPrefix()?(this.changeState(8,1),this.internalResult.hash=""):(this.changeState(7,0),this.internalResult.search="",this.internalResult.hash="");continue}if(2===this.state){this.rewindAndSetState(5);continue}this.changeState(10,0);break}if(this.groupDepth>0){if(!this.isGroupClose())continue;this.groupDepth-=1}if(this.isGroupOpen())this.groupDepth+=1;else switch(this.state){case 0:this.isProtocolSuffix()&&(this.internalResult.username="",this.internalResult.password="",this.internalResult.hostname="",this.internalResult.port="",this.internalResult.pathname="",this.internalResult.search="",this.internalResult.hash="",this.rewindAndSetState(1));break;case 1:if(this.isProtocolSuffix()){this.computeShouldTreatAsStandardURL();let t=7,e=1;this.shouldTreatAsStandardURL&&(this.internalResult.pathname="/"),this.nextIsAuthoritySlashes()?(t=2,e=3):this.shouldTreatAsStandardURL&&(t=2),this.changeState(t,e)}break;case 2:this.isIdentityTerminator()?this.rewindAndSetState(3):(this.isPathnameStart()||this.isSearchPrefix()||this.isHashPrefix())&&this.rewindAndSetState(5);break;case 3:this.isPasswordPrefix()?this.changeState(4,1):this.isIdentityTerminator()&&this.changeState(5,1);break;case 4:this.isIdentityTerminator()&&this.changeState(5,1);break;case 5:this.isIPv6Open()?this.hostnameIPv6BracketDepth+=1:this.isIPv6Close()&&(this.hostnameIPv6BracketDepth-=1),this.isPortPrefix()&&!this.hostnameIPv6BracketDepth?this.changeState(6,1):this.isPathnameStart()?this.changeState(7,0):this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 6:this.isPathnameStart()?this.changeState(7,0):this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 7:this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 8:this.isHashPrefix()&&this.changeState(9,1)}}}changeState(t,e){switch(this.state){case 0:case 2:case 10:break;case 1:this.internalResult.protocol=this.makeComponentString();break;case 3:this.internalResult.username=this.makeComponentString();break;case 4:this.internalResult.password=this.makeComponentString();break;case 5:this.internalResult.hostname=this.makeComponentString();break;case 6:this.internalResult.port=this.makeComponentString();break;case 7:this.internalResult.pathname=this.makeComponentString();break;case 8:this.internalResult.search=this.makeComponentString();break;case 9:this.internalResult.hash=this.makeComponentString()}this.changeStateWithoutSettingComponent(t,e)}changeStateWithoutSettingComponent(t,e){this.state=t,this.componentStart=this.tokenIndex+e,this.tokenIndex+=e,this.tokenIncrement=0}rewind(){this.tokenIndex=this.componentStart,this.tokenIncrement=0}rewindAndSetState(t){this.rewind(),this.state=t}safeToken(t){return t<0&&(t=this.tokenList.length-t),t<this.tokenList.length?this.tokenList[t]:this.tokenList[this.tokenList.length-1]}isNonSpecialPatternChar(t,e){const n=this.safeToken(t);return n.value===e&&("CHAR"===n.type||"ESCAPED_CHAR"===n.type||"INVALID_CHAR"===n.type)}isProtocolSuffix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}nextIsAuthoritySlashes(){return this.isNonSpecialPatternChar(this.tokenIndex+1,"/")&&this.isNonSpecialPatternChar(this.tokenIndex+2,"/")}isIdentityTerminator(){return this.isNonSpecialPatternChar(this.tokenIndex,"@")}isPasswordPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}isPortPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}isPathnameStart(){return this.isNonSpecialPatternChar(this.tokenIndex,"/")}isSearchPrefix(){if(this.isNonSpecialPatternChar(this.tokenIndex,"?"))return!0;if("?"!==this.tokenList[this.tokenIndex].value)return!1;const t=this.safeToken(this.tokenIndex-1);return"NAME"!==t.type&&"PATTERN"!==t.type&&"CLOSE"!==t.type&&"ASTERISK"!==t.type}isHashPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,"#")}isGroupOpen(){return"OPEN"==this.tokenList[this.tokenIndex].type}isGroupClose(){return"CLOSE"==this.tokenList[this.tokenIndex].type}isIPv6Open(){return this.isNonSpecialPatternChar(this.tokenIndex,"[")}isIPv6Close(){return this.isNonSpecialPatternChar(this.tokenIndex,"]")}makeComponentString(){const t=this.tokenList[this.tokenIndex],e=this.safeToken(this.componentStart).index;return this.input.substring(e,t.index)}computeShouldTreatAsStandardURL(){const t={};Object.assign(t,it),t.encodePart=ct;const e=nt(this.makeComponentString(),void 0,t);this.shouldTreatAsStandardURL=lt(e)}}(t);if(e.parse(),t=e.result,void 0===i&&"string"!=typeof t.protocol)throw new TypeError("A base URL must be provided for a relative constructor string.");t.baseURL=i}else{if(!t||"object"!=typeof t)throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(i)throw new TypeError("parameter 1 is not of type 'string'.")}void 0===n&&(n={ignoreCase:!1});const s={ignoreCase:!0===n.ignoreCase},o={pathname:bt,protocol:bt,username:bt,password:bt,hostname:bt,port:bt,search:bt,hash:bt};let a;for(a of(this.pattern=Pt(o,t,!0),ut(this.pattern.protocol)===this.pattern.port&&(this.pattern.port=""),wt)){if(!(a in this.pattern))continue;const t={},e=this.pattern[a];switch(this.keys[a]=[],a){case"protocol":Object.assign(t,it),t.encodePart=ct;break;case"username":Object.assign(t,it),t.encodePart=dt;break;case"password":Object.assign(t,it),t.encodePart=pt;break;case"hostname":Object.assign(t,st),rt(e)?t.encodePart=vt:t.encodePart=mt;break;case"port":Object.assign(t,it),t.encodePart=ft;break;case"pathname":lt(this.regexp.protocol)?(Object.assign(t,ot,s),t.encodePart=gt):(Object.assign(t,it,s),t.encodePart=yt);break;case"search":Object.assign(t,it,s),t.encodePart=_t;break;case"hash":Object.assign(t,it,s),t.encodePart=Et}try{const n=Q(e,t);this.regexp[a]=et(n,this.keys[a],t),this.component_pattern[a]=Lt(n,t)}catch{throw new TypeError(`invalid ${a} pattern '${this.pattern[a]}'.`)}}}catch(t){throw new TypeError(`Failed to construct 'URLPattern': ${t.message}`)}}test(t={},e){let n,i={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof t&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(void 0===t)return!1;try{i=Pt(i,"object"==typeof t?t:xt(t,e),!1)}catch(t){return!1}for(n of wt)if(!this.regexp[n].exec(i[n]))return!1;return!0}exec(t={},e){let n={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof t&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(void 0===t)return;try{n=Pt(n,"object"==typeof t?t:xt(t,e),!1)}catch(t){return null}let i,s={};for(i of(s.inputs=e?[t,e]:[t],wt)){let t=this.regexp[i].exec(n[i]);if(!t)return null;let e={};for(let[n,s]of this.keys[i].entries())if("string"==typeof s.name||"number"==typeof s.name){let i=t[n+1];e[s.name]=i}s[i]={input:n[i]||"",groups:e}}return s}get protocol(){return this.component_pattern.protocol}get username(){return this.component_pattern.username}get password(){return this.component_pattern.password}get hostname(){return this.component_pattern.hostname}get port(){return this.component_pattern.port}get pathname(){return this.component_pattern.pathname}get search(){return this.component_pattern.search}get hash(){return this.component_pattern.hash}};globalThis.URLPattern||(globalThis.URLPattern=Rt),globalThis.URLPattern||(globalThis.URLPattern=Rt),document.body.style.position="fixed",document.body.style.inset="0";const Dt=document.head.querySelector("title");Dt&&(Dt.ariaLive="polite");let kt=document.getElementById("root");kt&&(kt.style.width="100%",kt.style.height="100%")})();var o=s.ee,a=s.r2,r=s.rN,h=s.PM,l=s.y_,u=s.DC,c=s.GW,d=s.sV,p=s.RG,m=s.GI,v=s.rJ,f=s.uZ,g=s.PV,y=s.rL,_=s.Nu,E=s.V_,w=s.hR,b=s.cT,x=s.e1,S=s.Ef,P=s.Vo,A=s.QN,L=s.kI,R=s.Po,D=s.fJ,k=s.nc,O=s.HJ,N=s.JZ,I=s.yj;export{o as Anchor,a as DEFAULT_ANIMATION,r as GestureRegion,h as HistoryBase,l as Motion,u as NavigationBase,c as RouterBase,d as RouterData,p as ScreenBase,m as ScrollRestoration,v as SharedElement,f as clamp,g as concatenateURL,y as defaultSearchParamsToObject,_ as dispatchEvent,E as getAnimationDuration,w as getCSSData,b as getStyleObject,x as includesRoute,S as isValidComponentConstructor,P as lazy,A as matchRoute,L as prefetchRoute,R as searchParamsFromObject,D as searchParamsToObject,k as useMotion,O as useNavigation,N as useReducedMotion,I as useRoute};
|
|
2
|
+
import*as t from"react";var e={837:(t,e,n)=>{var i=n(810),s=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,r=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,h={key:!0,ref:!0,__self:!0,__source:!0};function l(t,e,n){var i,o={},l=null,u=null;for(i in void 0!==n&&(l=""+n),void 0!==e.key&&(l=""+e.key),void 0!==e.ref&&(u=e.ref),e)a.call(e,i)&&!h.hasOwnProperty(i)&&(o[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===o[i]&&(o[i]=e[i]);return{$$typeof:s,type:t,key:l,ref:u,props:o,_owner:r.current}}e.Fragment=o,e.jsx=l,e.jsxs=l},322:(t,e,n)=>{t.exports=n(837)},174:(t,e,n)=>{n.d(e,{Nu:()=>l,PV:()=>u,Po:()=>p,QN:()=>r,V_:()=>g,Vo:()=>m,cT:()=>o,dw:()=>y,e1:()=>h,fJ:()=>d,hR:()=>s,kI:()=>v,r2:()=>f,rL:()=>c,uZ:()=>a});var i=n(810);function s(t,e=[],n=!0){let i="";const s={};let o=0;for(let a in t)if(!e.includes(a)){if(o<t.length){const e=t[a];let n=t.getPropertyValue(e);if("visibility"===e)n="visible";i+=`${e}:${n};`}else{if(!n)break;let e=a,i=t[e];if("string"==typeof i&&"cssText"!==e&&!e.includes("webkit")&&!e.includes("grid")){switch(e){case"offset":e="cssOffset";break;case"float":e="cssFloat";break;case"visibility":i="visible"}s[e]=i}}o++}return[i,s]}function o(t,e=[]){const n={};for(const i in t)if(t[i]&&t[i].length&&"function"!=typeof t[i]){if(/^\d+$/.test(i))continue;if("offset"===i)continue;if(e.includes(i))continue;n[i]=t[i]}return n}function a(t,e,n){return t<e?e:n&&t>n?n:t}function r(t,e,n=window.location.origin){if(void 0===t||void 0===e)return t===e?{exact:!0,matchedPathname:e}:null;const i=new URLPattern(t,n),s=new URL(e,n),o=i.exec(s);let a="",r="";for(let t=0;t<i.pathname.length;t++){if(i.pathname[t]!==s.pathname[t]){r=s.pathname.substring(t);break}a+=i.pathname[t]}return o?{exact:t===e,matchedPathname:a,rest:r}:null}function h(t,e,n=window.location.origin){return e.some((e=>r(e,t,n)))}function l(t,e=window){return new Promise((n=>{queueMicrotask((()=>n(e.dispatchEvent(t))))}))}function u(t,e){return"string"==typeof e&&(e=new URL(e)),"string"!=typeof t&&(t=t.pathname),t=t.replace(/^\//,""),e.pathname.endsWith("/")||(e=new URL(e.href+"/")),new URL(t,e)}function c(t){const e=new URLSearchParams(decodeURI(t)).entries(),n={};for(const[t,i]of e){let e="";try{e=JSON.parse(i)}catch(t){console.warn("Non JSON serialisable value was passed as URL route param."),e=i}n[t]=e}return Object.keys(n).length?n:void 0}function d(t,e){return(e||c)(t)||{}}function p(t,e){try{return(e||function(t){return new URLSearchParams(t).toString()})(t)}catch(t){console.error(t),console.warn("Non JSON serialisable value was passed as route param to Anchor.")}return""}function m(t){const e=(0,i.lazy)(t);return e.preload=()=>{const n=t();return n.then((t=>e.preloaded=t.default)).catch(console.error),n},e}function v(t,e){let n=e;return new Promise(((s,o)=>{let a=!1;for(;n;){const h=n.routes;if(i.Children.forEach(h,(e=>{if(a)return;if(!(0,i.isValidElement)(e))return;r(e.props.path,t)&&(a=!0,queueMicrotask((async()=>{if("preload"in e.props.component)try{await e.props.component.preload(),s(a)}catch(t){o(t)}})))})),a)break;n=e.parentRouterData}a||s(!1)}))}function g(t,e=0){var n;const i=null===(n=null==t?void 0:t.effect)||void 0===n?void 0:n.getTiming().duration;return Number(i)||e}const f={in:{type:"none",duration:0},out:{type:"none",duration:0}},y=2147483647},623:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=i(n(813));class o extends s.default{constructor(t){super("doubletap",t)}}e.default=o},813:(t,e)=>{var n;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.tap=0]="tap",t[t.longpress=1]="longpress",t[t.pinchstart=2]="pinchstart",t[t.pinch=3]="pinch",t[t.pinchend=4]="pinchend",t[t.rotatestart=5]="rotatestart",t[t.rotate=6]="rotate",t[t.rotateend=7]="rotateend",t[t.swipestart=8]="swipestart",t[t.swipe=9]="swipe",t[t.swipeend=10]="swipeend",t[t.panstart=11]="panstart",t[t.pan=12]="pan",t[t.panend=13]="panend",t[t.doubletap=14]="doubletap"}(n||(n={})),void 0===window.TouchEvent&&(window.TouchEvent=PointerEvent);class i extends TouchEvent{constructor(t,e){if(super(t,{touches:Array.from(e.touches),targetTouches:Array.from(e.targetTouches),changedTouches:Array.from(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,bubbles:!0,cancelable:!0}),t.includes("end")||e.type.includes("end"))return this.gestureTarget=e.changedTouches[0].target,this.x=e.changedTouches[0].clientX,void(this.y=e.changedTouches[0].clientY);this.gestureTarget=e.touches[0].target,this.x=e.touches[0].clientX,this.y=e.touches[0].clientY}}e.default=i},646:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=i(n(813));class o extends s.default{constructor(t,e){super("longpress",t),this.duration=0,this.duration=e}}e.default=o},577:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PanEndEvent=e.PanStartEvent=void 0;const s=i(n(813));var o;!function(t){t[t.start=0]="start",t[t.end=1]="end"}(o||(o={}));class a extends s.default{constructor(t,e,n){let i;switch(n){case"start":i="panstart";break;case"end":i="panend";break;default:i="pan"}super(i,t),this.velocity=e.velocity,this.translation={x:e.translation.x,y:e.translation.y,magnitude:e.translation.magnitude,clientX:e.translation.clientX,clientY:e.translation.clientY,clientMagnitude:e.translation.clientMagnitude}}}e.default=class extends a{constructor(t,e){super(t,e)}};e.PanStartEvent=class extends a{constructor(t,e){super(t,e,"start")}};e.PanEndEvent=class extends a{constructor(t,e){super(t,e,"end")}}},630:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.PinchEndEvent=e.PinchStartEvent=void 0;const s=i(n(813));var o;!function(t){t[t.start=0]="start",t[t.end=1]="end"}(o||(o={}));class a extends s.default{constructor(t,e,n){let i;switch(n){case"start":i="pinchstart";break;case"end":i="pinchend";break;default:i="pinch"}super(i,t),Object.defineProperty(this,"scale",{value:e.scale,writable:!1})}}e.default=class extends a{constructor(t,e){super(t,e)}};e.PinchStartEvent=class extends a{constructor(t,e){super(t,e,"start")}};e.PinchEndEvent=class extends a{constructor(t,e){super(t,e,"end")}}},859:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RotateEndEvent=e.RotateStartEvent=void 0;const s=i(n(813));var o;!function(t){t[t.start=0]="start",t[t.end=1]="end"}(o||(o={}));class a extends s.default{constructor(t,e,n){let i;switch(n){case"start":i="rotatestart";break;case"end":i="rotateend";break;default:i="rotate"}super(i,t),this.anchor={x:e.anchor.x,y:e.anchor.y,clientX:e.anchor.clientX,clientY:e.anchor.clientY},Object.defineProperty(this,"rotation",{value:e.rotation,writable:!1}),this.rotationDeg=e.rotationDeg}}e.default=class extends a{constructor(t,e){super(t,e)}};e.RotateStartEvent=class extends a{constructor(t,e){super(t,e,"start")}};e.RotateEndEvent=class extends a{constructor(t,e){super(t,e,"end")}}},224:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.SwipeEndEvent=e.SwipeStartEvent=void 0;const s=i(n(813));var o;!function(t){t[t.start=0]="start",t[t.end=1]="end"}(o||(o={}));class a extends s.default{constructor(t,e,n){let i;switch(n){case"start":i="swipestart";break;case"end":i="swipeend";break;default:i="swipe"}super(i,t),this.velocity=e.velocity,this.direction=e.direction}}e.default=class extends a{constructor(t,e){super(t,e)}};e.SwipeStartEvent=class extends a{constructor(t,e){super(t,e,"start")}};e.SwipeEndEvent=class extends a{constructor(t,e){super(t,e,"end")}}},884:function(t,e,n){var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const s=i(n(813));class o extends s.default{constructor(t){super("tap",t)}}e.default=o},878:function(t,e,n){var i=this&&this.__createBinding||(Object.create?function(t,e,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(e,n);s&&!("get"in s?!e.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,i,s)}:function(t,e,n,i){void 0===i&&(i=n),t[i]=e[n]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return s(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RotateEndEvent=e.RotateEvent=e.RotateStartEvent=e.PinchEndEvent=e.PinchEvent=e.PinchStartEvent=e.PanEndEvent=e.PanEvent=e.PanStartEvent=e.SwipeEndEvent=e.SwipeEvent=e.SwipeStartEvent=e.DoubleTapEvent=e.LongPressEvent=e.GestureEvent=e.TapEvent=void 0;const r=a(n(813));e.GestureEvent=r.default;const h=a(n(646));e.LongPressEvent=h.default;const l=a(n(884));e.TapEvent=l.default;const u=a(n(623));e.DoubleTapEvent=u.default;const c=o(n(224));e.SwipeEvent=c.default,Object.defineProperty(e,"SwipeEndEvent",{enumerable:!0,get:function(){return c.SwipeEndEvent}}),Object.defineProperty(e,"SwipeStartEvent",{enumerable:!0,get:function(){return c.SwipeStartEvent}});const d=o(n(577));e.PanEvent=d.default,Object.defineProperty(e,"PanEndEvent",{enumerable:!0,get:function(){return d.PanEndEvent}}),Object.defineProperty(e,"PanStartEvent",{enumerable:!0,get:function(){return d.PanStartEvent}});const p=o(n(630));e.PinchEvent=p.default,Object.defineProperty(e,"PinchEndEvent",{enumerable:!0,get:function(){return p.PinchEndEvent}}),Object.defineProperty(e,"PinchStartEvent",{enumerable:!0,get:function(){return p.PinchStartEvent}});const m=o(n(859));e.RotateEvent=m.default,Object.defineProperty(e,"RotateEndEvent",{enumerable:!0,get:function(){return m.RotateEndEvent}}),Object.defineProperty(e,"RotateStartEvent",{enumerable:!0,get:function(){return m.RotateStartEvent}});const v=n(47);var g;!function(t){t[t.right=0]="right",t[t.up=1]="up",t[t.left=2]="left",t[t.down=3]="down"}(g||(g={}));class f{constructor(){this.touchStart=new TouchEvent("touchstart")||{},this.touchMove=new TouchEvent("touchmove")||{},this.touchEnd=new TouchEvent("touchend")||{},this.touchCancel=new TouchEvent("touchcancel")||{},this.velocity=0,this.dxDy=new v.Vec2(0,0),this.scale=1,this.rotation=0,this.rotationDeg=0,this.anchor=new v.Vec2(0,0),this.octant=0,this.isPanning=!1,this.isPinching=!1,this.isSwiping=!1,this.isRotating=!1,this.touchStartTime=0,this.touchEndTime=0,this.lastTouchTime=0,this.taps=0,this.scaleBase=0,this.touchMoved=!1,this.touchDown=!1,this.shouldFire=!1,this.pointers=0,this.isLongPress=!1,this.longPressTimeout=0,this.touchStartListener=this.onTouchStart.bind(this),this.touchMoveListener=this.onTouchMove.bind(this),this.touchEndListener=this.onTouchEnd.bind(this),this.touchCancelListener=this.onTouchCancel.bind(this),this.currentTarget=window,this.config={longPressDuration:500,tapDelay:500,minPointers:1,numberOfTaps:0},f.listening||(TouchEvent&&window.addEventListener("touchstart",this.touchStartListener,!0),f.listening=!0)}bind(t){this.unbind(this.currentTarget),t.addEventListener("touchmove",this.touchMoveListener,!0),t.addEventListener("touchend",this.touchEndListener,!0),t.addEventListener("touchcancel",this.touchCancelListener,!0),this.currentTarget=t}unbind(t){t.removeEventListener("touchmove",this.touchMoveListener),t.removeEventListener("touchend",this.touchEndListener),t.removeEventListener("touchcancel",this.touchCancelListener)}clean(){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}onPointerLeave(t){if(!t.touches.length){if(this.isSwiping){const e=new c.SwipeEndEvent(t,{velocity:this.velocity,direction:g[(0,v.closest)(this.octant,[0,1,2,3])]});this.dispatchEvent(e),this.isSwiping=!1}if(this.isPanning){const e=new d.PanEndEvent(t,{translation:this.dxDy,velocity:this.velocity});this.dispatchEvent(e),this.isPanning=!1}}if(1===t.touches.length){if(this.scaleBase=0,this.isPinching){const e=new p.PinchEndEvent(t,{scale:this.scale});this.dispatchEvent(e),this.isPinching=!1}if(this.isRotating){const e=new m.RotateEndEvent(t,{rotation:this.rotation,rotationDeg:this.rotationDeg,anchor:this.anchor});this.dispatchEvent(e),this.isRotating=!1}}}dispatchEvent(t){queueMicrotask((()=>{this.currentTarget.dispatchEvent(t)}))}onTouchStart(t){this.currentTarget!==t.touches[0].target&&(this.clean(),this.unbind(this.currentTarget),this.pointers=this.touchEnd.touches.length,this.taps=0),this.touchStart=t;const e=parseInt(t.touches[0].target.dataset.minpointers||"0")||this.config.minPointers;if(this.touchStart.touches.length<e)return void(this.shouldFire=!1);this.shouldFire=!0,this.touchStartTime=t.timeStamp,this.touchDown=!0,this.pointers||this.bind(t.touches[0].target),this.pointers=this.touchStart.touches.length;const n=parseFloat(this.currentTarget.dataset.longpressduration||"0")||this.config.longPressDuration;if(this.longPressTimeout||(this.longPressTimeout=setTimeout((()=>{if(!this.touchMoved&&this.touchDown){const t=Date.now()-this.touchStartTime,e=new h.default(this.touchStart,t);this.dispatchEvent(e),this.isLongPress=!0,this.longPressTimeout=0}}),n)),this.touchStart.touches.length>1){const t=new v.Vec2(this.touchStart.touches[0].clientX,this.touchStart.touches[0].clientY),e=new v.Vec2(this.touchStart.touches[1].clientX,this.touchStart.touches[1].clientY);this.scaleBase=t.substract(e).magnitude}else this.scaleBase=0}onTouchMove(t){if(!this.shouldFire)return;if(this.touchMoved=!0,this.touchMove=t,t.touches.length>1&&this.touchStart.touches.length>1&&(t.touches[1].clientX!==this.touchStart.touches[1].clientX||t.touches[1].clientY!==this.touchStart.touches[1].clientY)){const e=new v.Vec2(this.touchMove.touches[0].clientX,this.touchMove.touches[0].clientY),n=new v.Vec2(this.touchMove.touches[1].clientX,this.touchMove.touches[1].clientY),i=new v.Vec2(this.touchStart.touches[0].clientX,this.touchStart.touches[0].clientY),s=e.substract(n);if(this.scaleBase&&Math.abs(this.scaleBase-s.magnitude)>10){const e=s.magnitude/this.scaleBase;if(this.scale=e,this.isPinching){const n=new p.default(t,{scale:e});this.dispatchEvent(n)}else{const n=new p.PinchStartEvent(t,{scale:e});this.dispatchEvent(n),this.isPinching=!0}}this.anchor=e;let o=Math.atan2(i.clientY-n.clientY,i.clientX-n.clientX);if(o<0?o+=1.5708:o-=1.5708,this.rotation=o,this.rotationDeg=180*o/Math.PI,this.anchor=this.anchor,this.isRotating){const e=new m.default(t,{anchor:this.anchor,rotation:this.rotation,rotationDeg:this.rotationDeg});this.dispatchEvent(e)}else{const e=new m.RotateStartEvent(t,{anchor:this.anchor,rotation:this.rotation,rotationDeg:this.rotationDeg});this.dispatchEvent(e),this.isRotating=!0}}const e=new v.Vec2(this.touchStart.touches[0].clientX,this.touchStart.touches[0].clientY),n=new v.Vec2(this.touchMove.touches[0].clientX,this.touchMove.touches[0].clientY).substract(e),i=n.magnitude,s={x:n.x/i,y:n.y/i},o=Math.atan2(s.y,s.x);this.octant=Math.round(4*o/(2*Math.PI)+4)%4;const a=(t.timeStamp-this.touchStart.timeStamp)/1e3,r=n.magnitude/a;if(this.isSwiping){const e=new c.default(t,{direction:g[(0,v.closest)(this.octant,[0,1,2,3])],velocity:r});this.dispatchEvent(e)}else{const e=new c.SwipeStartEvent(t,{direction:g[(0,v.closest)(this.octant,[0,1,2,3])],velocity:r});this.dispatchEvent(e),this.isSwiping=!0}if(this.dxDy=n,this.velocity=r,this.isPanning){const e=new d.default(t,{translation:n,velocity:r});this.dispatchEvent(e)}else{const e=new d.PanStartEvent(t,{translation:n,velocity:r});this.dispatchEvent(e),this.isPanning=!0}}onTouchEnd(t){const e=parseInt(this.currentTarget.dataset.numberoftaps||"0")||this.config.numberOfTaps;if(this.taps++,this.shouldFire=Boolean(this.taps>e),this.shouldFire){this.touchEnd=t,this.touchEndTime=t.timeStamp;const n=parseFloat(this.currentTarget.dataset.tapdelay||"0")||this.config.tapDelay;if(!this.touchMoved&&!this.isLongPress)if(1===this.taps||this.touchEndTime-this.lastTouchTime<n){if(this.taps%2===e){const e=new u.default(t);this.dispatchEvent(e),this.taps=0}const n=new l.default(t);this.dispatchEvent(n)}else this.taps=0}this.pointers=this.touchEnd.touches.length,this.lastTouchTime=this.touchEndTime,this.onPointerLeave(t),this.unbind(this.currentTarget),this.clean()}onTouchCancel(t){this.shouldFire&&(this.touchCancel=t,this.unbind(this.currentTarget),this.clean())}}function y(t){const e=t.type;t.composedPath().forEach((n=>{if(n instanceof HTMLElement){const i=n[_[e]];if("function"!=typeof i)return;i.apply(n,[t])}}))}f.listening=!1,e.default=f,window.GLOBAL_EVENT_DISPATCHER||(window.addEventListener("tap",y,{passive:!0}),window.addEventListener("longpress",y,{passive:!0}),window.addEventListener("doubletap",y,{passive:!0}),window.addEventListener("swipestart",y,{passive:!0}),window.addEventListener("swipe",y,{passive:!0}),window.addEventListener("swipeend",y,{passive:!0}),window.addEventListener("panstart",y,{passive:!0}),window.addEventListener("pan",y,{passive:!0}),window.addEventListener("panend",y,{passive:!0}),window.addEventListener("pinchstart",y,{passive:!0}),window.addEventListener("pinch",y,{passive:!0}),window.addEventListener("pinchend",y,{passive:!0}),window.addEventListener("rotatestart",y,{passive:!0}),window.addEventListener("rotate",y,{passive:!0}),window.addEventListener("rotateend",y,{passive:!0}));const _={tap:"ontap",doubletap:"ondoubletap",longpress:"onlongpress",swipestart:"onswipestart",swipe:"onswipe",swipeend:"onswipeend",panstart:"onpanstart",pan:"onpan",panend:"onpanend",pinchstart:"onpinchstart",pinch:"onpinch",pinchend:"onpinchend",rotatestart:"onrotatestart",rotate:"onrotate",rotateend:"onrotateend"};TouchEvent&&(window.gestureProvider=new f),window.GLOBAL_EVENT_DISPATCHER||(window.GLOBAL_EVENT_DISPATCHER=y)},47:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.closest=e.Vec2=e.assert=void 0,e.assert=function(t,e){if(!t)throw new Error(e)};e.Vec2=class{constructor(t,e){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)}translateY(t){return-(t-window.innerHeight/2)}translateX(t){return t-window.innerWidth/2}get x(){return this._x}get y(){return this._y}get clientX(){return this._clientX}get clientY(){return this._clientY}set x(t){this._clientX=t,this._x=this.translateX(t)}set y(t){this._clientY=t,this._y=this.translateY(t)}add(t){return this._x+=t.x,this._y+=t.y,this._clientX+=t.clientX,this._clientY+=t.clientY,this}substract(t){return this._x-=t.x,this._y-=t.y,this._clientX-=t.clientX,this._clientY-=t.clientY,this}dot(t){return this._x*t.x+this._y*t.y}get magnitude(){return Math.sqrt(Math.pow(this._x,2)+Math.pow(this._y,2))}get clientMagnitude(){return Math.sqrt(Math.pow(this._clientX,2)+Math.pow(this._clientY,2))}},e.closest=function(t,e){return e.reduce(((e,n)=>{let i=Math.abs(e-t),s=Math.abs(n-t);return i===s?e>n?e:n:s<i?n:e}))}},810:e=>{e.exports=t}},n={};function i(t){var s=n[t];if(void 0!==s)return s.exports;var o=n[t]={exports:{}};return e[t].call(o.exports,o,o.exports,i),o.exports}i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var s={};(()=>{i.d(s,{ee:()=>z,r2:()=>h.r2,rN:()=>B,PM:()=>j,dw:()=>h.dw,y_:()=>d,DC:()=>a,GW:()=>g,sV:()=>e,RG:()=>T,GI:()=>W,rJ:()=>N,uZ:()=>h.uZ,PV:()=>h.PV,rL:()=>h.rL,Nu:()=>h.Nu,V_:()=>h.V_,hR:()=>h.hR,cT:()=>h.cT,e1:()=>h.e1,Ef:()=>L,Vo:()=>h.Vo,QN:()=>h.QN,kI:()=>h.kI,Po:()=>h.Po,fJ:()=>h.fJ,nc:()=>U,HJ:()=>M,JZ:()=>$,yj:()=>F});var t=i(810);class e{constructor(t,e){this._parentRouterData=null,this._childRouterData=null,this._dispatchEvent=null,this._addEventListener=null,this._removeEventListener=null,this._currentPath="",this._routesData=new Map,this._backNavigating=!1,this._gestureNavigating=!1,this._mountedScreen=null,this._animation=h.r2,this._ghostLayer=null,this.routerInstance=t,e&&(this.navigation=e)}destructor(){this.parentRouterData&&(this.parentRouterData.childRouterData=null)}prefetchRoute(t){return(0,h.kI)(t,this)}set parentRouterData(t){this._parentRouterData=t,this._parentRouterData&&(this._parentRouterData.childRouterData=this)}set childRouterData(t){var e;const n=null===(e=this._childRouterData)||void 0===e?void 0:e.deref();if(void 0!==n&&t&&t.routerId!==n.routerId)throw new Error("It looks like you have two navigators at the same level. Try simplifying your navigation structure by using a nested router instead.");this._childRouterData=t?new WeakRef(t):null}set dispatchEvent(t){this._dispatchEvent=t}set addEventListener(t){this._addEventListener=t}set removeEventListener(t){this._removeEventListener=t}set currentPath(t){this._currentPath=t}set routesData(t){this._routesData=t}set navigation(t){this._navigation=t}set animation(t){this._animation=t}set ghostLayer(t){this._ghostLayer=t}set backNavigating(t){this._backNavigating=t}set gestureNavigating(t){this._gestureNavigating=t}set paramsSerializer(t){this._paramsSerializer=t}set paramsDeserializer(t){this._paramsDeserializer=t}set mountedScreen(t){this._mountedScreen=t}get mountedScreen(){return this._mountedScreen}get routerId(){return this.routerInstance.id}get routes(){return this.routerInstance.props.children}get parentRouterData(){return this._parentRouterData}get childRouterData(){var t,e;return null!==(e=null===(t=this._childRouterData)||void 0===t?void 0:t.deref())&&void 0!==e?e:null}get dispatchEvent(){return this._dispatchEvent}get addEventListener(){return this._addEventListener}get removeEventListener(){return this._removeEventListener}get currentPath(){return this._currentPath}get routesData(){return this._routesData}get scrollRestorationData(){return e._scrollRestorationData}get navigation(){return this._navigation}get animation(){return this._animation}get ghostLayer(){return this._ghostLayer}get backNavigating(){return this._backNavigating}get gestureNavigating(){return this._gestureNavigating}get paramsSerializer(){return this._paramsSerializer}get paramsDeserializer(){return this._paramsDeserializer}}e._scrollRestorationData=new class{constructor(){this._map=new Map}set(t,e={x:0,y:0}){this._map.set(t,e)}get(t){return this._map.get(t)}};const n=(0,t.createContext)(null);class o{constructor(){this._map=new Map,this.mutationObserver=new MutationObserver(this.observeMutations.bind(this));const{head:t}=document;this.mutationObserver.observe(t,{childList:!0}),Array.from(t.querySelectorAll("meta")).forEach((t=>{this.mutationObserver.observe(t,{attributes:!0})})),Array.from(t.querySelectorAll("meta")).forEach(this.metaDataFromNode.bind(this))}get(t){const e=this.getMetaKey(t),n=this._map.get(e);if(!n)return;let i;return i=n.includes(",")&&n.includes("=")?n.split(/,\s*/).map((t=>t.split("="))):n,i}set(t,e){const n=this.getMetaKey(t),i=this.getMetaContent(e);this._map.set(n,i),this.updateMetaElement(n,i)}has(t){const e=this.getMetaKey(t);return this._map.has(e)}delete(t){var e;const n=this.getMetaKey(t);this._map.delete(n),null===(e=document.head.querySelector(`meta[${n}]`))||void 0===e||e.remove()}clear(){document.head.querySelectorAll("meta").forEach((t=>t.remove()))}entries(){return this._map.entries()}[Symbol.iterator](){return this.entries()}get size(){return this._map.size}observeMutations(t){for(const e of t){if("attributes"===e.type){const t=e.target;this.metaDataFromNode(t)}if("childList"!==e.type)return;e.removedNodes.forEach((t=>{if("META"===t.nodeName){const[e]=Array.from(t.attributes).filter((t=>"content"!==t.nodeName)),n=[e.nodeName,e.value].join("=");this._map.has(n)&&this._map.delete(n)}})),e.addedNodes.forEach((t=>{"META"===t.nodeName&&this.metaDataFromNode(t)}))}}metaDataFromNode(t){const[e]=Array.from(t.attributes).filter((t=>"content"!==t.nodeName)),[n]=Array.from(t.attributes).filter((t=>"content"===t.nodeName)),i=[e.nodeName,e.value].join("=");this._map.set(i,null==n?void 0:n.value)}getMetaKey(t){let e;return e="string"==typeof t?`name=${t}`:t.join("="),e}getMetaContent(t){if(!t)return;let e;return e="string"==typeof t?t:t.map((t=>t.join("="))).join(", "),e}updateMetaElement(t,e){const n=document.querySelector(`meta[${t}]`)||document.createElement("meta"),i=t.split("=");n.setAttribute(...i),e?n.setAttribute("content",e):n.removeAttribute("content"),n.parentElement||document.head.appendChild(n)}}class a{constructor(t,e,n=!1,i=null){var s;this._metaData=new o,this._currentParams={},this.popStateListener=t=>{var e;this._routerId,this.history.state.get("routerId");const n=null===(e=a.rootNavigatorRef)||void 0===e?void 0:e.deref(),i=(null==n?void 0:n.routerId)===this.routerId;(null===this.history.state.get("routerId")&&i||this.history.state.get("routerId")===this._routerId)&&this.onPopState(t)},this.routerData=e,this._disableBrowserRouting=n,this._routerId=t;const r=null===(s=a.rootNavigatorRef)||void 0===s?void 0:s.deref();r&&r.isInDocument||(a.rootNavigatorRef=new WeakRef(this)),window.addEventListener("popstate",this.popStateListener)}destructor(){var t;const e=null===(t=a.rootNavigatorRef)||void 0===t?void 0:t.deref();(null==e?void 0:e.routerId)===this.routerId&&(a.rootNavigatorRef=null),window.removeEventListener("popstate",this.popStateListener)}addEventListener(t,e,n){var i,s;null===(s=(i=this.routerData).addEventListener)||void 0===s||s.call(i,t,e,n)}removeEventListener(t,e,n){var i,s;return null===(s=(i=this.routerData).removeEventListener)||void 0===s?void 0:s.call(i,t,e,n)}get disableBrowserRouting(){return this._disableBrowserRouting}get routerId(){return this._routerId}canGoBack(){return this.history.canGoBack()}getNavigatorById(t,e){var n;const i=null!=e?e:null===(n=a.rootNavigatorRef)||void 0===n?void 0:n.deref();return i.routerId===t?i:i.routerData.childRouterData?void this.getNavigatorById(t,i.routerData.childRouterData.navigation):null}prefetchRoute(t){return this.routerData.prefetchRoute(t)}get dispatchEvent(){return this.routerData.dispatchEvent}get paramsDeserializer(){return this.routerData.paramsDeserializer}get paramsSerializer(){return this.routerData.paramsSerializer}get history(){return this._history}get metaData(){return this._metaData}get isInDocument(){return Boolean(document.getElementById(`${this.routerId}`))}}a.rootNavigatorRef=null;var r=i(322),h=i(174);class l{constructor(){this._play=!0,this._isPlaying=!1,this._isStarted=!1,this._currentScreen=null,this._nextScreen=null,this._progressUpdateID=0,this._pseudoElementInAnimation=null,this._pseudoElementOutAnimation=null,this._inAnimation=null,this._outAnimation=null,this._playbackRate=1,this._gestureNavigating=!1,this._backNavigating=!1,this._onEnd=null,this._onProgress=null,this._shouldAnimate=!0,this._dispatchEvent=null,this._addEventListener=null}updateProgress(){var t,e,n,i;if(this._gestureNavigating&&!this._play)return void window.cancelAnimationFrame(this._progressUpdateID);(()=>{this._onProgress&&this._onProgress(this.progress)})(),this._progressUpdateID=window.requestAnimationFrame(this.updateProgress.bind(this));const s=()=>{window.cancelAnimationFrame(this._progressUpdateID);const t=this._gestureNavigating?0:100;this.progress!==t&&this._onProgress&&this._onProgress(t)};Promise.all([null===(t=this._inAnimation)||void 0===t?void 0:t.finished,null===(e=this._outAnimation)||void 0===e?void 0:e.finished,null===(n=this._pseudoElementInAnimation)||void 0===n?void 0:n.finished,null===(i=this._pseudoElementOutAnimation)||void 0===i?void 0:i.finished]).then(s).catch(s)}reset(){this._onEnd=null,this._playbackRate=1,this._play=!0,this._gestureNavigating=!1}finish(){var t,e,n,i;null===(t=this._inAnimation)||void 0===t||t.finish(),null===(e=this._outAnimation)||void 0===e||e.finish(),null===(n=this._pseudoElementInAnimation)||void 0===n||n.finish(),null===(i=this._pseudoElementOutAnimation)||void 0===i||i.finish()}cancel(){var t,e,n,i,s;null===(t=this._inAnimation)||void 0===t||t.cancel(),null===(e=this._outAnimation)||void 0===e||e.cancel(),null===(n=this._pseudoElementInAnimation)||void 0===n||n.cancel(),null===(i=this._pseudoElementOutAnimation)||void 0===i||i.cancel(),this.reset();const o=new CustomEvent("page-animation-cancel",{bubbles:!0});null===(s=this.dispatchEvent)||void 0===s||s.call(this,o)}cleanUpAnimation(t){t&&(t.commitStyles(),t.cancel())}async animate(){var t,e,n,i,s,o,a,r,l,u;if(this._isPlaying&&(this.cancel(),this._onEnd&&this._onEnd(),this.reset()),this._currentScreen&&this._nextScreen&&this._shouldAnimate){if(this._gestureNavigating&&await this._currentScreen.mounted(!0),this._backNavigating?(this._currentScreen.zIndex=1,this._nextScreen.zIndex=0):(this._currentScreen.zIndex=0,this._nextScreen.zIndex=1),this._onProgress&&this._onProgress(this.progress),this._onExit&&this._shouldAnimate&&this._onExit(),await this._nextScreen.mounted(!0),this._outAnimation=this._currentScreen.animation,this._pseudoElementOutAnimation=this._currentScreen.pseudoElementAnimation,this._inAnimation=this._nextScreen.animation,this._pseudoElementInAnimation=this._nextScreen.pseudoElementAnimation,this._isPlaying=!0,this._inAnimation&&this._outAnimation){if(!this._shouldAnimate)return this.finish(),this._isPlaying=!1,void(this._shouldAnimate=!0);if(this._inAnimation.playbackRate=this._playbackRate,this._outAnimation.playbackRate=this._playbackRate,this._pseudoElementInAnimation&&(this._pseudoElementInAnimation.playbackRate=this._playbackRate),this._pseudoElementOutAnimation&&(this._pseudoElementOutAnimation.playbackRate=this._playbackRate),this._gestureNavigating){const t=(0,h.V_)(this._inAnimation,this.duration),e=(0,h.V_)(this._outAnimation,this.duration);if(this._inAnimation.currentTime=t,this._outAnimation.currentTime=e,this._pseudoElementInAnimation){const t=(0,h.V_)(this._pseudoElementInAnimation,this.duration);this._pseudoElementInAnimation.currentTime=t}if(this._pseudoElementOutAnimation){const t=(0,h.V_)(this._pseudoElementOutAnimation,this.duration);this._pseudoElementOutAnimation.currentTime=t}}await Promise.all([this._inAnimation.ready,this._outAnimation.ready,null===(t=this._pseudoElementInAnimation)||void 0===t?void 0:t.ready,null===(e=this._pseudoElementOutAnimation)||void 0===e?void 0:e.ready]),this._play?(this._outAnimation.play(),this._inAnimation.play(),null===(s=this._pseudoElementInAnimation)||void 0===s||s.play(),null===(o=this._pseudoElementOutAnimation)||void 0===o||o.play()):(this._inAnimation.pause(),this._outAnimation.pause(),null===(n=this._pseudoElementInAnimation)||void 0===n||n.pause(),null===(i=this._pseudoElementOutAnimation)||void 0===i||i.pause(),this._isPlaying=!1),this._isStarted=!0;const c=new CustomEvent("page-animation-start",{bubbles:!0});null===(a=this.dispatchEvent)||void 0===a||a.call(this,c),this.updateProgress(),await Promise.all([this._outAnimation.finished,this._inAnimation.finished,null===(r=this._pseudoElementInAnimation)||void 0===r?void 0:r.finished,null===(l=this._pseudoElementOutAnimation)||void 0===l?void 0:l.finished]),this.cleanUpAnimation(this._inAnimation),this.cleanUpAnimation(this._outAnimation),this._inAnimation=null,this._outAnimation=null,this._isPlaying=!1;const d=new CustomEvent("page-animation-end",{bubbles:!0});null===(u=this.dispatchEvent)||void 0===u||u.call(this,d),this._gestureNavigating&&.5!==this._playbackRate?(this._nextScreen.zIndex=0,this._currentScreen.zIndex=1,await this._nextScreen.mounted(!1)):(this._currentScreen.zIndex=0,this._nextScreen.zIndex=1,this._currentScreen.mounted(!1)),this._onEnd&&this._onEnd(),this._isStarted=!1}}else this._shouldAnimate=!0}set onProgress(t){this._onProgress=t}set onEnd(t){this._onEnd=t}set shouldAnimate(t){this._shouldAnimate=t}set playbackRate(t){this._playbackRate=t,this._inAnimation&&this._outAnimation&&(this._inAnimation.playbackRate=this._playbackRate,this._outAnimation.playbackRate=this._playbackRate),this._pseudoElementInAnimation&&(this._pseudoElementInAnimation.playbackRate=this._playbackRate),this._pseudoElementOutAnimation&&(this._pseudoElementOutAnimation.playbackRate=this._playbackRate)}set gestureNavigating(t){this._gestureNavigating=t}set backNavigating(t){this._backNavigating=t}set play(t){var e,n,i,s,o,a,r,h;this._play!==t&&(this._play=t,this._play&&this._gestureNavigating&&this.updateProgress(),t?(null===(e=this._inAnimation)||void 0===e||e.play(),null===(n=this._outAnimation)||void 0===n||n.play(),null===(i=this._pseudoElementInAnimation)||void 0===i||i.play(),null===(s=this._pseudoElementOutAnimation)||void 0===s||s.play()):(null===(o=this._inAnimation)||void 0===o||o.pause(),null===(a=this._outAnimation)||void 0===a||a.pause(),null===(r=this._pseudoElementInAnimation)||void 0===r||r.pause(),null===(h=this._pseudoElementOutAnimation)||void 0===h||h.pause()))}set progress(t){this._onProgress&&this._onProgress(t);{let e=(0,h.V_)(this._inAnimation,this.duration);const n=t/100*Number(e);let i=(0,h.V_)(this._outAnimation,this.duration);const s=t/100*Number(i);this._inAnimation&&this._outAnimation&&(this._inAnimation.currentTime=n,this._outAnimation.currentTime=s)}{let e=(0,h.V_)(this._pseudoElementInAnimation,this.duration);const n=t/100*Number(e);let i=(0,h.V_)(this._pseudoElementOutAnimation,this.duration);const s=t/100*Number(i);this._pseudoElementInAnimation&&(this._pseudoElementInAnimation.currentTime=n),this._pseudoElementOutAnimation&&(this._pseudoElementOutAnimation.currentTime=s)}}set currentScreen(t){this._currentScreen=t}set nextScreen(t){this._nextScreen=t,this._currentScreen||(t.mounted(!0,!1),this._nextScreen=null)}set onExit(t){this._onExit=t}set addEventListener(t){this._addEventListener=t}set dispatchEvent(t){this._dispatchEvent=t}get addEventListener(){return this._addEventListener}get dispatchEvent(){return this._dispatchEvent}get duration(){var t,e,n,i;const s=null===(t=this._currentScreen)||void 0===t?void 0:t.duration,o=null===(e=this._nextScreen)||void 0===e?void 0:e.duration,a=null===(n=this._currentScreen)||void 0===n?void 0:n.pseudoElementDuration,r=null===(i=this._nextScreen)||void 0===i?void 0:i.pseudoElementDuration;return Math.max(Number(s),Number(o),Number(a),Number(r))||0}get progress(){var t,e,n,i,s,o,a,r,h,l,u,c,d,p,m,v;const g=null===(e=null===(t=this._outAnimation)||void 0===t?void 0:t.effect)||void 0===e?void 0:e.getComputedTiming().duration,f=null===(i=null===(n=this._inAnimation)||void 0===n?void 0:n.effect)||void 0===i?void 0:i.getComputedTiming().duration,y=null===(o=null===(s=this._pseudoElementOutAnimation)||void 0===s?void 0:s.effect)||void 0===o?void 0:o.getComputedTiming().duration,_=null===(r=null===(a=this._pseudoElementInAnimation)||void 0===a?void 0:a.effect)||void 0===r?void 0:r.getComputedTiming().duration,E=[Number(g),Number(f),Number(_),Number(y)],w=Math.max(...E.filter((t=>!isNaN(t))));let b;return w===Number(g)?b=null===(l=null===(h=this._outAnimation)||void 0===h?void 0:h.effect)||void 0===l?void 0:l.getComputedTiming().progress:w===Number(f)?b=null===(c=null===(u=this._inAnimation)||void 0===u?void 0:u.effect)||void 0===c?void 0:c.getComputedTiming().progress:w===Number(_)?b=null===(p=null===(d=this._pseudoElementInAnimation)||void 0===d?void 0:d.effect)||void 0===p?void 0:p.getComputedTiming().progress:w===Number(y)&&(b=null===(v=null===(m=this._pseudoElementOutAnimation)||void 0===m?void 0:m.effect)||void 0===v?void 0:v.getComputedTiming().progress),100*(Number(b)||0)}get gestureNavigating(){return this._gestureNavigating}get backNavigating(){return this._backNavigating}get isPlaying(){return this._isPlaying}get ready(){return new Promise((async(t,e)=>{var n,i,s,o;try{await Promise.all([null===(n=this._outAnimation)||void 0===n?void 0:n.ready,null===(i=this._inAnimation)||void 0===i?void 0:i.ready,null===(s=this._pseudoElementInAnimation)||void 0===s?void 0:s.ready,null===(o=this._pseudoElementOutAnimation)||void 0===o?void 0:o.ready]),t()}catch(t){e(t)}}))}get finished(){return new Promise((async(t,e)=>{var n,i,s,o;try{await this.started,await Promise.all([null===(n=this._outAnimation)||void 0===n?void 0:n.finished,null===(i=this._inAnimation)||void 0===i?void 0:i.finished,null===(s=this._pseudoElementInAnimation)||void 0===s?void 0:s.finished,null===(o=this._pseudoElementOutAnimation)||void 0===o?void 0:o.finished]),t()}catch(t){e(t)}}))}get started(){return this._isStarted?Promise.resolve():new Promise((async t=>{var e;null===(e=this.addEventListener)||void 0===e||e.call(this,"page-animation-start",(()=>{t()}),{once:!0})}))}}const u=(0,t.createContext)(new l);var c=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};const d=(0,t.createContext)(0);function p(e,n,i,s){const{paths:o}=n;let a,r,l,u,c,d=!1,p=!1,m=null;n.paths.length&&(!(0,h.e1)(s,o)&&n.paths.includes(void 0)&&(s=void 0),""!==i&&!(0,h.e1)(i,o)&&n.paths.includes(void 0)&&(i=void 0));const v=[];let g;if(t.Children.forEach(n.children,(o=>{var a;if(!(0,t.isValidElement)(o))return;(0,h.QN)(o.props.resolvedPathname,s)&&(e.backNavigating||n.gestureNavigating)&&(null===(a=o.props.config)||void 0===a?void 0:a.keepAlive)&&(g=o.key||void 0);const r=(0,h.QN)(o.props.resolvedPathname,i);if(r&&!p){let e={out:!0,in:!1};n.gestureNavigating&&(e={in:!0,out:!1}),p=!0,v.push((0,t.cloneElement)(o,Object.assign(Object.assign({},e),{resolvedPathname:r.matchedPathname})))}})),t.Children.forEach(e.children,(e=>{if(!(0,t.isValidElement)(e))return;n.paths.length||o.push(e.props.path);const i=(0,h.QN)(e.props.path,s);if(i&&!d){d=!0;const{config:s}=e.props;a=null==s?void 0:s.swipeDirection,r=null==s?void 0:s.swipeAreaWidth,u=null==s?void 0:s.hysteresis,c=null==s?void 0:s.disableDiscovery,l=null==s?void 0:s.minFlingVelocity,m=e.props.name||null;let o={in:!0,out:!1};n.gestureNavigating&&(o={out:!0,in:!1});const h=g||Math.random();v.push((0,t.cloneElement)(e,Object.assign(Object.assign({},o),{resolvedPathname:i.matchedPathname,key:h})))}})),!t.Children.count(v)){return{children:t.Children.map(e.children,(e=>{var n;if((0,t.isValidElement)(e)&&(0,h.QN)(e.props.path,void 0)){const{config:i}=e.props;return a=null==i?void 0:i.swipeDirection,r=null==i?void 0:i.swipeAreaWidth,u=null==i?void 0:i.hysteresis,c=null==i?void 0:i.disableDiscovery,l=null==i?void 0:i.minFlingVelocity,m=null!==(n=e.props.name)&&void 0!==n?n:null,(0,t.cloneElement)(e,{in:!0,out:!1})}})),name:m,swipeDirection:a||e.swipeDirection,swipeAreaWidth:r||e.swipeAreaWidth,hysteresis:u||e.hysteresis,disableDiscovery:void 0===c?e.disableDiscovery:c,minFlingVelocity:l||e.minFlingVelocity}}return{paths:o,children:v,name:m,currentPath:e.currentPath,swipeDirection:a||e.swipeDirection,swipeAreaWidth:r||e.swipeAreaWidth,hysteresis:u||e.hysteresis,disableDiscovery:void 0===c?e.disableDiscovery:c,minFlingVelocity:l||e.minFlingVelocity}}class m extends t.Component{constructor(){super(...arguments),this.onSwipeStartListener=this.onSwipeStart.bind(this),this.onSwipeListener=this.onSwipe.bind(this),this.onSwipeEndListener=this.onSwipeEnd.bind(this),this.ref=null,this.state={currentPath:"",children:this.props.children,progress:100,shouldPlay:!0,gestureNavigating:!1,shouldAnimate:!0,startX:0,startY:0,paths:[],swipeDirection:this.props.swipeDirection,swipeAreaWidth:this.props.swipeAreaWidth,minFlingVelocity:this.props.minFlingVelocity,hysteresis:this.props.hysteresis,disableDiscovery:!1},this.setRef=t=>{this.ref&&this.ref.removeEventListener("swipestart",this.onSwipeStartListener),this.ref=t,t&&t.addEventListener("swipestart",this.onSwipeStartListener)}}static getDerivedStateFromProps(t,e){if(t.currentPath!==e.currentPath){if(!e.shouldAnimate)return{currentPath:t.currentPath,shouldAnimate:!0};let n=t.currentPath;const i=p(t,e,e.currentPath,t.currentPath),{name:s}=i,o=c(i,["name"]);return o.children.sort(((t,e)=>(0,h.QN)(t.props.path,n)?1:-1)),t.onDocumentTitleChange(s),o}return null}componentDidMount(){this.context.onProgress=t=>{const e=this.props.backNavigating&&!this.state.gestureNavigating?99-t:t,n=(0,h.uZ)(e,0,100);this.setState({progress:n});const i=new CustomEvent("motion-progress",{detail:{progress:n}});this.props.dispatchEvent&&this.props.dispatchEvent(i)}}componentDidUpdate(t,e){t.currentPath!==this.state.currentPath&&(this.context.backNavigating=this.props.backNavigating,!this.state.gestureNavigating&&e.shouldAnimate&&(this.context.play=!0,this.context.animate()))}onGestureSuccess(t,e){this.props.onDocumentTitleChange(e),this.setState(t)}onSwipeStart(t){if(t.touches.length>1)return;if(this.state.disableDiscovery)return;if(this.context.isPlaying)return;if(0===this.context.duration)return;let e;switch(this.state.swipeDirection){case"left":case"right":e=t.x;break;case"up":case"down":e=t.y}if(t.direction===this.state.swipeDirection&&e<this.state.swipeAreaWidth){if(!this.props.lastPath)return;t.stopPropagation();for(let e of t.composedPath().reverse())if("classList"in e&&e.classList.length){if(e.classList.contains("gesture-region")&&"true"===e.dataset.disabled)return;if(e===t.gestureTarget)break}const e=p(this.props,Object.assign(Object.assign({},this.state),{gestureNavigating:!0}),this.props.currentPath,this.props.lastPath),{children:n,currentPath:i,paths:s,name:o}=e,a=c(e,["children","currentPath","paths","name"]);this.onGestureSuccess=this.onGestureSuccess.bind(this,a,o),this.props.navigation.addEventListener("go-back",this.onGestureSuccess,{once:!0}),this.props.onGestureNavigationStart(),this.setState({shouldPlay:!1,gestureNavigating:!0,children:n.sort((t=>(0,h.QN)(t.props.path,i)?-1:1)),startX:t.x,startY:t.y},(()=>{var t,e;const n=new CustomEvent("motion-progress-start");this.context.gestureNavigating=!0,this.context.playbackRate=-1,this.context.play=!1,this.context.backNavigating=this.props.backNavigating,this.context.animate(),this.props.dispatchEvent&&this.props.dispatchEvent(n),null===(t=this.ref)||void 0===t||t.addEventListener("swipe",this.onSwipeListener),null===(e=this.ref)||void 0===e||e.addEventListener("swipeend",this.onSwipeEndListener)}))}}onSwipe(t){if(this.state.shouldPlay)return;let e;switch(this.state.swipeDirection){case"left":case"right":{const n=window.innerWidth;e=-((0,h.uZ)(t.x-this.state.startX,10)-n)/n*100,"left"===this.state.swipeDirection&&(e=100-e);break}case"up":case"down":{const n=window.innerHeight;e=-((0,h.uZ)(t.y-this.state.startY,10)-n)/n*100,"up"===this.state.swipeDirection&&(e=100-e);break}}this.context.progress=(0,h.uZ)(e,.1,100)}onSwipeEnd(t){var e,n;if(this.state.shouldPlay)return;let i=null;const s=new CustomEvent("motion-progress-end");100-this.state.progress>this.state.hysteresis||t.velocity>this.state.minFlingVelocity?(t.velocity>=this.state.minFlingVelocity?this.context.playbackRate=-5:this.context.playbackRate=-1,i=()=>{this.context.reset(),this.props.onGestureNavigationEnd(),this.setState({gestureNavigating:!1}),this.props.dispatchEvent&&this.props.dispatchEvent(s)},this.setState({shouldPlay:!0,shouldAnimate:!1})):(this.context.playbackRate=.5,i=()=>{this.props.navigation.removeEventListener("go-back",this.onGestureSuccess),this.context.reset(),this.props.dispatchEvent&&this.props.dispatchEvent(s)},this.setState({shouldPlay:!0,gestureNavigating:!1})),this.setState({startX:0,startY:0}),this.context.onEnd=i,this.context.play=!0,null===(e=this.ref)||void 0===e||e.removeEventListener("swipe",this.onSwipeListener),null===(n=this.ref)||void 0===n||n.removeEventListener("swipeend",this.onSwipeEndListener)}render(){return(0,r.jsx)("div",Object.assign({className:"animation-layer",ref:this.setRef,style:{width:"100%",height:"100%",display:"grid",[`--${this.props.navigation.routerId}-motion-progress`]:this.state.progress}},{children:(0,r.jsx)(d.Provider,Object.assign({value:this.state.progress},{children:this.state.children}))}))}}m.contextType=u;class v extends t.Component{constructor(){super(...arguments),this.ref=null,this._currentScene=null,this._nextScene=null,this.onProgressStartListener=this.onProgressStart.bind(this),this.onProgressListener=this.onProgress.bind(this),this.onProgressEndListener=this.onProgressEnd.bind(this),this.state={transitioning:!1,playing:!0}}set currentScene(t){this._currentScene=t}set nextScene(t){this._nextScene=t,!this._currentScene||this._currentScene.isEmpty()||this._nextScene.isEmpty()?(this._currentScene=null,this._nextScene=null):this.sharedElementTransition(this._currentScene,this._nextScene)}finish(){var t;const e=(null===(t=this.ref)||void 0===t?void 0:t.getAnimations({subtree:!0}))||[];for(const t of e)t.finish()}sharedElementTransition(t,e){if(0===this.context.duration)return;if(this.state.transitioning)return void this.finish();const n=()=>{this.setState({transitioning:!1}),this._nextScene=null,this._currentScene=null},i=()=>{var t;const e=(null===(t=this.ref)||void 0===t?void 0:t.getAnimations({subtree:!0}))||[];for(const t of e)t.cancel();n()},s=queueMicrotask.bind(null,(async()=>{var s,o,a,r,l,u,c,d,p,m,v,g,f,y,_,E,w,b,x,S,P,A,L,R,D,k,O,N,I,T,C,j,$,M,U,F,V,z,Y,X,B,H,W,G,K,q,J;null===(s=this.ref)||void 0===s||s.showModal();for(const[n,i]of t.nodes)if(e.nodes.has(n)){const s=e.nodes.get(n).instance,Z=i.instance,Q=s.transitionType||Z.transitionType||"morph",tt=i.instance.node,et=e.nodes.get(n).instance.node;if(!tt||!et)continue;const nt=tt.firstElementChild,it=et.firstElementChild;if(!nt||!it)continue;const st=Z.clientRect,ot=s.clientRect;let at,rt,ht={},lt={};"morph"===Q&&([at,ht]=Z.CSSData,[rt,lt]=s.CSSData),at=Z.CSSText,rt=s.CSSText,nt.style.cssText=at,"morph"!==Q&&(it.style.cssText=rt,et.style.position="absolute",it.style.position="absolute",et.style.zIndex=it.style.zIndex,et.style.top="0",et.style.left="0"),tt.style.position="absolute",nt.style.position="absolute",tt.style.zIndex=nt.style.zIndex,tt.style.top="0",tt.style.left="0";const ut={id:Z.id,start:{x:{node:tt,delay:null!==(u=null!==(r=null===(a=null===(o=Z.props.config)||void 0===o?void 0:o.x)||void 0===a?void 0:a.delay)&&void 0!==r?r:null===(l=s.props.config)||void 0===l?void 0:l.delay)&&void 0!==u?u:0,duration:(null===(d=null===(c=Z.props.config)||void 0===c?void 0:c.x)||void 0===d?void 0:d.duration)||(null===(p=s.props.config)||void 0===p?void 0:p.duration)||this.context.duration,easingFunction:(null===(v=null===(m=Z.props.config)||void 0===m?void 0:m.x)||void 0===v?void 0:v.easingFunction)||(null===(g=Z.props.config)||void 0===g?void 0:g.easingFunction)||"ease",position:st.x},y:{node:nt,delay:null!==(w=null!==(_=null===(y=null===(f=Z.props.config)||void 0===f?void 0:f.y)||void 0===y?void 0:y.delay)&&void 0!==_?_:null===(E=s.props.config)||void 0===E?void 0:E.delay)&&void 0!==w?w:0,duration:(null===(x=null===(b=Z.props.config)||void 0===b?void 0:b.y)||void 0===x?void 0:x.duration)||(null===(S=s.props.config)||void 0===S?void 0:S.duration)||this.context.duration,easingFunction:(null===(A=null===(P=Z.props.config)||void 0===P?void 0:P.y)||void 0===A?void 0:A.easingFunction)||(null===(L=Z.props.config)||void 0===L?void 0:L.easingFunction)||"ease",position:st.y}},end:{x:{node:et,delay:null!==(N=null!==(k=null===(D=null===(R=s.props.config)||void 0===R?void 0:R.x)||void 0===D?void 0:D.delay)&&void 0!==k?k:null===(O=s.props.config)||void 0===O?void 0:O.delay)&&void 0!==N?N:0,duration:(null===(T=null===(I=s.props.config)||void 0===I?void 0:I.x)||void 0===T?void 0:T.duration)||(null===(C=s.props.config)||void 0===C?void 0:C.duration)||this.context.duration,easingFunction:(null===($=null===(j=s.props.config)||void 0===j?void 0:j.x)||void 0===$?void 0:$.easingFunction)||(null===(M=s.props.config)||void 0===M?void 0:M.easingFunction)||"ease",position:ot.x},y:{node:it,delay:null!==(Y=null!==(V=null===(F=null===(U=s.props.config)||void 0===U?void 0:U.y)||void 0===F?void 0:F.delay)&&void 0!==V?V:null===(z=s.props.config)||void 0===z?void 0:z.delay)&&void 0!==Y?Y:0,duration:(null===(B=null===(X=s.props.config)||void 0===X?void 0:X.y)||void 0===B?void 0:B.duration)||(null===(H=s.props.config)||void 0===H?void 0:H.duration)||this.context.duration,easingFunction:(null===(G=null===(W=s.props.config)||void 0===W?void 0:W.x)||void 0===G?void 0:G.easingFunction)||(null===(K=s.props.config)||void 0===K?void 0:K.easingFunction)||"ease",position:ot.y}}};if(tt.style.display="unset",null===(q=this.ref)||void 0===q||q.appendChild(tt),Z.onCloneAppended(tt),"morph"!==Q){const t=parseInt(tt.style.zIndex)||0,e=parseInt(et.style.zIndex)||0;et.style.zIndex=`${(0,h.uZ)(e,0,t-1)}`,et.style.display="unset",null===(J=this.ref)||void 0===J||J.appendChild(et),s.onCloneAppended(et)}else s.onCloneAppended(tt);let ct,dt,pt,mt;Z.hidden(!0),s.hidden(!0),tt.style.willChange="contents, transform, opacity","morph"!==Q&&(et.style.willChange="contents, transform, opacity"),"morph"===Q?(ct=ut.start.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`},{transform:`translate(${ut.end.x.position}px, 0px)`}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-start`}),dt=ut.start.y.node.animate([Object.assign(Object.assign({},ht),{transform:`translate(0px, ${ut.start.y.position}px)`}),Object.assign(Object.assign({},lt),{transform:`translate(0px, ${ut.end.y.position}px)`})],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-start`})):"fade"===Q?(ct=ut.start.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:1},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:0}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-start`}),dt=ut.start.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-start`}),pt=ut.end.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`},{transform:`translate(${ut.end.x.position}px, 0px)`}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-end`}),mt=ut.end.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-end`})):"fade-through"===Q?(ct=ut.start.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:1},{opacity:0,offset:.5},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:0}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-start`}),dt=ut.start.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-start`}),pt=ut.end.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:0},{opacity:0,offset:.5},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:1}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-end`}),mt=ut.end.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-end`})):(ct=ut.start.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:1},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:0}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-start`}),dt=ut.start.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-start`}),pt=ut.end.x.node.animate([{transform:`translate(${ut.start.x.position}px, 0px)`,opacity:0},{transform:`translate(${ut.end.x.position}px, 0px)`,opacity:1}],{fill:"both",easing:ut.end.x.easingFunction,duration:ut.end.x.duration,delay:ut.end.x.delay,id:`${n}-x-end`}),mt=ut.end.y.node.animate([{transform:`translate(0px, ${ut.start.y.position}px)`},{transform:`translate(0px, ${ut.end.y.position}px)`}],{fill:"both",easing:ut.end.y.easingFunction,duration:ut.end.y.duration,delay:ut.end.y.delay,id:`${n}-y-end`}));const vt=[ct,dt,pt,mt];this.state.playing||vt.forEach((t=>{var e;if(!t)return;const n=this.context.duration;let i=null===(e=t.effect)||void 0===e?void 0:e.getComputedTiming().duration;"string"==typeof i&&(i=parseFloat(i)),i=i||n,t.currentTime=i,t.pause()}));const gt=async()=>{console.assert(n===s.id,"Not sure what happened here."),console.assert(n===Z.id,"Not sure what happened here."),tt.style.willChange="auto","morph"!==Q&&(et.style.willChange="auto"),await s.hidden(!1),t.keepAlive&&this.state.playing?Z.keepAlive(!0):(Z.keepAlive(!1),await Z.hidden(!1)),this.state.playing&&(Z.onCloneRemove(tt),"morph"!==Q?(s.onCloneRemove(et),et.remove()):s.onCloneRemove(tt),tt.remove())},ft=async()=>{tt.style.willChange="auto","morph"!==Q&&(et.style.willChange="auto"),await Z.hidden(!1),await s.hidden(!1)};Promise.all(vt.map((t=>null==t?void 0:t.finished))).then(gt).catch(ft)}this.ref&&Promise.all(this.ref.getAnimations({subtree:!0}).map((t=>t.finished))).then(n).catch(i)}));this.setState({transitioning:!0},s),this.props.navigation.addEventListener("page-animation-cancel",i,{once:!0})}componentDidMount(){this.props.instance&&this.props.instance(this),this.props.navigation.addEventListener("motion-progress-start",this.onProgressStartListener,{capture:!0}),this.props.navigation.addEventListener("motion-progress",this.onProgressListener,{capture:!0}),this.props.navigation.addEventListener("motion-progress-end",this.onProgressEndListener,{capture:!0})}componentWillUnmount(){this.props.navigation.removeEventListener("motion-progress-start",this.onProgressStartListener,{capture:!0}),this.props.navigation.removeEventListener("motion-progress",this.onProgressListener,{capture:!0}),this.props.navigation.removeEventListener("motion-progress-end",this.onProgressEndListener,{capture:!0})}onProgressStart(){this.setState({playing:!1})}onProgress(t){var e,n;if(!this.state.playing){const i=(null===(e=this.ref)||void 0===e?void 0:e.getAnimations({subtree:!0}))||[];for(const e of i){const i=t.detail.progress,s=this.context.duration;let o=null===(n=e.effect)||void 0===n?void 0:n.getComputedTiming().duration;"string"==typeof o&&(o=parseFloat(o)),o=o||s;const a=i/100*Number(o);e.currentTime=a}}}onProgressEnd(){this.state.playing||this.finish(),this.setState({playing:!0,transitioning:!1})}render(){return this.state.transitioning?(0,r.jsx)("dialog",Object.assign({id:"ghost-layer",ref:t=>this.ref=t,style:{position:"absolute",zIndex:h.dw,maxWidth:"unset",maxHeight:"unset",width:"100vw",height:"100vh",contain:"strict",padding:0,border:"none",backgroundColor:"transparent"}},{children:(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:"#ghost-layer::backdrop {display: none}"}})})):(0,r.jsx)(r.Fragment,{})}}v.contextType=u;class g extends t.Component{constructor(t){var e;super(t),this.animationLayerData=new l,this.ref=null,this.dispatchEvent=null,this.addEventListener=null,this.removeEventListener=null,this.state={currentPath:"",backNavigating:!1,gestureNavigating:!1,routesData:new Map,implicitBack:!1,defaultDocumentTitle:document.title},this.onDocumentTitleChange=t=>{document.title=t||this.state.defaultDocumentTitle},this.setRef=t=>{this.ref&&(this.dispatchEvent=null,this.addEventListener=null,this.removeEventListener=null,this.animationLayerData.dispatchEvent=this.dispatchEvent,this._routerData.dispatchEvent=this.dispatchEvent,this._routerData.addEventListener=this.addEventListener,this._routerData.removeEventListener=this.removeEventListener,this.removeNavigationEventListeners(this.ref)),t&&(this.dispatchEvent=e=>(0,h.Nu)(e,t),this.addEventListener=(e,n,i)=>t.addEventListener(e,n,i),this.removeEventListener=(e,n,i)=>t.removeEventListener(e,n,i),this.animationLayerData.dispatchEvent=this.dispatchEvent,this.animationLayerData.addEventListener=this.addEventListener,this._routerData.dispatchEvent=this.dispatchEvent,this._routerData.addEventListener=this.addEventListener,this._routerData.removeEventListener=this.removeEventListener,this.addNavigationEventListeners(t))},this._id=null!==(e=t.id)&&void 0!==e?e:Math.random().toString().replace(".","-"),t.config?this.config=t.config:this.config={animation:h.r2}}componentDidMount(){this._routerData.paramsDeserializer=this.props.config.paramsDeserializer,this._routerData.paramsSerializer=this.props.config.paramsSerializer,window.addEventListener("popstate",this.onPopStateListener)}componentWillUnmount(){this.navigation.destructor(),this._routerData.destructor(),this.ref&&this.removeNavigationEventListeners(this.ref),window.removeEventListener("popstate",this.onPopStateListener)}initialise(t){let e=t.location.pathname;const n=this._routerData.paramsDeserializer||null,i=(0,h.fJ)(window.location.search,n),s=this.state.routesData;this._routerData.routesData=this.state.routesData,i&&s.set(e,Object.assign(Object.assign({},this.state.routesData.get(e)),{params:i})),this.setState({currentPath:e,routesData:s}),this._routerData.currentPath=e}get id(){return this._id}get parentRouterData(){return this._routerData.parentRouterData}get baseURL(){var t;const e=window.location.origin,n=this.props.config.basePathname||"";if(this.parentRouterData){const e=this.parentRouterData.navigation.history.baseURL,i=(null===(t=this.parentRouterData.mountedScreen)||void 0===t?void 0:t.resolvedPathname)||"";return(0,h.PV)(n,(0,h.PV)(i,e))}return new URL(n,e)}addNavigationEventListeners(t){t.addEventListener("go-back",this.onBackListener),t.addEventListener("navigate",this.onNavigateListener)}removeNavigationEventListeners(t){t.removeEventListener("go-back",this.onBackListener),t.removeEventListener("navigate",this.onNavigateListener)}render(){return(0,r.jsx)("div",Object.assign({id:this._id.toString(),className:"react-motion-router",style:{width:"100%",height:"100%"},ref:this.setRef},{children:(0,r.jsx)(n.Consumer,{children:t=>(this._routerData.parentRouterData=t,(0,r.jsx)(n.Provider,Object.assign({value:this._routerData},{children:(0,r.jsxs)(u.Provider,Object.assign({value:this.animationLayerData},{children:[Boolean(this.navigation)&&(0,r.jsx)(v,{instance:t=>{this._routerData.ghostLayer=t},backNavigating:this.state.backNavigating,gestureNavigating:this.state.gestureNavigating,navigation:this._routerData.navigation,animationLayerData:this.animationLayerData}),Boolean(this.navigation)&&(0,r.jsx)(m,Object.assign({disableBrowserRouting:this.props.config.disableBrowserRouting||!1,disableDiscovery:this.props.config.disableDiscovery||!1,hysteresis:this.props.config.hysteresis||50,minFlingVelocity:this.props.config.minFlingVelocity||400,swipeAreaWidth:this.props.config.swipeAreaWidth||100,swipeDirection:this.props.config.swipeDirection||"right",navigation:this._routerData.navigation,backNavigating:this.state.backNavigating,currentPath:this.navigation.history.current,lastPath:this.navigation.history.previous,onGestureNavigationStart:this.onGestureNavigationStart,onGestureNavigationEnd:this.onGestureNavigationEnd,onDocumentTitleChange:this.onDocumentTitleChange,dispatchEvent:this.dispatchEvent},{children:this.props.children}))]}))})))})}))}}g.defaultProps={config:{animation:h.r2}};const f={"slide-right-in":[{transform:"translateX(100vw)"},{transform:"translateX(0vw)"}],"slide-back-right-in":[{transform:"translateX(50vw)"},{transform:"translateX(0vw)"}],"slide-right-out":[{transform:"translateX(0vw)"},{transform:"translateX(-50vw)"}],"slide-back-right-out":[{transform:"translateX(0vw)"},{transform:"translateX(-100vw)"}],"slide-left-in":[{transform:"translateX(-100vw)"},{transform:"translateX(0vw)"}],"slide-back-left-in":[{transform:"translateX(-50vw)"},{transform:"translateX(0vw)"}],"slide-left-out":[{transform:"translateX(0vw)"},{transform:"translateX(50vw)"}],"slide-back-left-out":[{transform:"translateX(0vw)"},{transform:"translateX(100vw)"}],"slide-up-in":[{transform:"translateY(100vh)"},{transform:"translateY(0vh)"}],"slide-back-up-in":[{transform:"translateY(50vh)"},{transform:"translateY(0vh)"}],"slide-up-out":[{transform:"translateY(0vh)"},{transform:"translateY(-50vh)"}],"slide-back-up-out":[{transform:"translateY(0vh)"},{transform:"translateY(-100vh)"}],"slide-down-in":[{transform:"translateY(-100vh)"},{transform:"translateY(0vh)"}],"slide-back-down-in":[{transform:"translateY(-50vh)"},{transform:"translateY(0vh)"}],"slide-down-out":[{transform:"translateY(0vh)"},{transform:"translateY(50vh)"}],"slide-back-down-out":[{transform:"translateY(0vh)"},{transform:"translateY(100vh)"}],"zoom-in-in":[{transform:"scale(0.85)",opacity:0},{transform:"scale(1)",opacity:1}],"zoom-in-out":[{transform:"scale(1)",opacity:1},{transform:"scale(1.15)",opacity:0}],"zoom-out-in":[{transform:"scale(1.15)",opacity:0},{transform:"scale(1)",opacity:1}],"zoom-out-out":[{transform:"scale(1)",opacity:1},{transform:"scale(0.85)",opacity:0}],"fade-in":[{opacity:0},{opacity:1}],"fade-out":[{opacity:1},{opacity:0}],none:[]},y={left:"right",right:"left",up:"down",down:"up",in:"out",out:"in"};class _ extends t.Component{constructor(){super(...arguments),this._animationLayerData=null,this.ref=null,this.onAnimationEnd=this.animationEnd.bind(this),this.onNavigate=this.navigate.bind(this),this.setRef=this.onRef.bind(this),this.state={mounted:!1,zIndex:0,tabIndex:0}}onRef(t){this.ref=t,this.props.onRef(t)}animationEnd(){this.ref&&(this.ref.style.willChange="auto",this.ref.style.pointerEvents="auto"),this.props.in&&this.props.onEntered()}navigate(){this.ref&&(this.ref.style.willChange="transform, opacity",this.ref.style.pointerEvents="none")}componentDidMount(){this.props.navigation.addEventListener("page-animation-start",this.onNavigate),this.props.navigation.addEventListener("motion-progress-start",this.onNavigate),this.props.navigation.addEventListener("page-animation-end",this.onAnimationEnd),this.props.navigation.addEventListener("motion-progress-end",this.onAnimationEnd),this._animationLayerData&&(this.props.in&&(this._animationLayerData.nextScreen=this),this.props.out&&(this._animationLayerData.onExit=this.props.onExit,this._animationLayerData.currentScreen=this))}componentDidUpdate(t){this._animationLayerData&&(this.props.out===t.out&&this.props.in===t.in||(this.props.out?(this._animationLayerData.onExit=this.props.onExit,this._animationLayerData.currentScreen=this):this.props.in&&(this._animationLayerData.nextScreen=this)))}componentWillUnmount(){this.props.navigation.removeEventListener("page-animation-start",this.onNavigate),this.props.navigation.removeEventListener("motion-progress-start",this.onNavigate),this.props.navigation.removeEventListener("page-animation-end",this.onAnimationEnd),this.props.navigation.removeEventListener("motion-progress-end",this.onAnimationEnd)}getAnimationConfig(t,e){"function"==typeof e&&(e=e());const n=e[t];if(!("type"in n))return n;{let e=n.direction,i="";switch(this.props.backNavigating&&e&&("zoom"!==n.type&&"slide"!==n.type||(e=y[e],i="back-")),n.type){case"slide":return"in"!==e&&"out"!==e||(e="left"),[`slide-${i}${e||"left"}-${t}`,n.duration,n.easingFunction];case"zoom":return"in"!==e&&"out"!==e&&(e="in"),[`zoom-${e||"in"}-${t}`,n.duration,n.easingFunction];case"fade":return[`fade-${t}`,n.duration,n.easingFunction];default:return["none",n.duration,void 0]}}}get pseudoElementInAnimation(){return this.props.pseudoElement?this.getAnimationConfig("in",this.props.pseudoElement.animation):null}get pseudoElementOutAnimation(){return this.props.pseudoElement?this.getAnimationConfig("out",this.props.pseudoElement.animation):null}get inAnimation(){return this.getAnimationConfig("in",this.props.animation)}get outAnimation(){return this.getAnimationConfig("out",this.props.animation)}get pseudoElementDuration(){var t;const e=this.props.in?this.pseudoElementInAnimation:this.pseudoElementOutAnimation;if(!e)return null;if(Array.isArray(e)){const[t,n]=e;return n}return"number"==typeof e.options?e.options:null===(t=e.options)||void 0===t?void 0:t.duration}get duration(){var t;const e=this.props.in?this.inAnimation:this.outAnimation;if(Array.isArray(e)){const[t,n]=e;return n}return"number"==typeof e.options?e.options:null===(t=e.options)||void 0===t?void 0:t.duration}get pseudoElementAnimation(){var t,e,n;if(!this.ref||!this.props.pseudoElement)return null;const i=this.props.pseudoElement.selector;let s=(null===(t=this._animationLayerData)||void 0===t?void 0:t.gestureNavigating)?"linear":"ease-out";if(this.props.in){if(Array.isArray(this.pseudoElementInAnimation)){const[t,e,n]=this.pseudoElementInAnimation;return new Animation(new KeyframeEffect(this.ref,f[t],{fill:"both",duration:e,easing:n||s,pseudoElement:i}))}{let{keyframes:t,options:n}=this.pseudoElementInAnimation;return n="number"==typeof n?{duration:n,easing:s,fill:"both",pseudoElement:i}:Object.assign(Object.assign({},n),{fill:(null==n?void 0:n.fill)||"both",duration:(null==n?void 0:n.duration)||(null===(e=this._animationLayerData)||void 0===e?void 0:e.duration),easing:(null==n?void 0:n.easing)||s,pseudoElement:i}),new Animation(new KeyframeEffect(this.ref,t,n))}}if(Array.isArray(this.pseudoElementOutAnimation)){const[t,e,n]=this.pseudoElementOutAnimation;return new Animation(new KeyframeEffect(this.ref,f[t],{fill:"both",duration:e,easing:n||s,pseudoElement:i}))}{let{keyframes:t,options:e}=this.pseudoElementOutAnimation;return e="number"==typeof e?{duration:e,easing:s,fill:"both",pseudoElement:i}:Object.assign(Object.assign({},e),{easing:(null==e?void 0:e.easing)||s,duration:(null==e?void 0:e.duration)||(null===(n=this._animationLayerData)||void 0===n?void 0:n.duration),fill:(null==e?void 0:e.fill)||"both",pseudoElement:i}),new Animation(new KeyframeEffect(this.ref,t,e))}}get animation(){var t,e,n;if(!this.ref)return null;let i=(null===(t=this._animationLayerData)||void 0===t?void 0:t.gestureNavigating)?"linear":"ease-out";if(this.props.in){if(Array.isArray(this.inAnimation)){const[t,e,n]=this.inAnimation;return new Animation(new KeyframeEffect(this.ref,f[t],{fill:"both",duration:e,easing:n||i}))}{let{keyframes:t,options:n}=this.inAnimation;return n="number"==typeof n?{duration:n,easing:i,fill:"both"}:Object.assign(Object.assign({},n),{fill:(null==n?void 0:n.fill)||"both",duration:(null==n?void 0:n.duration)||(null===(e=this._animationLayerData)||void 0===e?void 0:e.duration),easing:(null==n?void 0:n.easing)||i}),new Animation(new KeyframeEffect(this.ref,t,n))}}if(Array.isArray(this.outAnimation)){const[t,e,n]=this.outAnimation;return new Animation(new KeyframeEffect(this.ref,f[t],{fill:"both",duration:e,easing:n||i}))}{let{keyframes:t,options:e}=this.outAnimation;return e="number"==typeof e?{duration:e,easing:i,fill:"both"}:Object.assign(Object.assign({},e),{easing:(null==e?void 0:e.easing)||i,duration:(null==e?void 0:e.duration)||(null===(n=this._animationLayerData)||void 0===n?void 0:n.duration),fill:(null==e?void 0:e.fill)||"both"}),new Animation(new KeyframeEffect(this.ref,t,e))}}set zIndex(t){this.setState({zIndex:t,tabIndex:t-1})}mounted(t,e=!0){return new Promise((n=>{const i=()=>{var i,s;if(t){e&&this.ref&&(this.ref.style.willChange="transform, opacity");const t=Boolean(this.props.in&&!(null===(i=this._animationLayerData)||void 0===i?void 0:i.gestureNavigating)||this.props.out&&(null===(s=this._animationLayerData)||void 0===s?void 0:s.gestureNavigating));this.props.onEnter&&this.props.onEnter(t)}else this.props.onExited();n()};this.props.keepAlive&&!t?n():this.setState({mounted:t},i)}))}render(){const t=this.props.renderAs;return(0,r.jsx)(t,Object.assign({id:`${this.props.name}-animation-provider`,className:"animation-provider",ref:this.setRef,tabIndex:this.state.tabIndex,style:{gridArea:"1 / 1",width:"100%",height:"100%",transformOrigin:"center center",zIndex:this.state.zIndex}},{children:(0,r.jsx)(u.Consumer,{children:t=>(this._animationLayerData=t,this.state.mounted?this.props.children:(0,r.jsx)(r.Fragment,{}))})}))}}var E,w,b,x,S,P,A;function L(t){return null!==t&&("function"==typeof t||"object"==typeof t&&t.$$typeof===Symbol.for("react.lazy"))}!function(t){t[t.up=0]="up",t[t.down=1]="down",t[t.left=2]="left",t[t.right=3]="right",t[t.in=4]="in",t[t.out=5]="out"}(E||(E={})),function(t){t[t.slide=0]="slide",t[t.fade=1]="fade",t[t.zoom=2]="zoom",t[t.none=3]="none"}(w||(w={})),function(t){t[t.ease=0]="ease",t[t["ease-in"]=1]="ease-in",t[t["ease-in-out"]=2]="ease-in-out",t[t["ease-out"]=3]="ease-out",t[t.linear=4]="linear"}(b||(b={})),function(t){t[t.center=0]="center",t[t.top=1]="top",t[t.bottom=2]="bottom",t[t.left=3]="left",t[t.right=4]="right"}(x||(x={})),function(t){t[t.cap=0]="cap",t[t.ch=1]="ch",t[t.em=2]="em",t[t.ex=3]="ex",t[t.ic=4]="ic",t[t.lh=5]="lh",t[t.rem=6]="rem",t[t.rlh=7]="rlh",t[t.vh=8]="vh",t[t.vw=9]="vw",t[t.vi=10]="vi",t[t.vb=11]="vb",t[t.vmin=12]="vmin",t[t.vmax=13]="vmax",t[t.px=14]="px",t[t.cm=15]="cm",t[t.mm=16]="mm",t[t.Q=17]="Q",t[t.in=18]="in",t[t.pc=19]="pc",t[t.pt=20]="pt",t[t["%"]=21]="%"}(S||(S={})),function(t){t[t.inital=0]="inital",t[t.inherit=1]="inherit",t[t.revert=2]="revert",t[t.unset=3]="unset"}(P||(P={})),function(t){t[t.morph=0]="morph",t[t["fade-through"]=1]="fade-through",t[t.fade=2]="fade",t[t["cross-fade"]=3]="cross-fade"}(A||(A={}));class R{constructor(t){this._nodes=new Map,this._name="",this._scrollPos=null,this._getScreenRect=()=>new DOMRect,this._keepAlive=!1,this._name=t}addNode(t){t&&(console.assert(!this.nodes.has(t.id),`Duplicate Shared Element ID: ${t.id} in ${this._name}`),this._nodes.set(t.id,t))}removeNode(t){this._nodes.delete(t)}get xRatio(){const t=(this._getScreenRect().width/window.innerWidth).toFixed(2);return parseFloat(t)}get yRatio(){const t=(this._getScreenRect().height/window.innerHeight).toFixed(2);return parseFloat(t)}get nodes(){return this._nodes}get name(){return this._name}get scrollPos(){return this._scrollPos||{x:0,y:0}}get x(){return this._getScreenRect().x}get y(){return this._getScreenRect().y}get keepAlive(){return this._keepAlive}set scrollPos(t){this._scrollPos=t}set getScreenRect(t){this._getScreenRect=t}set keepAlive(t){this._keepAlive=t}isEmpty(){return!Boolean(this._nodes.size)}}const D=(0,t.createContext)(null);function k(t,e,n){const i=e.firstElementChild;return i?(n.props.config&&n.props.config.transformOrigin&&(i.style.transformOrigin=n.props.config.transformOrigin),{id:t,instance:n}):null}const O=["transform","top","left","right","bottom"];class N extends t.Component{constructor(){super(...arguments),this._id=this.props.id.toString(),this._ref=null,this._scene=null,this._mutationObserver=new MutationObserver(this.updateScene.bind(this)),this._callbackID=0,this._computedStyle=null,this._isMounted=!1,this.onRef=this.setRef.bind(this),this.state={hidden:!1,keepAlive:!1},this.onCloneAppended=t=>{},this.onCloneRemove=t=>{var e;if((null===(e=this._ref)||void 0===e?void 0:e.firstElementChild)instanceof HTMLVideoElement){const e=t.firstElementChild;this._ref.firstElementChild.currentTime=e.currentTime,e.paused||e.pause()}}}get scene(){return this._scene}get node(){var t;return this._ref?this._ref.firstElementChild instanceof HTMLVideoElement&&"morph"===(null!==(t=this.transitionType)&&void 0!==t?t:"morph")?this._ref:this._ref.cloneNode(!0):null}get clientRect(){if(this._ref&&this._ref.firstElementChild){return this._ref.firstElementChild.getBoundingClientRect()}return new DOMRect}get CSSData(){const t=this._computedStyle;return t?(0,h.hR)(t,O):["",{}]}get CSSText(){const t=this._computedStyle;if(t){const[e]=(0,h.hR)(t,O,!1);return e}return""}get id(){return this._id}get transitionType(){var t;return null===(t=this.props.config)||void 0===t?void 0:t.type}keepAlive(t){return new Promise((e=>{this.setState({keepAlive:t},(()=>e()))}))}hidden(t){return new Promise(((e,n)=>{this._isMounted?this.setState({hidden:t},(()=>{e()})):e()}))}setRef(t){var e,n;this._ref!==t&&(this._ref&&(null===(e=this.scene)||void 0===e||e.removeNode(this._id),this._mutationObserver.disconnect(),this._computedStyle=null),this._ref=t,t&&(null===(n=this.scene)||void 0===n||n.addNode(k(this._id,t,this)),t.firstElementChild&&(this._computedStyle=window.getComputedStyle(t.firstElementChild),this._mutationObserver.observe(t.firstElementChild,{attributes:!0,childList:!0,subtree:!0}))))}updateScene(){const t=window.cancelIdleCallback?window.cancelIdleCallback:window.clearTimeout,e=window.requestIdleCallback?window.requestIdleCallback:window.setTimeout;t(this._callbackID),this._callbackID=e((()=>{var t,e;this._ref&&(null===(t=this.scene)||void 0===t||t.removeNode(this._id),null===(e=this.scene)||void 0===e||e.addNode(k(this._id,this._ref,this))),this._callbackID=0}))}componentDidMount(){this._isMounted=!0}componentDidUpdate(){var t,e;this._id!==this.props.id.toString()&&this._ref&&(null===(t=this.scene)||void 0===t||t.removeNode(this._id),this._id=this.props.id.toString(),null===(e=this.scene)||void 0===e||e.addNode(k(this._id,this._ref,this)))}componentWillUnmount(){this._isMounted=!1}render(){return(0,r.jsx)(D.Consumer,{children:t=>(this._scene=t,(0,r.jsx)("div",Object.assign({ref:this.onRef,id:`shared-element-${this._id}`,style:{display:this.state.hidden&&!this.keepAlive?"block":"contents",visibility:this.state.hidden?"hidden":"visible"}},{children:this.props.children})))})}}const I=(0,t.createContext)({preloaded:!1,params:{},path:void 0});class T extends t.Component{constructor(){var t,e,n;super(...arguments),this.name=void 0===this.props.path?"not-found":(null===(t=this.props.path)||void 0===t?void 0:t.toString().slice(1).replace("/","-"))||"index",this.sharedElementScene=new R(this.name),this.ref=null,this.contextParams=null===(n=null===(e=this.context)||void 0===e?void 0:e.routesData.get(this.props.path))||void 0===n?void 0:n.params,this.onRef=this.setRef.bind(this),this.animation=h.r2,this.pseudoElementAnimation=h.r2,this.elementType="div",this.animationProviderRef=null,this.state={shouldKeepAlive:!1}}componentDidMount(){var t,e,n,i,s,o,a;this.sharedElementScene.getScreenRect=()=>{var t;return(null===(t=this.ref)||void 0===t?void 0:t.getBoundingClientRect())||new DOMRect},this.sharedElementScene.keepAlive=(null===(t=this.props.config)||void 0===t?void 0:t.keepAlive)||!1,this.animation=null!==(n=this.setupAnimation(null===(e=this.props.config)||void 0===e?void 0:e.animation))&&void 0!==n?n:this.context.animation,this.pseudoElementAnimation=null!==(o=this.setupAnimation(null===(s=null===(i=this.props.config)||void 0===i?void 0:i.pseudoElement)||void 0===s?void 0:s.animation))&&void 0!==o?o:h.r2,this.contextParams=null===(a=this.context.routesData.get(this.props.path))||void 0===a?void 0:a.params,this.context.mountedScreen=this,this.forceUpdate()}shouldComponentUpdate(t){var e,n;return(null===(e=this.context.routesData.get(this.props.path))||void 0===e?void 0:e.params)!==this.contextParams?(this.contextParams=null===(n=this.context.routesData.get(this.props.path))||void 0===n?void 0:n.params,!0):!(!t.out||t.in)||(!(!t.in||t.out)||(t.in!==this.props.in||t.out!==this.props.out))}componentDidUpdate(t){var e,n,i;(null===(e=t.config)||void 0===e?void 0:e.keepAlive)!==(null===(n=this.props.config)||void 0===n?void 0:n.keepAlive)&&(this.sharedElementScene.keepAlive=(null===(i=this.props.config)||void 0===i?void 0:i.keepAlive)||!1)}setupAnimation(t){return t?"function"==typeof t?this.animationFactory.bind(this,t):"in"in t?{in:t.in,out:t.out||t.in}:{in:t,out:t}:null}animationFactory(t){if("function"==typeof t){let e=this.context.navigation.history.next;this.context.backNavigating||(e=this.context.navigation.history.previous);const n=t(e||"",this.context.navigation.history.current,this.context.gestureNavigating);return"in"in n?{in:n.in,out:n.out||n.in}:{in:n,out:n}}return this.context.animation}onExited(){}onExit(){this.context.backNavigating?this.setState({shouldKeepAlive:!1}):this.setState({shouldKeepAlive:!0}),this.context.ghostLayer&&(this.context.ghostLayer.currentScene=this.sharedElementScene)}onEnter(){this.context.ghostLayer&&(this.context.ghostLayer.nextScene=this.sharedElementScene)}onEntered(){}setRef(t){this.ref!==t&&(this.ref=t)}get resolvedPathname(){return this.props.resolvedPathname}render(){var e,n,i,s,o,a,h,l,u;let c,d=this.props.component,p=null===(n=null===(e=this.props.config)||void 0===e?void 0:e.header)||void 0===n?void 0:n.component,m=!1,v=!1;"preloaded"in d&&d.preloaded&&(d=d.preloaded,m=!0),p&&"preloaded"in p&&p.preloaded&&(p=p.preloaded,v=!0),(null===(i=this.props.config)||void 0===i?void 0:i.pseudoElement)&&(c={selector:null===(s=this.props.config)||void 0===s?void 0:s.pseudoElement.selector,animation:this.pseudoElementAnimation});const g=Object.assign(Object.assign({},this.props.defaultParams),this.contextParams);return(0,r.jsx)(_,Object.assign({onRef:t=>this.animationProviderRef=t,renderAs:this.elementType,onExit:this.onExit.bind(this),onExited:this.onExited.bind(this),onEnter:this.onEnter.bind(this),onEntered:this.onEntered.bind(this),in:this.props.in||!1,out:this.props.out||!1,name:null!==(a=null===(o=this.props.name)||void 0===o?void 0:o.toLowerCase().replace(" ","-"))&&void 0!==a?a:this.name,resolvedPathname:this.props.resolvedPathname,animation:this.animation,pseudoElement:c,backNavigating:this.context.backNavigating,keepAlive:this.state.shouldKeepAlive&&(null===(h=this.props.config)||void 0===h?void 0:h.keepAlive)||!1,navigation:this.context.navigation},{children:(0,r.jsx)("div",Object.assign({id:this.name,ref:this.onRef,className:"screen",style:{height:"100%",width:"100%",display:"flex",flexDirection:"column",pointerEvents:"inherit"}},{children:(0,r.jsx)(D.Provider,Object.assign({value:this.sharedElementScene},{children:(0,r.jsxs)(I.Provider,Object.assign({value:{preloaded:m,path:this.props.path,params:g}},{children:[(0,r.jsx)(t.Suspense,Object.assign({fallback:(0,r.jsx)(C,{component:null===(u=null===(l=this.props.config)||void 0===l?void 0:l.header)||void 0===u?void 0:u.fallback})},{children:(0,r.jsx)(C,{component:p})})),(0,r.jsx)(t.Suspense,Object.assign({fallback:(0,r.jsx)(C,{component:this.props.fallback})},{children:(0,r.jsx)(C,{component:d})}))]}))}))}))}))}}function C({component:e}){const n=M(),i=F(),s=null!=e?e:null;return(0,t.isValidElement)(s)?(0,t.cloneElement)(s,{orientation:screen.orientation,navigation:n,route:i}):L(s)?(0,r.jsx)(s,{orientation:screen.orientation,navigation:n,route:i}):(0,r.jsx)(r.Fragment,{children:s})}T.contextType=n,T.defaultProps={route:{params:{}}};class j{constructor(t,e,n){var i;this._stack=[],this._routerId=t,window.history.replaceState(Object.assign(Object.assign({},history.state),{routerId:this._routerId}),"",window.location.toString()),n=n||new URL(window.location.toString()),n=new URL(n.href.replace(/\/$/,"")),this._baseURL=n,this._defaultRoute=e,this.state.has(this.baseURL.pathname)||this.state.set(this.baseURL.pathname,{});const s=null===(i=this.state.get(this.baseURL.pathname))||void 0===i?void 0:i.stack;s?this._stack=[...s.filter((t=>Boolean(t)))]:this.state.has(this.baseURL.pathname)&&(this.state.get(this.baseURL.pathname).stack=[...this._stack])}set defaultRoute(t){this._defaultRoute=t}get length(){return this._stack.length}get defaultRoute(){return this._defaultRoute||"/"}get isEmpty(){return!this._stack.length}get baseURL(){return this._baseURL}get state(){return{set:(t,e)=>!!window.history.state&&(window.history.state[t]=e,!0),get:t=>window.history.state&&window.history.state[t]||null,has:t=>!!window.history.state&&t in window.history.state,delete:t=>!!window.history.state&&delete window.history.state[t],keys:()=>Object.keys(window.history.state||{}),values:()=>Object.values(window.history.state||{}),clear(){return this.keys().forEach((t=>delete window.history.state[t]))},get length(){return this.keys().length}}}pushState(t,e,n){t=Object.assign(Object.assign({},window.history.state),{[this.baseURL.pathname]:Object.assign(Object.assign({},window.history.state[this.baseURL.pathname]),t),routerId:this._routerId}),window.history.pushState(t,e,n)}replaceState(t,e,n){t=Object.assign(Object.assign({},window.history.state),{[this.baseURL.pathname]:Object.assign(Object.assign({},window.history.state[this.baseURL.pathname]),t),routerId:this._routerId}),window.history.replaceState(t,e,n)}static getURL(t,e,n=""){e.pathname.match(/\/$/)||(e=new URL(e.href+"/")),t.match(/^\//)&&(t=t.slice(1));const i=new URL(t,e);return i.search=n,i}}function $(){const e=window.matchMedia("(prefers-reduced-motion: reduce)"),[n,i]=(0,t.useState)(e.matches);return e.onchange=()=>{i(e.matches)},n}function M(){const e=(0,t.useContext)(n);if(e)return e.navigation;throw new Error("RouterData is null. You may be trying to call useNavigation outside a Router.")}function U(){const[e,n]=(0,t.useState)((0,t.useContext)(d)),i=M();return(0,t.useEffect)((()=>{const t=({detail:t})=>{n(t.progress)};return i.addEventListener("motion-progress",t),()=>i.removeEventListener("motion-progress",t)}),[]),e}function F(){const e=(0,t.useContext)(I);if(e)return e;throw new Error("RouterData is null. You may be trying to call useRoute outside a Router.")}var V=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};function z(e){const i=(0,t.useContext)(n),s=M(),[o,a]=(0,t.useState)(""),[l,u]=(0,t.useState)(!1);(0,t.useEffect)((()=>{if(!s)return;let t,n;if("goBack"in e)t=Y(s),n="";else{const s=(null==i?void 0:i.paramsSerializer)||null;t=e.href,n=(0,h.Po)(e.params||{},s)||""}const o=new URL(t,s.location.origin);o.hash=e.hash||"",o.search=n,o.origin===s.location.origin?(u(!1),a(o.href.replace(s.location.origin,""))):(u(!0),a(o.href))}),[e.href,e.params]);const{href:c,goBack:d,hash:p,onClick:m,replace:v,params:g}=e,f=V(e,["href","goBack","hash","onClick","replace","params"]);return s?(0,r.jsx)("a",Object.assign({href:o,onClick:t=>{t.stopPropagation(),s&&(l||(t.preventDefault(),m&&m(t),d&&s.goBack(),c&&s.navigate(c,g,{hash:p,replace:v})))}},f,{children:e.children})):(0,r.jsx)(r.Fragment,{})}function Y(t){return t.canGoBack()?t.history.previous:t.parent?Y(t.parent):document.referrer}var X=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};function B(t){var{disabled:e,children:n}=t,i=X(t,["disabled","children"]);return(0,r.jsx)("div",Object.assign({className:"gesture-region","data-disabled":e,style:{display:"contents"}},i,{children:n}))}i(878);var H=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};class W extends t.Component{constructor(t){super(t),this.ref=null,this.scrollPos={x:0,y:0},this.routerData=null,this._mounted=!1,this.onPageAnimationEnd=()=>{window.location.hash&&requestAnimationFrame(this.onHashChange.bind(this))},this.onHashChange=()=>{var t;if(this.ref){const e=location.hash;try{null===(t=this.ref.querySelector(e))||void 0===t||t.scrollIntoView(this.props.hashScrollConfig)}catch(t){}}},this.setRef=t=>{t&&(this.scrollPos={x:t.scrollLeft,y:t.scrollTop},this.ref=t,location.hash&&!this._mounted&&this.onHashChange(),this._mounted=!0)},this.onHashChange=this.onHashChange.bind(this)}componentDidMount(){var t,e;const n=null===(t=this.routerData)||void 0===t?void 0:t.scrollRestorationData.get(this.props.id);n&&(this.scrollPos=n),this.ref&&this.props.shouldRestore&&this.ref.scrollTo({left:this.scrollPos.x,top:this.scrollPos.y}),null===(e=this.routerData)||void 0===e||e.navigation.addEventListener("page-animation-end",this.onPageAnimationEnd),window.addEventListener("hashchange",this.onHashChange)}componentWillUnmount(){var t,e,n,i;const s={x:(null===(t=this.ref)||void 0===t?void 0:t.scrollLeft)||0,y:(null===(e=this.ref)||void 0===e?void 0:e.scrollTop)||0};null===(n=this.routerData)||void 0===n||n.scrollRestorationData.set(this.props.id,s),null===(i=this.routerData)||void 0===i||i.navigation.removeEventListener("page-animation-end",this.onPageAnimationEnd),window.removeEventListener("hashchange",this.onHashChange)}get scrollTop(){var t,e;return null!==(e=null===(t=this.ref)||void 0===t?void 0:t.scrollTop)&&void 0!==e?e:0}get scrollLeft(){var t,e;return null!==(e=null===(t=this.ref)||void 0===t?void 0:t.scrollLeft)&&void 0!==e?e:0}get scrollWidth(){var t,e;return null!==(e=null===(t=this.ref)||void 0===t?void 0:t.scrollWidth)&&void 0!==e?e:0}get scrollHeight(){var t,e;return null!==(e=null===(t=this.ref)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e:0}render(){return(0,r.jsx)(n.Consumer,{children:t=>{this.routerData=t;const e=this.props,{style:n,shouldRestore:i,hashScrollConfig:s}=e,o=H(e,["style","shouldRestore","hashScrollConfig"]);return(0,r.jsx)("div",Object.assign({},o,{ref:this.setRef,style:Object.assign(Object.assign({},n),{overflow:"scroll"})},{children:this.props.children}))}})}}var G=/[$_\p{ID_Start}]/u,K=/[$_\u200C\u200D\p{ID_Continue}]/u;function q(t,e){return(e?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(t)}function J(t,e=!1){const n=[];let i=0;for(;i<t.length;){const s=t[i],o=function(s){if(!e)throw new TypeError(s);n.push({type:"INVALID_CHAR",index:i,value:t[i++]})};if("*"!==s)if("+"!==s&&"?"!==s)if("\\"!==s)if("{"!==s)if("}"!==s)if(":"!==s)if("("!==s)n.push({type:"CHAR",index:i,value:t[i++]});else{let e=1,s="",a=i+1,r=!1;if("?"===t[a]){o(`Pattern cannot start with "?" at ${a}`);continue}for(;a<t.length;){if(!q(t[a],!1)){o(`Invalid character '${t[a]}' at ${a}.`),r=!0;break}if("\\"!==t[a]){if(")"===t[a]){if(e--,0===e){a++;break}}else if("("===t[a]&&(e++,"?"!==t[a+1])){o(`Capturing groups are not allowed at ${a}`),r=!0;break}s+=t[a++]}else s+=t[a++]+t[a++]}if(r)continue;if(e){o(`Unbalanced pattern at ${i}`);continue}if(!s){o(`Missing pattern at ${i}`);continue}n.push({type:"PATTERN",index:i,value:s}),i=a}else{let e="",s=i+1;for(;s<t.length;){const n=t.substr(s,1);if(!(s===i+1&&G.test(n)||s!==i+1&&K.test(n)))break;e+=t[s++]}if(!e){o(`Missing parameter name at ${i}`);continue}n.push({type:"NAME",index:i,value:e}),i=s}else n.push({type:"CLOSE",index:i,value:t[i++]});else n.push({type:"OPEN",index:i,value:t[i++]});else n.push({type:"ESCAPED_CHAR",index:i++,value:t[i++]});else n.push({type:"MODIFIER",index:i,value:t[i++]});else n.push({type:"ASTERISK",index:i,value:t[i++]})}return n.push({type:"END",index:i,value:""}),n}function Z(t,e={}){const n=J(t),{prefixes:i="./"}=e,s=`[^${Q(void 0===e.delimiter?"/#?":e.delimiter)}]+?`,o=[];let a=0,r=0,h="",l=new Set;const u=t=>{if(r<n.length&&n[r].type===t)return n[r++].value},c=()=>{const t=u("MODIFIER");return t||u("ASTERISK")},d=t=>{const e=u(t);if(void 0!==e)return e;const{type:i,index:s}=n[r];throw new TypeError(`Unexpected ${i} at ${s}, expected ${t}`)},p=()=>{let t,e="";for(;t=u("CHAR")||u("ESCAPED_CHAR");)e+=t;return e},m=e.encodePart||(t=>t);for(;r<n.length;){const t=u("CHAR"),e=u("NAME");let n=u("PATTERN");if(e||n||!u("ASTERISK")||(n=".*"),e||n){let r=t||"";-1===i.indexOf(r)&&(h+=r,r=""),h&&(o.push(m(h)),h="");const u=e||a++;if(l.has(u))throw new TypeError(`Duplicate name '${u}'.`);l.add(u),o.push({name:u,prefix:m(r),suffix:"",pattern:n||s,modifier:c()||""});continue}const r=t||u("ESCAPED_CHAR");if(r){h+=r;continue}if(u("OPEN")){const t=p(),e=u("NAME")||"";let n=u("PATTERN")||"";e||n||!u("ASTERISK")||(n=".*");const i=p();d("CLOSE");const r=c()||"";if(!e&&!n&&!r){h+=t;continue}if(!e&&!n&&!t)continue;h&&(o.push(m(h)),h=""),o.push({name:e||(n?a++:""),pattern:e&&!n?s:n,prefix:m(t),suffix:m(i),modifier:r})}else h&&(o.push(m(h)),h=""),d("END")}return o}function Q(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function tt(t){return t&&t.ignoreCase?"ui":"u"}function et(t,e,n={}){const{strict:i=!1,start:s=!0,end:o=!0,encode:a=(t=>t)}=n,r=`[${Q(void 0===n.endsWith?"":n.endsWith)}]|$`,h=`[${Q(void 0===n.delimiter?"/#?":n.delimiter)}]`;let l=s?"^":"";for(const n of t)if("string"==typeof n)l+=Q(a(n));else{const t=Q(a(n.prefix)),i=Q(a(n.suffix));if(n.pattern)if(e&&e.push(n),t||i)if("+"===n.modifier||"*"===n.modifier){const e="*"===n.modifier?"?":"";l+=`(?:${t}((?:${n.pattern})(?:${i}${t}(?:${n.pattern}))*)${i})${e}`}else l+=`(?:${t}(${n.pattern})${i})${n.modifier}`;else"+"===n.modifier||"*"===n.modifier?l+=`((?:${n.pattern})${n.modifier})`:l+=`(${n.pattern})${n.modifier}`;else l+=`(?:${t}${i})${n.modifier}`}if(o)i||(l+=`${h}?`),l+=n.endsWith?`(?=${r})`:"$";else{const e=t[t.length-1],n="string"==typeof e?h.indexOf(e[e.length-1])>-1:void 0===e;i||(l+=`(?:${h}(?=${r}))?`),n||(l+=`(?=${h}|${r})`)}return new RegExp(l,tt(n))}function nt(t,e,n){return t instanceof RegExp?function(t,e){if(!e)return t;const n=/\((?:\?<(.*?)>)?(?!\?)/g;let i=0,s=n.exec(t.source);for(;s;)e.push({name:s[1]||i++,prefix:"",suffix:"",modifier:"",pattern:""}),s=n.exec(t.source);return t}(t,e):Array.isArray(t)?function(t,e,n){const i=t.map((t=>nt(t,e,n).source));return new RegExp(`(?:${i.join("|")})`,tt(n))}(t,e,n):function(t,e,n){return et(Z(t,n),e,n)}(t,e,n)}var it={delimiter:"",prefixes:"",sensitive:!0,strict:!0},st={delimiter:".",prefixes:"",sensitive:!0,strict:!0},ot={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function at(t,e){return t.startsWith(e)?t.substring(e.length,t.length):t}function rt(t){return!(!t||t.length<2)&&("["===t[0]||("\\"===t[0]||"{"===t[0])&&"["===t[1])}var ht=["ftp","file","http","https","ws","wss"];function lt(t){if(!t)return!0;for(const e of ht)if(t.test(e))return!0;return!1}function ut(t){switch(t){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function ct(t){if(""===t)return t;if(/^[-+.A-Za-z0-9]*$/.test(t))return t.toLowerCase();throw new TypeError(`Invalid protocol '${t}'.`)}function dt(t){if(""===t)return t;const e=new URL("https://example.com");return e.username=t,e.username}function pt(t){if(""===t)return t;const e=new URL("https://example.com");return e.password=t,e.password}function mt(t){if(""===t)return t;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(t))throw new TypeError(`Invalid hostname '${t}'`);const e=new URL("https://example.com");return e.hostname=t,e.hostname}function vt(t){if(""===t)return t;if(/[^0-9a-fA-F[\]:]/g.test(t))throw new TypeError(`Invalid IPv6 hostname '${t}'`);return t.toLowerCase()}function gt(t){if(""===t)return t;if(/^[0-9]*$/.test(t)&&parseInt(t)<=65535)return t;throw new TypeError(`Invalid port '${t}'.`)}function ft(t){if(""===t)return t;const e=new URL("https://example.com");return e.pathname="/"!==t[0]?"/-"+t:t,"/"!==t[0]?e.pathname.substring(2,e.pathname.length):e.pathname}function yt(t){if(""===t)return t;return new URL(`data:${t}`).pathname}function _t(t){if(""===t)return t;const e=new URL("https://example.com");return e.search=t,e.search.substring(1,e.search.length)}function Et(t){if(""===t)return t;const e=new URL("https://example.com");return e.hash=t,e.hash.substring(1,e.hash.length)}var wt=["protocol","username","password","hostname","port","pathname","search","hash"],bt="*";function xt(t,e){if("string"!=typeof t)throw new TypeError("parameter 1 is not of type 'string'.");const n=new URL(t,e);return{protocol:n.protocol.substring(0,n.protocol.length-1),username:n.username,password:n.password,hostname:n.hostname,port:n.port,pathname:n.pathname,search:""!=n.search?n.search.substring(1,n.search.length):void 0,hash:""!=n.hash?n.hash.substring(1,n.hash.length):void 0}}function St(t,e){return e?At(t):t}function Pt(t,e,n){let i;if("string"==typeof e.baseURL)try{i=new URL(e.baseURL),t.protocol=St(i.protocol.substring(0,i.protocol.length-1),n),t.username=St(i.username,n),t.password=St(i.password,n),t.hostname=St(i.hostname,n),t.port=St(i.port,n),t.pathname=St(i.pathname,n),t.search=St(i.search.substring(1,i.search.length),n),t.hash=St(i.hash.substring(1,i.hash.length),n)}catch{throw new TypeError(`invalid baseURL '${e.baseURL}'.`)}if("string"==typeof e.protocol&&(t.protocol=function(t,e){var n,i;return i=":",t=(n=t).endsWith(i)?n.substr(0,n.length-i.length):n,e||""===t?t:ct(t)}(e.protocol,n)),"string"==typeof e.username&&(t.username=function(t,e){if(e||""===t)return t;const n=new URL("https://example.com");return n.username=t,n.username}(e.username,n)),"string"==typeof e.password&&(t.password=function(t,e){if(e||""===t)return t;const n=new URL("https://example.com");return n.password=t,n.password}(e.password,n)),"string"==typeof e.hostname&&(t.hostname=function(t,e){return e||""===t?t:rt(t)?vt(t):mt(t)}(e.hostname,n)),"string"==typeof e.port&&(t.port=function(t,e,n){return ut(e)===t&&(t=""),n||""===t?t:gt(t)}(e.port,t.protocol,n)),"string"==typeof e.pathname){if(t.pathname=e.pathname,i&&!function(t,e){return!(!t.length||"/"!==t[0]&&(!e||t.length<2||"\\"!=t[0]&&"{"!=t[0]||"/"!=t[1]))}(t.pathname,n)){const e=i.pathname.lastIndexOf("/");e>=0&&(t.pathname=St(i.pathname.substring(0,e+1),n)+t.pathname)}t.pathname=function(t,e,n){if(n||""===t)return t;if(e&&!ht.includes(e))return new URL(`${e}:${t}`).pathname;const i="/"==t[0];return t=new URL(i?t:"/-"+t,"https://example.com").pathname,i||(t=t.substring(2,t.length)),t}(t.pathname,t.protocol,n)}return"string"==typeof e.search&&(t.search=function(t,e){if(t=at(t,"?"),e||""===t)return t;const n=new URL("https://example.com");return n.search=t,n.search?n.search.substring(1,n.search.length):""}(e.search,n)),"string"==typeof e.hash&&(t.hash=function(t,e){if(t=at(t,"#"),e||""===t)return t;const n=new URL("https://example.com");return n.hash=t,n.hash?n.hash.substring(1,n.hash.length):""}(e.hash,n)),t}function At(t){return t.replace(/([+*?:{}()\\])/g,"\\$1")}function Lt(t,e){const n=`[^${i=void 0===e.delimiter?"/#?":e.delimiter,i.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}]+?`;var i;const s=/[$_\u200C\u200D\p{ID_Continue}]/u;let o="";for(let i=0;i<t.length;++i){const a=t[i],r=i>0?t[i-1]:null,h=i<t.length-1?t[i+1]:null;if("string"==typeof a){o+=At(a);continue}if(""===a.pattern){if(""===a.modifier){o+=At(a.prefix);continue}o+=`{${At(a.prefix)}}${a.modifier}`;continue}const l="number"!=typeof a.name,u=void 0!==e.prefixes?e.prefixes:"./";let c=""!==a.suffix||""!==a.prefix&&(1!==a.prefix.length||!u.includes(a.prefix));if(!c&&l&&a.pattern===n&&""===a.modifier&&h&&!h.prefix&&!h.suffix)if("string"==typeof h){const t=h.length>0?h[0]:"";c=s.test(t)}else c="number"==typeof h.name;if(!c&&""===a.prefix&&r&&"string"==typeof r&&r.length>0){const t=r[r.length-1];c=u.includes(t)}c&&(o+="{"),o+=At(a.prefix),l&&(o+=`:${a.name}`),".*"===a.pattern?l||r&&"string"!=typeof r&&!r.modifier&&!c&&""===a.prefix?o+="(.*)":o+="*":a.pattern===n?l||(o+=`(${n})`):o+=`(${a.pattern})`,a.pattern===n&&l&&""!==a.suffix&&s.test(a.suffix[0])&&(o+="\\"),o+=At(a.suffix),c&&(o+="}"),o+=a.modifier}return o}var Rt=class{constructor(t={},e,n){this.regexp={},this.keys={},this.component_pattern={};try{let i;if("string"==typeof e?i=e:n=e,"string"==typeof t){const e=new class{constructor(t){this.tokenList=[],this.internalResult={},this.tokenIndex=0,this.tokenIncrement=1,this.componentStart=0,this.state=0,this.groupDepth=0,this.hostnameIPv6BracketDepth=0,this.shouldTreatAsStandardURL=!1,this.input=t}get result(){return this.internalResult}parse(){for(this.tokenList=J(this.input,!0);this.tokenIndex<this.tokenList.length;this.tokenIndex+=this.tokenIncrement){if(this.tokenIncrement=1,"END"===this.tokenList[this.tokenIndex].type){if(0===this.state){this.rewind(),this.isHashPrefix()?this.changeState(9,1):this.isSearchPrefix()?(this.changeState(8,1),this.internalResult.hash=""):(this.changeState(7,0),this.internalResult.search="",this.internalResult.hash="");continue}if(2===this.state){this.rewindAndSetState(5);continue}this.changeState(10,0);break}if(this.groupDepth>0){if(!this.isGroupClose())continue;this.groupDepth-=1}if(this.isGroupOpen())this.groupDepth+=1;else switch(this.state){case 0:this.isProtocolSuffix()&&(this.internalResult.username="",this.internalResult.password="",this.internalResult.hostname="",this.internalResult.port="",this.internalResult.pathname="",this.internalResult.search="",this.internalResult.hash="",this.rewindAndSetState(1));break;case 1:if(this.isProtocolSuffix()){this.computeShouldTreatAsStandardURL();let t=7,e=1;this.shouldTreatAsStandardURL&&(this.internalResult.pathname="/"),this.nextIsAuthoritySlashes()?(t=2,e=3):this.shouldTreatAsStandardURL&&(t=2),this.changeState(t,e)}break;case 2:this.isIdentityTerminator()?this.rewindAndSetState(3):(this.isPathnameStart()||this.isSearchPrefix()||this.isHashPrefix())&&this.rewindAndSetState(5);break;case 3:this.isPasswordPrefix()?this.changeState(4,1):this.isIdentityTerminator()&&this.changeState(5,1);break;case 4:this.isIdentityTerminator()&&this.changeState(5,1);break;case 5:this.isIPv6Open()?this.hostnameIPv6BracketDepth+=1:this.isIPv6Close()&&(this.hostnameIPv6BracketDepth-=1),this.isPortPrefix()&&!this.hostnameIPv6BracketDepth?this.changeState(6,1):this.isPathnameStart()?this.changeState(7,0):this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 6:this.isPathnameStart()?this.changeState(7,0):this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 7:this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 8:this.isHashPrefix()&&this.changeState(9,1)}}}changeState(t,e){switch(this.state){case 0:case 2:case 10:break;case 1:this.internalResult.protocol=this.makeComponentString();break;case 3:this.internalResult.username=this.makeComponentString();break;case 4:this.internalResult.password=this.makeComponentString();break;case 5:this.internalResult.hostname=this.makeComponentString();break;case 6:this.internalResult.port=this.makeComponentString();break;case 7:this.internalResult.pathname=this.makeComponentString();break;case 8:this.internalResult.search=this.makeComponentString();break;case 9:this.internalResult.hash=this.makeComponentString()}this.changeStateWithoutSettingComponent(t,e)}changeStateWithoutSettingComponent(t,e){this.state=t,this.componentStart=this.tokenIndex+e,this.tokenIndex+=e,this.tokenIncrement=0}rewind(){this.tokenIndex=this.componentStart,this.tokenIncrement=0}rewindAndSetState(t){this.rewind(),this.state=t}safeToken(t){return t<0&&(t=this.tokenList.length-t),t<this.tokenList.length?this.tokenList[t]:this.tokenList[this.tokenList.length-1]}isNonSpecialPatternChar(t,e){const n=this.safeToken(t);return n.value===e&&("CHAR"===n.type||"ESCAPED_CHAR"===n.type||"INVALID_CHAR"===n.type)}isProtocolSuffix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}nextIsAuthoritySlashes(){return this.isNonSpecialPatternChar(this.tokenIndex+1,"/")&&this.isNonSpecialPatternChar(this.tokenIndex+2,"/")}isIdentityTerminator(){return this.isNonSpecialPatternChar(this.tokenIndex,"@")}isPasswordPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}isPortPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}isPathnameStart(){return this.isNonSpecialPatternChar(this.tokenIndex,"/")}isSearchPrefix(){if(this.isNonSpecialPatternChar(this.tokenIndex,"?"))return!0;if("?"!==this.tokenList[this.tokenIndex].value)return!1;const t=this.safeToken(this.tokenIndex-1);return"NAME"!==t.type&&"PATTERN"!==t.type&&"CLOSE"!==t.type&&"ASTERISK"!==t.type}isHashPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,"#")}isGroupOpen(){return"OPEN"==this.tokenList[this.tokenIndex].type}isGroupClose(){return"CLOSE"==this.tokenList[this.tokenIndex].type}isIPv6Open(){return this.isNonSpecialPatternChar(this.tokenIndex,"[")}isIPv6Close(){return this.isNonSpecialPatternChar(this.tokenIndex,"]")}makeComponentString(){const t=this.tokenList[this.tokenIndex],e=this.safeToken(this.componentStart).index;return this.input.substring(e,t.index)}computeShouldTreatAsStandardURL(){const t={};Object.assign(t,it),t.encodePart=ct;const e=nt(this.makeComponentString(),void 0,t);this.shouldTreatAsStandardURL=lt(e)}}(t);if(e.parse(),t=e.result,void 0===i&&"string"!=typeof t.protocol)throw new TypeError("A base URL must be provided for a relative constructor string.");t.baseURL=i}else{if(!t||"object"!=typeof t)throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(i)throw new TypeError("parameter 1 is not of type 'string'.")}void 0===n&&(n={ignoreCase:!1});const s={ignoreCase:!0===n.ignoreCase},o={pathname:bt,protocol:bt,username:bt,password:bt,hostname:bt,port:bt,search:bt,hash:bt};let a;for(a of(this.pattern=Pt(o,t,!0),ut(this.pattern.protocol)===this.pattern.port&&(this.pattern.port=""),wt)){if(!(a in this.pattern))continue;const t={},e=this.pattern[a];switch(this.keys[a]=[],a){case"protocol":Object.assign(t,it),t.encodePart=ct;break;case"username":Object.assign(t,it),t.encodePart=dt;break;case"password":Object.assign(t,it),t.encodePart=pt;break;case"hostname":Object.assign(t,st),rt(e)?t.encodePart=vt:t.encodePart=mt;break;case"port":Object.assign(t,it),t.encodePart=gt;break;case"pathname":lt(this.regexp.protocol)?(Object.assign(t,ot,s),t.encodePart=ft):(Object.assign(t,it,s),t.encodePart=yt);break;case"search":Object.assign(t,it,s),t.encodePart=_t;break;case"hash":Object.assign(t,it,s),t.encodePart=Et}try{const n=Z(e,t);this.regexp[a]=et(n,this.keys[a],t),this.component_pattern[a]=Lt(n,t)}catch{throw new TypeError(`invalid ${a} pattern '${this.pattern[a]}'.`)}}}catch(t){throw new TypeError(`Failed to construct 'URLPattern': ${t.message}`)}}test(t={},e){let n,i={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof t&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(void 0===t)return!1;try{i=Pt(i,"object"==typeof t?t:xt(t,e),!1)}catch(t){return!1}for(n of wt)if(!this.regexp[n].exec(i[n]))return!1;return!0}exec(t={},e){let n={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof t&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(void 0===t)return;try{n=Pt(n,"object"==typeof t?t:xt(t,e),!1)}catch(t){return null}let i,s={};for(i of(s.inputs=e?[t,e]:[t],wt)){let t=this.regexp[i].exec(n[i]);if(!t)return null;let e={};for(let[n,s]of this.keys[i].entries())if("string"==typeof s.name||"number"==typeof s.name){let i=t[n+1];e[s.name]=i}s[i]={input:n[i]||"",groups:e}}return s}get protocol(){return this.component_pattern.protocol}get username(){return this.component_pattern.username}get password(){return this.component_pattern.password}get hostname(){return this.component_pattern.hostname}get port(){return this.component_pattern.port}get pathname(){return this.component_pattern.pathname}get search(){return this.component_pattern.search}get hash(){return this.component_pattern.hash}};globalThis.URLPattern||(globalThis.URLPattern=Rt),globalThis.URLPattern||(globalThis.URLPattern=Rt),document.body.style.position="fixed",document.body.style.inset="0";const Dt=document.head.querySelector("title");Dt&&(Dt.ariaLive="polite");let kt=document.getElementById("root");kt&&(kt.style.width="100%",kt.style.height="100%")})();var o=s.ee,a=s.r2,r=s.rN,h=s.PM,l=s.dw,u=s.y_,c=s.DC,d=s.GW,p=s.sV,m=s.RG,v=s.GI,g=s.rJ,f=s.uZ,y=s.PV,_=s.rL,E=s.Nu,w=s.V_,b=s.hR,x=s.cT,S=s.e1,P=s.Ef,A=s.Vo,L=s.QN,R=s.kI,D=s.Po,k=s.fJ,O=s.nc,N=s.HJ,I=s.JZ,T=s.yj;export{o as Anchor,a as DEFAULT_ANIMATION,r as GestureRegion,h as HistoryBase,l as MAX_Z_INDEX,u as Motion,c as NavigationBase,d as RouterBase,p as RouterData,m as ScreenBase,v as ScrollRestoration,g as SharedElement,f as clamp,y as concatenateURL,_ as defaultSearchParamsToObject,E as dispatchEvent,w as getAnimationDuration,b as getCSSData,x as getStyleObject,S as includesRoute,P as isValidComponentConstructor,A as lazy,L as matchRoute,R as prefetchRoute,D as searchParamsFromObject,k as searchParamsToObject,O as useMotion,N as useNavigation,I as useReducedMotion,T as useRoute};
|