@lacrous/omnicloud 0.2.3 → 0.2.5

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.
@@ -1,355 +0,0 @@
1
- var OS=Object.defineProperty;var rg=e=>{throw TypeError(e)};var IS=(e,n,s)=>n in e?OS(e,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[n]=s;var Dc=(e,n,s)=>IS(e,typeof n!="symbol"?n+"":n,s),Ac=(e,n,s)=>n.has(e)||rg("Cannot "+s);var P=(e,n,s)=>(Ac(e,n,"read from private field"),s?s.call(e):n.get(e)),ue=(e,n,s)=>n.has(e)?rg("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,s),J=(e,n,s,i)=>(Ac(e,n,"write to private field"),i?i.call(e,s):n.set(e,s),s),me=(e,n,s)=>(Ac(e,n,"access private method"),s);var Wa=(e,n,s,i)=>({set _(a){J(e,n,a,s)},get _(){return P(e,n,i)}});function _S(e,n){for(var s=0;s<n.length;s++){const i=n[s];if(typeof i!="string"&&!Array.isArray(i)){for(const a in i)if(a!=="default"&&!(a in e)){const c=Object.getOwnPropertyDescriptor(i,a);c&&Object.defineProperty(e,a,c.get?c:{enumerable:!0,get:()=>i[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(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 c of a)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function s(a){const c={};return a.integrity&&(c.integrity=a.integrity),a.referrerPolicy&&(c.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?c.credentials="include":a.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function i(a){if(a.ep)return;a.ep=!0;const c=s(a);fetch(a.href,c)}})();function FS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lc={exports:{}},to={},Oc={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 sg;function VS(){if(sg)return ve;sg=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"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function x(D){return D===null||typeof D!="object"?null:(D=v&&D[v]||D["@@iterator"],typeof D=="function"?D:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,T={};function E(D,R,ee){this.props=D,this.context=R,this.refs=T,this.updater=ee||C}E.prototype.isReactComponent={},E.prototype.setState=function(D,R){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,R,"setState")},E.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function A(){}A.prototype=E.prototype;function I(D,R,ee){this.props=D,this.context=R,this.refs=T,this.updater=ee||C}var b=I.prototype=new A;b.constructor=I,k(b,E.prototype),b.isPureReactComponent=!0;var O=Array.isArray,z=Object.prototype.hasOwnProperty,B={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};function F(D,R,ee){var ge,Ce={},Ee=null,De=null;if(R!=null)for(ge in R.ref!==void 0&&(De=R.ref),R.key!==void 0&&(Ee=""+R.key),R)z.call(R,ge)&&!L.hasOwnProperty(ge)&&(Ce[ge]=R[ge]);var Ne=arguments.length-2;if(Ne===1)Ce.children=ee;else if(1<Ne){for(var _e=Array(Ne),bt=0;bt<Ne;bt++)_e[bt]=arguments[bt+2];Ce.children=_e}if(D&&D.defaultProps)for(ge in Ne=D.defaultProps,Ne)Ce[ge]===void 0&&(Ce[ge]=Ne[ge]);return{$$typeof:e,type:D,key:Ee,ref:De,props:Ce,_owner:B.current}}function $(D,R){return{$$typeof:e,type:D.type,key:R,ref:D.ref,props:D.props,_owner:D._owner}}function Y(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function ne(D){var R={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(ee){return R[ee]})}var G=/\/+/g;function Z(D,R){return typeof D=="object"&&D!==null&&D.key!=null?ne(""+D.key):R.toString(36)}function fe(D,R,ee,ge,Ce){var Ee=typeof D;(Ee==="undefined"||Ee==="boolean")&&(D=null);var De=!1;if(D===null)De=!0;else switch(Ee){case"string":case"number":De=!0;break;case"object":switch(D.$$typeof){case e:case n:De=!0}}if(De)return De=D,Ce=Ce(De),D=ge===""?"."+Z(De,0):ge,O(Ce)?(ee="",D!=null&&(ee=D.replace(G,"$&/")+"/"),fe(Ce,R,ee,"",function(bt){return bt})):Ce!=null&&(Y(Ce)&&(Ce=$(Ce,ee+(!Ce.key||De&&De.key===Ce.key?"":(""+Ce.key).replace(G,"$&/")+"/")+D)),R.push(Ce)),1;if(De=0,ge=ge===""?".":ge+":",O(D))for(var Ne=0;Ne<D.length;Ne++){Ee=D[Ne];var _e=ge+Z(Ee,Ne);De+=fe(Ee,R,ee,_e,Ce)}else if(_e=x(D),typeof _e=="function")for(D=_e.call(D),Ne=0;!(Ee=D.next()).done;)Ee=Ee.value,_e=ge+Z(Ee,Ne++),De+=fe(Ee,R,ee,_e,Ce);else if(Ee==="object")throw R=String(D),Error("Objects are not valid as a React child (found: "+(R==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":R)+"). If you meant to render a collection of children, use an array instead.");return De}function Le(D,R,ee){if(D==null)return D;var ge=[],Ce=0;return fe(D,ge,"","",function(Ee){return R.call(ee,Ee,Ce++)}),ge}function ye(D){if(D._status===-1){var R=D._result;R=R(),R.then(function(ee){(D._status===0||D._status===-1)&&(D._status=1,D._result=ee)},function(ee){(D._status===0||D._status===-1)&&(D._status=2,D._result=ee)}),D._status===-1&&(D._status=0,D._result=R)}if(D._status===1)return D._result.default;throw D._result}var Se={current:null},X={transition:null},le={ReactCurrentDispatcher:Se,ReactCurrentBatchConfig:X,ReactCurrentOwner:B};function q(){throw Error("act(...) is not supported in production builds of React.")}return ve.Children={map:Le,forEach:function(D,R,ee){Le(D,function(){R.apply(this,arguments)},ee)},count:function(D){var R=0;return Le(D,function(){R++}),R},toArray:function(D){return Le(D,function(R){return R})||[]},only:function(D){if(!Y(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},ve.Component=E,ve.Fragment=s,ve.Profiler=a,ve.PureComponent=I,ve.StrictMode=i,ve.Suspense=m,ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=le,ve.act=q,ve.cloneElement=function(D,R,ee){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var ge=k({},D.props),Ce=D.key,Ee=D.ref,De=D._owner;if(R!=null){if(R.ref!==void 0&&(Ee=R.ref,De=B.current),R.key!==void 0&&(Ce=""+R.key),D.type&&D.type.defaultProps)var Ne=D.type.defaultProps;for(_e in R)z.call(R,_e)&&!L.hasOwnProperty(_e)&&(ge[_e]=R[_e]===void 0&&Ne!==void 0?Ne[_e]:R[_e])}var _e=arguments.length-2;if(_e===1)ge.children=ee;else if(1<_e){Ne=Array(_e);for(var bt=0;bt<_e;bt++)Ne[bt]=arguments[bt+2];ge.children=Ne}return{$$typeof:e,type:D.type,key:Ce,ref:Ee,props:ge,_owner:De}},ve.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:c,_context:D},D.Consumer=D},ve.createElement=F,ve.createFactory=function(D){var R=F.bind(null,D);return R.type=D,R},ve.createRef=function(){return{current:null}},ve.forwardRef=function(D){return{$$typeof:h,render:D}},ve.isValidElement=Y,ve.lazy=function(D){return{$$typeof:y,_payload:{_status:-1,_result:D},_init:ye}},ve.memo=function(D,R){return{$$typeof:g,type:D,compare:R===void 0?null:R}},ve.startTransition=function(D){var R=X.transition;X.transition={};try{D()}finally{X.transition=R}},ve.unstable_act=q,ve.useCallback=function(D,R){return Se.current.useCallback(D,R)},ve.useContext=function(D){return Se.current.useContext(D)},ve.useDebugValue=function(){},ve.useDeferredValue=function(D){return Se.current.useDeferredValue(D)},ve.useEffect=function(D,R){return Se.current.useEffect(D,R)},ve.useId=function(){return Se.current.useId()},ve.useImperativeHandle=function(D,R,ee){return Se.current.useImperativeHandle(D,R,ee)},ve.useInsertionEffect=function(D,R){return Se.current.useInsertionEffect(D,R)},ve.useLayoutEffect=function(D,R){return Se.current.useLayoutEffect(D,R)},ve.useMemo=function(D,R){return Se.current.useMemo(D,R)},ve.useReducer=function(D,R,ee){return Se.current.useReducer(D,R,ee)},ve.useRef=function(D){return Se.current.useRef(D)},ve.useState=function(D){return Se.current.useState(D)},ve.useSyncExternalStore=function(D,R,ee){return Se.current.useSyncExternalStore(D,R,ee)},ve.useTransition=function(){return Se.current.useTransition()},ve.version="18.3.1",ve}var ig;function tf(){return ig||(ig=1,Oc.exports=VS()),Oc.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 og;function zS(){if(og)return to;og=1;var e=tf(),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,c={key:!0,ref:!0,__self:!0,__source:!0};function u(h,m,g){var y,v={},x=null,C=null;g!==void 0&&(x=""+g),m.key!==void 0&&(x=""+m.key),m.ref!==void 0&&(C=m.ref);for(y in m)i.call(m,y)&&!c.hasOwnProperty(y)&&(v[y]=m[y]);if(h&&h.defaultProps)for(y in m=h.defaultProps,m)v[y]===void 0&&(v[y]=m[y]);return{$$typeof:n,type:h,key:x,ref:C,props:v,_owner:a.current}}return to.Fragment=s,to.jsx=u,to.jsxs=u,to}var ag;function US(){return ag||(ag=1,Lc.exports=zS()),Lc.exports}var f=US(),S=tf();const BS=FS(S),$S=_S({__proto__:null,default:BS},[S]),xv=S.createContext(void 0),un=e=>{const n=S.useContext(xv);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},KS=({client:e,children:n})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(xv.Provider,{value:e,children:n})),WS={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var pr,ef,lv,HS=(lv=class{constructor(){ue(this,pr,WS);ue(this,ef,!1)}setTimeoutProvider(e){J(this,pr,e)}setTimeout(e,n){return P(this,pr).setTimeout(e,n)}clearTimeout(e){P(this,pr).clearTimeout(e)}setInterval(e,n){return P(this,pr).setInterval(e,n)}clearInterval(e){P(this,pr).clearInterval(e)}},pr=new WeakMap,ef=new WeakMap,lv);const Qr=new HS;function QS(e){setTimeout(e,0)}const qS=typeof window>"u"||"Deno"in globalThis;function wt(){}function GS(e,n){return typeof e=="function"?e(n):e}function wv(e){return typeof e=="number"&&e>=0&&e!==1/0}function Sv(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Ve(e,n){return typeof e=="function"?e(n):e}function lg(e,n){const{type:s="all",exact:i,fetchStatus:a,predicate:c,queryKey:u,stale:h}=e;if(u){if(i){if(n.queryHash!==nf(u,n.options))return!1}else if(!ri(n.queryKey,u))return!1}if(s!=="all"){const m=n.isActive();if(s==="active"&&!m||s==="inactive"&&m)return!1}return!(typeof h=="boolean"&&n.isStale()!==h||a&&a!==n.state.fetchStatus||c&&!c(n))}function ug(e,n){const{exact:s,status:i,predicate:a,mutationKey:c}=e;if(c){if(!n.options.mutationKey)return!1;if(s){if(ls(n.options.mutationKey)!==ls(c))return!1}else if(!ri(n.options.mutationKey,c))return!1}return!(i&&n.state.status!==i||a&&!a(n))}function nf(e,n){return((n==null?void 0:n.queryKeyHashFn)||ls)(e)}function ls(e){return JSON.stringify(e,(n,s)=>ld(s)?Object.keys(s).sort().reduce((i,a)=>(i[a]=s[a],i),{}):s)}function ri(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(!ri(e[i],n[i]))return!1;return!0}const s=Object.keys(n);for(const i of s)if(!ri(e[i],n[i]))return!1;return!0}return!1}const YS=Object.prototype.hasOwnProperty;function kv(e,n,s=0){if(e===n)return e;if(s>500)return n;const i=cg(e)&&cg(n);if(!i&&!(ld(e)&&ld(n)))return n;const a=(i?e:Object.keys(e)).length,c=i?n:Object.keys(n),u=c.length,h=i?new Array(u):{};let m=0;for(let g=0;g<u;g++){const y=i?g:c[g],v=e[y],x=n[y];if(v===x){h[y]=v,(i?g<a:YS.call(e,y))&&m++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){h[y]=x;continue}const C=kv(v,x,s+1);h[y]=C,C===v&&m++}return a===u&&m===a?e:h}function nl(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 cg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ld(e){if(!dg(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!(!dg(i)||!i.hasOwnProperty("isPrototypeOf")||n!==Object.prototype)}function dg(e){return Object.prototype.toString.call(e)==="[object Object]"}function XS(e){return new Promise(n=>{Qr.setTimeout(n,e)})}function ud(e,n,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,n):s.structuralSharing!==!1?kv(e,n):n}function ZS(e){return e}function JS(e,n,s=0){const i=[...e,n];return s&&i.length>s?i.slice(1):i}function ek(e,n,s=0){const i=[n,...e];return s&&i.length>s?i.slice(0,-1):i}const rf=Symbol();function Cv(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===rf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function sf(e,n){return typeof e=="function"?e(...n):!!e}function tk(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 nk=()=>qS;const of=()=>nk();var li=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(){}},Yr,mr,Ks,uv,rk=(uv=class extends li{constructor(){super();ue(this,Yr);ue(this,mr);ue(this,Ks);J(this,Ks,n=>{if(typeof window<"u"&&window.addEventListener){const s=()=>n();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){P(this,mr)||this.setEventListener(P(this,Ks))}onUnsubscribe(){var n;this.hasListeners()||((n=P(this,mr))==null||n.call(this),J(this,mr,void 0))}setEventListener(n){var s;J(this,Ks,n),(s=P(this,mr))==null||s.call(this),J(this,mr,n(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(n){P(this,Yr)!==n&&(J(this,Yr,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(s=>{s(n)})}isFocused(){var n;return typeof P(this,Yr)=="boolean"?P(this,Yr):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},Yr=new WeakMap,mr=new WeakMap,Ks=new WeakMap,uv);const af=new rk,sk=QS;function ik(){let e=[],n=0,s=h=>{h()},i=h=>{h()},a=sk;const c=h=>{n?e.push(h):a(()=>{s(h)})},u=()=>{const h=e;e=[],h.length&&a(()=>{i(()=>{h.forEach(m=>{s(m)})})})};return{batch:h=>{let m;n++;try{m=h()}finally{n--,n||u()}return m},batchCalls:h=>(...m)=>{c(()=>{h(...m)})},schedule:c,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{i=h},setScheduler:h=>{a=h}}}const tt=ik();var Ws,gr,Hs,cv,ok=(cv=class extends li{constructor(){super();ue(this,Ws,!0);ue(this,gr);ue(this,Hs);J(this,Hs,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(){P(this,gr)||this.setEventListener(P(this,Hs))}onUnsubscribe(){var n;this.hasListeners()||((n=P(this,gr))==null||n.call(this),J(this,gr,void 0))}setEventListener(n){var s;J(this,Hs,n),(s=P(this,gr))==null||s.call(this),J(this,gr,n(this.setOnline.bind(this)))}setOnline(n){P(this,Ws)!==n&&(J(this,Ws,n),this.listeners.forEach(s=>{s(n)}))}isOnline(){return P(this,Ws)}},Ws=new WeakMap,gr=new WeakMap,Hs=new WeakMap,cv);const dl=new ok;function ak(e){return Math.min(1e3*2**e,3e4)}function Ev(e){return(e??"online")==="online"?dl.isOnline():!0}var cd=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function jv(e){let n=!1,s=0,i,a="pending",c,u;const h=new Promise((I,b)=>{c=I,u=b});h.catch(wt);const m=()=>a!=="pending",g=I=>{var b;if(!m()){const O=new cd(I);T(O),(b=e.onCancel)==null||b.call(e,O)}},y=()=>{n=!0},v=()=>{n=!1},x=()=>af.isFocused()&&(e.networkMode==="always"||dl.isOnline())&&e.canRun(),C=()=>Ev(e.networkMode)&&e.canRun(),k=I=>{m()||(i==null||i(),a="resolved",c(I))},T=I=>{m()||(i==null||i(),a="rejected",u(I))},E=()=>new Promise(I=>{var b;i=O=>{(m()||x())&&I(O)},(b=e.onPause)==null||b.call(e)}).then(()=>{var I;i=void 0,m()||(I=e.onContinue)==null||I.call(e)}),A=()=>{if(m())return;let I;const b=s===0?e.initialPromise:void 0;try{I=b??e.fn()}catch(O){I=Promise.reject(O)}Promise.resolve(I).then(k).catch(O=>{var $;if(m())return;const z=e.retry??(of()?0:3),B=e.retryDelay??ak,L=typeof B=="function"?B(s,O):B,F=z===!0||typeof z=="number"&&s<z||typeof z=="function"&&z(s,O);if(n||!F){T(O);return}s++,($=e.onFail)==null||$.call(e,s,O),XS(L).then(()=>x()?void 0:E()).then(()=>{n?T(O):A()})})};return{promise:h,status:()=>a,cancel:g,continue:()=>(i==null||i(),h),cancelRetry:y,continueRetry:v,canStart:C,start:()=>(C()?A():E().then(A),h)}}var Xr,dv,Tv=(dv=class{constructor(){ue(this,Xr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wv(this.gcTime)&&J(this,Xr,Qr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(of()?1/0:3e5))}clearGcTimeout(){P(this,Xr)!==void 0&&(Qr.clearTimeout(P(this,Xr)),J(this,Xr,void 0))}},Xr=new WeakMap,dv);function lk(e){return{onFetch:(n,s)=>{var y,v,x,C,k;const i=n.options,a=(x=(v=(y=n.fetchOptions)==null?void 0:y.meta)==null?void 0:v.fetchMore)==null?void 0:x.direction,c=((C=n.state.data)==null?void 0:C.pages)||[],u=((k=n.state.data)==null?void 0:k.pageParams)||[];let h={pages:[],pageParams:[]},m=0;const g=async()=>{let T=!1;const E=b=>{tk(b,()=>n.signal,()=>T=!0)},A=Cv(n.options,n.fetchOptions),I=async(b,O,z)=>{if(T)return Promise.reject(n.signal.reason);if(O==null&&b.pages.length)return Promise.resolve(b);const L=(()=>{const ne={client:n.client,queryKey:n.queryKey,pageParam:O,direction:z?"backward":"forward",meta:n.options.meta};return E(ne),ne})(),F=await A(L),{maxPages:$}=n.options,Y=z?ek:JS;return{pages:Y(b.pages,F,$),pageParams:Y(b.pageParams,O,$)}};if(a&&c.length){const b=a==="backward",O=b?Pv:dd,z={pages:c,pageParams:u};h=await I(z,O(i,z),b)}else{const b=e??c.length;do{const O=m===0?u[0]??i.initialPageParam:dd(i,h);if(m>0&&O==null)break;h=await I(h,O),m++}while(m<b)}return h};n.options.persister?n.fetchFn=()=>{var T,E;return(E=(T=n.options).persister)==null?void 0:E.call(T,g,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},s)}:n.fetchFn=g}}}function dd(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 Pv(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 uk(e,n){return n?dd(e,n)!=null:!1}function ck(e,n){return!n||!e.getPreviousPageParam?!1:Pv(e,n)!=null}var Qs,Zr,qs,Bt,Jr,Xe,Eo,es,rn,Dn,fv,dk=(fv=class extends Tv{constructor(n){super();ue(this,rn);ue(this,Qs);ue(this,Zr);ue(this,qs);ue(this,Bt);ue(this,Jr);ue(this,Xe);ue(this,Eo);ue(this,es);J(this,es,!1),J(this,Eo,n.defaultOptions),this.setOptions(n.options),this.observers=[],J(this,Jr,n.client),J(this,Bt,P(this,Jr).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,J(this,Zr,hg(this.options)),this.state=n.state??P(this,Zr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return P(this,Qs)}get promise(){var n;return(n=P(this,Xe))==null?void 0:n.promise}setOptions(n){if(this.options={...P(this,Eo),...n},n!=null&&n._type&&J(this,Qs,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=hg(this.options);s.data!==void 0&&(this.setState(fg(s.data,s.dataUpdatedAt)),J(this,Zr,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,Bt).remove(this)}setData(n,s){const i=ud(this.state.data,n,this.options);return me(this,rn,Dn).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,rn,Dn).call(this,{type:"setState",state:n})}cancel(n){var i,a;const s=(i=P(this,Xe))==null?void 0:i.promise;return(a=P(this,Xe))==null||a.cancel(n),s?s.then(wt).catch(wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return P(this,Zr)}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===rf||!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:!Sv(this.state.dataUpdatedAt,n)}onFocus(){var n,s;(n=this.observers.find(i=>i.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(s=P(this,Xe))==null||s.continue()}onOnline(){var n,s;(n=this.observers.find(i=>i.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(s=P(this,Xe))==null||s.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),P(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||(P(this,Xe)&&(P(this,es)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?P(this,Xe).cancel({revert:!0}):P(this,Xe).cancelRetry()),this.scheduleGc()),P(this,Bt).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||me(this,rn,Dn).call(this,{type:"invalidate"})}async fetch(n,s){var g,y,v,x,C,k,T,E,A,I,b,O;if(this.state.fetchStatus!=="idle"&&((g=P(this,Xe))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(P(this,Xe))return P(this,Xe).continueRetry(),P(this,Xe).promise}if(n&&this.setOptions(n),!this.options.queryFn){const z=this.observers.find(B=>B.options.queryFn);z&&this.setOptions(z.options)}const i=new AbortController,a=z=>{Object.defineProperty(z,"signal",{enumerable:!0,get:()=>(J(this,es,!0),i.signal)})},c=()=>{const z=Cv(this.options,s),L=(()=>{const F={client:P(this,Jr),queryKey:this.queryKey,meta:this.meta};return a(F),F})();return J(this,es,!1),this.options.persister?this.options.persister(z,L,this):z(L)},h=(()=>{const z={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:P(this,Jr),state:this.state,fetchFn:c};return a(z),z})();(y=P(this,Qs)==="infinite"?lk(this.options.pages):this.options.behavior)==null||y.onFetch(h,this),J(this,qs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=h.fetchOptions)==null?void 0:v.meta))&&me(this,rn,Dn).call(this,{type:"fetch",meta:(x=h.fetchOptions)==null?void 0:x.meta});const m=J(this,Xe,jv({initialPromise:s==null?void 0:s.initialPromise,fn:h.fetchFn,onCancel:z=>{z instanceof cd&&z.revert&&this.setState({...P(this,qs),fetchStatus:"idle"}),i.abort()},onFail:(z,B)=>{me(this,rn,Dn).call(this,{type:"failed",failureCount:z,error:B})},onPause:()=>{me(this,rn,Dn).call(this,{type:"pause"})},onContinue:()=>{me(this,rn,Dn).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const z=await m.start();if(z===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(z),(k=(C=P(this,Bt).config).onSuccess)==null||k.call(C,z,this),(E=(T=P(this,Bt).config).onSettled)==null||E.call(T,z,this.state.error,this),z}catch(z){if(z instanceof cd){if(z.silent)return P(this,Xe).promise;if(z.revert){if(this.state.data===void 0)throw z;return this.state.data}}throw me(this,rn,Dn).call(this,{type:"error",error:z}),(I=(A=P(this,Bt).config).onError)==null||I.call(A,z,this),(O=(b=P(this,Bt).config).onSettled)==null||O.call(b,this.state.data,z,this),z}finally{P(this,Xe)===m&&J(this,Xe,void 0),this.scheduleGc()}}},Qs=new WeakMap,Zr=new WeakMap,qs=new WeakMap,Bt=new WeakMap,Jr=new WeakMap,Xe=new WeakMap,Eo=new WeakMap,es=new WeakMap,rn=new WeakSet,Dn=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,...Nv(i.data,this.options),fetchMeta:n.meta??null};case"success":const a={...i,...fg(n.data,n.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return J(this,qs,n.manual?a:void 0),a;case"error":const c=n.error;return{...i,error:c,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:c,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()}),P(this,Bt).notify({query:this,type:"updated",action:n})})},fv);function Nv(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ev(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function fg(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function hg(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,jo,xt,ts,Gs,On,To,Ys,Xs,ns,rs,yr,Zs,Pe,io,fd,hd,pd,md,gd,yd,vd,xd,hv,bv=(hv=class extends li{constructor(n,s){super();ue(this,Pe);ue(this,vt);ue(this,xe);ue(this,jo);ue(this,xt);ue(this,ts);ue(this,Gs);ue(this,On);ue(this,To);ue(this,Ys);ue(this,Xs);ue(this,ns);ue(this,rs);ue(this,yr);ue(this,Zs,new Set);this.options=s,J(this,vt,n),J(this,On,null),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(P(this,xe).addObserver(this),pg(P(this,xe),this.options)?me(this,Pe,io).call(this):this.updateResult(),me(this,Pe,gd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return wd(P(this,xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return wd(P(this,xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,me(this,Pe,yd).call(this),me(this,Pe,vd).call(this),P(this,xe).removeObserver(this)}setOptions(n){const s=this.options,i=P(this,xe);if(this.options=P(this,vt).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ve(this.options.enabled,P(this,xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");me(this,Pe,xd).call(this),P(this,xe).setOptions(this.options),s._defaulted&&!nl(this.options,s)&&P(this,vt).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,xe),observer:this});const a=this.hasListeners();a&&mg(P(this,xe),i,this.options,s)&&me(this,Pe,io).call(this),this.updateResult(),a&&(P(this,xe)!==i||Ve(this.options.enabled,P(this,xe))!==Ve(s.enabled,P(this,xe))||Ve(this.options.staleTime,P(this,xe))!==Ve(s.staleTime,P(this,xe)))&&me(this,Pe,hd).call(this);const c=me(this,Pe,pd).call(this);a&&(P(this,xe)!==i||Ve(this.options.enabled,P(this,xe))!==Ve(s.enabled,P(this,xe))||c!==P(this,yr))&&me(this,Pe,md).call(this,c)}getOptimisticResult(n){const s=P(this,vt).getQueryCache().build(P(this,vt),n),i=this.createResult(s,n);return nl(this.getCurrentResult(),i)||(J(this,xt,i),J(this,Gs,this.options),J(this,ts,P(this,xe).state)),i}getCurrentResult(){return P(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){P(this,Zs).add(n)}getCurrentQuery(){return P(this,xe)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const s=P(this,vt).defaultQueryOptions(n),i=P(this,vt).getQueryCache().build(P(this,vt),s);let a=()=>{},c;const u=new Promise(h=>{c=h,a=P(this,vt).getQueryCache().subscribe(m=>{m.type==="updated"&&m.query.queryHash===i.queryHash&&i.state.data!==void 0&&(a(),h(this.createResult(i,s)))})});return Promise.race([i.fetch().then(()=>{const h=this.createResult(i,s);return c==null||c(h),h}).finally(()=>{a()}),u])}fetch(n){return me(this,Pe,io).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,xt)))}createResult(n,s){var B;const i=P(this,xe),a=this.options,c=P(this,xt),u=P(this,ts),h=P(this,Gs),m=n!==i?n.state:P(this,jo),{state:g}=n;let y={...g},v=!1,x;if(s._optimisticResults){const L=this.hasListeners(),F=!L&&pg(n,s),$=L&&mg(n,i,s,a);(F||$)&&(y={...y,...Nv(g.data,n.options)}),s._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:C,errorUpdatedAt:k,status:T}=y;x=y.data;let E=!1;if(s.placeholderData!==void 0&&x===void 0&&T==="pending"){let L;c!=null&&c.isPlaceholderData&&s.placeholderData===(h==null?void 0:h.placeholderData)?(L=c.data,E=!0):L=typeof s.placeholderData=="function"?s.placeholderData((B=P(this,Xs))==null?void 0:B.state.data,P(this,Xs)):s.placeholderData,L!==void 0&&(T="success",x=ud(c==null?void 0:c.data,L,s),v=!0)}if(s.select&&x!==void 0&&!E)if(c&&x===(u==null?void 0:u.data)&&s.select===P(this,To))x=P(this,Ys);else try{J(this,To,s.select),x=s.select(x),x=ud(c==null?void 0:c.data,x,s),J(this,Ys,x),J(this,On,null)}catch(L){J(this,On,L)}else x===void 0&&J(this,On,null);P(this,On)&&(C=P(this,On),x=P(this,Ys),k=Date.now(),T="error",v=!1);const A=y.fetchStatus==="fetching",I=T==="pending",b=T==="error",O=I&&A,z=x!==void 0;return{status:T,fetchStatus:y.fetchStatus,isPending:I,isSuccess:T==="success",isError:b,isInitialLoading:O,isLoading:O,data:x,dataUpdatedAt:y.dataUpdatedAt,error:C,errorUpdatedAt:k,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:y.dataUpdateCount>m.dataUpdateCount||y.errorUpdateCount>m.errorUpdateCount,isFetching:A,isRefetching:A&&!I,isLoadingError:b&&!z,isPaused:y.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:b&&z,isStale:lf(n,s),refetch:this.refetch,isEnabled:Ve(s.enabled,n)!==!1}}updateResult(){const n=P(this,xt),s=this.createResult(P(this,xe),this.options);if(J(this,ts,P(this,xe).state),J(this,Gs,this.options),P(this,ts).data!==void 0&&J(this,Xs,P(this,xe)),nl(s,n))return;J(this,xt,s);const a=(()=>{if(!n)return!0;const{notifyOnChangeProps:c}=this.options,u=typeof c=="function"?c():c;if(u==="all"||!u&&!P(this,Zs).size)return!0;const h=new Set(u??P(this,Zs));return this.options.throwOnError&&h.add("error"),Object.keys(P(this,xt)).some(m=>{const g=m;return P(this,xt)[g]!==n[g]&&h.has(g)})})();tt.batch(()=>{a&&this.listeners.forEach(c=>{c(P(this,xt))}),P(this,vt).getQueryCache().notify({query:P(this,xe),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&me(this,Pe,gd).call(this)}},vt=new WeakMap,xe=new WeakMap,jo=new WeakMap,xt=new WeakMap,ts=new WeakMap,Gs=new WeakMap,On=new WeakMap,To=new WeakMap,Ys=new WeakMap,Xs=new WeakMap,ns=new WeakMap,rs=new WeakMap,yr=new WeakMap,Zs=new WeakMap,Pe=new WeakSet,io=function(n){me(this,Pe,xd).call(this);let s=P(this,xe).fetch(this.options,n);return n!=null&&n.throwOnError||(s=s.catch(wt)),s},fd=function(n){return!of()&&Ve(this.options.enabled,P(this,xe))!==!1&&wv(n)},hd=function(){me(this,Pe,yd).call(this);const n=Ve(this.options.staleTime,P(this,xe));if(P(this,xt).isStale||!me(this,Pe,fd).call(this,n))return;const s=Sv(P(this,xt).dataUpdatedAt,n)+1;J(this,ns,Qr.setTimeout(()=>{P(this,xt).isStale||this.updateResult()},s))},pd=function(){return Ve(this.options.refetchInterval,P(this,xe))??!1},md=function(n){me(this,Pe,vd).call(this),J(this,yr,n),!(P(this,yr)===0||!me(this,Pe,fd).call(this,P(this,yr)))&&J(this,rs,Qr.setInterval(()=>{(this.options.refetchIntervalInBackground||af.isFocused())&&me(this,Pe,io).call(this)},P(this,yr)))},gd=function(){me(this,Pe,hd).call(this),me(this,Pe,md).call(this,me(this,Pe,pd).call(this))},yd=function(){P(this,ns)!==void 0&&(Qr.clearTimeout(P(this,ns)),J(this,ns,void 0))},vd=function(){P(this,rs)!==void 0&&(Qr.clearInterval(P(this,rs)),J(this,rs,void 0))},xd=function(){const n=P(this,vt).getQueryCache().build(P(this,vt),this.options);if(n===P(this,xe))return;const s=P(this,xe);J(this,xe,n),J(this,jo,n.state),this.hasListeners()&&(s==null||s.removeObserver(this),n.addObserver(this))},hv);function fk(e,n){return Ve(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Ve(n.retryOnMount,e)===!1)}function pg(e,n){return fk(e,n)||e.state.data!==void 0&&wd(e,n,n.refetchOnMount)}function wd(e,n,s){if(Ve(n.enabled,e)!==!1&&Ve(n.staleTime,e)!=="static"){const i=Ve(s,e);return i==="always"||i!==!1&&lf(e,n)}return!1}function mg(e,n,s,i){return(e!==n||Ve(i.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&lf(e,s)}function lf(e,n){return Ve(n.enabled,e)!==!1&&e.isStaleByTime(Ve(n.staleTime,e))}var hk=class extends bv{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 C,k;const{state:s}=e,i=super.createResult(e,n),{isFetching:a,isRefetching:c,isError:u,isRefetchError:h}=i,m=(k=(C=s.fetchMeta)==null?void 0:C.fetchMore)==null?void 0:k.direction,g=u&&m==="forward",y=a&&m==="forward",v=u&&m==="backward",x=a&&m==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:uk(n,s.data),hasPreviousPage:ck(n,s.data),isFetchNextPageError:g,isFetchingNextPage:y,isFetchPreviousPageError:v,isFetchingPreviousPage:x,isRefetchError:h&&!g&&!v,isRefetching:c&&!y&&!x}}},Po,yn,pt,ss,vn,fr,pv,pk=(pv=class extends Tv{constructor(n){super();ue(this,vn);ue(this,Po);ue(this,yn);ue(this,pt);ue(this,ss);J(this,Po,n.client),this.mutationId=n.mutationId,J(this,pt,n.mutationCache),J(this,yn,[]),this.state=n.state||Mv(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){P(this,yn).includes(n)||(P(this,yn).push(n),this.clearGcTimeout(),P(this,pt).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){J(this,yn,P(this,yn).filter(s=>s!==n)),this.scheduleGc(),P(this,pt).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){P(this,yn).length||(this.state.status==="pending"?this.scheduleGc():P(this,pt).remove(this))}continue(){var n;return((n=P(this,ss))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var h,m,g,y,v,x,C,k,T,E,A,I,b,O,z,B,L,F;const s=()=>{me(this,vn,fr).call(this,{type:"continue"})},i={client:P(this,Po),meta:this.options.meta,mutationKey:this.options.mutationKey},a=J(this,ss,jv({fn:()=>this.options.mutationFn?this.options.mutationFn(n,i):Promise.reject(new Error("No mutationFn found")),onFail:($,Y)=>{me(this,vn,fr).call(this,{type:"failed",failureCount:$,error:Y})},onPause:()=>{me(this,vn,fr).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,pt).canRun(this)})),c=this.state.status==="pending",u=!a.canStart();try{if(c)s();else{me(this,vn,fr).call(this,{type:"pending",variables:n,isPaused:u}),P(this,pt).config.onMutate&&await P(this,pt).config.onMutate(n,this,i);const Y=await((m=(h=this.options).onMutate)==null?void 0:m.call(h,n,i));Y!==this.state.context&&me(this,vn,fr).call(this,{type:"pending",context:Y,variables:n,isPaused:u})}const $=await a.start();return await((y=(g=P(this,pt).config).onSuccess)==null?void 0:y.call(g,$,n,this.state.context,this,i)),await((x=(v=this.options).onSuccess)==null?void 0:x.call(v,$,n,this.state.context,i)),await((k=(C=P(this,pt).config).onSettled)==null?void 0:k.call(C,$,null,this.state.variables,this.state.context,this,i)),await((E=(T=this.options).onSettled)==null?void 0:E.call(T,$,null,n,this.state.context,i)),me(this,vn,fr).call(this,{type:"success",data:$}),$}catch($){try{await((I=(A=P(this,pt).config).onError)==null?void 0:I.call(A,$,n,this.state.context,this,i))}catch(Y){Promise.reject(Y)}try{await((O=(b=this.options).onError)==null?void 0:O.call(b,$,n,this.state.context,i))}catch(Y){Promise.reject(Y)}try{await((B=(z=P(this,pt).config).onSettled)==null?void 0:B.call(z,void 0,$,this.state.variables,this.state.context,this,i))}catch(Y){Promise.reject(Y)}try{await((F=(L=this.options).onSettled)==null?void 0:F.call(L,void 0,$,n,this.state.context,i))}catch(Y){Promise.reject(Y)}throw me(this,vn,fr).call(this,{type:"error",error:$}),$}finally{P(this,ss)===a&&J(this,ss,void 0),P(this,pt).runNext(this)}}},Po=new WeakMap,yn=new WeakMap,pt=new WeakMap,ss=new WeakMap,vn=new WeakSet,fr=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(()=>{P(this,yn).forEach(i=>{i.onMutationUpdate(n)}),P(this,pt).notify({mutation:this,type:"updated",action:n})})},pv);function Mv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var In,sn,No,mv,mk=(mv=class extends li{constructor(n={}){super();ue(this,In);ue(this,sn);ue(this,No);this.config=n,J(this,In,new Set),J(this,sn,new Map),J(this,No,0)}build(n,s,i){const a=new pk({client:n,mutationCache:this,mutationId:++Wa(this,No)._,options:n.defaultMutationOptions(s),state:i});return this.add(a),a}add(n){P(this,In).add(n);const s=Ha(n);if(typeof s=="string"){const i=P(this,sn).get(s);i?i.push(n):P(this,sn).set(s,[n])}this.notify({type:"added",mutation:n})}remove(n){if(P(this,In).delete(n)){const s=Ha(n);if(typeof s=="string"){const i=P(this,sn).get(s);if(i)if(i.length>1){const a=i.indexOf(n);a!==-1&&i.splice(a,1)}else i[0]===n&&P(this,sn).delete(s)}}this.notify({type:"removed",mutation:n})}canRun(n){var i;const s=Ha(n);if(typeof s=="string"){const a=(i=P(this,sn).get(s))==null?void 0:i.find(c=>c.state.status==="pending");return!a||a===n}else return!0}runNext(n){var i,a;const s=Ha(n);return typeof s=="string"?((a=(i=P(this,sn).get(s))==null?void 0:i.find(c=>c!==n&&c.state.isPaused))==null?void 0:a.continue())??Promise.resolve():Promise.resolve()}clear(){tt.batch(()=>{P(this,In).forEach(n=>{this.notify({type:"removed",mutation:n})}),P(this,In).clear(),P(this,sn).clear()})}getAll(){return Array.from(P(this,In))}find(n){const s={exact:!0,...n};return this.getAll().find(i=>ug(s,i))}findAll(n={}){return this.getAll().filter(s=>ug(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))))}},In=new WeakMap,sn=new WeakMap,No=new WeakMap,mv);function Ha(e){var n;return(n=e.options.scope)==null?void 0:n.id}var _n,vr,mt,Fn,kn,oo,Sd,gv,gk=(gv=class extends li{constructor(s,i){super();ue(this,kn);ue(this,_n);ue(this,vr);ue(this,mt);ue(this,Fn);J(this,_n,s),this.setOptions(i),this.bindMethods(),me(this,kn,oo).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=P(this,_n).defaultMutationOptions(s),nl(this.options,i)||P(this,_n).getMutationCache().notify({type:"observerOptionsUpdated",mutation:P(this,mt),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&ls(i.mutationKey)!==ls(this.options.mutationKey)?this.reset():((a=P(this,mt))==null?void 0:a.state.status)==="pending"&&P(this,mt).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&P(this,mt)&&(P(this,mt).addObserver(this),me(this,kn,oo).call(this))}onUnsubscribe(){var s;this.hasListeners()||(s=P(this,mt))==null||s.removeObserver(this)}onMutationUpdate(s){me(this,kn,oo).call(this),me(this,kn,Sd).call(this,s)}getCurrentResult(){return P(this,vr)}reset(){var s;(s=P(this,mt))==null||s.removeObserver(this),J(this,mt,void 0),me(this,kn,oo).call(this),me(this,kn,Sd).call(this)}mutate(s,i){var a;return J(this,Fn,i),(a=P(this,mt))==null||a.removeObserver(this),J(this,mt,P(this,_n).getMutationCache().build(P(this,_n),this.options)),P(this,mt).addObserver(this),P(this,mt).execute(s)}},_n=new WeakMap,vr=new WeakMap,mt=new WeakMap,Fn=new WeakMap,kn=new WeakSet,oo=function(){var i;const s=((i=P(this,mt))==null?void 0:i.state)??Mv();J(this,vr,{...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset})},Sd=function(s){tt.batch(()=>{var i,a,c,u,h,m,g,y;if(P(this,Fn)&&this.hasListeners()){const v=P(this,vr).variables,x=P(this,vr).context,C={client:P(this,_n),meta:this.options.meta,mutationKey:this.options.mutationKey};if((s==null?void 0:s.type)==="success"){try{(a=(i=P(this,Fn)).onSuccess)==null||a.call(i,s.data,v,x,C)}catch(k){Promise.reject(k)}try{(u=(c=P(this,Fn)).onSettled)==null||u.call(c,s.data,null,v,x,C)}catch(k){Promise.reject(k)}}else if((s==null?void 0:s.type)==="error"){try{(m=(h=P(this,Fn)).onError)==null||m.call(h,s.error,v,x,C)}catch(k){Promise.reject(k)}try{(y=(g=P(this,Fn)).onSettled)==null||y.call(g,void 0,s.error,v,x,C)}catch(k){Promise.reject(k)}}}this.listeners.forEach(v=>{v(P(this,vr))})})},gv),xn,yv,yk=(yv=class extends li{constructor(n={}){super();ue(this,xn);this.config=n,J(this,xn,new Map)}build(n,s,i){const a=s.queryKey,c=s.queryHash??nf(a,s);let u=this.get(c);return u||(u=new dk({client:n,queryKey:a,queryHash:c,options:n.defaultQueryOptions(s),state:i,defaultOptions:n.getQueryDefaults(a)}),this.add(u)),u}add(n){P(this,xn).has(n.queryHash)||(P(this,xn).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){P(this,xn).get(n.queryHash)===n&&(n.destroy(),P(this,xn).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){tt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return P(this,xn).get(n)}getAll(){return[...P(this,xn).values()]}find(n){const s={exact:!0,...n};return this.getAll().find(i=>lg(s,i))}findAll(n={}){const s=this.getAll();return Object.keys(n).length>0?s.filter(i=>lg(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()})})}},xn=new WeakMap,yv),Be,xr,wr,Js,ei,Sr,ti,ni,vv,vk=(vv=class{constructor(e={}){ue(this,Be);ue(this,xr);ue(this,wr);ue(this,Js);ue(this,ei);ue(this,Sr);ue(this,ti);ue(this,ni);J(this,Be,e.queryCache||new yk),J(this,xr,e.mutationCache||new mk),J(this,wr,e.defaultOptions||{}),J(this,Js,new Map),J(this,ei,new Map),J(this,Sr,0)}mount(){Wa(this,Sr)._++,P(this,Sr)===1&&(J(this,ti,af.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,Be).onFocus())})),J(this,ni,dl.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,Be).onOnline())})))}unmount(){var e,n;Wa(this,Sr)._--,P(this,Sr)===0&&((e=P(this,ti))==null||e.call(this),J(this,ti,void 0),(n=P(this,ni))==null||n.call(this),J(this,ni,void 0))}isFetching(e){return P(this,Be).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,xr).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const n=this.defaultQueryOptions({queryKey:e});return(s=P(this,Be).get(n.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),s=P(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 P(this,Be).findAll(e).map(({queryKey:n,state:s})=>[n,s.data])}setQueryData(e,n,s){var u;const i=this.defaultQueryOptions({queryKey:e}),a=(u=P(this,Be).get(i.queryHash))==null?void 0:u.state.data,c=GS(n,a);if(c!==void 0)return P(this,Be).build(this,i).setData(c,{...s,manual:!0})}setQueriesData(e,n,s){return tt.batch(()=>P(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=P(this,Be).get(n.queryHash))==null?void 0:s.state}removeQueries(e){const n=P(this,Be);tt.batch(()=>{n.findAll(e).forEach(s=>{n.remove(s)})})}resetQueries(e,n){const s=P(this,Be);return tt.batch(()=>{const i=s.findAll(e),a=new Set(i);return i.forEach(c=>{c.reset()}),this.refetchQueries({type:"active",predicate:c=>a.has(c)},n)})}cancelQueries(e,n={}){const s={revert:!0,...n},i=tt.batch(()=>P(this,Be).findAll(e).map(a=>a.cancel(s)));return Promise.all(i).then(wt).catch(wt)}invalidateQueries(e,n={}){return tt.batch(()=>(P(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(()=>P(this,Be).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let c=a.fetch(void 0,s);return s.throwOnError||(c=c.catch(wt)),a.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(i).then(wt)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const s=P(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=P(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 dl.isOnline()?P(this,xr).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,Be)}getMutationCache(){return P(this,xr)}getDefaultOptions(){return P(this,wr)}setDefaultOptions(e){J(this,wr,e)}setQueryDefaults(e,n){P(this,Js).set(ls(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...P(this,Js).values()],s={};return n.forEach(i=>{ri(e,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(e,n){P(this,ei).set(ls(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...P(this,ei).values()],s={};return n.forEach(i=>{ri(e,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const n={...P(this,wr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=nf(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===rf&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,wr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,Be).clear(),P(this,xr).clear()}},Be=new WeakMap,xr=new WeakMap,wr=new WeakMap,Js=new WeakMap,ei=new WeakMap,Sr=new WeakMap,ti=new WeakMap,ni=new WeakMap,vv);const Rv=S.createContext(!1),xk=()=>S.useContext(Rv);Rv.Provider;function wk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Sk=S.createContext(wk()),kk=()=>S.useContext(Sk),Ck=(e,n,s)=>{const i=s!=null&&s.state.error&&typeof e.throwOnError=="function"?sf(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||i)&&(n.isReset()||(e.retryOnMount=!1))},Ek=e=>{S.useEffect(()=>{e.clearReset()},[e])},jk=({result:e,errorResetBoundary:n,throwOnError:s,query:i,suspense:a})=>e.isError&&!n.isReset()&&!e.isFetching&&i&&(a&&e.data===void 0||sf(s,[e.error,i])),Tk=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))}},Pk=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,Nk=(e,n,s)=>n.fetchOptimistic(e).catch(()=>{s.clearReset()});function Dv(e,n,s){const i=xk(),a=kk(),c=un(),u=c.defaultQueryOptions(e),h=c.getQueryCache().get(u.queryHash),m=e.subscribed!==!1;u._optimisticResults=i?"isRestoring":m?"optimistic":void 0,Tk(u),Ck(u,a,h),Ek(a);const[g]=S.useState(()=>new n(c,u)),y=g.getOptimisticResult(u),v=!i&&m;if(S.useSyncExternalStore(S.useCallback(x=>{const C=v?g.subscribe(tt.batchCalls(x)):wt;return g.updateResult(),C},[g,v]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),S.useEffect(()=>{g.setOptions(u)},[u,g]),Pk(u,y))throw Nk(u,g,a);if(jk({result:y,errorResetBoundary:a,throwOnError:u.throwOnError,query:h,suspense:u.suspense}))throw y.error;return u.notifyOnChangeProps?y:g.trackResult(y)}function Nr(e,n){return Dv(e,bv)}function Kt(e,n){const s=un(),[i]=S.useState(()=>new gk(s,e));S.useEffect(()=>{i.setOptions(e)},[i,e]);const a=S.useSyncExternalStore(S.useCallback(u=>i.subscribe(tt.batchCalls(u)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),c=S.useCallback((...u)=>{i.mutate(u[0],u[1]).catch(wt)},[i]);if(a.error&&sf(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:c,mutateAsync:a.mutate}}function bk(e,n){return Dv(e,hk)}var Qa={},Ic={exports:{}},Pt={},_c={exports:{}},Fc={};/**
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 gg;function Mk(){return gg||(gg=1,(function(e){function n(X,le){var q=X.length;X.push(le);e:for(;0<q;){var D=q-1>>>1,R=X[D];if(0<a(R,le))X[D]=le,X[q]=R,q=D;else break e}}function s(X){return X.length===0?null:X[0]}function i(X){if(X.length===0)return null;var le=X[0],q=X.pop();if(q!==le){X[0]=q;e:for(var D=0,R=X.length,ee=R>>>1;D<ee;){var ge=2*(D+1)-1,Ce=X[ge],Ee=ge+1,De=X[Ee];if(0>a(Ce,q))Ee<R&&0>a(De,Ce)?(X[D]=De,X[Ee]=q,D=Ee):(X[D]=Ce,X[ge]=q,D=ge);else if(Ee<R&&0>a(De,q))X[D]=De,X[Ee]=q,D=Ee;else break e}}return le}function a(X,le){var q=X.sortIndex-le.sortIndex;return q!==0?q:X.id-le.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,h=u.now();e.unstable_now=function(){return u.now()-h}}var m=[],g=[],y=1,v=null,x=3,C=!1,k=!1,T=!1,E=typeof setTimeout=="function"?setTimeout:null,A=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 b(X){for(var le=s(g);le!==null;){if(le.callback===null)i(g);else if(le.startTime<=X)i(g),le.sortIndex=le.expirationTime,n(m,le);else break;le=s(g)}}function O(X){if(T=!1,b(X),!k)if(s(m)!==null)k=!0,ye(z);else{var le=s(g);le!==null&&Se(O,le.startTime-X)}}function z(X,le){k=!1,T&&(T=!1,A(F),F=-1),C=!0;var q=x;try{for(b(le),v=s(m);v!==null&&(!(v.expirationTime>le)||X&&!ne());){var D=v.callback;if(typeof D=="function"){v.callback=null,x=v.priorityLevel;var R=D(v.expirationTime<=le);le=e.unstable_now(),typeof R=="function"?v.callback=R:v===s(m)&&i(m),b(le)}else i(m);v=s(m)}if(v!==null)var ee=!0;else{var ge=s(g);ge!==null&&Se(O,ge.startTime-le),ee=!1}return ee}finally{v=null,x=q,C=!1}}var B=!1,L=null,F=-1,$=5,Y=-1;function ne(){return!(e.unstable_now()-Y<$)}function G(){if(L!==null){var X=e.unstable_now();Y=X;var le=!0;try{le=L(!0,X)}finally{le?Z():(B=!1,L=null)}}else B=!1}var Z;if(typeof I=="function")Z=function(){I(G)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,Le=fe.port2;fe.port1.onmessage=G,Z=function(){Le.postMessage(null)}}else Z=function(){E(G,0)};function ye(X){L=X,B||(B=!0,Z())}function Se(X,le){F=E(function(){X(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(X){X.callback=null},e.unstable_continueExecution=function(){k||C||(k=!0,ye(z))},e.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<X?Math.floor(1e3/X):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return s(m)},e.unstable_next=function(X){switch(x){case 1:case 2:case 3:var le=3;break;default:le=x}var q=x;x=le;try{return X()}finally{x=q}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(X,le){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var q=x;x=X;try{return le()}finally{x=q}},e.unstable_scheduleCallback=function(X,le,q){var D=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?D+q:D):q=D,X){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=q+R,X={id:y++,callback:le,priorityLevel:X,startTime:q,expirationTime:R,sortIndex:-1},q>D?(X.sortIndex=q,n(g,X),s(m)===null&&X===s(g)&&(T?(A(F),F=-1):T=!0,Se(O,q-D))):(X.sortIndex=R,n(m,X),k||C||(k=!0,ye(z))),X},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(X){var le=x;return function(){var q=x;x=le;try{return X.apply(this,arguments)}finally{x=q}}}})(Fc)),Fc}var yg;function Rk(){return yg||(yg=1,_c.exports=Mk()),_c.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 vg;function Dk(){if(vg)return Pt;vg=1;var e=tf(),n=Rk();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 c(t,r){u(t,r),u(t+"Capture",r)}function u(t,r){for(a[t]=r,t=0;t<r.length;t++)i.add(r[t])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=Object.prototype.hasOwnProperty,g=/^[: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]*$/,y={},v={};function x(t){return m.call(v,t)?!0:m.call(y,t)?!1:g.test(t)?v[t]=!0:(y[t]=!0,!1)}function C(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 k(t,r,o,l){if(r===null||typeof r>"u"||C(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,p,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=p,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 A=/[\-:]([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(A,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(A,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(A,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 b(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")&&(k(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,z=Symbol.for("react.element"),B=Symbol.for("react.portal"),L=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),Y=Symbol.for("react.provider"),ne=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),Le=Symbol.for("react.memo"),ye=Symbol.for("react.lazy"),Se=Symbol.for("react.offscreen"),X=Symbol.iterator;function le(t){return t===null||typeof t!="object"?null:(t=X&&t[X]||t["@@iterator"],typeof t=="function"?t:null)}var q=Object.assign,D;function R(t){if(D===void 0)try{throw Error()}catch(o){var r=o.stack.trim().match(/\n( *(at )?)/);D=r&&r[1]||""}return`
34
- `+D+t}var ee=!1;function ge(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(U){var l=U}Reflect.construct(t,[],r)}else{try{r.call()}catch(U){l=U}t.call(r.prototype)}else{try{throw Error()}catch(U){l=U}t()}}catch(U){if(U&&l&&typeof U.stack=="string"){for(var d=U.stack.split(`
35
- `),p=l.stack.split(`
36
- `),w=d.length-1,j=p.length-1;1<=w&&0<=j&&d[w]!==p[j];)j--;for(;1<=w&&0<=j;w--,j--)if(d[w]!==p[j]){if(w!==1||j!==1)do if(w--,j--,0>j||d[w]!==p[j]){var N=`
37
- `+d[w].replace(" at new "," at ");return t.displayName&&N.includes("<anonymous>")&&(N=N.replace("<anonymous>",t.displayName)),N}while(1<=w&&0<=j);break}}}finally{ee=!1,Error.prepareStackTrace=o}return(t=t?t.displayName||t.name:"")?R(t):""}function Ce(t){switch(t.tag){case 5:return R(t.type);case 16:return R("Lazy");case 13:return R("Suspense");case 19:return R("SuspenseList");case 0:case 2:case 15:return t=ge(t.type,!1),t;case 11:return t=ge(t.type.render,!1),t;case 1:return t=ge(t.type,!0),t;default:return""}}function Ee(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 L:return"Fragment";case B:return"Portal";case $:return"Profiler";case F:return"StrictMode";case Z: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 Le:return r=t.displayName||null,r!==null?r:Ee(t.type)||"Memo";case ye:r=t._payload,t=t._init;try{return Ee(t(r))}catch{}}return null}function De(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 Ee(r);case 8:return r===F?"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 Ne(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function _e(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function bt(t){var r=_e(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,p=o.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return d.call(this)},set:function(w){l=""+w,p.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 Oo(t){t._valueTracker||(t._valueTracker=bt(t))}function uh(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var o=r.getValue(),l="";return t&&(l=_e(t)?t.checked?"true":"false":t.value),t=l,t!==o?(r.setValue(t),!0):!1}function Io(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 Vl(t,r){var o=r.checked;return q({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??t._wrapperState.initialChecked})}function ch(t,r){var o=r.defaultValue==null?"":r.defaultValue,l=r.checked!=null?r.checked:r.defaultChecked;o=Ne(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 dh(t,r){r=r.checked,r!=null&&b(t,"checked",r,!1)}function zl(t,r){dh(t,r);var o=Ne(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")?Ul(t,r.type,o):r.hasOwnProperty("defaultValue")&&Ul(t,r.type,Ne(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(t.defaultChecked=!!r.defaultChecked)}function fh(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 Ul(t,r,o){(r!=="number"||Io(t.ownerDocument)!==t)&&(o==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+o&&(t.defaultValue=""+o))}var gi=Array.isArray;function hs(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=""+Ne(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 Bl(t,r){if(r.dangerouslySetInnerHTML!=null)throw Error(s(91));return q({},r,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function hh(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(gi(o)){if(1<o.length)throw Error(s(93));o=o[0]}r=o}r==null&&(r=""),o=r}t._wrapperState={initialValue:Ne(o)}}function ph(t,r){var o=Ne(r.value),l=Ne(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 gh(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 $l(t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?gh(r):t==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var _o,yh=(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 yi(t,r){if(r){var o=t.firstChild;if(o&&o===t.lastChild&&o.nodeType===3){o.nodeValue=r;return}}t.textContent=r}var vi={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},V1=["Webkit","ms","Moz","O"];Object.keys(vi).forEach(function(t){V1.forEach(function(r){r=r+t.charAt(0).toUpperCase()+t.substring(1),vi[r]=vi[t]})});function vh(t,r,o){return r==null||typeof r=="boolean"||r===""?"":o||typeof r!="number"||r===0||vi.hasOwnProperty(t)&&vi[t]?(""+r).trim():r+"px"}function xh(t,r){t=t.style;for(var o in r)if(r.hasOwnProperty(o)){var l=o.indexOf("--")===0,d=vh(o,r[o],l);o==="float"&&(o="cssFloat"),l?t.setProperty(o,d):t[o]=d}}var z1=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 Kl(t,r){if(r){if(z1[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 Wl(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 Hl=null;function Ql(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var ql=null,ps=null,ms=null;function wh(t){if(t=zi(t)){if(typeof ql!="function")throw Error(s(280));var r=t.stateNode;r&&(r=oa(r),ql(t.stateNode,t.type,r))}}function Sh(t){ps?ms?ms.push(t):ms=[t]:ps=t}function kh(){if(ps){var t=ps,r=ms;if(ms=ps=null,wh(t),r)for(t=0;t<r.length;t++)wh(r[t])}}function Ch(t,r){return t(r)}function Eh(){}var Gl=!1;function jh(t,r,o){if(Gl)return t(r,o);Gl=!0;try{return Ch(t,r,o)}finally{Gl=!1,(ps!==null||ms!==null)&&(Eh(),kh())}}function xi(t,r){var o=t.stateNode;if(o===null)return null;var l=oa(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 Yl=!1;if(h)try{var wi={};Object.defineProperty(wi,"passive",{get:function(){Yl=!0}}),window.addEventListener("test",wi,wi),window.removeEventListener("test",wi,wi)}catch{Yl=!1}function U1(t,r,o,l,d,p,w,j,N){var U=Array.prototype.slice.call(arguments,3);try{r.apply(o,U)}catch(W){this.onError(W)}}var Si=!1,Fo=null,Vo=!1,Xl=null,B1={onError:function(t){Si=!0,Fo=t}};function $1(t,r,o,l,d,p,w,j,N){Si=!1,Fo=null,U1.apply(B1,arguments)}function K1(t,r,o,l,d,p,w,j,N){if($1.apply(this,arguments),Si){if(Si){var U=Fo;Si=!1,Fo=null}else throw Error(s(198));Vo||(Vo=!0,Xl=U)}}function Rr(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 Th(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 Ph(t){if(Rr(t)!==t)throw Error(s(188))}function W1(t){var r=t.alternate;if(!r){if(r=Rr(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 p=d.alternate;if(p===null){if(l=d.return,l!==null){o=l;continue}break}if(d.child===p.child){for(p=d.child;p;){if(p===o)return Ph(d),t;if(p===l)return Ph(d),r;p=p.sibling}throw Error(s(188))}if(o.return!==l.return)o=d,l=p;else{for(var w=!1,j=d.child;j;){if(j===o){w=!0,o=d,l=p;break}if(j===l){w=!0,l=d,o=p;break}j=j.sibling}if(!w){for(j=p.child;j;){if(j===o){w=!0,o=p,l=d;break}if(j===l){w=!0,l=p,o=d;break}j=j.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 Nh(t){return t=W1(t),t!==null?bh(t):null}function bh(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var r=bh(t);if(r!==null)return r;t=t.sibling}return null}var Mh=n.unstable_scheduleCallback,Rh=n.unstable_cancelCallback,H1=n.unstable_shouldYield,Q1=n.unstable_requestPaint,We=n.unstable_now,q1=n.unstable_getCurrentPriorityLevel,Zl=n.unstable_ImmediatePriority,Dh=n.unstable_UserBlockingPriority,zo=n.unstable_NormalPriority,G1=n.unstable_LowPriority,Ah=n.unstable_IdlePriority,Uo=null,dn=null;function Y1(t){if(dn&&typeof dn.onCommitFiberRoot=="function")try{dn.onCommitFiberRoot(Uo,t,void 0,(t.current.flags&128)===128)}catch{}}var Qt=Math.clz32?Math.clz32:J1,X1=Math.log,Z1=Math.LN2;function J1(t){return t>>>=0,t===0?32:31-(X1(t)/Z1|0)|0}var Bo=64,$o=4194304;function ki(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 Ko(t,r){var o=t.pendingLanes;if(o===0)return 0;var l=0,d=t.suspendedLanes,p=t.pingedLanes,w=o&268435455;if(w!==0){var j=w&~d;j!==0?l=ki(j):(p&=w,p!==0&&(l=ki(p)))}else w=o&~d,w!==0?l=ki(w):p!==0&&(l=ki(p));if(l===0)return 0;if(r!==0&&r!==l&&(r&d)===0&&(d=l&-l,p=r&-r,d>=p||d===16&&(p&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-Qt(r),d=1<<o,l|=t[o],r&=~d;return l}function ew(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 tw(t,r){for(var o=t.suspendedLanes,l=t.pingedLanes,d=t.expirationTimes,p=t.pendingLanes;0<p;){var w=31-Qt(p),j=1<<w,N=d[w];N===-1?((j&o)===0||(j&l)!==0)&&(d[w]=ew(j,r)):N<=r&&(t.expiredLanes|=j),p&=~j}}function Jl(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Lh(){var t=Bo;return Bo<<=1,(Bo&4194240)===0&&(Bo=64),t}function eu(t){for(var r=[],o=0;31>o;o++)r.push(t);return r}function Ci(t,r,o){t.pendingLanes|=r,r!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,r=31-Qt(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-Qt(o),p=1<<d;r[d]=0,l[d]=-1,t[d]=-1,o&=~p}}function tu(t,r){var o=t.entangledLanes|=r;for(t=t.entanglements;o;){var l=31-Qt(o),d=1<<l;d&r|t[l]&r&&(t[l]|=r),o&=~d}}var be=0;function Oh(t){return t&=-t,1<t?4<t?(t&268435455)!==0?16:536870912:4:1}var Ih,nu,_h,Fh,Vh,ru=!1,Wo=[],Kn=null,Wn=null,Hn=null,Ei=new Map,ji=new Map,Qn=[],rw="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 zh(t,r){switch(t){case"focusin":case"focusout":Kn=null;break;case"dragenter":case"dragleave":Wn=null;break;case"mouseover":case"mouseout":Hn=null;break;case"pointerover":case"pointerout":Ei.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":ji.delete(r.pointerId)}}function Ti(t,r,o,l,d,p){return t===null||t.nativeEvent!==p?(t={blockedOn:r,domEventName:o,eventSystemFlags:l,nativeEvent:p,targetContainers:[d]},r!==null&&(r=zi(r),r!==null&&nu(r)),t):(t.eventSystemFlags|=l,r=t.targetContainers,d!==null&&r.indexOf(d)===-1&&r.push(d),t)}function sw(t,r,o,l,d){switch(r){case"focusin":return Kn=Ti(Kn,t,r,o,l,d),!0;case"dragenter":return Wn=Ti(Wn,t,r,o,l,d),!0;case"mouseover":return Hn=Ti(Hn,t,r,o,l,d),!0;case"pointerover":var p=d.pointerId;return Ei.set(p,Ti(Ei.get(p)||null,t,r,o,l,d)),!0;case"gotpointercapture":return p=d.pointerId,ji.set(p,Ti(ji.get(p)||null,t,r,o,l,d)),!0}return!1}function Uh(t){var r=Dr(t.target);if(r!==null){var o=Rr(r);if(o!==null){if(r=o.tag,r===13){if(r=Th(o),r!==null){t.blockedOn=r,Vh(t.priority,function(){_h(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 Ho(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var o=iu(t.domEventName,t.eventSystemFlags,r[0],t.nativeEvent);if(o===null){o=t.nativeEvent;var l=new o.constructor(o.type,o);Hl=l,o.target.dispatchEvent(l),Hl=null}else return r=zi(o),r!==null&&nu(r),t.blockedOn=o,!1;r.shift()}return!0}function Bh(t,r,o){Ho(t)&&o.delete(r)}function iw(){ru=!1,Kn!==null&&Ho(Kn)&&(Kn=null),Wn!==null&&Ho(Wn)&&(Wn=null),Hn!==null&&Ho(Hn)&&(Hn=null),Ei.forEach(Bh),ji.forEach(Bh)}function Pi(t,r){t.blockedOn===r&&(t.blockedOn=null,ru||(ru=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,iw)))}function Ni(t){function r(d){return Pi(d,t)}if(0<Wo.length){Pi(Wo[0],t);for(var o=1;o<Wo.length;o++){var l=Wo[o];l.blockedOn===t&&(l.blockedOn=null)}}for(Kn!==null&&Pi(Kn,t),Wn!==null&&Pi(Wn,t),Hn!==null&&Pi(Hn,t),Ei.forEach(r),ji.forEach(r),o=0;o<Qn.length;o++)l=Qn[o],l.blockedOn===t&&(l.blockedOn=null);for(;0<Qn.length&&(o=Qn[0],o.blockedOn===null);)Uh(o),o.blockedOn===null&&Qn.shift()}var gs=O.ReactCurrentBatchConfig,Qo=!0;function ow(t,r,o,l){var d=be,p=gs.transition;gs.transition=null;try{be=1,su(t,r,o,l)}finally{be=d,gs.transition=p}}function aw(t,r,o,l){var d=be,p=gs.transition;gs.transition=null;try{be=4,su(t,r,o,l)}finally{be=d,gs.transition=p}}function su(t,r,o,l){if(Qo){var d=iu(t,r,o,l);if(d===null)ku(t,r,l,qo,o),zh(t,l);else if(sw(d,t,r,o,l))l.stopPropagation();else if(zh(t,l),r&4&&-1<rw.indexOf(t)){for(;d!==null;){var p=zi(d);if(p!==null&&Ih(p),p=iu(t,r,o,l),p===null&&ku(t,r,l,qo,o),p===d)break;d=p}d!==null&&l.stopPropagation()}else ku(t,r,l,null,o)}}var qo=null;function iu(t,r,o,l){if(qo=null,t=Ql(l),t=Dr(t),t!==null)if(r=Rr(t),r===null)t=null;else if(o=r.tag,o===13){if(t=Th(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 qo=t,null}function $h(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(q1()){case Zl:return 1;case Dh:return 4;case zo:case G1:return 16;case Ah:return 536870912;default:return 16}default:return 16}}var qn=null,ou=null,Go=null;function Kh(){if(Go)return Go;var t,r=ou,o=r.length,l,d="value"in qn?qn.value:qn.textContent,p=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[p-l];l++);return Go=d.slice(t,1<l?1-l:void 0)}function Yo(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 Xo(){return!0}function Wh(){return!1}function Mt(t){function r(o,l,d,p,w){this._reactName=o,this._targetInst=d,this.type=l,this.nativeEvent=p,this.target=w,this.currentTarget=null;for(var j in t)t.hasOwnProperty(j)&&(o=t[j],this[j]=o?o(p):p[j]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Xo:Wh,this.isPropagationStopped=Wh,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=Xo)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Xo)},persist:function(){},isPersistent:Xo}),r}var ys={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},au=Mt(ys),bi=q({},ys,{view:0,detail:0}),lw=Mt(bi),lu,uu,Mi,Zo=q({},bi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:du,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!==Mi&&(Mi&&t.type==="mousemove"?(lu=t.screenX-Mi.screenX,uu=t.screenY-Mi.screenY):uu=lu=0,Mi=t),lu)},movementY:function(t){return"movementY"in t?t.movementY:uu}}),Hh=Mt(Zo),uw=q({},Zo,{dataTransfer:0}),cw=Mt(uw),dw=q({},bi,{relatedTarget:0}),cu=Mt(dw),fw=q({},ys,{animationName:0,elapsedTime:0,pseudoElement:0}),hw=Mt(fw),pw=q({},ys,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),mw=Mt(pw),gw=q({},ys,{data:0}),Qh=Mt(gw),yw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vw={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"},xw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ww(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=xw[t])?!!r[t]:!1}function du(){return ww}var Sw=q({},bi,{key:function(t){if(t.key){var r=yw[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Yo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?vw[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:du,charCode:function(t){return t.type==="keypress"?Yo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Yo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),kw=Mt(Sw),Cw=q({},Zo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qh=Mt(Cw),Ew=q({},bi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:du}),jw=Mt(Ew),Tw=q({},ys,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pw=Mt(Tw),Nw=q({},Zo,{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}),bw=Mt(Nw),Mw=[9,13,27,32],fu=h&&"CompositionEvent"in window,Ri=null;h&&"documentMode"in document&&(Ri=document.documentMode);var Rw=h&&"TextEvent"in window&&!Ri,Gh=h&&(!fu||Ri&&8<Ri&&11>=Ri),Yh=" ",Xh=!1;function Zh(t,r){switch(t){case"keyup":return Mw.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jh(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var vs=!1;function Dw(t,r){switch(t){case"compositionend":return Jh(r);case"keypress":return r.which!==32?null:(Xh=!0,Yh);case"textInput":return t=r.data,t===Yh&&Xh?null:t;default:return null}}function Aw(t,r){if(vs)return t==="compositionend"||!fu&&Zh(t,r)?(t=Kh(),Go=ou=qn=null,vs=!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 Gh&&r.locale!=="ko"?null:r.data;default:return null}}var Lw={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 ep(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!Lw[t.type]:r==="textarea"}function tp(t,r,o,l){Sh(l),r=ra(r,"onChange"),0<r.length&&(o=new au("onChange","change",null,o,l),t.push({event:o,listeners:r}))}var Di=null,Ai=null;function Ow(t){xp(t,0)}function Jo(t){var r=Cs(t);if(uh(r))return t}function Iw(t,r){if(t==="change")return r}var np=!1;if(h){var hu;if(h){var pu="oninput"in document;if(!pu){var rp=document.createElement("div");rp.setAttribute("oninput","return;"),pu=typeof rp.oninput=="function"}hu=pu}else hu=!1;np=hu&&(!document.documentMode||9<document.documentMode)}function sp(){Di&&(Di.detachEvent("onpropertychange",ip),Ai=Di=null)}function ip(t){if(t.propertyName==="value"&&Jo(Ai)){var r=[];tp(r,Ai,t,Ql(t)),jh(Ow,r)}}function _w(t,r,o){t==="focusin"?(sp(),Di=r,Ai=o,Di.attachEvent("onpropertychange",ip)):t==="focusout"&&sp()}function Fw(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Jo(Ai)}function Vw(t,r){if(t==="click")return Jo(r)}function zw(t,r){if(t==="input"||t==="change")return Jo(r)}function Uw(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var qt=typeof Object.is=="function"?Object.is:Uw;function Li(t,r){if(qt(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(!m.call(r,d)||!qt(t[d],r[d]))return!1}return!0}function op(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function ap(t,r){var o=op(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=op(o)}}function lp(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?lp(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function up(){for(var t=window,r=Io();r instanceof t.HTMLIFrameElement;){try{var o=typeof r.contentWindow.location.href=="string"}catch{o=!1}if(o)t=r.contentWindow;else break;r=Io(t.document)}return r}function mu(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 Bw(t){var r=up(),o=t.focusedElem,l=t.selectionRange;if(r!==o&&o&&o.ownerDocument&&lp(o.ownerDocument.documentElement,o)){if(l!==null&&mu(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,p=Math.min(l.start,d);l=l.end===void 0?p:Math.min(l.end,d),!t.extend&&p>l&&(d=l,l=p,p=d),d=ap(o,p);var w=ap(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(),p>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 $w=h&&"documentMode"in document&&11>=document.documentMode,xs=null,gu=null,Oi=null,yu=!1;function cp(t,r,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;yu||xs==null||xs!==Io(l)||(l=xs,"selectionStart"in l&&mu(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}),Oi&&Li(Oi,l)||(Oi=l,l=ra(gu,"onSelect"),0<l.length&&(r=new au("onSelect","select",null,r,o),t.push({event:r,listeners:l}),r.target=xs)))}function ea(t,r){var o={};return o[t.toLowerCase()]=r.toLowerCase(),o["Webkit"+t]="webkit"+r,o["Moz"+t]="moz"+r,o}var ws={animationend:ea("Animation","AnimationEnd"),animationiteration:ea("Animation","AnimationIteration"),animationstart:ea("Animation","AnimationStart"),transitionend:ea("Transition","TransitionEnd")},vu={},dp={};h&&(dp=document.createElement("div").style,"AnimationEvent"in window||(delete ws.animationend.animation,delete ws.animationiteration.animation,delete ws.animationstart.animation),"TransitionEvent"in window||delete ws.transitionend.transition);function ta(t){if(vu[t])return vu[t];if(!ws[t])return t;var r=ws[t],o;for(o in r)if(r.hasOwnProperty(o)&&o in dp)return vu[t]=r[o];return t}var fp=ta("animationend"),hp=ta("animationiteration"),pp=ta("animationstart"),mp=ta("transitionend"),gp=new Map,yp="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 Gn(t,r){gp.set(t,r),c(r,[t])}for(var xu=0;xu<yp.length;xu++){var wu=yp[xu],Kw=wu.toLowerCase(),Ww=wu[0].toUpperCase()+wu.slice(1);Gn(Kw,"on"+Ww)}Gn(fp,"onAnimationEnd"),Gn(hp,"onAnimationIteration"),Gn(pp,"onAnimationStart"),Gn("dblclick","onDoubleClick"),Gn("focusin","onFocus"),Gn("focusout","onBlur"),Gn(mp,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ii="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(" "),Hw=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ii));function vp(t,r,o){var l=t.type||"unknown-event";t.currentTarget=o,K1(l,r,void 0,t),t.currentTarget=null}function xp(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 p=void 0;if(r)for(var w=l.length-1;0<=w;w--){var j=l[w],N=j.instance,U=j.currentTarget;if(j=j.listener,N!==p&&d.isPropagationStopped())break e;vp(d,j,U),p=N}else for(w=0;w<l.length;w++){if(j=l[w],N=j.instance,U=j.currentTarget,j=j.listener,N!==p&&d.isPropagationStopped())break e;vp(d,j,U),p=N}}}if(Vo)throw t=Xl,Vo=!1,Xl=null,t}function Oe(t,r){var o=r[Nu];o===void 0&&(o=r[Nu]=new Set);var l=t+"__bubble";o.has(l)||(wp(r,t,2,!1),o.add(l))}function Su(t,r,o){var l=0;r&&(l|=4),wp(o,t,l,r)}var na="_reactListening"+Math.random().toString(36).slice(2);function _i(t){if(!t[na]){t[na]=!0,i.forEach(function(o){o!=="selectionchange"&&(Hw.has(o)||Su(o,!1,t),Su(o,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[na]||(r[na]=!0,Su("selectionchange",!1,r))}}function wp(t,r,o,l){switch($h(r)){case 1:var d=ow;break;case 4:d=aw;break;default:d=su}o=d.bind(null,r,o,t),d=void 0,!Yl||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 ku(t,r,o,l,d){var p=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 j=l.stateNode.containerInfo;if(j===d||j.nodeType===8&&j.parentNode===d)break;if(w===4)for(w=l.return;w!==null;){var N=w.tag;if((N===3||N===4)&&(N=w.stateNode.containerInfo,N===d||N.nodeType===8&&N.parentNode===d))return;w=w.return}for(;j!==null;){if(w=Dr(j),w===null)return;if(N=w.tag,N===5||N===6){l=p=w;continue e}j=j.parentNode}}l=l.return}jh(function(){var U=p,W=Ql(o),H=[];e:{var K=gp.get(t);if(K!==void 0){var te=au,se=t;switch(t){case"keypress":if(Yo(o)===0)break e;case"keydown":case"keyup":te=kw;break;case"focusin":se="focus",te=cu;break;case"focusout":se="blur",te=cu;break;case"beforeblur":case"afterblur":te=cu;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=Hh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=cw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=jw;break;case fp:case hp:case pp:te=hw;break;case mp:te=Pw;break;case"scroll":te=lw;break;case"wheel":te=bw;break;case"copy":case"cut":case"paste":te=mw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=qh}var oe=(r&4)!==0,He=!oe&&t==="scroll",_=oe?K!==null?K+"Capture":null:K;oe=[];for(var M=U,V;M!==null;){V=M;var Q=V.stateNode;if(V.tag===5&&Q!==null&&(V=Q,_!==null&&(Q=xi(M,_),Q!=null&&oe.push(Fi(M,Q,V)))),He)break;M=M.return}0<oe.length&&(K=new te(K,se,null,o,W),H.push({event:K,listeners:oe}))}}if((r&7)===0){e:{if(K=t==="mouseover"||t==="pointerover",te=t==="mouseout"||t==="pointerout",K&&o!==Hl&&(se=o.relatedTarget||o.fromElement)&&(Dr(se)||se[En]))break e;if((te||K)&&(K=W.window===W?W:(K=W.ownerDocument)?K.defaultView||K.parentWindow:window,te?(se=o.relatedTarget||o.toElement,te=U,se=se?Dr(se):null,se!==null&&(He=Rr(se),se!==He||se.tag!==5&&se.tag!==6)&&(se=null)):(te=null,se=U),te!==se)){if(oe=Hh,Q="onMouseLeave",_="onMouseEnter",M="mouse",(t==="pointerout"||t==="pointerover")&&(oe=qh,Q="onPointerLeave",_="onPointerEnter",M="pointer"),He=te==null?K:Cs(te),V=se==null?K:Cs(se),K=new oe(Q,M+"leave",te,o,W),K.target=He,K.relatedTarget=V,Q=null,Dr(W)===U&&(oe=new oe(_,M+"enter",se,o,W),oe.target=V,oe.relatedTarget=He,Q=oe),He=Q,te&&se)t:{for(oe=te,_=se,M=0,V=oe;V;V=Ss(V))M++;for(V=0,Q=_;Q;Q=Ss(Q))V++;for(;0<M-V;)oe=Ss(oe),M--;for(;0<V-M;)_=Ss(_),V--;for(;M--;){if(oe===_||_!==null&&oe===_.alternate)break t;oe=Ss(oe),_=Ss(_)}oe=null}else oe=null;te!==null&&Sp(H,K,te,oe,!1),se!==null&&He!==null&&Sp(H,He,se,oe,!0)}}e:{if(K=U?Cs(U):window,te=K.nodeName&&K.nodeName.toLowerCase(),te==="select"||te==="input"&&K.type==="file")var ae=Iw;else if(ep(K))if(np)ae=zw;else{ae=Fw;var ce=_w}else(te=K.nodeName)&&te.toLowerCase()==="input"&&(K.type==="checkbox"||K.type==="radio")&&(ae=Vw);if(ae&&(ae=ae(t,U))){tp(H,ae,o,W);break e}ce&&ce(t,K,U),t==="focusout"&&(ce=K._wrapperState)&&ce.controlled&&K.type==="number"&&Ul(K,"number",K.value)}switch(ce=U?Cs(U):window,t){case"focusin":(ep(ce)||ce.contentEditable==="true")&&(xs=ce,gu=U,Oi=null);break;case"focusout":Oi=gu=xs=null;break;case"mousedown":yu=!0;break;case"contextmenu":case"mouseup":case"dragend":yu=!1,cp(H,o,W);break;case"selectionchange":if($w)break;case"keydown":case"keyup":cp(H,o,W)}var de;if(fu)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 vs?Zh(t,o)&&(he="onCompositionEnd"):t==="keydown"&&o.keyCode===229&&(he="onCompositionStart");he&&(Gh&&o.locale!=="ko"&&(vs||he!=="onCompositionStart"?he==="onCompositionEnd"&&vs&&(de=Kh()):(qn=W,ou="value"in qn?qn.value:qn.textContent,vs=!0)),ce=ra(U,he),0<ce.length&&(he=new Qh(he,t,null,o,W),H.push({event:he,listeners:ce}),de?he.data=de:(de=Jh(o),de!==null&&(he.data=de)))),(de=Rw?Dw(t,o):Aw(t,o))&&(U=ra(U,"onBeforeInput"),0<U.length&&(W=new Qh("onBeforeInput","beforeinput",null,o,W),H.push({event:W,listeners:U}),W.data=de))}xp(H,r)})}function Fi(t,r,o){return{instance:t,listener:r,currentTarget:o}}function ra(t,r){for(var o=r+"Capture",l=[];t!==null;){var d=t,p=d.stateNode;d.tag===5&&p!==null&&(d=p,p=xi(t,o),p!=null&&l.unshift(Fi(t,p,d)),p=xi(t,r),p!=null&&l.push(Fi(t,p,d))),t=t.return}return l}function Ss(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Sp(t,r,o,l,d){for(var p=r._reactName,w=[];o!==null&&o!==l;){var j=o,N=j.alternate,U=j.stateNode;if(N!==null&&N===l)break;j.tag===5&&U!==null&&(j=U,d?(N=xi(o,p),N!=null&&w.unshift(Fi(o,N,j))):d||(N=xi(o,p),N!=null&&w.push(Fi(o,N,j)))),o=o.return}w.length!==0&&t.push({event:r,listeners:w})}var Qw=/\r\n?/g,qw=/\u0000|\uFFFD/g;function kp(t){return(typeof t=="string"?t:""+t).replace(Qw,`
38
- `).replace(qw,"")}function sa(t,r,o){if(r=kp(r),kp(t)!==r&&o)throw Error(s(425))}function ia(){}var Cu=null,Eu=null;function ju(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 Tu=typeof setTimeout=="function"?setTimeout:void 0,Gw=typeof clearTimeout=="function"?clearTimeout:void 0,Cp=typeof Promise=="function"?Promise:void 0,Yw=typeof queueMicrotask=="function"?queueMicrotask:typeof Cp<"u"?function(t){return Cp.resolve(null).then(t).catch(Xw)}:Tu;function Xw(t){setTimeout(function(){throw t})}function Pu(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),Ni(r);return}l--}else o!=="$"&&o!=="$?"&&o!=="$!"||l++;o=d}while(o);Ni(r)}function Yn(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 Ep(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 ks=Math.random().toString(36).slice(2),fn="__reactFiber$"+ks,Vi="__reactProps$"+ks,En="__reactContainer$"+ks,Nu="__reactEvents$"+ks,Zw="__reactListeners$"+ks,Jw="__reactHandles$"+ks;function Dr(t){var r=t[fn];if(r)return r;for(var o=t.parentNode;o;){if(r=o[En]||o[fn]){if(o=r.alternate,r.child!==null||o!==null&&o.child!==null)for(t=Ep(t);t!==null;){if(o=t[fn])return o;t=Ep(t)}return r}t=o,o=t.parentNode}return null}function zi(t){return t=t[fn]||t[En],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Cs(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(s(33))}function oa(t){return t[Vi]||null}var bu=[],Es=-1;function Xn(t){return{current:t}}function Ie(t){0>Es||(t.current=bu[Es],bu[Es]=null,Es--)}function Ae(t,r){Es++,bu[Es]=t.current,t.current=r}var Zn={},ct=Xn(Zn),kt=Xn(!1),Ar=Zn;function js(t,r){var o=t.type.contextTypes;if(!o)return Zn;var l=t.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===r)return l.__reactInternalMemoizedMaskedChildContext;var d={},p;for(p in o)d[p]=r[p];return l&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=d),d}function Ct(t){return t=t.childContextTypes,t!=null}function aa(){Ie(kt),Ie(ct)}function jp(t,r,o){if(ct.current!==Zn)throw Error(s(168));Ae(ct,r),Ae(kt,o)}function Tp(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,De(t)||"Unknown",d));return q({},o,l)}function la(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Zn,Ar=ct.current,Ae(ct,t),Ae(kt,kt.current),!0}function Pp(t,r,o){var l=t.stateNode;if(!l)throw Error(s(169));o?(t=Tp(t,r,Ar),l.__reactInternalMemoizedMergedChildContext=t,Ie(kt),Ie(ct),Ae(ct,t)):Ie(kt),Ae(kt,o)}var jn=null,ua=!1,Mu=!1;function Np(t){jn===null?jn=[t]:jn.push(t)}function eS(t){ua=!0,Np(t)}function Jn(){if(!Mu&&jn!==null){Mu=!0;var t=0,r=be;try{var o=jn;for(be=1;t<o.length;t++){var l=o[t];do l=l(!0);while(l!==null)}jn=null,ua=!1}catch(d){throw jn!==null&&(jn=jn.slice(t+1)),Mh(Zl,Jn),d}finally{be=r,Mu=!1}}return null}var Ts=[],Ps=0,ca=null,da=0,It=[],_t=0,Lr=null,Tn=1,Pn="";function Or(t,r){Ts[Ps++]=da,Ts[Ps++]=ca,ca=t,da=r}function bp(t,r,o){It[_t++]=Tn,It[_t++]=Pn,It[_t++]=Lr,Lr=t;var l=Tn;t=Pn;var d=32-Qt(l)-1;l&=~(1<<d),o+=1;var p=32-Qt(r)+d;if(30<p){var w=d-d%5;p=(l&(1<<w)-1).toString(32),l>>=w,d-=w,Tn=1<<32-Qt(r)+d|o<<d|l,Pn=p+t}else Tn=1<<p|o<<d|l,Pn=t}function Ru(t){t.return!==null&&(Or(t,1),bp(t,1,0))}function Du(t){for(;t===ca;)ca=Ts[--Ps],Ts[Ps]=null,da=Ts[--Ps],Ts[Ps]=null;for(;t===Lr;)Lr=It[--_t],It[_t]=null,Pn=It[--_t],It[_t]=null,Tn=It[--_t],It[_t]=null}var Rt=null,Dt=null,Fe=!1,Gt=null;function Mp(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 Rp(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,Rt=t,Dt=Yn(r.firstChild),!0):!1;case 6:return r=t.pendingProps===""||r.nodeType!==3?null:r,r!==null?(t.stateNode=r,Rt=t,Dt=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(o=Lr!==null?{id:Tn,overflow:Pn}:null,t.memoizedState={dehydrated:r,treeContext:o,retryLane:1073741824},o=Ut(18,null,null,0),o.stateNode=r,o.return=t,t.child=o,Rt=t,Dt=null,!0):!1;default:return!1}}function Au(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Lu(t){if(Fe){var r=Dt;if(r){var o=r;if(!Rp(t,r)){if(Au(t))throw Error(s(418));r=Yn(o.nextSibling);var l=Rt;r&&Rp(t,r)?Mp(l,o):(t.flags=t.flags&-4097|2,Fe=!1,Rt=t)}}else{if(Au(t))throw Error(s(418));t.flags=t.flags&-4097|2,Fe=!1,Rt=t}}}function Dp(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Rt=t}function fa(t){if(t!==Rt)return!1;if(!Fe)return Dp(t),Fe=!0,!1;var r;if((r=t.tag!==3)&&!(r=t.tag!==5)&&(r=t.type,r=r!=="head"&&r!=="body"&&!ju(t.type,t.memoizedProps)),r&&(r=Dt)){if(Au(t))throw Ap(),Error(s(418));for(;r;)Mp(t,r),r=Yn(r.nextSibling)}if(Dp(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=Yn(t.nextSibling);break e}r--}else o!=="$"&&o!=="$!"&&o!=="$?"||r++}t=t.nextSibling}Dt=null}}else Dt=Rt?Yn(t.stateNode.nextSibling):null;return!0}function Ap(){for(var t=Dt;t;)t=Yn(t.nextSibling)}function Ns(){Dt=Rt=null,Fe=!1}function Ou(t){Gt===null?Gt=[t]:Gt.push(t)}var tS=O.ReactCurrentBatchConfig;function Ui(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,p=""+t;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===p?r.ref:(r=function(w){var j=d.refs;w===null?delete j[p]:j[p]=w},r._stringRef=p,r)}if(typeof t!="string")throw Error(s(284));if(!o._owner)throw Error(s(290,t))}return t}function ha(t,r){throw t=Object.prototype.toString.call(r),Error(s(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t))}function Lp(t){var r=t._init;return r(t._payload)}function Op(t){function r(_,M){if(t){var V=_.deletions;V===null?(_.deletions=[M],_.flags|=16):V.push(M)}}function o(_,M){if(!t)return null;for(;M!==null;)r(_,M),M=M.sibling;return null}function l(_,M){for(_=new Map;M!==null;)M.key!==null?_.set(M.key,M):_.set(M.index,M),M=M.sibling;return _}function d(_,M){return _=ar(_,M),_.index=0,_.sibling=null,_}function p(_,M,V){return _.index=V,t?(V=_.alternate,V!==null?(V=V.index,V<M?(_.flags|=2,M):V):(_.flags|=2,M)):(_.flags|=1048576,M)}function w(_){return t&&_.alternate===null&&(_.flags|=2),_}function j(_,M,V,Q){return M===null||M.tag!==6?(M=Tc(V,_.mode,Q),M.return=_,M):(M=d(M,V),M.return=_,M)}function N(_,M,V,Q){var ae=V.type;return ae===L?W(_,M,V.props.children,Q,V.key):M!==null&&(M.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===ye&&Lp(ae)===M.type)?(Q=d(M,V.props),Q.ref=Ui(_,M,V),Q.return=_,Q):(Q=_a(V.type,V.key,V.props,null,_.mode,Q),Q.ref=Ui(_,M,V),Q.return=_,Q)}function U(_,M,V,Q){return M===null||M.tag!==4||M.stateNode.containerInfo!==V.containerInfo||M.stateNode.implementation!==V.implementation?(M=Pc(V,_.mode,Q),M.return=_,M):(M=d(M,V.children||[]),M.return=_,M)}function W(_,M,V,Q,ae){return M===null||M.tag!==7?(M=$r(V,_.mode,Q,ae),M.return=_,M):(M=d(M,V),M.return=_,M)}function H(_,M,V){if(typeof M=="string"&&M!==""||typeof M=="number")return M=Tc(""+M,_.mode,V),M.return=_,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case z:return V=_a(M.type,M.key,M.props,null,_.mode,V),V.ref=Ui(_,null,M),V.return=_,V;case B:return M=Pc(M,_.mode,V),M.return=_,M;case ye:var Q=M._init;return H(_,Q(M._payload),V)}if(gi(M)||le(M))return M=$r(M,_.mode,V,null),M.return=_,M;ha(_,M)}return null}function K(_,M,V,Q){var ae=M!==null?M.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return ae!==null?null:j(_,M,""+V,Q);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case z:return V.key===ae?N(_,M,V,Q):null;case B:return V.key===ae?U(_,M,V,Q):null;case ye:return ae=V._init,K(_,M,ae(V._payload),Q)}if(gi(V)||le(V))return ae!==null?null:W(_,M,V,Q,null);ha(_,V)}return null}function te(_,M,V,Q,ae){if(typeof Q=="string"&&Q!==""||typeof Q=="number")return _=_.get(V)||null,j(M,_,""+Q,ae);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case z:return _=_.get(Q.key===null?V:Q.key)||null,N(M,_,Q,ae);case B:return _=_.get(Q.key===null?V:Q.key)||null,U(M,_,Q,ae);case ye:var ce=Q._init;return te(_,M,V,ce(Q._payload),ae)}if(gi(Q)||le(Q))return _=_.get(V)||null,W(M,_,Q,ae,null);ha(M,Q)}return null}function se(_,M,V,Q){for(var ae=null,ce=null,de=M,he=M=0,st=null;de!==null&&he<V.length;he++){de.index>he?(st=de,de=null):st=de.sibling;var je=K(_,de,V[he],Q);if(je===null){de===null&&(de=st);break}t&&de&&je.alternate===null&&r(_,de),M=p(je,M,he),ce===null?ae=je:ce.sibling=je,ce=je,de=st}if(he===V.length)return o(_,de),Fe&&Or(_,he),ae;if(de===null){for(;he<V.length;he++)de=H(_,V[he],Q),de!==null&&(M=p(de,M,he),ce===null?ae=de:ce.sibling=de,ce=de);return Fe&&Or(_,he),ae}for(de=l(_,de);he<V.length;he++)st=te(de,_,he,V[he],Q),st!==null&&(t&&st.alternate!==null&&de.delete(st.key===null?he:st.key),M=p(st,M,he),ce===null?ae=st:ce.sibling=st,ce=st);return t&&de.forEach(function(lr){return r(_,lr)}),Fe&&Or(_,he),ae}function oe(_,M,V,Q){var ae=le(V);if(typeof ae!="function")throw Error(s(150));if(V=ae.call(V),V==null)throw Error(s(151));for(var ce=ae=null,de=M,he=M=0,st=null,je=V.next();de!==null&&!je.done;he++,je=V.next()){de.index>he?(st=de,de=null):st=de.sibling;var lr=K(_,de,je.value,Q);if(lr===null){de===null&&(de=st);break}t&&de&&lr.alternate===null&&r(_,de),M=p(lr,M,he),ce===null?ae=lr:ce.sibling=lr,ce=lr,de=st}if(je.done)return o(_,de),Fe&&Or(_,he),ae;if(de===null){for(;!je.done;he++,je=V.next())je=H(_,je.value,Q),je!==null&&(M=p(je,M,he),ce===null?ae=je:ce.sibling=je,ce=je);return Fe&&Or(_,he),ae}for(de=l(_,de);!je.done;he++,je=V.next())je=te(de,_,he,je.value,Q),je!==null&&(t&&je.alternate!==null&&de.delete(je.key===null?he:je.key),M=p(je,M,he),ce===null?ae=je:ce.sibling=je,ce=je);return t&&de.forEach(function(LS){return r(_,LS)}),Fe&&Or(_,he),ae}function He(_,M,V,Q){if(typeof V=="object"&&V!==null&&V.type===L&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case z:e:{for(var ae=V.key,ce=M;ce!==null;){if(ce.key===ae){if(ae=V.type,ae===L){if(ce.tag===7){o(_,ce.sibling),M=d(ce,V.props.children),M.return=_,_=M;break e}}else if(ce.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===ye&&Lp(ae)===ce.type){o(_,ce.sibling),M=d(ce,V.props),M.ref=Ui(_,ce,V),M.return=_,_=M;break e}o(_,ce);break}else r(_,ce);ce=ce.sibling}V.type===L?(M=$r(V.props.children,_.mode,Q,V.key),M.return=_,_=M):(Q=_a(V.type,V.key,V.props,null,_.mode,Q),Q.ref=Ui(_,M,V),Q.return=_,_=Q)}return w(_);case B:e:{for(ce=V.key;M!==null;){if(M.key===ce)if(M.tag===4&&M.stateNode.containerInfo===V.containerInfo&&M.stateNode.implementation===V.implementation){o(_,M.sibling),M=d(M,V.children||[]),M.return=_,_=M;break e}else{o(_,M);break}else r(_,M);M=M.sibling}M=Pc(V,_.mode,Q),M.return=_,_=M}return w(_);case ye:return ce=V._init,He(_,M,ce(V._payload),Q)}if(gi(V))return se(_,M,V,Q);if(le(V))return oe(_,M,V,Q);ha(_,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,M!==null&&M.tag===6?(o(_,M.sibling),M=d(M,V),M.return=_,_=M):(o(_,M),M=Tc(V,_.mode,Q),M.return=_,_=M),w(_)):o(_,M)}return He}var bs=Op(!0),Ip=Op(!1),pa=Xn(null),ma=null,Ms=null,Iu=null;function _u(){Iu=Ms=ma=null}function Fu(t){var r=pa.current;Ie(pa),t._currentValue=r}function Vu(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 Rs(t,r){ma=t,Iu=Ms=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&r)!==0&&(Et=!0),t.firstContext=null)}function Ft(t){var r=t._currentValue;if(Iu!==t)if(t={context:t,memoizedValue:r,next:null},Ms===null){if(ma===null)throw Error(s(308));Ms=t,ma.dependencies={lanes:0,firstContext:t}}else Ms=Ms.next=t;return r}var Ir=null;function zu(t){Ir===null?Ir=[t]:Ir.push(t)}function _p(t,r,o,l){var d=r.interleaved;return d===null?(o.next=o,zu(r)):(o.next=d.next,d.next=o),r.interleaved=o,Nn(t,l)}function Nn(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 er=!1;function Uu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fp(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 bn(t,r){return{eventTime:t,lane:r,tag:0,payload:null,callback:null,next:null}}function tr(t,r,o){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(ke&2)!==0){var d=l.pending;return d===null?r.next=r:(r.next=d.next,d.next=r),l.pending=r,Nn(t,o)}return d=l.interleaved,d===null?(r.next=r,zu(l)):(r.next=d.next,d.next=r),l.interleaved=r,Nn(t,o)}function ga(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,tu(t,o)}}function Vp(t,r){var o=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var d=null,p=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};p===null?d=p=w:p=p.next=w,o=o.next}while(o!==null);p===null?d=p=r:p=p.next=r}else d=p=r;o={baseState:l.baseState,firstBaseUpdate:d,lastBaseUpdate:p,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 ya(t,r,o,l){var d=t.updateQueue;er=!1;var p=d.firstBaseUpdate,w=d.lastBaseUpdate,j=d.shared.pending;if(j!==null){d.shared.pending=null;var N=j,U=N.next;N.next=null,w===null?p=U:w.next=U,w=N;var W=t.alternate;W!==null&&(W=W.updateQueue,j=W.lastBaseUpdate,j!==w&&(j===null?W.firstBaseUpdate=U:j.next=U,W.lastBaseUpdate=N))}if(p!==null){var H=d.baseState;w=0,W=U=N=null,j=p;do{var K=j.lane,te=j.eventTime;if((l&K)===K){W!==null&&(W=W.next={eventTime:te,lane:0,tag:j.tag,payload:j.payload,callback:j.callback,next:null});e:{var se=t,oe=j;switch(K=r,te=o,oe.tag){case 1:if(se=oe.payload,typeof se=="function"){H=se.call(te,H,K);break e}H=se;break e;case 3:se.flags=se.flags&-65537|128;case 0:if(se=oe.payload,K=typeof se=="function"?se.call(te,H,K):se,K==null)break e;H=q({},H,K);break e;case 2:er=!0}}j.callback!==null&&j.lane!==0&&(t.flags|=64,K=d.effects,K===null?d.effects=[j]:K.push(j))}else te={eventTime:te,lane:K,tag:j.tag,payload:j.payload,callback:j.callback,next:null},W===null?(U=W=te,N=H):W=W.next=te,w|=K;if(j=j.next,j===null){if(j=d.shared.pending,j===null)break;K=j,j=K.next,K.next=null,d.lastBaseUpdate=K,d.shared.pending=null}}while(!0);if(W===null&&(N=H),d.baseState=N,d.firstBaseUpdate=U,d.lastBaseUpdate=W,r=d.shared.interleaved,r!==null){d=r;do w|=d.lane,d=d.next;while(d!==r)}else p===null&&(d.shared.lanes=0);Vr|=w,t.lanes=w,t.memoizedState=H}}function zp(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 Bi={},hn=Xn(Bi),$i=Xn(Bi),Ki=Xn(Bi);function _r(t){if(t===Bi)throw Error(s(174));return t}function Bu(t,r){switch(Ae(Ki,r),Ae($i,t),Ae(hn,Bi),t=r.nodeType,t){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:$l(null,"");break;default:t=t===8?r.parentNode:r,r=t.namespaceURI||null,t=t.tagName,r=$l(r,t)}Ie(hn),Ae(hn,r)}function Ds(){Ie(hn),Ie($i),Ie(Ki)}function Up(t){_r(Ki.current);var r=_r(hn.current),o=$l(r,t.type);r!==o&&(Ae($i,t),Ae(hn,o))}function $u(t){$i.current===t&&(Ie(hn),Ie($i))}var ze=Xn(0);function va(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 Ku=[];function Wu(){for(var t=0;t<Ku.length;t++)Ku[t]._workInProgressVersionPrimary=null;Ku.length=0}var xa=O.ReactCurrentDispatcher,Hu=O.ReactCurrentBatchConfig,Fr=0,Ue=null,Ge=null,nt=null,wa=!1,Wi=!1,Hi=0,nS=0;function dt(){throw Error(s(321))}function Qu(t,r){if(r===null)return!1;for(var o=0;o<r.length&&o<t.length;o++)if(!qt(t[o],r[o]))return!1;return!0}function qu(t,r,o,l,d,p){if(Fr=p,Ue=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,xa.current=t===null||t.memoizedState===null?oS:aS,t=o(l,d),Wi){p=0;do{if(Wi=!1,Hi=0,25<=p)throw Error(s(301));p+=1,nt=Ge=null,r.updateQueue=null,xa.current=lS,t=o(l,d)}while(Wi)}if(xa.current=Ca,r=Ge!==null&&Ge.next!==null,Fr=0,nt=Ge=Ue=null,wa=!1,r)throw Error(s(300));return t}function Gu(){var t=Hi!==0;return Hi=0,t}function pn(){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 Vt(){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 Qi(t,r){return typeof r=="function"?r(t):r}function Yu(t){var r=Vt(),o=r.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=t;var l=Ge,d=l.baseQueue,p=o.pending;if(p!==null){if(d!==null){var w=d.next;d.next=p.next,p.next=w}l.baseQueue=d=p,o.pending=null}if(d!==null){p=d.next,l=l.baseState;var j=w=null,N=null,U=p;do{var W=U.lane;if((Fr&W)===W)N!==null&&(N=N.next={lane:0,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),l=U.hasEagerState?U.eagerState:t(l,U.action);else{var H={lane:W,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null};N===null?(j=N=H,w=l):N=N.next=H,Ue.lanes|=W,Vr|=W}U=U.next}while(U!==null&&U!==p);N===null?w=l:N.next=j,qt(l,r.memoizedState)||(Et=!0),r.memoizedState=l,r.baseState=w,r.baseQueue=N,o.lastRenderedState=l}if(t=o.interleaved,t!==null){d=t;do p=d.lane,Ue.lanes|=p,Vr|=p,d=d.next;while(d!==t)}else d===null&&(o.lanes=0);return[r.memoizedState,o.dispatch]}function Xu(t){var r=Vt(),o=r.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=t;var l=o.dispatch,d=o.pending,p=r.memoizedState;if(d!==null){o.pending=null;var w=d=d.next;do p=t(p,w.action),w=w.next;while(w!==d);qt(p,r.memoizedState)||(Et=!0),r.memoizedState=p,r.baseQueue===null&&(r.baseState=p),o.lastRenderedState=p}return[p,l]}function Bp(){}function $p(t,r){var o=Ue,l=Vt(),d=r(),p=!qt(l.memoizedState,d);if(p&&(l.memoizedState=d,Et=!0),l=l.queue,Zu(Hp.bind(null,o,l,t),[t]),l.getSnapshot!==r||p||nt!==null&&nt.memoizedState.tag&1){if(o.flags|=2048,qi(9,Wp.bind(null,o,l,d,r),void 0,null),rt===null)throw Error(s(349));(Fr&30)!==0||Kp(o,r,d)}return d}function Kp(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 Wp(t,r,o,l){r.value=o,r.getSnapshot=l,Qp(r)&&qp(t)}function Hp(t,r,o){return o(function(){Qp(r)&&qp(t)})}function Qp(t){var r=t.getSnapshot;t=t.value;try{var o=r();return!qt(t,o)}catch{return!0}}function qp(t){var r=Nn(t,1);r!==null&&Jt(r,t,1,-1)}function Gp(t){var r=pn();return typeof t=="function"&&(t=t()),r.memoizedState=r.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Qi,lastRenderedState:t},r.queue=t,t=t.dispatch=iS.bind(null,Ue,t),[r.memoizedState,t]}function qi(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 Yp(){return Vt().memoizedState}function Sa(t,r,o,l){var d=pn();Ue.flags|=t,d.memoizedState=qi(1|r,o,void 0,l===void 0?null:l)}function ka(t,r,o,l){var d=Vt();l=l===void 0?null:l;var p=void 0;if(Ge!==null){var w=Ge.memoizedState;if(p=w.destroy,l!==null&&Qu(l,w.deps)){d.memoizedState=qi(r,o,p,l);return}}Ue.flags|=t,d.memoizedState=qi(1|r,o,p,l)}function Xp(t,r){return Sa(8390656,8,t,r)}function Zu(t,r){return ka(2048,8,t,r)}function Zp(t,r){return ka(4,2,t,r)}function Jp(t,r){return ka(4,4,t,r)}function em(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 tm(t,r,o){return o=o!=null?o.concat([t]):null,ka(4,4,em.bind(null,r,t),o)}function Ju(){}function nm(t,r){var o=Vt();r=r===void 0?null:r;var l=o.memoizedState;return l!==null&&r!==null&&Qu(r,l[1])?l[0]:(o.memoizedState=[t,r],t)}function rm(t,r){var o=Vt();r=r===void 0?null:r;var l=o.memoizedState;return l!==null&&r!==null&&Qu(r,l[1])?l[0]:(t=t(),o.memoizedState=[t,r],t)}function sm(t,r,o){return(Fr&21)===0?(t.baseState&&(t.baseState=!1,Et=!0),t.memoizedState=o):(qt(o,r)||(o=Lh(),Ue.lanes|=o,Vr|=o,t.baseState=!0),r)}function rS(t,r){var o=be;be=o!==0&&4>o?o:4,t(!0);var l=Hu.transition;Hu.transition={};try{t(!1),r()}finally{be=o,Hu.transition=l}}function im(){return Vt().memoizedState}function sS(t,r,o){var l=ir(t);if(o={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null},om(t))am(r,o);else if(o=_p(t,r,o,l),o!==null){var d=yt();Jt(o,t,l,d),lm(o,r,l)}}function iS(t,r,o){var l=ir(t),d={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null};if(om(t))am(r,d);else{var p=t.alternate;if(t.lanes===0&&(p===null||p.lanes===0)&&(p=r.lastRenderedReducer,p!==null))try{var w=r.lastRenderedState,j=p(w,o);if(d.hasEagerState=!0,d.eagerState=j,qt(j,w)){var N=r.interleaved;N===null?(d.next=d,zu(r)):(d.next=N.next,N.next=d),r.interleaved=d;return}}catch{}finally{}o=_p(t,r,d,l),o!==null&&(d=yt(),Jt(o,t,l,d),lm(o,r,l))}}function om(t){var r=t.alternate;return t===Ue||r!==null&&r===Ue}function am(t,r){Wi=wa=!0;var o=t.pending;o===null?r.next=r:(r.next=o.next,o.next=r),t.pending=r}function lm(t,r,o){if((o&4194240)!==0){var l=r.lanes;l&=t.pendingLanes,o|=l,r.lanes=o,tu(t,o)}}var Ca={readContext:Ft,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},oS={readContext:Ft,useCallback:function(t,r){return pn().memoizedState=[t,r===void 0?null:r],t},useContext:Ft,useEffect:Xp,useImperativeHandle:function(t,r,o){return o=o!=null?o.concat([t]):null,Sa(4194308,4,em.bind(null,r,t),o)},useLayoutEffect:function(t,r){return Sa(4194308,4,t,r)},useInsertionEffect:function(t,r){return Sa(4,2,t,r)},useMemo:function(t,r){var o=pn();return r=r===void 0?null:r,t=t(),o.memoizedState=[t,r],t},useReducer:function(t,r,o){var l=pn();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=sS.bind(null,Ue,t),[l.memoizedState,t]},useRef:function(t){var r=pn();return t={current:t},r.memoizedState=t},useState:Gp,useDebugValue:Ju,useDeferredValue:function(t){return pn().memoizedState=t},useTransition:function(){var t=Gp(!1),r=t[0];return t=rS.bind(null,t[1]),pn().memoizedState=t,[r,t]},useMutableSource:function(){},useSyncExternalStore:function(t,r,o){var l=Ue,d=pn();if(Fe){if(o===void 0)throw Error(s(407));o=o()}else{if(o=r(),rt===null)throw Error(s(349));(Fr&30)!==0||Kp(l,r,o)}d.memoizedState=o;var p={value:o,getSnapshot:r};return d.queue=p,Xp(Hp.bind(null,l,p,t),[t]),l.flags|=2048,qi(9,Wp.bind(null,l,p,o,r),void 0,null),o},useId:function(){var t=pn(),r=rt.identifierPrefix;if(Fe){var o=Pn,l=Tn;o=(l&~(1<<32-Qt(l)-1)).toString(32)+o,r=":"+r+"R"+o,o=Hi++,0<o&&(r+="H"+o.toString(32)),r+=":"}else o=nS++,r=":"+r+"r"+o.toString(32)+":";return t.memoizedState=r},unstable_isNewReconciler:!1},aS={readContext:Ft,useCallback:nm,useContext:Ft,useEffect:Zu,useImperativeHandle:tm,useInsertionEffect:Zp,useLayoutEffect:Jp,useMemo:rm,useReducer:Yu,useRef:Yp,useState:function(){return Yu(Qi)},useDebugValue:Ju,useDeferredValue:function(t){var r=Vt();return sm(r,Ge.memoizedState,t)},useTransition:function(){var t=Yu(Qi)[0],r=Vt().memoizedState;return[t,r]},useMutableSource:Bp,useSyncExternalStore:$p,useId:im,unstable_isNewReconciler:!1},lS={readContext:Ft,useCallback:nm,useContext:Ft,useEffect:Zu,useImperativeHandle:tm,useInsertionEffect:Zp,useLayoutEffect:Jp,useMemo:rm,useReducer:Xu,useRef:Yp,useState:function(){return Xu(Qi)},useDebugValue:Ju,useDeferredValue:function(t){var r=Vt();return Ge===null?r.memoizedState=t:sm(r,Ge.memoizedState,t)},useTransition:function(){var t=Xu(Qi)[0],r=Vt().memoizedState;return[t,r]},useMutableSource:Bp,useSyncExternalStore:$p,useId:im,unstable_isNewReconciler:!1};function Yt(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 ec(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 Ea={isMounted:function(t){return(t=t._reactInternals)?Rr(t)===t:!1},enqueueSetState:function(t,r,o){t=t._reactInternals;var l=yt(),d=ir(t),p=bn(l,d);p.payload=r,o!=null&&(p.callback=o),r=tr(t,p,d),r!==null&&(Jt(r,t,d,l),ga(r,t,d))},enqueueReplaceState:function(t,r,o){t=t._reactInternals;var l=yt(),d=ir(t),p=bn(l,d);p.tag=1,p.payload=r,o!=null&&(p.callback=o),r=tr(t,p,d),r!==null&&(Jt(r,t,d,l),ga(r,t,d))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var o=yt(),l=ir(t),d=bn(o,l);d.tag=2,r!=null&&(d.callback=r),r=tr(t,d,l),r!==null&&(Jt(r,t,l,o),ga(r,t,l))}};function um(t,r,o,l,d,p,w){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,p,w):r.prototype&&r.prototype.isPureReactComponent?!Li(o,l)||!Li(d,p):!0}function cm(t,r,o){var l=!1,d=Zn,p=r.contextType;return typeof p=="object"&&p!==null?p=Ft(p):(d=Ct(r)?Ar:ct.current,l=r.contextTypes,p=(l=l!=null)?js(t,d):Zn),r=new r(o,p),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=Ea,t.stateNode=r,r._reactInternals=t,l&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=d,t.__reactInternalMemoizedMaskedChildContext=p),r}function dm(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&&Ea.enqueueReplaceState(r,r.state,null)}function tc(t,r,o,l){var d=t.stateNode;d.props=o,d.state=t.memoizedState,d.refs={},Uu(t);var p=r.contextType;typeof p=="object"&&p!==null?d.context=Ft(p):(p=Ct(r)?Ar:ct.current,d.context=js(t,p)),d.state=t.memoizedState,p=r.getDerivedStateFromProps,typeof p=="function"&&(ec(t,r,p,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&&Ea.enqueueReplaceState(d,d.state,null),ya(t,o,d,l),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308)}function As(t,r){try{var o="",l=r;do o+=Ce(l),l=l.return;while(l);var d=o}catch(p){d=`
39
- Error generating stack: `+p.message+`
40
- `+p.stack}return{value:t,source:r,stack:d,digest:null}}function nc(t,r,o){return{value:t,source:null,stack:o??null,digest:r??null}}function rc(t,r){try{console.error(r.value)}catch(o){setTimeout(function(){throw o})}}var uS=typeof WeakMap=="function"?WeakMap:Map;function fm(t,r,o){o=bn(-1,o),o.tag=3,o.payload={element:null};var l=r.value;return o.callback=function(){Ra||(Ra=!0,vc=l),rc(t,r)},o}function hm(t,r,o){o=bn(-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(){rc(t,r)}}var p=t.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(o.callback=function(){rc(t,r),typeof l!="function"&&(rr===null?rr=new Set([this]):rr.add(this));var w=r.stack;this.componentDidCatch(r.value,{componentStack:w!==null?w:""})}),o}function pm(t,r,o){var l=t.pingCache;if(l===null){l=t.pingCache=new uS;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=CS.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 gm(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=bn(-1,1),r.tag=2,tr(o,r,1))),o.lanes|=1),t):(t.flags|=65536,t.lanes=d,t)}var cS=O.ReactCurrentOwner,Et=!1;function gt(t,r,o,l){r.child=t===null?Ip(r,null,o,l):bs(r,t.child,o,l)}function ym(t,r,o,l,d){o=o.render;var p=r.ref;return Rs(r,d),l=qu(t,r,o,l,p,d),o=Gu(),t!==null&&!Et?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~d,Mn(t,r,d)):(Fe&&o&&Ru(r),r.flags|=1,gt(t,r,l,d),r.child)}function vm(t,r,o,l,d){if(t===null){var p=o.type;return typeof p=="function"&&!jc(p)&&p.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(r.tag=15,r.type=p,xm(t,r,p,l,d)):(t=_a(o.type,null,l,r,r.mode,d),t.ref=r.ref,t.return=r,r.child=t)}if(p=t.child,(t.lanes&d)===0){var w=p.memoizedProps;if(o=o.compare,o=o!==null?o:Li,o(w,l)&&t.ref===r.ref)return Mn(t,r,d)}return r.flags|=1,t=ar(p,l),t.ref=r.ref,t.return=r,r.child=t}function xm(t,r,o,l,d){if(t!==null){var p=t.memoizedProps;if(Li(p,l)&&t.ref===r.ref)if(Et=!1,r.pendingProps=l=p,(t.lanes&d)!==0)(t.flags&131072)!==0&&(Et=!0);else return r.lanes=t.lanes,Mn(t,r,d)}return sc(t,r,o,l,d)}function wm(t,r,o){var l=r.pendingProps,d=l.children,p=t!==null?t.memoizedState:null;if(l.mode==="hidden")if((r.mode&1)===0)r.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ae(Os,At),At|=o;else{if((o&1073741824)===0)return t=p!==null?p.baseLanes|o:o,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:t,cachePool:null,transitions:null},r.updateQueue=null,Ae(Os,At),At|=t,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=p!==null?p.baseLanes:o,Ae(Os,At),At|=l}else p!==null?(l=p.baseLanes|o,r.memoizedState=null):l=o,Ae(Os,At),At|=l;return gt(t,r,d,o),r.child}function Sm(t,r){var o=r.ref;(t===null&&o!==null||t!==null&&t.ref!==o)&&(r.flags|=512,r.flags|=2097152)}function sc(t,r,o,l,d){var p=Ct(o)?Ar:ct.current;return p=js(r,p),Rs(r,d),o=qu(t,r,o,l,p,d),l=Gu(),t!==null&&!Et?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~d,Mn(t,r,d)):(Fe&&l&&Ru(r),r.flags|=1,gt(t,r,o,d),r.child)}function km(t,r,o,l,d){if(Ct(o)){var p=!0;la(r)}else p=!1;if(Rs(r,d),r.stateNode===null)Ta(t,r),cm(r,o,l),tc(r,o,l,d),l=!0;else if(t===null){var w=r.stateNode,j=r.memoizedProps;w.props=j;var N=w.context,U=o.contextType;typeof U=="object"&&U!==null?U=Ft(U):(U=Ct(o)?Ar:ct.current,U=js(r,U));var W=o.getDerivedStateFromProps,H=typeof W=="function"||typeof w.getSnapshotBeforeUpdate=="function";H||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(j!==l||N!==U)&&dm(r,w,l,U),er=!1;var K=r.memoizedState;w.state=K,ya(r,l,w,d),N=r.memoizedState,j!==l||K!==N||kt.current||er?(typeof W=="function"&&(ec(r,o,W,l),N=r.memoizedState),(j=er||um(r,o,j,l,K,N,U))?(H||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=N),w.props=l,w.state=N,w.context=U,l=j):(typeof w.componentDidMount=="function"&&(r.flags|=4194308),l=!1)}else{w=r.stateNode,Fp(t,r),j=r.memoizedProps,U=r.type===r.elementType?j:Yt(r.type,j),w.props=U,H=r.pendingProps,K=w.context,N=o.contextType,typeof N=="object"&&N!==null?N=Ft(N):(N=Ct(o)?Ar:ct.current,N=js(r,N));var te=o.getDerivedStateFromProps;(W=typeof te=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(j!==H||K!==N)&&dm(r,w,l,N),er=!1,K=r.memoizedState,w.state=K,ya(r,l,w,d);var se=r.memoizedState;j!==H||K!==se||kt.current||er?(typeof te=="function"&&(ec(r,o,te,l),se=r.memoizedState),(U=er||um(r,o,U,l,K,se,N)||!1)?(W||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(l,se,N),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(l,se,N)),typeof w.componentDidUpdate=="function"&&(r.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof w.componentDidUpdate!="function"||j===t.memoizedProps&&K===t.memoizedState||(r.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||j===t.memoizedProps&&K===t.memoizedState||(r.flags|=1024),r.memoizedProps=l,r.memoizedState=se),w.props=l,w.state=se,w.context=N,l=U):(typeof w.componentDidUpdate!="function"||j===t.memoizedProps&&K===t.memoizedState||(r.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||j===t.memoizedProps&&K===t.memoizedState||(r.flags|=1024),l=!1)}return ic(t,r,o,l,p,d)}function ic(t,r,o,l,d,p){Sm(t,r);var w=(r.flags&128)!==0;if(!l&&!w)return d&&Pp(r,o,!1),Mn(t,r,p);l=r.stateNode,cS.current=r;var j=w&&typeof o.getDerivedStateFromError!="function"?null:l.render();return r.flags|=1,t!==null&&w?(r.child=bs(r,t.child,null,p),r.child=bs(r,null,j,p)):gt(t,r,j,p),r.memoizedState=l.state,d&&Pp(r,o,!0),r.child}function Cm(t){var r=t.stateNode;r.pendingContext?jp(t,r.pendingContext,r.pendingContext!==r.context):r.context&&jp(t,r.context,!1),Bu(t,r.containerInfo)}function Em(t,r,o,l,d){return Ns(),Ou(d),r.flags|=256,gt(t,r,o,l),r.child}var oc={dehydrated:null,treeContext:null,retryLane:0};function ac(t){return{baseLanes:t,cachePool:null,transitions:null}}function jm(t,r,o){var l=r.pendingProps,d=ze.current,p=!1,w=(r.flags&128)!==0,j;if((j=w)||(j=t!==null&&t.memoizedState===null?!1:(d&2)!==0),j?(p=!0,r.flags&=-129):(t===null||t.memoizedState!==null)&&(d|=1),Ae(ze,d&1),t===null)return Lu(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,p?(l=r.mode,p=r.child,w={mode:"hidden",children:w},(l&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=w):p=Fa(w,l,0,null),t=$r(t,l,o,null),p.return=r,t.return=r,p.sibling=t,r.child=p,r.child.memoizedState=ac(o),r.memoizedState=oc,t):lc(r,w));if(d=t.memoizedState,d!==null&&(j=d.dehydrated,j!==null))return dS(t,r,w,l,j,d,o);if(p){p=l.fallback,w=r.mode,d=t.child,j=d.sibling;var N={mode:"hidden",children:l.children};return(w&1)===0&&r.child!==d?(l=r.child,l.childLanes=0,l.pendingProps=N,r.deletions=null):(l=ar(d,N),l.subtreeFlags=d.subtreeFlags&14680064),j!==null?p=ar(j,p):(p=$r(p,w,o,null),p.flags|=2),p.return=r,l.return=r,l.sibling=p,r.child=l,l=p,p=r.child,w=t.child.memoizedState,w=w===null?ac(o):{baseLanes:w.baseLanes|o,cachePool:null,transitions:w.transitions},p.memoizedState=w,p.childLanes=t.childLanes&~o,r.memoizedState=oc,l}return p=t.child,t=p.sibling,l=ar(p,{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 lc(t,r){return r=Fa({mode:"visible",children:r},t.mode,0,null),r.return=t,t.child=r}function ja(t,r,o,l){return l!==null&&Ou(l),bs(r,t.child,null,o),t=lc(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function dS(t,r,o,l,d,p,w){if(o)return r.flags&256?(r.flags&=-257,l=nc(Error(s(422))),ja(t,r,w,l)):r.memoizedState!==null?(r.child=t.child,r.flags|=128,null):(p=l.fallback,d=r.mode,l=Fa({mode:"visible",children:l.children},d,0,null),p=$r(p,d,w,null),p.flags|=2,l.return=r,p.return=r,l.sibling=p,r.child=l,(r.mode&1)!==0&&bs(r,t.child,null,w),r.child.memoizedState=ac(w),r.memoizedState=oc,p);if((r.mode&1)===0)return ja(t,r,w,null);if(d.data==="$!"){if(l=d.nextSibling&&d.nextSibling.dataset,l)var j=l.dgst;return l=j,p=Error(s(419)),l=nc(p,l,void 0),ja(t,r,w,l)}if(j=(w&t.childLanes)!==0,Et||j){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!==p.retryLane&&(p.retryLane=d,Nn(t,d),Jt(l,t,d,-1))}return Ec(),l=nc(Error(s(421))),ja(t,r,w,l)}return d.data==="$?"?(r.flags|=128,r.child=t.child,r=ES.bind(null,t),d._reactRetry=r,null):(t=p.treeContext,Dt=Yn(d.nextSibling),Rt=r,Fe=!0,Gt=null,t!==null&&(It[_t++]=Tn,It[_t++]=Pn,It[_t++]=Lr,Tn=t.id,Pn=t.overflow,Lr=r),r=lc(r,l.children),r.flags|=4096,r)}function Tm(t,r,o){t.lanes|=r;var l=t.alternate;l!==null&&(l.lanes|=r),Vu(t.return,r,o)}function uc(t,r,o,l,d){var p=t.memoizedState;p===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:d}:(p.isBackwards=r,p.rendering=null,p.renderingStartTime=0,p.last=l,p.tail=o,p.tailMode=d)}function Pm(t,r,o){var l=r.pendingProps,d=l.revealOrder,p=l.tail;if(gt(t,r,l.children,o),l=ze.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&&Tm(t,o,r);else if(t.tag===19)Tm(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(Ae(ze,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&&va(t)===null&&(d=o),o=o.sibling;o=d,o===null?(d=r.child,r.child=null):(d=o.sibling,o.sibling=null),uc(r,!1,d,o,p);break;case"backwards":for(o=null,d=r.child,r.child=null;d!==null;){if(t=d.alternate,t!==null&&va(t)===null){r.child=d;break}t=d.sibling,d.sibling=o,o=d,d=t}uc(r,!0,o,null,p);break;case"together":uc(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Ta(t,r){(r.mode&1)===0&&t!==null&&(t.alternate=null,r.alternate=null,r.flags|=2)}function Mn(t,r,o){if(t!==null&&(r.dependencies=t.dependencies),Vr|=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=ar(t,t.pendingProps),r.child=o,o.return=r;t.sibling!==null;)t=t.sibling,o=o.sibling=ar(t,t.pendingProps),o.return=r;o.sibling=null}return r.child}function fS(t,r,o){switch(r.tag){case 3:Cm(r),Ns();break;case 5:Up(r);break;case 1:Ct(r.type)&&la(r);break;case 4:Bu(r,r.stateNode.containerInfo);break;case 10:var l=r.type._context,d=r.memoizedProps.value;Ae(pa,l._currentValue),l._currentValue=d;break;case 13:if(l=r.memoizedState,l!==null)return l.dehydrated!==null?(Ae(ze,ze.current&1),r.flags|=128,null):(o&r.child.childLanes)!==0?jm(t,r,o):(Ae(ze,ze.current&1),t=Mn(t,r,o),t!==null?t.sibling:null);Ae(ze,ze.current&1);break;case 19:if(l=(o&r.childLanes)!==0,(t.flags&128)!==0){if(l)return Pm(t,r,o);r.flags|=128}if(d=r.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),Ae(ze,ze.current),l)break;return null;case 22:case 23:return r.lanes=0,wm(t,r,o)}return Mn(t,r,o)}var Nm,cc,bm,Mm;Nm=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}},cc=function(){},bm=function(t,r,o,l){var d=t.memoizedProps;if(d!==l){t=r.stateNode,_r(hn.current);var p=null;switch(o){case"input":d=Vl(t,d),l=Vl(t,l),p=[];break;case"select":d=q({},d,{value:void 0}),l=q({},l,{value:void 0}),p=[];break;case"textarea":d=Bl(t,d),l=Bl(t,l),p=[];break;default:typeof d.onClick!="function"&&typeof l.onClick=="function"&&(t.onclick=ia)}Kl(o,l);var w;o=null;for(U in d)if(!l.hasOwnProperty(U)&&d.hasOwnProperty(U)&&d[U]!=null)if(U==="style"){var j=d[U];for(w in j)j.hasOwnProperty(w)&&(o||(o={}),o[w]="")}else U!=="dangerouslySetInnerHTML"&&U!=="children"&&U!=="suppressContentEditableWarning"&&U!=="suppressHydrationWarning"&&U!=="autoFocus"&&(a.hasOwnProperty(U)?p||(p=[]):(p=p||[]).push(U,null));for(U in l){var N=l[U];if(j=d!=null?d[U]:void 0,l.hasOwnProperty(U)&&N!==j&&(N!=null||j!=null))if(U==="style")if(j){for(w in j)!j.hasOwnProperty(w)||N&&N.hasOwnProperty(w)||(o||(o={}),o[w]="");for(w in N)N.hasOwnProperty(w)&&j[w]!==N[w]&&(o||(o={}),o[w]=N[w])}else o||(p||(p=[]),p.push(U,o)),o=N;else U==="dangerouslySetInnerHTML"?(N=N?N.__html:void 0,j=j?j.__html:void 0,N!=null&&j!==N&&(p=p||[]).push(U,N)):U==="children"?typeof N!="string"&&typeof N!="number"||(p=p||[]).push(U,""+N):U!=="suppressContentEditableWarning"&&U!=="suppressHydrationWarning"&&(a.hasOwnProperty(U)?(N!=null&&U==="onScroll"&&Oe("scroll",t),p||j===N||(p=[])):(p=p||[]).push(U,N))}o&&(p=p||[]).push("style",o);var U=p;(r.updateQueue=U)&&(r.flags|=4)}},Mm=function(t,r,o,l){o!==l&&(r.flags|=4)};function Gi(t,r){if(!Fe)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 hS(t,r,o){var l=r.pendingProps;switch(Du(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)&&aa(),ft(r),null;case 3:return l=r.stateNode,Ds(),Ie(kt),Ie(ct),Wu(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(fa(r)?r.flags|=4:t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Gt!==null&&(Sc(Gt),Gt=null))),cc(t,r),ft(r),null;case 5:$u(r);var d=_r(Ki.current);if(o=r.type,t!==null&&r.stateNode!=null)bm(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=_r(hn.current),fa(r)){l=r.stateNode,o=r.type;var p=r.memoizedProps;switch(l[fn]=r,l[Vi]=p,t=(r.mode&1)!==0,o){case"dialog":Oe("cancel",l),Oe("close",l);break;case"iframe":case"object":case"embed":Oe("load",l);break;case"video":case"audio":for(d=0;d<Ii.length;d++)Oe(Ii[d],l);break;case"source":Oe("error",l);break;case"img":case"image":case"link":Oe("error",l),Oe("load",l);break;case"details":Oe("toggle",l);break;case"input":ch(l,p),Oe("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!p.multiple},Oe("invalid",l);break;case"textarea":hh(l,p),Oe("invalid",l)}Kl(o,p),d=null;for(var w in p)if(p.hasOwnProperty(w)){var j=p[w];w==="children"?typeof j=="string"?l.textContent!==j&&(p.suppressHydrationWarning!==!0&&sa(l.textContent,j,t),d=["children",j]):typeof j=="number"&&l.textContent!==""+j&&(p.suppressHydrationWarning!==!0&&sa(l.textContent,j,t),d=["children",""+j]):a.hasOwnProperty(w)&&j!=null&&w==="onScroll"&&Oe("scroll",l)}switch(o){case"input":Oo(l),fh(l,p,!0);break;case"textarea":Oo(l),mh(l);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(l.onclick=ia)}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=gh(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[fn]=r,t[Vi]=l,Nm(t,r,!1,!1),r.stateNode=t;e:{switch(w=Wl(o,l),o){case"dialog":Oe("cancel",t),Oe("close",t),d=l;break;case"iframe":case"object":case"embed":Oe("load",t),d=l;break;case"video":case"audio":for(d=0;d<Ii.length;d++)Oe(Ii[d],t);d=l;break;case"source":Oe("error",t),d=l;break;case"img":case"image":case"link":Oe("error",t),Oe("load",t),d=l;break;case"details":Oe("toggle",t),d=l;break;case"input":ch(t,l),d=Vl(t,l),Oe("invalid",t);break;case"option":d=l;break;case"select":t._wrapperState={wasMultiple:!!l.multiple},d=q({},l,{value:void 0}),Oe("invalid",t);break;case"textarea":hh(t,l),d=Bl(t,l),Oe("invalid",t);break;default:d=l}Kl(o,d),j=d;for(p in j)if(j.hasOwnProperty(p)){var N=j[p];p==="style"?xh(t,N):p==="dangerouslySetInnerHTML"?(N=N?N.__html:void 0,N!=null&&yh(t,N)):p==="children"?typeof N=="string"?(o!=="textarea"||N!=="")&&yi(t,N):typeof N=="number"&&yi(t,""+N):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(a.hasOwnProperty(p)?N!=null&&p==="onScroll"&&Oe("scroll",t):N!=null&&b(t,p,N,w))}switch(o){case"input":Oo(t),fh(t,l,!1);break;case"textarea":Oo(t),mh(t);break;case"option":l.value!=null&&t.setAttribute("value",""+Ne(l.value));break;case"select":t.multiple=!!l.multiple,p=l.value,p!=null?hs(t,!!l.multiple,p,!1):l.defaultValue!=null&&hs(t,!!l.multiple,l.defaultValue,!0);break;default:typeof d.onClick=="function"&&(t.onclick=ia)}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)Mm(t,r,t.memoizedProps,l);else{if(typeof l!="string"&&r.stateNode===null)throw Error(s(166));if(o=_r(Ki.current),_r(hn.current),fa(r)){if(l=r.stateNode,o=r.memoizedProps,l[fn]=r,(p=l.nodeValue!==o)&&(t=Rt,t!==null))switch(t.tag){case 3:sa(l.nodeValue,o,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&sa(l.nodeValue,o,(t.mode&1)!==0)}p&&(r.flags|=4)}else l=(o.nodeType===9?o:o.ownerDocument).createTextNode(l),l[fn]=r,r.stateNode=l}return ft(r),null;case 13:if(Ie(ze),l=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Fe&&Dt!==null&&(r.mode&1)!==0&&(r.flags&128)===0)Ap(),Ns(),r.flags|=98560,p=!1;else if(p=fa(r),l!==null&&l.dehydrated!==null){if(t===null){if(!p)throw Error(s(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(s(317));p[fn]=r}else Ns(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;ft(r),p=!1}else Gt!==null&&(Sc(Gt),Gt=null),p=!0;if(!p)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||(ze.current&1)!==0?Ye===0&&(Ye=3):Ec())),r.updateQueue!==null&&(r.flags|=4),ft(r),null);case 4:return Ds(),cc(t,r),t===null&&_i(r.stateNode.containerInfo),ft(r),null;case 10:return Fu(r.type._context),ft(r),null;case 17:return Ct(r.type)&&aa(),ft(r),null;case 19:if(Ie(ze),p=r.memoizedState,p===null)return ft(r),null;if(l=(r.flags&128)!==0,w=p.rendering,w===null)if(l)Gi(p,!1);else{if(Ye!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(w=va(t),w!==null){for(r.flags|=128,Gi(p,!1),l=w.updateQueue,l!==null&&(r.updateQueue=l,r.flags|=4),r.subtreeFlags=0,l=o,o=r.child;o!==null;)p=o,t=l,p.flags&=14680066,w=p.alternate,w===null?(p.childLanes=0,p.lanes=t,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=w.childLanes,p.lanes=w.lanes,p.child=w.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=w.memoizedProps,p.memoizedState=w.memoizedState,p.updateQueue=w.updateQueue,p.type=w.type,t=w.dependencies,p.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),o=o.sibling;return Ae(ze,ze.current&1|2),r.child}t=t.sibling}p.tail!==null&&We()>Is&&(r.flags|=128,l=!0,Gi(p,!1),r.lanes=4194304)}else{if(!l)if(t=va(w),t!==null){if(r.flags|=128,l=!0,o=t.updateQueue,o!==null&&(r.updateQueue=o,r.flags|=4),Gi(p,!0),p.tail===null&&p.tailMode==="hidden"&&!w.alternate&&!Fe)return ft(r),null}else 2*We()-p.renderingStartTime>Is&&o!==1073741824&&(r.flags|=128,l=!0,Gi(p,!1),r.lanes=4194304);p.isBackwards?(w.sibling=r.child,r.child=w):(o=p.last,o!==null?o.sibling=w:r.child=w,p.last=w)}return p.tail!==null?(r=p.tail,p.rendering=r,p.tail=r.sibling,p.renderingStartTime=We(),r.sibling=null,o=ze.current,Ae(ze,l?o&1|2:o&1),r):(ft(r),null);case 22:case 23:return Cc(),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 pS(t,r){switch(Du(r),r.tag){case 1:return Ct(r.type)&&aa(),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Ds(),Ie(kt),Ie(ct),Wu(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 5:return $u(r),null;case 13:if(Ie(ze),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(s(340));Ns()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return Ie(ze),null;case 4:return Ds(),null;case 10:return Fu(r.type._context),null;case 22:case 23:return Cc(),null;case 24:return null;default:return null}}var Pa=!1,ht=!1,mS=typeof WeakSet=="function"?WeakSet:Set,re=null;function Ls(t,r){var o=t.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(l){Ke(t,r,l)}else o.current=null}function dc(t,r,o){try{o()}catch(l){Ke(t,r,l)}}var Rm=!1;function gS(t,r){if(Cu=Qo,t=up(),mu(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,p=l.focusNode;l=l.focusOffset;try{o.nodeType,p.nodeType}catch{o=null;break e}var w=0,j=-1,N=-1,U=0,W=0,H=t,K=null;t:for(;;){for(var te;H!==o||d!==0&&H.nodeType!==3||(j=w+d),H!==p||l!==0&&H.nodeType!==3||(N=w+l),H.nodeType===3&&(w+=H.nodeValue.length),(te=H.firstChild)!==null;)K=H,H=te;for(;;){if(H===t)break t;if(K===o&&++U===d&&(j=w),K===p&&++W===l&&(N=w),(te=H.nextSibling)!==null)break;H=K,K=H.parentNode}H=te}o=j===-1||N===-1?null:{start:j,end:N}}else o=null}o=o||{start:0,end:0}}else o=null;for(Eu={focusedElem:t,selectionRange:o},Qo=!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,He=se.memoizedState,_=r.stateNode,M=_.getSnapshotBeforeUpdate(r.elementType===r.type?oe:Yt(r.type,oe),He);_.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var V=r.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Q){Ke(r,r.return,Q)}if(t=r.sibling,t!==null){t.return=r.return,re=t;break}re=r.return}return se=Rm,Rm=!1,se}function Yi(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 p=d.destroy;d.destroy=void 0,p!==void 0&&dc(r,o,p)}d=d.next}while(d!==l)}}function Na(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 fc(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 Dm(t){var r=t.alternate;r!==null&&(t.alternate=null,Dm(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&(delete r[fn],delete r[Vi],delete r[Nu],delete r[Zw],delete r[Jw])),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 Am(t){return t.tag===5||t.tag===3||t.tag===4}function Lm(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Am(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 hc(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=ia));else if(l!==4&&(t=t.child,t!==null))for(hc(t,r,o),t=t.sibling;t!==null;)hc(t,r,o),t=t.sibling}function pc(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(pc(t,r,o),t=t.sibling;t!==null;)pc(t,r,o),t=t.sibling}var it=null,Xt=!1;function nr(t,r,o){for(o=o.child;o!==null;)Om(t,r,o),o=o.sibling}function Om(t,r,o){if(dn&&typeof dn.onCommitFiberUnmount=="function")try{dn.onCommitFiberUnmount(Uo,o)}catch{}switch(o.tag){case 5:ht||Ls(o,r);case 6:var l=it,d=Xt;it=null,nr(t,r,o),it=l,Xt=d,it!==null&&(Xt?(t=it,o=o.stateNode,t.nodeType===8?t.parentNode.removeChild(o):t.removeChild(o)):it.removeChild(o.stateNode));break;case 18:it!==null&&(Xt?(t=it,o=o.stateNode,t.nodeType===8?Pu(t.parentNode,o):t.nodeType===1&&Pu(t,o),Ni(t)):Pu(it,o.stateNode));break;case 4:l=it,d=Xt,it=o.stateNode.containerInfo,Xt=!0,nr(t,r,o),it=l,Xt=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 p=d,w=p.destroy;p=p.tag,w!==void 0&&((p&2)!==0||(p&4)!==0)&&dc(o,r,w),d=d.next}while(d!==l)}nr(t,r,o);break;case 1:if(!ht&&(Ls(o,r),l=o.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=o.memoizedProps,l.state=o.memoizedState,l.componentWillUnmount()}catch(j){Ke(o,r,j)}nr(t,r,o);break;case 21:nr(t,r,o);break;case 22:o.mode&1?(ht=(l=ht)||o.memoizedState!==null,nr(t,r,o),ht=l):nr(t,r,o);break;default:nr(t,r,o)}}function Im(t){var r=t.updateQueue;if(r!==null){t.updateQueue=null;var o=t.stateNode;o===null&&(o=t.stateNode=new mS),r.forEach(function(l){var d=jS.bind(null,t,l);o.has(l)||(o.add(l),l.then(d,d))})}}function Zt(t,r){var o=r.deletions;if(o!==null)for(var l=0;l<o.length;l++){var d=o[l];try{var p=t,w=r,j=w;e:for(;j!==null;){switch(j.tag){case 5:it=j.stateNode,Xt=!1;break e;case 3:it=j.stateNode.containerInfo,Xt=!0;break e;case 4:it=j.stateNode.containerInfo,Xt=!0;break e}j=j.return}if(it===null)throw Error(s(160));Om(p,w,d),it=null,Xt=!1;var N=d.alternate;N!==null&&(N.return=null),d.return=null}catch(U){Ke(d,r,U)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)_m(r,t),r=r.sibling}function _m(t,r){var o=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Zt(r,t),mn(t),l&4){try{Yi(3,t,t.return),Na(3,t)}catch(oe){Ke(t,t.return,oe)}try{Yi(5,t,t.return)}catch(oe){Ke(t,t.return,oe)}}break;case 1:Zt(r,t),mn(t),l&512&&o!==null&&Ls(o,o.return);break;case 5:if(Zt(r,t),mn(t),l&512&&o!==null&&Ls(o,o.return),t.flags&32){var d=t.stateNode;try{yi(d,"")}catch(oe){Ke(t,t.return,oe)}}if(l&4&&(d=t.stateNode,d!=null)){var p=t.memoizedProps,w=o!==null?o.memoizedProps:p,j=t.type,N=t.updateQueue;if(t.updateQueue=null,N!==null)try{j==="input"&&p.type==="radio"&&p.name!=null&&dh(d,p),Wl(j,w);var U=Wl(j,p);for(w=0;w<N.length;w+=2){var W=N[w],H=N[w+1];W==="style"?xh(d,H):W==="dangerouslySetInnerHTML"?yh(d,H):W==="children"?yi(d,H):b(d,W,H,U)}switch(j){case"input":zl(d,p);break;case"textarea":ph(d,p);break;case"select":var K=d._wrapperState.wasMultiple;d._wrapperState.wasMultiple=!!p.multiple;var te=p.value;te!=null?hs(d,!!p.multiple,te,!1):K!==!!p.multiple&&(p.defaultValue!=null?hs(d,!!p.multiple,p.defaultValue,!0):hs(d,!!p.multiple,p.multiple?[]:"",!1))}d[Vi]=p}catch(oe){Ke(t,t.return,oe)}}break;case 6:if(Zt(r,t),mn(t),l&4){if(t.stateNode===null)throw Error(s(162));d=t.stateNode,p=t.memoizedProps;try{d.nodeValue=p}catch(oe){Ke(t,t.return,oe)}}break;case 3:if(Zt(r,t),mn(t),l&4&&o!==null&&o.memoizedState.isDehydrated)try{Ni(r.containerInfo)}catch(oe){Ke(t,t.return,oe)}break;case 4:Zt(r,t),mn(t);break;case 13:Zt(r,t),mn(t),d=t.child,d.flags&8192&&(p=d.memoizedState!==null,d.stateNode.isHidden=p,!p||d.alternate!==null&&d.alternate.memoizedState!==null||(yc=We())),l&4&&Im(t);break;case 22:if(W=o!==null&&o.memoizedState!==null,t.mode&1?(ht=(U=ht)||W,Zt(r,t),ht=U):Zt(r,t),mn(t),l&8192){if(U=t.memoizedState!==null,(t.stateNode.isHidden=U)&&!W&&(t.mode&1)!==0)for(re=t,W=t.child;W!==null;){for(H=re=W;re!==null;){switch(K=re,te=K.child,K.tag){case 0:case 11:case 14:case 15:Yi(4,K,K.return);break;case 1:Ls(K,K.return);var se=K.stateNode;if(typeof se.componentWillUnmount=="function"){l=K,o=K.return;try{r=l,se.props=r.memoizedProps,se.state=r.memoizedState,se.componentWillUnmount()}catch(oe){Ke(l,o,oe)}}break;case 5:Ls(K,K.return);break;case 22:if(K.memoizedState!==null){zm(H);continue}}te!==null?(te.return=K,re=te):zm(H)}W=W.sibling}e:for(W=null,H=t;;){if(H.tag===5){if(W===null){W=H;try{d=H.stateNode,U?(p=d.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(j=H.stateNode,N=H.memoizedProps.style,w=N!=null&&N.hasOwnProperty("display")?N.display:null,j.style.display=vh("display",w))}catch(oe){Ke(t,t.return,oe)}}}else if(H.tag===6){if(W===null)try{H.stateNode.nodeValue=U?"":H.memoizedProps}catch(oe){Ke(t,t.return,oe)}}else if((H.tag!==22&&H.tag!==23||H.memoizedState===null||H===t)&&H.child!==null){H.child.return=H,H=H.child;continue}if(H===t)break e;for(;H.sibling===null;){if(H.return===null||H.return===t)break e;W===H&&(W=null),H=H.return}W===H&&(W=null),H.sibling.return=H.return,H=H.sibling}}break;case 19:Zt(r,t),mn(t),l&4&&Im(t);break;case 21:break;default:Zt(r,t),mn(t)}}function mn(t){var r=t.flags;if(r&2){try{e:{for(var o=t.return;o!==null;){if(Am(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&&(yi(d,""),l.flags&=-33);var p=Lm(t);pc(t,p,d);break;case 3:case 4:var w=l.stateNode.containerInfo,j=Lm(t);hc(t,j,w);break;default:throw Error(s(161))}}catch(N){Ke(t,t.return,N)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function yS(t,r,o){re=t,Fm(t)}function Fm(t,r,o){for(var l=(t.mode&1)!==0;re!==null;){var d=re,p=d.child;if(d.tag===22&&l){var w=d.memoizedState!==null||Pa;if(!w){var j=d.alternate,N=j!==null&&j.memoizedState!==null||ht;j=Pa;var U=ht;if(Pa=w,(ht=N)&&!U)for(re=d;re!==null;)w=re,N=w.child,w.tag===22&&w.memoizedState!==null?Um(d):N!==null?(N.return=w,re=N):Um(d);for(;p!==null;)re=p,Fm(p),p=p.sibling;re=d,Pa=j,ht=U}Vm(t)}else(d.subtreeFlags&8772)!==0&&p!==null?(p.return=d,re=p):Vm(t)}}function Vm(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||Na(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:Yt(r.type,o.memoizedProps);l.componentDidUpdate(d,o.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var p=r.updateQueue;p!==null&&zp(r,p,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}zp(r,w,o)}break;case 5:var j=r.stateNode;if(o===null&&r.flags&4){o=j;var N=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":N.autoFocus&&o.focus();break;case"img":N.src&&(o.src=N.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var U=r.alternate;if(U!==null){var W=U.memoizedState;if(W!==null){var H=W.dehydrated;H!==null&&Ni(H)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}ht||r.flags&512&&fc(r)}catch(K){Ke(r,r.return,K)}}if(r===t){re=null;break}if(o=r.sibling,o!==null){o.return=r.return,re=o;break}re=r.return}}function zm(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 Um(t){for(;re!==null;){var r=re;try{switch(r.tag){case 0:case 11:case 15:var o=r.return;try{Na(4,r)}catch(N){Ke(r,o,N)}break;case 1:var l=r.stateNode;if(typeof l.componentDidMount=="function"){var d=r.return;try{l.componentDidMount()}catch(N){Ke(r,d,N)}}var p=r.return;try{fc(r)}catch(N){Ke(r,p,N)}break;case 5:var w=r.return;try{fc(r)}catch(N){Ke(r,w,N)}}}catch(N){Ke(r,r.return,N)}if(r===t){re=null;break}var j=r.sibling;if(j!==null){j.return=r.return,re=j;break}re=r.return}}var vS=Math.ceil,ba=O.ReactCurrentDispatcher,mc=O.ReactCurrentOwner,zt=O.ReactCurrentBatchConfig,ke=0,rt=null,qe=null,ot=0,At=0,Os=Xn(0),Ye=0,Xi=null,Vr=0,Ma=0,gc=0,Zi=null,jt=null,yc=0,Is=1/0,Rn=null,Ra=!1,vc=null,rr=null,Da=!1,sr=null,Aa=0,Ji=0,xc=null,La=-1,Oa=0;function yt(){return(ke&6)!==0?We():La!==-1?La:La=We()}function ir(t){return(t.mode&1)===0?1:(ke&2)!==0&&ot!==0?ot&-ot:tS.transition!==null?(Oa===0&&(Oa=Lh()),Oa):(t=be,t!==0||(t=window.event,t=t===void 0?16:$h(t.type)),t)}function Jt(t,r,o,l){if(50<Ji)throw Ji=0,xc=null,Error(s(185));Ci(t,o,l),((ke&2)===0||t!==rt)&&(t===rt&&((ke&2)===0&&(Ma|=o),Ye===4&&or(t,ot)),Tt(t,l),o===1&&ke===0&&(r.mode&1)===0&&(Is=We()+500,ua&&Jn()))}function Tt(t,r){var o=t.callbackNode;tw(t,r);var l=Ko(t,t===rt?ot:0);if(l===0)o!==null&&Rh(o),t.callbackNode=null,t.callbackPriority=0;else if(r=l&-l,t.callbackPriority!==r){if(o!=null&&Rh(o),r===1)t.tag===0?eS($m.bind(null,t)):Np($m.bind(null,t)),Yw(function(){(ke&6)===0&&Jn()}),o=null;else{switch(Oh(l)){case 1:o=Zl;break;case 4:o=Dh;break;case 16:o=zo;break;case 536870912:o=Ah;break;default:o=zo}o=Xm(o,Bm.bind(null,t))}t.callbackPriority=r,t.callbackNode=o}}function Bm(t,r){if(La=-1,Oa=0,(ke&6)!==0)throw Error(s(327));var o=t.callbackNode;if(_s()&&t.callbackNode!==o)return null;var l=Ko(t,t===rt?ot:0);if(l===0)return null;if((l&30)!==0||(l&t.expiredLanes)!==0||r)r=Ia(t,l);else{r=l;var d=ke;ke|=2;var p=Wm();(rt!==t||ot!==r)&&(Rn=null,Is=We()+500,Ur(t,r));do try{SS();break}catch(j){Km(t,j)}while(!0);_u(),ba.current=p,ke=d,qe!==null?r=0:(rt=null,ot=0,r=Ye)}if(r!==0){if(r===2&&(d=Jl(t),d!==0&&(l=d,r=wc(t,d))),r===1)throw o=Xi,Ur(t,0),or(t,l),Tt(t,We()),o;if(r===6)or(t,l);else{if(d=t.current.alternate,(l&30)===0&&!xS(d)&&(r=Ia(t,l),r===2&&(p=Jl(t),p!==0&&(l=p,r=wc(t,p))),r===1))throw o=Xi,Ur(t,0),or(t,l),Tt(t,We()),o;switch(t.finishedWork=d,t.finishedLanes=l,r){case 0:case 1:throw Error(s(345));case 2:Br(t,jt,Rn);break;case 3:if(or(t,l),(l&130023424)===l&&(r=yc+500-We(),10<r)){if(Ko(t,0)!==0)break;if(d=t.suspendedLanes,(d&l)!==l){yt(),t.pingedLanes|=t.suspendedLanes&d;break}t.timeoutHandle=Tu(Br.bind(null,t,jt,Rn),r);break}Br(t,jt,Rn);break;case 4:if(or(t,l),(l&4194240)===l)break;for(r=t.eventTimes,d=-1;0<l;){var w=31-Qt(l);p=1<<w,w=r[w],w>d&&(d=w),l&=~p}if(l=d,l=We()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*vS(l/1960))-l,10<l){t.timeoutHandle=Tu(Br.bind(null,t,jt,Rn),l);break}Br(t,jt,Rn);break;case 5:Br(t,jt,Rn);break;default:throw Error(s(329))}}}return Tt(t,We()),t.callbackNode===o?Bm.bind(null,t):null}function wc(t,r){var o=Zi;return t.current.memoizedState.isDehydrated&&(Ur(t,r).flags|=256),t=Ia(t,r),t!==2&&(r=jt,jt=o,r!==null&&Sc(r)),t}function Sc(t){jt===null?jt=t:jt.push.apply(jt,t)}function xS(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],p=d.getSnapshot;d=d.value;try{if(!qt(p(),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 or(t,r){for(r&=~gc,r&=~Ma,t.suspendedLanes|=r,t.pingedLanes&=~r,t=t.expirationTimes;0<r;){var o=31-Qt(r),l=1<<o;t[o]=-1,r&=~l}}function $m(t){if((ke&6)!==0)throw Error(s(327));_s();var r=Ko(t,0);if((r&1)===0)return Tt(t,We()),null;var o=Ia(t,r);if(t.tag!==0&&o===2){var l=Jl(t);l!==0&&(r=l,o=wc(t,l))}if(o===1)throw o=Xi,Ur(t,0),or(t,r),Tt(t,We()),o;if(o===6)throw Error(s(345));return t.finishedWork=t.current.alternate,t.finishedLanes=r,Br(t,jt,Rn),Tt(t,We()),null}function kc(t,r){var o=ke;ke|=1;try{return t(r)}finally{ke=o,ke===0&&(Is=We()+500,ua&&Jn())}}function zr(t){sr!==null&&sr.tag===0&&(ke&6)===0&&_s();var r=ke;ke|=1;var o=zt.transition,l=be;try{if(zt.transition=null,be=1,t)return t()}finally{be=l,zt.transition=o,ke=r,(ke&6)===0&&Jn()}}function Cc(){At=Os.current,Ie(Os)}function Ur(t,r){t.finishedWork=null,t.finishedLanes=0;var o=t.timeoutHandle;if(o!==-1&&(t.timeoutHandle=-1,Gw(o)),qe!==null)for(o=qe.return;o!==null;){var l=o;switch(Du(l),l.tag){case 1:l=l.type.childContextTypes,l!=null&&aa();break;case 3:Ds(),Ie(kt),Ie(ct),Wu();break;case 5:$u(l);break;case 4:Ds();break;case 13:Ie(ze);break;case 19:Ie(ze);break;case 10:Fu(l.type._context);break;case 22:case 23:Cc()}o=o.return}if(rt=t,qe=t=ar(t.current,null),ot=At=r,Ye=0,Xi=null,gc=Ma=Vr=0,jt=Zi=null,Ir!==null){for(r=0;r<Ir.length;r++)if(o=Ir[r],l=o.interleaved,l!==null){o.interleaved=null;var d=l.next,p=o.pending;if(p!==null){var w=p.next;p.next=d,l.next=w}o.pending=l}Ir=null}return t}function Km(t,r){do{var o=qe;try{if(_u(),xa.current=Ca,wa){for(var l=Ue.memoizedState;l!==null;){var d=l.queue;d!==null&&(d.pending=null),l=l.next}wa=!1}if(Fr=0,nt=Ge=Ue=null,Wi=!1,Hi=0,mc.current=null,o===null||o.return===null){Ye=1,Xi=r,qe=null;break}e:{var p=t,w=o.return,j=o,N=r;if(r=ot,j.flags|=32768,N!==null&&typeof N=="object"&&typeof N.then=="function"){var U=N,W=j,H=W.tag;if((W.mode&1)===0&&(H===0||H===11||H===15)){var K=W.alternate;K?(W.updateQueue=K.updateQueue,W.memoizedState=K.memoizedState,W.lanes=K.lanes):(W.updateQueue=null,W.memoizedState=null)}var te=mm(w);if(te!==null){te.flags&=-257,gm(te,w,j,p,r),te.mode&1&&pm(p,U,r),r=te,N=U;var se=r.updateQueue;if(se===null){var oe=new Set;oe.add(N),r.updateQueue=oe}else se.add(N);break e}else{if((r&1)===0){pm(p,U,r),Ec();break e}N=Error(s(426))}}else if(Fe&&j.mode&1){var He=mm(w);if(He!==null){(He.flags&65536)===0&&(He.flags|=256),gm(He,w,j,p,r),Ou(As(N,j));break e}}p=N=As(N,j),Ye!==4&&(Ye=2),Zi===null?Zi=[p]:Zi.push(p),p=w;do{switch(p.tag){case 3:p.flags|=65536,r&=-r,p.lanes|=r;var _=fm(p,N,r);Vp(p,_);break e;case 1:j=N;var M=p.type,V=p.stateNode;if((p.flags&128)===0&&(typeof M.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(rr===null||!rr.has(V)))){p.flags|=65536,r&=-r,p.lanes|=r;var Q=hm(p,j,r);Vp(p,Q);break e}}p=p.return}while(p!==null)}Qm(o)}catch(ae){r=ae,qe===o&&o!==null&&(qe=o=o.return);continue}break}while(!0)}function Wm(){var t=ba.current;return ba.current=Ca,t===null?Ca:t}function Ec(){(Ye===0||Ye===3||Ye===2)&&(Ye=4),rt===null||(Vr&268435455)===0&&(Ma&268435455)===0||or(rt,ot)}function Ia(t,r){var o=ke;ke|=2;var l=Wm();(rt!==t||ot!==r)&&(Rn=null,Ur(t,r));do try{wS();break}catch(d){Km(t,d)}while(!0);if(_u(),ke=o,ba.current=l,qe!==null)throw Error(s(261));return rt=null,ot=0,Ye}function wS(){for(;qe!==null;)Hm(qe)}function SS(){for(;qe!==null&&!H1();)Hm(qe)}function Hm(t){var r=Ym(t.alternate,t,At);t.memoizedProps=t.pendingProps,r===null?Qm(t):qe=r,mc.current=null}function Qm(t){var r=t;do{var o=r.alternate;if(t=r.return,(r.flags&32768)===0){if(o=hS(o,r,At),o!==null){qe=o;return}}else{if(o=pS(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 Br(t,r,o){var l=be,d=zt.transition;try{zt.transition=null,be=1,kS(t,r,o,l)}finally{zt.transition=d,be=l}return null}function kS(t,r,o,l){do _s();while(sr!==null);if((ke&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 p=o.lanes|o.childLanes;if(nw(t,p),t===rt&&(qe=rt=null,ot=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||Da||(Da=!0,Xm(zo,function(){return _s(),null})),p=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||p){p=zt.transition,zt.transition=null;var w=be;be=1;var j=ke;ke|=4,mc.current=null,gS(t,o),_m(o,t),Bw(Eu),Qo=!!Cu,Eu=Cu=null,t.current=o,yS(o),Q1(),ke=j,be=w,zt.transition=p}else t.current=o;if(Da&&(Da=!1,sr=t,Aa=d),p=t.pendingLanes,p===0&&(rr=null),Y1(o.stateNode),Tt(t,We()),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(Ra)throw Ra=!1,t=vc,vc=null,t;return(Aa&1)!==0&&t.tag!==0&&_s(),p=t.pendingLanes,(p&1)!==0?t===xc?Ji++:(Ji=0,xc=t):Ji=0,Jn(),null}function _s(){if(sr!==null){var t=Oh(Aa),r=zt.transition,o=be;try{if(zt.transition=null,be=16>t?16:t,sr===null)var l=!1;else{if(t=sr,sr=null,Aa=0,(ke&6)!==0)throw Error(s(331));var d=ke;for(ke|=4,re=t.current;re!==null;){var p=re,w=p.child;if((re.flags&16)!==0){var j=p.deletions;if(j!==null){for(var N=0;N<j.length;N++){var U=j[N];for(re=U;re!==null;){var W=re;switch(W.tag){case 0:case 11:case 15:Yi(8,W,p)}var H=W.child;if(H!==null)H.return=W,re=H;else for(;re!==null;){W=re;var K=W.sibling,te=W.return;if(Dm(W),W===U){re=null;break}if(K!==null){K.return=te,re=K;break}re=te}}}var se=p.alternate;if(se!==null){var oe=se.child;if(oe!==null){se.child=null;do{var He=oe.sibling;oe.sibling=null,oe=He}while(oe!==null)}}re=p}}if((p.subtreeFlags&2064)!==0&&w!==null)w.return=p,re=w;else e:for(;re!==null;){if(p=re,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:Yi(9,p,p.return)}var _=p.sibling;if(_!==null){_.return=p.return,re=_;break e}re=p.return}}var M=t.current;for(re=M;re!==null;){w=re;var V=w.child;if((w.subtreeFlags&2064)!==0&&V!==null)V.return=w,re=V;else e:for(w=M;re!==null;){if(j=re,(j.flags&2048)!==0)try{switch(j.tag){case 0:case 11:case 15:Na(9,j)}}catch(ae){Ke(j,j.return,ae)}if(j===w){re=null;break e}var Q=j.sibling;if(Q!==null){Q.return=j.return,re=Q;break e}re=j.return}}if(ke=d,Jn(),dn&&typeof dn.onPostCommitFiberRoot=="function")try{dn.onPostCommitFiberRoot(Uo,t)}catch{}l=!0}return l}finally{be=o,zt.transition=r}}return!1}function qm(t,r,o){r=As(o,r),r=fm(t,r,1),t=tr(t,r,1),r=yt(),t!==null&&(Ci(t,1,r),Tt(t,r))}function Ke(t,r,o){if(t.tag===3)qm(t,t,o);else for(;r!==null;){if(r.tag===3){qm(r,t,o);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(rr===null||!rr.has(l))){t=As(o,t),t=hm(r,t,1),r=tr(r,t,1),t=yt(),r!==null&&(Ci(r,1,t),Tt(r,t));break}}r=r.return}}function CS(t,r,o){var l=t.pingCache;l!==null&&l.delete(r),r=yt(),t.pingedLanes|=t.suspendedLanes&o,rt===t&&(ot&o)===o&&(Ye===4||Ye===3&&(ot&130023424)===ot&&500>We()-yc?Ur(t,0):gc|=o),Tt(t,r)}function Gm(t,r){r===0&&((t.mode&1)===0?r=1:(r=$o,$o<<=1,($o&130023424)===0&&($o=4194304)));var o=yt();t=Nn(t,r),t!==null&&(Ci(t,r,o),Tt(t,o))}function ES(t){var r=t.memoizedState,o=0;r!==null&&(o=r.retryLane),Gm(t,o)}function jS(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),Gm(t,o)}var Ym;Ym=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,Fe&&(r.flags&1048576)!==0&&bp(r,da,r.index);switch(r.lanes=0,r.tag){case 2:var l=r.type;Ta(t,r),t=r.pendingProps;var d=js(r,ct.current);Rs(r,o),d=qu(null,r,l,t,d,o);var p=Gu();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)?(p=!0,la(r)):p=!1,r.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,Uu(r),d.updater=Ea,r.stateNode=d,d._reactInternals=r,tc(r,l,t,o),r=ic(null,r,l,!0,p,o)):(r.tag=0,Fe&&p&&Ru(r),gt(null,r,d,o),r=r.child),r;case 16:l=r.elementType;e:{switch(Ta(t,r),t=r.pendingProps,d=l._init,l=d(l._payload),r.type=l,d=r.tag=PS(l),t=Yt(l,t),d){case 0:r=sc(null,r,l,t,o);break e;case 1:r=km(null,r,l,t,o);break e;case 11:r=ym(null,r,l,t,o);break e;case 14:r=vm(null,r,l,Yt(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:Yt(l,d),sc(t,r,l,d,o);case 1:return l=r.type,d=r.pendingProps,d=r.elementType===l?d:Yt(l,d),km(t,r,l,d,o);case 3:e:{if(Cm(r),t===null)throw Error(s(387));l=r.pendingProps,p=r.memoizedState,d=p.element,Fp(t,r),ya(r,l,null,o);var w=r.memoizedState;if(l=w.element,p.isDehydrated)if(p={element:l,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},r.updateQueue.baseState=p,r.memoizedState=p,r.flags&256){d=As(Error(s(423)),r),r=Em(t,r,l,o,d);break e}else if(l!==d){d=As(Error(s(424)),r),r=Em(t,r,l,o,d);break e}else for(Dt=Yn(r.stateNode.containerInfo.firstChild),Rt=r,Fe=!0,Gt=null,o=Ip(r,null,l,o),r.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Ns(),l===d){r=Mn(t,r,o);break e}gt(t,r,l,o)}r=r.child}return r;case 5:return Up(r),t===null&&Lu(r),l=r.type,d=r.pendingProps,p=t!==null?t.memoizedProps:null,w=d.children,ju(l,d)?w=null:p!==null&&ju(l,p)&&(r.flags|=32),Sm(t,r),gt(t,r,w,o),r.child;case 6:return t===null&&Lu(r),null;case 13:return jm(t,r,o);case 4:return Bu(r,r.stateNode.containerInfo),l=r.pendingProps,t===null?r.child=bs(r,null,l,o):gt(t,r,l,o),r.child;case 11:return l=r.type,d=r.pendingProps,d=r.elementType===l?d:Yt(l,d),ym(t,r,l,d,o);case 7:return gt(t,r,r.pendingProps,o),r.child;case 8:return gt(t,r,r.pendingProps.children,o),r.child;case 12:return gt(t,r,r.pendingProps.children,o),r.child;case 10:e:{if(l=r.type._context,d=r.pendingProps,p=r.memoizedProps,w=d.value,Ae(pa,l._currentValue),l._currentValue=w,p!==null)if(qt(p.value,w)){if(p.children===d.children&&!kt.current){r=Mn(t,r,o);break e}}else for(p=r.child,p!==null&&(p.return=r);p!==null;){var j=p.dependencies;if(j!==null){w=p.child;for(var N=j.firstContext;N!==null;){if(N.context===l){if(p.tag===1){N=bn(-1,o&-o),N.tag=2;var U=p.updateQueue;if(U!==null){U=U.shared;var W=U.pending;W===null?N.next=N:(N.next=W.next,W.next=N),U.pending=N}}p.lanes|=o,N=p.alternate,N!==null&&(N.lanes|=o),Vu(p.return,o,r),j.lanes|=o;break}N=N.next}}else if(p.tag===10)w=p.type===r.type?null:p.child;else if(p.tag===18){if(w=p.return,w===null)throw Error(s(341));w.lanes|=o,j=w.alternate,j!==null&&(j.lanes|=o),Vu(w,o,r),w=p.sibling}else w=p.child;if(w!==null)w.return=p;else for(w=p;w!==null;){if(w===r){w=null;break}if(p=w.sibling,p!==null){p.return=w.return,w=p;break}w=w.return}p=w}gt(t,r,d.children,o),r=r.child}return r;case 9:return d=r.type,l=r.pendingProps.children,Rs(r,o),d=Ft(d),l=l(d),r.flags|=1,gt(t,r,l,o),r.child;case 14:return l=r.type,d=Yt(l,r.pendingProps),d=Yt(l.type,d),vm(t,r,l,d,o);case 15:return xm(t,r,r.type,r.pendingProps,o);case 17:return l=r.type,d=r.pendingProps,d=r.elementType===l?d:Yt(l,d),Ta(t,r),r.tag=1,Ct(l)?(t=!0,la(r)):t=!1,Rs(r,o),cm(r,l,d),tc(r,l,d,o),ic(null,r,l,!0,t,o);case 19:return Pm(t,r,o);case 22:return wm(t,r,o)}throw Error(s(156,r.tag))};function Xm(t,r){return Mh(t,r)}function TS(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 TS(t,r,o,l)}function jc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function PS(t){if(typeof t=="function")return jc(t)?1:0;if(t!=null){if(t=t.$$typeof,t===G)return 11;if(t===Le)return 14}return 2}function ar(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,p){var w=2;if(l=t,typeof t=="function")jc(t)&&(w=1);else if(typeof t=="string")w=5;else e:switch(t){case L:return $r(o.children,d,p,r);case F:w=8,d|=8;break;case $:return t=Ut(12,o,r,d|2),t.elementType=$,t.lanes=p,t;case Z:return t=Ut(13,o,r,d),t.elementType=Z,t.lanes=p,t;case fe:return t=Ut(19,o,r,d),t.elementType=fe,t.lanes=p,t;case Se:return Fa(o,d,p,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 Le:w=14;break e;case ye: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=p,r}function $r(t,r,o,l){return t=Ut(7,t,l,r),t.lanes=o,t}function Fa(t,r,o,l){return t=Ut(22,t,l,r),t.elementType=Se,t.lanes=o,t.stateNode={isHidden:!1},t}function Tc(t,r,o){return t=Ut(6,t,null,r),t.lanes=o,t}function Pc(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 NS(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=eu(0),this.expirationTimes=eu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eu(0),this.identifierPrefix=l,this.onRecoverableError=d,this.mutableSourceEagerHydrationData=null}function Nc(t,r,o,l,d,p,w,j,N){return t=new NS(t,r,o,j,N),r===1?(r=1,p===!0&&(r|=8)):r=0,p=Ut(3,null,null,r),t.current=p,p.stateNode=t,p.memoizedState={element:l,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Uu(p),t}function bS(t,r,o){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:l==null?null:""+l,children:t,containerInfo:r,implementation:o}}function Zm(t){if(!t)return Zn;t=t._reactInternals;e:{if(Rr(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 Tp(t,o,r)}return r}function Jm(t,r,o,l,d,p,w,j,N){return t=Nc(o,l,!0,t,d,p,w,j,N),t.context=Zm(null),o=t.current,l=yt(),d=ir(o),p=bn(l,d),p.callback=r??null,tr(o,p,d),t.current.lanes=d,Ci(t,d,l),Tt(t,l),t}function Va(t,r,o,l){var d=r.current,p=yt(),w=ir(d);return o=Zm(o),r.context===null?r.context=o:r.pendingContext=o,r=bn(p,w),r.payload={element:t},l=l===void 0?null:l,l!==null&&(r.callback=l),t=tr(d,r,w),t!==null&&(Jt(t,d,w,p),ga(t,d,w)),w}function za(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 eg(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o<r?o:r}}function bc(t,r){eg(t,r),(t=t.alternate)&&eg(t,r)}function MS(){return null}var tg=typeof reportError=="function"?reportError:function(t){console.error(t)};function Mc(t){this._internalRoot=t}Ua.prototype.render=Mc.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(s(409));Va(t,r,null,null)},Ua.prototype.unmount=Mc.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;zr(function(){Va(null,t,null,null)}),r[En]=null}};function Ua(t){this._internalRoot=t}Ua.prototype.unstable_scheduleHydration=function(t){if(t){var r=Fh();t={blockedOn:null,target:t,priority:r};for(var o=0;o<Qn.length&&r!==0&&r<Qn[o].priority;o++);Qn.splice(o,0,t),o===0&&Uh(t)}};function Rc(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Ba(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function ng(){}function RS(t,r,o,l,d){if(d){if(typeof l=="function"){var p=l;l=function(){var U=za(w);p.call(U)}}var w=Jm(r,l,t,0,null,!1,!1,"",ng);return t._reactRootContainer=w,t[En]=w.current,_i(t.nodeType===8?t.parentNode:t),zr(),w}for(;d=t.lastChild;)t.removeChild(d);if(typeof l=="function"){var j=l;l=function(){var U=za(N);j.call(U)}}var N=Nc(t,0,!1,null,null,!1,!1,"",ng);return t._reactRootContainer=N,t[En]=N.current,_i(t.nodeType===8?t.parentNode:t),zr(function(){Va(r,N,o,l)}),N}function $a(t,r,o,l,d){var p=o._reactRootContainer;if(p){var w=p;if(typeof d=="function"){var j=d;d=function(){var N=za(w);j.call(N)}}Va(r,w,t,d)}else w=RS(o,r,t,d,l);return za(w)}Ih=function(t){switch(t.tag){case 3:var r=t.stateNode;if(r.current.memoizedState.isDehydrated){var o=ki(r.pendingLanes);o!==0&&(tu(r,o|1),Tt(r,We()),(ke&6)===0&&(Is=We()+500,Jn()))}break;case 13:zr(function(){var l=Nn(t,1);if(l!==null){var d=yt();Jt(l,t,1,d)}}),bc(t,1)}},nu=function(t){if(t.tag===13){var r=Nn(t,134217728);if(r!==null){var o=yt();Jt(r,t,134217728,o)}bc(t,134217728)}},_h=function(t){if(t.tag===13){var r=ir(t),o=Nn(t,r);if(o!==null){var l=yt();Jt(o,t,r,l)}bc(t,r)}},Fh=function(){return be},Vh=function(t,r){var o=be;try{return be=t,r()}finally{be=o}},ql=function(t,r,o){switch(r){case"input":if(zl(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=oa(l);if(!d)throw Error(s(90));uh(l),zl(l,d)}}}break;case"textarea":ph(t,o);break;case"select":r=o.value,r!=null&&hs(t,!!o.multiple,r,!1)}},Ch=kc,Eh=zr;var DS={usingClientEntryPoint:!1,Events:[zi,Cs,oa,Sh,kh,kc]},eo={findFiberByHostInstance:Dr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},AS={bundleType:eo.bundleType,version:eo.version,rendererPackageName:eo.rendererPackageName,rendererConfig:eo.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=Nh(t),t===null?null:t.stateNode},findFiberByHostInstance:eo.findFiberByHostInstance||MS,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 Ka=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ka.isDisabled&&Ka.supportsFiber)try{Uo=Ka.inject(AS),dn=Ka}catch{}}return Pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DS,Pt.createPortal=function(t,r){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Rc(r))throw Error(s(200));return bS(t,r,null,o)},Pt.createRoot=function(t,r){if(!Rc(t))throw Error(s(299));var o=!1,l="",d=tg;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(l=r.identifierPrefix),r.onRecoverableError!==void 0&&(d=r.onRecoverableError)),r=Nc(t,1,!1,null,null,o,!1,l,d),t[En]=r.current,_i(t.nodeType===8?t.parentNode:t),new Mc(r)},Pt.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=Nh(r),t=t===null?null:t.stateNode,t},Pt.flushSync=function(t){return zr(t)},Pt.hydrate=function(t,r,o){if(!Ba(r))throw Error(s(200));return $a(null,t,r,!0,o)},Pt.hydrateRoot=function(t,r,o){if(!Rc(t))throw Error(s(405));var l=o!=null&&o.hydratedSources||null,d=!1,p="",w=tg;if(o!=null&&(o.unstable_strictMode===!0&&(d=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onRecoverableError!==void 0&&(w=o.onRecoverableError)),r=Jm(r,null,t,1,o??null,d,!1,p,w),t[En]=r.current,_i(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 Ua(r)},Pt.render=function(t,r,o){if(!Ba(r))throw Error(s(200));return $a(null,t,r,!1,o)},Pt.unmountComponentAtNode=function(t){if(!Ba(t))throw Error(s(40));return t._reactRootContainer?(zr(function(){$a(null,null,t,!1,function(){t._reactRootContainer=null,t[En]=null})}),!0):!1},Pt.unstable_batchedUpdates=kc,Pt.unstable_renderSubtreeIntoContainer=function(t,r,o,l){if(!Ba(o))throw Error(s(200));if(t==null||t._reactInternals===void 0)throw Error(s(38));return $a(t,r,o,!1,l)},Pt.version="18.3.1-next-f1338f8080-20240426",Pt}var xg;function Av(){if(xg)return Ic.exports;xg=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(),Ic.exports=Dk(),Ic.exports}var wg;function Ak(){if(wg)return Qa;wg=1;var e=Av();return Qa.createRoot=e.createRoot,Qa.hydrateRoot=e.hydrateRoot,Qa}var Lk=Ak();Av();/**
41
- * @remix-run/router v1.23.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
- */function fo(){return fo=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var i in s)({}).hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},fo.apply(null,arguments)}var kr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(kr||(kr={}));const Sg="popstate";function Ok(e){e===void 0&&(e={});function n(i,a){let{pathname:c,search:u,hash:h}=i.location;return kd("",{pathname:c,search:u,hash:h},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function s(i,a){return typeof a=="string"?a:fl(a)}return _k(n,s,null,e)}function $e(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function Lv(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function Ik(){return Math.random().toString(36).substr(2,8)}function kg(e,n){return{usr:e.state,key:e.key,idx:n}}function kd(e,n,s,i){return s===void 0&&(s=null),fo({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?ui(n):n,{state:s,key:n&&n.key||i||Ik()})}function fl(e){let{pathname:n="/",search:s="",hash:i=""}=e;return s&&s!=="?"&&(n+=s.charAt(0)==="?"?s:"?"+s),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function ui(e){let n={};if(e){let s=e.indexOf("#");s>=0&&(n.hash=e.substr(s),e=e.substr(0,s));let i=e.indexOf("?");i>=0&&(n.search=e.substr(i),e=e.substr(0,i)),e&&(n.pathname=e)}return n}function _k(e,n,s,i){i===void 0&&(i={});let{window:a=document.defaultView,v5Compat:c=!1}=i,u=a.history,h=kr.Pop,m=null,g=y();g==null&&(g=0,u.replaceState(fo({},u.state,{idx:g}),""));function y(){return(u.state||{idx:null}).idx}function v(){h=kr.Pop;let E=y(),A=E==null?null:E-g;g=E,m&&m({action:h,location:T.location,delta:A})}function x(E,A){h=kr.Push;let I=kd(T.location,E,A);g=y()+1;let b=kg(I,g),O=T.createHref(I);try{u.pushState(b,"",O)}catch(z){if(z instanceof DOMException&&z.name==="DataCloneError")throw z;a.location.assign(O)}c&&m&&m({action:h,location:T.location,delta:1})}function C(E,A){h=kr.Replace;let I=kd(T.location,E,A);g=y();let b=kg(I,g),O=T.createHref(I);u.replaceState(b,"",O),c&&m&&m({action:h,location:T.location,delta:0})}function k(E){let A=a.location.origin!=="null"?a.location.origin:a.location.href,I=typeof E=="string"?E:fl(E);return I=I.replace(/ $/,"%20"),$e(A,"No window.location.(origin|href) available to create URL for href: "+I),new URL(I,A)}let T={get action(){return h},get location(){return e(a,u)},listen(E){if(m)throw new Error("A history only accepts one active listener");return a.addEventListener(Sg,v),m=E,()=>{a.removeEventListener(Sg,v),m=null}},createHref(E){return n(a,E)},createURL:k,encodeLocation(E){let A=k(E);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:x,replace:C,go(E){return u.go(E)}};return T}var Cg;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Cg||(Cg={}));function Fk(e,n,s){return s===void 0&&(s="/"),Vk(e,n,s)}function Vk(e,n,s,i){let a=typeof n=="string"?ui(n):n,c=si(a.pathname||"/",s);if(c==null)return null;let u=Ov(e);zk(u);let h=null,m=Xk(c);for(let g=0;h==null&&g<u.length;++g)h=Gk(u[g],m);return h}function Ov(e,n,s,i){n===void 0&&(n=[]),s===void 0&&(s=[]),i===void 0&&(i="");let a=(c,u,h)=>{let m={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:u,route:c};m.relativePath.startsWith("/")&&($e(m.relativePath.startsWith(i),'Absolute route path "'+m.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),m.relativePath=m.relativePath.slice(i.length));let g=Cr([i,m.relativePath]),y=s.concat(m);c.children&&c.children.length>0&&($e(c.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),Ov(c.children,n,y,g)),!(c.path==null&&!c.index)&&n.push({path:g,score:Qk(g,c.index),routesMeta:y})};return e.forEach((c,u)=>{var h;if(c.path===""||!((h=c.path)!=null&&h.includes("?")))a(c,u);else for(let m of Iv(c.path))a(c,u,m)}),n}function Iv(e){let n=e.split("/");if(n.length===0)return[];let[s,...i]=n,a=s.endsWith("?"),c=s.replace(/\?$/,"");if(i.length===0)return a?[c,""]:[c];let u=Iv(i.join("/")),h=[];return h.push(...u.map(m=>m===""?c:[c,m].join("/"))),a&&h.push(...u),h.map(m=>e.startsWith("/")&&m===""?"/":m)}function zk(e){e.sort((n,s)=>n.score!==s.score?s.score-n.score:qk(n.routesMeta.map(i=>i.childrenIndex),s.routesMeta.map(i=>i.childrenIndex)))}const Uk=/^:[\w-]+$/,Bk=3,$k=2,Kk=1,Wk=10,Hk=-2,Eg=e=>e==="*";function Qk(e,n){let s=e.split("/"),i=s.length;return s.some(Eg)&&(i+=Hk),n&&(i+=$k),s.filter(a=>!Eg(a)).reduce((a,c)=>a+(Uk.test(c)?Bk:c===""?Kk:Wk),i)}function qk(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 Gk(e,n,s){let{routesMeta:i}=e,a={},c="/",u=[];for(let h=0;h<i.length;++h){let m=i[h],g=h===i.length-1,y=c==="/"?n:n.slice(c.length)||"/",v=Cd({path:m.relativePath,caseSensitive:m.caseSensitive,end:g},y),x=m.route;if(!v)return null;Object.assign(a,v.params),u.push({params:a,pathname:Cr([c,v.pathname]),pathnameBase:eC(Cr([c,v.pathnameBase])),route:x}),v.pathnameBase!=="/"&&(c=Cr([c,v.pathnameBase]))}return u}function Cd(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[s,i]=Yk(e.path,e.caseSensitive,e.end),a=n.match(s);if(!a)return null;let c=a[0],u=c.replace(/(.)\/+$/,"$1"),h=a.slice(1);return{params:i.reduce((g,y,v)=>{let{paramName:x,isOptional:C}=y;if(x==="*"){let T=h[v]||"";u=c.slice(0,c.length-T.length).replace(/(.)\/+$/,"$1")}const k=h[v];return C&&!k?g[x]=void 0:g[x]=(k||"").replace(/%2F/g,"/"),g},{}),pathname:c,pathnameBase:u,pattern:e}}function Yk(e,n,s){n===void 0&&(n=!1),s===void 0&&(s=!0),Lv(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,(u,h,m)=>(i.push({paramName:h,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(i.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,n?void 0:"i"),i]}function Xk(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Lv(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+n+").")),e}}function si(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 Zk(e,n){n===void 0&&(n="/");let{pathname:s,search:i="",hash:a=""}=typeof e=="string"?ui(e):e,c;return s?(s=_v(s),s.startsWith("/")?c=jg(s.substring(1),"/"):c=jg(s,n)):c=n,{pathname:c,search:tC(i),hash:nC(a)}}function jg(e,n){let s=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?s.length>1&&s.pop():a!=="."&&s.push(a)}),s.length>1?s.join("/"):"/"}function Vc(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 Jk(e){return e.filter((n,s)=>s===0||n.route.path&&n.route.path.length>0)}function uf(e,n){let s=Jk(e);return n?s.map((i,a)=>a===s.length-1?i.pathname:i.pathnameBase):s.map(i=>i.pathnameBase)}function cf(e,n,s,i){i===void 0&&(i=!1);let a;typeof e=="string"?a=ui(e):(a=fo({},e),$e(!a.pathname||!a.pathname.includes("?"),Vc("?","pathname","search",a)),$e(!a.pathname||!a.pathname.includes("#"),Vc("#","pathname","hash",a)),$e(!a.search||!a.search.includes("#"),Vc("#","search","hash",a)));let c=e===""||a.pathname==="",u=c?"/":a.pathname,h;if(u==null)h=s;else{let v=n.length-1;if(!i&&u.startsWith("..")){let x=u.split("/");for(;x[0]==="..";)x.shift(),v-=1;a.pathname=x.join("/")}h=v>=0?n[v]:"/"}let m=Zk(a,h),g=u&&u!=="/"&&u.endsWith("/"),y=(c||u===".")&&s.endsWith("/");return!m.pathname.endsWith("/")&&(g||y)&&(m.pathname+="/"),m}const _v=e=>e.replace(/\/\/+/g,"/"),Cr=e=>_v(e.join("/")),eC=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),tC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,nC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function rC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Fv=["post","put","patch","delete"];new Set(Fv);const sC=["get",...Fv];new Set(sC);/**
50
- * React Router v6.30.6
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */function ho(){return ho=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var i in s)({}).hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},ho.apply(null,arguments)}const Pl=S.createContext(null),Vv=S.createContext(null),Un=S.createContext(null),Nl=S.createContext(null),Bn=S.createContext({outlet:null,matches:[],isDataRoute:!1}),zv=S.createContext(null);function iC(e,n){let{relative:s}=n===void 0?{}:n;ci()||$e(!1);let{basename:i,navigator:a}=S.useContext(Un),{hash:c,pathname:u,search:h}=bl(e,{relative:s}),m=u;return i!=="/"&&(m=u==="/"?i:Cr([i,u])),a.createHref({pathname:m,search:h,hash:c})}function ci(){return S.useContext(Nl)!=null}function ds(){return ci()||$e(!1),S.useContext(Nl).location}function Uv(e){S.useContext(Un).static||S.useLayoutEffect(e)}function di(){let{isDataRoute:e}=S.useContext(Bn);return e?wC():oC()}function oC(){ci()||$e(!1);let e=S.useContext(Pl),{basename:n,future:s,navigator:i}=S.useContext(Un),{matches:a}=S.useContext(Bn),{pathname:c}=ds(),u=JSON.stringify(uf(a,s.v7_relativeSplatPath)),h=S.useRef(!1);return Uv(()=>{h.current=!0}),S.useCallback(function(g,y){if(y===void 0&&(y={}),!h.current)return;if(typeof g=="number"){i.go(g);return}let v=cf(g,JSON.parse(u),c,y.relative==="path");e==null&&n!=="/"&&(v.pathname=v.pathname==="/"?n:Cr([n,v.pathname])),(y.replace?i.replace:i.push)(v,y.state,y)},[n,i,u,c,e])}const aC=S.createContext(null);function lC(e){let n=S.useContext(Bn).outlet;return n&&S.createElement(aC.Provider,{value:e},n)}function bl(e,n){let{relative:s}=n===void 0?{}:n,{future:i}=S.useContext(Un),{matches:a}=S.useContext(Bn),{pathname:c}=ds(),u=JSON.stringify(uf(a,i.v7_relativeSplatPath));return S.useMemo(()=>cf(e,JSON.parse(u),c,s==="path"),[e,u,c,s])}function uC(e,n){return cC(e,n)}function cC(e,n,s,i){ci()||$e(!1);let{navigator:a}=S.useContext(Un),{matches:c}=S.useContext(Bn),u=c[c.length-1],h=u?u.params:{};u&&u.pathname;let m=u?u.pathnameBase:"/";u&&u.route;let g=ds(),y;if(n){var v;let E=typeof n=="string"?ui(n):n;m==="/"||(v=E.pathname)!=null&&v.startsWith(m)||$e(!1),y=E}else y=g;let x=y.pathname||"/",C=x;if(m!=="/"){let E=m.replace(/^\//,"").split("/");C="/"+x.replace(/^\//,"").split("/").slice(E.length).join("/")}let k=Fk(e,{pathname:C}),T=mC(k&&k.map(E=>Object.assign({},E,{params:Object.assign({},h,E.params),pathname:Cr([m,a.encodeLocation?a.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?m:Cr([m,a.encodeLocation?a.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),c,s,i);return n&&T?S.createElement(Nl.Provider,{value:{location:ho({pathname:"/",search:"",hash:"",state:null,key:"default"},y),navigationType:kr.Pop}},T):T}function dC(){let e=xC(),n=rC(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),s=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return 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,null)}const fC=S.createElement(dC,null);class hC extends S.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,s){return s.location!==n.location||s.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:s.error,location:s.location,revalidation:n.revalidation||s.revalidation}}componentDidCatch(n,s){console.error("React Router caught the following error during render",n,s)}render(){return this.state.error!==void 0?S.createElement(Bn.Provider,{value:this.props.routeContext},S.createElement(zv.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function pC(e){let{routeContext:n,match:s,children:i}=e,a=S.useContext(Pl);return a&&a.static&&a.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=s.route.id),S.createElement(Bn.Provider,{value:n},i)}function mC(e,n,s,i){var a;if(n===void 0&&(n=[]),s===void 0&&(s=null),i===void 0&&(i=null),e==null){var c;if(!s)return null;if(s.errors)e=s.matches;else if((c=i)!=null&&c.v7_partialHydration&&n.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let u=e,h=(a=s)==null?void 0:a.errors;if(h!=null){let y=u.findIndex(v=>v.route.id&&(h==null?void 0:h[v.route.id])!==void 0);y>=0||$e(!1),u=u.slice(0,Math.min(u.length,y+1))}let m=!1,g=-1;if(s&&i&&i.v7_partialHydration)for(let y=0;y<u.length;y++){let v=u[y];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(g=y),v.route.id){let{loaderData:x,errors:C}=s,k=v.route.loader&&x[v.route.id]===void 0&&(!C||C[v.route.id]===void 0);if(v.route.lazy||k){m=!0,g>=0?u=u.slice(0,g+1):u=[u[0]];break}}}return u.reduceRight((y,v,x)=>{let C,k=!1,T=null,E=null;s&&(C=h&&v.route.id?h[v.route.id]:void 0,T=v.route.errorElement||fC,m&&(g<0&&x===0?(SC("route-fallback"),k=!0,E=null):g===x&&(k=!0,E=v.route.hydrateFallbackElement||null)));let A=n.concat(u.slice(0,x+1)),I=()=>{let b;return C?b=T:k?b=E:v.route.Component?b=S.createElement(v.route.Component,null):v.route.element?b=v.route.element:b=y,S.createElement(pC,{match:v,routeContext:{outlet:y,matches:A,isDataRoute:s!=null},children:b})};return s&&(v.route.ErrorBoundary||v.route.errorElement||x===0)?S.createElement(hC,{location:s.location,revalidation:s.revalidation,component:T,error:C,children:I(),routeContext:{outlet:null,matches:A,isDataRoute:!0}}):I()},null)}var Bv=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(Bv||{}),$v=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})($v||{});function gC(e){let n=S.useContext(Pl);return n||$e(!1),n}function yC(e){let n=S.useContext(Vv);return n||$e(!1),n}function vC(e){let n=S.useContext(Bn);return n||$e(!1),n}function Kv(e){let n=vC(),s=n.matches[n.matches.length-1];return s.route.id||$e(!1),s.route.id}function xC(){var e;let n=S.useContext(zv),s=yC(),i=Kv();return n!==void 0?n:(e=s.errors)==null?void 0:e[i]}function wC(){let{router:e}=gC(Bv.UseNavigateStable),n=Kv($v.UseNavigateStable),s=S.useRef(!1);return Uv(()=>{s.current=!0}),S.useCallback(function(a,c){c===void 0&&(c={}),s.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,ho({fromRouteId:n},c)))},[e,n])}const Tg={};function SC(e,n,s){Tg[e]||(Tg[e]=!0)}function kC(e,n){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function df(e){let{to:n,replace:s,state:i,relative:a}=e;ci()||$e(!1);let{future:c,static:u}=S.useContext(Un),{matches:h}=S.useContext(Bn),{pathname:m}=ds(),g=di(),y=cf(n,uf(h,c.v7_relativeSplatPath),m,a==="path"),v=JSON.stringify(y);return S.useEffect(()=>g(JSON.parse(v),{replace:s,state:i,relative:a}),[g,v,a,s,i]),null}function CC(e){return lC(e.context)}function An(e){$e(!1)}function EC(e){let{basename:n="/",children:s=null,location:i,navigationType:a=kr.Pop,navigator:c,static:u=!1,future:h}=e;ci()&&$e(!1);let m=n.replace(/^\/*/,"/"),g=S.useMemo(()=>({basename:m,navigator:c,static:u,future:ho({v7_relativeSplatPath:!1},h)}),[m,h,c,u]);typeof i=="string"&&(i=ui(i));let{pathname:y="/",search:v="",hash:x="",state:C=null,key:k="default"}=i,T=S.useMemo(()=>{let E=si(y,m);return E==null?null:{location:{pathname:E,search:v,hash:x,state:C,key:k},navigationType:a}},[m,y,v,x,C,k,a]);return T==null?null:S.createElement(Un.Provider,{value:g},S.createElement(Nl.Provider,{children:s,value:T}))}function jC(e){let{children:n,location:s}=e;return uC(Ed(n),s)}new Promise(()=>{});function Ed(e,n){n===void 0&&(n=[]);let s=[];return S.Children.forEach(e,(i,a)=>{if(!S.isValidElement(i))return;let c=[...n,a];if(i.type===S.Fragment){s.push.apply(s,Ed(i.props.children,c));return}i.type!==An&&$e(!1),!i.props.index||!i.props.children||$e(!1);let u={id:i.props.id||c.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(u.children=Ed(i.props.children,c)),s.push(u)}),s}/**
59
- * React Router DOM v6.30.6
60
- *
61
- * Copyright (c) Remix Software Inc.
62
- *
63
- * This source code is licensed under the MIT license found in the
64
- * LICENSE.md file in the root directory of this source tree.
65
- *
66
- * @license MIT
67
- */function hl(){return hl=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var i in s)({}).hasOwnProperty.call(s,i)&&(e[i]=s[i])}return e},hl.apply(null,arguments)}function Wv(e,n){if(e==null)return{};var s={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(n.indexOf(i)!==-1)continue;s[i]=e[i]}return s}function TC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function PC(e,n){return e.button===0&&(!n||n==="_self")&&!TC(e)}function jd(e){return e===void 0&&(e=""),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 NC(e,n){let s=jd(e);return n&&n.forEach((i,a)=>{s.has(a)||n.getAll(a).forEach(c=>{s.append(a,c)})}),s}const bC=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],MC=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],RC="6";try{window.__reactRouterVersion=RC}catch{}const DC=S.createContext({isTransitioning:!1}),AC="startTransition",Pg=$S[AC];function LC(e){let{basename:n,children:s,future:i,window:a}=e,c=S.useRef();c.current==null&&(c.current=Ok({window:a,v5Compat:!0}));let u=c.current,[h,m]=S.useState({action:u.action,location:u.location}),{v7_startTransition:g}=i||{},y=S.useCallback(v=>{g&&Pg?Pg(()=>m(v)):m(v)},[m,g]);return S.useLayoutEffect(()=>u.listen(y),[u,y]),S.useEffect(()=>kC(i),[i]),S.createElement(EC,{basename:n,children:s,location:h.location,navigationType:h.action,navigator:u,future:i})}const OC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",IC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_C=S.forwardRef(function(n,s){let{onClick:i,relative:a,reloadDocument:c,replace:u,state:h,target:m,to:g,preventScrollReset:y,viewTransition:v}=n,x=Wv(n,bC),{basename:C}=S.useContext(Un),k,T=!1;if(typeof g=="string"&&IC.test(g)&&(k=g,OC))try{let b=new URL(window.location.href),O=g.startsWith("//")?new URL(b.protocol+g):new URL(g),z=si(O.pathname,C);O.origin===b.origin&&z!=null?g=z+O.search+O.hash:T=!0}catch{}let E=iC(g,{relative:a}),A=zC(g,{replace:u,state:h,target:m,preventScrollReset:y,relative:a,viewTransition:v});function I(b){i&&i(b),b.defaultPrevented||A(b)}return S.createElement("a",hl({},x,{href:k||E,onClick:T||c?i:I,ref:s,target:m}))}),FC=S.forwardRef(function(n,s){let{"aria-current":i="page",caseSensitive:a=!1,className:c="",end:u=!1,style:h,to:m,viewTransition:g,children:y}=n,v=Wv(n,MC),x=bl(m,{relative:v.relative}),C=ds(),k=S.useContext(Vv),{navigator:T,basename:E}=S.useContext(Un),A=k!=null&&BC(x)&&g===!0,I=T.encodeLocation?T.encodeLocation(x).pathname:x.pathname,b=C.pathname,O=k&&k.navigation&&k.navigation.location?k.navigation.location.pathname:null;a||(b=b.toLowerCase(),O=O?O.toLowerCase():null,I=I.toLowerCase()),O&&E&&(O=si(O,E)||O);const z=I!=="/"&&I.endsWith("/")?I.length-1:I.length;let B=b===I||!u&&b.startsWith(I)&&b.charAt(z)==="/",L=O!=null&&(O===I||!u&&O.startsWith(I)&&O.charAt(I.length)==="/"),F={isActive:B,isPending:L,isTransitioning:A},$=B?i:void 0,Y;typeof c=="function"?Y=c(F):Y=[c,B?"active":null,L?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let ne=typeof h=="function"?h(F):h;return S.createElement(_C,hl({},v,{"aria-current":$,className:Y,ref:s,style:ne,to:m,viewTransition:g}),typeof y=="function"?y(F):y)});var Td;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Td||(Td={}));var Ng;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ng||(Ng={}));function VC(e){let n=S.useContext(Pl);return n||$e(!1),n}function zC(e,n){let{target:s,replace:i,state:a,preventScrollReset:c,relative:u,viewTransition:h}=n===void 0?{}:n,m=di(),g=ds(),y=bl(e,{relative:u});return S.useCallback(v=>{if(PC(v,s)){v.preventDefault();let x=i!==void 0?i:fl(g)===fl(y);m(e,{replace:x,state:a,preventScrollReset:c,relative:u,viewTransition:h})}},[g,m,y,i,a,s,e,c,u,h])}function UC(e){let n=S.useRef(jd(e)),s=S.useRef(!1),i=ds(),a=S.useMemo(()=>NC(i.search,s.current?null:n.current),[i.search]),c=di(),u=S.useCallback((h,m)=>{const g=jd(typeof h=="function"?h(a):h);s.current=!0,c("?"+g,m)},[c,a]);return[a,u]}function BC(e,n){n===void 0&&(n={});let s=S.useContext(DC);s==null&&$e(!1);let{basename:i}=VC(Td.useViewTransitionState),a=bl(e,{relative:n.relative});if(!s.isTransitioning)return!1;let c=si(s.currentLocation.pathname,i)||s.currentLocation.pathname,u=si(s.nextLocation.pathname,i)||s.nextLocation.pathname;return Cd(a.pathname,u)!=null||Cd(a.pathname,c)!=null}/**
68
- * @license lucide-react v1.52.0 - ISC
69
- *
70
- * This source code is licensed under the ISC license.
71
- * See the LICENSE file in the root directory of this source tree.
72
- */const $C=e=>e==null?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
73
- * @license lucide-react v1.52.0 - ISC
74
- *
75
- * This source code is licensed under the ISC license.
76
- * See the LICENSE file in the root directory of this source tree.
77
- */function KC(e,n,s=[]){if(n==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:$C(e),size:24,node:n,...s.length>0?{aliases:s}:{}}}/**
78
- * @license lucide-react v1.52.0 - ISC
79
- *
80
- * This source code is licensed under the ISC license.
81
- * See the LICENSE file in the root directory of this source tree.
82
- */const WC=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};/**
83
- * @license lucide-react v1.52.0 - ISC
84
- *
85
- * This source code is licensed under the ISC license.
86
- * See the LICENSE file in the root directory of this source tree.
87
- */const HC=e=>{const n=WC(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
88
- * @license lucide-react v1.52.0 - ISC
89
- *
90
- * This source code is licensed under the ISC license.
91
- * See the LICENSE file in the root directory of this source tree.
92
- */const Pd=(...e)=>e.filter((n,s,i)=>!!n&&n.trim()!==""&&i.indexOf(n)===s).join(" ").trim();/**
93
- * @license lucide-react v1.52.0 - ISC
94
- *
95
- * This source code is licensed under the ISC license.
96
- * See the LICENSE file in the root directory of this source tree.
97
- */const Kr={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"};/**
98
- * @license lucide-react v1.52.0 - ISC
99
- *
100
- * This source code is licensed under the ISC license.
101
- * See the LICENSE file in the root directory of this source tree.
102
- */function zc(e){return e!=null}function QC(e,n={}){var x,C;const s=n.attributeNames??{},i=k=>s[k]??k,a=e.size??e.width??Kr.width,c=e.size??e.height??Kr.height,u=((x=e.aliases)==null?void 0:x.filter(k=>typeof k=="string"&&k.trim()!=="").map(k=>`lucide-${k}`))??[],h=[...e.name?[`lucide-${e.name}`]:[],...u],m=((C=n.className)==null?void 0:C.split(" ").filter(Boolean))??[],g=n.includeDefaultClasses===!1?Pd(...m):Pd("lucide",...h,...m),y=n.absoluteStrokeWidth?Number(n.strokeWidth??Kr["stroke-width"])*Number(e.size??e.width??Kr.width)/Number(n.size??n.width??Kr.width):n.strokeWidth??Kr["stroke-width"];return["svg",{...Object.entries(Kr).reduce((k,[T,E])=>(k[i(T)]=E,k),{}),..."color"in n&&n.color&&{[i("stroke")]:n.color},..."size"in n&&zc(n.size)&&{[i("width")]:n.size,[i("height")]:n.size},..."width"in n&&zc(n.width)&&{[i("width")]:n.width},..."height"in n&&zc(n.height)&&{[i("height")]:n.height},[i("stroke-width")]:y,...g&&{[i("class")]:g},[i("viewBox")]:`0 0 ${a} ${c}`,...n.hasA11yProp===!1?{[i("aria-hidden")]:"true"}:{},..."attributes"in n&&n.attributes},e.node.map(k=>{const[T,E,A]=k,I=n.nonScalingStroke?{[i("vector-effect")]:"non-scaling-stroke",...E}:E;return A?[T,I,A]:[T,I]})]}/**
103
- * @license lucide-react v1.52.0 - ISC
104
- *
105
- * This source code is licensed under the ISC license.
106
- * See the LICENSE file in the root directory of this source tree.
107
- */function qC(e,n={}){return QC(e,{...n,attributeNames:{...n.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
108
- * @license lucide-react v1.52.0 - ISC
109
- *
110
- * This source code is licensed under the ISC license.
111
- * See the LICENSE file in the root directory of this source tree.
112
- */const GC=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},YC=S.createContext({}),XC=()=>S.useContext(YC),ZC=S.forwardRef(({color:e,size:n,width:s,height:i,strokeWidth:a,absoluteStrokeWidth:c,nonScalingStroke:u,className:h="",children:m,iconNode:g=[],icon:y={node:g,aliases:[],size:24},...v},x)=>{const{size:C=24,strokeWidth:k=2,absoluteStrokeWidth:T=!1,nonScalingStroke:E=!1,color:A="currentColor",className:I=""}=XC()??{},b=!!m||GC(v),[O,z,B=[]]=qC(y,{color:e??A,width:s??n??C,height:i??n??C,strokeWidth:a??k,absoluteStrokeWidth:c??T,nonScalingStroke:u??E,className:Pd(I,h),hasA11yProp:b,attributes:v});return S.createElement(O,{ref:x,...z},[...B.map(([L,F])=>S.createElement(L,F)),...Array.isArray(m)?m:[m]])});/**
113
- * @license lucide-react v1.52.0 - ISC
114
- *
115
- * This source code is licensed under the ISC license.
116
- * See the LICENSE file in the root directory of this source tree.
117
- */function pe(e,n=[],s=[]){const i=typeof e=="string"?KC(e,n,s):e,a=S.forwardRef(({className:c,...u},h)=>S.createElement(ZC,{ref:h,icon:i,className:c,...u}));return i.name&&(a.displayName=HC(i.name)),a}/**
118
- * @license lucide-react v1.52.0 - ISC
119
- *
120
- * This source code is licensed under the ISC license.
121
- * See the LICENSE file in the root directory of this source tree.
122
- */const Hv={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"}]]};Hv.node;const JC=pe(Hv);/**
123
- * @license lucide-react v1.52.0 - ISC
124
- *
125
- * This source code is licensed under the ISC license.
126
- * See the LICENSE file in the root directory of this source tree.
127
- */const Qv={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};Qv.node;const bg=pe(Qv);/**
128
- * @license lucide-react v1.52.0 - ISC
129
- *
130
- * This source code is licensed under the ISC license.
131
- * See the LICENSE file in the root directory of this source tree.
132
- */const qv={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"}]]};qv.node;const e2=pe(qv);/**
133
- * @license lucide-react v1.52.0 - ISC
134
- *
135
- * This source code is licensed under the ISC license.
136
- * See the LICENSE file in the root directory of this source tree.
137
- */const Gv={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};Gv.node;const Mg=pe(Gv);/**
138
- * @license lucide-react v1.52.0 - ISC
139
- *
140
- * This source code is licensed under the ISC license.
141
- * See the LICENSE file in the root directory of this source tree.
142
- */const Yv={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"}]]};Yv.node;const t2=pe(Yv);/**
143
- * @license lucide-react v1.52.0 - ISC
144
- *
145
- * This source code is licensed under the ISC license.
146
- * See the LICENSE file in the root directory of this source tree.
147
- */const Xv={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};Xv.node;const ff=pe(Xv);/**
148
- * @license lucide-react v1.52.0 - ISC
149
- *
150
- * This source code is licensed under the ISC license.
151
- * See the LICENSE file in the root directory of this source tree.
152
- */const Zv={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};Zv.node;const n2=pe(Zv);/**
153
- * @license lucide-react v1.52.0 - ISC
154
- *
155
- * This source code is licensed under the ISC license.
156
- * See the LICENSE file in the root directory of this source tree.
157
- */const Jv={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};Jv.node;const r2=pe(Jv);/**
158
- * @license lucide-react v1.52.0 - ISC
159
- *
160
- * This source code is licensed under the ISC license.
161
- * See the LICENSE file in the root directory of this source tree.
162
- */const e0={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"]};e0.node;const s2=pe(e0);/**
163
- * @license lucide-react v1.52.0 - ISC
164
- *
165
- * This source code is licensed under the ISC license.
166
- * See the LICENSE file in the root directory of this source tree.
167
- */const t0={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"]};t0.node;const i2=pe(t0);/**
168
- * @license lucide-react v1.52.0 - ISC
169
- *
170
- * This source code is licensed under the ISC license.
171
- * See the LICENSE file in the root directory of this source tree.
172
- */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 r0=pe(n0);/**
173
- * @license lucide-react v1.52.0 - ISC
174
- *
175
- * This source code is licensed under the ISC license.
176
- * See the LICENSE file in the root directory of this source tree.
177
- */const s0={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"]};s0.node;const o2=pe(s0);/**
178
- * @license lucide-react v1.52.0 - ISC
179
- *
180
- * This source code is licensed under the ISC license.
181
- * See the LICENSE file in the root directory of this source tree.
182
- */const i0={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"}]]};i0.node;const o0=pe(i0);/**
183
- * @license lucide-react v1.52.0 - ISC
184
- *
185
- * This source code is licensed under the ISC license.
186
- * See the LICENSE file in the root directory of this source tree.
187
- */const a0={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"}]]};a0.node;const hf=pe(a0);/**
188
- * @license lucide-react v1.52.0 - ISC
189
- *
190
- * This source code is licensed under the ISC license.
191
- * See the LICENSE file in the root directory of this source tree.
192
- */const l0={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"]};l0.node;const a2=pe(l0);/**
193
- * @license lucide-react v1.52.0 - ISC
194
- *
195
- * This source code is licensed under the ISC license.
196
- * See the LICENSE file in the root directory of this source tree.
197
- */const u0={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"}]]};u0.node;const l2=pe(u0);/**
198
- * @license lucide-react v1.52.0 - ISC
199
- *
200
- * This source code is licensed under the ISC license.
201
- * See the LICENSE file in the root directory of this source tree.
202
- */const c0={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"}]]};c0.node;const Rg=pe(c0);/**
203
- * @license lucide-react v1.52.0 - ISC
204
- *
205
- * This source code is licensed under the ISC license.
206
- * See the LICENSE file in the root directory of this source tree.
207
- */const d0={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"}]]};d0.node;const Uc=pe(d0);/**
208
- * @license lucide-react v1.52.0 - ISC
209
- *
210
- * This source code is licensed under the ISC license.
211
- * See the LICENSE file in the root directory of this source tree.
212
- */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 u2=pe(f0);/**
213
- * @license lucide-react v1.52.0 - ISC
214
- *
215
- * This source code is licensed under the ISC license.
216
- * See the LICENSE file in the root directory of this source tree.
217
- */const h0={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"}]]};h0.node;const c2=pe(h0);/**
218
- * @license lucide-react v1.52.0 - ISC
219
- *
220
- * This source code is licensed under the ISC license.
221
- * See the LICENSE file in the root directory of this source tree.
222
- */const p0={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"}]]};p0.node;const Nd=pe(p0);/**
223
- * @license lucide-react v1.52.0 - ISC
224
- *
225
- * This source code is licensed under the ISC license.
226
- * See the LICENSE file in the root directory of this source tree.
227
- */const m0={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"}]]};m0.node;const d2=pe(m0);/**
228
- * @license lucide-react v1.52.0 - ISC
229
- *
230
- * This source code is licensed under the ISC license.
231
- * See the LICENSE file in the root directory of this source tree.
232
- */const g0={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"}]]};g0.node;const y0=pe(g0);/**
233
- * @license lucide-react v1.52.0 - ISC
234
- *
235
- * This source code is licensed under the ISC license.
236
- * See the LICENSE file in the root directory of this source tree.
237
- */const v0={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"}]]};v0.node;const fi=pe(v0);/**
238
- * @license lucide-react v1.52.0 - ISC
239
- *
240
- * This source code is licensed under the ISC license.
241
- * See the LICENSE file in the root directory of this source tree.
242
- */const x0={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"}]]};x0.node;const po=pe(x0);/**
243
- * @license lucide-react v1.52.0 - ISC
244
- *
245
- * This source code is licensed under the ISC license.
246
- * See the LICENSE file in the root directory of this source tree.
247
- */const w0={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"}]]};w0.node;const f2=pe(w0);/**
248
- * @license lucide-react v1.52.0 - ISC
249
- *
250
- * This source code is licensed under the ISC license.
251
- * See the LICENSE file in the root directory of this source tree.
252
- */const S0={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"}]]};S0.node;const h2=pe(S0);/**
253
- * @license lucide-react v1.52.0 - ISC
254
- *
255
- * This source code is licensed under the ISC license.
256
- * See the LICENSE file in the root directory of this source tree.
257
- */const k0={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"}]]};k0.node;const p2=pe(k0);/**
258
- * @license lucide-react v1.52.0 - ISC
259
- *
260
- * This source code is licensed under the ISC license.
261
- * See the LICENSE file in the root directory of this source tree.
262
- */const C0={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"}]]};C0.node;const m2=pe(C0);/**
263
- * @license lucide-react v1.52.0 - ISC
264
- *
265
- * This source code is licensed under the ISC license.
266
- * See the LICENSE file in the root directory of this source tree.
267
- */const E0={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"}]]};E0.node;const g2=pe(E0);/**
268
- * @license lucide-react v1.52.0 - ISC
269
- *
270
- * This source code is licensed under the ISC license.
271
- * See the LICENSE file in the root directory of this source tree.
272
- */const j0={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};j0.node;const Lt=pe(j0);/**
273
- * @license lucide-react v1.52.0 - ISC
274
- *
275
- * This source code is licensed under the ISC license.
276
- * See the LICENSE file in the root directory of this source tree.
277
- */const T0={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"}]]};T0.node;const y2=pe(T0);/**
278
- * @license lucide-react v1.52.0 - ISC
279
- *
280
- * This source code is licensed under the ISC license.
281
- * See the LICENSE file in the root directory of this source tree.
282
- */const P0={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};P0.node;const v2=pe(P0);/**
283
- * @license lucide-react v1.52.0 - ISC
284
- *
285
- * This source code is licensed under the ISC license.
286
- * See the LICENSE file in the root directory of this source tree.
287
- */const N0={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"}]]};N0.node;const x2=pe(N0);/**
288
- * @license lucide-react v1.52.0 - ISC
289
- *
290
- * This source code is licensed under the ISC license.
291
- * See the LICENSE file in the root directory of this source tree.
292
- */const b0={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"}]]};b0.node;const w2=pe(b0);/**
293
- * @license lucide-react v1.52.0 - ISC
294
- *
295
- * This source code is licensed under the ISC license.
296
- * See the LICENSE file in the root directory of this source tree.
297
- */const M0={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"}]]};M0.node;const R0=pe(M0);/**
298
- * @license lucide-react v1.52.0 - ISC
299
- *
300
- * This source code is licensed under the ISC license.
301
- * See the LICENSE file in the root directory of this source tree.
302
- */const D0={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"}]]};D0.node;const pf=pe(D0);/**
303
- * @license lucide-react v1.52.0 - ISC
304
- *
305
- * This source code is licensed under the ISC license.
306
- * See the LICENSE file in the root directory of this source tree.
307
- */const A0={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"}]]};A0.node;const S2=pe(A0);/**
308
- * @license lucide-react v1.52.0 - ISC
309
- *
310
- * This source code is licensed under the ISC license.
311
- * See the LICENSE file in the root directory of this source tree.
312
- */const L0={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};L0.node;const O0=pe(L0);/**
313
- * @license lucide-react v1.52.0 - ISC
314
- *
315
- * This source code is licensed under the ISC license.
316
- * See the LICENSE file in the root directory of this source tree.
317
- */const I0={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"}]]};I0.node;const k2=pe(I0);/**
318
- * @license lucide-react v1.52.0 - ISC
319
- *
320
- * This source code is licensed under the ISC license.
321
- * See the LICENSE file in the root directory of this source tree.
322
- */const _0={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"}]]};_0.node;const mf=pe(_0);/**
323
- * @license lucide-react v1.52.0 - ISC
324
- *
325
- * This source code is licensed under the ISC license.
326
- * See the LICENSE file in the root directory of this source tree.
327
- */const F0={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"}]]};F0.node;const us=pe(F0);/**
328
- * @license lucide-react v1.52.0 - ISC
329
- *
330
- * This source code is licensed under the ISC license.
331
- * See the LICENSE file in the root directory of this source tree.
332
- */const V0={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"]};V0.node;const Er=pe(V0);/**
333
- * @license lucide-react v1.52.0 - ISC
334
- *
335
- * This source code is licensed under the ISC license.
336
- * See the LICENSE file in the root directory of this source tree.
337
- */const z0={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"]};z0.node;const pl=pe(z0);/**
338
- * @license lucide-react v1.52.0 - ISC
339
- *
340
- * This source code is licensed under the ISC license.
341
- * See the LICENSE file in the root directory of this source tree.
342
- */const U0={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"}]]};U0.node;const ml=pe(U0);/**
343
- * @license lucide-react v1.52.0 - ISC
344
- *
345
- * This source code is licensed under the ISC license.
346
- * See the LICENSE file in the root directory of this source tree.
347
- */const B0={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};B0.node;const an=pe(B0),C2=[["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"]],$0=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 E2(e){for(const[n,s]of C2)if(e.startsWith(n))return s;return $0.has(e)?"document":"other"}[...$0];const tn={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 jr extends Error{constructor(s,i,a){super(a);Dc(this,"status");Dc(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 ur(e,...n){return e instanceof jr&&n.includes(e.code)}const bd=new Set;function j2(e){return bd.add(e),()=>{bd.delete(e)}}function K0(){for(const e of bd)e()}function Dg(e){return typeof e=="object"&&e!==null}function T2(e){if(!Dg(e)||!Dg(e.error))return!1;const n=e.error;return typeof n.code=="string"&&typeof n.message=="string"}function W0(e,n){let s=null;try{s=JSON.parse(n)}catch{}return T2(s)?new jr(e,s.error.code,s.error.message):new jr(e,"UNKNOWN",`Request failed with status ${e}`)}function Wr(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 cr(e,n=""){return`/api/files/${encodeURIComponent(e)}${n}`}function no(e,n=""){return`/api/folders/${encodeURIComponent(e)}${n}`}async function H0(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 jr(0,"NETWORK_ERROR","Could not reach the server. Check your connection and try again.")}if(!a.ok){const c=await a.text().catch(()=>""),u=W0(a.status,c);throw a.status===401&&u.code!==tn.TELEGRAM_AUTH_REQUIRED&&K0(),u}return a}async function Te(e,n,s){return await(await H0(e,n,s)).json()}async function P2(e,n,s){await H0(e,n,s)}const we={auth:{me(){return Te("GET","/api/auth/me")},startLogin(e){return Te("POST","/api/auth/telegram/start",{phone:e})},verifyCode(e,n){return Te("POST","/api/auth/telegram/verify",{phone:e,code:n})},verifyPassword(e,n){return Te("POST","/api/auth/telegram/password",{phone:e,password:n})},logout(){return Te("POST","/api/auth/logout")}},storage:{ensure(){return Te("POST","/api/storage/ensure")},health(){return Te("GET","/api/storage/health")},stats(){return Te("GET","/api/storage/stats")},integrityCheck(e=!1){return Te("POST","/api/storage/integrity/check",e?{deep:!0}:{})}},files:{list(e){return Te("GET",`/api/files${Wr({...e})}`)},get(e){return Te("GET",cr(e))},versions(e){return Te("GET",cr(e,"/versions"))},update(e,n){return Te("PATCH",cr(e),n)},move(e,n){return Te("POST",cr(e,"/move"),{folderId:n})},trash(e){return Te("POST",cr(e,"/trash"))},restore(e){return Te("POST",cr(e,"/restore"))},delete(e){return P2("DELETE",cr(e))},batch(e){return Te("POST","/api/files/batch",e)},download(e){const n=document.createElement("a");n.href=cr(e,"/download"),n.rel="noopener",document.body.appendChild(n),n.click(),n.remove()}},folders:{list(e){return Te("GET",`/api/folders${Wr({...e})}`)},tree(){return Te("GET","/api/folders/tree")},create(e,n){return Te("POST","/api/folders",{name:e,parentId:n})},update(e,n){return Te("PATCH",no(e),n)},move(e,n){return Te("POST",no(e,"/move"),{parentId:n})},trash(e){return Te("POST",no(e,"/trash"))},restore(e){return Te("POST",no(e,"/restore"))},delete(e){return Te("DELETE",no(e))},batch(e){return Te("POST","/api/folders/batch",e)}},trash:{list(e){return Te("GET",`/api/trash${Wr({...e})}`)},empty(){return Te("POST","/api/trash/empty")}},starred:{list(e){return Te("GET",`/api/starred${Wr({...e})}`)}},recent:{list(e){return Te("GET",`/api/recent${Wr({...e})}`)}},search:{query(e,n={}){return Te("GET",`/api/search${Wr({q:e,...n})}`)}},activity:{list(e){return Te("GET",`/api/activity${Wr({...e})}`)}}},gf=S.createContext({});function yf(e){const n=S.useRef(null);return n.current===null&&(n.current=e()),n.current}const N2=typeof window<"u",mo=N2?S.useLayoutEffect:S.useEffect,Ml=S.createContext(null);function vf(e,n){e.indexOf(n)===-1&&e.push(n)}function gl(e,n){const s=e.indexOf(n);s>-1&&e.splice(s,1)}const $n=(e,n,s)=>s>n?n:s<e?e:s;let Rl=()=>{};const zn={},xf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Q0=e=>typeof e=="object"&&e!==null,wf=e=>/^0[^.\s]+$/u.test(e);function q0(e){let n;return()=>(n===void 0&&(n=e()),n)}const ln=e=>e,bo=(...e)=>e.reduce((n,s)=>i=>s(n(i))),go=(e,n,s)=>{const i=n-e;return i?(s-e)/i:1};class yl{constructor(){this.subscriptions=[]}add(n){return vf(this.subscriptions,n),()=>this.remove(n)}remove(n){gl(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 c=0;c<a;c++){const u=this.subscriptions[c];u&&u(n,s,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Wt=e=>e*1e3,$t=e=>e/1e3,G0=(e,n)=>n?e*(1e3/n):0,Y0=(e,n,s)=>(((1-3*s+3*n)*e+(3*s-6*n))*e+3*n)*e,b2=1e-7,M2=12;function R2(e,n,s,i,a){let c,u,h=0;do u=n+(s-n)/2,c=Y0(u,i,a)-e,c>0?s=u:n=u;while(Math.abs(c)>b2&&++h<M2);return u}function Mo(e,n,s,i){if(e===n&&s===i)return ln;const a=c=>R2(c,0,1,e,s);return c=>c===0||c===1?c:Y0(a(c),n,i)}const X0=e=>n=>n<=.5?e(2*n)/2:(2-e(2*(1-n)))/2,Z0=e=>n=>1-e(1-n),J0=Mo(.33,1.53,.69,.99),Sf=Z0(J0),ex=X0(Sf),tx=e=>e>=1?1:(e*=2)<1?.5*Sf(e):.5*(2-Math.pow(2,-10*(e-1))),kf=e=>1-Math.sin(Math.acos(e)),nx=Z0(kf),rx=X0(kf),D2=Mo(.42,0,1,1),A2=Mo(0,0,.58,1),Cf=Mo(.42,0,.58,1),L2=e=>Array.isArray(e)&&typeof e[0]!="number",sx=e=>Array.isArray(e)&&typeof e[0]=="number",O2={linear:ln,easeIn:D2,easeInOut:Cf,easeOut:A2,circIn:kf,circInOut:rx,circOut:nx,backIn:Sf,backInOut:ex,backOut:J0,anticipate:tx},I2=e=>typeof e=="string",Ag=e=>{if(sx(e)){Rl(e.length===4);const[n,s,i,a]=e;return Mo(n,s,i,a)}else if(I2(e))return O2[e];return e},Je={delta:0,timestamp:0,isProcessing:!1};let rl;function _2(){rl=void 0}const lt={now:()=>(rl===void 0&&lt.set(Je.isProcessing||zn.useManualTiming?Je.timestamp:performance.now()),rl),set:e=>{rl=e,queueMicrotask(_2)}},Bs=e=>Math.round(e*1e5)/1e5,ix=e=>n=>typeof n=="string"&&n.startsWith(e),ox=ix("--"),F2=ix("var(--"),Ef=e=>F2(e)?V2.test(e.split("/*")[0].trim()):!1,V2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Lg(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const hi={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},yo={...hi,transform:e=>$n(0,1,e)},qa={...hi,default:1},jf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function z2(e){return e==null}const U2=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Tf=(e,n)=>s=>!!(typeof s=="string"&&U2.test(s)&&s.startsWith(e)||n&&!z2(s)&&Object.prototype.hasOwnProperty.call(s,n)),ax=(e,n,s)=>i=>{if(typeof i!="string")return i;const[a,c,u,h]=i.match(jf);return{[e]:parseFloat(a),[n]:parseFloat(c),[s]:parseFloat(u),alpha:h!==void 0?parseFloat(h):1}},B2=e=>$n(0,255,e),Bc={...hi,transform:e=>Math.round(B2(e))},qr={test:Tf("rgb","red"),parse:ax("red","green","blue"),transform:({red:e,green:n,blue:s,alpha:i=1})=>"rgba("+Bc.transform(e)+", "+Bc.transform(n)+", "+Bc.transform(s)+", "+Bs(yo.transform(i))+")"};function $2(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 Md={test:Tf("#"),parse:$2,transform:qr.transform},Ro=e=>({test:n=>typeof n=="string"&&n.endsWith(e)&&n.split(" ").length===1,parse:parseFloat,transform:n=>`${n}${e}`}),Ln=Ro("deg"),Cn=Ro("%"),ie=Ro("px"),K2=Ro("vh"),W2=Ro("vw"),Og={...Cn,parse:e=>Cn.parse(e)/100,transform:e=>Cn.transform(e*100)},Vs={test:Tf("hsl","hue"),parse:ax("hue","saturation","lightness"),transform:({hue:e,saturation:n,lightness:s,alpha:i=1})=>"hsla("+Math.round(e)+", "+Cn.transform(Bs(n))+", "+Cn.transform(Bs(s))+", "+Bs(yo.transform(i))+")"},et={test:e=>qr.test(e)||Md.test(e)||Vs.test(e),parse:e=>qr.test(e)?qr.parse(e):Vs.test(e)?Vs.parse(e):Md.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?qr.transform(e):Vs.transform(e),getAnimatableNone:e=>{const n=et.parse(e);return n.alpha=0,et.transform(n)}},H2=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,lx=new RegExp(jf.source),ux=new RegExp(H2.source,"i");function Q2(e){return isNaN(e)&&typeof e=="string"&&(lx.test(e)||ux.test(e))}const cx="number",dx="color",q2="var",G2="var(",Ig="${}",Y2=/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 X2(e){const n=e.toString();return lx.test(n)||ux.test(n)}function vo(e){const n=e.toString(),s=[],i={color:[],number:[],var:[]},a=[];let c=0;const h=n.replace(Y2,m=>(et.test(m)?(i.color.push(c),a.push(dx),s.push(et.parse(m))):m.startsWith(G2)?(i.var.push(c),a.push(q2),s.push(m)):(i.number.push(c),a.push(cx),s.push(parseFloat(m))),++c,Ig)).split(Ig);return{values:s,split:h,indexes:i,types:a}}function Z2(e){return vo(e).values}function fx({split:e,types:n}){const s=e.length;return i=>{let a="";for(let c=0;c<s;c++)if(a+=e[c],i[c]!==void 0){const u=n[c];u===cx?a+=Bs(i[c]):u===dx?a+=et.transform(i[c]):a+=i[c]}return a}}function J2(e){return fx(vo(e))}const eE=e=>typeof e=="number"?0:et.test(e)?et.getAnimatableNone(e):e,tE=(e,n)=>typeof e=="number"?n!=null&&n.trim().endsWith("/")?e:0:eE(e);function nE(e){const n=vo(e);return fx(n)(n.values.map((i,a)=>tE(i,n.split[a])))}const Ot={test:Q2,parse:Z2,createTransformer:J2,getAnimatableNone:nE};function $c(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 rE({hue:e,saturation:n,lightness:s,alpha:i}){e/=360,n/=100,s/=100;let a=0,c=0,u=0;if(!n)a=c=u=s;else{const h=s<.5?s*(1+n):s+n-s*n,m=2*s-h;a=$c(m,h,e+1/3),c=$c(m,h,e),u=$c(m,h,e-1/3)}return{red:Math.round(a*255),green:Math.round(c*255),blue:Math.round(u*255),alpha:i}}function vl(e,n){return s=>s>0?n:e}const Me=(e,n,s)=>e+(n-e)*s,Kc=(e,n,s)=>{const i=e*e,a=s*(n*n-i)+i;return a<0?0:Math.sqrt(a)},sE=[Md,qr,Vs],iE=e=>sE.find(n=>n.test(e));function _g(e){const n=iE(e);if(!n)return!1;let s=n.parse(e);return n===Vs&&(s=rE(s)),s}const Fg=(e,n)=>{const s=_g(e),i=_g(n);if(!s||!i)return vl(e,n);const a={...s};return c=>(a.red=Kc(s.red,i.red,c),a.green=Kc(s.green,i.green,c),a.blue=Kc(s.blue,i.blue,c),a.alpha=Me(s.alpha,i.alpha,c),qr.transform(a))},Rd=new Set(["none","hidden"]);function oE(e,n){return Rd.has(e)?s=>s<=0?e:n:s=>s>=1?n:e}function aE(e,n){return s=>Me(e,n,s)}function Pf(e){return typeof e=="number"?aE:typeof e=="string"?Ef(e)?vl:et.test(e)?Fg:cE:Array.isArray(e)?hx:typeof e=="object"?et.test(e)?Fg:lE:vl}function hx(e,n){const s=[...e],i=s.length,a=e.map((c,u)=>Pf(c)(c,n[u]));return c=>{for(let u=0;u<i;u++)s[u]=a[u](c);return s}}function lE(e,n){const s={...e,...n},i={};for(const a in s)e[a]!==void 0&&n[a]!==void 0&&(i[a]=Pf(e[a])(e[a],n[a]));return a=>{for(const c in i)s[c]=i[c](a);return s}}function uE(e,n){const s=[],i={color:0,var:0,number:0};for(let a=0;a<n.values.length;a++){const c=n.types[a],u=e.indexes[c][i[c]],h=e.values[u]??0;s[a]=h,i[c]++}return s}const cE=(e,n)=>{const s=Ot.createTransformer(n),i=vo(e),a=vo(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?Rd.has(e)&&!a.values.length||Rd.has(n)&&!i.values.length?oE(e,n):bo(hx(uE(i,a),a.values),s):vl(e,n)},Vg=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function dE(e,n){const s=Vg.exec(e);if(!s)return;const i=Vg.exec(n);if(!i||s[2]!==i[2])return;const a=s[2],c=parseFloat(s[1]),u=parseFloat(i[1]);return h=>Bs(Me(c,u,h))+a}function Nf(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=dE(e,n);if(a)return a}return Pf(e)(e,n)}const Ga=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function fE(e){let n=new Set,s=new Set,i=!1,a=!1;const c=new Set;let u={delta:0,timestamp:0,isProcessing:!1};function h(g){c.has(g)&&(s.add(g),e()),g(u)}const m={schedule:(g,y=!1,v=!1)=>{const C=v&&i?n:s;return y&&c.add(g),C.add(g),g},cancel:g=>{s.delete(g),c.delete(g)},process:g=>{if(u=g,i){a=!0;return}i=!0;const y=n;n=s,s=y,n.forEach(h),n.clear(),i=!1,a&&(a=!1,m.process(g))}};return m}const hE=40;function px(e,n,s={delta:0,timestamp:0,isProcessing:!1}){let i=!1,a=!0;const c=()=>i=!0,u=Ga.reduce((b,O)=>(b[O]=fE(c),b),{}),{setup:h,read:m,resolveKeyframes:g,preUpdate:y,update:v,preRender:x,render:C,postRender:k}=u,T=()=>{const b=zn.useManualTiming,O=b?s.timestamp:performance.now();i=!1,b||(s.delta=a?1e3/60:Math.max(Math.min(O-s.timestamp,hE),1)),s.timestamp=O,s.isProcessing=!0,h.process(s),m.process(s),g.process(s),y.process(s),v.process(s),x.process(s),C.process(s),k.process(s),s.isProcessing=!1,i&&n&&(a=!1,e(T))},E=()=>{i=!0,a=!0,s.isProcessing||e(T)};return{schedule:Ga.reduce((b,O)=>{const z=u[O];return b[O]=(B,L=!1,F=!1)=>(i||E(),z.schedule(B,L,F)),b},{}),cancel:b=>{for(let O=0;O<Ga.length;O++)u[Ga[O]].cancel(b)},state:s,steps:u}}const{schedule:Re,cancel:Pr,steps:Wc}=px(typeof requestAnimationFrame<"u"?requestAnimationFrame:ln,!0,Je),pE=e=>{const n=({timestamp:s})=>e(s);return{start:(s=!0)=>Re.update(n,s),stop:()=>Pr(n),now:()=>Je.isProcessing?Je.timestamp:lt.now()}},mx=(e,n,s=10)=>{let i="";const a=Math.max(Math.round(n/s),2);for(let c=0;c<a;c++)i+=Math.round(e(c/(a-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},bf=2e4;function Mf(e,n=50,s=bf,i){let a=0,c=e.next(a);for(;!c.done&&a<s;)a+=n,c=e.next(a);return a>=s?1/0:a}function mE(e,n=100,s){const i=s({...e,keyframes:[0,n]}),a=Math.min(Mf(i),bf);return{type:"keyframes",ease:c=>i.next(a*c).value/n,duration:$t(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},gx=e=>e<0?1/Math.max(1+e,at.minDamping):Math.max(1-e,at.minDamping);function yx(e,n){if(!(e>1))return 1;const s=Math.sqrt(e*e-1),i=e-s,a=e+s,c=2*s*Math.exp(-n)*(1+n);return vx(u=>a*Math.exp(-i*u)-i*Math.exp(-a*u)-c,u=>Math.exp(-a*u)-Math.exp(-i*u),n)/n}function Dd(e,n){return e*Math.sqrt(1-n*n)}const gE=12;function vx(e,n,s){let i=s;for(let a=1;a<gE;a++)i=i-e(i)/n(i);return i}const Hc=.001;function yE({duration:e=at.duration,bounce:n=at.bounce}){let s,i;const a=gx(n);e=$n(at.minDuration,at.maxDuration,$t(e)),a<1?(s=g=>{const y=g*a,v=y*e,x=Dd(g,a),C=Math.exp(-v);return Hc-y/x*C},i=g=>{const v=g*a*e,x=a*a*g*g*e,C=Math.exp(-v),k=Dd(g*g,a);return(-s(g)+Hc>0?-1:1)*-x*C/k}):(s=g=>{const y=Math.exp(-g*e),v=g*e+1;return-Hc+y*v},i=g=>{const y=Math.exp(-g*e),v=-g*(e*e);return y*v});const c=5/e,u=vx(s,i,c),h=u*yx(a,u*e),m=h*h;return{stiffness:m,damping:a*2*Math.sqrt(m),duration:Wt(e)}}const Ad=(e,n)=>(n?e>=0:e>0)&&e<1/0;function Qc(e,n){if(Ad(e,n))return e}function vE(e){const n=Qc(e.stiffness),s=Qc(e.damping,!0),i=Qc(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 c=gx(e.bounce||0),u=2*Math.PI/(e.visualDuration*1.2)*yx(c,2*Math.PI/1.2);a.stiffness=u*u,a.damping=2*c*Math.sqrt(a.stiffness)}else Object.assign(a,yE(a)),a.isResolvedFromDuration=!0;(!Ad(a.stiffness)||!Ad(a.damping,!0))&&(a.stiffness=at.stiffness,a.damping=at.damping)}return a}function xl(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],c={done:!1,value:i},{stiffness:u,damping:h,mass:m,duration:g,isResolvedFromDuration:y,isTimeDefined:v}=vE({...s}),x=L=>v?0:-$t(L),C=h/(2*Math.sqrt(u*m)),k=$t(Math.sqrt(u/m)),T=C*k,E={target:a,delta:a-i,velocity:x(s.velocity||0)||0,restSpeed:0,restDelta:0},A=()=>{const L=Math.abs(E.delta)<5;E.restSpeed=s.restSpeed||(L?at.restSpeed.granular:at.restSpeed.default),E.restDelta=s.restDelta||(L?at.restDelta.granular:at.restDelta.default)};A();let I,b,O;if(C<1){const L=Dd(k,C),F={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};O=()=>{F.A=(E.velocity+T*E.delta)/L,F.sinC=T*F.A+E.delta*L,F.cosC=T*E.delta-F.A*L};const $=Y=>{Y!==F.t&&(F.t=Y,F.env=Math.exp(-T*Y),F.sin=Math.sin(L*Y),F.cos=Math.cos(L*Y))};I=Y=>($(Y),E.target-F.env*(F.A*F.sin+E.delta*F.cos)),b=Y=>($(Y),F.env*(F.sinC*F.sin+F.cosC*F.cos))}else if(C===1){I=F=>E.target-Math.exp(-k*F)*(E.delta+(E.velocity+k*E.delta)*F);const L={C:0};O=()=>{L.C=E.velocity+k*E.delta},b=F=>Math.exp(-k*F)*(k*L.C*F-E.velocity)}else{const L=k*Math.sqrt(C*C-1),F=T-L,$=T+L,Y=v?1/0:300/L,ne=(Z,fe)=>Math.exp(fe>Y?-Z*Y-T*(fe-Y):-Z*fe),G={S:0,F:0};O=()=>{const Z=(E.velocity+T*E.delta)/L;G.S=(E.delta+Z)/2,G.F=(E.delta-Z)/2},I=Z=>E.target-G.S*ne(F,Z)-G.F*ne($,Z),b=Z=>F*G.S*ne(F,Z)+$*G.F*ne($,Z)}O();const z=y&&g||null,B={calculatedDuration:z,retarget:(L,F)=>{E.target=L[L.length-1],E.delta=E.target-L[0],E.velocity=x(F),s.restSpeed&&s.restDelta||A(),B.calculatedDuration=z,c.done=!1,O()},velocity:L=>Wt(b(L)),next:L=>{const F=I(L);if(y)c.done=L>=g;else{const $=Wt(b(L));c.done=Math.abs($)<=E.restSpeed&&Math.abs(E.target-F)<=E.restDelta}return c.value=c.done?E.target:F,c},toString:()=>{const L=Math.min(Mf(B),bf),F=mx($=>B.next(L*$).value,L,30);return L+"ms "+F},toTransition:()=>{}};return B}xl.applyToOptions=e=>{const n=mE(e,100,xl);return e.ease=n.ease,e.duration=Wt(n.duration),e.type="keyframes",e};function Ld({keyframes:e,velocity:n=0,power:s=.8,timeConstant:i=325,bounceDamping:a=10,bounceStiffness:c=500,modifyTarget:u,min:h,max:m,restDelta:g=.5,restSpeed:y}){const v=e[0],x={done:!1,value:v},C=L=>L<h||L>m,k=L=>h===void 0?m:m===void 0||Math.abs(h-L)<Math.abs(m-L)?h:m;let T=s*n;const E=v+T,A=u===void 0?E:u(E);A!==E&&(T=A-v);const I=L=>-T*Math.exp(-L/i),b=L=>{const F=I(L);x.done=Math.abs(F)<=g,x.value=x.done?A:A+F};let O,z;const B=L=>{C(x.value)&&(O=L,z=xl({keyframes:[x.value,k(x.value)],velocity:-I(L)/i*1e3,damping:a,stiffness:c,restDelta:g,restSpeed:y}))};return B(0),{calculatedDuration:null,next:L=>{let F=!1;return!z&&O===void 0&&(F=!0,b(L),B(L)),O!==void 0&&L>=O?z.next(L-O):(!F&&b(L),x)}}}function xE(e,n,s){const i=[],a=s||zn.mix||Nf,c=e.length-1;for(let u=0;u<c;u++){let h=a(e[u],e[u+1]);if(n){const m=Array.isArray(n)?n[u]||ln:n;h=bo(m,h)}i.push(h)}return i}function wE(e,n,{clamp:s=!0,ease:i,mixer:a}={}){const c=e.length;if(Rl(c===n.length),c===1)return()=>n[0];if(c===2&&n[0]===n[1])return()=>n[1];const u=e[0]===e[1];e[0]>e[c-1]&&(e=[...e].reverse(),n=[...n].reverse());const h=xE(n,i,a),m=h.length,g=y=>{if(u&&y<e[0])return n[0];let v=0;if(m>1)for(;v<e.length-2&&!(y<e[v+1]);v++);const x=go(e[v],e[v+1],y);return h[v](x)};return s?y=>g($n(e[0],e[c-1],y)):g}function SE(e,n){const s=e[e.length-1];for(let i=1;i<=n;i++){const a=go(0,n,i);e.push(Me(s,1,a))}}function kE(e){const n=[0];return SE(n,e.length-1),n}function CE(e,n){return e.map(s=>s*n)}function EE(e,n){return e.map(()=>n||Cf).splice(0,e.length-1)}function lo({duration:e=300,keyframes:n,times:s,ease:i="easeInOut"}){const a=L2(i)?i.map(Ag):Ag(i)||Cf,c={done:!1,value:n[0]};if(n.length===2&&!Array.isArray(a)&&(!s||s.length!==2||s[0]===0&&s[1]===1)){const[m,g]=n,y=m===g?void 0:(zn.mix||Nf)(m,g);return{calculatedDuration:e,next:v=>(c.value=y?y(a(e>0?$n(0,1,v/e):1)):g,c.done=v>=e,c)}}const u=CE(s&&s.length===n.length?s:kE(n),e),h=wE(u,n,{ease:Array.isArray(a)?a:EE(n,a)});return{calculatedDuration:e,next:m=>(c.value=h(m),c.done=m>=e,c)}}const jE=5;function TE(e,n,s){const i=Math.max(n-jE,0);return G0(s-e(i),n-i)}function PE(e,n,s=0){return n<=0?s:e.velocity?e.velocity(n):TE(i=>e.next(i).value,n,e.next(n).value)}const NE=e=>e!==null;function Dl(e,{repeat:n,repeatType:s="loop"},i,a=1){const c=e.filter(NE),h=a<0||n&&s!=="loop"&&n%2===1?0:c.length-1;return!h||i===void 0?c[h]:i}const bE={decay:Ld,inertia:Ld,tween:lo,keyframes:lo,spring:xl};function xx(e){typeof e.type=="string"&&(e.type=bE[e.type])}function wx(e,n){return{kind:e,animation:n,timestamp:lt.now(),frameTimestamp:Je.timestamp,frameIsProcessing:Je.isProcessing}}function Sx(e,n,s){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...wx("animation-start",e),options:s?{...n,...s}:n})}catch{}}function ME(e,n){const s=globalThis.__MOTION_INSPECT__;if(s)try{s({...wx("layout-animation-start",e),node:n})}catch{}}class Rf{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 RE=e=>e/100;class wl extends Rf{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(),Sx(this,this.options)}initAnimation(){const{options:n}=this;xx(n);const{type:s=lo,repeat:i=0,repeatDelay:a=0,repeatType:c,velocity:u=0}=n;let{keyframes:h}=n;const m=s||lo;m!==lo&&typeof h[0]!="number"&&(this.mixKeyframes=bo(RE,Nf(h[0],h[1])),h=[0,100]);const g=m(h===n.keyframes?n:{...n,keyframes:h});c==="mirror"&&(this.mirroredGenerator=m({...n,keyframes:[...h].reverse(),velocity:-u})),g.calculatedDuration===null&&(g.calculatedDuration=Mf(g));const{calculatedDuration:y}=g;this.calculatedDuration=y,this.resolvedDuration=y+a,this.totalDuration=this.resolvedDuration*(i+1)-a,this.generator=g}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:c,mirroredGenerator:u,resolvedDuration:h,calculatedDuration:m}=this;if(this.startTime===null)return i.next(0);const{delay:g=0,keyframes:y,repeat:v,repeatType:x,repeatDelay:C,type:k,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 A=this.currentTime-g*(this.playbackSpeed>=0?1:-1),I=this.playbackSpeed>=0?A<0:A>a;this.currentTime=Math.max(A,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let b=this.currentTime,O=i;if(v){const F=Math.min(this.currentTime,a)/h;let $=Math.floor(F),Y=F%1;!Y&&F>=1&&(Y=1),Y===1&&$--,$=Math.min($,v+1),!!($%2)&&(x==="reverse"?(Y=1-Y,C&&(Y-=C/h)):x==="mirror"&&(O=u)),b=$n(0,1,Y)*h}let z;I?(this.delayState.value=y[0],z=this.delayState):z=O.next(b),c&&!I&&(z.value=c(z.value));let{done:B}=z;!I&&m!==null&&(B=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&B);return L&&k!==Ld&&(z.value=Dl(y,this.options,E,this.speed)),T&&T(z.value),L&&this.finish(),z}then(n,s){return this.finished.then(n,s)}get duration(){return $t(this.calculatedDuration)}get iterationDuration(){const{delay:n=0}=this.options||{};return this.duration+$t(n)}get time(){return $t(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 PE(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=$t(this.currentTime))}play(){var a,c;if(this.isStopped)return;const{driver:n=pE,startTime:s}=this.options;this.driver||(this.driver=n(u=>this.tick(u))),(c=(a=this.options).onPlay)==null||c.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 DE=new Set(["brightness","contrast","saturate","opacity"]);function AE(e){const[n,s]=e.slice(0,-1).split("(");if(n==="drop-shadow")return e;const[i]=s.match(jf)||[];if(!i)return e;const a=s.replace(i,"");let c=DE.has(n)?1:0;return i!==s&&(c*=100),n+"("+c+a+")"}const LE=/\b([a-z-]*)\(.*?\)/gu,Od={...Ot,getAnimatableNone:e=>{const n=e.match(LE);return n?n.map(AE).join(" "):e}},Id={...Ot,getAnimatableNone:e=>{const n=Ot.parse(e);return Ot.createTransformer(e)(n.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},zg={...hi,transform:Math.round},OE={rotate:Ln,pathRotation:Ln,rotateX:Ln,rotateY:Ln,rotateZ:Ln,scale:qa,scaleX:qa,scaleY:qa,scaleZ:qa,skew:Ln,skewX:Ln,skewY:Ln,distance:ie,translateX:ie,translateY:ie,translateZ:ie,x:ie,y:ie,z:ie,perspective:ie,transformPerspective:ie,opacity:yo,originX:Og,originY:Og,originZ:ie},Sl={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,...OE,zIndex:zg,fillOpacity:yo,strokeOpacity:yo,numOctaves:zg},IE={...Sl,color:et,backgroundColor:et,outlineColor:et,fill:et,stroke:et,borderColor:et,borderTopColor:et,borderRightColor:et,borderBottomColor:et,borderLeftColor:et,filter:Od,WebkitFilter:Od,mask:Id,WebkitMask:Id},kx=e=>IE[e],_E=new Set([Od,Id]);function Df(e,n){let s=kx(e);return _E.has(s)||(s=Ot),s.getAnimatableNone?s.getAnimatableNone(n):void 0}function FE(e){for(let n=1;n<e.length;n++)e[n]??(e[n]=e[n-1])}const Gr=e=>e*180/Math.PI,_d=e=>{const n=Gr(Math.atan2(e[1],e[0]));return Fd(n)},VE={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:_d,rotateZ:_d,skewX:e=>Gr(Math.atan(e[1])),skewY:e=>Gr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Fd=e=>(e=e%360,e<0&&(e+=360),e),Ug=_d,Bg=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),$g=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),zE={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bg,scaleY:$g,scale:e=>(Bg(e)+$g(e))/2,rotateX:e=>Fd(Gr(Math.atan2(e[6],e[5]))),rotateY:e=>Fd(Gr(Math.atan2(-e[2],e[0]))),rotateZ:Ug,rotate:Ug,skewX:e=>Gr(Math.atan(e[4])),skewY:e=>Gr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function xo(e){return e.includes("scale")?1:0}function Vd(e,n){if(!e||e==="none")return xo(n);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,a;if(s)i=zE,a=s;else{const h=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=VE,a=h}if(!a)return xo(n);const c=i[n],u=a[1].split(",").map(BE);return typeof c=="function"?c(u):u[c]}const UE=(e,n)=>{const{transform:s="none"}=getComputedStyle(e);return Vd(s,n)};function BE(e){return parseFloat(e.trim())}const pi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Tr=new Set([...pi,"pathRotation"]),Kg=e=>e===hi||e===ie,$E=new Set(["x","y","z"]),KE=pi.filter(e=>!$E.has(e));function WE(e){const n=[];return KE.forEach(s=>{const i=e.getValue(s);if(i!==void 0){const a=i.get(),c=s.startsWith("scale")?1:0;if(a===c)return;n.push([s,a]),i.set(c)}}),n}const HE=new Set(["bottom","right"]);function Wg(e,n,s,i,a,c){const u=parseFloat(e);if(!isNaN(u))return u;const{min:h,max:m}=n()[s],g=m-h;return c==="border-box"?g:g-parseFloat(i)-parseFloat(a)}const is={width:({width:e,paddingLeft:n="0",paddingRight:s="0",boxSizing:i},a)=>Wg(e,a,"x",n,s,i),height:({height:e,paddingTop:n="0",paddingBottom:s="0",boxSizing:i},a)=>Wg(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})=>Vd(e,"x"),y:({transform:e})=>Vd(e,"y")};is.translateX=is.x;is.translateY=is.y;const os=new Set;let zd=!1,Ud=!1,Bd=!1;function Cx(){if(Ud){const e=[],n=new Set,s=new Set;os.forEach(a=>{a.needsMeasurement&&(e.push(a),n.add(a.element),HE.has(a.name)&&s.add(a.element))});const i=new Map;s.forEach(a=>{const c=WE(a);c.length&&(i.set(a,c),a.render())}),e.forEach(a=>a.measureInitialState()),n.forEach(a=>{a.render();const c=i.get(a);c&&c.forEach(([u,h])=>{var m;(m=a.getValue(u))==null||m.set(h)})}),e.forEach(a=>a.measureEndState()),e.forEach(a=>{a.suspendedScrollY!==void 0&&window.scrollTo(0,a.suspendedScrollY)})}Ud=!1,zd=!1,os.forEach(e=>e.complete(Bd)),os.clear()}function Ex(){os.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ud=!0)})}function QE(){Bd=!0,Ex(),Cx(),Bd=!1}function qE(e,n,s){if(typeof e=="string"){if(xf(e)||wf(e))return parseFloat(e);if(!Ot.test(e)&&Ot.test(s))return Df(n,s)}return e??void 0}class Af{constructor(n,s,i,a,c,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...n],this.onComplete=s,this.name=i,this.motionValue=a,this.element=c,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(os.add(this),zd||(zd=!0,Re.read(Ex),Re.resolveKeyframes(Cx))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:n,name:s,element:i,motionValue:a}=this;if(n[0]===null){const c=a==null?void 0:a.get(),u=n[n.length-1];if(c!==void 0)n[0]=c;else if(i&&s){const h=qE(i.readValue(s,u),s,u);h!==void 0&&(n[0]=h)}n[0]===void 0&&(n[0]=u),a&&c===void 0&&a.set(n[0])}FE(n)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(n=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,n),os.delete(this)}cancel(){this.state==="scheduled"&&(os.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const GE=e=>e.startsWith("--");function jx(e,n,s){GE(n)?e.style.setProperty(n,s):e.style[n]=s}const YE={};function Tx(e,n){const s=q0(e);return()=>YE[n]??s()}const XE=Tx(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Px=Tx(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ao=([e,n,s,i])=>`cubic-bezier(${e}, ${n}, ${s}, ${i})`,Hg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ao([0,.65,.55,1]),circOut:ao([.55,0,1,.45]),backIn:ao([.31,.01,.66,-.59]),backOut:ao([.33,1.53,.69,.99])};function Nx(e,n){if(e)return typeof e=="function"?Px()?mx(e,n):"ease-out":sx(e)?ao(e):Array.isArray(e)?e.map(s=>Nx(s,n)||Hg.easeOut):Hg[e]}function ZE(e,n,s,{delay:i=0,duration:a=300,repeat:c=0,repeatType:u="loop",ease:h="easeOut",times:m}={},g=void 0){const y={[n]:s};m&&(y.offset=m);const v=Nx(h,a);Array.isArray(v)&&(y.easing=v);const x={delay:i,duration:a,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:c+1,direction:u==="reverse"?"alternate":"normal"};return g&&(x.pseudoElement=g),e.animate(y,x)}function bx(e){return typeof e=="function"&&"applyToOptions"in e}function JE({type:e,...n}){return bx(e)&&Px()?e.applyToOptions(n):(n.duration??(n.duration=300),n.ease??(n.ease="easeOut"),n)}class Mx extends Rf{constructor(n){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!n)return;const{element:s,name:i,keyframes:a,pseudoElement:c,allowFlatten:u=!1,finalKeyframe:h,onComplete:m}=n;this.isPseudoElement=!!c,this.allowFlatten=u,this.options=n,Rl(typeof n.type!="string");const g=JE(n);this.animation=ZE(s,i,a,g,c),g.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!c){const y=Dl(a,this.options,h,this.speed);this.updateMotionValue&&this.updateMotionValue(y),jx(s,i,y),this.animation.cancel()}m==null||m(),this.notifyFinished()},Sx(this,n,g)}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 $t(Number(n))}get iterationDuration(){const{delay:n=0}=this.options||{};return this.duration+$t(n)}get time(){return $t(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 c;return this.allowFlatten&&((c=this.animation.effect)==null||c.updateTiming({easing:"linear"})),this.animation.onfinish=null,n&&XE()?(this.animation.timeline=n,Object.assign(this.animation,a),s==null||s(this.animation),ln):i(this)}}const Rx={anticipate:tx,backInOut:ex,circInOut:rx};function ej(e){return e in Rx}function tj(e){typeof e.ease=="string"&&ej(e.ease)&&(e.ease=Rx[e.ease])}const qc=10;class nj extends Mx{constructor(n){tj(n),xx(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:c,...u}=this.options;if(!s)return;if(n!==void 0){s.set(n);return}const h=new wl({...u,autoplay:!1}),m=Math.max(qc,lt.now()-this.startTime),g=$n(0,qc,m-qc),y=h.sample(m).value,{name:v}=this.options;c&&v&&jx(c,v,y),s.setWithVelocity(h.sample(Math.max(0,m-g)).value,y,g),h.stop()}}const Qg=(e,n)=>n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ot.test(e)||e==="0")&&!e.startsWith("url("));function rj(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 sj(e,n,s,i){const a=e[0];if(a===null)return!1;if(n==="display"||n==="visibility")return!0;const c=e[e.length-1],u=Qg(a,n),h=Qg(c,n);return!u||!h?!1:rj(e)||(s==="spring"||bx(s))&&i}function $d(e){e.duration=0,e.type="keyframes"}const Kd=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),ij=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function oj(e){for(let n=0;n<e.length;n++)if(typeof e[n]=="string"&&ij.test(e[n]))return!0;return!1}const qg=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),aj=q0(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function lj(e){var v;const{motionValue:n,name:s,repeatDelay:i,repeatType:a,damping:c,type:u,keyframes:h}=e;if(!s||!(Kd.has(s)||qg.has(s)))return!1;const m=(v=n==null?void 0:n.owner)==null?void 0:v.current;if(!(m instanceof HTMLElement)&&!(m instanceof SVGElement))return!1;const{onUpdate:g,transformTemplate:y}=n.owner.getProps();return aj()&&(Kd.has(s)||qg.has(s)&&oj(h))&&(s!=="transform"||!y)&&!g&&!i&&a!=="mirror"&&c!==0&&u!=="inertia"}const uj=40;class cj extends Rf{constructor(n){var m;super(),this.stop=()=>{var g,y;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=lt.now();const{keyframes:s,name:i,motionValue:a,element:c}=n,u=n;u.autoplay??(u.autoplay=!0),u.delay??(u.delay=0),u.type??(u.type="keyframes"),u.repeat??(u.repeat=0),u.repeatDelay??(u.repeatDelay=0),u.repeatType??(u.repeatType="loop");const h=(c==null?void 0:c.KeyframeResolver)||Af;this.keyframeResolver=new h(s,(g,y,v)=>this.onKeyframesResolved(g,y,u,!v),i,a,c),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(n,s,i,a){var E,A;this.keyframeResolver=void 0;const{name:c,type:u,velocity:h,delay:m,isHandoff:g,onUpdate:y}=i;this.resolvedAt=lt.now();let v=!0;sj(n,c,u,h)||(v=!1,(zn.instantAnimations||!m)&&(y==null||y(Dl(n,i,s))),n[0]=n[n.length-1],$d(i),i.repeat=0);const x=a?this.resolvedAt?this.resolvedAt-this.createdAt>uj?this.resolvedAt:this.createdAt:this.createdAt:void 0,{onComplete:C}=i;i.startTime??(i.startTime=x),i.finalKeyframe=s,i.keyframes=n,i.onComplete=()=>{C==null||C(),this.notifyFinished()};const k=v&&!g&&lj(i);let T;if(k){i.element=(A=(E=i.motionValue)==null?void 0:E.owner)==null?void 0:A.current;try{T=new nj(i)}catch{T=new wl(i)}}else T=new wl(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(),QE()),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 Dx(e,n,s,i=0,a=1){const c=Array.from(e).sort((g,y)=>g.sortNodePosition(y)).indexOf(n),u=e.size,h=(u-1)*i;return typeof s=="function"?s(c,u):a===1?c*i:h-c*i}const Gg=30,dj=e=>!isNaN(parseFloat(e));class fj{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 c of this.dependents)c.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=dj(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 yl)).add(s)}onChangeSubscribe(n){const{events:s}=this;return!s.change&&!this.changeSubscriber?this.changeSubscriber=n:(s.change||(s.change=new yl,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(){Re.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>Gg)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,Gg);return G0(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(n){return this.stop(),new Promise(s=>{var c;this.hasAnimated=!0;let i=!1,a;a=n(()=>{var u;i=!0,(u=this.events.animationComplete)==null||u.notify(),this.animation===a&&this.clearAnimation(),s()}),i||(this.animation=a),(c=this.events.animationStart)==null||c.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 ii(e,n){return new fj(e,n)}function Ax(e,n){if(e!=null&&e.inherit&&n){const{inherit:s,...i}=e;return{...n,...i}}return e}function Lf(e,n){const s=(e==null?void 0:e[n])??(e==null?void 0:e.default)??e;return s!==e?Ax(s,e):s}const hj={type:"spring",stiffness:500,damping:25,restSpeed:10},pj=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),mj={type:"keyframes",duration:.8},gj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},yj=(e,{keyframes:n})=>n.length>2?mj:Tr.has(e)?e.startsWith("scale")?pj(n[1]):hj:gj,vj=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function xj(e){for(const n in e)if(!vj.has(n))return!0;return!1}const Of=(e,n,s,i={},a,c)=>u=>{const h=Lf(i,e)||{},m=h.delay||i.delay||0;let{elapsed:g=0}=i;g=g-Wt(m);const y={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:n.getVelocity(),...h,delay:-g,onUpdate:x=>{n.set(x),h.onUpdate&&h.onUpdate(x)},onComplete:()=>{u(),h.onComplete&&h.onComplete()},name:e,motionValue:n,element:c?void 0:a};xj(h)||Object.assign(y,yj(e,y)),y.duration&&(y.duration=Wt(y.duration)),y.repeatDelay&&(y.repeatDelay=Wt(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let v=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&($d(y),y.delay===0&&(v=!0)),(zn.instantAnimations||zn.skipAnimations||a!=null&&a.shouldSkipAnimations||h.skipAnimations)&&(v=!0,$d(y),y.delay=0),y.allowFlatten=!h.type&&!h.ease,v&&!c&&n.get()!==void 0){const x=Dl(y.keyframes,h);if(x!==void 0){Re.update(()=>{y.onUpdate(x),y.onComplete()});return}}return h.isSync?new wl(y):new cj(y)},wj=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Sj(e){const n=wj.exec(e);if(!n)return[,];const[,s,i,a]=n;return[`--${s??i}`,a]}function Lx(e,n,s=1){const[i,a]=Sj(e);if(!i)return;const c=window.getComputedStyle(n).getPropertyValue(i);if(c){const u=c.trim();return xf(u)?parseFloat(u):u}return Ef(a)?Lx(a,n,s+1):a}function kj(e){const n=[{},{}];return e==null||e.values.forEach((s,i)=>{n[0][i]=s.get(),n[1][i]=s.getVelocity()}),n}function Ox(e,n,s,i){const a=c=>typeof c=="function"?c(s!==void 0?s:e.custom,...kj(i)):c;return n=a(n),typeof n=="string"&&(n=e.variants&&e.variants[n]),a(n)}function as(e,n,s){return Ox(e.getProps(),n,s,e)}const Ix=(e,n)=>{var s;return n==="exit"?(s=e.presenceContext)==null?void 0:s.custom:void 0},_x=new Set(["width","height","top","left","right","bottom",...pi]),Cj=e=>Array.isArray(e);function Ej(e,n,s){e.hasValue(n)?e.getValue(n).set(s):e.addValue(n,ii(s))}function jj(e){return Cj(e)?e[e.length-1]||0:e}function Tj(e,n){const s=as(e,n);let{transitionEnd:i={},transition:a={},...c}=s||{};c={...c,...i};for(const u in c){const h=jj(c[u]);Ej(e,u,h)}}const ut=e=>!!(e&&e.getVelocity);function Pj(e){return!!(ut(e)&&e.add)}function Wd(e,n){const s=e.getValue("willChange");if(Pj(s))return s.add(n);if(!s&&zn.WillChange){const i=new zn.WillChange("auto");e.addValue("willChange",i),i.add(n)}}function If(e){return e.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`)}const Nj="framerAppearId",Fx="data-"+If(Nj);function Vx(e){return e.props[Fx]}const bj=typeof window<"u";function Mj({protectedKeys:e,needsAnimating:n},s){const i=s in e&&!n[s];return n[s]=!1,i}function zx(e,n,{delay:s=0,transitionOverride:i,type:a}={}){var k;let{transition:c,transitionEnd:u,...h}=n;const m=e.getDefaultTransition();c=c?Ax(c,m):m;const g=c==null?void 0:c.reduceMotion,y=c==null?void 0:c.skipAnimations;i&&(c=i);const v=[],x=a&&((k=e.animationState)==null?void 0:k.getState()[a]),C=c==null?void 0:c.path;C&&C.animateVisualElement(e,h,c,s,v);for(const T in h){const E=e.getValue(T,e.latestValues[T]??null),A=h[T];if(A===void 0||x&&Mj(x,T))continue;const I={delay:s,...Lf(c||{},T)};y&&(I.skipAnimations=!0);const b=E.get();if(b!==void 0&&!E.isAnimating()&&!Array.isArray(A)&&A===b&&!I.velocity){Re.update(()=>E.set(A));continue}let O=!1;if(bj&&window.MotionHandoffAnimation){const L=Vx(e);if(L){const F=window.MotionHandoffAnimation(L,T,Re);F!==null&&(I.startTime=F,O=!0)}}Wd(e,T);const z=g??e.shouldReduceMotion;E.start(Of(T,E,A,z&&_x.has(T)?{type:!1}:I,e,O));const B=E.animation;B&&v.push(B)}if(u){const T=()=>Re.update(()=>{u&&Tj(e,u)});v.length?Promise.all(v).then(T):T()}return v}function Hd(e,n,s={}){const i=as(e,n,Ix(e,s.type)),a=s.transitionOverride||((i==null?void 0:i.transition)??(e.getDefaultTransition()||{})),c=()=>Promise.all(i?zx(e,i,s):[]),u=(m=0)=>{const{variantChildren:g}=e,{delayChildren:y=0,staggerChildren:v,staggerDirection:x}=a,C=[];return g==null||g.forEach(k=>{k.notify("AnimationStart",n),C.push(Hd(k,n,{...s,delay:m+(typeof y=="function"?0:y)+Dx(g,k,y,v,x)}).then(()=>k.notify("AnimationComplete",n)))}),Promise.all(C)},{when:h}=a;return h?h==="beforeChildren"?c().then(()=>u()):u().then(c):Promise.all([c(),u(s.delay)])}function Rj(e,n,s={}){return e.notify("AnimationStart",n),(Array.isArray(n)?Promise.all(n.map(a=>Hd(e,a,s))):typeof n=="string"?Hd(e,n,s):Promise.all(zx(e,as(e,n,s.custom),s))).then(()=>{e.notify("AnimationComplete",n)})}const Dj={test:e=>e==="auto",parse:e=>e},Aj=e=>n=>n.test(e),Lj=[hi,ie,Cn,Ln,W2,K2,Dj],Yg=e=>Lj.find(Aj(e));function Oj(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||wf(e):!0}const Ij=new Set(["auto","none","0"]);function _j(e,n,s){let i=0,a;for(;i<e.length&&!a;){const c=e[i];typeof c=="string"&&!Ij.has(c)&&X2(c)&&(a=e[i]),i++}if(a&&s)for(const c of n)e[c]!==a&&(e[c]=Df(s,a))}class Fj extends Af{constructor(n,s,i,a,c){super(n,s,i,a,c,!0)}readKeyframes(){const{unresolvedKeyframes:n,element:s,name:i}=this;if(!s||!s.current)return;super.readKeyframes();for(let y=0;y<n.length;y++){let v=n[y];if(typeof v=="string"&&(v=v.trim(),Ef(v))){const x=Lx(v,s.current);x!==void 0&&(n[y]=x),y===n.length-1&&(this.finalKeyframe=v)}}if(this.resolveNoneKeyframes(),!_x.has(i)||n.length!==2)return;const[a,c]=n;if(typeof a=="number"&&typeof c=="number")return;const u=Yg(a),h=Yg(c),m=Lg(a),g=Lg(c);if(m!==g&&is[i]){this.needsMeasurement=!0;return}if(u!==h)if(Kg(u)&&Kg(h))for(let y=0;y<n.length;y++){const v=n[y];typeof v=="string"&&(n[y]=parseFloat(v))}else is[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:n,name:s}=this,i=[];for(let a=0;a<n.length;a++)(n[a]===null||Oj(n[a]))&&i.push(a);i.length&&_j(n,i,s)}measure(){const{element:n,name:s}=this;return is[s](window.getComputedStyle(n.current),()=>n.measureViewportBox())}measureInitialState(){var c;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&&((c=this.motionValue)==null||c.jump(a,!1))}measureEndState(){var c,u;const{element:n,unresolvedKeyframes:s}=this;if(!n||!n.current)return;(c=this.motionValue)==null||c.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),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([h,m])=>{n.getValue(h).set(m)}),this.resolveNoneKeyframes()}}const _f=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function sl(e){return Q0(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}function Ff(e){return Q0(e)&&"ownerSVGElement"in e}const Qd=(e,n)=>n&&typeof e=="number"?n.transform(e):e;function Ux(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 Vj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zj=pi.length;function Uj(e,n,s){let i="",a=!0;for(let u=0;u<zj;u++){const h=pi[u],m=e[h];if(m===void 0)continue;let g=!0;if(typeof m=="number")g=m===(h.startsWith("scale")?1:0);else{const y=parseFloat(m);g=h.startsWith("scale")?y===1:y===0}if(!g||s){const y=Qd(m,Sl[h]);if(!g){a=!1;const v=Vj[h]||h;i+=`${v}(${y}) `}s&&(n[h]=y)}}const c=e.pathRotation;return c&&(a=!1,i+=`rotate(${Qd(c,Sl.pathRotation)}) `),i=i.trim(),s?i=s(n,a?"":i):a&&(i="none"),i}function Vf(e,n,s){const{style:i,vars:a,transformOrigin:c}=e;let u=!1,h=!1;for(const m in n){const g=n[m];if(Tr.has(m)){u=!0;continue}else if(ox(m)){a[m]=g;continue}else{const y=Qd(g,Sl[m]);m.startsWith("origin")?(h=!0,c[m]=y):i[m]=y}}if(n.transform||(u||s?i.transform=Uj(n,e.transform,s):i.transform&&(i.transform="none")),h){const{originX:m="50%",originY:g="50%",originZ:y=0}=c;i.transformOrigin=`${m} ${g} ${y}`}}const Bj={offset:"stroke-dashoffset",array:"stroke-dasharray"},$j={offset:"strokeDashoffset",array:"strokeDasharray"};function Kj(e,n,s=1,i=0,a=!0){e.pathLength=1;const c=a?Bj:$j;e[c.offset]=`${-i}`,e[c.array]=`${n} ${s}`}const Bx=["transform","opacity","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function $x(e,{attrX:n,attrY:s,attrScale:i,pathLength:a,pathSpacing:c=1,pathOffset:u=0,...h},m,g,y){if(Vf(e,h,g),m){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:v,style:x}=e;for(const C of Bx)v[C]!==void 0&&(x[C]=v[C],delete v[C]);(x.transform||v.transformOrigin)&&(x.transformOrigin=v.transformOrigin??"50% 50%",delete v.transformOrigin),x.transform&&(x.transformBox=(y==null?void 0:y.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&&Kj(v,a,c,u,!1)}function Kx({top:e,left:n,right:s,bottom:i}){return{x:{min:n,max:s},y:{min:e,max:i}}}function Wj({x:e,y:n}){return{top:n.min,right:e.max,bottom:n.max,left:e.min}}function Hj(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 Gc(e){return e===void 0||e===1}function qd({scale:e,scaleX:n,scaleY:s}){return!Gc(e)||!Gc(n)||!Gc(s)}function Hr(e){return qd(e)||Wx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Wx(e){return Xg(e.x)||Xg(e.y)}function Xg(e){return e&&e!=="0%"}function kl(e,n,s){const i=e-s,a=n*i;return s+a}function Zg(e,n,s,i,a){return a!==void 0&&(e=kl(e,a,i)),kl(e,s,i)+n}function Gd(e,n=0,s=1,i,a){e.min=Zg(e.min,n,s,i,a),e.max=Zg(e.max,n,s,i,a)}function Hx(e,{x:n,y:s}){Gd(e.x,n.translate,n.scale,n.originPoint),Gd(e.y,s.translate,s.scale,s.originPoint)}const Jg=.999999999999,ey=1.0000000000001;function Qj(e,n,s,i=!1){var h;const a=s.length;if(!a)return;n.x=n.y=1;let c,u;for(let m=0;m<a;m++){c=s[m],u=c.projectionDelta;const{visualElement:g}=c.options;g&&g.props.style&&g.props.style.display==="contents"||(i&&c.options.layoutScroll&&c.scroll&&c!==c.root&&(wn(e.x,-c.scroll.offset.x),wn(e.y,-c.scroll.offset.y)),u&&(n.x*=u.x.scale,n.y*=u.y.scale,Hx(e,u)),i&&Hr(c.latestValues)&&il(e,c.latestValues,(h=c.layout)==null?void 0:h.layoutBox))}n.x<ey&&n.x>Jg&&(n.x=1),n.y<ey&&n.y>Jg&&(n.y=1)}function wn(e,n){e.min+=n,e.max+=n}function ty(e,n,s,i,a=.5){const c=Me(e.min,e.max,a);Gd(e,n,s,c,i)}function ny(e,n){return typeof e=="string"?parseFloat(e)/100*(n.max-n.min):e}function il(e,n,s){const i=s??e;ty(e.x,ny(n.x,i.x),n.scaleX,n.scale,n.originX),ty(e.y,ny(n.y,i.y),n.scaleY,n.scale,n.originY)}function Qx(e,n){return Kx(Hj(e.getBoundingClientRect(),n))}function qj(e,n,s){const i=Qx(e,s),{scroll:a}=n;return a&&(wn(i.x,a.offset.x),wn(i.y,a.offset.y)),i}const{schedule:zf}=px(queueMicrotask,!1),nn={x:!1,y:!1};function qx(){return nn.x||nn.y}function Gj(e){return e==="x"||e==="y"?nn[e]?null:(nn[e]=!0,()=>{nn[e]=!1}):nn.x||nn.y?null:(nn.x=nn.y=!0,()=>{nn.x=nn.y=!1})}function Gx(e,n){const s=Ux(e),i=new AbortController,a={passive:!0,...n,signal:i.signal};return[s,a,()=>i.abort()]}function Yj(e){return!(e.pointerType==="touch"||qx())}function Xj(e,n,s={}){const[i,a,c]=Gx(e,s);return i.forEach(u=>{let h=!1,m=!1,g;const y=()=>{u.removeEventListener("pointerleave",k)},v=E=>{g&&(g(E),g=void 0),y()},x=E=>{h=!1,window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x),m&&(m=!1,v(E))},C=()=>{h=!0,window.addEventListener("pointerup",x,a),window.addEventListener("pointercancel",x,a)},k=E=>{if(E.pointerType!=="touch"){if(h){m=!0;return}v(E)}},T=E=>{if(!Yj(E))return;m=!1;const A=n(u,E);typeof A=="function"&&(g=A,u.addEventListener("pointerleave",k,a))};u.addEventListener("pointerenter",T,a),u.addEventListener("pointerdown",C,a)}),c}const Yx=(e,n)=>n?e===n?!0:Yx(e,n.parentElement):!1,Uf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Zj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Jj(e){return Zj.has(e.tagName)||e.isContentEditable===!0}const eT=new Set(["INPUT","SELECT","TEXTAREA"]);function tT(e){return eT.has(e.tagName)||e.isContentEditable===!0}const ol=new WeakSet;function ry(e){return n=>{n.key==="Enter"&&e(n)}}function Yc(e,n){e.dispatchEvent(new PointerEvent("pointer"+n,{isPrimary:!0,bubbles:!0}))}const nT=(e,n)=>{const s=e.currentTarget;if(!s)return;const i=ry(()=>{if(ol.has(s))return;Yc(s,"down");const a=ry(()=>{Yc(s,"up")}),c=()=>Yc(s,"cancel");s.addEventListener("keyup",a,n),s.addEventListener("blur",c,n)});s.addEventListener("keydown",i,n),s.addEventListener("blur",()=>s.removeEventListener("keydown",i),n)};function sy(e){return Uf(e)&&!qx()}const iy=new WeakSet;function rT(e,n,s={}){const[i,a,c]=Gx(e,s),u=h=>{const m=h.currentTarget;if(!sy(h)||iy.has(h))return;ol.add(m),s.stopPropagation&&iy.add(h);const g=n(m,h),y={...a,capture:!0},v=(k,T)=>{window.removeEventListener("pointerup",x,y),window.removeEventListener("pointercancel",C,y),ol.has(m)&&ol.delete(m),sy(k)&&typeof g=="function"&&g(k,{success:T})},x=k=>{v(k,m===window||m===document||s.useGlobalTarget||Yx(m,k.target))},C=k=>{v(k,!1)};window.addEventListener("pointerup",x,y),window.addEventListener("pointercancel",C,y)};return i.forEach(h=>{(s.useGlobalTarget?window:h).addEventListener("pointerdown",u,a),sl(h)&&(h.addEventListener("focus",g=>nT(g,a)),!Jj(h)&&!h.hasAttribute("tabindex")&&(h.tabIndex=0))}),c}const al=new WeakMap;let hr;const Xx=(e,n,s)=>(i,a)=>a&&a[0]?a[0][e+"Size"]:Ff(i)&&"getBBox"in i?i.getBBox()[n]:i[s],sT=Xx("inline","width","offsetWidth"),iT=Xx("block","height","offsetHeight");function oT({target:e,borderBoxSize:n}){var s;(s=al.get(e))==null||s.forEach(i=>{i(e,{get width(){return sT(e,n)},get height(){return iT(e,n)}})})}function aT(e){e.forEach(oT)}function lT(){typeof ResizeObserver>"u"||(hr=new ResizeObserver(aT))}function uT(e,n){hr||lT();const s=Ux(e);return s.forEach(i=>{let a=al.get(i);a||(a=new Set,al.set(i,a)),a.add(n),hr==null||hr.observe(i)}),()=>{s.forEach(i=>{const a=al.get(i);a==null||a.delete(n),a!=null&&a.size||hr==null||hr.unobserve(i)})}}const ll=new Set;let zs;function cT(){zs=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ll.forEach(n=>n(e))},window.addEventListener("resize",zs)}function dT(e){return ll.add(e),zs||cT(),()=>{ll.delete(e),!ll.size&&typeof zs=="function"&&(window.removeEventListener("resize",zs),zs=void 0)}}function oy(e,n){return typeof e=="function"?dT(e):uT(e,n)}function fT(e){return Ff(e)&&e.tagName==="svg"}const ay=e=>typeof e=="number"?e:parseFloat(e),ly=()=>({translate:0,scale:1,origin:0,originPoint:0}),Us=()=>({x:ly(),y:ly()}),uy=()=>({min:0,max:0}),Ze=()=>({x:uy(),y:uy()}),hT=new WeakMap;function Al(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function wo(e){return typeof e=="string"||Array.isArray(e)}const Bf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],cy=["initial",...Bf];function Ll(e){if(Al(e.animate))return!0;for(let n=0;n<cy.length;n++)if(wo(e[cy[n]]))return!0;return!1}function Zx(e){return!!(Ll(e)||e.variants)}function pT(e,n,s){for(const i in n){const a=n[i],c=s[i];if(ut(a))e.addValue(i,a);else if(ut(c))e.addValue(i,ii(a,{owner:e}));else if(c!==a)if(e.hasValue(i)){const u=e.getValue(i);u.liveStyle===!0?u.jump(a):u.hasAnimated||u.set(a)}else{const u=e.getStaticValue(i);e.addValue(i,ii(u!==void 0?u:a,{owner:e}))}}for(const i in s)n[i]===void 0&&e.removeValue(i);return n}const Cl={current:null},$f={current:!1},mT=typeof window<"u";function Jx(){if($f.current=!0,!!mT)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),n=()=>Cl.current=e.matches;e.addEventListener("change",n),n()}else Cl.current=!1}const dy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let El={};function e1(e){El=e}function gT(){return El}class yT{scrapeMotionValuesFromProps(n,s,i){return{}}constructor({parent:n,props:s,presenceContext:i,reducedMotionConfig:a,skipAnimations:c,blockInitialAnimation:u,visualState:h},m={}){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=Af,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 C=lt.now();this.renderScheduledAt<C&&(this.renderScheduledAt=C,Re.render(this.render,!1,!0))};const{latestValues:g,renderState:y}=h;this.latestValues=g,this.baseTarget={...g},this.initialValues=s.initial?{...g}:{},this.renderState=y,this.parent=n,this.props=s,this.presenceContext=i,this.depth=n?n.depth+1:0,this.reducedMotionConfig=a,this.skipAnimationsConfig=c,this.options=m,this.blockInitialAnimation=!!u,this.isControllingVariants=Ll(s),this.isVariantNode=Zx(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(n&&n.current);const{willChange:v,...x}=this.scrapeMotionValuesFromProps(s,{},this);for(const C in x){const k=x[C];g[C]!==void 0&&ut(k)&&k.set(g[C])}}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,hT.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:c}=a;c.add(this),this.removeFromVariantTree=()=>c.delete(this)}}this.values.forEach((a,c)=>this.bindToMotionValue(c,a)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:($f.current||Jx(),this.shouldReduceMotion=Cl.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(),Pr(this.notifyUpdate),Pr(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&&Kd.has(n)&&this.current instanceof HTMLElement){const{factory:u,keyframes:h,times:m,ease:g,duration:y}=s.accelerate,v=new Mx({element:this.current,name:n,keyframes:h,times:m,ease:g,duration:Wt(y)}),x=u(v);this.valueSubscriptions.set(n,()=>{x(),v.cancel()});return}const i=Tr.has(n);i&&this.onBindTransform&&this.onBindTransform();const a=s.on("change",u=>{this.latestValues[n]=u,this.props.onUpdate&&Re.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let c;typeof window<"u"&&window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,n,s)),this.valueSubscriptions.set(n,()=>{a(),c&&c()})}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 El){const s=El[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 c=this.features[n];c.isMounted?c.update():(c.mount(),c.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<dy.length;i++){const a=dy[i];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const c="on"+a,u=n[c];u&&(this.propEventSubscriptions[a]=this.on(a,u))}this.prevMotionValues=pT(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=ii(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"&&(xf(i)||wf(i))?i=parseFloat(i):typeof i!="number"&&!Ot.test(i)&&Ot.test(s)&&(i=Df(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 yl),this.events[n].add(s)}notify(n,...s){this.events[n]&&this.events[n].notify(...s)}scheduleRenderMicrotask(){zf.render(this.render)}}class t1 extends yT{constructor(){super(...arguments),this.KeyframeResolver=Fj}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 br{constructor(n){this.isMounted=!1,this.node=n}update(){}}function n1(e,{style:n,vars:s},i,a){const c=e.style;let u;for(u in n)c[u]=n[u];a==null||a.applyProjectionStyles(c,i);for(u in s)c.setProperty(u,s[u])}const So={};function r1(e,{layout:n,layoutId:s}){return Tr.has(e)||e.startsWith("origin")||(n||s!==void 0)&&(!!So[e]||e==="opacity")}function Kf(e,n,s){var u;const i=e.style,a=n==null?void 0:n.style,c={};if(!i)return c;for(const h in i)(ut(i[h])||a&&ut(a[h])||r1(h,e)||((u=s==null?void 0:s.getValue(h))==null?void 0:u.liveStyle)!==void 0)&&(c[h]=i[h]);return c}function vT(e){return window.getComputedStyle(e)}class xT extends t1{constructor(){super(...arguments),this.type="html",this.renderInstance=n1}mount(n){Rl(!!n.style),super.mount(n)}readValueFromInstance(n,s){var i;if(Tr.has(s))return(i=this.projection)!=null&&i.isProjecting?xo(s):UE(n,s);{const a=vT(n),c=(ox(s)?a.getPropertyValue(s):a[s])||0;return typeof c=="string"?c.trim():c}}measureInstanceViewportBox(n,{transformPagePoint:s}){return Qx(n,s)}build(n,s,i){Vf(n,s,i.transformTemplate)}scrapeMotionValuesFromProps(n,s,i){return Kf(n,s,i)}}const s1=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"]),i1=e=>typeof e=="string"&&e.toLowerCase()==="svg";function wT(e,n,s,i){n1(e,n,void 0,i);for(const a in n.attrs)e.setAttribute(s1.has(a)?a:If(a),n.attrs[a])}function o1(e,n,s){const i=Kf(e,n,s);for(const a in e)if(ut(e[a])||ut(n[a])){const c=pi.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;i[c]=e[a]}return i}class ST extends t1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ze}getBaseTargetFromProps(n,s){return Tr.has(s)?super.getBaseTargetFromProps(n,s)??xo(s):n[s]}getDefaultValue(n){return Tr.has(n)?this.latestValues[n]??xo(n):void 0}readValueFromInstance(n,s){if(Tr.has(s)){const i=kx(s);return i&&i.default||0}if(Bx.includes(s)){const a=getComputedStyle(n)[s];if(typeof a=="string"&&a)return a.trim()}return s=s1.has(s)?s:If(s),n.getAttribute(s)}scrapeMotionValuesFromProps(n,s,i){return o1(n,s,i)}build(n,s,i){$x(n,s,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(n,s,i,a){wT(n,s,i,a)}mount(n){this.isSVGTag=i1(n.tagName),super.mount(n)}}function a1(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 kT=[...Bf].reverse();function CT(e){let n=h=>Promise.all(h.map(({animation:m,options:g})=>Rj(e,m,g))),s=fy(),i=!0,a=!1;function c(h){var I;const{props:m,parent:g,manuallyAnimateOnMount:y}=e,v=i||a,x=[],C=new Set;let k={},T=1/0,E=e;do E=E.props.inherit!==!1&&E.parent;while(E&&!E.isControllingVariants);if(kT.forEach((b,O)=>{var X,le;const z=s[b],B=m[b],L=E&&E.props[b],F=B!==void 0?B:wo(L)||L===!1?L:void 0,$=wo(F),Y=b===h?z.isActive:null;Y===!1&&(T=O);const ne=$&&B===void 0&&!(v&&y);if(z.protectedKeys={...k},!z.isActive&&Y===null||!F&&!z.prevProp||Al(F)||typeof F=="boolean")return;if(b==="exit"&&z.isActive&&Y!==!0){k={...k,...z.prevResolvedValues};return}const G=ET(z.prevProp,F);let Z=G||$&&(Y&&!ne||O>T),fe=!1;const Le=Array.isArray(F)?F:[F];let ye={};if(Y!==!1)for(const q of Le){const{transition:D,transitionEnd:R,...ee}=as(e,q,Ix(e,b))||{};ye={...ye,...ee,...R}}const{prevResolvedValues:Se}=z;for(const q in{...Se,...ye}){if(q in k)continue;const D=ye[q],R=Se[q],ee=Array.isArray(D)&&Array.isArray(R)?!a1(D,R)||G:D!==R;if(ee&&D==null)C.add(q);else if(ee||D!==void 0&&C.has(q)){Z=!0,C.delete(q)&&(fe=!0),z.needsAnimating[q]=!0;const ge=e.getValue(q);ge&&(ge.liveStyle=!1)}else z.protectedKeys[q]=!0}if(z.prevProp=F,z.prevResolvedValues=ye,z.isActive&&(k={...k,...ye}),Z&&(!(ne&&G)||fe))for(const q of Le){const D={type:b};if(typeof q=="string"&&v&&y&&(g!=null&&g.enteringChildren)){const R=(le=(X=as(g,q))==null?void 0:X.transition)==null?void 0:le.delayChildren;D.delay=Dx(g.enteringChildren,e,R)}x.push({animation:q,options:D})}}),C.size){const{initial:b}=m,O={},z=typeof b!="boolean"&&as(e,Array.isArray(b)?b[0]:b,(I=e.presenceContext)==null?void 0:I.custom);z&&z.transition&&(O.transition=z.transition),C.forEach(B=>{const L=e.getValue(B);L&&(L.liveStyle=!0);const F=z&&!Array.isArray(b)?z[B]:void 0,$=e.getBaseTargetFromProps(m,B);O[B]=(F!==void 0?F:$!==void 0&&!ut($)?$:e.initialValues[B]===void 0?e.baseTarget[B]:void 0)??null}),x.push({animation:O})}const A=v&&e.blockInitialAnimation||i&&!y&&(m.initial===!1||m.initial===m.animate);return i=a=!1,!A&&x.length?n(x):Promise.resolve()}function u(h,m){var y;if(s[h].isActive===m)return Promise.resolve();(y=e.variantChildren)==null||y.forEach(v=>{var x;return(x=v.animationState)==null?void 0:x.setActive(h,m)}),s[h].isActive=m;const g=c(h);for(const v in s)s[v].protectedKeys={};return g}return{animateChanges:c,setActive:u,setAnimateFunction:h=>{n=h(e)},getState:()=>s,reset:()=>{s=fy(),a=!0}}}function ET(e,n){return typeof n=="string"?n!==e:Array.isArray(n)?!a1(n,e):!1}function fy(){const e={};for(const n of Bf)e[n]={isActive:n==="animate",protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}function Yd(e,n){e.min=n.min,e.max=n.max}function en(e,n){Yd(e.x,n.x),Yd(e.y,n.y)}function hy(e,n){e.translate=n.translate,e.scale=n.scale,e.originPoint=n.originPoint,e.origin=n.origin}const l1=1e-4,jT=1-l1,TT=1+l1,u1=.01,PT=0-u1,NT=0+u1;function St(e){return e.max-e.min}function bT(e,n,s){return Math.abs(e-n)<=s}function py(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>=jT&&e.scale<=TT||isNaN(e.scale))&&(e.scale=1),(e.translate>=PT&&e.translate<=NT||isNaN(e.translate))&&(e.translate=0)}function uo(e,n,s,i){py(e.x,n.x,s.x,i?i.originX:void 0),py(e.y,n.y,s.y,i?i.originY:void 0)}function my(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 MT(e,n,s,i){my(e.x,n.x,s.x,i==null?void 0:i.x),my(e.y,n.y,s.y,i==null?void 0:i.y)}function gy(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 jl(e,n,s,i){gy(e.x,n.x,s.x,i==null?void 0:i.x),gy(e.y,n.y,s.y,i==null?void 0:i.y)}function yy(e,n,s,i,a){return e-=n,e=kl(e,1/s,i),a!==void 0&&(e=kl(e,1/a,i)),e}function RT(e,n=0,s=1,i=.5,a,c=e,u=e){if(Cn.test(n)&&(n=parseFloat(n),n=Me(u.min,u.max,n/100)-u.min),typeof n!="number")return;let h=Me(c.min,c.max,i);e===c&&(h-=n),e.min=yy(e.min,n,s,h,a),e.max=yy(e.max,n,s,h,a)}function vy(e,n,[s,i,a],c,u){RT(e,n[s],n[i],n[a],n.scale,c,u)}const DT=["x","scaleX","originX"],AT=["y","scaleY","originY"];function xy(e,n,s,i){vy(e.x,n,DT,s?s.x:void 0,i?i.x:void 0),vy(e.y,n,AT,s?s.y:void 0,i?i.y:void 0)}function wy(e){return e.translate===0&&e.scale===1}function c1(e){return wy(e.x)&&wy(e.y)}function Sy(e,n){return e.min===n.min&&e.max===n.max}function LT(e,n){return Sy(e.x,n.x)&&Sy(e.y,n.y)}function ky(e,n){return Math.round(e.min)===Math.round(n.min)&&Math.round(e.max)===Math.round(n.max)}function d1(e,n){return ky(e.x,n.x)&&ky(e.y,n.y)}function Cy(e){return St(e.x)/St(e.y)}function Ey(e,n){return e.translate===n.translate&&e.scale===n.scale&&e.originPoint===n.originPoint}function gn(e){return[e("x"),e("y")]}function jy(e,n){return n.max===n.min?0:e/(n.max-n.min)*100}const ro={correct:(e,n)=>{if(!n.target)return e;if(typeof e=="string")if(ie.test(e))e=parseFloat(e);else return e;const s=jy(e,n.target.x),i=jy(e,n.target.y);return`${s}% ${i}%`}},OT={correct:(e,{treeScale:n,projectionDelta:s})=>{const i=e,a=Ot.parse(e);if(a.length>5)return i;const c=Ot.createTransformer(e),u=typeof a[0]!="number"?1:0,h=s.x.scale*n.x,m=s.y.scale*n.y;a[0+u]/=h,a[1+u]/=m;const g=Me(h,m,.5);return typeof a[2+u]=="number"&&(a[2+u]/=g),typeof a[3+u]=="number"&&(a[3+u]/=g),c(a)}};function IT(e,n,s){let i="";const a=e.x.translate/n.x,c=e.y.translate/n.y,u=(s==null?void 0:s.z)||0;if((a||c||u)&&(i=`translate3d(${a}px, ${c}px, ${u}px) `),(n.x!==1||n.y!==1)&&(i+=`scale(${1/n.x}, ${1/n.y}) `),s){const{transformPerspective:g,rotate:y,pathRotation:v,rotateX:x,rotateY:C,skewX:k,skewY:T}=s;g&&(i=`perspective(${g}px) ${i}`),y&&(i+=`rotate(${y}deg) `),v&&(i+=`rotate(${v}deg) `),x&&(i+=`rotateX(${x}deg) `),C&&(i+=`rotateY(${C}deg) `),k&&(i+=`skewX(${k}deg) `),T&&(i+=`skewY(${T}deg) `)}const h=e.x.scale*n.x,m=e.y.scale*n.y;return(h!==1||m!==1)&&(i+=`scale(${h}, ${m})`),i||"none"}const _T=_f.length,Ty=e=>typeof e=="number"||ie.test(e);function FT(e,n,s,i,a,c){a?(e.opacity=Me(0,s.opacity??1,VT(i)),e.opacityExit=Me(n.opacity??1,0,zT(i))):c&&(e.opacity=Me(n.opacity??1,s.opacity??1,i));for(let u=0;u<_T;u++){const h=_f[u];let m=Py(n,h),g=Py(s,h);if(m===void 0&&g===void 0)continue;m||(m=0),g||(g=0),m===0||g===0||Ty(m)===Ty(g)?(e[h]=Math.max(Me(ay(m),ay(g),i),0),(Cn.test(g)||Cn.test(m))&&(e[h]+="%")):e[h]=g}(n.rotate||s.rotate)&&(e.rotate=Me(n.rotate||0,s.rotate||0,i))}function Py(e,n){return e[n]!==void 0?e[n]:e.borderRadius}const VT=f1(0,.5,nx),zT=f1(.5,.95,ln);function f1(e,n,s){return i=>i<e?0:i>n?1:s(go(e,n,i))}function UT(e,n,s){const i=ut(e)?e:ii(e);return i.start(Of("",i,n,s)),i.animation}function ko(e,n,s,i={passive:!0}){return e.addEventListener(n,s,i),()=>e.removeEventListener(n,s,i)}const BT=(e,n)=>e.depth-n.depth;class $T{constructor(){this.children=[],this.isDirty=!1}add(n){vf(this.children,n),this.isDirty=!0}remove(n){gl(this.children,n),this.isDirty=!0}forEach(n){this.isDirty&&this.children.sort(BT),this.isDirty=!1,this.children.forEach(n)}}function KT(e,n){const s=lt.now(),i=({timestamp:a})=>{const c=a-s;c>=n&&(Pr(i),e(c-n))};return Re.setup(i,!0),()=>Pr(i)}function ul(e){return ut(e)?e.get():e}class WT{constructor(){this.members=[]}add(n){vf(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&&(gl(this.members,i),i.unmount())}n.scheduleRender()}remove(n){if(gl(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:c}=i.options,{layoutDependency:u}=n.options;(c===void 0||c!==u)&&(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,c,u;(i=(s=n.options).onExitComplete)==null||i.call(s),(u=(a=n.resumingFrom)==null?void 0:(c=a.options).onExitComplete)==null||u.call(c)})}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 HT={borderRadius:{...ro,applyTo:[..._f]},borderTopLeftRadius:ro,borderTopRightRadius:ro,borderBottomLeftRadius:ro,borderBottomRightRadius:ro,boxShadow:OT},cl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(So,{...HT,...So});const Xc=["","X","Y","Z"],QT=1e3;let qT=0;function Zc(e,n,s,i){const{latestValues:a}=n;a[e]&&(s[e]=a[e],n.setStaticValue(e,0),i&&(i[e]=0))}function h1(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:n}=e.options;if(!n)return;const s=Vx(n);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:a,layoutId:c}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",Re,!(a||c))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&h1(i)}function p1({attachResizeListener:e,defaultParent:n,measureScroll:s,checkIsScrollRoot:i,resetTransform:a}){return class{constructor(u={},h=n==null?void 0:n()){this.id=qT++,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(XT),this.nodes.forEach(sP),this.nodes.forEach(iP),this.nodes.forEach(ZT)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=h?h.root||h:this,this.path=h?[...h.path,h]:[],this.parent=h,this.depth=h?h.depth+1:0;for(let m=0;m<this.path.length;m++)this.path[m].shouldResetTransform=!0;this.root===this&&(this.nodes=new $T)}addEventListener(u,h){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new yl),this.eventHandlers.get(u).add(h)}notifyListeners(u,...h){const m=this.eventHandlers.get(u);m&&m.notify(...h)}hasListeners(u){return this.eventHandlers.has(u)}mount(u){if(this.instance)return;this.isSVG=Ff(u)&&!fT(u),this.instance=u;const{layoutId:h,layout:m,visualElement:g}=this.options;if(g&&!g.current&&g.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(m||h)&&(this.isLayoutDirty=!0),e){let y,v=0;const x=()=>this.root.updateBlockedByResize=!1;Re.read(()=>{v=window.innerWidth}),e(u,()=>{const C=window.innerWidth;C!==v&&(v=C,this.root.updateBlockedByResize=!0,y&&y(),y=KT(x,250),cl.hasAnimatedSinceResize&&(cl.hasAnimatedSinceResize=!1,this.nodes.forEach(My)))})}h&&this.root.registerSharedNode(h,this),this.options.animate!==!1&&g&&(h||m)&&this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:v,hasRelativeLayoutChanged:x,layout:C})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=this.options.transition||g.getDefaultTransition()||cP,{onLayoutAnimationStart:T,onLayoutAnimationComplete:E}=g.getProps(),A=!this.targetLayout||!d1(this.targetLayout,C),I=!v&&x;if(this.options.layoutRoot||this.resumeFrom||I||v&&(A||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...Lf(k,"layout"),onPlay:T,onComplete:E};(g.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(y,I,b.path)}else v||My(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=C})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const u=this.getStack();u&&u.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Pr(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(oP),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&h1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let y=0;y<this.path.length;y++){const v=this.path[y];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:h,layout:m}=this.options;if(h===void 0&&!m)return;const g=this.getTransformTemplate();this.prevTransformTemplateValue=g?g(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const m=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),m&&this.nodes.forEach(eP),this.nodes.forEach(Ny);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(by);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(tP),this.nodes.forEach(nP),this.nodes.forEach(rP),this.nodes.forEach(GT),this.nodes.forEach(YT)):this.nodes.forEach(by),this.clearAllSnapshots();const h=lt.now();Je.delta=$n(0,1e3/60,h-Je.timestamp),Je.timestamp=h,Je.isProcessing=!0,Wc.update.process(Je),Wc.preRender.process(Je),Wc.render.process(Je),Je.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,zf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(JT),this.sharedNodes.forEach(aP)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Re.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Re.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 m=0;m<this.path.length;m++)this.path[m].updateScroll();const u=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:h}=this.options;h&&h.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let h=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(h=!1),h&&this.instance){const m=i(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:m,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:m}}}resetTransform(){if(!a)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,h=this.projectionDelta&&!c1(this.projectionDelta),m=this.getTransformTemplate(),g=m?m(this.latestValues,""):void 0,y=g!==this.prevTransformTemplateValue;u&&this.instance&&(h||Hr(this.latestValues)||y)&&(a(this.instance,g),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const h=this.measurePageBox();let m=this.removeElementScroll(h);return u&&(m=this.removeTransform(m)),dP(m),{animationId:this.root.animationId,measuredBox:h,layoutBox:m,latestValues:{},source:this.id}}measurePageBox(){var g;const{visualElement:u}=this.options;if(!u)return Ze();const h=u.measureViewportBox();if(!(((g=this.scroll)==null?void 0:g.wasRoot)||this.path.some(fP))){const{scroll:y}=this.root;y&&(wn(h.x,y.offset.x),wn(h.y,y.offset.y))}return h}removeElementScroll(u){var m;const h=Ze();if(en(h,u),(m=this.scroll)!=null&&m.wasRoot)return h;for(let g=0;g<this.path.length;g++){const y=this.path[g],{scroll:v,options:x}=y;y!==this.root&&v&&x.layoutScroll&&(v.wasRoot&&en(h,u),wn(h.x,v.offset.x),wn(h.y,v.offset.y))}return h}applyTransform(u,h=!1,m){var y,v;const g=m||Ze();en(g,u);for(let x=0;x<this.path.length;x++){const C=this.path[x];!h&&C.options.layoutScroll&&C.scroll&&C!==C.root&&(wn(g.x,-C.scroll.offset.x),wn(g.y,-C.scroll.offset.y)),Hr(C.latestValues)&&il(g,C.latestValues,(y=C.layout)==null?void 0:y.layoutBox)}return Hr(this.latestValues)&&il(g,this.latestValues,(v=this.layout)==null?void 0:v.layoutBox),g}removeTransform(u){var m;const h=Ze();en(h,u);for(let g=0;g<this.path.length;g++){const y=this.path[g];if(!Hr(y.latestValues))continue;let v;y.instance&&(qd(y.latestValues)&&y.updateSnapshot(),v=Ze(),en(v,y.measurePageBox())),xy(h,y.latestValues,(m=y.snapshot)==null?void 0:m.layoutBox,v)}return Hr(this.latestValues)&&xy(h,this.latestValues),h}setTargetDelta(u){this.targetDelta=u,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(u){this.options={...this.options,...u,crossfade:u.crossfade!==void 0?u.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(u=!1){var C;const h=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=h.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=h.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=h.isSharedProjectionDirty);const m=!!this.resumingFrom||this!==h;if(!(u||m&&this.isSharedProjectionDirty||this.isProjectionDirty||(C=this.parent)!=null&&C.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:y,layoutId:v}=this.options;if(!this.layout||!(y||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(),MT(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):en(this.target,this.layout.layoutBox),Hx(this.target,this.targetDelta)):en(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||qd(this.parent.latestValues)||Wx(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(u,h,m){this.relativeParent=u,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ze(),this.relativeTargetOrigin=Ze(),jl(this.relativeTargetOrigin,h,m,this.options.layoutAnchor||void 0),en(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var k;const u=this.getLead(),h=!!this.resumingFrom||this!==u;let m=!0;if((this.isProjectionDirty||(k=this.parent)!=null&&k.isProjectionDirty)&&(m=!1),h&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(m=!1),this.resolvedRelativeTargetAt===Je.timestamp&&(m=!1),m)return;const{layout:g,layoutId:y}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(g||y))return;en(this.layoutCorrected,this.layout.layoutBox);const v=this.treeScale.x,x=this.treeScale.y;Qj(this.layoutCorrected,this.treeScale,this.path,h),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=Ze());const{target:C}=u;if(!C){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(hy(this.prevProjectionDelta.x,this.projectionDelta.x),hy(this.prevProjectionDelta.y,this.projectionDelta.y)),uo(this.projectionDelta,this.layoutCorrected,C,this.latestValues),(this.treeScale.x!==v||this.treeScale.y!==x||!Ey(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ey(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",C))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(u=!0){var h;if((h=this.options.visualElement)==null||h.scheduleRender(),u){const m=this.getStack();m&&m.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Us(),this.projectionDelta=Us(),this.projectionDeltaWithTransform=Us()}setAnimationOrigin(u,h=!1,m){const g=this.snapshot,y=g?g.latestValues:{},v={...this.latestValues},x=Us();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!h;const C=Ze(),k=g?g.source:void 0,T=this.layout?this.layout.source:void 0,E=k!==T,A=this.getStack(),I=!A||A.members.length<=1,b=!!(E&&!I&&this.options.crossfade===!0&&!this.path.some(uP));this.animationProgress=0;let O;const z=m==null?void 0:m.interpolateProjection(u);this.mixTargetDelta=B=>{const L=B/1e3,F=z==null?void 0:z(L);F?(x.x.translate=F.x,x.x.scale=Me(u.x.scale,1,L),x.x.origin=u.x.origin,x.x.originPoint=u.x.originPoint,x.y.translate=F.y,x.y.scale=Me(u.y.scale,1,L),x.y.origin=u.y.origin,x.y.originPoint=u.y.originPoint):(Ry(x.x,u.x,L),Ry(x.y,u.y,L)),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(jl(C,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),lP(this.relativeTarget,this.relativeTargetOrigin,C,L),O&&LT(this.relativeTarget,O)&&(this.isProjectionDirty=!1),O||(O=Ze()),en(O,this.relativeTarget)),E&&(this.animationValues=v,FT(v,y,this.latestValues,L,b,I)),F&&F.rotate!==void 0&&(this.animationValues||(this.animationValues=v),this.animationValues.pathRotation=F.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){var h,m,g;this.notifyListeners("animationStart"),(h=this.currentAnimation)==null||h.stop(),(g=(m=this.resumingFrom)==null?void 0:m.currentAnimation)==null||g.stop(),this.pendingAnimation&&(Pr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Re.update(()=>{cl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ii(0)),this.motionValue.jump(0,!1),this.currentAnimation=UT(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:y=>{this.mixTargetDelta(y),u.onUpdate&&u.onUpdate(y)},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),ME(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 u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(QT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead(),{targetWithTransforms:h,layout:m,latestValues:g}=u;let{target:y}=u;if(!(!h||!y||!m)){if(this!==u&&this.layout&&m&&m1(this.options.animationType,this.layout.layoutBox,m.layoutBox)){y=this.target||Ze();const v=St(this.layout.layoutBox.x);y.x.min=u.target.x.min,y.x.max=y.x.min+v;const x=St(this.layout.layoutBox.y);y.y.min=u.target.y.min,y.y.max=y.y.min+x}en(h,y),il(h,g),uo(this.projectionDeltaWithTransform,this.layoutCorrected,h,g)}}registerSharedNode(u,h){this.sharedNodes.has(u)||this.sharedNodes.set(u,new WT),this.sharedNodes.get(u).add(h);const g=h.options.initialPromotionConfig;h.promote({transition:g?g.transition:void 0,preserveFollowOpacity:g&&g.shouldPreserveFollowOpacity?g.shouldPreserveFollowOpacity(h):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){var h;const{layoutId:u}=this.options;return u?((h=this.getStack())==null?void 0:h.lead)||this:this}getPrevLead(){var h;const{layoutId:u}=this.options;return u?(h=this.getStack())==null?void 0:h.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:h,preserveFollowOpacity:m}={}){const g=this.getStack();g&&g.promote(this,m),u&&(this.projectionDelta=void 0,this.needsReset=!0),h&&this.setOptions({transition:h})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let h=!1;const{latestValues:m}=u;if((m.z||m.rotate||m.rotateX||m.rotateY||m.rotateZ||m.skewX||m.skewY)&&(h=!0),!h)return;const g={};m.z&&Zc("z",u,g,this.animationValues);for(let y=0;y<Xc.length;y++)Zc(`rotate${Xc[y]}`,u,g,this.animationValues),Zc(`skew${Xc[y]}`,u,g,this.animationValues);u.render();for(const y in g)u.setStaticValue(y,g[y]),this.animationValues&&(this.animationValues[y]=g[y]);u.scheduleRender()}applyProjectionStyles(u,h){if(!this.instance||this.isSVG)return;if(!this.isVisible){u.visibility="hidden";return}const m=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,u.visibility="",u.opacity="",u.pointerEvents=ul(h==null?void 0:h.pointerEvents)||"",u.transform=m?m(this.latestValues,""):"none";return}const g=this.getLead();if(!this.projectionDelta||!this.layout||!g.target){this.options.layoutId&&(u.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,u.pointerEvents=ul(h==null?void 0:h.pointerEvents)||""),this.hasProjected&&!Hr(this.latestValues)&&(u.transform=m?m({},""):"none",this.hasProjected=!1);return}u.visibility="";const y=g.animationValues||g.latestValues;this.applyTransformsToTarget();let v=IT(this.projectionDeltaWithTransform,this.treeScale,y);m&&(v=m(y,v)),u.transform=v;const{x,y:C}=this.projectionDelta;u.transformOrigin=`${x.origin*100}% ${C.origin*100}% 0`,g.animationValues?u.opacity=g===this?y.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:y.opacityExit:u.opacity=g===this?y.opacity!==void 0?y.opacity:"":y.opacityExit!==void 0?y.opacityExit:0;for(const k in So){if(y[k]===void 0)continue;const{correct:T,applyTo:E,isCSSVariable:A}=So[k],I=v==="none"?y[k]:T(y[k],g);if(E){const b=E.length;for(let O=0;O<b;O++)u[E[O]]=I}else A?this.options.visualElement.renderState.vars[k]=I:u[k]=I}this.options.layoutId&&(u.pointerEvents=g===this?ul(h==null?void 0:h.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>{var h;return(h=u.currentAnimation)==null?void 0:h.stop()}),this.root.nodes.forEach(Ny),this.root.sharedNodes.clear()}}}function GT(e){e.updateLayout()}function YT(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:c}=e.options,u=n.source!==e.layout.source;if(c==="size")gn(v=>{const x=u?n.measuredBox[v]:n.layoutBox[v],C=St(x);x.min=i[v].min,x.max=x.min+C});else if(c==="x"||c==="y"){const v=c==="x"?"y":"x";Yd(u?n.measuredBox[v]:n.layoutBox[v],i[v])}else m1(c,n.layoutBox,i)&&gn(v=>{const x=u?n.measuredBox[v]:n.layoutBox[v],C=St(i[v]);x.max=x.min+C,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[v].max=e.relativeTarget[v].min+C)});const h=Us();uo(h,i,n.layoutBox);const m=Us();u?uo(m,e.applyTransform(a,!0),n.measuredBox):uo(m,i,n.layoutBox);const g=!c1(h);let y=!1;if(!e.resumeFrom){const v=e.getClosestProjectingParent();if(v&&!v.resumeFrom){const{snapshot:x,layout:C}=v;if(x&&C){const k=e.options.layoutAnchor||void 0,T=Ze();jl(T,n.layoutBox,x.layoutBox,k);const E=Ze();jl(E,i,C.layoutBox,k),d1(T,E)||(y=!0),v.options.layoutRoot&&(e.relativeTarget=E,e.relativeTargetOrigin=T,e.relativeParent=v)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:n,delta:m,layoutDelta:h,hasLayoutChanged:g,hasRelativeLayoutChanged:y})}else if(e.isLead()){const{onExitComplete:i}=e.options;i&&i()}e.options.transition=void 0}function XT(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 ZT(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function JT(e){e.clearSnapshot()}function Ny(e){e.clearMeasurements()}function eP(e){e.isLayoutDirty=!0,e.updateLayout()}function by(e){e.isLayoutDirty=!1}function tP(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function nP(e){var n;e.relativeTarget&&((n=e.relativeParent)!=null&&n.isLayoutDirty)&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function rP(e){const{visualElement:n}=e.options;n&&n.getProps().onBeforeLayoutMeasure&&n.notify("BeforeLayoutMeasure"),e.resetTransform()}function My(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function sP(e){e.resolveTargetDelta()}function iP(e){e.calcProjection()}function oP(e){e.resetSkewAndRotation()}function aP(e){e.removeLeadSnapshot()}function Ry(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 Dy(e,n,s,i){e.min=Me(n.min,s.min,i),e.max=Me(n.max,s.max,i)}function lP(e,n,s,i){Dy(e.x,n.x,s.x,i),Dy(e.y,n.y,s.y,i)}function uP(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const cP={duration:.45,ease:[.4,0,.1,1]},Ay=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ly=Ay("applewebkit/")&&!Ay("chrome/")?Math.round:ln;function Oy(e){e.min=Ly(e.min),e.max=Ly(e.max)}function dP(e){Oy(e.x),Oy(e.y)}function m1(e,n,s){return e==="position"||e==="preserve-aspect"&&!bT(Cy(n),Cy(s),.2)}function fP(e){var n;return e!==e.root&&((n=e.scroll)==null?void 0:n.wasRoot)}const hP=p1({attachResizeListener:(e,n)=>ko(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}),Jc={current:void 0},g1=p1({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Jc.current){const e=new hP({});e.mount(window),e.setOptions({layoutScroll:!0}),Jc.current=e}return Jc.current},resetTransform:(e,n)=>{e.style.transform=n!==void 0?n:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Wf=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Iy(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function pP(...e){return n=>{let s=!1;const i=e.map(a=>{const c=Iy(a,n);return!s&&typeof c=="function"&&(s=!0),c});if(s)return()=>{for(let a=0;a<i.length;a++){const c=i[a];typeof c=="function"?c():Iy(e[a],null)}}}}function mP(...e){return S.useCallback(pP(...e),e)}class gP extends S.Component{getSnapshotBeforeUpdate(n){const s=this.props.childRef.current;if(sl(s)&&n.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=s.offsetParent,a=sl(i)&&i.offsetWidth||0,c=sl(i)&&i.offsetHeight||0,u=getComputedStyle(s),h=this.props.sizeRef.current;h.height=parseFloat(u.height),h.width=parseFloat(u.width),h.top=s.offsetTop,h.left=s.offsetLeft,h.right=a-h.width-h.left,h.bottom=c-h.height-h.top,h.direction=u.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function yP({children:e,isPresent:n,anchorX:s,anchorY:i,root:a,pop:c}){var x;const u=S.useId(),h=S.useRef(null),m=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:g}=S.useContext(Wf),y=c!==!1?((x=e.props)==null?void 0:x.ref)??(e==null?void 0:e.ref):void 0,v=mP(h,y);return S.useInsertionEffect(()=>{const{width:C,height:k,top:T,left:E,right:A,bottom:I,direction:b}=m.current;if(n||c===!1||!h.current||!C||!k)return;const O=b==="rtl",z=s==="left"?O?`right: ${A}`:`left: ${E}`:O?`left: ${E}`:`right: ${A}`,B=i==="bottom"?`bottom: ${I}`:`top: ${T}`;h.current.dataset.motionPopId=u;const L=document.createElement("style");g&&(L.nonce=g);const F=a??document.head;return F.appendChild(L),L.sheet&&L.sheet.insertRule(`
348
- [data-motion-pop-id="${u}"] {
349
- position: absolute !important;
350
- width: ${C}px !important;
351
- height: ${k}px !important;
352
- ${z}px !important;
353
- ${B}px !important;
354
- }
355
- `),()=>{var $;($=h.current)==null||$.removeAttribute("data-motion-pop-id"),F.contains(L)&&F.removeChild(L)}},[n]),f.jsx(gP,{isPresent:n,childRef:h,sizeRef:m,pop:c,children:c===!1?e:S.cloneElement(e,{ref:v})})}const vP=({children:e,initial:n,isPresent:s,onExitComplete:i,custom:a,presenceAffectsLayout:c,mode:u,anchorX:h,anchorY:m,root:g})=>{const y=yf(xP),v=S.useId(),x=S.useRef(s),C=S.useRef(i);mo(()=>{x.current=s,C.current=i});let k=!0,T=S.useMemo(()=>(k=!1,{id:v,initial:n,isPresent:s,custom:a,onExitComplete:E=>{y.set(E,!0);for(const A of y.values())if(!A)return;i&&i()},register:E=>(y.set(E,!1),()=>{var A;y.delete(E),!x.current&&!y.size&&((A=C.current)==null||A.call(C))})}),[s,y,i]);return c&&k&&(T={...T}),S.useMemo(()=>{y.forEach((E,A)=>y.set(A,!1))},[s]),S.useEffect(()=>{!s&&!y.size&&i&&i()},[s]),e=f.jsx(yP,{pop:u==="popLayout",isPresent:s,anchorX:h,anchorY:m,root:g,children:e}),f.jsx(Ml.Provider,{value:T,children:e})};function xP(){return new Map}function y1(e=!0){const n=S.useContext(Ml);if(n===null)return[!0,null];const{isPresent:s,onExitComplete:i,register:a}=n,c=S.useId();S.useEffect(()=>{if(e)return a(c)},[e]);const u=S.useCallback(()=>e&&i&&i(c),[c,i,e]);return!s&&i?[!1,u]:[!0]}const so=e=>e.key||"";function _y(e){const n=[];return S.Children.forEach(e,s=>{S.isValidElement(s)&&n.push(s)}),n}const Mr=({children:e,custom:n,initial:s=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:c="sync",propagate:u=!1,anchorX:h="left",anchorY:m="top",root:g})=>{const[y,v]=y1(u),x=S.useMemo(()=>_y(e),[e]),C=u&&!y?[]:x.map(so),k=S.useRef(!0),T=yf(()=>new Map),E=S.useRef(new Set),[A,I]=S.useState(x),[b,O]=S.useState(x);mo(()=>{u&&!y&&!b.length&&(v==null||v())},[y,u,b.length,v]),mo(()=>{k.current=!1;for(let L=0;L<b.length;L++){const F=so(b[L]);C.includes(F)?(T.delete(F),E.current.delete(F)):T.get(F)!==!0&&T.set(F,!1)}},[b,C.length,C.join("-")]);const z=[];if(x!==A){let L=[...x],F=0;for(const $ of b){const Y=C.indexOf(so($));Y===-1?(L.splice(F++,0,$),z.push($)):F=Y+z.length+1}return z.every($=>T.get(so($)))?L=x:c==="wait"&&(L=z),O(_y(L)),I(x),null}const{forceRender:B}=S.useContext(gf);return f.jsx(f.Fragment,{children:b.map(L=>{const F=so(L),$=u&&!y?!1:x===b||C.includes(F),Y=()=>{if(E.current.has(F))return;if(T.has(F))E.current.add(F),T.set(F,!0);else return;let ne=!0;T.forEach(G=>{G||(ne=!1)}),ne&&(B==null||B(),I([]),u&&(v==null||v()),i&&i())};return f.jsx(vP,{isPresent:$,initial:!k.current||s?void 0:!1,custom:n,presenceAffectsLayout:a,mode:c,root:g,onExitComplete:$?void 0:Y,anchorX:h,anchorY:m,children:L},F)})})},v1=S.createContext({strict:!1}),Fy={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 Vy=!1;function wP(){if(Vy)return;const e={};for(const n in Fy)e[n]={isEnabled:s=>Fy[n].some(i=>!!s[i])};e1(e),Vy=!0}function x1(){return wP(),gT()}function SP(e){const n=x1();for(const s in e)n[s]={...n[s],...e[s]};e1(n)}const Ol=S.createContext({});function kP(e,n){if(Ll(e)){const{initial:s,animate:i}=e;return{initial:s===!1||wo(s)?s:void 0,animate:wo(i)?i:void 0}}return e.inherit!==!1?n:{}}function CP(e){const{initial:n,animate:s}=kP(e,S.useContext(Ol));return S.useMemo(()=>({initial:n,animate:s}),[zy(n),zy(s)])}function zy(e){return Array.isArray(e)?e.join(" "):e}const Hf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function w1(e,n,s){for(const i in n)!ut(n[i])&&!r1(i,s)&&(e[i]=n[i])}function EP({transformTemplate:e},n){return S.useMemo(()=>{const s=Hf();return Vf(s,n,e),Object.assign({},s.vars,s.style)},[n])}function jP(e,n){const s=e.style||{},i={};return w1(i,s,e),Object.assign(i,EP(e,n)),i}function TP(e,n){const s={},i=jP(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 S1=()=>({...Hf(),attrs:{}});function PP(e,n,s,i){const a=S.useMemo(()=>{const c=S1();return $x(c,n,i1(i),e.transformTemplate,e.style),{...c.attrs,style:{...c.style}}},[n]);if(e.style){const c={};w1(c,e.style,e),a.style={...c,...a.style}}return a}const NP=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 Tl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||NP.has(e)}function bP(e,n){return e.startsWith("on")?!Tl(e):(n==null?void 0:n(e))??!Tl(e)}function MP(e,n,s,i){const a={};for(const c in e)c==="values"&&typeof e.values=="object"||ut(e[c])||(bP(c,i)||s===!0&&Tl(c)||!n&&!Tl(c)||e.draggable&&c.startsWith("onDrag"))&&(a[c]=e[c]);return a}const RP=["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 Qf(e){return typeof e!="string"||e.includes("-")?!1:!!(RP.indexOf(e)>-1||/[A-Z]/u.test(e))}function DP(e,n,s,{latestValues:i},a,c=!1,u,h){const g=(u??Qf(e)?PP:TP)(n,i,a,e),y=MP(n,typeof e=="string",c,h),v=e!==S.Fragment?{...y,...g,ref:s}:{},{children:x}=n,C=S.useMemo(()=>ut(x)?x.get():x,[x]);return S.createElement(e,{...v,children:C})}function AP({scrapeMotionValuesFromProps:e,createRenderState:n},s,i,a){return{latestValues:LP(s,i,a,e),renderState:n()}}function LP(e,n,s,i){const a={},c=i(e,{});for(const x in c)a[x]=ul(c[x]);let{initial:u,animate:h}=e;const m=Ll(e),g=Zx(e);n&&g&&!m&&e.inherit!==!1&&(u===void 0&&(u=n.initial),h===void 0&&(h=n.animate));let y=s?s.initial===!1:!1;y=y||u===!1;const v=y?h:u;if(v&&typeof v!="boolean"&&!Al(v)){const x=Array.isArray(v)?v:[v];for(let C=0;C<x.length;C++){const k=Ox(e,x[C]);if(k){const{transitionEnd:T,transition:E,...A}=k;for(const I in A){let b=A[I];if(Array.isArray(b)){const O=y?b.length-1:0;b=b[O]}b!==null&&(a[I]=b)}for(const I in T)a[I]=T[I]}}}return a}const k1=e=>(n,s)=>{const i=S.useContext(Ol),a=S.useContext(Ml),c=()=>AP(e,n,i,a);return s?c():yf(c)},OP=k1({scrapeMotionValuesFromProps:Kf,createRenderState:Hf}),IP=k1({scrapeMotionValuesFromProps:o1,createRenderState:S1}),_P=Symbol.for("motionComponentSymbol");function FP(e,n,s){const i=S.useRef(s);S.useInsertionEffect(()=>{i.current=s});const a=S.useRef(null);return S.useCallback(c=>{var h;c&&((h=e.onMount)==null||h.call(e,c)),n&&(c?n.mount(c):n.unmount());const u=i.current;if(typeof u=="function")if(c){const m=u(c);typeof m=="function"&&(a.current=m)}else a.current?(a.current(),a.current=null):u(c);else u&&(u.current=c)},[n])}const C1=S.createContext({});function Fs(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function VP(e,n,s,i,a,c){var b,O;const{visualElement:u}=S.useContext(Ol),h=S.useContext(v1),m=S.useContext(Ml),g=S.useContext(Wf),y=g.reducedMotion,v=g.skipAnimations,x=S.useRef(null),C=S.useRef(!1);i=i||h.renderer,!x.current&&i&&(x.current=i(e,{visualState:n,parent:u,props:s,presenceContext:m,blockInitialAnimation:m?m.initial===!1:!1,reducedMotionConfig:y,skipAnimations:v,isSVG:c}),C.current&&x.current&&(x.current.manuallyAnimateOnMount=!0));const k=x.current,T=S.useContext(C1);k&&!k.projection&&a&&(k.type==="html"||k.type==="svg")&&zP(x.current,s,a,T);const E=S.useRef(!1);S.useInsertionEffect(()=>{k&&E.current&&k.update(s,m)});const A=s[Fx],I=S.useRef(!!A&&typeof window<"u"&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,A))&&((O=window.MotionHasOptimisedAnimation)==null?void 0:O.call(window,A)));return mo(()=>{var z;!C.current||!k||((z=k.animationState)==null||z.animateChanges(),k.enteringChildren=void 0)},[]),mo(()=>{C.current=!0,k&&(E.current=!0,window.MotionIsMounted=!0,k.updateFeatures(),k.scheduleRenderMicrotask(),I.current&&k.animationState&&k.animationState.animateChanges())}),S.useEffect(()=>{k&&(!I.current&&k.animationState&&k.animationState.animateChanges(),I.current&&(queueMicrotask(()=>{var z;(z=window.MotionHandoffMarkAsComplete)==null||z.call(window,A)}),I.current=!1),k.enteringChildren=void 0)}),k}function zP(e,n,s,i){const{layoutId:a,layout:c,drag:u,dragConstraints:h,layoutScroll:m,layoutRoot:g,layoutAnchor:y,layoutCrossfade:v}=n;e.projection=new s(e.latestValues,n["data-framer-portal-id"]?void 0:E1(e.parent)),e.projection.setOptions({layoutId:a,layout:c,alwaysMeasureLayout:!!u||h&&Fs(h),visualElement:e,animationType:typeof c=="string"?c:"both",initialPromotionConfig:i,crossfade:v,layoutScroll:m,layoutRoot:g,layoutAnchor:y})}function E1(e){if(e)return e.options.allowProjection!==!1?e.projection:E1(e.parent)}function ed(e,{forwardMotionProps:n=!1,type:s}={},i,a){i&&SP(i);const c=s?s==="svg":Qf(e),u=c?IP:OP;function h(g,y){let v;const x={...S.useContext(Wf),...g,layoutId:UP(g)},{isStatic:C,isValidProp:k}=x,T=CP(g),E=u(g,C);if(!C&&typeof window<"u"){BP();const A=$P(x);v=A.MeasureLayout,T.visualElement=VP(e,E,x,a,A.ProjectionNode,c)}return f.jsxs(Ol.Provider,{value:T,children:[v&&T.visualElement?f.jsx(v,{visualElement:T.visualElement,...x}):null,DP(e,g,FP(E,T.visualElement,y),E,C,n,c,k)]})}h.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const m=S.forwardRef(h);return m[_P]=e,m}function UP({layoutId:e}){const n=S.useContext(gf).id;return n&&e!==void 0?n+"-"+e:e}function BP(e,n){S.useContext(v1).strict}function $P(e){const n=x1(),{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 KP(e,n){if(typeof Proxy>"u")return ed;const s=new Map,i=(c,u)=>ed(c,u,e,n),a=(c,u)=>i(c,u);return new Proxy(a,{get:(c,u)=>u==="create"?i:(s.has(u)||s.set(u,ed(u,void 0,e,n)),s.get(u))})}const WP=(e,n)=>n.isSVG??Qf(e)?new ST(n):new xT(n,{allowProjection:e!==S.Fragment});class HP extends br{constructor(n){super(n),n.animationState||(n.animationState=CT(n))}updateAnimationControlsSubscription(){const{animate:n}=this.node.getProps();Al(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 QP=0;class qP extends br{constructor(){super(...arguments),this.id=QP++}update(){var m;const{presenceContext:n,prevPresenceContext:s,animationState:i}=this.node;if(!n||!i)return;const{isPresent:a,onExitComplete:c}=n,u=s==null?void 0:s.isPresent;if(a===u)return;if(a&&u===!1){if(this.exit===!0){const{initial:g}=this.node.getProps();if(g&&!Array.isArray(g)){const{transition:y,transitionEnd:v,...x}=as(this.node,g)||{};for(const C in x)(m=this.node.getValue(C))==null||m.jump(x[C])}this.node.blockInitialAnimation=!1,i.reset(),i.animateChanges()}else i.setActive("exit",!1);this.exit=void 0;return}const h=this.exit=i.setActive("exit",!a);c&&!a&&h.then(()=>{this.exit===h&&(this.exit=!0,c(this.id))})}mount(){const{register:n,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),n&&(this.unmount=n(this.id))}unmount(){}}const GP={animation:{Feature:HP},exit:{Feature:qP}};function Il(e){return{point:{x:e.pageX,y:e.pageY}}}const YP=e=>n=>Uf(n)&&e(n,Il(n));function co(e,n,s,i){return ko(e,n,YP(s),i)}const j1=({current:e})=>e?e.ownerDocument.defaultView:null,Uy=(e,n)=>Math.abs(e-n);function XP(e,n){const s=Uy(e.x,n.x),i=Uy(e.y,n.y);return Math.sqrt(s**2+i**2)}const By=new Set(["auto","scroll"]);class T1{constructor(n,s,{transformPagePoint:i,contextWindow:a=window,dragSnapToOrigin:c=!1,distanceThreshold:u=3,element:h}={}){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=k=>{this.handleScroll(k.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ya(this.lastRawMoveEventInfo,this.transformPagePoint));const k=td(this.lastMoveEventInfo,this.history),T=this.startEvent!==null,E=XP(k.offset,{x:0,y:0})>=this.distanceThreshold;if(!T&&!E)return;const{point:A}=k;this.history.push({...A,timestamp:lt.now()});const{onStart:I,onMove:b}=this.handlers;T||(I&&I(this.lastMoveEvent,k),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,k)},this.handlePointerMove=(k,T)=>{this.lastMoveEvent=k,this.lastRawMoveEventInfo=T,this.lastMoveEventInfo=Ya(T,this.transformPagePoint),this.hasPendingMove=!0,Re.update(this.updatePoint,!0)},this.handlePointerUp=(k,T)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:E,onSessionEnd:A,resumeAnimation:I}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&I&&I(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=td(k.type==="pointercancel"?this.lastMoveEventInfo:Ya(T,this.transformPagePoint),this.history);this.startEvent&&E&&E(k,b),A&&A(k,b)},!Uf(n))return;this.dragSnapToOrigin=c,this.handlers=s,this.transformPagePoint=i,this.distanceThreshold=u,this.contextWindow=a||window;const m=Il(n),g=Ya(m,this.transformPagePoint),{point:y}=g,{timestamp:v}=Je;this.history=[{...y,timestamp:v}];const{onSessionStart:x}=s;x&&x(n,td(g,this.history));const C={passive:!0,capture:!0};this.removeListeners=bo(co(this.contextWindow,"pointermove",this.handlePointerMove,C),co(this.contextWindow,"pointerup",this.handlePointerUp,C),co(this.contextWindow,"pointercancel",this.handlePointerUp,C)),h&&this.startScrollTracking(h)}startScrollTracking(n){let s=n.parentElement;for(;s;){const i=getComputedStyle(s);(By.has(i.overflowX)||By.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},c={x:a.x-s.x,y:a.y-s.y};c.x===0&&c.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=c.x,this.lastMoveEventInfo.point.y+=c.y):this.history.length>0&&(this.history[0].x-=c.x,this.history[0].y-=c.y),this.scrollPositions.set(n,a),Re.update(this.updatePoint,!0))}updateHandlers(n){this.handlers=n}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Pr(this.updatePoint)}}function Ya(e,n){return n?{point:n(e.point)}:e}function $y(e,n){return{x:e.x-n.x,y:e.y-n.y}}function td({point:e},n){return{point:e,delta:$y(e,P1(n)),offset:$y(e,ZP(n)),velocity:JP(n,.1)}}function ZP(e){return e[0]}function P1(e){return e[e.length-1]}function JP(e,n){if(e.length<2)return{x:0,y:0};let s=e.length-1,i=null;const a=P1(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 c=$t(a.timestamp-i.timestamp);if(c===0)return{x:0,y:0};const u={x:(a.x-i.x)/c,y:(a.y-i.y)/c};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function eN(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 Ky(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 tN(e,{top:n,left:s,bottom:i,right:a}){return{x:Ky(e.x,s,a),y:Ky(e.y,n,i)}}function Wy(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 nN(e,n){return{x:Wy(e.x,n.x),y:Wy(e.y,n.y)}}function rN(e,n){let s=.5;const i=St(e),a=St(n);return a>i?s=go(n.min,n.max-i,e.min):i>a&&(s=go(e.min,e.max-a,n.min)),$n(0,1,s)}function sN(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 Xd=.35;function iN(e=Xd){return e===!1?e=0:e===!0&&(e=Xd),{x:Hy(e,"left","right"),y:Hy(e,"top","bottom")}}function Hy(e,n,s){return{min:Qy(e,n),max:Qy(e,s)}}function Qy(e,n){return typeof e=="number"?e:e[n]||0}const oN=new WeakMap;class aN{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 c=v=>{s&&this.snapToCursor(v),this.stopAnimation()},u=(v,x)=>{const{drag:C,dragPropagation:k,onDragStart:T}=this.getProps();if(C&&!k&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Gj(C),!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),gn(A=>{let I=this.getAxisMotionValue(A).get()||0;if(Cn.test(I)){const{projection:b}=this.visualElement;if(b&&b.layout){const O=b.layout.layoutBox[A];O&&(I=St(O)*(parseFloat(I)/100))}}this.originPoint[A]=I}),T&&Re.update(()=>T(v,x),!1,!0),Wd(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},h=(v,x)=>{this.latestPointerEvent=v,this.latestPanInfo=x;const{dragPropagation:C,dragDirectionLock:k,onDirectionLock:T,onDrag:E}=this.getProps();if(!C&&!this.openDragLock)return;const{offset:A}=x;if(k&&this.currentDirection===null){this.currentDirection=uN(A),this.currentDirection!==null&&T&&T(this.currentDirection);return}this.updateAxis("x",x.point,A),this.updateAxis("y",x.point,A),this.visualElement.render(),E&&Re.update(()=>E(v,x),!1,!0)},m=(v,x)=>{this.latestPointerEvent=v,this.latestPanInfo=x,this.stop(v,x),this.latestPointerEvent=null,this.latestPanInfo=null},g=()=>{const{dragSnapToOrigin:v}=this.getProps();(v||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:y}=this.getProps();this.panSession=new T1(n,{onSessionStart:c,onStart:u,onMove:h,onSessionEnd:m,resumeAnimation:g},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:y,distanceThreshold:i,contextWindow:j1(this.visualElement),element:this.visualElement.current})}stop(n,s){const i=n||this.latestPointerEvent,a=s||this.latestPanInfo,c=this.isDragging;if(this.cancel(),!c||!a||!i)return;const{velocity:u}=a;this.startAnimation(u);const{onDragEnd:h}=this.getProps();h&&Re.postRender(()=>h(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||!Xa(n,a,this.currentDirection))return;const c=this.getAxisMotionValue(n);let u=this.originPoint[n]+i[n];this.constraints&&this.constraints[n]&&(u=eN(u,this.constraints[n],this.elastic[n])),c.set(u)}resolveConstraints(){var c;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(c=this.visualElement.projection)==null?void 0:c.layout,a=this.constraints;n&&Fs(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=tN(i.layoutBox,n):this.constraints=!1,this.elastic=iN(s),a!==this.constraints&&!Fs(n)&&i&&this.constraints&&!this.hasMutatedConstraints&&gn(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=sN(i.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:n,onMeasureDragConstraints:s}=this.getProps();if(!n||!Fs(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 c=qj(i,a.root,this.visualElement.getTransformPagePoint());let u=nN(a.layout.layoutBox,c);if(s){const h=s(Wj(u));this.hasMutatedConstraints=!!h,h&&(u=Kx(h))}return u}startAnimation(n){const{drag:s,dragMomentum:i,dragElastic:a,dragTransition:c,dragSnapToOrigin:u,onDragTransitionEnd:h}=this.getProps(),m=this.constraints||{},g=gn(y=>{if(!Xa(y,s,this.currentDirection))return;let v=m&&m[y]||{};(u===!0||u===y)&&(v={min:0,max:0});const x=a?200:1e6,C=a?40:1e7,k={type:"inertia",velocity:i?n[y]:0,bounceStiffness:x,bounceDamping:C,timeConstant:750,restDelta:1,restSpeed:10,...c,...v};return this.startAxisValueAnimation(y,k)});return Promise.all(g).then(h)}startAxisValueAnimation(n,s){const i=this.getAxisMotionValue(n);return Wd(this.visualElement,n),i.start(Of(n,i,0,s,this.visualElement,!1))}stopAnimation(){gn(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 h;const{drag:i}=this.getProps(),a={x:n,y:s},c=((h=this.visualElement.getTransformPagePoint())==null?void 0:h(a))||a,u=this.visualElement.measureViewportBox();gn(m=>{if(!Xa(m,i,this.currentDirection))return;const g=this.getAxisMotionValue(m),{min:y,max:v}=u[m];g.set((g.get()||0)+c[m]-Me(y,v,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:n,dragConstraints:s}=this.getProps(),{projection:i}=this.visualElement;if(!Fs(s)||!i||!this.constraints)return;this.stopAnimation();const a=this.constraints,c={x:0,y:0};gn(h=>{const m=this.getAxisMotionValue(h).get();c[h]=rN({min:m,max:m},a[h])});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),gn(h=>{const m=this.getAxisMotionValue(h);if(!Xa(h,n,null)||!m.get())return;const{min:g,max:y}=this.constraints[h];m.set(Me(g,y,c[h]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;oN.set(this.visualElement,this);const n=this.visualElement.current,s=co(n,"pointerdown",g=>{const{drag:y,dragListener:v=!0}=this.getProps(),x=g.target,C=x!==n&&tT(x);y&&v&&!C&&this.start(g)});let i;const a=()=>{const{dragConstraints:g}=this.getProps();Fs(g)&&g.current&&(this.constraints=this.resolveRefConstraints(),i||(i=lN(n,g.current,()=>this.scalePositionWithinConstraints())))},{projection:c}=this.visualElement,u=c.addEventListener("measure",a);c&&!c.layout&&(c.root&&c.root.updateScroll(),c.updateLayout()),Re.read(a);const h=ko(window,"resize",()=>this.scalePositionWithinConstraints()),m=c.addEventListener("didUpdate",(({delta:g,hasLayoutChanged:y})=>{this.isDragging&&y&&(gn(v=>{const x=this.getAxisMotionValue(v);x&&(this.originPoint[v]+=g[v].translate,x.set(x.get()+g[v].translate))}),this.visualElement.render())}));return()=>{h(),s(),u(),m&&m(),i&&i()}}getProps(){const n=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:i=!1,dragPropagation:a=!1,dragConstraints:c=!1,dragElastic:u=Xd,dragMomentum:h=!0}=n;return{...n,drag:s,dragDirectionLock:i,dragPropagation:a,dragConstraints:c,dragElastic:u,dragMomentum:h}}}function qy(e){let n=!0;return()=>{if(n){n=!1;return}e()}}function lN(e,n,s){const i=oy(e,qy(s)),a=oy(n,qy(s));return()=>{i(),a()}}function Xa(e,n,s){return(n===!0||n===e)&&(s===null||s===e)}function uN(e,n=10){let s=null;return Math.abs(e.y)>n?s="y":Math.abs(e.x)>n&&(s="x"),s}class cN extends br{constructor(n){super(n),this.removeGroupControls=ln,this.removeListeners=ln,this.controls=new aN(n)}mount(){const{dragControls:n}=this.node.getProps();n&&(this.removeGroupControls=n.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ln}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 nd=e=>(n,s)=>{e&&Re.update(()=>e(n,s),!1,!0)};class dN extends br{constructor(){super(...arguments),this.removePointerDownListener=ln}onPointerDown(n){this.session=new T1(n,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:j1(this.node)})}createPanHandlers(){const{onPanSessionStart:n,onPanStart:s,onPan:i,onPanEnd:a}=this.node.getProps();return{onSessionStart:nd(n),onStart:nd(s),onMove:nd(i),onEnd:(c,u)=>{delete this.session,a&&Re.postRender(()=>a(c,u))}}}mount(){this.removePointerDownListener=co(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 rd=!1;class fN extends S.Component{componentDidMount(){const{visualElement:n,layoutGroup:s,switchLayoutGroup:i,layoutId:a}=this.props,{projection:c}=n;c&&(s.group&&s.group.add(c),i&&i.register&&a&&i.register(c),rd&&c.root.didUpdate(),c.addEventListener("animationComplete",()=>{this.safeToRemove()}),c.setOptions({...c.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),cl.hasEverUpdated=!0}getSnapshotBeforeUpdate(n){const{layoutDependency:s,visualElement:i,drag:a,isPresent:c}=this.props,{projection:u}=i;return u&&(u.isPresent=c,n.layoutDependency!==s&&u.setOptions({...u.options,layoutDependency:s}),rd=!0,a||n.layoutDependency!==s||s===void 0||n.isPresent!==c?u.willUpdate():this.safeToRemove(),n.isPresent!==c&&(c?u.promote():u.relegate()||Re.postRender(()=>{const h=u.getStack();(!h||!h.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:n,layoutAnchor:s}=this.props,{projection:i}=n;i&&(i.options.layoutAnchor=s,i.root.didUpdate(),zf.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:n,layoutGroup:s,switchLayoutGroup:i}=this.props,{projection:a}=n;rd=!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 N1(e){const[n,s]=y1(),i=S.useContext(gf);return f.jsx(fN,{...e,layoutGroup:i,switchLayoutGroup:S.useContext(C1),isPresent:n,safeToRemove:s})}const hN={pan:{Feature:dN},drag:{Feature:cN,ProjectionNode:g1,MeasureLayout:N1}};function Gy(e,n,s){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",s==="Start");const a="onHover"+s,c=i[a];c&&Re.postRender(()=>c(n,Il(n)))}class pN extends br{mount(){const{current:n}=this.node;n&&(this.unmount=Xj(n,(s,i)=>(Gy(this.node,i,"Start"),a=>Gy(this.node,a,"End"))))}unmount(){}}class mN extends br{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=bo(ko(this.node.current,"focus",()=>this.onFocus()),ko(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Yy(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),c=i[a];c&&Re.postRender(()=>c(n,Il(n)))}class gN extends br{mount(){const{current:n}=this.node;if(!n)return;const{globalTapTarget:s,propagate:i}=this.node.props;this.unmount=rT(n,(a,c)=>(Yy(this.node,c,"Start"),(u,{success:h})=>Yy(this.node,u,h?"End":"Cancel")),{useGlobalTarget:s,stopPropagation:(i==null?void 0:i.tap)===!1})}unmount(){}}const Zd=new WeakMap,sd=new WeakMap,yN=e=>{const n=Zd.get(e.target);n&&n(e)},vN=e=>{e.forEach(yN)};function xN({root:e,...n}){const s=e||document;sd.has(s)||sd.set(s,{});const i=sd.get(s),a=JSON.stringify(n);return i[a]||(i[a]=new IntersectionObserver(vN,{root:e,...n})),i[a]}function wN(e,n,s){const i=xN(n);return Zd.set(e,s),i.observe(e),()=>{Zd.delete(e),i.unobserve(e)}}const SN={some:0,all:1};class kN extends br{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var m;(m=this.stopObserver)==null||m.call(this);const{viewport:n={}}=this.node.getProps(),{root:s,margin:i,amount:a="some",once:c}=n,u={root:s?s.current:void 0,rootMargin:i,threshold:typeof a=="number"?a:SN[a]},h=g=>{const{isIntersecting:y}=g;if(this.isInView===y||(this.isInView=y,c&&!y&&this.hasEnteredView))return;y&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",y);const{onViewportEnter:v,onViewportLeave:x}=this.node.getProps(),C=y?v:x;C&&C(g)};this.stopObserver=wN(this.node.current,u,h)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:n,prevProps:s}=this.node;["amount","margin","root"].some(CN(n,s))&&this.startObserver()}unmount(){var n;(n=this.stopObserver)==null||n.call(this),this.hasEnteredView=!1,this.isInView=!1}}function CN({viewport:e={}},{viewport:n={}}={}){return s=>e[s]!==n[s]}const EN={inView:{Feature:kN},tap:{Feature:gN},focus:{Feature:mN},hover:{Feature:pN}},jN={layout:{ProjectionNode:g1,MeasureLayout:N1}},TN={...GP,...EN,...hN,...jN},PN=KP(TN,WP);function cn(){!$f.current&&Jx();const[e]=S.useState(Cl.current);return e}const Ht=PN;function NN(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 b1=S.createContext(null);function _l(){const e=S.useContext(b1);if(e===null)throw new Error("useDriveShell must be used within the drive layout");return e}function bN(e){if(!(e instanceof HTMLElement))return!1;const n=e.tagName;return n==="INPUT"||n==="TEXTAREA"||n==="SELECT"||e.isContentEditable}function MN(e,n=!0){const s=S.useRef(e);s.current=e,S.useEffect(()=>{if(!n)return;const i=a=>{const c=a.ctrlKey||a.metaKey,u=bN(a.target),h=s.current;if(c&&a.key.toLowerCase()==="k"){a.preventDefault(),h.onSearch();return}if(c&&a.key.toLowerCase()==="a"){if(u)return;a.preventDefault(),h.onSelectAll();return}if(a.key==="Escape"){h.onEscape();return}if(!u){if(a.key==="Delete"||a.key==="Backspace"){a.preventDefault(),h.onDelete();return}if(a.key==="Enter"){h.onEnter();return}a.key==="?"&&(a.preventDefault(),h.onHelp())}};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[n])}const Do=["me"],qf=["folders","tree"],RN=["storage","stats"],M1={user:null,storage:null,health:null};function cs(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 DN(e,n){e.invalidateQueries({queryKey:["versions",n]})}function Gf(){return Nr({queryKey:Do,queryFn:we.auth.me})}function Xy(e){return typeof e=="object"&&e!==null}function AN(e,n){let s=null;try{s=JSON.parse(n)}catch{}if(Xy(s)&&Xy(s.file)){const i=s.file;if(typeof i.id=="string"&&typeof i.name=="string")return i}throw new jr(e,"UNKNOWN","The server returned an unexpected response")}function R1(e,n,s,i){return new Promise((a,c)=>{const u=new XMLHttpRequest;u.open("POST",e);const h=new FormData;h.append("file",n,n.name),s!==null&&h.append("folderId",s),u.upload.addEventListener("progress",g=>{var v;if(!g.lengthComputable)return;const y=Math.min(100,Math.round(g.loaded/g.total*100));(v=i.onProgress)==null||v.call(i,{loaded:g.loaded,total:g.total,percent:y})}),u.addEventListener("load",()=>{if(u.status>=200&&u.status<300){try{a(AN(u.status,u.responseText))}catch(y){c(y)}return}const g=W0(u.status,u.responseText);u.status===401&&g.code!=="TELEGRAM_AUTH_REQUIRED"&&K0(),c(g)}),u.addEventListener("error",()=>{c(new jr(0,"NETWORK_ERROR","Could not reach the server. Check your connection and try again."))}),u.addEventListener("abort",()=>{c(new jr(0,"ABORTED","Upload cancelled"))});const m=i.signal;if(m!==void 0){if(m.aborted){c(new jr(0,"ABORTED","Upload cancelled"));return}m.addEventListener("abort",()=>u.abort(),{once:!0})}u.send(h)})}function LN(e,n,s={}){return R1("/api/files",e,n,s)}function ON(e,n,s={}){return R1(`/api/files/${encodeURIComponent(n)}/replace`,e,null,s)}const D1=S.createContext(null),IN=4e3;function _N({children:e}){const[n,s]=S.useState([]),i=cn(),a=S.useRef(new Set),c=S.useRef(0);S.useEffect(()=>{const y=a.current;return()=>{for(const v of y)window.clearTimeout(v)}},[]);const u=S.useCallback(y=>{s(v=>v.filter(x=>x.id!==y))},[]),h=S.useCallback((y,v)=>{const x=c.current;c.current+=1,s(k=>[...k,{id:x,kind:y,message:v}]);const C=window.setTimeout(()=>{a.current.delete(C),u(x)},IN);a.current.add(C)},[u]),m=S.useMemo(()=>({success:y=>h("success",y),error:y=>h("error",y)}),[h]),g=i?0:16;return f.jsxs(D1.Provider,{value:m,children:[e,f.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:f.jsx(Mr,{children:n.map(y=>f.jsxs(Ht.div,{role:y.kind==="error"?"alert":"status",initial:{opacity:0,x:g},animate:{opacity:1,x:0},exit:{opacity:0,x:g},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:[y.kind==="error"?f.jsx(s2,{className:"mt-0.5 h-4 w-4 shrink-0 text-bad","aria-hidden":"true"}):f.jsx(ff,{className:"mt-0.5 h-4 w-4 shrink-0 text-gold-text","aria-hidden":"true"}),f.jsx("p",{className:"min-w-0 flex-1 break-words",children:y.message}),f.jsx("button",{type:"button","aria-label":"Dismiss notification",onClick:()=>u(y.id),className:"muted rounded p-0.5 transition-colors hover:bg-bg-soft hover:text-gold-text",children:f.jsx(an,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]},y.id))})})]})}function fs(){const e=S.useContext(D1);if(e===null)throw new Error("useToast must be used within a ToastProvider");return e}let Za=0;function FN(){const e=un(),n=fs(),[s,i]=S.useState([]),a=S.useRef(new Map),c=S.useRef(new Map),u=S.useRef(Promise.resolve()),h=S.useRef(new Set),m=S.useRef(!0),g=S.useRef(null),y=S.useRef(null);S.useEffect(()=>{const B=h.current,L=c.current;return()=>{m.current=!1;for(const F of B)window.clearTimeout(F);for(const F of L.values())F.abort()}},[]);const v=S.useCallback(B=>{const L=window.setTimeout(()=>{h.current.delete(L),i(F=>F.filter($=>$.id!==B)),a.current.delete(B)},5e3);h.current.add(L)},[]),x=S.useCallback(async B=>{const L=new AbortController;c.current.set(B.id,L);try{const F={signal:L.signal,onProgress:({loaded:Y,total:ne,percent:G})=>{i(Z=>Z.map(fe=>fe.id===B.id?{...fe,loaded:Y,size:ne||fe.size,percent:G}:fe))}},$=B.replaceId===null?await LN(B.file,B.folderId,F):await ON(B.file,B.replaceId,F);if(!m.current)return;i(Y=>Y.map(ne=>ne.id===B.id?{...ne,status:"done",percent:100}:ne)),cs(e),B.replaceId!==null&&DN(e,B.replaceId),n.success(B.replaceId===null?`Uploaded "${$.name}"`:`Replaced "${$.name}"`),v(B.id)}catch(F){if(!m.current)return;const $=Qe(F,"Upload failed"),Y=$==="Upload cancelled";i(ne=>ne.map(G=>G.id===B.id?{...G,status:Y?"cancelled":"error",message:$}:G)),Y||n.error(`Could not upload "${B.file.name}": ${$}`)}finally{c.current.delete(B.id)}},[e,v,n]),C=S.useCallback(B=>{a.current.set(B.id,B),i(L=>[...L,{id:B.id,name:B.file.name,size:B.file.size,loaded:0,percent:0,status:"uploading"}]),u.current=u.current.then(()=>x(B))},[x]),k=S.useCallback((B,L)=>{for(const F of B)Za+=1,C({id:Za,file:F,replaceId:null,folderId:L})},[C]),T=S.useCallback((B,L)=>{Za+=1,C({id:Za,file:B,replaceId:L,folderId:null})},[C]),E=S.useCallback(B=>{var L;(L=c.current.get(B))==null||L.abort()},[]),A=S.useCallback(B=>{const L=a.current.get(B);L!==void 0&&(i(F=>F.map($=>$.id===B?{...$,status:"uploading",percent:0,loaded:0,message:void 0}:$)),u.current=u.current.then(()=>x(L)))},[x]),I=S.useCallback(B=>{var L;(L=c.current.get(B))==null||L.abort(),a.current.delete(B),i(F=>F.filter($=>$.id!==B))},[]),b=S.useCallback(()=>{i(B=>{for(const L of B)L.status!=="uploading"&&a.current.delete(L.id);return B.filter(L=>L.status==="uploading")})},[]),O=S.useCallback(B=>{var L;y.current=B,(L=g.current)==null||L.click()},[]),z=S.useCallback(()=>{const B=g.current;if(B===null)return;const L=Array.from(B.files??[]);B.value="",L.length>0&&k(L,y.current)},[k]);return{uploads:s,enqueue:k,replace:T,cancel:E,retry:A,dismiss:I,clearFinished:b,openPicker:O,pickerInputRef:g,onPickerChange:z}}function Ao({title:e,onClose:n,children:s}){const i=S.useRef(null),a=S.useId(),c=cn();return S.useEffect(()=>{const u=h=>{h.key==="Escape"&&n()};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[n]),S.useEffect(()=>{const u=i.current;u!==null&&(u.contains(document.activeElement)||u.focus())},[]),f.jsx("div",{className:"fixed inset-0 z-[150] flex items-center justify-center bg-black/50 p-4 backdrop-blur-sm",onMouseDown:u=>{u.target===u.currentTarget&&n()},children:f.jsxs(Ht.div,{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":a,tabIndex:-1,initial:c?{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:[f.jsxs("div",{className:"mb-4 flex items-start justify-between gap-4",children:[f.jsx("h2",{id:a,className:"text-[15px] font-semibold",children:e}),f.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:f.jsx(an,{className:"h-4 w-4","aria-hidden":"true"})})]}),s]})})}function A1({title:e,label:n,confirmLabel:s,initialValue:i,pending:a,onSubmit:c,onClose:u}){const[h,m]=S.useState(i),g=S.useId(),y=h.trim(),v=y===i.trim(),x=C=>{C.preventDefault(),!(a||y===""||v)&&c(y)};return f.jsx(Ao,{title:e,onClose:u,children:f.jsxs("form",{onSubmit:x,noValidate:!0,children:[f.jsxs("label",{htmlFor:g,className:"grid gap-1.5",children:[f.jsx("span",{className:"text-[13px] font-medium",children:n}),f.jsx("input",{id:g,type:"text",autoFocus:!0,value:h,maxLength:255,disabled:a,onFocus:C=>C.target.select(),onChange:C=>m(C.target.value),className:"input"})]}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2.5",children:[f.jsx("button",{type:"button",className:"btn-ghost",onClick:u,disabled:a,children:"Cancel"}),f.jsxs("button",{type:"submit",className:"btn-gold",disabled:a||y===""||v,children:[a&&f.jsx(Lt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),a?"Saving…":s]})]})]})})}const Zy=["B","KB","MB","GB","TB","PB"];function Nt(e){if(!Number.isFinite(e)||e<=0)return"0 B";let n=e,s=0;for(;n>=1024&&s<Zy.length-1;)n/=1024,s+=1;const i=Zy[s]??"B";return s===0?`${Math.round(n)} ${i}`:`${n.toFixed(1)} ${i}`}function VN(e){const n=new Date(e);return Number.isNaN(n.getTime())?"":n.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function $s(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 zN=[{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 Jd(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,c=Math.abs(a);for(const{limit:u,divisor:h,unit:m}of zN)if(c<u)return i.format(Math.round(a/h),m);return i.format(Math.round(a/31557600),"year")}function Sn(e,n){return`${e} ${n}${e===1?"":"s"}`}function UN(e,n=new Date){const s=new Date(e);if(Number.isNaN(s.getTime()))return"Unknown";const i=c=>new Date(c.getFullYear(),c.getMonth(),c.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 BN={image:f2,video:c2,audio:x2,archive:l2,pdf:Uc,text:Uc,document:Uc,other:u2},$N={image:"Image",video:"Video",audio:"Audio",archive:"Archive",pdf:"PDF",text:"Text",document:"Document",other:"File"},KN={image:"text-gold-text",video:"muted",audio:"muted",archive:"muted",pdf:"muted",text:"muted",document:"muted",other:"muted"};function Vn(e){const n=E2(e);return{Icon:BN[n],label:$N[n],color:KN[n]}}function mi(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 Yf(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 Ja(e){return{kind:e.kind,id:e.id}}function on(e){return`${e.kind}:${e.id}`}function Xf(e){return e==="list"||e==="grid"}function Zf({label:e="Loading"}){return f.jsx("div",{role:"status","aria-label":e,className:"mt-10 flex justify-center",children:f.jsx(Lt,{className:"h-6 w-6 animate-spin text-gold","aria-hidden":"true"})})}const WN="Try type:pdf size:>100MB folder:Projects starred:true after:2026-01-01";function Jy({icon:e,label:n,meta:s,onSelect:i}){return f.jsx("li",{children:f.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,f.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",title:n,children:n}),f.jsx("span",{className:"muted shrink-0 text-[12px]",children:s})]})})}function HN({query:e,onClose:n,onOpenFolder:s,onOpenFile:i}){var g,y;const a=cn(),c=Nr({queryKey:["search",e],queryFn:()=>we.search.query(e),enabled:e!=="",placeholderData:ZS});S.useEffect(()=>{const v=x=>{x.key==="Escape"&&n()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[n]);const u=((g=c.data)==null?void 0:g.folders)??[],h=((y=c.data)==null?void 0:y.files)??[],m=u.length===0&&h.length===0;return f.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:f.jsxs(Ht.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:[f.jsxs("header",{className:"flex items-center gap-3 border-b border-line/70 px-5 py-4",children:[f.jsx(O0,{className:"h-4 w-4 shrink-0 text-gold","aria-hidden":"true"}),f.jsxs("h2",{className:"min-w-0 flex-1 truncate text-[14px] font-semibold",children:["Results for “",e,"”"]}),f.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:f.jsx(an,{className:"h-4 w-4","aria-hidden":"true"})})]}),f.jsx("p",{className:"muted border-b border-line/70 px-5 py-2 font-mono text-[11.5px]",children:WN}),f.jsx("div",{className:"flex-1 overflow-y-auto p-3",children:c.isPending?f.jsx(Zf,{label:"Searching"}):c.error!==null?f.jsx("p",{role:"alert",className:"notice notice-error",children:Qe(c.error,"The search failed.")}):m?f.jsxs("div",{className:"flex flex-col items-center py-12 text-center",children:[f.jsx(S2,{className:"h-7 w-7 text-gold","aria-hidden":"true"}),f.jsxs("p",{className:"muted mt-3 text-sm",children:["No matches for “",e,"”."]})]}):f.jsxs(f.Fragment,{children:[u.length>0?f.jsxs("section",{className:"mb-3",children:[f.jsx("h3",{className:"eyebrow mb-2",children:"Folders"}),f.jsx("ul",{className:"grid gap-0.5",children:u.map(v=>f.jsx(Jy,{icon:f.jsx(fi,{className:"h-4 w-4 shrink-0 text-gold","aria-hidden":"true"}),label:v.name,meta:"Folder",onSelect:()=>s(v)},v.id))})]}):null,h.length>0?f.jsxs("section",{children:[f.jsx("h3",{className:"eyebrow mb-2",children:"Files"}),f.jsx("ul",{className:"grid gap-0.5",children:h.map(v=>{const{Icon:x,color:C,label:k}=Vn(v.mimeType);return f.jsx(Jy,{icon:f.jsx(x,{className:`h-4 w-4 shrink-0 ${C}`,"aria-hidden":"true"}),label:v.name,meta:`${Nt(v.size)} · ${k}`,onSelect:()=>i(mi(v))},v.id)})})]}):null]})})]})})}const QN=[{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 qN({onClose:e}){return f.jsx(Ao,{title:"Keyboard shortcuts",onClose:e,children:f.jsx("dl",{className:"grid gap-2",children:QN.map(n=>f.jsxs("div",{className:"flex items-center justify-between gap-4",children:[f.jsx("dt",{className:"muted text-[13px]",children:n.label}),f.jsx("dd",{children:f.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 GN={DISCONNECTED:"Disconnected",CONNECTING:"Connecting",CONNECTED:"Connected",RECONNECTING:"Reconnecting",ERROR:"Connection error",AUTH_REQUIRED:"Reconnect required"};function YN(e){if(e===null)return{tone:"text-muted",label:"Unknown",usable:!1,hint:null};const n=GN[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 XN=[{id:"drive",label:"My Drive",path:"/",icon:d2,regionLabel:"My Drive"},{id:"recent",label:"Recent",path:"/recent",icon:r0,regionLabel:"Recent files"},{id:"starred",label:"Starred",path:"/starred",icon:us,regionLabel:"Starred items"},{id:"trash",label:"Trash",path:"/trash",icon:Er,regionLabel:"Trash"},{id:"storage",label:"Storage",path:"/storage",icon:po,regionLabel:"Storage"}];function ZN({tone:e,label:n}){return f.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[f.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full bg-current ${e}`,"aria-hidden":"true"}),f.jsx("span",{className:`text-[11px] font-medium ${e}`,children:n})]})}function ev({storage:e,health:n,username:s,onCreateFolder:i,onClose:a}){const c=YN(n);return f.jsxs("div",{className:"flex h-full flex-col bg-bg-soft",children:[f.jsxs("div",{className:"flex items-center justify-between px-4 pt-4 pb-2",children:[f.jsx("span",{className:"eyebrow",children:"Drive"}),a!==void 0?f.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:f.jsx(an,{className:"h-4 w-4","aria-hidden":"true"})}):null]}),f.jsx("nav",{"aria-label":"Main",className:"px-3",children:f.jsx("ul",{className:"grid gap-0.5",children:XN.map(u=>{const h=u.icon;return f.jsx("li",{children:f.jsxs(FC,{to:u.path,end:u.path==="/",onClick:()=>a==null?void 0:a(),className:({isActive:m})=>`flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm transition-colors ${m?"bg-surface font-medium text-gold-text":"muted hover:bg-surface hover:text-gold-text"}`,children:[f.jsx(h,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),u.label]})},u.id)})})}),f.jsx("div",{className:"px-3 pt-3",children:f.jsxs("button",{type:"button",className:"btn-secondary w-full justify-center",onClick:i,children:[f.jsx(y0,{className:"h-4 w-4","aria-hidden":"true"}),"New folder"]})}),f.jsx("div",{className:"mt-auto p-3",children:f.jsxs("div",{className:"rounded-2xl border border-line bg-surface p-4",children:[f.jsxs("div",{className:"flex items-center gap-2.5",children:[f.jsx(o0,{className:"h-5 w-5 shrink-0 text-gold","aria-hidden":"true"}),f.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"})]}),f.jsx("div",{className:"mt-2",children:n!==null?f.jsx(ZN,{tone:c.tone,label:c.label}):f.jsx("span",{className:"muted text-[11px]",children:"Status unknown"})}),c.hint!==null?f.jsx("p",{className:`mt-1.5 text-[11px] leading-snug ${c.tone}`,children:c.hint}):null,f.jsxs("p",{className:"muted mt-2 flex items-center gap-1.5 font-mono text-[11px] uppercase tracking-wide",children:[f.jsx(po,{className:"h-3 w-3","aria-hidden":"true"}),(e==null?void 0:e.provider)??"—"]}),f.jsx("div",{className:"hairline mt-3"}),s!==null&&s!==""?f.jsxs("p",{className:"muted mt-2.5 truncate font-mono text-[11px] select-all",children:["@",s]}):null]})})]})}const tv="omnicloud:theme-changed";function JN(e){const n=s=>e(s.detail);return window.addEventListener(tv,n),()=>window.removeEventListener(tv,n)}const eb=450;function tb(){return document.documentElement.dataset.theme==="light"?"light":"dark"}function nb({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[f.jsx("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"}),f.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 rb({size:e=16}){return f.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[f.jsx("circle",{cx:"12",cy:"12",r:"3.6"}),f.jsx("path",{d:"M12 1.6 13.6 4.6 12 7.6 10.4 4.6Z"}),f.jsx("path",{d:"M12 16.4 13.6 19.4 12 22.4 10.4 19.4Z"}),f.jsx("path",{d:"M1.6 12 4.6 10.4 7.6 12 4.6 13.6Z"}),f.jsx("path",{d:"M16.4 12 19.4 10.4 22.4 12 19.4 13.6Z"})]})}function L1({compact:e=!1}){const[n,s]=S.useState(tb),i=cn();S.useEffect(()=>JN(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 c=n==="dark"?"light":"dark";function u(){if(!i){const g=document.documentElement;g.classList.add("theme-anim"),window.clearTimeout(a.current),a.current=window.setTimeout(()=>g.classList.remove("theme-anim"),eb)}s(c)}const h=e?15:16,m=n==="light"?f.jsx(nb,{size:h}):f.jsx(rb,{size:h});return f.jsx("button",{type:"button",onClick:u,"aria-label":`Switch to ${c} theme`,title:`Switch to ${c} theme`,className:`theme-toggle relative grid place-items-center rounded-full ${e?"h-7 w-7":"h-9 w-9"}`,children:i?m:f.jsx(Mr,{mode:"wait",initial:!1,children:f.jsx(Ht.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:m},n)})})}function sb({storage:e,displayName:n,username:s,search:i,onUpload:a,onToggleSidebar:c,onOpenHelp:u,onSignOut:h,signingOut:m}){const[g,y]=S.useState(!1),v=cn(),x=n.charAt(0).toUpperCase()||"?",C=S.useCallback(()=>y(!1),[]);S.useEffect(()=>{if(!g)return;const E=I=>{var b,O;(O=(b=I.target).closest)!=null&&O.call(b,"[data-account-menu]")||y(!1)},A=I=>{I.key==="Escape"&&y(!1)};return document.addEventListener("pointerdown",E),document.addEventListener("keydown",A),()=>{document.removeEventListener("pointerdown",E),document.removeEventListener("keydown",A)}},[g]);const k=v?0:-6,T=S.useId();return f.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:[f.jsx("button",{type:"button","aria-label":"Open navigation",onClick:c,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:f.jsx(v2,{className:"h-5 w-5","aria-hidden":"true"})}),f.jsxs("a",{href:"/",className:"flex shrink-0 items-center gap-2.5 text-[15px] font-semibold tracking-tight",children:[f.jsx("span",{className:"text-lg leading-none text-gold",children:"◈"}),f.jsxs("span",{className:"hidden sm:inline",children:["Omni",f.jsx("span",{className:"muted font-normal",children:"Cloud"})]})]}),f.jsxs("div",{className:"relative ml-1 min-w-0 max-w-md flex-1",children:[f.jsx("label",{htmlFor:T,className:"sr-only",children:"Search files and folders"}),f.jsx(O0,{className:"muted pointer-events-none absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2","aria-hidden":"true"}),f.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"})]}),f.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2.5",children:[f.jsx("button",{type:"button",onClick:u,"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:f.jsx(p2,{className:"h-4 w-4","aria-hidden":"true"})}),f.jsxs("button",{type:"button",className:"btn-gold hidden px-3.5 py-2 text-[13px] sm:inline-flex",onClick:a,children:[f.jsx(ml,{className:"h-4 w-4","aria-hidden":"true"}),"Upload"]}),f.jsx(L1,{}),f.jsxs("div",{className:"relative","data-account-menu":!0,children:[f.jsx("button",{type:"button","aria-label":"Account","aria-haspopup":"menu","aria-expanded":g,onClick:()=>y(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}),f.jsx(Mr,{children:g?f.jsxs(Ht.div,{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 right-0 z-50 mt-2 w-60",children:[f.jsxs("div",{className:"border-b border-line/70 px-3 py-2.5",children:[f.jsx("p",{className:"truncate text-[13px] font-semibold",children:n}),f.jsx("p",{className:"muted truncate text-[12px]",children:s!==null&&s!==""?`@${s}`:"Telegram account"})]}),f.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[f.jsx(po,{className:"h-4 w-4 shrink-0 text-gold","aria-hidden":"true"}),f.jsxs("span",{className:"min-w-0 flex-1",children:[f.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"}),f.jsx("span",{className:"muted block truncate text-[11px] uppercase tracking-wide",children:(e==null?void 0:e.provider)??"—"})]})]}),f.jsxs("button",{type:"button",onClick:()=>{C(),h()},disabled:m,className:"menu-item menu-item-danger",children:[f.jsx(y2,{className:"h-4 w-4","aria-hidden":"true"}),m?"Signing out...":"Sign out"]})]},"account-menu"):null})]})]})]})}function ib(e){return e==="uploading"?f.jsx(Lt,{className:"h-4 w-4 shrink-0 animate-spin text-gold-text","aria-hidden":"true"}):e==="done"?f.jsx(ff,{className:"h-4 w-4 shrink-0 text-ok","aria-hidden":"true"}):e==="cancelled"?f.jsx(an,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}):f.jsx(an,{className:"h-4 w-4 shrink-0 text-bad","aria-hidden":"true"})}function ob({uploads:e,onCancel:n,onRetry:s,onDismiss:i,onClearFinished:a}){if(e.length===0)return null;const c=e.some(u=>u.status!=="uploading");return f.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:[f.jsxs("header",{className:"flex items-center justify-between border-b border-line/70 px-4 py-3",children:[f.jsxs("h2",{className:"flex items-center gap-2 text-[13px] font-semibold",children:[f.jsx(ml,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"Uploads"]}),c?f.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]}),f.jsx("ul",{className:"max-h-72 divide-y divide-line/70 overflow-y-auto p-1.5",children:e.map(u=>f.jsxs("li",{className:"px-2.5 py-2.5",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[ib(u.status),f.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px]",title:u.name,children:u.name}),u.status==="uploading"?f.jsxs("span",{className:"muted shrink-0 text-[12px] tabular-nums",children:[Nt(u.loaded)," / ",Nt(u.size)]}):f.jsx("span",{className:"muted shrink-0 text-[12px] tabular-nums",children:Nt(u.size)})]}),u.status==="uploading"?f.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[f.jsx("div",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-surface-2",children:f.jsx("div",{className:"progress-fill",style:{width:`${u.percent}%`}})}),f.jsxs("span",{className:"muted w-9 shrink-0 text-right text-[11px] tabular-nums",children:[u.percent,"%"]}),f.jsx("button",{type:"button","aria-label":`Cancel upload of ${u.name}`,onClick:()=>n(u.id),className:"muted rounded p-0.5 transition-colors hover:bg-bg-soft hover:text-bad",children:f.jsx(an,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]}):u.status==="error"||u.status==="cancelled"?f.jsxs("div",{className:"mt-1.5 flex items-center justify-between gap-2",children:[f.jsx("p",{className:`min-w-0 flex-1 text-xs ${u.status==="error"?"text-bad":"muted"}`,children:u.message??"Cancelled"}),f.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(u.id),children:[f.jsx(pf,{className:"h-3.5 w-3.5","aria-hidden":"true"}),"Retry"]}),f.jsx("button",{type:"button","aria-label":`Dismiss upload of ${u.name}`,onClick:()=>i(u.id),className:"muted shrink-0 rounded p-0.5 transition-colors hover:bg-bg-soft hover:text-gold-text",children:f.jsx(an,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]}):f.jsx("div",{className:"mt-1.5 flex justify-end",children:f.jsx("button",{type:"button","aria-label":`Dismiss upload of ${u.name}`,onClick:()=>i(u.id),className:"muted rounded p-0.5 transition-colors hover:bg-bg-soft hover:text-gold-text",children:f.jsx(an,{className:"h-3.5 w-3.5","aria-hidden":"true"})})})]},u.id))})]})}function ab(){var le,q,D;const e=Gf(),n=un(),s=di(),i=fs(),a=FN(),c=cn(),u=((le=e.data)==null?void 0:le.storage)??null,h=((q=e.data)==null?void 0:q.health)??null,m=S.useRef(null),[g,y]=S.useState(""),x=NN(g,300).trim(),[C,k]=S.useState(!1),[T,E]=S.useState(!1),[A,I]=S.useState(!1),[b,O]=S.useState(null),[z,B]=S.useState(null),L=S.useRef(null);L.current=z;const F=Kt({mutationFn:R=>we.folders.create(R,b),onSuccess:R=>{cs(n),I(!1),i.success(`Created "${R.folder.name}"`)},onError:R=>i.error(Qe(R,"Could not create folder"))}),$=Kt({mutationFn:we.auth.logout,onSuccess:()=>{n.setQueryData(Do,M1),n.removeQueries({predicate:R=>R.queryKey[0]!=="me"})},onError:R=>i.error(Qe(R,"Could not sign out"))}),Y=S.useCallback(()=>{var R,ee;(R=m.current)==null||R.focus(),(ee=m.current)==null||ee.select()},[]),ne=S.useCallback(()=>y(""),[]);MN({onSearch:Y,onDelete:()=>{var R,ee;return(ee=(R=L.current)==null?void 0:R.onDelete)==null?void 0:ee.call(R)},onEnter:()=>{var R,ee;return(ee=(R=L.current)==null?void 0:R.onEnter)==null?void 0:ee.call(R)},onSelectAll:()=>{var R,ee;return(ee=(R=L.current)==null?void 0:R.onSelectAll)==null?void 0:ee.call(R)},onEscape:()=>{var R,ee;(ee=(R=L.current)==null?void 0:R.onEscape)==null||ee.call(R),T?E(!1):C?k(!1):x!==""&&y("")},onHelp:()=>E(R=>!R)},!0),S.useEffect(()=>{if(C)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[C]);const G=((D=e.data)==null?void 0:D.user)??null,Z=G!==null?G.firstName??G.username??"Account":"Account",fe=(G==null?void 0:G.username)??null,Le={uploads:a,activeFolderId:b,setActiveFolderId:O,openCreateFolder:()=>I(!0),clearSearch:ne,openShortcuts:()=>E(!0),searchInputRef:m,registerPageShortcuts:B},ye=R=>{y(""),s(`/?folder=${encodeURIComponent(R)}`)},Se=R=>{R.file!==null&&we.files.download(R.file.id),ne()},X=c?0:-20;return f.jsx(b1.Provider,{value:Le,children:f.jsxs("div",{className:"flex h-dvh",children:[f.jsx("a",{href:"#main",className:"skip-link btn-gold",children:"Skip to content"}),f.jsx("aside",{className:"hidden w-60 shrink-0 border-r border-line md:block",children:f.jsx(ev,{storage:u,health:h,username:fe,onCreateFolder:()=>I(!0)})}),f.jsx(Mr,{children:C?f.jsxs("div",{className:"fixed inset-0 z-[80] md:hidden",children:[f.jsx(Ht.div,{className:"absolute inset-0 bg-black/50",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>k(!1),"aria-hidden":"true"}),f.jsx(Ht.div,{initial:{x:X,opacity:0},animate:{x:0,opacity:1},exit:{x:X,opacity:0},transition:{duration:.2,ease:"easeOut"},className:"absolute top-0 bottom-0 left-0 w-64 border-r border-line",children:f.jsx(ev,{storage:u,health:h,username:fe,onCreateFolder:()=>{k(!1),I(!0)},onClose:()=>k(!1)})})]}):null}),f.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[f.jsx(sb,{storage:u,displayName:Z,username:fe,search:{value:g,onChange:y,inputRef:m},onUpload:()=>a.openPicker(b),onToggleSidebar:()=>k(!0),onOpenHelp:()=>E(!0),onSignOut:()=>$.mutate(),signingOut:$.isPending}),f.jsx("main",{id:"main",className:"relative flex-1 overflow-y-auto",children:f.jsx(CC,{})})]}),f.jsx("input",{ref:a.pickerInputRef,type:"file",multiple:!0,className:"hidden","aria-hidden":"true",tabIndex:-1,onChange:a.onPickerChange}),f.jsx(ob,{uploads:a.uploads,onCancel:a.cancel,onRetry:a.retry,onDismiss:a.dismiss,onClearFinished:a.clearFinished}),A?f.jsx(A1,{title:"Create folder",label:"Folder name",confirmLabel:"Create",initialValue:"",pending:F.isPending,onSubmit:R=>F.mutate(R),onClose:()=>I(!1)}):null,T?f.jsx(qN,{onClose:()=>E(!1)}):null,x!==""?f.jsx(HN,{query:x,onClose:ne,onOpenFolder:R=>ye(R.id),onOpenFile:Se}):null]})})}function Jf(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 c=a.folder.parentId===null?void 0:n.get(a.folder.parentId);c===void 0?s.push(a):c.children.push(a)}const i=a=>{a.sort((c,u)=>c.folder.name.localeCompare(u.folder.name));for(const c of a)i(c.children);return a};return i(s)}function O1(e,n){for(const s of e){if(s.folder.id===n)return s.folder;const i=O1(s.children,n);if(i!==null)return i}return null}function lb(e,n){if(n===null)return[];const s=[],i=new Set;let a=n;for(;a!==null&&!i.has(a);){i.add(a);const c=O1(e,a);if(c===null)break;s.unshift(c),a=c.parentId}return s}function eh(e,n){const s=[],i=c=>{s.push(c.folder.id);for(const u of c.children)i(u)},a=c=>{for(const u of c){if(u.folder.id===n)return i(u),!0;if(a(u.children))return!0}return!1};return a(e),s}function Co({queryKey:e,queryFn:n,enabled:s=!0}){var h;const i=bk({queryKey:e,enabled:s,initialPageParam:1,queryFn:({pageParam:m})=>n(m),getNextPageParam:m=>m.pagination.hasMore?m.pagination.page+1:void 0}),a=((h=i.data)==null?void 0:h.pages)??[],c=a.flatMap(m=>m.items),u=a[a.length-1];return{items:c,pagination:(u==null?void 0:u.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 I1({title:e,message:n,confirmLabel:s="Confirm",destructive:i=!1,busy:a=!1,onConfirm:c,onClose:u}){return f.jsxs(Ao,{title:e,onClose:u,children:[f.jsxs("div",{className:"flex items-start gap-3",children:[i?f.jsx(pl,{className:"mt-0.5 h-5 w-5 shrink-0 text-bad","aria-hidden":"true"}):null,f.jsx("div",{className:"text-[13.5px] leading-relaxed",children:n})]}),f.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[f.jsx("button",{type:"button",className:"btn-ghost",onClick:u,disabled:a,children:"Cancel"}),f.jsx("button",{type:"button",autoFocus:!0,className:i?"btn-danger":"btn-gold",onClick:c,disabled:a,children:a?"Working…":s})]})]})}function ub(e,n){const s=eh(n,e);return Promise.all(s.map(i=>we.files.list({folderId:i,limit:200}))).then(i=>i.reduce((a,c)=>a+c.files.length,0))}function cb({folder:e,tree:n,onClose:s}){const i=un(),a=fs(),c=Nr({queryKey:["subtree-files",e.id],queryFn:()=>ub(e.id,n),staleTime:0}),u=Kt({mutationFn:()=>we.folders.delete(e.id),onSuccess:y=>{cs(i),a.success(`Deleted ${Sn(y.affectedFolders,"folder")} and ${Sn(y.affectedFiles,"file")}`),s()},onError:y=>a.error(Qe(y,"Could not delete folder"))}),h=eh(n,e.id).length-1,m=c.data;let g=`the folder "${e.name}"`;return h>0&&(g+=` and its ${Sn(h,"subfolder")}`),m!==void 0?g+=` and ${Sn(m,"file")}`:g+=" and all files inside it",f.jsxs(Ao,{title:`Delete "${e.name}"?`,onClose:s,children:[f.jsxs("section",{className:"rounded-2xl border border-bad/40 p-5",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(pl,{className:"h-4 w-4 shrink-0 text-bad","aria-hidden":"true"}),f.jsx("h3",{className:"text-[15px] font-semibold",children:"Danger zone"})]}),f.jsxs("p",{className:"muted mt-1.5 text-[13px] leading-relaxed",children:["This will permanently delete ",g,". This action cannot be undone."]})]}),f.jsxs("div",{className:"mt-5 flex justify-end gap-2.5",children:[f.jsx("button",{type:"button",className:"btn-ghost",onClick:s,disabled:u.isPending,children:"Cancel"}),f.jsxs("button",{type:"button",className:"btn-danger",onClick:()=>u.mutate(),disabled:u.isPending,children:[u.isPending&&f.jsx(Lt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),"Delete"]})]})]})}function nv(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 _1({nodes:e,depth:n,groupName:s,selectedId:i,disabledIds:a,collapsedIds:c,onToggle:u,onSelect:h}){return f.jsx("ul",{className:"space-y-0.5",children:e.map(m=>{const g=m.folder.id,y=a.has(g),v=m.children.length>0,x=c.has(g);return f.jsxs("li",{children:[f.jsxs("div",{className:`flex items-center gap-1 rounded-lg pr-2 transition-colors ${y?"":"hover:bg-surface"}`,style:{paddingLeft:`${n*1.25+.375}rem`},children:[v?f.jsx("button",{type:"button","aria-label":x?`Expand ${m.folder.name}`:`Collapse ${m.folder.name}`,"aria-expanded":!x,onClick:()=>u(g),className:"muted shrink-0 rounded p-0.5 transition-colors hover:text-gold-text",children:f.jsx(n2,{className:`h-3.5 w-3.5 transition-transform ${x?"-rotate-90":""}`,"aria-hidden":"true"})}):f.jsx("span",{className:"w-[1.125rem] shrink-0","aria-hidden":"true"}),f.jsxs("label",{className:`flex min-w-0 flex-1 items-center gap-2.5 py-1.5 text-sm ${y?"cursor-not-allowed":"cursor-pointer"}`,children:[f.jsx("input",{type:"radio",name:s,value:g,checked:i===g,disabled:y,onChange:()=>h(g),className:"h-3.5 w-3.5",style:{accentColor:"var(--gold)"}}),f.jsx(fi,{className:`h-4 w-4 shrink-0 ${y?"muted":"text-gold"}`,"aria-hidden":"true"}),f.jsx("span",{className:`min-w-0 truncate ${y?"muted opacity-60":""}`,children:m.folder.name})]})]}),v&&!x?f.jsx(_1,{nodes:m.children,depth:n+1,groupName:s,selectedId:i,disabledIds:a,collapsedIds:c,onToggle:u,onSelect:h}):null]},g)})})}function db({targets:e,onClose:n,onMoved:s}){const i=un(),a=fs(),c=Nr({queryKey:qf,queryFn:we.folders.tree}),u=S.useMemo(()=>{var A;return Jf(((A=c.data)==null?void 0:A.folders)??[])},[c.data]),h=e[0],[m,g]=S.useState(()=>h===void 0?null:nv(h)),[y,v]=S.useState(new Set),x=e.length===1&&h!==void 0?`"${h.name}"`:`${e.length} items`,C=S.useMemo(()=>{var I;const A=new Set;for(const b of e)if(b.kind==="folder")for(const O of eh(u,((I=b.folder)==null?void 0:I.id)??b.id))A.add(O);return A},[u,e]),k=Kt({mutationFn:async()=>{await Promise.all(e.map(A=>A.kind==="file"?we.files.move(A.id,m):we.folders.move(A.id,m)))},onSuccess:()=>{cs(i),a.success(`Moved ${x}`),s==null||s(),n()},onError:A=>a.error(Qe(A,"Could not move item"))}),T=e.every(A=>nv(A)===m),E=A=>{v(I=>{const b=new Set(I);return b.has(A)?b.delete(A):b.add(A),b})};return f.jsxs(Ao,{title:`Move ${x}`,onClose:n,children:[f.jsx("p",{className:"muted text-[13px]",children:"Choose a destination folder."}),f.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:[f.jsxs("label",{className:`flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-sm transition-colors ${m===null?"bg-surface":"hover:bg-surface"}`,children:[f.jsx("input",{type:"radio",name:"move-target",checked:m===null,onChange:()=>g(null),className:"h-3.5 w-3.5",style:{accentColor:"var(--gold)"}}),f.jsx(fi,{className:"h-4 w-4 shrink-0 text-gold","aria-hidden":"true"}),f.jsx("span",{children:"My Drive (root)"})]}),f.jsx(_1,{nodes:u,depth:0,groupName:"move-target",selectedId:m,disabledIds:C,collapsedIds:y,onToggle:E,onSelect:g})]}),c.isPending?f.jsx("p",{className:"muted mt-2 text-[13px]",children:"Loading folders..."}):null,f.jsxs("div",{className:"mt-5 flex justify-end gap-2.5",children:[f.jsx("button",{type:"button",className:"btn-ghost",onClick:n,disabled:k.isPending,children:"Cancel"}),f.jsxs("button",{type:"button",className:"btn-gold",disabled:T||k.isPending,onClick:()=>k.mutate(),children:[k.isPending&&f.jsx(Lt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),k.isPending?"Moving...":"Move"]})]})]})}function rv(e){const n=e[0];return e.length===1&&n!==void 0?`"${n.name}"`:`${e.length} items`}function th({onOpenItem:e,onShowDetails:n,onReplaceFile:s}){var ne;const i=un(),a=fs(),[c,u]=S.useState(null),[h,m]=S.useState(null),[g,y]=S.useState(null),[v,x]=S.useState(null),C=S.useRef(null),k=S.useRef(null),T=Nr({queryKey:qf,queryFn:we.folders.tree}),E=S.useCallback(G=>{cs(i),a.success(G)},[i,a]),A=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:Z}=await we.folders.update(G.item.id,{name:G.name});return{name:Z.name}},onSuccess:(G,Z)=>{u(null),E(`Renamed to "${Z.name}"`)},onError:G=>a.error(Qe(G,"Could not rename item"))}),I=Kt({mutationFn:async G=>{const Z=[],fe=[];for(const ye of G.items)ye.kind==="file"?Z.push(ye.id):fe.push(ye.id);const Le=[];return Z.length>0&&Le.push(await we.files.batch({operation:G.operation,ids:Z,...G.folderId!==void 0?{folderId:G.folderId}:{}})),fe.length>0&&Le.push(await we.folders.batch({operation:G.operation,ids:fe,...G.folderId!==void 0?{folderId:G.folderId}:{}})),Le.reduce((ye,Se)=>({requested:ye.requested+Se.requested,succeeded:ye.succeeded+Se.succeeded,failed:ye.failed+Se.failed}),{requested:0,succeeded:0,failed:0})},onSuccess:(G,Z)=>{cs(i);const fe=rv(Z.items);G.failed>0?a.error(`${G.succeeded} of ${G.requested} succeeded — ${G.failed} failed`):a.success(`Updated ${fe}`),y(null),m(null)},onError:G=>a.error(Qe(G,"The operation failed"))}),b=S.useCallback(G=>{G.length>0&&m(G)},[]),O=S.useCallback(G=>{if(G.length===0)return;const Z=G.length===1?G[0]:void 0;if(Z!==void 0&&Z.kind==="folder"){x(Z);return}y(G)},[]),z=S.useCallback((G,Z,fe)=>{Z.length!==0&&I.mutate({operation:G,items:Z,...fe!==void 0?{folderId:fe}:{}})},[I]),B=S.useCallback(G=>{var Z;k.current=G,(Z=C.current)==null||Z.click()},[]),L=S.useCallback((G,Z)=>{switch(G){case"open":e(Z);return;case"download":Z.kind==="file"&&we.files.download(Z.id);return;case"rename":u(Z);return;case"move":b([Z]);return;case"star":z("star",[Z]);return;case"unstar":z("unstar",[Z]);return;case"replace":B(Z);return;case"details":n(Z);return;case"trash":z("trash",[Z]);return;case"restore":z("restore",[Z]);return;case"delete":O([Z]);return;default:return}},[e,n,b,B,O,z]),F=Jf(((ne=T.data)==null?void 0:ne.folders)??[]),$=g!==null?rv(g):"",Y=f.jsxs(f.Fragment,{children:[f.jsx("input",{ref:C,type:"file",className:"hidden","aria-hidden":"true",tabIndex:-1,onChange:G=>{var ye;const Z=G.currentTarget,fe=(ye=Z.files)==null?void 0:ye[0],Le=k.current;Z.value="",fe!==void 0&&Le!==null&&s(fe,Le.id),k.current=null}}),c!==null?f.jsx(A1,{title:c.kind==="file"?"Rename file":"Rename folder",label:"Name",confirmLabel:"Rename",initialValue:c.name,pending:A.isPending,onSubmit:G=>A.mutate({item:c,name:G}),onClose:()=>u(null)}):null,h!==null?f.jsx(db,{targets:h,onClose:()=>m(null)}):null,v!==null&&v.folder!==null?f.jsx(cb,{folder:v.folder,tree:F,onClose:()=>x(null)}):null,g!==null?f.jsx(I1,{title:`Delete ${$}?`,message:`This will permanently delete ${$}. This action cannot be undone.`,confirmLabel:"Delete permanently",destructive:!0,busy:I.isPending,onConfirm:()=>z("delete",g),onClose:()=>y(null)}):null]});return{handleAction:L,openMove:b,requestDelete:O,runBatch:z,pendingBatch:I.isPending,dialogs:Y}}function nh(e,n,s){const[i,a]=S.useState(()=>{try{const u=localStorage.getItem(e);if(u!==null&&(s===void 0||s(u)))return u}catch{}return n});S.useEffect(()=>{try{localStorage.setItem(e,i)}catch{}},[e,i]);const c=S.useCallback(u=>a(u),[]);return[i,c]}function rh(e,n=!0){const{registerPageShortcuts:s}=_l();S.useEffect(()=>{if(!n){s(null);return}return s(e),()=>s(null)})}function id(e){return`${e.kind}:${e.id}`}function sh(){const[e,n]=S.useState(()=>new Set),s=S.useRef(null),i=S.useCallback(y=>e.has(y),[e]),a=S.useCallback(()=>{n(new Set),s.current=null},[]),c=S.useCallback(y=>{const v=id(y);n(new Set([v])),s.current=v},[]),u=S.useCallback((y,v={})=>{const x=id(y),{orderedKeys:C,range:k}=v;if(k===!0&&s.current!==null&&C!==void 0){const T=C.indexOf(s.current),E=C.indexOf(x);if(T!==-1&&E!==-1){const[A,I]=T<E?[T,E]:[E,T];n(b=>{const O=new Set(b);for(let z=A;z<=I;z+=1){const B=C[z];B!==void 0&&O.add(B)}return O});return}}n(T=>{const E=new Set(T);return E.has(x)?E.delete(x):E.add(x),E}),s.current=x},[]),h=S.useCallback(y=>{n(new Set(y)),s.current=y[0]??null},[]),m=S.useCallback(y=>{const v=new Set(y);n(x=>{let C=!1;const k=new Set;for(const T of x)v.has(T)?k.add(T):C=!0;return C?k:x})},[]),g=S.useCallback(y=>e.has(id(y)),[e]);return S.useMemo(()=>({selected:e,count:e.size,isSelected:i,has:g,select:c,toggle:u,clear:a,selectAll:h,prune:m}),[e,i,g,c,u,a,h,m])}function fb({path:e,onNavigate:n}){return f.jsx("nav",{"aria-label":"Breadcrumb",className:"min-w-0",children:f.jsxs("ol",{className:"flex items-center gap-0.5 text-sm",children:[f.jsx("li",{className:"shrink-0",children:f.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 f.jsxs("li",{className:"flex min-w-0 items-center gap-0.5",children:[f.jsx(r2,{className:"muted h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),f.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 ih({menu:e,onClose:n}){const s=cn(),i=S.useRef(null);S.useEffect(()=>{if(e===null)return;const h=g=>{var y;g.target instanceof Node&&((y=i.current)==null?void 0:y.contains(g.target))===!1&&n()},m=g=>{g.key==="Escape"&&n()};return document.addEventListener("pointerdown",h),document.addEventListener("keydown",m),window.addEventListener("resize",n),window.addEventListener("scroll",n,!0),()=>{document.removeEventListener("pointerdown",h),document.removeEventListener("keydown",m),window.removeEventListener("resize",n),window.removeEventListener("scroll",n,!0)}},[e,n]);const a=s?0:-4,u=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 f.jsx(Mr,{children:e!==null?f.jsx(Ht.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:u,className:"menu-panel fixed z-[120] w-56",children:e.items.map(h=>f.jsxs("button",{role:"menuitem",type:"button",disabled:h.disabled===!0,onClick:()=>{n(),h.onSelect()},className:`menu-item text-left ${h.danger===!0?"menu-item-danger":""}`,children:[h.icon,h.label]},h.label))}):null})}function dr({label:e,children:n}){return f.jsxs("div",{children:[f.jsx("dt",{className:"muted text-[11px] font-semibold tracking-wide uppercase",children:e}),f.jsx("dd",{className:"mt-1 text-[13.5px] break-words",children:n})]})}function hb({item:e}){if(e.kind==="folder")return f.jsx(fi,{className:"h-6 w-6 shrink-0 text-gold","aria-hidden":"true"});const{Icon:n,color:s}=Vn(e.mimeType);return f.jsx(n,{className:`h-6 w-6 shrink-0 ${s}`,"aria-hidden":"true"})}function Lo({item:e,onClose:n,onAction:s}){var a,c,u;const i=cn();return S.useEffect(()=>{if(e===null)return;const h=m=>{m.key==="Escape"&&n()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[e,n]),e===null?null:f.jsxs("div",{className:"fixed inset-0 z-[100] flex items-end justify-end sm:items-stretch",children:[f.jsx("div",{className:"absolute inset-0 bg-black/40",onClick:n,"aria-hidden":"true"}),f.jsxs(Ht.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:[f.jsxs("header",{className:"flex items-start justify-between gap-3 border-b border-line/70 px-5 py-4",children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[f.jsx(hb,{item:e}),f.jsx("h2",{className:"min-w-0 text-[15px] font-semibold break-words",children:e.name})]}),f.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:f.jsx(an,{className:"h-4 w-4","aria-hidden":"true"})})]}),f.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:[e.trashed?null:f.jsx("div",{className:"flex flex-wrap gap-2",children:e.kind==="file"?f.jsxs(f.Fragment,{children:[f.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>s("download",e),children:[f.jsx(hf,{className:"h-4 w-4","aria-hidden":"true"}),"Download"]}),f.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>s("replace",e),children:[f.jsx(R0,{className:"h-4 w-4","aria-hidden":"true"}),"New version"]})]}):null}),f.jsxs("dl",{className:"mt-5 grid gap-4",children:[f.jsxs(dr,{label:"Type",children:[e.kind==="folder"?"Folder":Vn(e.mimeType).label,e.kind==="file"?f.jsxs("span",{className:"muted",children:[" · ",e.mimeType]}):null]}),e.kind==="file"?f.jsx(dr,{label:"Size",children:Nt(e.size)}):null,e.kind==="file"?f.jsx(dr,{label:"SHA-256",children:f.jsx("code",{className:"font-mono text-[12px] break-all select-all",children:((a=e.file)==null?void 0:a.sha256)??""})}):null,f.jsx(dr,{label:"Folder",children:e.kind==="file"?((c=e.file)==null?void 0:c.folderId)??"My Drive":((u=e.folder)==null?void 0:u.parentId)??"My Drive"}),f.jsx(dr,{label:"Created",children:$s(e.createdAt)}),f.jsx(dr,{label:"Modified",children:$s(e.updatedAt)}),e.trashed&&e.deletedAt!==null?f.jsx(dr,{label:"Deleted",children:$s(e.deletedAt)}):null,e.kind==="file"?f.jsx(dr,{label:"Versions",children:Sn(e.versionCount,"version")}):null]}),e.kind==="file"?f.jsx(pb,{fileId:e.id,versionCount:e.versionCount}):null]})]})]})}function pb({fileId:e,versionCount:n}){var i,a;const s=Nr({queryKey:["versions",e],queryFn:()=>we.files.versions(e)});return f.jsxs("section",{className:"mt-6",children:[f.jsx("h3",{className:"eyebrow",children:"Version history"}),s.isPending?f.jsx("p",{className:"muted mt-3 text-[13px]",children:"Loading versions..."}):s.error!==null?f.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?f.jsx("p",{className:"muted mt-3 text-[13px]",children:n>1?"Version history is unavailable.":"No earlier versions."}):f.jsx("ul",{className:"mt-3 grid gap-2",children:(((a=s.data)==null?void 0:a.versions)??[]).map(c=>f.jsxs("li",{className:"flex items-center gap-3 rounded-xl border border-line bg-surface px-3 py-2",children:[f.jsxs("span",{className:"muted w-9 shrink-0 font-mono text-[12px]",children:["v",c.versionNumber]}),f.jsxs("span",{className:"min-w-0 flex-1",children:[f.jsx("span",{className:"block text-[12.5px]",children:Nt(c.size)}),f.jsx("span",{className:"muted block text-[11px]",children:$s(c.createdAt)})]}),c.isCurrent?f.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]},c.id))})]})}function Fl({icon:e,title:n,description:s,children:i}){return f.jsxs("div",{className:"mt-16 flex flex-col items-center px-4 text-center",children:[f.jsx("span",{className:"grid h-16 w-16 place-items-center rounded-full border border-gold/50 bg-gold-soft",children:f.jsx(e,{className:"h-7 w-7 text-gold","aria-hidden":"true"})}),f.jsx("h2",{className:"mt-4 text-base font-semibold",children:n}),s!==void 0?f.jsx("p",{className:"muted mt-1 max-w-sm text-sm",children:s}):null,i!==void 0?f.jsx("div",{className:"mt-5 flex flex-wrap justify-center gap-2.5",children:i}):null]})}function sv({label:e,items:n,trigger:s,triggerClassName:i,align:a="end"}){const[c,u]=S.useState(!1),h=cn(),m=S.useRef(null),g=S.useRef(null),y=S.useRef(null);S.useEffect(()=>{if(!c)return;const k=E=>{var A;E.target instanceof Node&&((A=m.current)==null?void 0:A.contains(E.target))===!1&&u(!1)},T=E=>{var A;E.key==="Escape"&&(u(!1),(A=g.current)==null||A.focus())};return document.addEventListener("pointerdown",k),document.addEventListener("keydown",T),()=>{document.removeEventListener("pointerdown",k),document.removeEventListener("keydown",T)}},[c]);const v=k=>{var E,A;const T=(E=y.current)==null?void 0:E.querySelectorAll("[role='menuitem']");(A=T==null?void 0:T[k])==null||A.focus()},x=(k,T)=>{var b,O;const E=Array.from(((b=y.current)==null?void 0:b.querySelectorAll("[role='menuitem']"))??[]);if(E.length===0)return;const I=(E.indexOf(k)+T+E.length)%E.length;(O=E[I])==null||O.focus()},C=h?0:-6;return f.jsxs("div",{ref:m,className:"relative",children:[f.jsx("button",{ref:g,type:"button","aria-label":e,"aria-haspopup":"menu","aria-expanded":c,onClick:()=>u(k=>!k),onKeyDown:k=>{k.key==="ArrowDown"&&(k.preventDefault(),c?v(0):(u(!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??f.jsx(a2,{className:"h-4 w-4","aria-hidden":"true"})}),f.jsx(Mr,{children:c?f.jsx(Ht.div,{ref:y,role:"menu","aria-label":e,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 z-20 mt-1.5 w-48 ${a==="end"?"right-0":"left-0"}`,children:n.map(k=>f.jsxs("button",{role:"menuitem",type:"button",disabled:k.disabled===!0,onClick:()=>{u(!1),k.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 ${k.danger===!0?"menu-item-danger":""}`,children:[k.icon,k.label]},k.label))},"item-menu"):null})]})}function iv({checked:e,visible:n,label:s,onToggle:i}){return f.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:f.jsx(ff,{className:"h-3 w-3","aria-hidden":"true"})})}function od(e,n,s={}){const i=e.kind==="file",a=[];return e.trashed?(a.push({label:"Restore",icon:f.jsx(pf,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>n("restore",e)}),a.push({label:"Delete permanently",icon:f.jsx(Er,{className:"h-4 w-4","aria-hidden":"true"}),danger:!0,onSelect:()=>n("delete",e)})):(a.push({label:i?"Download":"Open",icon:i?f.jsx(hf,{className:"h-4 w-4","aria-hidden":"true"}):f.jsx(Nd,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>n(i?"download":"open",e)}),i&&a.push({label:"Details",icon:f.jsx(h2,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>n("details",e)}),a.push({label:"Rename",icon:f.jsx(w2,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>n("rename",e)}),a.push({label:"Move",icon:f.jsx(Nd,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>n("move",e)}),a.push({label:e.starred?"Unstar":"Star",icon:e.starred?f.jsx(mf,{className:"h-4 w-4","aria-hidden":"true"}):f.jsx(us,{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:f.jsx(R0,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>n("replace",e)}),a.push({label:"Move to trash",icon:f.jsx(Er,{className:"h-4 w-4","aria-hidden":"true"}),danger:!0,onSelect:()=>n("trash",e)})),a}function mb({item:e}){if(e.kind==="folder")return f.jsx(fi,{className:"h-5 w-5 shrink-0 text-gold","aria-hidden":"true"});const{Icon:n,color:s}=Vn(e.mimeType);return f.jsx(n,{className:`h-5 w-5 shrink-0 ${s}`,"aria-hidden":"true"})}function gb({view:e}){const n=[0,1,2,3,4];return e==="grid"?f.jsx("div",{"aria-hidden":"true",className:"grid grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-4",children:n.map(s=>f.jsx("div",{className:"card h-40 animate-pulse bg-bg-soft"},s))}):f.jsx("div",{"aria-hidden":"true",className:"grid gap-2",children:n.map(s=>f.jsx("div",{className:"h-14 animate-pulse rounded-xl border border-line bg-bg-soft"},s))})}function yb({items:e,view:n,selection:s,onOpen:i,onAction:a,onContextMenu:c,menuContext:u={},loading:h=!1}){const m=e.map(on),g=(v,x)=>{if(v.metaKey||v.ctrlKey){s.toggle(Ja(x));return}if(v.shiftKey){s.toggle(Ja(x),{orderedKeys:m,range:!0});return}i(x)},y=(v,x)=>{v.preventDefault(),c({x:v.clientX,y:v.clientY,label:`Actions for ${x.name}`,items:od(x,a,u)})};return h?f.jsx(gb,{view:n}):e.length===0?null:n==="grid"?f.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(on(v));return f.jsxs("li",{onClick:C=>g(C,v),onContextMenu:C=>y(C,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:[f.jsx("div",{className:"absolute top-3 left-3",onClick:C=>C.stopPropagation(),children:f.jsx(iv,{checked:x,visible:x||s.count>0,label:`Select ${v.name}`,onToggle:C=>s.toggle(Ja(v),{orderedKeys:m,range:C.shiftKey})})}),f.jsx("div",{className:"absolute top-3 right-3",onClick:C=>C.stopPropagation(),children:f.jsx(sv,{label:`Actions for ${v.name}`,items:od(v,a,u)})}),f.jsx("div",{className:"mt-6 flex flex-1 items-center justify-center",children:v.kind==="folder"?f.jsx(fi,{className:"h-10 w-10 text-gold","aria-hidden":"true"}):(()=>{const{Icon:C,color:k}=Vn(v.mimeType);return f.jsx(C,{className:`h-10 w-10 ${k}`,"aria-hidden":"true"})})()}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("p",{className:"line-clamp-2 text-[13px] leading-snug font-medium",title:v.name,children:v.name}),f.jsxs("p",{className:"muted mt-1 truncate text-[12px]",children:[v.starred?f.jsx(us,{className:"mr-1 inline h-3 w-3 -translate-y-px text-gold","aria-hidden":"true"}):null,v.kind==="folder"?"Folder":`${Nt(v.size)} · ${Vn(v.mimeType).label}`]}),v.deletedAt!==null?f.jsxs("p",{className:"muted mt-0.5 text-[11px]",children:["Deleted ",Jd(v.deletedAt)]}):null]})]},on(v))})}):f.jsx("ul",{className:"grid gap-1.5",children:e.map(v=>{const x=s.isSelected(on(v));return f.jsxs("li",{onClick:C=>g(C,v),onContextMenu:C=>y(C,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:[f.jsx("div",{onClick:C=>C.stopPropagation(),children:f.jsx(iv,{checked:x,visible:x||s.count>0,label:`Select ${v.name}`,onToggle:C=>s.toggle(Ja(v),{orderedKeys:m,range:C.shiftKey})})}),f.jsx(mb,{item:v}),f.jsxs("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",title:v.name,children:[v.starred?f.jsx(us,{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?f.jsxs("span",{className:"muted hidden shrink-0 text-[12px] sm:block",children:["Deleted ",Jd(v.deletedAt)]}):null,f.jsx("span",{className:"muted hidden w-40 shrink-0 truncate text-[12.5px] md:block",children:v.kind==="folder"?"Folder":Vn(v.mimeType).label}),f.jsx("span",{className:"muted hidden w-28 shrink-0 text-right text-[12.5px] lg:block",children:VN(v.updatedAt)}),f.jsx("span",{className:"muted w-16 shrink-0 text-right text-[12.5px] tabular-nums",children:v.kind==="folder"?"—":Nt(v.size)}),f.jsx("div",{onClick:C=>C.stopPropagation(),children:f.jsx(sv,{label:`Actions for ${v.name}`,items:od(v,a,u)})})]},on(v))})})}function oh({items:e,view:n,selection:s,onOpen:i,onAction:a,onContextMenu:c,menuContext:u,loading:h=!1,error:m=null,onRetry:g,emptyState:y,hasMore:v=!1,loadingMore:x=!1,onLoadMore:C}){return m!==null?f.jsxs("div",{className:"card mt-6 p-6 text-center",children:[f.jsx("p",{className:"text-sm font-medium",children:"Something went wrong."}),f.jsx("p",{className:"muted mt-1 text-sm",children:m}),g!==void 0?f.jsx("button",{type:"button",className:"btn-secondary mt-4",onClick:g,children:"Try again"}):null]}):e.length===0&&y!==void 0?f.jsx(f.Fragment,{children:y}):f.jsxs(f.Fragment,{children:[f.jsx(yb,{items:e,view:n,selection:s,onOpen:i,onAction:a,onContextMenu:c,...u!==void 0?{menuContext:u}:{},loading:h}),v&&C!==void 0?f.jsx("div",{className:"mt-6 flex justify-center",children:f.jsx("button",{type:"button",className:"btn-secondary",onClick:C,disabled:x,children:x?"Loading...":"Load more"})}):null]})}function oi({title:e,actions:n,children:s}){return f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsx("div",{className:"min-w-0",children:e}),n!==void 0?f.jsx("div",{className:"flex flex-wrap items-center gap-2.5",children:n}):null,s!==void 0?f.jsx("div",{className:"w-full",children:s}):null]})}function ai({children:e}){return f.jsx("h1",{className:"min-w-0 truncate text-lg font-semibold tracking-[-0.01em]",children:e})}function ah({count:e,onClear:n,onSelectAll:s,children:i}){const a=cn(),c=e>0;return f.jsx(Mr,{children:c?f.jsxs(Ht.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:[f.jsxs("span",{className:"px-2 text-[13px] font-medium tabular-nums",children:[e," selected"]}),f.jsx("span",{className:"text-line-strong","aria-hidden":"true",children:"·"}),s!==void 0?f.jsxs("button",{type:"button",className:"btn-secondary",onClick:s,children:[f.jsx(t2,{className:"h-4 w-4","aria-hidden":"true"}),"Select all"]}):null,i,f.jsxs("button",{type:"button",className:"btn-ghost",onClick:n,"aria-label":"Clear selection",children:[f.jsx(an,{className:"h-4 w-4","aria-hidden":"true"}),"Clear"]})]},"selection-bar"):null})}const ad={name:"Name",size:"Size",createdAt:"Date created",updatedAt:"Last modified",type:"Type"};function vb({sort:e,order:n,onChange:s}){const[i,a]=S.useState(!1),c=cn(),u=S.useRef(null);S.useEffect(()=>{if(!i)return;const g=v=>{var x;v.target instanceof Node&&((x=u.current)==null?void 0:x.contains(v.target))===!1&&a(!1)},y=v=>{v.key==="Escape"&&a(!1)};return document.addEventListener("pointerdown",g),document.addEventListener("keydown",y),()=>{document.removeEventListener("pointerdown",g),document.removeEventListener("keydown",y)}},[i]);const h=Object.keys(ad),m=c?0:-6;return f.jsxs("div",{ref:u,className:"relative shrink-0",children:[f.jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":i,onClick:()=>a(g=>!g),className:"btn-secondary",children:[f.jsx(e2,{className:"h-4 w-4","aria-hidden":"true"}),f.jsx("span",{className:"hidden sm:inline",children:ad[e]}),n==="asc"?f.jsx(Mg,{className:"h-3.5 w-3.5","aria-hidden":"true"}):f.jsx(bg,{className:"h-3.5 w-3.5","aria-hidden":"true"})]}),f.jsx(Mr,{children:i?f.jsx(Ht.div,{role:"menu","aria-label":"Sort by",initial:{opacity:0,y:m},animate:{opacity:1,y:0},exit:{opacity:0,y:m},transition:{duration:.15,ease:"easeOut"},className:"menu-panel absolute top-full right-0 z-30 mt-1.5 w-52",children:h.map(g=>f.jsxs("button",{role:"menuitemradio","aria-checked":e===g,type:"button",onClick:()=>{e===g?s(g,n==="asc"?"desc":"asc"):s(g,"asc")},className:"menu-item justify-between text-left",children:[ad[g],e===g?n==="asc"?f.jsx(Mg,{className:"h-3.5 w-3.5","aria-hidden":"true"}):f.jsx(bg,{className:"h-3.5 w-3.5","aria-hidden":"true"}):null]},g))}):null})]})}function lh({view:e,onChange:n}){const s=[{mode:"list",label:"List view",Icon:g2},{mode:"grid",label:"Grid view",Icon:m2}];return f.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:c})=>{const u=e===i;return f.jsx("button",{type:"button","aria-label":a,"aria-pressed":u,onClick:()=>n(i),className:`grid h-7 w-8 place-items-center rounded-md transition-colors ${u?"bg-gold-soft text-gold-text":"muted hover:text-gold-text"}`,children:f.jsx(c,{className:"h-4 w-4","aria-hidden":"true"})},i)})})}const ov=100;function el(e){return e.dataTransfer.types.includes("Files")}function xb(){const{uploads:e,setActiveFolderId:n,openCreateFolder:s,clearSearch:i}=_l(),[a,c]=UC(),u=a.get("folder"),[h,m]=nh("omnicloud-view","list",Xf),[g,y]=S.useState("name"),[v,x]=S.useState("asc"),[C,k]=S.useState(null),[T,E]=S.useState(null),A=sh(),[I,b]=S.useState(!1),O=S.useRef(0);S.useEffect(()=>{n(u)},[u,n]);const z=Nr({queryKey:qf,queryFn:we.folders.tree}),B=S.useMemo(()=>{var R;return Jf(((R=z.data)==null?void 0:R.folders)??[])},[z.data]),L=S.useMemo(()=>lb(B,u),[B,u]),F=Co({queryKey:["folders","children",u,g,v],queryFn:R=>we.folders.list({parentId:u,page:R,limit:ov,sort:g,order:v,status:"active"}).then(ee=>({items:ee.folders,pagination:ee.pagination}))}),$=Co({queryKey:["files","folder",u,g,v],queryFn:R=>we.files.list({folderId:u,page:R,limit:ov,sort:g,order:v,status:"active"}).then(ee=>({items:ee.files,pagination:ee.pagination}))}),Y=S.useMemo(()=>[...F.items.map(Yf),...$.items.map(mi)],[F.items,$.items]),ne=S.useMemo(()=>Y.map(on),[Y]);S.useEffect(()=>{A.prune(ne)},[ne,A]);const G=S.useCallback(R=>{i(),A.clear(),E(null),c(R===null?{}:{folder:R},{replace:!1})},[i,A,c]),Z=th({onOpenItem:R=>{R.kind==="folder"?G(R.id):we.files.download(R.id)},onShowDetails:E,onReplaceFile:e.replace}),fe=S.useMemo(()=>Y.filter(R=>A.isSelected(on(R))),[Y,A]);S.useEffect(()=>{const R=ur(F.error,tn.NOT_FOUND,tn.FOLDER_NOT_FOUND)||ur($.error,tn.NOT_FOUND,tn.FOLDER_NOT_FOUND);u!==null&&R&&c({},{replace:!0})},[u,F.error,$.error,c]),rh({onDelete:()=>Z.runBatch("trash",fe),onEnter:()=>{const R=fe[0];R!==void 0&&Z.handleAction(R.kind==="folder"?"open":"download",R)},onSelectAll:()=>A.selectAll(ne),onEscape:()=>E(null)});const Le=ur(F.error,tn.STORAGE_NOT_INITIALIZED)||ur($.error,tn.STORAGE_NOT_INITIALIZED)||ur(F.error,tn.TELEGRAM_AUTH_REQUIRED)||ur($.error,tn.TELEGRAM_AUTH_REQUIRED)||ur(F.error,tn.STORAGE_UNAVAILABLE)||ur($.error,tn.STORAGE_UNAVAILABLE),ye=F.error??$.error,Se=F.isLoading||$.isLoading,X=R=>{el(R)&&(R.preventDefault(),O.current+=1,b(!0))},le=R=>{el(R)&&(O.current-=1,O.current<=0&&(O.current=0,b(!1)))},q=R=>{el(R)&&R.preventDefault()},D=R=>{if(!el(R))return;R.preventDefault(),O.current=0,b(!1);const ee=Array.from(R.dataTransfer.files);ee.length>0&&e.enqueue(ee,u)};return f.jsxs("div",{className:"relative min-h-full",onDragEnter:X,onDragLeave:le,onDragOver:q,onDrop:D,children:[f.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-6 md:px-8",children:[f.jsx(oi,{title:u===null?f.jsx(ai,{children:"My Drive"}):f.jsx(fb,{path:L,onNavigate:G}),actions:f.jsxs(f.Fragment,{children:[f.jsx(lh,{view:h,onChange:m}),f.jsx(vb,{sort:g,order:v,onChange:(R,ee)=>{y(R),x(ee)}}),f.jsxs("button",{type:"button",className:"btn-secondary sm:hidden",onClick:()=>e.openPicker(u),children:[f.jsx(ml,{className:"h-4 w-4","aria-hidden":"true"}),"Upload"]})]})}),Le?f.jsx("p",{role:"alert",className:"notice notice-error",children:Qe(ye,"Your storage is unavailable right now.")}):null,f.jsx("div",{className:"mt-5",children:f.jsx(oh,{items:Y,view:h,selection:A,onOpen:R=>Z.handleAction(R.kind==="folder"?"open":"download",R),onAction:Z.handleAction,onContextMenu:k,loading:Se,error:Le||ye===null?null:Qe(ye,"Could not load this folder."),onRetry:()=>{F.refetch(),$.refetch()},hasMore:F.hasMore||$.hasMore,loadingMore:F.isLoadingMore||$.isLoadingMore,onLoadMore:()=>{F.hasMore&&F.loadMore(),$.hasMore&&$.loadMore()},emptyState:f.jsxs(Fl,{icon:o2,title:"Nothing here yet",description:"Upload your first file or create a folder to get started.",children:[f.jsxs("button",{type:"button",className:"btn-gold",onClick:()=>e.openPicker(u),children:[f.jsx(ml,{className:"h-4 w-4","aria-hidden":"true"}),"Upload files"]}),f.jsxs("button",{type:"button",className:"btn-secondary",onClick:s,children:[f.jsx(y0,{className:"h-4 w-4","aria-hidden":"true"}),"New folder"]})]})})})]}),I?f.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:f.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,f.jsxs(ah,{count:A.count,onClear:A.clear,onSelectAll:()=>A.selectAll(ne),children:[f.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>Z.openMove(fe),children:[f.jsx(Nd,{className:"h-4 w-4","aria-hidden":"true"}),"Move"]}),f.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>Z.runBatch("star",fe),children:[f.jsx(us,{className:"h-4 w-4","aria-hidden":"true"}),"Star"]}),f.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>Z.runBatch("unstar",fe),children:[f.jsx(mf,{className:"h-4 w-4","aria-hidden":"true"}),"Unstar"]}),f.jsxs("button",{type:"button",className:"btn-danger",onClick:()=>Z.runBatch("trash",fe),children:[f.jsx(Er,{className:"h-4 w-4","aria-hidden":"true"}),"Trash"]})]}),f.jsx(ih,{menu:C,onClose:()=>k(null)}),f.jsx(Lo,{item:T,onClose:()=>E(null),onAction:Z.handleAction}),Z.dialogs]})}const wb=/^\d{3,10}$/,av="font-semibold text-gold-text transition-colors hover:underline";function Sb(){const e=Gf(),n=un(),s=di(),[i,a]=S.useState("phone"),[c,u]=S.useState(""),[h,m]=S.useState(""),[g,y]=S.useState(""),[v,x]=S.useState(null),[C,k]=S.useState(!1),T=S.useCallback(async()=>{try{const ne=await we.auth.me();n.setQueryData(Do,ne),s("/",{replace:!0})}catch{x("Signed in, but loading your drive failed. Please reload the page.")}finally{k(!1)}},[n,s]),E=Kt({mutationFn:()=>we.auth.startLogin(c.trim()),onSuccess:()=>{x(null),a("code")},onError:ne=>x(Qe(ne,"Could not send the login code"))}),A=Kt({mutationFn:()=>we.auth.verifyCode(c.trim(),h.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:()=>k(!1)}),I=Kt({mutationFn:()=>we.auth.verifyPassword(c.trim(),g),onSuccess:async()=>{await T()},onError:ne=>x(Qe(ne,"The password was rejected")),onSettled:()=>k(!1)});if(e.data!==void 0&&e.data.user!==null)return f.jsx(df,{to:"/",replace:!0});const b=E.isPending||A.isPending||I.isPending||C,O=A.isPending||I.isPending||C,z=ne=>{ne.preventDefault(),!(b||c.trim()==="")&&(x(null),E.mutate())},B=ne=>{if(ne.preventDefault(),!b){if(!wb.test(h.trim())){x("Please enter the numeric code Telegram sent you");return}x(null),k(!0),A.mutate()}},L=ne=>{ne.preventDefault(),!(b||g==="")&&(x(null),k(!0),I.mutate())},F=()=>{a("phone"),m(""),x(null)},$=v!==null?f.jsx("div",{role:"alert",className:"notice notice-error",children:v}):null,Y=O?f.jsxs("div",{role:"status",className:"notice flex items-center gap-2.5",children:[f.jsx(Lt,{className:"h-4 w-4 shrink-0 animate-spin text-gold-text","aria-hidden":"true"}),f.jsx("span",{children:"Preparing your private storage…"})]}):null;return f.jsxs("div",{className:"grid min-h-dvh lg:grid-cols-2",children:[f.jsx("a",{href:"#main",className:"skip-link btn-gold",children:"Skip to content"}),f.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:[f.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%)"}}),f.jsxs("a",{href:"/",className:"relative flex items-center gap-2.5 text-[15px] font-semibold text-white",children:[f.jsx("span",{className:"text-lg leading-none",children:"◈"})," Omni",f.jsx("span",{className:"font-normal text-white/80",children:"Cloud"})]}),f.jsxs("div",{className:"relative",children:[f.jsxs("p",{className:"text-[clamp(34px,3.4vw,48px)] font-extrabold leading-[1.08] tracking-[-0.03em] text-white",children:["Your drive.",f.jsx("br",{}),"Powered by Telegram."]}),f.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."})]}),f.jsx("p",{className:"relative text-xs text-white/70",children:"© 2026 OmniCloud · self-hosted storage on your Telegram."})]}),f.jsxs("main",{id:"main",className:"flex min-h-dvh flex-col px-5 py-7",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsxs("a",{href:"/",className:"flex items-center gap-2.5 text-[15px] font-semibold lg:invisible",children:[f.jsx("span",{className:"text-lg leading-none text-gold",children:"◈"})," Omni",f.jsx("span",{className:"muted font-normal",children:"Cloud"})]}),f.jsx(L1,{})]}),f.jsx("div",{className:"flex flex-1 items-center justify-center py-10",children:f.jsxs("div",{className:"w-full max-w-sm",children:[i==="phone"?f.jsxs(f.Fragment,{children:[f.jsxs("form",{onSubmit:z,noValidate:!0,className:"grid gap-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-bold tracking-[-0.02em]",children:"Sign in with Telegram"}),f.jsx("p",{className:"muted mt-1.5 text-sm",children:"Enter your phone number to receive a login code."})]}),f.jsxs("label",{htmlFor:"login-phone",className:"grid gap-1.5",children:[f.jsx("span",{className:"text-[13px] font-medium",children:"Phone number"}),f.jsx("input",{id:"login-phone",type:"tel",autoComplete:"tel",placeholder:"+15551234567",value:c,disabled:b,onChange:ne=>u(ne.target.value),className:"input"})]}),f.jsxs("button",{type:"submit",className:"btn-gold mt-1 justify-center",disabled:b||c.trim()==="",children:[E.isPending&&f.jsx(Lt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),E.isPending?"Sending code…":"Continue"]})]}),$]}):i==="code"?f.jsxs(f.Fragment,{children:[f.jsxs("form",{onSubmit:B,noValidate:!0,className:"grid gap-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-bold tracking-[-0.02em]",children:"Enter the code"}),f.jsxs("p",{className:"muted mt-1.5 text-sm",children:["Enter the code Telegram sent to ",f.jsx("span",{className:"font-medium",children:c}),"."]})]}),f.jsxs("label",{htmlFor:"login-code",className:"grid gap-1.5",children:[f.jsx("span",{className:"text-[13px] font-medium",children:"Login code"}),f.jsx("input",{id:"login-code",type:"text",inputMode:"numeric",autoComplete:"one-time-code",autoFocus:!0,value:h,disabled:b,onChange:ne=>m(ne.target.value),className:"input tracking-[0.3em]"})]}),f.jsxs("button",{type:"submit",className:"btn-gold mt-1 justify-center",disabled:b||h.trim()==="",children:[A.isPending&&f.jsx(Lt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),A.isPending?"Verifying…":"Verify"]})]}),Y,$,f.jsx("button",{type:"button",onClick:F,disabled:b,className:`mt-4 w-full text-center text-sm disabled:opacity-60 ${av}`,children:"Use a different number →"})]}):f.jsxs(f.Fragment,{children:[f.jsxs("form",{onSubmit:L,noValidate:!0,className:"grid gap-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-bold tracking-[-0.02em]",children:"Two-factor password"}),f.jsx("p",{className:"muted mt-1.5 text-sm",children:"Your Telegram account is protected with a cloud password."})]}),f.jsxs("label",{htmlFor:"login-password",className:"grid gap-1.5",children:[f.jsx("span",{className:"text-[13px] font-medium",children:"Password"}),f.jsx("input",{id:"login-password",type:"password",autoComplete:"current-password",autoFocus:!0,value:g,disabled:b,onChange:ne=>y(ne.target.value),className:"input"})]}),f.jsxs("button",{type:"submit",className:"btn-gold mt-1 justify-center",disabled:b||g==="",children:[(I.isPending||C)&&f.jsx(Lt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),I.isPending||C?"Signing in…":"Sign in"]})]}),Y,$,f.jsx("button",{type:"button",onClick:()=>{a("code"),y(""),x(null)},disabled:b,className:`mt-4 w-full text-center text-sm disabled:opacity-60 ${av}`,children:"Back to the code →"})]}),f.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 kb=100,Cb={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 Eb(){const[e,n]=S.useState(null),s=Co({queryKey:["recent"],queryFn:a=>we.recent.list({page:a,limit:kb}).then(c=>({items:c.items.map(u=>({key:`${u.file.id}:${u.lastActionAt}`,item:mi(u.file),action:u.lastAction,at:u.lastActionAt,label:UN(u.lastActionAt)})),pagination:c.pagination}))}),i=S.useMemo(()=>{const a=new Map;for(const c of s.items){const u=a.get(c.label);u===void 0?a.set(c.label,[c]):u.push(c)}return Array.from(a.entries())},[s.items]);return f.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-6 md:px-8",children:[f.jsx(oi,{title:f.jsxs("div",{children:[f.jsx(ai,{children:"Recent"}),f.jsx("p",{className:"muted mt-1 text-[13px]",children:"What you have touched lately, newest first."})]})}),s.isLoading?f.jsx(Zf,{label:"Loading recent activity"}):s.isError?f.jsxs("div",{className:"card mt-6 p-6 text-center",children:[f.jsx("p",{className:"text-sm font-medium",children:"Something went wrong."}),f.jsx("p",{className:"muted mt-1 text-sm",children:Qe(s.error,"Could not load recent activity.")}),f.jsx("button",{type:"button",className:"btn-secondary mt-4",onClick:s.refetch,children:"Try again"})]}):s.items.length===0?f.jsx(Fl,{icon:r0,title:"Nothing recent",description:"Uploads, downloads and edits will appear here."}):f.jsx("div",{className:"mt-5 grid gap-6",children:i.map(([a,c])=>f.jsxs("section",{children:[f.jsx("h2",{className:"eyebrow",children:a}),f.jsx("ul",{className:"mt-3 grid gap-1.5",children:c.map(u=>{const{Icon:h,color:m}=Vn(u.item.mimeType);return f.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:[f.jsxs("button",{type:"button",onClick:()=>n(u.item),className:"flex min-w-0 flex-1 items-center gap-3 text-left",children:[f.jsx(h,{className:`h-5 w-5 shrink-0 ${m}`,"aria-hidden":"true"}),f.jsxs("span",{className:"min-w-0 flex-1",children:[f.jsx("span",{className:"block truncate text-sm font-medium",title:u.item.name,children:u.item.name}),f.jsxs("span",{className:"muted block text-[12px]",children:[Cb[u.action],f.jsx("span",{className:"mx-1.5","aria-hidden":"true",children:"·"}),$s(u.at)]})]}),f.jsx("span",{className:"muted hidden shrink-0 text-[12.5px] tabular-nums sm:block",children:Nt(u.item.size)})]}),f.jsx("button",{type:"button","aria-label":`Download ${u.item.name}`,onClick:()=>we.files.download(u.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:f.jsx(hf,{className:"h-4 w-4","aria-hidden":"true"})})]},u.key)})})]},a))}),s.hasMore?f.jsx("div",{className:"mt-6 flex justify-center",children:f.jsx("button",{type:"button",className:"btn-secondary",onClick:s.loadMore,disabled:s.isLoadingMore,children:s.isLoadingMore?"Loading...":"Load more"})}):null,f.jsx(Lo,{item:e,onClose:()=>n(null),onAction:(a,c)=>{a==="download"&&we.files.download(c.id)}})]})}const jb=100;function Tb(){const{uploads:e}=_l(),n=di(),[s,i]=nh("omnicloud-view","list",Xf),[a,c]=S.useState(null),[u,h]=S.useState(null),m=sh(),g=Co({queryKey:["starred"],queryFn:k=>we.starred.list({page:k,limit:jb,status:"active"}).then(T=>({items:[...T.folders.map(Yf),...T.files.map(mi)],pagination:T.pagination}))}),y=g.items,v=S.useMemo(()=>y.map(on),[y]);S.useEffect(()=>{m.prune(v)},[v,m]);const x=th({onOpenItem:k=>{k.kind==="folder"?n(`/?folder=${encodeURIComponent(k.id)}`):we.files.download(k.id)},onShowDetails:h,onReplaceFile:e.replace}),C=S.useMemo(()=>y.filter(k=>m.isSelected(on(k))),[y,m]);return rh({onDelete:()=>x.runBatch("trash",C),onSelectAll:()=>m.selectAll(v),onEscape:()=>h(null)}),f.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-6 md:px-8",children:[f.jsx(oi,{title:f.jsxs("div",{children:[f.jsx(ai,{children:"Starred"}),f.jsx("p",{className:"muted mt-1 text-[13px]",children:"Files and folders you marked for quick access."})]}),actions:f.jsx(lh,{view:s,onChange:i})}),f.jsx("div",{className:"mt-5",children:f.jsx(oh,{items:y,view:s,selection:m,onOpen:k=>x.handleAction(k.kind==="folder"?"open":"download",k),onAction:x.handleAction,onContextMenu:c,loading:g.isLoading,error:g.isError?Qe(g.error,"Could not load starred items."):null,onRetry:g.refetch,hasMore:g.hasMore,loadingMore:g.isLoadingMore,onLoadMore:g.loadMore,emptyState:f.jsx(Fl,{icon:us,title:"No starred items",description:"Star files and folders from My Drive to find them here."})})}),f.jsx(ah,{count:m.count,onClear:m.clear,onSelectAll:()=>m.selectAll(v),children:f.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>x.runBatch("unstar",C),children:[f.jsx(mf,{className:"h-4 w-4","aria-hidden":"true"}),"Unstar"]})}),f.jsx(ih,{menu:a,onClose:()=>c(null)}),f.jsx(Lo,{item:u,onClose:()=>h(null),onAction:x.handleAction}),x.dialogs]})}function tl({icon:e,label:n,value:s}){return f.jsxs("div",{className:"card flex items-center gap-3 p-4",children:[f.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}),f.jsxs("span",{className:"min-w-0",children:[f.jsx("span",{className:"muted block text-[12px]",children:n}),f.jsx("span",{className:"block truncate text-[15px] font-semibold tabular-nums",children:s})]})]})}function Pb(){var x,C;const e=fs(),[n,s]=S.useState(null),[i,a]=S.useState(!1),c=Nr({queryKey:RN,queryFn:we.storage.stats}),u=Kt({mutationFn:()=>we.storage.integrityCheck(i),onError:k=>e.error(Qe(k,"The integrity check failed"))}),h=(x=c.data)==null?void 0:x.stats,m=S.useMemo(()=>{if(h===void 0)return[];const k=Math.max(1,...h.byType.map(T=>T.bytes));return[...h.byType].sort((T,E)=>E.bytes-T.bytes).map(T=>({...T,percent:Math.round(T.bytes/k*100)}))},[h]);if(c.isPending)return f.jsx(Zf,{label:"Loading storage statistics"});if(c.isError||h===void 0)return f.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-6 md:px-8",children:[f.jsx(oi,{title:f.jsx(ai,{children:"Storage"})}),f.jsxs("div",{className:"card mt-6 p-6 text-center",children:[f.jsx("p",{className:"text-sm font-medium",children:"Could not load storage statistics."}),f.jsx("p",{className:"muted mt-1 text-sm",children:Qe(c.error,"The storage backend may be unavailable.")}),f.jsx("button",{type:"button",className:"btn-secondary mt-4",onClick:()=>void c.refetch(),children:"Try again"})]})]});const g=h.quotaBytes,y=g!==null&&g>0?Math.min(100,h.totalBytes/g*100):null,v=(C=u.data)==null?void 0:C.report;return f.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-6 md:px-8",children:[f.jsx(oi,{title:f.jsxs("div",{children:[f.jsx(ai,{children:"Storage"}),f.jsx("p",{className:"muted mt-1 text-[13px]",children:"Keep an eye on usage, file types and storage health."})]})}),f.jsxs("section",{className:"card mt-5 p-5","aria-label":"Usage",children:[f.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[f.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[f.jsx(po,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"Usage"]}),f.jsxs("p",{className:"muted text-[13px] tabular-nums",children:[Nt(h.totalBytes),g!==null?` of ${Nt(g)}`:" used"]})]}),f.jsx("div",{className:"mt-3 h-2.5 overflow-hidden rounded-full bg-surface-2",children:f.jsx("div",{className:"progress-fill",style:{width:y===null?h.totalBytes>0?"100%":"0%":`${y}%`}})}),y!==null?f.jsxs("p",{className:"muted mt-2 text-[12px] tabular-nums",children:[Math.round(y),"% of quota used"]}):f.jsx("p",{className:"muted mt-2 text-[12px]",children:"No quota set on this account."})]}),f.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-3 sm:grid-cols-3",children:[f.jsx(tl,{icon:f.jsx(Rg,{className:"h-5 w-5","aria-hidden":"true"}),label:"Files",value:h.fileCount.toLocaleString()}),f.jsx(tl,{icon:f.jsx(po,{className:"h-5 w-5","aria-hidden":"true"}),label:"Folders",value:h.folderCount.toLocaleString()}),f.jsx(tl,{icon:f.jsx(us,{className:"h-5 w-5","aria-hidden":"true"}),label:"Starred",value:h.starredCount.toLocaleString()}),f.jsx(tl,{icon:f.jsx(Er,{className:"h-5 w-5","aria-hidden":"true"}),label:"In trash",value:`${Nt(h.trashBytes)} · ${h.trashFileCount}`})]}),f.jsxs("section",{className:"card mt-6 p-5","aria-label":"Breakdown by type",children:[f.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[f.jsx(JC,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"By file type"]}),m.length===0?f.jsx("p",{className:"muted mt-3 text-[13px]",children:"No files yet."}):f.jsx("ul",{className:"mt-4 grid gap-3",children:m.map(k=>f.jsxs("li",{children:[f.jsxs("div",{className:"flex items-center justify-between gap-3 text-[13px]",children:[f.jsx("span",{className:"font-medium capitalize",children:k.category}),f.jsxs("span",{className:"muted tabular-nums",children:[Nt(k.bytes)," · ",Sn(k.count,"file")]})]}),f.jsx("div",{className:"mt-1.5 h-2 overflow-hidden rounded-full bg-surface-2",children:f.jsx("div",{className:"progress-fill",style:{width:`${k.percent}%`}})})]},k.category))})]}),f.jsxs("section",{className:"card mt-6 p-5","aria-label":"Largest files",children:[f.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[f.jsx(Rg,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"Largest files"]}),h.largestFiles.length===0?f.jsx("p",{className:"muted mt-3 text-[13px]",children:"No files yet."}):f.jsx("ul",{className:"mt-3 grid gap-1.5",children:h.largestFiles.map(k=>{const{Icon:T,color:E}=Vn(k.mimeType);return f.jsx("li",{children:f.jsxs("button",{type:"button",onClick:()=>s(mi(k)),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:[f.jsx(T,{className:`h-5 w-5 shrink-0 ${E}`,"aria-hidden":"true"}),f.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",title:k.name,children:k.name}),f.jsx("span",{className:"muted shrink-0 text-[12.5px] tabular-nums",children:Nt(k.size)})]})},k.id)})})]}),f.jsxs("section",{className:"card mt-6 p-5","aria-label":"Integrity check",children:[f.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[f.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[f.jsx(k2,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"Integrity check"]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("label",{className:"muted flex items-center gap-2 text-[12.5px]",children:[f.jsx("input",{type:"checkbox",checked:i,onChange:k=>a(k.target.checked),className:"h-3.5 w-3.5",style:{accentColor:"var(--gold)"}}),"Deep scan"]}),f.jsxs("button",{type:"button",className:"btn-gold px-3.5 py-2 text-[13px]",onClick:()=>u.mutate(),disabled:u.isPending,children:[u.isPending&&f.jsx(Lt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),u.isPending?"Checking...":"Run check"]})]})]}),f.jsx("p",{className:"muted mt-2 text-[12.5px]",children:"A deep scan re-downloads and hashes every file — slower, but catches silent corruption."}),u.isPending?f.jsxs("p",{className:"muted mt-4 flex items-center gap-2 text-[13px]",children:[f.jsx(Lt,{className:"h-4 w-4 animate-spin text-gold-text","aria-hidden":"true"}),"Scanning your storage..."]}):v!==void 0?f.jsx(Nb,{report:v}):null]}),f.jsx(Lo,{item:n,onClose:()=>s(null),onAction:()=>{}})]})}function Nb({report:e}){const n=e.issues.length===0;return f.jsxs("div",{className:"mt-4",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-[13px]",children:[f.jsxs("span",{className:"flex items-center gap-1.5 font-medium",children:[n?f.jsx(i2,{className:"h-4 w-4 text-ok","aria-hidden":"true"}):f.jsx(pl,{className:"h-4 w-4 text-bad","aria-hidden":"true"}),n?"All files healthy":`${Sn(e.issues.length,"issue")} found`]}),f.jsxs("span",{className:"muted tabular-nums",children:[Sn(e.filesChecked,"file")," checked"]}),f.jsxs("span",{className:"muted tabular-nums",children:[e.healthy," healthy"]}),f.jsxs("span",{className:"muted tabular-nums",children:[e.missing," missing"]}),f.jsxs("span",{className:"muted tabular-nums",children:[e.inconsistent," inconsistent"]}),f.jsxs("span",{className:"muted tabular-nums",children:[e.unreadable," unreadable"]}),f.jsxs("span",{className:"muted",children:["checked ",Jd(e.checkedAt)]})]}),e.issues.length>0?f.jsx("ul",{className:"mt-3 grid gap-1.5",children:e.issues.map(s=>f.jsxs("li",{className:"flex items-start gap-3 rounded-xl border border-line bg-bg-soft px-3 py-2.5",children:[f.jsx(pl,{className:"mt-0.5 h-4 w-4 shrink-0 text-bad","aria-hidden":"true"}),f.jsxs("span",{className:"min-w-0 flex-1",children:[f.jsx("span",{className:"block truncate text-[13px] font-medium",title:s.name,children:s.name}),f.jsxs("span",{className:"muted block text-[12px]",children:[s.kind.replace(/_/g," "),s.detail!==null?` · ${s.detail}`:""]})]}),f.jsx("span",{className:"muted shrink-0 text-[11px]",children:$s(e.checkedAt)})]},`${s.fileId}:${s.kind}`))}):null]})}const bb=100;function Mb(){const{uploads:e}=_l(),n=un(),s=fs(),[i,a]=nh("omnicloud-view","list",Xf),[c,u]=S.useState(null),[h,m]=S.useState(null),[g,y]=S.useState(!1),v=sh(),x=Co({queryKey:["trash"],queryFn:O=>we.trash.list({page:O,limit:bb}).then(z=>({items:[...z.folders.map(Yf),...z.files.map(mi)],pagination:z.pagination}))}),C=x.items,k=S.useMemo(()=>C.map(on),[C]);S.useEffect(()=>{v.prune(k)},[k,v]);const T=th({onOpenItem:()=>{},onShowDetails:m,onReplaceFile:e.replace}),E=S.useMemo(()=>C.filter(O=>v.isSelected(on(O))),[C,v]),A=Kt({mutationFn:we.trash.empty,onSuccess:O=>{cs(n),y(!1),s.success(`Emptied trash: ${Sn(O.deletedFiles,"file")}, ${Sn(O.deletedFolders,"folder")}`+(O.failedFiles>0?`, ${O.failedFiles} failed`:""))},onError:O=>s.error(Qe(O,"Could not empty the trash"))});rh({onDelete:()=>T.requestDelete(E),onSelectAll:()=>v.selectAll(k),onEscape:()=>m(null)});const I=S.useCallback(O=>{O(),v.clear()},[v]),b=f.jsx(Fl,{icon:Er,title:"Trash is empty",description:"Items you move to the trash will show up here until you delete them permanently."});return f.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-6 md:px-8",children:[f.jsx(oi,{title:f.jsxs("div",{children:[f.jsx(ai,{children:"Trash"}),f.jsx("p",{className:"muted mt-1 text-[13px]",children:"Items here keep counting toward nothing until you empty the trash."})]}),actions:f.jsxs(f.Fragment,{children:[f.jsx(lh,{view:i,onChange:a}),f.jsxs("button",{type:"button",className:"btn-danger",onClick:()=>y(!0),disabled:C.length===0,children:[f.jsx(Er,{className:"h-4 w-4","aria-hidden":"true"}),"Empty trash"]})]})}),f.jsx("div",{className:"mt-5",children:f.jsx(oh,{items:C,view:i,selection:v,onOpen:O=>m(O),onAction:T.handleAction,onContextMenu:u,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:b})}),f.jsxs(ah,{count:v.count,onClear:v.clear,onSelectAll:()=>v.selectAll(k),children:[f.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>I(()=>T.runBatch("restore",E)),children:[f.jsx(pf,{className:"h-4 w-4","aria-hidden":"true"}),"Restore"]}),f.jsxs("button",{type:"button",className:"btn-danger",onClick:()=>T.requestDelete(E),children:[f.jsx(Er,{className:"h-4 w-4","aria-hidden":"true"}),"Delete permanently"]})]}),f.jsx(ih,{menu:c,onClose:()=>u(null)}),f.jsx(Lo,{item:h,onClose:()=>m(null),onAction:T.handleAction}),T.dialogs,g?f.jsx(I1,{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:A.isPending,onConfirm:()=>A.mutate(),onClose:()=>y(!1)}):null]})}function Rb(){const e=un(),[n,s]=S.useState(null),i=Kt({mutationFn:we.storage.ensure,onSuccess:a=>{e.setQueryData(Do,c=>c===void 0?c:{...c,storage:a.storage})},onError:a=>s(Qe(a,"Could not create your storage channel"))});return f.jsx("main",{id:"main",className:"flex min-h-dvh items-center justify-center p-4",children:f.jsxs("div",{className:"card w-full max-w-md p-8 text-center",children:[f.jsx("span",{className:"mx-auto grid h-14 w-14 place-items-center rounded-full border border-gold/50 bg-gold-soft",children:f.jsx(o0,{className:"h-6 w-6 text-gold","aria-hidden":"true"})}),f.jsx("span",{className:"eyebrow mt-5",children:"Finish setup"}),f.jsx("h1",{className:"mt-4 text-2xl font-bold tracking-[-0.02em]",children:"Finish setting up your storage"}),f.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."}),f.jsxs("button",{type:"button",className:"btn-gold mt-6 justify-center",disabled:i.isPending,onClick:()=>{s(null),i.mutate()},children:[i.isPending&&f.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?f.jsx("div",{role:"alert",className:"notice notice-error",children:n}):null]})})}function Db(){return f.jsx("div",{role:"status","aria-label":"Loading",className:"flex h-dvh items-center justify-center bg-bg",children:f.jsx(Lt,{className:"h-7 w-7 animate-spin text-gold","aria-hidden":"true"})})}function Ab({children:e}){const n=Gf();return n.isPending?f.jsx(Db,{}):n.data===void 0||n.data.user===null?f.jsx(df,{to:"/login",replace:!0}):n.data.storage===null?f.jsx(Rb,{}):e}function Lb(){const e=un();return S.useEffect(()=>j2(()=>{e.setQueryData(Do,M1),e.removeQueries({predicate:n=>n.queryKey[0]!=="me"})}),[e]),f.jsxs(jC,{children:[f.jsx(An,{path:"/login",element:f.jsx(Sb,{})}),f.jsxs(An,{element:f.jsx(Ab,{children:f.jsx(ab,{})}),children:[f.jsx(An,{path:"/",element:f.jsx(xb,{})}),f.jsx(An,{path:"/recent",element:f.jsx(Eb,{})}),f.jsx(An,{path:"/starred",element:f.jsx(Tb,{})}),f.jsx(An,{path:"/trash",element:f.jsx(Mb,{})}),f.jsx(An,{path:"/storage",element:f.jsx(Pb,{})})]}),f.jsx(An,{path:"*",element:f.jsx(df,{to:"/",replace:!0})})]})}const Ob=new vk({defaultOptions:{queries:{staleTime:1e4,refetchOnWindowFocus:!1,retry:1}}}),F1=document.getElementById("root");if(F1===null)throw new Error("Root element is missing from index.html");Lk.createRoot(F1).render(f.jsx(S.StrictMode,{children:f.jsx(KS,{client:Ob,children:f.jsx(_N,{children:f.jsx(LC,{children:f.jsx(Lb,{})})})})}));