function Rc(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Jv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Zv(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Mr={exports:{}},Jt={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Vs;function Pc(){if(Vs)return Jt;Vs=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,s){var o=null;if(s!==void 0&&(o=""+s),i.key!==void 0&&(o=""+i.key),"key"in i){s={};for(var a in i)a!=="key"&&(s[a]=i[a])}else s=i;return i=s.ref,{$$typeof:e,type:r,key:o,ref:i!==void 0?i:null,props:s}}return Jt.Fragment=t,Jt.jsx=n,Jt.jsxs=n,Jt}var Fs;function Cc(){return Fs||(Fs=1,Mr.exports=Pc()),Mr.exports}var Ze=Cc(),Lr={exports:{}},q={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var _s;function Ac(){if(_s)return q;_s=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),f=Symbol.iterator;function d(y){return y===null||typeof y!="object"?null:(y=f&&y[f]||y["@@iterator"],typeof y=="function"?y:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,x={};function v(y,A,U){this.props=y,this.context=A,this.refs=x,this.updater=U||h}v.prototype.isReactComponent={},v.prototype.setState=function(y,A){if(typeof y!="object"&&typeof y!="function"&&y!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,y,A,"setState")},v.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function w(){}w.prototype=v.prototype;function E(y,A,U){this.props=y,this.context=A,this.refs=x,this.updater=U||h}var S=E.prototype=new w;S.constructor=E,m(S,v.prototype),S.isPureReactComponent=!0;var M=Array.isArray,C={H:null,A:null,T:null,S:null,V:null},b=Object.prototype.hasOwnProperty;function V(y,A,U,N,Y,ie){return U=ie.ref,{$$typeof:e,type:y,key:A,ref:U!==void 0?U:null,props:ie}}function O(y,A){return V(y.type,A,void 0,void 0,void 0,y.props)}function _(y){return typeof y=="object"&&y!==null&&y.$$typeof===e}function Z(y){var A={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(U){return A[U]})}var ae=/\/+/g;function Me(y,A){return typeof y=="object"&&y!==null&&y.key!=null?Z(""+y.key):A.toString(36)}function te(){}function ne(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(te,te):(y.status="pending",y.then(function(A){y.status==="pending"&&(y.status="fulfilled",y.value=A)},function(A){y.status==="pending"&&(y.status="rejected",y.reason=A)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function ce(y,A,U,N,Y){var ie=typeof y;(ie==="undefined"||ie==="boolean")&&(y=null);var z=!1;if(y===null)z=!0;else switch(ie){case"bigint":case"string":case"number":z=!0;break;case"object":switch(y.$$typeof){case e:case t:z=!0;break;case c:return z=y._init,ce(z(y._payload),A,U,N,Y)}}if(z)return Y=Y(y),z=N===""?"."+Me(y,0):N,M(Y)?(U="",z!=null&&(U=z.replace(ae,"$&/")+"/"),ce(Y,A,U,"",function(Er){return Er})):Y!=null&&(_(Y)&&(Y=O(Y,U+(Y.key==null||y&&y.key===Y.key?"":(""+Y.key).replace(ae,"$&/")+"/")+z)),A.push(Y)),1;z=0;var We=N===""?".":N+":";if(M(y))for(var de=0;de<y.length;de++)N=y[de],ie=We+Me(N,de),z+=ce(N,A,U,ie,Y);else if(de=d(y),typeof de=="function")for(y=de.call(y),de=0;!(N=y.next()).done;)N=N.value,ie=We+Me(N,de++),z+=ce(N,A,U,ie,Y);else if(ie==="object"){if(typeof y.then=="function")return ce(ne(y),A,U,N,Y);throw A=String(y),Error("Objects are not valid as a React child (found: "+(A==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":A)+"). If you meant to render a collection of children, use an array instead.")}return z}function J(y,A,U){if(y==null)return y;var N=[],Y=0;return ce(y,N,"","",function(ie){return A.call(U,ie,Y++)}),N}function ee(y){if(y._status===-1){var A=y._result;A=A(),A.then(function(U){(y._status===0||y._status===-1)&&(y._status=1,y._result=U)},function(U){(y._status===0||y._status===-1)&&(y._status=2,y._result=U)}),y._status===-1&&(y._status=0,y._result=A)}if(y._status===1)return y._result.default;throw y._result}var oe=typeof reportError=="function"?reportError:function(y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var A=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof y=="object"&&y!==null&&typeof y.message=="string"?String(y.message):String(y),error:y});if(!window.dispatchEvent(A))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",y);return}console.error(y)};function ge(){}return q.Children={map:J,forEach:function(y,A,U){J(y,function(){A.apply(this,arguments)},U)},count:function(y){var A=0;return J(y,function(){A++}),A},toArray:function(y){return J(y,function(A){return A})||[]},only:function(y){if(!_(y))throw Error("React.Children.only expected to receive a single React element child.");return y}},q.Component=v,q.Fragment=n,q.Profiler=i,q.PureComponent=E,q.StrictMode=r,q.Suspense=l,q.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,q.__COMPILER_RUNTIME={__proto__:null,c:function(y){return C.H.useMemoCache(y)}},q.cache=function(y){return function(){return y.apply(null,arguments)}},q.cloneElement=function(y,A,U){if(y==null)throw Error("The argument must be a React element, but you passed "+y+".");var N=m({},y.props),Y=y.key,ie=void 0;if(A!=null)for(z in A.ref!==void 0&&(ie=void 0),A.key!==void 0&&(Y=""+A.key),A)!b.call(A,z)||z==="key"||z==="__self"||z==="__source"||z==="ref"&&A.ref===void 0||(N[z]=A[z]);var z=arguments.length-2;if(z===1)N.children=U;else if(1<z){for(var We=Array(z),de=0;de<z;de++)We[de]=arguments[de+2];N.children=We}return V(y.type,Y,void 0,void 0,ie,N)},q.createContext=function(y){return y={$$typeof:o,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null},y.Provider=y,y.Consumer={$$typeof:s,_context:y},y},q.createElement=function(y,A,U){var N,Y={},ie=null;if(A!=null)for(N in A.key!==void 0&&(ie=""+A.key),A)b.call(A,N)&&N!=="key"&&N!=="__self"&&N!=="__source"&&(Y[N]=A[N]);var z=arguments.length-2;if(z===1)Y.children=U;else if(1<z){for(var We=Array(z),de=0;de<z;de++)We[de]=arguments[de+2];Y.children=We}if(y&&y.defaultProps)for(N in z=y.defaultProps,z)Y[N]===void 0&&(Y[N]=z[N]);return V(y,ie,void 0,void 0,null,Y)},q.createRef=function(){return{current:null}},q.forwardRef=function(y){return{$$typeof:a,render:y}},q.isValidElement=_,q.lazy=function(y){return{$$typeof:c,_payload:{_status:-1,_result:y},_init:ee}},q.memo=function(y,A){return{$$typeof:u,type:y,compare:A===void 0?null:A}},q.startTransition=function(y){var A=C.T,U={};C.T=U;try{var N=y(),Y=C.S;Y!==null&&Y(U,N),typeof N=="object"&&N!==null&&typeof N.then=="function"&&N.then(ge,oe)}catch(ie){oe(ie)}finally{C.T=A}},q.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},q.use=function(y){return C.H.use(y)},q.useActionState=function(y,A,U){return C.H.useActionState(y,A,U)},q.useCallback=function(y,A){return C.H.useCallback(y,A)},q.useContext=function(y){return C.H.useContext(y)},q.useDebugValue=function(){},q.useDeferredValue=function(y,A){return C.H.useDeferredValue(y,A)},q.useEffect=function(y,A,U){var N=C.H;if(typeof U=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return N.useEffect(y,A)},q.useId=function(){return C.H.useId()},q.useImperativeHandle=function(y,A,U){return C.H.useImperativeHandle(y,A,U)},q.useInsertionEffect=function(y,A){return C.H.useInsertionEffect(y,A)},q.useLayoutEffect=function(y,A){return C.H.useLayoutEffect(y,A)},q.useMemo=function(y,A){return C.H.useMemo(y,A)},q.useOptimistic=function(y,A){return C.H.useOptimistic(y,A)},q.useReducer=function(y,A,U){return C.H.useReducer(y,A,U)},q.useRef=function(y){return C.H.useRef(y)},q.useState=function(y){return C.H.useState(y)},q.useSyncExternalStore=function(y,A,U){return C.H.useSyncExternalStore(y,A,U)},q.useTransition=function(){return C.H.useTransition()},q.version="19.1.0",q}var ks;function ka(){return ks||(ks=1,Lr.exports=Ac()),Lr.exports}var g=ka();const Dc=_a(g),Qv=Rc({__proto__:null,default:Dc},[g]);var Or={exports:{}},xe={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Ns;function Mc(){if(Ns)return xe;Ns=1;var e=ka();function t(l){var u="https://react.dev/errors/"+l;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var c=2;c<arguments.length;c++)u+="&args[]="+encodeURIComponent(arguments[c])}return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function s(l,u,c){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:f==null?null:""+f,children:l,containerInfo:u,implementation:c}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(l,u){if(l==="font")return"";if(typeof u=="string")return u==="use-credentials"?u:""}return xe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,xe.createPortal=function(l,u){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)throw Error(t(299));return s(l,u,null,c)},xe.flushSync=function(l){var u=o.T,c=r.p;try{if(o.T=null,r.p=2,l)return l()}finally{o.T=u,r.p=c,r.d.f()}},xe.preconnect=function(l,u){typeof l=="string"&&(u?(u=u.crossOrigin,u=typeof u=="string"?u==="use-credentials"?u:"":void 0):u=null,r.d.C(l,u))},xe.prefetchDNS=function(l){typeof l=="string"&&r.d.D(l)},xe.preinit=function(l,u){if(typeof l=="string"&&u&&typeof u.as=="string"){var c=u.as,f=a(c,u.crossOrigin),d=typeof u.integrity=="string"?u.integrity:void 0,h=typeof u.fetchPriority=="string"?u.fetchPriority:void 0;c==="style"?r.d.S(l,typeof u.precedence=="string"?u.precedence:void 0,{crossOrigin:f,integrity:d,fetchPriority:h}):c==="script"&&r.d.X(l,{crossOrigin:f,integrity:d,fetchPriority:h,nonce:typeof u.nonce=="string"?u.nonce:void 0})}},xe.preinitModule=function(l,u){if(typeof l=="string")if(typeof u=="object"&&u!==null){if(u.as==null||u.as==="script"){var c=a(u.as,u.crossOrigin);r.d.M(l,{crossOrigin:c,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0})}}else u==null&&r.d.M(l)},xe.preload=function(l,u){if(typeof l=="string"&&typeof u=="object"&&u!==null&&typeof u.as=="string"){var c=u.as,f=a(c,u.crossOrigin);r.d.L(l,c,{crossOrigin:f,integrity:typeof u.integrity=="string"?u.integrity:void 0,nonce:typeof u.nonce=="string"?u.nonce:void 0,type:typeof u.type=="string"?u.type:void 0,fetchPriority:typeof u.fetchPriority=="string"?u.fetchPriority:void 0,referrerPolicy:typeof u.referrerPolicy=="string"?u.referrerPolicy:void 0,imageSrcSet:typeof u.imageSrcSet=="string"?u.imageSrcSet:void 0,imageSizes:typeof u.imageSizes=="string"?u.imageSizes:void 0,media:typeof u.media=="string"?u.media:void 0})}},xe.preloadModule=function(l,u){if(typeof l=="string")if(u){var c=a(u.as,u.crossOrigin);r.d.m(l,{as:typeof u.as=="string"&&u.as!=="script"?u.as:void 0,crossOrigin:c,integrity:typeof u.integrity=="string"?u.integrity:void 0})}else r.d.m(l)},xe.requestFormReset=function(l){r.d.r(l)},xe.unstable_batchedUpdates=function(l,u){return l(u)},xe.useFormState=function(l,u,c){return o.H.useFormState(l,u,c)},xe.useFormStatus=function(){return o.H.useHostTransitionStatus()},xe.version="19.1.0",xe}var js;function Lc(){if(js)return Or.exports;js=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Or.exports=Mc(),Or.exports}var Zt={},Bs;function Oc(){if(Bs)return Zt;Bs=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.parse=o,Zt.serialize=u;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,s=(()=>{const d=function(){};return d.prototype=Object.create(null),d})();function o(d,h){const m=new s,x=d.length;if(x<2)return m;const v=(h==null?void 0:h.decode)||c;let w=0;do{const E=d.indexOf("=",w);if(E===-1)break;const S=d.indexOf(";",w),M=S===-1?x:S;if(E>M){w=d.lastIndexOf(";",E-1)+1;continue}const C=a(d,w,E),b=l(d,E,C),V=d.slice(C,b);if(m[V]===void 0){let O=a(d,E+1,M),_=l(d,M,O);const Z=v(d.slice(O,_));m[V]=Z}w=M+1}while(w<x);return m}function a(d,h,m){do{const x=d.charCodeAt(h);if(x!==32&&x!==9)return h}while(++h<m);return m}function l(d,h,m){for(;h>m;){const x=d.charCodeAt(--h);if(x!==32&&x!==9)return h+1}return m}function u(d,h,m){const x=(m==null?void 0:m.encode)||encodeURIComponent;if(!e.test(d))throw new TypeError(`argument name is invalid: ${d}`);const v=x(h);if(!t.test(v))throw new TypeError(`argument val is invalid: ${h}`);let w=d+"="+v;if(!m)return w;if(m.maxAge!==void 0){if(!Number.isInteger(m.maxAge))throw new TypeError(`option maxAge is invalid: ${m.maxAge}`);w+="; Max-Age="+m.maxAge}if(m.domain){if(!n.test(m.domain))throw new TypeError(`option domain is invalid: ${m.domain}`);w+="; Domain="+m.domain}if(m.path){if(!r.test(m.path))throw new TypeError(`option path is invalid: ${m.path}`);w+="; Path="+m.path}if(m.expires){if(!f(m.expires)||!Number.isFinite(m.expires.valueOf()))throw new TypeError(`option expires is invalid: ${m.expires}`);w+="; Expires="+m.expires.toUTCString()}if(m.httpOnly&&(w+="; HttpOnly"),m.secure&&(w+="; Secure"),m.partitioned&&(w+="; Partitioned"),m.priority)switch(typeof m.priority=="string"?m.priority.toLowerCase():void 0){case"low":w+="; Priority=Low";break;case"medium":w+="; Priority=Medium";break;case"high":w+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${m.priority}`)}if(m.sameSite)switch(typeof m.sameSite=="string"?m.sameSite.toLowerCase():m.sameSite){case!0:case"strict":w+="; SameSite=Strict";break;case"lax":w+="; SameSite=Lax";break;case"none":w+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${m.sameSite}`)}return w}function c(d){if(d.indexOf("%")===-1)return d;try{return decodeURIComponent(d)}catch{return d}}function f(d){return i.call(d)==="[object Date]"}return Zt}Oc();/**
 * react-router v7.6.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var Na=e=>{throw TypeError(e)},Vc=(e,t,n)=>t.has(e)||Na("Cannot "+n),Vr=(e,t,n)=>(Vc(e,t,"read from private field"),n?n.call(e):t.get(e)),Fc=(e,t,n)=>t.has(e)?Na("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Is="popstate";function _c(e={}){function t(r,i){let{pathname:s,search:o,hash:a}=r.location;return hn("",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:at(i)}return Nc(t,n,null,e)}function X(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function me(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function kc(){return Math.random().toString(36).substring(2,10)}function Us(e,t){return{usr:e.state,key:e.key,idx:t}}function hn(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ct(t):t,state:n,key:t&&t.key||r||kc()}}function at({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function ct(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Nc(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a="POP",l=null,u=c();u==null&&(u=0,o.replaceState({...o.state,idx:u},""));function c(){return(o.state||{idx:null}).idx}function f(){a="POP";let v=c(),w=v==null?null:v-u;u=v,l&&l({action:a,location:x.location,delta:w})}function d(v,w){a="PUSH";let E=hn(x.location,v,w);u=c()+1;let S=Us(E,u),M=x.createHref(E);try{o.pushState(S,"",M)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(M)}s&&l&&l({action:a,location:x.location,delta:1})}function h(v,w){a="REPLACE";let E=hn(x.location,v,w);u=c();let S=Us(E,u),M=x.createHref(E);o.replaceState(S,"",M),s&&l&&l({action:a,location:x.location,delta:0})}function m(v){return ja(v)}let x={get action(){return a},get location(){return e(i,o)},listen(v){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Is,f),l=v,()=>{i.removeEventListener(Is,f),l=null}},createHref(v){return t(i,v)},createURL:m,encodeLocation(v){let w=m(v);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:d,replace:h,go(v){return o.go(v)}};return x}function ja(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),X(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:at(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}var sn,$s=class{constructor(e){if(Fc(this,sn,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(Vr(this,sn).has(e))return Vr(this,sn).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Vr(this,sn).set(e,t)}};sn=new WeakMap;var jc=new Set(["lazy","caseSensitive","path","id","index","children"]);function Bc(e){return jc.has(e)}var Ic=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function Uc(e){return Ic.has(e)}function $c(e){return e.index===!0}function Zn(e,t,n=[],r={}){return e.map((i,s)=>{let o=[...n,String(s)],a=typeof i.id=="string"?i.id:o.join("-");if(X(i.index!==!0||!i.children,"Cannot specify children on an index route"),X(!r[a],`Found a route id collision on id "${a}".  Route id's must be globally unique within Data Router usages`),$c(i)){let l={...i,...t(i),id:a};return r[a]=l,l}else{let l={...i,...t(i),id:a,children:void 0};return r[a]=l,i.children&&(l.children=Zn(i.children,t,o,r)),l}})}function ot(e,t,n="/"){return $n(e,t,n,!1)}function $n(e,t,n,r){let i=typeof t=="string"?ct(t):t,s=Ie(i.pathname||"/",n);if(s==null)return null;let o=Ba(e);zc(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=tf(s);a=Qc(o[l],u,r)}return a}function Hc(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function Ba(e,t=[],n=[],r=""){let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(X(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length));let u=qe([r,l.relativePath]),c=n.concat(l);s.children&&s.children.length>0&&(X(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),Ba(s.children,t,c,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:Jc(u,s.index),routesMeta:c})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of Ia(s.path))i(s,o,l)}),t}function Ia(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=Ia(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function zc(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Zc(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Wc=/^:[\w-]+$/,Kc=3,qc=2,Yc=1,Gc=10,Xc=-2,Hs=e=>e==="*";function Jc(e,t){let n=e.split("/"),r=n.length;return n.some(Hs)&&(r+=Xc),t&&(r+=qc),n.filter(i=>!Hs(i)).reduce((i,s)=>i+(Wc.test(s)?Kc:s===""?Yc:Gc),r)}function Zc(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Qc(e,t,n=!1){let{routesMeta:r}=e,i={},s="/",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,c=s==="/"?t:t.slice(s.length)||"/",f=Qn({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),d=l.route;if(!f&&u&&n&&!r[r.length-1].route.index&&(f=Qn({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!f)return null;Object.assign(i,f.params),o.push({params:i,pathname:qe([s,f.pathname]),pathnameBase:sf(qe([s,f.pathnameBase])),route:d}),f.pathnameBase!=="/"&&(s=qe([s,f.pathnameBase]))}return o}function Qn(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=ef(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((u,{paramName:c,isOptional:f},d)=>{if(c==="*"){let m=a[d]||"";o=s.slice(0,s.length-m.length).replace(/(.)\/+$/,"$1")}const h=a[d];return f&&!h?u[c]=void 0:u[c]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function ef(e,t=!1,n=!0){me(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function tf(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return me(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ie(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function nf(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?ct(e):e;return{pathname:n?n.startsWith("/")?n:rf(n,t):t,search:of(r),hash:af(i)}}function rf(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Fr(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ua(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function ur(e){let t=Ua(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function cr(e,t,n,r=!1){let i;typeof e=="string"?i=ct(e):(i={...e},X(!i.pathname||!i.pathname.includes("?"),Fr("?","pathname","search",i)),X(!i.pathname||!i.pathname.includes("#"),Fr("#","pathname","hash",i)),X(!i.search||!i.search.includes("#"),Fr("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;i.pathname=d.join("/")}a=f>=0?t[f]:"/"}let l=nf(i,a),u=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var qe=e=>e.join("/").replace(/\/\/+/g,"/"),sf=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),of=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,af=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,er=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function mn(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var $a=["POST","PUT","PATCH","DELETE"],lf=new Set($a),uf=["GET",...$a],cf=new Set(uf),ff=new Set([301,302,303,307,308]),df=new Set([307,308]),_r={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},hf={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Qt={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Di=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mf=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Ha="remix-router-transitions",za=Symbol("ResetLoaderData");function pf(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";X(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||mf,s={},o=Zn(e.routes,i,void 0,s),a,l=e.basename||"/",u=e.dataStrategy||bf,c={unstable_middleware:!1,...e.future},f=null,d=new Set,h=null,m=null,x=null,v=e.hydrationData!=null,w=ot(o,e.history.location,l),E=!1,S=null,M;if(w==null&&!e.patchRoutesOnNavigation){let p=je(404,{pathname:e.history.location.pathname}),{matches:T,route:R}=to(o);M=!0,w=T,S={[R.id]:p}}else if(w&&!e.hydrationData&&On(w,o,e.history.location.pathname).active&&(w=null),w)if(w.some(p=>p.route.lazy))M=!1;else if(!w.some(p=>p.route.loader))M=!0;else{let p=e.hydrationData?e.hydrationData.loaderData:null,T=e.hydrationData?e.hydrationData.errors:null;if(T){let R=w.findIndex(D=>T[D.route.id]!==void 0);M=w.slice(0,R+1).every(D=>!ei(D.route,p,T))}else M=w.every(R=>!ei(R.route,p,T))}else{M=!1,w=[];let p=On(null,o,e.history.location.pathname);p.active&&p.matches&&(E=!0,w=p.matches)}let C,b={historyAction:e.history.action,location:e.history.location,matches:w,initialized:M,navigation:_r,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},V="POP",O=!1,_,Z=!1,ae=new Map,Me=null,te=!1,ne=!1,ce=new Set,J=new Map,ee=0,oe=-1,ge=new Map,y=new Set,A=new Map,U=new Map,N=new Set,Y=new Map,ie,z=null;function We(){if(f=e.history.listen(({action:p,location:T,delta:R})=>{if(ie){ie(),ie=void 0;return}me(Y.size===0||R!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let D=Ds({currentLocation:b.location,nextLocation:T,historyAction:p});if(D&&R!=null){let L=new Promise(k=>{ie=k});e.history.go(R*-1),Ln(D,{state:"blocked",location:T,proceed(){Ln(D,{state:"proceeding",proceed:void 0,reset:void 0,location:T}),L.then(()=>e.history.go(R))},reset(){let k=new Map(b.blockers);k.set(D,Qt),Re({blockers:k})}});return}return ht(p,T)}),n){Lf(t,ae);let p=()=>Of(t,ae);t.addEventListener("pagehide",p),Me=()=>t.removeEventListener("pagehide",p)}return b.initialized||ht("POP",b.location,{initialHydration:!0}),C}function de(){f&&f(),Me&&Me(),d.clear(),_&&_.abort(),b.fetchers.forEach((p,T)=>Pr(T)),b.blockers.forEach((p,T)=>As(T))}function Er(p){return d.add(p),()=>d.delete(p)}function Re(p,T={}){b={...b,...p};let R=[],D=[];b.fetchers.forEach((L,k)=>{L.state==="idle"&&(N.has(k)?R.push(k):D.push(k))}),N.forEach(L=>{!b.fetchers.has(L)&&!J.has(L)&&R.push(L)}),[...d].forEach(L=>L(b,{deletedFetchers:R,viewTransitionOpts:T.viewTransitionOpts,flushSync:T.flushSync===!0})),R.forEach(L=>Pr(L)),D.forEach(L=>b.fetchers.delete(L))}function Dt(p,T,{flushSync:R}={}){var I,W;let D=b.actionData!=null&&b.navigation.formMethod!=null&&Ve(b.navigation.formMethod)&&b.navigation.state==="loading"&&((I=p.state)==null?void 0:I._isRedirect)!==!0,L;T.actionData?Object.keys(T.actionData).length>0?L=T.actionData:L=null:D?L=b.actionData:L=null;let k=T.loaderData?Qs(b.loaderData,T.loaderData,T.matches||[],T.errors):b.loaderData,H=b.blockers;H.size>0&&(H=new Map(H),H.forEach((B,G)=>H.set(G,Qt)));let F=O===!0||b.navigation.formMethod!=null&&Ve(b.navigation.formMethod)&&((W=p.state)==null?void 0:W._isRedirect)!==!0;a&&(o=a,a=void 0),te||V==="POP"||(V==="PUSH"?e.history.push(p,p.state):V==="REPLACE"&&e.history.replace(p,p.state));let j;if(V==="POP"){let B=ae.get(b.location.pathname);B&&B.has(p.pathname)?j={currentLocation:b.location,nextLocation:p}:ae.has(p.pathname)&&(j={currentLocation:p,nextLocation:b.location})}else if(Z){let B=ae.get(b.location.pathname);B?B.add(p.pathname):(B=new Set([p.pathname]),ae.set(b.location.pathname,B)),j={currentLocation:b.location,nextLocation:p}}Re({...T,actionData:L,loaderData:k,historyAction:V,location:p,initialized:!0,navigation:_r,revalidation:"idle",restoreScrollPosition:Ls(p,T.matches||b.matches),preventScrollReset:F,blockers:H},{viewTransitionOpts:j,flushSync:R===!0}),V="POP",O=!1,Z=!1,te=!1,ne=!1,z==null||z.resolve(),z=null}async function xs(p,T){if(typeof p=="number"){e.history.go(p);return}let R=Qr(b.location,b.matches,l,p,T==null?void 0:T.fromRouteId,T==null?void 0:T.relative),{path:D,submission:L,error:k}=zs(!1,R,T),H=b.location,F=hn(b.location,D,T&&T.state);F={...F,...e.history.encodeLocation(F)};let j=T&&T.replace!=null?T.replace:void 0,I="PUSH";j===!0?I="REPLACE":j===!1||L!=null&&Ve(L.formMethod)&&L.formAction===b.location.pathname+b.location.search&&(I="REPLACE");let W=T&&"preventScrollReset"in T?T.preventScrollReset===!0:void 0,B=(T&&T.flushSync)===!0,G=Ds({currentLocation:H,nextLocation:F,historyAction:I});if(G){Ln(G,{state:"blocked",location:F,proceed(){Ln(G,{state:"proceeding",proceed:void 0,reset:void 0,location:F}),xs(p,T)},reset(){let se=new Map(b.blockers);se.set(G,Qt),Re({blockers:se})}});return}await ht(I,F,{submission:L,pendingError:k,preventScrollReset:W,replace:T&&T.replace,enableViewTransition:T&&T.viewTransition,flushSync:B})}function fc(){z||(z=Vf()),Rr(),Re({revalidation:"loading"});let p=z.promise;return b.navigation.state==="submitting"?p:b.navigation.state==="idle"?(ht(b.historyAction,b.location,{startUninterruptedRevalidation:!0}),p):(ht(V||b.historyAction,b.navigation.location,{overrideNavigation:b.navigation,enableViewTransition:Z===!0}),p)}async function ht(p,T,R){_&&_.abort(),_=null,V=p,te=(R&&R.startUninterruptedRevalidation)===!0,xc(b.location,b.matches),O=(R&&R.preventScrollReset)===!0,Z=(R&&R.enableViewTransition)===!0;let D=a||o,L=R&&R.overrideNavigation,k=R!=null&&R.initialHydration&&b.matches&&b.matches.length>0&&!E?b.matches:ot(D,T,l),H=(R&&R.flushSync)===!0;if(k&&b.initialized&&!ne&&Pf(b.location,T)&&!(R&&R.submission&&Ve(R.submission.formMethod))){Dt(T,{matches:k},{flushSync:H});return}let F=On(k,D,T.pathname);if(F.active&&F.matches&&(k=F.matches),!k){let{error:be,notFoundMatches:Le,route:Q}=Cr(T.pathname);Dt(T,{matches:Le,loaderData:{},errors:{[Q.id]:be}},{flushSync:H});return}_=new AbortController;let j=Lt(e.history,T,_.signal,R&&R.submission),I=new $s(e.unstable_getContext?await e.unstable_getContext():void 0),W;if(R&&R.pendingError)W=[wt(k).route.id,{type:"error",error:R.pendingError}];else if(R&&R.submission&&Ve(R.submission.formMethod)){let be=await dc(j,T,R.submission,k,I,F.active,R&&R.initialHydration===!0,{replace:R.replace,flushSync:H});if(be.shortCircuited)return;if(be.pendingActionResult){let[Le,Q]=be.pendingActionResult;if(Oe(Q)&&mn(Q.error)&&Q.error.status===404){_=null,Dt(T,{matches:be.matches,loaderData:{},errors:{[Le]:Q.error}});return}}k=be.matches||k,W=be.pendingActionResult,L=kr(T,R.submission),H=!1,F.active=!1,j=Lt(e.history,j.url,j.signal)}let{shortCircuited:B,matches:G,loaderData:se,errors:ve}=await hc(j,T,k,I,F.active,L,R&&R.submission,R&&R.fetcherSubmission,R&&R.replace,R&&R.initialHydration===!0,H,W);B||(_=null,Dt(T,{matches:G||k,...eo(W),loaderData:se,errors:ve}))}async function dc(p,T,R,D,L,k,H,F={}){Rr();let j=Df(T,R);if(Re({navigation:j},{flushSync:F.flushSync===!0}),k){let B=await Vn(D,T.pathname,p.signal);if(B.type==="aborted")return{shortCircuited:!0};if(B.type==="error"){let G=wt(B.partialMatches).route.id;return{matches:B.partialMatches,pendingActionResult:[G,{type:"error",error:B.error}]}}else if(B.matches)D=B.matches;else{let{notFoundMatches:G,error:se,route:ve}=Cr(T.pathname);return{matches:G,pendingActionResult:[ve.id,{type:"error",error:se}]}}}let I,W=on(D,T);if(!W.route.action&&!W.route.lazy)I={type:"error",error:je(405,{method:p.method,pathname:T.pathname,routeId:W.route.id})};else{let B=Nt(i,s,p,D,W,H?[]:r,L),G=await Kt(p,B,L,null);if(I=G[W.route.id],!I){for(let se of D)if(G[se.route.id]){I=G[se.route.id];break}}if(p.signal.aborted)return{shortCircuited:!0}}if(bt(I)){let B;return F&&F.replace!=null?B=F.replace:B=Xs(I.response.headers.get("Location"),new URL(p.url),l)===b.location.pathname+b.location.search,await mt(p,I,!0,{submission:R,replace:B}),{shortCircuited:!0}}if(Oe(I)){let B=wt(D,W.route.id);return(F&&F.replace)!==!0&&(V="PUSH"),{matches:D,pendingActionResult:[B.route.id,I,W.route.id]}}return{matches:D,pendingActionResult:[W.route.id,I]}}async function hc(p,T,R,D,L,k,H,F,j,I,W,B){let G=k||kr(T,H),se=H||F||ro(G),ve=!te&&!I;if(L){if(ve){let _e=Ts(B);Re({navigation:G,..._e!==void 0?{actionData:_e}:{}},{flushSync:W})}let re=await Vn(R,T.pathname,p.signal);if(re.type==="aborted")return{shortCircuited:!0};if(re.type==="error"){let _e=wt(re.partialMatches).route.id;return{matches:re.partialMatches,loaderData:{},errors:{[_e]:re.error}}}else if(re.matches)R=re.matches;else{let{error:_e,notFoundMatches:rt,route:_n}=Cr(T.pathname);return{matches:rt,loaderData:{},errors:{[_n.id]:_e}}}}let be=a||o,{dsMatches:Le,revalidatingFetchers:Q}=Ws(p,D,i,s,e.history,b,R,se,T,I?[]:r,I===!0,ne,ce,N,A,y,be,l,B);if(oe=++ee,!e.dataStrategy&&!Le.some(re=>re.shouldLoad)&&Q.length===0){let re=Ps();return Dt(T,{matches:R,loaderData:{},errors:B&&Oe(B[1])?{[B[0]]:B[1].error}:null,...eo(B),...re?{fetchers:new Map(b.fetchers)}:{}},{flushSync:W}),{shortCircuited:!0}}if(ve){let re={};if(!L){re.navigation=G;let _e=Ts(B);_e!==void 0&&(re.actionData=_e)}Q.length>0&&(re.fetchers=mc(Q)),Re(re,{flushSync:W})}Q.forEach(re=>{nt(re.key),re.controller&&J.set(re.key,re.controller)});let qt=()=>Q.forEach(re=>nt(re.key));_&&_.signal.addEventListener("abort",qt);let{loaderResults:pt,fetcherResults:Yt}=await Ss(Le,Q,p,D);if(p.signal.aborted)return{shortCircuited:!0};_&&_.signal.removeEventListener("abort",qt),Q.forEach(re=>J.delete(re.key));let Fe=kn(pt);if(Fe)return await mt(p,Fe.result,!0,{replace:j}),{shortCircuited:!0};if(Fe=kn(Yt),Fe)return y.add(Fe.key),await mt(p,Fe.result,!0,{replace:j}),{shortCircuited:!0};let{loaderData:Gt,errors:Xt}=Zs(b,R,pt,B,Q,Yt);I&&b.errors&&(Xt={...b.errors,...Xt});let Ar=Ps(),yt=Cs(oe),Fn=Ar||yt||Q.length>0;return{matches:R,loaderData:Gt,errors:Xt,...Fn?{fetchers:new Map(b.fetchers)}:{}}}function Ts(p){if(p&&!Oe(p[1]))return{[p[0]]:p[1].data};if(b.actionData)return Object.keys(b.actionData).length===0?null:b.actionData}function mc(p){return p.forEach(T=>{let R=b.fetchers.get(T.key),D=en(void 0,R?R.data:void 0);b.fetchers.set(T.key,D)}),new Map(b.fetchers)}async function pc(p,T,R,D){nt(p);let L=(D&&D.flushSync)===!0,k=a||o,H=Qr(b.location,b.matches,l,R,T,D==null?void 0:D.relative),F=ot(k,H,l),j=On(F,k,H);if(j.active&&j.matches&&(F=j.matches),!F){Je(p,T,je(404,{pathname:H}),{flushSync:L});return}let{path:I,submission:W,error:B}=zs(!0,H,D);if(B){Je(p,T,B,{flushSync:L});return}let G=on(F,I),se=new $s(e.unstable_getContext?await e.unstable_getContext():void 0),ve=(D&&D.preventScrollReset)===!0;if(W&&Ve(W.formMethod)){await yc(p,T,I,G,F,se,j.active,L,ve,W);return}A.set(p,{routeId:T,path:I}),await gc(p,T,I,G,F,se,j.active,L,ve,W)}async function yc(p,T,R,D,L,k,H,F,j,I){Rr(),A.delete(p);function W(pe){if(!pe.route.action&&!pe.route.lazy){let Mt=je(405,{method:I.formMethod,pathname:R,routeId:T});return Je(p,T,Mt,{flushSync:F}),!0}return!1}if(!H&&W(D))return;let B=b.fetchers.get(p);tt(p,Mf(I,B),{flushSync:F});let G=new AbortController,se=Lt(e.history,R,G.signal,I);if(H){let pe=await Vn(L,R,se.signal,p);if(pe.type==="aborted")return;if(pe.type==="error"){Je(p,T,pe.error,{flushSync:F});return}else if(pe.matches){if(L=pe.matches,D=on(L,R),W(D))return}else{Je(p,T,je(404,{pathname:R}),{flushSync:F});return}}J.set(p,G);let ve=ee,be=Nt(i,s,se,L,D,r,k),Q=(await Kt(se,be,k,p))[D.route.id];if(se.signal.aborted){J.get(p)===G&&J.delete(p);return}if(N.has(p)){if(bt(Q)||Oe(Q)){tt(p,it(void 0));return}}else{if(bt(Q))if(J.delete(p),oe>ve){tt(p,it(void 0));return}else return y.add(p),tt(p,en(I)),mt(se,Q,!1,{fetcherSubmission:I,preventScrollReset:j});if(Oe(Q)){Je(p,T,Q.error);return}}let qt=b.navigation.location||b.location,pt=Lt(e.history,qt,G.signal),Yt=a||o,Fe=b.navigation.state!=="idle"?ot(Yt,b.navigation.location,l):b.matches;X(Fe,"Didn't find any matches after fetcher action");let Gt=++ee;ge.set(p,Gt);let Xt=en(I,Q.data);b.fetchers.set(p,Xt);let{dsMatches:Ar,revalidatingFetchers:yt}=Ws(pt,k,i,s,e.history,b,Fe,I,qt,r,!1,ne,ce,N,A,y,Yt,l,[D.route.id,Q]);yt.filter(pe=>pe.key!==p).forEach(pe=>{let Mt=pe.key,Os=b.fetchers.get(Mt),Ec=en(void 0,Os?Os.data:void 0);b.fetchers.set(Mt,Ec),nt(Mt),pe.controller&&J.set(Mt,pe.controller)}),Re({fetchers:new Map(b.fetchers)});let Fn=()=>yt.forEach(pe=>nt(pe.key));G.signal.addEventListener("abort",Fn);let{loaderResults:re,fetcherResults:_e}=await Ss(Ar,yt,pt,k);if(G.signal.aborted)return;if(G.signal.removeEventListener("abort",Fn),ge.delete(p),J.delete(p),yt.forEach(pe=>J.delete(pe.key)),b.fetchers.has(p)){let pe=it(Q.data);b.fetchers.set(p,pe)}let rt=kn(re);if(rt)return mt(pt,rt.result,!1,{preventScrollReset:j});if(rt=kn(_e),rt)return y.add(rt.key),mt(pt,rt.result,!1,{preventScrollReset:j});let{loaderData:_n,errors:Dr}=Zs(b,Fe,re,void 0,yt,_e);Cs(Gt),b.navigation.state==="loading"&&Gt>oe?(X(V,"Expected pending action"),_&&_.abort(),Dt(b.navigation.location,{matches:Fe,loaderData:_n,errors:Dr,fetchers:new Map(b.fetchers)})):(Re({errors:Dr,loaderData:Qs(b.loaderData,_n,Fe,Dr),fetchers:new Map(b.fetchers)}),ne=!1)}async function gc(p,T,R,D,L,k,H,F,j,I){let W=b.fetchers.get(p);tt(p,en(I,W?W.data:void 0),{flushSync:F});let B=new AbortController,G=Lt(e.history,R,B.signal);if(H){let Q=await Vn(L,R,G.signal,p);if(Q.type==="aborted")return;if(Q.type==="error"){Je(p,T,Q.error,{flushSync:F});return}else if(Q.matches)L=Q.matches,D=on(L,R);else{Je(p,T,je(404,{pathname:R}),{flushSync:F});return}}J.set(p,B);let se=ee,ve=Nt(i,s,G,L,D,r,k),Le=(await Kt(G,ve,k,p))[D.route.id];if(J.get(p)===B&&J.delete(p),!G.signal.aborted){if(N.has(p)){tt(p,it(void 0));return}if(bt(Le))if(oe>se){tt(p,it(void 0));return}else{y.add(p),await mt(G,Le,!1,{preventScrollReset:j});return}if(Oe(Le)){Je(p,T,Le.error);return}tt(p,it(Le.data))}}async function mt(p,T,R,{submission:D,fetcherSubmission:L,preventScrollReset:k,replace:H}={}){T.response.headers.has("X-Remix-Revalidate")&&(ne=!0);let F=T.response.headers.get("Location");X(F,"Expected a Location header on the redirect Response"),F=Xs(F,new URL(p.url),l);let j=hn(b.location,F,{_isRedirect:!0});if(n){let ve=!1;if(T.response.headers.has("X-Remix-Reload-Document"))ve=!0;else if(Di.test(F)){const be=ja(F,!0);ve=be.origin!==t.location.origin||Ie(be.pathname,l)==null}if(ve){H?t.location.replace(F):t.location.assign(F);return}}_=null;let I=H===!0||T.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:W,formAction:B,formEncType:G}=b.navigation;!D&&!L&&W&&B&&G&&(D=ro(b.navigation));let se=D||L;if(df.has(T.response.status)&&se&&Ve(se.formMethod))await ht(I,j,{submission:{...se,formAction:F},preventScrollReset:k||O,enableViewTransition:R?Z:void 0});else{let ve=kr(j,D);await ht(I,j,{overrideNavigation:ve,fetcherSubmission:L,preventScrollReset:k||O,enableViewTransition:R?Z:void 0})}}async function Kt(p,T,R,D){let L,k={};try{L=await xf(u,p,T,D,R,!1)}catch(H){return T.filter(F=>F.shouldLoad).forEach(F=>{k[F.route.id]={type:"error",error:H}}),k}if(p.signal.aborted)return k;for(let[H,F]of Object.entries(L))if(Cf(F)){let j=F.result;k[H]={type:"redirect",response:Ef(j,p,H,T,l)}}else k[H]=await Sf(F);return k}async function Ss(p,T,R,D){let L=Kt(R,p,D,null),k=Promise.all(T.map(async j=>{if(j.matches&&j.match&&j.request&&j.controller){let W=(await Kt(j.request,j.matches,D,j.key))[j.match.route.id];return{[j.key]:W}}else return Promise.resolve({[j.key]:{type:"error",error:je(404,{pathname:j.path})}})})),H=await L,F=(await k).reduce((j,I)=>Object.assign(j,I),{});return{loaderResults:H,fetcherResults:F}}function Rr(){ne=!0,A.forEach((p,T)=>{J.has(T)&&ce.add(T),nt(T)})}function tt(p,T,R={}){b.fetchers.set(p,T),Re({fetchers:new Map(b.fetchers)},{flushSync:(R&&R.flushSync)===!0})}function Je(p,T,R,D={}){let L=wt(b.matches,T);Pr(p),Re({errors:{[L.route.id]:R},fetchers:new Map(b.fetchers)},{flushSync:(D&&D.flushSync)===!0})}function Es(p){return U.set(p,(U.get(p)||0)+1),N.has(p)&&N.delete(p),b.fetchers.get(p)||hf}function Pr(p){let T=b.fetchers.get(p);J.has(p)&&!(T&&T.state==="loading"&&ge.has(p))&&nt(p),A.delete(p),ge.delete(p),y.delete(p),N.delete(p),ce.delete(p),b.fetchers.delete(p)}function vc(p){let T=(U.get(p)||0)-1;T<=0?(U.delete(p),N.add(p)):U.set(p,T),Re({fetchers:new Map(b.fetchers)})}function nt(p){let T=J.get(p);T&&(T.abort(),J.delete(p))}function Rs(p){for(let T of p){let R=Es(T),D=it(R.data);b.fetchers.set(T,D)}}function Ps(){let p=[],T=!1;for(let R of y){let D=b.fetchers.get(R);X(D,`Expected fetcher: ${R}`),D.state==="loading"&&(y.delete(R),p.push(R),T=!0)}return Rs(p),T}function Cs(p){let T=[];for(let[R,D]of ge)if(D<p){let L=b.fetchers.get(R);X(L,`Expected fetcher: ${R}`),L.state==="loading"&&(nt(R),ge.delete(R),T.push(R))}return Rs(T),T.length>0}function wc(p,T){let R=b.blockers.get(p)||Qt;return Y.get(p)!==T&&Y.set(p,T),R}function As(p){b.blockers.delete(p),Y.delete(p)}function Ln(p,T){let R=b.blockers.get(p)||Qt;X(R.state==="unblocked"&&T.state==="blocked"||R.state==="blocked"&&T.state==="blocked"||R.state==="blocked"&&T.state==="proceeding"||R.state==="blocked"&&T.state==="unblocked"||R.state==="proceeding"&&T.state==="unblocked",`Invalid blocker state transition: ${R.state} -> ${T.state}`);let D=new Map(b.blockers);D.set(p,T),Re({blockers:D})}function Ds({currentLocation:p,nextLocation:T,historyAction:R}){if(Y.size===0)return;Y.size>1&&me(!1,"A router only supports one blocker at a time");let D=Array.from(Y.entries()),[L,k]=D[D.length-1],H=b.blockers.get(L);if(!(H&&H.state==="proceeding")&&k({currentLocation:p,nextLocation:T,historyAction:R}))return L}function Cr(p){let T=je(404,{pathname:p}),R=a||o,{matches:D,route:L}=to(R);return{notFoundMatches:D,route:L,error:T}}function bc(p,T,R){if(h=p,x=T,m=R||null,!v&&b.navigation===_r){v=!0;let D=Ls(b.location,b.matches);D!=null&&Re({restoreScrollPosition:D})}return()=>{h=null,x=null,m=null}}function Ms(p,T){return m&&m(p,T.map(D=>Hc(D,b.loaderData)))||p.key}function xc(p,T){if(h&&x){let R=Ms(p,T);h[R]=x()}}function Ls(p,T){if(h){let R=Ms(p,T),D=h[R];if(typeof D=="number")return D}return null}function On(p,T,R){if(e.patchRoutesOnNavigation)if(p){if(Object.keys(p[0].params).length>0)return{active:!0,matches:$n(T,R,l,!0)}}else return{active:!0,matches:$n(T,R,l,!0)||[]};return{active:!1,matches:null}}async function Vn(p,T,R,D){if(!e.patchRoutesOnNavigation)return{type:"success",matches:p};let L=p;for(;;){let k=a==null,H=a||o,F=s;try{await e.patchRoutesOnNavigation({signal:R,path:T,matches:L,fetcherKey:D,patch:(W,B)=>{R.aborted||Ks(W,B,H,F,i)}})}catch(W){return{type:"error",error:W,partialMatches:L}}finally{k&&!R.aborted&&(o=[...o])}if(R.aborted)return{type:"aborted"};let j=ot(H,T,l);if(j)return{type:"success",matches:j};let I=$n(H,T,l,!0);if(!I||L.length===I.length&&L.every((W,B)=>W.route.id===I[B].route.id))return{type:"success",matches:null};L=I}}function Tc(p){s={},a=Zn(p,i,void 0,s)}function Sc(p,T){let R=a==null;Ks(p,T,a||o,s,i),R&&(o=[...o],Re({}))}return C={get basename(){return l},get future(){return c},get state(){return b},get routes(){return o},get window(){return t},initialize:We,subscribe:Er,enableScrollRestoration:bc,navigate:xs,fetch:pc,revalidate:fc,createHref:p=>e.history.createHref(p),encodeLocation:p=>e.history.encodeLocation(p),getFetcher:Es,deleteFetcher:vc,dispose:de,getBlocker:wc,deleteBlocker:As,patchRoutes:Sc,_internalFetchControllers:J,_internalSetRoutes:Tc},C}function yf(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Qr(e,t,n,r,i,s){let o,a;if(i){o=[];for(let u of t)if(o.push(u),u.route.id===i){a=u;break}}else o=t,a=t[t.length-1];let l=cr(r||".",ur(o),Ie(e.pathname,n)||e.pathname,s==="path");if(r==null&&(l.search=e.search,l.hash=e.hash),(r==null||r===""||r===".")&&a){let u=Mi(l.search);if(a.route.index&&!u)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!a.route.index&&u){let c=new URLSearchParams(l.search),f=c.getAll("index");c.delete("index"),f.filter(h=>h).forEach(h=>c.append("index",h));let d=c.toString();l.search=d?`?${d}`:""}}return n!=="/"&&(l.pathname=l.pathname==="/"?n:qe([n,l.pathname])),at(l)}function zs(e,t,n){if(!n||!yf(n))return{path:t};if(n.formMethod&&!Af(n.formMethod))return{path:t,error:je(405,{method:n.formMethod})};let r=()=>({path:t,error:je(400,{type:"invalid-body"})}),s=(n.formMethod||"get").toUpperCase(),o=Xa(t);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Ve(s))return r();let f=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((d,[h,m])=>`${d}${h}=${m}
`,""):String(n.body);return{path:t,submission:{formMethod:s,formAction:o,formEncType:n.formEncType,formData:void 0,json:void 0,text:f}}}else if(n.formEncType==="application/json"){if(!Ve(s))return r();try{let f=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:s,formAction:o,formEncType:n.formEncType,formData:void 0,json:f,text:void 0}}}catch{return r()}}}X(typeof FormData=="function","FormData is not available in this environment");let a,l;if(n.formData)a=ni(n.formData),l=n.formData;else if(n.body instanceof FormData)a=ni(n.body),l=n.body;else if(n.body instanceof URLSearchParams)a=n.body,l=Js(a);else if(n.body==null)a=new URLSearchParams,l=new FormData;else try{a=new URLSearchParams(n.body),l=Js(a)}catch{return r()}let u={formMethod:s,formAction:o,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Ve(u.formMethod))return{path:t,submission:u};let c=ct(t);return e&&c.search&&Mi(c.search)&&a.append("index",""),c.search=`?${a}`,{path:at(c),submission:u}}function Ws(e,t,n,r,i,s,o,a,l,u,c,f,d,h,m,x,v,w,E){var Me;let S=E?Oe(E[1])?E[1].error:E[1].data:void 0,M=i.createURL(s.location),C=i.createURL(l),b;if(c&&s.errors){let te=Object.keys(s.errors)[0];b=o.findIndex(ne=>ne.route.id===te)}else if(E&&Oe(E[1])){let te=E[0];b=o.findIndex(ne=>ne.route.id===te)-1}let V=E?E[1].statusCode:void 0,O=V&&V>=400,_={currentUrl:M,currentParams:((Me=s.matches[0])==null?void 0:Me.params)||{},nextUrl:C,nextParams:o[0].params,...a,actionResult:S,actionStatus:V},Z=o.map((te,ne)=>{let{route:ce}=te,J=null;if(b!=null&&ne>b?J=!1:ce.lazy?J=!0:ce.loader==null?J=!1:c?J=ei(ce,s.loaderData,s.errors):gf(s.loaderData,s.matches[ne],te)&&(J=!0),J!==null)return ti(n,r,e,te,u,t,J);let ee=O?!1:f||M.pathname+M.search===C.pathname+C.search||M.search!==C.search||vf(s.matches[ne],te),oe={..._,defaultShouldRevalidate:ee},ge=tr(te,oe);return ti(n,r,e,te,u,t,ge,oe)}),ae=[];return m.forEach((te,ne)=>{if(c||!o.some(A=>A.route.id===te.routeId)||h.has(ne))return;let ce=ot(v,te.path,w);if(!ce){ae.push({key:ne,routeId:te.routeId,path:te.path,matches:null,match:null,request:null,controller:null});return}if(x.has(ne))return;let J=s.fetchers.get(ne),ee=on(ce,te.path),oe=new AbortController,ge=Lt(i,te.path,oe.signal),y=null;if(d.has(ne))d.delete(ne),y=Nt(n,r,ge,ce,ee,u,t);else if(J&&J.state!=="idle"&&J.data===void 0)f&&(y=Nt(n,r,ge,ce,ee,u,t));else{let A={..._,defaultShouldRevalidate:O?!1:f};tr(ee,A)&&(y=Nt(n,r,ge,ce,ee,u,t,A))}y&&ae.push({key:ne,routeId:te.routeId,path:te.path,matches:y,match:ee,request:ge,controller:oe})}),{dsMatches:Z,revalidatingFetchers:ae}}function ei(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!i}function gf(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function vf(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function tr(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function Ks(e,t,n,r,i){let s;if(e){let l=r[e];X(l,`No route found to patch children into: routeId = ${e}`),l.children||(l.children=[]),s=l.children}else s=n;let o=t.filter(l=>!s.some(u=>Wa(l,u))),a=Zn(o,i,[e||"_","patch",String((s==null?void 0:s.length)||"0")],r);s.push(...a)}function Wa(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var i;return(i=t.children)==null?void 0:i.some(s=>Wa(n,s))}):!1}var qs=new WeakMap,Ka=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(X(i,"No route found in manifest"),!i.lazy||typeof i.lazy!="object")return;let s=i.lazy[e];if(!s)return;let o=qs.get(i);o||(o={},qs.set(i,o));let a=o[e];if(a)return a;let l=(async()=>{let u=Bc(e),f=i[e]!==void 0&&e!=="hasErrorBoundary";if(u)me(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),o[e]=Promise.resolve();else if(f)me(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let d=await s();d!=null&&(Object.assign(i,{[e]:d}),Object.assign(i,r(i)))}typeof i.lazy=="object"&&(i.lazy[e]=void 0,Object.values(i.lazy).every(d=>d===void 0)&&(i.lazy=void 0))})();return o[e]=l,l},Ys=new WeakMap;function wf(e,t,n,r,i){let s=n[e.id];if(X(s,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let c=Ys.get(s);if(c)return{lazyRoutePromise:c,lazyHandlerPromise:c};let f=(async()=>{X(typeof e.lazy=="function","No lazy route function found");let d=await e.lazy(),h={};for(let m in d){let x=d[m];if(x===void 0)continue;let v=Uc(m),E=s[m]!==void 0&&m!=="hasErrorBoundary";v?me(!v,"Route property "+m+" is not a supported property to be returned from a lazy route function. This property will be ignored."):E?me(!E,`Route "${s.id}" has a static property "${m}" defined but its lazy function is also returning a value for this property. The lazy route property "${m}" will be ignored.`):h[m]=x}Object.assign(s,h),Object.assign(s,{...r(s),lazy:void 0})})();return Ys.set(s,f),f.catch(()=>{}),{lazyRoutePromise:f,lazyHandlerPromise:f}}let o=Object.keys(e.lazy),a=[],l;for(let c of o){if(i&&i.includes(c))continue;let f=Ka({key:c,route:e,manifest:n,mapRouteProperties:r});f&&(a.push(f),c===t&&(l=f))}let u=a.length>0?Promise.all(a).then(()=>{}):void 0;return u==null||u.catch(()=>{}),l==null||l.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:l}}async function Gs(e){let t=e.matches.filter(i=>i.shouldLoad),n={};return(await Promise.all(t.map(i=>i.resolve()))).forEach((i,s)=>{n[t[s].route.id]=i}),n}async function bf(e){return e.matches.some(t=>t.route.unstable_middleware)?qa(e,!1,()=>Gs(e),(t,n)=>({[n]:{type:"error",result:t}})):Gs(e)}async function qa(e,t,n,r){let{matches:i,request:s,params:o,context:a}=e,l={handlerResult:void 0};try{let u=i.flatMap(f=>f.route.unstable_middleware?f.route.unstable_middleware.map(d=>[f.route.id,d]):[]),c=await Ya({request:s,params:o,context:a},u,t,l,n);return t?c:l.handlerResult}catch(u){if(!l.middlewareError)throw u;let c=await r(l.middlewareError.error,l.middlewareError.routeId);return l.handlerResult?Object.assign(l.handlerResult,c):c}}async function Ya(e,t,n,r,i,s=0){let{request:o}=e;if(o.signal.aborted)throw o.signal.reason?o.signal.reason:new Error(`Request aborted without an \`AbortSignal.reason\`: ${o.method} ${o.url}`);let a=t[s];if(!a)return r.handlerResult=await i(),r.handlerResult;let[l,u]=a,c=!1,f,d=async()=>{if(c)throw new Error("You may only call `next()` once per middleware");c=!0,await Ya(e,t,n,r,i,s+1)};try{let h=await u({request:e.request,params:e.params,context:e.context},d);return c?h===void 0?f:h:d()}catch(h){throw r.middlewareError?r.middlewareError.error!==h&&(r.middlewareError={routeId:l,error:h}):r.middlewareError={routeId:l,error:h},h}}function Ga(e,t,n,r,i){let s=Ka({key:"unstable_middleware",route:r.route,manifest:t,mapRouteProperties:e}),o=wf(r.route,Ve(n.method)?"action":"loader",t,e,i);return{middleware:s,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function ti(e,t,n,r,i,s,o,a=null){let l=!1,u=Ga(e,t,n,r,i);return{...r,_lazyPromises:u,shouldLoad:o,unstable_shouldRevalidateArgs:a,unstable_shouldCallHandler(c){return l=!0,a?typeof c=="boolean"?tr(r,{...a,defaultShouldRevalidate:c}):tr(r,a):o},resolve(c){return l||o||c&&n.method==="GET"&&(r.route.lazy||r.route.loader)?Tf({request:n,match:r,lazyHandlerPromise:u==null?void 0:u.handler,lazyRoutePromise:u==null?void 0:u.route,handlerOverride:c,scopedContext:s}):Promise.resolve({type:"data",result:void 0})}}}function Nt(e,t,n,r,i,s,o,a=null){return r.map(l=>l.route.id!==i.route.id?{...l,shouldLoad:!1,unstable_shouldRevalidateArgs:a,unstable_shouldCallHandler:()=>!1,_lazyPromises:Ga(e,t,n,l,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:ti(e,t,n,l,s,o,!0,a))}async function xf(e,t,n,r,i,s){n.some(u=>{var c;return(c=u._lazyPromises)==null?void 0:c.middleware})&&await Promise.all(n.map(u=>{var c;return(c=u._lazyPromises)==null?void 0:c.middleware}));let o={request:t,params:n[0].params,context:i,matches:n},l=await e({...o,fetcherKey:r,unstable_runClientMiddleware:u=>{let c=o;return qa(c,!1,()=>u({...c,fetcherKey:r,unstable_runClientMiddleware:()=>{throw new Error("Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler")}}),(f,d)=>({[d]:{type:"error",result:f}}))}});try{await Promise.all(n.flatMap(u=>{var c,f;return[(c=u._lazyPromises)==null?void 0:c.handler,(f=u._lazyPromises)==null?void 0:f.route]}))}catch{}return l}async function Tf({request:e,match:t,lazyHandlerPromise:n,lazyRoutePromise:r,handlerOverride:i,scopedContext:s}){let o,a,l=Ve(e.method),u=l?"action":"loader",c=f=>{let d,h=new Promise((v,w)=>d=w);a=()=>d(),e.signal.addEventListener("abort",a);let m=v=>typeof f!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${u}" [routeId: ${t.route.id}]`)):f({request:e,params:t.params,context:s},...v!==void 0?[v]:[]),x=(async()=>{try{return{type:"data",result:await(i?i(w=>m(w)):m())}}catch(v){return{type:"error",result:v}}})();return Promise.race([x,h])};try{let f=l?t.route.action:t.route.loader;if(n||r)if(f){let d,[h]=await Promise.all([c(f).catch(m=>{d=m}),n,r]);if(d!==void 0)throw d;o=h}else{await n;let d=l?t.route.action:t.route.loader;if(d)[o]=await Promise.all([c(d),r]);else if(u==="action"){let h=new URL(e.url),m=h.pathname+h.search;throw je(405,{method:e.method,pathname:m,routeId:t.route.id})}else return{type:"data",result:void 0}}else if(f)o=await c(f);else{let d=new URL(e.url),h=d.pathname+d.search;throw je(404,{pathname:h})}}catch(f){return{type:"error",result:f}}finally{a&&e.signal.removeEventListener("abort",a)}return o}async function Sf(e){var r,i,s,o,a,l;let{result:t,type:n}=e;if(Ja(t)){let u;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?u=null:u=await t.json():u=await t.text()}catch(c){return{type:"error",error:c}}return n==="error"?{type:"error",error:new er(t.status,t.statusText,u),statusCode:t.status,headers:t.headers}:{type:"data",data:u,statusCode:t.status,headers:t.headers}}return n==="error"?no(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:(r=t.init)==null?void 0:r.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}:{type:"error",error:new er(((s=t.init)==null?void 0:s.status)||500,void 0,t.data),statusCode:mn(t)?t.status:void 0,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:mn(t)?t.status:void 0}:no(t)?{type:"data",data:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(l=t.init)!=null&&l.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Ef(e,t,n,r,i){let s=e.headers.get("Location");if(X(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Di.test(s)){let o=r.slice(0,r.findIndex(a=>a.route.id===n)+1);s=Qr(new URL(t.url),o,i,s),e.headers.set("Location",s)}return e}function Xs(e,t,n){if(Di.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),s=Ie(i.pathname,n)!=null;if(i.origin===t.origin&&s)return i.pathname+i.search+i.hash}return e}function Lt(e,t,n,r){let i=e.createURL(Xa(t)).toString(),s={signal:n};if(r&&Ve(r.formMethod)){let{formMethod:o,formEncType:a}=r;s.method=o.toUpperCase(),a==="application/json"?(s.headers=new Headers({"Content-Type":a}),s.body=JSON.stringify(r.json)):a==="text/plain"?s.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?s.body=ni(r.formData):s.body=r.formData}return new Request(i,s)}function ni(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Js(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Rf(e,t,n,r=!1,i=!1){let s={},o=null,a,l=!1,u={},c=n&&Oe(n[1])?n[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let d=f.route.id,h=t[d];if(X(!bt(h),"Cannot handle redirect results in processLoaderData"),Oe(h)){let m=h.error;if(c!==void 0&&(m=c,c=void 0),o=o||{},i)o[d]=m;else{let x=wt(e,d);o[x.route.id]==null&&(o[x.route.id]=m)}r||(s[d]=za),l||(l=!0,a=mn(h.error)?h.error.status:500),h.headers&&(u[d]=h.headers)}else s[d]=h.data,h.statusCode&&h.statusCode!==200&&!l&&(a=h.statusCode),h.headers&&(u[d]=h.headers)}),c!==void 0&&n&&(o={[n[0]]:c},n[2]&&(s[n[2]]=void 0)),{loaderData:s,errors:o,statusCode:a||200,loaderHeaders:u}}function Zs(e,t,n,r,i,s){let{loaderData:o,errors:a}=Rf(t,n,r);return i.filter(l=>!l.matches||l.matches.some(u=>u.shouldLoad)).forEach(l=>{let{key:u,match:c,controller:f}=l,d=s[u];if(X(d,"Did not find corresponding fetcher result"),!(f&&f.signal.aborted))if(Oe(d)){let h=wt(e.matches,c==null?void 0:c.route.id);a&&a[h.route.id]||(a={...a,[h.route.id]:d.error}),e.fetchers.delete(u)}else if(bt(d))X(!1,"Unhandled fetcher revalidation redirect");else{let h=it(d.data);e.fetchers.set(u,h)}}),{loaderData:o,errors:a}}function Qs(e,t,n,r){let i=Object.entries(t).filter(([,s])=>s!==za).reduce((s,[o,a])=>(s[o]=a,s),{});for(let s of n){let o=s.route.id;if(!t.hasOwnProperty(o)&&e.hasOwnProperty(o)&&s.route.loader&&(i[o]=e[o]),r&&r.hasOwnProperty(o))break}return i}function eo(e){return e?Oe(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function wt(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function to(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function je(e,{pathname:t,routeId:n,method:r,type:i,message:s}={}){let o="Unknown Server Error",a="Unknown @remix-run/router error";return e===400?(o="Bad Request",r&&t&&n?a=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i==="invalid-body"&&(a="Unable to encode submission body")):e===403?(o="Forbidden",a=`Route "${n}" does not match URL "${t}"`):e===404?(o="Not Found",a=`No route matches URL "${t}"`):e===405&&(o="Method Not Allowed",r&&t&&n?a=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(a=`Invalid request method "${r.toUpperCase()}"`)),new er(e||500,o,new Error(a),!0)}function kn(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(bt(i))return{key:r,result:i}}}function Xa(e){let t=typeof e=="string"?ct(e):e;return at({...t,hash:""})}function Pf(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Cf(e){return Ja(e.result)&&ff.has(e.result.status)}function Oe(e){return e.type==="error"}function bt(e){return(e&&e.type)==="redirect"}function no(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Ja(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Af(e){return cf.has(e.toUpperCase())}function Ve(e){return lf.has(e.toUpperCase())}function Mi(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function on(e,t){let n=typeof t=="string"?ct(t).search:t.search;if(e[e.length-1].route.index&&Mi(n||""))return e[e.length-1];let r=Ua(e);return r[r.length-1]}function ro(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:s,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function kr(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Df(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function en(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Mf(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function it(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Lf(e,t){try{let n=e.sessionStorage.getItem(Ha);if(n){let r=JSON.parse(n);for(let[i,s]of Object.entries(r||{}))s&&Array.isArray(s)&&t.set(i,new Set(s||[]))}}catch{}}function Of(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(Ha,JSON.stringify(n))}catch(r){me(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function Vf(){let e,t,n=new Promise((r,i)=>{e=async s=>{r(s);try{await n}catch{}},t=async s=>{i(s);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var At=g.createContext(null);At.displayName="DataRouter";var Sn=g.createContext(null);Sn.displayName="DataRouterState";var Li=g.createContext({isTransitioning:!1});Li.displayName="ViewTransition";var Za=g.createContext(new Map);Za.displayName="Fetchers";var Ff=g.createContext(null);Ff.displayName="Await";var He=g.createContext(null);He.displayName="Navigation";var fr=g.createContext(null);fr.displayName="Location";var Ue=g.createContext({outlet:null,matches:[],isDataRoute:!1});Ue.displayName="Route";var Oi=g.createContext(null);Oi.displayName="RouteError";function _f(e,{relative:t}={}){X(It(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=g.useContext(He),{hash:i,pathname:s,search:o}=En(e,{relative:t}),a=s;return n!=="/"&&(a=s==="/"?n:qe([n,s])),r.createHref({pathname:a,search:o,hash:i})}function It(){return g.useContext(fr)!=null}function ft(){return X(It(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(fr).location}var Qa="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function el(e){g.useContext(He).static||g.useLayoutEffect(e)}function tl(){let{isDataRoute:e}=g.useContext(Ue);return e?Xf():kf()}function kf(){X(It(),"useNavigate() may be used only in the context of a <Router> component.");let e=g.useContext(At),{basename:t,navigator:n}=g.useContext(He),{matches:r}=g.useContext(Ue),{pathname:i}=ft(),s=JSON.stringify(ur(r)),o=g.useRef(!1);return el(()=>{o.current=!0}),g.useCallback((l,u={})=>{if(me(o.current,Qa),!o.current)return;if(typeof l=="number"){n.go(l);return}let c=cr(l,JSON.parse(s),i,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:qe([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,s,i,e])}var Nf=g.createContext(null);function jf(e){let t=g.useContext(Ue).outlet;return t&&g.createElement(Nf.Provider,{value:e},t)}function e0(){let{matches:e}=g.useContext(Ue),t=e[e.length-1];return t?t.params:{}}function En(e,{relative:t}={}){let{matches:n}=g.useContext(Ue),{pathname:r}=ft(),i=JSON.stringify(ur(n));return g.useMemo(()=>cr(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function Bf(e,t,n,r){X(It(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i,static:s}=g.useContext(He),{matches:o}=g.useContext(Ue),a=o[o.length-1],l=a?a.params:{},u=a?a.pathname:"/",c=a?a.pathnameBase:"/",f=a&&a.route;{let E=f&&f.path||"";nl(u,!f||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let d=ft(),h;h=d;let m=h.pathname||"/",x=m;if(c!=="/"){let E=c.replace(/^\//,"").split("/");x="/"+m.replace(/^\//,"").split("/").slice(E.length).join("/")}let v=!s&&n&&n.matches&&n.matches.length>0?n.matches:ot(e,{pathname:x});return me(f||v!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),me(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),zf(v&&v.map(E=>Object.assign({},E,{params:Object.assign({},l,E.params),pathname:qe([c,i.encodeLocation?i.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?c:qe([c,i.encodeLocation?i.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),o,n,r)}function If(){let e=Gf(),t=mn(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:s},"ErrorBoundary")," or"," ",g.createElement("code",{style:s},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},t),n?g.createElement("pre",{style:i},n):null,o)}var Uf=g.createElement(If,null),$f=class extends g.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?g.createElement(Ue.Provider,{value:this.props.routeContext},g.createElement(Oi.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Hf({routeContext:e,match:t,children:n}){let r=g.useContext(At);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),g.createElement(Ue.Provider,{value:e},n)}function zf(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,s=n==null?void 0:n.errors;if(s!=null){let l=i.findIndex(u=>u.route.id&&(s==null?void 0:s[u.route.id])!==void 0);X(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),i=i.slice(0,Math.min(i.length,l+1))}let o=!1,a=-1;if(n)for(let l=0;l<i.length;l++){let u=i[l];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(a=l),u.route.id){let{loaderData:c,errors:f}=n,d=u.route.loader&&!c.hasOwnProperty(u.route.id)&&(!f||f[u.route.id]===void 0);if(u.route.lazy||d){o=!0,a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}return i.reduceRight((l,u,c)=>{let f,d=!1,h=null,m=null;n&&(f=s&&u.route.id?s[u.route.id]:void 0,h=u.route.errorElement||Uf,o&&(a<0&&c===0?(nl("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,m=null):a===c&&(d=!0,m=u.route.hydrateFallbackElement||null)));let x=t.concat(i.slice(0,c+1)),v=()=>{let w;return f?w=h:d?w=m:u.route.Component?w=g.createElement(u.route.Component,null):u.route.element?w=u.route.element:w=l,g.createElement(Hf,{match:u,routeContext:{outlet:l,matches:x,isDataRoute:n!=null},children:w})};return n&&(u.route.ErrorBoundary||u.route.errorElement||c===0)?g.createElement($f,{location:n.location,revalidation:n.revalidation,component:h,error:f,children:v(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):v()},null)}function Vi(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Wf(e){let t=g.useContext(At);return X(t,Vi(e)),t}function Kf(e){let t=g.useContext(Sn);return X(t,Vi(e)),t}function qf(e){let t=g.useContext(Ue);return X(t,Vi(e)),t}function Fi(e){let t=qf(e),n=t.matches[t.matches.length-1];return X(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Yf(){return Fi("useRouteId")}function Gf(){var r;let e=g.useContext(Oi),t=Kf("useRouteError"),n=Fi("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function Xf(){let{router:e}=Wf("useNavigate"),t=Fi("useNavigate"),n=g.useRef(!1);return el(()=>{n.current=!0}),g.useCallback(async(i,s={})=>{me(n.current,Qa),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...s}))},[e,t])}var io={};function nl(e,t,n){!t&&!io[e]&&(io[e]=!0,me(!1,n))}var so={};function oo(e,t){!e&&!so[t]&&(so[t]=!0,console.warn(t))}function Jf(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&me(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:g.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&me(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:g.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&me(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:g.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Zf=["HydrateFallback","hydrateFallbackElement"],Qf=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",t(n))}})}};function ed({router:e,flushSync:t}){let[n,r]=g.useState(e.state),[i,s]=g.useState(),[o,a]=g.useState({isTransitioning:!1}),[l,u]=g.useState(),[c,f]=g.useState(),[d,h]=g.useState(),m=g.useRef(new Map),x=g.useCallback((S,{deletedFetchers:M,flushSync:C,viewTransitionOpts:b})=>{S.fetchers.forEach((O,_)=>{O.data!==void 0&&m.current.set(_,O.data)}),M.forEach(O=>m.current.delete(O)),oo(C===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable.  Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let V=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(oo(b==null||V,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!b||!V){t&&C?t(()=>r(S)):g.startTransition(()=>r(S));return}if(t&&C){t(()=>{c&&(l&&l.resolve(),c.skipTransition()),a({isTransitioning:!0,flushSync:!0,currentLocation:b.currentLocation,nextLocation:b.nextLocation})});let O=e.window.document.startViewTransition(()=>{t(()=>r(S))});O.finished.finally(()=>{t(()=>{u(void 0),f(void 0),s(void 0),a({isTransitioning:!1})})}),t(()=>f(O));return}c?(l&&l.resolve(),c.skipTransition(),h({state:S,currentLocation:b.currentLocation,nextLocation:b.nextLocation})):(s(S),a({isTransitioning:!0,flushSync:!1,currentLocation:b.currentLocation,nextLocation:b.nextLocation}))},[e.window,t,c,l]);g.useLayoutEffect(()=>e.subscribe(x),[e,x]),g.useEffect(()=>{o.isTransitioning&&!o.flushSync&&u(new Qf)},[o]),g.useEffect(()=>{if(l&&i&&e.window){let S=i,M=l.promise,C=e.window.document.startViewTransition(async()=>{g.startTransition(()=>r(S)),await M});C.finished.finally(()=>{u(void 0),f(void 0),s(void 0),a({isTransitioning:!1})}),f(C)}},[i,l,e.window]),g.useEffect(()=>{l&&i&&n.location.key===i.location.key&&l.resolve()},[l,c,n.location,i]),g.useEffect(()=>{!o.isTransitioning&&d&&(s(d.state),a({isTransitioning:!0,flushSync:!1,currentLocation:d.currentLocation,nextLocation:d.nextLocation}),h(void 0))},[o.isTransitioning,d]);let v=g.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:S=>e.navigate(S),push:(S,M,C)=>e.navigate(S,{state:M,preventScrollReset:C==null?void 0:C.preventScrollReset}),replace:(S,M,C)=>e.navigate(S,{replace:!0,state:M,preventScrollReset:C==null?void 0:C.preventScrollReset})}),[e]),w=e.basename||"/",E=g.useMemo(()=>({router:e,navigator:v,static:!1,basename:w}),[e,v,w]);return g.createElement(g.Fragment,null,g.createElement(At.Provider,{value:E},g.createElement(Sn.Provider,{value:n},g.createElement(Za.Provider,{value:m.current},g.createElement(Li.Provider,{value:o},g.createElement(rd,{basename:w,location:n.location,navigationType:n.historyAction,navigator:v},g.createElement(td,{routes:e.routes,future:e.future,state:n})))))),null)}var td=g.memo(nd);function nd({routes:e,future:t,state:n}){return Bf(e,void 0,n,t)}function t0({to:e,replace:t,state:n,relative:r}){X(It(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=g.useContext(He);me(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=g.useContext(Ue),{pathname:o}=ft(),a=tl(),l=cr(e,ur(s),o,r==="path"),u=JSON.stringify(l);return g.useEffect(()=>{a(JSON.parse(u),{replace:t,state:n,relative:r})},[a,u,r,t,n]),null}function n0(e){return jf(e.context)}function rd({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:s=!1}){X(!It(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),a=g.useMemo(()=>({basename:o,navigator:i,static:s,future:{}}),[o,i,s]);typeof n=="string"&&(n=ct(n));let{pathname:l="/",search:u="",hash:c="",state:f=null,key:d="default"}=n,h=g.useMemo(()=>{let m=Ie(l,o);return m==null?null:{location:{pathname:m,search:u,hash:c,state:f,key:d},navigationType:r}},[o,l,u,c,f,d,r]);return me(h!=null,`<Router basename="${o}"> is not able to match the URL "${l}${u}${c}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:g.createElement(He.Provider,{value:a},g.createElement(fr.Provider,{children:t,value:h}))}var Hn="get",zn="application/x-www-form-urlencoded";function dr(e){return e!=null&&typeof e.tagName=="string"}function id(e){return dr(e)&&e.tagName.toLowerCase()==="button"}function sd(e){return dr(e)&&e.tagName.toLowerCase()==="form"}function od(e){return dr(e)&&e.tagName.toLowerCase()==="input"}function ad(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ld(e,t){return e.button===0&&(!t||t==="_self")&&!ad(e)}var Nn=null;function ud(){if(Nn===null)try{new FormData(document.createElement("form"),0),Nn=!1}catch{Nn=!0}return Nn}var cd=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Nr(e){return e!=null&&!cd.has(e)?(me(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${zn}"`),null):e}function fd(e,t){let n,r,i,s,o;if(sd(e)){let a=e.getAttribute("action");r=a?Ie(a,t):null,n=e.getAttribute("method")||Hn,i=Nr(e.getAttribute("enctype"))||zn,s=new FormData(e)}else if(id(e)||od(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(r=l?Ie(l,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||Hn,i=Nr(e.getAttribute("formenctype"))||Nr(a.getAttribute("enctype"))||zn,s=new FormData(a,e),!ud()){let{name:u,type:c,value:f}=e;if(c==="image"){let d=u?`${u}.`:"";s.append(`${d}x`,"0"),s.append(`${d}y`,"0")}else u&&s.append(u,f)}}else{if(dr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Hn,r=null,i=zn,o=e}return s&&i==="text/plain"&&(o=s,s=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:s,body:o}}function _i(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function dd(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function hd(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function md(e,t,n){let r=await Promise.all(e.map(async i=>{let s=t.routes[i.route.id];if(s){let o=await dd(s,n);return o.links?o.links():[]}return[]}));return vd(r.flat(1).filter(hd).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function ao(e,t,n,r,i,s){let o=(l,u)=>n[u]?l.route.id!==n[u].route.id:!0,a=(l,u)=>{var c;return n[u].pathname!==l.pathname||((c=n[u].route.path)==null?void 0:c.endsWith("*"))&&n[u].params["*"]!==l.params["*"]};return s==="assets"?t.filter((l,u)=>o(l,u)||a(l,u)):s==="data"?t.filter((l,u)=>{var f;let c=r.routes[l.route.id];if(!c||!c.hasLoader)return!1;if(o(l,u)||a(l,u))return!0;if(l.route.shouldRevalidate){let d=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof d=="boolean")return d}return!0}):[]}function pd(e,t,{includeHydrateFallback:n}={}){return yd(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let s=[i.module];return i.clientActionModule&&(s=s.concat(i.clientActionModule)),i.clientLoaderModule&&(s=s.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(s=s.concat(i.hydrateFallbackModule)),i.imports&&(s=s.concat(i.imports)),s}).flat(1))}function yd(e){return[...new Set(e)]}function gd(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function vd(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let s=JSON.stringify(gd(i));return n.has(s)||(n.add(s),r.push({key:s,link:i})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var wd=new Set([100,101,204,205]);function bd(e,t){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname="_root.data":t&&Ie(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function rl(){let e=g.useContext(At);return _i(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function xd(){let e=g.useContext(Sn);return _i(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ki=g.createContext(void 0);ki.displayName="FrameworkContext";function il(){let e=g.useContext(ki);return _i(e,"You must render this element inside a <HydratedRouter> element"),e}function Td(e,t){let n=g.useContext(ki),[r,i]=g.useState(!1),[s,o]=g.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:f}=t,d=g.useRef(null);g.useEffect(()=>{if(e==="render"&&o(!0),e==="viewport"){let x=w=>{w.forEach(E=>{o(E.isIntersecting)})},v=new IntersectionObserver(x,{threshold:.5});return d.current&&v.observe(d.current),()=>{v.disconnect()}}},[e]),g.useEffect(()=>{if(r){let x=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(x)}}},[r]);let h=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e!=="intent"?[s,d,{}]:[s,d,{onFocus:tn(a,h),onBlur:tn(l,m),onMouseEnter:tn(u,h),onMouseLeave:tn(c,m),onTouchStart:tn(f,h)}]:[!1,d,{}]}function tn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Sd({page:e,...t}){let{router:n}=rl(),r=g.useMemo(()=>ot(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?g.createElement(Rd,{page:e,matches:r,...t}):null}function Ed(e){let{manifest:t,routeModules:n}=il(),[r,i]=g.useState([]);return g.useEffect(()=>{let s=!1;return md(e,t,n).then(o=>{s||i(o)}),()=>{s=!0}},[e,t,n]),r}function Rd({page:e,matches:t,...n}){let r=ft(),{manifest:i,routeModules:s}=il(),{basename:o}=rl(),{loaderData:a,matches:l}=xd(),u=g.useMemo(()=>ao(e,t,l,i,r,"data"),[e,t,l,i,r]),c=g.useMemo(()=>ao(e,t,l,i,r,"assets"),[e,t,l,i,r]),f=g.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let m=new Set,x=!1;if(t.forEach(w=>{var S;let E=i.routes[w.route.id];!E||!E.hasLoader||(!u.some(M=>M.route.id===w.route.id)&&w.route.id in a&&((S=s[w.route.id])!=null&&S.shouldRevalidate)||E.hasClientLoader?x=!0:m.add(w.route.id))}),m.size===0)return[];let v=bd(e,o);return x&&m.size>0&&v.searchParams.set("_routes",t.filter(w=>m.has(w.route.id)).map(w=>w.route.id).join(",")),[v.pathname+v.search]},[o,a,r,i,u,t,e,s]),d=g.useMemo(()=>pd(c,i),[c,i]),h=Ed(c);return g.createElement(g.Fragment,null,f.map(m=>g.createElement("link",{key:m,rel:"prefetch",as:"fetch",href:m,...n})),d.map(m=>g.createElement("link",{key:m,rel:"modulepreload",href:m,...n})),h.map(({key:m,link:x})=>g.createElement("link",{key:m,...x})))}function Pd(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var sl=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{sl&&(window.__reactRouterVersion="7.6.0")}catch{}function r0(e,t){return pf({basename:t==null?void 0:t.basename,unstable_getContext:t==null?void 0:t.unstable_getContext,future:t==null?void 0:t.future,history:_c({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||Cd(),routes:e,mapRouteProperties:Jf,hydrationRouteProperties:Zf,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window}).initialize()}function Cd(){let e=window==null?void 0:window.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Ad(e.errors)}),e}function Ad(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new er(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let s=window[i.__subType];if(typeof s=="function")try{let o=new s(i.message);o.stack="",n[r]=o}catch{}}if(n[r]==null){let s=new Error(i.message);s.stack="",n[r]=s}}else n[r]=i;return n}var ol=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,al=g.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:f,...d},h){let{basename:m}=g.useContext(He),x=typeof u=="string"&&ol.test(u),v,w=!1;if(typeof u=="string"&&x&&(v=u,sl))try{let _=new URL(window.location.href),Z=u.startsWith("//")?new URL(_.protocol+u):new URL(u),ae=Ie(Z.pathname,m);Z.origin===_.origin&&ae!=null?u=ae+Z.search+Z.hash:w=!0}catch{me(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let E=_f(u,{relative:i}),[S,M,C]=Td(r,d),b=Od(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:i,viewTransition:f});function V(_){t&&t(_),_.defaultPrevented||b(_)}let O=g.createElement("a",{...d,...C,href:v||E,onClick:w||s?t:V,ref:Pd(h,M),target:l,"data-discover":!x&&n==="render"?"true":void 0});return S&&!x?g.createElement(g.Fragment,null,O,g.createElement(Sd,{page:E})):O});al.displayName="Link";var Dd=g.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:s,to:o,viewTransition:a,children:l,...u},c){let f=En(o,{relative:u.relative}),d=ft(),h=g.useContext(Sn),{navigator:m,basename:x}=g.useContext(He),v=h!=null&&Nd(f)&&a===!0,w=m.encodeLocation?m.encodeLocation(f).pathname:f.pathname,E=d.pathname,S=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(E=E.toLowerCase(),S=S?S.toLowerCase():null,w=w.toLowerCase()),S&&x&&(S=Ie(S,x)||S);const M=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let C=E===w||!i&&E.startsWith(w)&&E.charAt(M)==="/",b=S!=null&&(S===w||!i&&S.startsWith(w)&&S.charAt(w.length)==="/"),V={isActive:C,isPending:b,isTransitioning:v},O=C?t:void 0,_;typeof r=="function"?_=r(V):_=[r,C?"active":null,b?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let Z=typeof s=="function"?s(V):s;return g.createElement(al,{...u,"aria-current":O,className:_,ref:c,style:Z,to:o,viewTransition:a},typeof l=="function"?l(V):l)});Dd.displayName="NavLink";var Md=g.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:s,method:o=Hn,action:a,onSubmit:l,relative:u,preventScrollReset:c,viewTransition:f,...d},h)=>{let m=_d(),x=kd(a,{relative:u}),v=o.toLowerCase()==="get"?"get":"post",w=typeof a=="string"&&ol.test(a),E=S=>{if(l&&l(S),S.defaultPrevented)return;S.preventDefault();let M=S.nativeEvent.submitter,C=(M==null?void 0:M.getAttribute("formmethod"))||o;m(M||S.currentTarget,{fetcherKey:t,method:C,navigate:n,replace:i,state:s,relative:u,preventScrollReset:c,viewTransition:f})};return g.createElement("form",{ref:h,method:v,action:x,onSubmit:r?l:E,...d,"data-discover":!w&&e==="render"?"true":void 0})});Md.displayName="Form";function Ld(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function ll(e){let t=g.useContext(At);return X(t,Ld(e)),t}function Od(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:s,viewTransition:o}={}){let a=tl(),l=ft(),u=En(e,{relative:s});return g.useCallback(c=>{if(ld(c,t)){c.preventDefault();let f=n!==void 0?n:at(l)===at(u);a(e,{replace:f,state:r,preventScrollReset:i,relative:s,viewTransition:o})}},[l,a,u,n,r,t,e,i,s,o])}var Vd=0,Fd=()=>`__${String(++Vd)}__`;function _d(){let{router:e}=ll("useSubmit"),{basename:t}=g.useContext(He),n=Yf();return g.useCallback(async(r,i={})=>{let{action:s,method:o,encType:a,formData:l,body:u}=fd(r,t);if(i.navigate===!1){let c=i.fetcherKey||Fd();await e.fetch(c,n,i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||o,formEncType:i.encType||a,flushSync:i.flushSync})}else await e.navigate(i.action||s,{preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||o,formEncType:i.encType||a,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function kd(e,{relative:t}={}){let{basename:n}=g.useContext(He),r=g.useContext(Ue);X(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),s={...En(e||".",{relative:t})},o=ft();if(e==null){s.search=o.search;let a=new URLSearchParams(s.search),l=a.getAll("index");if(l.some(c=>c==="")){a.delete("index"),l.filter(f=>f).forEach(f=>a.append("index",f));let c=a.toString();s.search=c?`?${c}`:""}}return(!e||e===".")&&i.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:qe([n,s.pathname])),at(s)}function Nd(e,t={}){let n=g.useContext(Li);X(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=ll("useViewTransitionState"),i=En(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=Ie(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Ie(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Qn(i.pathname,o)!=null||Qn(i.pathname,s)!=null}[...wd];var ul=Lc();const i0=_a(ul);/**
 * react-router v7.6.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function s0(e){return g.createElement(ed,{flushSync:ul.flushSync,...e})}function cl(e,t){return function(){return e.apply(t,arguments)}}const{toString:jd}=Object.prototype,{getPrototypeOf:Ni}=Object,{iterator:hr,toStringTag:fl}=Symbol,mr=(e=>t=>{const n=jd.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ze=e=>(e=e.toLowerCase(),t=>mr(t)===e),pr=e=>t=>typeof t===e,{isArray:Ut}=Array,pn=pr("undefined");function Bd(e){return e!==null&&!pn(e)&&e.constructor!==null&&!pn(e.constructor)&&Ae(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const dl=ze("ArrayBuffer");function Id(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&dl(e.buffer),t}const Ud=pr("string"),Ae=pr("function"),hl=pr("number"),yr=e=>e!==null&&typeof e=="object",$d=e=>e===!0||e===!1,Wn=e=>{if(mr(e)!=="object")return!1;const t=Ni(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(fl in e)&&!(hr in e)},Hd=ze("Date"),zd=ze("File"),Wd=ze("Blob"),Kd=ze("FileList"),qd=e=>yr(e)&&Ae(e.pipe),Yd=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ae(e.append)&&((t=mr(e))==="formdata"||t==="object"&&Ae(e.toString)&&e.toString()==="[object FormData]"))},Gd=ze("URLSearchParams"),[Xd,Jd,Zd,Qd]=["ReadableStream","Request","Response","Headers"].map(ze),eh=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Rn(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Ut(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),o=s.length;let a;for(r=0;r<o;r++)a=s[r],t.call(null,e[a],a,e)}}function ml(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const xt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,pl=e=>!pn(e)&&e!==xt;function ri(){const{caseless:e}=pl(this)&&this||{},t={},n=(r,i)=>{const s=e&&ml(t,i)||i;Wn(t[s])&&Wn(r)?t[s]=ri(t[s],r):Wn(r)?t[s]=ri({},r):Ut(r)?t[s]=r.slice():t[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Rn(arguments[r],n);return t}const th=(e,t,n,{allOwnKeys:r}={})=>(Rn(t,(i,s)=>{n&&Ae(i)?e[s]=cl(i,n):e[s]=i},{allOwnKeys:r}),e),nh=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),rh=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ih=(e,t,n,r)=>{let i,s,o;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&Ni(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},sh=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},oh=e=>{if(!e)return null;if(Ut(e))return e;let t=e.length;if(!hl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ah=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ni(Uint8Array)),lh=(e,t)=>{const r=(e&&e[hr]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},uh=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ch=ze("HTMLFormElement"),fh=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),lo=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),dh=ze("RegExp"),yl=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Rn(n,(i,s)=>{let o;(o=t(i,s,e))!==!1&&(r[s]=o||i)}),Object.defineProperties(e,r)},hh=e=>{yl(e,(t,n)=>{if(Ae(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ae(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},mh=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return Ut(e)?r(e):r(String(e).split(t)),n},ph=()=>{},yh=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function gh(e){return!!(e&&Ae(e.append)&&e[fl]==="FormData"&&e[hr])}const vh=e=>{const t=new Array(10),n=(r,i)=>{if(yr(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const s=Ut(r)?[]:{};return Rn(r,(o,a)=>{const l=n(o,i+1);!pn(l)&&(s[a]=l)}),t[i]=void 0,s}}return r};return n(e,0)},wh=ze("AsyncFunction"),bh=e=>e&&(yr(e)||Ae(e))&&Ae(e.then)&&Ae(e.catch),gl=((e,t)=>e?setImmediate:t?((n,r)=>(xt.addEventListener("message",({source:i,data:s})=>{i===xt&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),xt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ae(xt.postMessage)),xh=typeof queueMicrotask<"u"?queueMicrotask.bind(xt):typeof process<"u"&&process.nextTick||gl,Th=e=>e!=null&&Ae(e[hr]),P={isArray:Ut,isArrayBuffer:dl,isBuffer:Bd,isFormData:Yd,isArrayBufferView:Id,isString:Ud,isNumber:hl,isBoolean:$d,isObject:yr,isPlainObject:Wn,isReadableStream:Xd,isRequest:Jd,isResponse:Zd,isHeaders:Qd,isUndefined:pn,isDate:Hd,isFile:zd,isBlob:Wd,isRegExp:dh,isFunction:Ae,isStream:qd,isURLSearchParams:Gd,isTypedArray:ah,isFileList:Kd,forEach:Rn,merge:ri,extend:th,trim:eh,stripBOM:nh,inherits:rh,toFlatObject:ih,kindOf:mr,kindOfTest:ze,endsWith:sh,toArray:oh,forEachEntry:lh,matchAll:uh,isHTMLForm:ch,hasOwnProperty:lo,hasOwnProp:lo,reduceDescriptors:yl,freezeMethods:hh,toObjectSet:mh,toCamelCase:fh,noop:ph,toFiniteNumber:yh,findKey:ml,global:xt,isContextDefined:pl,isSpecCompliantForm:gh,toJSONObject:vh,isAsyncFn:wh,isThenable:bh,setImmediate:gl,asap:xh,isIterable:Th};function K(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}P.inherits(K,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:P.toJSONObject(this.config),code:this.code,status:this.status}}});const vl=K.prototype,wl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{wl[e]={value:e}});Object.defineProperties(K,wl);Object.defineProperty(vl,"isAxiosError",{value:!0});K.from=(e,t,n,r,i,s)=>{const o=Object.create(vl);return P.toFlatObject(e,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),K.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const Sh=null;function ii(e){return P.isPlainObject(e)||P.isArray(e)}function bl(e){return P.endsWith(e,"[]")?e.slice(0,-2):e}function uo(e,t,n){return e?e.concat(t).map(function(i,s){return i=bl(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function Eh(e){return P.isArray(e)&&!e.some(ii)}const Rh=P.toFlatObject(P,{},null,function(t){return/^is[A-Z]/.test(t)});function gr(e,t,n){if(!P.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=P.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,v){return!P.isUndefined(v[x])});const r=n.metaTokens,i=n.visitor||c,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&P.isSpecCompliantForm(t);if(!P.isFunction(i))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(P.isDate(m))return m.toISOString();if(!l&&P.isBlob(m))throw new K("Blob is not supported. Use a Buffer instead.");return P.isArrayBuffer(m)||P.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,x,v){let w=m;if(m&&!v&&typeof m=="object"){if(P.endsWith(x,"{}"))x=r?x:x.slice(0,-2),m=JSON.stringify(m);else if(P.isArray(m)&&Eh(m)||(P.isFileList(m)||P.endsWith(x,"[]"))&&(w=P.toArray(m)))return x=bl(x),w.forEach(function(S,M){!(P.isUndefined(S)||S===null)&&t.append(o===!0?uo([x],M,s):o===null?x:x+"[]",u(S))}),!1}return ii(m)?!0:(t.append(uo(v,x,s),u(m)),!1)}const f=[],d=Object.assign(Rh,{defaultVisitor:c,convertValue:u,isVisitable:ii});function h(m,x){if(!P.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+x.join("."));f.push(m),P.forEach(m,function(w,E){(!(P.isUndefined(w)||w===null)&&i.call(t,w,P.isString(E)?E.trim():E,x,d))===!0&&h(w,x?x.concat(E):[E])}),f.pop()}}if(!P.isObject(e))throw new TypeError("data must be an object");return h(e),t}function co(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ji(e,t){this._pairs=[],e&&gr(e,this,t)}const xl=ji.prototype;xl.append=function(t,n){this._pairs.push([t,n])};xl.toString=function(t){const n=t?function(r){return t.call(this,r,co)}:co;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Ph(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Tl(e,t,n){if(!t)return e;const r=n&&n.encode||Ph;P.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(t,n):s=P.isURLSearchParams(t)?t.toString():new ji(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class fo{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){P.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Sl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ch=typeof URLSearchParams<"u"?URLSearchParams:ji,Ah=typeof FormData<"u"?FormData:null,Dh=typeof Blob<"u"?Blob:null,Mh={isBrowser:!0,classes:{URLSearchParams:Ch,FormData:Ah,Blob:Dh},protocols:["http","https","file","blob","url","data"]},Bi=typeof window<"u"&&typeof document<"u",si=typeof navigator=="object"&&navigator||void 0,Lh=Bi&&(!si||["ReactNative","NativeScript","NS"].indexOf(si.product)<0),Oh=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Vh=Bi&&window.location.href||"http://localhost",Fh=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Bi,hasStandardBrowserEnv:Lh,hasStandardBrowserWebWorkerEnv:Oh,navigator:si,origin:Vh},Symbol.toStringTag,{value:"Module"})),Se={...Fh,...Mh};function _h(e,t){return gr(e,new Se.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return Se.isNode&&P.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function kh(e){return P.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Nh(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],t[s]=e[s];return t}function El(e){function t(n,r,i,s){let o=n[s++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),l=s>=n.length;return o=!o&&P.isArray(i)?i.length:o,l?(P.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!P.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&P.isArray(i[o])&&(i[o]=Nh(i[o])),!a)}if(P.isFormData(e)&&P.isFunction(e.entries)){const n={};return P.forEachEntry(e,(r,i)=>{t(kh(r),i,n,0)}),n}return null}function jh(e,t,n){if(P.isString(e))try{return(t||JSON.parse)(e),P.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Pn={transitional:Sl,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=P.isObject(t);if(s&&P.isHTMLForm(t)&&(t=new FormData(t)),P.isFormData(t))return i?JSON.stringify(El(t)):t;if(P.isArrayBuffer(t)||P.isBuffer(t)||P.isStream(t)||P.isFile(t)||P.isBlob(t)||P.isReadableStream(t))return t;if(P.isArrayBufferView(t))return t.buffer;if(P.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return _h(t,this.formSerializer).toString();if((a=P.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return gr(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),jh(t)):t}],transformResponse:[function(t){const n=this.transitional||Pn.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(P.isResponse(t)||P.isReadableStream(t))return t;if(t&&P.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?K.from(a,K.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Se.classes.FormData,Blob:Se.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};P.forEach(["delete","get","head","post","put","patch"],e=>{Pn.headers[e]={}});const Bh=P.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ih=e=>{const t={};let n,r,i;return e&&e.split(`
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&Bh[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},ho=Symbol("internals");function nn(e){return e&&String(e).trim().toLowerCase()}function Kn(e){return e===!1||e==null?e:P.isArray(e)?e.map(Kn):String(e)}function Uh(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const $h=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function jr(e,t,n,r,i){if(P.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!P.isString(t)){if(P.isString(r))return t.indexOf(r)!==-1;if(P.isRegExp(r))return r.test(t)}}function Hh(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function zh(e,t){const n=P.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,o){return this[r].call(this,t,i,s,o)},configurable:!0})})}let De=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(a,l,u){const c=nn(l);if(!c)throw new Error("header name must be a non-empty string");const f=P.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||l]=Kn(a))}const o=(a,l)=>P.forEach(a,(u,c)=>s(u,c,l));if(P.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(P.isString(t)&&(t=t.trim())&&!$h(t))o(Ih(t),n);else if(P.isObject(t)&&P.isIterable(t)){let a={},l,u;for(const c of t){if(!P.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?P.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}o(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=nn(t),t){const r=P.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Uh(i);if(P.isFunction(n))return n.call(this,i,r);if(P.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=nn(t),t){const r=P.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||jr(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(o){if(o=nn(o),o){const a=P.findKey(r,o);a&&(!n||jr(r,r[a],a,n))&&(delete r[a],i=!0)}}return P.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||jr(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return P.forEach(this,(i,s)=>{const o=P.findKey(r,s);if(o){n[o]=Kn(i),delete n[s];return}const a=t?Hh(s):String(s).trim();a!==s&&delete n[s],n[a]=Kn(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return P.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&P.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[ho]=this[ho]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=nn(o);r[a]||(zh(i,o),r[a]=!0)}return P.isArray(t)?t.forEach(s):s(t),this}};De.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);P.reduceDescriptors(De.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});P.freezeMethods(De);function Br(e,t){const n=this||Pn,r=t||n,i=De.from(r.headers);let s=r.data;return P.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Rl(e){return!!(e&&e.__CANCEL__)}function $t(e,t,n){K.call(this,e??"canceled",K.ERR_CANCELED,t,n),this.name="CanceledError"}P.inherits($t,K,{__CANCEL__:!0});function Pl(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new K("Request failed with status code "+n.status,[K.ERR_BAD_REQUEST,K.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Wh(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Kh(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[s];o||(o=u),n[i]=l,r[i]=u;let f=s,d=0;for(;f!==i;)d+=n[f++],f=f%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const h=c&&u-c;return h?Math.round(d*1e3/h):void 0}}function qh(e,t){let n=0,r=1e3/t,i,s;const o=(u,c=Date.now())=>{n=c,i=null,s&&(clearTimeout(s),s=null),e.apply(null,u)};return[(...u)=>{const c=Date.now(),f=c-n;f>=r?o(u,c):(i=u,s||(s=setTimeout(()=>{s=null,o(i)},r-f)))},()=>i&&o(i)]}const nr=(e,t,n=3)=>{let r=0;const i=Kh(50,250);return qh(s=>{const o=s.loaded,a=s.lengthComputable?s.total:void 0,l=o-r,u=i(l),c=o<=a;r=o;const f={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-o)/u:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(f)},n)},mo=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},po=e=>(...t)=>P.asap(()=>e(...t)),Yh=Se.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Se.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Se.origin),Se.navigator&&/(msie|trident)/i.test(Se.navigator.userAgent)):()=>!0,Gh=Se.hasStandardBrowserEnv?{write(e,t,n,r,i,s){const o=[e+"="+encodeURIComponent(t)];P.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),P.isString(r)&&o.push("path="+r),P.isString(i)&&o.push("domain="+i),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Xh(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Jh(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Cl(e,t,n){let r=!Xh(t);return e&&(r||n==!1)?Jh(e,t):t}const yo=e=>e instanceof De?{...e}:e;function Ct(e,t){t=t||{};const n={};function r(u,c,f,d){return P.isPlainObject(u)&&P.isPlainObject(c)?P.merge.call({caseless:d},u,c):P.isPlainObject(c)?P.merge({},c):P.isArray(c)?c.slice():c}function i(u,c,f,d){if(P.isUndefined(c)){if(!P.isUndefined(u))return r(void 0,u,f,d)}else return r(u,c,f,d)}function s(u,c){if(!P.isUndefined(c))return r(void 0,c)}function o(u,c){if(P.isUndefined(c)){if(!P.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,f){if(f in t)return r(u,c);if(f in e)return r(void 0,u)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(u,c,f)=>i(yo(u),yo(c),f,!0)};return P.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=l[c]||i,d=f(e[c],t[c],c);P.isUndefined(d)&&f!==a||(n[c]=d)}),n}const Al=e=>{const t=Ct({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:a}=t;t.headers=o=De.from(o),t.url=Tl(Cl(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(P.isFormData(n)){if(Se.hasStandardBrowserEnv||Se.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[u,...c]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];o.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Se.hasStandardBrowserEnv&&(r&&P.isFunction(r)&&(r=r(t)),r||r!==!1&&Yh(t.url))){const u=i&&s&&Gh.read(s);u&&o.set(i,u)}return t},Zh=typeof XMLHttpRequest<"u",Qh=Zh&&function(e){return new Promise(function(n,r){const i=Al(e);let s=i.data;const o=De.from(i.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=i,c,f,d,h,m;function x(){h&&h(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function w(){if(!v)return;const S=De.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:S,config:e,request:v};Pl(function(V){n(V),x()},function(V){r(V),x()},C),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(w)},v.onabort=function(){v&&(r(new K("Request aborted",K.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new K("Network Error",K.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let M=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const C=i.transitional||Sl;i.timeoutErrorMessage&&(M=i.timeoutErrorMessage),r(new K(M,C.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,e,v)),v=null},s===void 0&&o.setContentType(null),"setRequestHeader"in v&&P.forEach(o.toJSON(),function(M,C){v.setRequestHeader(C,M)}),P.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),a&&a!=="json"&&(v.responseType=i.responseType),u&&([d,m]=nr(u,!0),v.addEventListener("progress",d)),l&&v.upload&&([f,h]=nr(l),v.upload.addEventListener("progress",f),v.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(c=S=>{v&&(r(!S||S.type?new $t(null,e,v):S),v.abort(),v=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const E=Wh(i.url);if(E&&Se.protocols.indexOf(E)===-1){r(new K("Unsupported protocol "+E+":",K.ERR_BAD_REQUEST,e));return}v.send(s||null)})},em=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const s=function(u){if(!i){i=!0,a();const c=u instanceof Error?u:this.reason;r.abort(c instanceof K?c:new $t(c instanceof Error?c.message:c))}};let o=t&&setTimeout(()=>{o=null,s(new K(`timeout ${t} of ms exceeded`,K.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>P.asap(a),l}},tm=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},nm=async function*(e,t){for await(const n of rm(e))yield*tm(n,t)},rm=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},go=(e,t,n,r)=>{const i=nm(e,t);let s=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){a(),l.close();return}let f=c.byteLength;if(n){let d=s+=f;n(d)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),i.return()}},{highWaterMark:2})},vr=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Dl=vr&&typeof ReadableStream=="function",im=vr&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Ml=(e,...t)=>{try{return!!e(...t)}catch{return!1}},sm=Dl&&Ml(()=>{let e=!1;const t=new Request(Se.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),vo=64*1024,oi=Dl&&Ml(()=>P.isReadableStream(new Response("").body)),rr={stream:oi&&(e=>e.body)};vr&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!rr[t]&&(rr[t]=P.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new K(`Response type '${t}' is not supported`,K.ERR_NOT_SUPPORT,r)})})})(new Response);const om=async e=>{if(e==null)return 0;if(P.isBlob(e))return e.size;if(P.isSpecCompliantForm(e))return(await new Request(Se.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(P.isArrayBufferView(e)||P.isArrayBuffer(e))return e.byteLength;if(P.isURLSearchParams(e)&&(e=e+""),P.isString(e))return(await im(e)).byteLength},am=async(e,t)=>{const n=P.toFiniteNumber(e.getContentLength());return n??om(t)},lm=vr&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:f="same-origin",fetchOptions:d}=Al(e);u=u?(u+"").toLowerCase():"text";let h=em([i,s&&s.toAbortSignal()],o),m;const x=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let v;try{if(l&&sm&&n!=="get"&&n!=="head"&&(v=await am(c,r))!==0){let C=new Request(t,{method:"POST",body:r,duplex:"half"}),b;if(P.isFormData(r)&&(b=C.headers.get("content-type"))&&c.setContentType(b),C.body){const[V,O]=mo(v,nr(po(l)));r=go(C.body,vo,V,O)}}P.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;m=new Request(t,{...d,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:w?f:void 0});let E=await fetch(m);const S=oi&&(u==="stream"||u==="response");if(oi&&(a||S&&x)){const C={};["status","statusText","headers"].forEach(_=>{C[_]=E[_]});const b=P.toFiniteNumber(E.headers.get("content-length")),[V,O]=a&&mo(b,nr(po(a),!0))||[];E=new Response(go(E.body,vo,V,()=>{O&&O(),x&&x()}),C)}u=u||"text";let M=await rr[P.findKey(rr,u)||"text"](E,e);return!S&&x&&x(),await new Promise((C,b)=>{Pl(C,b,{data:M,headers:De.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:m})})}catch(w){throw x&&x(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new K("Network Error",K.ERR_NETWORK,e,m),{cause:w.cause||w}):K.from(w,w&&w.code,e,m)}}),ai={http:Sh,xhr:Qh,fetch:lm};P.forEach(ai,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const wo=e=>`- ${e}`,um=e=>P.isFunction(e)||e===null||e===!1,Ll={getAdapter:e=>{e=P.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let s=0;s<t;s++){n=e[s];let o;if(r=n,!um(n)&&(r=ai[(o=String(n)).toLowerCase()],r===void 0))throw new K(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+s]=r}if(!r){const s=Object.entries(i).map(([a,l])=>`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?s.length>1?`since :
`+s.map(wo).join(`
`):" "+wo(s[0]):"as no adapter specified";throw new K("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:ai};function Ir(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $t(null,e)}function bo(e){return Ir(e),e.headers=De.from(e.headers),e.data=Br.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ll.getAdapter(e.adapter||Pn.adapter)(e).then(function(r){return Ir(e),r.data=Br.call(e,e.transformResponse,r),r.headers=De.from(r.headers),r},function(r){return Rl(r)||(Ir(e),r&&r.response&&(r.response.data=Br.call(e,e.transformResponse,r.response),r.response.headers=De.from(r.response.headers))),Promise.reject(r)})}const Ol="1.9.0",wr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{wr[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const xo={};wr.transitional=function(t,n,r){function i(s,o){return"[Axios v"+Ol+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(t===!1)throw new K(i(o," has been removed"+(n?" in "+n:"")),K.ERR_DEPRECATED);return n&&!xo[o]&&(xo[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,a):!0}};wr.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function cm(e,t,n){if(typeof e!="object")throw new K("options must be an object",K.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const a=e[s],l=a===void 0||o(a,s,e);if(l!==!0)throw new K("option "+s+" must be "+l,K.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new K("Unknown option "+s,K.ERR_BAD_OPTION)}}const qn={assertOptions:cm,validators:wr},Ke=qn.validators;let Et=class{constructor(t){this.defaults=t||{},this.interceptors={request:new fo,response:new fo}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ct(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&qn.assertOptions(r,{silentJSONParsing:Ke.transitional(Ke.boolean),forcedJSONParsing:Ke.transitional(Ke.boolean),clarifyTimeoutError:Ke.transitional(Ke.boolean)},!1),i!=null&&(P.isFunction(i)?n.paramsSerializer={serialize:i}:qn.assertOptions(i,{encode:Ke.function,serialize:Ke.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),qn.assertOptions(n,{baseUrl:Ke.spelling("baseURL"),withXsrfToken:Ke.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&P.merge(s.common,s[n.method]);s&&P.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=De.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(l=l&&x.synchronous,a.unshift(x.fulfilled,x.rejected))});const u=[];this.interceptors.response.forEach(function(x){u.push(x.fulfilled,x.rejected)});let c,f=0,d;if(!l){const m=[bo.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,u),d=m.length,c=Promise.resolve(n);f<d;)c=c.then(m[f++],m[f++]);return c}d=a.length;let h=n;for(f=0;f<d;){const m=a[f++],x=a[f++];try{h=m(h)}catch(v){x.call(this,v);break}}try{c=bo.call(this,h)}catch(m){return Promise.reject(m)}for(f=0,d=u.length;f<d;)c=c.then(u[f++],u[f++]);return c}getUri(t){t=Ct(this.defaults,t);const n=Cl(t.baseURL,t.url,t.allowAbsoluteUrls);return Tl(n,t.params,t.paramsSerializer)}};P.forEach(["delete","get","head","options"],function(t){Et.prototype[t]=function(n,r){return this.request(Ct(r||{},{method:t,url:n,data:(r||{}).data}))}});P.forEach(["post","put","patch"],function(t){function n(r){return function(s,o,a){return this.request(Ct(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}Et.prototype[t]=n(),Et.prototype[t+"Form"]=n(!0)});let fm=class Vl{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new $t(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Vl(function(i){t=i}),cancel:t}}};function dm(e){return function(n){return e.apply(null,n)}}function hm(e){return P.isObject(e)&&e.isAxiosError===!0}const li={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(li).forEach(([e,t])=>{li[t]=e});function Fl(e){const t=new Et(e),n=cl(Et.prototype.request,t);return P.extend(n,Et.prototype,t,{allOwnKeys:!0}),P.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Fl(Ct(e,i))},n}const ye=Fl(Pn);ye.Axios=Et;ye.CanceledError=$t;ye.CancelToken=fm;ye.isCancel=Rl;ye.VERSION=Ol;ye.toFormData=gr;ye.AxiosError=K;ye.Cancel=ye.CanceledError;ye.all=function(t){return Promise.all(t)};ye.spread=dm;ye.isAxiosError=hm;ye.mergeConfig=Ct;ye.AxiosHeaders=De;ye.formToJSON=e=>El(P.isHTMLForm(e)?new FormData(e):e);ye.getAdapter=Ll.getAdapter;ye.HttpStatusCode=li;ye.default=ye;const{Axios:l0,AxiosError:u0,CanceledError:c0,isCancel:f0,CancelToken:d0,VERSION:h0,all:m0,Cancel:p0,isAxiosError:y0,spread:g0,toFormData:v0,AxiosHeaders:w0,HttpStatusCode:b0,formToJSON:x0,getAdapter:T0,mergeConfig:S0}=ye,Ii=g.createContext({});function Ui(e){const t=g.useRef(null);return t.current===null&&(t.current=e()),t.current}const $i=typeof window<"u",_l=$i?g.useLayoutEffect:g.useEffect,br=g.createContext(null);function Hi(e,t){e.indexOf(t)===-1&&e.push(t)}function zi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Qe=(e,t,n)=>n>t?t:n<e?e:n;let Wi=()=>{};const et={},kl=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Nl(e){return typeof e=="object"&&e!==null}const jl=e=>/^0[^.\s]+$/u.test(e);function Ki(e){let t;return()=>(t===void 0&&(t=e()),t)}const Be=e=>e,mm=(e,t)=>n=>t(e(n)),Cn=(...e)=>e.reduce(mm),yn=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class qi{constructor(){this.subscriptions=[]}add(t){return Hi(this.subscriptions,t),()=>zi(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ye=e=>e*1e3,Ge=e=>e/1e3;function Bl(e,t){return t?e*(1e3/t):0}const Il=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,pm=1e-7,ym=12;function gm(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=Il(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>pm&&++a<ym);return o}function An(e,t,n,r){if(e===t&&n===r)return Be;const i=s=>gm(s,0,1,e,n);return s=>s===0||s===1?s:Il(i(s),t,r)}const Ul=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,$l=e=>t=>1-e(1-t),Hl=An(.33,1.53,.69,.99),Yi=$l(Hl),zl=Ul(Yi),Wl=e=>(e*=2)<1?.5*Yi(e):.5*(2-Math.pow(2,-10*(e-1))),Gi=e=>1-Math.sin(Math.acos(e)),Kl=$l(Gi),ql=Ul(Gi),vm=An(.42,0,1,1),wm=An(0,0,.58,1),Yl=An(.42,0,.58,1),bm=e=>Array.isArray(e)&&typeof e[0]!="number",Gl=e=>Array.isArray(e)&&typeof e[0]=="number",xm={linear:Be,easeIn:vm,easeInOut:Yl,easeOut:wm,circIn:Gi,circInOut:ql,circOut:Kl,backIn:Yi,backInOut:zl,backOut:Hl,anticipate:Wl},Tm=e=>typeof e=="string",To=e=>{if(Gl(e)){Wi(e.length===4);const[t,n,r,i]=e;return An(t,n,r,i)}else if(Tm(e))return xm[e];return e},jn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],So={value:null};function Sm(e,t){let n=new Set,r=new Set,i=!1,s=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(f){o.has(f)&&(c.schedule(f),e()),l++,f(a)}const c={schedule:(f,d=!1,h=!1)=>{const x=h&&i?n:r;return d&&o.add(f),x.has(f)||x.add(f),f},cancel:f=>{r.delete(f),o.delete(f)},process:f=>{if(a=f,i){s=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),t&&So.value&&So.value.frameloop[t].push(l),l=0,n.clear(),i=!1,s&&(s=!1,c.process(f))}};return c}const Em=40;function Xl(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=jn.reduce((S,M)=>(S[M]=Sm(s,t?M:void 0),S),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:f,preRender:d,render:h,postRender:m}=o,x=()=>{const S=et.useManualTiming?i.timestamp:performance.now();n=!1,et.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(S-i.timestamp,Em),1)),i.timestamp=S,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),f.process(i),d.process(i),h.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(x))},v=()=>{n=!0,r=!0,i.isProcessing||e(x)};return{schedule:jn.reduce((S,M)=>{const C=o[M];return S[M]=(b,V=!1,O=!1)=>(n||v(),C.schedule(b,V,O)),S},{}),cancel:S=>{for(let M=0;M<jn.length;M++)o[jn[M]].cancel(S)},state:i,steps:o}}const{schedule:ue,cancel:lt,state:we,steps:Ur}=Xl(typeof requestAnimationFrame<"u"?requestAnimationFrame:Be,!0);let Yn;function Rm(){Yn=void 0}const Ce={now:()=>(Yn===void 0&&Ce.set(we.isProcessing||et.useManualTiming?we.timestamp:performance.now()),Yn),set:e=>{Yn=e,queueMicrotask(Rm)}},Jl=e=>t=>typeof t=="string"&&t.startsWith(e),Xi=Jl("--"),Pm=Jl("var(--"),Ji=e=>Pm(e)?Cm.test(e.split("/*")[0].trim()):!1,Cm=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ht={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},gn={...Ht,transform:e=>Qe(0,1,e)},Bn={...Ht,default:1},ln=e=>Math.round(e*1e5)/1e5,Zi=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Am(e){return e==null}const Dm=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Qi=(e,t)=>n=>!!(typeof n=="string"&&Dm.test(n)&&n.startsWith(e)||t&&!Am(n)&&Object.prototype.hasOwnProperty.call(n,t)),Zl=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,s,o,a]=r.match(Zi);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Mm=e=>Qe(0,255,e),$r={...Ht,transform:e=>Math.round(Mm(e))},Tt={test:Qi("rgb","red"),parse:Zl("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+$r.transform(e)+", "+$r.transform(t)+", "+$r.transform(n)+", "+ln(gn.transform(r))+")"};function Lm(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const ui={test:Qi("#"),parse:Lm,transform:Tt.transform},Dn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),st=Dn("deg"),Xe=Dn("%"),$=Dn("px"),Om=Dn("vh"),Vm=Dn("vw"),Eo={...Xe,parse:e=>Xe.parse(e)/100,transform:e=>Xe.transform(e*100)},Ot={test:Qi("hsl","hue"),parse:Zl("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Xe.transform(ln(t))+", "+Xe.transform(ln(n))+", "+ln(gn.transform(r))+")"},Te={test:e=>Tt.test(e)||ui.test(e)||Ot.test(e),parse:e=>Tt.test(e)?Tt.parse(e):Ot.test(e)?Ot.parse(e):ui.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Tt.transform(e):Ot.transform(e)},Fm=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function _m(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Zi))==null?void 0:t.length)||0)+(((n=e.match(Fm))==null?void 0:n.length)||0)>0}const Ql="number",eu="color",km="var",Nm="var(",Ro="${}",jm=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function vn(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(jm,l=>(Te.test(l)?(r.color.push(s),i.push(eu),n.push(Te.parse(l))):l.startsWith(Nm)?(r.var.push(s),i.push(km),n.push(l)):(r.number.push(s),i.push(Ql),n.push(parseFloat(l))),++s,Ro)).split(Ro);return{values:n,split:a,indexes:r,types:i}}function tu(e){return vn(e).values}function nu(e){const{split:t,types:n}=vn(e),r=t.length;return i=>{let s="";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===Ql?s+=ln(i[o]):a===eu?s+=Te.transform(i[o]):s+=i[o]}return s}}const Bm=e=>typeof e=="number"?0:e;function Im(e){const t=tu(e);return nu(e)(t.map(Bm))}const ut={test:_m,parse:tu,createTransformer:nu,getAnimatableNone:Im};function Hr(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Um({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Hr(l,a,e+1/3),s=Hr(l,a,e),o=Hr(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function ir(e,t){return n=>n>0?t:e}const le=(e,t,n)=>e+(t-e)*n,zr=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},$m=[ui,Tt,Ot],Hm=e=>$m.find(t=>t.test(e));function Po(e){const t=Hm(e);if(!t)return!1;let n=t.parse(e);return t===Ot&&(n=Um(n)),n}const Co=(e,t)=>{const n=Po(e),r=Po(t);if(!n||!r)return ir(e,t);const i={...n};return s=>(i.red=zr(n.red,r.red,s),i.green=zr(n.green,r.green,s),i.blue=zr(n.blue,r.blue,s),i.alpha=le(n.alpha,r.alpha,s),Tt.transform(i))},ci=new Set(["none","hidden"]);function zm(e,t){return ci.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Wm(e,t){return n=>le(e,t,n)}function es(e){return typeof e=="number"?Wm:typeof e=="string"?Ji(e)?ir:Te.test(e)?Co:Ym:Array.isArray(e)?ru:typeof e=="object"?Te.test(e)?Co:Km:ir}function ru(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>es(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function Km(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=es(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function qm(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],o=e.indexes[s][r[s]],a=e.values[o]??0;n[i]=a,r[s]++}return n}const Ym=(e,t)=>{const n=ut.createTransformer(t),r=vn(e),i=vn(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?ci.has(e)&&!i.values.length||ci.has(t)&&!r.values.length?zm(e,t):Cn(ru(qm(r,i),i.values),n):ir(e,t)};function iu(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?le(e,t,n):es(e)(e,t)}const Gm=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ue.update(t,n),stop:()=>lt(t),now:()=>we.isProcessing?we.timestamp:Ce.now()}},su=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let s=0;s<i;s++)r+=e(s/(i-1))+", ";return`linear(${r.substring(0,r.length-2)})`},sr=2e4;function ts(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<sr;)t+=n,r=e.next(t);return t>=sr?1/0:t}function Xm(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(ts(r),sr);return{type:"keyframes",ease:s=>r.next(i*s).value/t,duration:Ge(i)}}const Jm=5;function ou(e,t,n){const r=Math.max(t-Jm,0);return Bl(n-e(r),t-r)}const fe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ao=.001;function Zm({duration:e=fe.duration,bounce:t=fe.bounce,velocity:n=fe.velocity,mass:r=fe.mass}){let i,s,o=1-t;o=Qe(fe.minDamping,fe.maxDamping,o),e=Qe(fe.minDuration,fe.maxDuration,Ge(e)),o<1?(i=u=>{const c=u*o,f=c*e,d=c-n,h=fi(u,o),m=Math.exp(-f);return Ao-d/h*m},s=u=>{const f=u*o*e,d=f*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,m=Math.exp(-f),x=fi(Math.pow(u,2),o);return(-i(u)+Ao>0?-1:1)*((d-h)*m)/x}):(i=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-.001+c*f},s=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=ep(i,s,a);if(e=Ye(e),isNaN(l))return{stiffness:fe.stiffness,damping:fe.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const Qm=12;function ep(e,t,n){let r=n;for(let i=1;i<Qm;i++)r=r-e(r)/t(r);return r}function fi(e,t){return e*Math.sqrt(1-t*t)}const tp=["duration","bounce"],np=["stiffness","damping","mass"];function Do(e,t){return t.some(n=>e[n]!==void 0)}function rp(e){let t={velocity:fe.velocity,stiffness:fe.stiffness,damping:fe.damping,mass:fe.mass,isResolvedFromDuration:!1,...e};if(!Do(e,np)&&Do(e,tp))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,s=2*Qe(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:fe.mass,stiffness:i,damping:s}}else{const n=Zm(e);t={...t,...n,mass:fe.mass},t.isResolvedFromDuration=!0}return t}function or(e=fe.visualDuration,t=fe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const s=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:u,mass:c,duration:f,velocity:d,isResolvedFromDuration:h}=rp({...n,velocity:-Ge(n.velocity||0)}),m=d||0,x=u/(2*Math.sqrt(l*c)),v=o-s,w=Ge(Math.sqrt(l/c)),E=Math.abs(v)<5;r||(r=E?fe.restSpeed.granular:fe.restSpeed.default),i||(i=E?fe.restDelta.granular:fe.restDelta.default);let S;if(x<1){const C=fi(w,x);S=b=>{const V=Math.exp(-x*w*b);return o-V*((m+x*w*v)/C*Math.sin(C*b)+v*Math.cos(C*b))}}else if(x===1)S=C=>o-Math.exp(-w*C)*(v+(m+w*v)*C);else{const C=w*Math.sqrt(x*x-1);S=b=>{const V=Math.exp(-x*w*b),O=Math.min(C*b,300);return o-V*((m+x*w*v)*Math.sinh(O)+C*v*Math.cosh(O))/C}}const M={calculatedDuration:h&&f||null,next:C=>{const b=S(C);if(h)a.done=C>=f;else{let V=C===0?m:0;x<1&&(V=C===0?Ye(m):ou(S,C,b));const O=Math.abs(V)<=r,_=Math.abs(o-b)<=i;a.done=O&&_}return a.value=a.done?o:b,a},toString:()=>{const C=Math.min(ts(M),sr),b=su(V=>M.next(C*V).value,C,30);return C+"ms "+b},toTransition:()=>{}};return M}or.applyToOptions=e=>{const t=Xm(e,100,or);return e.ease=t.ease,e.duration=Ye(t.duration),e.type="keyframes",e};function di({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],d={done:!1,value:f},h=O=>a!==void 0&&O<a||l!==void 0&&O>l,m=O=>a===void 0?l:l===void 0||Math.abs(a-O)<Math.abs(l-O)?a:l;let x=n*t;const v=f+x,w=o===void 0?v:o(v);w!==v&&(x=w-f);const E=O=>-x*Math.exp(-O/r),S=O=>w+E(O),M=O=>{const _=E(O),Z=S(O);d.done=Math.abs(_)<=u,d.value=d.done?w:Z};let C,b;const V=O=>{h(d.value)&&(C=O,b=or({keyframes:[d.value,m(d.value)],velocity:ou(S,O,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:c}))};return V(0),{calculatedDuration:null,next:O=>{let _=!1;return!b&&C===void 0&&(_=!0,M(O),V(O)),C!==void 0&&O>=C?b.next(O-C):(!_&&M(O),d)}}}function ip(e,t,n){const r=[],i=n||et.mix||iu,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Be:t;a=Cn(l,a)}r.push(a)}return r}function sp(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Wi(s===t.length),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=ip(t,r,i),l=a.length,u=c=>{if(o&&c<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(c<e[f+1]);f++);const d=yn(e[f],e[f+1],c);return a[f](d)};return n?c=>u(Qe(e[0],e[s-1],c)):u}function op(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=yn(0,t,r);e.push(le(n,1,i))}}function ap(e){const t=[0];return op(t,e.length-1),t}function lp(e,t){return e.map(n=>n*t)}function up(e,t){return e.map(()=>t||Yl).splice(0,e.length-1)}function un({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=bm(r)?r.map(To):To(r),s={done:!1,value:t[0]},o=lp(n&&n.length===t.length?n:ap(t),e),a=sp(o,t,{ease:Array.isArray(i)?i:up(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const cp=e=>e!==null;function ns(e,{repeat:t,repeatType:n="loop"},r,i=1){const s=e.filter(cp),a=i<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const fp={decay:di,inertia:di,tween:un,keyframes:un,spring:or};function au(e){typeof e.type=="string"&&(e.type=fp[e.type])}class rs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const dp=e=>e/100;class is extends rs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=(n=!0)=>{var r,i;if(n){const{motionValue:s}=this.options;s&&s.updatedAt!==Ce.now()&&this.tick(Ce.now())}this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;au(t);const{type:n=un,repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=t;let{keyframes:a}=t;const l=n||un;l!==un&&typeof a[0]!="number"&&(this.mixKeyframes=Cn(dp,iu(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=ts(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:c,repeat:f,repeatType:d,repeatDelay:h,type:m,onUpdate:x,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-u*(this.playbackSpeed>=0?1:-1),E=this.playbackSpeed>=0?w<0:w>i;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let S=this.currentTime,M=r;if(f){const O=Math.min(this.currentTime,i)/a;let _=Math.floor(O),Z=O%1;!Z&&O>=1&&(Z=1),Z===1&&_--,_=Math.min(_,f+1),!!(_%2)&&(d==="reverse"?(Z=1-Z,h&&(Z-=h/a)):d==="mirror"&&(M=o)),S=Qe(0,1,Z)*a}const C=E?{done:!1,value:c[0]}:M.next(S);s&&(C.value=s(C.value));let{done:b}=C;!E&&l!==null&&(b=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return V&&m!==di&&(C.value=ns(c,this.options,v,this.speed)),x&&x(C.value),V&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return Ge(this.calculatedDuration)}get time(){return Ge(this.currentTime)}set time(t){var n;t=Ye(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ce.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Ge(this.currentTime))}play(){var i,s;if(this.isStopped)return;const{driver:t=Gm,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(s=(i=this.options).onPlay)==null||s.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ce.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function hp(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const St=e=>e*180/Math.PI,hi=e=>{const t=St(Math.atan2(e[1],e[0]));return mi(t)},mp={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:hi,rotateZ:hi,skewX:e=>St(Math.atan(e[1])),skewY:e=>St(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},mi=e=>(e=e%360,e<0&&(e+=360),e),Mo=hi,Lo=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Oo=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),pp={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Lo,scaleY:Oo,scale:e=>(Lo(e)+Oo(e))/2,rotateX:e=>mi(St(Math.atan2(e[6],e[5]))),rotateY:e=>mi(St(Math.atan2(-e[2],e[0]))),rotateZ:Mo,rotate:Mo,skewX:e=>St(Math.atan(e[4])),skewY:e=>St(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function pi(e){return e.includes("scale")?1:0}function yi(e,t){if(!e||e==="none")return pi(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=pp,i=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=mp,i=a}if(!i)return pi(t);const s=r[t],o=i[1].split(",").map(gp);return typeof s=="function"?s(o):o[s]}const yp=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return yi(n,t)};function gp(e){return parseFloat(e.trim())}const zt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Wt=new Set(zt),Vo=e=>e===Ht||e===$,vp=new Set(["x","y","z"]),wp=zt.filter(e=>!vp.has(e));function bp(e){const t=[];return wp.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Rt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>yi(t,"x"),y:(e,{transform:t})=>yi(t,"y")};Rt.translateX=Rt.x;Rt.translateY=Rt.y;const Pt=new Set;let gi=!1,vi=!1,wi=!1;function lu(){if(vi){const e=Array.from(Pt).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=bp(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))==null||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}vi=!1,gi=!1,Pt.forEach(e=>e.complete(wi)),Pt.clear()}function uu(){Pt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(vi=!0)})}function xp(){wi=!0,uu(),lu(),wi=!1}class ss{constructor(t,n,r,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Pt.add(this),gi||(gi=!0,ue.read(uu),ue.resolveKeyframes(lu))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const s=i==null?void 0:i.get(),o=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const a=r.readValue(n,o);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=o),i&&s===void 0&&i.set(t[0])}hp(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Pt.delete(this)}cancel(){this.state==="scheduled"&&(Pt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Tp=e=>e.startsWith("--");function Sp(e,t,n){Tp(t)?e.style.setProperty(t,n):e.style[t]=n}const Ep=Ki(()=>window.ScrollTimeline!==void 0),Rp={};function Pp(e,t){const n=Ki(e);return()=>Rp[t]??n()}const cu=Pp(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),an=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Fo={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:an([0,.65,.55,1]),circOut:an([.55,0,1,.45]),backIn:an([.31,.01,.66,-.59]),backOut:an([.33,1.53,.69,.99])};function fu(e,t){if(e)return typeof e=="function"?cu()?su(e,t):"ease-out":Gl(e)?an(e):Array.isArray(e)?e.map(n=>fu(n,t)||Fo.easeOut):Fo[e]}function Cp(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const f=fu(a,i);Array.isArray(f)&&(c.easing=f);const d={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"};return u&&(d.pseudoElement=u),e.animate(c,d)}function du(e){return typeof e=="function"&&"applyToOptions"in e}function Ap({type:e,...t}){return du(e)&&cu()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Dp extends rs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=o,this.options=t,Wi(typeof t.type!="string");const u=Ap(t);this.animation=Cp(n,r,i,u,s),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const c=ns(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):Sp(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Ge(Number(t))}get time(){return Ge(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ye(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Ep()?(this.animation.timeline=t,Be):n(this)}}const hu={anticipate:Wl,backInOut:zl,circInOut:ql};function Mp(e){return e in hu}function Lp(e){typeof e.ease=="string"&&Mp(e.ease)&&(e.ease=hu[e.ease])}const _o=10;class Op extends Dp{constructor(t){Lp(t),au(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:s,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new is({...o,autoplay:!1}),l=Ye(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-_o).value,a.sample(l).value,_o),a.stop()}}const ko=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ut.test(e)||e==="0")&&!e.startsWith("url("));function Vp(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Fp(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],o=ko(i,t),a=ko(s,t);return!o||!a?!1:Vp(e)||(n==="spring"||du(n))&&r}function os(e){return Nl(e)&&"offsetHeight"in e}const _p=new Set(["opacity","clipPath","filter","transform"]),kp=Ki(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Np(e){var u;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:s,type:o}=e;if(!os((u=t==null?void 0:t.owner)==null?void 0:u.current))return!1;const{onUpdate:a,transformTemplate:l}=t.owner.getProps();return kp()&&n&&_p.has(n)&&(n!=="transform"||!l)&&!a&&!r&&i!=="mirror"&&s!==0&&o!=="inertia"}const jp=40;class Bp extends rs{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...f}){var m;super(),this.stop=()=>{var x,v;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=Ce.now();const d={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,name:l,motionValue:u,element:c,...f},h=(c==null?void 0:c.KeyframeResolver)||ss;this.keyframeResolver=new h(a,(x,v,w)=>this.onKeyframesResolved(x,v,d,!w),l,u,c),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:s,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=Ce.now(),Fp(t,s,o,a)||((et.instantAnimations||!l)&&(c==null||c(ns(t,r,n))),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>jp?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},h=!u&&Np(d)?new Op({...d,element:d.motionValue.owner.current}):new is(d);h.finished.then(()=>this.notifyFinished()).catch(Be),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),xp()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const Ip=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Up(e){const t=Ip.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function mu(e,t,n=1){const[r,i]=Up(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return kl(o)?parseFloat(o):o}return Ji(i)?mu(i,t,n+1):i}function as(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const pu=new Set(["width","height","top","left","right","bottom",...zt]),$p={test:e=>e==="auto",parse:e=>e},yu=e=>t=>t.test(e),gu=[Ht,$,Xe,st,Vm,Om,$p],No=e=>gu.find(yu(e));function Hp(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||jl(e):!0}const zp=new Set(["brightness","contrast","saturate","opacity"]);function Wp(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Zi)||[];if(!r)return e;const i=n.replace(r,"");let s=zp.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+i+")"}const Kp=/\b([a-z-]*)\(.*?\)/gu,bi={...ut,getAnimatableNone:e=>{const t=e.match(Kp);return t?t.map(Wp).join(" "):e}},jo={...Ht,transform:Math.round},qp={rotate:st,rotateX:st,rotateY:st,rotateZ:st,scale:Bn,scaleX:Bn,scaleY:Bn,scaleZ:Bn,skew:st,skewX:st,skewY:st,distance:$,translateX:$,translateY:$,translateZ:$,x:$,y:$,z:$,perspective:$,transformPerspective:$,opacity:gn,originX:Eo,originY:Eo,originZ:$},ls={borderWidth:$,borderTopWidth:$,borderRightWidth:$,borderBottomWidth:$,borderLeftWidth:$,borderRadius:$,radius:$,borderTopLeftRadius:$,borderTopRightRadius:$,borderBottomRightRadius:$,borderBottomLeftRadius:$,width:$,maxWidth:$,height:$,maxHeight:$,top:$,right:$,bottom:$,left:$,padding:$,paddingTop:$,paddingRight:$,paddingBottom:$,paddingLeft:$,margin:$,marginTop:$,marginRight:$,marginBottom:$,marginLeft:$,backgroundPositionX:$,backgroundPositionY:$,...qp,zIndex:jo,fillOpacity:gn,strokeOpacity:gn,numOctaves:jo},Yp={...ls,color:Te,backgroundColor:Te,outlineColor:Te,fill:Te,stroke:Te,borderColor:Te,borderTopColor:Te,borderRightColor:Te,borderBottomColor:Te,borderLeftColor:Te,filter:bi,WebkitFilter:bi},vu=e=>Yp[e];function wu(e,t){let n=vu(e);return n!==bi&&(n=ut),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Gp=new Set(["auto","none","0"]);function Xp(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s=="string"&&!Gp.has(s)&&vn(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=wu(n,i)}class Jp extends ss{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),Ji(u))){const c=mu(u,n.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!pu.has(r)||t.length!==2)return;const[i,s]=t,o=No(i),a=No(s);if(o!==a)if(Vo(o)&&Vo(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else Rt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||Hp(t[i]))&&r.push(i);r.length&&Xp(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Rt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const s=r.length-1,o=r[s];r[s]=Rt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function Zp(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=(n==null?void 0:n[e])??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const Bo=30,Qp=e=>!isNaN(parseFloat(e));class ey{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{var o,a;const s=Ce.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty();i&&((a=this.events.renderRequest)==null||a.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ce.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Qp(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new qi);const r=this.events[t].add(n);return t==="change"?()=>{r(),ue.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ce.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Bo)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Bo);return Bl(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function jt(e,t){return new ey(e,t)}const bu=(e,t)=>t&&typeof e=="number"?t.transform(e):e,{schedule:us}=Xl(queueMicrotask,!1),$e={x:!1,y:!1};function xu(){return $e.x||$e.y}function ty(e){return e==="x"||e==="y"?$e[e]?null:($e[e]=!0,()=>{$e[e]=!1}):$e.x||$e.y?null:($e.x=$e.y=!0,()=>{$e.x=$e.y=!1})}function Tu(e,t){const n=Zp(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Io(e){return!(e.pointerType==="touch"||xu())}function ny(e,t,n={}){const[r,i,s]=Tu(e,n),o=a=>{if(!Io(a))return;const{target:l}=a,u=t(l,a);if(typeof u!="function"||!l)return;const c=f=>{Io(f)&&(u(f),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return r.forEach(a=>{a.addEventListener("pointerenter",o,i)}),s}const Su=(e,t)=>t?e===t?!0:Su(e,t.parentElement):!1,cs=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,ry=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function iy(e){return ry.has(e.tagName)||e.tabIndex!==-1}const Gn=new WeakSet;function Uo(e){return t=>{t.key==="Enter"&&e(t)}}function Wr(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const sy=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Uo(()=>{if(Gn.has(n))return;Wr(n,"down");const i=Uo(()=>{Wr(n,"up")}),s=()=>Wr(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function $o(e){return cs(e)&&!xu()}function oy(e,t,n={}){const[r,i,s]=Tu(e,n),o=a=>{const l=a.currentTarget;if(!$o(a))return;Gn.add(l);const u=t(l,a),c=(h,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",d),Gn.has(l)&&Gn.delete(l),$o(h)&&typeof u=="function"&&u(h,{success:m})},f=h=>{c(h,l===window||l===document||n.useGlobalTarget||Su(l,h.target))},d=h=>{c(h,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",d,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),os(a)&&(a.addEventListener("focus",u=>sy(u,i)),!iy(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function Eu(e){return Nl(e)&&"ownerSVGElement"in e}function ay(e){return Eu(e)&&e.tagName==="svg"}const Ee=e=>!!(e&&e.getVelocity),ly=[...gu,Te,ut],uy=e=>ly.find(yu(e)),fs=g.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class cy extends g.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=os(r)&&r.offsetWidth||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left}return null}componentDidUpdate(){}render(){return this.props.children}}function fy({children:e,isPresent:t,anchorX:n}){const r=g.useId(),i=g.useRef(null),s=g.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=g.useContext(fs);return g.useInsertionEffect(()=>{const{width:a,height:l,top:u,left:c,right:f}=s.current;if(t||!i.current||!a||!l)return;const d=n==="left"?`left: ${c}`:`right: ${f}`;i.current.dataset.motionPopId=r;const h=document.createElement("style");return o&&(h.nonce=o),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
          [data-motion-pop-id="${r}"] {
            position: absolute !important;
            width: ${a}px !important;
            height: ${l}px !important;
            ${d}px !important;
            top: ${u}px !important;
          }
        `),()=>{document.head.contains(h)&&document.head.removeChild(h)}},[t]),Ze.jsx(cy,{isPresent:t,childRef:i,sizeRef:s,children:g.cloneElement(e,{ref:i})})}const dy=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o,anchorX:a})=>{const l=Ui(hy),u=g.useId();let c=!0,f=g.useMemo(()=>(c=!1,{id:u,initial:t,isPresent:n,custom:i,onExitComplete:d=>{l.set(d,!0);for(const h of l.values())if(!h)return;r&&r()},register:d=>(l.set(d,!1),()=>l.delete(d))}),[n,l,r]);return s&&c&&(f={...f}),g.useMemo(()=>{l.forEach((d,h)=>l.set(h,!1))},[n]),g.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=Ze.jsx(fy,{isPresent:n,anchorX:a,children:e})),Ze.jsx(br.Provider,{value:f,children:e})};function hy(){return new Map}function Ru(e=!0){const t=g.useContext(br);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,s=g.useId();g.useEffect(()=>{if(e)return i(s)},[e]);const o=g.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,o]:[!0]}const In=e=>e.key||"";function Ho(e){const t=[];return g.Children.forEach(e,n=>{g.isValidElement(n)&&t.push(n)}),t}const E0=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:s="sync",propagate:o=!1,anchorX:a="left"})=>{const[l,u]=Ru(o),c=g.useMemo(()=>Ho(e),[e]),f=o&&!l?[]:c.map(In),d=g.useRef(!0),h=g.useRef(c),m=Ui(()=>new Map),[x,v]=g.useState(c),[w,E]=g.useState(c);_l(()=>{d.current=!1,h.current=c;for(let C=0;C<w.length;C++){const b=In(w[C]);f.includes(b)?m.delete(b):m.get(b)!==!0&&m.set(b,!1)}},[w,f.length,f.join("-")]);const S=[];if(c!==x){let C=[...c];for(let b=0;b<w.length;b++){const V=w[b],O=In(V);f.includes(O)||(C.splice(b,0,V),S.push(V))}return s==="wait"&&S.length&&(C=S),E(Ho(C)),v(c),null}const{forceRender:M}=g.useContext(Ii);return Ze.jsx(Ze.Fragment,{children:w.map(C=>{const b=In(C),V=o&&!l?!1:c===w||f.includes(b),O=()=>{if(m.has(b))m.set(b,!0);else return;let _=!0;m.forEach(Z=>{Z||(_=!1)}),_&&(M==null||M(),E(h.current),o&&(u==null||u()),r&&r())};return Ze.jsx(dy,{isPresent:V,initial:!d.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:s,onExitComplete:V?void 0:O,anchorX:a,children:C},b)})})},Pu=g.createContext({strict:!1}),zo={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Bt={};for(const e in zo)Bt[e]={isEnabled:t=>zo[e].some(n=>!!t[n])};function my(e){for(const t in e)Bt[t]={...Bt[t],...e[t]}}const py=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ar(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||py.has(e)}let Cu=e=>!ar(e);function yy(e){e&&(Cu=t=>t.startsWith("on")?!ar(t):e(t))}try{yy(require("@emotion/is-prop-valid").default)}catch{}function gy(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Cu(i)||n===!0&&ar(i)||!t&&!ar(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function vy(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const xr=g.createContext({});function Tr(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function wn(e){return typeof e=="string"||Array.isArray(e)}const ds=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hs=["initial",...ds];function Sr(e){return Tr(e.animate)||hs.some(t=>wn(e[t]))}function Au(e){return!!(Sr(e)||e.variants)}function wy(e,t){if(Sr(e)){const{initial:n,animate:r}=e;return{initial:n===!1||wn(n)?n:void 0,animate:wn(r)?r:void 0}}return e.inherit!==!1?t:{}}function by(e){const{initial:t,animate:n}=wy(e,g.useContext(xr));return g.useMemo(()=>({initial:t,animate:n}),[Wo(t),Wo(n)])}function Wo(e){return Array.isArray(e)?e.join(" "):e}const xy=Symbol.for("motionComponentSymbol");function Vt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ty(e,t,n){return g.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Vt(n)&&(n.current=r))},[t])}const ms=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Sy="framerAppearId",Du="data-"+ms(Sy),Mu=g.createContext({});function Ey(e,t,n,r,i){var x,v;const{visualElement:s}=g.useContext(xr),o=g.useContext(Pu),a=g.useContext(br),l=g.useContext(fs).reducedMotion,u=g.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=u.current,f=g.useContext(Mu);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&Ry(u.current,n,i,f);const d=g.useRef(!1);g.useInsertionEffect(()=>{c&&d.current&&c.update(n,a)});const h=n[Du],m=g.useRef(!!h&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,h))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,h)));return _l(()=>{c&&(d.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),us.render(c.render),m.current&&c.animationState&&c.animationState.animateChanges())}),g.useEffect(()=>{c&&(!m.current&&c.animationState&&c.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)==null||w.call(window,h)}),m.current=!1))}),c}function Ry(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Lu(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Vt(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function Lu(e){if(e)return e.options.allowProjection!==!1?e.projection:Lu(e.parent)}function Py({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&my(e);function s(a,l){let u;const c={...g.useContext(fs),...a,layoutId:Cy(a)},{isStatic:f}=c,d=by(a),h=r(a,f);if(!f&&$i){Ay();const m=Dy(c);u=m.MeasureLayout,d.visualElement=Ey(i,h,c,t,m.ProjectionNode)}return Ze.jsxs(xr.Provider,{value:d,children:[u&&d.visualElement?Ze.jsx(u,{visualElement:d.visualElement,...c}):null,n(i,a,Ty(h,d.visualElement,l),h,f,d.visualElement)]})}s.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const o=g.forwardRef(s);return o[xy]=i,o}function Cy({layoutId:e}){const t=g.useContext(Ii).id;return t&&e!==void 0?t+"-"+e:e}function Ay(e,t){g.useContext(Pu).strict}function Dy(e){const{drag:t,layout:n}=Bt;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const bn={};function My(e){for(const t in e)bn[t]=e[t],Xi(t)&&(bn[t].isCSSVariable=!0)}function Ou(e,{layout:t,layoutId:n}){return Wt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!bn[e]||e==="opacity")}const Ly={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Oy=zt.length;function Vy(e,t,n){let r="",i=!0;for(let s=0;s<Oy;s++){const o=zt[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const u=bu(a,ls[o]);if(!l){i=!1;const c=Ly[o]||o;r+=`${c}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function ps(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(Wt.has(l)){o=!0;continue}else if(Xi(l)){i[l]=u;continue}else{const c=bu(u,ls[l]);l.startsWith("origin")?(a=!0,s[l]=c):r[l]=c}}if(t.transform||(o||n?r.transform=Vy(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=s;r.transformOrigin=`${l} ${u} ${c}`}}const ys=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Vu(e,t,n){for(const r in t)!Ee(t[r])&&!Ou(r,n)&&(e[r]=t[r])}function Fy({transformTemplate:e},t){return g.useMemo(()=>{const n=ys();return ps(n,t,e),Object.assign({},n.vars,n.style)},[t])}function _y(e,t){const n=e.style||{},r={};return Vu(r,n,e),Object.assign(r,Fy(e,t)),r}function ky(e,t){const n={},r=_y(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Ny={offset:"stroke-dashoffset",array:"stroke-dasharray"},jy={offset:"strokeDashoffset",array:"strokeDasharray"};function By(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?Ny:jy;e[s.offset]=$.transform(-r);const o=$.transform(t),a=$.transform(n);e[s.array]=`${o} ${a}`}function Fu(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:s=1,pathOffset:o=0,...a},l,u,c){if(ps(e,a,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:d}=e;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&By(f,i,s,o,!1)}const _u=()=>({...ys(),attrs:{}}),ku=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Iy(e,t,n,r){const i=g.useMemo(()=>{const s=_u();return Fu(s,t,ku(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Vu(s,e.style,e),i.style={...s,...i.style}}return i}const Uy=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function gs(e){return typeof e!="string"||e.includes("-")?!1:!!(Uy.indexOf(e)>-1||/[A-Z]/u.test(e))}function $y(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(gs(n)?Iy:ky)(r,s,o,n),u=gy(r,typeof n=="string",e),c=n!==g.Fragment?{...u,...l,ref:i}:{},{children:f}=r,d=g.useMemo(()=>Ee(f)?f.get():f,[f]);return g.createElement(n,{...c,children:d})}}function Ko(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function vs(e,t,n,r){if(typeof t=="function"){const[i,s]=Ko(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,s]=Ko(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function Xn(e){return Ee(e)?e.get():e}function Hy({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:zy(n,r,i,e),renderState:t()}}const Nu=e=>(t,n)=>{const r=g.useContext(xr),i=g.useContext(br),s=()=>Hy(e,t,r,i);return n?s():Ui(s)};function zy(e,t,n,r){const i={},s=r(e,{});for(const d in s)i[d]=Xn(s[d]);let{initial:o,animate:a}=e;const l=Sr(e),u=Au(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const f=c?a:o;if(f&&typeof f!="boolean"&&!Tr(f)){const d=Array.isArray(f)?f:[f];for(let h=0;h<d.length;h++){const m=vs(e,d[h]);if(m){const{transitionEnd:x,transition:v,...w}=m;for(const E in w){let S=w[E];if(Array.isArray(S)){const M=c?S.length-1:0;S=S[M]}S!==null&&(i[E]=S)}for(const E in x)i[E]=x[E]}}}return i}function ws(e,t,n){var s;const{style:r}=e,i={};for(const o in r)(Ee(r[o])||t.style&&Ee(t.style[o])||Ou(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const Wy={useVisualState:Nu({scrapeMotionValuesFromProps:ws,createRenderState:ys})};function ju(e,t,n){const r=ws(e,t,n);for(const i in e)if(Ee(e[i])||Ee(t[i])){const s=zt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}const Ky={useVisualState:Nu({scrapeMotionValuesFromProps:ju,createRenderState:_u})};function qy(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...gs(r)?Ky:Wy,preloadedFeatures:e,useRender:$y(i),createVisualElement:t,Component:r};return Py(o)}}function xn(e,t,n){const r=e.getProps();return vs(r,t,n!==void 0?n:r.custom,e)}const xi=e=>Array.isArray(e);function Yy(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,jt(n))}function Gy(e){return xi(e)?e[e.length-1]||0:e}function Xy(e,t){const n=xn(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=Gy(s[o]);Yy(e,o,a)}}function Jy(e){return!!(Ee(e)&&e.add)}function Ti(e,t){const n=e.getValue("willChange");if(Jy(n))return n.add(t);if(!n&&et.WillChange){const r=new et.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Bu(e){return e.props[Du]}const Zy=e=>e!==null;function Qy(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Zy),s=t&&n!=="loop"&&t%2===1?0:i.length-1;return i[s]}const eg={type:"spring",stiffness:500,damping:25,restSpeed:10},tg=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),ng={type:"keyframes",duration:.8},rg={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ig=(e,{keyframes:t})=>t.length>2?ng:Wt.has(e)?e.startsWith("scale")?tg(t[1]):eg:rg;function sg({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const bs=(e,t,n,r={},i,s)=>o=>{const a=as(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Ye(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:i};sg(a)||Object.assign(c,ig(e,c)),c.duration&&(c.duration=Ye(c.duration)),c.repeatDelay&&(c.repeatDelay=Ye(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(f=!0)),(et.instantAnimations||et.skipAnimations)&&(f=!0,c.duration=0,c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!s&&t.get()!==void 0){const d=Qy(c.keyframes,a);if(d!==void 0){ue.update(()=>{c.onUpdate(d),c.onComplete()});return}}return a.isSync?new is(c):new Bp(c)};function og({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Iu(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:o,...a}=t;r&&(s=r);const l=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const c in a){const f=e.getValue(c,e.latestValues[c]??null),d=a[c];if(d===void 0||u&&og(u,c))continue;const h={delay:n,...as(s||{},c)},m=f.get();if(m!==void 0&&!f.isAnimating&&!Array.isArray(d)&&d===m&&!h.velocity)continue;let x=!1;if(window.MotionHandoffAnimation){const w=Bu(e);if(w){const E=window.MotionHandoffAnimation(w,c,ue);E!==null&&(h.startTime=E,x=!0)}}Ti(e,c),f.start(bs(c,f,d,e.shouldReduceMotion&&pu.has(c)?{type:!1}:h,e,x));const v=f.animation;v&&l.push(v)}return o&&Promise.all(l).then(()=>{ue.update(()=>{o&&Xy(e,o)})}),l}function Si(e,t,n={}){var l;const r=xn(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const s=r?()=>Promise.all(Iu(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:d}=i;return ag(e,t,c+u,f,d,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[s,o]:[o,s];return u().then(()=>c())}else return Promise.all([s(),o(n.delay)])}function ag(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(lg).forEach((u,c)=>{u.notify("AnimationStart",t),o.push(Si(u,t,{...s,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function lg(e,t){return e.sortNodePosition(t)}function ug(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(s=>Si(e,s,n));r=Promise.all(i)}else if(typeof t=="string")r=Si(e,t,n);else{const i=typeof t=="function"?xn(e,t,n.custom):t;r=Promise.all(Iu(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Uu(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const cg=hs.length;function $u(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?$u(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<cg;n++){const r=hs[n],i=e.props[r];(wn(i)||i===!1)&&(t[r]=i)}return t}const fg=[...ds].reverse(),dg=ds.length;function hg(e){return t=>Promise.all(t.map(({animation:n,options:r})=>ug(e,n,r)))}function mg(e){let t=hg(e),n=qo(),r=!0;const i=l=>(u,c)=>{var d;const f=xn(e,c,l==="exit"?(d=e.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:m,...x}=f;u={...u,...x,...m}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,c=$u(e.parent)||{},f=[],d=new Set;let h={},m=1/0;for(let v=0;v<dg;v++){const w=fg[v],E=n[w],S=u[w]!==void 0?u[w]:c[w],M=wn(S),C=w===l?E.isActive:null;C===!1&&(m=v);let b=S===c[w]&&S!==u[w]&&M;if(b&&r&&e.manuallyAnimateOnMount&&(b=!1),E.protectedKeys={...h},!E.isActive&&C===null||!S&&!E.prevProp||Tr(S)||typeof S=="boolean")continue;const V=pg(E.prevProp,S);let O=V||w===l&&E.isActive&&!b&&M||v>m&&M,_=!1;const Z=Array.isArray(S)?S:[S];let ae=Z.reduce(i(w),{});C===!1&&(ae={});const{prevResolvedValues:Me={}}=E,te={...Me,...ae},ne=ee=>{O=!0,d.has(ee)&&(_=!0,d.delete(ee)),E.needsAnimating[ee]=!0;const oe=e.getValue(ee);oe&&(oe.liveStyle=!1)};for(const ee in te){const oe=ae[ee],ge=Me[ee];if(h.hasOwnProperty(ee))continue;let y=!1;xi(oe)&&xi(ge)?y=!Uu(oe,ge):y=oe!==ge,y?oe!=null?ne(ee):d.add(ee):oe!==void 0&&d.has(ee)?ne(ee):E.protectedKeys[ee]=!0}E.prevProp=S,E.prevResolvedValues=ae,E.isActive&&(h={...h,...ae}),r&&e.blockInitialAnimation&&(O=!1),O&&(!(b&&V)||_)&&f.push(...Z.map(ee=>({animation:ee,options:{type:w}})))}if(d.size){const v={};if(typeof u.initial!="boolean"){const w=xn(e,Array.isArray(u.initial)?u.initial[0]:u.initial);w&&w.transition&&(v.transition=w.transition)}d.forEach(w=>{const E=e.getBaseTarget(w),S=e.getValue(w);S&&(S.liveStyle=!0),v[w]=E??null}),f.push({animation:v})}let x=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(f):Promise.resolve()}function a(l,u){var f;if(n[l].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(d=>{var h;return(h=d.animationState)==null?void 0:h.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=qo(),r=!0}}}function pg(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Uu(t,e):!1}function gt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function qo(){return{animate:gt(!0),whileInView:gt(),whileHover:gt(),whileTap:gt(),whileDrag:gt(),whileFocus:gt(),exit:gt()}}class dt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class yg extends dt{constructor(t){super(t),t.animationState||(t.animationState=mg(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Tr(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let gg=0;class vg extends dt{constructor(){super(...arguments),this.id=gg++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const wg={animation:{Feature:yg},exit:{Feature:vg}};function Tn(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Mn(e){return{point:{x:e.pageX,y:e.pageY}}}const bg=e=>t=>cs(t)&&e(t,Mn(t));function cn(e,t,n,r){return Tn(e,t,bg(n),r)}function Hu({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function xg({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Tg(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const zu=1e-4,Sg=1-zu,Eg=1+zu,Wu=.01,Rg=0-Wu,Pg=0+Wu;function Pe(e){return e.max-e.min}function Cg(e,t,n){return Math.abs(e-t)<=n}function Yo(e,t,n,r=.5){e.origin=r,e.originPoint=le(t.min,t.max,e.origin),e.scale=Pe(n)/Pe(t),e.translate=le(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Sg&&e.scale<=Eg||isNaN(e.scale))&&(e.scale=1),(e.translate>=Rg&&e.translate<=Pg||isNaN(e.translate))&&(e.translate=0)}function fn(e,t,n,r){Yo(e.x,t.x,n.x,r?r.originX:void 0),Yo(e.y,t.y,n.y,r?r.originY:void 0)}function Go(e,t,n){e.min=n.min+t.min,e.max=e.min+Pe(t)}function Ag(e,t,n){Go(e.x,t.x,n.x),Go(e.y,t.y,n.y)}function Xo(e,t,n){e.min=t.min-n.min,e.max=e.min+Pe(t)}function dn(e,t,n){Xo(e.x,t.x,n.x),Xo(e.y,t.y,n.y)}const Jo=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ft=()=>({x:Jo(),y:Jo()}),Zo=()=>({min:0,max:0}),he=()=>({x:Zo(),y:Zo()});function Ne(e){return[e("x"),e("y")]}function Kr(e){return e===void 0||e===1}function Ei({scale:e,scaleX:t,scaleY:n}){return!Kr(e)||!Kr(t)||!Kr(n)}function vt(e){return Ei(e)||Ku(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ku(e){return Qo(e.x)||Qo(e.y)}function Qo(e){return e&&e!=="0%"}function lr(e,t,n){const r=e-n,i=t*r;return n+i}function ea(e,t,n,r,i){return i!==void 0&&(e=lr(e,i,r)),lr(e,n,r)+t}function Ri(e,t=0,n=1,r,i){e.min=ea(e.min,t,n,r,i),e.max=ea(e.max,t,n,r,i)}function qu(e,{x:t,y:n}){Ri(e.x,t.translate,t.scale,t.originPoint),Ri(e.y,n.translate,n.scale,n.originPoint)}const ta=.999999999999,na=1.0000000000001;function Dg(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&kt(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,qu(e,o)),r&&vt(s.latestValues)&&kt(e,s.latestValues))}t.x<na&&t.x>ta&&(t.x=1),t.y<na&&t.y>ta&&(t.y=1)}function _t(e,t){e.min=e.min+t,e.max=e.max+t}function ra(e,t,n,r,i=.5){const s=le(e.min,e.max,i);Ri(e,t,n,s,r)}function kt(e,t){ra(e.x,t.x,t.scaleX,t.scale,t.originX),ra(e.y,t.y,t.scaleY,t.scale,t.originY)}function Yu(e,t){return Hu(Tg(e.getBoundingClientRect(),t))}function Mg(e,t,n){const r=Yu(e,n),{scroll:i}=t;return i&&(_t(r.x,i.offset.x),_t(r.y,i.offset.y)),r}const Gu=({current:e})=>e?e.ownerDocument.defaultView:null,ia=(e,t)=>Math.abs(e-t);function Lg(e,t){const n=ia(e.x,t.x),r=ia(e.y,t.y);return Math.sqrt(n**2+r**2)}class Xu{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Yr(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=Lg(f.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:m}=f,{timestamp:x}=we;this.history.push({...m,timestamp:x});const{onStart:v,onMove:w}=this.handlers;d||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,f)},this.handlePointerMove=(f,d)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=qr(d,this.transformPagePoint),ue.update(this.updatePoint,!0)},this.handlePointerUp=(f,d)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Yr(f.type==="pointercancel"?this.lastMoveEventInfo:qr(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,v),m&&m(f,v)},!cs(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Mn(t),a=qr(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=we;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,Yr(a,this.history)),this.removeListeners=Cn(cn(this.contextWindow,"pointermove",this.handlePointerMove),cn(this.contextWindow,"pointerup",this.handlePointerUp),cn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),lt(this.updatePoint)}}function qr(e,t){return t?{point:t(e.point)}:e}function sa(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Yr({point:e},t){return{point:e,delta:sa(e,Ju(t)),offset:sa(e,Og(t)),velocity:Vg(t,.1)}}function Og(e){return e[0]}function Ju(e){return e[e.length-1]}function Vg(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Ju(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ye(t)));)n--;if(!r)return{x:0,y:0};const s=Ge(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Fg(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?le(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?le(n,e,r.max):Math.min(e,n)),e}function oa(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function _g(e,{top:t,left:n,bottom:r,right:i}){return{x:oa(e.x,n,i),y:oa(e.y,t,r)}}function aa(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function kg(e,t){return{x:aa(e.x,t.x),y:aa(e.y,t.y)}}function Ng(e,t){let n=.5;const r=Pe(e),i=Pe(t);return i>r?n=yn(t.min,t.max-r,e.min):r>i&&(n=yn(e.min,e.max-i,t.min)),Qe(0,1,n)}function jg(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Pi=.35;function Bg(e=Pi){return e===!1?e=0:e===!0&&(e=Pi),{x:la(e,"left","right"),y:la(e,"top","bottom")}}function la(e,t,n){return{min:ua(e,t),max:ua(e,n)}}function ua(e,t){return typeof e=="number"?e:e[t]||0}const Ig=new WeakMap;class Ug{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=he(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Mn(c).point)},s=(c,f)=>{const{drag:d,dragPropagation:h,onDragStart:m}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ty(d),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ne(v=>{let w=this.getAxisMotionValue(v).get()||0;if(Xe.test(w)){const{projection:E}=this.visualElement;if(E&&E.layout){const S=E.layout.layoutBox[v];S&&(w=Pe(S)*(parseFloat(w)/100))}}this.originPoint[v]=w}),m&&ue.postRender(()=>m(c,f)),Ti(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},o=(c,f)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:m,onDrag:x}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:v}=f;if(h&&this.currentDirection===null){this.currentDirection=$g(v),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),x&&x(c,f)},a=(c,f)=>this.stop(c,f),l=()=>Ne(c=>{var f;return this.getAnimationState(c)==="paused"&&((f=this.getAxisMotionValue(c).animation)==null?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Xu(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Gu(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&ue.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Un(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=Fg(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,i=this.constraints;t&&Vt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=_g(r.layoutBox,t):this.constraints=!1,this.elastic=Bg(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ne(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=jg(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Vt(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=Mg(r,i.root,this.visualElement.getTransformPagePoint());let o=kg(i.layout.layoutBox,s);if(n){const a=n(xg(o));this.hasMutatedConstraints=!!a,a&&(o=Hu(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ne(c=>{if(!Un(c,n,this.currentDirection))return;let f=l&&l[c]||{};o&&(f={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,m={type:"inertia",velocity:r?t[c]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ti(this.visualElement,t),r.start(bs(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ne(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ne(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ne(n=>{const{drag:r}=this.getProps();if(!Un(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-le(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Vt(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ne(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Ng({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ne(o=>{if(!Un(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(le(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;Ig.set(this.visualElement,this);const t=this.visualElement.current,n=cn(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Vt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ue.read(r);const o=Tn(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ne(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Pi,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Un(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function $g(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Hg extends dt{constructor(t){super(t),this.removeGroupControls=Be,this.removeListeners=Be,this.controls=new Ug(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Be}unmount(){this.removeGroupControls(),this.removeListeners()}}const ca=e=>(t,n)=>{e&&ue.postRender(()=>e(t,n))};class zg extends dt{constructor(){super(...arguments),this.removePointerDownListener=Be}onPointerDown(t){this.session=new Xu(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Gu(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ca(t),onStart:ca(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&ue.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=cn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Jn={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fa(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const rn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if($.test(e))e=parseFloat(e);else return e;const n=fa(e,t.target.x),r=fa(e,t.target.y);return`${n}% ${r}%`}},Wg={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ut.parse(e);if(i.length>5)return r;const s=ut.createTransformer(e),o=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=le(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),s(i)}};class Kg extends g.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;My(qg),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Jn.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,{projection:o}=r;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||ue.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),us.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Zu(e){const[t,n]=Ru(),r=g.useContext(Ii);return Ze.jsx(Kg,{...e,layoutGroup:r,switchLayoutGroup:g.useContext(Mu),isPresent:t,safeToRemove:n})}const qg={borderRadius:{...rn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:rn,borderTopRightRadius:rn,borderBottomLeftRadius:rn,borderBottomRightRadius:rn,boxShadow:Wg};function Yg(e,t,n){const r=Ee(e)?e:jt(e);return r.start(bs("",r,t,n)),r.animation}const Gg=(e,t)=>e.depth-t.depth;class Xg{constructor(){this.children=[],this.isDirty=!1}add(t){Hi(this.children,t),this.isDirty=!0}remove(t){zi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Gg),this.isDirty=!1,this.children.forEach(t)}}function Jg(e,t){const n=Ce.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(lt(r),e(s-t))};return ue.setup(r,!0),()=>lt(r)}const Qu=["TopLeft","TopRight","BottomLeft","BottomRight"],Zg=Qu.length,da=e=>typeof e=="string"?parseFloat(e):e,ha=e=>typeof e=="number"||$.test(e);function Qg(e,t,n,r,i,s){i?(e.opacity=le(0,n.opacity??1,ev(r)),e.opacityExit=le(t.opacity??1,0,tv(r))):s&&(e.opacity=le(t.opacity??1,n.opacity??1,r));for(let o=0;o<Zg;o++){const a=`border${Qu[o]}Radius`;let l=ma(t,a),u=ma(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||ha(l)===ha(u)?(e[a]=Math.max(le(da(l),da(u),r),0),(Xe.test(u)||Xe.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=le(t.rotate||0,n.rotate||0,r))}function ma(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const ev=ec(0,.5,Kl),tv=ec(.5,.95,Be);function ec(e,t,n){return r=>r<e?0:r>t?1:n(yn(e,t,r))}function pa(e,t){e.min=t.min,e.max=t.max}function ke(e,t){pa(e.x,t.x),pa(e.y,t.y)}function ya(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ga(e,t,n,r,i){return e-=t,e=lr(e,1/n,r),i!==void 0&&(e=lr(e,1/i,r)),e}function nv(e,t=0,n=1,r=.5,i,s=e,o=e){if(Xe.test(t)&&(t=parseFloat(t),t=le(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=le(s.min,s.max,r);e===s&&(a-=t),e.min=ga(e.min,t,n,a,i),e.max=ga(e.max,t,n,a,i)}function va(e,t,[n,r,i],s,o){nv(e,t[n],t[r],t[i],t.scale,s,o)}const rv=["x","scaleX","originX"],iv=["y","scaleY","originY"];function wa(e,t,n,r){va(e.x,t,rv,n?n.x:void 0,r?r.x:void 0),va(e.y,t,iv,n?n.y:void 0,r?r.y:void 0)}function ba(e){return e.translate===0&&e.scale===1}function tc(e){return ba(e.x)&&ba(e.y)}function xa(e,t){return e.min===t.min&&e.max===t.max}function sv(e,t){return xa(e.x,t.x)&&xa(e.y,t.y)}function Ta(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function nc(e,t){return Ta(e.x,t.x)&&Ta(e.y,t.y)}function Sa(e){return Pe(e.x)/Pe(e.y)}function Ea(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class ov{constructor(){this.members=[]}add(t){Hi(this.members,t),t.scheduleRender()}remove(t){if(zi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function av(e,t,n){let r="";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:d,skewX:h,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Gr=["","X","Y","Z"],lv={visibility:"hidden"},uv=1e3;let cv=0;function Xr(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function rc(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Bu(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ue,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&rc(r)}function ic({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=cv++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(hv),this.nodes.forEach(vv),this.nodes.forEach(wv),this.nodes.forEach(mv)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Xg)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new qi),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Eu(o)&&!ay(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let c;const f=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=Jg(f,250),Jn.hasAnimatedSinceResize&&(Jn.hasAnimatedSinceResize=!1,this.nodes.forEach(Pa))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:d,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||Ev,{onLayoutAnimationStart:x,onLayoutAnimationComplete:v}=u.getProps(),w=!this.targetLayout||!nc(this.targetLayout,h),E=!f&&d;if(this.options.layoutRoot||this.resumeFrom||E||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,E);const S={...as(m,"layout"),onPlay:x,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else f||Pa(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),lt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(bv),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&rc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ra);return}this.isUpdating||this.nodes.forEach(yv),this.isUpdating=!1,this.nodes.forEach(gv),this.nodes.forEach(fv),this.nodes.forEach(dv),this.clearAllSnapshots();const a=Ce.now();we.delta=Qe(0,1e3/60,a-we.timestamp),we.timestamp=a,we.isProcessing=!0,Ur.update.process(we),Ur.preRender.process(we),Ur.render.process(we),we.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,us.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(pv),this.sharedNodes.forEach(xv)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ue.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ue.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Pe(this.snapshot.measuredBox.x)&&!Pe(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=he(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!tc(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||vt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Rv(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return he();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(Pv))){const{scroll:c}=this.root;c&&(_t(a.x,c.offset.x),_t(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=he();if(ke(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:f,options:d}=c;c!==this.root&&f&&d.layoutScroll&&(f.wasRoot&&ke(a,o),_t(a.x,f.offset.x),_t(a.y,f.offset.y))}return a}applyTransform(o,a=!1){const l=he();ke(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&kt(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),vt(c.latestValues)&&kt(l,c.latestValues)}return vt(this.latestValues)&&kt(l,this.latestValues),l}removeTransform(o){const a=he();ke(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!vt(u.latestValues))continue;Ei(u.latestValues)&&u.updateSnapshot();const c=he(),f=u.measurePageBox();ke(c,f),wa(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return vt(this.latestValues)&&wa(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==we.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:f}=this.options;if(!(!this.layout||!(c||f))){if(this.resolvedRelativeTargetAt=we.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=he(),this.relativeTargetOrigin=he(),dn(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),ke(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=he(),this.targetWithTransforms=he()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ag(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ke(this.target,this.layout.layoutBox),qu(this.target,this.targetDelta)):ke(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=he(),this.relativeTargetOrigin=he(),dn(this.relativeTargetOrigin,this.target,h.target),ke(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Ei(this.parent.latestValues)||Ku(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===we.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;ke(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;Dg(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=he());const{target:h}=o;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ya(this.prevProjectionDelta.x,this.projectionDelta.x),ya(this.prevProjectionDelta.y,this.projectionDelta.y)),fn(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==d||!Ea(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ea(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ft(),this.projectionDelta=Ft(),this.projectionDeltaWithTransform=Ft()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},f=Ft();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=he(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,x=h!==m,v=this.getStack(),w=!v||v.members.length<=1,E=!!(x&&!w&&this.options.crossfade===!0&&!this.path.some(Sv));this.animationProgress=0;let S;this.mixTargetDelta=M=>{const C=M/1e3;Ca(f.x,o.x,C),Ca(f.y,o.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(dn(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Tv(this.relativeTarget,this.relativeTargetOrigin,d,C),S&&sv(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=he()),ke(S,this.relativeTarget)),x&&(this.animationValues=c,Qg(c,u,this.latestValues,C,E,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(!1),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(!1),this.pendingAnimation&&(lt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ue.update(()=>{Jn.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=jt(0)),this.currentAnimation=Yg(this.motionValue,[0,1e3],{...o,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(uv),this.currentAnimation.stop(!1)),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&sc(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||he();const f=Pe(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const d=Pe(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}ke(a,l),kt(a,c),fn(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new ov),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Xr("z",o,u,this.animationValues);for(let c=0;c<Gr.length;c++)Xr(`rotate${Gr[c]}`,o,u,this.animationValues),Xr(`skew${Gr[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}getProjectionStyles(o){if(!this.instance||this.isSVG)return;if(!this.isVisible)return lv;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Xn(o==null?void 0:o.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Xn(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!vt(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const c=u.animationValues||u.latestValues;this.applyTransformsToTarget(),a.transform=av(this.projectionDeltaWithTransform,this.treeScale,c),l&&(a.transform=l(c,a.transform));const{x:f,y:d}=this.projectionDelta;a.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?a.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:a.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const h in bn){if(c[h]===void 0)continue;const{correct:m,applyTo:x,isCSSVariable:v}=bn[h],w=a.transform==="none"?c[h]:m(c[h],u);if(x){const E=x.length;for(let S=0;S<E;S++)a[x[S]]=w}else v?this.options.visualElement.renderState.vars[h]=w:a[h]=w}return this.options.layoutId&&(a.pointerEvents=u===this?Xn(o==null?void 0:o.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop(!1)}),this.root.nodes.forEach(Ra),this.root.sharedNodes.clear()}}}function fv(e){e.updateLayout()}function dv(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=t.source!==e.layout.source;s==="size"?Ne(f=>{const d=o?t.measuredBox[f]:t.layoutBox[f],h=Pe(d);d.min=r[f].min,d.max=d.min+h}):sc(s,t.layoutBox,r)&&Ne(f=>{const d=o?t.measuredBox[f]:t.layoutBox[f],h=Pe(r[f]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+h)});const a=Ft();fn(a,r,t.layoutBox);const l=Ft();o?fn(l,e.applyTransform(i,!0),t.measuredBox):fn(l,r,t.layoutBox);const u=!tc(a);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:d,layout:h}=f;if(d&&h){const m=he();dn(m,t.layoutBox,d.layoutBox);const x=he();dn(x,r,h.layoutBox),nc(m,x)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=m,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function hv(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function mv(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function pv(e){e.clearSnapshot()}function Ra(e){e.clearMeasurements()}function yv(e){e.isLayoutDirty=!1}function gv(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Pa(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function vv(e){e.resolveTargetDelta()}function wv(e){e.calcProjection()}function bv(e){e.resetSkewAndRotation()}function xv(e){e.removeLeadSnapshot()}function Ca(e,t,n){e.translate=le(t.translate,0,n),e.scale=le(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Aa(e,t,n,r){e.min=le(t.min,n.min,r),e.max=le(t.max,n.max,r)}function Tv(e,t,n,r){Aa(e.x,t.x,n.x,r),Aa(e.y,t.y,n.y,r)}function Sv(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Ev={duration:.45,ease:[.4,0,.1,1]},Da=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ma=Da("applewebkit/")&&!Da("chrome/")?Math.round:Be;function La(e){e.min=Ma(e.min),e.max=Ma(e.max)}function Rv(e){La(e.x),La(e.y)}function sc(e,t,n){return e==="position"||e==="preserve-aspect"&&!Cg(Sa(t),Sa(n),.2)}function Pv(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Cv=ic({attachResizeListener:(e,t)=>Tn(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Jr={current:void 0},oc=ic({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Jr.current){const e=new Cv({});e.mount(window),e.setOptions({layoutScroll:!0}),Jr.current=e}return Jr.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Av={pan:{Feature:zg},drag:{Feature:Hg,ProjectionNode:oc,MeasureLayout:Zu}};function Oa(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,s=r[i];s&&ue.postRender(()=>s(t,Mn(t)))}class Dv extends dt{mount(){const{current:t}=this.node;t&&(this.unmount=ny(t,(n,r)=>(Oa(this.node,r,"Start"),i=>Oa(this.node,i,"End"))))}unmount(){}}class Mv extends dt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Cn(Tn(this.node.current,"focus",()=>this.onFocus()),Tn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Va(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),s=r[i];s&&ue.postRender(()=>s(t,Mn(t)))}class Lv extends dt{mount(){const{current:t}=this.node;t&&(this.unmount=oy(t,(n,r)=>(Va(this.node,r,"Start"),(i,{success:s})=>Va(this.node,i,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ci=new WeakMap,Zr=new WeakMap,Ov=e=>{const t=Ci.get(e.target);t&&t(e)},Vv=e=>{e.forEach(Ov)};function Fv({root:e,...t}){const n=e||document;Zr.has(n)||Zr.set(n,{});const r=Zr.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Vv,{root:e,...t})),r[i]}function _v(e,t,n){const r=Fv(t);return Ci.set(e,n),r.observe(e),()=>{Ci.delete(e),r.unobserve(e)}}const kv={some:0,all:1};class Nv extends dt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:kv[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),d=u?c:f;d&&d(l)};return _v(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(jv(t,n))&&this.startObserver()}unmount(){}}function jv({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Bv={inView:{Feature:Nv},tap:{Feature:Lv},focus:{Feature:Mv},hover:{Feature:Dv}},Iv={layout:{ProjectionNode:oc,MeasureLayout:Zu}},Ai={current:null},ac={current:!1};function Uv(){if(ac.current=!0,!!$i)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ai.current=e.matches;e.addListener(t),t()}else Ai.current=!1}const $v=new WeakMap;function Hv(e,t,n){for(const r in t){const i=t[r],s=n[r];if(Ee(i))e.addValue(r,i);else if(Ee(s))e.addValue(r,jt(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,jt(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Fa=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class zv{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ss,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=Ce.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,ue.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Sr(n),this.isVariantNode=Au(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const h=f[d];l[d]!==void 0&&Ee(h)&&h.set(l[d],!1)}}mount(t){this.current=t,$v.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),ac.current||Uv(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ai.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),lt(this.notifyUpdate),lt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Wt.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ue.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Bt){const n=Bt[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):he()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Fa.length;r++){const i=Fa[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s="on"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Hv(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=jt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(kl(r)||jl(r))?r=parseFloat(r):!uy(r)&&ut.test(n)&&(r=wu(t,n)),this.setBaseTarget(t,Ee(r)?r.get():r)),Ee(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=vs(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Ee(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new qi),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class lc extends zv{constructor(){super(...arguments),this.KeyframeResolver=Jp}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ee(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function uc(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}function Wv(e){return window.getComputedStyle(e)}class Kv extends lc{constructor(){super(...arguments),this.type="html",this.renderInstance=uc}readValueFromInstance(t,n){var r;if(Wt.has(n))return(r=this.projection)!=null&&r.isProjecting?pi(n):yp(t,n);{const i=Wv(t),s=(Xi(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Yu(t,n)}build(t,n,r){ps(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ws(t,n,r)}}const cc=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function qv(e,t,n,r){uc(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(cc.has(i)?i:ms(i),t.attrs[i])}class Yv extends lc{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=he}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Wt.has(n)){const r=vu(n);return r&&r.default||0}return n=cc.has(n)?n:ms(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return ju(t,n,r)}build(t,n,r){Fu(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){qv(t,n,r,i)}mount(t){this.isSVGTag=ku(t.tagName),super.mount(t)}}const Gv=(e,t)=>gs(e)?new Yv(t):new Kv(t,{allowProjection:e!==g.Fragment}),Xv=qy({...wg,...Bv,...Av,...Iv},Gv),P0=vy(Xv);export{E0 as A,t0 as N,n0 as O,Qv as R,ul as a,i0 as b,Dc as c,ka as d,Lc as e,r0 as f,_a as g,Zv as h,Jv as i,Ze as j,ye as k,s0 as l,P0 as m,e0 as n,ft as o,g as r,tl as u};
