@lacrous/omnicloud 0.2.33 → 0.2.35

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,346 +0,0 @@
1
- var yk=Object.defineProperty;var Yg=e=>{throw TypeError(e)};var vk=(e,t,s)=>t in e?yk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Wc=(e,t,s)=>vk(e,typeof t!="symbol"?t+"":t,s),qc=(e,t,s)=>t.has(e)||Yg("Cannot "+s);var j=(e,t,s)=>(qc(e,t,"read from private field"),s?s.call(e):t.get(e)),ce=(e,t,s)=>t.has(e)?Yg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),te=(e,t,s,i)=>(qc(e,t,"write to private field"),i?i.call(e,s):t.set(e,s),s),ve=(e,t,s)=>(qc(e,t,"access private method"),s);var tl=(e,t,s,i)=>({set _(o){te(e,t,o,s)},get _(){return j(e,t,i)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function s(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=s(o);fetch(o.href,l)}})();function xk(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qc={exports:{}},uo={},Gc={exports:{}},Se={};/**
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 Xg;function wk(){if(Xg)return Se;Xg=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function x(V){return V===null||typeof V!="object"?null:(V=v&&V[v]||V["@@iterator"],typeof V=="function"?V:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,E={};function T(V,F,ne){this.props=V,this.context=F,this.refs=E,this.updater=ne||C}T.prototype.isReactComponent={},T.prototype.setState=function(V,F){if(typeof V!="object"&&typeof V!="function"&&V!=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,V,F,"setState")},T.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function P(){}P.prototype=T.prototype;function L(V,F,ne){this.props=V,this.context=F,this.refs=E,this.updater=ne||C}var b=L.prototype=new P;b.constructor=L,k(b,T.prototype),b.isPureReactComponent=!0;var M=Array.isArray,_=Object.prototype.hasOwnProperty,I={current:null},R={key:!0,ref:!0,__self:!0,__source:!0};function D(V,F,ne){var ye,ke={},Te=null,Ce=null;if(F!=null)for(ye in F.ref!==void 0&&(Ce=F.ref),F.key!==void 0&&(Te=""+F.key),F)_.call(F,ye)&&!R.hasOwnProperty(ye)&&(ke[ye]=F[ye]);var xe=arguments.length-2;if(xe===1)ke.children=ne;else if(1<xe){for(var je=Array(xe),it=0;it<xe;it++)je[it]=arguments[it+2];ke.children=je}if(V&&V.defaultProps)for(ye in xe=V.defaultProps,xe)ke[ye]===void 0&&(ke[ye]=xe[ye]);return{$$typeof:e,type:V,key:Te,ref:Ce,props:ke,_owner:I.current}}function B(V,F){return{$$typeof:e,type:V.type,key:F,ref:V.ref,props:V.props,_owner:V._owner}}function W(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function G(V){var F={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function(ne){return F[ne]})}var K=/\/+/g;function U(V,F){return typeof V=="object"&&V!==null&&V.key!=null?G(""+V.key):F.toString(36)}function X(V,F,ne,ye,ke){var Te=typeof V;(Te==="undefined"||Te==="boolean")&&(V=null);var Ce=!1;if(V===null)Ce=!0;else switch(Te){case"string":case"number":Ce=!0;break;case"object":switch(V.$$typeof){case e:case t:Ce=!0}}if(Ce)return Ce=V,ke=ke(Ce),V=ye===""?"."+U(Ce,0):ye,M(ke)?(ne="",V!=null&&(ne=V.replace(K,"$&/")+"/"),X(ke,F,ne,"",function(it){return it})):ke!=null&&(W(ke)&&(ke=B(ke,ne+(!ke.key||Ce&&Ce.key===ke.key?"":(""+ke.key).replace(K,"$&/")+"/")+V)),F.push(ke)),1;if(Ce=0,ye=ye===""?".":ye+":",M(V))for(var xe=0;xe<V.length;xe++){Te=V[xe];var je=ye+U(Te,xe);Ce+=X(Te,F,ne,je,ke)}else if(je=x(V),typeof je=="function")for(V=je.call(V),xe=0;!(Te=V.next()).done;)Te=Te.value,je=ye+U(Te,xe++),Ce+=X(Te,F,ne,je,ke);else if(Te==="object")throw F=String(V),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.");return Ce}function ge(V,F,ne){if(V==null)return V;var ye=[],ke=0;return X(V,ye,"","",function(Te){return F.call(ne,Te,ke++)}),ye}function me(V){if(V._status===-1){var F=V._result;F=F(),F.then(function(ne){(V._status===0||V._status===-1)&&(V._status=1,V._result=ne)},function(ne){(V._status===0||V._status===-1)&&(V._status=2,V._result=ne)}),V._status===-1&&(V._status=0,V._result=F)}if(V._status===1)return V._result.default;throw V._result}var Ee={current:null},ee={transition:null},ue={ReactCurrentDispatcher:Ee,ReactCurrentBatchConfig:ee,ReactCurrentOwner:I};function J(){throw Error("act(...) is not supported in production builds of React.")}return Se.Children={map:ge,forEach:function(V,F,ne){ge(V,function(){F.apply(this,arguments)},ne)},count:function(V){var F=0;return ge(V,function(){F++}),F},toArray:function(V){return ge(V,function(F){return F})||[]},only:function(V){if(!W(V))throw Error("React.Children.only expected to receive a single React element child.");return V}},Se.Component=T,Se.Fragment=s,Se.Profiler=o,Se.PureComponent=L,Se.StrictMode=i,Se.Suspense=h,Se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ue,Se.act=J,Se.cloneElement=function(V,F,ne){if(V==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+V+".");var ye=k({},V.props),ke=V.key,Te=V.ref,Ce=V._owner;if(F!=null){if(F.ref!==void 0&&(Te=F.ref,Ce=I.current),F.key!==void 0&&(ke=""+F.key),V.type&&V.type.defaultProps)var xe=V.type.defaultProps;for(je in F)_.call(F,je)&&!R.hasOwnProperty(je)&&(ye[je]=F[je]===void 0&&xe!==void 0?xe[je]:F[je])}var je=arguments.length-2;if(je===1)ye.children=ne;else if(1<je){xe=Array(je);for(var it=0;it<je;it++)xe[it]=arguments[it+2];ye.children=xe}return{$$typeof:e,type:V.type,key:ke,ref:Te,props:ye,_owner:Ce}},Se.createContext=function(V){return V={$$typeof:u,_currentValue:V,_currentValue2:V,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},V.Provider={$$typeof:l,_context:V},V.Consumer=V},Se.createElement=D,Se.createFactory=function(V){var F=D.bind(null,V);return F.type=V,F},Se.createRef=function(){return{current:null}},Se.forwardRef=function(V){return{$$typeof:d,render:V}},Se.isValidElement=W,Se.lazy=function(V){return{$$typeof:y,_payload:{_status:-1,_result:V},_init:me}},Se.memo=function(V,F){return{$$typeof:m,type:V,compare:F===void 0?null:F}},Se.startTransition=function(V){var F=ee.transition;ee.transition={};try{V()}finally{ee.transition=F}},Se.unstable_act=J,Se.useCallback=function(V,F){return Ee.current.useCallback(V,F)},Se.useContext=function(V){return Ee.current.useContext(V)},Se.useDebugValue=function(){},Se.useDeferredValue=function(V){return Ee.current.useDeferredValue(V)},Se.useEffect=function(V,F){return Ee.current.useEffect(V,F)},Se.useId=function(){return Ee.current.useId()},Se.useImperativeHandle=function(V,F,ne){return Ee.current.useImperativeHandle(V,F,ne)},Se.useInsertionEffect=function(V,F){return Ee.current.useInsertionEffect(V,F)},Se.useLayoutEffect=function(V,F){return Ee.current.useLayoutEffect(V,F)},Se.useMemo=function(V,F){return Ee.current.useMemo(V,F)},Se.useReducer=function(V,F,ne){return Ee.current.useReducer(V,F,ne)},Se.useRef=function(V){return Ee.current.useRef(V)},Se.useState=function(V){return Ee.current.useState(V)},Se.useSyncExternalStore=function(V,F,ne){return Ee.current.useSyncExternalStore(V,F,ne)},Se.useTransition=function(){return Ee.current.useTransition()},Se.version="18.3.1",Se}var Jg;function Bf(){return Jg||(Jg=1,Gc.exports=wk()),Gc.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 Zg;function Sk(){if(Zg)return uo;Zg=1;var e=Bf(),t=Symbol.for("react.element"),s=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(d,h,m){var y,v={},x=null,C=null;m!==void 0&&(x=""+m),h.key!==void 0&&(x=""+h.key),h.ref!==void 0&&(C=h.ref);for(y in h)i.call(h,y)&&!l.hasOwnProperty(y)&&(v[y]=h[y]);if(d&&d.defaultProps)for(y in h=d.defaultProps,h)v[y]===void 0&&(v[y]=h[y]);return{$$typeof:t,type:d,key:x,ref:C,props:v,_owner:o.current}}return uo.Fragment=s,uo.jsx=u,uo.jsxs=u,uo}var ey;function kk(){return ey||(ey=1,Qc.exports=Sk()),Qc.exports}var p=kk(),S=Bf();const Uv=S.createContext(void 0),fn=e=>{const t=S.useContext(Uv);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Ck=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(Uv.Provider,{value:e,children:t})),Ek={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)};var wr,Vf,Mv,Tk=(Mv=class{constructor(){ce(this,wr,Ek);ce(this,Vf,!1)}setTimeoutProvider(e){te(this,wr,e)}setTimeout(e,t){return j(this,wr).setTimeout(e,t)}clearTimeout(e){j(this,wr).clearTimeout(e)}setInterval(e,t){return j(this,wr).setInterval(e,t)}clearInterval(e){j(this,wr).clearInterval(e)}},wr=new WeakMap,Vf=new WeakMap,Mv);const Xr=new Tk;function Pk(e){setTimeout(e,0)}const Nk=typeof window>"u"||"Deno"in globalThis;function St(){}function bk(e,t){return typeof e=="function"?e(t):e}function $v(e){return typeof e=="number"&&e>=0&&e!==1/0}function Hv(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ve(e,t){return typeof e=="function"?e(t):e}function ty(e,t){const{type:s="all",exact:i,fetchStatus:o,predicate:l,queryKey:u,stale:d}=e;if(u){if(i){if(t.queryHash!==zf(u,t.options))return!1}else if(!ci(t.queryKey,u))return!1}if(s!=="all"){const h=t.isActive();if(s==="active"&&!h||s==="inactive"&&h)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||o&&o!==t.state.fetchStatus||l&&!l(t))}function ny(e,t){const{exact:s,status:i,predicate:o,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(s){if(fs(t.options.mutationKey)!==fs(l))return!1}else if(!ci(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||o&&!o(t))}function zf(e,t){return((t==null?void 0:t.queryKeyHashFn)||fs)(e)}function fs(e){return JSON.stringify(e,(t,s)=>Qd(s)?Object.keys(s).sort().reduce((i,o)=>(i[o]=s[o],i),{}):s)}function ci(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let i=0;i<t.length;i++)if(!ci(e[i],t[i]))return!1;return!0}const s=Object.keys(t);for(const i of s)if(!ci(e[i],t[i]))return!1;return!0}return!1}const Rk=Object.prototype.hasOwnProperty;function Kv(e,t,s=0){if(e===t)return e;if(s>500)return t;const i=ry(e)&&ry(t);if(!i&&!(Qd(e)&&Qd(t)))return t;const o=(i?e:Object.keys(e)).length,l=i?t:Object.keys(t),u=l.length,d=i?new Array(u):{};let h=0;for(let m=0;m<u;m++){const y=i?m:l[m],v=e[y],x=t[y];if(v===x){d[y]=v,(i?m<o:Rk.call(e,y))&&h++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){d[y]=x;continue}const C=Kv(v,x,s+1);d[y]=C,C===v&&h++}return o===u&&h===o?e:d}function pl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function ry(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Qd(e){if(!sy(e))return!1;const t=Object.getPrototypeOf(e),s=t==null?void 0:t.constructor;if(s===void 0)return!0;if(typeof s!="function")return!1;const i=s.prototype;return!(!sy(i)||!i.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function sy(e){return Object.prototype.toString.call(e)==="[object Object]"}function jk(e){return new Promise(t=>{Xr.setTimeout(t,e)})}function Gd(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?Kv(e,t):t}function Mk(e){return e}function Dk(e,t,s=0){const i=[...e,t];return s&&i.length>s?i.slice(1):i}function Ak(e,t,s=0){const i=[t,...e];return s&&i.length>s?i.slice(0,-1):i}const Uf=Symbol();function Wv(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Uf?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function $f(e,t){return typeof e=="function"?e(...t):!!e}function Lk(e,t,s){let i=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=t()),i||(i=!0,o.aborted?s():o.addEventListener("abort",s,{once:!0})),o)}),e}let Ik=()=>Nk;const Hf=()=>Ik();var mi=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(){}},es,Sr,Xs,Dv,Fk=(Dv=class extends mi{constructor(){super();ce(this,es);ce(this,Sr);ce(this,Xs);te(this,Xs,t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){j(this,Sr)||this.setEventListener(j(this,Xs))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,Sr))==null||t.call(this),te(this,Sr,void 0))}setEventListener(t){var s;te(this,Xs,t),(s=j(this,Sr))==null||s.call(this),te(this,Sr,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){j(this,es)!==t&&(te(this,es,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof j(this,es)=="boolean"?j(this,es):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},es=new WeakMap,Sr=new WeakMap,Xs=new WeakMap,Dv);const Kf=new Fk,_k=Pk;function Ok(){let e=[],t=0,s=d=>{d()},i=d=>{d()},o=_k;const l=d=>{t?e.push(d):o(()=>{s(d)})},u=()=>{const d=e;e=[],d.length&&o(()=>{i(()=>{d.forEach(h=>{s(h)})})})};return{batch:d=>{let h;t++;try{h=d()}finally{t--,t||u()}return h},batchCalls:d=>(...h)=>{l(()=>{d(...h)})},schedule:l,setNotifyFunction:d=>{s=d},setBatchNotifyFunction:d=>{i=d},setScheduler:d=>{o=d}}}const tt=Ok();var Js,kr,Zs,Av,Vk=(Av=class extends mi{constructor(){super();ce(this,Js,!0);ce(this,kr);ce(this,Zs);te(this,Zs,t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",i)}}})}onSubscribe(){j(this,kr)||this.setEventListener(j(this,Zs))}onUnsubscribe(){var t;this.hasListeners()||((t=j(this,kr))==null||t.call(this),te(this,kr,void 0))}setEventListener(t){var s;te(this,Zs,t),(s=j(this,kr))==null||s.call(this),te(this,kr,t(this.setOnline.bind(this)))}setOnline(t){j(this,Js)!==t&&(te(this,Js,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return j(this,Js)}},Js=new WeakMap,kr=new WeakMap,Zs=new WeakMap,Av);const Tl=new Vk;function Bk(e){return Math.min(1e3*2**e,3e4)}function qv(e){return(e??"online")==="online"?Tl.isOnline():!0}var Yd=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Qv(e){let t=!1,s=0,i,o="pending",l,u;const d=new Promise((L,b)=>{l=L,u=b});d.catch(St);const h=()=>o!=="pending",m=L=>{var b;if(!h()){const M=new Yd(L);E(M),(b=e.onCancel)==null||b.call(e,M)}},y=()=>{t=!0},v=()=>{t=!1},x=()=>Kf.isFocused()&&(e.networkMode==="always"||Tl.isOnline())&&e.canRun(),C=()=>qv(e.networkMode)&&e.canRun(),k=L=>{h()||(i==null||i(),o="resolved",l(L))},E=L=>{h()||(i==null||i(),o="rejected",u(L))},T=()=>new Promise(L=>{var b;i=M=>{(h()||x())&&L(M)},(b=e.onPause)==null||b.call(e)}).then(()=>{var L;i=void 0,h()||(L=e.onContinue)==null||L.call(e)}),P=()=>{if(h())return;let L;const b=s===0?e.initialPromise:void 0;try{L=b??e.fn()}catch(M){L=Promise.reject(M)}Promise.resolve(L).then(k).catch(M=>{var B;if(h())return;const _=e.retry??(Hf()?0:3),I=e.retryDelay??Bk,R=typeof I=="function"?I(s,M):I,D=_===!0||typeof _=="number"&&s<_||typeof _=="function"&&_(s,M);if(t||!D){E(M);return}s++,(B=e.onFail)==null||B.call(e,s,M),jk(R).then(()=>x()?void 0:T()).then(()=>{t?E(M):P()})})};return{promise:d,status:()=>o,cancel:m,continue:()=>(i==null||i(),d),cancelRetry:y,continueRetry:v,canStart:C,start:()=>(C()?P():T().then(P),d)}}var ts,Lv,Gv=(Lv=class{constructor(){ce(this,ts)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$v(this.gcTime)&&te(this,ts,Xr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Hf()?1/0:3e5))}clearGcTimeout(){j(this,ts)!==void 0&&(Xr.clearTimeout(j(this,ts)),te(this,ts,void 0))}},ts=new WeakMap,Lv);function zk(e){return{onFetch:(t,s)=>{var y,v,x,C,k;const i=t.options,o=(x=(v=(y=t.fetchOptions)==null?void 0:y.meta)==null?void 0:v.fetchMore)==null?void 0:x.direction,l=((C=t.state.data)==null?void 0:C.pages)||[],u=((k=t.state.data)==null?void 0:k.pageParams)||[];let d={pages:[],pageParams:[]},h=0;const m=async()=>{let E=!1;const T=b=>{Lk(b,()=>t.signal,()=>E=!0)},P=Wv(t.options,t.fetchOptions),L=async(b,M,_)=>{if(E)return Promise.reject(t.signal.reason);if(M==null&&b.pages.length)return Promise.resolve(b);const R=(()=>{const G={client:t.client,queryKey:t.queryKey,pageParam:M,direction:_?"backward":"forward",meta:t.options.meta};return T(G),G})(),D=await P(R),{maxPages:B}=t.options,W=_?Ak:Dk;return{pages:W(b.pages,D,B),pageParams:W(b.pageParams,M,B)}};if(o&&l.length){const b=o==="backward",M=b?Yv:Xd,_={pages:l,pageParams:u};d=await L(_,M(i,_),b)}else{const b=e??l.length;do{const M=h===0?u[0]??i.initialPageParam:Xd(i,d);if(h>0&&M==null)break;d=await L(d,M),h++}while(h<b)}return d};t.options.persister?t.fetchFn=()=>{var E,T;return(T=(E=t.options).persister)==null?void 0:T.call(E,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=m}}}function Xd(e,{pages:t,pageParams:s}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,s[i],s):void 0}function Yv(e,{pages:t,pageParams:s}){var i;return t.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,s[0],s):void 0}function Uk(e,t){return t?Xd(e,t)!=null:!1}function $k(e,t){return!t||!e.getPreviousPageParam?!1:Yv(e,t)!=null}var ei,ns,ti,$t,rs,Xe,Do,ss,on,On,Iv,Hk=(Iv=class extends Gv{constructor(t){super();ce(this,on);ce(this,ei);ce(this,ns);ce(this,ti);ce(this,$t);ce(this,rs);ce(this,Xe);ce(this,Do);ce(this,ss);te(this,ss,!1),te(this,Do,t.defaultOptions),this.setOptions(t.options),this.observers=[],te(this,rs,t.client),te(this,$t,j(this,rs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,te(this,ns,oy(this.options)),this.state=t.state??j(this,ns),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return j(this,ei)}get promise(){var t;return(t=j(this,Xe))==null?void 0:t.promise}setOptions(t){if(this.options={...j(this,Do),...t},t!=null&&t._type&&te(this,ei,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=oy(this.options);s.data!==void 0&&(this.setState(iy(s.data,s.dataUpdatedAt)),te(this,ns,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,$t).remove(this)}setData(t,s){const i=Gd(this.state.data,t,this.options);return ve(this,on,On).call(this,{data:i,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),i}setState(t){ve(this,on,On).call(this,{type:"setState",state:t})}cancel(t){var i,o;const s=(i=j(this,Xe))==null?void 0:i.promise;return(o=j(this,Xe))==null||o.cancel(t),s?s.then(St).catch(St):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return j(this,ns)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Ve(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Uf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ve(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Hv(this.state.dataUpdatedAt,t)}onFocus(){var t,s;(t=this.observers.find(i=>i.shouldFetchOnWindowFocus()))==null||t.refetch({cancelRefetch:!1}),(s=j(this,Xe))==null||s.continue()}onOnline(){var t,s;(t=this.observers.find(i=>i.shouldFetchOnReconnect()))==null||t.refetch({cancelRefetch:!1}),(s=j(this,Xe))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),j(this,$t).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){const s=this.observers.indexOf(t);s!==-1&&(this.observers.splice(s,1),this.observers.length||(j(this,Xe)&&(j(this,ss)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?j(this,Xe).cancel({revert:!0}):j(this,Xe).cancelRetry()),this.scheduleGc()),j(this,$t).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ve(this,on,On).call(this,{type:"invalidate"})}async fetch(t,s){var m,y,v,x,C,k,E,T,P,L,b,M;if(this.state.fetchStatus!=="idle"&&((m=j(this,Xe))==null?void 0:m.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(j(this,Xe))return j(this,Xe).continueRetry(),j(this,Xe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const _=this.observers.find(I=>I.options.queryFn);_&&this.setOptions(_.options)}const i=new AbortController,o=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(te(this,ss,!0),i.signal)})},l=()=>{const _=Wv(this.options,s),R=(()=>{const D={client:j(this,rs),queryKey:this.queryKey,meta:this.meta};return o(D),D})();return te(this,ss,!1),this.options.persister?this.options.persister(_,R,this):_(R)},d=(()=>{const _={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:j(this,rs),state:this.state,fetchFn:l};return o(_),_})();(y=j(this,ei)==="infinite"?zk(this.options.pages):this.options.behavior)==null||y.onFetch(d,this),te(this,ti,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=d.fetchOptions)==null?void 0:v.meta))&&ve(this,on,On).call(this,{type:"fetch",meta:(x=d.fetchOptions)==null?void 0:x.meta});const h=te(this,Xe,Qv({initialPromise:s==null?void 0:s.initialPromise,fn:d.fetchFn,onCancel:_=>{_ instanceof Yd&&_.revert&&this.setState({...j(this,ti),fetchStatus:"idle"}),i.abort()},onFail:(_,I)=>{ve(this,on,On).call(this,{type:"failed",failureCount:_,error:I})},onPause:()=>{ve(this,on,On).call(this,{type:"pause"})},onContinue:()=>{ve(this,on,On).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const _=await h.start();if(_===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(_),(k=(C=j(this,$t).config).onSuccess)==null||k.call(C,_,this),(T=(E=j(this,$t).config).onSettled)==null||T.call(E,_,this.state.error,this),_}catch(_){if(_ instanceof Yd){if(_.silent)return j(this,Xe).promise;if(_.revert){if(this.state.data===void 0)throw _;return this.state.data}}throw ve(this,on,On).call(this,{type:"error",error:_}),(L=(P=j(this,$t).config).onError)==null||L.call(P,_,this),(M=(b=j(this,$t).config).onSettled)==null||M.call(b,this.state.data,_,this),_}finally{j(this,Xe)===h&&te(this,Xe,void 0),this.scheduleGc()}}},ei=new WeakMap,ns=new WeakMap,ti=new WeakMap,$t=new WeakMap,rs=new WeakMap,Xe=new WeakMap,Do=new WeakMap,ss=new WeakMap,on=new WeakSet,On=function(t){const s=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Xv(i.data,this.options),fetchMeta:t.meta??null};case"success":const o={...i,...iy(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return te(this,ti,t.manual?o:void 0),o;case"error":const l=t.error;return{...i,error:l,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=s(this.state),tt.batch(()=>{this.observers.slice().forEach(i=>{i.onQueryUpdate()}),j(this,$t).notify({query:this,type:"updated",action:t})})},Iv);function Xv(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:qv(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function iy(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function oy(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,i=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,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 xt,Ne,Ao,wt,is,ni,zn,Lo,ri,si,os,as,Cr,ii,Me,go,Jd,Zd,ef,tf,nf,rf,sf,of,Fv,Jv=(Fv=class extends mi{constructor(t,s){super();ce(this,Me);ce(this,xt);ce(this,Ne);ce(this,Ao);ce(this,wt);ce(this,is);ce(this,ni);ce(this,zn);ce(this,Lo);ce(this,ri);ce(this,si);ce(this,os);ce(this,as);ce(this,Cr);ce(this,ii,new Set);this.options=s,te(this,xt,t),te(this,zn,null),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(j(this,Ne).addObserver(this),ay(j(this,Ne),this.options)?ve(this,Me,go).call(this):this.updateResult(),ve(this,Me,nf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return af(j(this,Ne),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return af(j(this,Ne),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ve(this,Me,rf).call(this),ve(this,Me,sf).call(this),j(this,Ne).removeObserver(this)}setOptions(t){const s=this.options,i=j(this,Ne);if(this.options=j(this,xt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ve(this.options.enabled,j(this,Ne))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ve(this,Me,of).call(this),j(this,Ne).setOptions(this.options),s._defaulted&&!pl(this.options,s)&&j(this,xt).getQueryCache().notify({type:"observerOptionsUpdated",query:j(this,Ne),observer:this});const o=this.hasListeners();o&&ly(j(this,Ne),i,this.options,s)&&ve(this,Me,go).call(this),this.updateResult(),o&&(j(this,Ne)!==i||Ve(this.options.enabled,j(this,Ne))!==Ve(s.enabled,j(this,Ne))||Ve(this.options.staleTime,j(this,Ne))!==Ve(s.staleTime,j(this,Ne)))&&ve(this,Me,Zd).call(this);const l=ve(this,Me,ef).call(this);o&&(j(this,Ne)!==i||Ve(this.options.enabled,j(this,Ne))!==Ve(s.enabled,j(this,Ne))||l!==j(this,Cr))&&ve(this,Me,tf).call(this,l)}getOptimisticResult(t){const s=j(this,xt).getQueryCache().build(j(this,xt),t),i=this.createResult(s,t);return pl(this.getCurrentResult(),i)||(te(this,wt,i),te(this,ni,this.options),te(this,is,j(this,Ne).state)),i}getCurrentResult(){return j(this,wt)}trackResult(t,s){return new Proxy(t,{get:(i,o)=>(this.trackProp(o),s==null||s(o),Reflect.get(i,o))})}trackProp(t){j(this,ii).add(t)}getCurrentQuery(){return j(this,Ne)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=j(this,xt).defaultQueryOptions(t),i=j(this,xt).getQueryCache().build(j(this,xt),s);let o=()=>{},l;const u=new Promise(d=>{l=d,o=j(this,xt).getQueryCache().subscribe(h=>{h.type==="updated"&&h.query.queryHash===i.queryHash&&i.state.data!==void 0&&(o(),d(this.createResult(i,s)))})});return Promise.race([i.fetch().then(()=>{const d=this.createResult(i,s);return l==null||l(d),d}).finally(()=>{o()}),u])}fetch(t){return ve(this,Me,go).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),j(this,wt)))}createResult(t,s){var I;const i=j(this,Ne),o=this.options,l=j(this,wt),u=j(this,is),d=j(this,ni),h=t!==i?t.state:j(this,Ao),{state:m}=t;let y={...m},v=!1,x;if(s._optimisticResults){const R=this.hasListeners(),D=!R&&ay(t,s),B=R&&ly(t,i,s,o);(D||B)&&(y={...y,...Xv(m.data,t.options)}),s._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:C,errorUpdatedAt:k,status:E}=y;x=y.data;let T=!1;if(s.placeholderData!==void 0&&x===void 0&&E==="pending"){let R;l!=null&&l.isPlaceholderData&&s.placeholderData===(d==null?void 0:d.placeholderData)?(R=l.data,T=!0):R=typeof s.placeholderData=="function"?s.placeholderData((I=j(this,si))==null?void 0:I.state.data,j(this,si)):s.placeholderData,R!==void 0&&(E="success",x=Gd(l==null?void 0:l.data,R,s),v=!0)}if(s.select&&x!==void 0&&!T)if(l&&x===(u==null?void 0:u.data)&&s.select===j(this,Lo))x=j(this,ri);else try{te(this,Lo,s.select),x=s.select(x),x=Gd(l==null?void 0:l.data,x,s),te(this,ri,x),te(this,zn,null)}catch(R){te(this,zn,R)}else x===void 0&&te(this,zn,null);j(this,zn)&&(C=j(this,zn),x=j(this,ri),k=Date.now(),E="error",v=!1);const P=y.fetchStatus==="fetching",L=E==="pending",b=E==="error",M=L&&P,_=x!==void 0;return{status:E,fetchStatus:y.fetchStatus,isPending:L,isSuccess:E==="success",isError:b,isInitialLoading:M,isLoading:M,data:x,dataUpdatedAt:y.dataUpdatedAt,error:C,errorUpdatedAt:k,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:y.dataUpdateCount>h.dataUpdateCount||y.errorUpdateCount>h.errorUpdateCount,isFetching:P,isRefetching:P&&!L,isLoadingError:b&&!_,isPaused:y.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:b&&_,isStale:Wf(t,s),refetch:this.refetch,isEnabled:Ve(s.enabled,t)!==!1}}updateResult(){const t=j(this,wt),s=this.createResult(j(this,Ne),this.options);if(te(this,is,j(this,Ne).state),te(this,ni,this.options),j(this,is).data!==void 0&&te(this,si,j(this,Ne)),pl(s,t))return;te(this,wt,s);const o=(()=>{if(!t)return!0;const{notifyOnChangeProps:l}=this.options,u=typeof l=="function"?l():l;if(u==="all"||!u&&!j(this,ii).size)return!0;const d=new Set(u??j(this,ii));return this.options.throwOnError&&d.add("error"),Object.keys(j(this,wt)).some(h=>{const m=h;return j(this,wt)[m]!==t[m]&&d.has(m)})})();tt.batch(()=>{o&&this.listeners.forEach(l=>{l(j(this,wt))}),j(this,xt).getQueryCache().notify({query:j(this,Ne),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ve(this,Me,nf).call(this)}},xt=new WeakMap,Ne=new WeakMap,Ao=new WeakMap,wt=new WeakMap,is=new WeakMap,ni=new WeakMap,zn=new WeakMap,Lo=new WeakMap,ri=new WeakMap,si=new WeakMap,os=new WeakMap,as=new WeakMap,Cr=new WeakMap,ii=new WeakMap,Me=new WeakSet,go=function(t){ve(this,Me,of).call(this);let s=j(this,Ne).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(St)),s},Jd=function(t){return!Hf()&&Ve(this.options.enabled,j(this,Ne))!==!1&&$v(t)},Zd=function(){ve(this,Me,rf).call(this);const t=Ve(this.options.staleTime,j(this,Ne));if(j(this,wt).isStale||!ve(this,Me,Jd).call(this,t))return;const s=Hv(j(this,wt).dataUpdatedAt,t)+1;te(this,os,Xr.setTimeout(()=>{j(this,wt).isStale||this.updateResult()},s))},ef=function(){return Ve(this.options.refetchInterval,j(this,Ne))??!1},tf=function(t){ve(this,Me,sf).call(this),te(this,Cr,t),!(j(this,Cr)===0||!ve(this,Me,Jd).call(this,j(this,Cr)))&&te(this,as,Xr.setInterval(()=>{(this.options.refetchIntervalInBackground||Kf.isFocused())&&ve(this,Me,go).call(this)},j(this,Cr)))},nf=function(){ve(this,Me,Zd).call(this),ve(this,Me,tf).call(this,ve(this,Me,ef).call(this))},rf=function(){j(this,os)!==void 0&&(Xr.clearTimeout(j(this,os)),te(this,os,void 0))},sf=function(){j(this,as)!==void 0&&(Xr.clearInterval(j(this,as)),te(this,as,void 0))},of=function(){const t=j(this,xt).getQueryCache().build(j(this,xt),this.options);if(t===j(this,Ne))return;const s=j(this,Ne);te(this,Ne,t),te(this,Ao,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},Fv);function Kk(e,t){return Ve(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Ve(t.retryOnMount,e)===!1)}function ay(e,t){return Kk(e,t)||e.state.data!==void 0&&af(e,t,t.refetchOnMount)}function af(e,t,s){if(Ve(t.enabled,e)!==!1&&Ve(t.staleTime,e)!=="static"){const i=Ve(s,e);return i==="always"||i!==!1&&Wf(e,t)}return!1}function ly(e,t,s,i){return(e!==t||Ve(i.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Wf(e,s)}function Wf(e,t){return Ve(t.enabled,e)!==!1&&e.isStaleByTime(Ve(t.staleTime,e))}var Wk=class extends Jv{constructor(e,t){super(e,t)}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,t){var C,k;const{state:s}=e,i=super.createResult(e,t),{isFetching:o,isRefetching:l,isError:u,isRefetchError:d}=i,h=(k=(C=s.fetchMeta)==null?void 0:C.fetchMore)==null?void 0:k.direction,m=u&&h==="forward",y=o&&h==="forward",v=u&&h==="backward",x=o&&h==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Uk(t,s.data),hasPreviousPage:$k(t,s.data),isFetchNextPageError:m,isFetchingNextPage:y,isFetchPreviousPageError:v,isFetchingPreviousPage:x,isRefetchError:d&&!m&&!v,isRefetching:l&&!y&&!x}}},Io,Cn,mt,ls,En,vr,_v,qk=(_v=class extends Gv{constructor(t){super();ce(this,En);ce(this,Io);ce(this,Cn);ce(this,mt);ce(this,ls);te(this,Io,t.client),this.mutationId=t.mutationId,te(this,mt,t.mutationCache),te(this,Cn,[]),this.state=t.state||Zv(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){j(this,Cn).includes(t)||(j(this,Cn).push(t),this.clearGcTimeout(),j(this,mt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){te(this,Cn,j(this,Cn).filter(s=>s!==t)),this.scheduleGc(),j(this,mt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){j(this,Cn).length||(this.state.status==="pending"?this.scheduleGc():j(this,mt).remove(this))}continue(){var t;return((t=j(this,ls))==null?void 0:t.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){var d,h,m,y,v,x,C,k,E,T,P,L,b,M,_,I,R,D;const s=()=>{ve(this,En,vr).call(this,{type:"continue"})},i={client:j(this,Io),meta:this.options.meta,mutationKey:this.options.mutationKey},o=te(this,ls,Qv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(B,W)=>{ve(this,En,vr).call(this,{type:"failed",failureCount:B,error:W})},onPause:()=>{ve(this,En,vr).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,mt).canRun(this)})),l=this.state.status==="pending",u=!o.canStart();try{if(l)s();else{ve(this,En,vr).call(this,{type:"pending",variables:t,isPaused:u}),j(this,mt).config.onMutate&&await j(this,mt).config.onMutate(t,this,i);const W=await((h=(d=this.options).onMutate)==null?void 0:h.call(d,t,i));W!==this.state.context&&ve(this,En,vr).call(this,{type:"pending",context:W,variables:t,isPaused:u})}const B=await o.start();return await((y=(m=j(this,mt).config).onSuccess)==null?void 0:y.call(m,B,t,this.state.context,this,i)),await((x=(v=this.options).onSuccess)==null?void 0:x.call(v,B,t,this.state.context,i)),await((k=(C=j(this,mt).config).onSettled)==null?void 0:k.call(C,B,null,this.state.variables,this.state.context,this,i)),await((T=(E=this.options).onSettled)==null?void 0:T.call(E,B,null,t,this.state.context,i)),ve(this,En,vr).call(this,{type:"success",data:B}),B}catch(B){try{await((L=(P=j(this,mt).config).onError)==null?void 0:L.call(P,B,t,this.state.context,this,i))}catch(W){Promise.reject(W)}try{await((M=(b=this.options).onError)==null?void 0:M.call(b,B,t,this.state.context,i))}catch(W){Promise.reject(W)}try{await((I=(_=j(this,mt).config).onSettled)==null?void 0:I.call(_,void 0,B,this.state.variables,this.state.context,this,i))}catch(W){Promise.reject(W)}try{await((D=(R=this.options).onSettled)==null?void 0:D.call(R,void 0,B,t,this.state.context,i))}catch(W){Promise.reject(W)}throw ve(this,En,vr).call(this,{type:"error",error:B}),B}finally{j(this,ls)===o&&te(this,ls,void 0),j(this,mt).runNext(this)}}},Io=new WeakMap,Cn=new WeakMap,mt=new WeakMap,ls=new WeakMap,En=new WeakSet,vr=function(t){const s=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),tt.batch(()=>{j(this,Cn).forEach(i=>{i.onMutationUpdate(t)}),j(this,mt).notify({mutation:this,type:"updated",action:t})})},_v);function Zv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Un,an,Fo,Ov,Qk=(Ov=class extends mi{constructor(t={}){super();ce(this,Un);ce(this,an);ce(this,Fo);this.config=t,te(this,Un,new Set),te(this,an,new Map),te(this,Fo,0)}build(t,s,i){const o=new qk({client:t,mutationCache:this,mutationId:++tl(this,Fo)._,options:t.defaultMutationOptions(s),state:i});return this.add(o),o}add(t){j(this,Un).add(t);const s=nl(t);if(typeof s=="string"){const i=j(this,an).get(s);i?i.push(t):j(this,an).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(j(this,Un).delete(t)){const s=nl(t);if(typeof s=="string"){const i=j(this,an).get(s);if(i)if(i.length>1){const o=i.indexOf(t);o!==-1&&i.splice(o,1)}else i[0]===t&&j(this,an).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){var i;const s=nl(t);if(typeof s=="string"){const o=(i=j(this,an).get(s))==null?void 0:i.find(l=>l.state.status==="pending");return!o||o===t}else return!0}runNext(t){var i,o;const s=nl(t);return typeof s=="string"?((o=(i=j(this,an).get(s))==null?void 0:i.find(l=>l!==t&&l.state.isPaused))==null?void 0:o.continue())??Promise.resolve():Promise.resolve()}clear(){tt.batch(()=>{j(this,Un).forEach(t=>{this.notify({type:"removed",mutation:t})}),j(this,Un).clear(),j(this,an).clear()})}getAll(){return Array.from(j(this,Un))}find(t){const s={exact:!0,...t};return this.getAll().find(i=>ny(s,i))}findAll(t={}){return this.getAll().filter(s=>ny(t,s))}notify(t){tt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return tt.batch(()=>Promise.all(t.map(s=>s.continue().catch(St))))}},Un=new WeakMap,an=new WeakMap,Fo=new WeakMap,Ov);function nl(e){var t;return(t=e.options.scope)==null?void 0:t.id}var $n,Er,gt,Hn,bn,yo,lf,Vv,Gk=(Vv=class extends mi{constructor(s,i){super();ce(this,bn);ce(this,$n);ce(this,Er);ce(this,gt);ce(this,Hn);te(this,$n,s),this.setOptions(i),this.bindMethods(),ve(this,bn,yo).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){var o;const i=this.options;this.options=j(this,$n).defaultMutationOptions(s),pl(this.options,i)||j(this,$n).getMutationCache().notify({type:"observerOptionsUpdated",mutation:j(this,gt),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&fs(i.mutationKey)!==fs(this.options.mutationKey)?this.reset():((o=j(this,gt))==null?void 0:o.state.status)==="pending"&&j(this,gt).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&j(this,gt)&&(j(this,gt).addObserver(this),ve(this,bn,yo).call(this))}onUnsubscribe(){var s;this.hasListeners()||(s=j(this,gt))==null||s.removeObserver(this)}onMutationUpdate(s){ve(this,bn,yo).call(this),ve(this,bn,lf).call(this,s)}getCurrentResult(){return j(this,Er)}reset(){var s;(s=j(this,gt))==null||s.removeObserver(this),te(this,gt,void 0),ve(this,bn,yo).call(this),ve(this,bn,lf).call(this)}mutate(s,i){var o;return te(this,Hn,i),(o=j(this,gt))==null||o.removeObserver(this),te(this,gt,j(this,$n).getMutationCache().build(j(this,$n),this.options)),j(this,gt).addObserver(this),j(this,gt).execute(s)}},$n=new WeakMap,Er=new WeakMap,gt=new WeakMap,Hn=new WeakMap,bn=new WeakSet,yo=function(){var i;const s=((i=j(this,gt))==null?void 0:i.state)??Zv();te(this,Er,{...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset})},lf=function(s){tt.batch(()=>{var i,o,l,u,d,h,m,y;if(j(this,Hn)&&this.hasListeners()){const v=j(this,Er).variables,x=j(this,Er).context,C={client:j(this,$n),meta:this.options.meta,mutationKey:this.options.mutationKey};if((s==null?void 0:s.type)==="success"){try{(o=(i=j(this,Hn)).onSuccess)==null||o.call(i,s.data,v,x,C)}catch(k){Promise.reject(k)}try{(u=(l=j(this,Hn)).onSettled)==null||u.call(l,s.data,null,v,x,C)}catch(k){Promise.reject(k)}}else if((s==null?void 0:s.type)==="error"){try{(h=(d=j(this,Hn)).onError)==null||h.call(d,s.error,v,x,C)}catch(k){Promise.reject(k)}try{(y=(m=j(this,Hn)).onSettled)==null||y.call(m,void 0,s.error,v,x,C)}catch(k){Promise.reject(k)}}}this.listeners.forEach(v=>{v(j(this,Er))})})},Vv),Tn,Bv,Yk=(Bv=class extends mi{constructor(t={}){super();ce(this,Tn);this.config=t,te(this,Tn,new Map)}build(t,s,i){const o=s.queryKey,l=s.queryHash??zf(o,s);let u=this.get(l);return u||(u=new Hk({client:t,queryKey:o,queryHash:l,options:t.defaultQueryOptions(s),state:i,defaultOptions:t.getQueryDefaults(o)}),this.add(u)),u}add(t){j(this,Tn).has(t.queryHash)||(j(this,Tn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){j(this,Tn).get(t.queryHash)===t&&(t.destroy(),j(this,Tn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){tt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return j(this,Tn).get(t)}getAll(){return[...j(this,Tn).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(i=>ty(s,i))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(i=>ty(t,i)):s}notify(t){tt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){tt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){tt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Tn=new WeakMap,Bv),He,Tr,Pr,oi,ai,Nr,li,ui,zv,Xk=(zv=class{constructor(e={}){ce(this,He);ce(this,Tr);ce(this,Pr);ce(this,oi);ce(this,ai);ce(this,Nr);ce(this,li);ce(this,ui);te(this,He,e.queryCache||new Yk),te(this,Tr,e.mutationCache||new Qk),te(this,Pr,e.defaultOptions||{}),te(this,oi,new Map),te(this,ai,new Map),te(this,Nr,0)}mount(){tl(this,Nr)._++,j(this,Nr)===1&&(te(this,li,Kf.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,He).onFocus())})),te(this,ui,Tl.subscribe(async e=>{e&&(await this.resumePausedMutations(),j(this,He).onOnline())})))}unmount(){var e,t;tl(this,Nr)._--,j(this,Nr)===0&&((e=j(this,li))==null||e.call(this),te(this,li,void 0),(t=j(this,ui))==null||t.call(this),te(this,ui,void 0))}isFetching(e){return j(this,He).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return j(this,Tr).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=j(this,He).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=j(this,He).build(this,t),i=s.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(Ve(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return j(this,He).findAll(e).map(({queryKey:t,state:s})=>[t,s.data])}setQueryData(e,t,s){var u;const i=this.defaultQueryOptions({queryKey:e}),o=(u=j(this,He).get(i.queryHash))==null?void 0:u.state.data,l=bk(t,o);if(l!==void 0)return j(this,He).build(this,i).setData(l,{...s,manual:!0})}setQueriesData(e,t,s){return tt.batch(()=>j(this,He).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,s)]))}getQueryState(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=j(this,He).get(t.queryHash))==null?void 0:s.state}removeQueries(e){const t=j(this,He);tt.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=j(this,He);return tt.batch(()=>{const i=s.findAll(e),o=new Set(i);return i.forEach(l=>{l.reset()}),this.refetchQueries({type:"active",predicate:l=>o.has(l)},t)})}cancelQueries(e,t={}){const s={revert:!0,...t},i=tt.batch(()=>j(this,He).findAll(e).map(o=>o.cancel(s)));return Promise.all(i).then(St).catch(St)}invalidateQueries(e,t={}){return tt.batch(()=>(j(this,He).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"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},i=tt.batch(()=>j(this,He).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let l=o.fetch(void 0,s);return s.throwOnError||(l=l.catch(St)),o.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(St)}async query(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=j(this,He).build(this,t),i=s.isStaleByTime(Ve(t.staleTime,s))?await s.fetch(t):s.state.data,o=t.select;return o?o(i):i}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=j(this,He).build(this,t);return s.isStaleByTime(Ve(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(St).catch(St)}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(St).catch(St)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Tl.isOnline()?j(this,Tr).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,He)}getMutationCache(){return j(this,Tr)}getDefaultOptions(){return j(this,Pr)}setDefaultOptions(e){te(this,Pr,e)}setQueryDefaults(e,t){j(this,oi).set(fs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...j(this,oi).values()],s={};return t.forEach(i=>{ci(e,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(e,t){j(this,ai).set(fs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...j(this,ai).values()],s={};return t.forEach(i=>{ci(e,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...j(this,Pr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=zf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Uf&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...j(this,Pr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){j(this,He).clear(),j(this,Tr).clear()}},He=new WeakMap,Tr=new WeakMap,Pr=new WeakMap,oi=new WeakMap,ai=new WeakMap,Nr=new WeakMap,li=new WeakMap,ui=new WeakMap,zv);const ex=S.createContext(!1),Jk=()=>S.useContext(ex);ex.Provider;function Zk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const eC=S.createContext(Zk()),tC=()=>S.useContext(eC),nC=(e,t,s)=>{const i=s!=null&&s.state.error&&typeof e.throwOnError=="function"?$f(e.throwOnError,[s.state.error,s]):e.throwOnError;(e.suspense||i)&&(t.isReset()||(e.retryOnMount=!1))},rC=e=>{S.useEffect(()=>{e.clearReset()},[e])},sC=({result:e,errorResetBoundary:t,throwOnError:s,query:i,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(o&&e.data===void 0||$f(s,[e.error,i])),iC=e=>{if(e.suspense){const s=o=>o==="static"?o:Math.max(o??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...o)=>s(i(...o)):s(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},oC=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,aC=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function tx(e,t,s){const i=Jk(),o=tC(),l=fn(),u=l.defaultQueryOptions(e),d=l.getQueryCache().get(u.queryHash),h=e.subscribed!==!1;u._optimisticResults=i?"isRestoring":h?"optimistic":void 0,iC(u),nC(u,o,d),rC(o);const[m]=S.useState(()=>new t(l,u)),y=m.getOptimisticResult(u),v=!i&&h;if(S.useSyncExternalStore(S.useCallback(x=>{const C=v?m.subscribe(tt.batchCalls(x)):St;return m.updateResult(),C},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),S.useEffect(()=>{m.setOptions(u)},[u,m]),oC(u,y))throw aC(u,m,o);if(sC({result:y,errorResetBoundary:o,throwOnError:u.throwOnError,query:d,suspense:u.suspense}))throw y.error;return u.notifyOnChangeProps?y:m.trackResult(y)}function Dr(e,t){return tx(e,Jv)}function Kt(e,t){const s=fn(),[i]=S.useState(()=>new Gk(s,e));S.useEffect(()=>{i.setOptions(e)},[i,e]);const o=S.useSyncExternalStore(S.useCallback(u=>i.subscribe(tt.batchCalls(u)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=S.useCallback((...u)=>{i.mutate(u[0],u[1]).catch(St)},[i]);if(o.error&&$f(i.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:l,mutateAsync:o.mutate}}function lC(e,t){return tx(e,Wk)}var rl={},Yc={exports:{}},Rt={},Xc={exports:{}},Jc={};/**
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 uy;function uC(){return uy||(uy=1,(function(e){function t(ee,ue){var J=ee.length;ee.push(ue);e:for(;0<J;){var V=J-1>>>1,F=ee[V];if(0<o(F,ue))ee[V]=ue,ee[J]=F,J=V;else break e}}function s(ee){return ee.length===0?null:ee[0]}function i(ee){if(ee.length===0)return null;var ue=ee[0],J=ee.pop();if(J!==ue){ee[0]=J;e:for(var V=0,F=ee.length,ne=F>>>1;V<ne;){var ye=2*(V+1)-1,ke=ee[ye],Te=ye+1,Ce=ee[Te];if(0>o(ke,J))Te<F&&0>o(Ce,ke)?(ee[V]=Ce,ee[Te]=J,V=Te):(ee[V]=ke,ee[ye]=J,V=ye);else if(Te<F&&0>o(Ce,J))ee[V]=Ce,ee[Te]=J,V=Te;else break e}}return ue}function o(ee,ue){var J=ee.sortIndex-ue.sortIndex;return J!==0?J:ee.id-ue.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var h=[],m=[],y=1,v=null,x=3,C=!1,k=!1,E=!1,T=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,L=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(ee){for(var ue=s(m);ue!==null;){if(ue.callback===null)i(m);else if(ue.startTime<=ee)i(m),ue.sortIndex=ue.expirationTime,t(h,ue);else break;ue=s(m)}}function M(ee){if(E=!1,b(ee),!k)if(s(h)!==null)k=!0,me(_);else{var ue=s(m);ue!==null&&Ee(M,ue.startTime-ee)}}function _(ee,ue){k=!1,E&&(E=!1,P(D),D=-1),C=!0;var J=x;try{for(b(ue),v=s(h);v!==null&&(!(v.expirationTime>ue)||ee&&!G());){var V=v.callback;if(typeof V=="function"){v.callback=null,x=v.priorityLevel;var F=V(v.expirationTime<=ue);ue=e.unstable_now(),typeof F=="function"?v.callback=F:v===s(h)&&i(h),b(ue)}else i(h);v=s(h)}if(v!==null)var ne=!0;else{var ye=s(m);ye!==null&&Ee(M,ye.startTime-ue),ne=!1}return ne}finally{v=null,x=J,C=!1}}var I=!1,R=null,D=-1,B=5,W=-1;function G(){return!(e.unstable_now()-W<B)}function K(){if(R!==null){var ee=e.unstable_now();W=ee;var ue=!0;try{ue=R(!0,ee)}finally{ue?U():(I=!1,R=null)}}else I=!1}var U;if(typeof L=="function")U=function(){L(K)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,ge=X.port2;X.port1.onmessage=K,U=function(){ge.postMessage(null)}}else U=function(){T(K,0)};function me(ee){R=ee,I||(I=!0,U())}function Ee(ee,ue){D=T(function(){ee(e.unstable_now())},ue)}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(ee){ee.callback=null},e.unstable_continueExecution=function(){k||C||(k=!0,me(_))},e.unstable_forceFrameRate=function(ee){0>ee||125<ee?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):B=0<ee?Math.floor(1e3/ee):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return s(h)},e.unstable_next=function(ee){switch(x){case 1:case 2:case 3:var ue=3;break;default:ue=x}var J=x;x=ue;try{return ee()}finally{x=J}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(ee,ue){switch(ee){case 1:case 2:case 3:case 4:case 5:break;default:ee=3}var J=x;x=ee;try{return ue()}finally{x=J}},e.unstable_scheduleCallback=function(ee,ue,J){var V=e.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?V+J:V):J=V,ee){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=J+F,ee={id:y++,callback:ue,priorityLevel:ee,startTime:J,expirationTime:F,sortIndex:-1},J>V?(ee.sortIndex=J,t(m,ee),s(h)===null&&ee===s(m)&&(E?(P(D),D=-1):E=!0,Ee(M,J-V))):(ee.sortIndex=F,t(h,ee),k||C||(k=!0,me(_))),ee},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(ee){var ue=x;return function(){var J=x;x=ue;try{return ee.apply(this,arguments)}finally{x=J}}}})(Jc)),Jc}var cy;function cC(){return cy||(cy=1,Xc.exports=uC()),Xc.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 dy;function dC(){if(dy)return Rt;dy=1;var e=Bf(),t=cC();function s(n){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+n,a=1;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,o={};function l(n,r){u(n,r),u(n+"Capture",r)}function u(n,r){for(o[n]=r,n=0;n<r.length;n++)i.add(r[n])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,m=/^[: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(n){return h.call(v,n)?!0:h.call(y,n)?!1:m.test(n)?v[n]=!0:(y[n]=!0,!1)}function C(n,r,a,c){if(a!==null&&a.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function k(n,r,a,c){if(r===null||typeof r>"u"||C(n,r,a,c))return!0;if(c)return!1;if(a!==null)switch(a.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 E(n,r,a,c,f,g,w){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=c,this.attributeNamespace=f,this.mustUseProperty=a,this.propertyName=n,this.type=r,this.sanitizeURL=g,this.removeEmptyString=w}var T={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){T[n]=new E(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var r=n[0];T[r]=new E(r,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){T[n]=new E(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){T[n]=new E(n,2,!1,n,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(n){T[n]=new E(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){T[n]=new E(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){T[n]=new E(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){T[n]=new E(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){T[n]=new E(n,5,!1,n.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function L(n){return n[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(n){var r=n.replace(P,L);T[r]=new E(r,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var r=n.replace(P,L);T[r]=new E(r,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var r=n.replace(P,L);T[r]=new E(r,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){T[n]=new E(n,1,!1,n.toLowerCase(),null,!1,!1)}),T.xlinkHref=new E("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){T[n]=new E(n,1,!1,n.toLowerCase(),null,!0,!0)});function b(n,r,a,c){var f=T.hasOwnProperty(r)?T[r]:null;(f!==null?f.type!==0:c||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(k(r,a,f,c)&&(a=null),c||f===null?x(r)&&(a===null?n.removeAttribute(r):n.setAttribute(r,""+a)):f.mustUseProperty?n[f.propertyName]=a===null?f.type===3?!1:"":a:(r=f.attributeName,c=f.attributeNamespace,a===null?n.removeAttribute(r):(f=f.type,a=f===3||f===4&&a===!0?"":""+a,c?n.setAttributeNS(c,r,a):n.setAttribute(r,a))))}var M=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),I=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),W=Symbol.for("react.provider"),G=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),ge=Symbol.for("react.memo"),me=Symbol.for("react.lazy"),Ee=Symbol.for("react.offscreen"),ee=Symbol.iterator;function ue(n){return n===null||typeof n!="object"?null:(n=ee&&n[ee]||n["@@iterator"],typeof n=="function"?n:null)}var J=Object.assign,V;function F(n){if(V===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);V=r&&r[1]||""}return`
34
- `+V+n}var ne=!1;function ye(n,r){if(!n||ne)return"";ne=!0;var a=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(H){var c=H}Reflect.construct(n,[],r)}else{try{r.call()}catch(H){c=H}n.call(r.prototype)}else{try{throw Error()}catch(H){c=H}n()}}catch(H){if(H&&c&&typeof H.stack=="string"){for(var f=H.stack.split(`
35
- `),g=c.stack.split(`
36
- `),w=f.length-1,N=g.length-1;1<=w&&0<=N&&f[w]!==g[N];)N--;for(;1<=w&&0<=N;w--,N--)if(f[w]!==g[N]){if(w!==1||N!==1)do if(w--,N--,0>N||f[w]!==g[N]){var A=`
37
- `+f[w].replace(" at new "," at ");return n.displayName&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",n.displayName)),A}while(1<=w&&0<=N);break}}}finally{ne=!1,Error.prepareStackTrace=a}return(n=n?n.displayName||n.name:"")?F(n):""}function ke(n){switch(n.tag){case 5:return F(n.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 2:case 15:return n=ye(n.type,!1),n;case 11:return n=ye(n.type.render,!1),n;case 1:return n=ye(n.type,!0),n;default:return""}}function Te(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case R:return"Fragment";case I:return"Portal";case B:return"Profiler";case D:return"StrictMode";case U:return"Suspense";case X:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case G:return(n.displayName||"Context")+".Consumer";case W:return(n._context.displayName||"Context")+".Provider";case K:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case ge:return r=n.displayName||null,r!==null?r:Te(n.type)||"Memo";case me:r=n._payload,n=n._init;try{return Te(n(r))}catch{}}return null}function Ce(n){var r=n.type;switch(n.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 n=r.render,n=n.displayName||n.name||"",r.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Te(r);case 8:return r===D?"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 xe(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function je(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function it(n){var r=je(n)?"checked":"value",a=Object.getOwnPropertyDescriptor(n.constructor.prototype,r),c=""+n[r];if(!n.hasOwnProperty(r)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var f=a.get,g=a.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return f.call(this)},set:function(w){c=""+w,g.call(this,w)}}),Object.defineProperty(n,r,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(w){c=""+w},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function Ko(n){n._valueTracker||(n._valueTracker=it(n))}function np(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var a=r.getValue(),c="";return n&&(c=je(n)?n.checked?"true":"false":n.value),n=c,n!==a?(r.setValue(n),!0):!1}function Wo(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Zl(n,r){var a=r.checked;return J({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??n._wrapperState.initialChecked})}function rp(n,r){var a=r.defaultValue==null?"":r.defaultValue,c=r.checked!=null?r.checked:r.defaultChecked;a=xe(r.value!=null?r.value:a),n._wrapperState={initialChecked:c,initialValue:a,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function sp(n,r){r=r.checked,r!=null&&b(n,"checked",r,!1)}function eu(n,r){sp(n,r);var a=xe(r.value),c=r.type;if(a!=null)c==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+a):n.value!==""+a&&(n.value=""+a);else if(c==="submit"||c==="reset"){n.removeAttribute("value");return}r.hasOwnProperty("value")?tu(n,r.type,a):r.hasOwnProperty("defaultValue")&&tu(n,r.type,xe(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(n.defaultChecked=!!r.defaultChecked)}function ip(n,r,a){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var c=r.type;if(!(c!=="submit"&&c!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+n._wrapperState.initialValue,a||r===n.value||(n.value=r),n.defaultValue=r}a=n.name,a!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,a!==""&&(n.name=a)}function tu(n,r,a){(r!=="number"||Wo(n.ownerDocument)!==n)&&(a==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+a&&(n.defaultValue=""+a))}var Ei=Array.isArray;function xs(n,r,a,c){if(n=n.options,r){r={};for(var f=0;f<a.length;f++)r["$"+a[f]]=!0;for(a=0;a<n.length;a++)f=r.hasOwnProperty("$"+n[a].value),n[a].selected!==f&&(n[a].selected=f),f&&c&&(n[a].defaultSelected=!0)}else{for(a=""+xe(a),r=null,f=0;f<n.length;f++){if(n[f].value===a){n[f].selected=!0,c&&(n[f].defaultSelected=!0);return}r!==null||n[f].disabled||(r=n[f])}r!==null&&(r.selected=!0)}}function nu(n,r){if(r.dangerouslySetInnerHTML!=null)throw Error(s(91));return J({},r,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function op(n,r){var a=r.value;if(a==null){if(a=r.children,r=r.defaultValue,a!=null){if(r!=null)throw Error(s(92));if(Ei(a)){if(1<a.length)throw Error(s(93));a=a[0]}r=a}r==null&&(r=""),a=r}n._wrapperState={initialValue:xe(a)}}function ap(n,r){var a=xe(r.value),c=xe(r.defaultValue);a!=null&&(a=""+a,a!==n.value&&(n.value=a),r.defaultValue==null&&n.defaultValue!==a&&(n.defaultValue=a)),c!=null&&(n.defaultValue=""+c)}function lp(n){var r=n.textContent;r===n._wrapperState.initialValue&&r!==""&&r!==null&&(n.value=r)}function up(n){switch(n){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 ru(n,r){return n==null||n==="http://www.w3.org/1999/xhtml"?up(r):n==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var qo,cp=(function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(r,a,c,f){MSApp.execUnsafeLocalFunction(function(){return n(r,a,c,f)})}:n})(function(n,r){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=r;else{for(qo=qo||document.createElement("div"),qo.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=qo.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;r.firstChild;)n.appendChild(r.firstChild)}});function Ti(n,r){if(r){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=r;return}}n.textContent=r}var Pi={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},SS=["Webkit","ms","Moz","O"];Object.keys(Pi).forEach(function(n){SS.forEach(function(r){r=r+n.charAt(0).toUpperCase()+n.substring(1),Pi[r]=Pi[n]})});function dp(n,r,a){return r==null||typeof r=="boolean"||r===""?"":a||typeof r!="number"||r===0||Pi.hasOwnProperty(n)&&Pi[n]?(""+r).trim():r+"px"}function fp(n,r){n=n.style;for(var a in r)if(r.hasOwnProperty(a)){var c=a.indexOf("--")===0,f=dp(a,r[a],c);a==="float"&&(a="cssFloat"),c?n.setProperty(a,f):n[a]=f}}var kS=J({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 su(n,r){if(r){if(kS[n]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(s(137,n));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 iu(n,r){if(n.indexOf("-")===-1)return typeof r.is=="string";switch(n){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 ou=null;function au(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var lu=null,ws=null,Ss=null;function hp(n){if(n=Qi(n)){if(typeof lu!="function")throw Error(s(280));var r=n.stateNode;r&&(r=ga(r),lu(n.stateNode,n.type,r))}}function pp(n){ws?Ss?Ss.push(n):Ss=[n]:ws=n}function mp(){if(ws){var n=ws,r=Ss;if(Ss=ws=null,hp(n),r)for(n=0;n<r.length;n++)hp(r[n])}}function gp(n,r){return n(r)}function yp(){}var uu=!1;function vp(n,r,a){if(uu)return n(r,a);uu=!0;try{return gp(n,r,a)}finally{uu=!1,(ws!==null||Ss!==null)&&(yp(),mp())}}function Ni(n,r){var a=n.stateNode;if(a===null)return null;var c=ga(a);if(c===null)return null;a=c[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":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(a&&typeof a!="function")throw Error(s(231,r,typeof a));return a}var cu=!1;if(d)try{var bi={};Object.defineProperty(bi,"passive",{get:function(){cu=!0}}),window.addEventListener("test",bi,bi),window.removeEventListener("test",bi,bi)}catch{cu=!1}function CS(n,r,a,c,f,g,w,N,A){var H=Array.prototype.slice.call(arguments,3);try{r.apply(a,H)}catch(Q){this.onError(Q)}}var Ri=!1,Qo=null,Go=!1,du=null,ES={onError:function(n){Ri=!0,Qo=n}};function TS(n,r,a,c,f,g,w,N,A){Ri=!1,Qo=null,CS.apply(ES,arguments)}function PS(n,r,a,c,f,g,w,N,A){if(TS.apply(this,arguments),Ri){if(Ri){var H=Qo;Ri=!1,Qo=null}else throw Error(s(198));Go||(Go=!0,du=H)}}function Ir(n){var r=n,a=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,(r.flags&4098)!==0&&(a=r.return),n=r.return;while(n)}return r.tag===3?a:null}function xp(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function wp(n){if(Ir(n)!==n)throw Error(s(188))}function NS(n){var r=n.alternate;if(!r){if(r=Ir(n),r===null)throw Error(s(188));return r!==n?null:n}for(var a=n,c=r;;){var f=a.return;if(f===null)break;var g=f.alternate;if(g===null){if(c=f.return,c!==null){a=c;continue}break}if(f.child===g.child){for(g=f.child;g;){if(g===a)return wp(f),n;if(g===c)return wp(f),r;g=g.sibling}throw Error(s(188))}if(a.return!==c.return)a=f,c=g;else{for(var w=!1,N=f.child;N;){if(N===a){w=!0,a=f,c=g;break}if(N===c){w=!0,c=f,a=g;break}N=N.sibling}if(!w){for(N=g.child;N;){if(N===a){w=!0,a=g,c=f;break}if(N===c){w=!0,c=g,a=f;break}N=N.sibling}if(!w)throw Error(s(189))}}if(a.alternate!==c)throw Error(s(190))}if(a.tag!==3)throw Error(s(188));return a.stateNode.current===a?n:r}function Sp(n){return n=NS(n),n!==null?kp(n):null}function kp(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var r=kp(n);if(r!==null)return r;n=n.sibling}return null}var Cp=t.unstable_scheduleCallback,Ep=t.unstable_cancelCallback,bS=t.unstable_shouldYield,RS=t.unstable_requestPaint,We=t.unstable_now,jS=t.unstable_getCurrentPriorityLevel,fu=t.unstable_ImmediatePriority,Tp=t.unstable_UserBlockingPriority,Yo=t.unstable_NormalPriority,MS=t.unstable_LowPriority,Pp=t.unstable_IdlePriority,Xo=null,gn=null;function DS(n){if(gn&&typeof gn.onCommitFiberRoot=="function")try{gn.onCommitFiberRoot(Xo,n,void 0,(n.current.flags&128)===128)}catch{}}var Gt=Math.clz32?Math.clz32:IS,AS=Math.log,LS=Math.LN2;function IS(n){return n>>>=0,n===0?32:31-(AS(n)/LS|0)|0}var Jo=64,Zo=4194304;function ji(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function ea(n,r){var a=n.pendingLanes;if(a===0)return 0;var c=0,f=n.suspendedLanes,g=n.pingedLanes,w=a&268435455;if(w!==0){var N=w&~f;N!==0?c=ji(N):(g&=w,g!==0&&(c=ji(g)))}else w=a&~f,w!==0?c=ji(w):g!==0&&(c=ji(g));if(c===0)return 0;if(r!==0&&r!==c&&(r&f)===0&&(f=c&-c,g=r&-r,f>=g||f===16&&(g&4194240)!==0))return r;if((c&4)!==0&&(c|=a&16),r=n.entangledLanes,r!==0)for(n=n.entanglements,r&=c;0<r;)a=31-Gt(r),f=1<<a,c|=n[a],r&=~f;return c}function FS(n,r){switch(n){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 _S(n,r){for(var a=n.suspendedLanes,c=n.pingedLanes,f=n.expirationTimes,g=n.pendingLanes;0<g;){var w=31-Gt(g),N=1<<w,A=f[w];A===-1?((N&a)===0||(N&c)!==0)&&(f[w]=FS(N,r)):A<=r&&(n.expiredLanes|=N),g&=~N}}function hu(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function Np(){var n=Jo;return Jo<<=1,(Jo&4194240)===0&&(Jo=64),n}function pu(n){for(var r=[],a=0;31>a;a++)r.push(n);return r}function Mi(n,r,a){n.pendingLanes|=r,r!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,r=31-Gt(r),n[r]=a}function OS(n,r){var a=n.pendingLanes&~r;n.pendingLanes=r,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=r,n.mutableReadLanes&=r,n.entangledLanes&=r,r=n.entanglements;var c=n.eventTimes;for(n=n.expirationTimes;0<a;){var f=31-Gt(a),g=1<<f;r[f]=0,c[f]=-1,n[f]=-1,a&=~g}}function mu(n,r){var a=n.entangledLanes|=r;for(n=n.entanglements;a;){var c=31-Gt(a),f=1<<c;f&r|n[c]&r&&(n[c]|=r),a&=~f}}var De=0;function bp(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var Rp,gu,jp,Mp,Dp,yu=!1,ta=[],Gn=null,Yn=null,Xn=null,Di=new Map,Ai=new Map,Jn=[],VS="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 Ap(n,r){switch(n){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Yn=null;break;case"mouseover":case"mouseout":Xn=null;break;case"pointerover":case"pointerout":Di.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ai.delete(r.pointerId)}}function Li(n,r,a,c,f,g){return n===null||n.nativeEvent!==g?(n={blockedOn:r,domEventName:a,eventSystemFlags:c,nativeEvent:g,targetContainers:[f]},r!==null&&(r=Qi(r),r!==null&&gu(r)),n):(n.eventSystemFlags|=c,r=n.targetContainers,f!==null&&r.indexOf(f)===-1&&r.push(f),n)}function BS(n,r,a,c,f){switch(r){case"focusin":return Gn=Li(Gn,n,r,a,c,f),!0;case"dragenter":return Yn=Li(Yn,n,r,a,c,f),!0;case"mouseover":return Xn=Li(Xn,n,r,a,c,f),!0;case"pointerover":var g=f.pointerId;return Di.set(g,Li(Di.get(g)||null,n,r,a,c,f)),!0;case"gotpointercapture":return g=f.pointerId,Ai.set(g,Li(Ai.get(g)||null,n,r,a,c,f)),!0}return!1}function Lp(n){var r=Fr(n.target);if(r!==null){var a=Ir(r);if(a!==null){if(r=a.tag,r===13){if(r=xp(a),r!==null){n.blockedOn=r,Dp(n.priority,function(){jp(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){n.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}n.blockedOn=null}function na(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var a=xu(n.domEventName,n.eventSystemFlags,r[0],n.nativeEvent);if(a===null){a=n.nativeEvent;var c=new a.constructor(a.type,a);ou=c,a.target.dispatchEvent(c),ou=null}else return r=Qi(a),r!==null&&gu(r),n.blockedOn=a,!1;r.shift()}return!0}function Ip(n,r,a){na(n)&&a.delete(r)}function zS(){yu=!1,Gn!==null&&na(Gn)&&(Gn=null),Yn!==null&&na(Yn)&&(Yn=null),Xn!==null&&na(Xn)&&(Xn=null),Di.forEach(Ip),Ai.forEach(Ip)}function Ii(n,r){n.blockedOn===r&&(n.blockedOn=null,yu||(yu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,zS)))}function Fi(n){function r(f){return Ii(f,n)}if(0<ta.length){Ii(ta[0],n);for(var a=1;a<ta.length;a++){var c=ta[a];c.blockedOn===n&&(c.blockedOn=null)}}for(Gn!==null&&Ii(Gn,n),Yn!==null&&Ii(Yn,n),Xn!==null&&Ii(Xn,n),Di.forEach(r),Ai.forEach(r),a=0;a<Jn.length;a++)c=Jn[a],c.blockedOn===n&&(c.blockedOn=null);for(;0<Jn.length&&(a=Jn[0],a.blockedOn===null);)Lp(a),a.blockedOn===null&&Jn.shift()}var ks=M.ReactCurrentBatchConfig,ra=!0;function US(n,r,a,c){var f=De,g=ks.transition;ks.transition=null;try{De=1,vu(n,r,a,c)}finally{De=f,ks.transition=g}}function $S(n,r,a,c){var f=De,g=ks.transition;ks.transition=null;try{De=4,vu(n,r,a,c)}finally{De=f,ks.transition=g}}function vu(n,r,a,c){if(ra){var f=xu(n,r,a,c);if(f===null)Fu(n,r,c,sa,a),Ap(n,c);else if(BS(f,n,r,a,c))c.stopPropagation();else if(Ap(n,c),r&4&&-1<VS.indexOf(n)){for(;f!==null;){var g=Qi(f);if(g!==null&&Rp(g),g=xu(n,r,a,c),g===null&&Fu(n,r,c,sa,a),g===f)break;f=g}f!==null&&c.stopPropagation()}else Fu(n,r,c,null,a)}}var sa=null;function xu(n,r,a,c){if(sa=null,n=au(c),n=Fr(n),n!==null)if(r=Ir(n),r===null)n=null;else if(a=r.tag,a===13){if(n=xp(r),n!==null)return n;n=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null);return sa=n,null}function Fp(n){switch(n){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(jS()){case fu:return 1;case Tp:return 4;case Yo:case MS:return 16;case Pp:return 536870912;default:return 16}default:return 16}}var Zn=null,wu=null,ia=null;function _p(){if(ia)return ia;var n,r=wu,a=r.length,c,f="value"in Zn?Zn.value:Zn.textContent,g=f.length;for(n=0;n<a&&r[n]===f[n];n++);var w=a-n;for(c=1;c<=w&&r[a-c]===f[g-c];c++);return ia=f.slice(n,1<c?1-c:void 0)}function oa(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function aa(){return!0}function Op(){return!1}function Mt(n){function r(a,c,f,g,w){this._reactName=a,this._targetInst=f,this.type=c,this.nativeEvent=g,this.target=w,this.currentTarget=null;for(var N in n)n.hasOwnProperty(N)&&(a=n[N],this[N]=a?a(g):g[N]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?aa:Op,this.isPropagationStopped=Op,this}return J(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=aa)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=aa)},persist:function(){},isPersistent:aa}),r}var Cs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Su=Mt(Cs),_i=J({},Cs,{view:0,detail:0}),HS=Mt(_i),ku,Cu,Oi,la=J({},_i,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Oi&&(Oi&&n.type==="mousemove"?(ku=n.screenX-Oi.screenX,Cu=n.screenY-Oi.screenY):Cu=ku=0,Oi=n),ku)},movementY:function(n){return"movementY"in n?n.movementY:Cu}}),Vp=Mt(la),KS=J({},la,{dataTransfer:0}),WS=Mt(KS),qS=J({},_i,{relatedTarget:0}),Eu=Mt(qS),QS=J({},Cs,{animationName:0,elapsedTime:0,pseudoElement:0}),GS=Mt(QS),YS=J({},Cs,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),XS=Mt(YS),JS=J({},Cs,{data:0}),Bp=Mt(JS),ZS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},e2={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"},t2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function n2(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=t2[n])?!!r[n]:!1}function Tu(){return n2}var r2=J({},_i,{key:function(n){if(n.key){var r=ZS[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=oa(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?e2[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tu,charCode:function(n){return n.type==="keypress"?oa(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?oa(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),s2=Mt(r2),i2=J({},la,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zp=Mt(i2),o2=J({},_i,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tu}),a2=Mt(o2),l2=J({},Cs,{propertyName:0,elapsedTime:0,pseudoElement:0}),u2=Mt(l2),c2=J({},la,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),d2=Mt(c2),f2=[9,13,27,32],Pu=d&&"CompositionEvent"in window,Vi=null;d&&"documentMode"in document&&(Vi=document.documentMode);var h2=d&&"TextEvent"in window&&!Vi,Up=d&&(!Pu||Vi&&8<Vi&&11>=Vi),$p=" ",Hp=!1;function Kp(n,r){switch(n){case"keyup":return f2.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Wp(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Es=!1;function p2(n,r){switch(n){case"compositionend":return Wp(r);case"keypress":return r.which!==32?null:(Hp=!0,$p);case"textInput":return n=r.data,n===$p&&Hp?null:n;default:return null}}function m2(n,r){if(Es)return n==="compositionend"||!Pu&&Kp(n,r)?(n=_p(),ia=wu=Zn=null,Es=!1,n):null;switch(n){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 Up&&r.locale!=="ko"?null:r.data;default:return null}}var g2={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 qp(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!g2[n.type]:r==="textarea"}function Qp(n,r,a,c){pp(c),r=ha(r,"onChange"),0<r.length&&(a=new Su("onChange","change",null,a,c),n.push({event:a,listeners:r}))}var Bi=null,zi=null;function y2(n){fm(n,0)}function ua(n){var r=Rs(n);if(np(r))return n}function v2(n,r){if(n==="change")return r}var Gp=!1;if(d){var Nu;if(d){var bu="oninput"in document;if(!bu){var Yp=document.createElement("div");Yp.setAttribute("oninput","return;"),bu=typeof Yp.oninput=="function"}Nu=bu}else Nu=!1;Gp=Nu&&(!document.documentMode||9<document.documentMode)}function Xp(){Bi&&(Bi.detachEvent("onpropertychange",Jp),zi=Bi=null)}function Jp(n){if(n.propertyName==="value"&&ua(zi)){var r=[];Qp(r,zi,n,au(n)),vp(y2,r)}}function x2(n,r,a){n==="focusin"?(Xp(),Bi=r,zi=a,Bi.attachEvent("onpropertychange",Jp)):n==="focusout"&&Xp()}function w2(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return ua(zi)}function S2(n,r){if(n==="click")return ua(r)}function k2(n,r){if(n==="input"||n==="change")return ua(r)}function C2(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var Yt=typeof Object.is=="function"?Object.is:C2;function Ui(n,r){if(Yt(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var a=Object.keys(n),c=Object.keys(r);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var f=a[c];if(!h.call(r,f)||!Yt(n[f],r[f]))return!1}return!0}function Zp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function em(n,r){var a=Zp(n);n=0;for(var c;a;){if(a.nodeType===3){if(c=n+a.textContent.length,n<=r&&c>=r)return{node:a,offset:r-n};n=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Zp(a)}}function tm(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?tm(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function nm(){for(var n=window,r=Wo();r instanceof n.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)n=r.contentWindow;else break;r=Wo(n.document)}return r}function Ru(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}function E2(n){var r=nm(),a=n.focusedElem,c=n.selectionRange;if(r!==a&&a&&a.ownerDocument&&tm(a.ownerDocument.documentElement,a)){if(c!==null&&Ru(a)){if(r=c.start,n=c.end,n===void 0&&(n=r),"selectionStart"in a)a.selectionStart=r,a.selectionEnd=Math.min(n,a.value.length);else if(n=(r=a.ownerDocument||document)&&r.defaultView||window,n.getSelection){n=n.getSelection();var f=a.textContent.length,g=Math.min(c.start,f);c=c.end===void 0?g:Math.min(c.end,f),!n.extend&&g>c&&(f=c,c=g,g=f),f=em(a,g);var w=em(a,c);f&&w&&(n.rangeCount!==1||n.anchorNode!==f.node||n.anchorOffset!==f.offset||n.focusNode!==w.node||n.focusOffset!==w.offset)&&(r=r.createRange(),r.setStart(f.node,f.offset),n.removeAllRanges(),g>c?(n.addRange(r),n.extend(w.node,w.offset)):(r.setEnd(w.node,w.offset),n.addRange(r)))}}for(r=[],n=a;n=n.parentNode;)n.nodeType===1&&r.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<r.length;a++)n=r[a],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var T2=d&&"documentMode"in document&&11>=document.documentMode,Ts=null,ju=null,$i=null,Mu=!1;function rm(n,r,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Mu||Ts==null||Ts!==Wo(c)||(c=Ts,"selectionStart"in c&&Ru(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),$i&&Ui($i,c)||($i=c,c=ha(ju,"onSelect"),0<c.length&&(r=new Su("onSelect","select",null,r,a),n.push({event:r,listeners:c}),r.target=Ts)))}function ca(n,r){var a={};return a[n.toLowerCase()]=r.toLowerCase(),a["Webkit"+n]="webkit"+r,a["Moz"+n]="moz"+r,a}var Ps={animationend:ca("Animation","AnimationEnd"),animationiteration:ca("Animation","AnimationIteration"),animationstart:ca("Animation","AnimationStart"),transitionend:ca("Transition","TransitionEnd")},Du={},sm={};d&&(sm=document.createElement("div").style,"AnimationEvent"in window||(delete Ps.animationend.animation,delete Ps.animationiteration.animation,delete Ps.animationstart.animation),"TransitionEvent"in window||delete Ps.transitionend.transition);function da(n){if(Du[n])return Du[n];if(!Ps[n])return n;var r=Ps[n],a;for(a in r)if(r.hasOwnProperty(a)&&a in sm)return Du[n]=r[a];return n}var im=da("animationend"),om=da("animationiteration"),am=da("animationstart"),lm=da("transitionend"),um=new Map,cm="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 er(n,r){um.set(n,r),l(r,[n])}for(var Au=0;Au<cm.length;Au++){var Lu=cm[Au],P2=Lu.toLowerCase(),N2=Lu[0].toUpperCase()+Lu.slice(1);er(P2,"on"+N2)}er(im,"onAnimationEnd"),er(om,"onAnimationIteration"),er(am,"onAnimationStart"),er("dblclick","onDoubleClick"),er("focusin","onFocus"),er("focusout","onBlur"),er(lm,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hi="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(" "),b2=new Set("cancel close invalid load scroll toggle".split(" ").concat(Hi));function dm(n,r,a){var c=n.type||"unknown-event";n.currentTarget=a,PS(c,r,void 0,n),n.currentTarget=null}function fm(n,r){r=(r&4)!==0;for(var a=0;a<n.length;a++){var c=n[a],f=c.event;c=c.listeners;e:{var g=void 0;if(r)for(var w=c.length-1;0<=w;w--){var N=c[w],A=N.instance,H=N.currentTarget;if(N=N.listener,A!==g&&f.isPropagationStopped())break e;dm(f,N,H),g=A}else for(w=0;w<c.length;w++){if(N=c[w],A=N.instance,H=N.currentTarget,N=N.listener,A!==g&&f.isPropagationStopped())break e;dm(f,N,H),g=A}}}if(Go)throw n=du,Go=!1,du=null,n}function Fe(n,r){var a=r[Uu];a===void 0&&(a=r[Uu]=new Set);var c=n+"__bubble";a.has(c)||(hm(r,n,2,!1),a.add(c))}function Iu(n,r,a){var c=0;r&&(c|=4),hm(a,n,c,r)}var fa="_reactListening"+Math.random().toString(36).slice(2);function Ki(n){if(!n[fa]){n[fa]=!0,i.forEach(function(a){a!=="selectionchange"&&(b2.has(a)||Iu(a,!1,n),Iu(a,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[fa]||(r[fa]=!0,Iu("selectionchange",!1,r))}}function hm(n,r,a,c){switch(Fp(r)){case 1:var f=US;break;case 4:f=$S;break;default:f=vu}a=f.bind(null,r,a,n),f=void 0,!cu||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(f=!0),c?f!==void 0?n.addEventListener(r,a,{capture:!0,passive:f}):n.addEventListener(r,a,!0):f!==void 0?n.addEventListener(r,a,{passive:f}):n.addEventListener(r,a,!1)}function Fu(n,r,a,c,f){var g=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var w=c.tag;if(w===3||w===4){var N=c.stateNode.containerInfo;if(N===f||N.nodeType===8&&N.parentNode===f)break;if(w===4)for(w=c.return;w!==null;){var A=w.tag;if((A===3||A===4)&&(A=w.stateNode.containerInfo,A===f||A.nodeType===8&&A.parentNode===f))return;w=w.return}for(;N!==null;){if(w=Fr(N),w===null)return;if(A=w.tag,A===5||A===6){c=g=w;continue e}N=N.parentNode}}c=c.return}vp(function(){var H=g,Q=au(a),Y=[];e:{var q=um.get(n);if(q!==void 0){var re=Su,ie=n;switch(n){case"keypress":if(oa(a)===0)break e;case"keydown":case"keyup":re=s2;break;case"focusin":ie="focus",re=Eu;break;case"focusout":ie="blur",re=Eu;break;case"beforeblur":case"afterblur":re=Eu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=Vp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=WS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=a2;break;case im:case om:case am:re=GS;break;case lm:re=u2;break;case"scroll":re=HS;break;case"wheel":re=d2;break;case"copy":case"cut":case"paste":re=XS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=zp}var ae=(r&4)!==0,qe=!ae&&n==="scroll",z=ae?q!==null?q+"Capture":null:q;ae=[];for(var O=H,$;O!==null;){$=O;var Z=$.stateNode;if($.tag===5&&Z!==null&&($=Z,z!==null&&(Z=Ni(O,z),Z!=null&&ae.push(Wi(O,Z,$)))),qe)break;O=O.return}0<ae.length&&(q=new re(q,ie,null,a,Q),Y.push({event:q,listeners:ae}))}}if((r&7)===0){e:{if(q=n==="mouseover"||n==="pointerover",re=n==="mouseout"||n==="pointerout",q&&a!==ou&&(ie=a.relatedTarget||a.fromElement)&&(Fr(ie)||ie[jn]))break e;if((re||q)&&(q=Q.window===Q?Q:(q=Q.ownerDocument)?q.defaultView||q.parentWindow:window,re?(ie=a.relatedTarget||a.toElement,re=H,ie=ie?Fr(ie):null,ie!==null&&(qe=Ir(ie),ie!==qe||ie.tag!==5&&ie.tag!==6)&&(ie=null)):(re=null,ie=H),re!==ie)){if(ae=Vp,Z="onMouseLeave",z="onMouseEnter",O="mouse",(n==="pointerout"||n==="pointerover")&&(ae=zp,Z="onPointerLeave",z="onPointerEnter",O="pointer"),qe=re==null?q:Rs(re),$=ie==null?q:Rs(ie),q=new ae(Z,O+"leave",re,a,Q),q.target=qe,q.relatedTarget=$,Z=null,Fr(Q)===H&&(ae=new ae(z,O+"enter",ie,a,Q),ae.target=$,ae.relatedTarget=qe,Z=ae),qe=Z,re&&ie)t:{for(ae=re,z=ie,O=0,$=ae;$;$=Ns($))O++;for($=0,Z=z;Z;Z=Ns(Z))$++;for(;0<O-$;)ae=Ns(ae),O--;for(;0<$-O;)z=Ns(z),$--;for(;O--;){if(ae===z||z!==null&&ae===z.alternate)break t;ae=Ns(ae),z=Ns(z)}ae=null}else ae=null;re!==null&&pm(Y,q,re,ae,!1),ie!==null&&qe!==null&&pm(Y,qe,ie,ae,!0)}}e:{if(q=H?Rs(H):window,re=q.nodeName&&q.nodeName.toLowerCase(),re==="select"||re==="input"&&q.type==="file")var le=v2;else if(qp(q))if(Gp)le=k2;else{le=w2;var de=x2}else(re=q.nodeName)&&re.toLowerCase()==="input"&&(q.type==="checkbox"||q.type==="radio")&&(le=S2);if(le&&(le=le(n,H))){Qp(Y,le,a,Q);break e}de&&de(n,q,H),n==="focusout"&&(de=q._wrapperState)&&de.controlled&&q.type==="number"&&tu(q,"number",q.value)}switch(de=H?Rs(H):window,n){case"focusin":(qp(de)||de.contentEditable==="true")&&(Ts=de,ju=H,$i=null);break;case"focusout":$i=ju=Ts=null;break;case"mousedown":Mu=!0;break;case"contextmenu":case"mouseup":case"dragend":Mu=!1,rm(Y,a,Q);break;case"selectionchange":if(T2)break;case"keydown":case"keyup":rm(Y,a,Q)}var fe;if(Pu)e:{switch(n){case"compositionstart":var he="onCompositionStart";break e;case"compositionend":he="onCompositionEnd";break e;case"compositionupdate":he="onCompositionUpdate";break e}he=void 0}else Es?Kp(n,a)&&(he="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&(he="onCompositionStart");he&&(Up&&a.locale!=="ko"&&(Es||he!=="onCompositionStart"?he==="onCompositionEnd"&&Es&&(fe=_p()):(Zn=Q,wu="value"in Zn?Zn.value:Zn.textContent,Es=!0)),de=ha(H,he),0<de.length&&(he=new Bp(he,n,null,a,Q),Y.push({event:he,listeners:de}),fe?he.data=fe:(fe=Wp(a),fe!==null&&(he.data=fe)))),(fe=h2?p2(n,a):m2(n,a))&&(H=ha(H,"onBeforeInput"),0<H.length&&(Q=new Bp("onBeforeInput","beforeinput",null,a,Q),Y.push({event:Q,listeners:H}),Q.data=fe))}fm(Y,r)})}function Wi(n,r,a){return{instance:n,listener:r,currentTarget:a}}function ha(n,r){for(var a=r+"Capture",c=[];n!==null;){var f=n,g=f.stateNode;f.tag===5&&g!==null&&(f=g,g=Ni(n,a),g!=null&&c.unshift(Wi(n,g,f)),g=Ni(n,r),g!=null&&c.push(Wi(n,g,f))),n=n.return}return c}function Ns(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function pm(n,r,a,c,f){for(var g=r._reactName,w=[];a!==null&&a!==c;){var N=a,A=N.alternate,H=N.stateNode;if(A!==null&&A===c)break;N.tag===5&&H!==null&&(N=H,f?(A=Ni(a,g),A!=null&&w.unshift(Wi(a,A,N))):f||(A=Ni(a,g),A!=null&&w.push(Wi(a,A,N)))),a=a.return}w.length!==0&&n.push({event:r,listeners:w})}var R2=/\r\n?/g,j2=/\u0000|\uFFFD/g;function mm(n){return(typeof n=="string"?n:""+n).replace(R2,`
38
- `).replace(j2,"")}function pa(n,r,a){if(r=mm(r),mm(n)!==r&&a)throw Error(s(425))}function ma(){}var _u=null,Ou=null;function Vu(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Bu=typeof setTimeout=="function"?setTimeout:void 0,M2=typeof clearTimeout=="function"?clearTimeout:void 0,gm=typeof Promise=="function"?Promise:void 0,D2=typeof queueMicrotask=="function"?queueMicrotask:typeof gm<"u"?function(n){return gm.resolve(null).then(n).catch(A2)}:Bu;function A2(n){setTimeout(function(){throw n})}function zu(n,r){var a=r,c=0;do{var f=a.nextSibling;if(n.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"){if(c===0){n.removeChild(f),Fi(r);return}c--}else a!=="$"&&a!=="$?"&&a!=="$!"||c++;a=f}while(a);Fi(r)}function tr(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return n}function ym(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"){if(r===0)return n;r--}else a==="/$"&&r++}n=n.previousSibling}return null}var bs=Math.random().toString(36).slice(2),yn="__reactFiber$"+bs,qi="__reactProps$"+bs,jn="__reactContainer$"+bs,Uu="__reactEvents$"+bs,L2="__reactListeners$"+bs,I2="__reactHandles$"+bs;function Fr(n){var r=n[yn];if(r)return r;for(var a=n.parentNode;a;){if(r=a[jn]||a[yn]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(n=ym(n);n!==null;){if(a=n[yn])return a;n=ym(n)}return r}n=a,a=n.parentNode}return null}function Qi(n){return n=n[yn]||n[jn],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function Rs(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(s(33))}function ga(n){return n[qi]||null}var $u=[],js=-1;function nr(n){return{current:n}}function _e(n){0>js||(n.current=$u[js],$u[js]=null,js--)}function Ie(n,r){js++,$u[js]=n.current,n.current=r}var rr={},dt=nr(rr),Et=nr(!1),_r=rr;function Ms(n,r){var a=n.type.contextTypes;if(!a)return rr;var c=n.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===r)return c.__reactInternalMemoizedMaskedChildContext;var f={},g;for(g in a)f[g]=r[g];return c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=r,n.__reactInternalMemoizedMaskedChildContext=f),f}function Tt(n){return n=n.childContextTypes,n!=null}function ya(){_e(Et),_e(dt)}function vm(n,r,a){if(dt.current!==rr)throw Error(s(168));Ie(dt,r),Ie(Et,a)}function xm(n,r,a){var c=n.stateNode;if(r=r.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var f in c)if(!(f in r))throw Error(s(108,Ce(n)||"Unknown",f));return J({},a,c)}function va(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||rr,_r=dt.current,Ie(dt,n),Ie(Et,Et.current),!0}function wm(n,r,a){var c=n.stateNode;if(!c)throw Error(s(169));a?(n=xm(n,r,_r),c.__reactInternalMemoizedMergedChildContext=n,_e(Et),_e(dt),Ie(dt,n)):_e(Et),Ie(Et,a)}var Mn=null,xa=!1,Hu=!1;function Sm(n){Mn===null?Mn=[n]:Mn.push(n)}function F2(n){xa=!0,Sm(n)}function sr(){if(!Hu&&Mn!==null){Hu=!0;var n=0,r=De;try{var a=Mn;for(De=1;n<a.length;n++){var c=a[n];do c=c(!0);while(c!==null)}Mn=null,xa=!1}catch(f){throw Mn!==null&&(Mn=Mn.slice(n+1)),Cp(fu,sr),f}finally{De=r,Hu=!1}}return null}var Ds=[],As=0,wa=null,Sa=0,_t=[],Ot=0,Or=null,Dn=1,An="";function Vr(n,r){Ds[As++]=Sa,Ds[As++]=wa,wa=n,Sa=r}function km(n,r,a){_t[Ot++]=Dn,_t[Ot++]=An,_t[Ot++]=Or,Or=n;var c=Dn;n=An;var f=32-Gt(c)-1;c&=~(1<<f),a+=1;var g=32-Gt(r)+f;if(30<g){var w=f-f%5;g=(c&(1<<w)-1).toString(32),c>>=w,f-=w,Dn=1<<32-Gt(r)+f|a<<f|c,An=g+n}else Dn=1<<g|a<<f|c,An=n}function Ku(n){n.return!==null&&(Vr(n,1),km(n,1,0))}function Wu(n){for(;n===wa;)wa=Ds[--As],Ds[As]=null,Sa=Ds[--As],Ds[As]=null;for(;n===Or;)Or=_t[--Ot],_t[Ot]=null,An=_t[--Ot],_t[Ot]=null,Dn=_t[--Ot],_t[Ot]=null}var Dt=null,At=null,Oe=!1,Xt=null;function Cm(n,r){var a=Ut(5,null,null,0);a.elementType="DELETED",a.stateNode=r,a.return=n,r=n.deletions,r===null?(n.deletions=[a],n.flags|=16):r.push(a)}function Em(n,r){switch(n.tag){case 5:var a=n.type;return r=r.nodeType!==1||a.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(n.stateNode=r,Dt=n,At=tr(r.firstChild),!0):!1;case 6:return r=n.pendingProps===""||r.nodeType!==3?null:r,r!==null?(n.stateNode=r,Dt=n,At=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(a=Or!==null?{id:Dn,overflow:An}:null,n.memoizedState={dehydrated:r,treeContext:a,retryLane:1073741824},a=Ut(18,null,null,0),a.stateNode=r,a.return=n,n.child=a,Dt=n,At=null,!0):!1;default:return!1}}function qu(n){return(n.mode&1)!==0&&(n.flags&128)===0}function Qu(n){if(Oe){var r=At;if(r){var a=r;if(!Em(n,r)){if(qu(n))throw Error(s(418));r=tr(a.nextSibling);var c=Dt;r&&Em(n,r)?Cm(c,a):(n.flags=n.flags&-4097|2,Oe=!1,Dt=n)}}else{if(qu(n))throw Error(s(418));n.flags=n.flags&-4097|2,Oe=!1,Dt=n}}}function Tm(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;Dt=n}function ka(n){if(n!==Dt)return!1;if(!Oe)return Tm(n),Oe=!0,!1;var r;if((r=n.tag!==3)&&!(r=n.tag!==5)&&(r=n.type,r=r!=="head"&&r!=="body"&&!Vu(n.type,n.memoizedProps)),r&&(r=At)){if(qu(n))throw Pm(),Error(s(418));for(;r;)Cm(n,r),r=tr(r.nextSibling)}if(Tm(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));e:{for(n=n.nextSibling,r=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"){if(r===0){At=tr(n.nextSibling);break e}r--}else a!=="$"&&a!=="$!"&&a!=="$?"||r++}n=n.nextSibling}At=null}}else At=Dt?tr(n.stateNode.nextSibling):null;return!0}function Pm(){for(var n=At;n;)n=tr(n.nextSibling)}function Ls(){At=Dt=null,Oe=!1}function Gu(n){Xt===null?Xt=[n]:Xt.push(n)}var _2=M.ReactCurrentBatchConfig;function Gi(n,r,a){if(n=a.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(s(309));var c=a.stateNode}if(!c)throw Error(s(147,n));var f=c,g=""+n;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===g?r.ref:(r=function(w){var N=f.refs;w===null?delete N[g]:N[g]=w},r._stringRef=g,r)}if(typeof n!="string")throw Error(s(284));if(!a._owner)throw Error(s(290,n))}return n}function Ca(n,r){throw n=Object.prototype.toString.call(r),Error(s(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n))}function Nm(n){var r=n._init;return r(n._payload)}function bm(n){function r(z,O){if(n){var $=z.deletions;$===null?(z.deletions=[O],z.flags|=16):$.push(O)}}function a(z,O){if(!n)return null;for(;O!==null;)r(z,O),O=O.sibling;return null}function c(z,O){for(z=new Map;O!==null;)O.key!==null?z.set(O.key,O):z.set(O.index,O),O=O.sibling;return z}function f(z,O){return z=fr(z,O),z.index=0,z.sibling=null,z}function g(z,O,$){return z.index=$,n?($=z.alternate,$!==null?($=$.index,$<O?(z.flags|=2,O):$):(z.flags|=2,O)):(z.flags|=1048576,O)}function w(z){return n&&z.alternate===null&&(z.flags|=2),z}function N(z,O,$,Z){return O===null||O.tag!==6?(O=Bc($,z.mode,Z),O.return=z,O):(O=f(O,$),O.return=z,O)}function A(z,O,$,Z){var le=$.type;return le===R?Q(z,O,$.props.children,Z,$.key):O!==null&&(O.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===me&&Nm(le)===O.type)?(Z=f(O,$.props),Z.ref=Gi(z,O,$),Z.return=z,Z):(Z=qa($.type,$.key,$.props,null,z.mode,Z),Z.ref=Gi(z,O,$),Z.return=z,Z)}function H(z,O,$,Z){return O===null||O.tag!==4||O.stateNode.containerInfo!==$.containerInfo||O.stateNode.implementation!==$.implementation?(O=zc($,z.mode,Z),O.return=z,O):(O=f(O,$.children||[]),O.return=z,O)}function Q(z,O,$,Z,le){return O===null||O.tag!==7?(O=qr($,z.mode,Z,le),O.return=z,O):(O=f(O,$),O.return=z,O)}function Y(z,O,$){if(typeof O=="string"&&O!==""||typeof O=="number")return O=Bc(""+O,z.mode,$),O.return=z,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case _:return $=qa(O.type,O.key,O.props,null,z.mode,$),$.ref=Gi(z,null,O),$.return=z,$;case I:return O=zc(O,z.mode,$),O.return=z,O;case me:var Z=O._init;return Y(z,Z(O._payload),$)}if(Ei(O)||ue(O))return O=qr(O,z.mode,$,null),O.return=z,O;Ca(z,O)}return null}function q(z,O,$,Z){var le=O!==null?O.key:null;if(typeof $=="string"&&$!==""||typeof $=="number")return le!==null?null:N(z,O,""+$,Z);if(typeof $=="object"&&$!==null){switch($.$$typeof){case _:return $.key===le?A(z,O,$,Z):null;case I:return $.key===le?H(z,O,$,Z):null;case me:return le=$._init,q(z,O,le($._payload),Z)}if(Ei($)||ue($))return le!==null?null:Q(z,O,$,Z,null);Ca(z,$)}return null}function re(z,O,$,Z,le){if(typeof Z=="string"&&Z!==""||typeof Z=="number")return z=z.get($)||null,N(O,z,""+Z,le);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case _:return z=z.get(Z.key===null?$:Z.key)||null,A(O,z,Z,le);case I:return z=z.get(Z.key===null?$:Z.key)||null,H(O,z,Z,le);case me:var de=Z._init;return re(z,O,$,de(Z._payload),le)}if(Ei(Z)||ue(Z))return z=z.get($)||null,Q(O,z,Z,le,null);Ca(O,Z)}return null}function ie(z,O,$,Z){for(var le=null,de=null,fe=O,he=O=0,st=null;fe!==null&&he<$.length;he++){fe.index>he?(st=fe,fe=null):st=fe.sibling;var Re=q(z,fe,$[he],Z);if(Re===null){fe===null&&(fe=st);break}n&&fe&&Re.alternate===null&&r(z,fe),O=g(Re,O,he),de===null?le=Re:de.sibling=Re,de=Re,fe=st}if(he===$.length)return a(z,fe),Oe&&Vr(z,he),le;if(fe===null){for(;he<$.length;he++)fe=Y(z,$[he],Z),fe!==null&&(O=g(fe,O,he),de===null?le=fe:de.sibling=fe,de=fe);return Oe&&Vr(z,he),le}for(fe=c(z,fe);he<$.length;he++)st=re(fe,z,he,$[he],Z),st!==null&&(n&&st.alternate!==null&&fe.delete(st.key===null?he:st.key),O=g(st,O,he),de===null?le=st:de.sibling=st,de=st);return n&&fe.forEach(function(hr){return r(z,hr)}),Oe&&Vr(z,he),le}function ae(z,O,$,Z){var le=ue($);if(typeof le!="function")throw Error(s(150));if($=le.call($),$==null)throw Error(s(151));for(var de=le=null,fe=O,he=O=0,st=null,Re=$.next();fe!==null&&!Re.done;he++,Re=$.next()){fe.index>he?(st=fe,fe=null):st=fe.sibling;var hr=q(z,fe,Re.value,Z);if(hr===null){fe===null&&(fe=st);break}n&&fe&&hr.alternate===null&&r(z,fe),O=g(hr,O,he),de===null?le=hr:de.sibling=hr,de=hr,fe=st}if(Re.done)return a(z,fe),Oe&&Vr(z,he),le;if(fe===null){for(;!Re.done;he++,Re=$.next())Re=Y(z,Re.value,Z),Re!==null&&(O=g(Re,O,he),de===null?le=Re:de.sibling=Re,de=Re);return Oe&&Vr(z,he),le}for(fe=c(z,fe);!Re.done;he++,Re=$.next())Re=re(fe,z,he,Re.value,Z),Re!==null&&(n&&Re.alternate!==null&&fe.delete(Re.key===null?he:Re.key),O=g(Re,O,he),de===null?le=Re:de.sibling=Re,de=Re);return n&&fe.forEach(function(gk){return r(z,gk)}),Oe&&Vr(z,he),le}function qe(z,O,$,Z){if(typeof $=="object"&&$!==null&&$.type===R&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case _:e:{for(var le=$.key,de=O;de!==null;){if(de.key===le){if(le=$.type,le===R){if(de.tag===7){a(z,de.sibling),O=f(de,$.props.children),O.return=z,z=O;break e}}else if(de.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===me&&Nm(le)===de.type){a(z,de.sibling),O=f(de,$.props),O.ref=Gi(z,de,$),O.return=z,z=O;break e}a(z,de);break}else r(z,de);de=de.sibling}$.type===R?(O=qr($.props.children,z.mode,Z,$.key),O.return=z,z=O):(Z=qa($.type,$.key,$.props,null,z.mode,Z),Z.ref=Gi(z,O,$),Z.return=z,z=Z)}return w(z);case I:e:{for(de=$.key;O!==null;){if(O.key===de)if(O.tag===4&&O.stateNode.containerInfo===$.containerInfo&&O.stateNode.implementation===$.implementation){a(z,O.sibling),O=f(O,$.children||[]),O.return=z,z=O;break e}else{a(z,O);break}else r(z,O);O=O.sibling}O=zc($,z.mode,Z),O.return=z,z=O}return w(z);case me:return de=$._init,qe(z,O,de($._payload),Z)}if(Ei($))return ie(z,O,$,Z);if(ue($))return ae(z,O,$,Z);Ca(z,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,O!==null&&O.tag===6?(a(z,O.sibling),O=f(O,$),O.return=z,z=O):(a(z,O),O=Bc($,z.mode,Z),O.return=z,z=O),w(z)):a(z,O)}return qe}var Is=bm(!0),Rm=bm(!1),Ea=nr(null),Ta=null,Fs=null,Yu=null;function Xu(){Yu=Fs=Ta=null}function Ju(n){var r=Ea.current;_e(Ea),n._currentValue=r}function Zu(n,r,a){for(;n!==null;){var c=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),n===a)break;n=n.return}}function _s(n,r){Ta=n,Yu=Fs=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&r)!==0&&(Pt=!0),n.firstContext=null)}function Vt(n){var r=n._currentValue;if(Yu!==n)if(n={context:n,memoizedValue:r,next:null},Fs===null){if(Ta===null)throw Error(s(308));Fs=n,Ta.dependencies={lanes:0,firstContext:n}}else Fs=Fs.next=n;return r}var Br=null;function ec(n){Br===null?Br=[n]:Br.push(n)}function jm(n,r,a,c){var f=r.interleaved;return f===null?(a.next=a,ec(r)):(a.next=f.next,f.next=a),r.interleaved=a,Ln(n,c)}function Ln(n,r){n.lanes|=r;var a=n.alternate;for(a!==null&&(a.lanes|=r),a=n,n=n.return;n!==null;)n.childLanes|=r,a=n.alternate,a!==null&&(a.childLanes|=r),a=n,n=n.return;return a.tag===3?a.stateNode:null}var ir=!1;function tc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Mm(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function In(n,r){return{eventTime:n,lane:r,tag:0,payload:null,callback:null,next:null}}function or(n,r,a){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(be&2)!==0){var f=c.pending;return f===null?r.next=r:(r.next=f.next,f.next=r),c.pending=r,Ln(n,a)}return f=c.interleaved,f===null?(r.next=r,ec(c)):(r.next=f.next,f.next=r),c.interleaved=r,Ln(n,a)}function Pa(n,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194240)!==0)){var c=r.lanes;c&=n.pendingLanes,a|=c,r.lanes=a,mu(n,a)}}function Dm(n,r){var a=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var w={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};g===null?f=g=w:g=g.next=w,a=a.next}while(a!==null);g===null?f=g=r:g=g.next=r}else f=g=r;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:g,shared:c.shared,effects:c.effects},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=r:n.next=r,a.lastBaseUpdate=r}function Na(n,r,a,c){var f=n.updateQueue;ir=!1;var g=f.firstBaseUpdate,w=f.lastBaseUpdate,N=f.shared.pending;if(N!==null){f.shared.pending=null;var A=N,H=A.next;A.next=null,w===null?g=H:w.next=H,w=A;var Q=n.alternate;Q!==null&&(Q=Q.updateQueue,N=Q.lastBaseUpdate,N!==w&&(N===null?Q.firstBaseUpdate=H:N.next=H,Q.lastBaseUpdate=A))}if(g!==null){var Y=f.baseState;w=0,Q=H=A=null,N=g;do{var q=N.lane,re=N.eventTime;if((c&q)===q){Q!==null&&(Q=Q.next={eventTime:re,lane:0,tag:N.tag,payload:N.payload,callback:N.callback,next:null});e:{var ie=n,ae=N;switch(q=r,re=a,ae.tag){case 1:if(ie=ae.payload,typeof ie=="function"){Y=ie.call(re,Y,q);break e}Y=ie;break e;case 3:ie.flags=ie.flags&-65537|128;case 0:if(ie=ae.payload,q=typeof ie=="function"?ie.call(re,Y,q):ie,q==null)break e;Y=J({},Y,q);break e;case 2:ir=!0}}N.callback!==null&&N.lane!==0&&(n.flags|=64,q=f.effects,q===null?f.effects=[N]:q.push(N))}else re={eventTime:re,lane:q,tag:N.tag,payload:N.payload,callback:N.callback,next:null},Q===null?(H=Q=re,A=Y):Q=Q.next=re,w|=q;if(N=N.next,N===null){if(N=f.shared.pending,N===null)break;q=N,N=q.next,q.next=null,f.lastBaseUpdate=q,f.shared.pending=null}}while(!0);if(Q===null&&(A=Y),f.baseState=A,f.firstBaseUpdate=H,f.lastBaseUpdate=Q,r=f.shared.interleaved,r!==null){f=r;do w|=f.lane,f=f.next;while(f!==r)}else g===null&&(f.shared.lanes=0);$r|=w,n.lanes=w,n.memoizedState=Y}}function Am(n,r,a){if(n=r.effects,r.effects=null,n!==null)for(r=0;r<n.length;r++){var c=n[r],f=c.callback;if(f!==null){if(c.callback=null,c=a,typeof f!="function")throw Error(s(191,f));f.call(c)}}}var Yi={},vn=nr(Yi),Xi=nr(Yi),Ji=nr(Yi);function zr(n){if(n===Yi)throw Error(s(174));return n}function nc(n,r){switch(Ie(Ji,r),Ie(Xi,n),Ie(vn,Yi),n=r.nodeType,n){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:ru(null,"");break;default:n=n===8?r.parentNode:r,r=n.namespaceURI||null,n=n.tagName,r=ru(r,n)}_e(vn),Ie(vn,r)}function Os(){_e(vn),_e(Xi),_e(Ji)}function Lm(n){zr(Ji.current);var r=zr(vn.current),a=ru(r,n.type);r!==a&&(Ie(Xi,n),Ie(vn,a))}function rc(n){Xi.current===n&&(_e(vn),_e(Xi))}var Ue=nr(0);function ba(n){for(var r=n;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.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===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var sc=[];function ic(){for(var n=0;n<sc.length;n++)sc[n]._workInProgressVersionPrimary=null;sc.length=0}var Ra=M.ReactCurrentDispatcher,oc=M.ReactCurrentBatchConfig,Ur=0,$e=null,Ge=null,nt=null,ja=!1,Zi=!1,eo=0,O2=0;function ft(){throw Error(s(321))}function ac(n,r){if(r===null)return!1;for(var a=0;a<r.length&&a<n.length;a++)if(!Yt(n[a],r[a]))return!1;return!0}function lc(n,r,a,c,f,g){if(Ur=g,$e=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,Ra.current=n===null||n.memoizedState===null?U2:$2,n=a(c,f),Zi){g=0;do{if(Zi=!1,eo=0,25<=g)throw Error(s(301));g+=1,nt=Ge=null,r.updateQueue=null,Ra.current=H2,n=a(c,f)}while(Zi)}if(Ra.current=Aa,r=Ge!==null&&Ge.next!==null,Ur=0,nt=Ge=$e=null,ja=!1,r)throw Error(s(300));return n}function uc(){var n=eo!==0;return eo=0,n}function xn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?$e.memoizedState=nt=n:nt=nt.next=n,nt}function Bt(){if(Ge===null){var n=$e.alternate;n=n!==null?n.memoizedState:null}else n=Ge.next;var r=nt===null?$e.memoizedState:nt.next;if(r!==null)nt=r,Ge=n;else{if(n===null)throw Error(s(310));Ge=n,n={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},nt===null?$e.memoizedState=nt=n:nt=nt.next=n}return nt}function to(n,r){return typeof r=="function"?r(n):r}function cc(n){var r=Bt(),a=r.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=n;var c=Ge,f=c.baseQueue,g=a.pending;if(g!==null){if(f!==null){var w=f.next;f.next=g.next,g.next=w}c.baseQueue=f=g,a.pending=null}if(f!==null){g=f.next,c=c.baseState;var N=w=null,A=null,H=g;do{var Q=H.lane;if((Ur&Q)===Q)A!==null&&(A=A.next={lane:0,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),c=H.hasEagerState?H.eagerState:n(c,H.action);else{var Y={lane:Q,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null};A===null?(N=A=Y,w=c):A=A.next=Y,$e.lanes|=Q,$r|=Q}H=H.next}while(H!==null&&H!==g);A===null?w=c:A.next=N,Yt(c,r.memoizedState)||(Pt=!0),r.memoizedState=c,r.baseState=w,r.baseQueue=A,a.lastRenderedState=c}if(n=a.interleaved,n!==null){f=n;do g=f.lane,$e.lanes|=g,$r|=g,f=f.next;while(f!==n)}else f===null&&(a.lanes=0);return[r.memoizedState,a.dispatch]}function dc(n){var r=Bt(),a=r.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=n;var c=a.dispatch,f=a.pending,g=r.memoizedState;if(f!==null){a.pending=null;var w=f=f.next;do g=n(g,w.action),w=w.next;while(w!==f);Yt(g,r.memoizedState)||(Pt=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),a.lastRenderedState=g}return[g,c]}function Im(){}function Fm(n,r){var a=$e,c=Bt(),f=r(),g=!Yt(c.memoizedState,f);if(g&&(c.memoizedState=f,Pt=!0),c=c.queue,fc(Vm.bind(null,a,c,n),[n]),c.getSnapshot!==r||g||nt!==null&&nt.memoizedState.tag&1){if(a.flags|=2048,no(9,Om.bind(null,a,c,f,r),void 0,null),rt===null)throw Error(s(349));(Ur&30)!==0||_m(a,r,f)}return f}function _m(n,r,a){n.flags|=16384,n={getSnapshot:r,value:a},r=$e.updateQueue,r===null?(r={lastEffect:null,stores:null},$e.updateQueue=r,r.stores=[n]):(a=r.stores,a===null?r.stores=[n]:a.push(n))}function Om(n,r,a,c){r.value=a,r.getSnapshot=c,Bm(r)&&zm(n)}function Vm(n,r,a){return a(function(){Bm(r)&&zm(n)})}function Bm(n){var r=n.getSnapshot;n=n.value;try{var a=r();return!Yt(n,a)}catch{return!0}}function zm(n){var r=Ln(n,1);r!==null&&tn(r,n,1,-1)}function Um(n){var r=xn();return typeof n=="function"&&(n=n()),r.memoizedState=r.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:to,lastRenderedState:n},r.queue=n,n=n.dispatch=z2.bind(null,$e,n),[r.memoizedState,n]}function no(n,r,a,c){return n={tag:n,create:r,destroy:a,deps:c,next:null},r=$e.updateQueue,r===null?(r={lastEffect:null,stores:null},$e.updateQueue=r,r.lastEffect=n.next=n):(a=r.lastEffect,a===null?r.lastEffect=n.next=n:(c=a.next,a.next=n,n.next=c,r.lastEffect=n)),n}function $m(){return Bt().memoizedState}function Ma(n,r,a,c){var f=xn();$e.flags|=n,f.memoizedState=no(1|r,a,void 0,c===void 0?null:c)}function Da(n,r,a,c){var f=Bt();c=c===void 0?null:c;var g=void 0;if(Ge!==null){var w=Ge.memoizedState;if(g=w.destroy,c!==null&&ac(c,w.deps)){f.memoizedState=no(r,a,g,c);return}}$e.flags|=n,f.memoizedState=no(1|r,a,g,c)}function Hm(n,r){return Ma(8390656,8,n,r)}function fc(n,r){return Da(2048,8,n,r)}function Km(n,r){return Da(4,2,n,r)}function Wm(n,r){return Da(4,4,n,r)}function qm(n,r){if(typeof r=="function")return n=n(),r(n),function(){r(null)};if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function Qm(n,r,a){return a=a!=null?a.concat([n]):null,Da(4,4,qm.bind(null,r,n),a)}function hc(){}function Gm(n,r){var a=Bt();r=r===void 0?null:r;var c=a.memoizedState;return c!==null&&r!==null&&ac(r,c[1])?c[0]:(a.memoizedState=[n,r],n)}function Ym(n,r){var a=Bt();r=r===void 0?null:r;var c=a.memoizedState;return c!==null&&r!==null&&ac(r,c[1])?c[0]:(n=n(),a.memoizedState=[n,r],n)}function Xm(n,r,a){return(Ur&21)===0?(n.baseState&&(n.baseState=!1,Pt=!0),n.memoizedState=a):(Yt(a,r)||(a=Np(),$e.lanes|=a,$r|=a,n.baseState=!0),r)}function V2(n,r){var a=De;De=a!==0&&4>a?a:4,n(!0);var c=oc.transition;oc.transition={};try{n(!1),r()}finally{De=a,oc.transition=c}}function Jm(){return Bt().memoizedState}function B2(n,r,a){var c=cr(n);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},Zm(n))eg(r,a);else if(a=jm(n,r,a,c),a!==null){var f=vt();tn(a,n,c,f),tg(a,r,c)}}function z2(n,r,a){var c=cr(n),f={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(Zm(n))eg(r,f);else{var g=n.alternate;if(n.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var w=r.lastRenderedState,N=g(w,a);if(f.hasEagerState=!0,f.eagerState=N,Yt(N,w)){var A=r.interleaved;A===null?(f.next=f,ec(r)):(f.next=A.next,A.next=f),r.interleaved=f;return}}catch{}finally{}a=jm(n,r,f,c),a!==null&&(f=vt(),tn(a,n,c,f),tg(a,r,c))}}function Zm(n){var r=n.alternate;return n===$e||r!==null&&r===$e}function eg(n,r){Zi=ja=!0;var a=n.pending;a===null?r.next=r:(r.next=a.next,a.next=r),n.pending=r}function tg(n,r,a){if((a&4194240)!==0){var c=r.lanes;c&=n.pendingLanes,a|=c,r.lanes=a,mu(n,a)}}var Aa={readContext:Vt,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useInsertionEffect:ft,useLayoutEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useMutableSource:ft,useSyncExternalStore:ft,useId:ft,unstable_isNewReconciler:!1},U2={readContext:Vt,useCallback:function(n,r){return xn().memoizedState=[n,r===void 0?null:r],n},useContext:Vt,useEffect:Hm,useImperativeHandle:function(n,r,a){return a=a!=null?a.concat([n]):null,Ma(4194308,4,qm.bind(null,r,n),a)},useLayoutEffect:function(n,r){return Ma(4194308,4,n,r)},useInsertionEffect:function(n,r){return Ma(4,2,n,r)},useMemo:function(n,r){var a=xn();return r=r===void 0?null:r,n=n(),a.memoizedState=[n,r],n},useReducer:function(n,r,a){var c=xn();return r=a!==void 0?a(r):r,c.memoizedState=c.baseState=r,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:r},c.queue=n,n=n.dispatch=B2.bind(null,$e,n),[c.memoizedState,n]},useRef:function(n){var r=xn();return n={current:n},r.memoizedState=n},useState:Um,useDebugValue:hc,useDeferredValue:function(n){return xn().memoizedState=n},useTransition:function(){var n=Um(!1),r=n[0];return n=V2.bind(null,n[1]),xn().memoizedState=n,[r,n]},useMutableSource:function(){},useSyncExternalStore:function(n,r,a){var c=$e,f=xn();if(Oe){if(a===void 0)throw Error(s(407));a=a()}else{if(a=r(),rt===null)throw Error(s(349));(Ur&30)!==0||_m(c,r,a)}f.memoizedState=a;var g={value:a,getSnapshot:r};return f.queue=g,Hm(Vm.bind(null,c,g,n),[n]),c.flags|=2048,no(9,Om.bind(null,c,g,a,r),void 0,null),a},useId:function(){var n=xn(),r=rt.identifierPrefix;if(Oe){var a=An,c=Dn;a=(c&~(1<<32-Gt(c)-1)).toString(32)+a,r=":"+r+"R"+a,a=eo++,0<a&&(r+="H"+a.toString(32)),r+=":"}else a=O2++,r=":"+r+"r"+a.toString(32)+":";return n.memoizedState=r},unstable_isNewReconciler:!1},$2={readContext:Vt,useCallback:Gm,useContext:Vt,useEffect:fc,useImperativeHandle:Qm,useInsertionEffect:Km,useLayoutEffect:Wm,useMemo:Ym,useReducer:cc,useRef:$m,useState:function(){return cc(to)},useDebugValue:hc,useDeferredValue:function(n){var r=Bt();return Xm(r,Ge.memoizedState,n)},useTransition:function(){var n=cc(to)[0],r=Bt().memoizedState;return[n,r]},useMutableSource:Im,useSyncExternalStore:Fm,useId:Jm,unstable_isNewReconciler:!1},H2={readContext:Vt,useCallback:Gm,useContext:Vt,useEffect:fc,useImperativeHandle:Qm,useInsertionEffect:Km,useLayoutEffect:Wm,useMemo:Ym,useReducer:dc,useRef:$m,useState:function(){return dc(to)},useDebugValue:hc,useDeferredValue:function(n){var r=Bt();return Ge===null?r.memoizedState=n:Xm(r,Ge.memoizedState,n)},useTransition:function(){var n=dc(to)[0],r=Bt().memoizedState;return[n,r]},useMutableSource:Im,useSyncExternalStore:Fm,useId:Jm,unstable_isNewReconciler:!1};function Jt(n,r){if(n&&n.defaultProps){r=J({},r),n=n.defaultProps;for(var a in n)r[a]===void 0&&(r[a]=n[a]);return r}return r}function pc(n,r,a,c){r=n.memoizedState,a=a(c,r),a=a==null?r:J({},r,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var La={isMounted:function(n){return(n=n._reactInternals)?Ir(n)===n:!1},enqueueSetState:function(n,r,a){n=n._reactInternals;var c=vt(),f=cr(n),g=In(c,f);g.payload=r,a!=null&&(g.callback=a),r=or(n,g,f),r!==null&&(tn(r,n,f,c),Pa(r,n,f))},enqueueReplaceState:function(n,r,a){n=n._reactInternals;var c=vt(),f=cr(n),g=In(c,f);g.tag=1,g.payload=r,a!=null&&(g.callback=a),r=or(n,g,f),r!==null&&(tn(r,n,f,c),Pa(r,n,f))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var a=vt(),c=cr(n),f=In(a,c);f.tag=2,r!=null&&(f.callback=r),r=or(n,f,c),r!==null&&(tn(r,n,c,a),Pa(r,n,c))}};function ng(n,r,a,c,f,g,w){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,g,w):r.prototype&&r.prototype.isPureReactComponent?!Ui(a,c)||!Ui(f,g):!0}function rg(n,r,a){var c=!1,f=rr,g=r.contextType;return typeof g=="object"&&g!==null?g=Vt(g):(f=Tt(r)?_r:dt.current,c=r.contextTypes,g=(c=c!=null)?Ms(n,f):rr),r=new r(a,g),n.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=La,n.stateNode=r,r._reactInternals=n,c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=f,n.__reactInternalMemoizedMaskedChildContext=g),r}function sg(n,r,a,c){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,c),r.state!==n&&La.enqueueReplaceState(r,r.state,null)}function mc(n,r,a,c){var f=n.stateNode;f.props=a,f.state=n.memoizedState,f.refs={},tc(n);var g=r.contextType;typeof g=="object"&&g!==null?f.context=Vt(g):(g=Tt(r)?_r:dt.current,f.context=Ms(n,g)),f.state=n.memoizedState,g=r.getDerivedStateFromProps,typeof g=="function"&&(pc(n,r,g,a),f.state=n.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(r=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),r!==f.state&&La.enqueueReplaceState(f,f.state,null),Na(n,a,f,c),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308)}function Vs(n,r){try{var a="",c=r;do a+=ke(c),c=c.return;while(c);var f=a}catch(g){f=`
39
- Error generating stack: `+g.message+`
40
- `+g.stack}return{value:n,source:r,stack:f,digest:null}}function gc(n,r,a){return{value:n,source:null,stack:a??null,digest:r??null}}function yc(n,r){try{console.error(r.value)}catch(a){setTimeout(function(){throw a})}}var K2=typeof WeakMap=="function"?WeakMap:Map;function ig(n,r,a){a=In(-1,a),a.tag=3,a.payload={element:null};var c=r.value;return a.callback=function(){za||(za=!0,Dc=c),yc(n,r)},a}function og(n,r,a){a=In(-1,a),a.tag=3;var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var f=r.value;a.payload=function(){return c(f)},a.callback=function(){yc(n,r)}}var g=n.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(a.callback=function(){yc(n,r),typeof c!="function"&&(lr===null?lr=new Set([this]):lr.add(this));var w=r.stack;this.componentDidCatch(r.value,{componentStack:w!==null?w:""})}),a}function ag(n,r,a){var c=n.pingCache;if(c===null){c=n.pingCache=new K2;var f=new Set;c.set(r,f)}else f=c.get(r),f===void 0&&(f=new Set,c.set(r,f));f.has(a)||(f.add(a),n=ik.bind(null,n,r,a),r.then(n,n))}function lg(n){do{var r;if((r=n.tag===13)&&(r=n.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return n;n=n.return}while(n!==null);return null}function ug(n,r,a,c,f){return(n.mode&1)===0?(n===r?n.flags|=65536:(n.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(r=In(-1,1),r.tag=2,or(a,r,1))),a.lanes|=1),n):(n.flags|=65536,n.lanes=f,n)}var W2=M.ReactCurrentOwner,Pt=!1;function yt(n,r,a,c){r.child=n===null?Rm(r,null,a,c):Is(r,n.child,a,c)}function cg(n,r,a,c,f){a=a.render;var g=r.ref;return _s(r,f),c=lc(n,r,a,c,g,f),a=uc(),n!==null&&!Pt?(r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~f,Fn(n,r,f)):(Oe&&a&&Ku(r),r.flags|=1,yt(n,r,c,f),r.child)}function dg(n,r,a,c,f){if(n===null){var g=a.type;return typeof g=="function"&&!Vc(g)&&g.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(r.tag=15,r.type=g,fg(n,r,g,c,f)):(n=qa(a.type,null,c,r,r.mode,f),n.ref=r.ref,n.return=r,r.child=n)}if(g=n.child,(n.lanes&f)===0){var w=g.memoizedProps;if(a=a.compare,a=a!==null?a:Ui,a(w,c)&&n.ref===r.ref)return Fn(n,r,f)}return r.flags|=1,n=fr(g,c),n.ref=r.ref,n.return=r,r.child=n}function fg(n,r,a,c,f){if(n!==null){var g=n.memoizedProps;if(Ui(g,c)&&n.ref===r.ref)if(Pt=!1,r.pendingProps=c=g,(n.lanes&f)!==0)(n.flags&131072)!==0&&(Pt=!0);else return r.lanes=n.lanes,Fn(n,r,f)}return vc(n,r,a,c,f)}function hg(n,r,a){var c=r.pendingProps,f=c.children,g=n!==null?n.memoizedState:null;if(c.mode==="hidden")if((r.mode&1)===0)r.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ie(zs,Lt),Lt|=a;else{if((a&1073741824)===0)return n=g!==null?g.baseLanes|a:a,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:n,cachePool:null,transitions:null},r.updateQueue=null,Ie(zs,Lt),Lt|=n,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=g!==null?g.baseLanes:a,Ie(zs,Lt),Lt|=c}else g!==null?(c=g.baseLanes|a,r.memoizedState=null):c=a,Ie(zs,Lt),Lt|=c;return yt(n,r,f,a),r.child}function pg(n,r){var a=r.ref;(n===null&&a!==null||n!==null&&n.ref!==a)&&(r.flags|=512,r.flags|=2097152)}function vc(n,r,a,c,f){var g=Tt(a)?_r:dt.current;return g=Ms(r,g),_s(r,f),a=lc(n,r,a,c,g,f),c=uc(),n!==null&&!Pt?(r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~f,Fn(n,r,f)):(Oe&&c&&Ku(r),r.flags|=1,yt(n,r,a,f),r.child)}function mg(n,r,a,c,f){if(Tt(a)){var g=!0;va(r)}else g=!1;if(_s(r,f),r.stateNode===null)Fa(n,r),rg(r,a,c),mc(r,a,c,f),c=!0;else if(n===null){var w=r.stateNode,N=r.memoizedProps;w.props=N;var A=w.context,H=a.contextType;typeof H=="object"&&H!==null?H=Vt(H):(H=Tt(a)?_r:dt.current,H=Ms(r,H));var Q=a.getDerivedStateFromProps,Y=typeof Q=="function"||typeof w.getSnapshotBeforeUpdate=="function";Y||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(N!==c||A!==H)&&sg(r,w,c,H),ir=!1;var q=r.memoizedState;w.state=q,Na(r,c,w,f),A=r.memoizedState,N!==c||q!==A||Et.current||ir?(typeof Q=="function"&&(pc(r,a,Q,c),A=r.memoizedState),(N=ir||ng(r,a,N,c,q,A,H))?(Y||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=c,r.memoizedState=A),w.props=c,w.state=A,w.context=H,c=N):(typeof w.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{w=r.stateNode,Mm(n,r),N=r.memoizedProps,H=r.type===r.elementType?N:Jt(r.type,N),w.props=H,Y=r.pendingProps,q=w.context,A=a.contextType,typeof A=="object"&&A!==null?A=Vt(A):(A=Tt(a)?_r:dt.current,A=Ms(r,A));var re=a.getDerivedStateFromProps;(Q=typeof re=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(N!==Y||q!==A)&&sg(r,w,c,A),ir=!1,q=r.memoizedState,w.state=q,Na(r,c,w,f);var ie=r.memoizedState;N!==Y||q!==ie||Et.current||ir?(typeof re=="function"&&(pc(r,a,re,c),ie=r.memoizedState),(H=ir||ng(r,a,H,c,q,ie,A)||!1)?(Q||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(c,ie,A),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(c,ie,A)),typeof w.componentDidUpdate=="function"&&(r.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof w.componentDidUpdate!="function"||N===n.memoizedProps&&q===n.memoizedState||(r.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||N===n.memoizedProps&&q===n.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=ie),w.props=c,w.state=ie,w.context=A,c=H):(typeof w.componentDidUpdate!="function"||N===n.memoizedProps&&q===n.memoizedState||(r.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||N===n.memoizedProps&&q===n.memoizedState||(r.flags|=1024),c=!1)}return xc(n,r,a,c,g,f)}function xc(n,r,a,c,f,g){pg(n,r);var w=(r.flags&128)!==0;if(!c&&!w)return f&&wm(r,a,!1),Fn(n,r,g);c=r.stateNode,W2.current=r;var N=w&&typeof a.getDerivedStateFromError!="function"?null:c.render();return r.flags|=1,n!==null&&w?(r.child=Is(r,n.child,null,g),r.child=Is(r,null,N,g)):yt(n,r,N,g),r.memoizedState=c.state,f&&wm(r,a,!0),r.child}function gg(n){var r=n.stateNode;r.pendingContext?vm(n,r.pendingContext,r.pendingContext!==r.context):r.context&&vm(n,r.context,!1),nc(n,r.containerInfo)}function yg(n,r,a,c,f){return Ls(),Gu(f),r.flags|=256,yt(n,r,a,c),r.child}var wc={dehydrated:null,treeContext:null,retryLane:0};function Sc(n){return{baseLanes:n,cachePool:null,transitions:null}}function vg(n,r,a){var c=r.pendingProps,f=Ue.current,g=!1,w=(r.flags&128)!==0,N;if((N=w)||(N=n!==null&&n.memoizedState===null?!1:(f&2)!==0),N?(g=!0,r.flags&=-129):(n===null||n.memoizedState!==null)&&(f|=1),Ie(Ue,f&1),n===null)return Qu(r),n=r.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((r.mode&1)===0?r.lanes=1:n.data==="$!"?r.lanes=8:r.lanes=1073741824,null):(w=c.children,n=c.fallback,g?(c=r.mode,g=r.child,w={mode:"hidden",children:w},(c&1)===0&&g!==null?(g.childLanes=0,g.pendingProps=w):g=Qa(w,c,0,null),n=qr(n,c,a,null),g.return=r,n.return=r,g.sibling=n,r.child=g,r.child.memoizedState=Sc(a),r.memoizedState=wc,n):kc(r,w));if(f=n.memoizedState,f!==null&&(N=f.dehydrated,N!==null))return q2(n,r,w,c,N,f,a);if(g){g=c.fallback,w=r.mode,f=n.child,N=f.sibling;var A={mode:"hidden",children:c.children};return(w&1)===0&&r.child!==f?(c=r.child,c.childLanes=0,c.pendingProps=A,r.deletions=null):(c=fr(f,A),c.subtreeFlags=f.subtreeFlags&14680064),N!==null?g=fr(N,g):(g=qr(g,w,a,null),g.flags|=2),g.return=r,c.return=r,c.sibling=g,r.child=c,c=g,g=r.child,w=n.child.memoizedState,w=w===null?Sc(a):{baseLanes:w.baseLanes|a,cachePool:null,transitions:w.transitions},g.memoizedState=w,g.childLanes=n.childLanes&~a,r.memoizedState=wc,c}return g=n.child,n=g.sibling,c=fr(g,{mode:"visible",children:c.children}),(r.mode&1)===0&&(c.lanes=a),c.return=r,c.sibling=null,n!==null&&(a=r.deletions,a===null?(r.deletions=[n],r.flags|=16):a.push(n)),r.child=c,r.memoizedState=null,c}function kc(n,r){return r=Qa({mode:"visible",children:r},n.mode,0,null),r.return=n,n.child=r}function Ia(n,r,a,c){return c!==null&&Gu(c),Is(r,n.child,null,a),n=kc(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function q2(n,r,a,c,f,g,w){if(a)return r.flags&256?(r.flags&=-257,c=gc(Error(s(422))),Ia(n,r,w,c)):r.memoizedState!==null?(r.child=n.child,r.flags|=128,null):(g=c.fallback,f=r.mode,c=Qa({mode:"visible",children:c.children},f,0,null),g=qr(g,f,w,null),g.flags|=2,c.return=r,g.return=r,c.sibling=g,r.child=c,(r.mode&1)!==0&&Is(r,n.child,null,w),r.child.memoizedState=Sc(w),r.memoizedState=wc,g);if((r.mode&1)===0)return Ia(n,r,w,null);if(f.data==="$!"){if(c=f.nextSibling&&f.nextSibling.dataset,c)var N=c.dgst;return c=N,g=Error(s(419)),c=gc(g,c,void 0),Ia(n,r,w,c)}if(N=(w&n.childLanes)!==0,Pt||N){if(c=rt,c!==null){switch(w&-w){case 4:f=2;break;case 16:f=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:f=32;break;case 536870912:f=268435456;break;default:f=0}f=(f&(c.suspendedLanes|w))!==0?0:f,f!==0&&f!==g.retryLane&&(g.retryLane=f,Ln(n,f),tn(c,n,f,-1))}return Oc(),c=gc(Error(s(421))),Ia(n,r,w,c)}return f.data==="$?"?(r.flags|=128,r.child=n.child,r=ok.bind(null,n),f._reactRetry=r,null):(n=g.treeContext,At=tr(f.nextSibling),Dt=r,Oe=!0,Xt=null,n!==null&&(_t[Ot++]=Dn,_t[Ot++]=An,_t[Ot++]=Or,Dn=n.id,An=n.overflow,Or=r),r=kc(r,c.children),r.flags|=4096,r)}function xg(n,r,a){n.lanes|=r;var c=n.alternate;c!==null&&(c.lanes|=r),Zu(n.return,r,a)}function Cc(n,r,a,c,f){var g=n.memoizedState;g===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:f}:(g.isBackwards=r,g.rendering=null,g.renderingStartTime=0,g.last=c,g.tail=a,g.tailMode=f)}function wg(n,r,a){var c=r.pendingProps,f=c.revealOrder,g=c.tail;if(yt(n,r,c.children,a),c=Ue.current,(c&2)!==0)c=c&1|2,r.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&xg(n,a,r);else if(n.tag===19)xg(n,a,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break e;for(;n.sibling===null;){if(n.return===null||n.return===r)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}c&=1}if(Ie(Ue,c),(r.mode&1)===0)r.memoizedState=null;else switch(f){case"forwards":for(a=r.child,f=null;a!==null;)n=a.alternate,n!==null&&ba(n)===null&&(f=a),a=a.sibling;a=f,a===null?(f=r.child,r.child=null):(f=a.sibling,a.sibling=null),Cc(r,!1,f,a,g);break;case"backwards":for(a=null,f=r.child,r.child=null;f!==null;){if(n=f.alternate,n!==null&&ba(n)===null){r.child=f;break}n=f.sibling,f.sibling=a,a=f,f=n}Cc(r,!0,a,null,g);break;case"together":Cc(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function Fa(n,r){(r.mode&1)===0&&n!==null&&(n.alternate=null,r.alternate=null,r.flags|=2)}function Fn(n,r,a){if(n!==null&&(r.dependencies=n.dependencies),$r|=r.lanes,(a&r.childLanes)===0)return null;if(n!==null&&r.child!==n.child)throw Error(s(153));if(r.child!==null){for(n=r.child,a=fr(n,n.pendingProps),r.child=a,a.return=r;n.sibling!==null;)n=n.sibling,a=a.sibling=fr(n,n.pendingProps),a.return=r;a.sibling=null}return r.child}function Q2(n,r,a){switch(r.tag){case 3:gg(r),Ls();break;case 5:Lm(r);break;case 1:Tt(r.type)&&va(r);break;case 4:nc(r,r.stateNode.containerInfo);break;case 10:var c=r.type._context,f=r.memoizedProps.value;Ie(Ea,c._currentValue),c._currentValue=f;break;case 13:if(c=r.memoizedState,c!==null)return c.dehydrated!==null?(Ie(Ue,Ue.current&1),r.flags|=128,null):(a&r.child.childLanes)!==0?vg(n,r,a):(Ie(Ue,Ue.current&1),n=Fn(n,r,a),n!==null?n.sibling:null);Ie(Ue,Ue.current&1);break;case 19:if(c=(a&r.childLanes)!==0,(n.flags&128)!==0){if(c)return wg(n,r,a);r.flags|=128}if(f=r.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),Ie(Ue,Ue.current),c)break;return null;case 22:case 23:return r.lanes=0,hg(n,r,a)}return Fn(n,r,a)}var Sg,Ec,kg,Cg;Sg=function(n,r){for(var a=r.child;a!==null;){if(a.tag===5||a.tag===6)n.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Ec=function(){},kg=function(n,r,a,c){var f=n.memoizedProps;if(f!==c){n=r.stateNode,zr(vn.current);var g=null;switch(a){case"input":f=Zl(n,f),c=Zl(n,c),g=[];break;case"select":f=J({},f,{value:void 0}),c=J({},c,{value:void 0}),g=[];break;case"textarea":f=nu(n,f),c=nu(n,c),g=[];break;default:typeof f.onClick!="function"&&typeof c.onClick=="function"&&(n.onclick=ma)}su(a,c);var w;a=null;for(H in f)if(!c.hasOwnProperty(H)&&f.hasOwnProperty(H)&&f[H]!=null)if(H==="style"){var N=f[H];for(w in N)N.hasOwnProperty(w)&&(a||(a={}),a[w]="")}else H!=="dangerouslySetInnerHTML"&&H!=="children"&&H!=="suppressContentEditableWarning"&&H!=="suppressHydrationWarning"&&H!=="autoFocus"&&(o.hasOwnProperty(H)?g||(g=[]):(g=g||[]).push(H,null));for(H in c){var A=c[H];if(N=f!=null?f[H]:void 0,c.hasOwnProperty(H)&&A!==N&&(A!=null||N!=null))if(H==="style")if(N){for(w in N)!N.hasOwnProperty(w)||A&&A.hasOwnProperty(w)||(a||(a={}),a[w]="");for(w in A)A.hasOwnProperty(w)&&N[w]!==A[w]&&(a||(a={}),a[w]=A[w])}else a||(g||(g=[]),g.push(H,a)),a=A;else H==="dangerouslySetInnerHTML"?(A=A?A.__html:void 0,N=N?N.__html:void 0,A!=null&&N!==A&&(g=g||[]).push(H,A)):H==="children"?typeof A!="string"&&typeof A!="number"||(g=g||[]).push(H,""+A):H!=="suppressContentEditableWarning"&&H!=="suppressHydrationWarning"&&(o.hasOwnProperty(H)?(A!=null&&H==="onScroll"&&Fe("scroll",n),g||N===A||(g=[])):(g=g||[]).push(H,A))}a&&(g=g||[]).push("style",a);var H=g;(r.updateQueue=H)&&(r.flags|=4)}},Cg=function(n,r,a,c){a!==c&&(r.flags|=4)};function ro(n,r){if(!Oe)switch(n.tailMode){case"hidden":r=n.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?n.tail=null:a.sibling=null;break;case"collapsed":a=n.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function ht(n){var r=n.alternate!==null&&n.alternate.child===n.child,a=0,c=0;if(r)for(var f=n.child;f!==null;)a|=f.lanes|f.childLanes,c|=f.subtreeFlags&14680064,c|=f.flags&14680064,f.return=n,f=f.sibling;else for(f=n.child;f!==null;)a|=f.lanes|f.childLanes,c|=f.subtreeFlags,c|=f.flags,f.return=n,f=f.sibling;return n.subtreeFlags|=c,n.childLanes=a,r}function G2(n,r,a){var c=r.pendingProps;switch(Wu(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(r),null;case 1:return Tt(r.type)&&ya(),ht(r),null;case 3:return c=r.stateNode,Os(),_e(Et),_e(dt),ic(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(n===null||n.child===null)&&(ka(r)?r.flags|=4:n===null||n.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Xt!==null&&(Ic(Xt),Xt=null))),Ec(n,r),ht(r),null;case 5:rc(r);var f=zr(Ji.current);if(a=r.type,n!==null&&r.stateNode!=null)kg(n,r,a,c,f),n.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!c){if(r.stateNode===null)throw Error(s(166));return ht(r),null}if(n=zr(vn.current),ka(r)){c=r.stateNode,a=r.type;var g=r.memoizedProps;switch(c[yn]=r,c[qi]=g,n=(r.mode&1)!==0,a){case"dialog":Fe("cancel",c),Fe("close",c);break;case"iframe":case"object":case"embed":Fe("load",c);break;case"video":case"audio":for(f=0;f<Hi.length;f++)Fe(Hi[f],c);break;case"source":Fe("error",c);break;case"img":case"image":case"link":Fe("error",c),Fe("load",c);break;case"details":Fe("toggle",c);break;case"input":rp(c,g),Fe("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!g.multiple},Fe("invalid",c);break;case"textarea":op(c,g),Fe("invalid",c)}su(a,g),f=null;for(var w in g)if(g.hasOwnProperty(w)){var N=g[w];w==="children"?typeof N=="string"?c.textContent!==N&&(g.suppressHydrationWarning!==!0&&pa(c.textContent,N,n),f=["children",N]):typeof N=="number"&&c.textContent!==""+N&&(g.suppressHydrationWarning!==!0&&pa(c.textContent,N,n),f=["children",""+N]):o.hasOwnProperty(w)&&N!=null&&w==="onScroll"&&Fe("scroll",c)}switch(a){case"input":Ko(c),ip(c,g,!0);break;case"textarea":Ko(c),lp(c);break;case"select":case"option":break;default:typeof g.onClick=="function"&&(c.onclick=ma)}c=f,r.updateQueue=c,c!==null&&(r.flags|=4)}else{w=f.nodeType===9?f:f.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=up(a)),n==="http://www.w3.org/1999/xhtml"?a==="script"?(n=w.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof c.is=="string"?n=w.createElement(a,{is:c.is}):(n=w.createElement(a),a==="select"&&(w=n,c.multiple?w.multiple=!0:c.size&&(w.size=c.size))):n=w.createElementNS(n,a),n[yn]=r,n[qi]=c,Sg(n,r,!1,!1),r.stateNode=n;e:{switch(w=iu(a,c),a){case"dialog":Fe("cancel",n),Fe("close",n),f=c;break;case"iframe":case"object":case"embed":Fe("load",n),f=c;break;case"video":case"audio":for(f=0;f<Hi.length;f++)Fe(Hi[f],n);f=c;break;case"source":Fe("error",n),f=c;break;case"img":case"image":case"link":Fe("error",n),Fe("load",n),f=c;break;case"details":Fe("toggle",n),f=c;break;case"input":rp(n,c),f=Zl(n,c),Fe("invalid",n);break;case"option":f=c;break;case"select":n._wrapperState={wasMultiple:!!c.multiple},f=J({},c,{value:void 0}),Fe("invalid",n);break;case"textarea":op(n,c),f=nu(n,c),Fe("invalid",n);break;default:f=c}su(a,f),N=f;for(g in N)if(N.hasOwnProperty(g)){var A=N[g];g==="style"?fp(n,A):g==="dangerouslySetInnerHTML"?(A=A?A.__html:void 0,A!=null&&cp(n,A)):g==="children"?typeof A=="string"?(a!=="textarea"||A!=="")&&Ti(n,A):typeof A=="number"&&Ti(n,""+A):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(o.hasOwnProperty(g)?A!=null&&g==="onScroll"&&Fe("scroll",n):A!=null&&b(n,g,A,w))}switch(a){case"input":Ko(n),ip(n,c,!1);break;case"textarea":Ko(n),lp(n);break;case"option":c.value!=null&&n.setAttribute("value",""+xe(c.value));break;case"select":n.multiple=!!c.multiple,g=c.value,g!=null?xs(n,!!c.multiple,g,!1):c.defaultValue!=null&&xs(n,!!c.multiple,c.defaultValue,!0);break;default:typeof f.onClick=="function"&&(n.onclick=ma)}switch(a){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return ht(r),null;case 6:if(n&&r.stateNode!=null)Cg(n,r,n.memoizedProps,c);else{if(typeof c!="string"&&r.stateNode===null)throw Error(s(166));if(a=zr(Ji.current),zr(vn.current),ka(r)){if(c=r.stateNode,a=r.memoizedProps,c[yn]=r,(g=c.nodeValue!==a)&&(n=Dt,n!==null))switch(n.tag){case 3:pa(c.nodeValue,a,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&pa(c.nodeValue,a,(n.mode&1)!==0)}g&&(r.flags|=4)}else c=(a.nodeType===9?a:a.ownerDocument).createTextNode(c),c[yn]=r,r.stateNode=c}return ht(r),null;case 13:if(_e(Ue),c=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(Oe&&At!==null&&(r.mode&1)!==0&&(r.flags&128)===0)Pm(),Ls(),r.flags|=98560,g=!1;else if(g=ka(r),c!==null&&c.dehydrated!==null){if(n===null){if(!g)throw Error(s(318));if(g=r.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(s(317));g[yn]=r}else Ls(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;ht(r),g=!1}else Xt!==null&&(Ic(Xt),Xt=null),g=!0;if(!g)return r.flags&65536?r:null}return(r.flags&128)!==0?(r.lanes=a,r):(c=c!==null,c!==(n!==null&&n.memoizedState!==null)&&c&&(r.child.flags|=8192,(r.mode&1)!==0&&(n===null||(Ue.current&1)!==0?Ye===0&&(Ye=3):Oc())),r.updateQueue!==null&&(r.flags|=4),ht(r),null);case 4:return Os(),Ec(n,r),n===null&&Ki(r.stateNode.containerInfo),ht(r),null;case 10:return Ju(r.type._context),ht(r),null;case 17:return Tt(r.type)&&ya(),ht(r),null;case 19:if(_e(Ue),g=r.memoizedState,g===null)return ht(r),null;if(c=(r.flags&128)!==0,w=g.rendering,w===null)if(c)ro(g,!1);else{if(Ye!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(w=ba(n),w!==null){for(r.flags|=128,ro(g,!1),c=w.updateQueue,c!==null&&(r.updateQueue=c,r.flags|=4),r.subtreeFlags=0,c=a,a=r.child;a!==null;)g=a,n=c,g.flags&=14680066,w=g.alternate,w===null?(g.childLanes=0,g.lanes=n,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=w.childLanes,g.lanes=w.lanes,g.child=w.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=w.memoizedProps,g.memoizedState=w.memoizedState,g.updateQueue=w.updateQueue,g.type=w.type,n=w.dependencies,g.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),a=a.sibling;return Ie(Ue,Ue.current&1|2),r.child}n=n.sibling}g.tail!==null&&We()>Us&&(r.flags|=128,c=!0,ro(g,!1),r.lanes=4194304)}else{if(!c)if(n=ba(w),n!==null){if(r.flags|=128,c=!0,a=n.updateQueue,a!==null&&(r.updateQueue=a,r.flags|=4),ro(g,!0),g.tail===null&&g.tailMode==="hidden"&&!w.alternate&&!Oe)return ht(r),null}else 2*We()-g.renderingStartTime>Us&&a!==1073741824&&(r.flags|=128,c=!0,ro(g,!1),r.lanes=4194304);g.isBackwards?(w.sibling=r.child,r.child=w):(a=g.last,a!==null?a.sibling=w:r.child=w,g.last=w)}return g.tail!==null?(r=g.tail,g.rendering=r,g.tail=r.sibling,g.renderingStartTime=We(),r.sibling=null,a=Ue.current,Ie(Ue,c?a&1|2:a&1),r):(ht(r),null);case 22:case 23:return _c(),c=r.memoizedState!==null,n!==null&&n.memoizedState!==null!==c&&(r.flags|=8192),c&&(r.mode&1)!==0?(Lt&1073741824)!==0&&(ht(r),r.subtreeFlags&6&&(r.flags|=8192)):ht(r),null;case 24:return null;case 25:return null}throw Error(s(156,r.tag))}function Y2(n,r){switch(Wu(r),r.tag){case 1:return Tt(r.type)&&ya(),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return Os(),_e(Et),_e(dt),ic(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 5:return rc(r),null;case 13:if(_e(Ue),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(s(340));Ls()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return _e(Ue),null;case 4:return Os(),null;case 10:return Ju(r.type._context),null;case 22:case 23:return _c(),null;case 24:return null;default:return null}}var _a=!1,pt=!1,X2=typeof WeakSet=="function"?WeakSet:Set,se=null;function Bs(n,r){var a=n.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){Ke(n,r,c)}else a.current=null}function Tc(n,r,a){try{a()}catch(c){Ke(n,r,c)}}var Eg=!1;function J2(n,r){if(_u=ra,n=nm(),Ru(n)){if("selectionStart"in n)var a={start:n.selectionStart,end:n.selectionEnd};else e:{a=(a=n.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var w=0,N=-1,A=-1,H=0,Q=0,Y=n,q=null;t:for(;;){for(var re;Y!==a||f!==0&&Y.nodeType!==3||(N=w+f),Y!==g||c!==0&&Y.nodeType!==3||(A=w+c),Y.nodeType===3&&(w+=Y.nodeValue.length),(re=Y.firstChild)!==null;)q=Y,Y=re;for(;;){if(Y===n)break t;if(q===a&&++H===f&&(N=w),q===g&&++Q===c&&(A=w),(re=Y.nextSibling)!==null)break;Y=q,q=Y.parentNode}Y=re}a=N===-1||A===-1?null:{start:N,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ou={focusedElem:n,selectionRange:a},ra=!1,se=r;se!==null;)if(r=se,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,se=n;else for(;se!==null;){r=se;try{var ie=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(ie!==null){var ae=ie.memoizedProps,qe=ie.memoizedState,z=r.stateNode,O=z.getSnapshotBeforeUpdate(r.elementType===r.type?ae:Jt(r.type,ae),qe);z.__reactInternalSnapshotBeforeUpdate=O}break;case 3:var $=r.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Z){Ke(r,r.return,Z)}if(n=r.sibling,n!==null){n.return=r.return,se=n;break}se=r.return}return ie=Eg,Eg=!1,ie}function so(n,r,a){var c=r.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var f=c=c.next;do{if((f.tag&n)===n){var g=f.destroy;f.destroy=void 0,g!==void 0&&Tc(r,a,g)}f=f.next}while(f!==c)}}function Oa(n,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&n)===n){var c=a.create;a.destroy=c()}a=a.next}while(a!==r)}}function Pc(n){var r=n.ref;if(r!==null){var a=n.stateNode;switch(n.tag){case 5:n=a;break;default:n=a}typeof r=="function"?r(n):r.current=n}}function Tg(n){var r=n.alternate;r!==null&&(n.alternate=null,Tg(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&(delete r[yn],delete r[qi],delete r[Uu],delete r[L2],delete r[I2])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function Pg(n){return n.tag===5||n.tag===3||n.tag===4}function Ng(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Pg(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Nc(n,r,a){var c=n.tag;if(c===5||c===6)n=n.stateNode,r?a.nodeType===8?a.parentNode.insertBefore(n,r):a.insertBefore(n,r):(a.nodeType===8?(r=a.parentNode,r.insertBefore(n,a)):(r=a,r.appendChild(n)),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=ma));else if(c!==4&&(n=n.child,n!==null))for(Nc(n,r,a),n=n.sibling;n!==null;)Nc(n,r,a),n=n.sibling}function bc(n,r,a){var c=n.tag;if(c===5||c===6)n=n.stateNode,r?a.insertBefore(n,r):a.appendChild(n);else if(c!==4&&(n=n.child,n!==null))for(bc(n,r,a),n=n.sibling;n!==null;)bc(n,r,a),n=n.sibling}var ot=null,Zt=!1;function ar(n,r,a){for(a=a.child;a!==null;)bg(n,r,a),a=a.sibling}function bg(n,r,a){if(gn&&typeof gn.onCommitFiberUnmount=="function")try{gn.onCommitFiberUnmount(Xo,a)}catch{}switch(a.tag){case 5:pt||Bs(a,r);case 6:var c=ot,f=Zt;ot=null,ar(n,r,a),ot=c,Zt=f,ot!==null&&(Zt?(n=ot,a=a.stateNode,n.nodeType===8?n.parentNode.removeChild(a):n.removeChild(a)):ot.removeChild(a.stateNode));break;case 18:ot!==null&&(Zt?(n=ot,a=a.stateNode,n.nodeType===8?zu(n.parentNode,a):n.nodeType===1&&zu(n,a),Fi(n)):zu(ot,a.stateNode));break;case 4:c=ot,f=Zt,ot=a.stateNode.containerInfo,Zt=!0,ar(n,r,a),ot=c,Zt=f;break;case 0:case 11:case 14:case 15:if(!pt&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){f=c=c.next;do{var g=f,w=g.destroy;g=g.tag,w!==void 0&&((g&2)!==0||(g&4)!==0)&&Tc(a,r,w),f=f.next}while(f!==c)}ar(n,r,a);break;case 1:if(!pt&&(Bs(a,r),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(N){Ke(a,r,N)}ar(n,r,a);break;case 21:ar(n,r,a);break;case 22:a.mode&1?(pt=(c=pt)||a.memoizedState!==null,ar(n,r,a),pt=c):ar(n,r,a);break;default:ar(n,r,a)}}function Rg(n){var r=n.updateQueue;if(r!==null){n.updateQueue=null;var a=n.stateNode;a===null&&(a=n.stateNode=new X2),r.forEach(function(c){var f=ak.bind(null,n,c);a.has(c)||(a.add(c),c.then(f,f))})}}function en(n,r){var a=r.deletions;if(a!==null)for(var c=0;c<a.length;c++){var f=a[c];try{var g=n,w=r,N=w;e:for(;N!==null;){switch(N.tag){case 5:ot=N.stateNode,Zt=!1;break e;case 3:ot=N.stateNode.containerInfo,Zt=!0;break e;case 4:ot=N.stateNode.containerInfo,Zt=!0;break e}N=N.return}if(ot===null)throw Error(s(160));bg(g,w,f),ot=null,Zt=!1;var A=f.alternate;A!==null&&(A.return=null),f.return=null}catch(H){Ke(f,r,H)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)jg(r,n),r=r.sibling}function jg(n,r){var a=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(en(r,n),wn(n),c&4){try{so(3,n,n.return),Oa(3,n)}catch(ae){Ke(n,n.return,ae)}try{so(5,n,n.return)}catch(ae){Ke(n,n.return,ae)}}break;case 1:en(r,n),wn(n),c&512&&a!==null&&Bs(a,a.return);break;case 5:if(en(r,n),wn(n),c&512&&a!==null&&Bs(a,a.return),n.flags&32){var f=n.stateNode;try{Ti(f,"")}catch(ae){Ke(n,n.return,ae)}}if(c&4&&(f=n.stateNode,f!=null)){var g=n.memoizedProps,w=a!==null?a.memoizedProps:g,N=n.type,A=n.updateQueue;if(n.updateQueue=null,A!==null)try{N==="input"&&g.type==="radio"&&g.name!=null&&sp(f,g),iu(N,w);var H=iu(N,g);for(w=0;w<A.length;w+=2){var Q=A[w],Y=A[w+1];Q==="style"?fp(f,Y):Q==="dangerouslySetInnerHTML"?cp(f,Y):Q==="children"?Ti(f,Y):b(f,Q,Y,H)}switch(N){case"input":eu(f,g);break;case"textarea":ap(f,g);break;case"select":var q=f._wrapperState.wasMultiple;f._wrapperState.wasMultiple=!!g.multiple;var re=g.value;re!=null?xs(f,!!g.multiple,re,!1):q!==!!g.multiple&&(g.defaultValue!=null?xs(f,!!g.multiple,g.defaultValue,!0):xs(f,!!g.multiple,g.multiple?[]:"",!1))}f[qi]=g}catch(ae){Ke(n,n.return,ae)}}break;case 6:if(en(r,n),wn(n),c&4){if(n.stateNode===null)throw Error(s(162));f=n.stateNode,g=n.memoizedProps;try{f.nodeValue=g}catch(ae){Ke(n,n.return,ae)}}break;case 3:if(en(r,n),wn(n),c&4&&a!==null&&a.memoizedState.isDehydrated)try{Fi(r.containerInfo)}catch(ae){Ke(n,n.return,ae)}break;case 4:en(r,n),wn(n);break;case 13:en(r,n),wn(n),f=n.child,f.flags&8192&&(g=f.memoizedState!==null,f.stateNode.isHidden=g,!g||f.alternate!==null&&f.alternate.memoizedState!==null||(Mc=We())),c&4&&Rg(n);break;case 22:if(Q=a!==null&&a.memoizedState!==null,n.mode&1?(pt=(H=pt)||Q,en(r,n),pt=H):en(r,n),wn(n),c&8192){if(H=n.memoizedState!==null,(n.stateNode.isHidden=H)&&!Q&&(n.mode&1)!==0)for(se=n,Q=n.child;Q!==null;){for(Y=se=Q;se!==null;){switch(q=se,re=q.child,q.tag){case 0:case 11:case 14:case 15:so(4,q,q.return);break;case 1:Bs(q,q.return);var ie=q.stateNode;if(typeof ie.componentWillUnmount=="function"){c=q,a=q.return;try{r=c,ie.props=r.memoizedProps,ie.state=r.memoizedState,ie.componentWillUnmount()}catch(ae){Ke(c,a,ae)}}break;case 5:Bs(q,q.return);break;case 22:if(q.memoizedState!==null){Ag(Y);continue}}re!==null?(re.return=q,se=re):Ag(Y)}Q=Q.sibling}e:for(Q=null,Y=n;;){if(Y.tag===5){if(Q===null){Q=Y;try{f=Y.stateNode,H?(g=f.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none"):(N=Y.stateNode,A=Y.memoizedProps.style,w=A!=null&&A.hasOwnProperty("display")?A.display:null,N.style.display=dp("display",w))}catch(ae){Ke(n,n.return,ae)}}}else if(Y.tag===6){if(Q===null)try{Y.stateNode.nodeValue=H?"":Y.memoizedProps}catch(ae){Ke(n,n.return,ae)}}else if((Y.tag!==22&&Y.tag!==23||Y.memoizedState===null||Y===n)&&Y.child!==null){Y.child.return=Y,Y=Y.child;continue}if(Y===n)break e;for(;Y.sibling===null;){if(Y.return===null||Y.return===n)break e;Q===Y&&(Q=null),Y=Y.return}Q===Y&&(Q=null),Y.sibling.return=Y.return,Y=Y.sibling}}break;case 19:en(r,n),wn(n),c&4&&Rg(n);break;case 21:break;default:en(r,n),wn(n)}}function wn(n){var r=n.flags;if(r&2){try{e:{for(var a=n.return;a!==null;){if(Pg(a)){var c=a;break e}a=a.return}throw Error(s(160))}switch(c.tag){case 5:var f=c.stateNode;c.flags&32&&(Ti(f,""),c.flags&=-33);var g=Ng(n);bc(n,g,f);break;case 3:case 4:var w=c.stateNode.containerInfo,N=Ng(n);Nc(n,N,w);break;default:throw Error(s(161))}}catch(A){Ke(n,n.return,A)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function Z2(n,r,a){se=n,Mg(n)}function Mg(n,r,a){for(var c=(n.mode&1)!==0;se!==null;){var f=se,g=f.child;if(f.tag===22&&c){var w=f.memoizedState!==null||_a;if(!w){var N=f.alternate,A=N!==null&&N.memoizedState!==null||pt;N=_a;var H=pt;if(_a=w,(pt=A)&&!H)for(se=f;se!==null;)w=se,A=w.child,w.tag===22&&w.memoizedState!==null?Lg(f):A!==null?(A.return=w,se=A):Lg(f);for(;g!==null;)se=g,Mg(g),g=g.sibling;se=f,_a=N,pt=H}Dg(n)}else(f.subtreeFlags&8772)!==0&&g!==null?(g.return=f,se=g):Dg(n)}}function Dg(n){for(;se!==null;){var r=se;if((r.flags&8772)!==0){var a=r.alternate;try{if((r.flags&8772)!==0)switch(r.tag){case 0:case 11:case 15:pt||Oa(5,r);break;case 1:var c=r.stateNode;if(r.flags&4&&!pt)if(a===null)c.componentDidMount();else{var f=r.elementType===r.type?a.memoizedProps:Jt(r.type,a.memoizedProps);c.componentDidUpdate(f,a.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var g=r.updateQueue;g!==null&&Am(r,g,c);break;case 3:var w=r.updateQueue;if(w!==null){if(a=null,r.child!==null)switch(r.child.tag){case 5:a=r.child.stateNode;break;case 1:a=r.child.stateNode}Am(r,w,a)}break;case 5:var N=r.stateNode;if(a===null&&r.flags&4){a=N;var A=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":A.autoFocus&&a.focus();break;case"img":A.src&&(a.src=A.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var H=r.alternate;if(H!==null){var Q=H.memoizedState;if(Q!==null){var Y=Q.dehydrated;Y!==null&&Fi(Y)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(s(163))}pt||r.flags&512&&Pc(r)}catch(q){Ke(r,r.return,q)}}if(r===n){se=null;break}if(a=r.sibling,a!==null){a.return=r.return,se=a;break}se=r.return}}function Ag(n){for(;se!==null;){var r=se;if(r===n){se=null;break}var a=r.sibling;if(a!==null){a.return=r.return,se=a;break}se=r.return}}function Lg(n){for(;se!==null;){var r=se;try{switch(r.tag){case 0:case 11:case 15:var a=r.return;try{Oa(4,r)}catch(A){Ke(r,a,A)}break;case 1:var c=r.stateNode;if(typeof c.componentDidMount=="function"){var f=r.return;try{c.componentDidMount()}catch(A){Ke(r,f,A)}}var g=r.return;try{Pc(r)}catch(A){Ke(r,g,A)}break;case 5:var w=r.return;try{Pc(r)}catch(A){Ke(r,w,A)}}}catch(A){Ke(r,r.return,A)}if(r===n){se=null;break}var N=r.sibling;if(N!==null){N.return=r.return,se=N;break}se=r.return}}var ek=Math.ceil,Va=M.ReactCurrentDispatcher,Rc=M.ReactCurrentOwner,zt=M.ReactCurrentBatchConfig,be=0,rt=null,Qe=null,at=0,Lt=0,zs=nr(0),Ye=0,io=null,$r=0,Ba=0,jc=0,oo=null,Nt=null,Mc=0,Us=1/0,_n=null,za=!1,Dc=null,lr=null,Ua=!1,ur=null,$a=0,ao=0,Ac=null,Ha=-1,Ka=0;function vt(){return(be&6)!==0?We():Ha!==-1?Ha:Ha=We()}function cr(n){return(n.mode&1)===0?1:(be&2)!==0&&at!==0?at&-at:_2.transition!==null?(Ka===0&&(Ka=Np()),Ka):(n=De,n!==0||(n=window.event,n=n===void 0?16:Fp(n.type)),n)}function tn(n,r,a,c){if(50<ao)throw ao=0,Ac=null,Error(s(185));Mi(n,a,c),((be&2)===0||n!==rt)&&(n===rt&&((be&2)===0&&(Ba|=a),Ye===4&&dr(n,at)),bt(n,c),a===1&&be===0&&(r.mode&1)===0&&(Us=We()+500,xa&&sr()))}function bt(n,r){var a=n.callbackNode;_S(n,r);var c=ea(n,n===rt?at:0);if(c===0)a!==null&&Ep(a),n.callbackNode=null,n.callbackPriority=0;else if(r=c&-c,n.callbackPriority!==r){if(a!=null&&Ep(a),r===1)n.tag===0?F2(Fg.bind(null,n)):Sm(Fg.bind(null,n)),D2(function(){(be&6)===0&&sr()}),a=null;else{switch(bp(c)){case 1:a=fu;break;case 4:a=Tp;break;case 16:a=Yo;break;case 536870912:a=Pp;break;default:a=Yo}a=Hg(a,Ig.bind(null,n))}n.callbackPriority=r,n.callbackNode=a}}function Ig(n,r){if(Ha=-1,Ka=0,(be&6)!==0)throw Error(s(327));var a=n.callbackNode;if($s()&&n.callbackNode!==a)return null;var c=ea(n,n===rt?at:0);if(c===0)return null;if((c&30)!==0||(c&n.expiredLanes)!==0||r)r=Wa(n,c);else{r=c;var f=be;be|=2;var g=Og();(rt!==n||at!==r)&&(_n=null,Us=We()+500,Kr(n,r));do try{rk();break}catch(N){_g(n,N)}while(!0);Xu(),Va.current=g,be=f,Qe!==null?r=0:(rt=null,at=0,r=Ye)}if(r!==0){if(r===2&&(f=hu(n),f!==0&&(c=f,r=Lc(n,f))),r===1)throw a=io,Kr(n,0),dr(n,c),bt(n,We()),a;if(r===6)dr(n,c);else{if(f=n.current.alternate,(c&30)===0&&!tk(f)&&(r=Wa(n,c),r===2&&(g=hu(n),g!==0&&(c=g,r=Lc(n,g))),r===1))throw a=io,Kr(n,0),dr(n,c),bt(n,We()),a;switch(n.finishedWork=f,n.finishedLanes=c,r){case 0:case 1:throw Error(s(345));case 2:Wr(n,Nt,_n);break;case 3:if(dr(n,c),(c&130023424)===c&&(r=Mc+500-We(),10<r)){if(ea(n,0)!==0)break;if(f=n.suspendedLanes,(f&c)!==c){vt(),n.pingedLanes|=n.suspendedLanes&f;break}n.timeoutHandle=Bu(Wr.bind(null,n,Nt,_n),r);break}Wr(n,Nt,_n);break;case 4:if(dr(n,c),(c&4194240)===c)break;for(r=n.eventTimes,f=-1;0<c;){var w=31-Gt(c);g=1<<w,w=r[w],w>f&&(f=w),c&=~g}if(c=f,c=We()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*ek(c/1960))-c,10<c){n.timeoutHandle=Bu(Wr.bind(null,n,Nt,_n),c);break}Wr(n,Nt,_n);break;case 5:Wr(n,Nt,_n);break;default:throw Error(s(329))}}}return bt(n,We()),n.callbackNode===a?Ig.bind(null,n):null}function Lc(n,r){var a=oo;return n.current.memoizedState.isDehydrated&&(Kr(n,r).flags|=256),n=Wa(n,r),n!==2&&(r=Nt,Nt=a,r!==null&&Ic(r)),n}function Ic(n){Nt===null?Nt=n:Nt.push.apply(Nt,n)}function tk(n){for(var r=n;;){if(r.flags&16384){var a=r.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var c=0;c<a.length;c++){var f=a[c],g=f.getSnapshot;f=f.value;try{if(!Yt(g(),f))return!1}catch{return!1}}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function dr(n,r){for(r&=~jc,r&=~Ba,n.suspendedLanes|=r,n.pingedLanes&=~r,n=n.expirationTimes;0<r;){var a=31-Gt(r),c=1<<a;n[a]=-1,r&=~c}}function Fg(n){if((be&6)!==0)throw Error(s(327));$s();var r=ea(n,0);if((r&1)===0)return bt(n,We()),null;var a=Wa(n,r);if(n.tag!==0&&a===2){var c=hu(n);c!==0&&(r=c,a=Lc(n,c))}if(a===1)throw a=io,Kr(n,0),dr(n,r),bt(n,We()),a;if(a===6)throw Error(s(345));return n.finishedWork=n.current.alternate,n.finishedLanes=r,Wr(n,Nt,_n),bt(n,We()),null}function Fc(n,r){var a=be;be|=1;try{return n(r)}finally{be=a,be===0&&(Us=We()+500,xa&&sr())}}function Hr(n){ur!==null&&ur.tag===0&&(be&6)===0&&$s();var r=be;be|=1;var a=zt.transition,c=De;try{if(zt.transition=null,De=1,n)return n()}finally{De=c,zt.transition=a,be=r,(be&6)===0&&sr()}}function _c(){Lt=zs.current,_e(zs)}function Kr(n,r){n.finishedWork=null,n.finishedLanes=0;var a=n.timeoutHandle;if(a!==-1&&(n.timeoutHandle=-1,M2(a)),Qe!==null)for(a=Qe.return;a!==null;){var c=a;switch(Wu(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&ya();break;case 3:Os(),_e(Et),_e(dt),ic();break;case 5:rc(c);break;case 4:Os();break;case 13:_e(Ue);break;case 19:_e(Ue);break;case 10:Ju(c.type._context);break;case 22:case 23:_c()}a=a.return}if(rt=n,Qe=n=fr(n.current,null),at=Lt=r,Ye=0,io=null,jc=Ba=$r=0,Nt=oo=null,Br!==null){for(r=0;r<Br.length;r++)if(a=Br[r],c=a.interleaved,c!==null){a.interleaved=null;var f=c.next,g=a.pending;if(g!==null){var w=g.next;g.next=f,c.next=w}a.pending=c}Br=null}return n}function _g(n,r){do{var a=Qe;try{if(Xu(),Ra.current=Aa,ja){for(var c=$e.memoizedState;c!==null;){var f=c.queue;f!==null&&(f.pending=null),c=c.next}ja=!1}if(Ur=0,nt=Ge=$e=null,Zi=!1,eo=0,Rc.current=null,a===null||a.return===null){Ye=1,io=r,Qe=null;break}e:{var g=n,w=a.return,N=a,A=r;if(r=at,N.flags|=32768,A!==null&&typeof A=="object"&&typeof A.then=="function"){var H=A,Q=N,Y=Q.tag;if((Q.mode&1)===0&&(Y===0||Y===11||Y===15)){var q=Q.alternate;q?(Q.updateQueue=q.updateQueue,Q.memoizedState=q.memoizedState,Q.lanes=q.lanes):(Q.updateQueue=null,Q.memoizedState=null)}var re=lg(w);if(re!==null){re.flags&=-257,ug(re,w,N,g,r),re.mode&1&&ag(g,H,r),r=re,A=H;var ie=r.updateQueue;if(ie===null){var ae=new Set;ae.add(A),r.updateQueue=ae}else ie.add(A);break e}else{if((r&1)===0){ag(g,H,r),Oc();break e}A=Error(s(426))}}else if(Oe&&N.mode&1){var qe=lg(w);if(qe!==null){(qe.flags&65536)===0&&(qe.flags|=256),ug(qe,w,N,g,r),Gu(Vs(A,N));break e}}g=A=Vs(A,N),Ye!==4&&(Ye=2),oo===null?oo=[g]:oo.push(g),g=w;do{switch(g.tag){case 3:g.flags|=65536,r&=-r,g.lanes|=r;var z=ig(g,A,r);Dm(g,z);break e;case 1:N=A;var O=g.type,$=g.stateNode;if((g.flags&128)===0&&(typeof O.getDerivedStateFromError=="function"||$!==null&&typeof $.componentDidCatch=="function"&&(lr===null||!lr.has($)))){g.flags|=65536,r&=-r,g.lanes|=r;var Z=og(g,N,r);Dm(g,Z);break e}}g=g.return}while(g!==null)}Bg(a)}catch(le){r=le,Qe===a&&a!==null&&(Qe=a=a.return);continue}break}while(!0)}function Og(){var n=Va.current;return Va.current=Aa,n===null?Aa:n}function Oc(){(Ye===0||Ye===3||Ye===2)&&(Ye=4),rt===null||($r&268435455)===0&&(Ba&268435455)===0||dr(rt,at)}function Wa(n,r){var a=be;be|=2;var c=Og();(rt!==n||at!==r)&&(_n=null,Kr(n,r));do try{nk();break}catch(f){_g(n,f)}while(!0);if(Xu(),be=a,Va.current=c,Qe!==null)throw Error(s(261));return rt=null,at=0,Ye}function nk(){for(;Qe!==null;)Vg(Qe)}function rk(){for(;Qe!==null&&!bS();)Vg(Qe)}function Vg(n){var r=$g(n.alternate,n,Lt);n.memoizedProps=n.pendingProps,r===null?Bg(n):Qe=r,Rc.current=null}function Bg(n){var r=n;do{var a=r.alternate;if(n=r.return,(r.flags&32768)===0){if(a=G2(a,r,Lt),a!==null){Qe=a;return}}else{if(a=Y2(a,r),a!==null){a.flags&=32767,Qe=a;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{Ye=6,Qe=null;return}}if(r=r.sibling,r!==null){Qe=r;return}Qe=r=n}while(r!==null);Ye===0&&(Ye=5)}function Wr(n,r,a){var c=De,f=zt.transition;try{zt.transition=null,De=1,sk(n,r,a,c)}finally{zt.transition=f,De=c}return null}function sk(n,r,a,c){do $s();while(ur!==null);if((be&6)!==0)throw Error(s(327));a=n.finishedWork;var f=n.finishedLanes;if(a===null)return null;if(n.finishedWork=null,n.finishedLanes=0,a===n.current)throw Error(s(177));n.callbackNode=null,n.callbackPriority=0;var g=a.lanes|a.childLanes;if(OS(n,g),n===rt&&(Qe=rt=null,at=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||Ua||(Ua=!0,Hg(Yo,function(){return $s(),null})),g=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||g){g=zt.transition,zt.transition=null;var w=De;De=1;var N=be;be|=4,Rc.current=null,J2(n,a),jg(a,n),E2(Ou),ra=!!_u,Ou=_u=null,n.current=a,Z2(a),RS(),be=N,De=w,zt.transition=g}else n.current=a;if(Ua&&(Ua=!1,ur=n,$a=f),g=n.pendingLanes,g===0&&(lr=null),DS(a.stateNode),bt(n,We()),r!==null)for(c=n.onRecoverableError,a=0;a<r.length;a++)f=r[a],c(f.value,{componentStack:f.stack,digest:f.digest});if(za)throw za=!1,n=Dc,Dc=null,n;return($a&1)!==0&&n.tag!==0&&$s(),g=n.pendingLanes,(g&1)!==0?n===Ac?ao++:(ao=0,Ac=n):ao=0,sr(),null}function $s(){if(ur!==null){var n=bp($a),r=zt.transition,a=De;try{if(zt.transition=null,De=16>n?16:n,ur===null)var c=!1;else{if(n=ur,ur=null,$a=0,(be&6)!==0)throw Error(s(331));var f=be;for(be|=4,se=n.current;se!==null;){var g=se,w=g.child;if((se.flags&16)!==0){var N=g.deletions;if(N!==null){for(var A=0;A<N.length;A++){var H=N[A];for(se=H;se!==null;){var Q=se;switch(Q.tag){case 0:case 11:case 15:so(8,Q,g)}var Y=Q.child;if(Y!==null)Y.return=Q,se=Y;else for(;se!==null;){Q=se;var q=Q.sibling,re=Q.return;if(Tg(Q),Q===H){se=null;break}if(q!==null){q.return=re,se=q;break}se=re}}}var ie=g.alternate;if(ie!==null){var ae=ie.child;if(ae!==null){ie.child=null;do{var qe=ae.sibling;ae.sibling=null,ae=qe}while(ae!==null)}}se=g}}if((g.subtreeFlags&2064)!==0&&w!==null)w.return=g,se=w;else e:for(;se!==null;){if(g=se,(g.flags&2048)!==0)switch(g.tag){case 0:case 11:case 15:so(9,g,g.return)}var z=g.sibling;if(z!==null){z.return=g.return,se=z;break e}se=g.return}}var O=n.current;for(se=O;se!==null;){w=se;var $=w.child;if((w.subtreeFlags&2064)!==0&&$!==null)$.return=w,se=$;else e:for(w=O;se!==null;){if(N=se,(N.flags&2048)!==0)try{switch(N.tag){case 0:case 11:case 15:Oa(9,N)}}catch(le){Ke(N,N.return,le)}if(N===w){se=null;break e}var Z=N.sibling;if(Z!==null){Z.return=N.return,se=Z;break e}se=N.return}}if(be=f,sr(),gn&&typeof gn.onPostCommitFiberRoot=="function")try{gn.onPostCommitFiberRoot(Xo,n)}catch{}c=!0}return c}finally{De=a,zt.transition=r}}return!1}function zg(n,r,a){r=Vs(a,r),r=ig(n,r,1),n=or(n,r,1),r=vt(),n!==null&&(Mi(n,1,r),bt(n,r))}function Ke(n,r,a){if(n.tag===3)zg(n,n,a);else for(;r!==null;){if(r.tag===3){zg(r,n,a);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(lr===null||!lr.has(c))){n=Vs(a,n),n=og(r,n,1),r=or(r,n,1),n=vt(),r!==null&&(Mi(r,1,n),bt(r,n));break}}r=r.return}}function ik(n,r,a){var c=n.pingCache;c!==null&&c.delete(r),r=vt(),n.pingedLanes|=n.suspendedLanes&a,rt===n&&(at&a)===a&&(Ye===4||Ye===3&&(at&130023424)===at&&500>We()-Mc?Kr(n,0):jc|=a),bt(n,r)}function Ug(n,r){r===0&&((n.mode&1)===0?r=1:(r=Zo,Zo<<=1,(Zo&130023424)===0&&(Zo=4194304)));var a=vt();n=Ln(n,r),n!==null&&(Mi(n,r,a),bt(n,a))}function ok(n){var r=n.memoizedState,a=0;r!==null&&(a=r.retryLane),Ug(n,a)}function ak(n,r){var a=0;switch(n.tag){case 13:var c=n.stateNode,f=n.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=n.stateNode;break;default:throw Error(s(314))}c!==null&&c.delete(r),Ug(n,a)}var $g;$g=function(n,r,a){if(n!==null)if(n.memoizedProps!==r.pendingProps||Et.current)Pt=!0;else{if((n.lanes&a)===0&&(r.flags&128)===0)return Pt=!1,Q2(n,r,a);Pt=(n.flags&131072)!==0}else Pt=!1,Oe&&(r.flags&1048576)!==0&&km(r,Sa,r.index);switch(r.lanes=0,r.tag){case 2:var c=r.type;Fa(n,r),n=r.pendingProps;var f=Ms(r,dt.current);_s(r,a),f=lc(null,r,c,n,f,a);var g=uc();return r.flags|=1,typeof f=="object"&&f!==null&&typeof f.render=="function"&&f.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,Tt(c)?(g=!0,va(r)):g=!1,r.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,tc(r),f.updater=La,r.stateNode=f,f._reactInternals=r,mc(r,c,n,a),r=xc(null,r,c,!0,g,a)):(r.tag=0,Oe&&g&&Ku(r),yt(null,r,f,a),r=r.child),r;case 16:c=r.elementType;e:{switch(Fa(n,r),n=r.pendingProps,f=c._init,c=f(c._payload),r.type=c,f=r.tag=uk(c),n=Jt(c,n),f){case 0:r=vc(null,r,c,n,a);break e;case 1:r=mg(null,r,c,n,a);break e;case 11:r=cg(null,r,c,n,a);break e;case 14:r=dg(null,r,c,Jt(c.type,n),a);break e}throw Error(s(306,c,""))}return r;case 0:return c=r.type,f=r.pendingProps,f=r.elementType===c?f:Jt(c,f),vc(n,r,c,f,a);case 1:return c=r.type,f=r.pendingProps,f=r.elementType===c?f:Jt(c,f),mg(n,r,c,f,a);case 3:e:{if(gg(r),n===null)throw Error(s(387));c=r.pendingProps,g=r.memoizedState,f=g.element,Mm(n,r),Na(r,c,null,a);var w=r.memoizedState;if(c=w.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){f=Vs(Error(s(423)),r),r=yg(n,r,c,a,f);break e}else if(c!==f){f=Vs(Error(s(424)),r),r=yg(n,r,c,a,f);break e}else for(At=tr(r.stateNode.containerInfo.firstChild),Dt=r,Oe=!0,Xt=null,a=Rm(r,null,c,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Ls(),c===f){r=Fn(n,r,a);break e}yt(n,r,c,a)}r=r.child}return r;case 5:return Lm(r),n===null&&Qu(r),c=r.type,f=r.pendingProps,g=n!==null?n.memoizedProps:null,w=f.children,Vu(c,f)?w=null:g!==null&&Vu(c,g)&&(r.flags|=32),pg(n,r),yt(n,r,w,a),r.child;case 6:return n===null&&Qu(r),null;case 13:return vg(n,r,a);case 4:return nc(r,r.stateNode.containerInfo),c=r.pendingProps,n===null?r.child=Is(r,null,c,a):yt(n,r,c,a),r.child;case 11:return c=r.type,f=r.pendingProps,f=r.elementType===c?f:Jt(c,f),cg(n,r,c,f,a);case 7:return yt(n,r,r.pendingProps,a),r.child;case 8:return yt(n,r,r.pendingProps.children,a),r.child;case 12:return yt(n,r,r.pendingProps.children,a),r.child;case 10:e:{if(c=r.type._context,f=r.pendingProps,g=r.memoizedProps,w=f.value,Ie(Ea,c._currentValue),c._currentValue=w,g!==null)if(Yt(g.value,w)){if(g.children===f.children&&!Et.current){r=Fn(n,r,a);break e}}else for(g=r.child,g!==null&&(g.return=r);g!==null;){var N=g.dependencies;if(N!==null){w=g.child;for(var A=N.firstContext;A!==null;){if(A.context===c){if(g.tag===1){A=In(-1,a&-a),A.tag=2;var H=g.updateQueue;if(H!==null){H=H.shared;var Q=H.pending;Q===null?A.next=A:(A.next=Q.next,Q.next=A),H.pending=A}}g.lanes|=a,A=g.alternate,A!==null&&(A.lanes|=a),Zu(g.return,a,r),N.lanes|=a;break}A=A.next}}else if(g.tag===10)w=g.type===r.type?null:g.child;else if(g.tag===18){if(w=g.return,w===null)throw Error(s(341));w.lanes|=a,N=w.alternate,N!==null&&(N.lanes|=a),Zu(w,a,r),w=g.sibling}else w=g.child;if(w!==null)w.return=g;else for(w=g;w!==null;){if(w===r){w=null;break}if(g=w.sibling,g!==null){g.return=w.return,w=g;break}w=w.return}g=w}yt(n,r,f.children,a),r=r.child}return r;case 9:return f=r.type,c=r.pendingProps.children,_s(r,a),f=Vt(f),c=c(f),r.flags|=1,yt(n,r,c,a),r.child;case 14:return c=r.type,f=Jt(c,r.pendingProps),f=Jt(c.type,f),dg(n,r,c,f,a);case 15:return fg(n,r,r.type,r.pendingProps,a);case 17:return c=r.type,f=r.pendingProps,f=r.elementType===c?f:Jt(c,f),Fa(n,r),r.tag=1,Tt(c)?(n=!0,va(r)):n=!1,_s(r,a),rg(r,c,f),mc(r,c,f,a),xc(null,r,c,!0,n,a);case 19:return wg(n,r,a);case 22:return hg(n,r,a)}throw Error(s(156,r.tag))};function Hg(n,r){return Cp(n,r)}function lk(n,r,a,c){this.tag=n,this.key=a,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=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ut(n,r,a,c){return new lk(n,r,a,c)}function Vc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function uk(n){if(typeof n=="function")return Vc(n)?1:0;if(n!=null){if(n=n.$$typeof,n===K)return 11;if(n===ge)return 14}return 2}function fr(n,r){var a=n.alternate;return a===null?(a=Ut(n.tag,r,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=r,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&14680064,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,r=n.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a}function qa(n,r,a,c,f,g){var w=2;if(c=n,typeof n=="function")Vc(n)&&(w=1);else if(typeof n=="string")w=5;else e:switch(n){case R:return qr(a.children,f,g,r);case D:w=8,f|=8;break;case B:return n=Ut(12,a,r,f|2),n.elementType=B,n.lanes=g,n;case U:return n=Ut(13,a,r,f),n.elementType=U,n.lanes=g,n;case X:return n=Ut(19,a,r,f),n.elementType=X,n.lanes=g,n;case Ee:return Qa(a,f,g,r);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case W:w=10;break e;case G:w=9;break e;case K:w=11;break e;case ge:w=14;break e;case me:w=16,c=null;break e}throw Error(s(130,n==null?n:typeof n,""))}return r=Ut(w,a,r,f),r.elementType=n,r.type=c,r.lanes=g,r}function qr(n,r,a,c){return n=Ut(7,n,c,r),n.lanes=a,n}function Qa(n,r,a,c){return n=Ut(22,n,c,r),n.elementType=Ee,n.lanes=a,n.stateNode={isHidden:!1},n}function Bc(n,r,a){return n=Ut(6,n,null,r),n.lanes=a,n}function zc(n,r,a){return r=Ut(4,n.children!==null?n.children:[],n.key,r),r.lanes=a,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}function ck(n,r,a,c,f){this.tag=r,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pu(0),this.expirationTimes=pu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pu(0),this.identifierPrefix=c,this.onRecoverableError=f,this.mutableSourceEagerHydrationData=null}function Uc(n,r,a,c,f,g,w,N,A){return n=new ck(n,r,a,N,A),r===1?(r=1,g===!0&&(r|=8)):r=0,g=Ut(3,null,null,r),n.current=g,g.stateNode=n,g.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},tc(g),n}function dk(n,r,a){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:I,key:c==null?null:""+c,children:n,containerInfo:r,implementation:a}}function Kg(n){if(!n)return rr;n=n._reactInternals;e:{if(Ir(n)!==n||n.tag!==1)throw Error(s(170));var r=n;do{switch(r.tag){case 3:r=r.stateNode.context;break e;case 1:if(Tt(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break e}}r=r.return}while(r!==null);throw Error(s(171))}if(n.tag===1){var a=n.type;if(Tt(a))return xm(n,a,r)}return r}function Wg(n,r,a,c,f,g,w,N,A){return n=Uc(a,c,!0,n,f,g,w,N,A),n.context=Kg(null),a=n.current,c=vt(),f=cr(a),g=In(c,f),g.callback=r??null,or(a,g,f),n.current.lanes=f,Mi(n,f,c),bt(n,c),n}function Ga(n,r,a,c){var f=r.current,g=vt(),w=cr(f);return a=Kg(a),r.context===null?r.context=a:r.pendingContext=a,r=In(g,w),r.payload={element:n},c=c===void 0?null:c,c!==null&&(r.callback=c),n=or(f,r,w),n!==null&&(tn(n,f,w,g),Pa(n,f,w)),w}function Ya(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function qg(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<r?a:r}}function $c(n,r){qg(n,r),(n=n.alternate)&&qg(n,r)}function fk(){return null}var Qg=typeof reportError=="function"?reportError:function(n){console.error(n)};function Hc(n){this._internalRoot=n}Xa.prototype.render=Hc.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(s(409));Ga(n,r,null,null)},Xa.prototype.unmount=Hc.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;Hr(function(){Ga(null,n,null,null)}),r[jn]=null}};function Xa(n){this._internalRoot=n}Xa.prototype.unstable_scheduleHydration=function(n){if(n){var r=Mp();n={blockedOn:null,target:n,priority:r};for(var a=0;a<Jn.length&&r!==0&&r<Jn[a].priority;a++);Jn.splice(a,0,n),a===0&&Lp(n)}};function Kc(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function Ja(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function Gg(){}function hk(n,r,a,c,f){if(f){if(typeof c=="function"){var g=c;c=function(){var H=Ya(w);g.call(H)}}var w=Wg(r,c,n,0,null,!1,!1,"",Gg);return n._reactRootContainer=w,n[jn]=w.current,Ki(n.nodeType===8?n.parentNode:n),Hr(),w}for(;f=n.lastChild;)n.removeChild(f);if(typeof c=="function"){var N=c;c=function(){var H=Ya(A);N.call(H)}}var A=Uc(n,0,!1,null,null,!1,!1,"",Gg);return n._reactRootContainer=A,n[jn]=A.current,Ki(n.nodeType===8?n.parentNode:n),Hr(function(){Ga(r,A,a,c)}),A}function Za(n,r,a,c,f){var g=a._reactRootContainer;if(g){var w=g;if(typeof f=="function"){var N=f;f=function(){var A=Ya(w);N.call(A)}}Ga(r,w,n,f)}else w=hk(a,r,n,f,c);return Ya(w)}Rp=function(n){switch(n.tag){case 3:var r=n.stateNode;if(r.current.memoizedState.isDehydrated){var a=ji(r.pendingLanes);a!==0&&(mu(r,a|1),bt(r,We()),(be&6)===0&&(Us=We()+500,sr()))}break;case 13:Hr(function(){var c=Ln(n,1);if(c!==null){var f=vt();tn(c,n,1,f)}}),$c(n,1)}},gu=function(n){if(n.tag===13){var r=Ln(n,134217728);if(r!==null){var a=vt();tn(r,n,134217728,a)}$c(n,134217728)}},jp=function(n){if(n.tag===13){var r=cr(n),a=Ln(n,r);if(a!==null){var c=vt();tn(a,n,r,c)}$c(n,r)}},Mp=function(){return De},Dp=function(n,r){var a=De;try{return De=n,r()}finally{De=a}},lu=function(n,r,a){switch(r){case"input":if(eu(n,a),r=a.name,a.type==="radio"&&r!=null){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<a.length;r++){var c=a[r];if(c!==n&&c.form===n.form){var f=ga(c);if(!f)throw Error(s(90));np(c),eu(c,f)}}}break;case"textarea":ap(n,a);break;case"select":r=a.value,r!=null&&xs(n,!!a.multiple,r,!1)}},gp=Fc,yp=Hr;var pk={usingClientEntryPoint:!1,Events:[Qi,Rs,ga,pp,mp,Fc]},lo={findFiberByHostInstance:Fr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},mk={bundleType:lo.bundleType,version:lo.version,rendererPackageName:lo.rendererPackageName,rendererConfig:lo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=Sp(n),n===null?null:n.stateNode},findFiberByHostInstance:lo.findFiberByHostInstance||fk,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 el=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!el.isDisabled&&el.supportsFiber)try{Xo=el.inject(mk),gn=el}catch{}}return Rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pk,Rt.createPortal=function(n,r){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Kc(r))throw Error(s(200));return dk(n,r,null,a)},Rt.createRoot=function(n,r){if(!Kc(n))throw Error(s(299));var a=!1,c="",f=Qg;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onRecoverableError!==void 0&&(f=r.onRecoverableError)),r=Uc(n,1,!1,null,null,a,!1,c,f),n[jn]=r.current,Ki(n.nodeType===8?n.parentNode:n),new Hc(r)},Rt.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(s(188)):(n=Object.keys(n).join(","),Error(s(268,n)));return n=Sp(r),n=n===null?null:n.stateNode,n},Rt.flushSync=function(n){return Hr(n)},Rt.hydrate=function(n,r,a){if(!Ja(r))throw Error(s(200));return Za(null,n,r,!0,a)},Rt.hydrateRoot=function(n,r,a){if(!Kc(n))throw Error(s(405));var c=a!=null&&a.hydratedSources||null,f=!1,g="",w=Qg;if(a!=null&&(a.unstable_strictMode===!0&&(f=!0),a.identifierPrefix!==void 0&&(g=a.identifierPrefix),a.onRecoverableError!==void 0&&(w=a.onRecoverableError)),r=Wg(r,null,n,1,a??null,f,!1,g,w),n[jn]=r.current,Ki(n),c)for(n=0;n<c.length;n++)a=c[n],f=a._getVersion,f=f(a._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[a,f]:r.mutableSourceEagerHydrationData.push(a,f);return new Xa(r)},Rt.render=function(n,r,a){if(!Ja(r))throw Error(s(200));return Za(null,n,r,!1,a)},Rt.unmountComponentAtNode=function(n){if(!Ja(n))throw Error(s(40));return n._reactRootContainer?(Hr(function(){Za(null,null,n,!1,function(){n._reactRootContainer=null,n[jn]=null})}),!0):!1},Rt.unstable_batchedUpdates=Fc,Rt.unstable_renderSubtreeIntoContainer=function(n,r,a,c){if(!Ja(a))throw Error(s(200));if(n==null||n._reactInternals===void 0)throw Error(s(38));return Za(n,r,a,!1,c)},Rt.version="18.3.1-next-f1338f8080-20240426",Rt}var fy;function fC(){if(fy)return Yc.exports;fy=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Yc.exports=dC(),Yc.exports}var hy;function hC(){if(hy)return rl;hy=1;var e=fC();return rl.createRoot=e.createRoot,rl.hydrateRoot=e.hydrateRoot,rl}var pC=hC();/**
41
- * react-router v7.18.4
42
- *
43
- * Copyright (c) Remix Software Inc.
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE.md file in the root directory of this source tree.
47
- *
48
- * @license MIT
49
- */var qf=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,nx=/^[\\/]{2}/;function mC(e,t){return t+e.replace(/\\/g,"/")}var py="popstate";function my(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function gC(e={}){function t(i,o){var m;let l=(m=o.state)==null?void 0:m.masked,{pathname:u,search:d,hash:h}=l||i.location;return uf("",{pathname:u,search:d,hash:h},o.state&&o.state.usr||null,o.state&&o.state.key||"default",l?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function s(i,o){return typeof o=="string"?o:hs(o)}return vC(t,s,null,e)}function Be(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function qt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function yC(){return Math.random().toString(36).substring(2,10)}function gy(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function uf(e,t,s=null,i,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?gi(t):t,state:s,key:t&&t.key||i||yC(),mask:o}}function hs({pathname:e="/",search:t="",hash:s=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),s&&s!=="#"&&(e+=s.charAt(0)==="#"?s:"#"+s),e}function gi(e){let t={};if(e){let s=e.indexOf("#");s>=0&&(t.hash=e.substring(s),e=e.substring(0,s));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function vC(e,t,s,i={}){let{window:o=document.defaultView,v5Compat:l=!1}=i,u=o.history,d="POP",h=null,m=y();m==null&&(m=0,u.replaceState({...u.state,idx:m},""));function y(){return(u.state||{idx:null}).idx}function v(){d="POP";let T=y(),P=T==null?null:T-m;m=T,h&&h({action:d,location:E.location,delta:P})}function x(T,P){d="PUSH";let L=my(T)?T:uf(E.location,T,P);m=y()+1;let b=gy(L,m),M=E.createHref(L.mask||L);try{u.pushState(b,"",M)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;o.location.assign(M)}l&&h&&h({action:d,location:E.location,delta:1})}function C(T,P){d="REPLACE";let L=my(T)?T:uf(E.location,T,P);m=y();let b=gy(L,m),M=E.createHref(L.mask||L);u.replaceState(b,"",M),l&&h&&h({action:d,location:E.location,delta:0})}function k(T){return xC(o,T)}let E={get action(){return d},get location(){return e(o,u)},listen(T){if(h)throw new Error("A history only accepts one active listener");return o.addEventListener(py,v),h=T,()=>{o.removeEventListener(py,v),h=null}},createHref(T){return t(o,T)},createURL:k,encodeLocation(T){let P=k(T);return{pathname:P.pathname,search:P.search,hash:P.hash}},push:x,replace:C,go(T){return u.go(T)}};return E}function xC(e,t,s=!1){let i="http://localhost";e&&(i=e.location.origin!=="null"?e.location.origin:e.location.href),Be(i,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:hs(t);return o=o.replace(/ $/,"%20"),!s&&nx.test(o)&&(o=i+o),new URL(o,i)}function rx(e,t,s="/"){return wC(e,t,s,!1)}function wC(e,t,s,i,o){let l=typeof t=="string"?gi(t):t,u=Wn(l.pathname||"/",s);if(u==null)return null;let d=SC(e),h=null,m=DC(u);for(let y=0;h==null&&y<d.length;++y)h=MC(d[y],m,i);return h}function SC(e){let t=sx(e);return kC(t),t}function sx(e,t=[],s=[],i="",o=!1){let l=(u,d,h=o,m)=>{let y={relativePath:m===void 0?u.path||"":m,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(i)&&h)return;Be(y.relativePath.startsWith(i),`Absolute route path "${y.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(i.length)}let v=un([i,y.relativePath]),x=s.concat(y);u.children&&u.children.length>0&&(Be(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),sx(u.children,t,x,v,h)),!(u.path==null&&!u.index)&&t.push({path:v,score:RC(v,u.index),routesMeta:x.map((C,k)=>{let[E,T]=ax(C.relativePath,C.caseSensitive,k===x.length-1);return{...C,matcher:E,compiledParams:T}})})};return e.forEach((u,d)=>{var h;if(u.path===""||!((h=u.path)!=null&&h.includes("?")))l(u,d);else for(let m of ix(u.path))l(u,d,!0,m)}),t}function ix(e){let t=e.split("/");if(t.length===0)return[];let[s,...i]=t,o=s.endsWith("?"),l=s.replace(/\?$/,"");if(i.length===0)return o?[l,""]:[l];let u=ix(i.join("/")),d=[];return d.push(...u.map(h=>h===""?l:[l,h].join("/"))),o&&d.push(...u),d.map(h=>e.startsWith("/")&&h===""?"/":h)}function kC(e){e.sort((t,s)=>t.score!==s.score?s.score-t.score:jC(t.routesMeta.map(i=>i.childrenIndex),s.routesMeta.map(i=>i.childrenIndex)))}var CC=/^:[\w-]+$/,EC=3,TC=2,PC=1,NC=10,bC=-2,yy=e=>e==="*";function RC(e,t){let s=e.split("/"),i=s.length;return s.some(yy)&&(i+=bC),t&&(i+=TC),s.filter(o=>!yy(o)).reduce((o,l)=>o+(CC.test(l)?EC:l===""?PC:NC),i)}function jC(e,t){return e.length===t.length&&e.slice(0,-1).every((i,o)=>i===t[o])?e[e.length-1]-t[t.length-1]:0}function MC(e,t,s=!1){let{routesMeta:i}=e,o={},l="/",u=[];for(let d=0;d<i.length;++d){let h=i[d],m=d===i.length-1,y=l==="/"?t:t.slice(l.length)||"/",v={path:h.relativePath,caseSensitive:h.caseSensitive,end:m},x=h.matcher&&h.compiledParams?ox(v,y,h.matcher,h.compiledParams):Pl(v,y),C=h.route;if(!x&&m&&s&&!i[i.length-1].route.index&&(x=Pl({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},y)),!x)return null;Object.assign(o,x.params),u.push({params:o,pathname:un([l,x.pathname]),pathnameBase:IC(un([l,x.pathnameBase])),route:C}),x.pathnameBase!=="/"&&(l=un([l,x.pathnameBase]))}return u}function Pl(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[s,i]=ax(e.path,e.caseSensitive,e.end);return ox(e,t,s,i)}function ox(e,t,s,i){let o=t.match(s);if(!o)return null;let l=o[0],u=di(l,1),d=o.slice(1);return{params:i.reduce((m,{paramName:y,isOptional:v},x)=>{if(y==="*"){let k=d[x]||"";u=di(l.slice(0,l.length-k.length),1)}const C=d[x];return v&&!C?m[y]=void 0:m[y]=(C||"").replace(/%2F/g,"/"),m},{}),pathname:l,pathnameBase:u,pattern:e}}function ax(e,t=!1,s=!0){qt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,d,h,m,y)=>{if(i.push({paramName:d,isOptional:h!=null}),h){let v=y.charAt(m+u.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),i]}function DC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return qt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Wn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,i=e.charAt(s);return i&&i!=="/"?null:e.slice(s)||"/"}function AC(e,t="/"){let{pathname:s,search:i="",hash:o=""}=typeof e=="string"?gi(e):e,l;return s?(s=lx(s),s.startsWith("/")||s.startsWith("\\")?l=vy(s.substring(1),"/"):l=vy(s,t)):l=t,{pathname:l,search:FC(i),hash:_C(o)}}function vy(e,t){let s=di(t).split("/");return e.split("/").forEach(o=>{o===".."?s.length>1&&s.pop():o!=="."&&s.push(o)}),s.length>1?s.join("/"):"/"}function Zc(e,t,s,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` 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 LC(e){return e.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function Qf(e){let t=LC(e);return t.map((s,i)=>i===t.length-1?s.pathname:s.pathnameBase)}function Bl(e,t,s,i=!1){let o;typeof e=="string"?o=gi(e):(o={...e},Be(!o.pathname||!o.pathname.includes("?"),Zc("?","pathname","search",o)),Be(!o.pathname||!o.pathname.includes("#"),Zc("#","pathname","hash",o)),Be(!o.search||!o.search.includes("#"),Zc("#","search","hash",o)));let l=e===""||o.pathname==="",u=l?"/":o.pathname,d;if(u==null)d=s;else{let v=t.length-1;if(!i&&u.startsWith("..")){let x=u.split("/");for(;x[0]==="..";)x.shift(),v-=1;o.pathname=x.join("/")}d=v>=0?t[v]:"/"}let h=AC(o,d),m=u&&u!=="/"&&u.endsWith("/"),y=(l||u===".")&&s.endsWith("/");return!h.pathname.endsWith("/")&&(m||y)&&(h.pathname+="/"),h}var lx=e=>e.replace(/[\\/]{2,}/g,"/"),un=e=>lx(e.join("/"));function di(e,t=0){let s=e.length;for(;s>t&&e.charCodeAt(s-1)===47;)s--;return s===e.length?e:e.slice(0,s)}var IC=e=>di(e).replace(/^\/*/,"/"),FC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_C=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,OC=class{constructor(e,t,s,i=!1){this.status=e,this.statusText=t||"",this.internal=i,s instanceof Error?(this.data=s.toString(),this.error=s):this.data=s}};function VC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function BC(e){let t=e.map(s=>s.route.path).filter(Boolean);return un(t)||"/"}var ux=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function cx(e,t){let s=e;if(typeof s!="string"||!qf.test(s))return{absoluteURL:void 0,isExternal:!1,to:s};let i=s,o=!1;if(ux)try{let l=new URL(window.location.href),u=nx.test(s)?new URL(mC(s,l.protocol)):new URL(s),d=Wn(u.pathname,t);u.origin===l.origin&&d!=null?s=d+u.search+u.hash:o=!0}catch{qt(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:o,to:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var xy=new URL("http://localhost");function Gf(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),xy)}catch{return xy}}function ed(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function zC(e,t){if(e.startsWith("//"))return!0;let s=t.protocol.toLowerCase();return e.toLowerCase().startsWith(s)?t.host===""||e.slice(s.length).startsWith("//"):!1}function Yf(e,t,s,i){let o=null;try{o=e==null?null:new URL(e,s)}catch{}let l=new URL(t,s),u=o!=null&&!ed(o,s),d=!ed(l,s);if(i==="reject"){if(u||d)throw new Error("External navigation is not allowed")}else if(d&&(o==null||!zC(e,o)||!ed(o,l)))throw new Error("External navigation is not allowed")}var dx=["POST","PUT","PATCH","DELETE"];new Set(dx);var UC=["GET",...dx];new Set(UC);var $C=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function HC(e){try{return $C.includes(new URL(e).protocol)}catch{return!1}}var yi=S.createContext(null);yi.displayName="DataRouter";var zl=S.createContext(null);zl.displayName="DataRouterState";var fx=S.createContext(!1);function KC(){return S.useContext(fx)}var hx=S.createContext({isTransitioning:!1});hx.displayName="ViewTransition";var WC=S.createContext(new Map);WC.displayName="Fetchers";var qC=S.createContext(null);qC.displayName="Await";var Ft=S.createContext(null);Ft.displayName="Navigation";var _o=S.createContext(null);_o.displayName="Location";var hn=S.createContext({outlet:null,matches:[],isDataRoute:!1});hn.displayName="Route";var Xf=S.createContext(null);Xf.displayName="RouteError";var px="REACT_ROUTER_ERROR",QC="REDIRECT",GC="ROUTE_ERROR_RESPONSE";function YC(e){if(e.startsWith(`${px}:${QC}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function XC(e){if(e.startsWith(`${px}:${GC}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new OC(t.status,t.statusText,t.data)}catch{}}function JC(e,{relative:t}={}){Be(vi(),"useHref() may be used only in the context of a <Router> component.");let{basename:s,navigator:i}=S.useContext(Ft),{hash:o,pathname:l,search:u}=Oo(e,{relative:t}),d=l;return s!=="/"&&(d=l==="/"?s:un([s,l])),i.createHref({pathname:d,search:u,hash:o})}function vi(){return S.useContext(_o)!=null}function pn(){return Be(vi(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(_o).location}var mx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function gx(e){S.useContext(Ft).static||S.useLayoutEffect(e)}function xi(){let{isDataRoute:e}=S.useContext(hn);return e?hE():ZC()}function ZC(){Be(vi(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(yi),{basename:t,navigator:s}=S.useContext(Ft),{matches:i}=S.useContext(hn),{pathname:o}=pn(),l=JSON.stringify(Qf(i)),u=S.useRef(!1);return gx(()=>{u.current=!0}),S.useCallback((h,m={})=>{if(qt(u.current,mx),!u.current)return;if(typeof h=="number"){s.go(h);return}let y=Bl(h,JSON.parse(l),o,m.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:un([t,y.pathname])),Yf(typeof h=="string"?h:hs(h),s.createHref(y),Gf(s),"reject"),(m.replace?s.replace:s.push)(y,m.state,m)},[t,s,l,o,e])}var eE=S.createContext(null);function tE(e){let t=S.useContext(hn).outlet;return S.useMemo(()=>t&&S.createElement(eE.Provider,{value:e},t),[t,e])}function Oo(e,{relative:t}={}){let{matches:s}=S.useContext(hn),{pathname:i}=pn(),o=JSON.stringify(Qf(s));return S.useMemo(()=>Bl(e,JSON.parse(o),i,t==="path"),[e,o,i,t])}function nE(e,t){return yx(e,t)}function yx(e,t,s){var T;Be(vi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=S.useContext(Ft),{matches:o}=S.useContext(hn),l=o[o.length-1],u=l?l.params:{},d=l?l.pathname:"/",h=l?l.pathnameBase:"/",m=l&&l.route;{let P=m&&m.path||"";xx(d,!m||P.endsWith("*")||P.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${P}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
50
-
51
- Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let y=pn(),v;if(t){let P=typeof t=="string"?gi(t):t;Be(h==="/"||((T=P.pathname)==null?void 0:T.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${P.pathname}" was given in the \`location\` prop.`),v=P}else v=y;let x=v.pathname||"/",C=x;if(h!=="/"){let P=h.replace(/^\//,"").split("/");C="/"+x.replace(/^\//,"").split("/").slice(P.length).join("/")}let k=s&&s.state.matches.length?s.state.matches.map(P=>Object.assign(P,{route:s.manifest[P.route.id]||P.route})):rx(e,{pathname:C});qt(m||k!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),qt(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=aE(k&&k.map(P=>Object.assign({},P,{params:Object.assign({},u,P.params),pathname:un([h,i.encodeLocation?i.encodeLocation(P.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?h:un([h,i.encodeLocation?i.encodeLocation(P.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathnameBase])})),o,s);return t&&E?S.createElement(_o.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...v},navigationType:"POP"}},E):E}function rE(){let e=fE(),t=VC(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),s=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},l={padding:"2px 4px",backgroundColor:i},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:l},"ErrorBoundary")," or"," ",S.createElement("code",{style:l},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),s?S.createElement("pre",{style:o},s):null,u)}var sE=S.createElement(rE,null),vx=class extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const s=XC(e.digest);s&&(e=s)}let t=e!==void 0?S.createElement(hn.Provider,{value:this.props.routeContext},S.createElement(Xf.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?S.createElement(iE,{error:e},t):t}};vx.contextType=fx;var td=new WeakMap;function iE({children:e,error:t}){let{basename:s,navigator:i}=S.useContext(Ft);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=YC(t.digest);if(o){let l=td.get(t);if(l)throw l;let u=cx(o.location,s),d=u.absoluteURL||u.to;if(Yf(o.location,d,Gf(i),"allow-explicit"),HC(d))throw new Error("Invalid redirect location");if(ux&&!td.get(t))if(u.isExternal||o.reloadDocument)window.location.href=d;else{const h=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:o.replace}));throw td.set(t,h),h}return S.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d}`})}}return e}function oE({routeContext:e,match:t,children:s}){let i=S.useContext(yi);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(hn.Provider,{value:e},s)}function aE(e,t=[],s){let i=s==null?void 0:s.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(t.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let o=e,l=i==null?void 0:i.errors;if(l!=null){let y=o.findIndex(v=>v.route.id&&(l==null?void 0:l[v.route.id])!==void 0);Be(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,y+1))}let u=!1,d=-1;if(s&&i){u=i.renderFallback;for(let y=0;y<o.length;y++){let v=o[y];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(d=y),v.route.id){let{loaderData:x,errors:C}=i,k=v.route.loader&&!x.hasOwnProperty(v.route.id)&&(!C||C[v.route.id]===void 0);if(v.route.lazy||k){s.isStatic&&(u=!0),d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}}let h=s==null?void 0:s.onError,m=i&&h?(y,v)=>{var x,C;h(y,{location:i.location,params:((C=(x=i.matches)==null?void 0:x[0])==null?void 0:C.params)??{},pattern:BC(i.matches),errorInfo:v})}:void 0;return o.reduceRight((y,v,x)=>{let C,k=!1,E=null,T=null;i&&(C=l&&v.route.id?l[v.route.id]:void 0,E=v.route.errorElement||sE,u&&(d<0&&x===0?(xx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,T=null):d===x&&(k=!0,T=v.route.hydrateFallbackElement||null)));let P=t.concat(o.slice(0,x+1)),L=()=>{let b;return C?b=E:k?b=T:v.route.Component?b=S.createElement(v.route.Component,null):v.route.element?b=v.route.element:b=y,S.createElement(oE,{match:v,routeContext:{outlet:y,matches:P,isDataRoute:i!=null},children:b})};return i&&(v.route.ErrorBoundary||v.route.errorElement||x===0)?S.createElement(vx,{location:i.location,revalidation:i.revalidation,component:E,error:C,children:L(),routeContext:{outlet:null,matches:P,isDataRoute:!0},onError:m}):L()},null)}function Jf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lE(e){let t=S.useContext(yi);return Be(t,Jf(e)),t}function uE(e){let t=S.useContext(zl);return Be(t,Jf(e)),t}function cE(e){let t=S.useContext(hn);return Be(t,Jf(e)),t}function Zf(e){let t=cE(e),s=t.matches[t.matches.length-1];return Be(s.route.id,`${e} can only be used on routes that contain a unique "id"`),s.route.id}function dE(){return Zf("useRouteId")}function fE(){var i;let e=S.useContext(Xf),t=uE("useRouteError"),s=Zf("useRouteError");return e!==void 0?e:(i=t.errors)==null?void 0:i[s]}function hE(){let{router:e}=lE("useNavigate"),t=Zf("useNavigate"),s=S.useRef(!1);return gx(()=>{s.current=!0}),S.useCallback(async(o,l={})=>{qt(s.current,mx),s.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...l}))},[e,t])}var wy={};function xx(e,t,s){!t&&!wy[e]&&(wy[e]=!0,qt(!1,s))}S.memo(pE);function pE({routes:e,manifest:t,future:s,state:i,isStatic:o,onError:l}){return yx(e,void 0,{manifest:t,state:i,isStatic:o,onError:l})}function eh({to:e,replace:t,state:s,relative:i}){Be(vi(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o,navigator:l}=S.useContext(Ft);qt(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=S.useContext(hn),{pathname:d}=pn(),h=xi(),m=Bl(e,Qf(u),d,i==="path");Yf(typeof e=="string"?e:hs(e),l.createHref(m),Gf(l),"reject");let y=JSON.stringify(m);return S.useEffect(()=>{h(JSON.parse(y),{replace:t,state:s,relative:i})},[h,y,i,t,s]),null}function mE(e){return tE(e.context)}function Vn(e){Be(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function gE({basename:e="/",children:t=null,location:s,navigationType:i="POP",navigator:o,static:l=!1,useTransitions:u}){Be(!vi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),h=S.useMemo(()=>({basename:d,navigator:o,static:l,useTransitions:u,future:{}}),[d,o,l,u]);typeof s=="string"&&(s=gi(s));let{pathname:m="/",search:y="",hash:v="",state:x=null,key:C="default",mask:k}=s,E=S.useMemo(()=>{let T=Wn(m,d);return T==null?null:{location:{pathname:T,search:y,hash:v,state:x,key:C,mask:k},navigationType:i}},[d,m,y,v,x,C,i,k]);return qt(E!=null,`<Router basename="${d}"> is not able to match the URL "${m}${y}${v}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:S.createElement(Ft.Provider,{value:h},S.createElement(_o.Provider,{children:t,value:E}))}function yE({children:e,location:t}){return nE(cf(e),t)}function cf(e,t=[]){let s=[];return S.Children.forEach(e,(i,o)=>{if(!S.isValidElement(i))return;let l=[...t,o];if(i.type===S.Fragment){s.push.apply(s,cf(i.props.children,l));return}Be(i.type===Vn,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Be(!i.props.index||!i.props.children,"An index route cannot have child routes.");let u={id:i.props.id||l.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(u.children=cf(i.props.children,l)),s.push(u)}),s}var ml="get",gl="application/x-www-form-urlencoded";function Ul(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function vE(e){return Ul(e)&&e.tagName.toLowerCase()==="button"}function xE(e){return Ul(e)&&e.tagName.toLowerCase()==="form"}function wE(e){return Ul(e)&&e.tagName.toLowerCase()==="input"}function SE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function kE(e,t){return e.button===0&&(!t||t==="_self")&&!SE(e)}function df(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,s)=>{let i=e[s];return t.concat(Array.isArray(i)?i.map(o=>[s,o]):[[s,i]])},[]))}function CE(e,t){let s=df(e);return t&&t.forEach((i,o)=>{s.has(o)||t.getAll(o).forEach(l=>{s.append(o,l)})}),s}var sl=null;function EE(){if(sl===null)try{new FormData(document.createElement("form"),0),sl=!1}catch{sl=!0}return sl}var TE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function nd(e){return e!=null&&!TE.has(e)?(qt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${gl}"`),null):e}function PE(e,t){let s,i,o,l,u;if(xE(e)){let d=e.getAttribute("action");i=d?Wn(d,t):null,s=e.getAttribute("method")||ml,o=nd(e.getAttribute("enctype"))||gl,l=new FormData(e)}else if(vE(e)||wE(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||d.getAttribute("action");if(i=h?Wn(h,t):null,s=e.getAttribute("formmethod")||d.getAttribute("method")||ml,o=nd(e.getAttribute("formenctype"))||nd(d.getAttribute("enctype"))||gl,l=new FormData(d,e),!EE()){let{name:m,type:y,value:v}=e;if(y==="image"){let x=m?`${m}.`:"";l.append(`${x}x`,"0"),l.append(`${x}y`,"0")}else m&&l.append(m,v)}}else{if(Ul(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');s=ml,i=null,o=gl,u=e}return l&&o==="text/plain"&&(u=l,l=void 0),{action:i,method:s.toLowerCase(),encType:o,formData:l,body:u}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function th(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wx(e,t,s,i){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return s?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${i}`:o.pathname=`${o.pathname}.${i}`:o.pathname==="/"?o.pathname=`_root.${i}`:t&&Wn(o.pathname,t)==="/"?o.pathname=`${di(t)}/_root.${i}`:o.pathname=`${di(o.pathname)}.${i}`,o}async function NE(e,t){if(e.id in t)return t[e.id];try{let s=await import(e.module);return t[e.id]=s,s}catch(s){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(s),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function bE(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function RE(e,t,s){let i=await Promise.all(e.map(async o=>{let l=t.routes[o.route.id];if(l){let u=await NE(l,s);return u.links?u.links():[]}return[]}));return AE(i.flat(1).filter(bE).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Sy(e,t,s,i,o,l){let u=(h,m)=>s[m]?h.route.id!==s[m].route.id:!0,d=(h,m)=>{var y;return s[m].pathname!==h.pathname||((y=s[m].route.path)==null?void 0:y.endsWith("*"))&&s[m].params["*"]!==h.params["*"]};return l==="assets"?t.filter((h,m)=>u(h,m)||d(h,m)):l==="data"?t.filter((h,m)=>{var v;let y=i.routes[h.route.id];if(!y||!y.hasLoader)return!1;if(u(h,m)||d(h,m))return!0;if(h.route.shouldRevalidate){let x=h.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((v=s[0])==null?void 0:v.params)||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function jE(e,t,{includeHydrateFallback:s}={}){return ME(e.map(i=>{let o=t.routes[i.route.id];if(!o)return[];let l=[o.module];return o.clientActionModule&&(l=l.concat(o.clientActionModule)),o.clientLoaderModule&&(l=l.concat(o.clientLoaderModule)),s&&o.hydrateFallbackModule&&(l=l.concat(o.hydrateFallbackModule)),o.imports&&(l=l.concat(o.imports)),l}).flat(1))}function ME(e){return[...new Set(e)]}function DE(e){let t={},s=Object.keys(e).sort();for(let i of s)t[i]=e[i];return t}function AE(e,t){let s=new Set;return new Set(t),e.reduce((i,o)=>{let l=JSON.stringify(DE(o));return s.has(l)||(s.add(l),i.push({key:l,link:o})),i},[])}function nh(){let e=S.useContext(yi);return th(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function LE(){let e=S.useContext(zl);return th(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var rh=S.createContext(void 0);rh.displayName="FrameworkContext";function $l(){let e=S.useContext(rh);return th(e,"You must render this element inside a <HydratedRouter> element"),e}function IE(e,t){let s=S.useContext(rh),[i,o]=S.useState(!1),[l,u]=S.useState(!1),{onFocus:d,onBlur:h,onMouseEnter:m,onMouseLeave:y,onTouchStart:v}=t,x=S.useRef(null);S.useEffect(()=>{if(e==="render"&&u(!0),e==="viewport"){let E=P=>{P.forEach(L=>{u(L.isIntersecting)})},T=new IntersectionObserver(E,{threshold:.5});return x.current&&T.observe(x.current),()=>{T.disconnect()}}},[e]),S.useEffect(()=>{if(i){let E=setTimeout(()=>{u(!0)},100);return()=>{clearTimeout(E)}}},[i]);let C=()=>{o(!0)},k=()=>{o(!1),u(!1)};return s?e!=="intent"?[l,x,{}]:[l,x,{onFocus:co(d,C),onBlur:co(h,k),onMouseEnter:co(m,C),onMouseLeave:co(y,k),onTouchStart:co(v,C)}]:[!1,x,{}]}function co(e,t){return s=>{e&&e(s),s.defaultPrevented||t(s)}}function FE({page:e,...t}){let s=KC(),{nonce:i}=$l(),{router:o}=nh(),l=S.useMemo(()=>rx(o.routes,e,o.basename),[o.routes,e,o.basename]);return l?(t.nonce==null&&i&&(t={...t,nonce:i}),s?S.createElement(OE,{page:e,matches:l,...t}):S.createElement(VE,{page:e,matches:l,...t})):null}function _E(e){let{manifest:t,routeModules:s}=$l(),[i,o]=S.useState([]);return S.useEffect(()=>{let l=!1;return RE(e,t,s).then(u=>{l||o(u)}),()=>{l=!0}},[e,t,s]),i}function OE({page:e,matches:t,...s}){let i=pn(),{future:o}=$l(),{basename:l}=nh(),u=S.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let d=wx(e,l,o.v8_trailingSlashAwareDataRequests,"rsc"),h=!1,m=[];for(let y of t)typeof y.route.shouldRevalidate=="function"?h=!0:m.push(y.route.id);return h&&m.length>0&&d.searchParams.set("_routes",m.join(",")),[d.pathname+d.search]},[l,o.v8_trailingSlashAwareDataRequests,e,i,t]);return S.createElement(S.Fragment,null,u.map(d=>S.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...s})))}function VE({page:e,matches:t,...s}){let i=pn(),{future:o,manifest:l,routeModules:u}=$l(),{basename:d}=nh(),{loaderData:h,matches:m}=LE(),y=S.useMemo(()=>Sy(e,t,m,l,i,"data"),[e,t,m,l,i]),v=S.useMemo(()=>Sy(e,t,m,l,i,"assets"),[e,t,m,l,i]),x=S.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let E=new Set,T=!1;if(t.forEach(L=>{var M;let b=l.routes[L.route.id];!b||!b.hasLoader||(!y.some(_=>_.route.id===L.route.id)&&L.route.id in h&&((M=u[L.route.id])!=null&&M.shouldRevalidate)||b.hasClientLoader?T=!0:E.add(L.route.id))}),E.size===0)return[];let P=wx(e,d,o.v8_trailingSlashAwareDataRequests,"data");return T&&E.size>0&&P.searchParams.set("_routes",t.filter(L=>E.has(L.route.id)).map(L=>L.route.id).join(",")),[P.pathname+P.search]},[d,o.v8_trailingSlashAwareDataRequests,h,i,l,y,t,e,u]),C=S.useMemo(()=>jE(v,l),[v,l]),k=_E(v);return S.createElement(S.Fragment,null,x.map(E=>S.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...s})),C.map(E=>S.createElement("link",{key:E,rel:"modulepreload",href:E,...s})),k.map(({key:E,link:T})=>S.createElement("link",{key:E,nonce:s.nonce,...T,crossOrigin:T.crossOrigin??s.crossOrigin})))}function BE(...e){return t=>{e.forEach(s=>{typeof s=="function"?s(t):s!=null&&(s.current=t)})}}var zE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{zE&&(window.__reactRouterVersion="7.18.4")}catch{}function UE({basename:e,children:t,useTransitions:s,window:i}){let o=S.useRef();o.current==null&&(o.current=gC({window:i,v5Compat:!0}));let l=o.current,[u,d]=S.useState({action:l.action,location:l.location}),h=S.useCallback(m=>{s===!1?d(m):S.startTransition(()=>d(m))},[s]);return S.useLayoutEffect(()=>l.listen(h),[l,h]),S.createElement(gE,{basename:e,children:t,location:u.location,navigationType:u.action,navigator:l,useTransitions:s})}var Sx=S.forwardRef(function({onClick:t,discover:s="render",prefetch:i="none",relative:o,reloadDocument:l,replace:u,mask:d,state:h,target:m,to:y,preventScrollReset:v,viewTransition:x,defaultShouldRevalidate:C,...k},E){let{basename:T,navigator:P,useTransitions:L}=S.useContext(Ft),b=typeof y=="string"&&qf.test(y),M=cx(y,T);y=M.to;let _=JC(y,{relative:o}),I=pn(),R=null;if(d){let ge=Bl(d,[],I.mask?I.mask.pathname:"/",!0);T!=="/"&&(ge.pathname=ge.pathname==="/"?T:un([T,ge.pathname])),R=P.createHref(ge)}let[D,B,W]=IE(i,k),G=KE(y,{replace:u,mask:d,state:h,target:m,preventScrollReset:v,relative:o,viewTransition:x,defaultShouldRevalidate:C,useTransitions:L});function K(ge){t&&t(ge),ge.defaultPrevented||G(ge)}let U=!(M.isExternal||l),X=S.createElement("a",{...k,...W,href:(U?R:void 0)||M.absoluteURL||_,onClick:U?K:t,ref:BE(E,B),target:m,"data-discover":!b&&s==="render"?"true":void 0});return D&&!b?S.createElement(S.Fragment,null,X,S.createElement(FE,{page:_})):X});Sx.displayName="Link";var kx=S.forwardRef(function({"aria-current":t="page",caseSensitive:s=!1,className:i="",end:o=!1,style:l,to:u,viewTransition:d,children:h,...m},y){let v=Oo(u,{relative:m.relative}),x=pn(),C=S.useContext(zl),{navigator:k,basename:E}=S.useContext(Ft),T=C!=null&&XE(v)&&d===!0,P=k.encodeLocation?k.encodeLocation(v).pathname:v.pathname,L=x.pathname,b=C&&C.navigation&&C.navigation.location?C.navigation.location.pathname:null;s||(L=L.toLowerCase(),b=b?b.toLowerCase():null,P=P.toLowerCase()),b&&E&&(b=Wn(b,E)||b);const M=P!=="/"&&P.endsWith("/")?P.length-1:P.length;let _=L===P||!o&&L.startsWith(P)&&L.charAt(M)==="/",I=b!=null&&(b===P||!o&&b.startsWith(P)&&b.charAt(P.length)==="/"),R={isActive:_,isPending:I,isTransitioning:T},D=_?t:void 0,B;typeof i=="function"?B=i(R):B=[i,_?"active":null,I?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let W=typeof l=="function"?l(R):l;return S.createElement(Sx,{...m,"aria-current":D,className:B,ref:y,style:W,to:u,viewTransition:d},typeof h=="function"?h(R):h)});kx.displayName="NavLink";var $E=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:s,reloadDocument:i,replace:o,state:l,method:u=ml,action:d,onSubmit:h,relative:m,preventScrollReset:y,viewTransition:v,defaultShouldRevalidate:x,...C},k)=>{let{useTransitions:E}=S.useContext(Ft),T=GE(),P=YE(d,{relative:m}),L=u.toLowerCase()==="get"?"get":"post",b=typeof d=="string"&&qf.test(d),M=_=>{if(h&&h(_),_.defaultPrevented)return;_.preventDefault();let I=_.nativeEvent.submitter,R=(I==null?void 0:I.getAttribute("formmethod"))||u,D=()=>T(I||_.currentTarget,{fetcherKey:t,method:R,navigate:s,replace:o,state:l,relative:m,preventScrollReset:y,viewTransition:v,defaultShouldRevalidate:x});E&&s!==!1?S.startTransition(()=>D()):D()};return S.createElement("form",{ref:k,method:L,action:P,onSubmit:i?h:M,...C,"data-discover":!b&&e==="render"?"true":void 0})});$E.displayName="Form";function HE(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Cx(e){let t=S.useContext(yi);return Be(t,HE(e)),t}function KE(e,{target:t,replace:s,mask:i,state:o,preventScrollReset:l,relative:u,viewTransition:d,defaultShouldRevalidate:h,useTransitions:m}={}){let y=xi(),v=pn(),x=Oo(e,{relative:u});return S.useCallback(C=>{if(kE(C,t)){C.preventDefault();let k=s!==void 0?s:hs(v)===hs(x),E=()=>y(e,{replace:k,mask:i,state:o,preventScrollReset:l,relative:u,viewTransition:d,defaultShouldRevalidate:h});m?S.startTransition(()=>E()):E()}},[v,y,x,s,i,o,t,e,l,u,d,h,m])}function WE(e){qt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=S.useRef(df(e)),s=S.useRef(!1),i=pn(),o=S.useMemo(()=>CE(i.search,s.current?null:t.current),[i.search]),l=xi(),u=S.useCallback((d,h)=>{const m=df(typeof d=="function"?d(new URLSearchParams(o)):d);s.current=!0,l("?"+m,h)},[l,o]);return[o,u]}var qE=0,QE=()=>`__${String(++qE)}__`;function GE(){let{router:e}=Cx("useSubmit"),{basename:t}=S.useContext(Ft),s=dE(),i=e.fetch,o=e.navigate;return S.useCallback(async(l,u={})=>{let{action:d,method:h,encType:m,formData:y,body:v}=PE(l,t);if(u.navigate===!1){let x=u.fetcherKey||QE();await i(x,s,u.action||d,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:v,formMethod:u.method||h,formEncType:u.encType||m,flushSync:u.flushSync})}else await o(u.action||d,{defaultShouldRevalidate:u.defaultShouldRevalidate,preventScrollReset:u.preventScrollReset,formData:y,body:v,formMethod:u.method||h,formEncType:u.encType||m,replace:u.replace,state:u.state,fromRouteId:s,flushSync:u.flushSync,viewTransition:u.viewTransition})},[i,o,t,s])}function YE(e,{relative:t}={}){let{basename:s}=S.useContext(Ft),i=S.useContext(hn);Be(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),l={...Oo(e||".",{relative:t})},u=pn();if(e==null){l.search=u.search;let d=new URLSearchParams(l.search),h=d.getAll("index");if(h.some(y=>y==="")){d.delete("index"),h.filter(v=>v).forEach(v=>d.append("index",v));let y=d.toString();l.search=y?`?${y}`:""}}return(!e||e===".")&&o.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),s!=="/"&&(l.pathname=l.pathname==="/"?s:un([s,l.pathname])),hs(l)}function XE(e,{relative:t}={}){let s=S.useContext(hx);Be(s!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Cx("useViewTransitionState"),o=Oo(e,{relative:t});if(!s.isTransitioning)return!1;let l=Wn(s.currentLocation.pathname,i)||s.currentLocation.pathname,u=Wn(s.nextLocation.pathname,i)||s.nextLocation.pathname;return Pl(o.pathname,u)!=null||Pl(o.pathname,l)!=null}/**
52
- * @license lucide-react v1.52.0 - ISC
53
- *
54
- * This source code is licensed under the ISC license.
55
- * See the LICENSE file in the root directory of this source tree.
56
- */const JE=e=>e==null?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
57
- * @license lucide-react v1.52.0 - ISC
58
- *
59
- * This source code is licensed under the ISC license.
60
- * See the LICENSE file in the root directory of this source tree.
61
- */function ZE(e,t,s=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:JE(e),size:24,node:t,...s.length>0?{aliases:s}:{}}}/**
62
- * @license lucide-react v1.52.0 - ISC
63
- *
64
- * This source code is licensed under the ISC license.
65
- * See the LICENSE file in the root directory of this source tree.
66
- */const eT=e=>{let t="",s=!1;for(const i of e){if(i==="-"||i==="_"||i<=" "){s=t.length>0;continue}t.length===0?t+=i.toLowerCase():t+=s?i.toUpperCase():i,s=!1}return t};/**
67
- * @license lucide-react v1.52.0 - ISC
68
- *
69
- * This source code is licensed under the ISC license.
70
- * See the LICENSE file in the root directory of this source tree.
71
- */const tT=e=>{const t=eT(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
72
- * @license lucide-react v1.52.0 - ISC
73
- *
74
- * This source code is licensed under the ISC license.
75
- * See the LICENSE file in the root directory of this source tree.
76
- */const ff=(...e)=>e.filter((t,s,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===s).join(" ").trim();/**
77
- * @license lucide-react v1.52.0 - ISC
78
- *
79
- * This source code is licensed under the ISC license.
80
- * See the LICENSE file in the root directory of this source tree.
81
- */const Qr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
82
- * @license lucide-react v1.52.0 - ISC
83
- *
84
- * This source code is licensed under the ISC license.
85
- * See the LICENSE file in the root directory of this source tree.
86
- */function rd(e){return e!=null}function nT(e,t={}){var x,C;const s=t.attributeNames??{},i=k=>s[k]??k,o=e.size??e.width??Qr.width,l=e.size??e.height??Qr.height,u=((x=e.aliases)==null?void 0:x.filter(k=>typeof k=="string"&&k.trim()!=="").map(k=>`lucide-${k}`))??[],d=[...e.name?[`lucide-${e.name}`]:[],...u],h=((C=t.className)==null?void 0:C.split(" ").filter(Boolean))??[],m=t.includeDefaultClasses===!1?ff(...h):ff("lucide",...d,...h),y=t.absoluteStrokeWidth?Number(t.strokeWidth??Qr["stroke-width"])*Number(e.size??e.width??Qr.width)/Number(t.size??t.width??Qr.width):t.strokeWidth??Qr["stroke-width"];return["svg",{...Object.entries(Qr).reduce((k,[E,T])=>(k[i(E)]=T,k),{}),..."color"in t&&t.color&&{[i("stroke")]:t.color},..."size"in t&&rd(t.size)&&{[i("width")]:t.size,[i("height")]:t.size},..."width"in t&&rd(t.width)&&{[i("width")]:t.width},..."height"in t&&rd(t.height)&&{[i("height")]:t.height},[i("stroke-width")]:y,...m&&{[i("class")]:m},[i("viewBox")]:`0 0 ${o} ${l}`,...t.hasA11yProp===!1?{[i("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(k=>{const[E,T,P]=k,L=t.nonScalingStroke?{[i("vector-effect")]:"non-scaling-stroke",...T}:T;return P?[E,L,P]:[E,L]})]}/**
87
- * @license lucide-react v1.52.0 - ISC
88
- *
89
- * This source code is licensed under the ISC license.
90
- * See the LICENSE file in the root directory of this source tree.
91
- */function rT(e,t={}){return nT(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
92
- * @license lucide-react v1.52.0 - ISC
93
- *
94
- * This source code is licensed under the ISC license.
95
- * See the LICENSE file in the root directory of this source tree.
96
- */const sT=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},iT=S.createContext({}),oT=()=>S.useContext(iT),aT=S.forwardRef(({color:e,size:t,width:s,height:i,strokeWidth:o,absoluteStrokeWidth:l,nonScalingStroke:u,className:d="",children:h,iconNode:m=[],icon:y={node:m,aliases:[],size:24},...v},x)=>{const{size:C=24,strokeWidth:k=2,absoluteStrokeWidth:E=!1,nonScalingStroke:T=!1,color:P="currentColor",className:L=""}=oT()??{},b=!!h||sT(v),[M,_,I=[]]=rT(y,{color:e??P,width:s??t??C,height:i??t??C,strokeWidth:o??k,absoluteStrokeWidth:l??E,nonScalingStroke:u??T,className:ff(L,d),hasA11yProp:b,attributes:v});return S.createElement(M,{ref:x,..._},[...I.map(([R,D])=>S.createElement(R,D)),...Array.isArray(h)?h:[h]])});/**
97
- * @license lucide-react v1.52.0 - ISC
98
- *
99
- * This source code is licensed under the ISC license.
100
- * See the LICENSE file in the root directory of this source tree.
101
- */function pe(e,t=[],s=[]){const i=typeof e=="string"?ZE(e,t,s):e,o=S.forwardRef(({className:l,...u},d)=>S.createElement(aT,{ref:d,icon:i,className:l,...u}));return i.name&&(o.displayName=tT(i.name)),o}/**
102
- * @license lucide-react v1.52.0 - ISC
103
- *
104
- * This source code is licensed under the ISC license.
105
- * See the LICENSE file in the root directory of this source tree.
106
- */const Ex={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"}]]};Ex.node;const lT=pe(Ex);/**
107
- * @license lucide-react v1.52.0 - ISC
108
- *
109
- * This source code is licensed under the ISC license.
110
- * See the LICENSE file in the root directory of this source tree.
111
- */const Tx={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};Tx.node;const ky=pe(Tx);/**
112
- * @license lucide-react v1.52.0 - ISC
113
- *
114
- * This source code is licensed under the ISC license.
115
- * See the LICENSE file in the root directory of this source tree.
116
- */const Px={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"}]]};Px.node;const uT=pe(Px);/**
117
- * @license lucide-react v1.52.0 - ISC
118
- *
119
- * This source code is licensed under the ISC license.
120
- * See the LICENSE file in the root directory of this source tree.
121
- */const Nx={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};Nx.node;const Cy=pe(Nx);/**
122
- * @license lucide-react v1.52.0 - ISC
123
- *
124
- * This source code is licensed under the ISC license.
125
- * See the LICENSE file in the root directory of this source tree.
126
- */const bx={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"}]]};bx.node;const cT=pe(bx);/**
127
- * @license lucide-react v1.52.0 - ISC
128
- *
129
- * This source code is licensed under the ISC license.
130
- * See the LICENSE file in the root directory of this source tree.
131
- */const Rx={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};Rx.node;const sh=pe(Rx);/**
132
- * @license lucide-react v1.52.0 - ISC
133
- *
134
- * This source code is licensed under the ISC license.
135
- * See the LICENSE file in the root directory of this source tree.
136
- */const jx={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};jx.node;const dT=pe(jx);/**
137
- * @license lucide-react v1.52.0 - ISC
138
- *
139
- * This source code is licensed under the ISC license.
140
- * See the LICENSE file in the root directory of this source tree.
141
- */const Mx={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};Mx.node;const fT=pe(Mx);/**
142
- * @license lucide-react v1.52.0 - ISC
143
- *
144
- * This source code is licensed under the ISC license.
145
- * See the LICENSE file in the root directory of this source tree.
146
- */const Dx={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"]};Dx.node;const hT=pe(Dx);/**
147
- * @license lucide-react v1.52.0 - ISC
148
- *
149
- * This source code is licensed under the ISC license.
150
- * See the LICENSE file in the root directory of this source tree.
151
- */const Ax={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"]};Ax.node;const pT=pe(Ax);/**
152
- * @license lucide-react v1.52.0 - ISC
153
- *
154
- * This source code is licensed under the ISC license.
155
- * See the LICENSE file in the root directory of this source tree.
156
- */const Lx={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};Lx.node;const Ix=pe(Lx);/**
157
- * @license lucide-react v1.52.0 - ISC
158
- *
159
- * This source code is licensed under the ISC license.
160
- * See the LICENSE file in the root directory of this source tree.
161
- */const Fx={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"]};Fx.node;const mT=pe(Fx);/**
162
- * @license lucide-react v1.52.0 - ISC
163
- *
164
- * This source code is licensed under the ISC license.
165
- * See the LICENSE file in the root directory of this source tree.
166
- */const _x={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"}]]};_x.node;const Ox=pe(_x);/**
167
- * @license lucide-react v1.52.0 - ISC
168
- *
169
- * This source code is licensed under the ISC license.
170
- * See the LICENSE file in the root directory of this source tree.
171
- */const Vx={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"}]]};Vx.node;const ih=pe(Vx);/**
172
- * @license lucide-react v1.52.0 - ISC
173
- *
174
- * This source code is licensed under the ISC license.
175
- * See the LICENSE file in the root directory of this source tree.
176
- */const Bx={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"]};Bx.node;const gT=pe(Bx);/**
177
- * @license lucide-react v1.52.0 - ISC
178
- *
179
- * This source code is licensed under the ISC license.
180
- * See the LICENSE file in the root directory of this source tree.
181
- */const zx={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"}]]};zx.node;const yT=pe(zx);/**
182
- * @license lucide-react v1.52.0 - ISC
183
- *
184
- * This source code is licensed under the ISC license.
185
- * See the LICENSE file in the root directory of this source tree.
186
- */const Ux={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"}]]};Ux.node;const Ey=pe(Ux);/**
187
- * @license lucide-react v1.52.0 - ISC
188
- *
189
- * This source code is licensed under the ISC license.
190
- * See the LICENSE file in the root directory of this source tree.
191
- */const $x={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"}]]};$x.node;const sd=pe($x);/**
192
- * @license lucide-react v1.52.0 - ISC
193
- *
194
- * This source code is licensed under the ISC license.
195
- * See the LICENSE file in the root directory of this source tree.
196
- */const Hx={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"}]]};Hx.node;const vT=pe(Hx);/**
197
- * @license lucide-react v1.52.0 - ISC
198
- *
199
- * This source code is licensed under the ISC license.
200
- * See the LICENSE file in the root directory of this source tree.
201
- */const Kx={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"}]]};Kx.node;const xT=pe(Kx);/**
202
- * @license lucide-react v1.52.0 - ISC
203
- *
204
- * This source code is licensed under the ISC license.
205
- * See the LICENSE file in the root directory of this source tree.
206
- */const Wx={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"}]]};Wx.node;const hf=pe(Wx);/**
207
- * @license lucide-react v1.52.0 - ISC
208
- *
209
- * This source code is licensed under the ISC license.
210
- * See the LICENSE file in the root directory of this source tree.
211
- */const qx={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"}]]};qx.node;const wT=pe(qx);/**
212
- * @license lucide-react v1.52.0 - ISC
213
- *
214
- * This source code is licensed under the ISC license.
215
- * See the LICENSE file in the root directory of this source tree.
216
- */const Qx={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"}]]};Qx.node;const Gx=pe(Qx);/**
217
- * @license lucide-react v1.52.0 - ISC
218
- *
219
- * This source code is licensed under the ISC license.
220
- * See the LICENSE file in the root directory of this source tree.
221
- */const Yx={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"}]]};Yx.node;const wi=pe(Yx);/**
222
- * @license lucide-react v1.52.0 - ISC
223
- *
224
- * This source code is licensed under the ISC license.
225
- * See the LICENSE file in the root directory of this source tree.
226
- */const Xx={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"}]]};Xx.node;const ko=pe(Xx);/**
227
- * @license lucide-react v1.52.0 - ISC
228
- *
229
- * This source code is licensed under the ISC license.
230
- * See the LICENSE file in the root directory of this source tree.
231
- */const Jx={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"}]]};Jx.node;const ST=pe(Jx);/**
232
- * @license lucide-react v1.52.0 - ISC
233
- *
234
- * This source code is licensed under the ISC license.
235
- * See the LICENSE file in the root directory of this source tree.
236
- */const Zx={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"}]]};Zx.node;const kT=pe(Zx);/**
237
- * @license lucide-react v1.52.0 - ISC
238
- *
239
- * This source code is licensed under the ISC license.
240
- * See the LICENSE file in the root directory of this source tree.
241
- */const e1={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"}]]};e1.node;const CT=pe(e1);/**
242
- * @license lucide-react v1.52.0 - ISC
243
- *
244
- * This source code is licensed under the ISC license.
245
- * See the LICENSE file in the root directory of this source tree.
246
- */const t1={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"}]]};t1.node;const ET=pe(t1);/**
247
- * @license lucide-react v1.52.0 - ISC
248
- *
249
- * This source code is licensed under the ISC license.
250
- * See the LICENSE file in the root directory of this source tree.
251
- */const n1={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"}]]};n1.node;const TT=pe(n1);/**
252
- * @license lucide-react v1.52.0 - ISC
253
- *
254
- * This source code is licensed under the ISC license.
255
- * See the LICENSE file in the root directory of this source tree.
256
- */const r1={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};r1.node;const kt=pe(r1);/**
257
- * @license lucide-react v1.52.0 - ISC
258
- *
259
- * This source code is licensed under the ISC license.
260
- * See the LICENSE file in the root directory of this source tree.
261
- */const s1={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"}]]};s1.node;const PT=pe(s1);/**
262
- * @license lucide-react v1.52.0 - ISC
263
- *
264
- * This source code is licensed under the ISC license.
265
- * See the LICENSE file in the root directory of this source tree.
266
- */const i1={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};i1.node;const NT=pe(i1);/**
267
- * @license lucide-react v1.52.0 - ISC
268
- *
269
- * This source code is licensed under the ISC license.
270
- * See the LICENSE file in the root directory of this source tree.
271
- */const o1={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"}]]};o1.node;const bT=pe(o1);/**
272
- * @license lucide-react v1.52.0 - ISC
273
- *
274
- * This source code is licensed under the ISC license.
275
- * See the LICENSE file in the root directory of this source tree.
276
- */const a1={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"}]]};a1.node;const RT=pe(a1);/**
277
- * @license lucide-react v1.52.0 - ISC
278
- *
279
- * This source code is licensed under the ISC license.
280
- * See the LICENSE file in the root directory of this source tree.
281
- */const l1={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"}]]};l1.node;const u1=pe(l1);/**
282
- * @license lucide-react v1.52.0 - ISC
283
- *
284
- * This source code is licensed under the ISC license.
285
- * See the LICENSE file in the root directory of this source tree.
286
- */const c1={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"}]]};c1.node;const oh=pe(c1);/**
287
- * @license lucide-react v1.52.0 - ISC
288
- *
289
- * This source code is licensed under the ISC license.
290
- * See the LICENSE file in the root directory of this source tree.
291
- */const d1={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"}]]};d1.node;const jT=pe(d1);/**
292
- * @license lucide-react v1.52.0 - ISC
293
- *
294
- * This source code is licensed under the ISC license.
295
- * See the LICENSE file in the root directory of this source tree.
296
- */const f1={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};f1.node;const h1=pe(f1);/**
297
- * @license lucide-react v1.52.0 - ISC
298
- *
299
- * This source code is licensed under the ISC license.
300
- * See the LICENSE file in the root directory of this source tree.
301
- */const p1={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"}]]};p1.node;const MT=pe(p1);/**
302
- * @license lucide-react v1.52.0 - ISC
303
- *
304
- * This source code is licensed under the ISC license.
305
- * See the LICENSE file in the root directory of this source tree.
306
- */const m1={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"}]]};m1.node;const ah=pe(m1);/**
307
- * @license lucide-react v1.52.0 - ISC
308
- *
309
- * This source code is licensed under the ISC license.
310
- * See the LICENSE file in the root directory of this source tree.
311
- */const g1={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"}]]};g1.node;const ps=pe(g1);/**
312
- * @license lucide-react v1.52.0 - ISC
313
- *
314
- * This source code is licensed under the ISC license.
315
- * See the LICENSE file in the root directory of this source tree.
316
- */const y1={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"]};y1.node;const br=pe(y1);/**
317
- * @license lucide-react v1.52.0 - ISC
318
- *
319
- * This source code is licensed under the ISC license.
320
- * See the LICENSE file in the root directory of this source tree.
321
- */const v1={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"]};v1.node;const Nl=pe(v1);/**
322
- * @license lucide-react v1.52.0 - ISC
323
- *
324
- * This source code is licensed under the ISC license.
325
- * See the LICENSE file in the root directory of this source tree.
326
- */const x1={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"}]]};x1.node;const bl=pe(x1);/**
327
- * @license lucide-react v1.52.0 - ISC
328
- *
329
- * This source code is licensed under the ISC license.
330
- * See the LICENSE file in the root directory of this source tree.
331
- */const w1={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};w1.node;const cn=pe(w1),DT=[["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"]],S1=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 AT(e){for(const[t,s]of DT)if(e.startsWith(t))return s;return S1.has(e)?"document":"other"}[...S1];const rn={NOT_FOUND:"NOT_FOUND",FOLDER_NOT_FOUND:"FOLDER_NOT_FOUND",STORAGE_NOT_INITIALIZED:"STORAGE_NOT_INITIALIZED",STORAGE_UNAVAILABLE:"STORAGE_UNAVAILABLE",TELEGRAM_AUTH_REQUIRED:"TELEGRAM_AUTH_REQUIRED"};class Rr extends Error{constructor(s,i,o){super(o);Wc(this,"status");Wc(this,"code");this.name="ApiError",this.status=s,this.code=i}}function ze(e,t){return e instanceof Error&&e.message!==""?e.message:t}function pr(e,...t){return e instanceof Rr&&t.includes(e.code)}const pf=new Set;function LT(e){return pf.add(e),()=>{pf.delete(e)}}function k1(){for(const e of pf)e()}function Ty(e){return typeof e=="object"&&e!==null}function IT(e){if(!Ty(e)||!Ty(e.error))return!1;const t=e.error;return typeof t.code=="string"&&typeof t.message=="string"}function C1(e,t){let s=null;try{s=JSON.parse(t)}catch{}return IT(s)?new Rr(e,s.error.code,s.error.message):new Rr(e,"UNKNOWN",`Request failed with status ${e}`)}function Gr(e){const t=new URLSearchParams;for(const[i,o]of Object.entries(e))o==null||o===""||t.set(i,String(o));const s=t.toString();return s===""?"":`?${s}`}function mr(e,t=""){return`/api/files/${encodeURIComponent(e)}${t}`}function fo(e,t=""){return`/api/folders/${encodeURIComponent(e)}${t}`}async function E1(e,t,s){const i={};s!==void 0&&(i["content-type"]="application/json");let o;try{o=await fetch(t,{method:e,credentials:"same-origin",headers:i,body:s!==void 0?JSON.stringify(s):void 0})}catch{throw new Rr(0,"NETWORK_ERROR","Could not reach the server. Check your connection and try again.")}if(!o.ok){const l=await o.text().catch(()=>""),u=C1(o.status,l);throw o.status===401&&u.code!==rn.TELEGRAM_AUTH_REQUIRED&&k1(),u}return o}async function Pe(e,t,s){return await(await E1(e,t,s)).json()}async function FT(e,t,s){await E1(e,t,s)}const we={auth:{me(){return Pe("GET","/api/auth/me")},startLogin(e){return Pe("POST","/api/auth/telegram/start",{phone:e})},verifyCode(e,t){return Pe("POST","/api/auth/telegram/verify",{phone:e,code:t})},verifyPassword(e,t){return Pe("POST","/api/auth/telegram/password",{phone:e,password:t})},startQrLogin(){return Pe("POST","/api/auth/telegram/qr/start",{})},pollQrLogin(e){return Pe("GET",`/api/auth/telegram/qr/status?flowId=${encodeURIComponent(e)}`)},submitQrPassword(e,t){return Pe("POST","/api/auth/telegram/qr/password",{flowId:e,password:t})},logout(){return Pe("POST","/api/auth/logout")}},storage:{ensure(){return Pe("POST","/api/storage/ensure")},health(){return Pe("GET","/api/storage/health")},stats(){return Pe("GET","/api/storage/stats")},integrityCheck(e=!1){return Pe("POST","/api/storage/integrity/check",e?{deep:!0}:{})}},files:{list(e){return Pe("GET",`/api/files${Gr({...e})}`)},get(e){return Pe("GET",mr(e))},versions(e){return Pe("GET",mr(e,"/versions"))},update(e,t){return Pe("PATCH",mr(e),t)},move(e,t){return Pe("POST",mr(e,"/move"),{folderId:t})},trash(e){return Pe("POST",mr(e,"/trash"))},restore(e){return Pe("POST",mr(e,"/restore"))},delete(e){return FT("DELETE",mr(e))},batch(e){return Pe("POST","/api/files/batch",e)},download(e){const t=document.createElement("a");t.href=mr(e,"/download"),t.rel="noopener",document.body.appendChild(t),t.click(),t.remove()}},folders:{list(e){return Pe("GET",`/api/folders${Gr({...e})}`)},tree(){return Pe("GET","/api/folders/tree")},create(e,t){return Pe("POST","/api/folders",{name:e,parentId:t})},update(e,t){return Pe("PATCH",fo(e),t)},move(e,t){return Pe("POST",fo(e,"/move"),{parentId:t})},trash(e){return Pe("POST",fo(e,"/trash"))},restore(e){return Pe("POST",fo(e,"/restore"))},delete(e){return Pe("DELETE",fo(e))},batch(e){return Pe("POST","/api/folders/batch",e)}},trash:{list(e){return Pe("GET",`/api/trash${Gr({...e})}`)},empty(){return Pe("POST","/api/trash/empty")}},starred:{list(e){return Pe("GET",`/api/starred${Gr({...e})}`)}},recent:{list(e){return Pe("GET",`/api/recent${Gr({...e})}`)}},search:{query(e,t={}){return Pe("GET",`/api/search${Gr({q:e,...t})}`)}},activity:{list(e){return Pe("GET",`/api/activity${Gr({...e})}`)}}},lh=S.createContext({});function uh(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const _T=typeof window<"u",Co=_T?S.useLayoutEffect:S.useEffect,Hl=S.createContext(null);function ch(e,t){e.indexOf(t)===-1&&e.push(t)}function Rl(e,t){const s=e.indexOf(t);s>-1&&e.splice(s,1)}const Qn=(e,t,s)=>s>t?t:s<e?e:s;let Kl=()=>{};const qn={},dh=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),T1=e=>typeof e=="object"&&e!==null,fh=e=>/^0[^.\s]+$/u.test(e);function P1(e){let t;return()=>(t===void 0&&(t=e()),t)}const dn=e=>e,Vo=(...e)=>e.reduce((t,s)=>i=>s(t(i))),Eo=(e,t,s)=>{const i=t-e;return i?(s-e)/i:1};class jl{constructor(){this.subscriptions=[]}add(t){return ch(this.subscriptions,t),()=>this.remove(t)}remove(t){Rl(this.subscriptions,t)}notify(t,s,i){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,s,i);else for(let l=0;l<o;l++){const u=this.subscriptions[l];u&&u(t,s,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Wt=e=>e*1e3,Ht=e=>e/1e3,N1=(e,t)=>t?e*(1e3/t):0,b1=(e,t,s)=>(((1-3*s+3*t)*e+(3*s-6*t))*e+3*t)*e,OT=1e-7,VT=12;function BT(e,t,s,i,o){let l,u,d=0;do u=t+(s-t)/2,l=b1(u,i,o)-e,l>0?s=u:t=u;while(Math.abs(l)>OT&&++d<VT);return u}function Bo(e,t,s,i){if(e===t&&s===i)return dn;const o=l=>BT(l,0,1,e,s);return l=>l===0||l===1?l:b1(o(l),t,i)}const R1=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,j1=e=>t=>1-e(1-t),M1=Bo(.33,1.53,.69,.99),hh=j1(M1),D1=R1(hh),A1=e=>e>=1?1:(e*=2)<1?.5*hh(e):.5*(2-Math.pow(2,-10*(e-1))),ph=e=>1-Math.sin(Math.acos(e)),L1=j1(ph),I1=R1(ph),zT=Bo(.42,0,1,1),UT=Bo(0,0,.58,1),mh=Bo(.42,0,.58,1),$T=e=>Array.isArray(e)&&typeof e[0]!="number",F1=e=>Array.isArray(e)&&typeof e[0]=="number",HT={linear:dn,easeIn:zT,easeInOut:mh,easeOut:UT,circIn:ph,circInOut:I1,circOut:L1,backIn:hh,backInOut:D1,backOut:M1,anticipate:A1},KT=e=>typeof e=="string",Py=e=>{if(F1(e)){Kl(e.length===4);const[t,s,i,o]=e;return Bo(t,s,i,o)}else if(KT(e))return HT[e];return e},Ze={delta:0,timestamp:0,isProcessing:!1};let yl;function WT(){yl=void 0}const ut={now:()=>(yl===void 0&&ut.set(Ze.isProcessing||qn.useManualTiming?Ze.timestamp:performance.now()),yl),set:e=>{yl=e,queueMicrotask(WT)}},Gs=e=>Math.round(e*1e5)/1e5,_1=e=>t=>typeof t=="string"&&t.startsWith(e),O1=_1("--"),qT=_1("var(--"),gh=e=>qT(e)?QT.test(e.split("/*")[0].trim()):!1,QT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ny(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Si={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},To={...Si,transform:e=>Qn(0,1,e)},il={...Si,default:1},yh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function GT(e){return e==null}const YT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,vh=(e,t)=>s=>!!(typeof s=="string"&&YT.test(s)&&s.startsWith(e)||t&&!GT(s)&&Object.prototype.hasOwnProperty.call(s,t)),V1=(e,t,s)=>i=>{if(typeof i!="string")return i;const[o,l,u,d]=i.match(yh);return{[e]:parseFloat(o),[t]:parseFloat(l),[s]:parseFloat(u),alpha:d!==void 0?parseFloat(d):1}},XT=e=>Qn(0,255,e),id={...Si,transform:e=>Math.round(XT(e))},Jr={test:vh("rgb","red"),parse:V1("red","green","blue"),transform:({red:e,green:t,blue:s,alpha:i=1})=>"rgba("+id.transform(e)+", "+id.transform(t)+", "+id.transform(s)+", "+Gs(To.transform(i))+")"};function JT(e){let t="",s="",i="",o="";return e.length>5?(t=e.substring(1,3),s=e.substring(3,5),i=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),s=e.substring(2,3),i=e.substring(3,4),o=e.substring(4,5),t+=t,s+=s,i+=i,o+=o),{red:parseInt(t,16),green:parseInt(s,16),blue:parseInt(i,16),alpha:o?parseInt(o,16)/255:1}}const mf={test:vh("#"),parse:JT,transform:Jr.transform},zo=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Bn=zo("deg"),Rn=zo("%"),oe=zo("px"),ZT=zo("vh"),eP=zo("vw"),by={...Rn,parse:e=>Rn.parse(e)/100,transform:e=>Rn.transform(e*100)},Ws={test:vh("hsl","hue"),parse:V1("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:s,alpha:i=1})=>"hsla("+Math.round(e)+", "+Rn.transform(Gs(t))+", "+Rn.transform(Gs(s))+", "+Gs(To.transform(i))+")"},et={test:e=>Jr.test(e)||mf.test(e)||Ws.test(e),parse:e=>Jr.test(e)?Jr.parse(e):Ws.test(e)?Ws.parse(e):mf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Jr.transform(e):Ws.transform(e),getAnimatableNone:e=>{const t=et.parse(e);return t.alpha=0,et.transform(t)}},tP=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,B1=new RegExp(yh.source),z1=new RegExp(tP.source,"i");function nP(e){return isNaN(e)&&typeof e=="string"&&(B1.test(e)||z1.test(e))}const U1="number",$1="color",rP="var",sP="var(",Ry="${}",iP=/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 oP(e){const t=e.toString();return B1.test(t)||z1.test(t)}function Po(e){const t=e.toString(),s=[],i={color:[],number:[],var:[]},o=[];let l=0;const d=t.replace(iP,h=>(et.test(h)?(i.color.push(l),o.push($1),s.push(et.parse(h))):h.startsWith(sP)?(i.var.push(l),o.push(rP),s.push(h)):(i.number.push(l),o.push(U1),s.push(parseFloat(h))),++l,Ry)).split(Ry);return{values:s,split:d,indexes:i,types:o}}function aP(e){return Po(e).values}function H1({split:e,types:t}){const s=e.length;return i=>{let o="";for(let l=0;l<s;l++)if(o+=e[l],i[l]!==void 0){const u=t[l];u===U1?o+=Gs(i[l]):u===$1?o+=et.transform(i[l]):o+=i[l]}return o}}function lP(e){return H1(Po(e))}const uP=e=>typeof e=="number"?0:et.test(e)?et.getAnimatableNone(e):e,cP=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:uP(e);function dP(e){const t=Po(e);return H1(t)(t.values.map((i,o)=>cP(i,t.split[o])))}const It={test:nP,parse:aP,createTransformer:lP,getAnimatableNone:dP};function od(e,t,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?e+(t-e)*6*s:s<1/2?t:s<2/3?e+(t-e)*(2/3-s)*6:e}function fP({hue:e,saturation:t,lightness:s,alpha:i}){e/=360,t/=100,s/=100;let o=0,l=0,u=0;if(!t)o=l=u=s;else{const d=s<.5?s*(1+t):s+t-s*t,h=2*s-d;o=od(h,d,e+1/3),l=od(h,d,e),u=od(h,d,e-1/3)}return{red:Math.round(o*255),green:Math.round(l*255),blue:Math.round(u*255),alpha:i}}function Ml(e,t){return s=>s>0?t:e}const Ae=(e,t,s)=>e+(t-e)*s,ad=(e,t,s)=>{const i=e*e,o=s*(t*t-i)+i;return o<0?0:Math.sqrt(o)},hP=[mf,Jr,Ws],pP=e=>hP.find(t=>t.test(e));function jy(e){const t=pP(e);if(!t)return!1;let s=t.parse(e);return t===Ws&&(s=fP(s)),s}const My=(e,t)=>{const s=jy(e),i=jy(t);if(!s||!i)return Ml(e,t);const o={...s};return l=>(o.red=ad(s.red,i.red,l),o.green=ad(s.green,i.green,l),o.blue=ad(s.blue,i.blue,l),o.alpha=Ae(s.alpha,i.alpha,l),Jr.transform(o))},gf=new Set(["none","hidden"]);function mP(e,t){return gf.has(e)?s=>s<=0?e:t:s=>s>=1?t:e}function gP(e,t){return s=>Ae(e,t,s)}function xh(e){return typeof e=="number"?gP:typeof e=="string"?gh(e)?Ml:et.test(e)?My:xP:Array.isArray(e)?K1:typeof e=="object"?et.test(e)?My:yP:Ml}function K1(e,t){const s=[...e],i=s.length,o=e.map((l,u)=>xh(l)(l,t[u]));return l=>{for(let u=0;u<i;u++)s[u]=o[u](l);return s}}function yP(e,t){const s={...e,...t},i={};for(const o in s)e[o]!==void 0&&t[o]!==void 0&&(i[o]=xh(e[o])(e[o],t[o]));return o=>{for(const l in i)s[l]=i[l](o);return s}}function vP(e,t){const s=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const l=t.types[o],u=e.indexes[l][i[l]],d=e.values[u]??0;s[o]=d,i[l]++}return s}const xP=(e,t)=>{const s=It.createTransformer(t),i=Po(e),o=Po(t);return i.indexes.var.length===o.indexes.var.length&&i.indexes.color.length===o.indexes.color.length&&i.indexes.number.length>=o.indexes.number.length?gf.has(e)&&!o.values.length||gf.has(t)&&!i.values.length?mP(e,t):Vo(K1(vP(i,o),o.values),s):Ml(e,t)},Dy=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function wP(e,t){const s=Dy.exec(e);if(!s)return;const i=Dy.exec(t);if(!i||s[2]!==i[2])return;const o=s[2],l=parseFloat(s[1]),u=parseFloat(i[1]);return d=>Gs(Ae(l,u,d))+o}function wh(e,t,s){if(typeof e=="number"&&typeof t=="number"&&typeof s=="number")return Ae(e,t,s);if(typeof e=="string"&&typeof t=="string"){const o=wP(e,t);if(o)return o}return xh(e)(e,t)}const ol=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function SP(e){let t=new Set,s=new Set,i=!1,o=!1;const l=new Set;let u={delta:0,timestamp:0,isProcessing:!1};function d(m){l.has(m)&&(s.add(m),e()),m(u)}const h={schedule:(m,y=!1,v=!1)=>{const C=v&&i?t:s;return y&&l.add(m),C.add(m),m},cancel:m=>{s.delete(m),l.delete(m)},process:m=>{if(u=m,i){o=!0;return}i=!0;const y=t;t=s,s=y,t.forEach(d),t.clear(),i=!1,o&&(o=!1,h.process(m))}};return h}const kP=40;function W1(e,t,s={delta:0,timestamp:0,isProcessing:!1}){let i=!1,o=!0;const l=()=>i=!0,u=ol.reduce((b,M)=>(b[M]=SP(l),b),{}),{setup:d,read:h,resolveKeyframes:m,preUpdate:y,update:v,preRender:x,render:C,postRender:k}=u,E=()=>{const b=qn.useManualTiming,M=b?s.timestamp:performance.now();i=!1,b||(s.delta=o?1e3/60:Math.max(Math.min(M-s.timestamp,kP),1)),s.timestamp=M,s.isProcessing=!0,d.process(s),h.process(s),m.process(s),y.process(s),v.process(s),x.process(s),C.process(s),k.process(s),s.isProcessing=!1,i&&t&&(o=!1,e(E))},T=()=>{i=!0,o=!0,s.isProcessing||e(E)};return{schedule:ol.reduce((b,M)=>{const _=u[M];return b[M]=(I,R=!1,D=!1)=>(i||T(),_.schedule(I,R,D)),b},{}),cancel:b=>{for(let M=0;M<ol.length;M++)u[ol[M]].cancel(b)},state:s,steps:u}}const{schedule:Le,cancel:Mr,steps:ld}=W1(typeof requestAnimationFrame<"u"?requestAnimationFrame:dn,!0,Ze),CP=e=>{const t=({timestamp:s})=>e(s);return{start:(s=!0)=>Le.update(t,s),stop:()=>Mr(t),now:()=>Ze.isProcessing?Ze.timestamp:ut.now()}},q1=(e,t,s=10)=>{let i="";const o=Math.max(Math.round(t/s),2);for(let l=0;l<o;l++)i+=Math.round(e(l/(o-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Sh=2e4;function kh(e,t=50,s=Sh,i){let o=0,l=e.next(o);for(;!l.done&&o<s;)o+=t,l=e.next(o);return o>=s?1/0:o}function EP(e,t=100,s){const i=s({...e,keyframes:[0,t]}),o=Math.min(kh(i),Sh);return{type:"keyframes",ease:l=>i.next(o*l).value/t,duration:Ht(o)}}const lt={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},Q1=e=>e<0?1/Math.max(1+e,lt.minDamping):Math.max(1-e,lt.minDamping);function G1(e,t){if(!(e>1))return 1;const s=Math.sqrt(e*e-1),i=e-s,o=e+s,l=2*s*Math.exp(-t)*(1+t);return Y1(u=>o*Math.exp(-i*u)-i*Math.exp(-o*u)-l,u=>Math.exp(-o*u)-Math.exp(-i*u),t)/t}function yf(e,t){return e*Math.sqrt(1-t*t)}const TP=12;function Y1(e,t,s){let i=s;for(let o=1;o<TP;o++)i=i-e(i)/t(i);return i}const ud=.001;function PP({duration:e=lt.duration,bounce:t=lt.bounce}){let s,i;const o=Q1(t);e=Qn(lt.minDuration,lt.maxDuration,Ht(e)),o<1?(s=m=>{const y=m*o,v=y*e,x=yf(m,o),C=Math.exp(-v);return ud-y/x*C},i=m=>{const v=m*o*e,x=o*o*m*m*e,C=Math.exp(-v),k=yf(m*m,o);return(-s(m)+ud>0?-1:1)*-x*C/k}):(s=m=>{const y=Math.exp(-m*e),v=m*e+1;return-ud+y*v},i=m=>{const y=Math.exp(-m*e),v=-m*(e*e);return y*v});const l=5/e,u=Y1(s,i,l),d=u*G1(o,u*e),h=d*d;return{stiffness:h,damping:o*2*Math.sqrt(h),duration:Wt(e)}}const vf=(e,t)=>(t?e>=0:e>0)&&e<1/0;function cd(e,t){if(vf(e,t))return e}function NP(e){const t=cd(e.stiffness),s=cd(e.damping,!0),i=cd(e.mass),o={...e,stiffness:t??lt.stiffness,damping:s??lt.damping,mass:i??lt.mass,isResolvedFromDuration:!1,isTimeDefined:(t??s??i)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(o.isTimeDefined){if(e.visualDuration){const l=Q1(e.bounce||0),u=2*Math.PI/(e.visualDuration*1.2)*G1(l,2*Math.PI/1.2);o.stiffness=u*u,o.damping=2*l*Math.sqrt(o.stiffness)}else Object.assign(o,PP(o)),o.isResolvedFromDuration=!0;(!vf(o.stiffness)||!vf(o.damping,!0))&&(o.stiffness=lt.stiffness,o.damping=lt.damping)}return o}function Dl(e=lt.visualDuration,t=lt.bounce){const s=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,i=s.keyframes[0],o=s.keyframes[s.keyframes.length-1],l={done:!1,value:i},{stiffness:u,damping:d,mass:h,duration:m,isResolvedFromDuration:y,isTimeDefined:v}=NP({...s}),x=R=>v?0:-Ht(R),C=d/(2*Math.sqrt(u*h)),k=Ht(Math.sqrt(u/h)),E=C*k,T={target:o,delta:o-i,velocity:x(s.velocity||0)||0,restSpeed:0,restDelta:0},P=()=>{const R=Math.abs(T.delta)<5;T.restSpeed=s.restSpeed||(R?lt.restSpeed.granular:lt.restSpeed.default),T.restDelta=s.restDelta||(R?lt.restDelta.granular:lt.restDelta.default)};P();let L,b,M;if(C<1){const R=yf(k,C),D={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};M=()=>{D.A=(T.velocity+E*T.delta)/R,D.sinC=E*D.A+T.delta*R,D.cosC=E*T.delta-D.A*R};const B=W=>{W!==D.t&&(D.t=W,D.env=Math.exp(-E*W),D.sin=Math.sin(R*W),D.cos=Math.cos(R*W))};L=W=>(B(W),T.target-D.env*(D.A*D.sin+T.delta*D.cos)),b=W=>(B(W),D.env*(D.sinC*D.sin+D.cosC*D.cos))}else if(C===1){L=D=>T.target-Math.exp(-k*D)*(T.delta+(T.velocity+k*T.delta)*D);const R={C:0};M=()=>{R.C=T.velocity+k*T.delta},b=D=>Math.exp(-k*D)*(k*R.C*D-T.velocity)}else{const R=k*Math.sqrt(C*C-1),D=E-R,B=E+R,W=v?1/0:300/R,G=(U,X)=>Math.exp(X>W?-U*W-E*(X-W):-U*X),K={S:0,F:0};M=()=>{const U=(T.velocity+E*T.delta)/R;K.S=(T.delta+U)/2,K.F=(T.delta-U)/2},L=U=>T.target-K.S*G(D,U)-K.F*G(B,U),b=U=>D*K.S*G(D,U)+B*K.F*G(B,U)}M();const _=y&&m||null,I={calculatedDuration:_,retarget:(R,D)=>{T.target=R[R.length-1],T.delta=T.target-R[0],T.velocity=x(D),s.restSpeed&&s.restDelta||P(),I.calculatedDuration=_,l.done=!1,M()},velocity:R=>Wt(b(R)),next:R=>{const D=L(R);if(y)l.done=R>=m;else{const B=Wt(b(R));l.done=Math.abs(B)<=T.restSpeed&&Math.abs(T.target-D)<=T.restDelta}return l.value=l.done?T.target:D,l},toString:()=>{const R=Math.min(kh(I),Sh),D=q1(B=>I.next(R*B).value,R,30);return R+"ms "+D},toTransition:()=>{}};return I}Dl.applyToOptions=e=>{const t=EP(e,100,Dl);return e.ease=t.ease,e.duration=Wt(t.duration),e.type="keyframes",e};function xf({keyframes:e,velocity:t=0,power:s=.8,timeConstant:i=325,bounceDamping:o=10,bounceStiffness:l=500,modifyTarget:u,min:d,max:h,restDelta:m=.5,restSpeed:y}){const v=e[0],x={done:!1,value:v},C=R=>R<d||R>h,k=R=>d===void 0?h:h===void 0||Math.abs(d-R)<Math.abs(h-R)?d:h;let E=s*t;const T=v+E,P=u===void 0?T:u(T);P!==T&&(E=P-v);const L=R=>-E*Math.exp(-R/i),b=R=>{const D=L(R);x.done=Math.abs(D)<=m,x.value=x.done?P:P+D};let M,_;const I=R=>{C(x.value)&&(M=R,_=Dl({keyframes:[x.value,k(x.value)],velocity:-L(R)/i*1e3,damping:o,stiffness:l,restDelta:m,restSpeed:y}))};return I(0),{calculatedDuration:null,next:R=>{let D=!1;return!_&&M===void 0&&(D=!0,b(R),I(R)),M!==void 0&&R>=M?_.next(R-M):(!D&&b(R),x)}}}function bP(e,t,s){const i=[],o=s||qn.mix||wh,l=e.length-1;for(let u=0;u<l;u++){let d=o(e[u],e[u+1]);if(t){const h=Array.isArray(t)?t[u]||dn:t;d=Vo(h,d)}i.push(d)}return i}function RP(e,t,{clamp:s=!0,ease:i,mixer:o}={}){const l=e.length;if(Kl(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const u=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const d=bP(t,i,o),h=d.length,m=y=>{if(u&&y<e[0])return t[0];let v=0;if(h>1)for(;v<e.length-2&&!(y<e[v+1]);v++);const x=Eo(e[v],e[v+1],y);return d[v](x)};return s?y=>m(Qn(e[0],e[l-1],y)):m}function jP(e,t){const s=e[e.length-1];for(let i=1;i<=t;i++){const o=Eo(0,t,i);e.push(Ae(s,1,o))}}function MP(e){const t=[0];return jP(t,e.length-1),t}function DP(e,t){return e.map(s=>s*t)}function AP(e,t){return e.map(()=>t||mh).splice(0,e.length-1)}function xo({duration:e=300,keyframes:t,times:s,ease:i="easeInOut"}){const o=$T(i)?i.map(Py):Py(i)||mh,l={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(o)&&(!s||s.length!==2||s[0]===0&&s[1]===1)){const[h,m]=t,y=h===m?void 0:(qn.mix||wh)(h,m);return{calculatedDuration:e,next:v=>(l.value=y?y(o(e>0?Qn(0,1,v/e):1)):m,l.done=v>=e,l)}}const u=DP(s&&s.length===t.length?s:MP(t),e),d=RP(u,t,{ease:Array.isArray(o)?o:AP(t,o)});return{calculatedDuration:e,next:h=>(l.value=d(h),l.done=h>=e,l)}}const LP=5;function IP(e,t,s){const i=Math.max(t-LP,0);return N1(s-e(i),t-i)}function FP(e,t,s=0){return t<=0?s:e.velocity?e.velocity(t):IP(i=>e.next(i).value,t,e.next(t).value)}const _P=e=>e!==null;function Wl(e,{repeat:t,repeatType:s="loop"},i,o=1){const l=e.filter(_P),d=o<0||t&&s!=="loop"&&t%2===1?0:l.length-1;return!d||i===void 0?l[d]:i}const OP={decay:xf,inertia:xf,tween:xo,keyframes:xo,spring:Dl};function X1(e){typeof e.type=="string"&&(e.type=OP[e.type])}function J1(e,t){return{kind:e,animation:t,timestamp:ut.now(),frameTimestamp:Ze.timestamp,frameIsProcessing:Ze.isProcessing}}function Z1(e,t,s){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...J1("animation-start",e),options:s?{...t,...s}:t})}catch{}}function VP(e,t){const s=globalThis.__MOTION_INSPECT__;if(s)try{s({...J1("layout-animation-start",e),node:t})}catch{}}class Ch{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){var t;this.isResolved=!0,(t=this._resolve)==null||t.call(this)}then(t,s){return this.finished.then(t,s)}}const BP=e=>e/100;class Al extends Ch{constructor(t){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,o;const{motionValue:s}=this.options;s&&s.updatedAt!==ut.now()&&this.tick(ut.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(i=this.options).onStop)==null||o.call(i))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause(),Z1(this,this.options)}initAnimation(){const{options:t}=this;X1(t);const{type:s=xo,repeat:i=0,repeatDelay:o=0,repeatType:l,velocity:u=0}=t;let{keyframes:d}=t;const h=s||xo;h!==xo&&typeof d[0]!="number"&&(this.mixKeyframes=Vo(BP,wh(d[0],d[1])),d=[0,100]);const m=h(d===t.keyframes?t:{...t,keyframes:d});l==="mirror"&&(this.mirroredGenerator=h({...t,keyframes:[...d].reverse(),velocity:-u})),m.calculatedDuration===null&&(m.calculatedDuration=kh(m));const{calculatedDuration:y}=m;this.calculatedDuration=y,this.resolvedDuration=y+o,this.totalDuration=this.resolvedDuration*(i+1)-o,this.generator=m}updateTime(t){const s=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(t,s=!1){const{generator:i,totalDuration:o,mixKeyframes:l,mirroredGenerator:u,resolvedDuration:d,calculatedDuration:h}=this;if(this.startTime===null)return i.next(0);const{delay:m=0,keyframes:y,repeat:v,repeatType:x,repeatDelay:C,type:k,onUpdate:E,finalKeyframe:T}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),s?this.currentTime=t:this.updateTime(t);const P=this.currentTime-m*(this.playbackSpeed>=0?1:-1),L=this.playbackSpeed>=0?P<0:P>o;this.currentTime=Math.max(P,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let b=this.currentTime,M=i;if(v){const D=Math.min(this.currentTime,o)/d;let B=Math.floor(D),W=D%1;!W&&D>=1&&(W=1),W===1&&B--,B=Math.min(B,v+1),!!(B%2)&&(x==="reverse"?(W=1-W,C&&(W-=C/d)):x==="mirror"&&(M=u)),b=Qn(0,1,W)*d}let _;L?(this.delayState.value=y[0],_=this.delayState):_=M.next(b),l&&!L&&(_.value=l(_.value));let{done:I}=_;!L&&h!==null&&(I=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return R&&k!==xf&&(_.value=Wl(y,this.options,T,this.speed)),E&&E(_.value),R&&this.finish(),_}then(t,s){return this.finished.then(t,s)}get duration(){return Ht(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ht(t)}get time(){return Ht(this.currentTime)}set time(t){t=Wt(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return FP(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){const s=this.playbackSpeed!==t;s&&this.driver&&this.updateTime(ut.now()),this.playbackSpeed=t,s&&this.driver&&(this.time=Ht(this.currentTime))}play(){var o,l;if(this.isStopped)return;const{driver:t=CP,startTime:s}=this.options;this.driver||(this.driver=t(u=>this.tick(u))),(l=(o=this.options).onPlay)==null||l.call(o);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(ut.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,s;this.notifyFinished(),this.teardown(),this.state="finished",(s=(t=this.options).onComplete)==null||s.call(t)}cancel(){var t,s;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(s=(t=this.options).onCancel)==null||s.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var s;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(s=this.driver)==null||s.stop(),t.observe(this)}}const zP=new Set(["brightness","contrast","saturate","opacity"]);function UP(e){const[t,s]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=s.match(yh)||[];if(!i)return e;const o=s.replace(i,"");let l=zP.has(t)?1:0;return i!==s&&(l*=100),t+"("+l+o+")"}const $P=/\b([a-z-]*)\(.*?\)/gu,wf={...It,getAnimatableNone:e=>{const t=e.match($P);return t?t.map(UP).join(" "):e}},Sf={...It,getAnimatableNone:e=>{const t=It.parse(e);return It.createTransformer(e)(t.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},Ay={...Si,transform:Math.round},HP={rotate:Bn,pathRotation:Bn,rotateX:Bn,rotateY:Bn,rotateZ:Bn,scale:il,scaleX:il,scaleY:il,scaleZ:il,skew:Bn,skewX:Bn,skewY:Bn,distance:oe,translateX:oe,translateY:oe,translateZ:oe,x:oe,y:oe,z:oe,perspective:oe,transformPerspective:oe,opacity:To,originX:by,originY:by,originZ:oe},Ll={borderWidth:oe,borderTopWidth:oe,borderRightWidth:oe,borderBottomWidth:oe,borderLeftWidth:oe,borderRadius:oe,borderTopLeftRadius:oe,borderTopRightRadius:oe,borderBottomRightRadius:oe,borderBottomLeftRadius:oe,width:oe,maxWidth:oe,height:oe,maxHeight:oe,top:oe,right:oe,bottom:oe,left:oe,inset:oe,insetBlock:oe,insetBlockStart:oe,insetBlockEnd:oe,insetInline:oe,insetInlineStart:oe,insetInlineEnd:oe,padding:oe,paddingTop:oe,paddingRight:oe,paddingBottom:oe,paddingLeft:oe,paddingBlock:oe,paddingBlockStart:oe,paddingBlockEnd:oe,paddingInline:oe,paddingInlineStart:oe,paddingInlineEnd:oe,margin:oe,marginTop:oe,marginRight:oe,marginBottom:oe,marginLeft:oe,marginBlock:oe,marginBlockStart:oe,marginBlockEnd:oe,marginInline:oe,marginInlineStart:oe,marginInlineEnd:oe,fontSize:oe,backgroundPositionX:oe,backgroundPositionY:oe,...HP,zIndex:Ay,fillOpacity:To,strokeOpacity:To,numOctaves:Ay},KP={...Ll,color:et,backgroundColor:et,outlineColor:et,fill:et,stroke:et,borderColor:et,borderTopColor:et,borderRightColor:et,borderBottomColor:et,borderLeftColor:et,filter:wf,WebkitFilter:wf,mask:Sf,WebkitMask:Sf},ew=e=>KP[e],WP=new Set([wf,Sf]);function Eh(e,t){let s=ew(e);return WP.has(s)||(s=It),s.getAnimatableNone?s.getAnimatableNone(t):void 0}function qP(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Zr=e=>e*180/Math.PI,kf=e=>{const t=Zr(Math.atan2(e[1],e[0]));return Cf(t)},QP={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:kf,rotateZ:kf,skewX:e=>Zr(Math.atan(e[1])),skewY:e=>Zr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Cf=e=>(e=e%360,e<0&&(e+=360),e),Ly=kf,Iy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Fy=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),GP={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Iy,scaleY:Fy,scale:e=>(Iy(e)+Fy(e))/2,rotateX:e=>Cf(Zr(Math.atan2(e[6],e[5]))),rotateY:e=>Cf(Zr(Math.atan2(-e[2],e[0]))),rotateZ:Ly,rotate:Ly,skewX:e=>Zr(Math.atan(e[4])),skewY:e=>Zr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function No(e){return e.includes("scale")?1:0}function Ef(e,t){if(!e||e==="none")return No(t);const s=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,o;if(s)i=GP,o=s;else{const d=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=QP,o=d}if(!o)return No(t);const l=i[t],u=o[1].split(",").map(XP);return typeof l=="function"?l(u):u[l]}const YP=(e,t)=>{const{transform:s="none"}=getComputedStyle(e);return Ef(s,t)};function XP(e){return parseFloat(e.trim())}const ki=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],jr=new Set([...ki,"pathRotation"]),_y=e=>e===Si||e===oe,JP=new Set(["x","y","z"]),ZP=ki.filter(e=>!JP.has(e));function eN(e){const t=[];return ZP.forEach(s=>{const i=e.getValue(s);if(i!==void 0){const o=i.get(),l=s.startsWith("scale")?1:0;if(o===l)return;t.push([s,o]),i.set(l)}}),t}const tN=new Set(["bottom","right"]);function Oy(e,t,s,i,o,l){const u=parseFloat(e);if(!isNaN(u))return u;const{min:d,max:h}=t()[s],m=h-d;return l==="border-box"?m:m-parseFloat(i)-parseFloat(o)}const us={width:({width:e,paddingLeft:t="0",paddingRight:s="0",boxSizing:i},o)=>Oy(e,o,"x",t,s,i),height:({height:e,paddingTop:t="0",paddingBottom:s="0",boxSizing:i},o)=>Oy(e,o,"y",t,s,i),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{const{y:s}=t();return parseFloat(e)+(s.max-s.min)},right:({left:e},t)=>{const{x:s}=t();return parseFloat(e)+(s.max-s.min)},x:({transform:e})=>Ef(e,"x"),y:({transform:e})=>Ef(e,"y")};us.translateX=us.x;us.translateY=us.y;const cs=new Set;let Tf=!1,Pf=!1,Nf=!1;function tw(){if(Pf){const e=[],t=new Set,s=new Set;cs.forEach(o=>{o.needsMeasurement&&(e.push(o),t.add(o.element),tN.has(o.name)&&s.add(o.element))});const i=new Map;s.forEach(o=>{const l=eN(o);l.length&&(i.set(o,l),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const l=i.get(o);l&&l.forEach(([u,d])=>{var h;(h=o.getValue(u))==null||h.set(d)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Pf=!1,Tf=!1,cs.forEach(e=>e.complete(Nf)),cs.clear()}function nw(){cs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Pf=!0)})}function nN(){Nf=!0,nw(),tw(),Nf=!1}function rN(e,t,s){if(typeof e=="string"){if(dh(e)||fh(e))return parseFloat(e);if(!It.test(e)&&It.test(s))return Eh(t,s)}return e??void 0}class Th{constructor(t,s,i,o,l,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=s,this.name=i,this.motionValue=o,this.element=l,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(cs.add(this),Tf||(Tf=!0,Le.read(nw),Le.resolveKeyframes(tw))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:s,element:i,motionValue:o}=this;if(t[0]===null){const l=o==null?void 0:o.get(),u=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&s){const d=rN(i.readValue(s,u),s,u);d!==void 0&&(t[0]=d)}t[0]===void 0&&(t[0]=u),o&&l===void 0&&o.set(t[0])}qP(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),cs.delete(this)}cancel(){this.state==="scheduled"&&(cs.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const sN=e=>e.startsWith("--");function rw(e,t,s){sN(t)?e.style.setProperty(t,s):e.style[t]=s}const iN={};function sw(e,t){const s=P1(e);return()=>iN[t]??s()}const oN=sw(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),iw=sw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),vo=([e,t,s,i])=>`cubic-bezier(${e}, ${t}, ${s}, ${i})`,Vy={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vo([0,.65,.55,1]),circOut:vo([.55,0,1,.45]),backIn:vo([.31,.01,.66,-.59]),backOut:vo([.33,1.53,.69,.99])};function ow(e,t){if(e)return typeof e=="function"?iw()?q1(e,t):"ease-out":F1(e)?vo(e):Array.isArray(e)?e.map(s=>ow(s,t)||Vy.easeOut):Vy[e]}function aN(e,t,s,{delay:i=0,duration:o=300,repeat:l=0,repeatType:u="loop",ease:d="easeOut",times:h}={},m=void 0){const y={[t]:s};h&&(y.offset=h);const v=ow(d,o);Array.isArray(v)&&(y.easing=v);const x={delay:i,duration:o,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:l+1,direction:u==="reverse"?"alternate":"normal"};return m&&(x.pseudoElement=m),e.animate(y,x)}function aw(e){return typeof e=="function"&&"applyToOptions"in e}function lN({type:e,...t}){return aw(e)&&iw()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class lw extends Ch{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:s,name:i,keyframes:o,pseudoElement:l,allowFlatten:u=!1,finalKeyframe:d,onComplete:h}=t;this.isPseudoElement=!!l,this.allowFlatten=u,this.options=t,Kl(typeof t.type!="string");const m=lN(t);this.animation=aN(s,i,o,m,l),m.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const y=Wl(o,this.options,d,this.speed);this.updateMotionValue&&this.updateMotionValue(y),rw(s,i,y),this.animation.cancel()}h==null||h(),this.notifyFinished()},Z1(this,t,m)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,s;(s=(t=this.animation).finish)==null||s.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var s,i,o;const t=(s=this.options)==null?void 0:s.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((o=(i=this.animation).commitStyles)==null||o.call(i))}get duration(){var s,i;const t=((i=(s=this.animation.effect)==null?void 0:s.getComputedTiming)==null?void 0:i.call(s).duration)||0;return Ht(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ht(t)}get time(){return Ht(Number(this.animation.currentTime)||0)}set time(t){const s=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Wt(t),s&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,onAttach:s,observe:i,...o}){var l;return this.allowFlatten&&((l=this.animation.effect)==null||l.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&oN()?(this.animation.timeline=t,Object.assign(this.animation,o),s==null||s(this.animation),dn):i(this)}}const uw={anticipate:A1,backInOut:D1,circInOut:I1};function uN(e){return e in uw}function cN(e){typeof e.ease=="string"&&uN(e.ease)&&(e.ease=uw[e.ease])}const dd=10;class dN extends lw{constructor(t){cN(t),X1(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:s,onUpdate:i,onComplete:o,element:l,...u}=this.options;if(!s)return;if(t!==void 0){s.set(t);return}const d=new Al({...u,autoplay:!1}),h=Math.max(dd,ut.now()-this.startTime),m=Qn(0,dd,h-dd),y=d.sample(h).value,{name:v}=this.options;l&&v&&rw(l,v,y),s.setWithVelocity(d.sample(Math.max(0,h-m)).value,y,m),d.stop()}}const By=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(It.test(e)||e==="0")&&!e.startsWith("url("));function fN(e){const t=e[0];if(e.length===1)return!0;for(let s=0;s<e.length;s++)if(e[s]!==t)return!0}function hN(e,t,s,i){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],u=By(o,t),d=By(l,t);return!u||!d?!1:fN(e)||(s==="spring"||aw(s))&&i}function bf(e){e.duration=0,e.type="keyframes"}const Rf=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),pN=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function mN(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&pN.test(e[t]))return!0;return!1}const zy=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),gN=P1(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function yN(e){var v;const{motionValue:t,name:s,repeatDelay:i,repeatType:o,damping:l,type:u,keyframes:d}=e;if(!s||!(Rf.has(s)||zy.has(s)))return!1;const h=(v=t==null?void 0:t.owner)==null?void 0:v.current;if(!(h instanceof HTMLElement)&&!(h instanceof SVGElement))return!1;const{onUpdate:m,transformTemplate:y}=t.owner.getProps();return gN()&&(Rf.has(s)||zy.has(s)&&mN(d))&&(s!=="transform"||!y)&&!m&&!i&&o!=="mirror"&&l!==0&&u!=="inertia"}const vN=40;class xN extends Ch{constructor(t){var h;super(),this.stop=()=>{var m,y;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=ut.now();const{keyframes:s,name:i,motionValue:o,element:l}=t,u=t;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 d=(l==null?void 0:l.KeyframeResolver)||Th;this.keyframeResolver=new d(s,(m,y,v)=>this.onKeyframesResolved(m,y,u,!v),i,o,l),(h=this.keyframeResolver)==null||h.scheduleResolve()}onKeyframesResolved(t,s,i,o){var T,P;this.keyframeResolver=void 0;const{name:l,type:u,velocity:d,delay:h,isHandoff:m,onUpdate:y}=i;this.resolvedAt=ut.now();let v=!0;hN(t,l,u,d)||(v=!1,(qn.instantAnimations||!h)&&(y==null||y(Wl(t,i,s))),t[0]=t[t.length-1],bf(i),i.repeat=0);const x=o?this.resolvedAt?this.resolvedAt-this.createdAt>vN?this.resolvedAt:this.createdAt:this.createdAt:void 0,{onComplete:C}=i;i.startTime??(i.startTime=x),i.finalKeyframe=s,i.keyframes=t,i.onComplete=()=>{C==null||C(),this.notifyFinished()};const k=v&&!m&&yN(i);let E;if(k){i.element=(P=(T=i.motionValue)==null?void 0:T.owner)==null?void 0:P.current;try{E=new dN(i)}catch{E=new Al(i)}}else E=new Al(i);this.pendingTimeline&&(this.stopTimeline=E.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=E}get finished(){return this._animation?this._animation.finished:super.finished}then(t,s){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),nN()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function cw(e,t,s,i=0,o=1){const l=Array.from(e).sort((m,y)=>m.sortNodePosition(y)).indexOf(t),u=e.size,d=(u-1)*i;return typeof s=="function"?s(l,u):o===1?l*i:d-l*i}const Uy=30,wN=e=>!isNaN(parseFloat(e));class SN{constructor(t,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const o=ut.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=s.owner}setCurrent(t){this.current=t,this.updatedAt=ut.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=wN(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,s){var i;return t==="change"?this.onChangeSubscribe(s):((i=this.events)[t]||(i[t]=new jl)).add(s)}onChangeSubscribe(t){const{events:s}=this;return!s.change&&!this.changeSubscriber?this.changeSubscriber=t:(s.change||(s.change=new jl,s.change.add(this.changeSubscriber),this.changeSubscriber=void 0),s.change.add(t)),()=>{var i;this.changeSubscriber===t?this.changeSubscriber=void 0:(i=s.change)==null||i.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){Le.read(()=>{var t;!this.changeSubscriber&&!((t=this.events.change)!=null&&t.getSize())&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,s){this.passiveEffect=t,this.stopPassiveEffect=s}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,s,i){this.set(s),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,s=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){var i;const{current:t,changeSubscriber:s}=this;s?s(t):(i=this.events.change)==null||i.notify(t)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ut.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Uy)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,Uy);return N1(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(t){return this.stop(),new Promise(s=>{var l;this.hasAnimated=!0;let i=!1,o;o=t(()=>{var u;i=!0,(u=this.events.animationComplete)==null||u.notify(),this.animation===o&&this.clearAnimation(),s()}),i||(this.animation=o),(l=this.events.animationStart)==null||l.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 t,s;(t=this.dependents)==null||t.clear(),(s=this.events.destroy)==null||s.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function fi(e,t){return new SN(e,t)}function dw(e,t){if(e!=null&&e.inherit&&t){const{inherit:s,...i}=e;return{...t,...i}}return e}function Ph(e,t){const s=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return s!==e?dw(s,e):s}const kN={type:"spring",stiffness:500,damping:25,restSpeed:10},CN=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),EN={type:"keyframes",duration:.8},TN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},PN=(e,{keyframes:t})=>t.length>2?EN:jr.has(e)?e.startsWith("scale")?CN(t[1]):kN:TN,NN=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function bN(e){for(const t in e)if(!NN.has(t))return!0;return!1}const Nh=(e,t,s,i={},o,l)=>u=>{const d=Ph(i,e)||{},h=d.delay||i.delay||0;let{elapsed:m=0}=i;m=m-Wt(h);const y={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:t.getVelocity(),...d,delay:-m,onUpdate:x=>{t.set(x),d.onUpdate&&d.onUpdate(x)},onComplete:()=>{u(),d.onComplete&&d.onComplete()},name:e,motionValue:t,element:l?void 0:o};bN(d)||Object.assign(y,PN(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)&&(bf(y),y.delay===0&&(v=!0)),(qn.instantAnimations||qn.skipAnimations||o!=null&&o.shouldSkipAnimations||d.skipAnimations)&&(v=!0,bf(y),y.delay=0),y.allowFlatten=!d.type&&!d.ease,v&&!l&&t.get()!==void 0){const x=Wl(y.keyframes,d);if(x!==void 0){Le.update(()=>{y.onUpdate(x),y.onComplete()});return}}return d.isSync?new Al(y):new xN(y)},RN=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function jN(e){const t=RN.exec(e);if(!t)return[,];const[,s,i,o]=t;return[`--${s??i}`,o]}function fw(e,t,s=1){const[i,o]=jN(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const u=l.trim();return dh(u)?parseFloat(u):u}return gh(o)?fw(o,t,s+1):o}function MN(e){const t=[{},{}];return e==null||e.values.forEach((s,i)=>{t[0][i]=s.get(),t[1][i]=s.getVelocity()}),t}function hw(e,t,s,i){const o=l=>typeof l=="function"?l(s!==void 0?s:e.custom,...MN(i)):l;return t=o(t),typeof t=="string"&&(t=e.variants&&e.variants[t]),o(t)}function ds(e,t,s){return hw(e.getProps(),t,s,e)}const pw=(e,t)=>{var s;return t==="exit"?(s=e.presenceContext)==null?void 0:s.custom:void 0},mw=new Set(["width","height","top","left","right","bottom",...ki]),DN=e=>Array.isArray(e);function AN(e,t,s){e.hasValue(t)?e.getValue(t).set(s):e.addValue(t,fi(s))}function LN(e){return DN(e)?e[e.length-1]||0:e}function IN(e,t){const s=ds(e,t);let{transitionEnd:i={},transition:o={},...l}=s||{};l={...l,...i};for(const u in l){const d=LN(l[u]);AN(e,u,d)}}const ct=e=>!!(e&&e.getVelocity);function FN(e){return!!(ct(e)&&e.add)}function jf(e,t){const s=e.getValue("willChange");if(FN(s))return s.add(t);if(!s&&qn.WillChange){const i=new qn.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function bh(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const _N="framerAppearId",gw="data-"+bh(_N);function yw(e){return e.props[gw]}const ON=typeof window<"u";function VN({protectedKeys:e,needsAnimating:t},s){const i=s in e&&!t[s];return t[s]=!1,i}function vw(e,t,{delay:s=0,transitionOverride:i,type:o}={}){var k;let{transition:l,transitionEnd:u,...d}=t;const h=e.getDefaultTransition();l=l?dw(l,h):h;const m=l==null?void 0:l.reduceMotion,y=l==null?void 0:l.skipAnimations;i&&(l=i);const v=[],x=o&&((k=e.animationState)==null?void 0:k.getState()[o]),C=l==null?void 0:l.path;C&&C.animateVisualElement(e,d,l,s,v);for(const E in d){const T=e.getValue(E,e.latestValues[E]??null),P=d[E];if(P===void 0||x&&VN(x,E))continue;const L={delay:s,...Ph(l||{},E)};y&&(L.skipAnimations=!0);const b=T.get();if(b!==void 0&&!T.isAnimating()&&!Array.isArray(P)&&P===b&&!L.velocity){Le.update(()=>T.set(P));continue}let M=!1;if(ON&&window.MotionHandoffAnimation){const R=yw(e);if(R){const D=window.MotionHandoffAnimation(R,E,Le);D!==null&&(L.startTime=D,M=!0)}}jf(e,E);const _=m??e.shouldReduceMotion;T.start(Nh(E,T,P,_&&mw.has(E)?{type:!1}:L,e,M));const I=T.animation;I&&v.push(I)}if(u){const E=()=>Le.update(()=>{u&&IN(e,u)});v.length?Promise.all(v).then(E):E()}return v}function Mf(e,t,s={}){const i=ds(e,t,pw(e,s.type)),o=s.transitionOverride||((i==null?void 0:i.transition)??(e.getDefaultTransition()||{})),l=()=>Promise.all(i?vw(e,i,s):[]),u=(h=0)=>{const{variantChildren:m}=e,{delayChildren:y=0,staggerChildren:v,staggerDirection:x}=o,C=[];return m==null||m.forEach(k=>{k.notify("AnimationStart",t),C.push(Mf(k,t,{...s,delay:h+(typeof y=="function"?0:y)+cw(m,k,y,v,x)}).then(()=>k.notify("AnimationComplete",t)))}),Promise.all(C)},{when:d}=o;return d?d==="beforeChildren"?l().then(()=>u()):u().then(l):Promise.all([l(),u(s.delay)])}function BN(e,t,s={}){return e.notify("AnimationStart",t),(Array.isArray(t)?Promise.all(t.map(o=>Mf(e,o,s))):typeof t=="string"?Mf(e,t,s):Promise.all(vw(e,ds(e,t,s.custom),s))).then(()=>{e.notify("AnimationComplete",t)})}const zN={test:e=>e==="auto",parse:e=>e},UN=e=>t=>t.test(e),$N=[Si,oe,Rn,Bn,eP,ZT,zN],$y=e=>$N.find(UN(e));function HN(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||fh(e):!0}const KN=new Set(["auto","none","0"]);function WN(e,t,s){let i=0,o;for(;i<e.length&&!o;){const l=e[i];typeof l=="string"&&!KN.has(l)&&oP(l)&&(o=e[i]),i++}if(o&&s)for(const l of t)e[l]!==o&&(e[l]=Eh(s,o))}class qN extends Th{constructor(t,s,i,o,l){super(t,s,i,o,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:s,name:i}=this;if(!s||!s.current)return;super.readKeyframes();for(let y=0;y<t.length;y++){let v=t[y];if(typeof v=="string"&&(v=v.trim(),gh(v))){const x=fw(v,s.current);x!==void 0&&(t[y]=x),y===t.length-1&&(this.finalKeyframe=v)}}if(this.resolveNoneKeyframes(),!mw.has(i)||t.length!==2)return;const[o,l]=t;if(typeof o=="number"&&typeof l=="number")return;const u=$y(o),d=$y(l),h=Ny(o),m=Ny(l);if(h!==m&&us[i]){this.needsMeasurement=!0;return}if(u!==d)if(_y(u)&&_y(d))for(let y=0;y<t.length;y++){const v=t[y];typeof v=="string"&&(t[y]=parseFloat(v))}else us[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:s}=this,i=[];for(let o=0;o<t.length;o++)(t[o]===null||HN(t[o]))&&i.push(o);i.length&&WN(t,i,s)}measure(){const{element:t,name:s}=this;return us[s](window.getComputedStyle(t.current),()=>t.measureViewportBox())}measureInitialState(){var l;const{element:t,unresolvedKeyframes:s,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),s[0]=this.measuredOrigin;const o=s[s.length-1];o!==void 0&&((l=this.motionValue)==null||l.jump(o,!1))}measureEndState(){var l,u;const{element:t,unresolvedKeyframes:s}=this;if(!t||!t.current)return;(l=this.motionValue)==null||l.jump(this.measuredOrigin,!1);const i=s.length-1,o=s[i];s[i]=this.measure(),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([d,h])=>{t.getValue(d).set(h)}),this.resolveNoneKeyframes()}}const Rh=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function vl(e){return T1(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}function jh(e){return T1(e)&&"ownerSVGElement"in e}const Df=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function xw(e,t,s){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const o=(s==null?void 0:s[e])??i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(i=>i!=null)}const QN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},GN=ki.length;function YN(e,t,s){let i="",o=!0;for(let u=0;u<GN;u++){const d=ki[u],h=e[d];if(h===void 0)continue;let m=!0;if(typeof h=="number")m=h===(d.startsWith("scale")?1:0);else{const y=parseFloat(h);m=d.startsWith("scale")?y===1:y===0}if(!m||s){const y=Df(h,Ll[d]);if(!m){o=!1;const v=QN[d]||d;i+=`${v}(${y}) `}s&&(t[d]=y)}}const l=e.pathRotation;return l&&(o=!1,i+=`rotate(${Df(l,Ll.pathRotation)}) `),i=i.trim(),s?i=s(t,o?"":i):o&&(i="none"),i}function Mh(e,t,s){const{style:i,vars:o,transformOrigin:l}=e;let u=!1,d=!1;for(const h in t){const m=t[h];if(jr.has(h)){u=!0;continue}else if(O1(h)){o[h]=m;continue}else{const y=Df(m,Ll[h]);h.startsWith("origin")?(d=!0,l[h]=y):i[h]=y}}if(t.transform||(u||s?i.transform=YN(t,e.transform,s):i.transform&&(i.transform="none")),d){const{originX:h="50%",originY:m="50%",originZ:y=0}=l;i.transformOrigin=`${h} ${m} ${y}`}}const XN={offset:"stroke-dashoffset",array:"stroke-dasharray"},JN={offset:"strokeDashoffset",array:"strokeDasharray"};function ZN(e,t,s=1,i=0,o=!0){e.pathLength=1;const l=o?XN:JN;e[l.offset]=`${-i}`,e[l.array]=`${t} ${s}`}const ww=["transform","opacity","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Sw(e,{attrX:t,attrY:s,attrScale:i,pathLength:o,pathSpacing:l=1,pathOffset:u=0,...d},h,m,y){if(Mh(e,d,m),h){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 ww)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),t!==void 0&&(v.x=t),s!==void 0&&(v.y=s),i!==void 0&&(v.scale=i),o!==void 0&&ZN(v,o,l,u,!1)}function kw({top:e,left:t,right:s,bottom:i}){return{x:{min:t,max:s},y:{min:e,max:i}}}function eb({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function tb(e,t){if(!t)return e;const s=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:s.y,left:s.x,bottom:i.y,right:i.x}}function fd(e){return e===void 0||e===1}function Af({scale:e,scaleX:t,scaleY:s}){return!fd(e)||!fd(t)||!fd(s)}function Yr(e){return Af(e)||Cw(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Cw(e){return Hy(e.x)||Hy(e.y)}function Hy(e){return e&&e!=="0%"}function Il(e,t,s){const i=e-s,o=t*i;return s+o}function Ky(e,t,s,i,o){return o!==void 0&&(e=Il(e,o,i)),Il(e,s,i)+t}function Lf(e,t=0,s=1,i,o){e.min=Ky(e.min,t,s,i,o),e.max=Ky(e.max,t,s,i,o)}function Ew(e,{x:t,y:s}){Lf(e.x,t.translate,t.scale,t.originPoint),Lf(e.y,s.translate,s.scale,s.originPoint)}const Wy=.999999999999,qy=1.0000000000001;function nb(e,t,s,i=!1){var d;const o=s.length;if(!o)return;t.x=t.y=1;let l,u;for(let h=0;h<o;h++){l=s[h],u=l.projectionDelta;const{visualElement:m}=l.options;m&&m.props.style&&m.props.style.display==="contents"||(i&&l.options.layoutScroll&&l.scroll&&l!==l.root&&(Pn(e.x,-l.scroll.offset.x),Pn(e.y,-l.scroll.offset.y)),u&&(t.x*=u.x.scale,t.y*=u.y.scale,Ew(e,u)),i&&Yr(l.latestValues)&&xl(e,l.latestValues,(d=l.layout)==null?void 0:d.layoutBox))}t.x<qy&&t.x>Wy&&(t.x=1),t.y<qy&&t.y>Wy&&(t.y=1)}function Pn(e,t){e.min+=t,e.max+=t}function Qy(e,t,s,i,o=.5){const l=Ae(e.min,e.max,o);Lf(e,t,s,l,i)}function Gy(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function xl(e,t,s){const i=s??e;Qy(e.x,Gy(t.x,i.x),t.scaleX,t.scale,t.originX),Qy(e.y,Gy(t.y,i.y),t.scaleY,t.scale,t.originY)}function Tw(e,t){return kw(tb(e.getBoundingClientRect(),t))}function rb(e,t,s){const i=Tw(e,s),{scroll:o}=t;return o&&(Pn(i.x,o.offset.x),Pn(i.y,o.offset.y)),i}const{schedule:Dh}=W1(queueMicrotask,!1),sn={x:!1,y:!1};function Pw(){return sn.x||sn.y}function sb(e){return e==="x"||e==="y"?sn[e]?null:(sn[e]=!0,()=>{sn[e]=!1}):sn.x||sn.y?null:(sn.x=sn.y=!0,()=>{sn.x=sn.y=!1})}function Nw(e,t){const s=xw(e),i=new AbortController,o={passive:!0,...t,signal:i.signal};return[s,o,()=>i.abort()]}function ib(e){return!(e.pointerType==="touch"||Pw())}function ob(e,t,s={}){const[i,o,l]=Nw(e,s);return i.forEach(u=>{let d=!1,h=!1,m;const y=()=>{u.removeEventListener("pointerleave",k)},v=T=>{m&&(m(T),m=void 0),y()},x=T=>{d=!1,window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x),h&&(h=!1,v(T))},C=()=>{d=!0,window.addEventListener("pointerup",x,o),window.addEventListener("pointercancel",x,o)},k=T=>{if(T.pointerType!=="touch"){if(d){h=!0;return}v(T)}},E=T=>{if(!ib(T))return;h=!1;const P=t(u,T);typeof P=="function"&&(m=P,u.addEventListener("pointerleave",k,o))};u.addEventListener("pointerenter",E,o),u.addEventListener("pointerdown",C,o)}),l}const bw=(e,t)=>t?e===t?!0:bw(e,t.parentElement):!1,Ah=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,ab=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function lb(e){return ab.has(e.tagName)||e.isContentEditable===!0}const ub=new Set(["INPUT","SELECT","TEXTAREA"]);function cb(e){return ub.has(e.tagName)||e.isContentEditable===!0}const wl=new WeakSet;function Yy(e){return t=>{t.key==="Enter"&&e(t)}}function hd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const db=(e,t)=>{const s=e.currentTarget;if(!s)return;const i=Yy(()=>{if(wl.has(s))return;hd(s,"down");const o=Yy(()=>{hd(s,"up")}),l=()=>hd(s,"cancel");s.addEventListener("keyup",o,t),s.addEventListener("blur",l,t)});s.addEventListener("keydown",i,t),s.addEventListener("blur",()=>s.removeEventListener("keydown",i),t)};function Xy(e){return Ah(e)&&!Pw()}const Jy=new WeakSet;function fb(e,t,s={}){const[i,o,l]=Nw(e,s),u=d=>{const h=d.currentTarget;if(!Xy(d)||Jy.has(d))return;wl.add(h),s.stopPropagation&&Jy.add(d);const m=t(h,d),y={...o,capture:!0},v=(k,E)=>{window.removeEventListener("pointerup",x,y),window.removeEventListener("pointercancel",C,y),wl.has(h)&&wl.delete(h),Xy(k)&&typeof m=="function"&&m(k,{success:E})},x=k=>{v(k,h===window||h===document||s.useGlobalTarget||bw(h,k.target))},C=k=>{v(k,!1)};window.addEventListener("pointerup",x,y),window.addEventListener("pointercancel",C,y)};return i.forEach(d=>{(s.useGlobalTarget?window:d).addEventListener("pointerdown",u,o),vl(d)&&(d.addEventListener("focus",m=>db(m,o)),!lb(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),l}const Sl=new WeakMap;let xr;const Rw=(e,t,s)=>(i,o)=>o&&o[0]?o[0][e+"Size"]:jh(i)&&"getBBox"in i?i.getBBox()[t]:i[s],hb=Rw("inline","width","offsetWidth"),pb=Rw("block","height","offsetHeight");function mb({target:e,borderBoxSize:t}){var s;(s=Sl.get(e))==null||s.forEach(i=>{i(e,{get width(){return hb(e,t)},get height(){return pb(e,t)}})})}function gb(e){e.forEach(mb)}function yb(){typeof ResizeObserver>"u"||(xr=new ResizeObserver(gb))}function vb(e,t){xr||yb();const s=xw(e);return s.forEach(i=>{let o=Sl.get(i);o||(o=new Set,Sl.set(i,o)),o.add(t),xr==null||xr.observe(i)}),()=>{s.forEach(i=>{const o=Sl.get(i);o==null||o.delete(t),o!=null&&o.size||xr==null||xr.unobserve(i)})}}const kl=new Set;let qs;function xb(){qs=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};kl.forEach(t=>t(e))},window.addEventListener("resize",qs)}function wb(e){return kl.add(e),qs||xb(),()=>{kl.delete(e),!kl.size&&typeof qs=="function"&&(window.removeEventListener("resize",qs),qs=void 0)}}function Zy(e,t){return typeof e=="function"?wb(e):vb(e,t)}function Sb(e){return jh(e)&&e.tagName==="svg"}const e0=e=>typeof e=="number"?e:parseFloat(e),t0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Qs=()=>({x:t0(),y:t0()}),n0=()=>({min:0,max:0}),Je=()=>({x:n0(),y:n0()}),kb=new WeakMap;function ql(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function bo(e){return typeof e=="string"||Array.isArray(e)}const Lh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],r0=["initial",...Lh];function Ql(e){if(ql(e.animate))return!0;for(let t=0;t<r0.length;t++)if(bo(e[r0[t]]))return!0;return!1}function jw(e){return!!(Ql(e)||e.variants)}function Cb(e,t,s){for(const i in t){const o=t[i],l=s[i];if(ct(o))e.addValue(i,o);else if(ct(l))e.addValue(i,fi(o,{owner:e}));else if(l!==o)if(e.hasValue(i)){const u=e.getValue(i);u.liveStyle===!0?u.jump(o):u.hasAnimated||u.set(o)}else{const u=e.getStaticValue(i);e.addValue(i,fi(u!==void 0?u:o,{owner:e}))}}for(const i in s)t[i]===void 0&&e.removeValue(i);return t}const Fl={current:null},Ih={current:!1},Eb=typeof window<"u";function Mw(){if(Ih.current=!0,!!Eb)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fl.current=e.matches;e.addEventListener("change",t),t()}else Fl.current=!1}const s0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let _l={};function Dw(e){_l=e}function Tb(){return _l}class Pb{scrapeMotionValuesFromProps(t,s,i){return{}}constructor({parent:t,props:s,presenceContext:i,reducedMotionConfig:o,skipAnimations:l,blockInitialAnimation:u,visualState:d},h={}){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=Th,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=ut.now();this.renderScheduledAt<C&&(this.renderScheduledAt=C,Le.render(this.render,!1,!0))};const{latestValues:m,renderState:y}=d;this.latestValues=m,this.baseTarget={...m},this.initialValues=s.initial?{...m}:{},this.renderState=y,this.parent=t,this.props=s,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=l,this.options=h,this.blockInitialAnimation=!!u,this.isControllingVariants=Ql(s),this.isVariantNode=jw(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:v,...x}=this.scrapeMotionValuesFromProps(s,{},this);for(const C in x){const k=x[C];m[C]!==void 0&&ct(k)&&k.set(m[C])}}mount(t){var s,i;if(this.hasBeenMounted)for(const o in this.initialValues)(s=this.values.get(o))==null||s.jump(this.initialValues[o]),this.latestValues[o]=this.initialValues[o];if(this.current=t,kb.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.isVariantNode&&!this.isControllingVariants){let o=this;do o=o.props.inherit!==!1&&o.parent;while(o&&!o.isVariantNode);if(o){const{variantChildren:l}=o;l.add(this),this.removeFromVariantTree=()=>l.delete(this)}}this.values.forEach((o,l)=>this.bindToMotionValue(l,o)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ih.current||Mw(),this.shouldReduceMotion=Fl.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Mr(this.notifyUpdate),Mr(this.render),this.valueSubscriptions.forEach(s=>s()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.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(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,s){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),s.accelerate&&Rf.has(t)&&this.current instanceof HTMLElement){const{factory:u,keyframes:d,times:h,ease:m,duration:y}=s.accelerate,v=new lw({element:this.current,name:t,keyframes:d,times:h,ease:m,duration:Wt(y)}),x=u(v);this.valueSubscriptions.set(t,()=>{x(),v.cancel()});return}const i=jr.has(t);i&&this.onBindTransform&&this.onBindTransform();const o=s.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&Le.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,s)),this.valueSubscriptions.set(t,()=>{o(),l&&l()})}sortNodePosition(t){return!this.current||!t.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in _l){const s=_l[t];if(!s)continue;const{isEnabled:i,Feature:o}=s;if(!this.features[t]&&o&&i(this.props)&&(this.features[t]=new o(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Je()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,s){this.latestValues[t]=s}update(t,s){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let i=0;i<s0.length;i++){const o=s0[i];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const l="on"+o,u=t[l];u&&(this.propEventSubscriptions[o]=this.on(o,u))}this.prevMotionValues=Cb(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(t,s){const i=this.values.get(t);if(s!==i){i&&this.removeValue(t),this.bindToMotionValue(t,s),this.values.set(t,s);const o=s.get();o!==void 0&&(this.latestValues[t]=o)}}removeValue(t){this.values.delete(t);const s=this.valueSubscriptions.get(t);s&&(s(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,s){var o;if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&s!==void 0&&(i=fi(s??((o=this.getDefaultValue)==null?void 0:o.call(this,t)),{owner:this}),this.addValue(t,i)),i}readValue(t,s){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(dh(i)||fh(i))?i=parseFloat(i):typeof i!="number"&&!It.test(i)&&It.test(s)&&(i=Eh(t,s)),this.setBaseTarget(t,ct(i)?i.get():i)),ct(i)?i.get():i}setBaseTarget(t,s){this.baseTarget[t]=s}on(t,s){return this.events[t]||(this.events[t]=new jl),this.events[t].add(s)}notify(t,...s){this.events[t]&&this.events[t].notify(...s)}scheduleRenderMicrotask(){Dh.render(this.render)}}class Aw extends Pb{constructor(){super(...arguments),this.KeyframeResolver=qN}sortInstanceNodePosition(t,s){return t.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(t,s){const i=t.style;return i?i[s]:void 0}removeValueFromRenderState(t,{vars:s,style:i}){delete s[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ct(t)&&(this.childSubscription=t.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}class Ar{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Lw(e,{style:t,vars:s},i,o){const l=e.style;let u;for(u in t)l[u]=t[u];o==null||o.applyProjectionStyles(l,i);for(u in s)l.setProperty(u,s[u])}const Ro={};function Iw(e,{layout:t,layoutId:s}){return jr.has(e)||e.startsWith("origin")||(t||s!==void 0)&&(!!Ro[e]||e==="opacity")}function Fh(e,t,s){var u;const i=e.style,o=t==null?void 0:t.style,l={};if(!i)return l;for(const d in i)(ct(i[d])||o&&ct(o[d])||Iw(d,e)||((u=s==null?void 0:s.getValue(d))==null?void 0:u.liveStyle)!==void 0)&&(l[d]=i[d]);return l}function Nb(e){return window.getComputedStyle(e)}class bb extends Aw{constructor(){super(...arguments),this.type="html",this.renderInstance=Lw}mount(t){Kl(!!t.style),super.mount(t)}readValueFromInstance(t,s){var i;if(jr.has(s))return(i=this.projection)!=null&&i.isProjecting?No(s):YP(t,s);{const o=Nb(t),l=(O1(s)?o.getPropertyValue(s):o[s])||0;return typeof l=="string"?l.trim():l}}measureInstanceViewportBox(t,{transformPagePoint:s}){return Tw(t,s)}build(t,s,i){Mh(t,s,i.transformTemplate)}scrapeMotionValuesFromProps(t,s,i){return Fh(t,s,i)}}const Fw=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"]),_w=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Rb(e,t,s,i){Lw(e,t,void 0,i);for(const o in t.attrs)e.setAttribute(Fw.has(o)?o:bh(o),t.attrs[o])}function Ow(e,t,s){const i=Fh(e,t,s);for(const o in e)if(ct(e[o])||ct(t[o])){const l=ki.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;i[l]=e[o]}return i}class jb extends Aw{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Je}getBaseTargetFromProps(t,s){return jr.has(s)?super.getBaseTargetFromProps(t,s)??No(s):t[s]}getDefaultValue(t){return jr.has(t)?this.latestValues[t]??No(t):void 0}readValueFromInstance(t,s){if(jr.has(s)){const i=ew(s);return i&&i.default||0}if(ww.includes(s)){const o=getComputedStyle(t)[s];if(typeof o=="string"&&o)return o.trim()}return s=Fw.has(s)?s:bh(s),t.getAttribute(s)}scrapeMotionValuesFromProps(t,s,i){return Ow(t,s,i)}build(t,s,i){Sw(t,s,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,s,i,o){Rb(t,s,i,o)}mount(t){this.isSVGTag=_w(t.tagName),super.mount(t)}}function Vw(e,t){if(!Array.isArray(t))return!1;const s=t.length;if(s!==e.length)return!1;for(let i=0;i<s;i++)if(t[i]!==e[i])return!1;return!0}const Mb=[...Lh].reverse();function Db(e){let t=d=>Promise.all(d.map(({animation:h,options:m})=>BN(e,h,m))),s=i0(),i=!0,o=!1;function l(d){var L;const{props:h,parent:m,manuallyAnimateOnMount:y}=e,v=i||o,x=[],C=new Set;let k={},E=1/0,T=e;do T=T.props.inherit!==!1&&T.parent;while(T&&!T.isControllingVariants);if(Mb.forEach((b,M)=>{var ee,ue;const _=s[b],I=h[b],R=T&&T.props[b],D=I!==void 0?I:bo(R)||R===!1?R:void 0,B=bo(D),W=b===d?_.isActive:null;W===!1&&(E=M);const G=B&&I===void 0&&!(v&&y);if(_.protectedKeys={...k},!_.isActive&&W===null||!D&&!_.prevProp||ql(D)||typeof D=="boolean")return;if(b==="exit"&&_.isActive&&W!==!0){k={...k,..._.prevResolvedValues};return}const K=Ab(_.prevProp,D);let U=K||B&&(W&&!G||M>E),X=!1;const ge=Array.isArray(D)?D:[D];let me={};if(W!==!1)for(const J of ge){const{transition:V,transitionEnd:F,...ne}=ds(e,J,pw(e,b))||{};me={...me,...ne,...F}}const{prevResolvedValues:Ee}=_;for(const J in{...Ee,...me}){if(J in k)continue;const V=me[J],F=Ee[J],ne=Array.isArray(V)&&Array.isArray(F)?!Vw(V,F)||K:V!==F;if(ne&&V==null)C.add(J);else if(ne||V!==void 0&&C.has(J)){U=!0,C.delete(J)&&(X=!0),_.needsAnimating[J]=!0;const ye=e.getValue(J);ye&&(ye.liveStyle=!1)}else _.protectedKeys[J]=!0}if(_.prevProp=D,_.prevResolvedValues=me,_.isActive&&(k={...k,...me}),U&&(!(G&&K)||X))for(const J of ge){const V={type:b};if(typeof J=="string"&&v&&y&&(m!=null&&m.enteringChildren)){const F=(ue=(ee=ds(m,J))==null?void 0:ee.transition)==null?void 0:ue.delayChildren;V.delay=cw(m.enteringChildren,e,F)}x.push({animation:J,options:V})}}),C.size){const{initial:b}=h,M={},_=typeof b!="boolean"&&ds(e,Array.isArray(b)?b[0]:b,(L=e.presenceContext)==null?void 0:L.custom);_&&_.transition&&(M.transition=_.transition),C.forEach(I=>{const R=e.getValue(I);R&&(R.liveStyle=!0);const D=_&&!Array.isArray(b)?_[I]:void 0,B=e.getBaseTargetFromProps(h,I);M[I]=(D!==void 0?D:B!==void 0&&!ct(B)?B:e.initialValues[I]===void 0?e.baseTarget[I]:void 0)??null}),x.push({animation:M})}const P=v&&e.blockInitialAnimation||i&&!y&&(h.initial===!1||h.initial===h.animate);return i=o=!1,!P&&x.length?t(x):Promise.resolve()}function u(d,h){var y;if(s[d].isActive===h)return Promise.resolve();(y=e.variantChildren)==null||y.forEach(v=>{var x;return(x=v.animationState)==null?void 0:x.setActive(d,h)}),s[d].isActive=h;const m=l(d);for(const v in s)s[v].protectedKeys={};return m}return{animateChanges:l,setActive:u,setAnimateFunction:d=>{t=d(e)},getState:()=>s,reset:()=>{s=i0(),o=!0}}}function Ab(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Vw(t,e):!1}function i0(){const e={};for(const t of Lh)e[t]={isActive:t==="animate",protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}function If(e,t){e.min=t.min,e.max=t.max}function nn(e,t){If(e.x,t.x),If(e.y,t.y)}function o0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Bw=1e-4,Lb=1-Bw,Ib=1+Bw,zw=.01,Fb=0-zw,_b=0+zw;function Ct(e){return e.max-e.min}function Ob(e,t,s){return Math.abs(e-t)<=s}function a0(e,t,s,i=.5){e.origin=i,e.originPoint=Ae(t.min,t.max,e.origin),e.scale=Ct(s)/Ct(t),e.translate=Ae(s.min,s.max,e.origin)-e.originPoint,(e.scale>=Lb&&e.scale<=Ib||isNaN(e.scale))&&(e.scale=1),(e.translate>=Fb&&e.translate<=_b||isNaN(e.translate))&&(e.translate=0)}function wo(e,t,s,i){a0(e.x,t.x,s.x,i?i.originX:void 0),a0(e.y,t.y,s.y,i?i.originY:void 0)}function l0(e,t,s,i=0){const o=i?Ae(s.min,s.max,i):s.min;e.min=o+t.min,e.max=e.min+Ct(t)}function Vb(e,t,s,i){l0(e.x,t.x,s.x,i==null?void 0:i.x),l0(e.y,t.y,s.y,i==null?void 0:i.y)}function u0(e,t,s,i=0){const o=i?Ae(s.min,s.max,i):s.min;e.min=t.min-o,e.max=e.min+Ct(t)}function Ol(e,t,s,i){u0(e.x,t.x,s.x,i==null?void 0:i.x),u0(e.y,t.y,s.y,i==null?void 0:i.y)}function c0(e,t,s,i,o){return e-=t,e=Il(e,1/s,i),o!==void 0&&(e=Il(e,1/o,i)),e}function Bb(e,t=0,s=1,i=.5,o,l=e,u=e){if(Rn.test(t)&&(t=parseFloat(t),t=Ae(u.min,u.max,t/100)-u.min),typeof t!="number")return;let d=Ae(l.min,l.max,i);e===l&&(d-=t),e.min=c0(e.min,t,s,d,o),e.max=c0(e.max,t,s,d,o)}function d0(e,t,[s,i,o],l,u){Bb(e,t[s],t[i],t[o],t.scale,l,u)}const zb=["x","scaleX","originX"],Ub=["y","scaleY","originY"];function f0(e,t,s,i){d0(e.x,t,zb,s?s.x:void 0,i?i.x:void 0),d0(e.y,t,Ub,s?s.y:void 0,i?i.y:void 0)}function h0(e){return e.translate===0&&e.scale===1}function Uw(e){return h0(e.x)&&h0(e.y)}function p0(e,t){return e.min===t.min&&e.max===t.max}function $b(e,t){return p0(e.x,t.x)&&p0(e.y,t.y)}function m0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function $w(e,t){return m0(e.x,t.x)&&m0(e.y,t.y)}function g0(e){return Ct(e.x)/Ct(e.y)}function y0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function kn(e){return[e("x"),e("y")]}function v0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ho={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(oe.test(e))e=parseFloat(e);else return e;const s=v0(e,t.target.x),i=v0(e,t.target.y);return`${s}% ${i}%`}},Hb={correct:(e,{treeScale:t,projectionDelta:s})=>{const i=e,o=It.parse(e);if(o.length>5)return i;const l=It.createTransformer(e),u=typeof o[0]!="number"?1:0,d=s.x.scale*t.x,h=s.y.scale*t.y;o[0+u]/=d,o[1+u]/=h;const m=Ae(d,h,.5);return typeof o[2+u]=="number"&&(o[2+u]/=m),typeof o[3+u]=="number"&&(o[3+u]/=m),l(o)}};function Kb(e,t,s){let i="";const o=e.x.translate/t.x,l=e.y.translate/t.y,u=(s==null?void 0:s.z)||0;if((o||l||u)&&(i=`translate3d(${o}px, ${l}px, ${u}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),s){const{transformPerspective:m,rotate:y,pathRotation:v,rotateX:x,rotateY:C,skewX:k,skewY:E}=s;m&&(i=`perspective(${m}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) `),E&&(i+=`skewY(${E}deg) `)}const d=e.x.scale*t.x,h=e.y.scale*t.y;return(d!==1||h!==1)&&(i+=`scale(${d}, ${h})`),i||"none"}const Wb=Rh.length,x0=e=>typeof e=="number"||oe.test(e);function qb(e,t,s,i,o,l){o?(e.opacity=Ae(0,s.opacity??1,Qb(i)),e.opacityExit=Ae(t.opacity??1,0,Gb(i))):l&&(e.opacity=Ae(t.opacity??1,s.opacity??1,i));for(let u=0;u<Wb;u++){const d=Rh[u];let h=w0(t,d),m=w0(s,d);if(h===void 0&&m===void 0)continue;h||(h=0),m||(m=0),h===0||m===0||x0(h)===x0(m)?(e[d]=Math.max(Ae(e0(h),e0(m),i),0),(Rn.test(m)||Rn.test(h))&&(e[d]+="%")):e[d]=m}(t.rotate||s.rotate)&&(e.rotate=Ae(t.rotate||0,s.rotate||0,i))}function w0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Qb=Hw(0,.5,L1),Gb=Hw(.5,.95,dn);function Hw(e,t,s){return i=>i<e?0:i>t?1:s(Eo(e,t,i))}function Yb(e,t,s){const i=ct(e)?e:fi(e);return i.start(Nh("",i,t,s)),i.animation}function jo(e,t,s,i={passive:!0}){return e.addEventListener(t,s,i),()=>e.removeEventListener(t,s,i)}const Xb=(e,t)=>e.depth-t.depth;class Jb{constructor(){this.children=[],this.isDirty=!1}add(t){ch(this.children,t),this.isDirty=!0}remove(t){Rl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Xb),this.isDirty=!1,this.children.forEach(t)}}function Zb(e,t){const s=ut.now(),i=({timestamp:o})=>{const l=o-s;l>=t&&(Mr(i),e(l-t))};return Le.setup(i,!0),()=>Mr(i)}function Cl(e){return ct(e)?e.get():e}class eR{constructor(){this.members=[]}add(t){ch(this.members,t);for(let s=this.members.length-1;s>=0;s--){const i=this.members[s];if(i===t||i===this.lead||i===this.prevLead)continue;const o=i.instance;(!o||o.isConnected===!1)&&!i.snapshot&&(Rl(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(Rl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(t){var s;for(let i=this.members.indexOf(t)-1;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1&&((s=o.instance)==null?void 0:s.isConnected)!==!1)return this.promote(o),!0}return!1}promote(t,s){var o;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();const{layoutDependency:l}=i.options,{layoutDependency:u}=t.options;(l===void 0||l!==u)&&(t.resumeFrom=i,s&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),(o=t.root)!=null&&o.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var s,i,o,l,u;(i=(s=t.options).onExitComplete)==null||i.call(s),(u=(o=t.resumingFrom)==null?void 0:(l=o.options).onExitComplete)==null||u.call(l)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const tR={borderRadius:{...ho,applyTo:[...Rh]},borderTopLeftRadius:ho,borderTopRightRadius:ho,borderBottomLeftRadius:ho,borderBottomRightRadius:ho,boxShadow:Hb},El={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(Ro,{...tR,...Ro});const pd=["","X","Y","Z"],nR=1e3;let rR=0;function md(e,t,s,i){const{latestValues:o}=t;o[e]&&(s[e]=o[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Kw(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const s=yw(t);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:o,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(s,"transform",Le,!(o||l))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&Kw(i)}function Ww({attachResizeListener:e,defaultParent:t,measureScroll:s,checkIsScrollRoot:i,resetTransform:o}){return class{constructor(u={},d=t==null?void 0:t()){this.id=rR++,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(oR),this.nodes.forEach(hR),this.nodes.forEach(pR),this.nodes.forEach(aR)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=d?d.root||d:this,this.path=d?[...d.path,d]:[],this.parent=d,this.depth=d?d.depth+1:0;for(let h=0;h<this.path.length;h++)this.path[h].shouldResetTransform=!0;this.root===this&&(this.nodes=new Jb)}addEventListener(u,d){return this.eventHandlers.has(u)||this.eventHandlers.set(u,new jl),this.eventHandlers.get(u).add(d)}notifyListeners(u,...d){const h=this.eventHandlers.get(u);h&&h.notify(...d)}hasListeners(u){return this.eventHandlers.has(u)}mount(u){if(this.instance)return;this.isSVG=jh(u)&&!Sb(u),this.instance=u;const{layoutId:d,layout:h,visualElement:m}=this.options;if(m&&!m.current&&m.mount(u),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(h||d)&&(this.isLayoutDirty=!0),e){let y,v=0;const x=()=>this.root.updateBlockedByResize=!1;Le.read(()=>{v=window.innerWidth}),e(u,()=>{const C=window.innerWidth;C!==v&&(v=C,this.root.updateBlockedByResize=!0,y&&y(),y=Zb(x,250),El.hasAnimatedSinceResize&&(El.hasAnimatedSinceResize=!1,this.nodes.forEach(C0)))})}d&&this.root.registerSharedNode(d,this),this.options.animate!==!1&&m&&(d||h)&&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||m.getDefaultTransition()||xR,{onLayoutAnimationStart:E,onLayoutAnimationComplete:T}=m.getProps(),P=!this.targetLayout||!$w(this.targetLayout,C),L=!v&&x;if(this.options.layoutRoot||this.resumeFrom||L||v&&(P||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...Ph(k,"layout"),onPlay:E,onComplete:T};(m.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(y,L,b.path)}else v||C0(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(),Mr(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(mR),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&&Kw(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:d,layout:h}=this.options;if(d===void 0&&!h)return;const m=this.getTransformTemplate();this.prevTransformTemplateValue=m?m(this.latestValues,""):void 0,this.updateSnapshot(),u&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const h=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),h&&this.nodes.forEach(uR),this.nodes.forEach(S0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(k0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(cR),this.nodes.forEach(dR),this.nodes.forEach(fR),this.nodes.forEach(sR),this.nodes.forEach(iR)):this.nodes.forEach(k0),this.clearAllSnapshots();const d=ut.now();Ze.delta=Qn(0,1e3/60,d-Ze.timestamp),Ze.timestamp=d,Ze.isProcessing=!0,ld.update.process(Ze),ld.preRender.process(Ze),ld.render.process(Ze),Ze.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Dh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(lR),this.sharedNodes.forEach(gR)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Le.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ct(this.snapshot.measuredBox.x)&&!Ct(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 h=0;h<this.path.length;h++)this.path[h].updateScroll();const u=this.layout;this.layout=this.measure(!1),this.layoutCorrected||(this.layoutCorrected=Je()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:d}=this.options;d&&d.notify("LayoutMeasure",this.layout.layoutBox,u?u.layoutBox:void 0)}updateScroll(u="measure"){let d=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===u&&(d=!1),d&&this.instance){const h=i(this.instance);this.scroll={animationId:this.root.animationId,phase:u,isRoot:h,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:h}}}resetTransform(){if(!o)return;const u=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,d=this.projectionDelta&&!Uw(this.projectionDelta),h=this.getTransformTemplate(),m=h?h(this.latestValues,""):void 0,y=m!==this.prevTransformTemplateValue;u&&this.instance&&(d||Yr(this.latestValues)||y)&&(o(this.instance,m),this.shouldResetTransform=!1,this.scheduleRender())}measure(u=!0){const d=this.measurePageBox();let h=this.removeElementScroll(d);return u&&(h=this.removeTransform(h)),wR(h),{animationId:this.root.animationId,measuredBox:d,layoutBox:h,latestValues:{},source:this.id}}measurePageBox(){var m;const{visualElement:u}=this.options;if(!u)return Je();const d=u.measureViewportBox();if(!(((m=this.scroll)==null?void 0:m.wasRoot)||this.path.some(SR))){const{scroll:y}=this.root;y&&(Pn(d.x,y.offset.x),Pn(d.y,y.offset.y))}return d}removeElementScroll(u){var h;const d=Je();if(nn(d,u),(h=this.scroll)!=null&&h.wasRoot)return d;for(let m=0;m<this.path.length;m++){const y=this.path[m],{scroll:v,options:x}=y;y!==this.root&&v&&x.layoutScroll&&(v.wasRoot&&nn(d,u),Pn(d.x,v.offset.x),Pn(d.y,v.offset.y))}return d}applyTransform(u,d=!1,h){var y,v;const m=h||Je();nn(m,u);for(let x=0;x<this.path.length;x++){const C=this.path[x];!d&&C.options.layoutScroll&&C.scroll&&C!==C.root&&(Pn(m.x,-C.scroll.offset.x),Pn(m.y,-C.scroll.offset.y)),Yr(C.latestValues)&&xl(m,C.latestValues,(y=C.layout)==null?void 0:y.layoutBox)}return Yr(this.latestValues)&&xl(m,this.latestValues,(v=this.layout)==null?void 0:v.layoutBox),m}removeTransform(u){var h;const d=Je();nn(d,u);for(let m=0;m<this.path.length;m++){const y=this.path[m];if(!Yr(y.latestValues))continue;let v;y.instance&&(Af(y.latestValues)&&y.updateSnapshot(),v=Je(),nn(v,y.measurePageBox())),f0(d,y.latestValues,(h=y.snapshot)==null?void 0:h.layoutBox,v)}return Yr(this.latestValues)&&f0(d,this.latestValues),d}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!==Ze.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(u=!1){var C;const d=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=d.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=d.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=d.isSharedProjectionDirty);const h=!!this.resumingFrom||this!==d;if(!(u||h&&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=Ze.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=Je(),this.targetWithTransforms=Je()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Vb(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):nn(this.target,this.layout.layoutBox),Ew(this.target,this.targetDelta)):nn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&x&&!!x.resumingFrom==!!this.resumingFrom&&!x.options.layoutScroll&&x.target&&this.animationProgress!==1?this.createRelativeTarget(x,this.target,x.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Af(this.parent.latestValues)||Cw(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,d,h){this.relativeParent=u,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Je(),this.relativeTargetOrigin=Je(),Ol(this.relativeTargetOrigin,d,h,this.options.layoutAnchor||void 0),nn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var k;const u=this.getLead(),d=!!this.resumingFrom||this!==u;let h=!0;if((this.isProjectionDirty||(k=this.parent)!=null&&k.isProjectionDirty)&&(h=!1),d&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(h=!1),this.resolvedRelativeTargetAt===Ze.timestamp&&(h=!1),h)return;const{layout:m,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||!(m||y))return;nn(this.layoutCorrected,this.layout.layoutBox);const v=this.treeScale.x,x=this.treeScale.y;nb(this.layoutCorrected,this.treeScale,this.path,d),u.layout&&!u.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(u.target=u.layout.layoutBox,u.targetWithTransforms=Je());const{target:C}=u;if(!C){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(o0(this.prevProjectionDelta.x,this.projectionDelta.x),o0(this.prevProjectionDelta.y,this.projectionDelta.y)),wo(this.projectionDelta,this.layoutCorrected,C,this.latestValues),(this.treeScale.x!==v||this.treeScale.y!==x||!y0(this.projectionDelta.x,this.prevProjectionDelta.x)||!y0(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 d;if((d=this.options.visualElement)==null||d.scheduleRender(),u){const h=this.getStack();h&&h.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Qs(),this.projectionDelta=Qs(),this.projectionDeltaWithTransform=Qs()}setAnimationOrigin(u,d=!1,h){const m=this.snapshot,y=m?m.latestValues:{},v={...this.latestValues},x=Qs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!d;const C=Je(),k=m?m.source:void 0,E=this.layout?this.layout.source:void 0,T=k!==E,P=this.getStack(),L=!P||P.members.length<=1,b=!!(T&&!L&&this.options.crossfade===!0&&!this.path.some(vR));this.animationProgress=0;let M;const _=h==null?void 0:h.interpolateProjection(u);this.mixTargetDelta=I=>{const R=I/1e3,D=_==null?void 0:_(R);D?(x.x.translate=D.x,x.x.scale=Ae(u.x.scale,1,R),x.x.origin=u.x.origin,x.x.originPoint=u.x.originPoint,x.y.translate=D.y,x.y.scale=Ae(u.y.scale,1,R),x.y.origin=u.y.origin,x.y.originPoint=u.y.originPoint):(E0(x.x,u.x,R),E0(x.y,u.y,R)),this.setTargetDelta(x),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ol(C,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),yR(this.relativeTarget,this.relativeTargetOrigin,C,R),M&&$b(this.relativeTarget,M)&&(this.isProjectionDirty=!1),M||(M=Je()),nn(M,this.relativeTarget)),T&&(this.animationValues=v,qb(v,y,this.latestValues,R,b,L)),D&&D.rotate!==void 0&&(this.animationValues||(this.animationValues=v),this.animationValues.pathRotation=D.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){var d,h,m;this.notifyListeners("animationStart"),(d=this.currentAnimation)==null||d.stop(),(m=(h=this.resumingFrom)==null?void 0:h.currentAnimation)==null||m.stop(),this.pendingAnimation&&(Mr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Le.update(()=>{El.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=fi(0)),this.motionValue.jump(0,!1),this.currentAnimation=Yb(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()}}),VP(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(nR),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead(),{targetWithTransforms:d,layout:h,latestValues:m}=u;let{target:y}=u;if(!(!d||!y||!h)){if(this!==u&&this.layout&&h&&qw(this.options.animationType,this.layout.layoutBox,h.layoutBox)){y=this.target||Je();const v=Ct(this.layout.layoutBox.x);y.x.min=u.target.x.min,y.x.max=y.x.min+v;const x=Ct(this.layout.layoutBox.y);y.y.min=u.target.y.min,y.y.max=y.y.min+x}nn(d,y),xl(d,m),wo(this.projectionDeltaWithTransform,this.layoutCorrected,d,m)}}registerSharedNode(u,d){this.sharedNodes.has(u)||this.sharedNodes.set(u,new eR),this.sharedNodes.get(u).add(d);const m=d.options.initialPromotionConfig;d.promote({transition:m?m.transition:void 0,preserveFollowOpacity:m&&m.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(d):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){var d;const{layoutId:u}=this.options;return u?((d=this.getStack())==null?void 0:d.lead)||this:this}getPrevLead(){var d;const{layoutId:u}=this.options;return u?(d=this.getStack())==null?void 0:d.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:d,preserveFollowOpacity:h}={}){const m=this.getStack();m&&m.promote(this,h),u&&(this.projectionDelta=void 0,this.needsReset=!0),d&&this.setOptions({transition:d})}relegate(){const u=this.getStack();return u?u.relegate(this):!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;let d=!1;const{latestValues:h}=u;if((h.z||h.rotate||h.rotateX||h.rotateY||h.rotateZ||h.skewX||h.skewY)&&(d=!0),!d)return;const m={};h.z&&md("z",u,m,this.animationValues);for(let y=0;y<pd.length;y++)md(`rotate${pd[y]}`,u,m,this.animationValues),md(`skew${pd[y]}`,u,m,this.animationValues);u.render();for(const y in m)u.setStaticValue(y,m[y]),this.animationValues&&(this.animationValues[y]=m[y]);u.scheduleRender()}applyProjectionStyles(u,d){if(!this.instance||this.isSVG)return;if(!this.isVisible){u.visibility="hidden";return}const h=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,u.visibility="",u.opacity="",u.pointerEvents=Cl(d==null?void 0:d.pointerEvents)||"",u.transform=h?h(this.latestValues,""):"none";return}const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){this.options.layoutId&&(u.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,u.pointerEvents=Cl(d==null?void 0:d.pointerEvents)||""),this.hasProjected&&!Yr(this.latestValues)&&(u.transform=h?h({},""):"none",this.hasProjected=!1);return}u.visibility="";const y=m.animationValues||m.latestValues;this.applyTransformsToTarget();let v=Kb(this.projectionDeltaWithTransform,this.treeScale,y);h&&(v=h(y,v)),u.transform=v;const{x,y:C}=this.projectionDelta;u.transformOrigin=`${x.origin*100}% ${C.origin*100}% 0`,m.animationValues?u.opacity=m===this?y.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:y.opacityExit:u.opacity=m===this?y.opacity!==void 0?y.opacity:"":y.opacityExit!==void 0?y.opacityExit:0;for(const k in Ro){if(y[k]===void 0)continue;const{correct:E,applyTo:T,isCSSVariable:P}=Ro[k],L=v==="none"?y[k]:E(y[k],m);if(T){const b=T.length;for(let M=0;M<b;M++)u[T[M]]=L}else P?this.options.visualElement.renderState.vars[k]=L:u[k]=L}this.options.layoutId&&(u.pointerEvents=m===this?Cl(d==null?void 0:d.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(u=>{var d;return(d=u.currentAnimation)==null?void 0:d.stop()}),this.root.nodes.forEach(S0),this.root.sharedNodes.clear()}}}function sR(e){e.updateLayout()}function iR(e){var s;const t=((s=e.resumeFrom)==null?void 0:s.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:o}=e.layout,{animationType:l}=e.options,u=t.source!==e.layout.source;if(l==="size")kn(v=>{const x=u?t.measuredBox[v]:t.layoutBox[v],C=Ct(x);x.min=i[v].min,x.max=x.min+C});else if(l==="x"||l==="y"){const v=l==="x"?"y":"x";If(u?t.measuredBox[v]:t.layoutBox[v],i[v])}else qw(l,t.layoutBox,i)&&kn(v=>{const x=u?t.measuredBox[v]:t.layoutBox[v],C=Ct(i[v]);x.max=x.min+C,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[v].max=e.relativeTarget[v].min+C)});const d=Qs();wo(d,i,t.layoutBox);const h=Qs();u?wo(h,e.applyTransform(o,!0),t.measuredBox):wo(h,i,t.layoutBox);const m=!Uw(d);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,E=Je();Ol(E,t.layoutBox,x.layoutBox,k);const T=Je();Ol(T,i,C.layoutBox,k),$w(E,T)||(y=!0),v.options.layoutRoot&&(e.relativeTarget=T,e.relativeTargetOrigin=E,e.relativeParent=v)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:h,layoutDelta:d,hasLayoutChanged:m,hasRelativeLayoutChanged:y})}else if(e.isLead()){const{onExitComplete:i}=e.options;i&&i()}e.options.transition=void 0}function oR(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 aR(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function lR(e){e.clearSnapshot()}function S0(e){e.clearMeasurements()}function uR(e){e.isLayoutDirty=!0,e.updateLayout()}function k0(e){e.isLayoutDirty=!1}function cR(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function dR(e){var t;e.relativeTarget&&((t=e.relativeParent)!=null&&t.isLayoutDirty)&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function fR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function C0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function hR(e){e.resolveTargetDelta()}function pR(e){e.calcProjection()}function mR(e){e.resetSkewAndRotation()}function gR(e){e.removeLeadSnapshot()}function E0(e,t,s){e.translate=Ae(t.translate,0,s),e.scale=Ae(t.scale,1,s),e.origin=t.origin,e.originPoint=t.originPoint}function T0(e,t,s,i){e.min=Ae(t.min,s.min,i),e.max=Ae(t.max,s.max,i)}function yR(e,t,s,i){T0(e.x,t.x,s.x,i),T0(e.y,t.y,s.y,i)}function vR(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xR={duration:.45,ease:[.4,0,.1,1]},P0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),N0=P0("applewebkit/")&&!P0("chrome/")?Math.round:dn;function b0(e){e.min=N0(e.min),e.max=N0(e.max)}function wR(e){b0(e.x),b0(e.y)}function qw(e,t,s){return e==="position"||e==="preserve-aspect"&&!Ob(g0(t),g0(s),.2)}function SR(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const kR=Ww({attachResizeListener:(e,t)=>jo(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),gd={current:void 0},Qw=Ww({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!gd.current){const e=new kR({});e.mount(window),e.setOptions({layoutScroll:!0}),gd.current=e}return gd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),_h=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function R0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function CR(...e){return t=>{let s=!1;const i=e.map(o=>{const l=R0(o,t);return!s&&typeof l=="function"&&(s=!0),l});if(s)return()=>{for(let o=0;o<i.length;o++){const l=i[o];typeof l=="function"?l():R0(e[o],null)}}}}function ER(...e){return S.useCallback(CR(...e),e)}class TR extends S.Component{getSnapshotBeforeUpdate(t){const s=this.props.childRef.current;if(vl(s)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=s.offsetParent,o=vl(i)&&i.offsetWidth||0,l=vl(i)&&i.offsetHeight||0,u=getComputedStyle(s),d=this.props.sizeRef.current;d.height=parseFloat(u.height),d.width=parseFloat(u.width),d.top=s.offsetTop,d.left=s.offsetLeft,d.right=o-d.width-d.left,d.bottom=l-d.height-d.top,d.direction=u.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function PR({children:e,isPresent:t,anchorX:s,anchorY:i,root:o,pop:l}){var x;const u=S.useId(),d=S.useRef(null),h=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:m}=S.useContext(_h),y=l!==!1?((x=e.props)==null?void 0:x.ref)??(e==null?void 0:e.ref):void 0,v=ER(d,y);return S.useInsertionEffect(()=>{const{width:C,height:k,top:E,left:T,right:P,bottom:L,direction:b}=h.current;if(t||l===!1||!d.current||!C||!k)return;const M=b==="rtl",_=s==="left"?M?`right: ${P}`:`left: ${T}`:M?`left: ${T}`:`right: ${P}`,I=i==="bottom"?`bottom: ${L}`:`top: ${E}`;d.current.dataset.motionPopId=u;const R=document.createElement("style");m&&(R.nonce=m);const D=o??document.head;return D.appendChild(R),R.sheet&&R.sheet.insertRule(`
332
- [data-motion-pop-id="${u}"] {
333
- position: absolute !important;
334
- width: ${C}px !important;
335
- height: ${k}px !important;
336
- ${_}px !important;
337
- ${I}px !important;
338
- }
339
- `),()=>{var B;(B=d.current)==null||B.removeAttribute("data-motion-pop-id"),D.contains(R)&&D.removeChild(R)}},[t]),p.jsx(TR,{isPresent:t,childRef:d,sizeRef:h,pop:l,children:l===!1?e:S.cloneElement(e,{ref:v})})}const NR=({children:e,initial:t,isPresent:s,onExitComplete:i,custom:o,presenceAffectsLayout:l,mode:u,anchorX:d,anchorY:h,root:m})=>{const y=uh(bR),v=S.useId(),x=S.useRef(s),C=S.useRef(i);Co(()=>{x.current=s,C.current=i});let k=!0,E=S.useMemo(()=>(k=!1,{id:v,initial:t,isPresent:s,custom:o,onExitComplete:T=>{y.set(T,!0);for(const P of y.values())if(!P)return;i&&i()},register:T=>(y.set(T,!1),()=>{var P;y.delete(T),!x.current&&!y.size&&((P=C.current)==null||P.call(C))})}),[s,y,i]);return l&&k&&(E={...E}),S.useMemo(()=>{y.forEach((T,P)=>y.set(P,!1))},[s]),S.useEffect(()=>{!s&&!y.size&&i&&i()},[s]),e=p.jsx(PR,{pop:u==="popLayout",isPresent:s,anchorX:d,anchorY:h,root:m,children:e}),p.jsx(Hl.Provider,{value:E,children:e})};function bR(){return new Map}function Gw(e=!0){const t=S.useContext(Hl);if(t===null)return[!0,null];const{isPresent:s,onExitComplete:i,register:o}=t,l=S.useId();S.useEffect(()=>{if(e)return o(l)},[e]);const u=S.useCallback(()=>e&&i&&i(l),[l,i,e]);return!s&&i?[!1,u]:[!0]}const po=e=>e.key||"";function j0(e){const t=[];return S.Children.forEach(e,s=>{S.isValidElement(s)&&t.push(s)}),t}const Lr=({children:e,custom:t,initial:s=!0,onExitComplete:i,presenceAffectsLayout:o=!0,mode:l="sync",propagate:u=!1,anchorX:d="left",anchorY:h="top",root:m})=>{const[y,v]=Gw(u),x=S.useMemo(()=>j0(e),[e]),C=u&&!y?[]:x.map(po),k=S.useRef(!0),E=uh(()=>new Map),T=S.useRef(new Set),[P,L]=S.useState(x),[b,M]=S.useState(x);Co(()=>{u&&!y&&!b.length&&(v==null||v())},[y,u,b.length,v]),Co(()=>{k.current=!1;for(let R=0;R<b.length;R++){const D=po(b[R]);C.includes(D)?(E.delete(D),T.current.delete(D)):E.get(D)!==!0&&E.set(D,!1)}},[b,C.length,C.join("-")]);const _=[];if(x!==P){let R=[...x],D=0;for(const B of b){const W=C.indexOf(po(B));W===-1?(R.splice(D++,0,B),_.push(B)):D=W+_.length+1}return _.every(B=>E.get(po(B)))?R=x:l==="wait"&&(R=_),M(j0(R)),L(x),null}const{forceRender:I}=S.useContext(lh);return p.jsx(p.Fragment,{children:b.map(R=>{const D=po(R),B=u&&!y?!1:x===b||C.includes(D),W=()=>{if(T.current.has(D))return;if(E.has(D))T.current.add(D),E.set(D,!0);else return;let G=!0;E.forEach(K=>{K||(G=!1)}),G&&(I==null||I(),L([]),u&&(v==null||v()),i&&i())};return p.jsx(NR,{isPresent:B,initial:!k.current||s?void 0:!1,custom:t,presenceAffectsLayout:o,mode:l,root:m,onExitComplete:B?void 0:W,anchorX:d,anchorY:h,children:R},D)})})},Yw=S.createContext({strict:!1}),M0={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 D0=!1;function RR(){if(D0)return;const e={};for(const t in M0)e[t]={isEnabled:s=>M0[t].some(i=>!!s[i])};Dw(e),D0=!0}function Xw(){return RR(),Tb()}function jR(e){const t=Xw();for(const s in e)t[s]={...t[s],...e[s]};Dw(t)}const Gl=S.createContext({});function MR(e,t){if(Ql(e)){const{initial:s,animate:i}=e;return{initial:s===!1||bo(s)?s:void 0,animate:bo(i)?i:void 0}}return e.inherit!==!1?t:{}}function DR(e){const{initial:t,animate:s}=MR(e,S.useContext(Gl));return S.useMemo(()=>({initial:t,animate:s}),[A0(t),A0(s)])}function A0(e){return Array.isArray(e)?e.join(" "):e}const Oh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Jw(e,t,s){for(const i in t)!ct(t[i])&&!Iw(i,s)&&(e[i]=t[i])}function AR({transformTemplate:e},t){return S.useMemo(()=>{const s=Oh();return Mh(s,t,e),Object.assign({},s.vars,s.style)},[t])}function LR(e,t){const s=e.style||{},i={};return Jw(i,s,e),Object.assign(i,AR(e,t)),i}function IR(e,t){const s={},i=LR(e,t);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 Zw=()=>({...Oh(),attrs:{}});function FR(e,t,s,i){const o=S.useMemo(()=>{const l=Zw();return Sw(l,t,_w(i),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};Jw(l,e.style,e),o.style={...l,...o.style}}return o}const _R=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 Vl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||_R.has(e)}function OR(e,t){return e.startsWith("on")?!Vl(e):(t==null?void 0:t(e))??!Vl(e)}function VR(e,t,s,i){const o={};for(const l in e)l==="values"&&typeof e.values=="object"||ct(e[l])||(OR(l,i)||s===!0&&Vl(l)||!t&&!Vl(l)||e.draggable&&l.startsWith("onDrag"))&&(o[l]=e[l]);return o}const BR=["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 Vh(e){return typeof e!="string"||e.includes("-")?!1:!!(BR.indexOf(e)>-1||/[A-Z]/u.test(e))}function zR(e,t,s,{latestValues:i},o,l=!1,u,d){const m=(u??Vh(e)?FR:IR)(t,i,o,e),y=VR(t,typeof e=="string",l,d),v=e!==S.Fragment?{...y,...m,ref:s}:{},{children:x}=t,C=S.useMemo(()=>ct(x)?x.get():x,[x]);return S.createElement(e,{...v,children:C})}function UR({scrapeMotionValuesFromProps:e,createRenderState:t},s,i,o){return{latestValues:$R(s,i,o,e),renderState:t()}}function $R(e,t,s,i){const o={},l=i(e,{});for(const x in l)o[x]=Cl(l[x]);let{initial:u,animate:d}=e;const h=Ql(e),m=jw(e);t&&m&&!h&&e.inherit!==!1&&(u===void 0&&(u=t.initial),d===void 0&&(d=t.animate));let y=s?s.initial===!1:!1;y=y||u===!1;const v=y?d:u;if(v&&typeof v!="boolean"&&!ql(v)){const x=Array.isArray(v)?v:[v];for(let C=0;C<x.length;C++){const k=hw(e,x[C]);if(k){const{transitionEnd:E,transition:T,...P}=k;for(const L in P){let b=P[L];if(Array.isArray(b)){const M=y?b.length-1:0;b=b[M]}b!==null&&(o[L]=b)}for(const L in E)o[L]=E[L]}}}return o}const eS=e=>(t,s)=>{const i=S.useContext(Gl),o=S.useContext(Hl),l=()=>UR(e,t,i,o);return s?l():uh(l)},HR=eS({scrapeMotionValuesFromProps:Fh,createRenderState:Oh}),KR=eS({scrapeMotionValuesFromProps:Ow,createRenderState:Zw}),WR=Symbol.for("motionComponentSymbol");function qR(e,t,s){const i=S.useRef(s);S.useInsertionEffect(()=>{i.current=s});const o=S.useRef(null);return S.useCallback(l=>{var d;l&&((d=e.onMount)==null||d.call(e,l)),t&&(l?t.mount(l):t.unmount());const u=i.current;if(typeof u=="function")if(l){const h=u(l);typeof h=="function"&&(o.current=h)}else o.current?(o.current(),o.current=null):u(l);else u&&(u.current=l)},[t])}const tS=S.createContext({});function Ks(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function QR(e,t,s,i,o,l){var b,M;const{visualElement:u}=S.useContext(Gl),d=S.useContext(Yw),h=S.useContext(Hl),m=S.useContext(_h),y=m.reducedMotion,v=m.skipAnimations,x=S.useRef(null),C=S.useRef(!1);i=i||d.renderer,!x.current&&i&&(x.current=i(e,{visualState:t,parent:u,props:s,presenceContext:h,blockInitialAnimation:h?h.initial===!1:!1,reducedMotionConfig:y,skipAnimations:v,isSVG:l}),C.current&&x.current&&(x.current.manuallyAnimateOnMount=!0));const k=x.current,E=S.useContext(tS);k&&!k.projection&&o&&(k.type==="html"||k.type==="svg")&&GR(x.current,s,o,E);const T=S.useRef(!1);S.useInsertionEffect(()=>{k&&T.current&&k.update(s,h)});const P=s[gw],L=S.useRef(!!P&&typeof window<"u"&&!((b=window.MotionHandoffIsComplete)!=null&&b.call(window,P))&&((M=window.MotionHasOptimisedAnimation)==null?void 0:M.call(window,P)));return Co(()=>{var _;!C.current||!k||((_=k.animationState)==null||_.animateChanges(),k.enteringChildren=void 0)},[]),Co(()=>{C.current=!0,k&&(T.current=!0,window.MotionIsMounted=!0,k.updateFeatures(),k.scheduleRenderMicrotask(),L.current&&k.animationState&&k.animationState.animateChanges())}),S.useEffect(()=>{k&&(!L.current&&k.animationState&&k.animationState.animateChanges(),L.current&&(queueMicrotask(()=>{var _;(_=window.MotionHandoffMarkAsComplete)==null||_.call(window,P)}),L.current=!1),k.enteringChildren=void 0)}),k}function GR(e,t,s,i){const{layoutId:o,layout:l,drag:u,dragConstraints:d,layoutScroll:h,layoutRoot:m,layoutAnchor:y,layoutCrossfade:v}=t;e.projection=new s(e.latestValues,t["data-framer-portal-id"]?void 0:nS(e.parent)),e.projection.setOptions({layoutId:o,layout:l,alwaysMeasureLayout:!!u||d&&Ks(d),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,crossfade:v,layoutScroll:h,layoutRoot:m,layoutAnchor:y})}function nS(e){if(e)return e.options.allowProjection!==!1?e.projection:nS(e.parent)}function yd(e,{forwardMotionProps:t=!1,type:s}={},i,o){i&&jR(i);const l=s?s==="svg":Vh(e),u=l?KR:HR;function d(m,y){let v;const x={...S.useContext(_h),...m,layoutId:YR(m)},{isStatic:C,isValidProp:k}=x,E=DR(m),T=u(m,C);if(!C&&typeof window<"u"){XR();const P=JR(x);v=P.MeasureLayout,E.visualElement=QR(e,T,x,o,P.ProjectionNode,l)}return p.jsxs(Gl.Provider,{value:E,children:[v&&E.visualElement?p.jsx(v,{visualElement:E.visualElement,...x}):null,zR(e,m,qR(T,E.visualElement,y),T,C,t,l,k)]})}d.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const h=S.forwardRef(d);return h[WR]=e,h}function YR({layoutId:e}){const t=S.useContext(lh).id;return t&&e!==void 0?t+"-"+e:e}function XR(e,t){S.useContext(Yw).strict}function JR(e){const t=Xw(),{drag:s,layout:i}=t;if(!s&&!i)return{};const o={...s,...i};return{MeasureLayout:s!=null&&s.isEnabled(e)||i!=null&&i.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function ZR(e,t){if(typeof Proxy>"u")return yd;const s=new Map,i=(l,u)=>yd(l,u,e,t),o=(l,u)=>i(l,u);return new Proxy(o,{get:(l,u)=>u==="create"?i:(s.has(u)||s.set(u,yd(u,void 0,e,t)),s.get(u))})}const ej=(e,t)=>t.isSVG??Vh(e)?new jb(t):new bb(t,{allowProjection:e!==S.Fragment});class tj extends Ar{constructor(t){super(t),t.animationState||(t.animationState=Db(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ql(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:s}=this.node.prevProps||{};t!==s&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let nj=0;class rj extends Ar{constructor(){super(...arguments),this.id=nj++}update(){var h;const{presenceContext:t,prevPresenceContext:s,animationState:i}=this.node;if(!t||!i)return;const{isPresent:o,onExitComplete:l}=t,u=s==null?void 0:s.isPresent;if(o===u)return;if(o&&u===!1){if(this.exit===!0){const{initial:m}=this.node.getProps();if(m&&!Array.isArray(m)){const{transition:y,transitionEnd:v,...x}=ds(this.node,m)||{};for(const C in x)(h=this.node.getValue(C))==null||h.jump(x[C])}this.node.blockInitialAnimation=!1,i.reset(),i.animateChanges()}else i.setActive("exit",!1);this.exit=void 0;return}const d=this.exit=i.setActive("exit",!o);l&&!o&&d.then(()=>{this.exit===d&&(this.exit=!0,l(this.id))})}mount(){const{register:t,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const sj={animation:{Feature:tj},exit:{Feature:rj}};function Yl(e){return{point:{x:e.pageX,y:e.pageY}}}const ij=e=>t=>Ah(t)&&e(t,Yl(t));function So(e,t,s,i){return jo(e,t,ij(s),i)}const rS=({current:e})=>e?e.ownerDocument.defaultView:null,L0=(e,t)=>Math.abs(e-t);function oj(e,t){const s=L0(e.x,t.x),i=L0(e.y,t.y);return Math.sqrt(s**2+i**2)}const I0=new Set(["auto","scroll"]);class sS{constructor(t,s,{transformPagePoint:i,contextWindow:o=window,dragSnapToOrigin:l=!1,distanceThreshold:u=3,element:d}={}){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=al(this.lastRawMoveEventInfo,this.transformPagePoint));const k=vd(this.lastMoveEventInfo,this.history),E=this.startEvent!==null,T=oj(k.offset,{x:0,y:0})>=this.distanceThreshold;if(!E&&!T)return;const{point:P}=k;this.history.push({...P,timestamp:ut.now()});const{onStart:L,onMove:b}=this.handlers;E||(L&&L(this.lastMoveEvent,k),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,k)},this.handlePointerMove=(k,E)=>{this.lastMoveEvent=k,this.lastRawMoveEventInfo=E,this.lastMoveEventInfo=al(E,this.transformPagePoint),this.hasPendingMove=!0,Le.update(this.updatePoint,!0)},this.handlePointerUp=(k,E)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:T,onSessionEnd:P,resumeAnimation:L}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&L&&L(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=vd(k.type==="pointercancel"?this.lastMoveEventInfo:al(E,this.transformPagePoint),this.history);this.startEvent&&T&&T(k,b),P&&P(k,b)},!Ah(t))return;this.dragSnapToOrigin=l,this.handlers=s,this.transformPagePoint=i,this.distanceThreshold=u,this.contextWindow=o||window;const h=Yl(t),m=al(h,this.transformPagePoint),{point:y}=m,{timestamp:v}=Ze;this.history=[{...y,timestamp:v}];const{onSessionStart:x}=s;x&&x(t,vd(m,this.history));const C={passive:!0,capture:!0};this.removeListeners=Vo(So(this.contextWindow,"pointermove",this.handlePointerMove,C),So(this.contextWindow,"pointerup",this.handlePointerUp,C),So(this.contextWindow,"pointercancel",this.handlePointerUp,C)),d&&this.startScrollTracking(d)}startScrollTracking(t){let s=t.parentElement;for(;s;){const i=getComputedStyle(s);(I0.has(i.overflowX)||I0.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(t){const s=this.scrollPositions.get(t);if(!s)return;const i=t===window,o=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},l={x:o.x-s.x,y:o.y-s.y};l.x===0&&l.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(t,o),Le.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Mr(this.updatePoint)}}function al(e,t){return t?{point:t(e.point)}:e}function F0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function vd({point:e},t){return{point:e,delta:F0(e,iS(t)),offset:F0(e,aj(t)),velocity:lj(t,.1)}}function aj(e){return e[0]}function iS(e){return e[e.length-1]}function lj(e,t){if(e.length<2)return{x:0,y:0};let s=e.length-1,i=null;const o=iS(e);for(;s>=0&&(i=e[s],!(o.timestamp-i.timestamp>Wt(t)));)s--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&o.timestamp-i.timestamp>Wt(t)*2&&(i=e[1]);const l=Ht(o.timestamp-i.timestamp);if(l===0)return{x:0,y:0};const u={x:(o.x-i.x)/l,y:(o.y-i.y)/l};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}function uj(e,{min:t,max:s},i){return t!==void 0&&e<t?e=i?Ae(t,e,i.min):Math.max(e,t):s!==void 0&&e>s&&(e=i?Ae(s,e,i.max):Math.min(e,s)),e}function _0(e,t,s){return{min:t!==void 0?e.min+t:void 0,max:s!==void 0?e.max+s-(e.max-e.min):void 0}}function cj(e,{top:t,left:s,bottom:i,right:o}){return{x:_0(e.x,s,o),y:_0(e.y,t,i)}}function O0(e,t){let s=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([s,i]=[i,s]),{min:s,max:i}}function dj(e,t){return{x:O0(e.x,t.x),y:O0(e.y,t.y)}}function fj(e,t){let s=.5;const i=Ct(e),o=Ct(t);return o>i?s=Eo(t.min,t.max-i,e.min):i>o&&(s=Eo(e.min,e.max-o,t.min)),Qn(0,1,s)}function hj(e,t){const s={};return t.min!==void 0&&(s.min=t.min-e.min),t.max!==void 0&&(s.max=t.max-e.min),s}const Ff=.35;function pj(e=Ff){return e===!1?e=0:e===!0&&(e=Ff),{x:V0(e,"left","right"),y:V0(e,"top","bottom")}}function V0(e,t,s){return{min:B0(e,t),max:B0(e,s)}}function B0(e,t){return typeof e=="number"?e:e[t]||0}const mj=new WeakMap;class gj{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Je(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:s=!1,distanceThreshold:i}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const l=v=>{s&&this.snapToCursor(v),this.stopAnimation()},u=(v,x)=>{const{drag:C,dragPropagation:k,onDragStart:E}=this.getProps();if(C&&!k&&(this.openDragLock&&this.openDragLock(),this.openDragLock=sb(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),kn(P=>{let L=this.getAxisMotionValue(P).get()||0;if(Rn.test(L)){const{projection:b}=this.visualElement;if(b&&b.layout){const M=b.layout.layoutBox[P];M&&(L=Ct(M)*(parseFloat(L)/100))}}this.originPoint[P]=L}),E&&Le.update(()=>E(v,x),!1,!0),jf(this.visualElement,"transform");const{animationState:T}=this.visualElement;T&&T.setActive("whileDrag",!0)},d=(v,x)=>{this.latestPointerEvent=v,this.latestPanInfo=x;const{dragPropagation:C,dragDirectionLock:k,onDirectionLock:E,onDrag:T}=this.getProps();if(!C&&!this.openDragLock)return;const{offset:P}=x;if(k&&this.currentDirection===null){this.currentDirection=vj(P),this.currentDirection!==null&&E&&E(this.currentDirection);return}this.updateAxis("x",x.point,P),this.updateAxis("y",x.point,P),this.visualElement.render(),T&&Le.update(()=>T(v,x),!1,!0)},h=(v,x)=>{this.latestPointerEvent=v,this.latestPanInfo=x,this.stop(v,x),this.latestPointerEvent=null,this.latestPanInfo=null},m=()=>{const{dragSnapToOrigin:v}=this.getProps();(v||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:y}=this.getProps();this.panSession=new sS(t,{onSessionStart:l,onStart:u,onMove:d,onSessionEnd:h,resumeAnimation:m},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:y,distanceThreshold:i,contextWindow:rS(this.visualElement),element:this.visualElement.current})}stop(t,s){const i=t||this.latestPointerEvent,o=s||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!o||!i)return;const{velocity:u}=o;this.startAnimation(u);const{onDragEnd:d}=this.getProps();d&&Le.postRender(()=>d(i,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:s}=this.visualElement;t&&(t.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(t,s,i){const{drag:o}=this.getProps();if(!i||!ll(t,o,this.currentDirection))return;const l=this.getAxisMotionValue(t);let u=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(u=uj(u,this.constraints[t],this.elastic[t])),l.set(u)}resolveConstraints(){var l;const{dragConstraints:t,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(l=this.visualElement.projection)==null?void 0:l.layout,o=this.constraints;t&&Ks(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=cj(i.layoutBox,t):this.constraints=!1,this.elastic=pj(s),o!==this.constraints&&!Ks(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&kn(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=hj(i.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:s}=this.getProps();if(!t||!Ks(t))return!1;const i=t.current,{projection:o}=this.visualElement;if(!o||!o.layout)return!1;o.root&&(o.root.scroll=void 0,o.root.updateScroll());const l=rb(i,o.root,this.visualElement.getTransformPagePoint());let u=dj(o.layout.layoutBox,l);if(s){const d=s(eb(u));this.hasMutatedConstraints=!!d,d&&(u=kw(d))}return u}startAnimation(t){const{drag:s,dragMomentum:i,dragElastic:o,dragTransition:l,dragSnapToOrigin:u,onDragTransitionEnd:d}=this.getProps(),h=this.constraints||{},m=kn(y=>{if(!ll(y,s,this.currentDirection))return;let v=h&&h[y]||{};(u===!0||u===y)&&(v={min:0,max:0});const x=o?200:1e6,C=o?40:1e7,k={type:"inertia",velocity:i?t[y]:0,bounceStiffness:x,bounceDamping:C,timeConstant:750,restDelta:1,restSpeed:10,...l,...v};return this.startAxisValueAnimation(y,k)});return Promise.all(m).then(d)}startAxisValueAnimation(t,s){const i=this.getAxisMotionValue(t);return jf(this.visualElement,t),i.start(Nh(t,i,0,s,this.visualElement,!1))}stopAnimation(){kn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const s=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps()[s];return o||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:s}){var d;const{drag:i}=this.getProps(),o={x:t,y:s},l=((d=this.visualElement.getTransformPagePoint())==null?void 0:d(o))||o,u=this.visualElement.measureViewportBox();kn(h=>{if(!ll(h,i,this.currentDirection))return;const m=this.getAxisMotionValue(h),{min:y,max:v}=u[h];m.set((m.get()||0)+l[h]-Ae(y,v,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:s}=this.getProps(),{projection:i}=this.visualElement;if(!Ks(s)||!i||!this.constraints)return;this.stopAnimation();const o=this.constraints,l={x:0,y:0};kn(d=>{const h=this.getAxisMotionValue(d).get();l[d]=fj({min:h,max:h},o[d])});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(),kn(d=>{const h=this.getAxisMotionValue(d);if(!ll(d,t,null)||!h.get())return;const{min:m,max:y}=this.constraints[d];h.set(Ae(m,y,l[d]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;mj.set(this.visualElement,this);const t=this.visualElement.current,s=So(t,"pointerdown",m=>{const{drag:y,dragListener:v=!0}=this.getProps(),x=m.target,C=x!==t&&cb(x);y&&v&&!C&&this.start(m)});let i;const o=()=>{const{dragConstraints:m}=this.getProps();Ks(m)&&m.current&&(this.constraints=this.resolveRefConstraints(),i||(i=yj(t,m.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,u=l.addEventListener("measure",o);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),Le.read(o);const d=jo(window,"resize",()=>this.scalePositionWithinConstraints()),h=l.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:y})=>{this.isDragging&&y&&(kn(v=>{const x=this.getAxisMotionValue(v);x&&(this.originPoint[v]+=m[v].translate,x.set(x.get()+m[v].translate))}),this.visualElement.render())}));return()=>{d(),s(),u(),h&&h(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:i=!1,dragPropagation:o=!1,dragConstraints:l=!1,dragElastic:u=Ff,dragMomentum:d=!0}=t;return{...t,drag:s,dragDirectionLock:i,dragPropagation:o,dragConstraints:l,dragElastic:u,dragMomentum:d}}}function z0(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function yj(e,t,s){const i=Zy(e,z0(s)),o=Zy(t,z0(s));return()=>{i(),o()}}function ll(e,t,s){return(t===!0||t===e)&&(s===null||s===e)}function vj(e,t=10){let s=null;return Math.abs(e.y)>t?s="y":Math.abs(e.x)>t&&(s="x"),s}class xj extends Ar{constructor(t){super(t),this.removeGroupControls=dn,this.removeListeners=dn,this.controls=new gj(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||dn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};t!==s&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const xd=e=>(t,s)=>{e&&Le.update(()=>e(t,s),!1,!0)};class wj extends Ar{constructor(){super(...arguments),this.removePointerDownListener=dn}onPointerDown(t){this.session=new sS(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rS(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:s,onPan:i,onPanEnd:o}=this.node.getProps();return{onSessionStart:xd(t),onStart:xd(s),onMove:xd(i),onEnd:(l,u)=>{delete this.session,o&&Le.postRender(()=>o(l,u))}}}mount(){this.removePointerDownListener=So(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let wd=!1;class Sj extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:i,layoutId:o}=this.props,{projection:l}=t;l&&(s.group&&s.group.add(l),i&&i.register&&o&&i.register(l),wd&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),El.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:s,visualElement:i,drag:o,isPresent:l}=this.props,{projection:u}=i;return u&&(u.isPresent=l,t.layoutDependency!==s&&u.setOptions({...u.options,layoutDependency:s}),wd=!0,o||t.layoutDependency!==s||s===void 0||t.isPresent!==l?u.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?u.promote():u.relegate()||Le.postRender(()=>{const d=u.getStack();(!d||!d.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:s}=this.props,{projection:i}=t;i&&(i.options.layoutAnchor=s,i.root.didUpdate(),Dh.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:s,switchLayoutGroup:i}=this.props,{projection:o}=t;wd=!0,o&&(o.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(o),i&&i.deregister&&i.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function oS(e){const[t,s]=Gw(),i=S.useContext(lh);return p.jsx(Sj,{...e,layoutGroup:i,switchLayoutGroup:S.useContext(tS),isPresent:t,safeToRemove:s})}const kj={pan:{Feature:wj},drag:{Feature:xj,ProjectionNode:Qw,MeasureLayout:oS}};function U0(e,t,s){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",s==="Start");const o="onHover"+s,l=i[o];l&&Le.postRender(()=>l(t,Yl(t)))}class Cj extends Ar{mount(){const{current:t}=this.node;t&&(this.unmount=ob(t,(s,i)=>(U0(this.node,i,"Start"),o=>U0(this.node,o,"End"))))}unmount(){}}class Ej extends Ar{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Vo(jo(this.node.current,"focus",()=>this.onFocus()),jo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $0(e,t,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 o="onTap"+(s==="End"?"":s),l=i[o];l&&Le.postRender(()=>l(t,Yl(t)))}class Tj extends Ar{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:s,propagate:i}=this.node.props;this.unmount=fb(t,(o,l)=>($0(this.node,l,"Start"),(u,{success:d})=>$0(this.node,u,d?"End":"Cancel")),{useGlobalTarget:s,stopPropagation:(i==null?void 0:i.tap)===!1})}unmount(){}}const _f=new WeakMap,Sd=new WeakMap,Pj=e=>{const t=_f.get(e.target);t&&t(e)},Nj=e=>{e.forEach(Pj)};function bj({root:e,...t}){const s=e||document;Sd.has(s)||Sd.set(s,{});const i=Sd.get(s),o=JSON.stringify(t);return i[o]||(i[o]=new IntersectionObserver(Nj,{root:e,...t})),i[o]}function Rj(e,t,s){const i=bj(t);return _f.set(e,s),i.observe(e),()=>{_f.delete(e),i.unobserve(e)}}const jj={some:0,all:1};class Mj extends Ar{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var h;(h=this.stopObserver)==null||h.call(this);const{viewport:t={}}=this.node.getProps(),{root:s,margin:i,amount:o="some",once:l}=t,u={root:s?s.current:void 0,rootMargin:i,threshold:typeof o=="number"?o:jj[o]},d=m=>{const{isIntersecting:y}=m;if(this.isInView===y||(this.isInView=y,l&&!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(m)};this.stopObserver=Rj(this.node.current,u,d)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:s}=this.node;["amount","margin","root"].some(Dj(t,s))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function Dj({viewport:e={}},{viewport:t={}}={}){return s=>e[s]!==t[s]}const Aj={inView:{Feature:Mj},tap:{Feature:Tj},focus:{Feature:Ej},hover:{Feature:Cj}},Lj={layout:{ProjectionNode:Qw,MeasureLayout:oS}},Ij={...sj,...Aj,...kj,...Lj},Fj=ZR(Ij,ej);function mn(){!Ih.current&&Mw();const[e]=S.useState(Fl.current);return e}const Qt=Fj;function _j(e,t){const[s,i]=S.useState(e);return S.useEffect(()=>{const o=window.setTimeout(()=>i(e),t);return()=>window.clearTimeout(o)},[e,t]),s}const aS=S.createContext(null);function Xl(){const e=S.useContext(aS);if(e===null)throw new Error("useDriveShell must be used within the drive layout");return e}function Oj(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable}function Vj(e,t=!0){const s=S.useRef(e);s.current=e,S.useEffect(()=>{if(!t)return;const i=o=>{const l=o.ctrlKey||o.metaKey,u=Oj(o.target),d=s.current;if(l&&o.key.toLowerCase()==="k"){o.preventDefault(),d.onSearch();return}if(l&&o.key.toLowerCase()==="a"){if(u)return;o.preventDefault(),d.onSelectAll();return}if(o.key==="Escape"){d.onEscape();return}if(!u){if(o.key==="Delete"||o.key==="Backspace"){o.preventDefault(),d.onDelete();return}if(o.key==="Enter"){d.onEnter();return}o.key==="?"&&(o.preventDefault(),d.onHelp())}};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[t])}const Uo=["me"],Bh=["folders","tree"],Bj=["storage","stats"],lS={user:null,storage:null,health:null};function ms(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 zj(e,t){e.invalidateQueries({queryKey:["versions",t]})}function zh(){return Dr({queryKey:Uo,queryFn:we.auth.me})}function H0(e){return typeof e=="object"&&e!==null}function Uj(e,t){let s=null;try{s=JSON.parse(t)}catch{}if(H0(s)&&H0(s.file)){const i=s.file;if(typeof i.id=="string"&&typeof i.name=="string")return i}throw new Rr(e,"UNKNOWN","The server returned an unexpected response")}function uS(e,t,s,i){return new Promise((o,l)=>{const u=new XMLHttpRequest;u.open("POST",e);const d=new FormData;s!==null&&d.append("folderId",s),i.operationId&&d.append("operationId",i.operationId),d.append("file",t,t.name),u.upload.addEventListener("progress",m=>{var v;if(!m.lengthComputable)return;const y=Math.min(100,Math.round(m.loaded/m.total*100));(v=i.onProgress)==null||v.call(i,{loaded:m.loaded,total:m.total,percent:y})}),u.addEventListener("load",()=>{if(u.status>=200&&u.status<300){try{o(Uj(u.status,u.responseText))}catch(y){l(y)}return}const m=C1(u.status,u.responseText);u.status===401&&m.code!=="TELEGRAM_AUTH_REQUIRED"&&k1(),l(m)}),u.addEventListener("error",()=>{l(new Rr(0,"NETWORK_ERROR","Could not reach the server. Check your connection and try again."))}),u.addEventListener("abort",()=>{l(new Rr(0,"ABORTED","Upload cancelled"))});const h=i.signal;if(h!==void 0){if(h.aborted){l(new Rr(0,"ABORTED","Upload cancelled"));return}h.addEventListener("abort",()=>u.abort(),{once:!0})}u.send(d)})}function $j(e,t,s={}){return uS("/api/files",e,t,s)}function Hj(e,t,s={}){return uS(`/api/files/${encodeURIComponent(t)}/replace`,e,null,s)}const cS=S.createContext(null),Kj=4e3;function Wj({children:e}){const[t,s]=S.useState([]),i=mn(),o=S.useRef(new Set),l=S.useRef(0);S.useEffect(()=>{const y=o.current;return()=>{for(const v of y)window.clearTimeout(v)}},[]);const u=S.useCallback(y=>{s(v=>v.filter(x=>x.id!==y))},[]),d=S.useCallback((y,v)=>{const x=l.current;l.current+=1,s(k=>[...k,{id:x,kind:y,message:v}]);const C=window.setTimeout(()=>{o.current.delete(C),u(x)},Kj);o.current.add(C)},[u]),h=S.useMemo(()=>({success:y=>d("success",y),error:y=>d("error",y)}),[d]),m=i?0:16;return p.jsxs(cS.Provider,{value:h,children:[e,p.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:p.jsx(Lr,{children:t.map(y=>p.jsxs(Qt.div,{role:y.kind==="error"?"alert":"status",initial:{opacity:0,x:m},animate:{opacity:1,x:0},exit:{opacity:0,x:m},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"?p.jsx(hT,{className:"mt-0.5 h-4 w-4 shrink-0 text-bad","aria-hidden":"true"}):p.jsx(sh,{className:"mt-0.5 h-4 w-4 shrink-0 text-gold-text","aria-hidden":"true"}),p.jsx("p",{className:"min-w-0 flex-1 break-words",children:y.message}),p.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:p.jsx(cn,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]},y.id))})})]})}function gs(){const e=S.useContext(cS);if(e===null)throw new Error("useToast must be used within a ToastProvider");return e}let ul=0;function K0(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`op-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,12)}`}function qj(){const e=fn(),t=gs(),[s,i]=S.useState([]),o=S.useRef(new Map),l=S.useRef(new Map),u=S.useRef(Promise.resolve()),d=S.useRef(new Set),h=S.useRef(!0),m=S.useRef(null),y=S.useRef(null);S.useEffect(()=>{const I=d.current,R=l.current;return()=>{h.current=!1;for(const D of I)window.clearTimeout(D);for(const D of R.values())D.abort()}},[]);const v=S.useCallback(I=>{const R=window.setTimeout(()=>{d.current.delete(R),i(D=>D.filter(B=>B.id!==I)),o.current.delete(I)},5e3);d.current.add(R)},[]),x=S.useCallback(async I=>{const R=new AbortController;l.current.set(I.id,R);try{const D={signal:R.signal,onProgress:({loaded:W,total:G,percent:K})=>{i(U=>U.map(X=>X.id===I.id?{...X,loaded:W,size:G||X.size,percent:K}:X))}},B=I.replaceId===null?await $j(I.file,I.folderId,{...D,operationId:I.operationId}):await Hj(I.file,I.replaceId,{...D,operationId:I.operationId});if(!h.current)return;i(W=>W.map(G=>G.id===I.id?{...G,status:"done",percent:100}:G)),ms(e),I.replaceId!==null&&zj(e,I.replaceId),t.success(I.replaceId===null?`Uploaded "${B.name}"`:`Replaced "${B.name}"`),v(I.id)}catch(D){if(!h.current)return;const B=ze(D,"Upload failed"),W=B==="Upload cancelled";i(G=>G.map(K=>K.id===I.id?{...K,status:W?"cancelled":"error",message:B}:K)),W||t.error(`Could not upload "${I.file.name}": ${B}`)}finally{l.current.delete(I.id)}},[e,v,t]),C=S.useCallback(I=>{o.current.set(I.id,I),i(R=>[...R,{id:I.id,name:I.file.name,size:I.file.size,loaded:0,percent:0,status:"uploading"}]),u.current=u.current.then(()=>x(I))},[x]),k=S.useCallback((I,R)=>{for(const D of I)ul+=1,C({id:ul,file:D,replaceId:null,folderId:R,operationId:K0()})},[C]),E=S.useCallback((I,R)=>{ul+=1,C({id:ul,file:I,replaceId:R,folderId:null,operationId:K0()})},[C]),T=S.useCallback(I=>{var R;(R=l.current.get(I))==null||R.abort()},[]),P=S.useCallback(I=>{const R=o.current.get(I);R!==void 0&&(i(D=>D.map(B=>B.id===I?{...B,status:"uploading",percent:0,loaded:0,message:void 0}:B)),u.current=u.current.then(()=>x(R)))},[x]),L=S.useCallback(I=>{var R;(R=l.current.get(I))==null||R.abort(),o.current.delete(I),i(D=>D.filter(B=>B.id!==I))},[]),b=S.useCallback(()=>{i(I=>{for(const R of I)R.status!=="uploading"&&o.current.delete(R.id);return I.filter(R=>R.status==="uploading")})},[]),M=S.useCallback(I=>{var R;y.current=I,(R=m.current)==null||R.click()},[]),_=S.useCallback(()=>{const I=m.current;if(I===null)return;const R=Array.from(I.files??[]);I.value="",R.length>0&&k(R,y.current)},[k]);return{uploads:s,enqueue:k,replace:E,cancel:T,retry:P,dismiss:L,clearFinished:b,openPicker:M,pickerInputRef:m,onPickerChange:_}}function $o({title:e,onClose:t,children:s}){const i=S.useRef(null),o=S.useId(),l=mn();return S.useEffect(()=>{const u=d=>{d.key==="Escape"&&t()};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[t]),S.useEffect(()=>{const u=i.current;u!==null&&(u.contains(document.activeElement)||u.focus())},[]),p.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&&t()},children:p.jsxs(Qt.div,{ref:i,role:"dialog","aria-modal":"true","aria-labelledby":o,tabIndex:-1,initial:l?{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:[p.jsxs("div",{className:"mb-4 flex items-start justify-between gap-4",children:[p.jsx("h2",{id:o,className:"text-[15px] font-semibold",children:e}),p.jsx("button",{type:"button","aria-label":"Close dialog",onClick:t,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:p.jsx(cn,{className:"h-4 w-4","aria-hidden":"true"})})]}),s]})})}function dS({title:e,label:t,confirmLabel:s,initialValue:i,pending:o,onSubmit:l,onClose:u}){const[d,h]=S.useState(i),m=S.useId(),y=d.trim(),v=y===i.trim(),x=C=>{C.preventDefault(),!(o||y===""||v)&&l(y)};return p.jsx($o,{title:e,onClose:u,children:p.jsxs("form",{onSubmit:x,noValidate:!0,children:[p.jsxs("label",{htmlFor:m,className:"grid gap-1.5",children:[p.jsx("span",{className:"text-[13px] font-medium",children:t}),p.jsx("input",{id:m,type:"text",autoFocus:!0,value:d,maxLength:255,disabled:o,onFocus:C=>C.target.select(),onChange:C=>h(C.target.value),className:"input"})]}),p.jsxs("div",{className:"mt-5 flex justify-end gap-2.5",children:[p.jsx("button",{type:"button",className:"btn-ghost",onClick:u,disabled:o,children:"Cancel"}),p.jsxs("button",{type:"submit",className:"btn-gold",disabled:o||y===""||v,children:[o&&p.jsx(kt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),o?"Saving…":s]})]})]})})}const W0=["B","KB","MB","GB","TB","PB"];function jt(e){if(!Number.isFinite(e)||e<=0)return"0 B";let t=e,s=0;for(;t>=1024&&s<W0.length-1;)t/=1024,s+=1;const i=W0[s]??"B";return s===0?`${Math.round(t)} ${i}`:`${t.toFixed(1)} ${i}`}function Qj(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}function Ys(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}const Gj=[{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 Of(e,t=new Date){const s=new Date(e);if(Number.isNaN(s.getTime()))return"";const i=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),o=(s.getTime()-t.getTime())/1e3,l=Math.abs(o);for(const{limit:u,divisor:d,unit:h}of Gj)if(l<u)return i.format(Math.round(o/d),h);return i.format(Math.round(o/31557600),"year")}function Nn(e,t){return`${e} ${t}${e===1?"":"s"}`}function Yj(e,t=new Date){const s=new Date(e);if(Number.isNaN(s.getTime()))return"Unknown";const i=l=>new Date(l.getFullYear(),l.getMonth(),l.getDate()).getTime(),o=Math.round((i(t)-i(s))/864e5);return o<=0?"Today":o===1?"Yesterday":s.toLocaleDateString(void 0,{month:"long",day:"numeric",year:"numeric"})}const Xj={image:ST,video:xT,audio:bT,archive:yT,pdf:sd,text:sd,document:sd,other:vT},Jj={image:"Image",video:"Video",audio:"Audio",archive:"Archive",pdf:"PDF",text:"Text",document:"Document",other:"File"},Zj={image:"text-gold-text",video:"muted",audio:"muted",archive:"muted",pdf:"muted",text:"muted",document:"muted",other:"muted"};function Kn(e){const t=AT(e);return{Icon:Xj[t],label:Jj[t],color:Zj[t]}}function Ci(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 Uh(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 cl(e){return{kind:e.kind,id:e.id}}function ln(e){return`${e.kind}:${e.id}`}function $h(e){return e==="list"||e==="grid"}function Hh({label:e="Loading"}){return p.jsx("div",{role:"status","aria-label":e,className:"mt-10 flex justify-center",children:p.jsx(kt,{className:"h-6 w-6 animate-spin text-gold","aria-hidden":"true"})})}const eM="Try type:pdf size:>100MB folder:Projects starred:true after:2026-01-01";function q0({icon:e,label:t,meta:s,onSelect:i}){return p.jsx("li",{children:p.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,p.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",title:t,children:t}),p.jsx("span",{className:"muted shrink-0 text-[12px]",children:s})]})})}function tM({query:e,onClose:t,onOpenFolder:s,onOpenFile:i}){var m,y;const o=mn(),l=Dr({queryKey:["search",e],queryFn:()=>we.search.query(e),enabled:e!=="",placeholderData:Mk});S.useEffect(()=>{const v=x=>{x.key==="Escape"&&t()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[t]);const u=((m=l.data)==null?void 0:m.folders)??[],d=((y=l.data)==null?void 0:y.files)??[],h=u.length===0&&d.length===0;return p.jsx("div",{className:"fixed inset-0 z-[95] flex justify-center bg-black/40 p-4 pt-20",onMouseDown:v=>{v.target===v.currentTarget&&t()},children:p.jsxs(Qt.div,{role:"dialog","aria-modal":"true","aria-label":`Search results for ${e}`,initial:o?{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:[p.jsxs("header",{className:"flex items-center gap-3 border-b border-line/70 px-5 py-4",children:[p.jsx(h1,{className:"h-4 w-4 shrink-0 text-gold","aria-hidden":"true"}),p.jsxs("h2",{className:"min-w-0 flex-1 truncate text-[14px] font-semibold",children:["Results for “",e,"”"]}),p.jsx("button",{type:"button","aria-label":"Close search",onClick:t,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:p.jsx(cn,{className:"h-4 w-4","aria-hidden":"true"})})]}),p.jsx("p",{className:"muted border-b border-line/70 px-5 py-2 font-mono text-[11.5px]",children:eM}),p.jsx("div",{className:"flex-1 overflow-y-auto p-3",children:l.isPending?p.jsx(Hh,{label:"Searching"}):l.error!==null?p.jsx("p",{role:"alert",className:"notice notice-error",children:ze(l.error,"The search failed.")}):h?p.jsxs("div",{className:"flex flex-col items-center py-12 text-center",children:[p.jsx(jT,{className:"h-7 w-7 text-gold","aria-hidden":"true"}),p.jsxs("p",{className:"muted mt-3 text-sm",children:["No matches for “",e,"”."]})]}):p.jsxs(p.Fragment,{children:[u.length>0?p.jsxs("section",{className:"mb-3",children:[p.jsx("h3",{className:"eyebrow mb-2",children:"Folders"}),p.jsx("ul",{className:"grid gap-0.5",children:u.map(v=>p.jsx(q0,{icon:p.jsx(wi,{className:"h-4 w-4 shrink-0 text-gold","aria-hidden":"true"}),label:v.name,meta:"Folder",onSelect:()=>s(v)},v.id))})]}):null,d.length>0?p.jsxs("section",{children:[p.jsx("h3",{className:"eyebrow mb-2",children:"Files"}),p.jsx("ul",{className:"grid gap-0.5",children:d.map(v=>{const{Icon:x,color:C,label:k}=Kn(v.mimeType);return p.jsx(q0,{icon:p.jsx(x,{className:`h-4 w-4 shrink-0 ${C}`,"aria-hidden":"true"}),label:v.name,meta:`${jt(v.size)} · ${k}`,onSelect:()=>i(Ci(v))},v.id)})})]}):null]})})]})})}const nM=[{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 rM({onClose:e}){return p.jsx($o,{title:"Keyboard shortcuts",onClose:e,children:p.jsx("dl",{className:"grid gap-2",children:nM.map(t=>p.jsxs("div",{className:"flex items-center justify-between gap-4",children:[p.jsx("dt",{className:"muted text-[13px]",children:t.label}),p.jsx("dd",{children:p.jsx("kbd",{className:"rounded-md border border-line-strong bg-surface px-2 py-1 font-mono text-[12px]",children:t.keys})})]},t.keys))})})}const sM={DISCONNECTED:"Disconnected",CONNECTING:"Connecting",CONNECTED:"Connected",RECONNECTING:"Reconnecting",ERROR:"Connection error",AUTH_REQUIRED:"Reconnect required"};function iM(e){if(e===null)return{tone:"text-muted",label:"Unknown",usable:!1,hint:null};const t=sM[e.state];return e.state==="AUTH_REQUIRED"?{tone:"text-bad",label:t,usable:!1,hint:e.message??"Reconnect Telegram in Settings to keep syncing."}:e.state==="ERROR"||e.status==="unavailable"?{tone:"text-bad",label:t,usable:!1,hint:e.message??"The storage backend is unavailable right now."}:e.state==="CONNECTED"&&e.status==="healthy"?{tone:"text-ok",label:t,usable:!0,hint:null}:{tone:"text-gold-text",label:t,usable:e.state==="CONNECTED"||e.state==="CONNECTING"||e.state==="RECONNECTING",hint:e.message}}const oM=[{id:"drive",label:"My Drive",path:"/",icon:wT,regionLabel:"My Drive"},{id:"recent",label:"Recent",path:"/recent",icon:Ix,regionLabel:"Recent files"},{id:"starred",label:"Starred",path:"/starred",icon:ps,regionLabel:"Starred items"},{id:"trash",label:"Trash",path:"/trash",icon:br,regionLabel:"Trash"},{id:"storage",label:"Storage",path:"/storage",icon:ko,regionLabel:"Storage"}];function aM({tone:e,label:t}){return p.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[p.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full bg-current ${e}`,"aria-hidden":"true"}),p.jsx("span",{className:`text-[11px] font-medium ${e}`,children:t})]})}function Q0({storage:e,health:t,username:s,onCreateFolder:i,onClose:o}){const l=iM(t);return p.jsxs("div",{className:"flex h-full flex-col bg-bg-soft",children:[p.jsxs("div",{className:"flex items-center justify-between px-4 pt-4 pb-2",children:[p.jsx("span",{className:"eyebrow",children:"Drive"}),o!==void 0?p.jsx("button",{type:"button","aria-label":"Close navigation",onClick:o,className:"muted grid h-8 w-8 place-items-center rounded-lg transition-colors hover:bg-surface hover:text-gold-text md:hidden",children:p.jsx(cn,{className:"h-4 w-4","aria-hidden":"true"})}):null]}),p.jsx("nav",{"aria-label":"Main",className:"px-3",children:p.jsx("ul",{className:"grid gap-0.5",children:oM.map(u=>{const d=u.icon;return p.jsx("li",{children:p.jsxs(kx,{to:u.path,end:u.path==="/",onClick:()=>o==null?void 0:o(),className:({isActive:h})=>`flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm transition-colors ${h?"bg-surface font-medium text-gold-text":"muted hover:bg-surface hover:text-gold-text"}`,children:[p.jsx(d,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),u.label]})},u.id)})})}),p.jsx("div",{className:"px-3 pt-3",children:p.jsxs("button",{type:"button",className:"btn-secondary w-full justify-center",onClick:i,children:[p.jsx(Gx,{className:"h-4 w-4","aria-hidden":"true"}),"New folder"]})}),p.jsx("div",{className:"mt-auto p-3",children:p.jsxs("div",{className:"rounded-2xl border border-line bg-surface p-4",children:[p.jsxs("div",{className:"flex items-center gap-2.5",children:[p.jsx(Ox,{className:"h-5 w-5 shrink-0 text-gold","aria-hidden":"true"}),p.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"})]}),p.jsx("div",{className:"mt-2",children:t!==null?p.jsx(aM,{tone:l.tone,label:l.label}):p.jsx("span",{className:"muted text-[11px]",children:"Status unknown"})}),l.hint!==null?p.jsx("p",{className:`mt-1.5 text-[11px] leading-snug ${l.tone}`,children:l.hint}):null,p.jsxs("p",{className:"muted mt-2 flex items-center gap-1.5 font-mono text-[11px] uppercase tracking-wide",children:[p.jsx(ko,{className:"h-3 w-3","aria-hidden":"true"}),(e==null?void 0:e.provider)??"—"]}),p.jsx("div",{className:"hairline mt-3"}),s!==null&&s!==""?p.jsxs("p",{className:"muted mt-2.5 truncate font-mono text-[11px] select-all",children:["@",s]}):null]})})]})}const G0="omnicloud:theme-changed";function lM(e){const t=s=>e(s.detail);return window.addEventListener(G0,t),()=>window.removeEventListener(G0,t)}const uM=450;function cM(){return document.documentElement.dataset.theme==="light"?"light":"dark"}function dM({size:e=16}){return p.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[p.jsx("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"}),p.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 fM({size:e=16}){return p.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:[p.jsx("circle",{cx:"12",cy:"12",r:"3.6"}),p.jsx("path",{d:"M12 1.6 13.6 4.6 12 7.6 10.4 4.6Z"}),p.jsx("path",{d:"M12 16.4 13.6 19.4 12 22.4 10.4 19.4Z"}),p.jsx("path",{d:"M1.6 12 4.6 10.4 7.6 12 4.6 13.6Z"}),p.jsx("path",{d:"M16.4 12 19.4 10.4 22.4 12 19.4 13.6Z"})]})}function fS({compact:e=!1}){const[t,s]=S.useState(cM),i=mn();S.useEffect(()=>lM(s),[]);const o=S.useRef(void 0);S.useEffect(()=>{document.documentElement.dataset.theme=t;try{localStorage.setItem("omnicloud-theme",t)}catch{}},[t]),S.useEffect(()=>()=>window.clearTimeout(o.current),[]);const l=t==="dark"?"light":"dark";function u(){if(!i){const m=document.documentElement;m.classList.add("theme-anim"),window.clearTimeout(o.current),o.current=window.setTimeout(()=>m.classList.remove("theme-anim"),uM)}s(l)}const d=e?15:16,h=t==="light"?p.jsx(dM,{size:d}):p.jsx(fM,{size:d});return p.jsx("button",{type:"button",onClick:u,"aria-label":`Switch to ${l} theme`,title:`Switch to ${l} theme`,className:`theme-toggle relative grid place-items-center rounded-full ${e?"h-7 w-7":"h-9 w-9"}`,children:i?h:p.jsx(Lr,{mode:"wait",initial:!1,children:p.jsx(Qt.span,{className:"grid place-items-center",initial:{opacity:0,scale:.4,rotate:-120},animate:{opacity:1,scale:1,rotate:0,transition:{duration:.3,ease:[.34,1.56,.64,1]}},exit:{opacity:0,scale:.4,rotate:120,transition:{duration:.15,ease:"easeIn"}},children:h},t)})})}function hM({storage:e,displayName:t,username:s,search:i,onUpload:o,onToggleSidebar:l,onOpenHelp:u,onSignOut:d,signingOut:h}){const[m,y]=S.useState(!1),v=mn(),x=t.charAt(0).toUpperCase()||"?",C=S.useCallback(()=>y(!1),[]);S.useEffect(()=>{if(!m)return;const T=L=>{var b,M;(M=(b=L.target).closest)!=null&&M.call(b,"[data-account-menu]")||y(!1)},P=L=>{L.key==="Escape"&&y(!1)};return document.addEventListener("pointerdown",T),document.addEventListener("keydown",P),()=>{document.removeEventListener("pointerdown",T),document.removeEventListener("keydown",P)}},[m]);const k=v?0:-6,E=S.useId();return p.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:[p.jsx("button",{type:"button","aria-label":"Open navigation",onClick:l,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:p.jsx(NT,{className:"h-5 w-5","aria-hidden":"true"})}),p.jsxs("a",{href:"/",className:"flex shrink-0 items-center gap-2.5 text-[15px] font-semibold tracking-tight",children:[p.jsx("span",{className:"text-lg leading-none text-gold",children:"◈"}),p.jsxs("span",{className:"hidden sm:inline",children:["Omni",p.jsx("span",{className:"muted font-normal",children:"Cloud"})]})]}),p.jsxs("div",{className:"relative ml-1 min-w-0 max-w-md flex-1",children:[p.jsx("label",{htmlFor:E,className:"sr-only",children:"Search files and folders"}),p.jsx(h1,{className:"muted pointer-events-none absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2","aria-hidden":"true"}),p.jsx("input",{id:E,ref:i.inputRef,type:"search",placeholder:"Search (Ctrl/⌘K)",value:i.value,onChange:T=>i.onChange(T.target.value),className:"input h-9 rounded-full py-0 pl-9"})]}),p.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2.5",children:[p.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:p.jsx(CT,{className:"h-4 w-4","aria-hidden":"true"})}),p.jsxs("button",{type:"button",className:"btn-gold hidden px-3.5 py-2 text-[13px] sm:inline-flex",onClick:o,children:[p.jsx(bl,{className:"h-4 w-4","aria-hidden":"true"}),"Upload"]}),p.jsx(fS,{}),p.jsxs("div",{className:"relative","data-account-menu":!0,children:[p.jsx("button",{type:"button","aria-label":"Account","aria-haspopup":"menu","aria-expanded":m,onClick:()=>y(T=>!T),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}),p.jsx(Lr,{children:m?p.jsxs(Qt.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:[p.jsxs("div",{className:"border-b border-line/70 px-3 py-2.5",children:[p.jsx("p",{className:"truncate text-[13px] font-semibold",children:t}),p.jsx("p",{className:"muted truncate text-[12px]",children:s!==null&&s!==""?`@${s}`:"Telegram account"})]}),p.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[p.jsx(ko,{className:"h-4 w-4 shrink-0 text-gold","aria-hidden":"true"}),p.jsxs("span",{className:"min-w-0 flex-1",children:[p.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"}),p.jsx("span",{className:"muted block truncate text-[11px] uppercase tracking-wide",children:(e==null?void 0:e.provider)??"—"})]})]}),p.jsxs("button",{type:"button",onClick:()=>{C(),d()},disabled:h,className:"menu-item menu-item-danger",children:[p.jsx(PT,{className:"h-4 w-4","aria-hidden":"true"}),h?"Signing out...":"Sign out"]})]},"account-menu"):null})]})]})]})}function pM(e){return e==="uploading"?p.jsx(kt,{className:"h-4 w-4 shrink-0 animate-spin text-gold-text","aria-hidden":"true"}):e==="done"?p.jsx(sh,{className:"h-4 w-4 shrink-0 text-ok","aria-hidden":"true"}):e==="cancelled"?p.jsx(cn,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}):p.jsx(cn,{className:"h-4 w-4 shrink-0 text-bad","aria-hidden":"true"})}function mM({uploads:e,onCancel:t,onRetry:s,onDismiss:i,onClearFinished:o}){if(e.length===0)return null;const l=e.some(u=>u.status!=="uploading");return p.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:[p.jsxs("header",{className:"flex items-center justify-between border-b border-line/70 px-4 py-3",children:[p.jsxs("h2",{className:"flex items-center gap-2 text-[13px] font-semibold",children:[p.jsx(bl,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"Uploads"]}),l?p.jsx("button",{type:"button",onClick:o,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]}),p.jsx("ul",{className:"max-h-72 divide-y divide-line/70 overflow-y-auto p-1.5",children:e.map(u=>p.jsxs("li",{className:"px-2.5 py-2.5",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[pM(u.status),p.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px]",title:u.name,children:u.name}),u.status==="uploading"?p.jsxs("span",{className:"muted shrink-0 text-[12px] tabular-nums",children:[jt(u.loaded)," / ",jt(u.size)]}):p.jsx("span",{className:"muted shrink-0 text-[12px] tabular-nums",children:jt(u.size)})]}),u.status==="uploading"?p.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[p.jsx("div",{className:"h-1.5 flex-1 overflow-hidden rounded-full bg-surface-2",children:p.jsx("div",{className:"progress-fill",style:{width:`${u.percent}%`}})}),p.jsxs("span",{className:"muted w-9 shrink-0 text-right text-[11px] tabular-nums",children:[u.percent,"%"]}),p.jsx("button",{type:"button","aria-label":`Cancel upload of ${u.name}`,onClick:()=>t(u.id),className:"muted rounded p-0.5 transition-colors hover:bg-bg-soft hover:text-bad",children:p.jsx(cn,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]}):u.status==="error"||u.status==="cancelled"?p.jsxs("div",{className:"mt-1.5 flex items-center justify-between gap-2",children:[p.jsx("p",{className:`min-w-0 flex-1 text-xs ${u.status==="error"?"text-bad":"muted"}`,children:u.message??"Cancelled"}),p.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:[p.jsx(oh,{className:"h-3.5 w-3.5","aria-hidden":"true"}),"Retry"]}),p.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:p.jsx(cn,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]}):p.jsx("div",{className:"mt-1.5 flex justify-end",children:p.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:p.jsx(cn,{className:"h-3.5 w-3.5","aria-hidden":"true"})})})]},u.id))})]})}function gM(){var ue,J,V;const e=zh(),t=fn(),s=xi(),i=gs(),o=qj(),l=mn(),u=((ue=e.data)==null?void 0:ue.storage)??null,d=((J=e.data)==null?void 0:J.health)??null,h=S.useRef(null),[m,y]=S.useState(""),x=_j(m,300).trim(),[C,k]=S.useState(!1),[E,T]=S.useState(!1),[P,L]=S.useState(!1),[b,M]=S.useState(null),[_,I]=S.useState(null),R=S.useRef(null);R.current=_;const D=Kt({mutationFn:F=>we.folders.create(F,b),onSuccess:F=>{ms(t),L(!1),i.success(`Created "${F.folder.name}"`)},onError:F=>i.error(ze(F,"Could not create folder"))}),B=Kt({mutationFn:we.auth.logout,onSuccess:()=>{t.setQueryData(Uo,lS),t.removeQueries({predicate:F=>F.queryKey[0]!=="me"})},onError:F=>i.error(ze(F,"Could not sign out"))}),W=S.useCallback(()=>{var F,ne;(F=h.current)==null||F.focus(),(ne=h.current)==null||ne.select()},[]),G=S.useCallback(()=>y(""),[]);Vj({onSearch:W,onDelete:()=>{var F,ne;return(ne=(F=R.current)==null?void 0:F.onDelete)==null?void 0:ne.call(F)},onEnter:()=>{var F,ne;return(ne=(F=R.current)==null?void 0:F.onEnter)==null?void 0:ne.call(F)},onSelectAll:()=>{var F,ne;return(ne=(F=R.current)==null?void 0:F.onSelectAll)==null?void 0:ne.call(F)},onEscape:()=>{var F,ne;(ne=(F=R.current)==null?void 0:F.onEscape)==null||ne.call(F),E?T(!1):C?k(!1):x!==""&&y("")},onHelp:()=>T(F=>!F)},!0),S.useEffect(()=>{if(C)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[C]);const K=((V=e.data)==null?void 0:V.user)??null,U=K!==null?K.firstName??K.username??"Account":"Account",X=(K==null?void 0:K.username)??null,ge={uploads:o,activeFolderId:b,setActiveFolderId:M,openCreateFolder:()=>L(!0),clearSearch:G,openShortcuts:()=>T(!0),searchInputRef:h,registerPageShortcuts:I},me=F=>{y(""),s(`/?folder=${encodeURIComponent(F)}`)},Ee=F=>{F.file!==null&&we.files.download(F.file.id),G()},ee=l?0:-20;return p.jsx(aS.Provider,{value:ge,children:p.jsxs("div",{className:"flex h-dvh",children:[p.jsx("a",{href:"#main",className:"skip-link btn-gold",children:"Skip to content"}),p.jsx("aside",{className:"hidden w-60 shrink-0 border-r border-line md:block",children:p.jsx(Q0,{storage:u,health:d,username:X,onCreateFolder:()=>L(!0)})}),p.jsx(Lr,{children:C?p.jsxs("div",{className:"fixed inset-0 z-[80] md:hidden",children:[p.jsx(Qt.div,{className:"absolute inset-0 bg-black/50",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>k(!1),"aria-hidden":"true"}),p.jsx(Qt.div,{initial:{x:ee,opacity:0},animate:{x:0,opacity:1},exit:{x:ee,opacity:0},transition:{duration:.2,ease:"easeOut"},className:"absolute top-0 bottom-0 left-0 w-64 border-r border-line",children:p.jsx(Q0,{storage:u,health:d,username:X,onCreateFolder:()=>{k(!1),L(!0)},onClose:()=>k(!1)})})]}):null}),p.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[p.jsx(hM,{storage:u,displayName:U,username:X,search:{value:m,onChange:y,inputRef:h},onUpload:()=>o.openPicker(b),onToggleSidebar:()=>k(!0),onOpenHelp:()=>T(!0),onSignOut:()=>B.mutate(),signingOut:B.isPending}),p.jsx("main",{id:"main",className:"relative flex-1 overflow-y-auto",children:p.jsx(mE,{})})]}),p.jsx("input",{ref:o.pickerInputRef,type:"file",multiple:!0,className:"hidden","aria-hidden":"true",tabIndex:-1,onChange:o.onPickerChange}),p.jsx(mM,{uploads:o.uploads,onCancel:o.cancel,onRetry:o.retry,onDismiss:o.dismiss,onClearFinished:o.clearFinished}),P?p.jsx(dS,{title:"Create folder",label:"Folder name",confirmLabel:"Create",initialValue:"",pending:D.isPending,onSubmit:F=>D.mutate(F),onClose:()=>L(!1)}):null,E?p.jsx(rM,{onClose:()=>T(!1)}):null,x!==""?p.jsx(tM,{query:x,onClose:G,onOpenFolder:F=>me(F.id),onOpenFile:Ee}):null]})})}function Kh(e){const t=new Map;for(const o of e)t.set(o.id,{folder:o,children:[]});const s=[];for(const o of t.values()){const l=o.folder.parentId===null?void 0:t.get(o.folder.parentId);l===void 0?s.push(o):l.children.push(o)}const i=o=>{o.sort((l,u)=>l.folder.name.localeCompare(u.folder.name));for(const l of o)i(l.children);return o};return i(s)}function hS(e,t){for(const s of e){if(s.folder.id===t)return s.folder;const i=hS(s.children,t);if(i!==null)return i}return null}function yM(e,t){if(t===null)return[];const s=[],i=new Set;let o=t;for(;o!==null&&!i.has(o);){i.add(o);const l=hS(e,o);if(l===null)break;s.unshift(l),o=l.parentId}return s}function Wh(e,t){const s=[],i=l=>{s.push(l.folder.id);for(const u of l.children)i(u)},o=l=>{for(const u of l){if(u.folder.id===t)return i(u),!0;if(o(u.children))return!0}return!1};return o(e),s}function Mo({queryKey:e,queryFn:t,enabled:s=!0}){var d;const i=lC({queryKey:e,enabled:s,initialPageParam:1,queryFn:({pageParam:h})=>t(h),getNextPageParam:h=>h.pagination.hasMore?h.pagination.page+1:void 0}),o=((d=i.data)==null?void 0:d.pages)??[],l=o.flatMap(h=>h.items),u=o[o.length-1];return{items:l,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 pS({title:e,message:t,confirmLabel:s="Confirm",destructive:i=!1,busy:o=!1,onConfirm:l,onClose:u}){return p.jsxs($o,{title:e,onClose:u,children:[p.jsxs("div",{className:"flex items-start gap-3",children:[i?p.jsx(Nl,{className:"mt-0.5 h-5 w-5 shrink-0 text-bad","aria-hidden":"true"}):null,p.jsx("div",{className:"text-[13.5px] leading-relaxed",children:t})]}),p.jsxs("div",{className:"mt-6 flex justify-end gap-2.5",children:[p.jsx("button",{type:"button",className:"btn-ghost",onClick:u,disabled:o,children:"Cancel"}),p.jsx("button",{type:"button",autoFocus:!0,className:i?"btn-danger":"btn-gold",onClick:l,disabled:o,children:o?"Working…":s})]})]})}function vM(e,t){const s=Wh(t,e);return Promise.all(s.map(i=>we.files.list({folderId:i,limit:200}))).then(i=>i.reduce((o,l)=>o+l.files.length,0))}function xM({folder:e,tree:t,onClose:s}){const i=fn(),o=gs(),l=Dr({queryKey:["subtree-files",e.id],queryFn:()=>vM(e.id,t),staleTime:0}),u=Kt({mutationFn:()=>we.folders.delete(e.id),onSuccess:y=>{ms(i),o.success(`Deleted ${Nn(y.affectedFolders,"folder")} and ${Nn(y.affectedFiles,"file")}`),s()},onError:y=>o.error(ze(y,"Could not delete folder"))}),d=Wh(t,e.id).length-1,h=l.data;let m=`the folder "${e.name}"`;return d>0&&(m+=` and its ${Nn(d,"subfolder")}`),h!==void 0?m+=` and ${Nn(h,"file")}`:m+=" and all files inside it",p.jsxs($o,{title:`Delete "${e.name}"?`,onClose:s,children:[p.jsxs("section",{className:"rounded-2xl border border-bad/40 p-5",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Nl,{className:"h-4 w-4 shrink-0 text-bad","aria-hidden":"true"}),p.jsx("h3",{className:"text-[15px] font-semibold",children:"Danger zone"})]}),p.jsxs("p",{className:"muted mt-1.5 text-[13px] leading-relaxed",children:["This will permanently delete ",m,". This action cannot be undone."]})]}),p.jsxs("div",{className:"mt-5 flex justify-end gap-2.5",children:[p.jsx("button",{type:"button",className:"btn-ghost",onClick:s,disabled:u.isPending,children:"Cancel"}),p.jsxs("button",{type:"button",className:"btn-danger",onClick:()=>u.mutate(),disabled:u.isPending,children:[u.isPending&&p.jsx(kt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),"Delete"]})]})]})}function Y0(e){var t,s;return e.kind==="file"?((t=e.file)==null?void 0:t.folderId)??null:((s=e.folder)==null?void 0:s.parentId)??null}function mS({nodes:e,depth:t,groupName:s,selectedId:i,disabledIds:o,collapsedIds:l,onToggle:u,onSelect:d}){return p.jsx("ul",{className:"space-y-0.5",children:e.map(h=>{const m=h.folder.id,y=o.has(m),v=h.children.length>0,x=l.has(m);return p.jsxs("li",{children:[p.jsxs("div",{className:`flex items-center gap-1 rounded-lg pr-2 transition-colors ${y?"":"hover:bg-surface"}`,style:{paddingLeft:`${t*1.25+.375}rem`},children:[v?p.jsx("button",{type:"button","aria-label":x?`Expand ${h.folder.name}`:`Collapse ${h.folder.name}`,"aria-expanded":!x,onClick:()=>u(m),className:"muted shrink-0 rounded p-0.5 transition-colors hover:text-gold-text",children:p.jsx(dT,{className:`h-3.5 w-3.5 transition-transform ${x?"-rotate-90":""}`,"aria-hidden":"true"})}):p.jsx("span",{className:"w-[1.125rem] shrink-0","aria-hidden":"true"}),p.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:[p.jsx("input",{type:"radio",name:s,value:m,checked:i===m,disabled:y,onChange:()=>d(m),className:"h-3.5 w-3.5",style:{accentColor:"var(--gold)"}}),p.jsx(wi,{className:`h-4 w-4 shrink-0 ${y?"muted":"text-gold"}`,"aria-hidden":"true"}),p.jsx("span",{className:`min-w-0 truncate ${y?"muted opacity-60":""}`,children:h.folder.name})]})]}),v&&!x?p.jsx(mS,{nodes:h.children,depth:t+1,groupName:s,selectedId:i,disabledIds:o,collapsedIds:l,onToggle:u,onSelect:d}):null]},m)})})}function wM({targets:e,onClose:t,onMoved:s}){const i=fn(),o=gs(),l=Dr({queryKey:Bh,queryFn:we.folders.tree}),u=S.useMemo(()=>{var P;return Kh(((P=l.data)==null?void 0:P.folders)??[])},[l.data]),d=e[0],[h,m]=S.useState(()=>d===void 0?null:Y0(d)),[y,v]=S.useState(new Set),x=e.length===1&&d!==void 0?`"${d.name}"`:`${e.length} items`,C=S.useMemo(()=>{var L;const P=new Set;for(const b of e)if(b.kind==="folder")for(const M of Wh(u,((L=b.folder)==null?void 0:L.id)??b.id))P.add(M);return P},[u,e]),k=Kt({mutationFn:async()=>{await Promise.all(e.map(P=>P.kind==="file"?we.files.move(P.id,h):we.folders.move(P.id,h)))},onSuccess:()=>{ms(i),o.success(`Moved ${x}`),s==null||s(),t()},onError:P=>o.error(ze(P,"Could not move item"))}),E=e.every(P=>Y0(P)===h),T=P=>{v(L=>{const b=new Set(L);return b.has(P)?b.delete(P):b.add(P),b})};return p.jsxs($o,{title:`Move ${x}`,onClose:t,children:[p.jsx("p",{className:"muted text-[13px]",children:"Choose a destination folder."}),p.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:[p.jsxs("label",{className:`flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-sm transition-colors ${h===null?"bg-surface":"hover:bg-surface"}`,children:[p.jsx("input",{type:"radio",name:"move-target",checked:h===null,onChange:()=>m(null),className:"h-3.5 w-3.5",style:{accentColor:"var(--gold)"}}),p.jsx(wi,{className:"h-4 w-4 shrink-0 text-gold","aria-hidden":"true"}),p.jsx("span",{children:"My Drive (root)"})]}),p.jsx(mS,{nodes:u,depth:0,groupName:"move-target",selectedId:h,disabledIds:C,collapsedIds:y,onToggle:T,onSelect:m})]}),l.isPending?p.jsx("p",{className:"muted mt-2 text-[13px]",children:"Loading folders..."}):null,p.jsxs("div",{className:"mt-5 flex justify-end gap-2.5",children:[p.jsx("button",{type:"button",className:"btn-ghost",onClick:t,disabled:k.isPending,children:"Cancel"}),p.jsxs("button",{type:"button",className:"btn-gold",disabled:E||k.isPending,onClick:()=>k.mutate(),children:[k.isPending&&p.jsx(kt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),k.isPending?"Moving...":"Move"]})]})]})}function X0(e){const t=e[0];return e.length===1&&t!==void 0?`"${t.name}"`:`${e.length} items`}function qh({onOpenItem:e,onShowDetails:t,onReplaceFile:s}){var G;const i=fn(),o=gs(),[l,u]=S.useState(null),[d,h]=S.useState(null),[m,y]=S.useState(null),[v,x]=S.useState(null),C=S.useRef(null),k=S.useRef(null),E=Dr({queryKey:Bh,queryFn:we.folders.tree}),T=S.useCallback(K=>{ms(i),o.success(K)},[i,o]),P=Kt({mutationFn:async K=>{if(K.item.kind==="file"){const{file:X}=await we.files.update(K.item.id,{name:K.name});return{name:X.name}}const{folder:U}=await we.folders.update(K.item.id,{name:K.name});return{name:U.name}},onSuccess:(K,U)=>{u(null),T(`Renamed to "${U.name}"`)},onError:K=>o.error(ze(K,"Could not rename item"))}),L=Kt({mutationFn:async K=>{const U=[],X=[];for(const me of K.items)me.kind==="file"?U.push(me.id):X.push(me.id);const ge=[];return U.length>0&&ge.push(await we.files.batch({operation:K.operation,ids:U,...K.folderId!==void 0?{folderId:K.folderId}:{}})),X.length>0&&ge.push(await we.folders.batch({operation:K.operation,ids:X,...K.folderId!==void 0?{folderId:K.folderId}:{}})),ge.reduce((me,Ee)=>({requested:me.requested+Ee.requested,succeeded:me.succeeded+Ee.succeeded,failed:me.failed+Ee.failed}),{requested:0,succeeded:0,failed:0})},onSuccess:(K,U)=>{ms(i);const X=X0(U.items);K.failed>0?o.error(`${K.succeeded} of ${K.requested} succeeded — ${K.failed} failed`):o.success(`Updated ${X}`),y(null),h(null)},onError:K=>o.error(ze(K,"The operation failed"))}),b=S.useCallback(K=>{K.length>0&&h(K)},[]),M=S.useCallback(K=>{if(K.length===0)return;const U=K.length===1?K[0]:void 0;if(U!==void 0&&U.kind==="folder"){x(U);return}y(K)},[]),_=S.useCallback((K,U,X)=>{U.length!==0&&L.mutate({operation:K,items:U,...X!==void 0?{folderId:X}:{}})},[L]),I=S.useCallback(K=>{var U;k.current=K,(U=C.current)==null||U.click()},[]),R=S.useCallback((K,U)=>{switch(K){case"open":e(U);return;case"download":U.kind==="file"&&we.files.download(U.id);return;case"rename":u(U);return;case"move":b([U]);return;case"star":_("star",[U]);return;case"unstar":_("unstar",[U]);return;case"replace":I(U);return;case"details":t(U);return;case"trash":_("trash",[U]);return;case"restore":_("restore",[U]);return;case"delete":M([U]);return;default:return}},[e,t,b,I,M,_]),D=Kh(((G=E.data)==null?void 0:G.folders)??[]),B=m!==null?X0(m):"",W=p.jsxs(p.Fragment,{children:[p.jsx("input",{ref:C,type:"file",className:"hidden","aria-hidden":"true",tabIndex:-1,onChange:K=>{var me;const U=K.currentTarget,X=(me=U.files)==null?void 0:me[0],ge=k.current;U.value="",X!==void 0&&ge!==null&&s(X,ge.id),k.current=null}}),l!==null?p.jsx(dS,{title:l.kind==="file"?"Rename file":"Rename folder",label:"Name",confirmLabel:"Rename",initialValue:l.name,pending:P.isPending,onSubmit:K=>P.mutate({item:l,name:K}),onClose:()=>u(null)}):null,d!==null?p.jsx(wM,{targets:d,onClose:()=>h(null)}):null,v!==null&&v.folder!==null?p.jsx(xM,{folder:v.folder,tree:D,onClose:()=>x(null)}):null,m!==null?p.jsx(pS,{title:`Delete ${B}?`,message:`This will permanently delete ${B}. This action cannot be undone.`,confirmLabel:"Delete permanently",destructive:!0,busy:L.isPending,onConfirm:()=>_("delete",m),onClose:()=>y(null)}):null]});return{handleAction:R,openMove:b,requestDelete:M,runBatch:_,pendingBatch:L.isPending,dialogs:W}}function Qh(e,t,s){const[i,o]=S.useState(()=>{try{const u=localStorage.getItem(e);if(u!==null&&(s===void 0||s(u)))return u}catch{}return t});S.useEffect(()=>{try{localStorage.setItem(e,i)}catch{}},[e,i]);const l=S.useCallback(u=>o(u),[]);return[i,l]}function Gh(e,t=!0){const{registerPageShortcuts:s}=Xl();S.useEffect(()=>{if(!t){s(null);return}return s(e),()=>s(null)})}function kd(e){return`${e.kind}:${e.id}`}function Yh(){const[e,t]=S.useState(()=>new Set),s=S.useRef(null),i=S.useCallback(y=>e.has(y),[e]),o=S.useCallback(()=>{t(new Set),s.current=null},[]),l=S.useCallback(y=>{const v=kd(y);t(new Set([v])),s.current=v},[]),u=S.useCallback((y,v={})=>{const x=kd(y),{orderedKeys:C,range:k}=v;if(k===!0&&s.current!==null&&C!==void 0){const E=C.indexOf(s.current),T=C.indexOf(x);if(E!==-1&&T!==-1){const[P,L]=E<T?[E,T]:[T,E];t(b=>{const M=new Set(b);for(let _=P;_<=L;_+=1){const I=C[_];I!==void 0&&M.add(I)}return M});return}}t(E=>{const T=new Set(E);return T.has(x)?T.delete(x):T.add(x),T}),s.current=x},[]),d=S.useCallback(y=>{t(new Set(y)),s.current=y[0]??null},[]),h=S.useCallback(y=>{const v=new Set(y);t(x=>{let C=!1;const k=new Set;for(const E of x)v.has(E)?k.add(E):C=!0;return C?k:x})},[]),m=S.useCallback(y=>e.has(kd(y)),[e]);return S.useMemo(()=>({selected:e,count:e.size,isSelected:i,has:m,select:l,toggle:u,clear:o,selectAll:d,prune:h}),[e,i,m,l,u,o,d,h])}function SM({path:e,onNavigate:t}){return p.jsx("nav",{"aria-label":"Breadcrumb",className:"min-w-0",children:p.jsxs("ol",{className:"flex items-center gap-0.5 text-sm",children:[p.jsx("li",{className:"shrink-0",children:p.jsx("button",{type:"button",onClick:()=>t(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 o=i===e.length-1;return p.jsxs("li",{className:"flex min-w-0 items-center gap-0.5",children:[p.jsx(fT,{className:"muted h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),p.jsx("button",{type:"button",onClick:()=>t(s.id),"aria-current":o?"page":void 0,title:s.name,className:`max-w-[14rem] truncate rounded px-1.5 py-1 transition-colors ${o?"font-medium text-gold-text":"muted hover:text-gold-text"}`,children:s.name})]},s.id)})]})})}function Xh({menu:e,onClose:t}){const s=mn(),i=S.useRef(null);S.useEffect(()=>{if(e===null)return;const d=m=>{var y;m.target instanceof Node&&((y=i.current)==null?void 0:y.contains(m.target))===!1&&t()},h=m=>{m.key==="Escape"&&t()};return document.addEventListener("pointerdown",d),document.addEventListener("keydown",h),window.addEventListener("resize",t),window.addEventListener("scroll",t,!0),()=>{document.removeEventListener("pointerdown",d),document.removeEventListener("keydown",h),window.removeEventListener("resize",t),window.removeEventListener("scroll",t,!0)}},[e,t]);const o=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 p.jsx(Lr,{children:e!==null?p.jsx(Qt.div,{ref:i,role:"menu","aria-label":e.label,initial:{opacity:0,y:o},animate:{opacity:1,y:0},exit:{opacity:0,y:o},transition:{duration:.13,ease:"easeOut"},style:u,className:"menu-panel fixed z-[120] w-56",children:e.items.map(d=>p.jsxs("button",{role:"menuitem",type:"button",disabled:d.disabled===!0,onClick:()=>{t(),d.onSelect()},className:`menu-item text-left ${d.danger===!0?"menu-item-danger":""}`,children:[d.icon,d.label]},d.label))}):null})}function gr({label:e,children:t}){return p.jsxs("div",{children:[p.jsx("dt",{className:"muted text-[11px] font-semibold tracking-wide uppercase",children:e}),p.jsx("dd",{className:"mt-1 text-[13.5px] break-words",children:t})]})}function kM({item:e}){if(e.kind==="folder")return p.jsx(wi,{className:"h-6 w-6 shrink-0 text-gold","aria-hidden":"true"});const{Icon:t,color:s}=Kn(e.mimeType);return p.jsx(t,{className:`h-6 w-6 shrink-0 ${s}`,"aria-hidden":"true"})}function Ho({item:e,onClose:t,onAction:s}){var o,l,u;const i=mn();return S.useEffect(()=>{if(e===null)return;const d=h=>{h.key==="Escape"&&t()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[e,t]),e===null?null:p.jsxs("div",{className:"fixed inset-0 z-[100] flex items-end justify-end sm:items-stretch",children:[p.jsx("div",{className:"absolute inset-0 bg-black/40",onClick:t,"aria-hidden":"true"}),p.jsxs(Qt.aside,{role:"dialog","aria-modal":"true","aria-label":`Details for ${e.name}`,initial:i?{opacity:0}:{x:"100%"},animate:i?{opacity:1}:{x:0},transition:{duration:.22,ease:"easeOut"},className:"glass-strong relative flex max-h-[85dvh] w-full flex-col rounded-t-2xl border border-line sm:h-full sm:max-h-none sm:w-96 sm:rounded-none sm:border-r-0",children:[p.jsxs("header",{className:"flex items-start justify-between gap-3 border-b border-line/70 px-5 py-4",children:[p.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[p.jsx(kM,{item:e}),p.jsx("h2",{className:"min-w-0 text-[15px] font-semibold break-words",children:e.name})]}),p.jsx("button",{type:"button","aria-label":"Close details",onClick:t,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:p.jsx(cn,{className:"h-4 w-4","aria-hidden":"true"})})]}),p.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:[e.trashed?null:p.jsx("div",{className:"flex flex-wrap gap-2",children:e.kind==="file"?p.jsxs(p.Fragment,{children:[p.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>s("download",e),children:[p.jsx(ih,{className:"h-4 w-4","aria-hidden":"true"}),"Download"]}),p.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>s("replace",e),children:[p.jsx(u1,{className:"h-4 w-4","aria-hidden":"true"}),"New version"]})]}):null}),p.jsxs("dl",{className:"mt-5 grid gap-4",children:[p.jsxs(gr,{label:"Type",children:[e.kind==="folder"?"Folder":Kn(e.mimeType).label,e.kind==="file"?p.jsxs("span",{className:"muted",children:[" · ",e.mimeType]}):null]}),e.kind==="file"?p.jsx(gr,{label:"Size",children:jt(e.size)}):null,e.kind==="file"?p.jsx(gr,{label:"SHA-256",children:p.jsx("code",{className:"font-mono text-[12px] break-all select-all",children:((o=e.file)==null?void 0:o.sha256)??""})}):null,p.jsx(gr,{label:"Folder",children:e.kind==="file"?((l=e.file)==null?void 0:l.folderId)??"My Drive":((u=e.folder)==null?void 0:u.parentId)??"My Drive"}),p.jsx(gr,{label:"Created",children:Ys(e.createdAt)}),p.jsx(gr,{label:"Modified",children:Ys(e.updatedAt)}),e.trashed&&e.deletedAt!==null?p.jsx(gr,{label:"Deleted",children:Ys(e.deletedAt)}):null,e.kind==="file"?p.jsx(gr,{label:"Versions",children:Nn(e.versionCount,"version")}):null]}),e.kind==="file"?p.jsx(CM,{fileId:e.id,versionCount:e.versionCount}):null]})]})]})}function CM({fileId:e,versionCount:t}){var i,o;const s=Dr({queryKey:["versions",e],queryFn:()=>we.files.versions(e)});return p.jsxs("section",{className:"mt-6",children:[p.jsx("h3",{className:"eyebrow",children:"Version history"}),s.isPending?p.jsx("p",{className:"muted mt-3 text-[13px]",children:"Loading versions..."}):s.error!==null?p.jsx("p",{className:"mt-3 text-[13px] text-bad",children:ze(s.error,"Could not load versions")}):(((i=s.data)==null?void 0:i.versions.length)??0)===0?p.jsx("p",{className:"muted mt-3 text-[13px]",children:t>1?"Version history is unavailable.":"No earlier versions."}):p.jsx("ul",{className:"mt-3 grid gap-2",children:(((o=s.data)==null?void 0:o.versions)??[]).map(l=>p.jsxs("li",{className:"flex items-center gap-3 rounded-xl border border-line bg-surface px-3 py-2",children:[p.jsxs("span",{className:"muted w-9 shrink-0 font-mono text-[12px]",children:["v",l.versionNumber]}),p.jsxs("span",{className:"min-w-0 flex-1",children:[p.jsx("span",{className:"block text-[12.5px]",children:jt(l.size)}),p.jsx("span",{className:"muted block text-[11px]",children:Ys(l.createdAt)})]}),l.isCurrent?p.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]},l.id))})]})}function Jl({icon:e,title:t,description:s,children:i}){return p.jsxs("div",{className:"mt-16 flex flex-col items-center px-4 text-center",children:[p.jsx("span",{className:"grid h-16 w-16 place-items-center rounded-full border border-gold/50 bg-gold-soft",children:p.jsx(e,{className:"h-7 w-7 text-gold","aria-hidden":"true"})}),p.jsx("h2",{className:"mt-4 text-base font-semibold",children:t}),s!==void 0?p.jsx("p",{className:"muted mt-1 max-w-sm text-sm",children:s}):null,i!==void 0?p.jsx("div",{className:"mt-5 flex flex-wrap justify-center gap-2.5",children:i}):null]})}function J0({label:e,items:t,trigger:s,triggerClassName:i,align:o="end"}){const[l,u]=S.useState(!1),d=mn(),h=S.useRef(null),m=S.useRef(null),y=S.useRef(null);S.useEffect(()=>{if(!l)return;const k=T=>{var P;T.target instanceof Node&&((P=h.current)==null?void 0:P.contains(T.target))===!1&&u(!1)},E=T=>{var P;T.key==="Escape"&&(u(!1),(P=m.current)==null||P.focus())};return document.addEventListener("pointerdown",k),document.addEventListener("keydown",E),()=>{document.removeEventListener("pointerdown",k),document.removeEventListener("keydown",E)}},[l]);const v=k=>{var T,P;const E=(T=y.current)==null?void 0:T.querySelectorAll("[role='menuitem']");(P=E==null?void 0:E[k])==null||P.focus()},x=(k,E)=>{var b,M;const T=Array.from(((b=y.current)==null?void 0:b.querySelectorAll("[role='menuitem']"))??[]);if(T.length===0)return;const L=(T.indexOf(k)+E+T.length)%T.length;(M=T[L])==null||M.focus()},C=d?0:-6;return p.jsxs("div",{ref:h,className:"relative",children:[p.jsx("button",{ref:m,type:"button","aria-label":e,"aria-haspopup":"menu","aria-expanded":l,onClick:()=>u(k=>!k),onKeyDown:k=>{k.key==="ArrowDown"&&(k.preventDefault(),l?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??p.jsx(gT,{className:"h-4 w-4","aria-hidden":"true"})}),p.jsx(Lr,{children:l?p.jsx(Qt.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 ${o==="end"?"right-0":"left-0"}`,children:t.map(k=>p.jsxs("button",{role:"menuitem",type:"button",disabled:k.disabled===!0,onClick:()=>{u(!1),k.onSelect()},onKeyDown:E=>{E.key==="ArrowDown"?(E.preventDefault(),x(E.currentTarget,1)):E.key==="ArrowUp"&&(E.preventDefault(),x(E.currentTarget,-1))},className:`menu-item text-left ${k.danger===!0?"menu-item-danger":""}`,children:[k.icon,k.label]},k.label))},"item-menu"):null})]})}function Z0({checked:e,visible:t,label:s,onToggle:i}){return p.jsx("button",{type:"button",role:"checkbox","aria-checked":e,"aria-label":s,onClick:o=>{o.stopPropagation(),i({shiftKey:o.shiftKey,metaKey:o.metaKey,ctrlKey:o.ctrlKey})},onPointerDown:o=>o.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 ${t?"opacity-100":"opacity-0 group-hover:opacity-100 focus-visible:opacity-100"}`}`,children:p.jsx(sh,{className:"h-3 w-3","aria-hidden":"true"})})}function Cd(e,t,s={}){const i=e.kind==="file",o=[];return e.trashed?(o.push({label:"Restore",icon:p.jsx(oh,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>t("restore",e)}),o.push({label:"Delete permanently",icon:p.jsx(br,{className:"h-4 w-4","aria-hidden":"true"}),danger:!0,onSelect:()=>t("delete",e)})):(o.push({label:i?"Download":"Open",icon:i?p.jsx(ih,{className:"h-4 w-4","aria-hidden":"true"}):p.jsx(hf,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>t(i?"download":"open",e)}),i&&o.push({label:"Details",icon:p.jsx(kT,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>t("details",e)}),o.push({label:"Rename",icon:p.jsx(RT,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>t("rename",e)}),o.push({label:"Move",icon:p.jsx(hf,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>t("move",e)}),o.push({label:e.starred?"Unstar":"Star",icon:e.starred?p.jsx(ah,{className:"h-4 w-4","aria-hidden":"true"}):p.jsx(ps,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>t(e.starred?"unstar":"star",e)}),i&&s.canReplace===!0&&o.push({label:"Upload new version",icon:p.jsx(u1,{className:"h-4 w-4","aria-hidden":"true"}),onSelect:()=>t("replace",e)}),o.push({label:"Move to trash",icon:p.jsx(br,{className:"h-4 w-4","aria-hidden":"true"}),danger:!0,onSelect:()=>t("trash",e)})),o}function EM({item:e}){if(e.kind==="folder")return p.jsx(wi,{className:"h-5 w-5 shrink-0 text-gold","aria-hidden":"true"});const{Icon:t,color:s}=Kn(e.mimeType);return p.jsx(t,{className:`h-5 w-5 shrink-0 ${s}`,"aria-hidden":"true"})}function TM({view:e}){const t=[0,1,2,3,4];return e==="grid"?p.jsx("div",{"aria-hidden":"true",className:"grid grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-4",children:t.map(s=>p.jsx("div",{className:"card h-40 animate-pulse bg-bg-soft"},s))}):p.jsx("div",{"aria-hidden":"true",className:"grid gap-2",children:t.map(s=>p.jsx("div",{className:"h-14 animate-pulse rounded-xl border border-line bg-bg-soft"},s))})}function PM({items:e,view:t,selection:s,onOpen:i,onAction:o,onContextMenu:l,menuContext:u={},loading:d=!1}){const h=e.map(ln),m=(v,x)=>{if(v.metaKey||v.ctrlKey){s.toggle(cl(x));return}if(v.shiftKey){s.toggle(cl(x),{orderedKeys:h,range:!0});return}i(x)},y=(v,x)=>{v.preventDefault(),l({x:v.clientX,y:v.clientY,label:`Actions for ${x.name}`,items:Cd(x,o,u)})};return d?p.jsx(TM,{view:t}):e.length===0?null:t==="grid"?p.jsx("ul",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-4",children:e.map(v=>{const x=s.isSelected(ln(v));return p.jsxs("li",{onClick:C=>m(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:[p.jsx("div",{className:"absolute top-3 left-3",onClick:C=>C.stopPropagation(),children:p.jsx(Z0,{checked:x,visible:x||s.count>0,label:`Select ${v.name}`,onToggle:C=>s.toggle(cl(v),{orderedKeys:h,range:C.shiftKey})})}),p.jsx("div",{className:"absolute top-3 right-3",onClick:C=>C.stopPropagation(),children:p.jsx(J0,{label:`Actions for ${v.name}`,items:Cd(v,o,u)})}),p.jsx("div",{className:"mt-6 flex flex-1 items-center justify-center",children:v.kind==="folder"?p.jsx(wi,{className:"h-10 w-10 text-gold","aria-hidden":"true"}):(()=>{const{Icon:C,color:k}=Kn(v.mimeType);return p.jsx(C,{className:`h-10 w-10 ${k}`,"aria-hidden":"true"})})()}),p.jsxs("div",{className:"min-w-0",children:[p.jsx("p",{className:"line-clamp-2 text-[13px] leading-snug font-medium",title:v.name,children:v.name}),p.jsxs("p",{className:"muted mt-1 truncate text-[12px]",children:[v.starred?p.jsx(ps,{className:"mr-1 inline h-3 w-3 -translate-y-px text-gold","aria-hidden":"true"}):null,v.kind==="folder"?"Folder":`${jt(v.size)} · ${Kn(v.mimeType).label}`]}),v.deletedAt!==null?p.jsxs("p",{className:"muted mt-0.5 text-[11px]",children:["Deleted ",Of(v.deletedAt)]}):null]})]},ln(v))})}):p.jsx("ul",{className:"grid gap-1.5",children:e.map(v=>{const x=s.isSelected(ln(v));return p.jsxs("li",{onClick:C=>m(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:[p.jsx("div",{onClick:C=>C.stopPropagation(),children:p.jsx(Z0,{checked:x,visible:x||s.count>0,label:`Select ${v.name}`,onToggle:C=>s.toggle(cl(v),{orderedKeys:h,range:C.shiftKey})})}),p.jsx(EM,{item:v}),p.jsxs("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",title:v.name,children:[v.starred?p.jsx(ps,{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?p.jsxs("span",{className:"muted hidden shrink-0 text-[12px] sm:block",children:["Deleted ",Of(v.deletedAt)]}):null,p.jsx("span",{className:"muted hidden w-40 shrink-0 truncate text-[12.5px] md:block",children:v.kind==="folder"?"Folder":Kn(v.mimeType).label}),p.jsx("span",{className:"muted hidden w-28 shrink-0 text-right text-[12.5px] lg:block",children:Qj(v.updatedAt)}),p.jsx("span",{className:"muted w-16 shrink-0 text-right text-[12.5px] tabular-nums",children:v.kind==="folder"?"—":jt(v.size)}),p.jsx("div",{onClick:C=>C.stopPropagation(),children:p.jsx(J0,{label:`Actions for ${v.name}`,items:Cd(v,o,u)})})]},ln(v))})})}function Jh({items:e,view:t,selection:s,onOpen:i,onAction:o,onContextMenu:l,menuContext:u,loading:d=!1,error:h=null,onRetry:m,emptyState:y,hasMore:v=!1,loadingMore:x=!1,onLoadMore:C}){return h!==null?p.jsxs("div",{className:"card mt-6 p-6 text-center",children:[p.jsx("p",{className:"text-sm font-medium",children:"Something went wrong."}),p.jsx("p",{className:"muted mt-1 text-sm",children:h}),m!==void 0?p.jsx("button",{type:"button",className:"btn-secondary mt-4",onClick:m,children:"Try again"}):null]}):e.length===0&&y!==void 0?p.jsx(p.Fragment,{children:y}):p.jsxs(p.Fragment,{children:[p.jsx(PM,{items:e,view:t,selection:s,onOpen:i,onAction:o,onContextMenu:l,...u!==void 0?{menuContext:u}:{},loading:d}),v&&C!==void 0?p.jsx("div",{className:"mt-6 flex justify-center",children:p.jsx("button",{type:"button",className:"btn-secondary",onClick:C,disabled:x,children:x?"Loading...":"Load more"})}):null]})}function hi({title:e,actions:t,children:s}){return p.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[p.jsx("div",{className:"min-w-0",children:e}),t!==void 0?p.jsx("div",{className:"flex flex-wrap items-center gap-2.5",children:t}):null,s!==void 0?p.jsx("div",{className:"w-full",children:s}):null]})}function pi({children:e}){return p.jsx("h1",{className:"min-w-0 truncate text-lg font-semibold tracking-[-0.01em]",children:e})}function Zh({count:e,onClear:t,onSelectAll:s,children:i}){const o=mn(),l=e>0;return p.jsx(Lr,{children:l?p.jsxs(Qt.div,{role:"toolbar","aria-label":`${e} items selected`,initial:{opacity:0,y:o?0:20},animate:{opacity:1,y:0},exit:{opacity:0,y:o?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:[p.jsxs("span",{className:"px-2 text-[13px] font-medium tabular-nums",children:[e," selected"]}),p.jsx("span",{className:"text-line-strong","aria-hidden":"true",children:"·"}),s!==void 0?p.jsxs("button",{type:"button",className:"btn-secondary",onClick:s,children:[p.jsx(cT,{className:"h-4 w-4","aria-hidden":"true"}),"Select all"]}):null,i,p.jsxs("button",{type:"button",className:"btn-ghost",onClick:t,"aria-label":"Clear selection",children:[p.jsx(cn,{className:"h-4 w-4","aria-hidden":"true"}),"Clear"]})]},"selection-bar"):null})}const Ed={name:"Name",size:"Size",createdAt:"Date created",updatedAt:"Last modified",type:"Type"};function NM({sort:e,order:t,onChange:s}){const[i,o]=S.useState(!1),l=mn(),u=S.useRef(null);S.useEffect(()=>{if(!i)return;const m=v=>{var x;v.target instanceof Node&&((x=u.current)==null?void 0:x.contains(v.target))===!1&&o(!1)},y=v=>{v.key==="Escape"&&o(!1)};return document.addEventListener("pointerdown",m),document.addEventListener("keydown",y),()=>{document.removeEventListener("pointerdown",m),document.removeEventListener("keydown",y)}},[i]);const d=Object.keys(Ed),h=l?0:-6;return p.jsxs("div",{ref:u,className:"relative shrink-0",children:[p.jsxs("button",{type:"button","aria-haspopup":"menu","aria-expanded":i,onClick:()=>o(m=>!m),className:"btn-secondary",children:[p.jsx(uT,{className:"h-4 w-4","aria-hidden":"true"}),p.jsx("span",{className:"hidden sm:inline",children:Ed[e]}),t==="asc"?p.jsx(Cy,{className:"h-3.5 w-3.5","aria-hidden":"true"}):p.jsx(ky,{className:"h-3.5 w-3.5","aria-hidden":"true"})]}),p.jsx(Lr,{children:i?p.jsx(Qt.div,{role:"menu","aria-label":"Sort by",initial:{opacity:0,y:h},animate:{opacity:1,y:0},exit:{opacity:0,y:h},transition:{duration:.15,ease:"easeOut"},className:"menu-panel absolute top-full right-0 z-30 mt-1.5 w-52",children:d.map(m=>p.jsxs("button",{role:"menuitemradio","aria-checked":e===m,type:"button",onClick:()=>{e===m?s(m,t==="asc"?"desc":"asc"):s(m,"asc")},className:"menu-item justify-between text-left",children:[Ed[m],e===m?t==="asc"?p.jsx(Cy,{className:"h-3.5 w-3.5","aria-hidden":"true"}):p.jsx(ky,{className:"h-3.5 w-3.5","aria-hidden":"true"}):null]},m))}):null})]})}function ep({view:e,onChange:t}){const s=[{mode:"list",label:"List view",Icon:TT},{mode:"grid",label:"Grid view",Icon:ET}];return p.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:o,Icon:l})=>{const u=e===i;return p.jsx("button",{type:"button","aria-label":o,"aria-pressed":u,onClick:()=>t(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:p.jsx(l,{className:"h-4 w-4","aria-hidden":"true"})},i)})})}const ev=100;function dl(e){return e.dataTransfer.types.includes("Files")}function bM(){const{uploads:e,setActiveFolderId:t,openCreateFolder:s,clearSearch:i}=Xl(),[o,l]=WE(),u=o.get("folder"),[d,h]=Qh("omnicloud-view","list",$h),[m,y]=S.useState("name"),[v,x]=S.useState("asc"),[C,k]=S.useState(null),[E,T]=S.useState(null),P=Yh(),[L,b]=S.useState(!1),M=S.useRef(0);S.useEffect(()=>{t(u)},[u,t]);const _=Dr({queryKey:Bh,queryFn:we.folders.tree}),I=S.useMemo(()=>{var F;return Kh(((F=_.data)==null?void 0:F.folders)??[])},[_.data]),R=S.useMemo(()=>yM(I,u),[I,u]),D=Mo({queryKey:["folders","children",u,m,v],queryFn:F=>we.folders.list({parentId:u,page:F,limit:ev,sort:m,order:v,status:"active"}).then(ne=>({items:ne.folders,pagination:ne.pagination}))}),B=Mo({queryKey:["files","folder",u,m,v],queryFn:F=>we.files.list({folderId:u,page:F,limit:ev,sort:m,order:v,status:"active"}).then(ne=>({items:ne.files,pagination:ne.pagination}))}),W=S.useMemo(()=>[...D.items.map(Uh),...B.items.map(Ci)],[D.items,B.items]),G=S.useMemo(()=>W.map(ln),[W]);S.useEffect(()=>{P.prune(G)},[G,P]);const K=S.useCallback(F=>{i(),P.clear(),T(null),l(F===null?{}:{folder:F},{replace:!1})},[i,P,l]),U=qh({onOpenItem:F=>{F.kind==="folder"?K(F.id):we.files.download(F.id)},onShowDetails:T,onReplaceFile:e.replace}),X=S.useMemo(()=>W.filter(F=>P.isSelected(ln(F))),[W,P]);S.useEffect(()=>{const F=pr(D.error,rn.NOT_FOUND,rn.FOLDER_NOT_FOUND)||pr(B.error,rn.NOT_FOUND,rn.FOLDER_NOT_FOUND);u!==null&&F&&l({},{replace:!0})},[u,D.error,B.error,l]),Gh({onDelete:()=>U.runBatch("trash",X),onEnter:()=>{const F=X[0];F!==void 0&&U.handleAction(F.kind==="folder"?"open":"download",F)},onSelectAll:()=>P.selectAll(G),onEscape:()=>T(null)});const ge=pr(D.error,rn.STORAGE_NOT_INITIALIZED)||pr(B.error,rn.STORAGE_NOT_INITIALIZED)||pr(D.error,rn.TELEGRAM_AUTH_REQUIRED)||pr(B.error,rn.TELEGRAM_AUTH_REQUIRED)||pr(D.error,rn.STORAGE_UNAVAILABLE)||pr(B.error,rn.STORAGE_UNAVAILABLE),me=D.error??B.error,Ee=D.isLoading||B.isLoading,ee=F=>{dl(F)&&(F.preventDefault(),M.current+=1,b(!0))},ue=F=>{dl(F)&&(M.current-=1,M.current<=0&&(M.current=0,b(!1)))},J=F=>{dl(F)&&F.preventDefault()},V=F=>{if(!dl(F))return;F.preventDefault(),M.current=0,b(!1);const ne=Array.from(F.dataTransfer.files);ne.length>0&&e.enqueue(ne,u)};return p.jsxs("div",{className:"relative min-h-full",onDragEnter:ee,onDragLeave:ue,onDragOver:J,onDrop:V,children:[p.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-6 md:px-8",children:[p.jsx(hi,{title:u===null?p.jsx(pi,{children:"My Drive"}):p.jsx(SM,{path:R,onNavigate:K}),actions:p.jsxs(p.Fragment,{children:[p.jsx(ep,{view:d,onChange:h}),p.jsx(NM,{sort:m,order:v,onChange:(F,ne)=>{y(F),x(ne)}}),p.jsxs("button",{type:"button",className:"btn-secondary sm:hidden",onClick:()=>e.openPicker(u),children:[p.jsx(bl,{className:"h-4 w-4","aria-hidden":"true"}),"Upload"]})]})}),ge?p.jsx("p",{role:"alert",className:"notice notice-error",children:ze(me,"Your storage is unavailable right now.")}):null,p.jsx("div",{className:"mt-5",children:p.jsx(Jh,{items:W,view:d,selection:P,onOpen:F=>U.handleAction(F.kind==="folder"?"open":"download",F),onAction:U.handleAction,onContextMenu:k,loading:Ee,error:ge||me===null?null:ze(me,"Could not load this folder."),onRetry:()=>{D.refetch(),B.refetch()},hasMore:D.hasMore||B.hasMore,loadingMore:D.isLoadingMore||B.isLoadingMore,onLoadMore:()=>{D.hasMore&&D.loadMore(),B.hasMore&&B.loadMore()},emptyState:p.jsxs(Jl,{icon:mT,title:"Nothing here yet",description:"Upload your first file or create a folder to get started.",children:[p.jsxs("button",{type:"button",className:"btn-gold",onClick:()=>e.openPicker(u),children:[p.jsx(bl,{className:"h-4 w-4","aria-hidden":"true"}),"Upload files"]}),p.jsxs("button",{type:"button",className:"btn-secondary",onClick:s,children:[p.jsx(Gx,{className:"h-4 w-4","aria-hidden":"true"}),"New folder"]})]})})})]}),L?p.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:p.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,p.jsxs(Zh,{count:P.count,onClear:P.clear,onSelectAll:()=>P.selectAll(G),children:[p.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>U.openMove(X),children:[p.jsx(hf,{className:"h-4 w-4","aria-hidden":"true"}),"Move"]}),p.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>U.runBatch("star",X),children:[p.jsx(ps,{className:"h-4 w-4","aria-hidden":"true"}),"Star"]}),p.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>U.runBatch("unstar",X),children:[p.jsx(ah,{className:"h-4 w-4","aria-hidden":"true"}),"Unstar"]}),p.jsxs("button",{type:"button",className:"btn-danger",onClick:()=>U.runBatch("trash",X),children:[p.jsx(br,{className:"h-4 w-4","aria-hidden":"true"}),"Trash"]})]}),p.jsx(Xh,{menu:C,onClose:()=>k(null)}),p.jsx(Ho,{item:E,onClose:()=>T(null),onAction:U.handleAction}),U.dialogs]})}var Hs={},Td,tv;function RM(){return tv||(tv=1,Td=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Td}var Pd={},yr={},nv;function ys(){if(nv)return yr;nv=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return yr.getSymbolSize=function(i){if(!i)throw new Error('"version" cannot be null or undefined');if(i<1||i>40)throw new Error('"version" should be in range from 1 to 40');return i*4+17},yr.getSymbolTotalCodewords=function(i){return t[i]},yr.getBCHDigit=function(s){let i=0;for(;s!==0;)i++,s>>>=1;return i},yr.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');e=i},yr.isKanjiModeEnabled=function(){return typeof e<"u"},yr.toSJIS=function(i){return e(i)},yr}var Nd={},rv;function tp(){return rv||(rv=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+s)}}e.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},e.from=function(i,o){if(e.isValid(i))return i;try{return t(i)}catch{return o}}})(Nd)),Nd}var bd,sv;function jM(){if(sv)return bd;sv=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const s=Math.floor(t/8);return(this.buffer[s]>>>7-t%8&1)===1},put:function(t,s){for(let i=0;i<s;i++)this.putBit((t>>>s-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const s=Math.floor(this.length/8);this.buffer.length<=s&&this.buffer.push(0),t&&(this.buffer[s]|=128>>>this.length%8),this.length++}},bd=e,bd}var Rd,iv;function MM(){if(iv)return Rd;iv=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,s,i,o){const l=t*this.size+s;this.data[l]=i,o&&(this.reservedBit[l]=!0)},e.prototype.get=function(t,s){return this.data[t*this.size+s]},e.prototype.xor=function(t,s,i){this.data[t*this.size+s]^=i},e.prototype.isReserved=function(t,s){return this.reservedBit[t*this.size+s]},Rd=e,Rd}var jd={},ov;function DM(){return ov||(ov=1,(function(e){const t=ys().getSymbolSize;e.getRowColCoords=function(i){if(i===1)return[];const o=Math.floor(i/7)+2,l=t(i),u=l===145?26:Math.ceil((l-13)/(2*o-2))*2,d=[l-7];for(let h=1;h<o-1;h++)d[h]=d[h-1]-u;return d.push(6),d.reverse()},e.getPositions=function(i){const o=[],l=e.getRowColCoords(i),u=l.length;for(let d=0;d<u;d++)for(let h=0;h<u;h++)d===0&&h===0||d===0&&h===u-1||d===u-1&&h===0||o.push([l[d],l[h]]);return o}})(jd)),jd}var Md={},av;function AM(){if(av)return Md;av=1;const e=ys().getSymbolSize,t=7;return Md.getPositions=function(i){const o=e(i);return[[0,0],[o-t,0],[0,o-t]]},Md}var Dd={},lv;function LM(){return lv||(lv=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const l=o.size;let u=0,d=0,h=0,m=null,y=null;for(let v=0;v<l;v++){d=h=0,m=y=null;for(let x=0;x<l;x++){let C=o.get(v,x);C===m?d++:(d>=5&&(u+=t.N1+(d-5)),m=C,d=1),C=o.get(x,v),C===y?h++:(h>=5&&(u+=t.N1+(h-5)),y=C,h=1)}d>=5&&(u+=t.N1+(d-5)),h>=5&&(u+=t.N1+(h-5))}return u},e.getPenaltyN2=function(o){const l=o.size;let u=0;for(let d=0;d<l-1;d++)for(let h=0;h<l-1;h++){const m=o.get(d,h)+o.get(d,h+1)+o.get(d+1,h)+o.get(d+1,h+1);(m===4||m===0)&&u++}return u*t.N2},e.getPenaltyN3=function(o){const l=o.size;let u=0,d=0,h=0;for(let m=0;m<l;m++){d=h=0;for(let y=0;y<l;y++)d=d<<1&2047|o.get(m,y),y>=10&&(d===1488||d===93)&&u++,h=h<<1&2047|o.get(y,m),y>=10&&(h===1488||h===93)&&u++}return u*t.N3},e.getPenaltyN4=function(o){let l=0;const u=o.data.length;for(let h=0;h<u;h++)l+=o.data[h];return Math.abs(Math.ceil(l*100/u/5)-10)*t.N4};function s(i,o,l){switch(i){case e.Patterns.PATTERN000:return(o+l)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return l%3===0;case e.Patterns.PATTERN011:return(o+l)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(l/3))%2===0;case e.Patterns.PATTERN101:return o*l%2+o*l%3===0;case e.Patterns.PATTERN110:return(o*l%2+o*l%3)%2===0;case e.Patterns.PATTERN111:return(o*l%3+(o+l)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}e.applyMask=function(o,l){const u=l.size;for(let d=0;d<u;d++)for(let h=0;h<u;h++)l.isReserved(h,d)||l.xor(h,d,s(o,h,d))},e.getBestMask=function(o,l){const u=Object.keys(e.Patterns).length;let d=0,h=1/0;for(let m=0;m<u;m++){l(m),e.applyMask(m,o);const y=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(m,o),y<h&&(h=y,d=m)}return d}})(Dd)),Dd}var fl={},uv;function gS(){if(uv)return fl;uv=1;const e=tp(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],s=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return fl.getBlocksCount=function(o,l){switch(l){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},fl.getTotalCodewordsCount=function(o,l){switch(l){case e.L:return s[(o-1)*4+0];case e.M:return s[(o-1)*4+1];case e.Q:return s[(o-1)*4+2];case e.H:return s[(o-1)*4+3];default:return}},fl}var Ad={},mo={},cv;function IM(){if(cv)return mo;cv=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let i=1;for(let o=0;o<255;o++)e[o]=i,t[i]=o,i<<=1,i&256&&(i^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),mo.log=function(i){if(i<1)throw new Error("log("+i+")");return t[i]},mo.exp=function(i){return e[i]},mo.mul=function(i,o){return i===0||o===0?0:e[t[i]+t[o]]},mo}var dv;function FM(){return dv||(dv=1,(function(e){const t=IM();e.mul=function(i,o){const l=new Uint8Array(i.length+o.length-1);for(let u=0;u<i.length;u++)for(let d=0;d<o.length;d++)l[u+d]^=t.mul(i[u],o[d]);return l},e.mod=function(i,o){let l=new Uint8Array(i);for(;l.length-o.length>=0;){const u=l[0];for(let h=0;h<o.length;h++)l[h]^=t.mul(o[h],u);let d=0;for(;d<l.length&&l[d]===0;)d++;l=l.slice(d)}return l},e.generateECPolynomial=function(i){let o=new Uint8Array([1]);for(let l=0;l<i;l++)o=e.mul(o,new Uint8Array([1,t.exp(l)]));return o}})(Ad)),Ad}var Ld,fv;function _M(){if(fv)return Ld;fv=1;const e=FM();function t(s){this.genPoly=void 0,this.degree=s,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(i){this.degree=i,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(i){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(i.length+this.degree);o.set(i);const l=e.mod(o,this.genPoly),u=this.degree-l.length;if(u>0){const d=new Uint8Array(this.degree);return d.set(l,u),d}return l},Ld=t,Ld}var Id={},Fd={},_d={},hv;function yS(){return hv||(hv=1,_d.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),_d}var Sn={},pv;function vS(){if(pv)return Sn;pv=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let s="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";s=s.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+s+`)(?:.|[\r
340
- ]))+`;Sn.KANJI=new RegExp(s,"g"),Sn.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Sn.BYTE=new RegExp(i,"g"),Sn.NUMERIC=new RegExp(e,"g"),Sn.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+s+"$"),l=new RegExp("^"+e+"$"),u=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Sn.testKanji=function(h){return o.test(h)},Sn.testNumeric=function(h){return l.test(h)},Sn.testAlphanumeric=function(h){return u.test(h)},Sn}var mv;function vs(){return mv||(mv=1,(function(e){const t=yS(),s=vS();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(l,u){if(!l.ccBits)throw new Error("Invalid mode: "+l);if(!t.isValid(u))throw new Error("Invalid version: "+u);return u>=1&&u<10?l.ccBits[0]:u<27?l.ccBits[1]:l.ccBits[2]},e.getBestModeForData=function(l){return s.testNumeric(l)?e.NUMERIC:s.testAlphanumeric(l)?e.ALPHANUMERIC:s.testKanji(l)?e.KANJI:e.BYTE},e.toString=function(l){if(l&&l.id)return l.id;throw new Error("Invalid mode")},e.isValid=function(l){return l&&l.bit&&l.ccBits};function i(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(l,u){if(e.isValid(l))return l;try{return i(l)}catch{return u}}})(Fd)),Fd}var gv;function OM(){return gv||(gv=1,(function(e){const t=ys(),s=gS(),i=tp(),o=vs(),l=yS(),u=7973,d=t.getBCHDigit(u);function h(x,C,k){for(let E=1;E<=40;E++)if(C<=e.getCapacity(E,k,x))return E}function m(x,C){return o.getCharCountIndicator(x,C)+4}function y(x,C){let k=0;return x.forEach(function(E){const T=m(E.mode,C);k+=T+E.getBitsLength()}),k}function v(x,C){for(let k=1;k<=40;k++)if(y(x,k)<=e.getCapacity(k,C,o.MIXED))return k}e.from=function(C,k){return l.isValid(C)?parseInt(C,10):k},e.getCapacity=function(C,k,E){if(!l.isValid(C))throw new Error("Invalid QR Code version");typeof E>"u"&&(E=o.BYTE);const T=t.getSymbolTotalCodewords(C),P=s.getTotalCodewordsCount(C,k),L=(T-P)*8;if(E===o.MIXED)return L;const b=L-m(E,C);switch(E){case o.NUMERIC:return Math.floor(b/10*3);case o.ALPHANUMERIC:return Math.floor(b/11*2);case o.KANJI:return Math.floor(b/13);case o.BYTE:default:return Math.floor(b/8)}},e.getBestVersionForData=function(C,k){let E;const T=i.from(k,i.M);if(Array.isArray(C)){if(C.length>1)return v(C,T);if(C.length===0)return 1;E=C[0]}else E=C;return h(E.mode,E.getLength(),T)},e.getEncodedBits=function(C){if(!l.isValid(C)||C<7)throw new Error("Invalid QR Code version");let k=C<<12;for(;t.getBCHDigit(k)-d>=0;)k^=u<<t.getBCHDigit(k)-d;return C<<12|k}})(Id)),Id}var Od={},yv;function VM(){if(yv)return Od;yv=1;const e=ys(),t=1335,s=21522,i=e.getBCHDigit(t);return Od.getEncodedBits=function(l,u){const d=l.bit<<3|u;let h=d<<10;for(;e.getBCHDigit(h)-i>=0;)h^=t<<e.getBCHDigit(h)-i;return(d<<10|h)^s},Od}var Vd={},Bd,vv;function BM(){if(vv)return Bd;vv=1;const e=vs();function t(s){this.mode=e.NUMERIC,this.data=s.toString()}return t.getBitsLength=function(i){return 10*Math.floor(i/3)+(i%3?i%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(i){let o,l,u;for(o=0;o+3<=this.data.length;o+=3)l=this.data.substr(o,3),u=parseInt(l,10),i.put(u,10);const d=this.data.length-o;d>0&&(l=this.data.substr(o),u=parseInt(l,10),i.put(u,d*3+1))},Bd=t,Bd}var zd,xv;function zM(){if(xv)return zd;xv=1;const e=vs(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function s(i){this.mode=e.ALPHANUMERIC,this.data=i}return s.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(o){let l;for(l=0;l+2<=this.data.length;l+=2){let u=t.indexOf(this.data[l])*45;u+=t.indexOf(this.data[l+1]),o.put(u,11)}this.data.length%2&&o.put(t.indexOf(this.data[l]),6)},zd=s,zd}var Ud,wv;function UM(){if(wv)return Ud;wv=1;const e=vs();function t(s){this.mode=e.BYTE,typeof s=="string"?this.data=new TextEncoder().encode(s):this.data=new Uint8Array(s)}return t.getBitsLength=function(i){return i*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(s){for(let i=0,o=this.data.length;i<o;i++)s.put(this.data[i],8)},Ud=t,Ud}var $d,Sv;function $M(){if(Sv)return $d;Sv=1;const e=vs(),t=ys();function s(i){this.mode=e.KANJI,this.data=i}return s.getBitsLength=function(o){return o*13},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(i){let o;for(o=0;o<this.data.length;o++){let l=t.toSJIS(this.data[o]);if(l>=33088&&l<=40956)l-=33088;else if(l>=57408&&l<=60351)l-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
341
- Make sure your charset is UTF-8`);l=(l>>>8&255)*192+(l&255),i.put(l,13)}},$d=s,$d}var Hd={exports:{}},kv;function HM(){return kv||(kv=1,(function(e){var t={single_source_shortest_paths:function(s,i,o){var l={},u={};u[i]=0;var d=t.PriorityQueue.make();d.push(i,0);for(var h,m,y,v,x,C,k,E,T;!d.empty();){h=d.pop(),m=h.value,v=h.cost,x=s[m]||{};for(y in x)x.hasOwnProperty(y)&&(C=x[y],k=v+C,E=u[y],T=typeof u[y]>"u",(T||E>k)&&(u[y]=k,d.push(y,k),l[y]=m))}if(typeof o<"u"&&typeof u[o]>"u"){var P=["Could not find a path from ",i," to ",o,"."].join("");throw new Error(P)}return l},extract_shortest_path_from_predecessor_list:function(s,i){for(var o=[],l=i;l;)o.push(l),s[l],l=s[l];return o.reverse(),o},find_path:function(s,i,o){var l=t.single_source_shortest_paths(s,i,o);return t.extract_shortest_path_from_predecessor_list(l,o)},PriorityQueue:{make:function(s){var i=t.PriorityQueue,o={},l;s=s||{};for(l in i)i.hasOwnProperty(l)&&(o[l]=i[l]);return o.queue=[],o.sorter=s.sorter||i.default_sorter,o},default_sorter:function(s,i){return s.cost-i.cost},push:function(s,i){var o={value:s,cost:i};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Hd)),Hd.exports}var Cv;function KM(){return Cv||(Cv=1,(function(e){const t=vs(),s=BM(),i=zM(),o=UM(),l=$M(),u=vS(),d=ys(),h=HM();function m(P){return unescape(encodeURIComponent(P)).length}function y(P,L,b){const M=[];let _;for(;(_=P.exec(b))!==null;)M.push({data:_[0],index:_.index,mode:L,length:_[0].length});return M}function v(P){const L=y(u.NUMERIC,t.NUMERIC,P),b=y(u.ALPHANUMERIC,t.ALPHANUMERIC,P);let M,_;return d.isKanjiModeEnabled()?(M=y(u.BYTE,t.BYTE,P),_=y(u.KANJI,t.KANJI,P)):(M=y(u.BYTE_KANJI,t.BYTE,P),_=[]),L.concat(b,M,_).sort(function(R,D){return R.index-D.index}).map(function(R){return{data:R.data,mode:R.mode,length:R.length}})}function x(P,L){switch(L){case t.NUMERIC:return s.getBitsLength(P);case t.ALPHANUMERIC:return i.getBitsLength(P);case t.KANJI:return l.getBitsLength(P);case t.BYTE:return o.getBitsLength(P)}}function C(P){return P.reduce(function(L,b){const M=L.length-1>=0?L[L.length-1]:null;return M&&M.mode===b.mode?(L[L.length-1].data+=b.data,L):(L.push(b),L)},[])}function k(P){const L=[];for(let b=0;b<P.length;b++){const M=P[b];switch(M.mode){case t.NUMERIC:L.push([M,{data:M.data,mode:t.ALPHANUMERIC,length:M.length},{data:M.data,mode:t.BYTE,length:M.length}]);break;case t.ALPHANUMERIC:L.push([M,{data:M.data,mode:t.BYTE,length:M.length}]);break;case t.KANJI:L.push([M,{data:M.data,mode:t.BYTE,length:m(M.data)}]);break;case t.BYTE:L.push([{data:M.data,mode:t.BYTE,length:m(M.data)}])}}return L}function E(P,L){const b={},M={start:{}};let _=["start"];for(let I=0;I<P.length;I++){const R=P[I],D=[];for(let B=0;B<R.length;B++){const W=R[B],G=""+I+B;D.push(G),b[G]={node:W,lastCount:0},M[G]={};for(let K=0;K<_.length;K++){const U=_[K];b[U]&&b[U].node.mode===W.mode?(M[U][G]=x(b[U].lastCount+W.length,W.mode)-x(b[U].lastCount,W.mode),b[U].lastCount+=W.length):(b[U]&&(b[U].lastCount=W.length),M[U][G]=x(W.length,W.mode)+4+t.getCharCountIndicator(W.mode,L))}}_=D}for(let I=0;I<_.length;I++)M[_[I]].end=0;return{map:M,table:b}}function T(P,L){let b;const M=t.getBestModeForData(P);if(b=t.from(L,M),b!==t.BYTE&&b.bit<M.bit)throw new Error('"'+P+'" cannot be encoded with mode '+t.toString(b)+`.
342
- Suggested mode is: `+t.toString(M));switch(b===t.KANJI&&!d.isKanjiModeEnabled()&&(b=t.BYTE),b){case t.NUMERIC:return new s(P);case t.ALPHANUMERIC:return new i(P);case t.KANJI:return new l(P);case t.BYTE:return new o(P)}}e.fromArray=function(L){return L.reduce(function(b,M){return typeof M=="string"?b.push(T(M,null)):M.data&&b.push(T(M.data,M.mode)),b},[])},e.fromString=function(L,b){const M=v(L,d.isKanjiModeEnabled()),_=k(M),I=E(_,b),R=h.find_path(I.map,"start","end"),D=[];for(let B=1;B<R.length-1;B++)D.push(I.table[R[B]].node);return e.fromArray(C(D))},e.rawSplit=function(L){return e.fromArray(v(L,d.isKanjiModeEnabled()))}})(Vd)),Vd}var Ev;function WM(){if(Ev)return Pd;Ev=1;const e=ys(),t=tp(),s=jM(),i=MM(),o=DM(),l=AM(),u=LM(),d=gS(),h=_M(),m=OM(),y=VM(),v=vs(),x=KM();function C(I,R){const D=I.size,B=l.getPositions(R);for(let W=0;W<B.length;W++){const G=B[W][0],K=B[W][1];for(let U=-1;U<=7;U++)if(!(G+U<=-1||D<=G+U))for(let X=-1;X<=7;X++)K+X<=-1||D<=K+X||(U>=0&&U<=6&&(X===0||X===6)||X>=0&&X<=6&&(U===0||U===6)||U>=2&&U<=4&&X>=2&&X<=4?I.set(G+U,K+X,!0,!0):I.set(G+U,K+X,!1,!0))}}function k(I){const R=I.size;for(let D=8;D<R-8;D++){const B=D%2===0;I.set(D,6,B,!0),I.set(6,D,B,!0)}}function E(I,R){const D=o.getPositions(R);for(let B=0;B<D.length;B++){const W=D[B][0],G=D[B][1];for(let K=-2;K<=2;K++)for(let U=-2;U<=2;U++)K===-2||K===2||U===-2||U===2||K===0&&U===0?I.set(W+K,G+U,!0,!0):I.set(W+K,G+U,!1,!0)}}function T(I,R){const D=I.size,B=m.getEncodedBits(R);let W,G,K;for(let U=0;U<18;U++)W=Math.floor(U/3),G=U%3+D-8-3,K=(B>>U&1)===1,I.set(W,G,K,!0),I.set(G,W,K,!0)}function P(I,R,D){const B=I.size,W=y.getEncodedBits(R,D);let G,K;for(G=0;G<15;G++)K=(W>>G&1)===1,G<6?I.set(G,8,K,!0):G<8?I.set(G+1,8,K,!0):I.set(B-15+G,8,K,!0),G<8?I.set(8,B-G-1,K,!0):G<9?I.set(8,15-G-1+1,K,!0):I.set(8,15-G-1,K,!0);I.set(B-8,8,1,!0)}function L(I,R){const D=I.size;let B=-1,W=D-1,G=7,K=0;for(let U=D-1;U>0;U-=2)for(U===6&&U--;;){for(let X=0;X<2;X++)if(!I.isReserved(W,U-X)){let ge=!1;K<R.length&&(ge=(R[K]>>>G&1)===1),I.set(W,U-X,ge),G--,G===-1&&(K++,G=7)}if(W+=B,W<0||D<=W){W-=B,B=-B;break}}}function b(I,R,D){const B=new s;D.forEach(function(X){B.put(X.mode.bit,4),B.put(X.getLength(),v.getCharCountIndicator(X.mode,I)),X.write(B)});const W=e.getSymbolTotalCodewords(I),G=d.getTotalCodewordsCount(I,R),K=(W-G)*8;for(B.getLengthInBits()+4<=K&&B.put(0,4);B.getLengthInBits()%8!==0;)B.putBit(0);const U=(K-B.getLengthInBits())/8;for(let X=0;X<U;X++)B.put(X%2?17:236,8);return M(B,I,R)}function M(I,R,D){const B=e.getSymbolTotalCodewords(R),W=d.getTotalCodewordsCount(R,D),G=B-W,K=d.getBlocksCount(R,D),U=B%K,X=K-U,ge=Math.floor(B/K),me=Math.floor(G/K),Ee=me+1,ee=ge-me,ue=new h(ee);let J=0;const V=new Array(K),F=new Array(K);let ne=0;const ye=new Uint8Array(I.buffer);for(let je=0;je<K;je++){const it=je<X?me:Ee;V[je]=ye.slice(J,J+it),F[je]=ue.encode(V[je]),J+=it,ne=Math.max(ne,it)}const ke=new Uint8Array(B);let Te=0,Ce,xe;for(Ce=0;Ce<ne;Ce++)for(xe=0;xe<K;xe++)Ce<V[xe].length&&(ke[Te++]=V[xe][Ce]);for(Ce=0;Ce<ee;Ce++)for(xe=0;xe<K;xe++)ke[Te++]=F[xe][Ce];return ke}function _(I,R,D,B){let W;if(Array.isArray(I))W=x.fromArray(I);else if(typeof I=="string"){let ge=R;if(!ge){const me=x.rawSplit(I);ge=m.getBestVersionForData(me,D)}W=x.fromString(I,ge||40)}else throw new Error("Invalid data");const G=m.getBestVersionForData(W,D);if(!G)throw new Error("The amount of data is too big to be stored in a QR Code");if(!R)R=G;else if(R<G)throw new Error(`
343
- The chosen QR Code version cannot contain this amount of data.
344
- Minimum version required to store current data is: `+G+`.
345
- `);const K=b(R,D,W),U=e.getSymbolSize(R),X=new i(U);return C(X,R),k(X),E(X,R),P(X,D,0),R>=7&&T(X,R),L(X,K),isNaN(B)&&(B=u.getBestMask(X,P.bind(null,X,D))),u.applyMask(B,X),P(X,D,B),{modules:X,version:R,errorCorrectionLevel:D,maskPattern:B,segments:W}}return Pd.create=function(R,D){if(typeof R>"u"||R==="")throw new Error("No input text");let B=t.M,W,G;return typeof D<"u"&&(B=t.from(D.errorCorrectionLevel,t.M),W=m.from(D.version),G=u.from(D.maskPattern),D.toSJISFunc&&e.setToSJISFunction(D.toSJISFunc)),_(R,W,B,G)},Pd}var Kd={},Wd={},Tv;function xS(){return Tv||(Tv=1,(function(e){function t(s){if(typeof s=="number"&&(s=s.toString()),typeof s!="string")throw new Error("Color should be defined as hex string");let i=s.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+s);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(l){return[l,l]}))),i.length===6&&i.push("F","F");const o=parseInt(i.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+i.slice(0,6).join("")}}e.getOptions=function(i){i||(i={}),i.color||(i.color={});const o=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,l=i.width&&i.width>=21?i.width:void 0,u=i.scale||4;return{width:l,scale:l?4:u,margin:o,color:{dark:t(i.color.dark||"#000000ff"),light:t(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},e.getScale=function(i,o){return o.width&&o.width>=i+o.margin*2?o.width/(i+o.margin*2):o.scale},e.getImageWidth=function(i,o){const l=e.getScale(i,o);return Math.floor((i+o.margin*2)*l)},e.qrToImageData=function(i,o,l){const u=o.modules.size,d=o.modules.data,h=e.getScale(u,l),m=Math.floor((u+l.margin*2)*h),y=l.margin*h,v=[l.color.light,l.color.dark];for(let x=0;x<m;x++)for(let C=0;C<m;C++){let k=(x*m+C)*4,E=l.color.light;if(x>=y&&C>=y&&x<m-y&&C<m-y){const T=Math.floor((x-y)/h),P=Math.floor((C-y)/h);E=v[d[T*u+P]?1:0]}i[k++]=E.r,i[k++]=E.g,i[k++]=E.b,i[k]=E.a}}})(Wd)),Wd}var Pv;function qM(){return Pv||(Pv=1,(function(e){const t=xS();function s(o,l,u){o.clearRect(0,0,l.width,l.height),l.style||(l.style={}),l.height=u,l.width=u,l.style.height=u+"px",l.style.width=u+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(l,u,d){let h=d,m=u;typeof h>"u"&&(!u||!u.getContext)&&(h=u,u=void 0),u||(m=i()),h=t.getOptions(h);const y=t.getImageWidth(l.modules.size,h),v=m.getContext("2d"),x=v.createImageData(y,y);return t.qrToImageData(x.data,l,h),s(v,m,y),v.putImageData(x,0,0),m},e.renderToDataURL=function(l,u,d){let h=d;typeof h>"u"&&(!u||!u.getContext)&&(h=u,u=void 0),h||(h={});const m=e.render(l,u,h),y=h.type||"image/png",v=h.rendererOpts||{};return m.toDataURL(y,v.quality)}})(Kd)),Kd}var qd={},Nv;function QM(){if(Nv)return qd;Nv=1;const e=xS();function t(o,l){const u=o.a/255,d=l+'="'+o.hex+'"';return u<1?d+" "+l+'-opacity="'+u.toFixed(2).slice(1)+'"':d}function s(o,l,u){let d=o+l;return typeof u<"u"&&(d+=" "+u),d}function i(o,l,u){let d="",h=0,m=!1,y=0;for(let v=0;v<o.length;v++){const x=Math.floor(v%l),C=Math.floor(v/l);!x&&!m&&(m=!0),o[v]?(y++,v>0&&x>0&&o[v-1]||(d+=m?s("M",x+u,.5+C+u):s("m",h,0),h=0,m=!1),x+1<l&&o[v+1]||(d+=s("h",y),y=0)):h++}return d}return qd.render=function(l,u,d){const h=e.getOptions(u),m=l.modules.size,y=l.modules.data,v=m+h.margin*2,x=h.color.light.a?"<path "+t(h.color.light,"fill")+' d="M0 0h'+v+"v"+v+'H0z"/>':"",C="<path "+t(h.color.dark,"stroke")+' d="'+i(y,m,h.margin)+'"/>',k='viewBox="0 0 '+v+" "+v+'"',T='<svg xmlns="http://www.w3.org/2000/svg" '+(h.width?'width="'+h.width+'" height="'+h.width+'" ':"")+k+' shape-rendering="crispEdges">'+x+C+`</svg>
346
- `;return typeof d=="function"&&d(null,T),T},qd}var bv;function GM(){if(bv)return Hs;bv=1;const e=RM(),t=WM(),s=qM(),i=QM();function o(l,u,d,h,m){const y=[].slice.call(arguments,1),v=y.length,x=typeof y[v-1]=="function";if(!x&&!e())throw new Error("Callback required as last argument");if(x){if(v<2)throw new Error("Too few arguments provided");v===2?(m=d,d=u,u=h=void 0):v===3&&(u.getContext&&typeof m>"u"?(m=h,h=void 0):(m=h,h=d,d=u,u=void 0))}else{if(v<1)throw new Error("Too few arguments provided");return v===1?(d=u,u=h=void 0):v===2&&!u.getContext&&(h=d,d=u,u=void 0),new Promise(function(C,k){try{const E=t.create(d,h);C(l(E,u,h))}catch(E){k(E)}})}try{const C=t.create(d,h);m(null,l(C,u,h))}catch(C){m(C)}}return Hs.create=t.create,Hs.toCanvas=o.bind(null,s.render),Hs.toDataURL=o.bind(null,s.renderToDataURL),Hs.toString=o.bind(null,function(l,u,d){return i.render(l,d)}),Hs}var YM=GM();const XM=xk(YM),Rv=2e3;function JM({onSignedIn:e,onPasswordRequired:t}){const[s,i]=S.useState(null),[o,l]=S.useState(null),[u,d]=S.useState(null),[h,m]=S.useState(null),[y,v]=S.useState(!1),x=S.useRef(!1);S.useEffect(()=>{let k=!1;return m(null),we.auth.startQrLogin().then(E=>{k||(i(E),l(E.token))}).catch(E=>{k||m(ze(E,"Could not start Telegram sign-in"))}),()=>{k=!0}},[]),S.useEffect(()=>{if(o===null)return;let k=!1;return XM.toDataURL(o.url,{margin:1,width:240}).then(E=>{k||d(E)}).catch(()=>{k||m("Could not draw the QR code. Use the phone form below.")}),()=>{k=!0}},[o]),S.useEffect(()=>{if(s===null)return;let k=!1,E;const T=async()=>{if(!(k||x.current)){try{const P=await we.auth.pollQrLogin(s.flowId);if(k)return;if(P.status==="ok"){x.current=!0,v(!0),await e();return}if(P.status==="password_required"){t(s.flowId);return}if(P.status==="expired"){i(null),l(null);return}l(P.token)}catch(P){k||m(ze(P,"Telegram sign-in ended. Try again."));return}E=setTimeout(T,Rv)}};return E=setTimeout(T,Rv),()=>{k=!0,E!==void 0&&clearTimeout(E)}},[s,e,t]);const C=()=>{x.current=!1,m(null),d(null),i(null),l(null),we.auth.startQrLogin().then(k=>{i(k),l(k.token)}).catch(k=>m(ze(k,"Could not start Telegram sign-in")))};return p.jsxs("section",{"aria-labelledby":"qr-login-heading",className:"grid gap-3",children:[p.jsxs("div",{children:[p.jsx("h2",{id:"qr-login-heading",className:"text-base font-semibold",children:"Connect with the Telegram app"}),p.jsx("p",{className:"muted mt-1 text-sm",children:"Open Telegram on your phone, go to Settings → Devices → Link Desktop Device, and scan this code."})]}),p.jsx("div",{className:"flex min-h-[248px] items-center justify-center rounded-lg border p-3",children:y?p.jsxs("div",{role:"status",className:"flex items-center gap-2.5 text-sm",children:[p.jsx(kt,{className:"h-4 w-4 shrink-0 animate-spin text-gold-text","aria-hidden":"true"}),p.jsx("span",{children:"Approved. Preparing your private storage..."})]}):u!==null?p.jsx("img",{src:u,alt:"Telegram login QR code",width:240,height:240,className:"h-60 w-60"}):p.jsx(kt,{className:"h-6 w-6 animate-spin text-gold-text","aria-label":"Loading QR code"})}),h!==null?p.jsxs("div",{role:"alert",className:"notice notice-error",children:[h," ",p.jsx("button",{type:"button",className:"font-semibold underline",onClick:C,children:"Try again"})]}):null,o!==null&&!y?p.jsx("p",{className:"muted text-xs",children:"The code refreshes automatically while you wait."}):null]})}const ZM=/^\d{3,10}$/,jv="font-semibold text-gold-text transition-colors hover:underline";function e4(){const e=zh(),t=fn(),s=xi(),[i,o]=S.useState("phone"),[l,u]=S.useState(""),[d,h]=S.useState(""),[m,y]=S.useState(""),[v,x]=S.useState(null),[C,k]=S.useState(null),[E,T]=S.useState(!1),P=S.useCallback(async()=>{try{const U=await we.auth.me();t.setQueryData(Uo,U),s("/",{replace:!0})}catch{k("Signed in, but loading your drive failed. Please reload the page.")}finally{T(!1)}},[t,s]),L=Kt({mutationFn:()=>we.auth.startLogin(l.trim()),onSuccess:()=>{k(null),o("code")},onError:U=>k(ze(U,"Could not send the login code"))}),b=Kt({mutationFn:()=>we.auth.verifyCode(l.trim(),d.trim()),onSuccess:async U=>{if(U.status==="password_required"){k(null),o("password");return}await P()},onError:U=>k(ze(U,"The login code was rejected")),onSettled:()=>T(!1)}),M=Kt({mutationFn:()=>v!==null?we.auth.submitQrPassword(v,m):we.auth.verifyPassword(l.trim(),m),onSuccess:async()=>{await P()},onError:U=>k(ze(U,"The password was rejected")),onSettled:()=>T(!1)});if(e.data!==void 0&&e.data.user!==null)return p.jsx(eh,{to:"/",replace:!0});const _=L.isPending||b.isPending||M.isPending||E,I=b.isPending||M.isPending||E,R=U=>{U.preventDefault(),!(_||l.trim()==="")&&(k(null),L.mutate())},D=U=>{if(U.preventDefault(),!_){if(!ZM.test(d.trim())){k("Please enter the numeric code Telegram sent you");return}k(null),T(!0),b.mutate()}},B=U=>{U.preventDefault(),!(_||m==="")&&(k(null),T(!0),M.mutate())},W=()=>{o("phone"),h(""),k(null)},G=C!==null?p.jsx("div",{role:"alert",className:"notice notice-error",children:C}):null,K=I?p.jsxs("div",{role:"status",className:"notice flex items-center gap-2.5",children:[p.jsx(kt,{className:"h-4 w-4 shrink-0 animate-spin text-gold-text","aria-hidden":"true"}),p.jsx("span",{children:"Preparing your private storage…"})]}):null;return p.jsxs("div",{className:"grid min-h-dvh lg:grid-cols-2",children:[p.jsx("a",{href:"#main",className:"skip-link btn-gold",children:"Skip to content"}),p.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:[p.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%)"}}),p.jsxs("a",{href:"/",className:"relative flex items-center gap-2.5 text-[15px] font-semibold text-white",children:[p.jsx("span",{className:"text-lg leading-none",children:"◈"})," Omni",p.jsx("span",{className:"font-normal text-white/80",children:"Cloud"})]}),p.jsxs("div",{className:"relative",children:[p.jsxs("p",{className:"text-[clamp(34px,3.4vw,48px)] font-extrabold leading-[1.08] tracking-[-0.03em] text-white",children:["Your drive.",p.jsx("br",{}),"Powered by Telegram."]}),p.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."})]}),p.jsx("p",{className:"relative text-xs text-white/70",children:"© 2026 OmniCloud · self-hosted storage on your Telegram."})]}),p.jsxs("main",{id:"main",className:"flex min-h-dvh flex-col px-5 py-7",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("a",{href:"/",className:"flex items-center gap-2.5 text-[15px] font-semibold lg:invisible",children:[p.jsx("span",{className:"text-lg leading-none text-gold",children:"◈"})," Omni",p.jsx("span",{className:"muted font-normal",children:"Cloud"})]}),p.jsx(fS,{})]}),p.jsx("div",{className:"flex flex-1 items-center justify-center py-10",children:p.jsxs("div",{className:"w-full max-w-sm",children:[i==="phone"?p.jsxs(p.Fragment,{children:[p.jsx(JM,{onSignedIn:P,onPasswordRequired:U=>{x(U),o("password")}}),p.jsxs("div",{className:"my-6 flex items-center gap-3 text-xs muted","aria-hidden":"true",children:[p.jsx("span",{className:"h-px flex-1 bg-current opacity-20"}),"or use your phone number",p.jsx("span",{className:"h-px flex-1 bg-current opacity-20"})]}),p.jsxs("form",{onSubmit:R,noValidate:!0,className:"grid gap-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold tracking-[-0.02em]",children:"Sign in with Telegram"}),p.jsx("p",{className:"muted mt-1.5 text-sm",children:"Enter your phone number to receive a login code."})]}),p.jsxs("label",{htmlFor:"login-phone",className:"grid gap-1.5",children:[p.jsx("span",{className:"text-[13px] font-medium",children:"Phone number"}),p.jsx("input",{id:"login-phone",type:"tel",autoComplete:"tel",placeholder:"+15551234567",value:l,disabled:_,onChange:U=>u(U.target.value),className:"input"})]}),p.jsxs("button",{type:"submit",className:"btn-gold mt-1 justify-center",disabled:_||l.trim()==="",children:[L.isPending&&p.jsx(kt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),L.isPending?"Sending code…":"Continue"]})]}),G]}):i==="code"?p.jsxs(p.Fragment,{children:[p.jsxs("form",{onSubmit:D,noValidate:!0,className:"grid gap-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold tracking-[-0.02em]",children:"Enter the code"}),p.jsxs("p",{className:"muted mt-1.5 text-sm",children:["Enter the code Telegram sent to ",p.jsx("span",{className:"font-medium",children:l}),"."]})]}),p.jsxs("label",{htmlFor:"login-code",className:"grid gap-1.5",children:[p.jsx("span",{className:"text-[13px] font-medium",children:"Login code"}),p.jsx("input",{id:"login-code",type:"text",inputMode:"numeric",autoComplete:"one-time-code",autoFocus:!0,value:d,disabled:_,onChange:U=>h(U.target.value),className:"input tracking-[0.3em]"})]}),p.jsxs("button",{type:"submit",className:"btn-gold mt-1 justify-center",disabled:_||d.trim()==="",children:[b.isPending&&p.jsx(kt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),b.isPending?"Verifying…":"Verify"]})]}),K,G,p.jsx("button",{type:"button",onClick:W,disabled:_,className:`mt-4 w-full text-center text-sm disabled:opacity-60 ${jv}`,children:"Use a different number →"})]}):p.jsxs(p.Fragment,{children:[p.jsxs("form",{onSubmit:B,noValidate:!0,className:"grid gap-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold tracking-[-0.02em]",children:"Two-factor password"}),p.jsx("p",{className:"muted mt-1.5 text-sm",children:"Your Telegram account is protected with a cloud password."})]}),p.jsxs("label",{htmlFor:"login-password",className:"grid gap-1.5",children:[p.jsx("span",{className:"text-[13px] font-medium",children:"Password"}),p.jsx("input",{id:"login-password",type:"password",autoComplete:"current-password",autoFocus:!0,value:m,disabled:_,onChange:U=>y(U.target.value),className:"input"})]}),p.jsxs("button",{type:"submit",className:"btn-gold mt-1 justify-center",disabled:_||m==="",children:[(M.isPending||E)&&p.jsx(kt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),M.isPending||E?"Signing in…":"Sign in"]})]}),K,G,p.jsx("button",{type:"button",onClick:()=>{o("code"),y(""),k(null)},disabled:_,className:`mt-4 w-full text-center text-sm disabled:opacity-60 ${jv}`,children:"Back to the code →"})]}),p.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 t4=100,n4={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 r4(){const[e,t]=S.useState(null),s=Mo({queryKey:["recent"],queryFn:o=>we.recent.list({page:o,limit:t4}).then(l=>({items:l.items.map(u=>({key:`${u.file.id}:${u.lastActionAt}`,item:Ci(u.file),action:u.lastAction,at:u.lastActionAt,label:Yj(u.lastActionAt)})),pagination:l.pagination}))}),i=S.useMemo(()=>{const o=new Map;for(const l of s.items){const u=o.get(l.label);u===void 0?o.set(l.label,[l]):u.push(l)}return Array.from(o.entries())},[s.items]);return p.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-6 md:px-8",children:[p.jsx(hi,{title:p.jsxs("div",{children:[p.jsx(pi,{children:"Recent"}),p.jsx("p",{className:"muted mt-1 text-[13px]",children:"What you have touched lately, newest first."})]})}),s.isLoading?p.jsx(Hh,{label:"Loading recent activity"}):s.isError?p.jsxs("div",{className:"card mt-6 p-6 text-center",children:[p.jsx("p",{className:"text-sm font-medium",children:"Something went wrong."}),p.jsx("p",{className:"muted mt-1 text-sm",children:ze(s.error,"Could not load recent activity.")}),p.jsx("button",{type:"button",className:"btn-secondary mt-4",onClick:s.refetch,children:"Try again"})]}):s.items.length===0?p.jsx(Jl,{icon:Ix,title:"Nothing recent",description:"Uploads, downloads and edits will appear here."}):p.jsx("div",{className:"mt-5 grid gap-6",children:i.map(([o,l])=>p.jsxs("section",{children:[p.jsx("h2",{className:"eyebrow",children:o}),p.jsx("ul",{className:"mt-3 grid gap-1.5",children:l.map(u=>{const{Icon:d,color:h}=Kn(u.item.mimeType);return p.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:[p.jsxs("button",{type:"button",onClick:()=>t(u.item),className:"flex min-w-0 flex-1 items-center gap-3 text-left",children:[p.jsx(d,{className:`h-5 w-5 shrink-0 ${h}`,"aria-hidden":"true"}),p.jsxs("span",{className:"min-w-0 flex-1",children:[p.jsx("span",{className:"block truncate text-sm font-medium",title:u.item.name,children:u.item.name}),p.jsxs("span",{className:"muted block text-[12px]",children:[n4[u.action],p.jsx("span",{className:"mx-1.5","aria-hidden":"true",children:"·"}),Ys(u.at)]})]}),p.jsx("span",{className:"muted hidden shrink-0 text-[12.5px] tabular-nums sm:block",children:jt(u.item.size)})]}),p.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:p.jsx(ih,{className:"h-4 w-4","aria-hidden":"true"})})]},u.key)})})]},o))}),s.hasMore?p.jsx("div",{className:"mt-6 flex justify-center",children:p.jsx("button",{type:"button",className:"btn-secondary",onClick:s.loadMore,disabled:s.isLoadingMore,children:s.isLoadingMore?"Loading...":"Load more"})}):null,p.jsx(Ho,{item:e,onClose:()=>t(null),onAction:(o,l)=>{o==="download"&&we.files.download(l.id)}})]})}const s4=100;function i4(){const{uploads:e}=Xl(),t=xi(),[s,i]=Qh("omnicloud-view","list",$h),[o,l]=S.useState(null),[u,d]=S.useState(null),h=Yh(),m=Mo({queryKey:["starred"],queryFn:k=>we.starred.list({page:k,limit:s4,status:"active"}).then(E=>({items:[...E.folders.map(Uh),...E.files.map(Ci)],pagination:E.pagination}))}),y=m.items,v=S.useMemo(()=>y.map(ln),[y]);S.useEffect(()=>{h.prune(v)},[v,h]);const x=qh({onOpenItem:k=>{k.kind==="folder"?t(`/?folder=${encodeURIComponent(k.id)}`):we.files.download(k.id)},onShowDetails:d,onReplaceFile:e.replace}),C=S.useMemo(()=>y.filter(k=>h.isSelected(ln(k))),[y,h]);return Gh({onDelete:()=>x.runBatch("trash",C),onSelectAll:()=>h.selectAll(v),onEscape:()=>d(null)}),p.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-6 md:px-8",children:[p.jsx(hi,{title:p.jsxs("div",{children:[p.jsx(pi,{children:"Starred"}),p.jsx("p",{className:"muted mt-1 text-[13px]",children:"Files and folders you marked for quick access."})]}),actions:p.jsx(ep,{view:s,onChange:i})}),p.jsx("div",{className:"mt-5",children:p.jsx(Jh,{items:y,view:s,selection:h,onOpen:k=>x.handleAction(k.kind==="folder"?"open":"download",k),onAction:x.handleAction,onContextMenu:l,loading:m.isLoading,error:m.isError?ze(m.error,"Could not load starred items."):null,onRetry:m.refetch,hasMore:m.hasMore,loadingMore:m.isLoadingMore,onLoadMore:m.loadMore,emptyState:p.jsx(Jl,{icon:ps,title:"No starred items",description:"Star files and folders from My Drive to find them here."})})}),p.jsx(Zh,{count:h.count,onClear:h.clear,onSelectAll:()=>h.selectAll(v),children:p.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>x.runBatch("unstar",C),children:[p.jsx(ah,{className:"h-4 w-4","aria-hidden":"true"}),"Unstar"]})}),p.jsx(Xh,{menu:o,onClose:()=>l(null)}),p.jsx(Ho,{item:u,onClose:()=>d(null),onAction:x.handleAction}),x.dialogs]})}function hl({icon:e,label:t,value:s}){return p.jsxs("div",{className:"card flex items-center gap-3 p-4",children:[p.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}),p.jsxs("span",{className:"min-w-0",children:[p.jsx("span",{className:"muted block text-[12px]",children:t}),p.jsx("span",{className:"block truncate text-[15px] font-semibold tabular-nums",children:s})]})]})}function o4(){var x,C;const e=gs(),[t,s]=S.useState(null),[i,o]=S.useState(!1),l=Dr({queryKey:Bj,queryFn:we.storage.stats}),u=Kt({mutationFn:()=>we.storage.integrityCheck(i),onError:k=>e.error(ze(k,"The integrity check failed"))}),d=(x=l.data)==null?void 0:x.stats,h=S.useMemo(()=>{if(d===void 0)return[];const k=Math.max(1,...d.byType.map(E=>E.bytes));return[...d.byType].sort((E,T)=>T.bytes-E.bytes).map(E=>({...E,percent:Math.round(E.bytes/k*100)}))},[d]);if(l.isPending)return p.jsx(Hh,{label:"Loading storage statistics"});if(l.isError||d===void 0)return p.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-6 md:px-8",children:[p.jsx(hi,{title:p.jsx(pi,{children:"Storage"})}),p.jsxs("div",{className:"card mt-6 p-6 text-center",children:[p.jsx("p",{className:"text-sm font-medium",children:"Could not load storage statistics."}),p.jsx("p",{className:"muted mt-1 text-sm",children:ze(l.error,"The storage backend may be unavailable.")}),p.jsx("button",{type:"button",className:"btn-secondary mt-4",onClick:()=>void l.refetch(),children:"Try again"})]})]});const m=d.quotaBytes,y=m!==null&&m>0?Math.min(100,d.totalBytes/m*100):null,v=(C=u.data)==null?void 0:C.report;return p.jsxs("div",{className:"mx-auto max-w-4xl px-4 py-6 md:px-8",children:[p.jsx(hi,{title:p.jsxs("div",{children:[p.jsx(pi,{children:"Storage"}),p.jsx("p",{className:"muted mt-1 text-[13px]",children:"Keep an eye on usage, file types and storage health."})]})}),p.jsxs("section",{className:"card mt-5 p-5","aria-label":"Usage",children:[p.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[p.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[p.jsx(ko,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"Usage"]}),p.jsxs("p",{className:"muted text-[13px] tabular-nums",children:[jt(d.totalBytes),m!==null?` of ${jt(m)}`:" used"]})]}),p.jsx("div",{className:"mt-3 h-2.5 overflow-hidden rounded-full bg-surface-2",children:p.jsx("div",{className:"progress-fill",style:{width:y===null?d.totalBytes>0?"100%":"0%":`${y}%`}})}),y!==null?p.jsxs("p",{className:"muted mt-2 text-[12px] tabular-nums",children:[Math.round(y),"% of quota used"]}):p.jsx("p",{className:"muted mt-2 text-[12px]",children:"No quota set on this account."})]}),p.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-3 sm:grid-cols-3",children:[p.jsx(hl,{icon:p.jsx(Ey,{className:"h-5 w-5","aria-hidden":"true"}),label:"Files",value:d.fileCount.toLocaleString()}),p.jsx(hl,{icon:p.jsx(ko,{className:"h-5 w-5","aria-hidden":"true"}),label:"Folders",value:d.folderCount.toLocaleString()}),p.jsx(hl,{icon:p.jsx(ps,{className:"h-5 w-5","aria-hidden":"true"}),label:"Starred",value:d.starredCount.toLocaleString()}),p.jsx(hl,{icon:p.jsx(br,{className:"h-5 w-5","aria-hidden":"true"}),label:"In trash",value:`${jt(d.trashBytes)} · ${d.trashFileCount}`})]}),p.jsxs("section",{className:"card mt-6 p-5","aria-label":"Breakdown by type",children:[p.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[p.jsx(lT,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"By file type"]}),h.length===0?p.jsx("p",{className:"muted mt-3 text-[13px]",children:"No files yet."}):p.jsx("ul",{className:"mt-4 grid gap-3",children:h.map(k=>p.jsxs("li",{children:[p.jsxs("div",{className:"flex items-center justify-between gap-3 text-[13px]",children:[p.jsx("span",{className:"font-medium capitalize",children:k.category}),p.jsxs("span",{className:"muted tabular-nums",children:[jt(k.bytes)," · ",Nn(k.count,"file")]})]}),p.jsx("div",{className:"mt-1.5 h-2 overflow-hidden rounded-full bg-surface-2",children:p.jsx("div",{className:"progress-fill",style:{width:`${k.percent}%`}})})]},k.category))})]}),p.jsxs("section",{className:"card mt-6 p-5","aria-label":"Largest files",children:[p.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[p.jsx(Ey,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"Largest files"]}),d.largestFiles.length===0?p.jsx("p",{className:"muted mt-3 text-[13px]",children:"No files yet."}):p.jsx("ul",{className:"mt-3 grid gap-1.5",children:d.largestFiles.map(k=>{const{Icon:E,color:T}=Kn(k.mimeType);return p.jsx("li",{children:p.jsxs("button",{type:"button",onClick:()=>s(Ci(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:[p.jsx(E,{className:`h-5 w-5 shrink-0 ${T}`,"aria-hidden":"true"}),p.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",title:k.name,children:k.name}),p.jsx("span",{className:"muted shrink-0 text-[12.5px] tabular-nums",children:jt(k.size)})]})},k.id)})})]}),p.jsxs("section",{className:"card mt-6 p-5","aria-label":"Integrity check",children:[p.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[p.jsxs("h2",{className:"flex items-center gap-2 text-sm font-semibold",children:[p.jsx(MT,{className:"h-4 w-4 text-gold","aria-hidden":"true"}),"Integrity check"]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("label",{className:"muted flex items-center gap-2 text-[12.5px]",children:[p.jsx("input",{type:"checkbox",checked:i,onChange:k=>o(k.target.checked),className:"h-3.5 w-3.5",style:{accentColor:"var(--gold)"}}),"Deep scan"]}),p.jsxs("button",{type:"button",className:"btn-gold px-3.5 py-2 text-[13px]",onClick:()=>u.mutate(),disabled:u.isPending,children:[u.isPending&&p.jsx(kt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),u.isPending?"Checking...":"Run check"]})]})]}),p.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?p.jsxs("p",{className:"muted mt-4 flex items-center gap-2 text-[13px]",children:[p.jsx(kt,{className:"h-4 w-4 animate-spin text-gold-text","aria-hidden":"true"}),"Scanning your storage..."]}):v!==void 0?p.jsx(a4,{report:v}):null]}),p.jsx(Ho,{item:t,onClose:()=>s(null),onAction:()=>{}})]})}function a4({report:e}){const t=e.issues.length===0;return p.jsxs("div",{className:"mt-4",children:[p.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-[13px]",children:[p.jsxs("span",{className:"flex items-center gap-1.5 font-medium",children:[t?p.jsx(pT,{className:"h-4 w-4 text-ok","aria-hidden":"true"}):p.jsx(Nl,{className:"h-4 w-4 text-bad","aria-hidden":"true"}),t?"All files healthy":`${Nn(e.issues.length,"issue")} found`]}),p.jsxs("span",{className:"muted tabular-nums",children:[Nn(e.filesChecked,"file")," checked"]}),p.jsxs("span",{className:"muted tabular-nums",children:[e.healthy," healthy"]}),p.jsxs("span",{className:"muted tabular-nums",children:[e.missing," missing"]}),p.jsxs("span",{className:"muted tabular-nums",children:[e.inconsistent," inconsistent"]}),p.jsxs("span",{className:"muted tabular-nums",children:[e.unreadable," unreadable"]}),p.jsxs("span",{className:"muted",children:["checked ",Of(e.checkedAt)]})]}),e.issues.length>0?p.jsx("ul",{className:"mt-3 grid gap-1.5",children:e.issues.map(s=>p.jsxs("li",{className:"flex items-start gap-3 rounded-xl border border-line bg-bg-soft px-3 py-2.5",children:[p.jsx(Nl,{className:"mt-0.5 h-4 w-4 shrink-0 text-bad","aria-hidden":"true"}),p.jsxs("span",{className:"min-w-0 flex-1",children:[p.jsx("span",{className:"block truncate text-[13px] font-medium",title:s.name,children:s.name}),p.jsxs("span",{className:"muted block text-[12px]",children:[s.kind.replace(/_/g," "),s.detail!==null?` · ${s.detail}`:""]})]}),p.jsx("span",{className:"muted shrink-0 text-[11px]",children:Ys(e.checkedAt)})]},`${s.fileId}:${s.kind}`))}):null]})}const l4=100;function u4(){const{uploads:e}=Xl(),t=fn(),s=gs(),[i,o]=Qh("omnicloud-view","list",$h),[l,u]=S.useState(null),[d,h]=S.useState(null),[m,y]=S.useState(!1),v=Yh(),x=Mo({queryKey:["trash"],queryFn:M=>we.trash.list({page:M,limit:l4}).then(_=>({items:[..._.folders.map(Uh),..._.files.map(Ci)],pagination:_.pagination}))}),C=x.items,k=S.useMemo(()=>C.map(ln),[C]);S.useEffect(()=>{v.prune(k)},[k,v]);const E=qh({onOpenItem:()=>{},onShowDetails:h,onReplaceFile:e.replace}),T=S.useMemo(()=>C.filter(M=>v.isSelected(ln(M))),[C,v]),P=Kt({mutationFn:we.trash.empty,onSuccess:M=>{ms(t),y(!1),s.success(`Emptied trash: ${Nn(M.deletedFiles,"file")}, ${Nn(M.deletedFolders,"folder")}`+(M.failedFiles>0?`, ${M.failedFiles} failed`:""))},onError:M=>s.error(ze(M,"Could not empty the trash"))});Gh({onDelete:()=>E.requestDelete(T),onSelectAll:()=>v.selectAll(k),onEscape:()=>h(null)});const L=S.useCallback(M=>{M(),v.clear()},[v]),b=p.jsx(Jl,{icon:br,title:"Trash is empty",description:"Items you move to the trash will show up here until you delete them permanently."});return p.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-6 md:px-8",children:[p.jsx(hi,{title:p.jsxs("div",{children:[p.jsx(pi,{children:"Trash"}),p.jsx("p",{className:"muted mt-1 text-[13px]",children:"Items here keep counting toward nothing until you empty the trash."})]}),actions:p.jsxs(p.Fragment,{children:[p.jsx(ep,{view:i,onChange:o}),p.jsxs("button",{type:"button",className:"btn-danger",onClick:()=>y(!0),disabled:C.length===0,children:[p.jsx(br,{className:"h-4 w-4","aria-hidden":"true"}),"Empty trash"]})]})}),p.jsx("div",{className:"mt-5",children:p.jsx(Jh,{items:C,view:i,selection:v,onOpen:M=>h(M),onAction:E.handleAction,onContextMenu:u,menuContext:{trashed:!0,onTrashPage:!0},loading:x.isLoading,error:x.isError?ze(x.error,"Could not load the trash."):null,onRetry:x.refetch,hasMore:x.hasMore,loadingMore:x.isLoadingMore,onLoadMore:x.loadMore,emptyState:b})}),p.jsxs(Zh,{count:v.count,onClear:v.clear,onSelectAll:()=>v.selectAll(k),children:[p.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>L(()=>E.runBatch("restore",T)),children:[p.jsx(oh,{className:"h-4 w-4","aria-hidden":"true"}),"Restore"]}),p.jsxs("button",{type:"button",className:"btn-danger",onClick:()=>E.requestDelete(T),children:[p.jsx(br,{className:"h-4 w-4","aria-hidden":"true"}),"Delete permanently"]})]}),p.jsx(Xh,{menu:l,onClose:()=>u(null)}),p.jsx(Ho,{item:d,onClose:()=>h(null),onAction:E.handleAction}),E.dialogs,m?p.jsx(pS,{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:P.isPending,onConfirm:()=>P.mutate(),onClose:()=>y(!1)}):null]})}function c4(){const e=fn(),[t,s]=S.useState(null),i=Kt({mutationFn:we.storage.ensure,onSuccess:o=>{e.setQueryData(Uo,l=>l===void 0?l:{...l,storage:o.storage})},onError:o=>s(ze(o,"Could not create your storage channel"))});return p.jsx("main",{id:"main",className:"flex min-h-dvh items-center justify-center p-4",children:p.jsxs("div",{className:"card w-full max-w-md p-8 text-center",children:[p.jsx("span",{className:"mx-auto grid h-14 w-14 place-items-center rounded-full border border-gold/50 bg-gold-soft",children:p.jsx(Ox,{className:"h-6 w-6 text-gold","aria-hidden":"true"})}),p.jsx("span",{className:"eyebrow mt-5",children:"Finish setup"}),p.jsx("h1",{className:"mt-4 text-2xl font-bold tracking-[-0.02em]",children:"Finish setting up your storage"}),p.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."}),p.jsxs("button",{type:"button",className:"btn-gold mt-6 justify-center",disabled:i.isPending,onClick:()=>{s(null),i.mutate()},children:[i.isPending&&p.jsx(kt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),i.isPending?"Creating your private storage channel…":"Create private storage channel"]}),t!==null&&!i.isPending?p.jsx("div",{role:"alert",className:"notice notice-error",children:t}):null]})})}function d4(){return p.jsx("div",{role:"status","aria-label":"Loading",className:"flex h-dvh items-center justify-center bg-bg",children:p.jsx(kt,{className:"h-7 w-7 animate-spin text-gold","aria-hidden":"true"})})}function f4({children:e}){const t=zh();return t.isPending?p.jsx(d4,{}):t.data===void 0||t.data.user===null?p.jsx(eh,{to:"/login",replace:!0}):t.data.storage===null?p.jsx(c4,{}):e}function h4(){const e=fn();return S.useEffect(()=>LT(()=>{e.setQueryData(Uo,lS),e.removeQueries({predicate:t=>t.queryKey[0]!=="me"})}),[e]),p.jsxs(yE,{children:[p.jsx(Vn,{path:"/login",element:p.jsx(e4,{})}),p.jsxs(Vn,{element:p.jsx(f4,{children:p.jsx(gM,{})}),children:[p.jsx(Vn,{path:"/",element:p.jsx(bM,{})}),p.jsx(Vn,{path:"/recent",element:p.jsx(r4,{})}),p.jsx(Vn,{path:"/starred",element:p.jsx(i4,{})}),p.jsx(Vn,{path:"/trash",element:p.jsx(u4,{})}),p.jsx(Vn,{path:"/storage",element:p.jsx(o4,{})})]}),p.jsx(Vn,{path:"*",element:p.jsx(eh,{to:"/",replace:!0})})]})}const p4=new Xk({defaultOptions:{queries:{staleTime:1e4,refetchOnWindowFocus:!1,retry:1}}}),wS=document.getElementById("root");if(wS===null)throw new Error("Root element is missing from index.html");pC.createRoot(wS).render(p.jsx(S.StrictMode,{children:p.jsx(Ck,{client:p4,children:p.jsx(Wj,{children:p.jsx(UE,{children:p.jsx(h4,{})})})})}));