From d3fac410e80b172ef1e00ed1e06cb840dc826c48 Mon Sep 17 00:00:00 2001 From: Arif Dogan Date: Sun, 9 Nov 2025 19:17:03 +0100 Subject: [PATCH 1/6] feat: add async engine support for storage_engine Add support for SQLAlchemy AsyncEngine in storage_engine parameter. Update create_tables() and drop_tables() to handle both sync and async engines. Use async_sessionmaker for async engines, sessionmaker for sync engines. Maintain backward compatibility with existing sync engine usage. Fixes #32 --- fastapi_radar/radar.py | 46 +++++++++++++++++++++++++++++++++++------- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/fastapi_radar/radar.py b/fastapi_radar/radar.py index e036184..0c11c67 100644 --- a/fastapi_radar/radar.py +++ b/fastapi_radar/radar.py @@ -5,11 +5,13 @@ import sys import multiprocessing from pathlib import Path -from typing import List, Optional +from typing import List, Optional, Union +import asyncio from fastapi import FastAPI from sqlalchemy import create_engine from sqlalchemy.engine import Engine +from sqlalchemy.ext.asyncio import AsyncEngine, async_sessionmaker from sqlalchemy.orm import Session, sessionmaker from sqlalchemy.pool import StaticPool @@ -47,7 +49,7 @@ def __init__( self, app: FastAPI, db_engine: Optional[Engine] = None, - storage_engine: Optional[Engine] = None, + storage_engine: Optional[Union[Engine, AsyncEngine]] = None, dashboard_path: str = "/__radar", max_requests: int = 1000, retention_hours: int = 24, @@ -146,9 +148,17 @@ def __init__( poolclass=StaticPool, ) - self.SessionLocal = sessionmaker( - autocommit=False, autoflush=False, bind=self.storage_engine - ) + # Check if storage_engine is async or sync and create appropriate sessionmaker + if isinstance(self.storage_engine, AsyncEngine): + self.SessionLocal = async_sessionmaker( + autocommit=False, autoflush=False, bind=self.storage_engine + ) + self._is_async_storage = True + else: + self.SessionLocal = sessionmaker( + autocommit=False, autoflush=False, bind=self.storage_engine + ) + self._is_async_storage = False self._setup_middleware() @@ -372,16 +382,38 @@ def create_tables(self) -> None: With dev mode (fastapi dev), this safely handles multiple process attempts to create tables. + + Supports both sync and async storage engines. """ try: - Base.metadata.create_all(bind=self.storage_engine) + if isinstance(self.storage_engine, AsyncEngine): + # For async engines, we need to run the DDL in a sync context + async def _create_tables(): + async with self.storage_engine.begin() as conn: + await conn.run_sync(Base.metadata.create_all) + + asyncio.run(_create_tables()) + else: + Base.metadata.create_all(bind=self.storage_engine) except Exception as e: error_msg = str(e).lower() if "already exists" not in error_msg and "lock" not in error_msg: raise def drop_tables(self) -> None: - Base.metadata.drop_all(bind=self.storage_engine) + """Drop all Radar tables. + + Supports both sync and async storage engines. + """ + if isinstance(self.storage_engine, AsyncEngine): + # For async engines, we need to run the DDL in a sync context + async def _drop_tables(): + async with self.storage_engine.begin() as conn: + await conn.run_sync(Base.metadata.drop_all) + + asyncio.run(_drop_tables()) + else: + Base.metadata.drop_all(bind=self.storage_engine) def cleanup(self, older_than_hours: Optional[int] = None) -> None: from datetime import datetime, timedelta, timezone From 8cae14250d21be2a672a30783871d53094a183a2 Mon Sep 17 00:00:00 2001 From: Arif Dogan Date: Sun, 9 Nov 2025 19:20:55 +0100 Subject: [PATCH 2/6] fix: resolve mypy error for async engine session handling Use sync_engine from AsyncEngine for session operations to keep the existing synchronous session usage pattern throughout the codebase (middleware, capture, api, etc.) This approach: - Uses AsyncEngine for DDL operations (create_tables, drop_tables) - Uses sync_engine for session operations (middleware, capture, etc.) - Maintains type safety and passes mypy checks --- fastapi_radar/radar.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/fastapi_radar/radar.py b/fastapi_radar/radar.py index 0c11c67..b2f7a9b 100644 --- a/fastapi_radar/radar.py +++ b/fastapi_radar/radar.py @@ -11,7 +11,7 @@ from fastapi import FastAPI from sqlalchemy import create_engine from sqlalchemy.engine import Engine -from sqlalchemy.ext.asyncio import AsyncEngine, async_sessionmaker +from sqlalchemy.ext.asyncio import AsyncEngine from sqlalchemy.orm import Session, sessionmaker from sqlalchemy.pool import StaticPool @@ -148,17 +148,22 @@ def __init__( poolclass=StaticPool, ) - # Check if storage_engine is async or sync and create appropriate sessionmaker + # Check if storage_engine is async or sync + # If async, we'll use it for DDL operations but keep sessions sync + # by accessing the sync engine from the async engine if isinstance(self.storage_engine, AsyncEngine): - self.SessionLocal = async_sessionmaker( - autocommit=False, autoflush=False, bind=self.storage_engine - ) + # For async engines, get the underlying sync engine for session operations + # The middleware and other components use sessions synchronously self._is_async_storage = True + sync_engine = self.storage_engine.sync_engine + self.SessionLocal = sessionmaker( + autocommit=False, autoflush=False, bind=sync_engine + ) else: + self._is_async_storage = False self.SessionLocal = sessionmaker( autocommit=False, autoflush=False, bind=self.storage_engine ) - self._is_async_storage = False self._setup_middleware() From 2b902a4f21fdc843d65e5a06fa4432d89f0c2218 Mon Sep 17 00:00:00 2001 From: Arif Dogan Date: Sun, 9 Nov 2025 19:32:33 +0100 Subject: [PATCH 3/6] fix: handle active event loop in create_tables/drop_tables Detect if an event loop is already running (e.g., FastAPI startup hooks) and run async DDL operations in a thread pool to avoid RuntimeError. This ensures create_tables() and drop_tables() work correctly: - When called directly (no event loop) - When called from async context (active event loop) - When called from FastAPI startup hooks Fixes the RuntimeError regression for legitimate async usage patterns. --- fastapi_radar/radar.py | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/fastapi_radar/radar.py b/fastapi_radar/radar.py index b2f7a9b..e7048c1 100644 --- a/fastapi_radar/radar.py +++ b/fastapi_radar/radar.py @@ -397,7 +397,18 @@ async def _create_tables(): async with self.storage_engine.begin() as conn: await conn.run_sync(Base.metadata.create_all) - asyncio.run(_create_tables()) + # Check if there's already an event loop running + try: + loop = asyncio.get_running_loop() + except RuntimeError: + # No event loop running, safe to use asyncio.run() + asyncio.run(_create_tables()) + else: + # Event loop is running, we need to run in a thread + import concurrent.futures + with concurrent.futures.ThreadPoolExecutor() as executor: + future = executor.submit(asyncio.run, _create_tables()) + future.result() else: Base.metadata.create_all(bind=self.storage_engine) except Exception as e: @@ -416,7 +427,18 @@ async def _drop_tables(): async with self.storage_engine.begin() as conn: await conn.run_sync(Base.metadata.drop_all) - asyncio.run(_drop_tables()) + # Check if there's already an event loop running + try: + loop = asyncio.get_running_loop() + except RuntimeError: + # No event loop running, safe to use asyncio.run() + asyncio.run(_drop_tables()) + else: + # Event loop is running, we need to run in a thread + import concurrent.futures + with concurrent.futures.ThreadPoolExecutor() as executor: + future = executor.submit(asyncio.run, _drop_tables()) + future.result() else: Base.metadata.drop_all(bind=self.storage_engine) From 604601e8ad1ab187a4934b2b76017662b93fd1b6 Mon Sep 17 00:00:00 2001 From: Arif Dogan Date: Sun, 9 Nov 2025 19:35:12 +0100 Subject: [PATCH 4/6] Format --- fastapi_radar/radar.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fastapi_radar/radar.py b/fastapi_radar/radar.py index e7048c1..31531ee 100644 --- a/fastapi_radar/radar.py +++ b/fastapi_radar/radar.py @@ -406,6 +406,7 @@ async def _create_tables(): else: # Event loop is running, we need to run in a thread import concurrent.futures + with concurrent.futures.ThreadPoolExecutor() as executor: future = executor.submit(asyncio.run, _create_tables()) future.result() @@ -436,6 +437,7 @@ async def _drop_tables(): else: # Event loop is running, we need to run in a thread import concurrent.futures + with concurrent.futures.ThreadPoolExecutor() as executor: future = executor.submit(asyncio.run, _drop_tables()) future.result() From 62a92de7dd1f12006003b2ac53be80b5ca481046 Mon Sep 17 00:00:00 2001 From: Arif Dogan Date: Tue, 11 Nov 2025 02:30:25 +0100 Subject: [PATCH 5/6] flake8 issues fix --- fastapi_radar/radar.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastapi_radar/radar.py b/fastapi_radar/radar.py index 31531ee..558addd 100644 --- a/fastapi_radar/radar.py +++ b/fastapi_radar/radar.py @@ -399,7 +399,7 @@ async def _create_tables(): # Check if there's already an event loop running try: - loop = asyncio.get_running_loop() + asyncio.get_running_loop() except RuntimeError: # No event loop running, safe to use asyncio.run() asyncio.run(_create_tables()) @@ -430,7 +430,7 @@ async def _drop_tables(): # Check if there's already an event loop running try: - loop = asyncio.get_running_loop() + asyncio.get_running_loop() except RuntimeError: # No event loop running, safe to use asyncio.run() asyncio.run(_drop_tables()) From 911dfb05ab986083fd11a365c1d140407c4f7d59 Mon Sep 17 00:00:00 2001 From: Arif Dogan Date: Tue, 11 Nov 2025 02:37:52 +0100 Subject: [PATCH 6/6] chore: bump version to 0.3.2 --- fastapi_radar/__init__.py | 2 +- .../dashboard/dist/assets/index-8Om0PGu6.js | 326 --- .../{index-p3czTzXB.js => index-BQIU9U77.js} | 149 +- fastapi_radar/dashboard/dist/index.html | 4 +- pyproject.toml | 2 +- setup.py | 2 +- uv.lock | 1970 ++++++++--------- 7 files changed, 1061 insertions(+), 1394 deletions(-) delete mode 100644 fastapi_radar/dashboard/dist/assets/index-8Om0PGu6.js rename fastapi_radar/dashboard/dist/assets/{index-p3czTzXB.js => index-BQIU9U77.js} (57%) diff --git a/fastapi_radar/__init__.py b/fastapi_radar/__init__.py index c2b4ef4..bf15b24 100644 --- a/fastapi_radar/__init__.py +++ b/fastapi_radar/__init__.py @@ -3,5 +3,5 @@ from .radar import Radar from .background import track_background_task -__version__ = "0.3.1" +__version__ = "0.3.2" __all__ = ["Radar", "track_background_task"] diff --git a/fastapi_radar/dashboard/dist/assets/index-8Om0PGu6.js b/fastapi_radar/dashboard/dist/assets/index-8Om0PGu6.js deleted file mode 100644 index 22751ce..0000000 --- a/fastapi_radar/dashboard/dist/assets/index-8Om0PGu6.js +++ /dev/null @@ -1,326 +0,0 @@ -var rI=Object.defineProperty;var gw=e=>{throw TypeError(e)};var nI=(e,t,r)=>t in e?rI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Nu=(e,t,r)=>nI(e,typeof t!="symbol"?t+"":t,r),nm=(e,t,r)=>t.has(e)||gw("Cannot "+r);var A=(e,t,r)=>(nm(e,t,"read from private field"),r?r.call(e):t.get(e)),re=(e,t,r)=>t.has(e)?gw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),K=(e,t,r,n)=>(nm(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),de=(e,t,r)=>(nm(e,t,"access private method"),r);var Tu=(e,t,r,n)=>({set _(a){K(e,t,a,r)},get _(){return A(e,t,n)}});function aI(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();function Fn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var RC={exports:{}},vp={},DC={exports:{}},se={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Vc=Symbol.for("react.element"),iI=Symbol.for("react.portal"),oI=Symbol.for("react.fragment"),sI=Symbol.for("react.strict_mode"),lI=Symbol.for("react.profiler"),cI=Symbol.for("react.provider"),uI=Symbol.for("react.context"),dI=Symbol.for("react.forward_ref"),fI=Symbol.for("react.suspense"),pI=Symbol.for("react.memo"),hI=Symbol.for("react.lazy"),yw=Symbol.iterator;function mI(e){return e===null||typeof e!="object"?null:(e=yw&&e[yw]||e["@@iterator"],typeof e=="function"?e:null)}var MC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},IC=Object.assign,LC={};function Vs(e,t,r){this.props=e,this.context=t,this.refs=LC,this.updater=r||MC}Vs.prototype.isReactComponent={};Vs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Vs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function $C(){}$C.prototype=Vs.prototype;function Dy(e,t,r){this.props=e,this.context=t,this.refs=LC,this.updater=r||MC}var My=Dy.prototype=new $C;My.constructor=Dy;IC(My,Vs.prototype);My.isPureReactComponent=!0;var xw=Array.isArray,FC=Object.prototype.hasOwnProperty,Iy={current:null},BC={key:!0,ref:!0,__self:!0,__source:!0};function zC(e,t,r){var n,a={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)FC.call(t,n)&&!BC.hasOwnProperty(n)&&(a[n]=t[n]);var s=arguments.length-2;if(s===1)a.children=r;else if(1>>1,H=_[te];if(0>>1;tea(Te,W))Xea(ee,Te)?(_[te]=ee,_[Xe]=W,te=Xe):(_[te]=Te,_[Be]=W,te=Be);else if(Xea(ee,W))_[te]=ee,_[Xe]=W,te=Xe;else break e}}return $}function a(_,$){var W=_.sortIndex-$.sortIndex;return W!==0?W:_.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],c=[],u=1,d=null,p=3,h=!1,g=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(_){for(var $=r(c);$!==null;){if($.callback===null)n(c);else if($.startTime<=_)n(c),$.sortIndex=$.expirationTime,t(l,$);else break;$=r(c)}}function S(_){if(v=!1,w(_),!g)if(r(l)!==null)g=!0,B(E);else{var $=r(c);$!==null&&U(S,$.startTime-_)}}function E(_,$){g=!1,v&&(v=!1,b(j),j=-1),h=!0;var W=p;try{for(w($),d=r(l);d!==null&&(!(d.expirationTime>$)||_&&!N());){var te=d.callback;if(typeof te=="function"){d.callback=null,p=d.priorityLevel;var H=te(d.expirationTime<=$);$=e.unstable_now(),typeof H=="function"?d.callback=H:d===r(l)&&n(l),w($)}else n(l);d=r(l)}if(d!==null)var it=!0;else{var Be=r(c);Be!==null&&U(S,Be.startTime-$),it=!1}return it}finally{d=null,p=W,h=!1}}var P=!1,C=null,j=-1,O=5,k=-1;function N(){return!(e.unstable_now()-k_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(_){switch(p){case 1:case 2:case 3:var $=3;break;default:$=p}var W=p;p=$;try{return _()}finally{p=W}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,$){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var W=p;p=_;try{return $()}finally{p=W}},e.unstable_scheduleCallback=function(_,$,W){var te=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0te?(_.sortIndex=W,t(c,_),r(l)===null&&_===r(c)&&(v?(b(j),j=-1):v=!0,U(S,W-te))):(_.sortIndex=H,t(l,_),g||h||(g=!0,B(E))),_},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(_){var $=p;return function(){var W=p;p=$;try{return _.apply(this,arguments)}finally{p=W}}}})(KC);HC.exports=KC;var jI=HC.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var kI=m,Pr=jI;function F(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vv=Object.prototype.hasOwnProperty,OI=/^[: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]*$/,ww={},Sw={};function AI(e){return vv.call(Sw,e)?!0:vv.call(ww,e)?!1:OI.test(e)?Sw[e]=!0:(ww[e]=!0,!1)}function NI(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function TI(e,t,r,n){if(t===null||typeof t>"u"||NI(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Qt(e,t,r,n,a,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Nt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Nt[e]=new Qt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Nt[t]=new Qt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Nt[e]=new Qt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Nt[e]=new Qt(e,2,!1,e,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(e){Nt[e]=new Qt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Nt[e]=new Qt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Nt[e]=new Qt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Nt[e]=new Qt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Nt[e]=new Qt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Fy=/[\-:]([a-z])/g;function By(e){return e[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(e){var t=e.replace(Fy,By);Nt[t]=new Qt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Fy,By);Nt[t]=new Qt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Fy,By);Nt[t]=new Qt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Nt[e]=new Qt(e,1,!1,e.toLowerCase(),null,!1,!1)});Nt.xlinkHref=new Qt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Nt[e]=new Qt(e,1,!1,e.toLowerCase(),null,!0,!0)});function zy(e,t,r,n){var a=Nt.hasOwnProperty(t)?Nt[t]:null;(a!==null?a.type!==0:n||!(2s||a[o]!==i[s]){var l=` -`+a[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{om=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?$l(e):""}function _I(e){switch(e.tag){case 5:return $l(e.type);case 16:return $l("Lazy");case 13:return $l("Suspense");case 19:return $l("SuspenseList");case 0:case 2:case 15:return e=sm(e.type,!1),e;case 11:return e=sm(e.type.render,!1),e;case 1:return e=sm(e.type,!0),e;default:return""}}function bv(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Uo:return"Fragment";case zo:return"Portal";case gv:return"Profiler";case Uy:return"StrictMode";case yv:return"Suspense";case xv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case GC:return(e.displayName||"Context")+".Consumer";case YC:return(e._context.displayName||"Context")+".Provider";case Wy:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qy:return t=e.displayName||null,t!==null?t:bv(e.type)||"Memo";case Fa:t=e._payload,e=e._init;try{return bv(e(t))}catch{}}return null}function RI(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return bv(t);case 8:return t===Uy?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function pi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function XC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function DI(e){var t=XC(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Du(e){e._valueTracker||(e._valueTracker=DI(e))}function ZC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=XC(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Wd(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function wv(e,t){var r=t.checked;return Ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Pw(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=pi(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function JC(e,t){t=t.checked,t!=null&&zy(e,"checked",t,!1)}function Sv(e,t){JC(e,t);var r=pi(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ev(e,t.type,r):t.hasOwnProperty("defaultValue")&&Ev(e,t.type,pi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Cw(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Ev(e,t,r){(t!=="number"||Wd(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Fl=Array.isArray;function ts(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=Mu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ic(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Kl={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},MI=["Webkit","ms","Moz","O"];Object.keys(Kl).forEach(function(e){MI.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Kl[t]=Kl[e]})});function nj(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Kl.hasOwnProperty(e)&&Kl[e]?(""+t).trim():t+"px"}function aj(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=nj(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var II=Ke({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 jv(e,t){if(t){if(II[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(F(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(F(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(F(61))}if(t.style!=null&&typeof t.style!="object")throw Error(F(62))}}function kv(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Ov=null;function Hy(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Av=null,rs=null,ns=null;function Ow(e){if(e=Qc(e)){if(typeof Av!="function")throw Error(F(280));var t=e.stateNode;t&&(t=wp(t),Av(e.stateNode,e.type,t))}}function ij(e){rs?ns?ns.push(e):ns=[e]:rs=e}function oj(){if(rs){var e=rs,t=ns;if(ns=rs=null,Ow(e),t)for(e=0;e>>=0,e===0?32:31-(VI(e)/YI|0)|0}var Iu=64,Lu=4194304;function Bl(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Vd(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~a;s!==0?n=Bl(s):(i&=o,i!==0&&(n=Bl(i)))}else o=r&~a,o!==0?n=Bl(o):i!==0&&(n=Bl(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Yc(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-sn(t),e[t]=r}function ZI(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Yl),Lw=" ",$w=!1;function jj(e,t){switch(e){case"keyup":return jL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kj(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wo=!1;function OL(e,t){switch(e){case"compositionend":return kj(t);case"keypress":return t.which!==32?null:($w=!0,Lw);case"textInput":return e=t.data,e===Lw&&$w?null:e;default:return null}}function AL(e,t){if(Wo)return e==="compositionend"||!Jy&&jj(e,t)?(e=Pj(),Pd=Qy=ei=null,Wo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Uw(r)}}function Tj(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tj(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _j(){for(var e=window,t=Wd();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Wd(e.document)}return t}function e0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function $L(e){var t=_j(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Tj(r.ownerDocument.documentElement,r)){if(n!==null&&e0(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,i=Math.min(n.start,a);n=n.end===void 0?i:Math.min(n.end,a),!e.extend&&i>n&&(a=n,n=i,i=a),a=Ww(r,i);var o=Ww(r,n);a&&o&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,qo=null,Mv=null,Ql=null,Iv=!1;function qw(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Iv||qo==null||qo!==Wd(n)||(n=qo,"selectionStart"in n&&e0(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Ql&&dc(Ql,n)||(Ql=n,n=Qd(Mv,"onSelect"),0Vo||(e.current=Uv[Vo],Uv[Vo]=null,Vo--)}function De(e,t){Vo++,Uv[Vo]=e.current,e.current=t}var hi={},$t=wi(hi),or=wi(!1),so=hi;function js(e,t){var r=e.type.contextTypes;if(!r)return hi;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in r)a[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function sr(e){return e=e.childContextTypes,e!=null}function Zd(){$e(or),$e($t)}function Xw(e,t,r){if($t.current!==hi)throw Error(F(168));De($t,t),De(or,r)}function zj(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(F(108,RI(e)||"Unknown",a));return Ke({},r,n)}function Jd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hi,so=$t.current,De($t,e),De(or,or.current),!0}function Zw(e,t,r){var n=e.stateNode;if(!n)throw Error(F(169));r?(e=zj(e,t,so),n.__reactInternalMemoizedMergedChildContext=e,$e(or),$e($t),De($t,e)):$e(or),De(or,r)}var Xn=null,Sp=!1,wm=!1;function Uj(e){Xn===null?Xn=[e]:Xn.push(e)}function QL(e){Sp=!0,Uj(e)}function Si(){if(!wm&&Xn!==null){wm=!0;var e=0,t=Ce;try{var r=Xn;for(Ce=1;e>=o,a-=o,ra=1<<32-sn(t)+a|r<j?(O=C,C=null):O=C.sibling;var k=p(b,C,w[j],S);if(k===null){C===null&&(C=O);break}e&&C&&k.alternate===null&&t(b,C),x=i(k,x,j),P===null?E=k:P.sibling=k,P=k,C=O}if(j===w.length)return r(b,C),ze&&_i(b,j),E;if(C===null){for(;jj?(O=C,C=null):O=C.sibling;var N=p(b,C,k.value,S);if(N===null){C===null&&(C=O);break}e&&C&&N.alternate===null&&t(b,C),x=i(N,x,j),P===null?E=N:P.sibling=N,P=N,C=O}if(k.done)return r(b,C),ze&&_i(b,j),E;if(C===null){for(;!k.done;j++,k=w.next())k=d(b,k.value,S),k!==null&&(x=i(k,x,j),P===null?E=k:P.sibling=k,P=k);return ze&&_i(b,j),E}for(C=n(b,C);!k.done;j++,k=w.next())k=h(C,b,j,k.value,S),k!==null&&(e&&k.alternate!==null&&C.delete(k.key===null?j:k.key),x=i(k,x,j),P===null?E=k:P.sibling=k,P=k);return e&&C.forEach(function(T){return t(b,T)}),ze&&_i(b,j),E}function y(b,x,w,S){if(typeof w=="object"&&w!==null&&w.type===Uo&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Ru:e:{for(var E=w.key,P=x;P!==null;){if(P.key===E){if(E=w.type,E===Uo){if(P.tag===7){r(b,P.sibling),x=a(P,w.props.children),x.return=b,b=x;break e}}else if(P.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Fa&&t1(E)===P.type){r(b,P.sibling),x=a(P,w.props),x.ref=bl(b,P,w),x.return=b,b=x;break e}r(b,P);break}else t(b,P);P=P.sibling}w.type===Uo?(x=ro(w.props.children,b.mode,S,w.key),x.return=b,b=x):(S=_d(w.type,w.key,w.props,null,b.mode,S),S.ref=bl(b,x,w),S.return=b,b=S)}return o(b);case zo:e:{for(P=w.key;x!==null;){if(x.key===P)if(x.tag===4&&x.stateNode.containerInfo===w.containerInfo&&x.stateNode.implementation===w.implementation){r(b,x.sibling),x=a(x,w.children||[]),x.return=b,b=x;break e}else{r(b,x);break}else t(b,x);x=x.sibling}x=Am(w,b.mode,S),x.return=b,b=x}return o(b);case Fa:return P=w._init,y(b,x,P(w._payload),S)}if(Fl(w))return g(b,x,w,S);if(ml(w))return v(b,x,w,S);qu(b,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,x!==null&&x.tag===6?(r(b,x.sibling),x=a(x,w),x.return=b,b=x):(r(b,x),x=Om(w,b.mode,S),x.return=b,b=x),o(b)):r(b,x)}return y}var Os=Kj(!0),Vj=Kj(!1),rf=wi(null),nf=null,Qo=null,a0=null;function i0(){a0=Qo=nf=null}function o0(e){var t=rf.current;$e(rf),e._currentValue=t}function Hv(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function is(e,t){nf=e,a0=Qo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(nr=!0),e.firstContext=null)}function Ur(e){var t=e._currentValue;if(a0!==e)if(e={context:e,memoizedValue:t,next:null},Qo===null){if(nf===null)throw Error(F(308));Qo=e,nf.dependencies={lanes:0,firstContext:e}}else Qo=Qo.next=e;return t}var Fi=null;function s0(e){Fi===null?Fi=[e]:Fi.push(e)}function Yj(e,t,r,n){var a=t.interleaved;return a===null?(r.next=r,s0(t)):(r.next=a.next,a.next=r),t.interleaved=r,ma(e,n)}function ma(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Ba=!1;function l0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gj(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function sa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function si(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,me&2){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,ma(e,r)}return a=n.interleaved,a===null?(t.next=t,s0(n)):(t.next=a.next,a.next=t),n.interleaved=t,ma(e,r)}function jd(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Vy(e,r)}}function r1(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var a=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?a=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?a=i=t:i=i.next=t}else a=i=t;r={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function af(e,t,r,n){var a=e.updateQueue;Ba=!1;var i=a.firstBaseUpdate,o=a.lastBaseUpdate,s=a.shared.pending;if(s!==null){a.shared.pending=null;var l=s,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=a.baseState;o=0,u=c=l=null,s=i;do{var p=s.lane,h=s.eventTime;if((n&p)===p){u!==null&&(u=u.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,v=s;switch(p=t,h=r,v.tag){case 1:if(g=v.payload,typeof g=="function"){d=g.call(h,d,p);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,p=typeof g=="function"?g.call(h,d,p):g,p==null)break e;d=Ke({},d,p);break e;case 2:Ba=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,p=a.effects,p===null?a.effects=[s]:p.push(s))}else h={eventTime:h,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(c=u=h,l=d):u=u.next=h,o|=p;if(s=s.next,s===null){if(s=a.shared.pending,s===null)break;p=s,s=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);if(u===null&&(l=d),a.baseState=l,a.firstBaseUpdate=c,a.lastBaseUpdate=u,t=a.shared.interleaved,t!==null){a=t;do o|=a.lane,a=a.next;while(a!==t)}else i===null&&(a.shared.lanes=0);uo|=o,e.lanes=o,e.memoizedState=d}}function n1(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Em.transition;Em.transition={};try{e(!1),t()}finally{Ce=r,Em.transition=n}}function fk(){return Wr().memoizedState}function e$(e,t,r){var n=ci(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},pk(e))hk(t,r);else if(r=Yj(e,t,r,n),r!==null){var a=Yt();ln(r,e,n,a),mk(r,t,n)}}function t$(e,t,r){var n=ci(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(pk(e))hk(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,s=i(o,r);if(a.hasEagerState=!0,a.eagerState=s,cn(s,o)){var l=t.interleaved;l===null?(a.next=a,s0(t)):(a.next=l.next,l.next=a),t.interleaved=a;return}}catch{}finally{}r=Yj(e,t,a,n),r!==null&&(a=Yt(),ln(r,e,n,a),mk(r,t,n))}}function pk(e){var t=e.alternate;return e===He||t!==null&&t===He}function hk(e,t){Xl=sf=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function mk(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Vy(e,r)}}var lf={readContext:Ur,useCallback:Rt,useContext:Rt,useEffect:Rt,useImperativeHandle:Rt,useInsertionEffect:Rt,useLayoutEffect:Rt,useMemo:Rt,useReducer:Rt,useRef:Rt,useState:Rt,useDebugValue:Rt,useDeferredValue:Rt,useTransition:Rt,useMutableSource:Rt,useSyncExternalStore:Rt,useId:Rt,unstable_isNewReconciler:!1},r$={readContext:Ur,useCallback:function(e,t){return wn().memoizedState=[e,t===void 0?null:t],e},useContext:Ur,useEffect:i1,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Od(4194308,4,sk.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Od(4194308,4,e,t)},useInsertionEffect:function(e,t){return Od(4,2,e,t)},useMemo:function(e,t){var r=wn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=wn();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=e$.bind(null,He,e),[n.memoizedState,e]},useRef:function(e){var t=wn();return e={current:e},t.memoizedState=e},useState:a1,useDebugValue:v0,useDeferredValue:function(e){return wn().memoizedState=e},useTransition:function(){var e=a1(!1),t=e[0];return e=JL.bind(null,e[1]),wn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=He,a=wn();if(ze){if(r===void 0)throw Error(F(407));r=r()}else{if(r=t(),xt===null)throw Error(F(349));co&30||Jj(n,t,r)}a.memoizedState=r;var i={value:r,getSnapshot:t};return a.queue=i,i1(tk.bind(null,n,i,e),[e]),n.flags|=2048,xc(9,ek.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=wn(),t=xt.identifierPrefix;if(ze){var r=na,n=ra;r=(n&~(1<<32-sn(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=gc++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Cn]=t,e[hc]=n,Ck(e,t,!1,!1),t.stateNode=e;e:{switch(o=kv(r,n),r){case"dialog":Ie("cancel",e),Ie("close",e),a=n;break;case"iframe":case"object":case"embed":Ie("load",e),a=n;break;case"video":case"audio":for(a=0;aTs&&(t.flags|=128,n=!0,wl(i,!1),t.lanes=4194304)}else{if(!n)if(e=of(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),wl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ze)return Dt(t),null}else 2*Je()-i.renderingStartTime>Ts&&r!==1073741824&&(t.flags|=128,n=!0,wl(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Je(),t.sibling=null,r=qe.current,De(qe,n?r&1|2:r&1),t):(Dt(t),null);case 22:case 23:return S0(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?mr&1073741824&&(Dt(t),t.subtreeFlags&6&&(t.flags|=8192)):Dt(t),null;case 24:return null;case 25:return null}throw Error(F(156,t.tag))}function u$(e,t){switch(r0(t),t.tag){case 1:return sr(t.type)&&Zd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return As(),$e(or),$e($t),d0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return u0(t),null;case 13:if($e(qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));ks()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $e(qe),null;case 4:return As(),null;case 10:return o0(t.type._context),null;case 22:case 23:return S0(),null;case 24:return null;default:return null}}var Ku=!1,It=!1,d$=typeof WeakSet=="function"?WeakSet:Set,Y=null;function Xo(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ge(e,t,n)}else r.current=null}function eg(e,t,r){try{r()}catch(n){Ge(e,t,n)}}var v1=!1;function f$(e,t){if(Lv=Yd,e=_j(),e0(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,c=0,u=0,d=e,p=null;t:for(;;){for(var h;d!==r||a!==0&&d.nodeType!==3||(s=o+a),d!==i||n!==0&&d.nodeType!==3||(l=o+n),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)p=d,d=h;for(;;){if(d===e)break t;if(p===r&&++c===a&&(s=o),p===i&&++u===n&&(l=o),(h=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=h}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for($v={focusedElem:e,selectionRange:r},Yd=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var v=g.memoizedProps,y=g.memoizedState,b=t.stateNode,x=b.getSnapshotBeforeUpdate(t.elementType===t.type?v:Xr(t.type,v),y);b.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(F(163))}}catch(S){Ge(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return g=v1,v1=!1,g}function Zl(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&eg(t,r,i)}a=a.next}while(a!==n)}}function Cp(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function tg(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Ok(e){var t=e.alternate;t!==null&&(e.alternate=null,Ok(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Cn],delete t[hc],delete t[zv],delete t[YL],delete t[GL])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ak(e){return e.tag===5||e.tag===3||e.tag===4}function g1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ak(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rg(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Xd));else if(n!==4&&(e=e.child,e!==null))for(rg(e,t,r),e=e.sibling;e!==null;)rg(e,t,r),e=e.sibling}function ng(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(ng(e,t,r),e=e.sibling;e!==null;)ng(e,t,r),e=e.sibling}var Ct=null,en=!1;function Ra(e,t,r){for(r=r.child;r!==null;)Nk(e,t,r),r=r.sibling}function Nk(e,t,r){if(An&&typeof An.onCommitFiberUnmount=="function")try{An.onCommitFiberUnmount(gp,r)}catch{}switch(r.tag){case 5:It||Xo(r,t);case 6:var n=Ct,a=en;Ct=null,Ra(e,t,r),Ct=n,en=a,Ct!==null&&(en?(e=Ct,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ct.removeChild(r.stateNode));break;case 18:Ct!==null&&(en?(e=Ct,r=r.stateNode,e.nodeType===8?bm(e.parentNode,r):e.nodeType===1&&bm(e,r),cc(e)):bm(Ct,r.stateNode));break;case 4:n=Ct,a=en,Ct=r.stateNode.containerInfo,en=!0,Ra(e,t,r),Ct=n,en=a;break;case 0:case 11:case 14:case 15:if(!It&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var i=a,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&eg(r,t,o),a=a.next}while(a!==n)}Ra(e,t,r);break;case 1:if(!It&&(Xo(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Ge(r,t,s)}Ra(e,t,r);break;case 21:Ra(e,t,r);break;case 22:r.mode&1?(It=(n=It)||r.memoizedState!==null,Ra(e,t,r),It=n):Ra(e,t,r);break;default:Ra(e,t,r)}}function y1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new d$),t.forEach(function(n){var a=w$.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function Gr(e,t){var r=t.deletions;if(r!==null)for(var n=0;na&&(a=o),n&=~i}if(n=a,n=Je()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*h$(n/1960))-n,10e?16:e,ti===null)var n=!1;else{if(e=ti,ti=null,df=0,me&6)throw Error(F(331));var a=me;for(me|=4,Y=e.current;Y!==null;){var i=Y,o=i.child;if(Y.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lJe()-b0?to(e,0):x0|=r),lr(e,t)}function $k(e,t){t===0&&(e.mode&1?(t=Lu,Lu<<=1,!(Lu&130023424)&&(Lu=4194304)):t=1);var r=Yt();e=ma(e,t),e!==null&&(Yc(e,t,r),lr(e,r))}function b$(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),$k(e,r)}function w$(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(F(314))}n!==null&&n.delete(t),$k(e,r)}var Fk;Fk=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||or.current)nr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return nr=!1,l$(e,t,r);nr=!!(e.flags&131072)}else nr=!1,ze&&t.flags&1048576&&Wj(t,tf,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Ad(e,t),e=t.pendingProps;var a=js(t,$t.current);is(t,r),a=p0(null,t,n,e,a,r);var i=h0();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,sr(n)?(i=!0,Jd(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,l0(t),a.updater=Pp,t.stateNode=a,a._reactInternals=t,Vv(t,n,e,r),t=Qv(null,t,n,!0,i,r)):(t.tag=0,ze&&i&&t0(t),qt(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Ad(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=E$(n),e=Xr(n,e),a){case 0:t=Gv(null,t,n,e,r);break e;case 1:t=p1(null,t,n,e,r);break e;case 11:t=d1(null,t,n,e,r);break e;case 14:t=f1(null,t,n,Xr(n.type,e),r);break e}throw Error(F(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Xr(n,a),Gv(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Xr(n,a),p1(e,t,n,a,r);case 3:e:{if(Sk(t),e===null)throw Error(F(387));n=t.pendingProps,i=t.memoizedState,a=i.element,Gj(e,t),af(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=Ns(Error(F(423)),t),t=h1(e,t,n,r,a);break e}else if(n!==a){a=Ns(Error(F(424)),t),t=h1(e,t,n,r,a);break e}else for(br=oi(t.stateNode.containerInfo.firstChild),wr=t,ze=!0,rn=null,r=Vj(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ks(),n===a){t=va(e,t,r);break e}qt(e,t,n,r)}t=t.child}return t;case 5:return Qj(t),e===null&&qv(t),n=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,o=a.children,Fv(n,a)?o=null:i!==null&&Fv(n,i)&&(t.flags|=32),wk(e,t),qt(e,t,o,r),t.child;case 6:return e===null&&qv(t),null;case 13:return Ek(e,t,r);case 4:return c0(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Os(t,null,n,r):qt(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Xr(n,a),d1(e,t,n,a,r);case 7:return qt(e,t,t.pendingProps,r),t.child;case 8:return qt(e,t,t.pendingProps.children,r),t.child;case 12:return qt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,i=t.memoizedProps,o=a.value,De(rf,n._currentValue),n._currentValue=o,i!==null)if(cn(i.value,o)){if(i.children===a.children&&!or.current){t=va(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){o=i.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=sa(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Hv(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(F(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Hv(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}qt(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,is(t,r),a=Ur(a),n=n(a),t.flags|=1,qt(e,t,n,r),t.child;case 14:return n=t.type,a=Xr(n,t.pendingProps),a=Xr(n.type,a),f1(e,t,n,a,r);case 15:return xk(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:Xr(n,a),Ad(e,t),t.tag=1,sr(n)?(e=!0,Jd(t)):e=!1,is(t,r),vk(t,n,a),Vv(t,n,a,r),Qv(null,t,n,!0,e,r);case 19:return Pk(e,t,r);case 22:return bk(e,t,r)}throw Error(F(156,t.tag))};function Bk(e,t){return pj(e,t)}function S$(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fr(e,t,r,n){return new S$(e,t,r,n)}function P0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function E$(e){if(typeof e=="function")return P0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Wy)return 11;if(e===qy)return 14}return 2}function ui(e,t){var r=e.alternate;return r===null?(r=Fr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function _d(e,t,r,n,a,i){var o=2;if(n=e,typeof e=="function")P0(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Uo:return ro(r.children,a,i,t);case Uy:o=8,a|=8;break;case gv:return e=Fr(12,r,t,a|2),e.elementType=gv,e.lanes=i,e;case yv:return e=Fr(13,r,t,a),e.elementType=yv,e.lanes=i,e;case xv:return e=Fr(19,r,t,a),e.elementType=xv,e.lanes=i,e;case QC:return kp(r,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case YC:o=10;break e;case GC:o=9;break e;case Wy:o=11;break e;case qy:o=14;break e;case Fa:o=16,n=null;break e}throw Error(F(130,e==null?e:typeof e,""))}return t=Fr(o,r,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function ro(e,t,r,n){return e=Fr(7,e,n,t),e.lanes=r,e}function kp(e,t,r,n){return e=Fr(22,e,n,t),e.elementType=QC,e.lanes=r,e.stateNode={isHidden:!1},e}function Om(e,t,r){return e=Fr(6,e,null,t),e.lanes=r,e}function Am(e,t,r){return t=Fr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function P$(e,t,r,n,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=cm(0),this.expirationTimes=cm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cm(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function C0(e,t,r,n,a,i,o,s,l){return e=new P$(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Fr(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},l0(i),e}function C$(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(qk)}catch(e){console.error(e)}}qk(),qC.exports=jr;var Ei=qC.exports;const N$=Fn(Ei);var j1=Ei;mv.createRoot=j1.createRoot,mv.hydrateRoot=j1.hydrateRoot;var Zc=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(){}},T$={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ka,Ry,EC,_$=(EC=class{constructor(){re(this,Ka,T$);re(this,Ry,!1)}setTimeoutProvider(e){K(this,Ka,e)}setTimeout(e,t){return A(this,Ka).setTimeout(e,t)}clearTimeout(e){A(this,Ka).clearTimeout(e)}setInterval(e,t){return A(this,Ka).setInterval(e,t)}clearInterval(e){A(this,Ka).clearInterval(e)}},Ka=new WeakMap,Ry=new WeakMap,EC),zi=new _$;function R$(e){setTimeout(e,0)}var po=typeof window>"u"||"Deno"in globalThis;function Jt(){}function D$(e,t){return typeof e=="function"?e(t):e}function lg(e){return typeof e=="number"&&e>=0&&e!==1/0}function Hk(e,t){return Math.max(e+(t||0)-Date.now(),0)}function di(e,t){return typeof e=="function"?e(t):e}function Dr(e,t){return typeof e=="function"?e(t):e}function k1(e,t){const{type:r="all",exact:n,fetchStatus:a,predicate:i,queryKey:o,stale:s}=e;if(o){if(n){if(t.queryHash!==A0(o,t.options))return!1}else if(!Sc(t.queryKey,o))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||a&&a!==t.state.fetchStatus||i&&!i(t))}function O1(e,t){const{exact:r,status:n,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(wc(t.options.mutationKey)!==wc(i))return!1}else if(!Sc(t.options.mutationKey,i))return!1}return!(n&&t.state.status!==n||a&&!a(t))}function A0(e,t){return((t==null?void 0:t.queryKeyHashFn)||wc)(e)}function wc(e){return JSON.stringify(e,(t,r)=>ug(r)?Object.keys(r).sort().reduce((n,a)=>(n[a]=r[a],n),{}):r)}function Sc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Sc(e[r],t[r])):!1}var M$=Object.prototype.hasOwnProperty;function Kk(e,t){if(e===t)return e;const r=A1(e)&&A1(t);if(!r&&!(ug(e)&&ug(t)))return t;const a=(r?e:Object.keys(e)).length,i=r?t:Object.keys(t),o=i.length,s=r?new Array(o):{};let l=0;for(let c=0;c{zi.setTimeout(t,e)})}function dg(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Kk(e,t):t}function L$(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function $$(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var N0=Symbol();function Vk(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===N0?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function F$(e,t){return typeof e=="function"?e(...t):!!e}var Ki,Va,ps,PC,B$=(PC=class extends Zc{constructor(){super();re(this,Ki);re(this,Va);re(this,ps);K(this,ps,t=>{if(!po&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){A(this,Va)||this.setEventListener(A(this,ps))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,Va))==null||t.call(this),K(this,Va,void 0))}setEventListener(t){var r;K(this,ps,t),(r=A(this,Va))==null||r.call(this),K(this,Va,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){A(this,Ki)!==t&&(K(this,Ki,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof A(this,Ki)=="boolean"?A(this,Ki):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ki=new WeakMap,Va=new WeakMap,ps=new WeakMap,PC),T0=new B$;function fg(){let e,t;const r=new Promise((a,i)=>{e=a,t=i});r.status="pending",r.catch(()=>{});function n(a){Object.assign(r,a),delete r.resolve,delete r.reject}return r.resolve=a=>{n({status:"fulfilled",value:a}),e(a)},r.reject=a=>{n({status:"rejected",reason:a}),t(a)},r}var z$=R$;function U$(){let e=[],t=0,r=s=>{s()},n=s=>{s()},a=z$;const i=s=>{t?e.push(s):a(()=>{r(s)})},o=()=>{const s=e;e=[],s.length&&a(()=>{n(()=>{s.forEach(l=>{r(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{r=s},setBatchNotifyFunction:s=>{n=s},setScheduler:s=>{a=s}}}var kt=U$(),hs,Ya,ms,CC,W$=(CC=class extends Zc{constructor(){super();re(this,hs,!0);re(this,Ya);re(this,ms);K(this,ms,t=>{if(!po&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){A(this,Ya)||this.setEventListener(A(this,ms))}onUnsubscribe(){var t;this.hasListeners()||((t=A(this,Ya))==null||t.call(this),K(this,Ya,void 0))}setEventListener(t){var r;K(this,ms,t),(r=A(this,Ya))==null||r.call(this),K(this,Ya,t(this.setOnline.bind(this)))}setOnline(t){A(this,hs)!==t&&(K(this,hs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return A(this,hs)}},hs=new WeakMap,Ya=new WeakMap,ms=new WeakMap,CC),hf=new W$;function q$(e){return Math.min(1e3*2**e,3e4)}function Yk(e){return(e??"online")==="online"?hf.isOnline():!0}var pg=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Gk(e){let t=!1,r=0,n;const a=fg(),i=()=>a.status!=="pending",o=v=>{var y;if(!i()){const b=new pg(v);p(b),(y=e.onCancel)==null||y.call(e,b)}},s=()=>{t=!0},l=()=>{t=!1},c=()=>T0.isFocused()&&(e.networkMode==="always"||hf.isOnline())&&e.canRun(),u=()=>Yk(e.networkMode)&&e.canRun(),d=v=>{i()||(n==null||n(),a.resolve(v))},p=v=>{i()||(n==null||n(),a.reject(v))},h=()=>new Promise(v=>{var y;n=b=>{(i()||c())&&v(b)},(y=e.onPause)==null||y.call(e)}).then(()=>{var v;n=void 0,i()||(v=e.onContinue)==null||v.call(e)}),g=()=>{if(i())return;let v;const y=r===0?e.initialPromise:void 0;try{v=y??e.fn()}catch(b){v=Promise.reject(b)}Promise.resolve(v).then(d).catch(b=>{var P;if(i())return;const x=e.retry??(po?0:3),w=e.retryDelay??q$,S=typeof w=="function"?w(r,b):w,E=x===!0||typeof x=="number"&&rc()?void 0:h()).then(()=>{t?p(b):g()})})};return{promise:a,status:()=>a.status,cancel:o,continue:()=>(n==null||n(),a),cancelRetry:s,continueRetry:l,canStart:u,start:()=>(u()?g():h().then(g),a)}}var Vi,jC,Qk=(jC=class{constructor(){re(this,Vi)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lg(this.gcTime)&&K(this,Vi,zi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(po?1/0:5*60*1e3))}clearGcTimeout(){A(this,Vi)&&(zi.clearTimeout(A(this,Vi)),K(this,Vi,void 0))}},Vi=new WeakMap,jC),Yi,vs,Rr,Gi,ht,Uc,Qi,Zr,Vn,kC,H$=(kC=class extends Qk{constructor(t){super();re(this,Zr);re(this,Yi);re(this,vs);re(this,Rr);re(this,Gi);re(this,ht);re(this,Uc);re(this,Qi);K(this,Qi,!1),K(this,Uc,t.defaultOptions),this.setOptions(t.options),this.observers=[],K(this,Gi,t.client),K(this,Rr,A(this,Gi).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,K(this,Yi,T1(this.options)),this.state=t.state??A(this,Yi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=A(this,ht))==null?void 0:t.promise}setOptions(t){if(this.options={...A(this,Uc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=T1(this.options);r.data!==void 0&&(this.setData(r.data,{updatedAt:r.dataUpdatedAt,manual:!0}),K(this,Yi,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,Rr).remove(this)}setData(t,r){const n=dg(this.state.data,t,this.options);return de(this,Zr,Vn).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){de(this,Zr,Vn).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,a;const r=(n=A(this,ht))==null?void 0:n.promise;return(a=A(this,ht))==null||a.cancel(t),r?r.then(Jt).catch(Jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(A(this,Yi))}isActive(){return this.observers.some(t=>Dr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===N0||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>di(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:!Hk(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=A(this,ht))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=A(this,ht))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),A(this,Rr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(A(this,ht)&&(A(this,Qi)?A(this,ht).cancel({revert:!0}):A(this,ht).cancelRetry()),this.scheduleGc()),A(this,Rr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||de(this,Zr,Vn).call(this,{type:"invalidate"})}async fetch(t,r){var l,c,u,d,p,h,g,v,y,b,x,w;if(this.state.fetchStatus!=="idle"&&((l=A(this,ht))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(A(this,ht))return A(this,ht).continueRetry(),A(this,ht).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(E=>E.options.queryFn);S&&this.setOptions(S.options)}const n=new AbortController,a=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(K(this,Qi,!0),n.signal)})},i=()=>{const S=Vk(this.options,r),P=(()=>{const C={client:A(this,Gi),queryKey:this.queryKey,meta:this.meta};return a(C),C})();return K(this,Qi,!1),this.options.persister?this.options.persister(S,P,this):S(P)},s=(()=>{const S={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:A(this,Gi),state:this.state,fetchFn:i};return a(S),S})();(c=this.options.behavior)==null||c.onFetch(s,this),K(this,vs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=s.fetchOptions)==null?void 0:u.meta))&&de(this,Zr,Vn).call(this,{type:"fetch",meta:(d=s.fetchOptions)==null?void 0:d.meta}),K(this,ht,Gk({initialPromise:r==null?void 0:r.initialPromise,fn:s.fetchFn,onCancel:S=>{S instanceof pg&&S.revert&&this.setState({...A(this,vs),fetchStatus:"idle"}),n.abort()},onFail:(S,E)=>{de(this,Zr,Vn).call(this,{type:"failed",failureCount:S,error:E})},onPause:()=>{de(this,Zr,Vn).call(this,{type:"pause"})},onContinue:()=>{de(this,Zr,Vn).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const S=await A(this,ht).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(h=(p=A(this,Rr).config).onSuccess)==null||h.call(p,S,this),(v=(g=A(this,Rr).config).onSettled)==null||v.call(g,S,this.state.error,this),S}catch(S){if(S instanceof pg){if(S.silent)return A(this,ht).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw de(this,Zr,Vn).call(this,{type:"error",error:S}),(b=(y=A(this,Rr).config).onError)==null||b.call(y,S,this),(w=(x=A(this,Rr).config).onSettled)==null||w.call(x,this.state.data,S,this),S}finally{this.scheduleGc()}}},Yi=new WeakMap,vs=new WeakMap,Rr=new WeakMap,Gi=new WeakMap,ht=new WeakMap,Uc=new WeakMap,Qi=new WeakMap,Zr=new WeakSet,Vn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Xk(n.data,this.options),fetchMeta:t.meta??null};case"success":const a={...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return K(this,vs,t.manual?a:void 0),a;case"error":const i=t.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),kt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),A(this,Rr).notify({query:this,type:"updated",action:t})})},kC);function Xk(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Yk(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function T1(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Xt,fe,Wc,Ut,Xi,gs,Zn,Ga,qc,ys,xs,Zi,Ji,Qa,bs,be,Ul,hg,mg,vg,gg,yg,xg,bg,Zk,OC,K$=(OC=class extends Zc{constructor(t,r){super();re(this,be);re(this,Xt);re(this,fe);re(this,Wc);re(this,Ut);re(this,Xi);re(this,gs);re(this,Zn);re(this,Ga);re(this,qc);re(this,ys);re(this,xs);re(this,Zi);re(this,Ji);re(this,Qa);re(this,bs,new Set);this.options=r,K(this,Xt,t),K(this,Ga,null),K(this,Zn,fg()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(A(this,fe).addObserver(this),_1(A(this,fe),this.options)?de(this,be,Ul).call(this):this.updateResult(),de(this,be,gg).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return wg(A(this,fe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return wg(A(this,fe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,de(this,be,yg).call(this),de(this,be,xg).call(this),A(this,fe).removeObserver(this)}setOptions(t){const r=this.options,n=A(this,fe);if(this.options=A(this,Xt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Dr(this.options.enabled,A(this,fe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");de(this,be,bg).call(this),A(this,fe).setOptions(this.options),r._defaulted&&!cg(this.options,r)&&A(this,Xt).getQueryCache().notify({type:"observerOptionsUpdated",query:A(this,fe),observer:this});const a=this.hasListeners();a&&R1(A(this,fe),n,this.options,r)&&de(this,be,Ul).call(this),this.updateResult(),a&&(A(this,fe)!==n||Dr(this.options.enabled,A(this,fe))!==Dr(r.enabled,A(this,fe))||di(this.options.staleTime,A(this,fe))!==di(r.staleTime,A(this,fe)))&&de(this,be,hg).call(this);const i=de(this,be,mg).call(this);a&&(A(this,fe)!==n||Dr(this.options.enabled,A(this,fe))!==Dr(r.enabled,A(this,fe))||i!==A(this,Qa))&&de(this,be,vg).call(this,i)}getOptimisticResult(t){const r=A(this,Xt).getQueryCache().build(A(this,Xt),t),n=this.createResult(r,t);return Y$(this,n)&&(K(this,Ut,n),K(this,gs,this.options),K(this,Xi,A(this,fe).state)),n}getCurrentResult(){return A(this,Ut)}trackResult(t,r){return new Proxy(t,{get:(n,a)=>(this.trackProp(a),r==null||r(a),a==="promise"&&!this.options.experimental_prefetchInRender&&A(this,Zn).status==="pending"&&A(this,Zn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(n,a))})}trackProp(t){A(this,bs).add(t)}getCurrentQuery(){return A(this,fe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=A(this,Xt).defaultQueryOptions(t),n=A(this,Xt).getQueryCache().build(A(this,Xt),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return de(this,be,Ul).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),A(this,Ut)))}createResult(t,r){var O;const n=A(this,fe),a=this.options,i=A(this,Ut),o=A(this,Xi),s=A(this,gs),c=t!==n?t.state:A(this,Wc),{state:u}=t;let d={...u},p=!1,h;if(r._optimisticResults){const k=this.hasListeners(),N=!k&&_1(t,r),T=k&&R1(t,n,r,a);(N||T)&&(d={...d,...Xk(u.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:v,status:y}=d;h=d.data;let b=!1;if(r.placeholderData!==void 0&&h===void 0&&y==="pending"){let k;i!=null&&i.isPlaceholderData&&r.placeholderData===(s==null?void 0:s.placeholderData)?(k=i.data,b=!0):k=typeof r.placeholderData=="function"?r.placeholderData((O=A(this,xs))==null?void 0:O.state.data,A(this,xs)):r.placeholderData,k!==void 0&&(y="success",h=dg(i==null?void 0:i.data,k,r),p=!0)}if(r.select&&h!==void 0&&!b)if(i&&h===(o==null?void 0:o.data)&&r.select===A(this,qc))h=A(this,ys);else try{K(this,qc,r.select),h=r.select(h),h=dg(i==null?void 0:i.data,h,r),K(this,ys,h),K(this,Ga,null)}catch(k){K(this,Ga,k)}A(this,Ga)&&(g=A(this,Ga),h=A(this,ys),v=Date.now(),y="error");const x=d.fetchStatus==="fetching",w=y==="pending",S=y==="error",E=w&&x,P=h!==void 0,j={status:y,fetchStatus:d.fetchStatus,isPending:w,isSuccess:y==="success",isError:S,isInitialLoading:E,isLoading:E,data:h,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:v,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:x,isRefetching:x&&!w,isLoadingError:S&&!P,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:S&&P,isStale:_0(t,r),refetch:this.refetch,promise:A(this,Zn),isEnabled:Dr(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const k=L=>{j.status==="error"?L.reject(j.error):j.data!==void 0&&L.resolve(j.data)},N=()=>{const L=K(this,Zn,j.promise=fg());k(L)},T=A(this,Zn);switch(T.status){case"pending":t.queryHash===n.queryHash&&k(T);break;case"fulfilled":(j.status==="error"||j.data!==T.value)&&N();break;case"rejected":(j.status!=="error"||j.error!==T.reason)&&N();break}}return j}updateResult(){const t=A(this,Ut),r=this.createResult(A(this,fe),this.options);if(K(this,Xi,A(this,fe).state),K(this,gs,this.options),A(this,Xi).data!==void 0&&K(this,xs,A(this,fe)),cg(r,t))return;K(this,Ut,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!A(this,bs).size)return!0;const o=new Set(i??A(this,bs));return this.options.throwOnError&&o.add("error"),Object.keys(A(this,Ut)).some(s=>{const l=s;return A(this,Ut)[l]!==t[l]&&o.has(l)})};de(this,be,Zk).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&de(this,be,gg).call(this)}},Xt=new WeakMap,fe=new WeakMap,Wc=new WeakMap,Ut=new WeakMap,Xi=new WeakMap,gs=new WeakMap,Zn=new WeakMap,Ga=new WeakMap,qc=new WeakMap,ys=new WeakMap,xs=new WeakMap,Zi=new WeakMap,Ji=new WeakMap,Qa=new WeakMap,bs=new WeakMap,be=new WeakSet,Ul=function(t){de(this,be,bg).call(this);let r=A(this,fe).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Jt)),r},hg=function(){de(this,be,yg).call(this);const t=di(this.options.staleTime,A(this,fe));if(po||A(this,Ut).isStale||!lg(t))return;const n=Hk(A(this,Ut).dataUpdatedAt,t)+1;K(this,Zi,zi.setTimeout(()=>{A(this,Ut).isStale||this.updateResult()},n))},mg=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(A(this,fe)):this.options.refetchInterval)??!1},vg=function(t){de(this,be,xg).call(this),K(this,Qa,t),!(po||Dr(this.options.enabled,A(this,fe))===!1||!lg(A(this,Qa))||A(this,Qa)===0)&&K(this,Ji,zi.setInterval(()=>{(this.options.refetchIntervalInBackground||T0.isFocused())&&de(this,be,Ul).call(this)},A(this,Qa)))},gg=function(){de(this,be,hg).call(this),de(this,be,vg).call(this,de(this,be,mg).call(this))},yg=function(){A(this,Zi)&&(zi.clearTimeout(A(this,Zi)),K(this,Zi,void 0))},xg=function(){A(this,Ji)&&(zi.clearInterval(A(this,Ji)),K(this,Ji,void 0))},bg=function(){const t=A(this,Xt).getQueryCache().build(A(this,Xt),this.options);if(t===A(this,fe))return;const r=A(this,fe);K(this,fe,t),K(this,Wc,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},Zk=function(t){kt.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(A(this,Ut))}),A(this,Xt).getQueryCache().notify({query:A(this,fe),type:"observerResultsUpdated"})})},OC);function V$(e,t){return Dr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function _1(e,t){return V$(e,t)||e.state.data!==void 0&&wg(e,t,t.refetchOnMount)}function wg(e,t,r){if(Dr(t.enabled,e)!==!1&&di(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&_0(e,t)}return!1}function R1(e,t,r,n){return(e!==t||Dr(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&_0(e,r)}function _0(e,t){return Dr(t.enabled,e)!==!1&&e.isStaleByTime(di(t.staleTime,e))}function Y$(e,t){return!cg(e.getCurrentResult(),t)}function D1(e){return{onFetch:(t,r)=>{var u,d,p,h,g;const n=t.options,a=(p=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,i=((h=t.state.data)==null?void 0:h.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let v=!1;const y=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},b=Vk(t.options,t.fetchOptions),x=async(w,S,E)=>{if(v)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const C=(()=>{const N={client:t.client,queryKey:t.queryKey,pageParam:S,direction:E?"backward":"forward",meta:t.options.meta};return y(N),N})(),j=await b(C),{maxPages:O}=t.options,k=E?$$:L$;return{pages:k(w.pages,j,O),pageParams:k(w.pageParams,S,O)}};if(a&&i.length){const w=a==="backward",S=w?G$:M1,E={pages:i,pageParams:o},P=S(n,E);s=await x(E,P,w)}else{const w=e??i.length;do{const S=l===0?o[0]??n.initialPageParam:M1(n,s);if(l>0&&S==null)break;s=await x(s,S),l++}while(l{var v,y;return(y=(v=t.options).persister)==null?void 0:y.call(v,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=c}}}function M1(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function G$(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Hc,Sn,Wt,eo,En,La,AC,Q$=(AC=class extends Qk{constructor(t){super();re(this,En);re(this,Hc);re(this,Sn);re(this,Wt);re(this,eo);K(this,Hc,t.client),this.mutationId=t.mutationId,K(this,Wt,t.mutationCache),K(this,Sn,[]),this.state=t.state||X$(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){A(this,Sn).includes(t)||(A(this,Sn).push(t),this.clearGcTimeout(),A(this,Wt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){K(this,Sn,A(this,Sn).filter(r=>r!==t)),this.scheduleGc(),A(this,Wt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){A(this,Sn).length||(this.state.status==="pending"?this.scheduleGc():A(this,Wt).remove(this))}continue(){var t;return((t=A(this,eo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,l,c,u,d,p,h,g,v,y,b,x,w,S,E,P,C,j,O;const r=()=>{de(this,En,La).call(this,{type:"continue"})},n={client:A(this,Hc),meta:this.options.meta,mutationKey:this.options.mutationKey};K(this,eo,Gk({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(k,N)=>{de(this,En,La).call(this,{type:"failed",failureCount:k,error:N})},onPause:()=>{de(this,En,La).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,Wt).canRun(this)}));const a=this.state.status==="pending",i=!A(this,eo).canStart();try{if(a)r();else{de(this,En,La).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(o=A(this,Wt).config).onMutate)==null?void 0:s.call(o,t,this,n));const N=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,n));N!==this.state.context&&de(this,En,La).call(this,{type:"pending",context:N,variables:t,isPaused:i})}const k=await A(this,eo).start();return await((d=(u=A(this,Wt).config).onSuccess)==null?void 0:d.call(u,k,t,this.state.context,this,n)),await((h=(p=this.options).onSuccess)==null?void 0:h.call(p,k,t,this.state.context,n)),await((v=(g=A(this,Wt).config).onSettled)==null?void 0:v.call(g,k,null,this.state.variables,this.state.context,this,n)),await((b=(y=this.options).onSettled)==null?void 0:b.call(y,k,null,t,this.state.context,n)),de(this,En,La).call(this,{type:"success",data:k}),k}catch(k){try{throw await((w=(x=A(this,Wt).config).onError)==null?void 0:w.call(x,k,t,this.state.context,this,n)),await((E=(S=this.options).onError)==null?void 0:E.call(S,k,t,this.state.context,n)),await((C=(P=A(this,Wt).config).onSettled)==null?void 0:C.call(P,void 0,k,this.state.variables,this.state.context,this,n)),await((O=(j=this.options).onSettled)==null?void 0:O.call(j,void 0,k,t,this.state.context,n)),k}finally{de(this,En,La).call(this,{type:"error",error:k})}}finally{A(this,Wt).runNext(this)}}},Hc=new WeakMap,Sn=new WeakMap,Wt=new WeakMap,eo=new WeakMap,En=new WeakSet,La=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),kt.batch(()=>{A(this,Sn).forEach(n=>{n.onMutationUpdate(t)}),A(this,Wt).notify({mutation:this,type:"updated",action:t})})},AC);function X$(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Jn,Jr,Kc,NC,Z$=(NC=class extends Zc{constructor(t={}){super();re(this,Jn);re(this,Jr);re(this,Kc);this.config=t,K(this,Jn,new Set),K(this,Jr,new Map),K(this,Kc,0)}build(t,r,n){const a=new Q$({client:t,mutationCache:this,mutationId:++Tu(this,Kc)._,options:t.defaultMutationOptions(r),state:n});return this.add(a),a}add(t){A(this,Jn).add(t);const r=Gu(t);if(typeof r=="string"){const n=A(this,Jr).get(r);n?n.push(t):A(this,Jr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(A(this,Jn).delete(t)){const r=Gu(t);if(typeof r=="string"){const n=A(this,Jr).get(r);if(n)if(n.length>1){const a=n.indexOf(t);a!==-1&&n.splice(a,1)}else n[0]===t&&A(this,Jr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Gu(t);if(typeof r=="string"){const n=A(this,Jr).get(r),a=n==null?void 0:n.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var n;const r=Gu(t);if(typeof r=="string"){const a=(n=A(this,Jr).get(r))==null?void 0:n.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){kt.batch(()=>{A(this,Jn).forEach(t=>{this.notify({type:"removed",mutation:t})}),A(this,Jn).clear(),A(this,Jr).clear()})}getAll(){return Array.from(A(this,Jn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>O1(r,n))}findAll(t={}){return this.getAll().filter(r=>O1(t,r))}notify(t){kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return kt.batch(()=>Promise.all(t.map(r=>r.continue().catch(Jt))))}},Jn=new WeakMap,Jr=new WeakMap,Kc=new WeakMap,NC);function Gu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Pn,TC,J$=(TC=class extends Zc{constructor(t={}){super();re(this,Pn);this.config=t,K(this,Pn,new Map)}build(t,r,n){const a=r.queryKey,i=r.queryHash??A0(a,r);let o=this.get(i);return o||(o=new H$({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(a)}),this.add(o)),o}add(t){A(this,Pn).has(t.queryHash)||(A(this,Pn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=A(this,Pn).get(t.queryHash);r&&(t.destroy(),r===t&&A(this,Pn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){kt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return A(this,Pn).get(t)}getAll(){return[...A(this,Pn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>k1(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>k1(t,n)):r}notify(t){kt.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){kt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){kt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Pn=new WeakMap,TC),Ye,Xa,Za,ws,Ss,Ja,Es,Ps,_C,eF=(_C=class{constructor(e={}){re(this,Ye);re(this,Xa);re(this,Za);re(this,ws);re(this,Ss);re(this,Ja);re(this,Es);re(this,Ps);K(this,Ye,e.queryCache||new J$),K(this,Xa,e.mutationCache||new Z$),K(this,Za,e.defaultOptions||{}),K(this,ws,new Map),K(this,Ss,new Map),K(this,Ja,0)}mount(){Tu(this,Ja)._++,A(this,Ja)===1&&(K(this,Es,T0.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,Ye).onFocus())})),K(this,Ps,hf.subscribe(async e=>{e&&(await this.resumePausedMutations(),A(this,Ye).onOnline())})))}unmount(){var e,t;Tu(this,Ja)._--,A(this,Ja)===0&&((e=A(this,Es))==null||e.call(this),K(this,Es,void 0),(t=A(this,Ps))==null||t.call(this),K(this,Ps,void 0))}isFetching(e){return A(this,Ye).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return A(this,Xa).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=A(this,Ye).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=A(this,Ye).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(di(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return A(this,Ye).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),a=A(this,Ye).get(n.queryHash),i=a==null?void 0:a.state.data,o=D$(t,i);if(o!==void 0)return A(this,Ye).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return kt.batch(()=>A(this,Ye).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=A(this,Ye).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=A(this,Ye);kt.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=A(this,Ye);return kt.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=kt.batch(()=>A(this,Ye).findAll(e).map(a=>a.cancel(r)));return Promise.all(n).then(Jt).catch(Jt)}invalidateQueries(e,t={}){return kt.batch(()=>(A(this,Ye).findAll(e).forEach(r=>{r.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 r={...t,cancelRefetch:t.cancelRefetch??!0},n=kt.batch(()=>A(this,Ye).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,r);return r.throwOnError||(i=i.catch(Jt)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(Jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=A(this,Ye).build(this,t);return r.isStaleByTime(di(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Jt).catch(Jt)}fetchInfiniteQuery(e){return e.behavior=D1(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Jt).catch(Jt)}ensureInfiniteQueryData(e){return e.behavior=D1(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return hf.isOnline()?A(this,Xa).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,Ye)}getMutationCache(){return A(this,Xa)}getDefaultOptions(){return A(this,Za)}setDefaultOptions(e){K(this,Za,e)}setQueryDefaults(e,t){A(this,ws).set(wc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...A(this,ws).values()],r={};return t.forEach(n=>{Sc(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){A(this,Ss).set(wc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...A(this,Ss).values()],r={};return t.forEach(n=>{Sc(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...A(this,Za).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=A0(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===N0&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...A(this,Za).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){A(this,Ye).clear(),A(this,Xa).clear()}},Ye=new WeakMap,Xa=new WeakMap,Za=new WeakMap,ws=new WeakMap,Ss=new WeakMap,Ja=new WeakMap,Es=new WeakMap,Ps=new WeakMap,_C),Jk=m.createContext(void 0),tF=e=>{const t=m.useContext(Jk);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},rF=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(Jk.Provider,{value:e,children:t})),eO=m.createContext(!1),nF=()=>m.useContext(eO);eO.Provider;function aF(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var iF=m.createContext(aF()),oF=()=>m.useContext(iF),sF=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},lF=e=>{m.useEffect(()=>{e.clearReset()},[e])},cF=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(a&&e.data===void 0||F$(r,[e.error,n])),uF=e=>{if(e.suspense){const r=a=>a==="static"?a:Math.max(a??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...a)=>r(n(...a)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},dF=(e,t)=>e.isLoading&&e.isFetching&&!t,fF=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,I1=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function pF(e,t,r){var d,p,h,g,v;const n=nF(),a=oF(),i=tF(),o=i.defaultQueryOptions(e);(p=(d=i.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||p.call(d,o),o._optimisticResults=n?"isRestoring":"optimistic",uF(o),sF(o,a),lF(a);const s=!i.getQueryCache().get(o.queryHash),[l]=m.useState(()=>new t(i,o)),c=l.getOptimisticResult(o),u=!n&&e.subscribed!==!1;if(m.useSyncExternalStore(m.useCallback(y=>{const b=u?l.subscribe(kt.batchCalls(y)):Jt;return l.updateResult(),b},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),m.useEffect(()=>{l.setOptions(o)},[o,l]),fF(o,c))throw I1(o,l,a);if(cF({result:c,errorResetBoundary:a,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw c.error;if((g=(h=i.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||g.call(h,o,c),o.experimental_prefetchInRender&&!po&&dF(c,n)){const y=s?I1(o,l,a):(v=i.getQueryCache().get(o.queryHash))==null?void 0:v.promise;y==null||y.catch(Jt).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function yt(e,t){return pF(e,K$)}/** - * react-router v7.9.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */var L1="popstate";function hF(e={}){function t(n,a){let{pathname:i,search:o,hash:s}=n.location;return Sg("",{pathname:i,search:o,hash:s},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Ec(a)}return vF(t,r,null,e)}function We(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function un(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function mF(){return Math.random().toString(36).substring(2,10)}function $1(e,t){return{usr:e.state,key:e.key,idx:t}}function Sg(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Qs(t):t,state:r,key:t&&t.key||n||mF()}}function Ec({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Qs(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function vF(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:i=!1}=n,o=a.history,s="POP",l=null,c=u();c==null&&(c=0,o.replaceState({...o.state,idx:c},""));function u(){return(o.state||{idx:null}).idx}function d(){s="POP";let y=u(),b=y==null?null:y-c;c=y,l&&l({action:s,location:v.location,delta:b})}function p(y,b){s="PUSH";let x=Sg(v.location,y,b);c=u()+1;let w=$1(x,c),S=v.createHref(x);try{o.pushState(w,"",S)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;a.location.assign(S)}i&&l&&l({action:s,location:v.location,delta:1})}function h(y,b){s="REPLACE";let x=Sg(v.location,y,b);c=u();let w=$1(x,c),S=v.createHref(x);o.replaceState(w,"",S),i&&l&&l({action:s,location:v.location,delta:0})}function g(y){return gF(y)}let v={get action(){return s},get location(){return e(a,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(L1,d),l=y,()=>{a.removeEventListener(L1,d),l=null}},createHref(y){return t(a,y)},createURL:g,encodeLocation(y){let b=g(y);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:p,replace:h,go(y){return o.go(y)}};return v}function gF(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),We(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Ec(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function tO(e,t,r="/"){return yF(e,t,r,!1)}function yF(e,t,r,n){let a=typeof t=="string"?Qs(t):t,i=ga(a.pathname||"/",r);if(i==null)return null;let o=rO(e);xF(o);let s=null;for(let l=0;s==null&&l{let u={relativePath:c===void 0?o.path||"":c,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(n)&&l)return;We(u.relativePath.startsWith(n),`Absolute route path "${u.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(n.length)}let d=la([n,u.relativePath]),p=r.concat(u);o.children&&o.children.length>0&&(We(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),rO(o.children,t,p,d,l)),!(o.path==null&&!o.index)&&t.push({path:d,score:jF(d,o.index),routesMeta:p})};return e.forEach((o,s)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))i(o,s);else for(let c of nO(o.path))i(o,s,!0,c)}),t}function nO(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let o=nO(n.join("/")),s=[];return s.push(...o.map(l=>l===""?i:[i,l].join("/"))),a&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function xF(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:kF(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var bF=/^:[\w-]+$/,wF=3,SF=2,EF=1,PF=10,CF=-2,F1=e=>e==="*";function jF(e,t){let r=e.split("/"),n=r.length;return r.some(F1)&&(n+=CF),t&&(n+=SF),r.filter(a=>!F1(a)).reduce((a,i)=>a+(bF.test(i)?wF:i===""?EF:PF),n)}function kF(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function OF(e,t,r=!1){let{routesMeta:n}=e,a={},i="/",o=[];for(let s=0;s{if(u==="*"){let g=s[p]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const h=s[p];return d&&!h?c[u]=void 0:c[u]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function AF(e,t=!1,r=!0){un(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 n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function NF(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return un(!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 ga(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function TF(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Qs(e):e;return{pathname:r?r.startsWith("/")?r:_F(r,t):t,search:MF(n),hash:IF(a)}}function _F(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Nm(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function RF(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function R0(e){let t=RF(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function D0(e,t,r,n=!1){let a;typeof e=="string"?a=Qs(e):(a={...e},We(!a.pathname||!a.pathname.includes("?"),Nm("?","pathname","search",a)),We(!a.pathname||!a.pathname.includes("#"),Nm("#","pathname","hash",a)),We(!a.search||!a.search.includes("#"),Nm("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,s;if(o==null)s=r;else{let d=t.length-1;if(!n&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),d-=1;a.pathname=p.join("/")}s=d>=0?t[d]:"/"}let l=TF(a,s),c=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var la=e=>e.join("/").replace(/\/\/+/g,"/"),DF=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),MF=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,IF=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function LF(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var aO=["POST","PUT","PATCH","DELETE"];new Set(aO);var $F=["GET",...aO];new Set($F);var Xs=m.createContext(null);Xs.displayName="DataRouter";var _p=m.createContext(null);_p.displayName="DataRouterState";m.createContext(!1);var iO=m.createContext({isTransitioning:!1});iO.displayName="ViewTransition";var FF=m.createContext(new Map);FF.displayName="Fetchers";var BF=m.createContext(null);BF.displayName="Await";var hn=m.createContext(null);hn.displayName="Navigation";var Jc=m.createContext(null);Jc.displayName="Location";var mn=m.createContext({outlet:null,matches:[],isDataRoute:!1});mn.displayName="Route";var M0=m.createContext(null);M0.displayName="RouteError";function zF(e,{relative:t}={}){We(Zs(),"useHref() may be used only in the context of a component.");let{basename:r,navigator:n}=m.useContext(hn),{hash:a,pathname:i,search:o}=eu(e,{relative:t}),s=i;return r!=="/"&&(s=i==="/"?r:la([r,i])),n.createHref({pathname:s,search:o,hash:a})}function Zs(){return m.useContext(Jc)!=null}function ja(){return We(Zs(),"useLocation() may be used only in the context of a component."),m.useContext(Jc).location}var oO="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function sO(e){m.useContext(hn).static||m.useLayoutEffect(e)}function lO(){let{isDataRoute:e}=m.useContext(mn);return e?r3():UF()}function UF(){We(Zs(),"useNavigate() may be used only in the context of a component.");let e=m.useContext(Xs),{basename:t,navigator:r}=m.useContext(hn),{matches:n}=m.useContext(mn),{pathname:a}=ja(),i=JSON.stringify(R0(n)),o=m.useRef(!1);return sO(()=>{o.current=!0}),m.useCallback((l,c={})=>{if(un(o.current,oO),!o.current)return;if(typeof l=="number"){r.go(l);return}let u=D0(l,JSON.parse(i),a,c.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:la([t,u.pathname])),(c.replace?r.replace:r.push)(u,c.state,c)},[t,r,i,a,e])}var WF=m.createContext(null);function qF(e){let t=m.useContext(mn).outlet;return t&&m.createElement(WF.Provider,{value:e},t)}function eu(e,{relative:t}={}){let{matches:r}=m.useContext(mn),{pathname:n}=ja(),a=JSON.stringify(R0(r));return m.useMemo(()=>D0(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function HF(e,t){return cO(e,t)}function cO(e,t,r,n,a){var x;We(Zs(),"useRoutes() may be used only in the context of a component.");let{navigator:i}=m.useContext(hn),{matches:o}=m.useContext(mn),s=o[o.length-1],l=s?s.params:{},c=s?s.pathname:"/",u=s?s.pathnameBase:"/",d=s&&s.route;{let w=d&&d.path||"";uO(c,!d||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${c}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. - -Please change the parent to .`)}let p=ja(),h;if(t){let w=typeof t=="string"?Qs(t):t;We(u==="/"||((x=w.pathname)==null?void 0:x.startsWith(u)),`When overriding the location using \`\` 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 "${u}" but pathname "${w.pathname}" was given in the \`location\` prop.`),h=w}else h=p;let g=h.pathname||"/",v=g;if(u!=="/"){let w=u.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(w.length).join("/")}let y=tO(e,{pathname:v});un(d||y!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),un(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let b=QF(y&&y.map(w=>Object.assign({},w,{params:Object.assign({},l,w.params),pathname:la([u,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?u:la([u,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,r,n,a);return t&&b?m.createElement(Jc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},b):b}function KF(){let e=t3(),t=LF(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},i={padding:"2px 4px",backgroundColor:n},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:i},"ErrorBoundary")," or"," ",m.createElement("code",{style:i},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),r?m.createElement("pre",{style:a},r):null,o)}var VF=m.createElement(KF,null),YF=class extends m.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.unstable_onError?this.props.unstable_onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?m.createElement(mn.Provider,{value:this.props.routeContext},m.createElement(M0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function GF({routeContext:e,match:t,children:r}){let n=m.useContext(Xs);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(mn.Provider,{value:e},r)}function QF(e,t=[],r=null,n=null,a=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,o=r==null?void 0:r.errors;if(o!=null){let c=i.findIndex(u=>u.route.id&&(o==null?void 0:o[u.route.id])!==void 0);We(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,c+1))}let s=!1,l=-1;if(r)for(let c=0;c=0?i=i.slice(0,l+1):i=[i[0]];break}}}return i.reduceRight((c,u,d)=>{let p,h=!1,g=null,v=null;r&&(p=o&&u.route.id?o[u.route.id]:void 0,g=u.route.errorElement||VF,s&&(l<0&&d===0?(uO("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,v=null):l===d&&(h=!0,v=u.route.hydrateFallbackElement||null)));let y=t.concat(i.slice(0,d+1)),b=()=>{let x;return p?x=g:h?x=v:u.route.Component?x=m.createElement(u.route.Component,null):u.route.element?x=u.route.element:x=c,m.createElement(GF,{match:u,routeContext:{outlet:c,matches:y,isDataRoute:r!=null},children:x})};return r&&(u.route.ErrorBoundary||u.route.errorElement||d===0)?m.createElement(YF,{location:r.location,revalidation:r.revalidation,component:g,error:p,children:b(),routeContext:{outlet:null,matches:y,isDataRoute:!0},unstable_onError:n}):b()},null)}function I0(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function XF(e){let t=m.useContext(Xs);return We(t,I0(e)),t}function ZF(e){let t=m.useContext(_p);return We(t,I0(e)),t}function JF(e){let t=m.useContext(mn);return We(t,I0(e)),t}function L0(e){let t=JF(e),r=t.matches[t.matches.length-1];return We(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function e3(){return L0("useRouteId")}function t3(){var n;let e=m.useContext(M0),t=ZF("useRouteError"),r=L0("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function r3(){let{router:e}=XF("useNavigate"),t=L0("useNavigate"),r=m.useRef(!1);return sO(()=>{r.current=!0}),m.useCallback(async(a,i={})=>{un(r.current,oO),r.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var B1={};function uO(e,t,r){!t&&!B1[e]&&(B1[e]=!0,un(!1,r))}m.memo(n3);function n3({routes:e,future:t,state:r,unstable_onError:n}){return cO(e,void 0,r,n,t)}function a3({to:e,replace:t,state:r,relative:n}){We(Zs()," may be used only in the context of a component.");let{static:a}=m.useContext(hn);un(!a," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:i}=m.useContext(mn),{pathname:o}=ja(),s=lO(),l=D0(e,R0(i),o,n==="path"),c=JSON.stringify(l);return m.useEffect(()=>{s(JSON.parse(c),{replace:t,state:r,relative:n})},[s,c,n,t,r]),null}function i3(e){return qF(e.context)}function bn(e){We(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function o3({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:i=!1}){We(!Zs(),"You cannot render a inside another . You should never have more than one in your app.");let o=e.replace(/^\/*/,"/"),s=m.useMemo(()=>({basename:o,navigator:a,static:i,future:{}}),[o,a,i]);typeof r=="string"&&(r=Qs(r));let{pathname:l="/",search:c="",hash:u="",state:d=null,key:p="default"}=r,h=m.useMemo(()=>{let g=ga(l,o);return g==null?null:{location:{pathname:g,search:c,hash:u,state:d,key:p},navigationType:n}},[o,l,c,u,d,p,n]);return un(h!=null,` is not able to match the URL "${l}${c}${u}" because it does not start with the basename, so the won't render anything.`),h==null?null:m.createElement(hn.Provider,{value:s},m.createElement(Jc.Provider,{children:t,value:h}))}function s3({children:e,location:t}){return HF(Eg(e),t)}function Eg(e,t=[]){let r=[];return m.Children.forEach(e,(n,a)=>{if(!m.isValidElement(n))return;let i=[...t,a];if(n.type===m.Fragment){r.push.apply(r,Eg(n.props.children,i));return}We(n.type===bn,`[${typeof n.type=="string"?n.type:n.type.name}] is not a component. All component children of must be a or `),We(!n.props.index||!n.props.children,"An index route cannot have child routes.");let o={id:n.props.id||i.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(o.children=Eg(n.props.children,i)),r.push(o)}),r}var Rd="get",Dd="application/x-www-form-urlencoded";function Rp(e){return e!=null&&typeof e.tagName=="string"}function l3(e){return Rp(e)&&e.tagName.toLowerCase()==="button"}function c3(e){return Rp(e)&&e.tagName.toLowerCase()==="form"}function u3(e){return Rp(e)&&e.tagName.toLowerCase()==="input"}function d3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function f3(e,t){return e.button===0&&(!t||t==="_self")&&!d3(e)}var Qu=null;function p3(){if(Qu===null)try{new FormData(document.createElement("form"),0),Qu=!1}catch{Qu=!0}return Qu}var h3=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Tm(e){return e!=null&&!h3.has(e)?(un(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Dd}"`),null):e}function m3(e,t){let r,n,a,i,o;if(c3(e)){let s=e.getAttribute("action");n=s?ga(s,t):null,r=e.getAttribute("method")||Rd,a=Tm(e.getAttribute("enctype"))||Dd,i=new FormData(e)}else if(l3(e)||u3(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a