From 4a3e42db362eb475e8f39bc3a12632544636cae0 Mon Sep 17 00:00:00 2001 From: maziggy Date: Fri, 23 Jan 2026 07:52:56 +0100 Subject: [PATCH] Home Assistant smart plug improvements: - Add search parameter to /ha/entities endpoint for searching all entities - Replace entity dropdown with searchable combobox (type to filter) - Default shows switch/light/input_boolean; search queries all domains - Make all three energy sensor dropdowns searchable (Power, Energy Today, Total) - Each dropdown filters by entity_id or friendly_name - Shows entity details (name, id, state, unit) in dropdown options Fixes issue where HA plugs with non-standard entity naming couldn't find their related power/energy sensors. --- backend/app/api/routes/smart_plugs.py | 10 +- backend/app/services/homeassistant.py | 40 +- frontend/src/api/client.ts | 6 +- frontend/src/components/AddSmartPlugModal.tsx | 479 ++++++++++++++---- .../{index-DbTLv2ta.js => index-XGGhfA3J.js} | 166 +++--- static/index.html | 2 +- 6 files changed, 508 insertions(+), 195 deletions(-) rename static/assets/{index-DbTLv2ta.js => index-XGGhfA3J.js} (53%) diff --git a/backend/app/api/routes/smart_plugs.py b/backend/app/api/routes/smart_plugs.py index 3dbf952c2..1a73338cf 100644 --- a/backend/app/api/routes/smart_plugs.py +++ b/backend/app/api/routes/smart_plugs.py @@ -211,9 +211,15 @@ async def test_ha_connection(request: HATestConnectionRequest): @router.get("/ha/entities", response_model=list[HAEntity]) -async def list_ha_entities(db: AsyncSession = Depends(get_db)): +async def list_ha_entities( + db: AsyncSession = Depends(get_db), + search: str | None = None, +): """List available Home Assistant entities. + By default, returns switch/light/input_boolean entities. + When search is provided, searches ALL entities by entity_id or friendly_name. + Requires HA connection settings to be configured in Settings. """ ha_url = await get_setting(db, "ha_url") or "" @@ -224,7 +230,7 @@ async def list_ha_entities(db: AsyncSession = Depends(get_db)): 400, "Home Assistant not configured. Please set HA URL and token in Settings → Network → Home Assistant." ) - entities = await homeassistant_service.list_entities(ha_url, ha_token) + entities = await homeassistant_service.list_entities(ha_url, ha_token, search) return [HAEntity(**e) for e in entities] diff --git a/backend/app/services/homeassistant.py b/backend/app/services/homeassistant.py index cf3beb489..1e2ebfdad 100644 --- a/backend/app/services/homeassistant.py +++ b/backend/app/services/homeassistant.py @@ -215,8 +215,11 @@ class HomeAssistantService: except Exception as e: return {"success": False, "message": None, "error": str(e)} - async def list_entities(self, url: str, token: str) -> list[dict]: - """List available switch/light entities from HA. + async def list_entities(self, url: str, token: str, search: str | None = None) -> list[dict]: + """List available entities from HA. + + By default, returns switch/light/input_boolean domains. + When search is provided, searches ALL entities by entity_id or friendly_name. Returns list of entity dicts with: - entity_id: str @@ -224,6 +227,9 @@ class HomeAssistantService: - state: str - domain: str """ + # Default domains for smart plug control + default_domains = {"switch", "light", "input_boolean"} + try: async with httpx.AsyncClient(timeout=self.timeout) as client: response = await client.get( @@ -233,20 +239,30 @@ class HomeAssistantService: response.raise_for_status() entities = [] + search_lower = search.lower().strip() if search else None + for entity in response.json(): entity_id = entity.get("entity_id", "") domain = entity_id.split(".")[0] if "." in entity_id else "" + friendly_name = entity.get("attributes", {}).get("friendly_name", entity_id) - # Filter to switch, light, input_boolean domains - if domain in ["switch", "light", "input_boolean"]: - entities.append( - { - "entity_id": entity_id, - "friendly_name": entity.get("attributes", {}).get("friendly_name", entity_id), - "state": entity.get("state"), - "domain": domain, - } - ) + # If searching, match against entity_id or friendly_name + if search_lower: + if search_lower not in entity_id.lower() and search_lower not in friendly_name.lower(): + continue + else: + # No search: filter to default domains only + if domain not in default_domains: + continue + + entities.append( + { + "entity_id": entity_id, + "friendly_name": friendly_name, + "state": entity.get("state"), + "domain": domain, + } + ) return sorted(entities, key=lambda x: x["friendly_name"].lower()) except Exception as e: diff --git a/frontend/src/api/client.ts b/frontend/src/api/client.ts index fad1cb30a..8c8014e5f 100644 --- a/frontend/src/api/client.ts +++ b/frontend/src/api/client.ts @@ -2211,8 +2211,10 @@ export const api = { method: 'POST', body: JSON.stringify({ url, token }), }), - getHAEntities: () => - request('/smart-plugs/ha/entities'), + getHAEntities: (search?: string) => { + const params = search ? `?search=${encodeURIComponent(search)}` : ''; + return request(`/smart-plugs/ha/entities${params}`); + }, getHASensorEntities: () => request('/smart-plugs/ha/sensors'), diff --git a/frontend/src/components/AddSmartPlugModal.tsx b/frontend/src/components/AddSmartPlugModal.tsx index 57b3a2fa9..bba6c11d0 100644 --- a/frontend/src/components/AddSmartPlugModal.tsx +++ b/frontend/src/components/AddSmartPlugModal.tsx @@ -28,6 +28,24 @@ export function AddSmartPlugModal({ plug, onClose }: AddSmartPlugModalProps) { const [haPowerEntity, setHaPowerEntity] = useState(plug?.ha_power_entity || ''); const [haEnergyTodayEntity, setHaEnergyTodayEntity] = useState(plug?.ha_energy_today_entity || ''); const [haEnergyTotalEntity, setHaEnergyTotalEntity] = useState(plug?.ha_energy_total_entity || ''); + // HA entity search + const [haEntitySearch, setHaEntitySearch] = useState(''); + const [debouncedSearch, setDebouncedSearch] = useState(''); + const [isEntityDropdownOpen, setIsEntityDropdownOpen] = useState(false); + const entityDropdownRef = useRef(null); + + // Energy sensor search states + const [powerSensorSearch, setPowerSensorSearch] = useState(''); + const [isPowerDropdownOpen, setIsPowerDropdownOpen] = useState(false); + const powerDropdownRef = useRef(null); + + const [energyTodaySearch, setEnergyTodaySearch] = useState(''); + const [isEnergyTodayDropdownOpen, setIsEnergyTodayDropdownOpen] = useState(false); + const energyTodayDropdownRef = useRef(null); + + const [energyTotalSearch, setEnergyTotalSearch] = useState(''); + const [isEnergyTotalDropdownOpen, setIsEnergyTotalDropdownOpen] = useState(false); + const energyTotalDropdownRef = useRef(null); const [printerId, setPrinterId] = useState(plug?.printer_id || null); const [testResult, setTestResult] = useState<{ success: boolean; state?: string | null; device_name?: string | null } | null>(null); @@ -73,10 +91,38 @@ export function AddSmartPlugModal({ plug, onClose }: AddSmartPlugModalProps) { // Check if HA is properly configured const haConfigured = !!(settings?.ha_enabled && settings?.ha_url && settings?.ha_token); + // Debounce search input + useEffect(() => { + const timer = setTimeout(() => { + setDebouncedSearch(haEntitySearch); + }, 300); + return () => clearTimeout(timer); + }, [haEntitySearch]); + + // Close dropdowns when clicking outside + useEffect(() => { + const handleClickOutside = (e: MouseEvent) => { + if (entityDropdownRef.current && !entityDropdownRef.current.contains(e.target as Node)) { + setIsEntityDropdownOpen(false); + } + if (powerDropdownRef.current && !powerDropdownRef.current.contains(e.target as Node)) { + setIsPowerDropdownOpen(false); + } + if (energyTodayDropdownRef.current && !energyTodayDropdownRef.current.contains(e.target as Node)) { + setIsEnergyTodayDropdownOpen(false); + } + if (energyTotalDropdownRef.current && !energyTotalDropdownRef.current.contains(e.target as Node)) { + setIsEnergyTotalDropdownOpen(false); + } + }; + document.addEventListener('mousedown', handleClickOutside); + return () => document.removeEventListener('mousedown', handleClickOutside); + }, []); + // Fetch Home Assistant entities when in HA mode AND HA is configured - const { data: haEntities, isLoading: haEntitiesLoading } = useQuery({ - queryKey: ['ha-entities'], - queryFn: api.getHAEntities, + const { data: haEntities, isLoading: haEntitiesLoading, error: haEntitiesError } = useQuery({ + queryKey: ['ha-entities', debouncedSearch], + queryFn: () => api.getHAEntities(debouncedSearch || undefined), enabled: plugType === 'homeassistant' && haConfigured, retry: false, staleTime: 0, @@ -439,61 +485,109 @@ export function AddSmartPlugModal({ plug, onClose }: AddSmartPlugModalProps) { )} - {haEntities && haEntities.length === 0 && ( -
- No switch/light entities found in Home Assistant + {haEntitiesError && ( +
+ Failed to load entities: {(haEntitiesError as Error).message}
)} - {haEntities && haEntities.length > 0 && (() => { + {/* Searchable Entity Dropdown */} + {(() => { // Filter out entities already configured (except current plug when editing) const configuredEntityIds = existingPlugs ?.filter(p => p.ha_entity_id && p.id !== plug?.id) .map(p => p.ha_entity_id) || []; - const availableEntities = haEntities.filter(e => !configuredEntityIds.includes(e.entity_id)); + const availableEntities = (haEntities || []).filter(e => !configuredEntityIds.includes(e.entity_id)); + const selectedEntity = haEntities?.find(e => e.entity_id === haEntityId); return ( -
+
- - {configuredEntityIds.length > 0 && ( -

- {configuredEntityIds.length} entity(s) already configured -

+
+ + { + setHaEntitySearch(e.target.value); + if (!isEntityDropdownOpen) setIsEntityDropdownOpen(true); + }} + onFocus={() => { + setIsEntityDropdownOpen(true); + setHaEntitySearch(''); + }} + placeholder="Search entities..." + className="w-full pl-9 pr-8 py-2 bg-bambu-dark border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:border-bambu-green focus:outline-none" + /> + {haEntityId && !isEntityDropdownOpen && ( + + )} + {haEntitiesLoading && ( + + )} +
+ + {/* Dropdown */} + {isEntityDropdownOpen && ( +
+ {haEntitiesLoading && ( +
+ + Loading... +
+ )} + {!haEntitiesLoading && availableEntities.length === 0 && ( +
+ {debouncedSearch + ? `No entities found matching "${debouncedSearch}"` + : 'No entities available'} +
+ )} + {!haEntitiesLoading && availableEntities.map((entity) => ( + + ))} +
)} + +

+ {debouncedSearch + ? `Searching all entities (${availableEntities.length} found)` + : `Showing switch, light, input_boolean (${availableEntities.length} available)`} +

); })()} - {haEntityId && haEntities && ( -
- -
-

Entity selected

-

- {haEntities.find(e => e.entity_id === haEntityId)?.friendly_name} - {haEntities.find(e => e.entity_id === haEntityId)?.state} -

-
-
- )} {/* Energy Monitoring Section (Optional) */} {haEntityId && haSensorEntities && haSensorEntities.length > 0 && ( @@ -501,66 +595,261 @@ export function AddSmartPlugModal({ plug, onClose }: AddSmartPlugModalProps) {

Energy Monitoring (Optional)

- Select sensors that provide power/energy data. These can be from any device in Home Assistant. + Search and select sensors that provide power/energy data.

{/* Power Sensor (W) */} -
- - -
+ {(() => { + const powerSensors = haSensorEntities.filter(s => + s.unit_of_measurement === 'W' || s.unit_of_measurement === 'kW' || s.unit_of_measurement === 'mW' + ); + const filteredPowerSensors = powerSensorSearch + ? powerSensors.filter(s => + s.entity_id.toLowerCase().includes(powerSensorSearch.toLowerCase()) || + s.friendly_name.toLowerCase().includes(powerSensorSearch.toLowerCase()) + ) + : powerSensors; + const selectedPowerSensor = haSensorEntities.find(s => s.entity_id === haPowerEntity); + + return ( +
+ +
+ + { + setPowerSensorSearch(e.target.value); + if (!isPowerDropdownOpen) setIsPowerDropdownOpen(true); + }} + onFocus={() => { + setIsPowerDropdownOpen(true); + setPowerSensorSearch(''); + }} + placeholder="Search power sensors..." + className="w-full pl-9 pr-8 py-2 bg-bambu-dark border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:border-bambu-green focus:outline-none" + /> + {haPowerEntity && !isPowerDropdownOpen && ( + + )} +
+ {isPowerDropdownOpen && ( +
+ + {filteredPowerSensors.map((sensor) => ( + + ))} + {filteredPowerSensors.length === 0 && ( +
No matching sensors
+ )} +
+ )} +
+ ); + })()} {/* Energy Today (kWh) */} -
- - -
+ {(() => { + const energySensors = haSensorEntities.filter(s => + s.unit_of_measurement === 'kWh' || s.unit_of_measurement === 'Wh' || s.unit_of_measurement === 'MWh' + ); + const filteredEnergySensors = energyTodaySearch + ? energySensors.filter(s => + s.entity_id.toLowerCase().includes(energyTodaySearch.toLowerCase()) || + s.friendly_name.toLowerCase().includes(energyTodaySearch.toLowerCase()) + ) + : energySensors; + const selectedSensor = haSensorEntities.find(s => s.entity_id === haEnergyTodayEntity); + + return ( +
+ +
+ + { + setEnergyTodaySearch(e.target.value); + if (!isEnergyTodayDropdownOpen) setIsEnergyTodayDropdownOpen(true); + }} + onFocus={() => { + setIsEnergyTodayDropdownOpen(true); + setEnergyTodaySearch(''); + }} + placeholder="Search energy sensors..." + className="w-full pl-9 pr-8 py-2 bg-bambu-dark border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:border-bambu-green focus:outline-none" + /> + {haEnergyTodayEntity && !isEnergyTodayDropdownOpen && ( + + )} +
+ {isEnergyTodayDropdownOpen && ( +
+ + {filteredEnergySensors.map((sensor) => ( + + ))} + {filteredEnergySensors.length === 0 && ( +
No matching sensors
+ )} +
+ )} +
+ ); + })()} {/* Total Energy (kWh) */} -
- - -
+ {(() => { + const energySensors = haSensorEntities.filter(s => + s.unit_of_measurement === 'kWh' || s.unit_of_measurement === 'Wh' || s.unit_of_measurement === 'MWh' + ); + const filteredEnergySensors = energyTotalSearch + ? energySensors.filter(s => + s.entity_id.toLowerCase().includes(energyTotalSearch.toLowerCase()) || + s.friendly_name.toLowerCase().includes(energyTotalSearch.toLowerCase()) + ) + : energySensors; + const selectedSensor = haSensorEntities.find(s => s.entity_id === haEnergyTotalEntity); + + return ( +
+ +
+ + { + setEnergyTotalSearch(e.target.value); + if (!isEnergyTotalDropdownOpen) setIsEnergyTotalDropdownOpen(true); + }} + onFocus={() => { + setIsEnergyTotalDropdownOpen(true); + setEnergyTotalSearch(''); + }} + placeholder="Search energy sensors..." + className="w-full pl-9 pr-8 py-2 bg-bambu-dark border border-bambu-dark-tertiary rounded-lg text-white placeholder-bambu-gray focus:border-bambu-green focus:outline-none" + /> + {haEnergyTotalEntity && !isEnergyTotalDropdownOpen && ( + + )} +
+ {isEnergyTotalDropdownOpen && ( +
+ + {filteredEnergySensors.map((sensor) => ( + + ))} + {filteredEnergySensors.length === 0 && ( +
No matching sensors
+ )} +
+ )} +
+ ); + })()}
)} diff --git a/static/assets/index-DbTLv2ta.js b/static/assets/index-XGGhfA3J.js similarity index 53% rename from static/assets/index-DbTLv2ta.js rename to static/assets/index-XGGhfA3J.js index bf0854e6f..f8c39f9fb 100644 --- a/static/assets/index-DbTLv2ta.js +++ b/static/assets/index-XGGhfA3J.js @@ -1,20 +1,20 @@ -function wae(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Gv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ko(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gA={exports:{}},zx={};var mU;function Sae(){if(mU)return zx;mU=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,a){var o=null;if(a!==void 0&&(o=""+a),i.key!==void 0&&(o=""+i.key),"key"in i){a={};for(var l in i)l!=="key"&&(a[l]=i[l])}else a=i;return i=a.ref,{$$typeof:t,type:r,key:o,ref:i!==void 0?i:null,props:a}}return zx.Fragment=e,zx.jsx=n,zx.jsxs=n,zx}var pU;function Mae(){return pU||(pU=1,gA.exports=Sae()),gA.exports}var s=Mae(),xA={exports:{}},ln={};var gU;function Nae(){if(gU)return ln;gU=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),m=Symbol.iterator;function g(B){return B===null||typeof B!="object"?null:(B=m&&B[m]||B["@@iterator"],typeof B=="function"?B:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,b={};function v(B,G,ee){this.props=B,this.context=G,this.refs=b,this.updater=ee||x}v.prototype.isReactComponent={},v.prototype.setState=function(B,G){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,G,"setState")},v.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function M(){}M.prototype=v.prototype;function S(B,G,ee){this.props=B,this.context=G,this.refs=b,this.updater=ee||x}var A=S.prototype=new M;A.constructor=S,y(A,v.prototype),A.isPureReactComponent=!0;var E=Array.isArray;function k(){}var C={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function T(B,G,ee){var ne=ee.ref;return{$$typeof:t,type:B,key:G,ref:ne!==void 0?ne:null,props:ee}}function P(B,G){return T(B.type,G,B.props)}function F(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function I(B){var G={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(ee){return G[ee]})}var X=/\/+/g;function D(B,G){return typeof B=="object"&&B!==null&&B.key!=null?I(""+B.key):G.toString(36)}function K(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(k,k):(B.status="pending",B.then(function(G){B.status==="pending"&&(B.status="fulfilled",B.value=G)},function(G){B.status==="pending"&&(B.status="rejected",B.reason=G)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function Y(B,G,ee,ne,ae){var de=typeof B;(de==="undefined"||de==="boolean")&&(B=null);var he=!1;if(B===null)he=!0;else switch(de){case"bigint":case"string":case"number":he=!0;break;case"object":switch(B.$$typeof){case t:case e:he=!0;break;case d:return he=B._init,Y(he(B._payload),G,ee,ne,ae)}}if(he)return ae=ae(B),he=ne===""?"."+D(B,0):ne,E(ae)?(ee="",he!=null&&(ee=he.replace(X,"$&/")+"/"),Y(ae,G,ee,"",function(Ne){return Ne})):ae!=null&&(F(ae)&&(ae=P(ae,ee+(ae.key==null||B&&B.key===ae.key?"":(""+ae.key).replace(X,"$&/")+"/")+he)),G.push(ae)),1;he=0;var Te=ne===""?".":ne+":";if(E(B))for(var ge=0;ge>>1,se=Y[re];if(0>>1;rei(ee,Z))nei(ae,ee)?(Y[re]=ae,Y[ne]=Z,re=ne):(Y[re]=ee,Y[G]=Z,re=G);else if(nei(ae,Z))Y[re]=ae,Y[ne]=Z,re=ne;else break e}}return q}function i(Y,q){var Z=Y.sortIndex-q.sortIndex;return Z!==0?Z:Y.id-q.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,f=null,m=3,g=!1,x=!1,y=!1,b=!1,v=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function A(Y){for(var q=n(u);q!==null;){if(q.callback===null)r(u);else if(q.startTime<=Y)r(u),q.sortIndex=q.expirationTime,e(c,q);else break;q=n(u)}}function E(Y){if(y=!1,A(Y),!x)if(n(c)!==null)x=!0,k||(k=!0,I());else{var q=n(u);q!==null&&K(E,q.startTime-Y)}}var k=!1,C=-1,R=5,T=-1;function P(){return b?!0:!(t.unstable_now()-TY&&P());){var re=f.callback;if(typeof re=="function"){f.callback=null,m=f.priorityLevel;var se=re(f.expirationTime<=Y);if(Y=t.unstable_now(),typeof se=="function"){f.callback=se,A(Y),q=!0;break t}f===n(c)&&r(c),A(Y)}else r(c);f=n(c)}if(f!==null)q=!0;else{var B=n(u);B!==null&&K(E,B.startTime-Y),q=!1}}break e}finally{f=null,m=Z,g=!1}q=void 0}}finally{q?I():k=!1}}}var I;if(typeof S=="function")I=function(){S(F)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,D=X.port2;X.port1.onmessage=F,I=function(){D.postMessage(null)}}else I=function(){v(F,0)};function K(Y,q){C=v(function(){Y(t.unstable_now())},q)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Y){Y.callback=null},t.unstable_forceFrameRate=function(Y){0>Y||125re?(Y.sortIndex=Z,e(u,Y),n(c)===null&&Y===n(u)&&(y?(M(C),C=-1):y=!0,K(E,Z-re))):(Y.sortIndex=se,e(c,Y),x||g||(x=!0,k||(k=!0,I()))),Y},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(Y){var q=m;return function(){var Z=m;m=q;try{return Y.apply(this,arguments)}finally{m=Z}}}})(vA)),vA}var yU;function Tae(){return yU||(yU=1,yA.exports=Aae()),yA.exports}var _A={exports:{}},ya={};var vU;function Cae(){if(vU)return ya;vU=1;var t=Ag();function e(c){var u="https://react.dev/errors/"+c;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),_A.exports=Cae(),_A.exports}var wU;function kae(){if(wU)return Bx;wU=1;var t=Tae(),e=Ag(),n=QG();function r(h){var p="https://react.dev/errors/"+h;if(1se||(h.current=re[se],re[se]=null,se--)}function ee(h,p){se++,re[se]=h.current,h.current=p}var ne=B(null),ae=B(null),de=B(null),he=B(null);function Te(h,p){switch(ee(de,p),ee(ae,h),ee(ne,null),p.nodeType){case 9:case 11:h=(h=p.documentElement)&&(h=h.namespaceURI)?IF(h):0;break;default:if(h=p.tagName,p=p.namespaceURI)p=IF(p),h=FF(p,h);else switch(h){case"svg":h=1;break;case"math":h=2;break;default:h=0}}G(ne),ee(ne,h)}function ge(){G(ne),G(ae),G(de)}function Ne(h){h.memoizedState!==null&&ee(he,h);var p=ne.current,_=FF(p,h.type);p!==_&&(ee(ae,h),ee(ne,_))}function Re(h){ae.current===h&&(G(ne),G(ae)),he.current===h&&(G(he),Lx._currentValue=Z)}var te,Ye;function $(h){if(te===void 0)try{throw Error()}catch(_){var p=_.stack.trim().match(/\n( *(at )?)/);te=p&&p[1]||"",Ye=-1<_.stack.indexOf(` +function wae(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Gv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ko(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gA={exports:{}},zx={};var mU;function Sae(){if(mU)return zx;mU=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,a){var o=null;if(a!==void 0&&(o=""+a),i.key!==void 0&&(o=""+i.key),"key"in i){a={};for(var l in i)l!=="key"&&(a[l]=i[l])}else a=i;return i=a.ref,{$$typeof:t,type:r,key:o,ref:i!==void 0?i:null,props:a}}return zx.Fragment=e,zx.jsx=n,zx.jsxs=n,zx}var pU;function Mae(){return pU||(pU=1,gA.exports=Sae()),gA.exports}var s=Mae(),xA={exports:{}},hn={};var gU;function Nae(){if(gU)return hn;gU=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),m=Symbol.iterator;function g(B){return B===null||typeof B!="object"?null:(B=m&&B[m]||B["@@iterator"],typeof B=="function"?B:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,b={};function v(B,G,J){this.props=B,this.context=G,this.refs=b,this.updater=J||x}v.prototype.isReactComponent={},v.prototype.setState=function(B,G){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,G,"setState")},v.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function M(){}M.prototype=v.prototype;function S(B,G,J){this.props=B,this.context=G,this.refs=b,this.updater=J||x}var A=S.prototype=new M;A.constructor=S,y(A,v.prototype),A.isPureReactComponent=!0;var E=Array.isArray;function k(){}var C={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function T(B,G,J){var te=J.ref;return{$$typeof:t,type:B,key:G,ref:te!==void 0?te:null,props:J}}function P(B,G){return T(B.type,G,B.props)}function F(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function I(B){var G={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(J){return G[J]})}var X=/\/+/g;function R(B,G){return typeof B=="object"&&B!==null&&B.key!=null?I(""+B.key):G.toString(36)}function K(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(k,k):(B.status="pending",B.then(function(G){B.status==="pending"&&(B.status="fulfilled",B.value=G)},function(G){B.status==="pending"&&(B.status="rejected",B.reason=G)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function Y(B,G,J,te,ae){var de=typeof B;(de==="undefined"||de==="boolean")&&(B=null);var fe=!1;if(B===null)fe=!0;else switch(de){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(B.$$typeof){case t:case e:fe=!0;break;case d:return fe=B._init,Y(fe(B._payload),G,J,te,ae)}}if(fe)return ae=ae(B),fe=te===""?"."+R(B,0):te,E(ae)?(J="",fe!=null&&(J=fe.replace(X,"$&/")+"/"),Y(ae,G,J,"",function(Me){return Me})):ae!=null&&(F(ae)&&(ae=P(ae,J+(ae.key==null||B&&B.key===ae.key?"":(""+ae.key).replace(X,"$&/")+"/")+fe)),G.push(ae)),1;fe=0;var Ae=te===""?".":te+":";if(E(B))for(var xe=0;xe>>1,oe=Y[re];if(0>>1;rei(J,Z))tei(ae,J)?(Y[re]=ae,Y[te]=Z,re=te):(Y[re]=J,Y[G]=Z,re=G);else if(tei(ae,Z))Y[re]=ae,Y[te]=Z,re=te;else break e}}return q}function i(Y,q){var Z=Y.sortIndex-q.sortIndex;return Z!==0?Z:Y.id-q.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,f=null,m=3,g=!1,x=!1,y=!1,b=!1,v=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function A(Y){for(var q=n(u);q!==null;){if(q.callback===null)r(u);else if(q.startTime<=Y)r(u),q.sortIndex=q.expirationTime,e(c,q);else break;q=n(u)}}function E(Y){if(y=!1,A(Y),!x)if(n(c)!==null)x=!0,k||(k=!0,I());else{var q=n(u);q!==null&&K(E,q.startTime-Y)}}var k=!1,C=-1,D=5,T=-1;function P(){return b?!0:!(t.unstable_now()-TY&&P());){var re=f.callback;if(typeof re=="function"){f.callback=null,m=f.priorityLevel;var oe=re(f.expirationTime<=Y);if(Y=t.unstable_now(),typeof oe=="function"){f.callback=oe,A(Y),q=!0;break t}f===n(c)&&r(c),A(Y)}else r(c);f=n(c)}if(f!==null)q=!0;else{var B=n(u);B!==null&&K(E,B.startTime-Y),q=!1}}break e}finally{f=null,m=Z,g=!1}q=void 0}}finally{q?I():k=!1}}}var I;if(typeof S=="function")I=function(){S(F)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,R=X.port2;X.port1.onmessage=F,I=function(){R.postMessage(null)}}else I=function(){v(F,0)};function K(Y,q){C=v(function(){Y(t.unstable_now())},q)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Y){Y.callback=null},t.unstable_forceFrameRate=function(Y){0>Y||125re?(Y.sortIndex=Z,e(u,Y),n(c)===null&&Y===n(u)&&(y?(M(C),C=-1):y=!0,K(E,Z-re))):(Y.sortIndex=oe,e(c,Y),x||g||(x=!0,k||(k=!0,I()))),Y},t.unstable_shouldYield=P,t.unstable_wrapCallback=function(Y){var q=m;return function(){var Z=m;m=q;try{return Y.apply(this,arguments)}finally{m=Z}}}})(vA)),vA}var yU;function Tae(){return yU||(yU=1,yA.exports=Aae()),yA.exports}var _A={exports:{}},va={};var vU;function Cae(){if(vU)return va;vU=1;var t=Ag();function e(c){var u="https://react.dev/errors/"+c;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),_A.exports=Cae(),_A.exports}var wU;function kae(){if(wU)return Bx;wU=1;var t=Tae(),e=Ag(),n=QG();function r(h){var p="https://react.dev/errors/"+h;if(1oe||(h.current=re[oe],re[oe]=null,oe--)}function J(h,p){oe++,re[oe]=h.current,h.current=p}var te=B(null),ae=B(null),de=B(null),fe=B(null);function Ae(h,p){switch(J(de,p),J(ae,h),J(te,null),p.nodeType){case 9:case 11:h=(h=p.documentElement)&&(h=h.namespaceURI)?IF(h):0;break;default:if(h=p.tagName,p=p.namespaceURI)p=IF(p),h=FF(p,h);else switch(h){case"svg":h=1;break;case"math":h=2;break;default:h=0}}G(te),J(te,h)}function xe(){G(te),G(ae),G(de)}function Me(h){h.memoizedState!==null&&J(fe,h);var p=te.current,_=FF(p,h.type);p!==_&&(J(ae,h),J(te,_))}function ke(h){ae.current===h&&(G(te),G(ae)),fe.current===h&&(G(fe),Lx._currentValue=Z)}var ne,We;function $(h){if(ne===void 0)try{throw Error()}catch(_){var p=_.stack.trim().match(/\n( *(at )?)/);ne=p&&p[1]||"",We=-1<_.stack.indexOf(` at`)?" ()":-1<_.stack.indexOf("@")?"@unknown:0:0":""}return` -`+te+h+Ye}var z=!1;function W(h,p){if(!h||z)return"";z=!0;var _=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var N={DetermineComponentFrameRoot:function(){try{if(p){var xt=function(){throw Error()};if(Object.defineProperty(xt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xt,[])}catch(ot){var it=ot}Reflect.construct(h,[],xt)}else{try{xt.call()}catch(ot){it=ot}h.call(xt.prototype)}}else{try{throw Error()}catch(ot){it=ot}(xt=h())&&typeof xt.catch=="function"&&xt.catch(function(){})}}catch(ot){if(ot&&it&&typeof ot.stack=="string")return[ot.stack,it.stack]}return[null,null]}};N.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var j=Object.getOwnPropertyDescriptor(N.DetermineComponentFrameRoot,"name");j&&j.configurable&&Object.defineProperty(N.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var L=N.DetermineComponentFrameRoot(),J=L[0],fe=L[1];if(J&&fe){var je=J.split(` -`),tt=fe.split(` -`);for(j=N=0;Nj||je[N]!==tt[j]){var mt=` -`+je[N].replace(" at new "," at ");return h.displayName&&mt.includes("")&&(mt=mt.replace("",h.displayName)),mt}while(1<=N&&0<=j);break}}}finally{z=!1,Error.prepareStackTrace=_}return(_=h?h.displayName||h.name:"")?$(_):""}function U(h,p){switch(h.tag){case 26:case 27:case 5:return $(h.type);case 16:return $("Lazy");case 13:return h.child!==p&&p!==null?$("Suspense Fallback"):$("Suspense");case 19:return $("SuspenseList");case 0:case 15:return W(h.type,!1);case 11:return W(h.type.render,!1);case 1:return W(h.type,!0);case 31:return $("Activity");default:return""}}function V(h){try{var p="",_=null;do p+=U(h,_),_=h,h=h.return;while(h);return p}catch(N){return` +`+ne+h+We}var z=!1;function W(h,p){if(!h||z)return"";z=!0;var _=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var N={DetermineComponentFrameRoot:function(){try{if(p){var bt=function(){throw Error()};if(Object.defineProperty(bt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(bt,[])}catch(lt){var it=lt}Reflect.construct(h,[],bt)}else{try{bt.call()}catch(lt){it=lt}h.call(bt.prototype)}}else{try{throw Error()}catch(lt){it=lt}(bt=h())&&typeof bt.catch=="function"&&bt.catch(function(){})}}catch(lt){if(lt&&it&&typeof lt.stack=="string")return[lt.stack,it.stack]}return[null,null]}};N.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var j=Object.getOwnPropertyDescriptor(N.DetermineComponentFrameRoot,"name");j&&j.configurable&&Object.defineProperty(N.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var L=N.DetermineComponentFrameRoot(),ee=L[0],me=L[1];if(ee&&me){var je=ee.split(` +`),tt=me.split(` +`);for(j=N=0;Nj||je[N]!==tt[j]){var gt=` +`+je[N].replace(" at new "," at ");return h.displayName&>.includes("")&&(gt=gt.replace("",h.displayName)),gt}while(1<=N&&0<=j);break}}}finally{z=!1,Error.prepareStackTrace=_}return(_=h?h.displayName||h.name:"")?$(_):""}function U(h,p){switch(h.tag){case 26:case 27:case 5:return $(h.type);case 16:return $("Lazy");case 13:return h.child!==p&&p!==null?$("Suspense Fallback"):$("Suspense");case 19:return $("SuspenseList");case 0:case 15:return W(h.type,!1);case 11:return W(h.type.render,!1);case 1:return W(h.type,!0);case 31:return $("Activity");default:return""}}function V(h){try{var p="",_=null;do p+=U(h,_),_=h,h=h.return;while(h);return p}catch(N){return` Error generating stack: `+N.message+` -`+N.stack}}var Q=Object.prototype.hasOwnProperty,Ae=t.unstable_scheduleCallback,ke=t.unstable_cancelCallback,Ee=t.unstable_shouldYield,H=t.unstable_requestPaint,O=t.unstable_now,ie=t.unstable_getCurrentPriorityLevel,le=t.unstable_ImmediatePriority,xe=t.unstable_UserBlockingPriority,ye=t.unstable_NormalPriority,_e=t.unstable_LowPriority,Ie=t.unstable_IdlePriority,We=t.log,ht=t.unstable_setDisableYieldValue,qe=null,me=null;function rt(h){if(typeof We=="function"&&ht(h),me&&typeof me.setStrictMode=="function")try{me.setStrictMode(qe,h)}catch{}}var Xe=Math.clz32?Math.clz32:oe,nt=Math.log,ut=Math.LN2;function oe(h){return h>>>=0,h===0?32:31-(nt(h)/ut|0)|0}var $e=256,ve=262144,Be=4194304;function De(h){var p=h&42;if(p!==0)return p;switch(h&-h){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return h&261888;case 262144:case 524288:case 1048576:case 2097152:return h&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return h&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return h}}function we(h,p,_){var N=h.pendingLanes;if(N===0)return 0;var j=0,L=h.suspendedLanes,J=h.pingedLanes;h=h.warmLanes;var fe=N&134217727;return fe!==0?(N=fe&~L,N!==0?j=De(N):(J&=fe,J!==0?j=De(J):_||(_=fe&~h,_!==0&&(j=De(_))))):(fe=N&~L,fe!==0?j=De(fe):J!==0?j=De(J):_||(_=N&~h,_!==0&&(j=De(_)))),j===0?0:p!==0&&p!==j&&(p&L)===0&&(L=j&-j,_=p&-p,L>=_||L===32&&(_&4194048)!==0)?p:j}function Ve(h,p){return(h.pendingLanes&~(h.suspendedLanes&~h.pingedLanes)&p)===0}function dt(h,p){switch(h){case 1:case 2:case 4:case 8:case 64:return p+250;case 16:case 32: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 p+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Tt(){var h=Be;return Be<<=1,(Be&62914560)===0&&(Be=4194304),h}function Ct(h){for(var p=[],_=0;31>_;_++)p.push(h);return p}function Xt(h,p){h.pendingLanes|=p,p!==268435456&&(h.suspendedLanes=0,h.pingedLanes=0,h.warmLanes=0)}function Pt(h,p,_,N,j,L){var J=h.pendingLanes;h.pendingLanes=_,h.suspendedLanes=0,h.pingedLanes=0,h.warmLanes=0,h.expiredLanes&=_,h.entangledLanes&=_,h.errorRecoveryDisabledLanes&=_,h.shellSuspendCounter=0;var fe=h.entanglements,je=h.expirationTimes,tt=h.hiddenUpdates;for(_=J&~_;0<_;){var mt=31-Xe(_),xt=1<"u")return null;try{return h.activeElement||h.body}catch{return h.body}}var ti=/[\n"\\]/g;function Gn(h){return h.replace(ti,function(p){return"\\"+p.charCodeAt(0).toString(16)+" "})}function Ro(h,p,_,N,j,L,J,fe){h.name="",J!=null&&typeof J!="function"&&typeof J!="symbol"&&typeof J!="boolean"?h.type=J:h.removeAttribute("type"),p!=null?J==="number"?(p===0&&h.value===""||h.value!=p)&&(h.value=""+sn(p)):h.value!==""+sn(p)&&(h.value=""+sn(p)):J!=="submit"&&J!=="reset"||h.removeAttribute("value"),p!=null?Ii(h,J,sn(p)):_!=null?Ii(h,J,sn(_)):N!=null&&h.removeAttribute("value"),j==null&&L!=null&&(h.defaultChecked=!!L),j!=null&&(h.checked=j&&typeof j!="function"&&typeof j!="symbol"),fe!=null&&typeof fe!="function"&&typeof fe!="symbol"&&typeof fe!="boolean"?h.name=""+sn(fe):h.removeAttribute("name")}function Xn(h,p,_,N,j,L,J,fe){if(L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"&&(h.type=L),p!=null||_!=null){if(!(L!=="submit"&&L!=="reset"||p!=null)){on(h);return}_=_!=null?""+sn(_):"",p=p!=null?""+sn(p):_,fe||p===h.value||(h.value=p),h.defaultValue=p}N=N??j,N=typeof N!="function"&&typeof N!="symbol"&&!!N,h.checked=fe?h.checked:!!N,h.defaultChecked=!!N,J!=null&&typeof J!="function"&&typeof J!="symbol"&&typeof J!="boolean"&&(h.name=J),on(h)}function Ii(h,p,_){p==="number"&&Hr(h.ownerDocument)===h||h.defaultValue===""+_||(h.defaultValue=""+_)}function wi(h,p,_,N){if(h=h.options,p){p={};for(var j=0;j<_.length;j++)p["$"+_[j]]=!0;for(_=0;_"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gN=!1;if(Zl)try{var ex={};Object.defineProperty(ex,"passive",{get:function(){gN=!0}}),window.addEventListener("test",ex,ex),window.removeEventListener("test",ex,ex)}catch{gN=!1}var gu=null,xN=null,Iy=null;function FL(){if(Iy)return Iy;var h,p=xN,_=p.length,N,j="value"in gu?gu.value:gu.textContent,L=j.length;for(h=0;h<_&&p[h]===j[h];h++);var J=_-h;for(N=1;N<=J&&p[_-N]===j[L-N];N++);return Iy=j.slice(h,1=rx),VL=" ",GL=!1;function WL(h,p){switch(h){case"keyup":return Vre.indexOf(p.keyCode)!==-1;case"keydown":return p.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qL(h){return h=h.detail,typeof h=="object"&&"data"in h?h.data:null}var Jf=!1;function Wre(h,p){switch(h){case"compositionend":return qL(p);case"keypress":return p.which!==32?null:(GL=!0,VL);case"textInput":return h=p.data,h===VL&&GL?null:h;default:return null}}function qre(h,p){if(Jf)return h==="compositionend"||!wN&&WL(h,p)?(h=FL(),Iy=xN=gu=null,Jf=!1,h):null;switch(h){case"paste":return null;case"keypress":if(!(p.ctrlKey||p.altKey||p.metaKey)||p.ctrlKey&&p.altKey){if(p.char&&1=p)return{node:_,offset:p-h};h=N}e:{for(;_;){if(_.nextSibling){_=_.nextSibling;break e}_=_.parentNode}_=void 0}_=tI(_)}}function rI(h,p){return h&&p?h===p?!0:h&&h.nodeType===3?!1:p&&p.nodeType===3?rI(h,p.parentNode):"contains"in h?h.contains(p):h.compareDocumentPosition?!!(h.compareDocumentPosition(p)&16):!1:!1}function iI(h){h=h!=null&&h.ownerDocument!=null&&h.ownerDocument.defaultView!=null?h.ownerDocument.defaultView:window;for(var p=Hr(h.document);p instanceof h.HTMLIFrameElement;){try{var _=typeof p.contentWindow.location.href=="string"}catch{_=!1}if(_)h=p.contentWindow;else break;p=Hr(h.document)}return p}function NN(h){var p=h&&h.nodeName&&h.nodeName.toLowerCase();return p&&(p==="input"&&(h.type==="text"||h.type==="search"||h.type==="tel"||h.type==="url"||h.type==="password")||p==="textarea"||h.contentEditable==="true")}var tie=Zl&&"documentMode"in document&&11>=document.documentMode,em=null,EN=null,ox=null,AN=!1;function aI(h,p,_){var N=_.window===_?_.document:_.nodeType===9?_:_.ownerDocument;AN||em==null||em!==Hr(N)||(N=em,"selectionStart"in N&&NN(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}),ox&&sx(ox,N)||(ox=N,N=kv(EN,"onSelect"),0>=J,j-=J,dl=1<<32-Xe(p)+j|_<dn?(Cn=Bt,Bt=null):Cn=Bt.sibling;var Ln=it(Ge,Bt,et[dn],gt);if(Ln===null){Bt===null&&(Bt=Cn);break}h&&Bt&&Ln.alternate===null&&p(Ge,Bt),Fe=L(Ln,Fe,dn),On===null?Vt=Ln:On.sibling=Ln,On=Ln,Bt=Cn}if(dn===et.length)return _(Ge,Bt),jn&&ec(Ge,dn),Vt;if(Bt===null){for(;dndn?(Cn=Bt,Bt=null):Cn=Bt.sibling;var Fu=it(Ge,Bt,Ln.value,gt);if(Fu===null){Bt===null&&(Bt=Cn);break}h&&Bt&&Fu.alternate===null&&p(Ge,Bt),Fe=L(Fu,Fe,dn),On===null?Vt=Fu:On.sibling=Fu,On=Fu,Bt=Cn}if(Ln.done)return _(Ge,Bt),jn&&ec(Ge,dn),Vt;if(Bt===null){for(;!Ln.done;dn++,Ln=et.next())Ln=xt(Ge,Ln.value,gt),Ln!==null&&(Fe=L(Ln,Fe,dn),On===null?Vt=Ln:On.sibling=Ln,On=Ln);return jn&&ec(Ge,dn),Vt}for(Bt=N(Bt);!Ln.done;dn++,Ln=et.next())Ln=ot(Bt,Ge,dn,Ln.value,gt),Ln!==null&&(h&&Ln.alternate!==null&&Bt.delete(Ln.key===null?dn:Ln.key),Fe=L(Ln,Fe,dn),On===null?Vt=Ln:On.sibling=Ln,On=Ln);return h&&Bt.forEach(function(_ae){return p(Ge,_ae)}),jn&&ec(Ge,dn),Vt}function ir(Ge,Fe,et,gt){if(typeof et=="object"&&et!==null&&et.type===y&&et.key===null&&(et=et.props.children),typeof et=="object"&&et!==null){switch(et.$$typeof){case g:e:{for(var Vt=et.key;Fe!==null;){if(Fe.key===Vt){if(Vt=et.type,Vt===y){if(Fe.tag===7){_(Ge,Fe.sibling),gt=j(Fe,et.props.children),gt.return=Ge,Ge=gt;break e}}else if(Fe.elementType===Vt||typeof Vt=="object"&&Vt!==null&&Vt.$$typeof===R&&fh(Vt)===Fe.type){_(Ge,Fe.sibling),gt=j(Fe,et.props),fx(gt,et),gt.return=Ge,Ge=gt;break e}_(Ge,Fe);break}else p(Ge,Fe);Fe=Fe.sibling}et.type===y?(gt=lh(et.props.children,Ge.mode,gt,et.key),gt.return=Ge,Ge=gt):(gt=qy(et.type,et.key,et.props,null,Ge.mode,gt),fx(gt,et),gt.return=Ge,Ge=gt)}return J(Ge);case x:e:{for(Vt=et.key;Fe!==null;){if(Fe.key===Vt)if(Fe.tag===4&&Fe.stateNode.containerInfo===et.containerInfo&&Fe.stateNode.implementation===et.implementation){_(Ge,Fe.sibling),gt=j(Fe,et.children||[]),gt.return=Ge,Ge=gt;break e}else{_(Ge,Fe);break}else p(Ge,Fe);Fe=Fe.sibling}gt=DN(et,Ge.mode,gt),gt.return=Ge,Ge=gt}return J(Ge);case R:return et=fh(et),ir(Ge,Fe,et,gt)}if(K(et))return Ft(Ge,Fe,et,gt);if(I(et)){if(Vt=I(et),typeof Vt!="function")throw Error(r(150));return et=Vt.call(et),Kt(Ge,Fe,et,gt)}if(typeof et.then=="function")return ir(Ge,Fe,ev(et),gt);if(et.$$typeof===S)return ir(Ge,Fe,Yy(Ge,et),gt);tv(Ge,et)}return typeof et=="string"&&et!==""||typeof et=="number"||typeof et=="bigint"?(et=""+et,Fe!==null&&Fe.tag===6?(_(Ge,Fe.sibling),gt=j(Fe,et),gt.return=Ge,Ge=gt):(_(Ge,Fe),gt=RN(et,Ge.mode,gt),gt.return=Ge,Ge=gt),J(Ge)):_(Ge,Fe)}return function(Ge,Fe,et,gt){try{hx=0;var Vt=ir(Ge,Fe,et,gt);return dm=null,Vt}catch(Bt){if(Bt===um||Bt===Zy)throw Bt;var On=_s(29,Bt,null,Ge.mode);return On.lanes=gt,On.return=Ge,On}finally{}}}var ph=TI(!0),CI=TI(!1),_u=!1;function WN(h){h.updateQueue={baseState:h.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qN(h,p){h=h.updateQueue,p.updateQueue===h&&(p.updateQueue={baseState:h.baseState,firstBaseUpdate:h.firstBaseUpdate,lastBaseUpdate:h.lastBaseUpdate,shared:h.shared,callbacks:null})}function wu(h){return{lane:h,tag:0,payload:null,callback:null,next:null}}function Su(h,p,_){var N=h.updateQueue;if(N===null)return null;if(N=N.shared,(Bn&2)!==0){var j=N.pending;return j===null?p.next=p:(p.next=j.next,j.next=p),N.pending=p,p=Wy(h),hI(h,null,_),p}return Gy(h,N,p,_),Wy(h)}function mx(h,p,_){if(p=p.updateQueue,p!==null&&(p=p.shared,(_&4194048)!==0)){var N=p.lanes;N&=h.pendingLanes,_|=N,p.lanes=_,bn(h,_)}}function KN(h,p){var _=h.updateQueue,N=h.alternate;if(N!==null&&(N=N.updateQueue,_===N)){var j=null,L=null;if(_=_.firstBaseUpdate,_!==null){do{var J={lane:_.lane,tag:_.tag,payload:_.payload,callback:null,next:null};L===null?j=L=J:L=L.next=J,_=_.next}while(_!==null);L===null?j=L=p:L=L.next=p}else j=L=p;_={baseState:N.baseState,firstBaseUpdate:j,lastBaseUpdate:L,shared:N.shared,callbacks:N.callbacks},h.updateQueue=_;return}h=_.lastBaseUpdate,h===null?_.firstBaseUpdate=p:h.next=p,_.lastBaseUpdate=p}var XN=!1;function px(){if(XN){var h=cm;if(h!==null)throw h}}function gx(h,p,_,N){XN=!1;var j=h.updateQueue;_u=!1;var L=j.firstBaseUpdate,J=j.lastBaseUpdate,fe=j.shared.pending;if(fe!==null){j.shared.pending=null;var je=fe,tt=je.next;je.next=null,J===null?L=tt:J.next=tt,J=je;var mt=h.alternate;mt!==null&&(mt=mt.updateQueue,fe=mt.lastBaseUpdate,fe!==J&&(fe===null?mt.firstBaseUpdate=tt:fe.next=tt,mt.lastBaseUpdate=je))}if(L!==null){var xt=j.baseState;J=0,mt=tt=je=null,fe=L;do{var it=fe.lane&-536870913,ot=it!==fe.lane;if(ot?(Tn&it)===it:(N&it)===it){it!==0&&it===lm&&(XN=!0),mt!==null&&(mt=mt.next={lane:0,tag:fe.tag,payload:fe.payload,callback:null,next:null});e:{var Ft=h,Kt=fe;it=p;var ir=_;switch(Kt.tag){case 1:if(Ft=Kt.payload,typeof Ft=="function"){xt=Ft.call(ir,xt,it);break e}xt=Ft;break e;case 3:Ft.flags=Ft.flags&-65537|128;case 0:if(Ft=Kt.payload,it=typeof Ft=="function"?Ft.call(ir,xt,it):Ft,it==null)break e;xt=f({},xt,it);break e;case 2:_u=!0}}it=fe.callback,it!==null&&(h.flags|=64,ot&&(h.flags|=8192),ot=j.callbacks,ot===null?j.callbacks=[it]:ot.push(it))}else ot={lane:it,tag:fe.tag,payload:fe.payload,callback:fe.callback,next:null},mt===null?(tt=mt=ot,je=xt):mt=mt.next=ot,J|=it;if(fe=fe.next,fe===null){if(fe=j.shared.pending,fe===null)break;ot=fe,fe=ot.next,ot.next=null,j.lastBaseUpdate=ot,j.shared.pending=null}}while(!0);mt===null&&(je=xt),j.baseState=je,j.firstBaseUpdate=tt,j.lastBaseUpdate=mt,L===null&&(j.shared.lanes=0),Tu|=J,h.lanes=J,h.memoizedState=xt}}function kI(h,p){if(typeof h!="function")throw Error(r(191,h));h.call(p)}function jI(h,p){var _=h.callbacks;if(_!==null)for(h.callbacks=null,h=0;h<_.length;h++)kI(_[h],p)}var hm=B(null),nv=B(0);function PI(h,p){h=dc,ee(nv,h),ee(hm,p),dc=h|p.baseLanes}function YN(){ee(nv,dc),ee(hm,hm.current)}function QN(){dc=nv.current,G(hm),G(nv)}var ws=B(null),eo=null;function Mu(h){var p=h.alternate;ee(ni,ni.current&1),ee(ws,h),eo===null&&(p===null||hm.current!==null||p.memoizedState!==null)&&(eo=h)}function ZN(h){ee(ni,ni.current),ee(ws,h),eo===null&&(eo=h)}function RI(h){h.tag===22?(ee(ni,ni.current),ee(ws,h),eo===null&&(eo=h)):Nu()}function Nu(){ee(ni,ni.current),ee(ws,ws.current)}function Ss(h){G(ws),eo===h&&(eo=null),G(ni)}var ni=B(0);function rv(h){for(var p=h;p!==null;){if(p.tag===13){var _=p.memoizedState;if(_!==null&&(_=_.dehydrated,_===null||iA(_)||aA(_)))return p}else if(p.tag===19&&(p.memoizedProps.revealOrder==="forwards"||p.memoizedProps.revealOrder==="backwards"||p.memoizedProps.revealOrder==="unstable_legacy-backwards"||p.memoizedProps.revealOrder==="together")){if((p.flags&128)!==0)return p}else if(p.child!==null){p.child.return=p,p=p.child;continue}if(p===h)break;for(;p.sibling===null;){if(p.return===null||p.return===h)return null;p=p.return}p.sibling.return=p.return,p=p.sibling}return null}var rc=0,un=null,nr=null,li=null,iv=!1,fm=!1,gh=!1,av=0,xx=0,mm=null,die=0;function Vr(){throw Error(r(321))}function JN(h,p){if(p===null)return!1;for(var _=0;_L?L:8;var J=Y.T,fe={};Y.T=fe,mE(h,!1,p,_);try{var je=j(),tt=Y.S;if(tt!==null&&tt(fe,je),je!==null&&typeof je=="object"&&typeof je.then=="function"){var mt=uie(je,N);yx(h,p,mt,Es(h))}else yx(h,p,N,Es(h))}catch(xt){yx(h,p,{then:function(){},status:"rejected",reason:xt},Es())}finally{q.p=L,J!==null&&fe.types!==null&&(J.types=fe.types),Y.T=J}}function gie(){}function hE(h,p,_,N){if(h.tag!==5)throw Error(r(476));var j=c5(h).queue;l5(h,j,p,Z,_===null?gie:function(){return u5(h),_(N)})}function c5(h){var p=h.memoizedState;if(p!==null)return p;p={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ic,lastRenderedState:Z},next:null};var _={};return p.next={memoizedState:_,baseState:_,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ic,lastRenderedState:_},next:null},h.memoizedState=p,h=h.alternate,h!==null&&(h.memoizedState=p),p}function u5(h){var p=c5(h);p.next===null&&(p=h.alternate.memoizedState),yx(h,p.next.queue,{},Es())}function fE(){return ia(Lx)}function d5(){return ri().memoizedState}function h5(){return ri().memoizedState}function xie(h){for(var p=h.return;p!==null;){switch(p.tag){case 24:case 3:var _=Es();h=wu(_);var N=Su(p,h,_);N!==null&&(ts(N,p,_),mx(N,p,_)),p={cache:$N()},h.payload=p;return}p=p.return}}function bie(h,p,_){var N=Es();_={lane:N,revertLane:0,gesture:null,action:_,hasEagerState:!1,eagerState:null,next:null},dv(h)?m5(p,_):(_=jN(h,p,_,N),_!==null&&(ts(_,h,N),p5(_,p,N)))}function f5(h,p,_){var N=Es();yx(h,p,_,N)}function yx(h,p,_,N){var j={lane:N,revertLane:0,gesture:null,action:_,hasEagerState:!1,eagerState:null,next:null};if(dv(h))m5(p,j);else{var L=h.alternate;if(h.lanes===0&&(L===null||L.lanes===0)&&(L=p.lastRenderedReducer,L!==null))try{var J=p.lastRenderedState,fe=L(J,_);if(j.hasEagerState=!0,j.eagerState=fe,vs(fe,J))return Gy(h,p,j,0),fr===null&&Vy(),!1}catch{}finally{}if(_=jN(h,p,j,N),_!==null)return ts(_,h,N),p5(_,p,N),!0}return!1}function mE(h,p,_,N){if(N={lane:2,revertLane:WE(),gesture:null,action:N,hasEagerState:!1,eagerState:null,next:null},dv(h)){if(p)throw Error(r(479))}else p=jN(h,_,N,2),p!==null&&ts(p,h,2)}function dv(h){var p=h.alternate;return h===un||p!==null&&p===un}function m5(h,p){fm=iv=!0;var _=h.pending;_===null?p.next=p:(p.next=_.next,_.next=p),h.pending=p}function p5(h,p,_){if((_&4194048)!==0){var N=p.lanes;N&=h.pendingLanes,_|=N,p.lanes=_,bn(h,_)}}var vx={readContext:ia,use:ov,useCallback:Vr,useContext:Vr,useEffect:Vr,useImperativeHandle:Vr,useLayoutEffect:Vr,useInsertionEffect:Vr,useMemo:Vr,useReducer:Vr,useRef:Vr,useState:Vr,useDebugValue:Vr,useDeferredValue:Vr,useTransition:Vr,useSyncExternalStore:Vr,useId:Vr,useHostTransitionStatus:Vr,useFormState:Vr,useActionState:Vr,useOptimistic:Vr,useMemoCache:Vr,useCacheRefresh:Vr};vx.useEffectEvent=Vr;var g5={readContext:ia,use:ov,useCallback:function(h,p){return Da().memoizedState=[h,p===void 0?null:p],h},useContext:ia,useEffect:JI,useImperativeHandle:function(h,p,_){_=_!=null?_.concat([h]):null,cv(4194308,4,r5.bind(null,p,h),_)},useLayoutEffect:function(h,p){return cv(4194308,4,h,p)},useInsertionEffect:function(h,p){cv(4,2,h,p)},useMemo:function(h,p){var _=Da();p=p===void 0?null:p;var N=h();if(gh){rt(!0);try{h()}finally{rt(!1)}}return _.memoizedState=[N,p],N},useReducer:function(h,p,_){var N=Da();if(_!==void 0){var j=_(p);if(gh){rt(!0);try{_(p)}finally{rt(!1)}}}else j=p;return N.memoizedState=N.baseState=j,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:j},N.queue=h,h=h.dispatch=bie.bind(null,un,h),[N.memoizedState,h]},useRef:function(h){var p=Da();return h={current:h},p.memoizedState=h},useState:function(h){h=oE(h);var p=h.queue,_=f5.bind(null,un,p);return p.dispatch=_,[h.memoizedState,_]},useDebugValue:uE,useDeferredValue:function(h,p){var _=Da();return dE(_,h,p)},useTransition:function(){var h=oE(!1);return h=l5.bind(null,un,h.queue,!0,!1),Da().memoizedState=h,[!1,h]},useSyncExternalStore:function(h,p,_){var N=un,j=Da();if(jn){if(_===void 0)throw Error(r(407));_=_()}else{if(_=p(),fr===null)throw Error(r(349));(Tn&127)!==0||II(N,p,_)}j.memoizedState=_;var L={value:_,getSnapshot:p};return j.queue=L,JI(UI.bind(null,N,L,h),[h]),N.flags|=2048,pm(9,{destroy:void 0},FI.bind(null,N,L,_,p),null),_},useId:function(){var h=Da(),p=fr.identifierPrefix;if(jn){var _=hl,N=dl;_=(N&~(1<<32-Xe(N)-1)).toString(32)+_,p="_"+p+"R_"+_,_=av++,0<_&&(p+="H"+_.toString(32)),p+="_"}else _=die++,p="_"+p+"r_"+_.toString(32)+"_";return h.memoizedState=p},useHostTransitionStatus:fE,useFormState:KI,useActionState:KI,useOptimistic:function(h){var p=Da();p.memoizedState=p.baseState=h;var _={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return p.queue=_,p=mE.bind(null,un,!0,_),_.dispatch=p,[h,p]},useMemoCache:iE,useCacheRefresh:function(){return Da().memoizedState=xie.bind(null,un)},useEffectEvent:function(h){var p=Da(),_={impl:h};return p.memoizedState=_,function(){if((Bn&2)!==0)throw Error(r(440));return _.impl.apply(void 0,arguments)}}},pE={readContext:ia,use:ov,useCallback:a5,useContext:ia,useEffect:cE,useImperativeHandle:i5,useInsertionEffect:t5,useLayoutEffect:n5,useMemo:s5,useReducer:lv,useRef:ZI,useState:function(){return lv(ic)},useDebugValue:uE,useDeferredValue:function(h,p){var _=ri();return o5(_,nr.memoizedState,h,p)},useTransition:function(){var h=lv(ic)[0],p=ri().memoizedState;return[typeof h=="boolean"?h:bx(h),p]},useSyncExternalStore:LI,useId:d5,useHostTransitionStatus:fE,useFormState:XI,useActionState:XI,useOptimistic:function(h,p){var _=ri();return $I(_,nr,h,p)},useMemoCache:iE,useCacheRefresh:h5};pE.useEffectEvent=e5;var x5={readContext:ia,use:ov,useCallback:a5,useContext:ia,useEffect:cE,useImperativeHandle:i5,useInsertionEffect:t5,useLayoutEffect:n5,useMemo:s5,useReducer:sE,useRef:ZI,useState:function(){return sE(ic)},useDebugValue:uE,useDeferredValue:function(h,p){var _=ri();return nr===null?dE(_,h,p):o5(_,nr.memoizedState,h,p)},useTransition:function(){var h=sE(ic)[0],p=ri().memoizedState;return[typeof h=="boolean"?h:bx(h),p]},useSyncExternalStore:LI,useId:d5,useHostTransitionStatus:fE,useFormState:QI,useActionState:QI,useOptimistic:function(h,p){var _=ri();return nr!==null?$I(_,nr,h,p):(_.baseState=h,[h,_.queue.dispatch])},useMemoCache:iE,useCacheRefresh:h5};x5.useEffectEvent=e5;function gE(h,p,_,N){p=h.memoizedState,_=_(N,p),_=_==null?p:f({},p,_),h.memoizedState=_,h.lanes===0&&(h.updateQueue.baseState=_)}var xE={enqueueSetState:function(h,p,_){h=h._reactInternals;var N=Es(),j=wu(N);j.payload=p,_!=null&&(j.callback=_),p=Su(h,j,N),p!==null&&(ts(p,h,N),mx(p,h,N))},enqueueReplaceState:function(h,p,_){h=h._reactInternals;var N=Es(),j=wu(N);j.tag=1,j.payload=p,_!=null&&(j.callback=_),p=Su(h,j,N),p!==null&&(ts(p,h,N),mx(p,h,N))},enqueueForceUpdate:function(h,p){h=h._reactInternals;var _=Es(),N=wu(_);N.tag=2,p!=null&&(N.callback=p),p=Su(h,N,_),p!==null&&(ts(p,h,_),mx(p,h,_))}};function b5(h,p,_,N,j,L,J){return h=h.stateNode,typeof h.shouldComponentUpdate=="function"?h.shouldComponentUpdate(N,L,J):p.prototype&&p.prototype.isPureReactComponent?!sx(_,N)||!sx(j,L):!0}function y5(h,p,_,N){h=p.state,typeof p.componentWillReceiveProps=="function"&&p.componentWillReceiveProps(_,N),typeof p.UNSAFE_componentWillReceiveProps=="function"&&p.UNSAFE_componentWillReceiveProps(_,N),p.state!==h&&xE.enqueueReplaceState(p,p.state,null)}function xh(h,p){var _=p;if("ref"in p){_={};for(var N in p)N!=="ref"&&(_[N]=p[N])}if(h=h.defaultProps){_===p&&(_=f({},_));for(var j in h)_[j]===void 0&&(_[j]=h[j])}return _}function v5(h){Hy(h)}function _5(h){console.error(h)}function w5(h){Hy(h)}function hv(h,p){try{var _=h.onUncaughtError;_(p.value,{componentStack:p.stack})}catch(N){setTimeout(function(){throw N})}}function S5(h,p,_){try{var N=h.onCaughtError;N(_.value,{componentStack:_.stack,errorBoundary:p.tag===1?p.stateNode:null})}catch(j){setTimeout(function(){throw j})}}function bE(h,p,_){return _=wu(_),_.tag=3,_.payload={element:null},_.callback=function(){hv(h,p)},_}function M5(h){return h=wu(h),h.tag=3,h}function N5(h,p,_,N){var j=_.type.getDerivedStateFromError;if(typeof j=="function"){var L=N.value;h.payload=function(){return j(L)},h.callback=function(){S5(p,_,N)}}var J=_.stateNode;J!==null&&typeof J.componentDidCatch=="function"&&(h.callback=function(){S5(p,_,N),typeof j!="function"&&(Cu===null?Cu=new Set([this]):Cu.add(this));var fe=N.stack;this.componentDidCatch(N.value,{componentStack:fe!==null?fe:""})})}function yie(h,p,_,N,j){if(_.flags|=32768,N!==null&&typeof N=="object"&&typeof N.then=="function"){if(p=_.alternate,p!==null&&om(p,_,j,!0),_=ws.current,_!==null){switch(_.tag){case 31:case 13:return eo===null?Mv():_.alternate===null&&Gr===0&&(Gr=3),_.flags&=-257,_.flags|=65536,_.lanes=j,N===Jy?_.flags|=16384:(p=_.updateQueue,p===null?_.updateQueue=new Set([N]):p.add(N),HE(h,N,j)),!1;case 22:return _.flags|=65536,N===Jy?_.flags|=16384:(p=_.updateQueue,p===null?(p={transitions:null,markerInstances:null,retryQueue:new Set([N])},_.updateQueue=p):(_=p.retryQueue,_===null?p.retryQueue=new Set([N]):_.add(N)),HE(h,N,j)),!1}throw Error(r(435,_.tag))}return HE(h,N,j),Mv(),!1}if(jn)return p=ws.current,p!==null?((p.flags&65536)===0&&(p.flags|=256),p.flags|=65536,p.lanes=j,N!==IN&&(h=Error(r(422),{cause:N}),cx(Ys(h,_)))):(N!==IN&&(p=Error(r(423),{cause:N}),cx(Ys(p,_))),h=h.current.alternate,h.flags|=65536,j&=-j,h.lanes|=j,N=Ys(N,_),j=bE(h.stateNode,N,j),KN(h,j),Gr!==4&&(Gr=2)),!1;var L=Error(r(520),{cause:N});if(L=Ys(L,_),Tx===null?Tx=[L]:Tx.push(L),Gr!==4&&(Gr=2),p===null)return!0;N=Ys(N,_),_=p;do{switch(_.tag){case 3:return _.flags|=65536,h=j&-j,_.lanes|=h,h=bE(_.stateNode,N,h),KN(_,h),!1;case 1:if(p=_.type,L=_.stateNode,(_.flags&128)===0&&(typeof p.getDerivedStateFromError=="function"||L!==null&&typeof L.componentDidCatch=="function"&&(Cu===null||!Cu.has(L))))return _.flags|=65536,j&=-j,_.lanes|=j,j=M5(j),N5(j,h,_,N),KN(_,j),!1}_=_.return}while(_!==null);return!1}var yE=Error(r(461)),ci=!1;function aa(h,p,_,N){p.child=h===null?CI(p,null,_,N):ph(p,h.child,_,N)}function E5(h,p,_,N,j){_=_.render;var L=p.ref;if("ref"in N){var J={};for(var fe in N)fe!=="ref"&&(J[fe]=N[fe])}else J=N;return dh(p),N=eE(h,p,_,J,L,j),fe=tE(),h!==null&&!ci?(nE(h,p,j),ac(h,p,j)):(jn&&fe&&ON(p),p.flags|=1,aa(h,p,N,j),p.child)}function A5(h,p,_,N,j){if(h===null){var L=_.type;return typeof L=="function"&&!PN(L)&&L.defaultProps===void 0&&_.compare===null?(p.tag=15,p.type=L,T5(h,p,L,N,j)):(h=qy(_.type,null,N,p,p.mode,j),h.ref=p.ref,h.return=p,p.child=h)}if(L=h.child,!AE(h,j)){var J=L.memoizedProps;if(_=_.compare,_=_!==null?_:sx,_(J,N)&&h.ref===p.ref)return ac(h,p,j)}return p.flags|=1,h=Jl(L,N),h.ref=p.ref,h.return=p,p.child=h}function T5(h,p,_,N,j){if(h!==null){var L=h.memoizedProps;if(sx(L,N)&&h.ref===p.ref)if(ci=!1,p.pendingProps=N=L,AE(h,j))(h.flags&131072)!==0&&(ci=!0);else return p.lanes=h.lanes,ac(h,p,j)}return vE(h,p,_,N,j)}function C5(h,p,_,N){var j=N.children,L=h!==null?h.memoizedState:null;if(h===null&&p.stateNode===null&&(p.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),N.mode==="hidden"){if((p.flags&128)!==0){if(L=L!==null?L.baseLanes|_:_,h!==null){for(N=p.child=h.child,j=0;N!==null;)j=j|N.lanes|N.childLanes,N=N.sibling;N=j&~L}else N=0,p.child=null;return k5(h,p,L,_,N)}if((_&536870912)!==0)p.memoizedState={baseLanes:0,cachePool:null},h!==null&&Qy(p,L!==null?L.cachePool:null),L!==null?PI(p,L):YN(),RI(p);else return N=p.lanes=536870912,k5(h,p,L!==null?L.baseLanes|_:_,_,N)}else L!==null?(Qy(p,L.cachePool),PI(p,L),Nu(),p.memoizedState=null):(h!==null&&Qy(p,null),YN(),Nu());return aa(h,p,j,_),p.child}function _x(h,p){return h!==null&&h.tag===22||p.stateNode!==null||(p.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.sibling}function k5(h,p,_,N,j){var L=VN();return L=L===null?null:{parent:oi._currentValue,pool:L},p.memoizedState={baseLanes:_,cachePool:L},h!==null&&Qy(p,null),YN(),RI(p),h!==null&&om(h,p,N,!0),p.childLanes=j,null}function fv(h,p){return p=pv({mode:p.mode,children:p.children},h.mode),p.ref=h.ref,h.child=p,p.return=h,p}function j5(h,p,_){return ph(p,h.child,null,_),h=fv(p,p.pendingProps),h.flags|=2,Ss(p),p.memoizedState=null,h}function vie(h,p,_){var N=p.pendingProps,j=(p.flags&128)!==0;if(p.flags&=-129,h===null){if(jn){if(N.mode==="hidden")return h=fv(p,N),p.lanes=536870912,_x(null,h);if(ZN(p),(h=wr)?(h=HF(h,Js),h=h!==null&&h.data==="&"?h:null,h!==null&&(p.memoizedState={dehydrated:h,treeContext:xu!==null?{id:dl,overflow:hl}:null,retryLane:536870912,hydrationErrors:null},_=mI(h),_.return=p,p.child=_,ra=p,wr=null)):h=null,h===null)throw yu(p);return p.lanes=536870912,null}return fv(p,N)}var L=h.memoizedState;if(L!==null){var J=L.dehydrated;if(ZN(p),j)if(p.flags&256)p.flags&=-257,p=j5(h,p,_);else if(p.memoizedState!==null)p.child=h.child,p.flags|=128,p=null;else throw Error(r(558));else if(ci||om(h,p,_,!1),j=(_&h.childLanes)!==0,ci||j){if(N=fr,N!==null&&(J=Kn(N,_),J!==0&&J!==L.retryLane))throw L.retryLane=J,oh(h,J),ts(N,h,J),yE;Mv(),p=j5(h,p,_)}else h=L.treeContext,wr=to(J.nextSibling),ra=p,jn=!0,bu=null,Js=!1,h!==null&&xI(p,h),p=fv(p,N),p.flags|=4096;return p}return h=Jl(h.child,{mode:N.mode,children:N.children}),h.ref=p.ref,p.child=h,h.return=p,h}function mv(h,p){var _=p.ref;if(_===null)h!==null&&h.ref!==null&&(p.flags|=4194816);else{if(typeof _!="function"&&typeof _!="object")throw Error(r(284));(h===null||h.ref!==_)&&(p.flags|=4194816)}}function vE(h,p,_,N,j){return dh(p),_=eE(h,p,_,N,void 0,j),N=tE(),h!==null&&!ci?(nE(h,p,j),ac(h,p,j)):(jn&&N&&ON(p),p.flags|=1,aa(h,p,_,j),p.child)}function P5(h,p,_,N,j,L){return dh(p),p.updateQueue=null,_=OI(p,N,_,j),DI(h),N=tE(),h!==null&&!ci?(nE(h,p,L),ac(h,p,L)):(jn&&N&&ON(p),p.flags|=1,aa(h,p,_,L),p.child)}function R5(h,p,_,N,j){if(dh(p),p.stateNode===null){var L=rm,J=_.contextType;typeof J=="object"&&J!==null&&(L=ia(J)),L=new _(N,L),p.memoizedState=L.state!==null&&L.state!==void 0?L.state:null,L.updater=xE,p.stateNode=L,L._reactInternals=p,L=p.stateNode,L.props=N,L.state=p.memoizedState,L.refs={},WN(p),J=_.contextType,L.context=typeof J=="object"&&J!==null?ia(J):rm,L.state=p.memoizedState,J=_.getDerivedStateFromProps,typeof J=="function"&&(gE(p,_,J,N),L.state=p.memoizedState),typeof _.getDerivedStateFromProps=="function"||typeof L.getSnapshotBeforeUpdate=="function"||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.componentWillMount!="function"||(J=L.state,typeof L.componentWillMount=="function"&&L.componentWillMount(),typeof L.UNSAFE_componentWillMount=="function"&&L.UNSAFE_componentWillMount(),J!==L.state&&xE.enqueueReplaceState(L,L.state,null),gx(p,N,L,j),px(),L.state=p.memoizedState),typeof L.componentDidMount=="function"&&(p.flags|=4194308),N=!0}else if(h===null){L=p.stateNode;var fe=p.memoizedProps,je=xh(_,fe);L.props=je;var tt=L.context,mt=_.contextType;J=rm,typeof mt=="object"&&mt!==null&&(J=ia(mt));var xt=_.getDerivedStateFromProps;mt=typeof xt=="function"||typeof L.getSnapshotBeforeUpdate=="function",fe=p.pendingProps!==fe,mt||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||(fe||tt!==J)&&y5(p,L,N,J),_u=!1;var it=p.memoizedState;L.state=it,gx(p,N,L,j),px(),tt=p.memoizedState,fe||it!==tt||_u?(typeof xt=="function"&&(gE(p,_,xt,N),tt=p.memoizedState),(je=_u||b5(p,_,je,N,it,tt,J))?(mt||typeof L.UNSAFE_componentWillMount!="function"&&typeof L.componentWillMount!="function"||(typeof L.componentWillMount=="function"&&L.componentWillMount(),typeof L.UNSAFE_componentWillMount=="function"&&L.UNSAFE_componentWillMount()),typeof L.componentDidMount=="function"&&(p.flags|=4194308)):(typeof L.componentDidMount=="function"&&(p.flags|=4194308),p.memoizedProps=N,p.memoizedState=tt),L.props=N,L.state=tt,L.context=J,N=je):(typeof L.componentDidMount=="function"&&(p.flags|=4194308),N=!1)}else{L=p.stateNode,qN(h,p),J=p.memoizedProps,mt=xh(_,J),L.props=mt,xt=p.pendingProps,it=L.context,tt=_.contextType,je=rm,typeof tt=="object"&&tt!==null&&(je=ia(tt)),fe=_.getDerivedStateFromProps,(tt=typeof fe=="function"||typeof L.getSnapshotBeforeUpdate=="function")||typeof L.UNSAFE_componentWillReceiveProps!="function"&&typeof L.componentWillReceiveProps!="function"||(J!==xt||it!==je)&&y5(p,L,N,je),_u=!1,it=p.memoizedState,L.state=it,gx(p,N,L,j),px();var ot=p.memoizedState;J!==xt||it!==ot||_u||h!==null&&h.dependencies!==null&&Xy(h.dependencies)?(typeof fe=="function"&&(gE(p,_,fe,N),ot=p.memoizedState),(mt=_u||b5(p,_,mt,N,it,ot,je)||h!==null&&h.dependencies!==null&&Xy(h.dependencies))?(tt||typeof L.UNSAFE_componentWillUpdate!="function"&&typeof L.componentWillUpdate!="function"||(typeof L.componentWillUpdate=="function"&&L.componentWillUpdate(N,ot,je),typeof L.UNSAFE_componentWillUpdate=="function"&&L.UNSAFE_componentWillUpdate(N,ot,je)),typeof L.componentDidUpdate=="function"&&(p.flags|=4),typeof L.getSnapshotBeforeUpdate=="function"&&(p.flags|=1024)):(typeof L.componentDidUpdate!="function"||J===h.memoizedProps&&it===h.memoizedState||(p.flags|=4),typeof L.getSnapshotBeforeUpdate!="function"||J===h.memoizedProps&&it===h.memoizedState||(p.flags|=1024),p.memoizedProps=N,p.memoizedState=ot),L.props=N,L.state=ot,L.context=je,N=mt):(typeof L.componentDidUpdate!="function"||J===h.memoizedProps&&it===h.memoizedState||(p.flags|=4),typeof L.getSnapshotBeforeUpdate!="function"||J===h.memoizedProps&&it===h.memoizedState||(p.flags|=1024),N=!1)}return L=N,mv(h,p),N=(p.flags&128)!==0,L||N?(L=p.stateNode,_=N&&typeof _.getDerivedStateFromError!="function"?null:L.render(),p.flags|=1,h!==null&&N?(p.child=ph(p,h.child,null,j),p.child=ph(p,null,_,j)):aa(h,p,_,j),p.memoizedState=L.state,h=p.child):h=ac(h,p,j),h}function D5(h,p,_,N){return ch(),p.flags|=256,aa(h,p,_,N),p.child}var _E={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wE(h){return{baseLanes:h,cachePool:SI()}}function SE(h,p,_){return h=h!==null?h.childLanes&~_:0,p&&(h|=Ns),h}function O5(h,p,_){var N=p.pendingProps,j=!1,L=(p.flags&128)!==0,J;if((J=L)||(J=h!==null&&h.memoizedState===null?!1:(ni.current&2)!==0),J&&(j=!0,p.flags&=-129),J=(p.flags&32)!==0,p.flags&=-33,h===null){if(jn){if(j?Mu(p):Nu(),(h=wr)?(h=HF(h,Js),h=h!==null&&h.data!=="&"?h:null,h!==null&&(p.memoizedState={dehydrated:h,treeContext:xu!==null?{id:dl,overflow:hl}:null,retryLane:536870912,hydrationErrors:null},_=mI(h),_.return=p,p.child=_,ra=p,wr=null)):h=null,h===null)throw yu(p);return aA(h)?p.lanes=32:p.lanes=536870912,null}var fe=N.children;return N=N.fallback,j?(Nu(),j=p.mode,fe=pv({mode:"hidden",children:fe},j),N=lh(N,j,_,null),fe.return=p,N.return=p,fe.sibling=N,p.child=fe,N=p.child,N.memoizedState=wE(_),N.childLanes=SE(h,J,_),p.memoizedState=_E,_x(null,N)):(Mu(p),ME(p,fe))}var je=h.memoizedState;if(je!==null&&(fe=je.dehydrated,fe!==null)){if(L)p.flags&256?(Mu(p),p.flags&=-257,p=NE(h,p,_)):p.memoizedState!==null?(Nu(),p.child=h.child,p.flags|=128,p=null):(Nu(),fe=N.fallback,j=p.mode,N=pv({mode:"visible",children:N.children},j),fe=lh(fe,j,_,null),fe.flags|=2,N.return=p,fe.return=p,N.sibling=fe,p.child=N,ph(p,h.child,null,_),N=p.child,N.memoizedState=wE(_),N.childLanes=SE(h,J,_),p.memoizedState=_E,p=_x(null,N));else if(Mu(p),aA(fe)){if(J=fe.nextSibling&&fe.nextSibling.dataset,J)var tt=J.dgst;J=tt,N=Error(r(419)),N.stack="",N.digest=J,cx({value:N,source:null,stack:null}),p=NE(h,p,_)}else if(ci||om(h,p,_,!1),J=(_&h.childLanes)!==0,ci||J){if(J=fr,J!==null&&(N=Kn(J,_),N!==0&&N!==je.retryLane))throw je.retryLane=N,oh(h,N),ts(J,h,N),yE;iA(fe)||Mv(),p=NE(h,p,_)}else iA(fe)?(p.flags|=192,p.child=h.child,p=null):(h=je.treeContext,wr=to(fe.nextSibling),ra=p,jn=!0,bu=null,Js=!1,h!==null&&xI(p,h),p=ME(p,N.children),p.flags|=4096);return p}return j?(Nu(),fe=N.fallback,j=p.mode,je=h.child,tt=je.sibling,N=Jl(je,{mode:"hidden",children:N.children}),N.subtreeFlags=je.subtreeFlags&65011712,tt!==null?fe=Jl(tt,fe):(fe=lh(fe,j,_,null),fe.flags|=2),fe.return=p,N.return=p,N.sibling=fe,p.child=N,_x(null,N),N=p.child,fe=h.child.memoizedState,fe===null?fe=wE(_):(j=fe.cachePool,j!==null?(je=oi._currentValue,j=j.parent!==je?{parent:je,pool:je}:j):j=SI(),fe={baseLanes:fe.baseLanes|_,cachePool:j}),N.memoizedState=fe,N.childLanes=SE(h,J,_),p.memoizedState=_E,_x(h.child,N)):(Mu(p),_=h.child,h=_.sibling,_=Jl(_,{mode:"visible",children:N.children}),_.return=p,_.sibling=null,h!==null&&(J=p.deletions,J===null?(p.deletions=[h],p.flags|=16):J.push(h)),p.child=_,p.memoizedState=null,_)}function ME(h,p){return p=pv({mode:"visible",children:p},h.mode),p.return=h,h.child=p}function pv(h,p){return h=_s(22,h,null,p),h.lanes=0,h}function NE(h,p,_){return ph(p,h.child,null,_),h=ME(p,p.pendingProps.children),h.flags|=2,p.memoizedState=null,h}function L5(h,p,_){h.lanes|=p;var N=h.alternate;N!==null&&(N.lanes|=p),zN(h.return,p,_)}function EE(h,p,_,N,j,L){var J=h.memoizedState;J===null?h.memoizedState={isBackwards:p,rendering:null,renderingStartTime:0,last:N,tail:_,tailMode:j,treeForkCount:L}:(J.isBackwards=p,J.rendering=null,J.renderingStartTime=0,J.last=N,J.tail=_,J.tailMode=j,J.treeForkCount=L)}function I5(h,p,_){var N=p.pendingProps,j=N.revealOrder,L=N.tail;N=N.children;var J=ni.current,fe=(J&2)!==0;if(fe?(J=J&1|2,p.flags|=128):J&=1,ee(ni,J),aa(h,p,N,_),N=jn?lx:0,!fe&&h!==null&&(h.flags&128)!==0)e:for(h=p.child;h!==null;){if(h.tag===13)h.memoizedState!==null&&L5(h,_,p);else if(h.tag===19)L5(h,_,p);else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===p)break e;for(;h.sibling===null;){if(h.return===null||h.return===p)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}switch(j){case"forwards":for(_=p.child,j=null;_!==null;)h=_.alternate,h!==null&&rv(h)===null&&(j=_),_=_.sibling;_=j,_===null?(j=p.child,p.child=null):(j=_.sibling,_.sibling=null),EE(p,!1,j,_,L,N);break;case"backwards":case"unstable_legacy-backwards":for(_=null,j=p.child,p.child=null;j!==null;){if(h=j.alternate,h!==null&&rv(h)===null){p.child=j;break}h=j.sibling,j.sibling=_,_=j,j=h}EE(p,!0,_,null,L,N);break;case"together":EE(p,!1,null,null,void 0,N);break;default:p.memoizedState=null}return p.child}function ac(h,p,_){if(h!==null&&(p.dependencies=h.dependencies),Tu|=p.lanes,(_&p.childLanes)===0)if(h!==null){if(om(h,p,_,!1),(_&p.childLanes)===0)return null}else return null;if(h!==null&&p.child!==h.child)throw Error(r(153));if(p.child!==null){for(h=p.child,_=Jl(h,h.pendingProps),p.child=_,_.return=p;h.sibling!==null;)h=h.sibling,_=_.sibling=Jl(h,h.pendingProps),_.return=p;_.sibling=null}return p.child}function AE(h,p){return(h.lanes&p)!==0?!0:(h=h.dependencies,!!(h!==null&&Xy(h)))}function _ie(h,p,_){switch(p.tag){case 3:Te(p,p.stateNode.containerInfo),vu(p,oi,h.memoizedState.cache),ch();break;case 27:case 5:Ne(p);break;case 4:Te(p,p.stateNode.containerInfo);break;case 10:vu(p,p.type,p.memoizedProps.value);break;case 31:if(p.memoizedState!==null)return p.flags|=128,ZN(p),null;break;case 13:var N=p.memoizedState;if(N!==null)return N.dehydrated!==null?(Mu(p),p.flags|=128,null):(_&p.child.childLanes)!==0?O5(h,p,_):(Mu(p),h=ac(h,p,_),h!==null?h.sibling:null);Mu(p);break;case 19:var j=(h.flags&128)!==0;if(N=(_&p.childLanes)!==0,N||(om(h,p,_,!1),N=(_&p.childLanes)!==0),j){if(N)return I5(h,p,_);p.flags|=128}if(j=p.memoizedState,j!==null&&(j.rendering=null,j.tail=null,j.lastEffect=null),ee(ni,ni.current),N)break;return null;case 22:return p.lanes=0,C5(h,p,_,p.pendingProps);case 24:vu(p,oi,h.memoizedState.cache)}return ac(h,p,_)}function F5(h,p,_){if(h!==null)if(h.memoizedProps!==p.pendingProps)ci=!0;else{if(!AE(h,_)&&(p.flags&128)===0)return ci=!1,_ie(h,p,_);ci=(h.flags&131072)!==0}else ci=!1,jn&&(p.flags&1048576)!==0&&gI(p,lx,p.index);switch(p.lanes=0,p.tag){case 16:e:{var N=p.pendingProps;if(h=fh(p.elementType),p.type=h,typeof h=="function")PN(h)?(N=xh(h,N),p.tag=1,p=R5(null,p,h,N,_)):(p.tag=0,p=vE(null,p,h,N,_));else{if(h!=null){var j=h.$$typeof;if(j===A){p.tag=11,p=E5(null,p,h,N,_);break e}else if(j===C){p.tag=14,p=A5(null,p,h,N,_);break e}}throw p=D(h)||h,Error(r(306,p,""))}}return p;case 0:return vE(h,p,p.type,p.pendingProps,_);case 1:return N=p.type,j=xh(N,p.pendingProps),R5(h,p,N,j,_);case 3:e:{if(Te(p,p.stateNode.containerInfo),h===null)throw Error(r(387));N=p.pendingProps;var L=p.memoizedState;j=L.element,qN(h,p),gx(p,N,null,_);var J=p.memoizedState;if(N=J.cache,vu(p,oi,N),N!==L.cache&&BN(p,[oi],_,!0),px(),N=J.element,L.isDehydrated)if(L={element:N,isDehydrated:!1,cache:J.cache},p.updateQueue.baseState=L,p.memoizedState=L,p.flags&256){p=D5(h,p,N,_);break e}else if(N!==j){j=Ys(Error(r(424)),p),cx(j),p=D5(h,p,N,_);break e}else{switch(h=p.stateNode.containerInfo,h.nodeType){case 9:h=h.body;break;default:h=h.nodeName==="HTML"?h.ownerDocument.body:h}for(wr=to(h.firstChild),ra=p,jn=!0,bu=null,Js=!0,_=CI(p,null,N,_),p.child=_;_;)_.flags=_.flags&-3|4096,_=_.sibling}else{if(ch(),N===j){p=ac(h,p,_);break e}aa(h,p,N,_)}p=p.child}return p;case 26:return mv(h,p),h===null?(_=XF(p.type,null,p.pendingProps,null))?p.memoizedState=_:jn||(_=p.type,h=p.pendingProps,N=jv(de.current).createElement(_),N[hr]=p,N[bt]=h,sa(N,_,h),Oe(N),p.stateNode=N):p.memoizedState=XF(p.type,h.memoizedProps,p.pendingProps,h.memoizedState),null;case 27:return Ne(p),h===null&&jn&&(N=p.stateNode=WF(p.type,p.pendingProps,de.current),ra=p,Js=!0,j=wr,Ru(p.type)?(sA=j,wr=to(N.firstChild)):wr=j),aa(h,p,p.pendingProps.children,_),mv(h,p),h===null&&(p.flags|=4194304),p.child;case 5:return h===null&&jn&&((j=N=wr)&&(N=Qie(N,p.type,p.pendingProps,Js),N!==null?(p.stateNode=N,ra=p,wr=to(N.firstChild),Js=!1,j=!0):j=!1),j||yu(p)),Ne(p),j=p.type,L=p.pendingProps,J=h!==null?h.memoizedProps:null,N=L.children,tA(j,L)?N=null:J!==null&&tA(j,J)&&(p.flags|=32),p.memoizedState!==null&&(j=eE(h,p,hie,null,null,_),Lx._currentValue=j),mv(h,p),aa(h,p,N,_),p.child;case 6:return h===null&&jn&&((h=_=wr)&&(_=Zie(_,p.pendingProps,Js),_!==null?(p.stateNode=_,ra=p,wr=null,h=!0):h=!1),h||yu(p)),null;case 13:return O5(h,p,_);case 4:return Te(p,p.stateNode.containerInfo),N=p.pendingProps,h===null?p.child=ph(p,null,N,_):aa(h,p,N,_),p.child;case 11:return E5(h,p,p.type,p.pendingProps,_);case 7:return aa(h,p,p.pendingProps,_),p.child;case 8:return aa(h,p,p.pendingProps.children,_),p.child;case 12:return aa(h,p,p.pendingProps.children,_),p.child;case 10:return N=p.pendingProps,vu(p,p.type,N.value),aa(h,p,N.children,_),p.child;case 9:return j=p.type._context,N=p.pendingProps.children,dh(p),j=ia(j),N=N(j),p.flags|=1,aa(h,p,N,_),p.child;case 14:return A5(h,p,p.type,p.pendingProps,_);case 15:return T5(h,p,p.type,p.pendingProps,_);case 19:return I5(h,p,_);case 31:return vie(h,p,_);case 22:return C5(h,p,_,p.pendingProps);case 24:return dh(p),N=ia(oi),h===null?(j=VN(),j===null&&(j=fr,L=$N(),j.pooledCache=L,L.refCount++,L!==null&&(j.pooledCacheLanes|=_),j=L),p.memoizedState={parent:N,cache:j},WN(p),vu(p,oi,j)):((h.lanes&_)!==0&&(qN(h,p),gx(p,null,null,_),px()),j=h.memoizedState,L=p.memoizedState,j.parent!==N?(j={parent:N,cache:N},p.memoizedState=j,p.lanes===0&&(p.memoizedState=p.updateQueue.baseState=j),vu(p,oi,N)):(N=L.cache,vu(p,oi,N),N!==j.cache&&BN(p,[oi],_,!0))),aa(h,p,p.pendingProps.children,_),p.child;case 29:throw p.pendingProps}throw Error(r(156,p.tag))}function sc(h){h.flags|=4}function TE(h,p,_,N,j){if((p=(h.mode&32)!==0)&&(p=!1),p){if(h.flags|=16777216,(j&335544128)===j)if(h.stateNode.complete)h.flags|=8192;else if(dF())h.flags|=8192;else throw mh=Jy,GN}else h.flags&=-16777217}function U5(h,p){if(p.type!=="stylesheet"||(p.state.loading&4)!==0)h.flags&=-16777217;else if(h.flags|=16777216,!eU(p))if(dF())h.flags|=8192;else throw mh=Jy,GN}function gv(h,p){p!==null&&(h.flags|=4),h.flags&16384&&(p=h.tag!==22?Tt():536870912,h.lanes|=p,ym|=p)}function wx(h,p){if(!jn)switch(h.tailMode){case"hidden":p=h.tail;for(var _=null;p!==null;)p.alternate!==null&&(_=p),p=p.sibling;_===null?h.tail=null:_.sibling=null;break;case"collapsed":_=h.tail;for(var N=null;_!==null;)_.alternate!==null&&(N=_),_=_.sibling;N===null?p||h.tail===null?h.tail=null:h.tail.sibling=null:N.sibling=null}}function Sr(h){var p=h.alternate!==null&&h.alternate.child===h.child,_=0,N=0;if(p)for(var j=h.child;j!==null;)_|=j.lanes|j.childLanes,N|=j.subtreeFlags&65011712,N|=j.flags&65011712,j.return=h,j=j.sibling;else for(j=h.child;j!==null;)_|=j.lanes|j.childLanes,N|=j.subtreeFlags,N|=j.flags,j.return=h,j=j.sibling;return h.subtreeFlags|=N,h.childLanes=_,p}function wie(h,p,_){var N=p.pendingProps;switch(LN(p),p.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Sr(p),null;case 1:return Sr(p),null;case 3:return _=p.stateNode,N=null,h!==null&&(N=h.memoizedState.cache),p.memoizedState.cache!==N&&(p.flags|=2048),nc(oi),ge(),_.pendingContext&&(_.context=_.pendingContext,_.pendingContext=null),(h===null||h.child===null)&&(sm(p)?sc(p):h===null||h.memoizedState.isDehydrated&&(p.flags&256)===0||(p.flags|=1024,FN())),Sr(p),null;case 26:var j=p.type,L=p.memoizedState;return h===null?(sc(p),L!==null?(Sr(p),U5(p,L)):(Sr(p),TE(p,j,null,N,_))):L?L!==h.memoizedState?(sc(p),Sr(p),U5(p,L)):(Sr(p),p.flags&=-16777217):(h=h.memoizedProps,h!==N&&sc(p),Sr(p),TE(p,j,h,N,_)),null;case 27:if(Re(p),_=de.current,j=p.type,h!==null&&p.stateNode!=null)h.memoizedProps!==N&&sc(p);else{if(!N){if(p.stateNode===null)throw Error(r(166));return Sr(p),null}h=ne.current,sm(p)?bI(p):(h=WF(j,N,_),p.stateNode=h,sc(p))}return Sr(p),null;case 5:if(Re(p),j=p.type,h!==null&&p.stateNode!=null)h.memoizedProps!==N&&sc(p);else{if(!N){if(p.stateNode===null)throw Error(r(166));return Sr(p),null}if(L=ne.current,sm(p))bI(p);else{var J=jv(de.current);switch(L){case 1:L=J.createElementNS("http://www.w3.org/2000/svg",j);break;case 2:L=J.createElementNS("http://www.w3.org/1998/Math/MathML",j);break;default:switch(j){case"svg":L=J.createElementNS("http://www.w3.org/2000/svg",j);break;case"math":L=J.createElementNS("http://www.w3.org/1998/Math/MathML",j);break;case"script":L=J.createElement("div"),L.innerHTML=" +