@lacrous/omnicloud 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
var ok=Object.defineProperty;var xy=e=>{throw TypeError(e)};var ak=(e,n,s)=>n in e?ok(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s;var Vc=(e,n,s)=>ak(e,typeof n!="symbol"?n+"":n,s),zc=(e,n,s)=>n.has(e)||xy("Cannot "+s);var N=(e,n,s)=>(zc(e,n,"read from private field"),s?s.call(e):n.get(e)),ue=(e,n,s)=>n.has(e)?xy("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,s),J=(e,n,s,i)=>(zc(e,n,"write to private field"),i?i.call(e,s):n.set(e,s),s),me=(e,n,s)=>(zc(e,n,"access private method"),s);var Ga=(e,n,s,i)=>({set _(a){J(e,n,a,s)},get _(){return N(e,n,i)}});(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function s(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(a){if(a.ep)return;a.ep=!0;const u=s(a);fetch(a.href,u)}})();var $c={exports:{}},so={},Uc={exports:{}},ve={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var wy;function lk(){if(wy)return ve;wy=1;var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.iterator;function x(L){return L===null||typeof L!="object"?null:(L=v&&L[v]||L["@@iterator"],typeof L=="function"?L:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,T={};function E(L,D,ee){this.props=L,this.context=D,this.refs=T,this.updater=ee||k}E.prototype.isReactComponent={},E.prototype.setState=function(L,D){if(typeof L!="object"&&typeof L!="function"&&L!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,L,D,"setState")},E.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function j(){}j.prototype=E.prototype;function I(L,D,ee){this.props=L,this.context=D,this.refs=T,this.updater=ee||k}var R=I.prototype=new j;R.constructor=I,C(R,E.prototype),R.isPureReactComponent=!0;var O=Array.isArray,F=Object.prototype.hasOwnProperty,U={current:null},A={key:!0,ref:!0,__self:!0,__source:!0};function _(L,D,ee){var ye,Ee={},Te=null,Ae=null;if(D!=null)for(ye in D.ref!==void 0&&(Ae=D.ref),D.key!==void 0&&(Te=""+D.key),D)F.call(D,ye)&&!A.hasOwnProperty(ye)&&(Ee[ye]=D[ye]);var be=arguments.length-2;if(be===1)Ee.children=ee;else if(1<be){for(var Fe=Array(be),bt=0;bt<be;bt++)Fe[bt]=arguments[bt+2];Ee.children=Fe}if(L&&L.defaultProps)for(ye in be=L.defaultProps,be)Ee[ye]===void 0&&(Ee[ye]=be[ye]);return{$$typeof:e,type:L,key:Te,ref:Ae,props:Ee,_owner:U.current}}function B(L,D){return{$$typeof:e,type:L.type,key:D,ref:L.ref,props:L.props,_owner:L._owner}}function Y(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function ne(L){var D={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(ee){return D[ee]})}var G=/\/+/g;function X(L,D){return typeof L=="object"&&L!==null&&L.key!=null?ne(""+L.key):D.toString(36)}function fe(L,D,ee,ye,Ee){var Te=typeof L;(Te==="undefined"||Te==="boolean")&&(L=null);var Ae=!1;if(L===null)Ae=!0;else switch(Te){case"string":case"number":Ae=!0;break;case"object":switch(L.$$typeof){case e:case n:Ae=!0}}if(Ae)return Ae=L,Ee=Ee(Ae),L=ye===""?"."+X(Ae,0):ye,O(Ee)?(ee="",L!=null&&(ee=L.replace(G,"$&/")+"/"),fe(Ee,D,ee,"",function(bt){return bt})):Ee!=null&&(Y(Ee)&&(Ee=B(Ee,ee+(!Ee.key||Ae&&Ae.key===Ee.key?"":(""+Ee.key).replace(G,"$&/")+"/")+L)),D.push(Ee)),1;if(Ae=0,ye=ye===""?".":ye+":",O(L))for(var be=0;be<L.length;be++){Te=L[be];var Fe=ye+X(Te,be);Ae+=fe(Te,D,ee,Fe,Ee)}else if(Fe=x(L),typeof Fe=="function")for(L=Fe.call(L),be=0;!(Te=L.next()).done;)Te=Te.value,Fe=ye+X(Te,be++),Ae+=fe(Te,D,ee,Fe,Ee);else if(Te==="object")throw D=String(L),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.");return Ae}function Se(L,D,ee){if(L==null)return L;var ye=[],Ee=0;return fe(L,ye,"","",function(Te){return D.call(ee,Te,Ee++)}),ye}function ge(L){if(L._status===-1){var D=L._result;D=D(),D.then(function(ee){(L._status===0||L._status===-1)&&(L._status=1,L._result=ee)},function(ee){(L._status===0||L._status===-1)&&(L._status=2,L._result=ee)}),L._status===-1&&(L._status=0,L._result=D)}if(L._status===1)return L._result.default;throw L._result}var ke={current:null},Z={transition:null},le={ReactCurrentDispatcher:ke,ReactCurrentBatchConfig:Z,ReactCurrentOwner:U};function q(){throw Error("act(...) is not supported in production builds of React.")}return ve.Children={map:Se,forEach:function(L,D,ee){Se(L,function(){D.apply(this,arguments)},ee)},count:function(L){var D=0;return Se(L,function(){D++}),D},toArray:function(L){return Se(L,function(D){return D})||[]},only:function(L){if(!Y(L))throw Error("React.Children.only expected to receive a single React element child.");return L}},ve.Component=E,ve.Fragment=s,ve.Profiler=a,ve.PureComponent=I,ve.StrictMode=i,ve.Suspense=p,ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=le,ve.act=q,ve.cloneElement=function(L,D,ee){if(L==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+L+".");var ye=C({},L.props),Ee=L.key,Te=L.ref,Ae=L._owner;if(D!=null){if(D.ref!==void 0&&(Te=D.ref,Ae=U.current),D.key!==void 0&&(Ee=""+D.key),L.type&&L.type.defaultProps)var be=L.type.defaultProps;for(Fe in D)F.call(D,Fe)&&!A.hasOwnProperty(Fe)&&(ye[Fe]=D[Fe]===void 0&&be!==void 0?be[Fe]:D[Fe])}var Fe=arguments.length-2;if(Fe===1)ye.children=ee;else if(1<Fe){be=Array(Fe);for(var bt=0;bt<Fe;bt++)be[bt]=arguments[bt+2];ye.children=be}return{$$typeof:e,type:L.type,key:Ee,ref:Te,props:ye,_owner:Ae}},ve.createContext=function(L){return L={$$typeof:c,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},L.Provider={$$typeof:u,_context:L},L.Consumer=L},ve.createElement=_,ve.createFactory=function(L){var D=_.bind(null,L);return D.type=L,D},ve.createRef=function(){return{current:null}},ve.forwardRef=function(L){return{$$typeof:f,render:L}},ve.isValidElement=Y,ve.lazy=function(L){return{$$typeof:g,_payload:{_status:-1,_result:L},_init:ge}},ve.memo=function(L,D){return{$$typeof:y,type:L,compare:D===void 0?null:D}},ve.startTransition=function(L){var D=Z.transition;Z.transition={};try{L()}finally{Z.transition=D}},ve.unstable_act=q,ve.useCallback=function(L,D){return ke.current.useCallback(L,D)},ve.useContext=function(L){return ke.current.useContext(L)},ve.useDebugValue=function(){},ve.useDeferredValue=function(L){return ke.current.useDeferredValue(L)},ve.useEffect=function(L,D){return ke.current.useEffect(L,D)},ve.useId=function(){return ke.current.useId()},ve.useImperativeHandle=function(L,D,ee){return ke.current.useImperativeHandle(L,D,ee)},ve.useInsertionEffect=function(L,D){return ke.current.useInsertionEffect(L,D)},ve.useLayoutEffect=function(L,D){return ke.current.useLayoutEffect(L,D)},ve.useMemo=function(L,D){return ke.current.useMemo(L,D)},ve.useReducer=function(L,D,ee){return ke.current.useReducer(L,D,ee)},ve.useRef=function(L){return ke.current.useRef(L)},ve.useState=function(L){return ke.current.useState(L)},ve.useSyncExternalStore=function(L,D,ee){return ke.current.useSyncExternalStore(L,D,ee)},ve.useTransition=function(){return ke.current.useTransition()},ve.version="18.3.1",ve}var Sy;function cf(){return Sy||(Sy=1,Uc.exports=lk()),Uc.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var ky;function uk(){if(ky)return so;ky=1;var e=cf(),n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(f,p,y){var g,v={},x=null,k=null;y!==void 0&&(x=""+y),p.key!==void 0&&(x=""+p.key),p.ref!==void 0&&(k=p.ref);for(g in p)i.call(p,g)&&!u.hasOwnProperty(g)&&(v[g]=p[g]);if(f&&f.defaultProps)for(g in p=f.defaultProps,p)v[g]===void 0&&(v[g]=p[g]);return{$$typeof:n,type:f,key:x,ref:k,props:v,_owner:a.current}}return so.Fragment=s,so.jsx=c,so.jsxs=c,so}var Cy;function ck(){return Cy||(Cy=1,$c.exports=uk()),$c.exports}var h=ck(),S=cf();const Iv=S.createContext(void 0),fn=e=>{const n=S.useContext(Iv);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},dk=({client:e,children:n})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(Iv.Provider,{value:e,children:n})),fk={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var vr,uf,Ev,hk=(Ev=class{constructor(){ue(this,vr,fk);ue(this,uf,!1)}setTimeoutProvider(e){J(this,vr,e)}setTimeout(e,n){return N(this,vr).setTimeout(e,n)}clearTimeout(e){N(this,vr).clearTimeout(e)}setInterval(e,n){return N(this,vr).setInterval(e,n)}clearInterval(e){N(this,vr).clearInterval(e)}},vr=new WeakMap,uf=new WeakMap,Ev);const Gr=new hk;function pk(e){setTimeout(e,0)}const mk=typeof window>"u"||"Deno"in globalThis;function wt(){}function yk(e,n){return typeof e=="function"?e(n):e}function Ov(e){return typeof e=="number"&&e>=0&&e!==1/0}function Fv(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Ve(e,n){return typeof e=="function"?e(n):e}function Ey(e,n){const{type:s="all",exact:i,fetchStatus:a,predicate:u,queryKey:c,stale:f}=e;if(c){if(i){if(n.queryHash!==df(c,n.options))return!1}else if(!ii(n.queryKey,c))return!1}if(s!=="all"){const p=n.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof f=="boolean"&&n.isStale()!==f||a&&a!==n.state.fetchStatus||u&&!u(n))}function Ty(e,n){const{exact:s,status:i,predicate:a,mutationKey:u}=e;if(u){if(!n.options.mutationKey)return!1;if(s){if(cs(n.options.mutationKey)!==cs(u))return!1}else if(!ii(n.options.mutationKey,u))return!1}return!(i&&n.state.status!==i||a&&!a(n))}function df(e,n){return((n==null?void 0:n.queryKeyHashFn)||cs)(e)}function cs(e){return JSON.stringify(e,(n,s)=>vd(s)?Object.keys(s).sort().reduce((i,a)=>(i[a]=s[a],i),{}):s)}function ii(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(Array.isArray(e)&&Array.isArray(n)){if(n.length>e.length)return!1;for(let i=0;i<n.length;i++)if(!ii(e[i],n[i]))return!1;return!0}const s=Object.keys(n);for(const i of s)if(!ii(e[i],n[i]))return!1;return!0}return!1}const gk=Object.prototype.hasOwnProperty;function _v(e,n,s=0){if(e===n)return e;if(s>500)return n;const i=Py(e)&&Py(n);if(!i&&!(vd(e)&&vd(n)))return n;const a=(i?e:Object.keys(e)).length,u=i?n:Object.keys(n),c=u.length,f=i?new Array(c):{};let p=0;for(let y=0;y<c;y++){const g=i?y:u[y],v=e[g],x=n[g];if(v===x){f[g]=v,(i?y<a:gk.call(e,g))&&p++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){f[g]=x;continue}const k=_v(v,x,s+1);f[g]=k,k===v&&p++}return a===c&&p===a?e:f}function al(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const s in e)if(e[s]!==n[s])return!1;return!0}function Py(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function vd(e){if(!Ny(e))return!1;const n=Object.getPrototypeOf(e),s=n==null?void 0:n.constructor;if(s===void 0)return!0;if(typeof s!="function")return!1;const i=s.prototype;return!(!Ny(i)||!i.hasOwnProperty("isPrototypeOf")||n!==Object.prototype)}function Ny(e){return Object.prototype.toString.call(e)==="[object Object]"}function vk(e){return new Promise(n=>{Gr.setTimeout(n,e)})}function xd(e,n,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,n):s.structuralSharing!==!1?_v(e,n):n}function xk(e){return e}function wk(e,n,s=0){const i=[...e,n];return s&&i.length>s?i.slice(1):i}function Sk(e,n,s=0){const i=[n,...e];return s&&i.length>s?i.slice(0,-1):i}const ff=Symbol();function Vv(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===ff?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function hf(e,n){return typeof e=="function"?e(...n):!!e}function kk(e,n,s){let i=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=n()),i||(i=!0,a.aborted?s():a.addEventListener("abort",s,{once:!0})),a)}),e}let Ck=()=>mk;const pf=()=>Ck();var ci=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Zr,xr,Ws,Tv,Ek=(Tv=class extends ci{constructor(){super();ue(this,Zr);ue(this,xr);ue(this,Ws);J(this,Ws,n=>{if(typeof window<"u"&&window.addEventListener){const s=()=>n();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){N(this,xr)||this.setEventListener(N(this,Ws))}onUnsubscribe(){var n;this.hasListeners()||((n=N(this,xr))==null||n.call(this),J(this,xr,void 0))}setEventListener(n){var s;J(this,Ws,n),(s=N(this,xr))==null||s.call(this),J(this,xr,n(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(n){N(this,Zr)!==n&&(J(this,Zr,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(s=>{s(n)})}isFocused(){var n;return typeof N(this,Zr)=="boolean"?N(this,Zr):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},Zr=new WeakMap,xr=new WeakMap,Ws=new WeakMap,Tv);const mf=new Ek,Tk=pk;function Pk(){let e=[],n=0,s=f=>{f()},i=f=>{f()},a=Tk;const u=f=>{n?e.push(f):a(()=>{s(f)})},c=()=>{const f=e;e=[],f.length&&a(()=>{i(()=>{f.forEach(p=>{s(p)})})})};return{batch:f=>{let p;n++;try{p=f()}finally{n--,n||c()}return p},batchCalls:f=>(...p)=>{u(()=>{f(...p)})},schedule:u,setNotifyFunction:f=>{s=f},setBatchNotifyFunction:f=>{i=f},setScheduler:f=>{a=f}}}const tt=Pk();var Qs,wr,qs,Pv,Nk=(Pv=class extends ci{constructor(){super();ue(this,Qs,!0);ue(this,wr);ue(this,qs);J(this,qs,n=>{if(typeof window<"u"&&window.addEventListener){const s=()=>n(!0),i=()=>n(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",i)}}})}onSubscribe(){N(this,wr)||this.setEventListener(N(this,qs))}onUnsubscribe(){var n;this.hasListeners()||((n=N(this,wr))==null||n.call(this),J(this,wr,void 0))}setEventListener(n){var s;J(this,qs,n),(s=N(this,wr))==null||s.call(this),J(this,wr,n(this.setOnline.bind(this)))}setOnline(n){N(this,Qs)!==n&&(J(this,Qs,n),this.listeners.forEach(s=>{s(n)}))}isOnline(){return N(this,Qs)}},Qs=new WeakMap,wr=new WeakMap,qs=new WeakMap,Pv);const vl=new Nk;function jk(e){return Math.min(1e3*2**e,3e4)}function zv(e){return(e??"online")==="online"?vl.isOnline():!0}var wd=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function $v(e){let n=!1,s=0,i,a="pending",u,c;const f=new Promise((I,R)=>{u=I,c=R});f.catch(wt);const p=()=>a!=="pending",y=I=>{var R;if(!p()){const O=new wd(I);T(O),(R=e.onCancel)==null||R.call(e,O)}},g=()=>{n=!0},v=()=>{n=!1},x=()=>mf.isFocused()&&(e.networkMode==="always"||vl.isOnline())&&e.canRun(),k=()=>zv(e.networkMode)&&e.canRun(),C=I=>{p()||(i==null||i(),a="resolved",u(I))},T=I=>{p()||(i==null||i(),a="rejected",c(I))},E=()=>new Promise(I=>{var R;i=O=>{(p()||x())&&I(O)},(R=e.onPause)==null||R.call(e)}).then(()=>{var I;i=void 0,p()||(I=e.onContinue)==null||I.call(e)}),j=()=>{if(p())return;let I;const R=s===0?e.initialPromise:void 0;try{I=R??e.fn()}catch(O){I=Promise.reject(O)}Promise.resolve(I).then(C).catch(O=>{var B;if(p())return;const F=e.retry??(pf()?0:3),U=e.retryDelay??jk,A=typeof U=="function"?U(s,O):U,_=F===!0||typeof F=="number"&&s<F||typeof F=="function"&&F(s,O);if(n||!_){T(O);return}s++,(B=e.onFail)==null||B.call(e,s,O),vk(A).then(()=>x()?void 0:E()).then(()=>{n?T(O):j()})})};return{promise:f,status:()=>a,cancel:y,continue:()=>(i==null||i(),f),cancelRetry:g,continueRetry:v,canStart:k,start:()=>(k()?j():E().then(j),f)}}var Jr,Nv,Uv=(Nv=class{constructor(){ue(this,Jr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ov(this.gcTime)&&J(this,Jr,Gr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(pf()?1/0:3e5))}clearGcTimeout(){N(this,Jr)!==void 0&&(Gr.clearTimeout(N(this,Jr)),J(this,Jr,void 0))}},Jr=new WeakMap,Nv);function bk(e){return{onFetch:(n,s)=>{var g,v,x,k,C;const i=n.options,a=(x=(v=(g=n.fetchOptions)==null?void 0:g.meta)==null?void 0:v.fetchMore)==null?void 0:x.direction,u=((k=n.state.data)==null?void 0:k.pages)||[],c=((C=n.state.data)==null?void 0:C.pageParams)||[];let f={pages:[],pageParams:[]},p=0;const y=async()=>{let T=!1;const E=R=>{kk(R,()=>n.signal,()=>T=!0)},j=Vv(n.options,n.fetchOptions),I=async(R,O,F)=>{if(T)return Promise.reject(n.signal.reason);if(O==null&&R.pages.length)return Promise.resolve(R);const A=(()=>{const ne={client:n.client,queryKey:n.queryKey,pageParam:O,direction:F?"backward":"forward",meta:n.options.meta};return E(ne),ne})(),_=await j(A),{maxPages:B}=n.options,Y=F?Sk:wk;return{pages:Y(R.pages,_,B),pageParams:Y(R.pageParams,O,B)}};if(a&&u.length){const R=a==="backward",O=R?Bv:Sd,F={pages:u,pageParams:c};f=await I(F,O(i,F),R)}else{const R=e??u.length;do{const O=p===0?c[0]??i.initialPageParam:Sd(i,f);if(p>0&&O==null)break;f=await I(f,O),p++}while(p<R)}return f};n.options.persister?n.fetchFn=()=>{var T,E;return(E=(T=n.options).persister)==null?void 0:E.call(T,y,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},s)}:n.fetchFn=y}}}function Sd(e,{pages:n,pageParams:s}){const i=n.length-1;return n.length>0?e.getNextPageParam(n[i],n,s[i],s):void 0}function Bv(e,{pages:n,pageParams:s}){var i;return n.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,n[0],n,s[0],s):void 0}function Rk(e,n){return n?Sd(e,n)!=null:!1}function Mk(e,n){return!n||!e.getPreviousPageParam?!1:Bv(e,n)!=null}var Gs,es,Ys,Bt,ts,Xe,Po,ns,on,Fn,jv,Dk=(jv=class extends Uv{constructor(n){super();ue(this,on);ue(this,Gs);ue(this,es);ue(this,Ys);ue(this,Bt);ue(this,ts);ue(this,Xe);ue(this,Po);ue(this,ns);J(this,ns,!1),J(this,Po,n.defaultOptions),this.setOptions(n.options),this.observers=[],J(this,ts,n.client),J(this,Bt,N(this,ts).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,J(this,es,by(this.options)),this.state=n.state??N(this,es),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return N(this,Gs)}get promise(){var n;return(n=N(this,Xe))==null?void 0:n.promise}setOptions(n){if(this.options={...N(this,Po),...n},n!=null&&n._type&&J(this,Gs,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=by(this.options);s.data!==void 0&&(this.setState(jy(s.data,s.dataUpdatedAt)),J(this,es,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&N(this,Bt).remove(this)}setData(n,s){const i=xd(this.state.data,n,this.options);return me(this,on,Fn).call(this,{data:i,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),i}setState(n){me(this,on,Fn).call(this,{type:"setState",state:n})}cancel(n){var i,a;const s=(i=N(this,Xe))==null?void 0:i.promise;return(a=N(this,Xe))==null||a.cancel(n),s?s.then(wt).catch(wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return N(this,es)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>Ve(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ff||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Ve(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!Fv(this.state.dataUpdatedAt,n)}onFocus(){var n,s;(n=this.observers.find(i=>i.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(s=N(this,Xe))==null||s.continue()}onOnline(){var n,s;(n=this.observers.find(i=>i.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(s=N(this,Xe))==null||s.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),N(this,Bt).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){const s=this.observers.indexOf(n);s!==-1&&(this.observers.splice(s,1),this.observers.length||(N(this,Xe)&&(N(this,ns)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?N(this,Xe).cancel({revert:!0}):N(this,Xe).cancelRetry()),this.scheduleGc()),N(this,Bt).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||me(this,on,Fn).call(this,{type:"invalidate"})}async fetch(n,s){var y,g,v,x,k,C,T,E,j,I,R,O;if(this.state.fetchStatus!=="idle"&&((y=N(this,Xe))==null?void 0:y.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(N(this,Xe))return N(this,Xe).continueRetry(),N(this,Xe).promise}if(n&&this.setOptions(n),!this.options.queryFn){const F=this.observers.find(U=>U.options.queryFn);F&&this.setOptions(F.options)}const i=new AbortController,a=F=>{Object.defineProperty(F,"signal",{enumerable:!0,get:()=>(J(this,ns,!0),i.signal)})},u=()=>{const F=Vv(this.options,s),A=(()=>{const _={client:N(this,ts),queryKey:this.queryKey,meta:this.meta};return a(_),_})();return J(this,ns,!1),this.options.persister?this.options.persister(F,A,this):F(A)},f=(()=>{const F={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:N(this,ts),state:this.state,fetchFn:u};return a(F),F})();(g=N(this,Gs)==="infinite"?bk(this.options.pages):this.options.behavior)==null||g.onFetch(f,this),J(this,Ys,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=f.fetchOptions)==null?void 0:v.meta))&&me(this,on,Fn).call(this,{type:"fetch",meta:(x=f.fetchOptions)==null?void 0:x.meta});const p=J(this,Xe,$v({initialPromise:s==null?void 0:s.initialPromise,fn:f.fetchFn,onCancel:F=>{F instanceof wd&&F.revert&&this.setState({...N(this,Ys),fetchStatus:"idle"}),i.abort()},onFail:(F,U)=>{me(this,on,Fn).call(this,{type:"failed",failureCount:F,error:U})},onPause:()=>{me(this,on,Fn).call(this,{type:"pause"})},onContinue:()=>{me(this,on,Fn).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const F=await p.start();if(F===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(F),(C=(k=N(this,Bt).config).onSuccess)==null||C.call(k,F,this),(E=(T=N(this,Bt).config).onSettled)==null||E.call(T,F,this.state.error,this),F}catch(F){if(F instanceof wd){if(F.silent)return N(this,Xe).promise;if(F.revert){if(this.state.data===void 0)throw F;return this.state.data}}throw me(this,on,Fn).call(this,{type:"error",error:F}),(I=(j=N(this,Bt).config).onError)==null||I.call(j,F,this),(O=(R=N(this,Bt).config).onSettled)==null||O.call(R,this.state.data,F,this),F}finally{N(this,Xe)===p&&J(this,Xe,void 0),this.scheduleGc()}}},Gs=new WeakMap,es=new WeakMap,Ys=new WeakMap,Bt=new WeakMap,ts=new WeakMap,Xe=new WeakMap,Po=new WeakMap,ns=new WeakMap,on=new WeakSet,Fn=function(n){const s=i=>{switch(n.type){case"failed":return{...i,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Hv(i.data,this.options),fetchMeta:n.meta??null};case"success":const a={...i,...jy(n.data,n.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return J(this,Ys,n.manual?a:void 0),a;case"error":const u=n.error;return{...i,error:u,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...n.state}}};this.state=s(this.state),tt.batch(()=>{this.observers.slice().forEach(i=>{i.onQueryUpdate()}),N(this,Bt).notify({query:this,type:"updated",action:n})})},jv);function Hv(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:zv(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function jy(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function by(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,s=n!==void 0,i=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var vt,xe,No,xt,rs,Xs,zn,jo,Zs,Js,ss,is,Sr,ei,je,uo,kd,Cd,Ed,Td,Pd,Nd,jd,bd,bv,Kv=(bv=class extends ci{constructor(n,s){super();ue(this,je);ue(this,vt);ue(this,xe);ue(this,No);ue(this,xt);ue(this,rs);ue(this,Xs);ue(this,zn);ue(this,jo);ue(this,Zs);ue(this,Js);ue(this,ss);ue(this,is);ue(this,Sr);ue(this,ei,new Set);this.options=s,J(this,vt,n),J(this,zn,null),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(N(this,xe).addObserver(this),Ry(N(this,xe),this.options)?me(this,je,uo).call(this):this.updateResult(),me(this,je,Pd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Rd(N(this,xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Rd(N(this,xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,me(this,je,Nd).call(this),me(this,je,jd).call(this),N(this,xe).removeObserver(this)}setOptions(n){const s=this.options,i=N(this,xe);if(this.options=N(this,vt).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ve(this.options.enabled,N(this,xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");me(this,je,bd).call(this),N(this,xe).setOptions(this.options),s._defaulted&&!al(this.options,s)&&N(this,vt).getQueryCache().notify({type:"observerOptionsUpdated",query:N(this,xe),observer:this});const a=this.hasListeners();a&&My(N(this,xe),i,this.options,s)&&me(this,je,uo).call(this),this.updateResult(),a&&(N(this,xe)!==i||Ve(this.options.enabled,N(this,xe))!==Ve(s.enabled,N(this,xe))||Ve(this.options.staleTime,N(this,xe))!==Ve(s.staleTime,N(this,xe)))&&me(this,je,Cd).call(this);const u=me(this,je,Ed).call(this);a&&(N(this,xe)!==i||Ve(this.options.enabled,N(this,xe))!==Ve(s.enabled,N(this,xe))||u!==N(this,Sr))&&me(this,je,Td).call(this,u)}getOptimisticResult(n){const s=N(this,vt).getQueryCache().build(N(this,vt),n),i=this.createResult(s,n);return al(this.getCurrentResult(),i)||(J(this,xt,i),J(this,Xs,this.options),J(this,rs,N(this,xe).state)),i}getCurrentResult(){return N(this,xt)}trackResult(n,s){return new Proxy(n,{get:(i,a)=>(this.trackProp(a),s==null||s(a),Reflect.get(i,a))})}trackProp(n){N(this,ei).add(n)}getCurrentQuery(){return N(this,xe)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const s=N(this,vt).defaultQueryOptions(n),i=N(this,vt).getQueryCache().build(N(this,vt),s);let a=()=>{},u;const c=new Promise(f=>{u=f,a=N(this,vt).getQueryCache().subscribe(p=>{p.type==="updated"&&p.query.queryHash===i.queryHash&&i.state.data!==void 0&&(a(),f(this.createResult(i,s)))})});return Promise.race([i.fetch().then(()=>{const f=this.createResult(i,s);return u==null||u(f),f}).finally(()=>{a()}),c])}fetch(n){return me(this,je,uo).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),N(this,xt)))}createResult(n,s){var U;const i=N(this,xe),a=this.options,u=N(this,xt),c=N(this,rs),f=N(this,Xs),p=n!==i?n.state:N(this,No),{state:y}=n;let g={...y},v=!1,x;if(s._optimisticResults){const A=this.hasListeners(),_=!A&&Ry(n,s),B=A&&My(n,i,s,a);(_||B)&&(g={...g,...Hv(y.data,n.options)}),s._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:k,errorUpdatedAt:C,status:T}=g;x=g.data;let E=!1;if(s.placeholderData!==void 0&&x===void 0&&T==="pending"){let A;u!=null&&u.isPlaceholderData&&s.placeholderData===(f==null?void 0:f.placeholderData)?(A=u.data,E=!0):A=typeof s.placeholderData=="function"?s.placeholderData((U=N(this,Js))==null?void 0:U.state.data,N(this,Js)):s.placeholderData,A!==void 0&&(T="success",x=xd(u==null?void 0:u.data,A,s),v=!0)}if(s.select&&x!==void 0&&!E)if(u&&x===(c==null?void 0:c.data)&&s.select===N(this,jo))x=N(this,Zs);else try{J(this,jo,s.select),x=s.select(x),x=xd(u==null?void 0:u.data,x,s),J(this,Zs,x),J(this,zn,null)}catch(A){J(this,zn,A)}else x===void 0&&J(this,zn,null);N(this,zn)&&(k=N(this,zn),x=N(this,Zs),C=Date.now(),T="error",v=!1);const j=g.fetchStatus==="fetching",I=T==="pending",R=T==="error",O=I&&j,F=x!==void 0;return{status:T,fetchStatus:g.fetchStatus,isPending:I,isSuccess:T==="success",isError:R,isInitialLoading:O,isLoading:O,data:x,dataUpdatedAt:g.dataUpdatedAt,error:k,errorUpdatedAt:C,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:g.dataUpdateCount>p.dataUpdateCount||g.errorUpdateCount>p.errorUpdateCount,isFetching:j,isRefetching:j&&!I,isLoadingError:R&&!F,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:R&&F,isStale:yf(n,s),refetch:this.refetch,isEnabled:Ve(s.enabled,n)!==!1}}updateResult(){const n=N(this,xt),s=this.createResult(N(this,xe),this.options);if(J(this,rs,N(this,xe).state),J(this,Xs,this.options),N(this,rs).data!==void 0&&J(this,Js,N(this,xe)),al(s,n))return;J(this,xt,s);const a=(()=>{if(!n)return!0;const{notifyOnChangeProps:u}=this.options,c=typeof u=="function"?u():u;if(c==="all"||!c&&!N(this,ei).size)return!0;const f=new Set(c??N(this,ei));return this.options.throwOnError&&f.add("error"),Object.keys(N(this,xt)).some(p=>{const y=p;return N(this,xt)[y]!==n[y]&&f.has(y)})})();tt.batch(()=>{a&&this.listeners.forEach(u=>{u(N(this,xt))}),N(this,vt).getQueryCache().notify({query:N(this,xe),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&me(this,je,Pd).call(this)}},vt=new WeakMap,xe=new WeakMap,No=new WeakMap,xt=new WeakMap,rs=new WeakMap,Xs=new WeakMap,zn=new WeakMap,jo=new WeakMap,Zs=new WeakMap,Js=new WeakMap,ss=new WeakMap,is=new WeakMap,Sr=new WeakMap,ei=new WeakMap,je=new WeakSet,uo=function(n){me(this,je,bd).call(this);let s=N(this,xe).fetch(this.options,n);return n!=null&&n.throwOnError||(s=s.catch(wt)),s},kd=function(n){return!pf()&&Ve(this.options.enabled,N(this,xe))!==!1&&Ov(n)},Cd=function(){me(this,je,Nd).call(this);const n=Ve(this.options.staleTime,N(this,xe));if(N(this,xt).isStale||!me(this,je,kd).call(this,n))return;const s=Fv(N(this,xt).dataUpdatedAt,n)+1;J(this,ss,Gr.setTimeout(()=>{N(this,xt).isStale||this.updateResult()},s))},Ed=function(){return Ve(this.options.refetchInterval,N(this,xe))??!1},Td=function(n){me(this,je,jd).call(this),J(this,Sr,n),!(N(this,Sr)===0||!me(this,je,kd).call(this,N(this,Sr)))&&J(this,is,Gr.setInterval(()=>{(this.options.refetchIntervalInBackground||mf.isFocused())&&me(this,je,uo).call(this)},N(this,Sr)))},Pd=function(){me(this,je,Cd).call(this),me(this,je,Td).call(this,me(this,je,Ed).call(this))},Nd=function(){N(this,ss)!==void 0&&(Gr.clearTimeout(N(this,ss)),J(this,ss,void 0))},jd=function(){N(this,is)!==void 0&&(Gr.clearInterval(N(this,is)),J(this,is,void 0))},bd=function(){const n=N(this,vt).getQueryCache().build(N(this,vt),this.options);if(n===N(this,xe))return;const s=N(this,xe);J(this,xe,n),J(this,No,n.state),this.hasListeners()&&(s==null||s.removeObserver(this),n.addObserver(this))},bv);function Ak(e,n){return Ve(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Ve(n.retryOnMount,e)===!1)}function Ry(e,n){return Ak(e,n)||e.state.data!==void 0&&Rd(e,n,n.refetchOnMount)}function Rd(e,n,s){if(Ve(n.enabled,e)!==!1&&Ve(n.staleTime,e)!=="static"){const i=Ve(s,e);return i==="always"||i!==!1&&yf(e,n)}return!1}function My(e,n,s,i){return(e!==n||Ve(i.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&yf(e,s)}function yf(e,n){return Ve(n.enabled,e)!==!1&&e.isStaleByTime(Ve(n.staleTime,e))}var Lk=class extends Kv{constructor(e,n){super(e,n)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,n){var k,C;const{state:s}=e,i=super.createResult(e,n),{isFetching:a,isRefetching:u,isError:c,isRefetchError:f}=i,p=(C=(k=s.fetchMeta)==null?void 0:k.fetchMore)==null?void 0:C.direction,y=c&&p==="forward",g=a&&p==="forward",v=c&&p==="backward",x=a&&p==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Rk(n,s.data),hasPreviousPage:Mk(n,s.data),isFetchNextPageError:y,isFetchingNextPage:g,isFetchPreviousPageError:v,isFetchingPreviousPage:x,isRefetchError:f&&!y&&!v,isRefetching:u&&!g&&!x}}},bo,kn,pt,os,Cn,yr,Rv,Ik=(Rv=class extends Uv{constructor(n){super();ue(this,Cn);ue(this,bo);ue(this,kn);ue(this,pt);ue(this,os);J(this,bo,n.client),this.mutationId=n.mutationId,J(this,pt,n.mutationCache),J(this,kn,[]),this.state=n.state||Wv(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){N(this,kn).includes(n)||(N(this,kn).push(n),this.clearGcTimeout(),N(this,pt).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){J(this,kn,N(this,kn).filter(s=>s!==n)),this.scheduleGc(),N(this,pt).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){N(this,kn).length||(this.state.status==="pending"?this.scheduleGc():N(this,pt).remove(this))}continue(){var n;return((n=N(this,os))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var f,p,y,g,v,x,k,C,T,E,j,I,R,O,F,U,A,_;const s=()=>{me(this,Cn,yr).call(this,{type:"continue"})},i={client:N(this,bo),meta:this.options.meta,mutationKey:this.options.mutationKey},a=J(this,os,$v({fn:()=>this.options.mutationFn?this.options.mutationFn(n,i):Promise.reject(new Error("No mutationFn found")),onFail:(B,Y)=>{me(this,Cn,yr).call(this,{type:"failed",failureCount:B,error:Y})},onPause:()=>{me(this,Cn,yr).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>N(this,pt).canRun(this)})),u=this.state.status==="pending",c=!a.canStart();try{if(u)s();else{me(this,Cn,yr).call(this,{type:"pending",variables:n,isPaused:c}),N(this,pt).config.onMutate&&await N(this,pt).config.onMutate(n,this,i);const Y=await((p=(f=this.options).onMutate)==null?void 0:p.call(f,n,i));Y!==this.state.context&&me(this,Cn,yr).call(this,{type:"pending",context:Y,variables:n,isPaused:c})}const B=await a.start();return await((g=(y=N(this,pt).config).onSuccess)==null?void 0:g.call(y,B,n,this.state.context,this,i)),await((x=(v=this.options).onSuccess)==null?void 0:x.call(v,B,n,this.state.context,i)),await((C=(k=N(this,pt).config).onSettled)==null?void 0:C.call(k,B,null,this.state.variables,this.state.context,this,i)),await((E=(T=this.options).onSettled)==null?void 0:E.call(T,B,null,n,this.state.context,i)),me(this,Cn,yr).call(this,{type:"success",data:B}),B}catch(B){try{await((I=(j=N(this,pt).config).onError)==null?void 0:I.call(j,B,n,this.state.context,this,i))}catch(Y){Promise.reject(Y)}try{await((O=(R=this.options).onError)==null?void 0:O.call(R,B,n,this.state.context,i))}catch(Y){Promise.reject(Y)}try{await((U=(F=N(this,pt).config).onSettled)==null?void 0:U.call(F,void 0,B,this.state.variables,this.state.context,this,i))}catch(Y){Promise.reject(Y)}try{await((_=(A=this.options).onSettled)==null?void 0:_.call(A,void 0,B,n,this.state.context,i))}catch(Y){Promise.reject(Y)}throw me(this,Cn,yr).call(this,{type:"error",error:B}),B}finally{N(this,os)===a&&J(this,os,void 0),N(this,pt).runNext(this)}}},bo=new WeakMap,kn=new WeakMap,pt=new WeakMap,os=new WeakMap,Cn=new WeakSet,yr=function(n){const s=i=>{switch(n.type){case"failed":return{...i,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...i,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:n.error,failureCount:i.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=s(this.state),tt.batch(()=>{N(this,kn).forEach(i=>{i.onMutationUpdate(n)}),N(this,pt).notify({mutation:this,type:"updated",action:n})})},Rv);function Wv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $n,an,Ro,Mv,Ok=(Mv=class extends ci{constructor(n={}){super();ue(this,$n);ue(this,an);ue(this,Ro);this.config=n,J(this,$n,new Set),J(this,an,new Map),J(this,Ro,0)}build(n,s,i){const a=new Ik({client:n,mutationCache:this,mutationId:++Ga(this,Ro)._,options:n.defaultMutationOptions(s),state:i});return this.add(a),a}add(n){N(this,$n).add(n);const s=Ya(n);if(typeof s=="string"){const i=N(this,an).get(s);i?i.push(n):N(this,an).set(s,[n])}this.notify({type:"added",mutation:n})}remove(n){if(N(this,$n).delete(n)){const s=Ya(n);if(typeof s=="string"){const i=N(this,an).get(s);if(i)if(i.length>1){const a=i.indexOf(n);a!==-1&&i.splice(a,1)}else i[0]===n&&N(this,an).delete(s)}}this.notify({type:"removed",mutation:n})}canRun(n){var i;const s=Ya(n);if(typeof s=="string"){const a=(i=N(this,an).get(s))==null?void 0:i.find(u=>u.state.status==="pending");return!a||a===n}else return!0}runNext(n){var i,a;const s=Ya(n);return typeof s=="string"?((a=(i=N(this,an).get(s))==null?void 0:i.find(u=>u!==n&&u.state.isPaused))==null?void 0:a.continue())??Promise.resolve():Promise.resolve()}clear(){tt.batch(()=>{N(this,$n).forEach(n=>{this.notify({type:"removed",mutation:n})}),N(this,$n).clear(),N(this,an).clear()})}getAll(){return Array.from(N(this,$n))}find(n){const s={exact:!0,...n};return this.getAll().find(i=>Ty(s,i))}findAll(n={}){return this.getAll().filter(s=>Ty(n,s))}notify(n){tt.batch(()=>{this.listeners.forEach(s=>{s(n)})})}resumePausedMutations(){const n=this.getAll().filter(s=>s.state.isPaused);return tt.batch(()=>Promise.all(n.map(s=>s.continue().catch(wt))))}},$n=new WeakMap,an=new WeakMap,Ro=new WeakMap,Mv);function Ya(e){var n;return(n=e.options.scope)==null?void 0:n.id}var Un,kr,mt,Bn,Nn,co,Md,Dv,Fk=(Dv=class extends ci{constructor(s,i){super();ue(this,Nn);ue(this,Un);ue(this,kr);ue(this,mt);ue(this,Bn);J(this,Un,s),this.setOptions(i),this.bindMethods(),me(this,Nn,co).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){var a;const i=this.options;this.options=N(this,Un).defaultMutationOptions(s),al(this.options,i)||N(this,Un).getMutationCache().notify({type:"observerOptionsUpdated",mutation:N(this,mt),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&cs(i.mutationKey)!==cs(this.options.mutationKey)?this.reset():((a=N(this,mt))==null?void 0:a.state.status)==="pending"&&N(this,mt).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&N(this,mt)&&(N(this,mt).addObserver(this),me(this,Nn,co).call(this))}onUnsubscribe(){var s;this.hasListeners()||(s=N(this,mt))==null||s.removeObserver(this)}onMutationUpdate(s){me(this,Nn,co).call(this),me(this,Nn,Md).call(this,s)}getCurrentResult(){return N(this,kr)}reset(){var s;(s=N(this,mt))==null||s.removeObserver(this),J(this,mt,void 0),me(this,Nn,co).call(this),me(this,Nn,Md).call(this)}mutate(s,i){var a;return J(this,Bn,i),(a=N(this,mt))==null||a.removeObserver(this),J(this,mt,N(this,Un).getMutationCache().build(N(this,Un),this.options)),N(this,mt).addObserver(this),N(this,mt).execute(s)}},Un=new WeakMap,kr=new WeakMap,mt=new WeakMap,Bn=new WeakMap,Nn=new WeakSet,co=function(){var i;const s=((i=N(this,mt))==null?void 0:i.state)??Wv();J(this,kr,{...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset})},Md=function(s){tt.batch(()=>{var i,a,u,c,f,p,y,g;if(N(this,Bn)&&this.hasListeners()){const v=N(this,kr).variables,x=N(this,kr).context,k={client:N(this,Un),meta:this.options.meta,mutationKey:this.options.mutationKey};if((s==null?void 0:s.type)==="success"){try{(a=(i=N(this,Bn)).onSuccess)==null||a.call(i,s.data,v,x,k)}catch(C){Promise.reject(C)}try{(c=(u=N(this,Bn)).onSettled)==null||c.call(u,s.data,null,v,x,k)}catch(C){Promise.reject(C)}}else if((s==null?void 0:s.type)==="error"){try{(p=(f=N(this,Bn)).onError)==null||p.call(f,s.error,v,x,k)}catch(C){Promise.reject(C)}try{(g=(y=N(this,Bn)).onSettled)==null||g.call(y,void 0,s.error,v,x,k)}catch(C){Promise.reject(C)}}}this.listeners.forEach(v=>{v(N(this,kr))})})},Dv),En,Av,_k=(Av=class extends ci{constructor(n={}){super();ue(this,En);this.config=n,J(this,En,new Map)}build(n,s,i){const a=s.queryKey,u=s.queryHash??df(a,s);let c=this.get(u);return c||(c=new Dk({client:n,queryKey:a,queryHash:u,options:n.defaultQueryOptions(s),state:i,defaultOptions:n.getQueryDefaults(a)}),this.add(c)),c}add(n){N(this,En).has(n.queryHash)||(N(this,En).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){N(this,En).get(n.queryHash)===n&&(n.destroy(),N(this,En).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){tt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return N(this,En).get(n)}getAll(){return[...N(this,En).values()]}find(n){const s={exact:!0,...n};return this.getAll().find(i=>Ey(s,i))}findAll(n={}){const s=this.getAll();return Object.keys(n).length>0?s.filter(i=>Ey(n,i)):s}notify(n){tt.batch(()=>{this.listeners.forEach(s=>{s(n)})})}onFocus(){tt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){tt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},En=new WeakMap,Av),Be,Cr,Er,ti,ni,Tr,ri,si,Lv,Vk=(Lv=class{constructor(e={}){ue(this,Be);ue(this,Cr);ue(this,Er);ue(this,ti);ue(this,ni);ue(this,Tr);ue(this,ri);ue(this,si);J(this,Be,e.queryCache||new _k),J(this,Cr,e.mutationCache||new Ok),J(this,Er,e.defaultOptions||{}),J(this,ti,new Map),J(this,ni,new Map),J(this,Tr,0)}mount(){Ga(this,Tr)._++,N(this,Tr)===1&&(J(this,ri,mf.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,Be).onFocus())})),J(this,si,vl.subscribe(async e=>{e&&(await this.resumePausedMutations(),N(this,Be).onOnline())})))}unmount(){var e,n;Ga(this,Tr)._--,N(this,Tr)===0&&((e=N(this,ri))==null||e.call(this),J(this,ri,void 0),(n=N(this,si))==null||n.call(this),J(this,si,void 0))}isFetching(e){return N(this,Be).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return N(this,Cr).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const n=this.defaultQueryOptions({queryKey:e});return(s=N(this,Be).get(n.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),s=N(this,Be).build(this,n),i=s.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(Ve(n.staleTime,s))&&this.prefetchQuery(n),Promise.resolve(i))}getQueriesData(e){return N(this,Be).findAll(e).map(({queryKey:n,state:s})=>[n,s.data])}setQueryData(e,n,s){var c;const i=this.defaultQueryOptions({queryKey:e}),a=(c=N(this,Be).get(i.queryHash))==null?void 0:c.state.data,u=yk(n,a);if(u!==void 0)return N(this,Be).build(this,i).setData(u,{...s,manual:!0})}setQueriesData(e,n,s){return tt.batch(()=>N(this,Be).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,n,s)]))}getQueryState(e){var s;const n=this.defaultQueryOptions({queryKey:e});return(s=N(this,Be).get(n.queryHash))==null?void 0:s.state}removeQueries(e){const n=N(this,Be);tt.batch(()=>{n.findAll(e).forEach(s=>{n.remove(s)})})}resetQueries(e,n){const s=N(this,Be);return tt.batch(()=>{const i=s.findAll(e),a=new Set(i);return i.forEach(u=>{u.reset()}),this.refetchQueries({type:"active",predicate:u=>a.has(u)},n)})}cancelQueries(e,n={}){const s={revert:!0,...n},i=tt.batch(()=>N(this,Be).findAll(e).map(a=>a.cancel(s)));return Promise.all(i).then(wt).catch(wt)}invalidateQueries(e,n={}){return tt.batch(()=>(N(this,Be).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},n)))}refetchQueries(e,n={}){const s={...n,cancelRefetch:n.cancelRefetch??!0},i=tt.batch(()=>N(this,Be).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let u=a.fetch(void 0,s);return s.throwOnError||(u=u.catch(wt)),a.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(i).then(wt)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const s=N(this,Be).build(this,n),i=s.isStaleByTime(Ve(n.staleTime,s))?await s.fetch(n):s.state.data,a=n.select;return a?a(i):i}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const s=N(this,Be).build(this,n);return s.isStaleByTime(Ve(n.staleTime,s))?s.fetch(n):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(wt).catch(wt)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(wt).catch(wt)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return vl.isOnline()?N(this,Cr).resumePausedMutations():Promise.resolve()}getQueryCache(){return N(this,Be)}getMutationCache(){return N(this,Cr)}getDefaultOptions(){return N(this,Er)}setDefaultOptions(e){J(this,Er,e)}setQueryDefaults(e,n){N(this,ti).set(cs(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...N(this,ti).values()],s={};return n.forEach(i=>{ii(e,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(e,n){N(this,ni).set(cs(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...N(this,ni).values()],s={};return n.forEach(i=>{ii(e,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const n={...N(this,Er).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=df(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===ff&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...N(this,Er).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){N(this,Be).clear(),N(this,Cr).clear()}},Be=new WeakMap,Cr=new WeakMap,Er=new WeakMap,ti=new WeakMap,ni=new WeakMap,Tr=new WeakMap,ri=new WeakMap,si=new WeakMap,Lv);const Qv=S.createContext(!1),zk=()=>S.useContext(Qv);Qv.Provider;function $k(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Uk=S.createContext($k()),Bk=()=>S.useContext(Uk),Hk=(e,n,s)=>{const i=s!=null&&s.state.error&&typeof e.throwOnError=="function"?hf(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||i)&&(n.isReset()||(e.retryOnMount=!1))},Kk=e=>{S.useEffect(()=>{e.clearReset()},[e])},Wk=({result:e,errorResetBoundary:n,throwOnError:s,query:i,suspense:a})=>e.isError&&!n.isReset()&&!e.isFetching&&i&&(a&&e.data===void 0||hf(s,[e.error,i])),Qk=e=>{if(e.suspense){const s=a=>a==="static"?a:Math.max(a??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...a)=>s(i(...a)):s(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},qk=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,Gk=(e,n,s)=>n.fetchOptimistic(e).catch(()=>{s.clearReset()});function qv(e,n,s){const i=zk(),a=Bk(),u=fn(),c=u.defaultQueryOptions(e),f=u.getQueryCache().get(c.queryHash),p=e.subscribed!==!1;c._optimisticResults=i?"isRestoring":p?"optimistic":void 0,Qk(c),Hk(c,a,f),Kk(a);const[y]=S.useState(()=>new n(u,c)),g=y.getOptimisticResult(c),v=!i&&p;if(S.useSyncExternalStore(S.useCallback(x=>{const k=v?y.subscribe(tt.batchCalls(x)):wt;return y.updateResult(),k},[y,v]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),S.useEffect(()=>{y.setOptions(c)},[c,y]),qk(c,g))throw Gk(c,y,a);if(Wk({result:g,errorResetBoundary:a,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw g.error;return c.notifyOnChangeProps?g:y.trackResult(g)}function Rr(e,n){return qv(e,Kv)}function Kt(e,n){const s=fn(),[i]=S.useState(()=>new Fk(s,e));S.useEffect(()=>{i.setOptions(e)},[i,e]);const a=S.useSyncExternalStore(S.useCallback(c=>i.subscribe(tt.batchCalls(c)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),u=S.useCallback((...c)=>{i.mutate(c[0],c[1]).catch(wt)},[i]);if(a.error&&hf(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:u,mutateAsync:a.mutate}}function Yk(e,n){return qv(e,Lk)}var Xa={},Bc={exports:{}},Nt={},Hc={exports:{}},Kc={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Dy;function Xk(){return Dy||(Dy=1,(function(e){function n(Z,le){var q=Z.length;Z.push(le);e:for(;0<q;){var L=q-1>>>1,D=Z[L];if(0<a(D,le))Z[L]=le,Z[q]=D,q=L;else break e}}function s(Z){return Z.length===0?null:Z[0]}function i(Z){if(Z.length===0)return null;var le=Z[0],q=Z.pop();if(q!==le){Z[0]=q;e:for(var L=0,D=Z.length,ee=D>>>1;L<ee;){var ye=2*(L+1)-1,Ee=Z[ye],Te=ye+1,Ae=Z[Te];if(0>a(Ee,q))Te<D&&0>a(Ae,Ee)?(Z[L]=Ae,Z[Te]=q,L=Te):(Z[L]=Ee,Z[ye]=q,L=ye);else if(Te<D&&0>a(Ae,q))Z[L]=Ae,Z[Te]=q,L=Te;else break e}}return le}function a(Z,le){var q=Z.sortIndex-le.sortIndex;return q!==0?q:Z.id-le.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var p=[],y=[],g=1,v=null,x=3,k=!1,C=!1,T=!1,E=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(Z){for(var le=s(y);le!==null;){if(le.callback===null)i(y);else if(le.startTime<=Z)i(y),le.sortIndex=le.expirationTime,n(p,le);else break;le=s(y)}}function O(Z){if(T=!1,R(Z),!C)if(s(p)!==null)C=!0,ge(F);else{var le=s(y);le!==null&&ke(O,le.startTime-Z)}}function F(Z,le){C=!1,T&&(T=!1,j(_),_=-1),k=!0;var q=x;try{for(R(le),v=s(p);v!==null&&(!(v.expirationTime>le)||Z&&!ne());){var L=v.callback;if(typeof L=="function"){v.callback=null,x=v.priorityLevel;var D=L(v.expirationTime<=le);le=e.unstable_now(),typeof D=="function"?v.callback=D:v===s(p)&&i(p),R(le)}else i(p);v=s(p)}if(v!==null)var ee=!0;else{var ye=s(y);ye!==null&&ke(O,ye.startTime-le),ee=!1}return ee}finally{v=null,x=q,k=!1}}var U=!1,A=null,_=-1,B=5,Y=-1;function ne(){return!(e.unstable_now()-Y<B)}function G(){if(A!==null){var Z=e.unstable_now();Y=Z;var le=!0;try{le=A(!0,Z)}finally{le?X():(U=!1,A=null)}}else U=!1}var X;if(typeof I=="function")X=function(){I(G)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,Se=fe.port2;fe.port1.onmessage=G,X=function(){Se.postMessage(null)}}else X=function(){E(G,0)};function ge(Z){A=Z,U||(U=!0,X())}function ke(Z,le){_=E(function(){Z(e.unstable_now())},le)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Z){Z.callback=null},e.unstable_continueExecution=function(){C||k||(C=!0,ge(F))},e.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<Z?Math.floor(1e3/Z):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return s(p)},e.unstable_next=function(Z){switch(x){case 1:case 2:case 3:var le=3;break;default:le=x}var q=x;x=le;try{return Z()}finally{x=q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Z,le){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var q=x;x=Z;try{return le()}finally{x=q}},e.unstable_scheduleCallback=function(Z,le,q){var L=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?L+q:L):q=L,Z){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=q+D,Z={id:g++,callback:le,priorityLevel:Z,startTime:q,expirationTime:D,sortIndex:-1},q>L?(Z.sortIndex=q,n(y,Z),s(p)===null&&Z===s(y)&&(T?(j(_),_=-1):T=!0,ke(O,q-L))):(Z.sortIndex=D,n(p,Z),C||k||(C=!0,ge(F))),Z},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(Z){var le=x;return function(){var q=x;x=le;try{return Z.apply(this,arguments)}finally{x=q}}}})(Kc)),Kc}var Ay;function Zk(){return Ay||(Ay=1,Hc.exports=Xk()),Hc.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Ly;function Jk(){if(Ly)return Nt;Ly=1;var e=cf(),n=Zk();function s(t){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+t,o=1;o<arguments.length;o++)r+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,a={};function u(t,r){c(t,r),c(t+"Capture",r)}function c(t,r){for(a[t]=r,t=0;t<r.length;t++)i.add(r[t])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,y=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,g={},v={};function x(t){return p.call(v,t)?!0:p.call(g,t)?!1:y.test(t)?v[t]=!0:(g[t]=!0,!1)}function k(t,r,o,l){if(o!==null&&o.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return l?!1:o!==null?!o.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function C(t,r,o,l){if(r===null||typeof r>"u"||k(t,r,o,l))return!0;if(l)return!1;if(o!==null)switch(o.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function T(t,r,o,l,d,m,w){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=l,this.attributeNamespace=d,this.mustUseProperty=o,this.propertyName=t,this.type=r,this.sanitizeURL=m,this.removeEmptyString=w}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){E[t]=new T(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var r=t[0];E[r]=new T(r,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){E[t]=new T(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){E[t]=new T(t,2,!1,t,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){E[t]=new T(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){E[t]=new T(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){E[t]=new T(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){E[t]=new T(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){E[t]=new T(t,5,!1,t.toLowerCase(),null,!1,!1)});var j=/[\-:]([a-z])/g;function I(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var r=t.replace(j,I);E[r]=new T(r,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var r=t.replace(j,I);E[r]=new T(r,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var r=t.replace(j,I);E[r]=new T(r,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){E[t]=new T(t,1,!1,t.toLowerCase(),null,!1,!1)}),E.xlinkHref=new T("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){E[t]=new T(t,1,!1,t.toLowerCase(),null,!0,!0)});function R(t,r,o,l){var d=E.hasOwnProperty(r)?E[r]:null;(d!==null?d.type!==0:l||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(C(r,o,d,l)&&(o=null),l||d===null?x(r)&&(o===null?t.removeAttribute(r):t.setAttribute(r,""+o)):d.mustUseProperty?t[d.propertyName]=o===null?d.type===3?!1:"":o:(r=d.attributeName,l=d.attributeNamespace,o===null?t.removeAttribute(r):(d=d.type,o=d===3||d===4&&o===!0?"":""+o,l?t.setAttributeNS(l,r,o):t.setAttribute(r,o))))}var O=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,F=Symbol.for("react.element"),U=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),Y=Symbol.for("react.provider"),ne=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),Se=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),ke=Symbol.for("react.offscreen"),Z=Symbol.iterator;function le(t){return t===null||typeof t!="object"?null:(t=Z&&t[Z]||t["@@iterator"],typeof t=="function"?t:null)}var q=Object.assign,L;function D(t){if(L===void 0)try{throw Error()}catch(o){var r=o.stack.trim().match(/\n( *(at )?)/);L=r&&r[1]||""}return`
|
|
34
|
+
`+L+t}var ee=!1;function ye(t,r){if(!t||ee)return"";ee=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(r)if(r=function(){throw Error()},Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(r,[])}catch($){var l=$}Reflect.construct(t,[],r)}else{try{r.call()}catch($){l=$}t.call(r.prototype)}else{try{throw Error()}catch($){l=$}t()}}catch($){if($&&l&&typeof $.stack=="string"){for(var d=$.stack.split(`
|
|
35
|
+
`),m=l.stack.split(`
|
|
36
|
+
`),w=d.length-1,P=m.length-1;1<=w&&0<=P&&d[w]!==m[P];)P--;for(;1<=w&&0<=P;w--,P--)if(d[w]!==m[P]){if(w!==1||P!==1)do if(w--,P--,0>P||d[w]!==m[P]){var b=`
|
|
37
|
+
`+d[w].replace(" at new "," at ");return t.displayName&&b.includes("<anonymous>")&&(b=b.replace("<anonymous>",t.displayName)),b}while(1<=w&&0<=P);break}}}finally{ee=!1,Error.prepareStackTrace=o}return(t=t?t.displayName||t.name:"")?D(t):""}function Ee(t){switch(t.tag){case 5:return D(t.type);case 16:return D("Lazy");case 13:return D("Suspense");case 19:return D("SuspenseList");case 0:case 2:case 15:return t=ye(t.type,!1),t;case 11:return t=ye(t.type.render,!1),t;case 1:return t=ye(t.type,!0),t;default:return""}}function Te(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case A:return"Fragment";case U:return"Portal";case B:return"Profiler";case _:return"StrictMode";case X:return"Suspense";case fe:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case ne:return(t.displayName||"Context")+".Consumer";case Y:return(t._context.displayName||"Context")+".Provider";case G:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Se:return r=t.displayName||null,r!==null?r:Te(t.type)||"Memo";case ge:r=t._payload,t=t._init;try{return Te(t(r))}catch{}}return null}function Ae(t){var r=t.type;switch(t.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=r.render,t=t.displayName||t.name||"",r.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Te(r);case 8:return r===_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function be(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Fe(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function bt(t){var r=Fe(t)?"checked":"value",o=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),l=""+t[r];if(!t.hasOwnProperty(r)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var d=o.get,m=o.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return d.call(this)},set:function(w){l=""+w,m.call(this,w)}}),Object.defineProperty(t,r,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(w){l=""+w},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function Vo(t){t._valueTracker||(t._valueTracker=bt(t))}function Th(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var o=r.getValue(),l="";return t&&(l=Fe(t)?t.checked?"true":"false":t.value),t=l,t!==o?(r.setValue(t),!0):!1}function zo(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Wl(t,r){var o=r.checked;return q({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??t._wrapperState.initialChecked})}function Ph(t,r){var o=r.defaultValue==null?"":r.defaultValue,l=r.checked!=null?r.checked:r.defaultChecked;o=be(r.value!=null?r.value:o),t._wrapperState={initialChecked:l,initialValue:o,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function Nh(t,r){r=r.checked,r!=null&&R(t,"checked",r,!1)}function Ql(t,r){Nh(t,r);var o=be(r.value),l=r.type;if(o!=null)l==="number"?(o===0&&t.value===""||t.value!=o)&&(t.value=""+o):t.value!==""+o&&(t.value=""+o);else if(l==="submit"||l==="reset"){t.removeAttribute("value");return}r.hasOwnProperty("value")?ql(t,r.type,o):r.hasOwnProperty("defaultValue")&&ql(t,r.type,be(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(t.defaultChecked=!!r.defaultChecked)}function jh(t,r,o){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var l=r.type;if(!(l!=="submit"&&l!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+t._wrapperState.initialValue,o||r===t.value||(t.value=r),t.defaultValue=r}o=t.name,o!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,o!==""&&(t.name=o)}function ql(t,r,o){(r!=="number"||zo(t.ownerDocument)!==t)&&(o==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+o&&(t.defaultValue=""+o))}var xi=Array.isArray;function ms(t,r,o,l){if(t=t.options,r){r={};for(var d=0;d<o.length;d++)r["$"+o[d]]=!0;for(o=0;o<t.length;o++)d=r.hasOwnProperty("$"+t[o].value),t[o].selected!==d&&(t[o].selected=d),d&&l&&(t[o].defaultSelected=!0)}else{for(o=""+be(o),r=null,d=0;d<t.length;d++){if(t[d].value===o){t[d].selected=!0,l&&(t[d].defaultSelected=!0);return}r!==null||t[d].disabled||(r=t[d])}r!==null&&(r.selected=!0)}}function Gl(t,r){if(r.dangerouslySetInnerHTML!=null)throw Error(s(91));return q({},r,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function bh(t,r){var o=r.value;if(o==null){if(o=r.children,r=r.defaultValue,o!=null){if(r!=null)throw Error(s(92));if(xi(o)){if(1<o.length)throw Error(s(93));o=o[0]}r=o}r==null&&(r=""),o=r}t._wrapperState={initialValue:be(o)}}function Rh(t,r){var o=be(r.value),l=be(r.defaultValue);o!=null&&(o=""+o,o!==t.value&&(t.value=o),r.defaultValue==null&&t.defaultValue!==o&&(t.defaultValue=o)),l!=null&&(t.defaultValue=""+l)}function Mh(t){var r=t.textContent;r===t._wrapperState.initialValue&&r!==""&&r!==null&&(t.value=r)}function Dh(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Yl(t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?Dh(r):t==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var $o,Ah=(function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(r,o,l,d){MSApp.execUnsafeLocalFunction(function(){return t(r,o,l,d)})}:t})(function(t,r){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=r;else{for($o=$o||document.createElement("div"),$o.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=$o.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;r.firstChild;)t.appendChild(r.firstChild)}});function wi(t,r){if(r){var o=t.firstChild;if(o&&o===t.lastChild&&o.nodeType===3){o.nodeValue=r;return}}t.textContent=r}var Si={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},cw=["Webkit","ms","Moz","O"];Object.keys(Si).forEach(function(t){cw.forEach(function(r){r=r+t.charAt(0).toUpperCase()+t.substring(1),Si[r]=Si[t]})});function Lh(t,r,o){return r==null||typeof r=="boolean"||r===""?"":o||typeof r!="number"||r===0||Si.hasOwnProperty(t)&&Si[t]?(""+r).trim():r+"px"}function Ih(t,r){t=t.style;for(var o in r)if(r.hasOwnProperty(o)){var l=o.indexOf("--")===0,d=Lh(o,r[o],l);o==="float"&&(o="cssFloat"),l?t.setProperty(o,d):t[o]=d}}var dw=q({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Xl(t,r){if(r){if(dw[t]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(s(137,t));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(s(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(s(61))}if(r.style!=null&&typeof r.style!="object")throw Error(s(62))}}function Zl(t,r){if(t.indexOf("-")===-1)return typeof r.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Jl=null;function eu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var tu=null,ys=null,gs=null;function Oh(t){if(t=Bi(t)){if(typeof tu!="function")throw Error(s(280));var r=t.stateNode;r&&(r=ca(r),tu(t.stateNode,t.type,r))}}function Fh(t){ys?gs?gs.push(t):gs=[t]:ys=t}function _h(){if(ys){var t=ys,r=gs;if(gs=ys=null,Oh(t),r)for(t=0;t<r.length;t++)Oh(r[t])}}function Vh(t,r){return t(r)}function zh(){}var nu=!1;function $h(t,r,o){if(nu)return t(r,o);nu=!0;try{return Vh(t,r,o)}finally{nu=!1,(ys!==null||gs!==null)&&(zh(),_h())}}function ki(t,r){var o=t.stateNode;if(o===null)return null;var l=ca(o);if(l===null)return null;o=l[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break e;default:t=!1}if(t)return null;if(o&&typeof o!="function")throw Error(s(231,r,typeof o));return o}var ru=!1;if(f)try{var Ci={};Object.defineProperty(Ci,"passive",{get:function(){ru=!0}}),window.addEventListener("test",Ci,Ci),window.removeEventListener("test",Ci,Ci)}catch{ru=!1}function fw(t,r,o,l,d,m,w,P,b){var $=Array.prototype.slice.call(arguments,3);try{r.apply(o,$)}catch(K){this.onError(K)}}var Ei=!1,Uo=null,Bo=!1,su=null,hw={onError:function(t){Ei=!0,Uo=t}};function pw(t,r,o,l,d,m,w,P,b){Ei=!1,Uo=null,fw.apply(hw,arguments)}function mw(t,r,o,l,d,m,w,P,b){if(pw.apply(this,arguments),Ei){if(Ei){var $=Uo;Ei=!1,Uo=null}else throw Error(s(198));Bo||(Bo=!0,su=$)}}function Ar(t){var r=t,o=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(o=r.return),t=r.return;while(t)}return r.tag===3?o:null}function Uh(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function Bh(t){if(Ar(t)!==t)throw Error(s(188))}function yw(t){var r=t.alternate;if(!r){if(r=Ar(t),r===null)throw Error(s(188));return r!==t?null:t}for(var o=t,l=r;;){var d=o.return;if(d===null)break;var m=d.alternate;if(m===null){if(l=d.return,l!==null){o=l;continue}break}if(d.child===m.child){for(m=d.child;m;){if(m===o)return Bh(d),t;if(m===l)return Bh(d),r;m=m.sibling}throw Error(s(188))}if(o.return!==l.return)o=d,l=m;else{for(var w=!1,P=d.child;P;){if(P===o){w=!0,o=d,l=m;break}if(P===l){w=!0,l=d,o=m;break}P=P.sibling}if(!w){for(P=m.child;P;){if(P===o){w=!0,o=m,l=d;break}if(P===l){w=!0,l=m,o=d;break}P=P.sibling}if(!w)throw Error(s(189))}}if(o.alternate!==l)throw Error(s(190))}if(o.tag!==3)throw Error(s(188));return o.stateNode.current===o?t:r}function Hh(t){return t=yw(t),t!==null?Kh(t):null}function Kh(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var r=Kh(t);if(r!==null)return r;t=t.sibling}return null}var Wh=n.unstable_scheduleCallback,Qh=n.unstable_cancelCallback,gw=n.unstable_shouldYield,vw=n.unstable_requestPaint,Ke=n.unstable_now,xw=n.unstable_getCurrentPriorityLevel,iu=n.unstable_ImmediatePriority,qh=n.unstable_UserBlockingPriority,Ho=n.unstable_NormalPriority,ww=n.unstable_LowPriority,Gh=n.unstable_IdlePriority,Ko=null,yn=null;function Sw(t){if(yn&&typeof yn.onCommitFiberRoot=="function")try{yn.onCommitFiberRoot(Ko,t,void 0,(t.current.flags&128)===128)}catch{}}var Gt=Math.clz32?Math.clz32:Ew,kw=Math.log,Cw=Math.LN2;function Ew(t){return t>>>=0,t===0?32:31-(kw(t)/Cw|0)|0}var Wo=64,Qo=4194304;function Ti(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function qo(t,r){var o=t.pendingLanes;if(o===0)return 0;var l=0,d=t.suspendedLanes,m=t.pingedLanes,w=o&268435455;if(w!==0){var P=w&~d;P!==0?l=Ti(P):(m&=w,m!==0&&(l=Ti(m)))}else w=o&~d,w!==0?l=Ti(w):m!==0&&(l=Ti(m));if(l===0)return 0;if(r!==0&&r!==l&&(r&d)===0&&(d=l&-l,m=r&-r,d>=m||d===16&&(m&4194240)!==0))return r;if((l&4)!==0&&(l|=o&16),r=t.entangledLanes,r!==0)for(t=t.entanglements,r&=l;0<r;)o=31-Gt(r),d=1<<o,l|=t[o],r&=~d;return l}function Tw(t,r){switch(t){case 1:case 2:case 4:return r+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Pw(t,r){for(var o=t.suspendedLanes,l=t.pingedLanes,d=t.expirationTimes,m=t.pendingLanes;0<m;){var w=31-Gt(m),P=1<<w,b=d[w];b===-1?((P&o)===0||(P&l)!==0)&&(d[w]=Tw(P,r)):b<=r&&(t.expiredLanes|=P),m&=~P}}function ou(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Yh(){var t=Wo;return Wo<<=1,(Wo&4194240)===0&&(Wo=64),t}function au(t){for(var r=[],o=0;31>o;o++)r.push(t);return r}function Pi(t,r,o){t.pendingLanes|=r,r!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,r=31-Gt(r),t[r]=o}function Nw(t,r){var o=t.pendingLanes&~r;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=r,t.mutableReadLanes&=r,t.entangledLanes&=r,r=t.entanglements;var l=t.eventTimes;for(t=t.expirationTimes;0<o;){var d=31-Gt(o),m=1<<d;r[d]=0,l[d]=-1,t[d]=-1,o&=~m}}function lu(t,r){var o=t.entangledLanes|=r;for(t=t.entanglements;o;){var l=31-Gt(o),d=1<<l;d&r|t[l]&r&&(t[l]|=r),o&=~d}}var Re=0;function Xh(t){return t&=-t,1<t?4<t?(t&268435455)!==0?16:536870912:4:1}var Zh,uu,Jh,ep,tp,cu=!1,Go=[],qn=null,Gn=null,Yn=null,Ni=new Map,ji=new Map,Xn=[],jw="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function np(t,r){switch(t){case"focusin":case"focusout":qn=null;break;case"dragenter":case"dragleave":Gn=null;break;case"mouseover":case"mouseout":Yn=null;break;case"pointerover":case"pointerout":Ni.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":ji.delete(r.pointerId)}}function bi(t,r,o,l,d,m){return t===null||t.nativeEvent!==m?(t={blockedOn:r,domEventName:o,eventSystemFlags:l,nativeEvent:m,targetContainers:[d]},r!==null&&(r=Bi(r),r!==null&&uu(r)),t):(t.eventSystemFlags|=l,r=t.targetContainers,d!==null&&r.indexOf(d)===-1&&r.push(d),t)}function bw(t,r,o,l,d){switch(r){case"focusin":return qn=bi(qn,t,r,o,l,d),!0;case"dragenter":return Gn=bi(Gn,t,r,o,l,d),!0;case"mouseover":return Yn=bi(Yn,t,r,o,l,d),!0;case"pointerover":var m=d.pointerId;return Ni.set(m,bi(Ni.get(m)||null,t,r,o,l,d)),!0;case"gotpointercapture":return m=d.pointerId,ji.set(m,bi(ji.get(m)||null,t,r,o,l,d)),!0}return!1}function rp(t){var r=Lr(t.target);if(r!==null){var o=Ar(r);if(o!==null){if(r=o.tag,r===13){if(r=Uh(o),r!==null){t.blockedOn=r,tp(t.priority,function(){Jh(o)});return}}else if(r===3&&o.stateNode.current.memoizedState.isDehydrated){t.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Yo(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var o=fu(t.domEventName,t.eventSystemFlags,r[0],t.nativeEvent);if(o===null){o=t.nativeEvent;var l=new o.constructor(o.type,o);Jl=l,o.target.dispatchEvent(l),Jl=null}else return r=Bi(o),r!==null&&uu(r),t.blockedOn=o,!1;r.shift()}return!0}function sp(t,r,o){Yo(t)&&o.delete(r)}function Rw(){cu=!1,qn!==null&&Yo(qn)&&(qn=null),Gn!==null&&Yo(Gn)&&(Gn=null),Yn!==null&&Yo(Yn)&&(Yn=null),Ni.forEach(sp),ji.forEach(sp)}function Ri(t,r){t.blockedOn===r&&(t.blockedOn=null,cu||(cu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Rw)))}function Mi(t){function r(d){return Ri(d,t)}if(0<Go.length){Ri(Go[0],t);for(var o=1;o<Go.length;o++){var l=Go[o];l.blockedOn===t&&(l.blockedOn=null)}}for(qn!==null&&Ri(qn,t),Gn!==null&&Ri(Gn,t),Yn!==null&&Ri(Yn,t),Ni.forEach(r),ji.forEach(r),o=0;o<Xn.length;o++)l=Xn[o],l.blockedOn===t&&(l.blockedOn=null);for(;0<Xn.length&&(o=Xn[0],o.blockedOn===null);)rp(o),o.blockedOn===null&&Xn.shift()}var vs=O.ReactCurrentBatchConfig,Xo=!0;function Mw(t,r,o,l){var d=Re,m=vs.transition;vs.transition=null;try{Re=1,du(t,r,o,l)}finally{Re=d,vs.transition=m}}function Dw(t,r,o,l){var d=Re,m=vs.transition;vs.transition=null;try{Re=4,du(t,r,o,l)}finally{Re=d,vs.transition=m}}function du(t,r,o,l){if(Xo){var d=fu(t,r,o,l);if(d===null)bu(t,r,l,Zo,o),np(t,l);else if(bw(d,t,r,o,l))l.stopPropagation();else if(np(t,l),r&4&&-1<jw.indexOf(t)){for(;d!==null;){var m=Bi(d);if(m!==null&&Zh(m),m=fu(t,r,o,l),m===null&&bu(t,r,l,Zo,o),m===d)break;d=m}d!==null&&l.stopPropagation()}else bu(t,r,l,null,o)}}var Zo=null;function fu(t,r,o,l){if(Zo=null,t=eu(l),t=Lr(t),t!==null)if(r=Ar(t),r===null)t=null;else if(o=r.tag,o===13){if(t=Uh(r),t!==null)return t;t=null}else if(o===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null);return Zo=t,null}function ip(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(xw()){case iu:return 1;case qh:return 4;case Ho:case ww:return 16;case Gh:return 536870912;default:return 16}default:return 16}}var Zn=null,hu=null,Jo=null;function op(){if(Jo)return Jo;var t,r=hu,o=r.length,l,d="value"in Zn?Zn.value:Zn.textContent,m=d.length;for(t=0;t<o&&r[t]===d[t];t++);var w=o-t;for(l=1;l<=w&&r[o-l]===d[m-l];l++);return Jo=d.slice(t,1<l?1-l:void 0)}function ea(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function ta(){return!0}function ap(){return!1}function Rt(t){function r(o,l,d,m,w){this._reactName=o,this._targetInst=d,this.type=l,this.nativeEvent=m,this.target=w,this.currentTarget=null;for(var P in t)t.hasOwnProperty(P)&&(o=t[P],this[P]=o?o(m):m[P]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?ta:ap,this.isPropagationStopped=ap,this}return q(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=ta)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=ta)},persist:function(){},isPersistent:ta}),r}var xs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pu=Rt(xs),Di=q({},xs,{view:0,detail:0}),Aw=Rt(Di),mu,yu,Ai,na=q({},Di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Ai&&(Ai&&t.type==="mousemove"?(mu=t.screenX-Ai.screenX,yu=t.screenY-Ai.screenY):yu=mu=0,Ai=t),mu)},movementY:function(t){return"movementY"in t?t.movementY:yu}}),lp=Rt(na),Lw=q({},na,{dataTransfer:0}),Iw=Rt(Lw),Ow=q({},Di,{relatedTarget:0}),gu=Rt(Ow),Fw=q({},xs,{animationName:0,elapsedTime:0,pseudoElement:0}),_w=Rt(Fw),Vw=q({},xs,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),zw=Rt(Vw),$w=q({},xs,{data:0}),up=Rt($w),Uw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Bw={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Hw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Kw(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=Hw[t])?!!r[t]:!1}function vu(){return Kw}var Ww=q({},Di,{key:function(t){if(t.key){var r=Uw[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=ea(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Bw[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vu,charCode:function(t){return t.type==="keypress"?ea(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ea(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Qw=Rt(Ww),qw=q({},na,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cp=Rt(qw),Gw=q({},Di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vu}),Yw=Rt(Gw),Xw=q({},xs,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zw=Rt(Xw),Jw=q({},na,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),eS=Rt(Jw),tS=[9,13,27,32],xu=f&&"CompositionEvent"in window,Li=null;f&&"documentMode"in document&&(Li=document.documentMode);var nS=f&&"TextEvent"in window&&!Li,dp=f&&(!xu||Li&&8<Li&&11>=Li),fp=" ",hp=!1;function pp(t,r){switch(t){case"keyup":return tS.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ws=!1;function rS(t,r){switch(t){case"compositionend":return mp(r);case"keypress":return r.which!==32?null:(hp=!0,fp);case"textInput":return t=r.data,t===fp&&hp?null:t;default:return null}}function sS(t,r){if(ws)return t==="compositionend"||!xu&&pp(t,r)?(t=op(),Jo=hu=Zn=null,ws=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return dp&&r.locale!=="ko"?null:r.data;default:return null}}var iS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function yp(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!iS[t.type]:r==="textarea"}function gp(t,r,o,l){Fh(l),r=aa(r,"onChange"),0<r.length&&(o=new pu("onChange","change",null,o,l),t.push({event:o,listeners:r}))}var Ii=null,Oi=null;function oS(t){Ip(t,0)}function ra(t){var r=Ts(t);if(Th(r))return t}function aS(t,r){if(t==="change")return r}var vp=!1;if(f){var wu;if(f){var Su="oninput"in document;if(!Su){var xp=document.createElement("div");xp.setAttribute("oninput","return;"),Su=typeof xp.oninput=="function"}wu=Su}else wu=!1;vp=wu&&(!document.documentMode||9<document.documentMode)}function wp(){Ii&&(Ii.detachEvent("onpropertychange",Sp),Oi=Ii=null)}function Sp(t){if(t.propertyName==="value"&&ra(Oi)){var r=[];gp(r,Oi,t,eu(t)),$h(oS,r)}}function lS(t,r,o){t==="focusin"?(wp(),Ii=r,Oi=o,Ii.attachEvent("onpropertychange",Sp)):t==="focusout"&&wp()}function uS(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ra(Oi)}function cS(t,r){if(t==="click")return ra(r)}function dS(t,r){if(t==="input"||t==="change")return ra(r)}function fS(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var Yt=typeof Object.is=="function"?Object.is:fS;function Fi(t,r){if(Yt(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var o=Object.keys(t),l=Object.keys(r);if(o.length!==l.length)return!1;for(l=0;l<o.length;l++){var d=o[l];if(!p.call(r,d)||!Yt(t[d],r[d]))return!1}return!0}function kp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Cp(t,r){var o=kp(t);t=0;for(var l;o;){if(o.nodeType===3){if(l=t+o.textContent.length,t<=r&&l>=r)return{node:o,offset:r-t};t=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=kp(o)}}function Ep(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Ep(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Tp(){for(var t=window,r=zo();r instanceof t.HTMLIFrameElement;){try{var o=typeof r.contentWindow.location.href=="string"}catch{o=!1}if(o)t=r.contentWindow;else break;r=zo(t.document)}return r}function ku(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}function hS(t){var r=Tp(),o=t.focusedElem,l=t.selectionRange;if(r!==o&&o&&o.ownerDocument&&Ep(o.ownerDocument.documentElement,o)){if(l!==null&&ku(o)){if(r=l.start,t=l.end,t===void 0&&(t=r),"selectionStart"in o)o.selectionStart=r,o.selectionEnd=Math.min(t,o.value.length);else if(t=(r=o.ownerDocument||document)&&r.defaultView||window,t.getSelection){t=t.getSelection();var d=o.textContent.length,m=Math.min(l.start,d);l=l.end===void 0?m:Math.min(l.end,d),!t.extend&&m>l&&(d=l,l=m,m=d),d=Cp(o,m);var w=Cp(o,l);d&&w&&(t.rangeCount!==1||t.anchorNode!==d.node||t.anchorOffset!==d.offset||t.focusNode!==w.node||t.focusOffset!==w.offset)&&(r=r.createRange(),r.setStart(d.node,d.offset),t.removeAllRanges(),m>l?(t.addRange(r),t.extend(w.node,w.offset)):(r.setEnd(w.node,w.offset),t.addRange(r)))}}for(r=[],t=o;t=t.parentNode;)t.nodeType===1&&r.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<r.length;o++)t=r[o],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var pS=f&&"documentMode"in document&&11>=document.documentMode,Ss=null,Cu=null,_i=null,Eu=!1;function Pp(t,r,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Eu||Ss==null||Ss!==zo(l)||(l=Ss,"selectionStart"in l&&ku(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),_i&&Fi(_i,l)||(_i=l,l=aa(Cu,"onSelect"),0<l.length&&(r=new pu("onSelect","select",null,r,o),t.push({event:r,listeners:l}),r.target=Ss)))}function sa(t,r){var o={};return o[t.toLowerCase()]=r.toLowerCase(),o["Webkit"+t]="webkit"+r,o["Moz"+t]="moz"+r,o}var ks={animationend:sa("Animation","AnimationEnd"),animationiteration:sa("Animation","AnimationIteration"),animationstart:sa("Animation","AnimationStart"),transitionend:sa("Transition","TransitionEnd")},Tu={},Np={};f&&(Np=document.createElement("div").style,"AnimationEvent"in window||(delete ks.animationend.animation,delete ks.animationiteration.animation,delete ks.animationstart.animation),"TransitionEvent"in window||delete ks.transitionend.transition);function ia(t){if(Tu[t])return Tu[t];if(!ks[t])return t;var r=ks[t],o;for(o in r)if(r.hasOwnProperty(o)&&o in Np)return Tu[t]=r[o];return t}var jp=ia("animationend"),bp=ia("animationiteration"),Rp=ia("animationstart"),Mp=ia("transitionend"),Dp=new Map,Ap="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Jn(t,r){Dp.set(t,r),u(r,[t])}for(var Pu=0;Pu<Ap.length;Pu++){var Nu=Ap[Pu],mS=Nu.toLowerCase(),yS=Nu[0].toUpperCase()+Nu.slice(1);Jn(mS,"on"+yS)}Jn(jp,"onAnimationEnd"),Jn(bp,"onAnimationIteration"),Jn(Rp,"onAnimationStart"),Jn("dblclick","onDoubleClick"),Jn("focusin","onFocus"),Jn("focusout","onBlur"),Jn(Mp,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),gS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vi));function Lp(t,r,o){var l=t.type||"unknown-event";t.currentTarget=o,mw(l,r,void 0,t),t.currentTarget=null}function Ip(t,r){r=(r&4)!==0;for(var o=0;o<t.length;o++){var l=t[o],d=l.event;l=l.listeners;e:{var m=void 0;if(r)for(var w=l.length-1;0<=w;w--){var P=l[w],b=P.instance,$=P.currentTarget;if(P=P.listener,b!==m&&d.isPropagationStopped())break e;Lp(d,P,$),m=b}else for(w=0;w<l.length;w++){if(P=l[w],b=P.instance,$=P.currentTarget,P=P.listener,b!==m&&d.isPropagationStopped())break e;Lp(d,P,$),m=b}}}if(Bo)throw t=su,Bo=!1,su=null,t}function Ie(t,r){var o=r[Iu];o===void 0&&(o=r[Iu]=new Set);var l=t+"__bubble";o.has(l)||(Op(r,t,2,!1),o.add(l))}function ju(t,r,o){var l=0;r&&(l|=4),Op(o,t,l,r)}var oa="_reactListening"+Math.random().toString(36).slice(2);function zi(t){if(!t[oa]){t[oa]=!0,i.forEach(function(o){o!=="selectionchange"&&(gS.has(o)||ju(o,!1,t),ju(o,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[oa]||(r[oa]=!0,ju("selectionchange",!1,r))}}function Op(t,r,o,l){switch(ip(r)){case 1:var d=Mw;break;case 4:d=Dw;break;default:d=du}o=d.bind(null,r,o,t),d=void 0,!ru||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(d=!0),l?d!==void 0?t.addEventListener(r,o,{capture:!0,passive:d}):t.addEventListener(r,o,!0):d!==void 0?t.addEventListener(r,o,{passive:d}):t.addEventListener(r,o,!1)}function bu(t,r,o,l,d){var m=l;if((r&1)===0&&(r&2)===0&&l!==null)e:for(;;){if(l===null)return;var w=l.tag;if(w===3||w===4){var P=l.stateNode.containerInfo;if(P===d||P.nodeType===8&&P.parentNode===d)break;if(w===4)for(w=l.return;w!==null;){var b=w.tag;if((b===3||b===4)&&(b=w.stateNode.containerInfo,b===d||b.nodeType===8&&b.parentNode===d))return;w=w.return}for(;P!==null;){if(w=Lr(P),w===null)return;if(b=w.tag,b===5||b===6){l=m=w;continue e}P=P.parentNode}}l=l.return}$h(function(){var $=m,K=eu(o),W=[];e:{var H=Dp.get(t);if(H!==void 0){var te=pu,se=t;switch(t){case"keypress":if(ea(o)===0)break e;case"keydown":case"keyup":te=Qw;break;case"focusin":se="focus",te=gu;break;case"focusout":se="blur",te=gu;break;case"beforeblur":case"afterblur":te=gu;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=lp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=Iw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=Yw;break;case jp:case bp:case Rp:te=_w;break;case Mp:te=Zw;break;case"scroll":te=Aw;break;case"wheel":te=eS;break;case"copy":case"cut":case"paste":te=zw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=cp}var oe=(r&4)!==0,We=!oe&&t==="scroll",V=oe?H!==null?H+"Capture":null:H;oe=[];for(var M=$,z;M!==null;){z=M;var Q=z.stateNode;if(z.tag===5&&Q!==null&&(z=Q,V!==null&&(Q=ki(M,V),Q!=null&&oe.push($i(M,Q,z)))),We)break;M=M.return}0<oe.length&&(H=new te(H,se,null,o,K),W.push({event:H,listeners:oe}))}}if((r&7)===0){e:{if(H=t==="mouseover"||t==="pointerover",te=t==="mouseout"||t==="pointerout",H&&o!==Jl&&(se=o.relatedTarget||o.fromElement)&&(Lr(se)||se[bn]))break e;if((te||H)&&(H=K.window===K?K:(H=K.ownerDocument)?H.defaultView||H.parentWindow:window,te?(se=o.relatedTarget||o.toElement,te=$,se=se?Lr(se):null,se!==null&&(We=Ar(se),se!==We||se.tag!==5&&se.tag!==6)&&(se=null)):(te=null,se=$),te!==se)){if(oe=lp,Q="onMouseLeave",V="onMouseEnter",M="mouse",(t==="pointerout"||t==="pointerover")&&(oe=cp,Q="onPointerLeave",V="onPointerEnter",M="pointer"),We=te==null?H:Ts(te),z=se==null?H:Ts(se),H=new oe(Q,M+"leave",te,o,K),H.target=We,H.relatedTarget=z,Q=null,Lr(K)===$&&(oe=new oe(V,M+"enter",se,o,K),oe.target=z,oe.relatedTarget=We,Q=oe),We=Q,te&&se)t:{for(oe=te,V=se,M=0,z=oe;z;z=Cs(z))M++;for(z=0,Q=V;Q;Q=Cs(Q))z++;for(;0<M-z;)oe=Cs(oe),M--;for(;0<z-M;)V=Cs(V),z--;for(;M--;){if(oe===V||V!==null&&oe===V.alternate)break t;oe=Cs(oe),V=Cs(V)}oe=null}else oe=null;te!==null&&Fp(W,H,te,oe,!1),se!==null&&We!==null&&Fp(W,We,se,oe,!0)}}e:{if(H=$?Ts($):window,te=H.nodeName&&H.nodeName.toLowerCase(),te==="select"||te==="input"&&H.type==="file")var ae=aS;else if(yp(H))if(vp)ae=dS;else{ae=uS;var ce=lS}else(te=H.nodeName)&&te.toLowerCase()==="input"&&(H.type==="checkbox"||H.type==="radio")&&(ae=cS);if(ae&&(ae=ae(t,$))){gp(W,ae,o,K);break e}ce&&ce(t,H,$),t==="focusout"&&(ce=H._wrapperState)&&ce.controlled&&H.type==="number"&&ql(H,"number",H.value)}switch(ce=$?Ts($):window,t){case"focusin":(yp(ce)||ce.contentEditable==="true")&&(Ss=ce,Cu=$,_i=null);break;case"focusout":_i=Cu=Ss=null;break;case"mousedown":Eu=!0;break;case"contextmenu":case"mouseup":case"dragend":Eu=!1,Pp(W,o,K);break;case"selectionchange":if(pS)break;case"keydown":case"keyup":Pp(W,o,K)}var de;if(xu)e:{switch(t){case"compositionstart":var he="onCompositionStart";break e;case"compositionend":he="onCompositionEnd";break e;case"compositionupdate":he="onCompositionUpdate";break e}he=void 0}else ws?pp(t,o)&&(he="onCompositionEnd"):t==="keydown"&&o.keyCode===229&&(he="onCompositionStart");he&&(dp&&o.locale!=="ko"&&(ws||he!=="onCompositionStart"?he==="onCompositionEnd"&&ws&&(de=op()):(Zn=K,hu="value"in Zn?Zn.value:Zn.textContent,ws=!0)),ce=aa($,he),0<ce.length&&(he=new up(he,t,null,o,K),W.push({event:he,listeners:ce}),de?he.data=de:(de=mp(o),de!==null&&(he.data=de)))),(de=nS?rS(t,o):sS(t,o))&&($=aa($,"onBeforeInput"),0<$.length&&(K=new up("onBeforeInput","beforeinput",null,o,K),W.push({event:K,listeners:$}),K.data=de))}Ip(W,r)})}function $i(t,r,o){return{instance:t,listener:r,currentTarget:o}}function aa(t,r){for(var o=r+"Capture",l=[];t!==null;){var d=t,m=d.stateNode;d.tag===5&&m!==null&&(d=m,m=ki(t,o),m!=null&&l.unshift($i(t,m,d)),m=ki(t,r),m!=null&&l.push($i(t,m,d))),t=t.return}return l}function Cs(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Fp(t,r,o,l,d){for(var m=r._reactName,w=[];o!==null&&o!==l;){var P=o,b=P.alternate,$=P.stateNode;if(b!==null&&b===l)break;P.tag===5&&$!==null&&(P=$,d?(b=ki(o,m),b!=null&&w.unshift($i(o,b,P))):d||(b=ki(o,m),b!=null&&w.push($i(o,b,P)))),o=o.return}w.length!==0&&t.push({event:r,listeners:w})}var vS=/\r\n?/g,xS=/\u0000|\uFFFD/g;function _p(t){return(typeof t=="string"?t:""+t).replace(vS,`
|
|
38
|
+
`).replace(xS,"")}function la(t,r,o){if(r=_p(r),_p(t)!==r&&o)throw Error(s(425))}function ua(){}var Ru=null,Mu=null;function Du(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Au=typeof setTimeout=="function"?setTimeout:void 0,wS=typeof clearTimeout=="function"?clearTimeout:void 0,Vp=typeof Promise=="function"?Promise:void 0,SS=typeof queueMicrotask=="function"?queueMicrotask:typeof Vp<"u"?function(t){return Vp.resolve(null).then(t).catch(kS)}:Au;function kS(t){setTimeout(function(){throw t})}function Lu(t,r){var o=r,l=0;do{var d=o.nextSibling;if(t.removeChild(o),d&&d.nodeType===8)if(o=d.data,o==="/$"){if(l===0){t.removeChild(d),Mi(r);return}l--}else o!=="$"&&o!=="$?"&&o!=="$!"||l++;o=d}while(o);Mi(r)}function er(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return t}function zp(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var o=t.data;if(o==="$"||o==="$!"||o==="$?"){if(r===0)return t;r--}else o==="/$"&&r++}t=t.previousSibling}return null}var Es=Math.random().toString(36).slice(2),gn="__reactFiber$"+Es,Ui="__reactProps$"+Es,bn="__reactContainer$"+Es,Iu="__reactEvents$"+Es,CS="__reactListeners$"+Es,ES="__reactHandles$"+Es;function Lr(t){var r=t[gn];if(r)return r;for(var o=t.parentNode;o;){if(r=o[bn]||o[gn]){if(o=r.alternate,r.child!==null||o!==null&&o.child!==null)for(t=zp(t);t!==null;){if(o=t[gn])return o;t=zp(t)}return r}t=o,o=t.parentNode}return null}function Bi(t){return t=t[gn]||t[bn],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Ts(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(s(33))}function ca(t){return t[Ui]||null}var Ou=[],Ps=-1;function tr(t){return{current:t}}function Oe(t){0>Ps||(t.current=Ou[Ps],Ou[Ps]=null,Ps--)}function Le(t,r){Ps++,Ou[Ps]=t.current,t.current=r}var nr={},ct=tr(nr),kt=tr(!1),Ir=nr;function Ns(t,r){var o=t.type.contextTypes;if(!o)return nr;var l=t.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===r)return l.__reactInternalMemoizedMaskedChildContext;var d={},m;for(m in o)d[m]=r[m];return l&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=d),d}function Ct(t){return t=t.childContextTypes,t!=null}function da(){Oe(kt),Oe(ct)}function $p(t,r,o){if(ct.current!==nr)throw Error(s(168));Le(ct,r),Le(kt,o)}function Up(t,r,o){var l=t.stateNode;if(r=r.childContextTypes,typeof l.getChildContext!="function")return o;l=l.getChildContext();for(var d in l)if(!(d in r))throw Error(s(108,Ae(t)||"Unknown",d));return q({},o,l)}function fa(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||nr,Ir=ct.current,Le(ct,t),Le(kt,kt.current),!0}function Bp(t,r,o){var l=t.stateNode;if(!l)throw Error(s(169));o?(t=Up(t,r,Ir),l.__reactInternalMemoizedMergedChildContext=t,Oe(kt),Oe(ct),Le(ct,t)):Oe(kt),Le(kt,o)}var Rn=null,ha=!1,Fu=!1;function Hp(t){Rn===null?Rn=[t]:Rn.push(t)}function TS(t){ha=!0,Hp(t)}function rr(){if(!Fu&&Rn!==null){Fu=!0;var t=0,r=Re;try{var o=Rn;for(Re=1;t<o.length;t++){var l=o[t];do l=l(!0);while(l!==null)}Rn=null,ha=!1}catch(d){throw Rn!==null&&(Rn=Rn.slice(t+1)),Wh(iu,rr),d}finally{Re=r,Fu=!1}}return null}var js=[],bs=0,pa=null,ma=0,Ft=[],_t=0,Or=null,Mn=1,Dn="";function Fr(t,r){js[bs++]=ma,js[bs++]=pa,pa=t,ma=r}function Kp(t,r,o){Ft[_t++]=Mn,Ft[_t++]=Dn,Ft[_t++]=Or,Or=t;var l=Mn;t=Dn;var d=32-Gt(l)-1;l&=~(1<<d),o+=1;var m=32-Gt(r)+d;if(30<m){var w=d-d%5;m=(l&(1<<w)-1).toString(32),l>>=w,d-=w,Mn=1<<32-Gt(r)+d|o<<d|l,Dn=m+t}else Mn=1<<m|o<<d|l,Dn=t}function _u(t){t.return!==null&&(Fr(t,1),Kp(t,1,0))}function Vu(t){for(;t===pa;)pa=js[--bs],js[bs]=null,ma=js[--bs],js[bs]=null;for(;t===Or;)Or=Ft[--_t],Ft[_t]=null,Dn=Ft[--_t],Ft[_t]=null,Mn=Ft[--_t],Ft[_t]=null}var Mt=null,Dt=null,_e=!1,Xt=null;function Wp(t,r){var o=Ut(5,null,null,0);o.elementType="DELETED",o.stateNode=r,o.return=t,r=t.deletions,r===null?(t.deletions=[o],t.flags|=16):r.push(o)}function Qp(t,r){switch(t.tag){case 5:var o=t.type;return r=r.nodeType!==1||o.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(t.stateNode=r,Mt=t,Dt=er(r.firstChild),!0):!1;case 6:return r=t.pendingProps===""||r.nodeType!==3?null:r,r!==null?(t.stateNode=r,Mt=t,Dt=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(o=Or!==null?{id:Mn,overflow:Dn}:null,t.memoizedState={dehydrated:r,treeContext:o,retryLane:1073741824},o=Ut(18,null,null,0),o.stateNode=r,o.return=t,t.child=o,Mt=t,Dt=null,!0):!1;default:return!1}}function zu(t){return(t.mode&1)!==0&&(t.flags&128)===0}function $u(t){if(_e){var r=Dt;if(r){var o=r;if(!Qp(t,r)){if(zu(t))throw Error(s(418));r=er(o.nextSibling);var l=Mt;r&&Qp(t,r)?Wp(l,o):(t.flags=t.flags&-4097|2,_e=!1,Mt=t)}}else{if(zu(t))throw Error(s(418));t.flags=t.flags&-4097|2,_e=!1,Mt=t}}}function qp(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Mt=t}function ya(t){if(t!==Mt)return!1;if(!_e)return qp(t),_e=!0,!1;var r;if((r=t.tag!==3)&&!(r=t.tag!==5)&&(r=t.type,r=r!=="head"&&r!=="body"&&!Du(t.type,t.memoizedProps)),r&&(r=Dt)){if(zu(t))throw Gp(),Error(s(418));for(;r;)Wp(t,r),r=er(r.nextSibling)}if(qp(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8){var o=t.data;if(o==="/$"){if(r===0){Dt=er(t.nextSibling);break e}r--}else o!=="$"&&o!=="$!"&&o!=="$?"||r++}t=t.nextSibling}Dt=null}}else Dt=Mt?er(t.stateNode.nextSibling):null;return!0}function Gp(){for(var t=Dt;t;)t=er(t.nextSibling)}function Rs(){Dt=Mt=null,_e=!1}function Uu(t){Xt===null?Xt=[t]:Xt.push(t)}var PS=O.ReactCurrentBatchConfig;function Hi(t,r,o){if(t=o.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(s(309));var l=o.stateNode}if(!l)throw Error(s(147,t));var d=l,m=""+t;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===m?r.ref:(r=function(w){var P=d.refs;w===null?delete P[m]:P[m]=w},r._stringRef=m,r)}if(typeof t!="string")throw Error(s(284));if(!o._owner)throw Error(s(290,t))}return t}function ga(t,r){throw t=Object.prototype.toString.call(r),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t))}function Yp(t){var r=t._init;return r(t._payload)}function Xp(t){function r(V,M){if(t){var z=V.deletions;z===null?(V.deletions=[M],V.flags|=16):z.push(M)}}function o(V,M){if(!t)return null;for(;M!==null;)r(V,M),M=M.sibling;return null}function l(V,M){for(V=new Map;M!==null;)M.key!==null?V.set(M.key,M):V.set(M.index,M),M=M.sibling;return V}function d(V,M){return V=dr(V,M),V.index=0,V.sibling=null,V}function m(V,M,z){return V.index=z,t?(z=V.alternate,z!==null?(z=z.index,z<M?(V.flags|=2,M):z):(V.flags|=2,M)):(V.flags|=1048576,M)}function w(V){return t&&V.alternate===null&&(V.flags|=2),V}function P(V,M,z,Q){return M===null||M.tag!==6?(M=Ac(z,V.mode,Q),M.return=V,M):(M=d(M,z),M.return=V,M)}function b(V,M,z,Q){var ae=z.type;return ae===A?K(V,M,z.props.children,Q,z.key):M!==null&&(M.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===ge&&Yp(ae)===M.type)?(Q=d(M,z.props),Q.ref=Hi(V,M,z),Q.return=V,Q):(Q=$a(z.type,z.key,z.props,null,V.mode,Q),Q.ref=Hi(V,M,z),Q.return=V,Q)}function $(V,M,z,Q){return M===null||M.tag!==4||M.stateNode.containerInfo!==z.containerInfo||M.stateNode.implementation!==z.implementation?(M=Lc(z,V.mode,Q),M.return=V,M):(M=d(M,z.children||[]),M.return=V,M)}function K(V,M,z,Q,ae){return M===null||M.tag!==7?(M=Kr(z,V.mode,Q,ae),M.return=V,M):(M=d(M,z),M.return=V,M)}function W(V,M,z){if(typeof M=="string"&&M!==""||typeof M=="number")return M=Ac(""+M,V.mode,z),M.return=V,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case F:return z=$a(M.type,M.key,M.props,null,V.mode,z),z.ref=Hi(V,null,M),z.return=V,z;case U:return M=Lc(M,V.mode,z),M.return=V,M;case ge:var Q=M._init;return W(V,Q(M._payload),z)}if(xi(M)||le(M))return M=Kr(M,V.mode,z,null),M.return=V,M;ga(V,M)}return null}function H(V,M,z,Q){var ae=M!==null?M.key:null;if(typeof z=="string"&&z!==""||typeof z=="number")return ae!==null?null:P(V,M,""+z,Q);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case F:return z.key===ae?b(V,M,z,Q):null;case U:return z.key===ae?$(V,M,z,Q):null;case ge:return ae=z._init,H(V,M,ae(z._payload),Q)}if(xi(z)||le(z))return ae!==null?null:K(V,M,z,Q,null);ga(V,z)}return null}function te(V,M,z,Q,ae){if(typeof Q=="string"&&Q!==""||typeof Q=="number")return V=V.get(z)||null,P(M,V,""+Q,ae);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case F:return V=V.get(Q.key===null?z:Q.key)||null,b(M,V,Q,ae);case U:return V=V.get(Q.key===null?z:Q.key)||null,$(M,V,Q,ae);case ge:var ce=Q._init;return te(V,M,z,ce(Q._payload),ae)}if(xi(Q)||le(Q))return V=V.get(z)||null,K(M,V,Q,ae,null);ga(M,Q)}return null}function se(V,M,z,Q){for(var ae=null,ce=null,de=M,he=M=0,st=null;de!==null&&he<z.length;he++){de.index>he?(st=de,de=null):st=de.sibling;var Pe=H(V,de,z[he],Q);if(Pe===null){de===null&&(de=st);break}t&&de&&Pe.alternate===null&&r(V,de),M=m(Pe,M,he),ce===null?ae=Pe:ce.sibling=Pe,ce=Pe,de=st}if(he===z.length)return o(V,de),_e&&Fr(V,he),ae;if(de===null){for(;he<z.length;he++)de=W(V,z[he],Q),de!==null&&(M=m(de,M,he),ce===null?ae=de:ce.sibling=de,ce=de);return _e&&Fr(V,he),ae}for(de=l(V,de);he<z.length;he++)st=te(de,V,he,z[he],Q),st!==null&&(t&&st.alternate!==null&&de.delete(st.key===null?he:st.key),M=m(st,M,he),ce===null?ae=st:ce.sibling=st,ce=st);return t&&de.forEach(function(fr){return r(V,fr)}),_e&&Fr(V,he),ae}function oe(V,M,z,Q){var ae=le(z);if(typeof ae!="function")throw Error(s(150));if(z=ae.call(z),z==null)throw Error(s(151));for(var ce=ae=null,de=M,he=M=0,st=null,Pe=z.next();de!==null&&!Pe.done;he++,Pe=z.next()){de.index>he?(st=de,de=null):st=de.sibling;var fr=H(V,de,Pe.value,Q);if(fr===null){de===null&&(de=st);break}t&&de&&fr.alternate===null&&r(V,de),M=m(fr,M,he),ce===null?ae=fr:ce.sibling=fr,ce=fr,de=st}if(Pe.done)return o(V,de),_e&&Fr(V,he),ae;if(de===null){for(;!Pe.done;he++,Pe=z.next())Pe=W(V,Pe.value,Q),Pe!==null&&(M=m(Pe,M,he),ce===null?ae=Pe:ce.sibling=Pe,ce=Pe);return _e&&Fr(V,he),ae}for(de=l(V,de);!Pe.done;he++,Pe=z.next())Pe=te(de,V,he,Pe.value,Q),Pe!==null&&(t&&Pe.alternate!==null&&de.delete(Pe.key===null?he:Pe.key),M=m(Pe,M,he),ce===null?ae=Pe:ce.sibling=Pe,ce=Pe);return t&&de.forEach(function(ik){return r(V,ik)}),_e&&Fr(V,he),ae}function We(V,M,z,Q){if(typeof z=="object"&&z!==null&&z.type===A&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case F:e:{for(var ae=z.key,ce=M;ce!==null;){if(ce.key===ae){if(ae=z.type,ae===A){if(ce.tag===7){o(V,ce.sibling),M=d(ce,z.props.children),M.return=V,V=M;break e}}else if(ce.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===ge&&Yp(ae)===ce.type){o(V,ce.sibling),M=d(ce,z.props),M.ref=Hi(V,ce,z),M.return=V,V=M;break e}o(V,ce);break}else r(V,ce);ce=ce.sibling}z.type===A?(M=Kr(z.props.children,V.mode,Q,z.key),M.return=V,V=M):(Q=$a(z.type,z.key,z.props,null,V.mode,Q),Q.ref=Hi(V,M,z),Q.return=V,V=Q)}return w(V);case U:e:{for(ce=z.key;M!==null;){if(M.key===ce)if(M.tag===4&&M.stateNode.containerInfo===z.containerInfo&&M.stateNode.implementation===z.implementation){o(V,M.sibling),M=d(M,z.children||[]),M.return=V,V=M;break e}else{o(V,M);break}else r(V,M);M=M.sibling}M=Lc(z,V.mode,Q),M.return=V,V=M}return w(V);case ge:return ce=z._init,We(V,M,ce(z._payload),Q)}if(xi(z))return se(V,M,z,Q);if(le(z))return oe(V,M,z,Q);ga(V,z)}return typeof z=="string"&&z!==""||typeof z=="number"?(z=""+z,M!==null&&M.tag===6?(o(V,M.sibling),M=d(M,z),M.return=V,V=M):(o(V,M),M=Ac(z,V.mode,Q),M.return=V,V=M),w(V)):o(V,M)}return We}var Ms=Xp(!0),Zp=Xp(!1),va=tr(null),xa=null,Ds=null,Bu=null;function Hu(){Bu=Ds=xa=null}function Ku(t){var r=va.current;Oe(va),t._currentValue=r}function Wu(t,r,o){for(;t!==null;){var l=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),t===o)break;t=t.return}}function As(t,r){xa=t,Bu=Ds=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&r)!==0&&(Et=!0),t.firstContext=null)}function Vt(t){var r=t._currentValue;if(Bu!==t)if(t={context:t,memoizedValue:r,next:null},Ds===null){if(xa===null)throw Error(s(308));Ds=t,xa.dependencies={lanes:0,firstContext:t}}else Ds=Ds.next=t;return r}var _r=null;function Qu(t){_r===null?_r=[t]:_r.push(t)}function Jp(t,r,o,l){var d=r.interleaved;return d===null?(o.next=o,Qu(r)):(o.next=d.next,d.next=o),r.interleaved=o,An(t,l)}function An(t,r){t.lanes|=r;var o=t.alternate;for(o!==null&&(o.lanes|=r),o=t,t=t.return;t!==null;)t.childLanes|=r,o=t.alternate,o!==null&&(o.childLanes|=r),o=t,t=t.return;return o.tag===3?o.stateNode:null}var sr=!1;function qu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function em(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ln(t,r){return{eventTime:t,lane:r,tag:0,payload:null,callback:null,next:null}}function ir(t,r,o){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(Ce&2)!==0){var d=l.pending;return d===null?r.next=r:(r.next=d.next,d.next=r),l.pending=r,An(t,o)}return d=l.interleaved,d===null?(r.next=r,Qu(l)):(r.next=d.next,d.next=r),l.interleaved=r,An(t,o)}function wa(t,r,o){if(r=r.updateQueue,r!==null&&(r=r.shared,(o&4194240)!==0)){var l=r.lanes;l&=t.pendingLanes,o|=l,r.lanes=o,lu(t,o)}}function tm(t,r){var o=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var d=null,m=null;if(o=o.firstBaseUpdate,o!==null){do{var w={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};m===null?d=m=w:m=m.next=w,o=o.next}while(o!==null);m===null?d=m=r:m=m.next=r}else d=m=r;o={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:m,shared:l.shared,effects:l.effects},t.updateQueue=o;return}t=o.lastBaseUpdate,t===null?o.firstBaseUpdate=r:t.next=r,o.lastBaseUpdate=r}function Sa(t,r,o,l){var d=t.updateQueue;sr=!1;var m=d.firstBaseUpdate,w=d.lastBaseUpdate,P=d.shared.pending;if(P!==null){d.shared.pending=null;var b=P,$=b.next;b.next=null,w===null?m=$:w.next=$,w=b;var K=t.alternate;K!==null&&(K=K.updateQueue,P=K.lastBaseUpdate,P!==w&&(P===null?K.firstBaseUpdate=$:P.next=$,K.lastBaseUpdate=b))}if(m!==null){var W=d.baseState;w=0,K=$=b=null,P=m;do{var H=P.lane,te=P.eventTime;if((l&H)===H){K!==null&&(K=K.next={eventTime:te,lane:0,tag:P.tag,payload:P.payload,callback:P.callback,next:null});e:{var se=t,oe=P;switch(H=r,te=o,oe.tag){case 1:if(se=oe.payload,typeof se=="function"){W=se.call(te,W,H);break e}W=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=oe.payload,H=typeof se=="function"?se.call(te,W,H):se,H==null)break e;W=q({},W,H);break e;case 2:sr=!0}}P.callback!==null&&P.lane!==0&&(t.flags|=64,H=d.effects,H===null?d.effects=[P]:H.push(P))}else te={eventTime:te,lane:H,tag:P.tag,payload:P.payload,callback:P.callback,next:null},K===null?($=K=te,b=W):K=K.next=te,w|=H;if(P=P.next,P===null){if(P=d.shared.pending,P===null)break;H=P,P=H.next,H.next=null,d.lastBaseUpdate=H,d.shared.pending=null}}while(!0);if(K===null&&(b=W),d.baseState=b,d.firstBaseUpdate=$,d.lastBaseUpdate=K,r=d.shared.interleaved,r!==null){d=r;do w|=d.lane,d=d.next;while(d!==r)}else m===null&&(d.shared.lanes=0);$r|=w,t.lanes=w,t.memoizedState=W}}function nm(t,r,o){if(t=r.effects,r.effects=null,t!==null)for(r=0;r<t.length;r++){var l=t[r],d=l.callback;if(d!==null){if(l.callback=null,l=o,typeof d!="function")throw Error(s(191,d));d.call(l)}}}var Ki={},vn=tr(Ki),Wi=tr(Ki),Qi=tr(Ki);function Vr(t){if(t===Ki)throw Error(s(174));return t}function Gu(t,r){switch(Le(Qi,r),Le(Wi,t),Le(vn,Ki),t=r.nodeType,t){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:Yl(null,"");break;default:t=t===8?r.parentNode:r,r=t.namespaceURI||null,t=t.tagName,r=Yl(r,t)}Oe(vn),Le(vn,r)}function Ls(){Oe(vn),Oe(Wi),Oe(Qi)}function rm(t){Vr(Qi.current);var r=Vr(vn.current),o=Yl(r,t.type);r!==o&&(Le(Wi,t),Le(vn,o))}function Yu(t){Wi.current===t&&(Oe(vn),Oe(Wi))}var $e=tr(0);function ka(t){for(var r=t;r!==null;){if(r.tag===13){var o=r.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Xu=[];function Zu(){for(var t=0;t<Xu.length;t++)Xu[t]._workInProgressVersionPrimary=null;Xu.length=0}var Ca=O.ReactCurrentDispatcher,Ju=O.ReactCurrentBatchConfig,zr=0,Ue=null,Ge=null,nt=null,Ea=!1,qi=!1,Gi=0,NS=0;function dt(){throw Error(s(321))}function ec(t,r){if(r===null)return!1;for(var o=0;o<r.length&&o<t.length;o++)if(!Yt(t[o],r[o]))return!1;return!0}function tc(t,r,o,l,d,m){if(zr=m,Ue=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Ca.current=t===null||t.memoizedState===null?MS:DS,t=o(l,d),qi){m=0;do{if(qi=!1,Gi=0,25<=m)throw Error(s(301));m+=1,nt=Ge=null,r.updateQueue=null,Ca.current=AS,t=o(l,d)}while(qi)}if(Ca.current=Na,r=Ge!==null&&Ge.next!==null,zr=0,nt=Ge=Ue=null,Ea=!1,r)throw Error(s(300));return t}function nc(){var t=Gi!==0;return Gi=0,t}function xn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?Ue.memoizedState=nt=t:nt=nt.next=t,nt}function zt(){if(Ge===null){var t=Ue.alternate;t=t!==null?t.memoizedState:null}else t=Ge.next;var r=nt===null?Ue.memoizedState:nt.next;if(r!==null)nt=r,Ge=t;else{if(t===null)throw Error(s(310));Ge=t,t={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},nt===null?Ue.memoizedState=nt=t:nt=nt.next=t}return nt}function Yi(t,r){return typeof r=="function"?r(t):r}function rc(t){var r=zt(),o=r.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=t;var l=Ge,d=l.baseQueue,m=o.pending;if(m!==null){if(d!==null){var w=d.next;d.next=m.next,m.next=w}l.baseQueue=d=m,o.pending=null}if(d!==null){m=d.next,l=l.baseState;var P=w=null,b=null,$=m;do{var K=$.lane;if((zr&K)===K)b!==null&&(b=b.next={lane:0,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),l=$.hasEagerState?$.eagerState:t(l,$.action);else{var W={lane:K,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null};b===null?(P=b=W,w=l):b=b.next=W,Ue.lanes|=K,$r|=K}$=$.next}while($!==null&&$!==m);b===null?w=l:b.next=P,Yt(l,r.memoizedState)||(Et=!0),r.memoizedState=l,r.baseState=w,r.baseQueue=b,o.lastRenderedState=l}if(t=o.interleaved,t!==null){d=t;do m=d.lane,Ue.lanes|=m,$r|=m,d=d.next;while(d!==t)}else d===null&&(o.lanes=0);return[r.memoizedState,o.dispatch]}function sc(t){var r=zt(),o=r.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=t;var l=o.dispatch,d=o.pending,m=r.memoizedState;if(d!==null){o.pending=null;var w=d=d.next;do m=t(m,w.action),w=w.next;while(w!==d);Yt(m,r.memoizedState)||(Et=!0),r.memoizedState=m,r.baseQueue===null&&(r.baseState=m),o.lastRenderedState=m}return[m,l]}function sm(){}function im(t,r){var o=Ue,l=zt(),d=r(),m=!Yt(l.memoizedState,d);if(m&&(l.memoizedState=d,Et=!0),l=l.queue,ic(lm.bind(null,o,l,t),[t]),l.getSnapshot!==r||m||nt!==null&&nt.memoizedState.tag&1){if(o.flags|=2048,Xi(9,am.bind(null,o,l,d,r),void 0,null),rt===null)throw Error(s(349));(zr&30)!==0||om(o,r,d)}return d}function om(t,r,o){t.flags|=16384,t={getSnapshot:r,value:o},r=Ue.updateQueue,r===null?(r={lastEffect:null,stores:null},Ue.updateQueue=r,r.stores=[t]):(o=r.stores,o===null?r.stores=[t]:o.push(t))}function am(t,r,o,l){r.value=o,r.getSnapshot=l,um(r)&&cm(t)}function lm(t,r,o){return o(function(){um(r)&&cm(t)})}function um(t){var r=t.getSnapshot;t=t.value;try{var o=r();return!Yt(t,o)}catch{return!0}}function cm(t){var r=An(t,1);r!==null&&tn(r,t,1,-1)}function dm(t){var r=xn();return typeof t=="function"&&(t=t()),r.memoizedState=r.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Yi,lastRenderedState:t},r.queue=t,t=t.dispatch=RS.bind(null,Ue,t),[r.memoizedState,t]}function Xi(t,r,o,l){return t={tag:t,create:r,destroy:o,deps:l,next:null},r=Ue.updateQueue,r===null?(r={lastEffect:null,stores:null},Ue.updateQueue=r,r.lastEffect=t.next=t):(o=r.lastEffect,o===null?r.lastEffect=t.next=t:(l=o.next,o.next=t,t.next=l,r.lastEffect=t)),t}function fm(){return zt().memoizedState}function Ta(t,r,o,l){var d=xn();Ue.flags|=t,d.memoizedState=Xi(1|r,o,void 0,l===void 0?null:l)}function Pa(t,r,o,l){var d=zt();l=l===void 0?null:l;var m=void 0;if(Ge!==null){var w=Ge.memoizedState;if(m=w.destroy,l!==null&&ec(l,w.deps)){d.memoizedState=Xi(r,o,m,l);return}}Ue.flags|=t,d.memoizedState=Xi(1|r,o,m,l)}function hm(t,r){return Ta(8390656,8,t,r)}function ic(t,r){return Pa(2048,8,t,r)}function pm(t,r){return Pa(4,2,t,r)}function mm(t,r){return Pa(4,4,t,r)}function ym(t,r){if(typeof r=="function")return t=t(),r(t),function(){r(null)};if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function gm(t,r,o){return o=o!=null?o.concat([t]):null,Pa(4,4,ym.bind(null,r,t),o)}function oc(){}function vm(t,r){var o=zt();r=r===void 0?null:r;var l=o.memoizedState;return l!==null&&r!==null&&ec(r,l[1])?l[0]:(o.memoizedState=[t,r],t)}function xm(t,r){var o=zt();r=r===void 0?null:r;var l=o.memoizedState;return l!==null&&r!==null&&ec(r,l[1])?l[0]:(t=t(),o.memoizedState=[t,r],t)}function wm(t,r,o){return(zr&21)===0?(t.baseState&&(t.baseState=!1,Et=!0),t.memoizedState=o):(Yt(o,r)||(o=Yh(),Ue.lanes|=o,$r|=o,t.baseState=!0),r)}function jS(t,r){var o=Re;Re=o!==0&&4>o?o:4,t(!0);var l=Ju.transition;Ju.transition={};try{t(!1),r()}finally{Re=o,Ju.transition=l}}function Sm(){return zt().memoizedState}function bS(t,r,o){var l=ur(t);if(o={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null},km(t))Cm(r,o);else if(o=Jp(t,r,o,l),o!==null){var d=gt();tn(o,t,l,d),Em(o,r,l)}}function RS(t,r,o){var l=ur(t),d={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null};if(km(t))Cm(r,d);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=r.lastRenderedReducer,m!==null))try{var w=r.lastRenderedState,P=m(w,o);if(d.hasEagerState=!0,d.eagerState=P,Yt(P,w)){var b=r.interleaved;b===null?(d.next=d,Qu(r)):(d.next=b.next,b.next=d),r.interleaved=d;return}}catch{}finally{}o=Jp(t,r,d,l),o!==null&&(d=gt(),tn(o,t,l,d),Em(o,r,l))}}function km(t){var r=t.alternate;return t===Ue||r!==null&&r===Ue}function Cm(t,r){qi=Ea=!0;var o=t.pending;o===null?r.next=r:(r.next=o.next,o.next=r),t.pending=r}function Em(t,r,o){if((o&4194240)!==0){var l=r.lanes;l&=t.pendingLanes,o|=l,r.lanes=o,lu(t,o)}}var Na={readContext:Vt,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useInsertionEffect:dt,useLayoutEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useMutableSource:dt,useSyncExternalStore:dt,useId:dt,unstable_isNewReconciler:!1},MS={readContext:Vt,useCallback:function(t,r){return xn().memoizedState=[t,r===void 0?null:r],t},useContext:Vt,useEffect:hm,useImperativeHandle:function(t,r,o){return o=o!=null?o.concat([t]):null,Ta(4194308,4,ym.bind(null,r,t),o)},useLayoutEffect:function(t,r){return Ta(4194308,4,t,r)},useInsertionEffect:function(t,r){return Ta(4,2,t,r)},useMemo:function(t,r){var o=xn();return r=r===void 0?null:r,t=t(),o.memoizedState=[t,r],t},useReducer:function(t,r,o){var l=xn();return r=o!==void 0?o(r):r,l.memoizedState=l.baseState=r,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},l.queue=t,t=t.dispatch=bS.bind(null,Ue,t),[l.memoizedState,t]},useRef:function(t){var r=xn();return t={current:t},r.memoizedState=t},useState:dm,useDebugValue:oc,useDeferredValue:function(t){return xn().memoizedState=t},useTransition:function(){var t=dm(!1),r=t[0];return t=jS.bind(null,t[1]),xn().memoizedState=t,[r,t]},useMutableSource:function(){},useSyncExternalStore:function(t,r,o){var l=Ue,d=xn();if(_e){if(o===void 0)throw Error(s(407));o=o()}else{if(o=r(),rt===null)throw Error(s(349));(zr&30)!==0||om(l,r,o)}d.memoizedState=o;var m={value:o,getSnapshot:r};return d.queue=m,hm(lm.bind(null,l,m,t),[t]),l.flags|=2048,Xi(9,am.bind(null,l,m,o,r),void 0,null),o},useId:function(){var t=xn(),r=rt.identifierPrefix;if(_e){var o=Dn,l=Mn;o=(l&~(1<<32-Gt(l)-1)).toString(32)+o,r=":"+r+"R"+o,o=Gi++,0<o&&(r+="H"+o.toString(32)),r+=":"}else o=NS++,r=":"+r+"r"+o.toString(32)+":";return t.memoizedState=r},unstable_isNewReconciler:!1},DS={readContext:Vt,useCallback:vm,useContext:Vt,useEffect:ic,useImperativeHandle:gm,useInsertionEffect:pm,useLayoutEffect:mm,useMemo:xm,useReducer:rc,useRef:fm,useState:function(){return rc(Yi)},useDebugValue:oc,useDeferredValue:function(t){var r=zt();return wm(r,Ge.memoizedState,t)},useTransition:function(){var t=rc(Yi)[0],r=zt().memoizedState;return[t,r]},useMutableSource:sm,useSyncExternalStore:im,useId:Sm,unstable_isNewReconciler:!1},AS={readContext:Vt,useCallback:vm,useContext:Vt,useEffect:ic,useImperativeHandle:gm,useInsertionEffect:pm,useLayoutEffect:mm,useMemo:xm,useReducer:sc,useRef:fm,useState:function(){return sc(Yi)},useDebugValue:oc,useDeferredValue:function(t){var r=zt();return Ge===null?r.memoizedState=t:wm(r,Ge.memoizedState,t)},useTransition:function(){var t=sc(Yi)[0],r=zt().memoizedState;return[t,r]},useMutableSource:sm,useSyncExternalStore:im,useId:Sm,unstable_isNewReconciler:!1};function Zt(t,r){if(t&&t.defaultProps){r=q({},r),t=t.defaultProps;for(var o in t)r[o]===void 0&&(r[o]=t[o]);return r}return r}function ac(t,r,o,l){r=t.memoizedState,o=o(l,r),o=o==null?r:q({},r,o),t.memoizedState=o,t.lanes===0&&(t.updateQueue.baseState=o)}var ja={isMounted:function(t){return(t=t._reactInternals)?Ar(t)===t:!1},enqueueSetState:function(t,r,o){t=t._reactInternals;var l=gt(),d=ur(t),m=Ln(l,d);m.payload=r,o!=null&&(m.callback=o),r=ir(t,m,d),r!==null&&(tn(r,t,d,l),wa(r,t,d))},enqueueReplaceState:function(t,r,o){t=t._reactInternals;var l=gt(),d=ur(t),m=Ln(l,d);m.tag=1,m.payload=r,o!=null&&(m.callback=o),r=ir(t,m,d),r!==null&&(tn(r,t,d,l),wa(r,t,d))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var o=gt(),l=ur(t),d=Ln(o,l);d.tag=2,r!=null&&(d.callback=r),r=ir(t,d,l),r!==null&&(tn(r,t,l,o),wa(r,t,l))}};function Tm(t,r,o,l,d,m,w){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,m,w):r.prototype&&r.prototype.isPureReactComponent?!Fi(o,l)||!Fi(d,m):!0}function Pm(t,r,o){var l=!1,d=nr,m=r.contextType;return typeof m=="object"&&m!==null?m=Vt(m):(d=Ct(r)?Ir:ct.current,l=r.contextTypes,m=(l=l!=null)?Ns(t,d):nr),r=new r(o,m),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=ja,t.stateNode=r,r._reactInternals=t,l&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=d,t.__reactInternalMemoizedMaskedChildContext=m),r}function Nm(t,r,o,l){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(o,l),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(o,l),r.state!==t&&ja.enqueueReplaceState(r,r.state,null)}function lc(t,r,o,l){var d=t.stateNode;d.props=o,d.state=t.memoizedState,d.refs={},qu(t);var m=r.contextType;typeof m=="object"&&m!==null?d.context=Vt(m):(m=Ct(r)?Ir:ct.current,d.context=Ns(t,m)),d.state=t.memoizedState,m=r.getDerivedStateFromProps,typeof m=="function"&&(ac(t,r,m,o),d.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(r=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),r!==d.state&&ja.enqueueReplaceState(d,d.state,null),Sa(t,o,d,l),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308)}function Is(t,r){try{var o="",l=r;do o+=Ee(l),l=l.return;while(l);var d=o}catch(m){d=`
|
|
39
|
+
Error generating stack: `+m.message+`
|
|
40
|
+
`+m.stack}return{value:t,source:r,stack:d,digest:null}}function uc(t,r,o){return{value:t,source:null,stack:o??null,digest:r??null}}function cc(t,r){try{console.error(r.value)}catch(o){setTimeout(function(){throw o})}}var LS=typeof WeakMap=="function"?WeakMap:Map;function jm(t,r,o){o=Ln(-1,o),o.tag=3,o.payload={element:null};var l=r.value;return o.callback=function(){Ia||(Ia=!0,Tc=l),cc(t,r)},o}function bm(t,r,o){o=Ln(-1,o),o.tag=3;var l=t.type.getDerivedStateFromError;if(typeof l=="function"){var d=r.value;o.payload=function(){return l(d)},o.callback=function(){cc(t,r)}}var m=t.stateNode;return m!==null&&typeof m.componentDidCatch=="function"&&(o.callback=function(){cc(t,r),typeof l!="function"&&(ar===null?ar=new Set([this]):ar.add(this));var w=r.stack;this.componentDidCatch(r.value,{componentStack:w!==null?w:""})}),o}function Rm(t,r,o){var l=t.pingCache;if(l===null){l=t.pingCache=new LS;var d=new Set;l.set(r,d)}else d=l.get(r),d===void 0&&(d=new Set,l.set(r,d));d.has(o)||(d.add(o),t=qS.bind(null,t,r,o),r.then(t,t))}function Mm(t){do{var r;if((r=t.tag===13)&&(r=t.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return t;t=t.return}while(t!==null);return null}function Dm(t,r,o,l,d){return(t.mode&1)===0?(t===r?t.flags|=65536:(t.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(r=Ln(-1,1),r.tag=2,ir(o,r,1))),o.lanes|=1),t):(t.flags|=65536,t.lanes=d,t)}var IS=O.ReactCurrentOwner,Et=!1;function yt(t,r,o,l){r.child=t===null?Zp(r,null,o,l):Ms(r,t.child,o,l)}function Am(t,r,o,l,d){o=o.render;var m=r.ref;return As(r,d),l=tc(t,r,o,l,m,d),o=nc(),t!==null&&!Et?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~d,In(t,r,d)):(_e&&o&&_u(r),r.flags|=1,yt(t,r,l,d),r.child)}function Lm(t,r,o,l,d){if(t===null){var m=o.type;return typeof m=="function"&&!Dc(m)&&m.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(r.tag=15,r.type=m,Im(t,r,m,l,d)):(t=$a(o.type,null,l,r,r.mode,d),t.ref=r.ref,t.return=r,r.child=t)}if(m=t.child,(t.lanes&d)===0){var w=m.memoizedProps;if(o=o.compare,o=o!==null?o:Fi,o(w,l)&&t.ref===r.ref)return In(t,r,d)}return r.flags|=1,t=dr(m,l),t.ref=r.ref,t.return=r,r.child=t}function Im(t,r,o,l,d){if(t!==null){var m=t.memoizedProps;if(Fi(m,l)&&t.ref===r.ref)if(Et=!1,r.pendingProps=l=m,(t.lanes&d)!==0)(t.flags&131072)!==0&&(Et=!0);else return r.lanes=t.lanes,In(t,r,d)}return dc(t,r,o,l,d)}function Om(t,r,o){var l=r.pendingProps,d=l.children,m=t!==null?t.memoizedState:null;if(l.mode==="hidden")if((r.mode&1)===0)r.memoizedState={baseLanes:0,cachePool:null,transitions:null},Le(Fs,At),At|=o;else{if((o&1073741824)===0)return t=m!==null?m.baseLanes|o:o,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:t,cachePool:null,transitions:null},r.updateQueue=null,Le(Fs,At),At|=t,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=m!==null?m.baseLanes:o,Le(Fs,At),At|=l}else m!==null?(l=m.baseLanes|o,r.memoizedState=null):l=o,Le(Fs,At),At|=l;return yt(t,r,d,o),r.child}function Fm(t,r){var o=r.ref;(t===null&&o!==null||t!==null&&t.ref!==o)&&(r.flags|=512,r.flags|=2097152)}function dc(t,r,o,l,d){var m=Ct(o)?Ir:ct.current;return m=Ns(r,m),As(r,d),o=tc(t,r,o,l,m,d),l=nc(),t!==null&&!Et?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~d,In(t,r,d)):(_e&&l&&_u(r),r.flags|=1,yt(t,r,o,d),r.child)}function _m(t,r,o,l,d){if(Ct(o)){var m=!0;fa(r)}else m=!1;if(As(r,d),r.stateNode===null)Ra(t,r),Pm(r,o,l),lc(r,o,l,d),l=!0;else if(t===null){var w=r.stateNode,P=r.memoizedProps;w.props=P;var b=w.context,$=o.contextType;typeof $=="object"&&$!==null?$=Vt($):($=Ct(o)?Ir:ct.current,$=Ns(r,$));var K=o.getDerivedStateFromProps,W=typeof K=="function"||typeof w.getSnapshotBeforeUpdate=="function";W||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(P!==l||b!==$)&&Nm(r,w,l,$),sr=!1;var H=r.memoizedState;w.state=H,Sa(r,l,w,d),b=r.memoizedState,P!==l||H!==b||kt.current||sr?(typeof K=="function"&&(ac(r,o,K,l),b=r.memoizedState),(P=sr||Tm(r,o,P,l,H,b,$))?(W||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(r.flags|=4194308)):(typeof w.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=l,r.memoizedState=b),w.props=l,w.state=b,w.context=$,l=P):(typeof w.componentDidMount=="function"&&(r.flags|=4194308),l=!1)}else{w=r.stateNode,em(t,r),P=r.memoizedProps,$=r.type===r.elementType?P:Zt(r.type,P),w.props=$,W=r.pendingProps,H=w.context,b=o.contextType,typeof b=="object"&&b!==null?b=Vt(b):(b=Ct(o)?Ir:ct.current,b=Ns(r,b));var te=o.getDerivedStateFromProps;(K=typeof te=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(P!==W||H!==b)&&Nm(r,w,l,b),sr=!1,H=r.memoizedState,w.state=H,Sa(r,l,w,d);var se=r.memoizedState;P!==W||H!==se||kt.current||sr?(typeof te=="function"&&(ac(r,o,te,l),se=r.memoizedState),($=sr||Tm(r,o,$,l,H,se,b)||!1)?(K||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(l,se,b),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(l,se,b)),typeof w.componentDidUpdate=="function"&&(r.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof w.componentDidUpdate!="function"||P===t.memoizedProps&&H===t.memoizedState||(r.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||P===t.memoizedProps&&H===t.memoizedState||(r.flags|=1024),r.memoizedProps=l,r.memoizedState=se),w.props=l,w.state=se,w.context=b,l=$):(typeof w.componentDidUpdate!="function"||P===t.memoizedProps&&H===t.memoizedState||(r.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||P===t.memoizedProps&&H===t.memoizedState||(r.flags|=1024),l=!1)}return fc(t,r,o,l,m,d)}function fc(t,r,o,l,d,m){Fm(t,r);var w=(r.flags&128)!==0;if(!l&&!w)return d&&Bp(r,o,!1),In(t,r,m);l=r.stateNode,IS.current=r;var P=w&&typeof o.getDerivedStateFromError!="function"?null:l.render();return r.flags|=1,t!==null&&w?(r.child=Ms(r,t.child,null,m),r.child=Ms(r,null,P,m)):yt(t,r,P,m),r.memoizedState=l.state,d&&Bp(r,o,!0),r.child}function Vm(t){var r=t.stateNode;r.pendingContext?$p(t,r.pendingContext,r.pendingContext!==r.context):r.context&&$p(t,r.context,!1),Gu(t,r.containerInfo)}function zm(t,r,o,l,d){return Rs(),Uu(d),r.flags|=256,yt(t,r,o,l),r.child}var hc={dehydrated:null,treeContext:null,retryLane:0};function pc(t){return{baseLanes:t,cachePool:null,transitions:null}}function $m(t,r,o){var l=r.pendingProps,d=$e.current,m=!1,w=(r.flags&128)!==0,P;if((P=w)||(P=t!==null&&t.memoizedState===null?!1:(d&2)!==0),P?(m=!0,r.flags&=-129):(t===null||t.memoizedState!==null)&&(d|=1),Le($e,d&1),t===null)return $u(r),t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?((r.mode&1)===0?r.lanes=1:t.data==="$!"?r.lanes=8:r.lanes=1073741824,null):(w=l.children,t=l.fallback,m?(l=r.mode,m=r.child,w={mode:"hidden",children:w},(l&1)===0&&m!==null?(m.childLanes=0,m.pendingProps=w):m=Ua(w,l,0,null),t=Kr(t,l,o,null),m.return=r,t.return=r,m.sibling=t,r.child=m,r.child.memoizedState=pc(o),r.memoizedState=hc,t):mc(r,w));if(d=t.memoizedState,d!==null&&(P=d.dehydrated,P!==null))return OS(t,r,w,l,P,d,o);if(m){m=l.fallback,w=r.mode,d=t.child,P=d.sibling;var b={mode:"hidden",children:l.children};return(w&1)===0&&r.child!==d?(l=r.child,l.childLanes=0,l.pendingProps=b,r.deletions=null):(l=dr(d,b),l.subtreeFlags=d.subtreeFlags&14680064),P!==null?m=dr(P,m):(m=Kr(m,w,o,null),m.flags|=2),m.return=r,l.return=r,l.sibling=m,r.child=l,l=m,m=r.child,w=t.child.memoizedState,w=w===null?pc(o):{baseLanes:w.baseLanes|o,cachePool:null,transitions:w.transitions},m.memoizedState=w,m.childLanes=t.childLanes&~o,r.memoizedState=hc,l}return m=t.child,t=m.sibling,l=dr(m,{mode:"visible",children:l.children}),(r.mode&1)===0&&(l.lanes=o),l.return=r,l.sibling=null,t!==null&&(o=r.deletions,o===null?(r.deletions=[t],r.flags|=16):o.push(t)),r.child=l,r.memoizedState=null,l}function mc(t,r){return r=Ua({mode:"visible",children:r},t.mode,0,null),r.return=t,t.child=r}function ba(t,r,o,l){return l!==null&&Uu(l),Ms(r,t.child,null,o),t=mc(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function OS(t,r,o,l,d,m,w){if(o)return r.flags&256?(r.flags&=-257,l=uc(Error(s(422))),ba(t,r,w,l)):r.memoizedState!==null?(r.child=t.child,r.flags|=128,null):(m=l.fallback,d=r.mode,l=Ua({mode:"visible",children:l.children},d,0,null),m=Kr(m,d,w,null),m.flags|=2,l.return=r,m.return=r,l.sibling=m,r.child=l,(r.mode&1)!==0&&Ms(r,t.child,null,w),r.child.memoizedState=pc(w),r.memoizedState=hc,m);if((r.mode&1)===0)return ba(t,r,w,null);if(d.data==="$!"){if(l=d.nextSibling&&d.nextSibling.dataset,l)var P=l.dgst;return l=P,m=Error(s(419)),l=uc(m,l,void 0),ba(t,r,w,l)}if(P=(w&t.childLanes)!==0,Et||P){if(l=rt,l!==null){switch(w&-w){case 4:d=2;break;case 16:d=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:d=32;break;case 536870912:d=268435456;break;default:d=0}d=(d&(l.suspendedLanes|w))!==0?0:d,d!==0&&d!==m.retryLane&&(m.retryLane=d,An(t,d),tn(l,t,d,-1))}return Mc(),l=uc(Error(s(421))),ba(t,r,w,l)}return d.data==="$?"?(r.flags|=128,r.child=t.child,r=GS.bind(null,t),d._reactRetry=r,null):(t=m.treeContext,Dt=er(d.nextSibling),Mt=r,_e=!0,Xt=null,t!==null&&(Ft[_t++]=Mn,Ft[_t++]=Dn,Ft[_t++]=Or,Mn=t.id,Dn=t.overflow,Or=r),r=mc(r,l.children),r.flags|=4096,r)}function Um(t,r,o){t.lanes|=r;var l=t.alternate;l!==null&&(l.lanes|=r),Wu(t.return,r,o)}function yc(t,r,o,l,d){var m=t.memoizedState;m===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:d}:(m.isBackwards=r,m.rendering=null,m.renderingStartTime=0,m.last=l,m.tail=o,m.tailMode=d)}function Bm(t,r,o){var l=r.pendingProps,d=l.revealOrder,m=l.tail;if(yt(t,r,l.children,o),l=$e.current,(l&2)!==0)l=l&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Um(t,o,r);else if(t.tag===19)Um(t,o,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}l&=1}if(Le($e,l),(r.mode&1)===0)r.memoizedState=null;else switch(d){case"forwards":for(o=r.child,d=null;o!==null;)t=o.alternate,t!==null&&ka(t)===null&&(d=o),o=o.sibling;o=d,o===null?(d=r.child,r.child=null):(d=o.sibling,o.sibling=null),yc(r,!1,d,o,m);break;case"backwards":for(o=null,d=r.child,r.child=null;d!==null;){if(t=d.alternate,t!==null&&ka(t)===null){r.child=d;break}t=d.sibling,d.sibling=o,o=d,d=t}yc(r,!0,o,null,m);break;case"together":yc(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Ra(t,r){(r.mode&1)===0&&t!==null&&(t.alternate=null,r.alternate=null,r.flags|=2)}function In(t,r,o){if(t!==null&&(r.dependencies=t.dependencies),$r|=r.lanes,(o&r.childLanes)===0)return null;if(t!==null&&r.child!==t.child)throw Error(s(153));if(r.child!==null){for(t=r.child,o=dr(t,t.pendingProps),r.child=o,o.return=r;t.sibling!==null;)t=t.sibling,o=o.sibling=dr(t,t.pendingProps),o.return=r;o.sibling=null}return r.child}function FS(t,r,o){switch(r.tag){case 3:Vm(r),Rs();break;case 5:rm(r);break;case 1:Ct(r.type)&&fa(r);break;case 4:Gu(r,r.stateNode.containerInfo);break;case 10:var l=r.type._context,d=r.memoizedProps.value;Le(va,l._currentValue),l._currentValue=d;break;case 13:if(l=r.memoizedState,l!==null)return l.dehydrated!==null?(Le($e,$e.current&1),r.flags|=128,null):(o&r.child.childLanes)!==0?$m(t,r,o):(Le($e,$e.current&1),t=In(t,r,o),t!==null?t.sibling:null);Le($e,$e.current&1);break;case 19:if(l=(o&r.childLanes)!==0,(t.flags&128)!==0){if(l)return Bm(t,r,o);r.flags|=128}if(d=r.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),Le($e,$e.current),l)break;return null;case 22:case 23:return r.lanes=0,Om(t,r,o)}return In(t,r,o)}var Hm,gc,Km,Wm;Hm=function(t,r){for(var o=r.child;o!==null;){if(o.tag===5||o.tag===6)t.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},gc=function(){},Km=function(t,r,o,l){var d=t.memoizedProps;if(d!==l){t=r.stateNode,Vr(vn.current);var m=null;switch(o){case"input":d=Wl(t,d),l=Wl(t,l),m=[];break;case"select":d=q({},d,{value:void 0}),l=q({},l,{value:void 0}),m=[];break;case"textarea":d=Gl(t,d),l=Gl(t,l),m=[];break;default:typeof d.onClick!="function"&&typeof l.onClick=="function"&&(t.onclick=ua)}Xl(o,l);var w;o=null;for($ in d)if(!l.hasOwnProperty($)&&d.hasOwnProperty($)&&d[$]!=null)if($==="style"){var P=d[$];for(w in P)P.hasOwnProperty(w)&&(o||(o={}),o[w]="")}else $!=="dangerouslySetInnerHTML"&&$!=="children"&&$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&$!=="autoFocus"&&(a.hasOwnProperty($)?m||(m=[]):(m=m||[]).push($,null));for($ in l){var b=l[$];if(P=d!=null?d[$]:void 0,l.hasOwnProperty($)&&b!==P&&(b!=null||P!=null))if($==="style")if(P){for(w in P)!P.hasOwnProperty(w)||b&&b.hasOwnProperty(w)||(o||(o={}),o[w]="");for(w in b)b.hasOwnProperty(w)&&P[w]!==b[w]&&(o||(o={}),o[w]=b[w])}else o||(m||(m=[]),m.push($,o)),o=b;else $==="dangerouslySetInnerHTML"?(b=b?b.__html:void 0,P=P?P.__html:void 0,b!=null&&P!==b&&(m=m||[]).push($,b)):$==="children"?typeof b!="string"&&typeof b!="number"||(m=m||[]).push($,""+b):$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&(a.hasOwnProperty($)?(b!=null&&$==="onScroll"&&Ie("scroll",t),m||P===b||(m=[])):(m=m||[]).push($,b))}o&&(m=m||[]).push("style",o);var $=m;(r.updateQueue=$)&&(r.flags|=4)}},Wm=function(t,r,o,l){o!==l&&(r.flags|=4)};function Zi(t,r){if(!_e)switch(t.tailMode){case"hidden":r=t.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?t.tail=null:o.sibling=null;break;case"collapsed":o=t.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function ft(t){var r=t.alternate!==null&&t.alternate.child===t.child,o=0,l=0;if(r)for(var d=t.child;d!==null;)o|=d.lanes|d.childLanes,l|=d.subtreeFlags&14680064,l|=d.flags&14680064,d.return=t,d=d.sibling;else for(d=t.child;d!==null;)o|=d.lanes|d.childLanes,l|=d.subtreeFlags,l|=d.flags,d.return=t,d=d.sibling;return t.subtreeFlags|=l,t.childLanes=o,r}function _S(t,r,o){var l=r.pendingProps;switch(Vu(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(r),null;case 1:return Ct(r.type)&&da(),ft(r),null;case 3:return l=r.stateNode,Ls(),Oe(kt),Oe(ct),Zu(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(ya(r)?r.flags|=4:t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Xt!==null&&(jc(Xt),Xt=null))),gc(t,r),ft(r),null;case 5:Yu(r);var d=Vr(Qi.current);if(o=r.type,t!==null&&r.stateNode!=null)Km(t,r,o,l,d),t.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!l){if(r.stateNode===null)throw Error(s(166));return ft(r),null}if(t=Vr(vn.current),ya(r)){l=r.stateNode,o=r.type;var m=r.memoizedProps;switch(l[gn]=r,l[Ui]=m,t=(r.mode&1)!==0,o){case"dialog":Ie("cancel",l),Ie("close",l);break;case"iframe":case"object":case"embed":Ie("load",l);break;case"video":case"audio":for(d=0;d<Vi.length;d++)Ie(Vi[d],l);break;case"source":Ie("error",l);break;case"img":case"image":case"link":Ie("error",l),Ie("load",l);break;case"details":Ie("toggle",l);break;case"input":Ph(l,m),Ie("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!m.multiple},Ie("invalid",l);break;case"textarea":bh(l,m),Ie("invalid",l)}Xl(o,m),d=null;for(var w in m)if(m.hasOwnProperty(w)){var P=m[w];w==="children"?typeof P=="string"?l.textContent!==P&&(m.suppressHydrationWarning!==!0&&la(l.textContent,P,t),d=["children",P]):typeof P=="number"&&l.textContent!==""+P&&(m.suppressHydrationWarning!==!0&&la(l.textContent,P,t),d=["children",""+P]):a.hasOwnProperty(w)&&P!=null&&w==="onScroll"&&Ie("scroll",l)}switch(o){case"input":Vo(l),jh(l,m,!0);break;case"textarea":Vo(l),Mh(l);break;case"select":case"option":break;default:typeof m.onClick=="function"&&(l.onclick=ua)}l=d,r.updateQueue=l,l!==null&&(r.flags|=4)}else{w=d.nodeType===9?d:d.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Dh(o)),t==="http://www.w3.org/1999/xhtml"?o==="script"?(t=w.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof l.is=="string"?t=w.createElement(o,{is:l.is}):(t=w.createElement(o),o==="select"&&(w=t,l.multiple?w.multiple=!0:l.size&&(w.size=l.size))):t=w.createElementNS(t,o),t[gn]=r,t[Ui]=l,Hm(t,r,!1,!1),r.stateNode=t;e:{switch(w=Zl(o,l),o){case"dialog":Ie("cancel",t),Ie("close",t),d=l;break;case"iframe":case"object":case"embed":Ie("load",t),d=l;break;case"video":case"audio":for(d=0;d<Vi.length;d++)Ie(Vi[d],t);d=l;break;case"source":Ie("error",t),d=l;break;case"img":case"image":case"link":Ie("error",t),Ie("load",t),d=l;break;case"details":Ie("toggle",t),d=l;break;case"input":Ph(t,l),d=Wl(t,l),Ie("invalid",t);break;case"option":d=l;break;case"select":t._wrapperState={wasMultiple:!!l.multiple},d=q({},l,{value:void 0}),Ie("invalid",t);break;case"textarea":bh(t,l),d=Gl(t,l),Ie("invalid",t);break;default:d=l}Xl(o,d),P=d;for(m in P)if(P.hasOwnProperty(m)){var b=P[m];m==="style"?Ih(t,b):m==="dangerouslySetInnerHTML"?(b=b?b.__html:void 0,b!=null&&Ah(t,b)):m==="children"?typeof b=="string"?(o!=="textarea"||b!=="")&&wi(t,b):typeof b=="number"&&wi(t,""+b):m!=="suppressContentEditableWarning"&&m!=="suppressHydrationWarning"&&m!=="autoFocus"&&(a.hasOwnProperty(m)?b!=null&&m==="onScroll"&&Ie("scroll",t):b!=null&&R(t,m,b,w))}switch(o){case"input":Vo(t),jh(t,l,!1);break;case"textarea":Vo(t),Mh(t);break;case"option":l.value!=null&&t.setAttribute("value",""+be(l.value));break;case"select":t.multiple=!!l.multiple,m=l.value,m!=null?ms(t,!!l.multiple,m,!1):l.defaultValue!=null&&ms(t,!!l.multiple,l.defaultValue,!0);break;default:typeof d.onClick=="function"&&(t.onclick=ua)}switch(o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}}l&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return ft(r),null;case 6:if(t&&r.stateNode!=null)Wm(t,r,t.memoizedProps,l);else{if(typeof l!="string"&&r.stateNode===null)throw Error(s(166));if(o=Vr(Qi.current),Vr(vn.current),ya(r)){if(l=r.stateNode,o=r.memoizedProps,l[gn]=r,(m=l.nodeValue!==o)&&(t=Mt,t!==null))switch(t.tag){case 3:la(l.nodeValue,o,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&la(l.nodeValue,o,(t.mode&1)!==0)}m&&(r.flags|=4)}else l=(o.nodeType===9?o:o.ownerDocument).createTextNode(l),l[gn]=r,r.stateNode=l}return ft(r),null;case 13:if(Oe($e),l=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(_e&&Dt!==null&&(r.mode&1)!==0&&(r.flags&128)===0)Gp(),Rs(),r.flags|=98560,m=!1;else if(m=ya(r),l!==null&&l.dehydrated!==null){if(t===null){if(!m)throw Error(s(318));if(m=r.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(s(317));m[gn]=r}else Rs(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;ft(r),m=!1}else Xt!==null&&(jc(Xt),Xt=null),m=!0;if(!m)return r.flags&65536?r:null}return(r.flags&128)!==0?(r.lanes=o,r):(l=l!==null,l!==(t!==null&&t.memoizedState!==null)&&l&&(r.child.flags|=8192,(r.mode&1)!==0&&(t===null||($e.current&1)!==0?Ye===0&&(Ye=3):Mc())),r.updateQueue!==null&&(r.flags|=4),ft(r),null);case 4:return Ls(),gc(t,r),t===null&&zi(r.stateNode.containerInfo),ft(r),null;case 10:return Ku(r.type._context),ft(r),null;case 17:return Ct(r.type)&&da(),ft(r),null;case 19:if(Oe($e),m=r.memoizedState,m===null)return ft(r),null;if(l=(r.flags&128)!==0,w=m.rendering,w===null)if(l)Zi(m,!1);else{if(Ye!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(w=ka(t),w!==null){for(r.flags|=128,Zi(m,!1),l=w.updateQueue,l!==null&&(r.updateQueue=l,r.flags|=4),r.subtreeFlags=0,l=o,o=r.child;o!==null;)m=o,t=l,m.flags&=14680066,w=m.alternate,w===null?(m.childLanes=0,m.lanes=t,m.child=null,m.subtreeFlags=0,m.memoizedProps=null,m.memoizedState=null,m.updateQueue=null,m.dependencies=null,m.stateNode=null):(m.childLanes=w.childLanes,m.lanes=w.lanes,m.child=w.child,m.subtreeFlags=0,m.deletions=null,m.memoizedProps=w.memoizedProps,m.memoizedState=w.memoizedState,m.updateQueue=w.updateQueue,m.type=w.type,t=w.dependencies,m.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),o=o.sibling;return Le($e,$e.current&1|2),r.child}t=t.sibling}m.tail!==null&&Ke()>_s&&(r.flags|=128,l=!0,Zi(m,!1),r.lanes=4194304)}else{if(!l)if(t=ka(w),t!==null){if(r.flags|=128,l=!0,o=t.updateQueue,o!==null&&(r.updateQueue=o,r.flags|=4),Zi(m,!0),m.tail===null&&m.tailMode==="hidden"&&!w.alternate&&!_e)return ft(r),null}else 2*Ke()-m.renderingStartTime>_s&&o!==1073741824&&(r.flags|=128,l=!0,Zi(m,!1),r.lanes=4194304);m.isBackwards?(w.sibling=r.child,r.child=w):(o=m.last,o!==null?o.sibling=w:r.child=w,m.last=w)}return m.tail!==null?(r=m.tail,m.rendering=r,m.tail=r.sibling,m.renderingStartTime=Ke(),r.sibling=null,o=$e.current,Le($e,l?o&1|2:o&1),r):(ft(r),null);case 22:case 23:return Rc(),l=r.memoizedState!==null,t!==null&&t.memoizedState!==null!==l&&(r.flags|=8192),l&&(r.mode&1)!==0?(At&1073741824)!==0&&(ft(r),r.subtreeFlags&6&&(r.flags|=8192)):ft(r),null;case 24:return null;case 25:return null}throw Error(s(156,r.tag))}function VS(t,r){switch(Vu(r),r.tag){case 1:return Ct(r.type)&&da(),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Ls(),Oe(kt),Oe(ct),Zu(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 5:return Yu(r),null;case 13:if(Oe($e),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(s(340));Rs()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return Oe($e),null;case 4:return Ls(),null;case 10:return Ku(r.type._context),null;case 22:case 23:return Rc(),null;case 24:return null;default:return null}}var Ma=!1,ht=!1,zS=typeof WeakSet=="function"?WeakSet:Set,re=null;function Os(t,r){var o=t.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(l){He(t,r,l)}else o.current=null}function vc(t,r,o){try{o()}catch(l){He(t,r,l)}}var Qm=!1;function $S(t,r){if(Ru=Xo,t=Tp(),ku(t)){if("selectionStart"in t)var o={start:t.selectionStart,end:t.selectionEnd};else e:{o=(o=t.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var d=l.anchorOffset,m=l.focusNode;l=l.focusOffset;try{o.nodeType,m.nodeType}catch{o=null;break e}var w=0,P=-1,b=-1,$=0,K=0,W=t,H=null;t:for(;;){for(var te;W!==o||d!==0&&W.nodeType!==3||(P=w+d),W!==m||l!==0&&W.nodeType!==3||(b=w+l),W.nodeType===3&&(w+=W.nodeValue.length),(te=W.firstChild)!==null;)H=W,W=te;for(;;){if(W===t)break t;if(H===o&&++$===d&&(P=w),H===m&&++K===l&&(b=w),(te=W.nextSibling)!==null)break;W=H,H=W.parentNode}W=te}o=P===-1||b===-1?null:{start:P,end:b}}else o=null}o=o||{start:0,end:0}}else o=null;for(Mu={focusedElem:t,selectionRange:o},Xo=!1,re=r;re!==null;)if(r=re,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,re=t;else for(;re!==null;){r=re;try{var se=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(se!==null){var oe=se.memoizedProps,We=se.memoizedState,V=r.stateNode,M=V.getSnapshotBeforeUpdate(r.elementType===r.type?oe:Zt(r.type,oe),We);V.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var z=r.stateNode.containerInfo;z.nodeType===1?z.textContent="":z.nodeType===9&&z.documentElement&&z.removeChild(z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Q){He(r,r.return,Q)}if(t=r.sibling,t!==null){t.return=r.return,re=t;break}re=r.return}return se=Qm,Qm=!1,se}function Ji(t,r,o){var l=r.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var d=l=l.next;do{if((d.tag&t)===t){var m=d.destroy;d.destroy=void 0,m!==void 0&&vc(r,o,m)}d=d.next}while(d!==l)}}function Da(t,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&t)===t){var l=o.create;o.destroy=l()}o=o.next}while(o!==r)}}function xc(t){var r=t.ref;if(r!==null){var o=t.stateNode;switch(t.tag){case 5:t=o;break;default:t=o}typeof r=="function"?r(t):r.current=t}}function qm(t){var r=t.alternate;r!==null&&(t.alternate=null,qm(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&(delete r[gn],delete r[Ui],delete r[Iu],delete r[CS],delete r[ES])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Gm(t){return t.tag===5||t.tag===3||t.tag===4}function Ym(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Gm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function wc(t,r,o){var l=t.tag;if(l===5||l===6)t=t.stateNode,r?o.nodeType===8?o.parentNode.insertBefore(t,r):o.insertBefore(t,r):(o.nodeType===8?(r=o.parentNode,r.insertBefore(t,o)):(r=o,r.appendChild(t)),o=o._reactRootContainer,o!=null||r.onclick!==null||(r.onclick=ua));else if(l!==4&&(t=t.child,t!==null))for(wc(t,r,o),t=t.sibling;t!==null;)wc(t,r,o),t=t.sibling}function Sc(t,r,o){var l=t.tag;if(l===5||l===6)t=t.stateNode,r?o.insertBefore(t,r):o.appendChild(t);else if(l!==4&&(t=t.child,t!==null))for(Sc(t,r,o),t=t.sibling;t!==null;)Sc(t,r,o),t=t.sibling}var it=null,Jt=!1;function or(t,r,o){for(o=o.child;o!==null;)Xm(t,r,o),o=o.sibling}function Xm(t,r,o){if(yn&&typeof yn.onCommitFiberUnmount=="function")try{yn.onCommitFiberUnmount(Ko,o)}catch{}switch(o.tag){case 5:ht||Os(o,r);case 6:var l=it,d=Jt;it=null,or(t,r,o),it=l,Jt=d,it!==null&&(Jt?(t=it,o=o.stateNode,t.nodeType===8?t.parentNode.removeChild(o):t.removeChild(o)):it.removeChild(o.stateNode));break;case 18:it!==null&&(Jt?(t=it,o=o.stateNode,t.nodeType===8?Lu(t.parentNode,o):t.nodeType===1&&Lu(t,o),Mi(t)):Lu(it,o.stateNode));break;case 4:l=it,d=Jt,it=o.stateNode.containerInfo,Jt=!0,or(t,r,o),it=l,Jt=d;break;case 0:case 11:case 14:case 15:if(!ht&&(l=o.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){d=l=l.next;do{var m=d,w=m.destroy;m=m.tag,w!==void 0&&((m&2)!==0||(m&4)!==0)&&vc(o,r,w),d=d.next}while(d!==l)}or(t,r,o);break;case 1:if(!ht&&(Os(o,r),l=o.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=o.memoizedProps,l.state=o.memoizedState,l.componentWillUnmount()}catch(P){He(o,r,P)}or(t,r,o);break;case 21:or(t,r,o);break;case 22:o.mode&1?(ht=(l=ht)||o.memoizedState!==null,or(t,r,o),ht=l):or(t,r,o);break;default:or(t,r,o)}}function Zm(t){var r=t.updateQueue;if(r!==null){t.updateQueue=null;var o=t.stateNode;o===null&&(o=t.stateNode=new zS),r.forEach(function(l){var d=YS.bind(null,t,l);o.has(l)||(o.add(l),l.then(d,d))})}}function en(t,r){var o=r.deletions;if(o!==null)for(var l=0;l<o.length;l++){var d=o[l];try{var m=t,w=r,P=w;e:for(;P!==null;){switch(P.tag){case 5:it=P.stateNode,Jt=!1;break e;case 3:it=P.stateNode.containerInfo,Jt=!0;break e;case 4:it=P.stateNode.containerInfo,Jt=!0;break e}P=P.return}if(it===null)throw Error(s(160));Xm(m,w,d),it=null,Jt=!1;var b=d.alternate;b!==null&&(b.return=null),d.return=null}catch($){He(d,r,$)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)Jm(r,t),r=r.sibling}function Jm(t,r){var o=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(en(r,t),wn(t),l&4){try{Ji(3,t,t.return),Da(3,t)}catch(oe){He(t,t.return,oe)}try{Ji(5,t,t.return)}catch(oe){He(t,t.return,oe)}}break;case 1:en(r,t),wn(t),l&512&&o!==null&&Os(o,o.return);break;case 5:if(en(r,t),wn(t),l&512&&o!==null&&Os(o,o.return),t.flags&32){var d=t.stateNode;try{wi(d,"")}catch(oe){He(t,t.return,oe)}}if(l&4&&(d=t.stateNode,d!=null)){var m=t.memoizedProps,w=o!==null?o.memoizedProps:m,P=t.type,b=t.updateQueue;if(t.updateQueue=null,b!==null)try{P==="input"&&m.type==="radio"&&m.name!=null&&Nh(d,m),Zl(P,w);var $=Zl(P,m);for(w=0;w<b.length;w+=2){var K=b[w],W=b[w+1];K==="style"?Ih(d,W):K==="dangerouslySetInnerHTML"?Ah(d,W):K==="children"?wi(d,W):R(d,K,W,$)}switch(P){case"input":Ql(d,m);break;case"textarea":Rh(d,m);break;case"select":var H=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple=!!m.multiple;var te=m.value;te!=null?ms(d,!!m.multiple,te,!1):H!==!!m.multiple&&(m.defaultValue!=null?ms(d,!!m.multiple,m.defaultValue,!0):ms(d,!!m.multiple,m.multiple?[]:"",!1))}d[Ui]=m}catch(oe){He(t,t.return,oe)}}break;case 6:if(en(r,t),wn(t),l&4){if(t.stateNode===null)throw Error(s(162));d=t.stateNode,m=t.memoizedProps;try{d.nodeValue=m}catch(oe){He(t,t.return,oe)}}break;case 3:if(en(r,t),wn(t),l&4&&o!==null&&o.memoizedState.isDehydrated)try{Mi(r.containerInfo)}catch(oe){He(t,t.return,oe)}break;case 4:en(r,t),wn(t);break;case 13:en(r,t),wn(t),d=t.child,d.flags&8192&&(m=d.memoizedState!==null,d.stateNode.isHidden=m,!m||d.alternate!==null&&d.alternate.memoizedState!==null||(Ec=Ke())),l&4&&Zm(t);break;case 22:if(K=o!==null&&o.memoizedState!==null,t.mode&1?(ht=($=ht)||K,en(r,t),ht=$):en(r,t),wn(t),l&8192){if($=t.memoizedState!==null,(t.stateNode.isHidden=$)&&!K&&(t.mode&1)!==0)for(re=t,K=t.child;K!==null;){for(W=re=K;re!==null;){switch(H=re,te=H.child,H.tag){case 0:case 11:case 14:case 15:Ji(4,H,H.return);break;case 1:Os(H,H.return);var se=H.stateNode;if(typeof se.componentWillUnmount=="function"){l=H,o=H.return;try{r=l,se.props=r.memoizedProps,se.state=r.memoizedState,se.componentWillUnmount()}catch(oe){He(l,o,oe)}}break;case 5:Os(H,H.return);break;case 22:if(H.memoizedState!==null){ny(W);continue}}te!==null?(te.return=H,re=te):ny(W)}K=K.sibling}e:for(K=null,W=t;;){if(W.tag===5){if(K===null){K=W;try{d=W.stateNode,$?(m=d.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none"):(P=W.stateNode,b=W.memoizedProps.style,w=b!=null&&b.hasOwnProperty("display")?b.display:null,P.style.display=Lh("display",w))}catch(oe){He(t,t.return,oe)}}}else if(W.tag===6){if(K===null)try{W.stateNode.nodeValue=$?"":W.memoizedProps}catch(oe){He(t,t.return,oe)}}else if((W.tag!==22&&W.tag!==23||W.memoizedState===null||W===t)&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===t)break e;for(;W.sibling===null;){if(W.return===null||W.return===t)break e;K===W&&(K=null),W=W.return}K===W&&(K=null),W.sibling.return=W.return,W=W.sibling}}break;case 19:en(r,t),wn(t),l&4&&Zm(t);break;case 21:break;default:en(r,t),wn(t)}}function wn(t){var r=t.flags;if(r&2){try{e:{for(var o=t.return;o!==null;){if(Gm(o)){var l=o;break e}o=o.return}throw Error(s(160))}switch(l.tag){case 5:var d=l.stateNode;l.flags&32&&(wi(d,""),l.flags&=-33);var m=Ym(t);Sc(t,m,d);break;case 3:case 4:var w=l.stateNode.containerInfo,P=Ym(t);wc(t,P,w);break;default:throw Error(s(161))}}catch(b){He(t,t.return,b)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function US(t,r,o){re=t,ey(t)}function ey(t,r,o){for(var l=(t.mode&1)!==0;re!==null;){var d=re,m=d.child;if(d.tag===22&&l){var w=d.memoizedState!==null||Ma;if(!w){var P=d.alternate,b=P!==null&&P.memoizedState!==null||ht;P=Ma;var $=ht;if(Ma=w,(ht=b)&&!$)for(re=d;re!==null;)w=re,b=w.child,w.tag===22&&w.memoizedState!==null?ry(d):b!==null?(b.return=w,re=b):ry(d);for(;m!==null;)re=m,ey(m),m=m.sibling;re=d,Ma=P,ht=$}ty(t)}else(d.subtreeFlags&8772)!==0&&m!==null?(m.return=d,re=m):ty(t)}}function ty(t){for(;re!==null;){var r=re;if((r.flags&8772)!==0){var o=r.alternate;try{if((r.flags&8772)!==0)switch(r.tag){case 0:case 11:case 15:ht||Da(5,r);break;case 1:var l=r.stateNode;if(r.flags&4&&!ht)if(o===null)l.componentDidMount();else{var d=r.elementType===r.type?o.memoizedProps:Zt(r.type,o.memoizedProps);l.componentDidUpdate(d,o.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var m=r.updateQueue;m!==null&&nm(r,m,l);break;case 3:var w=r.updateQueue;if(w!==null){if(o=null,r.child!==null)switch(r.child.tag){case 5:o=r.child.stateNode;break;case 1:o=r.child.stateNode}nm(r,w,o)}break;case 5:var P=r.stateNode;if(o===null&&r.flags&4){o=P;var b=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":b.autoFocus&&o.focus();break;case"img":b.src&&(o.src=b.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var $=r.alternate;if($!==null){var K=$.memoizedState;if(K!==null){var W=K.dehydrated;W!==null&&Mi(W)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}ht||r.flags&512&&xc(r)}catch(H){He(r,r.return,H)}}if(r===t){re=null;break}if(o=r.sibling,o!==null){o.return=r.return,re=o;break}re=r.return}}function ny(t){for(;re!==null;){var r=re;if(r===t){re=null;break}var o=r.sibling;if(o!==null){o.return=r.return,re=o;break}re=r.return}}function ry(t){for(;re!==null;){var r=re;try{switch(r.tag){case 0:case 11:case 15:var o=r.return;try{Da(4,r)}catch(b){He(r,o,b)}break;case 1:var l=r.stateNode;if(typeof l.componentDidMount=="function"){var d=r.return;try{l.componentDidMount()}catch(b){He(r,d,b)}}var m=r.return;try{xc(r)}catch(b){He(r,m,b)}break;case 5:var w=r.return;try{xc(r)}catch(b){He(r,w,b)}}}catch(b){He(r,r.return,b)}if(r===t){re=null;break}var P=r.sibling;if(P!==null){P.return=r.return,re=P;break}re=r.return}}var BS=Math.ceil,Aa=O.ReactCurrentDispatcher,kc=O.ReactCurrentOwner,$t=O.ReactCurrentBatchConfig,Ce=0,rt=null,qe=null,ot=0,At=0,Fs=tr(0),Ye=0,eo=null,$r=0,La=0,Cc=0,to=null,Tt=null,Ec=0,_s=1/0,On=null,Ia=!1,Tc=null,ar=null,Oa=!1,lr=null,Fa=0,no=0,Pc=null,_a=-1,Va=0;function gt(){return(Ce&6)!==0?Ke():_a!==-1?_a:_a=Ke()}function ur(t){return(t.mode&1)===0?1:(Ce&2)!==0&&ot!==0?ot&-ot:PS.transition!==null?(Va===0&&(Va=Yh()),Va):(t=Re,t!==0||(t=window.event,t=t===void 0?16:ip(t.type)),t)}function tn(t,r,o,l){if(50<no)throw no=0,Pc=null,Error(s(185));Pi(t,o,l),((Ce&2)===0||t!==rt)&&(t===rt&&((Ce&2)===0&&(La|=o),Ye===4&&cr(t,ot)),Pt(t,l),o===1&&Ce===0&&(r.mode&1)===0&&(_s=Ke()+500,ha&&rr()))}function Pt(t,r){var o=t.callbackNode;Pw(t,r);var l=qo(t,t===rt?ot:0);if(l===0)o!==null&&Qh(o),t.callbackNode=null,t.callbackPriority=0;else if(r=l&-l,t.callbackPriority!==r){if(o!=null&&Qh(o),r===1)t.tag===0?TS(iy.bind(null,t)):Hp(iy.bind(null,t)),SS(function(){(Ce&6)===0&&rr()}),o=null;else{switch(Xh(l)){case 1:o=iu;break;case 4:o=qh;break;case 16:o=Ho;break;case 536870912:o=Gh;break;default:o=Ho}o=hy(o,sy.bind(null,t))}t.callbackPriority=r,t.callbackNode=o}}function sy(t,r){if(_a=-1,Va=0,(Ce&6)!==0)throw Error(s(327));var o=t.callbackNode;if(Vs()&&t.callbackNode!==o)return null;var l=qo(t,t===rt?ot:0);if(l===0)return null;if((l&30)!==0||(l&t.expiredLanes)!==0||r)r=za(t,l);else{r=l;var d=Ce;Ce|=2;var m=ay();(rt!==t||ot!==r)&&(On=null,_s=Ke()+500,Br(t,r));do try{WS();break}catch(P){oy(t,P)}while(!0);Hu(),Aa.current=m,Ce=d,qe!==null?r=0:(rt=null,ot=0,r=Ye)}if(r!==0){if(r===2&&(d=ou(t),d!==0&&(l=d,r=Nc(t,d))),r===1)throw o=eo,Br(t,0),cr(t,l),Pt(t,Ke()),o;if(r===6)cr(t,l);else{if(d=t.current.alternate,(l&30)===0&&!HS(d)&&(r=za(t,l),r===2&&(m=ou(t),m!==0&&(l=m,r=Nc(t,m))),r===1))throw o=eo,Br(t,0),cr(t,l),Pt(t,Ke()),o;switch(t.finishedWork=d,t.finishedLanes=l,r){case 0:case 1:throw Error(s(345));case 2:Hr(t,Tt,On);break;case 3:if(cr(t,l),(l&130023424)===l&&(r=Ec+500-Ke(),10<r)){if(qo(t,0)!==0)break;if(d=t.suspendedLanes,(d&l)!==l){gt(),t.pingedLanes|=t.suspendedLanes&d;break}t.timeoutHandle=Au(Hr.bind(null,t,Tt,On),r);break}Hr(t,Tt,On);break;case 4:if(cr(t,l),(l&4194240)===l)break;for(r=t.eventTimes,d=-1;0<l;){var w=31-Gt(l);m=1<<w,w=r[w],w>d&&(d=w),l&=~m}if(l=d,l=Ke()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*BS(l/1960))-l,10<l){t.timeoutHandle=Au(Hr.bind(null,t,Tt,On),l);break}Hr(t,Tt,On);break;case 5:Hr(t,Tt,On);break;default:throw Error(s(329))}}}return Pt(t,Ke()),t.callbackNode===o?sy.bind(null,t):null}function Nc(t,r){var o=to;return t.current.memoizedState.isDehydrated&&(Br(t,r).flags|=256),t=za(t,r),t!==2&&(r=Tt,Tt=o,r!==null&&jc(r)),t}function jc(t){Tt===null?Tt=t:Tt.push.apply(Tt,t)}function HS(t){for(var r=t;;){if(r.flags&16384){var o=r.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var l=0;l<o.length;l++){var d=o[l],m=d.getSnapshot;d=d.value;try{if(!Yt(m(),d))return!1}catch{return!1}}}if(o=r.child,r.subtreeFlags&16384&&o!==null)o.return=r,r=o;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function cr(t,r){for(r&=~Cc,r&=~La,t.suspendedLanes|=r,t.pingedLanes&=~r,t=t.expirationTimes;0<r;){var o=31-Gt(r),l=1<<o;t[o]=-1,r&=~l}}function iy(t){if((Ce&6)!==0)throw Error(s(327));Vs();var r=qo(t,0);if((r&1)===0)return Pt(t,Ke()),null;var o=za(t,r);if(t.tag!==0&&o===2){var l=ou(t);l!==0&&(r=l,o=Nc(t,l))}if(o===1)throw o=eo,Br(t,0),cr(t,r),Pt(t,Ke()),o;if(o===6)throw Error(s(345));return t.finishedWork=t.current.alternate,t.finishedLanes=r,Hr(t,Tt,On),Pt(t,Ke()),null}function bc(t,r){var o=Ce;Ce|=1;try{return t(r)}finally{Ce=o,Ce===0&&(_s=Ke()+500,ha&&rr())}}function Ur(t){lr!==null&&lr.tag===0&&(Ce&6)===0&&Vs();var r=Ce;Ce|=1;var o=$t.transition,l=Re;try{if($t.transition=null,Re=1,t)return t()}finally{Re=l,$t.transition=o,Ce=r,(Ce&6)===0&&rr()}}function Rc(){At=Fs.current,Oe(Fs)}function Br(t,r){t.finishedWork=null,t.finishedLanes=0;var o=t.timeoutHandle;if(o!==-1&&(t.timeoutHandle=-1,wS(o)),qe!==null)for(o=qe.return;o!==null;){var l=o;switch(Vu(l),l.tag){case 1:l=l.type.childContextTypes,l!=null&&da();break;case 3:Ls(),Oe(kt),Oe(ct),Zu();break;case 5:Yu(l);break;case 4:Ls();break;case 13:Oe($e);break;case 19:Oe($e);break;case 10:Ku(l.type._context);break;case 22:case 23:Rc()}o=o.return}if(rt=t,qe=t=dr(t.current,null),ot=At=r,Ye=0,eo=null,Cc=La=$r=0,Tt=to=null,_r!==null){for(r=0;r<_r.length;r++)if(o=_r[r],l=o.interleaved,l!==null){o.interleaved=null;var d=l.next,m=o.pending;if(m!==null){var w=m.next;m.next=d,l.next=w}o.pending=l}_r=null}return t}function oy(t,r){do{var o=qe;try{if(Hu(),Ca.current=Na,Ea){for(var l=Ue.memoizedState;l!==null;){var d=l.queue;d!==null&&(d.pending=null),l=l.next}Ea=!1}if(zr=0,nt=Ge=Ue=null,qi=!1,Gi=0,kc.current=null,o===null||o.return===null){Ye=1,eo=r,qe=null;break}e:{var m=t,w=o.return,P=o,b=r;if(r=ot,P.flags|=32768,b!==null&&typeof b=="object"&&typeof b.then=="function"){var $=b,K=P,W=K.tag;if((K.mode&1)===0&&(W===0||W===11||W===15)){var H=K.alternate;H?(K.updateQueue=H.updateQueue,K.memoizedState=H.memoizedState,K.lanes=H.lanes):(K.updateQueue=null,K.memoizedState=null)}var te=Mm(w);if(te!==null){te.flags&=-257,Dm(te,w,P,m,r),te.mode&1&&Rm(m,$,r),r=te,b=$;var se=r.updateQueue;if(se===null){var oe=new Set;oe.add(b),r.updateQueue=oe}else se.add(b);break e}else{if((r&1)===0){Rm(m,$,r),Mc();break e}b=Error(s(426))}}else if(_e&&P.mode&1){var We=Mm(w);if(We!==null){(We.flags&65536)===0&&(We.flags|=256),Dm(We,w,P,m,r),Uu(Is(b,P));break e}}m=b=Is(b,P),Ye!==4&&(Ye=2),to===null?to=[m]:to.push(m),m=w;do{switch(m.tag){case 3:m.flags|=65536,r&=-r,m.lanes|=r;var V=jm(m,b,r);tm(m,V);break e;case 1:P=b;var M=m.type,z=m.stateNode;if((m.flags&128)===0&&(typeof M.getDerivedStateFromError=="function"||z!==null&&typeof z.componentDidCatch=="function"&&(ar===null||!ar.has(z)))){m.flags|=65536,r&=-r,m.lanes|=r;var Q=bm(m,P,r);tm(m,Q);break e}}m=m.return}while(m!==null)}uy(o)}catch(ae){r=ae,qe===o&&o!==null&&(qe=o=o.return);continue}break}while(!0)}function ay(){var t=Aa.current;return Aa.current=Na,t===null?Na:t}function Mc(){(Ye===0||Ye===3||Ye===2)&&(Ye=4),rt===null||($r&268435455)===0&&(La&268435455)===0||cr(rt,ot)}function za(t,r){var o=Ce;Ce|=2;var l=ay();(rt!==t||ot!==r)&&(On=null,Br(t,r));do try{KS();break}catch(d){oy(t,d)}while(!0);if(Hu(),Ce=o,Aa.current=l,qe!==null)throw Error(s(261));return rt=null,ot=0,Ye}function KS(){for(;qe!==null;)ly(qe)}function WS(){for(;qe!==null&&!gw();)ly(qe)}function ly(t){var r=fy(t.alternate,t,At);t.memoizedProps=t.pendingProps,r===null?uy(t):qe=r,kc.current=null}function uy(t){var r=t;do{var o=r.alternate;if(t=r.return,(r.flags&32768)===0){if(o=_S(o,r,At),o!==null){qe=o;return}}else{if(o=VS(o,r),o!==null){o.flags&=32767,qe=o;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Ye=6,qe=null;return}}if(r=r.sibling,r!==null){qe=r;return}qe=r=t}while(r!==null);Ye===0&&(Ye=5)}function Hr(t,r,o){var l=Re,d=$t.transition;try{$t.transition=null,Re=1,QS(t,r,o,l)}finally{$t.transition=d,Re=l}return null}function QS(t,r,o,l){do Vs();while(lr!==null);if((Ce&6)!==0)throw Error(s(327));o=t.finishedWork;var d=t.finishedLanes;if(o===null)return null;if(t.finishedWork=null,t.finishedLanes=0,o===t.current)throw Error(s(177));t.callbackNode=null,t.callbackPriority=0;var m=o.lanes|o.childLanes;if(Nw(t,m),t===rt&&(qe=rt=null,ot=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||Oa||(Oa=!0,hy(Ho,function(){return Vs(),null})),m=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||m){m=$t.transition,$t.transition=null;var w=Re;Re=1;var P=Ce;Ce|=4,kc.current=null,$S(t,o),Jm(o,t),hS(Mu),Xo=!!Ru,Mu=Ru=null,t.current=o,US(o),vw(),Ce=P,Re=w,$t.transition=m}else t.current=o;if(Oa&&(Oa=!1,lr=t,Fa=d),m=t.pendingLanes,m===0&&(ar=null),Sw(o.stateNode),Pt(t,Ke()),r!==null)for(l=t.onRecoverableError,o=0;o<r.length;o++)d=r[o],l(d.value,{componentStack:d.stack,digest:d.digest});if(Ia)throw Ia=!1,t=Tc,Tc=null,t;return(Fa&1)!==0&&t.tag!==0&&Vs(),m=t.pendingLanes,(m&1)!==0?t===Pc?no++:(no=0,Pc=t):no=0,rr(),null}function Vs(){if(lr!==null){var t=Xh(Fa),r=$t.transition,o=Re;try{if($t.transition=null,Re=16>t?16:t,lr===null)var l=!1;else{if(t=lr,lr=null,Fa=0,(Ce&6)!==0)throw Error(s(331));var d=Ce;for(Ce|=4,re=t.current;re!==null;){var m=re,w=m.child;if((re.flags&16)!==0){var P=m.deletions;if(P!==null){for(var b=0;b<P.length;b++){var $=P[b];for(re=$;re!==null;){var K=re;switch(K.tag){case 0:case 11:case 15:Ji(8,K,m)}var W=K.child;if(W!==null)W.return=K,re=W;else for(;re!==null;){K=re;var H=K.sibling,te=K.return;if(qm(K),K===$){re=null;break}if(H!==null){H.return=te,re=H;break}re=te}}}var se=m.alternate;if(se!==null){var oe=se.child;if(oe!==null){se.child=null;do{var We=oe.sibling;oe.sibling=null,oe=We}while(oe!==null)}}re=m}}if((m.subtreeFlags&2064)!==0&&w!==null)w.return=m,re=w;else e:for(;re!==null;){if(m=re,(m.flags&2048)!==0)switch(m.tag){case 0:case 11:case 15:Ji(9,m,m.return)}var V=m.sibling;if(V!==null){V.return=m.return,re=V;break e}re=m.return}}var M=t.current;for(re=M;re!==null;){w=re;var z=w.child;if((w.subtreeFlags&2064)!==0&&z!==null)z.return=w,re=z;else e:for(w=M;re!==null;){if(P=re,(P.flags&2048)!==0)try{switch(P.tag){case 0:case 11:case 15:Da(9,P)}}catch(ae){He(P,P.return,ae)}if(P===w){re=null;break e}var Q=P.sibling;if(Q!==null){Q.return=P.return,re=Q;break e}re=P.return}}if(Ce=d,rr(),yn&&typeof yn.onPostCommitFiberRoot=="function")try{yn.onPostCommitFiberRoot(Ko,t)}catch{}l=!0}return l}finally{Re=o,$t.transition=r}}return!1}function cy(t,r,o){r=Is(o,r),r=jm(t,r,1),t=ir(t,r,1),r=gt(),t!==null&&(Pi(t,1,r),Pt(t,r))}function He(t,r,o){if(t.tag===3)cy(t,t,o);else for(;r!==null;){if(r.tag===3){cy(r,t,o);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ar===null||!ar.has(l))){t=Is(o,t),t=bm(r,t,1),r=ir(r,t,1),t=gt(),r!==null&&(Pi(r,1,t),Pt(r,t));break}}r=r.return}}function qS(t,r,o){var l=t.pingCache;l!==null&&l.delete(r),r=gt(),t.pingedLanes|=t.suspendedLanes&o,rt===t&&(ot&o)===o&&(Ye===4||Ye===3&&(ot&130023424)===ot&&500>Ke()-Ec?Br(t,0):Cc|=o),Pt(t,r)}function dy(t,r){r===0&&((t.mode&1)===0?r=1:(r=Qo,Qo<<=1,(Qo&130023424)===0&&(Qo=4194304)));var o=gt();t=An(t,r),t!==null&&(Pi(t,r,o),Pt(t,o))}function GS(t){var r=t.memoizedState,o=0;r!==null&&(o=r.retryLane),dy(t,o)}function YS(t,r){var o=0;switch(t.tag){case 13:var l=t.stateNode,d=t.memoizedState;d!==null&&(o=d.retryLane);break;case 19:l=t.stateNode;break;default:throw Error(s(314))}l!==null&&l.delete(r),dy(t,o)}var fy;fy=function(t,r,o){if(t!==null)if(t.memoizedProps!==r.pendingProps||kt.current)Et=!0;else{if((t.lanes&o)===0&&(r.flags&128)===0)return Et=!1,FS(t,r,o);Et=(t.flags&131072)!==0}else Et=!1,_e&&(r.flags&1048576)!==0&&Kp(r,ma,r.index);switch(r.lanes=0,r.tag){case 2:var l=r.type;Ra(t,r),t=r.pendingProps;var d=Ns(r,ct.current);As(r,o),d=tc(null,r,l,t,d,o);var m=nc();return r.flags|=1,typeof d=="object"&&d!==null&&typeof d.render=="function"&&d.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,Ct(l)?(m=!0,fa(r)):m=!1,r.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,qu(r),d.updater=ja,r.stateNode=d,d._reactInternals=r,lc(r,l,t,o),r=fc(null,r,l,!0,m,o)):(r.tag=0,_e&&m&&_u(r),yt(null,r,d,o),r=r.child),r;case 16:l=r.elementType;e:{switch(Ra(t,r),t=r.pendingProps,d=l._init,l=d(l._payload),r.type=l,d=r.tag=ZS(l),t=Zt(l,t),d){case 0:r=dc(null,r,l,t,o);break e;case 1:r=_m(null,r,l,t,o);break e;case 11:r=Am(null,r,l,t,o);break e;case 14:r=Lm(null,r,l,Zt(l.type,t),o);break e}throw Error(s(306,l,""))}return r;case 0:return l=r.type,d=r.pendingProps,d=r.elementType===l?d:Zt(l,d),dc(t,r,l,d,o);case 1:return l=r.type,d=r.pendingProps,d=r.elementType===l?d:Zt(l,d),_m(t,r,l,d,o);case 3:e:{if(Vm(r),t===null)throw Error(s(387));l=r.pendingProps,m=r.memoizedState,d=m.element,em(t,r),Sa(r,l,null,o);var w=r.memoizedState;if(l=w.element,m.isDehydrated)if(m={element:l,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},r.updateQueue.baseState=m,r.memoizedState=m,r.flags&256){d=Is(Error(s(423)),r),r=zm(t,r,l,o,d);break e}else if(l!==d){d=Is(Error(s(424)),r),r=zm(t,r,l,o,d);break e}else for(Dt=er(r.stateNode.containerInfo.firstChild),Mt=r,_e=!0,Xt=null,o=Zp(r,null,l,o),r.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Rs(),l===d){r=In(t,r,o);break e}yt(t,r,l,o)}r=r.child}return r;case 5:return rm(r),t===null&&$u(r),l=r.type,d=r.pendingProps,m=t!==null?t.memoizedProps:null,w=d.children,Du(l,d)?w=null:m!==null&&Du(l,m)&&(r.flags|=32),Fm(t,r),yt(t,r,w,o),r.child;case 6:return t===null&&$u(r),null;case 13:return $m(t,r,o);case 4:return Gu(r,r.stateNode.containerInfo),l=r.pendingProps,t===null?r.child=Ms(r,null,l,o):yt(t,r,l,o),r.child;case 11:return l=r.type,d=r.pendingProps,d=r.elementType===l?d:Zt(l,d),Am(t,r,l,d,o);case 7:return yt(t,r,r.pendingProps,o),r.child;case 8:return yt(t,r,r.pendingProps.children,o),r.child;case 12:return yt(t,r,r.pendingProps.children,o),r.child;case 10:e:{if(l=r.type._context,d=r.pendingProps,m=r.memoizedProps,w=d.value,Le(va,l._currentValue),l._currentValue=w,m!==null)if(Yt(m.value,w)){if(m.children===d.children&&!kt.current){r=In(t,r,o);break e}}else for(m=r.child,m!==null&&(m.return=r);m!==null;){var P=m.dependencies;if(P!==null){w=m.child;for(var b=P.firstContext;b!==null;){if(b.context===l){if(m.tag===1){b=Ln(-1,o&-o),b.tag=2;var $=m.updateQueue;if($!==null){$=$.shared;var K=$.pending;K===null?b.next=b:(b.next=K.next,K.next=b),$.pending=b}}m.lanes|=o,b=m.alternate,b!==null&&(b.lanes|=o),Wu(m.return,o,r),P.lanes|=o;break}b=b.next}}else if(m.tag===10)w=m.type===r.type?null:m.child;else if(m.tag===18){if(w=m.return,w===null)throw Error(s(341));w.lanes|=o,P=w.alternate,P!==null&&(P.lanes|=o),Wu(w,o,r),w=m.sibling}else w=m.child;if(w!==null)w.return=m;else for(w=m;w!==null;){if(w===r){w=null;break}if(m=w.sibling,m!==null){m.return=w.return,w=m;break}w=w.return}m=w}yt(t,r,d.children,o),r=r.child}return r;case 9:return d=r.type,l=r.pendingProps.children,As(r,o),d=Vt(d),l=l(d),r.flags|=1,yt(t,r,l,o),r.child;case 14:return l=r.type,d=Zt(l,r.pendingProps),d=Zt(l.type,d),Lm(t,r,l,d,o);case 15:return Im(t,r,r.type,r.pendingProps,o);case 17:return l=r.type,d=r.pendingProps,d=r.elementType===l?d:Zt(l,d),Ra(t,r),r.tag=1,Ct(l)?(t=!0,fa(r)):t=!1,As(r,o),Pm(r,l,d),lc(r,l,d,o),fc(null,r,l,!0,t,o);case 19:return Bm(t,r,o);case 22:return Om(t,r,o)}throw Error(s(156,r.tag))};function hy(t,r){return Wh(t,r)}function XS(t,r,o,l){this.tag=t,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ut(t,r,o,l){return new XS(t,r,o,l)}function Dc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function ZS(t){if(typeof t=="function")return Dc(t)?1:0;if(t!=null){if(t=t.$$typeof,t===G)return 11;if(t===Se)return 14}return 2}function dr(t,r){var o=t.alternate;return o===null?(o=Ut(t.tag,r,t.key,t.mode),o.elementType=t.elementType,o.type=t.type,o.stateNode=t.stateNode,o.alternate=t,t.alternate=o):(o.pendingProps=r,o.type=t.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=t.flags&14680064,o.childLanes=t.childLanes,o.lanes=t.lanes,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,r=t.dependencies,o.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},o.sibling=t.sibling,o.index=t.index,o.ref=t.ref,o}function $a(t,r,o,l,d,m){var w=2;if(l=t,typeof t=="function")Dc(t)&&(w=1);else if(typeof t=="string")w=5;else e:switch(t){case A:return Kr(o.children,d,m,r);case _:w=8,d|=8;break;case B:return t=Ut(12,o,r,d|2),t.elementType=B,t.lanes=m,t;case X:return t=Ut(13,o,r,d),t.elementType=X,t.lanes=m,t;case fe:return t=Ut(19,o,r,d),t.elementType=fe,t.lanes=m,t;case ke:return Ua(o,d,m,r);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Y:w=10;break e;case ne:w=9;break e;case G:w=11;break e;case Se:w=14;break e;case ge:w=16,l=null;break e}throw Error(s(130,t==null?t:typeof t,""))}return r=Ut(w,o,r,d),r.elementType=t,r.type=l,r.lanes=m,r}function Kr(t,r,o,l){return t=Ut(7,t,l,r),t.lanes=o,t}function Ua(t,r,o,l){return t=Ut(22,t,l,r),t.elementType=ke,t.lanes=o,t.stateNode={isHidden:!1},t}function Ac(t,r,o){return t=Ut(6,t,null,r),t.lanes=o,t}function Lc(t,r,o){return r=Ut(4,t.children!==null?t.children:[],t.key,r),r.lanes=o,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}function JS(t,r,o,l,d){this.tag=r,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=au(0),this.expirationTimes=au(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=au(0),this.identifierPrefix=l,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function Ic(t,r,o,l,d,m,w,P,b){return t=new JS(t,r,o,P,b),r===1?(r=1,m===!0&&(r|=8)):r=0,m=Ut(3,null,null,r),t.current=m,m.stateNode=t,m.memoizedState={element:l,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},qu(m),t}function ek(t,r,o){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:U,key:l==null?null:""+l,children:t,containerInfo:r,implementation:o}}function py(t){if(!t)return nr;t=t._reactInternals;e:{if(Ar(t)!==t||t.tag!==1)throw Error(s(170));var r=t;do{switch(r.tag){case 3:r=r.stateNode.context;break e;case 1:if(Ct(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break e}}r=r.return}while(r!==null);throw Error(s(171))}if(t.tag===1){var o=t.type;if(Ct(o))return Up(t,o,r)}return r}function my(t,r,o,l,d,m,w,P,b){return t=Ic(o,l,!0,t,d,m,w,P,b),t.context=py(null),o=t.current,l=gt(),d=ur(o),m=Ln(l,d),m.callback=r??null,ir(o,m,d),t.current.lanes=d,Pi(t,d,l),Pt(t,l),t}function Ba(t,r,o,l){var d=r.current,m=gt(),w=ur(d);return o=py(o),r.context===null?r.context=o:r.pendingContext=o,r=Ln(m,w),r.payload={element:t},l=l===void 0?null:l,l!==null&&(r.callback=l),t=ir(d,r,w),t!==null&&(tn(t,d,w,m),wa(t,d,w)),w}function Ha(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function yy(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o<r?o:r}}function Oc(t,r){yy(t,r),(t=t.alternate)&&yy(t,r)}function tk(){return null}var gy=typeof reportError=="function"?reportError:function(t){console.error(t)};function Fc(t){this._internalRoot=t}Ka.prototype.render=Fc.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(s(409));Ba(t,r,null,null)},Ka.prototype.unmount=Fc.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;Ur(function(){Ba(null,t,null,null)}),r[bn]=null}};function Ka(t){this._internalRoot=t}Ka.prototype.unstable_scheduleHydration=function(t){if(t){var r=ep();t={blockedOn:null,target:t,priority:r};for(var o=0;o<Xn.length&&r!==0&&r<Xn[o].priority;o++);Xn.splice(o,0,t),o===0&&rp(t)}};function _c(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Wa(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function vy(){}function nk(t,r,o,l,d){if(d){if(typeof l=="function"){var m=l;l=function(){var $=Ha(w);m.call($)}}var w=my(r,l,t,0,null,!1,!1,"",vy);return t._reactRootContainer=w,t[bn]=w.current,zi(t.nodeType===8?t.parentNode:t),Ur(),w}for(;d=t.lastChild;)t.removeChild(d);if(typeof l=="function"){var P=l;l=function(){var $=Ha(b);P.call($)}}var b=Ic(t,0,!1,null,null,!1,!1,"",vy);return t._reactRootContainer=b,t[bn]=b.current,zi(t.nodeType===8?t.parentNode:t),Ur(function(){Ba(r,b,o,l)}),b}function Qa(t,r,o,l,d){var m=o._reactRootContainer;if(m){var w=m;if(typeof d=="function"){var P=d;d=function(){var b=Ha(w);P.call(b)}}Ba(r,w,t,d)}else w=nk(o,r,t,d,l);return Ha(w)}Zh=function(t){switch(t.tag){case 3:var r=t.stateNode;if(r.current.memoizedState.isDehydrated){var o=Ti(r.pendingLanes);o!==0&&(lu(r,o|1),Pt(r,Ke()),(Ce&6)===0&&(_s=Ke()+500,rr()))}break;case 13:Ur(function(){var l=An(t,1);if(l!==null){var d=gt();tn(l,t,1,d)}}),Oc(t,1)}},uu=function(t){if(t.tag===13){var r=An(t,134217728);if(r!==null){var o=gt();tn(r,t,134217728,o)}Oc(t,134217728)}},Jh=function(t){if(t.tag===13){var r=ur(t),o=An(t,r);if(o!==null){var l=gt();tn(o,t,r,l)}Oc(t,r)}},ep=function(){return Re},tp=function(t,r){var o=Re;try{return Re=t,r()}finally{Re=o}},tu=function(t,r,o){switch(r){case"input":if(Ql(t,o),r=o.name,o.type==="radio"&&r!=null){for(o=t;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<o.length;r++){var l=o[r];if(l!==t&&l.form===t.form){var d=ca(l);if(!d)throw Error(s(90));Th(l),Ql(l,d)}}}break;case"textarea":Rh(t,o);break;case"select":r=o.value,r!=null&&ms(t,!!o.multiple,r,!1)}},Vh=bc,zh=Ur;var rk={usingClientEntryPoint:!1,Events:[Bi,Ts,ca,Fh,_h,bc]},ro={findFiberByHostInstance:Lr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},sk={bundleType:ro.bundleType,version:ro.version,rendererPackageName:ro.rendererPackageName,rendererConfig:ro.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:O.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Hh(t),t===null?null:t.stateNode},findFiberByHostInstance:ro.findFiberByHostInstance||tk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var qa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qa.isDisabled&&qa.supportsFiber)try{Ko=qa.inject(sk),yn=qa}catch{}}return Nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rk,Nt.createPortal=function(t,r){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_c(r))throw Error(s(200));return ek(t,r,null,o)},Nt.createRoot=function(t,r){if(!_c(t))throw Error(s(299));var o=!1,l="",d=gy;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onRecoverableError!==void 0&&(d=r.onRecoverableError)),r=Ic(t,1,!1,null,null,o,!1,l,d),t[bn]=r.current,zi(t.nodeType===8?t.parentNode:t),new Fc(r)},Nt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(s(188)):(t=Object.keys(t).join(","),Error(s(268,t)));return t=Hh(r),t=t===null?null:t.stateNode,t},Nt.flushSync=function(t){return Ur(t)},Nt.hydrate=function(t,r,o){if(!Wa(r))throw Error(s(200));return Qa(null,t,r,!0,o)},Nt.hydrateRoot=function(t,r,o){if(!_c(t))throw Error(s(405));var l=o!=null&&o.hydratedSources||null,d=!1,m="",w=gy;if(o!=null&&(o.unstable_strictMode===!0&&(d=!0),o.identifierPrefix!==void 0&&(m=o.identifierPrefix),o.onRecoverableError!==void 0&&(w=o.onRecoverableError)),r=my(r,null,t,1,o??null,d,!1,m,w),t[bn]=r.current,zi(t),l)for(t=0;t<l.length;t++)o=l[t],d=o._getVersion,d=d(o._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[o,d]:r.mutableSourceEagerHydrationData.push(o,d);return new Ka(r)},Nt.render=function(t,r,o){if(!Wa(r))throw Error(s(200));return Qa(null,t,r,!1,o)},Nt.unmountComponentAtNode=function(t){if(!Wa(t))throw Error(s(40));return t._reactRootContainer?(Ur(function(){Qa(null,null,t,!1,function(){t._reactRootContainer=null,t[bn]=null})}),!0):!1},Nt.unstable_batchedUpdates=bc,Nt.unstable_renderSubtreeIntoContainer=function(t,r,o,l){if(!Wa(o))throw Error(s(200));if(t==null||t._reactInternals===void 0)throw Error(s(38));return Qa(t,r,o,!1,l)},Nt.version="18.3.1-next-f1338f8080-20240426",Nt}var Iy;function eC(){if(Iy)return Bc.exports;Iy=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(n){console.error(n)}}return e(),Bc.exports=Jk(),Bc.exports}var Oy;function tC(){if(Oy)return Xa;Oy=1;var e=eC();return Xa.createRoot=e.createRoot,Xa.hydrateRoot=e.hydrateRoot,Xa}var nC=tC();/**
|
|
41
|
+
* react-router v7.18.4
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Remix Software Inc.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
+
*
|
|
48
|
+
* @license MIT
|
|
49
|
+
*/var gf=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Gv=/^[\\/]{2}/;function rC(e,n){return n+e.replace(/\\/g,"/")}var Fy="popstate";function _y(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function sC(e={}){function n(i,a){var y;let u=(y=a.state)==null?void 0:y.masked,{pathname:c,search:f,hash:p}=u||i.location;return Dd("",{pathname:c,search:f,hash:p},a.state&&a.state.usr||null,a.state&&a.state.key||"default",u?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function s(i,a){return typeof a=="string"?a:ds(a)}return oC(n,s,null,e)}function ze(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Qt(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function iC(){return Math.random().toString(36).substring(2,10)}function Vy(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Dd(e,n,s=null,i,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?di(n):n,state:s,key:n&&n.key||i||iC(),mask:a}}function ds({pathname:e="/",search:n="",hash:s=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(e+=s.charAt(0)==="#"?s:"#"+s),e}function di(e){let n={};if(e){let s=e.indexOf("#");s>=0&&(n.hash=e.substring(s),e=e.substring(0,s));let i=e.indexOf("?");i>=0&&(n.search=e.substring(i),e=e.substring(0,i)),e&&(n.pathname=e)}return n}function oC(e,n,s,i={}){let{window:a=document.defaultView,v5Compat:u=!1}=i,c=a.history,f="POP",p=null,y=g();y==null&&(y=0,c.replaceState({...c.state,idx:y},""));function g(){return(c.state||{idx:null}).idx}function v(){f="POP";let E=g(),j=E==null?null:E-y;y=E,p&&p({action:f,location:T.location,delta:j})}function x(E,j){f="PUSH";let I=_y(E)?E:Dd(T.location,E,j);y=g()+1;let R=Vy(I,y),O=T.createHref(I.mask||I);try{c.pushState(R,"",O)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;a.location.assign(O)}u&&p&&p({action:f,location:T.location,delta:1})}function k(E,j){f="REPLACE";let I=_y(E)?E:Dd(T.location,E,j);y=g();let R=Vy(I,y),O=T.createHref(I.mask||I);c.replaceState(R,"",O),u&&p&&p({action:f,location:T.location,delta:0})}function C(E){return aC(a,E)}let T={get action(){return f},get location(){return e(a,c)},listen(E){if(p)throw new Error("A history only accepts one active listener");return a.addEventListener(Fy,v),p=E,()=>{a.removeEventListener(Fy,v),p=null}},createHref(E){return n(a,E)},createURL:C,encodeLocation(E){let j=C(E);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:x,replace:k,go(E){return c.go(E)}};return T}function aC(e,n,s=!1){let i="http://localhost";e&&(i=e.location.origin!=="null"?e.location.origin:e.location.href),ze(i,"No window.location.(origin|href) available to create URL");let a=typeof n=="string"?n:ds(n);return a=a.replace(/ $/,"%20"),!s&&Gv.test(a)&&(a=i+a),new URL(a,i)}function Yv(e,n,s="/"){return lC(e,n,s,!1)}function lC(e,n,s,i,a){let u=typeof n=="string"?di(n):n,c=Kn(u.pathname||"/",s);if(c==null)return null;let f=uC(e),p=null,y=wC(c);for(let g=0;p==null&&g<f.length;++g)p=xC(f[g],y,i);return p}function uC(e){let n=Xv(e);return cC(n),n}function Xv(e,n=[],s=[],i="",a=!1){let u=(c,f,p=a,y)=>{let g={relativePath:y===void 0?c.path||"":y,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(i)&&p)return;ze(g.relativePath.startsWith(i),`Absolute route path "${g.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(i.length)}let v=un([i,g.relativePath]),x=s.concat(g);c.children&&c.children.length>0&&(ze(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),Xv(c.children,n,x,v,p)),!(c.path==null&&!c.index)&&n.push({path:v,score:gC(v,c.index),routesMeta:x.map((k,C)=>{let[T,E]=e0(k.relativePath,k.caseSensitive,C===x.length-1);return{...k,matcher:T,compiledParams:E}})})};return e.forEach((c,f)=>{var p;if(c.path===""||!((p=c.path)!=null&&p.includes("?")))u(c,f);else for(let y of Zv(c.path))u(c,f,!0,y)}),n}function Zv(e){let n=e.split("/");if(n.length===0)return[];let[s,...i]=n,a=s.endsWith("?"),u=s.replace(/\?$/,"");if(i.length===0)return a?[u,""]:[u];let c=Zv(i.join("/")),f=[];return f.push(...c.map(p=>p===""?u:[u,p].join("/"))),a&&f.push(...c),f.map(p=>e.startsWith("/")&&p===""?"/":p)}function cC(e){e.sort((n,s)=>n.score!==s.score?s.score-n.score:vC(n.routesMeta.map(i=>i.childrenIndex),s.routesMeta.map(i=>i.childrenIndex)))}var dC=/^:[\w-]+$/,fC=3,hC=2,pC=1,mC=10,yC=-2,zy=e=>e==="*";function gC(e,n){let s=e.split("/"),i=s.length;return s.some(zy)&&(i+=yC),n&&(i+=hC),s.filter(a=>!zy(a)).reduce((a,u)=>a+(dC.test(u)?fC:u===""?pC:mC),i)}function vC(e,n){return e.length===n.length&&e.slice(0,-1).every((i,a)=>i===n[a])?e[e.length-1]-n[n.length-1]:0}function xC(e,n,s=!1){let{routesMeta:i}=e,a={},u="/",c=[];for(let f=0;f<i.length;++f){let p=i[f],y=f===i.length-1,g=u==="/"?n:n.slice(u.length)||"/",v={path:p.relativePath,caseSensitive:p.caseSensitive,end:y},x=p.matcher&&p.compiledParams?Jv(v,g,p.matcher,p.compiledParams):xl(v,g),k=p.route;if(!x&&y&&s&&!i[i.length-1].route.index&&(x=xl({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},g)),!x)return null;Object.assign(a,x.params),c.push({params:a,pathname:un([u,x.pathname]),pathnameBase:CC(un([u,x.pathnameBase])),route:k}),x.pathnameBase!=="/"&&(u=un([u,x.pathnameBase]))}return c}function xl(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[s,i]=e0(e.path,e.caseSensitive,e.end);return Jv(e,n,s,i)}function Jv(e,n,s,i){let a=n.match(s);if(!a)return null;let u=a[0],c=oi(u,1),f=a.slice(1);return{params:i.reduce((y,{paramName:g,isOptional:v},x)=>{if(g==="*"){let C=f[x]||"";c=oi(u.slice(0,u.length-C.length),1)}const k=f[x];return v&&!k?y[g]=void 0:y[g]=(k||"").replace(/%2F/g,"/"),y},{}),pathname:u,pathnameBase:c,pattern:e}}function e0(e,n=!1,s=!0){Qt(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 i=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,p,y,g)=>{if(i.push({paramName:f,isOptional:p!=null}),p){let v=g.charAt(y+c.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,n?void 0:"i"),i]}function wC(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Qt(!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 (${n}).`),e}}function Kn(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let s=n.endsWith("/")?n.length-1:n.length,i=e.charAt(s);return i&&i!=="/"?null:e.slice(s)||"/"}function SC(e,n="/"){let{pathname:s,search:i="",hash:a=""}=typeof e=="string"?di(e):e,u;return s?(s=t0(s),s.startsWith("/")||s.startsWith("\\")?u=$y(s.substring(1),"/"):u=$y(s,n)):u=n,{pathname:u,search:EC(i),hash:TC(a)}}function $y(e,n){let s=oi(n).split("/");return e.split("/").forEach(a=>{a===".."?s.length>1&&s.pop():a!=="."&&s.push(a)}),s.length>1?s.join("/"):"/"}function Wc(e,n,s,i){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${s}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function kC(e){return e.filter((n,s)=>s===0||n.route.path&&n.route.path.length>0)}function vf(e){let n=kC(e);return n.map((s,i)=>i===n.length-1?s.pathname:s.pathnameBase)}function Al(e,n,s,i=!1){let a;typeof e=="string"?a=di(e):(a={...e},ze(!a.pathname||!a.pathname.includes("?"),Wc("?","pathname","search",a)),ze(!a.pathname||!a.pathname.includes("#"),Wc("#","pathname","hash",a)),ze(!a.search||!a.search.includes("#"),Wc("#","search","hash",a)));let u=e===""||a.pathname==="",c=u?"/":a.pathname,f;if(c==null)f=s;else{let v=n.length-1;if(!i&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),v-=1;a.pathname=x.join("/")}f=v>=0?n[v]:"/"}let p=SC(a,f),y=c&&c!=="/"&&c.endsWith("/"),g=(u||c===".")&&s.endsWith("/");return!p.pathname.endsWith("/")&&(y||g)&&(p.pathname+="/"),p}var t0=e=>e.replace(/[\\/]{2,}/g,"/"),un=e=>t0(e.join("/"));function oi(e,n=0){let s=e.length;for(;s>n&&e.charCodeAt(s-1)===47;)s--;return s===e.length?e:e.slice(0,s)}var CC=e=>oi(e).replace(/^\/*/,"/"),EC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,TC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,PC=class{constructor(e,n,s,i=!1){this.status=e,this.statusText=n||"",this.internal=i,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function NC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function jC(e){let n=e.map(s=>s.route.path).filter(Boolean);return un(n)||"/"}var n0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function r0(e,n){let s=e;if(typeof s!="string"||!gf.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let i=s,a=!1;if(n0)try{let u=new URL(window.location.href),c=Gv.test(s)?new URL(rC(s,u.protocol)):new URL(s),f=Kn(c.pathname,n);c.origin===u.origin&&f!=null?s=f+c.search+c.hash:a=!0}catch{Qt(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:a,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Uy=new URL("http://localhost");function xf(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),Uy)}catch{return Uy}}function Qc(e,n){return e.origin===n.origin&&(e.origin!=="null"||e.protocol===n.protocol&&e.host===n.host)}function bC(e,n){if(e.startsWith("//"))return!0;let s=n.protocol.toLowerCase();return e.toLowerCase().startsWith(s)?n.host===""||e.slice(s.length).startsWith("//"):!1}function wf(e,n,s,i){let a=null;try{a=e==null?null:new URL(e,s)}catch{}let u=new URL(n,s),c=a!=null&&!Qc(a,s),f=!Qc(u,s);if(i==="reject"){if(c||f)throw new Error("External navigation is not allowed")}else if(f&&(a==null||!bC(e,a)||!Qc(a,u)))throw new Error("External navigation is not allowed")}var s0=["POST","PUT","PATCH","DELETE"];new Set(s0);var RC=["GET",...s0];new Set(RC);var MC=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function DC(e){try{return MC.includes(new URL(e).protocol)}catch{return!1}}var fi=S.createContext(null);fi.displayName="DataRouter";var Ll=S.createContext(null);Ll.displayName="DataRouterState";var i0=S.createContext(!1);function AC(){return S.useContext(i0)}var o0=S.createContext({isTransitioning:!1});o0.displayName="ViewTransition";var LC=S.createContext(new Map);LC.displayName="Fetchers";var IC=S.createContext(null);IC.displayName="Await";var Ot=S.createContext(null);Ot.displayName="Navigation";var Mo=S.createContext(null);Mo.displayName="Location";var hn=S.createContext({outlet:null,matches:[],isDataRoute:!1});hn.displayName="Route";var Sf=S.createContext(null);Sf.displayName="RouteError";var a0="REACT_ROUTER_ERROR",OC="REDIRECT",FC="ROUTE_ERROR_RESPONSE";function _C(e){if(e.startsWith(`${a0}:${OC}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function VC(e){if(e.startsWith(`${a0}:${FC}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new PC(n.status,n.statusText,n.data)}catch{}}function zC(e,{relative:n}={}){ze(hi(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:i}=S.useContext(Ot),{hash:a,pathname:u,search:c}=Do(e,{relative:n}),f=u;return s!=="/"&&(f=u==="/"?s:un([s,u])),i.createHref({pathname:f,search:c,hash:a})}function hi(){return S.useContext(Mo)!=null}function pn(){return ze(hi(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(Mo).location}var l0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function u0(e){S.useContext(Ot).static||S.useLayoutEffect(e)}function pi(){let{isDataRoute:e}=S.useContext(hn);return e?tE():$C()}function $C(){ze(hi(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(fi),{basename:n,navigator:s}=S.useContext(Ot),{matches:i}=S.useContext(hn),{pathname:a}=pn(),u=JSON.stringify(vf(i)),c=S.useRef(!1);return u0(()=>{c.current=!0}),S.useCallback((p,y={})=>{if(Qt(c.current,l0),!c.current)return;if(typeof p=="number"){s.go(p);return}let g=Al(p,JSON.parse(u),a,y.relative==="path");e==null&&n!=="/"&&(g.pathname=g.pathname==="/"?n:un([n,g.pathname])),wf(typeof p=="string"?p:ds(p),s.createHref(g),xf(s),"reject"),(y.replace?s.replace:s.push)(g,y.state,y)},[n,s,u,a,e])}var UC=S.createContext(null);function BC(e){let n=S.useContext(hn).outlet;return S.useMemo(()=>n&&S.createElement(UC.Provider,{value:e},n),[n,e])}function Do(e,{relative:n}={}){let{matches:s}=S.useContext(hn),{pathname:i}=pn(),a=JSON.stringify(vf(s));return S.useMemo(()=>Al(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function HC(e,n){return c0(e,n)}function c0(e,n,s){var E;ze(hi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=S.useContext(Ot),{matches:a}=S.useContext(hn),u=a[a.length-1],c=u?u.params:{},f=u?u.pathname:"/",p=u?u.pathnameBase:"/",y=u&&u.route;{let j=y&&y.path||"";f0(f,!y||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${j}">) 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.
|
|
50
|
+
|
|
51
|
+
Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let g=pn(),v;if(n){let j=typeof n=="string"?di(n):n;ze(p==="/"||((E=j.pathname)==null?void 0:E.startsWith(p)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${j.pathname}" was given in the \`location\` prop.`),v=j}else v=g;let x=v.pathname||"/",k=x;if(p!=="/"){let j=p.replace(/^\//,"").split("/");k="/"+x.replace(/^\//,"").split("/").slice(j.length).join("/")}let C=s&&s.state.matches.length?s.state.matches.map(j=>Object.assign(j,{route:s.manifest[j.route.id]||j.route})):Yv(e,{pathname:k});Qt(y||C!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),Qt(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.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.`);let T=GC(C&&C.map(j=>Object.assign({},j,{params:Object.assign({},c,j.params),pathname:un([p,i.encodeLocation?i.encodeLocation(j.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?p:un([p,i.encodeLocation?i.encodeLocation(j.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),a,s);return n&&T?S.createElement(Mo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...v},navigationType:"POP"}},T):T}function KC(){let e=eE(),n=NC(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),s=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:i},u={padding:"2px 4px",backgroundColor:i},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:u},"ErrorBoundary")," or"," ",S.createElement("code",{style:u},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},n),s?S.createElement("pre",{style:a},s):null,c)}var WC=S.createElement(KC,null),d0=class extends S.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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const s=VC(e.digest);s&&(e=s)}let n=e!==void 0?S.createElement(hn.Provider,{value:this.props.routeContext},S.createElement(Sf.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?S.createElement(QC,{error:e},n):n}};d0.contextType=i0;var qc=new WeakMap;function QC({children:e,error:n}){let{basename:s,navigator:i}=S.useContext(Ot);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let a=_C(n.digest);if(a){let u=qc.get(n);if(u)throw u;let c=r0(a.location,s),f=c.absoluteURL||c.to;if(wf(a.location,f,xf(i),"allow-explicit"),DC(f))throw new Error("Invalid redirect location");if(n0&&!qc.get(n))if(c.isExternal||a.reloadDocument)window.location.href=f;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:a.replace}));throw qc.set(n,p),p}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f}`})}}return e}function qC({routeContext:e,match:n,children:s}){let i=S.useContext(fi);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),S.createElement(hn.Provider,{value:e},s)}function GC(e,n=[],s){let i=s==null?void 0:s.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(n.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let a=e,u=i==null?void 0:i.errors;if(u!=null){let g=a.findIndex(v=>v.route.id&&(u==null?void 0:u[v.route.id])!==void 0);ze(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),a=a.slice(0,Math.min(a.length,g+1))}let c=!1,f=-1;if(s&&i){c=i.renderFallback;for(let g=0;g<a.length;g++){let v=a[g];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(f=g),v.route.id){let{loaderData:x,errors:k}=i,C=v.route.loader&&!x.hasOwnProperty(v.route.id)&&(!k||k[v.route.id]===void 0);if(v.route.lazy||C){s.isStatic&&(c=!0),f>=0?a=a.slice(0,f+1):a=[a[0]];break}}}}let p=s==null?void 0:s.onError,y=i&&p?(g,v)=>{var x,k;p(g,{location:i.location,params:((k=(x=i.matches)==null?void 0:x[0])==null?void 0:k.params)??{},pattern:jC(i.matches),errorInfo:v})}:void 0;return a.reduceRight((g,v,x)=>{let k,C=!1,T=null,E=null;i&&(k=u&&v.route.id?u[v.route.id]:void 0,T=v.route.errorElement||WC,c&&(f<0&&x===0?(f0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,E=null):f===x&&(C=!0,E=v.route.hydrateFallbackElement||null)));let j=n.concat(a.slice(0,x+1)),I=()=>{let R;return k?R=T:C?R=E:v.route.Component?R=S.createElement(v.route.Component,null):v.route.element?R=v.route.element:R=g,S.createElement(qC,{match:v,routeContext:{outlet:g,matches:j,isDataRoute:i!=null},children:R})};return i&&(v.route.ErrorBoundary||v.route.errorElement||x===0)?S.createElement(d0,{location:i.location,revalidation:i.revalidation,component:T,error:k,children:I(),routeContext:{outlet:null,matches:j,isDataRoute:!0},onError:y}):I()},null)}function kf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function YC(e){let n=S.useContext(fi);return ze(n,kf(e)),n}function XC(e){let n=S.useContext(Ll);return ze(n,kf(e)),n}function ZC(e){let n=S.useContext(hn);return ze(n,kf(e)),n}function Cf(e){let n=ZC(e),s=n.matches[n.matches.length-1];return ze(s.route.id,`${e} can only be used on routes that contain a unique "id"`),s.route.id}function JC(){return Cf("useRouteId")}function eE(){var i;let e=S.useContext(Sf),n=XC("useRouteError"),s=Cf("useRouteError");return e!==void 0?e:(i=n.errors)==null?void 0:i[s]}function tE(){let{router:e}=YC("useNavigate"),n=Cf("useNavigate"),s=S.useRef(!1);return u0(()=>{s.current=!0}),S.useCallback(async(a,u={})=>{Qt(s.current,l0),s.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:n,...u}))},[e,n])}var By={};function f0(e,n,s){!n&&!By[e]&&(By[e]=!0,Qt(!1,s))}S.memo(nE);function nE({routes:e,manifest:n,future:s,state:i,isStatic:a,onError:u}){return c0(e,void 0,{manifest:n,state:i,isStatic:a,onError:u})}function Ef({to:e,replace:n,state:s,relative:i}){ze(hi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a,navigator:u}=S.useContext(Ot);Qt(!a,"<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:c}=S.useContext(hn),{pathname:f}=pn(),p=pi(),y=Al(e,vf(c),f,i==="path");wf(typeof e=="string"?e:ds(e),u.createHref(y),xf(u),"reject");let g=JSON.stringify(y);return S.useEffect(()=>{p(JSON.parse(g),{replace:n,state:s,relative:i})},[p,g,i,n,s]),null}function rE(e){return BC(e.context)}function _n(e){ze(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function sE({basename:e="/",children:n=null,location:s,navigationType:i="POP",navigator:a,static:u=!1,useTransitions:c}){ze(!hi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),p=S.useMemo(()=>({basename:f,navigator:a,static:u,useTransitions:c,future:{}}),[f,a,u,c]);typeof s=="string"&&(s=di(s));let{pathname:y="/",search:g="",hash:v="",state:x=null,key:k="default",mask:C}=s,T=S.useMemo(()=>{let E=Kn(y,f);return E==null?null:{location:{pathname:E,search:g,hash:v,state:x,key:k,mask:C},navigationType:i}},[f,y,g,v,x,k,i,C]);return Qt(T!=null,`<Router basename="${f}"> is not able to match the URL "${y}${g}${v}" because it does not start with the basename, so the <Router> won't render anything.`),T==null?null:S.createElement(Ot.Provider,{value:p},S.createElement(Mo.Provider,{children:n,value:T}))}function iE({children:e,location:n}){return HC(Ad(e),n)}function Ad(e,n=[]){let s=[];return S.Children.forEach(e,(i,a)=>{if(!S.isValidElement(i))return;let u=[...n,a];if(i.type===S.Fragment){s.push.apply(s,Ad(i.props.children,u));return}ze(i.type===_n,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ze(!i.props.index||!i.props.children,"An index route cannot have child routes.");let c={id:i.props.id||u.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(c.children=Ad(i.props.children,u)),s.push(c)}),s}var ll="get",ul="application/x-www-form-urlencoded";function Il(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function oE(e){return Il(e)&&e.tagName.toLowerCase()==="button"}function aE(e){return Il(e)&&e.tagName.toLowerCase()==="form"}function lE(e){return Il(e)&&e.tagName.toLowerCase()==="input"}function uE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function cE(e,n){return e.button===0&&(!n||n==="_self")&&!uE(e)}function Ld(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,s)=>{let i=e[s];return n.concat(Array.isArray(i)?i.map(a=>[s,a]):[[s,i]])},[]))}function dE(e,n){let s=Ld(e);return n&&n.forEach((i,a)=>{s.has(a)||n.getAll(a).forEach(u=>{s.append(a,u)})}),s}var Za=null;function fE(){if(Za===null)try{new FormData(document.createElement("form"),0),Za=!1}catch{Za=!0}return Za}var hE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Gc(e){return e!=null&&!hE.has(e)?(Qt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ul}"`),null):e}function pE(e,n){let s,i,a,u,c;if(aE(e)){let f=e.getAttribute("action");i=f?Kn(f,n):null,s=e.getAttribute("method")||ll,a=Gc(e.getAttribute("enctype"))||ul,u=new FormData(e)}else if(oE(e)||lE(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=e.getAttribute("formaction")||f.getAttribute("action");if(i=p?Kn(p,n):null,s=e.getAttribute("formmethod")||f.getAttribute("method")||ll,a=Gc(e.getAttribute("formenctype"))||Gc(f.getAttribute("enctype"))||ul,u=new FormData(f,e),!fE()){let{name:y,type:g,value:v}=e;if(g==="image"){let x=y?`${y}.`:"";u.append(`${x}x`,"0"),u.append(`${x}y`,"0")}else y&&u.append(y,v)}}else{if(Il(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=ll,i=null,a=ul,c=e}return u&&a==="text/plain"&&(c=u,u=void 0),{action:i,method:s.toLowerCase(),encType:a,formData:u,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Tf(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function h0(e,n,s,i){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return s?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${i}`:a.pathname=`${a.pathname}.${i}`:a.pathname==="/"?a.pathname=`_root.${i}`:n&&Kn(a.pathname,n)==="/"?a.pathname=`${oi(n)}/_root.${i}`:a.pathname=`${oi(a.pathname)}.${i}`,a}async function mE(e,n){if(e.id in n)return n[e.id];try{let s=await import(e.module);return n[e.id]=s,s}catch(s){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function yE(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 gE(e,n,s){let i=await Promise.all(e.map(async a=>{let u=n.routes[a.route.id];if(u){let c=await mE(u,s);return c.links?c.links():[]}return[]}));return SE(i.flat(1).filter(yE).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function Hy(e,n,s,i,a,u){let c=(p,y)=>s[y]?p.route.id!==s[y].route.id:!0,f=(p,y)=>{var g;return s[y].pathname!==p.pathname||((g=s[y].route.path)==null?void 0:g.endsWith("*"))&&s[y].params["*"]!==p.params["*"]};return u==="assets"?n.filter((p,y)=>c(p,y)||f(p,y)):u==="data"?n.filter((p,y)=>{var v;let g=i.routes[p.route.id];if(!g||!g.hasLoader)return!1;if(c(p,y)||f(p,y))return!0;if(p.route.shouldRevalidate){let x=p.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((v=s[0])==null?void 0:v.params)||{},nextUrl:new URL(e,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function vE(e,n,{includeHydrateFallback:s}={}){return xE(e.map(i=>{let a=n.routes[i.route.id];if(!a)return[];let u=[a.module];return a.clientActionModule&&(u=u.concat(a.clientActionModule)),a.clientLoaderModule&&(u=u.concat(a.clientLoaderModule)),s&&a.hydrateFallbackModule&&(u=u.concat(a.hydrateFallbackModule)),a.imports&&(u=u.concat(a.imports)),u}).flat(1))}function xE(e){return[...new Set(e)]}function wE(e){let n={},s=Object.keys(e).sort();for(let i of s)n[i]=e[i];return n}function SE(e,n){let s=new Set;return new Set(n),e.reduce((i,a)=>{let u=JSON.stringify(wE(a));return s.has(u)||(s.add(u),i.push({key:u,link:a})),i},[])}function Pf(){let e=S.useContext(fi);return Tf(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function kE(){let e=S.useContext(Ll);return Tf(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Nf=S.createContext(void 0);Nf.displayName="FrameworkContext";function Ol(){let e=S.useContext(Nf);return Tf(e,"You must render this element inside a <HydratedRouter> element"),e}function CE(e,n){let s=S.useContext(Nf),[i,a]=S.useState(!1),[u,c]=S.useState(!1),{onFocus:f,onBlur:p,onMouseEnter:y,onMouseLeave:g,onTouchStart:v}=n,x=S.useRef(null);S.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let T=j=>{j.forEach(I=>{c(I.isIntersecting)})},E=new IntersectionObserver(T,{threshold:.5});return x.current&&E.observe(x.current),()=>{E.disconnect()}}},[e]),S.useEffect(()=>{if(i){let T=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(T)}}},[i]);let k=()=>{a(!0)},C=()=>{a(!1),c(!1)};return s?e!=="intent"?[u,x,{}]:[u,x,{onFocus:io(f,k),onBlur:io(p,C),onMouseEnter:io(y,k),onMouseLeave:io(g,C),onTouchStart:io(v,k)}]:[!1,x,{}]}function io(e,n){return s=>{e&&e(s),s.defaultPrevented||n(s)}}function EE({page:e,...n}){let s=AC(),{nonce:i}=Ol(),{router:a}=Pf(),u=S.useMemo(()=>Yv(a.routes,e,a.basename),[a.routes,e,a.basename]);return u?(n.nonce==null&&i&&(n={...n,nonce:i}),s?S.createElement(PE,{page:e,matches:u,...n}):S.createElement(NE,{page:e,matches:u,...n})):null}function TE(e){let{manifest:n,routeModules:s}=Ol(),[i,a]=S.useState([]);return S.useEffect(()=>{let u=!1;return gE(e,n,s).then(c=>{u||a(c)}),()=>{u=!0}},[e,n,s]),i}function PE({page:e,matches:n,...s}){let i=pn(),{future:a}=Ol(),{basename:u}=Pf(),c=S.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let f=h0(e,u,a.v8_trailingSlashAwareDataRequests,"rsc"),p=!1,y=[];for(let g of n)typeof g.route.shouldRevalidate=="function"?p=!0:y.push(g.route.id);return p&&y.length>0&&f.searchParams.set("_routes",y.join(",")),[f.pathname+f.search]},[u,a.v8_trailingSlashAwareDataRequests,e,i,n]);return S.createElement(S.Fragment,null,c.map(f=>S.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...s})))}function NE({page:e,matches:n,...s}){let i=pn(),{future:a,manifest:u,routeModules:c}=Ol(),{basename:f}=Pf(),{loaderData:p,matches:y}=kE(),g=S.useMemo(()=>Hy(e,n,y,u,i,"data"),[e,n,y,u,i]),v=S.useMemo(()=>Hy(e,n,y,u,i,"assets"),[e,n,y,u,i]),x=S.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let T=new Set,E=!1;if(n.forEach(I=>{var O;let R=u.routes[I.route.id];!R||!R.hasLoader||(!g.some(F=>F.route.id===I.route.id)&&I.route.id in p&&((O=c[I.route.id])!=null&&O.shouldRevalidate)||R.hasClientLoader?E=!0:T.add(I.route.id))}),T.size===0)return[];let j=h0(e,f,a.v8_trailingSlashAwareDataRequests,"data");return E&&T.size>0&&j.searchParams.set("_routes",n.filter(I=>T.has(I.route.id)).map(I=>I.route.id).join(",")),[j.pathname+j.search]},[f,a.v8_trailingSlashAwareDataRequests,p,i,u,g,n,e,c]),k=S.useMemo(()=>vE(v,u),[v,u]),C=TE(v);return S.createElement(S.Fragment,null,x.map(T=>S.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...s})),k.map(T=>S.createElement("link",{key:T,rel:"modulepreload",href:T,...s})),C.map(({key:T,link:E})=>S.createElement("link",{key:T,nonce:s.nonce,...E,crossOrigin:E.crossOrigin??s.crossOrigin})))}function jE(...e){return n=>{e.forEach(s=>{typeof s=="function"?s(n):s!=null&&(s.current=n)})}}var bE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{bE&&(window.__reactRouterVersion="7.18.4")}catch{}function RE({basename:e,children:n,useTransitions:s,window:i}){let a=S.useRef();a.current==null&&(a.current=sC({window:i,v5Compat:!0}));let u=a.current,[c,f]=S.useState({action:u.action,location:u.location}),p=S.useCallback(y=>{s===!1?f(y):S.startTransition(()=>f(y))},[s]);return S.useLayoutEffect(()=>u.listen(p),[u,p]),S.createElement(sE,{basename:e,children:n,location:c.location,navigationType:c.action,navigator:u,useTransitions:s})}var p0=S.forwardRef(function({onClick:n,discover:s="render",prefetch:i="none",relative:a,reloadDocument:u,replace:c,mask:f,state:p,target:y,to:g,preventScrollReset:v,viewTransition:x,defaultShouldRevalidate:k,...C},T){let{basename:E,navigator:j,useTransitions:I}=S.useContext(Ot),R=typeof g=="string"&&gf.test(g),O=r0(g,E);g=O.to;let F=zC(g,{relative:a}),U=pn(),A=null;if(f){let Se=Al(f,[],U.mask?U.mask.pathname:"/",!0);E!=="/"&&(Se.pathname=Se.pathname==="/"?E:un([E,Se.pathname])),A=j.createHref(Se)}let[_,B,Y]=CE(i,C),ne=AE(g,{replace:c,mask:f,state:p,target:y,preventScrollReset:v,relative:a,viewTransition:x,defaultShouldRevalidate:k,useTransitions:I});function G(Se){n&&n(Se),Se.defaultPrevented||ne(Se)}let X=!(O.isExternal||u),fe=S.createElement("a",{...C,...Y,href:(X?A:void 0)||O.absoluteURL||F,onClick:X?G:n,ref:jE(T,B),target:y,"data-discover":!R&&s==="render"?"true":void 0});return _&&!R?S.createElement(S.Fragment,null,fe,S.createElement(EE,{page:F})):fe});p0.displayName="Link";var m0=S.forwardRef(function({"aria-current":n="page",caseSensitive:s=!1,className:i="",end:a=!1,style:u,to:c,viewTransition:f,children:p,...y},g){let v=Do(c,{relative:y.relative}),x=pn(),k=S.useContext(Ll),{navigator:C,basename:T}=S.useContext(Ot),E=k!=null&&VE(v)&&f===!0,j=C.encodeLocation?C.encodeLocation(v).pathname:v.pathname,I=x.pathname,R=k&&k.navigation&&k.navigation.location?k.navigation.location.pathname:null;s||(I=I.toLowerCase(),R=R?R.toLowerCase():null,j=j.toLowerCase()),R&&T&&(R=Kn(R,T)||R);const O=j!=="/"&&j.endsWith("/")?j.length-1:j.length;let F=I===j||!a&&I.startsWith(j)&&I.charAt(O)==="/",U=R!=null&&(R===j||!a&&R.startsWith(j)&&R.charAt(j.length)==="/"),A={isActive:F,isPending:U,isTransitioning:E},_=F?n:void 0,B;typeof i=="function"?B=i(A):B=[i,F?"active":null,U?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let Y=typeof u=="function"?u(A):u;return S.createElement(p0,{...y,"aria-current":_,className:B,ref:g,style:Y,to:c,viewTransition:f},typeof p=="function"?p(A):p)});m0.displayName="NavLink";var ME=S.forwardRef(({discover:e="render",fetcherKey:n,navigate:s,reloadDocument:i,replace:a,state:u,method:c=ll,action:f,onSubmit:p,relative:y,preventScrollReset:g,viewTransition:v,defaultShouldRevalidate:x,...k},C)=>{let{useTransitions:T}=S.useContext(Ot),E=FE(),j=_E(f,{relative:y}),I=c.toLowerCase()==="get"?"get":"post",R=typeof f=="string"&&gf.test(f),O=F=>{if(p&&p(F),F.defaultPrevented)return;F.preventDefault();let U=F.nativeEvent.submitter,A=(U==null?void 0:U.getAttribute("formmethod"))||c,_=()=>E(U||F.currentTarget,{fetcherKey:n,method:A,navigate:s,replace:a,state:u,relative:y,preventScrollReset:g,viewTransition:v,defaultShouldRevalidate:x});T&&s!==!1?S.startTransition(()=>_()):_()};return S.createElement("form",{ref:C,method:I,action:j,onSubmit:i?p:O,...k,"data-discover":!R&&e==="render"?"true":void 0})});ME.displayName="Form";function DE(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function y0(e){let n=S.useContext(fi);return ze(n,DE(e)),n}function AE(e,{target:n,replace:s,mask:i,state:a,preventScrollReset:u,relative:c,viewTransition:f,defaultShouldRevalidate:p,useTransitions:y}={}){let g=pi(),v=pn(),x=Do(e,{relative:c});return S.useCallback(k=>{if(cE(k,n)){k.preventDefault();let C=s!==void 0?s:ds(v)===ds(x),T=()=>g(e,{replace:C,mask:i,state:a,preventScrollReset:u,relative:c,viewTransition:f,defaultShouldRevalidate:p});y?S.startTransition(()=>T()):T()}},[v,g,x,s,i,a,n,e,u,c,f,p,y])}function LE(e){Qt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=S.useRef(Ld(e)),s=S.useRef(!1),i=pn(),a=S.useMemo(()=>dE(i.search,s.current?null:n.current),[i.search]),u=pi(),c=S.useCallback((f,p)=>{const y=Ld(typeof f=="function"?f(new URLSearchParams(a)):f);s.current=!0,u("?"+y,p)},[u,a]);return[a,c]}var IE=0,OE=()=>`__${String(++IE)}__`;function FE(){let{router:e}=y0("useSubmit"),{basename:n}=S.useContext(Ot),s=JC(),i=e.fetch,a=e.navigate;return S.useCallback(async(u,c={})=>{let{action:f,method:p,encType:y,formData:g,body:v}=pE(u,n);if(c.navigate===!1){let x=c.fetcherKey||OE();await i(x,s,c.action||f,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:v,formMethod:c.method||p,formEncType:c.encType||y,flushSync:c.flushSync})}else await a(c.action||f,{defaultShouldRevalidate:c.defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:v,formMethod:c.method||p,formEncType:c.encType||y,replace:c.replace,state:c.state,fromRouteId:s,flushSync:c.flushSync,viewTransition:c.viewTransition})},[i,a,n,s])}function _E(e,{relative:n}={}){let{basename:s}=S.useContext(Ot),i=S.useContext(hn);ze(i,"useFormAction must be used inside a RouteContext");let[a]=i.matches.slice(-1),u={...Do(e||".",{relative:n})},c=pn();if(e==null){u.search=c.search;let f=new URLSearchParams(u.search),p=f.getAll("index");if(p.some(g=>g==="")){f.delete("index"),p.filter(v=>v).forEach(v=>f.append("index",v));let g=f.toString();u.search=g?`?${g}`:""}}return(!e||e===".")&&a.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(u.pathname=u.pathname==="/"?s:un([s,u.pathname])),ds(u)}function VE(e,{relative:n}={}){let s=S.useContext(o0);ze(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=y0("useViewTransitionState"),a=Do(e,{relative:n});if(!s.isTransitioning)return!1;let u=Kn(s.currentLocation.pathname,i)||s.currentLocation.pathname,c=Kn(s.nextLocation.pathname,i)||s.nextLocation.pathname;return xl(a.pathname,c)!=null||xl(a.pathname,u)!=null}/**
|
|
52
|
+
* @license lucide-react v1.52.0 - ISC
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the ISC license.
|
|
55
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/const zE=e=>e==null?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
57
|
+
* @license lucide-react v1.52.0 - ISC
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the ISC license.
|
|
60
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/function $E(e,n,s=[]){if(n==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:zE(e),size:24,node:n,...s.length>0?{aliases:s}:{}}}/**
|
|
62
|
+
* @license lucide-react v1.52.0 - ISC
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the ISC license.
|
|
65
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/const UE=e=>{let n="",s=!1;for(const i of e){if(i==="-"||i==="_"||i<=" "){s=n.length>0;continue}n.length===0?n+=i.toLowerCase():n+=s?i.toUpperCase():i,s=!1}return n};/**
|
|
67
|
+
* @license lucide-react v1.52.0 - ISC
|
|
68
|
+
*
|
|
69
|
+
* This source code is licensed under the ISC license.
|
|
70
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
+
*/const BE=e=>{const n=UE(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
|
|
72
|
+
* @license lucide-react v1.52.0 - ISC
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the ISC license.
|
|
75
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/const Id=(...e)=>e.filter((n,s,i)=>!!n&&n.trim()!==""&&i.indexOf(n)===s).join(" ").trim();/**
|
|
77
|
+
* @license lucide-react v1.52.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/const Wr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
|
|
82
|
+
* @license lucide-react v1.52.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/function Yc(e){return e!=null}function HE(e,n={}){var x,k;const s=n.attributeNames??{},i=C=>s[C]??C,a=e.size??e.width??Wr.width,u=e.size??e.height??Wr.height,c=((x=e.aliases)==null?void 0:x.filter(C=>typeof C=="string"&&C.trim()!=="").map(C=>`lucide-${C}`))??[],f=[...e.name?[`lucide-${e.name}`]:[],...c],p=((k=n.className)==null?void 0:k.split(" ").filter(Boolean))??[],y=n.includeDefaultClasses===!1?Id(...p):Id("lucide",...f,...p),g=n.absoluteStrokeWidth?Number(n.strokeWidth??Wr["stroke-width"])*Number(e.size??e.width??Wr.width)/Number(n.size??n.width??Wr.width):n.strokeWidth??Wr["stroke-width"];return["svg",{...Object.entries(Wr).reduce((C,[T,E])=>(C[i(T)]=E,C),{}),..."color"in n&&n.color&&{[i("stroke")]:n.color},..."size"in n&&Yc(n.size)&&{[i("width")]:n.size,[i("height")]:n.size},..."width"in n&&Yc(n.width)&&{[i("width")]:n.width},..."height"in n&&Yc(n.height)&&{[i("height")]:n.height},[i("stroke-width")]:g,...y&&{[i("class")]:y},[i("viewBox")]:`0 0 ${a} ${u}`,...n.hasA11yProp===!1?{[i("aria-hidden")]:"true"}:{},..."attributes"in n&&n.attributes},e.node.map(C=>{const[T,E,j]=C,I=n.nonScalingStroke?{[i("vector-effect")]:"non-scaling-stroke",...E}:E;return j?[T,I,j]:[T,I]})]}/**
|
|
87
|
+
* @license lucide-react v1.52.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/function KE(e,n={}){return HE(e,{...n,attributeNames:{...n.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
|
|
92
|
+
* @license lucide-react v1.52.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const WE=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},QE=S.createContext({}),qE=()=>S.useContext(QE),GE=S.forwardRef(({color:e,size:n,width:s,height:i,strokeWidth:a,absoluteStrokeWidth:u,nonScalingStroke:c,className:f="",children:p,iconNode:y=[],icon:g={node:y,aliases:[],size:24},...v},x)=>{const{size:k=24,strokeWidth:C=2,absoluteStrokeWidth:T=!1,nonScalingStroke:E=!1,color:j="currentColor",className:I=""}=qE()??{},R=!!p||WE(v),[O,F,U=[]]=KE(g,{color:e??j,width:s??n??k,height:i??n??k,strokeWidth:a??C,absoluteStrokeWidth:u??T,nonScalingStroke:c??E,className:Id(I,f),hasA11yProp:R,attributes:v});return S.createElement(O,{ref:x,...F},[...U.map(([A,_])=>S.createElement(A,_)),...Array.isArray(p)?p:[p]])});/**
|
|
97
|
+
* @license lucide-react v1.52.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/function pe(e,n=[],s=[]){const i=typeof e=="string"?$E(e,n,s):e,a=S.forwardRef(({className:u,...c},f)=>S.createElement(GE,{ref:f,icon:i,className:u,...c}));return i.name&&(a.displayName=BE(i.name)),a}/**
|
|
102
|
+
* @license lucide-react v1.52.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const g0={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};g0.node;const YE=pe(g0);/**
|
|
107
|
+
* @license lucide-react v1.52.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const v0={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};v0.node;const Ky=pe(v0);/**
|
|
112
|
+
* @license lucide-react v1.52.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const x0={name:"arrow-up-down",size:24,node:[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]};x0.node;const XE=pe(x0);/**
|
|
117
|
+
* @license lucide-react v1.52.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const w0={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};w0.node;const Wy=pe(w0);/**
|
|
122
|
+
* @license lucide-react v1.52.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const S0={name:"check-check",size:24,node:[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]};S0.node;const ZE=pe(S0);/**
|
|
127
|
+
* @license lucide-react v1.52.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const k0={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};k0.node;const jf=pe(k0);/**
|
|
132
|
+
* @license lucide-react v1.52.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const C0={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};C0.node;const JE=pe(C0);/**
|
|
137
|
+
* @license lucide-react v1.52.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const E0={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};E0.node;const e2=pe(E0);/**
|
|
142
|
+
* @license lucide-react v1.52.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const T0={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};T0.node;const t2=pe(T0);/**
|
|
147
|
+
* @license lucide-react v1.52.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const P0={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};P0.node;const n2=pe(P0);/**
|
|
152
|
+
* @license lucide-react v1.52.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const N0={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};N0.node;const j0=pe(N0);/**
|
|
157
|
+
* @license lucide-react v1.52.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const b0={name:"cloud-upload",size:24,node:[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],aliases:["upload-cloud"]};b0.node;const r2=pe(b0);/**
|
|
162
|
+
* @license lucide-react v1.52.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const R0={name:"cloud",size:24,node:[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]};R0.node;const M0=pe(R0);/**
|
|
167
|
+
* @license lucide-react v1.52.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const D0={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};D0.node;const bf=pe(D0);/**
|
|
172
|
+
* @license lucide-react v1.52.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const A0={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};A0.node;const s2=pe(A0);/**
|
|
177
|
+
* @license lucide-react v1.52.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const L0={name:"file-archive",size:24,node:[["path",{d:"M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5",key:"4pqfef"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 12v-1",key:"1ej8lb"}],["path",{d:"M8 18v-2",key:"qcmpov"}],["path",{d:"M8 7V6",key:"1nbb54"}],["circle",{cx:"8",cy:"20",r:"2",key:"ckkr5m"}]]};L0.node;const i2=pe(L0);/**
|
|
182
|
+
* @license lucide-react v1.52.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const I0={name:"file-stack",size:24,node:[["path",{d:"M11 21a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1",key:"likhh7"}],["path",{d:"M16 16a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1",key:"17ky3x"}],["path",{d:"M21 6a2 2 0 0 0-.586-1.414l-2-2A2 2 0 0 0 17 2h-3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1z",key:"1hyeo0"}]]};I0.node;const Qy=pe(I0);/**
|
|
187
|
+
* @license lucide-react v1.52.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const O0={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};O0.node;const Xc=pe(O0);/**
|
|
192
|
+
* @license lucide-react v1.52.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const F0={name:"file",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]};F0.node;const o2=pe(F0);/**
|
|
197
|
+
* @license lucide-react v1.52.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const _0={name:"film",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]};_0.node;const a2=pe(_0);/**
|
|
202
|
+
* @license lucide-react v1.52.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const V0={name:"folder-input",size:24,node:[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]]};V0.node;const Od=pe(V0);/**
|
|
207
|
+
* @license lucide-react v1.52.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const z0={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};z0.node;const l2=pe(z0);/**
|
|
212
|
+
* @license lucide-react v1.52.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const $0={name:"folder-plus",size:24,node:[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};$0.node;const U0=pe($0);/**
|
|
217
|
+
* @license lucide-react v1.52.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const B0={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};B0.node;const mi=pe(B0);/**
|
|
222
|
+
* @license lucide-react v1.52.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const H0={name:"hard-drive",size:24,node:[["path",{d:"M10 16h.01",key:"1bzywj"}],["path",{d:"M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"18tbho"}],["path",{d:"M21.946 12.013H2.054",key:"zqlbp7"}],["path",{d:"M6 16h.01",key:"1pmjb7"}]]};H0.node;const yo=pe(H0);/**
|
|
227
|
+
* @license lucide-react v1.52.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const K0={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};K0.node;const u2=pe(K0);/**
|
|
232
|
+
* @license lucide-react v1.52.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const W0={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};W0.node;const c2=pe(W0);/**
|
|
237
|
+
* @license lucide-react v1.52.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const Q0={name:"keyboard",size:24,node:[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]};Q0.node;const d2=pe(Q0);/**
|
|
242
|
+
* @license lucide-react v1.52.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const q0={name:"layout-grid",size:24,node:[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]};q0.node;const f2=pe(q0);/**
|
|
247
|
+
* @license lucide-react v1.52.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const G0={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};G0.node;const h2=pe(G0);/**
|
|
252
|
+
* @license lucide-react v1.52.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const Y0={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};Y0.node;const Lt=pe(Y0);/**
|
|
257
|
+
* @license lucide-react v1.52.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const X0={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};X0.node;const p2=pe(X0);/**
|
|
262
|
+
* @license lucide-react v1.52.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const Z0={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};Z0.node;const m2=pe(Z0);/**
|
|
267
|
+
* @license lucide-react v1.52.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const J0={name:"music",size:24,node:[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]};J0.node;const y2=pe(J0);/**
|
|
272
|
+
* @license lucide-react v1.52.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const ex={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};ex.node;const g2=pe(ex);/**
|
|
277
|
+
* @license lucide-react v1.52.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const tx={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};tx.node;const nx=pe(tx);/**
|
|
282
|
+
* @license lucide-react v1.52.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const rx={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};rx.node;const Rf=pe(rx);/**
|
|
287
|
+
* @license lucide-react v1.52.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const sx={name:"search-x",size:24,node:[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]};sx.node;const v2=pe(sx);/**
|
|
292
|
+
* @license lucide-react v1.52.0 - ISC
|
|
293
|
+
*
|
|
294
|
+
* This source code is licensed under the ISC license.
|
|
295
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
+
*/const ix={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};ix.node;const ox=pe(ix);/**
|
|
297
|
+
* @license lucide-react v1.52.0 - ISC
|
|
298
|
+
*
|
|
299
|
+
* This source code is licensed under the ISC license.
|
|
300
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
+
*/const ax={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};ax.node;const x2=pe(ax);/**
|
|
302
|
+
* @license lucide-react v1.52.0 - ISC
|
|
303
|
+
*
|
|
304
|
+
* This source code is licensed under the ISC license.
|
|
305
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
+
*/const lx={name:"star-off",size:24,node:[["path",{d:"m10.344 4.688 1.181-2.393a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.237 3.152",key:"19ctli"}],["path",{d:"m17.945 17.945.43 2.505a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a8 8 0 0 0 .4-.099",key:"ptqqvy"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};lx.node;const Mf=pe(lx);/**
|
|
307
|
+
* @license lucide-react v1.52.0 - ISC
|
|
308
|
+
*
|
|
309
|
+
* This source code is licensed under the ISC license.
|
|
310
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
311
|
+
*/const ux={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};ux.node;const fs=pe(ux);/**
|
|
312
|
+
* @license lucide-react v1.52.0 - ISC
|
|
313
|
+
*
|
|
314
|
+
* This source code is licensed under the ISC license.
|
|
315
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
316
|
+
*/const cx={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};cx.node;const Pr=pe(cx);/**
|
|
317
|
+
* @license lucide-react v1.52.0 - ISC
|
|
318
|
+
*
|
|
319
|
+
* This source code is licensed under the ISC license.
|
|
320
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
321
|
+
*/const dx={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};dx.node;const wl=pe(dx);/**
|
|
322
|
+
* @license lucide-react v1.52.0 - ISC
|
|
323
|
+
*
|
|
324
|
+
* This source code is licensed under the ISC license.
|
|
325
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
+
*/const fx={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};fx.node;const Sl=pe(fx);/**
|
|
327
|
+
* @license lucide-react v1.52.0 - ISC
|
|
328
|
+
*
|
|
329
|
+
* This source code is licensed under the ISC license.
|
|
330
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
331
|
+
*/const hx={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};hx.node;const cn=pe(hx),w2=[["image/","image"],["video/","video"],["audio/","audio"],["application/pdf","pdf"],["application/zip","archive"],["application/x-tar","archive"],["application/gzip","archive"],["application/x-7z-compressed","archive"],["application/vnd.rar","archive"],["application/x-bzip2","archive"],["application/x-xz","archive"],["text/","text"],["application/json","text"],["application/xml","text"],["application/yaml","text"],["application/javascript","text"],["text/markdown","text"]],px=new Set(["application/msword","application/vnd.ms-excel","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/rtf","application/epub+zip"]);function S2(e){for(const[n,s]of w2)if(e.startsWith(n))return s;return px.has(e)?"document":"other"}[...px];const rn={NOT_FOUND:"NOT_FOUND",FOLDER_NOT_FOUND:"FOLDER_NOT_FOUND",STORAGE_NOT_INITIALIZED:"STORAGE_NOT_INITIALIZED",STORAGE_UNAVAILABLE:"STORAGE_UNAVAILABLE",TELEGRAM_AUTH_REQUIRED:"TELEGRAM_AUTH_REQUIRED"};class Nr extends Error{constructor(s,i,a){super(a);Vc(this,"status");Vc(this,"code");this.name="ApiError",this.status=s,this.code=i}}function Qe(e,n){return e instanceof Error&&e.message!==""?e.message:n}function hr(e,...n){return e instanceof Nr&&n.includes(e.code)}const Fd=new Set;function k2(e){return Fd.add(e),()=>{Fd.delete(e)}}function mx(){for(const e of Fd)e()}function qy(e){return typeof e=="object"&&e!==null}function C2(e){if(!qy(e)||!qy(e.error))return!1;const n=e.error;return typeof n.code=="string"&&typeof n.message=="string"}function yx(e,n){let s=null;try{s=JSON.parse(n)}catch{}return C2(s)?new Nr(e,s.error.code,s.error.message):new Nr(e,"UNKNOWN",`Request failed with status ${e}`)}function Qr(e){const n=new URLSearchParams;for(const[i,a]of Object.entries(e))a==null||a===""||n.set(i,String(a));const s=n.toString();return s===""?"":`?${s}`}function pr(e,n=""){return`/api/files/${encodeURIComponent(e)}${n}`}function oo(e,n=""){return`/api/folders/${encodeURIComponent(e)}${n}`}async function gx(e,n,s){const i={};s!==void 0&&(i["content-type"]="application/json");let a;try{a=await fetch(n,{method:e,credentials:"same-origin",headers:i,body:s!==void 0?JSON.stringify(s):void 0})}catch{throw new Nr(0,"NETWORK_ERROR","Could not reach the server. Check your connection and try again.")}if(!a.ok){const u=await a.text().catch(()=>""),c=yx(a.status,u);throw a.status===401&&c.code!==rn.TELEGRAM_AUTH_REQUIRED&&mx(),c}return a}async function Ne(e,n,s){return await(await gx(e,n,s)).json()}async function E2(e,n,s){await gx(e,n,s)}const we={auth:{me(){return Ne("GET","/api/auth/me")},startLogin(e){return Ne("POST","/api/auth/telegram/start",{phone:e})},verifyCode(e,n){return Ne("POST","/api/auth/telegram/verify",{phone:e,code:n})},verifyPassword(e,n){return Ne("POST","/api/auth/telegram/password",{phone:e,password:n})},logout(){return Ne("POST","/api/auth/logout")}},storage:{ensure(){return Ne("POST","/api/storage/ensure")},health(){return Ne("GET","/api/storage/health")},stats(){return Ne("GET","/api/storage/stats")},integrityCheck(e=!1){return Ne("POST","/api/storage/integrity/check",e?{deep:!0}:{})}},files:{list(e){return Ne("GET",`/api/files${Qr({...e})}`)},get(e){return Ne("GET",pr(e))},versions(e){return Ne("GET",pr(e,"/versions"))},update(e,n){return Ne("PATCH",pr(e),n)},move(e,n){return Ne("POST",pr(e,"/move"),{folderId:n})},trash(e){return Ne("POST",pr(e,"/trash"))},restore(e){return Ne("POST",pr(e,"/restore"))},delete(e){return E2("DELETE",pr(e))},batch(e){return Ne("POST","/api/files/batch",e)},download(e){const n=document.createElement("a");n.href=pr(e,"/download"),n.rel="noopener",document.body.appendChild(n),n.click(),n.remove()}},folders:{list(e){return Ne("GET",`/api/folders${Qr({...e})}`)},tree(){return Ne("GET","/api/folders/tree")},create(e,n){return Ne("POST","/api/folders",{name:e,parentId:n})},update(e,n){return Ne("PATCH",oo(e),n)},move(e,n){return Ne("POST",oo(e,"/move"),{parentId:n})},trash(e){return Ne("POST",oo(e,"/trash"))},restore(e){return Ne("POST",oo(e,"/restore"))},delete(e){return Ne("DELETE",oo(e))},batch(e){return Ne("POST","/api/folders/batch",e)}},trash:{list(e){return Ne("GET",`/api/trash${Qr({...e})}`)},empty(){return Ne("POST","/api/trash/empty")}},starred:{list(e){return Ne("GET",`/api/starred${Qr({...e})}`)}},recent:{list(e){return Ne("GET",`/api/recent${Qr({...e})}`)}},search:{query(e,n={}){return Ne("GET",`/api/search${Qr({q:e,...n})}`)}},activity:{list(e){return Ne("GET",`/api/activity${Qr({...e})}`)}}},Df=S.createContext({});function Af(e){const n=S.useRef(null);return n.current===null&&(n.current=e()),n.current}const T2=typeof window<"u",go=T2?S.useLayoutEffect:S.useEffect,Fl=S.createContext(null);function Lf(e,n){e.indexOf(n)===-1&&e.push(n)}function kl(e,n){const s=e.indexOf(n);s>-1&&e.splice(s,1)}const Qn=(e,n,s)=>s>n?n:s<e?e:s;let _l=()=>{};const Wn={},If=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),vx=e=>typeof e=="object"&&e!==null,Of=e=>/^0[^.\s]+$/u.test(e);function xx(e){let n;return()=>(n===void 0&&(n=e()),n)}const dn=e=>e,Ao=(...e)=>e.reduce((n,s)=>i=>s(n(i))),vo=(e,n,s)=>{const i=n-e;return i?(s-e)/i:1};class Cl{constructor(){this.subscriptions=[]}add(n){return Lf(this.subscriptions,n),()=>this.remove(n)}remove(n){kl(this.subscriptions,n)}notify(n,s,i){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](n,s,i);else for(let u=0;u<a;u++){const c=this.subscriptions[u];c&&c(n,s,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Wt=e=>e*1e3,Ht=e=>e/1e3,wx=(e,n)=>n?e*(1e3/n):0,Sx=(e,n,s)=>(((1-3*s+3*n)*e+(3*s-6*n))*e+3*n)*e,P2=1e-7,N2=12;function j2(e,n,s,i,a){let u,c,f=0;do c=n+(s-n)/2,u=Sx(c,i,a)-e,u>0?s=c:n=c;while(Math.abs(u)>P2&&++f<N2);return c}function Lo(e,n,s,i){if(e===n&&s===i)return dn;const a=u=>j2(u,0,1,e,s);return u=>u===0||u===1?u:Sx(a(u),n,i)}const kx=e=>n=>n<=.5?e(2*n)/2:(2-e(2*(1-n)))/2,Cx=e=>n=>1-e(1-n),Ex=Lo(.33,1.53,.69,.99),Ff=Cx(Ex),Tx=kx(Ff),Px=e=>e>=1?1:(e*=2)<1?.5*Ff(e):.5*(2-Math.pow(2,-10*(e-1))),_f=e=>1-Math.sin(Math.acos(e)),Nx=Cx(_f),jx=kx(_f),b2=Lo(.42,0,1,1),R2=Lo(0,0,.58,1),Vf=Lo(.42,0,.58,1),M2=e=>Array.isArray(e)&&typeof e[0]!="number",bx=e=>Array.isArray(e)&&typeof e[0]=="number",D2={linear:dn,easeIn:b2,easeInOut:Vf,easeOut:R2,circIn:_f,circInOut:jx,circOut:Nx,backIn:Ff,backInOut:Tx,backOut:Ex,anticipate:Px},A2=e=>typeof e=="string",Gy=e=>{if(bx(e)){_l(e.length===4);const[n,s,i,a]=e;return Lo(n,s,i,a)}else if(A2(e))return D2[e];return e},Je={delta:0,timestamp:0,isProcessing:!1};let cl;function L2(){cl=void 0}const lt={now:()=>(cl===void 0&<.set(Je.isProcessing||Wn.useManualTiming?Je.timestamp:performance.now()),cl),set:e=>{cl=e,queueMicrotask(L2)}},Hs=e=>Math.round(e*1e5)/1e5,Rx=e=>n=>typeof n=="string"&&n.startsWith(e),Mx=Rx("--"),I2=Rx("var(--"),zf=e=>I2(e)?O2.test(e.split("/*")[0].trim()):!1,O2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Yy(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const yi={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},xo={...yi,transform:e=>Qn(0,1,e)},Ja={...yi,default:1},$f=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function F2(e){return e==null}const _2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Uf=(e,n)=>s=>!!(typeof s=="string"&&_2.test(s)&&s.startsWith(e)||n&&!F2(s)&&Object.prototype.hasOwnProperty.call(s,n)),Dx=(e,n,s)=>i=>{if(typeof i!="string")return i;const[a,u,c,f]=i.match($f);return{[e]:parseFloat(a),[n]:parseFloat(u),[s]:parseFloat(c),alpha:f!==void 0?parseFloat(f):1}},V2=e=>Qn(0,255,e),Zc={...yi,transform:e=>Math.round(V2(e))},Yr={test:Uf("rgb","red"),parse:Dx("red","green","blue"),transform:({red:e,green:n,blue:s,alpha:i=1})=>"rgba("+Zc.transform(e)+", "+Zc.transform(n)+", "+Zc.transform(s)+", "+Hs(xo.transform(i))+")"};function z2(e){let n="",s="",i="",a="";return e.length>5?(n=e.substring(1,3),s=e.substring(3,5),i=e.substring(5,7),a=e.substring(7,9)):(n=e.substring(1,2),s=e.substring(2,3),i=e.substring(3,4),a=e.substring(4,5),n+=n,s+=s,i+=i,a+=a),{red:parseInt(n,16),green:parseInt(s,16),blue:parseInt(i,16),alpha:a?parseInt(a,16)/255:1}}const _d={test:Uf("#"),parse:z2,transform:Yr.transform},Io=e=>({test:n=>typeof n=="string"&&n.endsWith(e)&&n.split(" ").length===1,parse:parseFloat,transform:n=>`${n}${e}`}),Vn=Io("deg"),jn=Io("%"),ie=Io("px"),$2=Io("vh"),U2=Io("vw"),Xy={...jn,parse:e=>jn.parse(e)/100,transform:e=>jn.transform(e*100)},$s={test:Uf("hsl","hue"),parse:Dx("hue","saturation","lightness"),transform:({hue:e,saturation:n,lightness:s,alpha:i=1})=>"hsla("+Math.round(e)+", "+jn.transform(Hs(n))+", "+jn.transform(Hs(s))+", "+Hs(xo.transform(i))+")"},et={test:e=>Yr.test(e)||_d.test(e)||$s.test(e),parse:e=>Yr.test(e)?Yr.parse(e):$s.test(e)?$s.parse(e):_d.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Yr.transform(e):$s.transform(e),getAnimatableNone:e=>{const n=et.parse(e);return n.alpha=0,et.transform(n)}},B2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Ax=new RegExp($f.source),Lx=new RegExp(B2.source,"i");function H2(e){return isNaN(e)&&typeof e=="string"&&(Ax.test(e)||Lx.test(e))}const Ix="number",Ox="color",K2="var",W2="var(",Zy="${}",Q2=/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 q2(e){const n=e.toString();return Ax.test(n)||Lx.test(n)}function wo(e){const n=e.toString(),s=[],i={color:[],number:[],var:[]},a=[];let u=0;const f=n.replace(Q2,p=>(et.test(p)?(i.color.push(u),a.push(Ox),s.push(et.parse(p))):p.startsWith(W2)?(i.var.push(u),a.push(K2),s.push(p)):(i.number.push(u),a.push(Ix),s.push(parseFloat(p))),++u,Zy)).split(Zy);return{values:s,split:f,indexes:i,types:a}}function G2(e){return wo(e).values}function Fx({split:e,types:n}){const s=e.length;return i=>{let a="";for(let u=0;u<s;u++)if(a+=e[u],i[u]!==void 0){const c=n[u];c===Ix?a+=Hs(i[u]):c===Ox?a+=et.transform(i[u]):a+=i[u]}return a}}function Y2(e){return Fx(wo(e))}const X2=e=>typeof e=="number"?0:et.test(e)?et.getAnimatableNone(e):e,Z2=(e,n)=>typeof e=="number"?n!=null&&n.trim().endsWith("/")?e:0:X2(e);function J2(e){const n=wo(e);return Fx(n)(n.values.map((i,a)=>Z2(i,n.split[a])))}const It={test:H2,parse:G2,createTransformer:Y2,getAnimatableNone:J2};function Jc(e,n,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(n-e)*6*s:s<1/2?n:s<2/3?e+(n-e)*(2/3-s)*6:e}function eT({hue:e,saturation:n,lightness:s,alpha:i}){e/=360,n/=100,s/=100;let a=0,u=0,c=0;if(!n)a=u=c=s;else{const f=s<.5?s*(1+n):s+n-s*n,p=2*s-f;a=Jc(p,f,e+1/3),u=Jc(p,f,e),c=Jc(p,f,e-1/3)}return{red:Math.round(a*255),green:Math.round(u*255),blue:Math.round(c*255),alpha:i}}function El(e,n){return s=>s>0?n:e}const Me=(e,n,s)=>e+(n-e)*s,ed=(e,n,s)=>{const i=e*e,a=s*(n*n-i)+i;return a<0?0:Math.sqrt(a)},tT=[_d,Yr,$s],nT=e=>tT.find(n=>n.test(e));function Jy(e){const n=nT(e);if(!n)return!1;let s=n.parse(e);return n===$s&&(s=eT(s)),s}const eg=(e,n)=>{const s=Jy(e),i=Jy(n);if(!s||!i)return El(e,n);const a={...s};return u=>(a.red=ed(s.red,i.red,u),a.green=ed(s.green,i.green,u),a.blue=ed(s.blue,i.blue,u),a.alpha=Me(s.alpha,i.alpha,u),Yr.transform(a))},Vd=new Set(["none","hidden"]);function rT(e,n){return Vd.has(e)?s=>s<=0?e:n:s=>s>=1?n:e}function sT(e,n){return s=>Me(e,n,s)}function Bf(e){return typeof e=="number"?sT:typeof e=="string"?zf(e)?El:et.test(e)?eg:aT:Array.isArray(e)?_x:typeof e=="object"?et.test(e)?eg:iT:El}function _x(e,n){const s=[...e],i=s.length,a=e.map((u,c)=>Bf(u)(u,n[c]));return u=>{for(let c=0;c<i;c++)s[c]=a[c](u);return s}}function iT(e,n){const s={...e,...n},i={};for(const a in s)e[a]!==void 0&&n[a]!==void 0&&(i[a]=Bf(e[a])(e[a],n[a]));return a=>{for(const u in i)s[u]=i[u](a);return s}}function oT(e,n){const s=[],i={color:0,var:0,number:0};for(let a=0;a<n.values.length;a++){const u=n.types[a],c=e.indexes[u][i[u]],f=e.values[c]??0;s[a]=f,i[u]++}return s}const aT=(e,n)=>{const s=It.createTransformer(n),i=wo(e),a=wo(n);return i.indexes.var.length===a.indexes.var.length&&i.indexes.color.length===a.indexes.color.length&&i.indexes.number.length>=a.indexes.number.length?Vd.has(e)&&!a.values.length||Vd.has(n)&&!i.values.length?rT(e,n):Ao(_x(oT(i,a),a.values),s):El(e,n)},tg=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function lT(e,n){const s=tg.exec(e);if(!s)return;const i=tg.exec(n);if(!i||s[2]!==i[2])return;const a=s[2],u=parseFloat(s[1]),c=parseFloat(i[1]);return f=>Hs(Me(u,c,f))+a}function Hf(e,n,s){if(typeof e=="number"&&typeof n=="number"&&typeof s=="number")return Me(e,n,s);if(typeof e=="string"&&typeof n=="string"){const a=lT(e,n);if(a)return a}return Bf(e)(e,n)}const el=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function uT(e){let n=new Set,s=new Set,i=!1,a=!1;const u=new Set;let c={delta:0,timestamp:0,isProcessing:!1};function f(y){u.has(y)&&(s.add(y),e()),y(c)}const p={schedule:(y,g=!1,v=!1)=>{const k=v&&i?n:s;return g&&u.add(y),k.add(y),y},cancel:y=>{s.delete(y),u.delete(y)},process:y=>{if(c=y,i){a=!0;return}i=!0;const g=n;n=s,s=g,n.forEach(f),n.clear(),i=!1,a&&(a=!1,p.process(y))}};return p}const cT=40;function Vx(e,n,s={delta:0,timestamp:0,isProcessing:!1}){let i=!1,a=!0;const u=()=>i=!0,c=el.reduce((R,O)=>(R[O]=uT(u),R),{}),{setup:f,read:p,resolveKeyframes:y,preUpdate:g,update:v,preRender:x,render:k,postRender:C}=c,T=()=>{const R=Wn.useManualTiming,O=R?s.timestamp:performance.now();i=!1,R||(s.delta=a?1e3/60:Math.max(Math.min(O-s.timestamp,cT),1)),s.timestamp=O,s.isProcessing=!0,f.process(s),p.process(s),y.process(s),g.process(s),v.process(s),x.process(s),k.process(s),C.process(s),s.isProcessing=!1,i&&n&&(a=!1,e(T))},E=()=>{i=!0,a=!0,s.isProcessing||e(T)};return{schedule:el.reduce((R,O)=>{const F=c[O];return R[O]=(U,A=!1,_=!1)=>(i||E(),F.schedule(U,A,_)),R},{}),cancel:R=>{for(let O=0;O<el.length;O++)c[el[O]].cancel(R)},state:s,steps:c}}const{schedule:De,cancel:br,steps:td}=Vx(typeof requestAnimationFrame<"u"?requestAnimationFrame:dn,!0,Je),dT=e=>{const n=({timestamp:s})=>e(s);return{start:(s=!0)=>De.update(n,s),stop:()=>br(n),now:()=>Je.isProcessing?Je.timestamp:lt.now()}},zx=(e,n,s=10)=>{let i="";const a=Math.max(Math.round(n/s),2);for(let u=0;u<a;u++)i+=Math.round(e(u/(a-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Kf=2e4;function Wf(e,n=50,s=Kf,i){let a=0,u=e.next(a);for(;!u.done&&a<s;)a+=n,u=e.next(a);return a>=s?1/0:a}function fT(e,n=100,s){const i=s({...e,keyframes:[0,n]}),a=Math.min(Wf(i),Kf);return{type:"keyframes",ease:u=>i.next(a*u).value/n,duration:Ht(a)}}const at={stiffness:100,damping:10,mass:1,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05},$x=e=>e<0?1/Math.max(1+e,at.minDamping):Math.max(1-e,at.minDamping);function Ux(e,n){if(!(e>1))return 1;const s=Math.sqrt(e*e-1),i=e-s,a=e+s,u=2*s*Math.exp(-n)*(1+n);return Bx(c=>a*Math.exp(-i*c)-i*Math.exp(-a*c)-u,c=>Math.exp(-a*c)-Math.exp(-i*c),n)/n}function zd(e,n){return e*Math.sqrt(1-n*n)}const hT=12;function Bx(e,n,s){let i=s;for(let a=1;a<hT;a++)i=i-e(i)/n(i);return i}const nd=.001;function pT({duration:e=at.duration,bounce:n=at.bounce}){let s,i;const a=$x(n);e=Qn(at.minDuration,at.maxDuration,Ht(e)),a<1?(s=y=>{const g=y*a,v=g*e,x=zd(y,a),k=Math.exp(-v);return nd-g/x*k},i=y=>{const v=y*a*e,x=a*a*y*y*e,k=Math.exp(-v),C=zd(y*y,a);return(-s(y)+nd>0?-1:1)*-x*k/C}):(s=y=>{const g=Math.exp(-y*e),v=y*e+1;return-nd+g*v},i=y=>{const g=Math.exp(-y*e),v=-y*(e*e);return g*v});const u=5/e,c=Bx(s,i,u),f=c*Ux(a,c*e),p=f*f;return{stiffness:p,damping:a*2*Math.sqrt(p),duration:Wt(e)}}const $d=(e,n)=>(n?e>=0:e>0)&&e<1/0;function rd(e,n){if($d(e,n))return e}function mT(e){const n=rd(e.stiffness),s=rd(e.damping,!0),i=rd(e.mass),a={...e,stiffness:n??at.stiffness,damping:s??at.damping,mass:i??at.mass,isResolvedFromDuration:!1,isTimeDefined:(n??s??i)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(a.isTimeDefined){if(e.visualDuration){const u=$x(e.bounce||0),c=2*Math.PI/(e.visualDuration*1.2)*Ux(u,2*Math.PI/1.2);a.stiffness=c*c,a.damping=2*u*Math.sqrt(a.stiffness)}else Object.assign(a,pT(a)),a.isResolvedFromDuration=!0;(!$d(a.stiffness)||!$d(a.damping,!0))&&(a.stiffness=at.stiffness,a.damping=at.damping)}return a}function Tl(e=at.visualDuration,n=at.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:n}:e,i=s.keyframes[0],a=s.keyframes[s.keyframes.length-1],u={done:!1,value:i},{stiffness:c,damping:f,mass:p,duration:y,isResolvedFromDuration:g,isTimeDefined:v}=mT({...s}),x=A=>v?0:-Ht(A),k=f/(2*Math.sqrt(c*p)),C=Ht(Math.sqrt(c/p)),T=k*C,E={target:a,delta:a-i,velocity:x(s.velocity||0)||0,restSpeed:0,restDelta:0},j=()=>{const A=Math.abs(E.delta)<5;E.restSpeed=s.restSpeed||(A?at.restSpeed.granular:at.restSpeed.default),E.restDelta=s.restDelta||(A?at.restDelta.granular:at.restDelta.default)};j();let I,R,O;if(k<1){const A=zd(C,k),_={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};O=()=>{_.A=(E.velocity+T*E.delta)/A,_.sinC=T*_.A+E.delta*A,_.cosC=T*E.delta-_.A*A};const B=Y=>{Y!==_.t&&(_.t=Y,_.env=Math.exp(-T*Y),_.sin=Math.sin(A*Y),_.cos=Math.cos(A*Y))};I=Y=>(B(Y),E.target-_.env*(_.A*_.sin+E.delta*_.cos)),R=Y=>(B(Y),_.env*(_.sinC*_.sin+_.cosC*_.cos))}else if(k===1){I=_=>E.target-Math.exp(-C*_)*(E.delta+(E.velocity+C*E.delta)*_);const A={C:0};O=()=>{A.C=E.velocity+C*E.delta},R=_=>Math.exp(-C*_)*(C*A.C*_-E.velocity)}else{const A=C*Math.sqrt(k*k-1),_=T-A,B=T+A,Y=v?1/0:300/A,ne=(X,fe)=>Math.exp(fe>Y?-X*Y-T*(fe-Y):-X*fe),G={S:0,F:0};O=()=>{const X=(E.velocity+T*E.delta)/A;G.S=(E.delta+X)/2,G.F=(E.delta-X)/2},I=X=>E.target-G.S*ne(_,X)-G.F*ne(B,X),R=X=>_*G.S*ne(_,X)+B*G.F*ne(B,X)}O();const F=g&&y||null,U={calculatedDuration:F,retarget:(A,_)=>{E.target=A[A.length-1],E.delta=E.target-A[0],E.velocity=x(_),s.restSpeed&&s.restDelta||j(),U.calculatedDuration=F,u.done=!1,O()},velocity:A=>Wt(R(A)),next:A=>{const _=I(A);if(g)u.done=A>=y;else{const B=Wt(R(A));u.done=Math.abs(B)<=E.restSpeed&&Math.abs(E.target-_)<=E.restDelta}return u.value=u.done?E.target:_,u},toString:()=>{const A=Math.min(Wf(U),Kf),_=zx(B=>U.next(A*B).value,A,30);return A+"ms "+_},toTransition:()=>{}};return U}Tl.applyToOptions=e=>{const n=fT(e,100,Tl);return e.ease=n.ease,e.duration=Wt(n.duration),e.type="keyframes",e};function Ud({keyframes:e,velocity:n=0,power:s=.8,timeConstant:i=325,bounceDamping:a=10,bounceStiffness:u=500,modifyTarget:c,min:f,max:p,restDelta:y=.5,restSpeed:g}){const v=e[0],x={done:!1,value:v},k=A=>A<f||A>p,C=A=>f===void 0?p:p===void 0||Math.abs(f-A)<Math.abs(p-A)?f:p;let T=s*n;const E=v+T,j=c===void 0?E:c(E);j!==E&&(T=j-v);const I=A=>-T*Math.exp(-A/i),R=A=>{const _=I(A);x.done=Math.abs(_)<=y,x.value=x.done?j:j+_};let O,F;const U=A=>{k(x.value)&&(O=A,F=Tl({keyframes:[x.value,C(x.value)],velocity:-I(A)/i*1e3,damping:a,stiffness:u,restDelta:y,restSpeed:g}))};return U(0),{calculatedDuration:null,next:A=>{let _=!1;return!F&&O===void 0&&(_=!0,R(A),U(A)),O!==void 0&&A>=O?F.next(A-O):(!_&&R(A),x)}}}function yT(e,n,s){const i=[],a=s||Wn.mix||Hf,u=e.length-1;for(let c=0;c<u;c++){let f=a(e[c],e[c+1]);if(n){const p=Array.isArray(n)?n[c]||dn:n;f=Ao(p,f)}i.push(f)}return i}function gT(e,n,{clamp:s=!0,ease:i,mixer:a}={}){const u=e.length;if(_l(u===n.length),u===1)return()=>n[0];if(u===2&&n[0]===n[1])return()=>n[1];const c=e[0]===e[1];e[0]>e[u-1]&&(e=[...e].reverse(),n=[...n].reverse());const f=yT(n,i,a),p=f.length,y=g=>{if(c&&g<e[0])return n[0];let v=0;if(p>1)for(;v<e.length-2&&!(g<e[v+1]);v++);const x=vo(e[v],e[v+1],g);return f[v](x)};return s?g=>y(Qn(e[0],e[u-1],g)):y}function vT(e,n){const s=e[e.length-1];for(let i=1;i<=n;i++){const a=vo(0,n,i);e.push(Me(s,1,a))}}function xT(e){const n=[0];return vT(n,e.length-1),n}function wT(e,n){return e.map(s=>s*n)}function ST(e,n){return e.map(()=>n||Vf).splice(0,e.length-1)}function ho({duration:e=300,keyframes:n,times:s,ease:i="easeInOut"}){const a=M2(i)?i.map(Gy):Gy(i)||Vf,u={done:!1,value:n[0]};if(n.length===2&&!Array.isArray(a)&&(!s||s.length!==2||s[0]===0&&s[1]===1)){const[p,y]=n,g=p===y?void 0:(Wn.mix||Hf)(p,y);return{calculatedDuration:e,next:v=>(u.value=g?g(a(e>0?Qn(0,1,v/e):1)):y,u.done=v>=e,u)}}const c=wT(s&&s.length===n.length?s:xT(n),e),f=gT(c,n,{ease:Array.isArray(a)?a:ST(n,a)});return{calculatedDuration:e,next:p=>(u.value=f(p),u.done=p>=e,u)}}const kT=5;function CT(e,n,s){const i=Math.max(n-kT,0);return wx(s-e(i),n-i)}function ET(e,n,s=0){return n<=0?s:e.velocity?e.velocity(n):CT(i=>e.next(i).value,n,e.next(n).value)}const TT=e=>e!==null;function Vl(e,{repeat:n,repeatType:s="loop"},i,a=1){const u=e.filter(TT),f=a<0||n&&s!=="loop"&&n%2===1?0:u.length-1;return!f||i===void 0?u[f]:i}const PT={decay:Ud,inertia:Ud,tween:ho,keyframes:ho,spring:Tl};function Hx(e){typeof e.type=="string"&&(e.type=PT[e.type])}function Kx(e,n){return{kind:e,animation:n,timestamp:lt.now(),frameTimestamp:Je.timestamp,frameIsProcessing:Je.isProcessing}}function Wx(e,n,s){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...Kx("animation-start",e),options:s?{...n,...s}:n})}catch{}}function NT(e,n){const s=globalThis.__MOTION_INSPECT__;if(s)try{s({...Kx("layout-animation-start",e),node:n})}catch{}}class Qf{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(n=>{this._resolve=n})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){var n;this.isResolved=!0,(n=this._resolve)==null||n.call(this)}then(n,s){return this.finished.then(n,s)}}const jT=e=>e/100;class Pl extends Qf{constructor(n){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var i,a;const{motionValue:s}=this.options;s&&s.updatedAt!==lt.now()&&this.tick(lt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(i=this.options).onStop)==null||a.call(i))},this.options=n,this.initAnimation(),this.play(),n.autoplay===!1&&this.pause(),Wx(this,this.options)}initAnimation(){const{options:n}=this;Hx(n);const{type:s=ho,repeat:i=0,repeatDelay:a=0,repeatType:u,velocity:c=0}=n;let{keyframes:f}=n;const p=s||ho;p!==ho&&typeof f[0]!="number"&&(this.mixKeyframes=Ao(jT,Hf(f[0],f[1])),f=[0,100]);const y=p(f===n.keyframes?n:{...n,keyframes:f});u==="mirror"&&(this.mirroredGenerator=p({...n,keyframes:[...f].reverse(),velocity:-c})),y.calculatedDuration===null&&(y.calculatedDuration=Wf(y));const{calculatedDuration:g}=y;this.calculatedDuration=g,this.resolvedDuration=g+a,this.totalDuration=this.resolvedDuration*(i+1)-a,this.generator=y}updateTime(n){const s=Math.round(n-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(n,s=!1){const{generator:i,totalDuration:a,mixKeyframes:u,mirroredGenerator:c,resolvedDuration:f,calculatedDuration:p}=this;if(this.startTime===null)return i.next(0);const{delay:y=0,keyframes:g,repeat:v,repeatType:x,repeatDelay:k,type:C,onUpdate:T,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,n):this.speed<0&&(this.startTime=Math.min(n-a/this.speed,this.startTime)),s?this.currentTime=n:this.updateTime(n);const j=this.currentTime-y*(this.playbackSpeed>=0?1:-1),I=this.playbackSpeed>=0?j<0:j>a;this.currentTime=Math.max(j,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let R=this.currentTime,O=i;if(v){const _=Math.min(this.currentTime,a)/f;let B=Math.floor(_),Y=_%1;!Y&&_>=1&&(Y=1),Y===1&&B--,B=Math.min(B,v+1),!!(B%2)&&(x==="reverse"?(Y=1-Y,k&&(Y-=k/f)):x==="mirror"&&(O=c)),R=Qn(0,1,Y)*f}let F;I?(this.delayState.value=g[0],F=this.delayState):F=O.next(R),u&&!I&&(F.value=u(F.value));let{done:U}=F;!I&&p!==null&&(U=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&U);return A&&C!==Ud&&(F.value=Vl(g,this.options,E,this.speed)),T&&T(F.value),A&&this.finish(),F}then(n,s){return this.finished.then(n,s)}get duration(){return Ht(this.calculatedDuration)}get iterationDuration(){const{delay:n=0}=this.options||{};return this.duration+Ht(n)}get time(){return Ht(this.currentTime)}set time(n){n=Wt(n),this.currentTime=n,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=n:this.driver&&(this.startTime=this.driver.now()-n/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=n,this.tick(n))}getGeneratorVelocity(){return ET(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(n){const s=this.playbackSpeed!==n;s&&this.driver&&this.updateTime(lt.now()),this.playbackSpeed=n,s&&this.driver&&(this.time=Ht(this.currentTime))}play(){var a,u;if(this.isStopped)return;const{driver:n=dT,startTime:s}=this.options;this.driver||(this.driver=n(c=>this.tick(c))),(u=(a=this.options).onPlay)==null||u.call(a);const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=s??i),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(lt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var n,s;this.notifyFinished(),this.teardown(),this.state="finished",(s=(n=this.options).onComplete)==null||s.call(n)}cancel(){var n,s;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(s=(n=this.options).onCancel)==null||s.call(n)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(n){return this.startTime=0,this.tick(n,!0)}attachTimeline(n){var s;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(s=this.driver)==null||s.stop(),n.observe(this)}}const bT=new Set(["brightness","contrast","saturate","opacity"]);function RT(e){const[n,s]=e.slice(0,-1).split("(");if(n==="drop-shadow")return e;const[i]=s.match($f)||[];if(!i)return e;const a=s.replace(i,"");let u=bT.has(n)?1:0;return i!==s&&(u*=100),n+"("+u+a+")"}const MT=/\b([a-z-]*)\(.*?\)/gu,Bd={...It,getAnimatableNone:e=>{const n=e.match(MT);return n?n.map(RT).join(" "):e}},Hd={...It,getAnimatableNone:e=>{const n=It.parse(e);return It.createTransformer(e)(n.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},ng={...yi,transform:Math.round},DT={rotate:Vn,pathRotation:Vn,rotateX:Vn,rotateY:Vn,rotateZ:Vn,scale:Ja,scaleX:Ja,scaleY:Ja,scaleZ:Ja,skew:Vn,skewX:Vn,skewY:Vn,distance:ie,translateX:ie,translateY:ie,translateZ:ie,x:ie,y:ie,z:ie,perspective:ie,transformPerspective:ie,opacity:xo,originX:Xy,originY:Xy,originZ:ie},Nl={borderWidth:ie,borderTopWidth:ie,borderRightWidth:ie,borderBottomWidth:ie,borderLeftWidth:ie,borderRadius:ie,borderTopLeftRadius:ie,borderTopRightRadius:ie,borderBottomRightRadius:ie,borderBottomLeftRadius:ie,width:ie,maxWidth:ie,height:ie,maxHeight:ie,top:ie,right:ie,bottom:ie,left:ie,inset:ie,insetBlock:ie,insetBlockStart:ie,insetBlockEnd:ie,insetInline:ie,insetInlineStart:ie,insetInlineEnd:ie,padding:ie,paddingTop:ie,paddingRight:ie,paddingBottom:ie,paddingLeft:ie,paddingBlock:ie,paddingBlockStart:ie,paddingBlockEnd:ie,paddingInline:ie,paddingInlineStart:ie,paddingInlineEnd:ie,margin:ie,marginTop:ie,marginRight:ie,marginBottom:ie,marginLeft:ie,marginBlock:ie,marginBlockStart:ie,marginBlockEnd:ie,marginInline:ie,marginInlineStart:ie,marginInlineEnd:ie,fontSize:ie,backgroundPositionX:ie,backgroundPositionY:ie,...DT,zIndex:ng,fillOpacity:xo,strokeOpacity:xo,numOctaves:ng},AT={...Nl,color:et,backgroundColor:et,outlineColor:et,fill:et,stroke:et,borderColor:et,borderTopColor:et,borderRightColor:et,borderBottomColor:et,borderLeftColor:et,filter:Bd,WebkitFilter:Bd,mask:Hd,WebkitMask:Hd},Qx=e=>AT[e],LT=new Set([Bd,Hd]);function qf(e,n){let s=Qx(e);return LT.has(s)||(s=It),s.getAnimatableNone?s.getAnimatableNone(n):void 0}function IT(e){for(let n=1;n<e.length;n++)e[n]??(e[n]=e[n-1])}const Xr=e=>e*180/Math.PI,Kd=e=>{const n=Xr(Math.atan2(e[1],e[0]));return Wd(n)},OT={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Kd,rotateZ:Kd,skewX:e=>Xr(Math.atan(e[1])),skewY:e=>Xr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Wd=e=>(e=e%360,e<0&&(e+=360),e),rg=Kd,sg=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ig=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),FT={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:sg,scaleY:ig,scale:e=>(sg(e)+ig(e))/2,rotateX:e=>Wd(Xr(Math.atan2(e[6],e[5]))),rotateY:e=>Wd(Xr(Math.atan2(-e[2],e[0]))),rotateZ:rg,rotate:rg,skewX:e=>Xr(Math.atan(e[4])),skewY:e=>Xr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function So(e){return e.includes("scale")?1:0}function Qd(e,n){if(!e||e==="none")return So(n);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,a;if(s)i=FT,a=s;else{const f=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=OT,a=f}if(!a)return So(n);const u=i[n],c=a[1].split(",").map(VT);return typeof u=="function"?u(c):c[u]}const _T=(e,n)=>{const{transform:s="none"}=getComputedStyle(e);return Qd(s,n)};function VT(e){return parseFloat(e.trim())}const gi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],jr=new Set([...gi,"pathRotation"]),og=e=>e===yi||e===ie,zT=new Set(["x","y","z"]),$T=gi.filter(e=>!zT.has(e));function UT(e){const n=[];return $T.forEach(s=>{const i=e.getValue(s);if(i!==void 0){const a=i.get(),u=s.startsWith("scale")?1:0;if(a===u)return;n.push([s,a]),i.set(u)}}),n}const BT=new Set(["bottom","right"]);function ag(e,n,s,i,a,u){const c=parseFloat(e);if(!isNaN(c))return c;const{min:f,max:p}=n()[s],y=p-f;return u==="border-box"?y:y-parseFloat(i)-parseFloat(a)}const as={width:({width:e,paddingLeft:n="0",paddingRight:s="0",boxSizing:i},a)=>ag(e,a,"x",n,s,i),height:({height:e,paddingTop:n="0",paddingBottom:s="0",boxSizing:i},a)=>ag(e,a,"y",n,s,i),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},n)=>{const{y:s}=n();return parseFloat(e)+(s.max-s.min)},right:({left:e},n)=>{const{x:s}=n();return parseFloat(e)+(s.max-s.min)},x:({transform:e})=>Qd(e,"x"),y:({transform:e})=>Qd(e,"y")};as.translateX=as.x;as.translateY=as.y;const ls=new Set;let qd=!1,Gd=!1,Yd=!1;function qx(){if(Gd){const e=[],n=new Set,s=new Set;ls.forEach(a=>{a.needsMeasurement&&(e.push(a),n.add(a.element),BT.has(a.name)&&s.add(a.element))});const i=new Map;s.forEach(a=>{const u=UT(a);u.length&&(i.set(a,u),a.render())}),e.forEach(a=>a.measureInitialState()),n.forEach(a=>{a.render();const u=i.get(a);u&&u.forEach(([c,f])=>{var p;(p=a.getValue(c))==null||p.set(f)})}),e.forEach(a=>a.measureEndState()),e.forEach(a=>{a.suspendedScrollY!==void 0&&window.scrollTo(0,a.suspendedScrollY)})}Gd=!1,qd=!1,ls.forEach(e=>e.complete(Yd)),ls.clear()}function Gx(){ls.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Gd=!0)})}function HT(){Yd=!0,Gx(),qx(),Yd=!1}function KT(e,n,s){if(typeof e=="string"){if(If(e)||Of(e))return parseFloat(e);if(!It.test(e)&&It.test(s))return qf(n,s)}return e??void 0}class Gf{constructor(n,s,i,a,u,c=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...n],this.onComplete=s,this.name=i,this.motionValue=a,this.element=u,this.isAsync=c}scheduleResolve(){this.state="scheduled",this.isAsync?(ls.add(this),qd||(qd=!0,De.read(Gx),De.resolveKeyframes(qx))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:n,name:s,element:i,motionValue:a}=this;if(n[0]===null){const u=a==null?void 0:a.get(),c=n[n.length-1];if(u!==void 0)n[0]=u;else if(i&&s){const f=KT(i.readValue(s,c),s,c);f!==void 0&&(n[0]=f)}n[0]===void 0&&(n[0]=c),a&&u===void 0&&a.set(n[0])}IT(n)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(n=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,n),ls.delete(this)}cancel(){this.state==="scheduled"&&(ls.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const WT=e=>e.startsWith("--");function Yx(e,n,s){WT(n)?e.style.setProperty(n,s):e.style[n]=s}const QT={};function Xx(e,n){const s=xx(e);return()=>QT[n]??s()}const qT=Xx(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Zx=Xx(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),fo=([e,n,s,i])=>`cubic-bezier(${e}, ${n}, ${s}, ${i})`,lg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:fo([0,.65,.55,1]),circOut:fo([.55,0,1,.45]),backIn:fo([.31,.01,.66,-.59]),backOut:fo([.33,1.53,.69,.99])};function Jx(e,n){if(e)return typeof e=="function"?Zx()?zx(e,n):"ease-out":bx(e)?fo(e):Array.isArray(e)?e.map(s=>Jx(s,n)||lg.easeOut):lg[e]}function GT(e,n,s,{delay:i=0,duration:a=300,repeat:u=0,repeatType:c="loop",ease:f="easeOut",times:p}={},y=void 0){const g={[n]:s};p&&(g.offset=p);const v=Jx(f,a);Array.isArray(v)&&(g.easing=v);const x={delay:i,duration:a,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:u+1,direction:c==="reverse"?"alternate":"normal"};return y&&(x.pseudoElement=y),e.animate(g,x)}function e1(e){return typeof e=="function"&&"applyToOptions"in e}function YT({type:e,...n}){return e1(e)&&Zx()?e.applyToOptions(n):(n.duration??(n.duration=300),n.ease??(n.ease="easeOut"),n)}class t1 extends Qf{constructor(n){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!n)return;const{element:s,name:i,keyframes:a,pseudoElement:u,allowFlatten:c=!1,finalKeyframe:f,onComplete:p}=n;this.isPseudoElement=!!u,this.allowFlatten=c,this.options=n,_l(typeof n.type!="string");const y=YT(n);this.animation=GT(s,i,a,y,u),y.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!u){const g=Vl(a,this.options,f,this.speed);this.updateMotionValue&&this.updateMotionValue(g),Yx(s,i,g),this.animation.cancel()}p==null||p(),this.notifyFinished()},Wx(this,n,y)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var n,s;(s=(n=this.animation).finish)==null||s.call(n)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:n}=this;n==="idle"||n==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var s,i,a;const n=(s=this.options)==null?void 0:s.element;!this.isPseudoElement&&(n!=null&&n.isConnected)&&((a=(i=this.animation).commitStyles)==null||a.call(i))}get duration(){var s,i;const n=((i=(s=this.animation.effect)==null?void 0:s.getComputedTiming)==null?void 0:i.call(s).duration)||0;return Ht(Number(n))}get iterationDuration(){const{delay:n=0}=this.options||{};return this.duration+Ht(n)}get time(){return Ht(Number(this.animation.currentTime)||0)}set time(n){const s=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Wt(n),s&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(n){n<0&&(this.finishedTime=null),this.animation.playbackRate=n}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(n){this.manualStartTime=this.animation.startTime=n}attachTimeline({timeline:n,onAttach:s,observe:i,...a}){var u;return this.allowFlatten&&((u=this.animation.effect)==null||u.updateTiming({easing:"linear"})),this.animation.onfinish=null,n&&qT()?(this.animation.timeline=n,Object.assign(this.animation,a),s==null||s(this.animation),dn):i(this)}}const n1={anticipate:Px,backInOut:Tx,circInOut:jx};function XT(e){return e in n1}function ZT(e){typeof e.ease=="string"&&XT(e.ease)&&(e.ease=n1[e.ease])}const sd=10;class JT extends t1{constructor(n){ZT(n),Hx(n),super(n),n.startTime!==void 0&&n.autoplay!==!1&&(this.startTime=n.startTime),this.options=n}updateMotionValue(n){const{motionValue:s,onUpdate:i,onComplete:a,element:u,...c}=this.options;if(!s)return;if(n!==void 0){s.set(n);return}const f=new Pl({...c,autoplay:!1}),p=Math.max(sd,lt.now()-this.startTime),y=Qn(0,sd,p-sd),g=f.sample(p).value,{name:v}=this.options;u&&v&&Yx(u,v,g),s.setWithVelocity(f.sample(Math.max(0,p-y)).value,g,y),f.stop()}}const ug=(e,n)=>n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(It.test(e)||e==="0")&&!e.startsWith("url("));function eP(e){const n=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==n)return!0}function tP(e,n,s,i){const a=e[0];if(a===null)return!1;if(n==="display"||n==="visibility")return!0;const u=e[e.length-1],c=ug(a,n),f=ug(u,n);return!c||!f?!1:eP(e)||(s==="spring"||e1(s))&&i}function Xd(e){e.duration=0,e.type="keyframes"}const Zd=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),nP=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function rP(e){for(let n=0;n<e.length;n++)if(typeof e[n]=="string"&&nP.test(e[n]))return!0;return!1}const cg=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),sP=xx(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function iP(e){var v;const{motionValue:n,name:s,repeatDelay:i,repeatType:a,damping:u,type:c,keyframes:f}=e;if(!s||!(Zd.has(s)||cg.has(s)))return!1;const p=(v=n==null?void 0:n.owner)==null?void 0:v.current;if(!(p instanceof HTMLElement)&&!(p instanceof SVGElement))return!1;const{onUpdate:y,transformTemplate:g}=n.owner.getProps();return sP()&&(Zd.has(s)||cg.has(s)&&rP(f))&&(s!=="transform"||!g)&&!y&&!i&&a!=="mirror"&&u!==0&&c!=="inertia"}const oP=40;class aP extends Qf{constructor(n){var p;super(),this.stop=()=>{var y,g;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(g=this.keyframeResolver)==null||g.cancel()},this.createdAt=lt.now();const{keyframes:s,name:i,motionValue:a,element:u}=n,c=n;c.autoplay??(c.autoplay=!0),c.delay??(c.delay=0),c.type??(c.type="keyframes"),c.repeat??(c.repeat=0),c.repeatDelay??(c.repeatDelay=0),c.repeatType??(c.repeatType="loop");const f=(u==null?void 0:u.KeyframeResolver)||Gf;this.keyframeResolver=new f(s,(y,g,v)=>this.onKeyframesResolved(y,g,c,!v),i,a,u),(p=this.keyframeResolver)==null||p.scheduleResolve()}onKeyframesResolved(n,s,i,a){var E,j;this.keyframeResolver=void 0;const{name:u,type:c,velocity:f,delay:p,isHandoff:y,onUpdate:g}=i;this.resolvedAt=lt.now();let v=!0;tP(n,u,c,f)||(v=!1,(Wn.instantAnimations||!p)&&(g==null||g(Vl(n,i,s))),n[0]=n[n.length-1],Xd(i),i.repeat=0);const x=a?this.resolvedAt?this.resolvedAt-this.createdAt>oP?this.resolvedAt:this.createdAt:this.createdAt:void 0,{onComplete:k}=i;i.startTime??(i.startTime=x),i.finalKeyframe=s,i.keyframes=n,i.onComplete=()=>{k==null||k(),this.notifyFinished()};const C=v&&!y&&iP(i);let T;if(C){i.element=(j=(E=i.motionValue)==null?void 0:E.owner)==null?void 0:j.current;try{T=new JT(i)}catch{T=new Pl(i)}}else T=new Pl(i);this.pendingTimeline&&(this.stopTimeline=T.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=T}get finished(){return this._animation?this._animation.finished:super.finished}then(n,s){return this.finished.finally(n).then(()=>{})}get animation(){var n;return this._animation||((n=this.keyframeResolver)==null||n.resume(),HT()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(n){this.animation.time=n}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(n){this.animation.speed=n}get startTime(){return this.animation.startTime}attachTimeline(n){return this._animation?this.stopTimeline=this.animation.attachTimeline(n):this.pendingTimeline=n,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var n;this._animation&&this.animation.cancel(),(n=this.keyframeResolver)==null||n.cancel()}}function r1(e,n,s,i=0,a=1){const u=Array.from(e).sort((y,g)=>y.sortNodePosition(g)).indexOf(n),c=e.size,f=(c-1)*i;return typeof s=="function"?s(u,c):a===1?u*i:f-u*i}const dg=30,lP=e=>!isNaN(parseFloat(e));class uP{constructor(n,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const a=lt.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(const u of this.dependents)u.dirty()},this.hasAnimated=!1,this.setCurrent(n),this.owner=s.owner}setCurrent(n){this.current=n,this.updatedAt=lt.now(),this.canTrackVelocity===null&&n!==void 0&&(this.canTrackVelocity=lP(this.current))}setPrevFrameValue(n=this.current){this.prevFrameValue=n,this.prevUpdatedAt=this.updatedAt}onChange(n){return this.on("change",n)}on(n,s){var i;return n==="change"?this.onChangeSubscribe(s):((i=this.events)[n]||(i[n]=new Cl)).add(s)}onChangeSubscribe(n){const{events:s}=this;return!s.change&&!this.changeSubscriber?this.changeSubscriber=n:(s.change||(s.change=new Cl,s.change.add(this.changeSubscriber),this.changeSubscriber=void 0),s.change.add(n)),()=>{var i;this.changeSubscriber===n?this.changeSubscriber=void 0:(i=s.change)==null||i.remove(n),this.stopIfUnobserved()}}stopIfUnobserved(){De.read(()=>{var n;!this.changeSubscriber&&!((n=this.events.change)!=null&&n.getSize())&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const n in this.events)this.events[n].clear()}attach(n,s){this.passiveEffect=n,this.stopPassiveEffect=s}set(n){this.passiveEffect?this.passiveEffect(n,this.updateAndNotify):this.updateAndNotify(n)}setWithVelocity(n,s,i){this.set(s),this.prev=void 0,this.prevFrameValue=n,this.prevUpdatedAt=this.updatedAt-i}jump(n,s=!0){this.updateAndNotify(n),this.prev=n,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){var i;const{current:n,changeSubscriber:s}=this;s?s(n):(i=this.events.change)==null||i.notify(n)}addDependent(n){this.dependents||(this.dependents=new Set),this.dependents.add(n)}removeDependent(n){this.dependents&&this.dependents.delete(n)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const n=lt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||n-this.updatedAt>dg)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,dg);return wx(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(n){return this.stop(),new Promise(s=>{var u;this.hasAnimated=!0;let i=!1,a;a=n(()=>{var c;i=!0,(c=this.events.animationComplete)==null||c.notify(),this.animation===a&&this.clearAnimation(),s()}),i||(this.animation=a),(u=this.events.animationStart)==null||u.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){var n,s;(n=this.dependents)==null||n.clear(),(s=this.events.destroy)==null||s.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ai(e,n){return new uP(e,n)}function s1(e,n){if(e!=null&&e.inherit&&n){const{inherit:s,...i}=e;return{...n,...i}}return e}function Yf(e,n){const s=(e==null?void 0:e[n])??(e==null?void 0:e.default)??e;return s!==e?s1(s,e):s}const cP={type:"spring",stiffness:500,damping:25,restSpeed:10},dP=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),fP={type:"keyframes",duration:.8},hP={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},pP=(e,{keyframes:n})=>n.length>2?fP:jr.has(e)?e.startsWith("scale")?dP(n[1]):cP:hP,mP=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function yP(e){for(const n in e)if(!mP.has(n))return!0;return!1}const Xf=(e,n,s,i={},a,u)=>c=>{const f=Yf(i,e)||{},p=f.delay||i.delay||0;let{elapsed:y=0}=i;y=y-Wt(p);const g={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:n.getVelocity(),...f,delay:-y,onUpdate:x=>{n.set(x),f.onUpdate&&f.onUpdate(x)},onComplete:()=>{c(),f.onComplete&&f.onComplete()},name:e,motionValue:n,element:u?void 0:a};yP(f)||Object.assign(g,pP(e,g)),g.duration&&(g.duration=Wt(g.duration)),g.repeatDelay&&(g.repeatDelay=Wt(g.repeatDelay)),g.from!==void 0&&(g.keyframes[0]=g.from);let v=!1;if((g.type===!1||g.duration===0&&!g.repeatDelay)&&(Xd(g),g.delay===0&&(v=!0)),(Wn.instantAnimations||Wn.skipAnimations||a!=null&&a.shouldSkipAnimations||f.skipAnimations)&&(v=!0,Xd(g),g.delay=0),g.allowFlatten=!f.type&&!f.ease,v&&!u&&n.get()!==void 0){const x=Vl(g.keyframes,f);if(x!==void 0){De.update(()=>{g.onUpdate(x),g.onComplete()});return}}return f.isSync?new Pl(g):new aP(g)},gP=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vP(e){const n=gP.exec(e);if(!n)return[,];const[,s,i,a]=n;return[`--${s??i}`,a]}function i1(e,n,s=1){const[i,a]=vP(e);if(!i)return;const u=window.getComputedStyle(n).getPropertyValue(i);if(u){const c=u.trim();return If(c)?parseFloat(c):c}return zf(a)?i1(a,n,s+1):a}function xP(e){const n=[{},{}];return e==null||e.values.forEach((s,i)=>{n[0][i]=s.get(),n[1][i]=s.getVelocity()}),n}function o1(e,n,s,i){const a=u=>typeof u=="function"?u(s!==void 0?s:e.custom,...xP(i)):u;return n=a(n),typeof n=="string"&&(n=e.variants&&e.variants[n]),a(n)}function us(e,n,s){return o1(e.getProps(),n,s,e)}const a1=(e,n)=>{var s;return n==="exit"?(s=e.presenceContext)==null?void 0:s.custom:void 0},l1=new Set(["width","height","top","left","right","bottom",...gi]),wP=e=>Array.isArray(e);function SP(e,n,s){e.hasValue(n)?e.getValue(n).set(s):e.addValue(n,ai(s))}function kP(e){return wP(e)?e[e.length-1]||0:e}function CP(e,n){const s=us(e,n);let{transitionEnd:i={},transition:a={},...u}=s||{};u={...u,...i};for(const c in u){const f=kP(u[c]);SP(e,c,f)}}const ut=e=>!!(e&&e.getVelocity);function EP(e){return!!(ut(e)&&e.add)}function Jd(e,n){const s=e.getValue("willChange");if(EP(s))return s.add(n);if(!s&&Wn.WillChange){const i=new Wn.WillChange("auto");e.addValue("willChange",i),i.add(n)}}function Zf(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}const TP="framerAppearId",u1="data-"+Zf(TP);function c1(e){return e.props[u1]}const PP=typeof window<"u";function NP({protectedKeys:e,needsAnimating:n},s){const i=s in e&&!n[s];return n[s]=!1,i}function d1(e,n,{delay:s=0,transitionOverride:i,type:a}={}){var C;let{transition:u,transitionEnd:c,...f}=n;const p=e.getDefaultTransition();u=u?s1(u,p):p;const y=u==null?void 0:u.reduceMotion,g=u==null?void 0:u.skipAnimations;i&&(u=i);const v=[],x=a&&((C=e.animationState)==null?void 0:C.getState()[a]),k=u==null?void 0:u.path;k&&k.animateVisualElement(e,f,u,s,v);for(const T in f){const E=e.getValue(T,e.latestValues[T]??null),j=f[T];if(j===void 0||x&&NP(x,T))continue;const I={delay:s,...Yf(u||{},T)};g&&(I.skipAnimations=!0);const R=E.get();if(R!==void 0&&!E.isAnimating()&&!Array.isArray(j)&&j===R&&!I.velocity){De.update(()=>E.set(j));continue}let O=!1;if(PP&&window.MotionHandoffAnimation){const A=c1(e);if(A){const _=window.MotionHandoffAnimation(A,T,De);_!==null&&(I.startTime=_,O=!0)}}Jd(e,T);const F=y??e.shouldReduceMotion;E.start(Xf(T,E,j,F&&l1.has(T)?{type:!1}:I,e,O));const U=E.animation;U&&v.push(U)}if(c){const T=()=>De.update(()=>{c&&CP(e,c)});v.length?Promise.all(v).then(T):T()}return v}function ef(e,n,s={}){const i=us(e,n,a1(e,s.type)),a=s.transitionOverride||((i==null?void 0:i.transition)??(e.getDefaultTransition()||{})),u=()=>Promise.all(i?d1(e,i,s):[]),c=(p=0)=>{const{variantChildren:y}=e,{delayChildren:g=0,staggerChildren:v,staggerDirection:x}=a,k=[];return y==null||y.forEach(C=>{C.notify("AnimationStart",n),k.push(ef(C,n,{...s,delay:p+(typeof g=="function"?0:g)+r1(y,C,g,v,x)}).then(()=>C.notify("AnimationComplete",n)))}),Promise.all(k)},{when:f}=a;return f?f==="beforeChildren"?u().then(()=>c()):c().then(u):Promise.all([u(),c(s.delay)])}function jP(e,n,s={}){return e.notify("AnimationStart",n),(Array.isArray(n)?Promise.all(n.map(a=>ef(e,a,s))):typeof n=="string"?ef(e,n,s):Promise.all(d1(e,us(e,n,s.custom),s))).then(()=>{e.notify("AnimationComplete",n)})}const bP={test:e=>e==="auto",parse:e=>e},RP=e=>n=>n.test(e),MP=[yi,ie,jn,Vn,U2,$2,bP],fg=e=>MP.find(RP(e));function DP(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Of(e):!0}const AP=new Set(["auto","none","0"]);function LP(e,n,s){let i=0,a;for(;i<e.length&&!a;){const u=e[i];typeof u=="string"&&!AP.has(u)&&q2(u)&&(a=e[i]),i++}if(a&&s)for(const u of n)e[u]!==a&&(e[u]=qf(s,a))}class IP extends Gf{constructor(n,s,i,a,u){super(n,s,i,a,u,!0)}readKeyframes(){const{unresolvedKeyframes:n,element:s,name:i}=this;if(!s||!s.current)return;super.readKeyframes();for(let g=0;g<n.length;g++){let v=n[g];if(typeof v=="string"&&(v=v.trim(),zf(v))){const x=i1(v,s.current);x!==void 0&&(n[g]=x),g===n.length-1&&(this.finalKeyframe=v)}}if(this.resolveNoneKeyframes(),!l1.has(i)||n.length!==2)return;const[a,u]=n;if(typeof a=="number"&&typeof u=="number")return;const c=fg(a),f=fg(u),p=Yy(a),y=Yy(u);if(p!==y&&as[i]){this.needsMeasurement=!0;return}if(c!==f)if(og(c)&&og(f))for(let g=0;g<n.length;g++){const v=n[g];typeof v=="string"&&(n[g]=parseFloat(v))}else as[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:n,name:s}=this,i=[];for(let a=0;a<n.length;a++)(n[a]===null||DP(n[a]))&&i.push(a);i.length&&LP(n,i,s)}measure(){const{element:n,name:s}=this;return as[s](window.getComputedStyle(n.current),()=>n.measureViewportBox())}measureInitialState(){var u;const{element:n,unresolvedKeyframes:s,name:i}=this;if(!n||!n.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),s[0]=this.measuredOrigin;const a=s[s.length-1];a!==void 0&&((u=this.motionValue)==null||u.jump(a,!1))}measureEndState(){var u,c;const{element:n,unresolvedKeyframes:s}=this;if(!n||!n.current)return;(u=this.motionValue)==null||u.jump(this.measuredOrigin,!1);const i=s.length-1,a=s[i];s[i]=this.measure(),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(c=this.removedTransforms)!=null&&c.length&&this.removedTransforms.forEach(([f,p])=>{n.getValue(f).set(p)}),this.resolveNoneKeyframes()}}const Jf=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function dl(e){return vx(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}function eh(e){return vx(e)&&"ownerSVGElement"in e}const tf=(e,n)=>n&&typeof e=="number"?n.transform(e):e;function f1(e,n,s){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const a=(s==null?void 0:s[e])??i.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e).filter(i=>i!=null)}const OP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},FP=gi.length;function _P(e,n,s){let i="",a=!0;for(let c=0;c<FP;c++){const f=gi[c],p=e[f];if(p===void 0)continue;let y=!0;if(typeof p=="number")y=p===(f.startsWith("scale")?1:0);else{const g=parseFloat(p);y=f.startsWith("scale")?g===1:g===0}if(!y||s){const g=tf(p,Nl[f]);if(!y){a=!1;const v=OP[f]||f;i+=`${v}(${g}) `}s&&(n[f]=g)}}const u=e.pathRotation;return u&&(a=!1,i+=`rotate(${tf(u,Nl.pathRotation)}) `),i=i.trim(),s?i=s(n,a?"":i):a&&(i="none"),i}function th(e,n,s){const{style:i,vars:a,transformOrigin:u}=e;let c=!1,f=!1;for(const p in n){const y=n[p];if(jr.has(p)){c=!0;continue}else if(Mx(p)){a[p]=y;continue}else{const g=tf(y,Nl[p]);p.startsWith("origin")?(f=!0,u[p]=g):i[p]=g}}if(n.transform||(c||s?i.transform=_P(n,e.transform,s):i.transform&&(i.transform="none")),f){const{originX:p="50%",originY:y="50%",originZ:g=0}=u;i.transformOrigin=`${p} ${y} ${g}`}}const VP={offset:"stroke-dashoffset",array:"stroke-dasharray"},zP={offset:"strokeDashoffset",array:"strokeDasharray"};function $P(e,n,s=1,i=0,a=!0){e.pathLength=1;const u=a?VP:zP;e[u.offset]=`${-i}`,e[u.array]=`${n} ${s}`}const h1=["transform","opacity","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function p1(e,{attrX:n,attrY:s,attrScale:i,pathLength:a,pathSpacing:u=1,pathOffset:c=0,...f},p,y,g){if(th(e,f,y),p){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:v,style:x}=e;for(const k of h1)v[k]!==void 0&&(x[k]=v[k],delete v[k]);(x.transform||v.transformOrigin)&&(x.transformOrigin=v.transformOrigin??"50% 50%",delete v.transformOrigin),x.transform&&(x.transformBox=(g==null?void 0:g.transformBox)??"fill-box",delete v.transformBox),n!==void 0&&(v.x=n),s!==void 0&&(v.y=s),i!==void 0&&(v.scale=i),a!==void 0&&$P(v,a,u,c,!1)}function m1({top:e,left:n,right:s,bottom:i}){return{x:{min:n,max:s},y:{min:e,max:i}}}function UP({x:e,y:n}){return{top:n.min,right:e.max,bottom:n.max,left:e.min}}function BP(e,n){if(!n)return e;const s=n({x:e.left,y:e.top}),i=n({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:i.y,right:i.x}}function id(e){return e===void 0||e===1}function nf({scale:e,scaleX:n,scaleY:s}){return!id(e)||!id(n)||!id(s)}function qr(e){return nf(e)||y1(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function y1(e){return hg(e.x)||hg(e.y)}function hg(e){return e&&e!=="0%"}function jl(e,n,s){const i=e-s,a=n*i;return s+a}function pg(e,n,s,i,a){return a!==void 0&&(e=jl(e,a,i)),jl(e,s,i)+n}function rf(e,n=0,s=1,i,a){e.min=pg(e.min,n,s,i,a),e.max=pg(e.max,n,s,i,a)}function g1(e,{x:n,y:s}){rf(e.x,n.translate,n.scale,n.originPoint),rf(e.y,s.translate,s.scale,s.originPoint)}const mg=.999999999999,yg=1.0000000000001;function HP(e,n,s,i=!1){var f;const a=s.length;if(!a)return;n.x=n.y=1;let u,c;for(let p=0;p<a;p++){u=s[p],c=u.projectionDelta;const{visualElement:y}=u.options;y&&y.props.style&&y.props.style.display==="contents"||(i&&u.options.layoutScroll&&u.scroll&&u!==u.root&&(Tn(e.x,-u.scroll.offset.x),Tn(e.y,-u.scroll.offset.y)),c&&(n.x*=c.x.scale,n.y*=c.y.scale,g1(e,c)),i&&qr(u.latestValues)&&fl(e,u.latestValues,(f=u.layout)==null?void 0:f.layoutBox))}n.x<yg&&n.x>mg&&(n.x=1),n.y<yg&&n.y>mg&&(n.y=1)}function Tn(e,n){e.min+=n,e.max+=n}function gg(e,n,s,i,a=.5){const u=Me(e.min,e.max,a);rf(e,n,s,u,i)}function vg(e,n){return typeof e=="string"?parseFloat(e)/100*(n.max-n.min):e}function fl(e,n,s){const i=s??e;gg(e.x,vg(n.x,i.x),n.scaleX,n.scale,n.originX),gg(e.y,vg(n.y,i.y),n.scaleY,n.scale,n.originY)}function v1(e,n){return m1(BP(e.getBoundingClientRect(),n))}function KP(e,n,s){const i=v1(e,s),{scroll:a}=n;return a&&(Tn(i.x,a.offset.x),Tn(i.y,a.offset.y)),i}const{schedule:nh}=Vx(queueMicrotask,!1),sn={x:!1,y:!1};function x1(){return sn.x||sn.y}function WP(e){return e==="x"||e==="y"?sn[e]?null:(sn[e]=!0,()=>{sn[e]=!1}):sn.x||sn.y?null:(sn.x=sn.y=!0,()=>{sn.x=sn.y=!1})}function w1(e,n){const s=f1(e),i=new AbortController,a={passive:!0,...n,signal:i.signal};return[s,a,()=>i.abort()]}function QP(e){return!(e.pointerType==="touch"||x1())}function qP(e,n,s={}){const[i,a,u]=w1(e,s);return i.forEach(c=>{let f=!1,p=!1,y;const g=()=>{c.removeEventListener("pointerleave",C)},v=E=>{y&&(y(E),y=void 0),g()},x=E=>{f=!1,window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x),p&&(p=!1,v(E))},k=()=>{f=!0,window.addEventListener("pointerup",x,a),window.addEventListener("pointercancel",x,a)},C=E=>{if(E.pointerType!=="touch"){if(f){p=!0;return}v(E)}},T=E=>{if(!QP(E))return;p=!1;const j=n(c,E);typeof j=="function"&&(y=j,c.addEventListener("pointerleave",C,a))};c.addEventListener("pointerenter",T,a),c.addEventListener("pointerdown",k,a)}),u}const S1=(e,n)=>n?e===n?!0:S1(e,n.parentElement):!1,rh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,GP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function YP(e){return GP.has(e.tagName)||e.isContentEditable===!0}const XP=new Set(["INPUT","SELECT","TEXTAREA"]);function ZP(e){return XP.has(e.tagName)||e.isContentEditable===!0}const hl=new WeakSet;function xg(e){return n=>{n.key==="Enter"&&e(n)}}function od(e,n){e.dispatchEvent(new PointerEvent("pointer"+n,{isPrimary:!0,bubbles:!0}))}const JP=(e,n)=>{const s=e.currentTarget;if(!s)return;const i=xg(()=>{if(hl.has(s))return;od(s,"down");const a=xg(()=>{od(s,"up")}),u=()=>od(s,"cancel");s.addEventListener("keyup",a,n),s.addEventListener("blur",u,n)});s.addEventListener("keydown",i,n),s.addEventListener("blur",()=>s.removeEventListener("keydown",i),n)};function wg(e){return rh(e)&&!x1()}const Sg=new WeakSet;function eN(e,n,s={}){const[i,a,u]=w1(e,s),c=f=>{const p=f.currentTarget;if(!wg(f)||Sg.has(f))return;hl.add(p),s.stopPropagation&&Sg.add(f);const y=n(p,f),g={...a,capture:!0},v=(C,T)=>{window.removeEventListener("pointerup",x,g),window.removeEventListener("pointercancel",k,g),hl.has(p)&&hl.delete(p),wg(C)&&typeof y=="function"&&y(C,{success:T})},x=C=>{v(C,p===window||p===document||s.useGlobalTarget||S1(p,C.target))},k=C=>{v(C,!1)};window.addEventListener("pointerup",x,g),window.addEventListener("pointercancel",k,g)};return i.forEach(f=>{(s.useGlobalTarget?window:f).addEventListener("pointerdown",c,a),dl(f)&&(f.addEventListener("focus",y=>JP(y,a)),!YP(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),u}const pl=new WeakMap;let gr;const k1=(e,n,s)=>(i,a)=>a&&a[0]?a[0][e+"Size"]:eh(i)&&"getBBox"in i?i.getBBox()[n]:i[s],tN=k1("inline","width","offsetWidth"),nN=k1("block","height","offsetHeight");function rN({target:e,borderBoxSize:n}){var s;(s=pl.get(e))==null||s.forEach(i=>{i(e,{get width(){return tN(e,n)},get height(){return nN(e,n)}})})}function sN(e){e.forEach(rN)}function iN(){typeof ResizeObserver>"u"||(gr=new ResizeObserver(sN))}function oN(e,n){gr||iN();const s=f1(e);return s.forEach(i=>{let a=pl.get(i);a||(a=new Set,pl.set(i,a)),a.add(n),gr==null||gr.observe(i)}),()=>{s.forEach(i=>{const a=pl.get(i);a==null||a.delete(n),a!=null&&a.size||gr==null||gr.unobserve(i)})}}const ml=new Set;let Us;function aN(){Us=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ml.forEach(n=>n(e))},window.addEventListener("resize",Us)}function lN(e){return ml.add(e),Us||aN(),()=>{ml.delete(e),!ml.size&&typeof Us=="function"&&(window.removeEventListener("resize",Us),Us=void 0)}}function kg(e,n){return typeof e=="function"?lN(e):oN(e,n)}function uN(e){return eh(e)&&e.tagName==="svg"}const Cg=e=>typeof e=="number"?e:parseFloat(e),Eg=()=>({translate:0,scale:1,origin:0,originPoint:0}),Bs=()=>({x:Eg(),y:Eg()}),Tg=()=>({min:0,max:0}),Ze=()=>({x:Tg(),y:Tg()}),cN=new WeakMap;function zl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ko(e){return typeof e=="string"||Array.isArray(e)}const sh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Pg=["initial",...sh];function $l(e){if(zl(e.animate))return!0;for(let n=0;n<Pg.length;n++)if(ko(e[Pg[n]]))return!0;return!1}function C1(e){return!!($l(e)||e.variants)}function dN(e,n,s){for(const i in n){const a=n[i],u=s[i];if(ut(a))e.addValue(i,a);else if(ut(u))e.addValue(i,ai(a,{owner:e}));else if(u!==a)if(e.hasValue(i)){const c=e.getValue(i);c.liveStyle===!0?c.jump(a):c.hasAnimated||c.set(a)}else{const c=e.getStaticValue(i);e.addValue(i,ai(c!==void 0?c:a,{owner:e}))}}for(const i in s)n[i]===void 0&&e.removeValue(i);return n}const bl={current:null},ih={current:!1},fN=typeof window<"u";function E1(){if(ih.current=!0,!!fN)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),n=()=>bl.current=e.matches;e.addEventListener("change",n),n()}else bl.current=!1}const Ng=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Rl={};function T1(e){Rl=e}function hN(){return Rl}class pN{scrapeMotionValuesFromProps(n,s,i){return{}}constructor({parent:n,props:s,presenceContext:i,reducedMotionConfig:a,skipAnimations:u,blockInitialAnimation:c,visualState:f},p={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Gf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 k=lt.now();this.renderScheduledAt<k&&(this.renderScheduledAt=k,De.render(this.render,!1,!0))};const{latestValues:y,renderState:g}=f;this.latestValues=y,this.baseTarget={...y},this.initialValues=s.initial?{...y}:{},this.renderState=g,this.parent=n,this.props=s,this.presenceContext=i,this.depth=n?n.depth+1:0,this.reducedMotionConfig=a,this.skipAnimationsConfig=u,this.options=p,this.blockInitialAnimation=!!c,this.isControllingVariants=$l(s),this.isVariantNode=C1(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(n&&n.current);const{willChange:v,...x}=this.scrapeMotionValuesFromProps(s,{},this);for(const k in x){const C=x[k];y[k]!==void 0&&ut(C)&&C.set(y[k])}}mount(n){var s,i;if(this.hasBeenMounted)for(const a in this.initialValues)(s=this.values.get(a))==null||s.jump(this.initialValues[a]),this.latestValues[a]=this.initialValues[a];if(this.current=n,cN.set(n,this),this.projection&&!this.projection.instance&&this.projection.mount(n),this.isVariantNode&&!this.isControllingVariants){let a=this;do a=a.props.inherit!==!1&&a.parent;while(a&&!a.isVariantNode);if(a){const{variantChildren:u}=a;u.add(this),this.removeFromVariantTree=()=>u.delete(this)}}this.values.forEach((a,u)=>this.bindToMotionValue(u,a)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ih.current||E1(),this.shouldReduceMotion=bl.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var n;this.projection&&this.projection.unmount(),br(this.notifyUpdate),br(this.render),this.valueSubscriptions.forEach(s=>s()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(n=this.parent)==null||n.removeChild(this);for(const s in this.events)this.events[s].clear();for(const s in this.features){const i=this.features[s];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(n){this.children.add(n),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(n)}removeChild(n){this.children.delete(n),this.enteringChildren&&this.enteringChildren.delete(n)}bindToMotionValue(n,s){if(this.valueSubscriptions.has(n)&&this.valueSubscriptions.get(n)(),s.accelerate&&Zd.has(n)&&this.current instanceof HTMLElement){const{factory:c,keyframes:f,times:p,ease:y,duration:g}=s.accelerate,v=new t1({element:this.current,name:n,keyframes:f,times:p,ease:y,duration:Wt(g)}),x=c(v);this.valueSubscriptions.set(n,()=>{x(),v.cancel()});return}const i=jr.has(n);i&&this.onBindTransform&&this.onBindTransform();const a=s.on("change",c=>{this.latestValues[n]=c,this.props.onUpdate&&De.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let u;typeof window<"u"&&window.MotionCheckAppearSync&&(u=window.MotionCheckAppearSync(this,n,s)),this.valueSubscriptions.set(n,()=>{a(),u&&u()})}sortNodePosition(n){return!this.current||!n.current||!this.sortInstanceNodePosition||this.type!==n.type?0:this.sortInstanceNodePosition(this.current,n.current)}updateFeatures(){let n="animation";for(n in Rl){const s=Rl[n];if(!s)continue;const{isEnabled:i,Feature:a}=s;if(!this.features[n]&&a&&i(this.props)&&(this.features[n]=new a(this)),this.features[n]){const u=this.features[n];u.isMounted?u.update():(u.mount(),u.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ze()}getStaticValue(n){return this.latestValues[n]}setStaticValue(n,s){this.latestValues[n]=s}update(n,s){(n.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=n,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let i=0;i<Ng.length;i++){const a=Ng[i];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const u="on"+a,c=n[u];c&&(this.propEventSubscriptions[a]=this.on(a,c))}this.prevMotionValues=dN(this,this.scrapeMotionValuesFromProps(n,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(n){return this.props.variants?this.props.variants[n]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(n,s){const i=this.values.get(n);if(s!==i){i&&this.removeValue(n),this.bindToMotionValue(n,s),this.values.set(n,s);const a=s.get();a!==void 0&&(this.latestValues[n]=a)}}removeValue(n){this.values.delete(n);const s=this.valueSubscriptions.get(n);s&&(s(),this.valueSubscriptions.delete(n)),delete this.latestValues[n],this.removeValueFromRenderState(n,this.renderState)}hasValue(n){return this.values.has(n)}getValue(n,s){var a;if(this.props.values&&this.props.values[n])return this.props.values[n];let i=this.values.get(n);return i===void 0&&s!==void 0&&(i=ai(s??((a=this.getDefaultValue)==null?void 0:a.call(this,n)),{owner:this}),this.addValue(n,i)),i}readValue(n,s){let i=this.latestValues[n]!==void 0||!this.current?this.latestValues[n]:this.getBaseTargetFromProps(this.props,n)??this.readValueFromInstance(this.current,n,this.options);return i!=null&&(typeof i=="string"&&(If(i)||Of(i))?i=parseFloat(i):typeof i!="number"&&!It.test(i)&&It.test(s)&&(i=qf(n,s)),this.setBaseTarget(n,ut(i)?i.get():i)),ut(i)?i.get():i}setBaseTarget(n,s){this.baseTarget[n]=s}on(n,s){return this.events[n]||(this.events[n]=new Cl),this.events[n].add(s)}notify(n,...s){this.events[n]&&this.events[n].notify(...s)}scheduleRenderMicrotask(){nh.render(this.render)}}class P1 extends pN{constructor(){super(...arguments),this.KeyframeResolver=IP}sortInstanceNodePosition(n,s){return n.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(n,s){const i=n.style;return i?i[s]:void 0}removeValueFromRenderState(n,{vars:s,style:i}){delete s[n],delete i[n]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:n}=this.props;ut(n)&&(this.childSubscription=n.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}class Mr{constructor(n){this.isMounted=!1,this.node=n}update(){}}function N1(e,{style:n,vars:s},i,a){const u=e.style;let c;for(c in n)u[c]=n[c];a==null||a.applyProjectionStyles(u,i);for(c in s)u.setProperty(c,s[c])}const Co={};function j1(e,{layout:n,layoutId:s}){return jr.has(e)||e.startsWith("origin")||(n||s!==void 0)&&(!!Co[e]||e==="opacity")}function oh(e,n,s){var c;const i=e.style,a=n==null?void 0:n.style,u={};if(!i)return u;for(const f in i)(ut(i[f])||a&&ut(a[f])||j1(f,e)||((c=s==null?void 0:s.getValue(f))==null?void 0:c.liveStyle)!==void 0)&&(u[f]=i[f]);return u}function mN(e){return window.getComputedStyle(e)}class yN extends P1{constructor(){super(...arguments),this.type="html",this.renderInstance=N1}mount(n){_l(!!n.style),super.mount(n)}readValueFromInstance(n,s){var i;if(jr.has(s))return(i=this.projection)!=null&&i.isProjecting?So(s):_T(n,s);{const a=mN(n),u=(Mx(s)?a.getPropertyValue(s):a[s])||0;return typeof u=="string"?u.trim():u}}measureInstanceViewportBox(n,{transformPagePoint:s}){return v1(n,s)}build(n,s,i){th(n,s,i.transformTemplate)}scrapeMotionValuesFromProps(n,s,i){return oh(n,s,i)}}const b1=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"]),R1=e=>typeof e=="string"&&e.toLowerCase()==="svg";function gN(e,n,s,i){N1(e,n,void 0,i);for(const a in n.attrs)e.setAttribute(b1.has(a)?a:Zf(a),n.attrs[a])}function M1(e,n,s){const i=oh(e,n,s);for(const a in e)if(ut(e[a])||ut(n[a])){const u=gi.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;i[u]=e[a]}return i}class vN extends P1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ze}getBaseTargetFromProps(n,s){return jr.has(s)?super.getBaseTargetFromProps(n,s)??So(s):n[s]}getDefaultValue(n){return jr.has(n)?this.latestValues[n]??So(n):void 0}readValueFromInstance(n,s){if(jr.has(s)){const i=Qx(s);return i&&i.default||0}if(h1.includes(s)){const a=getComputedStyle(n)[s];if(typeof a=="string"&&a)return a.trim()}return s=b1.has(s)?s:Zf(s),n.getAttribute(s)}scrapeMotionValuesFromProps(n,s,i){return M1(n,s,i)}build(n,s,i){p1(n,s,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(n,s,i,a){gN(n,s,i,a)}mount(n){this.isSVGTag=R1(n.tagName),super.mount(n)}}function D1(e,n){if(!Array.isArray(n))return!1;const s=n.length;if(s!==e.length)return!1;for(let i=0;i<s;i++)if(n[i]!==e[i])return!1;return!0}const xN=[...sh].reverse();function wN(e){let n=f=>Promise.all(f.map(({animation:p,options:y})=>jP(e,p,y))),s=jg(),i=!0,a=!1;function u(f){var I;const{props:p,parent:y,manuallyAnimateOnMount:g}=e,v=i||a,x=[],k=new Set;let C={},T=1/0,E=e;do E=E.props.inherit!==!1&&E.parent;while(E&&!E.isControllingVariants);if(xN.forEach((R,O)=>{var Z,le;const F=s[R],U=p[R],A=E&&E.props[R],_=U!==void 0?U:ko(A)||A===!1?A:void 0,B=ko(_),Y=R===f?F.isActive:null;Y===!1&&(T=O);const ne=B&&U===void 0&&!(v&&g);if(F.protectedKeys={...C},!F.isActive&&Y===null||!_&&!F.prevProp||zl(_)||typeof _=="boolean")return;if(R==="exit"&&F.isActive&&Y!==!0){C={...C,...F.prevResolvedValues};return}const G=SN(F.prevProp,_);let X=G||B&&(Y&&!ne||O>T),fe=!1;const Se=Array.isArray(_)?_:[_];let ge={};if(Y!==!1)for(const q of Se){const{transition:L,transitionEnd:D,...ee}=us(e,q,a1(e,R))||{};ge={...ge,...ee,...D}}const{prevResolvedValues:ke}=F;for(const q in{...ke,...ge}){if(q in C)continue;const L=ge[q],D=ke[q],ee=Array.isArray(L)&&Array.isArray(D)?!D1(L,D)||G:L!==D;if(ee&&L==null)k.add(q);else if(ee||L!==void 0&&k.has(q)){X=!0,k.delete(q)&&(fe=!0),F.needsAnimating[q]=!0;const ye=e.getValue(q);ye&&(ye.liveStyle=!1)}else F.protectedKeys[q]=!0}if(F.prevProp=_,F.prevResolvedValues=ge,F.isActive&&(C={...C,...ge}),X&&(!(ne&&G)||fe))for(const q of Se){const L={type:R};if(typeof q=="string"&&v&&g&&(y!=null&&y.enteringChildren)){const D=(le=(Z=us(y,q))==null?void 0:Z.transition)==null?void 0:le.delayChildren;L.delay=r1(y.enteringChildren,e,D)}x.push({animation:q,options:L})}}),k.size){const{initial:R}=p,O={},F=typeof R!="boolean"&&us(e,Array.isArray(R)?R[0]:R,(I=e.presenceContext)==null?void 0:I.custom);F&&F.transition&&(O.transition=F.transition),k.forEach(U=>{const A=e.getValue(U);A&&(A.liveStyle=!0);const _=F&&!Array.isArray(R)?F[U]:void 0,B=e.getBaseTargetFromProps(p,U);O[U]=(_!==void 0?_:B!==void 0&&!ut(B)?B:e.initialValues[U]===void 0?e.baseTarget[U]:void 0)??null}),x.push({animation:O})}const j=v&&e.blockInitialAnimation||i&&!g&&(p.initial===!1||p.initial===p.animate);return i=a=!1,!j&&x.length?n(x):Promise.resolve()}function c(f,p){var g;if(s[f].isActive===p)return Promise.resolve();(g=e.variantChildren)==null||g.forEach(v=>{var x;return(x=v.animationState)==null?void 0:x.setActive(f,p)}),s[f].isActive=p;const y=u(f);for(const v in s)s[v].protectedKeys={};return y}return{animateChanges:u,setActive:c,setAnimateFunction:f=>{n=f(e)},getState:()=>s,reset:()=>{s=jg(),a=!0}}}function SN(e,n){return typeof n=="string"?n!==e:Array.isArray(n)?!D1(n,e):!1}function jg(){const e={};for(const n of sh)e[n]={isActive:n==="animate",protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}function sf(e,n){e.min=n.min,e.max=n.max}function nn(e,n){sf(e.x,n.x),sf(e.y,n.y)}function bg(e,n){e.translate=n.translate,e.scale=n.scale,e.originPoint=n.originPoint,e.origin=n.origin}const A1=1e-4,kN=1-A1,CN=1+A1,L1=.01,EN=0-L1,TN=0+L1;function St(e){return e.max-e.min}function PN(e,n,s){return Math.abs(e-n)<=s}function Rg(e,n,s,i=.5){e.origin=i,e.originPoint=Me(n.min,n.max,e.origin),e.scale=St(s)/St(n),e.translate=Me(s.min,s.max,e.origin)-e.originPoint,(e.scale>=kN&&e.scale<=CN||isNaN(e.scale))&&(e.scale=1),(e.translate>=EN&&e.translate<=TN||isNaN(e.translate))&&(e.translate=0)}function po(e,n,s,i){Rg(e.x,n.x,s.x,i?i.originX:void 0),Rg(e.y,n.y,s.y,i?i.originY:void 0)}function Mg(e,n,s,i=0){const a=i?Me(s.min,s.max,i):s.min;e.min=a+n.min,e.max=e.min+St(n)}function NN(e,n,s,i){Mg(e.x,n.x,s.x,i==null?void 0:i.x),Mg(e.y,n.y,s.y,i==null?void 0:i.y)}function Dg(e,n,s,i=0){const a=i?Me(s.min,s.max,i):s.min;e.min=n.min-a,e.max=e.min+St(n)}function Ml(e,n,s,i){Dg(e.x,n.x,s.x,i==null?void 0:i.x),Dg(e.y,n.y,s.y,i==null?void 0:i.y)}function Ag(e,n,s,i,a){return e-=n,e=jl(e,1/s,i),a!==void 0&&(e=jl(e,1/a,i)),e}function jN(e,n=0,s=1,i=.5,a,u=e,c=e){if(jn.test(n)&&(n=parseFloat(n),n=Me(c.min,c.max,n/100)-c.min),typeof n!="number")return;let f=Me(u.min,u.max,i);e===u&&(f-=n),e.min=Ag(e.min,n,s,f,a),e.max=Ag(e.max,n,s,f,a)}function Lg(e,n,[s,i,a],u,c){jN(e,n[s],n[i],n[a],n.scale,u,c)}const bN=["x","scaleX","originX"],RN=["y","scaleY","originY"];function Ig(e,n,s,i){Lg(e.x,n,bN,s?s.x:void 0,i?i.x:void 0),Lg(e.y,n,RN,s?s.y:void 0,i?i.y:void 0)}function Og(e){return e.translate===0&&e.scale===1}function I1(e){return Og(e.x)&&Og(e.y)}function Fg(e,n){return e.min===n.min&&e.max===n.max}function MN(e,n){return Fg(e.x,n.x)&&Fg(e.y,n.y)}function _g(e,n){return Math.round(e.min)===Math.round(n.min)&&Math.round(e.max)===Math.round(n.max)}function O1(e,n){return _g(e.x,n.x)&&_g(e.y,n.y)}function Vg(e){return St(e.x)/St(e.y)}function zg(e,n){return e.translate===n.translate&&e.scale===n.scale&&e.originPoint===n.originPoint}function Sn(e){return[e("x"),e("y")]}function $g(e,n){return n.max===n.min?0:e/(n.max-n.min)*100}const ao={correct:(e,n)=>{if(!n.target)return e;if(typeof e=="string")if(ie.test(e))e=parseFloat(e);else return e;const s=$g(e,n.target.x),i=$g(e,n.target.y);return`${s}% ${i}%`}},DN={correct:(e,{treeScale:n,projectionDelta:s})=>{const i=e,a=It.parse(e);if(a.length>5)return i;const u=It.createTransformer(e),c=typeof a[0]!="number"?1:0,f=s.x.scale*n.x,p=s.y.scale*n.y;a[0+c]/=f,a[1+c]/=p;const y=Me(f,p,.5);return typeof a[2+c]=="number"&&(a[2+c]/=y),typeof a[3+c]=="number"&&(a[3+c]/=y),u(a)}};function AN(e,n,s){let i="";const a=e.x.translate/n.x,u=e.y.translate/n.y,c=(s==null?void 0:s.z)||0;if((a||u||c)&&(i=`translate3d(${a}px, ${u}px, ${c}px) `),(n.x!==1||n.y!==1)&&(i+=`scale(${1/n.x}, ${1/n.y}) `),s){const{transformPerspective:y,rotate:g,pathRotation:v,rotateX:x,rotateY:k,skewX:C,skewY:T}=s;y&&(i=`perspective(${y}px) ${i}`),g&&(i+=`rotate(${g}deg) `),v&&(i+=`rotate(${v}deg) `),x&&(i+=`rotateX(${x}deg) `),k&&(i+=`rotateY(${k}deg) `),C&&(i+=`skewX(${C}deg) `),T&&(i+=`skewY(${T}deg) `)}const f=e.x.scale*n.x,p=e.y.scale*n.y;return(f!==1||p!==1)&&(i+=`scale(${f}, ${p})`),i||"none"}const LN=Jf.length,Ug=e=>typeof e=="number"||ie.test(e);function IN(e,n,s,i,a,u){a?(e.opacity=Me(0,s.opacity??1,ON(i)),e.opacityExit=Me(n.opacity??1,0,FN(i))):u&&(e.opacity=Me(n.opacity??1,s.opacity??1,i));for(let c=0;c<LN;c++){const f=Jf[c];let p=Bg(n,f),y=Bg(s,f);if(p===void 0&&y===void 0)continue;p||(p=0),y||(y=0),p===0||y===0||Ug(p)===Ug(y)?(e[f]=Math.max(Me(Cg(p),Cg(y),i),0),(jn.test(y)||jn.test(p))&&(e[f]+="%")):e[f]=y}(n.rotate||s.rotate)&&(e.rotate=Me(n.rotate||0,s.rotate||0,i))}function Bg(e,n){return e[n]!==void 0?e[n]:e.borderRadius}const ON=F1(0,.5,Nx),FN=F1(.5,.95,dn);function F1(e,n,s){return i=>i<e?0:i>n?1:s(vo(e,n,i))}function _N(e,n,s){const i=ut(e)?e:ai(e);return i.start(Xf("",i,n,s)),i.animation}function Eo(e,n,s,i={passive:!0}){return e.addEventListener(n,s,i),()=>e.removeEventListener(n,s,i)}const VN=(e,n)=>e.depth-n.depth;class zN{constructor(){this.children=[],this.isDirty=!1}add(n){Lf(this.children,n),this.isDirty=!0}remove(n){kl(this.children,n),this.isDirty=!0}forEach(n){this.isDirty&&this.children.sort(VN),this.isDirty=!1,this.children.forEach(n)}}function $N(e,n){const s=lt.now(),i=({timestamp:a})=>{const u=a-s;u>=n&&(br(i),e(u-n))};return De.setup(i,!0),()=>br(i)}function yl(e){return ut(e)?e.get():e}class UN{constructor(){this.members=[]}add(n){Lf(this.members,n);for(let s=this.members.length-1;s>=0;s--){const i=this.members[s];if(i===n||i===this.lead||i===this.prevLead)continue;const a=i.instance;(!a||a.isConnected===!1)&&!i.snapshot&&(kl(this.members,i),i.unmount())}n.scheduleRender()}remove(n){if(kl(this.members,n),n===this.prevLead&&(this.prevLead=void 0),n===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(n){var s;for(let i=this.members.indexOf(n)-1;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1&&((s=a.instance)==null?void 0:s.isConnected)!==!1)return this.promote(a),!0}return!1}promote(n,s){var a;const i=this.lead;if(n!==i&&(this.prevLead=i,this.lead=n,n.show(),i)){i.updateSnapshot(),n.scheduleRender();const{layoutDependency:u}=i.options,{layoutDependency:c}=n.options;(u===void 0||u!==c)&&(n.resumeFrom=i,s&&(i.preserveOpacity=!0),i.snapshot&&(n.snapshot=i.snapshot,n.snapshot.latestValues=i.animationValues||i.latestValues),(a=n.root)!=null&&a.isUpdating&&(n.isLayoutDirty=!0)),n.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(n=>{var s,i,a,u,c;(i=(s=n.options).onExitComplete)==null||i.call(s),(c=(a=n.resumingFrom)==null?void 0:(u=a.options).onExitComplete)==null||c.call(u)})}scheduleRender(){this.members.forEach(n=>n.instance&&n.scheduleRender(!1))}removeLeadSnapshot(){var n;(n=this.lead)!=null&&n.snapshot&&(this.lead.snapshot=void 0)}}const BN={borderRadius:{...ao,applyTo:[...Jf]},borderTopLeftRadius:ao,borderTopRightRadius:ao,borderBottomLeftRadius:ao,borderBottomRightRadius:ao,boxShadow:DN},gl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(Co,{...BN,...Co});const ad=["","X","Y","Z"],HN=1e3;let KN=0;function ld(e,n,s,i){const{latestValues:a}=n;a[e]&&(s[e]=a[e],n.setStaticValue(e,0),i&&(i[e]=0))}function _1(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:n}=e.options;if(!n)return;const s=c1(n);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:a,layoutId:u}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",De,!(a||u))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&_1(i)}function V1({attachResizeListener:e,defaultParent:n,measureScroll:s,checkIsScrollRoot:i,resetTransform:a}){return class{constructor(c={},f=n==null?void 0:n()){this.id=KN++,this.animationId=0,this.animationCommitId=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(qN),this.nodes.forEach(tj),this.nodes.forEach(nj),this.nodes.forEach(GN)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=c,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let p=0;p<this.path.length;p++)this.path[p].shouldResetTransform=!0;this.root===this&&(this.nodes=new zN)}addEventListener(c,f){return this.eventHandlers.has(c)||this.eventHandlers.set(c,new Cl),this.eventHandlers.get(c).add(f)}notifyListeners(c,...f){const p=this.eventHandlers.get(c);p&&p.notify(...f)}hasListeners(c){return this.eventHandlers.has(c)}mount(c){if(this.instance)return;this.isSVG=eh(c)&&!uN(c),this.instance=c;const{layoutId:f,layout:p,visualElement:y}=this.options;if(y&&!y.current&&y.mount(c),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(p||f)&&(this.isLayoutDirty=!0),e){let g,v=0;const x=()=>this.root.updateBlockedByResize=!1;De.read(()=>{v=window.innerWidth}),e(c,()=>{const k=window.innerWidth;k!==v&&(v=k,this.root.updateBlockedByResize=!0,g&&g(),g=$N(x,250),gl.hasAnimatedSinceResize&&(gl.hasAnimatedSinceResize=!1,this.nodes.forEach(Wg)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&y&&(f||p)&&this.addEventListener("didUpdate",({delta:g,hasLayoutChanged:v,hasRelativeLayoutChanged:x,layout:k})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const C=this.options.transition||y.getDefaultTransition()||aj,{onLayoutAnimationStart:T,onLayoutAnimationComplete:E}=y.getProps(),j=!this.targetLayout||!O1(this.targetLayout,k),I=!v&&x;if(this.options.layoutRoot||this.resumeFrom||I||v&&(j||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const R={...Yf(C,"layout"),onPlay:T,onComplete:E};(y.shouldReduceMotion||this.options.layoutRoot)&&(R.delay=0,R.type=!1),this.startAnimation(R),this.setAnimationOrigin(g,I,R.path)}else v||Wg(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=k})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const c=this.getStack();c&&c.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),br(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(rj),this.animationId++)}getTransformTemplate(){const{visualElement:c}=this.options;return c&&c.getProps().transformTemplate}willUpdate(c=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&_1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let g=0;g<this.path.length;g++){const v=this.path[g];v.shouldResetTransform=!0,(typeof v.latestValues.x=="string"||typeof v.latestValues.y=="string")&&(v.isLayoutDirty=!0),v.updateScroll("snapshot"),v.options.layoutRoot&&v.willUpdate(!1)}const{layoutId:f,layout:p}=this.options;if(f===void 0&&!p)return;const y=this.getTransformTemplate();this.prevTransformTemplateValue=y?y(this.latestValues,""):void 0,this.updateSnapshot(),c&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const p=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),p&&this.nodes.forEach(XN),this.nodes.forEach(Hg);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Kg);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(ZN),this.nodes.forEach(JN),this.nodes.forEach(ej),this.nodes.forEach(WN),this.nodes.forEach(QN)):this.nodes.forEach(Kg),this.clearAllSnapshots();const f=lt.now();Je.delta=Qn(0,1e3/60,f-Je.timestamp),Je.timestamp=f,Je.isProcessing=!0,td.update.process(Je),td.preRender.process(Je),td.render.process(Je),Je.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,nh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(YN),this.sharedNodes.forEach(sj)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,De.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){De.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!St(this.snapshot.measuredBox.x)&&!St(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 p=0;p<this.path.length;p++)this.path[p].updateScroll();const c=this.layout;this.layout=this.measure(!1),this.layoutCorrected||(this.layoutCorrected=Ze()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,c?c.layoutBox:void 0)}updateScroll(c="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===c&&(f=!1),f&&this.instance){const p=i(this.instance);this.scroll={animationId:this.root.animationId,phase:c,isRoot:p,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:p}}}resetTransform(){if(!a)return;const c=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!I1(this.projectionDelta),p=this.getTransformTemplate(),y=p?p(this.latestValues,""):void 0,g=y!==this.prevTransformTemplateValue;c&&this.instance&&(f||qr(this.latestValues)||g)&&(a(this.instance,y),this.shouldResetTransform=!1,this.scheduleRender())}measure(c=!0){const f=this.measurePageBox();let p=this.removeElementScroll(f);return c&&(p=this.removeTransform(p)),lj(p),{animationId:this.root.animationId,measuredBox:f,layoutBox:p,latestValues:{},source:this.id}}measurePageBox(){var y;const{visualElement:c}=this.options;if(!c)return Ze();const f=c.measureViewportBox();if(!(((y=this.scroll)==null?void 0:y.wasRoot)||this.path.some(uj))){const{scroll:g}=this.root;g&&(Tn(f.x,g.offset.x),Tn(f.y,g.offset.y))}return f}removeElementScroll(c){var p;const f=Ze();if(nn(f,c),(p=this.scroll)!=null&&p.wasRoot)return f;for(let y=0;y<this.path.length;y++){const g=this.path[y],{scroll:v,options:x}=g;g!==this.root&&v&&x.layoutScroll&&(v.wasRoot&&nn(f,c),Tn(f.x,v.offset.x),Tn(f.y,v.offset.y))}return f}applyTransform(c,f=!1,p){var g,v;const y=p||Ze();nn(y,c);for(let x=0;x<this.path.length;x++){const k=this.path[x];!f&&k.options.layoutScroll&&k.scroll&&k!==k.root&&(Tn(y.x,-k.scroll.offset.x),Tn(y.y,-k.scroll.offset.y)),qr(k.latestValues)&&fl(y,k.latestValues,(g=k.layout)==null?void 0:g.layoutBox)}return qr(this.latestValues)&&fl(y,this.latestValues,(v=this.layout)==null?void 0:v.layoutBox),y}removeTransform(c){var p;const f=Ze();nn(f,c);for(let y=0;y<this.path.length;y++){const g=this.path[y];if(!qr(g.latestValues))continue;let v;g.instance&&(nf(g.latestValues)&&g.updateSnapshot(),v=Ze(),nn(v,g.measurePageBox())),Ig(f,g.latestValues,(p=g.snapshot)==null?void 0:p.layoutBox,v)}return qr(this.latestValues)&&Ig(f,this.latestValues),f}setTargetDelta(c){this.targetDelta=c,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(c){this.options={...this.options,...c,crossfade:c.crossfade!==void 0?c.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!==Je.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(c=!1){var k;const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const p=!!this.resumingFrom||this!==f;if(!(c||p&&this.isSharedProjectionDirty||this.isProjectionDirty||(k=this.parent)!=null&&k.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:g,layoutId:v}=this.options;if(!this.layout||!(g||v))return;this.resolvedRelativeTargetAt=Je.timestamp;const x=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&x&&x.layout?this.createRelativeTarget(x,this.layout.layoutBox,x.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ze(),this.targetWithTransforms=Ze()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),NN(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):nn(this.target,this.layout.layoutBox),g1(this.target,this.targetDelta)):nn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?this.createRelativeTarget(x,this.target,x.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||nf(this.parent.latestValues)||y1(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(c,f,p){this.relativeParent=c,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ze(),this.relativeTargetOrigin=Ze(),Ml(this.relativeTargetOrigin,f,p,this.options.layoutAnchor||void 0),nn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var C;const c=this.getLead(),f=!!this.resumingFrom||this!==c;let p=!0;if((this.isProjectionDirty||(C=this.parent)!=null&&C.isProjectionDirty)&&(p=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(p=!1),this.resolvedRelativeTargetAt===Je.timestamp&&(p=!1),p)return;const{layout:y,layoutId:g}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(y||g))return;nn(this.layoutCorrected,this.layout.layoutBox);const v=this.treeScale.x,x=this.treeScale.y;HP(this.layoutCorrected,this.treeScale,this.path,f),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=Ze());const{target:k}=c;if(!k){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(bg(this.prevProjectionDelta.x,this.projectionDelta.x),bg(this.prevProjectionDelta.y,this.projectionDelta.y)),po(this.projectionDelta,this.layoutCorrected,k,this.latestValues),(this.treeScale.x!==v||this.treeScale.y!==x||!zg(this.projectionDelta.x,this.prevProjectionDelta.x)||!zg(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",k))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(c=!0){var f;if((f=this.options.visualElement)==null||f.scheduleRender(),c){const p=this.getStack();p&&p.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Bs(),this.projectionDelta=Bs(),this.projectionDeltaWithTransform=Bs()}setAnimationOrigin(c,f=!1,p){const y=this.snapshot,g=y?y.latestValues:{},v={...this.latestValues},x=Bs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const k=Ze(),C=y?y.source:void 0,T=this.layout?this.layout.source:void 0,E=C!==T,j=this.getStack(),I=!j||j.members.length<=1,R=!!(E&&!I&&this.options.crossfade===!0&&!this.path.some(oj));this.animationProgress=0;let O;const F=p==null?void 0:p.interpolateProjection(c);this.mixTargetDelta=U=>{const A=U/1e3,_=F==null?void 0:F(A);_?(x.x.translate=_.x,x.x.scale=Me(c.x.scale,1,A),x.x.origin=c.x.origin,x.x.originPoint=c.x.originPoint,x.y.translate=_.y,x.y.scale=Me(c.y.scale,1,A),x.y.origin=c.y.origin,x.y.originPoint=c.y.originPoint):(Qg(x.x,c.x,A),Qg(x.y,c.y,A)),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ml(k,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),ij(this.relativeTarget,this.relativeTargetOrigin,k,A),O&&MN(this.relativeTarget,O)&&(this.isProjectionDirty=!1),O||(O=Ze()),nn(O,this.relativeTarget)),E&&(this.animationValues=v,IN(v,g,this.latestValues,A,R,I)),_&&_.rotate!==void 0&&(this.animationValues||(this.animationValues=v),this.animationValues.pathRotation=_.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(c){var f,p,y;this.notifyListeners("animationStart"),(f=this.currentAnimation)==null||f.stop(),(y=(p=this.resumingFrom)==null?void 0:p.currentAnimation)==null||y.stop(),this.pendingAnimation&&(br(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=De.update(()=>{gl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ai(0)),this.motionValue.jump(0,!1),this.currentAnimation=_N(this.motionValue,[0,1e3],{...c,velocity:0,isSync:!0,onUpdate:g=>{this.mixTargetDelta(g),c.onUpdate&&c.onUpdate(g)},onComplete:()=>{c.onComplete&&c.onComplete(),this.completeAnimation()}}),NT(this.currentAnimation,this),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 c=this.getStack();c&&c.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(HN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const c=this.getLead(),{targetWithTransforms:f,layout:p,latestValues:y}=c;let{target:g}=c;if(!(!f||!g||!p)){if(this!==c&&this.layout&&p&&z1(this.options.animationType,this.layout.layoutBox,p.layoutBox)){g=this.target||Ze();const v=St(this.layout.layoutBox.x);g.x.min=c.target.x.min,g.x.max=g.x.min+v;const x=St(this.layout.layoutBox.y);g.y.min=c.target.y.min,g.y.max=g.y.min+x}nn(f,g),fl(f,y),po(this.projectionDeltaWithTransform,this.layoutCorrected,f,y)}}registerSharedNode(c,f){this.sharedNodes.has(c)||this.sharedNodes.set(c,new UN),this.sharedNodes.get(c).add(f);const y=f.options.initialPromotionConfig;f.promote({transition:y?y.transition:void 0,preserveFollowOpacity:y&&y.shouldPreserveFollowOpacity?y.shouldPreserveFollowOpacity(f):void 0})}isLead(){const c=this.getStack();return c?c.lead===this:!0}getLead(){var f;const{layoutId:c}=this.options;return c?((f=this.getStack())==null?void 0:f.lead)||this:this}getPrevLead(){var f;const{layoutId:c}=this.options;return c?(f=this.getStack())==null?void 0:f.prevLead:void 0}getStack(){const{layoutId:c}=this.options;if(c)return this.root.sharedNodes.get(c)}promote({needsReset:c,transition:f,preserveFollowOpacity:p}={}){const y=this.getStack();y&&y.promote(this,p),c&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const c=this.getStack();return c?c.relegate(this):!1}resetSkewAndRotation(){const{visualElement:c}=this.options;if(!c)return;let f=!1;const{latestValues:p}=c;if((p.z||p.rotate||p.rotateX||p.rotateY||p.rotateZ||p.skewX||p.skewY)&&(f=!0),!f)return;const y={};p.z&&ld("z",c,y,this.animationValues);for(let g=0;g<ad.length;g++)ld(`rotate${ad[g]}`,c,y,this.animationValues),ld(`skew${ad[g]}`,c,y,this.animationValues);c.render();for(const g in y)c.setStaticValue(g,y[g]),this.animationValues&&(this.animationValues[g]=y[g]);c.scheduleRender()}applyProjectionStyles(c,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){c.visibility="hidden";return}const p=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,c.visibility="",c.opacity="",c.pointerEvents=yl(f==null?void 0:f.pointerEvents)||"",c.transform=p?p(this.latestValues,""):"none";return}const y=this.getLead();if(!this.projectionDelta||!this.layout||!y.target){this.options.layoutId&&(c.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,c.pointerEvents=yl(f==null?void 0:f.pointerEvents)||""),this.hasProjected&&!qr(this.latestValues)&&(c.transform=p?p({},""):"none",this.hasProjected=!1);return}c.visibility="";const g=y.animationValues||y.latestValues;this.applyTransformsToTarget();let v=AN(this.projectionDeltaWithTransform,this.treeScale,g);p&&(v=p(g,v)),c.transform=v;const{x,y:k}=this.projectionDelta;c.transformOrigin=`${x.origin*100}% ${k.origin*100}% 0`,y.animationValues?c.opacity=y===this?g.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:c.opacity=y===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const C in Co){if(g[C]===void 0)continue;const{correct:T,applyTo:E,isCSSVariable:j}=Co[C],I=v==="none"?g[C]:T(g[C],y);if(E){const R=E.length;for(let O=0;O<R;O++)c[E[O]]=I}else j?this.options.visualElement.renderState.vars[C]=I:c[C]=I}this.options.layoutId&&(c.pointerEvents=y===this?yl(f==null?void 0:f.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(c=>{var f;return(f=c.currentAnimation)==null?void 0:f.stop()}),this.root.nodes.forEach(Hg),this.root.sharedNodes.clear()}}}function WN(e){e.updateLayout()}function QN(e){var s;const n=((s=e.resumeFrom)==null?void 0:s.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:a}=e.layout,{animationType:u}=e.options,c=n.source!==e.layout.source;if(u==="size")Sn(v=>{const x=c?n.measuredBox[v]:n.layoutBox[v],k=St(x);x.min=i[v].min,x.max=x.min+k});else if(u==="x"||u==="y"){const v=u==="x"?"y":"x";sf(c?n.measuredBox[v]:n.layoutBox[v],i[v])}else z1(u,n.layoutBox,i)&&Sn(v=>{const x=c?n.measuredBox[v]:n.layoutBox[v],k=St(i[v]);x.max=x.min+k,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[v].max=e.relativeTarget[v].min+k)});const f=Bs();po(f,i,n.layoutBox);const p=Bs();c?po(p,e.applyTransform(a,!0),n.measuredBox):po(p,i,n.layoutBox);const y=!I1(f);let g=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:x,layout:k}=v;if(x&&k){const C=e.options.layoutAnchor||void 0,T=Ze();Ml(T,n.layoutBox,x.layoutBox,C);const E=Ze();Ml(E,i,k.layoutBox,C),O1(T,E)||(g=!0),v.options.layoutRoot&&(e.relativeTarget=E,e.relativeTargetOrigin=T,e.relativeParent=v)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:n,delta:p,layoutDelta:f,hasLayoutChanged:y,hasRelativeLayoutChanged:g})}else if(e.isLead()){const{onExitComplete:i}=e.options;i&&i()}e.options.transition=void 0}function qN(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 GN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function YN(e){e.clearSnapshot()}function Hg(e){e.clearMeasurements()}function XN(e){e.isLayoutDirty=!0,e.updateLayout()}function Kg(e){e.isLayoutDirty=!1}function ZN(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function JN(e){var n;e.relativeTarget&&((n=e.relativeParent)!=null&&n.isLayoutDirty)&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function ej(e){const{visualElement:n}=e.options;n&&n.getProps().onBeforeLayoutMeasure&&n.notify("BeforeLayoutMeasure"),e.resetTransform()}function Wg(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tj(e){e.resolveTargetDelta()}function nj(e){e.calcProjection()}function rj(e){e.resetSkewAndRotation()}function sj(e){e.removeLeadSnapshot()}function Qg(e,n,s){e.translate=Me(n.translate,0,s),e.scale=Me(n.scale,1,s),e.origin=n.origin,e.originPoint=n.originPoint}function qg(e,n,s,i){e.min=Me(n.min,s.min,i),e.max=Me(n.max,s.max,i)}function ij(e,n,s,i){qg(e.x,n.x,s.x,i),qg(e.y,n.y,s.y,i)}function oj(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const aj={duration:.45,ease:[.4,0,.1,1]},Gg=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Yg=Gg("applewebkit/")&&!Gg("chrome/")?Math.round:dn;function Xg(e){e.min=Yg(e.min),e.max=Yg(e.max)}function lj(e){Xg(e.x),Xg(e.y)}function z1(e,n,s){return e==="position"||e==="preserve-aspect"&&!PN(Vg(n),Vg(s),.2)}function uj(e){var n;return e!==e.root&&((n=e.scroll)==null?void 0:n.wasRoot)}const cj=V1({attachResizeListener:(e,n)=>Eo(e,"resize",n),measureScroll:()=>{var e,n;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((n=document.body)==null?void 0:n.scrollTop)||0}},checkIsScrollRoot:()=>!0}),ud={current:void 0},$1=V1({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ud.current){const e=new cj({});e.mount(window),e.setOptions({layoutScroll:!0}),ud.current=e}return ud.current},resetTransform:(e,n)=>{e.style.transform=n!==void 0?n:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ah=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Zg(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function dj(...e){return n=>{let s=!1;const i=e.map(a=>{const u=Zg(a,n);return!s&&typeof u=="function"&&(s=!0),u});if(s)return()=>{for(let a=0;a<i.length;a++){const u=i[a];typeof u=="function"?u():Zg(e[a],null)}}}}function fj(...e){return S.useCallback(dj(...e),e)}class hj extends S.Component{getSnapshotBeforeUpdate(n){const s=this.props.childRef.current;if(dl(s)&&n.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=s.offsetParent,a=dl(i)&&i.offsetWidth||0,u=dl(i)&&i.offsetHeight||0,c=getComputedStyle(s),f=this.props.sizeRef.current;f.height=parseFloat(c.height),f.width=parseFloat(c.width),f.top=s.offsetTop,f.left=s.offsetLeft,f.right=a-f.width-f.left,f.bottom=u-f.height-f.top,f.direction=c.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function pj({children:e,isPresent:n,anchorX:s,anchorY:i,root:a,pop:u}){var x;const c=S.useId(),f=S.useRef(null),p=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:y}=S.useContext(ah),g=u!==!1?((x=e.props)==null?void 0:x.ref)??(e==null?void 0:e.ref):void 0,v=fj(f,g);return S.useInsertionEffect(()=>{const{width:k,height:C,top:T,left:E,right:j,bottom:I,direction:R}=p.current;if(n||u===!1||!f.current||!k||!C)return;const O=R==="rtl",F=s==="left"?O?`right: ${j}`:`left: ${E}`:O?`left: ${E}`:`right: ${j}`,U=i==="bottom"?`bottom: ${I}`:`top: ${T}`;f.current.dataset.motionPopId=c;const A=document.createElement("style");y&&(A.nonce=y);const _=a??document.head;return _.appendChild(A),A.sheet&&A.sheet.insertRule(`
|
|
332
|
+
[data-motion-pop-id="${c}"] {
|
|
333
|
+
position: absolute !important;
|
|
334
|
+
width: ${k}px !important;
|
|
335
|
+
height: ${C}px !important;
|
|
336
|
+
${F}px !important;
|
|
337
|
+
${U}px !important;
|
|
338
|
+
}
|
|
339
|
+
`),()=>{var B;(B=f.current)==null||B.removeAttribute("data-motion-pop-id"),_.contains(A)&&_.removeChild(A)}},[n]),h.jsx(hj,{isPresent:n,childRef:f,sizeRef:p,pop:u,children:u===!1?e:S.cloneElement(e,{ref:v})})}const mj=({children:e,initial:n,isPresent:s,onExitComplete:i,custom:a,presenceAffectsLayout:u,mode:c,anchorX:f,anchorY:p,root:y})=>{const g=Af(yj),v=S.useId(),x=S.useRef(s),k=S.useRef(i);go(()=>{x.current=s,k.current=i});let C=!0,T=S.useMemo(()=>(C=!1,{id:v,initial:n,isPresent:s,custom:a,onExitComplete:E=>{g.set(E,!0);for(const j of g.values())if(!j)return;i&&i()},register:E=>(g.set(E,!1),()=>{var j;g.delete(E),!x.current&&!g.size&&((j=k.current)==null||j.call(k))})}),[s,g,i]);return u&&C&&(T={...T}),S.useMemo(()=>{g.forEach((E,j)=>g.set(j,!1))},[s]),S.useEffect(()=>{!s&&!g.size&&i&&i()},[s]),e=h.jsx(pj,{pop:c==="popLayout",isPresent:s,anchorX:f,anchorY:p,root:y,children:e}),h.jsx(Fl.Provider,{value:T,children:e})};function yj(){return new Map}function U1(e=!0){const n=S.useContext(Fl);if(n===null)return[!0,null];const{isPresent:s,onExitComplete:i,register:a}=n,u=S.useId();S.useEffect(()=>{if(e)return a(u)},[e]);const c=S.useCallback(()=>e&&i&&i(u),[u,i,e]);return!s&&i?[!1,c]:[!0]}const lo=e=>e.key||"";function Jg(e){const n=[];return S.Children.forEach(e,s=>{S.isValidElement(s)&&n.push(s)}),n}const Dr=({children:e,custom:n,initial:s=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:u="sync",propagate:c=!1,anchorX:f="left",anchorY:p="top",root:y})=>{const[g,v]=U1(c),x=S.useMemo(()=>Jg(e),[e]),k=c&&!g?[]:x.map(lo),C=S.useRef(!0),T=Af(()=>new Map),E=S.useRef(new Set),[j,I]=S.useState(x),[R,O]=S.useState(x);go(()=>{c&&!g&&!R.length&&(v==null||v())},[g,c,R.length,v]),go(()=>{C.current=!1;for(let A=0;A<R.length;A++){const _=lo(R[A]);k.includes(_)?(T.delete(_),E.current.delete(_)):T.get(_)!==!0&&T.set(_,!1)}},[R,k.length,k.join("-")]);const F=[];if(x!==j){let A=[...x],_=0;for(const B of R){const Y=k.indexOf(lo(B));Y===-1?(A.splice(_++,0,B),F.push(B)):_=Y+F.length+1}return F.every(B=>T.get(lo(B)))?A=x:u==="wait"&&(A=F),O(Jg(A)),I(x),null}const{forceRender:U}=S.useContext(Df);return h.jsx(h.Fragment,{children:R.map(A=>{const _=lo(A),B=c&&!g?!1:x===R||k.includes(_),Y=()=>{if(E.current.has(_))return;if(T.has(_))E.current.add(_),T.set(_,!0);else return;let ne=!0;T.forEach(G=>{G||(ne=!1)}),ne&&(U==null||U(),I([]),c&&(v==null||v()),i&&i())};return h.jsx(mj,{isPresent:B,initial:!C.current||s?void 0:!1,custom:n,presenceAffectsLayout:a,mode:u,root:y,onExitComplete:B?void 0:Y,anchorX:f,anchorY:p,children:A},_)})})},B1=S.createContext({strict:!1}),ev={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"]};let tv=!1;function gj(){if(tv)return;const e={};for(const n in ev)e[n]={isEnabled:s=>ev[n].some(i=>!!s[i])};T1(e),tv=!0}function H1(){return gj(),hN()}function vj(e){const n=H1();for(const s in e)n[s]={...n[s],...e[s]};T1(n)}const Ul=S.createContext({});function xj(e,n){if($l(e)){const{initial:s,animate:i}=e;return{initial:s===!1||ko(s)?s:void 0,animate:ko(i)?i:void 0}}return e.inherit!==!1?n:{}}function wj(e){const{initial:n,animate:s}=xj(e,S.useContext(Ul));return S.useMemo(()=>({initial:n,animate:s}),[nv(n),nv(s)])}function nv(e){return Array.isArray(e)?e.join(" "):e}const lh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function K1(e,n,s){for(const i in n)!ut(n[i])&&!j1(i,s)&&(e[i]=n[i])}function Sj({transformTemplate:e},n){return S.useMemo(()=>{const s=lh();return th(s,n,e),Object.assign({},s.vars,s.style)},[n])}function kj(e,n){const s=e.style||{},i={};return K1(i,s,e),Object.assign(i,Sj(e,n)),i}function Cj(e,n){const s={},i=kj(e,n);return e.drag&&e.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(s.tabIndex=0),s.style=i,s}const W1=()=>({...lh(),attrs:{}});function Ej(e,n,s,i){const a=S.useMemo(()=>{const u=W1();return p1(u,n,R1(i),e.transformTemplate,e.style),{...u.attrs,style:{...u.style}}},[n]);if(e.style){const u={};K1(u,e.style,e),a.style={...u,...a.style}}return a}const Tj=new Set(["animate","exit","variants","initial","style","values","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Dl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Tj.has(e)}function Pj(e,n){return e.startsWith("on")?!Dl(e):(n==null?void 0:n(e))??!Dl(e)}function Nj(e,n,s,i){const a={};for(const u in e)u==="values"&&typeof e.values=="object"||ut(e[u])||(Pj(u,i)||s===!0&&Dl(u)||!n&&!Dl(u)||e.draggable&&u.startsWith("onDrag"))&&(a[u]=e[u]);return a}const jj=["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 uh(e){return typeof e!="string"||e.includes("-")?!1:!!(jj.indexOf(e)>-1||/[A-Z]/u.test(e))}function bj(e,n,s,{latestValues:i},a,u=!1,c,f){const y=(c??uh(e)?Ej:Cj)(n,i,a,e),g=Nj(n,typeof e=="string",u,f),v=e!==S.Fragment?{...g,...y,ref:s}:{},{children:x}=n,k=S.useMemo(()=>ut(x)?x.get():x,[x]);return S.createElement(e,{...v,children:k})}function Rj({scrapeMotionValuesFromProps:e,createRenderState:n},s,i,a){return{latestValues:Mj(s,i,a,e),renderState:n()}}function Mj(e,n,s,i){const a={},u=i(e,{});for(const x in u)a[x]=yl(u[x]);let{initial:c,animate:f}=e;const p=$l(e),y=C1(e);n&&y&&!p&&e.inherit!==!1&&(c===void 0&&(c=n.initial),f===void 0&&(f=n.animate));let g=s?s.initial===!1:!1;g=g||c===!1;const v=g?f:c;if(v&&typeof v!="boolean"&&!zl(v)){const x=Array.isArray(v)?v:[v];for(let k=0;k<x.length;k++){const C=o1(e,x[k]);if(C){const{transitionEnd:T,transition:E,...j}=C;for(const I in j){let R=j[I];if(Array.isArray(R)){const O=g?R.length-1:0;R=R[O]}R!==null&&(a[I]=R)}for(const I in T)a[I]=T[I]}}}return a}const Q1=e=>(n,s)=>{const i=S.useContext(Ul),a=S.useContext(Fl),u=()=>Rj(e,n,i,a);return s?u():Af(u)},Dj=Q1({scrapeMotionValuesFromProps:oh,createRenderState:lh}),Aj=Q1({scrapeMotionValuesFromProps:M1,createRenderState:W1}),Lj=Symbol.for("motionComponentSymbol");function Ij(e,n,s){const i=S.useRef(s);S.useInsertionEffect(()=>{i.current=s});const a=S.useRef(null);return S.useCallback(u=>{var f;u&&((f=e.onMount)==null||f.call(e,u)),n&&(u?n.mount(u):n.unmount());const c=i.current;if(typeof c=="function")if(u){const p=c(u);typeof p=="function"&&(a.current=p)}else a.current?(a.current(),a.current=null):c(u);else c&&(c.current=u)},[n])}const q1=S.createContext({});function zs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Oj(e,n,s,i,a,u){var R,O;const{visualElement:c}=S.useContext(Ul),f=S.useContext(B1),p=S.useContext(Fl),y=S.useContext(ah),g=y.reducedMotion,v=y.skipAnimations,x=S.useRef(null),k=S.useRef(!1);i=i||f.renderer,!x.current&&i&&(x.current=i(e,{visualState:n,parent:c,props:s,presenceContext:p,blockInitialAnimation:p?p.initial===!1:!1,reducedMotionConfig:g,skipAnimations:v,isSVG:u}),k.current&&x.current&&(x.current.manuallyAnimateOnMount=!0));const C=x.current,T=S.useContext(q1);C&&!C.projection&&a&&(C.type==="html"||C.type==="svg")&&Fj(x.current,s,a,T);const E=S.useRef(!1);S.useInsertionEffect(()=>{C&&E.current&&C.update(s,p)});const j=s[u1],I=S.useRef(!!j&&typeof window<"u"&&!((R=window.MotionHandoffIsComplete)!=null&&R.call(window,j))&&((O=window.MotionHasOptimisedAnimation)==null?void 0:O.call(window,j)));return go(()=>{var F;!k.current||!C||((F=C.animationState)==null||F.animateChanges(),C.enteringChildren=void 0)},[]),go(()=>{k.current=!0,C&&(E.current=!0,window.MotionIsMounted=!0,C.updateFeatures(),C.scheduleRenderMicrotask(),I.current&&C.animationState&&C.animationState.animateChanges())}),S.useEffect(()=>{C&&(!I.current&&C.animationState&&C.animationState.animateChanges(),I.current&&(queueMicrotask(()=>{var F;(F=window.MotionHandoffMarkAsComplete)==null||F.call(window,j)}),I.current=!1),C.enteringChildren=void 0)}),C}function Fj(e,n,s,i){const{layoutId:a,layout:u,drag:c,dragConstraints:f,layoutScroll:p,layoutRoot:y,layoutAnchor:g,layoutCrossfade:v}=n;e.projection=new s(e.latestValues,n["data-framer-portal-id"]?void 0:G1(e.parent)),e.projection.setOptions({layoutId:a,layout:u,alwaysMeasureLayout:!!c||f&&zs(f),visualElement:e,animationType:typeof u=="string"?u:"both",initialPromotionConfig:i,crossfade:v,layoutScroll:p,layoutRoot:y,layoutAnchor:g})}function G1(e){if(e)return e.options.allowProjection!==!1?e.projection:G1(e.parent)}function cd(e,{forwardMotionProps:n=!1,type:s}={},i,a){i&&vj(i);const u=s?s==="svg":uh(e),c=u?Aj:Dj;function f(y,g){let v;const x={...S.useContext(ah),...y,layoutId:_j(y)},{isStatic:k,isValidProp:C}=x,T=wj(y),E=c(y,k);if(!k&&typeof window<"u"){Vj();const j=zj(x);v=j.MeasureLayout,T.visualElement=Oj(e,E,x,a,j.ProjectionNode,u)}return h.jsxs(Ul.Provider,{value:T,children:[v&&T.visualElement?h.jsx(v,{visualElement:T.visualElement,...x}):null,bj(e,y,Ij(E,T.visualElement,g),E,k,n,u,C)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const p=S.forwardRef(f);return p[Lj]=e,p}function _j({layoutId:e}){const n=S.useContext(Df).id;return n&&e!==void 0?n+"-"+e:e}function Vj(e,n){S.useContext(B1).strict}function zj(e){const n=H1(),{drag:s,layout:i}=n;if(!s&&!i)return{};const a={...s,...i};return{MeasureLayout:s!=null&&s.isEnabled(e)||i!=null&&i.isEnabled(e)?a.MeasureLayout:void 0,ProjectionNode:a.ProjectionNode}}function $j(e,n){if(typeof Proxy>"u")return cd;const s=new Map,i=(u,c)=>cd(u,c,e,n),a=(u,c)=>i(u,c);return new Proxy(a,{get:(u,c)=>c==="create"?i:(s.has(c)||s.set(c,cd(c,void 0,e,n)),s.get(c))})}const Uj=(e,n)=>n.isSVG??uh(e)?new vN(n):new yN(n,{allowProjection:e!==S.Fragment});class Bj extends Mr{constructor(n){super(n),n.animationState||(n.animationState=wN(n))}updateAnimationControlsSubscription(){const{animate:n}=this.node.getProps();zl(n)&&(this.unmountControls=n.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:n}=this.node.getProps(),{animate:s}=this.node.prevProps||{};n!==s&&this.updateAnimationControlsSubscription()}unmount(){var n;this.node.animationState.reset(),(n=this.unmountControls)==null||n.call(this)}}let Hj=0;class Kj extends Mr{constructor(){super(...arguments),this.id=Hj++}update(){var p;const{presenceContext:n,prevPresenceContext:s,animationState:i}=this.node;if(!n||!i)return;const{isPresent:a,onExitComplete:u}=n,c=s==null?void 0:s.isPresent;if(a===c)return;if(a&&c===!1){if(this.exit===!0){const{initial:y}=this.node.getProps();if(y&&!Array.isArray(y)){const{transition:g,transitionEnd:v,...x}=us(this.node,y)||{};for(const k in x)(p=this.node.getValue(k))==null||p.jump(x[k])}this.node.blockInitialAnimation=!1,i.reset(),i.animateChanges()}else i.setActive("exit",!1);this.exit=void 0;return}const f=this.exit=i.setActive("exit",!a);u&&!a&&f.then(()=>{this.exit===f&&(this.exit=!0,u(this.id))})}mount(){const{register:n,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),n&&(this.unmount=n(this.id))}unmount(){}}const Wj={animation:{Feature:Bj},exit:{Feature:Kj}};function Bl(e){return{point:{x:e.pageX,y:e.pageY}}}const Qj=e=>n=>rh(n)&&e(n,Bl(n));function mo(e,n,s,i){return Eo(e,n,Qj(s),i)}const Y1=({current:e})=>e?e.ownerDocument.defaultView:null,rv=(e,n)=>Math.abs(e-n);function qj(e,n){const s=rv(e.x,n.x),i=rv(e.y,n.y);return Math.sqrt(s**2+i**2)}const sv=new Set(["auto","scroll"]);class X1{constructor(n,s,{transformPagePoint:i,contextWindow:a=window,dragSnapToOrigin:u=!1,distanceThreshold:c=3,element:f}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=C=>{this.handleScroll(C.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=tl(this.lastRawMoveEventInfo,this.transformPagePoint));const C=dd(this.lastMoveEventInfo,this.history),T=this.startEvent!==null,E=qj(C.offset,{x:0,y:0})>=this.distanceThreshold;if(!T&&!E)return;const{point:j}=C;this.history.push({...j,timestamp:lt.now()});const{onStart:I,onMove:R}=this.handlers;T||(I&&I(this.lastMoveEvent,C),this.startEvent=this.lastMoveEvent),R&&R(this.lastMoveEvent,C)},this.handlePointerMove=(C,T)=>{this.lastMoveEvent=C,this.lastRawMoveEventInfo=T,this.lastMoveEventInfo=tl(T,this.transformPagePoint),this.hasPendingMove=!0,De.update(this.updatePoint,!0)},this.handlePointerUp=(C,T)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:E,onSessionEnd:j,resumeAnimation:I}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&I&&I(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const R=dd(C.type==="pointercancel"?this.lastMoveEventInfo:tl(T,this.transformPagePoint),this.history);this.startEvent&&E&&E(C,R),j&&j(C,R)},!rh(n))return;this.dragSnapToOrigin=u,this.handlers=s,this.transformPagePoint=i,this.distanceThreshold=c,this.contextWindow=a||window;const p=Bl(n),y=tl(p,this.transformPagePoint),{point:g}=y,{timestamp:v}=Je;this.history=[{...g,timestamp:v}];const{onSessionStart:x}=s;x&&x(n,dd(y,this.history));const k={passive:!0,capture:!0};this.removeListeners=Ao(mo(this.contextWindow,"pointermove",this.handlePointerMove,k),mo(this.contextWindow,"pointerup",this.handlePointerUp,k),mo(this.contextWindow,"pointercancel",this.handlePointerUp,k)),f&&this.startScrollTracking(f)}startScrollTracking(n){let s=n.parentElement;for(;s;){const i=getComputedStyle(s);(sv.has(i.overflowX)||sv.has(i.overflowY))&&this.scrollPositions.set(s,{x:s.scrollLeft,y:s.scrollTop}),s=s.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(n){const s=this.scrollPositions.get(n);if(!s)return;const i=n===window,a=i?{x:window.scrollX,y:window.scrollY}:{x:n.scrollLeft,y:n.scrollTop},u={x:a.x-s.x,y:a.y-s.y};u.x===0&&u.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=u.x,this.lastMoveEventInfo.point.y+=u.y):this.history.length>0&&(this.history[0].x-=u.x,this.history[0].y-=u.y),this.scrollPositions.set(n,a),De.update(this.updatePoint,!0))}updateHandlers(n){this.handlers=n}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),br(this.updatePoint)}}function tl(e,n){return n?{point:n(e.point)}:e}function iv(e,n){return{x:e.x-n.x,y:e.y-n.y}}function dd({point:e},n){return{point:e,delta:iv(e,Z1(n)),offset:iv(e,Gj(n)),velocity:Yj(n,.1)}}function Gj(e){return e[0]}function Z1(e){return e[e.length-1]}function Yj(e,n){if(e.length<2)return{x:0,y:0};let s=e.length-1,i=null;const a=Z1(e);for(;s>=0&&(i=e[s],!(a.timestamp-i.timestamp>Wt(n)));)s--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&a.timestamp-i.timestamp>Wt(n)*2&&(i=e[1]);const u=Ht(a.timestamp-i.timestamp);if(u===0)return{x:0,y:0};const c={x:(a.x-i.x)/u,y:(a.y-i.y)/u};return c.x===1/0&&(c.x=0),c.y===1/0&&(c.y=0),c}function Xj(e,{min:n,max:s},i){return n!==void 0&&e<n?e=i?Me(n,e,i.min):Math.max(e,n):s!==void 0&&e>s&&(e=i?Me(s,e,i.max):Math.min(e,s)),e}function ov(e,n,s){return{min:n!==void 0?e.min+n:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function Zj(e,{top:n,left:s,bottom:i,right:a}){return{x:ov(e.x,s,a),y:ov(e.y,n,i)}}function av(e,n){let s=n.min-e.min,i=n.max-e.max;return n.max-n.min<e.max-e.min&&([s,i]=[i,s]),{min:s,max:i}}function Jj(e,n){return{x:av(e.x,n.x),y:av(e.y,n.y)}}function eb(e,n){let s=.5;const i=St(e),a=St(n);return a>i?s=vo(n.min,n.max-i,e.min):i>a&&(s=vo(e.min,e.max-a,n.min)),Qn(0,1,s)}function tb(e,n){const s={};return n.min!==void 0&&(s.min=n.min-e.min),n.max!==void 0&&(s.max=n.max-e.min),s}const of=.35;function nb(e=of){return e===!1?e=0:e===!0&&(e=of),{x:lv(e,"left","right"),y:lv(e,"top","bottom")}}function lv(e,n,s){return{min:uv(e,n),max:uv(e,s)}}function uv(e,n){return typeof e=="number"?e:e[n]||0}const rb=new WeakMap;class sb{constructor(n){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ze(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=n}start(n,{snapToCursor:s=!1,distanceThreshold:i}={}){const{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;const u=v=>{s&&this.snapToCursor(v),this.stopAnimation()},c=(v,x)=>{const{drag:k,dragPropagation:C,onDragStart:T}=this.getProps();if(k&&!C&&(this.openDragLock&&this.openDragLock(),this.openDragLock=WP(k),!this.openDragLock))return;this.latestPointerEvent=v,this.latestPanInfo=x,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Sn(j=>{let I=this.getAxisMotionValue(j).get()||0;if(jn.test(I)){const{projection:R}=this.visualElement;if(R&&R.layout){const O=R.layout.layoutBox[j];O&&(I=St(O)*(parseFloat(I)/100))}}this.originPoint[j]=I}),T&&De.update(()=>T(v,x),!1,!0),Jd(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},f=(v,x)=>{this.latestPointerEvent=v,this.latestPanInfo=x;const{dragPropagation:k,dragDirectionLock:C,onDirectionLock:T,onDrag:E}=this.getProps();if(!k&&!this.openDragLock)return;const{offset:j}=x;if(C&&this.currentDirection===null){this.currentDirection=ob(j),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",x.point,j),this.updateAxis("y",x.point,j),this.visualElement.render(),E&&De.update(()=>E(v,x),!1,!0)},p=(v,x)=>{this.latestPointerEvent=v,this.latestPanInfo=x,this.stop(v,x),this.latestPointerEvent=null,this.latestPanInfo=null},y=()=>{const{dragSnapToOrigin:v}=this.getProps();(v||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:g}=this.getProps();this.panSession=new X1(n,{onSessionStart:u,onStart:c,onMove:f,onSessionEnd:p,resumeAnimation:y},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:g,distanceThreshold:i,contextWindow:Y1(this.visualElement),element:this.visualElement.current})}stop(n,s){const i=n||this.latestPointerEvent,a=s||this.latestPanInfo,u=this.isDragging;if(this.cancel(),!u||!a||!i)return;const{velocity:c}=a;this.startAnimation(c);const{onDragEnd:f}=this.getProps();f&&De.postRender(()=>f(i,a))}cancel(){this.isDragging=!1;const{projection:n,animationState:s}=this.visualElement;n&&(n.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(n,s,i){const{drag:a}=this.getProps();if(!i||!nl(n,a,this.currentDirection))return;const u=this.getAxisMotionValue(n);let c=this.originPoint[n]+i[n];this.constraints&&this.constraints[n]&&(c=Xj(c,this.constraints[n],this.elastic[n])),u.set(c)}resolveConstraints(){var u;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(u=this.visualElement.projection)==null?void 0:u.layout,a=this.constraints;n&&zs(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Zj(i.layoutBox,n):this.constraints=!1,this.elastic=nb(s),a!==this.constraints&&!zs(n)&&i&&this.constraints&&!this.hasMutatedConstraints&&Sn(c=>{this.constraints!==!1&&this.getAxisMotionValue(c)&&(this.constraints[c]=tb(i.layoutBox[c],this.constraints[c]))})}resolveRefConstraints(){const{dragConstraints:n,onMeasureDragConstraints:s}=this.getProps();if(!n||!zs(n))return!1;const i=n.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;a.root&&(a.root.scroll=void 0,a.root.updateScroll());const u=KP(i,a.root,this.visualElement.getTransformPagePoint());let c=Jj(a.layout.layoutBox,u);if(s){const f=s(UP(c));this.hasMutatedConstraints=!!f,f&&(c=m1(f))}return c}startAnimation(n){const{drag:s,dragMomentum:i,dragElastic:a,dragTransition:u,dragSnapToOrigin:c,onDragTransitionEnd:f}=this.getProps(),p=this.constraints||{},y=Sn(g=>{if(!nl(g,s,this.currentDirection))return;let v=p&&p[g]||{};(c===!0||c===g)&&(v={min:0,max:0});const x=a?200:1e6,k=a?40:1e7,C={type:"inertia",velocity:i?n[g]:0,bounceStiffness:x,bounceDamping:k,timeConstant:750,restDelta:1,restSpeed:10,...u,...v};return this.startAxisValueAnimation(g,C)});return Promise.all(y).then(f)}startAxisValueAnimation(n,s){const i=this.getAxisMotionValue(n);return Jd(this.visualElement,n),i.start(Xf(n,i,0,s,this.visualElement,!1))}stopAnimation(){Sn(n=>this.getAxisMotionValue(n).stop())}getAxisMotionValue(n){const s=`_drag${n.toUpperCase()}`,a=this.visualElement.getProps()[s];return a||this.visualElement.getValue(n,this.visualElement.latestValues[n]??0)}snapToCursor({clientX:n,clientY:s}){var f;const{drag:i}=this.getProps(),a={x:n,y:s},u=((f=this.visualElement.getTransformPagePoint())==null?void 0:f(a))||a,c=this.visualElement.measureViewportBox();Sn(p=>{if(!nl(p,i,this.currentDirection))return;const y=this.getAxisMotionValue(p),{min:g,max:v}=c[p];y.set((y.get()||0)+u[p]-Me(g,v,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:n,dragConstraints:s}=this.getProps(),{projection:i}=this.visualElement;if(!zs(s)||!i||!this.constraints)return;this.stopAnimation();const a=this.constraints,u={x:0,y:0};Sn(f=>{const p=this.getAxisMotionValue(f).get();u[f]=eb({min:p,max:p},a[f])});const{transformTemplate:c}=this.visualElement.getProps();this.visualElement.current.style.transform=c?c({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),Sn(f=>{const p=this.getAxisMotionValue(f);if(!nl(f,n,null)||!p.get())return;const{min:y,max:g}=this.constraints[f];p.set(Me(y,g,u[f]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;rb.set(this.visualElement,this);const n=this.visualElement.current,s=mo(n,"pointerdown",y=>{const{drag:g,dragListener:v=!0}=this.getProps(),x=y.target,k=x!==n&&ZP(x);g&&v&&!k&&this.start(y)});let i;const a=()=>{const{dragConstraints:y}=this.getProps();zs(y)&&y.current&&(this.constraints=this.resolveRefConstraints(),i||(i=ib(n,y.current,()=>this.scalePositionWithinConstraints())))},{projection:u}=this.visualElement,c=u.addEventListener("measure",a);u&&!u.layout&&(u.root&&u.root.updateScroll(),u.updateLayout()),De.read(a);const f=Eo(window,"resize",()=>this.scalePositionWithinConstraints()),p=u.addEventListener("didUpdate",(({delta:y,hasLayoutChanged:g})=>{this.isDragging&&g&&(Sn(v=>{const x=this.getAxisMotionValue(v);x&&(this.originPoint[v]+=y[v].translate,x.set(x.get()+y[v].translate))}),this.visualElement.render())}));return()=>{f(),s(),c(),p&&p(),i&&i()}}getProps(){const n=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:i=!1,dragPropagation:a=!1,dragConstraints:u=!1,dragElastic:c=of,dragMomentum:f=!0}=n;return{...n,drag:s,dragDirectionLock:i,dragPropagation:a,dragConstraints:u,dragElastic:c,dragMomentum:f}}}function cv(e){let n=!0;return()=>{if(n){n=!1;return}e()}}function ib(e,n,s){const i=kg(e,cv(s)),a=kg(n,cv(s));return()=>{i(),a()}}function nl(e,n,s){return(n===!0||n===e)&&(s===null||s===e)}function ob(e,n=10){let s=null;return Math.abs(e.y)>n?s="y":Math.abs(e.x)>n&&(s="x"),s}class ab extends Mr{constructor(n){super(n),this.removeGroupControls=dn,this.removeListeners=dn,this.controls=new sb(n)}mount(){const{dragControls:n}=this.node.getProps();n&&(this.removeGroupControls=n.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||dn}update(){const{dragControls:n}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};n!==s&&(this.removeGroupControls(),n&&(this.removeGroupControls=n.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const fd=e=>(n,s)=>{e&&De.update(()=>e(n,s),!1,!0)};class lb extends Mr{constructor(){super(...arguments),this.removePointerDownListener=dn}onPointerDown(n){this.session=new X1(n,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Y1(this.node)})}createPanHandlers(){const{onPanSessionStart:n,onPanStart:s,onPan:i,onPanEnd:a}=this.node.getProps();return{onSessionStart:fd(n),onStart:fd(s),onMove:fd(i),onEnd:(u,c)=>{delete this.session,a&&De.postRender(()=>a(u,c))}}}mount(){this.removePointerDownListener=mo(this.node.current,"pointerdown",n=>this.onPointerDown(n))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let hd=!1;class ub extends S.Component{componentDidMount(){const{visualElement:n,layoutGroup:s,switchLayoutGroup:i,layoutId:a}=this.props,{projection:u}=n;u&&(s.group&&s.group.add(u),i&&i.register&&a&&i.register(u),hd&&u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),gl.hasEverUpdated=!0}getSnapshotBeforeUpdate(n){const{layoutDependency:s,visualElement:i,drag:a,isPresent:u}=this.props,{projection:c}=i;return c&&(c.isPresent=u,n.layoutDependency!==s&&c.setOptions({...c.options,layoutDependency:s}),hd=!0,a||n.layoutDependency!==s||s===void 0||n.isPresent!==u?c.willUpdate():this.safeToRemove(),n.isPresent!==u&&(u?c.promote():c.relegate()||De.postRender(()=>{const f=c.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:n,layoutAnchor:s}=this.props,{projection:i}=n;i&&(i.options.layoutAnchor=s,i.root.didUpdate(),nh.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:n,layoutGroup:s,switchLayoutGroup:i}=this.props,{projection:a}=n;hd=!0,a&&(a.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(a),i&&i.deregister&&i.deregister(a))}safeToRemove(){const{safeToRemove:n}=this.props;n&&n()}render(){return null}}function J1(e){const[n,s]=U1(),i=S.useContext(Df);return h.jsx(ub,{...e,layoutGroup:i,switchLayoutGroup:S.useContext(q1),isPresent:n,safeToRemove:s})}const cb={pan:{Feature:lb},drag:{Feature:ab,ProjectionNode:$1,MeasureLayout:J1}};function dv(e,n,s){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",s==="Start");const a="onHover"+s,u=i[a];u&&De.postRender(()=>u(n,Bl(n)))}class db extends Mr{mount(){const{current:n}=this.node;n&&(this.unmount=qP(n,(s,i)=>(dv(this.node,i,"Start"),a=>dv(this.node,a,"End"))))}unmount(){}}class fb extends Mr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let n=!1;try{n=this.node.current.matches(":focus-visible")}catch{n=!0}!n||!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=Ao(Eo(this.node.current,"focus",()=>this.onFocus()),Eo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function fv(e,n,s){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",s==="Start");const a="onTap"+(s==="End"?"":s),u=i[a];u&&De.postRender(()=>u(n,Bl(n)))}class hb extends Mr{mount(){const{current:n}=this.node;if(!n)return;const{globalTapTarget:s,propagate:i}=this.node.props;this.unmount=eN(n,(a,u)=>(fv(this.node,u,"Start"),(c,{success:f})=>fv(this.node,c,f?"End":"Cancel")),{useGlobalTarget:s,stopPropagation:(i==null?void 0:i.tap)===!1})}unmount(){}}const af=new WeakMap,pd=new WeakMap,pb=e=>{const n=af.get(e.target);n&&n(e)},mb=e=>{e.forEach(pb)};function yb({root:e,...n}){const s=e||document;pd.has(s)||pd.set(s,{});const i=pd.get(s),a=JSON.stringify(n);return i[a]||(i[a]=new IntersectionObserver(mb,{root:e,...n})),i[a]}function gb(e,n,s){const i=yb(n);return af.set(e,s),i.observe(e),()=>{af.delete(e),i.unobserve(e)}}const vb={some:0,all:1};class xb extends Mr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var p;(p=this.stopObserver)==null||p.call(this);const{viewport:n={}}=this.node.getProps(),{root:s,margin:i,amount:a="some",once:u}=n,c={root:s?s.current:void 0,rootMargin:i,threshold:typeof a=="number"?a:vb[a]},f=y=>{const{isIntersecting:g}=y;if(this.isInView===g||(this.isInView=g,u&&!g&&this.hasEnteredView))return;g&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",g);const{onViewportEnter:v,onViewportLeave:x}=this.node.getProps(),k=g?v:x;k&&k(y)};this.stopObserver=gb(this.node.current,c,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:n,prevProps:s}=this.node;["amount","margin","root"].some(wb(n,s))&&this.startObserver()}unmount(){var n;(n=this.stopObserver)==null||n.call(this),this.hasEnteredView=!1,this.isInView=!1}}function wb({viewport:e={}},{viewport:n={}}={}){return s=>e[s]!==n[s]}const Sb={inView:{Feature:xb},tap:{Feature:hb},focus:{Feature:fb},hover:{Feature:db}},kb={layout:{ProjectionNode:$1,MeasureLayout:J1}},Cb={...Wj,...Sb,...cb,...kb},Eb=$j(Cb,Uj);function mn(){!ih.current&&E1();const[e]=S.useState(bl.current);return e}const qt=Eb;function Tb(e,n){const[s,i]=S.useState(e);return S.useEffect(()=>{const a=window.setTimeout(()=>i(e),n);return()=>window.clearTimeout(a)},[e,n]),s}const ew=S.createContext(null);function Hl(){const e=S.useContext(ew);if(e===null)throw new Error("useDriveShell must be used within the drive layout");return e}function Pb(e){if(!(e instanceof HTMLElement))return!1;const n=e.tagName;return n==="INPUT"||n==="TEXTAREA"||n==="SELECT"||e.isContentEditable}function Nb(e,n=!0){const s=S.useRef(e);s.current=e,S.useEffect(()=>{if(!n)return;const i=a=>{const u=a.ctrlKey||a.metaKey,c=Pb(a.target),f=s.current;if(u&&a.key.toLowerCase()==="k"){a.preventDefault(),f.onSearch();return}if(u&&a.key.toLowerCase()==="a"){if(c)return;a.preventDefault(),f.onSelectAll();return}if(a.key==="Escape"){f.onEscape();return}if(!c){if(a.key==="Delete"||a.key==="Backspace"){a.preventDefault(),f.onDelete();return}if(a.key==="Enter"){f.onEnter();return}a.key==="?"&&(a.preventDefault(),f.onHelp())}};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[n])}const Oo=["me"],ch=["folders","tree"],jb=["storage","stats"],tw={user:null,storage:null,health:null};function hs(e){e.invalidateQueries({queryKey:["files"]}),e.invalidateQueries({queryKey:["folders"]}),e.invalidateQueries({queryKey:["trash"]}),e.invalidateQueries({queryKey:["starred"]}),e.invalidateQueries({queryKey:["recent"]}),e.invalidateQueries({queryKey:["search"]}),e.invalidateQueries({queryKey:["activity"]}),e.invalidateQueries({queryKey:["subtree-files"]}),e.invalidateQueries({queryKey:["storage"]})}function bb(e,n){e.invalidateQueries({queryKey:["versions",n]})}function dh(){return Rr({queryKey:Oo,queryFn:we.auth.me})}function hv(e){return typeof e=="object"&&e!==null}function Rb(e,n){let s=null;try{s=JSON.parse(n)}catch{}if(hv(s)&&hv(s.file)){const i=s.file;if(typeof i.id=="string"&&typeof i.name=="string")return i}throw new Nr(e,"UNKNOWN","The server returned an unexpected response")}function nw(e,n,s,i){return new Promise((a,u)=>{const c=new XMLHttpRequest;c.open("POST",e);const f=new FormData;f.append("file",n,n.name),s!==null&&f.append("folderId",s),c.upload.addEventListener("progress",y=>{var v;if(!y.lengthComputable)return;const g=Math.min(100,Math.round(y.loaded/y.total*100));(v=i.onProgress)==null||v.call(i,{loaded:y.loaded,total:y.total,percent:g})}),c.addEventListener("load",()=>{if(c.status>=200&&c.status<300){try{a(Rb(c.status,c.responseText))}catch(g){u(g)}return}const y=yx(c.status,c.responseText);c.status===401&&y.code!=="TELEGRAM_AUTH_REQUIRED"&&mx(),u(y)}),c.addEventListener("error",()=>{u(new Nr(0,"NETWORK_ERROR","Could not reach the server. Check your connection and try again."))}),c.addEventListener("abort",()=>{u(new Nr(0,"ABORTED","Upload cancelled"))});const p=i.signal;if(p!==void 0){if(p.aborted){u(new Nr(0,"ABORTED","Upload cancelled"));return}p.addEventListener("abort",()=>c.abort(),{once:!0})}c.send(f)})}function Mb(e,n,s={}){return nw("/api/files",e,n,s)}function Db(e,n,s={}){return nw(`/api/files/${encodeURIComponent(n)}/replace`,e,null,s)}const rw=S.createContext(null),Ab=4e3;function Lb({children:e}){const[n,s]=S.useState([]),i=mn(),a=S.useRef(new Set),u=S.useRef(0);S.useEffect(()=>{const g=a.current;return()=>{for(const v of g)window.clearTimeout(v)}},[]);const c=S.useCallback(g=>{s(v=>v.filter(x=>x.id!==g))},[]),f=S.useCallback((g,v)=>{const x=u.current;u.current+=1,s(C=>[...C,{id:x,kind:g,message:v}]);const k=window.setTimeout(()=>{a.current.delete(k),c(x)},Ab);a.current.add(k)},[c]),p=S.useMemo(()=>({success:g=>f("success",g),error:g=>f("error",g)}),[f]),y=i?0:16;return h.jsxs(rw.Provider,{value:p,children:[e,h.jsx("div",{"aria-live":"polite",className:"pointer-events-none fixed top-4 right-4 z-[200] flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-2",children:h.jsx(Dr,{children:n.map(g=>h.jsxs(qt.div,{role:g.kind==="error"?"alert":"status",initial:{opacity:0,x:y},animate:{opacity:1,x:0},exit:{opacity:0,x:y},transition:{duration:.18,ease:"easeOut"},className:"glass-strong pointer-events-auto flex items-start gap-2.5 rounded-xl border border-line px-4 py-3 text-[13px]",children:[g.kind==="error"?h.jsx(t2,{className:"mt-0.5 h-4 w-4 shrink-0 text-bad","aria-hidden":"true"}):h.jsx(jf,{className:"mt-0.5 h-4 w-4 shrink-0 text-gold-text","aria-hidden":"true"}),h.jsx("p",{className:"min-w-0 flex-1 break-words",children:g.message}),h.jsx("button",{type:"button","aria-label":"Dismiss notification",onClick:()=>c(g.id),className:"muted rounded p-0.5 transition-colors hover:bg-bg-soft hover:text-gold-text",children:h.jsx(cn,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]},g.id))})})]})}function ps(){const e=S.useContext(rw);if(e===null)throw new Error("useToast must be used within a ToastProvider");return e}let rl=0;function Ib(){const e=fn(),n=ps(),[s,i]=S.useState([]),a=S.useRef(new Map),u=S.useRef(new Map),c=S.useRef(Promise.resolve()),f=S.useRef(new Set),p=S.useRef(!0),y=S.useRef(null),g=S.useRef(null);S.useEffect(()=>{const U=f.current,A=u.current;return()=>{p.current=!1;for(const _ of U)window.clearTimeout(_);for(const _ of A.values())_.abort()}},[]);const v=S.useCallback(U=>{const A=window.setTimeout(()=>{f.current.delete(A),i(_=>_.filter(B=>B.id!==U)),a.current.delete(U)},5e3);f.current.add(A)},[]),x=S.useCallback(async U=>{const A=new AbortController;u.current.set(U.id,A);try{const _={signal:A.signal,onProgress:({loaded:Y,total:ne,percent:G})=>{i(X=>X.map(fe=>fe.id===U.id?{...fe,loaded:Y,size:ne||fe.size,percent:G}:fe))}},B=U.replaceId===null?await Mb(U.file,U.folderId,_):await Db(U.file,U.replaceId,_);if(!p.current)return;i(Y=>Y.map(ne=>ne.id===U.id?{...ne,status:"done",percent:100}:ne)),hs(e),U.replaceId!==null&&bb(e,U.replaceId),n.success(U.replaceId===null?`Uploaded "${B.name}"`:`Replaced "${B.name}"`),v(U.id)}catch(_){if(!p.current)return;const B=Qe(_,"Upload failed"),Y=B==="Upload cancelled";i(ne=>ne.map(G=>G.id===U.id?{...G,status:Y?"cancelled":"error",message:B}:G)),Y||n.error(`Could not upload "${U.file.name}": ${B}`)}finally{u.current.delete(U.id)}},[e,v,n]),k=S.useCallback(U=>{a.current.set(U.id,U),i(A=>[...A,{id:U.id,name:U.file.name,size:U.file.size,loaded:0,percent:0,status:"uploading"}]),c.current=c.current.then(()=>x(U))},[x]),C=S.useCallback((U,A)=>{for(const _ of U)rl+=1,k({id:rl,file:_,replaceId:null,folderId:A})},[k]),T=S.useCallback((U,A)=>{rl+=1,k({id:rl,file:U,replaceId:A,folderId:null})},[k]),E=S.useCallback(U=>{var A;(A=u.current.get(U))==null||A.abort()},[]),j=S.useCallback(U=>{const A=a.current.get(U);A!==void 0&&(i(_=>_.map(B=>B.id===U?{...B,status:"uploading",percent:0,loaded:0,message:void 0}:B)),c.current=c.current.then(()=>x(A)))},[x]),I=S.useCallback(U=>{var A;(A=u.current.get(U))==null||A.abort(),a.current.delete(U),i(_=>_.filter(B=>B.id!==U))},[]),R=S.useCallback(()=>{i(U=>{for(const A of U)A.status!=="uploading"&&a.current.delete(A.id);return U.filter(A=>A.status==="uploading")})},[]),O=S.useCallback(U=>{var A;g.current=U,(A=y.current)==null||A.click()},[]),F=S.useCallback(()=>{const U=y.current;if(U===null)return;const A=Array.from(U.files??[]);U.value="",A.length>0&&C(A,g.current)},[C]);return{uploads:s,enqueue:C,replace:T,cancel:E,retry:j,dismiss:I,clearFinished:R,openPicker:O,pickerInputRef:y,onPickerChange:F}}function Fo({title:e,onClose:n,children:s}){const i=S.useRef(null),a=S.useId(),u=mn();return S.useEffect(()=>{const c=f=>{f.key==="Escape"&&n()};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[n]),S.useEffect(()=>{const c=i.current;c!==null&&(c.contains(document.activeElement)||c.focus())},[]),h.jsx("div",{className:"fixed inset-0 z-[150] flex items-center justify-center bg-black/50 p-4 backdrop-blur-sm",onMouseDown:c=>{c.target===c.currentTarget&&n()},children:h.jsxs(qt.div,{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":a,tabIndex:-1,initial:u?{opacity:0}:{opacity:0,y:-12,scale:.97},animate:{opacity:1,y:0,scale:1},transition:{duration:.18,ease:"easeOut"},className:"glass-strong w-full max-w-md rounded-2xl border border-line p-6 outline-none",children:[h.jsxs("div",{className:"mb-4 flex items-start justify-between gap-4",children:[h.jsx("h2",{id:a,className:"text-[15px] font-semibold",children:e}),h.jsx("button",{type:"button","aria-label":"Close dialog",onClick:n,className:"muted grid h-8 w-8 shrink-0 place-items-center rounded-lg transition-colors hover:bg-bg-soft hover:text-gold-text",children:h.jsx(cn,{className:"h-4 w-4","aria-hidden":"true"})})]}),s]})})}function sw({title:e,label:n,confirmLabel:s,initialValue:i,pending:a,onSubmit:u,onClose:c}){const[f,p]=S.useState(i),y=S.useId(),g=f.trim(),v=g===i.trim(),x=k=>{k.preventDefault(),!(a||g===""||v)&&u(g)};return h.jsx(Fo,{title:e,onClose:c,children:h.jsxs("form",{onSubmit:x,noValidate:!0,children:[h.jsxs("label",{htmlFor:y,className:"grid gap-1.5",children:[h.jsx("span",{className:"text-[13px] font-medium",children:n}),h.jsx("input",{id:y,type:"text",autoFocus:!0,value:f,maxLength:255,disabled:a,onFocus:k=>k.target.select(),onChange:k=>p(k.target.value),className:"input"})]}),h.jsxs("div",{className:"mt-5 flex justify-end gap-2.5",children:[h.jsx("button",{type:"button",className:"btn-ghost",onClick:c,disabled:a,children:"Cancel"}),h.jsxs("button",{type:"submit",className:"btn-gold",disabled:a||g===""||v,children:[a&&h.jsx(Lt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),a?"Saving…":s]})]})]})})}const pv=["B","KB","MB","GB","TB","PB"];function jt(e){if(!Number.isFinite(e)||e<=0)return"0 B";let n=e,s=0;for(;n>=1024&&s<pv.length-1;)n/=1024,s+=1;const i=pv[s]??"B";return s===0?`${Math.round(n)} ${i}`:`${n.toFixed(1)} ${i}`}function Ob(e){const n=new Date(e);return Number.isNaN(n.getTime())?"":n.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function Ks(e){const n=new Date(e);return Number.isNaN(n.getTime())?"":n.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}const Fb=[{limit:60,divisor:1,unit:"second"},{limit:3600,divisor:60,unit:"minute"},{limit:86400,divisor:3600,unit:"hour"},{limit:604800,divisor:86400,unit:"day"},{limit:2629800,divisor:604800,unit:"week"},{limit:31557600,divisor:2629800,unit:"month"}];function lf(e,n=new Date){const s=new Date(e);if(Number.isNaN(s.getTime()))return"";const i=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),a=(s.getTime()-n.getTime())/1e3,u=Math.abs(a);for(const{limit:c,divisor:f,unit:p}of Fb)if(u<c)return i.format(Math.round(a/f),p);return i.format(Math.round(a/31557600),"year")}function Pn(e,n){return`${e} ${n}${e===1?"":"s"}`}function _b(e,n=new Date){const s=new Date(e);if(Number.isNaN(s.getTime()))return"Unknown";const i=u=>new Date(u.getFullYear(),u.getMonth(),u.getDate()).getTime(),a=Math.round((i(n)-i(s))/864e5);return a<=0?"Today":a===1?"Yesterday":s.toLocaleDateString(void 0,{month:"long",day:"numeric",year:"numeric"})}const Vb={image:u2,video:a2,audio:y2,archive:i2,pdf:Xc,text:Xc,document:Xc,other:o2},zb={image:"Image",video:"Video",audio:"Audio",archive:"Archive",pdf:"PDF",text:"Text",document:"Document",other:"File"},$b={image:"text-gold-text",video:"muted",audio:"muted",archive:"muted",pdf:"muted",text:"muted",document:"muted",other:"muted"};function Hn(e){const n=S2(e);return{Icon:Vb[n],label:zb[n],color:$b[n]}}function vi(e){return{kind:"file",id:e.id,name:e.name,size:e.size,mimeType:e.mimeType,starred:e.starred,trashed:e.trashed,deletedAt:e.deletedAt,createdAt:e.createdAt,updatedAt:e.updatedAt,versionCount:e.versionCount,file:e,folder:null}}function fh(e){return{kind:"folder",id:e.id,name:e.name,size:0,mimeType:"",starred:e.starred,trashed:e.trashed,deletedAt:e.deletedAt,createdAt:e.createdAt,updatedAt:e.updatedAt,versionCount:0,file:null,folder:e}}function sl(e){return{kind:e.kind,id:e.id}}function ln(e){return`${e.kind}:${e.id}`}function hh(e){return e==="list"||e==="grid"}function ph({label:e="Loading"}){return h.jsx("div",{role:"status","aria-label":e,className:"mt-10 flex justify-center",children:h.jsx(Lt,{className:"h-6 w-6 animate-spin text-gold","aria-hidden":"true"})})}const Ub="Try type:pdf size:>100MB folder:Projects starred:true after:2026-01-01";function mv({icon:e,label:n,meta:s,onSelect:i}){return h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center gap-3 rounded-xl border border-transparent px-3 py-2.5 text-left transition-colors hover:border-gold/40 hover:bg-bg-soft",children:[e,h.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",title:n,children:n}),h.jsx("span",{className:"muted shrink-0 text-[12px]",children:s})]})})}function Bb({query:e,onClose:n,onOpenFolder:s,onOpenFile:i}){var y,g;const a=mn(),u=Rr({queryKey:["search",e],queryFn:()=>we.search.query(e),enabled:e!=="",placeholderData:xk});S.useEffect(()=>{const v=x=>{x.key==="Escape"&&n()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[n]);const c=((y=u.data)==null?void 0:y.folders)??[],f=((g=u.data)==null?void 0:g.files)??[],p=c.length===0&&f.length===0;return h.jsx("div",{className:"fixed inset-0 z-[95] flex justify-center bg-black/40 p-4 pt-20",onMouseDown:v=>{v.target===v.currentTarget&&n()},children:h.jsxs(qt.div,{role:"dialog","aria-modal":"true","aria-label":`Search results for ${e}`,initial:a?{opacity:0}:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.18,ease:"easeOut"},className:"glass-strong flex max-h-[70dvh] w-full max-w-2xl flex-col overflow-hidden rounded-2xl border border-line",children:[h.jsxs("header",{className:"flex items-center gap-3 border-b border-line/70 px-5 py-4",children:[h.jsx(ox,{className:"h-4 w-4 shrink-0 text-gold","aria-hidden":"true"}),h.jsxs("h2",{className:"min-w-0 flex-1 truncate text-[14px] font-semibold",children:["Results for “",e,"”"]}),h.jsx("button",{type:"button","aria-label":"Close search",onClick:n,className:"muted grid h-8 w-8 shrink-0 place-items-center rounded-lg transition-colors hover:bg-bg-soft hover:text-gold-text",children:h.jsx(cn,{className:"h-4 w-4","aria-hidden":"true"})})]}),h.jsx("p",{className:"muted border-b border-line/70 px-5 py-2 font-mono text-[11.5px]",children:Ub}),h.jsx("div",{className:"flex-1 overflow-y-auto p-3",children:u.isPending?h.jsx(ph,{label:"Searching"}):u.error!==null?h.jsx("p",{role:"alert",className:"notice notice-error",children:Qe(u.error,"The search failed.")}):p?h.jsxs("div",{className:"flex flex-col items-center py-12 text-center",children:[h.jsx(v2,{className:"h-7 w-7 text-gold","aria-hidden":"true"}),h.jsxs("p",{className:"muted mt-3 text-sm",children:["No matches for “",e,"”."]})]}):h.jsxs(h.Fragment,{children:[c.length>0?h.jsxs("section",{className:"mb-3",children:[h.jsx("h3",{className:"eyebrow mb-2",children:"Folders"}),h.jsx("ul",{className:"grid gap-0.5",children:c.map(v=>h.jsx(mv,{icon:h.jsx(mi,{className:"h-4 w-4 shrink-0 text-gold","aria-hidden":"true"}),label:v.name,meta:"Folder",onSelect:()=>s(v)},v.id))})]}):null,f.length>0?h.jsxs("section",{children:[h.jsx("h3",{className:"eyebrow mb-2",children:"Files"}),h.jsx("ul",{className:"grid gap-0.5",children:f.map(v=>{const{Icon:x,color:k,label:C}=Hn(v.mimeType);return h.jsx(mv,{icon:h.jsx(x,{className:`h-4 w-4 shrink-0 ${k}`,"aria-hidden":"true"}),label:v.name,meta:`${jt(v.size)} · ${C}`,onSelect:()=>i(vi(v))},v.id)})})]}):null]})})]})})}const Hb=[{keys:"Ctrl/⌘ K",label:"Focus search"},{keys:"Enter",label:"Open the focused item"},{keys:"Delete",label:"Move selection to Trash"},{keys:"Ctrl/⌘ A",label:"Select all visible items"},{keys:"Esc",label:"Clear selection / close panels"},{keys:"Shift-click",label:"Select a range of items"},{keys:"Ctrl/⌘-click",label:"Add or remove one item"},{keys:"Click the ⋯",label:"Item actions menu"},{keys:"Right-click",label:"Context menu"},{keys:"?",label:"Show this help"}];function Kb({onClose:e}){return h.jsx(Fo,{title:"Keyboard shortcuts",onClose:e,children:h.jsx("dl",{className:"grid gap-2",children:Hb.map(n=>h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsx("dt",{className:"muted text-[13px]",children:n.label}),h.jsx("dd",{children:h.jsx("kbd",{className:"rounded-md border border-line-strong bg-surface px-2 py-1 font-mono text-[12px]",children:n.keys})})]},n.keys))})})}const Wb={DISCONNECTED:"Disconnected",CONNECTING:"Connecting",CONNECTED:"Connected",RECONNECTING:"Reconnecting",ERROR:"Connection error",AUTH_REQUIRED:"Reconnect required"};function Qb(e){if(e===null)return{tone:"text-muted",label:"Unknown",usable:!1,hint:null};const n=Wb[e.state];return e.state==="AUTH_REQUIRED"?{tone:"text-bad",label:n,usable:!1,hint:e.message??"Reconnect Telegram in Settings to keep syncing."}:e.state==="ERROR"||e.status==="unavailable"?{tone:"text-bad",label:n,usable:!1,hint:e.message??"The storage backend is unavailable right now."}:e.state==="CONNECTED"&&e.status==="healthy"?{tone:"text-ok",label:n,usable:!0,hint:null}:{tone:"text-gold-text",label:n,usable:e.state==="CONNECTED"||e.state==="CONNECTING"||e.state==="RECONNECTING",hint:e.message}}const qb=[{id:"drive",label:"My Drive",path:"/",icon:l2,regionLabel:"My Drive"},{id:"recent",label:"Recent",path:"/recent",icon:j0,regionLabel:"Recent files"},{id:"starred",label:"Starred",path:"/starred",icon:fs,regionLabel:"Starred items"},{id:"trash",label:"Trash",path:"/trash",icon:Pr,regionLabel:"Trash"},{id:"storage",label:"Storage",path:"/storage",icon:yo,regionLabel:"Storage"}];function Gb({tone:e,label:n}){return h.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[h.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full bg-current ${e}`,"aria-hidden":"true"}),h.jsx("span",{className:`text-[11px] font-medium ${e}`,children:n})]})}function yv({storage:e,health:n,username:s,onCreateFolder:i,onClose:a}){const u=Qb(n);return h.jsxs("div",{className:"flex h-full flex-col bg-bg-soft",children:[h.jsxs("div",{className:"flex items-center justify-between px-4 pt-4 pb-2",children:[h.jsx("span",{className:"eyebrow",children:"Drive"}),a!==void 0?h.jsx("button",{type:"button","aria-label":"Close navigation",onClick:a,className:"muted grid h-8 w-8 place-items-center rounded-lg transition-colors hover:bg-surface hover:text-gold-text md:hidden",children:h.jsx(cn,{className:"h-4 w-4","aria-hidden":"true"})}):null]}),h.jsx("nav",{"aria-label":"Main",className:"px-3",children:h.jsx("ul",{className:"grid gap-0.5",children:qb.map(c=>{const f=c.icon;return h.jsx("li",{children:h.jsxs(m0,{to:c.path,end:c.path==="/",onClick:()=>a==null?void 0:a(),className:({isActive:p})=>`flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm transition-colors ${p?"bg-surface font-medium text-gold-text":"muted hover:bg-surface hover:text-gold-text"}`,children:[h.jsx(f,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),c.label]})},c.id)})})}),h.jsx("div",{className:"px-3 pt-3",children:h.jsxs("button",{type:"button",className:"btn-secondary w-full justify-center",onClick:i,children:[h.jsx(U0,{className:"h-4 w-4","aria-hidden":"true"}),"New folder"]})}),h.jsx("div",{className:"mt-auto p-3",children:h.jsxs("div",{className:"rounded-2xl border border-line bg-surface p-4",children:[h.jsxs("div",{className:"flex items-center gap-2.5",children:[h.jsx(M0,{className:"h-5 w-5 shrink-0 text-gold","aria-hidden":"true"}),h.jsx("span",{className:"min-w-0 truncate text-sm font-medium",title:(e==null?void 0:e.title)??void 0,children:(e==null?void 0:e.title)??"No storage"})]}),h.jsx("div",{className:"mt-2",children:n!==null?h.jsx(Gb,{tone:u.tone,label:u.label}):h.jsx("span",{className:"muted text-[11px]",children:"Status unknown"})}),u.hint!==null?h.jsx("p",{className:`mt-1.5 text-[11px] leading-snug ${u.tone}`,children:u.hint}):null,h.jsxs("p",{className:"muted mt-2 flex items-center gap-1.5 font-mono text-[11px] uppercase tracking-wide",children:[h.jsx(yo,{className:"h-3 w-3","aria-hidden":"true"}),(e==null?void 0:e.provider)??"—"]}),h.jsx("div",{className:"hairline mt-3"}),s!==null&&s!==""?h.jsxs("p",{className:"muted mt-2.5 truncate font-mono text-[11px] select-all",children:["@",s]}):null]})})]})}const gv="omnicloud:theme-changed";function Yb(e){const n=s=>e(s.detail);return window.addEventListener(gv,n),()=>window.removeEventListener(gv,n)}const Xb=450;function Zb(){return document.documentElement.dataset.theme==="light"?"light":"dark"}function Jb({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[h.jsx("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"}),h.jsx("path",{d:"M20 2 21.1 3.9 23 5 21.1 6.1 20 8 18.9 6.1 17 5 18.9 3.9Z"})]})}function eR({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[h.jsx("circle",{cx:"12",cy:"12",r:"3.6"}),h.jsx("path",{d:"M12 1.6 13.6 4.6 12 7.6 10.4 4.6Z"}),h.jsx("path",{d:"M12 16.4 13.6 19.4 12 22.4 10.4 19.4Z"}),h.jsx("path",{d:"M1.6 12 4.6 10.4 7.6 12 4.6 13.6Z"}),h.jsx("path",{d:"M16.4 12 19.4 10.4 22.4 12 19.4 13.6Z"})]})}function iw({compact:e=!1}){const[n,s]=S.useState(Zb),i=mn();S.useEffect(()=>Yb(s),[]);const a=S.useRef(void 0);S.useEffect(()=>{document.documentElement.dataset.theme=n;try{localStorage.setItem("omnicloud-theme",n)}catch{}},[n]),S.useEffect(()=>()=>window.clearTimeout(a.current),[]);const u=n==="dark"?"light":"dark";function c(){if(!i){const y=document.documentElement;y.classList.add("theme-anim"),window.clearTimeout(a.current),a.current=window.setTimeout(()=>y.classList.remove("theme-anim"),Xb)}s(u)}const f=e?15:16,p=n==="light"?h.jsx(Jb,{size:f}):h.jsx(eR,{size:f});return h.jsx("button",{type:"button",onClick:c,"aria-label":`Switch to ${u} theme`,title:`Switch to ${u} theme`,className:`theme-toggle relative grid place-items-center rounded-full ${e?"h-7 w-7":"h-9 w-9"}`,children:i?p:h.jsx(Dr,{mode:"wait",initial:!1,children:h.jsx(qt.span,{className:"grid place-items-center",initial:{opacity:0,scale:.4,rotate:-120},animate:{opacity:1,scale:1,rotate:0,transition:{duration:.3,ease:[.34,1.56,.64,1]}},exit:{opacity:0,scale:.4,rotate:120,transition:{duration:.15,ease:"easeIn"}},children:p},n)})})}function tR({storage:e,displayName:n,username:s,search:i,onUpload:a,onToggleSidebar:u,onOpenHelp:c,onSignOut:f,signingOut:p}){const[y,g]=S.useState(!1),v=mn(),x=n.charAt(0).toUpperCase()||"?",k=S.useCallback(()=>g(!1),[]);S.useEffect(()=>{if(!y)return;const E=I=>{var R,O;(O=(R=I.target).closest)!=null&&O.call(R,"[data-account-menu]")||g(!1)},j=I=>{I.key==="Escape"&&g(!1)};return document.addEventListener("pointerdown",E),document.addEventListener("keydown",j),()=>{document.removeEventListener("pointerdown",E),document.removeEventListener("keydown",j)}},[y]);const C=v?0:-6,T=S.useId();return h.jsxs("header",{className:"nav-blur sticky top-0 z-50 flex h-14 shrink-0 items-center gap-3 border-b border-line/70 px-4 md:px-6",children:[h.jsx("button",{type:"button","aria-label":"Open navigation",onClick:u,className:"muted grid h-9 w-9 shrink-0 place-items-center rounded-lg transition-colors hover:bg-surface hover:text-gold-text md:hidden",children:h.jsx(m2,{className:"h-5 w-5","aria-hidden":"true"})}),h.jsxs("a",{href:"/",className:"flex shrink-0 items-center gap-2.5 text-[15px] font-semibold tracking-tight",children:[h.jsx("span",{className:"text-lg leading-none text-gold",children:"◈"}),h.jsxs("span",{className:"hidden sm:inline",children:["Omni",h.jsx("span",{className:"muted font-normal",children:"Cloud"})]})]}),h.jsxs("div",{className:"relative ml-1 min-w-0 max-w-md flex-1",children:[h.jsx("label",{htmlFor:T,className:"sr-only",children:"Search files and folders"}),h.jsx(ox,{className:"muted pointer-events-none absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2","aria-hidden":"true"}),h.jsx("input",{id:T,ref:i.inputRef,type:"search",placeholder:"Search (Ctrl/⌘K)",value:i.value,onChange:E=>i.onChange(E.target.value),className:"input h-9 rounded-full py-0 pl-9"})]}),h.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2.5",children:[h.jsx("button",{type:"button",onClick:c,"aria-label":"Keyboard shortcuts",title:"Keyboard shortcuts (?)",className:"muted hidden h-9 w-9 place-items-center rounded-full border border-line-strong bg-surface transition-colors hover:border-gold hover:text-gold-text sm:grid",children:h.jsx(d2,{className:"h-4 w-4","aria-hidden":"true"})}),h.jsxs("button",{type:"button",className:"btn-gold hidden px-3.5 py-2 text-[13px] sm:inline-flex",onClick:a,children:[h.jsx(Sl,{className:"h-4 w-4","aria-hidden":"true"}),"Upload"]}),h.jsx(iw,{}),h.jsxs("div",{className:"relative","data-account-menu":!0,children:[h.jsx("button",{type:"button","aria-label":"Account","aria-haspopup":"menu","aria-expanded":y,onClick:()=>g(E=>!E),className:"muted flex h-9 w-9 shrink-0 items-center justify-center rounded-full border border-line-strong bg-surface text-sm font-semibold transition-colors hover:border-gold hover:text-gold-text",children:x}),h.jsx(Dr,{children:y?h.jsxs(qt.div,{initial:{opacity:0,y:C},animate:{opacity:1,y:0},exit:{opacity:0,y:C},transition:{duration:.15,ease:"easeOut"},className:"menu-panel absolute top-full right-0 z-50 mt-2 w-60",children:[h.jsxs("div",{className:"border-b border-line/70 px-3 py-2.5",children:[h.jsx("p",{className:"truncate text-[13px] font-semibold",children:n}),h.jsx("p",{className:"muted truncate text-[12px]",children:s!==null&&s!==""?`@${s}`:"Telegram account"})]}),h.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[h.jsx(yo,{className:"h-4 w-4 shrink-0 text-gold","aria-hidden":"true"}),h.jsxs("span",{className:"min-w-0 flex-1",children:[h.jsx("span",{className:"block truncate text-[13px] font-medium",title:(e==null?void 0:e.title)??void 0,children:(e==null?void 0:e.title)??"No storage"}),h.jsx("span",{className:"muted block truncate text-[11px] uppercase tracking-wide",children:(e==null?void 0:e.provider)??"—"})]})]}),h.jsxs("button",{type:"button",onClick:()=>{k(),f()},disabled:p,className:"menu-item menu-item-danger",children:[h.jsx(p2,{className:"h-4 w-4","aria-hidden":"true"}),p?"Signing out...":"Sign out"]})]},"account-menu"):null})]})]})]})}function nR(e){return e==="uploading"?h.jsx(Lt,{className:"h-4 w-4 shrink-0 animate-spin text-gold-text","aria-hidden":"true"}):e==="done"?h.jsx(jf,{className:"h-4 w-4 shrink-0 text-ok","aria-hidden":"true"}):e==="cancelled"?h.jsx(cn,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}):h.jsx(cn,{className:"h-4 w-4 shrink-0 text-bad","aria-hidden":"true"})}function rR({uploads:e,onCancel:n,onRetry:s,onDismiss:i,onClearFinished:a}){if(e.length===0)return null;const u=e.some(c=>c.status!=="uploading");return h.jsxs("section",{"aria-label":"Upload progress",className:"glass-strong fixed bottom-4 left-4 z-40 w-80 max-w-[calc(100vw-2rem)] overflow-hidden rounded-2xl border border-line",children:[h.jsxs("header",{className:"flex items-center justify-between border-b border-line/70 px-4 py-3",children:[h.jsxs("h2",{className:"flex items-center gap-2 text-[13px] font-semibold",children:[h.jsx(Sl,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"Uploads"]}),u?h.jsx("button",{type:"button",onClick:a,className:"muted rounded px-1.5 py-0.5 text-xs transition-colors hover:bg-bg-soft hover:text-gold-text",children:"Clear finished"}):null]}),h.jsx("ul",{className:"max-h-72 divide-y divide-line/70 overflow-y-auto p-1.5",children:e.map(c=>h.jsxs("li",{className:"px-2.5 py-2.5",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[nR(c.status),h.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px]",title:c.name,children:c.name}),c.status==="uploading"?h.jsxs("span",{className:"muted shrink-0 text-[12px] tabular-nums",children:[jt(c.loaded)," / ",jt(c.size)]}):h.jsx("span",{className:"muted shrink-0 text-[12px] tabular-nums",children:jt(c.size)})]}),c.status==="uploading"?h.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[h.jsx("div",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-surface-2",children:h.jsx("div",{className:"progress-fill",style:{width:`${c.percent}%`}})}),h.jsxs("span",{className:"muted w-9 shrink-0 text-right text-[11px] tabular-nums",children:[c.percent,"%"]}),h.jsx("button",{type:"button","aria-label":`Cancel upload of ${c.name}`,onClick:()=>n(c.id),className:"muted rounded p-0.5 transition-colors hover:bg-bg-soft hover:text-bad",children:h.jsx(cn,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]}):c.status==="error"||c.status==="cancelled"?h.jsxs("div",{className:"mt-1.5 flex items-center justify-between gap-2",children:[h.jsx("p",{className:`min-w-0 flex-1 text-xs ${c.status==="error"?"text-bad":"muted"}`,children:c.message??"Cancelled"}),h.jsxs("button",{type:"button",className:"muted inline-flex shrink-0 items-center gap-1 rounded px-1.5 py-0.5 text-xs transition-colors hover:bg-bg-soft hover:text-gold-text",onClick:()=>s(c.id),children:[h.jsx(Rf,{className:"h-3.5 w-3.5","aria-hidden":"true"}),"Retry"]}),h.jsx("button",{type:"button","aria-label":`Dismiss upload of ${c.name}`,onClick:()=>i(c.id),className:"muted shrink-0 rounded p-0.5 transition-colors hover:bg-bg-soft hover:text-gold-text",children:h.jsx(cn,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]}):h.jsx("div",{className:"mt-1.5 flex justify-end",children:h.jsx("button",{type:"button","aria-label":`Dismiss upload of ${c.name}`,onClick:()=>i(c.id),className:"muted rounded p-0.5 transition-colors hover:bg-bg-soft hover:text-gold-text",children:h.jsx(cn,{className:"h-3.5 w-3.5","aria-hidden":"true"})})})]},c.id))})]})}function sR(){var le,q,L;const e=dh(),n=fn(),s=pi(),i=ps(),a=Ib(),u=mn(),c=((le=e.data)==null?void 0:le.storage)??null,f=((q=e.data)==null?void 0:q.health)??null,p=S.useRef(null),[y,g]=S.useState(""),x=Tb(y,300).trim(),[k,C]=S.useState(!1),[T,E]=S.useState(!1),[j,I]=S.useState(!1),[R,O]=S.useState(null),[F,U]=S.useState(null),A=S.useRef(null);A.current=F;const _=Kt({mutationFn:D=>we.folders.create(D,R),onSuccess:D=>{hs(n),I(!1),i.success(`Created "${D.folder.name}"`)},onError:D=>i.error(Qe(D,"Could not create folder"))}),B=Kt({mutationFn:we.auth.logout,onSuccess:()=>{n.setQueryData(Oo,tw),n.removeQueries({predicate:D=>D.queryKey[0]!=="me"})},onError:D=>i.error(Qe(D,"Could not sign out"))}),Y=S.useCallback(()=>{var D,ee;(D=p.current)==null||D.focus(),(ee=p.current)==null||ee.select()},[]),ne=S.useCallback(()=>g(""),[]);Nb({onSearch:Y,onDelete:()=>{var D,ee;return(ee=(D=A.current)==null?void 0:D.onDelete)==null?void 0:ee.call(D)},onEnter:()=>{var D,ee;return(ee=(D=A.current)==null?void 0:D.onEnter)==null?void 0:ee.call(D)},onSelectAll:()=>{var D,ee;return(ee=(D=A.current)==null?void 0:D.onSelectAll)==null?void 0:ee.call(D)},onEscape:()=>{var D,ee;(ee=(D=A.current)==null?void 0:D.onEscape)==null||ee.call(D),T?E(!1):k?C(!1):x!==""&&g("")},onHelp:()=>E(D=>!D)},!0),S.useEffect(()=>{if(k)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[k]);const G=((L=e.data)==null?void 0:L.user)??null,X=G!==null?G.firstName??G.username??"Account":"Account",fe=(G==null?void 0:G.username)??null,Se={uploads:a,activeFolderId:R,setActiveFolderId:O,openCreateFolder:()=>I(!0),clearSearch:ne,openShortcuts:()=>E(!0),searchInputRef:p,registerPageShortcuts:U},ge=D=>{g(""),s(`/?folder=${encodeURIComponent(D)}`)},ke=D=>{D.file!==null&&we.files.download(D.file.id),ne()},Z=u?0:-20;return h.jsx(ew.Provider,{value:Se,children:h.jsxs("div",{className:"flex h-dvh",children:[h.jsx("a",{href:"#main",className:"skip-link btn-gold",children:"Skip to content"}),h.jsx("aside",{className:"hidden w-60 shrink-0 border-r border-line md:block",children:h.jsx(yv,{storage:c,health:f,username:fe,onCreateFolder:()=>I(!0)})}),h.jsx(Dr,{children:k?h.jsxs("div",{className:"fixed inset-0 z-[80] md:hidden",children:[h.jsx(qt.div,{className:"absolute inset-0 bg-black/50",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>C(!1),"aria-hidden":"true"}),h.jsx(qt.div,{initial:{x:Z,opacity:0},animate:{x:0,opacity:1},exit:{x:Z,opacity:0},transition:{duration:.2,ease:"easeOut"},className:"absolute top-0 bottom-0 left-0 w-64 border-r border-line",children:h.jsx(yv,{storage:c,health:f,username:fe,onCreateFolder:()=>{C(!1),I(!0)},onClose:()=>C(!1)})})]}):null}),h.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[h.jsx(tR,{storage:c,displayName:X,username:fe,search:{value:y,onChange:g,inputRef:p},onUpload:()=>a.openPicker(R),onToggleSidebar:()=>C(!0),onOpenHelp:()=>E(!0),onSignOut:()=>B.mutate(),signingOut:B.isPending}),h.jsx("main",{id:"main",className:"relative flex-1 overflow-y-auto",children:h.jsx(rE,{})})]}),h.jsx("input",{ref:a.pickerInputRef,type:"file",multiple:!0,className:"hidden","aria-hidden":"true",tabIndex:-1,onChange:a.onPickerChange}),h.jsx(rR,{uploads:a.uploads,onCancel:a.cancel,onRetry:a.retry,onDismiss:a.dismiss,onClearFinished:a.clearFinished}),j?h.jsx(sw,{title:"Create folder",label:"Folder name",confirmLabel:"Create",initialValue:"",pending:_.isPending,onSubmit:D=>_.mutate(D),onClose:()=>I(!1)}):null,T?h.jsx(Kb,{onClose:()=>E(!1)}):null,x!==""?h.jsx(Bb,{query:x,onClose:ne,onOpenFolder:D=>ge(D.id),onOpenFile:ke}):null]})})}function mh(e){const n=new Map;for(const a of e)n.set(a.id,{folder:a,children:[]});const s=[];for(const a of n.values()){const u=a.folder.parentId===null?void 0:n.get(a.folder.parentId);u===void 0?s.push(a):u.children.push(a)}const i=a=>{a.sort((u,c)=>u.folder.name.localeCompare(c.folder.name));for(const u of a)i(u.children);return a};return i(s)}function ow(e,n){for(const s of e){if(s.folder.id===n)return s.folder;const i=ow(s.children,n);if(i!==null)return i}return null}function iR(e,n){if(n===null)return[];const s=[],i=new Set;let a=n;for(;a!==null&&!i.has(a);){i.add(a);const u=ow(e,a);if(u===null)break;s.unshift(u),a=u.parentId}return s}function yh(e,n){const s=[],i=u=>{s.push(u.folder.id);for(const c of u.children)i(c)},a=u=>{for(const c of u){if(c.folder.id===n)return i(c),!0;if(a(c.children))return!0}return!1};return a(e),s}function To({queryKey:e,queryFn:n,enabled:s=!0}){var f;const i=Yk({queryKey:e,enabled:s,initialPageParam:1,queryFn:({pageParam:p})=>n(p),getNextPageParam:p=>p.pagination.hasMore?p.pagination.page+1:void 0}),a=((f=i.data)==null?void 0:f.pages)??[],u=a.flatMap(p=>p.items),c=a[a.length-1];return{items:u,pagination:(c==null?void 0:c.pagination)??null,isLoading:i.isPending,isLoadingMore:i.isFetchingNextPage,isFetching:i.isFetching,isError:i.isError,error:i.error,hasMore:i.hasNextPage,loadMore:()=>{i.fetchNextPage()},refetch:()=>{i.refetch()}}}function aw({title:e,message:n,confirmLabel:s="Confirm",destructive:i=!1,busy:a=!1,onConfirm:u,onClose:c}){return h.jsxs(Fo,{title:e,onClose:c,children:[h.jsxs("div",{className:"flex items-start gap-3",children:[i?h.jsx(wl,{className:"mt-0.5 h-5 w-5 shrink-0 text-bad","aria-hidden":"true"}):null,h.jsx("div",{className:"text-[13.5px] leading-relaxed",children:n})]}),h.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[h.jsx("button",{type:"button",className:"btn-ghost",onClick:c,disabled:a,children:"Cancel"}),h.jsx("button",{type:"button",autoFocus:!0,className:i?"btn-danger":"btn-gold",onClick:u,disabled:a,children:a?"Working…":s})]})]})}function oR(e,n){const s=yh(n,e);return Promise.all(s.map(i=>we.files.list({folderId:i,limit:200}))).then(i=>i.reduce((a,u)=>a+u.files.length,0))}function aR({folder:e,tree:n,onClose:s}){const i=fn(),a=ps(),u=Rr({queryKey:["subtree-files",e.id],queryFn:()=>oR(e.id,n),staleTime:0}),c=Kt({mutationFn:()=>we.folders.delete(e.id),onSuccess:g=>{hs(i),a.success(`Deleted ${Pn(g.affectedFolders,"folder")} and ${Pn(g.affectedFiles,"file")}`),s()},onError:g=>a.error(Qe(g,"Could not delete folder"))}),f=yh(n,e.id).length-1,p=u.data;let y=`the folder "${e.name}"`;return f>0&&(y+=` and its ${Pn(f,"subfolder")}`),p!==void 0?y+=` and ${Pn(p,"file")}`:y+=" and all files inside it",h.jsxs(Fo,{title:`Delete "${e.name}"?`,onClose:s,children:[h.jsxs("section",{className:"rounded-2xl border border-bad/40 p-5",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(wl,{className:"h-4 w-4 shrink-0 text-bad","aria-hidden":"true"}),h.jsx("h3",{className:"text-[15px] font-semibold",children:"Danger zone"})]}),h.jsxs("p",{className:"muted mt-1.5 text-[13px] leading-relaxed",children:["This will permanently delete ",y,". This action cannot be undone."]})]}),h.jsxs("div",{className:"mt-5 flex justify-end gap-2.5",children:[h.jsx("button",{type:"button",className:"btn-ghost",onClick:s,disabled:c.isPending,children:"Cancel"}),h.jsxs("button",{type:"button",className:"btn-danger",onClick:()=>c.mutate(),disabled:c.isPending,children:[c.isPending&&h.jsx(Lt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),"Delete"]})]})]})}function vv(e){var n,s;return e.kind==="file"?((n=e.file)==null?void 0:n.folderId)??null:((s=e.folder)==null?void 0:s.parentId)??null}function lw({nodes:e,depth:n,groupName:s,selectedId:i,disabledIds:a,collapsedIds:u,onToggle:c,onSelect:f}){return h.jsx("ul",{className:"space-y-0.5",children:e.map(p=>{const y=p.folder.id,g=a.has(y),v=p.children.length>0,x=u.has(y);return h.jsxs("li",{children:[h.jsxs("div",{className:`flex items-center gap-1 rounded-lg pr-2 transition-colors ${g?"":"hover:bg-surface"}`,style:{paddingLeft:`${n*1.25+.375}rem`},children:[v?h.jsx("button",{type:"button","aria-label":x?`Expand ${p.folder.name}`:`Collapse ${p.folder.name}`,"aria-expanded":!x,onClick:()=>c(y),className:"muted shrink-0 rounded p-0.5 transition-colors hover:text-gold-text",children:h.jsx(JE,{className:`h-3.5 w-3.5 transition-transform ${x?"-rotate-90":""}`,"aria-hidden":"true"})}):h.jsx("span",{className:"w-[1.125rem] shrink-0","aria-hidden":"true"}),h.jsxs("label",{className:`flex min-w-0 flex-1 items-center gap-2.5 py-1.5 text-sm ${g?"cursor-not-allowed":"cursor-pointer"}`,children:[h.jsx("input",{type:"radio",name:s,value:y,checked:i===y,disabled:g,onChange:()=>f(y),className:"h-3.5 w-3.5",style:{accentColor:"var(--gold)"}}),h.jsx(mi,{className:`h-4 w-4 shrink-0 ${g?"muted":"text-gold"}`,"aria-hidden":"true"}),h.jsx("span",{className:`min-w-0 truncate ${g?"muted opacity-60":""}`,children:p.folder.name})]})]}),v&&!x?h.jsx(lw,{nodes:p.children,depth:n+1,groupName:s,selectedId:i,disabledIds:a,collapsedIds:u,onToggle:c,onSelect:f}):null]},y)})})}function lR({targets:e,onClose:n,onMoved:s}){const i=fn(),a=ps(),u=Rr({queryKey:ch,queryFn:we.folders.tree}),c=S.useMemo(()=>{var j;return mh(((j=u.data)==null?void 0:j.folders)??[])},[u.data]),f=e[0],[p,y]=S.useState(()=>f===void 0?null:vv(f)),[g,v]=S.useState(new Set),x=e.length===1&&f!==void 0?`"${f.name}"`:`${e.length} items`,k=S.useMemo(()=>{var I;const j=new Set;for(const R of e)if(R.kind==="folder")for(const O of yh(c,((I=R.folder)==null?void 0:I.id)??R.id))j.add(O);return j},[c,e]),C=Kt({mutationFn:async()=>{await Promise.all(e.map(j=>j.kind==="file"?we.files.move(j.id,p):we.folders.move(j.id,p)))},onSuccess:()=>{hs(i),a.success(`Moved ${x}`),s==null||s(),n()},onError:j=>a.error(Qe(j,"Could not move item"))}),T=e.every(j=>vv(j)===p),E=j=>{v(I=>{const R=new Set(I);return R.has(j)?R.delete(j):R.add(j),R})};return h.jsxs(Fo,{title:`Move ${x}`,onClose:n,children:[h.jsx("p",{className:"muted text-[13px]",children:"Choose a destination folder."}),h.jsxs("fieldset",{"aria-label":"Destination folder",className:"mt-3 max-h-72 overflow-y-auto rounded-xl border border-line bg-bg-soft p-2",children:[h.jsxs("label",{className:`flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-sm transition-colors ${p===null?"bg-surface":"hover:bg-surface"}`,children:[h.jsx("input",{type:"radio",name:"move-target",checked:p===null,onChange:()=>y(null),className:"h-3.5 w-3.5",style:{accentColor:"var(--gold)"}}),h.jsx(mi,{className:"h-4 w-4 shrink-0 text-gold","aria-hidden":"true"}),h.jsx("span",{children:"My Drive (root)"})]}),h.jsx(lw,{nodes:c,depth:0,groupName:"move-target",selectedId:p,disabledIds:k,collapsedIds:g,onToggle:E,onSelect:y})]}),u.isPending?h.jsx("p",{className:"muted mt-2 text-[13px]",children:"Loading folders..."}):null,h.jsxs("div",{className:"mt-5 flex justify-end gap-2.5",children:[h.jsx("button",{type:"button",className:"btn-ghost",onClick:n,disabled:C.isPending,children:"Cancel"}),h.jsxs("button",{type:"button",className:"btn-gold",disabled:T||C.isPending,onClick:()=>C.mutate(),children:[C.isPending&&h.jsx(Lt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),C.isPending?"Moving...":"Move"]})]})]})}function xv(e){const n=e[0];return e.length===1&&n!==void 0?`"${n.name}"`:`${e.length} items`}function gh({onOpenItem:e,onShowDetails:n,onReplaceFile:s}){var ne;const i=fn(),a=ps(),[u,c]=S.useState(null),[f,p]=S.useState(null),[y,g]=S.useState(null),[v,x]=S.useState(null),k=S.useRef(null),C=S.useRef(null),T=Rr({queryKey:ch,queryFn:we.folders.tree}),E=S.useCallback(G=>{hs(i),a.success(G)},[i,a]),j=Kt({mutationFn:async G=>{if(G.item.kind==="file"){const{file:fe}=await we.files.update(G.item.id,{name:G.name});return{name:fe.name}}const{folder:X}=await we.folders.update(G.item.id,{name:G.name});return{name:X.name}},onSuccess:(G,X)=>{c(null),E(`Renamed to "${X.name}"`)},onError:G=>a.error(Qe(G,"Could not rename item"))}),I=Kt({mutationFn:async G=>{const X=[],fe=[];for(const ge of G.items)ge.kind==="file"?X.push(ge.id):fe.push(ge.id);const Se=[];return X.length>0&&Se.push(await we.files.batch({operation:G.operation,ids:X,...G.folderId!==void 0?{folderId:G.folderId}:{}})),fe.length>0&&Se.push(await we.folders.batch({operation:G.operation,ids:fe,...G.folderId!==void 0?{folderId:G.folderId}:{}})),Se.reduce((ge,ke)=>({requested:ge.requested+ke.requested,succeeded:ge.succeeded+ke.succeeded,failed:ge.failed+ke.failed}),{requested:0,succeeded:0,failed:0})},onSuccess:(G,X)=>{hs(i);const fe=xv(X.items);G.failed>0?a.error(`${G.succeeded} of ${G.requested} succeeded — ${G.failed} failed`):a.success(`Updated ${fe}`),g(null),p(null)},onError:G=>a.error(Qe(G,"The operation failed"))}),R=S.useCallback(G=>{G.length>0&&p(G)},[]),O=S.useCallback(G=>{if(G.length===0)return;const X=G.length===1?G[0]:void 0;if(X!==void 0&&X.kind==="folder"){x(X);return}g(G)},[]),F=S.useCallback((G,X,fe)=>{X.length!==0&&I.mutate({operation:G,items:X,...fe!==void 0?{folderId:fe}:{}})},[I]),U=S.useCallback(G=>{var X;C.current=G,(X=k.current)==null||X.click()},[]),A=S.useCallback((G,X)=>{switch(G){case"open":e(X);return;case"download":X.kind==="file"&&we.files.download(X.id);return;case"rename":c(X);return;case"move":R([X]);return;case"star":F("star",[X]);return;case"unstar":F("unstar",[X]);return;case"replace":U(X);return;case"details":n(X);return;case"trash":F("trash",[X]);return;case"restore":F("restore",[X]);return;case"delete":O([X]);return;default:return}},[e,n,R,U,O,F]),_=mh(((ne=T.data)==null?void 0:ne.folders)??[]),B=y!==null?xv(y):"",Y=h.jsxs(h.Fragment,{children:[h.jsx("input",{ref:k,type:"file",className:"hidden","aria-hidden":"true",tabIndex:-1,onChange:G=>{var ge;const X=G.currentTarget,fe=(ge=X.files)==null?void 0:ge[0],Se=C.current;X.value="",fe!==void 0&&Se!==null&&s(fe,Se.id),C.current=null}}),u!==null?h.jsx(sw,{title:u.kind==="file"?"Rename file":"Rename folder",label:"Name",confirmLabel:"Rename",initialValue:u.name,pending:j.isPending,onSubmit:G=>j.mutate({item:u,name:G}),onClose:()=>c(null)}):null,f!==null?h.jsx(lR,{targets:f,onClose:()=>p(null)}):null,v!==null&&v.folder!==null?h.jsx(aR,{folder:v.folder,tree:_,onClose:()=>x(null)}):null,y!==null?h.jsx(aw,{title:`Delete ${B}?`,message:`This will permanently delete ${B}. This action cannot be undone.`,confirmLabel:"Delete permanently",destructive:!0,busy:I.isPending,onConfirm:()=>F("delete",y),onClose:()=>g(null)}):null]});return{handleAction:A,openMove:R,requestDelete:O,runBatch:F,pendingBatch:I.isPending,dialogs:Y}}function vh(e,n,s){const[i,a]=S.useState(()=>{try{const c=localStorage.getItem(e);if(c!==null&&(s===void 0||s(c)))return c}catch{}return n});S.useEffect(()=>{try{localStorage.setItem(e,i)}catch{}},[e,i]);const u=S.useCallback(c=>a(c),[]);return[i,u]}function xh(e,n=!0){const{registerPageShortcuts:s}=Hl();S.useEffect(()=>{if(!n){s(null);return}return s(e),()=>s(null)})}function md(e){return`${e.kind}:${e.id}`}function wh(){const[e,n]=S.useState(()=>new Set),s=S.useRef(null),i=S.useCallback(g=>e.has(g),[e]),a=S.useCallback(()=>{n(new Set),s.current=null},[]),u=S.useCallback(g=>{const v=md(g);n(new Set([v])),s.current=v},[]),c=S.useCallback((g,v={})=>{const x=md(g),{orderedKeys:k,range:C}=v;if(C===!0&&s.current!==null&&k!==void 0){const T=k.indexOf(s.current),E=k.indexOf(x);if(T!==-1&&E!==-1){const[j,I]=T<E?[T,E]:[E,T];n(R=>{const O=new Set(R);for(let F=j;F<=I;F+=1){const U=k[F];U!==void 0&&O.add(U)}return O});return}}n(T=>{const E=new Set(T);return E.has(x)?E.delete(x):E.add(x),E}),s.current=x},[]),f=S.useCallback(g=>{n(new Set(g)),s.current=g[0]??null},[]),p=S.useCallback(g=>{const v=new Set(g);n(x=>{let k=!1;const C=new Set;for(const T of x)v.has(T)?C.add(T):k=!0;return k?C:x})},[]),y=S.useCallback(g=>e.has(md(g)),[e]);return S.useMemo(()=>({selected:e,count:e.size,isSelected:i,has:y,select:u,toggle:c,clear:a,selectAll:f,prune:p}),[e,i,y,u,c,a,f,p])}function uR({path:e,onNavigate:n}){return h.jsx("nav",{"aria-label":"Breadcrumb",className:"min-w-0",children:h.jsxs("ol",{className:"flex items-center gap-0.5 text-sm",children:[h.jsx("li",{className:"shrink-0",children:h.jsx("button",{type:"button",onClick:()=>n(null),"aria-current":e.length===0?"page":void 0,className:`rounded px-1.5 py-1 transition-colors ${e.length===0?"font-medium text-gold-text":"muted hover:text-gold-text"}`,children:"My Drive"})}),e.map((s,i)=>{const a=i===e.length-1;return h.jsxs("li",{className:"flex min-w-0 items-center gap-0.5",children:[h.jsx(e2,{className:"muted h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),h.jsx("button",{type:"button",onClick:()=>n(s.id),"aria-current":a?"page":void 0,title:s.name,className:`max-w-[14rem] truncate rounded px-1.5 py-1 transition-colors ${a?"font-medium text-gold-text":"muted hover:text-gold-text"}`,children:s.name})]},s.id)})]})})}function Sh({menu:e,onClose:n}){const s=mn(),i=S.useRef(null);S.useEffect(()=>{if(e===null)return;const f=y=>{var g;y.target instanceof Node&&((g=i.current)==null?void 0:g.contains(y.target))===!1&&n()},p=y=>{y.key==="Escape"&&n()};return document.addEventListener("pointerdown",f),document.addEventListener("keydown",p),window.addEventListener("resize",n),window.addEventListener("scroll",n,!0),()=>{document.removeEventListener("pointerdown",f),document.removeEventListener("keydown",p),window.removeEventListener("resize",n),window.removeEventListener("scroll",n,!0)}},[e,n]);const a=s?0:-4,c=e===null?void 0:{left:Math.min(e.x,Math.max(0,window.innerWidth-224-8)),top:Math.min(e.y,Math.max(0,window.innerHeight-240))};return h.jsx(Dr,{children:e!==null?h.jsx(qt.div,{ref:i,role:"menu","aria-label":e.label,initial:{opacity:0,y:a},animate:{opacity:1,y:0},exit:{opacity:0,y:a},transition:{duration:.13,ease:"easeOut"},style:c,className:"menu-panel fixed z-[120] w-56",children:e.items.map(f=>h.jsxs("button",{role:"menuitem",type:"button",disabled:f.disabled===!0,onClick:()=>{n(),f.onSelect()},className:`menu-item text-left ${f.danger===!0?"menu-item-danger":""}`,children:[f.icon,f.label]},f.label))}):null})}function mr({label:e,children:n}){return h.jsxs("div",{children:[h.jsx("dt",{className:"muted text-[11px] font-semibold tracking-wide uppercase",children:e}),h.jsx("dd",{className:"mt-1 text-[13.5px] break-words",children:n})]})}function cR({item:e}){if(e.kind==="folder")return h.jsx(mi,{className:"h-6 w-6 shrink-0 text-gold","aria-hidden":"true"});const{Icon:n,color:s}=Hn(e.mimeType);return h.jsx(n,{className:`h-6 w-6 shrink-0 ${s}`,"aria-hidden":"true"})}function _o({item:e,onClose:n,onAction:s}){var a,u,c;const i=mn();return S.useEffect(()=>{if(e===null)return;const f=p=>{p.key==="Escape"&&n()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,n]),e===null?null:h.jsxs("div",{className:"fixed inset-0 z-[100] flex items-end justify-end sm:items-stretch",children:[h.jsx("div",{className:"absolute inset-0 bg-black/40",onClick:n,"aria-hidden":"true"}),h.jsxs(qt.aside,{role:"dialog","aria-modal":"true","aria-label":`Details for ${e.name}`,initial:i?{opacity:0}:{x:"100%"},animate:i?{opacity:1}:{x:0},transition:{duration:.22,ease:"easeOut"},className:"glass-strong relative flex max-h-[85dvh] w-full flex-col rounded-t-2xl border border-line sm:h-full sm:max-h-none sm:w-96 sm:rounded-none sm:border-r-0",children:[h.jsxs("header",{className:"flex items-start justify-between gap-3 border-b border-line/70 px-5 py-4",children:[h.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[h.jsx(cR,{item:e}),h.jsx("h2",{className:"min-w-0 text-[15px] font-semibold break-words",children:e.name})]}),h.jsx("button",{type:"button","aria-label":"Close details",onClick:n,className:"muted grid h-8 w-8 shrink-0 place-items-center rounded-lg transition-colors hover:bg-bg-soft hover:text-gold-text",children:h.jsx(cn,{className:"h-4 w-4","aria-hidden":"true"})})]}),h.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:[e.trashed?null:h.jsx("div",{className:"flex flex-wrap gap-2",children:e.kind==="file"?h.jsxs(h.Fragment,{children:[h.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>s("download",e),children:[h.jsx(bf,{className:"h-4 w-4","aria-hidden":"true"}),"Download"]}),h.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>s("replace",e),children:[h.jsx(nx,{className:"h-4 w-4","aria-hidden":"true"}),"New version"]})]}):null}),h.jsxs("dl",{className:"mt-5 grid gap-4",children:[h.jsxs(mr,{label:"Type",children:[e.kind==="folder"?"Folder":Hn(e.mimeType).label,e.kind==="file"?h.jsxs("span",{className:"muted",children:[" · ",e.mimeType]}):null]}),e.kind==="file"?h.jsx(mr,{label:"Size",children:jt(e.size)}):null,e.kind==="file"?h.jsx(mr,{label:"SHA-256",children:h.jsx("code",{className:"font-mono text-[12px] break-all select-all",children:((a=e.file)==null?void 0:a.sha256)??""})}):null,h.jsx(mr,{label:"Folder",children:e.kind==="file"?((u=e.file)==null?void 0:u.folderId)??"My Drive":((c=e.folder)==null?void 0:c.parentId)??"My Drive"}),h.jsx(mr,{label:"Created",children:Ks(e.createdAt)}),h.jsx(mr,{label:"Modified",children:Ks(e.updatedAt)}),e.trashed&&e.deletedAt!==null?h.jsx(mr,{label:"Deleted",children:Ks(e.deletedAt)}):null,e.kind==="file"?h.jsx(mr,{label:"Versions",children:Pn(e.versionCount,"version")}):null]}),e.kind==="file"?h.jsx(dR,{fileId:e.id,versionCount:e.versionCount}):null]})]})]})}function dR({fileId:e,versionCount:n}){var i,a;const s=Rr({queryKey:["versions",e],queryFn:()=>we.files.versions(e)});return h.jsxs("section",{className:"mt-6",children:[h.jsx("h3",{className:"eyebrow",children:"Version history"}),s.isPending?h.jsx("p",{className:"muted mt-3 text-[13px]",children:"Loading versions..."}):s.error!==null?h.jsx("p",{className:"mt-3 text-[13px] text-bad",children:Qe(s.error,"Could not load versions")}):(((i=s.data)==null?void 0:i.versions.length)??0)===0?h.jsx("p",{className:"muted mt-3 text-[13px]",children:n>1?"Version history is unavailable.":"No earlier versions."}):h.jsx("ul",{className:"mt-3 grid gap-2",children:(((a=s.data)==null?void 0:a.versions)??[]).map(u=>h.jsxs("li",{className:"flex items-center gap-3 rounded-xl border border-line bg-surface px-3 py-2",children:[h.jsxs("span",{className:"muted w-9 shrink-0 font-mono text-[12px]",children:["v",u.versionNumber]}),h.jsxs("span",{className:"min-w-0 flex-1",children:[h.jsx("span",{className:"block text-[12.5px]",children:jt(u.size)}),h.jsx("span",{className:"muted block text-[11px]",children:Ks(u.createdAt)})]}),u.isCurrent?h.jsx("span",{className:"shrink-0 rounded-full border border-gold/50 bg-gold-soft px-2 py-0.5 text-[11px] font-medium text-gold-text",children:"Current"}):null]},u.id))})]})}function Kl({icon:e,title:n,description:s,children:i}){return h.jsxs("div",{className:"mt-16 flex flex-col items-center px-4 text-center",children:[h.jsx("span",{className:"grid h-16 w-16 place-items-center rounded-full border border-gold/50 bg-gold-soft",children:h.jsx(e,{className:"h-7 w-7 text-gold","aria-hidden":"true"})}),h.jsx("h2",{className:"mt-4 text-base font-semibold",children:n}),s!==void 0?h.jsx("p",{className:"muted mt-1 max-w-sm text-sm",children:s}):null,i!==void 0?h.jsx("div",{className:"mt-5 flex flex-wrap justify-center gap-2.5",children:i}):null]})}function wv({label:e,items:n,trigger:s,triggerClassName:i,align:a="end"}){const[u,c]=S.useState(!1),f=mn(),p=S.useRef(null),y=S.useRef(null),g=S.useRef(null);S.useEffect(()=>{if(!u)return;const C=E=>{var j;E.target instanceof Node&&((j=p.current)==null?void 0:j.contains(E.target))===!1&&c(!1)},T=E=>{var j;E.key==="Escape"&&(c(!1),(j=y.current)==null||j.focus())};return document.addEventListener("pointerdown",C),document.addEventListener("keydown",T),()=>{document.removeEventListener("pointerdown",C),document.removeEventListener("keydown",T)}},[u]);const v=C=>{var E,j;const T=(E=g.current)==null?void 0:E.querySelectorAll("[role='menuitem']");(j=T==null?void 0:T[C])==null||j.focus()},x=(C,T)=>{var R,O;const E=Array.from(((R=g.current)==null?void 0:R.querySelectorAll("[role='menuitem']"))??[]);if(E.length===0)return;const I=(E.indexOf(C)+T+E.length)%E.length;(O=E[I])==null||O.focus()},k=f?0:-6;return h.jsxs("div",{ref:p,className:"relative",children:[h.jsx("button",{ref:y,type:"button","aria-label":e,"aria-haspopup":"menu","aria-expanded":u,onClick:()=>c(C=>!C),onKeyDown:C=>{C.key==="ArrowDown"&&(C.preventDefault(),u?v(0):(c(!0),window.requestAnimationFrame(()=>v(0))))},className:i??"muted grid h-8 w-8 place-items-center rounded-lg transition-colors hover:bg-bg-soft hover:text-gold-text",children:s??h.jsx(s2,{className:"h-4 w-4","aria-hidden":"true"})}),h.jsx(Dr,{children:u?h.jsx(qt.div,{ref:g,role:"menu","aria-label":e,initial:{opacity:0,y:k},animate:{opacity:1,y:0},exit:{opacity:0,y:k},transition:{duration:.15,ease:"easeOut"},className:`menu-panel absolute top-full z-20 mt-1.5 w-48 ${a==="end"?"right-0":"left-0"}`,children:n.map(C=>h.jsxs("button",{role:"menuitem",type:"button",disabled:C.disabled===!0,onClick:()=>{c(!1),C.onSelect()},onKeyDown:T=>{T.key==="ArrowDown"?(T.preventDefault(),x(T.currentTarget,1)):T.key==="ArrowUp"&&(T.preventDefault(),x(T.currentTarget,-1))},className:`menu-item text-left ${C.danger===!0?"menu-item-danger":""}`,children:[C.icon,C.label]},C.label))},"item-menu"):null})]})}function Sv({checked:e,visible:n,label:s,onToggle:i}){return h.jsx("button",{type:"button",role:"checkbox","aria-checked":e,"aria-label":s,onClick:a=>{a.stopPropagation(),i({shiftKey:a.shiftKey,metaKey:a.metaKey,ctrlKey:a.ctrlKey})},onPointerDown:a=>a.stopPropagation(),className:`grid h-5 w-5 shrink-0 place-items-center rounded-md border transition-all ${e?"border-gold bg-gold text-gold-ink opacity-100":`border-line-strong bg-surface text-transparent hover:border-gold ${n?"opacity-100":"opacity-0 group-hover:opacity-100 focus-visible:opacity-100"}`}`,children:h.jsx(jf,{className:"h-3 w-3","aria-hidden":"true"})})}function yd(e,n,s={}){const i=e.kind==="file",a=[];return e.trashed?(a.push({label:"Restore",icon:h.jsx(Rf,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>n("restore",e)}),a.push({label:"Delete permanently",icon:h.jsx(Pr,{className:"h-4 w-4","aria-hidden":"true"}),danger:!0,onSelect:()=>n("delete",e)})):(a.push({label:i?"Download":"Open",icon:i?h.jsx(bf,{className:"h-4 w-4","aria-hidden":"true"}):h.jsx(Od,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>n(i?"download":"open",e)}),i&&a.push({label:"Details",icon:h.jsx(c2,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>n("details",e)}),a.push({label:"Rename",icon:h.jsx(g2,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>n("rename",e)}),a.push({label:"Move",icon:h.jsx(Od,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>n("move",e)}),a.push({label:e.starred?"Unstar":"Star",icon:e.starred?h.jsx(Mf,{className:"h-4 w-4","aria-hidden":"true"}):h.jsx(fs,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>n(e.starred?"unstar":"star",e)}),i&&s.canReplace===!0&&a.push({label:"Upload new version",icon:h.jsx(nx,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>n("replace",e)}),a.push({label:"Move to trash",icon:h.jsx(Pr,{className:"h-4 w-4","aria-hidden":"true"}),danger:!0,onSelect:()=>n("trash",e)})),a}function fR({item:e}){if(e.kind==="folder")return h.jsx(mi,{className:"h-5 w-5 shrink-0 text-gold","aria-hidden":"true"});const{Icon:n,color:s}=Hn(e.mimeType);return h.jsx(n,{className:`h-5 w-5 shrink-0 ${s}`,"aria-hidden":"true"})}function hR({view:e}){const n=[0,1,2,3,4];return e==="grid"?h.jsx("div",{"aria-hidden":"true",className:"grid grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-4",children:n.map(s=>h.jsx("div",{className:"card h-40 animate-pulse bg-bg-soft"},s))}):h.jsx("div",{"aria-hidden":"true",className:"grid gap-2",children:n.map(s=>h.jsx("div",{className:"h-14 animate-pulse rounded-xl border border-line bg-bg-soft"},s))})}function pR({items:e,view:n,selection:s,onOpen:i,onAction:a,onContextMenu:u,menuContext:c={},loading:f=!1}){const p=e.map(ln),y=(v,x)=>{if(v.metaKey||v.ctrlKey){s.toggle(sl(x));return}if(v.shiftKey){s.toggle(sl(x),{orderedKeys:p,range:!0});return}i(x)},g=(v,x)=>{v.preventDefault(),u({x:v.clientX,y:v.clientY,label:`Actions for ${x.name}`,items:yd(x,a,c)})};return f?h.jsx(hR,{view:n}):e.length===0?null:n==="grid"?h.jsx("ul",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-4",children:e.map(v=>{const x=s.isSelected(ln(v));return h.jsxs("li",{onClick:k=>y(k,v),onContextMenu:k=>g(k,v),className:`group relative flex cursor-pointer flex-col gap-3 rounded-2xl border bg-surface p-4 transition-colors ${x?"border-gold bg-gold-soft":"border-line hover:border-gold/40 hover:bg-bg-soft"} ${v.trashed?"opacity-70":""}`,children:[h.jsx("div",{className:"absolute top-3 left-3",onClick:k=>k.stopPropagation(),children:h.jsx(Sv,{checked:x,visible:x||s.count>0,label:`Select ${v.name}`,onToggle:k=>s.toggle(sl(v),{orderedKeys:p,range:k.shiftKey})})}),h.jsx("div",{className:"absolute top-3 right-3",onClick:k=>k.stopPropagation(),children:h.jsx(wv,{label:`Actions for ${v.name}`,items:yd(v,a,c)})}),h.jsx("div",{className:"mt-6 flex flex-1 items-center justify-center",children:v.kind==="folder"?h.jsx(mi,{className:"h-10 w-10 text-gold","aria-hidden":"true"}):(()=>{const{Icon:k,color:C}=Hn(v.mimeType);return h.jsx(k,{className:`h-10 w-10 ${C}`,"aria-hidden":"true"})})()}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("p",{className:"line-clamp-2 text-[13px] leading-snug font-medium",title:v.name,children:v.name}),h.jsxs("p",{className:"muted mt-1 truncate text-[12px]",children:[v.starred?h.jsx(fs,{className:"mr-1 inline h-3 w-3 -translate-y-px text-gold","aria-hidden":"true"}):null,v.kind==="folder"?"Folder":`${jt(v.size)} · ${Hn(v.mimeType).label}`]}),v.deletedAt!==null?h.jsxs("p",{className:"muted mt-0.5 text-[11px]",children:["Deleted ",lf(v.deletedAt)]}):null]})]},ln(v))})}):h.jsx("ul",{className:"grid gap-1.5",children:e.map(v=>{const x=s.isSelected(ln(v));return h.jsxs("li",{onClick:k=>y(k,v),onContextMenu:k=>g(k,v),className:`group flex cursor-pointer items-center gap-3 rounded-xl border bg-surface px-3 py-2.5 transition-colors ${x?"border-gold bg-gold-soft":"border-line hover:border-gold/40 hover:bg-bg-soft"} ${v.trashed?"opacity-70":""}`,children:[h.jsx("div",{onClick:k=>k.stopPropagation(),children:h.jsx(Sv,{checked:x,visible:x||s.count>0,label:`Select ${v.name}`,onToggle:k=>s.toggle(sl(v),{orderedKeys:p,range:k.shiftKey})})}),h.jsx(fR,{item:v}),h.jsxs("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",title:v.name,children:[v.starred?h.jsx(fs,{className:"mr-1.5 inline h-3.5 w-3.5 -translate-y-px text-gold","aria-hidden":"true"}):null,v.name]}),v.deletedAt!==null?h.jsxs("span",{className:"muted hidden shrink-0 text-[12px] sm:block",children:["Deleted ",lf(v.deletedAt)]}):null,h.jsx("span",{className:"muted hidden w-40 shrink-0 truncate text-[12.5px] md:block",children:v.kind==="folder"?"Folder":Hn(v.mimeType).label}),h.jsx("span",{className:"muted hidden w-28 shrink-0 text-right text-[12.5px] lg:block",children:Ob(v.updatedAt)}),h.jsx("span",{className:"muted w-16 shrink-0 text-right text-[12.5px] tabular-nums",children:v.kind==="folder"?"—":jt(v.size)}),h.jsx("div",{onClick:k=>k.stopPropagation(),children:h.jsx(wv,{label:`Actions for ${v.name}`,items:yd(v,a,c)})})]},ln(v))})})}function kh({items:e,view:n,selection:s,onOpen:i,onAction:a,onContextMenu:u,menuContext:c,loading:f=!1,error:p=null,onRetry:y,emptyState:g,hasMore:v=!1,loadingMore:x=!1,onLoadMore:k}){return p!==null?h.jsxs("div",{className:"card mt-6 p-6 text-center",children:[h.jsx("p",{className:"text-sm font-medium",children:"Something went wrong."}),h.jsx("p",{className:"muted mt-1 text-sm",children:p}),y!==void 0?h.jsx("button",{type:"button",className:"btn-secondary mt-4",onClick:y,children:"Try again"}):null]}):e.length===0&&g!==void 0?h.jsx(h.Fragment,{children:g}):h.jsxs(h.Fragment,{children:[h.jsx(pR,{items:e,view:n,selection:s,onOpen:i,onAction:a,onContextMenu:u,...c!==void 0?{menuContext:c}:{},loading:f}),v&&k!==void 0?h.jsx("div",{className:"mt-6 flex justify-center",children:h.jsx("button",{type:"button",className:"btn-secondary",onClick:k,disabled:x,children:x?"Loading...":"Load more"})}):null]})}function li({title:e,actions:n,children:s}){return h.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[h.jsx("div",{className:"min-w-0",children:e}),n!==void 0?h.jsx("div",{className:"flex flex-wrap items-center gap-2.5",children:n}):null,s!==void 0?h.jsx("div",{className:"w-full",children:s}):null]})}function ui({children:e}){return h.jsx("h1",{className:"min-w-0 truncate text-lg font-semibold tracking-[-0.01em]",children:e})}function Ch({count:e,onClear:n,onSelectAll:s,children:i}){const a=mn(),u=e>0;return h.jsx(Dr,{children:u?h.jsxs(qt.div,{role:"toolbar","aria-label":`${e} items selected`,initial:{opacity:0,y:a?0:20},animate:{opacity:1,y:0},exit:{opacity:0,y:a?0:20},transition:{duration:.18,ease:"easeOut"},className:"glass-strong fixed bottom-4 left-1/2 z-[90] flex max-w-[calc(100vw-2rem)] -translate-x-1/2 flex-wrap items-center gap-1.5 rounded-2xl border border-line px-3 py-2",children:[h.jsxs("span",{className:"px-2 text-[13px] font-medium tabular-nums",children:[e," selected"]}),h.jsx("span",{className:"text-line-strong","aria-hidden":"true",children:"·"}),s!==void 0?h.jsxs("button",{type:"button",className:"btn-secondary",onClick:s,children:[h.jsx(ZE,{className:"h-4 w-4","aria-hidden":"true"}),"Select all"]}):null,i,h.jsxs("button",{type:"button",className:"btn-ghost",onClick:n,"aria-label":"Clear selection",children:[h.jsx(cn,{className:"h-4 w-4","aria-hidden":"true"}),"Clear"]})]},"selection-bar"):null})}const gd={name:"Name",size:"Size",createdAt:"Date created",updatedAt:"Last modified",type:"Type"};function mR({sort:e,order:n,onChange:s}){const[i,a]=S.useState(!1),u=mn(),c=S.useRef(null);S.useEffect(()=>{if(!i)return;const y=v=>{var x;v.target instanceof Node&&((x=c.current)==null?void 0:x.contains(v.target))===!1&&a(!1)},g=v=>{v.key==="Escape"&&a(!1)};return document.addEventListener("pointerdown",y),document.addEventListener("keydown",g),()=>{document.removeEventListener("pointerdown",y),document.removeEventListener("keydown",g)}},[i]);const f=Object.keys(gd),p=u?0:-6;return h.jsxs("div",{ref:c,className:"relative shrink-0",children:[h.jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":i,onClick:()=>a(y=>!y),className:"btn-secondary",children:[h.jsx(XE,{className:"h-4 w-4","aria-hidden":"true"}),h.jsx("span",{className:"hidden sm:inline",children:gd[e]}),n==="asc"?h.jsx(Wy,{className:"h-3.5 w-3.5","aria-hidden":"true"}):h.jsx(Ky,{className:"h-3.5 w-3.5","aria-hidden":"true"})]}),h.jsx(Dr,{children:i?h.jsx(qt.div,{role:"menu","aria-label":"Sort by",initial:{opacity:0,y:p},animate:{opacity:1,y:0},exit:{opacity:0,y:p},transition:{duration:.15,ease:"easeOut"},className:"menu-panel absolute top-full right-0 z-30 mt-1.5 w-52",children:f.map(y=>h.jsxs("button",{role:"menuitemradio","aria-checked":e===y,type:"button",onClick:()=>{e===y?s(y,n==="asc"?"desc":"asc"):s(y,"asc")},className:"menu-item justify-between text-left",children:[gd[y],e===y?n==="asc"?h.jsx(Wy,{className:"h-3.5 w-3.5","aria-hidden":"true"}):h.jsx(Ky,{className:"h-3.5 w-3.5","aria-hidden":"true"}):null]},y))}):null})]})}function Eh({view:e,onChange:n}){const s=[{mode:"list",label:"List view",Icon:h2},{mode:"grid",label:"Grid view",Icon:f2}];return h.jsx("div",{role:"group","aria-label":"View mode",className:"inline-flex shrink-0 rounded-lg border border-line-strong bg-surface p-0.5",children:s.map(({mode:i,label:a,Icon:u})=>{const c=e===i;return h.jsx("button",{type:"button","aria-label":a,"aria-pressed":c,onClick:()=>n(i),className:`grid h-7 w-8 place-items-center rounded-md transition-colors ${c?"bg-gold-soft text-gold-text":"muted hover:text-gold-text"}`,children:h.jsx(u,{className:"h-4 w-4","aria-hidden":"true"})},i)})})}const kv=100;function il(e){return e.dataTransfer.types.includes("Files")}function yR(){const{uploads:e,setActiveFolderId:n,openCreateFolder:s,clearSearch:i}=Hl(),[a,u]=LE(),c=a.get("folder"),[f,p]=vh("omnicloud-view","list",hh),[y,g]=S.useState("name"),[v,x]=S.useState("asc"),[k,C]=S.useState(null),[T,E]=S.useState(null),j=wh(),[I,R]=S.useState(!1),O=S.useRef(0);S.useEffect(()=>{n(c)},[c,n]);const F=Rr({queryKey:ch,queryFn:we.folders.tree}),U=S.useMemo(()=>{var D;return mh(((D=F.data)==null?void 0:D.folders)??[])},[F.data]),A=S.useMemo(()=>iR(U,c),[U,c]),_=To({queryKey:["folders","children",c,y,v],queryFn:D=>we.folders.list({parentId:c,page:D,limit:kv,sort:y,order:v,status:"active"}).then(ee=>({items:ee.folders,pagination:ee.pagination}))}),B=To({queryKey:["files","folder",c,y,v],queryFn:D=>we.files.list({folderId:c,page:D,limit:kv,sort:y,order:v,status:"active"}).then(ee=>({items:ee.files,pagination:ee.pagination}))}),Y=S.useMemo(()=>[..._.items.map(fh),...B.items.map(vi)],[_.items,B.items]),ne=S.useMemo(()=>Y.map(ln),[Y]);S.useEffect(()=>{j.prune(ne)},[ne,j]);const G=S.useCallback(D=>{i(),j.clear(),E(null),u(D===null?{}:{folder:D},{replace:!1})},[i,j,u]),X=gh({onOpenItem:D=>{D.kind==="folder"?G(D.id):we.files.download(D.id)},onShowDetails:E,onReplaceFile:e.replace}),fe=S.useMemo(()=>Y.filter(D=>j.isSelected(ln(D))),[Y,j]);S.useEffect(()=>{const D=hr(_.error,rn.NOT_FOUND,rn.FOLDER_NOT_FOUND)||hr(B.error,rn.NOT_FOUND,rn.FOLDER_NOT_FOUND);c!==null&&D&&u({},{replace:!0})},[c,_.error,B.error,u]),xh({onDelete:()=>X.runBatch("trash",fe),onEnter:()=>{const D=fe[0];D!==void 0&&X.handleAction(D.kind==="folder"?"open":"download",D)},onSelectAll:()=>j.selectAll(ne),onEscape:()=>E(null)});const Se=hr(_.error,rn.STORAGE_NOT_INITIALIZED)||hr(B.error,rn.STORAGE_NOT_INITIALIZED)||hr(_.error,rn.TELEGRAM_AUTH_REQUIRED)||hr(B.error,rn.TELEGRAM_AUTH_REQUIRED)||hr(_.error,rn.STORAGE_UNAVAILABLE)||hr(B.error,rn.STORAGE_UNAVAILABLE),ge=_.error??B.error,ke=_.isLoading||B.isLoading,Z=D=>{il(D)&&(D.preventDefault(),O.current+=1,R(!0))},le=D=>{il(D)&&(O.current-=1,O.current<=0&&(O.current=0,R(!1)))},q=D=>{il(D)&&D.preventDefault()},L=D=>{if(!il(D))return;D.preventDefault(),O.current=0,R(!1);const ee=Array.from(D.dataTransfer.files);ee.length>0&&e.enqueue(ee,c)};return h.jsxs("div",{className:"relative min-h-full",onDragEnter:Z,onDragLeave:le,onDragOver:q,onDrop:L,children:[h.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-6 md:px-8",children:[h.jsx(li,{title:c===null?h.jsx(ui,{children:"My Drive"}):h.jsx(uR,{path:A,onNavigate:G}),actions:h.jsxs(h.Fragment,{children:[h.jsx(Eh,{view:f,onChange:p}),h.jsx(mR,{sort:y,order:v,onChange:(D,ee)=>{g(D),x(ee)}}),h.jsxs("button",{type:"button",className:"btn-secondary sm:hidden",onClick:()=>e.openPicker(c),children:[h.jsx(Sl,{className:"h-4 w-4","aria-hidden":"true"}),"Upload"]})]})}),Se?h.jsx("p",{role:"alert",className:"notice notice-error",children:Qe(ge,"Your storage is unavailable right now.")}):null,h.jsx("div",{className:"mt-5",children:h.jsx(kh,{items:Y,view:f,selection:j,onOpen:D=>X.handleAction(D.kind==="folder"?"open":"download",D),onAction:X.handleAction,onContextMenu:C,loading:ke,error:Se||ge===null?null:Qe(ge,"Could not load this folder."),onRetry:()=>{_.refetch(),B.refetch()},hasMore:_.hasMore||B.hasMore,loadingMore:_.isLoadingMore||B.isLoadingMore,onLoadMore:()=>{_.hasMore&&_.loadMore(),B.hasMore&&B.loadMore()},emptyState:h.jsxs(Kl,{icon:r2,title:"Nothing here yet",description:"Upload your first file or create a folder to get started.",children:[h.jsxs("button",{type:"button",className:"btn-gold",onClick:()=>e.openPicker(c),children:[h.jsx(Sl,{className:"h-4 w-4","aria-hidden":"true"}),"Upload files"]}),h.jsxs("button",{type:"button",className:"btn-secondary",onClick:s,children:[h.jsx(U0,{className:"h-4 w-4","aria-hidden":"true"}),"New folder"]})]})})})]}),I?h.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 z-30 flex items-center justify-center bg-bg/70 p-6 backdrop-blur-sm",children:h.jsx("div",{className:"glass-strong rounded-2xl border-2 border-dashed border-gold/60 px-8 py-6 text-sm font-medium text-gold-text",children:"Drop files to upload"})}):null,h.jsxs(Ch,{count:j.count,onClear:j.clear,onSelectAll:()=>j.selectAll(ne),children:[h.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>X.openMove(fe),children:[h.jsx(Od,{className:"h-4 w-4","aria-hidden":"true"}),"Move"]}),h.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>X.runBatch("star",fe),children:[h.jsx(fs,{className:"h-4 w-4","aria-hidden":"true"}),"Star"]}),h.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>X.runBatch("unstar",fe),children:[h.jsx(Mf,{className:"h-4 w-4","aria-hidden":"true"}),"Unstar"]}),h.jsxs("button",{type:"button",className:"btn-danger",onClick:()=>X.runBatch("trash",fe),children:[h.jsx(Pr,{className:"h-4 w-4","aria-hidden":"true"}),"Trash"]})]}),h.jsx(Sh,{menu:k,onClose:()=>C(null)}),h.jsx(_o,{item:T,onClose:()=>E(null),onAction:X.handleAction}),X.dialogs]})}const gR=/^\d{3,10}$/,Cv="font-semibold text-gold-text transition-colors hover:underline";function vR(){const e=dh(),n=fn(),s=pi(),[i,a]=S.useState("phone"),[u,c]=S.useState(""),[f,p]=S.useState(""),[y,g]=S.useState(""),[v,x]=S.useState(null),[k,C]=S.useState(!1),T=S.useCallback(async()=>{try{const ne=await we.auth.me();n.setQueryData(Oo,ne),s("/",{replace:!0})}catch{x("Signed in, but loading your drive failed. Please reload the page.")}finally{C(!1)}},[n,s]),E=Kt({mutationFn:()=>we.auth.startLogin(u.trim()),onSuccess:()=>{x(null),a("code")},onError:ne=>x(Qe(ne,"Could not send the login code"))}),j=Kt({mutationFn:()=>we.auth.verifyCode(u.trim(),f.trim()),onSuccess:async ne=>{if(ne.status==="password_required"){x(null),a("password");return}await T()},onError:ne=>x(Qe(ne,"The login code was rejected")),onSettled:()=>C(!1)}),I=Kt({mutationFn:()=>we.auth.verifyPassword(u.trim(),y),onSuccess:async()=>{await T()},onError:ne=>x(Qe(ne,"The password was rejected")),onSettled:()=>C(!1)});if(e.data!==void 0&&e.data.user!==null)return h.jsx(Ef,{to:"/",replace:!0});const R=E.isPending||j.isPending||I.isPending||k,O=j.isPending||I.isPending||k,F=ne=>{ne.preventDefault(),!(R||u.trim()==="")&&(x(null),E.mutate())},U=ne=>{if(ne.preventDefault(),!R){if(!gR.test(f.trim())){x("Please enter the numeric code Telegram sent you");return}x(null),C(!0),j.mutate()}},A=ne=>{ne.preventDefault(),!(R||y==="")&&(x(null),C(!0),I.mutate())},_=()=>{a("phone"),p(""),x(null)},B=v!==null?h.jsx("div",{role:"alert",className:"notice notice-error",children:v}):null,Y=O?h.jsxs("div",{role:"status",className:"notice flex items-center gap-2.5",children:[h.jsx(Lt,{className:"h-4 w-4 shrink-0 animate-spin text-gold-text","aria-hidden":"true"}),h.jsx("span",{children:"Preparing your private storage…"})]}):null;return h.jsxs("div",{className:"grid min-h-dvh lg:grid-cols-2",children:[h.jsx("a",{href:"#main",className:"skip-link btn-gold",children:"Skip to content"}),h.jsxs("aside",{className:"relative hidden overflow-hidden lg:flex lg:flex-col lg:justify-between lg:p-10",style:{background:"linear-gradient(160deg, #c9a227 0%, #a8801a 55%, #8a6712 100%)"},children:[h.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute -top-24 -right-24 h-80 w-80 rounded-full",style:{background:"radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 65%)"}}),h.jsxs("a",{href:"/",className:"relative flex items-center gap-2.5 text-[15px] font-semibold text-white",children:[h.jsx("span",{className:"text-lg leading-none",children:"◈"})," Omni",h.jsx("span",{className:"font-normal text-white/80",children:"Cloud"})]}),h.jsxs("div",{className:"relative",children:[h.jsxs("p",{className:"text-[clamp(34px,3.4vw,48px)] font-extrabold leading-[1.08] tracking-[-0.03em] text-white",children:["Your drive.",h.jsx("br",{}),"Powered by Telegram."]}),h.jsx("p",{className:"mt-4 max-w-sm text-[15px] leading-relaxed text-white/85",children:"Every file lands in a private Telegram channel that is created for your account on first sign-in — storage you already own, with no extra servers in the way."})]}),h.jsx("p",{className:"relative text-xs text-white/70",children:"© 2026 OmniCloud · self-hosted storage on your Telegram."})]}),h.jsxs("main",{id:"main",className:"flex min-h-dvh flex-col px-5 py-7",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("a",{href:"/",className:"flex items-center gap-2.5 text-[15px] font-semibold lg:invisible",children:[h.jsx("span",{className:"text-lg leading-none text-gold",children:"◈"})," Omni",h.jsx("span",{className:"muted font-normal",children:"Cloud"})]}),h.jsx(iw,{})]}),h.jsx("div",{className:"flex flex-1 items-center justify-center py-10",children:h.jsxs("div",{className:"w-full max-w-sm",children:[i==="phone"?h.jsxs(h.Fragment,{children:[h.jsxs("form",{onSubmit:F,noValidate:!0,className:"grid gap-4",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-2xl font-bold tracking-[-0.02em]",children:"Sign in with Telegram"}),h.jsx("p",{className:"muted mt-1.5 text-sm",children:"Enter your phone number to receive a login code."})]}),h.jsxs("label",{htmlFor:"login-phone",className:"grid gap-1.5",children:[h.jsx("span",{className:"text-[13px] font-medium",children:"Phone number"}),h.jsx("input",{id:"login-phone",type:"tel",autoComplete:"tel",placeholder:"+15551234567",value:u,disabled:R,onChange:ne=>c(ne.target.value),className:"input"})]}),h.jsxs("button",{type:"submit",className:"btn-gold mt-1 justify-center",disabled:R||u.trim()==="",children:[E.isPending&&h.jsx(Lt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),E.isPending?"Sending code…":"Continue"]})]}),B]}):i==="code"?h.jsxs(h.Fragment,{children:[h.jsxs("form",{onSubmit:U,noValidate:!0,className:"grid gap-4",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-2xl font-bold tracking-[-0.02em]",children:"Enter the code"}),h.jsxs("p",{className:"muted mt-1.5 text-sm",children:["Enter the code Telegram sent to ",h.jsx("span",{className:"font-medium",children:u}),"."]})]}),h.jsxs("label",{htmlFor:"login-code",className:"grid gap-1.5",children:[h.jsx("span",{className:"text-[13px] font-medium",children:"Login code"}),h.jsx("input",{id:"login-code",type:"text",inputMode:"numeric",autoComplete:"one-time-code",autoFocus:!0,value:f,disabled:R,onChange:ne=>p(ne.target.value),className:"input tracking-[0.3em]"})]}),h.jsxs("button",{type:"submit",className:"btn-gold mt-1 justify-center",disabled:R||f.trim()==="",children:[j.isPending&&h.jsx(Lt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),j.isPending?"Verifying…":"Verify"]})]}),Y,B,h.jsx("button",{type:"button",onClick:_,disabled:R,className:`mt-4 w-full text-center text-sm disabled:opacity-60 ${Cv}`,children:"Use a different number →"})]}):h.jsxs(h.Fragment,{children:[h.jsxs("form",{onSubmit:A,noValidate:!0,className:"grid gap-4",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-2xl font-bold tracking-[-0.02em]",children:"Two-factor password"}),h.jsx("p",{className:"muted mt-1.5 text-sm",children:"Your Telegram account is protected with a cloud password."})]}),h.jsxs("label",{htmlFor:"login-password",className:"grid gap-1.5",children:[h.jsx("span",{className:"text-[13px] font-medium",children:"Password"}),h.jsx("input",{id:"login-password",type:"password",autoComplete:"current-password",autoFocus:!0,value:y,disabled:R,onChange:ne=>g(ne.target.value),className:"input"})]}),h.jsxs("button",{type:"submit",className:"btn-gold mt-1 justify-center",disabled:R||y==="",children:[(I.isPending||k)&&h.jsx(Lt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),I.isPending||k?"Signing in…":"Sign in"]})]}),Y,B,h.jsx("button",{type:"button",onClick:()=>{a("code"),g(""),x(null)},disabled:R,className:`mt-4 w-full text-center text-sm disabled:opacity-60 ${Cv}`,children:"Back to the code →"})]}),h.jsx("p",{className:"notice mt-6",children:"OmniCloud uses your Telegram account as its storage backend. Files are stored in a private Telegram channel that is created automatically."})]})})]})]})}const xR=100,wR={upload:"Uploaded",download:"Downloaded",open:"Opened",rename:"Renamed",move:"Moved",star:"Starred",unstar:"Unstarred",trash:"Trashed",restore:"Restored",delete:"Deleted",create_folder:"Created folder",replace:"New version"};function SR(){const[e,n]=S.useState(null),s=To({queryKey:["recent"],queryFn:a=>we.recent.list({page:a,limit:xR}).then(u=>({items:u.items.map(c=>({key:`${c.file.id}:${c.lastActionAt}`,item:vi(c.file),action:c.lastAction,at:c.lastActionAt,label:_b(c.lastActionAt)})),pagination:u.pagination}))}),i=S.useMemo(()=>{const a=new Map;for(const u of s.items){const c=a.get(u.label);c===void 0?a.set(u.label,[u]):c.push(u)}return Array.from(a.entries())},[s.items]);return h.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-6 md:px-8",children:[h.jsx(li,{title:h.jsxs("div",{children:[h.jsx(ui,{children:"Recent"}),h.jsx("p",{className:"muted mt-1 text-[13px]",children:"What you have touched lately, newest first."})]})}),s.isLoading?h.jsx(ph,{label:"Loading recent activity"}):s.isError?h.jsxs("div",{className:"card mt-6 p-6 text-center",children:[h.jsx("p",{className:"text-sm font-medium",children:"Something went wrong."}),h.jsx("p",{className:"muted mt-1 text-sm",children:Qe(s.error,"Could not load recent activity.")}),h.jsx("button",{type:"button",className:"btn-secondary mt-4",onClick:s.refetch,children:"Try again"})]}):s.items.length===0?h.jsx(Kl,{icon:j0,title:"Nothing recent",description:"Uploads, downloads and edits will appear here."}):h.jsx("div",{className:"mt-5 grid gap-6",children:i.map(([a,u])=>h.jsxs("section",{children:[h.jsx("h2",{className:"eyebrow",children:a}),h.jsx("ul",{className:"mt-3 grid gap-1.5",children:u.map(c=>{const{Icon:f,color:p}=Hn(c.item.mimeType);return h.jsxs("li",{className:"group flex items-center gap-3 rounded-xl border border-line bg-surface px-3 py-2.5 transition-colors hover:border-gold/40 hover:bg-bg-soft",children:[h.jsxs("button",{type:"button",onClick:()=>n(c.item),className:"flex min-w-0 flex-1 items-center gap-3 text-left",children:[h.jsx(f,{className:`h-5 w-5 shrink-0 ${p}`,"aria-hidden":"true"}),h.jsxs("span",{className:"min-w-0 flex-1",children:[h.jsx("span",{className:"block truncate text-sm font-medium",title:c.item.name,children:c.item.name}),h.jsxs("span",{className:"muted block text-[12px]",children:[wR[c.action],h.jsx("span",{className:"mx-1.5","aria-hidden":"true",children:"·"}),Ks(c.at)]})]}),h.jsx("span",{className:"muted hidden shrink-0 text-[12.5px] tabular-nums sm:block",children:jt(c.item.size)})]}),h.jsx("button",{type:"button","aria-label":`Download ${c.item.name}`,onClick:()=>we.files.download(c.item.id),className:"muted grid h-8 w-8 shrink-0 place-items-center rounded-lg transition-colors hover:bg-bg-soft hover:text-gold-text",children:h.jsx(bf,{className:"h-4 w-4","aria-hidden":"true"})})]},c.key)})})]},a))}),s.hasMore?h.jsx("div",{className:"mt-6 flex justify-center",children:h.jsx("button",{type:"button",className:"btn-secondary",onClick:s.loadMore,disabled:s.isLoadingMore,children:s.isLoadingMore?"Loading...":"Load more"})}):null,h.jsx(_o,{item:e,onClose:()=>n(null),onAction:(a,u)=>{a==="download"&&we.files.download(u.id)}})]})}const kR=100;function CR(){const{uploads:e}=Hl(),n=pi(),[s,i]=vh("omnicloud-view","list",hh),[a,u]=S.useState(null),[c,f]=S.useState(null),p=wh(),y=To({queryKey:["starred"],queryFn:C=>we.starred.list({page:C,limit:kR,status:"active"}).then(T=>({items:[...T.folders.map(fh),...T.files.map(vi)],pagination:T.pagination}))}),g=y.items,v=S.useMemo(()=>g.map(ln),[g]);S.useEffect(()=>{p.prune(v)},[v,p]);const x=gh({onOpenItem:C=>{C.kind==="folder"?n(`/?folder=${encodeURIComponent(C.id)}`):we.files.download(C.id)},onShowDetails:f,onReplaceFile:e.replace}),k=S.useMemo(()=>g.filter(C=>p.isSelected(ln(C))),[g,p]);return xh({onDelete:()=>x.runBatch("trash",k),onSelectAll:()=>p.selectAll(v),onEscape:()=>f(null)}),h.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-6 md:px-8",children:[h.jsx(li,{title:h.jsxs("div",{children:[h.jsx(ui,{children:"Starred"}),h.jsx("p",{className:"muted mt-1 text-[13px]",children:"Files and folders you marked for quick access."})]}),actions:h.jsx(Eh,{view:s,onChange:i})}),h.jsx("div",{className:"mt-5",children:h.jsx(kh,{items:g,view:s,selection:p,onOpen:C=>x.handleAction(C.kind==="folder"?"open":"download",C),onAction:x.handleAction,onContextMenu:u,loading:y.isLoading,error:y.isError?Qe(y.error,"Could not load starred items."):null,onRetry:y.refetch,hasMore:y.hasMore,loadingMore:y.isLoadingMore,onLoadMore:y.loadMore,emptyState:h.jsx(Kl,{icon:fs,title:"No starred items",description:"Star files and folders from My Drive to find them here."})})}),h.jsx(Ch,{count:p.count,onClear:p.clear,onSelectAll:()=>p.selectAll(v),children:h.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>x.runBatch("unstar",k),children:[h.jsx(Mf,{className:"h-4 w-4","aria-hidden":"true"}),"Unstar"]})}),h.jsx(Sh,{menu:a,onClose:()=>u(null)}),h.jsx(_o,{item:c,onClose:()=>f(null),onAction:x.handleAction}),x.dialogs]})}function ol({icon:e,label:n,value:s}){return h.jsxs("div",{className:"card flex items-center gap-3 p-4",children:[h.jsx("span",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-xl border border-gold/40 bg-gold-soft text-gold-text",children:e}),h.jsxs("span",{className:"min-w-0",children:[h.jsx("span",{className:"muted block text-[12px]",children:n}),h.jsx("span",{className:"block truncate text-[15px] font-semibold tabular-nums",children:s})]})]})}function ER(){var x,k;const e=ps(),[n,s]=S.useState(null),[i,a]=S.useState(!1),u=Rr({queryKey:jb,queryFn:we.storage.stats}),c=Kt({mutationFn:()=>we.storage.integrityCheck(i),onError:C=>e.error(Qe(C,"The integrity check failed"))}),f=(x=u.data)==null?void 0:x.stats,p=S.useMemo(()=>{if(f===void 0)return[];const C=Math.max(1,...f.byType.map(T=>T.bytes));return[...f.byType].sort((T,E)=>E.bytes-T.bytes).map(T=>({...T,percent:Math.round(T.bytes/C*100)}))},[f]);if(u.isPending)return h.jsx(ph,{label:"Loading storage statistics"});if(u.isError||f===void 0)return h.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-6 md:px-8",children:[h.jsx(li,{title:h.jsx(ui,{children:"Storage"})}),h.jsxs("div",{className:"card mt-6 p-6 text-center",children:[h.jsx("p",{className:"text-sm font-medium",children:"Could not load storage statistics."}),h.jsx("p",{className:"muted mt-1 text-sm",children:Qe(u.error,"The storage backend may be unavailable.")}),h.jsx("button",{type:"button",className:"btn-secondary mt-4",onClick:()=>void u.refetch(),children:"Try again"})]})]});const y=f.quotaBytes,g=y!==null&&y>0?Math.min(100,f.totalBytes/y*100):null,v=(k=c.data)==null?void 0:k.report;return h.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-6 md:px-8",children:[h.jsx(li,{title:h.jsxs("div",{children:[h.jsx(ui,{children:"Storage"}),h.jsx("p",{className:"muted mt-1 text-[13px]",children:"Keep an eye on usage, file types and storage health."})]})}),h.jsxs("section",{className:"card mt-5 p-5","aria-label":"Usage",children:[h.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[h.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[h.jsx(yo,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"Usage"]}),h.jsxs("p",{className:"muted text-[13px] tabular-nums",children:[jt(f.totalBytes),y!==null?` of ${jt(y)}`:" used"]})]}),h.jsx("div",{className:"mt-3 h-2.5 overflow-hidden rounded-full bg-surface-2",children:h.jsx("div",{className:"progress-fill",style:{width:g===null?f.totalBytes>0?"100%":"0%":`${g}%`}})}),g!==null?h.jsxs("p",{className:"muted mt-2 text-[12px] tabular-nums",children:[Math.round(g),"% of quota used"]}):h.jsx("p",{className:"muted mt-2 text-[12px]",children:"No quota set on this account."})]}),h.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-3 sm:grid-cols-3",children:[h.jsx(ol,{icon:h.jsx(Qy,{className:"h-5 w-5","aria-hidden":"true"}),label:"Files",value:f.fileCount.toLocaleString()}),h.jsx(ol,{icon:h.jsx(yo,{className:"h-5 w-5","aria-hidden":"true"}),label:"Folders",value:f.folderCount.toLocaleString()}),h.jsx(ol,{icon:h.jsx(fs,{className:"h-5 w-5","aria-hidden":"true"}),label:"Starred",value:f.starredCount.toLocaleString()}),h.jsx(ol,{icon:h.jsx(Pr,{className:"h-5 w-5","aria-hidden":"true"}),label:"In trash",value:`${jt(f.trashBytes)} · ${f.trashFileCount}`})]}),h.jsxs("section",{className:"card mt-6 p-5","aria-label":"Breakdown by type",children:[h.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[h.jsx(YE,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"By file type"]}),p.length===0?h.jsx("p",{className:"muted mt-3 text-[13px]",children:"No files yet."}):h.jsx("ul",{className:"mt-4 grid gap-3",children:p.map(C=>h.jsxs("li",{children:[h.jsxs("div",{className:"flex items-center justify-between gap-3 text-[13px]",children:[h.jsx("span",{className:"font-medium capitalize",children:C.category}),h.jsxs("span",{className:"muted tabular-nums",children:[jt(C.bytes)," · ",Pn(C.count,"file")]})]}),h.jsx("div",{className:"mt-1.5 h-2 overflow-hidden rounded-full bg-surface-2",children:h.jsx("div",{className:"progress-fill",style:{width:`${C.percent}%`}})})]},C.category))})]}),h.jsxs("section",{className:"card mt-6 p-5","aria-label":"Largest files",children:[h.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[h.jsx(Qy,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"Largest files"]}),f.largestFiles.length===0?h.jsx("p",{className:"muted mt-3 text-[13px]",children:"No files yet."}):h.jsx("ul",{className:"mt-3 grid gap-1.5",children:f.largestFiles.map(C=>{const{Icon:T,color:E}=Hn(C.mimeType);return h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:()=>s(vi(C)),className:"flex w-full items-center gap-3 rounded-xl border border-line bg-surface px-3 py-2.5 text-left transition-colors hover:border-gold/40 hover:bg-bg-soft",children:[h.jsx(T,{className:`h-5 w-5 shrink-0 ${E}`,"aria-hidden":"true"}),h.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",title:C.name,children:C.name}),h.jsx("span",{className:"muted shrink-0 text-[12.5px] tabular-nums",children:jt(C.size)})]})},C.id)})})]}),h.jsxs("section",{className:"card mt-6 p-5","aria-label":"Integrity check",children:[h.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[h.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[h.jsx(x2,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"Integrity check"]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("label",{className:"muted flex items-center gap-2 text-[12.5px]",children:[h.jsx("input",{type:"checkbox",checked:i,onChange:C=>a(C.target.checked),className:"h-3.5 w-3.5",style:{accentColor:"var(--gold)"}}),"Deep scan"]}),h.jsxs("button",{type:"button",className:"btn-gold px-3.5 py-2 text-[13px]",onClick:()=>c.mutate(),disabled:c.isPending,children:[c.isPending&&h.jsx(Lt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),c.isPending?"Checking...":"Run check"]})]})]}),h.jsx("p",{className:"muted mt-2 text-[12.5px]",children:"A deep scan re-downloads and hashes every file — slower, but catches silent corruption."}),c.isPending?h.jsxs("p",{className:"muted mt-4 flex items-center gap-2 text-[13px]",children:[h.jsx(Lt,{className:"h-4 w-4 animate-spin text-gold-text","aria-hidden":"true"}),"Scanning your storage..."]}):v!==void 0?h.jsx(TR,{report:v}):null]}),h.jsx(_o,{item:n,onClose:()=>s(null),onAction:()=>{}})]})}function TR({report:e}){const n=e.issues.length===0;return h.jsxs("div",{className:"mt-4",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-[13px]",children:[h.jsxs("span",{className:"flex items-center gap-1.5 font-medium",children:[n?h.jsx(n2,{className:"h-4 w-4 text-ok","aria-hidden":"true"}):h.jsx(wl,{className:"h-4 w-4 text-bad","aria-hidden":"true"}),n?"All files healthy":`${Pn(e.issues.length,"issue")} found`]}),h.jsxs("span",{className:"muted tabular-nums",children:[Pn(e.filesChecked,"file")," checked"]}),h.jsxs("span",{className:"muted tabular-nums",children:[e.healthy," healthy"]}),h.jsxs("span",{className:"muted tabular-nums",children:[e.missing," missing"]}),h.jsxs("span",{className:"muted tabular-nums",children:[e.inconsistent," inconsistent"]}),h.jsxs("span",{className:"muted tabular-nums",children:[e.unreadable," unreadable"]}),h.jsxs("span",{className:"muted",children:["checked ",lf(e.checkedAt)]})]}),e.issues.length>0?h.jsx("ul",{className:"mt-3 grid gap-1.5",children:e.issues.map(s=>h.jsxs("li",{className:"flex items-start gap-3 rounded-xl border border-line bg-bg-soft px-3 py-2.5",children:[h.jsx(wl,{className:"mt-0.5 h-4 w-4 shrink-0 text-bad","aria-hidden":"true"}),h.jsxs("span",{className:"min-w-0 flex-1",children:[h.jsx("span",{className:"block truncate text-[13px] font-medium",title:s.name,children:s.name}),h.jsxs("span",{className:"muted block text-[12px]",children:[s.kind.replace(/_/g," "),s.detail!==null?` · ${s.detail}`:""]})]}),h.jsx("span",{className:"muted shrink-0 text-[11px]",children:Ks(e.checkedAt)})]},`${s.fileId}:${s.kind}`))}):null]})}const PR=100;function NR(){const{uploads:e}=Hl(),n=fn(),s=ps(),[i,a]=vh("omnicloud-view","list",hh),[u,c]=S.useState(null),[f,p]=S.useState(null),[y,g]=S.useState(!1),v=wh(),x=To({queryKey:["trash"],queryFn:O=>we.trash.list({page:O,limit:PR}).then(F=>({items:[...F.folders.map(fh),...F.files.map(vi)],pagination:F.pagination}))}),k=x.items,C=S.useMemo(()=>k.map(ln),[k]);S.useEffect(()=>{v.prune(C)},[C,v]);const T=gh({onOpenItem:()=>{},onShowDetails:p,onReplaceFile:e.replace}),E=S.useMemo(()=>k.filter(O=>v.isSelected(ln(O))),[k,v]),j=Kt({mutationFn:we.trash.empty,onSuccess:O=>{hs(n),g(!1),s.success(`Emptied trash: ${Pn(O.deletedFiles,"file")}, ${Pn(O.deletedFolders,"folder")}`+(O.failedFiles>0?`, ${O.failedFiles} failed`:""))},onError:O=>s.error(Qe(O,"Could not empty the trash"))});xh({onDelete:()=>T.requestDelete(E),onSelectAll:()=>v.selectAll(C),onEscape:()=>p(null)});const I=S.useCallback(O=>{O(),v.clear()},[v]),R=h.jsx(Kl,{icon:Pr,title:"Trash is empty",description:"Items you move to the trash will show up here until you delete them permanently."});return h.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-6 md:px-8",children:[h.jsx(li,{title:h.jsxs("div",{children:[h.jsx(ui,{children:"Trash"}),h.jsx("p",{className:"muted mt-1 text-[13px]",children:"Items here keep counting toward nothing until you empty the trash."})]}),actions:h.jsxs(h.Fragment,{children:[h.jsx(Eh,{view:i,onChange:a}),h.jsxs("button",{type:"button",className:"btn-danger",onClick:()=>g(!0),disabled:k.length===0,children:[h.jsx(Pr,{className:"h-4 w-4","aria-hidden":"true"}),"Empty trash"]})]})}),h.jsx("div",{className:"mt-5",children:h.jsx(kh,{items:k,view:i,selection:v,onOpen:O=>p(O),onAction:T.handleAction,onContextMenu:c,menuContext:{trashed:!0,onTrashPage:!0},loading:x.isLoading,error:x.isError?Qe(x.error,"Could not load the trash."):null,onRetry:x.refetch,hasMore:x.hasMore,loadingMore:x.isLoadingMore,onLoadMore:x.loadMore,emptyState:R})}),h.jsxs(Ch,{count:v.count,onClear:v.clear,onSelectAll:()=>v.selectAll(C),children:[h.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>I(()=>T.runBatch("restore",E)),children:[h.jsx(Rf,{className:"h-4 w-4","aria-hidden":"true"}),"Restore"]}),h.jsxs("button",{type:"button",className:"btn-danger",onClick:()=>T.requestDelete(E),children:[h.jsx(Pr,{className:"h-4 w-4","aria-hidden":"true"}),"Delete permanently"]})]}),h.jsx(Sh,{menu:u,onClose:()=>c(null)}),h.jsx(_o,{item:f,onClose:()=>p(null),onAction:T.handleAction}),T.dialogs,y?h.jsx(aw,{title:"Empty the trash?",message:"Every item in the trash will be permanently deleted. This action cannot be undone.",confirmLabel:"Empty trash",destructive:!0,busy:j.isPending,onConfirm:()=>j.mutate(),onClose:()=>g(!1)}):null]})}function jR(){const e=fn(),[n,s]=S.useState(null),i=Kt({mutationFn:we.storage.ensure,onSuccess:a=>{e.setQueryData(Oo,u=>u===void 0?u:{...u,storage:a.storage})},onError:a=>s(Qe(a,"Could not create your storage channel"))});return h.jsx("main",{id:"main",className:"flex min-h-dvh items-center justify-center p-4",children:h.jsxs("div",{className:"card w-full max-w-md p-8 text-center",children:[h.jsx("span",{className:"mx-auto grid h-14 w-14 place-items-center rounded-full border border-gold/50 bg-gold-soft",children:h.jsx(M0,{className:"h-6 w-6 text-gold","aria-hidden":"true"})}),h.jsx("span",{className:"eyebrow mt-5",children:"Finish setup"}),h.jsx("h1",{className:"mt-4 text-2xl font-bold tracking-[-0.02em]",children:"Finish setting up your storage"}),h.jsx("p",{className:"muted mt-2 text-sm leading-relaxed",children:"OmniCloud stores your files in a private Telegram channel. Create it now to start uploading."}),h.jsxs("button",{type:"button",className:"btn-gold mt-6 justify-center",disabled:i.isPending,onClick:()=>{s(null),i.mutate()},children:[i.isPending&&h.jsx(Lt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),i.isPending?"Creating your private storage channel…":"Create private storage channel"]}),n!==null&&!i.isPending?h.jsx("div",{role:"alert",className:"notice notice-error",children:n}):null]})})}function bR(){return h.jsx("div",{role:"status","aria-label":"Loading",className:"flex h-dvh items-center justify-center bg-bg",children:h.jsx(Lt,{className:"h-7 w-7 animate-spin text-gold","aria-hidden":"true"})})}function RR({children:e}){const n=dh();return n.isPending?h.jsx(bR,{}):n.data===void 0||n.data.user===null?h.jsx(Ef,{to:"/login",replace:!0}):n.data.storage===null?h.jsx(jR,{}):e}function MR(){const e=fn();return S.useEffect(()=>k2(()=>{e.setQueryData(Oo,tw),e.removeQueries({predicate:n=>n.queryKey[0]!=="me"})}),[e]),h.jsxs(iE,{children:[h.jsx(_n,{path:"/login",element:h.jsx(vR,{})}),h.jsxs(_n,{element:h.jsx(RR,{children:h.jsx(sR,{})}),children:[h.jsx(_n,{path:"/",element:h.jsx(yR,{})}),h.jsx(_n,{path:"/recent",element:h.jsx(SR,{})}),h.jsx(_n,{path:"/starred",element:h.jsx(CR,{})}),h.jsx(_n,{path:"/trash",element:h.jsx(NR,{})}),h.jsx(_n,{path:"/storage",element:h.jsx(ER,{})})]}),h.jsx(_n,{path:"*",element:h.jsx(Ef,{to:"/",replace:!0})})]})}const DR=new Vk({defaultOptions:{queries:{staleTime:1e4,refetchOnWindowFocus:!1,retry:1}}}),uw=document.getElementById("root");if(uw===null)throw new Error("Root element is missing from index.html");nC.createRoot(uw).render(h.jsx(S.StrictMode,{children:h.jsx(dk,{client:DR,children:h.jsx(Lb,{children:h.jsx(RE,{children:h.jsx(MR,{})})})})}));
|