signalk-mareas-ihm 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,46 +6,65 @@
6
6
 
7
7
  ## Español
8
8
 
9
- Plugin de Signal K para **predicción de mareas en España** usando datos oficiales del **IHM (Instituto Hidrográfico de la Marina)**, con **Visor de Fondeo** integrado, alarmas inteligentes y soporte para domótica.
9
+ Plugin de Signal K que convierte tu OpenPlotter / Raspberry Pi en un **visor completo de fondeo**: mareas oficiales del **IHM (Instituto Hidrográfico de la Marina)**, previsión de abrigo, medición de olas a bordo, alarmas inteligentes y soporte para domótica.
10
10
 
11
11
  ### Características principales
12
12
 
13
13
  #### Mareas
14
- - **Predicción de mareas** automática por GPS o selección manual de estación
15
- - **Curvas de marea interactivas** con HAT/LAT anuales, cursor interactivo y etiquetas de pleamar/bajamar
16
- - **Coeficientes oficiales IHM** con descarga automática
17
- - **Consejo táctico** para las Rías Baixas (experimental)
18
- - **Caché offline** de al menos 2 meses de predicciones
19
-
20
- #### Visor de Fondeo
21
- - **Mapa Leaflet** con posición GPS en tiempo real y capas múltiples (ESRI, Bing, Google, IHM S-52, SonarChart, MBTiles offline)
22
- - **Anchor Watch** con alarma de garreo visual y sonora
23
- - **Cadena largada** con slider bidireccional y cálculo automático
24
- - **Radio de borneo y alarma** con etiquetas en la carta
25
- - **Sincronización multi-dispositivo** en tiempo real (SSE)
26
-
27
- #### AIS Inteligente
28
- - **Detección de colisión** con targets AIS en zona de borneo
29
- - **ACK por target individual** silencia alarma de un barco sin desactivar la alarma general
30
- - **Detección de garreo ajeno** si un target ACKed se acerca >2m/min, la alarma se reactiva
31
- - **Estimación de ancla** de otros barcos mediante análisis de track (centroide + radio máximo)
32
- - **Anillos de colisión persistentes** en la carta
33
-
34
- #### Alarmas Inteligentes
35
- - **Alarma de varada** solo cuando el barco está parado (SOG < 0.5kn)
36
- - **Detección de sonda** congelada, inestable, fuera de rango
37
- - **Alarmas independientes** de garreo, AIS y sonda con control individual
38
- - **Previsión meteorológica** integrada (Open-Meteo) con múltiples modelos
14
+ - **Predicción de mareas** automática por GPS o selección manual entre 70 estaciones del IHM.
15
+ - **Curvas de marea interactivas** con HAT/LAT anuales, cursor y etiquetas de pleamar/bajamar.
16
+ - **Coeficientes oficiales IHM** con descarga automática.
17
+ - **Caché offline** de al menos 2 meses de predicciones.
18
+ - **Tendencia y coeficiente** visibles en la barra superior del visor.
19
+
20
+ #### Previsión de abrigo
21
+ - **Rosa de 16 sectores** con detección automática del abrigo según la costa (OpenStreetMap).
22
+ - **Grado A-F y porcentaje de protección** combinando viento y olas previstos.
23
+ - **Strip de exposición** próximas 12 h con previsión hora a hora.
24
+ - **Resumen "AHORA / PREDICCIÓN"** con datos en tiempo real de sensores y previsión.
25
+ - **Edición manual** de sectores cuando el detector automático no convence.
26
+
27
+ #### Medición de olas en fondeo
28
+ - **Dirección, período y altura** de ola calculados a bordo desde sensores de actitud y aceleración (pypilot IMU u otros compatibles).
29
+ - **Historial de las últimas 24 h** en barras de 15 minutos.
30
+ - **El grado de abrigo se ajusta automáticamente** cuando la ola medida supera la prevista.
31
+
32
+ #### Visor de fondeo
33
+ - **Mapa Leaflet** con posición GPS en tiempo real y capas múltiples (ESRI, Bing, Google, IHM S-52, SonarChart, MBTiles offline).
34
+ - **Anchor Watch** con alarma de garreo visual y sonora.
35
+ - **Cadena largada** con slider bidireccional y cálculo automático (métodos tradicional y Vicente).
36
+ - **Radio de borneo y alarma** con etiquetas en la carta y predicción según marea.
37
+ - **Sincronización multi-dispositivo** en tiempo real (SSE).
38
+ - **Cartas náuticas locales** vía servidor MBTiles integrado.
39
+
40
+ #### Sensores en tiempo real
41
+ - Lectura directa de **viento (veleta)**, **temperatura aire/agua** y **presión atmosférica** de Signal K.
42
+ - Etiquetas **"Veleta"** y **"Sensor"** distinguen datos reales de previsión.
43
+ - **Fallback automático a Open-Meteo** cuando un sensor falla.
44
+ - **Sonda inteligente**: detecta congelación / spikes / valores absurdos y deja de mostrar lecturas inventadas.
45
+
46
+ #### AIS inteligente
47
+ - **Detección de colisión** con targets AIS en zona de borneo.
48
+ - **ACK por target individual** — silencia alarma de un barco sin desactivar la alarma general.
49
+ - **Detección de garreo ajeno** — si un target ACKed se acerca >2 m/min, la alarma se reactiva.
50
+ - **Estimación de ancla** de otros barcos mediante análisis de track (centroide + radio máximo).
51
+
52
+ #### Alarmas y audio
53
+ - **Alarmas independientes**: garreo, varada, AIS y sonda con control individual.
54
+ - **Voces pregrabadas (OGG)** por idioma — más naturales que el sintetizador.
55
+ - **Detección automática** de la salida de audio del Raspberry Pi (USB → analog → HDMI).
56
+ - **Soporte móvil** fiable (audio funciona incluso con la pestaña en segundo plano).
57
+ - **Patrones distintos** por evento ("tuc tuc tuc" para AIS, sirena para garreo, etc.).
39
58
 
40
59
  #### Domótica / KIP
41
- - **Botones KIP** para fondear/levar y activar/desactivar alarmas
42
- - **Endpoints REST** para Alexa, Google Home, Node-RED, MQTT
43
- - **Endpoint toggle** para mandos a distancia con un solo botón
60
+ - **Botones KIP** para fondear/levar y activar/desactivar alarmas.
61
+ - **Endpoints REST** para Alexa, Google Home, Node-RED, MQTT.
62
+ - **Endpoint toggle** para mandos a distancia con un solo botón.
44
63
 
45
64
  #### Bilingüe completo
46
- - Interfaz en **español e inglés** en todas las vistas
47
- - Idioma sincronizado entre Landing, Mareas y Visor de Fondeo
48
- - Banderas de idioma en la barra inferior del visor
65
+ - Interfaz en **español e inglés** en todas las vistas.
66
+ - Compass cardinal en español correcto (N/NE/E/SE/S/SO/O/NO).
67
+ - Banderas de idioma en la barra inferior del visor.
49
68
 
50
69
  ### URLs
51
70
 
@@ -81,13 +100,13 @@ curl http://openplotter.local:3000/signalk-mareas-ihm/api/anchor-watch/simple
81
100
 
82
101
  ### Instalación
83
102
 
103
+ Desde el **Signal K Appstore**: buscar `signalk-mareas-ihm` e instalar.
104
+
105
+ O por línea de comandos:
106
+
84
107
  ```bash
85
- cd /home/pi
86
- unzip -o signalk-mareas-ihm_v1.3.1_RevXX.zip
87
- cd signalk-mareas-ihm
88
- npm install && npm run build && npm pack
89
108
  cd ~/.signalk
90
- npm install /home/pi/signalk-mareas-ihm/signalk-mareas-ihm-1.3.1.tgz --save
109
+ npm install signalk-mareas-ihm@latest --save
91
110
  sudo systemctl restart signalk
92
111
  ```
93
112
 
@@ -95,46 +114,65 @@ sudo systemctl restart signalk
95
114
 
96
115
  ## English
97
116
 
98
- Signal K plugin for **Spanish tide predictions** using official data from **IHM (Instituto Hidrográfico de la Marina)**, with integrated **Anchor Watch Viewer**, smart alarms and home automation support.
117
+ Signal K plugin that turns your OpenPlotter / Raspberry Pi into a **complete anchor watch viewer**: official Spanish tides from **IHM (Instituto Hidrográfico de la Marina)**, shelter forecast, on-board wave measurement, smart alarms and home automation support.
99
118
 
100
119
  ### Main Features
101
120
 
102
121
  #### Tides
103
- - **Automatic tide prediction** by GPS or manual station selection
104
- - **Interactive tide curves** with annual HAT/LAT, interactive cursor and high/low tide labels
105
- - **Official IHM coefficients** with automatic download
106
- - **Tactical advice** for the Rías Baixas (experimental)
107
- - **Offline cache** of at least 2 months of predictions
108
-
109
- #### Anchor Watch Viewer
110
- - **Leaflet map** with real-time GPS position and multiple layers (ESRI, Bing, Google, IHM S-52, SonarChart, offline MBTiles)
111
- - **Anchor Watch** with visual and audible drag alarm
112
- - **Chain deployed** with bidirectional slider and automatic calculation
113
- - **Swing and alarm radius** with chart labels
114
- - **Multi-device real-time sync** (SSE)
122
+ - **Automatic tide prediction** by GPS or manual selection among 70 IHM stations.
123
+ - **Interactive tide curves** with annual HAT/LAT, cursor and high/low tide labels.
124
+ - **Official IHM coefficients** with automatic download.
125
+ - **Offline cache** of at least 2 months of predictions.
126
+ - **Tendency and coefficient** visible in the viewer's top bar.
127
+
128
+ #### Shelter forecast
129
+ - **16-sector rose** with automatic shelter detection from coastline (OpenStreetMap).
130
+ - **Grade A-F and protection percentage** combining forecast wind and waves.
131
+ - **12 h exposure strip** with hourly forecast.
132
+ - **"NOW / FORECAST" summary** with real-time sensor and forecast data.
133
+ - **Manual sector override** when the automatic detector is wrong.
134
+
135
+ #### On-board wave measurement
136
+ - **Direction, period and height** of waves computed on board from attitude and acceleration sensors (pypilot IMU or compatible).
137
+ - **24 h history** in 15-minute bars.
138
+ - **Shelter grade auto-adjusts** when measured wave exceeds forecast.
139
+
140
+ #### Anchor watch viewer
141
+ - **Leaflet map** with real-time GPS position and multiple layers (ESRI, Bing, Google, IHM S-52, SonarChart, offline MBTiles).
142
+ - **Anchor Watch** with visual and audible drag alarm.
143
+ - **Chain deployed** with bidirectional slider and automatic calculation (traditional and Vicente methods).
144
+ - **Swing and alarm radius** with chart labels and tide-aware prediction.
145
+ - **Multi-device real-time sync** (SSE).
146
+ - **Local nautical charts** via integrated MBTiles server.
147
+
148
+ #### Real-time sensors
149
+ - Direct reading of **wind (anemometer)**, **air/water temperature** and **atmospheric pressure** from Signal K.
150
+ - **"Veleta"** and **"Sensor"** badges distinguish real data from forecast.
151
+ - **Automatic Open-Meteo fallback** when a sensor drops.
152
+ - **Smart depth sounder**: detects frozen / spike / absurd values and stops showing made-up readings.
115
153
 
116
154
  #### Smart AIS
117
- - **Collision detection** with AIS targets in swing zone
118
- - **Per-target ACK** — silence alarm for one boat without disabling the general alarm
119
- - **External dragging detection** — if an ACKed target approaches >2m/min, alarm reactivates
120
- - **Anchor estimation** for other boats via track analysis (centroid + max radius)
121
- - **Persistent collision rings** on chart
122
-
123
- #### Smart Alarms
124
- - **Grounding alarm** only when boat is stopped (SOG < 0.5kn)
125
- - **Sounder detection** for frozen, unstable, out-of-range readings
126
- - **Independent alarms** for drag, AIS and depth with individual control
127
- - **Weather forecast** integrated (Open-Meteo) with multiple models
155
+ - **Collision detection** with AIS targets in swing zone.
156
+ - **Per-target ACK** — silence alarm for one boat without disabling the general alarm.
157
+ - **External dragging detection** — if an ACKed target approaches >2 m/min, alarm reactivates.
158
+ - **Anchor estimation** for other boats via track analysis (centroid + max radius).
159
+
160
+ #### Alarms and audio
161
+ - **Independent alarms**: drag, grounding, AIS and depth with individual control.
162
+ - **Pre-recorded voices (OGG)** per language more natural than synthesizer.
163
+ - **Automatic detection** of Raspberry Pi audio output (USB → analog → HDMI).
164
+ - **Reliable mobile support** (audio works even when the tab is in background).
165
+ - **Distinct patterns** per event (rapid beep for AIS, siren for drag, etc.).
128
166
 
129
167
  #### Home Automation / KIP
130
- - **KIP buttons** for drop/lift and alarm enable/disable
131
- - **REST endpoints** for Alexa, Google Home, Node-RED, MQTT
132
- - **Toggle endpoint** for single-button remote controls
168
+ - **KIP buttons** for drop/lift and alarm enable/disable.
169
+ - **REST endpoints** for Alexa, Google Home, Node-RED, MQTT.
170
+ - **Toggle endpoint** for single-button remote controls.
133
171
 
134
172
  #### Full Bilingual
135
- - Interface in **Spanish and English** across all views
136
- - Language synced between Landing, Tides and Anchor Watch Viewer
137
- - Language flags in the viewer's bottom bar
173
+ - Interface in **Spanish and English** across all views.
174
+ - Correct Spanish cardinal compass (N/NE/E/SE/S/SO/O/NO).
175
+ - Language flags in the viewer's bottom bar.
138
176
 
139
177
  ### URLs
140
178
 
@@ -162,16 +200,16 @@ curl http://openplotter.local:3000/signalk-mareas-ihm/api/anchor-watch/simple
162
200
 
163
201
  ### Installation
164
202
 
203
+ From the **Signal K Appstore**: search `signalk-mareas-ihm` and install.
204
+
205
+ Or via command line:
206
+
165
207
  ```bash
166
- cd /home/pi
167
- unzip -o signalk-mareas-ihm_v1.3.1_RevXX.zip
168
- cd signalk-mareas-ihm
169
- npm install && npm run build && npm pack
170
208
  cd ~/.signalk
171
- npm install /home/pi/signalk-mareas-ihm/signalk-mareas-ihm-1.3.1.tgz --save
209
+ npm install signalk-mareas-ihm@latest --save
172
210
  sudo systemctl restart signalk
173
211
  ```
174
212
 
175
213
  ---
176
214
 
177
- © IHM — Datos oficiales del Instituto Hidrográfico de la Marina de España
215
+ © IHM — Official data from Spain's Instituto Hidrográfico de la Marina
@@ -1,7 +1,7 @@
1
1
  {
2
- "version": "2.0.0",
3
- "timestamp": "20260522-2339",
2
+ "version": "2.0.2",
3
+ "timestamp": "20260523-1548",
4
4
  "gitHash": null,
5
5
  "gitDirty": true,
6
- "builtAt": "2026-05-22T21:39:55.610Z"
6
+ "builtAt": "2026-05-23T13:48:04.276Z"
7
7
  }
package/dist/index.js CHANGED
@@ -46,7 +46,7 @@ function isPositionValue(v) {
46
46
  // timestamp + git hash so we can verify exactly which build is running on the Pi
47
47
  // without ambiguity. ("¿Qué versión tengo deployada?" → /api/paths or landing.)
48
48
  const PLUGIN_VERSION = esmRequire("../package.json").version;
49
- const PLUGIN_REVISION = "Rev143";
49
+ const PLUGIN_REVISION = "Rev144";
50
50
  let _buildInfo = null;
51
51
  try {
52
52
  _buildInfo = esmRequire("./build-info.json");
@@ -4856,8 +4856,13 @@ export default function (app) {
4856
4856
  // Rev43: probe espeak presence at startup. If missing, emit an informational
4857
4857
  // SK notification so the user (in KIP/OP/visor) sees instructions to install.
4858
4858
  // Avoids "no audio" mystery silence if espeak isn't on the Pi yet.
4859
+ // Rev144: usamos `espeak --version` directo en lugar de `which espeak`. `which`
4860
+ // depende del $PATH del proceso SignalK; en algunas instalaciones systemd lo
4861
+ // tiene restringido y `which` falla aunque espeak esté en /usr/bin. Invocar
4862
+ // el binario directamente con --version solo falla con ENOENT cuando no
4863
+ // existe — robusto frente a $PATH limitado.
4859
4864
  (function _probeEspeak() {
4860
- execFile("which", ["espeak"], { timeout: 1500 }, (err) => {
4865
+ execFile("espeak", ["--version"], { timeout: 2000 }, (err) => {
4861
4866
  if (err) {
4862
4867
  try {
4863
4868
  const delta = {
@@ -214,6 +214,11 @@ async function resolveStation(cache, stations, position) {
214
214
  await cache.set("lastStation", st);
215
215
  return st;
216
216
  }
217
+ // Rev144: id manual ya no existe (probable upgrade desde lista vieja).
218
+ // Limpiar para evitar reintentos perpetuos contra ids muertos.
219
+ // Sin app.debug aquí — esta función no tiene 'app' inyectada. La purga es silente.
220
+ await cache.set("manualStationId", null);
221
+ await cache.set("manualOverride", false);
217
222
  }
218
223
  // 2) Favorite station (user-picked while staying in Auto)
219
224
  // If the user has selected a station in the Auto dropdown, we must honor it
@@ -226,6 +231,9 @@ async function resolveStation(cache, stations, position) {
226
231
  await cache.set("lastStation", fav);
227
232
  return fav;
228
233
  }
234
+ // Rev144: idem para favorito.
235
+ // Purga silente (sin app.debug — no inyectado aquí).
236
+ await cache.set("favoriteStationId", null);
229
237
  }
230
238
  if (position) {
231
239
  const { station, distanceMeters } = stations.closestToWithDistance(position);
@@ -239,8 +247,15 @@ async function resolveStation(cache, stations, position) {
239
247
  return null;
240
248
  }
241
249
  const cached = (await cache.get("lastStation"));
242
- if (cached)
250
+ // Rev144: validar el id contra la lista actual ANTES de devolverlo.
251
+ // Si la cache trae un id viejo (ej. "3214" de la lista 4-dígitos pre-2.0)
252
+ // que ya no existe en IHM, lo purgamos y caemos al fallback. Sin esto, el
253
+ // plugin reintenta con el id inválido y IHM devuelve "El puerto no existe"
254
+ // cada minuto al actualizar las mareas.
255
+ if (cached && cached.id && stations.get(String(cached.id))) {
243
256
  return cached;
257
+ }
258
+ // Si cached existe pero no es válida, simplemente caemos al fallback (purga silente).
244
259
  // v1.2.0: Absolute last resort — Vigo. Prevents plugin from being stuck
245
260
  // when there is no GPS, no manual selection, and no cached station.
246
261
  await cache.set("lastStation", VIGO_FALLBACK);
@@ -298,9 +313,35 @@ async function fetchJsonWithTimeout(app, url, timeoutMs = 8000) {
298
313
  throw new Error(`IHM HTTP ${res.status}: ${res.statusText}`);
299
314
  // Rev142: el endpoint IHM a veces devuelve texto plano en errores
300
315
  // ("El puerto no existe…") con HTTP 200, lo que hacía explotar res.json()
301
- // con un SyntaxError "Unexpected token 'E'…" cada segundo. Ahora leemos
302
- // como texto, validamos que parezca JSON y solo entonces parseamos.
303
- const text = await res.text();
316
+ // con un SyntaxError "Unexpected token 'E'…" cada segundo. Leemos como
317
+ // texto, validamos que parezca JSON y solo entonces parseamos.
318
+ // Rev144: además, los mensajes de error de IHM llegan en Latin-1 / ISO-8859-1
319
+ // (no UTF-8). Decodificamos los bytes con el charset adecuado según el
320
+ // Content-Type para que "obtención" no aparezca como "obtenci�n" en logs/UI.
321
+ const buf = await res.arrayBuffer();
322
+ const ct = (res.headers.get("content-type") || "").toLowerCase();
323
+ const isJsonCT = ct.includes("application/json") || ct.includes("text/json");
324
+ const charset = (ct.match(/charset=([^;]+)/) || [])[1]?.trim().toLowerCase() || "";
325
+ let text;
326
+ try {
327
+ // Si el server declara charset, lo usamos. Si no, intentamos UTF-8 primero;
328
+ // si vemos U+FFFD (replacement) o cabecera no-JSON, reintentamos Latin-1.
329
+ if (charset) {
330
+ text = new TextDecoder(charset, { fatal: false }).decode(buf);
331
+ }
332
+ else {
333
+ const utf8 = new TextDecoder("utf-8", { fatal: false }).decode(buf);
334
+ if (utf8.includes("�") && !isJsonCT) {
335
+ text = new TextDecoder("iso-8859-1").decode(buf);
336
+ }
337
+ else {
338
+ text = utf8;
339
+ }
340
+ }
341
+ }
342
+ catch {
343
+ text = new TextDecoder("iso-8859-1").decode(buf);
344
+ }
304
345
  const trimmed = text.trim();
305
346
  if (!trimmed || (!trimmed.startsWith("{") && !trimmed.startsWith("["))) {
306
347
  throw new Error(`IHM API returned non-JSON: "${trimmed.slice(0, 120)}"`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalk-mareas-ihm",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Official tide predictions from the Spanish Hydrographic Institute (IHM).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,9 @@
1
+ (function(){const C=document.createElement("link").relList;if(C&&C.supports&&C.supports("modulepreload"))return;for(const w of document.querySelectorAll('link[rel="modulepreload"]'))m(w);new MutationObserver(w=>{for(const R of w)if(R.type==="childList")for(const Q of R.addedNodes)Q.tagName==="LINK"&&Q.rel==="modulepreload"&&m(Q)}).observe(document,{childList:!0,subtree:!0});function O(w){const R={};return w.integrity&&(R.integrity=w.integrity),w.referrerPolicy&&(R.referrerPolicy=w.referrerPolicy),w.crossOrigin==="use-credentials"?R.credentials="include":w.crossOrigin==="anonymous"?R.credentials="omit":R.credentials="same-origin",R}function m(w){if(w.ep)return;w.ep=!0;const R=O(w);fetch(w.href,R)}})();function mg(g){return g&&g.__esModule&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g}var Oo={exports:{}},Pi={};var dh;function gg(){if(dh)return Pi;dh=1;var g=Symbol.for("react.transitional.element"),C=Symbol.for("react.fragment");function O(m,w,R){var Q=null;if(R!==void 0&&(Q=""+R),w.key!==void 0&&(Q=""+w.key),"key"in w){R={};for(var U in w)U!=="key"&&(R[U]=w[U])}else R=w;return w=R.ref,{$$typeof:g,type:m,key:Q,ref:w!==void 0?w:null,props:R}}return Pi.Fragment=C,Pi.jsx=O,Pi.jsxs=O,Pi}var hh;function vg(){return hh||(hh=1,Oo.exports=gg()),Oo.exports}var u=vg(),Co={exports:{}},$={};var mh;function pg(){if(mh)return $;mh=1;var g=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),N=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),ie=Symbol.iterator;function re(o){return o===null||typeof o!="object"?null:(o=ie&&o[ie]||o["@@iterator"],typeof o=="function"?o:null)}var Oe={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Se=Object.assign,Pe={};function fe(o,j,D){this.props=o,this.context=j,this.refs=Pe,this.updater=D||Oe}fe.prototype.isReactComponent={},fe.prototype.setState=function(o,j){if(typeof o!="object"&&typeof o!="function"&&o!=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,o,j,"setState")},fe.prototype.forceUpdate=function(o){this.updater.enqueueForceUpdate(this,o,"forceUpdate")};function Te(){}Te.prototype=fe.prototype;function ge(o,j,D){this.props=o,this.context=j,this.refs=Pe,this.updater=D||Oe}var Ke=ge.prototype=new Te;Ke.constructor=ge,Se(Ke,fe.prototype),Ke.isPureReactComponent=!0;var He=Array.isArray;function Le(){}var F={H:null,A:null,T:null,S:null},Ce=Object.prototype.hasOwnProperty;function ke(o,j,D){var H=D.ref;return{$$typeof:g,type:o,key:j,ref:H!==void 0?H:null,props:D}}function ot(o,j){return ke(o.type,j,o.props)}function lt(o){return typeof o=="object"&&o!==null&&o.$$typeof===g}function pe(o){var j={"=":"=0",":":"=2"};return"$"+o.replace(/[=:]/g,function(D){return j[D]})}var Be=/\/+/g;function At(o,j){return typeof o=="object"&&o!==null&&o.key!=null?pe(""+o.key):j.toString(36)}function rt(o){switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:switch(typeof o.status=="string"?o.then(Le,Le):(o.status="pending",o.then(function(j){o.status==="pending"&&(o.status="fulfilled",o.value=j)},function(j){o.status==="pending"&&(o.status="rejected",o.reason=j)})),o.status){case"fulfilled":return o.value;case"rejected":throw o.reason}}throw o}function b(o,j,D,H,K){var W=typeof o;(W==="undefined"||W==="boolean")&&(o=null);var P=!1;if(o===null)P=!0;else switch(W){case"bigint":case"string":case"number":P=!0;break;case"object":switch(o.$$typeof){case g:case C:P=!0;break;case q:return P=o._init,b(P(o._payload),j,D,H,K)}}if(P)return K=K(o),P=H===""?"."+At(o,0):H,He(K)?(D="",P!=null&&(D=P.replace(Be,"$&/")+"/"),b(K,j,D,"",function(Ol){return Ol})):K!=null&&(lt(K)&&(K=ot(K,D+(K.key==null||o&&o.key===K.key?"":(""+K.key).replace(Be,"$&/")+"/")+P)),j.push(K)),1;P=0;var nt=H===""?".":H+":";if(He(o))for(var De=0;De<o.length;De++)H=o[De],W=nt+At(H,De),P+=b(H,j,D,W,K);else if(De=re(o),typeof De=="function")for(o=De.call(o),De=0;!(H=o.next()).done;)H=H.value,W=nt+At(H,De++),P+=b(H,j,D,W,K);else if(W==="object"){if(typeof o.then=="function")return b(rt(o),j,D,H,K);throw j=String(o),Error("Objects are not valid as a React child (found: "+(j==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":j)+"). If you meant to render a collection of children, use an array instead.")}return P}function B(o,j,D){if(o==null)return o;var H=[],K=0;return b(o,H,"","",function(W){return j.call(D,W,K++)}),H}function V(o){if(o._status===-1){var j=o._result;j=j(),j.then(function(D){(o._status===0||o._status===-1)&&(o._status=1,o._result=D)},function(D){(o._status===0||o._status===-1)&&(o._status=2,o._result=D)}),o._status===-1&&(o._status=0,o._result=j)}if(o._status===1)return o._result.default;throw o._result}var te=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var j=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(j))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},se={map:B,forEach:function(o,j,D){B(o,function(){j.apply(this,arguments)},D)},count:function(o){var j=0;return B(o,function(){j++}),j},toArray:function(o){return B(o,function(j){return j})||[]},only:function(o){if(!lt(o))throw Error("React.Children.only expected to receive a single React element child.");return o}};return $.Activity=L,$.Children=se,$.Component=fe,$.Fragment=O,$.Profiler=w,$.PureComponent=ge,$.StrictMode=m,$.Suspense=_,$.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,$.__COMPILER_RUNTIME={__proto__:null,c:function(o){return F.H.useMemoCache(o)}},$.cache=function(o){return function(){return o.apply(null,arguments)}},$.cacheSignal=function(){return null},$.cloneElement=function(o,j,D){if(o==null)throw Error("The argument must be a React element, but you passed "+o+".");var H=Se({},o.props),K=o.key;if(j!=null)for(W in j.key!==void 0&&(K=""+j.key),j)!Ce.call(j,W)||W==="key"||W==="__self"||W==="__source"||W==="ref"&&j.ref===void 0||(H[W]=j[W]);var W=arguments.length-2;if(W===1)H.children=D;else if(1<W){for(var P=Array(W),nt=0;nt<W;nt++)P[nt]=arguments[nt+2];H.children=P}return ke(o.type,K,H)},$.createContext=function(o){return o={$$typeof:Q,_currentValue:o,_currentValue2:o,_threadCount:0,Provider:null,Consumer:null},o.Provider=o,o.Consumer={$$typeof:R,_context:o},o},$.createElement=function(o,j,D){var H,K={},W=null;if(j!=null)for(H in j.key!==void 0&&(W=""+j.key),j)Ce.call(j,H)&&H!=="key"&&H!=="__self"&&H!=="__source"&&(K[H]=j[H]);var P=arguments.length-2;if(P===1)K.children=D;else if(1<P){for(var nt=Array(P),De=0;De<P;De++)nt[De]=arguments[De+2];K.children=nt}if(o&&o.defaultProps)for(H in P=o.defaultProps,P)K[H]===void 0&&(K[H]=P[H]);return ke(o,W,K)},$.createRef=function(){return{current:null}},$.forwardRef=function(o){return{$$typeof:U,render:o}},$.isValidElement=lt,$.lazy=function(o){return{$$typeof:q,_payload:{_status:-1,_result:o},_init:V}},$.memo=function(o,j){return{$$typeof:N,type:o,compare:j===void 0?null:j}},$.startTransition=function(o){var j=F.T,D={};F.T=D;try{var H=o(),K=F.S;K!==null&&K(D,H),typeof H=="object"&&H!==null&&typeof H.then=="function"&&H.then(Le,te)}catch(W){te(W)}finally{j!==null&&D.types!==null&&(j.types=D.types),F.T=j}},$.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},$.use=function(o){return F.H.use(o)},$.useActionState=function(o,j,D){return F.H.useActionState(o,j,D)},$.useCallback=function(o,j){return F.H.useCallback(o,j)},$.useContext=function(o){return F.H.useContext(o)},$.useDebugValue=function(){},$.useDeferredValue=function(o,j){return F.H.useDeferredValue(o,j)},$.useEffect=function(o,j){return F.H.useEffect(o,j)},$.useEffectEvent=function(o){return F.H.useEffectEvent(o)},$.useId=function(){return F.H.useId()},$.useImperativeHandle=function(o,j,D){return F.H.useImperativeHandle(o,j,D)},$.useInsertionEffect=function(o,j){return F.H.useInsertionEffect(o,j)},$.useLayoutEffect=function(o,j){return F.H.useLayoutEffect(o,j)},$.useMemo=function(o,j){return F.H.useMemo(o,j)},$.useOptimistic=function(o,j){return F.H.useOptimistic(o,j)},$.useReducer=function(o,j,D){return F.H.useReducer(o,j,D)},$.useRef=function(o){return F.H.useRef(o)},$.useState=function(o){return F.H.useState(o)},$.useSyncExternalStore=function(o,j,D){return F.H.useSyncExternalStore(o,j,D)},$.useTransition=function(){return F.H.useTransition()},$.version="19.2.5",$}var gh;function Lo(){return gh||(gh=1,Co.exports=pg()),Co.exports}var z=Lo();const yg=mg(z);var Do={exports:{}},eu={},Ro={exports:{}},_o={};var vh;function xg(){return vh||(vh=1,(function(g){function C(b,B){var V=b.length;b.push(B);e:for(;0<V;){var te=V-1>>>1,se=b[te];if(0<w(se,B))b[te]=B,b[V]=se,V=te;else break e}}function O(b){return b.length===0?null:b[0]}function m(b){if(b.length===0)return null;var B=b[0],V=b.pop();if(V!==B){b[0]=V;e:for(var te=0,se=b.length,o=se>>>1;te<o;){var j=2*(te+1)-1,D=b[j],H=j+1,K=b[H];if(0>w(D,V))H<se&&0>w(K,D)?(b[te]=K,b[H]=V,te=H):(b[te]=D,b[j]=V,te=j);else if(H<se&&0>w(K,V))b[te]=K,b[H]=V,te=H;else break e}}return B}function w(b,B){var V=b.sortIndex-B.sortIndex;return V!==0?V:b.id-B.id}if(g.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var R=performance;g.unstable_now=function(){return R.now()}}else{var Q=Date,U=Q.now();g.unstable_now=function(){return Q.now()-U}}var _=[],N=[],q=1,L=null,ie=3,re=!1,Oe=!1,Se=!1,Pe=!1,fe=typeof setTimeout=="function"?setTimeout:null,Te=typeof clearTimeout=="function"?clearTimeout:null,ge=typeof setImmediate<"u"?setImmediate:null;function Ke(b){for(var B=O(N);B!==null;){if(B.callback===null)m(N);else if(B.startTime<=b)m(N),B.sortIndex=B.expirationTime,C(_,B);else break;B=O(N)}}function He(b){if(Se=!1,Ke(b),!Oe)if(O(_)!==null)Oe=!0,Le||(Le=!0,pe());else{var B=O(N);B!==null&&rt(He,B.startTime-b)}}var Le=!1,F=-1,Ce=5,ke=-1;function ot(){return Pe?!0:!(g.unstable_now()-ke<Ce)}function lt(){if(Pe=!1,Le){var b=g.unstable_now();ke=b;var B=!0;try{e:{Oe=!1,Se&&(Se=!1,Te(F),F=-1),re=!0;var V=ie;try{t:{for(Ke(b),L=O(_);L!==null&&!(L.expirationTime>b&&ot());){var te=L.callback;if(typeof te=="function"){L.callback=null,ie=L.priorityLevel;var se=te(L.expirationTime<=b);if(b=g.unstable_now(),typeof se=="function"){L.callback=se,Ke(b),B=!0;break t}L===O(_)&&m(_),Ke(b)}else m(_);L=O(_)}if(L!==null)B=!0;else{var o=O(N);o!==null&&rt(He,o.startTime-b),B=!1}}break e}finally{L=null,ie=V,re=!1}B=void 0}}finally{B?pe():Le=!1}}}var pe;if(typeof ge=="function")pe=function(){ge(lt)};else if(typeof MessageChannel<"u"){var Be=new MessageChannel,At=Be.port2;Be.port1.onmessage=lt,pe=function(){At.postMessage(null)}}else pe=function(){fe(lt,0)};function rt(b,B){F=fe(function(){b(g.unstable_now())},B)}g.unstable_IdlePriority=5,g.unstable_ImmediatePriority=1,g.unstable_LowPriority=4,g.unstable_NormalPriority=3,g.unstable_Profiling=null,g.unstable_UserBlockingPriority=2,g.unstable_cancelCallback=function(b){b.callback=null},g.unstable_forceFrameRate=function(b){0>b||125<b?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ce=0<b?Math.floor(1e3/b):5},g.unstable_getCurrentPriorityLevel=function(){return ie},g.unstable_next=function(b){switch(ie){case 1:case 2:case 3:var B=3;break;default:B=ie}var V=ie;ie=B;try{return b()}finally{ie=V}},g.unstable_requestPaint=function(){Pe=!0},g.unstable_runWithPriority=function(b,B){switch(b){case 1:case 2:case 3:case 4:case 5:break;default:b=3}var V=ie;ie=b;try{return B()}finally{ie=V}},g.unstable_scheduleCallback=function(b,B,V){var te=g.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?te+V:te):V=te,b){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=V+se,b={id:q++,callback:B,priorityLevel:b,startTime:V,expirationTime:se,sortIndex:-1},V>te?(b.sortIndex=V,C(N,b),O(_)===null&&b===O(N)&&(Se?(Te(F),F=-1):Se=!0,rt(He,V-te))):(b.sortIndex=se,C(_,b),Oe||re||(Oe=!0,Le||(Le=!0,pe()))),b},g.unstable_shouldYield=ot,g.unstable_wrapCallback=function(b){var B=ie;return function(){var V=ie;ie=B;try{return b.apply(this,arguments)}finally{ie=V}}}})(_o)),_o}var ph;function Sg(){return ph||(ph=1,Ro.exports=xg()),Ro.exports}var Uo={exports:{}},yt={};var yh;function bg(){if(yh)return yt;yh=1;var g=Lo();function C(_){var N="https://react.dev/errors/"+_;if(1<arguments.length){N+="?args[]="+encodeURIComponent(arguments[1]);for(var q=2;q<arguments.length;q++)N+="&args[]="+encodeURIComponent(arguments[q])}return"Minified React error #"+_+"; visit "+N+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function O(){}var m={d:{f:O,r:function(){throw Error(C(522))},D:O,C:O,L:O,m:O,X:O,S:O,M:O},p:0,findDOMNode:null},w=Symbol.for("react.portal");function R(_,N,q){var L=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:w,key:L==null?null:""+L,children:_,containerInfo:N,implementation:q}}var Q=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function U(_,N){if(_==="font")return"";if(typeof N=="string")return N==="use-credentials"?N:""}return yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=m,yt.createPortal=function(_,N){var q=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!N||N.nodeType!==1&&N.nodeType!==9&&N.nodeType!==11)throw Error(C(299));return R(_,N,null,q)},yt.flushSync=function(_){var N=Q.T,q=m.p;try{if(Q.T=null,m.p=2,_)return _()}finally{Q.T=N,m.p=q,m.d.f()}},yt.preconnect=function(_,N){typeof _=="string"&&(N?(N=N.crossOrigin,N=typeof N=="string"?N==="use-credentials"?N:"":void 0):N=null,m.d.C(_,N))},yt.prefetchDNS=function(_){typeof _=="string"&&m.d.D(_)},yt.preinit=function(_,N){if(typeof _=="string"&&N&&typeof N.as=="string"){var q=N.as,L=U(q,N.crossOrigin),ie=typeof N.integrity=="string"?N.integrity:void 0,re=typeof N.fetchPriority=="string"?N.fetchPriority:void 0;q==="style"?m.d.S(_,typeof N.precedence=="string"?N.precedence:void 0,{crossOrigin:L,integrity:ie,fetchPriority:re}):q==="script"&&m.d.X(_,{crossOrigin:L,integrity:ie,fetchPriority:re,nonce:typeof N.nonce=="string"?N.nonce:void 0})}},yt.preinitModule=function(_,N){if(typeof _=="string")if(typeof N=="object"&&N!==null){if(N.as==null||N.as==="script"){var q=U(N.as,N.crossOrigin);m.d.M(_,{crossOrigin:q,integrity:typeof N.integrity=="string"?N.integrity:void 0,nonce:typeof N.nonce=="string"?N.nonce:void 0})}}else N==null&&m.d.M(_)},yt.preload=function(_,N){if(typeof _=="string"&&typeof N=="object"&&N!==null&&typeof N.as=="string"){var q=N.as,L=U(q,N.crossOrigin);m.d.L(_,q,{crossOrigin:L,integrity:typeof N.integrity=="string"?N.integrity:void 0,nonce:typeof N.nonce=="string"?N.nonce:void 0,type:typeof N.type=="string"?N.type:void 0,fetchPriority:typeof N.fetchPriority=="string"?N.fetchPriority:void 0,referrerPolicy:typeof N.referrerPolicy=="string"?N.referrerPolicy:void 0,imageSrcSet:typeof N.imageSrcSet=="string"?N.imageSrcSet:void 0,imageSizes:typeof N.imageSizes=="string"?N.imageSizes:void 0,media:typeof N.media=="string"?N.media:void 0})}},yt.preloadModule=function(_,N){if(typeof _=="string")if(N){var q=U(N.as,N.crossOrigin);m.d.m(_,{as:typeof N.as=="string"&&N.as!=="script"?N.as:void 0,crossOrigin:q,integrity:typeof N.integrity=="string"?N.integrity:void 0})}else m.d.m(_)},yt.requestFormReset=function(_){m.d.r(_)},yt.unstable_batchedUpdates=function(_,N){return _(N)},yt.useFormState=function(_,N,q){return Q.H.useFormState(_,N,q)},yt.useFormStatus=function(){return Q.H.useHostTransitionStatus()},yt.version="19.2.5",yt}var xh;function Ch(){if(xh)return Uo.exports;xh=1;function g(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g)}catch(C){console.error(C)}}return g(),Uo.exports=bg(),Uo.exports}var Sh;function jg(){if(Sh)return eu;Sh=1;var g=Sg(),C=Lo(),O=Ch();function m(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function w(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function R(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function Q(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function U(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function _(e){if(R(e)!==e)throw Error(m(188))}function N(e){var t=e.alternate;if(!t){if(t=R(e),t===null)throw Error(m(188));return t!==e?null:e}for(var a=e,l=t;;){var n=a.return;if(n===null)break;var i=n.alternate;if(i===null){if(l=n.return,l!==null){a=l;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===a)return _(n),e;if(i===l)return _(n),t;i=i.sibling}throw Error(m(188))}if(a.return!==l.return)a=n,l=i;else{for(var c=!1,s=n.child;s;){if(s===a){c=!0,a=n,l=i;break}if(s===l){c=!0,l=n,a=i;break}s=s.sibling}if(!c){for(s=i.child;s;){if(s===a){c=!0,a=i,l=n;break}if(s===l){c=!0,l=i,a=n;break}s=s.sibling}if(!c)throw Error(m(189))}}if(a.alternate!==l)throw Error(m(190))}if(a.tag!==3)throw Error(m(188));return a.stateNode.current===a?e:t}function q(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=q(e),t!==null)return t;e=e.sibling}return null}var L=Object.assign,ie=Symbol.for("react.element"),re=Symbol.for("react.transitional.element"),Oe=Symbol.for("react.portal"),Se=Symbol.for("react.fragment"),Pe=Symbol.for("react.strict_mode"),fe=Symbol.for("react.profiler"),Te=Symbol.for("react.consumer"),ge=Symbol.for("react.context"),Ke=Symbol.for("react.forward_ref"),He=Symbol.for("react.suspense"),Le=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),Ce=Symbol.for("react.lazy"),ke=Symbol.for("react.activity"),ot=Symbol.for("react.memo_cache_sentinel"),lt=Symbol.iterator;function pe(e){return e===null||typeof e!="object"?null:(e=lt&&e[lt]||e["@@iterator"],typeof e=="function"?e:null)}var Be=Symbol.for("react.client.reference");function At(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Be?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Se:return"Fragment";case fe:return"Profiler";case Pe:return"StrictMode";case He:return"Suspense";case Le:return"SuspenseList";case ke:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Oe:return"Portal";case ge:return e.displayName||"Context";case Te:return(e._context.displayName||"Context")+".Consumer";case Ke:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case F:return t=e.displayName||null,t!==null?t:At(e.type)||"Memo";case Ce:t=e._payload,e=e._init;try{return At(e(t))}catch{}}return null}var rt=Array.isArray,b=C.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=O.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},te=[],se=-1;function o(e){return{current:e}}function j(e){0>se||(e.current=te[se],te[se]=null,se--)}function D(e,t){se++,te[se]=e.current,e.current=t}var H=o(null),K=o(null),W=o(null),P=o(null);function nt(e,t){switch(D(W,t),D(K,e),D(H,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=wd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j(H),D(H,e)}function De(){j(H),j(K),j(W)}function Ol(e){e.memoizedState!==null&&D(P,e);var t=H.current,a=wd(t,e.type);t!==a&&(D(K,e),D(H,a))}function Wa(e){K.current===e&&(j(H),j(K)),P.current===e&&(j(P),Wi._currentValue=V)}var Wn,Fn;function ua(e){if(Wn===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Wn=t&&t[1]||"",Fn=-1<a.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Wn+e+Fn}var tn=!1;function Pt(e,t){if(!e||tn)return"";tn=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var E=function(){throw Error()};if(Object.defineProperty(E.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(E,[])}catch(S){var x=S}Reflect.construct(e,[],E)}else{try{E.call()}catch(S){x=S}e.call(E.prototype)}}else{try{throw Error()}catch(S){x=S}(E=e())&&typeof E.catch=="function"&&E.catch(function(){})}}catch(S){if(S&&x&&typeof S.stack=="string")return[S.stack,x.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),c=i[0],s=i[1];if(c&&s){var r=c.split(`
4
+ `),y=s.split(`
5
+ `);for(n=l=0;l<r.length&&!r[l].includes("DetermineComponentFrameRoot");)l++;for(;n<y.length&&!y[n].includes("DetermineComponentFrameRoot");)n++;if(l===r.length||n===y.length)for(l=r.length-1,n=y.length-1;1<=l&&0<=n&&r[l]!==y[n];)n--;for(;1<=l&&0<=n;l--,n--)if(r[l]!==y[n]){if(l!==1||n!==1)do if(l--,n--,0>n||r[l]!==y[n]){var A=`
6
+ `+r[l].replace(" at new "," at ");return e.displayName&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",e.displayName)),A}while(1<=l&&0<=n);break}}}finally{tn=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?ua(a):""}function $n(e,t){switch(e.tag){case 26:case 27:case 5:return ua(e.type);case 16:return ua("Lazy");case 13:return e.child!==t&&t!==null?ua("Suspense Fallback"):ua("Suspense");case 19:return ua("SuspenseList");case 0:case 15:return Pt(e.type,!1);case 11:return Pt(e.type.render,!1);case 1:return Pt(e.type,!0);case 31:return ua("Activity");default:return""}}function it(e){try{var t="",a=null;do t+=$n(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
7
+ Error generating stack: `+l.message+`
8
+ `+l.stack}}var qt=Object.prototype.hasOwnProperty,Nt=g.unstable_scheduleCallback,Cl=g.unstable_cancelCallback,nu=g.unstable_shouldYield,In=g.unstable_requestPaint,ft=g.unstable_now,Ec=g.unstable_getCurrentPriorityLevel,iu=g.unstable_ImmediatePriority,Fa=g.unstable_UserBlockingPriority,Dl=g.unstable_NormalPriority,Pn=g.unstable_LowPriority,uu=g.unstable_IdlePriority,ei=g.log,cu=g.unstable_setDisableYieldValue,xa=null,dt=null;function Ee(e){if(typeof ei=="function"&&cu(e),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(xa,e)}catch{}}var Qe=Math.clz32?Math.clz32:an,su=Math.log,ti=Math.LN2;function an(e){return e>>>=0,e===0?32:31-(su(e)/ti|0)|0}var ln=256,Sa=262144,nn=4194304;function Yt(e){var t=e&42;if(t!==0)return t;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: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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function un(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var n=0,i=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var s=l&134217727;return s!==0?(l=s&~i,l!==0?n=Yt(l):(c&=s,c!==0?n=Yt(c):a||(a=s&~e,a!==0&&(n=Yt(a))))):(s=l&~i,s!==0?n=Yt(s):c!==0?n=Yt(c):a||(a=l&~e,a!==0&&(n=Yt(a)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:n}function Rl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function cn(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 ou(){var e=nn;return nn<<=1,(nn&62914560)===0&&(nn=4194304),e}function de(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function _l(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ru(e,t,a,l,n,i){var c=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var s=e.entanglements,r=e.expirationTimes,y=e.hiddenUpdates;for(a=c&~a;0<a;){var A=31-Qe(a),E=1<<A;s[A]=0,r[A]=-1;var x=y[A];if(x!==null)for(y[A]=null,A=0;A<x.length;A++){var S=x[A];S!==null&&(S.lane&=-536870913)}a&=~E}l!==0&&sn(e,l,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(c&~t))}function sn(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Qe(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function on(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-Qe(a),n=1<<l;n&t|e[l]&t&&(e[l]|=t),a&=~n}}function ai(e,t){var a=t&-t;return a=(a&42)!==0?1:ba(a),(a&(e.suspendedLanes|t))!==0?0:a}function ba(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function $a(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function li(){var e=B.p;return e!==0?e:(e=window.event,e===void 0?32:ih(e.type))}function ni(e,t){var a=B.p;try{return B.p=e,t()}finally{B.p=a}}var Qt=Math.random().toString(36).slice(2),Xe="__reactFiber$"+Qt,ut="__reactProps$"+Qt,Ia="__reactContainer$"+Qt,ii="__reactEvents$"+Qt,Mc="__reactListeners$"+Qt,zc="__reactHandles$"+Qt,fu="__reactResources$"+Qt,Ul="__reactMarker$"+Qt;function Pa(e){delete e[Xe],delete e[ut],delete e[ii],delete e[Mc],delete e[zc]}function ja(e){var t=e[Xe];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Ia]||a[Xe]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Xd(e);e!==null;){if(a=e[Xe])return a;e=Xd(e)}return t}e=a,a=e.parentNode}return null}function f(e){if(e=e[Xe]||e[Ia]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Xt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(m(33))}function ea(e){var t=e[fu];return t||(t=e[fu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Me(e){e[Ul]=!0}var ui=new Set,Aa={};function ca(e,t){el(e,t),el(e+"Capture",t)}function el(e,t){for(Aa[e]=t,e=0;e<t.length;e++)ui.add(t[e])}var Oc=RegExp("^[: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]*$"),sa={},ci={};function du(e){return qt.call(ci,e)?!0:qt.call(sa,e)?!1:Oc.test(e)?ci[e]=!0:(sa[e]=!0,!1)}function oa(e,t,a){if(du(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ra(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Je(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function ct(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Cc(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var n=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(c){a=""+c,i.call(this,c)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(c){a=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function si(e){if(!e._valueTracker){var t=hu(e)?"checked":"value";e._valueTracker=Cc(e,t,""+e[t])}}function xt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=hu(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function ht(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}}var tl=/[\n"\\]/g;function Ct(e){return e.replace(tl,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Na(e,t,a,l,n,i,c,s){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ct(t)):e.value!==""+ct(t)&&(e.value=""+ct(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?al(e,c,ct(t)):a!=null?al(e,c,ct(a)):l!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+ct(s):e.removeAttribute("name")}function rn(e,t,a,l,n,i,c,s){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){si(e);return}a=a!=null?""+ct(a):"",t=t!=null?""+ct(t):a,s||t===e.value||(e.value=t),e.defaultValue=t}l=l??n,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=s?e.checked:!!l,e.defaultChecked=!!l,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),si(e)}function al(e,t,a){t==="number"&&ht(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ll(e,t,a,l){if(e=e.options,t){t={};for(var n=0;n<a.length;n++)t["$"+a[n]]=!0;for(a=0;a<e.length;a++)n=t.hasOwnProperty("$"+e[a].value),e[a].selected!==n&&(e[a].selected=n),n&&l&&(e[a].defaultSelected=!0)}else{for(a=""+ct(a),t=null,n=0;n<e.length;n++){if(e[n].value===a){e[n].selected=!0,l&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function fn(e,t,a){if(t!=null&&(t=""+ct(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+ct(a):""}function oi(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(m(92));if(rt(l)){if(1<l.length)throw Error(m(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=ct(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),si(e)}function Ta(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var mu=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ri(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||mu.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Hl(e,t,a){if(t!=null&&typeof t!="object")throw Error(m(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var n in t)l=t[n],t.hasOwnProperty(n)&&a[n]!==l&&ri(e,n,l)}else for(var i in t)t.hasOwnProperty(i)&&ri(e,i,t[i])}function wl(e){if(e.indexOf("-")===-1)return!1;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 Dc=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Rc=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function dn(e){return Rc.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ta(){}var fa=null;function Ea(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ma=null,nl=null;function fi(e){var t=f(e);if(t&&(e=t.stateNode)){var a=e[ut]||null;e:switch(e=t.stateNode,t.type){case"input":if(Na(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Ct(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var n=l[ut]||null;if(!n)throw Error(m(90));Na(l,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&xt(l)}break e;case"textarea":fn(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&ll(e,!!a.multiple,t,!1)}}}var hn=!1;function gu(e,t,a){if(hn)return e(t,a);hn=!0;try{var l=e(t);return l}finally{if(hn=!1,(Ma!==null||nl!==null)&&(ac(),Ma&&(t=Ma,e=nl,nl=Ma=null,fi(t),e)))for(t=0;t<e.length;t++)fi(e[t])}}function za(e,t){var a=e.stateNode;if(a===null)return null;var l=a[ut]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(m(231,t,typeof a));return a}var da=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vu=!1;if(da)try{var aa={};Object.defineProperty(aa,"passive",{get:function(){vu=!0}}),window.addEventListener("test",aa,aa),window.removeEventListener("test",aa,aa)}catch{vu=!1}var St=null,ha=null,Bl=null;function pu(){if(Bl)return Bl;var e,t=ha,a=t.length,l,n="value"in St?St.value:St.textContent,i=n.length;for(e=0;e<a&&t[e]===n[e];e++);var c=a-e;for(l=1;l<=c&&t[a-l]===n[i-l];l++);return Bl=n.slice(e,1<l?1-l:void 0)}function Oa(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ca(){return!0}function mn(){return!1}function et(e){function t(a,l,n,i,c){this._reactName=a,this._targetInst=n,this.type=l,this.nativeEvent=i,this.target=c,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(a=e[s],this[s]=a?a(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ca:mn,this.isPropagationStopped=mn,this}return L(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ca)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ca)},persist:function(){},isPersistent:Ca}),t}var Da={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gn=et(Da),ma=L({},Da,{view:0,detail:0}),_c=et(ma),vn,pn,Ra,il=L({},ma,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rt,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ra&&(Ra&&e.type==="mousemove"?(vn=e.screenX-Ra.screenX,pn=e.screenY-Ra.screenY):pn=vn=0,Ra=e),vn)},movementY:function(e){return"movementY"in e?e.movementY:pn}}),di=et(il),hi=L({},il,{dataTransfer:0}),mi=et(hi),gi=L({},ma,{relatedTarget:0}),d=et(gi),M=L({},Da,{animationName:0,elapsedTime:0,pseudoElement:0}),Z=et(M),J=L({},Da,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),be=et(J),tt=L({},Da,{data:0}),ae=et(tt),Re={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dt={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Vt={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _a(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vt[e])?!!t[e]:!1}function Rt(){return _a}var ul=L({},ma,{key:function(e){if(e.key){var t=Re[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Oa(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Dt[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rt,charCode:function(e){return e.type==="keypress"?Oa(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Oa(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ll=et(ul),yu=L({},il,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xu=et(yu),Su=L({},ma,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rt}),yn=et(Su),xn=L({},Da,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gl=et(xn),Rh=L({},il,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),_h=et(Rh),Uh=L({},Da,{newState:0,oldState:0}),Hh=et(Uh),wh=[9,13,27,32],Uc=da&&"CompositionEvent"in window,vi=null;da&&"documentMode"in document&&(vi=document.documentMode);var Bh=da&&"TextEvent"in window&&!vi,qo=da&&(!Uc||vi&&8<vi&&11>=vi),Yo=" ",Qo=!1;function Xo(e,t){switch(e){case"keyup":return wh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vo(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sn=!1;function Lh(e,t){switch(e){case"compositionend":return Vo(t);case"keypress":return t.which!==32?null:(Qo=!0,Yo);case"textInput":return e=t.data,e===Yo&&Qo?null:e;default:return null}}function Gh(e,t){if(Sn)return e==="compositionend"||!Uc&&Xo(e,t)?(e=pu(),Bl=ha=St=null,Sn=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return qo&&t.locale!=="ko"?null:t.data;default:return null}}var qh={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Zo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!qh[e.type]:t==="textarea"}function Ko(e,t,a,l){Ma?nl?nl.push(l):nl=[l]:Ma=l,t=oc(t,"onChange"),0<t.length&&(a=new gn("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var pi=null,yi=null;function Yh(e){Od(e,0)}function bu(e){var t=Xt(e);if(xt(t))return e}function ko(e,t){if(e==="change")return t}var Jo=!1;if(da){var Hc;if(da){var wc="oninput"in document;if(!wc){var Wo=document.createElement("div");Wo.setAttribute("oninput","return;"),wc=typeof Wo.oninput=="function"}Hc=wc}else Hc=!1;Jo=Hc&&(!document.documentMode||9<document.documentMode)}function Fo(){pi&&(pi.detachEvent("onpropertychange",$o),yi=pi=null)}function $o(e){if(e.propertyName==="value"&&bu(yi)){var t=[];Ko(t,yi,e,Ea(e)),gu(Yh,t)}}function Qh(e,t,a){e==="focusin"?(Fo(),pi=t,yi=a,pi.attachEvent("onpropertychange",$o)):e==="focusout"&&Fo()}function Xh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return bu(yi)}function Vh(e,t){if(e==="click")return bu(t)}function Zh(e,t){if(e==="input"||e==="change")return bu(t)}function Kh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _t=typeof Object.is=="function"?Object.is:Kh;function xi(e,t){if(_t(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var n=a[l];if(!qt.call(t,n)||!_t(e[n],t[n]))return!1}return!0}function Io(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Po(e,t){var a=Io(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Io(a)}}function er(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?er(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ht(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=ht(e.document)}return t}function Bc(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")}var kh=da&&"documentMode"in document&&11>=document.documentMode,bn=null,Lc=null,Si=null,Gc=!1;function ar(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Gc||bn==null||bn!==ht(l)||(l=bn,"selectionStart"in l&&Bc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Si&&xi(Si,l)||(Si=l,l=oc(Lc,"onSelect"),0<l.length&&(t=new gn("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=bn)))}function ql(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var jn={animationend:ql("Animation","AnimationEnd"),animationiteration:ql("Animation","AnimationIteration"),animationstart:ql("Animation","AnimationStart"),transitionrun:ql("Transition","TransitionRun"),transitionstart:ql("Transition","TransitionStart"),transitioncancel:ql("Transition","TransitionCancel"),transitionend:ql("Transition","TransitionEnd")},qc={},lr={};da&&(lr=document.createElement("div").style,"AnimationEvent"in window||(delete jn.animationend.animation,delete jn.animationiteration.animation,delete jn.animationstart.animation),"TransitionEvent"in window||delete jn.transitionend.transition);function Yl(e){if(qc[e])return qc[e];if(!jn[e])return e;var t=jn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in lr)return qc[e]=t[a];return e}var nr=Yl("animationend"),ir=Yl("animationiteration"),ur=Yl("animationstart"),Jh=Yl("transitionrun"),Wh=Yl("transitionstart"),Fh=Yl("transitioncancel"),cr=Yl("transitionend"),sr=new Map,Yc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Yc.push("scrollEnd");function la(e,t){sr.set(e,t),ca(t,[e])}var ju=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Zt=[],An=0,Qc=0;function Au(){for(var e=An,t=Qc=An=0;t<e;){var a=Zt[t];Zt[t++]=null;var l=Zt[t];Zt[t++]=null;var n=Zt[t];Zt[t++]=null;var i=Zt[t];if(Zt[t++]=null,l!==null&&n!==null){var c=l.pending;c===null?n.next=n:(n.next=c.next,c.next=n),l.pending=n}i!==0&&or(a,n,i)}}function Nu(e,t,a,l){Zt[An++]=e,Zt[An++]=t,Zt[An++]=a,Zt[An++]=l,Qc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Xc(e,t,a,l){return Nu(e,t,a,l),Tu(e)}function Ql(e,t){return Nu(e,null,null,t),Tu(e)}function or(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var n=!1,i=e.return;i!==null;)i.childLanes|=a,l=i.alternate,l!==null&&(l.childLanes|=a),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(n=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,n&&t!==null&&(n=31-Qe(a),e=i.hiddenUpdates,l=e[n],l===null?e[n]=[t]:l.push(t),t.lane=a|536870912),i):null}function Tu(e){if(50<Qi)throw Qi=0,Is=null,Error(m(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Nn={};function $h(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ut(e,t,a,l){return new $h(e,t,a,l)}function Vc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ua(e,t){var a=e.alternate;return a===null?(a=Ut(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function rr(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Eu(e,t,a,l,n,i){var c=0;if(l=e,typeof e=="function")Vc(e)&&(c=1);else if(typeof e=="string")c=ag(e,a,H.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ke:return e=Ut(31,a,t,n),e.elementType=ke,e.lanes=i,e;case Se:return Xl(a.children,n,i,t);case Pe:c=8,n|=24;break;case fe:return e=Ut(12,a,t,n|2),e.elementType=fe,e.lanes=i,e;case He:return e=Ut(13,a,t,n),e.elementType=He,e.lanes=i,e;case Le:return e=Ut(19,a,t,n),e.elementType=Le,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ge:c=10;break e;case Te:c=9;break e;case Ke:c=11;break e;case F:c=14;break e;case Ce:c=16,l=null;break e}c=29,a=Error(m(130,e===null?"null":typeof e,"")),l=null}return t=Ut(c,a,t,n),t.elementType=e,t.type=l,t.lanes=i,t}function Xl(e,t,a,l){return e=Ut(7,e,l,t),e.lanes=a,e}function Zc(e,t,a){return e=Ut(6,e,null,t),e.lanes=a,e}function fr(e){var t=Ut(18,null,null,0);return t.stateNode=e,t}function Kc(e,t,a){return t=Ut(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var dr=new WeakMap;function Kt(e,t){if(typeof e=="object"&&e!==null){var a=dr.get(e);return a!==void 0?a:(t={value:e,source:t,stack:it(t)},dr.set(e,t),t)}return{value:e,source:t,stack:it(t)}}var Tn=[],En=0,Mu=null,bi=0,kt=[],Jt=0,cl=null,ga=1,va="";function Ha(e,t){Tn[En++]=bi,Tn[En++]=Mu,Mu=e,bi=t}function hr(e,t,a){kt[Jt++]=ga,kt[Jt++]=va,kt[Jt++]=cl,cl=e;var l=ga;e=va;var n=32-Qe(l)-1;l&=~(1<<n),a+=1;var i=32-Qe(t)+n;if(30<i){var c=n-n%5;i=(l&(1<<c)-1).toString(32),l>>=c,n-=c,ga=1<<32-Qe(t)+n|a<<n|l,va=i+e}else ga=1<<i|a<<n|l,va=e}function kc(e){e.return!==null&&(Ha(e,1),hr(e,1,0))}function Jc(e){for(;e===Mu;)Mu=Tn[--En],Tn[En]=null,bi=Tn[--En],Tn[En]=null;for(;e===cl;)cl=kt[--Jt],kt[Jt]=null,va=kt[--Jt],kt[Jt]=null,ga=kt[--Jt],kt[Jt]=null}function mr(e,t){kt[Jt++]=ga,kt[Jt++]=va,kt[Jt++]=cl,ga=t.id,va=t.overflow,cl=e}var mt=null,_e=null,oe=!1,sl=null,Wt=!1,Wc=Error(m(519));function ol(e){var t=Error(m(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ji(Kt(t,e)),Wc}function gr(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[Xe]=e,t[ut]=l,a){case"dialog":ne("cancel",t),ne("close",t);break;case"iframe":case"object":case"embed":ne("load",t);break;case"video":case"audio":for(a=0;a<Vi.length;a++)ne(Vi[a],t);break;case"source":ne("error",t);break;case"img":case"image":case"link":ne("error",t),ne("load",t);break;case"details":ne("toggle",t);break;case"input":ne("invalid",t),rn(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ne("invalid",t);break;case"textarea":ne("invalid",t),oi(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||_d(t.textContent,a)?(l.popover!=null&&(ne("beforetoggle",t),ne("toggle",t)),l.onScroll!=null&&ne("scroll",t),l.onScrollEnd!=null&&ne("scrollend",t),l.onClick!=null&&(t.onclick=ta),t=!0):t=!1,t||ol(e,!0)}function vr(e){for(mt=e.return;mt;)switch(mt.tag){case 5:case 31:case 13:Wt=!1;return;case 27:case 3:Wt=!0;return;default:mt=mt.return}}function Mn(e){if(e!==mt)return!1;if(!oe)return vr(e),oe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||mo(e.type,e.memoizedProps)),a=!a),a&&_e&&ol(e),vr(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(m(317));_e=Qd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(m(317));_e=Qd(e)}else t===27?(t=_e,Al(e.type)?(e=xo,xo=null,_e=e):_e=t):_e=mt?$t(e.stateNode.nextSibling):null;return!0}function Vl(){_e=mt=null,oe=!1}function Fc(){var e=sl;return e!==null&&(zt===null?zt=e:zt.push.apply(zt,e),sl=null),e}function ji(e){sl===null?sl=[e]:sl.push(e)}var $c=o(null),Zl=null,wa=null;function rl(e,t,a){D($c,t._currentValue),t._currentValue=a}function Ba(e){e._currentValue=$c.current,j($c)}function Ic(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Pc(e,t,a,l){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var c=n.child;i=i.firstContext;e:for(;i!==null;){var s=i;i=n;for(var r=0;r<t.length;r++)if(s.context===t[r]){i.lanes|=a,s=i.alternate,s!==null&&(s.lanes|=a),Ic(i.return,a,e),l||(c=null);break e}i=s.next}}else if(n.tag===18){if(c=n.return,c===null)throw Error(m(341));c.lanes|=a,i=c.alternate,i!==null&&(i.lanes|=a),Ic(c,a,e),c=null}else c=n.child;if(c!==null)c.return=n;else for(c=n;c!==null;){if(c===e){c=null;break}if(n=c.sibling,n!==null){n.return=c.return,c=n;break}c=c.return}n=c}}function zn(e,t,a,l){e=null;for(var n=t,i=!1;n!==null;){if(!i){if((n.flags&524288)!==0)i=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var c=n.alternate;if(c===null)throw Error(m(387));if(c=c.memoizedProps,c!==null){var s=n.type;_t(n.pendingProps.value,c.value)||(e!==null?e.push(s):e=[s])}}else if(n===P.current){if(c=n.alternate,c===null)throw Error(m(387));c.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(Wi):e=[Wi])}n=n.return}e!==null&&Pc(t,e,a,l),t.flags|=262144}function zu(e){for(e=e.firstContext;e!==null;){if(!_t(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Kl(e){Zl=e,wa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function gt(e){return pr(Zl,e)}function Ou(e,t){return Zl===null&&Kl(e),pr(e,t)}function pr(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},wa===null){if(e===null)throw Error(m(308));wa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else wa=wa.next=t;return a}var Ih=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Ph=g.unstable_scheduleCallback,em=g.unstable_NormalPriority,We={$$typeof:ge,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function es(){return{controller:new Ih,data:new Map,refCount:0}}function Ai(e){e.refCount--,e.refCount===0&&Ph(em,function(){e.controller.abort()})}var Ni=null,ts=0,On=0,Cn=null;function tm(e,t){if(Ni===null){var a=Ni=[];ts=0,On=no(),Cn={status:"pending",value:void 0,then:function(l){a.push(l)}}}return ts++,t.then(yr,yr),t}function yr(){if(--ts===0&&Ni!==null){Cn!==null&&(Cn.status="fulfilled");var e=Ni;Ni=null,On=0,Cn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function am(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(n){a.push(n)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var n=0;n<a.length;n++)(0,a[n])(t)},function(n){for(l.status="rejected",l.reason=n,n=0;n<a.length;n++)(0,a[n])(void 0)}),l}var xr=b.S;b.S=function(e,t){ld=ft(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&tm(e,t),xr!==null&&xr(e,t)};var kl=o(null);function as(){var e=kl.current;return e!==null?e:ze.pooledCache}function Cu(e,t){t===null?D(kl,kl.current):D(kl,t.pool)}function Sr(){var e=as();return e===null?null:{parent:We._currentValue,pool:e}}var Dn=Error(m(460)),ls=Error(m(474)),Du=Error(m(542)),Ru={then:function(){}};function br(e){return e=e.status,e==="fulfilled"||e==="rejected"}function jr(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(ta,ta),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Nr(e),e;default:if(typeof t.status=="string")t.then(ta,ta);else{if(e=ze,e!==null&&100<e.shellSuspendCounter)throw Error(m(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=l}},function(l){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Nr(e),e}throw Wl=t,Dn}}function Jl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Wl=a,Dn):a}}var Wl=null;function Ar(){if(Wl===null)throw Error(m(459));var e=Wl;return Wl=null,e}function Nr(e){if(e===Dn||e===Du)throw Error(m(483))}var Rn=null,Ti=0;function _u(e){var t=Ti;return Ti+=1,Rn===null&&(Rn=[]),jr(Rn,e,t)}function Ei(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Uu(e,t){throw t.$$typeof===ie?Error(m(525)):(e=Object.prototype.toString.call(t),Error(m(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Tr(e){function t(v,h){if(e){var p=v.deletions;p===null?(v.deletions=[h],v.flags|=16):p.push(h)}}function a(v,h){if(!e)return null;for(;h!==null;)t(v,h),h=h.sibling;return null}function l(v){for(var h=new Map;v!==null;)v.key!==null?h.set(v.key,v):h.set(v.index,v),v=v.sibling;return h}function n(v,h){return v=Ua(v,h),v.index=0,v.sibling=null,v}function i(v,h,p){return v.index=p,e?(p=v.alternate,p!==null?(p=p.index,p<h?(v.flags|=67108866,h):p):(v.flags|=67108866,h)):(v.flags|=1048576,h)}function c(v){return e&&v.alternate===null&&(v.flags|=67108866),v}function s(v,h,p,T){return h===null||h.tag!==6?(h=Zc(p,v.mode,T),h.return=v,h):(h=n(h,p),h.return=v,h)}function r(v,h,p,T){var X=p.type;return X===Se?A(v,h,p.props.children,T,p.key):h!==null&&(h.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===Ce&&Jl(X)===h.type)?(h=n(h,p.props),Ei(h,p),h.return=v,h):(h=Eu(p.type,p.key,p.props,null,v.mode,T),Ei(h,p),h.return=v,h)}function y(v,h,p,T){return h===null||h.tag!==4||h.stateNode.containerInfo!==p.containerInfo||h.stateNode.implementation!==p.implementation?(h=Kc(p,v.mode,T),h.return=v,h):(h=n(h,p.children||[]),h.return=v,h)}function A(v,h,p,T,X){return h===null||h.tag!==7?(h=Xl(p,v.mode,T,X),h.return=v,h):(h=n(h,p),h.return=v,h)}function E(v,h,p){if(typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint")return h=Zc(""+h,v.mode,p),h.return=v,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case re:return p=Eu(h.type,h.key,h.props,null,v.mode,p),Ei(p,h),p.return=v,p;case Oe:return h=Kc(h,v.mode,p),h.return=v,h;case Ce:return h=Jl(h),E(v,h,p)}if(rt(h)||pe(h))return h=Xl(h,v.mode,p,null),h.return=v,h;if(typeof h.then=="function")return E(v,_u(h),p);if(h.$$typeof===ge)return E(v,Ou(v,h),p);Uu(v,h)}return null}function x(v,h,p,T){var X=h!==null?h.key:null;if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return X!==null?null:s(v,h,""+p,T);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case re:return p.key===X?r(v,h,p,T):null;case Oe:return p.key===X?y(v,h,p,T):null;case Ce:return p=Jl(p),x(v,h,p,T)}if(rt(p)||pe(p))return X!==null?null:A(v,h,p,T,null);if(typeof p.then=="function")return x(v,h,_u(p),T);if(p.$$typeof===ge)return x(v,h,Ou(v,p),T);Uu(v,p)}return null}function S(v,h,p,T,X){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return v=v.get(p)||null,s(h,v,""+T,X);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case re:return v=v.get(T.key===null?p:T.key)||null,r(h,v,T,X);case Oe:return v=v.get(T.key===null?p:T.key)||null,y(h,v,T,X);case Ce:return T=Jl(T),S(v,h,p,T,X)}if(rt(T)||pe(T))return v=v.get(p)||null,A(h,v,T,X,null);if(typeof T.then=="function")return S(v,h,p,_u(T),X);if(T.$$typeof===ge)return S(v,h,p,Ou(h,T),X);Uu(h,T)}return null}function G(v,h,p,T){for(var X=null,he=null,Y=h,ee=h=0,ce=null;Y!==null&&ee<p.length;ee++){Y.index>ee?(ce=Y,Y=null):ce=Y.sibling;var me=x(v,Y,p[ee],T);if(me===null){Y===null&&(Y=ce);break}e&&Y&&me.alternate===null&&t(v,Y),h=i(me,h,ee),he===null?X=me:he.sibling=me,he=me,Y=ce}if(ee===p.length)return a(v,Y),oe&&Ha(v,ee),X;if(Y===null){for(;ee<p.length;ee++)Y=E(v,p[ee],T),Y!==null&&(h=i(Y,h,ee),he===null?X=Y:he.sibling=Y,he=Y);return oe&&Ha(v,ee),X}for(Y=l(Y);ee<p.length;ee++)ce=S(Y,v,ee,p[ee],T),ce!==null&&(e&&ce.alternate!==null&&Y.delete(ce.key===null?ee:ce.key),h=i(ce,h,ee),he===null?X=ce:he.sibling=ce,he=ce);return e&&Y.forEach(function(zl){return t(v,zl)}),oe&&Ha(v,ee),X}function k(v,h,p,T){if(p==null)throw Error(m(151));for(var X=null,he=null,Y=h,ee=h=0,ce=null,me=p.next();Y!==null&&!me.done;ee++,me=p.next()){Y.index>ee?(ce=Y,Y=null):ce=Y.sibling;var zl=x(v,Y,me.value,T);if(zl===null){Y===null&&(Y=ce);break}e&&Y&&zl.alternate===null&&t(v,Y),h=i(zl,h,ee),he===null?X=zl:he.sibling=zl,he=zl,Y=ce}if(me.done)return a(v,Y),oe&&Ha(v,ee),X;if(Y===null){for(;!me.done;ee++,me=p.next())me=E(v,me.value,T),me!==null&&(h=i(me,h,ee),he===null?X=me:he.sibling=me,he=me);return oe&&Ha(v,ee),X}for(Y=l(Y);!me.done;ee++,me=p.next())me=S(Y,v,ee,me.value,T),me!==null&&(e&&me.alternate!==null&&Y.delete(me.key===null?ee:me.key),h=i(me,h,ee),he===null?X=me:he.sibling=me,he=me);return e&&Y.forEach(function(hg){return t(v,hg)}),oe&&Ha(v,ee),X}function Ne(v,h,p,T){if(typeof p=="object"&&p!==null&&p.type===Se&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case re:e:{for(var X=p.key;h!==null;){if(h.key===X){if(X=p.type,X===Se){if(h.tag===7){a(v,h.sibling),T=n(h,p.props.children),T.return=v,v=T;break e}}else if(h.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===Ce&&Jl(X)===h.type){a(v,h.sibling),T=n(h,p.props),Ei(T,p),T.return=v,v=T;break e}a(v,h);break}else t(v,h);h=h.sibling}p.type===Se?(T=Xl(p.props.children,v.mode,T,p.key),T.return=v,v=T):(T=Eu(p.type,p.key,p.props,null,v.mode,T),Ei(T,p),T.return=v,v=T)}return c(v);case Oe:e:{for(X=p.key;h!==null;){if(h.key===X)if(h.tag===4&&h.stateNode.containerInfo===p.containerInfo&&h.stateNode.implementation===p.implementation){a(v,h.sibling),T=n(h,p.children||[]),T.return=v,v=T;break e}else{a(v,h);break}else t(v,h);h=h.sibling}T=Kc(p,v.mode,T),T.return=v,v=T}return c(v);case Ce:return p=Jl(p),Ne(v,h,p,T)}if(rt(p))return G(v,h,p,T);if(pe(p)){if(X=pe(p),typeof X!="function")throw Error(m(150));return p=X.call(p),k(v,h,p,T)}if(typeof p.then=="function")return Ne(v,h,_u(p),T);if(p.$$typeof===ge)return Ne(v,h,Ou(v,p),T);Uu(v,p)}return typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint"?(p=""+p,h!==null&&h.tag===6?(a(v,h.sibling),T=n(h,p),T.return=v,v=T):(a(v,h),T=Zc(p,v.mode,T),T.return=v,v=T),c(v)):a(v,h)}return function(v,h,p,T){try{Ti=0;var X=Ne(v,h,p,T);return Rn=null,X}catch(Y){if(Y===Dn||Y===Du)throw Y;var he=Ut(29,Y,null,v.mode);return he.lanes=T,he.return=v,he}}}var Fl=Tr(!0),Er=Tr(!1),fl=!1;function ns(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function is(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function dl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function hl(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(ve&2)!==0){var n=l.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),l.pending=t,t=Tu(e),or(e,null,a),t}return Nu(e,l,t,a),Tu(e)}function Mi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,on(e,a)}}function us(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var n=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var c={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?n=i=c:i=i.next=c,a=a.next}while(a!==null);i===null?n=i=t:i=i.next=t}else n=i=t;a={baseState:l.baseState,firstBaseUpdate:n,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var cs=!1;function zi(){if(cs){var e=Cn;if(e!==null)throw e}}function Oi(e,t,a,l){cs=!1;var n=e.updateQueue;fl=!1;var i=n.firstBaseUpdate,c=n.lastBaseUpdate,s=n.shared.pending;if(s!==null){n.shared.pending=null;var r=s,y=r.next;r.next=null,c===null?i=y:c.next=y,c=r;var A=e.alternate;A!==null&&(A=A.updateQueue,s=A.lastBaseUpdate,s!==c&&(s===null?A.firstBaseUpdate=y:s.next=y,A.lastBaseUpdate=r))}if(i!==null){var E=n.baseState;c=0,A=y=r=null,s=i;do{var x=s.lane&-536870913,S=x!==s.lane;if(S?(ue&x)===x:(l&x)===x){x!==0&&x===On&&(cs=!0),A!==null&&(A=A.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var G=e,k=s;x=t;var Ne=a;switch(k.tag){case 1:if(G=k.payload,typeof G=="function"){E=G.call(Ne,E,x);break e}E=G;break e;case 3:G.flags=G.flags&-65537|128;case 0:if(G=k.payload,x=typeof G=="function"?G.call(Ne,E,x):G,x==null)break e;E=L({},E,x);break e;case 2:fl=!0}}x=s.callback,x!==null&&(e.flags|=64,S&&(e.flags|=8192),S=n.callbacks,S===null?n.callbacks=[x]:S.push(x))}else S={lane:x,tag:s.tag,payload:s.payload,callback:s.callback,next:null},A===null?(y=A=S,r=E):A=A.next=S,c|=x;if(s=s.next,s===null){if(s=n.shared.pending,s===null)break;S=s,s=S.next,S.next=null,n.lastBaseUpdate=S,n.shared.pending=null}}while(!0);A===null&&(r=E),n.baseState=r,n.firstBaseUpdate=y,n.lastBaseUpdate=A,i===null&&(n.shared.lanes=0),yl|=c,e.lanes=c,e.memoizedState=E}}function Mr(e,t){if(typeof e!="function")throw Error(m(191,e));e.call(t)}function zr(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Mr(a[e],t)}var _n=o(null),Hu=o(0);function Or(e,t){e=Ka,D(Hu,e),D(_n,t),Ka=e|t.baseLanes}function ss(){D(Hu,Ka),D(_n,_n.current)}function os(){Ka=Hu.current,j(_n),j(Hu)}var Ht=o(null),Ft=null;function ml(e){var t=e.alternate;D(Ve,Ve.current&1),D(Ht,e),Ft===null&&(t===null||_n.current!==null||t.memoizedState!==null)&&(Ft=e)}function rs(e){D(Ve,Ve.current),D(Ht,e),Ft===null&&(Ft=e)}function Cr(e){e.tag===22?(D(Ve,Ve.current),D(Ht,e),Ft===null&&(Ft=e)):gl()}function gl(){D(Ve,Ve.current),D(Ht,Ht.current)}function wt(e){j(Ht),Ft===e&&(Ft=null),j(Ve)}var Ve=o(0);function wu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||po(a)||yo(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var La=0,I=null,je=null,Fe=null,Bu=!1,Un=!1,$l=!1,Lu=0,Ci=0,Hn=null,lm=0;function Ge(){throw Error(m(321))}function fs(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!_t(e[a],t[a]))return!1;return!0}function ds(e,t,a,l,n,i){return La=i,I=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,b.H=e===null||e.memoizedState===null?mf:Ms,$l=!1,i=a(l,n),$l=!1,Un&&(i=Rr(t,a,l,n)),Dr(e),i}function Dr(e){b.H=_i;var t=je!==null&&je.next!==null;if(La=0,Fe=je=I=null,Bu=!1,Ci=0,Hn=null,t)throw Error(m(300));e===null||$e||(e=e.dependencies,e!==null&&zu(e)&&($e=!0))}function Rr(e,t,a,l){I=e;var n=0;do{if(Un&&(Hn=null),Ci=0,Un=!1,25<=n)throw Error(m(301));if(n+=1,Fe=je=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}b.H=gf,i=t(a,l)}while(Un);return i}function nm(){var e=b.H,t=e.useState()[0];return t=typeof t.then=="function"?Di(t):t,e=e.useState()[0],(je!==null?je.memoizedState:null)!==e&&(I.flags|=1024),t}function hs(){var e=Lu!==0;return Lu=0,e}function ms(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function gs(e){if(Bu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Bu=!1}La=0,Fe=je=I=null,Un=!1,Ci=Lu=0,Hn=null}function bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fe===null?I.memoizedState=Fe=e:Fe=Fe.next=e,Fe}function Ze(){if(je===null){var e=I.alternate;e=e!==null?e.memoizedState:null}else e=je.next;var t=Fe===null?I.memoizedState:Fe.next;if(t!==null)Fe=t,je=e;else{if(e===null)throw I.alternate===null?Error(m(467)):Error(m(310));je=e,e={memoizedState:je.memoizedState,baseState:je.baseState,baseQueue:je.baseQueue,queue:je.queue,next:null},Fe===null?I.memoizedState=Fe=e:Fe=Fe.next=e}return Fe}function Gu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Di(e){var t=Ci;return Ci+=1,Hn===null&&(Hn=[]),e=jr(Hn,e,t),t=I,(Fe===null?t.memoizedState:Fe.next)===null&&(t=t.alternate,b.H=t===null||t.memoizedState===null?mf:Ms),e}function qu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Di(e);if(e.$$typeof===ge)return gt(e)}throw Error(m(438,String(e)))}function vs(e){var t=null,a=I.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=I.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Gu(),I.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=ot;return t.index++,a}function Ga(e,t){return typeof t=="function"?t(e):t}function Yu(e){var t=Ze();return ps(t,je,e)}function ps(e,t,a){var l=e.queue;if(l===null)throw Error(m(311));l.lastRenderedReducer=a;var n=e.baseQueue,i=l.pending;if(i!==null){if(n!==null){var c=n.next;n.next=i.next,i.next=c}t.baseQueue=n=i,l.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var s=c=null,r=null,y=t,A=!1;do{var E=y.lane&-536870913;if(E!==y.lane?(ue&E)===E:(La&E)===E){var x=y.revertLane;if(x===0)r!==null&&(r=r.next={lane:0,revertLane:0,gesture:null,action:y.action,hasEagerState:y.hasEagerState,eagerState:y.eagerState,next:null}),E===On&&(A=!0);else if((La&x)===x){y=y.next,x===On&&(A=!0);continue}else E={lane:0,revertLane:y.revertLane,gesture:null,action:y.action,hasEagerState:y.hasEagerState,eagerState:y.eagerState,next:null},r===null?(s=r=E,c=i):r=r.next=E,I.lanes|=x,yl|=x;E=y.action,$l&&a(i,E),i=y.hasEagerState?y.eagerState:a(i,E)}else x={lane:E,revertLane:y.revertLane,gesture:y.gesture,action:y.action,hasEagerState:y.hasEagerState,eagerState:y.eagerState,next:null},r===null?(s=r=x,c=i):r=r.next=x,I.lanes|=E,yl|=E;y=y.next}while(y!==null&&y!==t);if(r===null?c=i:r.next=s,!_t(i,e.memoizedState)&&($e=!0,A&&(a=Cn,a!==null)))throw a;e.memoizedState=i,e.baseState=c,e.baseQueue=r,l.lastRenderedState=i}return n===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function ys(e){var t=Ze(),a=t.queue;if(a===null)throw Error(m(311));a.lastRenderedReducer=e;var l=a.dispatch,n=a.pending,i=t.memoizedState;if(n!==null){a.pending=null;var c=n=n.next;do i=e(i,c.action),c=c.next;while(c!==n);_t(i,t.memoizedState)||($e=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),a.lastRenderedState=i}return[i,l]}function _r(e,t,a){var l=I,n=Ze(),i=oe;if(i){if(a===void 0)throw Error(m(407));a=a()}else a=t();var c=!_t((je||n).memoizedState,a);if(c&&(n.memoizedState=a,$e=!0),n=n.queue,bs(wr.bind(null,l,n,e),[e]),n.getSnapshot!==t||c||Fe!==null&&Fe.memoizedState.tag&1){if(l.flags|=2048,wn(9,{destroy:void 0},Hr.bind(null,l,n,a,t),null),ze===null)throw Error(m(349));i||(La&127)!==0||Ur(l,t,a)}return a}function Ur(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=I.updateQueue,t===null?(t=Gu(),I.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Hr(e,t,a,l){t.value=a,t.getSnapshot=l,Br(t)&&Lr(e)}function wr(e,t,a){return a(function(){Br(t)&&Lr(e)})}function Br(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!_t(e,a)}catch{return!0}}function Lr(e){var t=Ql(e,2);t!==null&&Ot(t,e,2)}function xs(e){var t=bt();if(typeof e=="function"){var a=e;if(e=a(),$l){Ee(!0);try{a()}finally{Ee(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ga,lastRenderedState:e},t}function Gr(e,t,a,l){return e.baseState=a,ps(e,je,typeof l=="function"?l:Ga)}function im(e,t,a,l,n){if(Vu(e))throw Error(m(485));if(e=t.action,e!==null){var i={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){i.listeners.push(c)}};b.T!==null?a(!0):i.isTransition=!1,l(i),a=t.pending,a===null?(i.next=t.pending=i,qr(t,i)):(i.next=a.next,t.pending=a.next=i)}}function qr(e,t){var a=t.action,l=t.payload,n=e.state;if(t.isTransition){var i=b.T,c={};b.T=c;try{var s=a(n,l),r=b.S;r!==null&&r(c,s),Yr(e,t,s)}catch(y){Ss(e,t,y)}finally{i!==null&&c.types!==null&&(i.types=c.types),b.T=i}}else try{i=a(n,l),Yr(e,t,i)}catch(y){Ss(e,t,y)}}function Yr(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Qr(e,t,l)},function(l){return Ss(e,t,l)}):Qr(e,t,a)}function Qr(e,t,a){t.status="fulfilled",t.value=a,Xr(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,qr(e,a)))}function Ss(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,Xr(t),t=t.next;while(t!==l)}e.action=null}function Xr(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Vr(e,t){return t}function Zr(e,t){if(oe){var a=ze.formState;if(a!==null){e:{var l=I;if(oe){if(_e){t:{for(var n=_e,i=Wt;n.nodeType!==8;){if(!i){n=null;break t}if(n=$t(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){_e=$t(n.nextSibling),l=n.data==="F!";break e}}ol(l)}l=!1}l&&(t=a[0])}}return a=bt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vr,lastRenderedState:t},a.queue=l,a=ff.bind(null,I,l),l.dispatch=a,l=xs(!1),i=Es.bind(null,I,!1,l.queue),l=bt(),n={state:t,dispatch:null,action:e,pending:null},l.queue=n,a=im.bind(null,I,n,i,a),n.dispatch=a,l.memoizedState=e,[t,a,!1]}function Kr(e){var t=Ze();return kr(t,je,e)}function kr(e,t,a){if(t=ps(e,t,Vr)[0],e=Yu(Ga)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Di(t)}catch(c){throw c===Dn?Du:c}else l=t;t=Ze();var n=t.queue,i=n.dispatch;return a!==t.memoizedState&&(I.flags|=2048,wn(9,{destroy:void 0},um.bind(null,n,a),null)),[l,i,e]}function um(e,t){e.action=t}function Jr(e){var t=Ze(),a=je;if(a!==null)return kr(t,a,e);Ze(),t=t.memoizedState,a=Ze();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function wn(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=I.updateQueue,t===null&&(t=Gu(),I.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function Wr(){return Ze().memoizedState}function Qu(e,t,a,l){var n=bt();I.flags|=e,n.memoizedState=wn(1|t,{destroy:void 0},a,l===void 0?null:l)}function Xu(e,t,a,l){var n=Ze();l=l===void 0?null:l;var i=n.memoizedState.inst;je!==null&&l!==null&&fs(l,je.memoizedState.deps)?n.memoizedState=wn(t,i,a,l):(I.flags|=e,n.memoizedState=wn(1|t,i,a,l))}function Fr(e,t){Qu(8390656,8,e,t)}function bs(e,t){Xu(2048,8,e,t)}function cm(e){I.flags|=4;var t=I.updateQueue;if(t===null)t=Gu(),I.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function $r(e){var t=Ze().memoizedState;return cm({ref:t,nextImpl:e}),function(){if((ve&2)!==0)throw Error(m(440));return t.impl.apply(void 0,arguments)}}function Ir(e,t){return Xu(4,2,e,t)}function Pr(e,t){return Xu(4,4,e,t)}function ef(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function tf(e,t,a){a=a!=null?a.concat([e]):null,Xu(4,4,ef.bind(null,t,e),a)}function js(){}function af(e,t){var a=Ze();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&fs(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function lf(e,t){var a=Ze();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&fs(t,l[1]))return l[0];if(l=e(),$l){Ee(!0);try{e()}finally{Ee(!1)}}return a.memoizedState=[l,t],l}function As(e,t,a){return a===void 0||(La&1073741824)!==0&&(ue&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=id(),I.lanes|=e,yl|=e,a)}function nf(e,t,a,l){return _t(a,t)?a:_n.current!==null?(e=As(e,a,l),_t(e,t)||($e=!0),e):(La&42)===0||(La&1073741824)!==0&&(ue&261930)===0?($e=!0,e.memoizedState=a):(e=id(),I.lanes|=e,yl|=e,t)}function uf(e,t,a,l,n){var i=B.p;B.p=i!==0&&8>i?i:8;var c=b.T,s={};b.T=s,Es(e,!1,t,a);try{var r=n(),y=b.S;if(y!==null&&y(s,r),r!==null&&typeof r=="object"&&typeof r.then=="function"){var A=am(r,l);Ri(e,t,A,Gt(e))}else Ri(e,t,l,Gt(e))}catch(E){Ri(e,t,{then:function(){},status:"rejected",reason:E},Gt())}finally{B.p=i,c!==null&&s.types!==null&&(c.types=s.types),b.T=c}}function sm(){}function Ns(e,t,a,l){if(e.tag!==5)throw Error(m(476));var n=cf(e).queue;uf(e,n,t,V,a===null?sm:function(){return sf(e),a(l)})}function cf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ga,lastRenderedState:V},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ga,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function sf(e){var t=cf(e);t.next===null&&(t=e.alternate.memoizedState),Ri(e,t.next.queue,{},Gt())}function Ts(){return gt(Wi)}function of(){return Ze().memoizedState}function rf(){return Ze().memoizedState}function om(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Gt();e=dl(a);var l=hl(t,e,a);l!==null&&(Ot(l,t,a),Mi(l,t,a)),t={cache:es()},e.payload=t;return}t=t.return}}function rm(e,t,a){var l=Gt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Vu(e)?df(t,a):(a=Xc(e,t,a,l),a!==null&&(Ot(a,e,l),hf(a,t,l)))}function ff(e,t,a){var l=Gt();Ri(e,t,a,l)}function Ri(e,t,a,l){var n={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Vu(e))df(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var c=t.lastRenderedState,s=i(c,a);if(n.hasEagerState=!0,n.eagerState=s,_t(s,c))return Nu(e,t,n,0),ze===null&&Au(),!1}catch{}if(a=Xc(e,t,n,l),a!==null)return Ot(a,e,l),hf(a,t,l),!0}return!1}function Es(e,t,a,l){if(l={lane:2,revertLane:no(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Vu(e)){if(t)throw Error(m(479))}else t=Xc(e,a,l,2),t!==null&&Ot(t,e,2)}function Vu(e){var t=e.alternate;return e===I||t!==null&&t===I}function df(e,t){Un=Bu=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function hf(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,on(e,a)}}var _i={readContext:gt,use:qu,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};_i.useEffectEvent=Ge;var mf={readContext:gt,use:qu,useCallback:function(e,t){return bt().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Fr,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Qu(4194308,4,ef.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Qu(4194308,4,e,t)},useInsertionEffect:function(e,t){Qu(4,2,e,t)},useMemo:function(e,t){var a=bt();t=t===void 0?null:t;var l=e();if($l){Ee(!0);try{e()}finally{Ee(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=bt();if(a!==void 0){var n=a(t);if($l){Ee(!0);try{a(t)}finally{Ee(!1)}}}else n=t;return l.memoizedState=l.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},l.queue=e,e=e.dispatch=rm.bind(null,I,e),[l.memoizedState,e]},useRef:function(e){var t=bt();return e={current:e},t.memoizedState=e},useState:function(e){e=xs(e);var t=e.queue,a=ff.bind(null,I,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:js,useDeferredValue:function(e,t){var a=bt();return As(a,e,t)},useTransition:function(){var e=xs(!1);return e=uf.bind(null,I,e.queue,!0,!1),bt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=I,n=bt();if(oe){if(a===void 0)throw Error(m(407));a=a()}else{if(a=t(),ze===null)throw Error(m(349));(ue&127)!==0||Ur(l,t,a)}n.memoizedState=a;var i={value:a,getSnapshot:t};return n.queue=i,Fr(wr.bind(null,l,i,e),[e]),l.flags|=2048,wn(9,{destroy:void 0},Hr.bind(null,l,i,a,t),null),a},useId:function(){var e=bt(),t=ze.identifierPrefix;if(oe){var a=va,l=ga;a=(l&~(1<<32-Qe(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Lu++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=lm++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ts,useFormState:Zr,useActionState:Zr,useOptimistic:function(e){var t=bt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Es.bind(null,I,!0,a),a.dispatch=t,[e,t]},useMemoCache:vs,useCacheRefresh:function(){return bt().memoizedState=om.bind(null,I)},useEffectEvent:function(e){var t=bt(),a={impl:e};return t.memoizedState=a,function(){if((ve&2)!==0)throw Error(m(440));return a.impl.apply(void 0,arguments)}}},Ms={readContext:gt,use:qu,useCallback:af,useContext:gt,useEffect:bs,useImperativeHandle:tf,useInsertionEffect:Ir,useLayoutEffect:Pr,useMemo:lf,useReducer:Yu,useRef:Wr,useState:function(){return Yu(Ga)},useDebugValue:js,useDeferredValue:function(e,t){var a=Ze();return nf(a,je.memoizedState,e,t)},useTransition:function(){var e=Yu(Ga)[0],t=Ze().memoizedState;return[typeof e=="boolean"?e:Di(e),t]},useSyncExternalStore:_r,useId:of,useHostTransitionStatus:Ts,useFormState:Kr,useActionState:Kr,useOptimistic:function(e,t){var a=Ze();return Gr(a,je,e,t)},useMemoCache:vs,useCacheRefresh:rf};Ms.useEffectEvent=$r;var gf={readContext:gt,use:qu,useCallback:af,useContext:gt,useEffect:bs,useImperativeHandle:tf,useInsertionEffect:Ir,useLayoutEffect:Pr,useMemo:lf,useReducer:ys,useRef:Wr,useState:function(){return ys(Ga)},useDebugValue:js,useDeferredValue:function(e,t){var a=Ze();return je===null?As(a,e,t):nf(a,je.memoizedState,e,t)},useTransition:function(){var e=ys(Ga)[0],t=Ze().memoizedState;return[typeof e=="boolean"?e:Di(e),t]},useSyncExternalStore:_r,useId:of,useHostTransitionStatus:Ts,useFormState:Jr,useActionState:Jr,useOptimistic:function(e,t){var a=Ze();return je!==null?Gr(a,je,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:vs,useCacheRefresh:rf};gf.useEffectEvent=$r;function zs(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:L({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Os={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Gt(),n=dl(l);n.payload=t,a!=null&&(n.callback=a),t=hl(e,n,l),t!==null&&(Ot(t,e,l),Mi(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Gt(),n=dl(l);n.tag=1,n.payload=t,a!=null&&(n.callback=a),t=hl(e,n,l),t!==null&&(Ot(t,e,l),Mi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Gt(),l=dl(a);l.tag=2,t!=null&&(l.callback=t),t=hl(e,l,a),t!==null&&(Ot(t,e,a),Mi(t,e,a))}};function vf(e,t,a,l,n,i,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,c):t.prototype&&t.prototype.isPureReactComponent?!xi(a,l)||!xi(n,i):!0}function pf(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&Os.enqueueReplaceState(t,t.state,null)}function Il(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=L({},a));for(var n in e)a[n]===void 0&&(a[n]=e[n])}return a}function yf(e){ju(e)}function xf(e){console.error(e)}function Sf(e){ju(e)}function Zu(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function bf(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Cs(e,t,a){return a=dl(a),a.tag=3,a.payload={element:null},a.callback=function(){Zu(e,t)},a}function jf(e){return e=dl(e),e.tag=3,e}function Af(e,t,a,l){var n=a.type.getDerivedStateFromError;if(typeof n=="function"){var i=l.value;e.payload=function(){return n(i)},e.callback=function(){bf(t,a,l)}}var c=a.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){bf(t,a,l),typeof n!="function"&&(xl===null?xl=new Set([this]):xl.add(this));var s=l.stack;this.componentDidCatch(l.value,{componentStack:s!==null?s:""})})}function fm(e,t,a,l,n){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&zn(t,a,n,!0),a=Ht.current,a!==null){switch(a.tag){case 31:case 13:return Ft===null?lc():a.alternate===null&&qe===0&&(qe=3),a.flags&=-257,a.flags|=65536,a.lanes=n,l===Ru?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),to(e,l,n)),!1;case 22:return a.flags|=65536,l===Ru?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),to(e,l,n)),!1}throw Error(m(435,a.tag))}return to(e,l,n),lc(),!1}if(oe)return t=Ht.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,l!==Wc&&(e=Error(m(422),{cause:l}),ji(Kt(e,a)))):(l!==Wc&&(t=Error(m(423),{cause:l}),ji(Kt(t,a))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,l=Kt(l,a),n=Cs(e.stateNode,l,n),us(e,n),qe!==4&&(qe=2)),!1;var i=Error(m(520),{cause:l});if(i=Kt(i,a),Yi===null?Yi=[i]:Yi.push(i),qe!==4&&(qe=2),t===null)return!0;l=Kt(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=n&-n,a.lanes|=e,e=Cs(a.stateNode,l,e),us(a,e),!1;case 1:if(t=a.type,i=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(xl===null||!xl.has(i))))return a.flags|=65536,n&=-n,a.lanes|=n,n=jf(n),Af(n,e,a,l),us(a,n),!1}a=a.return}while(a!==null);return!1}var Ds=Error(m(461)),$e=!1;function vt(e,t,a,l){t.child=e===null?Er(t,null,a,l):Fl(t,e.child,a,l)}function Nf(e,t,a,l,n){a=a.render;var i=t.ref;if("ref"in l){var c={};for(var s in l)s!=="ref"&&(c[s]=l[s])}else c=l;return Kl(t),l=ds(e,t,a,c,i,n),s=hs(),e!==null&&!$e?(ms(e,t,n),qa(e,t,n)):(oe&&s&&kc(t),t.flags|=1,vt(e,t,l,n),t.child)}function Tf(e,t,a,l,n){if(e===null){var i=a.type;return typeof i=="function"&&!Vc(i)&&i.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=i,Ef(e,t,i,l,n)):(e=Eu(a.type,null,l,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Gs(e,n)){var c=i.memoizedProps;if(a=a.compare,a=a!==null?a:xi,a(c,l)&&e.ref===t.ref)return qa(e,t,n)}return t.flags|=1,e=Ua(i,l),e.ref=t.ref,e.return=t,t.child=e}function Ef(e,t,a,l,n){if(e!==null){var i=e.memoizedProps;if(xi(i,l)&&e.ref===t.ref)if($e=!1,t.pendingProps=l=i,Gs(e,n))(e.flags&131072)!==0&&($e=!0);else return t.lanes=e.lanes,qa(e,t,n)}return Rs(e,t,a,l,n)}function Mf(e,t,a,l){var n=l.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|a:a,e!==null){for(l=t.child=e.child,n=0;l!==null;)n=n|l.lanes|l.childLanes,l=l.sibling;l=n&~i}else l=0,t.child=null;return zf(e,t,i,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Cu(t,i!==null?i.cachePool:null),i!==null?Or(t,i):ss(),Cr(t);else return l=t.lanes=536870912,zf(e,t,i!==null?i.baseLanes|a:a,a,l)}else i!==null?(Cu(t,i.cachePool),Or(t,i),gl(),t.memoizedState=null):(e!==null&&Cu(t,null),ss(),gl());return vt(e,t,n,a),t.child}function Ui(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function zf(e,t,a,l,n){var i=as();return i=i===null?null:{parent:We._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&Cu(t,null),ss(),Cr(t),e!==null&&zn(e,t,l,!0),t.childLanes=n,null}function Ku(e,t){return t=Ju({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Of(e,t,a){return Fl(t,e.child,null,a),e=Ku(t,t.pendingProps),e.flags|=2,wt(t),t.memoizedState=null,e}function dm(e,t,a){var l=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(oe){if(l.mode==="hidden")return e=Ku(t,l),t.lanes=536870912,Ui(null,e);if(rs(t),(e=_e)?(e=Yd(e,Wt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:cl!==null?{id:ga,overflow:va}:null,retryLane:536870912,hydrationErrors:null},a=fr(e),a.return=t,t.child=a,mt=t,_e=null)):e=null,e===null)throw ol(t);return t.lanes=536870912,null}return Ku(t,l)}var i=e.memoizedState;if(i!==null){var c=i.dehydrated;if(rs(t),n)if(t.flags&256)t.flags&=-257,t=Of(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(m(558));else if($e||zn(e,t,a,!1),n=(a&e.childLanes)!==0,$e||n){if(l=ze,l!==null&&(c=ai(l,a),c!==0&&c!==i.retryLane))throw i.retryLane=c,Ql(e,c),Ot(l,e,c),Ds;lc(),t=Of(e,t,a)}else e=i.treeContext,_e=$t(c.nextSibling),mt=t,oe=!0,sl=null,Wt=!1,e!==null&&mr(t,e),t=Ku(t,l),t.flags|=4096;return t}return e=Ua(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ku(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(m(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Rs(e,t,a,l,n){return Kl(t),a=ds(e,t,a,l,void 0,n),l=hs(),e!==null&&!$e?(ms(e,t,n),qa(e,t,n)):(oe&&l&&kc(t),t.flags|=1,vt(e,t,a,n),t.child)}function Cf(e,t,a,l,n,i){return Kl(t),t.updateQueue=null,a=Rr(t,l,a,n),Dr(e),l=hs(),e!==null&&!$e?(ms(e,t,i),qa(e,t,i)):(oe&&l&&kc(t),t.flags|=1,vt(e,t,a,i),t.child)}function Df(e,t,a,l,n){if(Kl(t),t.stateNode===null){var i=Nn,c=a.contextType;typeof c=="object"&&c!==null&&(i=gt(c)),i=new a(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Os,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},ns(t),c=a.contextType,i.context=typeof c=="object"&&c!==null?gt(c):Nn,i.state=t.memoizedState,c=a.getDerivedStateFromProps,typeof c=="function"&&(zs(t,a,c,l),i.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(c=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),c!==i.state&&Os.enqueueReplaceState(i,i.state,null),Oi(t,l,i,n),zi(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var s=t.memoizedProps,r=Il(a,s);i.props=r;var y=i.context,A=a.contextType;c=Nn,typeof A=="object"&&A!==null&&(c=gt(A));var E=a.getDerivedStateFromProps;A=typeof E=="function"||typeof i.getSnapshotBeforeUpdate=="function",s=t.pendingProps!==s,A||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s||y!==c)&&pf(t,i,l,c),fl=!1;var x=t.memoizedState;i.state=x,Oi(t,l,i,n),zi(),y=t.memoizedState,s||x!==y||fl?(typeof E=="function"&&(zs(t,a,E,l),y=t.memoizedState),(r=fl||vf(t,a,r,l,x,y,c))?(A||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=y),i.props=l,i.state=y,i.context=c,l=r):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,is(e,t),c=t.memoizedProps,A=Il(a,c),i.props=A,E=t.pendingProps,x=i.context,y=a.contextType,r=Nn,typeof y=="object"&&y!==null&&(r=gt(y)),s=a.getDerivedStateFromProps,(y=typeof s=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==E||x!==r)&&pf(t,i,l,r),fl=!1,x=t.memoizedState,i.state=x,Oi(t,l,i,n),zi();var S=t.memoizedState;c!==E||x!==S||fl||e!==null&&e.dependencies!==null&&zu(e.dependencies)?(typeof s=="function"&&(zs(t,a,s,l),S=t.memoizedState),(A=fl||vf(t,a,A,l,x,S,r)||e!==null&&e.dependencies!==null&&zu(e.dependencies))?(y||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,S,r),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,S,r)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=S),i.props=l,i.state=S,i.context=r,l=A):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,ku(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=Fl(t,e.child,null,n),t.child=Fl(t,null,a,n)):vt(e,t,a,n),t.memoizedState=i.state,e=t.child):e=qa(e,t,n),e}function Rf(e,t,a,l){return Vl(),t.flags|=256,vt(e,t,a,l),t.child}var _s={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Us(e){return{baseLanes:e,cachePool:Sr()}}function Hs(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Lt),e}function _f(e,t,a){var l=t.pendingProps,n=!1,i=(t.flags&128)!==0,c;if((c=i)||(c=e!==null&&e.memoizedState===null?!1:(Ve.current&2)!==0),c&&(n=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(oe){if(n?ml(t):gl(),(e=_e)?(e=Yd(e,Wt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:cl!==null?{id:ga,overflow:va}:null,retryLane:536870912,hydrationErrors:null},a=fr(e),a.return=t,t.child=a,mt=t,_e=null)):e=null,e===null)throw ol(t);return yo(e)?t.lanes=32:t.lanes=536870912,null}var s=l.children;return l=l.fallback,n?(gl(),n=t.mode,s=Ju({mode:"hidden",children:s},n),l=Xl(l,n,a,null),s.return=t,l.return=t,s.sibling=l,t.child=s,l=t.child,l.memoizedState=Us(a),l.childLanes=Hs(e,c,a),t.memoizedState=_s,Ui(null,l)):(ml(t),ws(t,s))}var r=e.memoizedState;if(r!==null&&(s=r.dehydrated,s!==null)){if(i)t.flags&256?(ml(t),t.flags&=-257,t=Bs(e,t,a)):t.memoizedState!==null?(gl(),t.child=e.child,t.flags|=128,t=null):(gl(),s=l.fallback,n=t.mode,l=Ju({mode:"visible",children:l.children},n),s=Xl(s,n,a,null),s.flags|=2,l.return=t,s.return=t,l.sibling=s,t.child=l,Fl(t,e.child,null,a),l=t.child,l.memoizedState=Us(a),l.childLanes=Hs(e,c,a),t.memoizedState=_s,t=Ui(null,l));else if(ml(t),yo(s)){if(c=s.nextSibling&&s.nextSibling.dataset,c)var y=c.dgst;c=y,l=Error(m(419)),l.stack="",l.digest=c,ji({value:l,source:null,stack:null}),t=Bs(e,t,a)}else if($e||zn(e,t,a,!1),c=(a&e.childLanes)!==0,$e||c){if(c=ze,c!==null&&(l=ai(c,a),l!==0&&l!==r.retryLane))throw r.retryLane=l,Ql(e,l),Ot(c,e,l),Ds;po(s)||lc(),t=Bs(e,t,a)}else po(s)?(t.flags|=192,t.child=e.child,t=null):(e=r.treeContext,_e=$t(s.nextSibling),mt=t,oe=!0,sl=null,Wt=!1,e!==null&&mr(t,e),t=ws(t,l.children),t.flags|=4096);return t}return n?(gl(),s=l.fallback,n=t.mode,r=e.child,y=r.sibling,l=Ua(r,{mode:"hidden",children:l.children}),l.subtreeFlags=r.subtreeFlags&65011712,y!==null?s=Ua(y,s):(s=Xl(s,n,a,null),s.flags|=2),s.return=t,l.return=t,l.sibling=s,t.child=l,Ui(null,l),l=t.child,s=e.child.memoizedState,s===null?s=Us(a):(n=s.cachePool,n!==null?(r=We._currentValue,n=n.parent!==r?{parent:r,pool:r}:n):n=Sr(),s={baseLanes:s.baseLanes|a,cachePool:n}),l.memoizedState=s,l.childLanes=Hs(e,c,a),t.memoizedState=_s,Ui(e.child,l)):(ml(t),a=e.child,e=a.sibling,a=Ua(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=a,t.memoizedState=null,a)}function ws(e,t){return t=Ju({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ju(e,t){return e=Ut(22,e,null,t),e.lanes=0,e}function Bs(e,t,a){return Fl(t,e.child,null,a),e=ws(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Uf(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Ic(e.return,t,a)}function Ls(e,t,a,l,n,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:n,treeForkCount:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=l,c.tail=a,c.tailMode=n,c.treeForkCount=i)}function Hf(e,t,a){var l=t.pendingProps,n=l.revealOrder,i=l.tail;l=l.children;var c=Ve.current,s=(c&2)!==0;if(s?(c=c&1|2,t.flags|=128):c&=1,D(Ve,c),vt(e,t,l,a),l=oe?bi:0,!s&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Uf(e,a,t);else if(e.tag===19)Uf(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(n){case"forwards":for(a=t.child,n=null;a!==null;)e=a.alternate,e!==null&&wu(e)===null&&(n=a),a=a.sibling;a=n,a===null?(n=t.child,t.child=null):(n=a.sibling,a.sibling=null),Ls(t,!1,n,a,i,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&wu(e)===null){t.child=n;break}e=n.sibling,n.sibling=a,a=n,n=e}Ls(t,!0,a,null,i,l);break;case"together":Ls(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function qa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),yl|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(zn(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(m(153));if(t.child!==null){for(e=t.child,a=Ua(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ua(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Gs(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&zu(e)))}function hm(e,t,a){switch(t.tag){case 3:nt(t,t.stateNode.containerInfo),rl(t,We,e.memoizedState.cache),Vl();break;case 27:case 5:Ol(t);break;case 4:nt(t,t.stateNode.containerInfo);break;case 10:rl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,rs(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(ml(t),t.flags|=128,null):(a&t.child.childLanes)!==0?_f(e,t,a):(ml(t),e=qa(e,t,a),e!==null?e.sibling:null);ml(t);break;case 19:var n=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(zn(e,t,a,!1),l=(a&t.childLanes)!==0),n){if(l)return Hf(e,t,a);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),D(Ve,Ve.current),l)break;return null;case 22:return t.lanes=0,Mf(e,t,a,t.pendingProps);case 24:rl(t,We,e.memoizedState.cache)}return qa(e,t,a)}function wf(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)$e=!0;else{if(!Gs(e,a)&&(t.flags&128)===0)return $e=!1,hm(e,t,a);$e=(e.flags&131072)!==0}else $e=!1,oe&&(t.flags&1048576)!==0&&hr(t,bi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Jl(t.elementType),t.type=e,typeof e=="function")Vc(e)?(l=Il(e,l),t.tag=1,t=Df(null,t,e,l,a)):(t.tag=0,t=Rs(null,t,e,l,a));else{if(e!=null){var n=e.$$typeof;if(n===Ke){t.tag=11,t=Nf(null,t,e,l,a);break e}else if(n===F){t.tag=14,t=Tf(null,t,e,l,a);break e}}throw t=At(e)||e,Error(m(306,t,""))}}return t;case 0:return Rs(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,n=Il(l,t.pendingProps),Df(e,t,l,n,a);case 3:e:{if(nt(t,t.stateNode.containerInfo),e===null)throw Error(m(387));l=t.pendingProps;var i=t.memoizedState;n=i.element,is(e,t),Oi(t,l,null,a);var c=t.memoizedState;if(l=c.cache,rl(t,We,l),l!==i.cache&&Pc(t,[We],a,!0),zi(),l=c.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Rf(e,t,l,a);break e}else if(l!==n){n=Kt(Error(m(424)),t),ji(n),t=Rf(e,t,l,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,_e=$t(e.firstChild),mt=t,oe=!0,sl=null,Wt=!0,a=Er(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Vl(),l===n){t=qa(e,t,a);break e}vt(e,t,l,a)}t=t.child}return t;case 26:return ku(e,t),e===null?(a=kd(t.type,null,t.pendingProps,null))?t.memoizedState=a:oe||(a=t.type,e=t.pendingProps,l=rc(W.current).createElement(a),l[Xe]=t,l[ut]=e,pt(l,a,e),Me(l),t.stateNode=l):t.memoizedState=kd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ol(t),e===null&&oe&&(l=t.stateNode=Vd(t.type,t.pendingProps,W.current),mt=t,Wt=!0,n=_e,Al(t.type)?(xo=n,_e=$t(l.firstChild)):_e=n),vt(e,t,t.pendingProps.children,a),ku(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&oe&&((n=l=_e)&&(l=Xm(l,t.type,t.pendingProps,Wt),l!==null?(t.stateNode=l,mt=t,_e=$t(l.firstChild),Wt=!1,n=!0):n=!1),n||ol(t)),Ol(t),n=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,l=i.children,mo(n,i)?l=null:c!==null&&mo(n,c)&&(t.flags|=32),t.memoizedState!==null&&(n=ds(e,t,nm,null,null,a),Wi._currentValue=n),ku(e,t),vt(e,t,l,a),t.child;case 6:return e===null&&oe&&((e=a=_e)&&(a=Vm(a,t.pendingProps,Wt),a!==null?(t.stateNode=a,mt=t,_e=null,e=!0):e=!1),e||ol(t)),null;case 13:return _f(e,t,a);case 4:return nt(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Fl(t,null,l,a):vt(e,t,l,a),t.child;case 11:return Nf(e,t,t.type,t.pendingProps,a);case 7:return vt(e,t,t.pendingProps,a),t.child;case 8:return vt(e,t,t.pendingProps.children,a),t.child;case 12:return vt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,rl(t,t.type,l.value),vt(e,t,l.children,a),t.child;case 9:return n=t.type._context,l=t.pendingProps.children,Kl(t),n=gt(n),l=l(n),t.flags|=1,vt(e,t,l,a),t.child;case 14:return Tf(e,t,t.type,t.pendingProps,a);case 15:return Ef(e,t,t.type,t.pendingProps,a);case 19:return Hf(e,t,a);case 31:return dm(e,t,a);case 22:return Mf(e,t,a,t.pendingProps);case 24:return Kl(t),l=gt(We),e===null?(n=as(),n===null&&(n=ze,i=es(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=a),n=i),t.memoizedState={parent:l,cache:n},ns(t),rl(t,We,n)):((e.lanes&a)!==0&&(is(e,t),Oi(t,null,null,a),zi()),n=e.memoizedState,i=t.memoizedState,n.parent!==l?(n={parent:l,cache:l},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),rl(t,We,l)):(l=i.cache,rl(t,We,l),l!==n.cache&&Pc(t,[We],a,!0))),vt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(m(156,t.tag))}function Ya(e){e.flags|=4}function qs(e,t,a,l,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(od())e.flags|=8192;else throw Wl=Ru,ls}else e.flags&=-16777217}function Bf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Id(t))if(od())e.flags|=8192;else throw Wl=Ru,ls}function Wu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ou():536870912,e.lanes|=t,qn|=t)}function Hi(e,t){if(!oe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var n=e.child;n!==null;)a|=n.lanes|n.childLanes,l|=n.subtreeFlags&65011712,l|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)a|=n.lanes|n.childLanes,l|=n.subtreeFlags,l|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function mm(e,t,a){var l=t.pendingProps;switch(Jc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return Ue(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ba(We),De(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Mn(t)?Ya(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Fc())),Ue(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(Ya(t),i!==null?(Ue(t),Bf(t,i)):(Ue(t),qs(t,n,null,l,a))):i?i!==e.memoizedState?(Ya(t),Ue(t),Bf(t,i)):(Ue(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Ya(t),Ue(t),qs(t,n,e,l,a)),null;case 27:if(Wa(t),a=W.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ya(t);else{if(!l){if(t.stateNode===null)throw Error(m(166));return Ue(t),null}e=H.current,Mn(t)?gr(t):(e=Vd(n,l,a),t.stateNode=e,Ya(t))}return Ue(t),null;case 5:if(Wa(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ya(t);else{if(!l){if(t.stateNode===null)throw Error(m(166));return Ue(t),null}if(i=H.current,Mn(t))gr(t);else{var c=rc(W.current);switch(i){case 1:i=c.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=c.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=c.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=c.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=c.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?c.createElement("select",{is:l.is}):c.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?c.createElement(n,{is:l.is}):c.createElement(n)}}i[Xe]=t,i[ut]=l;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=i;e:switch(pt(i,n,l),n){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Ya(t)}}return Ue(t),qs(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Ya(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(m(166));if(e=W.current,Mn(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,n=mt,n!==null)switch(n.tag){case 27:case 5:l=n.memoizedProps}e[Xe]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||_d(e.nodeValue,a)),e||ol(t,!0)}else e=rc(e).createTextNode(l),e[Xe]=t,t.stateNode=e}return Ue(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Mn(t),a!==null){if(e===null){if(!l)throw Error(m(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(m(557));e[Xe]=t}else Vl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),e=!1}else a=Fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(wt(t),t):(wt(t),null);if((t.flags&128)!==0)throw Error(m(558))}return Ue(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Mn(t),l!==null&&l.dehydrated!==null){if(e===null){if(!n)throw Error(m(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(m(317));n[Xe]=t}else Vl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),n=!1}else n=Fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(wt(t),t):(wt(t),null)}return wt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,n=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(n=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==n&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Wu(t,t.updateQueue),Ue(t),null);case 4:return De(),e===null&&so(t.stateNode.containerInfo),Ue(t),null;case 10:return Ba(t.type),Ue(t),null;case 19:if(j(Ve),l=t.memoizedState,l===null)return Ue(t),null;if(n=(t.flags&128)!==0,i=l.rendering,i===null)if(n)Hi(l,!1);else{if(qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=wu(e),i!==null){for(t.flags|=128,Hi(l,!1),e=i.updateQueue,t.updateQueue=e,Wu(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)rr(a,e),a=a.sibling;return D(Ve,Ve.current&1|2),oe&&Ha(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&ft()>ec&&(t.flags|=128,n=!0,Hi(l,!1),t.lanes=4194304)}else{if(!n)if(e=wu(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Wu(t,e),Hi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!oe)return Ue(t),null}else 2*ft()-l.renderingStartTime>ec&&a!==536870912&&(t.flags|=128,n=!0,Hi(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=ft(),e.sibling=null,a=Ve.current,D(Ve,n?a&1|2:a&1),oe&&Ha(t,l.treeForkCount),e):(Ue(t),null);case 22:case 23:return wt(t),os(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),a=t.updateQueue,a!==null&&Wu(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&j(kl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ba(We),Ue(t),null;case 25:return null;case 30:return null}throw Error(m(156,t.tag))}function gm(e,t){switch(Jc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ba(We),De(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Wa(t),null;case 31:if(t.memoizedState!==null){if(wt(t),t.alternate===null)throw Error(m(340));Vl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(wt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(m(340));Vl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return j(Ve),null;case 4:return De(),null;case 10:return Ba(t.type),null;case 22:case 23:return wt(t),os(),e!==null&&j(kl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ba(We),null;case 25:return null;default:return null}}function Lf(e,t){switch(Jc(t),t.tag){case 3:Ba(We),De();break;case 26:case 27:case 5:Wa(t);break;case 4:De();break;case 31:t.memoizedState!==null&&wt(t);break;case 13:wt(t);break;case 19:j(Ve);break;case 10:Ba(t.type);break;case 22:case 23:wt(t),os(),e!==null&&j(kl);break;case 24:Ba(We)}}function wi(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var n=l.next;a=n;do{if((a.tag&e)===e){l=void 0;var i=a.create,c=a.inst;l=i(),c.destroy=l}a=a.next}while(a!==n)}}catch(s){xe(t,t.return,s)}}function vl(e,t,a){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var i=n.next;l=i;do{if((l.tag&e)===e){var c=l.inst,s=c.destroy;if(s!==void 0){c.destroy=void 0,n=t;var r=a,y=s;try{y()}catch(A){xe(n,r,A)}}}l=l.next}while(l!==i)}}catch(A){xe(t,t.return,A)}}function Gf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{zr(t,a)}catch(l){xe(e,e.return,l)}}}function qf(e,t,a){a.props=Il(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){xe(e,t,l)}}function Bi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(n){xe(e,t,n)}}function pa(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(n){xe(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(n){xe(e,t,n)}else a.current=null}function Yf(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(n){xe(e,e.return,n)}}function Ys(e,t,a){try{var l=e.stateNode;Bm(l,e.type,a,t),l[ut]=t}catch(n){xe(e,e.return,n)}}function Qf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Al(e.type)||e.tag===4}function Qs(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Qf(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.tag===27&&Al(e.type)||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 Xs(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=ta));else if(l!==4&&(l===27&&Al(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Xs(e,t,a),e=e.sibling;e!==null;)Xs(e,t,a),e=e.sibling}function Fu(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Al(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Fu(e,t,a),e=e.sibling;e!==null;)Fu(e,t,a),e=e.sibling}function Xf(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);pt(t,l,a),t[Xe]=e,t[ut]=a}catch(i){xe(e,e.return,i)}}var Qa=!1,Ie=!1,Vs=!1,Vf=typeof WeakSet=="function"?WeakSet:Set,st=null;function vm(e,t){if(e=e.containerInfo,fo=pc,e=tr(e),Bc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var n=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var c=0,s=-1,r=-1,y=0,A=0,E=e,x=null;t:for(;;){for(var S;E!==a||n!==0&&E.nodeType!==3||(s=c+n),E!==i||l!==0&&E.nodeType!==3||(r=c+l),E.nodeType===3&&(c+=E.nodeValue.length),(S=E.firstChild)!==null;)x=E,E=S;for(;;){if(E===e)break t;if(x===a&&++y===n&&(s=c),x===i&&++A===l&&(r=c),(S=E.nextSibling)!==null)break;E=x,x=E.parentNode}E=S}a=s===-1||r===-1?null:{start:s,end:r}}else a=null}a=a||{start:0,end:0}}else a=null;for(ho={focusedElem:e,selectionRange:a},pc=!1,st=t;st!==null;)if(t=st,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,st=e;else for(;st!==null;){switch(t=st,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)n=e[a],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,a=t,n=i.memoizedProps,i=i.memoizedState,l=a.stateNode;try{var G=Il(a.type,n);e=l.getSnapshotBeforeUpdate(G,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(k){xe(a,a.return,k)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)vo(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":vo(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(m(163))}if(e=t.sibling,e!==null){e.return=t.return,st=e;break}st=t.return}}function Zf(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Va(e,a),l&4&&wi(5,a);break;case 1:if(Va(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(c){xe(a,a.return,c)}else{var n=Il(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){xe(a,a.return,c)}}l&64&&Gf(a),l&512&&Bi(a,a.return);break;case 3:if(Va(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{zr(e,t)}catch(c){xe(a,a.return,c)}}break;case 27:t===null&&l&4&&Xf(a);case 26:case 5:Va(e,a),t===null&&l&4&&Yf(a),l&512&&Bi(a,a.return);break;case 12:Va(e,a);break;case 31:Va(e,a),l&4&&Jf(e,a);break;case 13:Va(e,a),l&4&&Wf(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Tm.bind(null,a),Zm(e,a))));break;case 22:if(l=a.memoizedState!==null||Qa,!l){t=t!==null&&t.memoizedState!==null||Ie,n=Qa;var i=Ie;Qa=l,(Ie=t)&&!i?Za(e,a,(a.subtreeFlags&8772)!==0):Va(e,a),Qa=n,Ie=i}break;case 30:break;default:Va(e,a)}}function Kf(e){var t=e.alternate;t!==null&&(e.alternate=null,Kf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Pa(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var we=null,Tt=!1;function Xa(e,t,a){for(a=a.child;a!==null;)kf(e,t,a),a=a.sibling}function kf(e,t,a){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(xa,a)}catch{}switch(a.tag){case 26:Ie||pa(a,t),Xa(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Ie||pa(a,t);var l=we,n=Tt;Al(a.type)&&(we=a.stateNode,Tt=!1),Xa(e,t,a),Ki(a.stateNode),we=l,Tt=n;break;case 5:Ie||pa(a,t);case 6:if(l=we,n=Tt,we=null,Xa(e,t,a),we=l,Tt=n,we!==null)if(Tt)try{(we.nodeType===9?we.body:we.nodeName==="HTML"?we.ownerDocument.body:we).removeChild(a.stateNode)}catch(i){xe(a,t,i)}else try{we.removeChild(a.stateNode)}catch(i){xe(a,t,i)}break;case 18:we!==null&&(Tt?(e=we,Gd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Jn(e)):Gd(we,a.stateNode));break;case 4:l=we,n=Tt,we=a.stateNode.containerInfo,Tt=!0,Xa(e,t,a),we=l,Tt=n;break;case 0:case 11:case 14:case 15:vl(2,a,t),Ie||vl(4,a,t),Xa(e,t,a);break;case 1:Ie||(pa(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&qf(a,t,l)),Xa(e,t,a);break;case 21:Xa(e,t,a);break;case 22:Ie=(l=Ie)||a.memoizedState!==null,Xa(e,t,a),Ie=l;break;default:Xa(e,t,a)}}function Jf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Jn(e)}catch(a){xe(t,t.return,a)}}}function Wf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Jn(e)}catch(a){xe(t,t.return,a)}}function pm(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Vf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Vf),t;default:throw Error(m(435,e.tag))}}function $u(e,t){var a=pm(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var n=Em.bind(null,e,l);l.then(n,n)}})}function Et(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var n=a[l],i=e,c=t,s=c;e:for(;s!==null;){switch(s.tag){case 27:if(Al(s.type)){we=s.stateNode,Tt=!1;break e}break;case 5:we=s.stateNode,Tt=!1;break e;case 3:case 4:we=s.stateNode.containerInfo,Tt=!0;break e}s=s.return}if(we===null)throw Error(m(160));kf(i,c,n),we=null,Tt=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ff(t,e),t=t.sibling}var na=null;function Ff(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Et(t,e),Mt(e),l&4&&(vl(3,e,e.return),wi(3,e),vl(5,e,e.return));break;case 1:Et(t,e),Mt(e),l&512&&(Ie||a===null||pa(a,a.return)),l&64&&Qa&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var n=na;if(Et(t,e),Mt(e),l&512&&(Ie||a===null||pa(a,a.return)),l&4){var i=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,n=n.ownerDocument||n;t:switch(l){case"title":i=n.getElementsByTagName("title")[0],(!i||i[Ul]||i[Xe]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(l),n.head.insertBefore(i,n.querySelector("head > title"))),pt(i,l,a),i[Xe]=e,Me(i),l=i;break e;case"link":var c=Fd("link","href",n).get(l+(a.href||""));if(c){for(var s=0;s<c.length;s++)if(i=c[s],i.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&i.getAttribute("rel")===(a.rel==null?null:a.rel)&&i.getAttribute("title")===(a.title==null?null:a.title)&&i.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){c.splice(s,1);break t}}i=n.createElement(l),pt(i,l,a),n.head.appendChild(i);break;case"meta":if(c=Fd("meta","content",n).get(l+(a.content||""))){for(s=0;s<c.length;s++)if(i=c[s],i.getAttribute("content")===(a.content==null?null:""+a.content)&&i.getAttribute("name")===(a.name==null?null:a.name)&&i.getAttribute("property")===(a.property==null?null:a.property)&&i.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&i.getAttribute("charset")===(a.charSet==null?null:a.charSet)){c.splice(s,1);break t}}i=n.createElement(l),pt(i,l,a),n.head.appendChild(i);break;default:throw Error(m(468,l))}i[Xe]=e,Me(i),l=i}e.stateNode=l}else $d(n,e.type,e.stateNode);else e.stateNode=Wd(n,l,e.memoizedProps);else i!==l?(i===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):i.count--,l===null?$d(n,e.type,e.stateNode):Wd(n,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Ys(e,e.memoizedProps,a.memoizedProps)}break;case 27:Et(t,e),Mt(e),l&512&&(Ie||a===null||pa(a,a.return)),a!==null&&l&4&&Ys(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Et(t,e),Mt(e),l&512&&(Ie||a===null||pa(a,a.return)),e.flags&32){n=e.stateNode;try{Ta(n,"")}catch(G){xe(e,e.return,G)}}l&4&&e.stateNode!=null&&(n=e.memoizedProps,Ys(e,n,a!==null?a.memoizedProps:n)),l&1024&&(Vs=!0);break;case 6:if(Et(t,e),Mt(e),l&4){if(e.stateNode===null)throw Error(m(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(G){xe(e,e.return,G)}}break;case 3:if(hc=null,n=na,na=fc(t.containerInfo),Et(t,e),na=n,Mt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Jn(t.containerInfo)}catch(G){xe(e,e.return,G)}Vs&&(Vs=!1,$f(e));break;case 4:l=na,na=fc(e.stateNode.containerInfo),Et(t,e),Mt(e),na=l;break;case 12:Et(t,e),Mt(e);break;case 31:Et(t,e),Mt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,$u(e,l)));break;case 13:Et(t,e),Mt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Pu=ft()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,$u(e,l)));break;case 22:n=e.memoizedState!==null;var r=a!==null&&a.memoizedState!==null,y=Qa,A=Ie;if(Qa=y||n,Ie=A||r,Et(t,e),Ie=A,Qa=y,Mt(e),l&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(a===null||r||Qa||Ie||Pl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){r=a=t;try{if(i=r.stateNode,n)c=i.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{s=r.stateNode;var E=r.memoizedProps.style,x=E!=null&&E.hasOwnProperty("display")?E.display:null;s.style.display=x==null||typeof x=="boolean"?"":(""+x).trim()}}catch(G){xe(r,r.return,G)}}}else if(t.tag===6){if(a===null){r=t;try{r.stateNode.nodeValue=n?"":r.memoizedProps}catch(G){xe(r,r.return,G)}}}else if(t.tag===18){if(a===null){r=t;try{var S=r.stateNode;n?qd(S,!0):qd(r.stateNode,!1)}catch(G){xe(r,r.return,G)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,$u(e,a))));break;case 19:Et(t,e),Mt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,$u(e,l)));break;case 30:break;case 21:break;default:Et(t,e),Mt(e)}}function Mt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(Qf(l)){a=l;break}l=l.return}if(a==null)throw Error(m(160));switch(a.tag){case 27:var n=a.stateNode,i=Qs(e);Fu(e,i,n);break;case 5:var c=a.stateNode;a.flags&32&&(Ta(c,""),a.flags&=-33);var s=Qs(e);Fu(e,s,c);break;case 3:case 4:var r=a.stateNode.containerInfo,y=Qs(e);Xs(e,y,r);break;default:throw Error(m(161))}}catch(A){xe(e,e.return,A)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $f(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;$f(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Va(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Zf(e,t.alternate,t),t=t.sibling}function Pl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:vl(4,t,t.return),Pl(t);break;case 1:pa(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&qf(t,t.return,a),Pl(t);break;case 27:Ki(t.stateNode);case 26:case 5:pa(t,t.return),Pl(t);break;case 22:t.memoizedState===null&&Pl(t);break;case 30:Pl(t);break;default:Pl(t)}e=e.sibling}}function Za(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,n=e,i=t,c=i.flags;switch(i.tag){case 0:case 11:case 15:Za(n,i,a),wi(4,i);break;case 1:if(Za(n,i,a),l=i,n=l.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(y){xe(l,l.return,y)}if(l=i,n=l.updateQueue,n!==null){var s=l.stateNode;try{var r=n.shared.hiddenCallbacks;if(r!==null)for(n.shared.hiddenCallbacks=null,n=0;n<r.length;n++)Mr(r[n],s)}catch(y){xe(l,l.return,y)}}a&&c&64&&Gf(i),Bi(i,i.return);break;case 27:Xf(i);case 26:case 5:Za(n,i,a),a&&l===null&&c&4&&Yf(i),Bi(i,i.return);break;case 12:Za(n,i,a);break;case 31:Za(n,i,a),a&&c&4&&Jf(n,i);break;case 13:Za(n,i,a),a&&c&4&&Wf(n,i);break;case 22:i.memoizedState===null&&Za(n,i,a),Bi(i,i.return);break;case 30:break;default:Za(n,i,a)}t=t.sibling}}function Zs(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Ai(a))}function Ks(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ai(e))}function ia(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)If(e,t,a,l),t=t.sibling}function If(e,t,a,l){var n=t.flags;switch(t.tag){case 0:case 11:case 15:ia(e,t,a,l),n&2048&&wi(9,t);break;case 1:ia(e,t,a,l);break;case 3:ia(e,t,a,l),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ai(e)));break;case 12:if(n&2048){ia(e,t,a,l),e=t.stateNode;try{var i=t.memoizedProps,c=i.id,s=i.onPostCommit;typeof s=="function"&&s(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(r){xe(t,t.return,r)}}else ia(e,t,a,l);break;case 31:ia(e,t,a,l);break;case 13:ia(e,t,a,l);break;case 23:break;case 22:i=t.stateNode,c=t.alternate,t.memoizedState!==null?i._visibility&2?ia(e,t,a,l):Li(e,t):i._visibility&2?ia(e,t,a,l):(i._visibility|=2,Bn(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Zs(c,t);break;case 24:ia(e,t,a,l),n&2048&&Ks(t.alternate,t);break;default:ia(e,t,a,l)}}function Bn(e,t,a,l,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,c=t,s=a,r=l,y=c.flags;switch(c.tag){case 0:case 11:case 15:Bn(i,c,s,r,n),wi(8,c);break;case 23:break;case 22:var A=c.stateNode;c.memoizedState!==null?A._visibility&2?Bn(i,c,s,r,n):Li(i,c):(A._visibility|=2,Bn(i,c,s,r,n)),n&&y&2048&&Zs(c.alternate,c);break;case 24:Bn(i,c,s,r,n),n&&y&2048&&Ks(c.alternate,c);break;default:Bn(i,c,s,r,n)}t=t.sibling}}function Li(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,n=l.flags;switch(l.tag){case 22:Li(a,l),n&2048&&Zs(l.alternate,l);break;case 24:Li(a,l),n&2048&&Ks(l.alternate,l);break;default:Li(a,l)}t=t.sibling}}var Gi=8192;function Ln(e,t,a){if(e.subtreeFlags&Gi)for(e=e.child;e!==null;)Pf(e,t,a),e=e.sibling}function Pf(e,t,a){switch(e.tag){case 26:Ln(e,t,a),e.flags&Gi&&e.memoizedState!==null&&lg(a,na,e.memoizedState,e.memoizedProps);break;case 5:Ln(e,t,a);break;case 3:case 4:var l=na;na=fc(e.stateNode.containerInfo),Ln(e,t,a),na=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Gi,Gi=16777216,Ln(e,t,a),Gi=l):Ln(e,t,a));break;default:Ln(e,t,a)}}function ed(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function qi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];st=l,ad(l,e)}ed(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)td(e),e=e.sibling}function td(e){switch(e.tag){case 0:case 11:case 15:qi(e),e.flags&2048&&vl(9,e,e.return);break;case 3:qi(e);break;case 12:qi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Iu(e)):qi(e);break;default:qi(e)}}function Iu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];st=l,ad(l,e)}ed(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:vl(8,t,t.return),Iu(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Iu(t));break;default:Iu(t)}e=e.sibling}}function ad(e,t){for(;st!==null;){var a=st;switch(a.tag){case 0:case 11:case 15:vl(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Ai(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,st=l;else e:for(a=e;st!==null;){l=st;var n=l.sibling,i=l.return;if(Kf(l),l===a){st=null;break e}if(n!==null){n.return=i,st=n;break e}st=i}}}var ym={getCacheForType:function(e){var t=gt(We),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return gt(We).controller.signal}},xm=typeof WeakMap=="function"?WeakMap:Map,ve=0,ze=null,le=null,ue=0,ye=0,Bt=null,pl=!1,Gn=!1,ks=!1,Ka=0,qe=0,yl=0,en=0,Js=0,Lt=0,qn=0,Yi=null,zt=null,Ws=!1,Pu=0,ld=0,ec=1/0,tc=null,xl=null,at=0,Sl=null,Yn=null,ka=0,Fs=0,$s=null,nd=null,Qi=0,Is=null;function Gt(){return(ve&2)!==0&&ue!==0?ue&-ue:b.T!==null?no():li()}function id(){if(Lt===0)if((ue&536870912)===0||oe){var e=Sa;Sa<<=1,(Sa&3932160)===0&&(Sa=262144),Lt=e}else Lt=536870912;return e=Ht.current,e!==null&&(e.flags|=32),Lt}function Ot(e,t,a){(e===ze&&(ye===2||ye===9)||e.cancelPendingCommit!==null)&&(Qn(e,0),bl(e,ue,Lt,!1)),_l(e,a),((ve&2)===0||e!==ze)&&(e===ze&&((ve&2)===0&&(en|=a),qe===4&&bl(e,ue,Lt,!1)),ya(e))}function ud(e,t,a){if((ve&6)!==0)throw Error(m(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Rl(e,t),n=l?jm(e,t):eo(e,t,!0),i=l;do{if(n===0){Gn&&!l&&bl(e,t,0,!1);break}else{if(a=e.current.alternate,i&&!Sm(a)){n=eo(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var s=e;n=Yi;var r=s.current.memoizedState.isDehydrated;if(r&&(Qn(s,c).flags|=256),c=eo(s,c,!1),c!==2){if(ks&&!r){s.errorRecoveryDisabledLanes|=i,en|=i,n=4;break e}i=zt,zt=n,i!==null&&(zt===null?zt=i:zt.push.apply(zt,i))}n=c}if(i=!1,n!==2)continue}}if(n===1){Qn(e,0),bl(e,t,0,!0);break}e:{switch(l=e,i=n,i){case 0:case 1:throw Error(m(345));case 4:if((t&4194048)!==t)break;case 6:bl(l,t,Lt,!pl);break e;case 2:zt=null;break;case 3:case 5:break;default:throw Error(m(329))}if((t&62914560)===t&&(n=Pu+300-ft(),10<n)){if(bl(l,t,Lt,!pl),un(l,0,!0)!==0)break e;ka=t,l.timeoutHandle=Bd(cd.bind(null,l,a,zt,tc,Ws,t,Lt,en,qn,pl,i,"Throttled",-0,0),n);break e}cd(l,a,zt,tc,Ws,t,Lt,en,qn,pl,i,null,-0,0)}}break}while(!0);ya(e)}function cd(e,t,a,l,n,i,c,s,r,y,A,E,x,S){if(e.timeoutHandle=-1,E=t.subtreeFlags,E&8192||(E&16785408)===16785408){E={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ta},Pf(t,i,E);var G=(i&62914560)===i?Pu-ft():(i&4194048)===i?ld-ft():0;if(G=ng(E,G),G!==null){ka=i,e.cancelPendingCommit=G(gd.bind(null,e,t,i,a,l,n,c,s,r,A,E,null,x,S)),bl(e,i,c,!y);return}}gd(e,t,i,a,l,n,c,s,r)}function Sm(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var n=a[l],i=n.getSnapshot;n=n.value;try{if(!_t(i(),n))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function bl(e,t,a,l){t&=~Js,t&=~en,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var n=t;0<n;){var i=31-Qe(n),c=1<<i;l[i]=-1,n&=~c}a!==0&&sn(e,a,t)}function ac(){return(ve&6)===0?(Xi(0),!1):!0}function Ps(){if(le!==null){if(ye===0)var e=le.return;else e=le,wa=Zl=null,gs(e),Rn=null,Ti=0,e=le;for(;e!==null;)Lf(e.alternate,e),e=e.return;le=null}}function Qn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,qm(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ka=0,Ps(),ze=e,le=a=Ua(e.current,null),ue=t,ye=0,Bt=null,pl=!1,Gn=Rl(e,t),ks=!1,qn=Lt=Js=en=yl=qe=0,zt=Yi=null,Ws=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var n=31-Qe(l),i=1<<n;t|=e[n],l&=~i}return Ka=t,Au(),a}function sd(e,t){I=null,b.H=_i,t===Dn||t===Du?(t=Ar(),ye=3):t===ls?(t=Ar(),ye=4):ye=t===Ds?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Bt=t,le===null&&(qe=1,Zu(e,Kt(t,e.current)))}function od(){var e=Ht.current;return e===null?!0:(ue&4194048)===ue?Ft===null:(ue&62914560)===ue||(ue&536870912)!==0?e===Ft:!1}function rd(){var e=b.H;return b.H=_i,e===null?_i:e}function fd(){var e=b.A;return b.A=ym,e}function lc(){qe=4,pl||(ue&4194048)!==ue&&Ht.current!==null||(Gn=!0),(yl&134217727)===0&&(en&134217727)===0||ze===null||bl(ze,ue,Lt,!1)}function eo(e,t,a){var l=ve;ve|=2;var n=rd(),i=fd();(ze!==e||ue!==t)&&(tc=null,Qn(e,t)),t=!1;var c=qe;e:do try{if(ye!==0&&le!==null){var s=le,r=Bt;switch(ye){case 8:Ps(),c=6;break e;case 3:case 2:case 9:case 6:Ht.current===null&&(t=!0);var y=ye;if(ye=0,Bt=null,Xn(e,s,r,y),a&&Gn){c=0;break e}break;default:y=ye,ye=0,Bt=null,Xn(e,s,r,y)}}bm(),c=qe;break}catch(A){sd(e,A)}while(!0);return t&&e.shellSuspendCounter++,wa=Zl=null,ve=l,b.H=n,b.A=i,le===null&&(ze=null,ue=0,Au()),c}function bm(){for(;le!==null;)dd(le)}function jm(e,t){var a=ve;ve|=2;var l=rd(),n=fd();ze!==e||ue!==t?(tc=null,ec=ft()+500,Qn(e,t)):Gn=Rl(e,t);e:do try{if(ye!==0&&le!==null){t=le;var i=Bt;t:switch(ye){case 1:ye=0,Bt=null,Xn(e,t,i,1);break;case 2:case 9:if(br(i)){ye=0,Bt=null,hd(t);break}t=function(){ye!==2&&ye!==9||ze!==e||(ye=7),ya(e)},i.then(t,t);break e;case 3:ye=7;break e;case 4:ye=5;break e;case 7:br(i)?(ye=0,Bt=null,hd(t)):(ye=0,Bt=null,Xn(e,t,i,7));break;case 5:var c=null;switch(le.tag){case 26:c=le.memoizedState;case 5:case 27:var s=le;if(c?Id(c):s.stateNode.complete){ye=0,Bt=null;var r=s.sibling;if(r!==null)le=r;else{var y=s.return;y!==null?(le=y,nc(y)):le=null}break t}}ye=0,Bt=null,Xn(e,t,i,5);break;case 6:ye=0,Bt=null,Xn(e,t,i,6);break;case 8:Ps(),qe=6;break e;default:throw Error(m(462))}}Am();break}catch(A){sd(e,A)}while(!0);return wa=Zl=null,b.H=l,b.A=n,ve=a,le!==null?0:(ze=null,ue=0,Au(),qe)}function Am(){for(;le!==null&&!nu();)dd(le)}function dd(e){var t=wf(e.alternate,e,Ka);e.memoizedProps=e.pendingProps,t===null?nc(e):le=t}function hd(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Cf(a,t,t.pendingProps,t.type,void 0,ue);break;case 11:t=Cf(a,t,t.pendingProps,t.type.render,t.ref,ue);break;case 5:gs(t);default:Lf(a,t),t=le=rr(t,Ka),t=wf(a,t,Ka)}e.memoizedProps=e.pendingProps,t===null?nc(e):le=t}function Xn(e,t,a,l){wa=Zl=null,gs(t),Rn=null,Ti=0;var n=t.return;try{if(fm(e,n,t,a,ue)){qe=1,Zu(e,Kt(a,e.current)),le=null;return}}catch(i){if(n!==null)throw le=n,i;qe=1,Zu(e,Kt(a,e.current)),le=null;return}t.flags&32768?(oe||l===1?e=!0:Gn||(ue&536870912)!==0?e=!1:(pl=e=!0,(l===2||l===9||l===3||l===6)&&(l=Ht.current,l!==null&&l.tag===13&&(l.flags|=16384))),md(t,e)):nc(t)}function nc(e){var t=e;do{if((t.flags&32768)!==0){md(t,pl);return}e=t.return;var a=mm(t.alternate,t,Ka);if(a!==null){le=a;return}if(t=t.sibling,t!==null){le=t;return}le=t=e}while(t!==null);qe===0&&(qe=5)}function md(e,t){do{var a=gm(e.alternate,e);if(a!==null){a.flags&=32767,le=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){le=e;return}le=e=a}while(e!==null);qe=6,le=null}function gd(e,t,a,l,n,i,c,s,r){e.cancelPendingCommit=null;do ic();while(at!==0);if((ve&6)!==0)throw Error(m(327));if(t!==null){if(t===e.current)throw Error(m(177));if(i=t.lanes|t.childLanes,i|=Qc,ru(e,a,i,c,s,r),e===ze&&(le=ze=null,ue=0),Yn=t,Sl=e,ka=a,Fs=i,$s=n,nd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Mm(Dl,function(){return Sd(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=b.T,b.T=null,n=B.p,B.p=2,c=ve,ve|=4;try{vm(e,t,a)}finally{ve=c,B.p=n,b.T=l}}at=1,vd(),pd(),yd()}}function vd(){if(at===1){at=0;var e=Sl,t=Yn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=b.T,b.T=null;var l=B.p;B.p=2;var n=ve;ve|=4;try{Ff(t,e);var i=ho,c=tr(e.containerInfo),s=i.focusedElem,r=i.selectionRange;if(c!==s&&s&&s.ownerDocument&&er(s.ownerDocument.documentElement,s)){if(r!==null&&Bc(s)){var y=r.start,A=r.end;if(A===void 0&&(A=y),"selectionStart"in s)s.selectionStart=y,s.selectionEnd=Math.min(A,s.value.length);else{var E=s.ownerDocument||document,x=E&&E.defaultView||window;if(x.getSelection){var S=x.getSelection(),G=s.textContent.length,k=Math.min(r.start,G),Ne=r.end===void 0?k:Math.min(r.end,G);!S.extend&&k>Ne&&(c=Ne,Ne=k,k=c);var v=Po(s,k),h=Po(s,Ne);if(v&&h&&(S.rangeCount!==1||S.anchorNode!==v.node||S.anchorOffset!==v.offset||S.focusNode!==h.node||S.focusOffset!==h.offset)){var p=E.createRange();p.setStart(v.node,v.offset),S.removeAllRanges(),k>Ne?(S.addRange(p),S.extend(h.node,h.offset)):(p.setEnd(h.node,h.offset),S.addRange(p))}}}}for(E=[],S=s;S=S.parentNode;)S.nodeType===1&&E.push({element:S,left:S.scrollLeft,top:S.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<E.length;s++){var T=E[s];T.element.scrollLeft=T.left,T.element.scrollTop=T.top}}pc=!!fo,ho=fo=null}finally{ve=n,B.p=l,b.T=a}}e.current=t,at=2}}function pd(){if(at===2){at=0;var e=Sl,t=Yn,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=b.T,b.T=null;var l=B.p;B.p=2;var n=ve;ve|=4;try{Zf(e,t.alternate,t)}finally{ve=n,B.p=l,b.T=a}}at=3}}function yd(){if(at===4||at===3){at=0,In();var e=Sl,t=Yn,a=ka,l=nd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?at=5:(at=0,Yn=Sl=null,xd(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(xl=null),$a(a),t=t.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(xa,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=b.T,n=B.p,B.p=2,b.T=null;try{for(var i=e.onRecoverableError,c=0;c<l.length;c++){var s=l[c];i(s.value,{componentStack:s.stack})}}finally{b.T=t,B.p=n}}(ka&3)!==0&&ic(),ya(e),n=e.pendingLanes,(a&261930)!==0&&(n&42)!==0?e===Is?Qi++:(Qi=0,Is=e):Qi=0,Xi(0)}}function xd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ai(t)))}function ic(){return vd(),pd(),yd(),Sd()}function Sd(){if(at!==5)return!1;var e=Sl,t=Fs;Fs=0;var a=$a(ka),l=b.T,n=B.p;try{B.p=32>a?32:a,b.T=null,a=$s,$s=null;var i=Sl,c=ka;if(at=0,Yn=Sl=null,ka=0,(ve&6)!==0)throw Error(m(331));var s=ve;if(ve|=4,td(i.current),If(i,i.current,c,a),ve=s,Xi(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(xa,i)}catch{}return!0}finally{B.p=n,b.T=l,xd(e,t)}}function bd(e,t,a){t=Kt(a,t),t=Cs(e.stateNode,t,2),e=hl(e,t,2),e!==null&&(_l(e,2),ya(e))}function xe(e,t,a){if(e.tag===3)bd(e,e,a);else for(;t!==null;){if(t.tag===3){bd(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(xl===null||!xl.has(l))){e=Kt(a,e),a=jf(2),l=hl(t,a,2),l!==null&&(Af(a,l,t,e),_l(l,2),ya(l));break}}t=t.return}}function to(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new xm;var n=new Set;l.set(t,n)}else n=l.get(t),n===void 0&&(n=new Set,l.set(t,n));n.has(a)||(ks=!0,n.add(a),e=Nm.bind(null,e,t,a),t.then(e,e))}function Nm(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ze===e&&(ue&a)===a&&(qe===4||qe===3&&(ue&62914560)===ue&&300>ft()-Pu?(ve&2)===0&&Qn(e,0):Js|=a,qn===ue&&(qn=0)),ya(e)}function jd(e,t){t===0&&(t=ou()),e=Ql(e,t),e!==null&&(_l(e,t),ya(e))}function Tm(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),jd(e,a)}function Em(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,n=e.memoizedState;n!==null&&(a=n.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(m(314))}l!==null&&l.delete(t),jd(e,a)}function Mm(e,t){return Nt(e,t)}var uc=null,Vn=null,ao=!1,cc=!1,lo=!1,jl=0;function ya(e){e!==Vn&&e.next===null&&(Vn===null?uc=Vn=e:Vn=Vn.next=e),cc=!0,ao||(ao=!0,Om())}function Xi(e,t){if(!lo&&cc){lo=!0;do for(var a=!1,l=uc;l!==null;){if(e!==0){var n=l.pendingLanes;if(n===0)var i=0;else{var c=l.suspendedLanes,s=l.pingedLanes;i=(1<<31-Qe(42|e)+1)-1,i&=n&~(c&~s),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,Ed(l,i))}else i=ue,i=un(l,l===ze?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||Rl(l,i)||(a=!0,Ed(l,i));l=l.next}while(a);lo=!1}}function zm(){Ad()}function Ad(){cc=ao=!1;var e=0;jl!==0&&Gm()&&(e=jl);for(var t=ft(),a=null,l=uc;l!==null;){var n=l.next,i=Nd(l,t);i===0?(l.next=null,a===null?uc=n:a.next=n,n===null&&(Vn=a)):(a=l,(e!==0||(i&3)!==0)&&(cc=!0)),l=n}at!==0&&at!==5||Xi(e),jl!==0&&(jl=0)}function Nd(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var c=31-Qe(i),s=1<<c,r=n[c];r===-1?((s&a)===0||(s&l)!==0)&&(n[c]=cn(s,t)):r<=t&&(e.expiredLanes|=s),i&=~s}if(t=ze,a=ue,a=un(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(ye===2||ye===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Cl(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Rl(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Cl(l),$a(a)){case 2:case 8:a=Fa;break;case 32:a=Dl;break;case 268435456:a=uu;break;default:a=Dl}return l=Td.bind(null,e),a=Nt(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Cl(l),e.callbackPriority=2,e.callbackNode=null,2}function Td(e,t){if(at!==0&&at!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(ic()&&e.callbackNode!==a)return null;var l=ue;return l=un(e,e===ze?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(ud(e,l,t),Nd(e,ft()),e.callbackNode!=null&&e.callbackNode===a?Td.bind(null,e):null)}function Ed(e,t){if(ic())return null;ud(e,t,!0)}function Om(){Ym(function(){(ve&6)!==0?Nt(iu,zm):Ad()})}function no(){if(jl===0){var e=On;e===0&&(e=ln,ln<<=1,(ln&261888)===0&&(ln=256)),jl=e}return jl}function Md(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:dn(""+e)}function zd(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Cm(e,t,a,l,n){if(t==="submit"&&a&&a.stateNode===n){var i=Md((n[ut]||null).action),c=l.submitter;c&&(t=(t=c[ut]||null)?Md(t.formAction):c.getAttribute("formAction"),t!==null&&(i=t,c=null));var s=new gn("action","action",null,l,n);e.push({event:s,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(jl!==0){var r=c?zd(n,c):new FormData(n);Ns(a,{pending:!0,data:r,method:n.method,action:i},null,r)}}else typeof i=="function"&&(s.preventDefault(),r=c?zd(n,c):new FormData(n),Ns(a,{pending:!0,data:r,method:n.method,action:i},i,r))},currentTarget:n}]})}}for(var io=0;io<Yc.length;io++){var uo=Yc[io],Dm=uo.toLowerCase(),Rm=uo[0].toUpperCase()+uo.slice(1);la(Dm,"on"+Rm)}la(nr,"onAnimationEnd"),la(ir,"onAnimationIteration"),la(ur,"onAnimationStart"),la("dblclick","onDoubleClick"),la("focusin","onFocus"),la("focusout","onBlur"),la(Jh,"onTransitionRun"),la(Wh,"onTransitionStart"),la(Fh,"onTransitionCancel"),la(cr,"onTransitionEnd"),el("onMouseEnter",["mouseout","mouseover"]),el("onMouseLeave",["mouseout","mouseover"]),el("onPointerEnter",["pointerout","pointerover"]),el("onPointerLeave",["pointerout","pointerover"]),ca("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ca("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ca("onBeforeInput",["compositionend","keypress","textInput","paste"]),ca("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ca("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ca("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),_m=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vi));function Od(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],n=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var c=l.length-1;0<=c;c--){var s=l[c],r=s.instance,y=s.currentTarget;if(s=s.listener,r!==i&&n.isPropagationStopped())break e;i=s,n.currentTarget=y;try{i(n)}catch(A){ju(A)}n.currentTarget=null,i=r}else for(c=0;c<l.length;c++){if(s=l[c],r=s.instance,y=s.currentTarget,s=s.listener,r!==i&&n.isPropagationStopped())break e;i=s,n.currentTarget=y;try{i(n)}catch(A){ju(A)}n.currentTarget=null,i=r}}}}function ne(e,t){var a=t[ii];a===void 0&&(a=t[ii]=new Set);var l=e+"__bubble";a.has(l)||(Cd(t,e,2,!1),a.add(l))}function co(e,t,a){var l=0;t&&(l|=4),Cd(a,e,l,t)}var sc="_reactListening"+Math.random().toString(36).slice(2);function so(e){if(!e[sc]){e[sc]=!0,ui.forEach(function(a){a!=="selectionchange"&&(_m.has(a)||co(a,!1,e),co(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[sc]||(t[sc]=!0,co("selectionchange",!1,t))}}function Cd(e,t,a,l){switch(ih(t)){case 2:var n=cg;break;case 8:n=sg;break;default:n=No}a=n.bind(null,t,a,e),n=void 0,!vu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),l?n!==void 0?e.addEventListener(t,a,{capture:!0,passive:n}):e.addEventListener(t,a,!0):n!==void 0?e.addEventListener(t,a,{passive:n}):e.addEventListener(t,a,!1)}function oo(e,t,a,l,n){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var c=l.tag;if(c===3||c===4){var s=l.stateNode.containerInfo;if(s===n)break;if(c===4)for(c=l.return;c!==null;){var r=c.tag;if((r===3||r===4)&&c.stateNode.containerInfo===n)return;c=c.return}for(;s!==null;){if(c=ja(s),c===null)return;if(r=c.tag,r===5||r===6||r===26||r===27){l=i=c;continue e}s=s.parentNode}}l=l.return}gu(function(){var y=i,A=Ea(a),E=[];e:{var x=sr.get(e);if(x!==void 0){var S=gn,G=e;switch(e){case"keypress":if(Oa(a)===0)break e;case"keydown":case"keyup":S=Ll;break;case"focusin":G="focus",S=d;break;case"focusout":G="blur",S=d;break;case"beforeblur":case"afterblur":S=d;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":S=di;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":S=mi;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":S=yn;break;case nr:case ir:case ur:S=Z;break;case cr:S=Gl;break;case"scroll":case"scrollend":S=_c;break;case"wheel":S=_h;break;case"copy":case"cut":case"paste":S=be;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":S=xu;break;case"toggle":case"beforetoggle":S=Hh}var k=(t&4)!==0,Ne=!k&&(e==="scroll"||e==="scrollend"),v=k?x!==null?x+"Capture":null:x;k=[];for(var h=y,p;h!==null;){var T=h;if(p=T.stateNode,T=T.tag,T!==5&&T!==26&&T!==27||p===null||v===null||(T=za(h,v),T!=null&&k.push(Zi(h,T,p))),Ne)break;h=h.return}0<k.length&&(x=new S(x,G,null,a,A),E.push({event:x,listeners:k}))}}if((t&7)===0){e:{if(x=e==="mouseover"||e==="pointerover",S=e==="mouseout"||e==="pointerout",x&&a!==fa&&(G=a.relatedTarget||a.fromElement)&&(ja(G)||G[Ia]))break e;if((S||x)&&(x=A.window===A?A:(x=A.ownerDocument)?x.defaultView||x.parentWindow:window,S?(G=a.relatedTarget||a.toElement,S=y,G=G?ja(G):null,G!==null&&(Ne=R(G),k=G.tag,G!==Ne||k!==5&&k!==27&&k!==6)&&(G=null)):(S=null,G=y),S!==G)){if(k=di,T="onMouseLeave",v="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(k=xu,T="onPointerLeave",v="onPointerEnter",h="pointer"),Ne=S==null?x:Xt(S),p=G==null?x:Xt(G),x=new k(T,h+"leave",S,a,A),x.target=Ne,x.relatedTarget=p,T=null,ja(A)===y&&(k=new k(v,h+"enter",G,a,A),k.target=p,k.relatedTarget=Ne,T=k),Ne=T,S&&G)t:{for(k=Um,v=S,h=G,p=0,T=v;T;T=k(T))p++;T=0;for(var X=h;X;X=k(X))T++;for(;0<p-T;)v=k(v),p--;for(;0<T-p;)h=k(h),T--;for(;p--;){if(v===h||h!==null&&v===h.alternate){k=v;break t}v=k(v),h=k(h)}k=null}else k=null;S!==null&&Dd(E,x,S,k,!1),G!==null&&Ne!==null&&Dd(E,Ne,G,k,!0)}}e:{if(x=y?Xt(y):window,S=x.nodeName&&x.nodeName.toLowerCase(),S==="select"||S==="input"&&x.type==="file")var he=ko;else if(Zo(x))if(Jo)he=Zh;else{he=Xh;var Y=Qh}else S=x.nodeName,!S||S.toLowerCase()!=="input"||x.type!=="checkbox"&&x.type!=="radio"?y&&wl(y.elementType)&&(he=ko):he=Vh;if(he&&(he=he(e,y))){Ko(E,he,a,A);break e}Y&&Y(e,x,y),e==="focusout"&&y&&x.type==="number"&&y.memoizedProps.value!=null&&al(x,"number",x.value)}switch(Y=y?Xt(y):window,e){case"focusin":(Zo(Y)||Y.contentEditable==="true")&&(bn=Y,Lc=y,Si=null);break;case"focusout":Si=Lc=bn=null;break;case"mousedown":Gc=!0;break;case"contextmenu":case"mouseup":case"dragend":Gc=!1,ar(E,a,A);break;case"selectionchange":if(kh)break;case"keydown":case"keyup":ar(E,a,A)}var ee;if(Uc)e:{switch(e){case"compositionstart":var ce="onCompositionStart";break e;case"compositionend":ce="onCompositionEnd";break e;case"compositionupdate":ce="onCompositionUpdate";break e}ce=void 0}else Sn?Xo(e,a)&&(ce="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ce="onCompositionStart");ce&&(qo&&a.locale!=="ko"&&(Sn||ce!=="onCompositionStart"?ce==="onCompositionEnd"&&Sn&&(ee=pu()):(St=A,ha="value"in St?St.value:St.textContent,Sn=!0)),Y=oc(y,ce),0<Y.length&&(ce=new ae(ce,e,null,a,A),E.push({event:ce,listeners:Y}),ee?ce.data=ee:(ee=Vo(a),ee!==null&&(ce.data=ee)))),(ee=Bh?Lh(e,a):Gh(e,a))&&(ce=oc(y,"onBeforeInput"),0<ce.length&&(Y=new ae("onBeforeInput","beforeinput",null,a,A),E.push({event:Y,listeners:ce}),Y.data=ee)),Cm(E,e,y,a,A)}Od(E,t)})}function Zi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function oc(e,t){for(var a=t+"Capture",l=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=za(e,a),n!=null&&l.unshift(Zi(e,n,i)),n=za(e,t),n!=null&&l.push(Zi(e,n,i))),e.tag===3)return l;e=e.return}return[]}function Um(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dd(e,t,a,l,n){for(var i=t._reactName,c=[];a!==null&&a!==l;){var s=a,r=s.alternate,y=s.stateNode;if(s=s.tag,r!==null&&r===l)break;s!==5&&s!==26&&s!==27||y===null||(r=y,n?(y=za(a,i),y!=null&&c.unshift(Zi(a,y,r))):n||(y=za(a,i),y!=null&&c.push(Zi(a,y,r)))),a=a.return}c.length!==0&&e.push({event:t,listeners:c})}var Hm=/\r\n?/g,wm=/\u0000|\uFFFD/g;function Rd(e){return(typeof e=="string"?e:""+e).replace(Hm,`
9
+ `).replace(wm,"")}function _d(e,t){return t=Rd(t),Rd(e)===t}function Ae(e,t,a,l,n,i){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Ta(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Ta(e,""+l);break;case"className":ra(e,"class",l);break;case"tabIndex":ra(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":ra(e,a,l);break;case"style":Hl(e,l,i);break;case"data":if(t!=="object"){ra(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=dn(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(a==="formAction"?(t!=="input"&&Ae(e,t,"name",n.name,n,null),Ae(e,t,"formEncType",n.formEncType,n,null),Ae(e,t,"formMethod",n.formMethod,n,null),Ae(e,t,"formTarget",n.formTarget,n,null)):(Ae(e,t,"encType",n.encType,n,null),Ae(e,t,"method",n.method,n,null),Ae(e,t,"target",n.target,n,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=dn(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=ta);break;case"onScroll":l!=null&&ne("scroll",e);break;case"onScrollEnd":l!=null&&ne("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(m(61));if(a=l.__html,a!=null){if(n.children!=null)throw Error(m(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=dn(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":ne("beforetoggle",e),ne("toggle",e),oa(e,"popover",l);break;case"xlinkActuate":Je(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Je(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Je(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Je(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Je(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Je(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Je(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Je(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Je(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":oa(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Dc.get(a)||a,oa(e,a,l))}}function ro(e,t,a,l,n,i){switch(a){case"style":Hl(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(m(61));if(a=l.__html,a!=null){if(n.children!=null)throw Error(m(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Ta(e,l):(typeof l=="number"||typeof l=="bigint")&&Ta(e,""+l);break;case"onScroll":l!=null&&ne("scroll",e);break;case"onScrollEnd":l!=null&&ne("scrollend",e);break;case"onClick":l!=null&&(e.onclick=ta);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Aa.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(n=a.endsWith("Capture"),t=a.slice(2,n?a.length-7:void 0),i=e[ut]||null,i=i!=null?i[a]:null,typeof i=="function"&&e.removeEventListener(t,i,n),typeof l=="function")){typeof i!="function"&&i!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,n);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):oa(e,a,l)}}}function pt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ne("error",e),ne("load",e);var l=!1,n=!1,i;for(i in a)if(a.hasOwnProperty(i)){var c=a[i];if(c!=null)switch(i){case"src":l=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(m(137,t));default:Ae(e,t,i,c,a,null)}}n&&Ae(e,t,"srcSet",a.srcSet,a,null),l&&Ae(e,t,"src",a.src,a,null);return;case"input":ne("invalid",e);var s=i=c=n=null,r=null,y=null;for(l in a)if(a.hasOwnProperty(l)){var A=a[l];if(A!=null)switch(l){case"name":n=A;break;case"type":c=A;break;case"checked":r=A;break;case"defaultChecked":y=A;break;case"value":i=A;break;case"defaultValue":s=A;break;case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(m(137,t));break;default:Ae(e,t,l,A,a,null)}}rn(e,i,s,r,y,c,n,!1);return;case"select":ne("invalid",e),l=c=i=null;for(n in a)if(a.hasOwnProperty(n)&&(s=a[n],s!=null))switch(n){case"value":i=s;break;case"defaultValue":c=s;break;case"multiple":l=s;default:Ae(e,t,n,s,a,null)}t=i,a=c,e.multiple=!!l,t!=null?ll(e,!!l,t,!1):a!=null&&ll(e,!!l,a,!0);return;case"textarea":ne("invalid",e),i=n=l=null;for(c in a)if(a.hasOwnProperty(c)&&(s=a[c],s!=null))switch(c){case"value":l=s;break;case"defaultValue":n=s;break;case"children":i=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(m(91));break;default:Ae(e,t,c,s,a,null)}oi(e,l,n,i);return;case"option":for(r in a)a.hasOwnProperty(r)&&(l=a[r],l!=null)&&(r==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Ae(e,t,r,l,a,null));return;case"dialog":ne("beforetoggle",e),ne("toggle",e),ne("cancel",e),ne("close",e);break;case"iframe":case"object":ne("load",e);break;case"video":case"audio":for(l=0;l<Vi.length;l++)ne(Vi[l],e);break;case"image":ne("error",e),ne("load",e);break;case"details":ne("toggle",e);break;case"embed":case"source":case"link":ne("error",e),ne("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(y in a)if(a.hasOwnProperty(y)&&(l=a[y],l!=null))switch(y){case"children":case"dangerouslySetInnerHTML":throw Error(m(137,t));default:Ae(e,t,y,l,a,null)}return;default:if(wl(t)){for(A in a)a.hasOwnProperty(A)&&(l=a[A],l!==void 0&&ro(e,t,A,l,a,void 0));return}}for(s in a)a.hasOwnProperty(s)&&(l=a[s],l!=null&&Ae(e,t,s,l,a,null))}function Bm(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,i=null,c=null,s=null,r=null,y=null,A=null;for(S in a){var E=a[S];if(a.hasOwnProperty(S)&&E!=null)switch(S){case"checked":break;case"value":break;case"defaultValue":r=E;default:l.hasOwnProperty(S)||Ae(e,t,S,null,l,E)}}for(var x in l){var S=l[x];if(E=a[x],l.hasOwnProperty(x)&&(S!=null||E!=null))switch(x){case"type":i=S;break;case"name":n=S;break;case"checked":y=S;break;case"defaultChecked":A=S;break;case"value":c=S;break;case"defaultValue":s=S;break;case"children":case"dangerouslySetInnerHTML":if(S!=null)throw Error(m(137,t));break;default:S!==E&&Ae(e,t,x,S,l,E)}}Na(e,c,s,r,y,A,i,n);return;case"select":S=c=s=x=null;for(i in a)if(r=a[i],a.hasOwnProperty(i)&&r!=null)switch(i){case"value":break;case"multiple":S=r;default:l.hasOwnProperty(i)||Ae(e,t,i,null,l,r)}for(n in l)if(i=l[n],r=a[n],l.hasOwnProperty(n)&&(i!=null||r!=null))switch(n){case"value":x=i;break;case"defaultValue":s=i;break;case"multiple":c=i;default:i!==r&&Ae(e,t,n,i,l,r)}t=s,a=c,l=S,x!=null?ll(e,!!a,x,!1):!!l!=!!a&&(t!=null?ll(e,!!a,t,!0):ll(e,!!a,a?[]:"",!1));return;case"textarea":S=x=null;for(s in a)if(n=a[s],a.hasOwnProperty(s)&&n!=null&&!l.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:Ae(e,t,s,null,l,n)}for(c in l)if(n=l[c],i=a[c],l.hasOwnProperty(c)&&(n!=null||i!=null))switch(c){case"value":x=n;break;case"defaultValue":S=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(m(91));break;default:n!==i&&Ae(e,t,c,n,l,i)}fn(e,x,S);return;case"option":for(var G in a)x=a[G],a.hasOwnProperty(G)&&x!=null&&!l.hasOwnProperty(G)&&(G==="selected"?e.selected=!1:Ae(e,t,G,null,l,x));for(r in l)x=l[r],S=a[r],l.hasOwnProperty(r)&&x!==S&&(x!=null||S!=null)&&(r==="selected"?e.selected=x&&typeof x!="function"&&typeof x!="symbol":Ae(e,t,r,x,l,S));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var k in a)x=a[k],a.hasOwnProperty(k)&&x!=null&&!l.hasOwnProperty(k)&&Ae(e,t,k,null,l,x);for(y in l)if(x=l[y],S=a[y],l.hasOwnProperty(y)&&x!==S&&(x!=null||S!=null))switch(y){case"children":case"dangerouslySetInnerHTML":if(x!=null)throw Error(m(137,t));break;default:Ae(e,t,y,x,l,S)}return;default:if(wl(t)){for(var Ne in a)x=a[Ne],a.hasOwnProperty(Ne)&&x!==void 0&&!l.hasOwnProperty(Ne)&&ro(e,t,Ne,void 0,l,x);for(A in l)x=l[A],S=a[A],!l.hasOwnProperty(A)||x===S||x===void 0&&S===void 0||ro(e,t,A,x,l,S);return}}for(var v in a)x=a[v],a.hasOwnProperty(v)&&x!=null&&!l.hasOwnProperty(v)&&Ae(e,t,v,null,l,x);for(E in l)x=l[E],S=a[E],!l.hasOwnProperty(E)||x===S||x==null&&S==null||Ae(e,t,E,x,l,S)}function Ud(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Lm(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var n=a[l],i=n.transferSize,c=n.initiatorType,s=n.duration;if(i&&s&&Ud(c)){for(c=0,s=n.responseEnd,l+=1;l<a.length;l++){var r=a[l],y=r.startTime;if(y>s)break;var A=r.transferSize,E=r.initiatorType;A&&Ud(E)&&(r=r.responseEnd,c+=A*(r<s?1:(s-y)/(r-y)))}if(--l,t+=8*(i+c)/(n.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var fo=null,ho=null;function rc(e){return e.nodeType===9?e:e.ownerDocument}function Hd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function wd(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function mo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var go=null;function Gm(){var e=window.event;return e&&e.type==="popstate"?e===go?!1:(go=e,!0):(go=null,!1)}var Bd=typeof setTimeout=="function"?setTimeout:void 0,qm=typeof clearTimeout=="function"?clearTimeout:void 0,Ld=typeof Promise=="function"?Promise:void 0,Ym=typeof queueMicrotask=="function"?queueMicrotask:typeof Ld<"u"?function(e){return Ld.resolve(null).then(e).catch(Qm)}:Bd;function Qm(e){setTimeout(function(){throw e})}function Al(e){return e==="head"}function Gd(e,t){var a=t,l=0;do{var n=a.nextSibling;if(e.removeChild(a),n&&n.nodeType===8)if(a=n.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(n),Jn(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Ki(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ki(a);for(var i=a.firstChild;i;){var c=i.nextSibling,s=i.nodeName;i[Ul]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=c}}else a==="body"&&Ki(e.ownerDocument.body);a=n}while(a);Jn(t)}function qd(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function vo(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":vo(a),Pa(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Xm(e,t,a,l){for(;e.nodeType===1;){var n=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Ul])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=$t(e.nextSibling),e===null)break}return null}function Vm(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=$t(e.nextSibling),e===null))return null;return e}function Yd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=$t(e.nextSibling),e===null))return null;return e}function po(e){return e.data==="$?"||e.data==="$~"}function yo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Zm(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function $t(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var xo=null;function Qd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return $t(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Xd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Vd(e,t,a){switch(t=rc(a),e){case"html":if(e=t.documentElement,!e)throw Error(m(452));return e;case"head":if(e=t.head,!e)throw Error(m(453));return e;case"body":if(e=t.body,!e)throw Error(m(454));return e;default:throw Error(m(451))}}function Ki(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Pa(e)}var It=new Map,Zd=new Set;function fc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ja=B.d;B.d={f:Km,r:km,D:Jm,C:Wm,L:Fm,m:$m,X:Pm,S:Im,M:eg};function Km(){var e=Ja.f(),t=ac();return e||t}function km(e){var t=f(e);t!==null&&t.tag===5&&t.type==="form"?sf(t):Ja.r(e)}var Zn=typeof document>"u"?null:document;function Kd(e,t,a){var l=Zn;if(l&&typeof t=="string"&&t){var n=Ct(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof a=="string"&&(n+='[crossorigin="'+a+'"]'),Zd.has(n)||(Zd.add(n),e={rel:e,crossOrigin:a,href:t},l.querySelector(n)===null&&(t=l.createElement("link"),pt(t,"link",e),Me(t),l.head.appendChild(t)))}}function Jm(e){Ja.D(e),Kd("dns-prefetch",e,null)}function Wm(e,t){Ja.C(e,t),Kd("preconnect",e,t)}function Fm(e,t,a){Ja.L(e,t,a);var l=Zn;if(l&&e&&t){var n='link[rel="preload"][as="'+Ct(t)+'"]';t==="image"&&a&&a.imageSrcSet?(n+='[imagesrcset="'+Ct(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(n+='[imagesizes="'+Ct(a.imageSizes)+'"]')):n+='[href="'+Ct(e)+'"]';var i=n;switch(t){case"style":i=Kn(e);break;case"script":i=kn(e)}It.has(i)||(e=L({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),It.set(i,e),l.querySelector(n)!==null||t==="style"&&l.querySelector(ki(i))||t==="script"&&l.querySelector(Ji(i))||(t=l.createElement("link"),pt(t,"link",e),Me(t),l.head.appendChild(t)))}}function $m(e,t){Ja.m(e,t);var a=Zn;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+Ct(l)+'"][href="'+Ct(e)+'"]',i=n;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=kn(e)}if(!It.has(i)&&(e=L({rel:"modulepreload",href:e},t),It.set(i,e),a.querySelector(n)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ji(i)))return}l=a.createElement("link"),pt(l,"link",e),Me(l),a.head.appendChild(l)}}}function Im(e,t,a){Ja.S(e,t,a);var l=Zn;if(l&&e){var n=ea(l).hoistableStyles,i=Kn(e);t=t||"default";var c=n.get(i);if(!c){var s={loading:0,preload:null};if(c=l.querySelector(ki(i)))s.loading=5;else{e=L({rel:"stylesheet",href:e,"data-precedence":t},a),(a=It.get(i))&&So(e,a);var r=c=l.createElement("link");Me(r),pt(r,"link",e),r._p=new Promise(function(y,A){r.onload=y,r.onerror=A}),r.addEventListener("load",function(){s.loading|=1}),r.addEventListener("error",function(){s.loading|=2}),s.loading|=4,dc(c,t,l)}c={type:"stylesheet",instance:c,count:1,state:s},n.set(i,c)}}}function Pm(e,t){Ja.X(e,t);var a=Zn;if(a&&e){var l=ea(a).hoistableScripts,n=kn(e),i=l.get(n);i||(i=a.querySelector(Ji(n)),i||(e=L({src:e,async:!0},t),(t=It.get(n))&&bo(e,t),i=a.createElement("script"),Me(i),pt(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(n,i))}}function eg(e,t){Ja.M(e,t);var a=Zn;if(a&&e){var l=ea(a).hoistableScripts,n=kn(e),i=l.get(n);i||(i=a.querySelector(Ji(n)),i||(e=L({src:e,async:!0,type:"module"},t),(t=It.get(n))&&bo(e,t),i=a.createElement("script"),Me(i),pt(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(n,i))}}function kd(e,t,a,l){var n=(n=W.current)?fc(n):null;if(!n)throw Error(m(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Kn(a.href),a=ea(n).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Kn(a.href);var i=ea(n).hoistableStyles,c=i.get(e);if(c||(n=n.ownerDocument||n,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,c),(i=n.querySelector(ki(e)))&&!i._p&&(c.instance=i,c.state.loading=5),It.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},It.set(e,a),i||tg(n,e,a,c.state))),t&&l===null)throw Error(m(528,""));return c}if(t&&l!==null)throw Error(m(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=kn(a),a=ea(n).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(m(444,e))}}function Kn(e){return'href="'+Ct(e)+'"'}function ki(e){return'link[rel="stylesheet"]['+e+"]"}function Jd(e){return L({},e,{"data-precedence":e.precedence,precedence:null})}function tg(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),pt(t,"link",a),Me(t),e.head.appendChild(t))}function kn(e){return'[src="'+Ct(e)+'"]'}function Ji(e){return"script[async]"+e}function Wd(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Ct(a.href)+'"]');if(l)return t.instance=l,Me(l),l;var n=L({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Me(l),pt(l,"style",n),dc(l,a.precedence,e),t.instance=l;case"stylesheet":n=Kn(a.href);var i=e.querySelector(ki(n));if(i)return t.state.loading|=4,t.instance=i,Me(i),i;l=Jd(a),(n=It.get(n))&&So(l,n),i=(e.ownerDocument||e).createElement("link"),Me(i);var c=i;return c._p=new Promise(function(s,r){c.onload=s,c.onerror=r}),pt(i,"link",l),t.state.loading|=4,dc(i,a.precedence,e),t.instance=i;case"script":return i=kn(a.src),(n=e.querySelector(Ji(i)))?(t.instance=n,Me(n),n):(l=a,(n=It.get(i))&&(l=L({},a),bo(l,n)),e=e.ownerDocument||e,n=e.createElement("script"),Me(n),pt(n,"link",l),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(m(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,dc(l,a.precedence,e));return t.instance}function dc(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=l.length?l[l.length-1]:null,i=n,c=0;c<l.length;c++){var s=l[c];if(s.dataset.precedence===t)i=s;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function So(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function bo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hc=null;function Fd(e,t,a){if(hc===null){var l=new Map,n=hc=new Map;n.set(a,l)}else n=hc,l=n.get(a),l||(l=new Map,n.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),n=0;n<a.length;n++){var i=a[n];if(!(i[Ul]||i[Xe]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var c=i.getAttribute(t)||"";c=e+c;var s=l.get(c);s?s.push(i):l.set(c,[i])}}return l}function $d(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function ag(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Id(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function lg(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var n=Kn(l.href),i=t.querySelector(ki(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=mc.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,Me(i);return}i=t.ownerDocument||t,l=Jd(l),(n=It.get(n))&&So(l,n),i=i.createElement("link"),Me(i);var c=i;c._p=new Promise(function(s,r){c.onload=s,c.onerror=r}),pt(i,"link",l),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=mc.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var jo=0;function ng(e,t){return e.stylesheets&&e.count===0&&vc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&vc(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&jo===0&&(jo=62500*Lm());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&vc(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>jo?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(n)}}:null}function mc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)vc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var gc=null;function vc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,gc=new Map,t.forEach(ig,e),gc=null,mc.call(e))}function ig(e,t){if(!(t.state.loading&4)){var a=gc.get(e);if(a)var l=a.get(null);else{a=new Map,gc.set(e,a);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var c=n[i];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(a.set(c.dataset.precedence,c),l=c)}l&&a.set(null,l)}n=t.instance,c=n.getAttribute("data-precedence"),i=a.get(c)||l,i===l&&a.set(null,n),a.set(c,n),this.count++,l=mc.bind(this),n.addEventListener("load",l),n.addEventListener("error",l),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var Wi={$$typeof:ge,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function ug(e,t,a,l,n,i,c,s,r){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=de(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=de(0),this.hiddenUpdates=de(null),this.identifierPrefix=l,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=r,this.incompleteTransitions=new Map}function Pd(e,t,a,l,n,i,c,s,r,y,A,E){return e=new ug(e,t,a,c,r,y,A,E,s),t=1,i===!0&&(t|=24),i=Ut(3,null,null,t),e.current=i,i.stateNode=e,t=es(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:a,cache:t},ns(i),e}function eh(e){return e?(e=Nn,e):Nn}function th(e,t,a,l,n,i){n=eh(n),l.context===null?l.context=n:l.pendingContext=n,l=dl(t),l.payload={element:a},i=i===void 0?null:i,i!==null&&(l.callback=i),a=hl(e,l,t),a!==null&&(Ot(a,e,t),Mi(a,e,t))}function ah(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function Ao(e,t){ah(e,t),(e=e.alternate)&&ah(e,t)}function lh(e){if(e.tag===13||e.tag===31){var t=Ql(e,67108864);t!==null&&Ot(t,e,67108864),Ao(e,67108864)}}function nh(e){if(e.tag===13||e.tag===31){var t=Gt();t=ba(t);var a=Ql(e,t);a!==null&&Ot(a,e,t),Ao(e,t)}}var pc=!0;function cg(e,t,a,l){var n=b.T;b.T=null;var i=B.p;try{B.p=2,No(e,t,a,l)}finally{B.p=i,b.T=n}}function sg(e,t,a,l){var n=b.T;b.T=null;var i=B.p;try{B.p=8,No(e,t,a,l)}finally{B.p=i,b.T=n}}function No(e,t,a,l){if(pc){var n=To(l);if(n===null)oo(e,t,l,yc,a),uh(e,l);else if(rg(n,e,t,a,l))l.stopPropagation();else if(uh(e,l),t&4&&-1<og.indexOf(e)){for(;n!==null;){var i=f(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var c=Yt(i.pendingLanes);if(c!==0){var s=i;for(s.pendingLanes|=2,s.entangledLanes|=2;c;){var r=1<<31-Qe(c);s.entanglements[1]|=r,c&=~r}ya(i),(ve&6)===0&&(ec=ft()+500,Xi(0))}}break;case 31:case 13:s=Ql(i,2),s!==null&&Ot(s,i,2),ac(),Ao(i,2)}if(i=To(l),i===null&&oo(e,t,l,yc,a),i===n)break;n=i}n!==null&&l.stopPropagation()}else oo(e,t,l,null,a)}}function To(e){return e=Ea(e),Eo(e)}var yc=null;function Eo(e){if(yc=null,e=ja(e),e!==null){var t=R(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=Q(t),e!==null)return e;e=null}else if(a===31){if(e=U(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return yc=e,null}function ih(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ec()){case iu:return 2;case Fa:return 8;case Dl:case Pn:return 32;case uu:return 268435456;default:return 32}default:return 32}}var Mo=!1,Nl=null,Tl=null,El=null,Fi=new Map,$i=new Map,Ml=[],og="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function uh(e,t){switch(e){case"focusin":case"focusout":Nl=null;break;case"dragenter":case"dragleave":Tl=null;break;case"mouseover":case"mouseout":El=null;break;case"pointerover":case"pointerout":Fi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":$i.delete(t.pointerId)}}function Ii(e,t,a,l,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:i,targetContainers:[n]},t!==null&&(t=f(t),t!==null&&lh(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function rg(e,t,a,l,n){switch(t){case"focusin":return Nl=Ii(Nl,e,t,a,l,n),!0;case"dragenter":return Tl=Ii(Tl,e,t,a,l,n),!0;case"mouseover":return El=Ii(El,e,t,a,l,n),!0;case"pointerover":var i=n.pointerId;return Fi.set(i,Ii(Fi.get(i)||null,e,t,a,l,n)),!0;case"gotpointercapture":return i=n.pointerId,$i.set(i,Ii($i.get(i)||null,e,t,a,l,n)),!0}return!1}function ch(e){var t=ja(e.target);if(t!==null){var a=R(t);if(a!==null){if(t=a.tag,t===13){if(t=Q(a),t!==null){e.blockedOn=t,ni(e.priority,function(){nh(a)});return}}else if(t===31){if(t=U(a),t!==null){e.blockedOn=t,ni(e.priority,function(){nh(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=To(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);fa=l,a.target.dispatchEvent(l),fa=null}else return t=f(a),t!==null&&lh(t),e.blockedOn=a,!1;t.shift()}return!0}function sh(e,t,a){xc(e)&&a.delete(t)}function fg(){Mo=!1,Nl!==null&&xc(Nl)&&(Nl=null),Tl!==null&&xc(Tl)&&(Tl=null),El!==null&&xc(El)&&(El=null),Fi.forEach(sh),$i.forEach(sh)}function Sc(e,t){e.blockedOn===t&&(e.blockedOn=null,Mo||(Mo=!0,g.unstable_scheduleCallback(g.unstable_NormalPriority,fg)))}var bc=null;function oh(e){bc!==e&&(bc=e,g.unstable_scheduleCallback(g.unstable_NormalPriority,function(){bc===e&&(bc=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],n=e[t+2];if(typeof l!="function"){if(Eo(l||a)===null)continue;break}var i=f(a);i!==null&&(e.splice(t,3),t-=3,Ns(i,{pending:!0,data:n,method:a.method,action:l},l,n))}}))}function Jn(e){function t(r){return Sc(r,e)}Nl!==null&&Sc(Nl,e),Tl!==null&&Sc(Tl,e),El!==null&&Sc(El,e),Fi.forEach(t),$i.forEach(t);for(var a=0;a<Ml.length;a++){var l=Ml[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Ml.length&&(a=Ml[0],a.blockedOn===null);)ch(a),a.blockedOn===null&&Ml.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var n=a[l],i=a[l+1],c=n[ut]||null;if(typeof i=="function")c||oh(a);else if(c){var s=null;if(i&&i.hasAttribute("formAction")){if(n=i,c=i[ut]||null)s=c.formAction;else if(Eo(n)!==null)continue}else s=c.action;typeof s=="function"?a[l+1]=s:(a.splice(l,3),l-=3),oh(a)}}}function rh(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(c){return n=c})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function zo(e){this._internalRoot=e}jc.prototype.render=zo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(m(409));var a=t.current,l=Gt();th(a,l,e,t,null,null)},jc.prototype.unmount=zo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;th(e.current,2,null,e,null,null),ac(),t[Ia]=null}};function jc(e){this._internalRoot=e}jc.prototype.unstable_scheduleHydration=function(e){if(e){var t=li();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ml.length&&t!==0&&t<Ml[a].priority;a++);Ml.splice(a,0,e),a===0&&ch(e)}};var fh=C.version;if(fh!=="19.2.5")throw Error(m(527,fh,"19.2.5"));B.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(m(188)):(e=Object.keys(e).join(","),Error(m(268,e)));return e=N(t),e=e!==null?q(e):null,e=e===null?null:e.stateNode,e};var dg={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:b,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ac=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ac.isDisabled&&Ac.supportsFiber)try{xa=Ac.inject(dg),dt=Ac}catch{}}return eu.createRoot=function(e,t){if(!w(e))throw Error(m(299));var a=!1,l="",n=yf,i=xf,c=Sf;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Pd(e,1,!1,null,null,a,l,null,n,i,c,rh),e[Ia]=t.current,so(e),new zo(t)},eu.hydrateRoot=function(e,t,a){if(!w(e))throw Error(m(299));var l=!1,n="",i=yf,c=xf,s=Sf,r=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(n=a.identifierPrefix),a.onUncaughtError!==void 0&&(i=a.onUncaughtError),a.onCaughtError!==void 0&&(c=a.onCaughtError),a.onRecoverableError!==void 0&&(s=a.onRecoverableError),a.formState!==void 0&&(r=a.formState)),t=Pd(e,1,!0,t,a??null,l,n,r,i,c,s,rh),t.context=eh(null),a=t.current,l=Gt(),l=ba(l),n=dl(l),n.callback=null,hl(a,n,l),a=l,t.current.lanes=a,_l(t,a),ya(t),e[Ia]=t.current,so(e),new jc(t)},eu.version="19.2.5",eu}var bh;function Ag(){if(bh)return Do.exports;bh=1;function g(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g)}catch(C){console.error(C)}}return g(),Do.exports=jg(),Do.exports}var Ng=Ag(),jh=Ch();const Tg={},{VITE_SIGNALK_URL:jt=window.location.origin}=Tg,Eg=new URL("/signalk/v1/api/vessels/self/environment/tide",jt).toString(),Mg=new URL("/signalk/v1/api/vessels/self/navigation/datetime",jt).toString(),zg=new URL("/signalk/v1/api/vessels/self/environment/sunlight/times",jt).toString(),Og=new URL("/signalk/v1/api/resources/tides",jt).toString(),Cg=new URL("/signalk-mareas-ihm/api/extremes",jt).toString();new URL("/#/serverConfiguration/plugins/mareas-ihm",jt).toString();async function tu(g){const C=await fetch(g,{credentials:"include"});if(!C.ok)throw new Error(`HTTP ${C.status}: ${C.statusText}`);return C.json()}function Ye(g){return g&&typeof g=="object"&&"value"in g?g.value:g}function au(g){if(g&&typeof g=="object"&&"timestamp"in g)return g.timestamp}function Dg(g){return!g||typeof g!="object"?{}:{stationName:Ye(g.stationName),heightNow:Ye(g.heightNow),tendency:Ye(g.tendency),heightLastHigh:Ye(g.heightLastHigh),timeLastHigh:Ye(g.timeLastHigh),heightLastLow:Ye(g.heightLastLow),timeLastLow:Ye(g.timeLastLow),heightNextHigh:Ye(g.heightNextHigh),timeNextHigh:Ye(g.timeNextHigh),heightNextLow:Ye(g.heightNextLow),timeNextLow:Ye(g.timeNextLow),coef:Ye(g.coef),coefLocal:Ye(g.coefLocal),amplitudeCoefficient:Ye(g.amplitudeCoefficient),pluginVersion:Ye(g.pluginVersion),pluginIteration:Ye(g.pluginIteration),navegacionRiasbaixas:Ye(g.navegacionRiasbaixas),resume:Ye(g.resume),groundingStatus:Ye(g.vessel?.groundingStatus),timestamp:au(g.heightNow)??au(g.timeNextHigh)??au(g.timeNextLow)??au(g.timeLastHigh)??au(g.timeLastLow)}}function Rg(g){return!g||typeof g!="object"?{}:{sunrise:Ye(g.sunrise),sunset:Ye(g.sunset)}}function Ah(g){if(!g)return;const C=Array.isArray(g)?g[0]:g&&typeof g=="object"&&Array.isArray(g.resources)?g.resources[0]:g;if(!C||typeof C!="object")return;const O=C.extremes;if(!Array.isArray(O))return;const m=C.station??{name:C.stationName??"Mareas"},w=O.map(R=>({time:String(R.time),value:typeof R.value=="number"?R.value:Number(R.value),type:R.type?String(R.type):void 0})).filter(R=>R.time&&Number.isFinite(R.value));return{station:{id:m.id?String(m.id):void 0,name:String(m.name??"Mareas"),lat:m.lat!=null?Number(m.lat):void 0,lon:m.lon!=null?Number(m.lon):void 0},extremes:w,coef:typeof C.coef=="number"?C.coef:void 0}}function _g(g=30){const[C,O]=z.useState(),[m,w]=z.useState(),[R,Q]=z.useState(null),[U,_]=z.useState(0),N=()=>_(q=>q+1);return z.useEffect(()=>{let q=!1;const L=async()=>{try{const re=await tu(Eg);if(q)return;let Oe={};try{const fe=await tu(zg);Oe=Rg(fe)}catch{}let Se;try{const fe=await tu(Mg);Se=Ye(fe)}catch{}O({...Dg(re),...Oe,...Se?{navDatetime:Se}:{}});let Pe=!1;try{const fe=await tu(Cg),Te=Ah(fe);q||w(Te),Pe=!!Te}catch{}if(!Pe)try{const fe=await tu(Og);q||w(Ah(fe))}catch{q||w(void 0)}Q(null)}catch(re){q||Q(re?.message??String(re))}};L();const ie=window.setInterval(L,g*1e3);return()=>{q=!0,window.clearInterval(ie)}},[g,U]),{snapshot:C,forecast:m,error:R,refetch:N}}const Ug={},{VITE_SIGNALK_URL:Hg=window.location.origin}=Ug;function wg(g){const[C,O]=z.useState({status:"idle",ref:null});return z.useEffect(()=>{let m=!1;if(!g){O({status:"idle",ref:null});return}return O({status:"loading",ref:null}),(async()=>{try{const w=new URL(`/signalk-mareas-ihm/api/stationRef?id=${encodeURIComponent(g)}`,Hg).toString(),R=await fetch(w,{credentials:"include"});if(!R.ok){m||O({status:R.status===404?"missing":"idle",ref:null,error:`HTTP ${R.status}`});return}const Q=await R.json(),U={id:String(Q.id??g),hat:Number(Q.hat),lat:Number(Q.lat),datum:String(Q.datum??""),source:Q.source!=null?String(Q.source):void 0,updated:Q.updated!=null?String(Q.updated):void 0};if(!Number.isFinite(U.hat)||!Number.isFinite(U.lat)||U.hat<=U.lat){m||O({status:"idle",ref:null,error:"invalid ref"});return}m||O({status:"ok",ref:U})}catch(w){m||O({status:"idle",ref:null,error:w?.message??String(w)})}})(),()=>{m=!0}},[g]),C}const Bg=yg[typeof document<"u"&&document.createElement!==void 0?"useLayoutEffect":"useEffect"],Lg=g=>{const C=z.useRef(g);return z.useEffect(()=>{C.current=g}),C};function Gg(){}function qg(g,C,O={}){const m=Qg(O.polyfill),w=Lg(C);return Bg(()=>{let R=!1;const Q=g&&"current"in g?g.current:g;if(!Q)return Gg;function U(_,N){R||w.current(_,N)}return m.subscribe(Q,U),()=>{R=!0,m.unsubscribe(Q,U)}},[g,m,w]),m.observer}function Yg(g){let C=!1,O=[];const m=new Map,w=new(g||window.ResizeObserver)((R,Q)=>{O=O.concat(R);function U(){const _=new Set;for(let N=0;N<O.length;N++){if(_.has(O[N].target))continue;_.add(O[N].target);const q=m.get(O[N].target);q?.forEach(L=>L(O[N],Q))}O=[],C=!1}C||window.requestAnimationFrame(U),C=!0});return{observer:w,subscribe(R,Q){var U;w.observe(R);const _=(U=m.get(R))!==null&&U!==void 0?U:[];_.push(Q),m.set(R,_)},unsubscribe(R,Q){var U;const _=(U=m.get(R))!==null&&U!==void 0?U:[];if(_.length===1){w.unobserve(R),m.delete(R);return}const N=_.indexOf(Q);N!==-1&&_.splice(N,1),m.set(R,_)}}}let Ho;const Qg=g=>Ho||(Ho=Yg(g));function Xg(g){const[C,O]=z.useState(),m=()=>{const w=g.current;w&&O(new DOMRect(0,0,w.clientWidth,w.clientHeight))};return z.useLayoutEffect(()=>{m()},[]),qg(g,()=>m()),C}const Vg=new URL("/signalk-mareas-ihm/api/stations",jt).toString(),Nh=new URL("/signalk-mareas-ihm/api/manual",jt).toString(),Th=new URL("/signalk-mareas-ihm/api/alarma",jt).toString(),Zg=new URL("/signalk-mareas-ihm/api/snooze",jt).toString(),Kg=new URL("/signalk-mareas-ihm/api/alarma/off",jt).toString(),Eh=new URL("/signalk-mareas-ihm/api/settings",jt).toString(),Mh=new URL("/signalk-mareas-ihm/api/anchor/config",jt).toString(),kg=new URL("/signalk-mareas-ihm/api/anchor/calc",jt).toString();function Nc(g){if(!g)return"–";const C=g.match(/T(\d{2}):(\d{2})/);return C?`${C[1]}:${C[2]}`:"–"}function Go(g){if(!g)return null;const C=g.match(/([+-])(\d{2}):(\d{2})\s*$/)||g.match(/Z\s*$/);if(!C)return null;if(C[0].trim()==="Z")return 0;const O=C[1]==="-"?-1:1,m=Number(C[2]),w=Number(C[3]);return!Number.isFinite(m)||!Number.isFinite(w)?null:O*(m*60+w)}function Dh(g,C){const O=Go(C);if(O==null)return null;const m=new Date(g.getTime()+O*6e4),w=String(m.getUTCHours()).padStart(2,"0"),R=String(m.getUTCMinutes()).padStart(2,"0");return`${w}:${R}`}function wo(g,C){if(!g)return"–";const O=new Date(g);return Number.isNaN(O.getTime())?"–":Dh(O,C)??Nc(g)}function lu(g,C=2){return g.toFixed(C).replace(".",",")}function Jg(g){return(1-Math.cos(g*Math.PI))/2}function Tc(g,C){if(!Array.isArray(g)||g.length<2)return null;const O=g.slice().sort((U,_)=>new Date(U.time).getTime()-new Date(_.time).getTime()),m=O.filter(U=>new Date(U.time)<=C).pop(),w=O.find(U=>new Date(U.time)>=C);if(!m||!w)return null;const R=new Date(w.time).getTime()-new Date(m.time).getTime(),Q=R>0?(C.getTime()-new Date(m.time).getTime())/R:0;return m.value+(w.value-m.value)*Jg(Math.max(0,Math.min(1,Q)))}function Wg(g,C){const O=g.slice().sort((R,Q)=>new Date(R.time).getTime()-new Date(Q.time).getTime()),m=O.filter(R=>new Date(R.time)<=C),w=O.filter(R=>new Date(R.time)>C);return{prev:m.pop(),next:w[0],sorted:O}}function Fg({extremes:g,now:C,heightNow:O,riskTimeIso:m,stationSampleIso:w,stationName:R,onClose:Q,tr:U}){const[_,N]=z.useState(null),q=z.useRef(null),L=z.useMemo(()=>g.slice().sort((o,j)=>new Date(o.time).getTime()-new Date(j.time).getTime()),[g]),ie=z.useCallback(o=>{const j=Go(w),D=new Date(o+(j??0)*6e4),H=String(D.getUTCHours()).padStart(2,"0"),K=String(D.getUTCMinutes()).padStart(2,"0");return`${H}:${K}`},[w]),{rangeStart:re,rangeEnd:Oe,visibleExtremes:Se}=z.useMemo(()=>{const o=C.getTime(),j=L.filter(P=>new Date(P.time).getTime()<=o),D=L.filter(P=>new Date(P.time).getTime()>o),H=[...j.slice(-3),...D.slice(0,4)];if(H.length<2)return{rangeStart:o-12*36e5,rangeEnd:o+12*36e5,visibleExtremes:H};const K=new Date(H[0].time).getTime(),W=new Date(H[H.length-1].time).getTime();return{rangeStart:K,rangeEnd:W,visibleExtremes:H}},[L,C]),Pe=z.useMemo(()=>{const o=[];for(let D=re;D<=Oe;D+=3e5){const H=Tc(L,new Date(D));H!=null&&o.push({t:D,h:H})}return o},[L,re,Oe]),fe=600,Te=320,ge=50,Ke=15,He=25,Le=40,F=fe-ge-Ke,Ce=Te-He-Le,ke=Pe.map(o=>o.h),ot=Math.floor((Math.min(...ke)-.3)*10)/10,lt=Math.ceil((Math.max(...ke)+.3)*10)/10,pe=o=>He+Ce-(o-ot)/(lt-ot)*Ce,Be=o=>ge+(o-re)/(Oe-re)*F,At=Pe.map((o,j)=>`${j===0?"M":"L"}${Be(o.t).toFixed(1)},${pe(o.h).toFixed(1)}`).join(" "),rt=Se.map(o=>new Date(o.time).getTime()),b=[];for(let o=Math.ceil(ot*2)/2;o<=lt;o+=.5)b.push(o);const B=m?ie(new Date(m).getTime()):null,V=o=>{const j=q.current;if(!j)return;const D=j.getBoundingClientRect(),H=fe/D.width,K=(o.clientX-D.left)*H,W=re+(K-ge)/F*(Oe-re);if(W<re||W>Oe){N(null);return}const P=Tc(L,new Date(W));P!=null&&N({x:K,time:new Date(W),height:P})},te=Be(C.getTime()),se=pe(O);return u.jsx("div",{className:"tide-chart-modal",onClick:o=>{o.target===o.currentTarget&&Q()},children:u.jsxs("div",{className:"tide-chart-container",children:[u.jsxs("div",{className:"tide-chart-header",children:[u.jsxs("div",{className:"tide-chart-title-block",children:[u.jsxs("span",{className:"tide-chart-title",children:[U("Curva de Mareas","Tide Curve"),R?` — ${R}`:""]}),u.jsxs("span",{className:"tide-chart-subtitle",children:[U("Creada el","Generated on")," ",C.toLocaleDateString()," ",U("a las","at")," ",ie(C.getTime())]})]}),u.jsx("button",{className:"tide-chart-close",onClick:Q,children:"✕"})]}),u.jsxs("svg",{ref:q,viewBox:`0 0 ${fe} ${Te}`,className:"tide-chart-svg",onPointerMove:V,onPointerLeave:()=>N(null),style:{touchAction:"none"},children:[u.jsx("rect",{x:ge,y:He,width:F,height:Ce,fill:"#f8f9fa",stroke:"#ddd"}),b.map(o=>u.jsxs("g",{children:[u.jsx("line",{x1:ge,y1:pe(o),x2:fe-Ke,y2:pe(o),stroke:"#e0e0e0",strokeWidth:"0.5"}),u.jsxs("text",{x:ge-5,y:pe(o)+3.5,textAnchor:"end",fontSize:"10",fill:"#666",children:[o.toFixed(1),"m"]})]},o)),rt.map((o,j)=>u.jsxs("g",{children:[u.jsx("line",{x1:Be(o),y1:He,x2:Be(o),y2:Te-Le,stroke:"#e8e8e8",strokeWidth:"0.5"}),u.jsx("text",{x:Be(o),y:Te-Le+14,textAnchor:"middle",fontSize:"9",fill:"#999",children:ie(o)})]},j)),u.jsx("path",{d:At,fill:"none",stroke:"#2563eb",strokeWidth:"2.5",strokeLinejoin:"round"}),u.jsx("line",{x1:te,y1:He,x2:te,y2:Te-Le,stroke:"#333",strokeWidth:"1.2",strokeDasharray:"4,2"}),u.jsx("circle",{cx:te,cy:se,r:"4.5",fill:"#333",stroke:"#fff",strokeWidth:"1"}),u.jsx("rect",{x:te-70,y:Math.max(He,se-34),width:"140",height:"24",rx:"4",fill:"rgba(0,0,0,0.8)"}),u.jsxs("text",{x:te,y:Math.max(He+15,se-18),textAnchor:"middle",fontSize:"11",fill:"#fff",fontWeight:"bold",children:[U("AHORA","NOW"),": ",ie(C.getTime())," ",O.toFixed(2),"m"]}),Se.map((o,j)=>{const D=new Date(o.time).getTime(),H=o.type?.toLowerCase()==="high";return u.jsxs("g",{children:[u.jsx("circle",{cx:Be(D),cy:pe(o.value),r:"5",fill:H?"#28a745":"#dc3545",stroke:"#fff",strokeWidth:"1.5"}),u.jsxs("text",{x:Be(D),y:pe(o.value)+(H?-10:14),textAnchor:"middle",fontSize:"9",fontWeight:"bold",fill:H?"#28a745":"#dc3545",children:[o.value.toFixed(2),"m ",ie(D)]})]},j)}),_&&u.jsxs("g",{children:[u.jsx("line",{x1:_.x,y1:He,x2:_.x,y2:Te-Le,stroke:"#f59e0b",strokeWidth:"1",strokeDasharray:"3,2"}),u.jsx("circle",{cx:_.x,cy:pe(_.height),r:"5",fill:"#f59e0b",stroke:"#fff",strokeWidth:"1.5"}),u.jsx("rect",{x:Math.min(Math.max(_.x-45,ge),fe-Ke-95),y:pe(_.height)-28,width:"95",height:"20",rx:"3",fill:"rgba(0,0,0,0.85)"}),u.jsxs("text",{x:Math.min(Math.max(_.x,ge+48),fe-Ke-48),y:pe(_.height)-13,textAnchor:"middle",fontSize:"10",fill:"#fff",fontWeight:"bold",children:[ie(_.time.getTime())," — ",_.height.toFixed(2),"m"]})]}),B&&u.jsxs("g",{children:[u.jsx("rect",{x:ge+4,y:He+4,width:"170",height:"22",rx:"4",fill:"rgba(220,53,69,0.9)"}),u.jsxs("text",{x:ge+10,y:He+19,fontSize:"10",fill:"#fff",fontWeight:"bold",children:["⚠ ",U("Riesgo varada a las","Risk at")," ",B]})]}),u.jsx("text",{x:fe/2,y:Te-3,textAnchor:"middle",fontSize:"10",fill:"#999",children:U("Hora local","Local time")}),u.jsx("text",{x:12,y:Te/2,textAnchor:"middle",fontSize:"10",fill:"#999",transform:`rotate(-90,12,${Te/2})`,children:U("Altura (m)","Height (m)")})]})]})})}const zh=({color:g,darkColor:C})=>u.jsxs("svg",{viewBox:"0 0 52 30",width:"52",height:"30",fill:"none",children:[u.jsx("path",{d:"M2,6 L12,15 L2,24",fill:g,opacity:"0.8",stroke:g,strokeWidth:"0.5",strokeLinejoin:"round"}),u.jsx("ellipse",{cx:"28",cy:"15",rx:"20",ry:"12",fill:g}),u.jsx("rect",{x:"19",y:"4",width:"3.5",height:"22",rx:"1.8",fill:"#fff",opacity:"0.85"}),u.jsx("rect",{x:"31",y:"6",width:"3.5",height:"18",rx:"1.8",fill:"#fff",opacity:"0.85"}),u.jsx("ellipse",{cx:"28",cy:"19",rx:"15",ry:"5",fill:"#fff",opacity:"0.12"}),u.jsx("path",{d:"M24 3 Q28 7 32 3",fill:C,opacity:"0.6"}),u.jsx("circle",{cx:"40",cy:"12",r:"3.2",fill:"#fff"}),u.jsx("circle",{cx:"40.7",cy:"11.5",r:"1.9",fill:"#222"}),u.jsx("circle",{cx:"41.2",cy:"10.8",r:"0.6",fill:"#fff"}),u.jsx("path",{d:"M46 15 Q48 16 46 17",stroke:"#333",strokeWidth:"0.8",fill:"none"})]}),Bo=({color:g,darkColor:C})=>u.jsxs("svg",{viewBox:"0 0 54 32",width:"54",height:"32",fill:"none",children:[u.jsx("path",{d:"M2,7 L12,16 L2,25",fill:g,opacity:"0.8",stroke:g,strokeWidth:"0.5",strokeLinejoin:"round"}),u.jsx("ellipse",{cx:"29",cy:"16",rx:"21",ry:"13",fill:g}),u.jsx("ellipse",{cx:"29",cy:"20",rx:"16",ry:"6",fill:"#fff",opacity:"0.12"}),u.jsx("path",{d:"M25 3 Q29 8 33 3",fill:C,opacity:"0.7"}),u.jsx("path",{d:"M25 29 Q29 24 33 29",fill:C,opacity:"0.7"}),u.jsx("path",{d:"M39 4 Q41 16 39 28",stroke:"#222",strokeWidth:"3.5",fill:"none",opacity:"0.55"}),u.jsx("path",{d:"M18 11 Q24 15 18 19",stroke:"#fff",strokeWidth:"0.7",fill:"none",opacity:"0.2"}),u.jsx("path",{d:"M24 9 Q30 13 24 17",stroke:"#fff",strokeWidth:"0.7",fill:"none",opacity:"0.15"}),u.jsx("circle",{cx:"40",cy:"12",r:"3.5",fill:"#fff"}),u.jsx("circle",{cx:"40.8",cy:"11.5",r:"2",fill:"#222"}),u.jsx("circle",{cx:"41.3",cy:"10.8",r:"0.7",fill:"#fff"}),u.jsx("path",{d:"M48 16 Q50 17 48 18",stroke:"#333",strokeWidth:"0.8",fill:"none"})]}),$g=[u.jsx(zh,{color:"#FF5722",darkColor:"#BF360C"},"f0"),u.jsx(zh,{color:"#FFCA28",darkColor:"#F57F17"},"f1"),u.jsx(Bo,{color:"#26C6DA",darkColor:"#00838F"},"f2"),u.jsx(Bo,{color:"#AB47BC",darkColor:"#6A1B9A"},"f3"),u.jsx(Bo,{color:"#66BB6A",darkColor:"#2E7D32"},"f4")],Ig=()=>u.jsxs("svg",{viewBox:"0 0 40 32",width:"40",height:"32",fill:"none",children:[u.jsx("ellipse",{cx:"20",cy:"18",rx:"12",ry:"9",fill:"#E53935"}),u.jsx("ellipse",{cx:"20",cy:"18",rx:"10",ry:"7",fill:"#EF5350"}),u.jsx("circle",{cx:"14",cy:"9",r:"4",fill:"#E53935"}),u.jsx("circle",{cx:"26",cy:"9",r:"4",fill:"#E53935"}),u.jsx("circle",{cx:"14",cy:"8",r:"2",fill:"#fff"}),u.jsx("circle",{cx:"14.4",cy:"7.8",r:"1",fill:"#222"}),u.jsx("circle",{cx:"26",cy:"8",r:"2",fill:"#fff"}),u.jsx("circle",{cx:"26.4",cy:"7.8",r:"1",fill:"#222"}),u.jsx("path",{d:"M5 14 Q2 10 4 7",stroke:"#E53935",strokeWidth:"2.5",strokeLinecap:"round",fill:"none"}),u.jsx("path",{d:"M35 14 Q38 10 36 7",stroke:"#E53935",strokeWidth:"2.5",strokeLinecap:"round",fill:"none"}),u.jsx("path",{d:"M8 20 Q4 22 3 25",stroke:"#E53935",strokeWidth:"2",strokeLinecap:"round",fill:"none"}),u.jsx("path",{d:"M32 20 Q36 22 37 25",stroke:"#E53935",strokeWidth:"2",strokeLinecap:"round",fill:"none"}),u.jsx("path",{d:"M11 24 Q9 27 8 30",stroke:"#E53935",strokeWidth:"2",strokeLinecap:"round",fill:"none"}),u.jsx("path",{d:"M29 24 Q31 27 32 30",stroke:"#E53935",strokeWidth:"2",strokeLinecap:"round",fill:"none"})]}),Pg=()=>u.jsxs("svg",{viewBox:"0 0 30 20",width:"30",height:"20",children:[u.jsx("rect",{width:"30",height:"5",fill:"#c60b1e"}),u.jsx("rect",{y:"5",width:"30",height:"10",fill:"#ffc400"}),u.jsx("rect",{y:"15",width:"30",height:"5",fill:"#c60b1e"})]}),ev=()=>u.jsxs("svg",{viewBox:"0 0 30 20",width:"30",height:"20",children:[u.jsx("rect",{width:"30",height:"20",fill:"#012169"}),u.jsx("path",{d:"M0 0L30 20M30 0L0 20",stroke:"#fff",strokeWidth:"3"}),u.jsx("path",{d:"M0 0L30 20M30 0L0 20",stroke:"#C8102E",strokeWidth:"1.5"}),u.jsx("path",{d:"M15 0v20M0 10h30",stroke:"#fff",strokeWidth:"5"}),u.jsx("path",{d:"M15 0v20M0 10h30",stroke:"#C8102E",strokeWidth:"3"})]}),tv=()=>u.jsxs("svg",{className:"tide-sun",viewBox:"0 0 42 42",width:"42",height:"42",style:{position:"absolute",top:4,left:12},children:[u.jsx("circle",{cx:"21",cy:"21",r:"9",fill:"#FFD700"}),[0,45,90,135,180,225,270,315].map(g=>u.jsx("line",{x1:"21",y1:"21",x2:21+17*Math.cos(g*Math.PI/180),y2:21+17*Math.sin(g*Math.PI/180),stroke:"#FFD700",strokeWidth:"2.5",strokeLinecap:"round"},g))]}),av=[{id:0,leftPct:15,topPct:22},{id:1,leftPct:50,topPct:18},{id:2,leftPct:82,topPct:35},{id:3,leftPct:35,topPct:55}];function lv(){const[g,C]=z.useState("es"),{snapshot:O,forecast:m,error:w,refetch:R}=_g(30),[Q,U]=z.useState([]),[_,N]=z.useState([]),[q,L]=z.useState(!1),[ie,re]=z.useState(""),[Oe,Se]=z.useState(""),[Pe,fe]=z.useState(""),[Te,ge]=z.useState(!1),[Ke,He]=z.useState(""),[Le,F]=z.useState(0),Ce=z.useRef(null),ke=z.useRef(null),ot=z.useRef(null),lt=z.useRef(""),[pe,Be]=z.useState(!1),[At,rt]=z.useState(null),b=z.useRef(null),[B,V]=z.useState(!1),[te,se]=z.useState(!1),[o,j]=z.useState(!1),[D,H]=z.useState(""),K=z.useRef(null),[W,P]=z.useState(0),[nt,De]=z.useState([]),[Ol,Wa]=z.useState(!1);z.useEffect(()=>{const d=K.current;if(!d){De([]),P(0);return}d.querySelectorAll("mark.search-hl").forEach(ae=>{const Re=ae.parentNode;Re&&(Re.replaceChild(document.createTextNode(ae.textContent||""),ae),Re.normalize())});const M=D.trim().toLowerCase();if(!M||M.length<2){De([]),P(0),Wa(!1);return}const Z=[],J=document.createTreeWalker(d,NodeFilter.SHOW_TEXT,null),be=[];for(;J.nextNode();)be.push(J.currentNode);for(const ae of be){const Re=ae.textContent||"",Dt=Re.toLowerCase().indexOf(M);if(Dt===-1)continue;let Vt="General",_a=ae.parentElement;for(;_a&&_a!==d;){let Gl=_a.previousElementSibling;for(;Gl;){if(Gl.tagName==="H3"){Vt=Gl.textContent?.replace(/^[^\w]*/,"")||"General";break}Gl=Gl.previousElementSibling}if(Vt!=="General")break;_a=_a.parentElement}const Rt=Math.max(0,Dt-40),ul=Math.min(Re.length,Dt+M.length+40),Ll=(Rt>0?"…":"")+Re.slice(Rt,ul).trim()+(ul<Re.length?"…":""),yu=Re.slice(0,Dt),xu=Re.slice(Dt,Dt+M.length),Su=Re.slice(Dt+M.length),yn=document.createElement("mark");yn.className="search-hl",yn.textContent=xu;const xn=document.createDocumentFragment();yu&&xn.appendChild(document.createTextNode(yu)),xn.appendChild(yn),Su&&xn.appendChild(document.createTextNode(Su)),ae.parentNode?.replaceChild(xn,ae),Z.push({section:Vt,snippet:Ll,element:yn})}const tt=new Map;Z.forEach((ae,Re)=>{tt.has(ae.section)||tt.set(ae.section,Re)}),Z.sort((ae,Re)=>(tt.get(ae.section)??99)-(tt.get(Re.section)??99)),De(Z),P(Z.length),Wa(Z.length>0),Z.length>0&&Z[0].element.scrollIntoView({behavior:"smooth",block:"center"})},[D,o]);const[Wn,Fn]=z.useState(!1),[ua,tn]=z.useState([]),[Pt,$n]=z.useState({enabled:!1,alertOnArrival:!0,alertBeforeGrounding:!0,minutesBefore:60,safetyMargin:.5,soundMuted:!1}),[it,qt]=z.useState(null),[Nt,Cl]=z.useState(null),[nu,In]=z.useState(null),[ft,Ec]=z.useState(20),[iu,Fa]=z.useState(!1),[Dl,Pn]=z.useState(null),[uu,ei]=z.useState(!1),cu=z.useRef(!1),[xa,dt]=z.useState(!1),[Ee,Qe]=z.useState({hBowMeters:0,zTxMeters:0,scopeBasic:3.5,scopeNormal:5,scopeHard:8,roundingStep:5,autoPublish:!1}),[su,ti]=z.useState(""),[an,ln]=z.useState("normal"),[Sa,nn]=z.useState(0),[Yt,un]=z.useState(12),Rl=Sa*24+Yt,[cn,ou]=z.useState(""),[de,_l]=z.useState(null),[ru,sn]=z.useState(!1),[on,ai]=z.useState(""),[ba,$a]=z.useState(null);z.useEffect(()=>{fetch("/signalk-mareas-ihm/api/anchor-watch/state").then(d=>d.ok?d.json():null).then(d=>{d?.chainDeployed!=null&&d.chainDeployed>0&&$a(d.chainDeployed)}).catch(()=>{})},[]);const li=z.useRef(null),ni=Xg(li),Qt=z.useRef(null),Xe=z.useRef(null),ut=z.useRef(null),[Ia,ii]=z.useState(90),[Mc,zc]=z.useState(90),[fu,Ul]=z.useState(90);z.useEffect(()=>{const d=()=>{const J=window.innerWidth,be=window.innerHeight,tt=Math.min(J/1e3,be/850);document.documentElement.style.setProperty("--viewport-scale",String(tt));const ae=document.querySelector(".tide-page");ae&&(ae.style.left=`${Math.max(0,(J-1e3*tt)/2)}px`,ae.style.top=`${Math.max(0,(be-850*tt)/2)}px`)};return d(),window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),z.useLayoutEffect(()=>{const d=()=>{Qt.current&&ii(Math.max(60,Qt.current.offsetHeight)),Xe.current&&zc(Math.max(60,Xe.current.offsetHeight)),ut.current&&Ul(Math.max(60,ut.current.offsetHeight))};d();const M=requestAnimationFrame(d);return()=>cancelAnimationFrame(M)},[g,ni?.height]),z.useEffect(()=>{let d=!0;return(async()=>{try{const M=await fetch(Eh,{cache:"no-store"});if(!M.ok)return;const Z=await M.json(),J=String(Z?.lang??"").toLowerCase();d&&(J==="es"||J==="en")&&C(J)}catch{}})(),()=>{d=!1}},[]),z.useEffect(()=>{if(!te)return;let d=!1;const M=new URL("/signalk-mareas-ihm/api/paths",jt);return M.searchParams.set("lang",g),fetch(M.toString(),{cache:"no-store"}).then(Z=>Z.json()).then(Z=>{if(d)return;const J=Array.isArray(Z)?Z:Z?.paths??[];Array.isArray(J)&&tn(J)}).catch(()=>{d||tn([])}),()=>{d=!0}},[te,g]),z.useEffect(()=>()=>{Ce.current&&clearInterval(Ce.current),ke.current&&clearTimeout(ke.current),ot.current&&clearTimeout(ot.current),b.current&&clearInterval(b.current)},[]);const Pa=z.useCallback(()=>{Ce.current&&(clearInterval(Ce.current),Ce.current=null),ke.current&&(clearTimeout(ke.current),ke.current=null),ot.current&&(clearTimeout(ot.current),ot.current=null),ge(!1),He(""),F(0),lt.current=""},[]),ja=z.useCallback(async d=>{C(d);try{await fetch(Eh,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({lang:d})})}catch{}},[]),f=z.useCallback((d,M)=>g==="es"?d:M,[g]);z.useEffect(()=>{const d=O?.stationName?.toUpperCase()??"";Te&&lt.current&&d.includes(lt.current)&&Pa()},[O?.stationName,Te,Pa]);const Xt=z.useCallback(async()=>{try{const[d,M,Z]=await Promise.all([fetch(Vg,{credentials:"include"}).catch(()=>null),fetch(Nh,{credentials:"include"}).catch(()=>null),fetch(Th,{credentials:"include"}).catch(()=>null)]);if(d?.ok){const J=await d.json(),be=(Array.isArray(J)?J:[]).map(ae=>({id:String(ae.id),name:String(ae.name??""),inRange:!!ae.inRange,distance:ae.distance??null,tz:ae.tz})).filter(ae=>ae.id&&ae.name);be.sort((ae,Re)=>ae.name.localeCompare(Re.name,"es")),U(be);const tt=be.filter(ae=>ae.inRange);tt.sort((ae,Re)=>(ae.distance??999999)-(Re.distance??999999)),N(tt)}if(M?.ok){const J=await M.json(),be=!!J.manualOverride,tt=String(J.activeStationId??"");L(be),fe(tt),be&&J.manualStationId?re(String(J.manualStationId)):re(tt),J.favoriteStationId&&Se(String(J.favoriteStationId))}if(Z?.ok){const J=await Z.json(),be={enabled:!!J.enabled,alertOnArrival:J.alertOnArrival!==!1,alertBeforeGrounding:J.alertBeforeGrounding!==!1,minutesBefore:J.minutesBefore??60,safetyMargin:J.safetyMargin??.5,soundMuted:!!J.soundMuted};$n(be),cu.current||(qt(be),cu.current=!0),J.groundingRisk&&Cl(J.groundingRisk),typeof J.snoozedUntil=="number"&&In(J.snoozedUntil||null),typeof J.snoozedUntil=="number"&&J.snoozedUntil&&Date.now()>J.snoozedUntil&&Fa(!1)}}catch{}},[]);z.useEffect(()=>{Xt();const d=Pt.enabled?5e3:2e4,M=setInterval(Xt,d);return()=>clearInterval(M)},[Xt,Pt.enabled]);const ea=(d,M)=>{Pa(),He(d),lt.current=M.toUpperCase(),ge(!1),F(0),ke.current=window.setTimeout(()=>{ge(!0),F(30),Ce.current=window.setInterval(()=>F(Z=>Math.max(0,Z-1)),1e3),ot.current=window.setTimeout(Pa,3e4)},400)},Me=z.useCallback(()=>{b.current&&(window.clearInterval(b.current),b.current=null),rt(null)},[]),ui=z.useCallback((d=15)=>{Me(),rt(d),b.current=window.setInterval(()=>{rt(M=>{if(M==null)return null;const Z=M-1;return Z<=0?(Be(!1),Me(),b.current&&(window.clearInterval(b.current),b.current=null),null):Z})},1e3)},[Me]),Aa=async d=>{try{const M=await fetch(Nh,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({...d,forceRefresh:!0})});if(M.ok){const Z=await M.json();fe(String(Z.activeStationId??"")),L(!!Z.manualOverride),Z.favoriteStationId&&Se(String(Z.favoriteStationId)),R&&R()}}catch{}},ca=async()=>{if(it){try{const d=await fetch(Th,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(it)});if(d.ok){const M=await d.json();$n(it),M.groundingRisk?Cl(M.groundingRisk):Cl(null),it.enabled&&Fa(!1)}}catch{}setTimeout(Xt,1500)}},el=async()=>{Fa(!0);try{await fetch(Zg,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({minutes:ft})}),In(Date.now()+ft*6e4)}catch{}setTimeout(Xt,1500)},Oc=async()=>{Fa(!0);try{await fetch(Kg,{method:"POST",credentials:"include"}),$n(d=>({...d,enabled:!1})),qt(d=>d?{...d,enabled:!1}:null),In(null),Pn(f("Alarma desactivada. No volverás a recibir avisos hasta que la rearmes.","Alarm turned off. You will not receive alerts again until you re-arm it."))}catch{}setTimeout(Xt,1500)},[sa,ci]=z.useState(()=>new Date);z.useEffect(()=>{let d=null;const M=()=>{d||(d=window.setInterval(()=>ci(new Date),15e3))},Z=()=>{d&&(window.clearInterval(d),d=null)},J=()=>{const be=document.querySelector(".tide-page");document.hidden?(Z(),be&&be.classList.add("animations-paused")):(be&&be.classList.remove("animations-paused"),ci(new Date),M())};return document.addEventListener("visibilitychange",J),M(),()=>{Z(),document.removeEventListener("visibilitychange",J)}},[]);const du=m?.extremes??[],{prev:oa,sorted:ra}=Wg(du,sa),Je=oa?oa.type?.toLowerCase()==="low"?"rising":"falling":void 0,ct=O?.stationName??m?.station?.name??f("Sin datos","No data"),hu=Te?Ke==="AUTO"?`${ct.toUpperCase()}`:`${f("Refrescando","Refreshing")} ${Ke}... ${Le}`:ct.toUpperCase(),Cc=oa?.value??0,si=Nc(typeof oa?.time=="string"?oa.time:void 0),xt=ra.find(d=>(d.type??"").toLowerCase()==="high"&&new Date(d.time)>sa),ht=ra.find(d=>(d.type??"").toLowerCase()==="low"&&new Date(d.time)>sa),tl=typeof O?.heightNow=="number"?O.heightNow:Tc(ra,sa)??0,Na=wg(q?ie:Pe);let rn,al;if(Na.status==="ok"&&Na.ref.hat>Na.ref.lat)rn=Na.ref.hat,al=Na.ref.lat;else{const d=ra.map(M=>M.value).concat([tl]);rn=Math.max(...d)+.3,al=Math.max(0,Math.min(...d)-.2)}const ll=Math.max(.1,rn-al),fn=d=>Math.max(0,Math.min(1,(d-al)/ll)),oi=fn(tl),Ta=xt?.value!=null?fn(xt.value):null,mu=ht?.value!=null?fn(ht.value):null,ri=Tc(ra,new Date(sa.getTime()+6e5)),Hl=ri!=null?ri-tl:null,wl=Te||Hl==null||Je==="rising"&&Hl<-.001||Je==="falling"&&Hl>.001?null:Hl,Dc=wl!=null?`${wl>=0?"+":""}${Math.round(wl*100)} cm`:"–",Rc=Je?`${Je==="rising"?f("SUBIENDO","RISING"):f("BAJANDO","FALLING")} ${f("DESDE","SINCE")} ${lu(Cc)} m ${f("A LAS","AT")} ${si}`:f("SIN DATOS","NO DATA"),dn=Je==="rising"?"tide-status up":Je==="falling"?"tide-status down":"tide-status neutral",ta=22,fa=ni?.height??0,Ea=fa*(ta/100),Ma=fa-Ea,nl=fa>0?(Ea+Ma*(1-oi))/fa*100:50,fi=45,hn=Ea+6,gu=d=>Ea+Ma*(1-d),za=(d,M,Z,J)=>{const be=gu(d),tt=be-(Z+M/2),ae=Math.max(hn,fa-(Z+M+J)-6),Re=Math.max(hn,Math.min(ae,tt)),Dt=Math.abs(Re-tt)>2,Vt=Re+Z+M/2,_a=Math.max(Ea+2,Math.min(fa-2,be)),Rt=Dt?_a:Vt;let ul=0,Ll=0;return Dt&&(Rt>Vt?(ul=Vt,Ll=Rt-Vt):Rt<Vt&&(ul=Rt,Ll=Vt-Rt)),{y:be,top:Re,clamped:Dt,arrowY:Rt,lineTop:ul,lineHeight:Ll}},aa=za(oi,Ia,Je==="rising"?fi:0,Je==="falling"?fi:0),St=Ta!==null?za(Ta,Mc,0,0):null,ha=mu!==null?za(mu,fu,0,0):null,Bl=_.length>0,pu=q?Q:_,Oa=!q&&!Bl,Ca=q?ie:Pe,mn=q?f("Elige estación","Select station"):Bl?f("Elige preferida","Choose preferred"):ct.toUpperCase(),et=_.length>0?_[0].id:"",Da=et?Q.find(d=>d.id===et)?.name??ct:ct,gn=!q&&pe&&At!=null?`${Da.toUpperCase()}: ${f("Elige preferida","Choose preferred")} (${At})`:null,ma=Nt?.risk&&Pt.enabled&&!iu&&(!nu||Date.now()>nu);Nt?.physicalRisk,Pt.enabled;const[_c,vn]=z.useState(!1);z.useEffect(()=>{if(!ma){document.title="Mareas IHM";const Z=document.querySelector("link[rel~='icon']");Z&&(Z.href="/signalk-mareas-ihm/favicon.ico");return}let d=!0;const M=setInterval(()=>{d=!d,document.title=d?"⚠ RIESGO DE VARADA ⚠":"Mareas IHM"},1e3);return()=>{clearInterval(M),document.title="Mareas IHM"}},[ma]);const pn=z.useMemo(()=>{const d=Nt?.timeUntil;if(typeof d!="number"||d<=0)return null;const M=new Date(Date.now()+d*6e4),Z=Go(xt?.time??ht?.time),J=new Date(M.getTime()+(Z??0)*6e4);return`${String(J.getUTCHours()).padStart(2,"0")}:${String(J.getUTCMinutes()).padStart(2,"0")}`},[Nt,xt,ht]);z.useEffect(()=>{Pt.enabled&&Pn(null),Pt.enabled&&Nt?.risk&&Fa(!1)},[Pt.enabled,Nt?.risk]),z.useCallback(async()=>{dt(!0);try{const d=await fetch(Mh,{credentials:"include"});if(d.ok){const M=await d.json();Qe(M),ti(M.hBowMeters>0?String(M.hBowMeters):""),M.visorChainDeployed&&M.visorChainDeployed>0&&$a(M.visorChainDeployed)}}catch{}},[]);const Ra=z.useCallback(async()=>{try{await fetch(Mh,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({...Ee})});const d=parseFloat(cn),M=await fetch(kg,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:an,durationHours:Rl,depthManual:Number.isFinite(d)&&d>0?d:null,autoPublish:Ee.autoPublish})});if(M.ok){const Z=await M.json();_l(Z)}}catch{}},[Ee,an,Sa,Yt,cn]),il=z.useRef(!1);z.useEffect(()=>{if(!xa){il.current=!1;return}if(!il.current){il.current=!0,Ra();return}const d=setTimeout(Ra,400);return()=>clearTimeout(d)},[xa,Ee,an,Sa,Yt,cn,Ra]);const[di,hi]=z.useState(!1),[mi,gi]=z.useState(!1);return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"tide-page",children:[ma&&u.jsxs("div",{className:"grounding-alert",children:[u.jsxs("div",{className:"alert-content",children:[u.jsx("span",{className:"alert-icon",children:u.jsxs("svg",{viewBox:"0 0 28 28",width:"28",height:"28",children:[u.jsx("path",{d:"M14 2L1 26h26L14 2z",fill:"#FFD600",stroke:"#222",strokeWidth:"1.5"}),u.jsx("text",{x:"14",y:"22",textAnchor:"middle",fontSize:"16",fontWeight:"bold",fill:"#222",children:"!"})]})}),u.jsx("span",{className:"alert-text",children:Nt?.message??f("RIESGO DE VARADA","GROUNDING RISK")})]}),u.jsxs("div",{className:"alert-actions",children:[u.jsxs("div",{className:"alert-actions-left",children:[u.jsx("button",{className:"alert-snooze",onClick:el,children:f("SNOOZE","SNOOZE")}),u.jsx("select",{className:"snooze-select",value:ft,onChange:d=>Ec(parseInt(d.target.value)||20),children:[10,20,30,45,60].map(d=>u.jsxs("option",{value:d,children:[d," ",f("min","min")]},d))})]}),u.jsx("button",{className:"alert-off",onClick:Oc,children:f("APAGAR","TURN OFF")})]})]}),Dl&&!ma&&u.jsxs("div",{className:"grounding-alert grounding-alert-off",children:[u.jsxs("div",{className:"alert-content",children:[u.jsx("span",{className:"alert-icon",children:u.jsxs("svg",{viewBox:"0 0 28 28",width:"28",height:"28",children:[u.jsx("path",{d:"M14 2L1 26h26L14 2z",fill:"#FFD600",stroke:"#222",strokeWidth:"1.5"}),u.jsx("text",{x:"14",y:"22",textAnchor:"middle",fontSize:"16",fontWeight:"bold",fill:"#222",children:"!"})]})}),u.jsx("span",{className:"alert-text",children:Dl})]}),u.jsx("div",{className:"alert-actions",children:u.jsx("button",{className:"alert-off",onClick:()=>Pn(null),children:f("CERRAR","CLOSE")})})]}),u.jsx("header",{className:"tide-header",children:u.jsx("div",{className:"header-lines",children:u.jsx("div",{className:"header-title",children:"MAREAS (IHM)"})})}),u.jsx("div",{className:`tide-station ${Te?"refreshing":""}`,children:hu}),u.jsxs("main",{className:"tide-main",children:[w&&u.jsx("div",{className:"tide-error",children:w}),u.jsx("div",{className:dn,children:Rc}),u.jsxs("div",{className:"tide-hero",ref:li,children:[u.jsxs("div",{className:"tide-col-left",children:[u.jsxs("div",{className:"tide-box-wrapper now-wrapper",style:{top:`${aa.top}px`},children:[Je==="rising"&&u.jsx("div",{className:"trend-arrow up"}),u.jsxs("div",{className:"tide-box now-box",ref:Qt,children:[u.jsxs("div",{className:"box-title now",children:[f("AHORA","NOW")," (",Dh(sa,xt?.time??ht?.time)??wo(O?.navDatetime,xt?.time??ht?.time),")"]}),u.jsx("div",{className:"box-value now",children:Number.isFinite(tl)?`${lu(tl)} m`:"– m"}),u.jsxs("div",{className:"box-delta",children:[f("EN 10 MIN","IN 10 MIN"),": ",Dc]})]}),Je==="falling"&&u.jsx("div",{className:"trend-arrow down"})]}),u.jsx("div",{className:"tide-line now-line",style:{top:`${aa.arrowY}px`},children:u.jsx("span",{className:"line-arrow",children:"▶"})}),aa.lineHeight>2&&u.jsx("div",{className:"tide-line-vert now",style:{top:`${aa.lineTop}px`,height:`${aa.lineHeight}px`}})]}),u.jsx("div",{className:"tide-barWrap",children:u.jsx("div",{className:"tide-bar",style:{"--waterTopPct":`${nl}%`},onClick:()=>ei(!0),title:f("Haz click para ver las curvas","Click to see tide curves"),children:u.jsxs("div",{className:"tide-barInner",children:[u.jsx("div",{className:"tide-sand",children:av.map(d=>u.jsx("span",{className:`sand-crab crab-${d.id}`,style:{left:`${d.leftPct}%`,top:`${d.topPct}%`},children:u.jsx(Ig,{})},d.id))}),u.jsxs("div",{className:"tide-water",children:[u.jsx("div",{className:"tide-waterSurface"}),$g.map((d,M)=>u.jsx("span",{className:`fish fish-${M}`,children:d},M))]}),u.jsxs("div",{className:"tide-scene",children:[u.jsx("div",{className:"tide-sky"}),u.jsx(tv,{}),u.jsxs("svg",{className:"tide-island",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[u.jsx("path",{d:"M0 92 Q10 75 25 78 Q45 82 60 70 Q80 60 100 72 L100 100 L0 100 Z",fill:"#2ecc71"}),u.jsx("path",{d:"M0 92 Q10 75 25 78 Q45 82 60 70 Q80 60 100 72",stroke:"#1a7f3d",strokeWidth:"2.5",fill:"none"}),u.jsx("polygon",{points:"66,35 74,35 73,70 67,70",fill:"white"}),u.jsx("rect",{x:"67",y:"35",width:"6",height:"7",fill:"#dc3545"}),u.jsx("rect",{x:"67",y:"49",width:"6",height:"7",fill:"#dc3545"}),u.jsx("rect",{x:"67",y:"63",width:"6",height:"7",fill:"#dc3545"}),u.jsx("rect",{x:"63",y:"30",width:"14",height:"5",fill:"#555"}),u.jsx("rect",{x:"66",y:"20",width:"8",height:"10",fill:"#b8e4f5",stroke:"#666",strokeWidth:"0.5"}),u.jsx("polygon",{points:"65,20 75,20 70,12",fill:"#dc3545"})]})]}),u.jsx("svg",{className:"tide-coastline",viewBox:"0 0 100 20",preserveAspectRatio:"none",children:u.jsx("path",{d:"M0 0 L0 8 Q6 12 12 9 Q18 6 24 10 Q30 14 36 11 Q42 7 48 10 Q54 14 60 11 Q66 8 72 12 Q78 15 84 11 Q90 8 96 12 L100 10 L100 0 Z",fill:"#2ecc71"})})]})})}),u.jsxs("div",{className:"tide-col-right",children:[St!==null&&xt&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"tide-line high-line",style:{top:`${St.arrowY}px`},children:u.jsx("span",{className:"line-arrow",children:"◀"})}),St.lineHeight>2&&u.jsx("div",{className:"tide-line-vert high",style:{top:`${St.lineTop}px`,height:`${St.lineHeight}px`}}),u.jsx("div",{className:"tide-box-wrapper high-wrapper",style:{top:`${St.top}px`},children:u.jsxs("div",{className:"tide-box high-box",ref:Xe,children:[u.jsx("div",{className:"box-title high",children:f("PRÓX. PLEAMAR","NEXT HIGH")}),u.jsxs("div",{className:"box-value high",children:[lu(xt.value)," m"]}),u.jsxs("div",{className:"box-when",children:[f("A las","At")," ",Nc(xt.time)]})]})})]}),ha!==null&&ht&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"tide-line low-line",style:{top:`${ha.arrowY}px`},children:u.jsx("span",{className:"line-arrow",children:"◀"})}),ha.lineHeight>2&&u.jsx("div",{className:"tide-line-vert low",style:{top:`${ha.lineTop}px`,height:`${ha.lineHeight}px`}}),u.jsx("div",{className:"tide-box-wrapper low-wrapper",style:{top:`${ha.top}px`},children:u.jsxs("div",{className:"tide-box low-box",ref:ut,children:[u.jsx("div",{className:"box-title low",children:f("PRÓX. BAJAMAR","NEXT LOW")}),u.jsxs("div",{className:"box-value low",children:[lu(ht.value)," m"]}),u.jsxs("div",{className:"box-when",children:[f("A las","At")," ",Nc(ht.time)]})]})})]})]})]}),u.jsxs("div",{className:"tide-controls",children:[u.jsxs("label",{className:`mode-btn ${q?"":"selected"}`,children:[u.jsx("input",{type:"radio",name:"mode",checked:!q,onChange:()=>{q&&(L(!1),re(""),Se(""),ea("AUTO",""),Aa({manualOverride:!1,manualStationId:"",favoriteStationId:""}),Be(!0),ui(15))}}),u.jsx("span",{className:"radio-circle"}),f("Automático","Automatic")]}),u.jsxs("div",{className:"station-dropdown-container",children:[u.jsxs("button",{className:`station-dropdown-btn ${Oa?"disabled":""}`,onClick:()=>{Oa||Be(d=>{const M=!d;return M&&!q&&ui(15),M||Me(),M})},disabled:Oa,children:[u.jsx("span",{className:"station-dropdown-text",children:gn??(Ca?Q.find(d=>d.id===Ca)?.name??mn:mn)}),u.jsx("span",{className:"station-dropdown-chev",children:pe?"▲":"▼"})]}),pe&&!Oa&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"station-dropdown-backdrop",onClick:()=>{Be(!1),Me()}}),u.jsxs("div",{className:"station-dropdown-menu",onMouseLeave:()=>{Be(!1),Me()},children:[u.jsx("div",{className:"station-option"+(Ca===""?" selected":""),onClick:()=>{Be(!1),Me(),q?re(""):(Se(""),Aa({manualOverride:!1,manualStationId:"",favoriteStationId:""}))},children:mn}),pu.map(d=>u.jsxs("div",{className:"station-option"+(String(d.id)===String(Ca)?" selected":"")+(!q&&String(d.id)===et?" nearest":""),onClick:()=>{Be(!1),Me(),q?(re(d.id),ea(d.name.toUpperCase(),d.name),Aa({manualOverride:!0,manualStationId:d.id})):(Se(d.id),ea(d.name.toUpperCase(),d.name),Aa({manualOverride:!1,manualStationId:"",favoriteStationId:d.id}))},children:[u.jsx("span",{className:"station-name",children:d.name}),!q&&String(d.id)===et&&u.jsx("span",{className:"nearest-badge",children:f("Más cercana","NEAREST")})]},d.id))]})]})]}),u.jsxs("label",{className:`mode-btn ${q?"selected":""}`,children:[u.jsx("input",{type:"radio",name:"mode",checked:q,onChange:()=>{if(!q){L(!0);const d=Oe||Pe;re(d);const M=Q.find(Z=>Z.id===d);d&&M?(ea(M.name.toUpperCase(),M.name),Aa({manualOverride:!0,manualStationId:d})):Aa({manualOverride:!0,manualStationId:d})}}}),u.jsx("span",{className:"radio-circle"}),f("Manual","Manual")]})]}),u.jsx("div",{className:"tide-subinfo tide-subinfo-footer",children:u.jsxs("span",{children:[u.jsx("span",{className:"emph",children:f("Coef. marea: ","Tide coef: ")}),Number.isFinite(O?.coef)?lu(Number(O?.coef),2):"–"," · ",u.jsx("span",{className:"emph",title:f("Requiere plugin Derived Data + señal GPS","Requires Derived Data plugin + GPS signal"),children:f("Salida","Sunrise")}),": ",(()=>{const d=wo(O?.sunrise,xt?.time??ht?.time??O?.timeNextHigh??O?.timeNextLow??O?.timeLastHigh??O?.timeLastLow);return d==="–"?f("(Derived Data + GPS)","(Derived Data + GPS)"):d})()," · ",u.jsx("span",{className:"emph",title:f("Requiere plugin Derived Data + señal GPS","Requires Derived Data plugin + GPS signal"),children:f("Puesta","Sunset")}),": ",(()=>{const d=wo(O?.sunset,xt?.time??ht?.time??O?.timeNextHigh??O?.timeNextLow??O?.timeLastHigh??O?.timeLastLow);return d==="–"?f("(Derived Data + GPS)","(Derived Data + GPS)"):d})()]})}),u.jsxs("div",{className:"tide-controls-row2",children:[u.jsx("button",{className:`lang-flag ${g==="es"?"active":""}`,onClick:()=>ja("es"),"aria-label":"Español",title:"Español",children:u.jsx(Pg,{})}),u.jsx("button",{className:"ctrl-btn",onClick:()=>ei(!0),children:f("CURVAS","CURVES")}),u.jsx("button",{className:"ctrl-btn",style:{background:"#ff9800",color:"#fff",fontWeight:800,border:"none"},onClick:()=>window.location.href="/signalk-mareas-ihm/visorfondeo",children:f("VISOR DE FONDEO","ANCHOR VIEWER")}),u.jsx("button",{className:"ctrl-btn",onClick:()=>se(!0),children:f("INSTRUCCIONES","INSTRUCTIONS")}),u.jsx("button",{className:`lang-flag ${g==="en"?"active":""}`,onClick:()=>ja("en"),"aria-label":"English",title:"English",children:u.jsx(ev,{})})]})]})]}),jh.createPortal(u.jsxs(u.Fragment,{children:[B&&u.jsx("div",{className:"modal-overlay",onClick:()=>V(!1),children:u.jsxs("div",{className:"modal-content modal-fullscreen disclaimer-modal",onClick:d=>d.stopPropagation(),children:[u.jsxs("h2",{children:["⚓ ",f("AVISO LEGAL","LEGAL NOTICE")]}),u.jsx("div",{className:"disclaimer-body disclaimer-scroll",children:g==="es"?u.jsxs(u.Fragment,{children:[u.jsxs("p",{className:"disclaimer-hero",children:["🚢 Hecho con mucho esfuerzo con IA (ChatGPT/Claude) por un ",u.jsx("a",{href:"https://github.com/aitonos",target:"_blank",rel:"noopener noreferrer",children:"navegante"})," para navegantes"]}),u.jsx("p",{children:"Objetivo: simplificar la vida a bordo"}),u.jsxs("p",{children:["📜 ",u.jsx("a",{href:"https://www.apache.org/licenses/LICENSE-2.0.txt",target:"_blank",rel:"noopener noreferrer",children:"Licencia Apache 2.0"})]}),u.jsx("p",{children:u.jsx("strong",{children:"🙏 Créditos y agradecimientos:"})}),u.jsxs("ul",{children:[u.jsxs("li",{children:["Basado en ",u.jsx("a",{href:"https://github.com/openwatersio/signalk-tides",target:"_blank",rel:"noopener noreferrer",children:"SignalK-Tides"}),". ¡Gracias, ",u.jsx("a",{href:"https://github.com/bkeepers",target:"_blank",rel:"noopener noreferrer",children:"Bkeepers"}),"!"]}),u.jsxs("li",{children:["A los creadores de ",u.jsx("a",{href:"https://signalk.org/",target:"_blank",rel:"noopener noreferrer",children:u.jsx("strong",{children:"SignalK"})})," y ",u.jsx("a",{href:"https://openmarine.net/",target:"_blank",rel:"noopener noreferrer",children:u.jsx("strong",{children:"OpenPlotter"})})," por el brillante trabajo que están haciendo"]}),u.jsxs("li",{children:["A toda la comunidad de ",u.jsx("strong",{children:"código abierto"})," náutico"]}),u.jsx("li",{children:'Grupo de WhatsApp "Náutica Friki"'}),u.jsxs("li",{children:["En memoria de ",u.jsx("a",{href:"https://github.com/penkamaster",target:"_blank",rel:"noopener noreferrer",children:"Rafica"}),", compañero de aventuras informáticas y no tan informáticas. ¡En tu honor!"]})]}),u.jsxs("div",{className:"disclaimer-warning",children:[u.jsx("p",{children:u.jsx("strong",{children:"⚠️ ADVERTENCIA IMPORTANTE"})}),u.jsx("p",{children:'Este software se proporciona "tal cual", sin garantías. El uso es bajo la exclusiva responsabilidad del usuario.'}),u.jsx("p",{children:u.jsx("strong",{children:"En ningún caso sustituye al uso de las tablas de mareas oficiales publicadas por el Instituto Hidrográfico de la Marina."})}),u.jsx("p",{children:"NO sustituye: la vigilancia del patrón, las cartas náuticas oficiales, el buen juicio marinero, la responsabilidad del mando a bordo."}),u.jsx("p",{children:u.jsx("strong",{children:"Navega siempre con prudencia. 🌊"})})]})]}):u.jsxs(u.Fragment,{children:[u.jsxs("p",{className:"disclaimer-hero",children:["🚢 Built with a lot of effort using AI (ChatGPT/Claude) by a ",u.jsx("a",{href:"https://github.com/aitonos",target:"_blank",rel:"noopener noreferrer",children:"sailor"})," for sailors"]}),u.jsx("p",{children:"Goal: make life aboard simpler"}),u.jsxs("p",{children:["📜 ",u.jsx("a",{href:"https://www.apache.org/licenses/LICENSE-2.0.txt",target:"_blank",rel:"noopener noreferrer",children:"Apache 2.0 License"})]}),u.jsx("p",{children:u.jsx("strong",{children:"🙏 Credits & acknowledgements:"})}),u.jsxs("ul",{children:[u.jsxs("li",{children:["Based on ",u.jsx("a",{href:"https://github.com/openwatersio/signalk-tides",target:"_blank",rel:"noopener noreferrer",children:"SignalK-Tides"}),". Thanks, ",u.jsx("a",{href:"https://github.com/bkeepers",target:"_blank",rel:"noopener noreferrer",children:"Bkeepers"}),"!"]}),u.jsxs("li",{children:["To the creators of ",u.jsx("a",{href:"https://signalk.org/",target:"_blank",rel:"noopener noreferrer",children:u.jsx("strong",{children:"SignalK"})})," and ",u.jsx("a",{href:"https://openmarine.net/",target:"_blank",rel:"noopener noreferrer",children:u.jsx("strong",{children:"OpenPlotter"})})," for the outstanding work"]}),u.jsxs("li",{children:["To the entire nautical ",u.jsx("strong",{children:"open-source"})," community"]}),u.jsx("li",{children:'WhatsApp group "Náutica Friki"'}),u.jsxs("li",{children:["In memory of ",u.jsx("a",{href:"https://github.com/penkamaster",target:"_blank",rel:"noopener noreferrer",children:"Rafica"}),", companion in IT (and non‑IT) adventures. In your honor!"]})]}),u.jsxs("div",{className:"disclaimer-warning",children:[u.jsx("p",{children:u.jsx("strong",{children:"⚠️ IMPORTANT WARNING"})}),u.jsx("p",{children:`This software is provided "as is", without warranties. Use is entirely at the user's own risk.`}),u.jsx("p",{children:u.jsx("strong",{children:"It does not replace the official tide tables published by the Spanish Hydrographic Institute (IHM)."})}),u.jsx("p",{children:"It does NOT replace: the skipper's watch, official charts, good seamanship, or command responsibility on board."}),u.jsx("p",{children:u.jsx("strong",{children:"Always navigate prudently. 🌊"})})]})]})}),u.jsx("div",{className:"modal-buttons-fixed",children:u.jsx("button",{className:"modal-close",onClick:()=>V(!1),children:f("CERRAR","CLOSE")})})]})}),te&&u.jsx("div",{className:"modal-overlay",onClick:()=>{se(!1),j(!1)},children:u.jsxs("div",{className:"modal-content modal-fullscreen instrucciones-modal",onClick:d=>d.stopPropagation(),children:[u.jsxs("h2",{children:[o?f("Registro de cambios – Versiones","Changelog – Versions"):f("📖 INSTRUCCIONES","📖 INSTRUCTIONS")," – v",O?.pluginVersion??"—"]}),u.jsxs("div",{className:"instrucciones-body instrucciones-scroll",ref:K,children:[o?u.jsxs(u.Fragment,{children:[u.jsx("h4",{children:"v2.0.0"}),u.jsxs("ul",{children:[u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Previsión de Abrigo","Shelter forecast"),":"]})," ",f("rosa de 16 sectores con detección automática del abrigo según la costa (OpenStreetMap), grado A-F con porcentaje de protección, strip de 12 h con previsión hora a hora, resumen AHORA/PREDICCIÓN con datos en tiempo real.","16-sector rose with automatic shelter detection from coastline (OpenStreetMap), grade A-F with protection percentage, 12 h strip with hourly forecast, NOW/FORECAST summary with real-time data.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Medición de olas en fondeo","On-board wave measurement"),":"]})," ",f("dirección, período y altura de ola calculados a bordo desde sensores de actitud y aceleración (pypilot IMU), historial 24 h en barras de 15 min, el grado de abrigo se ajusta cuando la ola medida supera la prevista.","wave direction, period and height computed on board from attitude/acceleration sensors (pypilot IMU), 24 h history in 15-min bars, shelter grade auto-adjusts when measured wave exceeds forecast.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Sensores en tiempo real","Real-time sensors"),":"]})," ",f('lectura directa de viento (veleta), temperatura aire/agua y presión atmosférica desde Signal K. Etiquetas "Veleta" y "Sensor" distinguen datos reales de previsión. Fallback automático a Open-Meteo si un sensor falla.','direct reading of wind (anemometer), air/water temperature and atmospheric pressure from Signal K. "Veleta" and "Sensor" badges distinguish real data from forecast. Automatic Open-Meteo fallback if a sensor fails.')]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Audio mejorado","Enhanced audio"),":"]})," ",f("voces pregrabadas (OGG) por idioma, detección automática de salida del Raspberry Pi (USB → analog → HDMI), patrones distintos por evento, soporte móvil fiable (audio en segundo plano).","pre-recorded voices (OGG) per language, automatic Raspberry Pi audio output detection (USB → analog → HDMI), distinct patterns per event, reliable mobile support (background audio).")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Sonda inteligente","Smart sounder"),":"]})," ",f('detecta congelación, spikes y valores absurdos. Cuando la sonda no es fiable deja de mostrar lecturas inventadas y avisa con "SONDA CONGELADA / SIN SONDA".','detects freeze, spikes and absurd values. When the sounder is unreliable it stops showing made-up readings and signals "FROZEN / NO SOUNDER".')]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Compass español NSEO","Spanish compass NSEO"),":"]})," ",f('toda la rosa y referencias cardinales con "O" (no "W") en español: N/NE/E/SE/S/SO/O/NO.','full rose and cardinal references with "O" (not "W") in Spanish: N/NE/E/SE/S/SO/O/NO.')]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Estaciones IHM corregidas","IHM stations fixed"),":"]})," ",f("70 estaciones reales del IHM con IDs verificados (antes la lista offline llevaba IDs inventados que rompían la API). Lisboa, Sevilla, A Guarda, Bermeo y Tánger añadidas; Mediterráneo/Baleares/Melilla eliminadas porque IHM no las cubre.","70 real IHM stations with verified IDs (previously the offline list had invented IDs that broke the API). Lisbon, Seville, A Guarda, Bermeo and Tangier added; Mediterranean/Balearic/Melilla removed because IHM doesn't cover them.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Robustez en errores de API","API error resilience"),":"]})," ",f("ya no se cuelga con respuestas inesperadas de la API IHM. Estabilidad mejorada en conexiones débiles (4G/Tailscale).","no longer hangs on unexpected IHM API responses. Improved stability on weak connections (4G/Tailscale).")]})]}),u.jsx("h4",{children:"v1.3.1"}),u.jsxs("ul",{children:[u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Visor de Fondeo mejorado","Enhanced Anchor Watch"),":"]})," ",f("sincronización en tiempo real entre dispositivos (SSE), cadena largada con slider bidireccional, cálculo automático de cadena recomendada al fondear.","real-time multi-device sync (SSE), bidirectional chain deployed slider, automatic recommended chain calculation on anchoring.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Sistema AIS completo","Complete AIS System"),":"]})," ",f("alarma por target individual con ACK, detección de garreo de barcos cercanos, estimación de ancla y radio de borneo de otros barcos mediante análisis de track, anillos de colisión persistentes en la carta.","per-target alarm with ACK, nearby boat dragging detection, anchor position and swing radius estimation from track analysis, persistent collision rings on chart.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Alarmas inteligentes","Smart Alarms"),":"]})," ",f("alarma de varada solo cuando el barco está parado (SOG), detección de sonda congelada/inestable, alarmas de garreo y AIS independientes con control individual.","grounding alarm only when boat is stopped (SOG), frozen/unstable sounder detection, independent drag and AIS alarms with individual control.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Domótica y KIP","Home Automation & KIP"),":"]})," ",f("botones de fondear/levar en KIP (PUT handlers), endpoints REST para Alexa/Google/MQTT, endpoint toggle para mandos a distancia.","drop/lift buttons in KIP (PUT handlers), REST endpoints for Alexa/Google/MQTT, toggle endpoint for remote controls.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Bilingüe ES/EN completo","Full ES/EN Bilingual"),":"]})," ",f("todo el visor de fondeo, popups de cálculo, previsión meteo, curvas de marea, panel de alarmas y landing bilingües. Banderas de idioma en visor, landing y mareas. Idioma sincronizado entre todas las vistas.","full anchor watch viewer, calculation popups, weather forecast, tide curves, alarm panel and landing bilingual. Language flags in viewer, landing and tides. Language synced across all views.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Curvas de Marea mejoradas","Enhanced Tide Curves"),":"]})," ",f("líneas HAT/LAT (pleamar/bajamar máxima anual), etiquetas de pleamar/bajamar en cada extremo, cursor interactivo, fondo blanco con textos legibles.","HAT/LAT lines (annual max high/low tide), high/low tide labels on each extreme, interactive cursor, white background with readable text.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Navegación unificada","Unified Navigation"),":"]})," ",f("URLs dedicadas /mareas y /visorfondeo, navegación en la misma ventana entre todas las vistas, landing con selector y versión en vivo.","dedicated URLs /mareas and /visorfondeo, same-window navigation between all views, landing with selector and live version.")]})]}),u.jsx("h4",{children:"v1.3.0"}),u.jsxs("ul",{children:[u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Visor de Fondeo","Anchor Viewer"),":"]})," ",f("página /visorfondeo con mapa Leaflet, icono de barco estilo SignalK, alarma de garreo visual y sonora, radio de borneo y alarma con etiquetas de metros, marcador de ancla arrastrable. Se abre desde el botón VISOR DE FONDEO.","page /visorfondeo with Leaflet map, SignalK-style boat icon, visual+sound anchor drag alarm, swing and alarm radius with meter labels, draggable anchor marker. Opens from ANCHOR VIEWER button.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Alarma de Garreo","Anchor Drag Alarm"),":"]})," ",f("evaluación cada 5s. Radio alarma = swingRadiusMax + margen (ajustable con slider dinámico de 1 a 50m). Notificación Signal K (visual + sonido + push). Panel muestra estado marea y profundidad del plugin principal.","5-second evaluation. Alarm radius = swingRadiusMax + margin (adjustable with dynamic slider 1-50m). Signal K notification (visual + sound + push). Panel shows tide state and depth from main plugin.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Cartas MBTiles","MBTiles Charts"),":"]})," ",f("servidor de tiles integrado (better-sqlite3). Selector de carpeta (por defecto /home/pi/charts), checkboxes para cambiar entre cartas sin recargar, detección automática TMS/XYZ.","integrated tile server (better-sqlite3). Folder selector (default /home/pi/charts), checkboxes to switch charts without reloading, automatic TMS/XYZ detection.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Capas","Layers"),":"]})," ",f("OpenSeaMap overlay, track GPS con historial de posición, OpenStreetMap dark fallback.","OpenSeaMap overlay, GPS track with position history, OpenStreetMap dark fallback.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Paths Signal K","Signal K Paths"),":"]})," ",f("nuevos: anchorLat, anchorLon, distanceToAnchor, alarmRadius, dragging, watchEnabled.","new: anchorLat, anchorLon, distanceToAnchor, alarmRadius, dragging, watchEnabled.")]})]}),u.jsx("h4",{children:"v1.2.1"}),u.jsxs("ul",{children:[u.jsxs("li",{children:[u.jsxs("strong",{children:[f("UI Fondeo renovada","Anchor UI revamped"),":"]})," ",f("cajas resultado con títulos uniformes 14px, Cadena y Profundidad ahora en naranja, Estado Marea muestra resumen completo, nuevo Status Profundidad con estado de varada, Publicar SK en barra inferior verde.","result boxes with uniform 14px labels, Chain and Depth now in orange, Tide State shows full resume, new Depth Status with grounding state, Publish SK in green bottom bar.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Config overlay","Config overlay"),":"]})," ",f("el panel de configuración avanzada ahora se superpone sin scroll, con botón Calcular naranja. El popup de ayuda ya no desplaza las cajas.","advanced config panel now overlays without scroll, with orange Calculate button. Help popup no longer pushes boxes down.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Botones 170px","Buttons 170px"),":"]})," ",f("todos los botones de la barra principal ampliados a 170px mínimo para que INSTRUCCIONES quepa correctamente.","all toolbar buttons enlarged to 170px minimum so INSTRUCCIONES fits correctly.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Fix alarma notificaciones","Fix alarm notifications"),":"]})," ",f("corregida la limpieza de notificaciones en OpenPlotter: ahora envía state=normal en vez de null, eliminando notificaciones zombie.","fixed notification clearing in OpenPlotter: now sends state=normal instead of null, eliminating zombie notifications.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Fix hBow persistente","Fix hBow persistent"),":"]})," ",f("solucionado el borrado del dato de altura de roldana al editar.","fixed bow roller height being erased when editing.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Fix Publicar en Signal K","Fix Publish to Signal K"),":"]})," ",f("el estado de publicación ahora se persiste entre reinicios del plugin.","publish state now persists across plugin restarts.")]})]}),u.jsx("h4",{children:"v1.2.0"}),u.jsxs("ul",{children:[u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Calculadora de fondeo","Anchoring calculator"),":"]})," ",f("nueva pestaña FONDEO con modelo de scope náutico. Cadena recomendada, radio de borneo, publicación opcional en Signal K.","new ANCHOR tab with nautical scope model. Recommended chain, swing radius, optional Signal K publication.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Fix notificaciones","Notification fix"),":"]})," ",f("la alarma suena UNA sola vez (antes se repetía cada 60s).","alarm sounds ONCE (previously repeated every 60s).")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Arranque sin GPS/Internet","Startup without GPS/Internet"),":"]})," ",f("lista hardcoded de todas las estaciones IHM españolas. Siempre hay estaciones para elegir.","hardcoded list of all Spanish IHM stations. Stations always available to select.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Nuevos paths FONDEO","New ANCHOR paths"),":"]})," ",f("nuevos paths publicados en Signal K relacionados con la función FONDEO.","new Signal K paths published for the ANCHOR function.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Tamaño estable al Zoom","Stable Zoom size"),":"]})," ",f("la interfaz siempre llena la ventana al 100% por defecto, sin encogerse al reducir o ampliar el zoom del navegador.","UI always fills the window at 100% by default, no shrinking or growing when changing browser zoom.")]})]}),u.jsx("h4",{children:"v1.1.1"}),u.jsxs("ul",{children:[u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Coeficientes IHM oficiales","Official IHM coefficients"),":"]})," ",f("auto-descarga del PDF. Elimina el 'dato bailante'.","PDF auto-download. Eliminates 'dancing data'.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Fix zona horaria","Timezone fix"),":"]})," ",f("coeficiente usa hora local española (no UTC).","coefficient uses Spanish local time (not UTC).")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Fix ESM __dirname","ESM __dirname fix"),":"]})," ",f("polyfill para módulos ESM.","polyfill for ESM modules.")]})]}),u.jsx("h4",{children:"v1.1.0"}),u.jsxs("ul",{children:[u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Alarma de varada","Grounding alarm"),":"]})," ",f("aviso 24h, anticipada, snooze, silenciar.","24h warning, advance, snooze, mute.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Curvas interactivas","Interactive curves"),":"]})," ",f("gráfica SVG con cursor y extremos.","SVG chart with cursor and extremes.")]}),u.jsx("li",{children:u.jsx("strong",{children:f("Bilingüe ES/EN","Bilingual ES/EN")})}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Salida/Puesta sol","Sunrise/Sunset"),":"]})," ",f("integración Derived Data.","Derived Data integration.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("Táctica Rías Baixas","Rías Baixas tactics"),":"]})," ",f("experimental.","experimental.")]})]}),u.jsx("h4",{children:"v1.0.0"}),u.jsx("ul",{children:u.jsx("li",{children:f("Versión inicial: datos IHM, AUTO/MANUAL, paths Signal K.","Initial release: IHM data, AUTO/MANUAL, Signal K paths.")})})]}):g==="es"?u.jsxs(u.Fragment,{children:[u.jsx("h3",{children:"🎯 Uso básico"}),u.jsx("p",{children:"El plugin funciona automáticamente como generador de datos Signal K y WebApp visual. Proporciona datos de mareas oficiales del Instituto Hidrográfico de la Marina (IHM) para todas las estaciones de la costa española, incluyendo Baleares y Canarias."}),u.jsxs("ul",{children:[u.jsxs("li",{children:[u.jsx("strong",{children:"AUTOMÁTICO:"})," detecta la estación de mareas más cercana por GPS (radio 30 km). Si hay posición GPS, selecciona automáticamente la mejor estación."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"MANUAL:"})," selecciona cualquier estación del listado completo. Útil si navegas fuera de rango GPS o quieres consultar otra zona."]})]}),u.jsxs("p",{children:[u.jsx("strong",{children:"💡 Sin GPS al arrancar:"})," usa Vigo por defecto y carga todas las estaciones IHM como respaldo. En cuanto llega señal GPS, cambia automáticamente a la estación más cercana."]}),u.jsx("h3",{children:"📈 Curvas de marea"}),u.jsxs("p",{children:["Pulsa ",u.jsx("strong",{children:"CURVAS"})," o la barra central del panel para abrir la gráfica interactiva SVG. Muestra la curva de marea con extremos (pleamares y bajamares), hora actual marcada, y permite ver la evolución completa de las mareas. El eje horizontal muestra horas en hora local de la estación y el vertical la altura en metros sobre el Cero Hidrográfico."]}),u.jsx("h3",{children:"⚓ Calculadora de fondeo"}),u.jsxs("p",{children:["Calculadora automática de cuánta cadena echar y del radio de borneo actual y máximo de acuerdo a las mareas previstas en el tiempo prefijado por el usuario. Tiene tres modos: ",u.jsx("strong",{children:"Provisional"})," (3.5:1, fondeo de espera), ",u.jsx("strong",{children:"Normal"})," (5:1, recomendado) y ",u.jsx("strong",{children:"Seguro"})," (8:1, temporal o noche). El cálculo usa el modelo de catenaria náutico considerando la profundidad actual, la evolución de la marea en el horizonte elegido, y la altura de la roldana de proa."]}),u.jsx("p",{children:"Publicación opcional de datos en Signal K: ratio de catenaria versus fondo, resumen de recomendación de fondeo, metros de cadena a echar y radios de borneo (actual y máximo). Si la profundidad mínima prevista es inferior al calado efectivo del barco, se muestra una alerta roja parpadeante."}),u.jsx("h3",{children:"🔔 Alarma de Calado"}),u.jsx("p",{children:"Sistema de alarma de varada calculado en base al calado del barco + margen de seguridad (o distancia de sonda a quilla) + 15% adicional de factor de seguridad. Funcionalidades:"}),u.jsxs("ul",{children:[u.jsxs("li",{children:[u.jsx("strong",{children:"Aviso 24h:"})," detecta si va a haber riesgo de varada en las próximas 24 horas según la evolución de la marea."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Alarma anticipada:"})," configurable X minutos antes de quedarse sin calado, con sonido audible."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Snooze:"})," posponer la alarma temporalmente."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Silenciar sonido:"})," desactiva el audio pero mantiene la alerta visual (botón parpadeante)."]})]}),u.jsx("p",{children:"Las alarmas se publican en Signal K (paths dedicados) y en el sistema de notificaciones del servidor."}),u.jsx("h3",{children:"🧭 Navegación táctica — Rías Baixas"}),u.jsx("p",{children:"Función experimental que proporciona consejo táctico de navegación para las Rías Baixas gallegas, basado en la dirección de la corriente de marea (llenante/vaciante), la fase actual y el porcentaje de marea. Útil para planificar entradas y salidas de las rías aprovechando la corriente a favor."}),u.jsx("h3",{children:"🌅 Datos Solares"}),u.jsxs("p",{children:["Muestra las horas de salida y puesta de sol. Necesitas tener una posición GPS y el plugin ",u.jsx("a",{href:"https://www.npmjs.com/package/signalk-derived-data",target:"_blank",rel:"noopener",style:{color:"#4dd0ff"},children:u.jsx("strong",{children:"Derived Data"})})," instalado con las opciones de Sol activadas. En caso de faltar cualquiera de estos datos, devuelve el mensaje ",u.jsx("em",{children:"GPS + Derived Data"}),"."]}),u.jsx("h3",{children:"📊 Coeficiente de Mareas"}),u.jsx("p",{children:"Coeficiente oficial del IHM, descargado automáticamente del PDF anual del instituto. Indica la amplitud relativa de la marea: valores altos (>90) implican grandes carreras de marea, valores bajos (<40) mareas muertas."}),u.jsx("h3",{children:"❓ Preguntas frecuentes (FAQ)"}),u.jsxs("ul",{children:[u.jsxs("li",{children:[u.jsx("strong",{children:"¿No aparece la posición GPS?"})," → Verifica que el path ",u.jsx("code",{children:"navigation.position"})," está publicado en Signal K. Necesitas un receptor GPS conectado y su plugin correspondiente activo."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"¿Cómo configuro el calado del barco?"})," → Ve a Signal K → Server → Settings → Vessel → Draft. Este valor se usa para las alarmas de varada y el cálculo de fondeo."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"¿La hora que muestra es UTC?"})," → No, siempre se muestra la hora local de la estación seleccionada (Europe/Madrid para península y Baleares, Atlantic/Canary para Canarias)."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"¿Funciona sin conexión a Internet?"})," → Sí. El plugin mantiene una caché local de más de 2 meses de datos. Se actualiza automáticamente cada 48 horas cuando hay conexión. En el primer arranque sin Internet usa las estaciones hardcoded."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"¿Qué navegadores soporta?"})," → Firefox y Chromium (el navegador por defecto de OpenPlotter). Optimizado para pantallas 1920×1080."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"¿Qué es el Cero Hidrográfico?"})," → Es el nivel de referencia usado por el IHM. Las alturas de marea se miden sobre este datum, que corresponde aproximadamente a la bajamar más baja."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"¿Puedo usar el plugin en el móvil?"})," → Sí, la interfaz es responsive y se adapta a diferentes tamaños de pantalla."]})]}),u.jsx("h3",{children:"📊 Paths publicados"})]}):u.jsxs(u.Fragment,{children:[u.jsx("h3",{children:"🎯 Basic use"}),u.jsx("p",{children:"The plugin runs automatically as a Signal K data publisher and visual WebApp. It provides official tide data from the Spanish Hydrographic Institute (IHM) for all stations along the Spanish coast, including the Balearic and Canary Islands."}),u.jsxs("ul",{children:[u.jsxs("li",{children:[u.jsx("strong",{children:"AUTOMATIC:"})," detects the nearest tide station by GPS (30 km radius). Automatically selects the best station when GPS is available."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"MANUAL:"})," pick any station from the full list. Useful when sailing outside GPS range or when checking another area."]})]}),u.jsxs("p",{children:[u.jsx("strong",{children:"💡 No GPS at startup:"})," defaults to Vigo and loads all IHM stations as fallback. Switches automatically to the nearest station as soon as GPS signal arrives."]}),u.jsx("h3",{children:"📈 Tide curves"}),u.jsxs("p",{children:["Press ",u.jsx("strong",{children:"CURVES"})," or the central bar to open the interactive SVG chart. It shows the tide curve with extremes (high and low water), current time marker, and the full tidal evolution. The horizontal axis shows hours in station local time and the vertical axis shows height in meters above Chart Datum."]}),u.jsx("h3",{children:"⚓ Anchoring calculator"}),u.jsxs("p",{children:["Automatic calculator for how much chain to deploy and the current and maximum swing radius according to predicted tides within the user-set time horizon. Three modes: ",u.jsx("strong",{children:"Provisional"})," (3.5:1, temporary stop), ",u.jsx("strong",{children:"Normal"})," (5:1, recommended) and ",u.jsx("strong",{children:"Safe"})," (8:1, heavy weather or overnight). The calculation uses the nautical catenary model considering current depth, tide evolution over the chosen horizon, and bow roller height."]}),u.jsx("p",{children:"Optional Signal K publication: catenary ratio vs. seabed, anchoring recommendation summary, chain length and swing radii (current and maximum). If minimum forecast depth falls below vessel effective draft, a flashing red alert is displayed."}),u.jsx("h3",{children:"🔔 Draft Alarm"}),u.jsx("p",{children:"Grounding alarm system calculated based on vessel draft + safety margin (or sounder-to-keel distance) + 15% additional safety factor. Features:"}),u.jsxs("ul",{children:[u.jsxs("li",{children:[u.jsx("strong",{children:"24h warning:"})," detects grounding risk in the next 24 hours based on tide evolution."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Advance alarm:"})," configurable X minutes before losing under-keel clearance, with audible sound."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Snooze:"})," temporarily postpone the alarm."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Mute sound:"})," disables audio but keeps the visual alert (blinking button)."]})]}),u.jsx("p",{children:"Alarms are published to Signal K (dedicated paths) and the server notification system."}),u.jsx("h3",{children:"🧭 Tactical navigation — Rías Baixas"}),u.jsx("p",{children:"Experimental feature providing tactical sailing advice for the Galician Rías Baixas, based on tidal current direction (flooding/ebbing), current phase and tide percentage. Useful for planning ría entries and exits using favourable current."}),u.jsx("h3",{children:"🌅 Solar Data"}),u.jsxs("p",{children:["Displays sunrise and sunset times. You need a GPS position and the ",u.jsx("a",{href:"https://www.npmjs.com/package/signalk-derived-data",target:"_blank",rel:"noopener",style:{color:"#4dd0ff"},children:u.jsx("strong",{children:"Derived Data"})})," plugin installed with Sun options enabled. If either is missing, it displays the message ",u.jsx("em",{children:"GPS + Derived Data"}),"."]}),u.jsx("h3",{children:"📊 Tide Coefficient"}),u.jsx("p",{children:"Official IHM coefficient, automatically downloaded from the institute's annual PDF. It indicates relative tide amplitude: high values (>90) mean large tidal ranges, low values (<40) mean neap tides."}),u.jsx("h3",{children:"❓ Frequently Asked Questions (FAQ)"}),u.jsxs("ul",{children:[u.jsxs("li",{children:[u.jsx("strong",{children:"No GPS position?"})," → Check that the path ",u.jsx("code",{children:"navigation.position"})," is published in Signal K. You need a GPS receiver connected and its plugin active."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"How to set vessel draft?"})," → Go to Signal K → Server → Settings → Vessel → Draft. This value is used for grounding alarms and anchoring calculations."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Is the time shown in UTC?"})," → No, station local time is always used (Europe/Madrid for mainland and Balearics, Atlantic/Canary for the Canary Islands)."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Does it work offline?"})," → Yes. The plugin keeps a local cache of 2+ months of data. It auto-updates every 48 hours when connected. On first boot without internet it uses hardcoded stations."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Supported browsers?"})," → Firefox and Chromium (OpenPlotter default). Optimized for 1920×1080 screens."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"What is Chart Datum?"})," → The reference level used by IHM. Tide heights are measured above this datum, which roughly corresponds to the Lowest Astronomical Tide (LAT)."]}),u.jsxs("li",{children:[u.jsx("strong",{children:"Can I use it on mobile?"})," → Yes, the interface is responsive and adapts to different screen sizes."]})]}),u.jsx("h3",{children:"📊 Published paths"})]}),!o&&u.jsxs(u.Fragment,{children:[u.jsxs("h4",{children:["🗺️ ",f("Visor de Fondeo","Anchor Viewer")]}),u.jsxs("p",{children:[f("Accede desde el botón naranja VISOR DE FONDEO en la barra principal, o directamente:","Access from the orange ANCHOR VIEWER button in the toolbar, or directly at:")," ",u.jsx("code",{children:"/signalk-mareas-ihm/visorfondeo"})]}),u.jsx("h5",{children:f("Botones superiores (centro)","Top buttons (center)")}),u.jsxs("ul",{children:[u.jsxs("li",{children:[u.jsxs("strong",{children:[f("📐 Calc. Sonda","📐 Depth Calc"),":"]})," ",f("Configura calado, margen de seguridad y calado efectivo (+15%). Visualiza el estado de riesgo de varada.","Configure draft, safety margin and effective draft (+15%). View grounding risk status.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("⚓ Calc. Fondeo","⚓ Anchor Calc"),":"]})," ",f("Calcula la cadena necesaria según el modo (básico/normal/duro), profundidad y tiempo de fondeo. Configura scope y altura de roldana.","Calculate chain needed by mode (basic/normal/hard), depth and anchoring time. Configure scope and bow roller height.")]}),u.jsxs("li",{children:[u.jsxs("strong",{children:[f("📈 Curvas","📈 Curves"),":"]})," ",f("Gráfico de curva de marea con los extremos de las próximas 24 horas, interpolación sinusoidal y marcador de hora actual.","Tide curve chart with extremes for next 24 hours, sinusoidal interpolation and current time marker.")]})]}),u.jsx("h5",{children:f("Panel de Alarmas (🔔)","Alarm Panel (🔔)")}),u.jsxs("ul",{children:[u.jsx("li",{children:f("Selector ON/OFF para 3 alarmas: AIS, Garreo, Sonda","ON/OFF toggle for 3 alarms: AIS, Drag, Depth")}),u.jsx("li",{children:f("Al activar Garreo sin ancla echada → fondea automáticamente","Activating Drag alarm without anchor → auto-drops anchor")}),u.jsx("li",{children:f("Al desactivar Garreo con ancla → pregunta si levar ancla","Deactivating Drag with anchor → asks if you want to lift")})]}),u.jsx("h5",{children:f("Capas de mapa","Map layers")}),u.jsxs("ul",{children:[u.jsx("li",{children:f("Satélite Esri (por defecto), Bing Hybrid, Esri Clarity, Google Satélite","Esri Satellite (default), Bing Hybrid, Esri Clarity, Google Satellite")}),u.jsx("li",{children:f("OpenStreetMap, OpenSeaMap, Cartas IHM oficiales (WMS), SonarChart","OpenStreetMap, OpenSeaMap, IHM official charts (WMS), SonarChart")}),u.jsx("li",{children:f("Cartas MBTiles offline con slider de transparencia","MBTiles offline charts with opacity slider")})]}),u.jsx("h5",{children:f("Operaciones de fondeo","Anchoring operations")}),u.jsxs("ul",{children:[u.jsx("li",{children:f("FONDEAR AQUÍ marca el ancla en la posición de la PROA del barco","DROP ANCHOR marks anchor at the BOW position")}),u.jsx("li",{children:f("El círculo azul muestra el radio de borneo máximo (dinámico, de la catenaria)","Blue circle shows maximum swing radius (dynamic, from catenary)")}),u.jsx("li",{children:f("El círculo rojo muestra el radio de alarma (swingMax + margen). Ajústalo con el slider","Red circle shows alarm radius (swingMax + margin). Adjust it with the slider")}),u.jsx("li",{children:f("Si el barco sale del círculo rojo → alarma de GARREO (sonido + notificación SK)","If boat exits red circle → DRAG alarm (sound + SK notification)")}),u.jsx("li",{children:f("Arrastra el ancla ⚓ en el mapa para ajustar su posición","Drag the anchor ⚓ on the map to adjust its position")}),u.jsx("li",{children:f("Cartas: copia archivos .mbtiles en /home/pi/charts/ y aparecerán como checkboxes","Charts: copy .mbtiles files to /home/pi/charts/ and they will appear as checkboxes")})]}),u.jsx("div",{style:{overflowX:"auto"},children:u.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{style:{textAlign:"left",padding:"6px",borderBottom:"1px solid rgba(255,255,255,0.2)"},children:"Path"}),u.jsx("th",{style:{textAlign:"left",padding:"6px",borderBottom:"1px solid rgba(255,255,255,0.2)"},children:f("Descripción","Description")})]})}),u.jsx("tbody",{children:ua.length?ua.map(d=>u.jsxs("tr",{children:[u.jsx("td",{style:{verticalAlign:"top",padding:"6px",borderBottom:"1px solid rgba(255,255,255,0.08)"},children:u.jsx("code",{children:d.path})}),u.jsx("td",{style:{verticalAlign:"top",padding:"6px",borderBottom:"1px solid rgba(255,255,255,0.08)"},children:d.description||""})]},d.path)):u.jsx("tr",{children:u.jsx("td",{colSpan:2,style:{padding:"6px",opacity:.8},children:f("(Cierra y abre de nuevo)","(Close and reopen)")})})})]})})]}),u.jsx("p",{style:{marginTop:14,fontSize:13},children:f("Dudas: tradesolutions@gmail.com — asunto: MAREAS (IHM)","Questions: tradesolutions@gmail.com — subject: MAREAS (IHM)")})]}),Ol&&nt.length>0&&u.jsxs("div",{className:"search-results-panel",children:[u.jsxs("div",{className:"search-results-header",children:[u.jsxs("span",{children:[W," ",f("resultados","results")]}),u.jsx("button",{onClick:()=>{Wa(!1),H("")},style:{background:"none",border:"none",color:"#ff6666",cursor:"pointer",fontSize:"16px"},children:"✕"})]}),u.jsx("div",{className:"search-results-list",children:(()=>{const d={};return nt.forEach(M=>{(d[M.section]??=[]).push(M)}),Object.entries(d).map(([M,Z])=>u.jsxs("div",{className:"search-group",children:[u.jsx("div",{className:"search-group-title",children:M}),Z.slice(0,5).map((J,be)=>u.jsx("div",{className:"search-result-item",onClick:()=>{J.element.scrollIntoView({behavior:"smooth",block:"center"})},children:J.snippet},be)),Z.length>5&&u.jsxs("div",{className:"search-result-more",children:["+",Z.length-5," ",f("más","more")]})]},M))})()})]}),u.jsxs("div",{className:"modal-buttons-fixed",style:{display:"flex",gap:"10px",alignItems:"center"},children:[u.jsx("button",{className:"ctrl-btn",style:{background:"rgba(255,255,255,0.12)",flex:"0 0 auto",padding:"10px 16px"},onClick:()=>{j(!o),H("")},children:o?f("INSTRUCCIONES","INSTRUCTIONS"):f("VERSIONES","CHANGELOG")}),u.jsx("button",{className:"ctrl-btn",style:{background:"rgba(255,152,0,0.15)",flex:"0 0 auto",padding:"10px 16px",color:"#ff9800",border:"1px solid #ff9800"},onClick:()=>V(!0),children:f("AVISO LEGAL","LEGAL")}),u.jsx("button",{className:"modal-close",onClick:()=>{se(!1),j(!1),H("")},children:f("CERRAR","CLOSE")}),u.jsxs("div",{style:{flex:"0 0 auto",display:"flex",alignItems:"center",gap:"6px"},children:[u.jsx("input",{type:"text",value:D,onChange:d=>H(d.target.value),placeholder:f("🔍 Buscar...","🔍 Search..."),style:{background:"rgba(255,255,255,0.1)",border:"1px solid rgba(255,255,255,0.25)",borderRadius:"8px",color:"white",padding:"8px 12px",fontSize:"14px",width:"160px"}}),D.length>=2&&u.jsx("span",{style:{fontSize:"12px",opacity:.7},children:W>0?W:"0"})]})]})]})}),_c&&u.jsx("div",{className:"modal-overlay",style:{zIndex:10001},onClick:()=>vn(!1),children:u.jsxs("div",{className:"risk-popup",onClick:d=>d.stopPropagation(),children:[u.jsx("button",{className:"risk-popup-close",onClick:()=>vn(!1),children:"✕"}),u.jsx("div",{className:"risk-popup-icon",children:"⚠️"}),u.jsxs("div",{className:"risk-popup-text",children:[u.jsx("strong",{children:f("OJO: Alarma desactivada","WARNING: Alarm is OFF")}),u.jsx("br",{}),f("Riesgo de varada","Grounding risk"),pn?` ${f("a partir de las","from")} ${pn}`:""]})]})}),Wn&&u.jsx("div",{className:"modal-overlay",onClick:()=>{ca(),Fn(!1)},children:u.jsxs("div",{className:"modal-content modal-fullscreen alarma-modal",onClick:d=>d.stopPropagation(),children:[u.jsxs("h2",{children:["🔔 ",f("ALARMA DE CALADO","DRAFT ALARM")]}),u.jsxs("div",{className:"alarma-body alarma-scroll",children:[u.jsx("div",{className:"alarma-field",children:u.jsxs("label",{className:"alarma-toggle",children:[u.jsx("input",{type:"checkbox",checked:it?.enabled??!1,onChange:d=>qt(M=>M?{...M,enabled:d.target.checked}:null)}),u.jsx("span",{className:"toggle-slider"}),u.jsx("span",{className:"toggle-label",children:f("Alarmas activadas","Alarms enabled")})]})}),u.jsxs("div",{className:"alarma-section",children:[u.jsx("h3",{children:f("Tipos de alerta:","Alert types:")}),u.jsx("div",{className:"alarma-field",children:u.jsxs("label",{className:"alarma-checkbox",children:[u.jsx("input",{type:"checkbox",checked:it?.alertOnArrival??!0,onChange:d=>qt(M=>M?{...M,alertOnArrival:d.target.checked}:null),disabled:!it?.enabled}),u.jsx("span",{children:f("Aviso al llegar a zona con riesgo (próximas 24h)","Warning on arrival to a risk area (next 24h)")})]})}),u.jsx("div",{className:"alarma-field",children:u.jsxs("label",{className:"alarma-checkbox",children:[u.jsx("input",{type:"checkbox",checked:it?.alertBeforeGrounding??!0,onChange:d=>qt(M=>M?{...M,alertBeforeGrounding:d.target.checked}:null),disabled:!it?.enabled}),u.jsx("span",{children:f("Alarma X minutos antes de quedarse sin calado","Alarm X minutes before you lose under-keel clearance")})]})}),u.jsxs("div",{className:"alarma-inline-row",children:[u.jsxs("div",{className:"alarma-field",children:[u.jsx("label",{children:f("Minutos de anticipación","Minutes in advance")}),u.jsx("input",{type:"number",className:"alarma-input",step:"5",min:"15",max:"120",value:it?.minutesBefore??60,onChange:d=>qt(M=>M?{...M,minutesBefore:parseInt(d.target.value)||60}:null),disabled:!it?.enabled})]}),u.jsxs("div",{className:"alarma-field",children:[u.jsx("label",{children:f("Margen de seguridad (metros)","Safety margin (meters)")}),u.jsx("input",{type:"number",className:"alarma-input",step:"0.1",min:"0",max:"5",value:it?.safetyMargin??.5,onChange:d=>qt(M=>M?{...M,safetyMargin:parseFloat(d.target.value)||.5}:null),disabled:!it?.enabled})]})]})]}),u.jsxs("div",{className:"alarma-section",children:[u.jsx("h3",{children:f("Sonido:","Sound:")}),u.jsxs("div",{className:"alarma-field",children:[u.jsxs("label",{className:"alarma-toggle",children:[u.jsx("input",{type:"checkbox",checked:!(it?.soundMuted??!1),onChange:d=>qt(M=>M?{...M,soundMuted:!d.target.checked}:null),disabled:!it?.enabled}),u.jsx("span",{className:"toggle-slider"}),u.jsx("span",{className:"toggle-label",children:f("Sonido de alarma activado","Alarm sound enabled")})]}),u.jsx("p",{style:{fontSize:"13px",opacity:.7,marginTop:6},children:f("Si desactivas el sonido, la alarma visual seguirá funcionando.","If you mute the sound, visual alerts will still work.")})]})]}),u.jsx("div",{className:"alarma-info",children:u.jsx("p",{children:f("ℹ️ La alarma considera calado del barco + margen de seguridad + 15% adicional (por defecto) y avisa si detecta riesgo según la evolución de la marea.","ℹ️ The alarm uses vessel draft + safety margin + an extra 15% (default) and warns when a grounding risk is detected based on tide evolution.")})})]}),u.jsx("div",{className:"modal-buttons-fixed",children:u.jsx("button",{className:"modal-close",onClick:()=>{ca(),Fn(!1)},children:f("CERRAR","CLOSE")})})]})})]}),document.body),xa&&jh.createPortal(u.jsx("div",{className:"modal-overlay",onClick:()=>{dt(!1),hi(!1)},children:u.jsxs("div",{className:"modal-content modal-fullscreen anchor-modal",onClick:d=>d.stopPropagation(),children:[u.jsxs("h2",{children:["⚓ ",f("Cálculo de Fondeo","Anchoring Calculator")]}),u.jsxs("div",{className:"anchor-scroll-body",children:[u.jsxs("div",{className:"anchor-type-box",children:[u.jsxs("div",{className:"anchor-type-header",children:[u.jsx("span",{children:f("Tipo de fondeo y ratio de cadena","Anchoring type and chain ratio")}),u.jsx("button",{className:"anchor-help-btn",onClick:()=>hi(!di),children:"?"})]}),di&&u.jsxs("div",{className:"anchor-help-popup",children:[u.jsxs("p",{children:[u.jsxs("strong",{children:[f("Provisional","Provisional")," (",Ee.scopeBasic," : 1):"]})," ",f("Fondeo corto o de espera. Buen tiempo, fondo de arena, poco viento. Mínimo aceptable.","Short or waiting anchorage. Fair weather, sand bottom, light wind. Minimum acceptable.")]}),u.jsxs("p",{children:[u.jsxs("strong",{children:["Normal (",Ee.scopeNormal," : 1):"]})," ",f("Condiciones normales. Recomendado por defecto para la mayoría de situaciones.","Normal conditions. Recommended default for most situations.")]}),u.jsxs("p",{children:[u.jsxs("strong",{children:[f("Seguro","Safe")," (",Ee.scopeHard," : 1):"]})," ",f("Fondeo de seguridad. Mal tiempo, temporal, fondo malo, noche o fondeo prolongado.","Safety anchoring. Heavy weather, storm, poor holding, overnight or extended stay.")]})]}),u.jsx("div",{className:"anchor-mode-btns anchor-mode-wide",children:["basic","normal","hard"].map(d=>u.jsx("button",{className:`anchor-mode-btn${an===d?" active":""}`,onClick:()=>ln(d),children:d==="basic"?`${f("Provisional","Provisional")} ${Ee.scopeBasic} : 1`:d==="normal"?`Normal ${Ee.scopeNormal} : 1`:`${f("Seguro","Safe")} ${Ee.scopeHard} : 1`},d))})]}),u.jsxs("div",{className:"anchor-config-toggle",onClick:()=>gi(!mi),children:[u.jsx("span",{className:`anchor-config-arrow${mi?" open":""}`,children:"▶"}),u.jsx("span",{children:f("Configuración avanzada","Advanced configuration")})]}),mi&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"anchor-config-backdrop",onClick:()=>gi(!1)}),u.jsxs("div",{className:"anchor-config-body",children:[u.jsxs("div",{className:"anchor-field",children:[u.jsx("label",{children:f("Altura roldana sobre el agua","Bow roller height above water")}),u.jsxs("div",{className:"anchor-input-row",children:[u.jsx("input",{type:"number",min:"0",max:"10",step:"0.1",value:su,onChange:d=>{ti(d.target.value);const M=parseFloat(d.target.value);Number.isFinite(M)&&Qe(Z=>({...Z,hBowMeters:M}))},onBlur:()=>{const d=parseFloat(su);(!Number.isFinite(d)||d<0)&&(ti(""),Qe(M=>({...M,hBowMeters:0})))},placeholder:"ej: 1.2"}),u.jsx("span",{className:"anchor-unit",children:"m"})]})]}),u.jsxs("div",{className:"anchor-field",children:[u.jsx("label",{children:f("Tiempo previsto de fondeo","Expected anchoring time")}),u.jsxs("div",{className:"anchor-input-row",children:[u.jsx("input",{type:"number",min:"0",max:"7",step:"1",value:Sa,onChange:d=>nn(Math.max(0,parseInt(d.target.value)||0)),style:{width:55}}),u.jsx("span",{className:"anchor-unit",children:f("días","days")}),u.jsx("input",{type:"number",min:"0",max:"23",step:"1",value:Yt,onChange:d=>un(Math.max(0,parseInt(d.target.value)||0)),style:{width:55}}),u.jsx("span",{className:"anchor-unit",children:f("horas","hours")})]})]}),u.jsxs("div",{className:"anchor-field",children:[u.jsx("label",{children:f("Introduce manualmente la profundidad","Enter depth manually")}),u.jsxs("div",{className:"anchor-input-row",children:[u.jsx("input",{type:"number",min:"0",max:"100",step:"0.1",className:"anchor-input-wide",value:cn,onChange:d=>ou(d.target.value),placeholder:f("SOLO SI NO HAY DATO SONDA","ONLY IF NO SOUNDER DATA")}),u.jsx("span",{className:"anchor-unit",children:"m"})]})]}),u.jsxs("div",{className:"anchor-field",children:[u.jsx("label",{children:f("Ratios de cadena (editables)","Chain ratios (editable)")}),u.jsxs("div",{className:"anchor-ratios-vertical",children:[u.jsxs("div",{className:"anchor-ratio-row",children:[u.jsxs("span",{className:"anchor-ratio-label",children:[f("Provisional","Provisional"),":"]}),u.jsx("input",{type:"number",min:"1",max:"12",step:"0.5",value:Ee.scopeBasic,onChange:d=>Qe({...Ee,scopeBasic:parseFloat(d.target.value)||3.5})})]}),u.jsxs("div",{className:"anchor-ratio-row",children:[u.jsx("span",{className:"anchor-ratio-label",children:"Normal:"}),u.jsx("input",{type:"number",min:"1",max:"12",step:"0.5",value:Ee.scopeNormal,onChange:d=>Qe({...Ee,scopeNormal:parseFloat(d.target.value)||5})})]}),u.jsxs("div",{className:"anchor-ratio-row",children:[u.jsxs("span",{className:"anchor-ratio-label",children:[f("Seguro","Safe"),":"]}),u.jsx("input",{type:"number",min:"1",max:"12",step:"0.5",value:Ee.scopeHard,onChange:d=>Qe({...Ee,scopeHard:parseFloat(d.target.value)||8})})]})]}),u.jsx("button",{className:"anchor-config-calc-btn",onClick:()=>gi(!1),children:f("Calcular","Calculate")})]})]})]})]}),de&&Number.isFinite(de.chainL)&&u.jsxs("div",{className:"anchor-results-fixed",children:[de.warnings?.length>0&&u.jsx("div",{className:"anchor-warnings",children:de.warnings.map((d,M)=>u.jsxs("div",{className:"anchor-warn",children:["⚠ ",d]},M))}),u.jsxs("div",{className:"anchor-result-grid-4x2",children:[u.jsxs("div",{className:"anchor-rbox anchor-rbox-highlight",style:{cursor:"pointer",position:"relative"},onClick:()=>{ru||(sn(!0),ai(ba?String(ba):""))},children:[u.jsxs("span",{className:"anchor-rbox-label",children:["⚓ ",f("Cadena","Chain")]}),ru?u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px",justifyContent:"center"},children:[u.jsx("input",{type:"number",min:"1",max:"200",step:"1",autoFocus:!0,value:on,onChange:d=>ai(d.target.value),onKeyDown:d=>{if(d.key==="Enter"){const M=parseInt(on);M>0&&($a(M),fetch("/signalk-mareas-ihm/api/anchor-watch/chain-deployed",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({meters:M})})),sn(!1)}},onBlur:()=>{const d=parseInt(on);d>0&&($a(d),fetch("/signalk-mareas-ihm/api/anchor-watch/chain-deployed",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({meters:d})})),sn(!1)},style:{width:"60px",background:"rgba(255,255,255,0.15)",border:"1px solid #ff9800",borderRadius:"4px",color:"#fff",textAlign:"center",fontSize:"18px",padding:"2px"}}),u.jsx("span",{style:{fontSize:"18px",fontWeight:700},children:"m"})]}):u.jsx("span",{className:"anchor-rbox-value",children:ba?`${ba} m`:`${de.chainL} m`}),u.jsx("span",{style:{position:"absolute",bottom:"3px",right:"6px",fontSize:"23px",opacity:.9,fontWeight:700,color:"#ffb74d"},children:ba?`rec: ${de.chainL}m`:f("pulsa para editar","tap to edit")})]}),u.jsxs("div",{className:"anchor-rbox anchor-rbox-highlight",children:[u.jsxs("span",{className:"anchor-rbox-label",children:["🌊 ",f("Profundidad ahora","Depth now")]}),u.jsxs("span",{className:"anchor-rbox-value",children:[de.dNow?.toFixed(2)??"–"," m"]}),de.depthPathUsed&&u.jsx("span",{style:{fontSize:"10px",opacity:.5},children:de.depthPathUsed==="none"?f("⚠ manual","⚠ manual"):"SK ✓"})]}),u.jsxs("div",{className:"anchor-rbox",children:[u.jsxs("span",{className:"anchor-rbox-label",children:["📈 ",f("Profundidad máxima","Max depth")]}),u.jsxs("span",{className:"anchor-rbox-value",children:[de.depthMax?.toFixed(2)??"–"," m"]})]}),u.jsxs("div",{className:`anchor-rbox${de.draftEffective!=null&&de.depthMin!=null&&de.depthMin<de.draftEffective?" anchor-rbox-danger":""}`,children:[u.jsxs("span",{className:"anchor-rbox-label",children:["📉 ",f("Profundidad mínima","Min depth")]}),u.jsxs("span",{className:"anchor-rbox-value",children:[de.depthMin?.toFixed(2)??"–"," m"]}),de.draftEffective!=null&&de.depthMin!=null&&de.depthMin<de.draftEffective&&u.jsxs("span",{className:"anchor-rbox-alert",children:["⚠ < ",f("calado ef.","eff. draft")," ",de.draftEffective,"m"]})]}),u.jsxs("div",{className:"anchor-rbox",children:[u.jsxs("span",{className:"anchor-rbox-label",children:["↔ ",f("Radio de borneo ahora","Swing radius now")]}),u.jsxs("span",{className:"anchor-rbox-value",children:[de.swingRadiusNow??de.swingRadiusMax," m"]})]}),u.jsxs("div",{className:"anchor-rbox",children:[u.jsxs("span",{className:"anchor-rbox-label",children:["↔ ",f("Radio de borneo máximo","Max swing radius")]}),u.jsxs("span",{className:"anchor-rbox-value",children:[de.swingRadiusMax," m"]})]}),u.jsxs("div",{className:"anchor-rbox",children:[u.jsxs("span",{className:"anchor-rbox-label",children:["🌊 ",f("Estado marea","Tide state")]}),u.jsx("span",{className:"anchor-rbox-value anchor-rbox-value-sm",children:O?.resume??de.tendencyPercentage??"–"})]}),u.jsxs("div",{className:"anchor-rbox",children:[u.jsxs("span",{className:"anchor-rbox-label",children:["⚠ ",f("Status Profundidad","Depth Status")]}),u.jsx("span",{className:"anchor-rbox-value anchor-rbox-value-sm",children:O?.groundingStatus??"–"})]}),u.jsx("div",{className:"anchor-rbox anchor-rbox-map",style:{gridColumn:"span 2",cursor:"pointer",background:"rgba(255,152,0,0.15)",border:"2px solid rgba(255,152,0,0.5)"},onClick:()=>window.location.href="/signalk-mareas-ihm/visorfondeo",children:u.jsx("span",{className:"anchor-rbox-value",style:{color:"#ff9800",fontSize:"48px",lineHeight:1.2,textAlign:"center"},children:f("ABRIR VISOR DE FONDEO","OPEN ANCHOR VIEWER")})})]}),de.partial&&u.jsxs("div",{className:"anchor-partial-notice",children:["⚠ ",f("Estimación parcial — horizonte largo sin datos de extremos completos","Partial estimate — long horizon without complete extreme data")]})]}),de&&!Number.isFinite(de.chainL)&&u.jsx("div",{className:"anchor-results-fixed",children:u.jsx("div",{className:"anchor-warnings",children:de.warnings?.map((d,M)=>u.jsxs("div",{className:"anchor-warn",children:["⚠ ",d]},M))})}),u.jsxs("div",{className:"modal-buttons-fixed",style:{display:"flex",gap:"10px",alignItems:"center"},children:[u.jsxs("label",{className:"anchor-publish-bar",style:{flex:"1"},children:[u.jsx("input",{type:"checkbox",checked:Ee.autoPublish,onChange:d=>Qe({...Ee,autoPublish:d.target.checked})}),u.jsx("span",{className:"anchor-publish-label",children:f("Publicar en Signal K","Publish to Signal K")})]}),u.jsx("button",{className:"modal-close",onClick:()=>{dt(!1),hi(!1)},children:f("CERRAR","CLOSE")})]})]})}),document.body),uu&&u.jsx(Fg,{extremes:du,now:sa,heightNow:tl,riskTimeIso:Nt?.physicalRisk&&Nt?.nextLowTime?Nt.nextLowTime:null,stationSampleIso:xt?.time??ht?.time,stationName:O?.stationName??"",onClose:()=>ei(!1),tr:f})]})}const Oh={titulo:{es:"Mareas IHM",en:"Tides IHM"},subtitulo:{es:"Predicciones oficiales de mareas · Visor de fondeo · Alarmas",en:"Official tide predictions · Anchor watch · Alarms"},mareas:{es:"Mareas",en:"Tides"},mareas_desc:{es:"Predicciones, curvas, alarma varada",en:"Predictions, curves, grounding alarm"},fondeo:{es:"Visor de Fondeo",en:"Anchor Watch"},fondeo_desc:{es:"Mapa, AIS, alarma garreo, capas",en:"Map, AIS, drag alarm, layers"}};function nv({onSelect:g}){const[C,O]=z.useState(localStorage.getItem("ihm-visor-lang")||"es"),[m,w]=z.useState(""),R=U=>Oh[U]?.[C]||Oh[U]?.es||U;z.useEffect(()=>{fetch("/signalk-mareas-ihm/api/settings").then(U=>U.ok?U.json():null).then(U=>{U?.lang&&U.lang!==C&&(O(U.lang),localStorage.setItem("ihm-visor-lang",U.lang))}).catch(()=>{}),fetch("/signalk-mareas-ihm/api/paths").then(U=>U.ok?U.json():null).then(U=>{U?.iteration?w(U.iteration):U?.version&&w("v"+U.version)}).catch(()=>{})},[]);const Q=U=>{O(U),localStorage.setItem("ihm-visor-lang",U),fetch("/signalk-mareas-ihm/api/settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({lang:U})}).catch(()=>{})};return u.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"linear-gradient(135deg,#0a1e32 0%,#1a3a5c 50%,#0d2844 100%)",color:"#fff",fontFamily:"-apple-system,BlinkMacSystemFont,sans-serif",padding:"20px"},children:[u.jsxs("div",{style:{position:"absolute",top:"16px",right:"16px",display:"flex",gap:"6px"},children:[u.jsx("button",{onClick:()=>Q("es"),style:{background:"none",border:C==="es"?"2px solid rgba(255,255,255,.6)":"2px solid transparent",borderRadius:"6px",padding:"3px 6px",cursor:"pointer",fontSize:"24px",opacity:C==="es"?1:.4},children:"🇪🇸"}),u.jsx("button",{onClick:()=>Q("en"),style:{background:"none",border:C==="en"?"2px solid rgba(255,255,255,.6)":"2px solid transparent",borderRadius:"6px",padding:"3px 6px",cursor:"pointer",fontSize:"24px",opacity:C==="en"?1:.4},children:"🇬🇧"})]}),u.jsx("div",{style:{fontSize:"80px",marginBottom:"10px"},children:"⚓"}),u.jsx("h1",{style:{fontSize:"28px",fontWeight:800,color:"#ff9800",margin:"0 0 6px"},children:R("titulo")}),u.jsx("p",{style:{fontSize:"15px",opacity:.7,margin:"0 0 30px",textAlign:"center"},children:R("subtitulo")}),u.jsxs("div",{style:{display:"flex",gap:"16px",flexWrap:"wrap",justifyContent:"center"},children:[u.jsxs("button",{onClick:()=>g("mareas"),style:{width:"220px",padding:"24px 16px",background:"rgba(255,255,255,.08)",border:"2px solid rgba(255,255,255,.2)",borderRadius:"16px",color:"#fff",cursor:"pointer",textAlign:"center",transition:"all .2s"},onMouseOver:U=>{U.target.style.borderColor="#4dd0ff",U.target.style.background="rgba(77,208,255,.1)"},onMouseOut:U=>{U.target.style.borderColor="rgba(255,255,255,.2)",U.target.style.background="rgba(255,255,255,.08)"},children:[u.jsx("div",{style:{fontSize:"48px",marginBottom:"8px"},children:"🌊"}),u.jsx("div",{style:{fontSize:"18px",fontWeight:700},children:R("mareas")}),u.jsx("div",{style:{fontSize:"13px",opacity:.6,marginTop:"4px"},children:R("mareas_desc")})]}),u.jsxs("button",{onClick:()=>g("fondeo"),style:{width:"220px",padding:"24px 16px",background:"rgba(255,152,0,.1)",border:"2px solid #ff9800",borderRadius:"16px",color:"#fff",cursor:"pointer",textAlign:"center",transition:"all .2s"},onMouseOver:U=>{U.target.style.background="rgba(255,152,0,.2)"},onMouseOut:U=>{U.target.style.background="rgba(255,152,0,.1)"},children:[u.jsx("div",{style:{fontSize:"48px",marginBottom:"8px"},children:"🗺️"}),u.jsx("div",{style:{fontSize:"18px",fontWeight:700,color:"#ff9800"},children:R("fondeo")}),u.jsx("div",{style:{fontSize:"13px",opacity:.6,marginTop:"4px"},children:R("fondeo_desc")})]})]}),u.jsxs("p",{style:{fontSize:"11px",opacity:.3,marginTop:"30px"},children:["signalk-mareas-ihm ",m," · © IHM"]})]})}function iv(){const[g]=z.useState(()=>window.location.pathname.includes("/mareas")?"mareas":null);return z.useEffect(()=>{const C=window.devicePixelRatio||1;let O=C;if(window.outerWidth>0&&window.innerWidth>0){const w=window.outerWidth/window.innerWidth;w>1.05&&w<5&&(O=C/w)}function m(){const R=(window.devicePixelRatio||1)/O,Q=Math.abs(R-1)>.05?1/R:1;document.documentElement.style.setProperty("--zoom-fix",String(Q))}return m(),window.addEventListener("resize",m),()=>window.removeEventListener("resize",m)},[]),g?u.jsx(lv,{}):u.jsx(nv,{onSelect:C=>{C==="fondeo"?window.location.href="/signalk-mareas-ihm/visorfondeo":window.location.href="/signalk-mareas-ihm/mareas"}})}Ng.createRoot(document.getElementById("app")).render(u.jsx(z.StrictMode,{children:u.jsx(iv,{})}));
package/public/index.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <link rel="icon" type="image/svg+xml" href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgcm9sZT0iaW1nIiBhcmlhLWxhYmVsPSJNQVJFQVMgKElITSkiPgogIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCIgcng9IjE0IiBmaWxsPSIjMDQzODRhIi8+CiAgPCEtLSBzdW4gLS0+CiAgPGNpcmNsZSBjeD0iNDgiIGN5PSIxOCIgcj0iNiIgZmlsbD0iI2ZmZDE2NiIvPgogIDwhLS0gaXNsYW5kIC0tPgogIDxwYXRoIGQ9Ik0xOCA0MGM2LTYgMTYtNiAyMiAwIiBmaWxsPSIjMGU2YjRmIi8+CiAgPHBhdGggZD0iTTEyIDQyYzEwLTggMzAtOCA0MCAwdjZIMTJ6IiBmaWxsPSIjMGU2YjRmIi8+CiAgPCEtLSBsaWdodGhvdXNlIC0tPgogIDxyZWN0IHg9IjI4IiB5PSIyNCIgd2lkdGg9IjgiIGhlaWdodD0iMTgiIHJ4PSIyIiBmaWxsPSIjZmZmZmZmIi8+CiAgPHJlY3QgeD0iMjciIHk9IjIyIiB3aWR0aD0iMTAiIGhlaWdodD0iNCIgcng9IjIiIGZpbGw9IiNmZjRiNGIiLz4KICA8cGF0aCBkPSJNMzIgMThsNiA0SDI2eiIgZmlsbD0iI2ZmZmZmZiIvPgogIDwhLS0gd2F2ZXMgLS0+CiAgPHBhdGggZD0iTTEwIDUwYzQgMCA0LTIgOC0yczQgMiA4IDIgNC0yIDgtMiA0IDIgOCAyIDQtMiA4LTIiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzFhYTZiNyIgc3Ryb2tlLXdpZHRoPSI0IiBzdHJva2UtbGluZWNhcD0icm91bmQiLz4KICA8cGF0aCBkPSJNMTAgNTZjNCAwIDQtMiA4LTJzNCAyIDggMiA0LTIgOC0yIDQgMiA4IDIgNC0yIDgtMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMWFhNmI3IiBzdHJva2Utd2lkdGg9IjQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgb3BhY2l0eT0iMC45Ii8+Cjwvc3ZnPgo=" />
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
8
  <title>Mareas (IHM)</title>
9
- <script type="module" crossorigin src="./assets/index-kT_SYLTG.js"></script>
9
+ <script type="module" crossorigin src="./assets/index-DBqAtYPk.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="./assets/index-Bx9W9sDs.css">
11
11
  </head>
12
12