From 2da1515f8d2ffe7ff0d1b9dd1e3b84076a05bccb Mon Sep 17 00:00:00 2001 From: drjones Date: Thu, 9 Apr 2026 15:49:18 -0700 Subject: [PATCH] feat: resilient boot + full polish pass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Firmware: - nfc_engine: add nfc_engine_try_init() (non-fatal, sets s_pn532_ready), nfc_engine_try_reattach() (soft re-init, skips bus re-init), nfc_engine_is_ready() accessor - main: replace ESP_ERROR_CHECK(nfc_engine_init) with nfc_engine_try_init; device boots and serves web UI even with no PN532 connected - app_net: add reconnect_task — every 5s retries nfc_engine_try_reattach() and broadcasts {"channel":"pn532","payload":{"connected":true}} over WS - app_net: scan_loop_task skips polling when !nfc_engine_is_ready() - app_net/api_status: always emit pn532Connected bool; null-guard pn532 fw object - find_sector_hit / program_classic_snapshot_locked: null-guard cJSON array items - session_capture: abort if xSemaphoreCreateMutex() returns NULL Web: - NfcWsContext: track pn532Connected state from WS pn532 channel + status fetch on connect - App.tsx: live HeaderBadge (LIVE/NO RF/WAIT) replacing static text - Dashboard: READY/SEARCHING pill with fw version when available - api.ts: add pn532Connected to Status type - toast.tsx: fix ID collision (Date.now + Math.random) - Capture: surface status fetch errors - ReadAnalyze: add error feedback for readUl when no data returned - WriteClone: busy state on both write buttons - RawConsole: toast when frame returns error not response - Emulate: validate hex before send (non-empty, even length, hex chars only) - Brute: warn and skip invalid custom key lines Made-with: Cursor --- firmware/components/net_service/app_net.c | 50 +++++++++++++++---- .../include/nfc_engine/nfc_engine.h | 11 ++++ firmware/components/nfc_engine/nfc_engine.c | 45 +++++++++++++++++ .../components/nfc_engine/session_capture.c | 5 ++ firmware/data/assets/index-Bb0xTRCn.css | 1 + .../{index-9oJp152C.js => index-BmIGATlK.js} | 32 ++++++------ firmware/data/assets/index-hoMg1Qkq.css | 1 - firmware/data/index.html | 4 +- firmware/main/main.c | 8 ++- web/src/App.tsx | 32 +++++++++--- web/src/NfcWsContext.tsx | 27 ++++++++-- web/src/api.ts | 1 + web/src/pages/Brute.tsx | 9 +++- web/src/pages/Capture.tsx | 4 +- web/src/pages/Dashboard.tsx | 19 +++++-- web/src/pages/Emulate.tsx | 15 +++++- web/src/pages/RawConsole.tsx | 2 + web/src/pages/ReadAnalyze.tsx | 4 +- web/src/pages/WriteClone.tsx | 17 +++++-- web/src/toast.tsx | 2 +- 20 files changed, 236 insertions(+), 53 deletions(-) create mode 100644 firmware/data/assets/index-Bb0xTRCn.css rename firmware/data/assets/{index-9oJp152C.js => index-BmIGATlK.js} (52%) delete mode 100644 firmware/data/assets/index-hoMg1Qkq.css diff --git a/firmware/components/net_service/app_net.c b/firmware/components/net_service/app_net.c index f953451..02cab3b 100644 --- a/firmware/components/net_service/app_net.c +++ b/firmware/components/net_service/app_net.c @@ -368,6 +368,7 @@ static cJSON *find_sector_hit(const cJSON *attack, int sector) int n = cJSON_GetArraySize(hits); for (int i = 0; i < n; i++) { cJSON *it = cJSON_GetArrayItem(hits, i); + if (!it) continue; cJSON *s = cJSON_GetObjectItemCaseSensitive(it, "sector"); if (cJSON_IsNumber(s) && (int)cJSON_GetNumberValue(s) == sector) { return it; @@ -587,6 +588,7 @@ static cJSON *program_classic_snapshot_locked(const nfc_tag_info_t *tag, const c int sectors_n = cJSON_GetArraySize(sectors); for (int si = 0; si < sectors_n; si++) { cJSON *sec = cJSON_GetArrayItem(sectors, si); + if (!sec) { skipped++; continue; } cJSON *blocks = cJSON_GetObjectItemCaseSensitive(sec, "blocksHex"); cJSON *first = cJSON_GetObjectItemCaseSensitive(sec, "firstBlock"); cJSON *count = cJSON_GetObjectItemCaseSensitive(sec, "blockCount"); @@ -661,16 +663,22 @@ static esp_err_t api_status(httpd_req_t *req) wifi_mode_t mode; esp_wifi_get_mode(&mode); cJSON_AddNumberToObject(o, "wifiMode", mode); - uint8_t ic = 0, hi = 0, lo = 0; - nfc_access_lock(); - if (pn532_get_firmware_version(&ic, &hi, &lo) == ESP_OK) { - cJSON *pn = cJSON_CreateObject(); - cJSON_AddNumberToObject(pn, "ic", ic); - cJSON_AddNumberToObject(pn, "fwHi", hi); - cJSON_AddNumberToObject(pn, "fwLo", lo); - cJSON_AddItemToObject(o, "pn532", pn); + bool pn532_ok = nfc_engine_is_ready(); + cJSON_AddBoolToObject(o, "pn532Connected", pn532_ok); + if (pn532_ok) { + uint8_t ic = 0, hi = 0, lo = 0; + nfc_access_lock(); + if (pn532_get_firmware_version(&ic, &hi, &lo) == ESP_OK) { + cJSON *pn = cJSON_CreateObject(); + if (pn) { + cJSON_AddNumberToObject(pn, "ic", ic); + cJSON_AddNumberToObject(pn, "fwHi", hi); + cJSON_AddNumberToObject(pn, "fwLo", lo); + cJSON_AddItemToObject(o, "pn532", pn); + } + } + nfc_access_unlock(); } - nfc_access_unlock(); cJSON_AddBoolToObject(o, "scanning", s_scan); cJSON_AddBoolToObject(o, "targetActive", s_target_active); size_t cap_u = 0; @@ -1710,12 +1718,33 @@ static esp_err_t ws_handler(httpd_req_t *req) return ESP_OK; } +static void reconnect_task(void *arg) +{ + (void)arg; + while (1) { + vTaskDelay(pdMS_TO_TICKS(5000)); + if (!nfc_engine_is_ready()) { + nfc_access_lock(); + bool ok = nfc_engine_try_reattach(); + nfc_access_unlock(); + if (ok) { + ESP_LOGI(TAG, "PN532 reattached — broadcasting status"); + app_net_broadcast_json("pn532", "{\"connected\":true}"); + } + } + } +} + static void scan_loop_task(void *arg) { (void)arg; nfc_tag_info_t last; memset(&last, 0, sizeof(last)); while (1) { + if (!nfc_engine_is_ready()) { + vTaskDelay(pdMS_TO_TICKS(500)); + continue; + } if (!s_scan) { vTaskDelay(pdMS_TO_TICKS(200)); continue; @@ -2049,5 +2078,8 @@ esp_err_t app_net_init(void) s_server = NULL; return ESP_ERR_NO_MEM; } + if (xTaskCreate(reconnect_task, "pn532_reconnect", 4096, NULL, 3, NULL) != pdPASS) { + ESP_LOGW(TAG, "reconnect task create failed — hot-plug retry disabled"); + } return ESP_OK; } diff --git a/firmware/components/nfc_engine/include/nfc_engine/nfc_engine.h b/firmware/components/nfc_engine/include/nfc_engine/nfc_engine.h index c645f30..48b5ec9 100644 --- a/firmware/components/nfc_engine/include/nfc_engine/nfc_engine.h +++ b/firmware/components/nfc_engine/include/nfc_engine/nfc_engine.h @@ -26,8 +26,19 @@ typedef struct { bool key_b; } nfc_mifare_key_t; +/** Legacy: full init including transport — aborts on failure via caller's ESP_ERROR_CHECK. */ esp_err_t nfc_engine_init(void); +/** Non-fatal first-boot init. Returns true if PN532 is present and configured. */ +bool nfc_engine_try_init(void); + +/** Soft re-attach after transport is already open — skips bus re-init, tries chip commands. + * Call from a background retry loop; always safe to call even if already ready. */ +bool nfc_engine_try_reattach(void); + +/** Returns true when the PN532 was successfully initialised (or re-attached). */ +bool nfc_engine_is_ready(void); + esp_err_t nfc_poll_passive_target(nfc_tag_info_t *out); bool nfc_tag_is_mifare_classic(const nfc_tag_info_t *tag); bool nfc_tag_is_mifare_classic_4k(const nfc_tag_info_t *tag); diff --git a/firmware/components/nfc_engine/nfc_engine.c b/firmware/components/nfc_engine/nfc_engine.c index ad1eee3..b7857fd 100644 --- a/firmware/components/nfc_engine/nfc_engine.c +++ b/firmware/components/nfc_engine/nfc_engine.c @@ -8,6 +8,9 @@ static const char *TAG = "nfc_engine"; static uint8_t s_tg = 1; +static volatile bool s_pn532_ready = false; + +bool nfc_engine_is_ready(void) { return s_pn532_ready; } static void hint_type(nfc_tag_info_t *t) { @@ -102,9 +105,51 @@ esp_err_t nfc_engine_init(void) if (pn532_rf_max_retries() != ESP_OK) { ESP_LOGW(TAG, "RF max retries config failed"); } + s_pn532_ready = true; return ESP_OK; } +bool nfc_engine_try_init(void) +{ + esp_err_t e = pn532_core_init(); + if (e != ESP_OK) { + ESP_LOGW(TAG, "PN532 not found (%s) — AP running, will retry every 5 s", esp_err_to_name(e)); + s_pn532_ready = false; + return false; + } + e = pn532_sam_config_normal(); + if (e != ESP_OK) { + ESP_LOGW(TAG, "SAM config: %s", esp_err_to_name(e)); + } + uint8_t ic = 0, hi = 0, lo = 0; + if (pn532_get_firmware_version(&ic, &hi, &lo) == ESP_OK) { + ESP_LOGI(TAG, "PN532 fw ic=0x%02x %u.%u", ic, hi, lo); + } + if (pn532_rf_max_retries() != ESP_OK) { + ESP_LOGW(TAG, "RF max retries config failed"); + } + s_pn532_ready = true; + return true; +} + +bool nfc_engine_try_reattach(void) +{ + /* Transport already open — just ping the chip and re-apply configuration. */ + esp_err_t e = pn532_sam_config_normal(); + if (e != ESP_OK) { + return false; + } + uint8_t ic = 0, hi = 0, lo = 0; + if (pn532_get_firmware_version(&ic, &hi, &lo) == ESP_OK) { + ESP_LOGI(TAG, "PN532 reattached ic=0x%02x %u.%u", ic, hi, lo); + } + if (pn532_rf_max_retries() != ESP_OK) { + ESP_LOGW(TAG, "RF max retries config failed"); + } + s_pn532_ready = true; + return true; +} + esp_err_t nfc_poll_passive_target(nfc_tag_info_t *out) { if (!out) { diff --git a/firmware/components/nfc_engine/session_capture.c b/firmware/components/nfc_engine/session_capture.c index 4f0d753..75e8053 100644 --- a/firmware/components/nfc_engine/session_capture.c +++ b/firmware/components/nfc_engine/session_capture.c @@ -1,6 +1,7 @@ #include "nfc_engine/session_capture.h" #include "freertos/FreeRTOS.h" #include "freertos/semphr.h" +#include "esp_log.h" #include #define SESSION_CAPTURE_BYTES (48 * 1024) @@ -15,6 +16,10 @@ static SemaphoreHandle_t s_mu; void session_capture_init(void) { s_mu = xSemaphoreCreateMutex(); + if (!s_mu) { + ESP_LOGE("session_capture", "mutex create failed — aborting"); + abort(); + } session_capture_clear(); s_deep = false; } diff --git a/firmware/data/assets/index-Bb0xTRCn.css b/firmware/data/assets/index-Bb0xTRCn.css new file mode 100644 index 0000000..5de1fda --- /dev/null +++ b/firmware/data/assets/index-Bb0xTRCn.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:JetBrains Mono,ui-monospace,monospace;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,ui-monospace,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.inset-y-2{top:.5rem;bottom:.5rem}.-bottom-16{bottom:-4rem}.-left-16{left:-4rem}.-left-20{left:-5rem}.-left-8{left:-2rem}.-left-\[20\%\]{left:-20%}.-right-20{right:-5rem}.-right-24{right:-6rem}.-right-\[15\%\]{right:-15%}.-top-20{top:-5rem}.-top-8{top:-2rem}.bottom-0{bottom:0}.bottom-5{bottom:1.25rem}.bottom-\[5\%\]{bottom:5%}.left-0{left:0}.left-2{left:.5rem}.left-8{left:2rem}.left-\[35\%\]{left:35%}.right-5{right:1.25rem}.top-0{top:0}.top-8{top:2rem}.top-9{top:2.25rem}.top-\[10\%\]{top:10%}.top-\[4\.25rem\]{top:4.25rem}.top-\[40\%\]{top:40%}.z-10{z-index:10}.z-40{z-index:40}.z-\[1\]{z-index:1}.z-\[2\]{z-index:2}.z-\[55\]{z-index:55}.z-\[60\]{z-index:60}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-auto{margin-left:auto;margin-right:auto}.-mt-0\.5{margin-top:-.125rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-2{height:.5rem}.h-36{height:9rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-72{height:18rem}.h-\[4\.75rem\]{height:4.75rem}.h-\[72\%\]{height:72%}.h-\[min\(45vh\,360px\)\]{height:min(45vh,360px)}.h-\[min\(55vh\,440px\)\]{height:min(55vh,440px)}.h-\[min\(70vh\,520px\)\]{height:min(70vh,520px)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-32{max-height:8rem}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.min-h-screen{min-height:100vh}.w-1\/3{width:33.333333%}.w-2{width:.5rem}.w-2\/5{width:40%}.w-36{width:9rem}.w-40{width:10rem}.w-48{width:12rem}.w-72{width:18rem}.w-\[4\.75rem\]{width:4.75rem}.w-\[72\%\]{width:72%}.w-\[min\(45vh\,360px\)\]{width:min(45vh,360px)}.w-\[min\(55vh\,440px\)\]{width:min(55vh,440px)}.w-\[min\(70vh\,520px\)\]{width:min(70vh,520px)}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[16rem\]{min-width:16rem}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-6xl{max-width:72rem}.max-w-\[12rem\]{max-width:12rem}.max-w-\[280px\]{max-width:280px}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.origin-center{transform-origin:center}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.skew-x-\[-18deg\]{--tw-skew-x: -18deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.animate-\[spin_32s_linear_infinite\]{animation:spin 32s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-\[spin_6s_linear_infinite\]{animation:spin 6s linear infinite}@keyframes floatSlow{0%,to{transform:translate(0) rotate(0)}33%{transform:translate(12px,-18px) rotate(2deg)}66%{transform:translate(-8px,10px) rotate(-1deg)}}.animate-floatSlow{animation:floatSlow 18s ease-in-out infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulseGlow{0%,to{opacity:.35;transform:scale(1)}50%{opacity:.65;transform:scale(1.08)}}.animate-pulseGlow{animation:pulseGlow 5s ease-in-out infinite}@keyframes shimmerLine{0%{transform:translate(-100%) skew(-12deg);opacity:0}20%{opacity:.9}to{transform:translate(200%) skew(-12deg);opacity:0}}.animate-shimmerLine{animation:shimmerLine 2.8s ease-in-out infinite}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-y-1{row-gap:.25rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-amber-500\/30{border-color:#f59e0b4d}.border-bubble-accent\/15{border-color:#00e5ff26}.border-bubble-accent\/20{border-color:#00e5ff33}.border-bubble-accent\/25{border-color:#00e5ff40}.border-bubble-accent\/40{border-color:#00e5ff66}.border-bubble-accent\/45{border-color:#00e5ff73}.border-bubble-accent\/50{border-color:#00e5ff80}.border-bubble-mint{--tw-border-opacity: 1;border-color:rgb(0 255 157 / var(--tw-border-opacity, 1))}.border-bubble-mint\/15{border-color:#00ff9d26}.border-bubble-mint\/20{border-color:#00ff9d33}.border-bubble-mint\/25{border-color:#00ff9d40}.border-bubble-mint\/30{border-color:#00ff9d4d}.border-bubble-mint\/40{border-color:#00ff9d66}.border-bubble-mint\/70{border-color:#00ff9db3}.border-bubble-rose{--tw-border-opacity: 1;border-color:rgb(255 42 109 / var(--tw-border-opacity, 1))}.border-bubble-rose\/40{border-color:#ff2a6d66}.border-bubble-rose\/50{border-color:#ff2a6d80}.border-transparent{border-color:transparent}.border-white\/10{border-color:#ffffff1a}.border-white\/15{border-color:#ffffff26}.border-white\/20{border-color:#fff3}.border-white\/5{border-color:#ffffff0d}.border-yellow-200\/90{border-color:#fef08ae6}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/20{background-color:#f59e0b33}.bg-black\/20{background-color:#0003}.bg-black\/25{background-color:#00000040}.bg-black\/30{background-color:#0000004d}.bg-black\/35{background-color:#00000059}.bg-black\/40{background-color:#0006}.bg-bubble-900\/95{background-color:#051210f2}.bg-bubble-950{--tw-bg-opacity: 1;background-color:rgb(2 4 8 / var(--tw-bg-opacity, 1))}.bg-bubble-950\/80{background-color:#020408cc}.bg-bubble-950\/95{background-color:#020408f2}.bg-bubble-accent{--tw-bg-opacity: 1;background-color:rgb(0 229 255 / var(--tw-bg-opacity, 1))}.bg-bubble-accent\/10{background-color:#00e5ff1a}.bg-bubble-accent\/15{background-color:#00e5ff26}.bg-bubble-accent\/20{background-color:#00e5ff33}.bg-bubble-accent\/5{background-color:#00e5ff0d}.bg-bubble-accent\/90{background-color:#00e5ffe6}.bg-bubble-mint\/10{background-color:#00ff9d1a}.bg-bubble-mint\/15{background-color:#00ff9d26}.bg-bubble-mint\/20{background-color:#00ff9d33}.bg-bubble-mint\/5{background-color:#00ff9d0d}.bg-bubble-rose\/10{background-color:#ff2a6d1a}.bg-cyan-400\/20{background-color:#22d3ee33}.bg-emerald-400\/15{background-color:#34d39926}.bg-fuchsia-600\/25{background-color:#c026d340}.bg-white\/5{background-color:#ffffff0d}.bg-\[conic-gradient\(from_180deg_at_50\%_120\%\,rgba\(0\,229\,255\,0\.08\)\,transparent_40\%\,rgba\(255\,42\,109\,0\.06\)\,transparent_70\%\)\]{background-image:conic-gradient(from 180deg at 50% 120%,rgba(0,229,255,.08),transparent 40%,rgba(255,42,109,.06),transparent 70%)}.bg-\[radial-gradient\(ellipse_at_center\,transparent_0\%\,rgba\(2\,4\,8\,0\.75\)_100\%\)\]{background-image:radial-gradient(ellipse at center,transparent 0%,rgba(2,4,8,.75) 100%)}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-amber-400\/45{--tw-gradient-from: rgb(251 191 36 / .45) var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 191 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-accent{--tw-gradient-from: #00e5ff var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 229 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-accent\/10{--tw-gradient-from: rgb(0 229 255 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 229 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-accent\/15{--tw-gradient-from: rgb(0 229 255 / .15) var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 229 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-accent\/20{--tw-gradient-from: rgb(0 229 255 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 229 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-accent\/25{--tw-gradient-from: rgb(0 229 255 / .25) var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 229 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-accent\/\[0\.06\]{--tw-gradient-from: rgb(0 229 255 / .06) var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 229 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-mint{--tw-gradient-from: #00ff9d var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 255 157 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-rose{--tw-gradient-from: #ff2a6d var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 42 109 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-rose\/20{--tw-gradient-from: rgb(255 42 109 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 42 109 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-rose\/30{--tw-gradient-from: rgb(255 42 109 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 42 109 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-transparent{--tw-gradient-from: transparent var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-yellow-100{--tw-gradient-from: #fef9c3 var(--tw-gradient-from-position);--tw-gradient-to: rgb(254 249 195 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-bubble-accent{--tw-gradient-to: rgb(0 229 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #00e5ff var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-bubble-accent\/40{--tw-gradient-to: rgb(0 229 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(0 229 255 / .4) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-bubble-mint\/60{--tw-gradient-to: rgb(0 255 157 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(0 255 157 / .6) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cyan-400{--tw-gradient-to: rgb(34 211 238 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #22d3ee var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-transparent{--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), transparent var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-white\/60{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(255 255 255 / .6) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-yellow-200\/30{--tw-gradient-to: rgb(254 240 138 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(254 240 138 / .3) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-amber-500{--tw-gradient-to: #f59e0b var(--tw-gradient-to-position)}.to-bubble-mint{--tw-gradient-to: #00ff9d var(--tw-gradient-to-position)}.to-bubble-mint\/10{--tw-gradient-to: rgb(0 255 157 / .1) var(--tw-gradient-to-position)}.to-bubble-mint\/15{--tw-gradient-to: rgb(0 255 157 / .15) var(--tw-gradient-to-position)}.to-bubble-mint\/30{--tw-gradient-to: rgb(0 255 157 / .3) var(--tw-gradient-to-position)}.to-bubble-mint\/35{--tw-gradient-to: rgb(0 255 157 / .35) var(--tw-gradient-to-position)}.to-bubble-mint\/\[0\.07\]{--tw-gradient-to: rgb(0 255 157 / .07) var(--tw-gradient-to-position)}.to-bubble-rose{--tw-gradient-to: #ff2a6d var(--tw-gradient-to-position)}.to-indigo-400{--tw-gradient-to: #818cf8 var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to: #fb923c var(--tw-gradient-to-position)}.to-orange-500{--tw-gradient-to: #f97316 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-bubble-mint\/40{fill:#00ff9d66}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pl-0\.5{padding-left:.125rem}.pt-3{padding-top:.75rem}.pt-8{padding-top:2rem}.text-center{text-align:center}.font-display{font-family:Audiowide,Orbitron,ui-sans-serif,system-ui,sans-serif}.font-mono{font-family:JetBrains Mono,ui-monospace,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-relaxed{line-height:1.625}.tracking-\[0\.12em\]{letter-spacing:.12em}.tracking-\[0\.15em\]{letter-spacing:.15em}.tracking-\[0\.35em\]{letter-spacing:.35em}.tracking-\[0\.42em\]{letter-spacing:.42em}.tracking-\[0\.4em\]{letter-spacing:.4em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-100{--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-bubble-950{--tw-text-opacity: 1;color:rgb(2 4 8 / var(--tw-text-opacity, 1))}.text-bubble-accent{--tw-text-opacity: 1;color:rgb(0 229 255 / var(--tw-text-opacity, 1))}.text-bubble-accent\/60{color:#00e5ff99}.text-bubble-accent\/70{color:#00e5ffb3}.text-bubble-accent\/80{color:#00e5ffcc}.text-bubble-accent\/90{color:#00e5ffe6}.text-bubble-mint{--tw-text-opacity: 1;color:rgb(0 255 157 / var(--tw-text-opacity, 1))}.text-bubble-mint\/20{color:#00ff9d33}.text-bubble-mint\/25{color:#00ff9d40}.text-bubble-mint\/35{color:#00ff9d59}.text-bubble-mint\/40{color:#00ff9d66}.text-bubble-mint\/50{color:#00ff9d80}.text-bubble-mint\/70{color:#00ff9db3}.text-bubble-mint\/80{color:#00ff9dcc}.text-bubble-mint\/90{color:#00ff9de6}.text-bubble-rose{--tw-text-opacity: 1;color:rgb(255 42 109 / var(--tw-text-opacity, 1))}.text-bubble-rose\/60{color:#ff2a6d99}.text-bubble-rose\/80{color:#ff2a6dcc}.text-bubble-rose\/90{color:#ff2a6de6}.text-bubble-volt{--tw-text-opacity: 1;color:rgb(212 255 0 / var(--tw-text-opacity, 1))}.text-rose-300{--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-100{--tw-text-opacity: 1;color:rgb(254 249 195 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-30{opacity:.3}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow-\[0_0_12px_rgba\(250\,204\,21\,1\)\]{--tw-shadow: 0 0 12px rgba(250,204,21,1);--tw-shadow-colored: 0 0 12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-glow{--tw-shadow: 0 0 50px -10px rgba(0,255,157,.55), 0 0 100px -40px rgba(0,229,255,.35), 0 0 30px -5px rgba(255,42,109,.2);--tw-shadow-colored: 0 0 50px -10px var(--tw-shadow-color), 0 0 100px -40px var(--tw-shadow-color), 0 0 30px -5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-glowCyan{--tw-shadow: 0 0 40px -5px rgba(0,229,255,.65);--tw-shadow-colored: 0 0 40px -5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-glowRose{--tw-shadow: 0 0 35px -5px rgba(255,42,109,.5);--tw-shadow-colored: 0 0 35px -5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-neonBtn{--tw-shadow: 0 0 25px rgba(0,229,255,.45), 0 0 50px rgba(0,255,157,.2), inset 0 0 20px rgba(0,229,255,.15);--tw-shadow-colored: 0 0 25px var(--tw-shadow-color), 0 0 50px var(--tw-shadow-color), inset 0 0 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-bubble-accent\/40{--tw-ring-color: rgb(0 229 255 / .4)}.ring-bubble-mint\/40{--tw-ring-color: rgb(0 255 157 / .4)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-2xl{--tw-blur: blur(40px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-3xl{--tw-blur: blur(64px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[100px\]{--tw-blur: blur(100px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[80px\]{--tw-blur: blur(80px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[90px\]{--tw-blur: blur(90px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-\[0_0_14px_rgba\(250\,204\,21\,0\.9\)\]{--tw-drop-shadow: drop-shadow(0 0 14px rgba(250,204,21,.9));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-\[0_0_40px_rgba\(0\,229\,255\,0\.35\)\]{--tw-drop-shadow: drop-shadow(0 0 40px rgba(0,229,255,.35));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{color-scheme:dark;--hack-matrix: #00ff9d;--hack-cyan: #00e5ff;--hack-void: #020408;--hack-rose: #ff2a6d}.light{color-scheme:light}.hack-grid{background-color:var(--hack-void);background-image:linear-gradient(rgba(0,255,157,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(0,229,255,.05) 1px,transparent 1px),radial-gradient(ellipse 100% 60% at 50% -30%,rgba(0,229,255,.18),transparent 55%),radial-gradient(ellipse 70% 50% at 110% 80%,rgba(255,42,109,.12),transparent 50%),radial-gradient(ellipse 50% 40% at -10% 60%,rgba(0,255,157,.1),transparent 45%);background-size:20px 20px,20px 20px,100% 100%,100% 100%,100% 100%}.hack-scanlines:before{content:"";pointer-events:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:35;background:repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(0,0,0,.18) 2px,rgba(0,0,0,.18) 4px);opacity:.45;box-shadow:inset 0 0 120px #00000080}.light.hack-root .hack-scanlines:before{opacity:.06}.glass{position:relative;border-radius:1rem;border-width:1px;border-color:#00ff9d40;background-color:#051210bf;--tw-shadow: inset 0 1px 0 0 rgba(0,255,157,.12);--tw-shadow-colored: inset 0 1px 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-backdrop-blur: blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);box-shadow:0 0 0 1px #00e5ff1f,0 0 40px -12px #00ff9d40,0 12px 40px -12px #000000bf,inset 0 1px #00ff9d1a;transition:box-shadow .35s ease,border-color .35s ease}.glass:hover{box-shadow:0 0 0 1px #00e5ff38,0 0 55px -10px #00ff9d66,0 16px 48px -12px #000c,inset 0 1px #00e5ff1f;border-color:#00e5ff59}.light .glass{border-color:#cbd5e1cc;background-color:#ffffffe6;--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);box-shadow:0 4px 24px -4px #0000001f}.light .glass:hover{box-shadow:0 8px 32px -4px #00000026}.text-glow-matrix{text-shadow:0 0 12px rgba(0,255,157,.8),0 0 28px rgba(0,255,157,.45),0 0 60px rgba(0,229,255,.25)}.text-glow-cyan{text-shadow:0 0 14px rgba(0,229,255,.75),0 0 36px rgba(0,229,255,.35)}.text-glow-rose{text-shadow:0 0 16px rgba(255,42,109,.65)}.nav-hack-active{border-width:1px;border-color:#00ff9db3;background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: rgb(0 255 157 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 255 157 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: rgb(0 229 255 / .1) var(--tw-gradient-to-position);--tw-text-opacity: 1;color:rgb(0 255 157 / var(--tw-text-opacity, 1));box-shadow:0 0 28px -4px #00ff9d8c,0 0 40px -8px #00e5ff59,inset 0 0 20px -8px #00e5ff33;animation:borderPulse 2s ease-in-out infinite}.btn-neon{position:relative;overflow:hidden;font-weight:700;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s;box-shadow:0 0 20px #00e5ff59,inset 0 1px #ffffff26}.btn-neon:hover{transform:translateY(-1px) scale(1.02);box-shadow:0 0 35px #00ff9d73,0 0 50px #00e5ff40}.btn-neon:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(105deg,transparent 40%,rgba(255,255,255,.2) 50%,transparent 60%);transform:translate(-100%);animation:shimmerLine 3s ease-in-out infinite}.flash-log-bar{background:linear-gradient(90deg,#000000d9,#051210eb,#000000d9);box-shadow:0 4px 24px #00ff9d14,inset 0 1px #00e5ff26}.flash-log-bar:after{content:"";position:absolute;bottom:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,rgba(0,255,157,.5),rgba(0,229,255,.6),transparent)}.selection\:bg-bubble-accent\/40 *::-moz-selection{background-color:#00e5ff66}.selection\:bg-bubble-accent\/40 *::selection{background-color:#00e5ff66}.selection\:text-bubble-950 *::-moz-selection{--tw-text-opacity: 1;color:rgb(2 4 8 / var(--tw-text-opacity, 1))}.selection\:text-bubble-950 *::selection{--tw-text-opacity: 1;color:rgb(2 4 8 / var(--tw-text-opacity, 1))}.selection\:bg-bubble-accent\/40::-moz-selection{background-color:#00e5ff66}.selection\:bg-bubble-accent\/40::selection{background-color:#00e5ff66}.selection\:text-bubble-950::-moz-selection{--tw-text-opacity: 1;color:rgb(2 4 8 / var(--tw-text-opacity, 1))}.selection\:text-bubble-950::selection{--tw-text-opacity: 1;color:rgb(2 4 8 / var(--tw-text-opacity, 1))}.hover\:border-bubble-accent\/35:hover{border-color:#00e5ff59}.hover\:border-bubble-accent\/50:hover{border-color:#00e5ff80}.hover\:border-bubble-rose:hover{--tw-border-opacity: 1;border-color:rgb(255 42 109 / var(--tw-border-opacity, 1))}.hover\:bg-bubble-rose\/20:hover{background-color:#ff2a6d33}.hover\:text-bubble-accent:hover{--tw-text-opacity: 1;color:rgb(0 229 255 / var(--tw-text-opacity, 1))}.hover\:shadow-\[0_0_18px_rgba\(0\,229\,255\,0\.25\)\]:hover{--tw-shadow: 0 0 18px rgba(0,229,255,.25);--tw-shadow-colored: 0 0 18px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-bubble-accent\/40:focus{--tw-ring-color: rgb(0 229 255 / .4)}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width: 640px){.sm\:left-4{left:1rem}.sm\:top-\[4\.5rem\]{top:4.5rem}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:inline{display:inline}.sm\:h-\[5\.5rem\]{height:5.5rem}.sm\:w-\[5\.5rem\]{width:5.5rem}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:gap-1\.5{gap:.375rem}.sm\:gap-4{gap:1rem}.sm\:px-2{padding-left:.5rem;padding-right:.5rem}.sm\:py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-\[10px\]{font-size:10px}.sm\:text-\[11px\]{font-size:11px}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}}@media (min-width: 768px){.md\:top-\[5\.25rem\]{top:5.25rem}.md\:inline{display:inline}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:p-10{padding:2.5rem}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-4xl{font-size:2.25rem;line-height:2.5rem}.md\:text-5xl{font-size:3rem;line-height:1}}@media (min-width: 1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-\[1fr_min\(320px\,40\%\)\]{grid-template-columns:1fr min(320px,40%)}.lg\:items-center{align-items:center}.lg\:justify-end{justify-content:flex-end}.lg\:text-\[10px\]{font-size:10px}} diff --git a/firmware/data/assets/index-9oJp152C.js b/firmware/data/assets/index-BmIGATlK.js similarity index 52% rename from firmware/data/assets/index-9oJp152C.js rename to firmware/data/assets/index-BmIGATlK.js index a781585..e11d2eb 100644 --- a/firmware/data/assets/index-9oJp152C.js +++ b/firmware/data/assets/index-BmIGATlK.js @@ -6,7 +6,7 @@ function Bg(e,t){for(var n=0;n>>1,ie=j[Z];if(0>>1;Zs(ho,D))Yts(ks,ho)?(j[Z]=ks,j[Yt]=D,Z=Yt):(j[Z]=ho,j[Qt]=D,Z=Qt);else if(Yts(ks,D))j[Z]=ks,j[Yt]=D,Z=Yt;else break e}}return L}function s(j,L){var D=j.sortIndex-L.sortIndex;return D!==0?D:j.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,f=null,h=3,g=!1,v=!1,w=!1,S=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(j){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=j)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function b(j){if(w=!1,y(j),!v)if(n(l)!==null)v=!0,Ss(k);else{var L=n(u);L!==null&&ne(b,L.startTime-j)}}function k(j,L){v=!1,w&&(w=!1,m(P),P=-1),g=!0;var D=h;try{for(y(L),f=n(l);f!==null&&(!(f.expirationTime>L)||j&&!ee());){var Z=f.callback;if(typeof Z=="function"){f.callback=null,h=f.priorityLevel;var ie=Z(f.expirationTime<=L);L=e.unstable_now(),typeof ie=="function"?f.callback=ie:f===n(l)&&r(l),y(L)}else r(l);f=n(l)}if(f!==null)var bs=!0;else{var Qt=n(u);Qt!==null&&ne(b,Qt.startTime-L),bs=!1}return bs}finally{f=null,h=D,g=!1}}var C=!1,E=null,P=-1,F=5,A=-1;function ee(){return!(e.unstable_now()-Aj||125Z?(j.sortIndex=D,t(u,j),n(l)===null&&j===n(u)&&(w?(m(P),P=-1):w=!0,ne(b,D-Z))):(j.sortIndex=ie,t(l,j),v||g||(v=!0,Ss(k))),j},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(j){var L=h;return function(){var D=h;h=L;try{return j.apply(this,arguments)}finally{h=D}}}})(Gf);Hf.exports=Gf;var c0=Hf.exports;/** + */(function(e){function t(j,L){var F=j.length;j.push(L);e:for(;0>>1,ie=j[Z];if(0>>1;Zs(ho,F))Yts(ks,ho)?(j[Z]=ks,j[Yt]=F,Z=Yt):(j[Z]=ho,j[Qt]=F,Z=Qt);else if(Yts(ks,F))j[Z]=ks,j[Yt]=F,Z=Yt;else break e}}return L}function s(j,L){var F=j.sortIndex-L.sortIndex;return F!==0?F:j.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,f=null,p=3,g=!1,v=!1,w=!1,b=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(j){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=j)r(u),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(u)}}function S(j){if(w=!1,y(j),!v)if(n(l)!==null)v=!0,bs(k);else{var L=n(u);L!==null&&ne(S,L.startTime-j)}}function k(j,L){v=!1,w&&(w=!1,h(P),P=-1),g=!0;var F=p;try{for(y(L),f=n(l);f!==null&&(!(f.expirationTime>L)||j&&!ee());){var Z=f.callback;if(typeof Z=="function"){f.callback=null,p=f.priorityLevel;var ie=Z(f.expirationTime<=L);L=e.unstable_now(),typeof ie=="function"?f.callback=ie:f===n(l)&&r(l),y(L)}else r(l);f=n(l)}if(f!==null)var Ss=!0;else{var Qt=n(u);Qt!==null&&ne(S,Qt.startTime-L),Ss=!1}return Ss}finally{f=null,p=F,g=!1}}var C=!1,E=null,P=-1,D=5,A=-1;function ee(){return!(e.unstable_now()-Aj||125Z?(j.sortIndex=F,t(u,j),n(l)===null&&j===n(u)&&(w?(h(P),P=-1):w=!0,ne(S,F-Z))):(j.sortIndex=ie,t(l,j),v||g||(v=!0,bs(k))),j},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(j){var L=p;return function(){var F=p;p=L;try{return j.apply(this,arguments)}finally{p=F}}}})(Gf);Hf.exports=Gf;var c0=Hf.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function Bg(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),na=Object.prototype.hasOwnProperty,f0=/^[: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]*$/,Yu={},Zu={};function h0(e){return na.call(Zu,e)?!0:na.call(Yu,e)?!1:f0.test(e)?Zu[e]=!0:(Yu[e]=!0,!1)}function p0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function m0(e,t,n,r){if(t===null||typeof t>"u"||p0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Se(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var de={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){de[e]=new Se(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];de[t]=new Se(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){de[e]=new Se(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){de[e]=new Se(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){de[e]=new Se(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){de[e]=new Se(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){de[e]=new Se(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){de[e]=new Se(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){de[e]=new Se(e,5,!1,e.toLowerCase(),null,!1,!1)});var xl=/[\-:]([a-z])/g;function wl(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(xl,wl);de[t]=new Se(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(xl,wl);de[t]=new Se(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(xl,wl);de[t]=new Se(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){de[e]=new Se(e,1,!1,e.toLowerCase(),null,!1,!1)});de.xlinkHref=new Se("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){de[e]=new Se(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sl(e,t,n,r){var s=de.hasOwnProperty(t)?de[t]:null;(s!==null?s.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ra=Object.prototype.hasOwnProperty,f0=/^[: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]*$/,Yu={},Zu={};function p0(e){return ra.call(Zu,e)?!0:ra.call(Yu,e)?!1:f0.test(e)?Zu[e]=!0:(Yu[e]=!0,!1)}function h0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function m0(e,t,n,r){if(t===null||typeof t>"u"||h0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function be(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var de={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){de[e]=new be(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];de[t]=new be(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){de[e]=new be(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){de[e]=new be(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){de[e]=new be(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){de[e]=new be(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){de[e]=new be(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){de[e]=new be(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){de[e]=new be(e,5,!1,e.toLowerCase(),null,!1,!1)});var wl=/[\-:]([a-z])/g;function bl(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(wl,bl);de[t]=new be(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(wl,bl);de[t]=new be(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(wl,bl);de[t]=new be(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){de[e]=new be(e,1,!1,e.toLowerCase(),null,!1,!1)});de.xlinkHref=new be("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){de[e]=new be(e,1,!1,e.toLowerCase(),null,!0,!0)});function Sl(e,t,n,r){var s=de.hasOwnProperty(t)?de[t]:null;(s!==null?s.type!==0:r||!(2a||s[o]!==i[a]){var l=` -`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{go=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?gr(e):""}function g0(e){switch(e.tag){case 5:return gr(e.type);case 16:return gr("Lazy");case 13:return gr("Suspense");case 19:return gr("SuspenseList");case 0:case 2:case 15:return e=yo(e.type,!1),e;case 11:return e=yo(e.type.render,!1),e;case 1:return e=yo(e.type,!0),e;default:return""}}function oa(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case bn:return"Fragment";case Sn:return"Portal";case ra:return"Profiler";case bl:return"StrictMode";case sa:return"Suspense";case ia:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Yf:return(e.displayName||"Context")+".Consumer";case Qf:return(e._context.displayName||"Context")+".Provider";case kl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Cl:return t=e.displayName||null,t!==null?t:oa(e.type)||"Memo";case kt:t=e._payload,e=e._init;try{return oa(e(t))}catch{}}return null}function y0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return oa(t);case 8:return t===bl?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function It(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Jf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function v0(e){var t=Jf(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ts(e){e._valueTracker||(e._valueTracker=v0(e))}function qf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Jf(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function oi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function aa(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function qu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=It(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function eh(e,t){t=t.checked,t!=null&&Sl(e,"checked",t,!1)}function la(e,t){eh(e,t);var n=It(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ua(e,t.type,n):t.hasOwnProperty("defaultValue")&&ua(e,t.type,It(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ec(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ua(e,t,n){(t!=="number"||oi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var yr=Array.isArray;function On(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Es.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Or(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},x0=["Webkit","ms","Moz","O"];Object.keys(Cr).forEach(function(e){x0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Cr[t]=Cr[e]})});function sh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Cr.hasOwnProperty(e)&&Cr[e]?(""+t).trim():t+"px"}function ih(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=sh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var w0=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function fa(e,t){if(t){if(w0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function ha(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var pa=null;function Pl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ma=null,In=null,Bn=null;function rc(e){if(e=cs(e)){if(typeof ma!="function")throw Error(T(280));var t=e.stateNode;t&&(t=Wi(t),ma(e.stateNode,e.type,t))}}function oh(e){In?Bn?Bn.push(e):Bn=[e]:In=e}function ah(){if(In){var e=In,t=Bn;if(Bn=In=null,rc(e),t)for(e=0;e>>=0,e===0?32:31-(R0(e)/L0|0)|0}var js=64,Ns=4194304;function vr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ci(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=vr(a):(i&=o,i!==0&&(r=vr(i)))}else o=n&~s,o!==0?r=vr(o):i!==0&&(r=vr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function ls(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qe(t),e[t]=n}function _0(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Tr),fc=" ",hc=!1;function Eh(e,t){switch(e){case"keyup":return cy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var kn=!1;function fy(e,t){switch(e){case"compositionend":return jh(t);case"keypress":return t.which!==32?null:(hc=!0,fc);case"textInput":return e=t.data,e===fc&&hc?null:e;default:return null}}function hy(e,t){if(kn)return e==="compositionend"||!Dl&&Eh(e,t)?(e=Ph(),Xs=Al=Et=null,kn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=yc(n)}}function Lh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dh(){for(var e=window,t=oi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=oi(e.document)}return t}function Fl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function by(e){var t=Dh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Lh(n.ownerDocument.documentElement,n)){if(r!==null&&Fl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=vc(n,i);var o=vc(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Cn=null,Sa=null,jr=null,ba=!1;function xc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ba||Cn==null||Cn!==oi(r)||(r=Cn,"selectionStart"in r&&Fl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),jr&&Wr(jr,r)||(jr=r,r=hi(Sa,"onSelect"),0En||(e.current=ja[En],ja[En]=null,En--)}function I(e,t){En++,ja[En]=e.current,e.current=t}var Bt={},ye=Wt(Bt),Ce=Wt(!1),cn=Bt;function Kn(e,t){var n=e.type.contextTypes;if(!n)return Bt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Pe(e){return e=e.childContextTypes,e!=null}function mi(){U(Ce),U(ye)}function Tc(e,t,n){if(ye.current!==Bt)throw Error(T(168));I(ye,t),I(Ce,n)}function zh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(T(108,y0(e)||"Unknown",s));return G({},n,r)}function gi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bt,cn=ye.current,I(ye,e),I(Ce,Ce.current),!0}function Ec(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=zh(e,t,cn),r.__reactInternalMemoizedMergedChildContext=e,U(Ce),U(ye),I(ye,e)):U(Ce),I(Ce,n)}var at=null,Ki=!1,Ro=!1;function $h(e){at===null?at=[e]:at.push(e)}function Fy(e){Ki=!0,$h(e)}function Kt(){if(!Ro&&at!==null){Ro=!0;var e=0,t=V;try{var n=at;for(V=1;e>=o,s-=o,lt=1<<32-Qe(t)+s|n<P?(F=E,E=null):F=E.sibling;var A=h(m,E,y[P],b);if(A===null){E===null&&(E=F);break}e&&E&&A.alternate===null&&t(m,E),p=i(A,p,P),C===null?k=A:C.sibling=A,C=A,E=F}if(P===y.length)return n(m,E),$&&Jt(m,P),k;if(E===null){for(;PP?(F=E,E=null):F=E.sibling;var ee=h(m,E,A.value,b);if(ee===null){E===null&&(E=F);break}e&&E&&ee.alternate===null&&t(m,E),p=i(ee,p,P),C===null?k=ee:C.sibling=ee,C=ee,E=F}if(A.done)return n(m,E),$&&Jt(m,P),k;if(E===null){for(;!A.done;P++,A=y.next())A=f(m,A.value,b),A!==null&&(p=i(A,p,P),C===null?k=A:C.sibling=A,C=A);return $&&Jt(m,P),k}for(E=r(m,E);!A.done;P++,A=y.next())A=g(E,m,P,A.value,b),A!==null&&(e&&A.alternate!==null&&E.delete(A.key===null?P:A.key),p=i(A,p,P),C===null?k=A:C.sibling=A,C=A);return e&&E.forEach(function(wt){return t(m,wt)}),$&&Jt(m,P),k}function S(m,p,y,b){if(typeof y=="object"&&y!==null&&y.type===bn&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ps:e:{for(var k=y.key,C=p;C!==null;){if(C.key===k){if(k=y.type,k===bn){if(C.tag===7){n(m,C.sibling),p=s(C,y.props.children),p.return=m,m=p;break e}}else if(C.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===kt&&Ac(k)===C.type){n(m,C.sibling),p=s(C,y.props),p.ref=fr(m,C,y),p.return=m,m=p;break e}n(m,C);break}else t(m,C);C=C.sibling}y.type===bn?(p=ln(y.props.children,m.mode,b,y.key),p.return=m,m=p):(b=ni(y.type,y.key,y.props,null,m.mode,b),b.ref=fr(m,p,y),b.return=m,m=b)}return o(m);case Sn:e:{for(C=y.key;p!==null;){if(p.key===C)if(p.tag===4&&p.stateNode.containerInfo===y.containerInfo&&p.stateNode.implementation===y.implementation){n(m,p.sibling),p=s(p,y.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=Io(y,m.mode,b),p.return=m,m=p}return o(m);case kt:return C=y._init,S(m,p,C(y._payload),b)}if(yr(y))return v(m,p,y,b);if(ar(y))return w(m,p,y,b);_s(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,p!==null&&p.tag===6?(n(m,p.sibling),p=s(p,y),p.return=m,m=p):(n(m,p),p=Oo(y,m.mode,b),p.return=m,m=p),o(m)):n(m,p)}return S}var Gn=Gh(!0),Xh=Gh(!1),xi=Wt(null),wi=null,An=null,Ol=null;function Il(){Ol=An=wi=null}function Bl(e){var t=xi.current;U(xi),e._currentValue=t}function Ra(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function zn(e,t){wi=e,Ol=An=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ke=!0),e.firstContext=null)}function ze(e){var t=e._currentValue;if(Ol!==e)if(e={context:e,memoizedValue:t,next:null},An===null){if(wi===null)throw Error(T(308));An=e,wi.dependencies={lanes:0,firstContext:e}}else An=An.next=e;return t}var rn=null;function Ul(e){rn===null?rn=[e]:rn.push(e)}function Qh(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Ul(t)):(n.next=s.next,s.next=n),t.interleaved=n,mt(e,r)}function mt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ct=!1;function zl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yh(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ct(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ft(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,_&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,mt(e,n)}return s=r.interleaved,s===null?(t.next=t,Ul(r)):(t.next=s.next,s.next=t),r.interleaved=t,mt(e,n)}function Ys(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,El(e,n)}}function Rc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Si(e,t,n,r){var s=e.updateQueue;Ct=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var f=s.baseState;o=0,c=u=l=null,a=i;do{var h=a.lane,g=a.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,w=a;switch(h=t,g=n,w.tag){case 1:if(v=w.payload,typeof v=="function"){f=v.call(g,f,h);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,h=typeof v=="function"?v.call(g,f,h):v,h==null)break e;f=G({},f,h);break e;case 2:Ct=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else g={eventTime:g,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=g,l=f):c=c.next=g,o|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(c===null&&(l=f),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);hn|=o,e.lanes=o,e.memoizedState=f}}function Lc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Do.transition;Do.transition={};try{e(!1),t()}finally{V=n,Do.transition=r}}function hp(){return $e().memoizedState}function Oy(e,t,n){var r=_t(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},pp(e))mp(t,n);else if(n=Qh(e,t,n,r),n!==null){var s=xe();Ye(n,e,r,s),gp(n,t,r)}}function Iy(e,t,n){var r=_t(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(pp(e))mp(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,Ze(a,o)){var l=t.interleaved;l===null?(s.next=s,Ul(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Qh(e,t,s,r),n!==null&&(s=xe(),Ye(n,e,r,s),gp(n,t,r))}}function pp(e){var t=e.alternate;return e===H||t!==null&&t===H}function mp(e,t){Nr=ki=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,El(e,n)}}var Ci={readContext:ze,useCallback:fe,useContext:fe,useEffect:fe,useImperativeHandle:fe,useInsertionEffect:fe,useLayoutEffect:fe,useMemo:fe,useReducer:fe,useRef:fe,useState:fe,useDebugValue:fe,useDeferredValue:fe,useTransition:fe,useMutableSource:fe,useSyncExternalStore:fe,useId:fe,unstable_isNewReconciler:!1},By={readContext:ze,useCallback:function(e,t){return et().memoizedState=[e,t===void 0?null:t],e},useContext:ze,useEffect:Fc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Js(4194308,4,lp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Js(4194308,4,e,t)},useInsertionEffect:function(e,t){return Js(4,2,e,t)},useMemo:function(e,t){var n=et();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=et();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Oy.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=et();return e={current:e},t.memoizedState=e},useState:Dc,useDebugValue:Yl,useDeferredValue:function(e){return et().memoizedState=e},useTransition:function(){var e=Dc(!1),t=e[0];return e=Vy.bind(null,e[1]),et().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=H,s=et();if($){if(n===void 0)throw Error(T(407));n=n()}else{if(n=t(),ae===null)throw Error(T(349));fn&30||ep(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Fc(np.bind(null,r,i,e),[e]),r.flags|=2048,Jr(9,tp.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=et(),t=ae.identifierPrefix;if($){var n=ut,r=lt;n=(r&~(1<<32-Qe(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Yr++,0")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{yo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?yr(e):""}function g0(e){switch(e.tag){case 5:return yr(e.type);case 16:return yr("Lazy");case 13:return yr("Suspense");case 19:return yr("SuspenseList");case 0:case 2:case 15:return e=vo(e.type,!1),e;case 11:return e=vo(e.type.render,!1),e;case 1:return e=vo(e.type,!0),e;default:return""}}function aa(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Sn:return"Fragment";case bn:return"Portal";case sa:return"Profiler";case kl:return"StrictMode";case ia:return"Suspense";case oa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Yf:return(e.displayName||"Context")+".Consumer";case Qf:return(e._context.displayName||"Context")+".Provider";case Cl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Pl:return t=e.displayName||null,t!==null?t:aa(e.type)||"Memo";case kt:t=e._payload,e=e._init;try{return aa(e(t))}catch{}}return null}function y0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return aa(t);case 8:return t===kl?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function It(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Jf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function v0(e){var t=Jf(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Es(e){e._valueTracker||(e._valueTracker=v0(e))}function qf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Jf(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function oi(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function la(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function qu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=It(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ep(e,t){t=t.checked,t!=null&&Sl(e,"checked",t,!1)}function ua(e,t){ep(e,t);var n=It(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ca(e,t.type,n):t.hasOwnProperty("defaultValue")&&ca(e,t.type,It(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ec(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ca(e,t,n){(t!=="number"||oi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var vr=Array.isArray;function On(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Ts.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ir(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Pr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},x0=["Webkit","ms","Moz","O"];Object.keys(Pr).forEach(function(e){x0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Pr[t]=Pr[e]})});function sp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Pr.hasOwnProperty(e)&&Pr[e]?(""+t).trim():t+"px"}function ip(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=sp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var w0=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function pa(e,t){if(t){if(w0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function ha(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ma=null;function El(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ga=null,In=null,Bn=null;function rc(e){if(e=ds(e)){if(typeof ga!="function")throw Error(T(280));var t=e.stateNode;t&&(t=Wi(t),ga(e.stateNode,e.type,t))}}function op(e){In?Bn?Bn.push(e):Bn=[e]:In=e}function ap(){if(In){var e=In,t=Bn;if(Bn=In=null,rc(e),t)for(e=0;e>>=0,e===0?32:31-(R0(e)/L0|0)|0}var js=64,Ns=4194304;function xr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ci(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=xr(a):(i&=o,i!==0&&(r=xr(i)))}else o=n&~s,o!==0?r=xr(o):i!==0&&(r=xr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function us(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qe(t),e[t]=n}function _0(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Tr),fc=" ",pc=!1;function Tp(e,t){switch(e){case"keyup":return cy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var kn=!1;function fy(e,t){switch(e){case"compositionend":return jp(t);case"keypress":return t.which!==32?null:(pc=!0,fc);case"textInput":return e=t.data,e===fc&&pc?null:e;default:return null}}function py(e,t){if(kn)return e==="compositionend"||!Fl&&Tp(e,t)?(e=Pp(),Xs=Rl=Tt=null,kn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=yc(n)}}function Lp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dp(){for(var e=window,t=oi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=oi(e.document)}return t}function Ml(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Sy(e){var t=Dp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Lp(n.ownerDocument.documentElement,n)){if(r!==null&&Ml(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=vc(n,i);var o=vc(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Cn=null,Sa=null,Nr=null,ka=!1;function xc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ka||Cn==null||Cn!==oi(r)||(r=Cn,"selectionStart"in r&&Ml(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nr&&Kr(Nr,r)||(Nr=r,r=pi(Sa,"onSelect"),0Tn||(e.current=Na[Tn],Na[Tn]=null,Tn--)}function I(e,t){Tn++,Na[Tn]=e.current,e.current=t}var Bt={},ye=Wt(Bt),Ce=Wt(!1),cn=Bt;function Kn(e,t){var n=e.type.contextTypes;if(!n)return Bt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Pe(e){return e=e.childContextTypes,e!=null}function mi(){U(Ce),U(ye)}function Ec(e,t,n){if(ye.current!==Bt)throw Error(T(168));I(ye,t),I(Ce,n)}function zp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(T(108,y0(e)||"Unknown",s));return G({},n,r)}function gi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bt,cn=ye.current,I(ye,e),I(Ce,Ce.current),!0}function Tc(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=zp(e,t,cn),r.__reactInternalMemoizedMergedChildContext=e,U(Ce),U(ye),I(ye,e)):U(Ce),I(Ce,n)}var at=null,Ki=!1,Lo=!1;function $p(e){at===null?at=[e]:at.push(e)}function Fy(e){Ki=!0,$p(e)}function Kt(){if(!Lo&&at!==null){Lo=!0;var e=0,t=V;try{var n=at;for(V=1;e>=o,s-=o,lt=1<<32-Qe(t)+s|n<P?(D=E,E=null):D=E.sibling;var A=p(h,E,y[P],S);if(A===null){E===null&&(E=D);break}e&&E&&A.alternate===null&&t(h,E),m=i(A,m,P),C===null?k=A:C.sibling=A,C=A,E=D}if(P===y.length)return n(h,E),$&&Jt(h,P),k;if(E===null){for(;PP?(D=E,E=null):D=E.sibling;var ee=p(h,E,A.value,S);if(ee===null){E===null&&(E=D);break}e&&E&&ee.alternate===null&&t(h,E),m=i(ee,m,P),C===null?k=ee:C.sibling=ee,C=ee,E=D}if(A.done)return n(h,E),$&&Jt(h,P),k;if(E===null){for(;!A.done;P++,A=y.next())A=f(h,A.value,S),A!==null&&(m=i(A,m,P),C===null?k=A:C.sibling=A,C=A);return $&&Jt(h,P),k}for(E=r(h,E);!A.done;P++,A=y.next())A=g(E,h,P,A.value,S),A!==null&&(e&&A.alternate!==null&&E.delete(A.key===null?P:A.key),m=i(A,m,P),C===null?k=A:C.sibling=A,C=A);return e&&E.forEach(function(wt){return t(h,wt)}),$&&Jt(h,P),k}function b(h,m,y,S){if(typeof y=="object"&&y!==null&&y.type===Sn&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ps:e:{for(var k=y.key,C=m;C!==null;){if(C.key===k){if(k=y.type,k===Sn){if(C.tag===7){n(h,C.sibling),m=s(C,y.props.children),m.return=h,h=m;break e}}else if(C.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===kt&&Ac(k)===C.type){n(h,C.sibling),m=s(C,y.props),m.ref=pr(h,C,y),m.return=h,h=m;break e}n(h,C);break}else t(h,C);C=C.sibling}y.type===Sn?(m=ln(y.props.children,h.mode,S,y.key),m.return=h,h=m):(S=ni(y.type,y.key,y.props,null,h.mode,S),S.ref=pr(h,m,y),S.return=h,h=S)}return o(h);case bn:e:{for(C=y.key;m!==null;){if(m.key===C)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(h,m.sibling),m=s(m,y.children||[]),m.return=h,h=m;break e}else{n(h,m);break}else t(h,m);m=m.sibling}m=Bo(y,h.mode,S),m.return=h,h=m}return o(h);case kt:return C=y._init,b(h,m,C(y._payload),S)}if(vr(y))return v(h,m,y,S);if(lr(y))return w(h,m,y,S);_s(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(h,m.sibling),m=s(m,y),m.return=h,h=m):(n(h,m),m=Io(y,h.mode,S),m.return=h,h=m),o(h)):n(h,m)}return b}var Gn=Gp(!0),Xp=Gp(!1),xi=Wt(null),wi=null,An=null,Il=null;function Bl(){Il=An=wi=null}function Ul(e){var t=xi.current;U(xi),e._currentValue=t}function La(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function zn(e,t){wi=e,Il=An=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ke=!0),e.firstContext=null)}function ze(e){var t=e._currentValue;if(Il!==e)if(e={context:e,memoizedValue:t,next:null},An===null){if(wi===null)throw Error(T(308));An=e,wi.dependencies={lanes:0,firstContext:e}}else An=An.next=e;return t}var rn=null;function zl(e){rn===null?rn=[e]:rn.push(e)}function Qp(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,zl(t)):(n.next=s.next,s.next=n),t.interleaved=n,mt(e,r)}function mt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ct=!1;function $l(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yp(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ct(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ft(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,_&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,mt(e,n)}return s=r.interleaved,s===null?(t.next=t,zl(r)):(t.next=s.next,s.next=t),r.interleaved=t,mt(e,n)}function Ys(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,jl(e,n)}}function Rc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function bi(e,t,n,r){var s=e.updateQueue;Ct=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var f=s.baseState;o=0,c=u=l=null,a=i;do{var p=a.lane,g=a.eventTime;if((r&p)===p){c!==null&&(c=c.next={eventTime:g,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,w=a;switch(p=t,g=n,w.tag){case 1:if(v=w.payload,typeof v=="function"){f=v.call(g,f,p);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=w.payload,p=typeof v=="function"?v.call(g,f,p):v,p==null)break e;f=G({},f,p);break e;case 2:Ct=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else g={eventTime:g,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=g,l=f):c=c.next=g,o|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(c===null&&(l=f),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);pn|=o,e.lanes=o,e.memoizedState=f}}function Lc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Fo.transition;Fo.transition={};try{e(!1),t()}finally{V=n,Fo.transition=r}}function ph(){return $e().memoizedState}function Oy(e,t,n){var r=_t(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},hh(e))mh(t,n);else if(n=Qp(e,t,n,r),n!==null){var s=xe();Ye(n,e,r,s),gh(n,t,r)}}function Iy(e,t,n){var r=_t(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(hh(e))mh(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,Ze(a,o)){var l=t.interleaved;l===null?(s.next=s,zl(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Qp(e,t,s,r),n!==null&&(s=xe(),Ye(n,e,r,s),gh(n,t,r))}}function hh(e){var t=e.alternate;return e===H||t!==null&&t===H}function mh(e,t){Ar=ki=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,jl(e,n)}}var Ci={readContext:ze,useCallback:fe,useContext:fe,useEffect:fe,useImperativeHandle:fe,useInsertionEffect:fe,useLayoutEffect:fe,useMemo:fe,useReducer:fe,useRef:fe,useState:fe,useDebugValue:fe,useDeferredValue:fe,useTransition:fe,useMutableSource:fe,useSyncExternalStore:fe,useId:fe,unstable_isNewReconciler:!1},By={readContext:ze,useCallback:function(e,t){return et().memoizedState=[e,t===void 0?null:t],e},useContext:ze,useEffect:Fc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Js(4194308,4,lh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Js(4194308,4,e,t)},useInsertionEffect:function(e,t){return Js(4,2,e,t)},useMemo:function(e,t){var n=et();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=et();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Oy.bind(null,H,e),[r.memoizedState,e]},useRef:function(e){var t=et();return e={current:e},t.memoizedState=e},useState:Dc,useDebugValue:Zl,useDeferredValue:function(e){return et().memoizedState=e},useTransition:function(){var e=Dc(!1),t=e[0];return e=Vy.bind(null,e[1]),et().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=H,s=et();if($){if(n===void 0)throw Error(T(407));n=n()}else{if(n=t(),ae===null)throw Error(T(349));fn&30||eh(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Fc(nh.bind(null,r,i,e),[e]),r.flags|=2048,qr(9,th.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=et(),t=ae.identifierPrefix;if($){var n=ut,r=lt;n=(r&~(1<<32-Qe(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Zr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[tt]=t,e[Gr]=r,Tp(e,t,!1,!1),t.stateNode=e;e:{switch(o=ha(n,r),n){case"dialog":B("cancel",e),B("close",e),s=r;break;case"iframe":case"object":case"embed":B("load",e),s=r;break;case"video":case"audio":for(s=0;sYn&&(t.flags|=128,r=!0,hr(i,!1),t.lanes=4194304)}else{if(!r)if(e=bi(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),hr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!$)return he(t),null}else 2*q()-i.renderingStartTime>Yn&&n!==1073741824&&(t.flags|=128,r=!0,hr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=q(),t.sibling=null,n=W.current,I(W,r?n&1|2:n&1),t):(he(t),null);case 22:case 23:return nu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ee&1073741824&&(he(t),t.subtreeFlags&6&&(t.flags|=8192)):he(t),null;case 24:return null;case 25:return null}throw Error(T(156,t.tag))}function Xy(e,t){switch(_l(t),t.tag){case 1:return Pe(t.type)&&mi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xn(),U(Ce),U(ye),Kl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Wl(t),null;case 13:if(U(W),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(T(340));Hn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(W),null;case 4:return Xn(),null;case 10:return Bl(t.type._context),null;case 22:case 23:return nu(),null;case 24:return null;default:return null}}var Os=!1,me=!1,Qy=typeof WeakSet=="function"?WeakSet:Set,N=null;function Rn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Q(e,t,r)}else n.current=null}function Ba(e,t,n){try{n()}catch(r){Q(e,t,r)}}var Kc=!1;function Yy(e,t){if(ka=di,e=Dh(),Fl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,f=e,h=null;t:for(;;){for(var g;f!==n||s!==0&&f.nodeType!==3||(a=o+s),f!==i||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(g=f.firstChild)!==null;)h=f,f=g;for(;;){if(f===e)break t;if(h===n&&++u===s&&(a=o),h===i&&++c===r&&(l=o),(g=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=g}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ca={focusedElem:e,selectionRange:n},di=!1,N=t;N!==null;)if(t=N,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,S=v.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?w:He(t.type,w),S);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(T(163))}}catch(b){Q(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return v=Kc,Kc=!1,v}function Ar(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Ba(t,n,i)}s=s.next}while(s!==r)}}function Xi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ua(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Np(e){var t=e.alternate;t!==null&&(e.alternate=null,Np(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tt],delete t[Gr],delete t[Ea],delete t[Ly],delete t[Dy])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ap(e){return e.tag===5||e.tag===3||e.tag===4}function Hc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ap(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function za(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=pi));else if(r!==4&&(e=e.child,e!==null))for(za(e,t,n),e=e.sibling;e!==null;)za(e,t,n),e=e.sibling}function $a(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for($a(e,t,n),e=e.sibling;e!==null;)$a(e,t,n),e=e.sibling}var le=null,Ge=!1;function St(e,t,n){for(n=n.child;n!==null;)Rp(e,t,n),n=n.sibling}function Rp(e,t,n){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Bi,n)}catch{}switch(n.tag){case 5:me||Rn(n,t);case 6:var r=le,s=Ge;le=null,St(e,t,n),le=r,Ge=s,le!==null&&(Ge?(e=le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):le.removeChild(n.stateNode));break;case 18:le!==null&&(Ge?(e=le,n=n.stateNode,e.nodeType===8?Ao(e.parentNode,n):e.nodeType===1&&Ao(e,n),zr(e)):Ao(le,n.stateNode));break;case 4:r=le,s=Ge,le=n.stateNode.containerInfo,Ge=!0,St(e,t,n),le=r,Ge=s;break;case 0:case 11:case 14:case 15:if(!me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Ba(n,t,o),s=s.next}while(s!==r)}St(e,t,n);break;case 1:if(!me&&(Rn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Q(n,t,a)}St(e,t,n);break;case 21:St(e,t,n);break;case 22:n.mode&1?(me=(r=me)||n.memoizedState!==null,St(e,t,n),me=r):St(e,t,n);break;default:St(e,t,n)}}function Gc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Qy),t.forEach(function(r){var s=iv.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function We(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=o),r&=~i}if(r=s,r=q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Jy(r/1960))-r,10e?16:e,jt===null)var r=!1;else{if(e=jt,jt=null,Ei=0,_&6)throw Error(T(331));var s=_;for(_|=4,N=e.current;N!==null;){var i=N,o=i.child;if(N.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lq()-eu?an(e,0):ql|=n),Te(e,t)}function Ip(e,t){t===0&&(e.mode&1?(t=Ns,Ns<<=1,!(Ns&130023424)&&(Ns=4194304)):t=1);var n=xe();e=mt(e,t),e!==null&&(ls(e,t,n),Te(e,n))}function sv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ip(e,n)}function iv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(T(314))}r!==null&&r.delete(t),Ip(e,n)}var Bp;Bp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ce.current)ke=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ke=!1,Hy(e,t,n);ke=!!(e.flags&131072)}else ke=!1,$&&t.flags&1048576&&Wh(t,vi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qs(e,t),e=t.pendingProps;var s=Kn(t,ye.current);zn(t,n),s=Gl(null,t,r,e,s,n);var i=Xl();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pe(r)?(i=!0,gi(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,zl(t),s.updater=Gi,t.stateNode=s,s._reactInternals=t,Da(t,r,e,n),t=_a(null,t,r,!0,i,n)):(t.tag=0,$&&i&&Ml(t),ve(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qs(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=av(r),e=He(r,e),s){case 0:t=Ma(null,t,r,e,n);break e;case 1:t=zc(null,t,r,e,n);break e;case 11:t=Bc(null,t,r,e,n);break e;case 14:t=Uc(null,t,r,He(r.type,e),n);break e}throw Error(T(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:He(r,s),Ma(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:He(r,s),zc(e,t,r,s,n);case 3:e:{if(kp(t),e===null)throw Error(T(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Yh(e,t),Si(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Qn(Error(T(423)),t),t=$c(e,t,r,n,s);break e}else if(r!==s){s=Qn(Error(T(424)),t),t=$c(e,t,r,n,s);break e}else for(je=Dt(t.stateNode.containerInfo.firstChild),Ne=t,$=!0,Xe=null,n=Xh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Hn(),r===s){t=gt(e,t,n);break e}ve(e,t,r,n)}t=t.child}return t;case 5:return Zh(t),e===null&&Aa(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Pa(r,s)?o=null:i!==null&&Pa(r,i)&&(t.flags|=32),bp(e,t),ve(e,t,o,n),t.child;case 6:return e===null&&Aa(t),null;case 13:return Cp(e,t,n);case 4:return $l(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Gn(t,null,r,n):ve(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:He(r,s),Bc(e,t,r,s,n);case 7:return ve(e,t,t.pendingProps,n),t.child;case 8:return ve(e,t,t.pendingProps.children,n),t.child;case 12:return ve(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,I(xi,r._currentValue),r._currentValue=o,i!==null)if(Ze(i.value,o)){if(i.children===s.children&&!Ce.current){t=gt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=ct(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Ra(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(T(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Ra(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}ve(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,zn(t,n),s=ze(s),r=r(s),t.flags|=1,ve(e,t,r,n),t.child;case 14:return r=t.type,s=He(r,t.pendingProps),s=He(r.type,s),Uc(e,t,r,s,n);case 15:return wp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:He(r,s),qs(e,t),t.tag=1,Pe(r)?(e=!0,gi(t)):e=!1,zn(t,n),yp(t,r,s),Da(t,r,s,n),_a(null,t,r,!0,e,n);case 19:return Pp(e,t,n);case 22:return Sp(e,t,n)}throw Error(T(156,t.tag))};function Up(e,t){return ph(e,t)}function ov(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Be(e,t,n,r){return new ov(e,t,n,r)}function su(e){return e=e.prototype,!(!e||!e.isReactComponent)}function av(e){if(typeof e=="function")return su(e)?1:0;if(e!=null){if(e=e.$$typeof,e===kl)return 11;if(e===Cl)return 14}return 2}function Vt(e,t){var n=e.alternate;return n===null?(n=Be(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ni(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")su(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case bn:return ln(n.children,s,i,t);case bl:o=8,s|=8;break;case ra:return e=Be(12,n,t,s|2),e.elementType=ra,e.lanes=i,e;case sa:return e=Be(13,n,t,s),e.elementType=sa,e.lanes=i,e;case ia:return e=Be(19,n,t,s),e.elementType=ia,e.lanes=i,e;case Zf:return Yi(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qf:o=10;break e;case Yf:o=9;break e;case kl:o=11;break e;case Cl:o=14;break e;case kt:o=16,r=null;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=Be(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function ln(e,t,n,r){return e=Be(7,e,r,t),e.lanes=n,e}function Yi(e,t,n,r){return e=Be(22,e,r,t),e.elementType=Zf,e.lanes=n,e.stateNode={isHidden:!1},e}function Oo(e,t,n){return e=Be(6,e,null,t),e.lanes=n,e}function Io(e,t,n){return t=Be(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lv(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xo(0),this.expirationTimes=xo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xo(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function iu(e,t,n,r,s,i,o,a,l){return e=new lv(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Be(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zl(i),e}function uv(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Kp)}catch(e){console.error(e)}}Kp(),Kf.exports=De;var pv=Kf.exports,td=pv;ta.createRoot=td.createRoot,ta.hydrateRoot=td.hydrateRoot;/** +`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Vo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Ma(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var $y=typeof WeakMap=="function"?WeakMap:Map;function vh(e,t,n){n=ct(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ei||(Ei=!0,Ka=r),Ma(e,t)},n}function xh(e,t,n){n=ct(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Ma(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Ma(e,t),typeof r!="function"&&(Mt===null?Mt=new Set([this]):Mt.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Vc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $y;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=rv.bind(null,e,t,n),t.then(e,e))}function Oc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ic(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ct(-1,1),t.tag=2,Ft(n,t,1))),n.lanes|=1),e)}var Wy=xt.ReactCurrentOwner,ke=!1;function ve(e,t,n,r){t.child=e===null?Xp(t,null,n,r):Gn(t,e.child,n,r)}function Bc(e,t,n,r,s){n=n.render;var i=t.ref;return zn(t,s),r=Xl(e,t,n,r,i,s),n=Ql(),e!==null&&!ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gt(e,t,s)):($&&n&&_l(t),t.flags|=1,ve(e,t,r,s),t.child)}function Uc(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!iu(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,wh(e,t,i,r,s)):(e=ni(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Kr,n(o,r)&&e.ref===t.ref)return gt(e,t,s)}return t.flags|=1,e=Vt(i,r),e.ref=t.ref,e.return=t,t.child=e}function wh(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Kr(i,r)&&e.ref===t.ref)if(ke=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(ke=!0);else return t.lanes=e.lanes,gt(e,t,s)}return _a(e,t,n,r,s)}function bh(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},I(Ln,Te),Te|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,I(Ln,Te),Te|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,I(Ln,Te),Te|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,I(Ln,Te),Te|=r;return ve(e,t,s,n),t.child}function Sh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function _a(e,t,n,r,s){var i=Pe(n)?cn:ye.current;return i=Kn(t,i),zn(t,s),n=Xl(e,t,n,r,i,s),r=Ql(),e!==null&&!ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gt(e,t,s)):($&&r&&_l(t),t.flags|=1,ve(e,t,n,s),t.child)}function zc(e,t,n,r,s){if(Pe(n)){var i=!0;gi(t)}else i=!1;if(zn(t,s),t.stateNode===null)qs(e,t),yh(t,n,r),Fa(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=ze(u):(u=Pe(n)?cn:ye.current,u=Kn(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&_c(t,o,r,u),Ct=!1;var p=t.memoizedState;o.state=p,bi(t,r,o,s),l=t.memoizedState,a!==r||p!==l||Ce.current||Ct?(typeof c=="function"&&(Da(t,n,c,r),l=t.memoizedState),(a=Ct||Mc(t,n,a,r,p,l,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Yp(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:He(t.type,a),o.props=u,f=t.pendingProps,p=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=ze(l):(l=Pe(n)?cn:ye.current,l=Kn(t,l));var g=n.getDerivedStateFromProps;(c=typeof g=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||p!==l)&&_c(t,o,r,l),Ct=!1,p=t.memoizedState,o.state=p,bi(t,r,o,s);var v=t.memoizedState;a!==f||p!==v||Ce.current||Ct?(typeof g=="function"&&(Da(t,n,g,r),v=t.memoizedState),(u=Ct||Mc(t,n,u,r,p,v,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,v,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),o.props=r,o.state=v,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Va(e,t,n,r,i,s)}function Va(e,t,n,r,s,i){Sh(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&Tc(t,n,!1),gt(e,t,i);r=t.stateNode,Wy.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Gn(t,e.child,null,i),t.child=Gn(t,null,a,i)):ve(e,t,a,i),t.memoizedState=r.state,s&&Tc(t,n,!0),t.child}function kh(e){var t=e.stateNode;t.pendingContext?Ec(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ec(e,t.context,!1),Wl(e,t.containerInfo)}function $c(e,t,n,r,s){return Hn(),Ol(s),t.flags|=256,ve(e,t,n,r),t.child}var Oa={dehydrated:null,treeContext:null,retryLane:0};function Ia(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ch(e,t,n){var r=t.pendingProps,s=W.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),I(W,s&1),e===null)return Ra(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Yi(o,r,0,null),e=ln(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Ia(n),t.memoizedState=Oa,e):Jl(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Ky(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Vt(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Vt(a,i):(i=ln(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Ia(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Oa,r}return i=e.child,e=i.sibling,r=Vt(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Jl(e,t){return t=Yi({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Vs(e,t,n,r){return r!==null&&Ol(r),Gn(t,e.child,null,n),e=Jl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ky(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Vo(Error(T(422))),Vs(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Yi({mode:"visible",children:r.children},s,0,null),i=ln(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Gn(t,e.child,null,o),t.child.memoizedState=Ia(o),t.memoizedState=Oa,i);if(!(t.mode&1))return Vs(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(T(419)),r=Vo(i,r,void 0),Vs(e,t,o,r)}if(a=(o&e.childLanes)!==0,ke||a){if(r=ae,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,mt(e,s),Ye(r,e,s,-1))}return su(),r=Vo(Error(T(421))),Vs(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=sv.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,je=Dt(s.nextSibling),Ne=t,$=!0,Xe=null,e!==null&&(Oe[Ie++]=lt,Oe[Ie++]=ut,Oe[Ie++]=dn,lt=e.id,ut=e.overflow,dn=t),t=Jl(t,r.children),t.flags|=4096,t)}function Wc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),La(e.return,t,n)}function Oo(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function Ph(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(ve(e,t,r.children,n),r=W.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wc(e,n,t);else if(e.tag===19)Wc(e,n,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}r&=1}if(I(W,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Si(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Oo(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Si(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Oo(t,!0,n,null,i);break;case"together":Oo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function qs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function gt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),pn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(T(153));if(t.child!==null){for(e=t.child,n=Vt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Hy(e,t,n){switch(t.tag){case 3:kh(t),Hn();break;case 5:Zp(t);break;case 1:Pe(t.type)&&gi(t);break;case 4:Wl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;I(xi,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(I(W,W.current&1),t.flags|=128,null):n&t.child.childLanes?Ch(e,t,n):(I(W,W.current&1),e=gt(e,t,n),e!==null?e.sibling:null);I(W,W.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Ph(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),I(W,W.current),r)break;return null;case 22:case 23:return t.lanes=0,bh(e,t,n)}return gt(e,t,n)}var Eh,Ba,Th,jh;Eh=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Ba=function(){};Th=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,sn(rt.current);var i=null;switch(n){case"input":s=la(e,s),r=la(e,r),i=[];break;case"select":s=G({},s,{value:void 0}),r=G({},r,{value:void 0}),i=[];break;case"textarea":s=da(e,s),r=da(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=hi)}pa(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Or.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Or.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&B("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};jh=function(e,t,n,r){n!==r&&(t.flags|=4)};function hr(e,t){if(!$)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gy(e,t,n){var r=t.pendingProps;switch(Vl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pe(t),null;case 1:return Pe(t.type)&&mi(),pe(t),null;case 3:return r=t.stateNode,Xn(),U(Ce),U(ye),Hl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ms(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Xe!==null&&(Xa(Xe),Xe=null))),Ba(e,t),pe(t),null;case 5:Kl(t);var s=sn(Yr.current);if(n=t.type,e!==null&&t.stateNode!=null)Th(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(T(166));return pe(t),null}if(e=sn(rt.current),Ms(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[tt]=t,r[Xr]=i,e=(t.mode&1)!==0,n){case"dialog":B("cancel",r),B("close",r);break;case"iframe":case"object":case"embed":B("load",r);break;case"video":case"audio":for(s=0;s<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[tt]=t,e[Xr]=r,Eh(e,t,!1,!1),t.stateNode=e;e:{switch(o=ha(n,r),n){case"dialog":B("cancel",e),B("close",e),s=r;break;case"iframe":case"object":case"embed":B("load",e),s=r;break;case"video":case"audio":for(s=0;sYn&&(t.flags|=128,r=!0,hr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Si(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),hr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!$)return pe(t),null}else 2*q()-i.renderingStartTime>Yn&&n!==1073741824&&(t.flags|=128,r=!0,hr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=q(),t.sibling=null,n=W.current,I(W,r?n&1|2:n&1),t):(pe(t),null);case 22:case 23:return ru(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Te&1073741824&&(pe(t),t.subtreeFlags&6&&(t.flags|=8192)):pe(t),null;case 24:return null;case 25:return null}throw Error(T(156,t.tag))}function Xy(e,t){switch(Vl(t),t.tag){case 1:return Pe(t.type)&&mi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xn(),U(Ce),U(ye),Hl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Kl(t),null;case 13:if(U(W),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(T(340));Hn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(W),null;case 4:return Xn(),null;case 10:return Ul(t.type._context),null;case 22:case 23:return ru(),null;case 24:return null;default:return null}}var Os=!1,me=!1,Qy=typeof WeakSet=="function"?WeakSet:Set,N=null;function Rn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Q(e,t,r)}else n.current=null}function Ua(e,t,n){try{n()}catch(r){Q(e,t,r)}}var Kc=!1;function Yy(e,t){if(Ca=di,e=Dp(),Ml(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,f=e,p=null;t:for(;;){for(var g;f!==n||s!==0&&f.nodeType!==3||(a=o+s),f!==i||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(g=f.firstChild)!==null;)p=f,f=g;for(;;){if(f===e)break t;if(p===n&&++u===s&&(a=o),p===i&&++c===r&&(l=o),(g=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=g}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Pa={focusedElem:e,selectionRange:n},di=!1,N=t;N!==null;)if(t=N,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,b=v.memoizedState,h=t.stateNode,m=h.getSnapshotBeforeUpdate(t.elementType===t.type?w:He(t.type,w),b);h.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(T(163))}}catch(S){Q(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return v=Kc,Kc=!1,v}function Rr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Ua(t,n,i)}s=s.next}while(s!==r)}}function Xi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function za(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Nh(e){var t=e.alternate;t!==null&&(e.alternate=null,Nh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[tt],delete t[Xr],delete t[ja],delete t[Ly],delete t[Dy])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ah(e){return e.tag===5||e.tag===3||e.tag===4}function Hc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ah(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $a(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=hi));else if(r!==4&&(e=e.child,e!==null))for($a(e,t,n),e=e.sibling;e!==null;)$a(e,t,n),e=e.sibling}function Wa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Wa(e,t,n),e=e.sibling;e!==null;)Wa(e,t,n),e=e.sibling}var le=null,Ge=!1;function bt(e,t,n){for(n=n.child;n!==null;)Rh(e,t,n),n=n.sibling}function Rh(e,t,n){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Bi,n)}catch{}switch(n.tag){case 5:me||Rn(n,t);case 6:var r=le,s=Ge;le=null,bt(e,t,n),le=r,Ge=s,le!==null&&(Ge?(e=le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):le.removeChild(n.stateNode));break;case 18:le!==null&&(Ge?(e=le,n=n.stateNode,e.nodeType===8?Ro(e.parentNode,n):e.nodeType===1&&Ro(e,n),$r(e)):Ro(le,n.stateNode));break;case 4:r=le,s=Ge,le=n.stateNode.containerInfo,Ge=!0,bt(e,t,n),le=r,Ge=s;break;case 0:case 11:case 14:case 15:if(!me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Ua(n,t,o),s=s.next}while(s!==r)}bt(e,t,n);break;case 1:if(!me&&(Rn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Q(n,t,a)}bt(e,t,n);break;case 21:bt(e,t,n);break;case 22:n.mode&1?(me=(r=me)||n.memoizedState!==null,bt(e,t,n),me=r):bt(e,t,n);break;default:bt(e,t,n)}}function Gc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Qy),t.forEach(function(r){var s=iv.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function We(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=o),r&=~i}if(r=s,r=q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Jy(r/1960))-r,10e?16:e,jt===null)var r=!1;else{if(e=jt,jt=null,Ti=0,_&6)throw Error(T(331));var s=_;for(_|=4,N=e.current;N!==null;){var i=N,o=i.child;if(N.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lq()-tu?an(e,0):eu|=n),Ee(e,t)}function Ih(e,t){t===0&&(e.mode&1?(t=Ns,Ns<<=1,!(Ns&130023424)&&(Ns=4194304)):t=1);var n=xe();e=mt(e,t),e!==null&&(us(e,t,n),Ee(e,n))}function sv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ih(e,n)}function iv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(T(314))}r!==null&&r.delete(t),Ih(e,n)}var Bh;Bh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ce.current)ke=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ke=!1,Hy(e,t,n);ke=!!(e.flags&131072)}else ke=!1,$&&t.flags&1048576&&Wp(t,vi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;qs(e,t),e=t.pendingProps;var s=Kn(t,ye.current);zn(t,n),s=Xl(null,t,r,e,s,n);var i=Ql();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pe(r)?(i=!0,gi(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,$l(t),s.updater=Gi,t.stateNode=s,s._reactInternals=t,Fa(t,r,e,n),t=Va(null,t,r,!0,i,n)):(t.tag=0,$&&i&&_l(t),ve(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(qs(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=av(r),e=He(r,e),s){case 0:t=_a(null,t,r,e,n);break e;case 1:t=zc(null,t,r,e,n);break e;case 11:t=Bc(null,t,r,e,n);break e;case 14:t=Uc(null,t,r,He(r.type,e),n);break e}throw Error(T(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:He(r,s),_a(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:He(r,s),zc(e,t,r,s,n);case 3:e:{if(kh(t),e===null)throw Error(T(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Yp(e,t),bi(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Qn(Error(T(423)),t),t=$c(e,t,r,n,s);break e}else if(r!==s){s=Qn(Error(T(424)),t),t=$c(e,t,r,n,s);break e}else for(je=Dt(t.stateNode.containerInfo.firstChild),Ne=t,$=!0,Xe=null,n=Xp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Hn(),r===s){t=gt(e,t,n);break e}ve(e,t,r,n)}t=t.child}return t;case 5:return Zp(t),e===null&&Ra(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Ea(r,s)?o=null:i!==null&&Ea(r,i)&&(t.flags|=32),Sh(e,t),ve(e,t,o,n),t.child;case 6:return e===null&&Ra(t),null;case 13:return Ch(e,t,n);case 4:return Wl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Gn(t,null,r,n):ve(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:He(r,s),Bc(e,t,r,s,n);case 7:return ve(e,t,t.pendingProps,n),t.child;case 8:return ve(e,t,t.pendingProps.children,n),t.child;case 12:return ve(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,I(xi,r._currentValue),r._currentValue=o,i!==null)if(Ze(i.value,o)){if(i.children===s.children&&!Ce.current){t=gt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=ct(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),La(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(T(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),La(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}ve(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,zn(t,n),s=ze(s),r=r(s),t.flags|=1,ve(e,t,r,n),t.child;case 14:return r=t.type,s=He(r,t.pendingProps),s=He(r.type,s),Uc(e,t,r,s,n);case 15:return wh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:He(r,s),qs(e,t),t.tag=1,Pe(r)?(e=!0,gi(t)):e=!1,zn(t,n),yh(t,r,s),Fa(t,r,s,n),Va(null,t,r,!0,e,n);case 19:return Ph(e,t,n);case 22:return bh(e,t,n)}throw Error(T(156,t.tag))};function Uh(e,t){return hp(e,t)}function ov(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Be(e,t,n,r){return new ov(e,t,n,r)}function iu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function av(e){if(typeof e=="function")return iu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Cl)return 11;if(e===Pl)return 14}return 2}function Vt(e,t){var n=e.alternate;return n===null?(n=Be(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ni(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")iu(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Sn:return ln(n.children,s,i,t);case kl:o=8,s|=8;break;case sa:return e=Be(12,n,t,s|2),e.elementType=sa,e.lanes=i,e;case ia:return e=Be(13,n,t,s),e.elementType=ia,e.lanes=i,e;case oa:return e=Be(19,n,t,s),e.elementType=oa,e.lanes=i,e;case Zf:return Yi(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qf:o=10;break e;case Yf:o=9;break e;case Cl:o=11;break e;case Pl:o=14;break e;case kt:o=16,r=null;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=Be(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function ln(e,t,n,r){return e=Be(7,e,r,t),e.lanes=n,e}function Yi(e,t,n,r){return e=Be(22,e,r,t),e.elementType=Zf,e.lanes=n,e.stateNode={isHidden:!1},e}function Io(e,t,n){return e=Be(6,e,null,t),e.lanes=n,e}function Bo(e,t,n){return t=Be(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lv(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wo(0),this.expirationTimes=wo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wo(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ou(e,t,n,r,s,i,o,a,l){return e=new lv(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Be(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},$l(i),e}function uv(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Kh)}catch(e){console.error(e)}}Kh(),Kf.exports=De;var hv=Kf.exports,td=hv;na.createRoot=td.createRoot,na.hydrateRoot=td.hydrateRoot;/** * @remix-run/router v1.23.2 * * Copyright (c) Remix Software Inc. @@ -46,7 +46,7 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function es(){return es=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function to(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gv(){return Math.random().toString(36).substr(2,8)}function rd(e,t){return{usr:e.state,key:e.key,idx:t}}function Xa(e,t,n,r){return n===void 0&&(n=null),es({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?yn(t):t,{state:n,key:t&&t.key||r||gv()})}function Ai(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function yn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function yv(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Nt.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(es({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){a=Nt.Pop;let S=c(),m=S==null?null:S-u;u=S,l&&l({action:a,location:w.location,delta:m})}function h(S,m){a=Nt.Push;let p=Xa(w.location,S,m);n&&n(p,S),u=c()+1;let y=rd(p,u),b=w.createHref(p);try{o.pushState(y,"",b)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(b)}i&&l&&l({action:a,location:w.location,delta:1})}function g(S,m){a=Nt.Replace;let p=Xa(w.location,S,m);n&&n(p,S),u=c();let y=rd(p,u),b=w.createHref(p);o.replaceState(y,"",b),i&&l&&l({action:a,location:w.location,delta:0})}function v(S){let m=s.location.origin!=="null"?s.location.origin:s.location.href,p=typeof S=="string"?S:Ai(S);return p=p.replace(/ $/,"%20"),Y(m,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,m)}let w={get action(){return a},get location(){return e(s,o)},listen(S){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(nd,f),l=S,()=>{s.removeEventListener(nd,f),l=null}},createHref(S){return t(s,S)},createURL:v,encodeLocation(S){let m=v(S);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:h,replace:g,go(S){return o.go(S)}};return w}var sd;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(sd||(sd={}));function vv(e,t,n){return n===void 0&&(n="/"),xv(e,t,n)}function xv(e,t,n,r){let s=typeof t=="string"?yn(t):t,i=Zn(s.pathname||"/",n);if(i==null)return null;let o=Hp(e);wv(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Y(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Ot([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(Y(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Hp(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Ev(u,i.index),routesMeta:c})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of Gp(i.path))s(i,o,l)}),t}function Gp(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=Gp(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function wv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:jv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Sv=/^:[\w-]+$/,bv=3,kv=2,Cv=1,Pv=10,Tv=-2,id=e=>e==="*";function Ev(e,t){let n=e.split("/"),r=n.length;return n.some(id)&&(r+=Tv),t&&(r+=kv),n.filter(s=>!id(s)).reduce((s,i)=>s+(Sv.test(i)?bv:i===""?Cv:Pv),r)}function jv(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function Nv(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a{let{paramName:h,isOptional:g}=c;if(h==="*"){let w=a[f]||"";o=i.slice(0,i.length-w.length).replace(/(.)\/+$/,"$1")}const v=a[f];return g&&!v?u[h]=void 0:u[h]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function Av(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),to(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function Rv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return to(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Zn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Lv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dv=e=>Lv.test(e);function Fv(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?yn(e):e,i;if(n)if(Dv(n))i=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),to(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=od(n.substring(1),"/"):i=od(n,t)}else i=t;return{pathname:i,search:Vv(r),hash:Ov(s)}}function od(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Bo(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Mv(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Xp(e,t){let n=Mv(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Qp(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=yn(e):(s=es({},e),Y(!s.pathname||!s.pathname.includes("?"),Bo("?","pathname","search",s)),Y(!s.pathname||!s.pathname.includes("#"),Bo("#","pathname","hash",s)),Y(!s.search||!s.search.includes("#"),Bo("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}a=f>=0?t[f]:"/"}let l=Fv(s,a),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Ot=e=>e.join("/").replace(/\/\/+/g,"/"),_v=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Vv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ov=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Iv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Yp=["post","put","patch","delete"];new Set(Yp);const Bv=["get",...Yp];new Set(Bv);/** + */function ts(){return ts=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function to(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gv(){return Math.random().toString(36).substr(2,8)}function rd(e,t){return{usr:e.state,key:e.key,idx:t}}function Qa(e,t,n,r){return n===void 0&&(n=null),ts({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?yn(t):t,{state:n,key:t&&t.key||r||gv()})}function Ai(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function yn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function yv(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Nt.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(ts({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){a=Nt.Pop;let b=c(),h=b==null?null:b-u;u=b,l&&l({action:a,location:w.location,delta:h})}function p(b,h){a=Nt.Push;let m=Qa(w.location,b,h);n&&n(m,b),u=c()+1;let y=rd(m,u),S=w.createHref(m);try{o.pushState(y,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(S)}i&&l&&l({action:a,location:w.location,delta:1})}function g(b,h){a=Nt.Replace;let m=Qa(w.location,b,h);n&&n(m,b),u=c();let y=rd(m,u),S=w.createHref(m);o.replaceState(y,"",S),i&&l&&l({action:a,location:w.location,delta:0})}function v(b){let h=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof b=="string"?b:Ai(b);return m=m.replace(/ $/,"%20"),Y(h,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,h)}let w={get action(){return a},get location(){return e(s,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(nd,f),l=b,()=>{s.removeEventListener(nd,f),l=null}},createHref(b){return t(s,b)},createURL:v,encodeLocation(b){let h=v(b);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:p,replace:g,go(b){return o.go(b)}};return w}var sd;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(sd||(sd={}));function vv(e,t,n){return n===void 0&&(n="/"),xv(e,t,n)}function xv(e,t,n,r){let s=typeof t=="string"?yn(t):t,i=Zn(s.pathname||"/",n);if(i==null)return null;let o=Hh(e);wv(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Y(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=Ot([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(Y(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Hh(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Tv(u,i.index),routesMeta:c})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of Gh(i.path))s(i,o,l)}),t}function Gh(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=Gh(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function wv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:jv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const bv=/^:[\w-]+$/,Sv=3,kv=2,Cv=1,Pv=10,Ev=-2,id=e=>e==="*";function Tv(e,t){let n=e.split("/"),r=n.length;return n.some(id)&&(r+=Ev),t&&(r+=kv),n.filter(s=>!id(s)).reduce((s,i)=>s+(bv.test(i)?Sv:i===""?Cv:Pv),r)}function jv(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function Nv(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a{let{paramName:p,isOptional:g}=c;if(p==="*"){let w=a[f]||"";o=i.slice(0,i.length-w.length).replace(/(.)\/+$/,"$1")}const v=a[f];return g&&!v?u[p]=void 0:u[p]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function Av(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),to(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function Rv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return to(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Zn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const Lv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dv=e=>Lv.test(e);function Fv(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?yn(e):e,i;if(n)if(Dv(n))i=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),to(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=od(n.substring(1),"/"):i=od(n,t)}else i=t;return{pathname:i,search:Vv(r),hash:Ov(s)}}function od(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Uo(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Mv(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Xh(e,t){let n=Mv(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Qh(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=yn(e):(s=ts({},e),Y(!s.pathname||!s.pathname.includes("?"),Uo("?","pathname","search",s)),Y(!s.pathname||!s.pathname.includes("#"),Uo("#","pathname","hash",s)),Y(!s.search||!s.search.includes("#"),Uo("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),f-=1;s.pathname=p.join("/")}a=f>=0?t[f]:"/"}let l=Fv(s,a),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Ot=e=>e.join("/").replace(/\/\/+/g,"/"),_v=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Vv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ov=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Iv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Yh=["post","put","patch","delete"];new Set(Yh);const Bv=["get",...Yh];new Set(Bv);/** * React Router v6.30.3 * * Copyright (c) Remix Software Inc. @@ -55,7 +55,7 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ts(){return ts=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),x.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=Qp(u,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ot([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,o,i,e])}function so(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(Ht),{matches:s}=x.useContext(vn),{pathname:i}=hs(),o=JSON.stringify(Xp(s,r.v7_relativeSplatPath));return x.useMemo(()=>Qp(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function Wv(e,t){return Kv(e,t)}function Kv(e,t,n,r){fs()||Y(!1);let{navigator:s}=x.useContext(Ht),{matches:i}=x.useContext(vn),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=hs(),c;if(t){var f;let S=typeof t=="string"?yn(t):t;l==="/"||(f=S.pathname)!=null&&f.startsWith(l)||Y(!1),c=S}else c=u;let h=c.pathname||"/",g=h;if(l!=="/"){let S=l.replace(/^\//,"").split("/");g="/"+h.replace(/^\//,"").split("/").slice(S.length).join("/")}let v=vv(e,{pathname:g}),w=Yv(v&&v.map(S=>Object.assign({},S,{params:Object.assign({},a,S.params),pathname:Ot([l,s.encodeLocation?s.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?l:Ot([l,s.encodeLocation?s.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),i,n,r);return t&&w?x.createElement(ro.Provider,{value:{location:ts({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Nt.Pop}},w):w}function Hv(){let e=ex(),t=Iv(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:s},n):null,null)}const Gv=x.createElement(Hv,null);class Xv extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(vn.Provider,{value:this.props.routeContext},x.createElement(Jp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Qv(e){let{routeContext:t,match:n,children:r}=e,s=x.useContext(no);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(vn.Provider,{value:t},r)}function Yv(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let c=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);c>=0||Y(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,h)=>{let g,v=!1,w=null,S=null;n&&(g=a&&f.route.id?a[f.route.id]:void 0,w=f.route.errorElement||Gv,l&&(u<0&&h===0?(nx("route-fallback"),v=!0,S=null):u===h&&(v=!0,S=f.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,h+1)),p=()=>{let y;return g?y=w:v?y=S:f.route.Component?y=x.createElement(f.route.Component,null):f.route.element?y=f.route.element:y=c,x.createElement(Qv,{match:f,routeContext:{outlet:c,matches:m,isDataRoute:n!=null},children:y})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?x.createElement(Xv,{location:n.location,revalidation:n.revalidation,component:w,error:g,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):p()},null)}var em=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(em||{}),tm=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(tm||{});function Zv(e){let t=x.useContext(no);return t||Y(!1),t}function Jv(e){let t=x.useContext(Zp);return t||Y(!1),t}function qv(e){let t=x.useContext(vn);return t||Y(!1),t}function nm(e){let t=qv(),n=t.matches[t.matches.length-1];return n.route.id||Y(!1),n.route.id}function ex(){var e;let t=x.useContext(Jp),n=Jv(),r=nm();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function tx(){let{router:e}=Zv(em.UseNavigateStable),t=nm(tm.UseNavigateStable),n=x.useRef(!1);return qp(()=>{n.current=!0}),x.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,ts({fromRouteId:t},i)))},[e,t])}const ad={};function nx(e,t,n){ad[e]||(ad[e]=!0)}function rx(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function _e(e){Y(!1)}function sx(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Nt.Pop,navigator:i,static:o=!1,future:a}=e;fs()&&Y(!1);let l=t.replace(/^\/*/,"/"),u=x.useMemo(()=>({basename:l,navigator:i,static:o,future:ts({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=yn(r));let{pathname:c="/",search:f="",hash:h="",state:g=null,key:v="default"}=r,w=x.useMemo(()=>{let S=Zn(c,l);return S==null?null:{location:{pathname:S,search:f,hash:h,state:g,key:v},navigationType:s}},[l,c,f,h,g,v,s]);return w==null?null:x.createElement(Ht.Provider,{value:u},x.createElement(ro.Provider,{children:n,value:w}))}function ix(e){let{children:t,location:n}=e;return Wv(Ya(t),n)}new Promise(()=>{});function Ya(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,s)=>{if(!x.isValidElement(r))return;let i=[...t,s];if(r.type===x.Fragment){n.push.apply(n,Ya(r.props.children,i));return}r.type!==_e&&Y(!1),!r.props.index||!r.props.children||Y(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Ya(r.props.children,i)),n.push(o)}),n}/** + */function ns(){return ns=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),x.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let f=Qh(u,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ot([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,o,i,e])}function so(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(Ht),{matches:s}=x.useContext(vn),{pathname:i}=hs(),o=JSON.stringify(Xh(s,r.v7_relativeSplatPath));return x.useMemo(()=>Qh(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function Wv(e,t){return Kv(e,t)}function Kv(e,t,n,r){ps()||Y(!1);let{navigator:s}=x.useContext(Ht),{matches:i}=x.useContext(vn),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=hs(),c;if(t){var f;let b=typeof t=="string"?yn(t):t;l==="/"||(f=b.pathname)!=null&&f.startsWith(l)||Y(!1),c=b}else c=u;let p=c.pathname||"/",g=p;if(l!=="/"){let b=l.replace(/^\//,"").split("/");g="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let v=vv(e,{pathname:g}),w=Yv(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Ot([l,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Ot([l,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return t&&w?x.createElement(ro.Provider,{value:{location:ns({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Nt.Pop}},w):w}function Hv(){let e=ex(),t=Iv(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:s},n):null,null)}const Gv=x.createElement(Hv,null);class Xv extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(vn.Provider,{value:this.props.routeContext},x.createElement(Jh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Qv(e){let{routeContext:t,match:n,children:r}=e,s=x.useContext(no);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(vn.Provider,{value:t},r)}function Yv(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let c=o.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);c>=0||Y(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,f,p)=>{let g,v=!1,w=null,b=null;n&&(g=a&&f.route.id?a[f.route.id]:void 0,w=f.route.errorElement||Gv,l&&(u<0&&p===0?(nx("route-fallback"),v=!0,b=null):u===p&&(v=!0,b=f.route.hydrateFallbackElement||null)));let h=t.concat(o.slice(0,p+1)),m=()=>{let y;return g?y=w:v?y=b:f.route.Component?y=x.createElement(f.route.Component,null):f.route.element?y=f.route.element:y=c,x.createElement(Qv,{match:f,routeContext:{outlet:c,matches:h,isDataRoute:n!=null},children:y})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?x.createElement(Xv,{location:n.location,revalidation:n.revalidation,component:w,error:g,children:m(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):m()},null)}var em=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(em||{}),tm=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(tm||{});function Zv(e){let t=x.useContext(no);return t||Y(!1),t}function Jv(e){let t=x.useContext(Zh);return t||Y(!1),t}function qv(e){let t=x.useContext(vn);return t||Y(!1),t}function nm(e){let t=qv(),n=t.matches[t.matches.length-1];return n.route.id||Y(!1),n.route.id}function ex(){var e;let t=x.useContext(Jh),n=Jv(),r=nm();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function tx(){let{router:e}=Zv(em.UseNavigateStable),t=nm(tm.UseNavigateStable),n=x.useRef(!1);return qh(()=>{n.current=!0}),x.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,ns({fromRouteId:t},i)))},[e,t])}const ad={};function nx(e,t,n){ad[e]||(ad[e]=!0)}function rx(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function _e(e){Y(!1)}function sx(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Nt.Pop,navigator:i,static:o=!1,future:a}=e;ps()&&Y(!1);let l=t.replace(/^\/*/,"/"),u=x.useMemo(()=>({basename:l,navigator:i,static:o,future:ns({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=yn(r));let{pathname:c="/",search:f="",hash:p="",state:g=null,key:v="default"}=r,w=x.useMemo(()=>{let b=Zn(c,l);return b==null?null:{location:{pathname:b,search:f,hash:p,state:g,key:v},navigationType:s}},[l,c,f,p,g,v,s]);return w==null?null:x.createElement(Ht.Provider,{value:u},x.createElement(ro.Provider,{children:n,value:w}))}function ix(e){let{children:t,location:n}=e;return Wv(Za(t),n)}new Promise(()=>{});function Za(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,s)=>{if(!x.isValidElement(r))return;let i=[...t,s];if(r.type===x.Fragment){n.push.apply(n,Za(r.props.children,i));return}r.type!==_e&&Y(!1),!r.props.index||!r.props.children||Y(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Za(r.props.children,i)),n.push(o)}),n}/** * React Router DOM v6.30.3 * * Copyright (c) Remix Software Inc. @@ -64,7 +64,7 @@ Error generating stack: `+i.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ri(){return Ri=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[s]=e[s]);return n}function ox(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ax(e,t){return e.button===0&&(!t||t==="_self")&&!ox(e)}const lx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],ux=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],cx="6";try{window.__reactRouterVersion=cx}catch{}const dx=x.createContext({isTransitioning:!1}),fx="startTransition",ld=r0[fx];function hx(e){let{basename:t,children:n,future:r,window:s}=e,i=x.useRef();i.current==null&&(i.current=mv({window:s,v5Compat:!0}));let o=i.current,[a,l]=x.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=x.useCallback(f=>{u&&ld?ld(()=>l(f)):l(f)},[l,u]);return x.useLayoutEffect(()=>o.listen(c),[o,c]),x.useEffect(()=>rx(r),[r]),x.createElement(sx,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const px=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sm=x.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:f}=t,h=rm(t,lx),{basename:g}=x.useContext(Ht),v,w=!1;if(typeof u=="string"&&mx.test(u)&&(v=u,px))try{let y=new URL(window.location.href),b=u.startsWith("//")?new URL(y.protocol+u):new URL(u),k=Zn(b.pathname,g);b.origin===y.origin&&k!=null?u=k+b.search+b.hash:w=!0}catch{}let S=Uv(u,{relative:s}),m=vx(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:s,viewTransition:f});function p(y){r&&r(y),y.defaultPrevented||m(y)}return x.createElement("a",Ri({},h,{href:v||S,onClick:w||i?r:p,ref:n,target:l}))}),gx=x.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:o=!1,style:a,to:l,viewTransition:u,children:c}=t,f=rm(t,ux),h=so(l,{relative:f.relative}),g=hs(),v=x.useContext(Zp),{navigator:w,basename:S}=x.useContext(Ht),m=v!=null&&xx(h)&&u===!0,p=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,y=g.pathname,b=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;s||(y=y.toLowerCase(),b=b?b.toLowerCase():null,p=p.toLowerCase()),b&&S&&(b=Zn(b,S)||b);const k=p!=="/"&&p.endsWith("/")?p.length-1:p.length;let C=y===p||!o&&y.startsWith(p)&&y.charAt(k)==="/",E=b!=null&&(b===p||!o&&b.startsWith(p)&&b.charAt(p.length)==="/"),P={isActive:C,isPending:E,isTransitioning:m},F=C?r:void 0,A;typeof i=="function"?A=i(P):A=[i,C?"active":null,E?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let ee=typeof a=="function"?a(P):a;return x.createElement(sm,Ri({},f,{"aria-current":F,className:A,ref:n,style:ee,to:l,viewTransition:u}),typeof c=="function"?c(P):c)});var Za;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Za||(Za={}));var ud;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ud||(ud={}));function yx(e){let t=x.useContext(no);return t||Y(!1),t}function vx(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=zv(),u=hs(),c=so(e,{relative:o});return x.useCallback(f=>{if(ax(f,n)){f.preventDefault();let h=r!==void 0?r:Ai(u)===Ai(c);l(e,{replace:h,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,l,c,r,s,n,e,i,o,a])}function xx(e,t){t===void 0&&(t={});let n=x.useContext(dx);n==null&&Y(!1);let{basename:r}=yx(Za.useViewTransitionState),s=so(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Zn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Zn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Qa(s.pathname,o)!=null||Qa(s.pathname,i)!=null}const uu=x.createContext({});function cu(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const io=x.createContext(null),du=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class wx extends x.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function Sx({children:e,isPresent:t}){const n=x.useId(),r=x.useRef(null),s=x.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=x.useContext(du);return x.useInsertionEffect(()=>{const{width:o,height:a,top:l,left:u}=s.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return i&&(c.nonce=i),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` + */function Ri(){return Ri=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[s]=e[s]);return n}function ox(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ax(e,t){return e.button===0&&(!t||t==="_self")&&!ox(e)}const lx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],ux=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],cx="6";try{window.__reactRouterVersion=cx}catch{}const dx=x.createContext({isTransitioning:!1}),fx="startTransition",ld=r0[fx];function px(e){let{basename:t,children:n,future:r,window:s}=e,i=x.useRef();i.current==null&&(i.current=mv({window:s,v5Compat:!0}));let o=i.current,[a,l]=x.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=x.useCallback(f=>{u&&ld?ld(()=>l(f)):l(f)},[l,u]);return x.useLayoutEffect(()=>o.listen(c),[o,c]),x.useEffect(()=>rx(r),[r]),x.createElement(sx,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const hx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sm=x.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:f}=t,p=rm(t,lx),{basename:g}=x.useContext(Ht),v,w=!1;if(typeof u=="string"&&mx.test(u)&&(v=u,hx))try{let y=new URL(window.location.href),S=u.startsWith("//")?new URL(y.protocol+u):new URL(u),k=Zn(S.pathname,g);S.origin===y.origin&&k!=null?u=k+S.search+S.hash:w=!0}catch{}let b=Uv(u,{relative:s}),h=vx(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:s,viewTransition:f});function m(y){r&&r(y),y.defaultPrevented||h(y)}return x.createElement("a",Ri({},p,{href:v||b,onClick:w||i?r:m,ref:n,target:l}))}),gx=x.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:o=!1,style:a,to:l,viewTransition:u,children:c}=t,f=rm(t,ux),p=so(l,{relative:f.relative}),g=hs(),v=x.useContext(Zh),{navigator:w,basename:b}=x.useContext(Ht),h=v!=null&&xx(p)&&u===!0,m=w.encodeLocation?w.encodeLocation(p).pathname:p.pathname,y=g.pathname,S=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;s||(y=y.toLowerCase(),S=S?S.toLowerCase():null,m=m.toLowerCase()),S&&b&&(S=Zn(S,b)||S);const k=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let C=y===m||!o&&y.startsWith(m)&&y.charAt(k)==="/",E=S!=null&&(S===m||!o&&S.startsWith(m)&&S.charAt(m.length)==="/"),P={isActive:C,isPending:E,isTransitioning:h},D=C?r:void 0,A;typeof i=="function"?A=i(P):A=[i,C?"active":null,E?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let ee=typeof a=="function"?a(P):a;return x.createElement(sm,Ri({},f,{"aria-current":D,className:A,ref:n,style:ee,to:l,viewTransition:u}),typeof c=="function"?c(P):c)});var Ja;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ja||(Ja={}));var ud;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ud||(ud={}));function yx(e){let t=x.useContext(no);return t||Y(!1),t}function vx(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=zv(),u=hs(),c=so(e,{relative:o});return x.useCallback(f=>{if(ax(f,n)){f.preventDefault();let p=r!==void 0?r:Ai(u)===Ai(c);l(e,{replace:p,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[u,l,c,r,s,n,e,i,o,a])}function xx(e,t){t===void 0&&(t={});let n=x.useContext(dx);n==null&&Y(!1);let{basename:r}=yx(Ja.useViewTransitionState),s=so(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Zn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Zn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ya(s.pathname,o)!=null||Ya(s.pathname,i)!=null}const cu=x.createContext({});function du(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const io=x.createContext(null),fu=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class wx extends x.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function bx({children:e,isPresent:t}){const n=x.useId(),r=x.useRef(null),s=x.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=x.useContext(fu);return x.useInsertionEffect(()=>{const{width:o,height:a,top:l,left:u}=s.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return i&&(c.nonce=i),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(` [data-motion-pop-id="${n}"] { position: absolute !important; width: ${o}px !important; @@ -72,9 +72,9 @@ Error generating stack: `+i.message+` top: ${l}px !important; left: ${u}px !important; } - `),()=>{document.head.removeChild(c)}},[t]),d.jsx(wx,{isPresent:t,childRef:r,sizeRef:s,children:x.cloneElement(e,{ref:r})})}const bx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=cu(kx),l=x.useId(),u=x.useCallback(f=>{a.set(f,!0);for(const h of a.values())if(!h)return;r&&r()},[a,r]),c=x.useMemo(()=>({id:l,initial:t,isPresent:n,custom:s,onExitComplete:u,register:f=>(a.set(f,!1),()=>a.delete(f))}),i?[Math.random(),u]:[n,u]);return x.useMemo(()=>{a.forEach((f,h)=>a.set(h,!1))},[n]),x.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),o==="popLayout"&&(e=d.jsx(Sx,{isPresent:n,children:e})),d.jsx(io.Provider,{value:c,children:e})};function kx(){return new Map}function im(e=!0){const t=x.useContext(io);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=x.useId();x.useEffect(()=>{e&&s(i)},[e]);const o=x.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Us=e=>e.key||"";function cd(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const fu=typeof window<"u",om=fu?x.useLayoutEffect:x.useEffect,am=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1})=>{const[a,l]=im(o),u=x.useMemo(()=>cd(e),[e]),c=o&&!a?[]:u.map(Us),f=x.useRef(!0),h=x.useRef(u),g=cu(()=>new Map),[v,w]=x.useState(u),[S,m]=x.useState(u);om(()=>{f.current=!1,h.current=u;for(let b=0;b{const k=Us(b),C=o&&!a?!1:u===S||c.includes(k),E=()=>{if(g.has(k))g.set(k,!0);else return;let P=!0;g.forEach(F=>{F||(P=!1)}),P&&(y==null||y(),m(h.current),o&&(l==null||l()),r&&r())};return d.jsx(bx,{isPresent:C,initial:!f.current||n?void 0:!1,custom:C?void 0:t,presenceAffectsLayout:s,mode:i,onExitComplete:C?void 0:E,children:b},k)})})},Ae=e=>e;let lm=Ae;function hu(e){let t;return()=>(t===void 0&&(t=e()),t)}const Jn=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},dt=e=>e*1e3,ft=e=>e/1e3,Cx={useManualTiming:!1};function Px(e){let t=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){i.has(u)&&(l.schedule(u),e()),u(o)}const l={schedule:(u,c=!1,f=!1)=>{const g=f&&r?t:n;return c&&i.add(u),g.has(u)||g.add(u),u},cancel:u=>{n.delete(u),i.delete(u)},process:u=>{if(o=u,r){s=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,s&&(s=!1,l.process(u))}};return l}const zs=["read","resolveKeyframes","update","preRender","render","postRender"],Tx=40;function um(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=zs.reduce((m,p)=>(m[p]=Px(i),m),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:f,postRender:h}=o,g=()=>{const m=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(m-s.timestamp,Tx),1),s.timestamp=m,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),f.process(s),h.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(g))},v=()=>{n=!0,r=!0,s.isProcessing||e(g)};return{schedule:zs.reduce((m,p)=>{const y=o[p];return m[p]=(b,k=!1,C=!1)=>(n||v(),y.schedule(b,k,C)),m},{}),cancel:m=>{for(let p=0;pdd[e].some(n=>!!t[n])};function Ex(e){for(const t in e)qn[t]={...qn[t],...e[t]}}const jx=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Li(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||jx.has(e)}let dm=e=>!Li(e);function Nx(e){e&&(dm=t=>t.startsWith("on")?!Li(t):e(t))}try{Nx(require("@emotion/is-prop-valid").default)}catch{}function Ax(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(dm(s)||n===!0&&Li(s)||!t&&!Li(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Rx(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const oo=x.createContext({});function ns(e){return typeof e=="string"||Array.isArray(e)}function ao(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const pu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],mu=["initial",...pu];function lo(e){return ao(e.animate)||mu.some(t=>ns(e[t]))}function fm(e){return!!(lo(e)||e.variants)}function Lx(e,t){if(lo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ns(n)?n:void 0,animate:ns(r)?r:void 0}}return e.inherit!==!1?t:{}}function Dx(e){const{initial:t,animate:n}=Lx(e,x.useContext(oo));return x.useMemo(()=>({initial:t,animate:n}),[fd(t),fd(n)])}function fd(e){return Array.isArray(e)?e.join(" "):e}const Fx=Symbol.for("motionComponentSymbol");function Dn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Mx(e,t,n){return x.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Dn(n)&&(n.current=r))},[t])}const gu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),_x="framerAppearId",hm="data-"+gu(_x),{schedule:yu}=um(queueMicrotask,!1),pm=x.createContext({});function Vx(e,t,n,r,s){var i,o;const{visualElement:a}=x.useContext(oo),l=x.useContext(cm),u=x.useContext(io),c=x.useContext(du).reducedMotion,f=x.useRef(null);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const h=f.current,g=x.useContext(pm);h&&!h.projection&&s&&(h.type==="html"||h.type==="svg")&&Ox(f.current,n,s,g);const v=x.useRef(!1);x.useInsertionEffect(()=>{h&&v.current&&h.update(n,u)});const w=n[hm],S=x.useRef(!!w&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,w))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,w)));return om(()=>{h&&(v.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),yu.render(h.render),S.current&&h.animationState&&h.animationState.animateChanges())}),x.useEffect(()=>{h&&(!S.current&&h.animationState&&h.animationState.animateChanges(),S.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)===null||m===void 0||m.call(window,w)}),S.current=!1))}),h}function Ox(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:mm(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Dn(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function mm(e){if(e)return e.options.allowProjection!==!1?e.projection:mm(e.parent)}function Ix({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var i,o;e&&Ex(e);function a(u,c){let f;const h={...x.useContext(du),...u,layoutId:Bx(u)},{isStatic:g}=h,v=Dx(u),w=r(u,g);if(!g&&fu){Ux();const S=zx(h);f=S.MeasureLayout,v.visualElement=Vx(s,w,h,t,S.ProjectionNode)}return d.jsxs(oo.Provider,{value:v,children:[f&&v.visualElement?d.jsx(f,{visualElement:v.visualElement,...h}):null,n(s,u,Mx(w,v.visualElement,c),w,g,v.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${(o=(i=s.displayName)!==null&&i!==void 0?i:s.name)!==null&&o!==void 0?o:""})`}`;const l=x.forwardRef(a);return l[Fx]=s,l}function Bx({layoutId:e}){const t=x.useContext(uu).id;return t&&e!==void 0?t+"-"+e:e}function Ux(e,t){x.useContext(cm).strict}function zx(e){const{drag:t,layout:n}=qn;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const $x=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function vu(e){return typeof e!="string"||e.includes("-")?!1:!!($x.indexOf(e)>-1||/[A-Z]/u.test(e))}function hd(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function xu(e,t,n,r){if(typeof t=="function"){const[s,i]=hd(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=hd(r);t=t(n!==void 0?n:e.custom,s,i)}return t}const Ja=e=>Array.isArray(e),Wx=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Kx=e=>Ja(e)?e[e.length-1]||0:e,ge=e=>!!(e&&e.getVelocity);function ri(e){const t=ge(e)?e.get():e;return Wx(t)?t.toValue():t}function Hx({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,i){const o={latestValues:Gx(r,s,i,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const gm=e=>(t,n)=>{const r=x.useContext(oo),s=x.useContext(io),i=()=>Hx(e,t,r,s);return n?i():cu(i)};function Gx(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=ri(i[h]);let{initial:o,animate:a}=e;const l=lo(e),u=fm(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const f=c?a:o;if(f&&typeof f!="boolean"&&!ao(f)){const h=Array.isArray(f)?f:[f];for(let g=0;gt=>typeof t=="string"&&t.startsWith(e),vm=ym("--"),Xx=ym("var(--"),wu=e=>Xx(e)?Qx.test(e.split("/*")[0].trim()):!1,Qx=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,xm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,yt=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},rs={...ir,transform:e=>yt(0,1,e)},$s={...ir,default:1},ps=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),bt=ps("deg"),st=ps("%"),R=ps("px"),Yx=ps("vh"),Zx=ps("vw"),pd={...st,parse:e=>st.parse(e)/100,transform:e=>st.transform(e*100)},Jx={borderWidth:R,borderTopWidth:R,borderRightWidth:R,borderBottomWidth:R,borderLeftWidth:R,borderRadius:R,radius:R,borderTopLeftRadius:R,borderTopRightRadius:R,borderBottomRightRadius:R,borderBottomLeftRadius:R,width:R,maxWidth:R,height:R,maxHeight:R,top:R,right:R,bottom:R,left:R,padding:R,paddingTop:R,paddingRight:R,paddingBottom:R,paddingLeft:R,margin:R,marginTop:R,marginRight:R,marginBottom:R,marginLeft:R,backgroundPositionX:R,backgroundPositionY:R},qx={rotate:bt,rotateX:bt,rotateY:bt,rotateZ:bt,scale:$s,scaleX:$s,scaleY:$s,scaleZ:$s,skew:bt,skewX:bt,skewY:bt,distance:R,translateX:R,translateY:R,translateZ:R,x:R,y:R,z:R,perspective:R,transformPerspective:R,opacity:rs,originX:pd,originY:pd,originZ:R},md={...ir,transform:Math.round},Su={...Jx,...qx,zIndex:md,size:R,fillOpacity:rs,strokeOpacity:rs,numOctaves:md},e1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},t1=sr.length;function n1(e,t,n){let r="",s=!0;for(let i=0;i({style:{},transform:{},transformOrigin:{},vars:{}}),wm=()=>({...Cu(),attrs:{}}),Pu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Sm(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const bm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function km(e,t,n,r){Sm(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(bm.has(s)?s:gu(s),t.attrs[s])}const Di={};function a1(e){Object.assign(Di,e)}function Cm(e,{layout:t,layoutId:n}){return xn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Di[e]||e==="opacity")}function Tu(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(ge(s[o])||t.style&&ge(t.style[o])||Cm(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}function Pm(e,t,n){const r=Tu(e,t,n);for(const s in e)if(ge(e[s])||ge(t[s])){const i=sr.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}function l1(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const yd=["x","y","width","height","cx","cy","r"],u1={useVisualState:gm({scrapeMotionValuesFromProps:Pm,createRenderState:wm,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let i=!!e.drag;if(!i){for(const a in s)if(xn.has(a)){i=!0;break}}if(!i)return;let o=!t;if(t)for(let a=0;a{l1(n,r),z.render(()=>{ku(r,s,Pu(n.tagName),e.transformTemplate),km(n,r)})})}})},c1={useVisualState:gm({scrapeMotionValuesFromProps:Tu,createRenderState:Cu})};function Tm(e,t,n){for(const r in t)!ge(t[r])&&!Cm(r,n)&&(e[r]=t[r])}function d1({transformTemplate:e},t){return x.useMemo(()=>{const n=Cu();return bu(n,t,e),Object.assign({},n.vars,n.style)},[t])}function f1(e,t){const n=e.style||{},r={};return Tm(r,n,e),Object.assign(r,d1(e,t)),r}function h1(e,t){const n={},r=f1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function p1(e,t,n,r){const s=x.useMemo(()=>{const i=wm();return ku(i,t,Pu(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Tm(i,e.style,e),s.style={...i,...s.style}}return s}function m1(e=!1){return(n,r,s,{latestValues:i},o)=>{const l=(vu(n)?p1:h1)(r,i,o,n),u=Ax(r,typeof n=="string",e),c=n!==x.Fragment?{...u,...l,ref:s}:{},{children:f}=r,h=x.useMemo(()=>ge(f)?f.get():f,[f]);return x.createElement(n,{...c,children:h})}}function g1(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...vu(r)?u1:c1,preloadedFeatures:e,useRender:m1(s),createVisualElement:t,Component:r};return Ix(o)}}function Em(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rwindow.ScrollTimeline!==void 0);class v1{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(y1()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class x1 extends v1{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Eu(e,t){return e?e[t]||e.default||e:void 0}const qa=2e4;function jm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=qa?1/0:t}function ju(e){return typeof e=="function"}function vd(e,t){e.timeline=t,e.onfinish=null}const Nu=e=>Array.isArray(e)&&typeof e[0]=="number",w1={linearEasing:void 0};function S1(e,t){const n=hu(e);return()=>{var r;return(r=w1[t])!==null&&r!==void 0?r:n()}}const Fi=S1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Nm=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i`cubic-bezier(${e}, ${t}, ${n}, ${r})`,el={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wr([0,.65,.55,1]),circOut:wr([.55,0,1,.45]),backIn:wr([.31,.01,.66,-.59]),backOut:wr([.33,1.53,.69,.99])};function Rm(e,t){if(e)return typeof e=="function"&&Fi()?Nm(e,t):Nu(e)?wr(e):Array.isArray(e)?e.map(n=>Rm(n,t)||el.easeOut):el[e]}const Ke={x:!1,y:!1};function Lm(){return Ke.x||Ke.y}function b1(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let s=document;const i=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Dm(e,t){const n=b1(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function xd(e){return t=>{t.pointerType==="touch"||Lm()||e(t)}}function k1(e,t,n={}){const[r,s,i]=Dm(e,n),o=xd(a=>{const{target:l}=a,u=t(a);if(typeof u!="function"||!l)return;const c=xd(f=>{u(f),l.removeEventListener("pointerleave",c)});l.addEventListener("pointerleave",c,s)});return r.forEach(a=>{a.addEventListener("pointerenter",o,s)}),i}const Fm=(e,t)=>t?e===t?!0:Fm(e,t.parentElement):!1,Au=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,C1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function P1(e){return C1.has(e.tagName)||e.tabIndex!==-1}const Sr=new WeakSet;function wd(e){return t=>{t.key==="Enter"&&e(t)}}function zo(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const T1=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=wd(()=>{if(Sr.has(n))return;zo(n,"down");const s=wd(()=>{zo(n,"up")}),i=()=>zo(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Sd(e){return Au(e)&&!Lm()}function E1(e,t,n={}){const[r,s,i]=Dm(e,n),o=a=>{const l=a.currentTarget;if(!Sd(a)||Sr.has(l))return;Sr.add(l);const u=t(a),c=(g,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!Sd(g)||!Sr.has(l))&&(Sr.delete(l),typeof u=="function"&&u(g,{success:v}))},f=g=>{c(g,n.useGlobalTarget||Fm(l,g.target))},h=g=>{c(g,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return r.forEach(a=>{!P1(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),a.addEventListener("focus",u=>T1(u,s),s)}),i}function j1(e){return e==="x"||e==="y"?Ke[e]?null:(Ke[e]=!0,()=>{Ke[e]=!1}):Ke.x||Ke.y?null:(Ke.x=Ke.y=!0,()=>{Ke.x=Ke.y=!1})}const Mm=new Set(["width","height","top","left","right","bottom",...sr]);let si;function N1(){si=void 0}const it={now:()=>(si===void 0&&it.set(ue.isProcessing||Cx.useManualTiming?ue.timestamp:performance.now()),si),set:e=>{si=e,queueMicrotask(N1)}};function Ru(e,t){e.indexOf(t)===-1&&e.push(t)}function Lu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Du{constructor(){this.subscriptions=[]}add(t){return Ru(this.subscriptions,t),()=>Lu(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i!isNaN(parseFloat(e));class R1{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const i=it.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=it.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=A1(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Du);const r=this.events[t].add(n);return t==="change"?()=>{r(),z.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=it.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>bd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bd);return _m(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ss(e,t){return new R1(e,t)}function L1(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ss(n))}function D1(e,t){const n=uo(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=Kx(i[o]);L1(e,o,a)}}function F1(e){return!!(ge(e)&&e.add)}function tl(e,t){const n=e.getValue("willChange");if(F1(n))return n.add(t)}function Vm(e){return e.props[hm]}const Om=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,M1=1e-7,_1=12;function V1(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=Om(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>M1&&++a<_1);return o}function ms(e,t,n,r){if(e===t&&n===r)return Ae;const s=i=>V1(i,0,1,e,n);return i=>i===0||i===1?i:Om(s(i),t,r)}const Im=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bm=e=>t=>1-e(1-t),Um=ms(.33,1.53,.69,.99),Fu=Bm(Um),zm=Im(Fu),$m=e=>(e*=2)<1?.5*Fu(e):.5*(2-Math.pow(2,-10*(e-1))),Mu=e=>1-Math.sin(Math.acos(e)),Wm=Bm(Mu),Km=Im(Mu),Hm=e=>/^0[^.\s]+$/u.test(e);function O1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Hm(e):!0}const Dr=e=>Math.round(e*1e5)/1e5,_u=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function I1(e){return e==null}const B1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Vu=(e,t)=>n=>!!(typeof n=="string"&&B1.test(n)&&n.startsWith(e)||t&&!I1(n)&&Object.prototype.hasOwnProperty.call(n,t)),Gm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(_u);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},U1=e=>yt(0,255,e),$o={...ir,transform:e=>Math.round(U1(e))},on={test:Vu("rgb","red"),parse:Gm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+$o.transform(e)+", "+$o.transform(t)+", "+$o.transform(n)+", "+Dr(rs.transform(r))+")"};function z1(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const nl={test:Vu("#"),parse:z1,transform:on.transform},Fn={test:Vu("hsl","hue"),parse:Gm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+st.transform(Dr(t))+", "+st.transform(Dr(n))+", "+Dr(rs.transform(r))+")"},pe={test:e=>on.test(e)||nl.test(e)||Fn.test(e),parse:e=>on.test(e)?on.parse(e):Fn.test(e)?Fn.parse(e):nl.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?on.transform(e):Fn.transform(e)},$1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function W1(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(_u))===null||t===void 0?void 0:t.length)||0)+(((n=e.match($1))===null||n===void 0?void 0:n.length)||0)>0}const Xm="number",Qm="color",K1="var",H1="var(",kd="${}",G1=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function is(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(G1,l=>(pe.test(l)?(r.color.push(i),s.push(Qm),n.push(pe.parse(l))):l.startsWith(H1)?(r.var.push(i),s.push(K1),n.push(l)):(r.number.push(i),s.push(Xm),n.push(parseFloat(l))),++i,kd)).split(kd);return{values:n,split:a,indexes:r,types:s}}function Ym(e){return is(e).values}function Zm(e){const{split:t,types:n}=is(e),r=t.length;return s=>{let i="";for(let o=0;otypeof e=="number"?0:e;function Q1(e){const t=Ym(e);return Zm(e)(t.map(X1))}const zt={test:W1,parse:Ym,createTransformer:Zm,getAnimatableNone:Q1},Y1=new Set(["brightness","contrast","saturate","opacity"]);function Z1(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(_u)||[];if(!r)return e;const s=n.replace(r,"");let i=Y1.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const J1=/\b([a-z-]*)\(.*?\)/gu,rl={...zt,getAnimatableNone:e=>{const t=e.match(J1);return t?t.map(Z1).join(" "):e}},q1={...Su,color:pe,backgroundColor:pe,outlineColor:pe,fill:pe,stroke:pe,borderColor:pe,borderTopColor:pe,borderRightColor:pe,borderBottomColor:pe,borderLeftColor:pe,filter:rl,WebkitFilter:rl},Ou=e=>q1[e];function Jm(e,t){let n=Ou(e);return n!==rl&&(n=zt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ew=new Set(["auto","none","0"]);function tw(e,t,n){let r=0,s;for(;re===ir||e===R,Pd=(e,t)=>parseFloat(e.split(", ")[t]),Td=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/u);if(s)return Pd(s[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Pd(i[1],e):0}},nw=new Set(["x","y","z"]),rw=sr.filter(e=>!nw.has(e));function sw(e){const t=[];return rw.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const er={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Td(4,13),y:Td(5,14)};er.translateX=er.x;er.translateY=er.y;const un=new Set;let sl=!1,il=!1;function qm(){if(il){const e=Array.from(un).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=sw(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}il=!1,sl=!1,un.forEach(e=>e.complete()),un.clear()}function eg(){un.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(il=!0)})}function iw(){eg(),qm()}class Iu{constructor(t,n,r,s,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(un.add(this),sl||(sl=!0,z.read(eg),z.resolveKeyframes(qm))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let i=0;i/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ow=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function aw(e){const t=ow.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function ng(e,t,n=1){const[r,s]=aw(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return tg(o)?parseFloat(o):o}return wu(s)?ng(s,t,n+1):s}const rg=e=>t=>t.test(e),lw={test:e=>e==="auto",parse:e=>e},sg=[ir,R,st,bt,Zx,Yx,lw],Ed=e=>sg.find(rg(e));class ig extends Iu{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const jd=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(zt.test(e)||e==="0")&&!e.startsWith("url("));function uw(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function co(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(dw),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const fw=40;class og{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=it.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>fw?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&iw(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=it.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:i,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!cw(t,r,s,i))if(o)this.options.duration=0;else{l&&l(co(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const K=(e,t,n)=>e+(t-e)*n;function Wo(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hw({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Wo(l,a,e+1/3),i=Wo(l,a,e),o=Wo(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Mi(e,t){return n=>n>0?t:e}const Ko=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},pw=[nl,on,Fn],mw=e=>pw.find(t=>t.test(e));function Nd(e){const t=mw(e);if(!t)return!1;let n=t.parse(e);return t===Fn&&(n=hw(n)),n}const Ad=(e,t)=>{const n=Nd(e),r=Nd(t);if(!n||!r)return Mi(e,t);const s={...n};return i=>(s.red=Ko(n.red,r.red,i),s.green=Ko(n.green,r.green,i),s.blue=Ko(n.blue,r.blue,i),s.alpha=K(n.alpha,r.alpha,i),on.transform(s))},gw=(e,t)=>n=>t(e(n)),gs=(...e)=>e.reduce(gw),ol=new Set(["none","hidden"]);function yw(e,t){return ol.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function vw(e,t){return n=>K(e,t,n)}function Bu(e){return typeof e=="number"?vw:typeof e=="string"?wu(e)?Mi:pe.test(e)?Ad:Sw:Array.isArray(e)?ag:typeof e=="object"?pe.test(e)?Ad:xw:Mi}function ag(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>Bu(i)(i,t[o]));return i=>{for(let o=0;o{for(const i in r)n[i]=r[i](s);return n}}function ww(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let i=0;i{const n=zt.createTransformer(t),r=is(e),s=is(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?ol.has(e)&&!s.values.length||ol.has(t)&&!r.values.length?yw(e,t):gs(ag(ww(r,s),s.values),n):Mi(e,t)};function lg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?K(e,t,n):Bu(e)(e,t)}const bw=5;function ug(e,t,n){const r=Math.max(t-bw,0);return _m(n-e(r),t-r)}const X={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ho=.001;function kw({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:r=X.mass}){let s,i,o=1-t;o=yt(X.minDamping,X.maxDamping,o),e=yt(X.minDuration,X.maxDuration,ft(e)),o<1?(s=u=>{const c=u*o,f=c*e,h=c-n,g=al(u,o),v=Math.exp(-f);return Ho-h/g*v},i=u=>{const f=u*o*e,h=f*n+n,g=Math.pow(o,2)*Math.pow(u,2)*e,v=Math.exp(-f),w=al(Math.pow(u,2),o);return(-s(u)+Ho>0?-1:1)*((h-g)*v)/w}):(s=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-Ho+c*f},i=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=Pw(s,i,a);if(e=dt(e),isNaN(l))return{stiffness:X.stiffness,damping:X.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const Cw=12;function Pw(e,t,n){let r=n;for(let s=1;se[n]!==void 0)}function jw(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!Rd(e,Ew)&&Rd(e,Tw))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*yt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:X.mass,stiffness:s,damping:i}}else{const n=kw(e);t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function cg(e=X.visualDuration,t=X.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:u,mass:c,duration:f,velocity:h,isResolvedFromDuration:g}=jw({...n,velocity:-ft(n.velocity||0)}),v=h||0,w=u/(2*Math.sqrt(l*c)),S=o-i,m=ft(Math.sqrt(l/c)),p=Math.abs(S)<5;r||(r=p?X.restSpeed.granular:X.restSpeed.default),s||(s=p?X.restDelta.granular:X.restDelta.default);let y;if(w<1){const k=al(m,w);y=C=>{const E=Math.exp(-w*m*C);return o-E*((v+w*m*S)/k*Math.sin(k*C)+S*Math.cos(k*C))}}else if(w===1)y=k=>o-Math.exp(-m*k)*(S+(v+m*S)*k);else{const k=m*Math.sqrt(w*w-1);y=C=>{const E=Math.exp(-w*m*C),P=Math.min(k*C,300);return o-E*((v+w*m*S)*Math.sinh(P)+k*S*Math.cosh(P))/k}}const b={calculatedDuration:g&&f||null,next:k=>{const C=y(k);if(g)a.done=k>=f;else{let E=0;w<1&&(E=k===0?dt(v):ug(y,k,C));const P=Math.abs(E)<=r,F=Math.abs(o-C)<=s;a.done=P&&F}return a.value=a.done?o:C,a},toString:()=>{const k=Math.min(jm(b),qa),C=Nm(E=>b.next(k*E).value,k,30);return k+"ms "+C}};return b}function Ld({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],h={done:!1,value:f},g=P=>a!==void 0&&Pl,v=P=>a===void 0?l:l===void 0||Math.abs(a-P)-w*Math.exp(-P/r),y=P=>m+p(P),b=P=>{const F=p(P),A=y(P);h.done=Math.abs(F)<=u,h.value=h.done?m:A};let k,C;const E=P=>{g(h.value)&&(k=P,C=cg({keyframes:[h.value,v(h.value)],velocity:ug(y,P,h.value),damping:s,stiffness:i,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:P=>{let F=!1;return!C&&k===void 0&&(F=!0,b(P),E(P)),k!==void 0&&P>=k?C.next(P-k):(!F&&b(P),h)}}}const Nw=ms(.42,0,1,1),Aw=ms(0,0,.58,1),dg=ms(.42,0,.58,1),Rw=e=>Array.isArray(e)&&typeof e[0]!="number",Lw={linear:Ae,easeIn:Nw,easeInOut:dg,easeOut:Aw,circIn:Mu,circInOut:Km,circOut:Wm,backIn:Fu,backInOut:zm,backOut:Um,anticipate:$m},Dd=e=>{if(Nu(e)){lm(e.length===4);const[t,n,r,s]=e;return ms(t,n,r,s)}else if(typeof e=="string")return Lw[e];return e};function Dw(e,t,n){const r=[],s=n||lg,i=e.length-1;for(let o=0;ot[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Dw(t,r,s),l=a.length,u=c=>{if(o&&c1)for(;fu(yt(e[0],e[i-1],c)):u}function Mw(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Jn(0,t,r);e.push(K(n,1,s))}}function _w(e){const t=[0];return Mw(t,e.length-1),t}function Vw(e,t){return e.map(n=>n*t)}function Ow(e,t){return e.map(()=>t||dg).splice(0,e.length-1)}function _i({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=Rw(r)?r.map(Dd):Dd(r),i={done:!1,value:t[0]},o=Vw(n&&n.length===t.length?n:_w(t),e),a=Fw(o,t,{ease:Array.isArray(s)?s:Ow(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const Iw=e=>{const t=({timestamp:n})=>e(n);return{start:()=>z.update(t,!0),stop:()=>Ut(t),now:()=>ue.isProcessing?ue.timestamp:it.now()}},Bw={decay:Ld,inertia:Ld,tween:_i,keyframes:_i,spring:cg},Uw=e=>e/100;class Uu extends og{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:s,keyframes:i}=this.options,o=(s==null?void 0:s.KeyframeResolver)||Iu,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(i,a,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=this.options,a=ju(n)?n:Bw[n]||_i;let l,u;a!==_i&&typeof t[0]!="number"&&(l=gs(Uw,lg(t[0],t[1])),t=[0,100]);const c=a({...this.options,keyframes:t});i==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=jm(c));const{calculatedDuration:f}=c,h=f+s,g=h*(r+1)-s;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:h,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:g,repeatType:v,repeatDelay:w,onUpdate:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-h*(this.speed>=0?1:-1),p=this.speed>=0?m<0:m>c;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let y=this.currentTime,b=i;if(g){const P=Math.min(this.currentTime,c)/f;let F=Math.floor(P),A=P%1;!A&&P>=1&&(A=1),A===1&&F--,F=Math.min(F,g+1),!!(F%2)&&(v==="reverse"?(A=1-A,w&&(A-=w/f)):v==="mirror"&&(b=o)),y=yt(0,1,A)*f}const k=p?{done:!1,value:l[0]}:b.next(y);a&&(k.value=a(k.value));let{done:C}=k;!p&&u!==null&&(C=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return E&&s!==void 0&&(k.value=co(l,this.options,s)),S&&S(k.value),E&&this.finish(),k}get duration(){const{resolved:t}=this;return t?ft(t.calculatedDuration):0}get time(){return ft(this.currentTime)}set time(t){t=dt(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ft(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Iw,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const zw=new Set(["opacity","clipPath","filter","transform"]);function $w(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=Rm(a,s);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const Ww=hu(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Vi=10,Kw=2e4;function Hw(e){return ju(e.type)||e.type==="spring"||!Am(e.ease)}function Gw(e,t){const n=new Uu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let i=0;for(;!r.done&&ithis.onKeyframesResolved(o,a),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:i,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof i=="string"&&Fi()&&Xw(i)&&(i=fg[i]),Hw(this.options)){const{onComplete:f,onUpdate:h,motionValue:g,element:v,...w}=this.options,S=Gw(t,w);t=S.keyframes,t.length===1&&(t[1]=t[0]),r=S.duration,s=S.times,i=S.ease,o="keyframes"}const c=$w(a.owner.current,l,t,{...this.options,duration:r,times:s,ease:i});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(vd(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:f}=this.options;a.set(co(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:r,times:s,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ft(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ft(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=dt(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ae;const{animation:r}=n;vd(r,t)}return Ae}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:i,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:f,element:h,...g}=this.options,v=new Uu({...g,keyframes:r,duration:s,type:i,ease:o,times:a,isGenerator:!0}),w=dt(this.time);u.setWithVelocity(v.sample(w-Vi).value,v.sample(w).value,Vi)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:i,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return Ww()&&r&&zw.has(r)&&!l&&!u&&!s&&i!=="mirror"&&o!==0&&a!=="inertia"}}const Qw={type:"spring",stiffness:500,damping:25,restSpeed:10},Yw=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Zw={type:"keyframes",duration:.8},Jw={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},qw=(e,{keyframes:t})=>t.length>2?Zw:xn.has(e)?e.startsWith("scale")?Yw(t[1]):Qw:Jw;function eS({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const zu=(e,t,n,r={},s,i)=>o=>{const a=Eu(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-dt(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};eS(a)||(c={...c,...qw(e,c)}),c.duration&&(c.duration=dt(c.duration)),c.repeatDelay&&(c.repeatDelay=dt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(f=!0)),f&&!i&&t.get()!==void 0){const h=co(c.keyframes,a);if(h!==void 0)return z.update(()=>{c.onUpdate(h),c.onComplete()}),new x1([])}return!i&&Fd.supports(c)?new Fd(c):new Uu(c)};function tS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function hg(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(o=r);const u=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const f in l){const h=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),g=l[f];if(g===void 0||c&&tS(c,f))continue;const v={delay:n,...Eu(o||{},f)};let w=!1;if(window.MotionHandoffAnimation){const m=Vm(e);if(m){const p=window.MotionHandoffAnimation(m,f,z);p!==null&&(v.startTime=p,w=!0)}}tl(e,f),h.start(zu(f,h,g,e.shouldReduceMotion&&Mm.has(f)?{type:!1}:v,e,w));const S=h.animation;S&&u.push(S)}return a&&Promise.all(u).then(()=>{z.update(()=>{a&&D1(e,a)})}),u}function ll(e,t,n={}){var r;const s=uo(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(hg(e,s,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:h}=i;return nS(e,t,c+u,f,h,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function nS(e,t,n=0,r=0,s=1,i){const o=[],a=(e.variantChildren.size-1)*r,l=s===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(rS).forEach((u,c)=>{u.notify("AnimationStart",t),o.push(ll(u,t,{...i,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function rS(e,t){return e.sortNodePosition(t)}function sS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>ll(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=ll(e,t,n);else{const s=typeof t=="function"?uo(e,t,n.custom):t;r=Promise.all(hg(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const iS=mu.length;function pg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?pg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>sS(e,n,r)))}function uS(e){let t=lS(e),n=Md(),r=!0;const s=l=>(u,c)=>{var f;const h=uo(e,c,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:g,transitionEnd:v,...w}=h;u={...u,...w,...v}}return u};function i(l){t=l(e)}function o(l){const{props:u}=e,c=pg(e.parent)||{},f=[],h=new Set;let g={},v=1/0;for(let S=0;Sv&&b,F=!1;const A=Array.isArray(y)?y:[y];let ee=A.reduce(s(m),{});k===!1&&(ee={});const{prevResolvedValues:wt={}}=p,Xt={...wt,...ee},or=ne=>{P=!0,h.has(ne)&&(F=!0,h.delete(ne)),p.needsAnimating[ne]=!0;const j=e.getValue(ne);j&&(j.liveStyle=!1)};for(const ne in Xt){const j=ee[ne],L=wt[ne];if(g.hasOwnProperty(ne))continue;let D=!1;Ja(j)&&Ja(L)?D=!Em(j,L):D=j!==L,D?j!=null?or(ne):h.add(ne):j!==void 0&&h.has(ne)?or(ne):p.protectedKeys[ne]=!0}p.prevProp=y,p.prevResolvedValues=ee,p.isActive&&(g={...g,...ee}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(C&&E)||F)&&f.push(...A.map(ne=>({animation:ne,options:{type:m}})))}if(h.size){const S={};h.forEach(m=>{const p=e.getBaseTarget(m),y=e.getValue(m);y&&(y.liveStyle=!0),S[m]=p??null}),f.push({animation:S})}let w=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(f):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(h=>{var g;return(g=h.animationState)===null||g===void 0?void 0:g.setActive(l,u)}),n[l].isActive=u;const f=o(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Md(),r=!0}}}function cS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Em(t,e):!1}function Zt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Md(){return{animate:Zt(!0),whileInView:Zt(),whileHover:Zt(),whileTap:Zt(),whileDrag:Zt(),whileFocus:Zt(),exit:Zt()}}class Gt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class dS extends Gt{constructor(t){super(t),t.animationState||(t.animationState=uS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ao(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let fS=0;class hS extends Gt{constructor(){super(...arguments),this.id=fS++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const pS={animation:{Feature:dS},exit:{Feature:hS}};function os(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ys(e){return{point:{x:e.pageX,y:e.pageY}}}const mS=e=>t=>Au(t)&&e(t,ys(t));function Fr(e,t,n,r){return os(e,t,mS(n),r)}const _d=(e,t)=>Math.abs(e-t);function gS(e,t){const n=_d(e.x,t.x),r=_d(e.y,t.y);return Math.sqrt(n**2+r**2)}class mg{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Xo(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,g=gS(f.offset,{x:0,y:0})>=3;if(!h&&!g)return;const{point:v}=f,{timestamp:w}=ue;this.history.push({...v,timestamp:w});const{onStart:S,onMove:m}=this.handlers;h||(S&&S(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Go(h,this.transformPagePoint),z.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:g,onSessionEnd:v,resumeAnimation:w}=this.handlers;if(this.dragSnapToOrigin&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Xo(f.type==="pointercancel"?this.lastMoveEventInfo:Go(h,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,S),v&&v(f,S)},!Au(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const o=ys(t),a=Go(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=ue;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,Xo(a,this.history)),this.removeListeners=gs(Fr(this.contextWindow,"pointermove",this.handlePointerMove),Fr(this.contextWindow,"pointerup",this.handlePointerUp),Fr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ut(this.updatePoint)}}function Go(e,t){return t?{point:t(e.point)}:e}function Vd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xo({point:e},t){return{point:e,delta:Vd(e,gg(t)),offset:Vd(e,yS(t)),velocity:vS(t,.1)}}function yS(e){return e[0]}function gg(e){return e[e.length-1]}function vS(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=gg(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>dt(t)));)n--;if(!r)return{x:0,y:0};const i=ft(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const yg=1e-4,xS=1-yg,wS=1+yg,vg=.01,SS=0-vg,bS=0+vg;function Le(e){return e.max-e.min}function kS(e,t,n){return Math.abs(e-t)<=n}function Od(e,t,n,r=.5){e.origin=r,e.originPoint=K(t.min,t.max,e.origin),e.scale=Le(n)/Le(t),e.translate=K(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xS&&e.scale<=wS||isNaN(e.scale))&&(e.scale=1),(e.translate>=SS&&e.translate<=bS||isNaN(e.translate))&&(e.translate=0)}function Mr(e,t,n,r){Od(e.x,t.x,n.x,r?r.originX:void 0),Od(e.y,t.y,n.y,r?r.originY:void 0)}function Id(e,t,n){e.min=n.min+t.min,e.max=e.min+Le(t)}function CS(e,t,n){Id(e.x,t.x,n.x),Id(e.y,t.y,n.y)}function Bd(e,t,n){e.min=t.min-n.min,e.max=e.min+Le(t)}function _r(e,t,n){Bd(e.x,t.x,n.x),Bd(e.y,t.y,n.y)}function PS(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?K(n,e,r.max):Math.min(e,n)),e}function Ud(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function TS(e,{top:t,left:n,bottom:r,right:s}){return{x:Ud(e.x,n,s),y:Ud(e.y,t,r)}}function zd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Jn(t.min,t.max-r,e.min):r>s&&(n=Jn(e.min,e.max-s,t.min)),yt(0,1,n)}function NS(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const ul=.35;function AS(e=ul){return e===!1?e=0:e===!0&&(e=ul),{x:$d(e,"left","right"),y:$d(e,"top","bottom")}}function $d(e,t,n){return{min:Wd(e,t),max:Wd(e,n)}}function Wd(e,t){return typeof e=="number"?e:e[t]||0}const Kd=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mn=()=>({x:Kd(),y:Kd()}),Hd=()=>({min:0,max:0}),J=()=>({x:Hd(),y:Hd()});function Ve(e){return[e("x"),e("y")]}function xg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function RS({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function LS(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Qo(e){return e===void 0||e===1}function cl({scale:e,scaleX:t,scaleY:n}){return!Qo(e)||!Qo(t)||!Qo(n)}function en(e){return cl(e)||wg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function wg(e){return Gd(e.x)||Gd(e.y)}function Gd(e){return e&&e!=="0%"}function Oi(e,t,n){const r=e-n,s=t*r;return n+s}function Xd(e,t,n,r,s){return s!==void 0&&(e=Oi(e,s,r)),Oi(e,n,r)+t}function dl(e,t=0,n=1,r,s){e.min=Xd(e.min,t,n,r,s),e.max=Xd(e.max,t,n,r,s)}function Sg(e,{x:t,y:n}){dl(e.x,t.translate,t.scale,t.originPoint),dl(e.y,n.translate,n.scale,n.originPoint)}const Qd=.999999999999,Yd=1.0000000000001;function DS(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let a=0;aQd&&(t.x=1),t.yQd&&(t.y=1)}function _n(e,t){e.min=e.min+t,e.max=e.max+t}function Zd(e,t,n,r,s=.5){const i=K(e.min,e.max,s);dl(e,t,n,i,r)}function Vn(e,t){Zd(e.x,t.x,t.scaleX,t.scale,t.originX),Zd(e.y,t.y,t.scaleY,t.scale,t.originY)}function bg(e,t){return xg(LS(e.getBoundingClientRect(),t))}function FS(e,t,n){const r=bg(e,n),{scroll:s}=t;return s&&(_n(r.x,s.offset.x),_n(r.y,s.offset.y)),r}const kg=({current:e})=>e?e.ownerDocument.defaultView:null,MS=new WeakMap;class _S{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=J(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=c=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ys(c).point)},i=(c,f)=>{const{drag:h,dragPropagation:g,onDragStart:v}=this.getProps();if(h&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=j1(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ve(S=>{let m=this.getAxisMotionValue(S).get()||0;if(st.test(m)){const{projection:p}=this.visualElement;if(p&&p.layout){const y=p.layout.layoutBox[S];y&&(m=Le(y)*(parseFloat(m)/100))}}this.originPoint[S]=m}),v&&z.postRender(()=>v(c,f)),tl(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},o=(c,f)=>{const{dragPropagation:h,dragDirectionLock:g,onDirectionLock:v,onDrag:w}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:S}=f;if(g&&this.currentDirection===null){this.currentDirection=VS(S),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,S),this.updateAxis("y",f.point,S),this.visualElement.render(),w&&w(c,f)},a=(c,f)=>this.stop(c,f),l=()=>Ve(c=>{var f;return this.getAnimationState(c)==="paused"&&((f=this.getAxisMotionValue(c).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new mg(t,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:kg(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&z.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Ws(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=PS(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Dn(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=TS(s.layoutBox,n):this.constraints=!1,this.elastic=AS(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Ve(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=NS(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Dn(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=FS(r,s.root,this.visualElement.getTransformPagePoint());let o=ES(s.layout.layoutBox,i);if(n){const a=n(RS(o));this.hasMutatedConstraints=!!a,a&&(o=xg(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ve(c=>{if(!Ws(c,n,this.currentDirection))return;let f=l&&l[c]||{};o&&(f={min:0,max:0});const h=s?200:1e6,g=s?40:1e7,v={type:"inertia",velocity:r?t[c]:0,bounceStiffness:h,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(c,v)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return tl(this.visualElement,t),r.start(zu(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ve(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ve(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ve(n=>{const{drag:r}=this.getProps();if(!Ws(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n];i.set(t[n]-K(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Dn(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Ve(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=jS({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ve(o=>{if(!Ws(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(K(l,u,s[o]))})}addListeners(){if(!this.visualElement.current)return;MS.set(this.visualElement,this);const t=this.visualElement.current,n=Fr(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Dn(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),z.read(r);const o=os(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ve(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=ul,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Ws(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function VS(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class OS extends Gt{constructor(t){super(t),this.removeGroupControls=Ae,this.removeListeners=Ae,this.controls=new _S(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ae}unmount(){this.removeGroupControls(),this.removeListeners()}}const Jd=e=>(t,n)=>{e&&z.postRender(()=>e(t,n))};class IS extends Gt{constructor(){super(...arguments),this.removePointerDownListener=Ae}onPointerDown(t){this.session=new mg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:kg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Jd(t),onStart:Jd(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&z.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Fr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ii={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function qd(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const mr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(R.test(e))e=parseFloat(e);else return e;const n=qd(e,t.target.x),r=qd(e,t.target.y);return`${n}% ${r}%`}},BS={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=zt.parse(e);if(s.length>5)return r;const i=zt.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const u=K(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}};class US extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;a1(zS),i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ii.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,o=r.projection;return o&&(o.isPresent=i,s||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||z.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),yu.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Cg(e){const[t,n]=im(),r=x.useContext(uu);return d.jsx(US,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(pm),isPresent:t,safeToRemove:n})}const zS={borderRadius:{...mr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mr,borderTopRightRadius:mr,borderBottomLeftRadius:mr,borderBottomRightRadius:mr,boxShadow:BS};function $S(e,t,n){const r=ge(e)?e:ss(e);return r.start(zu("",r,t,n)),r.animation}function WS(e){return e instanceof SVGElement&&e.tagName!=="svg"}const KS=(e,t)=>e.depth-t.depth;class HS{constructor(){this.children=[],this.isDirty=!1}add(t){Ru(this.children,t),this.isDirty=!0}remove(t){Lu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(KS),this.isDirty=!1,this.children.forEach(t)}}function GS(e,t){const n=it.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Ut(r),e(i-t))};return z.read(r,!0),()=>Ut(r)}const Pg=["TopLeft","TopRight","BottomLeft","BottomRight"],XS=Pg.length,ef=e=>typeof e=="string"?parseFloat(e):e,tf=e=>typeof e=="number"||R.test(e);function QS(e,t,n,r,s,i){s?(e.opacity=K(0,n.opacity!==void 0?n.opacity:1,YS(r)),e.opacityExit=K(t.opacity!==void 0?t.opacity:1,0,ZS(r))):i&&(e.opacity=K(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(Jn(e,t,r))}function rf(e,t){e.min=t.min,e.max=t.max}function Me(e,t){rf(e.x,t.x),rf(e.y,t.y)}function sf(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function of(e,t,n,r,s){return e-=t,e=Oi(e,1/n,r),s!==void 0&&(e=Oi(e,1/s,r)),e}function JS(e,t=0,n=1,r=.5,s,i=e,o=e){if(st.test(t)&&(t=parseFloat(t),t=K(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=K(i.min,i.max,r);e===i&&(a-=t),e.min=of(e.min,t,n,a,s),e.max=of(e.max,t,n,a,s)}function af(e,t,[n,r,s],i,o){JS(e,t[n],t[r],t[s],t.scale,i,o)}const qS=["x","scaleX","originX"],eb=["y","scaleY","originY"];function lf(e,t,n,r){af(e.x,t,qS,n?n.x:void 0,r?r.x:void 0),af(e.y,t,eb,n?n.y:void 0,r?r.y:void 0)}function uf(e){return e.translate===0&&e.scale===1}function Eg(e){return uf(e.x)&&uf(e.y)}function cf(e,t){return e.min===t.min&&e.max===t.max}function tb(e,t){return cf(e.x,t.x)&&cf(e.y,t.y)}function df(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function jg(e,t){return df(e.x,t.x)&&df(e.y,t.y)}function ff(e){return Le(e.x)/Le(e.y)}function hf(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class nb{constructor(){this.members=[]}add(t){Ru(this.members,t),t.scheduleRender()}remove(t){if(Lu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function rb(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:h,skewX:g,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),g&&(r+=`skewX(${g}deg) `),v&&(r+=`skewY(${v}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const tn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},br=typeof window<"u"&&window.MotionDebug!==void 0,Yo=["","X","Y","Z"],sb={visibility:"hidden"},pf=1e3;let ib=0;function Zo(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ng(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Vm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",z,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ng(r)}function Ag({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=ib++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,br&&(tn.totalNodes=tn.resolvedTargetDeltas=tn.recalculatedProjection=0),this.nodes.forEach(lb),this.nodes.forEach(hb),this.nodes.forEach(pb),this.nodes.forEach(ub),br&&window.MotionDebug.record(tn)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=GS(h,250),ii.hasAnimatedSinceResize&&(ii.hasAnimatedSinceResize=!1,this.nodes.forEach(gf))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:g,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||c.getDefaultTransition()||xb,{onLayoutAnimationStart:S,onLayoutAnimationComplete:m}=c.getProps(),p=!this.targetLayout||!jg(this.targetLayout,v)||g,y=!h&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||h&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const b={...Eu(w,"layout"),onPlay:S,onComplete:m};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else h||gf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ut(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(mb),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ng(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const k=b/1e3;yf(f.x,o.x,k),yf(f.y,o.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(_r(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),yb(this.relativeTarget,this.relativeTargetOrigin,h,k),y&&tb(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=J()),Me(y,this.relativeTarget)),w&&(this.animationValues=c,QS(c,u,this.latestValues,k,p,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ut(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=z.update(()=>{ii.hasAnimatedSinceResize=!0,this.currentAnimation=$S(0,pf,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(pf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Rg(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||J();const f=Le(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const h=Le(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Me(a,l),Vn(a,c),Mr(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new nb),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Zo("z",o,u,this.animationValues);for(let c=0;c{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(mf),this.root.sharedNodes.clear()}}}function ob(e){e.updateLayout()}function ab(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;i==="size"?Ve(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],g=Le(h);h.min=r[f].min,h.max=h.min+g}):Rg(i,n.layoutBox,r)&&Ve(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],g=Le(r[f]);h.max=h.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+g)});const a=Mn();Mr(a,r,n.layoutBox);const l=Mn();o?Mr(l,e.applyTransform(s,!0),n.measuredBox):Mr(l,r,n.layoutBox);const u=!Eg(a);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:g}=f;if(h&&g){const v=J();_r(v,n.layoutBox,h.layoutBox);const w=J();_r(w,r,g.layoutBox),jg(v,w)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=v,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function lb(e){br&&tn.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ub(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cb(e){e.clearSnapshot()}function mf(e){e.clearMeasurements()}function db(e){e.isLayoutDirty=!1}function fb(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function gf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function hb(e){e.resolveTargetDelta()}function pb(e){e.calcProjection()}function mb(e){e.resetSkewAndRotation()}function gb(e){e.removeLeadSnapshot()}function yf(e,t,n){e.translate=K(t.translate,0,n),e.scale=K(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function vf(e,t,n,r){e.min=K(t.min,n.min,r),e.max=K(t.max,n.max,r)}function yb(e,t,n,r){vf(e.x,t.x,n.x,r),vf(e.y,t.y,n.y,r)}function vb(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xb={duration:.45,ease:[.4,0,.1,1]},xf=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),wf=xf("applewebkit/")&&!xf("chrome/")?Math.round:Ae;function Sf(e){e.min=wf(e.min),e.max=wf(e.max)}function wb(e){Sf(e.x),Sf(e.y)}function Rg(e,t,n){return e==="position"||e==="preserve-aspect"&&!kS(ff(t),ff(n),.2)}function Sb(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const bb=Ag({attachResizeListener:(e,t)=>os(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Jo={current:void 0},Lg=Ag({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Jo.current){const e=new bb({});e.mount(window),e.setOptions({layoutScroll:!0}),Jo.current=e}return Jo.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),kb={pan:{Feature:IS},drag:{Feature:OS,ProjectionNode:Lg,MeasureLayout:Cg}};function bf(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&z.postRender(()=>i(t,ys(t)))}class Cb extends Gt{mount(){const{current:t}=this.node;t&&(this.unmount=k1(t,n=>(bf(this.node,n,"Start"),r=>bf(this.node,r,"End"))))}unmount(){}}class Pb extends Gt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=gs(os(this.node.current,"focus",()=>this.onFocus()),os(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function kf(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&z.postRender(()=>i(t,ys(t)))}class Tb extends Gt{mount(){const{current:t}=this.node;t&&(this.unmount=E1(t,n=>(kf(this.node,n,"Start"),(r,{success:s})=>kf(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const fl=new WeakMap,qo=new WeakMap,Eb=e=>{const t=fl.get(e.target);t&&t(e)},jb=e=>{e.forEach(Eb)};function Nb({root:e,...t}){const n=e||document;qo.has(n)||qo.set(n,{});const r=qo.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(jb,{root:e,...t})),r[s]}function Ab(e,t,n){const r=Nb(t);return fl.set(e,n),r.observe(e),()=>{fl.delete(e),r.unobserve(e)}}const Rb={some:0,all:1};class Lb extends Gt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:Rb[s]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),h=u?c:f;h&&h(l)};return Ab(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Db(t,n))&&this.startObserver()}unmount(){}}function Db({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Fb={inView:{Feature:Lb},tap:{Feature:Tb},focus:{Feature:Pb},hover:{Feature:Cb}},Mb={layout:{ProjectionNode:Lg,MeasureLayout:Cg}},hl={current:null},Dg={current:!1};function _b(){if(Dg.current=!0,!!fu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>hl.current=e.matches;e.addListener(t),t()}else hl.current=!1}const Vb=[...sg,pe,zt],Ob=e=>Vb.find(rg(e)),Cf=new WeakMap;function Ib(e,t,n){for(const r in t){const s=t[r],i=n[r];if(ge(s))e.addValue(r,s);else if(ge(i))e.addValue(r,ss(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,ss(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Pf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Bb{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Iu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=it.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),Dg.current||_b(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:hl.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Cf.delete(this.current),this.projection&&this.projection.unmount(),Ut(this.notifyUpdate),Ut(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=xn.has(t),s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&z.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in qn){const n=qn[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):J()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ss(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(tg(s)||Hm(s))?s=parseFloat(s):!Ob(s)&&zt.test(n)&&(s=Jm(t,n)),this.setBaseTarget(t,ge(s)?s.get():s)),ge(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const o=xu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(s=o[t])}if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ge(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Du),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Fg extends Bb{constructor(){super(...arguments),this.KeyframeResolver=ig}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ge(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Ub(e){return window.getComputedStyle(e)}class zb extends Fg{constructor(){super(...arguments),this.type="html",this.renderInstance=Sm}readValueFromInstance(t,n){if(xn.has(n)){const r=Ou(n);return r&&r.default||0}else{const r=Ub(t),s=(vm(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return bg(t,n)}build(t,n,r){bu(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Tu(t,n,r)}}class $b extends Fg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=J}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(xn.has(n)){const r=Ou(n);return r&&r.default||0}return n=bm.has(n)?n:gu(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Pm(t,n,r)}build(t,n,r){ku(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){km(t,n,r,s)}mount(t){this.isSVGTag=Pu(t.tagName),super.mount(t)}}const Wb=(e,t)=>vu(e)?new $b(t):new zb(t,{allowProjection:e!==x.Fragment}),Kb=g1({...pS,...Fb,...kb,...Mb},Wb),O=Rx(Kb);function Mg(){return(localStorage.getItem("apiBase")||"").replace(/\/+$/,"")}function vs(e){const t=Mg(),n=e.startsWith("/")?e:`/${e}`;return t?`${t}${n}`:n}async function $u(e){const t=await fetch(vs(e));if(!t.ok)throw new Error(await t.text());return t.json()}async function vt(e,t){const n=await fetch(vs(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw new Error(await n.text());return n.json()}const Hb=()=>{const e=Mg();if(e)try{const r=new URL(e.includes("://")?e:`http://${e}`);return`${r.protocol==="https:"?"wss:":"ws:"}//${r.host}/ws`}catch{}const t=window.location;return`${t.protocol==="https:"?"wss:":"ws:"}//${t.host}/ws`};function Gb(e){const[t,n]=x.useState(!1),r=x.useRef(e);return r.current=e,x.useEffect(()=>{let s=!1,i=0,o,a=null;const l=()=>{s||(a=new WebSocket(Hb()),a.onopen=()=>{i=0,n(!0),a==null||a.send("ping")},a.onclose=()=>{n(!1),i+=1,o=setTimeout(l,Math.min(8e3,500+i*400))},a.onerror=()=>a==null?void 0:a.close(),a.onmessage=u=>r.current(String(u.data)))};return l(),()=>{s=!0,clearTimeout(o),a==null||a.close()}},[]),t}const _g=x.createContext(null),Wu=5e3,Ku="pn532_browser_log_v1";function Xb(){try{const e=sessionStorage.getItem(Ku);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(-Wu):[]}catch{return[]}}function Qb(e){try{sessionStorage.setItem(Ku,JSON.stringify(e.slice(-Wu)))}catch{}}function Yb(e,t,n){if(typeof e=="object"&&e&&"present"in e&&e.present===!1){t(null),n(!1);return}n(!0),typeof e=="object"&&e&&"uid"in e&&t(e)}function Zb(e){if(!e||typeof e!="object")return!1;const t=e;return t.present===!1?!1:typeof t.uid=="string"&&t.uid.length>0}function Jb(e){return!e||typeof e!="object"?!1:e.event==="recorded"}function qb({children:e}){const[t,n]=x.useState(null),[r,s]=x.useState(!1),[i,o]=x.useState(()=>Xb()),[a,l]=x.useState(0),[u,c]=x.useState("tag"),f=x.useRef(0),h=x.useCallback(y=>{const b=Date.now();y==="tag"&&b-f.current<280||(f.current=b,c(y),l(k=>k+1))},[]),g=x.useCallback(y=>{try{const b=JSON.parse(y),k=b.channel||"unknown";o(C=>{const E=[...C,{t:Date.now(),channel:k,payload:b.payload}].slice(-Wu);return Qb(E),E}),k==="scan"?(Yb(b.payload,n,s),Zb(b.payload)&&h("tag")):k==="capture"&&Jb(b.payload)&&h("vault")}catch{}},[h]),v=Gb(g),w=x.useCallback((y,b)=>{if(!y){n(null),s(!1);return}b&&(n(b),s(!0),h("tag"))},[h]),S=x.useCallback(()=>{o([]),sessionStorage.removeItem(Ku)},[]),m=x.useCallback(()=>{const y=new Blob([JSON.stringify(i,null,2)],{type:"application/json"}),b=URL.createObjectURL(y),k=document.createElement("a");k.href=b,k.download=`pn532-browser-log-${Date.now()}.json`,k.click(),URL.revokeObjectURL(b)},[i]),p=x.useMemo(()=>({wsOk:v,lastTag:t,tagPresent:r,log:i,cashWave:a,cashVariant:u,clearBrowserLog:S,exportBrowserLog:m,applyScanPoll:w}),[v,t,r,i,a,u,S,m,w]);return d.jsx(_g.Provider,{value:p,children:e})}function xs(){const e=x.useContext(_g);if(!e)throw new Error("useNfcWs outside NfcWsProvider");return e}function e2(){const{log:e,exportBrowserLog:t,clearBrowserLog:n,wsOk:r}=xs();return d.jsxs("div",{className:"flash-log-bar relative z-40 mx-auto flex max-w-6xl flex-wrap items-center justify-between gap-2 overflow-hidden border-b border-bubble-accent/15 px-4 py-2.5 font-mono text-[10px] text-bubble-mint/80 sm:text-xs",children:[d.jsx("div",{className:"pointer-events-none absolute inset-0 overflow-hidden",children:d.jsx("div",{className:"absolute inset-y-0 left-0 w-1/3 bg-gradient-to-r from-bubble-accent/10 to-transparent animate-shimmerLine"})}),d.jsxs("div",{className:"relative flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-1",children:[d.jsx("span",{className:"shrink-0 animate-pulse text-bubble-volt",children:"◆"}),d.jsxs("span",{className:"truncate",children:[d.jsx("span",{className:"text-bubble-accent/70",children:"BUF"})," ",d.jsx("span",{className:"text-glow-matrix font-bold text-bubble-mint",children:e.length}),d.jsx("span",{className:"text-bubble-mint/40",children:"_evt"})]}),d.jsx("span",{className:"hidden text-bubble-mint/20 sm:inline",children:"│"}),d.jsxs("span",{children:[d.jsx("span",{className:"text-bubble-accent/60",children:"WS"})," ",d.jsx("span",{className:r?"text-glow-matrix font-bold tracking-wide text-bubble-mint":"animate-pulse text-glow-rose font-semibold text-bubble-rose",children:r?"SYNC":"WAIT"})]})]}),d.jsxs("div",{className:"relative flex shrink-0 gap-2",children:[d.jsx("button",{type:"button",onClick:t,className:"btn-neon rounded-md border border-bubble-accent/50 bg-gradient-to-r from-bubble-accent/25 to-bubble-mint/15 px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider text-bubble-accent sm:text-xs",children:"Exfil"}),d.jsx("button",{type:"button",onClick:n,className:"rounded-md border border-bubble-rose/40 bg-bubble-rose/10 px-3 py-1.5 text-[10px] font-bold uppercase tracking-wide text-bubble-rose transition hover:border-bubble-rose hover:bg-bubble-rose/20 sm:text-xs",children:"Purge"})]})]})}function t2(){return d.jsxs("div",{className:"pointer-events-none fixed inset-0 z-[2] overflow-hidden",children:[d.jsx("div",{className:"absolute -left-[20%] top-[10%] h-[min(70vh,520px)] w-[min(70vh,520px)] rounded-full bg-fuchsia-600/25 blur-[100px] animate-pulseGlow",style:{animationDelay:"0s"}}),d.jsx("div",{className:"absolute -right-[15%] bottom-[5%] h-[min(55vh,440px)] w-[min(55vh,440px)] rounded-full bg-cyan-400/20 blur-[90px] animate-pulseGlow",style:{animationDelay:"1.2s"}}),d.jsx("div",{className:"absolute left-[35%] top-[40%] h-[min(45vh,360px)] w-[min(45vh,360px)] -translate-x-1/2 -translate-y-1/2 rounded-full bg-emerald-400/15 blur-[80px] animate-floatSlow"}),d.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,transparent_0%,rgba(2,4,8,0.75)_100%)]"})]})}const Tf=16,n2=7;function r2(){var e;try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const n=new t,r=n.createGain();r.gain.value=.11,r.connect(n.destination);const s=(c,f,h)=>{const g=n.createOscillator(),v=n.createGain();g.type="sine",g.frequency.setValueAtTime(c,f),v.gain.setValueAtTime(0,f),v.gain.linearRampToValueAtTime(1,f+.02),v.gain.exponentialRampToValueAtTime(.01,f+h),g.connect(v),v.connect(r),g.start(f),g.stop(f+h+.05)},i=n.currentTime;s(523.25,i,.11),s(659.25,i+.055,.13),s(783.99,i+.1,.16),s(1046.5,i+.14,.2);const o=n.createBufferSource(),a=n.createBuffer(1,n.sampleRate*.07,n.sampleRate),l=a.getChannelData(0);for(let c=0;cvoid n.close(),700)}catch{}}function s2(){const{cashWave:e,cashVariant:t,lastTag:n}=xs(),[r,s]=x.useState(!1),[i,o]=x.useState(0);return x.useEffect(()=>{if(e===0)return;o(e),s(!0),r2();const a=window.setTimeout(()=>s(!1),1650);return()=>window.clearTimeout(a)},[e]),d.jsx("div",{className:"pointer-events-none fixed left-2 top-[4.25rem] z-[55] sm:left-4 sm:top-[4.5rem] md:top-[5.25rem]",children:d.jsx(am,{mode:"wait",children:r?d.jsxs(O.div,{className:"relative flex flex-col items-start",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,scale:.92,filter:"blur(4px)"},transition:{duration:.4},children:[d.jsx(O.div,{className:"absolute -left-8 -top-8 h-40 w-40 rounded-full bg-gradient-to-br from-amber-400/45 via-yellow-200/30 to-bubble-mint/35 blur-2xl",initial:{scale:.2,opacity:0},animate:{scale:[.2,1.35,1],opacity:[0,1,.7]},transition:{duration:.5,ease:[.22,1,.36,1]}}),Array.from({length:Tf}).map((a,l)=>{const u=l/Tf*Math.PI*2,c=56+l%4*10;return d.jsx(O.span,{className:"absolute left-8 top-9 h-2 w-2 rounded-full bg-gradient-to-br from-yellow-100 to-amber-500 shadow-[0_0_12px_rgba(250,204,21,1)]",initial:{x:0,y:0,opacity:0,scale:0},animate:{x:Math.cos(u)*c,y:Math.sin(u)*c,opacity:[0,1,0],scale:[0,1.3,.3]},transition:{duration:.8,delay:l*.018,ease:"easeOut"}},`s-${l}`)}),Array.from({length:n2}).map((a,l)=>d.jsx(O.span,{className:"absolute left-8 top-8 text-xl sm:text-2xl",initial:{x:0,y:0,opacity:0,rotate:-30,scale:0},animate:{x:(l%2===0?1:-1)*(36+l*12),y:-32-l*11,opacity:[0,1,0],rotate:l*35,scale:[0,1.15,.85]},transition:{duration:.9,delay:.04+l*.035,ease:[.22,1,.36,1]},children:"🪙"},`c-${l}`)),d.jsxs(O.div,{className:"relative flex h-[4.75rem] w-[4.75rem] items-center justify-center sm:h-[5.5rem] sm:w-[5.5rem]",initial:{scale:0,rotate:-40},animate:{scale:[0,1.3,.92,1.06,1],rotate:[-40,12,-6,3,0]},transition:{duration:.7,ease:[.34,1.56,.64,1]},children:[d.jsx(O.div,{className:"absolute inset-0 rounded-2xl border-2 border-yellow-200/90",animate:{boxShadow:["0 0 25px rgba(250,204,21,0.55), inset 0 0 22px rgba(254,240,138,0.2)","0 0 50px rgba(0,255,157,0.5), inset 0 0 28px rgba(0,229,255,0.15)","0 0 28px rgba(250,204,21,0.6), inset 0 0 18px rgba(254,240,138,0.25)"]},transition:{duration:1.1,repeat:2}}),d.jsxs("svg",{viewBox:"0 0 100 100",className:"relative z-[1] h-[72%] w-[72%] drop-shadow-[0_0_14px_rgba(250,204,21,0.9)]","aria-hidden":!0,children:[d.jsxs("defs",{children:[d.jsxs("linearGradient",{id:"cashGold",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d.jsx("stop",{offset:"0%",stopColor:"#fef9c3"}),d.jsx("stop",{offset:"40%",stopColor:"#facc15"}),d.jsx("stop",{offset:"100%",stopColor:"#a16207"})]}),d.jsxs("filter",{id:"cashGlow",x:"-50%",y:"-50%",width:"200%",height:"200%",children:[d.jsx("feGaussianBlur",{stdDeviation:"1.2",result:"b"}),d.jsxs("feMerge",{children:[d.jsx("feMergeNode",{in:"b"}),d.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),d.jsx("circle",{cx:"50",cy:"50",r:"44",fill:"url(#cashGold)",filter:"url(#cashGlow)"}),d.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"#422006",strokeOpacity:"0.28",strokeWidth:"2"}),d.jsx("text",{x:"50",y:"64",textAnchor:"middle",fill:"#713f12",fontSize:"54",fontWeight:"700",fontFamily:"Audiowide, Orbitron, system-ui, sans-serif",children:"$"})]}),d.jsx(O.div,{className:"pointer-events-none absolute inset-0 overflow-hidden rounded-2xl",initial:!1,children:d.jsx(O.div,{className:"absolute inset-y-2 w-2/5 bg-gradient-to-r from-transparent via-white/60 to-transparent skew-x-[-18deg]",initial:{left:"-40%"},animate:{left:"140%"},transition:{duration:.55,delay:.12,ease:"easeInOut"}})})]}),d.jsxs(O.div,{className:"relative -mt-0.5 max-w-[12rem] pl-0.5",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.12,type:"spring",stiffness:320,damping:22},children:[d.jsx(O.p,{className:"font-display text-[10px] tracking-[0.42em] text-yellow-100 sm:text-[11px]",animate:{textShadow:["0 0 10px rgba(250,204,21,0.95)","0 0 22px rgba(0,255,157,0.75)","0 0 12px rgba(250,204,21,0.9)"]},transition:{duration:.75,repeat:3},children:t==="vault"?"VAULT · LOCKED":"CHA-CHING · HIT"}),n!=null&&n.uid?d.jsx(O.p,{className:"mt-1 truncate font-mono text-[10px] font-bold tracking-[0.15em] text-bubble-mint sm:text-xs",initial:{opacity:0,x:-6},animate:{opacity:1,x:0},transition:{delay:.22},children:n.uid}):null]})]},i):null})})}const Vg=x.createContext(()=>{});function i2({children:e}){const[t,n]=x.useState([]),r=x.useCallback((i,o="info")=>{const a=Date.now();n(l=>[...l,{id:a,msg:i,kind:o}]),setTimeout(()=>n(l=>l.filter(u=>u.id!==a)),4200)},[]),s=x.useMemo(()=>r,[r]);return d.jsxs(Vg.Provider,{value:s,children:[e,d.jsx("div",{className:"pointer-events-none fixed bottom-5 right-5 z-[60] flex max-w-sm flex-col gap-3",children:d.jsx(am,{children:t.map(i=>d.jsxs(O.div,{initial:{opacity:0,x:40,rotate:-2,scale:.92},animate:{opacity:1,x:0,rotate:0,scale:1},exit:{opacity:0,x:20,scale:.9},transition:{type:"spring",stiffness:380,damping:26},className:`pointer-events-auto relative overflow-hidden border-2 px-5 py-3.5 font-mono text-xs backdrop-blur-md ${i.kind==="err"?"border-bubble-rose bg-bubble-950/95 text-bubble-rose shadow-glowRose":"border-bubble-mint bg-bubble-900/95 text-bubble-mint shadow-glow"} `,children:[d.jsx("div",{className:`pointer-events-none absolute inset-0 opacity-30 ${i.kind==="err"?"bg-gradient-to-r from-bubble-rose/20 to-transparent":"bg-gradient-to-r from-bubble-accent/20 to-bubble-mint/10"}`}),d.jsx("span",{className:"relative mr-2 font-black opacity-80",children:i.kind==="err"?"!!":"»"}),d.jsx("span",{className:"relative",children:i.msg})]},i.id))})})]})}function Je(){return x.useContext(Vg)}function o2(e){const t=e.replace(/\s/g,"");if(t.length!==32)return null;const n=new Uint8Array(16);for(let u=0;u<16;u++)n[u]=parseInt(t.slice(u*2,u*2+2),16);const r=n[6],s=n[7],i=n[8],o=r>>4&1|s>>0&2|i>>0&4,a=r>>5&1|s>>1&2|i>>1&4,l=r>>6&1|s>>2&2|i>>2&4;return{c1:o,c2:a,c3:l}}function Og(e){switch(e){case 0:return"Ultralight / NTAG / Type 2";case 8:return"MIFARE Classic 1K";case 9:return"MIFARE Mini";case 24:return"MIFARE Classic 4K";default:return`SAK 0x${e.toString(16).toUpperCase()}`}}function Ig(e){var n;const t=e.replace(/\s/g,"");return t.length%2!==0?e:((n=t.match(/.{2}/g))==null?void 0:n.join(":"))??t}function a2(e){switch(e){case 1:return"Classic-style (MIFARE)";case 2:return"Type 2 / Ultralight-style";default:return"Unknown (check SAK/ATQA)"}}function l2(e){const t=[];return e.uidLen===4?t.push("4-byte UID — single cascade level (CL1)."):e.uidLen===7?t.push("7-byte UID — double cascade (CL1 + CL2) typical for 7B tags."):e.uidLen===10&&t.push("10-byte UID — triple cascade path."),e.sak===0&&t.push("SAK 0x00 — typical Type 2 / Ultralight-style path; use page read/write."),(e.sak===8||e.sak===9||e.sak===24)&&t.push("MIFARE Classic family — authenticate per sector trailer, then block read/write."),(e.atqa===1024||e.atqa===17408)&&t.push("ATQA 0x0400/0x4400 class — common Type A / MIFARE inventory shapes."),t}function u2(e){return e.map(t=>(Number(t)&255).toString(16).toUpperCase().padStart(2,"0")).join(" ")}function c2({className:e=""}){return d.jsx("div",{className:`relative ${e}`.trim(),children:d.jsxs("svg",{viewBox:"0 0 400 220",className:"h-auto w-full max-w-md text-bubble-mint/90","aria-hidden":!0,children:[d.jsxs("defs",{children:[d.jsxs("linearGradient",{id:"g1",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d.jsx("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.9"}),d.jsx("stop",{offset:"100%",stopColor:"#00e5ff",stopOpacity:"0.35"})]}),d.jsxs("filter",{id:"glow",children:[d.jsx("feGaussianBlur",{stdDeviation:"2",result:"b"}),d.jsxs("feMerge",{children:[d.jsx("feMergeNode",{in:"b"}),d.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),[0,1,2,3].map(t=>d.jsx("ellipse",{cx:"200",cy:"110",rx:40+t*38,ry:28+t*26,fill:"none",stroke:"currentColor",strokeWidth:"0.6",strokeOpacity:.22-t*.04,className:"origin-center animate-[spin_32s_linear_infinite]",style:{transformOrigin:"200px 110px",animationDelay:`${t*2}s`}},t)),d.jsx("g",{filter:"url(#glow)",children:d.jsx("path",{d:"M200 110 L360 110 A160 80 0 0 1 200 190 Z",fill:"url(#g1)",fillOpacity:"0.12",className:"origin-center animate-[spin_6s_linear_infinite]",style:{transformOrigin:"200px 110px"}})}),d.jsx("circle",{cx:"200",cy:"110",r:"36",fill:"none",stroke:"currentColor",strokeWidth:"1.2",opacity:"0.5"}),d.jsx("circle",{cx:"200",cy:"110",r:"22",fill:"none",stroke:"#00e5ff",strokeWidth:"0.8",opacity:"0.45"}),d.jsx("circle",{cx:"200",cy:"110",r:"8",fill:"currentColor",opacity:"0.35"}),Array.from({length:12}).map((t,n)=>{const r=n/12*Math.PI*2,s=200+Math.cos(r)*118,i=110+Math.sin(r)*78;return d.jsx("rect",{x:s-1,y:i-1,width:"2",height:"2",fill:"currentColor",opacity:.15+n%3*.08,className:"animate-pulse",style:{animationDelay:`${n*.15}s`}},n)}),d.jsx("text",{x:"200",y:"205",textAnchor:"middle",className:"fill-bubble-mint/40 font-mono text-[9px] tracking-[0.35em]",children:"13.56MHZ"})]})})}function d2(){const e=Je(),{lastTag:t,applyScanPoll:n}=xs(),[r,s]=x.useState(null),[i,o]=x.useState(!0),a=()=>{$u("/api/status").then(s).catch(()=>e("Status unreachable","err"))};x.useEffect(()=>{a();const c=setInterval(a,3e3);return()=>clearInterval(c)},[e]),x.useEffect(()=>{r&&typeof r.scanning=="boolean"&&o(r.scanning)},[r]);const l=async()=>{try{await vt("/api/nfc/scan",{enable:!i}),o(!i),e(i?"Continuous scan off":"Continuous scan on")}catch(c){e(String(c),"err")}},u=async()=>{try{const c=await vt("/api/nfc/poll",{});c.present&&c.tag?(n(!0,c.tag),e(`Tag ${c.tag.uid}`)):(n(!1),e("No tag"))}catch(c){e(String(c),"err")}};return d.jsxs("div",{className:"space-y-8",children:[d.jsxs(O.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.5,ease:[.22,1,.36,1]},className:"glass relative overflow-hidden p-6 md:p-10",children:[d.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[conic-gradient(from_180deg_at_50%_120%,rgba(0,229,255,0.08),transparent_40%,rgba(255,42,109,0.06),transparent_70%)]"}),d.jsxs("div",{className:"relative grid gap-8 lg:grid-cols-[1fr_min(320px,40%)] lg:items-center",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-mono text-[10px] font-bold tracking-[0.4em] text-bubble-accent/80",children:"COMMAND_LAYER"}),d.jsxs("h1",{className:"font-display mt-2 text-3xl font-normal tracking-wide text-glow-matrix md:text-5xl",children:["NFC ",d.jsx("span",{className:"text-bubble-accent",children:"CONTROL"})]}),d.jsx("p",{className:"mt-3 max-w-xl text-sm leading-relaxed text-slate-400",children:"Full-time scan out of the box. Fat RF retries. Browser log + device session export — crank it from your phone."}),(r==null?void 0:r.session)&&(r.session.deepCapture||r.session.usedBytes>0)&&d.jsxs(O.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},className:"mt-5 flex flex-wrap items-center gap-3 rounded-xl border border-bubble-accent/40 bg-gradient-to-r from-bubble-accent/15 to-bubble-mint/10 px-4 py-3 text-sm shadow-glowCyan",children:[d.jsxs("span",{className:"font-mono text-bubble-mint",children:["RAM ",r.session.usedBytes,"/",r.session.maxBytes,r.session.full?" · LOCKED":""]}),d.jsx(sm,{to:"/capture",className:"btn-neon rounded-lg bg-bubble-mint/20 px-3 py-1 text-xs font-bold text-bubble-mint",children:"Read-all →"})]}),d.jsxs("div",{className:"mt-8 flex flex-wrap gap-3",children:[d.jsx(O.button,{type:"button",whileHover:{scale:1.04},whileTap:{scale:.98},onClick:u,className:"btn-neon rounded-xl bg-gradient-to-r from-bubble-accent via-cyan-400 to-bubble-mint px-6 py-3 text-sm font-black uppercase tracking-wider text-bubble-950 shadow-neonBtn",children:"Poll tag"}),d.jsx(O.button,{type:"button",whileHover:{scale:1.03},whileTap:{scale:.98},onClick:l,className:`rounded-xl border-2 px-6 py-3 text-sm font-bold uppercase tracking-wide transition ${i?"border-bubble-mint/70 bg-bubble-mint/15 text-glow-matrix text-bubble-mint shadow-glow":"border-white/20 bg-black/30 text-slate-400 hover:border-bubble-accent/50 hover:text-bubble-accent"}`,children:i?"Stop scan":"Start scan"})]})]}),d.jsx("div",{className:"relative flex justify-center lg:justify-end",children:d.jsx("div",{className:"relative w-full max-w-[280px] opacity-90 drop-shadow-[0_0_40px_rgba(0,229,255,0.35)]",children:d.jsx(c2,{})})})]})]}),d.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[d.jsxs(O.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.08},className:"glass p-6",children:[d.jsx("h2",{className:"font-display text-lg font-normal text-bubble-accent text-glow-cyan",children:"Device stack"}),r?d.jsxs("ul",{className:"mt-4 space-y-3 font-mono text-sm text-slate-300",children:[d.jsxs("li",{className:"flex justify-between border-b border-white/5 pb-2",children:[d.jsx("span",{className:"text-slate-500",children:"uptime"}),d.jsxs("span",{className:"text-bubble-mint",children:[(r.uptimeMs/1e3).toFixed(1),"s"]})]}),d.jsxs("li",{className:"flex justify-between border-b border-white/5 pb-2",children:[d.jsx("span",{className:"text-slate-500",children:"heap"}),d.jsx("span",{className:"text-white",children:r.freeHeap})]}),d.jsxs("li",{className:"flex justify-between",children:[d.jsx("span",{className:"text-slate-500",children:"PN532"}),d.jsx("span",{className:"text-bubble-accent",children:r.pn532?`IC${r.pn532.ic} v${r.pn532.fwHi}.${r.pn532.fwLo}`:"n/a"})]})]}):d.jsx("p",{className:"mt-4 animate-pulse font-mono text-sm text-bubble-accent/60",children:"Pulling status…"})]}),d.jsxs(O.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.14},className:"glass p-6",children:[d.jsx("h2",{className:"font-display text-lg font-normal text-bubble-rose/90 text-glow-rose",children:"Live tag"}),t?d.jsxs("div",{className:"mt-4 space-y-4 rounded-xl border border-bubble-mint/25 bg-black/35 p-4 shadow-glow",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-[10px] font-mono uppercase tracking-widest text-bubble-mint/50",children:"UID"}),d.jsx("div",{className:"font-mono text-xl font-bold tracking-[0.15em] text-glow-matrix text-bubble-mint md:text-2xl",children:Ig(t.uid)}),d.jsxs("p",{className:"mt-1 font-mono text-[11px] text-slate-500",children:["raw ",t.uid," · ",t.uidLen," byte",t.uidLen===1?"":"s"]})]}),d.jsxs("div",{className:"grid gap-3 border-t border-white/5 pt-3 font-mono text-[11px] text-slate-300 sm:grid-cols-2",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-slate-500",children:"ATQA"})," ",d.jsxs("span",{className:"text-bubble-accent",children:["0x",(t.atqaHex??t.atqa.toString(16).toUpperCase().padStart(4,"0")).slice(-4)]}),d.jsxs("span",{className:"ml-2 text-slate-500",children:["(",t.atqa,")"]})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-slate-500",children:"SAK"})," ",d.jsxs("span",{className:"text-bubble-accent",children:["0x",(t.sakHex??t.sak.toString(16).toUpperCase().padStart(2,"0")).slice(-2)]}),d.jsxs("span",{className:"ml-1 text-slate-400",children:["— ",Og(t.sak)]})]}),d.jsxs("div",{className:"sm:col-span-2",children:[d.jsx("span",{className:"text-slate-500",children:"Guess"})," ",d.jsx("span",{className:"text-bubble-mint",children:t.typeGuess??a2(t.typeHint)}),d.jsxs("span",{className:"ml-2 text-slate-600",children:["· hint ",t.typeHint]})]})]}),t.pn532GeneralStatus&&t.pn532GeneralStatus.length>0&&d.jsxs("div",{className:"rounded-lg border border-bubble-accent/20 bg-black/40 p-3",children:[d.jsx("p",{className:"text-[10px] font-mono uppercase tracking-widest text-bubble-accent/70",children:"PN532 general status"}),d.jsx("p",{className:"mt-2 break-all font-mono text-[10px] leading-relaxed text-slate-400",children:u2(t.pn532GeneralStatus)}),d.jsx("p",{className:"mt-2 text-[10px] text-slate-600",children:"Raw bytes from the chip right after this inventory (error flags, last command, tag count — see NXP PN532 user manual)."})]}),d.jsx("ul",{className:"space-y-1 border-t border-white/5 pt-3 text-[11px] leading-relaxed text-slate-500",children:l2(t).map((c,f)=>d.jsxs("li",{className:"flex gap-2",children:[d.jsx("span",{className:"text-bubble-mint/40",children:"▸"}),d.jsx("span",{children:c})]},f))})]}):d.jsx("p",{className:"mt-6 font-mono text-sm text-bubble-mint/40",children:"Listening on the field…"})]})]})]})}function f2(){const e=Je(),[t,n]=x.useState("FFFFFFFFFFFF"),[r,s]=x.useState(!1),[i,o]=x.useState(0),[a,l]=x.useState(""),[u,c]=x.useState(""),f=async()=>{try{const v=await vt("/api/mifare/read-block",{block:i,key:t,keyB:r});v.data?(l(v.data),e("Read OK")):e(v.error||"failed","err")}catch(v){e(String(v),"err")}},h=async()=>{try{const v=await vt("/api/ul/read-page",{page:i});v.data&&(l(v.data+" (UL page)"),e("UL read OK"))}catch(v){e(String(v),"err")}},g=u?o2(u):null;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"glass p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Read / analyze"}),d.jsx("p",{className:"mt-2 text-sm text-slate-400",children:"Authenticate with a known key, dump a block, paste a sector trailer to decode access bits."}),d.jsxs("div",{className:"mt-6 grid gap-4 md:grid-cols-2",children:[d.jsxs("label",{className:"block space-y-2 text-sm",children:["Key (12 hex)",d.jsx("input",{value:t,onChange:v=>n(v.target.value),className:"w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono text-bubble-mint outline-none ring-bubble-accent/40 focus:ring-2"})]}),d.jsxs("label",{className:"flex items-end gap-3 text-sm",children:[d.jsx("input",{type:"checkbox",checked:r,onChange:v=>s(v.target.checked)})," Key B"]}),d.jsxs("label",{className:"block space-y-2 text-sm",children:["Block / page",d.jsx("input",{type:"number",value:i,onChange:v=>o(Number(v.target.value)),className:"w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2 outline-none ring-bubble-accent/40 focus:ring-2"})]})]}),d.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:f,className:"rounded-2xl bg-bubble-accent/90 px-4 py-2 font-semibold text-white",children:"MIFARE read block"}),d.jsx("button",{type:"button",onClick:h,className:"rounded-2xl border border-white/15 px-4 py-2",children:"Ultralight read page"})]}),a&&d.jsx("pre",{className:"mt-4 overflow-auto rounded-2xl border border-white/10 bg-black/30 p-4 font-mono text-sm",children:a})]}),d.jsxs("div",{className:"glass p-6",children:[d.jsx("h2",{className:"font-display text-lg font-semibold",children:"Sector trailer playground"}),d.jsxs("label",{className:"mt-4 block text-sm",children:["16-byte trailer (32 hex) — bytes 6–8 are access bytes",d.jsx("textarea",{value:u,onChange:v=>c(v.target.value),rows:3,className:"mt-2 w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-xs outline-none focus:ring-2 focus:ring-bubble-accent/40"})]}),g&&d.jsxs("div",{className:"mt-4 rounded-2xl border border-bubble-mint/30 bg-bubble-mint/5 p-4 text-sm",children:["Parsed C1–C3 nibble pattern: ",g.c1," ",g.c2," ",g.c3," (see NXP MIFARE docs for truth tables)"]}),d.jsxs("p",{className:"mt-4 text-xs text-slate-500",children:["SAK hints: common values for labeling only — ",Og(24)," etc."]})]})]})}const ws="Lab-only synthetic data and well-known defaults. Edit bytes freely to validate parsers, checksums, and emulate/raw paths — never treat these as real tags.",Ef=[{id:"get-fw",title:"GetFirmwareVersion (0x02)",hex:"02",detail:"Expect PN532 firmware major/minor in response payload."},{id:"get-status",title:"GetGeneralStatus (0x04)",hex:"04",detail:"Chip + RF status snapshot; useful sanity check after a stuck session."},{id:"in-list-a",title:"InListPassiveTarget — 106 kbps, 1 target",hex:"4A0100",detail:"Poll one ISO14443-A target at 106 kbps (maxTg=1, BrTy=0)."}],jf=[{id:"tg-stub",title:"TgInitAsTarget — opcode only (shell)",hex:"8C",detail:"Minimal placeholder; real target mode needs a full parameter block per NXP UM0701. Extend with NFCID, FeliCa params, etc."},{id:"tg-type-a-sketch",title:"TgInitAsTarget — Type A sketch (synthetic NFCID3T)",hex:"8C000012DEADBEEF00000000000000000000000000000000000000000000000000",detail:"Synthetic 0x8C prefix + padded fake ID — not guaranteed to satisfy any reader; use as a byte-editing template only."}],h2="DEADBEEF2208040000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFF078069FFFFFFFFFFFF",p2="04112233445566172233445566172233445566172233445566172233",m2="0310D1010C55046578616D706C652E636F6DFE",pl=[{id:"mifare-block0",title:"MIFARE Classic — block 0 (16 B, synthetic UID+BCC)",hex:"DEADBEEF220804000000000000000000",byteLength:16,sha256Hex:"6f13f064d70ec33b7ace5842011d66aff3852baa4ab7c0a85aa66d113c7189fe",detail:"Fake 4-byte UID (DE:AD:BE:EF wire order as stored), BCC = XOR(UID), rest filler. Pair with key FFFFFFFFFFFF on a writable tag only."},{id:"mifare-sector0",title:"MIFARE Classic — sector 0 dump (64 B)",hex:h2,byteLength:64,sha256Hex:"11095df4db11e4271f40234533db45de35c4ca69f04e231e3fa47f38181e0168",detail:"Four blocks: manufacturer/UID, empty, empty, default trailer (Key A/B FFFFFFFFFFFF, access FF078069). Edit block 1–2 payload and re-hash to validate your pipeline."},{id:"ntag-pages",title:"NTAG-style — pages 0–6 (28 B)",hex:p2,byteLength:28,sha256Hex:"8ffd95e646b2deb218dabd72e35c7a1938725e07332d8ed7df4f2a2656e590a0",detail:"Synthetic UID/internal/lock placeholders — not copied from a physical tag."},{id:"ndef-uri-tlv",title:"NDEF TLV — URI https://example.com/",hex:m2,byteLength:19,sha256Hex:"81197b6cd6e40a3f62f56f0c0f3f449c63a956919d04c5b5317895ad4328fa14",detail:"Type 2 TLV (0x03) + short NDEF Well-Known URI record; append to user memory after static pages in real layouts."}],g2=["FFFFFFFFFFFF","A0A1A2A3A4A5","D3F7D3F7D3F7","000000000000","B0B1B2B3B4B5","AABBCCDDEEFF","4D3A99C351DD","1A982C7E459A","714C5C886E97","587EE5F9350F","A0478CC39091","26940B21FFF5","E4410EF8ED2D"],y2=pl.map(e=>({name:`LAB // ${e.title}`,hex:e.hex,note:e.detail}));function fo({mode:e,onApplyHex:t,onPickBinary:n,className:r=""}){const[s,i]=x.useState(0),o=()=>i(a=>a+1);return e==="raw"?d.jsx("div",{className:`flex flex-wrap items-center gap-2 ${r}`,children:d.jsxs("select",{defaultValue:"","aria-label":"Load PN532 lab command",className:"max-w-full rounded-xl border border-bubble-mint/25 bg-black/40 px-3 py-2 font-mono text-xs text-bubble-mint/90",onChange:a=>{const l=a.target.value;if(!l)return;const u=Ef.find(c=>c.id===l);u&&t(u.hex),o()},children:[d.jsx("option",{value:"",children:"Lab: PN532 command bytes…"}),Ef.map(a=>d.jsx("option",{value:a.id,children:a.title},a.id))]},s)}):e==="emulate"?d.jsx("div",{className:`flex flex-wrap items-center gap-2 ${r}`,children:d.jsxs("select",{defaultValue:"","aria-label":"Load emulate lab frame",className:"max-w-full rounded-xl border border-bubble-mint/25 bg-black/40 px-3 py-2 font-mono text-xs text-bubble-mint/90",onChange:a=>{const l=a.target.value;if(!l)return;const u=jf.find(c=>c.id===l);u&&t(u.hex),o()},children:[d.jsx("option",{value:"",children:"Lab: emulate / TgInit…"}),jf.map(a=>d.jsx("option",{value:a.id,children:a.title},a.id))]},s)}):d.jsx("div",{className:`space-y-2 ${r}`,children:d.jsxs("select",{defaultValue:"","aria-label":"Load synthetic card blob",className:"w-full max-w-full rounded-xl border border-bubble-mint/25 bg-black/40 px-3 py-2 font-mono text-xs text-bubble-mint/90",onChange:a=>{const l=a.target.value;if(!l)return;const u=pl.find(c=>c.id===l);u&&(t(u.hex),n==null||n(u)),o()},children:[d.jsx("option",{value:"",children:"Lab: synthetic card / NDEF blob…"}),pl.map(a=>d.jsxs("option",{value:a.id,children:[a.title," (",a.byteLength," B)"]},a.id))]},s)})}function v2(){const e=Je(),{lastTag:t}=xs(),[n,r]=x.useState("FFFFFFFFFFFF"),[s,i]=x.useState(!1),[o,a]=x.useState(4),[l,u]=x.useState("00000000000000000000000000000000"),[c,f]=x.useState(null),[h,g]=x.useState(4),[v,w]=x.useState("00000000"),S=async()=>{const p=n.replace(/\s/g,""),y=l.replace(/\s/g,"");if(p.length!==12||!/^[0-9A-Fa-f]+$/.test(p)){e("Key must be exactly 12 hex digits","err");return}if(y.length!==32||!/^[0-9A-Fa-f]+$/.test(y)){e("Block data must be exactly 32 hex digits (16 bytes)","err");return}if(!Number.isInteger(o)||o<0||o>255){e("Block must be an integer 0–255","err");return}if(confirm("Write will modify tag memory. Continue?"))try{await vt("/api/mifare/write-block",{block:o,key:p,keyB:s,data:y}),e("Write OK")}catch(b){e(String(b),"err")}},m=async()=>{const p=v.replace(/\s/g,"");if(p.length!==8||!/^[0-9A-Fa-f]+$/.test(p)){e("UL data must be exactly 8 hex digits (4 bytes)","err");return}if(confirm("Ultralight page write — can brick OTP/lock bytes if misused. Continue?"))try{await vt("/api/ul/write-page",{page:h,data:p}),e("UL page write OK")}catch(y){e(String(y),"err")}};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Write / clone helpers"}),d.jsx("p",{className:"mt-2 text-sm text-slate-400",children:"Block editor for MIFARE Classic. Read blocks on the Read tab, adjust hex here, then write with a key that unlocks the sector."}),t&&d.jsxs("p",{className:"mt-2 rounded-lg border border-bubble-mint/20 bg-bubble-mint/5 px-3 py-2 font-mono text-xs text-bubble-mint",children:["Field: ",d.jsx("span",{className:"text-white",children:Ig(t.uid)})," ·"," ",t.typeGuess??`hint ${t.typeHint}`]}),d.jsx("p",{className:"mt-2 text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsx(fo,{mode:"binary",className:"mt-3",onApplyHex:p=>{const y=p.replace(/\s/g,"");y.length<=32?u(y):(u(y.slice(0,32)),e("First 16 bytes of lab blob loaded into block editor","info"))},onPickBinary:f}),c&&d.jsxs("p",{className:"mt-2 font-mono text-[10px] text-bubble-accent/90",children:["Canonical SHA-256 (",c.byteLength," B): ",c.sha256Hex," — changes after any edit"]})]}),d.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[d.jsxs("label",{className:"text-sm",children:["Key (12 hex)",d.jsx("input",{value:n,onChange:p=>r(p.target.value),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono"})]}),d.jsxs("label",{className:"flex items-end gap-2 text-sm",children:[d.jsx("input",{type:"checkbox",checked:s,onChange:p=>i(p.target.checked)})," Key B"]}),d.jsxs("label",{className:"text-sm",children:["Block",d.jsx("input",{type:"number",value:o,onChange:p=>a(Number(p.target.value)),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2"})]})]}),d.jsxs("label",{className:"block text-sm",children:["16 bytes (32 hex)",d.jsx("textarea",{value:l,onChange:p=>u(p.target.value),rows:4,className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-sm"})]}),d.jsx("button",{type:"button",onClick:S,className:"rounded-2xl bg-gradient-to-r from-bubble-rose to-orange-400 px-6 py-3 font-bold text-white shadow-glow",children:"Write block"}),d.jsxs("div",{className:"border-t border-white/10 pt-8",children:[d.jsx("h2",{className:"font-display text-lg font-bold text-bubble-accent",children:"Ultralight / NTAG page write"}),d.jsx("p",{className:"mt-2 text-sm text-slate-400",children:"4 bytes per page (8 hex). Keep tag on the coil. Avoid lock / config pages unless you mean it."}),d.jsxs("div",{className:"mt-4 grid gap-4 md:grid-cols-2",children:[d.jsxs("label",{className:"text-sm",children:["Page",d.jsx("input",{type:"number",value:h,onChange:p=>g(Number(p.target.value)),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2"})]}),d.jsxs("label",{className:"text-sm",children:["Data (8 hex)",d.jsx("input",{value:v,onChange:p=>w(p.target.value),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono"})]})]}),d.jsx("button",{type:"button",onClick:m,className:"mt-4 rounded-2xl border border-bubble-accent/50 bg-bubble-accent/20 px-6 py-3 font-bold text-bubble-accent",children:"Write UL page"})]})]})}const Nf="pn532_saved_tags_v1";function x2(){const e=Je(),[t,n]=x.useState([]),[r,s]=x.useState("My tag"),[i,o]=x.useState(""),[a,l]=x.useState(null);x.useEffect(()=>{try{const g=localStorage.getItem(Nf);n(g?JSON.parse(g):[])}catch{n([])}},[]);const u=g=>{localStorage.setItem(Nf,JSON.stringify(g)),n(g)},c=()=>{if(!i.trim()){e("Paste hex first","err");return}const v={id:`${Date.now()}-${Math.random().toString(16).slice(2)}`,name:r,hex:i.replace(/\s/g,""),ts:Date.now()};u([v,...t]),e("Saved")},f=g=>u(t.filter(v=>v.id!==g)),h=()=>{const g=new Set(t.map(S=>S.name)),v=Date.now(),w=y2.filter(S=>!g.has(S.name)).map((S,m)=>({id:`lab-seed-${v}-${m}`,name:S.name,hex:S.hex,ts:v}));if(!w.length){e("Lab catalog already in library","info");return}u([...w,...t]),e(`Seeded ${w.length} lab record(s)`)};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Saved tag library"}),d.jsx("p",{className:"text-sm text-slate-400",children:"Local browser storage — export by copy/paste."}),d.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsx("div",{className:"flex flex-wrap gap-2",children:d.jsx("button",{type:"button",onClick:h,className:"rounded-2xl border border-bubble-mint/30 bg-bubble-mint/10 px-4 py-2 font-mono text-xs font-semibold text-bubble-mint",children:"Seed all lab samples"})}),d.jsx(fo,{mode:"binary",onApplyHex:g=>o(g.replace(/\s/g,"")),onPickBinary:l}),a&&d.jsxs("div",{className:"rounded-xl border border-bubble-accent/25 bg-black/30 p-3 font-mono text-[10px] text-bubble-accent/90",children:[d.jsx("div",{className:"text-bubble-mint/70",children:"Expected SHA-256 (canonical blob, pre-edit)"}),d.jsx("div",{className:"break-all",children:a.sha256Hex})]}),d.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx("input",{value:r,onChange:g=>s(g.target.value),placeholder:"Label",className:"rounded-2xl border border-white/10 bg-black/25 px-4 py-2"}),d.jsx("button",{type:"button",onClick:c,className:"rounded-2xl bg-bubble-accent px-4 py-2 font-semibold",children:"Save current hex"})]}),d.jsx("textarea",{value:i,onChange:g=>o(g.target.value),placeholder:"Hex dump",rows:5,className:"w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-xs"}),d.jsx("ul",{className:"space-y-3",children:t.map(g=>d.jsxs("li",{className:"rounded-2xl border border-white/10 bg-black/20 p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[d.jsxs("div",{children:[d.jsx("div",{className:"font-display font-semibold",children:g.name}),d.jsx("div",{className:"text-xs text-slate-500",children:new Date(g.ts).toLocaleString()})]}),d.jsx("button",{type:"button",onClick:()=>f(g.id),className:"text-rose-300",children:"Remove"})]}),d.jsx("pre",{className:"mt-2 max-h-32 overflow-auto text-xs text-bubble-mint/90",children:g.hex}),d.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(g.hex),e("Copied")},className:"mt-2 text-sm text-slate-300 underline",children:"Copy hex"})]},g.id))})]})}const w2=["FFFFFFFFFFFF","A0A1A2A3A4A5","D3F7D3F7D3F7","000000000000"],Af="pn532_key_dict_v1";function S2(){const e=Je(),[t,n]=x.useState([]),[r,s]=x.useState("");x.useEffect(()=>{const u=localStorage.getItem(Af);n(u?JSON.parse(u):[...w2])},[]);const i=u=>{localStorage.setItem(Af,JSON.stringify(u)),n(u)},o=()=>{const u=[...t];let c=0;for(const f of g2)u.includes(f)||(u.push(f),c++);if(!c){e("Lab key corpus already merged","info");return}i(u),e(`Added ${c} public lab key(s)`)},a=()=>{const u=sessionStorage.getItem("pn532_keylab_import");if(!(u!=null&&u.trim())){e("Key Lab has nothing staged","info");return}const c=u.split(/\r?\n/).map(g=>g.replace(/\s/g,"").toUpperCase()).filter(g=>g.length===12);if(!c.length){e("No valid 12-hex keys in stash","err");return}const f=[...t];let h=0;for(const g of c)f.includes(g)||(f.push(g),h++);i(f),sessionStorage.removeItem("pn532_keylab_import"),e(h?`Merged ${h} key(s) from Key Lab`:"Keys already in list")},l=()=>{const u=r.replace(/\s/g,"").toUpperCase();if(u.length!==12){e("12 hex chars required","err");return}t.includes(u)?e("Already in dictionary"):(i([u,...t]),e("Key added")),s("")};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Key manager"}),d.jsx("p",{className:"text-sm text-slate-400",children:"Dictionary for manual trials (not a cloud rainbow table). Keys stay in your browser."}),d.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:o,className:"btn-neon rounded-xl border border-bubble-mint/40 bg-bubble-mint/10 px-4 py-2 font-mono text-xs font-bold text-bubble-mint",children:"Merge lab corpus"}),d.jsx("button",{type:"button",onClick:a,className:"rounded-xl border border-bubble-accent/45 bg-bubble-accent/10 px-4 py-2 font-mono text-xs font-bold text-bubble-accent",children:"Import Key Lab stash"})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{value:r,onChange:u=>s(u.target.value),placeholder:"New key",className:"flex-1 rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono"}),d.jsx("button",{type:"button",className:"rounded-2xl bg-bubble-accent px-4 py-2 font-semibold",onClick:l,children:"Add"})]}),d.jsx("ul",{className:"space-y-2",children:t.map(u=>d.jsxs("li",{className:"flex items-center justify-between rounded-2xl border border-white/10 bg-black/20 px-4 py-2 font-mono text-sm",children:[u,d.jsx("button",{type:"button",className:"text-rose-300",onClick:()=>i(t.filter(c=>c!==u)),children:"×"})]},u))})]})}function b2(){const e=Je(),[t,n]=x.useState("4A0100"),[r,s]=x.useState([]),[i,o]=x.useState(""),a=c=>s(f=>[new Date().toLocaleTimeString()+" "+c,...f].slice(0,80)),l=async()=>{try{const c=await vt("/api/raw/pn532",{frame:t});a(`TX ${t}`),a(`RX ${c.response||c.error||"?"}`),c.response&&e("Frame OK")}catch(c){a(`ERR ${String(c)}`),e(String(c),"err")}},u=async()=>{try{const c=await $u("/api/pn532/general-status");o(JSON.stringify(c.raw??c,null,2)),e("Fetched PN532 status")}catch(c){e(String(c),"err")}};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Advanced / raw PN532"}),d.jsxs("p",{className:"text-sm text-slate-400",children:["Send command bytes (without PN532 frame wrapper). Example: ",d.jsx("code",{children:"4A0100"})," lists one Type A passive target at 106 kbps."]}),d.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsx(fo,{mode:"raw",onApplyHex:c=>n(c)}),d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsx("input",{value:t,onChange:c=>n(c.target.value),className:"min-w-[16rem] flex-1 rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono text-sm"}),d.jsx("button",{type:"button",onClick:l,className:"rounded-2xl bg-bubble-accent px-4 py-2 font-semibold",children:"Send"}),d.jsx("button",{type:"button",onClick:u,className:"rounded-2xl border border-white/15 px-4 py-2",children:"General status"})]}),d.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-sm font-semibold text-slate-300",children:"Log"}),d.jsx("pre",{className:"mt-2 max-h-80 overflow-auto rounded-2xl border border-white/10 bg-black/30 p-3 text-xs",children:r.join(` -`)})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-sm font-semibold text-slate-300",children:"PN532 status snapshot"}),d.jsx("pre",{className:"mt-2 max-h-80 overflow-auto rounded-2xl border border-white/10 bg-black/30 p-3 text-xs",children:i||"—"})]})]})]})}function k2(){const e=Je(),[t,n]=x.useState(""),[r,s]=x.useState(!1);x.useEffect(()=>{n(localStorage.getItem("apiBase")||""),s(document.documentElement.classList.contains("light"))},[]);const i=()=>{localStorage.setItem("apiBase",t),e("Saved API base — reload for WS")},o=()=>{const a=!r;s(a),document.documentElement.classList.toggle("light",a),document.documentElement.classList.toggle("dark",!a),localStorage.setItem("theme",a?"light":"dark"),e(a?"Light":"Dark")};return d.jsxs("div",{className:"glass max-w-xl space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Settings"}),d.jsxs("label",{className:"block text-sm",children:["API base (empty = same host)",d.jsx("input",{value:t,onChange:a=>n(a.target.value),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2",placeholder:"http://192.168.4.1"})]}),d.jsx("button",{type:"button",onClick:i,className:"rounded-2xl bg-bubble-accent px-4 py-2 font-semibold",children:"Save"}),d.jsxs("div",{className:"flex items-center justify-between rounded-2xl border border-white/10 bg-black/20 px-4 py-3",children:[d.jsx("span",{className:"text-sm",children:"Theme"}),d.jsx("button",{type:"button",onClick:o,className:"rounded-full border border-white/15 px-4 py-1 text-sm",children:r?"Switch to dark":"Switch to light"})]}),d.jsxs("p",{className:"text-xs text-slate-500",children:["Firmware opens a ",d.jsx("strong",{children:"password-free"})," SoftAP named ",d.jsx("strong",{children:"PN532-Toolkit"})," (lab default). mDNS: ",d.jsx("code",{children:"pn532tool.local"})]})]})}function C2(){const e=Je(),{log:t}=xs(),[n,r]=x.useState(null),s=x.useCallback(()=>{$u("/api/status").then(r).catch(()=>{})},[]);x.useEffect(()=>{s();const f=setInterval(s,2e3);return()=>clearInterval(f)},[s]),x.useEffect(()=>{s()},[t.length,s]);const i=(()=>{const f=[...t].reverse().find(h=>h.channel==="capture");return f?typeof f.payload=="object"?JSON.stringify(f.payload):String(f.payload):""})(),o=n==null?void 0:n.session,a=o?Math.min(100,o.usedBytes/Math.max(1,o.maxBytes)*100):0,l=async f=>{try{await vt("/api/session/deep",{enable:f}),e(f?"Passive read-all on (live scan on by default at boot)":"Passive read-all off"),s()}catch(h){e(String(h),"err")}},u=async()=>{try{await vt("/api/session/clear",{}),e("Buffer cleared — scanning can resume"),s()}catch(f){e(String(f),"err")}},c=async()=>{try{const f=await fetch(vs("/api/session/export"));if(!f.ok)throw new Error(await f.text());const h=await f.blob(),g=URL.createObjectURL(h),v=document.createElement("a");v.href=g,v.download=`pn532-deep-capture-${Date.now()}.ndjson`,v.click(),URL.revokeObjectURL(g),e("Download started — check your Downloads folder")}catch(f){e(String(f),"err")}};return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(O.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"glass relative overflow-hidden p-8",children:[d.jsx("div",{className:"pointer-events-none absolute -left-20 top-0 h-48 w-48 rounded-full bg-bubble-mint/20 blur-3xl"}),d.jsx("h1",{className:"font-display text-3xl font-bold md:text-4xl",children:"Passive read-all mode"}),d.jsx("p",{className:"mt-1 text-sm font-medium text-bubble-mint/90",children:"Same feature as “deep capture” — fully controlled from this screen."}),d.jsxs("p",{className:"mt-3 max-w-2xl text-slate-300",children:["Turn it on below and keep ",d.jsx("strong",{children:"live scan"})," running (on by default at boot). Each"," ",d.jsx("strong",{children:"new tag"})," in the field is read ",d.jsx("strong",{children:"passively"}),": no per-block clicks — the firmware pulls ",d.jsx("strong",{children:"all data it can"})," (PN532 status + Classic sector/block dump with default keys, or Ultralight/NTAG page sweep). Results queue in ",d.jsx("strong",{children:"device RAM"}),"; when full, polling pauses until you ",d.jsx("strong",{children:"download"})," and ",d.jsx("strong",{children:"clear"}),"."]})]}),d.jsxs("div",{className:"glass p-6",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"font-display text-lg font-semibold",children:"Read-all session buffer"}),d.jsxs("p",{className:"text-sm text-slate-400",children:[(o==null?void 0:o.lines)??0," full dumps · ",(o==null?void 0:o.usedBytes)??0," / ",(o==null?void 0:o.maxBytes)??"—"," bytes RAM"]})]}),d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:()=>l(!((o==null?void 0:o.deepCapture)??!1)),className:`rounded-2xl px-4 py-2 font-semibold ${o!=null&&o.deepCapture?"bg-bubble-mint/20 text-bubble-mint ring-2 ring-bubble-mint/40":"border border-white/15 bg-white/5"}`,children:o!=null&&o.deepCapture?"Passive read-all ON":"Enable passive read-all"}),d.jsx("button",{type:"button",onClick:c,className:"rounded-2xl bg-gradient-to-r from-bubble-accent to-indigo-400 px-4 py-2 font-bold text-white shadow-glow",children:"Download NDJSON"}),d.jsx("button",{type:"button",onClick:u,className:"rounded-2xl border border-white/20 px-4 py-2",children:"Clear buffer"})]})]}),d.jsx("div",{className:"mt-6 h-4 overflow-hidden rounded-full bg-black/40",children:d.jsx(O.div,{className:"h-full rounded-full bg-gradient-to-r from-bubble-accent to-bubble-mint",initial:!1,animate:{width:`${a}%`},transition:{type:"spring",stiffness:120,damping:20}})}),(o==null?void 0:o.full)&&d.jsxs("div",{className:"mt-6 rounded-2xl border-2 border-bubble-rose/50 bg-bubble-rose/10 p-4 text-center",children:[d.jsx("p",{className:"font-display text-lg font-bold text-bubble-rose",children:"Buffer full — reader paused"}),d.jsxs("p",{className:"mt-1 text-sm text-slate-300",children:["Tap ",d.jsx("strong",{children:"Download NDJSON"})," to pull every card profile to your phone, then"," ",d.jsx("strong",{children:"Clear buffer"})," to resume field scans."]})]}),(o==null?void 0:o.deepCapture)&&n&&!n.scanning&&d.jsxs("p",{className:"mt-4 rounded-2xl border border-amber-500/30 bg-amber-500/10 p-3 text-sm text-amber-100",children:["Firmware normally has ",d.jsx("strong",{children:"Live scan"})," on at boot. If you turned it off, enable it on the Dashboard."]}),i&&d.jsxs("pre",{className:"mt-4 max-h-40 overflow-auto rounded-2xl border border-white/10 bg-black/30 p-3 text-xs text-slate-300",children:["Last capture event: ",i]})]})]})}function P2(){const e=Je(),[t,n]=x.useState("classic1k"),[r,s]=x.useState(!0),[i,o]=x.useState(`FFFFFFFFFFFF + `),()=>{document.head.removeChild(c)}},[t]),d.jsx(wx,{isPresent:t,childRef:r,sizeRef:s,children:x.cloneElement(e,{ref:r})})}const Sx=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=du(kx),l=x.useId(),u=x.useCallback(f=>{a.set(f,!0);for(const p of a.values())if(!p)return;r&&r()},[a,r]),c=x.useMemo(()=>({id:l,initial:t,isPresent:n,custom:s,onExitComplete:u,register:f=>(a.set(f,!1),()=>a.delete(f))}),i?[Math.random(),u]:[n,u]);return x.useMemo(()=>{a.forEach((f,p)=>a.set(p,!1))},[n]),x.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),o==="popLayout"&&(e=d.jsx(bx,{isPresent:n,children:e})),d.jsx(io.Provider,{value:c,children:e})};function kx(){return new Map}function im(e=!0){const t=x.useContext(io);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=x.useId();x.useEffect(()=>{e&&s(i)},[e]);const o=x.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Us=e=>e.key||"";function cd(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const pu=typeof window<"u",om=pu?x.useLayoutEffect:x.useEffect,am=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1})=>{const[a,l]=im(o),u=x.useMemo(()=>cd(e),[e]),c=o&&!a?[]:u.map(Us),f=x.useRef(!0),p=x.useRef(u),g=du(()=>new Map),[v,w]=x.useState(u),[b,h]=x.useState(u);om(()=>{f.current=!1,p.current=u;for(let S=0;S{const k=Us(S),C=o&&!a?!1:u===b||c.includes(k),E=()=>{if(g.has(k))g.set(k,!0);else return;let P=!0;g.forEach(D=>{D||(P=!1)}),P&&(y==null||y(),h(p.current),o&&(l==null||l()),r&&r())};return d.jsx(Sx,{isPresent:C,initial:!f.current||n?void 0:!1,custom:C?void 0:t,presenceAffectsLayout:s,mode:i,onExitComplete:C?void 0:E,children:S},k)})})},Ae=e=>e;let lm=Ae;function hu(e){let t;return()=>(t===void 0&&(t=e()),t)}const Jn=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},dt=e=>e*1e3,ft=e=>e/1e3,Cx={useManualTiming:!1};function Px(e){let t=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){i.has(u)&&(l.schedule(u),e()),u(o)}const l={schedule:(u,c=!1,f=!1)=>{const g=f&&r?t:n;return c&&i.add(u),g.has(u)||g.add(u),u},cancel:u=>{n.delete(u),i.delete(u)},process:u=>{if(o=u,r){s=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,s&&(s=!1,l.process(u))}};return l}const zs=["read","resolveKeyframes","update","preRender","render","postRender"],Ex=40;function um(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=zs.reduce((h,m)=>(h[m]=Px(i),h),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:f,postRender:p}=o,g=()=>{const h=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(h-s.timestamp,Ex),1),s.timestamp=h,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),f.process(s),p.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(g))},v=()=>{n=!0,r=!0,s.isProcessing||e(g)};return{schedule:zs.reduce((h,m)=>{const y=o[m];return h[m]=(S,k=!1,C=!1)=>(n||v(),y.schedule(S,k,C)),h},{}),cancel:h=>{for(let m=0;mdd[e].some(n=>!!t[n])};function Tx(e){for(const t in e)qn[t]={...qn[t],...e[t]}}const jx=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Li(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||jx.has(e)}let dm=e=>!Li(e);function Nx(e){e&&(dm=t=>t.startsWith("on")?!Li(t):e(t))}try{Nx(require("@emotion/is-prop-valid").default)}catch{}function Ax(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(dm(s)||n===!0&&Li(s)||!t&&!Li(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Rx(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const oo=x.createContext({});function rs(e){return typeof e=="string"||Array.isArray(e)}function ao(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const mu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],gu=["initial",...mu];function lo(e){return ao(e.animate)||gu.some(t=>rs(e[t]))}function fm(e){return!!(lo(e)||e.variants)}function Lx(e,t){if(lo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||rs(n)?n:void 0,animate:rs(r)?r:void 0}}return e.inherit!==!1?t:{}}function Dx(e){const{initial:t,animate:n}=Lx(e,x.useContext(oo));return x.useMemo(()=>({initial:t,animate:n}),[fd(t),fd(n)])}function fd(e){return Array.isArray(e)?e.join(" "):e}const Fx=Symbol.for("motionComponentSymbol");function Dn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Mx(e,t,n){return x.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Dn(n)&&(n.current=r))},[t])}const yu=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),_x="framerAppearId",pm="data-"+yu(_x),{schedule:vu}=um(queueMicrotask,!1),hm=x.createContext({});function Vx(e,t,n,r,s){var i,o;const{visualElement:a}=x.useContext(oo),l=x.useContext(cm),u=x.useContext(io),c=x.useContext(fu).reducedMotion,f=x.useRef(null);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c}));const p=f.current,g=x.useContext(hm);p&&!p.projection&&s&&(p.type==="html"||p.type==="svg")&&Ox(f.current,n,s,g);const v=x.useRef(!1);x.useInsertionEffect(()=>{p&&v.current&&p.update(n,u)});const w=n[pm],b=x.useRef(!!w&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,w))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,w)));return om(()=>{p&&(v.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),vu.render(p.render),b.current&&p.animationState&&p.animationState.animateChanges())}),x.useEffect(()=>{p&&(!b.current&&p.animationState&&p.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var h;(h=window.MotionHandoffMarkAsComplete)===null||h===void 0||h.call(window,w)}),b.current=!1))}),p}function Ox(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:mm(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||a&&Dn(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function mm(e){if(e)return e.options.allowProjection!==!1?e.projection:mm(e.parent)}function Ix({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var i,o;e&&Tx(e);function a(u,c){let f;const p={...x.useContext(fu),...u,layoutId:Bx(u)},{isStatic:g}=p,v=Dx(u),w=r(u,g);if(!g&&pu){Ux();const b=zx(p);f=b.MeasureLayout,v.visualElement=Vx(s,w,p,t,b.ProjectionNode)}return d.jsxs(oo.Provider,{value:v,children:[f&&v.visualElement?d.jsx(f,{visualElement:v.visualElement,...p}):null,n(s,u,Mx(w,v.visualElement,c),w,g,v.visualElement)]})}a.displayName=`motion.${typeof s=="string"?s:`create(${(o=(i=s.displayName)!==null&&i!==void 0?i:s.name)!==null&&o!==void 0?o:""})`}`;const l=x.forwardRef(a);return l[Fx]=s,l}function Bx({layoutId:e}){const t=x.useContext(cu).id;return t&&e!==void 0?t+"-"+e:e}function Ux(e,t){x.useContext(cm).strict}function zx(e){const{drag:t,layout:n}=qn;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const $x=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function xu(e){return typeof e!="string"||e.includes("-")?!1:!!($x.indexOf(e)>-1||/[A-Z]/u.test(e))}function pd(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function wu(e,t,n,r){if(typeof t=="function"){const[s,i]=pd(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=pd(r);t=t(n!==void 0?n:e.custom,s,i)}return t}const qa=e=>Array.isArray(e),Wx=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Kx=e=>qa(e)?e[e.length-1]||0:e,ge=e=>!!(e&&e.getVelocity);function ri(e){const t=ge(e)?e.get():e;return Wx(t)?t.toValue():t}function Hx({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,i){const o={latestValues:Gx(r,s,i,e),renderState:t()};return n&&(o.onMount=a=>n({props:r,current:a,...o}),o.onUpdate=a=>n(a)),o}const gm=e=>(t,n)=>{const r=x.useContext(oo),s=x.useContext(io),i=()=>Hx(e,t,r,s);return n?i():du(i)};function Gx(e,t,n,r){const s={},i=r(e,{});for(const p in i)s[p]=ri(i[p]);let{initial:o,animate:a}=e;const l=lo(e),u=fm(e);t&&u&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const f=c?a:o;if(f&&typeof f!="boolean"&&!ao(f)){const p=Array.isArray(f)?f:[f];for(let g=0;gt=>typeof t=="string"&&t.startsWith(e),vm=ym("--"),Xx=ym("var(--"),bu=e=>Xx(e)?Qx.test(e.split("/*")[0].trim()):!1,Qx=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,xm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,yt=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},ss={...ir,transform:e=>yt(0,1,e)},$s={...ir,default:1},ms=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),St=ms("deg"),st=ms("%"),R=ms("px"),Yx=ms("vh"),Zx=ms("vw"),hd={...st,parse:e=>st.parse(e)/100,transform:e=>st.transform(e*100)},Jx={borderWidth:R,borderTopWidth:R,borderRightWidth:R,borderBottomWidth:R,borderLeftWidth:R,borderRadius:R,radius:R,borderTopLeftRadius:R,borderTopRightRadius:R,borderBottomRightRadius:R,borderBottomLeftRadius:R,width:R,maxWidth:R,height:R,maxHeight:R,top:R,right:R,bottom:R,left:R,padding:R,paddingTop:R,paddingRight:R,paddingBottom:R,paddingLeft:R,margin:R,marginTop:R,marginRight:R,marginBottom:R,marginLeft:R,backgroundPositionX:R,backgroundPositionY:R},qx={rotate:St,rotateX:St,rotateY:St,rotateZ:St,scale:$s,scaleX:$s,scaleY:$s,scaleZ:$s,skew:St,skewX:St,skewY:St,distance:R,translateX:R,translateY:R,translateZ:R,x:R,y:R,z:R,perspective:R,transformPerspective:R,opacity:ss,originX:hd,originY:hd,originZ:R},md={...ir,transform:Math.round},Su={...Jx,...qx,zIndex:md,size:R,fillOpacity:ss,strokeOpacity:ss,numOctaves:md},e1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},t1=sr.length;function n1(e,t,n){let r="",s=!0;for(let i=0;i({style:{},transform:{},transformOrigin:{},vars:{}}),wm=()=>({...Pu(),attrs:{}}),Eu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function bm(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const Sm=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function km(e,t,n,r){bm(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(Sm.has(s)?s:yu(s),t.attrs[s])}const Di={};function a1(e){Object.assign(Di,e)}function Cm(e,{layout:t,layoutId:n}){return xn.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Di[e]||e==="opacity")}function Tu(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(ge(s[o])||t.style&&ge(t.style[o])||Cm(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}function Pm(e,t,n){const r=Tu(e,t,n);for(const s in e)if(ge(e[s])||ge(t[s])){const i=sr.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}function l1(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const yd=["x","y","width","height","cx","cy","r"],u1={useVisualState:gm({scrapeMotionValuesFromProps:Pm,createRenderState:wm,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let i=!!e.drag;if(!i){for(const a in s)if(xn.has(a)){i=!0;break}}if(!i)return;let o=!t;if(t)for(let a=0;a{l1(n,r),z.render(()=>{Cu(r,s,Eu(n.tagName),e.transformTemplate),km(n,r)})})}})},c1={useVisualState:gm({scrapeMotionValuesFromProps:Tu,createRenderState:Pu})};function Em(e,t,n){for(const r in t)!ge(t[r])&&!Cm(r,n)&&(e[r]=t[r])}function d1({transformTemplate:e},t){return x.useMemo(()=>{const n=Pu();return ku(n,t,e),Object.assign({},n.vars,n.style)},[t])}function f1(e,t){const n=e.style||{},r={};return Em(r,n,e),Object.assign(r,d1(e,t)),r}function p1(e,t){const n={},r=f1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function h1(e,t,n,r){const s=x.useMemo(()=>{const i=wm();return Cu(i,t,Eu(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Em(i,e.style,e),s.style={...i,...s.style}}return s}function m1(e=!1){return(n,r,s,{latestValues:i},o)=>{const l=(xu(n)?h1:p1)(r,i,o,n),u=Ax(r,typeof n=="string",e),c=n!==x.Fragment?{...u,...l,ref:s}:{},{children:f}=r,p=x.useMemo(()=>ge(f)?f.get():f,[f]);return x.createElement(n,{...c,children:p})}}function g1(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...xu(r)?u1:c1,preloadedFeatures:e,useRender:m1(s),createVisualElement:t,Component:r};return Ix(o)}}function Tm(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rwindow.ScrollTimeline!==void 0);class v1{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r{if(y1()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class x1 extends v1{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function ju(e,t){return e?e[t]||e.default||e:void 0}const el=2e4;function jm(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=el?1/0:t}function Nu(e){return typeof e=="function"}function vd(e,t){e.timeline=t,e.onfinish=null}const Au=e=>Array.isArray(e)&&typeof e[0]=="number",w1={linearEasing:void 0};function b1(e,t){const n=hu(e);return()=>{var r;return(r=w1[t])!==null&&r!==void 0?r:n()}}const Fi=b1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Nm=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i`cubic-bezier(${e}, ${t}, ${n}, ${r})`,tl={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:br([0,.65,.55,1]),circOut:br([.55,0,1,.45]),backIn:br([.31,.01,.66,-.59]),backOut:br([.33,1.53,.69,.99])};function Rm(e,t){if(e)return typeof e=="function"&&Fi()?Nm(e,t):Au(e)?br(e):Array.isArray(e)?e.map(n=>Rm(n,t)||tl.easeOut):tl[e]}const Ke={x:!1,y:!1};function Lm(){return Ke.x||Ke.y}function S1(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let s=document;const i=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Dm(e,t){const n=S1(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function xd(e){return t=>{t.pointerType==="touch"||Lm()||e(t)}}function k1(e,t,n={}){const[r,s,i]=Dm(e,n),o=xd(a=>{const{target:l}=a,u=t(a);if(typeof u!="function"||!l)return;const c=xd(f=>{u(f),l.removeEventListener("pointerleave",c)});l.addEventListener("pointerleave",c,s)});return r.forEach(a=>{a.addEventListener("pointerenter",o,s)}),i}const Fm=(e,t)=>t?e===t?!0:Fm(e,t.parentElement):!1,Ru=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,C1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function P1(e){return C1.has(e.tagName)||e.tabIndex!==-1}const Sr=new WeakSet;function wd(e){return t=>{t.key==="Enter"&&e(t)}}function $o(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const E1=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=wd(()=>{if(Sr.has(n))return;$o(n,"down");const s=wd(()=>{$o(n,"up")}),i=()=>$o(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function bd(e){return Ru(e)&&!Lm()}function T1(e,t,n={}){const[r,s,i]=Dm(e,n),o=a=>{const l=a.currentTarget;if(!bd(a)||Sr.has(l))return;Sr.add(l);const u=t(a),c=(g,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),!(!bd(g)||!Sr.has(l))&&(Sr.delete(l),typeof u=="function"&&u(g,{success:v}))},f=g=>{c(g,n.useGlobalTarget||Fm(l,g.target))},p=g=>{c(g,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",p,s)};return r.forEach(a=>{!P1(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),a.addEventListener("focus",u=>E1(u,s),s)}),i}function j1(e){return e==="x"||e==="y"?Ke[e]?null:(Ke[e]=!0,()=>{Ke[e]=!1}):Ke.x||Ke.y?null:(Ke.x=Ke.y=!0,()=>{Ke.x=Ke.y=!1})}const Mm=new Set(["width","height","top","left","right","bottom",...sr]);let si;function N1(){si=void 0}const it={now:()=>(si===void 0&&it.set(ue.isProcessing||Cx.useManualTiming?ue.timestamp:performance.now()),si),set:e=>{si=e,queueMicrotask(N1)}};function Lu(e,t){e.indexOf(t)===-1&&e.push(t)}function Du(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Fu{constructor(){this.subscriptions=[]}add(t){return Lu(this.subscriptions,t),()=>Du(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i!isNaN(parseFloat(e));class R1{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const i=it.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=it.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=A1(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Fu);const r=this.events[t].add(n);return t==="change"?()=>{r(),z.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=it.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Sd)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Sd);return _m(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function is(e,t){return new R1(e,t)}function L1(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,is(n))}function D1(e,t){const n=uo(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const a=Kx(i[o]);L1(e,o,a)}}function F1(e){return!!(ge(e)&&e.add)}function nl(e,t){const n=e.getValue("willChange");if(F1(n))return n.add(t)}function Vm(e){return e.props[pm]}const Om=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,M1=1e-7,_1=12;function V1(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=Om(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>M1&&++a<_1);return o}function gs(e,t,n,r){if(e===t&&n===r)return Ae;const s=i=>V1(i,0,1,e,n);return i=>i===0||i===1?i:Om(s(i),t,r)}const Im=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bm=e=>t=>1-e(1-t),Um=gs(.33,1.53,.69,.99),Mu=Bm(Um),zm=Im(Mu),$m=e=>(e*=2)<1?.5*Mu(e):.5*(2-Math.pow(2,-10*(e-1))),_u=e=>1-Math.sin(Math.acos(e)),Wm=Bm(_u),Km=Im(_u),Hm=e=>/^0[^.\s]+$/u.test(e);function O1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Hm(e):!0}const Fr=e=>Math.round(e*1e5)/1e5,Vu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function I1(e){return e==null}const B1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ou=(e,t)=>n=>!!(typeof n=="string"&&B1.test(n)&&n.startsWith(e)||t&&!I1(n)&&Object.prototype.hasOwnProperty.call(n,t)),Gm=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,a]=r.match(Vu);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},U1=e=>yt(0,255,e),Wo={...ir,transform:e=>Math.round(U1(e))},on={test:Ou("rgb","red"),parse:Gm("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Wo.transform(e)+", "+Wo.transform(t)+", "+Wo.transform(n)+", "+Fr(ss.transform(r))+")"};function z1(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const rl={test:Ou("#"),parse:z1,transform:on.transform},Fn={test:Ou("hsl","hue"),parse:Gm("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+st.transform(Fr(t))+", "+st.transform(Fr(n))+", "+Fr(ss.transform(r))+")"},he={test:e=>on.test(e)||rl.test(e)||Fn.test(e),parse:e=>on.test(e)?on.parse(e):Fn.test(e)?Fn.parse(e):rl.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?on.transform(e):Fn.transform(e)},$1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function W1(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Vu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match($1))===null||n===void 0?void 0:n.length)||0)>0}const Xm="number",Qm="color",K1="var",H1="var(",kd="${}",G1=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function os(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const a=t.replace(G1,l=>(he.test(l)?(r.color.push(i),s.push(Qm),n.push(he.parse(l))):l.startsWith(H1)?(r.var.push(i),s.push(K1),n.push(l)):(r.number.push(i),s.push(Xm),n.push(parseFloat(l))),++i,kd)).split(kd);return{values:n,split:a,indexes:r,types:s}}function Ym(e){return os(e).values}function Zm(e){const{split:t,types:n}=os(e),r=t.length;return s=>{let i="";for(let o=0;otypeof e=="number"?0:e;function Q1(e){const t=Ym(e);return Zm(e)(t.map(X1))}const zt={test:W1,parse:Ym,createTransformer:Zm,getAnimatableNone:Q1},Y1=new Set(["brightness","contrast","saturate","opacity"]);function Z1(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Vu)||[];if(!r)return e;const s=n.replace(r,"");let i=Y1.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const J1=/\b([a-z-]*)\(.*?\)/gu,sl={...zt,getAnimatableNone:e=>{const t=e.match(J1);return t?t.map(Z1).join(" "):e}},q1={...Su,color:he,backgroundColor:he,outlineColor:he,fill:he,stroke:he,borderColor:he,borderTopColor:he,borderRightColor:he,borderBottomColor:he,borderLeftColor:he,filter:sl,WebkitFilter:sl},Iu=e=>q1[e];function Jm(e,t){let n=Iu(e);return n!==sl&&(n=zt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ew=new Set(["auto","none","0"]);function tw(e,t,n){let r=0,s;for(;re===ir||e===R,Pd=(e,t)=>parseFloat(e.split(", ")[t]),Ed=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/u);if(s)return Pd(s[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Pd(i[1],e):0}},nw=new Set(["x","y","z"]),rw=sr.filter(e=>!nw.has(e));function sw(e){const t=[];return rw.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const er={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Ed(4,13),y:Ed(5,14)};er.translateX=er.x;er.translateY=er.y;const un=new Set;let il=!1,ol=!1;function qm(){if(ol){const e=Array.from(un).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=sw(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var a;(a=r.getValue(i))===null||a===void 0||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}ol=!1,il=!1,un.forEach(e=>e.complete()),un.clear()}function eg(){un.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ol=!0)})}function iw(){eg(),qm()}class Bu{constructor(t,n,r,s,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(un.add(this),il||(il=!0,z.read(eg),z.resolveKeyframes(qm))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let i=0;i/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ow=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function aw(e){const t=ow.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function ng(e,t,n=1){const[r,s]=aw(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return tg(o)?parseFloat(o):o}return bu(s)?ng(s,t,n+1):s}const rg=e=>t=>t.test(e),lw={test:e=>e==="auto",parse:e=>e},sg=[ir,R,st,St,Zx,Yx,lw],Td=e=>sg.find(rg(e));class ig extends Bu{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const jd=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(zt.test(e)||e==="0")&&!e.startsWith("url("));function uw(e){const t=e[0];if(e.length===1)return!0;for(let n=0;ne!==null;function co(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(dw),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const fw=40;class og{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=it.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>fw?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&iw(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=it.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:i,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!cw(t,r,s,i))if(o)this.options.duration=0;else{l&&l(co(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const K=(e,t,n)=>e+(t-e)*n;function Ko(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pw({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Ko(l,a,e+1/3),i=Ko(l,a,e),o=Ko(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Mi(e,t){return n=>n>0?t:e}const Ho=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},hw=[rl,on,Fn],mw=e=>hw.find(t=>t.test(e));function Nd(e){const t=mw(e);if(!t)return!1;let n=t.parse(e);return t===Fn&&(n=pw(n)),n}const Ad=(e,t)=>{const n=Nd(e),r=Nd(t);if(!n||!r)return Mi(e,t);const s={...n};return i=>(s.red=Ho(n.red,r.red,i),s.green=Ho(n.green,r.green,i),s.blue=Ho(n.blue,r.blue,i),s.alpha=K(n.alpha,r.alpha,i),on.transform(s))},gw=(e,t)=>n=>t(e(n)),ys=(...e)=>e.reduce(gw),al=new Set(["none","hidden"]);function yw(e,t){return al.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function vw(e,t){return n=>K(e,t,n)}function Uu(e){return typeof e=="number"?vw:typeof e=="string"?bu(e)?Mi:he.test(e)?Ad:bw:Array.isArray(e)?ag:typeof e=="object"?he.test(e)?Ad:xw:Mi}function ag(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>Uu(i)(i,t[o]));return i=>{for(let o=0;o{for(const i in r)n[i]=r[i](s);return n}}function ww(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let i=0;i{const n=zt.createTransformer(t),r=os(e),s=os(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?al.has(e)&&!s.values.length||al.has(t)&&!r.values.length?yw(e,t):ys(ag(ww(r,s),s.values),n):Mi(e,t)};function lg(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?K(e,t,n):Uu(e)(e,t)}const Sw=5;function ug(e,t,n){const r=Math.max(t-Sw,0);return _m(n-e(r),t-r)}const X={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Go=.001;function kw({duration:e=X.duration,bounce:t=X.bounce,velocity:n=X.velocity,mass:r=X.mass}){let s,i,o=1-t;o=yt(X.minDamping,X.maxDamping,o),e=yt(X.minDuration,X.maxDuration,ft(e)),o<1?(s=u=>{const c=u*o,f=c*e,p=c-n,g=ll(u,o),v=Math.exp(-f);return Go-p/g*v},i=u=>{const f=u*o*e,p=f*n+n,g=Math.pow(o,2)*Math.pow(u,2)*e,v=Math.exp(-f),w=ll(Math.pow(u,2),o);return(-s(u)+Go>0?-1:1)*((p-g)*v)/w}):(s=u=>{const c=Math.exp(-u*e),f=(u-n)*e+1;return-Go+c*f},i=u=>{const c=Math.exp(-u*e),f=(n-u)*(e*e);return c*f});const a=5/e,l=Pw(s,i,a);if(e=dt(e),isNaN(l))return{stiffness:X.stiffness,damping:X.damping,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const Cw=12;function Pw(e,t,n){let r=n;for(let s=1;se[n]!==void 0)}function jw(e){let t={velocity:X.velocity,stiffness:X.stiffness,damping:X.damping,mass:X.mass,isResolvedFromDuration:!1,...e};if(!Rd(e,Tw)&&Rd(e,Ew))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*yt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:X.mass,stiffness:s,damping:i}}else{const n=kw(e);t={...t,...n,mass:X.mass},t.isResolvedFromDuration=!0}return t}function cg(e=X.visualDuration,t=X.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:u,mass:c,duration:f,velocity:p,isResolvedFromDuration:g}=jw({...n,velocity:-ft(n.velocity||0)}),v=p||0,w=u/(2*Math.sqrt(l*c)),b=o-i,h=ft(Math.sqrt(l/c)),m=Math.abs(b)<5;r||(r=m?X.restSpeed.granular:X.restSpeed.default),s||(s=m?X.restDelta.granular:X.restDelta.default);let y;if(w<1){const k=ll(h,w);y=C=>{const E=Math.exp(-w*h*C);return o-E*((v+w*h*b)/k*Math.sin(k*C)+b*Math.cos(k*C))}}else if(w===1)y=k=>o-Math.exp(-h*k)*(b+(v+h*b)*k);else{const k=h*Math.sqrt(w*w-1);y=C=>{const E=Math.exp(-w*h*C),P=Math.min(k*C,300);return o-E*((v+w*h*b)*Math.sinh(P)+k*b*Math.cosh(P))/k}}const S={calculatedDuration:g&&f||null,next:k=>{const C=y(k);if(g)a.done=k>=f;else{let E=0;w<1&&(E=k===0?dt(v):ug(y,k,C));const P=Math.abs(E)<=r,D=Math.abs(o-C)<=s;a.done=P&&D}return a.value=a.done?o:C,a},toString:()=>{const k=Math.min(jm(S),el),C=Nm(E=>S.next(k*E).value,k,30);return k+"ms "+C}};return S}function Ld({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const f=e[0],p={done:!1,value:f},g=P=>a!==void 0&&Pl,v=P=>a===void 0?l:l===void 0||Math.abs(a-P)-w*Math.exp(-P/r),y=P=>h+m(P),S=P=>{const D=m(P),A=y(P);p.done=Math.abs(D)<=u,p.value=p.done?h:A};let k,C;const E=P=>{g(p.value)&&(k=P,C=cg({keyframes:[p.value,v(p.value)],velocity:ug(y,P,p.value),damping:s,stiffness:i,restDelta:u,restSpeed:c}))};return E(0),{calculatedDuration:null,next:P=>{let D=!1;return!C&&k===void 0&&(D=!0,S(P),E(P)),k!==void 0&&P>=k?C.next(P-k):(!D&&S(P),p)}}}const Nw=gs(.42,0,1,1),Aw=gs(0,0,.58,1),dg=gs(.42,0,.58,1),Rw=e=>Array.isArray(e)&&typeof e[0]!="number",Lw={linear:Ae,easeIn:Nw,easeInOut:dg,easeOut:Aw,circIn:_u,circInOut:Km,circOut:Wm,backIn:Mu,backInOut:zm,backOut:Um,anticipate:$m},Dd=e=>{if(Au(e)){lm(e.length===4);const[t,n,r,s]=e;return gs(t,n,r,s)}else if(typeof e=="string")return Lw[e];return e};function Dw(e,t,n){const r=[],s=n||lg,i=e.length-1;for(let o=0;ot[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Dw(t,r,s),l=a.length,u=c=>{if(o&&c1)for(;fu(yt(e[0],e[i-1],c)):u}function Mw(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Jn(0,t,r);e.push(K(n,1,s))}}function _w(e){const t=[0];return Mw(t,e.length-1),t}function Vw(e,t){return e.map(n=>n*t)}function Ow(e,t){return e.map(()=>t||dg).splice(0,e.length-1)}function _i({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=Rw(r)?r.map(Dd):Dd(r),i={done:!1,value:t[0]},o=Vw(n&&n.length===t.length?n:_w(t),e),a=Fw(o,t,{ease:Array.isArray(s)?s:Ow(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const Iw=e=>{const t=({timestamp:n})=>e(n);return{start:()=>z.update(t,!0),stop:()=>Ut(t),now:()=>ue.isProcessing?ue.timestamp:it.now()}},Bw={decay:Ld,inertia:Ld,tween:_i,keyframes:_i,spring:cg},Uw=e=>e/100;class zu extends og{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:s,keyframes:i}=this.options,o=(s==null?void 0:s.KeyframeResolver)||Bu,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(i,a,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=this.options,a=Nu(n)?n:Bw[n]||_i;let l,u;a!==_i&&typeof t[0]!="number"&&(l=ys(Uw,lg(t[0],t[1])),t=[0,100]);const c=a({...this.options,keyframes:t});i==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=jm(c));const{calculatedDuration:f}=c,p=f+s,g=p*(r+1)-s;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:p,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:p,repeat:g,repeatType:v,repeatDelay:w,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const h=this.currentTime-p*(this.speed>=0?1:-1),m=this.speed>=0?h<0:h>c;this.currentTime=Math.max(h,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let y=this.currentTime,S=i;if(g){const P=Math.min(this.currentTime,c)/f;let D=Math.floor(P),A=P%1;!A&&P>=1&&(A=1),A===1&&D--,D=Math.min(D,g+1),!!(D%2)&&(v==="reverse"?(A=1-A,w&&(A-=w/f)):v==="mirror"&&(S=o)),y=yt(0,1,A)*f}const k=m?{done:!1,value:l[0]}:S.next(y);a&&(k.value=a(k.value));let{done:C}=k;!m&&u!==null&&(C=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return E&&s!==void 0&&(k.value=co(l,this.options,s)),b&&b(k.value),E&&this.finish(),k}get duration(){const{resolved:t}=this;return t?ft(t.calculatedDuration):0}get time(){return ft(this.currentTime)}set time(t){t=dt(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ft(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=Iw,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const zw=new Set(["opacity","clipPath","filter","transform"]);function $w(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=Rm(a,s);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const Ww=hu(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Vi=10,Kw=2e4;function Hw(e){return Nu(e.type)||e.type==="spring"||!Am(e.ease)}function Gw(e,t){const n=new zu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let i=0;for(;!r.done&&ithis.onKeyframesResolved(o,a),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:i,type:o,motionValue:a,name:l,startTime:u}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof i=="string"&&Fi()&&Xw(i)&&(i=fg[i]),Hw(this.options)){const{onComplete:f,onUpdate:p,motionValue:g,element:v,...w}=this.options,b=Gw(t,w);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,s=b.times,i=b.ease,o="keyframes"}const c=$w(a.owner.current,l,t,{...this.options,duration:r,times:s,ease:i});return c.startTime=u??this.calcStartTime(),this.pendingTimeline?(vd(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:f}=this.options;a.set(co(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:r,times:s,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ft(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ft(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=dt(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ae;const{animation:r}=n;vd(r,t)}return Ae}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:i,ease:o,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:c,onComplete:f,element:p,...g}=this.options,v=new zu({...g,keyframes:r,duration:s,type:i,ease:o,times:a,isGenerator:!0}),w=dt(this.time);u.setWithVelocity(v.sample(w-Vi).value,v.sample(w).value,Vi)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:i,damping:o,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return Ww()&&r&&zw.has(r)&&!l&&!u&&!s&&i!=="mirror"&&o!==0&&a!=="inertia"}}const Qw={type:"spring",stiffness:500,damping:25,restSpeed:10},Yw=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Zw={type:"keyframes",duration:.8},Jw={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},qw=(e,{keyframes:t})=>t.length>2?Zw:xn.has(e)?e.startsWith("scale")?Yw(t[1]):Qw:Jw;function eb({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const $u=(e,t,n,r={},s,i)=>o=>{const a=ju(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-dt(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:p=>{t.set(p),a.onUpdate&&a.onUpdate(p)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:s};eb(a)||(c={...c,...qw(e,c)}),c.duration&&(c.duration=dt(c.duration)),c.repeatDelay&&(c.repeatDelay=dt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(f=!0)),f&&!i&&t.get()!==void 0){const p=co(c.keyframes,a);if(p!==void 0)return z.update(()=>{c.onUpdate(p),c.onComplete()}),new x1([])}return!i&&Fd.supports(c)?new Fd(c):new zu(c)};function tb({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function pg(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(o=r);const u=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const f in l){const p=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),g=l[f];if(g===void 0||c&&tb(c,f))continue;const v={delay:n,...ju(o||{},f)};let w=!1;if(window.MotionHandoffAnimation){const h=Vm(e);if(h){const m=window.MotionHandoffAnimation(h,f,z);m!==null&&(v.startTime=m,w=!0)}}nl(e,f),p.start($u(f,p,g,e.shouldReduceMotion&&Mm.has(f)?{type:!1}:v,e,w));const b=p.animation;b&&u.push(b)}return a&&Promise.all(u).then(()=>{z.update(()=>{a&&D1(e,a)})}),u}function ul(e,t,n={}){var r;const s=uo(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(pg(e,s,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:p}=i;return nb(e,t,c+u,f,p,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function nb(e,t,n=0,r=0,s=1,i){const o=[],a=(e.variantChildren.size-1)*r,l=s===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(rb).forEach((u,c)=>{u.notify("AnimationStart",t),o.push(ul(u,t,{...i,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function rb(e,t){return e.sortNodePosition(t)}function sb(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>ul(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=ul(e,t,n);else{const s=typeof t=="function"?uo(e,t,n.custom):t;r=Promise.all(pg(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const ib=gu.length;function hg(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?hg(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>sb(e,n,r)))}function ub(e){let t=lb(e),n=Md(),r=!0;const s=l=>(u,c)=>{var f;const p=uo(e,c,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(p){const{transition:g,transitionEnd:v,...w}=p;u={...u,...w,...v}}return u};function i(l){t=l(e)}function o(l){const{props:u}=e,c=hg(e.parent)||{},f=[],p=new Set;let g={},v=1/0;for(let b=0;bv&&S,D=!1;const A=Array.isArray(y)?y:[y];let ee=A.reduce(s(h),{});k===!1&&(ee={});const{prevResolvedValues:wt={}}=m,Xt={...wt,...ee},ar=ne=>{P=!0,p.has(ne)&&(D=!0,p.delete(ne)),m.needsAnimating[ne]=!0;const j=e.getValue(ne);j&&(j.liveStyle=!1)};for(const ne in Xt){const j=ee[ne],L=wt[ne];if(g.hasOwnProperty(ne))continue;let F=!1;qa(j)&&qa(L)?F=!Tm(j,L):F=j!==L,F?j!=null?ar(ne):p.add(ne):j!==void 0&&p.has(ne)?ar(ne):m.protectedKeys[ne]=!0}m.prevProp=y,m.prevResolvedValues=ee,m.isActive&&(g={...g,...ee}),r&&e.blockInitialAnimation&&(P=!1),P&&(!(C&&E)||D)&&f.push(...A.map(ne=>({animation:ne,options:{type:h}})))}if(p.size){const b={};p.forEach(h=>{const m=e.getBaseTarget(h),y=e.getValue(h);y&&(y.liveStyle=!0),b[h]=m??null}),f.push({animation:b})}let w=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(f):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(p=>{var g;return(g=p.animationState)===null||g===void 0?void 0:g.setActive(l,u)}),n[l].isActive=u;const f=o(l);for(const p in n)n[p].protectedKeys={};return f}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Md(),r=!0}}}function cb(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Tm(t,e):!1}function Zt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Md(){return{animate:Zt(!0),whileInView:Zt(),whileHover:Zt(),whileTap:Zt(),whileDrag:Zt(),whileFocus:Zt(),exit:Zt()}}class Gt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class db extends Gt{constructor(t){super(t),t.animationState||(t.animationState=ub(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ao(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let fb=0;class pb extends Gt{constructor(){super(...arguments),this.id=fb++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const hb={animation:{Feature:db},exit:{Feature:pb}};function as(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function vs(e){return{point:{x:e.pageX,y:e.pageY}}}const mb=e=>t=>Ru(t)&&e(t,vs(t));function Mr(e,t,n,r){return as(e,t,mb(n),r)}const _d=(e,t)=>Math.abs(e-t);function gb(e,t){const n=_d(e.x,t.x),r=_d(e.y,t.y);return Math.sqrt(n**2+r**2)}class mg{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Qo(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=gb(f.offset,{x:0,y:0})>=3;if(!p&&!g)return;const{point:v}=f,{timestamp:w}=ue;this.history.push({...v,timestamp:w});const{onStart:b,onMove:h}=this.handlers;p||(b&&b(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),h&&h(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Xo(p,this.transformPagePoint),z.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:g,onSessionEnd:v,resumeAnimation:w}=this.handlers;if(this.dragSnapToOrigin&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=Qo(f.type==="pointercancel"?this.lastMoveEventInfo:Xo(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,b),v&&v(f,b)},!Ru(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const o=vs(t),a=Xo(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=ue;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,Qo(a,this.history)),this.removeListeners=ys(Mr(this.contextWindow,"pointermove",this.handlePointerMove),Mr(this.contextWindow,"pointerup",this.handlePointerUp),Mr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ut(this.updatePoint)}}function Xo(e,t){return t?{point:t(e.point)}:e}function Vd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Qo({point:e},t){return{point:e,delta:Vd(e,gg(t)),offset:Vd(e,yb(t)),velocity:vb(t,.1)}}function yb(e){return e[0]}function gg(e){return e[e.length-1]}function vb(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=gg(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>dt(t)));)n--;if(!r)return{x:0,y:0};const i=ft(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const yg=1e-4,xb=1-yg,wb=1+yg,vg=.01,bb=0-vg,Sb=0+vg;function Le(e){return e.max-e.min}function kb(e,t,n){return Math.abs(e-t)<=n}function Od(e,t,n,r=.5){e.origin=r,e.originPoint=K(t.min,t.max,e.origin),e.scale=Le(n)/Le(t),e.translate=K(n.min,n.max,e.origin)-e.originPoint,(e.scale>=xb&&e.scale<=wb||isNaN(e.scale))&&(e.scale=1),(e.translate>=bb&&e.translate<=Sb||isNaN(e.translate))&&(e.translate=0)}function _r(e,t,n,r){Od(e.x,t.x,n.x,r?r.originX:void 0),Od(e.y,t.y,n.y,r?r.originY:void 0)}function Id(e,t,n){e.min=n.min+t.min,e.max=e.min+Le(t)}function Cb(e,t,n){Id(e.x,t.x,n.x),Id(e.y,t.y,n.y)}function Bd(e,t,n){e.min=t.min-n.min,e.max=e.min+Le(t)}function Vr(e,t,n){Bd(e.x,t.x,n.x),Bd(e.y,t.y,n.y)}function Pb(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?K(n,e,r.max):Math.min(e,n)),e}function Ud(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Eb(e,{top:t,left:n,bottom:r,right:s}){return{x:Ud(e.x,n,s),y:Ud(e.y,t,r)}}function zd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=Jn(t.min,t.max-r,e.min):r>s&&(n=Jn(e.min,e.max-s,t.min)),yt(0,1,n)}function Nb(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const cl=.35;function Ab(e=cl){return e===!1?e=0:e===!0&&(e=cl),{x:$d(e,"left","right"),y:$d(e,"top","bottom")}}function $d(e,t,n){return{min:Wd(e,t),max:Wd(e,n)}}function Wd(e,t){return typeof e=="number"?e:e[t]||0}const Kd=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mn=()=>({x:Kd(),y:Kd()}),Hd=()=>({min:0,max:0}),J=()=>({x:Hd(),y:Hd()});function Ve(e){return[e("x"),e("y")]}function xg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Rb({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Lb(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Yo(e){return e===void 0||e===1}function dl({scale:e,scaleX:t,scaleY:n}){return!Yo(e)||!Yo(t)||!Yo(n)}function en(e){return dl(e)||wg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function wg(e){return Gd(e.x)||Gd(e.y)}function Gd(e){return e&&e!=="0%"}function Oi(e,t,n){const r=e-n,s=t*r;return n+s}function Xd(e,t,n,r,s){return s!==void 0&&(e=Oi(e,s,r)),Oi(e,n,r)+t}function fl(e,t=0,n=1,r,s){e.min=Xd(e.min,t,n,r,s),e.max=Xd(e.max,t,n,r,s)}function bg(e,{x:t,y:n}){fl(e.x,t.translate,t.scale,t.originPoint),fl(e.y,n.translate,n.scale,n.originPoint)}const Qd=.999999999999,Yd=1.0000000000001;function Db(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let a=0;aQd&&(t.x=1),t.yQd&&(t.y=1)}function _n(e,t){e.min=e.min+t,e.max=e.max+t}function Zd(e,t,n,r,s=.5){const i=K(e.min,e.max,s);fl(e,t,n,i,r)}function Vn(e,t){Zd(e.x,t.x,t.scaleX,t.scale,t.originX),Zd(e.y,t.y,t.scaleY,t.scale,t.originY)}function Sg(e,t){return xg(Lb(e.getBoundingClientRect(),t))}function Fb(e,t,n){const r=Sg(e,n),{scroll:s}=t;return s&&(_n(r.x,s.offset.x),_n(r.y,s.offset.y)),r}const kg=({current:e})=>e?e.ownerDocument.defaultView:null,Mb=new WeakMap;class _b{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=J(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=c=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(vs(c).point)},i=(c,f)=>{const{drag:p,dragPropagation:g,onDragStart:v}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=j1(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ve(b=>{let h=this.getAxisMotionValue(b).get()||0;if(st.test(h)){const{projection:m}=this.visualElement;if(m&&m.layout){const y=m.layout.layoutBox[b];y&&(h=Le(y)*(parseFloat(h)/100))}}this.originPoint[b]=h}),v&&z.postRender(()=>v(c,f)),nl(this.visualElement,"transform");const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},o=(c,f)=>{const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:v,onDrag:w}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:b}=f;if(g&&this.currentDirection===null){this.currentDirection=Vb(b),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),w&&w(c,f)},a=(c,f)=>this.stop(c,f),l=()=>Ve(c=>{var f;return this.getAnimationState(c)==="paused"&&((f=this.getAxisMotionValue(c).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new mg(t,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:kg(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&z.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Ws(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=Pb(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Dn(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=Eb(s.layoutBox,n):this.constraints=!1,this.elastic=Ab(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Ve(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Nb(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Dn(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=Fb(r,s.root,this.visualElement.getTransformPagePoint());let o=Tb(s.layout.layoutBox,i);if(n){const a=n(Rb(o));this.hasMutatedConstraints=!!a,a&&(o=xg(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=Ve(c=>{if(!Ws(c,n,this.currentDirection))return;let f=l&&l[c]||{};o&&(f={min:0,max:0});const p=s?200:1e6,g=s?40:1e7,v={type:"inertia",velocity:r?t[c]:0,bounceStiffness:p,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(c,v)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return nl(this.visualElement,t),r.start($u(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ve(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ve(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ve(n=>{const{drag:r}=this.getProps();if(!Ws(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:a}=s.layout.layoutBox[n];i.set(t[n]-K(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Dn(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Ve(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();s[o]=jb({min:l,max:l},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ve(o=>{if(!Ws(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(K(l,u,s[o]))})}addListeners(){if(!this.visualElement.current)return;Mb.set(this.visualElement,this);const t=this.visualElement.current,n=Mr(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Dn(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),z.read(r);const o=as(window,"resize",()=>this.scalePositionWithinConstraints()),a=s.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ve(c=>{const f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=l[c].translate,f.set(f.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=cl,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:a}}}function Ws(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Vb(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Ob extends Gt{constructor(t){super(t),this.removeGroupControls=Ae,this.removeListeners=Ae,this.controls=new _b(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ae}unmount(){this.removeGroupControls(),this.removeListeners()}}const Jd=e=>(t,n)=>{e&&z.postRender(()=>e(t,n))};class Ib extends Gt{constructor(){super(...arguments),this.removePointerDownListener=Ae}onPointerDown(t){this.session=new mg(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:kg(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Jd(t),onStart:Jd(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&z.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Mr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ii={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function qd(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const gr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(R.test(e))e=parseFloat(e);else return e;const n=qd(e,t.target.x),r=qd(e,t.target.y);return`${n}% ${r}%`}},Bb={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=zt.parse(e);if(s.length>5)return r;const i=zt.createTransformer(e),o=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+o]/=a,s[1+o]/=l;const u=K(a,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}};class Ub extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;a1(zb),i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ii.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,o=r.projection;return o&&(o.isPresent=i,s||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||z.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),vu.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Cg(e){const[t,n]=im(),r=x.useContext(cu);return d.jsx(Ub,{...e,layoutGroup:r,switchLayoutGroup:x.useContext(hm),isPresent:t,safeToRemove:n})}const zb={borderRadius:{...gr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:gr,borderTopRightRadius:gr,borderBottomLeftRadius:gr,borderBottomRightRadius:gr,boxShadow:Bb};function $b(e,t,n){const r=ge(e)?e:is(e);return r.start($u("",r,t,n)),r.animation}function Wb(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Kb=(e,t)=>e.depth-t.depth;class Hb{constructor(){this.children=[],this.isDirty=!1}add(t){Lu(this.children,t),this.isDirty=!0}remove(t){Du(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Kb),this.isDirty=!1,this.children.forEach(t)}}function Gb(e,t){const n=it.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Ut(r),e(i-t))};return z.read(r,!0),()=>Ut(r)}const Pg=["TopLeft","TopRight","BottomLeft","BottomRight"],Xb=Pg.length,ef=e=>typeof e=="string"?parseFloat(e):e,tf=e=>typeof e=="number"||R.test(e);function Qb(e,t,n,r,s,i){s?(e.opacity=K(0,n.opacity!==void 0?n.opacity:1,Yb(r)),e.opacityExit=K(t.opacity!==void 0?t.opacity:1,0,Zb(r))):i&&(e.opacity=K(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(Jn(e,t,r))}function rf(e,t){e.min=t.min,e.max=t.max}function Me(e,t){rf(e.x,t.x),rf(e.y,t.y)}function sf(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function of(e,t,n,r,s){return e-=t,e=Oi(e,1/n,r),s!==void 0&&(e=Oi(e,1/s,r)),e}function Jb(e,t=0,n=1,r=.5,s,i=e,o=e){if(st.test(t)&&(t=parseFloat(t),t=K(o.min,o.max,t/100)-o.min),typeof t!="number")return;let a=K(i.min,i.max,r);e===i&&(a-=t),e.min=of(e.min,t,n,a,s),e.max=of(e.max,t,n,a,s)}function af(e,t,[n,r,s],i,o){Jb(e,t[n],t[r],t[s],t.scale,i,o)}const qb=["x","scaleX","originX"],eS=["y","scaleY","originY"];function lf(e,t,n,r){af(e.x,t,qb,n?n.x:void 0,r?r.x:void 0),af(e.y,t,eS,n?n.y:void 0,r?r.y:void 0)}function uf(e){return e.translate===0&&e.scale===1}function Tg(e){return uf(e.x)&&uf(e.y)}function cf(e,t){return e.min===t.min&&e.max===t.max}function tS(e,t){return cf(e.x,t.x)&&cf(e.y,t.y)}function df(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function jg(e,t){return df(e.x,t.x)&&df(e.y,t.y)}function ff(e){return Le(e.x)/Le(e.y)}function pf(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class nS{constructor(){this.members=[]}add(t){Lu(this.members,t),t.scheduleRender()}remove(t){if(Du(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function rS(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:f,rotateY:p,skewX:g,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),f&&(r+=`rotateX(${f}deg) `),p&&(r+=`rotateY(${p}deg) `),g&&(r+=`skewX(${g}deg) `),v&&(r+=`skewY(${v}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const tn={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},kr=typeof window<"u"&&window.MotionDebug!==void 0,Zo=["","X","Y","Z"],sS={visibility:"hidden"},hf=1e3;let iS=0;function Jo(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ng(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Vm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",z,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ng(r)}function Ag({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},a=t==null?void 0:t()){this.id=iS++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,kr&&(tn.totalNodes=tn.resolvedTargetDeltas=tn.recalculatedProjection=0),this.nodes.forEach(lS),this.nodes.forEach(pS),this.nodes.forEach(hS),this.nodes.forEach(uS),kr&&window.MotionDebug.record(tn)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Gb(p,250),ii.hasAnimatedSinceResize&&(ii.hasAnimatedSinceResize=!1,this.nodes.forEach(gf))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeTargetChanged:g,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||c.getDefaultTransition()||xS,{onLayoutAnimationStart:b,onLayoutAnimationComplete:h}=c.getProps(),m=!this.targetLayout||!jg(this.targetLayout,v)||g,y=!p&&g;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||p&&(m||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,y);const S={...ju(w,"layout"),onPlay:b,onComplete:h};(c.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else p||gf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ut(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(mS),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ng(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const k=S/1e3;yf(f.x,o.x,k),yf(f.y,o.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Vr(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),yS(this.relativeTarget,this.relativeTargetOrigin,p,k),y&&tS(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=J()),Me(y,this.relativeTarget)),w&&(this.animationValues=c,Qb(c,u,this.latestValues,k,m,h)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ut(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=z.update(()=>{ii.hasAnimatedSinceResize=!0,this.currentAnimation=$b(0,hf,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(hf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Rg(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||J();const f=Le(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const p=Le(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}Me(a,l),Vn(a,c),_r(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new nS),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Jo("z",o,u,this.animationValues);for(let c=0;c{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(mf),this.root.sharedNodes.clear()}}}function oS(e){e.updateLayout()}function aS(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;i==="size"?Ve(f=>{const p=o?n.measuredBox[f]:n.layoutBox[f],g=Le(p);p.min=r[f].min,p.max=p.min+g}):Rg(i,n.layoutBox,r)&&Ve(f=>{const p=o?n.measuredBox[f]:n.layoutBox[f],g=Le(r[f]);p.max=p.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+g)});const a=Mn();_r(a,r,n.layoutBox);const l=Mn();o?_r(l,e.applyTransform(s,!0),n.measuredBox):_r(l,r,n.layoutBox);const u=!Tg(a);let c=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:g}=f;if(p&&g){const v=J();Vr(v,n.layoutBox,p.layoutBox);const w=J();Vr(w,r,g.layoutBox),jg(v,w)||(c=!0),f.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=v,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function lS(e){kr&&tn.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function uS(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cS(e){e.clearSnapshot()}function mf(e){e.clearMeasurements()}function dS(e){e.isLayoutDirty=!1}function fS(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function gf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function pS(e){e.resolveTargetDelta()}function hS(e){e.calcProjection()}function mS(e){e.resetSkewAndRotation()}function gS(e){e.removeLeadSnapshot()}function yf(e,t,n){e.translate=K(t.translate,0,n),e.scale=K(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function vf(e,t,n,r){e.min=K(t.min,n.min,r),e.max=K(t.max,n.max,r)}function yS(e,t,n,r){vf(e.x,t.x,n.x,r),vf(e.y,t.y,n.y,r)}function vS(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const xS={duration:.45,ease:[.4,0,.1,1]},xf=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),wf=xf("applewebkit/")&&!xf("chrome/")?Math.round:Ae;function bf(e){e.min=wf(e.min),e.max=wf(e.max)}function wS(e){bf(e.x),bf(e.y)}function Rg(e,t,n){return e==="position"||e==="preserve-aspect"&&!kb(ff(t),ff(n),.2)}function bS(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const SS=Ag({attachResizeListener:(e,t)=>as(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),qo={current:void 0},Lg=Ag({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qo.current){const e=new SS({});e.mount(window),e.setOptions({layoutScroll:!0}),qo.current=e}return qo.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),kS={pan:{Feature:Ib},drag:{Feature:Ob,ProjectionNode:Lg,MeasureLayout:Cg}};function Sf(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&z.postRender(()=>i(t,vs(t)))}class CS extends Gt{mount(){const{current:t}=this.node;t&&(this.unmount=k1(t,n=>(Sf(this.node,n,"Start"),r=>Sf(this.node,r,"End"))))}unmount(){}}class PS extends Gt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ys(as(this.node.current,"focus",()=>this.onFocus()),as(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function kf(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&z.postRender(()=>i(t,vs(t)))}class ES extends Gt{mount(){const{current:t}=this.node;t&&(this.unmount=T1(t,n=>(kf(this.node,n,"Start"),(r,{success:s})=>kf(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const pl=new WeakMap,ea=new WeakMap,TS=e=>{const t=pl.get(e.target);t&&t(e)},jS=e=>{e.forEach(TS)};function NS({root:e,...t}){const n=e||document;ea.has(n)||ea.set(n,{});const r=ea.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(jS,{root:e,...t})),r[s]}function AS(e,t,n){const r=NS(t);return pl.set(e,n),r.observe(e),()=>{pl.delete(e),r.unobserve(e)}}const RS={some:0,all:1};class LS extends Gt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:RS[s]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:f}=this.node.getProps(),p=u?c:f;p&&p(l)};return AS(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(DS(t,n))&&this.startObserver()}unmount(){}}function DS({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const FS={inView:{Feature:LS},tap:{Feature:ES},focus:{Feature:PS},hover:{Feature:CS}},MS={layout:{ProjectionNode:Lg,MeasureLayout:Cg}},hl={current:null},Dg={current:!1};function _S(){if(Dg.current=!0,!!pu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>hl.current=e.matches;e.addListener(t),t()}else hl.current=!1}const VS=[...sg,he,zt],OS=e=>VS.find(rg(e)),Cf=new WeakMap;function IS(e,t,n){for(const r in t){const s=t[r],i=n[r];if(ge(s))e.addValue(r,s);else if(ge(i))e.addValue(r,is(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,is(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Pf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class BS{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Bu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=it.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),Dg.current||_S(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:hl.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Cf.delete(this.current),this.projection&&this.projection.unmount(),Ut(this.notifyUpdate),Ut(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=xn.has(t),s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&z.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in qn){const n=qn[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):J()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=is(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(tg(s)||Hm(s))?s=parseFloat(s):!OS(s)&&zt.test(n)&&(s=Jm(t,n)),this.setBaseTarget(t,ge(s)?s.get():s)),ge(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const o=wu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(s=o[t])}if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ge(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Fu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Fg extends BS{constructor(){super(...arguments),this.KeyframeResolver=ig}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ge(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function US(e){return window.getComputedStyle(e)}class zS extends Fg{constructor(){super(...arguments),this.type="html",this.renderInstance=bm}readValueFromInstance(t,n){if(xn.has(n)){const r=Iu(n);return r&&r.default||0}else{const r=US(t),s=(vm(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Sg(t,n)}build(t,n,r){ku(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Tu(t,n,r)}}class $S extends Fg{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=J}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(xn.has(n)){const r=Iu(n);return r&&r.default||0}return n=Sm.has(n)?n:yu(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Pm(t,n,r)}build(t,n,r){Cu(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){km(t,n,r,s)}mount(t){this.isSVGTag=Eu(t.tagName),super.mount(t)}}const WS=(e,t)=>xu(e)?new $S(t):new zS(t,{allowProjection:e!==x.Fragment}),KS=g1({...hb,...FS,...kS,...MS},WS),O=Rx(KS);function Mg(){return(localStorage.getItem("apiBase")||"").replace(/\/+$/,"")}function xs(e){const t=Mg(),n=e.startsWith("/")?e:`/${e}`;return t?`${t}${n}`:n}async function fo(e){const t=await fetch(xs(e));if(!t.ok)throw new Error(await t.text());return t.json()}async function vt(e,t){const n=await fetch(xs(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw new Error(await n.text());return n.json()}const HS=()=>{const e=Mg();if(e)try{const r=new URL(e.includes("://")?e:`http://${e}`);return`${r.protocol==="https:"?"wss:":"ws:"}//${r.host}/ws`}catch{}const t=window.location;return`${t.protocol==="https:"?"wss:":"ws:"}//${t.host}/ws`};function GS(e){const[t,n]=x.useState(!1),r=x.useRef(e);return r.current=e,x.useEffect(()=>{let s=!1,i=0,o,a=null;const l=()=>{s||(a=new WebSocket(HS()),a.onopen=()=>{i=0,n(!0),a==null||a.send("ping")},a.onclose=()=>{n(!1),i+=1,o=setTimeout(l,Math.min(8e3,500+i*400))},a.onerror=()=>a==null?void 0:a.close(),a.onmessage=u=>r.current(String(u.data)))};return l(),()=>{s=!0,clearTimeout(o),a==null||a.close()}},[]),t}const _g=x.createContext(null),Wu=5e3,Ku="pn532_browser_log_v1";function XS(){try{const e=sessionStorage.getItem(Ku);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(-Wu):[]}catch{return[]}}function QS(e){try{sessionStorage.setItem(Ku,JSON.stringify(e.slice(-Wu)))}catch{}}function YS(e,t,n){if(typeof e=="object"&&e&&"present"in e&&e.present===!1){t(null),n(!1);return}n(!0),typeof e=="object"&&e&&"uid"in e&&t(e)}function ZS(e){if(!e||typeof e!="object")return!1;const t=e;return t.present===!1?!1:typeof t.uid=="string"&&t.uid.length>0}function JS(e){return!e||typeof e!="object"?!1:e.event==="recorded"}function qS({children:e}){const[t,n]=x.useState(null),[r,s]=x.useState(!1),[i,o]=x.useState(!1),[a,l]=x.useState(()=>XS()),[u,c]=x.useState(0),[f,p]=x.useState("tag"),g=x.useRef(0),v=x.useCallback(k=>{const C=Date.now();k==="tag"&&C-g.current<280||(g.current=C,p(k),c(E=>E+1))},[]),w=x.useCallback(k=>{try{const C=JSON.parse(k),E=C.channel||"unknown";if(l(P=>{const D=[...P,{t:Date.now(),channel:E,payload:C.payload}].slice(-Wu);return QS(D),D}),E==="scan")YS(C.payload,n,s),ZS(C.payload)&&v("tag");else if(E==="capture"&&JS(C.payload))v("vault");else if(E==="pn532"){const P=C.payload;typeof(P==null?void 0:P.connected)=="boolean"&&o(P.connected)}}catch{}},[v]),b=GS(w);x.useEffect(()=>{b&&fo("/api/status").then(k=>{typeof k.pn532Connected=="boolean"&&o(k.pn532Connected)}).catch(()=>{})},[b]);const h=x.useCallback((k,C)=>{if(!k){n(null),s(!1);return}C&&(n(C),s(!0),v("tag"))},[v]),m=x.useCallback(()=>{l([]),sessionStorage.removeItem(Ku)},[]),y=x.useCallback(()=>{const k=new Blob([JSON.stringify(a,null,2)],{type:"application/json"}),C=URL.createObjectURL(k),E=document.createElement("a");E.href=C,E.download=`pn532-browser-log-${Date.now()}.json`,E.click(),URL.revokeObjectURL(C)},[a]),S=x.useMemo(()=>({wsOk:b,pn532Connected:i,lastTag:t,tagPresent:r,log:a,cashWave:u,cashVariant:f,clearBrowserLog:m,exportBrowserLog:y,applyScanPoll:h}),[b,i,t,r,a,u,f,m,y,h]);return d.jsx(_g.Provider,{value:S,children:e})}function or(){const e=x.useContext(_g);if(!e)throw new Error("useNfcWs outside NfcWsProvider");return e}function e2(){const{log:e,exportBrowserLog:t,clearBrowserLog:n,wsOk:r}=or();return d.jsxs("div",{className:"flash-log-bar relative z-40 mx-auto flex max-w-6xl flex-wrap items-center justify-between gap-2 overflow-hidden border-b border-bubble-accent/15 px-4 py-2.5 font-mono text-[10px] text-bubble-mint/80 sm:text-xs",children:[d.jsx("div",{className:"pointer-events-none absolute inset-0 overflow-hidden",children:d.jsx("div",{className:"absolute inset-y-0 left-0 w-1/3 bg-gradient-to-r from-bubble-accent/10 to-transparent animate-shimmerLine"})}),d.jsxs("div",{className:"relative flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-1",children:[d.jsx("span",{className:"shrink-0 animate-pulse text-bubble-volt",children:"◆"}),d.jsxs("span",{className:"truncate",children:[d.jsx("span",{className:"text-bubble-accent/70",children:"BUF"})," ",d.jsx("span",{className:"text-glow-matrix font-bold text-bubble-mint",children:e.length}),d.jsx("span",{className:"text-bubble-mint/40",children:"_evt"})]}),d.jsx("span",{className:"hidden text-bubble-mint/20 sm:inline",children:"│"}),d.jsxs("span",{children:[d.jsx("span",{className:"text-bubble-accent/60",children:"WS"})," ",d.jsx("span",{className:r?"text-glow-matrix font-bold tracking-wide text-bubble-mint":"animate-pulse text-glow-rose font-semibold text-bubble-rose",children:r?"SYNC":"WAIT"})]})]}),d.jsxs("div",{className:"relative flex shrink-0 gap-2",children:[d.jsx("button",{type:"button",onClick:t,className:"btn-neon rounded-md border border-bubble-accent/50 bg-gradient-to-r from-bubble-accent/25 to-bubble-mint/15 px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider text-bubble-accent sm:text-xs",children:"Exfil"}),d.jsx("button",{type:"button",onClick:n,className:"rounded-md border border-bubble-rose/40 bg-bubble-rose/10 px-3 py-1.5 text-[10px] font-bold uppercase tracking-wide text-bubble-rose transition hover:border-bubble-rose hover:bg-bubble-rose/20 sm:text-xs",children:"Purge"})]})]})}function t2(){return d.jsxs("div",{className:"pointer-events-none fixed inset-0 z-[2] overflow-hidden",children:[d.jsx("div",{className:"absolute -left-[20%] top-[10%] h-[min(70vh,520px)] w-[min(70vh,520px)] rounded-full bg-fuchsia-600/25 blur-[100px] animate-pulseGlow",style:{animationDelay:"0s"}}),d.jsx("div",{className:"absolute -right-[15%] bottom-[5%] h-[min(55vh,440px)] w-[min(55vh,440px)] rounded-full bg-cyan-400/20 blur-[90px] animate-pulseGlow",style:{animationDelay:"1.2s"}}),d.jsx("div",{className:"absolute left-[35%] top-[40%] h-[min(45vh,360px)] w-[min(45vh,360px)] -translate-x-1/2 -translate-y-1/2 rounded-full bg-emerald-400/15 blur-[80px] animate-floatSlow"}),d.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,transparent_0%,rgba(2,4,8,0.75)_100%)]"})]})}const Ef=16,n2=7;function r2(){var e;try{const t=window.AudioContext||window.webkitAudioContext;if(!t)return;const n=new t,r=n.createGain();r.gain.value=.11,r.connect(n.destination);const s=(c,f,p)=>{const g=n.createOscillator(),v=n.createGain();g.type="sine",g.frequency.setValueAtTime(c,f),v.gain.setValueAtTime(0,f),v.gain.linearRampToValueAtTime(1,f+.02),v.gain.exponentialRampToValueAtTime(.01,f+p),g.connect(v),v.connect(r),g.start(f),g.stop(f+p+.05)},i=n.currentTime;s(523.25,i,.11),s(659.25,i+.055,.13),s(783.99,i+.1,.16),s(1046.5,i+.14,.2);const o=n.createBufferSource(),a=n.createBuffer(1,n.sampleRate*.07,n.sampleRate),l=a.getChannelData(0);for(let c=0;cvoid n.close(),700)}catch{}}function s2(){const{cashWave:e,cashVariant:t,lastTag:n}=or(),[r,s]=x.useState(!1),[i,o]=x.useState(0);return x.useEffect(()=>{if(e===0)return;o(e),s(!0),r2();const a=window.setTimeout(()=>s(!1),1650);return()=>window.clearTimeout(a)},[e]),d.jsx("div",{className:"pointer-events-none fixed left-2 top-[4.25rem] z-[55] sm:left-4 sm:top-[4.5rem] md:top-[5.25rem]",children:d.jsx(am,{mode:"wait",children:r?d.jsxs(O.div,{className:"relative flex flex-col items-start",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,scale:.92,filter:"blur(4px)"},transition:{duration:.4},children:[d.jsx(O.div,{className:"absolute -left-8 -top-8 h-40 w-40 rounded-full bg-gradient-to-br from-amber-400/45 via-yellow-200/30 to-bubble-mint/35 blur-2xl",initial:{scale:.2,opacity:0},animate:{scale:[.2,1.35,1],opacity:[0,1,.7]},transition:{duration:.5,ease:[.22,1,.36,1]}}),Array.from({length:Ef}).map((a,l)=>{const u=l/Ef*Math.PI*2,c=56+l%4*10;return d.jsx(O.span,{className:"absolute left-8 top-9 h-2 w-2 rounded-full bg-gradient-to-br from-yellow-100 to-amber-500 shadow-[0_0_12px_rgba(250,204,21,1)]",initial:{x:0,y:0,opacity:0,scale:0},animate:{x:Math.cos(u)*c,y:Math.sin(u)*c,opacity:[0,1,0],scale:[0,1.3,.3]},transition:{duration:.8,delay:l*.018,ease:"easeOut"}},`s-${l}`)}),Array.from({length:n2}).map((a,l)=>d.jsx(O.span,{className:"absolute left-8 top-8 text-xl sm:text-2xl",initial:{x:0,y:0,opacity:0,rotate:-30,scale:0},animate:{x:(l%2===0?1:-1)*(36+l*12),y:-32-l*11,opacity:[0,1,0],rotate:l*35,scale:[0,1.15,.85]},transition:{duration:.9,delay:.04+l*.035,ease:[.22,1,.36,1]},children:"🪙"},`c-${l}`)),d.jsxs(O.div,{className:"relative flex h-[4.75rem] w-[4.75rem] items-center justify-center sm:h-[5.5rem] sm:w-[5.5rem]",initial:{scale:0,rotate:-40},animate:{scale:[0,1.3,.92,1.06,1],rotate:[-40,12,-6,3,0]},transition:{duration:.7,ease:[.34,1.56,.64,1]},children:[d.jsx(O.div,{className:"absolute inset-0 rounded-2xl border-2 border-yellow-200/90",animate:{boxShadow:["0 0 25px rgba(250,204,21,0.55), inset 0 0 22px rgba(254,240,138,0.2)","0 0 50px rgba(0,255,157,0.5), inset 0 0 28px rgba(0,229,255,0.15)","0 0 28px rgba(250,204,21,0.6), inset 0 0 18px rgba(254,240,138,0.25)"]},transition:{duration:1.1,repeat:2}}),d.jsxs("svg",{viewBox:"0 0 100 100",className:"relative z-[1] h-[72%] w-[72%] drop-shadow-[0_0_14px_rgba(250,204,21,0.9)]","aria-hidden":!0,children:[d.jsxs("defs",{children:[d.jsxs("linearGradient",{id:"cashGold",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d.jsx("stop",{offset:"0%",stopColor:"#fef9c3"}),d.jsx("stop",{offset:"40%",stopColor:"#facc15"}),d.jsx("stop",{offset:"100%",stopColor:"#a16207"})]}),d.jsxs("filter",{id:"cashGlow",x:"-50%",y:"-50%",width:"200%",height:"200%",children:[d.jsx("feGaussianBlur",{stdDeviation:"1.2",result:"b"}),d.jsxs("feMerge",{children:[d.jsx("feMergeNode",{in:"b"}),d.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),d.jsx("circle",{cx:"50",cy:"50",r:"44",fill:"url(#cashGold)",filter:"url(#cashGlow)"}),d.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"#422006",strokeOpacity:"0.28",strokeWidth:"2"}),d.jsx("text",{x:"50",y:"64",textAnchor:"middle",fill:"#713f12",fontSize:"54",fontWeight:"700",fontFamily:"Audiowide, Orbitron, system-ui, sans-serif",children:"$"})]}),d.jsx(O.div,{className:"pointer-events-none absolute inset-0 overflow-hidden rounded-2xl",initial:!1,children:d.jsx(O.div,{className:"absolute inset-y-2 w-2/5 bg-gradient-to-r from-transparent via-white/60 to-transparent skew-x-[-18deg]",initial:{left:"-40%"},animate:{left:"140%"},transition:{duration:.55,delay:.12,ease:"easeInOut"}})})]}),d.jsxs(O.div,{className:"relative -mt-0.5 max-w-[12rem] pl-0.5",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.12,type:"spring",stiffness:320,damping:22},children:[d.jsx(O.p,{className:"font-display text-[10px] tracking-[0.42em] text-yellow-100 sm:text-[11px]",animate:{textShadow:["0 0 10px rgba(250,204,21,0.95)","0 0 22px rgba(0,255,157,0.75)","0 0 12px rgba(250,204,21,0.9)"]},transition:{duration:.75,repeat:3},children:t==="vault"?"VAULT · LOCKED":"CHA-CHING · HIT"}),n!=null&&n.uid?d.jsx(O.p,{className:"mt-1 truncate font-mono text-[10px] font-bold tracking-[0.15em] text-bubble-mint sm:text-xs",initial:{opacity:0,x:-6},animate:{opacity:1,x:0},transition:{delay:.22},children:n.uid}):null]})]},i):null})})}const Vg=x.createContext(()=>{});function i2({children:e}){const[t,n]=x.useState([]),r=x.useCallback((i,o="info")=>{const a=Date.now()+Math.random();n(l=>[...l,{id:a,msg:i,kind:o}]),setTimeout(()=>n(l=>l.filter(u=>u.id!==a)),4200)},[]),s=x.useMemo(()=>r,[r]);return d.jsxs(Vg.Provider,{value:s,children:[e,d.jsx("div",{className:"pointer-events-none fixed bottom-5 right-5 z-[60] flex max-w-sm flex-col gap-3",children:d.jsx(am,{children:t.map(i=>d.jsxs(O.div,{initial:{opacity:0,x:40,rotate:-2,scale:.92},animate:{opacity:1,x:0,rotate:0,scale:1},exit:{opacity:0,x:20,scale:.9},transition:{type:"spring",stiffness:380,damping:26},className:`pointer-events-auto relative overflow-hidden border-2 px-5 py-3.5 font-mono text-xs backdrop-blur-md ${i.kind==="err"?"border-bubble-rose bg-bubble-950/95 text-bubble-rose shadow-glowRose":"border-bubble-mint bg-bubble-900/95 text-bubble-mint shadow-glow"} `,children:[d.jsx("div",{className:`pointer-events-none absolute inset-0 opacity-30 ${i.kind==="err"?"bg-gradient-to-r from-bubble-rose/20 to-transparent":"bg-gradient-to-r from-bubble-accent/20 to-bubble-mint/10"}`}),d.jsx("span",{className:"relative mr-2 font-black opacity-80",children:i.kind==="err"?"!!":"»"}),d.jsx("span",{className:"relative",children:i.msg})]},i.id))})})]})}function Je(){return x.useContext(Vg)}function o2(e){const t=e.replace(/\s/g,"");if(t.length!==32)return null;const n=new Uint8Array(16);for(let u=0;u<16;u++)n[u]=parseInt(t.slice(u*2,u*2+2),16);const r=n[6],s=n[7],i=n[8],o=r>>4&1|s>>0&2|i>>0&4,a=r>>5&1|s>>1&2|i>>1&4,l=r>>6&1|s>>2&2|i>>2&4;return{c1:o,c2:a,c3:l}}function Og(e){switch(e){case 0:return"Ultralight / NTAG / Type 2";case 8:return"MIFARE Classic 1K";case 9:return"MIFARE Mini";case 24:return"MIFARE Classic 4K";default:return`SAK 0x${e.toString(16).toUpperCase()}`}}function Ig(e){var n;const t=e.replace(/\s/g,"");return t.length%2!==0?e:((n=t.match(/.{2}/g))==null?void 0:n.join(":"))??t}function a2(e){switch(e){case 1:return"Classic-style (MIFARE)";case 2:return"Type 2 / Ultralight-style";default:return"Unknown (check SAK/ATQA)"}}function l2(e){const t=[];return e.uidLen===4?t.push("4-byte UID — single cascade level (CL1)."):e.uidLen===7?t.push("7-byte UID — double cascade (CL1 + CL2) typical for 7B tags."):e.uidLen===10&&t.push("10-byte UID — triple cascade path."),e.sak===0&&t.push("SAK 0x00 — typical Type 2 / Ultralight-style path; use page read/write."),(e.sak===8||e.sak===9||e.sak===24)&&t.push("MIFARE Classic family — authenticate per sector trailer, then block read/write."),(e.atqa===1024||e.atqa===17408)&&t.push("ATQA 0x0400/0x4400 class — common Type A / MIFARE inventory shapes."),t}function u2(e){return e.map(t=>(Number(t)&255).toString(16).toUpperCase().padStart(2,"0")).join(" ")}function c2({className:e=""}){return d.jsx("div",{className:`relative ${e}`.trim(),children:d.jsxs("svg",{viewBox:"0 0 400 220",className:"h-auto w-full max-w-md text-bubble-mint/90","aria-hidden":!0,children:[d.jsxs("defs",{children:[d.jsxs("linearGradient",{id:"g1",x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[d.jsx("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0.9"}),d.jsx("stop",{offset:"100%",stopColor:"#00e5ff",stopOpacity:"0.35"})]}),d.jsxs("filter",{id:"glow",children:[d.jsx("feGaussianBlur",{stdDeviation:"2",result:"b"}),d.jsxs("feMerge",{children:[d.jsx("feMergeNode",{in:"b"}),d.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),[0,1,2,3].map(t=>d.jsx("ellipse",{cx:"200",cy:"110",rx:40+t*38,ry:28+t*26,fill:"none",stroke:"currentColor",strokeWidth:"0.6",strokeOpacity:.22-t*.04,className:"origin-center animate-[spin_32s_linear_infinite]",style:{transformOrigin:"200px 110px",animationDelay:`${t*2}s`}},t)),d.jsx("g",{filter:"url(#glow)",children:d.jsx("path",{d:"M200 110 L360 110 A160 80 0 0 1 200 190 Z",fill:"url(#g1)",fillOpacity:"0.12",className:"origin-center animate-[spin_6s_linear_infinite]",style:{transformOrigin:"200px 110px"}})}),d.jsx("circle",{cx:"200",cy:"110",r:"36",fill:"none",stroke:"currentColor",strokeWidth:"1.2",opacity:"0.5"}),d.jsx("circle",{cx:"200",cy:"110",r:"22",fill:"none",stroke:"#00e5ff",strokeWidth:"0.8",opacity:"0.45"}),d.jsx("circle",{cx:"200",cy:"110",r:"8",fill:"currentColor",opacity:"0.35"}),Array.from({length:12}).map((t,n)=>{const r=n/12*Math.PI*2,s=200+Math.cos(r)*118,i=110+Math.sin(r)*78;return d.jsx("rect",{x:s-1,y:i-1,width:"2",height:"2",fill:"currentColor",opacity:.15+n%3*.08,className:"animate-pulse",style:{animationDelay:`${n*.15}s`}},n)}),d.jsx("text",{x:"200",y:"205",textAnchor:"middle",className:"fill-bubble-mint/40 font-mono text-[9px] tracking-[0.35em]",children:"13.56MHZ"})]})})}function d2(){const e=Je(),{lastTag:t,applyScanPoll:n}=or(),[r,s]=x.useState(null),[i,o]=x.useState(!0),a=()=>{fo("/api/status").then(s).catch(()=>e("Status unreachable","err"))};x.useEffect(()=>{a();const c=setInterval(a,3e3);return()=>clearInterval(c)},[e]),x.useEffect(()=>{r&&typeof r.scanning=="boolean"&&o(r.scanning)},[r]);const l=async()=>{try{await vt("/api/nfc/scan",{enable:!i}),o(!i),e(i?"Continuous scan off":"Continuous scan on")}catch(c){e(String(c),"err")}},u=async()=>{try{const c=await vt("/api/nfc/poll",{});c.present&&c.tag?(n(!0,c.tag),e(`Tag ${c.tag.uid}`)):(n(!1),e("No tag"))}catch(c){e(String(c),"err")}};return d.jsxs("div",{className:"space-y-8",children:[d.jsxs(O.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.5,ease:[.22,1,.36,1]},className:"glass relative overflow-hidden p-6 md:p-10",children:[d.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[conic-gradient(from_180deg_at_50%_120%,rgba(0,229,255,0.08),transparent_40%,rgba(255,42,109,0.06),transparent_70%)]"}),d.jsxs("div",{className:"relative grid gap-8 lg:grid-cols-[1fr_min(320px,40%)] lg:items-center",children:[d.jsxs("div",{children:[d.jsx("p",{className:"font-mono text-[10px] font-bold tracking-[0.4em] text-bubble-accent/80",children:"COMMAND_LAYER"}),d.jsxs("h1",{className:"font-display mt-2 text-3xl font-normal tracking-wide text-glow-matrix md:text-5xl",children:["NFC ",d.jsx("span",{className:"text-bubble-accent",children:"CONTROL"})]}),d.jsx("p",{className:"mt-3 max-w-xl text-sm leading-relaxed text-slate-400",children:"Full-time scan out of the box. Fat RF retries. Browser log + device session export — crank it from your phone."}),(r==null?void 0:r.session)&&(r.session.deepCapture||r.session.usedBytes>0)&&d.jsxs(O.div,{initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},className:"mt-5 flex flex-wrap items-center gap-3 rounded-xl border border-bubble-accent/40 bg-gradient-to-r from-bubble-accent/15 to-bubble-mint/10 px-4 py-3 text-sm shadow-glowCyan",children:[d.jsxs("span",{className:"font-mono text-bubble-mint",children:["RAM ",r.session.usedBytes,"/",r.session.maxBytes,r.session.full?" · LOCKED":""]}),d.jsx(sm,{to:"/capture",className:"btn-neon rounded-lg bg-bubble-mint/20 px-3 py-1 text-xs font-bold text-bubble-mint",children:"Read-all →"})]}),d.jsxs("div",{className:"mt-8 flex flex-wrap gap-3",children:[d.jsx(O.button,{type:"button",whileHover:{scale:1.04},whileTap:{scale:.98},onClick:u,className:"btn-neon rounded-xl bg-gradient-to-r from-bubble-accent via-cyan-400 to-bubble-mint px-6 py-3 text-sm font-black uppercase tracking-wider text-bubble-950 shadow-neonBtn",children:"Poll tag"}),d.jsx(O.button,{type:"button",whileHover:{scale:1.03},whileTap:{scale:.98},onClick:l,className:`rounded-xl border-2 px-6 py-3 text-sm font-bold uppercase tracking-wide transition ${i?"border-bubble-mint/70 bg-bubble-mint/15 text-glow-matrix text-bubble-mint shadow-glow":"border-white/20 bg-black/30 text-slate-400 hover:border-bubble-accent/50 hover:text-bubble-accent"}`,children:i?"Stop scan":"Start scan"})]})]}),d.jsx("div",{className:"relative flex justify-center lg:justify-end",children:d.jsx("div",{className:"relative w-full max-w-[280px] opacity-90 drop-shadow-[0_0_40px_rgba(0,229,255,0.35)]",children:d.jsx(c2,{})})})]})]}),d.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[d.jsxs(O.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.08},className:"glass p-6",children:[d.jsx("h2",{className:"font-display text-lg font-normal text-bubble-accent text-glow-cyan",children:"Device stack"}),r?d.jsxs("ul",{className:"mt-4 space-y-3 font-mono text-sm text-slate-300",children:[d.jsxs("li",{className:"flex justify-between border-b border-white/5 pb-2",children:[d.jsx("span",{className:"text-slate-500",children:"uptime"}),d.jsxs("span",{className:"text-bubble-mint",children:[(r.uptimeMs/1e3).toFixed(1),"s"]})]}),d.jsxs("li",{className:"flex justify-between border-b border-white/5 pb-2",children:[d.jsx("span",{className:"text-slate-500",children:"heap"}),d.jsx("span",{className:"text-white",children:r.freeHeap})]}),d.jsxs("li",{className:"flex justify-between",children:[d.jsx("span",{className:"text-slate-500",children:"PN532"}),r.pn532Connected?d.jsxs("span",{className:"flex items-center gap-2",children:[r.pn532&&d.jsxs("span",{className:"text-[10px] text-slate-500",children:["IC",r.pn532.ic," v",r.pn532.fwHi,".",r.pn532.fwLo]}),d.jsx("span",{className:"rounded px-1.5 py-0.5 bg-bubble-mint/20 text-bubble-mint font-bold text-[10px] tracking-widest",children:"READY"})]}):d.jsx("span",{className:"animate-pulse rounded px-1.5 py-0.5 bg-amber-500/20 text-amber-400 font-bold text-[10px] tracking-widest",children:"SEARCHING"})]})]}):d.jsx("p",{className:"mt-4 animate-pulse font-mono text-sm text-bubble-accent/60",children:"Pulling status…"})]}),d.jsxs(O.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:.14},className:"glass p-6",children:[d.jsx("h2",{className:"font-display text-lg font-normal text-bubble-rose/90 text-glow-rose",children:"Live tag"}),t?d.jsxs("div",{className:"mt-4 space-y-4 rounded-xl border border-bubble-mint/25 bg-black/35 p-4 shadow-glow",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-[10px] font-mono uppercase tracking-widest text-bubble-mint/50",children:"UID"}),d.jsx("div",{className:"font-mono text-xl font-bold tracking-[0.15em] text-glow-matrix text-bubble-mint md:text-2xl",children:Ig(t.uid)}),d.jsxs("p",{className:"mt-1 font-mono text-[11px] text-slate-500",children:["raw ",t.uid," · ",t.uidLen," byte",t.uidLen===1?"":"s"]})]}),d.jsxs("div",{className:"grid gap-3 border-t border-white/5 pt-3 font-mono text-[11px] text-slate-300 sm:grid-cols-2",children:[d.jsxs("div",{children:[d.jsx("span",{className:"text-slate-500",children:"ATQA"})," ",d.jsxs("span",{className:"text-bubble-accent",children:["0x",(t.atqaHex??t.atqa.toString(16).toUpperCase().padStart(4,"0")).slice(-4)]}),d.jsxs("span",{className:"ml-2 text-slate-500",children:["(",t.atqa,")"]})]}),d.jsxs("div",{children:[d.jsx("span",{className:"text-slate-500",children:"SAK"})," ",d.jsxs("span",{className:"text-bubble-accent",children:["0x",(t.sakHex??t.sak.toString(16).toUpperCase().padStart(2,"0")).slice(-2)]}),d.jsxs("span",{className:"ml-1 text-slate-400",children:["— ",Og(t.sak)]})]}),d.jsxs("div",{className:"sm:col-span-2",children:[d.jsx("span",{className:"text-slate-500",children:"Guess"})," ",d.jsx("span",{className:"text-bubble-mint",children:t.typeGuess??a2(t.typeHint)}),d.jsxs("span",{className:"ml-2 text-slate-600",children:["· hint ",t.typeHint]})]})]}),t.pn532GeneralStatus&&t.pn532GeneralStatus.length>0&&d.jsxs("div",{className:"rounded-lg border border-bubble-accent/20 bg-black/40 p-3",children:[d.jsx("p",{className:"text-[10px] font-mono uppercase tracking-widest text-bubble-accent/70",children:"PN532 general status"}),d.jsx("p",{className:"mt-2 break-all font-mono text-[10px] leading-relaxed text-slate-400",children:u2(t.pn532GeneralStatus)}),d.jsx("p",{className:"mt-2 text-[10px] text-slate-600",children:"Raw bytes from the chip right after this inventory (error flags, last command, tag count — see NXP PN532 user manual)."})]}),d.jsx("ul",{className:"space-y-1 border-t border-white/5 pt-3 text-[11px] leading-relaxed text-slate-500",children:l2(t).map((c,f)=>d.jsxs("li",{className:"flex gap-2",children:[d.jsx("span",{className:"text-bubble-mint/40",children:"▸"}),d.jsx("span",{children:c})]},f))})]}):d.jsx("p",{className:"mt-6 font-mono text-sm text-bubble-mint/40",children:"Listening on the field…"})]})]})]})}function f2(){const e=Je(),[t,n]=x.useState("FFFFFFFFFFFF"),[r,s]=x.useState(!1),[i,o]=x.useState(0),[a,l]=x.useState(""),[u,c]=x.useState(""),f=async()=>{try{const v=await vt("/api/mifare/read-block",{block:i,key:t,keyB:r});v.data?(l(v.data),e("Read OK")):e(v.error||"failed","err")}catch(v){e(String(v),"err")}},p=async()=>{try{const v=await vt("/api/ul/read-page",{page:i});v.data?(l(v.data+" (UL page)"),e("UL read OK")):e(v.error??"no data returned","err")}catch(v){e(String(v),"err")}},g=u?o2(u):null;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"glass p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Read / analyze"}),d.jsx("p",{className:"mt-2 text-sm text-slate-400",children:"Authenticate with a known key, dump a block, paste a sector trailer to decode access bits."}),d.jsxs("div",{className:"mt-6 grid gap-4 md:grid-cols-2",children:[d.jsxs("label",{className:"block space-y-2 text-sm",children:["Key (12 hex)",d.jsx("input",{value:t,onChange:v=>n(v.target.value),className:"w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono text-bubble-mint outline-none ring-bubble-accent/40 focus:ring-2"})]}),d.jsxs("label",{className:"flex items-end gap-3 text-sm",children:[d.jsx("input",{type:"checkbox",checked:r,onChange:v=>s(v.target.checked)})," Key B"]}),d.jsxs("label",{className:"block space-y-2 text-sm",children:["Block / page",d.jsx("input",{type:"number",value:i,onChange:v=>o(Number(v.target.value)),className:"w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2 outline-none ring-bubble-accent/40 focus:ring-2"})]})]}),d.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:f,className:"rounded-2xl bg-bubble-accent/90 px-4 py-2 font-semibold text-white",children:"MIFARE read block"}),d.jsx("button",{type:"button",onClick:p,className:"rounded-2xl border border-white/15 px-4 py-2",children:"Ultralight read page"})]}),a&&d.jsx("pre",{className:"mt-4 overflow-auto rounded-2xl border border-white/10 bg-black/30 p-4 font-mono text-sm",children:a})]}),d.jsxs("div",{className:"glass p-6",children:[d.jsx("h2",{className:"font-display text-lg font-semibold",children:"Sector trailer playground"}),d.jsxs("label",{className:"mt-4 block text-sm",children:["16-byte trailer (32 hex) — bytes 6–8 are access bytes",d.jsx("textarea",{value:u,onChange:v=>c(v.target.value),rows:3,className:"mt-2 w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-xs outline-none focus:ring-2 focus:ring-bubble-accent/40"})]}),g&&d.jsxs("div",{className:"mt-4 rounded-2xl border border-bubble-mint/30 bg-bubble-mint/5 p-4 text-sm",children:["Parsed C1–C3 nibble pattern: ",g.c1," ",g.c2," ",g.c3," (see NXP MIFARE docs for truth tables)"]}),d.jsxs("p",{className:"mt-4 text-xs text-slate-500",children:["SAK hints: common values for labeling only — ",Og(24)," etc."]})]})]})}const ws="Lab-only synthetic data and well-known defaults. Edit bytes freely to validate parsers, checksums, and emulate/raw paths — never treat these as real tags.",Tf=[{id:"get-fw",title:"GetFirmwareVersion (0x02)",hex:"02",detail:"Expect PN532 firmware major/minor in response payload."},{id:"get-status",title:"GetGeneralStatus (0x04)",hex:"04",detail:"Chip + RF status snapshot; useful sanity check after a stuck session."},{id:"in-list-a",title:"InListPassiveTarget — 106 kbps, 1 target",hex:"4A0100",detail:"Poll one ISO14443-A target at 106 kbps (maxTg=1, BrTy=0)."}],jf=[{id:"tg-stub",title:"TgInitAsTarget — opcode only (shell)",hex:"8C",detail:"Minimal placeholder; real target mode needs a full parameter block per NXP UM0701. Extend with NFCID, FeliCa params, etc."},{id:"tg-type-a-sketch",title:"TgInitAsTarget — Type A sketch (synthetic NFCID3T)",hex:"8C000012DEADBEEF00000000000000000000000000000000000000000000000000",detail:"Synthetic 0x8C prefix + padded fake ID — not guaranteed to satisfy any reader; use as a byte-editing template only."}],p2="DEADBEEF2208040000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFF078069FFFFFFFFFFFF",h2="04112233445566172233445566172233445566172233445566172233",m2="0310D1010C55046578616D706C652E636F6DFE",ml=[{id:"mifare-block0",title:"MIFARE Classic — block 0 (16 B, synthetic UID+BCC)",hex:"DEADBEEF220804000000000000000000",byteLength:16,sha256Hex:"6f13f064d70ec33b7ace5842011d66aff3852baa4ab7c0a85aa66d113c7189fe",detail:"Fake 4-byte UID (DE:AD:BE:EF wire order as stored), BCC = XOR(UID), rest filler. Pair with key FFFFFFFFFFFF on a writable tag only."},{id:"mifare-sector0",title:"MIFARE Classic — sector 0 dump (64 B)",hex:p2,byteLength:64,sha256Hex:"11095df4db11e4271f40234533db45de35c4ca69f04e231e3fa47f38181e0168",detail:"Four blocks: manufacturer/UID, empty, empty, default trailer (Key A/B FFFFFFFFFFFF, access FF078069). Edit block 1–2 payload and re-hash to validate your pipeline."},{id:"ntag-pages",title:"NTAG-style — pages 0–6 (28 B)",hex:h2,byteLength:28,sha256Hex:"8ffd95e646b2deb218dabd72e35c7a1938725e07332d8ed7df4f2a2656e590a0",detail:"Synthetic UID/internal/lock placeholders — not copied from a physical tag."},{id:"ndef-uri-tlv",title:"NDEF TLV — URI https://example.com/",hex:m2,byteLength:19,sha256Hex:"81197b6cd6e40a3f62f56f0c0f3f449c63a956919d04c5b5317895ad4328fa14",detail:"Type 2 TLV (0x03) + short NDEF Well-Known URI record; append to user memory after static pages in real layouts."}],g2=["FFFFFFFFFFFF","A0A1A2A3A4A5","D3F7D3F7D3F7","000000000000","B0B1B2B3B4B5","AABBCCDDEEFF","4D3A99C351DD","1A982C7E459A","714C5C886E97","587EE5F9350F","A0478CC39091","26940B21FFF5","E4410EF8ED2D"],y2=ml.map(e=>({name:`LAB // ${e.title}`,hex:e.hex,note:e.detail}));function po({mode:e,onApplyHex:t,onPickBinary:n,className:r=""}){const[s,i]=x.useState(0),o=()=>i(a=>a+1);return e==="raw"?d.jsx("div",{className:`flex flex-wrap items-center gap-2 ${r}`,children:d.jsxs("select",{defaultValue:"","aria-label":"Load PN532 lab command",className:"max-w-full rounded-xl border border-bubble-mint/25 bg-black/40 px-3 py-2 font-mono text-xs text-bubble-mint/90",onChange:a=>{const l=a.target.value;if(!l)return;const u=Tf.find(c=>c.id===l);u&&t(u.hex),o()},children:[d.jsx("option",{value:"",children:"Lab: PN532 command bytes…"}),Tf.map(a=>d.jsx("option",{value:a.id,children:a.title},a.id))]},s)}):e==="emulate"?d.jsx("div",{className:`flex flex-wrap items-center gap-2 ${r}`,children:d.jsxs("select",{defaultValue:"","aria-label":"Load emulate lab frame",className:"max-w-full rounded-xl border border-bubble-mint/25 bg-black/40 px-3 py-2 font-mono text-xs text-bubble-mint/90",onChange:a=>{const l=a.target.value;if(!l)return;const u=jf.find(c=>c.id===l);u&&t(u.hex),o()},children:[d.jsx("option",{value:"",children:"Lab: emulate / TgInit…"}),jf.map(a=>d.jsx("option",{value:a.id,children:a.title},a.id))]},s)}):d.jsx("div",{className:`space-y-2 ${r}`,children:d.jsxs("select",{defaultValue:"","aria-label":"Load synthetic card blob",className:"w-full max-w-full rounded-xl border border-bubble-mint/25 bg-black/40 px-3 py-2 font-mono text-xs text-bubble-mint/90",onChange:a=>{const l=a.target.value;if(!l)return;const u=ml.find(c=>c.id===l);u&&(t(u.hex),n==null||n(u)),o()},children:[d.jsx("option",{value:"",children:"Lab: synthetic card / NDEF blob…"}),ml.map(a=>d.jsxs("option",{value:a.id,children:[a.title," (",a.byteLength," B)"]},a.id))]},s)})}function v2(){const e=Je(),{lastTag:t}=or(),[n,r]=x.useState("FFFFFFFFFFFF"),[s,i]=x.useState(!1),[o,a]=x.useState(4),[l,u]=x.useState("00000000000000000000000000000000"),[c,f]=x.useState(null),[p,g]=x.useState(4),[v,w]=x.useState("00000000"),[b,h]=x.useState(!1),m=async()=>{const S=n.replace(/\s/g,""),k=l.replace(/\s/g,"");if(S.length!==12||!/^[0-9A-Fa-f]+$/.test(S)){e("Key must be exactly 12 hex digits","err");return}if(k.length!==32||!/^[0-9A-Fa-f]+$/.test(k)){e("Block data must be exactly 32 hex digits (16 bytes)","err");return}if(!Number.isInteger(o)||o<0||o>255){e("Block must be an integer 0–255","err");return}if(confirm("Write will modify tag memory. Continue?")){h(!0);try{await vt("/api/mifare/write-block",{block:o,key:S,keyB:s,data:k}),e("Write OK")}catch(C){e(String(C),"err")}finally{h(!1)}}},y=async()=>{const S=v.replace(/\s/g,"");if(S.length!==8||!/^[0-9A-Fa-f]+$/.test(S)){e("UL data must be exactly 8 hex digits (4 bytes)","err");return}if(confirm("Ultralight page write — can brick OTP/lock bytes if misused. Continue?")){h(!0);try{await vt("/api/ul/write-page",{page:p,data:S}),e("UL page write OK")}catch(k){e(String(k),"err")}finally{h(!1)}}};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Write / clone helpers"}),d.jsx("p",{className:"mt-2 text-sm text-slate-400",children:"Block editor for MIFARE Classic. Read blocks on the Read tab, adjust hex here, then write with a key that unlocks the sector."}),t&&d.jsxs("p",{className:"mt-2 rounded-lg border border-bubble-mint/20 bg-bubble-mint/5 px-3 py-2 font-mono text-xs text-bubble-mint",children:["Field: ",d.jsx("span",{className:"text-white",children:Ig(t.uid)})," ·"," ",t.typeGuess??`hint ${t.typeHint}`]}),d.jsx("p",{className:"mt-2 text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsx(po,{mode:"binary",className:"mt-3",onApplyHex:S=>{const k=S.replace(/\s/g,"");k.length<=32?u(k):(u(k.slice(0,32)),e("First 16 bytes of lab blob loaded into block editor","info"))},onPickBinary:f}),c&&d.jsxs("p",{className:"mt-2 font-mono text-[10px] text-bubble-accent/90",children:["Canonical SHA-256 (",c.byteLength," B): ",c.sha256Hex," — changes after any edit"]})]}),d.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[d.jsxs("label",{className:"text-sm",children:["Key (12 hex)",d.jsx("input",{value:n,onChange:S=>r(S.target.value),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono"})]}),d.jsxs("label",{className:"flex items-end gap-2 text-sm",children:[d.jsx("input",{type:"checkbox",checked:s,onChange:S=>i(S.target.checked)})," Key B"]}),d.jsxs("label",{className:"text-sm",children:["Block",d.jsx("input",{type:"number",value:o,onChange:S=>a(Number(S.target.value)),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2"})]})]}),d.jsxs("label",{className:"block text-sm",children:["16 bytes (32 hex)",d.jsx("textarea",{value:l,onChange:S=>u(S.target.value),rows:4,className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-sm"})]}),d.jsx("button",{type:"button",onClick:m,disabled:b,className:"rounded-2xl bg-gradient-to-r from-bubble-rose to-orange-400 px-6 py-3 font-bold text-white shadow-glow disabled:opacity-50",children:b?"Writing…":"Write block"}),d.jsxs("div",{className:"border-t border-white/10 pt-8",children:[d.jsx("h2",{className:"font-display text-lg font-bold text-bubble-accent",children:"Ultralight / NTAG page write"}),d.jsx("p",{className:"mt-2 text-sm text-slate-400",children:"4 bytes per page (8 hex). Keep tag on the coil. Avoid lock / config pages unless you mean it."}),d.jsxs("div",{className:"mt-4 grid gap-4 md:grid-cols-2",children:[d.jsxs("label",{className:"text-sm",children:["Page",d.jsx("input",{type:"number",value:p,onChange:S=>g(Number(S.target.value)),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2"})]}),d.jsxs("label",{className:"text-sm",children:["Data (8 hex)",d.jsx("input",{value:v,onChange:S=>w(S.target.value),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono"})]})]}),d.jsx("button",{type:"button",onClick:y,disabled:b,className:"mt-4 rounded-2xl border border-bubble-accent/50 bg-bubble-accent/20 px-6 py-3 font-bold text-bubble-accent disabled:opacity-50",children:b?"Writing…":"Write UL page"})]})]})}const Nf="pn532_saved_tags_v1";function x2(){const e=Je(),[t,n]=x.useState([]),[r,s]=x.useState("My tag"),[i,o]=x.useState(""),[a,l]=x.useState(null);x.useEffect(()=>{try{const g=localStorage.getItem(Nf);n(g?JSON.parse(g):[])}catch{n([])}},[]);const u=g=>{localStorage.setItem(Nf,JSON.stringify(g)),n(g)},c=()=>{if(!i.trim()){e("Paste hex first","err");return}const v={id:`${Date.now()}-${Math.random().toString(16).slice(2)}`,name:r,hex:i.replace(/\s/g,""),ts:Date.now()};u([v,...t]),e("Saved")},f=g=>u(t.filter(v=>v.id!==g)),p=()=>{const g=new Set(t.map(b=>b.name)),v=Date.now(),w=y2.filter(b=>!g.has(b.name)).map((b,h)=>({id:`lab-seed-${v}-${h}`,name:b.name,hex:b.hex,ts:v}));if(!w.length){e("Lab catalog already in library","info");return}u([...w,...t]),e(`Seeded ${w.length} lab record(s)`)};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Saved tag library"}),d.jsx("p",{className:"text-sm text-slate-400",children:"Local browser storage — export by copy/paste."}),d.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsx("div",{className:"flex flex-wrap gap-2",children:d.jsx("button",{type:"button",onClick:p,className:"rounded-2xl border border-bubble-mint/30 bg-bubble-mint/10 px-4 py-2 font-mono text-xs font-semibold text-bubble-mint",children:"Seed all lab samples"})}),d.jsx(po,{mode:"binary",onApplyHex:g=>o(g.replace(/\s/g,"")),onPickBinary:l}),a&&d.jsxs("div",{className:"rounded-xl border border-bubble-accent/25 bg-black/30 p-3 font-mono text-[10px] text-bubble-accent/90",children:[d.jsx("div",{className:"text-bubble-mint/70",children:"Expected SHA-256 (canonical blob, pre-edit)"}),d.jsx("div",{className:"break-all",children:a.sha256Hex})]}),d.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx("input",{value:r,onChange:g=>s(g.target.value),placeholder:"Label",className:"rounded-2xl border border-white/10 bg-black/25 px-4 py-2"}),d.jsx("button",{type:"button",onClick:c,className:"rounded-2xl bg-bubble-accent px-4 py-2 font-semibold",children:"Save current hex"})]}),d.jsx("textarea",{value:i,onChange:g=>o(g.target.value),placeholder:"Hex dump",rows:5,className:"w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-xs"}),d.jsx("ul",{className:"space-y-3",children:t.map(g=>d.jsxs("li",{className:"rounded-2xl border border-white/10 bg-black/20 p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[d.jsxs("div",{children:[d.jsx("div",{className:"font-display font-semibold",children:g.name}),d.jsx("div",{className:"text-xs text-slate-500",children:new Date(g.ts).toLocaleString()})]}),d.jsx("button",{type:"button",onClick:()=>f(g.id),className:"text-rose-300",children:"Remove"})]}),d.jsx("pre",{className:"mt-2 max-h-32 overflow-auto text-xs text-bubble-mint/90",children:g.hex}),d.jsx("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(g.hex),e("Copied")},className:"mt-2 text-sm text-slate-300 underline",children:"Copy hex"})]},g.id))})]})}const w2=["FFFFFFFFFFFF","A0A1A2A3A4A5","D3F7D3F7D3F7","000000000000"],Af="pn532_key_dict_v1";function b2(){const e=Je(),[t,n]=x.useState([]),[r,s]=x.useState("");x.useEffect(()=>{const u=localStorage.getItem(Af);n(u?JSON.parse(u):[...w2])},[]);const i=u=>{localStorage.setItem(Af,JSON.stringify(u)),n(u)},o=()=>{const u=[...t];let c=0;for(const f of g2)u.includes(f)||(u.push(f),c++);if(!c){e("Lab key corpus already merged","info");return}i(u),e(`Added ${c} public lab key(s)`)},a=()=>{const u=sessionStorage.getItem("pn532_keylab_import");if(!(u!=null&&u.trim())){e("Key Lab has nothing staged","info");return}const c=u.split(/\r?\n/).map(g=>g.replace(/\s/g,"").toUpperCase()).filter(g=>g.length===12);if(!c.length){e("No valid 12-hex keys in stash","err");return}const f=[...t];let p=0;for(const g of c)f.includes(g)||(f.push(g),p++);i(f),sessionStorage.removeItem("pn532_keylab_import"),e(p?`Merged ${p} key(s) from Key Lab`:"Keys already in list")},l=()=>{const u=r.replace(/\s/g,"").toUpperCase();if(u.length!==12){e("12 hex chars required","err");return}t.includes(u)?e("Already in dictionary"):(i([u,...t]),e("Key added")),s("")};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Key manager"}),d.jsx("p",{className:"text-sm text-slate-400",children:"Dictionary for manual trials (not a cloud rainbow table). Keys stay in your browser."}),d.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:o,className:"btn-neon rounded-xl border border-bubble-mint/40 bg-bubble-mint/10 px-4 py-2 font-mono text-xs font-bold text-bubble-mint",children:"Merge lab corpus"}),d.jsx("button",{type:"button",onClick:a,className:"rounded-xl border border-bubble-accent/45 bg-bubble-accent/10 px-4 py-2 font-mono text-xs font-bold text-bubble-accent",children:"Import Key Lab stash"})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{value:r,onChange:u=>s(u.target.value),placeholder:"New key",className:"flex-1 rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono"}),d.jsx("button",{type:"button",className:"rounded-2xl bg-bubble-accent px-4 py-2 font-semibold",onClick:l,children:"Add"})]}),d.jsx("ul",{className:"space-y-2",children:t.map(u=>d.jsxs("li",{className:"flex items-center justify-between rounded-2xl border border-white/10 bg-black/20 px-4 py-2 font-mono text-sm",children:[u,d.jsx("button",{type:"button",className:"text-rose-300",onClick:()=>i(t.filter(c=>c!==u)),children:"×"})]},u))})]})}function S2(){const e=Je(),[t,n]=x.useState("4A0100"),[r,s]=x.useState([]),[i,o]=x.useState(""),a=c=>s(f=>[new Date().toLocaleTimeString()+" "+c,...f].slice(0,80)),l=async()=>{try{const c=await vt("/api/raw/pn532",{frame:t});a(`TX ${t}`),a(`RX ${c.response||c.error||"?"}`),c.response?e("Frame OK"):c.error&&e(c.error,"err")}catch(c){a(`ERR ${String(c)}`),e(String(c),"err")}},u=async()=>{try{const c=await fo("/api/pn532/general-status");o(JSON.stringify(c.raw??c,null,2)),e("Fetched PN532 status")}catch(c){e(String(c),"err")}};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Advanced / raw PN532"}),d.jsxs("p",{className:"text-sm text-slate-400",children:["Send command bytes (without PN532 frame wrapper). Example: ",d.jsx("code",{children:"4A0100"})," lists one Type A passive target at 106 kbps."]}),d.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsx(po,{mode:"raw",onApplyHex:c=>n(c)}),d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsx("input",{value:t,onChange:c=>n(c.target.value),className:"min-w-[16rem] flex-1 rounded-2xl border border-white/10 bg-black/25 px-4 py-2 font-mono text-sm"}),d.jsx("button",{type:"button",onClick:l,className:"rounded-2xl bg-bubble-accent px-4 py-2 font-semibold",children:"Send"}),d.jsx("button",{type:"button",onClick:u,className:"rounded-2xl border border-white/15 px-4 py-2",children:"General status"})]}),d.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-sm font-semibold text-slate-300",children:"Log"}),d.jsx("pre",{className:"mt-2 max-h-80 overflow-auto rounded-2xl border border-white/10 bg-black/30 p-3 text-xs",children:r.join(` +`)})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"text-sm font-semibold text-slate-300",children:"PN532 status snapshot"}),d.jsx("pre",{className:"mt-2 max-h-80 overflow-auto rounded-2xl border border-white/10 bg-black/30 p-3 text-xs",children:i||"—"})]})]})]})}function k2(){const e=Je(),[t,n]=x.useState(""),[r,s]=x.useState(!1);x.useEffect(()=>{n(localStorage.getItem("apiBase")||""),s(document.documentElement.classList.contains("light"))},[]);const i=()=>{localStorage.setItem("apiBase",t),e("Saved API base — reload for WS")},o=()=>{const a=!r;s(a),document.documentElement.classList.toggle("light",a),document.documentElement.classList.toggle("dark",!a),localStorage.setItem("theme",a?"light":"dark"),e(a?"Light":"Dark")};return d.jsxs("div",{className:"glass max-w-xl space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Settings"}),d.jsxs("label",{className:"block text-sm",children:["API base (empty = same host)",d.jsx("input",{value:t,onChange:a=>n(a.target.value),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2",placeholder:"http://192.168.4.1"})]}),d.jsx("button",{type:"button",onClick:i,className:"rounded-2xl bg-bubble-accent px-4 py-2 font-semibold",children:"Save"}),d.jsxs("div",{className:"flex items-center justify-between rounded-2xl border border-white/10 bg-black/20 px-4 py-3",children:[d.jsx("span",{className:"text-sm",children:"Theme"}),d.jsx("button",{type:"button",onClick:o,className:"rounded-full border border-white/15 px-4 py-1 text-sm",children:r?"Switch to dark":"Switch to light"})]}),d.jsxs("p",{className:"text-xs text-slate-500",children:["Firmware opens a ",d.jsx("strong",{children:"password-free"})," SoftAP named ",d.jsx("strong",{children:"PN532-Toolkit"})," (lab default). mDNS: ",d.jsx("code",{children:"pn532tool.local"})]})]})}function C2(){const e=Je(),{log:t}=or(),[n,r]=x.useState(null),s=x.useCallback(()=>{fo("/api/status").then(r).catch(()=>e("Status unreachable","err"))},[e]);x.useEffect(()=>{s();const f=setInterval(s,2e3);return()=>clearInterval(f)},[s]),x.useEffect(()=>{s()},[t.length,s]);const i=(()=>{const f=[...t].reverse().find(p=>p.channel==="capture");return f?typeof f.payload=="object"?JSON.stringify(f.payload):String(f.payload):""})(),o=n==null?void 0:n.session,a=o?Math.min(100,o.usedBytes/Math.max(1,o.maxBytes)*100):0,l=async f=>{try{await vt("/api/session/deep",{enable:f}),e(f?"Passive read-all on (live scan on by default at boot)":"Passive read-all off"),s()}catch(p){e(String(p),"err")}},u=async()=>{try{await vt("/api/session/clear",{}),e("Buffer cleared — scanning can resume"),s()}catch(f){e(String(f),"err")}},c=async()=>{try{const f=await fetch(xs("/api/session/export"));if(!f.ok)throw new Error(await f.text());const p=await f.blob(),g=URL.createObjectURL(p),v=document.createElement("a");v.href=g,v.download=`pn532-deep-capture-${Date.now()}.ndjson`,v.click(),URL.revokeObjectURL(g),e("Download started — check your Downloads folder")}catch(f){e(String(f),"err")}};return d.jsxs("div",{className:"space-y-6",children:[d.jsxs(O.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"glass relative overflow-hidden p-8",children:[d.jsx("div",{className:"pointer-events-none absolute -left-20 top-0 h-48 w-48 rounded-full bg-bubble-mint/20 blur-3xl"}),d.jsx("h1",{className:"font-display text-3xl font-bold md:text-4xl",children:"Passive read-all mode"}),d.jsx("p",{className:"mt-1 text-sm font-medium text-bubble-mint/90",children:"Same feature as “deep capture” — fully controlled from this screen."}),d.jsxs("p",{className:"mt-3 max-w-2xl text-slate-300",children:["Turn it on below and keep ",d.jsx("strong",{children:"live scan"})," running (on by default at boot). Each"," ",d.jsx("strong",{children:"new tag"})," in the field is read ",d.jsx("strong",{children:"passively"}),": no per-block clicks — the firmware pulls ",d.jsx("strong",{children:"all data it can"})," (PN532 status + Classic sector/block dump with default keys, or Ultralight/NTAG page sweep). Results queue in ",d.jsx("strong",{children:"device RAM"}),"; when full, polling pauses until you ",d.jsx("strong",{children:"download"})," and ",d.jsx("strong",{children:"clear"}),"."]})]}),d.jsxs("div",{className:"glass p-6",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"font-display text-lg font-semibold",children:"Read-all session buffer"}),d.jsxs("p",{className:"text-sm text-slate-400",children:[(o==null?void 0:o.lines)??0," full dumps · ",(o==null?void 0:o.usedBytes)??0," / ",(o==null?void 0:o.maxBytes)??"—"," bytes RAM"]})]}),d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:()=>l(!((o==null?void 0:o.deepCapture)??!1)),className:`rounded-2xl px-4 py-2 font-semibold ${o!=null&&o.deepCapture?"bg-bubble-mint/20 text-bubble-mint ring-2 ring-bubble-mint/40":"border border-white/15 bg-white/5"}`,children:o!=null&&o.deepCapture?"Passive read-all ON":"Enable passive read-all"}),d.jsx("button",{type:"button",onClick:c,className:"rounded-2xl bg-gradient-to-r from-bubble-accent to-indigo-400 px-4 py-2 font-bold text-white shadow-glow",children:"Download NDJSON"}),d.jsx("button",{type:"button",onClick:u,className:"rounded-2xl border border-white/20 px-4 py-2",children:"Clear buffer"})]})]}),d.jsx("div",{className:"mt-6 h-4 overflow-hidden rounded-full bg-black/40",children:d.jsx(O.div,{className:"h-full rounded-full bg-gradient-to-r from-bubble-accent to-bubble-mint",initial:!1,animate:{width:`${a}%`},transition:{type:"spring",stiffness:120,damping:20}})}),(o==null?void 0:o.full)&&d.jsxs("div",{className:"mt-6 rounded-2xl border-2 border-bubble-rose/50 bg-bubble-rose/10 p-4 text-center",children:[d.jsx("p",{className:"font-display text-lg font-bold text-bubble-rose",children:"Buffer full — reader paused"}),d.jsxs("p",{className:"mt-1 text-sm text-slate-300",children:["Tap ",d.jsx("strong",{children:"Download NDJSON"})," to pull every card profile to your phone, then"," ",d.jsx("strong",{children:"Clear buffer"})," to resume field scans."]})]}),(o==null?void 0:o.deepCapture)&&n&&!n.scanning&&d.jsxs("p",{className:"mt-4 rounded-2xl border border-amber-500/30 bg-amber-500/10 p-3 text-sm text-amber-100",children:["Firmware normally has ",d.jsx("strong",{children:"Live scan"})," on at boot. If you turned it off, enable it on the Dashboard."]}),i&&d.jsxs("pre",{className:"mt-4 max-h-40 overflow-auto rounded-2xl border border-white/10 bg-black/30 p-3 text-xs text-slate-300",children:["Last capture event: ",i]})]})]})}function P2(){const e=Je(),[t,n]=x.useState("classic1k"),[r,s]=x.useState(!0),[i,o]=x.useState(`FFFFFFFFFFFF A0A1A2A3A4A5 -D3F7D3F7D3F7`),[a,l]=x.useState(!1),[u,c]=x.useState(""),f=async()=>{l(!0),c("");try{const h=i.split(/\r?\n/).map(S=>S.replace(/\s/g,"").toUpperCase()).filter(S=>S.length===12),g={readerType:t,variations:r,keysHex:h},v=await fetch(vs("/api/mifare/dictionary-attack"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}),w=await v.text();if(!v.ok)throw new Error(w);try{const S=JSON.parse(w);c(JSON.stringify(S,null,2))}catch{c(w)}e("Dictionary pass finished")}catch(h){e(String(h),"err")}finally{l(!1)}};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Dictionary attack"}),d.jsxs("p",{className:"text-sm text-slate-400",children:["Select card family, optionally enable ",d.jsx("strong",{children:"bounded variations"})," (XOR / low-nibble tweaks per key). Firmware tries a ",d.jsx("strong",{children:"built-in community list"})," (Proxmark3 / MCT-style defaults) plus your lines below. This is ",d.jsx("strong",{children:"not"})," a full 2⁴⁸ exhaustive search — only keys you and the community already know. Hold a ",d.jsx("strong",{children:"MIFARE Classic"})," on the coil."," ",d.jsx("a",{className:"text-bubble-mint underline",href:"https://github.com/RfidResearchGroup/proxmark3/blob/master/client/dictionaries/mfc_default_keys.dic",target:"_blank",rel:"noreferrer",children:"More keys online"}),"."]}),d.jsxs("label",{className:"block text-sm",children:["Reader / map",d.jsxs("select",{value:t,onChange:h=>n(h.target.value),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2",children:[d.jsx("option",{value:"classic1k",children:"MIFARE Classic 1K (sectors 0–15)"}),d.jsx("option",{value:"classic4k",children:"MIFARE Classic 4K (sectors 0–39, proper 4/16-block geometry)"})]})]}),d.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[d.jsx("input",{type:"checkbox",checked:r,onChange:h=>s(h.target.checked)}),"Variations (extra tries per key — slower, wider net)"]}),d.jsxs("label",{className:"block text-sm",children:["Extra keys (one 12-hex key per line, merged after built-in list)",d.jsx("textarea",{value:i,onChange:h=>o(h.target.value),rows:6,className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-xs"})]}),d.jsx("button",{type:"button",disabled:a,onClick:f,className:"rounded-2xl bg-gradient-to-r from-bubble-rose to-orange-500 px-6 py-3 font-bold text-white disabled:opacity-50",children:a?"Running…":"Run dictionary attack"}),u&&d.jsx("pre",{className:"max-h-96 overflow-auto rounded-2xl border border-white/10 bg-black/40 p-4 text-xs text-bubble-mint",children:u})]})}function T2(){const e=Je(),[t,n]=x.useState("8C"),[r,s]=x.useState(""),[i,o]=x.useState(!1),a=async()=>{o(!0),s("");try{const l=await fetch(vs("/api/nfc/emulate-raw"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({hex:t.replace(/\s/g,"")})}),u=await l.text();if(!l.ok)throw new Error(u);try{s(JSON.stringify(JSON.parse(u),null,2))}catch{s(u)}e("PN532 emulation command sent")}catch(l){e(String(l),"err")}finally{o(!1)}};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Card emulation (PN532 target mode)"}),d.jsxs("p",{className:"text-sm text-slate-400",children:["Sends ",d.jsx("code",{className:"text-bubble-mint",children:"TgInitAsTarget"})," (0x8C) and following bytes as one PN532 payload. Real card emulation depends on UID length, timing, and reader behavior — this is an"," ",d.jsx("strong",{children:"expert / experimental"})," path. Build the byte sequence from NXP UM0701 or community examples. Wrong frames can leave the RF stack busy; power-cycle if the field acts stuck."]}),d.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsx(fo,{mode:"emulate",onApplyHex:l=>n(l)}),d.jsxs("label",{className:"block text-sm",children:["Command + parameters (hex, no spaces required)",d.jsx("textarea",{value:t,onChange:l=>n(l.target.value),rows:4,className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-xs"})]}),d.jsx("button",{type:"button",disabled:i,onClick:a,className:"rounded-2xl bg-bubble-accent px-6 py-2 font-semibold text-white disabled:opacity-50",children:i?"Sending…":"Send emulate frame"}),r&&d.jsx("pre",{className:"max-h-80 overflow-auto rounded-2xl border border-white/10 bg-black/40 p-4 text-xs text-slate-200",children:r})]})}function Rf({title:e,badge:t,children:n,className:r=""}){return d.jsxs(O.div,{initial:{opacity:0,y:12},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-40px"},transition:{duration:.4,ease:[.22,1,.36,1]},className:`glass panel-edge relative overflow-hidden p-6 ${r}`.trim(),children:[d.jsx("div",{className:"pointer-events-none absolute -right-20 -top-20 h-40 w-40 rounded-full bg-bubble-accent/10 blur-3xl"}),d.jsx("div",{className:"pointer-events-none absolute -bottom-16 -left-16 h-36 w-36 rounded-full bg-bubble-rose/10 blur-3xl"}),d.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-br from-bubble-accent/[0.06] via-transparent to-bubble-mint/[0.07]"}),d.jsxs("div",{className:"relative",children:[d.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[d.jsx("h2",{className:"font-display text-lg font-normal tracking-wide text-bubble-mint text-glow-matrix",children:e}),t?d.jsx(O.span,{animate:{boxShadow:["0 0 12px rgba(0,229,255,0.3)","0 0 22px rgba(0,255,157,0.45)","0 0 12px rgba(0,229,255,0.3)"]},transition:{duration:2.2,repeat:1/0},className:"rounded-full border border-bubble-accent/50 bg-bubble-accent/15 px-2.5 py-0.5 font-mono text-[10px] uppercase tracking-widest text-bubble-accent",children:t}):null]}),n]})]})}function ea(e){const t=e.replace(/\s/g,"");if(t.length!==12)return null;const n=[];for(let r=0;r<12;r+=2){const s=parseInt(t.slice(r,r+2),16);if(Number.isNaN(s))return null;n.push(s)}return n}function kr(e){return e.map(t=>t.toString(16).toUpperCase().padStart(2,"0")).join("")}function E2(e){const t=e.length,n=new Set,r=[];for(let s=0;s<1<{const S=ea(t),m=ea(r),p=ea(i);return!S||!m?null:a&&p?[S,m,p]:[S,m]},[t,r,i,a]),h=x.useMemo(()=>f?E2(f):[],[f]),g=x.useMemo(()=>j2(u),[u]),v=()=>{const S=h.map(m=>kr(m)).join(` -`);navigator.clipboard.writeText(S),e("Copied XOR span keys")},w=()=>{const S=h.map(m=>kr(m)).join(` -`);sessionStorage.setItem("pn532_keylab_import",S),e("Stored for Keys page — open Keys and tap “Import Key Lab”")};return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"glass relative overflow-hidden p-8",children:[d.jsx("div",{className:"pointer-events-none absolute -right-24 top-0 h-72 w-72 rounded-full bg-bubble-accent/15 blur-3xl"}),d.jsx("h1",{className:"font-display text-3xl font-bold text-glow-matrix md:text-4xl",children:"Key Lab"}),d.jsxs("p",{className:"mt-3 max-w-3xl text-sm leading-relaxed text-slate-400",children:["XOR your base keys together in every combination → more candidates to paste into ",d.jsx("strong",{children:"Brute"})," or"," ",d.jsx("strong",{children:"Keys"}),". Entropy readout is just for fun on random hex blobs."]})]}),d.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[d.jsxs(Rf,{title:"XOR span generator",badge:"mix",children:[d.jsx("p",{className:"mb-4 text-xs leading-relaxed text-slate-500",children:"All XOR combinations of your base keys (2 bases → up to 4 keys; 3 bases → up to 8). Each result is a valid 6-byte Classic key candidate."}),d.jsxs("label",{className:"block text-xs text-slate-400",children:["Base A",d.jsx("input",{value:t,onChange:S=>n(S.target.value.toUpperCase()),className:"mt-1 w-full rounded-xl border border-white/10 bg-black/30 px-3 py-2 font-mono text-sm"})]}),d.jsxs("label",{className:"mt-3 block text-xs text-slate-400",children:["Base B",d.jsx("input",{value:r,onChange:S=>s(S.target.value.toUpperCase()),className:"mt-1 w-full rounded-xl border border-white/10 bg-black/30 px-3 py-2 font-mono text-sm"})]}),d.jsxs("label",{className:"mt-3 flex items-center gap-2 text-xs text-slate-400",children:[d.jsx("input",{type:"checkbox",checked:a,onChange:S=>l(S.target.checked)}),"Use third base"]}),a?d.jsxs("label",{className:"mt-2 block text-xs text-slate-400",children:["Base C",d.jsx("input",{value:i,onChange:S=>o(S.target.value.toUpperCase()),className:"mt-1 w-full rounded-xl border border-white/10 bg-black/30 px-3 py-2 font-mono text-sm"})]}):null,f?d.jsxs(d.Fragment,{children:[d.jsx("ul",{className:"mt-4 max-h-48 space-y-1 overflow-auto rounded-xl border border-bubble-mint/15 bg-black/35 p-3 font-mono text-xs text-bubble-mint",children:h.map(S=>d.jsx("li",{children:kr(S)},kr(S)))}),d.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:v,className:"rounded-xl bg-bubble-accent px-4 py-2 text-sm font-semibold text-bubble-950",children:"Copy all"}),d.jsx("button",{type:"button",onClick:w,className:"rounded-xl border border-bubble-mint/40 px-4 py-2 text-sm text-bubble-mint",children:"Stage for Keys"})]})]}):d.jsx("p",{className:"mt-4 text-sm text-bubble-rose",children:"Enter valid 12-hex keys."})]}),d.jsxs(Rf,{title:"Blob entropy",badge:"analysis",children:[d.jsx("p",{className:"mb-4 text-xs text-slate-500",children:"Shannon entropy per byte of your hex blob (0–8). Random uniform bytes → ~8; sparse UID-like → lower."}),d.jsx("textarea",{value:u,onChange:S=>c(S.target.value),rows:5,className:"w-full rounded-xl border border-white/10 bg-black/30 p-3 font-mono text-xs"}),d.jsx("div",{className:"mt-4 rounded-xl border border-bubble-accent/25 bg-bubble-accent/5 p-4 font-mono text-sm text-bubble-accent",children:g==null?"Invalid hex (even length, 0-9A-F)":`${g.toFixed(3)} bits / byte`})]})]})]})}const A2=[["/","Dash"],["/capture","Read-all"],["/read","Read"],["/write","Write"],["/brute","Brute"],["/emulate","Emu"],["/keylab","KeyLab"],["/library","Lib"],["/keys","Keys"],["/raw","Raw"],["/settings","Set"]];function R2(){return d.jsx(i2,{children:d.jsx(qb,{children:d.jsxs("div",{className:"hack-scanlines hack-grid relative min-h-screen pb-20",children:[d.jsx(t2,{}),d.jsx(s2,{}),d.jsx(e2,{}),d.jsxs("header",{className:"relative z-40 border-b border-bubble-accent/20 bg-bubble-950/80 backdrop-blur-xl",children:[d.jsx("div",{className:"absolute inset-x-0 bottom-0 h-px bg-gradient-to-r from-transparent via-bubble-mint/60 to-transparent"}),d.jsx("div",{className:"absolute inset-x-0 top-0 h-px bg-gradient-to-r from-bubble-rose/30 via-bubble-accent/40 to-bubble-mint/30 opacity-80"}),d.jsxs("div",{className:"relative mx-auto flex max-w-6xl flex-wrap items-center justify-between gap-3 px-4 py-4",children:[d.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-4",children:[d.jsxs(O.div,{className:"font-display text-lg font-normal tracking-[0.12em] sm:text-xl md:text-2xl",initial:{opacity:0,x:-12},animate:{opacity:1,x:0},transition:{type:"spring",stiffness:120,damping:18},children:[d.jsx(O.span,{className:"bg-gradient-to-r from-bubble-mint via-bubble-accent to-bubble-rose bg-clip-text text-transparent text-glow-matrix",animate:{backgroundPosition:["0% 50%","100% 50%","0% 50%"]},transition:{duration:8,repeat:1/0,ease:"linear"},style:{WebkitBackgroundClip:"text",backgroundClip:"text",backgroundImage:"linear-gradient(90deg, #00ff9d, #00e5ff, #ff2a6d, #d4ff00, #00ff9d, #00ff9d)",backgroundSize:"250% 100%"},children:"PN532"}),d.jsx("span",{className:"ml-2 text-[9px] font-mono font-normal tracking-[0.35em] text-bubble-accent/60 sm:text-[10px]",children:"MAXIMAL"})]}),d.jsxs("span",{className:"hidden font-mono text-[9px] text-bubble-mint/40 md:inline lg:text-[10px]",children:[d.jsx("span",{className:"text-bubble-accent/90",children:"●"})," RF_STACK"," ",d.jsx("span",{className:"text-bubble-rose/80",children:"LIVE"}),d.jsx("span",{className:"mx-1.5 text-bubble-mint/25",children:"│"}),d.jsx("span",{className:"text-bubble-mint/50",children:"ws://stream"})]})]}),d.jsx("nav",{className:"flex max-w-full flex-wrap justify-end gap-1 text-[10px] font-mono sm:gap-1.5 sm:text-[11px]",children:A2.map(([e,t])=>d.jsx(gx,{to:e,children:({isActive:n})=>d.jsxs(O.span,{className:`inline-block rounded-md border px-1.5 py-1 sm:px-2 sm:py-1.5 ${n?"nav-hack-active":"border-transparent text-slate-500 hover:border-bubble-accent/35 hover:text-bubble-accent hover:shadow-[0_0_18px_rgba(0,229,255,0.25)]"}`,whileHover:{scale:1.06,y:-1},whileTap:{scale:.97},transition:{type:"spring",stiffness:400,damping:22},children:[d.jsx("span",{className:"text-bubble-mint/35",children:"⟨"}),t,d.jsx("span",{className:"text-bubble-mint/35",children:"⟩"})]})},e))})]})]}),d.jsx("main",{className:"relative z-10 mx-auto max-w-6xl px-4 py-8",children:d.jsx(O.div,{initial:{opacity:0,y:14},animate:{opacity:1,y:0},transition:{duration:.45,ease:[.22,1,.36,1]},children:d.jsxs(ix,{children:[d.jsx(_e,{path:"/",element:d.jsx(d2,{})}),d.jsx(_e,{path:"/capture",element:d.jsx(C2,{})}),d.jsx(_e,{path:"/read",element:d.jsx(f2,{})}),d.jsx(_e,{path:"/write",element:d.jsx(v2,{})}),d.jsx(_e,{path:"/brute",element:d.jsx(P2,{})}),d.jsx(_e,{path:"/emulate",element:d.jsx(T2,{})}),d.jsx(_e,{path:"/keylab",element:d.jsx(N2,{})}),d.jsx(_e,{path:"/library",element:d.jsx(x2,{})}),d.jsx(_e,{path:"/keys",element:d.jsx(S2,{})}),d.jsx(_e,{path:"/raw",element:d.jsx(b2,{})}),d.jsx(_e,{path:"/settings",element:d.jsx(k2,{})})]})})})]})})})}const L2=localStorage.getItem("theme");L2==="light"&&(document.documentElement.classList.add("light"),document.documentElement.classList.remove("dark"));const Lf=document.getElementById("root");Lf&&ta.createRoot(Lf).render(d.jsx($f.StrictMode,{children:d.jsx(hx,{children:d.jsx(R2,{})})})); +D3F7D3F7D3F7`),[a,l]=x.useState(!1),[u,c]=x.useState(""),f=async()=>{l(!0),c("");try{const p=i.split(/\r?\n/).map(h=>h.replace(/\s/g,"").toUpperCase()).filter(h=>h.length===12&&/^[0-9A-F]+$/.test(h)),g=i.split(/\r?\n/).map(h=>h.replace(/\s/g,"")).filter(h=>h.length>0&&(h.length!==12||!/^[0-9A-Fa-f]+$/.test(h))).length;g>0&&e(`${g} line(s) not valid 12-hex keys — skipped, firmware built-ins still run`);const v={readerType:t,variations:r,keysHex:p},w=await fetch(xs("/api/mifare/dictionary-attack"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(v)}),b=await w.text();if(!w.ok)throw new Error(b);try{const h=JSON.parse(b);c(JSON.stringify(h,null,2))}catch{c(b)}e("Dictionary pass finished")}catch(p){e(String(p),"err")}finally{l(!1)}};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Dictionary attack"}),d.jsxs("p",{className:"text-sm text-slate-400",children:["Select card family, optionally enable ",d.jsx("strong",{children:"bounded variations"})," (XOR / low-nibble tweaks per key). Firmware tries a ",d.jsx("strong",{children:"built-in community list"})," (Proxmark3 / MCT-style defaults) plus your lines below. This is ",d.jsx("strong",{children:"not"})," a full 2⁴⁸ exhaustive search — only keys you and the community already know. Hold a ",d.jsx("strong",{children:"MIFARE Classic"})," on the coil."," ",d.jsx("a",{className:"text-bubble-mint underline",href:"https://github.com/RfidResearchGroup/proxmark3/blob/master/client/dictionaries/mfc_default_keys.dic",target:"_blank",rel:"noreferrer",children:"More keys online"}),"."]}),d.jsxs("label",{className:"block text-sm",children:["Reader / map",d.jsxs("select",{value:t,onChange:p=>n(p.target.value),className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 px-4 py-2",children:[d.jsx("option",{value:"classic1k",children:"MIFARE Classic 1K (sectors 0–15)"}),d.jsx("option",{value:"classic4k",children:"MIFARE Classic 4K (sectors 0–39, proper 4/16-block geometry)"})]})]}),d.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[d.jsx("input",{type:"checkbox",checked:r,onChange:p=>s(p.target.checked)}),"Variations (extra tries per key — slower, wider net)"]}),d.jsxs("label",{className:"block text-sm",children:["Extra keys (one 12-hex key per line, merged after built-in list)",d.jsx("textarea",{value:i,onChange:p=>o(p.target.value),rows:6,className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-xs"})]}),d.jsx("button",{type:"button",disabled:a,onClick:f,className:"rounded-2xl bg-gradient-to-r from-bubble-rose to-orange-500 px-6 py-3 font-bold text-white disabled:opacity-50",children:a?"Running…":"Run dictionary attack"}),u&&d.jsx("pre",{className:"max-h-96 overflow-auto rounded-2xl border border-white/10 bg-black/40 p-4 text-xs text-bubble-mint",children:u})]})}function E2(){const e=Je(),[t,n]=x.useState("8C"),[r,s]=x.useState(""),[i,o]=x.useState(!1),a=async()=>{const l=t.replace(/\s/g,"");if(!l){e("Hex payload is empty","err");return}if(l.length%2!==0){e("Hex must have an even number of characters","err");return}if(!/^[0-9A-Fa-f]+$/.test(l)){e("Hex must contain only 0-9 A-F characters","err");return}o(!0),s("");try{const u=await fetch(xs("/api/nfc/emulate-raw"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({hex:l})}),c=await u.text();if(!u.ok)throw new Error(c);try{s(JSON.stringify(JSON.parse(c),null,2))}catch{s(c)}e("PN532 emulation command sent")}catch(u){e(String(u),"err")}finally{o(!1)}};return d.jsxs("div",{className:"glass space-y-6 p-6",children:[d.jsx("h1",{className:"font-display text-2xl font-bold",children:"Card emulation (PN532 target mode)"}),d.jsxs("p",{className:"text-sm text-slate-400",children:["Sends ",d.jsx("code",{className:"text-bubble-mint",children:"TgInitAsTarget"})," (0x8C) and following bytes as one PN532 payload. Real card emulation depends on UID length, timing, and reader behavior — this is an"," ",d.jsx("strong",{children:"expert / experimental"})," path. Build the byte sequence from NXP UM0701 or community examples. Wrong frames can leave the RF stack busy; power-cycle if the field acts stuck."]}),d.jsx("p",{className:"text-[11px] leading-relaxed text-slate-500",children:ws}),d.jsx(po,{mode:"emulate",onApplyHex:l=>n(l)}),d.jsxs("label",{className:"block text-sm",children:["Command + parameters (hex, no spaces required)",d.jsx("textarea",{value:t,onChange:l=>n(l.target.value),rows:4,className:"mt-1 w-full rounded-2xl border border-white/10 bg-black/25 p-3 font-mono text-xs"})]}),d.jsx("button",{type:"button",disabled:i,onClick:a,className:"rounded-2xl bg-bubble-accent px-6 py-2 font-semibold text-white disabled:opacity-50",children:i?"Sending…":"Send emulate frame"}),r&&d.jsx("pre",{className:"max-h-80 overflow-auto rounded-2xl border border-white/10 bg-black/40 p-4 text-xs text-slate-200",children:r})]})}function Rf({title:e,badge:t,children:n,className:r=""}){return d.jsxs(O.div,{initial:{opacity:0,y:12},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-40px"},transition:{duration:.4,ease:[.22,1,.36,1]},className:`glass panel-edge relative overflow-hidden p-6 ${r}`.trim(),children:[d.jsx("div",{className:"pointer-events-none absolute -right-20 -top-20 h-40 w-40 rounded-full bg-bubble-accent/10 blur-3xl"}),d.jsx("div",{className:"pointer-events-none absolute -bottom-16 -left-16 h-36 w-36 rounded-full bg-bubble-rose/10 blur-3xl"}),d.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-br from-bubble-accent/[0.06] via-transparent to-bubble-mint/[0.07]"}),d.jsxs("div",{className:"relative",children:[d.jsxs("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[d.jsx("h2",{className:"font-display text-lg font-normal tracking-wide text-bubble-mint text-glow-matrix",children:e}),t?d.jsx(O.span,{animate:{boxShadow:["0 0 12px rgba(0,229,255,0.3)","0 0 22px rgba(0,255,157,0.45)","0 0 12px rgba(0,229,255,0.3)"]},transition:{duration:2.2,repeat:1/0},className:"rounded-full border border-bubble-accent/50 bg-bubble-accent/15 px-2.5 py-0.5 font-mono text-[10px] uppercase tracking-widest text-bubble-accent",children:t}):null]}),n]})]})}function ta(e){const t=e.replace(/\s/g,"");if(t.length!==12)return null;const n=[];for(let r=0;r<12;r+=2){const s=parseInt(t.slice(r,r+2),16);if(Number.isNaN(s))return null;n.push(s)}return n}function Cr(e){return e.map(t=>t.toString(16).toUpperCase().padStart(2,"0")).join("")}function T2(e){const t=e.length,n=new Set,r=[];for(let s=0;s<1<{const b=ta(t),h=ta(r),m=ta(i);return!b||!h?null:a&&m?[b,h,m]:[b,h]},[t,r,i,a]),p=x.useMemo(()=>f?T2(f):[],[f]),g=x.useMemo(()=>j2(u),[u]),v=()=>{const b=p.map(h=>Cr(h)).join(` +`);navigator.clipboard.writeText(b),e("Copied XOR span keys")},w=()=>{const b=p.map(h=>Cr(h)).join(` +`);sessionStorage.setItem("pn532_keylab_import",b),e("Stored for Keys page — open Keys and tap “Import Key Lab”")};return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"glass relative overflow-hidden p-8",children:[d.jsx("div",{className:"pointer-events-none absolute -right-24 top-0 h-72 w-72 rounded-full bg-bubble-accent/15 blur-3xl"}),d.jsx("h1",{className:"font-display text-3xl font-bold text-glow-matrix md:text-4xl",children:"Key Lab"}),d.jsxs("p",{className:"mt-3 max-w-3xl text-sm leading-relaxed text-slate-400",children:["XOR your base keys together in every combination → more candidates to paste into ",d.jsx("strong",{children:"Brute"})," or"," ",d.jsx("strong",{children:"Keys"}),". Entropy readout is just for fun on random hex blobs."]})]}),d.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[d.jsxs(Rf,{title:"XOR span generator",badge:"mix",children:[d.jsx("p",{className:"mb-4 text-xs leading-relaxed text-slate-500",children:"All XOR combinations of your base keys (2 bases → up to 4 keys; 3 bases → up to 8). Each result is a valid 6-byte Classic key candidate."}),d.jsxs("label",{className:"block text-xs text-slate-400",children:["Base A",d.jsx("input",{value:t,onChange:b=>n(b.target.value.toUpperCase()),className:"mt-1 w-full rounded-xl border border-white/10 bg-black/30 px-3 py-2 font-mono text-sm"})]}),d.jsxs("label",{className:"mt-3 block text-xs text-slate-400",children:["Base B",d.jsx("input",{value:r,onChange:b=>s(b.target.value.toUpperCase()),className:"mt-1 w-full rounded-xl border border-white/10 bg-black/30 px-3 py-2 font-mono text-sm"})]}),d.jsxs("label",{className:"mt-3 flex items-center gap-2 text-xs text-slate-400",children:[d.jsx("input",{type:"checkbox",checked:a,onChange:b=>l(b.target.checked)}),"Use third base"]}),a?d.jsxs("label",{className:"mt-2 block text-xs text-slate-400",children:["Base C",d.jsx("input",{value:i,onChange:b=>o(b.target.value.toUpperCase()),className:"mt-1 w-full rounded-xl border border-white/10 bg-black/30 px-3 py-2 font-mono text-sm"})]}):null,f?d.jsxs(d.Fragment,{children:[d.jsx("ul",{className:"mt-4 max-h-48 space-y-1 overflow-auto rounded-xl border border-bubble-mint/15 bg-black/35 p-3 font-mono text-xs text-bubble-mint",children:p.map(b=>d.jsx("li",{children:Cr(b)},Cr(b)))}),d.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:v,className:"rounded-xl bg-bubble-accent px-4 py-2 text-sm font-semibold text-bubble-950",children:"Copy all"}),d.jsx("button",{type:"button",onClick:w,className:"rounded-xl border border-bubble-mint/40 px-4 py-2 text-sm text-bubble-mint",children:"Stage for Keys"})]})]}):d.jsx("p",{className:"mt-4 text-sm text-bubble-rose",children:"Enter valid 12-hex keys."})]}),d.jsxs(Rf,{title:"Blob entropy",badge:"analysis",children:[d.jsx("p",{className:"mb-4 text-xs text-slate-500",children:"Shannon entropy per byte of your hex blob (0–8). Random uniform bytes → ~8; sparse UID-like → lower."}),d.jsx("textarea",{value:u,onChange:b=>c(b.target.value),rows:5,className:"w-full rounded-xl border border-white/10 bg-black/30 p-3 font-mono text-xs"}),d.jsx("div",{className:"mt-4 rounded-xl border border-bubble-accent/25 bg-bubble-accent/5 p-4 font-mono text-sm text-bubble-accent",children:g==null?"Invalid hex (even length, 0-9A-F)":`${g.toFixed(3)} bits / byte`})]})]})]})}function A2(){const{wsOk:e,pn532Connected:t}=or();return d.jsxs("span",{className:"hidden font-mono text-[9px] text-bubble-mint/40 md:inline lg:text-[10px]",children:[d.jsx("span",{className:e?"text-bubble-accent/90":"animate-pulse text-bubble-rose/60",children:"●"})," ","RF_STACK"," ",d.jsx("span",{className:e?t?"font-bold text-bubble-mint":"animate-pulse text-amber-400":"animate-pulse text-bubble-rose/80",children:e?t?"LIVE":"NO RF":"WAIT"}),d.jsx("span",{className:"mx-1.5 text-bubble-mint/25",children:"│"}),d.jsx("span",{className:"text-bubble-mint/50",children:"ws://stream"})]})}const R2=[["/","Dash"],["/capture","Read-all"],["/read","Read"],["/write","Write"],["/brute","Brute"],["/emulate","Emu"],["/keylab","KeyLab"],["/library","Lib"],["/keys","Keys"],["/raw","Raw"],["/settings","Set"]];function L2(){return d.jsx(i2,{children:d.jsx(qS,{children:d.jsxs("div",{className:"hack-scanlines hack-grid relative min-h-screen pb-20",children:[d.jsx(t2,{}),d.jsx(s2,{}),d.jsx(e2,{}),d.jsxs("header",{className:"relative z-40 border-b border-bubble-accent/20 bg-bubble-950/80 backdrop-blur-xl",children:[d.jsx("div",{className:"absolute inset-x-0 bottom-0 h-px bg-gradient-to-r from-transparent via-bubble-mint/60 to-transparent"}),d.jsx("div",{className:"absolute inset-x-0 top-0 h-px bg-gradient-to-r from-bubble-rose/30 via-bubble-accent/40 to-bubble-mint/30 opacity-80"}),d.jsxs("div",{className:"relative mx-auto flex max-w-6xl flex-wrap items-center justify-between gap-3 px-4 py-4",children:[d.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row sm:items-center sm:gap-4",children:[d.jsxs(O.div,{className:"font-display text-lg font-normal tracking-[0.12em] sm:text-xl md:text-2xl",initial:{opacity:0,x:-12},animate:{opacity:1,x:0},transition:{type:"spring",stiffness:120,damping:18},children:[d.jsx(O.span,{className:"bg-gradient-to-r from-bubble-mint via-bubble-accent to-bubble-rose bg-clip-text text-transparent text-glow-matrix",animate:{backgroundPosition:["0% 50%","100% 50%","0% 50%"]},transition:{duration:8,repeat:1/0,ease:"linear"},style:{WebkitBackgroundClip:"text",backgroundClip:"text",backgroundImage:"linear-gradient(90deg, #00ff9d, #00e5ff, #ff2a6d, #d4ff00, #00ff9d, #00ff9d)",backgroundSize:"250% 100%"},children:"PN532"}),d.jsx("span",{className:"ml-2 text-[9px] font-mono font-normal tracking-[0.35em] text-bubble-accent/60 sm:text-[10px]",children:"MAXIMAL"})]}),d.jsx(A2,{})]}),d.jsx("nav",{className:"flex max-w-full flex-wrap justify-end gap-1 text-[10px] font-mono sm:gap-1.5 sm:text-[11px]",children:R2.map(([e,t])=>d.jsx(gx,{to:e,children:({isActive:n})=>d.jsxs(O.span,{className:`inline-block rounded-md border px-1.5 py-1 sm:px-2 sm:py-1.5 ${n?"nav-hack-active":"border-transparent text-slate-500 hover:border-bubble-accent/35 hover:text-bubble-accent hover:shadow-[0_0_18px_rgba(0,229,255,0.25)]"}`,whileHover:{scale:1.06,y:-1},whileTap:{scale:.97},transition:{type:"spring",stiffness:400,damping:22},children:[d.jsx("span",{className:"text-bubble-mint/35",children:"⟨"}),t,d.jsx("span",{className:"text-bubble-mint/35",children:"⟩"})]})},e))})]})]}),d.jsx("main",{className:"relative z-10 mx-auto max-w-6xl px-4 py-8",children:d.jsx(O.div,{initial:{opacity:0,y:14},animate:{opacity:1,y:0},transition:{duration:.45,ease:[.22,1,.36,1]},children:d.jsxs(ix,{children:[d.jsx(_e,{path:"/",element:d.jsx(d2,{})}),d.jsx(_e,{path:"/capture",element:d.jsx(C2,{})}),d.jsx(_e,{path:"/read",element:d.jsx(f2,{})}),d.jsx(_e,{path:"/write",element:d.jsx(v2,{})}),d.jsx(_e,{path:"/brute",element:d.jsx(P2,{})}),d.jsx(_e,{path:"/emulate",element:d.jsx(E2,{})}),d.jsx(_e,{path:"/keylab",element:d.jsx(N2,{})}),d.jsx(_e,{path:"/library",element:d.jsx(x2,{})}),d.jsx(_e,{path:"/keys",element:d.jsx(b2,{})}),d.jsx(_e,{path:"/raw",element:d.jsx(S2,{})}),d.jsx(_e,{path:"/settings",element:d.jsx(k2,{})})]})})})]})})})}const D2=localStorage.getItem("theme");D2==="light"&&(document.documentElement.classList.add("light"),document.documentElement.classList.remove("dark"));const Lf=document.getElementById("root");Lf&&na.createRoot(Lf).render(d.jsx($f.StrictMode,{children:d.jsx(px,{children:d.jsx(L2,{})})})); diff --git a/firmware/data/assets/index-hoMg1Qkq.css b/firmware/data/assets/index-hoMg1Qkq.css deleted file mode 100644 index d38024a..0000000 --- a/firmware/data/assets/index-hoMg1Qkq.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:JetBrains Mono,ui-monospace,monospace;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,ui-monospace,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.inset-y-2{top:.5rem;bottom:.5rem}.-bottom-16{bottom:-4rem}.-left-16{left:-4rem}.-left-20{left:-5rem}.-left-8{left:-2rem}.-left-\[20\%\]{left:-20%}.-right-20{right:-5rem}.-right-24{right:-6rem}.-right-\[15\%\]{right:-15%}.-top-20{top:-5rem}.-top-8{top:-2rem}.bottom-0{bottom:0}.bottom-5{bottom:1.25rem}.bottom-\[5\%\]{bottom:5%}.left-0{left:0}.left-2{left:.5rem}.left-8{left:2rem}.left-\[35\%\]{left:35%}.right-5{right:1.25rem}.top-0{top:0}.top-8{top:2rem}.top-9{top:2.25rem}.top-\[10\%\]{top:10%}.top-\[4\.25rem\]{top:4.25rem}.top-\[40\%\]{top:40%}.z-10{z-index:10}.z-40{z-index:40}.z-\[1\]{z-index:1}.z-\[2\]{z-index:2}.z-\[55\]{z-index:55}.z-\[60\]{z-index:60}.mx-1\.5{margin-left:.375rem;margin-right:.375rem}.mx-auto{margin-left:auto;margin-right:auto}.-mt-0\.5{margin-top:-.125rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-2{height:.5rem}.h-36{height:9rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-72{height:18rem}.h-\[4\.75rem\]{height:4.75rem}.h-\[72\%\]{height:72%}.h-\[min\(45vh\,360px\)\]{height:min(45vh,360px)}.h-\[min\(55vh\,440px\)\]{height:min(55vh,440px)}.h-\[min\(70vh\,520px\)\]{height:min(70vh,520px)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-32{max-height:8rem}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.min-h-screen{min-height:100vh}.w-1\/3{width:33.333333%}.w-2{width:.5rem}.w-2\/5{width:40%}.w-36{width:9rem}.w-40{width:10rem}.w-48{width:12rem}.w-72{width:18rem}.w-\[4\.75rem\]{width:4.75rem}.w-\[72\%\]{width:72%}.w-\[min\(45vh\,360px\)\]{width:min(45vh,360px)}.w-\[min\(55vh\,440px\)\]{width:min(55vh,440px)}.w-\[min\(70vh\,520px\)\]{width:min(70vh,520px)}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[16rem\]{min-width:16rem}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-6xl{max-width:72rem}.max-w-\[12rem\]{max-width:12rem}.max-w-\[280px\]{max-width:280px}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.origin-center{transform-origin:center}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.skew-x-\[-18deg\]{--tw-skew-x: -18deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.animate-\[spin_32s_linear_infinite\]{animation:spin 32s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-\[spin_6s_linear_infinite\]{animation:spin 6s linear infinite}@keyframes floatSlow{0%,to{transform:translate(0) rotate(0)}33%{transform:translate(12px,-18px) rotate(2deg)}66%{transform:translate(-8px,10px) rotate(-1deg)}}.animate-floatSlow{animation:floatSlow 18s ease-in-out infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulseGlow{0%,to{opacity:.35;transform:scale(1)}50%{opacity:.65;transform:scale(1.08)}}.animate-pulseGlow{animation:pulseGlow 5s ease-in-out infinite}@keyframes shimmerLine{0%{transform:translate(-100%) skew(-12deg);opacity:0}20%{opacity:.9}to{transform:translate(200%) skew(-12deg);opacity:0}}.animate-shimmerLine{animation:shimmerLine 2.8s ease-in-out infinite}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-y-1{row-gap:.25rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-all{word-break:break-all}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-amber-500\/30{border-color:#f59e0b4d}.border-bubble-accent\/15{border-color:#00e5ff26}.border-bubble-accent\/20{border-color:#00e5ff33}.border-bubble-accent\/25{border-color:#00e5ff40}.border-bubble-accent\/40{border-color:#00e5ff66}.border-bubble-accent\/45{border-color:#00e5ff73}.border-bubble-accent\/50{border-color:#00e5ff80}.border-bubble-mint{--tw-border-opacity: 1;border-color:rgb(0 255 157 / var(--tw-border-opacity, 1))}.border-bubble-mint\/15{border-color:#00ff9d26}.border-bubble-mint\/20{border-color:#00ff9d33}.border-bubble-mint\/25{border-color:#00ff9d40}.border-bubble-mint\/30{border-color:#00ff9d4d}.border-bubble-mint\/40{border-color:#00ff9d66}.border-bubble-mint\/70{border-color:#00ff9db3}.border-bubble-rose{--tw-border-opacity: 1;border-color:rgb(255 42 109 / var(--tw-border-opacity, 1))}.border-bubble-rose\/40{border-color:#ff2a6d66}.border-bubble-rose\/50{border-color:#ff2a6d80}.border-transparent{border-color:transparent}.border-white\/10{border-color:#ffffff1a}.border-white\/15{border-color:#ffffff26}.border-white\/20{border-color:#fff3}.border-white\/5{border-color:#ffffff0d}.border-yellow-200\/90{border-color:#fef08ae6}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-black\/20{background-color:#0003}.bg-black\/25{background-color:#00000040}.bg-black\/30{background-color:#0000004d}.bg-black\/35{background-color:#00000059}.bg-black\/40{background-color:#0006}.bg-bubble-900\/95{background-color:#051210f2}.bg-bubble-950{--tw-bg-opacity: 1;background-color:rgb(2 4 8 / var(--tw-bg-opacity, 1))}.bg-bubble-950\/80{background-color:#020408cc}.bg-bubble-950\/95{background-color:#020408f2}.bg-bubble-accent{--tw-bg-opacity: 1;background-color:rgb(0 229 255 / var(--tw-bg-opacity, 1))}.bg-bubble-accent\/10{background-color:#00e5ff1a}.bg-bubble-accent\/15{background-color:#00e5ff26}.bg-bubble-accent\/20{background-color:#00e5ff33}.bg-bubble-accent\/5{background-color:#00e5ff0d}.bg-bubble-accent\/90{background-color:#00e5ffe6}.bg-bubble-mint\/10{background-color:#00ff9d1a}.bg-bubble-mint\/15{background-color:#00ff9d26}.bg-bubble-mint\/20{background-color:#00ff9d33}.bg-bubble-mint\/5{background-color:#00ff9d0d}.bg-bubble-rose\/10{background-color:#ff2a6d1a}.bg-cyan-400\/20{background-color:#22d3ee33}.bg-emerald-400\/15{background-color:#34d39926}.bg-fuchsia-600\/25{background-color:#c026d340}.bg-white\/5{background-color:#ffffff0d}.bg-\[conic-gradient\(from_180deg_at_50\%_120\%\,rgba\(0\,229\,255\,0\.08\)\,transparent_40\%\,rgba\(255\,42\,109\,0\.06\)\,transparent_70\%\)\]{background-image:conic-gradient(from 180deg at 50% 120%,rgba(0,229,255,.08),transparent 40%,rgba(255,42,109,.06),transparent 70%)}.bg-\[radial-gradient\(ellipse_at_center\,transparent_0\%\,rgba\(2\,4\,8\,0\.75\)_100\%\)\]{background-image:radial-gradient(ellipse at center,transparent 0%,rgba(2,4,8,.75) 100%)}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-amber-400\/45{--tw-gradient-from: rgb(251 191 36 / .45) var(--tw-gradient-from-position);--tw-gradient-to: rgb(251 191 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-accent{--tw-gradient-from: #00e5ff var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 229 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-accent\/10{--tw-gradient-from: rgb(0 229 255 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 229 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-accent\/15{--tw-gradient-from: rgb(0 229 255 / .15) var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 229 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-accent\/20{--tw-gradient-from: rgb(0 229 255 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 229 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-accent\/25{--tw-gradient-from: rgb(0 229 255 / .25) var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 229 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-accent\/\[0\.06\]{--tw-gradient-from: rgb(0 229 255 / .06) var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 229 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-mint{--tw-gradient-from: #00ff9d var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 255 157 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-rose{--tw-gradient-from: #ff2a6d var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 42 109 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-rose\/20{--tw-gradient-from: rgb(255 42 109 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 42 109 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-bubble-rose\/30{--tw-gradient-from: rgb(255 42 109 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 42 109 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-transparent{--tw-gradient-from: transparent var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-yellow-100{--tw-gradient-from: #fef9c3 var(--tw-gradient-from-position);--tw-gradient-to: rgb(254 249 195 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-bubble-accent{--tw-gradient-to: rgb(0 229 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #00e5ff var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-bubble-accent\/40{--tw-gradient-to: rgb(0 229 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(0 229 255 / .4) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-bubble-mint\/60{--tw-gradient-to: rgb(0 255 157 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(0 255 157 / .6) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cyan-400{--tw-gradient-to: rgb(34 211 238 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #22d3ee var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-transparent{--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), transparent var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-white\/60{--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(255 255 255 / .6) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-yellow-200\/30{--tw-gradient-to: rgb(254 240 138 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(254 240 138 / .3) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-amber-500{--tw-gradient-to: #f59e0b var(--tw-gradient-to-position)}.to-bubble-mint{--tw-gradient-to: #00ff9d var(--tw-gradient-to-position)}.to-bubble-mint\/10{--tw-gradient-to: rgb(0 255 157 / .1) var(--tw-gradient-to-position)}.to-bubble-mint\/15{--tw-gradient-to: rgb(0 255 157 / .15) var(--tw-gradient-to-position)}.to-bubble-mint\/30{--tw-gradient-to: rgb(0 255 157 / .3) var(--tw-gradient-to-position)}.to-bubble-mint\/35{--tw-gradient-to: rgb(0 255 157 / .35) var(--tw-gradient-to-position)}.to-bubble-mint\/\[0\.07\]{--tw-gradient-to: rgb(0 255 157 / .07) var(--tw-gradient-to-position)}.to-bubble-rose{--tw-gradient-to: #ff2a6d var(--tw-gradient-to-position)}.to-indigo-400{--tw-gradient-to: #818cf8 var(--tw-gradient-to-position)}.to-orange-400{--tw-gradient-to: #fb923c var(--tw-gradient-to-position)}.to-orange-500{--tw-gradient-to: #f97316 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-bubble-mint\/40{fill:#00ff9d66}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pl-0\.5{padding-left:.125rem}.pt-3{padding-top:.75rem}.pt-8{padding-top:2rem}.text-center{text-align:center}.font-display{font-family:Audiowide,Orbitron,ui-sans-serif,system-ui,sans-serif}.font-mono{font-family:JetBrains Mono,ui-monospace,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-relaxed{line-height:1.625}.tracking-\[0\.12em\]{letter-spacing:.12em}.tracking-\[0\.15em\]{letter-spacing:.15em}.tracking-\[0\.35em\]{letter-spacing:.35em}.tracking-\[0\.42em\]{letter-spacing:.42em}.tracking-\[0\.4em\]{letter-spacing:.4em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-100{--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity, 1))}.text-bubble-950{--tw-text-opacity: 1;color:rgb(2 4 8 / var(--tw-text-opacity, 1))}.text-bubble-accent{--tw-text-opacity: 1;color:rgb(0 229 255 / var(--tw-text-opacity, 1))}.text-bubble-accent\/60{color:#00e5ff99}.text-bubble-accent\/70{color:#00e5ffb3}.text-bubble-accent\/80{color:#00e5ffcc}.text-bubble-accent\/90{color:#00e5ffe6}.text-bubble-mint{--tw-text-opacity: 1;color:rgb(0 255 157 / var(--tw-text-opacity, 1))}.text-bubble-mint\/20{color:#00ff9d33}.text-bubble-mint\/25{color:#00ff9d40}.text-bubble-mint\/35{color:#00ff9d59}.text-bubble-mint\/40{color:#00ff9d66}.text-bubble-mint\/50{color:#00ff9d80}.text-bubble-mint\/70{color:#00ff9db3}.text-bubble-mint\/80{color:#00ff9dcc}.text-bubble-mint\/90{color:#00ff9de6}.text-bubble-rose{--tw-text-opacity: 1;color:rgb(255 42 109 / var(--tw-text-opacity, 1))}.text-bubble-rose\/80{color:#ff2a6dcc}.text-bubble-rose\/90{color:#ff2a6de6}.text-bubble-volt{--tw-text-opacity: 1;color:rgb(212 255 0 / var(--tw-text-opacity, 1))}.text-rose-300{--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-100{--tw-text-opacity: 1;color:rgb(254 249 195 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-30{opacity:.3}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow-\[0_0_12px_rgba\(250\,204\,21\,1\)\]{--tw-shadow: 0 0 12px rgba(250,204,21,1);--tw-shadow-colored: 0 0 12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-glow{--tw-shadow: 0 0 50px -10px rgba(0,255,157,.55), 0 0 100px -40px rgba(0,229,255,.35), 0 0 30px -5px rgba(255,42,109,.2);--tw-shadow-colored: 0 0 50px -10px var(--tw-shadow-color), 0 0 100px -40px var(--tw-shadow-color), 0 0 30px -5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-glowCyan{--tw-shadow: 0 0 40px -5px rgba(0,229,255,.65);--tw-shadow-colored: 0 0 40px -5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-glowRose{--tw-shadow: 0 0 35px -5px rgba(255,42,109,.5);--tw-shadow-colored: 0 0 35px -5px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-neonBtn{--tw-shadow: 0 0 25px rgba(0,229,255,.45), 0 0 50px rgba(0,255,157,.2), inset 0 0 20px rgba(0,229,255,.15);--tw-shadow-colored: 0 0 25px var(--tw-shadow-color), 0 0 50px var(--tw-shadow-color), inset 0 0 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-bubble-accent\/40{--tw-ring-color: rgb(0 229 255 / .4)}.ring-bubble-mint\/40{--tw-ring-color: rgb(0 255 157 / .4)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-2xl{--tw-blur: blur(40px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-3xl{--tw-blur: blur(64px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[100px\]{--tw-blur: blur(100px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[80px\]{--tw-blur: blur(80px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[90px\]{--tw-blur: blur(90px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-\[0_0_14px_rgba\(250\,204\,21\,0\.9\)\]{--tw-drop-shadow: drop-shadow(0 0 14px rgba(250,204,21,.9));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-\[0_0_40px_rgba\(0\,229\,255\,0\.35\)\]{--tw-drop-shadow: drop-shadow(0 0 40px rgba(0,229,255,.35));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{color-scheme:dark;--hack-matrix: #00ff9d;--hack-cyan: #00e5ff;--hack-void: #020408;--hack-rose: #ff2a6d}.light{color-scheme:light}.hack-grid{background-color:var(--hack-void);background-image:linear-gradient(rgba(0,255,157,.055) 1px,transparent 1px),linear-gradient(90deg,rgba(0,229,255,.05) 1px,transparent 1px),radial-gradient(ellipse 100% 60% at 50% -30%,rgba(0,229,255,.18),transparent 55%),radial-gradient(ellipse 70% 50% at 110% 80%,rgba(255,42,109,.12),transparent 50%),radial-gradient(ellipse 50% 40% at -10% 60%,rgba(0,255,157,.1),transparent 45%);background-size:20px 20px,20px 20px,100% 100%,100% 100%,100% 100%}.hack-scanlines:before{content:"";pointer-events:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:35;background:repeating-linear-gradient(0deg,transparent,transparent 2px,rgba(0,0,0,.18) 2px,rgba(0,0,0,.18) 4px);opacity:.45;box-shadow:inset 0 0 120px #00000080}.light.hack-root .hack-scanlines:before{opacity:.06}.glass{position:relative;border-radius:1rem;border-width:1px;border-color:#00ff9d40;background-color:#051210bf;--tw-shadow: inset 0 1px 0 0 rgba(0,255,157,.12);--tw-shadow-colored: inset 0 1px 0 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-backdrop-blur: blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);box-shadow:0 0 0 1px #00e5ff1f,0 0 40px -12px #00ff9d40,0 12px 40px -12px #000000bf,inset 0 1px #00ff9d1a;transition:box-shadow .35s ease,border-color .35s ease}.glass:hover{box-shadow:0 0 0 1px #00e5ff38,0 0 55px -10px #00ff9d66,0 16px 48px -12px #000c,inset 0 1px #00e5ff1f;border-color:#00e5ff59}.light .glass{border-color:#cbd5e1cc;background-color:#ffffffe6;--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);box-shadow:0 4px 24px -4px #0000001f}.light .glass:hover{box-shadow:0 8px 32px -4px #00000026}.text-glow-matrix{text-shadow:0 0 12px rgba(0,255,157,.8),0 0 28px rgba(0,255,157,.45),0 0 60px rgba(0,229,255,.25)}.text-glow-cyan{text-shadow:0 0 14px rgba(0,229,255,.75),0 0 36px rgba(0,229,255,.35)}.text-glow-rose{text-shadow:0 0 16px rgba(255,42,109,.65)}.nav-hack-active{border-width:1px;border-color:#00ff9db3;background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: rgb(0 255 157 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 255 157 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);--tw-gradient-to: rgb(0 229 255 / .1) var(--tw-gradient-to-position);--tw-text-opacity: 1;color:rgb(0 255 157 / var(--tw-text-opacity, 1));box-shadow:0 0 28px -4px #00ff9d8c,0 0 40px -8px #00e5ff59,inset 0 0 20px -8px #00e5ff33;animation:borderPulse 2s ease-in-out infinite}.btn-neon{position:relative;overflow:hidden;font-weight:700;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.3s;box-shadow:0 0 20px #00e5ff59,inset 0 1px #ffffff26}.btn-neon:hover{transform:translateY(-1px) scale(1.02);box-shadow:0 0 35px #00ff9d73,0 0 50px #00e5ff40}.btn-neon:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:linear-gradient(105deg,transparent 40%,rgba(255,255,255,.2) 50%,transparent 60%);transform:translate(-100%);animation:shimmerLine 3s ease-in-out infinite}.flash-log-bar{background:linear-gradient(90deg,#000000d9,#051210eb,#000000d9);box-shadow:0 4px 24px #00ff9d14,inset 0 1px #00e5ff26}.flash-log-bar:after{content:"";position:absolute;bottom:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,rgba(0,255,157,.5),rgba(0,229,255,.6),transparent)}.selection\:bg-bubble-accent\/40 *::-moz-selection{background-color:#00e5ff66}.selection\:bg-bubble-accent\/40 *::selection{background-color:#00e5ff66}.selection\:text-bubble-950 *::-moz-selection{--tw-text-opacity: 1;color:rgb(2 4 8 / var(--tw-text-opacity, 1))}.selection\:text-bubble-950 *::selection{--tw-text-opacity: 1;color:rgb(2 4 8 / var(--tw-text-opacity, 1))}.selection\:bg-bubble-accent\/40::-moz-selection{background-color:#00e5ff66}.selection\:bg-bubble-accent\/40::selection{background-color:#00e5ff66}.selection\:text-bubble-950::-moz-selection{--tw-text-opacity: 1;color:rgb(2 4 8 / var(--tw-text-opacity, 1))}.selection\:text-bubble-950::selection{--tw-text-opacity: 1;color:rgb(2 4 8 / var(--tw-text-opacity, 1))}.hover\:border-bubble-accent\/35:hover{border-color:#00e5ff59}.hover\:border-bubble-accent\/50:hover{border-color:#00e5ff80}.hover\:border-bubble-rose:hover{--tw-border-opacity: 1;border-color:rgb(255 42 109 / var(--tw-border-opacity, 1))}.hover\:bg-bubble-rose\/20:hover{background-color:#ff2a6d33}.hover\:text-bubble-accent:hover{--tw-text-opacity: 1;color:rgb(0 229 255 / var(--tw-text-opacity, 1))}.hover\:shadow-\[0_0_18px_rgba\(0\,229\,255\,0\.25\)\]:hover{--tw-shadow: 0 0 18px rgba(0,229,255,.25);--tw-shadow-colored: 0 0 18px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-bubble-accent\/40:focus{--tw-ring-color: rgb(0 229 255 / .4)}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width: 640px){.sm\:left-4{left:1rem}.sm\:top-\[4\.5rem\]{top:4.5rem}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:inline{display:inline}.sm\:h-\[5\.5rem\]{height:5.5rem}.sm\:w-\[5\.5rem\]{width:5.5rem}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:gap-1\.5{gap:.375rem}.sm\:gap-4{gap:1rem}.sm\:px-2{padding-left:.5rem;padding-right:.5rem}.sm\:py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-\[10px\]{font-size:10px}.sm\:text-\[11px\]{font-size:11px}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}.sm\:text-xs{font-size:.75rem;line-height:1rem}}@media (min-width: 768px){.md\:top-\[5\.25rem\]{top:5.25rem}.md\:inline{display:inline}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:p-10{padding:2.5rem}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-4xl{font-size:2.25rem;line-height:2.5rem}.md\:text-5xl{font-size:3rem;line-height:1}}@media (min-width: 1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-\[1fr_min\(320px\,40\%\)\]{grid-template-columns:1fr min(320px,40%)}.lg\:items-center{align-items:center}.lg\:justify-end{justify-content:flex-end}.lg\:text-\[10px\]{font-size:10px}} diff --git a/firmware/data/index.html b/firmware/data/index.html index 0c62328..fa911af 100644 --- a/firmware/data/index.html +++ b/firmware/data/index.html @@ -11,8 +11,8 @@ href="https://fonts.googleapis.com/css2?family=Audiowide&family=JetBrains+Mono:ital,wght@0,400;0,600;0,700;1,400&family=Orbitron:wght@500;600;700;800&display=swap" rel="stylesheet" /> - - + +
diff --git a/firmware/main/main.c b/firmware/main/main.c index 567f358..f2d78f1 100644 --- a/firmware/main/main.c +++ b/firmware/main/main.c @@ -12,8 +12,12 @@ void app_main(void) (void)esp_ota_mark_app_valid_cancel_rollback(); board_rgb_led_quiet(); ESP_LOGI(TAG, "PN532 NFC Toolkit starting"); - ESP_ERROR_CHECK(nfc_engine_init()); + nfc_engine_try_init(); /* non-fatal: logs warning if PN532 absent, AP starts regardless */ session_capture_init(); ESP_ERROR_CHECK(app_net_init()); - ESP_LOGI(TAG, "Open AP SSID PN532-Toolkit — http://192.168.4.1"); + if (nfc_engine_is_ready()) { + ESP_LOGI(TAG, "PN532 ready · AP SSID PN532-Toolkit → http://192.168.4.1"); + } else { + ESP_LOGW(TAG, "PN532 not found at boot — AP running, retrying · http://192.168.4.1"); + } } diff --git a/web/src/App.tsx b/web/src/App.tsx index d53ab98..f80d107 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -3,7 +3,7 @@ import { NavLink, Route, Routes } from "react-router-dom"; import BrowserLogBar from "./BrowserLogBar"; import FlashBackdrop from "./FlashBackdrop"; import ScanCashFlourish from "./ScanCashFlourish"; -import { NfcWsProvider } from "./NfcWsContext"; +import { NfcWsProvider, useNfcWs } from "./NfcWsContext"; import { ToastHost } from "./toast"; import Dashboard from "./pages/Dashboard"; import ReadAnalyze from "./pages/ReadAnalyze"; @@ -17,6 +17,29 @@ import Brute from "./pages/Brute"; import Emulate from "./pages/Emulate"; import KeyLab from "./pages/KeyLab"; +function HeaderBadge() { + const { wsOk, pn532Connected } = useNfcWs(); + return ( + + {" "} + RF_STACK{" "} + + {!wsOk ? "WAIT" : pn532Connected ? "LIVE" : "NO RF"} + + + ws://stream + + ); +} + const nav = [ ["/", "Dash"], ["/capture", "Read-all"], @@ -70,12 +93,7 @@ export default function App() { MAXIMAL - - RF_STACK{" "} - LIVE - - ws://stream - +